gitnexus 1.6.6-rc.98 → 1.6.6

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 (541) hide show
  1. package/README.md +122 -68
  2. package/dist/_shared/graph/types.d.ts +17 -1
  3. package/dist/_shared/graph/types.d.ts.map +1 -1
  4. package/dist/_shared/index.d.ts +3 -5
  5. package/dist/_shared/index.d.ts.map +1 -1
  6. package/dist/_shared/index.js +2 -4
  7. package/dist/_shared/index.js.map +1 -1
  8. package/dist/_shared/scope-resolution/module-scope-index.d.ts +1 -2
  9. package/dist/_shared/scope-resolution/module-scope-index.d.ts.map +1 -1
  10. package/dist/_shared/scope-resolution/module-scope-index.js +1 -2
  11. package/dist/_shared/scope-resolution/module-scope-index.js.map +1 -1
  12. package/dist/_shared/scope-resolution/parsed-file.d.ts +24 -0
  13. package/dist/_shared/scope-resolution/parsed-file.d.ts.map +1 -1
  14. package/dist/_shared/scope-resolution/reference-site.d.ts +13 -1
  15. package/dist/_shared/scope-resolution/reference-site.d.ts.map +1 -1
  16. package/dist/_shared/scope-resolution/registries/context.d.ts +1 -0
  17. package/dist/_shared/scope-resolution/registries/context.d.ts.map +1 -1
  18. package/dist/_shared/scope-resolution/registries/context.js +6 -0
  19. package/dist/_shared/scope-resolution/registries/context.js.map +1 -1
  20. package/dist/_shared/scope-resolution/registries/evidence.d.ts +2 -3
  21. package/dist/_shared/scope-resolution/registries/evidence.d.ts.map +1 -1
  22. package/dist/_shared/scope-resolution/registries/evidence.js +2 -3
  23. package/dist/_shared/scope-resolution/registries/evidence.js.map +1 -1
  24. package/dist/_shared/scope-resolution/registries/macro-registry.d.ts +29 -0
  25. package/dist/_shared/scope-resolution/registries/macro-registry.d.ts.map +1 -0
  26. package/dist/_shared/scope-resolution/registries/macro-registry.js +32 -0
  27. package/dist/_shared/scope-resolution/registries/macro-registry.js.map +1 -0
  28. package/dist/_shared/scope-resolution/symbol-definition.d.ts +9 -0
  29. package/dist/_shared/scope-resolution/symbol-definition.d.ts.map +1 -1
  30. package/dist/_shared/scope-resolution/types.d.ts +1 -1
  31. package/dist/_shared/scope-resolution/types.d.ts.map +1 -1
  32. package/dist/cli/ai-context.d.ts +35 -1
  33. package/dist/cli/ai-context.js +111 -12
  34. package/dist/cli/analyze-config.d.ts +92 -0
  35. package/dist/cli/analyze-config.js +364 -0
  36. package/dist/cli/analyze.d.ts +17 -1
  37. package/dist/cli/analyze.js +224 -71
  38. package/dist/cli/cli-message.d.ts +1 -1
  39. package/dist/cli/doctor.d.ts +18 -0
  40. package/dist/cli/doctor.js +32 -0
  41. package/dist/cli/i18n/en.d.ts +2 -2
  42. package/dist/cli/i18n/en.js +2 -2
  43. package/dist/cli/i18n/resources.d.ts +2 -2
  44. package/dist/cli/i18n/zh-CN.js +2 -2
  45. package/dist/cli/index.js +4 -2
  46. package/dist/cli/resolve-invocation.d.ts +21 -0
  47. package/dist/cli/resolve-invocation.js +68 -0
  48. package/dist/cli/setup.d.ts +33 -0
  49. package/dist/cli/setup.js +96 -35
  50. package/dist/cli/skill-gen.js +2 -2
  51. package/dist/cli/wiki.js +20 -4
  52. package/dist/core/embeddings/embedder.d.ts +1 -1
  53. package/dist/core/embeddings/embedder.js +14 -1
  54. package/dist/core/embeddings/runtime-support.d.ts +41 -0
  55. package/dist/core/embeddings/runtime-support.js +65 -0
  56. package/dist/core/group/extractors/grpc-patterns/proto.js +2 -1
  57. package/dist/core/group/extractors/http-patterns/java.js +15 -1
  58. package/dist/core/ingestion/call-processor.d.ts +57 -227
  59. package/dist/core/ingestion/call-processor.js +172 -2595
  60. package/dist/core/ingestion/call-routing.d.ts +6 -5
  61. package/dist/core/ingestion/call-routing.js +6 -6
  62. package/dist/core/ingestion/call-types.d.ts +0 -75
  63. package/dist/core/ingestion/class-extractors/configs/c-cpp.js +26 -1
  64. package/dist/core/ingestion/class-extractors/configs/ruby.js +3 -0
  65. package/dist/core/ingestion/class-extractors/generic.js +9 -11
  66. package/dist/core/ingestion/class-types.d.ts +23 -0
  67. package/dist/core/ingestion/cobol/cobol-preprocessor.d.ts +11 -0
  68. package/dist/core/ingestion/cobol/cobol-preprocessor.js +227 -73
  69. package/dist/core/ingestion/cobol-processor.d.ts +1 -0
  70. package/dist/core/ingestion/cobol-processor.js +51 -2
  71. package/dist/core/ingestion/emit-references.js +8 -2
  72. package/dist/core/ingestion/export-detection.d.ts +2 -1
  73. package/dist/core/ingestion/export-detection.js +2 -6
  74. package/dist/core/ingestion/field-extractors/configs/dart.d.ts +0 -6
  75. package/dist/core/ingestion/field-extractors/configs/dart.js +62 -44
  76. package/dist/core/ingestion/field-extractors/configs/go.d.ts +0 -9
  77. package/dist/core/ingestion/field-extractors/configs/go.js +40 -1
  78. package/dist/core/ingestion/field-extractors/configs/jvm.js +43 -4
  79. package/dist/core/ingestion/field-extractors/configs/php.js +1 -2
  80. package/dist/core/ingestion/field-extractors/configs/swift.d.ts +12 -1
  81. package/dist/core/ingestion/field-extractors/configs/swift.js +31 -6
  82. package/dist/core/ingestion/field-extractors/generic.d.ts +6 -0
  83. package/dist/core/ingestion/field-extractors/generic.js +5 -4
  84. package/dist/core/ingestion/field-extractors/typescript.js +0 -29
  85. package/dist/core/ingestion/filesystem-walker.d.ts +0 -9
  86. package/dist/core/ingestion/filesystem-walker.js +0 -11
  87. package/dist/core/ingestion/finalize-orchestrator.js +14 -2
  88. package/dist/core/ingestion/import-resolvers/configs/swift.d.ts +21 -0
  89. package/dist/core/ingestion/import-resolvers/configs/swift.js +72 -11
  90. package/dist/core/ingestion/import-resolvers/python.d.ts +1 -1
  91. package/dist/core/ingestion/import-resolvers/standard.d.ts +2 -2
  92. package/dist/core/ingestion/import-resolvers/standard.js +6 -5
  93. package/dist/core/ingestion/import-resolvers/utils.d.ts +2 -5
  94. package/dist/core/ingestion/import-resolvers/utils.js +1 -9
  95. package/dist/core/ingestion/language-provider.d.ts +39 -119
  96. package/dist/core/ingestion/language-provider.js +0 -2
  97. package/dist/core/ingestion/languages/c/capture-side-channel.d.ts +62 -0
  98. package/dist/core/ingestion/languages/c/capture-side-channel.js +65 -0
  99. package/dist/core/ingestion/languages/c/captures.js +41 -23
  100. package/dist/core/ingestion/languages/c/import-decomposer.d.ts +9 -0
  101. package/dist/core/ingestion/languages/c/import-decomposer.js +15 -0
  102. package/dist/core/ingestion/languages/c/import-target.js +52 -9
  103. package/dist/core/ingestion/languages/c/index.d.ts +2 -1
  104. package/dist/core/ingestion/languages/c/index.js +2 -1
  105. package/dist/core/ingestion/languages/c/query.js +15 -0
  106. package/dist/core/ingestion/languages/c/scope-resolver.js +47 -4
  107. package/dist/core/ingestion/languages/c/static-linkage.d.ts +8 -0
  108. package/dist/core/ingestion/languages/c/static-linkage.js +46 -1
  109. package/dist/core/ingestion/languages/c-cpp.js +16 -7
  110. package/dist/core/ingestion/languages/cobol/captures.js +25 -2
  111. package/dist/core/ingestion/languages/cpp/adl.d.ts +88 -4
  112. package/dist/core/ingestion/languages/cpp/adl.js +380 -160
  113. package/dist/core/ingestion/languages/cpp/arity-metadata.js +2 -8
  114. package/dist/core/ingestion/languages/cpp/capture-side-channel.d.ts +65 -0
  115. package/dist/core/ingestion/languages/cpp/capture-side-channel.js +78 -0
  116. package/dist/core/ingestion/languages/cpp/captures.js +162 -54
  117. package/dist/core/ingestion/languages/cpp/file-local-linkage.d.ts +18 -52
  118. package/dist/core/ingestion/languages/cpp/file-local-linkage.js +49 -1
  119. package/dist/core/ingestion/languages/cpp/import-decomposer.d.ts +7 -0
  120. package/dist/core/ingestion/languages/cpp/import-decomposer.js +12 -0
  121. package/dist/core/ingestion/languages/cpp/index.d.ts +1 -0
  122. package/dist/core/ingestion/languages/cpp/index.js +1 -0
  123. package/dist/core/ingestion/languages/cpp/inline-namespaces.d.ts +8 -0
  124. package/dist/core/ingestion/languages/cpp/inline-namespaces.js +21 -0
  125. package/dist/core/ingestion/languages/cpp/query.js +21 -0
  126. package/dist/core/ingestion/languages/cpp/range-bindings.js +20 -5
  127. package/dist/core/ingestion/languages/cpp/scope-resolver.js +52 -5
  128. package/dist/core/ingestion/languages/cpp/two-phase-lookup.d.ts +20 -0
  129. package/dist/core/ingestion/languages/cpp/two-phase-lookup.js +83 -3
  130. package/dist/core/ingestion/languages/csharp/captures.js +205 -41
  131. package/dist/core/ingestion/languages/csharp/index.d.ts +3 -4
  132. package/dist/core/ingestion/languages/csharp/index.js +3 -4
  133. package/dist/core/ingestion/languages/csharp/interpret.js +17 -3
  134. package/dist/core/ingestion/languages/csharp/namespace-siblings.d.ts +17 -7
  135. package/dist/core/ingestion/languages/csharp/namespace-siblings.js +129 -124
  136. package/dist/core/ingestion/languages/csharp/qualified-type-names.d.ts +14 -0
  137. package/dist/core/ingestion/languages/csharp/qualified-type-names.js +59 -0
  138. package/dist/core/ingestion/languages/csharp/query.js +13 -0
  139. package/dist/core/ingestion/languages/csharp/receiver-binding.js +10 -6
  140. package/dist/core/ingestion/languages/csharp/scope-resolver.js +8 -1
  141. package/dist/core/ingestion/languages/csharp.js +0 -5
  142. package/dist/core/ingestion/languages/dart/arity-metadata.d.ts +25 -0
  143. package/dist/core/ingestion/languages/dart/arity-metadata.js +35 -0
  144. package/dist/core/ingestion/languages/dart/arity.d.ts +19 -0
  145. package/dist/core/ingestion/languages/dart/arity.js +31 -0
  146. package/dist/core/ingestion/languages/dart/built-ins.d.ts +11 -0
  147. package/dist/core/ingestion/languages/dart/built-ins.js +34 -0
  148. package/dist/core/ingestion/languages/dart/cache-stats.d.ts +13 -0
  149. package/dist/core/ingestion/languages/dart/cache-stats.js +24 -0
  150. package/dist/core/ingestion/languages/dart/captures.d.ts +29 -0
  151. package/dist/core/ingestion/languages/dart/captures.js +445 -0
  152. package/dist/core/ingestion/languages/dart/expand-wildcards.d.ts +13 -0
  153. package/dist/core/ingestion/languages/dart/expand-wildcards.js +31 -0
  154. package/dist/core/ingestion/languages/dart/import-target.d.ts +15 -0
  155. package/dist/core/ingestion/languages/dart/import-target.js +65 -0
  156. package/dist/core/ingestion/languages/dart/index.d.ts +28 -0
  157. package/dist/core/ingestion/languages/dart/index.js +28 -0
  158. package/dist/core/ingestion/languages/dart/interpret.d.ts +24 -0
  159. package/dist/core/ingestion/languages/dart/interpret.js +95 -0
  160. package/dist/core/ingestion/languages/dart/merge-bindings.d.ts +10 -0
  161. package/dist/core/ingestion/languages/dart/merge-bindings.js +39 -0
  162. package/dist/core/ingestion/languages/dart/query.d.ts +26 -0
  163. package/dist/core/ingestion/languages/dart/query.js +142 -0
  164. package/dist/core/ingestion/languages/dart/receiver-binding.d.ts +24 -0
  165. package/dist/core/ingestion/languages/dart/receiver-binding.js +87 -0
  166. package/dist/core/ingestion/languages/dart/scope-resolver.d.ts +29 -0
  167. package/dist/core/ingestion/languages/dart/scope-resolver.js +194 -0
  168. package/dist/core/ingestion/languages/dart/signature-bindings.d.ts +23 -0
  169. package/dist/core/ingestion/languages/dart/signature-bindings.js +51 -0
  170. package/dist/core/ingestion/languages/dart/simple-hooks.d.ts +20 -0
  171. package/dist/core/ingestion/languages/dart/simple-hooks.js +47 -0
  172. package/dist/core/ingestion/languages/dart.d.ts +0 -1
  173. package/dist/core/ingestion/languages/dart.js +15 -29
  174. package/dist/core/ingestion/languages/go/arity-metadata.d.ts +1 -0
  175. package/dist/core/ingestion/languages/go/arity-metadata.js +31 -1
  176. package/dist/core/ingestion/languages/go/captures.js +247 -26
  177. package/dist/core/ingestion/languages/go/interface-impls.js +476 -50
  178. package/dist/core/ingestion/languages/go/interpret.js +21 -11
  179. package/dist/core/ingestion/languages/go/method-owners.js +20 -8
  180. package/dist/core/ingestion/languages/go/query.js +15 -7
  181. package/dist/core/ingestion/languages/go/range-binding.js +24 -9
  182. package/dist/core/ingestion/languages/go/receiver-binding.js +1 -1
  183. package/dist/core/ingestion/languages/go/scope-resolver.js +2 -2
  184. package/dist/core/ingestion/languages/go/simple-hooks.js +10 -5
  185. package/dist/core/ingestion/languages/go/type-binding.d.ts +1 -0
  186. package/dist/core/ingestion/languages/go/type-binding.js +40 -2
  187. package/dist/core/ingestion/languages/go.d.ts +0 -1
  188. package/dist/core/ingestion/languages/go.js +0 -5
  189. package/dist/core/ingestion/languages/index.d.ts +0 -5
  190. package/dist/core/ingestion/languages/index.js +0 -3
  191. package/dist/core/ingestion/languages/java/captures.js +252 -23
  192. package/dist/core/ingestion/languages/java/interpret.js +12 -6
  193. package/dist/core/ingestion/languages/java/package-siblings.js +18 -5
  194. package/dist/core/ingestion/languages/java/query.js +16 -1
  195. package/dist/core/ingestion/languages/java/scope-resolver.d.ts +2 -8
  196. package/dist/core/ingestion/languages/java/scope-resolver.js +2 -8
  197. package/dist/core/ingestion/languages/java.js +0 -5
  198. package/dist/core/ingestion/languages/javascript/captures.js +185 -11
  199. package/dist/core/ingestion/languages/javascript/query.js +107 -1
  200. package/dist/core/ingestion/languages/kotlin/capture-side-channel.d.ts +57 -0
  201. package/dist/core/ingestion/languages/kotlin/capture-side-channel.js +60 -0
  202. package/dist/core/ingestion/languages/kotlin/captures.js +213 -22
  203. package/dist/core/ingestion/languages/kotlin/companion-scopes.d.ts +7 -0
  204. package/dist/core/ingestion/languages/kotlin/companion-scopes.js +10 -0
  205. package/dist/core/ingestion/languages/kotlin/index.d.ts +1 -0
  206. package/dist/core/ingestion/languages/kotlin/index.js +1 -0
  207. package/dist/core/ingestion/languages/kotlin/query.js +30 -0
  208. package/dist/core/ingestion/languages/kotlin/scope-resolver.d.ts +5 -7
  209. package/dist/core/ingestion/languages/kotlin/scope-resolver.js +22 -7
  210. package/dist/core/ingestion/languages/kotlin.js +8 -5
  211. package/dist/core/ingestion/languages/php/captures.js +135 -19
  212. package/dist/core/ingestion/languages/php/import-decomposer.js +21 -63
  213. package/dist/core/ingestion/languages/php/index.d.ts +3 -4
  214. package/dist/core/ingestion/languages/php/index.js +3 -4
  215. package/dist/core/ingestion/languages/php/query.js +5 -0
  216. package/dist/core/ingestion/languages/php/receiver-binding.js +8 -4
  217. package/dist/core/ingestion/languages/php.js +0 -4
  218. package/dist/core/ingestion/languages/python/captures.js +128 -13
  219. package/dist/core/ingestion/languages/python/depends-references.js +1 -1
  220. package/dist/core/ingestion/languages/python/import-target.d.ts +4 -5
  221. package/dist/core/ingestion/languages/python/import-target.js +108 -16
  222. package/dist/core/ingestion/languages/python/index-stats.d.ts +18 -0
  223. package/dist/core/ingestion/languages/python/index-stats.js +25 -0
  224. package/dist/core/ingestion/languages/python/index.d.ts +3 -4
  225. package/dist/core/ingestion/languages/python/index.js +3 -4
  226. package/dist/core/ingestion/languages/python/query.js +17 -0
  227. package/dist/core/ingestion/languages/python/scope-resolver.js +7 -6
  228. package/dist/core/ingestion/languages/python.d.ts +0 -2
  229. package/dist/core/ingestion/languages/python.js +0 -7
  230. package/dist/core/ingestion/languages/ruby/captures.js +174 -31
  231. package/dist/core/ingestion/languages/ruby/import-target.js +2 -1
  232. package/dist/core/ingestion/languages/ruby/interpret.js +2 -1
  233. package/dist/core/ingestion/languages/ruby/query.js +10 -0
  234. package/dist/core/ingestion/languages/ruby/scope-resolver.js +61 -11
  235. package/dist/core/ingestion/languages/ruby.js +4 -53
  236. package/dist/core/ingestion/languages/rust/captures.js +95 -13
  237. package/dist/core/ingestion/languages/rust/query.js +64 -1
  238. package/dist/core/ingestion/languages/rust/range-binding.js +40 -12
  239. package/dist/core/ingestion/languages/rust/receiver-binding.js +9 -0
  240. package/dist/core/ingestion/languages/rust/scope-resolver.js +75 -1
  241. package/dist/core/ingestion/languages/rust.d.ts +0 -2
  242. package/dist/core/ingestion/languages/rust.js +0 -6
  243. package/dist/core/ingestion/languages/swift/arity-metadata.d.ts +24 -0
  244. package/dist/core/ingestion/languages/swift/arity-metadata.js +41 -0
  245. package/dist/core/ingestion/languages/swift/arity.d.ts +29 -0
  246. package/dist/core/ingestion/languages/swift/arity.js +42 -0
  247. package/dist/core/ingestion/languages/swift/base-type.d.ts +20 -0
  248. package/dist/core/ingestion/languages/swift/base-type.js +27 -0
  249. package/dist/core/ingestion/languages/swift/cache-stats.d.ts +15 -0
  250. package/dist/core/ingestion/languages/swift/cache-stats.js +26 -0
  251. package/dist/core/ingestion/languages/swift/captures.d.ts +35 -0
  252. package/dist/core/ingestion/languages/swift/captures.js +495 -0
  253. package/dist/core/ingestion/languages/swift/implicit-imports.d.ts +34 -0
  254. package/dist/core/ingestion/languages/swift/implicit-imports.js +57 -0
  255. package/dist/core/ingestion/languages/swift/import-decomposer.d.ts +24 -0
  256. package/dist/core/ingestion/languages/swift/import-decomposer.js +84 -0
  257. package/dist/core/ingestion/languages/swift/import-target.d.ts +33 -0
  258. package/dist/core/ingestion/languages/swift/import-target.js +81 -0
  259. package/dist/core/ingestion/languages/swift/index.d.ts +37 -0
  260. package/dist/core/ingestion/languages/swift/index.js +37 -0
  261. package/dist/core/ingestion/languages/swift/interpret.d.ts +15 -0
  262. package/dist/core/ingestion/languages/swift/interpret.js +89 -0
  263. package/dist/core/ingestion/languages/swift/merge-bindings.d.ts +20 -0
  264. package/dist/core/ingestion/languages/swift/merge-bindings.js +48 -0
  265. package/dist/core/ingestion/languages/swift/query.d.ts +46 -0
  266. package/dist/core/ingestion/languages/swift/query.js +194 -0
  267. package/dist/core/ingestion/languages/swift/receiver-binding.d.ts +40 -0
  268. package/dist/core/ingestion/languages/swift/receiver-binding.js +161 -0
  269. package/dist/core/ingestion/languages/swift/scope-resolver.d.ts +50 -0
  270. package/dist/core/ingestion/languages/swift/scope-resolver.js +189 -0
  271. package/dist/core/ingestion/languages/swift/sibling-type-bindings.d.ts +34 -0
  272. package/dist/core/ingestion/languages/swift/sibling-type-bindings.js +65 -0
  273. package/dist/core/ingestion/languages/swift/signature-bindings.d.ts +25 -0
  274. package/dist/core/ingestion/languages/swift/signature-bindings.js +66 -0
  275. package/dist/core/ingestion/languages/swift/simple-hooks.d.ts +37 -0
  276. package/dist/core/ingestion/languages/swift/simple-hooks.js +60 -0
  277. package/dist/core/ingestion/languages/swift/target-grouping.d.ts +51 -0
  278. package/dist/core/ingestion/languages/swift/target-grouping.js +93 -0
  279. package/dist/core/ingestion/languages/swift/target-siblings.d.ts +30 -0
  280. package/dist/core/ingestion/languages/swift/target-siblings.js +71 -0
  281. package/dist/core/ingestion/languages/swift.d.ts +0 -5
  282. package/dist/core/ingestion/languages/swift.js +11 -87
  283. package/dist/core/ingestion/languages/typescript/array-callback.d.ts +3 -29
  284. package/dist/core/ingestion/languages/typescript/array-callback.js +4 -43
  285. package/dist/core/ingestion/languages/typescript/captures.js +147 -17
  286. package/dist/core/ingestion/languages/typescript/index.d.ts +3 -4
  287. package/dist/core/ingestion/languages/typescript/index.js +3 -4
  288. package/dist/core/ingestion/languages/typescript/query.d.ts +2 -3
  289. package/dist/core/ingestion/languages/typescript/query.js +125 -4
  290. package/dist/core/ingestion/languages/typescript/receiver-binding.js +0 -1
  291. package/dist/core/ingestion/languages/typescript.d.ts +2 -3
  292. package/dist/core/ingestion/languages/typescript.js +46 -23
  293. package/dist/core/ingestion/languages/vue/captures.d.ts +46 -0
  294. package/dist/core/ingestion/languages/vue/captures.js +67 -0
  295. package/dist/core/ingestion/languages/vue/import-target.d.ts +27 -0
  296. package/dist/core/ingestion/languages/vue/import-target.js +58 -0
  297. package/dist/core/ingestion/languages/vue/index.d.ts +49 -0
  298. package/dist/core/ingestion/languages/vue/index.js +49 -0
  299. package/dist/core/ingestion/languages/vue/scope-resolver.d.ts +55 -0
  300. package/dist/core/ingestion/languages/vue/scope-resolver.js +292 -0
  301. package/dist/core/ingestion/languages/vue.js +12 -4
  302. package/dist/core/ingestion/local-symbol-pruner.d.ts +11 -0
  303. package/dist/core/ingestion/local-symbol-pruner.js +63 -0
  304. package/dist/core/ingestion/method-extractors/configs/dart.js +14 -1
  305. package/dist/core/ingestion/method-extractors/configs/jvm.js +37 -20
  306. package/dist/core/ingestion/method-extractors/configs/php.js +0 -1
  307. package/dist/core/ingestion/method-extractors/configs/swift.js +11 -4
  308. package/dist/core/ingestion/method-types.d.ts +2 -2
  309. package/dist/core/ingestion/model/index.d.ts +0 -3
  310. package/dist/core/ingestion/model/index.js +0 -8
  311. package/dist/core/ingestion/model/resolve.d.ts +7 -43
  312. package/dist/core/ingestion/model/resolve.js +7 -226
  313. package/dist/core/ingestion/model/scope-resolution-indexes.d.ts +46 -1
  314. package/dist/core/ingestion/model/semantic-model.d.ts +4 -6
  315. package/dist/core/ingestion/model/semantic-model.js +1 -1
  316. package/dist/core/ingestion/model/symbol-table.d.ts +3 -4
  317. package/dist/core/ingestion/model/symbol-table.js +3 -4
  318. package/dist/core/ingestion/parsing-processor.d.ts +30 -24
  319. package/dist/core/ingestion/parsing-processor.js +76 -640
  320. package/dist/core/ingestion/pipeline-phases/communities.d.ts +1 -1
  321. package/dist/core/ingestion/pipeline-phases/communities.js +5 -2
  322. package/dist/core/ingestion/pipeline-phases/cross-file.d.ts +9 -8
  323. package/dist/core/ingestion/pipeline-phases/cross-file.js +16 -12
  324. package/dist/core/ingestion/pipeline-phases/index.d.ts +1 -0
  325. package/dist/core/ingestion/pipeline-phases/index.js +1 -0
  326. package/dist/core/ingestion/pipeline-phases/mro.d.ts +1 -1
  327. package/dist/core/ingestion/pipeline-phases/mro.js +2 -2
  328. package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +44 -22
  329. package/dist/core/ingestion/pipeline-phases/parse-impl.js +426 -565
  330. package/dist/core/ingestion/pipeline-phases/parse.d.ts +13 -33
  331. package/dist/core/ingestion/pipeline-phases/parse.js +2 -2
  332. package/dist/core/ingestion/pipeline-phases/processes.d.ts +1 -1
  333. package/dist/core/ingestion/pipeline-phases/processes.js +5 -3
  334. package/dist/core/ingestion/pipeline-phases/prune-local-symbols.d.ts +14 -0
  335. package/dist/core/ingestion/pipeline-phases/prune-local-symbols.js +26 -0
  336. package/dist/core/ingestion/pipeline.d.ts +27 -19
  337. package/dist/core/ingestion/pipeline.js +4 -2
  338. package/dist/core/ingestion/resolve-references.js +15 -3
  339. package/dist/core/ingestion/route-extractors/laravel.d.ts +10 -0
  340. package/dist/core/ingestion/route-extractors/laravel.js +88 -9
  341. package/dist/core/ingestion/scope-extractor-bridge.d.ts +2 -1
  342. package/dist/core/ingestion/scope-extractor-bridge.js +2 -2
  343. package/dist/core/ingestion/scope-extractor.js +13 -0
  344. package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +181 -15
  345. package/dist/core/ingestion/scope-resolution/contract/scope-resolver.js +21 -10
  346. package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +10 -2
  347. package/dist/core/ingestion/scope-resolution/graph-bridge/ids.d.ts +7 -1
  348. package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +58 -6
  349. package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +24 -5
  350. package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +68 -1
  351. package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +189 -29
  352. package/dist/core/ingestion/scope-resolution/passes/imported-return-types.js +21 -1
  353. package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +1 -1
  354. package/dist/core/ingestion/scope-resolution/pipeline/phase.d.ts +8 -11
  355. package/dist/core/ingestion/scope-resolution/pipeline/phase.js +171 -50
  356. package/dist/core/ingestion/scope-resolution/pipeline/registry.d.ts +3 -4
  357. package/dist/core/ingestion/scope-resolution/pipeline/registry.js +9 -4
  358. package/dist/core/ingestion/scope-resolution/pipeline/run.d.ts +28 -5
  359. package/dist/core/ingestion/scope-resolution/pipeline/run.js +191 -24
  360. package/dist/core/ingestion/scope-resolution/pipeline/validate-bindings-immutability.js +31 -0
  361. package/dist/core/ingestion/scope-resolution/scope/walkers.d.ts +72 -0
  362. package/dist/core/ingestion/scope-resolution/scope/walkers.js +440 -39
  363. package/dist/core/ingestion/scope-resolution/workspace-index.d.ts +18 -2
  364. package/dist/core/ingestion/scope-resolution/workspace-index.js +94 -7
  365. package/dist/core/ingestion/tree-sitter-queries.d.ts +14 -14
  366. package/dist/core/ingestion/tree-sitter-queries.js +380 -158
  367. package/dist/core/ingestion/ts-js-hoc-utils.d.ts +12 -0
  368. package/dist/core/ingestion/ts-js-hoc-utils.js +105 -0
  369. package/dist/core/ingestion/type-env.d.ts +2 -1
  370. package/dist/core/ingestion/type-env.js +6 -8
  371. package/dist/core/ingestion/type-extractors/c-cpp.js +8 -10
  372. package/dist/core/ingestion/type-extractors/csharp.js +18 -34
  373. package/dist/core/ingestion/type-extractors/go.js +2 -10
  374. package/dist/core/ingestion/type-extractors/jvm.js +6 -5
  375. package/dist/core/ingestion/type-extractors/php.js +1 -1
  376. package/dist/core/ingestion/type-extractors/python.js +1 -1
  377. package/dist/core/ingestion/type-extractors/ruby.js +2 -2
  378. package/dist/core/ingestion/type-extractors/rust.js +0 -16
  379. package/dist/core/ingestion/type-extractors/shared.d.ts +2 -2
  380. package/dist/core/ingestion/type-extractors/shared.js +25 -11
  381. package/dist/core/ingestion/type-extractors/swift.js +5 -5
  382. package/dist/core/ingestion/type-extractors/types.d.ts +1 -1
  383. package/dist/core/ingestion/type-extractors/typescript.js +1 -1
  384. package/dist/core/ingestion/utils/ast-helpers.d.ts +119 -1
  385. package/dist/core/ingestion/utils/ast-helpers.js +260 -13
  386. package/dist/core/ingestion/utils/callable-labels.d.ts +13 -0
  387. package/dist/core/ingestion/utils/callable-labels.js +14 -0
  388. package/dist/core/ingestion/utils/deferred-resolution-profile.d.ts +10 -0
  389. package/dist/core/ingestion/utils/deferred-resolution-profile.js +30 -0
  390. package/dist/core/ingestion/utils/heap-probe.d.ts +20 -0
  391. package/dist/core/ingestion/utils/heap-probe.js +39 -0
  392. package/dist/core/ingestion/utils/heritage-marker.d.ts +33 -0
  393. package/dist/core/ingestion/utils/heritage-marker.js +41 -0
  394. package/dist/core/ingestion/utils/qualified-name.d.ts +37 -0
  395. package/dist/core/ingestion/utils/qualified-name.js +67 -0
  396. package/dist/core/ingestion/variable-extractors/configs/c-cpp.js +49 -0
  397. package/dist/core/ingestion/variable-extractors/configs/dart.js +76 -62
  398. package/dist/core/ingestion/variable-extractors/configs/go.js +74 -7
  399. package/dist/core/ingestion/variable-extractors/configs/jvm.js +35 -8
  400. package/dist/core/ingestion/variable-extractors/generic.js +40 -12
  401. package/dist/core/ingestion/variable-types.d.ts +9 -0
  402. package/dist/core/ingestion/vue-sfc-extractor.d.ts +97 -7
  403. package/dist/core/ingestion/vue-sfc-extractor.js +433 -11
  404. package/dist/core/ingestion/workers/parse-worker.d.ts +0 -11
  405. package/dist/core/ingestion/workers/parse-worker.js +358 -187
  406. package/dist/core/ingestion/workers/worker-pool.d.ts +78 -9
  407. package/dist/core/ingestion/workers/worker-pool.js +346 -49
  408. package/dist/core/lbug/csv-generator.js +20 -2
  409. package/dist/core/lbug/lbug-adapter.js +29 -10
  410. package/dist/core/lbug/native-check.js +17 -5
  411. package/dist/core/lbug/pool-adapter.d.ts +0 -19
  412. package/dist/core/lbug/pool-adapter.js +40 -77
  413. package/dist/core/lbug/query-result-utils.d.ts +19 -0
  414. package/dist/core/lbug/query-result-utils.js +28 -0
  415. package/dist/core/run-analyze.d.ts +9 -2
  416. package/dist/core/run-analyze.js +24 -3
  417. package/dist/core/tree-sitter/parser-loader.d.ts +13 -0
  418. package/dist/core/tree-sitter/parser-loader.js +4 -0
  419. package/dist/core/tree-sitter/safe-parse.d.ts +70 -3
  420. package/dist/core/tree-sitter/safe-parse.js +214 -11
  421. package/dist/core/wiki/generator.js +13 -5
  422. package/dist/core/wiki/graph-queries.d.ts +3 -0
  423. package/dist/core/wiki/graph-queries.js +9 -1
  424. package/dist/core/wiki/llm-client.d.ts +1 -1
  425. package/dist/core/wiki/llm-client.js +7 -2
  426. package/dist/core/wiki/local-cli-client.d.ts +2 -1
  427. package/dist/core/wiki/local-cli-client.js +62 -4
  428. package/dist/mcp/compatible-stdio-transport.d.ts +3 -0
  429. package/dist/mcp/compatible-stdio-transport.js +22 -0
  430. package/dist/mcp/core/embedder.d.ts +1 -1
  431. package/dist/mcp/core/embedder.js +13 -1
  432. package/dist/mcp/local/local-backend.d.ts +37 -5
  433. package/dist/mcp/local/local-backend.js +227 -129
  434. package/dist/mcp/resources.js +3 -3
  435. package/dist/mcp/server.js +9 -1
  436. package/dist/storage/git.d.ts +11 -0
  437. package/dist/storage/git.js +30 -0
  438. package/dist/storage/parse-cache.d.ts +23 -1
  439. package/dist/storage/parse-cache.js +138 -32
  440. package/dist/storage/parsedfile-store.d.ts +142 -0
  441. package/dist/storage/parsedfile-store.js +367 -0
  442. package/dist/storage/repo-manager.d.ts +2 -1
  443. package/dist/storage/scope-index-store.d.ts +114 -0
  444. package/dist/storage/scope-index-store.js +236 -0
  445. package/dist/types/pipeline.d.ts +6 -3
  446. package/hooks/antigravity/gitnexus-antigravity-hook.cjs +2 -1
  447. package/hooks/claude/gitnexus-hook.cjs +2 -1
  448. package/hooks/claude/resolve-analyze-cmd.cjs +323 -0
  449. package/package.json +4 -5
  450. package/scripts/bench-scope-resolution.ts +1 -3
  451. package/scripts/cross-platform-tests.ts +4 -1
  452. package/skills/gitnexus-cli.md +8 -6
  453. package/skills/gitnexus-debugging.md +15 -15
  454. package/skills/gitnexus-exploring.md +11 -11
  455. package/skills/gitnexus-guide.md +1 -1
  456. package/skills/gitnexus-impact-analysis.md +10 -10
  457. package/skills/gitnexus-pr-review.md +19 -19
  458. package/skills/gitnexus-refactoring.md +25 -25
  459. package/web/assets/{agent-BRX-afm3.js → agent-EkX7webX.js} +156 -131
  460. package/web/assets/{architectureDiagram-UL44E2DR-B1oYB8-c.js → architectureDiagram-UL44E2DR-BoczH8cv.js} +1 -1
  461. package/web/assets/{chunk-LCXTWHL2-SPC6pgWI.js → chunk-LCXTWHL2-By5HB3b-.js} +1 -1
  462. package/web/assets/{chunk-RG4AUYOV-DZXr4Yv3.js → chunk-RG4AUYOV-BQE_DkpL.js} +1 -1
  463. package/web/assets/{classDiagram-KGZ6W3CR-BqpOj8L9.js → classDiagram-KGZ6W3CR-Dj_02GUH.js} +1 -1
  464. package/web/assets/{classDiagram-v2-72OJOZXJ-FmElywK2.js → classDiagram-v2-72OJOZXJ-D-NArMpf.js} +1 -1
  465. package/web/assets/{diagram-3NCE3AQN-BWtJXMDq.js → diagram-3NCE3AQN-VXtXDO95.js} +1 -1
  466. package/web/assets/{diagram-GF46GFSD-Hh-fChxU.js → diagram-GF46GFSD-B1qab2Ah.js} +1 -1
  467. package/web/assets/{diagram-QXG6HAR7-DYeQHxGU.js → diagram-QXG6HAR7-BSCHGzzT.js} +1 -1
  468. package/web/assets/{diagram-WEQXMOUZ-DYGU4T0y.js → diagram-WEQXMOUZ-DHtknmNT.js} +1 -1
  469. package/web/assets/{erDiagram-L5TCEMPS-bN3wlP2A.js → erDiagram-L5TCEMPS-Db-IYTmm.js} +1 -1
  470. package/web/assets/{flowDiagram-H6V6AXG4-YACVtF3-.js → flowDiagram-H6V6AXG4-BHDoyVoW.js} +1 -1
  471. package/web/assets/{index-BhnAdWTt.js → index-BR0IhgbR.js} +10 -10
  472. package/web/assets/{infoDiagram-3YFTVSEB-BWBzD28-.js → infoDiagram-3YFTVSEB-6h8wbWEe.js} +1 -1
  473. package/web/assets/{ishikawaDiagram-BNXS4ZKH-B8qYT-j9.js → ishikawaDiagram-BNXS4ZKH-Dx2OkPk1.js} +1 -1
  474. package/web/assets/{kanban-definition-75IXJCU3-BeoPr5Tl.js → kanban-definition-75IXJCU3-CIIEZfqV.js} +1 -1
  475. package/web/assets/{mindmap-definition-2TDM6QVE-CdLLN_so.js → mindmap-definition-2TDM6QVE-DUAqydRq.js} +1 -1
  476. package/web/assets/{pieDiagram-CU6KROY3-DEd2a_k_.js → pieDiagram-CU6KROY3-BntYuYZa.js} +1 -1
  477. package/web/assets/{requirementDiagram-JXO7QTGE-QNeTo5C_.js → requirementDiagram-JXO7QTGE-QCD6I29n.js} +1 -1
  478. package/web/assets/{sequenceDiagram-VS2MUI6T-BHC7q7yJ.js → sequenceDiagram-VS2MUI6T-DScFwLz2.js} +1 -1
  479. package/web/assets/{stateDiagram-7D4R322I-KONnc2Px.js → stateDiagram-7D4R322I-AkRAm6Hl.js} +1 -1
  480. package/web/assets/{stateDiagram-v2-36443NZ5-C2QfuMlu.js → stateDiagram-v2-36443NZ5-BCK1vigR.js} +1 -1
  481. package/web/assets/{timeline-definition-O6YCAMPW-D4t4NJx1.js → timeline-definition-O6YCAMPW-BvpIVXjX.js} +1 -1
  482. package/web/assets/{vennDiagram-MWXL3ELB-6bctC9Yg.js → vennDiagram-MWXL3ELB-BYGWk6dK.js} +1 -1
  483. package/web/assets/{wardleyDiagram-CUQ6CDDI-BPZYNTvC.js → wardleyDiagram-CUQ6CDDI-Dk1z7H2T.js} +1 -1
  484. package/web/assets/{xychartDiagram-N2JHSOCM-lBI9O6DW.js → xychartDiagram-N2JHSOCM-2N6NCSWN.js} +1 -1
  485. package/web/index.html +1 -1
  486. package/dist/_shared/scope-resolution/shadow/aggregate.d.ts +0 -63
  487. package/dist/_shared/scope-resolution/shadow/aggregate.d.ts.map +0 -1
  488. package/dist/_shared/scope-resolution/shadow/aggregate.js +0 -122
  489. package/dist/_shared/scope-resolution/shadow/aggregate.js.map +0 -1
  490. package/dist/_shared/scope-resolution/shadow/diff.d.ts +0 -59
  491. package/dist/_shared/scope-resolution/shadow/diff.d.ts.map +0 -1
  492. package/dist/_shared/scope-resolution/shadow/diff.js +0 -79
  493. package/dist/_shared/scope-resolution/shadow/diff.js.map +0 -1
  494. package/dist/core/ingestion/ast-cache.d.ts +0 -26
  495. package/dist/core/ingestion/ast-cache.js +0 -48
  496. package/dist/core/ingestion/heritage-extractors/configs/go.d.ts +0 -13
  497. package/dist/core/ingestion/heritage-extractors/configs/go.js +0 -20
  498. package/dist/core/ingestion/heritage-extractors/configs/ruby.d.ts +0 -18
  499. package/dist/core/ingestion/heritage-extractors/configs/ruby.js +0 -65
  500. package/dist/core/ingestion/heritage-extractors/generic.d.ts +0 -23
  501. package/dist/core/ingestion/heritage-extractors/generic.js +0 -47
  502. package/dist/core/ingestion/heritage-processor.d.ts +0 -54
  503. package/dist/core/ingestion/heritage-processor.js +0 -367
  504. package/dist/core/ingestion/heritage-types.d.ts +0 -73
  505. package/dist/core/ingestion/heritage-types.js +0 -2
  506. package/dist/core/ingestion/import-processor.d.ts +0 -23
  507. package/dist/core/ingestion/import-processor.js +0 -377
  508. package/dist/core/ingestion/model/heritage-map.d.ts +0 -105
  509. package/dist/core/ingestion/model/heritage-map.js +0 -294
  510. package/dist/core/ingestion/model/resolution-context.d.ts +0 -93
  511. package/dist/core/ingestion/model/resolution-context.js +0 -337
  512. package/dist/core/ingestion/named-bindings/csharp.d.ts +0 -3
  513. package/dist/core/ingestion/named-bindings/csharp.js +0 -37
  514. package/dist/core/ingestion/named-bindings/java.d.ts +0 -3
  515. package/dist/core/ingestion/named-bindings/java.js +0 -29
  516. package/dist/core/ingestion/named-bindings/kotlin.d.ts +0 -3
  517. package/dist/core/ingestion/named-bindings/kotlin.js +0 -36
  518. package/dist/core/ingestion/named-bindings/php.d.ts +0 -3
  519. package/dist/core/ingestion/named-bindings/php.js +0 -61
  520. package/dist/core/ingestion/named-bindings/python.d.ts +0 -3
  521. package/dist/core/ingestion/named-bindings/python.js +0 -49
  522. package/dist/core/ingestion/named-bindings/rust.d.ts +0 -3
  523. package/dist/core/ingestion/named-bindings/rust.js +0 -66
  524. package/dist/core/ingestion/named-bindings/types.d.ts +0 -16
  525. package/dist/core/ingestion/named-bindings/types.js +0 -6
  526. package/dist/core/ingestion/named-bindings/typescript.d.ts +0 -3
  527. package/dist/core/ingestion/named-bindings/typescript.js +0 -58
  528. package/dist/core/ingestion/pipeline-phases/cross-file-impl.d.ts +0 -17
  529. package/dist/core/ingestion/pipeline-phases/cross-file-impl.js +0 -209
  530. package/dist/core/ingestion/pipeline-phases/orm-extraction.d.ts +0 -22
  531. package/dist/core/ingestion/pipeline-phases/orm-extraction.js +0 -92
  532. package/dist/core/ingestion/pipeline-phases/wildcard-synthesis.d.ts +0 -70
  533. package/dist/core/ingestion/pipeline-phases/wildcard-synthesis.js +0 -312
  534. package/dist/core/ingestion/registry-primary-flag.d.ts +0 -89
  535. package/dist/core/ingestion/registry-primary-flag.js +0 -122
  536. package/dist/core/ingestion/shadow-harness.d.ts +0 -113
  537. package/dist/core/ingestion/shadow-harness.js +0 -148
  538. package/dist/core/ingestion/utils/ruby-self-call.d.ts +0 -52
  539. package/dist/core/ingestion/utils/ruby-self-call.js +0 -59
  540. package/scripts/ci-list-migrated-languages.ts +0 -24
  541. package/scripts/run-parity.ts +0 -128
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/agent-BRX-afm3.js","assets/chunk-CilyBKbf.js","assets/context-builder-_HS0v2ma.js","assets/dagre-ND4H6XIP-DsIr9MOv.js","assets/chunk-67TQ5CYL-CChC2cAv.js","assets/chunk-7W6UQGC5-CgFyfZ6k.js","assets/chunk-AQ6EADP3-CCFje6lL.js","assets/chunk-5IMINLNL-CnTLsXIV.js","assets/chunk-5VCL7Z4A-w1BCx98Z.js","assets/chunk-7J6CGLKN-DT-b53FT.js","assets/chunk-INKRHTLW-ELpfuk9h.js","assets/chunk-QA3QBVWF-D5Ha3GgB.js","assets/chunk-KNLZD3CH-BuZBOcso.js","assets/chunk-KGFNY3KK-W-VR57xb.js","assets/chunk-T2UQINTJ-kGYG7ppP.js","assets/chunk-UY5QBCOK-Du-c56gs.js","assets/chunk-KRXBNO2N-DH2NPM7I.js","assets/chunk-W44A43WB-lrCpuupA.js","assets/cose-bilkent-UX7MHV2Q-BHv2bbtl.js","assets/chunk-3SSMPTDK-BzGeeheI.js","assets/c4Diagram-Y2BXMSZH-DIzEXalR.js","assets/chunk-LII3EMHJ-3X33tCpU.js","assets/flowDiagram-H6V6AXG4-YACVtF3-.js","assets/chunk-6764PJDD-ChwMM2z4.js","assets/chunk-AZZRMDJM-5E9ARdDQ.js","assets/chunk-ZXARS5L4-CSZRiyOf.js","assets/erDiagram-L5TCEMPS-bN3wlP2A.js","assets/gitGraphDiagram-S2ZK5IYY-CCwVLT__.js","assets/chunk-2T2R6R2M-n6s9JZqv.js","assets/chunk-4R4BOZG6-mKhL59ul.js","assets/chunk-2UTLFMKG-CMBB1TMN.js","assets/chunk-C62D2QBJ-CDAWj26E.js","assets/chunk-CEXFNPSA-D68Tk6ls.js","assets/chunk-J5EP6P6S-DxWW0yvu.js","assets/chunk-JQRUD6KW-Dcq_Qnyy.js","assets/chunk-KGYTTC2M-C6PHeuay.js","assets/chunk-RERM46MO-DQNbXtfw.js","assets/chunk-RKZBBQEN-BmTPLSyv.js","assets/chunk-RLI5ZMPA-DExu2DOK.js","assets/chunk-T5OCTHI4--9wWpVws.js","assets/chunk-UP6H54XL-DsKdC6jC.js","assets/chunk-UXSXWOXI-DR81EqLr.js","assets/ganttDiagram-JCBTUEKG-BHQssTz6.js","assets/infoDiagram-3YFTVSEB-BWBzD28-.js","assets/pieDiagram-CU6KROY3-DEd2a_k_.js","assets/quadrantDiagram-VICAPDV7-bAm6Hi_5.js","assets/xychartDiagram-N2JHSOCM-lBI9O6DW.js","assets/requirementDiagram-JXO7QTGE-QNeTo5C_.js","assets/sequenceDiagram-VS2MUI6T-BHC7q7yJ.js","assets/classDiagram-KGZ6W3CR-BqpOj8L9.js","assets/chunk-RG4AUYOV-DZXr4Yv3.js","assets/classDiagram-v2-72OJOZXJ-FmElywK2.js","assets/stateDiagram-7D4R322I-KONnc2Px.js","assets/chunk-LCXTWHL2-SPC6pgWI.js","assets/stateDiagram-v2-36443NZ5-C2QfuMlu.js","assets/journeyDiagram-M6C3CM3L-DNPYCpvq.js","assets/timeline-definition-O6YCAMPW-D4t4NJx1.js","assets/mindmap-definition-2TDM6QVE-CdLLN_so.js","assets/kanban-definition-75IXJCU3-BeoPr5Tl.js","assets/sankeyDiagram-URQDO5SZ-LFJz53u5.js","assets/diagram-QXG6HAR7-DYeQHxGU.js","assets/diagram-3NCE3AQN-BWtJXMDq.js","assets/blockDiagram-7IZFK4PR-B4niSLvR.js","assets/diagram-WEQXMOUZ-DYGU4T0y.js","assets/architectureDiagram-UL44E2DR-B1oYB8-c.js","assets/diagram-HNR7UZ2L-fUWreZzx.js","assets/ishikawaDiagram-BNXS4ZKH-B8qYT-j9.js","assets/vennDiagram-MWXL3ELB-6bctC9Yg.js","assets/diagram-GF46GFSD-Hh-fChxU.js","assets/wardleyDiagram-CUQ6CDDI-BPZYNTvC.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/agent-EkX7webX.js","assets/chunk-CilyBKbf.js","assets/context-builder-_HS0v2ma.js","assets/dagre-ND4H6XIP-DsIr9MOv.js","assets/chunk-67TQ5CYL-CChC2cAv.js","assets/chunk-7W6UQGC5-CgFyfZ6k.js","assets/chunk-AQ6EADP3-CCFje6lL.js","assets/chunk-5IMINLNL-CnTLsXIV.js","assets/chunk-5VCL7Z4A-w1BCx98Z.js","assets/chunk-7J6CGLKN-DT-b53FT.js","assets/chunk-INKRHTLW-ELpfuk9h.js","assets/chunk-QA3QBVWF-D5Ha3GgB.js","assets/chunk-KNLZD3CH-BuZBOcso.js","assets/chunk-KGFNY3KK-W-VR57xb.js","assets/chunk-T2UQINTJ-kGYG7ppP.js","assets/chunk-UY5QBCOK-Du-c56gs.js","assets/chunk-KRXBNO2N-DH2NPM7I.js","assets/chunk-W44A43WB-lrCpuupA.js","assets/cose-bilkent-UX7MHV2Q-BHv2bbtl.js","assets/chunk-3SSMPTDK-BzGeeheI.js","assets/c4Diagram-Y2BXMSZH-DIzEXalR.js","assets/chunk-LII3EMHJ-3X33tCpU.js","assets/flowDiagram-H6V6AXG4-BHDoyVoW.js","assets/chunk-6764PJDD-ChwMM2z4.js","assets/chunk-AZZRMDJM-5E9ARdDQ.js","assets/chunk-ZXARS5L4-CSZRiyOf.js","assets/erDiagram-L5TCEMPS-Db-IYTmm.js","assets/gitGraphDiagram-S2ZK5IYY-CCwVLT__.js","assets/chunk-2T2R6R2M-n6s9JZqv.js","assets/chunk-4R4BOZG6-mKhL59ul.js","assets/chunk-2UTLFMKG-CMBB1TMN.js","assets/chunk-C62D2QBJ-CDAWj26E.js","assets/chunk-CEXFNPSA-D68Tk6ls.js","assets/chunk-J5EP6P6S-DxWW0yvu.js","assets/chunk-JQRUD6KW-Dcq_Qnyy.js","assets/chunk-KGYTTC2M-C6PHeuay.js","assets/chunk-RERM46MO-DQNbXtfw.js","assets/chunk-RKZBBQEN-BmTPLSyv.js","assets/chunk-RLI5ZMPA-DExu2DOK.js","assets/chunk-T5OCTHI4--9wWpVws.js","assets/chunk-UP6H54XL-DsKdC6jC.js","assets/chunk-UXSXWOXI-DR81EqLr.js","assets/ganttDiagram-JCBTUEKG-BHQssTz6.js","assets/infoDiagram-3YFTVSEB-6h8wbWEe.js","assets/pieDiagram-CU6KROY3-BntYuYZa.js","assets/quadrantDiagram-VICAPDV7-bAm6Hi_5.js","assets/xychartDiagram-N2JHSOCM-2N6NCSWN.js","assets/requirementDiagram-JXO7QTGE-QCD6I29n.js","assets/sequenceDiagram-VS2MUI6T-DScFwLz2.js","assets/classDiagram-KGZ6W3CR-Dj_02GUH.js","assets/chunk-RG4AUYOV-BQE_DkpL.js","assets/classDiagram-v2-72OJOZXJ-D-NArMpf.js","assets/stateDiagram-7D4R322I-AkRAm6Hl.js","assets/chunk-LCXTWHL2-By5HB3b-.js","assets/stateDiagram-v2-36443NZ5-BCK1vigR.js","assets/journeyDiagram-M6C3CM3L-DNPYCpvq.js","assets/timeline-definition-O6YCAMPW-BvpIVXjX.js","assets/mindmap-definition-2TDM6QVE-DUAqydRq.js","assets/kanban-definition-75IXJCU3-CIIEZfqV.js","assets/sankeyDiagram-URQDO5SZ-LFJz53u5.js","assets/diagram-QXG6HAR7-BSCHGzzT.js","assets/diagram-3NCE3AQN-VXtXDO95.js","assets/blockDiagram-7IZFK4PR-B4niSLvR.js","assets/diagram-WEQXMOUZ-DHtknmNT.js","assets/architectureDiagram-UL44E2DR-BoczH8cv.js","assets/diagram-HNR7UZ2L-fUWreZzx.js","assets/ishikawaDiagram-BNXS4ZKH-Dx2OkPk1.js","assets/vennDiagram-MWXL3ELB-BYGWk6dK.js","assets/diagram-GF46GFSD-B1qab2Ah.js","assets/wardleyDiagram-CUQ6CDDI-Dk1z7H2T.js"])))=>i.map(i=>d[i]);
2
2
  import{n as e,r as t,t as n}from"./chunk-CilyBKbf.js";import{$ as r,B as i,D as a,I as o,P as s,U as c,V as l,W as u,Z as d,_ as f,a as p,b as m,c as h,d as g,h as _,it as v,l as y,m as b,n as x,nt as S,o as C,ot as w,p as T,r as E,rt as D,v as O,w as k,x as ee,z as A}from"./chunk-67TQ5CYL-CChC2cAv.js";import{t as j}from"./chunk-AQ6EADP3-CCFje6lL.js";import{M,V as N,q as P}from"./chunk-7W6UQGC5-CgFyfZ6k.js";import"./chunk-5IMINLNL-CnTLsXIV.js";import"./chunk-T2UQINTJ-kGYG7ppP.js";import"./chunk-KNLZD3CH-BuZBOcso.js";import{a as te,c as ne,h as F,o as I,r as L,t as re,u as ie,v as ae}from"./chunk-QA3QBVWF-D5Ha3GgB.js";import"./chunk-UY5QBCOK-Du-c56gs.js";import{i as oe,t as R}from"./chunk-INKRHTLW-ELpfuk9h.js";import{a as z,o as B,t as se}from"./chunk-KGFNY3KK-W-VR57xb.js";import"./chunk-5VCL7Z4A-w1BCx98Z.js";import{i as V,n as H,r as U,t as ce}from"./chunk-7J6CGLKN-DT-b53FT.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var le=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ee=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ee,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ee,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=M(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=M(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return M(j(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function N(e,t,n){if(e==null)return e;var r=[],i=0;return M(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function P(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var te=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ne={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ne,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:P}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,te)}catch(e){te(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.6`})),ue=n(((e,t)=>{t.exports=le()})),de=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),fe=n(((e,t)=>{t.exports=de()})),pe=n((e=>{var t=ue();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.6`})),me=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=pe()})),he=n((e=>{var t=fe(),n=ue(),r=me();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function k(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var ee=Symbol.for(`react.client.reference`);function A(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ee?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?A(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return A(e(t))}catch{}}return null}var j=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},te=[],ne=-1;function F(e){return{current:e}}function I(e){0>ne||(e.current=te[ne],te[ne]=null,ne--)}function L(e,t){ne++,te[ne]=e.current,e.current=t}var re=F(null),ie=F(null),ae=F(null),oe=F(null);function R(e,t){switch(L(ae,t),L(ie,e),L(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ud(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ud(t),e=Wd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}I(re),L(re,e)}function z(){I(re),I(ie),I(ae)}function B(e){e.memoizedState!==null&&L(oe,e);var t=re.current,n=Wd(t,e.type);t!==n&&(L(ie,e),L(re,n))}function se(e){ie.current===e&&(I(re),I(ie)),oe.current===e&&(I(oe),ep._currentValue=P)}var V,H;function U(e){if(V===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);V=t&&t[1]||``,H=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+V+e+H}var ce=!1;function le(e,t){if(!e||ce)return``;ce=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
@@ -7,11 +7,11 @@ import{n as e,r as t,t as n}from"./chunk-CilyBKbf.js";import{$ as r,B as i,D as
7
7
  `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ce=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?U(n):``}function de(e,t){switch(e.tag){case 26:case 27:case 5:return U(e.type);case 16:return U(`Lazy`);case 13:return e.child!==t&&t!==null?U(`Suspense Fallback`):U(`Suspense`);case 19:return U(`SuspenseList`);case 0:case 15:return le(e.type,!1);case 11:return le(e.type.render,!1);case 1:return le(e.type,!0);case 31:return U(`Activity`);default:return``}}function pe(e){try{var t=``,n=null;do t+=de(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
8
  Error generating stack: `+e.message+`
9
9
  `+e.stack}}var he=Object.prototype.hasOwnProperty,ge=t.unstable_scheduleCallback,W=t.unstable_cancelCallback,_e=t.unstable_shouldYield,ve=t.unstable_requestPaint,ye=t.unstable_now,be=t.unstable_getCurrentPriorityLevel,xe=t.unstable_ImmediatePriority,Se=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,we=t.unstable_LowPriority,Te=t.unstable_IdlePriority,Ee=t.log,De=t.unstable_setDisableYieldValue,Oe=null,ke=null;function Ae(e){if(typeof Ee==`function`&&De(e),ke&&typeof ke.setStrictMode==`function`)try{ke.setStrictMode(Oe,e)}catch{}}var je=Math.clz32?Math.clz32:Pe,Me=Math.log,Ne=Math.LN2;function Pe(e){return e>>>=0,e===0?32:31-(Me(e)/Ne|0)|0}var Fe=256,Ie=262144,Le=4194304;function Re(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ze(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Re(n))):i=Re(o):i=Re(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Re(n))):i=Re(o)):i=Re(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Be(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ve(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function He(){var e=Le;return Le<<=1,!(Le&62914560)&&(Le=4194304),e}function Ue(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function We(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ge(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-je(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ke(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ke(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-je(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function qe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-je(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Je(e,t){var n=t&-t;return n=n&42?1:Ye(n),(n&(e.suspendedLanes|t))===0?n:0}function Ye(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Xe(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ze(){var e=N.p;return e===0?(e=window.event,e===void 0?32:gp(e.type)):e}function Qe(e,t){var n=N.p;try{return N.p=e,t()}finally{N.p=n}}var $e=Math.random().toString(36).slice(2),et=`__reactFiber$`+$e,tt=`__reactProps$`+$e,nt=`__reactContainer$`+$e,rt=`__reactEvents$`+$e,it=`__reactListeners$`+$e,at=`__reactHandles$`+$e,ot=`__reactResources$`+$e,st=`__reactMarker$`+$e;function ct(e){delete e[et],delete e[tt],delete e[rt],delete e[it],delete e[at]}function lt(e){var t=e[et];if(t)return t;for(var n=e.parentNode;n;){if(t=n[nt]||n[et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pf(e);e!==null;){if(n=e[et])return n;e=pf(e)}return t}e=n,n=e.parentNode}return null}function ut(e){if(e=e[et]||e[nt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function dt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ft(e){var t=e[ot];return t||=e[ot]={hoistableStyles:new Map,hoistableScripts:new Map},t}function pt(e){e[st]=!0}var mt=new Set,ht={};function gt(e,t){_t(e,t),_t(e+`Capture`,t)}function _t(e,t){for(ht[e]=t,e=0;e<t.length;e++)mt.add(t[e])}var vt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),yt={},bt={};function xt(e){return he.call(bt,e)?!0:he.call(yt,e)?!1:vt.test(e)?bt[e]=!0:(yt[e]=!0,!1)}function St(e,t,n){if(xt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ct(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function wt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Tt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Et(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Dt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ot(e){if(!e._valueTracker){var t=Et(e)?`checked`:`value`;e._valueTracker=Dt(e,t,``+e[t])}}function kt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Et(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function At(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var jt=/[\n"\\]/g;function Mt(e){return e.replace(jt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Nt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Tt(t)):e.value!==``+Tt(t)&&(e.value=``+Tt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ft(e,o,Tt(n)):Ft(e,o,Tt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Tt(s):e.removeAttribute(`name`)}function Pt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ot(e);return}n=n==null?``:``+Tt(n),t=t==null?n:``+Tt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ot(e)}function Ft(e,t,n){t===`number`&&At(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function It(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Tt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Lt(e,t,n){if(t!=null&&(t=``+Tt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Tt(n)}function Rt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(j(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Tt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ot(e)}function zt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Bt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Vt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Bt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Ht(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Vt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Vt(e,o,t[o])}function Ut(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Wt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Gt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Kt(e){return Gt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function qt(){}var Jt=null;function Yt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xt=null,Zt=null;function Qt(e){var t=ut(e);if(t&&(e=t.stateNode)){var n=e[tt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Nt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Mt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[tt]||null;if(!a)throw Error(i(90));Nt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&kt(r)}break a;case`textarea`:Lt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&It(e,!!n.multiple,t,!1)}}}var $t=!1;function en(e,t,n){if($t)return e(t,n);$t=!0;try{return e(t)}finally{if($t=!1,(Xt!==null||Zt!==null)&&(yu(),Xt&&(t=Xt,e=Zt,Zt=Xt=null,Qt(t),e)))for(t=0;t<e.length;t++)Qt(e[t])}}function tn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[tt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var nn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),rn=!1;if(nn)try{var an={};Object.defineProperty(an,`passive`,{get:function(){rn=!0}}),window.addEventListener(`test`,an,an),window.removeEventListener(`test`,an,an)}catch{rn=!1}var on=null,sn=null,cn=null;function ln(){if(cn)return cn;var e,t=sn,n=t.length,r,i=`value`in on?on.value:on.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return cn=i.slice(e,1<r?1-r:void 0)}function un(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function dn(){return!0}function fn(){return!1}function pn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?dn:fn,this.isPropagationStopped=fn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=dn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=dn)},persist:function(){},isPersistent:dn}),t}var mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hn=pn(mn),gn=f({},mn,{view:0,detail:0}),_n=pn(gn),vn,yn,bn,xn=f({},gn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==bn&&(bn&&e.type===`mousemove`?(vn=e.screenX-bn.screenX,yn=e.screenY-bn.screenY):yn=vn=0,bn=e),vn)},movementY:function(e){return`movementY`in e?e.movementY:yn}}),Sn=pn(xn),Cn=pn(f({},xn,{dataTransfer:0})),wn=pn(f({},gn,{relatedTarget:0})),Tn=pn(f({},mn,{animationName:0,elapsedTime:0,pseudoElement:0})),En=pn(f({},mn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Dn=pn(f({},mn,{data:0})),On={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},kn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},An={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function jn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=An[e])?!!t[e]:!1}function Mn(){return jn}var Nn=pn(f({},gn,{key:function(e){if(e.key){var t=On[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=un(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?kn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mn,charCode:function(e){return e.type===`keypress`?un(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?un(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Pn=pn(f({},xn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Fn=pn(f({},gn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mn})),In=pn(f({},mn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ln=pn(f({},xn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Rn=pn(f({},mn,{newState:0,oldState:0})),zn=[9,13,27,32],Bn=nn&&`CompositionEvent`in window,Vn=null;nn&&`documentMode`in document&&(Vn=document.documentMode);var Hn=nn&&`TextEvent`in window&&!Vn,Un=nn&&(!Bn||Vn&&8<Vn&&11>=Vn),Wn=` `,Gn=!1;function Kn(e,t){switch(e){case`keyup`:return zn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function qn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Jn=!1;function Yn(e,t){switch(e){case`compositionend`:return qn(t);case`keypress`:return t.which===32?(Gn=!0,Wn):null;case`textInput`:return e=t.data,e===Wn&&Gn?null:e;default:return null}}function Xn(e,t){if(Jn)return e===`compositionend`||!Bn&&Kn(e,t)?(e=ln(),cn=sn=on=null,Jn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Un&&t.locale!==`ko`?null:t.data;default:return null}}var Zn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Qn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Zn[e.type]:t===`textarea`}function $n(e,t,n,r){Xt?Zt?Zt.push(r):Zt=[r]:Xt=r,t=Dd(t,`onChange`),0<t.length&&(n=new hn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var er=null,tr=null;function nr(e){yd(e,0)}function rr(e){if(kt(dt(e)))return e}function ir(e,t){if(e===`change`)return t}var ar=!1;if(nn){var or;if(nn){var sr=`oninput`in document;if(!sr){var cr=document.createElement(`div`);cr.setAttribute(`oninput`,`return;`),sr=typeof cr.oninput==`function`}or=sr}else or=!1;ar=or&&(!document.documentMode||9<document.documentMode)}function lr(){er&&(er.detachEvent(`onpropertychange`,ur),tr=er=null)}function ur(e){if(e.propertyName===`value`&&rr(tr)){var t=[];$n(t,tr,e,Yt(e)),en(nr,t)}}function dr(e,t,n){e===`focusin`?(lr(),er=t,tr=n,er.attachEvent(`onpropertychange`,ur)):e===`focusout`&&lr()}function fr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return rr(tr)}function pr(e,t){if(e===`click`)return rr(t)}function mr(e,t){if(e===`input`||e===`change`)return rr(t)}function hr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var gr=typeof Object.is==`function`?Object.is:hr;function _r(e,t){if(gr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!he.call(t,i)||!gr(e[i],t[i]))return!1}return!0}function vr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yr(e,t){var n=vr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=vr(n)}}function br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?br(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=At(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=At(e.document)}return t}function Sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Cr=nn&&`documentMode`in document&&11>=document.documentMode,wr=null,Tr=null,Er=null,Dr=!1;function Or(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dr||wr==null||wr!==At(r)||(r=wr,`selectionStart`in r&&Sr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Er&&_r(Er,r)||(Er=r,r=Dd(Tr,`onSelect`),0<r.length&&(t=new hn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=wr)))}function kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ar={animationend:kr(`Animation`,`AnimationEnd`),animationiteration:kr(`Animation`,`AnimationIteration`),animationstart:kr(`Animation`,`AnimationStart`),transitionrun:kr(`Transition`,`TransitionRun`),transitionstart:kr(`Transition`,`TransitionStart`),transitioncancel:kr(`Transition`,`TransitionCancel`),transitionend:kr(`Transition`,`TransitionEnd`)},jr={},Mr={};nn&&(Mr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ar.animationend.animation,delete Ar.animationiteration.animation,delete Ar.animationstart.animation),`TransitionEvent`in window||delete Ar.transitionend.transition);function Nr(e){if(jr[e])return jr[e];if(!Ar[e])return e;var t=Ar[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Mr)return jr[e]=t[n];return e}var Pr=Nr(`animationend`),Fr=Nr(`animationiteration`),Ir=Nr(`animationstart`),Lr=Nr(`transitionrun`),Rr=Nr(`transitionstart`),zr=Nr(`transitioncancel`),Br=Nr(`transitionend`),Vr=new Map,Hr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Hr.push(`scrollEnd`);function Ur(e,t){Vr.set(e,t),gt(t,[e])}var Wr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Gr=[],Kr=0,qr=0;function Jr(){for(var e=Kr,t=qr=Kr=0;t<e;){var n=Gr[t];Gr[t++]=null;var r=Gr[t];Gr[t++]=null;var i=Gr[t];Gr[t++]=null;var a=Gr[t];if(Gr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Qr(n,i,a)}}function Yr(e,t,n,r){Gr[Kr++]=e,Gr[Kr++]=t,Gr[Kr++]=n,Gr[Kr++]=r,qr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Xr(e,t,n,r){return Yr(e,t,n,r),$r(e)}function Zr(e,t){return Yr(e,null,null,t),$r(e)}function Qr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-je(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function $r(e){if(50<uu)throw uu=0,du=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ei={};function ti(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ni(e,t,n,r){return new ti(e,t,n,r)}function ri(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ii(e,t){var n=e.alternate;return n===null?(n=ni(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ai(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function oi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ri(e)&&(s=1);else if(typeof e==`string`)s=Gf(e,n,re.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ni(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return G(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ni(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ni(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ni(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ni(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function G(e,t,n,r){return e=ni(7,e,r,t),e.lanes=n,e}function si(e,t,n){return e=ni(6,e,null,t),e.lanes=n,e}function ci(e){var t=ni(18,null,null,0);return t.stateNode=e,t}function li(e,t,n){return t=ni(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ui=new WeakMap;function di(e,t){if(typeof e==`object`&&e){var n=ui.get(e);return n===void 0?(t={value:e,source:t,stack:pe(t)},ui.set(e,t),t):n}return{value:e,source:t,stack:pe(t)}}var fi=[],pi=0,mi=null,hi=0,gi=[],_i=0,vi=null,yi=1,bi=``;function xi(e,t){fi[pi++]=hi,fi[pi++]=mi,mi=e,hi=t}function Si(e,t,n){gi[_i++]=yi,gi[_i++]=bi,gi[_i++]=vi,vi=e;var r=yi;e=bi;var i=32-je(r)-1;r&=~(1<<i),n+=1;var a=32-je(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,yi=1<<32-je(t)+i|n<<i|r,bi=a+e}else yi=1<<a|n<<i|r,bi=e}function Ci(e){e.return!==null&&(xi(e,1),Si(e,1,0))}function wi(e){for(;e===mi;)mi=fi[--pi],fi[pi]=null,hi=fi[--pi],fi[pi]=null;for(;e===vi;)vi=gi[--_i],gi[_i]=null,bi=gi[--_i],gi[_i]=null,yi=gi[--_i],gi[_i]=null}function K(e,t){gi[_i++]=yi,gi[_i++]=bi,gi[_i++]=vi,yi=t.id,bi=t.overflow,vi=e}var Ti=null,Ei=null,Di=!1,Oi=null,ki=!1,Ai=Error(i(519));function ji(e){throw Li(di(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ai}function Mi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[et]=e,t[tt]=r,n){case`dialog`:bd(`cancel`,t),bd(`close`,t);break;case`iframe`:case`object`:case`embed`:bd(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)bd(_d[n],t);break;case`source`:bd(`error`,t);break;case`img`:case`image`:case`link`:bd(`error`,t),bd(`load`,t);break;case`details`:bd(`toggle`,t);break;case`input`:bd(`invalid`,t),Pt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:bd(`invalid`,t);break;case`textarea`:bd(`invalid`,t),Rt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Nd(t.textContent,n)?(r.popover!=null&&(bd(`beforetoggle`,t),bd(`toggle`,t)),r.onScroll!=null&&bd(`scroll`,t),r.onScrollEnd!=null&&bd(`scrollend`,t),r.onClick!=null&&(t.onclick=qt),t=!0):t=!1,t||ji(e,!0)}function Ni(e){for(Ti=e.return;Ti;)switch(Ti.tag){case 5:case 31:case 13:ki=!1;return;case 27:case 3:ki=!0;return;default:Ti=Ti.return}}function Pi(e){if(e!==Ti)return!1;if(!Di)return Ni(e),Di=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Gd(e.type,e.memoizedProps)),n=!n),n&&Ei&&ji(e),Ni(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ei=ff(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ei=ff(e)}else t===27?(t=Ei,$d(e.type)?(e=df,df=null,Ei=e):Ei=t):Ei=Ti?uf(e.stateNode.nextSibling):null;return!0}function Fi(){Ei=Ti=null,Di=!1}function Ii(){var e=Oi;return e!==null&&(Xl===null?Xl=e:Xl.push.apply(Xl,e),Oi=null),e}function Li(e){Oi===null?Oi=[e]:Oi.push(e)}var Ri=F(null),zi=null,Bi=null;function Vi(e,t,n){L(Ri,t._currentValue),t._currentValue=n}function Hi(e){e._currentValue=Ri.current,I(Ri)}function Ui(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Wi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ui(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ui(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Gi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;gr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ep]:e.push(ep))}a=a.return}e!==null&&Wi(t,e,n,r),t.flags|=262144}function Ki(e){for(e=e.firstContext;e!==null;){if(!gr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qi(e){zi=e,Bi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ji(e){return Xi(zi,e)}function Yi(e,t){return zi===null&&qi(e),Xi(e,t)}function Xi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Bi===null){if(e===null)throw Error(i(308));Bi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Bi=Bi.next=t;return n}var Zi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Qi=t.unstable_scheduleCallback,$i=t.unstable_NormalPriority,ea={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ta(){return{controller:new Zi,data:new Map,refCount:0}}function na(e){e.refCount--,e.refCount===0&&Qi($i,function(){e.controller.abort()})}var ra=null,ia=0,aa=0,oa=null;function sa(e,t){if(ra===null){var n=ra=[];ia=0,aa=dd(),oa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ia++,t.then(ca,ca),t}function ca(){if(--ia===0&&ra!==null){oa!==null&&(oa.status=`fulfilled`);var e=ra;ra=null,aa=0,oa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function la(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ua=M.S;M.S=function(e,t){$l=ye(),typeof t==`object`&&t&&typeof t.then==`function`&&sa(e,t),ua!==null&&ua(e,t)};var da=F(null);function fa(){var e=da.current;return e===null?Pl.pooledCache:e}function pa(e,t){t===null?L(da,da.current):L(da,t.pool)}function ma(){var e=fa();return e===null?null:{parent:ea._currentValue,pool:e}}var ha=Error(i(460)),ga=Error(i(474)),_a=Error(i(542)),va={then:function(){}};function ya(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ba(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(qt,qt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,wa(e),e;default:if(typeof t.status==`string`)t.then(qt,qt);else{if(e=Pl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,wa(e),e}throw Sa=t,ha}}function xa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Sa=e,ha):e}}var Sa=null;function Ca(){if(Sa===null)throw Error(i(459));var e=Sa;return Sa=null,e}function wa(e){if(e===ha||e===_a)throw Error(i(483))}var Ta=null,Ea=0;function Da(e){var t=Ea;return Ea+=1,Ta===null&&(Ta=[]),ba(Ta,e,t)}function Oa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ka(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Aa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ii(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=si(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&xa(i)===t.type)?(t=a(t,n.props),Oa(t,n),t.return=e,t):(t=oi(n.type,n.key,n.props,null,e.mode,r),Oa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=li(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=G(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=si(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=oi(t.type,t.key,t.props,null,e.mode,n),Oa(n,t),n.return=e,n;case h:return t=li(t,e.mode,n),t.return=e,t;case T:return t=xa(t),f(e,t,n)}if(j(t)||k(t))return t=G(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Da(t),n);if(t.$$typeof===b)return f(e,Yi(e,t),n);ka(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=xa(n),p(e,t,n,r)}if(j(n)||k(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Da(n),r);if(n.$$typeof===b)return p(e,t,Yi(e,n),r);ka(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=xa(r),_(e,t,n,r,i)}if(j(r)||k(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Da(r),i);if(r.$$typeof===b)return _(e,t,n,Yi(t,r),i);ka(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Di&&xi(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return Di&&xi(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),Di&&xi(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Di&&xi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Di&&xi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Di&&xi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&xa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Oa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=G(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=oi(o.type,o.key,o.props,null,e.mode,c),Oa(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=li(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=xa(o),x(e,r,o,c)}if(j(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Da(o),c);if(o.$$typeof===b)return x(e,r,Yi(e,o),c);ka(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=si(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ea=0;var i=x(e,t,n,r);return Ta=null,i}catch(t){if(t===ha||t===_a)throw t;var a=ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ja=Aa(!0),Ma=Aa(!1),Na=!1;function Pa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ia(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function La(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Nl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=$r(e),Qr(e,null,n),t}return Yr(e,r,t,n),$r(e)}function Ra(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}function za(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ba=!1;function Va(){if(Ba){var e=oa;if(e!==null)throw e}}function Ha(e,t,n,r){Ba=!1;var i=e.updateQueue;Na=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Il&p)===p:(r&p)===p){p!==0&&p===aa&&(Ba=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Na=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Wl|=o,e.lanes=o,e.memoizedState=d}}function Ua(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Wa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ua(n[e],t)}var Ga=F(null),Ka=F(0);function qa(e,t){e=Hl,L(Ka,e),L(Ga,t),Hl=e|t.baseLanes}function Ja(){L(Ka,Hl),L(Ga,Ga.current)}function Ya(){Hl=Ka.current,I(Ga),I(Ka)}var Xa=F(null),Za=null;function Qa(e){var t=e.alternate;L(ro,ro.current&1),L(Xa,e),Za===null&&(t===null||Ga.current!==null||t.memoizedState!==null)&&(Za=e)}function $a(e){L(ro,ro.current),L(Xa,e),Za===null&&(Za=e)}function eo(e){e.tag===22?(L(ro,ro.current),L(Xa,e),Za===null&&(Za=e)):to(e)}function to(){L(ro,ro.current),L(Xa,Xa.current)}function no(e){I(Xa),Za===e&&(Za=null),I(ro)}var ro=F(0);function io(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||sf(n)||cf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ao=0,oo=null,so=null,co=null,lo=!1,uo=!1,fo=!1,po=0,mo=0,ho=null,go=0;function _o(){throw Error(i(321))}function vo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gr(e[n],t[n]))return!1;return!0}function yo(e,t,n,r,i,a){return ao=a,oo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Ps:Fs,fo=!1,a=n(r,i),fo=!1,uo&&(a=xo(t,n,r,i)),bo(e),a}function bo(e){M.H=Ns;var t=so!==null&&so.next!==null;if(ao=0,co=so=oo=null,lo=!1,mo=0,ho=null,t)throw Error(i(300));e===null||Qs||(e=e.dependencies,e!==null&&Ki(e)&&(Qs=!0))}function xo(e,t,n,r){oo=e;var a=0;do{if(uo&&(ho=null),mo=0,uo=!1,25<=a)throw Error(i(301));if(a+=1,co=so=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=Is,o=t(n,r)}while(uo);return o}function So(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?ko(t):t,e=e.useState()[0],(so===null?null:so.memoizedState)!==e&&(oo.flags|=1024),t}function Co(){var e=po!==0;return po=0,e}function wo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function To(e){if(lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}lo=!1}ao=0,co=so=oo=null,uo=!1,mo=po=0,ho=null}function Eo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return co===null?oo.memoizedState=co=e:co=co.next=e,co}function Do(){if(so===null){var e=oo.alternate;e=e===null?null:e.memoizedState}else e=so.next;var t=co===null?oo.memoizedState:co.next;if(t!==null)co=t,so=e;else{if(e===null)throw oo.alternate===null?Error(i(467)):Error(i(310));so=e,e={memoizedState:so.memoizedState,baseState:so.baseState,baseQueue:so.baseQueue,queue:so.queue,next:null},co===null?oo.memoizedState=co=e:co=co.next=e}return co}function Oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ko(e){var t=mo;return mo+=1,ho===null&&(ho=[]),e=ba(ho,e,t),t=oo,(co===null?t.memoizedState:co.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Ps:Fs),e}function Ao(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ko(e);if(e.$$typeof===b)return Ji(e)}throw Error(i(438,String(e)))}function jo(e){var t=null,n=oo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=oo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Oo(),oo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function Mo(e,t){return typeof t==`function`?t(e):t}function No(e){return Po(Do(),so,e)}function Po(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(ao&f)===f:(Il&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===aa&&(d=!0);else if((ao&p)===p){u=u.next,p===aa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,oo.lanes|=p,Wl|=p;f=u.action,fo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,oo.lanes|=f,Wl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!gr(o,e.memoizedState)&&(Qs=!0,d&&(n=oa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Fo(e){var t=Do(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);gr(o,t.memoizedState)||(Qs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Io(e,t,n){var r=oo,a=Do(),o=Di;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!gr((so||a).memoizedState,n);if(s&&(a.memoizedState=n,Qs=!0),a=a.queue,as(zo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||co!==null&&co.memoizedState.tag&1){if(r.flags|=2048,es(9,{destroy:void 0},Ro.bind(null,r,a,n,t),null),Pl===null)throw Error(i(349));o||ao&127||Lo(r,t,n)}return n}function Lo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=oo.updateQueue,t===null?(t=Oo(),oo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ro(e,t,n,r){t.value=n,t.getSnapshot=r,Bo(t)&&Vo(e)}function zo(e,t,n){return n(function(){Bo(t)&&Vo(e)})}function Bo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gr(e,n)}catch{return!0}}function Vo(e){var t=Zr(e,2);t!==null&&mu(t,e,2)}function Ho(e){var t=Eo();if(typeof e==`function`){var n=e;if(e=n(),fo){Ae(!0);try{n()}finally{Ae(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:e},t}function Uo(e,t,n,r){return e.baseState=n,Po(e,so,typeof r==`function`?r:Mo)}function Wo(e,t,n,r,a){if(As(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Go(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Go(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),Ko(e,t,s)}catch(n){Jo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),Ko(e,t,a)}catch(n){Jo(e,t,n)}}function Ko(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){qo(e,t,n)},function(n){return Jo(e,t,n)}):qo(e,t,n)}function qo(e,t,n){t.status=`fulfilled`,t.value=n,Yo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Go(e,n)))}function Jo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Yo(t),t=t.next;while(t!==r)}e.action=null}function Yo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Xo(e,t){return t}function Zo(e,t){if(Di){var n=Pl.formState;if(n!==null){a:{var r=oo;if(Di){if(Ei){b:{for(var i=Ei,a=ki;i.nodeType!==8;){if(!a){i=null;break b}if(i=uf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ei=uf(i.nextSibling),r=i.data===`F!`;break a}}ji(r)}r=!1}r&&(t=n[0])}}return n=Eo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xo,lastRenderedState:t},n.queue=r,n=Ds.bind(null,oo,r),r.dispatch=n,r=Ho(!1),a=ks.bind(null,oo,!1,r.queue),r=Eo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Wo.bind(null,oo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Qo(e){return q(Do(),so,e)}function q(e,t,n){if(t=Po(e,t,Xo)[0],e=No(Mo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ko(t)}catch(e){throw e===ha?_a:e}else r=t;t=Do();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(oo.flags|=2048,es(9,{destroy:void 0},$o.bind(null,i,n),null)),[r,a,e]}function $o(e,t){e.action=t}function J(e){var t=Do(),n=so;if(n!==null)return q(t,n,e);Do(),t=t.memoizedState,n=Do();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function es(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=oo.updateQueue,t===null&&(t=Oo(),oo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ts(){return Do().memoizedState}function ns(e,t,n,r){var i=Eo();oo.flags|=e,i.memoizedState=es(1|t,{destroy:void 0},n,r===void 0?null:r)}function rs(e,t,n,r){var i=Do();r=r===void 0?null:r;var a=i.memoizedState.inst;so!==null&&r!==null&&vo(r,so.memoizedState.deps)?i.memoizedState=es(t,a,n,r):(oo.flags|=e,i.memoizedState=es(1|t,a,n,r))}function is(e,t){ns(8390656,8,e,t)}function as(e,t){rs(2048,8,e,t)}function os(e){oo.flags|=4;var t=oo.updateQueue;if(t===null)t=Oo(),oo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ss(e){var t=Do().memoizedState;return os({ref:t,nextImpl:e}),function(){if(Nl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function cs(e,t){return rs(4,2,e,t)}function ls(e,t){return rs(4,4,e,t)}function us(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ds(e,t,n){n=n==null?null:n.concat([e]),rs(4,4,us.bind(null,t,e),n)}function fs(){}function ps(e,t){var n=Do();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&vo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ms(e,t){var n=Do();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&vo(t,r[1]))return r[0];if(r=e(),fo){Ae(!0);try{e()}finally{Ae(!1)}}return n.memoizedState=[r,t],r}function hs(e,t,n){return n===void 0||ao&1073741824&&!(Il&261930)?e.memoizedState=t:(e.memoizedState=n,e=pu(),oo.lanes|=e,Wl|=e,n)}function gs(e,t,n,r){return gr(n,t)?n:Ga.current===null?!(ao&42)||ao&1073741824&&!(Il&261930)?(Qs=!0,e.memoizedState=n):(e=pu(),oo.lanes|=e,Wl|=e,t):(e=hs(e,n,r),gr(e,t)||(Qs=!0),e)}function _s(e,t,n,r,i){var a=N.p;N.p=a!==0&&8>a?a:8;var o=M.T,s={};M.T=s,ks(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Os(e,t,la(c,r),fu(e)):Os(e,t,r,fu(e))}catch(n){Os(e,t,{then:function(){},status:`rejected`,reason:n},fu())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function vs(){}function ys(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=bs(e).queue;_s(e,a,t,P,n===null?vs:function(){return xs(e),n(r)})}function bs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:P},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xs(e){var t=bs(e);t.next===null&&(t=e.alternate.memoizedState),Os(e,t.next.queue,{},fu())}function Ss(){return Ji(ep)}function Cs(){return Do().memoizedState}function ws(){return Do().memoizedState}function Ts(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=fu();e=Ia(n);var r=La(t,e,n);r!==null&&(mu(r,t,n),Ra(r,t,n)),t={cache:ta()},e.payload=t;return}t=t.return}}function Es(e,t,n){var r=fu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},As(e)?js(t,n):(n=Xr(e,t,n,r),n!==null&&(mu(n,e,r),Ms(n,t,r)))}function Ds(e,t,n){Os(e,t,n,fu())}function Os(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(As(e))js(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,gr(s,o))return Yr(e,t,i,0),Pl===null&&Jr(),!1}catch{}if(n=Xr(e,t,i,r),n!==null)return mu(n,e,r),Ms(n,t,r),!0}return!1}function ks(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},As(e)){if(t)throw Error(i(479))}else t=Xr(e,n,r,2),t!==null&&mu(t,e,2)}function As(e){var t=e.alternate;return e===oo||t!==null&&t===oo}function js(e,t){uo=lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ms(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}var Ns={readContext:Ji,use:Ao,useCallback:_o,useContext:_o,useEffect:_o,useImperativeHandle:_o,useLayoutEffect:_o,useInsertionEffect:_o,useMemo:_o,useReducer:_o,useRef:_o,useState:_o,useDebugValue:_o,useDeferredValue:_o,useTransition:_o,useSyncExternalStore:_o,useId:_o,useHostTransitionStatus:_o,useFormState:_o,useActionState:_o,useOptimistic:_o,useMemoCache:_o,useCacheRefresh:_o};Ns.useEffectEvent=_o;var Ps={readContext:Ji,use:Ao,useCallback:function(e,t){return Eo().memoizedState=[e,t===void 0?null:t],e},useContext:Ji,useEffect:is,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ns(4194308,4,us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){ns(4,2,e,t)},useMemo:function(e,t){var n=Eo();t=t===void 0?null:t;var r=e();if(fo){Ae(!0);try{e()}finally{Ae(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Eo();if(n!==void 0){var i=n(t);if(fo){Ae(!0);try{n(t)}finally{Ae(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Es.bind(null,oo,e),[r.memoizedState,e]},useRef:function(e){var t=Eo();return e={current:e},t.memoizedState=e},useState:function(e){e=Ho(e);var t=e.queue,n=Ds.bind(null,oo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:fs,useDeferredValue:function(e,t){return hs(Eo(),e,t)},useTransition:function(){var e=Ho(!1);return e=_s.bind(null,oo,e.queue,!0,!1),Eo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=oo,a=Eo();if(Di){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Pl===null)throw Error(i(349));Il&127||Lo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,is(zo.bind(null,r,o,e),[e]),r.flags|=2048,es(9,{destroy:void 0},Ro.bind(null,r,o,n,t),null),n},useId:function(){var e=Eo(),t=Pl.identifierPrefix;if(Di){var n=bi,r=yi;n=(r&~(1<<32-je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=po++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=go++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ss,useFormState:Zo,useActionState:Zo,useOptimistic:function(e){var t=Eo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ks.bind(null,oo,!0,n),n.dispatch=t,[e,t]},useMemoCache:jo,useCacheRefresh:function(){return Eo().memoizedState=Ts.bind(null,oo)},useEffectEvent:function(e){var t=Eo(),n={impl:e};return t.memoizedState=n,function(){if(Nl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Fs={readContext:Ji,use:Ao,useCallback:ps,useContext:Ji,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:No,useRef:ts,useState:function(){return No(Mo)},useDebugValue:fs,useDeferredValue:function(e,t){return gs(Do(),so.memoizedState,e,t)},useTransition:function(){var e=No(Mo)[0],t=Do().memoizedState;return[typeof e==`boolean`?e:ko(e),t]},useSyncExternalStore:Io,useId:Cs,useHostTransitionStatus:Ss,useFormState:Qo,useActionState:Qo,useOptimistic:function(e,t){return Uo(Do(),so,e,t)},useMemoCache:jo,useCacheRefresh:ws};Fs.useEffectEvent=ss;var Is={readContext:Ji,use:Ao,useCallback:ps,useContext:Ji,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:Fo,useRef:ts,useState:function(){return Fo(Mo)},useDebugValue:fs,useDeferredValue:function(e,t){var n=Do();return so===null?hs(n,e,t):gs(n,so.memoizedState,e,t)},useTransition:function(){var e=Fo(Mo)[0],t=Do().memoizedState;return[typeof e==`boolean`?e:ko(e),t]},useSyncExternalStore:Io,useId:Cs,useHostTransitionStatus:Ss,useFormState:J,useActionState:J,useOptimistic:function(e,t){var n=Do();return so===null?(n.baseState=e,[e,n.queue.dispatch]):Uo(n,so,e,t)},useMemoCache:jo,useCacheRefresh:ws};Is.useEffectEvent=ss;function Ls(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Rs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fu(),i=Ia(r);i.payload=t,n!=null&&(i.callback=n),t=La(e,i,r),t!==null&&(mu(t,e,r),Ra(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fu(),i=Ia(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=La(e,i,r),t!==null&&(mu(t,e,r),Ra(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fu(),r=Ia(n);r.tag=2,t!=null&&(r.callback=t),t=La(e,r,n),t!==null&&(mu(t,e,n),Ra(t,e,n))}};function zs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!_r(n,r)||!_r(i,a):!0}function Bs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Rs.enqueueReplaceState(t,t.state,null)}function Vs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Hs(e){Wr(e)}function Us(e){console.error(e)}function Ws(e){Wr(e)}function Gs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ks(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function qs(e,t,n){return n=Ia(n),n.tag=3,n.payload={element:null},n.callback=function(){Gs(e,t)},n}function Js(e){return e=Ia(e),e.tag=3,e}function Ys(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ks(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ks(t,n,r),typeof i!=`function`&&(nu===null?nu=new Set([this]):nu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Xs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Gi(t,n,a,!0),n=Xa.current,n!==null){switch(n.tag){case 31:case 13:return Za===null?Eu():n.alternate===null&&Ul===0&&(Ul=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===va?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===va?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Eu(),!1}if(Di)return t=Xa.current,t===null?(r!==Ai&&(t=Error(i(423),{cause:r}),Li(di(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=di(r,n),a=qs(e.stateNode,r,a),za(e,a),Ul!==4&&(Ul=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ai&&(e=Error(i(422),{cause:r}),Li(di(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=di(o,n),Yl===null?Yl=[o]:Yl.push(o),Ul!==4&&(Ul=2),t===null)return!0;r=di(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=qs(n.stateNode,r,e),za(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(nu===null||!nu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Js(a),Ys(a,e,n,r),za(n,a),!1}n=n.return}while(n!==null);return!1}var Zs=Error(i(461)),Qs=!1;function $s(e,t,n,r){t.child=e===null?Ma(t,null,n,r):ja(t,e.child,n,r)}function ec(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return qi(t),r=yo(e,t,n,o,a,i),s=Co(),e!==null&&!Qs?(wo(e,t,i),wc(e,t,i)):(Di&&s&&Ci(t),t.flags|=1,$s(e,t,r,i),t.child)}function tc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ri(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,nc(e,t,a,r,i)):(e=oi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Tc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?_r:n,n(o,r)&&e.ref===t.ref)return wc(e,t,i)}return t.flags|=1,e=ii(a,r),e.ref=t.ref,e.return=t,t.child=e}function nc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(_r(a,r)&&e.ref===t.ref)if(Qs=!1,t.pendingProps=r=a,Tc(e,i))e.flags&131072&&(Qs=!0);else return t.lanes=e.lanes,wc(e,t,i)}return uc(e,t,n,r,i)}function rc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return ac(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&pa(t,a===null?null:a.cachePool),a===null?Ja():qa(t,a),eo(t);else return r=t.lanes=536870912,ac(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&pa(t,null),Ja(),to(t)):(pa(t,a.cachePool),qa(t,a),to(t),t.memoizedState=null);return $s(e,t,i,n),t.child}function ic(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ac(e,t,n,r,i){var a=fa();return a=a===null?null:{parent:ea._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&pa(t,null),Ja(),eo(t),e!==null&&Gi(e,t,r,!0),t.childLanes=i,null}function oc(e,t){return t=yc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sc(e,t,n){return ja(t,e.child,null,n),e=oc(t,t.pendingProps),e.flags|=2,no(t),t.memoizedState=null,e}function cc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Di){if(r.mode===`hidden`)return e=oc(t,r),t.lanes=536870912,ic(null,e);if($a(t),(e=Ei)?(e=of(e,ki),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vi===null?null:{id:yi,overflow:bi},retryLane:536870912,hydrationErrors:null},n=ci(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw ji(t);return t.lanes=536870912,null}return oc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if($a(t),a)if(t.flags&256)t.flags&=-257,t=sc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(Qs||Gi(e,t,n,!1),a=(n&e.childLanes)!==0,Qs||a){if(r=Pl,r!==null&&(s=Je(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Zr(e,s),mu(r,e,s),Zs;Eu(),t=sc(e,t,n)}else e=o.treeContext,Ei=uf(s.nextSibling),Ti=t,Di=!0,Oi=null,ki=!1,e!==null&&K(t,e),t=oc(t,r),t.flags|=4096;return t}return e=ii(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function lc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function uc(e,t,n,r,i){return qi(t),n=yo(e,t,n,r,void 0,i),r=Co(),e!==null&&!Qs?(wo(e,t,i),wc(e,t,i)):(Di&&r&&Ci(t),t.flags|=1,$s(e,t,n,i),t.child)}function dc(e,t,n,r,i,a){return qi(t),t.updateQueue=null,n=xo(t,r,n,i),bo(e),r=Co(),e!==null&&!Qs?(wo(e,t,a),wc(e,t,a)):(Di&&r&&Ci(t),t.flags|=1,$s(e,t,n,a),t.child)}function fc(e,t,n,r,i){if(qi(t),t.stateNode===null){var a=ei,o=n.contextType;typeof o==`object`&&o&&(a=Ji(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Rs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Pa(t),o=n.contextType,a.context=typeof o==`object`&&o?Ji(o):ei,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ls(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Rs.enqueueReplaceState(a,a.state,null),Ha(t,r,a,i),Va(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Vs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ei,typeof u==`object`&&u&&(o=Ji(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Bs(t,a,r,o),Na=!1;var f=t.memoizedState;a.state=f,Ha(t,r,a,i),Va(),l=t.memoizedState,s||f!==l||Na?(typeof d==`function`&&(Ls(t,n,d,r),l=t.memoizedState),(c=Na||zs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Fa(e,t),o=t.memoizedProps,u=Vs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ei,typeof l==`object`&&l&&(c=Ji(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Bs(t,a,r,c),Na=!1,f=t.memoizedState,a.state=f,Ha(t,r,a,i),Va();var p=t.memoizedState;o!==d||f!==p||Na||e!==null&&e.dependencies!==null&&Ki(e.dependencies)?(typeof s==`function`&&(Ls(t,n,s,r),p=t.memoizedState),(u=Na||zs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ki(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,lc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=ja(t,e.child,null,i),t.child=ja(t,null,n,i)):$s(e,t,n,i),t.memoizedState=a.state,e=t.child):e=wc(e,t,i),e}function pc(e,t,n,r){return Fi(),t.flags|=256,$s(e,t,n,r),t.child}var mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hc(e){return{baseLanes:e,cachePool:ma()}}function gc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ql),e}function _c(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(ro.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Di){if(a?Qa(t):to(t),(e=Ei)?(e=of(e,ki),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vi===null?null:{id:yi,overflow:bi},retryLane:536870912,hydrationErrors:null},n=ci(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw ji(t);return cf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(to(t),a=t.mode,c=yc({mode:`hidden`,children:c},a),r=G(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=hc(n),r.childLanes=gc(e,s,n),t.memoizedState=mc,ic(null,r)):(Qa(t),vc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Qa(t),t.flags&=-257,t=bc(e,t,n)):t.memoizedState===null?(to(t),c=r.fallback,a=t.mode,r=yc({mode:`visible`,children:r.children},a),c=G(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,ja(t,e.child,null,n),r=t.child,r.memoizedState=hc(n),r.childLanes=gc(e,s,n),t.memoizedState=mc,t=ic(null,r)):(to(t),t.child=e.child,t.flags|=128,t=null);else if(Qa(t),cf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Li({value:r,source:null,stack:null}),t=bc(e,t,n)}else if(Qs||Gi(e,t,n,!1),s=(n&e.childLanes)!==0,Qs||s){if(s=Pl,s!==null&&(r=Je(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Zr(e,r),mu(s,e,r),Zs;sf(c)||Eu(),t=bc(e,t,n)}else sf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ei=uf(c.nextSibling),Ti=t,Di=!0,Oi=null,ki=!1,e!==null&&K(t,e),t=vc(t,r.children),t.flags|=4096);return t}return a?(to(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ii(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=G(c,a,n,null),c.flags|=2):c=ii(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ic(null,r),r=t.child,c=e.child.memoizedState,c===null?c=hc(n):(a=c.cachePool,a===null?a=ma():(l=ea._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=gc(e,s,n),t.memoizedState=mc,ic(e.child,r)):(Qa(t),n=e.child,e=n.sibling,n=ii(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function vc(e,t){return t=yc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function yc(e,t){return e=ni(22,e,null,t),e.lanes=0,e}function bc(e,t,n){return ja(t,e.child,null,n),e=vc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ui(e.return,t,n)}function Sc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Cc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ro.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,L(ro,o),$s(e,t,r,n),r=Di?hi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xc(e,n,t);else if(e.tag===19)xc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&io(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Sc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&io(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Sc(t,!0,n,null,a,r);break;case`together`:Sc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function wc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Gi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ii(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ii(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Tc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Ki(e))):!0}function Ec(e,t,n){switch(t.tag){case 3:R(t,t.stateNode.containerInfo),Vi(t,ea,e.memoizedState.cache),Fi();break;case 27:case 5:B(t);break;case 4:R(t,t.stateNode.containerInfo);break;case 10:Vi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,$a(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Qa(t),e=wc(e,t,n),e===null?null:e.sibling):_c(e,t,n):(Qa(t),t.flags|=128,null);Qa(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Gi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Cc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),L(ro,ro.current),r)break;return null;case 22:return t.lanes=0,rc(e,t,n,t.pendingProps);case 24:Vi(t,ea,e.memoizedState.cache)}return wc(e,t,n)}function Dc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Qs=!0;else{if(!Tc(e,n)&&!(t.flags&128))return Qs=!1,Ec(e,t,n);Qs=!!(e.flags&131072)}else Qs=!1,Di&&t.flags&1048576&&Si(t,hi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=xa(t.elementType),t.type=e,typeof e==`function`)ri(e)?(r=Vs(e,r),t.tag=1,t=fc(null,t,e,r,n)):(t.tag=0,t=uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=ec(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=tc(null,t,e,r,n);break a}}throw t=A(e)||e,Error(i(306,t,``))}}return t;case 0:return uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Vs(r,t.pendingProps),fc(e,t,r,a,n);case 3:a:{if(R(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Fa(e,t),Ha(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Vi(t,ea,r),r!==o.cache&&Wi(t,[ea],n,!0),Va(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=pc(e,t,r,n);break a}else if(r!==a){a=di(Error(i(424)),t),Li(a),t=pc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ei=uf(e.firstChild),Ti=t,Di=!0,Oi=null,ki=!0,n=Ma(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Fi(),r===a){t=wc(e,t,n);break a}$s(e,t,r,n)}t=t.child}return t;case 26:return lc(e,t),e===null?(n=jf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Di||(n=t.type,e=t.pendingProps,r=Hd(ae.current).createElement(n),r[et]=t,r[tt]=e,Id(r,n,e),pt(r),t.stateNode=r):t.memoizedState=jf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return B(t),e===null&&Di&&(r=t.stateNode=mf(t.type,t.pendingProps,ae.current),Ti=t,ki=!0,a=Ei,$d(t.type)?(df=a,Ei=uf(r.firstChild)):Ei=a),$s(e,t,t.pendingProps.children,n),lc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Di&&((a=r=Ei)&&(r=rf(r,t.type,t.pendingProps,ki),r===null?a=!1:(t.stateNode=r,Ti=t,Ei=uf(r.firstChild),ki=!1,a=!0)),a||ji(t)),B(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Gd(a,o)?r=null:s!==null&&Gd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=yo(e,t,So,null,null,n),ep._currentValue=a),lc(e,t),$s(e,t,r,n),t.child;case 6:return e===null&&Di&&((e=n=Ei)&&(n=af(n,t.pendingProps,ki),n===null?e=!1:(t.stateNode=n,Ti=t,Ei=null,e=!0)),e||ji(t)),null;case 13:return _c(e,t,n);case 4:return R(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ja(t,null,r,n):$s(e,t,r,n),t.child;case 11:return ec(e,t,t.type,t.pendingProps,n);case 7:return $s(e,t,t.pendingProps,n),t.child;case 8:return $s(e,t,t.pendingProps.children,n),t.child;case 12:return $s(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Vi(t,t.type,r.value),$s(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,qi(t),a=Ji(a),r=r(a),t.flags|=1,$s(e,t,r,n),t.child;case 14:return tc(e,t,t.type,t.pendingProps,n);case 15:return nc(e,t,t.type,t.pendingProps,n);case 19:return Cc(e,t,n);case 31:return cc(e,t,n);case 22:return rc(e,t,n,t.pendingProps);case 24:return qi(t),r=Ji(ea),e===null?(a=fa(),a===null&&(a=Pl,o=ta(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Pa(t),Vi(t,ea,a)):((e.lanes&n)!==0&&(Fa(e,t),Ha(t,null,null,n),Va()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Vi(t,ea,r),r!==a.cache&&Wi(t,[ea],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Vi(t,ea,r))),$s(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Oc(e){e.flags|=4}function kc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Cu())e.flags|=8192;else throw Sa=va,ga}else e.flags&=-16777217}function Ac(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Kf(t))if(Cu())e.flags|=8192;else throw Sa=va,ga}function jc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:He(),e.lanes|=t,Jl|=t)}function Mc(e,t){if(!Di)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Nc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Pc(e,t,n){var r=t.pendingProps;switch(wi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nc(t),null;case 1:return Nc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Hi(ea),z(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Pi(t)?Oc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ii())),Nc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Oc(t),o===null?(Nc(t),kc(t,a,null,r,n)):(Nc(t),Ac(t,o))):o?o===e.memoizedState?(Nc(t),t.flags&=-16777217):(Oc(t),Nc(t),Ac(t,o)):(e=e.memoizedProps,e!==r&&Oc(t),Nc(t),kc(t,a,e,r,n)),null;case 27:if(se(t),n=ae.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Nc(t),null}e=re.current,Pi(t)?Mi(t,e):(e=mf(a,r,n),t.stateNode=e,Oc(t))}return Nc(t),null;case 5:if(se(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Nc(t),null}if(o=re.current,Pi(t))Mi(t,o);else{var s=Hd(ae.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[et]=t,o[tt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Id(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Oc(t)}}return Nc(t),kc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Pi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ti,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[et]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Nd(e.nodeValue,n)),e||ji(t,!0)}else e=Hd(e).createTextNode(r),e[et]=t,t.stateNode=e}return Nc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Pi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[et]=t}else Fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),e=!1}else n=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(no(t),t):(no(t),null);if(t.flags&128)throw Error(i(558))}return Nc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Pi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[et]=t}else Fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),a=!1}else a=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(no(t),t):(no(t),null)}return no(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),jc(t,t.updateQueue),Nc(t),null);case 4:return z(),e===null&&Cd(t.stateNode.containerInfo),Nc(t),null;case 10:return Hi(t.type),Nc(t),null;case 19:if(I(ro),r=t.memoizedState,r===null)return Nc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Mc(r,!1);else{if(Ul!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=io(e),o!==null){for(t.flags|=128,Mc(r,!1),e=o.updateQueue,t.updateQueue=e,jc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ai(n,e),n=n.sibling;return L(ro,ro.current&1|2),Di&&xi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ye()>eu&&(t.flags|=128,a=!0,Mc(r,!1),t.lanes=4194304)}else{if(!a)if(e=io(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,jc(t,e),Mc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Di)return Nc(t),null}else 2*ye()-r.renderingStartTime>eu&&n!==536870912&&(t.flags|=128,a=!0,Mc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Nc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ye(),e.sibling=null,n=ro.current,L(ro,a?n&1|2:n&1),Di&&xi(t,r.treeForkCount),e);case 22:case 23:return no(t),Ya(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Nc(t),t.subtreeFlags&6&&(t.flags|=8192)):Nc(t),n=t.updateQueue,n!==null&&jc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&I(da),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Hi(ea),Nc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Fc(e,t){switch(wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hi(ea),z(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return se(t),null;case 31:if(t.memoizedState!==null){if(no(t),t.alternate===null)throw Error(i(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(no(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(ro),null;case 4:return z(),null;case 10:return Hi(t.type),null;case 22:case 23:return no(t),Ya(),e!==null&&I(da),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Hi(ea),null;case 25:return null;default:return null}}function Ic(e,t){switch(wi(t),t.tag){case 3:Hi(ea),z();break;case 26:case 27:case 5:se(t);break;case 4:z();break;case 31:t.memoizedState!==null&&no(t);break;case 13:no(t);break;case 19:I(ro);break;case 10:Hi(t.type);break;case 22:case 23:no(t),Ya(),e!==null&&I(da);break;case 24:Hi(ea)}}function Lc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Wu(t,t.return,e)}}function Rc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Wu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Wu(t,t.return,e)}}function zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Wa(t,n)}catch(t){Wu(e,e.return,t)}}}function Bc(e,t,n){n.props=Vs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Wu(e,t,n)}}function Vc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Wu(e,t,n)}}function Hc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Wu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Wu(e,t,n)}else n.current=null}function Uc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Wu(e,e.return,t)}}function Wc(e,t,n){try{var r=e.stateNode;Ld(r,e.type,n,t),r[tt]=t}catch(t){Wu(e,e.return,t)}}function Gc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$d(e.type)||e.tag===4}function Kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Gc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&$d(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=qt));else if(r!==4&&(r===27&&$d(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&$d(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Id(t,r,n),t[et]=e,t[tt]=n}catch(t){Wu(e,e.return,t)}}var Xc=!1,Zc=!1,Qc=!1,$c=typeof WeakSet==`function`?WeakSet:Set,el=null;function tl(e,t){if(e=e.containerInfo,Bd=lp,e=xr(e),Sr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Vd={focusedElem:e,selectionRange:n},lp=!1,el=t;el!==null;)if(t=el,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,el=e;else for(;el!==null;){switch(t=el,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Vs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Wu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)nf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:nf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,el=e;break}el=t.return}}function nl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ml(e,n),r&4&&Lc(5,n);break;case 1:if(ml(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Wu(n,n.return,e)}else{var i=Vs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Wu(n,n.return,e)}}r&64&&zc(n),r&512&&Vc(n,n.return);break;case 3:if(ml(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Wa(e,t)}catch(e){Wu(n,n.return,e)}}break;case 27:t===null&&r&4&&Yc(n);case 26:case 5:ml(e,n),t===null&&r&4&&Uc(n),r&512&&Vc(n,n.return);break;case 12:ml(e,n);break;case 31:ml(e,n),r&4&&cl(e,n);break;case 13:ml(e,n),r&4&&ll(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),lf(e,n))));break;case 22:if(r=n.memoizedState!==null||Xc,!r){t=t!==null&&t.memoizedState!==null||Zc,i=Xc;var a=Zc;Xc=r,(Zc=t)&&!a?gl(e,n,(n.subtreeFlags&8772)!=0):ml(e,n),Xc=i,Zc=a}break;case 30:break;default:ml(e,n)}}function rl(e){var t=e.alternate;t!==null&&(e.alternate=null,rl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ct(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var il=null,al=!1;function ol(e,t,n){for(n=n.child;n!==null;)sl(e,t,n),n=n.sibling}function sl(e,t,n){if(ke&&typeof ke.onCommitFiberUnmount==`function`)try{ke.onCommitFiberUnmount(Oe,n)}catch{}switch(n.tag){case 26:Zc||Hc(n,t),ol(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Zc||Hc(n,t);var r=il,i=al;$d(n.type)&&(il=n.stateNode,al=!1),ol(e,t,n),hf(n.stateNode),il=r,al=i;break;case 5:Zc||Hc(n,t);case 6:if(r=il,i=al,il=null,ol(e,t,n),il=r,al=i,il!==null)if(al)try{(il.nodeType===9?il.body:il.nodeName===`HTML`?il.ownerDocument.body:il).removeChild(n.stateNode)}catch(e){Wu(n,t,e)}else try{il.removeChild(n.stateNode)}catch(e){Wu(n,t,e)}break;case 18:il!==null&&(al?(e=il,ef(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Fp(e)):ef(il,n.stateNode));break;case 4:r=il,i=al,il=n.stateNode.containerInfo,al=!0,ol(e,t,n),il=r,al=i;break;case 0:case 11:case 14:case 15:Rc(2,n,t),Zc||Rc(4,n,t),ol(e,t,n);break;case 1:Zc||(Hc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Bc(n,t,r)),ol(e,t,n);break;case 21:ol(e,t,n);break;case 22:Zc=(r=Zc)||n.memoizedState!==null,ol(e,t,n),Zc=r;break;default:ol(e,t,n)}}function cl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fp(e)}catch(e){Wu(t,t.return,e)}}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fp(e)}catch(e){Wu(t,t.return,e)}}function ul(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $c),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $c),t;default:throw Error(i(435,e.tag))}}function dl(e,t){var n=ul(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function fl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if($d(c.type)){il=c.stateNode,al=!1;break a}break;case 5:il=c.stateNode,al=!1;break a;case 3:case 4:il=c.stateNode.containerInfo,al=!0;break a}c=c.return}if(il===null)throw Error(i(160));sl(o,s,a),il=null,al=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)X(t,e),t=t.sibling}var Y=null;function X(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:fl(t,e),Z(e),r&4&&(Rc(3,e,e.return),Lc(3,e),Rc(5,e,e.return));break;case 1:fl(t,e),Z(e),r&512&&(Zc||n===null||Hc(n,n.return)),r&64&&Xc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=Y;if(fl(t,e),Z(e),r&512&&(Zc||n===null||Hc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[st]||o[et]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Id(o,r,n),o[et]=e,pt(o),r=o;break a;case`link`:var s=Uf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Id(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Uf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Id(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[et]=e,pt(o),r=o}e.stateNode=r}else Wf(a,e.type,e.stateNode);else e.stateNode=Rf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Wc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Wf(a,e.type,e.stateNode):Rf(a,r,e.memoizedProps))}break;case 27:fl(t,e),Z(e),r&512&&(Zc||n===null||Hc(n,n.return)),n!==null&&r&4&&Wc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(fl(t,e),Z(e),r&512&&(Zc||n===null||Hc(n,n.return)),e.flags&32){a=e.stateNode;try{zt(a,``)}catch(t){Wu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Wc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Qc=!0);break;case 6:if(fl(t,e),Z(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Wu(e,e.return,t)}}break;case 3:if(Hf=null,a=Y,Y=vf(t.containerInfo),fl(t,e),Y=a,Z(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Fp(t.containerInfo)}catch(t){Wu(e,e.return,t)}Qc&&(Qc=!1,pl(e));break;case 4:r=Y,Y=vf(e.stateNode.containerInfo),fl(t,e),Z(e),Y=r;break;case 12:fl(t,e),Z(e);break;case 31:fl(t,e),Z(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 13:fl(t,e),Z(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ql=ye()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Xc,d=Zc;if(Xc=u||a,Zc=d||l,fl(t,e),Zc=d,Xc=u,Z(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Xc||Zc||hl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Wu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Wu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?tf(m,!0):tf(l.stateNode,!1)}catch(e){Wu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,dl(e,n))));break;case 19:fl(t,e),Z(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 30:break;case 21:break;default:fl(t,e),Z(e)}}function Z(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Gc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Jc(e,Kc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(zt(o,``),n.flags&=-33),Jc(e,Kc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;qc(e,Kc(e),s);break;default:throw Error(i(161))}}catch(t){Wu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function pl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;pl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ml(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)nl(e,t.alternate,t),t=t.sibling}function hl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Rc(4,t,t.return),hl(t);break;case 1:Hc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Bc(t,t.return,n),hl(t);break;case 27:hf(t.stateNode);case 26:case 5:Hc(t,t.return),hl(t);break;case 22:t.memoizedState===null&&hl(t);break;case 30:hl(t);break;default:hl(t)}e=e.sibling}}function gl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:gl(i,a,n),Lc(4,a);break;case 1:if(gl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Wu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ua(c[i],s)}catch(e){Wu(r,r.return,e)}}n&&o&64&&zc(a),Vc(a,a.return);break;case 27:Yc(a);case 26:case 5:gl(i,a,n),n&&r===null&&o&4&&Uc(a),Vc(a,a.return);break;case 12:gl(i,a,n);break;case 31:gl(i,a,n),n&&o&4&&cl(i,a);break;case 13:gl(i,a,n),n&&o&4&&ll(i,a);break;case 22:a.memoizedState===null&&gl(i,a,n),Vc(a,a.return);break;case 30:break;default:gl(i,a,n)}t=t.sibling}}function _l(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&na(n))}function vl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e))}function yl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bl(e,t,n,r),t=t.sibling}function bl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:yl(e,t,n,r),i&2048&&Lc(9,t);break;case 1:yl(e,t,n,r);break;case 3:yl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e)));break;case 12:if(i&2048){yl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Wu(t,t.return,e)}}else yl(e,t,n,r);break;case 31:yl(e,t,n,r);break;case 13:yl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?yl(e,t,n,r):(a._visibility|=2,xl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?yl(e,t,n,r):Sl(e,t),i&2048&&_l(o,t);break;case 24:yl(e,t,n,r),i&2048&&vl(t.alternate,t);break;default:yl(e,t,n,r)}}function xl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:xl(a,o,s,c,i),Lc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,xl(a,o,s,c,i)):u._visibility&2?xl(a,o,s,c,i):Sl(a,o),i&&l&2048&&_l(o.alternate,o);break;case 24:xl(a,o,s,c,i),i&&l&2048&&vl(o.alternate,o);break;default:xl(a,o,s,c,i)}t=t.sibling}}function Sl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Sl(n,r),i&2048&&_l(r.alternate,r);break;case 24:Sl(n,r),i&2048&&vl(r.alternate,r);break;default:Sl(n,r)}t=t.sibling}}var Cl=8192;function wl(e,t,n){if(e.subtreeFlags&Cl)for(e=e.child;e!==null;)Tl(e,t,n),e=e.sibling}function Tl(e,t,n){switch(e.tag){case 26:wl(e,t,n),e.flags&Cl&&e.memoizedState!==null&&qf(n,Y,e.memoizedState,e.memoizedProps);break;case 5:wl(e,t,n);break;case 3:case 4:var r=Y;Y=vf(e.stateNode.containerInfo),wl(e,t,n),Y=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Cl,Cl=16777216,wl(e,t,n),Cl=r):wl(e,t,n));break;default:wl(e,t,n)}}function El(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Dl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Al(r,e)}El(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ol(e),e=e.sibling}function Ol(e){switch(e.tag){case 0:case 11:case 15:Dl(e),e.flags&2048&&Rc(9,e,e.return);break;case 3:Dl(e);break;case 12:Dl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,kl(e)):Dl(e);break;default:Dl(e)}}function kl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Al(r,e)}El(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rc(8,t,t.return),kl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,kl(t));break;default:kl(t)}e=e.sibling}}function Al(e,t){for(;el!==null;){var n=el;switch(n.tag){case 0:case 11:case 15:Rc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:na(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,el=r;else a:for(n=e;el!==null;){r=el;var i=r.sibling,a=r.return;if(rl(r),r===n){el=null;break a}if(i!==null){i.return=a,el=i;break a}el=a}}}var jl={getCacheForType:function(e){var t=Ji(ea),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ji(ea).controller.signal}},Ml=typeof WeakMap==`function`?WeakMap:Map,Nl=0,Pl=null,Fl=null,Il=0,Ll=0,Rl=null,zl=!1,Bl=!1,Vl=!1,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=null,Xl=null,Zl=!1,Ql=0,$l=0,eu=1/0,tu=null,nu=null,ru=0,iu=null,au=null,ou=0,su=0,cu=null,lu=null,uu=0,du=null;function fu(){return Nl&2&&Il!==0?Il&-Il:M.T===null?Ze():dd()}function pu(){if(ql===0)if(!(Il&536870912)||Di){var e=Ie;Ie<<=1,!(Ie&3932160)&&(Ie=262144),ql=e}else ql=536870912;return e=Xa.current,e!==null&&(e.flags|=32),ql}function mu(e,t,n){(e===Pl&&(Ll===2||Ll===9)||e.cancelPendingCommit!==null)&&(xu(e,0),vu(e,Il,ql,!1)),We(e,n),(!(Nl&2)||e!==Pl)&&(e===Pl&&(!(Nl&2)&&(Gl|=n),Ul===4&&vu(e,Il,ql,!1)),rd(e))}function hu(e,t,n){if(Nl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Be(e,t),a=r?ku(e,t):Du(e,t,!0),o=r;do{if(a===0){Bl&&!r&&vu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!_u(n)){a=Du(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Yl;var l=c.current.memoizedState.isDehydrated;if(l&&(xu(c,s).flags|=256),s=Du(c,s,!1),s!==2){if(Vl&&!l){c.errorRecoveryDisabledLanes|=o,Gl|=o,a=4;break a}o=Xl,Xl=a,o!==null&&(Xl===null?Xl=o:Xl.push.apply(Xl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){xu(e,0),vu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:vu(r,t,ql,!zl);break a;case 2:Xl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Ql+300-ye(),10<a)){if(vu(r,t,ql,!zl),ze(r,0,!0)!==0)break a;ou=t,r.timeoutHandle=Jd(gu.bind(null,r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,`Throttled`,-0,0),a);break a}gu(r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,null,-0,0)}}break}while(1);rd(e)}function gu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qt},Tl(t,a,d);var m=(a&62914560)===a?Ql-ye():(a&4194048)===a?$l-ye():0;if(m=Yf(d,m),m!==null){ou=a,e.cancelPendingCommit=m(Iu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),vu(e,a,o,!l);return}}Iu(e,t,a,n,r,i,o,s,c)}function _u(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!gr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vu(e,t,n,r){t&=~Kl,t&=~Gl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-je(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ke(e,n,t)}function yu(){return Nl&6?!0:(id(0,!1),!1)}function bu(){if(Fl!==null){if(Ll===0)var e=Fl.return;else e=Fl,Bi=zi=null,To(e),Ta=null,Ea=0,e=Fl;for(;e!==null;)Ic(e.alternate,e),e=e.return;Fl=null}}function xu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Yd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ou=0,bu(),Pl=e,Fl=n=ii(e.current,null),Il=t,Ll=0,Rl=null,zl=!1,Bl=Be(e,t),Vl=!1,Jl=ql=Kl=Gl=Wl=Ul=0,Xl=Yl=null,Zl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-je(r),a=1<<i;t|=e[i],r&=~a}return Hl=t,Jr(),n}function Su(e,t){oo=null,M.H=Ns,t===ha||t===_a?(t=Ca(),Ll=3):t===ga?(t=Ca(),Ll=4):Ll=t===Zs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Rl=t,Fl===null&&(Ul=1,Gs(e,di(t,e.current)))}function Cu(){var e=Xa.current;return e===null?!0:(Il&4194048)===Il?Za===null:(Il&62914560)===Il||Il&536870912?e===Za:!1}function wu(){var e=M.H;return M.H=Ns,e===null?Ns:e}function Tu(){var e=M.A;return M.A=jl,e}function Eu(){Ul=4,zl||(Il&4194048)!==Il&&Xa.current!==null||(Bl=!0),!(Wl&134217727)&&!(Gl&134217727)||Pl===null||vu(Pl,Il,ql,!1)}function Du(e,t,n){var r=Nl;Nl|=2;var i=wu(),a=Tu();(Pl!==e||Il!==t)&&(tu=null,xu(e,t)),t=!1;var o=Ul;a:do try{if(Ll!==0&&Fl!==null){var s=Fl,c=Rl;switch(Ll){case 8:bu(),o=6;break a;case 3:case 2:case 9:case 6:Xa.current===null&&(t=!0);var l=Ll;if(Ll=0,Rl=null,Nu(e,s,c,l),n&&Bl){o=0;break a}break;default:l=Ll,Ll=0,Rl=null,Nu(e,s,c,l)}}Ou(),o=Ul;break}catch(t){Su(e,t)}while(1);return t&&e.shellSuspendCounter++,Bi=zi=null,Nl=r,M.H=i,M.A=a,Fl===null&&(Pl=null,Il=0,Jr()),o}function Ou(){for(;Fl!==null;)ju(Fl)}function ku(e,t){var n=Nl;Nl|=2;var r=wu(),a=Tu();Pl!==e||Il!==t?(tu=null,eu=ye()+500,xu(e,t)):Bl=Be(e,t);a:do try{if(Ll!==0&&Fl!==null){t=Fl;var o=Rl;b:switch(Ll){case 1:Ll=0,Rl=null,Nu(e,t,o,1);break;case 2:case 9:if(ya(o)){Ll=0,Rl=null,Mu(t);break}t=function(){Ll!==2&&Ll!==9||Pl!==e||(Ll=7),rd(e)},o.then(t,t);break a;case 3:Ll=7;break a;case 4:Ll=5;break a;case 7:ya(o)?(Ll=0,Rl=null,Mu(t)):(Ll=0,Rl=null,Nu(e,t,o,7));break;case 5:var s=null;switch(Fl.tag){case 26:s=Fl.memoizedState;case 5:case 27:var c=Fl;if(s?Kf(s):c.stateNode.complete){Ll=0,Rl=null;var l=c.sibling;if(l!==null)Fl=l;else{var u=c.return;u===null?Fl=null:(Fl=u,Pu(u))}break b}}Ll=0,Rl=null,Nu(e,t,o,5);break;case 6:Ll=0,Rl=null,Nu(e,t,o,6);break;case 8:bu(),Ul=6;break a;default:throw Error(i(462))}}Au();break}catch(t){Su(e,t)}while(1);return Bi=zi=null,M.H=r,M.A=a,Nl=n,Fl===null?(Pl=null,Il=0,Jr(),Ul):0}function Au(){for(;Fl!==null&&!_e();)ju(Fl)}function ju(e){var t=Dc(e.alternate,e,Hl);e.memoizedProps=e.pendingProps,t===null?Pu(e):Fl=t}function Mu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=dc(n,t,t.pendingProps,t.type,void 0,Il);break;case 11:t=dc(n,t,t.pendingProps,t.type.render,t.ref,Il);break;case 5:To(t);default:Ic(n,t),t=Fl=ai(t,Hl),t=Dc(n,t,Hl)}e.memoizedProps=e.pendingProps,t===null?Pu(e):Fl=t}function Nu(e,t,n,r){Bi=zi=null,To(t),Ta=null,Ea=0;var i=t.return;try{if(Xs(e,i,t,n,Il)){Ul=1,Gs(e,di(n,e.current)),Fl=null;return}}catch(t){if(i!==null)throw Fl=i,t;Ul=1,Gs(e,di(n,e.current)),Fl=null;return}t.flags&32768?(Di||r===1?e=!0:Bl||Il&536870912?e=!1:(zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Xa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Fu(t,e)):Pu(t)}function Pu(e){var t=e;do{if(t.flags&32768){Fu(t,zl);return}e=t.return;var n=Pc(t.alternate,t,Hl);if(n!==null){Fl=n;return}if(t=t.sibling,t!==null){Fl=t;return}Fl=t=e}while(t!==null);Ul===0&&(Ul=5)}function Fu(e,t){do{var n=Fc(e.alternate,e);if(n!==null){n.flags&=32767,Fl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Fl=e;return}Fl=e=n}while(e!==null);Ul=6,Fl=null}function Iu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Vu();while(ru!==0);if(Nl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=qr,Ge(e,n,o,s,c,l),e===Pl&&(Fl=Pl=null,Il=0),au=t,iu=e,ou=n,su=o,cu=a,lu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Ce,function(){return Hu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=M.T,M.T=null,a=N.p,N.p=2,s=Nl,Nl|=4;try{tl(e,t,n)}finally{Nl=s,N.p=a,M.T=r}}ru=1,Lu(),Ru(),zu()}}function Lu(){if(ru===1){ru=0;var e=iu,t=au,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=Nl;Nl|=4;try{X(t,e);var a=Vd,o=xr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&br(s.ownerDocument.documentElement,s)){if(c!==null&&Sr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=yr(s,h),v=yr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}lp=!!Bd,Vd=Bd=null}finally{Nl=i,N.p=r,M.T=n}}e.current=t,ru=2}}function Ru(){if(ru===2){ru=0;var e=iu,t=au,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=Nl;Nl|=4;try{nl(e,t.alternate,t)}finally{Nl=i,N.p=r,M.T=n}}ru=3}}function zu(){if(ru===4||ru===3){ru=0,ve();var e=iu,t=au,n=ou,r=lu;t.subtreeFlags&10256||t.flags&10256?ru=5:(ru=0,au=iu=null,Bu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(nu=null),Xe(n),t=t.stateNode,ke&&typeof ke.onCommitFiberRoot==`function`)try{ke.onCommitFiberRoot(Oe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=M.T,i=N.p,N.p=2,M.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{M.T=t,N.p=i}}ou&3&&Vu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===du?uu++:(uu=0,du=e):uu=0,id(0,!1)}}function Bu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,na(t)))}function Vu(){return Lu(),Ru(),zu(),Hu()}function Hu(){if(ru!==5)return!1;var e=iu,t=su;su=0;var n=Xe(ou),r=M.T,a=N.p;try{N.p=32>n?32:n,M.T=null,n=cu,cu=null;var o=iu,s=ou;if(ru=0,au=iu=null,ou=0,Nl&6)throw Error(i(331));var c=Nl;if(Nl|=4,Ol(o.current),bl(o,o.current,s,n),Nl=c,id(0,!1),ke&&typeof ke.onPostCommitFiberRoot==`function`)try{ke.onPostCommitFiberRoot(Oe,o)}catch{}return!0}finally{N.p=a,M.T=r,Bu(e,t)}}function Uu(e,t,n){t=di(n,t),t=qs(e.stateNode,t,2),e=La(e,t,2),e!==null&&(We(e,2),rd(e))}function Wu(e,t,n){if(e.tag===3)Uu(e,e,n);else for(;t!==null;){if(t.tag===3){Uu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(nu===null||!nu.has(r))){e=di(n,e),n=Js(2),r=La(t,n,2),r!==null&&(Ys(n,r,t,e),We(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ml;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Vl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Pl===e&&(Il&n)===n&&(Ul===4||Ul===3&&(Il&62914560)===Il&&300>ye()-Ql?!(Nl&2)&&xu(e,0):Kl|=n,Jl===Il&&(Jl=0)),rd(e)}function qu(e,t){t===0&&(t=He()),e=Zr(e,t),e!==null&&(We(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return ge(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Il,a=ze(r,r===Pl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Be(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&qd()&&(e=nd);for(var t=ye(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}ru!==0&&ru!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-je(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ve(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Pl,n=Il,n=ze(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ll===2||Ll===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&W(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Be(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&W(r),Xe(n)){case 2:case 8:n=Se;break;case 32:n=Ce;break;case 268435456:n=Te;break;default:n=Ce}return r=cd.bind(null,e),n=ge(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&W(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(ru!==0&&ru!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Vu()&&e.callbackNode!==n)return null;var r=Il;return r=ze(e,e===Pl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(hu(e,r,t),sd(e,ye()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Vu())return null;hu(e,t,!0)}function ud(){Zd(function(){Nl&6?ge(xe,ad):od()})}function dd(){if(nd===0){var e=aa;e===0&&(e=Fe,Fe<<=1,!(Fe&261888)&&(Fe=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Kt(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[tt]||null).action),o=r.submitter;o&&(t=(t=o[tt]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new hn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);ys(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),ys(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Hr.length;hd++){var gd=Hr[hd];Ur(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Ur(Pr,`onAnimationEnd`),Ur(Fr,`onAnimationIteration`),Ur(Ir,`onAnimationStart`),Ur(`dblclick`,`onDoubleClick`),Ur(`focusin`,`onFocus`),Ur(`focusout`,`onBlur`),Ur(Lr,`onTransitionRun`),Ur(Rr,`onTransitionStart`),Ur(zr,`onTransitionCancel`),Ur(Br,`onTransitionEnd`),_t(`onMouseEnter`,[`mouseout`,`mouseover`]),_t(`onMouseLeave`,[`mouseout`,`mouseover`]),_t(`onPointerEnter`,[`pointerout`,`pointerover`]),_t(`onPointerLeave`,[`pointerout`,`pointerover`]),gt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),gt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),gt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),gt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),gt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),gt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Wr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Wr(e)}i.currentTarget=null,a=c}}}}function bd(e,t){var n=t[rt];n===void 0&&(n=t[rt]=new Set);var r=e+`__bubble`;n.has(r)||(wd(t,e,2,!1),n.add(r))}function xd(e,t,n){var r=0;t&&(r|=4),wd(n,e,r,t)}var Sd=`_reactListening`+Math.random().toString(36).slice(2);function Cd(e){if(!e[Sd]){e[Sd]=!0,mt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||xd(t,!1,e),xd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sd]||(t[Sd]=!0,xd(`selectionchange`,!1,t))}}function wd(e,t,n,r){switch(gp(t)){case 2:var i=up;break;case 8:i=dp;break;default:i=fp}n=i.bind(null,t,n,e),i=void 0,!rn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Td(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=lt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}en(function(){var r=a,i=Yt(n),s=[];a:{var c=Vr.get(e);if(c!==void 0){var l=hn,u=e;switch(e){case`keypress`:if(un(n)===0)break a;case`keydown`:case`keyup`:l=Nn;break;case`focusin`:u=`focus`,l=wn;break;case`focusout`:u=`blur`,l=wn;break;case`beforeblur`:case`afterblur`:l=wn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Sn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Cn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Fn;break;case Pr:case Fr:case Ir:l=Tn;break;case Br:l=In;break;case`scroll`:case`scrollend`:l=_n;break;case`wheel`:l=Ln;break;case`copy`:case`cut`:case`paste`:l=En;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Pn;break;case`toggle`:case`beforetoggle`:l=Rn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=tn(m,p),g!=null&&d.push(Ed(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Jt&&(u=n.relatedTarget||n.fromElement)&&(lt(u)||u[nt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?lt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Sn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Pn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:dt(l),h=u==null?c:dt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,lt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Od,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&kd(s,c,l,d,!1),u!==null&&f!==null&&kd(s,f,u,d,!0)}}a:{if(c=r?dt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=ir;else if(Qn(c))if(ar)v=mr;else{v=fr;var y=dr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Ut(r.elementType)&&(v=ir):v=pr;if(v&&=v(e,r)){$n(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ft(c,`number`,c.value)}switch(y=r?dt(r):window,e){case`focusin`:(Qn(y)||y.contentEditable===`true`)&&(wr=y,Tr=r,Er=null);break;case`focusout`:Er=Tr=wr=null;break;case`mousedown`:Dr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Dr=!1,Or(s,n,i);break;case`selectionchange`:if(Cr)break;case`keydown`:case`keyup`:Or(s,n,i)}var b;if(Bn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Jn?Kn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Un&&n.locale!==`ko`&&(Jn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Jn&&(b=ln()):(on=i,sn=`value`in on?on.value:on.textContent,Jn=!0)),y=Dd(r,x),0<y.length&&(x=new Dn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=qn(n),b!==null&&(x.data=b)))),(b=Hn?Yn(e,n):Xn(e,n))&&(x=Dd(r,`onBeforeInput`),0<x.length&&(y=new Dn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Ed(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Dd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=tn(e,n),i!=null&&r.unshift(Ed(e,i,a)),i=tn(e,t),i!=null&&r.push(Ed(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Od(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=tn(n,a),l!=null&&o.unshift(Ed(n,l,c))):i||(l=tn(n,a),l!=null&&o.push(Ed(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ad=/\r\n?/g,jd=/\u0000|\uFFFD/g;function Md(e){return(typeof e==`string`?e:``+e).replace(Ad,`
10
- `).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Pd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&zt(e,``+r);break;case`className`:Ct(e,`class`,r);break;case`tabIndex`:Ct(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ct(e,n,r);break;case`style`:Ht(e,r,o);break;case`data`:if(t!==`object`){Ct(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Pd(e,t,`name`,a.name,a,null),Pd(e,t,`formEncType`,a.formEncType,a,null),Pd(e,t,`formMethod`,a.formMethod,a,null),Pd(e,t,`formTarget`,a.formTarget,a,null)):(Pd(e,t,`encType`,a.encType,a,null),Pd(e,t,`method`,a.method,a,null),Pd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=qt);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Kt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:bd(`beforetoggle`,e),bd(`toggle`,e),St(e,`popover`,r);break;case`xlinkActuate`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:St(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Wt.get(n)||n,St(e,n,r))}}function Fd(e,t,n,r,a,o){switch(n){case`style`:Ht(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&zt(e,``+r);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=qt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!ht.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[tt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):St(e,n,r)}}}function Id(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:bd(`error`,e),bd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Pd(e,t,o,s,n,null)}}a&&Pd(e,t,`srcSet`,n.srcSet,n,null),r&&Pd(e,t,`src`,n.src,n,null);return;case`input`:bd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Pd(e,t,r,d,n,null)}}Pt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in bd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Pd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&It(e,!!r,n,!0):It(e,!!r,t,!1);return;case`textarea`:for(s in bd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Pd(e,t,s,c,n,null)}Rt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Pd(e,t,l,r,n,null)}return;case`dialog`:bd(`beforetoggle`,e),bd(`toggle`,e),bd(`cancel`,e),bd(`close`,e);break;case`iframe`:case`object`:bd(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)bd(_d[r],e);break;case`image`:bd(`error`,e),bd(`load`,e);break;case`details`:bd(`toggle`,e);break;case`embed`:case`source`:case`link`:bd(`error`,e),bd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Pd(e,t,u,r,n,null)}return;default:if(Ut(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Fd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Pd(e,t,c,r,n,null))}function Ld(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Pd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Pd(e,t,p,m,r,f)}}Nt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Pd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Pd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?It(e,!!n,n?[]:``,!1):It(e,!!n,t,!0)):It(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Pd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Pd(e,t,s,a,r,o)}Lt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Pd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Pd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Pd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Pd(e,t,u,p,r,m)}return;default:if(Ut(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Fd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Fd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Pd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Pd(e,t,f,p,r,m)}function Rd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function zd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Rd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Rd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Bd=null,Vd=null;function Hd(e){return e.nodeType===9?e:e.ownerDocument}function Ud(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Wd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Gd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Kd=null;function qd(){var e=window.event;return e&&e.type===`popstate`?e===Kd?!1:(Kd=e,!0):(Kd=null,!1)}var Jd=typeof setTimeout==`function`?setTimeout:void 0,Yd=typeof clearTimeout==`function`?clearTimeout:void 0,Xd=typeof Promise==`function`?Promise:void 0,Zd=typeof queueMicrotask==`function`?queueMicrotask:Xd===void 0?Jd:function(e){return Xd.resolve(null).then(e).catch(Qd)};function Qd(e){setTimeout(function(){throw e})}function $d(e){return e===`head`}function ef(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Fp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)hf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,hf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[st]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&hf(e.ownerDocument.body);n=i}while(n);Fp(t)}function tf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function nf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:nf(n),ct(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[st])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=uf(e.nextSibling),e===null)break}return null}function af(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=uf(e.nextSibling),e===null))return null;return e}function of(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=uf(e.nextSibling),e===null))return null;return e}function sf(e){return e.data===`$?`||e.data===`$~`}function cf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function uf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var df=null;function ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return uf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function mf(e,t,n){switch(t=Hd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function hf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ct(e)}var gf=new Map,_f=new Set;function vf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yf=N.d;N.d={f:bf,r:xf,D:wf,C:Tf,L:Ef,m:Df,X:kf,S:Of,M:Af};function bf(){var e=yf.f(),t=yu();return e||t}function xf(e){var t=ut(e);t!==null&&t.tag===5&&t.type===`form`?xs(t):yf.r(e)}var Sf=typeof document>`u`?null:document;function Cf(e,t,n){var r=Sf;if(r&&typeof t==`string`&&t){var i=Mt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Id(t,`link`,e),pt(t),r.head.appendChild(t)))}}function wf(e){yf.D(e),Cf(`dns-prefetch`,e,null)}function Tf(e,t){yf.C(e,t),Cf(`preconnect`,e,t)}function Ef(e,t,n){yf.L(e,t,n);var r=Sf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Mt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Mt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Mt(n.imageSizes)+`"]`)):i+=`[href="`+Mt(e)+`"]`;var a=i;switch(t){case`style`:a=Mf(e);break;case`script`:a=If(e)}gf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),gf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Nf(a))||t===`script`&&r.querySelector(Lf(a))||(t=r.createElement(`link`),Id(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Df(e,t){yf.m(e,t);var n=Sf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Mt(r)+`"][href="`+Mt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=If(e)}if(!gf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),gf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Lf(a)))return}r=n.createElement(`link`),Id(r,`link`,e),pt(r),n.head.appendChild(r)}}}function Of(e,t,n){yf.S(e,t,n);var r=Sf;if(r&&e){var i=ft(r).hoistableStyles,a=Mf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Nf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=gf.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);pt(c),Id(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function kf(e,t){yf.X(e,t);var n=Sf;if(n&&e){var r=ft(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),pt(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t){yf.M(e,t);var n=Sf;if(n&&e){var r=ft(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),pt(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t,n,r){var a=(a=ae.current)?vf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Mf(n.href),n=ft(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Mf(n.href);var o=ft(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Nf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),gf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},gf.set(e,n),o||Ff(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=If(n),n=ft(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Mf(e){return`href="`+Mt(e)+`"`}function Nf(e){return`link[rel="stylesheet"][`+e+`]`}function Pf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Ff(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Id(t,`link`,n),pt(t),e.head.appendChild(t))}function If(e){return`[src="`+Mt(e)+`"]`}function Lf(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Mt(n.href)+`"]`);if(r)return t.instance=r,pt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),pt(r),Id(r,`style`,a),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Mf(n.href);var o=e.querySelector(Nf(a));if(o)return t.state.loading|=4,t.instance=o,pt(o),o;r=Pf(n),(a=gf.get(a))&&Bf(r,a),o=(e.ownerDocument||e).createElement(`link`),pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Id(o,`link`,r),t.state.loading|=4,zf(o,n.precedence,e),t.instance=o;case`script`:return o=If(n.src),(a=e.querySelector(Lf(o)))?(t.instance=a,pt(a),a):(r=n,(a=gf.get(o))&&(r=f({},n),Vf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),pt(a),Id(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,zf(r,n.precedence,e));return t.instance}function zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Hf=null;function Uf(e,t,n){if(Hf===null){var r=new Map,i=Hf=new Map;i.set(n,r)}else i=Hf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[st]||a[et]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Wf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Gf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Kf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function qf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Mf(r.href),a=t.querySelector(Nf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Xf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,pt(a);return}a=t.ownerDocument||t,r=Pf(r),(i=gf.get(i))&&Bf(r,i),a=a.createElement(`link`),pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Id(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Xf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Jf=0;function Yf(e,t){return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Jf===0&&(Jf=62500*zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Xf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zf=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zf=new Map,t.forEach($f,e),Zf=null,Xf.call(e))}function $f(e,t){if(!(t.state.loading&4)){var n=Zf.get(e);if(n)var r=n.get(null);else{n=new Map,Zf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Xf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ep={$$typeof:b,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function tp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ue(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ue(0),this.hiddenUpdates=Ue(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function np(e,t,n,r,i,a,o,s,c,l,u,d){return e=new tp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ni(3,null,null,t),e.current=a,a.stateNode=e,t=ta(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Pa(a),e}function rp(e){return e?(e=ei,e):ei}function ip(e,t,n,r,i,a){i=rp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ia(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=La(e,r,t),n!==null&&(mu(n,e,t),Ra(n,e,t))}function ap(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function op(e,t){ap(e,t),(e=e.alternate)&&ap(e,t)}function sp(e){if(e.tag===13||e.tag===31){var t=Zr(e,67108864);t!==null&&mu(t,e,67108864),op(e,67108864)}}function cp(e){if(e.tag===13||e.tag===31){var t=fu();t=Ye(t);var n=Zr(e,t);n!==null&&mu(n,e,t),op(e,t)}}var lp=!0;function up(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,fp(e,t,n,r)}finally{N.p=a,M.T=i}}function dp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,fp(e,t,n,r)}finally{N.p=a,M.T=i}}function fp(e,t,n,r){if(lp){var i=pp(r);if(i===null)Td(e,t,r,mp,n),Tp(e,r);else if(Dp(i,e,t,n,r))r.stopPropagation();else if(Tp(e,r),t&4&&-1<wp.indexOf(e)){for(;i!==null;){var a=ut(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Re(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-je(o);s.entanglements[1]|=c,o&=~c}rd(a),!(Nl&6)&&(eu=ye()+500,id(0,!1))}}break;case 31:case 13:s=Zr(a,2),s!==null&&mu(s,a,2),yu(),op(a,2)}if(a=pp(r),a===null&&Td(e,t,r,mp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Td(e,t,r,null,n)}}function pp(e){return e=Yt(e),hp(e)}var mp=null;function hp(e){if(mp=null,e=lt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return mp=e,null}function gp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(be()){case xe:return 2;case Se:return 8;case Ce:case we:return 32;case Te:return 268435456;default:return 32}default:return 32}}var _p=!1,vp=null,yp=null,bp=null,xp=new Map,Sp=new Map,Cp=[],wp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Tp(e,t){switch(e){case`focusin`:case`focusout`:vp=null;break;case`dragenter`:case`dragleave`:yp=null;break;case`mouseover`:case`mouseout`:bp=null;break;case`pointerover`:case`pointerout`:xp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Sp.delete(t.pointerId)}}function Ep(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ut(t),t!==null&&sp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Dp(e,t,n,r,i){switch(t){case`focusin`:return vp=Ep(vp,e,t,n,r,i),!0;case`dragenter`:return yp=Ep(yp,e,t,n,r,i),!0;case`mouseover`:return bp=Ep(bp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return xp.set(a,Ep(xp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Sp.set(a,Ep(Sp.get(a)||null,e,t,n,r,i)),!0}return!1}function Op(e){var t=lt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Qe(e.priority,function(){cp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Qe(e.priority,function(){cp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function kp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=pp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Jt=r,n.target.dispatchEvent(r),Jt=null}else return t=ut(n),t!==null&&sp(t),e.blockedOn=n,!1;t.shift()}return!0}function Ap(e,t,n){kp(e)&&n.delete(t)}function jp(){_p=!1,vp!==null&&kp(vp)&&(vp=null),yp!==null&&kp(yp)&&(yp=null),bp!==null&&kp(bp)&&(bp=null),xp.forEach(Ap),Sp.forEach(Ap)}function Mp(e,n){e.blockedOn===n&&(e.blockedOn=null,_p||(_p=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,jp)))}var Np=null;function Pp(e){Np!==e&&(Np=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Np===e&&(Np=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(hp(r||n)===null)continue;break}var a=ut(n);a!==null&&(e.splice(t,3),t-=3,ys(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Fp(e){function t(t){return Mp(t,e)}vp!==null&&Mp(vp,e),yp!==null&&Mp(yp,e),bp!==null&&Mp(bp,e),xp.forEach(t),Sp.forEach(t);for(var n=0;n<Cp.length;n++){var r=Cp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Cp.length&&(n=Cp[0],n.blockedOn===null);)Op(n),n.blockedOn===null&&Cp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[tt]||null;if(typeof a==`function`)o||Pp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[tt]||null)s=o.formAction;else if(hp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Pp(n)}}}function Ip(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Lp(e){this._internalRoot=e}Rp.prototype.render=Lp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ip(n,fu(),e,t,null,null)},Rp.prototype.unmount=Lp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ip(e.current,2,null,e,null,null),yu(),t[nt]=null}};function Rp(e){this._internalRoot=e}Rp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ze();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Cp.length&&t!==0&&t<Cp[n].priority;n++);Cp.splice(n,0,e),n===0&&Op(e)}};var Q=n.version;if(Q!==`19.2.6`)throw Error(i(527,Q,`19.2.6`));N.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var zp={bundleType:0,version:`19.2.6`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.2.6`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Bp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bp.isDisabled&&Bp.supportsFiber)try{Oe=Bp.inject(zp),ke=Bp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Hs,s=Us,c=Ws;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=np(e,1,!1,null,null,n,r,null,o,s,c,Ip),e[nt]=t.current,Cd(e),new Lp(t)}})),ge=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=he()})),W=t(ue()),_e=t(ge(),1),ve=()=>{let e=new Map,t=new Map;return{get nodes(){return Array.from(e.values())},get relationships(){return Array.from(t.values())},get nodeCount(){return e.size},get relationshipCount(){return t.size},addNode:t=>{e.has(t.id)||e.set(t.id,t)},addRelationship:e=>{t.has(e.id)||t.set(e.id,e)}}},ye=3e3,be=typeof window<`u`&&window.__GITNEXUS_CONFIG__?.backendUrl||`http://localhost:4747`,xe=`http://localhost:11434`,Se=`https://openrouter.ai/api/v1`,Ce=`22.0.0`,we={activeProvider:`gemini`,intelligentClustering:!1,hasSeenClusteringPrompt:!1,useSameModelForClustering:!0,openai:{apiKey:``,model:`gpt-4o`,temperature:.1},gemini:{apiKey:``,model:`gemini-2.0-flash`,temperature:.1},azureOpenAI:{apiKey:``,endpoint:``,deploymentName:``,model:`gpt-4o`,apiVersion:`2024-08-01-preview`,temperature:.1},anthropic:{apiKey:``,model:`claude-sonnet-4-20250514`,temperature:.1},ollama:{baseUrl:xe,model:`llama3.2`,temperature:.1},openrouter:{apiKey:``,model:``,baseUrl:Se,temperature:.1},minimax:{apiKey:``,model:`MiniMax-M2.5`,temperature:.1},glm:{apiKey:``,model:`GLM-5`,baseUrl:`https://api.z.ai/api/coding/paas/v4`,temperature:.1},deepseek:{apiKey:``,model:`deepseek-v4-flash`,temperature:.1}},Te=`File.Folder.Function.Class.Interface.Method.CodeElement.Community.Process.Section.Struct.Enum.Macro.Typedef.Union.Namespace.Trait.Impl.TypeAlias.Const.Static.Variable.Property.Record.Delegate.Annotation.Constructor.Template.Module.Route.Tool`.split(`.`),Ee=[`CONTAINS`,`DEFINES`,`IMPORTS`,`CALLS`,`EXTENDS`,`IMPLEMENTS`,`HAS_METHOD`,`HAS_PROPERTY`,`ACCESSES`,`METHOD_OVERRIDES`,`OVERRIDES`,`METHOD_IMPLEMENTS`,`MEMBER_OF`,`STEP_IN_PROCESS`,`HANDLES_ROUTE`,`FETCHES`,`HANDLES_TOOL`,`ENTRY_POINT_OF`,`WRAPS`,`QUERIES`],De=function(e){return e.JavaScript=`javascript`,e.TypeScript=`typescript`,e.Python=`python`,e.Java=`java`,e.C=`c`,e.CPlusPlus=`cpp`,e.CSharp=`csharp`,e.Go=`go`,e.Ruby=`ruby`,e.Rust=`rust`,e.PHP=`php`,e.Kotlin=`kotlin`,e.Swift=`swift`,e.Dart=`dart`,e.Vue=`vue`,e.Cobol=`cobol`,e}({}),Oe=new Set([`Rakefile`,`Gemfile`,`Guardfile`,`Vagrantfile`,`Brewfile`]),ke={[De.JavaScript]:[`.js`,`.jsx`,`.mjs`,`.cjs`],[De.TypeScript]:[`.ts`,`.tsx`,`.mts`,`.cts`],[De.Python]:[`.py`],[De.Java]:[`.java`],[De.C]:[`.c`],[De.CPlusPlus]:[`.cpp`,`.cc`,`.cxx`,`.h`,`.hpp`,`.hxx`,`.hh`],[De.CSharp]:[`.cs`],[De.Go]:[`.go`],[De.Ruby]:[`.rb`,`.rake`,`.gemspec`],[De.Rust]:[`.rs`],[De.PHP]:[`.php`,`.phtml`,`.php3`,`.php4`,`.php5`,`.php8`],[De.Kotlin]:[`.kt`,`.kts`],[De.Swift]:[`.swift`],[De.Dart]:[`.dart`],[De.Vue]:[`.vue`],[De.Cobol]:[`.cbl`,`.cob`,`.cpy`,`.cobol`]},Ae=new Map;for(let[e,t]of Object.entries(ke))for(let n of t)Ae.set(n,e);var je=e=>e.replace(/\\/g,`/`).toLowerCase().endsWith(`.blade.php`),Me=e=>{if(je(e))return null;let t=e.lastIndexOf(`.`);if(t>=0){let n=e.slice(t).toLowerCase(),r=Ae.get(n);if(r!==void 0)return r}let n=e.split(`/`).pop()||e;return Oe.has(n)?De.Ruby:null},Ne={[De.JavaScript]:`javascript`,[De.TypeScript]:`typescript`,[De.Python]:`python`,[De.Java]:`java`,[De.C]:`c`,[De.CPlusPlus]:`cpp`,[De.CSharp]:`csharp`,[De.Go]:`go`,[De.Ruby]:`ruby`,[De.Rust]:`rust`,[De.PHP]:`php`,[De.Kotlin]:`kotlin`,[De.Swift]:`swift`,[De.Dart]:`dart`,[De.Vue]:`typescript`,[De.Cobol]:`cobol`},Pe={json:`json`,yaml:`yaml`,yml:`yaml`,md:`markdown`,mdx:`markdown`,html:`markup`,htm:`markup`,erb:`markup`,xml:`markup`,css:`css`,scss:`css`,sass:`css`,sh:`bash`,bash:`bash`,zsh:`bash`,sql:`sql`,toml:`toml`,ini:`ini`,dockerfile:`docker`},Fe={Makefile:`makefile`,Dockerfile:`docker`},Ie=e=>{if(je(e))return`markup`;let t=Me(e);if(t)return Ne[t];let n=e.split(`.`).pop()?.toLowerCase();if(n&&n in Pe)return Pe[n];let r=e.split(`/`).pop()||``;return r in Fe?Fe[r]:`text`};De.JavaScript,De.TypeScript,De.Python,De.Java,De.C,De.CPlusPlus,De.CSharp,De.Go,De.Ruby,De.Rust,De.PHP,De.Kotlin,De.Swift,De.Dart,De.Vue,De.Cobol,Object.freeze([]),Object.freeze([]),Object.freeze({scopeDepth:0,mroDepth:0,origin:`local`}),Object.freeze([]),Object.freeze([`self`,`this`]),Object.freeze([]),Object.freeze([`Class`,`Interface`,`Enum`,`Struct`,`Union`,`Trait`,`TypeAlias`,`Typedef`,`Record`,`Delegate`,`Annotation`,`Template`,`Namespace`]),Object.freeze([`Method`,`Function`,`Constructor`]),Object.freeze([`Variable`,`Property`,`Const`,`Static`]),Object.freeze([]);function Le(e,t,n,r,i){if(r!==void 0)return Math.min(Math.max(0,r),n);let a=t*2**e,o=Math.min(n,a);return Math.floor(i()*o)}var Re=class extends Error{name=`CircuitOpenError`;retryAfterMs;constructor(e,t){super(t?`Circuit '${t}' is open; retry in ${Math.ceil(e/1e3)}s`:`Circuit is open; retry in ${Math.ceil(e/1e3)}s`),this.retryAfterMs=e}},ze=class{failureThreshold;cooldownMs;halfOpenRetryAfterMs;key;now;state=`closed`;consecutiveFailures=0;openedAt=null;probeInFlight=!1;constructor(e={}){this.failureThreshold=e.failureThreshold??3,this.cooldownMs=e.cooldownMs??3e4,this.halfOpenRetryAfterMs=e.halfOpenRetryAfterMs??1e3,this.key=e.key,this.now=e.now??(()=>Date.now())}check(){if(this.state===`open`&&this.openedAt!==null){let e=this.now()-this.openedAt;if(e<this.cooldownMs)throw new Re(this.cooldownMs-e,this.key);this.state=`half-open`}if(this.state===`half-open`){if(this.probeInFlight)throw new Re(this.halfOpenRetryAfterMs,this.key);this.probeInFlight=!0}}recordSuccess(){this.probeInFlight=!1,this.consecutiveFailures=0,this.state=`closed`,this.openedAt=null}recordFailure(){this.probeInFlight=!1,this.consecutiveFailures+=1,(this.state===`half-open`||this.consecutiveFailures>=this.failureThreshold)&&(this.state=`open`,this.openedAt=this.now())}recordNeutral(){this.probeInFlight=!1}getState(){return this.state===`open`&&this.openedAt!==null&&this.now()-this.openedAt>=this.cooldownMs?`half-open`:this.state}getConsecutiveFailures(){return this.consecutiveFailures}isProbeInFlight(){return this.probeInFlight}getOpenedAt(){return this.openedAt}getCooldownMs(){return this.cooldownMs}},Be=new Map;function Ve(e,t){let n=Be.get(e);return n||(n=new ze({...t,key:e}),Be.set(e,n)),n}var He=3e4,Ue={maxAttempts:3,baseDelayMs:500,capDelayMs:5e3};function We(e,t=Date.now){if(!e)return null;let n=e.trim();if(n===``)return null;if(/^[0-9]+$/.test(n)){let e=parseInt(n,10);return Number.isNaN(e)||e<0?null:e*1e3}let r=Date.parse(n);if(Number.isNaN(r))return null;let i=r-t();return i>=0?i:0}function Ge(e,t){if(e.kind===`error`)return e.err instanceof DOMException&&(e.err.name===`TimeoutError`||e.err.name===`AbortError`)?{kind:`terminal-network`,err:e.err}:{kind:`retryable-network`,err:e.err};let n=e.resp;if(n.status>=200&&n.status<400)return{kind:`success`,resp:n};if(n.status===429){let e=We(typeof n.headers?.get==`function`?n.headers.get(`Retry-After`):null,t);return{kind:`retryable-status`,resp:n,afterMs:e===null?void 0:Math.min(e,He)}}return n.status>=500?{kind:`retryable-status`,resp:n,afterMs:void 0}:{kind:`terminal-client`,resp:n}}var Ke=e=>new Promise(t=>setTimeout(t,e));function qe(e){try{let t=typeof e==`string`?new URL(e):e;return`${t.host}${t.pathname}`}catch{return String(e)}}var Je=class extends Error{name=`ResilientFetchExhaustedError`;constructor(e){super(`Request failed after retries (HTTP ${e.status})`),this.response=e}};async function Ye(e,t,n={}){let r=n.fetchImpl??globalThis.fetch,i=n.now??(()=>Date.now()),a=n.breaker??Ve(n.breakerKey??qe(e),n.breakerOptions),o={maxAttempts:n.retry?.maxAttempts??Ue.maxAttempts,baseDelayMs:n.retry?.baseDelayMs??Ue.baseDelayMs,capDelayMs:n.retry?.capDelayMs??Ue.capDelayMs},s=n.retry?.sleep??Ke,c=n.retry?.random??Math.random;a.check();for(let n=0;n<o.maxAttempts;n++){let l;try{l={kind:`response`,resp:await r(e,t)}}catch(e){l={kind:`error`,err:e}}let u=Ge(l,i);switch(u.kind){case`success`:return a.recordSuccess(),u.resp;case`terminal-client`:return a.recordNeutral(),u.resp;case`terminal-network`:throw a.recordNeutral(),u.err;case`retryable-status`:if(n+1>=o.maxAttempts)throw a.recordFailure(),new Je(u.resp);await s(Le(n,o.baseDelayMs,o.capDelayMs,u.afterMs,c));break;case`retryable-network`:if(n+1>=o.maxAttempts)throw a.recordFailure(),u.err;await s(Le(n,o.baseDelayMs,o.capDelayMs,void 0,c));break;default:throw Error(`resilientFetch: unhandled outcome ${JSON.stringify(u)}`)}}throw Error(`resilientFetch: retry loop terminated unexpectedly`)}var Xe=`gitnexus-llm-settings`,Ze=e=>({...we,...e,openai:{...we.openai,...e?.openai},azureOpenAI:{...we.azureOpenAI,...e?.azureOpenAI},gemini:{...we.gemini,...e?.gemini},anthropic:{...we.anthropic,...e?.anthropic},ollama:{...we.ollama,...e?.ollama},openrouter:{...we.openrouter,...e?.openrouter},minimax:{...we.minimax,...e?.minimax},glm:{...we.glm,...e?.glm},deepseek:{...we.deepseek,...e?.deepseek}}),Qe=e=>{let t=e.getItem(Xe);if(!t)return null;try{return JSON.parse(t)}catch(e){return console.warn(`Failed to parse LLM settings:`,e),null}},$e=(e,t)=>{e.setItem(Xe,JSON.stringify(t))},et=()=>{try{let e=typeof sessionStorage<`u`?Qe(sessionStorage):null;if(e)return Ze(e);let t=typeof localStorage<`u`?Qe(localStorage):null;if(t){let e=Ze(t);try{typeof sessionStorage<`u`&&$e(sessionStorage,e),typeof localStorage<`u`&&localStorage.removeItem(Xe)}catch(e){console.warn(`Failed to migrate legacy LLM settings to sessionStorage:`,e)}return e}return we}catch(e){return console.warn(`Failed to load LLM settings:`,e),we}},tt=e=>{try{typeof sessionStorage<`u`&&$e(sessionStorage,e)}catch(e){console.error(`Failed to save LLM settings:`,e)}},nt={openai:e=>e.openai?.apiKey?{provider:`openai`,...e.openai}:null,"azure-openai":e=>!e.azureOpenAI?.apiKey||!e.azureOpenAI?.endpoint?null:{provider:`azure-openai`,...e.azureOpenAI},gemini:e=>e.gemini?.apiKey?{provider:`gemini`,...e.gemini}:null,anthropic:e=>e.anthropic?.apiKey?{provider:`anthropic`,...e.anthropic}:null,ollama:e=>({provider:`ollama`,...e.ollama,baseUrl:e.ollama?.baseUrl??`http://localhost:11434`}),openrouter:e=>!e.openrouter?.apiKey||e.openrouter.apiKey.trim()===``?null:{provider:`openrouter`,apiKey:e.openrouter.apiKey,model:e.openrouter.model||``,baseUrl:e.openrouter.baseUrl||`https://openrouter.ai/api/v1`,temperature:e.openrouter.temperature,maxTokens:e.openrouter.maxTokens},minimax:e=>e.minimax?.apiKey?{provider:`minimax`,...e.minimax}:null,glm:e=>e.glm?.apiKey?{provider:`glm`,apiKey:e.glm.apiKey,model:e.glm.model||`GLM-5`,baseUrl:e.glm.baseUrl||`https://api.z.ai/api/coding/paas/v4`,temperature:e.glm.temperature,maxTokens:e.glm.maxTokens}:null,deepseek:e=>e.deepseek?.apiKey?{provider:`deepseek`,...e.deepseek}:null},rt=()=>{let e=et(),t=nt[e.activeProvider];return t?t(e):null},it=()=>rt()!==null,at={preserveAssistantTranscript:!1},ot={deepseek:{preserveAssistantTranscript:!0}},st=e=>({...at,...ot[e]}),ct=e=>{switch(e){case`openai`:return`OpenAI`;case`azure-openai`:return`Azure OpenAI`;case`gemini`:return`Google Gemini`;case`anthropic`:return`Anthropic`;case`ollama`:return`Ollama (Local)`;case`openrouter`:return`OpenRouter`;case`minimax`:return`MiniMax`;case`glm`:return`GLM (Z.AI)`;case`deepseek`:return`DeepSeek`;default:return e}},lt=e=>{switch(e){case`openai`:return[`gpt-4.5-preview`,`gpt-4o`,`gpt-4o-mini`,`gpt-4-turbo`,`gpt-4`,`gpt-3.5-turbo`];case`azure-openai`:return[`gpt-4o`,`gpt-4o-mini`,`gpt-4-turbo`,`gpt-4`,`gpt-35-turbo`];case`gemini`:return[`gemini-2.0-flash`,`gemini-1.5-pro`,`gemini-1.5-flash`,`gemini-1.0-pro`];case`anthropic`:return[`claude-sonnet-4-20250514`,`claude-3-5-sonnet-20241022`,`claude-3-5-haiku-20241022`,`claude-3-opus-20240229`];case`ollama`:return[`llama3.2`,`llama3.1`,`mistral`,`codellama`,`deepseek-coder`];case`minimax`:return[`MiniMax-M2.5`,`MiniMax-M2.5-highspeed`];case`glm`:return[`GLM-5`,`GLM-5-Turbo`,`GLM-4.7`,`GLM-4.5`];case`deepseek`:return[`deepseek-v4-flash`,`deepseek-v4-pro`,`deepseek-chat`,`deepseek-reasoner`];default:return[]}},ut=async()=>{try{let e=await Ye(`${Se}/models`,void 0,{breakerKey:`openrouter-models`,retry:{maxAttempts:2,baseDelayMs:500,capDelayMs:2e3}});if(!e.ok)throw Error(`Failed to fetch models`);return(await e.json()).data.map(e=>({id:e.id,name:e.name||e.id}))}catch(e){return console.error(`Error fetching OpenRouter models:`,e),[]}},dt=class extends Error{constructor(e,t,n,r){super(e),this.status=t,this.code=n,this.retryAfterMs=r,this.name=`BackendError`}};function ft(e,t){let n=new AbortController,r=1e3,i=``,a=o=>{n.signal.aborted||(async()=>{try{let s={};i&&(s[`Last-Event-ID`]=i);let c=await fetch(e,{signal:n.signal,headers:s});if(!c.ok){t.onError?.(`Server returned ${c.status}`);return}let l=c.body?.getReader();if(!l){t.onError?.(`No response body`);return}o=0;let u=new TextDecoder,d=``;for(;;){let{done:e,value:n}=await l.read();if(e)break;d+=u.decode(n,{stream:!0});let r=d.split(`
10
+ `).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Pd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&zt(e,``+r);break;case`className`:Ct(e,`class`,r);break;case`tabIndex`:Ct(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ct(e,n,r);break;case`style`:Ht(e,r,o);break;case`data`:if(t!==`object`){Ct(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Pd(e,t,`name`,a.name,a,null),Pd(e,t,`formEncType`,a.formEncType,a,null),Pd(e,t,`formMethod`,a.formMethod,a,null),Pd(e,t,`formTarget`,a.formTarget,a,null)):(Pd(e,t,`encType`,a.encType,a,null),Pd(e,t,`method`,a.method,a,null),Pd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=qt);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Kt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:bd(`beforetoggle`,e),bd(`toggle`,e),St(e,`popover`,r);break;case`xlinkActuate`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:St(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Wt.get(n)||n,St(e,n,r))}}function Fd(e,t,n,r,a,o){switch(n){case`style`:Ht(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&zt(e,``+r);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=qt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!ht.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[tt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):St(e,n,r)}}}function Id(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:bd(`error`,e),bd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Pd(e,t,o,s,n,null)}}a&&Pd(e,t,`srcSet`,n.srcSet,n,null),r&&Pd(e,t,`src`,n.src,n,null);return;case`input`:bd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Pd(e,t,r,d,n,null)}}Pt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in bd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Pd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&It(e,!!r,n,!0):It(e,!!r,t,!1);return;case`textarea`:for(s in bd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Pd(e,t,s,c,n,null)}Rt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Pd(e,t,l,r,n,null)}return;case`dialog`:bd(`beforetoggle`,e),bd(`toggle`,e),bd(`cancel`,e),bd(`close`,e);break;case`iframe`:case`object`:bd(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)bd(_d[r],e);break;case`image`:bd(`error`,e),bd(`load`,e);break;case`details`:bd(`toggle`,e);break;case`embed`:case`source`:case`link`:bd(`error`,e),bd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Pd(e,t,u,r,n,null)}return;default:if(Ut(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Fd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Pd(e,t,c,r,n,null))}function Ld(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Pd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Pd(e,t,p,m,r,f)}}Nt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Pd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Pd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?It(e,!!n,n?[]:``,!1):It(e,!!n,t,!0)):It(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Pd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Pd(e,t,s,a,r,o)}Lt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Pd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Pd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Pd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Pd(e,t,u,p,r,m)}return;default:if(Ut(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Fd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Fd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Pd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Pd(e,t,f,p,r,m)}function Rd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function zd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Rd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Rd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Bd=null,Vd=null;function Hd(e){return e.nodeType===9?e:e.ownerDocument}function Ud(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Wd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Gd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Kd=null;function qd(){var e=window.event;return e&&e.type===`popstate`?e===Kd?!1:(Kd=e,!0):(Kd=null,!1)}var Jd=typeof setTimeout==`function`?setTimeout:void 0,Yd=typeof clearTimeout==`function`?clearTimeout:void 0,Xd=typeof Promise==`function`?Promise:void 0,Zd=typeof queueMicrotask==`function`?queueMicrotask:Xd===void 0?Jd:function(e){return Xd.resolve(null).then(e).catch(Qd)};function Qd(e){setTimeout(function(){throw e})}function $d(e){return e===`head`}function ef(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Fp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)hf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,hf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[st]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&hf(e.ownerDocument.body);n=i}while(n);Fp(t)}function tf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function nf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:nf(n),ct(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[st])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=uf(e.nextSibling),e===null)break}return null}function af(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=uf(e.nextSibling),e===null))return null;return e}function of(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=uf(e.nextSibling),e===null))return null;return e}function sf(e){return e.data===`$?`||e.data===`$~`}function cf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function uf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var df=null;function ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return uf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function mf(e,t,n){switch(t=Hd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function hf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ct(e)}var gf=new Map,_f=new Set;function vf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yf=N.d;N.d={f:bf,r:xf,D:wf,C:Tf,L:Ef,m:Df,X:kf,S:Of,M:Af};function bf(){var e=yf.f(),t=yu();return e||t}function xf(e){var t=ut(e);t!==null&&t.tag===5&&t.type===`form`?xs(t):yf.r(e)}var Sf=typeof document>`u`?null:document;function Cf(e,t,n){var r=Sf;if(r&&typeof t==`string`&&t){var i=Mt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Id(t,`link`,e),pt(t),r.head.appendChild(t)))}}function wf(e){yf.D(e),Cf(`dns-prefetch`,e,null)}function Tf(e,t){yf.C(e,t),Cf(`preconnect`,e,t)}function Ef(e,t,n){yf.L(e,t,n);var r=Sf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Mt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Mt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Mt(n.imageSizes)+`"]`)):i+=`[href="`+Mt(e)+`"]`;var a=i;switch(t){case`style`:a=Mf(e);break;case`script`:a=If(e)}gf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),gf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Nf(a))||t===`script`&&r.querySelector(Lf(a))||(t=r.createElement(`link`),Id(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Df(e,t){yf.m(e,t);var n=Sf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Mt(r)+`"][href="`+Mt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=If(e)}if(!gf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),gf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Lf(a)))return}r=n.createElement(`link`),Id(r,`link`,e),pt(r),n.head.appendChild(r)}}}function Of(e,t,n){yf.S(e,t,n);var r=Sf;if(r&&e){var i=ft(r).hoistableStyles,a=Mf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Nf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=gf.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);pt(c),Id(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function kf(e,t){yf.X(e,t);var n=Sf;if(n&&e){var r=ft(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),pt(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t){yf.M(e,t);var n=Sf;if(n&&e){var r=ft(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),pt(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t,n,r){var a=(a=ae.current)?vf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Mf(n.href),n=ft(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Mf(n.href);var o=ft(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Nf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),gf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},gf.set(e,n),o||Ff(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=If(n),n=ft(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Mf(e){return`href="`+Mt(e)+`"`}function Nf(e){return`link[rel="stylesheet"][`+e+`]`}function Pf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Ff(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Id(t,`link`,n),pt(t),e.head.appendChild(t))}function If(e){return`[src="`+Mt(e)+`"]`}function Lf(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Mt(n.href)+`"]`);if(r)return t.instance=r,pt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),pt(r),Id(r,`style`,a),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Mf(n.href);var o=e.querySelector(Nf(a));if(o)return t.state.loading|=4,t.instance=o,pt(o),o;r=Pf(n),(a=gf.get(a))&&Bf(r,a),o=(e.ownerDocument||e).createElement(`link`),pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Id(o,`link`,r),t.state.loading|=4,zf(o,n.precedence,e),t.instance=o;case`script`:return o=If(n.src),(a=e.querySelector(Lf(o)))?(t.instance=a,pt(a),a):(r=n,(a=gf.get(o))&&(r=f({},n),Vf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),pt(a),Id(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,zf(r,n.precedence,e));return t.instance}function zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Hf=null;function Uf(e,t,n){if(Hf===null){var r=new Map,i=Hf=new Map;i.set(n,r)}else i=Hf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[st]||a[et]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Wf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Gf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Kf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function qf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Mf(r.href),a=t.querySelector(Nf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Xf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,pt(a);return}a=t.ownerDocument||t,r=Pf(r),(i=gf.get(i))&&Bf(r,i),a=a.createElement(`link`),pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Id(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Xf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Jf=0;function Yf(e,t){return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Jf===0&&(Jf=62500*zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Xf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zf=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zf=new Map,t.forEach($f,e),Zf=null,Xf.call(e))}function $f(e,t){if(!(t.state.loading&4)){var n=Zf.get(e);if(n)var r=n.get(null);else{n=new Map,Zf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Xf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ep={$$typeof:b,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function tp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ue(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ue(0),this.hiddenUpdates=Ue(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function np(e,t,n,r,i,a,o,s,c,l,u,d){return e=new tp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ni(3,null,null,t),e.current=a,a.stateNode=e,t=ta(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Pa(a),e}function rp(e){return e?(e=ei,e):ei}function ip(e,t,n,r,i,a){i=rp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ia(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=La(e,r,t),n!==null&&(mu(n,e,t),Ra(n,e,t))}function ap(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function op(e,t){ap(e,t),(e=e.alternate)&&ap(e,t)}function sp(e){if(e.tag===13||e.tag===31){var t=Zr(e,67108864);t!==null&&mu(t,e,67108864),op(e,67108864)}}function cp(e){if(e.tag===13||e.tag===31){var t=fu();t=Ye(t);var n=Zr(e,t);n!==null&&mu(n,e,t),op(e,t)}}var lp=!0;function up(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,fp(e,t,n,r)}finally{N.p=a,M.T=i}}function dp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,fp(e,t,n,r)}finally{N.p=a,M.T=i}}function fp(e,t,n,r){if(lp){var i=pp(r);if(i===null)Td(e,t,r,mp,n),Tp(e,r);else if(Dp(i,e,t,n,r))r.stopPropagation();else if(Tp(e,r),t&4&&-1<wp.indexOf(e)){for(;i!==null;){var a=ut(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Re(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-je(o);s.entanglements[1]|=c,o&=~c}rd(a),!(Nl&6)&&(eu=ye()+500,id(0,!1))}}break;case 31:case 13:s=Zr(a,2),s!==null&&mu(s,a,2),yu(),op(a,2)}if(a=pp(r),a===null&&Td(e,t,r,mp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Td(e,t,r,null,n)}}function pp(e){return e=Yt(e),hp(e)}var mp=null;function hp(e){if(mp=null,e=lt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return mp=e,null}function gp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(be()){case xe:return 2;case Se:return 8;case Ce:case we:return 32;case Te:return 268435456;default:return 32}default:return 32}}var _p=!1,vp=null,yp=null,bp=null,xp=new Map,Sp=new Map,Cp=[],wp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Tp(e,t){switch(e){case`focusin`:case`focusout`:vp=null;break;case`dragenter`:case`dragleave`:yp=null;break;case`mouseover`:case`mouseout`:bp=null;break;case`pointerover`:case`pointerout`:xp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Sp.delete(t.pointerId)}}function Ep(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ut(t),t!==null&&sp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Dp(e,t,n,r,i){switch(t){case`focusin`:return vp=Ep(vp,e,t,n,r,i),!0;case`dragenter`:return yp=Ep(yp,e,t,n,r,i),!0;case`mouseover`:return bp=Ep(bp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return xp.set(a,Ep(xp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Sp.set(a,Ep(Sp.get(a)||null,e,t,n,r,i)),!0}return!1}function Op(e){var t=lt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Qe(e.priority,function(){cp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Qe(e.priority,function(){cp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function kp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=pp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Jt=r,n.target.dispatchEvent(r),Jt=null}else return t=ut(n),t!==null&&sp(t),e.blockedOn=n,!1;t.shift()}return!0}function Ap(e,t,n){kp(e)&&n.delete(t)}function jp(){_p=!1,vp!==null&&kp(vp)&&(vp=null),yp!==null&&kp(yp)&&(yp=null),bp!==null&&kp(bp)&&(bp=null),xp.forEach(Ap),Sp.forEach(Ap)}function Mp(e,n){e.blockedOn===n&&(e.blockedOn=null,_p||(_p=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,jp)))}var Np=null;function Pp(e){Np!==e&&(Np=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Np===e&&(Np=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(hp(r||n)===null)continue;break}var a=ut(n);a!==null&&(e.splice(t,3),t-=3,ys(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Fp(e){function t(t){return Mp(t,e)}vp!==null&&Mp(vp,e),yp!==null&&Mp(yp,e),bp!==null&&Mp(bp,e),xp.forEach(t),Sp.forEach(t);for(var n=0;n<Cp.length;n++){var r=Cp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Cp.length&&(n=Cp[0],n.blockedOn===null);)Op(n),n.blockedOn===null&&Cp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[tt]||null;if(typeof a==`function`)o||Pp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[tt]||null)s=o.formAction;else if(hp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Pp(n)}}}function Ip(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Lp(e){this._internalRoot=e}Rp.prototype.render=Lp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ip(n,fu(),e,t,null,null)},Rp.prototype.unmount=Lp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ip(e.current,2,null,e,null,null),yu(),t[nt]=null}};function Rp(e){this._internalRoot=e}Rp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ze();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Cp.length&&t!==0&&t<Cp[n].priority;n++);Cp.splice(n,0,e),n===0&&Op(e)}};var Q=n.version;if(Q!==`19.2.6`)throw Error(i(527,Q,`19.2.6`));N.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var zp={bundleType:0,version:`19.2.6`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.2.6`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Bp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bp.isDisabled&&Bp.supportsFiber)try{Oe=Bp.inject(zp),ke=Bp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Hs,s=Us,c=Ws;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=np(e,1,!1,null,null,n,r,null,o,s,c,Ip),e[nt]=t.current,Cd(e),new Lp(t)}})),ge=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=he()})),W=t(ue()),_e=t(ge(),1),ve=()=>{let e=new Map,t=new Map;return{get nodes(){return Array.from(e.values())},get relationships(){return Array.from(t.values())},get nodeCount(){return e.size},get relationshipCount(){return t.size},addNode:t=>{e.has(t.id)||e.set(t.id,t)},addRelationship:e=>{t.has(e.id)||t.set(e.id,e)}}},ye=3e3,be=typeof window<`u`&&window.__GITNEXUS_CONFIG__?.backendUrl||`http://localhost:4747`,xe=`http://localhost:11434`,Se=`https://openrouter.ai/api/v1`,Ce=`22.0.0`,we={activeProvider:`gemini`,intelligentClustering:!1,hasSeenClusteringPrompt:!1,useSameModelForClustering:!0,openai:{apiKey:``,model:`gpt-4o`,temperature:.1},gemini:{apiKey:``,model:`gemini-2.0-flash`,temperature:.1},azureOpenAI:{apiKey:``,endpoint:``,deploymentName:``,model:`gpt-4o`,apiVersion:`2024-08-01-preview`,temperature:.1},anthropic:{apiKey:``,model:`claude-sonnet-4-20250514`,temperature:.1},ollama:{baseUrl:xe,model:`llama3.2`,temperature:.1},openrouter:{apiKey:``,model:``,baseUrl:Se,temperature:.1},minimax:{apiKey:``,model:`MiniMax-M2.5`,temperature:.1},glm:{apiKey:``,model:`GLM-5`,baseUrl:`https://api.z.ai/api/coding/paas/v4`,temperature:.1},deepseek:{apiKey:``,model:`deepseek-v4-flash`,temperature:.1}},Te=`File.Folder.Function.Class.Interface.Method.CodeElement.Community.Process.Section.Struct.Enum.Macro.Typedef.Union.Namespace.Trait.Impl.TypeAlias.Const.Static.Variable.Property.Record.Delegate.Annotation.Constructor.Template.Module.Route.Tool`.split(`.`),Ee=[`CONTAINS`,`DEFINES`,`IMPORTS`,`CALLS`,`EXTENDS`,`IMPLEMENTS`,`HAS_METHOD`,`HAS_PROPERTY`,`ACCESSES`,`METHOD_OVERRIDES`,`OVERRIDES`,`METHOD_IMPLEMENTS`,`MEMBER_OF`,`STEP_IN_PROCESS`,`HANDLES_ROUTE`,`FETCHES`,`HANDLES_TOOL`,`ENTRY_POINT_OF`,`WRAPS`,`QUERIES`],De=function(e){return e.JavaScript=`javascript`,e.TypeScript=`typescript`,e.Python=`python`,e.Java=`java`,e.C=`c`,e.CPlusPlus=`cpp`,e.CSharp=`csharp`,e.Go=`go`,e.Ruby=`ruby`,e.Rust=`rust`,e.PHP=`php`,e.Kotlin=`kotlin`,e.Swift=`swift`,e.Dart=`dart`,e.Vue=`vue`,e.Cobol=`cobol`,e}({}),Oe=new Set([`Rakefile`,`Gemfile`,`Guardfile`,`Vagrantfile`,`Brewfile`]),ke={[De.JavaScript]:[`.js`,`.jsx`,`.mjs`,`.cjs`],[De.TypeScript]:[`.ts`,`.tsx`,`.mts`,`.cts`],[De.Python]:[`.py`],[De.Java]:[`.java`],[De.C]:[`.c`],[De.CPlusPlus]:[`.cpp`,`.cc`,`.cxx`,`.h`,`.hpp`,`.hxx`,`.hh`],[De.CSharp]:[`.cs`],[De.Go]:[`.go`],[De.Ruby]:[`.rb`,`.rake`,`.gemspec`],[De.Rust]:[`.rs`],[De.PHP]:[`.php`,`.phtml`,`.php3`,`.php4`,`.php5`,`.php8`],[De.Kotlin]:[`.kt`,`.kts`],[De.Swift]:[`.swift`],[De.Dart]:[`.dart`],[De.Vue]:[`.vue`],[De.Cobol]:[`.cbl`,`.cob`,`.cpy`,`.cobol`]},Ae=new Map;for(let[e,t]of Object.entries(ke))for(let n of t)Ae.set(n,e);var je=e=>e.replace(/\\/g,`/`).toLowerCase().endsWith(`.blade.php`),Me=e=>{if(je(e))return null;let t=e.lastIndexOf(`.`);if(t>=0){let n=e.slice(t).toLowerCase(),r=Ae.get(n);if(r!==void 0)return r}let n=e.split(`/`).pop()||e;return Oe.has(n)?De.Ruby:null},Ne={[De.JavaScript]:`javascript`,[De.TypeScript]:`typescript`,[De.Python]:`python`,[De.Java]:`java`,[De.C]:`c`,[De.CPlusPlus]:`cpp`,[De.CSharp]:`csharp`,[De.Go]:`go`,[De.Ruby]:`ruby`,[De.Rust]:`rust`,[De.PHP]:`php`,[De.Kotlin]:`kotlin`,[De.Swift]:`swift`,[De.Dart]:`dart`,[De.Vue]:`typescript`,[De.Cobol]:`cobol`},Pe={json:`json`,yaml:`yaml`,yml:`yaml`,md:`markdown`,mdx:`markdown`,html:`markup`,htm:`markup`,erb:`markup`,xml:`markup`,css:`css`,scss:`css`,sass:`css`,sh:`bash`,bash:`bash`,zsh:`bash`,sql:`sql`,toml:`toml`,ini:`ini`,dockerfile:`docker`},Fe={Makefile:`makefile`,Dockerfile:`docker`},Ie=e=>{if(je(e))return`markup`;let t=Me(e);if(t)return Ne[t];let n=e.split(`.`).pop()?.toLowerCase();if(n&&n in Pe)return Pe[n];let r=e.split(`/`).pop()||``;return r in Fe?Fe[r]:`text`};De.JavaScript,De.TypeScript,De.Python,De.Java,De.C,De.CPlusPlus,De.CSharp,De.Go,De.Ruby,De.Rust,De.PHP,De.Kotlin,De.Swift,De.Dart,De.Vue,De.Cobol,Object.freeze([]),Object.freeze([]),Object.freeze({scopeDepth:0,mroDepth:0,origin:`local`}),Object.freeze([]),Object.freeze([`self`,`this`]),Object.freeze([]),Object.freeze([`Class`,`Interface`,`Enum`,`Struct`,`Union`,`Trait`,`TypeAlias`,`Typedef`,`Record`,`Delegate`,`Annotation`,`Template`,`Namespace`]),Object.freeze([`Method`,`Function`,`Constructor`]),Object.freeze([`Variable`,`Property`,`Const`,`Static`]),Object.freeze([`Macro`]),Object.freeze([]);function Le(e,t,n,r,i){if(r!==void 0)return Math.min(Math.max(0,r),n);let a=t*2**e,o=Math.min(n,a);return Math.floor(i()*o)}var Re=class extends Error{name=`CircuitOpenError`;retryAfterMs;constructor(e,t){super(t?`Circuit '${t}' is open; retry in ${Math.ceil(e/1e3)}s`:`Circuit is open; retry in ${Math.ceil(e/1e3)}s`),this.retryAfterMs=e}},ze=class{failureThreshold;cooldownMs;halfOpenRetryAfterMs;key;now;state=`closed`;consecutiveFailures=0;openedAt=null;probeInFlight=!1;constructor(e={}){this.failureThreshold=e.failureThreshold??3,this.cooldownMs=e.cooldownMs??3e4,this.halfOpenRetryAfterMs=e.halfOpenRetryAfterMs??1e3,this.key=e.key,this.now=e.now??(()=>Date.now())}check(){if(this.state===`open`&&this.openedAt!==null){let e=this.now()-this.openedAt;if(e<this.cooldownMs)throw new Re(this.cooldownMs-e,this.key);this.state=`half-open`}if(this.state===`half-open`){if(this.probeInFlight)throw new Re(this.halfOpenRetryAfterMs,this.key);this.probeInFlight=!0}}recordSuccess(){this.probeInFlight=!1,this.consecutiveFailures=0,this.state=`closed`,this.openedAt=null}recordFailure(){this.probeInFlight=!1,this.consecutiveFailures+=1,(this.state===`half-open`||this.consecutiveFailures>=this.failureThreshold)&&(this.state=`open`,this.openedAt=this.now())}recordNeutral(){this.probeInFlight=!1}getState(){return this.state===`open`&&this.openedAt!==null&&this.now()-this.openedAt>=this.cooldownMs?`half-open`:this.state}getConsecutiveFailures(){return this.consecutiveFailures}isProbeInFlight(){return this.probeInFlight}getOpenedAt(){return this.openedAt}getCooldownMs(){return this.cooldownMs}},Be=new Map;function Ve(e,t){let n=Be.get(e);return n||(n=new ze({...t,key:e}),Be.set(e,n)),n}var He=3e4,Ue={maxAttempts:3,baseDelayMs:500,capDelayMs:5e3};function We(e,t=Date.now){if(!e)return null;let n=e.trim();if(n===``)return null;if(/^[0-9]+$/.test(n)){let e=parseInt(n,10);return Number.isNaN(e)||e<0?null:e*1e3}let r=Date.parse(n);if(Number.isNaN(r))return null;let i=r-t();return i>=0?i:0}function Ge(e,t){if(e.kind===`error`)return e.err instanceof DOMException&&(e.err.name===`TimeoutError`||e.err.name===`AbortError`)?{kind:`terminal-network`,err:e.err}:{kind:`retryable-network`,err:e.err};let n=e.resp;if(n.status>=200&&n.status<400)return{kind:`success`,resp:n};if(n.status===429){let e=We(typeof n.headers?.get==`function`?n.headers.get(`Retry-After`):null,t);return{kind:`retryable-status`,resp:n,afterMs:e===null?void 0:Math.min(e,He)}}return n.status>=500?{kind:`retryable-status`,resp:n,afterMs:void 0}:{kind:`terminal-client`,resp:n}}var Ke=e=>new Promise(t=>setTimeout(t,e));function qe(e){try{let t=typeof e==`string`?new URL(e):e;return`${t.host}${t.pathname}`}catch{return String(e)}}var Je=class extends Error{name=`ResilientFetchExhaustedError`;constructor(e){super(`Request failed after retries (HTTP ${e.status})`),this.response=e}};async function Ye(e,t,n={}){let r=n.fetchImpl??globalThis.fetch,i=n.now??(()=>Date.now()),a=n.breaker??Ve(n.breakerKey??qe(e),n.breakerOptions),o={maxAttempts:n.retry?.maxAttempts??Ue.maxAttempts,baseDelayMs:n.retry?.baseDelayMs??Ue.baseDelayMs,capDelayMs:n.retry?.capDelayMs??Ue.capDelayMs},s=n.retry?.sleep??Ke,c=n.retry?.random??Math.random;a.check();for(let n=0;n<o.maxAttempts;n++){let l;try{l={kind:`response`,resp:await r(e,t)}}catch(e){l={kind:`error`,err:e}}let u=Ge(l,i);switch(u.kind){case`success`:return a.recordSuccess(),u.resp;case`terminal-client`:return a.recordNeutral(),u.resp;case`terminal-network`:throw a.recordNeutral(),u.err;case`retryable-status`:if(n+1>=o.maxAttempts)throw a.recordFailure(),new Je(u.resp);await s(Le(n,o.baseDelayMs,o.capDelayMs,u.afterMs,c));break;case`retryable-network`:if(n+1>=o.maxAttempts)throw a.recordFailure(),u.err;await s(Le(n,o.baseDelayMs,o.capDelayMs,void 0,c));break;default:throw Error(`resilientFetch: unhandled outcome ${JSON.stringify(u)}`)}}throw Error(`resilientFetch: retry loop terminated unexpectedly`)}var Xe=`gitnexus-llm-settings`,Ze=e=>({...we,...e,openai:{...we.openai,...e?.openai},azureOpenAI:{...we.azureOpenAI,...e?.azureOpenAI},gemini:{...we.gemini,...e?.gemini},anthropic:{...we.anthropic,...e?.anthropic},ollama:{...we.ollama,...e?.ollama},openrouter:{...we.openrouter,...e?.openrouter},minimax:{...we.minimax,...e?.minimax},glm:{...we.glm,...e?.glm},deepseek:{...we.deepseek,...e?.deepseek}}),Qe=e=>{let t=e.getItem(Xe);if(!t)return null;try{return JSON.parse(t)}catch(e){return console.warn(`Failed to parse LLM settings:`,e),null}},$e=(e,t)=>{e.setItem(Xe,JSON.stringify(t))},et=()=>{try{let e=typeof sessionStorage<`u`?Qe(sessionStorage):null;if(e)return Ze(e);let t=typeof localStorage<`u`?Qe(localStorage):null;if(t){let e=Ze(t);try{typeof sessionStorage<`u`&&$e(sessionStorage,e),typeof localStorage<`u`&&localStorage.removeItem(Xe)}catch(e){console.warn(`Failed to migrate legacy LLM settings to sessionStorage:`,e)}return e}return we}catch(e){return console.warn(`Failed to load LLM settings:`,e),we}},tt=e=>{try{typeof sessionStorage<`u`&&$e(sessionStorage,e)}catch(e){console.error(`Failed to save LLM settings:`,e)}},nt={openai:e=>e.openai?.apiKey?{provider:`openai`,...e.openai}:null,"azure-openai":e=>!e.azureOpenAI?.apiKey||!e.azureOpenAI?.endpoint?null:{provider:`azure-openai`,...e.azureOpenAI},gemini:e=>e.gemini?.apiKey?{provider:`gemini`,...e.gemini}:null,anthropic:e=>e.anthropic?.apiKey?{provider:`anthropic`,...e.anthropic}:null,ollama:e=>({provider:`ollama`,...e.ollama,baseUrl:e.ollama?.baseUrl??`http://localhost:11434`}),openrouter:e=>!e.openrouter?.apiKey||e.openrouter.apiKey.trim()===``?null:{provider:`openrouter`,apiKey:e.openrouter.apiKey,model:e.openrouter.model||``,baseUrl:e.openrouter.baseUrl||`https://openrouter.ai/api/v1`,temperature:e.openrouter.temperature,maxTokens:e.openrouter.maxTokens},minimax:e=>e.minimax?.apiKey?{provider:`minimax`,...e.minimax}:null,glm:e=>e.glm?.apiKey?{provider:`glm`,apiKey:e.glm.apiKey,model:e.glm.model||`GLM-5`,baseUrl:e.glm.baseUrl||`https://api.z.ai/api/coding/paas/v4`,temperature:e.glm.temperature,maxTokens:e.glm.maxTokens}:null,deepseek:e=>e.deepseek?.apiKey?{provider:`deepseek`,...e.deepseek}:null},rt=()=>{let e=et(),t=nt[e.activeProvider];return t?t(e):null},it=()=>rt()!==null,at={preserveAssistantTranscript:!1},ot={deepseek:{preserveAssistantTranscript:!0}},st=e=>({...at,...ot[e]}),ct=e=>{switch(e){case`openai`:return`OpenAI`;case`azure-openai`:return`Azure OpenAI`;case`gemini`:return`Google Gemini`;case`anthropic`:return`Anthropic`;case`ollama`:return`Ollama (Local)`;case`openrouter`:return`OpenRouter`;case`minimax`:return`MiniMax`;case`glm`:return`GLM (Z.AI)`;case`deepseek`:return`DeepSeek`;default:return e}},lt=e=>{switch(e){case`openai`:return[`gpt-4.5-preview`,`gpt-4o`,`gpt-4o-mini`,`gpt-4-turbo`,`gpt-4`,`gpt-3.5-turbo`];case`azure-openai`:return[`gpt-4o`,`gpt-4o-mini`,`gpt-4-turbo`,`gpt-4`,`gpt-35-turbo`];case`gemini`:return[`gemini-2.0-flash`,`gemini-1.5-pro`,`gemini-1.5-flash`,`gemini-1.0-pro`];case`anthropic`:return[`claude-sonnet-4-20250514`,`claude-3-5-sonnet-20241022`,`claude-3-5-haiku-20241022`,`claude-3-opus-20240229`];case`ollama`:return[`llama3.2`,`llama3.1`,`mistral`,`codellama`,`deepseek-coder`];case`minimax`:return[`MiniMax-M2.5`,`MiniMax-M2.5-highspeed`];case`glm`:return[`GLM-5`,`GLM-5-Turbo`,`GLM-4.7`,`GLM-4.5`];case`deepseek`:return[`deepseek-v4-flash`,`deepseek-v4-pro`,`deepseek-chat`,`deepseek-reasoner`];default:return[]}},ut=async()=>{try{let e=await Ye(`${Se}/models`,void 0,{breakerKey:`openrouter-models`,retry:{maxAttempts:2,baseDelayMs:500,capDelayMs:2e3}});if(!e.ok)throw Error(`Failed to fetch models`);return(await e.json()).data.map(e=>({id:e.id,name:e.name||e.id}))}catch(e){return console.error(`Error fetching OpenRouter models:`,e),[]}},dt=class extends Error{constructor(e,t,n,r){super(e),this.status=t,this.code=n,this.retryAfterMs=r,this.name=`BackendError`}};function ft(e,t){let n=new AbortController,r=1e3,i=``,a=o=>{n.signal.aborted||(async()=>{try{let s={};i&&(s[`Last-Event-ID`]=i);let c=await fetch(e,{signal:n.signal,headers:s});if(!c.ok){t.onError?.(`Server returned ${c.status}`);return}let l=c.body?.getReader();if(!l){t.onError?.(`No response body`);return}o=0;let u=new TextDecoder,d=``;for(;;){let{done:e,value:n}=await l.read();if(e)break;d+=u.decode(n,{stream:!0});let r=d.split(`
11
11
  `);d=r.pop()||``;let a=`message`;for(let e of r){if(e.startsWith(`id: `)){i=e.slice(4).trim();continue}if(!e.startsWith(`:`)){if(e.startsWith(`event: `))a=e.slice(7).trim();else if(e.startsWith(`data: `)){try{let n=JSON.parse(e.slice(6));if(a===`complete`){t.onComplete?.(n);return}else if(a===`failed`){let e=n;t.onError?.(e?.error||`Job failed`);return}else t.onMessage?.(n)}catch{}a=`message`}}}}!n.signal.aborted&&o<3&&setTimeout(()=>a(o+1),r*2**o)}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return;!n.signal.aborted&&o<3?setTimeout(()=>a(o+1),r*2**o):t.onError?.(e instanceof Error?e.message:`Stream error`)}})()};return a(0),n}var pt=`http://localhost:4747`;function mt(e){let t;try{t=new URL(e)}catch{throw Error(`Invalid backend URL: must be a well-formed http:// or https:// URL`)}if(t.protocol!==`http:`&&t.protocol!==`https:`)throw Error(`Backend URL must use http:// or https:// (got ${t.protocol})`)}var ht=e=>{let t=e.replace(/\/$/,``);mt(t),pt=t};function gt(e){let t=e.trim().replace(/\/+$/,``);return!t.startsWith(`http://`)&&!t.startsWith(`https://`)&&(t=t.startsWith(`localhost`)||t.startsWith(`127.0.0.1`)?`http://${t}`:`https://${t}`),t=t.replace(/\/api$/,``),t}var _t=3e4,vt=2e3,yt=new Set([`GET`,`HEAD`,`OPTIONS`]),bt=async(e,t={},n=_t,r=!1)=>{let i=AbortSignal.timeout(n),a=t.signal,o=a?AbortSignal.any([i,a]):i,s=(t.method??`GET`).toUpperCase(),c=yt.has(s)||r?2:1,l;try{l=`web-backend:${new URL(pt).origin}`}catch{l=`web-backend:invalid`}try{return await Ye(e,{...t,signal:o},{breakerKey:l,retry:{maxAttempts:c,baseDelayMs:250,capDelayMs:1500}})}catch(t){if(t instanceof Re)throw new dt(`GitNexus backend at ${pt} is unhealthy; retry in ${Math.ceil(t.retryAfterMs/1e3)}s`,0,`network`);if(t instanceof Je)return t.response;throw t instanceof DOMException&&t.name===`TimeoutError`?new dt(`Request to ${e} timed out after ${n}ms`,0,`timeout`):t instanceof DOMException&&t.name===`AbortError`?new dt(`Request aborted`,0,`network`):t instanceof TypeError?new dt(`Network error reaching GitNexus backend at ${pt}: ${t.message}`,0,`network`):t}},xt=async e=>{if(e.ok)return;let t=e.statusText;try{let n=await e.json();n&&typeof n.error==`string`?t=n.error:n&&typeof n.message==`string`&&(t=n.message)}catch{}let n=e.status===404?`not_found`:e.status===429?`rate_limited`:e.status>=400&&e.status<500?`client`:`server`,r;if(e.status===429){let t=e.headers.get(`retry-after`);if(t){let e=Number(t);if(Number.isFinite(e)&&e>=0)r=e*1e3;else{let e=Date.parse(t);Number.isFinite(e)&&(r=Math.max(0,e-Date.now()))}}}throw new dt(t,e.status,n,r)},St=e=>e?`repo=${encodeURIComponent(e)}`:``,Ct=(e,t)=>{let n=!1,r=null,i=null,a=0,o=!1,s=()=>{n||(i=new EventSource(`${pt}/api/heartbeat`),i.onopen=()=>{n||(a=0,o=!1,e())},i.onerror=()=>{if(i?.close(),i=null,n)return;o||(o=!0,t());let e=Math.min(1e3*2**a,15e3);a++,r=setTimeout(s,e)})};return s(),()=>{n=!0,i?.close(),r&&clearTimeout(r)}},wt=async e=>{await xt(await bt(`${pt}/api/repo?repo=${encodeURIComponent(e)}`,{method:`DELETE`}))},Tt=async()=>{try{return(await bt(`${pt}/api/repos`,{},vt)).status===200}catch{return!1}},Et=async()=>{let e=await bt(`${pt}/api/repos`);return await xt(e),e.json()},Dt=3e5,Ot=async(e,t)=>{let n=await bt(`${pt}/api/repo${e?`?${St(e)}`:``}`,{},t?.awaitAnalysis?Dt:void 0);await xt(n);let r=await n.json();return{...r,repoPath:r.repoPath??r.path}},kt=async(e,t)=>{let n=[St(e),t?.includeContent?`includeContent=true`:``,`stream=true`].filter(Boolean).join(`&`),r=await bt(`${pt}/api/graph${n?`?${n}`:``}`,{signal:t?.signal},12e4);if(await xt(r),(r.headers.get(`Content-Type`)||``).includes(`application/x-ndjson`))return At(r,t?.onProgress);if(!t?.onProgress||!r.body)return r.json();let i=r.headers.get(`Content-Length`),a=i?parseInt(i,10):null,o=r.body.getReader(),s=[],c=0;for(;;){let{done:e,value:n}=await o.read();if(e)break;s.push(n),c+=n.length,t.onProgress(c,a)}let l=new Uint8Array(c),u=0;for(let e of s)l.set(e,u),u+=e.length;return JSON.parse(new TextDecoder().decode(l))},At=async(e,t)=>{if(!e.body)throw new dt(`No response body`,e.status,`server`);let n=e.headers.get(`Content-Length`),r=n?parseInt(n,10):null,i=e.body.getReader(),a=new TextDecoder,o=[],s=[],c=``,l=0,u=t=>{let n=t.trim();if(!n)return;let r=JSON.parse(n);if(r.type===`node`){o.push(r.data);return}if(r.type===`relationship`){s.push(r.data);return}if(r.type===`error`)throw new dt(r.error,e.status||500,`server`)};for(;;){let{done:e,value:n}=await i.read();if(e)break;l+=n.length,t?.(l,r),c+=a.decode(n,{stream:!0});let o=c.split(`
12
- `);c=o.pop()||``;for(let e of o)u(e)}return c+=a.decode(),u(c),{nodes:o,relationships:s}},jt=async(e,t)=>{let n=await bt(`${pt}/api/query`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({cypher:e,repo:t})});await xt(n);let r=await n.json();return r.result??r},Mt=async(e,t)=>{let n=await bt(`${pt}/api/search`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({query:e,limit:t?.limit,mode:t?.mode,enrich:t?.enrich,repo:t?.repo})});return await xt(n),(await n.json()).results??[]},Nt=async(e,t,n)=>{let r=[`pattern=${encodeURIComponent(e)}`,St(t),n?`limit=${n}`:``].filter(Boolean).join(`&`),i=await bt(`${pt}/api/grep?${r}`);return await xt(i),(await i.json()).results??[]},Pt=async(e,t)=>{let n=[`path=${encodeURIComponent(e)}`,St(t?.repo),t?.startLine===void 0?``:`startLine=${t.startLine}`,t?.endLine===void 0?``:`endLine=${t.endLine}`].filter(Boolean).join(`&`),r=await bt(`${pt}/api/file?${n}`);return await xt(r),r.json()},Ft=async e=>{let t=await bt(`${pt}/api/analyze`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)},3e4);return await xt(t),t.json()},It=async e=>{await xt(await bt(`${pt}/api/analyze/${encodeURIComponent(e)}`,{method:`DELETE`}))},Lt=(e,t,n,r)=>ft(`${pt}/api/analyze/${encodeURIComponent(e)}/progress`,{onMessage:t,onComplete:n,onError:r}),Rt=async e=>{let t=await bt(`${pt}/api/embed`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({repo:e})},3e4);return await xt(t),t.json()},zt=(e,t,n,r)=>ft(`${pt}/api/embed/${encodeURIComponent(e)}/progress`,{onMessage:t,onComplete:n,onError:r});async function Bt(e,t,n,r,i){ht(gt(e)),t?.(`validating`,0,null);let a=await Ot(r,{awaitAnalysis:i?.awaitAnalysis});t?.(`downloading`,0,null);let{nodes:o,relationships:s}=await kt(r,{signal:n,onProgress:(e,n)=>t?.(`downloading`,e,n)});return{nodes:o,relationships:s,repoInfo:a}}var Vt=e=>typeof e==`string`,Ht=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Ut=e=>e==null?``:String(e),Wt=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Gt=/###/g,Kt=e=>e&&e.includes(`###`)?e.replace(Gt,`.`):e,qt=e=>!e||Vt(e),Jt=(e,t,n)=>{let r=Vt(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(qt(e))return{};let t=Kt(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return qt(e)?{}:{obj:e,k:Kt(r[i])}},Yt=(e,t,n)=>{let{obj:r,k:i}=Jt(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=Jt(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Jt(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Xt=(e,t,n,r)=>{let{obj:i,k:a}=Jt(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Zt=(e,t)=>{let{obj:n,k:r}=Jt(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Qt=(e,t,n)=>{let r=Zt(e,n);return r===void 0?Zt(t,n):r},$t=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?Vt(e[r])||e[r]instanceof String||Vt(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):$t(e[r],t[r],n):e[r]=t[r]);return e},en=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),tn={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},nn=e=>Vt(e)?e.replace(/[&<>"'\/]/g,e=>tn[e]):e,rn=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},an=[` `,`,`,`?`,`!`,`;`],on=new rn(20),sn=(e,t,n)=>{t||=``,n||=``;let r=an.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=on.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},cn=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},ln=e=>e?.replace(/_/g,`-`),un={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},dn=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||un,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>Vt(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),Vt(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},fn=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},pn=class extends fn{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):Vt(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Zt(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!Vt(n)?s:cn(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),Yt(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(Vt(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=Zt(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?$t(s,n,i):s={...s,...n},Yt(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},mn={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},hn=Symbol(`i18next/PATH_KEY`);function gn(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===hn?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function _n(e,t){let{[hn]:n}=e(gn()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var vn=e=>!Vt(e)&&typeof e!=`boolean`&&typeof e!=`number`,yn=class e extends fn{constructor(e,t={}){super(),Wt([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=dn.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=vn(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!sn(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Vt(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:Vt(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=_n(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?_n(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!Vt(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=vn(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(Vt(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:vn(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&Vt(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=Vt(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!Vt(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=Vt(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=mn.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return Vt(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?_n(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!Vt(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(Vt(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!Vt(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},bn=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=dn.create(`languageUtils`)}getScriptPartFromCode(e){if(e=ln(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=ln(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Vt(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),Vt(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Vt(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):Vt(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}},xn={zero:0,one:1,two:2,few:3,many:4,other:5},Sn={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Cn=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=dn.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=ln(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Sn;if(!e.match(/-|_/))return Sn;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>xn[e]-xn[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},wn=(e,t,n,r=`.`,i=!0)=>{let a=Qt(e,t,n);return!a&&i&&Vt(n)&&(a=cn(e,n,r),a===void 0&&(a=cn(t,n,r))),a},Tn=e=>e.replace(/\$/g,`$$$$`),En=class{constructor(e={}){this.logger=dn.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?nn:t,this.escapeValue=n===void 0?!0:n,this.useRawValueToEscape=r===void 0?!1:r,this.prefix=i?en(i):a||`{{`,this.suffix=o?en(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?en(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?en(l):``,this.nestingPrefix=d?en(d):f||en(`$t(`),this.nestingSuffix=p?en(p):m||en(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_===void 0?!1:_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=wn(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(wn(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Tn(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Tn(this.escape(e)):Tn(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=Vt(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else !Vt(a)&&!this.useRawValueToEscape&&(a=Ut(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${en(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!Vt(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!Vt(i))return i;Vt(i)||(i=Ut(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Dn=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},On=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(ln(r),i),t[o]=s),s(n)}},kn=e=>(t,n,r)=>e(ln(n),r)(t),An=class{constructor(e={}){this.logger=dn.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?On:kn;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=On(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&!i[0].includes(`)`)&&i.find(e=>e.includes(`)`))){let e=i.findIndex(e=>e.includes(`)`));i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Dn(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},jn=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Mn=class extends fn{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=dn.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{Xt(n.loaded,[i],a),jn(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();Vt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Vt(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},Nn=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),Vt(e[1])&&(t.defaultValue=e[1]),Vt(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Pn=e=>(Vt(e.ns)&&(e.ns=[e.ns]),Vt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Vt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),Fn=()=>{},In=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},Ln=class e extends fn{constructor(e={},t){if(super(),this.options=Pn(e),this.services={},this.logger=dn,this.modules={external:[]},In(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(Vt(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=Nn();this.options={...n,...this.options,...Pn(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?dn.init(r(this.modules.logger),this.options):dn.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:An;let t=new bn(this.options);this.store=new pn(this.options.resources,this.options);let n=this.services;n.logger=dn,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new Cn(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new En(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Mn(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new yn(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=Fn,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=Ht(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=Fn){let n=t,r=Vt(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=Ht();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=Fn,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&mn.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=Ht();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=Vt(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Vt(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=_n(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=_n(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=_n(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return Vt(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=Ht();return this.options.ns?(Vt(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=Ht();Vt(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new bn(Nn());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=Fn){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new pn(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Nn().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new En(n)}return a.translator=new yn(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();Ln.createInstance,Ln.dir,Ln.init,Ln.loadResources,Ln.reloadResources,Ln.use,Ln.changeLanguage,Ln.getFixedT,Ln.t,Ln.exists,Ln.setDefaultNamespace,Ln.hasLoadedNamespace,Ln.loadNamespaces,Ln.loadLanguages;var{slice:Rn,forEach:zn}=[];function Bn(e){return zn.call(Rn.call(arguments,1),t=>{if(t)for(let n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Vn(e){return typeof e==`string`?[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(e)):!1}var Hn=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Un=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:`/`},r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){let e=n.maxAge-0;if(Number.isNaN(e))throw Error(`maxAge should be a Number`);r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!Hn.test(n.domain))throw TypeError(`option domain is invalid`);r+=`; Domain=${n.domain}`}if(n.path){if(!Hn.test(n.path))throw TypeError(`option path is invalid`);r+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!=`function`)throw TypeError(`option expires is invalid`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite)switch(typeof n.sameSite==`string`?n.sameSite.toLowerCase():n.sameSite){case!0:r+=`; SameSite=Strict`;break;case`lax`:r+=`; SameSite=Lax`;break;case`strict`:r+=`; SameSite=Strict`;break;case`none`:r+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid`)}return n.partitioned&&(r+=`; Partitioned`),r},Wn={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:`/`,sameSite:`strict`};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Un(e,t,i)},read(e){let t=`${e}=`,n=document.cookie.split(`;`);for(let e=0;e<n.length;e++){let r=n[e];for(;r.charAt(0)===` `;)r=r.substring(1,r.length);if(r.indexOf(t)===0)return r.substring(t.length,r.length)}return null},remove(e,t){this.create(e,``,-1,t)}},Gn={name:`cookie`,lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<`u`)return Wn.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:a}=t;n&&typeof document<`u`&&Wn.create(n,e,r,i,a)}},Kn={name:`querystring`,lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<`u`){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf(`?`)>-1&&(e=window.location.hash.substring(window.location.hash.indexOf(`?`)));let r=e.substring(1).split(`&`);for(let e=0;e<r.length;e++){let i=r[e].indexOf(`=`);i>0&&r[e].substring(0,i)===t&&(n=r[e].substring(i+1))}}return n}},qn={name:`hash`,lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<`u`){let{hash:e}=window.location;if(e&&e.length>2){let i=e.substring(1);if(t){let e=i.split(`&`);for(let n=0;n<e.length;n++){let i=e[n].indexOf(`=`);i>0&&e[n].substring(0,i)===t&&(r=e[n].substring(i+1))}}if(r)return r;if(!r&&n>-1){let t=e.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof n==`number`?n:0]?.replace(`/`,``):void 0}}}return r}},Jn=null,Yn=()=>{if(Jn!==null)return Jn;try{if(Jn=typeof window<`u`&&window.localStorage!==null,!Jn)return!1;let e=`i18next.translate.boo`;window.localStorage.setItem(e,`foo`),window.localStorage.removeItem(e)}catch{Jn=!1}return Jn},Xn={name:`localStorage`,lookup(e){let{lookupLocalStorage:t}=e;if(t&&Yn())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Yn()&&window.localStorage.setItem(n,e)}},Zn=null,Qn=()=>{if(Zn!==null)return Zn;try{if(Zn=typeof window<`u`&&window.sessionStorage!==null,!Zn)return!1;let e=`i18next.translate.boo`;window.sessionStorage.setItem(e,`foo`),window.sessionStorage.removeItem(e)}catch{Zn=!1}return Zn},$n={name:`sessionStorage`,lookup(e){let{lookupSessionStorage:t}=e;if(t&&Qn())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Qn()&&window.sessionStorage.setItem(n,e)}},er={name:`navigator`,lookup(e){let t=[];if(typeof navigator<`u`){let{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},tr={name:`htmlTag`,lookup(e){let{htmlTag:t}=e,n,r=t||(typeof document<`u`?document.documentElement:null);return r&&typeof r.getAttribute==`function`&&(n=r.getAttribute(`lang`)),n}},nr={name:`path`,lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>`u`)return;let n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(n))return n[typeof t==`number`?t:0]?.replace(`/`,``)}},rr={name:`subdomain`,lookup(e){let{lookupFromSubdomainIndex:t}=e,n=typeof t==`number`?t+1:1,r=typeof window<`u`&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}},ir=!1;try{document.cookie,ir=!0}catch{}var ar=[`querystring`,`cookie`,`localStorage`,`sessionStorage`,`navigator`,`htmlTag`];ir||ar.splice(1,1);var or=()=>({order:ar,lookupQuerystring:`lng`,lookupCookie:`i18next`,lookupLocalStorage:`i18nextLng`,lookupSessionStorage:`i18nextLng`,caches:[`localStorage`],excludeCacheFor:[`cimode`],convertDetectedLanguage:e=>e}),sr=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type=`languageDetector`,this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Bn(t,this.options||{},or()),typeof this.options.convertDetectedLanguage==`string`&&this.options.convertDetectedLanguage.indexOf(`15897`)>-1&&(this.options.convertDetectedLanguage=e=>e.replace(`-`,`_`)),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Gn),this.addDetector(Kn),this.addDetector(Xn),this.addDetector($n),this.addDetector(er),this.addDetector(tr),this.addDetector(nr),this.addDetector(rr),this.addDetector(qn)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&typeof n==`string`&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>e!=null&&!Vn(e)).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}};sr.type=`languageDetector`;var cr=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);hr(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},lr={},ur=(e,t,n,r)=>{hr(n)&&lr[n]||(hr(n)&&(lr[n]=new Date),cr(e,t,n,r))},dr=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},fr=(e,t,n)=>{e.loadNamespaces(t,dr(e,n))},pr=(e,t,n,r)=>{if(hr(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return fr(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,dr(e,r))},mr=(e,t,n={})=>!t.languages||!t.languages.length?(ur(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),hr=e=>typeof e==`string`,gr=e=>typeof e==`object`&&!!e,_r=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,vr={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},yr=e=>vr[e],br={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(_r,yr),transDefaultProps:void 0},xr=(e={})=>{br={...br,...e}},Sr=()=>br,Cr,wr=e=>{Cr=e},Tr=()=>Cr,Er={type:`3rdParty`,init(e){xr(e.options.react),wr(e)}},Dr=(0,W.createContext)(),Or=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},kr=n((e=>{var t=ue();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Ar=n(((e,t)=>{t.exports=kr()}))(),jr={t:(e,t)=>{if(hr(t))return t;if(gr(t)&&hr(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},Mr=()=>()=>{},Nr=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,W.useContext)(Dr)||{},a=n||r||Tr();a&&!a.reportNamespaces&&(a.reportNamespaces=new Or),a||ur(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next`);let o=(0,W.useMemo)(()=>({...Sr(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=hr(l)?[l]:l||[`translation`],d=(0,W.useMemo)(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,W.useRef)(0),p=(0,W.useCallback)(e=>{if(!a)return Mr;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,W.useRef)(),h=(0,W.useCallback)(()=>{if(!a)return jr;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>mr(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c,{scopeNs:d}),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,_]=(0,W.useState)(0),{t:v,ready:y}=(0,Ar.useSyncExternalStore)(p,h,h);(0,W.useEffect)(()=>{if(a&&!y&&!s){let e=()=>_(e=>e+1);t.lng?pr(a,t.lng,d,e):fr(a,d,e)}},[a,t.lng,d,y,s,g]);let b=a||{},x=(0,W.useRef)(null),S=(0,W.useRef)(),C=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,`__original`,{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},w=(0,W.useMemo)(()=>{let e=b,t=e?.language,n=e;e&&(x.current&&x.current.__original===e&&S.current===t?n=x.current:(n=C(e),x.current=n,S.current=t));let r=!y&&!s?(...e)=>(ur(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),v(...e)):v,i=[r,n,y];return i.t=r,i.i18n=n,i.ready=y,i},[v,b,y,b.resolvedLanguage,b.language,b.languages]);if(a&&s&&!y)throw new Promise(e=>{let n=()=>e();t.lng?pr(a,t.lng,d,n):fr(a,d,n)});return w},Pr=[{code:`en`,nativeName:`English`,englishName:`English`,dir:`ltr`},{code:`zh-CN`,nativeName:`简体中文`,englishName:`Simplified Chinese`,dir:`ltr`}],Fr=Pr.map(e=>e.code);function Ir(e){let t=e?.trim().split(`.`)[0]?.replace(/_/g,`-`).toLowerCase();return t?t===`en`||t.startsWith(`en-`)?`en`:t===`zh`||t===`zh-cn`||t.startsWith(`zh-cn-`)||t===`zh-hans`||t.startsWith(`zh-hans-`)?`zh-CN`:null:null}function Lr(e){let t=Ir(e);return Pr.find(e=>e.code===t)??Pr[0]}var Rr=Object.assign({"../locales/en/chat.json":{tabs:{chat:`Nexus AI`,processes:`Processes`},suggestions:{architecture:`Explain the project architecture`,whatDoes:`What does this project do?`,importantFiles:`Show me the most important files`,apiHandlers:`Find all API handlers`},empty:{title:`Ask me anything`,description:`I can help you understand the architecture, find functions, or explain connections.`},input:{placeholder:`Ask about the codebase...`,initializing:`Initializing AI agent...`,configureProvider:`Configure an LLM provider to enable chat.`},actions:{closePanel:`Close Panel`,scrollBottom:`Scroll to bottom`,clearChat:`Clear chat`,stopResponse:`Stop response`},stopped:`Stopped by user`,badges:{configureAI:`Configure AI`,connecting:`Connecting`},roles:{you:`You`,assistant:`Nexus AI`},newBadge:`NEW`},"../locales/en/common.json":{app:{name:`GitNexus`,nexusAI:`Nexus AI`},actions:{cancel:`Cancel`,dismiss:`Dismiss`,tryAgain:`Try again`,hide:`Hide`,retry:`Retry`,copy:`Copy`,copied:`Copied`,close:`Close`,run:`Run`,clear:`Clear`,remove:`Remove`,focusInGraph:`Focus in graph`,expand:`Expand`,collapse:`Collapse`},chat:{viewNodeInCodePanel:`View {{inner}} in Code panel`,openInCodePanel:`Open in Code panel • {{inner}}`,waitForVectorIndex:`Wait a moment, vector index is being created.`},counts:{files_one:`{{count}} file`,files_other:`{{count}} files`,nodes_one:`{{count}} node`,nodes_other:`{{count}} nodes`,edges_one:`{{count}} edge`,edges_other:`{{count}} edges`,symbols_one:`{{count}} symbol`,symbols_other:`{{count}} symbols`,flows_one:`{{count}} flow`,flows_other:`{{count}} flows`},progress:{connecting:`Connecting to server...`,connectingShort:`Connecting...`,validatingServer:`Validating server`,validatingServerEllipsis:`Validating server...`,downloadingGraph:`Downloading graph...`,downloadedMb:`{{mb}} MB downloaded`,downloadingWithPercent:`Downloading graph... {{percent}}%`,downloadingMb:`Downloading... {{mb}} MB`,processing:`Processing...`,processingGraph:`Processing graph...`,extractingFileContents:`Extracting file contents`,loadingGraph:`Loading graph...`,starting:`Starting...`,executing:`Executing...`,truncated:`... (truncated)`,ready:`Ready`,switchingRepository:`Switching repository...`,loadingRepository:`Loading {{repo}}`,validating:`Validating`,failedSwitchRepository:`Failed to switch repository`,unknownError:`Unknown error`},analyzePhases:{queued:`Queued`,cloning:`Cloning repository`,pulling:`Pulling latest`,extracting:`Scanning files`,structure:`Building structure`,parsing:`Parsing code`,imports:`Resolving imports`,calls:`Tracing calls`,heritage:`Extracting inheritance`,scopeResolution:`Resolving types`,communities:`Detecting communities`,processes:`Detecting processes`,complete:`Pipeline complete`,lbug:`Loading into database`,fts:`Creating search indexes`,embeddings:`Generating embeddings`,done:`Done`,retrying:`Retrying after crash`},units:{elapsedSeconds:`{{seconds}}s`,elapsedMinutesSeconds:`{{minutes}}m {{seconds}}s`}},"../locales/en/errors.json":{unknown:`Unknown error`,connectFailed:`Failed to connect to server`,loadGraphFailed:`Failed to load graph`,failedToConnect:`Failed to connect`,analysisFailed:`Analysis failed. Check server logs.`,startAnalysisFailed:`Failed to start analysis`,invalidGithubUrl:`Please enter a valid GitHub repository URL.`,missingFolderPath:`Please enter a folder path.`,backend:{reconnecting:`Server connection lost. Reconnecting…`,network:"Unable to reach the GitNexus server. Make sure `gitnexus serve` is running.",timeout:`The server took too long to respond. Try again in a moment.`,rateLimited:`Too many requests. Try again in {{seconds}}s.`,notFound:`The requested repository or resource was not found.`,client:`Request failed: {{message}}`,server:`Server error: {{message}}`}},"../locales/en/graph.json":{statusBar:{sponsor:`Sponsor`,sponsorHint:`need to buy some API credits to run SWE-bench 😅`},loading:{filesProgress:`{{processed}} / {{total}} files`},toolCall:{status:{running:`running`,completed:`completed`,error:`error`,stopped:`stopped`},tools:{search:`🔍 Search Code`,cypher:`🔗 Cypher Query`,grep:`🔎 Pattern Search`,read:`📄 Read File`,overview:`🗺️ Codebase Overview`,explore:`🔬 Deep Dive`,impact:`💥 Impact Analysis`},query:`Query`,input:`Input`,result:`Result`,searchPrefix:`Search: "{{query}}"`},embedding:{generateTitle:`Generate embeddings for semantic search`,enable:`Enable Semantic Search`,loadingModel:`Loading AI model...`,embeddingNodes:`Embedding {{processed}}/{{total}} nodes`,creatingIndex:`Creating vector index...`,readyTitle:`Semantic search is ready! Use natural language in the AI chat.`,ready:`Semantic Ready`,errorTitle:`Embedding failed. Click to retry.`,failedRetry:`Failed - Retry`,fallback:{title:`WebGPU said "nope"`,subtitle:`Your browser doesn't support GPU acceleration`,description:`Couldn't create embeddings with WebGPU, so semantic search (Graph RAG) won't be as smart. The graph still works fine though!`,options:`Your options:`,useCpu:`Use CPU`,useCpuDescriptionSmall:`Works but a bit slower`,useCpuDescriptionLarge:`Works but way slower`,estimated:`(~{{minutes}} min for {{count}} nodes)`,skipIt:`Skip it`,skipDescription:`Graph works, just no AI semantic search`,smallCodebase:`Small codebase detected! CPU should be fine.`,tip:`💡 Tip: Try Chrome or Edge for WebGPU support`,skipEmbeddings:`Skip Embeddings`,useCpuRecommended:`Use CPU (Recommended)`,useCpuSlow:`Use CPU (Slow)`}},queryFab:{query:`Query`,cypherQuery:`Cypher Query`,examples:`Examples`,run:`Run`,noProject:`No project loaded. Load a project first.`,dbNotReady:`Database not ready. Please wait for loading to complete.`,executionFailed:`Query execution failed`,exampleLabels:{functions:`All Functions`,classes:`All Classes`,interfaces:`All Interfaces`,calls:`Function Calls`,imports:`Import Dependencies`},clear:`Clear`,rows:`rows`,highlighted:`highlighted`,showingRows:`Showing 50 of {{count}} rows`},fileTree:{expandPanel:`Expand Panel`,fileExplorer:`File Explorer`,filters:`Filters`,collapsePanel:`Collapse Panel`,searchFiles:`Search files...`,noFilesLoaded:`No files loaded`,all:`All`,selectNodeDepth:`Select a node to apply depth filter`,explorer:`Explorer`,nodeTypes:`Node Types`,nodeTypesDesc:`Toggle visibility of node types in the graph`,edgeTypes:`Edge Types`,edgeTypesDesc:`Toggle visibility of relationship types`,focusDepth:`Focus Depth`,focusDepthDesc:`Show nodes within N hops of selection`,hops_one:`{{count}} hop`,hops_other:`{{count}} hops`,colorLegend:`Color Legend`},codePanel:{expand:`Expand Code Panel`,dragResize:`Drag to resize`,title:`Code Inspector`,clearCitations:`Clear AI citations`,clearSelection:`Clear selection`,loadingSource:`Loading source...`,selectFile:`Select a file node to preview its contents.`,code:`Code`,selected:`Selected`,aiCitations:`AI Citations`,references_one:`{{count}} reference`,references_other:`{{count}} references`,lines_one:`{{count}} line`,lines_other:`{{count}} lines`,codeNotAvailable:`Code not available in memory for {{path}}`},canvas:{viewModes:{label:`Graph view mode`,force:`Force Graph`,tree:`Sequential Layout`,circles:`Radial Layout`},zoomIn:`Zoom In`,zoomOut:`Zoom Out`,fit:`Fit to Screen`,focusSelected:`Focus on Selected Node`,clearSelection:`Clear Selection`,clear:`Clear`,stopLayout:`Stop Layout`,runLayout:`Run Layout Again`,layoutOptimizing:`Layout optimizing...`,turnOffHighlights:`Turn off all highlights`,turnOnHighlights:`Turn on AI highlights`},processes:{unknownStep:`Unknown`,allProcessesLabel_one:`All Processes ({{count}} combined)`,allProcessesLabel_other:`All Processes ({{count}} combined)`,emptyTitle:`No Processes Detected`,emptyDescription:`Processes are execution flows traced from entry points. Load a codebase to see detected processes.`,filterPlaceholder:`Filter processes...`,detected_one:`{{count}} process detected`,detected_other:`{{count}} processes detected`,fullMap:`Full Process Map`,viewCombined_one:`View combined map of {{count}} process`,viewCombined_other:`View combined map of {{count}} processes`,crossCommunity:`Cross-Community`,intraCommunity:`Intra-Community`,steps_one:`{{count}} step`,steps_other:`{{count}} steps`,clusters_one:`{{count}} cluster`,clusters_other:`{{count}} clusters`,highlightTitle:`Click to highlight in graph`,removeHighlightTitle:`Click to remove highlight from graph`,loading:`Loading...`,viewing:`Viewing`,view:`View`},processFlow:{title:`Process: {{label}}`,diagramTooLarge:`📊 Diagram Too Large`,renderError:`⚠️ Render Error`,tooComplex_one:`This diagram has {{count}} step and is too complex to render. Try viewing individual processes instead of "All Processes".`,tooComplex_other:`This diagram has {{count}} steps and is too complex to render. Try viewing individual processes instead of "All Processes".`,unableToRender_one:`Unable to render diagram. Steps: {{count}}`,unableToRender_other:`Unable to render diagram. Steps: {{count}}`,zoomOutTitle:`Zoom out (-)`,zoomInTitle:`Zoom in (+)`,resetTitle:`Reset zoom and pan`,resetView:`Reset View`,toggleFocus:`Toggle Focus`,copyMermaid:`Copy Mermaid`},diagram:{aiGenerated:`AI Generated Diagram`,error:`Diagram Error`,showSource:`Show source`,label:`Diagram`,expandTitle:`Expand`,loading:`Loading diagram…`}},"../locales/en/header.json":{repositories:`Repositories`,active:`active`,reanalyzing:`Re-analyzing...`,reanalyzeRepo:`Re-analyze {{repoName}}`,deleteRepo:`Delete {{repoName}}`,reanalyzingRepo:`Re-analyzing {{repoName}}: {{message}}`,analyzeNew:`Analyze a new repository...`,searchNodes:`Search nodes...`,noNodesFound:`No nodes found for "{{query}}"`,starIfCool:`Star if cool`,aiSettings:`AI Settings`,help:`Help`,language:`Language`,selectLanguage:`Select language`},"../locales/en/help.json":{tabs:{overview:`Overview`,ai:`Nexus AI`,shortcuts:`Shortcuts`,status:`Status bar`,graph:`Graph & nodes`,search:`Search & filter`},shortcuts:{searchNodes:`Search nodes`,deselectClose:`Deselect / close`,columns:{action:`Action`,mac:`Mac`,windows:`Windows`}},nodeTypes:{function:`Function`,functionDesc:`Function declarations`,file:`File`,fileDesc:`Source files`,class:`Class`,classDesc:`Class declarations`,method:`Method`,methodDesc:`Class methods`,interface:`Interface`,interfaceDesc:`TypeScript interfaces`,folder:`Folder`,folderDesc:`Directory nodes`},status:{ready:`Ready`,readyDesc:`Graph is fully loaded and interactive`,nodesCount:`Nodes count`,nodesCountDesc:`Total files and symbols in the graph`,edgesCount:`Edges count`,edgesCountDesc:`Import / dependency connections`,aiIndexStatus:`AI index status`,aiIndexStatusDesc:`Repo is fully indexed for AI queries`,semanticReadyBadge:`Semantic Ready`,explained:`Status bar explained`},tryAsking:`Try asking:`,footer:`GitNexus — graph explorer`,title:`Help & Reference`,footerLong:`GitNexus — open source codebase graph explorer`,docsGithub:`Docs & GitHub ↗`,overview:{gettingStarted:`Getting started`,whatIsTitle:`What is GitNexus?`,whatIsDescription:`An interactive graph explorer for your codebase. Every file, function, and import becomes a node you can explore, query, and navigate visually.`,currentRepoTitle:`Your current repo`,loadedCounts:`Loaded: {{nodeCount}} nodes · {{edgeCount}} edges`,threeWaysTitle:`Three ways to explore`,wayInspect:`Click nodes to inspect`,waySearch:`Search by name or type`,wayAsk:`Ask Nexus AI a natural language question`,navigationTitle:`Navigation`,navZoom:`Scroll to zoom`,navPan:`Click and drag to pan`,navFocus:`Double-click a node to focus its subgraph`},graph:{nodeColorLegend:`Node color legend`,nodeLabel:`{{label}} nodes`,sizeDescription:`Node size reflects connection count — larger nodes are depended on by more files. Edges point from importer → imported.`,detailDescription:`Click any node to open its detail panel — showing imports, exports, and reverse dependencies.`},search:{title:`Search & filter`,searchNodes:`Search nodes`,searchDescription:`Search by filename, function name, or import path. Matching nodes are highlighted live in the graph.`,filterPanel:`Filter panel`,filterDescription:`Use the filter icon in the left sidebar to isolate specific node types, hide leaf nodes, or focus on a depth range from a selected root.`,syntax:`Search syntax`,hints:{nameFragment:`match by name fragment`,pathPrefix:`match by path prefix`,nodeType:`filter by node type`}},ai:{title:`Nexus AI`,semanticReady:`✓ Semantic Ready`,description:`Your repo is indexed and ready for semantic queries. Nexus AI understands code structure and relationships, not just file names.`,questions:{dependencies:`"Which files depend on the auth module?"`,circular:`"Find circular dependencies in this repo"`,connected:`"What are the most connected components?"`,imports:`"Show me all files that import useEffect"`},openPrompt:`Open the prompt via the Nexus AI button (top-right).`}},"../locales/en/onboarding.json":{success:{title:`Server Connected`,description:`Preparing your code knowledge graph...`},loading:{largeRepoHint:`This may take a moment for large repositories`},guide:{copyAria:`Copy to clipboard`,copiedAria:`Copied!`,startServer:`Start your local server`,devDescription:`Fire up the Express backend in a separate terminal to unlock the full graph.`,prodDescription:`One command is all it takes. The browser connects automatically.`,copyCommand:`Copy the command`,copyCommandDescription:`Click the icon in the terminal to copy.`,done:`done`,orInstallGlobally:`or install globally`,globalInstall:`Global install`,startBackend:`Start backend`,terminal:`Terminal`,waitingForServer:`Waiting for server to start`,pasteAndRun:`Paste and run in your terminal`,pasteAndRunDescription:`Open a terminal at the project root, paste, and hit Enter.`,listeningForServer:`Listening for server`,willAutoConnect:`Will auto-connect when detected`,autoConnects:`Auto-connects and opens the graph`,autoConnectsDescription:`No refresh needed — the page detects the server automatically.`,requires:`Requires`,port:`Port 4747`},analyzeFirst:{title:`Analyze your first repository`,description:`Paste a GitHub URL and GitNexus will clone it, parse the code, and build a live knowledge graph — right in your browser.`,footer:`Public repos only · Cloned locally by the server · No data leaves your machine`},landing:{chooseRepository:`Choose a repository`,description:`Select an indexed repository to explore, or analyze a new one.`,indexed:`Indexed {{time}}`,orAnalyzeNew:`or analyze new`,footer:`Public & private repos · Cloned locally by the server · No data leaves your machine`,time:{justNow:`just now`,minutesAgo:`{{count}}m ago`,hoursAgo:`{{count}}h ago`,daysAgo:`{{count}}d ago`}},repoAnalyzer:{inputType:`Input type`,githubUrl:`GitHub URL`,gitlabUrl:`GitLab URL`,localFolder:`Local Folder`,starting:`Starting analysis...`,analyzeRepository:`Analyze Repository`,complete:`Analysis complete`,loadingGraph:`Loading graph...`,defaultRepoName:`repository`,githubRepositoryUrl:`GitHub Repository URL`,gitlabRepositoryUrl:`GitLab Repository URL`,gitlabSupported:`Supports GitLab.com and self-hosted GitLab instances.`,localFolderPath:`Local Folder Path`,browseForFolder:`Browse for folder`,hideBackground:`Hide (analysis continues in background)`}},"../locales/en/settings.json":{title:`AI Settings`,subtitle:`Configure your LLM provider`,localServer:`Local Server`,backendUrl:`Backend URL`,connected:`Connected`,notConnected:`Not connected`,runServeHint:"Run `gitnexus serve` to connect the web UI to a local backend.",provider:`Provider`,apiKey:`API Key`,learnMore:`Learn more`,model:`Model`,searchModelPlaceholder:`Search or type model ID...`,selectModelPlaceholder:`Select or type a model...`,customModelHint:`Type a model ID or press Enter`,customModelExample:`e.g. openai/gpt-4o`,pressEnterCustom:`Press Enter to use as custom ID`,baseUrl:`Base URL`,optional:`optional`,deploymentName:`Deployment Name`,apiVersion:`API Version`,checkConnection:`Check connection`,privacyLabel:`Privacy:`,privacyText:`Your API keys are stored locally in this browser.`,providers:{openai:{description:`Use OpenAI models for chat and code reasoning.`,apiKeyPlaceholder:`Enter your OpenAI API key`,helperText:`Get your API key from`,helperLinkLabel:`OpenAI Platform`,modelPlaceholder:`e.g., gpt-4o, gpt-4-turbo, gpt-3.5-turbo`,baseUrlPlaceholder:`https://api.openai.com/v1 (default)`,baseUrlHint:`Leave empty to use the default OpenAI API. Set a custom URL for proxies or compatible APIs.`},gemini:{description:`Use Google Gemini models.`,apiKeyPlaceholder:`Enter your Google AI API key`,helperText:`Get your API key from`,helperLinkLabel:`Google AI Studio`,modelPlaceholder:`e.g., gemini-2.0-flash, gemini-1.5-pro`},anthropic:{description:`Use Anthropic Claude models.`,apiKeyPlaceholder:`Enter your Anthropic API key`,helperText:`Get your API key from`,helperLinkLabel:`Anthropic Console`,modelPlaceholder:`e.g., claude-sonnet-4-20250514, claude-3-opus`},azure:{apiKeyPlaceholder:`Enter your Azure OpenAI API key`,deploymentNamePlaceholder:`e.g., gpt-4o-deployment`},ollama:{quickStart:`📋 Quick Start:`,installFrom:`Install Ollama from`,thenRun:`, then run:`,modelPlaceholder:`e.g., llama3.2, mistral, codellama`},openrouter:{apiKeyPlaceholder:`Enter your OpenRouter API key`,helperText:`Get your API key from`,helperLinkLabel:`OpenRouter Keys`},minimax:{apiKeyPlaceholder:`Enter your MiniMax API key`,helperText:`Get your API key from`,helperLinkLabel:`MiniMax Platform`,modelPlaceholder:`e.g., MiniMax-M2.5, MiniMax-M2.5-highspeed`,helperModel:`Available: MiniMax-M2.5 (default), MiniMax-M2.5-highspeed (faster)`},glm:{apiKeyPlaceholder:`Enter your Z.AI API key`}},loadingModels:`Loading models...`,noModelsMatch:`No models match "{{searchTerm}}"`,moreModels:`+{{count}} more • Refine your search`,apiKeySession:`API keys are stored in session storage and will be cleared when you close this tab.`,startLocalServer:`start the local server`,settingsSaved:`Settings saved`,failedToSave:`Failed to save`,saveSettings:`Save Settings`,endpoint:`Endpoint`,azurePortal:`Azure Portal`,azureHint:`Configure your Azure OpenAI service in the`,defaultPort:`Default port is`,pullModel:`Pull a model with`,browseModels:`Browse all models at`,openRouterModels:`OpenRouter Models`,zaiPlatform:`Z.AI Platform`,glmCodingApi:`Coding API (default). Use https://api.z.ai/api/paas/v4 for the general API.`,privacyFull:`Your API keys are stored only in your browser's session storage and are cleared when the tab closes. They're sent directly to the LLM provider when you chat. Your code never leaves your machine.`},"../locales/zh-CN/chat.json":{tabs:{chat:`Nexus AI`,processes:`流程`},suggestions:{architecture:`解释项目架构`,whatDoes:`这个项目是做什么的?`,importantFiles:`显示最重要的文件`,apiHandlers:`查找所有 API 处理器`},empty:{title:`可以问我任何问题`,description:`我可以帮你理解架构、查找函数或解释连接关系。`},input:{placeholder:`询问这个代码库...`,initializing:`正在初始化 AI Agent...`,configureProvider:`配置 LLM 提供商以启用聊天。`},actions:{closePanel:`关闭面板`,scrollBottom:`滚动到底部`,clearChat:`清空聊天`,stopResponse:`停止响应`},stopped:`用户已停止`,badges:{configureAI:`配置 AI`,connecting:`连接中`},roles:{you:`你`,assistant:`Nexus AI`},newBadge:`新`},"../locales/zh-CN/common.json":{app:{name:`GitNexus`,nexusAI:`Nexus AI`},actions:{cancel:`取消`,dismiss:`关闭`,tryAgain:`重试`,hide:`隐藏`,retry:`重试`,copy:`复制`,copied:`已复制`,close:`关闭`,run:`运行`,clear:`清空`,remove:`移除`,focusInGraph:`在图中聚焦`,expand:`展开`,collapse:`折叠`},chat:{viewNodeInCodePanel:`在代码面板中查看 {{inner}}`,openInCodePanel:`在代码面板中打开 • {{inner}}`,waitForVectorIndex:`请稍候,正在创建向量索引。`},counts:{files_one:`{{count}} 个文件`,files_other:`{{count}} 个文件`,nodes_one:`{{count}} 个节点`,nodes_other:`{{count}} 个节点`,edges_one:`{{count}} 条边`,edges_other:`{{count}} 条边`,symbols_one:`{{count}} 个符号`,symbols_other:`{{count}} 个符号`,flows_one:`{{count}} 条流程`,flows_other:`{{count}} 条流程`},progress:{connecting:`正在连接服务器...`,connectingShort:`正在连接...`,validatingServer:`正在验证服务器`,validatingServerEllipsis:`正在验证服务器...`,downloadingGraph:`正在下载图数据...`,downloadedMb:`已下载 {{mb}} MB`,downloadingWithPercent:`正在下载图数据... {{percent}}%`,downloadingMb:`正在下载... {{mb}} MB`,processing:`正在处理...`,processingGraph:`正在处理图数据...`,extractingFileContents:`正在提取文件内容`,loadingGraph:`正在加载图数据...`,starting:`正在启动...`,executing:`正在执行...`,truncated:`...(已截断)`,ready:`就绪`,switchingRepository:`正在切换仓库...`,loadingRepository:`正在加载 {{repo}}`,validating:`正在验证`,failedSwitchRepository:`切换仓库失败`,unknownError:`未知错误`},analyzePhases:{queued:`已排队`,cloning:`正在克隆仓库`,pulling:`正在拉取最新代码`,extracting:`正在扫描文件`,structure:`正在构建结构`,parsing:`正在解析代码`,imports:`正在解析导入`,calls:`正在追踪调用`,heritage:`正在提取继承关系`,scopeResolution:`正在解析类型`,communities:`正在检测社区`,processes:`正在检测流程`,complete:`流水线完成`,lbug:`正在加载数据库`,fts:`正在创建搜索索引`,embeddings:`正在生成嵌入向量`,done:`完成`,retrying:`崩溃后正在重试`},units:{elapsedSeconds:`{{seconds}} 秒`,elapsedMinutesSeconds:`{{minutes}} 分 {{seconds}} 秒`}},"../locales/zh-CN/errors.json":{unknown:`未知错误`,connectFailed:`连接服务器失败`,loadGraphFailed:`加载图数据失败`,failedToConnect:`连接失败`,analysisFailed:`分析失败,请检查服务器日志。`,startAnalysisFailed:`启动分析失败`,invalidGithubUrl:`请输入有效的 GitHub 仓库 URL。`,missingFolderPath:`请输入文件夹路径。`,backend:{reconnecting:`服务器连接已断开,正在重连…`,network:"无法连接 GitNexus 服务器,请确认 `gitnexus serve` 正在运行。",timeout:`服务器响应超时,请稍后重试。`,rateLimited:`请求过于频繁,请在 {{seconds}} 秒后重试。`,notFound:`未找到请求的仓库或资源。`,client:`请求失败:{{message}}`,server:`服务器错误:{{message}}`}},"../locales/zh-CN/graph.json":{statusBar:{sponsor:`赞助`,sponsorHint:`需要买点 API 额度跑 SWE-bench 😅`},loading:{filesProgress:`{{processed}} / {{total}} 个文件`},toolCall:{status:{running:`运行中`,completed:`已完成`,error:`错误`,stopped:`已停止`},tools:{search:`🔍 搜索代码`,cypher:`🔗 Cypher 查询`,grep:`🔎 模式搜索`,read:`📄 读取文件`,overview:`🗺️ 代码库概览`,explore:`🔬 深入分析`,impact:`💥 影响分析`},query:`查询`,input:`输入`,result:`结果`,searchPrefix:`搜索:"{{query}}"`},embedding:{generateTitle:`为语义搜索生成嵌入向量`,enable:`启用语义搜索`,loadingModel:`正在加载 AI 模型...`,embeddingNodes:`正在嵌入 {{processed}}/{{total}} 个节点`,creatingIndex:`正在创建向量索引...`,readyTitle:`语义搜索已就绪!可在 AI 聊天中使用自然语言。`,ready:`语义就绪`,errorTitle:`嵌入失败,点击重试。`,failedRetry:`失败 - 重试`,fallback:{title:`WebGPU 拒绝了请求`,subtitle:`你的浏览器不支持 GPU 加速`,description:`无法用 WebGPU 创建嵌入向量,因此语义搜索(Graph RAG)不会那么智能,但图谱仍可正常使用。`,options:`可选方案:`,useCpu:`使用 CPU`,useCpuDescriptionSmall:`可用,但会稍慢`,useCpuDescriptionLarge:`可用,但会慢很多`,estimated:`(约 {{minutes}} 分钟,{{count}} 个节点)`,skipIt:`跳过`,skipDescription:`图谱可用,但没有 AI 语义搜索`,smallCodebase:`检测到小型代码库!CPU 应该没问题。`,tip:`💡 提示:可尝试 Chrome 或 Edge 以获得 WebGPU 支持`,skipEmbeddings:`跳过嵌入`,useCpuRecommended:`使用 CPU(推荐)`,useCpuSlow:`使用 CPU(较慢)`}},queryFab:{query:`查询`,cypherQuery:`Cypher 查询`,examples:`示例`,run:`运行`,noProject:`未加载项目,请先加载项目。`,dbNotReady:`数据库尚未就绪,请等待加载完成。`,executionFailed:`查询执行失败`,exampleLabels:{functions:`所有函数`,classes:`所有类`,interfaces:`所有接口`,calls:`函数调用`,imports:`导入依赖`},clear:`清除`,rows:`行`,highlighted:`已高亮`,showingRows:`显示 {{count}} 行中的前 50 行`},fileTree:{expandPanel:`展开面板`,fileExplorer:`文件浏览器`,filters:`过滤器`,collapsePanel:`折叠面板`,searchFiles:`搜索文件...`,noFilesLoaded:`未加载文件`,all:`全部`,selectNodeDepth:`选择节点后才能应用深度过滤`,explorer:`浏览器`,nodeTypes:`节点类型`,nodeTypesDesc:`切换图中节点类型的可见性`,edgeTypes:`边类型`,edgeTypesDesc:`切换关系类型的可见性`,focusDepth:`聚焦深度`,focusDepthDesc:`显示所选节点 N 跳内的节点`,hops_one:`{{count}} 跳`,hops_other:`{{count}} 跳`,colorLegend:`颜色图例`},codePanel:{expand:`展开代码面板`,dragResize:`拖动调整大小`,title:`代码检查器`,clearCitations:`清除 AI 引用`,clearSelection:`清除选择`,loadingSource:`正在加载源码...`,selectFile:`选择文件节点以预览其内容。`,code:`代码`,selected:`已选择`,aiCitations:`AI 引用`,references_one:`{{count}} 条引用`,references_other:`{{count}} 条引用`,lines_one:`{{count}} 行`,lines_other:`{{count}} 行`,codeNotAvailable:`内存中没有 {{path}} 的代码内容`},canvas:{viewModes:{label:`图形视图模式`,force:`力导向图`,tree:`顺序布局`,circles:`径向布局`},zoomIn:`放大`,zoomOut:`缩小`,fit:`适应屏幕`,focusSelected:`聚焦所选节点`,clearSelection:`清除选择`,clear:`清除`,stopLayout:`停止布局`,runLayout:`重新运行布局`,layoutOptimizing:`正在优化布局...`,turnOffHighlights:`关闭全部高亮`,turnOnHighlights:`开启 AI 高亮`},processes:{unknownStep:`未知`,allProcessesLabel_one:`全部流程(合并 {{count}} 个)`,allProcessesLabel_other:`全部流程(合并 {{count}} 个)`,emptyTitle:`未检测到流程`,emptyDescription:`流程是从入口点追踪出的执行链路。加载代码库后即可查看检测到的流程。`,filterPlaceholder:`过滤流程...`,detected_one:`检测到 {{count}} 个流程`,detected_other:`检测到 {{count}} 个流程`,fullMap:`完整流程图`,viewCombined_one:`查看 {{count}} 个流程的合并图`,viewCombined_other:`查看 {{count}} 个流程的合并图`,crossCommunity:`跨社区`,intraCommunity:`社区内`,steps_one:`{{count}} 步`,steps_other:`{{count}} 步`,clusters_one:`{{count}} 个聚类`,clusters_other:`{{count}} 个聚类`,highlightTitle:`在图谱中高亮`,removeHighlightTitle:`移除图谱高亮`,loading:`加载中...`,viewing:`查看中`,view:`查看`},processFlow:{title:`流程:{{label}}`,diagramTooLarge:`📊 图表过大`,renderError:`⚠️ 渲染错误`,tooComplex_one:`该图表包含 {{count}} 个步骤,复杂度过高无法渲染。请查看单个流程,而不是“全部流程”。`,tooComplex_other:`该图表包含 {{count}} 个步骤,复杂度过高无法渲染。请查看单个流程,而不是“全部流程”。`,unableToRender_one:`无法渲染图表。步骤数:{{count}}`,unableToRender_other:`无法渲染图表。步骤数:{{count}}`,zoomOutTitle:`缩小 (-)`,zoomInTitle:`放大 (+)`,resetTitle:`重置缩放和平移`,resetView:`重置视图`,toggleFocus:`切换聚焦`,copyMermaid:`复制 Mermaid`},diagram:{aiGenerated:`AI 生成图表`,error:`图表错误`,showSource:`显示源码`,label:`图表`,expandTitle:`展开`,loading:`正在加载图表…`}},"../locales/zh-CN/header.json":{repositories:`仓库`,active:`当前`,reanalyzing:`正在重新分析...`,reanalyzeRepo:`重新分析 {{repoName}}`,deleteRepo:`删除 {{repoName}}`,reanalyzingRepo:`正在重新分析 {{repoName}}:{{message}}`,analyzeNew:`分析新仓库...`,searchNodes:`搜索节点...`,noNodesFound:`未找到“{{query}}”相关节点`,starIfCool:`觉得不错就点星`,aiSettings:`AI 设置`,help:`帮助`,language:`语言`,selectLanguage:`选择语言`},"../locales/zh-CN/help.json":{tabs:{overview:`概览`,ai:`Nexus AI`,shortcuts:`快捷键`,status:`状态栏`,graph:`图谱与节点`,search:`搜索与过滤`},shortcuts:{searchNodes:`搜索节点`,deselectClose:`取消选择 / 关闭`,columns:{action:`操作`,mac:`Mac`,windows:`Windows`}},nodeTypes:{function:`函数`,functionDesc:`函数声明`,file:`文件`,fileDesc:`源码文件`,class:`类`,classDesc:`类声明`,method:`方法`,methodDesc:`类方法`,interface:`接口`,interfaceDesc:`TypeScript 接口`,folder:`文件夹`,folderDesc:`目录节点`},status:{ready:`就绪`,readyDesc:`图谱已完全加载并可交互`,nodesCount:`节点数`,nodesCountDesc:`图谱中的文件与符号总数`,edgesCount:`边数`,edgesCountDesc:`导入 / 依赖连接`,aiIndexStatus:`AI 索引状态`,aiIndexStatusDesc:`仓库已完成 AI 查询索引`,semanticReadyBadge:`语义就绪`,explained:`状态栏说明`},tryAsking:`可以尝试问:`,footer:`GitNexus — 图谱浏览器`,title:`帮助与参考`,footerLong:`GitNexus — 开源代码库图谱浏览器`,docsGithub:`文档与 GitHub ↗`,overview:{gettingStarted:`开始使用`,whatIsTitle:`GitNexus 是什么?`,whatIsDescription:`GitNexus 是代码库的交互式图谱浏览器。每个文件、函数和导入关系都会变成可探索、可查询、可视化导航的节点。`,currentRepoTitle:`当前仓库`,loadedCounts:`已加载:{{nodeCount}} 个节点 · {{edgeCount}} 条边`,threeWaysTitle:`三种探索方式`,wayInspect:`点击节点查看详情`,waySearch:`按名称或类型搜索`,wayAsk:`向 Nexus AI 提出自然语言问题`,navigationTitle:`导航`,navZoom:`滚动缩放`,navPan:`点击并拖动进行平移`,navFocus:`双击节点聚焦其子图`},graph:{nodeColorLegend:`节点颜色图例`,nodeLabel:`{{label}}节点`,sizeDescription:`节点大小反映连接数量——越大的节点被越多文件依赖。边的方向表示从导入方 → 被导入方。`,detailDescription:`点击任意节点可打开详情面板,查看导入、导出和反向依赖。`},search:{title:`搜索与过滤`,searchNodes:`搜索节点`,searchDescription:`可按文件名、函数名或导入路径搜索,匹配的节点会在图谱中实时高亮。`,filterPanel:`过滤面板`,filterDescription:`使用左侧栏的过滤图标隔离特定节点类型、隐藏叶子节点,或以选中节点为根聚焦指定深度范围。`,syntax:`搜索语法`,hints:{nameFragment:`按名称片段匹配`,pathPrefix:`按路径前缀匹配`,nodeType:`按节点类型过滤`}},ai:{title:`Nexus AI`,semanticReady:`✓ 语义索引就绪`,description:`仓库已完成索引,可进行语义查询。Nexus AI 理解代码结构和关系,而不只是文件名。`,questions:{dependencies:`“哪些文件依赖 auth 模块?”`,circular:`“找出这个仓库中的循环依赖”`,connected:`“哪些组件连接最密集?”`,imports:`“显示所有导入 useEffect 的文件”`},openPrompt:`点击右上角的 Nexus AI 按钮打开提问面板。`}},"../locales/zh-CN/onboarding.json":{success:{title:`服务器已连接`,description:`正在准备代码知识图谱...`},loading:{largeRepoHint:`大型仓库可能需要一些时间`},guide:{copyAria:`复制到剪贴板`,copiedAria:`已复制!`,startServer:`启动本地服务器`,devDescription:`在另一个终端启动 Express 后端,即可启用完整图谱。`,prodDescription:`只需一条命令,浏览器会自动连接。`,copyCommand:`复制命令`,copyCommandDescription:`点击终端右侧图标复制。`,done:`完成`,orInstallGlobally:`或全局安装`,globalInstall:`全局安装`,startBackend:`启动后端`,terminal:`终端`,waitingForServer:`等待服务器启动`,pasteAndRun:`粘贴并在终端运行`,pasteAndRunDescription:`在项目根目录打开终端,粘贴命令并回车。`,listeningForServer:`正在监听服务器`,willAutoConnect:`检测到后会自动连接`,autoConnects:`自动连接并打开图谱`,autoConnectsDescription:`无需刷新,页面会自动检测服务器。`,requires:`需要`,port:`端口 4747`},analyzeFirst:{title:`分析你的第一个仓库`,description:`粘贴 GitHub URL,GitNexus 会克隆仓库、解析代码,并直接在浏览器中构建实时知识图谱。`,footer:`仅支持公开仓库 · 服务器本地克隆 · 数据不会离开你的机器`},landing:{chooseRepository:`选择仓库`,description:`选择一个已索引仓库开始探索,或分析一个新仓库。`,indexed:`索引于 {{time}}`,orAnalyzeNew:`或分析新仓库`,footer:`支持公开与私有仓库 · 服务器本地克隆 · 数据不会离开你的机器`,time:{justNow:`刚刚`,minutesAgo:`{{count}} 分钟前`,hoursAgo:`{{count}} 小时前`,daysAgo:`{{count}} 天前`}},repoAnalyzer:{inputType:`输入类型`,githubUrl:`GitHub URL`,gitlabUrl:`GitLab URL`,localFolder:`本地文件夹`,starting:`正在启动分析...`,analyzeRepository:`分析仓库`,complete:`分析完成`,loadingGraph:`正在加载图数据...`,defaultRepoName:`仓库`,githubRepositoryUrl:`GitHub 仓库 URL`,gitlabRepositoryUrl:`GitLab 仓库 URL`,gitlabSupported:`支持 GitLab.com 和自托管 GitLab 实例。`,localFolderPath:`本地文件夹路径`,browseForFolder:`浏览文件夹`,hideBackground:`隐藏(分析继续在后台进行)`}},"../locales/zh-CN/settings.json":{title:`AI 设置`,subtitle:`配置你的 LLM 提供商`,localServer:`本地服务器`,backendUrl:`后端 URL`,connected:`已连接`,notConnected:`未连接`,runServeHint:"运行 `gitnexus serve` 将 Web UI 连接到本地后端。",provider:`提供商`,apiKey:`API Key`,learnMore:`了解更多`,model:`模型`,searchModelPlaceholder:`搜索或输入模型 ID...`,selectModelPlaceholder:`选择或输入模型...`,customModelHint:`输入模型 ID 或按 Enter`,customModelExample:`例如 openai/gpt-4o`,pressEnterCustom:`按 Enter 使用自定义 ID`,baseUrl:`Base URL`,optional:`可选`,deploymentName:`部署名称`,apiVersion:`API 版本`,checkConnection:`检查连接`,privacyLabel:`隐私:`,privacyText:`你的 API Key 仅保存在此浏览器本地。`,providers:{openai:{description:`使用 OpenAI 模型进行聊天和代码推理。`,apiKeyPlaceholder:`输入 OpenAI API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`OpenAI Platform`,modelPlaceholder:`例如:gpt-4o、gpt-4-turbo、gpt-3.5-turbo`,baseUrlPlaceholder:`https://api.openai.com/v1(默认)`,baseUrlHint:`留空则使用默认 OpenAI API。可为代理或兼容 API 设置自定义 URL。`},gemini:{description:`使用 Google Gemini 模型。`,apiKeyPlaceholder:`输入 Google AI API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`Google AI Studio`,modelPlaceholder:`例如:gemini-2.0-flash、gemini-1.5-pro`},anthropic:{description:`使用 Anthropic Claude 模型。`,apiKeyPlaceholder:`输入 Anthropic API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`Anthropic Console`,modelPlaceholder:`例如:claude-sonnet-4-20250514、claude-3-opus`},azure:{apiKeyPlaceholder:`输入 Azure OpenAI API Key`,deploymentNamePlaceholder:`例如:gpt-4o-deployment`},ollama:{quickStart:`📋 快速开始:`,installFrom:`从这里安装 Ollama:`,thenRun:`,然后运行:`,modelPlaceholder:`例如:llama3.2、mistral、codellama`},openrouter:{apiKeyPlaceholder:`输入 OpenRouter API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`OpenRouter Keys`},minimax:{apiKeyPlaceholder:`输入 MiniMax API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`MiniMax Platform`,modelPlaceholder:`例如:MiniMax-M2.5、MiniMax-M2.5-highspeed`,helperModel:`可用:MiniMax-M2.5(默认)、MiniMax-M2.5-highspeed(更快)`},glm:{apiKeyPlaceholder:`输入 Z.AI API Key`}},loadingModels:`正在加载模型...`,noModelsMatch:`没有匹配“{{searchTerm}}”的模型`,moreModels:`+{{count}} 个更多模型 • 缩小搜索范围`,apiKeySession:`API Key 保存在会话存储中,关闭此标签页后会被清除。`,startLocalServer:`启动本地服务器`,settingsSaved:`设置已保存`,failedToSave:`保存失败`,saveSettings:`保存设置`,endpoint:`端点`,azurePortal:`Azure Portal`,azureHint:`在这里配置 Azure OpenAI 服务:`,defaultPort:`默认端口为`,pullModel:`使用以下命令拉取模型`,browseModels:`在这里浏览全部模型:`,openRouterModels:`OpenRouter Models`,zaiPlatform:`Z.AI Platform`,glmCodingApi:`Coding API(默认)。通用 API 请使用 https://api.z.ai/api/paas/v4。`,privacyFull:`你的 API Key 只保存在此浏览器的会话存储中,关闭标签页后会清除。聊天时会直接发送给 LLM 提供商,你的代码不会离开本机。`}}),zr={},Br=new Set;for(let[e,t]of Object.entries(Rr)){let n=e.match(/\.\.\/locales\/([^/]+)\/([^/.]+)\.json$/);if(!n)continue;let[,r,i]=n;zr[r]??={},zr[r][i]=t,Br.add(i)}var Vr=Array.from(Br).sort(),Hr=`common`,Ur=`gitnexus.lng`;function Wr(e){if(typeof document>`u`)return;let t=Lr(e);document.documentElement.lang=t.code,document.documentElement.dir=t.dir}function Gr(e){return Ir(e)??`en`}function Kr(e){let t=Ir(e);if(!(!t||typeof window>`u`))try{window.localStorage.setItem(Ur,t)}catch{}}Ln.use(sr).use(Er).init({resources:zr,fallbackLng:`en`,supportedLngs:Fr,load:`currentOnly`,ns:Vr,defaultNS:Hr,fallbackNS:!1,returnEmptyString:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1},detection:{order:[`querystring`,`localStorage`,`navigator`,`htmlTag`],lookupQuerystring:`lng`,lookupLocalStorage:Ur,caches:[],convertDetectedLanguage:Gr}}).then(()=>{let e=Ln.resolvedLanguage||Ln.language;Wr(e),Kr(e)}),Ln.on(`languageChanged`,e=>{let t=Ln.resolvedLanguage||e;Wr(t),Kr(t)});var qr=Ln,Jr=e=>e.replace(/\\/g,`/`).replace(/^\.?\//,``),Yr=/\[\[([a-zA-Z0-9_\-./\\]+\.[a-zA-Z0-9]+)(?::(\d+)(?:[-–](\d+))?)?\]\]/g,Xr=/\[\[(?:graph:)?(Class|Function|Method|Interface|File|Folder|Variable|Enum|Type|CodeElement):([^\]]+)\]\]/g,Zr={Project:`#a855f7`,Package:`#8b5cf6`,Module:`#7c3aed`,Folder:`#6366f1`,File:`#3b82f6`,Class:`#f59e0b`,Function:`#10b981`,Method:`#14b8a6`,Variable:`#64748b`,Interface:`#ec4899`,Enum:`#f97316`,Decorator:`#eab308`,Import:`#475569`,Type:`#a78bfa`,CodeElement:`#64748b`,Community:`#818cf8`,Process:`#f43f5e`,Section:`#60a5fa`,Struct:`#f59e0b`,Trait:`#ec4899`,Impl:`#14b8a6`,TypeAlias:`#a78bfa`,Const:`#64748b`,Static:`#64748b`,Namespace:`#7c3aed`,Union:`#f97316`,Typedef:`#a78bfa`,Macro:`#eab308`,Property:`#64748b`,Record:`#f59e0b`,Delegate:`#14b8a6`,Annotation:`#eab308`,Constructor:`#10b981`,Template:`#a78bfa`,Route:`#f43f5e`,Tool:`#a855f7`},Qr={Project:20,Package:16,Module:13,Folder:10,File:6,Class:8,Function:4,Method:3,Variable:2,Interface:7,Enum:5,Decorator:2,Import:1.5,Type:3,CodeElement:2,Community:0,Process:0,Section:8,Struct:8,Trait:7,Impl:3,TypeAlias:3,Const:2,Static:2,Namespace:13,Union:5,Typedef:3,Macro:2,Property:2,Record:8,Delegate:3,Annotation:2,Constructor:4,Template:3,Route:5,Tool:5},$r=[`#ef4444`,`#f97316`,`#eab308`,`#22c55e`,`#06b6d4`,`#3b82f6`,`#8b5cf6`,`#d946ef`,`#ec4899`,`#f43f5e`,`#14b8a6`,`#84cc16`],ei=e=>$r[e%$r.length],ti=[`Project`,`Package`,`Module`,`Folder`,`File`,`Class`,`Function`,`Method`,`Property`,`Const`,`Interface`,`Enum`,`Type`],ni=[`Folder`,`File`,`Class`,`Interface`,`Enum`,`Type`,`Function`,`Method`,`Variable`,`Property`,`Const`,`Decorator`,`Import`],ri=[`CONTAINS`,`DEFINES`,`IMPORTS`,`CALLS`,`EXTENDS`,`IMPLEMENTS`],ii=[`CONTAINS`,`DEFINES`,`IMPORTS`,`EXTENDS`,`IMPLEMENTS`,`CALLS`],ai={CONTAINS:{color:`#2d5a3d`,label:`Contains`},DEFINES:{color:`#0e7490`,label:`Defines`},IMPORTS:{color:`#1d4ed8`,label:`Imports`},CALLS:{color:`#7c3aed`,label:`Calls`},EXTENDS:{color:`#c2410c`,label:`Extends`},IMPLEMENTS:{color:`#be185d`,label:`Implements`}},oi=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),G=n(((e,t)=>{t.exports=oi()}))(),si=(0,W.createContext)(null),ci=({children:e})=>{let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)(null),[a,o]=(0,W.useState)(ti),[s,c]=(0,W.useState)(ii),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(new Set),[p,m]=(0,W.useState)(`force`),h=(0,W.useCallback)(e=>{o(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),g=(0,W.useCallback)(e=>{c(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),_=(0,W.useMemo)(()=>({graph:t,setGraph:n,selectedNode:r,setSelectedNode:i,visibleLabels:a,toggleLabelVisibility:h,visibleEdgeTypes:s,toggleEdgeVisibility:g,depthFilter:l,setDepthFilter:u,highlightedNodeIds:d,setHighlightedNodeIds:f,graphViewMode:p,setGraphViewMode:m}),[t,r,a,s,l,d,p]);return(0,G.jsx)(si.Provider,{value:_,children:e})},li=()=>{let e=(0,W.useContext)(si);if(!e)throw Error(`useGraphState must be used within a GraphStateProvider`);return e},ui=`gitnexus.autoStartEmbeddings`,di=()=>typeof window>`u`||!window.localStorage?!1:window.localStorage.getItem(ui)===`true`,fi=(0,W.createContext)(null),pi=({children:e})=>(0,G.jsx)(ci,{children:(0,G.jsx)(mi,{children:e})}),mi=({children:e})=>{let[t,n]=(0,W.useState)(`onboarding`),{graph:r,setGraph:i,selectedNode:a,setSelectedNode:o,visibleLabels:s,toggleLabelVisibility:c,visibleEdgeTypes:l,toggleEdgeVisibility:u,depthFilter:d,setDepthFilter:f,highlightedNodeIds:p,setHighlightedNodeIds:m,graphViewMode:h,setGraphViewMode:g}=li(),[_,v]=(0,W.useState)(!1),[y,b]=(0,W.useState)(`code`),[x,S]=(0,W.useState)(!1),C=(0,W.useCallback)(()=>{Fe(!0)},[]),T=(0,W.useCallback)(()=>{v(!0),b(`chat`)},[]),[E,D]=(0,W.useState)(null),[O,k]=(0,W.useState)(new Set),[ee,A]=(0,W.useState)(new Set),[j,M]=(0,W.useState)(new Set),[N,P]=(0,W.useState)(!0),te=(0,W.useCallback)(()=>{P(e=>!e)},[]),ne=(0,W.useCallback)(()=>{A(new Set)},[]),F=(0,W.useCallback)(()=>{k(new Set)},[]),I=(0,W.useCallback)(()=>{M(new Set)},[]),L=(0,W.useCallback)(()=>{m(new Set),D(null)},[]),[re,ie]=(0,W.useState)(new Map),ae=(0,W.useRef)(null),oe=(0,W.useCallback)((e,t)=>{let n=Date.now(),r=t===`pulse`?2e3:t===`ripple`?3e3:4e3;ie(i=>{let a=new Map(i);for(let i of e)a.set(i,{type:t,startTime:n,duration:r});return a}),setTimeout(()=>{ie(t=>{let r=new Map(t);for(let t of e){let e=r.get(t);e&&e.startTime===n&&r.delete(t)}return r})},r+100)},[]),R=(0,W.useCallback)(()=>{ie(new Map),ae.current&&=(clearInterval(ae.current),null)},[]),[z,B]=(0,W.useState)(null),[se,V]=(0,W.useState)(``),[H,U]=(0,W.useState)(null),[ce,le]=(0,W.useState)([]),[ue,de]=(0,W.useState)(`idle`),[fe,pe]=(0,W.useState)(null),[me,he]=(0,W.useState)(et),[ge,_e]=(0,W.useState)(!1),[be,xe]=(0,W.useState)(!1),[Se,Ce]=(0,W.useState)(!1),[we,Te]=(0,W.useState)(null),[Ee,De]=(0,W.useState)([]),[Oe,ke]=(0,W.useState)(!1),[Ae,je]=(0,W.useState)([]),[Me,Ne]=(0,W.useState)([]),[Pe,Fe]=(0,W.useState)(!1),[Ie,Le]=(0,W.useState)(null),Re=(0,W.useMemo)(()=>{if(!r)return new Map;let e=new Map;for(let t of r.nodes)t.label===`File`&&e.set(Jr(t.properties.filePath),t.id);return e},[r]),ze=(0,W.useMemo)(()=>{if(!r)return new Map;let e=new Map;for(let t of r.nodes)t.label===`File`&&t.properties.filePath&&e.set(Jr(t.properties.filePath),t.properties.filePath);return e},[r]),Be=(0,W.useCallback)(e=>{let t=Jr(e);if(ze.has(t))return ze.get(t);for(let[e,n]of ze)if(e.endsWith(t))return n;return null},[ze]),Ve=(0,W.useCallback)(e=>Re.get(Jr(e)),[Re]),He=(0,W.useCallback)(e=>{let t=`ref-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,n={...e,id:t};Ne(t=>t.some(t=>t.filePath===e.filePath&&t.startLine===e.startLine&&t.endLine===e.endLine)?t:[...t,n]),Fe(!0),Le({filePath:e.filePath,startLine:e.startLine,endLine:e.endLine,ts:Date.now()}),e.nodeId&&e.source===`ai`&&k(t=>new Set([...t,e.nodeId]))},[]),Ue=(0,W.useCallback)(()=>{Ne(e=>{let t=e.filter(e=>e.source===`ai`),n=e.filter(e=>e.source!==`ai`),r=new Set(t.map(e=>e.nodeId).filter(Boolean));return r.size>0&&k(e=>{let t=new Set(e);for(let e of r)t.delete(e);return t}),n.length===0&&!a&&Fe(!1),n})},[a]);(0,W.useEffect)(()=>{a&&Fe(!0)},[a]);let We=(0,W.useRef)(void 0),Ge=(0,W.useCallback)(e=>{We.current=e},[]),Ke=(0,W.useCallback)(async e=>jt(e,We.current),[]),qe=(0,W.useCallback)(async()=>Tt(),[]),Je=(0,W.useRef)(null),Ye=(0,W.useCallback)(async()=>{let e=We.current;if(!e)throw Error(`No repository loaded`);de(`loading`),pe(null);try{let{jobId:t}=await Rt(e);await new Promise((e,n)=>{Je.current=zt(t,e=>{pe({phase:e.phase,percent:e.percent}),e.phase===`loading-model`||e.phase===`loading`?de(`loading`):e.phase===`embedding`?de(`embedding`):e.phase===`indexing`&&de(`indexing`)},()=>{de(`ready`),pe({phase:`ready`,percent:100}),e()},e=>{de(`error`),n(Error(e))})})}catch(e){if(e?.message?.includes(`already in progress`)){de(`embedding`);return}throw de(`error`),e}},[]),Xe=(0,W.useCallback)(()=>{if(typeof navigator<`u`&&navigator.webdriver||typeof process<`u`&&{}.PLAYWRIGHT_TEST){de(`idle`);return}if(!di()){de(`idle`);return}Ye().catch(e=>{console.warn(`Embeddings auto-start failed:`,e)})},[Ye]),Ze=(0,W.useCallback)(async(e,t=10)=>Mt(e,{limit:t,mode:`semantic`,repo:We.current}),[]),Qe=(0,W.useCallback)(async(e,t=5,n=2)=>Mt(e,{limit:t,mode:`semantic`,enrich:!0,repo:We.current}),[]),$e=(0,W.useCallback)(e=>{he(t=>{let n={...t,...e};return tt(n),n})},[]),nt=(0,W.useCallback)(()=>{he(et())},[]),it=(0,W.useRef)(null),at=(0,W.useRef)(null),ot=(0,W.useRef)(`idle`),ct=(0,W.useCallback)(async e=>{let t=rt();if(!t){Te(`Please configure an LLM provider in settings`);return}Ce(!0),Te(null);try{let n=e||se||`project`;e&&(We.current=e);let r=We.current,{createGraphRAGAgent:i}=await w(async()=>{let{createGraphRAGAgent:e}=await import(`./agent-BRX-afm3.js`);return{createGraphRAGAgent:e}},__vite__mapDeps([0,1,2])),{buildCodebaseContext:a}=await w(async()=>{let{buildCodebaseContext:e}=await import(`./context-builder-_HS0v2ma.js`);return{buildCodebaseContext:e}},[]),o=e=>jt(e,r),s=await a(o,n);it.current=i(t,{executeQuery:o,search:(e,t)=>Mt(e,{...t,repo:r}),grep:(e,t)=>Nt(e,r,t),readFile:e=>Pt(e,{repo:r}).then(e=>e.content)},s),xe(!0),Te(null)}catch(e){Te(e instanceof Error?e.message:String(e)),xe(!1)}finally{Ce(!1)}},[]),lt=(0,W.useCallback)(async e=>{if(ot.current!==`idle`||(Ue(),ne(),!be&&(await ct(),!it.current)))return;let t={id:`user-${Date.now()}`,role:`user`,content:e,timestamp:Date.now()};if(De(e=>[...e,t]),ue===`indexing`){let e={id:`assistant-${Date.now()}`,role:`assistant`,content:qr.t(`common:chat.waitForVectorIndex`),timestamp:Date.now()};De(t=>[...t,e]),Te(null),ke(!1),je([]);return}ke(!0),ot.current=`streaming`,je([]),at.current?.abort();let n=new AbortController;at.current=n;let i=st(me.activeProvider),a=[...Ee,t].flatMap(e=>e.role===`user`?[{role:`user`,content:e.content}]:e.role===`tool`?e.toolCallId?[{role:`tool`,content:e.content,toolCallId:e.toolCallId}]:[]:i.preserveAssistantTranscript&&e.historyMessages?.length?e.historyMessages:[{role:`assistant`,content:e.content}]),o=`assistant-${Date.now()}`,s=[],c=[],l=0,u,d=()=>{let e=s.filter(e=>e.type===`reasoning`||e.type===`content`).map(e=>e.content).filter(Boolean).join(`
12
+ `);c=o.pop()||``;for(let e of o)u(e)}return c+=a.decode(),u(c),{nodes:o,relationships:s}},jt=async(e,t)=>{let n=await bt(`${pt}/api/query`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({cypher:e,repo:t})});await xt(n);let r=await n.json();return r.result??r},Mt=async(e,t)=>{let n=await bt(`${pt}/api/search`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({query:e,limit:t?.limit,mode:t?.mode,enrich:t?.enrich,repo:t?.repo})});return await xt(n),(await n.json()).results??[]},Nt=async(e,t,n)=>{let r=[`pattern=${encodeURIComponent(e)}`,St(t),n?`limit=${n}`:``].filter(Boolean).join(`&`),i=await bt(`${pt}/api/grep?${r}`);return await xt(i),(await i.json()).results??[]},Pt=async(e,t)=>{let n=[`path=${encodeURIComponent(e)}`,St(t?.repo),t?.startLine===void 0?``:`startLine=${t.startLine}`,t?.endLine===void 0?``:`endLine=${t.endLine}`].filter(Boolean).join(`&`),r=await bt(`${pt}/api/file?${n}`);return await xt(r),r.json()},Ft=async e=>{let t=await bt(`${pt}/api/analyze`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)},3e4);return await xt(t),t.json()},It=async e=>{await xt(await bt(`${pt}/api/analyze/${encodeURIComponent(e)}`,{method:`DELETE`}))},Lt=(e,t,n,r)=>ft(`${pt}/api/analyze/${encodeURIComponent(e)}/progress`,{onMessage:t,onComplete:n,onError:r}),Rt=async e=>{let t=await bt(`${pt}/api/embed`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({repo:e})},3e4);return await xt(t),t.json()},zt=(e,t,n,r)=>ft(`${pt}/api/embed/${encodeURIComponent(e)}/progress`,{onMessage:t,onComplete:n,onError:r});async function Bt(e,t,n,r,i){ht(gt(e)),t?.(`validating`,0,null);let a=await Ot(r,{awaitAnalysis:i?.awaitAnalysis});t?.(`downloading`,0,null);let{nodes:o,relationships:s}=await kt(r,{signal:n,onProgress:(e,n)=>t?.(`downloading`,e,n)});return{nodes:o,relationships:s,repoInfo:a}}var Vt=e=>typeof e==`string`,Ht=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Ut=e=>e==null?``:String(e),Wt=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Gt=/###/g,Kt=e=>e&&e.includes(`###`)?e.replace(Gt,`.`):e,qt=e=>!e||Vt(e),Jt=(e,t,n)=>{let r=Vt(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(qt(e))return{};let t=Kt(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return qt(e)?{}:{obj:e,k:Kt(r[i])}},Yt=(e,t,n)=>{let{obj:r,k:i}=Jt(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=Jt(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Jt(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Xt=(e,t,n,r)=>{let{obj:i,k:a}=Jt(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Zt=(e,t)=>{let{obj:n,k:r}=Jt(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Qt=(e,t,n)=>{let r=Zt(e,n);return r===void 0?Zt(t,n):r},$t=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?Vt(e[r])||e[r]instanceof String||Vt(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):$t(e[r],t[r],n):e[r]=t[r]);return e},en=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),tn={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},nn=e=>Vt(e)?e.replace(/[&<>"'\/]/g,e=>tn[e]):e,rn=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},an=[` `,`,`,`?`,`!`,`;`],on=new rn(20),sn=(e,t,n)=>{t||=``,n||=``;let r=an.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=on.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},cn=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},ln=e=>e?.replace(/_/g,`-`),un={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},dn=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||un,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>Vt(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),Vt(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},fn=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},pn=class extends fn{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):Vt(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Zt(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!Vt(n)?s:cn(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),Yt(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(Vt(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=Zt(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?$t(s,n,i):s={...s,...n},Yt(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},mn={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},hn=Symbol(`i18next/PATH_KEY`);function gn(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===hn?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function _n(e,t){let{[hn]:n}=e(gn()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var vn=e=>!Vt(e)&&typeof e!=`boolean`&&typeof e!=`number`,yn=class e extends fn{constructor(e,t={}){super(),Wt([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=dn.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=vn(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!sn(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Vt(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:Vt(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=_n(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?_n(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!Vt(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=vn(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(Vt(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:vn(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&Vt(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=Vt(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!Vt(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=Vt(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=mn.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return Vt(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?_n(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!Vt(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(Vt(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!Vt(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},bn=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=dn.create(`languageUtils`)}getScriptPartFromCode(e){if(e=ln(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=ln(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Vt(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),Vt(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Vt(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):Vt(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}},xn={zero:0,one:1,two:2,few:3,many:4,other:5},Sn={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Cn=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=dn.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=ln(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Sn;if(!e.match(/-|_/))return Sn;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>xn[e]-xn[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},wn=(e,t,n,r=`.`,i=!0)=>{let a=Qt(e,t,n);return!a&&i&&Vt(n)&&(a=cn(e,n,r),a===void 0&&(a=cn(t,n,r))),a},Tn=e=>e.replace(/\$/g,`$$$$`),En=class{constructor(e={}){this.logger=dn.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?nn:t,this.escapeValue=n===void 0?!0:n,this.useRawValueToEscape=r===void 0?!1:r,this.prefix=i?en(i):a||`{{`,this.suffix=o?en(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?en(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?en(l):``,this.nestingPrefix=d?en(d):f||en(`$t(`),this.nestingSuffix=p?en(p):m||en(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_===void 0?!1:_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=wn(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(wn(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Tn(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Tn(this.escape(e)):Tn(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=Vt(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else !Vt(a)&&!this.useRawValueToEscape&&(a=Ut(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${en(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!Vt(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!Vt(i))return i;Vt(i)||(i=Ut(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Dn=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},On=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(ln(r),i),t[o]=s),s(n)}},kn=e=>(t,n,r)=>e(ln(n),r)(t),An=class{constructor(e={}){this.logger=dn.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?On:kn;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=On(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&!i[0].includes(`)`)&&i.find(e=>e.includes(`)`))){let e=i.findIndex(e=>e.includes(`)`));i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Dn(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},jn=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Mn=class extends fn{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=dn.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{Xt(n.loaded,[i],a),jn(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();Vt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Vt(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},Nn=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),Vt(e[1])&&(t.defaultValue=e[1]),Vt(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Pn=e=>(Vt(e.ns)&&(e.ns=[e.ns]),Vt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Vt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),Fn=()=>{},In=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},Ln=class e extends fn{constructor(e={},t){if(super(),this.options=Pn(e),this.services={},this.logger=dn,this.modules={external:[]},In(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(Vt(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=Nn();this.options={...n,...this.options,...Pn(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?dn.init(r(this.modules.logger),this.options):dn.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:An;let t=new bn(this.options);this.store=new pn(this.options.resources,this.options);let n=this.services;n.logger=dn,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new Cn(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new En(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Mn(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new yn(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=Fn,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=Ht(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=Fn){let n=t,r=Vt(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=Ht();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=Fn,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&mn.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=Ht();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=Vt(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Vt(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=_n(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=_n(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=_n(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return Vt(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=Ht();return this.options.ns?(Vt(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=Ht();Vt(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new bn(Nn());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=Fn){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new pn(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Nn().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new En(n)}return a.translator=new yn(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();Ln.createInstance,Ln.dir,Ln.init,Ln.loadResources,Ln.reloadResources,Ln.use,Ln.changeLanguage,Ln.getFixedT,Ln.t,Ln.exists,Ln.setDefaultNamespace,Ln.hasLoadedNamespace,Ln.loadNamespaces,Ln.loadLanguages;var{slice:Rn,forEach:zn}=[];function Bn(e){return zn.call(Rn.call(arguments,1),t=>{if(t)for(let n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Vn(e){return typeof e==`string`?[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(e)):!1}var Hn=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Un=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:`/`},r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){let e=n.maxAge-0;if(Number.isNaN(e))throw Error(`maxAge should be a Number`);r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!Hn.test(n.domain))throw TypeError(`option domain is invalid`);r+=`; Domain=${n.domain}`}if(n.path){if(!Hn.test(n.path))throw TypeError(`option path is invalid`);r+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!=`function`)throw TypeError(`option expires is invalid`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite)switch(typeof n.sameSite==`string`?n.sameSite.toLowerCase():n.sameSite){case!0:r+=`; SameSite=Strict`;break;case`lax`:r+=`; SameSite=Lax`;break;case`strict`:r+=`; SameSite=Strict`;break;case`none`:r+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid`)}return n.partitioned&&(r+=`; Partitioned`),r},Wn={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:`/`,sameSite:`strict`};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Un(e,t,i)},read(e){let t=`${e}=`,n=document.cookie.split(`;`);for(let e=0;e<n.length;e++){let r=n[e];for(;r.charAt(0)===` `;)r=r.substring(1,r.length);if(r.indexOf(t)===0)return r.substring(t.length,r.length)}return null},remove(e,t){this.create(e,``,-1,t)}},Gn={name:`cookie`,lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<`u`)return Wn.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:a}=t;n&&typeof document<`u`&&Wn.create(n,e,r,i,a)}},Kn={name:`querystring`,lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<`u`){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf(`?`)>-1&&(e=window.location.hash.substring(window.location.hash.indexOf(`?`)));let r=e.substring(1).split(`&`);for(let e=0;e<r.length;e++){let i=r[e].indexOf(`=`);i>0&&r[e].substring(0,i)===t&&(n=r[e].substring(i+1))}}return n}},qn={name:`hash`,lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<`u`){let{hash:e}=window.location;if(e&&e.length>2){let i=e.substring(1);if(t){let e=i.split(`&`);for(let n=0;n<e.length;n++){let i=e[n].indexOf(`=`);i>0&&e[n].substring(0,i)===t&&(r=e[n].substring(i+1))}}if(r)return r;if(!r&&n>-1){let t=e.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof n==`number`?n:0]?.replace(`/`,``):void 0}}}return r}},Jn=null,Yn=()=>{if(Jn!==null)return Jn;try{if(Jn=typeof window<`u`&&window.localStorage!==null,!Jn)return!1;let e=`i18next.translate.boo`;window.localStorage.setItem(e,`foo`),window.localStorage.removeItem(e)}catch{Jn=!1}return Jn},Xn={name:`localStorage`,lookup(e){let{lookupLocalStorage:t}=e;if(t&&Yn())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Yn()&&window.localStorage.setItem(n,e)}},Zn=null,Qn=()=>{if(Zn!==null)return Zn;try{if(Zn=typeof window<`u`&&window.sessionStorage!==null,!Zn)return!1;let e=`i18next.translate.boo`;window.sessionStorage.setItem(e,`foo`),window.sessionStorage.removeItem(e)}catch{Zn=!1}return Zn},$n={name:`sessionStorage`,lookup(e){let{lookupSessionStorage:t}=e;if(t&&Qn())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Qn()&&window.sessionStorage.setItem(n,e)}},er={name:`navigator`,lookup(e){let t=[];if(typeof navigator<`u`){let{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},tr={name:`htmlTag`,lookup(e){let{htmlTag:t}=e,n,r=t||(typeof document<`u`?document.documentElement:null);return r&&typeof r.getAttribute==`function`&&(n=r.getAttribute(`lang`)),n}},nr={name:`path`,lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>`u`)return;let n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(n))return n[typeof t==`number`?t:0]?.replace(`/`,``)}},rr={name:`subdomain`,lookup(e){let{lookupFromSubdomainIndex:t}=e,n=typeof t==`number`?t+1:1,r=typeof window<`u`&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}},ir=!1;try{document.cookie,ir=!0}catch{}var ar=[`querystring`,`cookie`,`localStorage`,`sessionStorage`,`navigator`,`htmlTag`];ir||ar.splice(1,1);var or=()=>({order:ar,lookupQuerystring:`lng`,lookupCookie:`i18next`,lookupLocalStorage:`i18nextLng`,lookupSessionStorage:`i18nextLng`,caches:[`localStorage`],excludeCacheFor:[`cimode`],convertDetectedLanguage:e=>e}),sr=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type=`languageDetector`,this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Bn(t,this.options||{},or()),typeof this.options.convertDetectedLanguage==`string`&&this.options.convertDetectedLanguage.indexOf(`15897`)>-1&&(this.options.convertDetectedLanguage=e=>e.replace(`-`,`_`)),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Gn),this.addDetector(Kn),this.addDetector(Xn),this.addDetector($n),this.addDetector(er),this.addDetector(tr),this.addDetector(nr),this.addDetector(rr),this.addDetector(qn)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&typeof n==`string`&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>e!=null&&!Vn(e)).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}};sr.type=`languageDetector`;var cr=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);hr(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},lr={},ur=(e,t,n,r)=>{hr(n)&&lr[n]||(hr(n)&&(lr[n]=new Date),cr(e,t,n,r))},dr=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},fr=(e,t,n)=>{e.loadNamespaces(t,dr(e,n))},pr=(e,t,n,r)=>{if(hr(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return fr(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,dr(e,r))},mr=(e,t,n={})=>!t.languages||!t.languages.length?(ur(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),hr=e=>typeof e==`string`,gr=e=>typeof e==`object`&&!!e,_r=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,vr={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},yr=e=>vr[e],br={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(_r,yr),transDefaultProps:void 0},xr=(e={})=>{br={...br,...e}},Sr=()=>br,Cr,wr=e=>{Cr=e},Tr=()=>Cr,Er={type:`3rdParty`,init(e){xr(e.options.react),wr(e)}},Dr=(0,W.createContext)(),Or=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},kr=n((e=>{var t=ue();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Ar=n(((e,t)=>{t.exports=kr()}))(),jr={t:(e,t)=>{if(hr(t))return t;if(gr(t)&&hr(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},Mr=()=>()=>{},Nr=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,W.useContext)(Dr)||{},a=n||r||Tr();a&&!a.reportNamespaces&&(a.reportNamespaces=new Or),a||ur(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next`);let o=(0,W.useMemo)(()=>({...Sr(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=hr(l)?[l]:l||[`translation`],d=(0,W.useMemo)(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,W.useRef)(0),p=(0,W.useCallback)(e=>{if(!a)return Mr;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,W.useRef)(),h=(0,W.useCallback)(()=>{if(!a)return jr;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>mr(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c,{scopeNs:d}),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,_]=(0,W.useState)(0),{t:v,ready:y}=(0,Ar.useSyncExternalStore)(p,h,h);(0,W.useEffect)(()=>{if(a&&!y&&!s){let e=()=>_(e=>e+1);t.lng?pr(a,t.lng,d,e):fr(a,d,e)}},[a,t.lng,d,y,s,g]);let b=a||{},x=(0,W.useRef)(null),S=(0,W.useRef)(),C=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,`__original`,{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},w=(0,W.useMemo)(()=>{let e=b,t=e?.language,n=e;e&&(x.current&&x.current.__original===e&&S.current===t?n=x.current:(n=C(e),x.current=n,S.current=t));let r=!y&&!s?(...e)=>(ur(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),v(...e)):v,i=[r,n,y];return i.t=r,i.i18n=n,i.ready=y,i},[v,b,y,b.resolvedLanguage,b.language,b.languages]);if(a&&s&&!y)throw new Promise(e=>{let n=()=>e();t.lng?pr(a,t.lng,d,n):fr(a,d,n)});return w},Pr=[{code:`en`,nativeName:`English`,englishName:`English`,dir:`ltr`},{code:`zh-CN`,nativeName:`简体中文`,englishName:`Simplified Chinese`,dir:`ltr`}],Fr=Pr.map(e=>e.code);function Ir(e){let t=e?.trim().split(`.`)[0]?.replace(/_/g,`-`).toLowerCase();return t?t===`en`||t.startsWith(`en-`)?`en`:t===`zh`||t===`zh-cn`||t.startsWith(`zh-cn-`)||t===`zh-hans`||t.startsWith(`zh-hans-`)?`zh-CN`:null:null}function Lr(e){let t=Ir(e);return Pr.find(e=>e.code===t)??Pr[0]}var Rr=Object.assign({"../locales/en/chat.json":{tabs:{chat:`Nexus AI`,processes:`Processes`},suggestions:{architecture:`Explain the project architecture`,whatDoes:`What does this project do?`,importantFiles:`Show me the most important files`,apiHandlers:`Find all API handlers`},empty:{title:`Ask me anything`,description:`I can help you understand the architecture, find functions, or explain connections.`},input:{placeholder:`Ask about the codebase...`,initializing:`Initializing AI agent...`,configureProvider:`Configure an LLM provider to enable chat.`},actions:{closePanel:`Close Panel`,scrollBottom:`Scroll to bottom`,clearChat:`Clear chat`,stopResponse:`Stop response`},stopped:`Stopped by user`,badges:{configureAI:`Configure AI`,connecting:`Connecting`},roles:{you:`You`,assistant:`Nexus AI`},newBadge:`NEW`},"../locales/en/common.json":{app:{name:`GitNexus`,nexusAI:`Nexus AI`},actions:{cancel:`Cancel`,dismiss:`Dismiss`,tryAgain:`Try again`,hide:`Hide`,retry:`Retry`,copy:`Copy`,copied:`Copied`,close:`Close`,run:`Run`,clear:`Clear`,remove:`Remove`,focusInGraph:`Focus in graph`,expand:`Expand`,collapse:`Collapse`},chat:{viewNodeInCodePanel:`View {{inner}} in Code panel`,openInCodePanel:`Open in Code panel • {{inner}}`,waitForVectorIndex:`Wait a moment, vector index is being created.`},counts:{files_one:`{{count}} file`,files_other:`{{count}} files`,nodes_one:`{{count}} node`,nodes_other:`{{count}} nodes`,edges_one:`{{count}} edge`,edges_other:`{{count}} edges`,symbols_one:`{{count}} symbol`,symbols_other:`{{count}} symbols`,flows_one:`{{count}} flow`,flows_other:`{{count}} flows`},progress:{connecting:`Connecting to server...`,connectingShort:`Connecting...`,validatingServer:`Validating server`,validatingServerEllipsis:`Validating server...`,downloadingGraph:`Downloading graph...`,downloadedMb:`{{mb}} MB downloaded`,downloadingWithPercent:`Downloading graph... {{percent}}%`,downloadingMb:`Downloading... {{mb}} MB`,processing:`Processing...`,processingGraph:`Processing graph...`,extractingFileContents:`Extracting file contents`,loadingGraph:`Loading graph...`,starting:`Starting...`,executing:`Executing...`,truncated:`... (truncated)`,ready:`Ready`,switchingRepository:`Switching repository...`,loadingRepository:`Loading {{repo}}`,validating:`Validating`,failedSwitchRepository:`Failed to switch repository`,unknownError:`Unknown error`},analyzePhases:{queued:`Queued`,cloning:`Cloning repository`,pulling:`Pulling latest`,extracting:`Scanning files`,structure:`Building structure`,parsing:`Parsing code`,imports:`Resolving imports`,calls:`Tracing calls`,heritage:`Extracting inheritance`,scopeResolution:`Resolving types`,communities:`Detecting communities`,processes:`Detecting processes`,complete:`Pipeline complete`,lbug:`Loading into database`,fts:`Creating search indexes`,embeddings:`Generating embeddings`,done:`Done`,retrying:`Retrying after crash`},units:{elapsedSeconds:`{{seconds}}s`,elapsedMinutesSeconds:`{{minutes}}m {{seconds}}s`}},"../locales/en/errors.json":{unknown:`Unknown error`,connectFailed:`Failed to connect to server`,loadGraphFailed:`Failed to load graph`,failedToConnect:`Failed to connect`,analysisFailed:`Analysis failed. Check server logs.`,startAnalysisFailed:`Failed to start analysis`,invalidGithubUrl:`Please enter a valid GitHub repository URL.`,missingFolderPath:`Please enter a folder path.`,backend:{reconnecting:`Server connection lost. Reconnecting…`,network:"Unable to reach the GitNexus server. Make sure `gitnexus serve` is running.",timeout:`The server took too long to respond. Try again in a moment.`,rateLimited:`Too many requests. Try again in {{seconds}}s.`,notFound:`The requested repository or resource was not found.`,client:`Request failed: {{message}}`,server:`Server error: {{message}}`}},"../locales/en/graph.json":{statusBar:{sponsor:`Sponsor`,sponsorHint:`need to buy some API credits to run SWE-bench 😅`},loading:{filesProgress:`{{processed}} / {{total}} files`},toolCall:{status:{running:`running`,completed:`completed`,error:`error`,stopped:`stopped`},tools:{search:`🔍 Search Code`,cypher:`🔗 Cypher Query`,grep:`🔎 Pattern Search`,read:`📄 Read File`,overview:`🗺️ Codebase Overview`,explore:`🔬 Deep Dive`,impact:`💥 Impact Analysis`},query:`Query`,input:`Input`,result:`Result`,searchPrefix:`Search: "{{query}}"`},embedding:{generateTitle:`Generate embeddings for semantic search`,enable:`Enable Semantic Search`,loadingModel:`Loading AI model...`,embeddingNodes:`Embedding {{processed}}/{{total}} nodes`,creatingIndex:`Creating vector index...`,readyTitle:`Semantic search is ready! Use natural language in the AI chat.`,ready:`Semantic Ready`,errorTitle:`Embedding failed. Click to retry.`,failedRetry:`Failed - Retry`,fallback:{title:`WebGPU said "nope"`,subtitle:`Your browser doesn't support GPU acceleration`,description:`Couldn't create embeddings with WebGPU, so semantic search (Graph RAG) won't be as smart. The graph still works fine though!`,options:`Your options:`,useCpu:`Use CPU`,useCpuDescriptionSmall:`Works but a bit slower`,useCpuDescriptionLarge:`Works but way slower`,estimated:`(~{{minutes}} min for {{count}} nodes)`,skipIt:`Skip it`,skipDescription:`Graph works, just no AI semantic search`,smallCodebase:`Small codebase detected! CPU should be fine.`,tip:`💡 Tip: Try Chrome or Edge for WebGPU support`,skipEmbeddings:`Skip Embeddings`,useCpuRecommended:`Use CPU (Recommended)`,useCpuSlow:`Use CPU (Slow)`}},queryFab:{query:`Query`,cypherQuery:`Cypher Query`,examples:`Examples`,run:`Run`,noProject:`No project loaded. Load a project first.`,dbNotReady:`Database not ready. Please wait for loading to complete.`,executionFailed:`Query execution failed`,exampleLabels:{functions:`All Functions`,classes:`All Classes`,interfaces:`All Interfaces`,calls:`Function Calls`,imports:`Import Dependencies`},clear:`Clear`,rows:`rows`,highlighted:`highlighted`,showingRows:`Showing 50 of {{count}} rows`},fileTree:{expandPanel:`Expand Panel`,fileExplorer:`File Explorer`,filters:`Filters`,collapsePanel:`Collapse Panel`,searchFiles:`Search files...`,noFilesLoaded:`No files loaded`,all:`All`,selectNodeDepth:`Select a node to apply depth filter`,explorer:`Explorer`,nodeTypes:`Node Types`,nodeTypesDesc:`Toggle visibility of node types in the graph`,edgeTypes:`Edge Types`,edgeTypesDesc:`Toggle visibility of relationship types`,focusDepth:`Focus Depth`,focusDepthDesc:`Show nodes within N hops of selection`,hops_one:`{{count}} hop`,hops_other:`{{count}} hops`,colorLegend:`Color Legend`},codePanel:{expand:`Expand Code Panel`,dragResize:`Drag to resize`,title:`Code Inspector`,clearCitations:`Clear AI citations`,clearSelection:`Clear selection`,loadingSource:`Loading source...`,selectFile:`Select a file node to preview its contents.`,code:`Code`,selected:`Selected`,aiCitations:`AI Citations`,references_one:`{{count}} reference`,references_other:`{{count}} references`,lines_one:`{{count}} line`,lines_other:`{{count}} lines`,codeNotAvailable:`Code not available in memory for {{path}}`},canvas:{viewModes:{label:`Graph view mode`,force:`Force Graph`,tree:`Sequential Layout`,circles:`Radial Layout`},zoomIn:`Zoom In`,zoomOut:`Zoom Out`,fit:`Fit to Screen`,focusSelected:`Focus on Selected Node`,clearSelection:`Clear Selection`,clear:`Clear`,stopLayout:`Stop Layout`,runLayout:`Run Layout Again`,layoutOptimizing:`Layout optimizing...`,turnOffHighlights:`Turn off all highlights`,turnOnHighlights:`Turn on AI highlights`},processes:{unknownStep:`Unknown`,allProcessesLabel_one:`All Processes ({{count}} combined)`,allProcessesLabel_other:`All Processes ({{count}} combined)`,emptyTitle:`No Processes Detected`,emptyDescription:`Processes are execution flows traced from entry points. Load a codebase to see detected processes.`,filterPlaceholder:`Filter processes...`,detected_one:`{{count}} process detected`,detected_other:`{{count}} processes detected`,fullMap:`Full Process Map`,viewCombined_one:`View combined map of {{count}} process`,viewCombined_other:`View combined map of {{count}} processes`,crossCommunity:`Cross-Community`,intraCommunity:`Intra-Community`,steps_one:`{{count}} step`,steps_other:`{{count}} steps`,clusters_one:`{{count}} cluster`,clusters_other:`{{count}} clusters`,highlightTitle:`Click to highlight in graph`,removeHighlightTitle:`Click to remove highlight from graph`,loading:`Loading...`,viewing:`Viewing`,view:`View`},processFlow:{title:`Process: {{label}}`,diagramTooLarge:`📊 Diagram Too Large`,renderError:`⚠️ Render Error`,tooComplex_one:`This diagram has {{count}} step and is too complex to render. Try viewing individual processes instead of "All Processes".`,tooComplex_other:`This diagram has {{count}} steps and is too complex to render. Try viewing individual processes instead of "All Processes".`,unableToRender_one:`Unable to render diagram. Steps: {{count}}`,unableToRender_other:`Unable to render diagram. Steps: {{count}}`,zoomOutTitle:`Zoom out (-)`,zoomInTitle:`Zoom in (+)`,resetTitle:`Reset zoom and pan`,resetView:`Reset View`,toggleFocus:`Toggle Focus`,copyMermaid:`Copy Mermaid`},diagram:{aiGenerated:`AI Generated Diagram`,error:`Diagram Error`,showSource:`Show source`,label:`Diagram`,expandTitle:`Expand`,loading:`Loading diagram…`}},"../locales/en/header.json":{repositories:`Repositories`,active:`active`,reanalyzing:`Re-analyzing...`,reanalyzeRepo:`Re-analyze {{repoName}}`,deleteRepo:`Delete {{repoName}}`,reanalyzingRepo:`Re-analyzing {{repoName}}: {{message}}`,analyzeNew:`Analyze a new repository...`,searchNodes:`Search nodes...`,noNodesFound:`No nodes found for "{{query}}"`,starIfCool:`Star if cool`,aiSettings:`AI Settings`,help:`Help`,language:`Language`,selectLanguage:`Select language`},"../locales/en/help.json":{tabs:{overview:`Overview`,ai:`Nexus AI`,shortcuts:`Shortcuts`,status:`Status bar`,graph:`Graph & nodes`,search:`Search & filter`},shortcuts:{searchNodes:`Search nodes`,deselectClose:`Deselect / close`,columns:{action:`Action`,mac:`Mac`,windows:`Windows`}},nodeTypes:{function:`Function`,functionDesc:`Function declarations`,file:`File`,fileDesc:`Source files`,class:`Class`,classDesc:`Class declarations`,method:`Method`,methodDesc:`Class methods`,interface:`Interface`,interfaceDesc:`TypeScript interfaces`,folder:`Folder`,folderDesc:`Directory nodes`},status:{ready:`Ready`,readyDesc:`Graph is fully loaded and interactive`,nodesCount:`Nodes count`,nodesCountDesc:`Total files and symbols in the graph`,edgesCount:`Edges count`,edgesCountDesc:`Import / dependency connections`,aiIndexStatus:`AI index status`,aiIndexStatusDesc:`Repo is fully indexed for AI queries`,semanticReadyBadge:`Semantic Ready`,explained:`Status bar explained`},tryAsking:`Try asking:`,footer:`GitNexus — graph explorer`,title:`Help & Reference`,footerLong:`GitNexus — open source codebase graph explorer`,docsGithub:`Docs & GitHub ↗`,overview:{gettingStarted:`Getting started`,whatIsTitle:`What is GitNexus?`,whatIsDescription:`An interactive graph explorer for your codebase. Every file, function, and import becomes a node you can explore, query, and navigate visually.`,currentRepoTitle:`Your current repo`,loadedCounts:`Loaded: {{nodeCount}} nodes · {{edgeCount}} edges`,threeWaysTitle:`Three ways to explore`,wayInspect:`Click nodes to inspect`,waySearch:`Search by name or type`,wayAsk:`Ask Nexus AI a natural language question`,navigationTitle:`Navigation`,navZoom:`Scroll to zoom`,navPan:`Click and drag to pan`,navFocus:`Double-click a node to focus its subgraph`},graph:{nodeColorLegend:`Node color legend`,nodeLabel:`{{label}} nodes`,sizeDescription:`Node size reflects connection count — larger nodes are depended on by more files. Edges point from importer → imported.`,detailDescription:`Click any node to open its detail panel — showing imports, exports, and reverse dependencies.`},search:{title:`Search & filter`,searchNodes:`Search nodes`,searchDescription:`Search by filename, function name, or import path. Matching nodes are highlighted live in the graph.`,filterPanel:`Filter panel`,filterDescription:`Use the filter icon in the left sidebar to isolate specific node types, hide leaf nodes, or focus on a depth range from a selected root.`,syntax:`Search syntax`,hints:{nameFragment:`match by name fragment`,pathPrefix:`match by path prefix`,nodeType:`filter by node type`}},ai:{title:`Nexus AI`,semanticReady:`✓ Semantic Ready`,description:`Your repo is indexed and ready for semantic queries. Nexus AI understands code structure and relationships, not just file names.`,questions:{dependencies:`"Which files depend on the auth module?"`,circular:`"Find circular dependencies in this repo"`,connected:`"What are the most connected components?"`,imports:`"Show me all files that import useEffect"`},openPrompt:`Open the prompt via the Nexus AI button (top-right).`}},"../locales/en/onboarding.json":{success:{title:`Server Connected`,description:`Preparing your code knowledge graph...`},loading:{largeRepoHint:`This may take a moment for large repositories`},guide:{copyAria:`Copy to clipboard`,copiedAria:`Copied!`,startServer:`Start your local server`,devDescription:`Fire up the Express backend in a separate terminal to unlock the full graph.`,prodDescription:`One command is all it takes. The browser connects automatically.`,copyCommand:`Copy the command`,copyCommandDescription:`Click the icon in the terminal to copy.`,done:`done`,orInstallGlobally:`or install globally`,globalInstall:`Global install`,startBackend:`Start backend`,terminal:`Terminal`,waitingForServer:`Waiting for server to start`,pasteAndRun:`Paste and run in your terminal`,pasteAndRunDescription:`Open a terminal at the project root, paste, and hit Enter.`,listeningForServer:`Listening for server`,willAutoConnect:`Will auto-connect when detected`,autoConnects:`Auto-connects and opens the graph`,autoConnectsDescription:`No refresh needed — the page detects the server automatically.`,requires:`Requires`,port:`Port 4747`},analyzeFirst:{title:`Analyze your first repository`,description:`Paste a GitHub URL and GitNexus will clone it, parse the code, and build a live knowledge graph — right in your browser.`,footer:`Public repos only · Cloned locally by the server · No data leaves your machine`},landing:{chooseRepository:`Choose a repository`,description:`Select an indexed repository to explore, or analyze a new one.`,indexed:`Indexed {{time}}`,orAnalyzeNew:`or analyze new`,footer:`Public & private repos · Cloned locally by the server · No data leaves your machine`,time:{justNow:`just now`,minutesAgo:`{{count}}m ago`,hoursAgo:`{{count}}h ago`,daysAgo:`{{count}}d ago`}},repoAnalyzer:{inputType:`Input type`,githubUrl:`GitHub URL`,gitlabUrl:`GitLab URL`,localFolder:`Local Folder`,starting:`Starting analysis...`,analyzeRepository:`Analyze Repository`,complete:`Analysis complete`,loadingGraph:`Loading graph...`,defaultRepoName:`repository`,githubRepositoryUrl:`GitHub Repository URL`,gitlabRepositoryUrl:`GitLab Repository URL`,gitlabSupported:`Supports GitLab.com and self-hosted GitLab instances.`,localFolderPath:`Local Folder Path`,browseForFolder:`Browse for folder`,hideBackground:`Hide (analysis continues in background)`}},"../locales/en/settings.json":{title:`AI Settings`,subtitle:`Configure your LLM provider`,localServer:`Local Server`,backendUrl:`Backend URL`,connected:`Connected`,notConnected:`Not connected`,runServeHint:"Run `gitnexus serve` to connect the web UI to a local backend.",provider:`Provider`,apiKey:`API Key`,learnMore:`Learn more`,model:`Model`,searchModelPlaceholder:`Search or type model ID...`,selectModelPlaceholder:`Select or type a model...`,customModelHint:`Type a model ID or press Enter`,customModelExample:`e.g. openai/gpt-4o`,pressEnterCustom:`Press Enter to use as custom ID`,baseUrl:`Base URL`,optional:`optional`,deploymentName:`Deployment Name`,apiVersion:`API Version`,checkConnection:`Check connection`,privacyLabel:`Privacy:`,privacyText:`Your API keys are stored locally in this browser.`,providers:{openai:{description:`Use OpenAI models for chat and code reasoning.`,apiKeyPlaceholder:`Enter your OpenAI API key`,helperText:`Get your API key from`,helperLinkLabel:`OpenAI Platform`,modelPlaceholder:`e.g., gpt-4o, gpt-4-turbo, gpt-3.5-turbo`,baseUrlPlaceholder:`https://api.openai.com/v1 (default)`,baseUrlHint:`Leave empty to use the default OpenAI API. Set a custom URL for proxies or compatible APIs.`},gemini:{description:`Use Google Gemini models.`,apiKeyPlaceholder:`Enter your Google AI API key`,helperText:`Get your API key from`,helperLinkLabel:`Google AI Studio`,modelPlaceholder:`e.g., gemini-2.0-flash, gemini-1.5-pro`},anthropic:{description:`Use Anthropic Claude models.`,apiKeyPlaceholder:`Enter your Anthropic API key`,helperText:`Get your API key from`,helperLinkLabel:`Anthropic Console`,modelPlaceholder:`e.g., claude-sonnet-4-20250514, claude-3-opus`},azure:{apiKeyPlaceholder:`Enter your Azure OpenAI API key`,deploymentNamePlaceholder:`e.g., gpt-4o-deployment`},ollama:{quickStart:`📋 Quick Start:`,installFrom:`Install Ollama from`,thenRun:`, then run:`,modelPlaceholder:`e.g., llama3.2, mistral, codellama`},openrouter:{apiKeyPlaceholder:`Enter your OpenRouter API key`,helperText:`Get your API key from`,helperLinkLabel:`OpenRouter Keys`},minimax:{apiKeyPlaceholder:`Enter your MiniMax API key`,helperText:`Get your API key from`,helperLinkLabel:`MiniMax Platform`,modelPlaceholder:`e.g., MiniMax-M2.5, MiniMax-M2.5-highspeed`,helperModel:`Available: MiniMax-M2.5 (default), MiniMax-M2.5-highspeed (faster)`},glm:{apiKeyPlaceholder:`Enter your Z.AI API key`}},loadingModels:`Loading models...`,noModelsMatch:`No models match "{{searchTerm}}"`,moreModels:`+{{count}} more • Refine your search`,apiKeySession:`API keys are stored in session storage and will be cleared when you close this tab.`,startLocalServer:`start the local server`,settingsSaved:`Settings saved`,failedToSave:`Failed to save`,saveSettings:`Save Settings`,endpoint:`Endpoint`,azurePortal:`Azure Portal`,azureHint:`Configure your Azure OpenAI service in the`,defaultPort:`Default port is`,pullModel:`Pull a model with`,browseModels:`Browse all models at`,openRouterModels:`OpenRouter Models`,zaiPlatform:`Z.AI Platform`,glmCodingApi:`Coding API (default). Use https://api.z.ai/api/paas/v4 for the general API.`,privacyFull:`Your API keys are stored only in your browser's session storage and are cleared when the tab closes. They're sent directly to the LLM provider when you chat. Your code never leaves your machine.`},"../locales/zh-CN/chat.json":{tabs:{chat:`Nexus AI`,processes:`流程`},suggestions:{architecture:`解释项目架构`,whatDoes:`这个项目是做什么的?`,importantFiles:`显示最重要的文件`,apiHandlers:`查找所有 API 处理器`},empty:{title:`可以问我任何问题`,description:`我可以帮你理解架构、查找函数或解释连接关系。`},input:{placeholder:`询问这个代码库...`,initializing:`正在初始化 AI Agent...`,configureProvider:`配置 LLM 提供商以启用聊天。`},actions:{closePanel:`关闭面板`,scrollBottom:`滚动到底部`,clearChat:`清空聊天`,stopResponse:`停止响应`},stopped:`用户已停止`,badges:{configureAI:`配置 AI`,connecting:`连接中`},roles:{you:`你`,assistant:`Nexus AI`},newBadge:`新`},"../locales/zh-CN/common.json":{app:{name:`GitNexus`,nexusAI:`Nexus AI`},actions:{cancel:`取消`,dismiss:`关闭`,tryAgain:`重试`,hide:`隐藏`,retry:`重试`,copy:`复制`,copied:`已复制`,close:`关闭`,run:`运行`,clear:`清空`,remove:`移除`,focusInGraph:`在图中聚焦`,expand:`展开`,collapse:`折叠`},chat:{viewNodeInCodePanel:`在代码面板中查看 {{inner}}`,openInCodePanel:`在代码面板中打开 • {{inner}}`,waitForVectorIndex:`请稍候,正在创建向量索引。`},counts:{files_one:`{{count}} 个文件`,files_other:`{{count}} 个文件`,nodes_one:`{{count}} 个节点`,nodes_other:`{{count}} 个节点`,edges_one:`{{count}} 条边`,edges_other:`{{count}} 条边`,symbols_one:`{{count}} 个符号`,symbols_other:`{{count}} 个符号`,flows_one:`{{count}} 条流程`,flows_other:`{{count}} 条流程`},progress:{connecting:`正在连接服务器...`,connectingShort:`正在连接...`,validatingServer:`正在验证服务器`,validatingServerEllipsis:`正在验证服务器...`,downloadingGraph:`正在下载图数据...`,downloadedMb:`已下载 {{mb}} MB`,downloadingWithPercent:`正在下载图数据... {{percent}}%`,downloadingMb:`正在下载... {{mb}} MB`,processing:`正在处理...`,processingGraph:`正在处理图数据...`,extractingFileContents:`正在提取文件内容`,loadingGraph:`正在加载图数据...`,starting:`正在启动...`,executing:`正在执行...`,truncated:`...(已截断)`,ready:`就绪`,switchingRepository:`正在切换仓库...`,loadingRepository:`正在加载 {{repo}}`,validating:`正在验证`,failedSwitchRepository:`切换仓库失败`,unknownError:`未知错误`},analyzePhases:{queued:`已排队`,cloning:`正在克隆仓库`,pulling:`正在拉取最新代码`,extracting:`正在扫描文件`,structure:`正在构建结构`,parsing:`正在解析代码`,imports:`正在解析导入`,calls:`正在追踪调用`,heritage:`正在提取继承关系`,scopeResolution:`正在解析类型`,communities:`正在检测社区`,processes:`正在检测流程`,complete:`流水线完成`,lbug:`正在加载数据库`,fts:`正在创建搜索索引`,embeddings:`正在生成嵌入向量`,done:`完成`,retrying:`崩溃后正在重试`},units:{elapsedSeconds:`{{seconds}} 秒`,elapsedMinutesSeconds:`{{minutes}} 分 {{seconds}} 秒`}},"../locales/zh-CN/errors.json":{unknown:`未知错误`,connectFailed:`连接服务器失败`,loadGraphFailed:`加载图数据失败`,failedToConnect:`连接失败`,analysisFailed:`分析失败,请检查服务器日志。`,startAnalysisFailed:`启动分析失败`,invalidGithubUrl:`请输入有效的 GitHub 仓库 URL。`,missingFolderPath:`请输入文件夹路径。`,backend:{reconnecting:`服务器连接已断开,正在重连…`,network:"无法连接 GitNexus 服务器,请确认 `gitnexus serve` 正在运行。",timeout:`服务器响应超时,请稍后重试。`,rateLimited:`请求过于频繁,请在 {{seconds}} 秒后重试。`,notFound:`未找到请求的仓库或资源。`,client:`请求失败:{{message}}`,server:`服务器错误:{{message}}`}},"../locales/zh-CN/graph.json":{statusBar:{sponsor:`赞助`,sponsorHint:`需要买点 API 额度跑 SWE-bench 😅`},loading:{filesProgress:`{{processed}} / {{total}} 个文件`},toolCall:{status:{running:`运行中`,completed:`已完成`,error:`错误`,stopped:`已停止`},tools:{search:`🔍 搜索代码`,cypher:`🔗 Cypher 查询`,grep:`🔎 模式搜索`,read:`📄 读取文件`,overview:`🗺️ 代码库概览`,explore:`🔬 深入分析`,impact:`💥 影响分析`},query:`查询`,input:`输入`,result:`结果`,searchPrefix:`搜索:"{{query}}"`},embedding:{generateTitle:`为语义搜索生成嵌入向量`,enable:`启用语义搜索`,loadingModel:`正在加载 AI 模型...`,embeddingNodes:`正在嵌入 {{processed}}/{{total}} 个节点`,creatingIndex:`正在创建向量索引...`,readyTitle:`语义搜索已就绪!可在 AI 聊天中使用自然语言。`,ready:`语义就绪`,errorTitle:`嵌入失败,点击重试。`,failedRetry:`失败 - 重试`,fallback:{title:`WebGPU 拒绝了请求`,subtitle:`你的浏览器不支持 GPU 加速`,description:`无法用 WebGPU 创建嵌入向量,因此语义搜索(Graph RAG)不会那么智能,但图谱仍可正常使用。`,options:`可选方案:`,useCpu:`使用 CPU`,useCpuDescriptionSmall:`可用,但会稍慢`,useCpuDescriptionLarge:`可用,但会慢很多`,estimated:`(约 {{minutes}} 分钟,{{count}} 个节点)`,skipIt:`跳过`,skipDescription:`图谱可用,但没有 AI 语义搜索`,smallCodebase:`检测到小型代码库!CPU 应该没问题。`,tip:`💡 提示:可尝试 Chrome 或 Edge 以获得 WebGPU 支持`,skipEmbeddings:`跳过嵌入`,useCpuRecommended:`使用 CPU(推荐)`,useCpuSlow:`使用 CPU(较慢)`}},queryFab:{query:`查询`,cypherQuery:`Cypher 查询`,examples:`示例`,run:`运行`,noProject:`未加载项目,请先加载项目。`,dbNotReady:`数据库尚未就绪,请等待加载完成。`,executionFailed:`查询执行失败`,exampleLabels:{functions:`所有函数`,classes:`所有类`,interfaces:`所有接口`,calls:`函数调用`,imports:`导入依赖`},clear:`清除`,rows:`行`,highlighted:`已高亮`,showingRows:`显示 {{count}} 行中的前 50 行`},fileTree:{expandPanel:`展开面板`,fileExplorer:`文件浏览器`,filters:`过滤器`,collapsePanel:`折叠面板`,searchFiles:`搜索文件...`,noFilesLoaded:`未加载文件`,all:`全部`,selectNodeDepth:`选择节点后才能应用深度过滤`,explorer:`浏览器`,nodeTypes:`节点类型`,nodeTypesDesc:`切换图中节点类型的可见性`,edgeTypes:`边类型`,edgeTypesDesc:`切换关系类型的可见性`,focusDepth:`聚焦深度`,focusDepthDesc:`显示所选节点 N 跳内的节点`,hops_one:`{{count}} 跳`,hops_other:`{{count}} 跳`,colorLegend:`颜色图例`},codePanel:{expand:`展开代码面板`,dragResize:`拖动调整大小`,title:`代码检查器`,clearCitations:`清除 AI 引用`,clearSelection:`清除选择`,loadingSource:`正在加载源码...`,selectFile:`选择文件节点以预览其内容。`,code:`代码`,selected:`已选择`,aiCitations:`AI 引用`,references_one:`{{count}} 条引用`,references_other:`{{count}} 条引用`,lines_one:`{{count}} 行`,lines_other:`{{count}} 行`,codeNotAvailable:`内存中没有 {{path}} 的代码内容`},canvas:{viewModes:{label:`图形视图模式`,force:`力导向图`,tree:`顺序布局`,circles:`径向布局`},zoomIn:`放大`,zoomOut:`缩小`,fit:`适应屏幕`,focusSelected:`聚焦所选节点`,clearSelection:`清除选择`,clear:`清除`,stopLayout:`停止布局`,runLayout:`重新运行布局`,layoutOptimizing:`正在优化布局...`,turnOffHighlights:`关闭全部高亮`,turnOnHighlights:`开启 AI 高亮`},processes:{unknownStep:`未知`,allProcessesLabel_one:`全部流程(合并 {{count}} 个)`,allProcessesLabel_other:`全部流程(合并 {{count}} 个)`,emptyTitle:`未检测到流程`,emptyDescription:`流程是从入口点追踪出的执行链路。加载代码库后即可查看检测到的流程。`,filterPlaceholder:`过滤流程...`,detected_one:`检测到 {{count}} 个流程`,detected_other:`检测到 {{count}} 个流程`,fullMap:`完整流程图`,viewCombined_one:`查看 {{count}} 个流程的合并图`,viewCombined_other:`查看 {{count}} 个流程的合并图`,crossCommunity:`跨社区`,intraCommunity:`社区内`,steps_one:`{{count}} 步`,steps_other:`{{count}} 步`,clusters_one:`{{count}} 个聚类`,clusters_other:`{{count}} 个聚类`,highlightTitle:`在图谱中高亮`,removeHighlightTitle:`移除图谱高亮`,loading:`加载中...`,viewing:`查看中`,view:`查看`},processFlow:{title:`流程:{{label}}`,diagramTooLarge:`📊 图表过大`,renderError:`⚠️ 渲染错误`,tooComplex_one:`该图表包含 {{count}} 个步骤,复杂度过高无法渲染。请查看单个流程,而不是“全部流程”。`,tooComplex_other:`该图表包含 {{count}} 个步骤,复杂度过高无法渲染。请查看单个流程,而不是“全部流程”。`,unableToRender_one:`无法渲染图表。步骤数:{{count}}`,unableToRender_other:`无法渲染图表。步骤数:{{count}}`,zoomOutTitle:`缩小 (-)`,zoomInTitle:`放大 (+)`,resetTitle:`重置缩放和平移`,resetView:`重置视图`,toggleFocus:`切换聚焦`,copyMermaid:`复制 Mermaid`},diagram:{aiGenerated:`AI 生成图表`,error:`图表错误`,showSource:`显示源码`,label:`图表`,expandTitle:`展开`,loading:`正在加载图表…`}},"../locales/zh-CN/header.json":{repositories:`仓库`,active:`当前`,reanalyzing:`正在重新分析...`,reanalyzeRepo:`重新分析 {{repoName}}`,deleteRepo:`删除 {{repoName}}`,reanalyzingRepo:`正在重新分析 {{repoName}}:{{message}}`,analyzeNew:`分析新仓库...`,searchNodes:`搜索节点...`,noNodesFound:`未找到“{{query}}”相关节点`,starIfCool:`觉得不错就点星`,aiSettings:`AI 设置`,help:`帮助`,language:`语言`,selectLanguage:`选择语言`},"../locales/zh-CN/help.json":{tabs:{overview:`概览`,ai:`Nexus AI`,shortcuts:`快捷键`,status:`状态栏`,graph:`图谱与节点`,search:`搜索与过滤`},shortcuts:{searchNodes:`搜索节点`,deselectClose:`取消选择 / 关闭`,columns:{action:`操作`,mac:`Mac`,windows:`Windows`}},nodeTypes:{function:`函数`,functionDesc:`函数声明`,file:`文件`,fileDesc:`源码文件`,class:`类`,classDesc:`类声明`,method:`方法`,methodDesc:`类方法`,interface:`接口`,interfaceDesc:`TypeScript 接口`,folder:`文件夹`,folderDesc:`目录节点`},status:{ready:`就绪`,readyDesc:`图谱已完全加载并可交互`,nodesCount:`节点数`,nodesCountDesc:`图谱中的文件与符号总数`,edgesCount:`边数`,edgesCountDesc:`导入 / 依赖连接`,aiIndexStatus:`AI 索引状态`,aiIndexStatusDesc:`仓库已完成 AI 查询索引`,semanticReadyBadge:`语义就绪`,explained:`状态栏说明`},tryAsking:`可以尝试问:`,footer:`GitNexus — 图谱浏览器`,title:`帮助与参考`,footerLong:`GitNexus — 开源代码库图谱浏览器`,docsGithub:`文档与 GitHub ↗`,overview:{gettingStarted:`开始使用`,whatIsTitle:`GitNexus 是什么?`,whatIsDescription:`GitNexus 是代码库的交互式图谱浏览器。每个文件、函数和导入关系都会变成可探索、可查询、可视化导航的节点。`,currentRepoTitle:`当前仓库`,loadedCounts:`已加载:{{nodeCount}} 个节点 · {{edgeCount}} 条边`,threeWaysTitle:`三种探索方式`,wayInspect:`点击节点查看详情`,waySearch:`按名称或类型搜索`,wayAsk:`向 Nexus AI 提出自然语言问题`,navigationTitle:`导航`,navZoom:`滚动缩放`,navPan:`点击并拖动进行平移`,navFocus:`双击节点聚焦其子图`},graph:{nodeColorLegend:`节点颜色图例`,nodeLabel:`{{label}}节点`,sizeDescription:`节点大小反映连接数量——越大的节点被越多文件依赖。边的方向表示从导入方 → 被导入方。`,detailDescription:`点击任意节点可打开详情面板,查看导入、导出和反向依赖。`},search:{title:`搜索与过滤`,searchNodes:`搜索节点`,searchDescription:`可按文件名、函数名或导入路径搜索,匹配的节点会在图谱中实时高亮。`,filterPanel:`过滤面板`,filterDescription:`使用左侧栏的过滤图标隔离特定节点类型、隐藏叶子节点,或以选中节点为根聚焦指定深度范围。`,syntax:`搜索语法`,hints:{nameFragment:`按名称片段匹配`,pathPrefix:`按路径前缀匹配`,nodeType:`按节点类型过滤`}},ai:{title:`Nexus AI`,semanticReady:`✓ 语义索引就绪`,description:`仓库已完成索引,可进行语义查询。Nexus AI 理解代码结构和关系,而不只是文件名。`,questions:{dependencies:`“哪些文件依赖 auth 模块?”`,circular:`“找出这个仓库中的循环依赖”`,connected:`“哪些组件连接最密集?”`,imports:`“显示所有导入 useEffect 的文件”`},openPrompt:`点击右上角的 Nexus AI 按钮打开提问面板。`}},"../locales/zh-CN/onboarding.json":{success:{title:`服务器已连接`,description:`正在准备代码知识图谱...`},loading:{largeRepoHint:`大型仓库可能需要一些时间`},guide:{copyAria:`复制到剪贴板`,copiedAria:`已复制!`,startServer:`启动本地服务器`,devDescription:`在另一个终端启动 Express 后端,即可启用完整图谱。`,prodDescription:`只需一条命令,浏览器会自动连接。`,copyCommand:`复制命令`,copyCommandDescription:`点击终端右侧图标复制。`,done:`完成`,orInstallGlobally:`或全局安装`,globalInstall:`全局安装`,startBackend:`启动后端`,terminal:`终端`,waitingForServer:`等待服务器启动`,pasteAndRun:`粘贴并在终端运行`,pasteAndRunDescription:`在项目根目录打开终端,粘贴命令并回车。`,listeningForServer:`正在监听服务器`,willAutoConnect:`检测到后会自动连接`,autoConnects:`自动连接并打开图谱`,autoConnectsDescription:`无需刷新,页面会自动检测服务器。`,requires:`需要`,port:`端口 4747`},analyzeFirst:{title:`分析你的第一个仓库`,description:`粘贴 GitHub URL,GitNexus 会克隆仓库、解析代码,并直接在浏览器中构建实时知识图谱。`,footer:`仅支持公开仓库 · 服务器本地克隆 · 数据不会离开你的机器`},landing:{chooseRepository:`选择仓库`,description:`选择一个已索引仓库开始探索,或分析一个新仓库。`,indexed:`索引于 {{time}}`,orAnalyzeNew:`或分析新仓库`,footer:`支持公开与私有仓库 · 服务器本地克隆 · 数据不会离开你的机器`,time:{justNow:`刚刚`,minutesAgo:`{{count}} 分钟前`,hoursAgo:`{{count}} 小时前`,daysAgo:`{{count}} 天前`}},repoAnalyzer:{inputType:`输入类型`,githubUrl:`GitHub URL`,gitlabUrl:`GitLab URL`,localFolder:`本地文件夹`,starting:`正在启动分析...`,analyzeRepository:`分析仓库`,complete:`分析完成`,loadingGraph:`正在加载图数据...`,defaultRepoName:`仓库`,githubRepositoryUrl:`GitHub 仓库 URL`,gitlabRepositoryUrl:`GitLab 仓库 URL`,gitlabSupported:`支持 GitLab.com 和自托管 GitLab 实例。`,localFolderPath:`本地文件夹路径`,browseForFolder:`浏览文件夹`,hideBackground:`隐藏(分析继续在后台进行)`}},"../locales/zh-CN/settings.json":{title:`AI 设置`,subtitle:`配置你的 LLM 提供商`,localServer:`本地服务器`,backendUrl:`后端 URL`,connected:`已连接`,notConnected:`未连接`,runServeHint:"运行 `gitnexus serve` 将 Web UI 连接到本地后端。",provider:`提供商`,apiKey:`API Key`,learnMore:`了解更多`,model:`模型`,searchModelPlaceholder:`搜索或输入模型 ID...`,selectModelPlaceholder:`选择或输入模型...`,customModelHint:`输入模型 ID 或按 Enter`,customModelExample:`例如 openai/gpt-4o`,pressEnterCustom:`按 Enter 使用自定义 ID`,baseUrl:`Base URL`,optional:`可选`,deploymentName:`部署名称`,apiVersion:`API 版本`,checkConnection:`检查连接`,privacyLabel:`隐私:`,privacyText:`你的 API Key 仅保存在此浏览器本地。`,providers:{openai:{description:`使用 OpenAI 模型进行聊天和代码推理。`,apiKeyPlaceholder:`输入 OpenAI API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`OpenAI Platform`,modelPlaceholder:`例如:gpt-4o、gpt-4-turbo、gpt-3.5-turbo`,baseUrlPlaceholder:`https://api.openai.com/v1(默认)`,baseUrlHint:`留空则使用默认 OpenAI API。可为代理或兼容 API 设置自定义 URL。`},gemini:{description:`使用 Google Gemini 模型。`,apiKeyPlaceholder:`输入 Google AI API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`Google AI Studio`,modelPlaceholder:`例如:gemini-2.0-flash、gemini-1.5-pro`},anthropic:{description:`使用 Anthropic Claude 模型。`,apiKeyPlaceholder:`输入 Anthropic API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`Anthropic Console`,modelPlaceholder:`例如:claude-sonnet-4-20250514、claude-3-opus`},azure:{apiKeyPlaceholder:`输入 Azure OpenAI API Key`,deploymentNamePlaceholder:`例如:gpt-4o-deployment`},ollama:{quickStart:`📋 快速开始:`,installFrom:`从这里安装 Ollama:`,thenRun:`,然后运行:`,modelPlaceholder:`例如:llama3.2、mistral、codellama`},openrouter:{apiKeyPlaceholder:`输入 OpenRouter API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`OpenRouter Keys`},minimax:{apiKeyPlaceholder:`输入 MiniMax API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`MiniMax Platform`,modelPlaceholder:`例如:MiniMax-M2.5、MiniMax-M2.5-highspeed`,helperModel:`可用:MiniMax-M2.5(默认)、MiniMax-M2.5-highspeed(更快)`},glm:{apiKeyPlaceholder:`输入 Z.AI API Key`}},loadingModels:`正在加载模型...`,noModelsMatch:`没有匹配“{{searchTerm}}”的模型`,moreModels:`+{{count}} 个更多模型 • 缩小搜索范围`,apiKeySession:`API Key 保存在会话存储中,关闭此标签页后会被清除。`,startLocalServer:`启动本地服务器`,settingsSaved:`设置已保存`,failedToSave:`保存失败`,saveSettings:`保存设置`,endpoint:`端点`,azurePortal:`Azure Portal`,azureHint:`在这里配置 Azure OpenAI 服务:`,defaultPort:`默认端口为`,pullModel:`使用以下命令拉取模型`,browseModels:`在这里浏览全部模型:`,openRouterModels:`OpenRouter Models`,zaiPlatform:`Z.AI Platform`,glmCodingApi:`Coding API(默认)。通用 API 请使用 https://api.z.ai/api/paas/v4。`,privacyFull:`你的 API Key 只保存在此浏览器的会话存储中,关闭标签页后会清除。聊天时会直接发送给 LLM 提供商,你的代码不会离开本机。`}}),zr={},Br=new Set;for(let[e,t]of Object.entries(Rr)){let n=e.match(/\.\.\/locales\/([^/]+)\/([^/.]+)\.json$/);if(!n)continue;let[,r,i]=n;zr[r]??={},zr[r][i]=t,Br.add(i)}var Vr=Array.from(Br).sort(),Hr=`common`,Ur=`gitnexus.lng`;function Wr(e){if(typeof document>`u`)return;let t=Lr(e);document.documentElement.lang=t.code,document.documentElement.dir=t.dir}function Gr(e){return Ir(e)??`en`}function Kr(e){let t=Ir(e);if(!(!t||typeof window>`u`))try{window.localStorage.setItem(Ur,t)}catch{}}Ln.use(sr).use(Er).init({resources:zr,fallbackLng:`en`,supportedLngs:Fr,load:`currentOnly`,ns:Vr,defaultNS:Hr,fallbackNS:!1,returnEmptyString:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1},detection:{order:[`querystring`,`localStorage`,`navigator`,`htmlTag`],lookupQuerystring:`lng`,lookupLocalStorage:Ur,caches:[],convertDetectedLanguage:Gr}}).then(()=>{let e=Ln.resolvedLanguage||Ln.language;Wr(e),Kr(e)}),Ln.on(`languageChanged`,e=>{let t=Ln.resolvedLanguage||e;Wr(t),Kr(t)});var qr=Ln,Jr=e=>e.replace(/\\/g,`/`).replace(/^\.?\//,``),Yr=/\[\[([a-zA-Z0-9_\-./\\]+\.[a-zA-Z0-9]+)(?::(\d+)(?:[-–](\d+))?)?\]\]/g,Xr=/\[\[(?:graph:)?(Class|Function|Method|Interface|File|Folder|Variable|Enum|Type|CodeElement):([^\]]+)\]\]/g,Zr={Project:`#a855f7`,Package:`#8b5cf6`,Module:`#7c3aed`,Folder:`#6366f1`,File:`#3b82f6`,Class:`#f59e0b`,Function:`#10b981`,Method:`#14b8a6`,Variable:`#64748b`,Interface:`#ec4899`,Enum:`#f97316`,Decorator:`#eab308`,Import:`#475569`,Type:`#a78bfa`,CodeElement:`#64748b`,Community:`#818cf8`,Process:`#f43f5e`,Section:`#60a5fa`,Struct:`#f59e0b`,Trait:`#ec4899`,Impl:`#14b8a6`,TypeAlias:`#a78bfa`,Const:`#64748b`,Static:`#64748b`,Namespace:`#7c3aed`,Union:`#f97316`,Typedef:`#a78bfa`,Macro:`#eab308`,Property:`#64748b`,Record:`#f59e0b`,Delegate:`#14b8a6`,Annotation:`#eab308`,Constructor:`#10b981`,Template:`#a78bfa`,Route:`#f43f5e`,Tool:`#a855f7`},Qr={Project:20,Package:16,Module:13,Folder:10,File:6,Class:8,Function:4,Method:3,Variable:2,Interface:7,Enum:5,Decorator:2,Import:1.5,Type:3,CodeElement:2,Community:0,Process:0,Section:8,Struct:8,Trait:7,Impl:3,TypeAlias:3,Const:2,Static:2,Namespace:13,Union:5,Typedef:3,Macro:2,Property:2,Record:8,Delegate:3,Annotation:2,Constructor:4,Template:3,Route:5,Tool:5},$r=[`#ef4444`,`#f97316`,`#eab308`,`#22c55e`,`#06b6d4`,`#3b82f6`,`#8b5cf6`,`#d946ef`,`#ec4899`,`#f43f5e`,`#14b8a6`,`#84cc16`],ei=e=>$r[e%$r.length],ti=[`Project`,`Package`,`Module`,`Folder`,`File`,`Class`,`Function`,`Method`,`Property`,`Const`,`Interface`,`Enum`,`Type`],ni=[`Folder`,`File`,`Class`,`Interface`,`Enum`,`Type`,`Function`,`Method`,`Variable`,`Property`,`Const`,`Decorator`,`Import`],ri=[`CONTAINS`,`DEFINES`,`IMPORTS`,`CALLS`,`EXTENDS`,`IMPLEMENTS`],ii=[`CONTAINS`,`DEFINES`,`IMPORTS`,`EXTENDS`,`IMPLEMENTS`,`CALLS`],ai={CONTAINS:{color:`#2d5a3d`,label:`Contains`},DEFINES:{color:`#0e7490`,label:`Defines`},IMPORTS:{color:`#1d4ed8`,label:`Imports`},CALLS:{color:`#7c3aed`,label:`Calls`},EXTENDS:{color:`#c2410c`,label:`Extends`},IMPLEMENTS:{color:`#be185d`,label:`Implements`}},oi=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),G=n(((e,t)=>{t.exports=oi()}))(),si=(0,W.createContext)(null),ci=({children:e})=>{let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)(null),[a,o]=(0,W.useState)(ti),[s,c]=(0,W.useState)(ii),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(new Set),[p,m]=(0,W.useState)(`force`),h=(0,W.useCallback)(e=>{o(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),g=(0,W.useCallback)(e=>{c(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),_=(0,W.useMemo)(()=>({graph:t,setGraph:n,selectedNode:r,setSelectedNode:i,visibleLabels:a,toggleLabelVisibility:h,visibleEdgeTypes:s,toggleEdgeVisibility:g,depthFilter:l,setDepthFilter:u,highlightedNodeIds:d,setHighlightedNodeIds:f,graphViewMode:p,setGraphViewMode:m}),[t,r,a,s,l,d,p]);return(0,G.jsx)(si.Provider,{value:_,children:e})},li=()=>{let e=(0,W.useContext)(si);if(!e)throw Error(`useGraphState must be used within a GraphStateProvider`);return e},ui=`gitnexus.autoStartEmbeddings`,di=()=>typeof window>`u`||!window.localStorage?!1:window.localStorage.getItem(ui)===`true`,fi=(0,W.createContext)(null),pi=({children:e})=>(0,G.jsx)(ci,{children:(0,G.jsx)(mi,{children:e})}),mi=({children:e})=>{let[t,n]=(0,W.useState)(`onboarding`),{graph:r,setGraph:i,selectedNode:a,setSelectedNode:o,visibleLabels:s,toggleLabelVisibility:c,visibleEdgeTypes:l,toggleEdgeVisibility:u,depthFilter:d,setDepthFilter:f,highlightedNodeIds:p,setHighlightedNodeIds:m,graphViewMode:h,setGraphViewMode:g}=li(),[_,v]=(0,W.useState)(!1),[y,b]=(0,W.useState)(`code`),[x,S]=(0,W.useState)(!1),C=(0,W.useCallback)(()=>{Fe(!0)},[]),T=(0,W.useCallback)(()=>{v(!0),b(`chat`)},[]),[E,D]=(0,W.useState)(null),[O,k]=(0,W.useState)(new Set),[ee,A]=(0,W.useState)(new Set),[j,M]=(0,W.useState)(new Set),[N,P]=(0,W.useState)(!0),te=(0,W.useCallback)(()=>{P(e=>!e)},[]),ne=(0,W.useCallback)(()=>{A(new Set)},[]),F=(0,W.useCallback)(()=>{k(new Set)},[]),I=(0,W.useCallback)(()=>{M(new Set)},[]),L=(0,W.useCallback)(()=>{m(new Set),D(null)},[]),[re,ie]=(0,W.useState)(new Map),ae=(0,W.useRef)(null),oe=(0,W.useCallback)((e,t)=>{let n=Date.now(),r=t===`pulse`?2e3:t===`ripple`?3e3:4e3;ie(i=>{let a=new Map(i);for(let i of e)a.set(i,{type:t,startTime:n,duration:r});return a}),setTimeout(()=>{ie(t=>{let r=new Map(t);for(let t of e){let e=r.get(t);e&&e.startTime===n&&r.delete(t)}return r})},r+100)},[]),R=(0,W.useCallback)(()=>{ie(new Map),ae.current&&=(clearInterval(ae.current),null)},[]),[z,B]=(0,W.useState)(null),[se,V]=(0,W.useState)(``),[H,U]=(0,W.useState)(null),[ce,le]=(0,W.useState)([]),[ue,de]=(0,W.useState)(`idle`),[fe,pe]=(0,W.useState)(null),[me,he]=(0,W.useState)(et),[ge,_e]=(0,W.useState)(!1),[be,xe]=(0,W.useState)(!1),[Se,Ce]=(0,W.useState)(!1),[we,Te]=(0,W.useState)(null),[Ee,De]=(0,W.useState)([]),[Oe,ke]=(0,W.useState)(!1),[Ae,je]=(0,W.useState)([]),[Me,Ne]=(0,W.useState)([]),[Pe,Fe]=(0,W.useState)(!1),[Ie,Le]=(0,W.useState)(null),Re=(0,W.useMemo)(()=>{if(!r)return new Map;let e=new Map;for(let t of r.nodes)t.label===`File`&&e.set(Jr(t.properties.filePath),t.id);return e},[r]),ze=(0,W.useMemo)(()=>{if(!r)return new Map;let e=new Map;for(let t of r.nodes)t.label===`File`&&t.properties.filePath&&e.set(Jr(t.properties.filePath),t.properties.filePath);return e},[r]),Be=(0,W.useCallback)(e=>{let t=Jr(e);if(ze.has(t))return ze.get(t);for(let[e,n]of ze)if(e.endsWith(t))return n;return null},[ze]),Ve=(0,W.useCallback)(e=>Re.get(Jr(e)),[Re]),He=(0,W.useCallback)(e=>{let t=`ref-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,n={...e,id:t};Ne(t=>t.some(t=>t.filePath===e.filePath&&t.startLine===e.startLine&&t.endLine===e.endLine)?t:[...t,n]),Fe(!0),Le({filePath:e.filePath,startLine:e.startLine,endLine:e.endLine,ts:Date.now()}),e.nodeId&&e.source===`ai`&&k(t=>new Set([...t,e.nodeId]))},[]),Ue=(0,W.useCallback)(()=>{Ne(e=>{let t=e.filter(e=>e.source===`ai`),n=e.filter(e=>e.source!==`ai`),r=new Set(t.map(e=>e.nodeId).filter(Boolean));return r.size>0&&k(e=>{let t=new Set(e);for(let e of r)t.delete(e);return t}),n.length===0&&!a&&Fe(!1),n})},[a]);(0,W.useEffect)(()=>{a&&Fe(!0)},[a]);let We=(0,W.useRef)(void 0),Ge=(0,W.useCallback)(e=>{We.current=e},[]),Ke=(0,W.useCallback)(async e=>jt(e,We.current),[]),qe=(0,W.useCallback)(async()=>Tt(),[]),Je=(0,W.useRef)(null),Ye=(0,W.useCallback)(async()=>{let e=We.current;if(!e)throw Error(`No repository loaded`);de(`loading`),pe(null);try{let{jobId:t}=await Rt(e);await new Promise((e,n)=>{Je.current=zt(t,e=>{pe({phase:e.phase,percent:e.percent}),e.phase===`loading-model`||e.phase===`loading`?de(`loading`):e.phase===`embedding`?de(`embedding`):e.phase===`indexing`&&de(`indexing`)},()=>{de(`ready`),pe({phase:`ready`,percent:100}),e()},e=>{de(`error`),n(Error(e))})})}catch(e){if(e?.message?.includes(`already in progress`)){de(`embedding`);return}throw de(`error`),e}},[]),Xe=(0,W.useCallback)(()=>{if(typeof navigator<`u`&&navigator.webdriver||typeof process<`u`&&{}.PLAYWRIGHT_TEST){de(`idle`);return}if(!di()){de(`idle`);return}Ye().catch(e=>{console.warn(`Embeddings auto-start failed:`,e)})},[Ye]),Ze=(0,W.useCallback)(async(e,t=10)=>Mt(e,{limit:t,mode:`semantic`,repo:We.current}),[]),Qe=(0,W.useCallback)(async(e,t=5,n=2)=>Mt(e,{limit:t,mode:`semantic`,enrich:!0,repo:We.current}),[]),$e=(0,W.useCallback)(e=>{he(t=>{let n={...t,...e};return tt(n),n})},[]),nt=(0,W.useCallback)(()=>{he(et())},[]),it=(0,W.useRef)(null),at=(0,W.useRef)(null),ot=(0,W.useRef)(`idle`),ct=(0,W.useCallback)(async e=>{let t=rt();if(!t){Te(`Please configure an LLM provider in settings`);return}Ce(!0),Te(null);try{let n=e||se||`project`;e&&(We.current=e);let r=We.current,{createGraphRAGAgent:i}=await w(async()=>{let{createGraphRAGAgent:e}=await import(`./agent-EkX7webX.js`);return{createGraphRAGAgent:e}},__vite__mapDeps([0,1,2])),{buildCodebaseContext:a}=await w(async()=>{let{buildCodebaseContext:e}=await import(`./context-builder-_HS0v2ma.js`);return{buildCodebaseContext:e}},[]),o=e=>jt(e,r),s=await a(o,n);it.current=i(t,{executeQuery:o,search:(e,t)=>Mt(e,{...t,repo:r}),grep:(e,t)=>Nt(e,r,t),readFile:e=>Pt(e,{repo:r}).then(e=>e.content)},s),xe(!0),Te(null)}catch(e){Te(e instanceof Error?e.message:String(e)),xe(!1)}finally{Ce(!1)}},[]),lt=(0,W.useCallback)(async e=>{if(ot.current!==`idle`||(Ue(),ne(),!be&&(await ct(),!it.current)))return;let t={id:`user-${Date.now()}`,role:`user`,content:e,timestamp:Date.now()};if(De(e=>[...e,t]),ue===`indexing`){let e={id:`assistant-${Date.now()}`,role:`assistant`,content:qr.t(`common:chat.waitForVectorIndex`),timestamp:Date.now()};De(t=>[...t,e]),Te(null),ke(!1),je([]);return}ke(!0),ot.current=`streaming`,je([]),at.current?.abort();let n=new AbortController;at.current=n;let i=st(me.activeProvider),a=[...Ee,t].flatMap(e=>e.role===`user`?[{role:`user`,content:e.content}]:e.role===`tool`?e.toolCallId?[{role:`tool`,content:e.content,toolCallId:e.toolCallId}]:[]:i.preserveAssistantTranscript&&e.historyMessages?.length?e.historyMessages:[{role:`assistant`,content:e.content}]),o=`assistant-${Date.now()}`,s=[],c=[],l=0,u,d=()=>{let e=s.filter(e=>e.type===`reasoning`||e.type===`content`).map(e=>e.content).filter(Boolean).join(`
13
13
 
14
- `);De(t=>{let n=t.find(e=>e.id===o),r={id:o,role:`assistant`,content:e,historyMessages:u,steps:[...s],toolCalls:[...c],timestamp:n?.timestamp??Date.now()};return n?t.map(e=>e.id===o?r:e):[...t,r]})},f=!1,p=null,m=()=>{f||(f=!0,p=requestAnimationFrame(()=>{f=!1,p=null,d()}))};try{let e=e=>{switch(e.type){case`reasoning`:if(e.reasoning){let t=s[s.length-1];t&&t.type===`reasoning`?s[s.length-1]={...t,content:(t.content||``)+e.reasoning}:s.push({id:`step-${l++}`,type:`reasoning`,content:e.reasoning}),m()}break;case`content`:if(e.content){let t=s[s.length-1];t&&t.type===`content`?s[s.length-1]={...t,content:(t.content||``)+e.content}:s.push({id:`step-${l++}`,type:`content`,content:e.content}),m();let n=s[s.length-1],i=n&&n.type===`content`&&n.content||``,a=new RegExp(Yr.source,Yr.flags),o;for(;(o=a.exec(i))!==null;){let e=o[1].trim(),t=o[2]?parseInt(o[2],10):void 0,n=o[3]?parseInt(o[3],10):t,r=Be(e);if(!r)continue;let i=t===void 0?void 0:Math.max(0,t-1);He({filePath:r,startLine:i,endLine:n===void 0?i:Math.max(0,n-1),nodeId:Ve(r),label:`File`,name:r.split(`/`).pop()??r,source:`ai`})}let c=new RegExp(Xr.source,Xr.flags),u;for(;(u=c.exec(i))!==null;){let e=u[1],t=u[2].trim();if(!r)continue;let n=r.nodes.find(n=>n.label===e&&n.properties.name===t);if(!n||!n.properties.filePath)continue;let i=Be(n.properties.filePath);i&&He({filePath:i,startLine:n.properties.startLine?n.properties.startLine-1:void 0,endLine:n.properties.endLine?n.properties.endLine-1:void 0,nodeId:n.id,label:n.label,name:n.properties.name,source:`ai`})}}break;case`tool_call`:if(e.toolCall){let t=e.toolCall;c.push(t),s.push({id:`step-${l++}`,type:`tool_call`,toolCall:t}),je(e=>[...e,t]),m()}break;case`tool_result`:if(e.toolCall){let t=e.toolCall,n=c.findIndex(e=>e.id===t.id);n<0&&(n=c.findIndex(e=>e.name===t.name&&e.status===`running`)),n<0&&(n=c.findIndex(e=>e.name===t.name&&!e.result)),n>=0&&c[n].status!==`stopped`&&(c[n]={...c[n],result:t.result,status:`completed`});let i=s.findIndex(e=>e.type===`tool_call`&&e.toolCall&&(e.toolCall.id===t.id||e.toolCall.name===t.name&&e.toolCall.status===`running`));if(i>=0&&s[i].toolCall&&s[i].toolCall.status!==`stopped`&&(s[i]={...s[i],toolCall:{...s[i].toolCall,result:t.result,status:`completed`}}),je(e=>{let n=e.findIndex(e=>e.id===t.id);return n<0&&(n=e.findIndex(e=>e.name===t.name&&e.status===`running`)),n<0&&(n=e.findIndex(e=>e.name===t.name&&!e.result)),n>=0?e[n].status===`stopped`?e:e.map((e,r)=>r===n?{...e,result:t.result,status:`completed`}:e):e}),m(),t.result){let e=t.result.match(/\[HIGHLIGHT_NODES:([^\]]+)\]/);if(e){let t=e[1].split(`,`).map(e=>e.trim()).filter(Boolean);if(t.length>0&&r){let e=new Set,n=new Set(r.nodes.map(e=>e.id));for(let i of t)if(n.has(i))e.add(i);else{let t=r.nodes.find(e=>e.id.endsWith(i)||e.id.endsWith(`:`+i))?.id;t&&e.add(t)}e.size>0&&A(e)}else t.length>0&&A(new Set(t))}let n=t.result.match(/\[IMPACT:([^\]]+)\]/);if(n){let e=n[1].split(`,`).map(e=>e.trim()).filter(Boolean);if(e.length>0&&r){let t=new Set,n=new Set(r.nodes.map(e=>e.id));for(let i of e)if(n.has(i))t.add(i);else{let e=r.nodes.find(e=>e.id.endsWith(i)||e.id.endsWith(`:`+i))?.id;e&&t.add(e)}t.size>0&&M(t)}else e.length>0&&M(new Set(e))}}}break;case`error`:Te(e.error??`Unknown error`);break;case`done`:u=i.preserveAssistantTranscript?e.historyMessages:void 0,m();break}},t=it.current;if(!t)throw Error(`Agent not initialized`);let{streamAgentResponse:o}=await w(async()=>{let{streamAgentResponse:e}=await import(`./agent-BRX-afm3.js`);return{streamAgentResponse:e}},__vite__mapDeps([0,1,2]));for await(let r of o(t,a,{captureHistory:i.preserveAssistantTranscript,signal:n.signal})){if(r.type===`cancelled`)break;e(r)}}catch(e){n.signal.aborted||Te(e instanceof Error?e.message:String(e))}finally{p!=null&&(cancelAnimationFrame(p),p=null),ot.current=`idle`,ke(!1),je([])}},[Ee,be,ct,Be,Ve,He,Ue,ne,r,ue]),ut=(0,W.useCallback)(()=>{if(!at.current)return;ot.current=`aborting`,at.current.abort(),at.current=null;let e=qr.t(`chat:stopped`),t=t=>t.status===`running`||t.status===`pending`?{...t,status:`stopped`,result:e}:t;je(e=>e.map(t)),De(e=>{let n=[...e].map((e,t)=>e.role===`assistant`?t:-1).filter(e=>e>=0).pop();if(n===void 0)return e;let r=e[n],i={...r,toolCalls:r.toolCalls?.map(t),steps:r.steps?.map(e=>e.type===`tool_call`&&e.toolCall?{...e,toolCall:t(e.toolCall)}:e)};return e.map((e,t)=>t===n?i:e)}),ke(!1)},[]),dt=(0,W.useCallback)(()=>{at.current?.abort(),at.current=null,ot.current=`idle`,De([]),je([]),Te(null),ke(!1)},[]),ft=(0,W.useCallback)(async e=>{if(!H)return;B({phase:`extracting`,percent:0,message:qr.t(`common:progress.switchingRepository`),detail:qr.t(`common:progress.loadingRepository`,{repo:e})}),n(`loading`),xe(!1),m(new Set),ne(),F(),I(),o(null),D(null),Ne([]),Fe(!1),Le(null);let t=e||`server-project`;try{let n=await Bt(H,(e,t,n)=>{if(e===`validating`)B({phase:`extracting`,percent:5,message:qr.t(`common:progress.switchingRepository`),detail:qr.t(`common:progress.validating`)});else if(e===`downloading`){let e=n?Math.round(t/n*90)+5:50,r=(t/(1024*1024)).toFixed(1);B({phase:`extracting`,percent:e,message:qr.t(`common:progress.downloadingGraph`),detail:qr.t(`common:progress.downloadedMb`,{mb:r})})}else e===`extracting`&&B({phase:`extracting`,percent:97,message:qr.t(`common:progress.processing`),detail:qr.t(`common:progress.extractingFileContents`)})},void 0,e,{awaitAnalysis:!0}),r=n.repoInfo.repoPath??n.repoInfo.path,a=e||n.repoInfo.name||(r||``).replace(/\\/g,`/`).split(`/`).filter(Boolean).pop()||`server-project`;V(a),We.current=a,n.repoInfo,t=a;let o=ve();for(let e of n.nodes)o.addNode(e);for(let e of n.relationships)o.addRelationship(e);i(o)}catch(e){console.error(`Repo switch failed:`,e),B({phase:`error`,percent:0,message:qr.t(`common:progress.failedSwitchRepository`),detail:e instanceof Error?e.message:qr.t(`common:progress.unknownError`)}),xe(!1),it.current=null,setTimeout(()=>{n(`exploring`),B(null)},ye);return}if(t){let e=new URL(window.location.href);e.searchParams.set(`project`,t),window.history.replaceState(null,``,e.toString())}it.current=null,xe(!1),De([]);try{rt()&&await ct(t),n(`exploring`),Xe(),B(null)}catch(e){console.warn(`Failed to initialize agent:`,e),xe(!1),it.current=null,Te(`Failed to initialize agent`),n(`exploring`),B(null)}},[H,B,n,V,i,ct,Xe,m,ne,F,I,o,D,Ne,Fe,Le,De]),pt=(0,W.useCallback)(e=>{Ne(t=>{let n=t.find(t=>t.id===e),r=t.filter(t=>t.id!==e);return n?.nodeId&&n.source===`ai`&&(r.some(e=>e.nodeId===n.nodeId&&e.source===`ai`)||k(e=>{let t=new Set(e);return t.delete(n.nodeId),t})),r.length===0&&!a&&Fe(!1),r})},[a]),mt=(0,W.useCallback)(()=>{Ne([]),Fe(!1),Le(null)},[]),ht={viewMode:t,setViewMode:n,graph:r,setGraph:i,selectedNode:a,setSelectedNode:o,isRightPanelOpen:_,setRightPanelOpen:v,rightPanelTab:y,setRightPanelTab:b,openCodePanel:C,openChatPanel:T,helpDialogBoxOpen:x,setHelpDialogBoxOpen:S,visibleLabels:s,toggleLabelVisibility:c,visibleEdgeTypes:l,toggleEdgeVisibility:u,depthFilter:d,setDepthFilter:f,graphViewMode:h,setGraphViewMode:g,highlightedNodeIds:p,setHighlightedNodeIds:m,aiCitationHighlightedNodeIds:O,aiToolHighlightedNodeIds:ee,blastRadiusNodeIds:j,isAIHighlightsEnabled:N,toggleAIHighlights:te,clearAIToolHighlights:ne,clearAICitationHighlights:F,clearBlastRadius:I,queryResult:E,setQueryResult:D,clearQueryHighlights:L,animatedNodes:re,triggerNodeAnimation:oe,clearAnimations:R,progress:z,setProgress:B,projectName:se,setProjectName:V,serverBaseUrl:H,setServerBaseUrl:U,availableRepos:ce,setAvailableRepos:le,switchRepo:ft,setCurrentRepo:Ge,runQuery:Ke,isDatabaseReady:qe,embeddingStatus:ue,embeddingProgress:fe,startEmbeddings:Ye,startEmbeddingsWithFallback:Xe,semanticSearch:Ze,semanticSearchWithContext:Qe,isEmbeddingReady:ue===`ready`,llmSettings:me,updateLLMSettings:$e,isSettingsPanelOpen:ge,setSettingsPanelOpen:_e,isAgentReady:be,isAgentInitializing:Se,agentError:we,chatMessages:Ee,isChatLoading:Oe,currentToolCalls:Ae,refreshLLMSettings:nt,initializeAgent:ct,sendChatMessage:lt,stopChatResponse:ut,clearChat:dt,codeReferences:Me,isCodePanelOpen:Pe,setCodePanelOpen:Fe,addCodeReference:He,removeCodeReference:pt,clearAICodeReferences:Ue,clearCodeReferences:mt,codeReferenceFocus:Ie};return(0,G.jsx)(fi.Provider,{value:ht,children:e})},hi=()=>{let e=(0,W.useContext)(fi);if(!e)throw Error(`useAppState must be used within AppStateProvider`);return e},gi=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),_i=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),vi=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),yi=e=>{let t=vi(e);return t.charAt(0).toUpperCase()+t.slice(1)},bi={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`},xi=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Si=(0,W.createContext)({}),Ci=()=>(0,W.useContext)(Si),wi=(0,W.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Ci()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,W.createElement)(`svg`,{ref:c,...bi,width:t??l??bi.width,height:t??l??bi.height,stroke:e??f,strokeWidth:m,className:gi(`lucide`,p,i),...!a&&!xi(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,W.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),K=(e,t)=>{let n=(0,W.forwardRef)(({className:n,...r},i)=>(0,W.createElement)(wi,{ref:i,iconNode:t,className:gi(`lucide-${_i(yi(e))}`,`lucide-${e}`,n),...r}));return n.displayName=yi(e),n},Ti=K(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Ei=K(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Di=K(`at-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),Oi=K(`box`,[[`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`}]]),ki=K(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),Ai=K(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),ji=K(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Mi=K(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Ni=K(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Pi=K(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Fi=K(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Ii=K(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Li=K(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Ri=K(`copy`,[[`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`}]]),zi=K(`eye-off`,[[`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`}]]),Bi=K(`eye`,[[`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`}]]),Vi=K(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),Hi=K(`focus`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}]]),Ui=K(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),Wi=K(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Gi=K(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),Ki=K(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),qi=K(`globe`,[[`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`}]]),Ji=K(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),Yi=K(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),Xi=K(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),Zi=K(`key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),Qi=K(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),$i=K(`lightbulb-off`,[[`path`,{d:`M16.8 11.2c.8-.9 1.2-2 1.2-3.2a6 6 0 0 0-9.3-5`,key:`1fkcox`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M6.3 6.3a4.67 4.67 0 0 0 1.2 5.2c.7.7 1.3 1.5 1.5 2.5`,key:`10m8kw`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),ea=K(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),ta=K(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),na=K(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ra=K(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),ia=K(`mouse-pointer-click`,[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]),aa=K(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),oa=K(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),sa=K(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),ca=K(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),la=K(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),ua=K(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),da=K(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),fa=K(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),pa=K(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),ma=K(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),ha=K(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),ga=K(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),_a=K(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),va=K(`skip-forward`,[[`path`,{d:`M21 4v16`,key:`7j8fe9`}],[`path`,{d:`M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z`,key:`zs4d6`}]]),ya=K(`snail`,[[`path`,{d:`M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0`,key:`hneq2s`}],[`circle`,{cx:`10`,cy:`13`,r:`8`,key:`194lz3`}],[`path`,{d:`M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6`,key:`ixqyt7`}],[`path`,{d:`M18 3 19.1 5.2`,key:`9tjm43`}],[`path`,{d:`M22 3 20.9 5.2`,key:`j3odrs`}]]),ba=K(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),xa=K(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Sa=K(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Ca=K(`table`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M3 15h18`,key:`5xshup`}]]),wa=K(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Ta=K(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Ea=K(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Da=K(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Oa=K(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),ka=K(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),Aa=K(`variable`,[[`path`,{d:`M8 21s-4-3-4-9 4-9 4-9`,key:`uto9ud`}],[`path`,{d:`M16 3s4 3 4 9-4 9-4 9`,key:`4w2vsq`}],[`line`,{x1:`15`,x2:`9`,y1:`9`,y2:`15`,key:`f7djnv`}],[`line`,{x1:`9`,x2:`15`,y1:`9`,y2:`15`,key:`1shsy8`}]]),ja=K(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ma=K(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),Na=K(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Pa=K(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Fa=(0,W.forwardRef)(function({size:e=24,color:t=`currentColor`,className:n,strokeWidth:r,absoluteStrokeWidth:i,...a},o){let s=typeof e==`string`?Number.parseFloat(e):e;return Number.isFinite(s)&&s<=16?(0,G.jsxs)(`svg`,{ref:o,xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 16 16`,fill:t,className:n,...a,children:[(0,G.jsx)(`path`,{d:`M8 15.282l1.855-5.717H6.145L8 15.282z`}),(0,G.jsx)(`path`,{d:`M8 15.282L6.145 9.565H2.333L8 15.282z`}),(0,G.jsx)(`path`,{d:`M2.333 9.565l-.944-2.942c-.09-.267.067-.553.333-.553h3.153L2.333 9.565z`}),(0,G.jsx)(`path`,{d:`M4.875 6.07L6.145 9.565H2.333l2.542-3.495z`}),(0,G.jsx)(`path`,{d:`M13.667 9.565l.944-2.942c.09-.267-.067-.553-.333-.553h-3.153l2.542 3.495z`}),(0,G.jsx)(`path`,{d:`M11.125 6.07L9.855 9.565h3.812l-2.542-3.495z`}),(0,G.jsx)(`path`,{d:`M8 15.282l1.855-5.717H6.145L8 15.282z`})]}):(0,G.jsx)(`svg`,{ref:o,xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 24 24`,fill:t,className:n,...a,children:(0,G.jsx)(`path`,{d:`m23.6004 9.5927-.0337-.0862L20.3.9814a.851.851 0 0 0-.3362-.405.8748.8748 0 0 0-.9997.0539.8748.8748 0 0 0-.29.4399l-2.2055 6.748H7.5375l-2.2057-6.748a.8573.8573 0 0 0-.29-.4412.8748.8748 0 0 0-.9997-.0537.8585.8585 0 0 0-.3362.4049L.4332 9.5015l-.0325.0862a6.0657 6.0657 0 0 0 2.0119 7.0105l.0113.0087.03.0213 4.976 3.7264 2.462 1.8633 1.4995 1.1321a1.0085 1.0085 0 0 0 1.2197 0l1.4995-1.1321 2.4619-1.8633 5.006-3.7489.0125-.01a6.0682 6.0682 0 0 0 2.0094-7.003z`})})}),Ia=(0,W.forwardRef)(function({size:e=24,color:t=`currentColor`,className:n,strokeWidth:r,absoluteStrokeWidth:i,...a},o){let s=typeof e==`string`?Number.parseFloat(e):e;return Number.isFinite(s)&&s<=16?(0,G.jsx)(`svg`,{ref:o,xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 16 16`,fill:t,className:n,...a,children:(0,G.jsx)(`path`,{d:`M6.766 11.328c-2.063-.25-3.516-1.734-3.516-3.656 0-.781.281-1.625.75-2.188-.203-.515-.172-1.609.063-2.062.625-.078 1.468.25 1.968.703.594-.187 1.219-.281 1.985-.281.765 0 1.39.094 1.953.265.484-.437 1.344-.765 1.969-.687.218.422.25 1.515.046 2.047.5.593.766 1.39.766 2.203 0 1.922-1.453 3.375-3.547 3.64.531.344.89 1.094.89 1.954v1.625c0 .468.391.734.86.547C13.781 14.359 16 11.53 16 8.03 16 3.61 12.406 0 7.984 0 3.563 0 0 3.61 0 8.031a7.88 7.88 0 0 0 5.172 7.422c.422.156.828-.125.828-.547v-1.25c-.219.094-.5.156-.75.156-1.031 0-1.64-.562-2.078-1.609-.172-.422-.36-.672-.719-.719-.187-.015-.25-.093-.25-.187 0-.188.313-.328.625-.328.453 0 .844.281 1.25.86.313.452.64.655 1.031.655s.641-.14 1-.5c.266-.265.47-.5.657-.656`})}):(0,G.jsx)(`svg`,{ref:o,xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 24 24`,fill:t,className:n,...a,children:(0,G.jsx)(`path`,{d:`M10.226 17.284c-2.965-.36-5.054-2.493-5.054-5.256 0-1.123.404-2.336 1.078-3.144-.292-.741-.247-2.314.09-2.965.898-.112 2.111.36 2.83 1.01.853-.269 1.752-.404 2.853-.404 1.1 0 1.999.135 2.807.382.696-.629 1.932-1.1 2.83-.988.315.606.36 2.179.067 2.942.72.854 1.101 2 1.101 3.167 0 2.763-2.089 4.852-5.098 5.234.763.494 1.28 1.572 1.28 2.807v2.336c0 .674.561 1.056 1.235.786 4.066-1.55 7.255-5.615 7.255-10.646C23.5 6.188 18.334 1 11.978 1 5.62 1 .5 6.188.5 12.545c0 4.986 3.167 9.12 7.435 10.669.606.225 1.19-.18 1.19-.786V20.63a2.9 2.9 0 0 1-1.078.224c-1.483 0-2.359-.808-2.987-2.313-.247-.607-.517-.966-1.034-1.033-.27-.023-.359-.135-.359-.27 0-.27.45-.471.898-.471.652 0 1.213.404 1.797 1.235.45.651.921.943 1.483.943.561 0 .92-.202 1.437-.719.382-.381.674-.718.944-.943`})})}),La=`gitnexus-backend-url`;function Ra(){let[e]=(0,W.useState)(()=>{try{return localStorage.getItem(La)??be}catch{return be}}),[t,n]=(0,W.useState)(!1),[r,i]=(0,W.useState)(!1),a=(0,W.useRef)(0),o=(0,W.useCallback)(async()=>{let e=++a.current;i(!0);try{let t=await Tt();return e===a.current?(n(t),t):!1}catch{return e===a.current&&n(!1),!1}finally{e===a.current&&i(!1)}},[]),s=(0,W.useRef)(null),[c,l]=(0,W.useState)(!1),u=(0,W.useRef)(o);u.current=o;let d=(0,W.useCallback)(()=>{s.current!==null&&(clearTimeout(s.current),s.current=null),l(!1)},[]),f=(0,W.useCallback)(()=>{d(),l(!0);let e=()=>{s.current=setTimeout(async()=>{if(document.hidden){s.current=null;return}await u.current()?(l(!1),s.current=null):e()},3e3)};e()},[d]);return(0,W.useEffect)(()=>{if(!c)return;let e=()=>{document.hidden||(s.current!==null&&(clearTimeout(s.current),s.current=null),u.current().then(e=>{!e&&c&&f()}))};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[c,f]),(0,W.useEffect)(()=>()=>{s.current!==null&&clearTimeout(s.current)},[]),(0,W.useEffect)(()=>{ht(e),o()},[]),{isConnected:t,isProbing:r,backendUrl:e,startPolling:f,stopPolling:d,isPolling:c}}function za({text:e}){let{t}=Nr(`onboarding`),[n,r]=(0,W.useState)(!1),i=(0,W.useRef)(null);return(0,W.useEffect)(()=>()=>{i.current&&clearTimeout(i.current)},[]),(0,G.jsx)(`button`,{onClick:async()=>{try{await navigator.clipboard.writeText(e),r(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>r(!1),2e3)}catch{}},"aria-label":t(n?`guide.copiedAria`:`guide.copyAria`),className:`shrink-0 cursor-pointer rounded-md px-2 py-1 transition-all duration-200 focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:outline-none ${n?`bg-emerald-400/10 text-emerald-400`:`text-text-muted hover:bg-white/5 hover:text-text-primary`} `,children:n?(0,G.jsx)(ji,{className:`h-3.5 w-3.5`}):(0,G.jsx)(Ri,{className:`h-3.5 w-3.5`})})}function Ba({command:e,label:t,isActive:n=!1}){return(0,G.jsxs)(`div`,{className:`overflow-hidden rounded-xl border transition-all duration-300 ${n?`border-accent/40 shadow-glow-soft`:`border-border-default hover:border-accent/20 hover:shadow-glow-soft`} `,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border-subtle bg-deep px-4 py-2.5`,children:[(0,G.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,G.jsx)(`div`,{className:`h-2.5 w-2.5 rounded-full bg-red-500/60`}),(0,G.jsx)(`div`,{className:`h-2.5 w-2.5 rounded-full bg-yellow-500/60`}),(0,G.jsx)(`div`,{className:`h-2.5 w-2.5 rounded-full bg-emerald-500/60`})]}),(0,G.jsx)(`span`,{className:`flex-1 text-center font-mono text-[11px] text-text-muted`,children:t}),(0,G.jsx)(za,{text:e})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-3 bg-void px-4 py-3.5 font-mono text-sm`,children:[(0,G.jsx)(`span`,{className:`text-accent/60 select-none`,"aria-hidden":`true`,children:`$`}),(0,G.jsx)(`code`,{className:`flex-1 overflow-x-auto tracking-wide whitespace-nowrap text-text-primary`,children:e})]})]})}function Va({state:e,number:t}){return e===`done`?(0,G.jsx)(`div`,{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-full border border-emerald-500/50 bg-emerald-500/20`,children:(0,G.jsx)(ji,{className:`h-3 w-3 text-emerald-400`})}):e===`active`?(0,G.jsxs)(`div`,{className:`relative flex h-6 w-6 shrink-0 items-center justify-center`,children:[(0,G.jsx)(`div`,{className:`absolute inset-0 animate-ping rounded-full border border-accent/30`}),(0,G.jsx)(`div`,{className:`flex h-6 w-6 items-center justify-center rounded-full border border-accent/60 bg-accent/20`,children:(0,G.jsx)(`span`,{className:`text-[10px] leading-none font-semibold text-accent`,children:t})})]}):(0,G.jsx)(`div`,{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-full border border-border-subtle bg-elevated`,children:(0,G.jsx)(`span`,{className:`text-[10px] leading-none font-semibold text-text-muted`,children:t})})}function Ha({state:e,number:t,title:n,description:r,children:i}){let{t:a}=Nr(`onboarding`),o=e!==`waiting`;return(0,G.jsx)(`div`,{className:`transition-all duration-300 ${e===`waiting`?`opacity-40`:`opacity-100`} `,children:(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(Va,{state:e,number:t}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1 pt-0.5`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`text-sm font-medium transition-colors duration-200 ${e===`done`?`text-emerald-400`:e===`active`?`text-text-primary`:`text-text-muted`}`,children:n}),e===`done`&&(0,G.jsx)(`span`,{className:`animate-fade-in font-mono text-[10px] tracking-wider text-emerald-400/60 uppercase`,children:a(`guide.done`)})]}),r&&(0,G.jsx)(`p`,{className:`mt-0.5 text-xs leading-relaxed text-text-muted`,children:r}),o&&i&&(0,G.jsx)(`div`,{className:`mt-3 animate-slide-up`,children:i})]})]})})}function Ua(){let{t:e}=Nr(`onboarding`);return(0,G.jsxs)(`div`,{className:`flex animate-fade-in items-center gap-3 rounded-xl border border-accent/15 bg-accent/5 px-4 py-3`,"aria-live":`polite`,role:`status`,children:[(0,G.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,G.jsx)(Ma,{className:`h-4 w-4 text-accent/70`}),(0,G.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,G.jsx)(`div`,{className:`h-5 w-5 animate-pulse rounded-full border border-accent/25`})})]}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`p`,{className:`text-xs font-medium text-text-secondary`,children:[e(`guide.listeningForServer`),(0,G.jsx)(`span`,{className:`ml-0.5 inline-flex text-text-muted`,children:(0,G.jsx)(`span`,{className:`animate-pulse`,children:`...`})})]}),(0,G.jsx)(`p`,{className:`mt-0.5 text-[11px] text-text-muted`,children:e(`guide.willAutoConnect`)})]})]})}var Wa=({isPolling:e})=>{let{t}=Nr(`onboarding`),n=t(`guide.terminal`),r=e?`done`:`active`,i=e?`active`:`waiting`;return(0,G.jsxs)(`div`,{className:`relative animate-fade-in overflow-hidden rounded-3xl border border-border-default bg-surface p-7`,children:[(0,G.jsx)(`div`,{className:`pointer-events-none absolute -top-28 -right-28 h-72 w-72 rounded-full bg-accent/6 blur-3xl`}),(0,G.jsx)(`div`,{className:`pointer-events-none absolute -bottom-24 -left-24 h-56 w-56 rounded-full bg-node-function/6 blur-3xl`}),(0,G.jsx)(`div`,{className:`relative mb-6`,children:(0,G.jsxs)(`div`,{className:`text-center`,children:[(0,G.jsxs)(`div`,{className:`mb-2 inline-flex items-center gap-1.5`,children:[(0,G.jsx)(ba,{className:`h-3.5 w-3.5 text-accent/70`}),(0,G.jsx)(`span`,{className:`text-[11px] font-medium tracking-widest text-accent/80 uppercase`,children:`GitNexus`})]}),(0,G.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-text-primary`,children:t(`guide.startServer`)}),(0,G.jsx)(`p`,{className:`mx-auto mt-1 max-w-xs text-sm leading-relaxed text-text-secondary`,children:t(`guide.prodDescription`)})]})}),(0,G.jsxs)(`div`,{className:`relative space-y-5`,children:[(0,G.jsx)(`div`,{className:`pointer-events-none absolute top-6 bottom-6 left-[11px] w-px bg-border-subtle`,"aria-hidden":`true`}),(0,G.jsxs)(Ha,{state:r,number:1,title:t(`guide.copyCommand`),description:e?void 0:t(`guide.copyCommandDescription`),children:[(0,G.jsx)(Ba,{command:`npx gitnexus@latest serve`,label:n,isActive:r===`active`}),(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`my-3 flex items-center gap-3`,children:[(0,G.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`}),(0,G.jsx)(`span`,{className:`text-[11px] tracking-widest text-text-muted uppercase`,children:t(`guide.orInstallGlobally`)}),(0,G.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`})]}),(0,G.jsx)(Ba,{command:`npm install -g gitnexus && gitnexus serve`,label:t(`guide.globalInstall`),isActive:!1})]})]}),(0,G.jsx)(Ha,{state:i,number:2,title:t(e?`guide.waitingForServer`:`guide.pasteAndRun`),description:e?void 0:t(`guide.pasteAndRunDescription`),children:e&&(0,G.jsx)(Ua,{})}),(0,G.jsx)(Ha,{state:`waiting`,number:3,title:t(`guide.autoConnects`),description:t(`guide.autoConnectsDescription`)})]}),(0,G.jsxs)(`div`,{className:`mt-6 flex items-center justify-center gap-1.5 border-t border-border-subtle pt-5 text-xs text-text-muted`,children:[(0,G.jsx)(ga,{className:`h-3 w-3 shrink-0`}),(0,G.jsxs)(`span`,{children:[t(`guide.requires`),` `,(0,G.jsxs)(`a`,{href:`https://nodejs.org`,target:`_blank`,rel:`noopener noreferrer`,className:`text-accent transition-colors hover:text-accent/80 hover:underline`,children:[`Node.js `,Ce,`+`]})]}),(0,G.jsx)(`span`,{className:`mx-1 text-border-default`,children:`·`}),(0,G.jsx)(Ta,{className:`h-3 w-3 shrink-0`}),(0,G.jsx)(`span`,{children:t(`guide.port`)})]})]})};function Ga(e,t,n){return n(`common:analyzePhases.${e}`,{defaultValue:``})||t||e}function Ka(e,t){if(!e)return``;let n=qa[e];return n?t(n):e}var qa={"Connecting...":`common:progress.connectingShort`,"Connecting to server...":`common:progress.connecting`,"Validating server":`common:progress.validatingServer`,"Validating server...":`common:progress.validatingServerEllipsis`,"Downloading graph...":`common:progress.downloadingGraph`,"Extracting file contents":`common:progress.extractingFileContents`,"Processing...":`common:progress.processing`,"Processing graph...":`common:progress.processingGraph`,"Loading graph...":`common:progress.loadingGraph`,Queued:`common:analyzePhases.queued`,"Starting...":`common:progress.starting`},Ja=({progress:e,onCancel:t})=>{let{t:n}=Nr(`common`),[r]=(0,W.useState)(()=>Date.now()),[i,a]=(0,W.useState)(0);(0,W.useEffect)(()=>{let e=setInterval(()=>a(Date.now()-r),1e3);return()=>clearInterval(e)},[r]);let o=e=>{let t=Math.floor(e/1e3);return t<60?n(`units.elapsedSeconds`,{seconds:t}):n(`units.elapsedMinutesSeconds`,{minutes:Math.floor(t/60),seconds:t%60})},s=Ga(e.phase,e.message,n),c=Math.max(0,Math.min(100,e.percent));return(0,G.jsxs)(`div`,{className:`space-y-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between text-sm`,children:[(0,G.jsx)(`span`,{className:`font-medium text-text-secondary`,children:s}),(0,G.jsx)(`span`,{className:`font-mono text-xs text-text-muted`,children:o(i)})]}),(0,G.jsx)(`div`,{className:`h-2 overflow-hidden rounded-full bg-elevated`,children:(0,G.jsx)(`div`,{className:`h-full rounded-full bg-accent transition-all duration-300 ease-out`,style:{width:`${c}%`}})}),(0,G.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,G.jsxs)(`span`,{className:`font-mono text-xs text-text-muted`,children:[c,`%`]}),(0,G.jsxs)(`button`,{onClick:t,className:`flex items-center gap-1.5 rounded-lg bg-red-500/10 px-3 py-1.5 text-xs text-red-400 transition-all duration-200 hover:bg-red-500/20`,children:[(0,G.jsx)(ja,{className:`h-3.5 w-3.5`}),n(`actions.cancel`)]})]})]})},Ya=/^https?:\/\/(www\.)?github\.com\/[^/\s]+\/[^/\s]+/i,Xa=/^https?:\/\/[^/\s]+\/[^/\s]+\/[^/\s]+(\/.*)?$/i,Za=navigator.userAgent.toLowerCase().includes(`win`);function Qa(e){return Ya.test(e.trim())}function $a(e){return Xa.test(e.trim())}function eo({mode:e,onChange:t}){let{t:n}=Nr(`onboarding`);return(0,G.jsxs)(`div`,{className:`flex gap-1 rounded-lg bg-elevated p-1`,role:`tablist`,"aria-label":n(`repoAnalyzer.inputType`),children:[(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":e===`github`,onClick:()=>t(`github`),className:`flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all duration-150 ${e===`github`?`bg-accent text-white shadow-sm`:`text-text-muted hover:text-text-secondary`} `,children:[(0,G.jsx)(Ia,{className:`h-3 w-3`}),n(`repoAnalyzer.githubUrl`)]}),(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":e===`gitlab`,onClick:()=>t(`gitlab`),className:`flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all duration-150 ${e===`gitlab`?`bg-accent text-white shadow-sm`:`text-text-muted hover:text-text-secondary`} `,children:[(0,G.jsx)(Fa,{className:`h-3 w-3`}),n(`repoAnalyzer.gitlabUrl`)]}),(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":e===`local`,onClick:()=>t(`local`),className:`flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all duration-150 ${e===`local`?`bg-accent text-white shadow-sm`:`text-text-muted hover:text-text-secondary`} `,children:[(0,G.jsx)(Ui,{className:`h-3 w-3`}),n(`repoAnalyzer.localFolder`)]})]})}function to({canSubmit:e,isLoading:t,onClick:n,variant:r}){let{t:i}=Nr(`onboarding`);return(0,G.jsxs)(`button`,{onClick:n,disabled:!e||t,className:` ${r===`onboarding`?`w-full px-5 py-3.5 text-sm`:`w-full px-4 py-3 text-sm`} flex items-center justify-center gap-2.5 rounded-xl font-medium transition-all duration-200 ${e&&!t?`cursor-pointer bg-accent text-white shadow-glow-soft hover:-translate-y-0.5 hover:bg-accent/90 hover:shadow-glow`:`cursor-not-allowed border border-border-subtle bg-elevated text-text-muted`} `,children:[t?(0,G.jsx)(na,{className:`h-4 w-4 animate-spin`}):(0,G.jsx)(ba,{className:`h-4 w-4`}),(0,G.jsx)(`span`,{children:i(t?`repoAnalyzer.starting`:`repoAnalyzer.analyzeRepository`)}),e&&!t&&(0,G.jsx)(Ei,{className:`h-3.5 w-3.5`})]})}function no({repoName:e}){let{t}=Nr(`onboarding`);return(0,G.jsxs)(`div`,{className:`flex animate-fade-in flex-col items-center gap-3 py-4`,role:`status`,"aria-live":`polite`,children:[(0,G.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-xl border border-emerald-500/30 bg-emerald-500/15 shadow-[0_0_20px_rgba(16,185,129,0.15)]`,children:(0,G.jsx)(ji,{className:`h-6 w-6 text-emerald-400`})}),(0,G.jsxs)(`div`,{className:`text-center`,children:[(0,G.jsx)(`p`,{className:`text-sm font-medium text-emerald-400`,children:t(`repoAnalyzer.complete`)}),(0,G.jsx)(`p`,{className:`mt-0.5 font-mono text-xs text-text-muted`,children:e})]}),(0,G.jsx)(`p`,{className:`text-xs text-text-secondary`,children:t(`repoAnalyzer.loadingGraph`)})]})}var ro=({variant:e,onComplete:t,onCancel:n})=>{let{t:r}=Nr([`common`,`errors`,`onboarding`]),i=(0,W.useId)(),a=(0,W.useRef)(null),[o,s]=(0,W.useState)(`github`),[c,l]=(0,W.useState)(``),[u,d]=(0,W.useState)(``),[f,p]=(0,W.useState)(``),[m,h]=(0,W.useState)(`input`),[g,_]=(0,W.useState)(null),[v,y]=(0,W.useState)({phase:`queued`,percent:0,message:r(`common:analyzePhases.queued`)}),[b,x]=(0,W.useState)(``),S=(0,W.useRef)(null),C=(0,W.useRef)(null),w=(0,W.useRef)(null);(0,W.useEffect)(()=>()=>{C.current?.abort(),w.current&&clearTimeout(w.current)},[]);let T=e=>{s(e),l(``),d(``),p(``),_(null)},E=o===`github`?Qa(c)&&(m===`input`||m===`error`):o===`gitlab`?$a(u)&&(m===`input`||m===`error`):f.trim().length>1&&(m===`input`||m===`error`),D=async()=>{if(o===`github`&&!Qa(c)){_(r(`errors:invalidGithubUrl`));return}if(o===`gitlab`&&!$a(u)){_(`Please enter a valid GitLab repository URL.`);return}if(o===`local`&&f.trim().length<2){_(r(`errors:missingFolderPath`));return}_(null),h(`starting`);try{let{jobId:e}=await Ft(o===`github`?{url:c.trim()}:o===`gitlab`?{url:u.trim()}:{path:f.trim()});S.current=e,h(`analyzing`);let n=o===`github`?c.trim():o===`gitlab`?u.trim():f.trim();C.current=Lt(e,e=>y(e),e=>{let i=e.repoName??n.split(/[/\\]/).filter(Boolean).at(-1)??r(`onboarding:repoAnalyzer.defaultRepoName`);x(i),h(`done`),C.current=null,w.current=setTimeout(()=>{w.current=null,t(i)},1200)},e=>{_(e||r(`errors:analysisFailed`)),h(`error`)})}catch(e){_(e instanceof Error?e.message:r(`errors:startAnalysisFailed`)),h(`error`)}},O=async()=>{if(C.current?.abort(),C.current=null,S.current){try{await It(S.current)}catch{}S.current=null}h(`input`),y({phase:`queued`,percent:0,message:r(`common:analyzePhases.queued`)})},k=m===`starting`,ee=m!==`analyzing`&&m!==`done`,A=Za;return(0,G.jsxs)(`div`,{className:`space-y-4`,children:[ee&&(0,G.jsx)(eo,{mode:o,onChange:T}),ee&&o===`github`&&(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`label`,{htmlFor:i,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.githubRepositoryUrl`)}),(0,G.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border bg-void px-4 py-3.5 transition-all duration-200 ${g&&m===`error`?`border-red-500/50`:Qa(c)?`border-accent/50 shadow-[0_0_0_3px_rgba(124,58,237,0.08)]`:`border-border-default focus-within:border-accent/40`} `,children:[(0,G.jsx)(Ia,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,G.jsx)(`input`,{id:i,type:`url`,value:c,onChange:e=>{l(e.target.value),g&&_(null)},onKeyDown:e=>{e.key===`Enter`&&E&&!k&&(e.preventDefault(),D())},disabled:k,placeholder:`https://github.com/owner/repo`,autoComplete:`url`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`}),c.length>10&&(0,G.jsx)(`div`,{className:`shrink-0`,children:Qa(c)?(0,G.jsx)(ji,{className:`h-3.5 w-3.5 text-emerald-400`}):(0,G.jsx)(Fi,{className:`h-3.5 w-3.5 text-text-muted`})})]})]}),ee&&o===`gitlab`&&(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`label`,{htmlFor:i,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.gitlabRepositoryUrl`)}),(0,G.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border bg-void px-4 py-3.5 transition-all duration-200 ${g&&m===`error`?`border-red-500/50`:$a(u)?`border-accent/50 shadow-[0_0_0_3px_rgba(124,58,237,0.08)]`:`border-border-default focus-within:border-accent/40`} `,children:[(0,G.jsx)(Fa,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,G.jsx)(`input`,{id:i,type:`url`,value:u,onChange:e=>{d(e.target.value),g&&_(null)},onKeyDown:e=>{e.key===`Enter`&&E&&!k&&(e.preventDefault(),D())},disabled:k,placeholder:`https://gitlab.com/owner/repo`,autoComplete:`url`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`}),u.length>10&&(0,G.jsx)(`div`,{className:`shrink-0`,children:$a(u)?(0,G.jsx)(ji,{className:`h-3.5 w-3.5 text-emerald-400`}):(0,G.jsx)(Fi,{className:`h-3.5 w-3.5 text-text-muted`})})]}),(0,G.jsx)(`p`,{className:`text-xs text-text-muted`,children:r(`onboarding:repoAnalyzer.gitlabSupported`)})]}),ee&&o===`local`&&(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`label`,{htmlFor:`${i}-local`,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.localFolderPath`)}),(0,G.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border bg-void px-4 py-3.5 transition-all duration-200 ${g&&m===`error`?`border-red-500/50`:f.trim().length>1?`border-accent/50 shadow-[0_0_0_3px_rgba(124,58,237,0.08)]`:`border-border-default focus-within:border-accent/40`} `,children:[(0,G.jsx)(Ui,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,G.jsx)(`input`,{id:`${i}-local`,type:`text`,value:f,onChange:e=>{p(e.target.value),g&&_(null)},onKeyDown:e=>{e.key===`Enter`&&E&&!k&&(e.preventDefault(),D())},disabled:k,placeholder:A?`C:\\Users\\you\\project`:`/home/you/project`,autoComplete:`off`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`}),f.trim().length>1&&(0,G.jsx)(ji,{className:`h-3.5 w-3.5 shrink-0 text-emerald-400`})]}),(0,G.jsx)(`input`,{ref:a,type:`file`,webkitdirectory:``,className:`hidden`,onChange:e=>{let t=e.target.files;if(t&&t.length>0){let e=t[0].webkitRelativePath.split(`/`)[0];e&&(p(e),_(null))}e.target.value=``}}),(0,G.jsxs)(`button`,{type:`button`,onClick:()=>a.current?.click(),disabled:k,className:`flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg border border-border-subtle bg-elevated px-3 py-2 text-xs font-medium text-text-secondary transition-all duration-150 hover:bg-hover hover:text-text-primary disabled:opacity-50`,children:[(0,G.jsx)(Ui,{className:`h-3.5 w-3.5`}),r(`onboarding:repoAnalyzer.browseForFolder`)]})]}),(m===`error`||m===`input`&&g)&&g&&(0,G.jsxs)(`p`,{className:`flex animate-fade-in items-center gap-1.5 text-xs text-red-400`,children:[(0,G.jsx)(Fi,{className:`h-3 w-3 shrink-0`}),g]}),m===`analyzing`&&(0,G.jsx)(`div`,{className:`animate-slide-up`,children:(0,G.jsx)(Ja,{progress:v,onCancel:O})}),m===`done`&&(0,G.jsx)(no,{repoName:b}),(m===`input`||m===`starting`)&&(0,G.jsx)(to,{canSubmit:E,isLoading:k,onClick:D,variant:e}),m===`error`&&(0,G.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,G.jsx)(`button`,{onClick:()=>{_(null),h(`input`)},className:`flex-1 cursor-pointer rounded-xl border border-border-subtle bg-elevated px-4 py-2.5 text-sm text-text-secondary transition-all duration-200 hover:bg-hover hover:text-text-primary`,children:r(`common:actions.tryAgain`)}),n&&(0,G.jsx)(`button`,{onClick:n,className:`cursor-pointer px-4 py-2.5 text-sm text-text-muted transition-colors hover:text-text-secondary`,children:r(`common:actions.dismiss`)})]}),m===`analyzing`&&e===`sheet`&&n&&(0,G.jsx)(`button`,{onClick:n,className:`w-full cursor-pointer py-1 text-xs text-text-muted transition-colors hover:text-text-secondary`,children:r(`onboarding:repoAnalyzer.hideBackground`)})]})},io=({onComplete:e})=>{let{t}=Nr(`onboarding`);return(0,G.jsxs)(`div`,{className:`relative animate-fade-in overflow-hidden rounded-3xl border border-border-default bg-surface p-7`,children:[(0,G.jsx)(`div`,{className:`pointer-events-none absolute -top-28 -right-28 h-72 w-72 rounded-full bg-accent/6 blur-3xl`}),(0,G.jsx)(`div`,{className:`pointer-events-none absolute -bottom-24 -left-24 h-56 w-56 rounded-full bg-node-function/6 blur-3xl`}),(0,G.jsx)(`div`,{className:`relative mb-6`,children:(0,G.jsxs)(`div`,{className:`text-center`,children:[(0,G.jsxs)(`div`,{className:`mb-2 inline-flex items-center gap-1.5`,children:[(0,G.jsx)(ba,{className:`h-3.5 w-3.5 text-accent/70`}),(0,G.jsx)(`span`,{className:`text-[11px] font-medium tracking-widest text-accent/80 uppercase`,children:`GitNexus`})]}),(0,G.jsx)(`div`,{className:`mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-2xl border border-accent/30 bg-gradient-to-br from-accent/20 to-accent-dim/10 shadow-glow-soft`,children:(0,G.jsx)(Ia,{className:`h-7 w-7 text-accent`})}),(0,G.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-text-primary`,children:t(`analyzeFirst.title`)}),(0,G.jsx)(`p`,{className:`mx-auto mt-1.5 max-w-xs text-sm leading-relaxed text-text-secondary`,children:t(`analyzeFirst.description`)})]})}),(0,G.jsx)(`div`,{className:`relative`,children:(0,G.jsx)(ro,{variant:`onboarding`,onComplete:e})}),(0,G.jsx)(`p`,{className:`mt-5 text-center text-[11px] leading-relaxed text-text-muted`,children:t(`analyzeFirst.footer`)})]})};function ao(e,t){let n=new Date(e),r=new Date().getTime()-n.getTime(),i=Math.floor(r/6e4);if(i<1)return t(`onboarding:landing.time.justNow`);if(i<60)return t(`onboarding:landing.time.minutesAgo`,{count:i});let a=Math.floor(i/60);if(a<24)return t(`onboarding:landing.time.hoursAgo`,{count:a});let o=Math.floor(a/24);return o<30?t(`onboarding:landing.time.daysAgo`,{count:o}):n.toLocaleDateString()}function oo({repo:e,onClick:t}){let{t:n}=Nr([`common`,`onboarding`]),r=e.stats;return(0,G.jsxs)(`button`,{onClick:t,"data-testid":`landing-repo-card`,className:`group w-full cursor-pointer rounded-xl border border-border-default bg-elevated p-4 text-left transition-all duration-200 hover:border-accent/40 hover:bg-hover hover:shadow-glow-soft`,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(Ki,{className:`h-4 w-4 shrink-0 text-accent`}),(0,G.jsx)(`h3`,{className:`truncate text-sm font-semibold text-text-primary transition-colors group-hover:text-accent`,children:e.name})]}),e.indexedAt&&(0,G.jsx)(`p`,{className:`mt-1 pl-6 text-xs text-text-muted`,children:n(`onboarding:landing.indexed`,{time:ao(e.indexedAt,n)})})]}),(0,G.jsx)(Ei,{className:`h-4 w-4 shrink-0 text-text-muted opacity-0 transition-all duration-200 group-hover:translate-x-0.5 group-hover:text-accent group-hover:opacity-100`})]}),r&&(r.files||r.nodes)&&(0,G.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 pl-6`,children:[r.files!=null&&(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-void px-2 py-0.5 text-[11px] text-text-muted`,children:[(0,G.jsx)(Vi,{className:`h-3 w-3`}),` `,n(`common:counts.files`,{count:r.files})]}),r.nodes!=null&&(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-void px-2 py-0.5 text-[11px] text-text-muted`,children:[(0,G.jsx)(Qi,{className:`h-3 w-3`}),` `,n(`common:counts.symbols`,{count:r.nodes})]}),r.processes!=null&&r.processes>0&&(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-void px-2 py-0.5 text-[11px] text-text-muted`,children:[(0,G.jsx)(ba,{className:`h-3 w-3`}),` `,n(`common:counts.flows`,{count:r.processes})]})]})]})}var so=({repos:e,onSelectRepo:t,onAnalyzeComplete:n})=>{let{t:r}=Nr(`onboarding`);return(0,G.jsxs)(`div`,{className:`relative animate-fade-in overflow-hidden rounded-3xl border border-border-default bg-surface p-7`,children:[(0,G.jsx)(`div`,{className:`pointer-events-none absolute -top-28 -right-28 h-72 w-72 rounded-full bg-accent/6 blur-3xl`}),(0,G.jsx)(`div`,{className:`pointer-events-none absolute -bottom-24 -left-24 h-56 w-56 rounded-full bg-node-function/6 blur-3xl`}),(0,G.jsx)(`div`,{className:`relative mb-6`,children:(0,G.jsxs)(`div`,{className:`text-center`,children:[(0,G.jsxs)(`div`,{className:`mb-2 inline-flex items-center gap-1.5`,children:[(0,G.jsx)(ba,{className:`h-3.5 w-3.5 text-accent/70`}),(0,G.jsx)(`span`,{className:`text-[11px] font-medium tracking-widest text-accent/80 uppercase`,children:`GitNexus`})]}),(0,G.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-text-primary`,children:r(`landing.chooseRepository`)}),(0,G.jsx)(`p`,{className:`mx-auto mt-1.5 max-w-xs text-sm leading-relaxed text-text-secondary`,children:r(`landing.description`)})]})}),(0,G.jsx)(`div`,{className:`relative mb-5 space-y-2`,children:e.map(e=>(0,G.jsx)(oo,{repo:e,onClick:()=>t(e.name)},e.name))}),(0,G.jsxs)(`div`,{className:`mb-5 flex items-center gap-3`,children:[(0,G.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`}),(0,G.jsx)(`span`,{className:`text-[11px] tracking-widest text-text-muted uppercase`,children:r(`landing.orAnalyzeNew`)}),(0,G.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`})]}),(0,G.jsx)(`div`,{className:`relative`,children:(0,G.jsx)(ro,{variant:`onboarding`,onComplete:n})}),(0,G.jsx)(`p`,{className:`mt-5 text-center text-[11px] leading-relaxed text-text-muted`,children:r(`landing.footer`)})]})};function co(e,t){if(e instanceof dt){let n=e.retryAfterMs?Math.ceil(e.retryAfterMs/1e3):void 0,r=e.message||t(`errors:unknown`);switch(e.code){case`network`:return t(`errors:backend.network`,{defaultValue:r});case`timeout`:return t(`errors:backend.timeout`,{defaultValue:r});case`rate_limited`:return t(`errors:backend.rateLimited`,{seconds:n,defaultValue:r});case`not_found`:return t(`errors:backend.notFound`,{defaultValue:r});case`client`:return t(`errors:backend.client`,{message:e.message,defaultValue:r});case`server`:return t(`errors:backend.server`,{message:e.message,defaultValue:r});default:return r}}return e instanceof Error?e.message:t(`errors:unknown`)}function lo({activeKey:e,children:t}){let[n,r]=(0,W.useState)(e),[i,a]=(0,W.useState)(!1),o=(0,W.useRef)(t),s=(0,W.useRef)(null);return!i&&e===n&&(o.current=t),(0,W.useEffect)(()=>(e!==n&&(a(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{o.current=null,r(e),a(!1)},300)),()=>{s.current&&clearTimeout(s.current)}),[e,n]),(0,G.jsx)(`div`,{className:`transition-[opacity,transform] duration-300 ease-out`,style:{opacity:+!i,transform:i?`scale(0.97) translateY(8px)`:`scale(1) translateY(0)`},children:i?o.current:t})}function uo(){let{t:e}=Nr(`onboarding`);return(0,G.jsxs)(`div`,{className:`relative overflow-hidden rounded-3xl border border-emerald-500/20 bg-surface p-7`,role:`status`,"aria-live":`polite`,children:[(0,G.jsx)(`div`,{className:`pointer-events-none absolute -top-20 left-1/2 h-64 w-64 -translate-x-1/2 rounded-full bg-emerald-500/8 blur-3xl`}),(0,G.jsxs)(`div`,{className:`relative`,children:[(0,G.jsx)(`div`,{className:`mx-auto mb-5 flex h-16 w-16 items-center justify-center rounded-2xl border border-emerald-500/30 bg-gradient-to-br from-emerald-500/20 to-emerald-600/10 shadow-[0_0_30px_rgba(16,185,129,0.15)]`,children:(0,G.jsx)(ji,{className:`h-8 w-8 text-emerald-400`})}),(0,G.jsx)(`h2`,{className:`mb-2 text-center text-lg font-semibold text-emerald-400`,children:e(`success.title`)}),(0,G.jsx)(`p`,{className:`text-center text-sm leading-relaxed text-text-secondary`,children:e(`success.description`)}),(0,G.jsx)(`div`,{className:`mt-6 flex items-center justify-center gap-2`,children:(0,G.jsx)(`div`,{className:`flex gap-1`,children:[0,1,2].map(e=>(0,G.jsx)(`div`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-emerald-400/60`,style:{animationDelay:`${e*200}ms`}},e))})})]})]})}function fo({message:e}){let{t}=Nr([`common`,`onboarding`]);return(0,G.jsxs)(`div`,{className:`relative overflow-hidden rounded-3xl border border-accent/20 bg-surface p-7`,role:`status`,"aria-live":`polite`,children:[(0,G.jsx)(`div`,{className:`pointer-events-none absolute -top-20 left-1/2 h-64 w-64 -translate-x-1/2 rounded-full bg-accent/8 blur-3xl`}),(0,G.jsxs)(`div`,{className:`relative`,children:[(0,G.jsx)(`div`,{className:`mx-auto mb-5 flex h-16 w-16 items-center justify-center rounded-2xl border border-accent/30 bg-gradient-to-br from-accent/20 to-accent-dim/10 shadow-glow-soft`,children:(0,G.jsx)(na,{className:`h-8 w-8 animate-spin text-accent`})}),(0,G.jsx)(`h2`,{className:`mb-2 text-center text-lg font-semibold text-text-primary`,children:e||t(`common:progress.connectingShort`)}),(0,G.jsx)(`p`,{className:`text-center text-sm leading-relaxed text-text-secondary`,children:t(`onboarding:loading.largeRepoHint`)}),(0,G.jsx)(`div`,{className:`mt-5 flex items-center justify-center`,children:(0,G.jsx)(ba,{className:`h-4 w-4 text-accent/30`})})]})]})}var po=({onServerConnect:e})=>{let{t}=Nr([`common`,`errors`]),[n,r]=(0,W.useState)(null),{isConnected:i,isProbing:a,startPolling:o,stopPolling:s,isPolling:c,backendUrl:l}=Ra(),[u,d]=(0,W.useState)(!1),f=(0,W.useRef)(!1),p=(0,W.useRef)(null),[m,h]=(0,W.useState)(`onboarding`),[g,_]=(0,W.useState)(``),v=(0,W.useRef)(null),[y,b]=(0,W.useState)([]),x=async()=>{h(`loading`),_(t(`common:progress.connectingShort`)),r(null);try{let e=await Et();if(e.length===0){h(`analyze`),f.current=!1;return}b(e),h(`landing`)}catch(e){if(e.name===`AbortError`)return;r(co(e,t)),h(`onboarding`)}},S=(0,W.useRef)(x);S.current=x;let C=n=>{f.current=!0,h(`loading`),_(t(`common:progress.loadingGraph`)),r(null),(async()=>{let i=new AbortController;v.current=i;try{let r=await Bt(l,(e,n,r)=>{if(e===`validating`)_(t(`common:progress.validatingServerEllipsis`));else if(e===`downloading`){let e=r?Math.round(n/r*100):null,i=(n/(1024*1024)).toFixed(1);_(e?t(`common:progress.downloadingWithPercent`,{percent:e}):t(`common:progress.downloadingMb`,{mb:i}))}else e===`extracting`&&_(t(`common:progress.processingGraph`))},i.signal,n);e&&await e(r,l)}catch(e){if(e.name===`AbortError`)return;r(co(e,t)),h(y.length>0?`landing`:`analyze`)}finally{v.current=null}})()};(0,W.useEffect)(()=>{!a&&!u&&d(!0)},[a,u]),(0,W.useEffect)(()=>{u&&!i&&!c&&!f.current&&o()},[u,i,c,o]),(0,W.useEffect)(()=>{i&&!f.current&&(f.current=!0,s(),h(`success`),p.current=setTimeout(()=>{p.current=null,S.current()},1200)),!i&&f.current&&!a&&(f.current=!1,p.current!==null&&(clearTimeout(p.current),p.current=null),h(`onboarding`),r(null))},[i,a,s]),(0,W.useEffect)(()=>()=>{p.current!==null&&clearTimeout(p.current),v.current?.abort()},[]);let w=u?m:null;return(0,G.jsxs)(`div`,{className:`flex min-h-screen items-center justify-center bg-void p-8`,children:[(0,G.jsxs)(`div`,{className:`pointer-events-none fixed inset-0`,children:[(0,G.jsx)(`div`,{className:`absolute top-1/4 left-1/4 h-96 w-96 rounded-full bg-accent/10 blur-3xl`}),(0,G.jsx)(`div`,{className:`absolute right-1/4 bottom-1/4 h-96 w-96 rounded-full bg-node-interface/10 blur-3xl`})]}),(0,G.jsxs)(`div`,{className:`relative w-full max-w-lg`,children:[n&&(0,G.jsx)(`div`,{className:`mb-4 animate-fade-in rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-center text-sm text-red-400`,children:n}),w&&(0,G.jsxs)(lo,{activeKey:w,children:[w===`onboarding`&&(0,G.jsx)(Wa,{isPolling:c}),w===`analyze`&&(0,G.jsx)(io,{onComplete:C}),w===`landing`&&(0,G.jsx)(so,{repos:y,onSelectRepo:C,onAnalyzeComplete:C}),w===`success`&&(0,G.jsx)(uo,{}),w===`loading`&&(0,G.jsx)(fo,{message:g})]})]})]})},mo=({progress:e})=>{let{t}=Nr([`common`,`graph`]),n=Ka(e.message,t),r=Ka(e.detail,t);return(0,G.jsxs)(`div`,{className:`fixed inset-0 z-50 flex flex-col items-center justify-center bg-void`,children:[(0,G.jsxs)(`div`,{className:`pointer-events-none absolute inset-0`,children:[(0,G.jsx)(`div`,{className:`absolute top-1/3 left-1/3 h-96 w-96 animate-pulse rounded-full bg-accent/10 blur-3xl`}),(0,G.jsx)(`div`,{className:`absolute right-1/3 bottom-1/3 h-96 w-96 animate-pulse rounded-full bg-node-interface/10 blur-3xl`})]}),(0,G.jsxs)(`div`,{className:`relative mb-10`,children:[(0,G.jsx)(`div`,{className:`h-28 w-28 animate-pulse-glow rounded-full bg-gradient-to-br from-accent to-node-interface`}),(0,G.jsx)(`div`,{className:`absolute inset-0 h-28 w-28 rounded-full bg-gradient-to-br from-accent to-node-interface opacity-50 blur-xl`})]}),(0,G.jsx)(`div`,{className:`mb-4 w-80`,children:(0,G.jsx)(`div`,{className:`h-1.5 overflow-hidden rounded-full bg-elevated`,children:(0,G.jsx)(`div`,{className:`h-full rounded-full bg-gradient-to-r from-accent to-node-interface transition-all duration-300 ease-out`,style:{width:`${e.percent}%`}})})}),(0,G.jsxs)(`div`,{className:`text-center`,children:[(0,G.jsxs)(`p`,{className:`mb-1 font-mono text-sm text-text-secondary`,children:[n,(0,G.jsx)(`span`,{className:`animate-pulse`,children:`|`})]}),e.detail&&(0,G.jsx)(`p`,{className:`max-w-md truncate font-mono text-xs text-text-muted`,children:r})]}),e.stats&&(0,G.jsxs)(`div`,{className:`mt-8 flex items-center gap-6 text-xs text-text-muted`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-node-file`}),(0,G.jsx)(`span`,{children:t(`graph:loading.filesProgress`,{processed:e.stats.filesProcessed,total:e.stats.totalFiles})})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-node-function`}),(0,G.jsx)(`span`,{children:t(`common:counts.nodes`,{count:e.stats.nodesCreated})})]})]}),(0,G.jsxs)(`p`,{className:`mt-4 font-mono text-3xl font-semibold text-text-primary`,children:[e.percent,`%`]})]})},ho=({isOpen:e,onClose:t,onUseCPU:n,onSkip:r,nodeCount:i})=>{let{t:a}=Nr(`graph`),[o,s]=(0,W.useState)(!0),[c,l]=(0,W.useState)(!1);if((0,W.useEffect)(()=>{e?requestAnimationFrame(()=>l(!0)):l(!1)},[e]),!e)return null;let u=Math.ceil(i*50/6e4),d=i<200;return(0,G.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,G.jsx)(`div`,{className:`absolute inset-0 bg-black/60 backdrop-blur-sm transition-opacity duration-200 ${c?`opacity-100`:`opacity-0`}`,onClick:t}),(0,G.jsxs)(`div`,{className:`relative mx-4 w-full max-w-md overflow-hidden rounded-2xl border border-border-subtle bg-surface shadow-2xl transition-all duration-200 ${c?`scale-100 opacity-100`:`scale-95 opacity-0`}`,children:[(0,G.jsxs)(`div`,{className:`relative border-b border-border-subtle bg-gradient-to-r from-amber-500/20 to-orange-500/20 px-6 py-5`,children:[(0,G.jsx)(`button`,{onClick:t,className:`absolute top-4 right-4 p-1 text-text-muted transition-colors hover:text-text-primary`,children:(0,G.jsx)(ja,{className:`h-5 w-5`})}),(0,G.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,G.jsx)(`div`,{className:`text-5xl ${o?`animate-bounce`:``}`,onAnimationEnd:()=>s(!1),onClick:()=>s(!0),children:`🤔`}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h2`,{className:`text-lg font-semibold text-text-primary`,children:a(`embedding.fallback.title`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-sm text-text-muted`,children:a(`embedding.fallback.subtitle`)})]})]})]}),(0,G.jsxs)(`div`,{className:`space-y-4 px-6 py-5`,children:[(0,G.jsx)(`p`,{className:`text-sm leading-relaxed text-text-secondary`,children:a(`embedding.fallback.description`)}),(0,G.jsxs)(`div`,{className:`rounded-lg border border-border-subtle bg-elevated/50 p-4`,children:[(0,G.jsx)(`p`,{className:`text-sm text-text-secondary`,children:(0,G.jsx)(`span`,{className:`font-medium text-text-primary`,children:a(`embedding.fallback.options`)})}),(0,G.jsxs)(`ul`,{className:`mt-2 space-y-1.5 text-sm text-text-muted`,children:[(0,G.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,G.jsx)(ya,{className:`mt-0.5 h-4 w-4 flex-shrink-0 text-amber-400`}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`strong`,{className:`text-text-secondary`,children:a(`embedding.fallback.useCpu`)}),` `,`—`,` `,a(d?`embedding.fallback.useCpuDescriptionSmall`:`embedding.fallback.useCpuDescriptionLarge`),i>0&&(0,G.jsxs)(`span`,{className:`text-text-muted`,children:[` `,a(`embedding.fallback.estimated`,{minutes:u,count:i})]})]})]}),(0,G.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,G.jsx)(va,{className:`mt-0.5 h-4 w-4 flex-shrink-0 text-blue-400`}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`strong`,{className:`text-text-secondary`,children:a(`embedding.fallback.skipIt`)}),` `,`— `,a(`embedding.fallback.skipDescription`)]})]})]})]}),d&&(0,G.jsxs)(`p`,{className:`flex items-center gap-1.5 rounded-lg bg-node-function/10 px-3 py-2 text-xs text-node-function`,children:[(0,G.jsx)(fa,{className:`h-3.5 w-3.5`}),a(`embedding.fallback.smallCodebase`)]}),(0,G.jsx)(`p`,{className:`text-xs text-text-muted`,children:a(`embedding.fallback.tip`)})]}),(0,G.jsxs)(`div`,{className:`flex gap-3 border-t border-border-subtle bg-elevated/30 px-6 py-4`,children:[(0,G.jsxs)(`button`,{onClick:r,className:`flex flex-1 items-center justify-center gap-2 rounded-lg border border-border-subtle bg-surface px-4 py-2.5 text-sm font-medium text-text-secondary transition-all hover:bg-hover hover:text-text-primary`,children:[(0,G.jsx)(va,{className:`h-4 w-4`}),a(`embedding.fallback.skipEmbeddings`)]}),(0,G.jsxs)(`button`,{onClick:n,className:`flex flex-1 items-center justify-center gap-2 rounded-lg px-4 py-2.5 text-sm font-medium transition-all ${d?`bg-node-function text-white hover:bg-node-function/90`:`border border-amber-500/30 bg-amber-500/20 text-amber-300 hover:bg-amber-500/30`}`,children:[(0,G.jsx)(ya,{className:`h-4 w-4`}),a(d?`embedding.fallback.useCpuRecommended`:`embedding.fallback.useCpuSlow`)]})]})]})]})},go=()=>{let{t:e}=Nr(`graph`),{embeddingStatus:t,embeddingProgress:n,startEmbeddings:r,graph:i,viewMode:a,serverBaseUrl:o}=hi(),[s,c]=(0,W.useState)(!1);if(a!==`exploring`||!i||o)return null;let l=i.nodes.length,u=async e=>{try{await r()}catch(e){e?.name===`WebGPUNotAvailableError`||e?.message?.includes(`WebGPU not available`)?c(!0):console.error(`Embedding failed:`,e)}},d=(0,G.jsx)(ho,{isOpen:s,onClose:()=>c(!1),onUseCPU:()=>{c(!1),u(`wasm`)},onSkip:()=>{c(!1)},nodeCount:l});if(t===`idle`)return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,G.jsxs)(`button`,{onClick:()=>u(),className:`group flex items-center gap-2 rounded-lg border border-border-subtle bg-surface px-3 py-1.5 text-sm text-text-secondary transition-all hover:border-accent/50 hover:bg-hover hover:text-text-primary`,title:e(`embedding.generateTitle`),children:[(0,G.jsx)(Ai,{className:`h-4 w-4 text-node-interface transition-colors group-hover:text-accent`}),(0,G.jsx)(`span`,{className:`hidden sm:inline`,children:e(`embedding.enable`)}),(0,G.jsx)(Ma,{className:`h-3 w-3 text-text-muted`})]})}),d]});if(t===`loading`){let t=n?.percent??0;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-lg border border-accent/30 bg-surface px-3 py-1.5 text-sm`,children:[(0,G.jsx)(na,{className:`h-4 w-4 animate-spin text-accent`}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,G.jsx)(`span`,{className:`text-xs text-text-secondary`,children:e(`embedding.loadingModel`)}),(0,G.jsx)(`div`,{className:`h-1 w-24 overflow-hidden rounded-full bg-elevated`,children:(0,G.jsx)(`div`,{className:`h-full rounded-full bg-gradient-to-r from-accent to-node-interface transition-all duration-300`,style:{width:`${t}%`}})})]})]}),d]})}if(t===`embedding`){let t=n?.percent??0;return(0,G.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-lg border border-node-function/30 bg-surface px-3 py-1.5 text-sm`,children:[(0,G.jsx)(na,{className:`h-4 w-4 animate-spin text-node-function`}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,G.jsx)(`span`,{className:`text-xs text-text-secondary`,children:e(`embedding.embeddingNodes`,{processed:0,total:0})}),(0,G.jsx)(`div`,{className:`h-1 w-24 overflow-hidden rounded-full bg-elevated`,children:(0,G.jsx)(`div`,{className:`h-full rounded-full bg-gradient-to-r from-node-function to-accent transition-all duration-300`,style:{width:`${t}%`}})})]})]})}return t===`indexing`?(0,G.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-node-interface/30 bg-surface px-3 py-1.5 text-sm text-text-secondary`,children:[(0,G.jsx)(na,{className:`h-4 w-4 animate-spin text-node-interface`}),(0,G.jsx)(`span`,{className:`text-xs`,children:e(`embedding.creatingIndex`)})]}):t===`ready`?(0,G.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-node-function/30 bg-node-function/10 px-3 py-1.5 text-sm text-node-function`,title:e(`embedding.readyTitle`),children:[(0,G.jsx)(ji,{className:`h-4 w-4`}),(0,G.jsx)(`span`,{className:`text-xs font-medium`,children:e(`embedding.ready`)})]}):t===`error`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`button`,{onClick:()=>u(),className:`flex items-center gap-2 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-1.5 text-sm text-red-400 transition-colors hover:bg-red-500/20`,title:e(`embedding.errorTitle`),children:[(0,G.jsx)(Fi,{className:`h-4 w-4`}),(0,G.jsx)(`span`,{className:`text-xs`,children:e(`embedding.failedRetry`)})]}),d]}):null},_o=()=>{let{t:e,i18n:t}=Nr(`header`),n=t.resolvedLanguage||t.language,r=Pr.find(e=>e.code.toLowerCase()===n.toLowerCase())??Pr[0],i=e=>{t.changeLanguage(e)};return(0,G.jsxs)(`label`,{className:`flex h-9 items-center gap-1.5 rounded-md border border-border-subtle bg-surface px-2 text-text-secondary transition-colors hover:border-border-default hover:bg-hover hover:text-text-primary`,title:e(`selectLanguage`),children:[(0,G.jsx)(qi,{className:`h-4 w-4`,"aria-hidden":`true`}),(0,G.jsx)(`span`,{className:`sr-only`,children:e(`language`)}),(0,G.jsx)(`select`,{"data-testid":`language-switcher`,value:r.code,"aria-label":e(`selectLanguage`),onChange:e=>i(e.target.value),className:`cursor-pointer border-none bg-transparent text-xs font-medium outline-none`,children:Pr.map(e=>(0,G.jsx)(`option`,{value:e.code,className:`bg-surface text-text-primary`,children:e.nativeName},e.code))})]})},vo={Folder:`#6366f1`,File:`#3b82f6`,Function:`#10b981`,Class:`#f59e0b`,Method:`#14b8a6`,Interface:`#ec4899`,Variable:`#64748b`,Import:`#475569`,Type:`#a78bfa`},yo=({onFocusNode:e,availableRepos:t=[],onSwitchRepo:n,onAnalyzeComplete:r,onReposChanged:i})=>{let{t:a}=Nr([`common`,`header`]),{projectName:o,graph:s,openChatPanel:c,isRightPanelOpen:l,rightPanelTab:u,setSettingsPanelOpen:d,setHelpDialogBoxOpen:f}=hi(),[p,m]=(0,W.useState)(``),[h,g]=(0,W.useState)(!1),[_,v]=(0,W.useState)(!1),[y,b]=(0,W.useState)(null),[x,S]=(0,W.useState)(null),C=(0,W.useRef)(null),w=(0,W.useRef)(null),[T,E]=(0,W.useState)(!1),[D,O]=(0,W.useState)(0),k=(0,W.useRef)(null),ee=(0,W.useRef)(null),A=s?.nodes.length??0,j=s?.relationships.length??0,M=(0,W.useMemo)(()=>{if(!s||!p.trim())return[];let e=p.toLowerCase();return s.nodes.filter(t=>t.properties.name.toLowerCase().includes(e)).slice(0,10)},[s,p]);(0,W.useEffect)(()=>{let e=e=>{k.current&&!k.current.contains(e.target)&&E(!1),w.current&&!w.current.contains(e.target)&&(g(!1),v(!1))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]),(0,W.useEffect)(()=>()=>{C.current?.abort()},[]),(0,W.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`k`&&(e.preventDefault(),ee.current?.focus(),E(!0)),e.key===`Escape`&&(E(!1),ee.current?.blur())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]);let N=e=>{if(!(!T||M.length===0)){if(e.key===`ArrowDown`)e.preventDefault(),O(e=>Math.min(e+1,M.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),O(e=>Math.max(e-1,0));else if(e.key===`Enter`){e.preventDefault();let t=M[D];t&&P(t)}}},P=t=>{e?.(t.id),m(``),E(!1),O(0)};return(0,G.jsxs)(`header`,{className:`flex items-center justify-between border-b border-dashed border-border-subtle bg-deep px-5 py-3`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,G.jsx)(`div`,{className:`flex h-7 w-7 items-center justify-center rounded-md bg-gradient-to-br from-accent to-node-interface text-sm font-bold text-white shadow-glow`,children:`◇`}),(0,G.jsx)(`span`,{className:`text-[15px] font-semibold tracking-tight`,children:`GitNexus`})]}),o&&(0,G.jsxs)(`div`,{className:`relative`,ref:w,children:[(0,G.jsxs)(`button`,{onClick:()=>{g(e=>!e),v(!1)},className:`flex cursor-pointer items-center gap-2 rounded-lg border px-3 py-1.5 text-sm transition-all ${h?`border-accent/40 bg-accent/10 text-text-primary`:`border-border-subtle bg-surface text-text-secondary hover:border-border-default hover:bg-hover`} `,children:[(0,G.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-node-function`}),(0,G.jsx)(`span`,{className:`max-w-[160px] truncate`,children:o}),(0,G.jsx)(Mi,{className:`h-3 w-3 text-text-muted transition-transform duration-200 ${h?`rotate-180`:``}`})]}),h&&(0,G.jsx)(`div`,{className:`absolute top-full left-0 z-50 mt-1.5 w-80 animate-slide-up overflow-hidden rounded-xl border border-border-subtle bg-surface shadow-xl`,children:_?(0,G.jsx)(`div`,{className:`p-4`,children:(0,G.jsx)(ro,{variant:`sheet`,onComplete:e=>{v(!1),g(!1),r?.(e)},onCancel:()=>v(!1)})}):(0,G.jsxs)(G.Fragment,{children:[t.length>0&&(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`px-3 pt-2.5 pb-1.5 text-[10px] font-medium tracking-wider text-text-muted uppercase`,children:a(`header:repositories`)}),t.map(e=>(0,G.jsxs)(`div`,{className:`group flex items-center gap-2 px-4 py-2 transition-colors ${e.name===o?`border-l-2 border-accent bg-accent/10`:`hover:bg-hover`}`,children:[(0,G.jsxs)(`button`,{onClick:()=>{e.name!==o&&n?.(e.name),g(!1)},className:`flex min-w-0 flex-1 cursor-pointer items-center gap-3 text-left`,children:[(0,G.jsx)(Ui,{className:`h-3.5 w-3.5 shrink-0 text-node-folder`}),(0,G.jsx)(`span`,{className:`flex-1 truncate font-mono text-sm text-text-primary`,children:e.name}),e.name===o&&(0,G.jsx)(`span`,{className:`shrink-0 font-mono text-[10px] text-accent`,children:a(`header:active`)})]}),(0,G.jsx)(`button`,{onClick:async t=>{if(t.stopPropagation(),!y){b(e.name),S({phase:`queued`,percent:0,message:a(`common:progress.starting`)});try{let{jobId:t}=await Ft({path:e.path,force:!0});C.current=Lt(t,e=>S(e),()=>{b(null),S(null),C.current=null,r?.(e.name)},e=>{console.error(`Re-analyze failed:`,e),b(null),S(null),C.current=null})}catch(e){console.error(`Failed to start re-analysis:`,e),b(null),S(null)}}},disabled:!!y,className:`cursor-pointer rounded p-1 transition-all ${y===e.name?`text-accent`:`text-text-muted/0 group-hover:text-text-muted hover:!text-accent`}`,title:y===e.name?a(`header:reanalyzing`):a(`header:reanalyzeRepo`,{repoName:e.name}),children:(0,G.jsx)(da,{className:`h-3.5 w-3.5 ${y===e.name?`animate-spin`:``}`})}),(0,G.jsx)(`button`,{onClick:async t=>{t.stopPropagation(),y===e.name&&(C.current?.abort(),b(null),S(null),C.current=null);try{await wt(e.name);let t=await Et();i?.(t),e.name===o&&t.length>0?n?.(t[0].name):t.length===0&&window.location.reload()}catch(e){console.error(`Failed to delete repo:`,e)}},className:`cursor-pointer rounded p-1 text-text-muted/0 transition-all group-hover:text-text-muted hover:!text-red-400`,title:a(`header:deleteRepo`,{repoName:e.name}),children:(0,G.jsx)(Ea,{className:`h-3.5 w-3.5`})})]},e.name))]}),y&&x&&(0,G.jsxs)(`div`,{className:`border-t border-border-subtle bg-accent/5 px-4 py-2.5`,children:[(0,G.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-2`,children:[(0,G.jsx)(na,{className:`h-3 w-3 shrink-0 animate-spin text-accent`}),(0,G.jsx)(`span`,{className:`truncate text-xs text-text-secondary`,children:a(`header:reanalyzingRepo`,{repoName:y,message:Ka(x.message,a)})})]}),(0,G.jsx)(`div`,{className:`h-1 overflow-hidden rounded-full bg-elevated`,children:(0,G.jsx)(`div`,{className:`h-full rounded-full bg-accent transition-all duration-300`,style:{width:`${Math.max(2,x.percent)}%`}})})]}),(0,G.jsx)(`div`,{className:t.length>0||y?`border-t border-border-subtle`:``,children:(0,G.jsxs)(`button`,{onClick:()=>v(!0),disabled:!!y,className:`flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-hover disabled:cursor-not-allowed disabled:opacity-50`,children:[(0,G.jsx)(ba,{className:`h-3.5 w-3.5 shrink-0 text-accent`}),(0,G.jsx)(`span`,{className:`text-sm text-text-secondary`,children:a(`header:analyzeNew`)})]})})]})})]})]}),(0,G.jsxs)(`div`,{className:`relative mx-6 max-w-md flex-1`,ref:k,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-lg border border-border-subtle bg-surface px-3.5 py-2 transition-all focus-within:border-accent focus-within:ring-2 focus-within:ring-accent/20`,children:[(0,G.jsx)(ma,{className:`h-4 w-4 flex-shrink-0 text-text-muted`}),(0,G.jsx)(`input`,{ref:ee,type:`text`,placeholder:a(`header:searchNodes`),value:p,onChange:e=>{m(e.target.value),E(!0),O(0)},onFocus:()=>E(!0),onKeyDown:N,className:`flex-1 border-none bg-transparent text-sm text-text-primary outline-none placeholder:text-text-muted`}),(0,G.jsx)(`kbd`,{className:`rounded border border-border-subtle bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-text-muted`,children:`⌘K`})]}),T&&p.trim()&&(0,G.jsx)(`div`,{className:`absolute top-full right-0 left-0 z-50 mt-1 overflow-hidden rounded-xl border border-border-subtle bg-surface shadow-xl`,children:M.length===0?(0,G.jsx)(`div`,{className:`px-4 py-3 text-sm text-text-muted`,children:a(`header:noNodesFound`,{query:p})}):(0,G.jsx)(`div`,{className:`max-h-80 overflow-y-auto`,children:M.map((e,t)=>(0,G.jsxs)(`button`,{onClick:()=>P(e),className:`flex w-full cursor-pointer items-center gap-3 px-4 py-2.5 text-left transition-colors ${t===D?`bg-accent/20 text-text-primary`:`text-text-secondary hover:bg-hover`}`,children:[(0,G.jsx)(`span`,{className:`h-2.5 w-2.5 flex-shrink-0 rounded-full`,style:{backgroundColor:vo[e.label]||`#6b7280`}}),(0,G.jsx)(`span`,{className:`flex-1 truncate text-sm font-medium`,children:e.properties.name}),(0,G.jsx)(`span`,{className:`rounded bg-elevated px-2 py-0.5 text-xs text-text-muted`,children:e.label})]},e.id))})})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsxs)(`a`,{href:`https://github.com/abhigyanpatwari/GitNexus`,target:`_blank`,rel:`noopener noreferrer`,className:`group flex items-center gap-2 rounded-lg bg-gradient-to-r from-purple-600 to-pink-600 px-3.5 py-2 text-sm font-medium text-white shadow-lg transition-all duration-200 hover:-translate-y-0.5 hover:from-purple-500 hover:to-pink-500 hover:shadow-xl`,children:[(0,G.jsx)(Ia,{className:`h-4 w-4`}),(0,G.jsx)(`span`,{className:`hidden sm:inline`,children:a(`header:starIfCool`)}),(0,G.jsx)(Sa,{className:`h-3.5 w-3.5 transition-all group-hover:fill-yellow-300 group-hover:text-yellow-300`}),(0,G.jsx)(`span`,{className:`hidden sm:inline`,children:`✨`})]}),s&&(0,G.jsxs)(`div`,{className:`mr-2 flex items-center gap-4 text-xs text-text-muted`,children:[(0,G.jsx)(`span`,{children:a(`common:counts.nodes`,{count:A})}),(0,G.jsx)(`span`,{children:a(`common:counts.edges`,{count:j})})]}),(0,G.jsx)(go,{}),(0,G.jsx)(_o,{}),(0,G.jsx)(`button`,{onClick:()=>d(!0),className:`flex h-9 w-9 cursor-pointer items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,title:a(`header:aiSettings`),children:(0,G.jsx)(_a,{className:`h-4.5 w-4.5`})}),(0,G.jsx)(`button`,{title:a(`header:help`),onClick:()=>f(!0),className:`flex h-9 w-9 cursor-pointer items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,children:(0,G.jsx)(Ii,{className:`h-4.5 w-4.5`})}),(0,G.jsxs)(`button`,{onClick:c,className:`flex items-center gap-1.5 rounded-lg px-3.5 py-2 text-sm font-medium transition-all ${l&&u===`chat`?`bg-accent text-white shadow-glow`:`bg-gradient-to-r from-accent to-accent-dim text-white shadow-glow hover:-translate-y-0.5 hover:shadow-lg`} `,children:[(0,G.jsx)(ba,{className:`h-4 w-4`}),(0,G.jsx)(`span`,{children:a(`common:app.nexusAI`)})]})]})]})};function bo(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function xo(e){var t=bo(e,`string`);return typeof t==`symbol`?t:t+``}function So(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Co(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,xo(r.key),r)}}function wo(e,t,n){return t&&Co(e.prototype,t),n&&Co(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function To(e){return To=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},To(e)}function Eo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Eo=function(){return!!e})()}function Do(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Oo(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Do(e)}function ko(e,t,n){return t=To(t),Oo(e,Eo()?Reflect.construct(t,n||[],To(e).constructor):t.apply(e,n))}function Ao(e,t){return Ao=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ao(e,t)}function jo(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&Ao(e,t)}function Mo(e){if(Array.isArray(e))return e}function No(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Po(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Fo(e,t){if(e){if(typeof e==`string`)return Po(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Po(e,t):void 0}}function Io(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
14
+ `);De(t=>{let n=t.find(e=>e.id===o),r={id:o,role:`assistant`,content:e,historyMessages:u,steps:[...s],toolCalls:[...c],timestamp:n?.timestamp??Date.now()};return n?t.map(e=>e.id===o?r:e):[...t,r]})},f=!1,p=null,m=()=>{f||(f=!0,p=requestAnimationFrame(()=>{f=!1,p=null,d()}))};try{let e=e=>{switch(e.type){case`reasoning`:if(e.reasoning){let t=s[s.length-1];t&&t.type===`reasoning`?s[s.length-1]={...t,content:(t.content||``)+e.reasoning}:s.push({id:`step-${l++}`,type:`reasoning`,content:e.reasoning}),m()}break;case`content`:if(e.content){let t=s[s.length-1];t&&t.type===`content`?s[s.length-1]={...t,content:(t.content||``)+e.content}:s.push({id:`step-${l++}`,type:`content`,content:e.content}),m();let n=s[s.length-1],i=n&&n.type===`content`&&n.content||``,a=new RegExp(Yr.source,Yr.flags),o;for(;(o=a.exec(i))!==null;){let e=o[1].trim(),t=o[2]?parseInt(o[2],10):void 0,n=o[3]?parseInt(o[3],10):t,r=Be(e);if(!r)continue;let i=t===void 0?void 0:Math.max(0,t-1);He({filePath:r,startLine:i,endLine:n===void 0?i:Math.max(0,n-1),nodeId:Ve(r),label:`File`,name:r.split(`/`).pop()??r,source:`ai`})}let c=new RegExp(Xr.source,Xr.flags),u;for(;(u=c.exec(i))!==null;){let e=u[1],t=u[2].trim();if(!r)continue;let n=r.nodes.find(n=>n.label===e&&n.properties.name===t);if(!n||!n.properties.filePath)continue;let i=Be(n.properties.filePath);i&&He({filePath:i,startLine:n.properties.startLine?n.properties.startLine-1:void 0,endLine:n.properties.endLine?n.properties.endLine-1:void 0,nodeId:n.id,label:n.label,name:n.properties.name,source:`ai`})}}break;case`tool_call`:if(e.toolCall){let t=e.toolCall;c.push(t),s.push({id:`step-${l++}`,type:`tool_call`,toolCall:t}),je(e=>[...e,t]),m()}break;case`tool_result`:if(e.toolCall){let t=e.toolCall,n=c.findIndex(e=>e.id===t.id);n<0&&(n=c.findIndex(e=>e.name===t.name&&e.status===`running`)),n<0&&(n=c.findIndex(e=>e.name===t.name&&!e.result)),n>=0&&c[n].status!==`stopped`&&(c[n]={...c[n],result:t.result,status:`completed`});let i=s.findIndex(e=>e.type===`tool_call`&&e.toolCall&&(e.toolCall.id===t.id||e.toolCall.name===t.name&&e.toolCall.status===`running`));if(i>=0&&s[i].toolCall&&s[i].toolCall.status!==`stopped`&&(s[i]={...s[i],toolCall:{...s[i].toolCall,result:t.result,status:`completed`}}),je(e=>{let n=e.findIndex(e=>e.id===t.id);return n<0&&(n=e.findIndex(e=>e.name===t.name&&e.status===`running`)),n<0&&(n=e.findIndex(e=>e.name===t.name&&!e.result)),n>=0?e[n].status===`stopped`?e:e.map((e,r)=>r===n?{...e,result:t.result,status:`completed`}:e):e}),m(),t.result){let e=t.result.match(/\[HIGHLIGHT_NODES:([^\]]+)\]/);if(e){let t=e[1].split(`,`).map(e=>e.trim()).filter(Boolean);if(t.length>0&&r){let e=new Set,n=new Set(r.nodes.map(e=>e.id));for(let i of t)if(n.has(i))e.add(i);else{let t=r.nodes.find(e=>e.id.endsWith(i)||e.id.endsWith(`:`+i))?.id;t&&e.add(t)}e.size>0&&A(e)}else t.length>0&&A(new Set(t))}let n=t.result.match(/\[IMPACT:([^\]]+)\]/);if(n){let e=n[1].split(`,`).map(e=>e.trim()).filter(Boolean);if(e.length>0&&r){let t=new Set,n=new Set(r.nodes.map(e=>e.id));for(let i of e)if(n.has(i))t.add(i);else{let e=r.nodes.find(e=>e.id.endsWith(i)||e.id.endsWith(`:`+i))?.id;e&&t.add(e)}t.size>0&&M(t)}else e.length>0&&M(new Set(e))}}}break;case`error`:Te(e.error??`Unknown error`);break;case`done`:u=i.preserveAssistantTranscript?e.historyMessages:void 0,m();break}},t=it.current;if(!t)throw Error(`Agent not initialized`);let{streamAgentResponse:o}=await w(async()=>{let{streamAgentResponse:e}=await import(`./agent-EkX7webX.js`);return{streamAgentResponse:e}},__vite__mapDeps([0,1,2]));for await(let r of o(t,a,{captureHistory:i.preserveAssistantTranscript,signal:n.signal})){if(r.type===`cancelled`)break;e(r)}}catch(e){n.signal.aborted||Te(e instanceof Error?e.message:String(e))}finally{p!=null&&(cancelAnimationFrame(p),p=null),ot.current=`idle`,ke(!1),je([])}},[Ee,be,ct,Be,Ve,He,Ue,ne,r,ue]),ut=(0,W.useCallback)(()=>{if(!at.current)return;ot.current=`aborting`,at.current.abort(),at.current=null;let e=qr.t(`chat:stopped`),t=t=>t.status===`running`||t.status===`pending`?{...t,status:`stopped`,result:e}:t;je(e=>e.map(t)),De(e=>{let n=[...e].map((e,t)=>e.role===`assistant`?t:-1).filter(e=>e>=0).pop();if(n===void 0)return e;let r=e[n],i={...r,toolCalls:r.toolCalls?.map(t),steps:r.steps?.map(e=>e.type===`tool_call`&&e.toolCall?{...e,toolCall:t(e.toolCall)}:e)};return e.map((e,t)=>t===n?i:e)}),ke(!1)},[]),dt=(0,W.useCallback)(()=>{at.current?.abort(),at.current=null,ot.current=`idle`,De([]),je([]),Te(null),ke(!1)},[]),ft=(0,W.useCallback)(async e=>{if(!H)return;B({phase:`extracting`,percent:0,message:qr.t(`common:progress.switchingRepository`),detail:qr.t(`common:progress.loadingRepository`,{repo:e})}),n(`loading`),xe(!1),m(new Set),ne(),F(),I(),o(null),D(null),Ne([]),Fe(!1),Le(null);let t=e||`server-project`;try{let n=await Bt(H,(e,t,n)=>{if(e===`validating`)B({phase:`extracting`,percent:5,message:qr.t(`common:progress.switchingRepository`),detail:qr.t(`common:progress.validating`)});else if(e===`downloading`){let e=n?Math.round(t/n*90)+5:50,r=(t/(1024*1024)).toFixed(1);B({phase:`extracting`,percent:e,message:qr.t(`common:progress.downloadingGraph`),detail:qr.t(`common:progress.downloadedMb`,{mb:r})})}else e===`extracting`&&B({phase:`extracting`,percent:97,message:qr.t(`common:progress.processing`),detail:qr.t(`common:progress.extractingFileContents`)})},void 0,e,{awaitAnalysis:!0}),r=n.repoInfo.repoPath??n.repoInfo.path,a=e||n.repoInfo.name||(r||``).replace(/\\/g,`/`).split(`/`).filter(Boolean).pop()||`server-project`;V(a),We.current=a,n.repoInfo,t=a;let o=ve();for(let e of n.nodes)o.addNode(e);for(let e of n.relationships)o.addRelationship(e);i(o)}catch(e){console.error(`Repo switch failed:`,e),B({phase:`error`,percent:0,message:qr.t(`common:progress.failedSwitchRepository`),detail:e instanceof Error?e.message:qr.t(`common:progress.unknownError`)}),xe(!1),it.current=null,setTimeout(()=>{n(`exploring`),B(null)},ye);return}if(t){let e=new URL(window.location.href);e.searchParams.set(`project`,t),window.history.replaceState(null,``,e.toString())}it.current=null,xe(!1),De([]);try{rt()&&await ct(t),n(`exploring`),Xe(),B(null)}catch(e){console.warn(`Failed to initialize agent:`,e),xe(!1),it.current=null,Te(`Failed to initialize agent`),n(`exploring`),B(null)}},[H,B,n,V,i,ct,Xe,m,ne,F,I,o,D,Ne,Fe,Le,De]),pt=(0,W.useCallback)(e=>{Ne(t=>{let n=t.find(t=>t.id===e),r=t.filter(t=>t.id!==e);return n?.nodeId&&n.source===`ai`&&(r.some(e=>e.nodeId===n.nodeId&&e.source===`ai`)||k(e=>{let t=new Set(e);return t.delete(n.nodeId),t})),r.length===0&&!a&&Fe(!1),r})},[a]),mt=(0,W.useCallback)(()=>{Ne([]),Fe(!1),Le(null)},[]),ht={viewMode:t,setViewMode:n,graph:r,setGraph:i,selectedNode:a,setSelectedNode:o,isRightPanelOpen:_,setRightPanelOpen:v,rightPanelTab:y,setRightPanelTab:b,openCodePanel:C,openChatPanel:T,helpDialogBoxOpen:x,setHelpDialogBoxOpen:S,visibleLabels:s,toggleLabelVisibility:c,visibleEdgeTypes:l,toggleEdgeVisibility:u,depthFilter:d,setDepthFilter:f,graphViewMode:h,setGraphViewMode:g,highlightedNodeIds:p,setHighlightedNodeIds:m,aiCitationHighlightedNodeIds:O,aiToolHighlightedNodeIds:ee,blastRadiusNodeIds:j,isAIHighlightsEnabled:N,toggleAIHighlights:te,clearAIToolHighlights:ne,clearAICitationHighlights:F,clearBlastRadius:I,queryResult:E,setQueryResult:D,clearQueryHighlights:L,animatedNodes:re,triggerNodeAnimation:oe,clearAnimations:R,progress:z,setProgress:B,projectName:se,setProjectName:V,serverBaseUrl:H,setServerBaseUrl:U,availableRepos:ce,setAvailableRepos:le,switchRepo:ft,setCurrentRepo:Ge,runQuery:Ke,isDatabaseReady:qe,embeddingStatus:ue,embeddingProgress:fe,startEmbeddings:Ye,startEmbeddingsWithFallback:Xe,semanticSearch:Ze,semanticSearchWithContext:Qe,isEmbeddingReady:ue===`ready`,llmSettings:me,updateLLMSettings:$e,isSettingsPanelOpen:ge,setSettingsPanelOpen:_e,isAgentReady:be,isAgentInitializing:Se,agentError:we,chatMessages:Ee,isChatLoading:Oe,currentToolCalls:Ae,refreshLLMSettings:nt,initializeAgent:ct,sendChatMessage:lt,stopChatResponse:ut,clearChat:dt,codeReferences:Me,isCodePanelOpen:Pe,setCodePanelOpen:Fe,addCodeReference:He,removeCodeReference:pt,clearAICodeReferences:Ue,clearCodeReferences:mt,codeReferenceFocus:Ie};return(0,G.jsx)(fi.Provider,{value:ht,children:e})},hi=()=>{let e=(0,W.useContext)(fi);if(!e)throw Error(`useAppState must be used within AppStateProvider`);return e},gi=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),_i=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),vi=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),yi=e=>{let t=vi(e);return t.charAt(0).toUpperCase()+t.slice(1)},bi={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`},xi=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Si=(0,W.createContext)({}),Ci=()=>(0,W.useContext)(Si),wi=(0,W.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Ci()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,W.createElement)(`svg`,{ref:c,...bi,width:t??l??bi.width,height:t??l??bi.height,stroke:e??f,strokeWidth:m,className:gi(`lucide`,p,i),...!a&&!xi(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,W.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),K=(e,t)=>{let n=(0,W.forwardRef)(({className:n,...r},i)=>(0,W.createElement)(wi,{ref:i,iconNode:t,className:gi(`lucide-${_i(yi(e))}`,`lucide-${e}`,n),...r}));return n.displayName=yi(e),n},Ti=K(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Ei=K(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Di=K(`at-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),Oi=K(`box`,[[`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`}]]),ki=K(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),Ai=K(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),ji=K(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Mi=K(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Ni=K(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Pi=K(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Fi=K(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Ii=K(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Li=K(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Ri=K(`copy`,[[`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`}]]),zi=K(`eye-off`,[[`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`}]]),Bi=K(`eye`,[[`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`}]]),Vi=K(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),Hi=K(`focus`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}]]),Ui=K(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),Wi=K(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Gi=K(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),Ki=K(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),qi=K(`globe`,[[`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`}]]),Ji=K(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),Yi=K(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),Xi=K(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),Zi=K(`key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),Qi=K(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),$i=K(`lightbulb-off`,[[`path`,{d:`M16.8 11.2c.8-.9 1.2-2 1.2-3.2a6 6 0 0 0-9.3-5`,key:`1fkcox`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M6.3 6.3a4.67 4.67 0 0 0 1.2 5.2c.7.7 1.3 1.5 1.5 2.5`,key:`10m8kw`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),ea=K(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),ta=K(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),na=K(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ra=K(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),ia=K(`mouse-pointer-click`,[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]),aa=K(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),oa=K(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),sa=K(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),ca=K(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),la=K(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),ua=K(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),da=K(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),fa=K(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),pa=K(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),ma=K(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),ha=K(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),ga=K(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),_a=K(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),va=K(`skip-forward`,[[`path`,{d:`M21 4v16`,key:`7j8fe9`}],[`path`,{d:`M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z`,key:`zs4d6`}]]),ya=K(`snail`,[[`path`,{d:`M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0`,key:`hneq2s`}],[`circle`,{cx:`10`,cy:`13`,r:`8`,key:`194lz3`}],[`path`,{d:`M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6`,key:`ixqyt7`}],[`path`,{d:`M18 3 19.1 5.2`,key:`9tjm43`}],[`path`,{d:`M22 3 20.9 5.2`,key:`j3odrs`}]]),ba=K(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),xa=K(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Sa=K(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Ca=K(`table`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M3 15h18`,key:`5xshup`}]]),wa=K(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Ta=K(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Ea=K(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Da=K(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Oa=K(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),ka=K(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),Aa=K(`variable`,[[`path`,{d:`M8 21s-4-3-4-9 4-9 4-9`,key:`uto9ud`}],[`path`,{d:`M16 3s4 3 4 9-4 9-4 9`,key:`4w2vsq`}],[`line`,{x1:`15`,x2:`9`,y1:`9`,y2:`15`,key:`f7djnv`}],[`line`,{x1:`9`,x2:`15`,y1:`9`,y2:`15`,key:`1shsy8`}]]),ja=K(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ma=K(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),Na=K(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Pa=K(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Fa=(0,W.forwardRef)(function({size:e=24,color:t=`currentColor`,className:n,strokeWidth:r,absoluteStrokeWidth:i,...a},o){let s=typeof e==`string`?Number.parseFloat(e):e;return Number.isFinite(s)&&s<=16?(0,G.jsxs)(`svg`,{ref:o,xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 16 16`,fill:t,className:n,...a,children:[(0,G.jsx)(`path`,{d:`M8 15.282l1.855-5.717H6.145L8 15.282z`}),(0,G.jsx)(`path`,{d:`M8 15.282L6.145 9.565H2.333L8 15.282z`}),(0,G.jsx)(`path`,{d:`M2.333 9.565l-.944-2.942c-.09-.267.067-.553.333-.553h3.153L2.333 9.565z`}),(0,G.jsx)(`path`,{d:`M4.875 6.07L6.145 9.565H2.333l2.542-3.495z`}),(0,G.jsx)(`path`,{d:`M13.667 9.565l.944-2.942c.09-.267-.067-.553-.333-.553h-3.153l2.542 3.495z`}),(0,G.jsx)(`path`,{d:`M11.125 6.07L9.855 9.565h3.812l-2.542-3.495z`}),(0,G.jsx)(`path`,{d:`M8 15.282l1.855-5.717H6.145L8 15.282z`})]}):(0,G.jsx)(`svg`,{ref:o,xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 24 24`,fill:t,className:n,...a,children:(0,G.jsx)(`path`,{d:`m23.6004 9.5927-.0337-.0862L20.3.9814a.851.851 0 0 0-.3362-.405.8748.8748 0 0 0-.9997.0539.8748.8748 0 0 0-.29.4399l-2.2055 6.748H7.5375l-2.2057-6.748a.8573.8573 0 0 0-.29-.4412.8748.8748 0 0 0-.9997-.0537.8585.8585 0 0 0-.3362.4049L.4332 9.5015l-.0325.0862a6.0657 6.0657 0 0 0 2.0119 7.0105l.0113.0087.03.0213 4.976 3.7264 2.462 1.8633 1.4995 1.1321a1.0085 1.0085 0 0 0 1.2197 0l1.4995-1.1321 2.4619-1.8633 5.006-3.7489.0125-.01a6.0682 6.0682 0 0 0 2.0094-7.003z`})})}),Ia=(0,W.forwardRef)(function({size:e=24,color:t=`currentColor`,className:n,strokeWidth:r,absoluteStrokeWidth:i,...a},o){let s=typeof e==`string`?Number.parseFloat(e):e;return Number.isFinite(s)&&s<=16?(0,G.jsx)(`svg`,{ref:o,xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 16 16`,fill:t,className:n,...a,children:(0,G.jsx)(`path`,{d:`M6.766 11.328c-2.063-.25-3.516-1.734-3.516-3.656 0-.781.281-1.625.75-2.188-.203-.515-.172-1.609.063-2.062.625-.078 1.468.25 1.968.703.594-.187 1.219-.281 1.985-.281.765 0 1.39.094 1.953.265.484-.437 1.344-.765 1.969-.687.218.422.25 1.515.046 2.047.5.593.766 1.39.766 2.203 0 1.922-1.453 3.375-3.547 3.64.531.344.89 1.094.89 1.954v1.625c0 .468.391.734.86.547C13.781 14.359 16 11.53 16 8.03 16 3.61 12.406 0 7.984 0 3.563 0 0 3.61 0 8.031a7.88 7.88 0 0 0 5.172 7.422c.422.156.828-.125.828-.547v-1.25c-.219.094-.5.156-.75.156-1.031 0-1.64-.562-2.078-1.609-.172-.422-.36-.672-.719-.719-.187-.015-.25-.093-.25-.187 0-.188.313-.328.625-.328.453 0 .844.281 1.25.86.313.452.64.655 1.031.655s.641-.14 1-.5c.266-.265.47-.5.657-.656`})}):(0,G.jsx)(`svg`,{ref:o,xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 24 24`,fill:t,className:n,...a,children:(0,G.jsx)(`path`,{d:`M10.226 17.284c-2.965-.36-5.054-2.493-5.054-5.256 0-1.123.404-2.336 1.078-3.144-.292-.741-.247-2.314.09-2.965.898-.112 2.111.36 2.83 1.01.853-.269 1.752-.404 2.853-.404 1.1 0 1.999.135 2.807.382.696-.629 1.932-1.1 2.83-.988.315.606.36 2.179.067 2.942.72.854 1.101 2 1.101 3.167 0 2.763-2.089 4.852-5.098 5.234.763.494 1.28 1.572 1.28 2.807v2.336c0 .674.561 1.056 1.235.786 4.066-1.55 7.255-5.615 7.255-10.646C23.5 6.188 18.334 1 11.978 1 5.62 1 .5 6.188.5 12.545c0 4.986 3.167 9.12 7.435 10.669.606.225 1.19-.18 1.19-.786V20.63a2.9 2.9 0 0 1-1.078.224c-1.483 0-2.359-.808-2.987-2.313-.247-.607-.517-.966-1.034-1.033-.27-.023-.359-.135-.359-.27 0-.27.45-.471.898-.471.652 0 1.213.404 1.797 1.235.45.651.921.943 1.483.943.561 0 .92-.202 1.437-.719.382-.381.674-.718.944-.943`})})}),La=`gitnexus-backend-url`;function Ra(){let[e]=(0,W.useState)(()=>{try{return localStorage.getItem(La)??be}catch{return be}}),[t,n]=(0,W.useState)(!1),[r,i]=(0,W.useState)(!1),a=(0,W.useRef)(0),o=(0,W.useCallback)(async()=>{let e=++a.current;i(!0);try{let t=await Tt();return e===a.current?(n(t),t):!1}catch{return e===a.current&&n(!1),!1}finally{e===a.current&&i(!1)}},[]),s=(0,W.useRef)(null),[c,l]=(0,W.useState)(!1),u=(0,W.useRef)(o);u.current=o;let d=(0,W.useCallback)(()=>{s.current!==null&&(clearTimeout(s.current),s.current=null),l(!1)},[]),f=(0,W.useCallback)(()=>{d(),l(!0);let e=()=>{s.current=setTimeout(async()=>{if(document.hidden){s.current=null;return}await u.current()?(l(!1),s.current=null):e()},3e3)};e()},[d]);return(0,W.useEffect)(()=>{if(!c)return;let e=()=>{document.hidden||(s.current!==null&&(clearTimeout(s.current),s.current=null),u.current().then(e=>{!e&&c&&f()}))};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[c,f]),(0,W.useEffect)(()=>()=>{s.current!==null&&clearTimeout(s.current)},[]),(0,W.useEffect)(()=>{ht(e),o()},[]),{isConnected:t,isProbing:r,backendUrl:e,startPolling:f,stopPolling:d,isPolling:c}}function za({text:e}){let{t}=Nr(`onboarding`),[n,r]=(0,W.useState)(!1),i=(0,W.useRef)(null);return(0,W.useEffect)(()=>()=>{i.current&&clearTimeout(i.current)},[]),(0,G.jsx)(`button`,{onClick:async()=>{try{await navigator.clipboard.writeText(e),r(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>r(!1),2e3)}catch{}},"aria-label":t(n?`guide.copiedAria`:`guide.copyAria`),className:`shrink-0 cursor-pointer rounded-md px-2 py-1 transition-all duration-200 focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:outline-none ${n?`bg-emerald-400/10 text-emerald-400`:`text-text-muted hover:bg-white/5 hover:text-text-primary`} `,children:n?(0,G.jsx)(ji,{className:`h-3.5 w-3.5`}):(0,G.jsx)(Ri,{className:`h-3.5 w-3.5`})})}function Ba({command:e,label:t,isActive:n=!1}){return(0,G.jsxs)(`div`,{className:`overflow-hidden rounded-xl border transition-all duration-300 ${n?`border-accent/40 shadow-glow-soft`:`border-border-default hover:border-accent/20 hover:shadow-glow-soft`} `,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border-subtle bg-deep px-4 py-2.5`,children:[(0,G.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,G.jsx)(`div`,{className:`h-2.5 w-2.5 rounded-full bg-red-500/60`}),(0,G.jsx)(`div`,{className:`h-2.5 w-2.5 rounded-full bg-yellow-500/60`}),(0,G.jsx)(`div`,{className:`h-2.5 w-2.5 rounded-full bg-emerald-500/60`})]}),(0,G.jsx)(`span`,{className:`flex-1 text-center font-mono text-[11px] text-text-muted`,children:t}),(0,G.jsx)(za,{text:e})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-3 bg-void px-4 py-3.5 font-mono text-sm`,children:[(0,G.jsx)(`span`,{className:`text-accent/60 select-none`,"aria-hidden":`true`,children:`$`}),(0,G.jsx)(`code`,{className:`flex-1 overflow-x-auto tracking-wide whitespace-nowrap text-text-primary`,children:e})]})]})}function Va({state:e,number:t}){return e===`done`?(0,G.jsx)(`div`,{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-full border border-emerald-500/50 bg-emerald-500/20`,children:(0,G.jsx)(ji,{className:`h-3 w-3 text-emerald-400`})}):e===`active`?(0,G.jsxs)(`div`,{className:`relative flex h-6 w-6 shrink-0 items-center justify-center`,children:[(0,G.jsx)(`div`,{className:`absolute inset-0 animate-ping rounded-full border border-accent/30`}),(0,G.jsx)(`div`,{className:`flex h-6 w-6 items-center justify-center rounded-full border border-accent/60 bg-accent/20`,children:(0,G.jsx)(`span`,{className:`text-[10px] leading-none font-semibold text-accent`,children:t})})]}):(0,G.jsx)(`div`,{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-full border border-border-subtle bg-elevated`,children:(0,G.jsx)(`span`,{className:`text-[10px] leading-none font-semibold text-text-muted`,children:t})})}function Ha({state:e,number:t,title:n,description:r,children:i}){let{t:a}=Nr(`onboarding`),o=e!==`waiting`;return(0,G.jsx)(`div`,{className:`transition-all duration-300 ${e===`waiting`?`opacity-40`:`opacity-100`} `,children:(0,G.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,G.jsx)(Va,{state:e,number:t}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1 pt-0.5`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`text-sm font-medium transition-colors duration-200 ${e===`done`?`text-emerald-400`:e===`active`?`text-text-primary`:`text-text-muted`}`,children:n}),e===`done`&&(0,G.jsx)(`span`,{className:`animate-fade-in font-mono text-[10px] tracking-wider text-emerald-400/60 uppercase`,children:a(`guide.done`)})]}),r&&(0,G.jsx)(`p`,{className:`mt-0.5 text-xs leading-relaxed text-text-muted`,children:r}),o&&i&&(0,G.jsx)(`div`,{className:`mt-3 animate-slide-up`,children:i})]})]})})}function Ua(){let{t:e}=Nr(`onboarding`);return(0,G.jsxs)(`div`,{className:`flex animate-fade-in items-center gap-3 rounded-xl border border-accent/15 bg-accent/5 px-4 py-3`,"aria-live":`polite`,role:`status`,children:[(0,G.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,G.jsx)(Ma,{className:`h-4 w-4 text-accent/70`}),(0,G.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,G.jsx)(`div`,{className:`h-5 w-5 animate-pulse rounded-full border border-accent/25`})})]}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`p`,{className:`text-xs font-medium text-text-secondary`,children:[e(`guide.listeningForServer`),(0,G.jsx)(`span`,{className:`ml-0.5 inline-flex text-text-muted`,children:(0,G.jsx)(`span`,{className:`animate-pulse`,children:`...`})})]}),(0,G.jsx)(`p`,{className:`mt-0.5 text-[11px] text-text-muted`,children:e(`guide.willAutoConnect`)})]})]})}var Wa=({isPolling:e})=>{let{t}=Nr(`onboarding`),n=t(`guide.terminal`),r=e?`done`:`active`,i=e?`active`:`waiting`;return(0,G.jsxs)(`div`,{className:`relative animate-fade-in overflow-hidden rounded-3xl border border-border-default bg-surface p-7`,children:[(0,G.jsx)(`div`,{className:`pointer-events-none absolute -top-28 -right-28 h-72 w-72 rounded-full bg-accent/6 blur-3xl`}),(0,G.jsx)(`div`,{className:`pointer-events-none absolute -bottom-24 -left-24 h-56 w-56 rounded-full bg-node-function/6 blur-3xl`}),(0,G.jsx)(`div`,{className:`relative mb-6`,children:(0,G.jsxs)(`div`,{className:`text-center`,children:[(0,G.jsxs)(`div`,{className:`mb-2 inline-flex items-center gap-1.5`,children:[(0,G.jsx)(ba,{className:`h-3.5 w-3.5 text-accent/70`}),(0,G.jsx)(`span`,{className:`text-[11px] font-medium tracking-widest text-accent/80 uppercase`,children:`GitNexus`})]}),(0,G.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-text-primary`,children:t(`guide.startServer`)}),(0,G.jsx)(`p`,{className:`mx-auto mt-1 max-w-xs text-sm leading-relaxed text-text-secondary`,children:t(`guide.prodDescription`)})]})}),(0,G.jsxs)(`div`,{className:`relative space-y-5`,children:[(0,G.jsx)(`div`,{className:`pointer-events-none absolute top-6 bottom-6 left-[11px] w-px bg-border-subtle`,"aria-hidden":`true`}),(0,G.jsxs)(Ha,{state:r,number:1,title:t(`guide.copyCommand`),description:e?void 0:t(`guide.copyCommandDescription`),children:[(0,G.jsx)(Ba,{command:`npx gitnexus@latest serve`,label:n,isActive:r===`active`}),(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`my-3 flex items-center gap-3`,children:[(0,G.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`}),(0,G.jsx)(`span`,{className:`text-[11px] tracking-widest text-text-muted uppercase`,children:t(`guide.orInstallGlobally`)}),(0,G.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`})]}),(0,G.jsx)(Ba,{command:`npm install -g gitnexus && gitnexus serve`,label:t(`guide.globalInstall`),isActive:!1})]})]}),(0,G.jsx)(Ha,{state:i,number:2,title:t(e?`guide.waitingForServer`:`guide.pasteAndRun`),description:e?void 0:t(`guide.pasteAndRunDescription`),children:e&&(0,G.jsx)(Ua,{})}),(0,G.jsx)(Ha,{state:`waiting`,number:3,title:t(`guide.autoConnects`),description:t(`guide.autoConnectsDescription`)})]}),(0,G.jsxs)(`div`,{className:`mt-6 flex items-center justify-center gap-1.5 border-t border-border-subtle pt-5 text-xs text-text-muted`,children:[(0,G.jsx)(ga,{className:`h-3 w-3 shrink-0`}),(0,G.jsxs)(`span`,{children:[t(`guide.requires`),` `,(0,G.jsxs)(`a`,{href:`https://nodejs.org`,target:`_blank`,rel:`noopener noreferrer`,className:`text-accent transition-colors hover:text-accent/80 hover:underline`,children:[`Node.js `,Ce,`+`]})]}),(0,G.jsx)(`span`,{className:`mx-1 text-border-default`,children:`·`}),(0,G.jsx)(Ta,{className:`h-3 w-3 shrink-0`}),(0,G.jsx)(`span`,{children:t(`guide.port`)})]})]})};function Ga(e,t,n){return n(`common:analyzePhases.${e}`,{defaultValue:``})||t||e}function Ka(e,t){if(!e)return``;let n=qa[e];return n?t(n):e}var qa={"Connecting...":`common:progress.connectingShort`,"Connecting to server...":`common:progress.connecting`,"Validating server":`common:progress.validatingServer`,"Validating server...":`common:progress.validatingServerEllipsis`,"Downloading graph...":`common:progress.downloadingGraph`,"Extracting file contents":`common:progress.extractingFileContents`,"Processing...":`common:progress.processing`,"Processing graph...":`common:progress.processingGraph`,"Loading graph...":`common:progress.loadingGraph`,Queued:`common:analyzePhases.queued`,"Starting...":`common:progress.starting`},Ja=({progress:e,onCancel:t})=>{let{t:n}=Nr(`common`),[r]=(0,W.useState)(()=>Date.now()),[i,a]=(0,W.useState)(0);(0,W.useEffect)(()=>{let e=setInterval(()=>a(Date.now()-r),1e3);return()=>clearInterval(e)},[r]);let o=e=>{let t=Math.floor(e/1e3);return t<60?n(`units.elapsedSeconds`,{seconds:t}):n(`units.elapsedMinutesSeconds`,{minutes:Math.floor(t/60),seconds:t%60})},s=Ga(e.phase,e.message,n),c=Math.max(0,Math.min(100,e.percent));return(0,G.jsxs)(`div`,{className:`space-y-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between text-sm`,children:[(0,G.jsx)(`span`,{className:`font-medium text-text-secondary`,children:s}),(0,G.jsx)(`span`,{className:`font-mono text-xs text-text-muted`,children:o(i)})]}),(0,G.jsx)(`div`,{className:`h-2 overflow-hidden rounded-full bg-elevated`,children:(0,G.jsx)(`div`,{className:`h-full rounded-full bg-accent transition-all duration-300 ease-out`,style:{width:`${c}%`}})}),(0,G.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,G.jsxs)(`span`,{className:`font-mono text-xs text-text-muted`,children:[c,`%`]}),(0,G.jsxs)(`button`,{onClick:t,className:`flex items-center gap-1.5 rounded-lg bg-red-500/10 px-3 py-1.5 text-xs text-red-400 transition-all duration-200 hover:bg-red-500/20`,children:[(0,G.jsx)(ja,{className:`h-3.5 w-3.5`}),n(`actions.cancel`)]})]})]})},Ya=/^https?:\/\/(www\.)?github\.com\/[^/\s]+\/[^/\s]+/i,Xa=/^https?:\/\/[^/\s]+\/[^/\s]+\/[^/\s]+(\/.*)?$/i,Za=navigator.userAgent.toLowerCase().includes(`win`);function Qa(e){return Ya.test(e.trim())}function $a(e){return Xa.test(e.trim())}function eo({mode:e,onChange:t}){let{t:n}=Nr(`onboarding`);return(0,G.jsxs)(`div`,{className:`flex gap-1 rounded-lg bg-elevated p-1`,role:`tablist`,"aria-label":n(`repoAnalyzer.inputType`),children:[(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":e===`github`,onClick:()=>t(`github`),className:`flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all duration-150 ${e===`github`?`bg-accent text-white shadow-sm`:`text-text-muted hover:text-text-secondary`} `,children:[(0,G.jsx)(Ia,{className:`h-3 w-3`}),n(`repoAnalyzer.githubUrl`)]}),(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":e===`gitlab`,onClick:()=>t(`gitlab`),className:`flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all duration-150 ${e===`gitlab`?`bg-accent text-white shadow-sm`:`text-text-muted hover:text-text-secondary`} `,children:[(0,G.jsx)(Fa,{className:`h-3 w-3`}),n(`repoAnalyzer.gitlabUrl`)]}),(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":e===`local`,onClick:()=>t(`local`),className:`flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all duration-150 ${e===`local`?`bg-accent text-white shadow-sm`:`text-text-muted hover:text-text-secondary`} `,children:[(0,G.jsx)(Ui,{className:`h-3 w-3`}),n(`repoAnalyzer.localFolder`)]})]})}function to({canSubmit:e,isLoading:t,onClick:n,variant:r}){let{t:i}=Nr(`onboarding`);return(0,G.jsxs)(`button`,{onClick:n,disabled:!e||t,className:` ${r===`onboarding`?`w-full px-5 py-3.5 text-sm`:`w-full px-4 py-3 text-sm`} flex items-center justify-center gap-2.5 rounded-xl font-medium transition-all duration-200 ${e&&!t?`cursor-pointer bg-accent text-white shadow-glow-soft hover:-translate-y-0.5 hover:bg-accent/90 hover:shadow-glow`:`cursor-not-allowed border border-border-subtle bg-elevated text-text-muted`} `,children:[t?(0,G.jsx)(na,{className:`h-4 w-4 animate-spin`}):(0,G.jsx)(ba,{className:`h-4 w-4`}),(0,G.jsx)(`span`,{children:i(t?`repoAnalyzer.starting`:`repoAnalyzer.analyzeRepository`)}),e&&!t&&(0,G.jsx)(Ei,{className:`h-3.5 w-3.5`})]})}function no({repoName:e}){let{t}=Nr(`onboarding`);return(0,G.jsxs)(`div`,{className:`flex animate-fade-in flex-col items-center gap-3 py-4`,role:`status`,"aria-live":`polite`,children:[(0,G.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-xl border border-emerald-500/30 bg-emerald-500/15 shadow-[0_0_20px_rgba(16,185,129,0.15)]`,children:(0,G.jsx)(ji,{className:`h-6 w-6 text-emerald-400`})}),(0,G.jsxs)(`div`,{className:`text-center`,children:[(0,G.jsx)(`p`,{className:`text-sm font-medium text-emerald-400`,children:t(`repoAnalyzer.complete`)}),(0,G.jsx)(`p`,{className:`mt-0.5 font-mono text-xs text-text-muted`,children:e})]}),(0,G.jsx)(`p`,{className:`text-xs text-text-secondary`,children:t(`repoAnalyzer.loadingGraph`)})]})}var ro=({variant:e,onComplete:t,onCancel:n})=>{let{t:r}=Nr([`common`,`errors`,`onboarding`]),i=(0,W.useId)(),a=(0,W.useRef)(null),[o,s]=(0,W.useState)(`github`),[c,l]=(0,W.useState)(``),[u,d]=(0,W.useState)(``),[f,p]=(0,W.useState)(``),[m,h]=(0,W.useState)(`input`),[g,_]=(0,W.useState)(null),[v,y]=(0,W.useState)({phase:`queued`,percent:0,message:r(`common:analyzePhases.queued`)}),[b,x]=(0,W.useState)(``),S=(0,W.useRef)(null),C=(0,W.useRef)(null),w=(0,W.useRef)(null);(0,W.useEffect)(()=>()=>{C.current?.abort(),w.current&&clearTimeout(w.current)},[]);let T=e=>{s(e),l(``),d(``),p(``),_(null)},E=o===`github`?Qa(c)&&(m===`input`||m===`error`):o===`gitlab`?$a(u)&&(m===`input`||m===`error`):f.trim().length>1&&(m===`input`||m===`error`),D=async()=>{if(o===`github`&&!Qa(c)){_(r(`errors:invalidGithubUrl`));return}if(o===`gitlab`&&!$a(u)){_(`Please enter a valid GitLab repository URL.`);return}if(o===`local`&&f.trim().length<2){_(r(`errors:missingFolderPath`));return}_(null),h(`starting`);try{let{jobId:e}=await Ft(o===`github`?{url:c.trim()}:o===`gitlab`?{url:u.trim()}:{path:f.trim()});S.current=e,h(`analyzing`);let n=o===`github`?c.trim():o===`gitlab`?u.trim():f.trim();C.current=Lt(e,e=>y(e),e=>{let i=e.repoName??n.split(/[/\\]/).filter(Boolean).at(-1)??r(`onboarding:repoAnalyzer.defaultRepoName`);x(i),h(`done`),C.current=null,w.current=setTimeout(()=>{w.current=null,t(i)},1200)},e=>{_(e||r(`errors:analysisFailed`)),h(`error`)})}catch(e){_(e instanceof Error?e.message:r(`errors:startAnalysisFailed`)),h(`error`)}},O=async()=>{if(C.current?.abort(),C.current=null,S.current){try{await It(S.current)}catch{}S.current=null}h(`input`),y({phase:`queued`,percent:0,message:r(`common:analyzePhases.queued`)})},k=m===`starting`,ee=m!==`analyzing`&&m!==`done`,A=Za;return(0,G.jsxs)(`div`,{className:`space-y-4`,children:[ee&&(0,G.jsx)(eo,{mode:o,onChange:T}),ee&&o===`github`&&(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`label`,{htmlFor:i,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.githubRepositoryUrl`)}),(0,G.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border bg-void px-4 py-3.5 transition-all duration-200 ${g&&m===`error`?`border-red-500/50`:Qa(c)?`border-accent/50 shadow-[0_0_0_3px_rgba(124,58,237,0.08)]`:`border-border-default focus-within:border-accent/40`} `,children:[(0,G.jsx)(Ia,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,G.jsx)(`input`,{id:i,type:`url`,value:c,onChange:e=>{l(e.target.value),g&&_(null)},onKeyDown:e=>{e.key===`Enter`&&E&&!k&&(e.preventDefault(),D())},disabled:k,placeholder:`https://github.com/owner/repo`,autoComplete:`url`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`}),c.length>10&&(0,G.jsx)(`div`,{className:`shrink-0`,children:Qa(c)?(0,G.jsx)(ji,{className:`h-3.5 w-3.5 text-emerald-400`}):(0,G.jsx)(Fi,{className:`h-3.5 w-3.5 text-text-muted`})})]})]}),ee&&o===`gitlab`&&(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`label`,{htmlFor:i,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.gitlabRepositoryUrl`)}),(0,G.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border bg-void px-4 py-3.5 transition-all duration-200 ${g&&m===`error`?`border-red-500/50`:$a(u)?`border-accent/50 shadow-[0_0_0_3px_rgba(124,58,237,0.08)]`:`border-border-default focus-within:border-accent/40`} `,children:[(0,G.jsx)(Fa,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,G.jsx)(`input`,{id:i,type:`url`,value:u,onChange:e=>{d(e.target.value),g&&_(null)},onKeyDown:e=>{e.key===`Enter`&&E&&!k&&(e.preventDefault(),D())},disabled:k,placeholder:`https://gitlab.com/owner/repo`,autoComplete:`url`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`}),u.length>10&&(0,G.jsx)(`div`,{className:`shrink-0`,children:$a(u)?(0,G.jsx)(ji,{className:`h-3.5 w-3.5 text-emerald-400`}):(0,G.jsx)(Fi,{className:`h-3.5 w-3.5 text-text-muted`})})]}),(0,G.jsx)(`p`,{className:`text-xs text-text-muted`,children:r(`onboarding:repoAnalyzer.gitlabSupported`)})]}),ee&&o===`local`&&(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`label`,{htmlFor:`${i}-local`,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.localFolderPath`)}),(0,G.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border bg-void px-4 py-3.5 transition-all duration-200 ${g&&m===`error`?`border-red-500/50`:f.trim().length>1?`border-accent/50 shadow-[0_0_0_3px_rgba(124,58,237,0.08)]`:`border-border-default focus-within:border-accent/40`} `,children:[(0,G.jsx)(Ui,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,G.jsx)(`input`,{id:`${i}-local`,type:`text`,value:f,onChange:e=>{p(e.target.value),g&&_(null)},onKeyDown:e=>{e.key===`Enter`&&E&&!k&&(e.preventDefault(),D())},disabled:k,placeholder:A?`C:\\Users\\you\\project`:`/home/you/project`,autoComplete:`off`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`}),f.trim().length>1&&(0,G.jsx)(ji,{className:`h-3.5 w-3.5 shrink-0 text-emerald-400`})]}),(0,G.jsx)(`input`,{ref:a,type:`file`,webkitdirectory:``,className:`hidden`,onChange:e=>{let t=e.target.files;if(t&&t.length>0){let e=t[0].webkitRelativePath.split(`/`)[0];e&&(p(e),_(null))}e.target.value=``}}),(0,G.jsxs)(`button`,{type:`button`,onClick:()=>a.current?.click(),disabled:k,className:`flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg border border-border-subtle bg-elevated px-3 py-2 text-xs font-medium text-text-secondary transition-all duration-150 hover:bg-hover hover:text-text-primary disabled:opacity-50`,children:[(0,G.jsx)(Ui,{className:`h-3.5 w-3.5`}),r(`onboarding:repoAnalyzer.browseForFolder`)]})]}),(m===`error`||m===`input`&&g)&&g&&(0,G.jsxs)(`p`,{className:`flex animate-fade-in items-center gap-1.5 text-xs text-red-400`,children:[(0,G.jsx)(Fi,{className:`h-3 w-3 shrink-0`}),g]}),m===`analyzing`&&(0,G.jsx)(`div`,{className:`animate-slide-up`,children:(0,G.jsx)(Ja,{progress:v,onCancel:O})}),m===`done`&&(0,G.jsx)(no,{repoName:b}),(m===`input`||m===`starting`)&&(0,G.jsx)(to,{canSubmit:E,isLoading:k,onClick:D,variant:e}),m===`error`&&(0,G.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,G.jsx)(`button`,{onClick:()=>{_(null),h(`input`)},className:`flex-1 cursor-pointer rounded-xl border border-border-subtle bg-elevated px-4 py-2.5 text-sm text-text-secondary transition-all duration-200 hover:bg-hover hover:text-text-primary`,children:r(`common:actions.tryAgain`)}),n&&(0,G.jsx)(`button`,{onClick:n,className:`cursor-pointer px-4 py-2.5 text-sm text-text-muted transition-colors hover:text-text-secondary`,children:r(`common:actions.dismiss`)})]}),m===`analyzing`&&e===`sheet`&&n&&(0,G.jsx)(`button`,{onClick:n,className:`w-full cursor-pointer py-1 text-xs text-text-muted transition-colors hover:text-text-secondary`,children:r(`onboarding:repoAnalyzer.hideBackground`)})]})},io=({onComplete:e})=>{let{t}=Nr(`onboarding`);return(0,G.jsxs)(`div`,{className:`relative animate-fade-in overflow-hidden rounded-3xl border border-border-default bg-surface p-7`,children:[(0,G.jsx)(`div`,{className:`pointer-events-none absolute -top-28 -right-28 h-72 w-72 rounded-full bg-accent/6 blur-3xl`}),(0,G.jsx)(`div`,{className:`pointer-events-none absolute -bottom-24 -left-24 h-56 w-56 rounded-full bg-node-function/6 blur-3xl`}),(0,G.jsx)(`div`,{className:`relative mb-6`,children:(0,G.jsxs)(`div`,{className:`text-center`,children:[(0,G.jsxs)(`div`,{className:`mb-2 inline-flex items-center gap-1.5`,children:[(0,G.jsx)(ba,{className:`h-3.5 w-3.5 text-accent/70`}),(0,G.jsx)(`span`,{className:`text-[11px] font-medium tracking-widest text-accent/80 uppercase`,children:`GitNexus`})]}),(0,G.jsx)(`div`,{className:`mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-2xl border border-accent/30 bg-gradient-to-br from-accent/20 to-accent-dim/10 shadow-glow-soft`,children:(0,G.jsx)(Ia,{className:`h-7 w-7 text-accent`})}),(0,G.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-text-primary`,children:t(`analyzeFirst.title`)}),(0,G.jsx)(`p`,{className:`mx-auto mt-1.5 max-w-xs text-sm leading-relaxed text-text-secondary`,children:t(`analyzeFirst.description`)})]})}),(0,G.jsx)(`div`,{className:`relative`,children:(0,G.jsx)(ro,{variant:`onboarding`,onComplete:e})}),(0,G.jsx)(`p`,{className:`mt-5 text-center text-[11px] leading-relaxed text-text-muted`,children:t(`analyzeFirst.footer`)})]})};function ao(e,t){let n=new Date(e),r=new Date().getTime()-n.getTime(),i=Math.floor(r/6e4);if(i<1)return t(`onboarding:landing.time.justNow`);if(i<60)return t(`onboarding:landing.time.minutesAgo`,{count:i});let a=Math.floor(i/60);if(a<24)return t(`onboarding:landing.time.hoursAgo`,{count:a});let o=Math.floor(a/24);return o<30?t(`onboarding:landing.time.daysAgo`,{count:o}):n.toLocaleDateString()}function oo({repo:e,onClick:t}){let{t:n}=Nr([`common`,`onboarding`]),r=e.stats;return(0,G.jsxs)(`button`,{onClick:t,"data-testid":`landing-repo-card`,className:`group w-full cursor-pointer rounded-xl border border-border-default bg-elevated p-4 text-left transition-all duration-200 hover:border-accent/40 hover:bg-hover hover:shadow-glow-soft`,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(Ki,{className:`h-4 w-4 shrink-0 text-accent`}),(0,G.jsx)(`h3`,{className:`truncate text-sm font-semibold text-text-primary transition-colors group-hover:text-accent`,children:e.name})]}),e.indexedAt&&(0,G.jsx)(`p`,{className:`mt-1 pl-6 text-xs text-text-muted`,children:n(`onboarding:landing.indexed`,{time:ao(e.indexedAt,n)})})]}),(0,G.jsx)(Ei,{className:`h-4 w-4 shrink-0 text-text-muted opacity-0 transition-all duration-200 group-hover:translate-x-0.5 group-hover:text-accent group-hover:opacity-100`})]}),r&&(r.files||r.nodes)&&(0,G.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 pl-6`,children:[r.files!=null&&(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-void px-2 py-0.5 text-[11px] text-text-muted`,children:[(0,G.jsx)(Vi,{className:`h-3 w-3`}),` `,n(`common:counts.files`,{count:r.files})]}),r.nodes!=null&&(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-void px-2 py-0.5 text-[11px] text-text-muted`,children:[(0,G.jsx)(Qi,{className:`h-3 w-3`}),` `,n(`common:counts.symbols`,{count:r.nodes})]}),r.processes!=null&&r.processes>0&&(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-void px-2 py-0.5 text-[11px] text-text-muted`,children:[(0,G.jsx)(ba,{className:`h-3 w-3`}),` `,n(`common:counts.flows`,{count:r.processes})]})]})]})}var so=({repos:e,onSelectRepo:t,onAnalyzeComplete:n})=>{let{t:r}=Nr(`onboarding`);return(0,G.jsxs)(`div`,{className:`relative animate-fade-in overflow-hidden rounded-3xl border border-border-default bg-surface p-7`,children:[(0,G.jsx)(`div`,{className:`pointer-events-none absolute -top-28 -right-28 h-72 w-72 rounded-full bg-accent/6 blur-3xl`}),(0,G.jsx)(`div`,{className:`pointer-events-none absolute -bottom-24 -left-24 h-56 w-56 rounded-full bg-node-function/6 blur-3xl`}),(0,G.jsx)(`div`,{className:`relative mb-6`,children:(0,G.jsxs)(`div`,{className:`text-center`,children:[(0,G.jsxs)(`div`,{className:`mb-2 inline-flex items-center gap-1.5`,children:[(0,G.jsx)(ba,{className:`h-3.5 w-3.5 text-accent/70`}),(0,G.jsx)(`span`,{className:`text-[11px] font-medium tracking-widest text-accent/80 uppercase`,children:`GitNexus`})]}),(0,G.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-text-primary`,children:r(`landing.chooseRepository`)}),(0,G.jsx)(`p`,{className:`mx-auto mt-1.5 max-w-xs text-sm leading-relaxed text-text-secondary`,children:r(`landing.description`)})]})}),(0,G.jsx)(`div`,{className:`relative mb-5 space-y-2`,children:e.map(e=>(0,G.jsx)(oo,{repo:e,onClick:()=>t(e.name)},e.name))}),(0,G.jsxs)(`div`,{className:`mb-5 flex items-center gap-3`,children:[(0,G.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`}),(0,G.jsx)(`span`,{className:`text-[11px] tracking-widest text-text-muted uppercase`,children:r(`landing.orAnalyzeNew`)}),(0,G.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`})]}),(0,G.jsx)(`div`,{className:`relative`,children:(0,G.jsx)(ro,{variant:`onboarding`,onComplete:n})}),(0,G.jsx)(`p`,{className:`mt-5 text-center text-[11px] leading-relaxed text-text-muted`,children:r(`landing.footer`)})]})};function co(e,t){if(e instanceof dt){let n=e.retryAfterMs?Math.ceil(e.retryAfterMs/1e3):void 0,r=e.message||t(`errors:unknown`);switch(e.code){case`network`:return t(`errors:backend.network`,{defaultValue:r});case`timeout`:return t(`errors:backend.timeout`,{defaultValue:r});case`rate_limited`:return t(`errors:backend.rateLimited`,{seconds:n,defaultValue:r});case`not_found`:return t(`errors:backend.notFound`,{defaultValue:r});case`client`:return t(`errors:backend.client`,{message:e.message,defaultValue:r});case`server`:return t(`errors:backend.server`,{message:e.message,defaultValue:r});default:return r}}return e instanceof Error?e.message:t(`errors:unknown`)}function lo({activeKey:e,children:t}){let[n,r]=(0,W.useState)(e),[i,a]=(0,W.useState)(!1),o=(0,W.useRef)(t),s=(0,W.useRef)(null);return!i&&e===n&&(o.current=t),(0,W.useEffect)(()=>(e!==n&&(a(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{o.current=null,r(e),a(!1)},300)),()=>{s.current&&clearTimeout(s.current)}),[e,n]),(0,G.jsx)(`div`,{className:`transition-[opacity,transform] duration-300 ease-out`,style:{opacity:+!i,transform:i?`scale(0.97) translateY(8px)`:`scale(1) translateY(0)`},children:i?o.current:t})}function uo(){let{t:e}=Nr(`onboarding`);return(0,G.jsxs)(`div`,{className:`relative overflow-hidden rounded-3xl border border-emerald-500/20 bg-surface p-7`,role:`status`,"aria-live":`polite`,children:[(0,G.jsx)(`div`,{className:`pointer-events-none absolute -top-20 left-1/2 h-64 w-64 -translate-x-1/2 rounded-full bg-emerald-500/8 blur-3xl`}),(0,G.jsxs)(`div`,{className:`relative`,children:[(0,G.jsx)(`div`,{className:`mx-auto mb-5 flex h-16 w-16 items-center justify-center rounded-2xl border border-emerald-500/30 bg-gradient-to-br from-emerald-500/20 to-emerald-600/10 shadow-[0_0_30px_rgba(16,185,129,0.15)]`,children:(0,G.jsx)(ji,{className:`h-8 w-8 text-emerald-400`})}),(0,G.jsx)(`h2`,{className:`mb-2 text-center text-lg font-semibold text-emerald-400`,children:e(`success.title`)}),(0,G.jsx)(`p`,{className:`text-center text-sm leading-relaxed text-text-secondary`,children:e(`success.description`)}),(0,G.jsx)(`div`,{className:`mt-6 flex items-center justify-center gap-2`,children:(0,G.jsx)(`div`,{className:`flex gap-1`,children:[0,1,2].map(e=>(0,G.jsx)(`div`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-emerald-400/60`,style:{animationDelay:`${e*200}ms`}},e))})})]})]})}function fo({message:e}){let{t}=Nr([`common`,`onboarding`]);return(0,G.jsxs)(`div`,{className:`relative overflow-hidden rounded-3xl border border-accent/20 bg-surface p-7`,role:`status`,"aria-live":`polite`,children:[(0,G.jsx)(`div`,{className:`pointer-events-none absolute -top-20 left-1/2 h-64 w-64 -translate-x-1/2 rounded-full bg-accent/8 blur-3xl`}),(0,G.jsxs)(`div`,{className:`relative`,children:[(0,G.jsx)(`div`,{className:`mx-auto mb-5 flex h-16 w-16 items-center justify-center rounded-2xl border border-accent/30 bg-gradient-to-br from-accent/20 to-accent-dim/10 shadow-glow-soft`,children:(0,G.jsx)(na,{className:`h-8 w-8 animate-spin text-accent`})}),(0,G.jsx)(`h2`,{className:`mb-2 text-center text-lg font-semibold text-text-primary`,children:e||t(`common:progress.connectingShort`)}),(0,G.jsx)(`p`,{className:`text-center text-sm leading-relaxed text-text-secondary`,children:t(`onboarding:loading.largeRepoHint`)}),(0,G.jsx)(`div`,{className:`mt-5 flex items-center justify-center`,children:(0,G.jsx)(ba,{className:`h-4 w-4 text-accent/30`})})]})]})}var po=({onServerConnect:e})=>{let{t}=Nr([`common`,`errors`]),[n,r]=(0,W.useState)(null),{isConnected:i,isProbing:a,startPolling:o,stopPolling:s,isPolling:c,backendUrl:l}=Ra(),[u,d]=(0,W.useState)(!1),f=(0,W.useRef)(!1),p=(0,W.useRef)(null),[m,h]=(0,W.useState)(`onboarding`),[g,_]=(0,W.useState)(``),v=(0,W.useRef)(null),[y,b]=(0,W.useState)([]),x=async()=>{h(`loading`),_(t(`common:progress.connectingShort`)),r(null);try{let e=await Et();if(e.length===0){h(`analyze`),f.current=!1;return}b(e),h(`landing`)}catch(e){if(e.name===`AbortError`)return;r(co(e,t)),h(`onboarding`)}},S=(0,W.useRef)(x);S.current=x;let C=n=>{f.current=!0,h(`loading`),_(t(`common:progress.loadingGraph`)),r(null),(async()=>{let i=new AbortController;v.current=i;try{let r=await Bt(l,(e,n,r)=>{if(e===`validating`)_(t(`common:progress.validatingServerEllipsis`));else if(e===`downloading`){let e=r?Math.round(n/r*100):null,i=(n/(1024*1024)).toFixed(1);_(e?t(`common:progress.downloadingWithPercent`,{percent:e}):t(`common:progress.downloadingMb`,{mb:i}))}else e===`extracting`&&_(t(`common:progress.processingGraph`))},i.signal,n);e&&await e(r,l)}catch(e){if(e.name===`AbortError`)return;r(co(e,t)),h(y.length>0?`landing`:`analyze`)}finally{v.current=null}})()};(0,W.useEffect)(()=>{!a&&!u&&d(!0)},[a,u]),(0,W.useEffect)(()=>{u&&!i&&!c&&!f.current&&o()},[u,i,c,o]),(0,W.useEffect)(()=>{i&&!f.current&&(f.current=!0,s(),h(`success`),p.current=setTimeout(()=>{p.current=null,S.current()},1200)),!i&&f.current&&!a&&(f.current=!1,p.current!==null&&(clearTimeout(p.current),p.current=null),h(`onboarding`),r(null))},[i,a,s]),(0,W.useEffect)(()=>()=>{p.current!==null&&clearTimeout(p.current),v.current?.abort()},[]);let w=u?m:null;return(0,G.jsxs)(`div`,{className:`flex min-h-screen items-center justify-center bg-void p-8`,children:[(0,G.jsxs)(`div`,{className:`pointer-events-none fixed inset-0`,children:[(0,G.jsx)(`div`,{className:`absolute top-1/4 left-1/4 h-96 w-96 rounded-full bg-accent/10 blur-3xl`}),(0,G.jsx)(`div`,{className:`absolute right-1/4 bottom-1/4 h-96 w-96 rounded-full bg-node-interface/10 blur-3xl`})]}),(0,G.jsxs)(`div`,{className:`relative w-full max-w-lg`,children:[n&&(0,G.jsx)(`div`,{className:`mb-4 animate-fade-in rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-center text-sm text-red-400`,children:n}),w&&(0,G.jsxs)(lo,{activeKey:w,children:[w===`onboarding`&&(0,G.jsx)(Wa,{isPolling:c}),w===`analyze`&&(0,G.jsx)(io,{onComplete:C}),w===`landing`&&(0,G.jsx)(so,{repos:y,onSelectRepo:C,onAnalyzeComplete:C}),w===`success`&&(0,G.jsx)(uo,{}),w===`loading`&&(0,G.jsx)(fo,{message:g})]})]})]})},mo=({progress:e})=>{let{t}=Nr([`common`,`graph`]),n=Ka(e.message,t),r=Ka(e.detail,t);return(0,G.jsxs)(`div`,{className:`fixed inset-0 z-50 flex flex-col items-center justify-center bg-void`,children:[(0,G.jsxs)(`div`,{className:`pointer-events-none absolute inset-0`,children:[(0,G.jsx)(`div`,{className:`absolute top-1/3 left-1/3 h-96 w-96 animate-pulse rounded-full bg-accent/10 blur-3xl`}),(0,G.jsx)(`div`,{className:`absolute right-1/3 bottom-1/3 h-96 w-96 animate-pulse rounded-full bg-node-interface/10 blur-3xl`})]}),(0,G.jsxs)(`div`,{className:`relative mb-10`,children:[(0,G.jsx)(`div`,{className:`h-28 w-28 animate-pulse-glow rounded-full bg-gradient-to-br from-accent to-node-interface`}),(0,G.jsx)(`div`,{className:`absolute inset-0 h-28 w-28 rounded-full bg-gradient-to-br from-accent to-node-interface opacity-50 blur-xl`})]}),(0,G.jsx)(`div`,{className:`mb-4 w-80`,children:(0,G.jsx)(`div`,{className:`h-1.5 overflow-hidden rounded-full bg-elevated`,children:(0,G.jsx)(`div`,{className:`h-full rounded-full bg-gradient-to-r from-accent to-node-interface transition-all duration-300 ease-out`,style:{width:`${e.percent}%`}})})}),(0,G.jsxs)(`div`,{className:`text-center`,children:[(0,G.jsxs)(`p`,{className:`mb-1 font-mono text-sm text-text-secondary`,children:[n,(0,G.jsx)(`span`,{className:`animate-pulse`,children:`|`})]}),e.detail&&(0,G.jsx)(`p`,{className:`max-w-md truncate font-mono text-xs text-text-muted`,children:r})]}),e.stats&&(0,G.jsxs)(`div`,{className:`mt-8 flex items-center gap-6 text-xs text-text-muted`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-node-file`}),(0,G.jsx)(`span`,{children:t(`graph:loading.filesProgress`,{processed:e.stats.filesProcessed,total:e.stats.totalFiles})})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-node-function`}),(0,G.jsx)(`span`,{children:t(`common:counts.nodes`,{count:e.stats.nodesCreated})})]})]}),(0,G.jsxs)(`p`,{className:`mt-4 font-mono text-3xl font-semibold text-text-primary`,children:[e.percent,`%`]})]})},ho=({isOpen:e,onClose:t,onUseCPU:n,onSkip:r,nodeCount:i})=>{let{t:a}=Nr(`graph`),[o,s]=(0,W.useState)(!0),[c,l]=(0,W.useState)(!1);if((0,W.useEffect)(()=>{e?requestAnimationFrame(()=>l(!0)):l(!1)},[e]),!e)return null;let u=Math.ceil(i*50/6e4),d=i<200;return(0,G.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,G.jsx)(`div`,{className:`absolute inset-0 bg-black/60 backdrop-blur-sm transition-opacity duration-200 ${c?`opacity-100`:`opacity-0`}`,onClick:t}),(0,G.jsxs)(`div`,{className:`relative mx-4 w-full max-w-md overflow-hidden rounded-2xl border border-border-subtle bg-surface shadow-2xl transition-all duration-200 ${c?`scale-100 opacity-100`:`scale-95 opacity-0`}`,children:[(0,G.jsxs)(`div`,{className:`relative border-b border-border-subtle bg-gradient-to-r from-amber-500/20 to-orange-500/20 px-6 py-5`,children:[(0,G.jsx)(`button`,{onClick:t,className:`absolute top-4 right-4 p-1 text-text-muted transition-colors hover:text-text-primary`,children:(0,G.jsx)(ja,{className:`h-5 w-5`})}),(0,G.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,G.jsx)(`div`,{className:`text-5xl ${o?`animate-bounce`:``}`,onAnimationEnd:()=>s(!1),onClick:()=>s(!0),children:`🤔`}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h2`,{className:`text-lg font-semibold text-text-primary`,children:a(`embedding.fallback.title`)}),(0,G.jsx)(`p`,{className:`mt-0.5 text-sm text-text-muted`,children:a(`embedding.fallback.subtitle`)})]})]})]}),(0,G.jsxs)(`div`,{className:`space-y-4 px-6 py-5`,children:[(0,G.jsx)(`p`,{className:`text-sm leading-relaxed text-text-secondary`,children:a(`embedding.fallback.description`)}),(0,G.jsxs)(`div`,{className:`rounded-lg border border-border-subtle bg-elevated/50 p-4`,children:[(0,G.jsx)(`p`,{className:`text-sm text-text-secondary`,children:(0,G.jsx)(`span`,{className:`font-medium text-text-primary`,children:a(`embedding.fallback.options`)})}),(0,G.jsxs)(`ul`,{className:`mt-2 space-y-1.5 text-sm text-text-muted`,children:[(0,G.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,G.jsx)(ya,{className:`mt-0.5 h-4 w-4 flex-shrink-0 text-amber-400`}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`strong`,{className:`text-text-secondary`,children:a(`embedding.fallback.useCpu`)}),` `,`—`,` `,a(d?`embedding.fallback.useCpuDescriptionSmall`:`embedding.fallback.useCpuDescriptionLarge`),i>0&&(0,G.jsxs)(`span`,{className:`text-text-muted`,children:[` `,a(`embedding.fallback.estimated`,{minutes:u,count:i})]})]})]}),(0,G.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,G.jsx)(va,{className:`mt-0.5 h-4 w-4 flex-shrink-0 text-blue-400`}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`strong`,{className:`text-text-secondary`,children:a(`embedding.fallback.skipIt`)}),` `,`— `,a(`embedding.fallback.skipDescription`)]})]})]})]}),d&&(0,G.jsxs)(`p`,{className:`flex items-center gap-1.5 rounded-lg bg-node-function/10 px-3 py-2 text-xs text-node-function`,children:[(0,G.jsx)(fa,{className:`h-3.5 w-3.5`}),a(`embedding.fallback.smallCodebase`)]}),(0,G.jsx)(`p`,{className:`text-xs text-text-muted`,children:a(`embedding.fallback.tip`)})]}),(0,G.jsxs)(`div`,{className:`flex gap-3 border-t border-border-subtle bg-elevated/30 px-6 py-4`,children:[(0,G.jsxs)(`button`,{onClick:r,className:`flex flex-1 items-center justify-center gap-2 rounded-lg border border-border-subtle bg-surface px-4 py-2.5 text-sm font-medium text-text-secondary transition-all hover:bg-hover hover:text-text-primary`,children:[(0,G.jsx)(va,{className:`h-4 w-4`}),a(`embedding.fallback.skipEmbeddings`)]}),(0,G.jsxs)(`button`,{onClick:n,className:`flex flex-1 items-center justify-center gap-2 rounded-lg px-4 py-2.5 text-sm font-medium transition-all ${d?`bg-node-function text-white hover:bg-node-function/90`:`border border-amber-500/30 bg-amber-500/20 text-amber-300 hover:bg-amber-500/30`}`,children:[(0,G.jsx)(ya,{className:`h-4 w-4`}),a(d?`embedding.fallback.useCpuRecommended`:`embedding.fallback.useCpuSlow`)]})]})]})]})},go=()=>{let{t:e}=Nr(`graph`),{embeddingStatus:t,embeddingProgress:n,startEmbeddings:r,graph:i,viewMode:a,serverBaseUrl:o}=hi(),[s,c]=(0,W.useState)(!1);if(a!==`exploring`||!i||o)return null;let l=i.nodes.length,u=async e=>{try{await r()}catch(e){e?.name===`WebGPUNotAvailableError`||e?.message?.includes(`WebGPU not available`)?c(!0):console.error(`Embedding failed:`,e)}},d=(0,G.jsx)(ho,{isOpen:s,onClose:()=>c(!1),onUseCPU:()=>{c(!1),u(`wasm`)},onSkip:()=>{c(!1)},nodeCount:l});if(t===`idle`)return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,G.jsxs)(`button`,{onClick:()=>u(),className:`group flex items-center gap-2 rounded-lg border border-border-subtle bg-surface px-3 py-1.5 text-sm text-text-secondary transition-all hover:border-accent/50 hover:bg-hover hover:text-text-primary`,title:e(`embedding.generateTitle`),children:[(0,G.jsx)(Ai,{className:`h-4 w-4 text-node-interface transition-colors group-hover:text-accent`}),(0,G.jsx)(`span`,{className:`hidden sm:inline`,children:e(`embedding.enable`)}),(0,G.jsx)(Ma,{className:`h-3 w-3 text-text-muted`})]})}),d]});if(t===`loading`){let t=n?.percent??0;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-lg border border-accent/30 bg-surface px-3 py-1.5 text-sm`,children:[(0,G.jsx)(na,{className:`h-4 w-4 animate-spin text-accent`}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,G.jsx)(`span`,{className:`text-xs text-text-secondary`,children:e(`embedding.loadingModel`)}),(0,G.jsx)(`div`,{className:`h-1 w-24 overflow-hidden rounded-full bg-elevated`,children:(0,G.jsx)(`div`,{className:`h-full rounded-full bg-gradient-to-r from-accent to-node-interface transition-all duration-300`,style:{width:`${t}%`}})})]})]}),d]})}if(t===`embedding`){let t=n?.percent??0;return(0,G.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-lg border border-node-function/30 bg-surface px-3 py-1.5 text-sm`,children:[(0,G.jsx)(na,{className:`h-4 w-4 animate-spin text-node-function`}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,G.jsx)(`span`,{className:`text-xs text-text-secondary`,children:e(`embedding.embeddingNodes`,{processed:0,total:0})}),(0,G.jsx)(`div`,{className:`h-1 w-24 overflow-hidden rounded-full bg-elevated`,children:(0,G.jsx)(`div`,{className:`h-full rounded-full bg-gradient-to-r from-node-function to-accent transition-all duration-300`,style:{width:`${t}%`}})})]})]})}return t===`indexing`?(0,G.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-node-interface/30 bg-surface px-3 py-1.5 text-sm text-text-secondary`,children:[(0,G.jsx)(na,{className:`h-4 w-4 animate-spin text-node-interface`}),(0,G.jsx)(`span`,{className:`text-xs`,children:e(`embedding.creatingIndex`)})]}):t===`ready`?(0,G.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-node-function/30 bg-node-function/10 px-3 py-1.5 text-sm text-node-function`,title:e(`embedding.readyTitle`),children:[(0,G.jsx)(ji,{className:`h-4 w-4`}),(0,G.jsx)(`span`,{className:`text-xs font-medium`,children:e(`embedding.ready`)})]}):t===`error`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`button`,{onClick:()=>u(),className:`flex items-center gap-2 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-1.5 text-sm text-red-400 transition-colors hover:bg-red-500/20`,title:e(`embedding.errorTitle`),children:[(0,G.jsx)(Fi,{className:`h-4 w-4`}),(0,G.jsx)(`span`,{className:`text-xs`,children:e(`embedding.failedRetry`)})]}),d]}):null},_o=()=>{let{t:e,i18n:t}=Nr(`header`),n=t.resolvedLanguage||t.language,r=Pr.find(e=>e.code.toLowerCase()===n.toLowerCase())??Pr[0],i=e=>{t.changeLanguage(e)};return(0,G.jsxs)(`label`,{className:`flex h-9 items-center gap-1.5 rounded-md border border-border-subtle bg-surface px-2 text-text-secondary transition-colors hover:border-border-default hover:bg-hover hover:text-text-primary`,title:e(`selectLanguage`),children:[(0,G.jsx)(qi,{className:`h-4 w-4`,"aria-hidden":`true`}),(0,G.jsx)(`span`,{className:`sr-only`,children:e(`language`)}),(0,G.jsx)(`select`,{"data-testid":`language-switcher`,value:r.code,"aria-label":e(`selectLanguage`),onChange:e=>i(e.target.value),className:`cursor-pointer border-none bg-transparent text-xs font-medium outline-none`,children:Pr.map(e=>(0,G.jsx)(`option`,{value:e.code,className:`bg-surface text-text-primary`,children:e.nativeName},e.code))})]})},vo={Folder:`#6366f1`,File:`#3b82f6`,Function:`#10b981`,Class:`#f59e0b`,Method:`#14b8a6`,Interface:`#ec4899`,Variable:`#64748b`,Import:`#475569`,Type:`#a78bfa`},yo=({onFocusNode:e,availableRepos:t=[],onSwitchRepo:n,onAnalyzeComplete:r,onReposChanged:i})=>{let{t:a}=Nr([`common`,`header`]),{projectName:o,graph:s,openChatPanel:c,isRightPanelOpen:l,rightPanelTab:u,setSettingsPanelOpen:d,setHelpDialogBoxOpen:f}=hi(),[p,m]=(0,W.useState)(``),[h,g]=(0,W.useState)(!1),[_,v]=(0,W.useState)(!1),[y,b]=(0,W.useState)(null),[x,S]=(0,W.useState)(null),C=(0,W.useRef)(null),w=(0,W.useRef)(null),[T,E]=(0,W.useState)(!1),[D,O]=(0,W.useState)(0),k=(0,W.useRef)(null),ee=(0,W.useRef)(null),A=s?.nodes.length??0,j=s?.relationships.length??0,M=(0,W.useMemo)(()=>{if(!s||!p.trim())return[];let e=p.toLowerCase();return s.nodes.filter(t=>t.properties.name.toLowerCase().includes(e)).slice(0,10)},[s,p]);(0,W.useEffect)(()=>{let e=e=>{k.current&&!k.current.contains(e.target)&&E(!1),w.current&&!w.current.contains(e.target)&&(g(!1),v(!1))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]),(0,W.useEffect)(()=>()=>{C.current?.abort()},[]),(0,W.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`k`&&(e.preventDefault(),ee.current?.focus(),E(!0)),e.key===`Escape`&&(E(!1),ee.current?.blur())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]);let N=e=>{if(!(!T||M.length===0)){if(e.key===`ArrowDown`)e.preventDefault(),O(e=>Math.min(e+1,M.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),O(e=>Math.max(e-1,0));else if(e.key===`Enter`){e.preventDefault();let t=M[D];t&&P(t)}}},P=t=>{e?.(t.id),m(``),E(!1),O(0)};return(0,G.jsxs)(`header`,{className:`flex items-center justify-between border-b border-dashed border-border-subtle bg-deep px-5 py-3`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,G.jsx)(`div`,{className:`flex h-7 w-7 items-center justify-center rounded-md bg-gradient-to-br from-accent to-node-interface text-sm font-bold text-white shadow-glow`,children:`◇`}),(0,G.jsx)(`span`,{className:`text-[15px] font-semibold tracking-tight`,children:`GitNexus`})]}),o&&(0,G.jsxs)(`div`,{className:`relative`,ref:w,children:[(0,G.jsxs)(`button`,{onClick:()=>{g(e=>!e),v(!1)},className:`flex cursor-pointer items-center gap-2 rounded-lg border px-3 py-1.5 text-sm transition-all ${h?`border-accent/40 bg-accent/10 text-text-primary`:`border-border-subtle bg-surface text-text-secondary hover:border-border-default hover:bg-hover`} `,children:[(0,G.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-node-function`}),(0,G.jsx)(`span`,{className:`max-w-[160px] truncate`,children:o}),(0,G.jsx)(Mi,{className:`h-3 w-3 text-text-muted transition-transform duration-200 ${h?`rotate-180`:``}`})]}),h&&(0,G.jsx)(`div`,{className:`absolute top-full left-0 z-50 mt-1.5 w-80 animate-slide-up overflow-hidden rounded-xl border border-border-subtle bg-surface shadow-xl`,children:_?(0,G.jsx)(`div`,{className:`p-4`,children:(0,G.jsx)(ro,{variant:`sheet`,onComplete:e=>{v(!1),g(!1),r?.(e)},onCancel:()=>v(!1)})}):(0,G.jsxs)(G.Fragment,{children:[t.length>0&&(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`px-3 pt-2.5 pb-1.5 text-[10px] font-medium tracking-wider text-text-muted uppercase`,children:a(`header:repositories`)}),t.map(e=>(0,G.jsxs)(`div`,{className:`group flex items-center gap-2 px-4 py-2 transition-colors ${e.name===o?`border-l-2 border-accent bg-accent/10`:`hover:bg-hover`}`,children:[(0,G.jsxs)(`button`,{onClick:()=>{e.name!==o&&n?.(e.name),g(!1)},className:`flex min-w-0 flex-1 cursor-pointer items-center gap-3 text-left`,children:[(0,G.jsx)(Ui,{className:`h-3.5 w-3.5 shrink-0 text-node-folder`}),(0,G.jsx)(`span`,{className:`flex-1 truncate font-mono text-sm text-text-primary`,children:e.name}),e.name===o&&(0,G.jsx)(`span`,{className:`shrink-0 font-mono text-[10px] text-accent`,children:a(`header:active`)})]}),(0,G.jsx)(`button`,{onClick:async t=>{if(t.stopPropagation(),!y){b(e.name),S({phase:`queued`,percent:0,message:a(`common:progress.starting`)});try{let{jobId:t}=await Ft({path:e.path,force:!0});C.current=Lt(t,e=>S(e),()=>{b(null),S(null),C.current=null,r?.(e.name)},e=>{console.error(`Re-analyze failed:`,e),b(null),S(null),C.current=null})}catch(e){console.error(`Failed to start re-analysis:`,e),b(null),S(null)}}},disabled:!!y,className:`cursor-pointer rounded p-1 transition-all ${y===e.name?`text-accent`:`text-text-muted/0 group-hover:text-text-muted hover:!text-accent`}`,title:y===e.name?a(`header:reanalyzing`):a(`header:reanalyzeRepo`,{repoName:e.name}),children:(0,G.jsx)(da,{className:`h-3.5 w-3.5 ${y===e.name?`animate-spin`:``}`})}),(0,G.jsx)(`button`,{onClick:async t=>{t.stopPropagation(),y===e.name&&(C.current?.abort(),b(null),S(null),C.current=null);try{await wt(e.name);let t=await Et();i?.(t),e.name===o&&t.length>0?n?.(t[0].name):t.length===0&&window.location.reload()}catch(e){console.error(`Failed to delete repo:`,e)}},className:`cursor-pointer rounded p-1 text-text-muted/0 transition-all group-hover:text-text-muted hover:!text-red-400`,title:a(`header:deleteRepo`,{repoName:e.name}),children:(0,G.jsx)(Ea,{className:`h-3.5 w-3.5`})})]},e.name))]}),y&&x&&(0,G.jsxs)(`div`,{className:`border-t border-border-subtle bg-accent/5 px-4 py-2.5`,children:[(0,G.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-2`,children:[(0,G.jsx)(na,{className:`h-3 w-3 shrink-0 animate-spin text-accent`}),(0,G.jsx)(`span`,{className:`truncate text-xs text-text-secondary`,children:a(`header:reanalyzingRepo`,{repoName:y,message:Ka(x.message,a)})})]}),(0,G.jsx)(`div`,{className:`h-1 overflow-hidden rounded-full bg-elevated`,children:(0,G.jsx)(`div`,{className:`h-full rounded-full bg-accent transition-all duration-300`,style:{width:`${Math.max(2,x.percent)}%`}})})]}),(0,G.jsx)(`div`,{className:t.length>0||y?`border-t border-border-subtle`:``,children:(0,G.jsxs)(`button`,{onClick:()=>v(!0),disabled:!!y,className:`flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-hover disabled:cursor-not-allowed disabled:opacity-50`,children:[(0,G.jsx)(ba,{className:`h-3.5 w-3.5 shrink-0 text-accent`}),(0,G.jsx)(`span`,{className:`text-sm text-text-secondary`,children:a(`header:analyzeNew`)})]})})]})})]})]}),(0,G.jsxs)(`div`,{className:`relative mx-6 max-w-md flex-1`,ref:k,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-lg border border-border-subtle bg-surface px-3.5 py-2 transition-all focus-within:border-accent focus-within:ring-2 focus-within:ring-accent/20`,children:[(0,G.jsx)(ma,{className:`h-4 w-4 flex-shrink-0 text-text-muted`}),(0,G.jsx)(`input`,{ref:ee,type:`text`,placeholder:a(`header:searchNodes`),value:p,onChange:e=>{m(e.target.value),E(!0),O(0)},onFocus:()=>E(!0),onKeyDown:N,className:`flex-1 border-none bg-transparent text-sm text-text-primary outline-none placeholder:text-text-muted`}),(0,G.jsx)(`kbd`,{className:`rounded border border-border-subtle bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-text-muted`,children:`⌘K`})]}),T&&p.trim()&&(0,G.jsx)(`div`,{className:`absolute top-full right-0 left-0 z-50 mt-1 overflow-hidden rounded-xl border border-border-subtle bg-surface shadow-xl`,children:M.length===0?(0,G.jsx)(`div`,{className:`px-4 py-3 text-sm text-text-muted`,children:a(`header:noNodesFound`,{query:p})}):(0,G.jsx)(`div`,{className:`max-h-80 overflow-y-auto`,children:M.map((e,t)=>(0,G.jsxs)(`button`,{onClick:()=>P(e),className:`flex w-full cursor-pointer items-center gap-3 px-4 py-2.5 text-left transition-colors ${t===D?`bg-accent/20 text-text-primary`:`text-text-secondary hover:bg-hover`}`,children:[(0,G.jsx)(`span`,{className:`h-2.5 w-2.5 flex-shrink-0 rounded-full`,style:{backgroundColor:vo[e.label]||`#6b7280`}}),(0,G.jsx)(`span`,{className:`flex-1 truncate text-sm font-medium`,children:e.properties.name}),(0,G.jsx)(`span`,{className:`rounded bg-elevated px-2 py-0.5 text-xs text-text-muted`,children:e.label})]},e.id))})})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsxs)(`a`,{href:`https://github.com/abhigyanpatwari/GitNexus`,target:`_blank`,rel:`noopener noreferrer`,className:`group flex items-center gap-2 rounded-lg bg-gradient-to-r from-purple-600 to-pink-600 px-3.5 py-2 text-sm font-medium text-white shadow-lg transition-all duration-200 hover:-translate-y-0.5 hover:from-purple-500 hover:to-pink-500 hover:shadow-xl`,children:[(0,G.jsx)(Ia,{className:`h-4 w-4`}),(0,G.jsx)(`span`,{className:`hidden sm:inline`,children:a(`header:starIfCool`)}),(0,G.jsx)(Sa,{className:`h-3.5 w-3.5 transition-all group-hover:fill-yellow-300 group-hover:text-yellow-300`}),(0,G.jsx)(`span`,{className:`hidden sm:inline`,children:`✨`})]}),s&&(0,G.jsxs)(`div`,{className:`mr-2 flex items-center gap-4 text-xs text-text-muted`,children:[(0,G.jsx)(`span`,{children:a(`common:counts.nodes`,{count:A})}),(0,G.jsx)(`span`,{children:a(`common:counts.edges`,{count:j})})]}),(0,G.jsx)(go,{}),(0,G.jsx)(_o,{}),(0,G.jsx)(`button`,{onClick:()=>d(!0),className:`flex h-9 w-9 cursor-pointer items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,title:a(`header:aiSettings`),children:(0,G.jsx)(_a,{className:`h-4.5 w-4.5`})}),(0,G.jsx)(`button`,{title:a(`header:help`),onClick:()=>f(!0),className:`flex h-9 w-9 cursor-pointer items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,children:(0,G.jsx)(Ii,{className:`h-4.5 w-4.5`})}),(0,G.jsxs)(`button`,{onClick:c,className:`flex items-center gap-1.5 rounded-lg px-3.5 py-2 text-sm font-medium transition-all ${l&&u===`chat`?`bg-accent text-white shadow-glow`:`bg-gradient-to-r from-accent to-accent-dim text-white shadow-glow hover:-translate-y-0.5 hover:shadow-lg`} `,children:[(0,G.jsx)(ba,{className:`h-4 w-4`}),(0,G.jsx)(`span`,{children:a(`common:app.nexusAI`)})]})]})]})};function bo(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function xo(e){var t=bo(e,`string`);return typeof t==`symbol`?t:t+``}function So(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Co(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,xo(r.key),r)}}function wo(e,t,n){return t&&Co(e.prototype,t),n&&Co(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function To(e){return To=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},To(e)}function Eo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Eo=function(){return!!e})()}function Do(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Oo(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Do(e)}function ko(e,t,n){return t=To(t),Oo(e,Eo()?Reflect.construct(t,n||[],To(e).constructor):t.apply(e,n))}function Ao(e,t){return Ao=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ao(e,t)}function jo(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&Ao(e,t)}function Mo(e){if(Array.isArray(e))return e}function No(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Po(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Fo(e,t){if(e){if(typeof e==`string`)return Po(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Po(e,t):void 0}}function Io(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
15
15
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lo(e,t){return Mo(e)||No(e,t)||Fo(e,t)||Io()}var Ro={black:`#000000`,silver:`#C0C0C0`,gray:`#808080`,grey:`#808080`,white:`#FFFFFF`,maroon:`#800000`,red:`#FF0000`,purple:`#800080`,fuchsia:`#FF00FF`,green:`#008000`,lime:`#00FF00`,olive:`#808000`,yellow:`#FFFF00`,navy:`#000080`,blue:`#0000FF`,teal:`#008080`,aqua:`#00FFFF`,darkblue:`#00008B`,mediumblue:`#0000CD`,darkgreen:`#006400`,darkcyan:`#008B8B`,deepskyblue:`#00BFFF`,darkturquoise:`#00CED1`,mediumspringgreen:`#00FA9A`,springgreen:`#00FF7F`,cyan:`#00FFFF`,midnightblue:`#191970`,dodgerblue:`#1E90FF`,lightseagreen:`#20B2AA`,forestgreen:`#228B22`,seagreen:`#2E8B57`,darkslategray:`#2F4F4F`,darkslategrey:`#2F4F4F`,limegreen:`#32CD32`,mediumseagreen:`#3CB371`,turquoise:`#40E0D0`,royalblue:`#4169E1`,steelblue:`#4682B4`,darkslateblue:`#483D8B`,mediumturquoise:`#48D1CC`,indigo:`#4B0082`,darkolivegreen:`#556B2F`,cadetblue:`#5F9EA0`,cornflowerblue:`#6495ED`,rebeccapurple:`#663399`,mediumaquamarine:`#66CDAA`,dimgray:`#696969`,dimgrey:`#696969`,slateblue:`#6A5ACD`,olivedrab:`#6B8E23`,slategray:`#708090`,slategrey:`#708090`,lightslategray:`#778899`,lightslategrey:`#778899`,mediumslateblue:`#7B68EE`,lawngreen:`#7CFC00`,chartreuse:`#7FFF00`,aquamarine:`#7FFFD4`,skyblue:`#87CEEB`,lightskyblue:`#87CEFA`,blueviolet:`#8A2BE2`,darkred:`#8B0000`,darkmagenta:`#8B008B`,saddlebrown:`#8B4513`,darkseagreen:`#8FBC8F`,lightgreen:`#90EE90`,mediumpurple:`#9370DB`,darkviolet:`#9400D3`,palegreen:`#98FB98`,darkorchid:`#9932CC`,yellowgreen:`#9ACD32`,sienna:`#A0522D`,brown:`#A52A2A`,darkgray:`#A9A9A9`,darkgrey:`#A9A9A9`,lightblue:`#ADD8E6`,greenyellow:`#ADFF2F`,paleturquoise:`#AFEEEE`,lightsteelblue:`#B0C4DE`,powderblue:`#B0E0E6`,firebrick:`#B22222`,darkgoldenrod:`#B8860B`,mediumorchid:`#BA55D3`,rosybrown:`#BC8F8F`,darkkhaki:`#BDB76B`,mediumvioletred:`#C71585`,indianred:`#CD5C5C`,peru:`#CD853F`,chocolate:`#D2691E`,tan:`#D2B48C`,lightgray:`#D3D3D3`,lightgrey:`#D3D3D3`,thistle:`#D8BFD8`,orchid:`#DA70D6`,goldenrod:`#DAA520`,palevioletred:`#DB7093`,crimson:`#DC143C`,gainsboro:`#DCDCDC`,plum:`#DDA0DD`,burlywood:`#DEB887`,lightcyan:`#E0FFFF`,lavender:`#E6E6FA`,darksalmon:`#E9967A`,violet:`#EE82EE`,palegoldenrod:`#EEE8AA`,lightcoral:`#F08080`,khaki:`#F0E68C`,aliceblue:`#F0F8FF`,honeydew:`#F0FFF0`,azure:`#F0FFFF`,sandybrown:`#F4A460`,wheat:`#F5DEB3`,beige:`#F5F5DC`,whitesmoke:`#F5F5F5`,mintcream:`#F5FFFA`,ghostwhite:`#F8F8FF`,salmon:`#FA8072`,antiquewhite:`#FAEBD7`,linen:`#FAF0E6`,lightgoldenrodyellow:`#FAFAD2`,oldlace:`#FDF5E6`,magenta:`#FF00FF`,deeppink:`#FF1493`,orangered:`#FF4500`,tomato:`#FF6347`,hotpink:`#FF69B4`,coral:`#FF7F50`,darkorange:`#FF8C00`,lightsalmon:`#FFA07A`,orange:`#FFA500`,lightpink:`#FFB6C1`,pink:`#FFC0CB`,gold:`#FFD700`,peachpuff:`#FFDAB9`,navajowhite:`#FFDEAD`,moccasin:`#FFE4B5`,bisque:`#FFE4C4`,mistyrose:`#FFE4E1`,blanchedalmond:`#FFEBCD`,papayawhip:`#FFEFD5`,lavenderblush:`#FFF0F5`,seashell:`#FFF5EE`,cornsilk:`#FFF8DC`,lemonchiffon:`#FFFACD`,floralwhite:`#FFFAF0`,snow:`#FFFAFA`,lightyellow:`#FFFFE0`,ivory:`#FFFFF0`},zo=new Int8Array(4),Bo=new Int32Array(zo.buffer,0,1),Vo=new Float32Array(zo.buffer,0,1),Ho=/^\s*rgba?\s*\(/,Uo=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function Wo(e){var t=0,n=0,r=0,i=1;if(e[0]===`#`)e.length===4?(t=parseInt(e.charAt(1)+e.charAt(1),16),n=parseInt(e.charAt(2)+e.charAt(2),16),r=parseInt(e.charAt(3)+e.charAt(3),16)):(t=parseInt(e.charAt(1)+e.charAt(2),16),n=parseInt(e.charAt(3)+e.charAt(4),16),r=parseInt(e.charAt(5)+e.charAt(6),16)),e.length===9&&(i=parseInt(e.charAt(7)+e.charAt(8),16)/255);else if(Ho.test(e)){var a=e.match(Uo);a&&(t=+a[1],n=+a[2],r=+a[3],a[4]&&(i=+a[4]))}return{r:t,g:n,b:r,a:i}}var Go={};for(var Ko in Ro)Go[Ko]=Jo(Ro[Ko]),Go[Ro[Ko]]=Go[Ko];function qo(e,t,n,r,i){return Bo[0]=r<<24|n<<16|t<<8|e,i&&(Bo[0]&=4278190079),Vo[0]}function Jo(e){if(e=e.toLowerCase(),Go[e]!==void 0)return Go[e];var t=Wo(e),n=t.r,r=t.g,i=t.b,a=t.a;a=a*255|0;var o=qo(n,r,i,a,!0);return Go[e]=o,o}var Yo={};function Xo(e){if(Yo[e]!==void 0)return Yo[e];var t=qo((e&16711680)>>>16,(e&65280)>>>8,e&255,255,!0);return Yo[e]=t,t}function Zo(e,t,n,r){return n+(t<<8)+(e<<16)}function Qo(e,t,n,r,i,a){var o=Math.floor(n/a*i),s=Math.floor(e.drawingBufferHeight/a-r/a*i),c=new Uint8Array(4);e.bindFramebuffer(e.FRAMEBUFFER,t),e.readPixels(o,s,1,1,e.RGBA,e.UNSIGNED_BYTE,c);var l=Lo(c,4);return[l[0],l[1],l[2],l[3]]}function q(e,t,n){return(t=xo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?$o(Object(n),!0).forEach(function(t){q(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function es(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=To(e))!==null;);return e}function ts(){return ts=typeof Reflect<`u`&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=es(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ts.apply(null,arguments)}function ns(e,t,n,r){var i=ts(To(1&r?e.prototype:e),t,n);return 2&r&&typeof i==`function`?function(e){return i.apply(n,e)}:i}function rs(e){return e.normalized?1:e.size}function is(e){var t=0;return e.forEach(function(e){return t+=rs(e)}),t}function as(e,t,n){var r=e===`VERTEX`?t.VERTEX_SHADER:t.FRAGMENT_SHADER,i=t.createShader(r);if(i===null)throw Error(`loadShader: error while creating the shader`);if(t.shaderSource(i,n),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS)){var a=t.getShaderInfoLog(i);throw t.deleteShader(i),Error(`loadShader: error while compiling the shader:
16
16
  ${a}
17
17
  ${n}`)}return i}function os(e,t){return as(`VERTEX`,e,t)}function ss(e,t){return as(`FRAGMENT`,e,t)}function cs(e,t){var n=e.createProgram();if(n===null)throw Error(`loadProgram: error while creating the program.`);var r,i;for(r=0,i=t.length;r<i;r++)e.attachShader(n,t[r]);if(e.linkProgram(n),!e.getProgramParameter(n,e.LINK_STATUS))throw e.deleteProgram(n),Error(`loadProgram: error while linking the program.`);return n}function ls(e){var t=e.gl,n=e.buffer,r=e.program,i=e.vertexShader,a=e.fragmentShader;t.deleteShader(i),t.deleteShader(a),t.deleteProgram(r),t.deleteBuffer(n)}var us=`#define PICKING_MODE
@@ -511,7 +511,7 @@ ${r?`
511
511
  `}var jd=.25,Md={arrowHead:null,curvatureAttribute:`curvature`,defaultCurvature:jd},Nd=WebGLRenderingContext,Pd=Nd.UNSIGNED_BYTE,Fd=Nd.FLOAT;function Id(e){var t=ld(ld({},Md),e||{}),n=t,r=n.arrowHead,i=n.curvatureAttribute,a=n.drawLabel,o=r?.extremity===`target`||r?.extremity===`both`,s=r?.extremity===`source`||r?.extremity===`both`,c=[`u_matrix`,`u_sizeRatio`,`u_dimensions`,`u_pixelRatio`,`u_feather`,`u_minEdgeThickness`].concat(Td(r?[`u_lengthToThicknessRatio`,`u_widenessToThicknessRatio`]:[]));return function(e){yd(n,e);function n(){var e;ud(this,n);var r=[...arguments];return e=_d(this,n,[].concat(r)),sd(hd(e),`drawLabel`,a||Od(t)),e}return fd(n,[{key:`getDefinition`,value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:Ad(t),FRAGMENT_SHADER_SOURCE:kd(t),METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:c,ATTRIBUTES:[{name:`a_source`,size:2,type:Fd},{name:`a_target`,size:2,type:Fd}].concat(Td(o?[{name:`a_targetSize`,size:1,type:Fd}]:[]),Td(s?[{name:`a_sourceSize`,size:1,type:Fd}]:[]),[{name:`a_thickness`,size:1,type:Fd},{name:`a_curvature`,size:1,type:Fd},{name:`a_color`,size:4,type:Pd,normalized:!0},{name:`a_id`,size:4,type:Pd,normalized:!0}]),CONSTANT_ATTRIBUTES:[{name:`a_current`,size:1,type:Fd},{name:`a_direction`,size:1,type:Fd}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[0,-1],[1,1],[1,-1]]}}},{key:`processVisibleItem`,value:function(e,t,n,r,a){var c=a.size||1,l=n.x,u=n.y,d=r.x,f=r.y,p=Jo(a.color),m=a[i]??jd,h=this.array;h[t++]=l,h[t++]=u,h[t++]=d,h[t++]=f,o&&(h[t++]=r.size),s&&(h[t++]=n.size),h[t++]=c,h[t++]=m,h[t++]=p,h[t++]=e}},{key:`setUniforms`,value:function(e,t){var n=t.gl,i=t.uniformLocations,a=i.u_matrix,o=i.u_pixelRatio,s=i.u_feather,c=i.u_sizeRatio,l=i.u_dimensions,u=i.u_minEdgeThickness;if(n.uniformMatrix3fv(a,!1,e.matrix),n.uniform1f(o,e.pixelRatio),n.uniform1f(c,e.sizeRatio),n.uniform1f(s,e.antiAliasingFeather),n.uniform2f(l,e.width*e.pixelRatio,e.height*e.pixelRatio),n.uniform1f(u,e.minEdgeThickness),r){var d=i.u_lengthToThicknessRatio,f=i.u_widenessToThicknessRatio;n.uniform1f(d,r.lengthToThicknessRatio),n.uniform1f(f,r.widenessToThicknessRatio)}}}]),n}(ms)}var Ld=Id();Id({arrowHead:Ms}),Id({arrowHead:ld(ld({},Ms),{},{extremity:`both`})});var Rd=e=>{let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:{r:100,g:100,b:100}},zd=(e,t,n)=>`#`+[e,t,n].map(e=>{let t=Math.max(0,Math.min(255,Math.round(e))).toString(16);return t.length===1?`0`+t:t}).join(``),Bd=(e,t)=>{let n=Rd(e),r={r:18,g:18,b:28};return zd(r.r+(n.r-r.r)*t,r.g+(n.g-r.g)*t,r.b+(n.b-r.b)*t)},Vd=(e,t)=>{let n=Rd(e);return zd(n.r+(255-n.r)*(t-1)/t,n.g+(255-n.g)*(t-1)/t,n.b+(255-n.b)*(t-1)/t)},Hd={maxIterations:20,ratio:1.1,margin:10,expansion:1.05},Ud=e=>{let t=e<500,n=e>=500&&e<2e3,r=e>=2e3&&e<1e4;return{gravity:t?.8:n?.5:r?.3:.15,scalingRatio:t?15:n?30:r?60:100,slowDown:t?1:n?2:r?3:5,barnesHutOptimize:e>200,barnesHutTheta:r?.8:.6,strongGravityMode:!1,outboundAttractionDistribution:!0,linLogMode:!1,adjustSizes:!0,edgeWeightInfluence:1}},Wd=e=>e>1e4?45e3:e>5e3?35e3:e>2e3||e>1e3?3e4:e>500?25e3:2e4,Gd=540,Kd=130,qd=18e3,Jd=24,Yd=32,Xd=1500,Zd=.005,Qd=.01,$d=.06,ef=55,tf=10,nf=.003,rf=[90,240,420,620],af=rf.length,of=45,sf=.06,cf=22,lf=.002,uf=130,df=24e3,ff=24,pf=1500,mf=.005,hf=.01,gf={CONTAINS:.18,DEFINES:.22,IMPORTS:.2,CALLS:.24,EXTENDS:.2,IMPLEMENTS:.2},_f={CONTAINS:.09,DEFINES:.12,IMPORTS:.14,CALLS:.18,EXTENDS:.13,IMPLEMENTS:.13},vf=(e,t,n)=>Math.min(n,Math.max(t,e)),yf=(e={})=>{let t=(0,W.useRef)(null),n=(0,W.useRef)(null),r=(0,W.useRef)(null),i=(0,W.useRef)(null),a=(0,W.useRef)(null),o=(0,W.useRef)(new Set),s=(0,W.useRef)(new Set),c=(0,W.useRef)(new Map),l=(0,W.useRef)(null),u=(0,W.useRef)(e.onNodeClick),d=(0,W.useRef)(e.onNodeHover),f=(0,W.useRef)(e.onStageClick);u.current=e.onNodeClick,d.current=e.onNodeHover,f.current=e.onStageClick;let p=(0,W.useRef)(null),m=(0,W.useRef)(null),h=(0,W.useRef)(null),g=(0,W.useRef)(new Map),_=(0,W.useRef)(new Map),v=(0,W.useRef)(null),y=(0,W.useRef)(0),b=(0,W.useRef)(null),x=(0,W.useRef)(0),S=(0,W.useRef)(null),C=(0,W.useRef)(new Map),w=(0,W.useRef)(new Map),T=(0,W.useRef)(null),E=(0,W.useRef)(0),D=(0,W.useRef)(null),O=(0,W.useRef)(0),[k,ee]=(0,W.useState)(!1),[A,j]=(0,W.useState)(null);(0,W.useEffect)(()=>{o.current=e.highlightedNodeIds||new Set,s.current=e.blastRadiusNodeIds||new Set,c.current=e.animatedNodes||new Map,l.current=e.visibleEdgeTypes||null,n.current?.refresh()},[e.highlightedNodeIds,e.blastRadiusNodeIds,e.animatedNodes,e.visibleEdgeTypes]),(0,W.useEffect)(()=>{if(!e.animatedNodes||e.animatedNodes.size===0){m.current&&=(cancelAnimationFrame(m.current),null);return}let t=()=>{n.current?.refresh(),m.current=requestAnimationFrame(t)};return t(),()=>{m.current&&=(cancelAnimationFrame(m.current),null)}},[e.animatedNodes]);let M=(0,W.useCallback)(e=>{a.current=e,j(e);let t=n.current;if(!t)return;let r=t.getCamera(),i=r.ratio;r.animate({ratio:i*1.0001},{duration:50}),t.refresh()},[]),N=(0,W.useCallback)((e=!1)=>{h.current&&=(cancelAnimationFrame(h.current),null),v.current=null,y.current=0,b.current=null,x.current=0,g.current.clear(),_.current.clear(),ee(!1),e&&(n.current?.refresh(),n.current?.getCamera().animatedReset({duration:600}))},[]),P=(0,W.useCallback)((e=!1)=>{S.current&&=(cancelAnimationFrame(S.current),null),T.current=null,E.current=0,D.current=null,O.current=0,C.current.clear(),w.current.clear(),ee(!1),e&&(n.current?.refresh(),n.current?.getCamera().animatedReset({duration:600}))},[]),te=(0,W.useCallback)((t=!1)=>{if(p.current&&=(clearTimeout(p.current),null),i.current){i.current.stop(),i.current.kill(),i.current=null;let t=r.current;t&&e.layoutMode!==`tree`&&e.layoutMode!==`circles`&&id.default.assign(t,Hd)}N(!1),P(!1),t&&n.current?.refresh()},[e.layoutMode,N,P]);(0,W.useEffect)(()=>{if(!t.current)return;let e=new Ru;r.current=e;let m=new el(e,t.current,{renderLabels:!0,labelFont:`JetBrains Mono, monospace`,labelSize:11,labelWeight:`500`,labelColor:{color:`#e4e4ed`},labelRenderedSizeThreshold:8,labelDensity:.1,labelGridCellSize:70,defaultNodeColor:`#6b7280`,defaultEdgeColor:`#2a2a3a`,defaultEdgeType:`curved`,edgeProgramClasses:{curved:Ld},defaultDrawNodeHover:(e,t,n)=>{let r=t.label;if(!r)return;let i=n.labelSize||11,a=n.labelFont||`JetBrains Mono, monospace`;e.font=`${n.labelWeight||`500`} ${i}px ${a}`;let o=e.measureText(r).width,s=t.size||8,c=t.x,l=t.y-s-10,u=i+10,d=o+16;e.fillStyle=`#12121c`,e.beginPath(),e.roundRect(c-d/2,l-u/2,d,u,4),e.fill(),e.strokeStyle=t.color||`#6366f1`,e.lineWidth=2,e.stroke(),e.fillStyle=`#f5f5f7`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(r,c,l),e.beginPath(),e.arc(t.x,t.y,s+4,0,Math.PI*2),e.strokeStyle=t.color||`#6366f1`,e.lineWidth=2,e.globalAlpha=.5,e.stroke(),e.globalAlpha=1},minCameraRatio:.002,maxCameraRatio:50,hideEdgesOnMove:!0,zIndex:!0,nodeReducer:(e,t)=>{let n={...t};if(t.hidden)return n.hidden=!0,n;let i=a.current,l=o.current,u=s.current,d=c.current,f=l.size>0,p=u.size>0,m=l.has(e),h=u.has(e),g=d.get(e);if(g){let e=Date.now()-g.startTime,r=Math.min(e/g.duration,1),i=(Math.sin(r*Math.PI*4)+1)/2;if(g.type===`pulse`){let e=1.5+i*.8;n.size=(t.size||8)*e,n.color=i>.5?`#06b6d4`:Vd(`#06b6d4`,1.3),n.zIndex=5,n.highlighted=!0}else if(g.type===`ripple`){let e=1.3+i*1.2;n.size=(t.size||8)*e,n.color=i>.5?`#ef4444`:`#f87171`,n.zIndex=5,n.highlighted=!0}else if(g.type===`glow`){let e=1.4+i*.6;n.size=(t.size||8)*e,n.color=i>.5?`#a855f7`:`#c084fc`,n.zIndex=5,n.highlighted=!0}return n}if(p&&!i)return h?(n.color=`#ef4444`,n.size=(t.size||8)*1.8,n.zIndex=3,n.highlighted=!0):m?(n.color=`#06b6d4`,n.size=(t.size||8)*1.4,n.zIndex=2,n.highlighted=!0):(n.color=Bd(t.color,.15),n.size=(t.size||8)*.4,n.zIndex=0),n;if(f&&!i)return m?(n.color=`#06b6d4`,n.size=(t.size||8)*1.6,n.zIndex=2,n.highlighted=!0):(n.color=Bd(t.color,.2),n.size=(t.size||8)*.5,n.zIndex=0),n;if(i){let a=r.current;if(a){let r=e===i,o=a.hasEdge(e,i)||a.hasEdge(i,e);r?(n.color=t.color,n.size=(t.size||8)*1.8,n.zIndex=2,n.highlighted=!0):o?(n.color=t.color,n.size=(t.size||8)*1.3,n.zIndex=1):(n.color=Bd(t.color,.25),n.size=(t.size||8)*.6,n.zIndex=0)}}return n},edgeReducer:(e,t)=>{let n={...t},i=l.current;if(i&&t.relationType){let e=t.relationType===`HAS_METHOD`?`DEFINES`:t.relationType===`HAS_PROPERTY`?`CONTAINS`:t.relationType;if(!i.includes(e))return n.hidden=!0,n}let c=t.isHierarchyEdge;c!==void 0&&(c?(n.color=Bd(t.color,.5),n.size=Math.max(.3,(t.size||1)*.5)):(n.color=Vd(t.color,1.2),n.size=Math.max(1,(t.size||1)*1.2)));let u=a.current,d=o.current,f=s.current;if((d.size>0||f.size>0)&&!u){let i=r.current;if(i){let[r,a]=i.extremities(e),o=d.has(r)||f.has(r),s=d.has(a)||f.has(a);o&&s?(f.has(r)&&f.has(a)?n.color=`#ef4444`:n.color=`#06b6d4`,n.size=Math.max(2,(t.size||1)*3),n.zIndex=2):o||s?(n.color=Bd(`#06b6d4`,.4),n.size=1,n.zIndex=1):(n.color=Bd(t.color,.08),n.size=.2,n.zIndex=0)}return n}if(u){let i=r.current;if(i){let[r,a]=i.extremities(e);r===u||a===u?(n.color=Vd(t.color,1.5),n.size=Math.max(3,(t.size||1)*4),n.zIndex=2):(n.color=Bd(t.color,.1),n.size=.3,n.zIndex=0)}}return n}});return n.current=m,m.on(`clickNode`,({node:e})=>{M(e),u.current?.(e)}),m.on(`clickStage`,()=>{M(null),f.current?.()}),m.on(`enterNode`,({node:e})=>{d.current?.(e),t.current&&(t.current.style.cursor=`pointer`)}),m.on(`leaveNode`,()=>{d.current?.(null),t.current&&(t.current.style.cursor=`grab`)}),()=>{h.current&&=(cancelAnimationFrame(h.current),null),g.current.clear(),_.current.clear(),S.current&&=(cancelAnimationFrame(S.current),null),C.current.clear(),w.current.clear(),p.current&&clearTimeout(p.current),i.current?.kill(),m.kill(),n.current=null,r.current=null}},[]);let ne=(0,W.useCallback)(e=>{if(e.order===0)return;te(!1);let t=new Map,i=new Map;e.forEachNode((n,r)=>{let a=r.treeLayer??0,o=r.treeAnchorY??r.y;t.set(a,(t.get(a)??0)+o),i.set(a,(i.get(a)??0)+1),g.current.set(n,0),_.current.set(n,0),e.setNodeAttribute(n,`x`,r.treeAnchorX??r.x),e.setNodeAttribute(n,`y`,o)});let a=new Map;for(let[e,n]of t)a.set(e,n/(i.get(e)??1));let o=new Map;e.forEachNode((t,n)=>{let r=n.treeLayer??0,i=0,a=0;e.forEachNeighbor(t,(e,t)=>{let n=t.treeLayer??0;n<r&&i++,n>r&&a++});let s=i+a;o.set(t,s>0?(i-a)/s*.55:0)}),e.forEachNode((t,n)=>{let r=n.treeLayer??0,i=a.get(r)??n.y,s=o.get(t)??0;e.setNodeAttribute(t,`y`,i+s*ef*.6)}),ee(!0);let s=e.order,c=s>5e3,l=s>1500,u=!c,d=!c,f=c?.58:.62,p=c?12:l?6:3,m=c?6:l?3:2,S=c?1:2,C=c?3e4:l?24e3:qd,w=c?.05:.022,T=c?.03:.016,E=c?.02:.008,D=c?20:Jd,O=t=>{if(!r.current||r.current!==e){N(!1);return}b.current===null&&(b.current=t);let i=v.current===null?Yd:vf(t-v.current,8,64);if(v.current=t,y.current=Math.min(Yd*3,y.current+i),y.current<Yd){h.current=requestAnimationFrame(O);return}let s=Math.min(S,Math.floor(y.current/Yd));y.current-=s*Yd;let c=.6,l=0,k=0,ee=0;for(let t=0;t<s;t++){let t=new Map,n=new Map;if(e.forEachNode((e,r)=>{let i=r.treeLayer??0,s=(a.get(i)??r.y)+(o.get(e)??0)*ef;t.set(e,0),n.set(e,(s-r.y)*$d*c)}),e.forEachEdge((e,r,i,a,o,s)=>{let l=s.x-o.x,u=_f[r.relationType]??.18,d=r.isHierarchyEdge?0:60,f=Math.abs(l)-d;if(f>0){let e=r.isHierarchyEdge?u:Math.min(u,.1),n=Math.sign(l)*f*e*.3*c;t.set(i,(t.get(i)??0)+n),t.set(a,(t.get(a)??0)-n)}let p=s.y-o.y,m=Math.sqrt(l*l+p*p)||1,h=Math.abs((s.treeLayer??0)-(o.treeLayer??0)),g=m-((r.isHierarchyEdge?70:95)+h*(r.isHierarchyEdge?28:36));if(g>0){let e=p/m*g*u*.008*c;n.set(i,(n.get(i)??0)+e),n.set(a,(n.get(a)??0)-e)}}),u){let r=e.nodes().map(t=>{let n=e.getNodeAttributes(t);return{id:t,x:n.x,y:n.y,size:n.size??6,layer:n.treeLayer??0}});r.sort((e,t)=>e.x-t.x);for(let e=0;e<r.length;e++){let i=r[e];for(let a=e+1;a<r.length;a++){let e=r[a],o=e.x-i.x;if(o>Kd)break;let s=e.y-i.y,l=Math.sqrt(o*o+s*s)||1;if(l>Kd)continue;let u=i.layer===e.layer,d=u?100:28,f=Math.max(28,(i.size+e.size)*1.8),p=(1/(l+8)-1/(Kd+8))*d*c;if(l<f&&u&&(p+=(f-l)*.1*c),p<=0)continue;let m=o/l*p,h=s/l*p;t.set(i.id,(t.get(i.id)??0)-m),n.set(i.id,(n.get(i.id)??0)-h),t.set(e.id,(t.get(e.id)??0)+m),n.set(e.id,(n.get(e.id)??0)+h)}}}if(d){let n=new Map;e.forEachNode((e,t)=>{let r=t.treeLayer??0;n.has(r)||n.set(r,[]),n.get(r).push({id:e,x:t.x})});for(let[,e]of n){if(e.length<2)continue;e.sort((e,t)=>e.x-t.x);let n=e.length,r=Gd*2/n;for(let i=0;i<n;i++){let{id:n,x:a}=e[i],o=-Gd+(i+.5)*r;t.set(n,(t.get(n)??0)+(o-a)*nf*c)}}}l=0,k=0,ee=0,e.forEachNode((r,i)=>{let o=t.get(r)??0,s=n.get(r)??0,c=g.current.get(r)??0,u=_.current.get(r)??0,d=Math.min(1,Math.abs(i.x)/Gd),h=1+d*d*4,v=i.treeLayer??0,y=a.get(v)??i.y,b=i.y-y,x=Math.min(1,Math.abs(b)/ef),S=1+x*x*tf,C=(c+o/h)*f,w=(u+s/S)*f,T=Math.abs(o)<Zd&&Math.abs(C)<Qd?0:vf(C,-p,p),E=Math.abs(s)<Zd&&Math.abs(w)<Qd?0:vf(w,-m,m);g.current.set(r,T),_.current.set(r,E);let D=Math.sqrt(T*T+E*E);l+=D,k=Math.max(k,D),(D>Qd||Math.abs(o)>Zd||Math.abs(s)>Zd)&&(ee+=1),e.setNodeAttribute(r,`x`,vf(i.x+T,-Gd,Gd)),e.setNodeAttribute(r,`y`,vf(i.y+E,y-ef,y+ef))})}n.current?.refresh();let A=l/Math.max(1,e.order),j=t-(b.current??t);if(j>=Xd&&k<w&&ee<=Math.max(2,Math.floor(e.order*E))&&A<T?x.current+=1:x.current=0,x.current>=D||j>=C){N(!0);return}h.current=requestAnimationFrame(O)};h.current=requestAnimationFrame(O)},[te,N]),F=(0,W.useCallback)(e=>{if(e.order===0)return;te(!1);let t=rf,i=e.order,a=i>5e3,o=i>1500,s=a?0:o?70:uf,c=a||o?.58:.62,l=a?10:5,u=a?1:2,d=!a,f=a?3e4:o?18e3:df,p=a?.05:.022,m=a?.03:.016,h=a?.02:.008,g=a?20:ff;e.forEachNode((t,n)=>{let r=n.circlesAnchorX??n.x,i=n.circlesAnchorY??n.y;e.setNodeAttribute(t,`x`,r),e.setNodeAttribute(t,`y`,i),C.current.set(t,0),w.current.set(t,0)}),ee(!0);let _=i=>{if(!r.current||r.current!==e){P(!1);return}D.current===null&&(D.current=i);let a=T.current===null?Yd:vf(i-T.current,8,64);if(T.current=i,E.current=Math.min(Yd*3,E.current+a),E.current<Yd){S.current=requestAnimationFrame(_);return}let o=Math.min(u,Math.floor(E.current/Yd));E.current-=o*Yd;let v=.6,y=0,b=0,x=0;for(let n=0;n<o;n++){y=0,b=0,x=0;let n=new Map,r=new Map;if(e.forEachNode((e,i)=>{let a=i.circlesRing??0,o=t[Math.min(a,af-1)],s=i.x,c=i.y,l=Math.sqrt(s*s+c*c)||1,u=o-l,d=Math.min(1,Math.abs(u)/of),f=sf*(1+d*d*d*cf);n.set(e,s/l*u*f*v),r.set(e,c/l*u*f*v)}),e.forEachEdge((e,i,a,o,s,c)=>{let l=c.x-s.x,u=c.y-s.y,d=Math.sqrt(l*l+u*u)||1,f=gf[i.relationType]??.2,p=s.circlesRing??0,m=c.circlesRing??0,h=d-(i.isHierarchyEdge?Math.abs(t[Math.min(p,af-1)]-t[Math.min(m,af-1)]):30);if(h>0){let e=h*f*.55*v,t=l/d*e,i=u/d*e;n.set(a,(n.get(a)??0)+t),r.set(a,(r.get(a)??0)+i),n.set(o,(n.get(o)??0)-t),r.set(o,(r.get(o)??0)-i)}}),s>0){let t=e.nodes().map(t=>{let n=e.getNodeAttributes(t);return{id:t,x:n.x,y:n.y,size:n.size??6,ring:n.circlesRing??0}});t.sort((e,t)=>e.x-t.x);for(let e=0;e<t.length;e++){let i=t[e];for(let a=e+1;a<t.length;a++){let e=t[a],o=e.x-i.x;if(o>s)break;let c=e.y-i.y,l=o*o+c*c,u=Math.sqrt(l)||1;if(u>s)continue;let d=i.ring===e.ring,f=d?100:28,p=Math.max(28,(i.size+e.size)*1.8),m=(1/(u+8)-1/(s+8))*f*v;if(u<p&&d&&(m+=(p-u)*.1*v),m<=0)continue;let h=o/u*m,g=c/u*m;n.set(i.id,(n.get(i.id)??0)-h),r.set(i.id,(r.get(i.id)??0)-g),n.set(e.id,(n.get(e.id)??0)+h),r.set(e.id,(r.get(e.id)??0)+g)}}}if(d){let t=new Map;e.forEachNode((e,n)=>{let r=n.circlesRing??0;t.has(r)||t.set(r,[]),t.get(r).push({id:e,angle:Math.atan2(n.y,n.x),x:n.x,y:n.y})});for(let[,e]of t){if(e.length<2)continue;e.sort((e,t)=>e.angle-t.angle);let t=e.length;for(let i=0;i<t;i++){let{id:a,angle:o,x:s,y:c}=e[i],l=(i+.5)/t*Math.PI*2-Math.PI-o;for(;l>Math.PI;)l-=Math.PI*2;for(;l<-Math.PI;)l+=Math.PI*2;let u=Math.sqrt(s*s+c*c)||1,d=-c/u,f=s/u,p=l*lf*v;n.set(a,(n.get(a)??0)+d*p),r.set(a,(r.get(a)??0)+f*p)}}}e.forEachNode((i,a)=>{let o=n.get(i)??0,s=r.get(i)??0,u=C.current.get(i)??0,d=w.current.get(i)??0,f=a.circlesRing??0,p=t[Math.min(f,af-1)],m=a.x,h=a.y,g=(u+o)*c,_=(d+s)*c,v=Math.abs(o)<mf&&Math.abs(g)<hf?0:vf(g,-l,l),S=Math.abs(s)<mf&&Math.abs(_)<hf?0:vf(_,-l,l);C.current.set(i,v),w.current.set(i,S);let T=Math.sqrt(v*v+S*S);y+=T,b=Math.max(b,T),(T>hf||Math.abs(o)>mf||Math.abs(s)>mf)&&(x+=1);let E=m+v,D=h+S,O=Math.sqrt(E*E+D*D)||1,k=vf(O,Math.max(1,p-of*1.5),p+of*1.5)/O;e.setNodeAttribute(i,`x`,E*k),e.setNodeAttribute(i,`y`,D*k)})}n.current?.refresh();let k=y/Math.max(1,e.order),ee=i-(D.current??i);if(ee>=pf&&b<p&&x<=Math.max(2,Math.floor(e.order*h))&&k<m?O.current+=1:O.current=0,O.current>=g||ee>=f){P(!0);return}S.current=requestAnimationFrame(_)};S.current=requestAnimationFrame(_)},[te,P]),I=(0,W.useCallback)(e=>{let t=e.order;if(t===0)return;te(!1);let r=rd.default.inferSettings(e),a=Ud(t),o=new nd.default(e,{settings:{...r,...a}});i.current=o,o.start(),ee(!0);let s=Wd(t);p.current=setTimeout(()=>{i.current&&(i.current.stop(),i.current=null,id.default.assign(e,Hd),n.current?.refresh(),ee(!1))},s)},[te]),L=(0,W.useCallback)(t=>{let i=n.current;i&&(te(!1),r.current=t,i.setGraph(t),M(null),e.layoutMode===`tree`?ne(t):e.layoutMode===`circles`?F(t):I(t),i.getCamera().animatedReset({duration:500}))},[e.layoutMode,I,ne,F,M,te]),re=(0,W.useCallback)(e=>{let t=n.current,i=r.current;if(!t||!i||!i.hasNode(e))return;let o=a.current===e;if(a.current=e,j(e),!o){let n=i.getNodeAttributes(e);t.getCamera().animate({x:n.x,y:n.y,ratio:.15},{duration:400})}t.refresh()},[]);return{containerRef:t,sigmaRef:n,setGraph:L,zoomIn:(0,W.useCallback)(()=>{n.current?.getCamera().animatedZoom({duration:200})},[]),zoomOut:(0,W.useCallback)(()=>{n.current?.getCamera().animatedUnzoom({duration:200})},[]),resetZoom:(0,W.useCallback)(()=>{n.current?.getCamera().animatedReset({duration:300}),M(null)},[M]),focusNode:re,isLayoutRunning:k,startLayout:(0,W.useCallback)(()=>{let t=r.current;!t||t.order===0||(e.layoutMode===`tree`?ne(t):e.layoutMode===`circles`?F(t):I(t))},[e.layoutMode,I,ne,F]),stopLayout:(0,W.useCallback)(()=>{te(!0)},[te]),selectedNode:A,setSelectedNode:M,refreshHighlights:(0,W.useCallback)(()=>{n.current?.refresh()},[])}},bf={Project:0,Package:0,Module:0,Folder:0,Namespace:0,File:1,Section:1,Import:1,Route:1,Tool:1,Class:2,Interface:2,Enum:2,Type:2,Struct:2,Trait:2,Union:2,Record:2,Typedef:2,Template:2,TypeAlias:2,Function:3,Method:3,Impl:3,Delegate:3,Constructor:3,Variable:3,Const:3,Static:3,Property:3,Decorator:3,Annotation:3,Macro:3,CodeElement:3},xf=1,Sf=1200,Cf=800,wf=4,Tf=Cf/wf,Ef=60,Df=15,Of=45,kf=132,Af=new Set([`CONTAINS`,`DEFINES`,`HAS_METHOD`,`HAS_PROPERTY`]),jf=(Sf-Ef*2)/2,Mf={CONTAINS:.12,DEFINES:.16,HAS_METHOD:.16,HAS_PROPERTY:.14,IMPORTS:.2,CALLS:.24,EXTENDS:.18,IMPLEMENTS:.18};function Nf(e,t){return(Qr[t]||6)*Math.max(.6,1-e*.12)}function Pf(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n),t|=0;return Math.abs(t)%1e4/1e4}function Ff(e){return bf[e.label]??xf}function If(e){let t=new Map,n=new Map;for(let r of e.relationships)Af.has(r.type)&&(t.has(r.sourceId)||t.set(r.sourceId,[]),t.get(r.sourceId).push(r.targetId),n.has(r.targetId)||n.set(r.targetId,[]),n.get(r.targetId).push(r.sourceId));return{childrenByParent:t,parentsByChild:n}}function Lf(e){let t=Array.from({length:wf},()=>[]);for(let n of e.nodes){let e=Ff(n);e>=0&&e<wf&&t[e].push(n.id)}return t}function Rf(e,t,n){let r=Math.abs(t.depth-n.depth);return(Af.has(e)?60:85)+r*40}function zf(e,t,n){return Math.min(n,Math.max(t,e))}function Bf(e){if(e<=4)return[0];let t=e<=16?2:3,n=t===2?72:kf,r=n/(t-1);return Array.from({length:t},(e,t)=>-n/2+t*r)}function Vf(e,t,n,r,i,a){let o=Bf(t.length),s=o.length,c=Math.floor(t.length/s),l=t.length%s,u=0;for(let d=0;d<s;d++){let s=c+ +(d<l);if(s===0)continue;let f=r/s;for(let r=0;r<s;r++){let s=t[u++];e.set(s.id,{x:n+(r+.5)*f,y:i+o[d],size:Nf(a,s.label),depth:a})}}}function Hf(e,t,n){if(e.length<2)return;let r=[...e].sort((e,n)=>t.get(e).x-t.get(n).x);for(let e=0;e<2;e++){for(let e=1;e<r.length;e++){let n=t.get(r[e-1]),i=t.get(r[e]),a=Math.max(Of*.65,(n.size+i.size)*1.7),o=i.x-n.x;if(o<a){let e=(a-o)/2;n.x-=e,i.x+=e}}for(let e=r.length-2;e>=0;e--){let n=t.get(r[e]),i=t.get(r[e+1]),a=Math.max(Of*.65,(n.size+i.size)*1.7),o=i.x-n.x;if(o<a){let e=(a-o)/2;n.x-=e,i.x+=e}}}let i=r.reduce((e,t)=>e+(n.get(t)??0),0)/r.length,a=r.reduce((e,n)=>e+t.get(n).x,0)/r.length-i;for(let e of r){let n=t.get(e);n.x=zf(n.x-a,-jf,jf)}}function Uf(e,t){let n=new Map,r=Array.from({length:wf},()=>[]),i=new Map;for(let t of e.nodes){let e=Ff(t);e>=0&&e<wf&&(r[e].push(t),i.set(t.id,e))}let a=Sf-Ef*2,o=a/2,s=Tf-Df*2,c=e=>(wf-1-e)*Tf+Df+s/2,l=[...r[0]].sort((e,t)=>e.properties.name.localeCompare(t.properties.name));if(l.length>0){let e=a/l.length;for(let t=0;t<l.length;t++){let r=l[t];n.set(r.id,{x:-o+(t+.5)*e,y:c(0),size:Nf(0,r.label),depth:0})}}for(let e=1;e<wf;e++){let s=r[e];if(s.length===0)continue;let l=c(e),u=new Map;for(let e of s){let r=t.get(e.id)??[],a=null,o=-1;for(let e of r){if(!n.has(e))continue;let t=i.get(e)??-1;t>o&&(o=t,a=e)}a&&u.set(e.id,a)}let d=new Map,f=[];for(let e of s){let t=u.get(e.id);t?(d.has(t)||d.set(t,[]),d.get(t).push(e)):f.push(e)}for(let e of d.values())e.sort((e,t)=>e.properties.name.localeCompare(t.properties.name));f.sort((e,t)=>e.properties.name.localeCompare(t.properties.name));let p=[...d.keys()].sort((e,t)=>(n.get(e)?.x??0)-(n.get(t)?.x??0)),m=s.length-f.length,h=m>0?a*(m/s.length):0,g=a-h,_=-o;for(let t of p){let r=d.get(t)??[];if(r.length===0)continue;let i=r.length/m*h;Vf(n,r,_,i,l,e),_+=i}f.length>0&&g>0&&Vf(n,f,_,g,l,e)}let u=Cf/2;for(let e of n.values())e.y-=u;return n}function Wf(e){let t=Lf(e),{childrenByParent:n,parentsByChild:r}=If(e),i=Uf(e,r);for(let[e,t]of i)t.y+=(Pf(e+`y`)-.5)*20;for(let e=0;e<6;e++){let e=new Map;for(let[t,r]of n){let n=i.get(t);if(!n||r.length===0)continue;let a=r.map(e=>({childId:e,pos:i.get(e)})).filter(e=>e.pos!==void 0).sort((e,t)=>e.pos.x-t.pos.x);if(a.length===0)continue;let o=a.reduce((e,t)=>e+t.pos.x,0)/a.length,s=n.x-o;for(let t of a){let n=e.get(t.childId)||{sum:0,count:0};n.sum+=t.pos.x+s,n.count+=1,e.set(t.childId,n)}}for(let[t,n]of e){let e=i.get(t);if(!e)continue;let r=n.sum/n.count;e.x=e.x*.45+r*.55}let t=new Map;for(let[e,r]of n){if(!i.get(e)||r.length===0)continue;let n=r.map(e=>i.get(e)?.x).filter(e=>e!==void 0);if(n.length===0)continue;let a=n.reduce((e,t)=>e+t,0)/n.length,o=t.get(e)||{sum:0,count:0};o.sum+=a,o.count+=1,t.set(e,o)}for(let[e,n]of t){let t=i.get(e);if(!t)continue;let r=n.sum/n.count;t.x=t.x*.65+r*.35}}for(let[e,t]of r){if(n.has(e))continue;let r=i.get(e);if(!r||t.length===0)continue;let a=t.map(e=>i.get(e)?.x).filter(e=>e!==void 0);if(a.length===0)continue;let o=a.reduce((e,t)=>e+t,0)/a.length;r.x=r.x*.7+o*.3}let a=new Map;for(let[e,t]of i)a.set(e,t.x);let o=e.nodes.length,s=o>1e4?0:o>3e3?4:14;for(let n=0;n<s;n++){let n=new Map;for(let[e,t]of i){let r=a.get(e)??t.x,i=Math.min(1,Math.abs(t.x)/jf),o=.05+i*i*.1;n.set(e,(r-t.x)*o)}for(let t of e.relationships){let e=i.get(t.sourceId),r=i.get(t.targetId);if(!e||!r)continue;let a=r.x-e.x,o=r.y-e.y,s=Math.sqrt(a*a+o*o)||1,c=s-Rf(t.type,e,r);if(c<=0)continue;let l=c*(Mf[t.type]??.14)*.08,u=a/s*l;n.set(t.sourceId,(n.get(t.sourceId)??0)+u),n.set(t.targetId,(n.get(t.targetId)??0)-u)}for(let[e,t]of i){let r=n.get(e)??0,i=Math.min(1,Math.abs(t.x)/jf),a=1+i*i*4.5,o=18-i*6,s=zf(r/a,-o,o);t.x=zf(t.x+s,-jf,jf)}for(let e of t)Hf(e,i,a)}let c=Array.from(i.values()).map(e=>e.x);if(c.length>0){let e=Math.min(...c),t=Math.max(...c),n=(e+t)/2,r=Math.max(1,(t-e)/2),a=r>jf?jf/r:1;for(let e of i.values())e.x=(e.x-n)*a}return i}var Gf=[90,240,420,620],Kf=Gf.length,qf={Project:0,Package:0,Module:0,Folder:0,Namespace:0,File:1,Section:1,Import:1,Route:1,Tool:1,Class:2,Interface:2,Enum:2,Type:2,Struct:2,Trait:2,Union:2,Record:2,Typedef:2,Template:2,TypeAlias:2,Function:3,Method:3,Impl:3,Delegate:3,Constructor:3,Variable:3,Const:3,Static:3,Property:3,Decorator:3,Annotation:3,Macro:3,CodeElement:3},Jf=1,Yf=new Set([`CONTAINS`,`DEFINES`,`HAS_METHOD`,`HAS_PROPERTY`]);function Xf(e){return qf[e.label]??Jf}function Zf(e,t){return(Qr[t]||6)*Math.max(.6,1-e*.12)}function Qf(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n),t|=0;return Math.abs(t)%1e4/1e4}function $f(e){let t=new Map,n=new Map;for(let r of e.relationships)Yf.has(r.type)&&(t.has(r.sourceId)||t.set(r.sourceId,[]),t.get(r.sourceId).push(r.targetId),n.has(r.targetId)||n.set(r.targetId,[]),n.get(r.targetId).push(r.sourceId));return{childrenByParent:t,parentsByChild:n}}function ep(e,t){let n=new Map,r=Array.from({length:Kf},()=>[]),i=new Map;for(let t of e.nodes){let e=Xf(t);e>=0&&e<Kf&&(r[e].push(t),i.set(t.id,e))}let a=Math.PI*2,o=[...r[0]].sort((e,t)=>e.properties.name.localeCompare(t.properties.name));if(o.length>0){let e=o.length;for(let t=0;t<e;t++){let r=o[t],i=t/e*a,s=Gf[0];n.set(r.id,{x:s*Math.cos(i),y:s*Math.sin(i),size:Zf(0,r.label),ring:0,angle:i})}}for(let e=1;e<Kf;e++){let o=r[e];if(o.length===0)continue;let s=Gf[e],c=new Map;for(let e of o){let r=t.get(e.id)??[],a=null,o=-1;for(let e of r){if(!n.has(e))continue;let t=i.get(e)??-1;t>o&&(o=t,a=e)}a&&c.set(e.id,a)}let l=new Map,u=[];for(let e of o){let t=c.get(e.id);t?(l.has(t)||l.set(t,[]),l.get(t).push(e)):u.push(e)}for(let e of l.values())e.sort((e,t)=>e.properties.name.localeCompare(t.properties.name));u.sort((e,t)=>e.properties.name.localeCompare(t.properties.name));let d=o.length-u.length,f=d>0?d/o.length:0;for(let[t,r]of l){if(r.length===0)continue;let i=n.get(t)?.angle??0,o=r.length/d*f*a,c=i-o/2;for(let t=0;t<r.length;t++){let i=c+(t+.5)*(o/r.length);n.set(r[t].id,{x:s*Math.cos(i),y:s*Math.sin(i),size:Zf(e,r[t].label),ring:e,angle:i})}}if(u.length>0){let t=u.length/o.length*a,r=Math.PI-t/2;for(let i=0;i<u.length;i++){let a=r+(i+.5)*(t/u.length);n.set(u[i].id,{x:s*Math.cos(a),y:s*Math.sin(a),size:Zf(e,u[i].label),ring:e,angle:a})}}}return n}function tp(e){let{parentsByChild:t}=$f(e),n=ep(e,t);for(let[e,t]of n){let n=(Qf(e+`r`)-.5)*10,r=Gf[t.ring]+n;t.x=r*Math.cos(t.angle),t.y=r*Math.sin(t.angle)}return n}var np=(e,t)=>t>5e4?Math.max(1,e*.4):t>2e4?Math.max(1.5,e*.5):t>5e3?Math.max(2,e*.65):t>1e3?Math.max(2.5,e*.8):e,rp=(e,t)=>{let n=t>5e3?2:t>1e3?1.5:1;switch(e){case`Project`:return 50*n;case`Package`:return 30*n;case`Module`:return 20*n;case`Folder`:return 15*n;case`File`:return 3*n;case`Class`:case`Interface`:return 5*n;case`Function`:case`Method`:return 2*n;default:return 1}},ip=(e,t)=>{let n=new Ru,r=e.nodes.length,i=new Map,a=new Map,o=new Set([`CONTAINS`,`DEFINES`,`IMPORTS`]);e.relationships.forEach(e=>{o.has(e.type)&&(i.has(e.sourceId)||i.set(e.sourceId,[]),i.get(e.sourceId).push(e.targetId),a.set(e.targetId,e.sourceId))});let s=new Map(e.nodes.map(e=>[e.id,e])),c=new Set([`Project`,`Package`,`Module`,`Folder`]),l=e.nodes.filter(e=>c.has(e.label)),u=Math.sqrt(r)*40,d=Math.sqrt(r)*3,f=new Map;if(t&&t.size>0){let e=new Set(t.values()),n=e.size,r=u*.8,i=Math.PI*(3-Math.sqrt(5)),a=0;e.forEach(e=>{let t=a*i,o=r*Math.sqrt((a+1)/n);f.set(e,{x:o*Math.cos(t),y:o*Math.sin(t)}),a++})}let p=Math.sqrt(r)*1.5,m=new Map;l.forEach((e,t)=>{let i=t*(Math.PI*(3-Math.sqrt(5))),a=u*Math.sqrt((t+1)/Math.max(l.length,1)),o=u*.15,s=a*Math.cos(i)+(Math.random()-.5)*o,c=a*Math.sin(i)+(Math.random()-.5)*o;m.set(e.id,{x:s,y:c});let d=np(Qr[e.label]||8,r);n.addNode(e.id,{x:s,y:c,size:d,color:Zr[e.label]||`#9ca3af`,label:e.properties.name,nodeType:e.label,filePath:e.properties.filePath,startLine:e.properties.startLine,endLine:e.properties.endLine,hidden:!1,mass:rp(e.label,r)})});let h=e=>{if(n.hasNode(e))return;let i=s.get(e);if(!i)return;let o,c,l=t?.get(e),h=new Set([`Function`,`Class`,`Method`,`Interface`]),g=l===void 0?null:f.get(l);if(g&&h.has(i.label))o=g.x+(Math.random()-.5)*p,c=g.y+(Math.random()-.5)*p;else{let t=a.get(e),n=t?m.get(t):null;n?(o=n.x+(Math.random()-.5)*d,c=n.y+(Math.random()-.5)*d):(o=(Math.random()-.5)*u*.5,c=(Math.random()-.5)*u*.5)}m.set(e,{x:o,y:c});let _=np(Qr[i.label]||8,r),v=l!==void 0,y=v&&h.has(i.label)?ei(l):Zr[i.label]||`#9ca3af`;n.addNode(e,{x:o,y:c,size:_,color:y,label:i.properties.name,nodeType:i.label,filePath:i.properties.filePath,startLine:i.properties.startLine,endLine:i.properties.endLine,hidden:!1,mass:rp(i.label,r),community:l,communityColor:v?ei(l):void 0})},g=[...l.map(e=>e.id)],_=new Set(g);for(;g.length>0;){let e=g.shift(),t=i.get(e)||[];for(let e of t)_.has(e)||(_.add(e),h(e),g.push(e))}e.nodes.forEach(e=>{n.hasNode(e.id)||h(e.id)});let v=r>2e4?.4:r>5e3?.6:1,y={CONTAINS:{color:`#2d5a3d`,sizeMultiplier:.4},DEFINES:{color:`#0e7490`,sizeMultiplier:.5},IMPORTS:{color:`#1d4ed8`,sizeMultiplier:.6},CALLS:{color:`#7c3aed`,sizeMultiplier:.8},EXTENDS:{color:`#c2410c`,sizeMultiplier:1},IMPLEMENTS:{color:`#be185d`,sizeMultiplier:.9},HAS_METHOD:{color:ai.DEFINES.color,sizeMultiplier:.4},HAS_PROPERTY:{color:ai.CONTAINS.color,sizeMultiplier:.35}},b=new Set([`CONTAINS`,`DEFINES`,`HAS_METHOD`,`HAS_PROPERTY`]),x=e=>{if(!n.hasNode(e.sourceId)||!n.hasNode(e.targetId)||n.hasEdge(e.sourceId,e.targetId))return;let t=y[e.type]||{color:`#4a4a5a`,sizeMultiplier:.5},r=.12+Math.random()*.08;n.addEdge(e.sourceId,e.targetId,{size:v*t.sizeMultiplier,color:t.color,relationType:e.type,type:`curved`,curvature:r})};return e.relationships.forEach(e=>{b.has(e.type)&&x(e)}),e.relationships.forEach(e=>{b.has(e.type)||x(e)}),n},ap=e=>{let t=new Vu,n=e.nodes.length,r=Wf(e);for(let i of e.nodes){let e=r.get(i.id);if(!e)continue;let a=Qr[i.label]||8,o=np(a,n),s=Math.max(2,e.size*(o/a));t.addNode(i.id,{x:e.x,y:e.y,size:s,color:Zr[i.label]||`#9ca3af`,label:i.properties.name,nodeType:i.label,filePath:i.properties.filePath,startLine:i.properties.startLine,endLine:i.properties.endLine,hidden:!1,mass:1,treeAnchorX:e.x,treeAnchorY:e.y,treeLayer:e.depth})}let i=n>2e4?.4:n>5e3?.6:1,a={CONTAINS:{color:ai.CONTAINS.color,sizeMultiplier:.3},DEFINES:{color:ai.DEFINES.color,sizeMultiplier:.3},HAS_METHOD:{color:ai.DEFINES.color,sizeMultiplier:.3},HAS_PROPERTY:{color:ai.CONTAINS.color,sizeMultiplier:.25}},o={IMPORTS:{color:ai.IMPORTS.color,sizeMultiplier:.6},CALLS:{color:ai.CALLS.color,sizeMultiplier:.8},EXTENDS:{color:ai.EXTENDS.color,sizeMultiplier:1},IMPLEMENTS:{color:ai.IMPLEMENTS.color,sizeMultiplier:.9}},s=new Set,c=e=>{if(!t.hasNode(e.sourceId)||!t.hasNode(e.targetId)||s.has(e.id))return;s.add(e.id);let n=a[e.type]!==void 0,r=n?a[e.type]:o[e.type]||{color:`#4a4a5a`,sizeMultiplier:.5};t.addEdge(e.sourceId,e.targetId,{size:i*r.sizeMultiplier,color:r.color,relationType:e.type,type:`curved`,curvature:.1+Math.random()*.1,isHierarchyEdge:n})};return e.relationships.forEach(e=>{a[e.type]!==void 0&&c(e)}),e.relationships.forEach(e=>{a[e.type]===void 0&&c(e)}),t},op=e=>{let t=new Vu,n=e.nodes.length,r=tp(e);for(let i of e.nodes){let e=r.get(i.id);if(!e)continue;let a=Qr[i.label]||8,o=np(a,n),s=Math.max(2,e.size*(o/a));t.addNode(i.id,{x:e.x,y:e.y,size:s,color:Zr[i.label]||`#9ca3af`,label:i.properties.name,nodeType:i.label,filePath:i.properties.filePath,startLine:i.properties.startLine,endLine:i.properties.endLine,hidden:!1,mass:1,circlesAnchorX:e.x,circlesAnchorY:e.y,circlesRing:e.ring,circlesAnchorAngle:e.angle})}let i=n>2e4?.4:n>5e3?.6:1,a={CONTAINS:{color:ai.CONTAINS.color,sizeMultiplier:.3},DEFINES:{color:ai.DEFINES.color,sizeMultiplier:.3},HAS_METHOD:{color:ai.DEFINES.color,sizeMultiplier:.3},HAS_PROPERTY:{color:ai.CONTAINS.color,sizeMultiplier:.25}},o={IMPORTS:{color:ai.IMPORTS.color,sizeMultiplier:.6},CALLS:{color:ai.CALLS.color,sizeMultiplier:.8},EXTENDS:{color:ai.EXTENDS.color,sizeMultiplier:1},IMPLEMENTS:{color:ai.IMPLEMENTS.color,sizeMultiplier:.9}},s=new Set,c=e=>{if(!t.hasNode(e.sourceId)||!t.hasNode(e.targetId)||s.has(e.id))return;s.add(e.id);let n=a[e.type]!==void 0,r=n?a[e.type]:o[e.type]||{color:`#4a4a5a`,sizeMultiplier:.5};t.addEdge(e.sourceId,e.targetId,{size:i*r.sizeMultiplier,color:r.color,relationType:e.type,type:`curved`,curvature:.1+Math.random()*.1,isHierarchyEdge:n})};return e.relationships.forEach(e=>{a[e.type]!==void 0&&c(e)}),e.relationships.forEach(e=>{a[e.type]===void 0&&c(e)}),t},sp=(e,t)=>{e.forEachNode((n,r)=>{let i=t.includes(r.nodeType);e.setNodeAttribute(n,`hidden`,!i)})},cp=(e,t,n)=>{let r=new Set,i=[{nodeId:t,depth:0}];for(;i.length>0;){let{nodeId:t,depth:a}=i.shift();r.has(t)||(r.add(t),a<n&&e.forEachNeighbor(t,e=>{r.has(e)||i.push({nodeId:e,depth:a+1})}))}return r},lp=(e,t,n,r)=>{if(n===null){sp(e,r);return}if(t===null||!e.hasNode(t)){sp(e,r);return}let i=cp(e,t,n);e.forEachNode((t,n)=>{let a=r.includes(n.nodeType),o=i.has(t);e.setNodeAttribute(t,`hidden`,!a||!o)})},up=[{labelKey:`functions`,query:`MATCH (n:Function) RETURN n.id AS id, n.name AS name, n.filePath AS path LIMIT 50`},{labelKey:`classes`,query:`MATCH (n:Class) RETURN n.id AS id, n.name AS name, n.filePath AS path LIMIT 50`},{labelKey:`interfaces`,query:`MATCH (n:Interface) RETURN n.id AS id, n.name AS name, n.filePath AS path LIMIT 50`},{labelKey:`calls`,query:`MATCH (a:File)-[r:CodeRelation {type: 'CALLS'}]->(b:Function) RETURN a.id AS id, a.name AS caller, b.name AS callee LIMIT 50`},{labelKey:`imports`,query:`MATCH (a:File)-[r:CodeRelation {type: 'IMPORTS'}]->(b:File) RETURN a.id AS id, a.name AS from, b.name AS imports LIMIT 50`}],dp=()=>{let{t:e}=Nr([`common`,`graph`]),{setHighlightedNodeIds:t,setQueryResult:n,queryResult:r,clearQueryHighlights:i,graph:a,runQuery:o,isDatabaseReady:s}=hi(),[c,l]=(0,W.useState)(!1),[u,d]=(0,W.useState)(``),[f,p]=(0,W.useState)(!1),[m,h]=(0,W.useState)(null),[g,_]=(0,W.useState)(!1),[v,y]=(0,W.useState)(!0),b=(0,W.useRef)(null),x=(0,W.useRef)(null);(0,W.useEffect)(()=>{c&&b.current&&b.current.focus()},[c]),(0,W.useEffect)(()=>{let e=e=>{x.current&&!x.current.contains(e.target)&&_(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]),(0,W.useEffect)(()=>{let e=e=>{e.key===`Escape`&&c&&(l(!1),_(!1))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[c]);let S=(0,W.useCallback)(async()=>{if(!u.trim()||f)return;if(!a){h(e(`graph:queryFab.noProject`));return}if(!await s()){h(e(`graph:queryFab.dbNotReady`));return}p(!0),h(null);let r=performance.now();try{let e=await o(u),i=performance.now()-r,a=/^(File|Function|Class|Method|Interface|Folder|CodeElement):/,s=e.flatMap(e=>{let t=[];return Array.isArray(e)?e.forEach(e=>{typeof e==`string`&&(a.test(e)||e.includes(`:`))&&t.push(e)}):typeof e==`object`&&e&&Object.entries(e).forEach(([e,n])=>{let r=e.toLowerCase();typeof n==`string`&&(r.includes(`id`)||r===`id`||a.test(n))&&t.push(n)}),t}).filter(Boolean).filter((e,t,n)=>n.indexOf(e)===t);n({rows:e,nodeIds:s,executionTime:i}),t(new Set(s))}catch(r){h(r instanceof Error?r.message:e(`graph:queryFab.executionFailed`)),n(null),t(new Set)}finally{p(!1)}},[u,f,a,s,o,t,n,e]),C=e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),S())},w=e=>{d(e),_(!1),b.current?.focus()};return c?(0,G.jsxs)(`div`,{ref:x,className:`absolute bottom-4 left-4 z-20 w-[480px] max-w-[calc(100%-2rem)] animate-fade-in rounded-xl border border-cyan-500/30 bg-deep/95 shadow-[0_0_40px_rgba(6,182,212,0.2)] backdrop-blur-md`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border-subtle px-4 py-3`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`div`,{className:`flex h-7 w-7 items-center justify-center rounded-lg bg-gradient-to-br from-cyan-500 to-teal-500`,children:(0,G.jsx)(Ta,{className:`h-4 w-4 text-white`})}),(0,G.jsx)(`span`,{className:`text-sm font-medium`,children:e(`graph:queryFab.cypherQuery`)})]}),(0,G.jsx)(`button`,{onClick:()=>{l(!1),_(!1),i(),h(null)},className:`rounded-md p-1.5 text-text-muted transition-colors hover:bg-hover hover:text-text-primary`,children:(0,G.jsx)(ja,{className:`h-4 w-4`})})]}),(0,G.jsxs)(`div`,{className:`p-3`,children:[(0,G.jsx)(`div`,{className:`relative`,children:(0,G.jsx)(`textarea`,{ref:b,value:u,onChange:e=>d(e.target.value),onKeyDown:C,placeholder:`MATCH (n:Function) RETURN n.name, n.filePath LIMIT 10`,rows:3,className:`w-full resize-none rounded-lg border border-border-subtle bg-surface px-3 py-2.5 font-mono text-sm text-text-primary transition-all outline-none placeholder:text-text-muted focus:border-cyan-500/50 focus:ring-2 focus:ring-cyan-500/20`})}),(0,G.jsxs)(`div`,{className:`mt-3 flex items-center justify-between`,children:[(0,G.jsxs)(`div`,{className:`relative`,children:[(0,G.jsxs)(`button`,{onClick:()=>_(!g),className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,children:[(0,G.jsx)(ba,{className:`h-3.5 w-3.5`}),(0,G.jsx)(`span`,{children:e(`graph:queryFab.examples`)}),(0,G.jsx)(Mi,{className:`h-3.5 w-3.5 transition-transform ${g?`rotate-180`:``}`})]}),g&&(0,G.jsx)(`div`,{className:`absolute bottom-full left-0 mb-2 w-64 animate-fade-in rounded-lg border border-border-subtle bg-surface py-1 shadow-xl`,children:up.map(t=>(0,G.jsx)(`button`,{onClick:()=>w(t.query),className:`w-full px-3 py-2 text-left text-sm text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,children:e(`graph:queryFab.exampleLabels.${t.labelKey}`)},t.labelKey))})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[u&&(0,G.jsx)(`button`,{onClick:()=>{d(``),i(),h(null),b.current?.focus()},className:`rounded-md px-3 py-1.5 text-xs text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,children:e(`graph:queryFab.clear`)}),(0,G.jsxs)(`button`,{onClick:S,disabled:!u.trim()||f,className:`flex items-center gap-1.5 rounded-md bg-gradient-to-r from-cyan-500 to-teal-500 px-4 py-1.5 text-sm font-medium text-white shadow-[0_0_15px_rgba(6,182,212,0.3)] transition-all hover:shadow-[0_0_20px_rgba(6,182,212,0.5)] disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none`,children:[f?(0,G.jsx)(na,{className:`h-3.5 w-3.5 animate-spin`}):(0,G.jsx)(ua,{className:`h-3.5 w-3.5`}),(0,G.jsx)(`span`,{children:e(`graph:queryFab.run`)}),(0,G.jsx)(`kbd`,{className:`ml-1 rounded bg-white/20 px-1 py-0.5 text-[10px]`,children:`⌘↵`})]})]})]})]}),m&&(0,G.jsx)(`div`,{className:`border-t border-red-500/20 bg-red-500/10 px-4 py-2`,children:(0,G.jsx)(`p`,{className:`font-mono text-xs text-red-400`,children:m})}),r&&!m&&(0,G.jsxs)(`div`,{className:`border-t border-cyan-500/20`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between bg-cyan-500/5 px-4 py-2.5`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-3 text-xs`,children:[(0,G.jsxs)(`span`,{className:`text-text-secondary`,children:[(0,G.jsx)(`span`,{className:`font-semibold text-cyan-400`,children:r.rows.length}),` `,e(`graph:queryFab.rows`)]}),r.nodeIds.length>0&&(0,G.jsxs)(`span`,{className:`text-text-secondary`,children:[(0,G.jsx)(`span`,{className:`font-semibold text-cyan-400`,children:r.nodeIds.length}),` `,e(`graph:queryFab.highlighted`)]}),(0,G.jsxs)(`span`,{className:`text-text-muted`,children:[r.executionTime.toFixed(1),`ms`]})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[r.nodeIds.length>0&&(0,G.jsx)(`button`,{onClick:i,className:`text-xs text-text-muted transition-colors hover:text-text-primary`,children:e(`graph:queryFab.clear`)}),(0,G.jsxs)(`button`,{onClick:()=>y(!v),className:`flex items-center gap-1 text-xs text-text-muted transition-colors hover:text-text-primary`,children:[(0,G.jsx)(Ca,{className:`h-3 w-3`}),v?(0,G.jsx)(Mi,{className:`h-3 w-3`}):(0,G.jsx)(Pi,{className:`h-3 w-3`})]})]})]}),v&&r.rows.length>0&&(0,G.jsxs)(`div`,{className:`scrollbar-thin max-h-48 overflow-auto border-t border-border-subtle`,children:[(0,G.jsxs)(`table`,{className:`w-full text-xs`,children:[(0,G.jsx)(`thead`,{className:`sticky top-0 bg-surface`,children:(0,G.jsx)(`tr`,{children:Object.keys(r.rows[0]).map(e=>(0,G.jsx)(`th`,{className:`border-b border-border-subtle px-3 py-2 text-left font-medium text-text-muted`,children:e},e))})}),(0,G.jsx)(`tbody`,{children:r.rows.slice(0,50).map((e,t)=>(0,G.jsx)(`tr`,{className:`transition-colors hover:bg-hover/50`,children:Object.values(e).map((e,t)=>(0,G.jsx)(`td`,{className:`max-w-[200px] truncate border-b border-border-subtle/50 px-3 py-1.5 font-mono text-text-secondary`,children:typeof e==`object`?JSON.stringify(e):String(e??``)},t))},t))})]}),r.rows.length>50&&(0,G.jsx)(`div`,{className:`border-t border-border-subtle bg-surface px-3 py-2 text-xs text-text-muted`,children:e(`graph:queryFab.showingRows`,{count:r.rows.length})})]})]})]}):(0,G.jsxs)(`button`,{onClick:()=>l(!0),className:`group absolute bottom-4 left-4 z-20 flex items-center gap-2 rounded-xl bg-gradient-to-r from-cyan-500 to-teal-500 px-4 py-2.5 text-sm font-medium text-white shadow-[0_0_20px_rgba(6,182,212,0.4)] transition-all duration-200 hover:-translate-y-0.5 hover:shadow-[0_0_30px_rgba(6,182,212,0.6)]`,children:[(0,G.jsx)(Ta,{className:`h-4 w-4`}),(0,G.jsx)(`span`,{children:e(`graph:queryFab.query`)}),r&&r.nodeIds.length>0&&(0,G.jsx)(`span`,{className:`ml-1 rounded-md bg-white/20 px-1.5 py-0.5 text-xs font-semibold`,children:r.nodeIds.length})]})},fp=(0,W.forwardRef)((e,t)=>{let{t:n}=Nr(`graph`),{graph:r,setSelectedNode:i,selectedNode:a,visibleLabels:o,visibleEdgeTypes:s,openCodePanel:c,depthFilter:l,highlightedNodeIds:u,setHighlightedNodeIds:d,aiCitationHighlightedNodeIds:f,aiToolHighlightedNodeIds:p,blastRadiusNodeIds:m,isAIHighlightsEnabled:h,toggleAIHighlights:g,clearAIToolHighlights:_,clearAICitationHighlights:v,clearBlastRadius:y,animatedNodes:b,graphViewMode:x,setGraphViewMode:S}=hi(),[C,w]=(0,W.useState)(null),T=(0,W.useMemo)(()=>{if(!h)return u;let e=new Set(u);for(let t of f)e.add(t);for(let t of p)e.add(t);return e},[u,f,p,h]),E=(0,W.useMemo)(()=>h?m:new Set,[m,h]),D=(0,W.useMemo)(()=>h?b:new Map,[b,h]),O=(0,W.useMemo)(()=>r?new Map(r.nodes.map(e=>[e.id,e])):new Map,[r]),k=(0,W.useCallback)(e=>{if(!r)return;let t=O.get(e);t&&(i(t),c())},[r,O,i,c]),ee=(0,W.useCallback)(e=>{if(!e||!r){w(null);return}let t=O.get(e);w(t?t.properties.name:null)},[r,O]),A=(0,W.useCallback)(()=>{i(null)},[i]),j=(0,W.useCallback)(()=>{h&&(_(),v(),y(),i(null),oe(null)),g()},[h,_,v,y,i,g]),{containerRef:M,sigmaRef:N,setGraph:P,zoomIn:te,zoomOut:ne,resetZoom:F,focusNode:I,isLayoutRunning:L,startLayout:re,stopLayout:ie,selectedNode:ae,setSelectedNode:oe}=yf({onNodeClick:k,onNodeHover:ee,onStageClick:A,highlightedNodeIds:T,blastRadiusNodeIds:E,animatedNodes:D,visibleEdgeTypes:s,layoutMode:x}),R=(0,W.useCallback)(e=>{e!==x&&(i(null),oe(null),w(null),S(e),F())},[x,F,S,i,oe]);(0,W.useImperativeHandle)(t,()=>({focusNode:e=>{if(r){let t=O.get(e);t&&(i(t),c())}I(e)}}),[I,r,O,i,c]),(0,W.useEffect)(()=>{if(!r)return;let e;if(x===`tree`)e=ap(r);else if(x===`circles`)e=op(r);else{let t=new Map;r.relationships.forEach(e=>{if(e.type===`MEMBER_OF`){let n=O.get(e.targetId);if(n&&n.label===`Community`){let n=e.targetId.replace(`comm_`,``),r=/^\d+$/.test(n)?parseInt(n,10):0;t.set(e.sourceId,r)}}}),e=ip(r,t)}P(e)},[r,O,P,x]),(0,W.useEffect)(()=>{let e=N.current;if(!e)return;let t=e.getGraph();t.order!==0&&(lp(t,a?.id||null,l,o),e.refresh())},[r,x,o,l,a]),(0,W.useEffect)(()=>{oe(a?a.id:null)},[a,oe]);let z=(0,W.useCallback)(()=>{a&&I(a.id)},[a,I]),B=(0,W.useCallback)(()=>{i(null),oe(null),F()},[i,oe,F]);return(0,G.jsxs)(`div`,{className:`relative h-full w-full bg-void`,children:[(0,G.jsx)(`div`,{className:`pointer-events-none absolute inset-0`,children:(0,G.jsx)(`div`,{className:`absolute inset-0`,style:{background:`
512
512
  radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.03) 0%, transparent 70%),
513
513
  linear-gradient(to bottom, #06060a, #0a0a10)
514
- `}})}),(0,G.jsxs)(`div`,{role:`tablist`,"aria-label":n(`canvas.viewModes.label`),className:`absolute top-4 left-1/2 z-20 flex -translate-x-1/2 gap-1 rounded-lg border border-border-subtle bg-elevated/90 p-1 backdrop-blur-sm`,children:[(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":x===`force`,onClick:()=>R(`force`),className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all ${x===`force`?`bg-accent text-white`:`text-text-secondary hover:bg-hover hover:text-text-primary`}`,children:[(0,G.jsx)(aa,{className:`h-3.5 w-3.5`}),n(`canvas.viewModes.force`)]}),(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":x===`tree`,onClick:()=>R(`tree`),className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all ${x===`tree`?`bg-accent text-white`:`text-text-secondary hover:bg-hover hover:text-text-primary`}`,children:[(0,G.jsx)(Ki,{className:`h-3.5 w-3.5`}),n(`canvas.viewModes.tree`)]}),(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":x===`circles`,onClick:()=>R(`circles`),className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all ${x===`circles`?`bg-accent text-white`:`text-text-secondary hover:bg-hover hover:text-text-primary`}`,children:[(0,G.jsx)(wa,{className:`h-3.5 w-3.5`}),n(`canvas.viewModes.circles`)]})]}),(0,G.jsx)(`div`,{ref:M,className:`sigma-container h-full w-full cursor-grab active:cursor-grabbing`}),C&&!ae&&(0,G.jsx)(`div`,{className:`pointer-events-none absolute top-4 left-1/2 z-20 -translate-x-1/2 animate-fade-in rounded-lg border border-border-subtle bg-elevated/95 px-3 py-1.5 backdrop-blur-sm`,children:(0,G.jsx)(`span`,{className:`font-mono text-sm text-text-primary`,children:C})}),ae&&a&&(0,G.jsxs)(`div`,{className:`absolute top-4 left-1/2 z-20 flex -translate-x-1/2 animate-slide-up items-center gap-2 rounded-xl border border-accent/30 bg-accent/20 px-4 py-2 backdrop-blur-sm`,children:[(0,G.jsx)(`div`,{className:`h-2 w-2 animate-pulse rounded-full bg-accent`}),(0,G.jsx)(`span`,{className:`font-mono text-sm text-text-primary`,children:a.properties.name}),(0,G.jsxs)(`span`,{className:`text-xs text-text-muted`,children:[`(`,a.label,`)`]}),(0,G.jsx)(`button`,{onClick:B,className:`ml-2 rounded px-2 py-0.5 text-xs text-text-secondary transition-colors hover:bg-white/10 hover:text-text-primary`,children:n(`canvas.clear`)})]}),(0,G.jsxs)(`div`,{className:`absolute right-4 bottom-4 z-10 flex flex-col gap-1`,children:[(0,G.jsx)(`button`,{onClick:te,className:`flex h-9 w-9 items-center justify-center rounded-md border border-border-subtle bg-elevated text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,title:n(`canvas.zoomIn`),children:(0,G.jsx)(Na,{className:`h-4 w-4`})}),(0,G.jsx)(`button`,{onClick:ne,className:`flex h-9 w-9 items-center justify-center rounded-md border border-border-subtle bg-elevated text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,title:n(`canvas.zoomOut`),children:(0,G.jsx)(Pa,{className:`h-4 w-4`})}),(0,G.jsx)(`button`,{onClick:F,className:`flex h-9 w-9 items-center justify-center rounded-md border border-border-subtle bg-elevated text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,title:n(`canvas.fit`),children:(0,G.jsx)(ra,{className:`h-4 w-4`})}),(0,G.jsx)(`div`,{className:`my-1 h-px bg-border-subtle`}),a&&(0,G.jsx)(`button`,{onClick:z,className:`flex h-9 w-9 items-center justify-center rounded-md border border-accent/30 bg-accent/20 text-accent transition-colors hover:bg-accent/30`,title:n(`canvas.focusSelected`),children:(0,G.jsx)(Hi,{className:`h-4 w-4`})}),ae&&(0,G.jsx)(`button`,{onClick:B,className:`flex h-9 w-9 items-center justify-center rounded-md border border-border-subtle bg-elevated text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,title:n(`canvas.clearSelection`),children:(0,G.jsx)(pa,{className:`h-4 w-4`})}),(0,G.jsx)(`div`,{className:`my-1 h-px bg-border-subtle`}),(0,G.jsx)(`button`,{onClick:L?ie:re,className:`flex h-9 w-9 items-center justify-center rounded-md border transition-all ${L?`animate-pulse border-accent bg-accent text-white shadow-glow`:`border-border-subtle bg-elevated text-text-secondary hover:bg-hover hover:text-text-primary`} `,title:n(L?`canvas.stopLayout`:`canvas.runLayout`),children:L?(0,G.jsx)(la,{className:`h-4 w-4`}):(0,G.jsx)(ua,{className:`h-4 w-4`})})]}),L&&(0,G.jsxs)(`div`,{className:`absolute bottom-4 left-1/2 z-10 flex -translate-x-1/2 animate-fade-in items-center gap-2 rounded-full border border-emerald-500/30 bg-emerald-500/20 px-3 py-1.5 backdrop-blur-sm`,children:[(0,G.jsx)(`div`,{className:`h-2 w-2 animate-ping rounded-full bg-emerald-400`}),(0,G.jsx)(`span`,{className:`text-xs font-medium text-emerald-400`,children:n(`canvas.layoutOptimizing`)})]}),(0,G.jsx)(dp,{}),(0,G.jsx)(`div`,{className:`absolute top-4 right-4 z-20`,children:(0,G.jsx)(`button`,{onClick:j,className:h?`flex h-10 w-10 items-center justify-center rounded-lg border border-cyan-400/40 bg-cyan-500/15 text-cyan-200 transition-colors hover:border-cyan-300/60 hover:bg-cyan-500/20`:`flex h-10 w-10 items-center justify-center rounded-lg border border-border-subtle bg-elevated text-text-muted transition-colors hover:bg-hover hover:text-text-primary`,title:n(h?`canvas.turnOffHighlights`:`canvas.turnOnHighlights`),"data-testid":`ai-highlights-toggle`,children:h?(0,G.jsx)(ea,{className:`h-4 w-4`}):(0,G.jsx)($i,{className:`h-4 w-4`})})})]})});fp.displayName=`GraphCanvas`;var pp=100,mp=5;function hp(e,t){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}function gp(e,t,n=pp){let r=(0,W.useRef)(null),i=(0,W.useRef)(null),[a,o]=(0,W.useState)(!0),s=(0,W.useRef)(!0),c=(0,W.useRef)(0),l=(0,W.useRef)(null),u=(0,W.useCallback)(()=>{let e=r.current;if(!e)return;let t=e.scrollTop,i=hp(e,n);i?s.current=!0:t<c.current-mp&&(s.current=!1),c.current=t,o(i)},[n]),d=(0,W.useCallback)((e=`smooth`)=>{let t=r.current;if(t){if(s.current=!0,e===`auto`){t.scrollTop=t.scrollHeight,c.current=t.scrollTop,o(hp(t,n));return}t.scrollTo({top:t.scrollHeight,behavior:e})}},[n]);return(0,W.useEffect)(()=>{let e=r.current;if(!e)return;c.current=e.scrollTop;let t=()=>{l.current!==null&&cancelAnimationFrame(l.current),l.current=requestAnimationFrame(()=>{l.current=null,u()})};return e.addEventListener(`scroll`,t,{passive:!0}),u(),()=>{e.removeEventListener(`scroll`,t),l.current!==null&&(cancelAnimationFrame(l.current),l.current=null)}},[u]),(0,W.useEffect)(()=>{let e=i.current,t=r.current;if(!e||!t||typeof ResizeObserver>`u`)return;let n=null,a=new ResizeObserver(()=>{s.current?(n!==null&&cancelAnimationFrame(n),n=requestAnimationFrame(()=>{n=null,d(`auto`)})):u()});return a.observe(e),()=>{a.disconnect(),n!==null&&(cancelAnimationFrame(n),n=null)}},[e.length,d,u]),(0,W.useLayoutEffect)(()=>{s.current&&d(`auto`)},[e.length,t,d]),{scrollContainerRef:r,messagesContainerRef:i,isAtBottom:a,scrollToBottom:d}}var _p=(e,t)=>{if(!e||Object.keys(e).length===0)return``;if(`cypher`in e&&typeof e.cypher==`string`){let n=``;return`query`in e&&typeof e.query==`string`&&(n+=t(`graph:toolCall.searchPrefix`,{query:e.query})+`
514
+ `}})}),(0,G.jsxs)(`div`,{role:`tablist`,"aria-label":n(`canvas.viewModes.label`),className:`absolute top-4 left-1/2 z-20 flex -translate-x-1/2 gap-1 rounded-lg border border-border-subtle bg-elevated/90 p-1 backdrop-blur-sm`,children:[(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":x===`force`,onClick:()=>R(`force`),className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all ${x===`force`?`bg-accent text-white`:`text-text-secondary hover:bg-hover hover:text-text-primary`}`,children:[(0,G.jsx)(aa,{className:`h-3.5 w-3.5`}),n(`canvas.viewModes.force`)]}),(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":x===`tree`,onClick:()=>R(`tree`),className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all ${x===`tree`?`bg-accent text-white`:`text-text-secondary hover:bg-hover hover:text-text-primary`}`,children:[(0,G.jsx)(Ki,{className:`h-3.5 w-3.5`}),n(`canvas.viewModes.tree`)]}),(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":x===`circles`,onClick:()=>R(`circles`),className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all ${x===`circles`?`bg-accent text-white`:`text-text-secondary hover:bg-hover hover:text-text-primary`}`,children:[(0,G.jsx)(wa,{className:`h-3.5 w-3.5`}),n(`canvas.viewModes.circles`)]})]}),(0,G.jsx)(`div`,{ref:M,className:`sigma-container h-full w-full cursor-grab active:cursor-grabbing`}),C&&!ae&&(0,G.jsx)(`div`,{className:`pointer-events-none absolute top-4 left-1/2 z-20 -translate-x-1/2 animate-fade-in rounded-lg border border-border-subtle bg-elevated/95 px-3 py-1.5 backdrop-blur-sm`,children:(0,G.jsx)(`span`,{className:`font-mono text-sm text-text-primary`,children:C})}),ae&&a&&(0,G.jsxs)(`div`,{className:`absolute top-4 left-1/2 z-20 flex -translate-x-1/2 animate-slide-up items-center gap-2 rounded-xl border border-accent/30 bg-accent/20 px-4 py-2 backdrop-blur-sm`,children:[(0,G.jsx)(`div`,{className:`h-2 w-2 animate-pulse rounded-full bg-accent`}),(0,G.jsx)(`span`,{className:`font-mono text-sm text-text-primary`,children:a.properties.name}),(0,G.jsxs)(`span`,{className:`text-xs text-text-muted`,children:[`(`,a.label,`)`]}),(0,G.jsx)(`button`,{onClick:B,className:`ml-2 rounded px-2 py-0.5 text-xs text-text-secondary transition-colors hover:bg-white/10 hover:text-text-primary`,children:n(`canvas.clear`)})]}),(0,G.jsxs)(`div`,{className:`absolute right-4 bottom-4 z-10 flex flex-col gap-1`,children:[(0,G.jsx)(`button`,{onClick:te,className:`flex h-9 w-9 items-center justify-center rounded-md border border-border-subtle bg-elevated text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,title:n(`canvas.zoomIn`),children:(0,G.jsx)(Pa,{className:`h-4 w-4`})}),(0,G.jsx)(`button`,{onClick:ne,className:`flex h-9 w-9 items-center justify-center rounded-md border border-border-subtle bg-elevated text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,title:n(`canvas.zoomOut`),children:(0,G.jsx)(Na,{className:`h-4 w-4`})}),(0,G.jsx)(`button`,{onClick:F,className:`flex h-9 w-9 items-center justify-center rounded-md border border-border-subtle bg-elevated text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,title:n(`canvas.fit`),children:(0,G.jsx)(ra,{className:`h-4 w-4`})}),(0,G.jsx)(`div`,{className:`my-1 h-px bg-border-subtle`}),a&&(0,G.jsx)(`button`,{onClick:z,className:`flex h-9 w-9 items-center justify-center rounded-md border border-accent/30 bg-accent/20 text-accent transition-colors hover:bg-accent/30`,title:n(`canvas.focusSelected`),children:(0,G.jsx)(Hi,{className:`h-4 w-4`})}),ae&&(0,G.jsx)(`button`,{onClick:B,className:`flex h-9 w-9 items-center justify-center rounded-md border border-border-subtle bg-elevated text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,title:n(`canvas.clearSelection`),children:(0,G.jsx)(pa,{className:`h-4 w-4`})}),(0,G.jsx)(`div`,{className:`my-1 h-px bg-border-subtle`}),(0,G.jsx)(`button`,{onClick:L?ie:re,className:`flex h-9 w-9 items-center justify-center rounded-md border transition-all ${L?`animate-pulse border-accent bg-accent text-white shadow-glow`:`border-border-subtle bg-elevated text-text-secondary hover:bg-hover hover:text-text-primary`} `,title:n(L?`canvas.stopLayout`:`canvas.runLayout`),children:L?(0,G.jsx)(la,{className:`h-4 w-4`}):(0,G.jsx)(ua,{className:`h-4 w-4`})})]}),L&&(0,G.jsxs)(`div`,{className:`absolute bottom-4 left-1/2 z-10 flex -translate-x-1/2 animate-fade-in items-center gap-2 rounded-full border border-emerald-500/30 bg-emerald-500/20 px-3 py-1.5 backdrop-blur-sm`,children:[(0,G.jsx)(`div`,{className:`h-2 w-2 animate-ping rounded-full bg-emerald-400`}),(0,G.jsx)(`span`,{className:`text-xs font-medium text-emerald-400`,children:n(`canvas.layoutOptimizing`)})]}),(0,G.jsx)(dp,{}),(0,G.jsx)(`div`,{className:`absolute top-4 right-4 z-20`,children:(0,G.jsx)(`button`,{onClick:j,className:h?`flex h-10 w-10 items-center justify-center rounded-lg border border-cyan-400/40 bg-cyan-500/15 text-cyan-200 transition-colors hover:border-cyan-300/60 hover:bg-cyan-500/20`:`flex h-10 w-10 items-center justify-center rounded-lg border border-border-subtle bg-elevated text-text-muted transition-colors hover:bg-hover hover:text-text-primary`,title:n(h?`canvas.turnOffHighlights`:`canvas.turnOnHighlights`),"data-testid":`ai-highlights-toggle`,children:h?(0,G.jsx)(ea,{className:`h-4 w-4`}):(0,G.jsx)($i,{className:`h-4 w-4`})})})]})});fp.displayName=`GraphCanvas`;var pp=100,mp=5;function hp(e,t){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}function gp(e,t,n=pp){let r=(0,W.useRef)(null),i=(0,W.useRef)(null),[a,o]=(0,W.useState)(!0),s=(0,W.useRef)(!0),c=(0,W.useRef)(0),l=(0,W.useRef)(null),u=(0,W.useCallback)(()=>{let e=r.current;if(!e)return;let t=e.scrollTop,i=hp(e,n);i?s.current=!0:t<c.current-mp&&(s.current=!1),c.current=t,o(i)},[n]),d=(0,W.useCallback)((e=`smooth`)=>{let t=r.current;if(t){if(s.current=!0,e===`auto`){t.scrollTop=t.scrollHeight,c.current=t.scrollTop,o(hp(t,n));return}t.scrollTo({top:t.scrollHeight,behavior:e})}},[n]);return(0,W.useEffect)(()=>{let e=r.current;if(!e)return;c.current=e.scrollTop;let t=()=>{l.current!==null&&cancelAnimationFrame(l.current),l.current=requestAnimationFrame(()=>{l.current=null,u()})};return e.addEventListener(`scroll`,t,{passive:!0}),u(),()=>{e.removeEventListener(`scroll`,t),l.current!==null&&(cancelAnimationFrame(l.current),l.current=null)}},[u]),(0,W.useEffect)(()=>{let e=i.current,t=r.current;if(!e||!t||typeof ResizeObserver>`u`)return;let n=null,a=new ResizeObserver(()=>{s.current?(n!==null&&cancelAnimationFrame(n),n=requestAnimationFrame(()=>{n=null,d(`auto`)})):u()});return a.observe(e),()=>{a.disconnect(),n!==null&&(cancelAnimationFrame(n),n=null)}},[e.length,d,u]),(0,W.useLayoutEffect)(()=>{s.current&&d(`auto`)},[e.length,t,d]),{scrollContainerRef:r,messagesContainerRef:i,isAtBottom:a,scrollToBottom:d}}var _p=(e,t)=>{if(!e||Object.keys(e).length===0)return``;if(`cypher`in e&&typeof e.cypher==`string`){let n=``;return`query`in e&&typeof e.query==`string`&&(n+=t(`graph:toolCall.searchPrefix`,{query:e.query})+`
515
515
 
516
516
  `),n+=e.cypher,n}return`query`in e&&typeof e.query==`string`?e.query:JSON.stringify(e,null,2)},vp=e=>{switch(e){case`running`:return{icon:(0,G.jsx)(na,{className:`h-3.5 w-3.5 animate-spin`}),color:`text-amber-400`,bgColor:`bg-amber-500/10`,borderColor:`border-amber-500/30`};case`completed`:return{icon:(0,G.jsx)(ji,{className:`h-3.5 w-3.5`}),color:`text-emerald-400`,bgColor:`bg-emerald-500/10`,borderColor:`border-emerald-500/30`};case`error`:return{icon:(0,G.jsx)(Fi,{className:`h-3.5 w-3.5`}),color:`text-rose-400`,bgColor:`bg-rose-500/10`,borderColor:`border-rose-500/30`};case`stopped`:return{icon:(0,G.jsx)(xa,{className:`h-3.5 w-3.5 fill-current`}),color:`text-amber-300`,bgColor:`bg-amber-500/10`,borderColor:`border-amber-500/30`};default:return{icon:(0,G.jsx)(ba,{className:`h-3.5 w-3.5`}),color:`text-text-muted`,bgColor:`bg-surface`,borderColor:`border-border-subtle`}}},yp=(e,t)=>({search:t(`graph:toolCall.tools.search`),cypher:t(`graph:toolCall.tools.cypher`),grep:t(`graph:toolCall.tools.grep`),read:t(`graph:toolCall.tools.read`),overview:t(`graph:toolCall.tools.overview`),explore:t(`graph:toolCall.tools.explore`),impact:t(`graph:toolCall.tools.impact`)})[e]||e,bp=({toolCall:e,defaultExpanded:t=!1})=>{let{t:n}=Nr([`common`,`graph`]),[r,i]=(0,W.useState)(t),a=vp(e.status),o=_p(e.args,n);return(0,G.jsxs)(`div`,{className:`rounded-lg border ${a.borderColor} ${a.bgColor} overflow-hidden transition-all`,children:[(0,G.jsxs)(`div`,{role:`button`,tabIndex:0,onClick:()=>i(!r),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i(!r))},className:`flex w-full cursor-pointer items-center gap-2 px-3 py-2 text-left transition-colors select-none hover:bg-white/5`,children:[(0,G.jsx)(`span`,{className:`text-text-muted`,children:r?(0,G.jsx)(Mi,{className:`h-4 w-4`}):(0,G.jsx)(Ni,{className:`h-4 w-4`})}),(0,G.jsx)(`span`,{className:`flex-1 text-sm font-medium text-text-primary`,children:yp(e.name,n)}),(0,G.jsxs)(`span`,{className:`flex items-center gap-1 text-xs ${a.color}`,children:[a.icon,(0,G.jsx)(`span`,{className:`capitalize`,children:n(`graph:toolCall.status.${e.status}`)})]})]}),r&&(0,G.jsxs)(`div`,{className:`border-t border-border-subtle/50`,children:[o&&(0,G.jsxs)(`div`,{className:`border-b border-border-subtle/50 px-3 py-2`,children:[(0,G.jsx)(`div`,{className:`mb-1.5 text-[10px] tracking-wider text-text-muted uppercase`,children:e.name===`cypher`?n(`graph:toolCall.query`):n(`graph:toolCall.input`)}),(0,G.jsx)(`pre`,{className:`overflow-x-auto rounded bg-surface/50 p-2 font-mono text-xs whitespace-pre-wrap text-text-secondary`,children:o})]}),e.result&&(0,G.jsxs)(`div`,{className:`px-3 py-2`,children:[(0,G.jsx)(`div`,{className:`mb-1.5 text-[10px] tracking-wider text-text-muted uppercase`,children:n(`graph:toolCall.result`)}),(0,G.jsx)(`div`,{className:`max-h-[400px] overflow-y-auto rounded bg-surface/50`,children:(0,G.jsx)(`pre`,{className:`p-2 font-mono text-xs whitespace-pre-wrap text-text-secondary`,children:e.result.length>3e3?e.result.slice(0,3e3)+`
517
517
 
@@ -582,16 +582,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
582
582
  `+e.slice(i,a),i=a+1),o=s;return c+=`
583
583
  `,e.length-i>t&&o>i?c+=e.slice(i,o)+`
584
584
  `+e.slice(o+1):c+=e.slice(i),c.slice(1)}j(RN,`foldLine`);function zN(e){for(var t=``,n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=EN(e,i),r=lN[n],!r&&xN(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||pN(n);return t}j(zN,`escapeString`);function BN(e,t,n){var r=``,i=e.tag,a,o,s;for(a=0,o=n.length;a<o;a+=1)s=n[a],e.replacer&&(s=e.replacer.call(n,String(a),s)),(GN(e,t,s,!1,!1)||typeof s>`u`&&GN(e,t,null,!1,!1))&&(r!==``&&(r+=`,`+(e.condenseFlow?``:` `)),r+=e.dump);e.tag=i,e.dump=`[`+r+`]`}j(BN,`writeFlowSequence`);function VN(e,t,n,r){var i=``,a=e.tag,o,s,c;for(o=0,s=n.length;o<s;o+=1)c=n[o],e.replacer&&(c=e.replacer.call(n,String(o),c)),(GN(e,t+1,c,!0,!0,!1,!0)||typeof c>`u`&&GN(e,t+1,null,!0,!0,!1,!0))&&((!r||i!==``)&&(i+=vN(e,t)),e.dump&&BM===e.dump.charCodeAt(0)?i+=`-`:i+=`- `,i+=e.dump);e.tag=a,e.dump=i||`[]`}j(VN,`writeBlockSequence`);function HN(e,t,n){var r=``,i=e.tag,a=Object.keys(n),o,s,c,l,u;for(o=0,s=a.length;o<s;o+=1)u=``,r!==``&&(u+=`, `),e.condenseFlow&&(u+=`"`),c=a[o],l=n[c],e.replacer&&(l=e.replacer.call(n,c,l)),GN(e,t,c,!1,!1)&&(e.dump.length>1024&&(u+=`? `),u+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),GN(e,t,l,!1,!1)&&(u+=e.dump,r+=u));e.tag=i,e.dump=`{`+r+`}`}j(HN,`writeFlowMapping`);function UN(e,t,n,r){var i=``,a=e.tag,o=Object.keys(n),s,c,l,u,d,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys==`function`)o.sort(e.sortKeys);else if(e.sortKeys)throw new CA(`sortKeys must be a boolean or a function`);for(s=0,c=o.length;s<c;s+=1)f=``,(!r||i!==``)&&(f+=vN(e,t)),l=o[s],u=n[l],e.replacer&&(u=e.replacer.call(n,l,u)),GN(e,t+1,l,!0,!0,!0)&&(d=e.tag!==null&&e.tag!==`?`||e.dump&&e.dump.length>1024,d&&(e.dump&&BM===e.dump.charCodeAt(0)?f+=`?`:f+=`? `),f+=e.dump,d&&(f+=vN(e,t)),GN(e,t+1,u,!0,d)&&(e.dump&&BM===e.dump.charCodeAt(0)?f+=`:`:f+=`: `,f+=e.dump,i+=f));e.tag=a,e.dump=i||`{}`}j(UN,`writeBlockMapping`);function WN(e,t,n){var r,i,a,o,s,c;for(i=n?e.explicitTypes:e.implicitTypes,a=0,o=i.length;a<o;a+=1)if(s=i[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t==`object`&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(n?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag=`?`,s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,IM.call(s.represent)===`[object Function]`)r=s.represent(t,c);else if(LM.call(s.represent,c))r=s.represent[c](t,c);else throw new CA(`!<`+s.tag+`> tag resolver accepts not "`+c+`" style`);e.dump=r}return!0}return!1}j(WN,`detectType`);function GN(e,t,n,r,i,a,o){e.tag=null,e.dump=n,WN(e,n,!1)||WN(e,n,!0);var s=IM.call(e.dump),c=r,l;r&&=e.flowLevel<0||e.flowLevel>t;var u=s===`[object Object]`||s===`[object Array]`,d,f;if(u&&(d=e.duplicates.indexOf(n),f=d!==-1),(e.tag!==null&&e.tag!==`?`||f||e.indent!==2&&t>0)&&(i=!1),f&&e.usedDuplicates[d])e.dump=`*ref_`+d;else{if(u&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),s===`[object Object]`)r&&Object.keys(e.dump).length!==0?(UN(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(HN(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object Array]`)r&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?VN(e,t-1,e.dump,i):VN(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(BN(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object String]`)e.tag!==`?`&&PN(e,e.dump,t,a,c);else{if(s===`[object Undefined]`||e.skipInvalid)return!1;throw new CA(`unacceptable kind of an object to dump `+s)}e.tag!==null&&e.tag!==`?`&&(l=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`),l=e.tag[0]===`!`?`!`+l:l.slice(0,18)===`tag:yaml.org,2002:`?`!!`+l.slice(18):`!<`+l+`>`,e.dump=l+` `+e.dump)}return!0}j(GN,`writeNode`);function KN(e,t){var n=[],r=[],i,a;for(qN(e,n,r),i=0,a=r.length;i<a;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=Array(a)}j(KN,`getDuplicateReferences`);function qN(e,t,n){var r,i,a;if(typeof e==`object`&&e)if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)qN(e[i],t,n);else for(r=Object.keys(e),i=0,a=r.length;i<a;i+=1)qN(e[r[i]],t,n)}j(qN,`inspectNode`);function JN(e,t){t||={};var n=new gN(t);n.noRefs||KN(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},``,r)),GN(n,0,r,!0,!0)?n.dump+`
585
- `:``}j(JN,`dump$1`);var YN={dump:JN};function XN(e,t){return function(){throw Error(`Function yaml.`+e+` is removed in js-yaml 4. Use yaml.`+t+` instead, which is now safe by default.`)}}j(XN,`renamed`);var ZN=aj,QN=FM.load;FM.loadAll,YN.dump;var $N={common:E,getConfig:y,insertCluster:z,insertEdge:ce,insertEdgeLabel:U,insertMarkers:V,insertNode:B,interpolateToCurve:ae,labelHelper:se,log:P,positionEdgeLabel:H},eP={},tP=j(e=>{for(let t of e)eP[t.name]=t},`registerLayoutLoaders`);j(()=>{tP([{name:`dagre`,loader:j(async()=>await w(()=>import(`./dagre-ND4H6XIP-DsIr9MOv.js`),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])),`loader`)},{name:`cose-bilkent`,loader:j(async()=>await w(()=>import(`./cose-bilkent-UX7MHV2Q-BHv2bbtl.js`),__vite__mapDeps([18,19,6,5])),`loader`)}])},`registerDefaultLayoutLoaders`)();var nP=j(async(e,t)=>{if(!(e.layoutAlgorithm in eP))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=eP[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,$N,{algorithm:n.algorithm})},`render`),rP=j((e=``,{fallback:t=`dagre`}={})=>{if(e in eP)return e;if(t in eP)return P.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`),iP={id:`c4`,detector:j(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./c4Diagram-Y2BXMSZH-DIzEXalR.js`);return{diagram:e}},__vite__mapDeps([20,4,5,6,12,21,11]));return{id:`c4`,diagram:e}},`loader`)},aP=`flowchart`,oP={id:aP,detector:j((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./flowDiagram-H6V6AXG4-YACVtF3-.js`);return{diagram:e}},__vite__mapDeps([22,4,5,6,7,8,23,9,10,11,12,13,14,15,24,21,25]));return{id:aP,diagram:e}},`loader`)},sP=`flowchart-v2`,cP={id:sP,detector:j((e,t)=>t?.flowchart?.defaultRenderer===`dagre-d3`?!1:(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./flowDiagram-H6V6AXG4-YACVtF3-.js`);return{diagram:e}},__vite__mapDeps([22,4,5,6,7,8,23,9,10,11,12,13,14,15,24,21,25]));return{id:sP,diagram:e}},`loader`)},lP={id:`er`,detector:j(e=>/^\s*erDiagram/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./erDiagram-L5TCEMPS-bN3wlP2A.js`);return{diagram:e}},__vite__mapDeps([26,4,5,6,7,8,23,9,10,11,12,13,14,15,25]));return{id:`er`,diagram:e}},`loader`)},uP=`gitGraph`,dP={id:uP,detector:j(e=>/^\s*gitGraph/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-S2ZK5IYY-CCwVLT__.js`);return{diagram:e}},__vite__mapDeps([27,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,39,40,41]));return{id:uP,diagram:e}},`loader`)},fP=`gantt`,pP={id:fP,detector:j(e=>/^\s*gantt/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./ganttDiagram-JCBTUEKG-BHQssTz6.js`);return{diagram:e}},__vite__mapDeps([42,4,5,6,12,11]));return{id:fP,diagram:e}},`loader`)},mP=`info`,hP={id:mP,detector:j(e=>/^\s*info/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./infoDiagram-3YFTVSEB-BWBzD28-.js`);return{diagram:e}},__vite__mapDeps([43,4,5,6,28,29,30,31,32,33,35,36,37,38,40,41]));return{id:mP,diagram:e}},`loader`)},gP={id:`pie`,detector:j(e=>/^\s*pie/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./pieDiagram-CU6KROY3-DEd2a_k_.js`);return{diagram:e}},__vite__mapDeps([44,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,40,41]));return{id:`pie`,diagram:e}},`loader`)},_P=`quadrantChart`,vP={id:_P,detector:j(e=>/^\s*quadrantChart/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./quadrantDiagram-VICAPDV7-bAm6Hi_5.js`);return{diagram:e}},__vite__mapDeps([45,4,5,6]));return{id:_P,diagram:e}},`loader`)},yP=`xychart`,bP={id:yP,detector:j(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./xychartDiagram-N2JHSOCM-lBI9O6DW.js`);return{diagram:e}},__vite__mapDeps([46,4,5,6,10,11,12]));return{id:yP,diagram:e}},`loader`)},xP=`requirement`,SP={id:xP,detector:j(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./requirementDiagram-JXO7QTGE-QNeTo5C_.js`);return{diagram:e}},__vite__mapDeps([47,4,5,6,7,8,23,9,10,11,12,13,14,15,25]));return{id:xP,diagram:e}},`loader`)},CP=`sequence`,wP={id:CP,detector:j(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./sequenceDiagram-VS2MUI6T-BHC7q7yJ.js`);return{diagram:e}},__vite__mapDeps([48,4,5,6,12,21,11,39]));return{id:CP,diagram:e}},`loader`)},TP=`class`,EP={id:TP,detector:j((e,t)=>t?.class?.defaultRenderer===`dagre-wrapper`?!1:/^\s*classDiagram/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./classDiagram-KGZ6W3CR-BqpOj8L9.js`);return{diagram:e}},__vite__mapDeps([49,4,5,6,7,8,23,9,10,11,12,13,14,15,24,21,50,25]));return{id:TP,diagram:e}},`loader`)},DP=`classDiagram`,OP={id:DP,detector:j((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./classDiagram-v2-72OJOZXJ-FmElywK2.js`);return{diagram:e}},__vite__mapDeps([51,4,5,6,7,8,23,9,10,11,12,13,14,15,24,21,50,25]));return{id:DP,diagram:e}},`loader`)},kP=`state`,AP={id:kP,detector:j((e,t)=>t?.state?.defaultRenderer===`dagre-wrapper`?!1:/^\s*stateDiagram/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./stateDiagram-7D4R322I-KONnc2Px.js`);return{diagram:e}},__vite__mapDeps([52,4,5,6,7,8,23,9,10,11,12,13,14,15,16,17,53,25]));return{id:kP,diagram:e}},`loader`)},jP=`stateDiagram`,MP={id:jP,detector:j((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-36443NZ5-C2QfuMlu.js`);return{diagram:e}},__vite__mapDeps([54,4,5,6,7,8,23,9,10,11,12,13,14,15,53,25]));return{id:jP,diagram:e}},`loader`)},NP=`journey`,PP={id:NP,detector:j(e=>/^\s*journey/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./journeyDiagram-M6C3CM3L-DNPYCpvq.js`);return{diagram:e}},__vite__mapDeps([55,4,5,6,24,12,21]));return{id:NP,diagram:e}},`loader`)},FP={draw:j((e,t,n)=>{P.debug(`rendering svg for syntax error
586
- `);let r=pA(t),i=r.append(`g`);r.attr(`viewBox`,`0 0 2412 512`),o(r,100,512,!0),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},IP=FP,LP={db:{},renderer:FP,parser:{parse:j(()=>{},`parse`)}},RP=`flowchart-elk`,zP={id:RP,detector:j((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./flowDiagram-H6V6AXG4-YACVtF3-.js`);return{diagram:e}},__vite__mapDeps([22,4,5,6,7,8,23,9,10,11,12,13,14,15,24,21,25]));return{id:RP,diagram:e}},`loader`)},BP=`timeline`,VP={id:BP,detector:j(e=>/^\s*timeline/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./timeline-definition-O6YCAMPW-D4t4NJx1.js`);return{diagram:e}},__vite__mapDeps([56,4,5,6,12,11]));return{id:BP,diagram:e}},`loader`)},HP=`mindmap`,UP={id:HP,detector:j(e=>/^\s*mindmap/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./mindmap-definition-2TDM6QVE-CdLLN_so.js`);return{diagram:e}},__vite__mapDeps([57,4,5,6,7,8,23,9,10,11,12,13,14,15,25]));return{id:HP,diagram:e}},`loader`)},WP=`kanban`,GP={id:WP,detector:j(e=>/^\s*kanban/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./kanban-definition-75IXJCU3-BeoPr5Tl.js`);return{diagram:e}},__vite__mapDeps([58,4,5,6,7,24,10,11,12,13,14,15]));return{id:WP,diagram:e}},`loader`)},KP=`sankey`,qP={id:KP,detector:j(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./sankeyDiagram-URQDO5SZ-LFJz53u5.js`);return{diagram:e}},__vite__mapDeps([59,4,5,6]));return{id:KP,diagram:e}},`loader`)},JP=`packet`,YP={id:JP,detector:j(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./diagram-QXG6HAR7-DYeQHxGU.js`);return{diagram:e}},__vite__mapDeps([60,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,40,41]));return{id:JP,diagram:e}},`loader`)},XP=`radar`,ZP={id:XP,detector:j(e=>/^\s*radar-beta/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./diagram-3NCE3AQN-BWtJXMDq.js`);return{diagram:e}},__vite__mapDeps([61,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,40,41]));return{id:XP,diagram:e}},`loader`)},QP=`block`,$P={id:QP,detector:j(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./blockDiagram-7IZFK4PR-B4niSLvR.js`);return{diagram:e}},__vite__mapDeps([62,4,5,6,8,24,10,11,12,15,17]));return{id:QP,diagram:e}},`loader`)},eF=`treeView`,tF={id:eF,detector:j(e=>/^\s*treeView-beta/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./diagram-WEQXMOUZ-DYGU4T0y.js`);return{diagram:e}},__vite__mapDeps([63,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,39,40,41]));return{id:eF,diagram:e}},`loader`)},nF=`architecture`,rF={id:nF,detector:j(e=>/^\s*architecture/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./architectureDiagram-UL44E2DR-B1oYB8-c.js`);return{diagram:e}},__vite__mapDeps([64,4,5,6,28,29,30,19,31,32,10,11,12,33,34,35,36,37,38,40,41]));return{id:nF,diagram:e}},`loader`)},iF=`eventmodeling`,aF={id:iF,detector:j(e=>/^\s*eventmodeling/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./diagram-HNR7UZ2L-fUWreZzx.js`);return{diagram:e}},__vite__mapDeps([65,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,40,41]));return{id:iF,diagram:e}},`loader`)},oF=`ishikawa`,sF={id:oF,detector:j(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-BNXS4ZKH-B8qYT-j9.js`);return{diagram:e}},__vite__mapDeps([66,4,5,6,7,12,11]));return{id:oF,diagram:e}},`loader`)},cF=`venn`,lF={id:cF,detector:j(e=>/^\s*venn-beta/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./vennDiagram-MWXL3ELB-6bctC9Yg.js`);return{diagram:e}},__vite__mapDeps([67,4,5,6,7,12,11]));return{id:cF,diagram:e}},`loader`)},uF=`treemap`,dF={id:uF,detector:j(e=>/^\s*treemap/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./diagram-GF46GFSD-Hh-fChxU.js`);return{diagram:e}},__vite__mapDeps([68,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,14,40,41,25]));return{id:uF,diagram:e}},`loader`)},fF=`wardley-beta`,pF={id:fF,detector:j(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./wardleyDiagram-CUQ6CDDI-BPZYNTvC.js`);return{diagram:e}},__vite__mapDeps([69,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,40,41]));return{id:fF,diagram:e}},`loader`)},mF=!1,hF=j(()=>{mF||(mF=!0,b(`error`,LP,e=>e.toLowerCase().trim()===`error`),b(`---`,{db:{clear:j(()=>{},`clear`)},styles:{},renderer:{draw:j(()=>{},`draw`)},parser:{parse:j(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:j(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),m(zP,UP,rF),m(iP,GP,OP,EP,lP,pP,hP,gP,SP,wP,cP,oP,VP,dP,MP,AP,PP,vP,qP,YP,bP,$P,aF,tF,ZP,sF,dF,lF,pF))},`addDiagrams`),gF=j(async()=>{P.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(S).map(async([e,{detector:t,loader:n}])=>{if(n)try{h(e)}catch{try{let{diagram:e,id:r}=await n();b(r,e,t)}catch(t){throw P.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete S[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){P.error(`Failed to load ${e.length} external diagrams`);for(let t of e)P.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),_F=`comm`,vF=`rule`,yF=`decl`,bF=`@media`,xF=`@import`,SF=`@supports`,CF=`@namespace`,wF=`@keyframes`,TF=`@layer`,EF=`@scope`,DF=Math.abs,OF=String.fromCharCode;function kF(e){return e.trim()}j(kF,`trim`);function AF(e,t,n){return e.replace(t,n)}j(AF,`replace`);function jF(e,t,n){return e.indexOf(t,n)}j(jF,`indexof`);function MF(e,t){return e.charCodeAt(t)|0}j(MF,`charat`);function NF(e,t,n){return e.slice(t,n)}j(NF,`substr`);function PF(e){return e.length}j(PF,`strlen`);function FF(e){return e.length}j(FF,`sizeof`);function IF(e,t){return t.push(e),e}j(IF,`append`);var LF=1,RF=1,zF=0,BF=0,VF=0,HF=``;function UF(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:LF,column:RF,length:o,return:``,siblings:s}}j(UF,`node`);function WF(){return VF}j(WF,`char`);function GF(){return VF=BF>0?MF(HF,--BF):0,RF--,VF===10&&(RF=1,LF--),VF}j(GF,`prev`);function KF(){return VF=BF<zF?MF(HF,BF++):0,RF++,VF===10&&(RF=1,LF++),VF}j(KF,`next`);function qF(){return MF(HF,BF)}j(qF,`peek`);function JF(){return BF}j(JF,`caret`);function YF(e,t){return NF(HF,e,t)}j(YF,`slice`);function XF(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}j(XF,`token`);function ZF(e){return LF=RF=1,zF=PF(HF=e),BF=0,[]}j(ZF,`alloc`);function QF(e){return HF=``,e}j(QF,`dealloc`);function $F(e){return kF(YF(BF-1,nI(e===91?e+2:e===40?e+1:e)))}j($F,`delimit`);function eI(e){for(;(VF=qF())&&VF<33;)KF();return XF(e)>2||XF(VF)>3?``:` `}j(eI,`whitespace`);function tI(e,t){for(;--t&&KF()&&!(VF<48||VF>102||VF>57&&VF<65||VF>70&&VF<97););return YF(e,JF()+(t<6&&qF()==32&&KF()==32))}j(tI,`escaping`);function nI(e){for(;KF();)switch(VF){case e:return BF;case 34:case 39:e!==34&&e!==39&&nI(VF);break;case 40:e===41&&nI(e);break;case 92:KF();break}return BF}j(nI,`delimiter`);function rI(e,t){for(;KF()&&e+VF!==57&&!(e+VF===84&&qF()===47););return`/*`+YF(t,BF-1)+`*`+OF(e===47?e:KF())}j(rI,`commenter`);function iI(e){for(;!XF(qF());)KF();return YF(e,BF)}j(iI,`identifier`);function aI(e){return QF(oI(``,null,null,null,[``],e=ZF(e),0,[0],e))}j(aI,`compile`);function oI(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=KF()){case 40:if(m!=108&&MF(C,d-1)==58){jF(C+=AF($F(v),`&`,`&\f`),`&\f`,DF(l?s[l-1]:0))!=-1&&(_=-1);break}case 34:case 39:case 91:C+=$F(v);break;case 9:case 10:case 13:case 32:C+=eI(m);break;case 92:C+=tI(JF()-1,7);continue;case 47:switch(qF()){case 42:case 47:IF(cI(rI(KF(),JF()),t,n,c),c),(XF(m||1)==5||XF(qF()||1)==5)&&PF(C)&&NF(C,-1,void 0)!==` `&&(C+=` `);break;default:C+=`/`}break;case 123*h:s[l++]=PF(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=AF(C,/\f/g,``)),p>0&&(PF(C)-d||h===0&&m===47)&&IF(p>32?lI(C+`;`,r,n,d-1,c):lI(AF(C,` `,``)+`;`,r,n,d-2,c),c);break;case 59:C+=`;`;default:if(IF(S=sI(C,t,n,l,u,i,s,y,b=[],x=[],d,a),a),v===123)if(u===0)oI(C,t,S,S,b,a,d,s,x);else{switch(f){case 99:if(MF(C,3)===110)break;case 108:if(MF(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?oI(e,S,S,r&&IF(sI(e,S,S,0,0,i,s,y,i,b=[],d,x),x),i,x,d,s,r?b:x):oI(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+PF(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&GF()==125)continue}switch(C+=OF(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(PF(C)-1)*_,_=1;break;case 64:qF()===45&&(C+=$F(KF())),f=qF(),u=d=PF(y=C+=iI(JF())),v++;break;case 45:m===45&&PF(C)==2&&(h=0)}}return a}j(oI,`parse`);function sI(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=FF(p),h=0,g=0,_=0;h<r;++h)for(var v=0,y=NF(e,f+1,f=DF(g=o[h])),b=e;v<m;++v)(b=kF(g>0?p[v]+` `+y:AF(y,/&\f/g,p[v])))&&(c[_++]=b);return UF(e,t,n,i===0?vF:s,c,l,u,d)}j(sI,`ruleset`);function cI(e,t,n,r){return UF(e,t,n,_F,OF(WF()),NF(e,2,-2),0,r)}j(cI,`comment`);function lI(e,t,n,r,i){return UF(e,t,n,yF,NF(e,0,r),NF(e,r+1,-1),r,i)}j(lI,`declaration`);function uI(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}j(uI,`serialize`);function dI(e,t,n,r){switch(e.type){case TF:if(e.children.length)break;case xF:case CF:case yF:return e.return=e.return||e.value;case _F:return``;case wF:return e.return=e.value+`{`+uI(e.children,r)+`}`;case vF:if(!PF(e.value=e.props.join(`,`)))return``}return PF(n=uI(e.children,r))?e.return=e.value+`{`+n+`}`:``}j(dI,`stringify`);function fI(e){var t=FF(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}j(fI,`middleware`);var pI=`graphics-document document`;function mI(e,t){e.attr(`role`,pI),t!==``&&e.attr(`aria-roledescription`,t)}j(mI,`setA11yDiagramInfo`);function hI(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}j(hI,`addSVGa11yTitleDescription`);var gI=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{j(this,`Diagram`)}static async fromText(t,n={}){let r=y(),a=i(t,r);t=ie(t)+`
585
+ `:``}j(JN,`dump$1`);var YN={dump:JN};function XN(e,t){return function(){throw Error(`Function yaml.`+e+` is removed in js-yaml 4. Use yaml.`+t+` instead, which is now safe by default.`)}}j(XN,`renamed`);var ZN=aj,QN=FM.load;FM.loadAll,YN.dump;var $N={common:E,getConfig:y,insertCluster:z,insertEdge:ce,insertEdgeLabel:U,insertMarkers:V,insertNode:B,interpolateToCurve:ae,labelHelper:se,log:P,positionEdgeLabel:H},eP={},tP=j(e=>{for(let t of e)eP[t.name]=t},`registerLayoutLoaders`);j(()=>{tP([{name:`dagre`,loader:j(async()=>await w(()=>import(`./dagre-ND4H6XIP-DsIr9MOv.js`),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])),`loader`)},{name:`cose-bilkent`,loader:j(async()=>await w(()=>import(`./cose-bilkent-UX7MHV2Q-BHv2bbtl.js`),__vite__mapDeps([18,19,6,5])),`loader`)}])},`registerDefaultLayoutLoaders`)();var nP=j(async(e,t)=>{if(!(e.layoutAlgorithm in eP))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=eP[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,$N,{algorithm:n.algorithm})},`render`),rP=j((e=``,{fallback:t=`dagre`}={})=>{if(e in eP)return e;if(t in eP)return P.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`),iP={id:`c4`,detector:j(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./c4Diagram-Y2BXMSZH-DIzEXalR.js`);return{diagram:e}},__vite__mapDeps([20,4,5,6,12,21,11]));return{id:`c4`,diagram:e}},`loader`)},aP=`flowchart`,oP={id:aP,detector:j((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./flowDiagram-H6V6AXG4-BHDoyVoW.js`);return{diagram:e}},__vite__mapDeps([22,4,5,6,7,8,23,9,10,11,12,13,14,15,24,21,25]));return{id:aP,diagram:e}},`loader`)},sP=`flowchart-v2`,cP={id:sP,detector:j((e,t)=>t?.flowchart?.defaultRenderer===`dagre-d3`?!1:(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./flowDiagram-H6V6AXG4-BHDoyVoW.js`);return{diagram:e}},__vite__mapDeps([22,4,5,6,7,8,23,9,10,11,12,13,14,15,24,21,25]));return{id:sP,diagram:e}},`loader`)},lP={id:`er`,detector:j(e=>/^\s*erDiagram/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./erDiagram-L5TCEMPS-Db-IYTmm.js`);return{diagram:e}},__vite__mapDeps([26,4,5,6,7,8,23,9,10,11,12,13,14,15,25]));return{id:`er`,diagram:e}},`loader`)},uP=`gitGraph`,dP={id:uP,detector:j(e=>/^\s*gitGraph/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-S2ZK5IYY-CCwVLT__.js`);return{diagram:e}},__vite__mapDeps([27,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,39,40,41]));return{id:uP,diagram:e}},`loader`)},fP=`gantt`,pP={id:fP,detector:j(e=>/^\s*gantt/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./ganttDiagram-JCBTUEKG-BHQssTz6.js`);return{diagram:e}},__vite__mapDeps([42,4,5,6,12,11]));return{id:fP,diagram:e}},`loader`)},mP=`info`,hP={id:mP,detector:j(e=>/^\s*info/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./infoDiagram-3YFTVSEB-6h8wbWEe.js`);return{diagram:e}},__vite__mapDeps([43,4,5,6,28,29,30,31,32,33,35,36,37,38,40,41]));return{id:mP,diagram:e}},`loader`)},gP={id:`pie`,detector:j(e=>/^\s*pie/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./pieDiagram-CU6KROY3-BntYuYZa.js`);return{diagram:e}},__vite__mapDeps([44,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,40,41]));return{id:`pie`,diagram:e}},`loader`)},_P=`quadrantChart`,vP={id:_P,detector:j(e=>/^\s*quadrantChart/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./quadrantDiagram-VICAPDV7-bAm6Hi_5.js`);return{diagram:e}},__vite__mapDeps([45,4,5,6]));return{id:_P,diagram:e}},`loader`)},yP=`xychart`,bP={id:yP,detector:j(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./xychartDiagram-N2JHSOCM-2N6NCSWN.js`);return{diagram:e}},__vite__mapDeps([46,4,5,6,10,11,12]));return{id:yP,diagram:e}},`loader`)},xP=`requirement`,SP={id:xP,detector:j(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./requirementDiagram-JXO7QTGE-QCD6I29n.js`);return{diagram:e}},__vite__mapDeps([47,4,5,6,7,8,23,9,10,11,12,13,14,15,25]));return{id:xP,diagram:e}},`loader`)},CP=`sequence`,wP={id:CP,detector:j(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./sequenceDiagram-VS2MUI6T-DScFwLz2.js`);return{diagram:e}},__vite__mapDeps([48,4,5,6,12,21,11,39]));return{id:CP,diagram:e}},`loader`)},TP=`class`,EP={id:TP,detector:j((e,t)=>t?.class?.defaultRenderer===`dagre-wrapper`?!1:/^\s*classDiagram/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./classDiagram-KGZ6W3CR-Dj_02GUH.js`);return{diagram:e}},__vite__mapDeps([49,4,5,6,7,8,23,9,10,11,12,13,14,15,24,21,50,25]));return{id:TP,diagram:e}},`loader`)},DP=`classDiagram`,OP={id:DP,detector:j((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./classDiagram-v2-72OJOZXJ-D-NArMpf.js`);return{diagram:e}},__vite__mapDeps([51,4,5,6,7,8,23,9,10,11,12,13,14,15,24,21,50,25]));return{id:DP,diagram:e}},`loader`)},kP=`state`,AP={id:kP,detector:j((e,t)=>t?.state?.defaultRenderer===`dagre-wrapper`?!1:/^\s*stateDiagram/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./stateDiagram-7D4R322I-AkRAm6Hl.js`);return{diagram:e}},__vite__mapDeps([52,4,5,6,7,8,23,9,10,11,12,13,14,15,16,17,53,25]));return{id:kP,diagram:e}},`loader`)},jP=`stateDiagram`,MP={id:jP,detector:j((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-36443NZ5-BCK1vigR.js`);return{diagram:e}},__vite__mapDeps([54,4,5,6,7,8,23,9,10,11,12,13,14,15,53,25]));return{id:jP,diagram:e}},`loader`)},NP=`journey`,PP={id:NP,detector:j(e=>/^\s*journey/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./journeyDiagram-M6C3CM3L-DNPYCpvq.js`);return{diagram:e}},__vite__mapDeps([55,4,5,6,24,12,21]));return{id:NP,diagram:e}},`loader`)},FP={draw:j((e,t,n)=>{P.debug(`rendering svg for syntax error
586
+ `);let r=pA(t),i=r.append(`g`);r.attr(`viewBox`,`0 0 2412 512`),o(r,100,512,!0),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},IP=FP,LP={db:{},renderer:FP,parser:{parse:j(()=>{},`parse`)}},RP=`flowchart-elk`,zP={id:RP,detector:j((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./flowDiagram-H6V6AXG4-BHDoyVoW.js`);return{diagram:e}},__vite__mapDeps([22,4,5,6,7,8,23,9,10,11,12,13,14,15,24,21,25]));return{id:RP,diagram:e}},`loader`)},BP=`timeline`,VP={id:BP,detector:j(e=>/^\s*timeline/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./timeline-definition-O6YCAMPW-BvpIVXjX.js`);return{diagram:e}},__vite__mapDeps([56,4,5,6,12,11]));return{id:BP,diagram:e}},`loader`)},HP=`mindmap`,UP={id:HP,detector:j(e=>/^\s*mindmap/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./mindmap-definition-2TDM6QVE-DUAqydRq.js`);return{diagram:e}},__vite__mapDeps([57,4,5,6,7,8,23,9,10,11,12,13,14,15,25]));return{id:HP,diagram:e}},`loader`)},WP=`kanban`,GP={id:WP,detector:j(e=>/^\s*kanban/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./kanban-definition-75IXJCU3-CIIEZfqV.js`);return{diagram:e}},__vite__mapDeps([58,4,5,6,7,24,10,11,12,13,14,15]));return{id:WP,diagram:e}},`loader`)},KP=`sankey`,qP={id:KP,detector:j(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./sankeyDiagram-URQDO5SZ-LFJz53u5.js`);return{diagram:e}},__vite__mapDeps([59,4,5,6]));return{id:KP,diagram:e}},`loader`)},JP=`packet`,YP={id:JP,detector:j(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./diagram-QXG6HAR7-BSCHGzzT.js`);return{diagram:e}},__vite__mapDeps([60,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,40,41]));return{id:JP,diagram:e}},`loader`)},XP=`radar`,ZP={id:XP,detector:j(e=>/^\s*radar-beta/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./diagram-3NCE3AQN-VXtXDO95.js`);return{diagram:e}},__vite__mapDeps([61,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,40,41]));return{id:XP,diagram:e}},`loader`)},QP=`block`,$P={id:QP,detector:j(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./blockDiagram-7IZFK4PR-B4niSLvR.js`);return{diagram:e}},__vite__mapDeps([62,4,5,6,8,24,10,11,12,15,17]));return{id:QP,diagram:e}},`loader`)},eF=`treeView`,tF={id:eF,detector:j(e=>/^\s*treeView-beta/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./diagram-WEQXMOUZ-DHtknmNT.js`);return{diagram:e}},__vite__mapDeps([63,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,39,40,41]));return{id:eF,diagram:e}},`loader`)},nF=`architecture`,rF={id:nF,detector:j(e=>/^\s*architecture/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./architectureDiagram-UL44E2DR-BoczH8cv.js`);return{diagram:e}},__vite__mapDeps([64,4,5,6,28,29,30,19,31,32,10,11,12,33,34,35,36,37,38,40,41]));return{id:nF,diagram:e}},`loader`)},iF=`eventmodeling`,aF={id:iF,detector:j(e=>/^\s*eventmodeling/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./diagram-HNR7UZ2L-fUWreZzx.js`);return{diagram:e}},__vite__mapDeps([65,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,40,41]));return{id:iF,diagram:e}},`loader`)},oF=`ishikawa`,sF={id:oF,detector:j(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-BNXS4ZKH-Dx2OkPk1.js`);return{diagram:e}},__vite__mapDeps([66,4,5,6,7,12,11]));return{id:oF,diagram:e}},`loader`)},cF=`venn`,lF={id:cF,detector:j(e=>/^\s*venn-beta/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./vennDiagram-MWXL3ELB-BYGWk6dK.js`);return{diagram:e}},__vite__mapDeps([67,4,5,6,7,12,11]));return{id:cF,diagram:e}},`loader`)},uF=`treemap`,dF={id:uF,detector:j(e=>/^\s*treemap/.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./diagram-GF46GFSD-B1qab2Ah.js`);return{diagram:e}},__vite__mapDeps([68,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,14,40,41,25]));return{id:uF,diagram:e}},`loader`)},fF=`wardley-beta`,pF={id:fF,detector:j(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:j(async()=>{let{diagram:e}=await w(async()=>{let{diagram:e}=await import(`./wardleyDiagram-CUQ6CDDI-Dk1z7H2T.js`);return{diagram:e}},__vite__mapDeps([69,4,5,6,28,29,30,31,32,33,34,35,12,11,36,37,38,40,41]));return{id:fF,diagram:e}},`loader`)},mF=!1,hF=j(()=>{mF||(mF=!0,b(`error`,LP,e=>e.toLowerCase().trim()===`error`),b(`---`,{db:{clear:j(()=>{},`clear`)},styles:{},renderer:{draw:j(()=>{},`draw`)},parser:{parse:j(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:j(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),m(zP,UP,rF),m(iP,GP,OP,EP,lP,pP,hP,gP,SP,wP,cP,oP,VP,dP,MP,AP,PP,vP,qP,YP,bP,$P,aF,tF,ZP,sF,dF,lF,pF))},`addDiagrams`),gF=j(async()=>{P.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(S).map(async([e,{detector:t,loader:n}])=>{if(n)try{h(e)}catch{try{let{diagram:e,id:r}=await n();b(r,e,t)}catch(t){throw P.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete S[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){P.error(`Failed to load ${e.length} external diagrams`);for(let t of e)P.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),_F=`comm`,vF=`rule`,yF=`decl`,bF=`@media`,xF=`@import`,SF=`@supports`,CF=`@namespace`,wF=`@keyframes`,TF=`@layer`,EF=`@scope`,DF=Math.abs,OF=String.fromCharCode;function kF(e){return e.trim()}j(kF,`trim`);function AF(e,t,n){return e.replace(t,n)}j(AF,`replace`);function jF(e,t,n){return e.indexOf(t,n)}j(jF,`indexof`);function MF(e,t){return e.charCodeAt(t)|0}j(MF,`charat`);function NF(e,t,n){return e.slice(t,n)}j(NF,`substr`);function PF(e){return e.length}j(PF,`strlen`);function FF(e){return e.length}j(FF,`sizeof`);function IF(e,t){return t.push(e),e}j(IF,`append`);var LF=1,RF=1,zF=0,BF=0,VF=0,HF=``;function UF(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:LF,column:RF,length:o,return:``,siblings:s}}j(UF,`node`);function WF(){return VF}j(WF,`char`);function GF(){return VF=BF>0?MF(HF,--BF):0,RF--,VF===10&&(RF=1,LF--),VF}j(GF,`prev`);function KF(){return VF=BF<zF?MF(HF,BF++):0,RF++,VF===10&&(RF=1,LF++),VF}j(KF,`next`);function qF(){return MF(HF,BF)}j(qF,`peek`);function JF(){return BF}j(JF,`caret`);function YF(e,t){return NF(HF,e,t)}j(YF,`slice`);function XF(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}j(XF,`token`);function ZF(e){return LF=RF=1,zF=PF(HF=e),BF=0,[]}j(ZF,`alloc`);function QF(e){return HF=``,e}j(QF,`dealloc`);function $F(e){return kF(YF(BF-1,nI(e===91?e+2:e===40?e+1:e)))}j($F,`delimit`);function eI(e){for(;(VF=qF())&&VF<33;)KF();return XF(e)>2||XF(VF)>3?``:` `}j(eI,`whitespace`);function tI(e,t){for(;--t&&KF()&&!(VF<48||VF>102||VF>57&&VF<65||VF>70&&VF<97););return YF(e,JF()+(t<6&&qF()==32&&KF()==32))}j(tI,`escaping`);function nI(e){for(;KF();)switch(VF){case e:return BF;case 34:case 39:e!==34&&e!==39&&nI(VF);break;case 40:e===41&&nI(e);break;case 92:KF();break}return BF}j(nI,`delimiter`);function rI(e,t){for(;KF()&&e+VF!==57&&!(e+VF===84&&qF()===47););return`/*`+YF(t,BF-1)+`*`+OF(e===47?e:KF())}j(rI,`commenter`);function iI(e){for(;!XF(qF());)KF();return YF(e,BF)}j(iI,`identifier`);function aI(e){return QF(oI(``,null,null,null,[``],e=ZF(e),0,[0],e))}j(aI,`compile`);function oI(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=KF()){case 40:if(m!=108&&MF(C,d-1)==58){jF(C+=AF($F(v),`&`,`&\f`),`&\f`,DF(l?s[l-1]:0))!=-1&&(_=-1);break}case 34:case 39:case 91:C+=$F(v);break;case 9:case 10:case 13:case 32:C+=eI(m);break;case 92:C+=tI(JF()-1,7);continue;case 47:switch(qF()){case 42:case 47:IF(cI(rI(KF(),JF()),t,n,c),c),(XF(m||1)==5||XF(qF()||1)==5)&&PF(C)&&NF(C,-1,void 0)!==` `&&(C+=` `);break;default:C+=`/`}break;case 123*h:s[l++]=PF(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=AF(C,/\f/g,``)),p>0&&(PF(C)-d||h===0&&m===47)&&IF(p>32?lI(C+`;`,r,n,d-1,c):lI(AF(C,` `,``)+`;`,r,n,d-2,c),c);break;case 59:C+=`;`;default:if(IF(S=sI(C,t,n,l,u,i,s,y,b=[],x=[],d,a),a),v===123)if(u===0)oI(C,t,S,S,b,a,d,s,x);else{switch(f){case 99:if(MF(C,3)===110)break;case 108:if(MF(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?oI(e,S,S,r&&IF(sI(e,S,S,0,0,i,s,y,i,b=[],d,x),x),i,x,d,s,r?b:x):oI(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+PF(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&GF()==125)continue}switch(C+=OF(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(PF(C)-1)*_,_=1;break;case 64:qF()===45&&(C+=$F(KF())),f=qF(),u=d=PF(y=C+=iI(JF())),v++;break;case 45:m===45&&PF(C)==2&&(h=0)}}return a}j(oI,`parse`);function sI(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=FF(p),h=0,g=0,_=0;h<r;++h)for(var v=0,y=NF(e,f+1,f=DF(g=o[h])),b=e;v<m;++v)(b=kF(g>0?p[v]+` `+y:AF(y,/&\f/g,p[v])))&&(c[_++]=b);return UF(e,t,n,i===0?vF:s,c,l,u,d)}j(sI,`ruleset`);function cI(e,t,n,r){return UF(e,t,n,_F,OF(WF()),NF(e,2,-2),0,r)}j(cI,`comment`);function lI(e,t,n,r,i){return UF(e,t,n,yF,NF(e,0,r),NF(e,r+1,-1),r,i)}j(lI,`declaration`);function uI(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}j(uI,`serialize`);function dI(e,t,n,r){switch(e.type){case TF:if(e.children.length)break;case xF:case CF:case yF:return e.return=e.return||e.value;case _F:return``;case wF:return e.return=e.value+`{`+uI(e.children,r)+`}`;case vF:if(!PF(e.value=e.props.join(`,`)))return``}return PF(n=uI(e.children,r))?e.return=e.value+`{`+n+`}`:``}j(dI,`stringify`);function fI(e){var t=FF(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}j(fI,`middleware`);var pI=`graphics-document document`;function mI(e,t){e.attr(`role`,pI),t!==``&&e.attr(`aria-roledescription`,t)}j(mI,`setA11yDiagramInfo`);function hI(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}j(hI,`addSVGa11yTitleDescription`);var gI=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{j(this,`Diagram`)}static async fromText(t,n={}){let r=y(),a=i(t,r);t=ie(t)+`
587
587
  `;try{h(a)}catch{let e=k(a);if(!e)throw new O(`Diagram ${a} not found.`);let{id:t,diagram:n}=await e();b(t,n)}let{db:o,parser:s,renderer:c,init:l}=h(a);return s.parser&&(s.parser.yy=o),o.clear?.(),l?.(r),n.title&&o.setDiagramTitle?.(n.title),await s.parse(t),new e(a,t,o,s,c)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},_I=[],vI=j(()=>{_I.forEach(e=>{e()}),_I=[]},`attachFunctions`),yI=j(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`);function bI(e){let t=e.match(T);if(!t)return{text:e,metadata:{}};let n=QN(t[1],{schema:ZN})??{};n=typeof n==`object`&&!Array.isArray(n)?n:{};let r={};return n.displayMode&&(r.displayMode=n.displayMode.toString()),n.title&&(r.title=n.title.toString()),n.config&&(r.config=n.config),{text:e.slice(t[0].length),metadata:r}}j(bI,`extractFrontMatter`);var xI=j(e=>e.replace(/\r\n?/g,`
588
588
  `).replace(/<(\w+)([^>]*)>/g,(e,t,n)=>`<`+t+n.replace(/="([^"]*)"/g,`='$1'`)+`>`),`cleanupText`),SI=j(e=>{let{text:t,metadata:n}=bI(e),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||={},a.gantt.displayMode=r),{title:i,config:a,text:t}},`processFrontmatter`),CI=j(e=>{let t=I.detectInit(e)??{},n=I.detectDirective(e,`wrap`);return Array.isArray(n)?t.wrap=n.some(({type:e})=>e===`wrap`):n?.type===`wrap`&&(t.wrap=!0),{text:re(e),directive:t}},`processDirectives`);function wI(e){let t=SI(xI(e)),n=CI(t.text),r=te(t.config,n.directive);return e=yI(n.text),{code:e,title:t.title,config:r}}j(wI,`preprocessDiagram`);function TI(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}j(TI,`toBase64`);var EI=5e4,DI=`graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa`,OI=`sandbox`,kI=`loose`,AI=`http://www.w3.org/2000/svg`,jI=`http://www.w3.org/1999/xlink`,MI=`http://www.w3.org/1999/xhtml`,NI=`100%`,PI=`100%`,FI=`border:0;margin:0;`,II=`margin:0`,LI=`allow-top-navigation-by-user-activation allow-popups`,RI=`The "iframe" tag is not supported by your browser.`,zI=[`foreignobject`],BI=[`dominant-baseline`];function VI(e){let t=wI(e);return r(),D(t.config??{}),t}j(VI,`processAndSetConfigs`);async function HI(e,t){hF();try{let{code:t,config:n}=VI(e);return{diagramType:(await eL(t)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}j(HI,`parse`);var UI=j((e,t,n=[])=>`.${e} ${t} ${v(`{ ${n.join(` !important; `)} !important; }`)}`,`cssImportantStyles`),WI=j((e,t=new Map)=>{let n=new CSSStyleSheet;if(e.fontFamily!==void 0&&n.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,n.cssRules.length),e.altFontFamily!==void 0&&n.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,n.cssRules.length),t instanceof Map){let r=a(e)?[`> *`,`span`]:[`rect`,`polygon`,`ellipse`,`circle`,`path`];t.forEach(e=>{F(e.styles)||r.forEach(t=>{n.insertRule(UI(e.id,t,e.styles),n.cssRules.length)}),F(e.textStyles)||n.insertRule(UI(e.id,`tspan`,(e?.textStyles||[]).map(e=>e.replace(`color`,`fill`))),n.cssRules.length)})}let r=``;if(e.themeCSS!==void 0)if(typeof n.replaceSync==`function`){let t=new CSSStyleSheet;t.replaceSync(e.themeCSS),r=s(t)+`
589
589
  `}else r+=`${e.themeCSS}
590
590
  `;return r+s(n)},`createCssStyles`),GI=j((e,t)=>uI(aI(`${e}{${t}}`),fI([j(function(t,n,r,i){if(t.type===`rule`&&Array.isArray(t.props)){if(t.parent&&t.parent.type===wF)return;t.props=t.props.map(t=>t.startsWith(e)?t:`${e} ${t}`)}else t.type.startsWith(`@`)&&([bF,SF,TF,EF,`@container`,`@starting-style`,wF].includes(t.type)||(P.warn(`Removing unsupported at-rule ${t.type} from CSS`),t.type=_F))},`addNamespace`),dI])),`compileCSS`),KI=j((e,t,n,r)=>GI(r,A(t,WI(e,n),{...e.themeVariables,theme:e.theme,look:e.look},r)),`createUserStyles`),qI=j((e=``,t,n)=>{let r=e;return!n&&!t&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,`marker-end="url(#`)),r=L(r),r=r.replace(/<br>/g,`<br/>`),r},`cleanUpSvgCode`),JI=j((e=``,t)=>`<iframe style="width:${NI};height:${t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+`px`:PI};${FI}" src="data:text/html;charset=UTF-8;base64,${TI(`<body style="${II}">${e}</body>`)}" sandbox="${LI}">
591
591
  ${RI}
592
592
  </iframe>`,`putIntoIFrame`),YI=j((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,AI);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`);function XI(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}j(XI,`sandboxedIframe`);var ZI=j((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},`removeExistingElements`),QI=j(async function(e,t,n){hF();let r=VI(t);t=r.code;let i=y();P.debug(i),t.length>(i?.maxTextSize??EI)&&(t=DI);let a=`#${e}`,o=`i`+e,s=`#`+o,c=`d`+e,l=`#`+c,u=j(()=>{let e=N(f?s:l).node();e&&`remove`in e&&e.remove()},`removeTempElements`),d=N(document.body),f=i.securityLevel===OI,p=i.securityLevel===kI,m=i.fontFamily;n===void 0?(ZI(document,e,c,o),f?(d=N(XI(N(document.body),o).nodes()[0].contentDocument.body),d.node().style.margin=`0`):d=N(`body`),YI(d,e,c)):(n&&(n.innerHTML=``),f?(d=N(XI(N(n),o).nodes()[0].contentDocument.body),d.node().style.margin=`0`):d=N(n),YI(d,e,c,`font-family: ${m}`,jI));let h,g;try{h=await gI.fromText(t,{title:r.title})}catch(e){if(i.suppressErrorRendering)throw u(),e;h=await gI.fromText(`error`),g=e}let _=d.select(l).node(),v=h.type,b=_.firstChild,S=b.firstChild,w=h.renderer.getClasses?.(t,h),T=KI(i,v,w,a),E=document.createElement(`style`);E.innerHTML=T,b.insertBefore(E,S);try{await h.renderer.draw(t,e,`11.15.0`,h)}catch(n){throw i.suppressErrorRendering?u():IP.draw(t,e,`11.15.0`),n}let D=d.select(`${l} svg`),O=h.db.getAccTitle?.(),k=h.db.getAccDescription?.();tL(v,D,O,k),d.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,MI);let ee=d.select(l).node().innerHTML;if(P.debug(`config.arrowMarkerAbsolute`,i.arrowMarkerAbsolute),ee=qI(ee,f,C(i.arrowMarkerAbsolute)),f){let e=d.select(l+` svg`).node();ee=JI(ee,e)}else p||(ee=x.sanitize(ee,{ADD_TAGS:zI,ADD_ATTR:BI,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(vI(),g)throw g;return u(),{diagramType:v,svg:ee,bindFunctions:h.db.bindFunctions}},`render`);function $I(e={}){let t=p({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||={},t.themeVariables.fontFamily=t.fontFamily),ee(t),t?.theme&&t.theme in c?t.themeVariables=c[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=c.default.getThemeVariables(t.themeVariables)),M((typeof t==`object`?u(t):f()).logLevel),hF()}j($I,`initialize`);var eL=j((e,t={})=>{let{code:n}=wI(e);return gI.fromText(n,t)},`getDiagramFromText`);function tL(e,t,n,r){mI(t,e),hI(t,n,r,t.attr(`id`))}j(tL,`addA11yInfo`);var nL=Object.freeze({render:QI,parse:HI,getDiagramFromText:eL,initialize:$I,getConfig:y,setConfig:l,getSiteConfig:f,updateSiteConfig:g,reset:j(()=>{r()},`reset`),globalReset:j(()=>{r(_)},`globalReset`),defaultConfig:_});M(y().logLevel),r(y());var rL=j((e,t,n)=>{P.warn(e),ne(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},`handleError`),iL=j(async function(e={querySelector:`.mermaid`}){try{await aL(e)}catch(t){if(ne(t)&&P.error(t.str),gL.parseError&&gL.parseError(t),!e.suppressErrors)throw P.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),aL=j(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:`.mermaid`}){let r=nL.getConfig();P.debug(`${e?``:`No `}Callback function found`);let i;if(n)i=n;else if(t)i=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);P.debug(`Found ${i.length} diagrams`),r?.startOnLoad!==void 0&&(P.debug(`Start On Load: `+r?.startOnLoad),nL.updateSiteConfig({startOnLoad:r?.startOnLoad}));let a=new I.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed),o,s=[];for(let t of Array.from(i)){if(P.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let n=`mermaid-${a.next()}`;o=t.innerHTML,o=R(I.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,`<br/>`);let r=I.detectInit(o);r&&P.debug(`Detected early reinit: `,r);try{let{svg:r,bindFunctions:i}=await hL(n,o,t);t.innerHTML=r,e&&await e(n),i&&i(t)}catch(e){rL(e,s,gL.parseError)}}if(s.length>0)throw s[0]},`runThrowsErrors`),oL=j(function(e){nL.initialize(e)},`initialize`),sL=j(async function(e,t,n){P.warn(`mermaid.init is deprecated. Please use run instead.`),e&&oL(e);let r={postRenderCallback:n,querySelector:`.mermaid`};typeof t==`string`?r.querySelector=t:t&&(t instanceof HTMLElement?r.nodes=[t]:r.nodes=t),await iL(r)},`init`),cL=j(async(e,{lazyLoad:t=!0}={})=>{hF(),m(...e),t===!1&&await gF()},`registerExternalDiagrams`),lL=j(function(){if(gL.startOnLoad){let{startOnLoad:e}=nL.getConfig();e&&gL.run().catch(e=>P.error(`Mermaid failed to initialize`,e))}},`contentLoaded`);typeof document<`u`&&window.addEventListener(`load`,lL,!1);var uL=j(function(e){gL.parseError=e},`setParseErrorHandler`),dL=[],fL=!1,pL=j(async()=>{if(!fL){for(fL=!0;dL.length>0;){let e=dL.shift();if(e)try{await e()}catch(e){P.error(`Error executing queue`,e)}}fL=!1}},`executeQueue`),mL=j(async(e,t)=>new Promise((n,r)=>{let i=j(()=>new Promise((i,a)=>{nL.parse(e,t).then(e=>{i(e),n(e)},e=>{P.error(`Error parsing`,e),gL.parseError?.(e),a(e),r(e)})}),`performCall`);dL.push(i),pL().catch(r)}),`parse`),hL=j((e,t,n)=>new Promise((r,i)=>{let a=j(()=>new Promise((a,o)=>{nL.render(e,t,n).then(e=>{a(e),r(e)},e=>{P.error(`Error parsing`,e),gL.parseError?.(e),o(e),i(e)})}),`performCall`);dL.push(a),pL().catch(i)}),`render`),gL={startOnLoad:!0,mermaidAPI:nL,parse:mL,render:hL,init:sL,run:iL,registerExternalDiagrams:cL,registerLayoutLoaders:tP,initialize:oL,parseError:void 0,contentLoaded:lL,setParseErrorHandler:uL,detectType:i,registerIconPacks:oe,getRegisteredDiagramsMetadata:j(()=>Object.keys(S).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},_L=gL;function vL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yL(e){if(Array.isArray(e))return e}function bL(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function xL(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
593
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SL(e,t){return yL(e)||bL(e,t)||CL(e,t)||xL()}function CL(e,t){if(e){if(typeof e==`string`)return vL(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vL(e,t):void 0}}var wL=Object.entries,TL=Object.setPrototypeOf,EL=Object.isFrozen,DL=Object.getPrototypeOf,OL=Object.getOwnPropertyDescriptor,kL=Object.freeze,AL=Object.seal,jL=Object.create,ML=typeof Reflect<`u`&&Reflect,NL=ML.apply,PL=ML.construct;kL||=function(e){return e},AL||=function(e){return e},NL||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},PL||=function(e){return new e(...[...arguments].slice(1))};var FL=tR(Array.prototype.forEach),IL=tR(Array.prototype.lastIndexOf),LL=tR(Array.prototype.pop),RL=tR(Array.prototype.push),zL=tR(Array.prototype.splice),BL=Array.isArray,VL=tR(String.prototype.toLowerCase),HL=tR(String.prototype.toString),UL=tR(String.prototype.match),WL=tR(String.prototype.replace),GL=tR(String.prototype.indexOf),KL=tR(String.prototype.trim),qL=tR(Number.prototype.toString),JL=tR(Boolean.prototype.toString),YL=typeof BigInt>`u`?null:tR(BigInt.prototype.toString),XL=typeof Symbol>`u`?null:tR(Symbol.prototype.toString),ZL=tR(Object.prototype.hasOwnProperty),QL=tR(Object.prototype.toString),$L=tR(RegExp.prototype.test),eR=nR(TypeError);function tR(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return NL(e,t,n)}}function nR(e){return function(){return PL(e,[...arguments])}}function rR(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:VL;if(TL&&TL(e,null),!BL(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(EL(t)||(t[r]=e),i=e)}e[i]=!0}return e}function iR(e){for(let t=0;t<e.length;t++)ZL(e,t)||(e[t]=null);return e}function aR(e){let t=jL(null);for(let r of wL(e)){var n=SL(r,2);let i=n[0],a=n[1];ZL(e,i)&&(BL(a)?t[i]=iR(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=aR(a):t[i]=a)}return t}function oR(e){switch(typeof e){case`string`:return e;case`number`:return qL(e);case`boolean`:return JL(e);case`bigint`:return YL?YL(e):`0`;case`symbol`:return XL?XL(e):`Symbol()`;case`undefined`:return QL(e);case`function`:case`object`:{if(e===null)return QL(e);let t=e,n=sR(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:QL(e)}return QL(e)}default:return QL(e)}}function sR(e,t){for(;e!==null;){let n=OL(e,t);if(n){if(n.get)return tR(n.get);if(typeof n.value==`function`)return tR(n.value)}e=DL(e)}function n(){return null}return n}function cR(e){try{return $L(e,``),!0}catch{return!1}}var lR=kL(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),uR=kL(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),dR=kL([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),fR=kL([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),pR=kL(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),mR=kL([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),hR=kL([`#text`]),gR=kL(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),_R=kL(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),vR=kL(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),yR=kL([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),bR=AL(/{{[\w\W]*|^[\w\W]*}}/g),xR=AL(/<%[\w\W]*|^[\w\W]*%>/g),SR=AL(/\${[\w\W]*/g),CR=AL(/^data-[\-\w.\u00B7-\uFFFF]+$/),wR=AL(/^aria-[\-\w]+$/),TR=AL(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ER=AL(/^(?:\w+script|data):/i),DR=AL(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),OR=AL(/^html$/i),kR=AL(/^[a-z][.\w]*(-[.\w]+)+$/i),AR={element:1,text:3,progressingInstruction:7,comment:8,document:9},jR=function(){return typeof window>`u`?null:window},MR=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},NR=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function PR(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jR(),t=e=>PR(e);if(t.version=`3.4.3`,t.removed=[],!e||!e.document||e.document.nodeType!==AR.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript,a=e.DocumentFragment,o=e.HTMLTemplateElement,s=e.Node,c=e.Element,l=e.NodeFilter,u=e.NamedNodeMap,d=u===void 0?e.NamedNodeMap||e.MozNamedAttrMap:u,f=e.HTMLFormElement,p=e.DOMParser,m=e.trustedTypes,h=c.prototype,g=sR(h,`cloneNode`),_=sR(h,`remove`),v=sR(h,`nextSibling`),y=sR(h,`childNodes`),b=sR(h,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,C=n,w=C.implementation,T=C.createNodeIterator,E=C.createDocumentFragment,D=C.getElementsByTagName,O=r.importNode,k=NR();t.isSupported=typeof wL==`function`&&typeof b==`function`&&w&&w.createHTMLDocument!==void 0;let ee=bR,A=xR,j=SR,M=CR,N=wR,P=ER,te=DR,ne=kR,F=TR,I=null,L=rR({},[...lR,...uR,...dR,...pR,...hR]),re=null,ie=rR({},[...gR,..._R,...vR,...yR]),ae=Object.seal(jL(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),oe=null,R=null,z=Object.seal(jL(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),B=!0,se=!0,V=!1,H=!0,U=!1,ce=!0,le=!1,ue=!1,de=!1,fe=!1,pe=!1,me=!1,he=!0,ge=!1,W=`user-content-`,_e=!0,ve=!1,ye={},be=null,xe=rR({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Se=null,Ce=rR({},[`audio`,`video`,`img`,`source`,`image`,`track`]),we=null,Te=rR({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ee=`http://www.w3.org/1998/Math/MathML`,De=`http://www.w3.org/2000/svg`,Oe=`http://www.w3.org/1999/xhtml`,ke=Oe,Ae=!1,je=null,Me=rR({},[Ee,De,Oe],HL),Ne=rR({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Pe=rR({},[`annotation-xml`]),Fe=rR({},[`title`,`style`,`font`,`a`,`script`]),Ie=null,Le=[`application/xhtml+xml`,`text/html`],Re=null,ze=null,Be=n.createElement(`form`),Ve=function(e){return e instanceof RegExp||e instanceof Function},He=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ze&&ze===e)return;(!e||typeof e!=`object`)&&(e={}),e=aR(e),Ie=Le.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Re=Ie===`application/xhtml+xml`?HL:VL,I=ZL(e,`ALLOWED_TAGS`)&&BL(e.ALLOWED_TAGS)?rR({},e.ALLOWED_TAGS,Re):L,re=ZL(e,`ALLOWED_ATTR`)&&BL(e.ALLOWED_ATTR)?rR({},e.ALLOWED_ATTR,Re):ie,je=ZL(e,`ALLOWED_NAMESPACES`)&&BL(e.ALLOWED_NAMESPACES)?rR({},e.ALLOWED_NAMESPACES,HL):Me,we=ZL(e,`ADD_URI_SAFE_ATTR`)&&BL(e.ADD_URI_SAFE_ATTR)?rR(aR(Te),e.ADD_URI_SAFE_ATTR,Re):Te,Se=ZL(e,`ADD_DATA_URI_TAGS`)&&BL(e.ADD_DATA_URI_TAGS)?rR(aR(Ce),e.ADD_DATA_URI_TAGS,Re):Ce,be=ZL(e,`FORBID_CONTENTS`)&&BL(e.FORBID_CONTENTS)?rR({},e.FORBID_CONTENTS,Re):xe,oe=ZL(e,`FORBID_TAGS`)&&BL(e.FORBID_TAGS)?rR({},e.FORBID_TAGS,Re):aR({}),R=ZL(e,`FORBID_ATTR`)&&BL(e.FORBID_ATTR)?rR({},e.FORBID_ATTR,Re):aR({}),ye=ZL(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?aR(e.USE_PROFILES):e.USE_PROFILES:!1,B=e.ALLOW_ARIA_ATTR!==!1,se=e.ALLOW_DATA_ATTR!==!1,V=e.ALLOW_UNKNOWN_PROTOCOLS||!1,H=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,U=e.SAFE_FOR_TEMPLATES||!1,ce=e.SAFE_FOR_XML!==!1,le=e.WHOLE_DOCUMENT||!1,fe=e.RETURN_DOM||!1,pe=e.RETURN_DOM_FRAGMENT||!1,me=e.RETURN_TRUSTED_TYPE||!1,de=e.FORCE_BODY||!1,he=e.SANITIZE_DOM!==!1,ge=e.SANITIZE_NAMED_PROPS||!1,_e=e.KEEP_CONTENT!==!1,ve=e.IN_PLACE||!1,F=cR(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:TR,ke=typeof e.NAMESPACE==`string`?e.NAMESPACE:Oe,Ne=ZL(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?aR(e.MATHML_TEXT_INTEGRATION_POINTS):rR({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Pe=ZL(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?aR(e.HTML_INTEGRATION_POINTS):rR({},[`annotation-xml`]);let t=ZL(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?aR(e.CUSTOM_ELEMENT_HANDLING):jL(null);if(ae=jL(null),ZL(t,`tagNameCheck`)&&Ve(t.tagNameCheck)&&(ae.tagNameCheck=t.tagNameCheck),ZL(t,`attributeNameCheck`)&&Ve(t.attributeNameCheck)&&(ae.attributeNameCheck=t.attributeNameCheck),ZL(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(ae.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),U&&(se=!1),pe&&(fe=!0),ye&&(I=rR({},hR),re=jL(null),ye.html===!0&&(rR(I,lR),rR(re,gR)),ye.svg===!0&&(rR(I,uR),rR(re,_R),rR(re,yR)),ye.svgFilters===!0&&(rR(I,dR),rR(re,_R),rR(re,yR)),ye.mathMl===!0&&(rR(I,pR),rR(re,vR),rR(re,yR))),z.tagCheck=null,z.attributeCheck=null,ZL(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?z.tagCheck=e.ADD_TAGS:BL(e.ADD_TAGS)&&(I===L&&(I=aR(I)),rR(I,e.ADD_TAGS,Re))),ZL(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?z.attributeCheck=e.ADD_ATTR:BL(e.ADD_ATTR)&&(re===ie&&(re=aR(re)),rR(re,e.ADD_ATTR,Re))),ZL(e,`ADD_URI_SAFE_ATTR`)&&BL(e.ADD_URI_SAFE_ATTR)&&rR(we,e.ADD_URI_SAFE_ATTR,Re),ZL(e,`FORBID_CONTENTS`)&&BL(e.FORBID_CONTENTS)&&(be===xe&&(be=aR(be)),rR(be,e.FORBID_CONTENTS,Re)),ZL(e,`ADD_FORBID_CONTENTS`)&&BL(e.ADD_FORBID_CONTENTS)&&(be===xe&&(be=aR(be)),rR(be,e.ADD_FORBID_CONTENTS,Re)),_e&&(I[`#text`]=!0),le&&rR(I,[`html`,`head`,`body`]),I.table&&(rR(I,[`tbody`]),delete oe.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw eR(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw eR(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);x=e.TRUSTED_TYPES_POLICY,S=x.createHTML(``)}else x===void 0&&(x=MR(m,i)),x!==null&&typeof S==`string`&&(S=x.createHTML(``));kL&&kL(e),ze=e},Ue=rR({},[...uR,...dR,...fR]),We=rR({},[...pR,...mR]),Ge=function(e){let t=b(e);(!t||!t.tagName)&&(t={namespaceURI:ke,tagName:`template`});let n=VL(e.tagName),r=VL(t.tagName);return je[e.namespaceURI]?e.namespaceURI===De?t.namespaceURI===Oe?n===`svg`:t.namespaceURI===Ee?n===`svg`&&(r===`annotation-xml`||Ne[r]):!!Ue[n]:e.namespaceURI===Ee?t.namespaceURI===Oe?n===`math`:t.namespaceURI===De?n===`math`&&Pe[r]:!!We[n]:e.namespaceURI===Oe?t.namespaceURI===De&&!Pe[r]||t.namespaceURI===Ee&&!Ne[r]?!1:!We[n]&&(Fe[n]||!Ue[n]):!!(Ie===`application/xhtml+xml`&&je[e.namespaceURI]):!1},Ke=function(e){RL(t.removed,{element:e});try{b(e).removeChild(e)}catch{_(e)}},qe=function(e,n){try{RL(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{RL(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(fe||pe)try{Ke(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Je=function(e){let t=null,r=null;if(de)e=`<remove></remove>`+e;else{let t=UL(e,/^[\r\n\t ]+/);r=t&&t[0]}Ie===`application/xhtml+xml`&&ke===Oe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=x?x.createHTML(e):e;if(ke===Oe)try{t=new p().parseFromString(i,Ie)}catch{}if(!t||!t.documentElement){t=w.createDocument(ke,`template`,null);try{t.documentElement.innerHTML=Ae?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),ke===Oe?D.call(t,le?`html`:`body`)[0]:le?t.documentElement:a},Ye=function(e){return T.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Xe=function(e){return e instanceof f&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof d)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Ze=function(e){return typeof s==`function`&&e instanceof s};function Qe(e,n,r){FL(e,e=>{e.call(t,n,r,ze)})}let $e=function(e){let n=null;if(Qe(k.beforeSanitizeElements,e,null),Xe(e))return Ke(e),!0;let r=Re(e.nodeName);if(Qe(k.uponSanitizeElement,e,{tagName:r,allowedTags:I}),ce&&e.hasChildNodes()&&!Ze(e.firstElementChild)&&$L(/<[/\w!]/g,e.innerHTML)&&$L(/<[/\w!]/g,e.textContent)||ce&&e.namespaceURI===Oe&&r===`style`&&Ze(e.firstElementChild)||e.nodeType===AR.progressingInstruction||ce&&e.nodeType===AR.comment&&$L(/<[/\w]/g,e.data))return Ke(e),!0;if(oe[r]||!(z.tagCheck instanceof Function&&z.tagCheck(r))&&!I[r]){if(!oe[r]&&nt(r)&&(ae.tagNameCheck instanceof RegExp&&$L(ae.tagNameCheck,r)||ae.tagNameCheck instanceof Function&&ae.tagNameCheck(r)))return!1;if(_e&&!be[r]){let t=b(e)||e.parentNode,n=y(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=g(n[i],!0);t.insertBefore(r,v(e))}}}return Ke(e),!0}return e instanceof c&&!Ge(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&$L(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ke(e),!0):(U&&e.nodeType===AR.text&&(n=e.textContent,FL([ee,A,j],e=>{n=WL(n,e,` `)}),e.textContent!==n&&(RL(t.removed,{element:e.cloneNode()}),e.textContent=n)),Qe(k.afterSanitizeElements,e,null),!1)},et=function(e,t,r){if(R[t]||he&&(t===`id`||t===`name`)&&(r in n||r in Be))return!1;let i=re[t]||z.attributeCheck instanceof Function&&z.attributeCheck(t,e);if(!(se&&!R[t]&&$L(M,t))&&!(B&&$L(N,t))){if(!i||R[t]){if(!(nt(e)&&(ae.tagNameCheck instanceof RegExp&&$L(ae.tagNameCheck,e)||ae.tagNameCheck instanceof Function&&ae.tagNameCheck(e))&&(ae.attributeNameCheck instanceof RegExp&&$L(ae.attributeNameCheck,t)||ae.attributeNameCheck instanceof Function&&ae.attributeNameCheck(t,e))||t===`is`&&ae.allowCustomizedBuiltInElements&&(ae.tagNameCheck instanceof RegExp&&$L(ae.tagNameCheck,r)||ae.tagNameCheck instanceof Function&&ae.tagNameCheck(r))))return!1}else if(!we[t]&&!$L(F,WL(r,te,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&GL(r,`data:`)===0&&Se[e])&&!(V&&!$L(P,WL(r,te,``)))&&r)return!1}return!0},tt=rR({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),nt=function(e){return!tt[VL(e)]&&$L(ne,e)},rt=function(e){Qe(k.beforeSanitizeAttributes,e,null);let n=e.attributes;if(!n||Xe(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:re,forceKeepAttr:void 0},i=n.length;for(;i--;){let a=n[i],o=a.name,s=a.namespaceURI,c=a.value,l=Re(o),u=c,d=o===`value`?u:KL(u);if(r.attrName=l,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,Qe(k.uponSanitizeAttribute,e,r),d=r.attrValue,ge&&(l===`id`||l===`name`)&&GL(d,W)!==0&&(qe(o,e),d=W+d),ce&&$L(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){qe(o,e);continue}if(l===`attributename`&&UL(d,`href`)){qe(o,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){qe(o,e);continue}if(!H&&$L(/\/>/i,d)){qe(o,e);continue}U&&FL([ee,A,j],e=>{d=WL(d,e,` `)});let f=Re(e.nodeName);if(!et(f,l,d)){qe(o,e);continue}if(x&&typeof m==`object`&&typeof m.getAttributeType==`function`&&!s)switch(m.getAttributeType(f,l)){case`TrustedHTML`:d=x.createHTML(d);break;case`TrustedScriptURL`:d=x.createScriptURL(d);break}if(d!==u)try{s?e.setAttributeNS(s,o,d):e.setAttribute(o,d),Xe(e)?Ke(e):LL(t.removed)}catch{qe(o,e)}}Qe(k.afterSanitizeAttributes,e,null)},it=function(e){let t=null,n=Ye(e);for(Qe(k.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)Qe(k.uponSanitizeShadowNode,t,null),$e(t),rt(t),t.content instanceof a&&it(t.content);Qe(k.afterSanitizeShadowDOM,e,null)},at=function(e){if(e.nodeType===AR.element&&e.shadowRoot instanceof a){let t=e.shadowRoot;at(t),it(t)}let t=e.childNodes;if(!t)return;let n=[];FL(t,e=>{RL(n,e)});for(let e of n)at(e)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(Ae=!e,Ae&&(e=`<!-->`),typeof e!=`string`&&!Ze(e)&&(e=oR(e),typeof e!=`string`))throw eR(`dirty is not a string, aborting`);if(!t.isSupported)return e;if(ue||He(n),t.removed=[],typeof e==`string`&&(ve=!1),ve){let t=e.nodeName;if(typeof t==`string`){let e=Re(t);if(!I[e]||oe[e])throw eR(`root node is forbidden and cannot be sanitized in-place`)}at(e)}else if(e instanceof s)i=Je(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===AR.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o),at(o);else{if(!fe&&!U&&!le&&e.indexOf(`<`)===-1)return x&&me?x.createHTML(e):e;if(i=Je(e),!i)return fe?null:me?S:``}i&&de&&Ke(i.firstChild);let u=Ye(ve?e:i);for(;c=u.nextNode();)$e(c),rt(c),c.content instanceof a&&it(c.content);if(ve)return e;if(fe){if(U){i.normalize();let e=i.innerHTML;FL([ee,A,j],t=>{e=WL(e,t,` `)}),i.innerHTML=e}if(pe)for(l=E.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(re.shadowroot||re.shadowrootmode)&&(l=O.call(r,l,!0)),l}let d=le?i.outerHTML:i.innerHTML;return le&&I[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&$L(OR,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
594
- `+d),U&&FL([ee,A,j],e=>{d=WL(d,e,` `)}),x&&me?x.createHTML(d):d},t.setConfig=function(){He(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),ue=!0},t.clearConfig=function(){ze=null,ue=!1},t.isValidAttribute=function(e,t,n){return ze||He({}),et(Re(e),Re(t),n)},t.addHook=function(e,t){typeof t==`function`&&RL(k[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=IL(k[e],t);return n===-1?void 0:zL(k[e],n,1)[0]}return LL(k[e])},t.removeHooks=function(e){k[e]=[]},t.removeAllHooks=function(){k=NR()},t}var FR=PR(),IR=(0,W.lazy)(()=>w(()=>Promise.resolve().then(()=>VR).then(e=>({default:e.ProcessFlowModal})),void 0));_L.initialize({startOnLoad:!1,maxTextSize:9e5,theme:`base`,themeVariables:{primaryColor:`#1e293b`,primaryTextColor:`#f1f5f9`,primaryBorderColor:`#22d3ee`,lineColor:`#94a3b8`,secondaryColor:`#1e293b`,tertiaryColor:`#0f172a`,mainBkg:`#1e293b`,nodeBorder:`#22d3ee`,clusterBkg:`#1e293b`,clusterBorder:`#475569`,titleColor:`#f1f5f9`,edgeLabelBackground:`#0f172a`},flowchart:{curve:`basis`,padding:15,nodeSpacing:50,rankSpacing:50,htmlLabels:!0},sequence:{actorMargin:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35},fontFamily:`"JetBrains Mono", "Fira Code", monospace`,fontSize:13,suppressErrorRendering:!0}),_L.parseError=e=>{};var LR=({code:e})=>{let{t}=Nr([`graph`]),n=(0,W.useRef)(null),[r,i]=(0,W.useState)(null),[a,o]=(0,W.useState)(!1),[s,c]=(0,W.useState)(``);(0,W.useEffect)(()=>{let t=async()=>{if(n.current)try{let t=`mermaid-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,{svg:n}=await _L.render(t,e.trim());c(FR.sanitize(n,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:[`foreignObject`]})),i(null)}catch(e){console.debug(`Mermaid render skipped (incomplete):`,e)}},r=setTimeout(()=>{t()},300);return()=>clearTimeout(r)},[e]);let l=a?{id:`ai-generated`,label:t(`graph:diagram.aiGenerated`),processType:`intra_community`,steps:[],edges:[],clusters:[],rawMermaid:e}:null;return r?(0,G.jsxs)(`div`,{className:`my-3 rounded-lg border border-rose-500/30 bg-rose-500/10 p-4`,children:[(0,G.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 text-sm text-rose-300`,children:[(0,G.jsx)(Da,{className:`h-4 w-4`}),(0,G.jsx)(`span`,{className:`font-medium`,children:t(`graph:diagram.error`)})]}),(0,G.jsx)(`pre`,{className:`font-mono text-xs whitespace-pre-wrap text-rose-200/70`,children:r}),(0,G.jsxs)(`details`,{className:`mt-2`,children:[(0,G.jsx)(`summary`,{className:`cursor-pointer text-xs text-text-muted hover:text-text-secondary`,children:t(`graph:diagram.showSource`)}),(0,G.jsx)(`pre`,{className:`mt-2 overflow-x-auto rounded bg-surface p-2 text-xs text-text-muted`,children:e})]})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`group relative my-3`,children:(0,G.jsxs)(`div`,{className:`relative overflow-hidden rounded-xl border border-border-subtle bg-gradient-to-b from-surface to-elevated`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border-subtle bg-surface/60 px-3 py-2`,children:[(0,G.jsx)(`span`,{className:`text-[10px] font-medium tracking-wider text-text-muted uppercase`,children:t(`graph:diagram.label`)}),(0,G.jsx)(`button`,{onClick:()=>o(!0),className:`rounded p-1 text-text-muted transition-colors hover:bg-hover hover:text-text-primary`,title:t(`graph:diagram.expandTitle`),children:(0,G.jsx)(ra,{className:`h-3.5 w-3.5`})})]}),(0,G.jsx)(`div`,{ref:n,className:`flex max-h-[400px] items-center justify-center overflow-auto p-4`,dangerouslySetInnerHTML:{__html:FR.sanitize(s,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:[`foreignObject`]})}})]})}),a&&l&&(0,G.jsx)(W.Suspense,{fallback:(0,G.jsx)(`div`,{className:`p-4 text-sm text-text-muted`,children:t(`graph:diagram.loading`)}),children:(0,G.jsx)(IR,{process:l,onClose:()=>o(!1)})})]})},RR={...fA,'pre[class*="language-"]':{...fA[`pre[class*="language-"]`],background:`#0a0a10`,margin:0,padding:`16px 0`,fontSize:`13px`,lineHeight:`1.6`},'code[class*="language-"]':{...fA[`code[class*="language-"]`],background:`transparent`,fontFamily:`"JetBrains Mono", "Fira Code", monospace`}},zR=({content:e,onLinkClick:t,toolCalls:n,showCopyButton:r=!1})=>{let{t:i}=Nr(`common`),[a,o]=(0,W.useState)(!1),s=(0,W.useRef)(void 0);(0,W.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]);let c=async()=>{try{await navigator.clipboard.writeText(e),o(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>o(!1),2e3)}catch(e){console.error(`Failed to copy:`,e)}},l=e=>{let t=e.split("```");for(let e=0;e<t.length;e+=2)t[e]=t[e].replace(/\[\[([a-zA-Z0-9_\-./\\]+\.[a-zA-Z0-9]+(?::\d+(?:[-–]\d+)?)?)\]\]/g,(e,t)=>{let n=t.trim();return`[${n}](${`code-ref:${encodeURIComponent(n)}`})`}),t[e]=t[e].replace(/\[\[(?:graph:)?(Class|Function|Method|Interface|File|Folder|Variable|Enum|Type|CodeElement):([^\]]+)\]\]/g,(e,t,n)=>{let r=`${t}:${n.trim()}`;return`[${r}](${`node-ref:${encodeURIComponent(r)}`})`});return t.join("```")},u=W.useCallback((e,n)=>{(n.startsWith(`code-ref:`)||n.startsWith(`node-ref:`))&&(e.preventDefault(),t?.(n))},[t]),d=W.useMemo(()=>l(e),[e]),f=W.useMemo(()=>({a:({href:e,children:t,...n})=>{let r=e||``;if(r.startsWith(`code-ref:`)||r.startsWith(`node-ref:`)){let e=r.startsWith(`node-ref:`),a=decodeURIComponent(r.slice(9));return(0,G.jsx)(`a`,{href:r,onClick:e=>u(e,r),className:`code-ref-btn inline-flex items-center px-2 py-0.5 rounded-md font-mono text-[12px] !no-underline hover:!no-underline transition-colors ${e?`border border-amber-300/55 bg-amber-400/10 !text-amber-200 visited:!text-amber-200 hover:bg-amber-400/15 hover:border-amber-200/70`:`border border-cyan-300/55 bg-cyan-400/10 !text-cyan-200 visited:!text-cyan-200 hover:bg-cyan-400/15 hover:border-cyan-200/70`}`,title:i(e?`chat.viewNodeInCodePanel`:`chat.openInCodePanel`,{inner:a}),...n,children:(0,G.jsx)(`span`,{className:`text-inherit`,children:t})})}return(0,G.jsx)(`a`,{href:r,className:`text-accent underline underline-offset-2 hover:text-purple-300`,target:`_blank`,rel:`noopener noreferrer`,...n,children:t})},code:({className:e,children:t,...n})=>{let r=/language-(\w+)/.exec(e||``),i=!e&&!r,a=String(t).replace(/\n$/,``);if(i)return(0,G.jsx)(`code`,{...n,children:t});let o=r?r[1]:`text`;return o===`mermaid`?(0,G.jsx)(LR,{code:a}):(0,G.jsx)(dA,{style:RR,language:o,PreTag:`div`,customStyle:{margin:0,padding:`14px 16px`,borderRadius:`8px`,fontSize:`13px`,background:`#0a0a10`,border:`1px solid #1e1e2a`},children:a})},pre:({children:e})=>(0,G.jsx)(G.Fragment,{children:e})}),[u,i]);return(0,G.jsxs)(`div`,{className:`text-sm text-text-primary`,children:[(0,G.jsx)(ib,{remarkPlugins:[cC],urlTransform:e=>(e.startsWith(`code-ref:`)||e.startsWith(`node-ref:`),e),components:f,children:d}),r&&(0,G.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,G.jsxs)(`button`,{onClick:c,className:`flex items-center gap-1.5 rounded border border-transparent px-2 py-1 text-xs text-text-muted transition-all hover:border-border-subtle hover:bg-surface hover:text-text-primary`,title:i(`actions.copy`),children:[a?(0,G.jsx)(ji,{className:`h-3.5 w-3.5 text-emerald-400`}):(0,G.jsx)(Ri,{className:`h-3.5 w-3.5`}),(0,G.jsx)(`span`,{children:i(a?`actions.copied`:`actions.copy`)})]})}),n&&n.length>0&&(0,G.jsx)(`div`,{className:`mt-3 space-y-2`,children:n.map(e=>(0,G.jsx)(bp,{toolCall:e,defaultExpanded:!1},e.id))})]})};function BR(e){let{steps:t,edges:n,clusters:r}=e;if(!t||t.length===0)return`graph TD
593
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SL(e,t){return yL(e)||bL(e,t)||CL(e,t)||xL()}function CL(e,t){if(e){if(typeof e==`string`)return vL(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vL(e,t):void 0}}var wL=Object.entries,TL=Object.setPrototypeOf,EL=Object.isFrozen,DL=Object.getPrototypeOf,OL=Object.getOwnPropertyDescriptor,kL=Object.freeze,AL=Object.seal,jL=Object.create,ML=typeof Reflect<`u`&&Reflect,NL=ML.apply,PL=ML.construct;kL||=function(e){return e},AL||=function(e){return e},NL||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},PL||=function(e){return new e(...[...arguments].slice(1))};var FL=tR(Array.prototype.forEach),IL=tR(Array.prototype.lastIndexOf),LL=tR(Array.prototype.pop),RL=tR(Array.prototype.push),zL=tR(Array.prototype.splice),BL=Array.isArray,VL=tR(String.prototype.toLowerCase),HL=tR(String.prototype.toString),UL=tR(String.prototype.match),WL=tR(String.prototype.replace),GL=tR(String.prototype.indexOf),KL=tR(String.prototype.trim),qL=tR(Number.prototype.toString),JL=tR(Boolean.prototype.toString),YL=typeof BigInt>`u`?null:tR(BigInt.prototype.toString),XL=typeof Symbol>`u`?null:tR(Symbol.prototype.toString),ZL=tR(Object.prototype.hasOwnProperty),QL=tR(Object.prototype.toString),$L=tR(RegExp.prototype.test),eR=nR(TypeError);function tR(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return NL(e,t,n)}}function nR(e){return function(){return PL(e,[...arguments])}}function rR(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:VL;if(TL&&TL(e,null),!BL(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(EL(t)||(t[r]=e),i=e)}e[i]=!0}return e}function iR(e){for(let t=0;t<e.length;t++)ZL(e,t)||(e[t]=null);return e}function aR(e){let t=jL(null);for(let r of wL(e)){var n=SL(r,2);let i=n[0],a=n[1];ZL(e,i)&&(BL(a)?t[i]=iR(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=aR(a):t[i]=a)}return t}function oR(e){switch(typeof e){case`string`:return e;case`number`:return qL(e);case`boolean`:return JL(e);case`bigint`:return YL?YL(e):`0`;case`symbol`:return XL?XL(e):`Symbol()`;case`undefined`:return QL(e);case`function`:case`object`:{if(e===null)return QL(e);let t=e,n=sR(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:QL(e)}return QL(e)}default:return QL(e)}}function sR(e,t){for(;e!==null;){let n=OL(e,t);if(n){if(n.get)return tR(n.get);if(typeof n.value==`function`)return tR(n.value)}e=DL(e)}function n(){return null}return n}function cR(e){try{return $L(e,``),!0}catch{return!1}}var lR=kL(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),uR=kL(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),dR=kL([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),fR=kL([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),pR=kL(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),mR=kL([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),hR=kL([`#text`]),gR=kL(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),_R=kL(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),vR=kL(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),yR=kL([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),bR=AL(/{{[\w\W]*|^[\w\W]*}}/g),xR=AL(/<%[\w\W]*|^[\w\W]*%>/g),SR=AL(/\${[\w\W]*/g),CR=AL(/^data-[\-\w.\u00B7-\uFFFF]+$/),wR=AL(/^aria-[\-\w]+$/),TR=AL(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ER=AL(/^(?:\w+script|data):/i),DR=AL(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),OR=AL(/^html$/i),kR=AL(/^[a-z][.\w]*(-[.\w]+)+$/i),AR={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},jR=function(){return typeof window>`u`?null:window},MR=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},NR=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function PR(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jR(),t=e=>PR(e);if(t.version=`3.4.7`,t.removed=[],!e||!e.document||e.document.nodeType!==AR.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=sR(d,`cloneNode`),p=sR(d,`remove`),m=sR(d,`nextSibling`),h=sR(d,`childNodes`),g=sR(d,`parentNode`),_=sR(d,`shadowRoot`),v=sR(d,`attributes`),y=o&&o.prototype?sR(o.prototype,`nodeType`):null,b=o&&o.prototype?sR(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,C=n,w=C.implementation,T=C.createNodeIterator,E=C.createDocumentFragment,D=C.getElementsByTagName,O=r.importNode,k=NR();t.isSupported=typeof wL==`function`&&typeof g==`function`&&w&&w.createHTMLDocument!==void 0;let ee=bR,A=xR,j=SR,M=CR,N=wR,P=ER,te=DR,ne=kR,F=TR,I=null,L=rR({},[...lR,...uR,...dR,...pR,...hR]),re=null,ie=rR({},[...gR,..._R,...vR,...yR]),ae=Object.seal(jL(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),oe=null,R=null,z=Object.seal(jL(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),B=!0,se=!0,V=!1,H=!0,U=!1,ce=!0,le=!1,ue=!1,de=!1,fe=!1,pe=!1,me=!1,he=!0,ge=!1,W=`user-content-`,_e=!0,ve=!1,ye={},be=null,xe=rR({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Se=null,Ce=rR({},[`audio`,`video`,`img`,`source`,`image`,`track`]),we=null,Te=rR({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ee=`http://www.w3.org/1998/Math/MathML`,De=`http://www.w3.org/2000/svg`,Oe=`http://www.w3.org/1999/xhtml`,ke=Oe,Ae=!1,je=null,Me=rR({},[Ee,De,Oe],HL),Ne=rR({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Pe=rR({},[`annotation-xml`]),Fe=rR({},[`title`,`style`,`font`,`a`,`script`]),Ie=null,Le=[`application/xhtml+xml`,`text/html`],Re=null,ze=null,Be=n.createElement(`form`),Ve=function(e){return e instanceof RegExp||e instanceof Function},He=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ze&&ze===e)return;(!e||typeof e!=`object`)&&(e={}),e=aR(e),Ie=Le.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Re=Ie===`application/xhtml+xml`?HL:VL,I=ZL(e,`ALLOWED_TAGS`)&&BL(e.ALLOWED_TAGS)?rR({},e.ALLOWED_TAGS,Re):L,re=ZL(e,`ALLOWED_ATTR`)&&BL(e.ALLOWED_ATTR)?rR({},e.ALLOWED_ATTR,Re):ie,je=ZL(e,`ALLOWED_NAMESPACES`)&&BL(e.ALLOWED_NAMESPACES)?rR({},e.ALLOWED_NAMESPACES,HL):Me,we=ZL(e,`ADD_URI_SAFE_ATTR`)&&BL(e.ADD_URI_SAFE_ATTR)?rR(aR(Te),e.ADD_URI_SAFE_ATTR,Re):Te,Se=ZL(e,`ADD_DATA_URI_TAGS`)&&BL(e.ADD_DATA_URI_TAGS)?rR(aR(Ce),e.ADD_DATA_URI_TAGS,Re):Ce,be=ZL(e,`FORBID_CONTENTS`)&&BL(e.FORBID_CONTENTS)?rR({},e.FORBID_CONTENTS,Re):xe,oe=ZL(e,`FORBID_TAGS`)&&BL(e.FORBID_TAGS)?rR({},e.FORBID_TAGS,Re):aR({}),R=ZL(e,`FORBID_ATTR`)&&BL(e.FORBID_ATTR)?rR({},e.FORBID_ATTR,Re):aR({}),ye=ZL(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?aR(e.USE_PROFILES):e.USE_PROFILES:!1,B=e.ALLOW_ARIA_ATTR!==!1,se=e.ALLOW_DATA_ATTR!==!1,V=e.ALLOW_UNKNOWN_PROTOCOLS||!1,H=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,U=e.SAFE_FOR_TEMPLATES||!1,ce=e.SAFE_FOR_XML!==!1,le=e.WHOLE_DOCUMENT||!1,fe=e.RETURN_DOM||!1,pe=e.RETURN_DOM_FRAGMENT||!1,me=e.RETURN_TRUSTED_TYPE||!1,de=e.FORCE_BODY||!1,he=e.SANITIZE_DOM!==!1,ge=e.SANITIZE_NAMED_PROPS||!1,_e=e.KEEP_CONTENT!==!1,ve=e.IN_PLACE||!1,F=cR(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:TR,ke=typeof e.NAMESPACE==`string`?e.NAMESPACE:Oe,Ne=ZL(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?aR(e.MATHML_TEXT_INTEGRATION_POINTS):rR({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Pe=ZL(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?aR(e.HTML_INTEGRATION_POINTS):rR({},[`annotation-xml`]);let t=ZL(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?aR(e.CUSTOM_ELEMENT_HANDLING):jL(null);if(ae=jL(null),ZL(t,`tagNameCheck`)&&Ve(t.tagNameCheck)&&(ae.tagNameCheck=t.tagNameCheck),ZL(t,`attributeNameCheck`)&&Ve(t.attributeNameCheck)&&(ae.attributeNameCheck=t.attributeNameCheck),ZL(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(ae.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),U&&(se=!1),pe&&(fe=!0),ye&&(I=rR({},hR),re=jL(null),ye.html===!0&&(rR(I,lR),rR(re,gR)),ye.svg===!0&&(rR(I,uR),rR(re,_R),rR(re,yR)),ye.svgFilters===!0&&(rR(I,dR),rR(re,_R),rR(re,yR)),ye.mathMl===!0&&(rR(I,pR),rR(re,vR),rR(re,yR))),z.tagCheck=null,z.attributeCheck=null,ZL(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?z.tagCheck=e.ADD_TAGS:BL(e.ADD_TAGS)&&(I===L&&(I=aR(I)),rR(I,e.ADD_TAGS,Re))),ZL(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?z.attributeCheck=e.ADD_ATTR:BL(e.ADD_ATTR)&&(re===ie&&(re=aR(re)),rR(re,e.ADD_ATTR,Re))),ZL(e,`ADD_URI_SAFE_ATTR`)&&BL(e.ADD_URI_SAFE_ATTR)&&rR(we,e.ADD_URI_SAFE_ATTR,Re),ZL(e,`FORBID_CONTENTS`)&&BL(e.FORBID_CONTENTS)&&(be===xe&&(be=aR(be)),rR(be,e.FORBID_CONTENTS,Re)),ZL(e,`ADD_FORBID_CONTENTS`)&&BL(e.ADD_FORBID_CONTENTS)&&(be===xe&&(be=aR(be)),rR(be,e.ADD_FORBID_CONTENTS,Re)),_e&&(I[`#text`]=!0),le&&rR(I,[`html`,`head`,`body`]),I.table&&(rR(I,[`tbody`]),delete oe.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw eR(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw eR(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);x=e.TRUSTED_TYPES_POLICY,S=x.createHTML(``)}else x===void 0&&(x=MR(u,i)),x!==null&&typeof S==`string`&&(S=x.createHTML(``));(k.uponSanitizeElement.length>0||k.uponSanitizeAttribute.length>0)&&I===L&&(I=aR(I)),k.uponSanitizeAttribute.length>0&&re===ie&&(re=aR(re)),kL&&kL(e),ze=e},Ue=rR({},[...uR,...dR,...fR]),We=rR({},[...pR,...mR]),Ge=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:ke,tagName:`template`});let n=VL(e.tagName),r=VL(t.tagName);return je[e.namespaceURI]?e.namespaceURI===De?t.namespaceURI===Oe?n===`svg`:t.namespaceURI===Ee?n===`svg`&&(r===`annotation-xml`||Ne[r]):!!Ue[n]:e.namespaceURI===Ee?t.namespaceURI===Oe?n===`math`:t.namespaceURI===De?n===`math`&&Pe[r]:!!We[n]:e.namespaceURI===Oe?t.namespaceURI===De&&!Pe[r]||t.namespaceURI===Ee&&!Ne[r]?!1:!We[n]&&(Fe[n]||!Ue[n]):!!(Ie===`application/xhtml+xml`&&je[e.namespaceURI]):!1},Ke=function(e){RL(t.removed,{element:e});try{g(e).removeChild(e)}catch{p(e)}},qe=function(e,n){try{RL(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{RL(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(fe||pe)try{Ke(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Je=function(e){let t=null,r=null;if(de)e=`<remove></remove>`+e;else{let t=UL(e,/^[\r\n\t ]+/);r=t&&t[0]}Ie===`application/xhtml+xml`&&ke===Oe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=x?x.createHTML(e):e;if(ke===Oe)try{t=new l().parseFromString(i,Ie)}catch{}if(!t||!t.documentElement){t=w.createDocument(ke,`template`,null);try{t.documentElement.innerHTML=Ae?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),ke===Oe?D.call(t,le?`html`:`body`)[0]:le?t.documentElement:a},Ye=function(e){return T.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Xe=function(e){e.normalize();let t=T.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;){let e=n.data;FL([ee,A,j],t=>{e=WL(e,t,` `)}),n.data=e,n=t.nextNode()}},Ze=function(e){let t=b?b(e):null;return typeof t!=`string`||Re(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},Qe=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===AR.documentFragment}catch{return!1}},$e=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function et(e,n,r){FL(e,e=>{e.call(t,n,r,ze)})}let tt=function(e){let n=null;if(et(k.beforeSanitizeElements,e,null),Ze(e))return Ke(e),!0;let r=Re(e.nodeName);if(et(k.uponSanitizeElement,e,{tagName:r,allowedTags:I}),ce&&e.hasChildNodes()&&!$e(e.firstElementChild)&&$L(/<[/\w!]/g,e.innerHTML)&&$L(/<[/\w!]/g,e.textContent)||ce&&e.namespaceURI===Oe&&r===`style`&&$e(e.firstElementChild)||e.nodeType===AR.progressingInstruction||ce&&e.nodeType===AR.comment&&$L(/<[/\w]/g,e.data))return Ke(e),!0;if(oe[r]||!(z.tagCheck instanceof Function&&z.tagCheck(r))&&!I[r]){if(!oe[r]&&it(r)&&(ae.tagNameCheck instanceof RegExp&&$L(ae.tagNameCheck,r)||ae.tagNameCheck instanceof Function&&ae.tagNameCheck(r)))return!1;if(_e&&!be[r]){let t=g(e),n=h(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=f(n[i],!0);t.insertBefore(r,m(e))}}}return Ke(e),!0}return(y?y(e):e.nodeType)===AR.element&&!Ge(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&$L(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ke(e),!0):(U&&e.nodeType===AR.text&&(n=e.textContent,FL([ee,A,j],e=>{n=WL(n,e,` `)}),e.textContent!==n&&(RL(t.removed,{element:e.cloneNode()}),e.textContent=n)),et(k.afterSanitizeElements,e,null),!1)},nt=function(e,t,r){if(R[t]||he&&(t===`id`||t===`name`)&&(r in n||r in Be))return!1;let i=re[t]||z.attributeCheck instanceof Function&&z.attributeCheck(t,e);if(!(se&&!R[t]&&$L(M,t))&&!(B&&$L(N,t))){if(!i||R[t]){if(!(it(e)&&(ae.tagNameCheck instanceof RegExp&&$L(ae.tagNameCheck,e)||ae.tagNameCheck instanceof Function&&ae.tagNameCheck(e))&&(ae.attributeNameCheck instanceof RegExp&&$L(ae.attributeNameCheck,t)||ae.attributeNameCheck instanceof Function&&ae.attributeNameCheck(t,e))||t===`is`&&ae.allowCustomizedBuiltInElements&&(ae.tagNameCheck instanceof RegExp&&$L(ae.tagNameCheck,r)||ae.tagNameCheck instanceof Function&&ae.tagNameCheck(r))))return!1}else if(!we[t]&&!$L(F,WL(r,te,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&GL(r,`data:`)===0&&Se[e])&&!(V&&!$L(P,WL(r,te,``)))&&r)return!1}return!0},rt=rR({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),it=function(e){return!rt[VL(e)]&&$L(ne,e)},at=function(e){et(k.beforeSanitizeAttributes,e,null);let n=e.attributes;if(!n||Ze(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:re,forceKeepAttr:void 0},i=n.length;for(;i--;){let a=n[i],o=a.name,s=a.namespaceURI,c=a.value,l=Re(o),d=c,f=o===`value`?d:KL(d);if(r.attrName=l,r.attrValue=f,r.keepAttr=!0,r.forceKeepAttr=void 0,et(k.uponSanitizeAttribute,e,r),f=r.attrValue,ge&&(l===`id`||l===`name`)&&GL(f,W)!==0&&(qe(o,e),f=W+f),ce&&$L(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){qe(o,e);continue}if(l===`attributename`&&UL(f,`href`)){qe(o,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){qe(o,e);continue}if(!H&&$L(/\/>/i,f)){qe(o,e);continue}U&&FL([ee,A,j],e=>{f=WL(f,e,` `)});let p=Re(e.nodeName);if(!nt(p,l,f)){qe(o,e);continue}if(x&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!s)switch(u.getAttributeType(p,l)){case`TrustedHTML`:f=x.createHTML(f);break;case`TrustedScriptURL`:f=x.createScriptURL(f);break}if(f!==d)try{s?e.setAttributeNS(s,o,f):e.setAttribute(o,f),Ze(e)?Ke(e):LL(t.removed)}catch{qe(o,e)}}et(k.afterSanitizeAttributes,e,null)},ot=function(e){let t=null,n=Ye(e);for(et(k.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(et(k.uponSanitizeShadowNode,t,null),tt(t),at(t),Qe(t.content)&&ot(t.content),(y?y(t):t.nodeType)===AR.element){let e=_?_(t):t.shadowRoot;Qe(e)&&(st(e),ot(e))}et(k.afterSanitizeShadowDOM,e,null)},st=function(e){let t=y?y(e):e.nodeType;if(t===AR.element){let t=_?_(e):e.shadowRoot;Qe(t)&&(st(t),ot(t))}let n=h?h(e):e.childNodes;if(!n)return;let r=[];FL(n,e=>{RL(r,e)});for(let e of r)st(e);if(t===AR.element){let t=b?b(e):null;if(typeof t==`string`&&Re(t)===`template`){let t=e.content;Qe(t)&&st(t)}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Ae=!e,Ae&&(e=`<!-->`),typeof e!=`string`&&!$e(e)&&(e=oR(e),typeof e!=`string`))throw eR(`dirty is not a string, aborting`);if(!t.isSupported)return e;if(ue||He(n),t.removed=[],typeof e==`string`&&(ve=!1),ve){let t=b?b(e):e.nodeName;if(typeof t==`string`){let e=Re(t);if(!I[e]||oe[e])throw eR(`root node is forbidden and cannot be sanitized in-place`)}if(Ze(e))throw eR(`root node is clobbered and cannot be sanitized in-place`);st(e)}else if($e(e))i=Je(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===AR.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),st(a);else{if(!fe&&!U&&!le&&e.indexOf(`<`)===-1)return x&&me?x.createHTML(e):e;if(i=Je(e),!i)return fe?null:me?S:``}i&&de&&Ke(i.firstChild);let c=Ye(ve?e:i);for(;o=c.nextNode();)tt(o),at(o),Qe(o.content)&&ot(o.content);if(ve)return U&&Xe(e),e;if(fe){if(U&&Xe(i),pe)for(s=E.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(re.shadowroot||re.shadowrootmode)&&(s=O.call(r,s,!0)),s}let l=le?i.outerHTML:i.innerHTML;return le&&I[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&$L(OR,i.ownerDocument.doctype.name)&&(l=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
594
+ `+l),U&&FL([ee,A,j],e=>{l=WL(l,e,` `)}),x&&me?x.createHTML(l):l},t.setConfig=function(){He(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),ue=!0},t.clearConfig=function(){ze=null,ue=!1},t.isValidAttribute=function(e,t,n){return ze||He({}),nt(Re(e),Re(t),n)},t.addHook=function(e,t){typeof t==`function`&&RL(k[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=IL(k[e],t);return n===-1?void 0:zL(k[e],n,1)[0]}return LL(k[e])},t.removeHooks=function(e){k[e]=[]},t.removeAllHooks=function(){k=NR()},t}var FR=PR(),IR=(0,W.lazy)(()=>w(()=>Promise.resolve().then(()=>VR).then(e=>({default:e.ProcessFlowModal})),void 0));_L.initialize({startOnLoad:!1,maxTextSize:9e5,theme:`base`,themeVariables:{primaryColor:`#1e293b`,primaryTextColor:`#f1f5f9`,primaryBorderColor:`#22d3ee`,lineColor:`#94a3b8`,secondaryColor:`#1e293b`,tertiaryColor:`#0f172a`,mainBkg:`#1e293b`,nodeBorder:`#22d3ee`,clusterBkg:`#1e293b`,clusterBorder:`#475569`,titleColor:`#f1f5f9`,edgeLabelBackground:`#0f172a`},flowchart:{curve:`basis`,padding:15,nodeSpacing:50,rankSpacing:50,htmlLabels:!0},sequence:{actorMargin:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35},fontFamily:`"JetBrains Mono", "Fira Code", monospace`,fontSize:13,suppressErrorRendering:!0}),_L.parseError=e=>{};var LR=({code:e})=>{let{t}=Nr([`graph`]),n=(0,W.useRef)(null),[r,i]=(0,W.useState)(null),[a,o]=(0,W.useState)(!1),[s,c]=(0,W.useState)(``);(0,W.useEffect)(()=>{let t=async()=>{if(n.current)try{let t=`mermaid-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,{svg:n}=await _L.render(t,e.trim());c(FR.sanitize(n,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:[`foreignObject`]})),i(null)}catch(e){console.debug(`Mermaid render skipped (incomplete):`,e)}},r=setTimeout(()=>{t()},300);return()=>clearTimeout(r)},[e]);let l=a?{id:`ai-generated`,label:t(`graph:diagram.aiGenerated`),processType:`intra_community`,steps:[],edges:[],clusters:[],rawMermaid:e}:null;return r?(0,G.jsxs)(`div`,{className:`my-3 rounded-lg border border-rose-500/30 bg-rose-500/10 p-4`,children:[(0,G.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 text-sm text-rose-300`,children:[(0,G.jsx)(Da,{className:`h-4 w-4`}),(0,G.jsx)(`span`,{className:`font-medium`,children:t(`graph:diagram.error`)})]}),(0,G.jsx)(`pre`,{className:`font-mono text-xs whitespace-pre-wrap text-rose-200/70`,children:r}),(0,G.jsxs)(`details`,{className:`mt-2`,children:[(0,G.jsx)(`summary`,{className:`cursor-pointer text-xs text-text-muted hover:text-text-secondary`,children:t(`graph:diagram.showSource`)}),(0,G.jsx)(`pre`,{className:`mt-2 overflow-x-auto rounded bg-surface p-2 text-xs text-text-muted`,children:e})]})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`group relative my-3`,children:(0,G.jsxs)(`div`,{className:`relative overflow-hidden rounded-xl border border-border-subtle bg-gradient-to-b from-surface to-elevated`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border-subtle bg-surface/60 px-3 py-2`,children:[(0,G.jsx)(`span`,{className:`text-[10px] font-medium tracking-wider text-text-muted uppercase`,children:t(`graph:diagram.label`)}),(0,G.jsx)(`button`,{onClick:()=>o(!0),className:`rounded p-1 text-text-muted transition-colors hover:bg-hover hover:text-text-primary`,title:t(`graph:diagram.expandTitle`),children:(0,G.jsx)(ra,{className:`h-3.5 w-3.5`})})]}),(0,G.jsx)(`div`,{ref:n,className:`flex max-h-[400px] items-center justify-center overflow-auto p-4`,dangerouslySetInnerHTML:{__html:FR.sanitize(s,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:[`foreignObject`]})}})]})}),a&&l&&(0,G.jsx)(W.Suspense,{fallback:(0,G.jsx)(`div`,{className:`p-4 text-sm text-text-muted`,children:t(`graph:diagram.loading`)}),children:(0,G.jsx)(IR,{process:l,onClose:()=>o(!1)})})]})},RR={...fA,'pre[class*="language-"]':{...fA[`pre[class*="language-"]`],background:`#0a0a10`,margin:0,padding:`16px 0`,fontSize:`13px`,lineHeight:`1.6`},'code[class*="language-"]':{...fA[`code[class*="language-"]`],background:`transparent`,fontFamily:`"JetBrains Mono", "Fira Code", monospace`}},zR=({content:e,onLinkClick:t,toolCalls:n,showCopyButton:r=!1})=>{let{t:i}=Nr(`common`),[a,o]=(0,W.useState)(!1),s=(0,W.useRef)(void 0);(0,W.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]);let c=async()=>{try{await navigator.clipboard.writeText(e),o(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>o(!1),2e3)}catch(e){console.error(`Failed to copy:`,e)}},l=e=>{let t=e.split("```");for(let e=0;e<t.length;e+=2)t[e]=t[e].replace(/\[\[([a-zA-Z0-9_\-./\\]+\.[a-zA-Z0-9]+(?::\d+(?:[-–]\d+)?)?)\]\]/g,(e,t)=>{let n=t.trim();return`[${n}](${`code-ref:${encodeURIComponent(n)}`})`}),t[e]=t[e].replace(/\[\[(?:graph:)?(Class|Function|Method|Interface|File|Folder|Variable|Enum|Type|CodeElement):([^\]]+)\]\]/g,(e,t,n)=>{let r=`${t}:${n.trim()}`;return`[${r}](${`node-ref:${encodeURIComponent(r)}`})`});return t.join("```")},u=W.useCallback((e,n)=>{(n.startsWith(`code-ref:`)||n.startsWith(`node-ref:`))&&(e.preventDefault(),t?.(n))},[t]),d=W.useMemo(()=>l(e),[e]),f=W.useMemo(()=>({a:({href:e,children:t,...n})=>{let r=e||``;if(r.startsWith(`code-ref:`)||r.startsWith(`node-ref:`)){let e=r.startsWith(`node-ref:`),a=decodeURIComponent(r.slice(9));return(0,G.jsx)(`a`,{href:r,onClick:e=>u(e,r),className:`code-ref-btn inline-flex items-center px-2 py-0.5 rounded-md font-mono text-[12px] !no-underline hover:!no-underline transition-colors ${e?`border border-amber-300/55 bg-amber-400/10 !text-amber-200 visited:!text-amber-200 hover:bg-amber-400/15 hover:border-amber-200/70`:`border border-cyan-300/55 bg-cyan-400/10 !text-cyan-200 visited:!text-cyan-200 hover:bg-cyan-400/15 hover:border-cyan-200/70`}`,title:i(e?`chat.viewNodeInCodePanel`:`chat.openInCodePanel`,{inner:a}),...n,children:(0,G.jsx)(`span`,{className:`text-inherit`,children:t})})}return(0,G.jsx)(`a`,{href:r,className:`text-accent underline underline-offset-2 hover:text-purple-300`,target:`_blank`,rel:`noopener noreferrer`,...n,children:t})},code:({className:e,children:t,...n})=>{let r=/language-(\w+)/.exec(e||``),i=!e&&!r,a=String(t).replace(/\n$/,``);if(i)return(0,G.jsx)(`code`,{...n,children:t});let o=r?r[1]:`text`;return o===`mermaid`?(0,G.jsx)(LR,{code:a}):(0,G.jsx)(dA,{style:RR,language:o,PreTag:`div`,customStyle:{margin:0,padding:`14px 16px`,borderRadius:`8px`,fontSize:`13px`,background:`#0a0a10`,border:`1px solid #1e1e2a`},children:a})},pre:({children:e})=>(0,G.jsx)(G.Fragment,{children:e})}),[u,i]);return(0,G.jsxs)(`div`,{className:`text-sm text-text-primary`,children:[(0,G.jsx)(ib,{remarkPlugins:[cC],urlTransform:e=>(e.startsWith(`code-ref:`)||e.startsWith(`node-ref:`),e),components:f,children:d}),r&&(0,G.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,G.jsxs)(`button`,{onClick:c,className:`flex items-center gap-1.5 rounded border border-transparent px-2 py-1 text-xs text-text-muted transition-all hover:border-border-subtle hover:bg-surface hover:text-text-primary`,title:i(`actions.copy`),children:[a?(0,G.jsx)(ji,{className:`h-3.5 w-3.5 text-emerald-400`}):(0,G.jsx)(Ri,{className:`h-3.5 w-3.5`}),(0,G.jsx)(`span`,{children:i(a?`actions.copied`:`actions.copy`)})]})}),n&&n.length>0&&(0,G.jsx)(`div`,{className:`mt-3 space-y-2`,children:n.map(e=>(0,G.jsx)(bp,{toolCall:e,defaultExpanded:!1},e.id))})]})};function BR(e){let{steps:t,edges:n,clusters:r}=e;if(!t||t.length===0)return`graph TD
595
595
  A[No steps found]`;let i=[`graph TD`];i.push(` %% Styles`),i.push(` classDef default fill:#1e293b,stroke:#94a3b8,stroke-width:3px,color:#f8fafc,rx:10,ry:10,font-size:24px;`),i.push(` classDef entry fill:#1e293b,stroke:#34d399,stroke-width:5px,color:#f8fafc,rx:10,ry:10,font-size:24px;`),i.push(` classDef step fill:#1e293b,stroke:#22d3ee,stroke-width:3px,color:#f8fafc,rx:10,ry:10,font-size:24px;`),i.push(` classDef terminal fill:#1e293b,stroke:#f472b6,stroke-width:5px,color:#f8fafc,rx:10,ry:10,font-size:24px;`),i.push(` classDef cluster fill:#0f172a,stroke:#334155,stroke-width:3px,color:#94a3b8,rx:4,ry:4,font-size:20px;`);let a=new Map,o=[];for(let e of t)if(e.cluster){let t=a.get(e.cluster)||[];t.push(e),a.set(e.cluster,t)}else o.push(e);let s=e=>e.id.replace(/[^a-zA-Z0-9_]/g,`_`),c=e=>e.replace(/["\[\]<>{}()]/g,``).substring(0,30),l=e=>e?.split(`/`).pop()||``,u=[...t].sort((e,t)=>e.stepNumber-t.stepNumber),d=u[0]?.id,f=u[u.length-1]?.id,p=e=>e.id===d?`entry`:e.id===f?`terminal`:`step`;if(e.processType===`cross_community`&&a.size>1){let e=0;for(let[t,n]of a){i.push(` subgraph ${c(t)}["${c(t)}"]:::cluster`);for(let e of n){let t=s(e),n=`${e.stepNumber}. ${c(e.name)}`,r=l(e.filePath),a=p(e);i.push(` ${t}["${n}<br/><small>${r}</small>"]:::${a}`)}i.push(` end`),e++}for(let e of o){let t=s(e),n=`${e.stepNumber}. ${c(e.name)}`,r=l(e.filePath),a=p(e);i.push(` ${t}["${n}<br/><small>${r}</small>"]:::${a}`)}}else for(let e of t){let t=s(e),n=`${e.stepNumber}. ${c(e.name)}`,r=l(e.filePath),a=p(e);i.push(` ${t}["${n}<br/><small>${r}</small>"]:::${a}`)}if(n&&n.length>0){let e=new Map(t.map(e=>[e.id,e]));for(let t of n){let n=e.get(t.from),r=e.get(t.to);n&&r&&i.push(` ${s(n)} --> ${s(r)}`)}}else{let e=[...t].sort((e,t)=>e.stepNumber-t.stepNumber);for(let t=0;t<e.length-1;t++)i.push(` ${s(e[t])} --> ${s(e[t+1])}`)}return i.join(`
596
596
  `)}var VR=e({ProcessFlowModal:()=>HR});_L.initialize({startOnLoad:!1,suppressErrorRendering:!0,maxTextSize:9e5,theme:`base`,themeVariables:{primaryColor:`#1e293b`,primaryTextColor:`#f1f5f9`,primaryBorderColor:`#22d3ee`,lineColor:`#94a3b8`,secondaryColor:`#1e293b`,tertiaryColor:`#0f172a`,mainBkg:`#1e293b`,nodeBorder:`#22d3ee`,clusterBkg:`#1e293b`,clusterBorder:`#475569`,titleColor:`#f1f5f9`,edgeLabelBackground:`#0f172a`},flowchart:{curve:`basis`,padding:50,nodeSpacing:120,rankSpacing:140,htmlLabels:!0}}),_L.parseError=e=>{console.debug(`Mermaid parse error (suppressed):`,e)};var HR=({process:e,onClose:t,onFocusInGraph:n,isFullScreen:r=!1})=>{let{t:i}=Nr([`graph`,`common`]),a=(0,W.useRef)(null),o=(0,W.useRef)(null),s=(0,W.useRef)(null),c=r?6.67:1,l=r?30:10,[u,d]=(0,W.useState)(c),[f,p]=(0,W.useState)({x:0,y:0}),[m,h]=(0,W.useState)(!1),[g,_]=(0,W.useState)({x:0,y:0});(0,W.useEffect)(()=>{d(c),p({x:0,y:0})},[r,c]),(0,W.useEffect)(()=>{let e=e=>{e.preventDefault();let t=e.deltaY*-.001;d(e=>Math.min(Math.max(.1,e+t),l))},t=s.current;if(t)return t.addEventListener(`wheel`,e,{passive:!1}),()=>t.removeEventListener(`wheel`,e)},[e,l]),(0,W.useEffect)(()=>{let e=e=>{e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||(e.key===`+`||e.key===`=`?d(e=>Math.min(e+.2,l)):(e.key===`-`||e.key===`_`)&&d(e=>Math.max(e-.2,.1)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[l]);let v=(0,W.useCallback)(()=>{d(e=>Math.min(e+.25,l))},[l]),y=(0,W.useCallback)(()=>{d(e=>Math.max(e-.25,.1))},[]),b=(0,W.useCallback)(e=>{h(!0),_({x:e.clientX-f.x,y:e.clientY-f.y})},[f]),x=(0,W.useCallback)(e=>{m&&p({x:e.clientX-g.x,y:e.clientY-g.y})},[m,g]),S=(0,W.useCallback)(()=>{h(!1)},[]),C=(0,W.useCallback)(()=>{d(c),p({x:0,y:0})},[c]);(0,W.useEffect)(()=>{!e||!o.current||(async()=>{try{let t=e.rawMermaid?e.rawMermaid:BR(e),n=`mermaid-${Date.now()}`;o.current.innerHTML=``;let{svg:r}=await _L.render(n,t);if(!o.current)return;o.current.innerHTML=FR.sanitize(r,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:[`foreignObject`]})}catch(t){console.error(`Mermaid render error:`,t);let n=t instanceof Error?t.message:String(t),r=n.includes(`Maximum`)||n.includes(`exceeded`);o.current.innerHTML=`
597
597
  <div class="text-center p-8">
@@ -602,7 +602,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
602
602
  ${i(r?`graph:processFlow.tooComplex`:`graph:processFlow.unableToRender`,{count:e.steps?.length||0})}
603
603
  </div>
604
604
  </div>
605
- `}})()},[e,i]),(0,W.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]);let w=(0,W.useCallback)(e=>{e.target===a.current&&t()},[t]),T=(0,W.useCallback)(async()=>{if(!e)return;let t=BR(e);await navigator.clipboard.writeText(t)},[e]),E=(0,W.useCallback)(()=>{!e||!n||(n(e.steps.map(e=>e.id),e.id),t())},[e,n,t]);return e?(0,G.jsx)(`div`,{ref:a,className:`fixed inset-0 z-50 flex animate-fade-in items-center justify-center bg-black/20`,onClick:w,"data-testid":`process-modal`,children:(0,G.jsxs)(`div`,{className:`animate-scale-in relative flex flex-col overflow-hidden rounded-3xl border border-white/10 bg-slate-900/60 shadow-2xl shadow-cyan-500/10 backdrop-blur-2xl ${r?`h-[95vh] w-[98%] max-w-none`:`max-h-[90vh] w-[95%] max-w-5xl`}`,children:[(0,G.jsx)(`div`,{className:`pointer-events-none absolute inset-0 bg-gradient-to-br from-white/5 to-transparent`}),(0,G.jsx)(`div`,{className:`relative z-10 border-b border-white/10 px-6 py-5`,children:(0,G.jsx)(`h2`,{className:`text-lg font-semibold text-white`,children:i(`graph:processFlow.title`,{label:e.label})})}),(0,G.jsx)(`div`,{ref:s,className:`relative z-10 flex flex-1 items-center justify-center overflow-hidden p-8 ${r?`min-h-[70vh]`:`min-h-[400px]`}`,onMouseDown:b,onMouseMove:x,onMouseUp:S,onMouseLeave:S,style:{cursor:m?`grabbing`:`grab`},children:(0,G.jsx)(`div`,{ref:o,className:`h-fit w-fit origin-center transition-transform [&_.edgePath_.path]:stroke-slate-400 [&_.edgePath_.path]:stroke-2 [&_.marker]:fill-slate-400`,style:{transform:`translate(${f.x}px, ${f.y}px) scale(${u})`}})}),(0,G.jsxs)(`div`,{className:`relative z-10 flex items-center justify-center gap-3 border-t border-white/10 bg-slate-900/50 px-6 py-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-1 rounded-lg border border-white/10 bg-white/5 p-1`,children:[(0,G.jsx)(`button`,{onClick:y,className:`rounded-md p-2 text-slate-300 transition-all hover:bg-white/10 hover:text-white`,title:i(`graph:processFlow.zoomOutTitle`),children:(0,G.jsx)(Pa,{className:`h-4 w-4`})}),(0,G.jsxs)(`span`,{className:`min-w-[3rem] px-2 text-center font-mono text-xs text-slate-400`,children:[Math.round(u*100),`%`]}),(0,G.jsx)(`button`,{onClick:v,className:`rounded-md p-2 text-slate-300 transition-all hover:bg-white/10 hover:text-white`,title:i(`graph:processFlow.zoomInTitle`),children:(0,G.jsx)(Na,{className:`h-4 w-4`})})]}),(0,G.jsx)(`button`,{onClick:C,className:`flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 px-4 py-2.5 text-sm font-medium text-slate-300 transition-all hover:bg-white/10 hover:text-white`,title:i(`graph:processFlow.resetTitle`),children:i(`graph:processFlow.resetView`)}),n&&(0,G.jsxs)(`button`,{onClick:E,className:`flex items-center gap-2 rounded-lg bg-cyan-400 px-5 py-2.5 text-sm font-medium text-slate-900 shadow-lg shadow-cyan-500/20 transition-all hover:bg-cyan-300`,children:[(0,G.jsx)(Hi,{className:`h-4 w-4`}),i(`graph:processFlow.toggleFocus`)]}),(0,G.jsxs)(`button`,{onClick:T,className:`flex items-center gap-2 rounded-lg bg-purple-600 px-5 py-2.5 text-sm font-medium text-white shadow-lg shadow-purple-500/20 transition-all hover:bg-purple-500`,children:[(0,G.jsx)(Ri,{className:`h-4 w-4`}),i(`graph:processFlow.copyMermaid`)]}),(0,G.jsx)(`button`,{onClick:t,className:`rounded-lg border border-white/10 bg-white/5 px-5 py-2.5 text-sm font-medium text-slate-300 transition-all hover:bg-white/10 hover:text-white`,children:i(`common:actions.close`)})]})]})}):null},UR=e=>/^[a-zA-Z0-9_:.\-/@]+$/.test(e),WR=()=>{let{t:e}=Nr([`graph`]),{graph:t,runQuery:n,setHighlightedNodeIds:r,highlightedNodeIds:i}=hi(),[a,o]=(0,W.useState)(``),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(new Set([`cross`,`intra`])),[d,f]=(0,W.useState)(null),[p,m]=(0,W.useState)(null),h=(0,W.useMemo)(()=>{if(!t)return{cross:[],intra:[]};let e=t.nodes.filter(e=>e.label===`Process`),n=[],r=[];for(let t of e){let e={id:t.id,label:t.properties.heuristicLabel||t.properties.name||t.id,stepCount:t.properties.stepCount||0,clusters:t.properties.communities||[]};t.properties.processType===`cross_community`?n.push(e):r.push(e)}return n.sort((e,t)=>t.stepCount-e.stepCount),r.sort((e,t)=>t.stepCount-e.stepCount),{cross:n,intra:r}},[t]),g=(0,W.useMemo)(()=>{if(!a.trim())return h;let e=a.toLowerCase();return{cross:h.cross.filter(t=>t.label.toLowerCase().includes(e)),intra:h.intra.filter(t=>t.label.toLowerCase().includes(e))}},[h,a]),_=(0,W.useCallback)(e=>{u(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),v=(0,W.useCallback)(async()=>{f(`all`);try{let t=[...h.cross,...h.intra].map(e=>e.id).filter(UR);if(t.length===0)return;let r=new Map,i=[],a=await n(`
605
+ `}})()},[e,i]),(0,W.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]);let w=(0,W.useCallback)(e=>{e.target===a.current&&t()},[t]),T=(0,W.useCallback)(async()=>{if(!e)return;let t=BR(e);await navigator.clipboard.writeText(t)},[e]),E=(0,W.useCallback)(()=>{!e||!n||(n(e.steps.map(e=>e.id),e.id),t())},[e,n,t]);return e?(0,G.jsx)(`div`,{ref:a,className:`fixed inset-0 z-50 flex animate-fade-in items-center justify-center bg-black/20`,onClick:w,"data-testid":`process-modal`,children:(0,G.jsxs)(`div`,{className:`animate-scale-in relative flex flex-col overflow-hidden rounded-3xl border border-white/10 bg-slate-900/60 shadow-2xl shadow-cyan-500/10 backdrop-blur-2xl ${r?`h-[95vh] w-[98%] max-w-none`:`max-h-[90vh] w-[95%] max-w-5xl`}`,children:[(0,G.jsx)(`div`,{className:`pointer-events-none absolute inset-0 bg-gradient-to-br from-white/5 to-transparent`}),(0,G.jsx)(`div`,{className:`relative z-10 border-b border-white/10 px-6 py-5`,children:(0,G.jsx)(`h2`,{className:`text-lg font-semibold text-white`,children:i(`graph:processFlow.title`,{label:e.label})})}),(0,G.jsx)(`div`,{ref:s,className:`relative z-10 flex flex-1 items-center justify-center overflow-hidden p-8 ${r?`min-h-[70vh]`:`min-h-[400px]`}`,onMouseDown:b,onMouseMove:x,onMouseUp:S,onMouseLeave:S,style:{cursor:m?`grabbing`:`grab`},children:(0,G.jsx)(`div`,{ref:o,className:`h-fit w-fit origin-center transition-transform [&_.edgePath_.path]:stroke-slate-400 [&_.edgePath_.path]:stroke-2 [&_.marker]:fill-slate-400`,style:{transform:`translate(${f.x}px, ${f.y}px) scale(${u})`}})}),(0,G.jsxs)(`div`,{className:`relative z-10 flex items-center justify-center gap-3 border-t border-white/10 bg-slate-900/50 px-6 py-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-1 rounded-lg border border-white/10 bg-white/5 p-1`,children:[(0,G.jsx)(`button`,{onClick:y,className:`rounded-md p-2 text-slate-300 transition-all hover:bg-white/10 hover:text-white`,title:i(`graph:processFlow.zoomOutTitle`),children:(0,G.jsx)(Na,{className:`h-4 w-4`})}),(0,G.jsxs)(`span`,{className:`min-w-[3rem] px-2 text-center font-mono text-xs text-slate-400`,children:[Math.round(u*100),`%`]}),(0,G.jsx)(`button`,{onClick:v,className:`rounded-md p-2 text-slate-300 transition-all hover:bg-white/10 hover:text-white`,title:i(`graph:processFlow.zoomInTitle`),children:(0,G.jsx)(Pa,{className:`h-4 w-4`})})]}),(0,G.jsx)(`button`,{onClick:C,className:`flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 px-4 py-2.5 text-sm font-medium text-slate-300 transition-all hover:bg-white/10 hover:text-white`,title:i(`graph:processFlow.resetTitle`),children:i(`graph:processFlow.resetView`)}),n&&(0,G.jsxs)(`button`,{onClick:E,className:`flex items-center gap-2 rounded-lg bg-cyan-400 px-5 py-2.5 text-sm font-medium text-slate-900 shadow-lg shadow-cyan-500/20 transition-all hover:bg-cyan-300`,children:[(0,G.jsx)(Hi,{className:`h-4 w-4`}),i(`graph:processFlow.toggleFocus`)]}),(0,G.jsxs)(`button`,{onClick:T,className:`flex items-center gap-2 rounded-lg bg-purple-600 px-5 py-2.5 text-sm font-medium text-white shadow-lg shadow-purple-500/20 transition-all hover:bg-purple-500`,children:[(0,G.jsx)(Ri,{className:`h-4 w-4`}),i(`graph:processFlow.copyMermaid`)]}),(0,G.jsx)(`button`,{onClick:t,className:`rounded-lg border border-white/10 bg-white/5 px-5 py-2.5 text-sm font-medium text-slate-300 transition-all hover:bg-white/10 hover:text-white`,children:i(`common:actions.close`)})]})]})}):null},UR=e=>/^[a-zA-Z0-9_:.\-/@]+$/.test(e),WR=()=>{let{t:e}=Nr([`graph`]),{graph:t,runQuery:n,setHighlightedNodeIds:r,highlightedNodeIds:i}=hi(),[a,o]=(0,W.useState)(``),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(new Set([`cross`,`intra`])),[d,f]=(0,W.useState)(null),[p,m]=(0,W.useState)(null),h=(0,W.useMemo)(()=>{if(!t)return{cross:[],intra:[]};let e=t.nodes.filter(e=>e.label===`Process`),n=[],r=[];for(let t of e){let e={id:t.id,label:t.properties.heuristicLabel||t.properties.name||t.id,stepCount:t.properties.stepCount||0,clusters:t.properties.communities||[]};t.properties.processType===`cross_community`?n.push(e):r.push(e)}return n.sort((e,t)=>t.stepCount-e.stepCount),r.sort((e,t)=>t.stepCount-e.stepCount),{cross:n,intra:r}},[t]),g=(0,W.useMemo)(()=>{if(!a.trim())return h;let e=a.toLowerCase();return{cross:h.cross.filter(t=>t.label.toLowerCase().includes(e)),intra:h.intra.filter(t=>t.label.toLowerCase().includes(e))}},[h,a]),_=(0,W.useCallback)(e=>{u(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),v=(0,W.useCallback)(async()=>{f(`all`);try{let t=[...h.cross,...h.intra].map(e=>e.id).filter(UR);if(t.length===0)return;let r=new Map,i=[],a=await n(`
606
606
  MATCH (s)-[r:CodeRelation {type: 'STEP_IN_PROCESS'}]->(p:Process)
607
607
  WHERE p.id IN [${t.map(e=>`'${e.replace(/'/g,`''`)}'`).join(`,`)}]
608
608
  RETURN s.id AS id, s.name AS name, s.filePath AS filePath, r.step AS stepNumber