@techdocs/cli 1.0.0 → 1.1.0

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 (296) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/dist/cjs/PublisherConfig-162efac5.cjs.js.map +1 -1
  3. package/dist/cjs/{generate-143a6de3.cjs.js → generate-67f1ab98.cjs.js} +3 -1
  4. package/dist/cjs/generate-67f1ab98.cjs.js.map +1 -0
  5. package/dist/cjs/migrate-181e95f5.cjs.js.map +1 -1
  6. package/dist/cjs/{mkdocs-30f530ff.cjs.js → mkdocs-7c045a2a.cjs.js} +3 -2
  7. package/dist/cjs/{mkdocs-30f530ff.cjs.js.map → mkdocs-7c045a2a.cjs.js.map} +1 -1
  8. package/dist/cjs/{mkdocsServer-758a3ae9.cjs.js → mkdocsServer-0af6527d.cjs.js} +2 -1
  9. package/dist/cjs/mkdocsServer-0af6527d.cjs.js.map +1 -0
  10. package/dist/cjs/publish-7bf1e5f7.cjs.js.map +1 -1
  11. package/dist/cjs/{serve-21d1e885.cjs.js → serve-66a37894.cjs.js} +3 -2
  12. package/dist/cjs/{serve-21d1e885.cjs.js.map → serve-66a37894.cjs.js.map} +1 -1
  13. package/dist/cjs/utility-51f4a306.cjs.js.map +1 -1
  14. package/dist/embedded-app/.config-schema.json +9 -0
  15. package/dist/embedded-app/index.html +1 -1
  16. package/dist/embedded-app/static/{1553.925835b9.chunk.js → 1553.a26067ce.chunk.js} +1 -1
  17. package/dist/embedded-app/static/1553.a26067ce.chunk.js.map +1 -0
  18. package/dist/embedded-app/static/{1959.2eb957a4.chunk.js → 1959.38a96998.chunk.js} +1 -1
  19. package/dist/embedded-app/static/1959.38a96998.chunk.js.map +1 -0
  20. package/dist/embedded-app/static/{2426.f9952783.chunk.js → 2426.56947b7f.chunk.js} +1 -1
  21. package/dist/embedded-app/static/{8061.fd1f45d1.chunk.js.map → 2426.56947b7f.chunk.js.map} +1 -1
  22. package/dist/embedded-app/static/3860.da7e5f63.chunk.js.map +1 -1
  23. package/dist/embedded-app/static/{390.cd301478.chunk.js → 390.a67c5759.chunk.js} +1 -1
  24. package/dist/embedded-app/static/390.a67c5759.chunk.js.map +1 -0
  25. package/dist/embedded-app/static/{4022.313be9b5.chunk.js → 4022.fa355d30.chunk.js} +1 -1
  26. package/dist/embedded-app/static/4022.fa355d30.chunk.js.map +1 -0
  27. package/dist/embedded-app/static/{6235.b3634d50.chunk.js → 6235.ec27c62a.chunk.js} +1 -1
  28. package/dist/embedded-app/static/6235.ec27c62a.chunk.js.map +1 -0
  29. package/dist/embedded-app/static/{6583.c98b5125.chunk.js → 6583.9071ac96.chunk.js} +1 -1
  30. package/dist/embedded-app/static/6583.9071ac96.chunk.js.map +1 -0
  31. package/dist/embedded-app/static/{7110.527cc68b.chunk.js → 7110.7d2c1934.chunk.js} +2 -2
  32. package/dist/embedded-app/static/7110.7d2c1934.chunk.js.map +1 -0
  33. package/dist/embedded-app/static/7758.f316879f.chunk.js +3 -0
  34. package/dist/embedded-app/static/7758.f316879f.chunk.js.map +1 -0
  35. package/dist/embedded-app/static/{8061.fd1f45d1.chunk.js → 8061.ec7736bc.chunk.js} +1 -1
  36. package/dist/embedded-app/static/{4022.313be9b5.chunk.js.map → 8061.ec7736bc.chunk.js.map} +1 -1
  37. package/dist/embedded-app/static/{8718.cd7bb850.chunk.js → 8718.8f60efd2.chunk.js} +2 -2
  38. package/dist/embedded-app/static/8718.8f60efd2.chunk.js.map +1 -0
  39. package/dist/embedded-app/static/{8792.867bf73e.chunk.js → 8792.8a74fd9c.chunk.js} +1 -1
  40. package/dist/embedded-app/static/8792.8a74fd9c.chunk.js.map +1 -0
  41. package/dist/embedded-app/static/{9028.200536ea.chunk.js → 9028.77f3e990.chunk.js} +1 -1
  42. package/dist/embedded-app/static/9028.77f3e990.chunk.js.map +1 -0
  43. package/dist/embedded-app/static/main.3efd9679.js +476 -0
  44. package/dist/embedded-app/static/main.3efd9679.js.map +1 -0
  45. package/dist/embedded-app/static/module-ajv.d6f6d109.js +10 -0
  46. package/dist/embedded-app/static/module-ajv.d6f6d109.js.map +1 -0
  47. package/dist/embedded-app/static/module-aria-query.f720b73c.js +9 -0
  48. package/dist/embedded-app/static/module-aria-query.f720b73c.js.map +1 -0
  49. package/dist/embedded-app/static/module-date-fns.a08d117e.js.map +1 -1
  50. package/dist/embedded-app/static/module-hot-loader.7955a91c.js +32 -0
  51. package/dist/embedded-app/static/module-hot-loader.7955a91c.js.map +1 -0
  52. package/dist/embedded-app/static/module-jss.cb0efade.js +38 -0
  53. package/dist/embedded-app/static/module-jss.cb0efade.js.map +1 -0
  54. package/dist/embedded-app/static/{module-lodash.f158b49a.js → module-lodash.055be129.js} +1 -1
  55. package/dist/embedded-app/static/module-lodash.055be129.js.map +1 -0
  56. package/dist/embedded-app/static/module-material-table.cbad0c40.js.map +1 -1
  57. package/dist/embedded-app/static/{module-material-ui.3c0e2d92.js → module-material-ui.84a6ac87.js} +11 -11
  58. package/dist/embedded-app/static/module-material-ui.84a6ac87.js.map +1 -0
  59. package/dist/embedded-app/static/module-react-beautiful-dnd.a9014a2e.js +3 -3
  60. package/dist/embedded-app/static/module-react-beautiful-dnd.a9014a2e.js.map +1 -1
  61. package/dist/embedded-app/static/module-testing-library.633b23c6.js +57 -0
  62. package/dist/embedded-app/static/module-testing-library.633b23c6.js.map +1 -0
  63. package/dist/embedded-app/static/{module-yaml.574c3290.js → module-yaml.57b26e04.js} +1 -1
  64. package/dist/embedded-app/static/module-yaml.57b26e04.js.map +1 -0
  65. package/dist/embedded-app/static/react-syntax-highlighter/lowlight-import.c14d776e.chunk.js +1 -1
  66. package/dist/embedded-app/static/react-syntax-highlighter/lowlight-import.c14d776e.chunk.js.map +1 -1
  67. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_abnf.e6a0eba8.chunk.js.map +1 -1
  68. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_accesslog.4beaa91a.chunk.js.map +1 -1
  69. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_actionscript.292b574b.chunk.js.map +1 -1
  70. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ada.17b0c1e9.chunk.js.map +1 -1
  71. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_angelscript.2fa22084.chunk.js.map +1 -1
  72. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_apache.a966b924.chunk.js.map +1 -1
  73. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_applescript.398efb2d.chunk.js.map +1 -1
  74. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_arcade.efd9310b.chunk.js.map +1 -1
  75. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_arduino.f5b09530.chunk.js.map +1 -1
  76. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_armasm.07c7365e.chunk.js.map +1 -1
  77. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_asciidoc.e71b2b97.chunk.js.map +1 -1
  78. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_aspectj.d4578a11.chunk.js.map +1 -1
  79. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_autohotkey.fbaa0237.chunk.js.map +1 -1
  80. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_autoit.6d4c5214.chunk.js.map +1 -1
  81. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_avrasm.18f58e18.chunk.js.map +1 -1
  82. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_awk.c27dd539.chunk.js.map +1 -1
  83. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_axapta.590ecb33.chunk.js.map +1 -1
  84. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_bash.6dadcb4e.chunk.js.map +1 -1
  85. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_basic.6316c507.chunk.js.map +1 -1
  86. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_bnf.3c2aef44.chunk.js.map +1 -1
  87. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_brainfuck.5c72cafc.chunk.js.map +1 -1
  88. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_c.e9772f0f.chunk.js.map +1 -1
  89. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_cLike.df1dc03b.chunk.js.map +1 -1
  90. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_cal.ab9f187a.chunk.js.map +1 -1
  91. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_capnproto.a5523056.chunk.js.map +1 -1
  92. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ceylon.3365c59e.chunk.js.map +1 -1
  93. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_clean.41d80232.chunk.js.map +1 -1
  94. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_clojure.1f816fc6.chunk.js.map +1 -1
  95. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_clojureRepl.df5f7b77.chunk.js.map +1 -1
  96. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_cmake.1d3ebd62.chunk.js.map +1 -1
  97. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_coffeescript.7d35d62c.chunk.js.map +1 -1
  98. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_coq.18dba36b.chunk.js.map +1 -1
  99. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_cos.2a2085d6.chunk.js.map +1 -1
  100. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_cpp.bd92fb21.chunk.js.map +1 -1
  101. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_crmsh.f9f13b4d.chunk.js.map +1 -1
  102. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_crystal.92c08c0a.chunk.js.map +1 -1
  103. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_csharp.8b48e8b8.chunk.js.map +1 -1
  104. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_csp.a08eda06.chunk.js.map +1 -1
  105. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_css.04989873.chunk.js.map +1 -1
  106. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_d.daf9e0eb.chunk.js.map +1 -1
  107. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dart.2047310e.chunk.js.map +1 -1
  108. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_delphi.2e20b712.chunk.js.map +1 -1
  109. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_diff.b50d2d6c.chunk.js.map +1 -1
  110. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_django.d53e0f58.chunk.js.map +1 -1
  111. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dns.8313f2da.chunk.js.map +1 -1
  112. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dockerfile.4059e474.chunk.js.map +1 -1
  113. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dos.6e4bdd05.chunk.js.map +1 -1
  114. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dsconfig.cbf005ae.chunk.js.map +1 -1
  115. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dts.25d6bc4a.chunk.js.map +1 -1
  116. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dust.9a1225a3.chunk.js.map +1 -1
  117. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ebnf.14f00049.chunk.js.map +1 -1
  118. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_elixir.f723f0f4.chunk.js.map +1 -1
  119. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_elm.b6871fdc.chunk.js.map +1 -1
  120. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_erb.f0b33cfd.chunk.js.map +1 -1
  121. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_erlang.269e6936.chunk.js.map +1 -1
  122. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_erlangRepl.5b8fbb4b.chunk.js.map +1 -1
  123. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_excel.76415c4c.chunk.js.map +1 -1
  124. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_fix.f3d3d961.chunk.js.map +1 -1
  125. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_flix.4bab53eb.chunk.js.map +1 -1
  126. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_fortran.4d94061b.chunk.js.map +1 -1
  127. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_fsharp.38ba8914.chunk.js.map +1 -1
  128. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gams.e8178c8d.chunk.js.map +1 -1
  129. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gauss.d8121ec2.chunk.js.map +1 -1
  130. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gcode.683bb963.chunk.js.map +1 -1
  131. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gherkin.a89ed74e.chunk.js.map +1 -1
  132. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_glsl.ad325f79.chunk.js.map +1 -1
  133. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gml.8b729794.chunk.js.map +1 -1
  134. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_go.86cc8880.chunk.js.map +1 -1
  135. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_golo.df21ae57.chunk.js.map +1 -1
  136. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gradle.ccdf8a11.chunk.js.map +1 -1
  137. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_groovy.2f3d05a7.chunk.js.map +1 -1
  138. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_haml.3282d98e.chunk.js.map +1 -1
  139. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_handlebars.d75a2b1d.chunk.js.map +1 -1
  140. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_haskell.fe9946b0.chunk.js.map +1 -1
  141. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_haxe.de3c0102.chunk.js.map +1 -1
  142. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_hsp.79b4f6a1.chunk.js.map +1 -1
  143. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_htmlbars.f3762ac8.chunk.js.map +1 -1
  144. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_http.3471f585.chunk.js.map +1 -1
  145. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_hy.90970bfa.chunk.js.map +1 -1
  146. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_inform7.3a00f6f3.chunk.js.map +1 -1
  147. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ini.41e881fe.chunk.js.map +1 -1
  148. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_irpf90.f7dcd64c.chunk.js.map +1 -1
  149. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_isbl.0ef17f5f.chunk.js.map +1 -1
  150. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_java.28b8c66f.chunk.js.map +1 -1
  151. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_javascript.6b1cd365.chunk.js.map +1 -1
  152. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_jbossCli.3e9aa8ff.chunk.js.map +1 -1
  153. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_json.64a72c69.chunk.js.map +1 -1
  154. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_julia.7beb73b2.chunk.js.map +1 -1
  155. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_juliaRepl.3b16b540.chunk.js.map +1 -1
  156. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_kotlin.72e6c744.chunk.js.map +1 -1
  157. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_lasso.206ae0f8.chunk.js.map +1 -1
  158. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_latex.c8014dd5.chunk.js.map +1 -1
  159. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ldif.a987362a.chunk.js.map +1 -1
  160. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_leaf.24aff4d8.chunk.js.map +1 -1
  161. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_less.fde51777.chunk.js.map +1 -1
  162. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_lisp.3b0bfd87.chunk.js.map +1 -1
  163. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_livecodeserver.28bd16e8.chunk.js.map +1 -1
  164. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_livescript.dfedba67.chunk.js.map +1 -1
  165. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_llvm.359b16e6.chunk.js.map +1 -1
  166. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_lsl.f12ea89d.chunk.js.map +1 -1
  167. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_lua.d5869324.chunk.js.map +1 -1
  168. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_makefile.6b78bb75.chunk.js.map +1 -1
  169. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_markdown.4f56f83c.chunk.js.map +1 -1
  170. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mathematica.d2775785.chunk.js.map +1 -1
  171. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_matlab.14a1484d.chunk.js.map +1 -1
  172. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_maxima.d0446e84.chunk.js.map +1 -1
  173. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mel.02270ff9.chunk.js.map +1 -1
  174. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mercury.6f3d5a69.chunk.js.map +1 -1
  175. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mipsasm.aab1a206.chunk.js.map +1 -1
  176. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mizar.568906a3.chunk.js.map +1 -1
  177. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mojolicious.c84fcc34.chunk.js.map +1 -1
  178. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_monkey.feab688a.chunk.js.map +1 -1
  179. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_moonscript.19af75b8.chunk.js.map +1 -1
  180. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_n1ql.b2ee87fb.chunk.js.map +1 -1
  181. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_nginx.4a16400b.chunk.js.map +1 -1
  182. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_nim.9fcf8db5.chunk.js.map +1 -1
  183. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_nix.1f574423.chunk.js.map +1 -1
  184. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_nodeRepl.f2587359.chunk.js.map +1 -1
  185. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_nsis.3077a1bf.chunk.js.map +1 -1
  186. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_objectivec.9d926142.chunk.js.map +1 -1
  187. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ocaml.04b343a0.chunk.js.map +1 -1
  188. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_oneC.37768899.chunk.js.map +1 -1
  189. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_openscad.8491cf45.chunk.js.map +1 -1
  190. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_oxygene.643eb07c.chunk.js.map +1 -1
  191. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_parser3.75ed358d.chunk.js.map +1 -1
  192. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_perl.2efba989.chunk.js.map +1 -1
  193. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_pf.2186e4a7.chunk.js.map +1 -1
  194. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_pgsql.843ed847.chunk.js.map +1 -1
  195. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_php.7ea88954.chunk.js.map +1 -1
  196. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_phpTemplate.fd6719b2.chunk.js.map +1 -1
  197. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_plaintext.f1d2959a.chunk.js.map +1 -1
  198. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_pony.f0b88195.chunk.js.map +1 -1
  199. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_powershell.dce833ca.chunk.js.map +1 -1
  200. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_processing.36916075.chunk.js.map +1 -1
  201. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_profile.db33af61.chunk.js.map +1 -1
  202. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_prolog.2a05e187.chunk.js.map +1 -1
  203. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_properties.0df57f0a.chunk.js.map +1 -1
  204. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_protobuf.3e3b4e57.chunk.js.map +1 -1
  205. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_puppet.2fb0bb40.chunk.js.map +1 -1
  206. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_purebasic.a63201c1.chunk.js.map +1 -1
  207. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_python.770df37e.chunk.js.map +1 -1
  208. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_pythonRepl.3ca17ff5.chunk.js.map +1 -1
  209. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_q.d9b193e3.chunk.js.map +1 -1
  210. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_qml.616441e2.chunk.js.map +1 -1
  211. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_r.07dc3712.chunk.js.map +1 -1
  212. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_reasonml.85183415.chunk.js.map +1 -1
  213. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_rib.2ea1e5aa.chunk.js.map +1 -1
  214. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_roboconf.5075ae03.chunk.js.map +1 -1
  215. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_routeros.d33242ea.chunk.js.map +1 -1
  216. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_rsl.9c1785fc.chunk.js.map +1 -1
  217. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ruby.b7a2f7ab.chunk.js.map +1 -1
  218. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ruleslanguage.011d4ccd.chunk.js.map +1 -1
  219. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_rust.a6f6a618.chunk.js.map +1 -1
  220. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sas.110925b5.chunk.js.map +1 -1
  221. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_scala.0dddfa51.chunk.js.map +1 -1
  222. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_scheme.38da3457.chunk.js.map +1 -1
  223. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_scilab.4554b692.chunk.js.map +1 -1
  224. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_scss.a291bfd5.chunk.js.map +1 -1
  225. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_shell.c8637fd3.chunk.js.map +1 -1
  226. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_smali.095fbc33.chunk.js.map +1 -1
  227. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_smalltalk.82bb2ca1.chunk.js.map +1 -1
  228. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sml.db637ab9.chunk.js.map +1 -1
  229. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sqf.c168c06c.chunk.js.map +1 -1
  230. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sql.ace85109.chunk.js.map +1 -1
  231. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sqlMore.beecb919.chunk.js +3 -0
  232. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sqlMore.beecb919.chunk.js.map +1 -0
  233. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_stan.a5cae90b.chunk.js.map +1 -1
  234. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_stata.ded20240.chunk.js.map +1 -1
  235. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_step21.42386ad1.chunk.js.map +1 -1
  236. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_stylus.28930f5e.chunk.js.map +1 -1
  237. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_subunit.09d14bb0.chunk.js.map +1 -1
  238. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_swift.0bfd8f65.chunk.js.map +1 -1
  239. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_taggerscript.08018f04.chunk.js.map +1 -1
  240. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_tap.38941f9b.chunk.js.map +1 -1
  241. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_tcl.5c4648da.chunk.js.map +1 -1
  242. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_thrift.65eb278d.chunk.js.map +1 -1
  243. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_tp.ebc107f2.chunk.js.map +1 -1
  244. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_twig.f2a0927f.chunk.js.map +1 -1
  245. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_typescript.6c5bb667.chunk.js.map +1 -1
  246. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vala.1d0d5f49.chunk.js.map +1 -1
  247. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vbnet.26dbf652.chunk.js.map +1 -1
  248. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vbscript.918c902a.chunk.js.map +1 -1
  249. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vbscriptHtml.0448aba7.chunk.js.map +1 -1
  250. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_verilog.90bb7652.chunk.js.map +1 -1
  251. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vhdl.1cfbc65e.chunk.js.map +1 -1
  252. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vim.044bbd92.chunk.js.map +1 -1
  253. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_x86asm.e453b717.chunk.js.map +1 -1
  254. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_xl.be21301d.chunk.js.map +1 -1
  255. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_xml.1ff2db9d.chunk.js.map +1 -1
  256. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_xquery.6691a2a9.chunk.js.map +1 -1
  257. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_yaml.ecaddbf6.chunk.js.map +1 -1
  258. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_zephir.6f6db474.chunk.js.map +1 -1
  259. package/dist/embedded-app/static/runtime.3efd9679.js +4 -0
  260. package/dist/embedded-app/static/runtime.3efd9679.js.map +1 -0
  261. package/dist/embedded-app/static/vendor.3efd9679.js +117 -0
  262. package/dist/embedded-app/static/vendor.3efd9679.js.map +1 -0
  263. package/dist/index.cjs.js +4 -4
  264. package/dist/index.cjs.js.map +1 -1
  265. package/package.json +8 -8
  266. package/dist/cjs/generate-143a6de3.cjs.js.map +0 -1
  267. package/dist/cjs/mkdocsServer-758a3ae9.cjs.js.map +0 -1
  268. package/dist/embedded-app/static/1553.925835b9.chunk.js.map +0 -1
  269. package/dist/embedded-app/static/1959.2eb957a4.chunk.js.map +0 -1
  270. package/dist/embedded-app/static/2426.f9952783.chunk.js.map +0 -1
  271. package/dist/embedded-app/static/3825.b0488503.chunk.js +0 -3
  272. package/dist/embedded-app/static/3825.b0488503.chunk.js.map +0 -1
  273. package/dist/embedded-app/static/390.cd301478.chunk.js.map +0 -1
  274. package/dist/embedded-app/static/6105.6eda23ad.chunk.js +0 -3
  275. package/dist/embedded-app/static/6105.6eda23ad.chunk.js.map +0 -1
  276. package/dist/embedded-app/static/6235.b3634d50.chunk.js.map +0 -1
  277. package/dist/embedded-app/static/6583.c98b5125.chunk.js.map +0 -1
  278. package/dist/embedded-app/static/7110.527cc68b.chunk.js.map +0 -1
  279. package/dist/embedded-app/static/7758.a6ab2713.chunk.js +0 -3
  280. package/dist/embedded-app/static/7758.a6ab2713.chunk.js.map +0 -1
  281. package/dist/embedded-app/static/8718.cd7bb850.chunk.js.map +0 -1
  282. package/dist/embedded-app/static/8792.867bf73e.chunk.js.map +0 -1
  283. package/dist/embedded-app/static/9028.200536ea.chunk.js.map +0 -1
  284. package/dist/embedded-app/static/main.0b0e8219.js +0 -476
  285. package/dist/embedded-app/static/main.0b0e8219.js.map +0 -1
  286. package/dist/embedded-app/static/module-ajv.ed51f4b8.js +0 -10
  287. package/dist/embedded-app/static/module-ajv.ed51f4b8.js.map +0 -1
  288. package/dist/embedded-app/static/module-hot-loader.7c7a4226.js +0 -25
  289. package/dist/embedded-app/static/module-hot-loader.7c7a4226.js.map +0 -1
  290. package/dist/embedded-app/static/module-lodash.f158b49a.js.map +0 -1
  291. package/dist/embedded-app/static/module-material-ui.3c0e2d92.js.map +0 -1
  292. package/dist/embedded-app/static/module-yaml.574c3290.js.map +0 -1
  293. package/dist/embedded-app/static/runtime.0b0e8219.js +0 -4
  294. package/dist/embedded-app/static/runtime.0b0e8219.js.map +0 -1
  295. package/dist/embedded-app/static/vendor.0b0e8219.js +0 -140
  296. package/dist/embedded-app/static/vendor.0b0e8219.js.map +0 -1
@@ -0,0 +1,476 @@
1
+ (()=>{var Ws=Object.defineProperty;var Hs=(_,i,e)=>i in _?Ws(_,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):_[i]=e;var q=(_,i,e)=>(Hs(_,typeof i!="symbol"?i+"":i,e),e),ia=(_,i,e)=>{if(!i.has(_))throw TypeError("Cannot "+e)};var Xe=(_,i,e)=>(ia(_,i,"read from private field"),e?e.call(_):i.get(_)),gn=(_,i,e)=>{if(i.has(_))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(_):i.set(_,e)},Tn=(_,i,e,r)=>(ia(_,i,"write to private field"),r?r.call(_,e):i.set(_,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(_,i,e){"use strict";e.d(i,{n3:function(){return v},MS:function(){return m}});var r=e(48023),t=e(10179),l=e(96279),h=e.n(l);const v=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class m{constructor(s){q(this,"discoveryApi");q(this,"fetchApi");this.discoveryApi=s.discoveryApi,this.fetchApi=s.fetchApi||{fetch:h()}}async getEntityAncestors(s,f){const{kind:y,namespace:u,name:A}=(0,r.of)(s.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(u)}/${encodeURIComponent(A)}/ancestry`,f)}async getLocationById(s,f){return await this.requestOptional("GET",`/locations/${encodeURIComponent(s)}`,f)}async getEntities(s,f){const{filter:y=[],fields:u=[],offset:A,limit:C,after:R}=s!=null?s:{},L=[];for(const D of[y].flat()){const O=[];for(const[B,Q]of Object.entries(D))for(const ne of[Q].flat())ne===v?O.push(encodeURIComponent(B)):typeof ne=="string"&&O.push(`${encodeURIComponent(B)}=${encodeURIComponent(ne)}`);O.length&&L.push(`filter=${O.join(",")}`)}u.length&&L.push(`fields=${u.map(encodeURIComponent).join(",")}`),A!==void 0&&L.push(`offset=${A}`),C!==void 0&&L.push(`limit=${C}`),R!==void 0&&L.push(`after=${encodeURIComponent(R)}`);const oe=L.length?`?${L.join("&")}`:"",M=await this.requestRequired("GET",`/entities${oe}`,f),T=(D,O)=>{var ne,Te;if(((ne=D.metadata)==null?void 0:ne.name)===void 0||D.kind===void 0||((Te=O.metadata)==null?void 0:Te.name)===void 0||O.kind===void 0)return 0;const B=(0,r.eE)(D),Q=(0,r.eE)(O);return B<Q?-1:B>Q?1:0};return{items:M.sort(T)}}async getEntityByRef(s,f){const{kind:y,namespace:u,name:A}=(0,r.of)(s);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(u)}/${encodeURIComponent(A)}`,f)}async getEntityByName(s,f){const{kind:y,namespace:u="default",name:A}=s;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(u)}/${encodeURIComponent(A)}`,f)}async refreshEntity(s,f){const y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(f==null?void 0:f.token)&&{Authorization:`Bearer ${f==null?void 0:f.token}`}},method:"POST",body:JSON.stringify({entityRef:s})});if(y.status!==200)throw new Error(await y.text())}async getEntityFacets(s,f){const{filter:y=[],facets:u}=s,A=[];for(const R of[y].flat()){const L=[];for(const[oe,M]of Object.entries(R))for(const T of[M].flat())T===v?L.push(encodeURIComponent(oe)):typeof T=="string"&&L.push(`${encodeURIComponent(oe)}=${encodeURIComponent(T)}`);L.length&&A.push(`filter=${L.join(",")}`)}for(const R of u)A.push(`facet=${encodeURIComponent(R)}`);const C=A.length?`?${A.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${C}`,f)}async addLocation({type:s="url",target:f,dryRun:y},u){const A=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${y?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(u==null?void 0:u.token)&&{Authorization:`Bearer ${u==null?void 0:u.token}`}},method:"POST",body:JSON.stringify({type:s,target:f})});if(A.status!==201)throw new Error(await A.text());const{location:C,entities:R,exists:L}=await A.json();if(!C)throw new Error(`Location wasn't added: ${f}`);return{location:C,entities:R,exists:L}}async getLocationByRef(s,f){return(await this.requestRequired("GET","/locations",f)).map(u=>u.data).find(u=>s===(0,r.NZ)(u))}async removeLocationById(s,f){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(s)}`,f)}async removeEntityByUid(s,f){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(s)}`,f)}async requestIgnored(s,f,y){const u=`${await this.discoveryApi.getBaseUrl("catalog")}${f}`,A=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},C=await this.fetchApi.fetch(u,{method:s,headers:A});if(!C.ok)throw await t.VL.fromResponse(C)}async requestRequired(s,f,y){const u=`${await this.discoveryApi.getBaseUrl("catalog")}${f}`,A=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},C=await this.fetchApi.fetch(u,{method:s,headers:A});if(!C.ok)throw await t.VL.fromResponse(C);return await C.json()}async requestOptional(s,f,y){const u=`${await this.discoveryApi.getBaseUrl("catalog")}${f}`,A=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},C=await this.fetchApi.fetch(u,{method:s,headers:A});if(!C.ok){if(C.status===404)return;throw await t.VL.fromResponse(C)}return await C.json()}}},48023:function(_,i,e){"use strict";e.d(i,{Tf:function(){return l},P1:function(){return j},q1:function(){return J},M6:function(){return Y},l2:function(){return t},zG:function(){return r},w$:function(){return ce},nP:function(){return H},aS:function(){return Ve},S4:function(){return Wt},cz:function(){return Ae},iB:function(){return xe},of:function(){return He},Ou:function(){return F},eE:function(){return ke},NZ:function(){return ue}});const r="default",t="backstage.io/view-url",l="backstage.io/edit-url";var h=e(76635),v=e.n(h);class m{constructor(b=DEFAULT_NAMESPACE){q(this,"namespace");this.namespace=b}async enforce(b){return b.metadata.namespace?b:lodash.merge({metadata:{namespace:this.namespace}},b)}}class a{static isValidPrefixAndOrSuffix(b,ee,ae,Ce){if(typeof b!="string")return!1;const Re=b.split(ee);return Re.length===1?Ce(Re[0]):Re.length===2?ae(Re[0])&&Ce(Re[1]):!1}static isJsonSafe(b){try{return v().isEqual(b,JSON.parse(JSON.stringify(b)))}catch{return!1}}static isValidDnsSubdomain(b){return typeof b=="string"&&b.length>=1&&b.length<=253&&b.split(".").every(a.isValidDnsLabel)}static isValidDnsLabel(b){return typeof b=="string"&&b.length>=1&&b.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(b)}static isValidTag(b){return typeof b=="string"&&b.length>=1&&b.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(b)}static isValidUrl(b){if(typeof b!="string")return!1;try{return new URL(b),!0}catch{return!1}}static isValidString(b){var ee;return typeof b=="string"&&((ee=b==null?void 0:b.trim())==null?void 0:ee.length)>=1}static isNonEmptyString(b){var ee;return typeof b=="string"&&((ee=b==null?void 0:b.trim())==null?void 0:ee.length)>=1}}var s=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),f=e(48231),y=e.n(f),u=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),A=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}}}}'),C=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","target"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference"}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const R=new Map,L=[s,u,A,C];function oe(z){if(!(z!=null&&z.length))throw new TypeError("Unknown error");const b=z[0];throw new TypeError(`${b.instancePath||"<root>"} ${b.message}${b.params?` - ${Object.entries(b.params).map(([ee,ae])=>`${ee}: ${ae}`).join(", ")}`:""}`)}function M(z,b={}){var Qe;const ee=(Qe=b==null?void 0:b.disableCache)!=null?Qe:!1,ae=ee?"":JSON.stringify(z);if(!ee){const dt=R.get(ae);if(dt)return dt}const Ce=T(z),Re=new(y())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});Ce.length&&Re.addSchema(Ce,void 0,void 0,!0);const Oe=Re.compile(z);return ee||R.set(ae,Oe),Oe}function T(z){if(typeof z!="object")return[];const b=new Set;z.$id&&b.add(z.$id);const ee=new Array,ae=[z];for(;ae.length;){const Ce=ae.pop();for(const Re of D(Ce))if(!b.has(Re)){b.add(Re);const Oe=L.find(Qe=>Qe.$id===Re);Oe&&(ee.push(Oe),ae.push(Oe))}}return ee}function*D(z){const b=[z];for(;b.length;){const ee=b.pop();if(typeof ee=="object"&&ee)for(const[ae,Ce]of Object.entries(ee))ae==="$ref"&&typeof Ce=="string"?yield Ce.split("#")[0]:b.push(Ce)}}function O(z){const b=compileAjvSchema(z||entityEnvelopeSchema);return ee=>{if(b(ee)===!0)return ee;throw throwAjvError(b.errors)}}function B(z){const b=M(z);return ee=>{var Re;if(b(ee)===!0)return ee;const Ce=(Re=b.errors)==null?void 0:Re.filter(Oe=>["/kind","/apiVersion"].includes(Oe.instancePath));if((Ce==null?void 0:Ce.length)&&Ce.every(Oe=>Oe.keyword==="enum"))return!1;throw oe(b.errors)}}function Q(z){const b=compileAjvSchema(z||entitySchema);return ee=>{if(b(ee)===!0)return ee;throw throwAjvError(b.errors)}}class ne{static isValidApiVersion(b){return a.isValidPrefixAndOrSuffix(b,"/",a.isValidDnsSubdomain,ee=>ee.length>=1&&ee.length<=63&&/^[a-z0-9A-Z]+$/.test(ee))}static isValidKind(b){return typeof b=="string"&&b.length>=1&&b.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(b)}static isValidObjectName(b){return typeof b=="string"&&b.length>=1&&b.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(b)}static isValidNamespace(b){return a.isValidDnsLabel(b)}static isValidLabelKey(b){return a.isValidPrefixAndOrSuffix(b,"/",a.isValidDnsSubdomain,ne.isValidObjectName)}static isValidLabelValue(b){return b===""||ne.isValidObjectName(b)}static isValidAnnotationKey(b){return a.isValidPrefixAndOrSuffix(b,"/",a.isValidDnsSubdomain,ne.isValidObjectName)}static isValidAnnotationValue(b){return typeof b=="string"}}const Te={isValidApiVersion:ne.isValidApiVersion,isValidKind:ne.isValidKind,isValidEntityName:ne.isValidObjectName,isValidNamespace:ne.isValidNamespace,isValidLabelKey:ne.isValidLabelKey,isValidLabelValue:ne.isValidLabelValue,isValidAnnotationKey:ne.isValidAnnotationKey,isValidAnnotationValue:ne.isValidAnnotationValue,isValidTag:z=>typeof z=="string"&&z.length>=1&&z.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(z)};function Ye(z={}){return{...Te,...z}}class We{constructor(b=makeValidator()){q(this,"validators");this.validators=b}async enforce(b){var Oe,Qe,dt,yt,rt,st,It;function ee(Ke,N,p){if(N==null)throw new Error(`${Ke} must have a value`);let x;try{x=p(N)}catch($){throw new Error(`${Ke} could not be validated, ${$}`)}if(!x){let $;switch(p.name){case"isValidLabelValue":case"isValidObjectName":$="a string that is sequences of [a-zA-Z0-9] separated by any of [-_.], at most 63 characters in total";break;case"isValidLabelKey":case"isValidApiVersion":case"isValidAnnotationKey":$="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":$="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":$="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":$="a string";break;case"isValidKind":$="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":$="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":$="a non empty string";break;default:$=void 0;break}const G=$?` expected ${$} but found "${N}".`:"";throw new Error(`"${Ke}" is not valid;${G} To learn more about catalog file format, visit: https://github.com/backstage/backstage/blob/master/docs/architecture-decisions/adr002-default-catalog-file-format.md`)}}function ae(Ke,N,p){return N===void 0||ee(Ke,N,p)}ee("apiVersion",b.apiVersion,this.validators.isValidApiVersion),ee("kind",b.kind,this.validators.isValidKind),ee("metadata.name",b.metadata.name,this.validators.isValidEntityName),ae("metadata.namespace",b.metadata.namespace,this.validators.isValidNamespace);for(const[Ke,N]of Object.entries((Oe=b.metadata.labels)!=null?Oe:[]))ee(`labels.${Ke}`,Ke,this.validators.isValidLabelKey),ee(`labels.${Ke}`,N,this.validators.isValidLabelValue);for(const[Ke,N]of Object.entries((Qe=b.metadata.annotations)!=null?Qe:[]))ee(`annotations.${Ke}`,Ke,this.validators.isValidAnnotationKey),ee(`annotations.${Ke}`,N,this.validators.isValidAnnotationValue);const Ce=(dt=b.metadata.tags)!=null?dt:[];for(let Ke=0;Ke<Ce.length;++Ke)ee(`tags.${Ke}`,Ce[Ke],this.validators.isValidTag);const Re=(yt=b.metadata.links)!=null?yt:[];for(let Ke=0;Ke<Re.length;++Ke)ee(`links.${Ke}.url`,(rt=Re[Ke])==null?void 0:rt.url,CommonValidatorFunctions.isValidUrl),ae(`links.${Ke}.title`,(st=Re[Ke])==null?void 0:st.title,CommonValidatorFunctions.isNonEmptyString),ae(`links.${Ke}.icon`,(It=Re[Ke])==null?void 0:It.icon,KubernetesValidatorFunctions.isValidObjectName);return b}}class fe{constructor(){q(this,"validate")}async enforce(b){if(!this.validate){const Ce=new Ajv({allowUnionTypes:!0});this.validate=Ce.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(b)===!0)return b;const[ae]=this.validate.errors||[];throw ae?new Error(`Malformed envelope, ${ae.instancePath||"<root>"} ${ae.message}`):new Error("Malformed envelope, Unknown error")}}function ye(z){let b=z.indexOf(":");const ee=z.indexOf("/");ee!==-1&&ee<b&&(b=-1);const ae=b===-1?void 0:z.slice(0,b),Ce=ee===-1?void 0:z.slice(b+1,ee),Re=z.slice(Math.max(b+1,ee+1));if(ae===""||Ce===""||Re==="")throw new TypeError(`Entity reference "${z}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:ae,namespace:Ce,name:Re}}function xe(z){return{kind:z.kind,namespace:z.metadata.namespace||r,name:z.metadata.name}}function He(z,b){var Qe,dt,yt,rt;if(!z)throw new Error("Entity reference must not be empty");const ee=b==null?void 0:b.defaultKind,ae=(b==null?void 0:b.defaultNamespace)||r;let Ce,Re,Oe;if(typeof z=="string"){const st=ye(z);Ce=(Qe=st.kind)!=null?Qe:ee,Re=(dt=st.namespace)!=null?dt:ae,Oe=st.name}else Ce=(yt=z.kind)!=null?yt:ee,Re=(rt=z.namespace)!=null?rt:ae,Oe=z.name;if(Ce)if(Re){if(!Oe){const st=JSON.stringify(z);throw new Error(`Entity reference ${st} had missing or empty name`)}}else{const st=JSON.stringify(z);throw new Error(`Entity reference ${st} had missing or empty namespace`)}else{const st=JSON.stringify(z);throw new Error(`Entity reference ${st} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:Ce,namespace:Re,name:Oe}}function ke(z){var Ce,Re;let b,ee,ae;return"metadata"in z?(b=z.kind,ee=(Ce=z.metadata.namespace)!=null?Ce:r,ae=z.metadata.name):(b=z.kind,ee=(Re=z.namespace)!=null?Re:r,ae=z.name),`${b.toLocaleLowerCase("en-US")}:${ee.toLocaleLowerCase("en-US")}/${ae.toLocaleLowerCase("en-US")}`}class nt{constructor(b){this.policies=b}async enforce(b){let ee=b;for(const ae of this.policies){const Ce=await ae.enforce(ee);if(!Ce)throw new Error(`Policy ${ae.constructor.name} did not return a result`);ee=Ce}return ee}}class tt{constructor(b){this.policies=b}async enforce(b){for(const ee of this.policies){const ae=await ee.enforce(b);if(ae)return ae}throw new Error("The entity did not match any known policy")}}const be={allOf(z){return new nt(z)},oneOf(z){return new tt(z)}};var Ze=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ApiV1alpha1","description":"An API describes an interface that can be exposed by a component. The API can be defined in different formats, like OpenAPI, AsyncAPI, GraphQL, gRPC, or other formats.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"API","metadata":{"name":"artist-api","description":"Retrieve artist details","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"openapi","lifecycle":"production","owner":"artist-relations-team","system":"artist-engagement-portal","definition":"openapi: \\"3.0.0\\"\\ninfo:..."}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["API"]},"spec":{"type":"object","required":["type","lifecycle","owner","definition"],"properties":{"type":{"type":"string","description":"The type of the API definition.","examples":["openapi","asyncapi","graphql","grpc"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the API.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the API.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the API belongs to.","minLength":1},"definition":{"type":"string","description":"The definition of the API, based on the format defined by the type.","minLength":1}}}}}]}');function je(z){const b=B(z);return{async check(ee){return b(ee)===ee}}}const Je=je(Ze);var vt=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ComponentV1alpha1","description":"A Component describes a software component. It is typically intimately linked to the source code that constitutes the component, and should be what a developer may regard a \\"unit of software\\", usually with a distinct deployable or linkable artifact.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Component"]},"spec":{"type":"object","required":["type","lifecycle","owner"],"properties":{"type":{"type":"string","description":"The type of component.","examples":["service","website","library"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the component.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the component belongs to.","minLength":1},"subcomponentOf":{"type":"string","description":"An entity reference to another component of which the component is a part.","minLength":1},"providesApis":{"type":"array","description":"An array of entity references to the APIs that are provided by the component.","items":{"type":"string","minLength":1}},"consumesApis":{"type":"array","description":"An array of entity references to the APIs that are consumed by the component.","items":{"type":"string","minLength":1}},"dependsOn":{"type":"array","description":"An array of references to other entities that the component depends on to function.","items":{"type":"string","minLength":1}}}}}}]}');const Dt=je(vt);var lt=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"DomainV1alpha1","description":"A Domain groups a collection of systems that share terminology, domain models, business purpose, or documentation, i.e. form a bounded context.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Domain","metadata":{"name":"artists","description":"Everything about artists"},"spec":{"owner":"artist-relations-team"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Domain"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1}}}}}]}');const bt=je(lt);var Ft=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"GroupV1alpha1","description":"A group describes an organizational entity, such as for example a team, a business unit, or a loose collection of people in an interest group. Members of these groups are modeled in the catalog as kind User.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Group","metadata":{"name":"infrastructure","description":"The infra business unit"},"spec":{"type":"business-unit","profile":{"displayName":"Infrastructure","email":"infrastructure@example.com","picture":"https://example.com/groups/bu-infrastructure.jpeg"},"parent":"ops","children":["backstage","other"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Group"]},"spec":{"type":"object","required":["type","children"],"properties":{"type":{"type":"string","description":"The type of group. There is currently no enforced set of values for this field, so it is left up to the adopting organization to choose a nomenclature that matches their org hierarchy.","examples":["team","business-unit","product-area","root"],"minLength":1},"profile":{"type":"object","description":"Optional profile information about the group, mainly for display purposes. All fields of this structure are also optional. The email would be a group email of some form, that the group may wish to be used for contacting them. The picture is expected to be a URL pointing to an image that's representative of the group, and that a browser could fetch and render on a group page or similar.","properties":{"displayName":{"type":"string","description":"A simple display name to present to users.","examples":["Infrastructure"],"minLength":1},"email":{"type":"string","description":"An email where this entity can be reached.","examples":["infrastructure@example.com"],"minLength":1},"picture":{"type":"string","description":"The URL of an image that represents this entity.","examples":["https://example.com/groups/bu-infrastructure.jpeg"],"minLength":1}}},"parent":{"type":"string","description":"The immediate parent group in the hierarchy, if any. Not all groups must have a parent; the catalog supports multi-root hierarchies. Groups may however not have more than one parent. This field is an entity reference.","examples":["ops"],"minLength":1},"children":{"type":"array","description":"The immediate child groups of this group in the hierarchy (whose parent field points to this group). The list must be present, but may be empty if there are no child groups. The items are not guaranteed to be ordered in any particular way. The entries of this array are entity references.","items":{"type":"string","examples":["backstage","other"],"minLength":1}},"members":{"type":"array","description":"The users that are members of this group. The entries of this array are entity references.","items":{"type":"string","examples":["jdoe"],"minLength":1}}}}}}]}`);const Pt=je(Ft);var Nt=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"LocationV1alpha1","description":"A location is a marker that references other places to look for catalog data.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Location","metadata":{"name":"org-data"},"spec":{"type":"url","targets":["http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-consultants.yaml"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Location"]},"spec":{"type":"object","required":[],"properties":{"type":{"type":"string","description":"The single location type, that's common to the targets specified in the spec. If it is left out, it is inherited from the location type that originally read the entity data.","examples":["url"],"minLength":1},"target":{"type":"string","description":"A single target as a string. Can be either an absolute path/URL (depending on the type), or a relative path such as ./details/catalog-info.yaml which is resolved relative to the location of this Location entity itself.","examples":["./details/catalog-info.yaml"],"minLength":1},"targets":{"type":"array","description":"A list of targets as strings. They can all be either absolute paths/URLs (depending on the type), or relative paths such as ./details/catalog-info.yaml which are resolved relative to the location of this Location entity itself.","items":{"type":"string","examples":["./details/catalog-info.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml"],"minLength":1}},"presence":{"type":"string","description":"Whether the presence of the location target is required and it should be considered an error if it can not be found","default":"required","examples":["required"],"enum":["required","optional"]}}}}}]}`);const wt=je(Nt),Wt="ownedBy",nn="ownerOf",$t="consumesApi",ht="apiConsumedBy",Yt="providesApi",le="apiProvidedBy",H="dependsOn",ce="dependencyOf",de="parentOf",ge="childOf",De="memberOf",Ue="hasMember",Ae="partOf",Ve="hasPart";var ut=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ResourceV1alpha1","description":"A resource describes the infrastructure a system needs to operate, like BigTable databases, Pub/Sub topics, S3 buckets or CDNs. Modelling them together with components and systems allows to visualize resource footprint, and create tooling around them.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Resource","metadata":{"name":"artists-db","description":"Stores artist details"},"spec":{"type":"database","owner":"artist-relations-team","system":"artist-engagement-portal"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Resource"]},"spec":{"type":"object","required":["type","owner"],"properties":{"type":{"type":"string","description":"The type of resource.","examples":["database","s3-bucket","cluster"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the resource.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"dependsOn":{"type":"array","description":"An array of references to other entities that the resource depends on to function.","items":{"type":"string","minLength":1}},"system":{"type":"string","description":"An entity reference to the system that the resource belongs to.","minLength":1}}}}}]}');const At=je(ut);var gt=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"SystemV1alpha1","description":"A system is a collection of resources and components. The system may expose or consume one or several APIs. It is viewed as abstraction level that provides potential consumers insights into exposed features without needing a too detailed view into the details of all components. This also gives the owning team the possibility to decide about published artifacts and APIs.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"System","metadata":{"name":"artist-engagement-portal","description":"Handy tools to keep artists in the loop"},"spec":{"owner":"artist-relations-team","domain":"artists"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["System"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"domain":{"type":"string","description":"An entity reference to the domain that the system belongs to.","examples":["artists"],"minLength":1}}}}}]}');const ot=je(gt);var xt=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"UserV1alpha1","description":"A user describes a person, such as an employee, a contractor, or similar. Users belong to Group entities in the catalog. These catalog user entries are connected to the way that authentication within the Backstage ecosystem works. See the auth section of the docs for a discussion of these concepts.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"User","metadata":{"name":"jdoe"},"spec":{"profile":{"displayName":"Jenny Doe","email":"jenny-doe@example.com","picture":"https://example.com/staff/jenny-with-party-hat.jpeg"},"memberOf":["team-b","employees"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["User"]},"spec":{"type":"object","required":["memberOf"],"properties":{"profile":{"type":"object","description":"Optional profile information about the user, mainly for display purposes. All fields of this structure are also optional. The email would be a primary email of some form, that the user may wish to be used for contacting them. The picture is expected to be a URL pointing to an image that's representative of the user, and that a browser could fetch and render on a profile page or similar.","properties":{"displayName":{"type":"string","description":"A simple display name to present to users.","examples":["Jenny Doe"],"minLength":1},"email":{"type":"string","description":"An email where this user can be reached.","examples":["jenny-doe@example.com"],"minLength":1},"picture":{"type":"string","description":"The URL of an image that represents this user.","examples":["https://example.com/staff/jenny-with-party-hat.jpeg"],"minLength":1}}},"memberOf":{"type":"array","description":"The list of groups that the user is a direct member of (i.e., no transitive memberships are listed here). The list must be present, but may be empty if the user is not member of any groups. The items are not guaranteed to be ordered in any particular way. The entries of this array are entity references.","items":{"type":"string","examples":["team-b","employees"],"minLength":1}}}}}}]}`);const se=je(xt),j="backstage.io/managed-by-location",J="backstage.io/managed-by-origin-location",Y="backstage.io/source-location";function F(z){if(typeof z!="string")throw new TypeError(`Unable to parse location ref '${z}', unexpected argument ${typeof z}`);const b=z.indexOf(":");if(b<0)throw new TypeError(`Unable to parse location ref '${z}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const ee=z.substring(0,b).trim(),ae=z.substring(b+1).trim();if(!ee||!ae)throw new TypeError(`Unable to parse location ref '${z}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(ee==="http"||ee==="https")throw new TypeError(`Invalid location ref '${z}', please prefix it with 'url:', e.g. 'url:${z}'`);return{type:ee,target:ae}}function ue(z){const{type:b,target:ee}=z;if(b){if(!ee)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${b}:${ee}`}function pe(z){var ee,ae,Ce,Re,Oe;const b=(Oe=(ae=(ee=z.metadata)==null?void 0:ee.annotations)==null?void 0:ae[ANNOTATION_SOURCE_LOCATION])!=null?Oe:(Re=(Ce=z.metadata)==null?void 0:Ce.annotations)==null?void 0:Re[ANNOTATION_LOCATION];if(!b)throw new Error(`Entity '${stringifyEntityRef(z)}' is missing location`);return F(b)}},62159:function(_,i,e){"use strict";e.d(i,{m:function(){return f}});var r=e(9850),t=e.n(r),l=e(12782),h=e.n(l);const v=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function m(y){return typeof y=="object"&&y!==null&&!Array.isArray(y)}function a(y){if(y===null)return"null";if(Array.isArray(y))return"array";const u=typeof y;return u==="number"&&isNaN(y)?"nan":u==="string"&&y===""?"empty-string":u}const s={type(y,u,A,C){return`Invalid type in config for key '${y}' in '${u}', got ${A}, wanted ${C}`},missing(y){return`Missing required config value at '${y}'`},convert(y,u,A){return`Unable to convert config value for key '${y}' in '${u}' to a ${A}`}};class f{constructor(u,A="mock-config",C,R=""){q(this,"filteredKeys");q(this,"notifiedFilteredKeys",new Set);this.data=u,this.context=A,this.fallback=C,this.prefix=R}static fromConfigs(u){return u.length===0?new f(void 0):u.reduce((A,{data:C,context:R,filteredKeys:L,deprecatedKeys:oe})=>{const M=new f(C,R,A);if(M.filteredKeys=L,oe)for(const{key:T,description:D}of oe)console.warn(`The configuration key '${T}' of ${R} is deprecated and may be removed soon. ${D||""}`);return M},void 0)}has(u){var C,R;return this.readValue(u)!==void 0?!0:(R=(C=this.fallback)==null?void 0:C.has(u))!=null?R:!1}keys(){var C,R;const u=this.data?Object.keys(this.data):[],A=(R=(C=this.fallback)==null?void 0:C.keys())!=null?R:[];return[...new Set([...u,...A])]}get(u){const A=this.getOptional(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u!=null?u:"")));return A}getOptional(u){var R;const A=t()(this.readValue(u)),C=(R=this.fallback)==null?void 0:R.getOptional(u);return A===void 0?C:C===void 0?A:h()({},{value:C},{value:A},(L,oe)=>!m(oe)||!m(L)?oe:void 0).value}getConfig(u){const A=this.getOptionalConfig(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalConfig(u){var R;const A=this.readValue(u),C=(R=this.fallback)==null?void 0:R.getOptionalConfig(u);if(m(A))return this.copy(A,u,C);if(A!==void 0)throw new TypeError(s.type(this.fullKey(u),this.context,a(A),"object"));return C}getConfigArray(u){const A=this.getOptionalConfigArray(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalConfigArray(u){const A=this.readConfigValue(u,C=>{if(!Array.isArray(C))return{expected:"object-array"};for(const[R,L]of C.entries())if(!m(L))return{expected:"object-array",value:L,key:`${u}[${R}]`};return!0});if(!!A)return A.map((C,R)=>this.copy(C,`${u}[${R}]`))}getNumber(u){const A=this.getOptionalNumber(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalNumber(u){const A=this.readConfigValue(u,R=>typeof R=="number"||typeof R=="string"||{expected:"number"});if(typeof A=="number"||A===void 0)return A;const C=Number(A);if(!Number.isFinite(C))throw new Error(s.convert(this.fullKey(u),this.context,"number"));return C}getBoolean(u){const A=this.getOptionalBoolean(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalBoolean(u){return this.readConfigValue(u,A=>typeof A=="boolean"||{expected:"boolean"})}getString(u){const A=this.getOptionalString(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalString(u){return this.readConfigValue(u,A=>typeof A=="string"&&A!==""||{expected:"string"})}getStringArray(u){const A=this.getOptionalStringArray(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalStringArray(u){return this.readConfigValue(u,A=>{if(!Array.isArray(A))return{expected:"string-array"};for(const[C,R]of A.entries())if(typeof R!="string"||R==="")return{expected:"string-array",value:R,key:`${u}[${C}]`};return!0})}fullKey(u){return`${this.prefix}${this.prefix?".":""}${u}`}copy(u,A,C){const R=new f(u,this.context,C,this.fullKey(A));return R.filteredKeys=this.filteredKeys,R}readConfigValue(u,A){var L;const C=this.readValue(u);if(C===void 0)return(L=this.fallback)==null?void 0:L.readConfigValue(u,A);const R=A(C);if(R!==!0){const{key:oe=u,value:M=C,expected:T}=R;throw new TypeError(s.type(this.fullKey(oe),this.context,a(M),T))}return C}readValue(u){const A=u?u.split("."):[];for(const R of A)if(!v.test(R))throw new TypeError(`Invalid config key '${u}'`);if(this.data===void 0)return;let C=this.data;for(const[R,L]of A.entries())if(m(C))C=C[L];else if(C!==void 0){const oe=this.fullKey(A.slice(0,R).join("."));throw new TypeError(s.type(oe,this.context,a(C),"object"))}return C}}},23235:function(_,i,e){"use strict";e.d(i,{C:function(){return t}});var r=e(98005);class t{constructor(){q(this,"subject",new r.J)}post(h){this.subject.next(h)}alert$(){return this.subject}}},47150:function(_,i,e){"use strict";e.d(i,{g:function(){return r}});class r{captureEvent(l){}}},58652:function(_,i,e){"use strict";e.d(i,{C:function(){return l}});var r=e(98005);const t="theme";class l{constructor(v){q(this,"activeThemeId");q(this,"subject",new r.X(void 0));this.themes=v}static createWithStorage(v){var s;const m=new l(v);if(!window.localStorage)return m;const a=(s=window.localStorage.getItem(t))!=null?s:void 0;return m.setActiveThemeId(a),m.activeThemeId$().subscribe(f=>{f?window.localStorage.setItem(t,f):window.localStorage.removeItem(t)}),window.addEventListener("storage",f=>{var y;if(f.key===t){const u=(y=localStorage.getItem(t))!=null?y:void 0;m.setActiveThemeId(u)}}),m}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(v){this.activeThemeId=v,this.subject.next(v)}}},22053:function(_,i,e){"use strict";e.d(i,{m:function(){return r.m}});var r=e(62159)},4333:function(_,i,e){"use strict";e.d(i,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(h){const v=h.split(/\{\{\s*pluginId\s*\}\}/),m=v.join("pluginId");let a;try{a=new URL(m)}catch{throw new Error(`${r} URL '${m}' is invalid`)}if(a.hash)throw new Error(`${r} URL must not have a hash`);if(a.search)throw new Error(`${r} URL must not have a query`);if(m.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(v)}constructor(h){this.parts=h}async getBaseUrl(h){return this.parts.join(h)}}},89536:function(_,i,e){"use strict";e.d(i,{KN:function(){return r},gr:function(){return l},Jv:function(){return h}});class r{constructor(m,a){this.alertApi=m,this.errorApi=a}post(m,a){return a!=null&&a.hidden||this.alertApi.post({message:m.message,severity:"error"}),this.errorApi.post(m,a)}error$(){return this.errorApi.error$()}}var t=e(98005);class l{constructor(){q(this,"subject",new t.J)}post(m,a){this.subject.next({error:m,context:a})}error$(){return this.subject}}class h{static forward(m,a){window.addEventListener("unhandledrejection",s=>{m.post(s.reason,a)})}}},14884:function(_,i,e){"use strict";e.d(i,{b:function(){return l}});var r=e(36964);function t(h){if(h.length<3)throw new Error(`The '${h}' feature flag must have a minimum length of three characters.`);if(h.length>150)throw new Error(`The '${h}' feature flag must not exceed 150 characters.`);if(!h.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${h}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class l{constructor(){q(this,"registeredFeatureFlags",[]);q(this,"flags")}registerFlag(v){t(v.name),this.registeredFeatureFlags.push(v)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(v){return this.flags||(this.flags=this.load()),this.flags.get(v)===r.FeatureFlagState.Active}save(v){this.flags||(this.flags=this.load()),v.merge||this.flags.clear();for(const[a,s]of Object.entries(v.states))this.flags.set(a,s);const m=Array.from(this.flags.entries()).filter(([,a])=>a===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(m)))}load(){try{const v=window.localStorage.getItem("featureFlags");if(!v)return new Map;const m=JSON.parse(v);if(typeof m!="object"||m===null||Array.isArray(m))return new Map;const a=Object.entries(m).filter(([s,f])=>(t(s),f===r.FeatureFlagState.Active));return new Map(a)}catch{return new Map}}}},50160:function(_,i,e){"use strict";e.d(i,{I:function(){return a},j:function(){return r}});function r(s){var u;let f=s.baseImplementation||e.g.fetch;const y=[(u=s.middleware)!=null?u:[]].flat().reverse();for(const A of y)f=A.apply(f);return{fetch:f}}class t{static create(f){var C,R;const y=l(f),u=((C=f.header)==null?void 0:C.name)||"authorization",A=((R=f.header)==null?void 0:R.value)||(L=>`Bearer ${L}`);return new t(f.identityApi,y,u,A)}constructor(f,y,u,A){this.identityApi=f,this.allowUrl=y,this.headerName=u,this.headerValue=A}apply(f){return async(y,u)=>{const A=new Request(y,u),{token:C}=await this.identityApi.getCredentials();return A.headers.get(this.headerName)||typeof C!="string"||!C||!this.allowUrl(A.url)?f(y,u):(A.headers.set(this.headerName,this.headerValue(C)),f(A))}}}function l(s){return s.allowUrl?s.allowUrl:s.urlPrefixAllowlist?h(s.urlPrefixAllowlist):s.config?h([s.config.getString("backend.baseUrl")]):()=>!1}function h(s){const f=s.map(y=>y.replace(/\/$/,""));return y=>f.some(u=>y===u||y.startsWith(`${u}/`))}function v(s,f){return!f||f==="/"?s:`${s.replace(/\/$/,"")}/${f.replace(/^\//,"")}`}class m{constructor(f){this.discoveryApi=f}apply(f){return async(y,u)=>{const A=new Request(y,u),C="plugin://";if(!A.url.startsWith(C))return f(y,u);const{hostname:R,pathname:L,search:oe,hash:M,username:T,password:D}=new URL(`http://${A.url.substring(C.length)}`);let O=await this.discoveryApi.getBaseUrl(R);if(T||D){const Q=new URL(O),ne=`${T}${D?`:${D}`:""}@`;O=`${Q.protocol}//${ne}${Q.host}${Q.pathname}`}const B=`${v(O,L)}${oe}${M}`;return f(B,typeof y=="string"?u:y)}}}class a{static resolvePluginProtocol(f){return new m(f.discoveryApi)}static injectIdentityAuth(f){return t.create(f)}constructor(){}}},11358:function(_,i,e){"use strict";e.d(i,{Y:function(){return v}});var r=e(98005);function t(m,a){for(const s of a)if(!m.has(s))return!1;return!0}function l(m,...a){const s=new Set(m);for(const f of a)for(const y of f)s.add(y);return s}class h{constructor(){q(this,"requests",[]);q(this,"subject",new r.X(this.getCurrentPending()))}request(a){return new Promise((s,f)=>{this.requests.push({scopes:a,resolve:s,reject:f}),this.subject.next(this.getCurrentPending())})}resolve(a,s){this.requests=this.requests.filter(f=>t(a,f.scopes)?(f.resolve(s),!1):!0),this.subject.next(this.getCurrentPending())}reject(a){this.requests.forEach(s=>s.reject(a)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const a=this.requests.length===0?void 0:this.requests.slice(1).reduce((s,f)=>l(s,f.scopes),this.requests[0].scopes);return{scopes:a,resolve:s=>{a&&this.resolve(a,s)},reject:s=>{a&&this.reject(s)}}}}class v{constructor(){q(this,"subject",new r.X([]));q(this,"currentRequests",[]);q(this,"handlerCount",0)}createAuthRequester(a){const s=new h,f=this.handlerCount;return this.handlerCount++,s.pending().subscribe({next:y=>{const u=this.currentRequests.slice(),A=this.makeAuthRequest(y,a);A?u[f]=A:delete u[f],this.currentRequests=u,this.subject.next(u.filter(Boolean))}}),y=>s.request(y)}makeAuthRequest(a,s){const{scopes:f}=a;if(!!f)return{provider:s.provider,trigger:async()=>{const y=await s.onAuthRequest(f);a.resolve(y)},reject:()=>{const y=new Error("Login failed, rejected by user");y.name="RejectedError",a.reject(y)}}}authRequest$(){return this.subject}}},56054:function(_,i,e){"use strict";e.d(i,{C:function(){return h}});var r=e(82394),t=e.n(r);const l=new Map;class h{constructor(m,a){q(this,"subscribers",new Set);q(this,"observable",new(t())(m=>(this.subscribers.add(m),()=>{this.subscribers.delete(m)})));this.namespace=m,this.errorApi=a}static create(m){var a;return new h((a=m.namespace)!=null?a:"",m.errorApi)}get(m){return this.snapshot(m).value}snapshot(m){let a,s="absent";try{const f=localStorage.getItem(this.getKeyName(m));f&&(a=JSON.parse(f,(y,u)=>(typeof u=="object"&&u!==null&&Object.freeze(u),u)),s="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${m}`))}return{key:m,value:a,presence:s}}forBucket(m){const a=`${this.namespace}/${m}`;return l.has(a)||l.set(a,new h(a,this.errorApi)),l.get(a)}async set(m,a){localStorage.setItem(this.getKeyName(m),JSON.stringify(a)),this.notifyChanges(m)}async remove(m){localStorage.removeItem(this.getKeyName(m)),this.notifyChanges(m)}observe$(m){return this.observable.filter(({key:a})=>a===m)}getKeyName(m){return`${this.namespace}/${encodeURIComponent(m)}`}notifyChanges(m){const a=this.snapshot(m);for(const s of this.subscribers)s.next(a)}}},59589:function(_,i,e){"use strict";e.d(i,{u:function(){return l}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:f}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:s,environment:a})}}},6098:function(_,i,e){"use strict";e.d(i,{Z:function(){return l}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class l{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:f,defaultScopes:y=["team"]}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:s,environment:a,defaultScopes:y})}}},44431:function(_,i,e){"use strict";e.d(i,{BitbucketAuth:function(){return l.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(i,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(i,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(i,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var l=e(6098)},19347:function(){},44474:function(_,i,e){"use strict";e.d(i,{T:function(){return l}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class l{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:f,defaultScopes:y=["read:user"]}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:s,environment:a,defaultScopes:y})}}},2922:function(_,i,e){"use strict";e.d(i,{a:function(){return l}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class l{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:f,defaultScopes:y=["read_user"]}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:s,environment:a,defaultScopes:y})}}},59938:function(_,i,e){"use strict";e.d(i,{e:function(){return h}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},l="https://www.googleapis.com/auth/";class h{static create(m){const{discoveryApi:a,oauthRequestApi:s,environment:f="development",provider:y=t,defaultScopes:u=["openid",`${l}userinfo.email`,`${l}userinfo.profile`]}=m;return r.OAuth2.create({discoveryApi:a,oauthRequestApi:s,provider:y,environment:f,defaultScopes:u,scopeTransform(A){return A.map(C=>C==="openid"?C:C==="profile"||C==="email"?`${l}userinfo.${C}`:C.startsWith(l)?C:`${l}${C}`)}})}}},91668:function(_,i,e){"use strict";e.d(i,{AtlassianAuth:function(){return y.u},BitbucketAuth:function(){return f.BitbucketAuth},GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return l.e},MicrosoftAuth:function(){return a._},OktaAuth:function(){return v.s},OneLoginAuth:function(){return s.$}});var r=e(44474),t=e(2922),l=e(59938),h=e(91205);e.o(h,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return h.AlertApiForwarder}}),e.o(h,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return h.AppThemeSelector}}),e.o(h,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return h.AtlassianAuth}}),e.o(h,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return h.BitbucketAuth}}),e.o(h,"ConfigReader")&&e.d(i,{ConfigReader:function(){return h.ConfigReader}}),e.o(h,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return h.ErrorAlerter}}),e.o(h,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return h.ErrorApiForwarder}}),e.o(h,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return h.FetchMiddlewares}}),e.o(h,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return h.FlatRoutes}}),e.o(h,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return h.LocalStorageFeatureFlags}}),e.o(h,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return h.MicrosoftAuth}}),e.o(h,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return h.NoOpAnalyticsApi}}),e.o(h,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return h.OAuthRequestManager}}),e.o(h,"OktaAuth")&&e.d(i,{OktaAuth:function(){return h.OktaAuth}}),e.o(h,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return h.OneLoginAuth}}),e.o(h,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return h.UnhandledErrorForwarder}}),e.o(h,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return h.UrlPatternDiscovery}}),e.o(h,"WebStorage")&&e.d(i,{WebStorage:function(){return h.WebStorage}}),e.o(h,"createFetchApi")&&e.d(i,{createFetchApi:function(){return h.createFetchApi}}),e.o(h,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return h.createSpecializedApp}}),e.o(h,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return h.defaultConfigLoader}});var v=e(26079),m=e(67604),a=e(38482),s=e(58381),f=e(44431);e.o(f,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"ConfigReader")&&e.d(i,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(i,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(i,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return f.createSpecializedApp}}),e.o(f,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return f.defaultConfigLoader}});var y=e(59589)},38482:function(_,i,e){"use strict";e.d(i,{_:function(){return l}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class l{static create(v){const{environment:m="development",provider:a=t,oauthRequestApi:s,discoveryApi:f,defaultScopes:y=["openid","offline_access","profile","email","User.Read"]}=v;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:s,provider:a,environment:m,defaultScopes:y})}}},73124:function(_,i,e){"use strict";e.d(i,{Z:function(){return m}});function r(a){return new Promise((s,f)=>{const y=a.width||500,u=a.height||700,A=window.screen.width/2-y/2,C=window.screen.height/2-u/2,R=window.open(a.url,a.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${y},height=${u},top=${C},left=${A}`);let L="";if(!R||typeof R.closed=="undefined"||R.closed){const D=new Error("Failed to open auth popup.");D.name="PopupRejectedError",f(D);return}const oe=D=>{if(D.source!==R||D.origin!==a.origin)return;const{data:O}=D;if(O.type==="config_info"){L=O.targetOrigin;return}if(O.type!=="authorization_response")return;const B=O;if("error"in B){const Q=new Error(B.error.message);Q.name=B.error.name,f(Q)}else s(B.response);T()},M=setInterval(()=>{if(R.closed){const D=`Login failed, ${L&&L!==window.location.origin?`Incorrect app origin, expected ${L}`:"popup was closed"}`,O=new Error(D);O.name="PopupClosedError",f(O),T()}},100);function T(){window.removeEventListener("message",oe),clearInterval(M)}window.addEventListener("message",oe)})}function t(a){return[...a].join(" ")}class l{constructor(s){q(this,"discoveryApi");q(this,"environment");q(this,"provider");q(this,"joinScopesFunc");q(this,"authRequester");q(this,"sessionTransform");const{discoveryApi:f,environment:y,provider:u,joinScopes:A=t,oauthRequestApi:C,sessionTransform:R=L=>L}=s;this.authRequester=C.createAuthRequester({provider:u,onAuthRequest:L=>this.showPopup(L)}),this.discoveryApi=f,this.environment=y,this.provider=u,this.joinScopesFunc=A,this.sessionTransform=R}async createSession(s){return s.instantPopup?this.showPopup(s.scopes):this.authRequester(s.scopes)}async refreshSession(){const s=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(y=>{throw new Error(`Auth refresh request failed, ${y}`)});if(!s.ok){const y=new Error(`Auth refresh request failed, ${s.statusText}`);throw y.status=s.status,y}const f=await s.json();if(f.error){const y=new Error(f.error.message);throw f.error.name&&(y.name=f.error.name),y}return await this.sessionTransform(f)}async removeSession(){const s=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(f=>{throw new Error(`Logout request failed, ${f}`)});if(!s.ok){const f=new Error(`Logout request failed, ${s.statusText}`);throw f.status=s.status,f}}async showPopup(s){const f=this.joinScopesFunc(s),y=await this.buildUrl("/start",{scope:f,origin:location.origin}),u=await r({url:y,name:`${this.provider.title} Login`,origin:new URL(y).origin,width:450,height:730});return await this.sessionTransform(u)}async buildUrl(s,f){const y=await this.discoveryApi.getBaseUrl("auth"),u=this.buildQueryString({...f,env:this.environment});return`${y}/${this.provider.id}${s}${u}`}buildQueryString(s){if(!s)return"";const f=Object.entries(s).map(([y,u])=>{if(typeof u=="string")return`${encodeURIComponent(y)}=${encodeURIComponent(u)}`;if(u)return encodeURIComponent(y)}).filter(Boolean).join("&");return f?`?${f}`:""}}var h=e(57018);const v={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class m{constructor(s){q(this,"sessionManager");q(this,"scopeTransform");this.sessionManager=s.sessionManager,this.scopeTransform=s.scopeTransform}static create(s){const{discoveryApi:f,environment:y="development",provider:u=v,oauthRequestApi:A,defaultScopes:C=[],scopeTransform:R=M=>M}=s,L=new l({discoveryApi:f,environment:y,provider:u,oauthRequestApi:A,sessionTransform(M){return{...M,providerInfo:{idToken:M.providerInfo.idToken,accessToken:M.providerInfo.accessToken,scopes:m.normalizeScopes(R,M.providerInfo.scope),expiresAt:new Date(Date.now()+M.providerInfo.expiresInSeconds*1e3)}}}}),oe=new h.RefreshingAuthSessionManager({connector:L,defaultScopes:new Set(C),sessionScopes:M=>M.providerInfo.scopes,sessionShouldRefresh:M=>(M.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new m({sessionManager:oe,scopeTransform:R})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(s,f){var A;const y=m.normalizeScopes(this.scopeTransform,s),u=await this.sessionManager.getSession({...f,scopes:y});return(A=u==null?void 0:u.providerInfo.accessToken)!=null?A:""}async getIdToken(s={}){var y;const f=await this.sessionManager.getSession(s);return(y=f==null?void 0:f.providerInfo.idToken)!=null?y:""}async getBackstageIdentity(s={}){const f=await this.sessionManager.getSession(s);return f==null?void 0:f.backstageIdentity}async getProfile(s={}){const f=await this.sessionManager.getSession(s);return f==null?void 0:f.profile}static normalizeScopes(s,f){if(!f)return new Set;const y=Array.isArray(f)?f:f.split(/[\s|,]/).filter(Boolean);return new Set(s(y))}}},91205:function(_,i,e){"use strict";e.d(i,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),l=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(i,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(i,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(i,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(i,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(_,i,e){"use strict";e.d(i,{s:function(){return v}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),h="okta.";class v{static create(a){const{discoveryApi:s,environment:f="development",provider:y=t,oauthRequestApi:u,defaultScopes:A=["openid","email","profile","offline_access"]}=a;return r.OAuth2.create({discoveryApi:s,oauthRequestApi:u,provider:y,environment:f,defaultScopes:A,scopeTransform(C){return C.map(R=>l.has(R)||R.startsWith(h)?R:`${h}${R}`)}})}}},58381:function(_,i,e){"use strict";e.d(i,{$:function(){return v}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),h="onelogin.";class v{static create(a){const{discoveryApi:s,environment:f="development",provider:y=t,oauthRequestApi:u}=a;return r.OAuth2.create({discoveryApi:s,oauthRequestApi:u,provider:y,environment:f,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(A){return A.map(C=>l.has(C)||C.startsWith(h)?C:`${h}${C}`)}})}}},67604:function(_,i,e){"use strict";var r=e(57018),t=e(30195);const l=t.z.object({profile:t.z.object({email:t.z.string().optional(),displayName:t.z.string().optional(),picture:t.z.string().optional()}),backstageIdentity:t.z.object({id:t.z.string(),token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),h={id:"saml",title:"SAML",icon:()=>null};class v{static create(a){const{discoveryApi:s,environment:f="development",provider:y=h}=a,u=new DirectAuthConnector({discoveryApi:s,environment:f,provider:y}),A=new StaticAuthSessionManager({connector:u}),C=new AuthSessionStore({manager:A,storageKey:`${y.id}Session`,schema:samlSessionSchema});return new v(C)}sessionState$(){return this.sessionManager.sessionState$()}constructor(a){this.sessionManager=a}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(a={}){const s=await this.sessionManager.getSession(a);return s==null?void 0:s.backstageIdentity}async getProfile(a={}){const s=await this.sessionManager.getSession(a);return s==null?void 0:s.profile}}},91631:function(_,i,e){"use strict";e.d(i,{AlertApiForwarder:function(){return t.C},AppThemeSelector:function(){return h.C},AtlassianAuth:function(){return r.AtlassianAuth},ConfigReader:function(){return v.m},ErrorAlerter:function(){return a.KN},ErrorApiForwarder:function(){return a.gr},FetchMiddlewares:function(){return f.I},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},LocalStorageFeatureFlags:function(){return s.b},MicrosoftAuth:function(){return r.MicrosoftAuth},NoOpAnalyticsApi:function(){return l.g},OAuthRequestManager:function(){return y.Y},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},UnhandledErrorForwarder:function(){return a.Jv},UrlPatternDiscovery:function(){return m.p},WebStorage:function(){return u.C},createFetchApi:function(){return f.j}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(i,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(i,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(i,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(23235),l=e(47150),h=e(58652),v=e(22053),m=e(4333),a=e(89536),s=e(14884),f=e(50160),y=e(11358),u=e(56054)},56494:function(_,i,e){"use strict";e.d(i,{AlertApiForwarder:function(){return t.AlertApiForwarder},ApiProvider:function(){return r.ApiProvider},AppThemeSelector:function(){return t.AppThemeSelector},ConfigReader:function(){return t.ConfigReader},ErrorAlerter:function(){return t.ErrorAlerter},ErrorApiForwarder:function(){return t.ErrorApiForwarder},FetchMiddlewares:function(){return t.FetchMiddlewares},LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags},NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi},OAuthRequestManager:function(){return t.OAuthRequestManager},UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return t.UrlPatternDiscovery},WebStorage:function(){return t.WebStorage},createFetchApi:function(){return t.createFetchApi}});var r=e(76105);e.o(r,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(i,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(i,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"OktaAuth")&&e.d(i,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(i,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(i,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(91631);e.o(t,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(i,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(i,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},80396:function(_,i,e){"use strict";e.d(i,{p:function(){return t}});var r;(function(l){l[l.default=10]="default";const h=50;l[l.app=h]="app",l[l.static=100]="static"})(r||(r={}));class t{constructor(){q(this,"factories",new Map)}register(h,v){const m=r[h],a=this.factories.get(v.api.id);return a&&a.priority>=m?!1:(this.factories.set(v.api.id,{priority:m,factory:v}),!0)}get(h){const v=this.factories.get(h.id);if(!!v)return v.factory}getAllApis(){const h=new Set;for(const{factory:v}of this.factories.values())h.add(v.api);return h}}},14406:function(_,i,e){"use strict";e.d(i,{g:function(){return a}});var r=e(2784),t=e(13980),l=e.n(t);class h{constructor(...f){q(this,"holders");this.holders=f}get(f){for(const y of this.holders){const u=y.get(f);if(u)return u}}}var v=e(76241);const m=(0,v.CT)("api-context"),a=s=>{var C;const{apis:f,children:y}=s,u=(C=(0,r.useContext)(m))==null?void 0:C.atVersion(1),A=u?new h(f,u):f;return r.createElement(m.Provider,{value:(0,v.EI)({1:A}),children:y})};a.propTypes={apis:l().shape({get:l().func.isRequired}).isRequired,children:l().node}},12132:function(_,i,e){"use strict";e.d(i,{M:function(){return r}});class r{constructor(l){q(this,"apis",new Map);this.factories=l}static validateFactories(l,h){for(const v of h){const m=[v],a=new Set;for(;m.length;){const s=m.shift(),f=l.get(s);if(!!f)for(const y of Object.values(f.deps)){if(y.id===v.id)throw new Error(`Circular dependency of api factory for ${v}`);a.has(y)||(a.add(y),m.push(y))}}}}get(l){return this.load(l)}load(l,h=[]){const v=this.apis.get(l.id);if(v)return v;const m=this.factories.get(l);if(!m)return;if(h.includes(m.api))throw new Error(`Circular dependency of api factory for ${m.api}`);const a=this.loadDeps(l,m.deps,[...h,m.api]),s=m.factory(a);return this.apis.set(l.id,s),s}loadDeps(l,h,v){const m={};for(const a in h)if(h.hasOwnProperty(a)){const s=h[a],f=this.load(s,v);if(!f)throw new Error(`No API factory available for dependency ${s} of dependent ${l}`);m[a]=f}return m}}},76105:function(_,i,e){"use strict";e.d(i,{ApiFactoryRegistry:function(){return l.p},ApiProvider:function(){return r.g},ApiResolver:function(){return t.M}});var r=e(14406),t=e(12132),l=e(80396),h=e(82488),v=e.n(h);e.o(h,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return h.AlertApiForwarder}}),e.o(h,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return h.AppThemeSelector}}),e.o(h,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return h.AtlassianAuth}}),e.o(h,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return h.BitbucketAuth}}),e.o(h,"ConfigReader")&&e.d(i,{ConfigReader:function(){return h.ConfigReader}}),e.o(h,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return h.ErrorAlerter}}),e.o(h,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return h.ErrorApiForwarder}}),e.o(h,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return h.FetchMiddlewares}}),e.o(h,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return h.FlatRoutes}}),e.o(h,"GithubAuth")&&e.d(i,{GithubAuth:function(){return h.GithubAuth}}),e.o(h,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return h.GitlabAuth}}),e.o(h,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return h.GoogleAuth}}),e.o(h,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return h.LocalStorageFeatureFlags}}),e.o(h,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return h.MicrosoftAuth}}),e.o(h,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return h.NoOpAnalyticsApi}}),e.o(h,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return h.OAuthRequestManager}}),e.o(h,"OktaAuth")&&e.d(i,{OktaAuth:function(){return h.OktaAuth}}),e.o(h,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return h.OneLoginAuth}}),e.o(h,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return h.UnhandledErrorForwarder}}),e.o(h,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return h.UrlPatternDiscovery}}),e.o(h,"WebStorage")&&e.d(i,{WebStorage:function(){return h.WebStorage}}),e.o(h,"createFetchApi")&&e.d(i,{createFetchApi:function(){return h.createFetchApi}}),e.o(h,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return h.createSpecializedApp}}),e.o(h,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return h.defaultConfigLoader}})},82488:function(){},82370:function(_,i,e){"use strict";e.d(i,{b:function(){return Yt}});var r=e(2784),t=e(10289),l=e(64279),h=e(56494),v=e(36964),m=e(76105);function a(le){const H={};for(const de in le.collectors)le.collectors.hasOwnProperty(de)&&(H[de]=le.collectors[de]());const ce=[{node:r.Children.toArray(le.root),parent:void 0,contexts:{}}];for(;ce.length!==0;){const{node:de,parent:ge,contexts:De}=ce.shift();r.Children.forEach(de,Ue=>{if(!(0,r.isValidElement)(Ue))return;const Ae={};for(const Ve in H)if(H.hasOwnProperty(Ve)){const ut=H[Ve];Ae[Ve]=ut.visit(ut.accumulator,Ue,ge,De[Ve])}for(const Ve of le.discoverers){const ut=Ve(Ue);ut&&ce.push({node:ut,parent:Ue,contexts:Ae})}})}return Object.fromEntries(Object.entries(H).map(([de,ge])=>[de,ge.accumulator]))}function s(le,H){return()=>({accumulator:le(),visit:H})}function f(le){var H;return(H=le.props)==null?void 0:H.children}function y(le){var H,ce,de;if(((H=le.props)==null?void 0:H.path)&&((ce=le.props)==null?void 0:ce.element))return(de=le.props)==null?void 0:de.element}const u=s(()=>new Set,(le,H)=>{const ce=(0,v.getComponentData)(H,"core.plugin");ce&&le.add(ce)});var A=e(88934);const C={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},R=s(()=>({paths:new Map,parents:new Map,objects:new Array}),(le,H,ce,de)=>{var se,j,J,Y,F;if((ce==null?void 0:ce.props.element)===H)return de;let ge=de==null?void 0:de.obj,De=de==null?void 0:de.routeRef,Ue=de==null?void 0:de.sticky;const Ae=(se=H.props)==null?void 0:se.path,Ve=(j=ge==null?void 0:ge.children)!=null?j:le.objects,ut=Boolean((J=H.props)==null?void 0:J.caseSensitive);let At=de==null?void 0:de.path;if((0,v.getComponentData)(H,"core.gatherMountPoints")){if(!Ae)throw new Error("Mount point gatherer must have a path");At=Ae}const gt=(Y=H.props)==null?void 0:Y.element;let ot=(0,v.getComponentData)(H,"core.mountPoint");if(!ot&&(0,r.isValidElement)(gt)&&(ot=(0,v.getComponentData)(gt,"core.mountPoint")),ot){let ue=Ae;if(At&&(ue?At=void 0:ue=At),!ue)throw new Error("Mounted routable extension must have a path");le.paths.set(ot,ue),De&&Ue?(le.parents.set(ot,De),Ae&&(De=ot,Ue=!1)):(le.parents.set(ot,De),De=ot),Ae?(ge={caseSensitive:ut,path:Ae,element:"mounted",routeRefs:new Set([ot]),children:[C],plugin:(0,v.getComponentData)(H.props.element,"core.plugin")},Ve.push(ge)):ge==null||ge.routeRefs.add(ot)}if((0,v.getComponentData)(H,"core.gatherMountPoints")&&(Ue=!0),(0,v.getComponentData)(H,"core.gatherMountPoints")){if(!Ae)throw new Error("Mount point gatherer must have a path");ot||(ge={caseSensitive:ut,path:Ae,element:"gathered",routeRefs:new Set,children:[C],plugin:(F=de==null?void 0:de.obj)==null?void 0:F.plugin},Ve.push(ge))}return{obj:ge,path:At,routeRef:De,sticky:Ue}}),L=s(()=>new Set,(le,H)=>{if(H.type===A.L){const ce=H.props;le.add("with"in ce?ce.with:ce.without)}});var oe=e(76241);const M=(0,oe.uW)("route-ref-type",()=>Symbol("route-ref-type"));function T(le){return le[M]==="absolute"}function D(le){return le[M]==="sub"}function O(le){return le[M]==="external"}function B(...le){const H=le.join("/").replace(/\/\/+/g,"/");return H!=="/"&&H.endsWith("/")?H.slice(0,-1):H}function Q(le,H,ce){let de,ge="";if(T(le))de=le;else if(D(le))de=le.parent,ge=le.path;else if(O(le)){const Ae=ce.get(le);if(!Ae)return[void 0,""];if(T(Ae))de=Ae;else if(D(Ae))de=Ae.parent,ge=Ae.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${Ae}`)}else throw le[M]?new Error(`Unknown or invalid route ref type, ${le[M]}`):new Error(`Unknown object passed to useRouteRef, got ${le}`);if(!de)return[void 0,""];const De=H.get(de);if(!De)return[void 0,""];const Ue=B(De,ge);return[de,Ue]}function ne(le,H,ce,de,ge){var At;const De=(At=(0,t.fp)(ge,H))!=null?At:[],Ue=Array();let Ae=-1;for(let gt=le;gt&&(Ae=De.findIndex(ot=>ot.route.routeRefs.has(gt)),Ae===-1);gt=de.get(gt))Ue.unshift(gt);Ue.length===0&&(Ae-=1);const Ve=Ae===-1?"":De[Ae].pathname,ut=B(...Ue.slice(0,-1).map(gt=>{const ot=ce.get(gt);if(!ot)throw new Error(`No path for ${gt}`);if(ot.includes(":"))throw new Error(`Cannot route to ${le} with parent ${gt} as it has parameters`);return ot}));return Ve+ut}class Te{constructor(H,ce,de,ge,De){this.routePaths=H,this.routeParents=ce,this.routeObjects=de,this.routeBindings=ge,this.appBasePath=De}resolve(H,ce){const[de,ge]=Q(H,this.routePaths,this.routeBindings);if(!de)return;let De;typeof ce=="string"?De=this.trimPath(ce):ce.pathname?De={...ce,pathname:this.trimPath(ce.pathname)}:De=ce;const Ue=this.appBasePath+ne(de,De,this.routePaths,this.routeParents,this.routeObjects);return(...[Ve])=>Ue+(0,t.Gn)(ge,Ve)}trimPath(H){return H&&(H.startsWith(this.appBasePath)?H.slice(this.appBasePath.length):H)}}const Ye=(0,oe.CT)("routing-context"),We=({routePaths:le,routeParents:H,routeObjects:ce,routeBindings:de,basePath:ge="",children:De})=>{const Ue=new Te(le,H,ce,de,ge),Ae=(0,oe.EI)({1:Ue});return r.createElement(Ye.Provider,{value:Ae},De)},fe=(le,H)=>{var ce,de;try{const ge=(0,t.fp)(H,{pathname:le}),De=(ce=ge==null?void 0:ge.filter(Ae=>{var Ve;return((Ve=Ae==null?void 0:Ae.route.routeRefs)==null?void 0:Ve.size)>0}).pop())==null?void 0:ce.route;if(!De)return{};let Ue;return De.routeRefs.size===1&&(Ue=De.routeRefs.values().next().value),{extension:"App",pluginId:((de=De.plugin)==null?void 0:de.getId())||"root",...Ue?{routeRef:Ue.id}:{}}}catch{return{}}},ye=({pathname:le,search:H,hash:ce})=>{const de=(0,v.useAnalytics)();return(0,r.useEffect)(()=>{de.captureEvent("navigate",`${le}${H}${ce}`)},[de,le,H,ce]),null},xe=({routeObjects:le})=>{const{pathname:H,search:ce,hash:de}=(0,t.TH)();return r.createElement(v.AnalyticsContext,{attributes:fe(H,le)},r.createElement(ye,{pathname:H,search:ce,hash:de}))};function He(le,H){const ce=new Set(H.values());ce.delete(void 0);for(const de of H.keys()){if(ce.has(de))continue;let ge=de,De="";for(;ge;){const Ae=le.get(ge);if(!Ae)throw new Error(`No path for ${ge}`);De=`${Ae}${De}`,ge=H.get(ge)}const Ue=De.match(/:(\w+)/g);if(Ue){for(let Ae=0;Ae<Ue.length;Ae++)for(let Ve=Ae+1;Ve<Ue.length;Ve++)if(Ue[Ve]===Ue[Ae])throw new Error(`Parameter ${Ue[Ve]} is duplicated in path ${De}`)}}}function ke(le,H){for(const ce of H)if(!!ce.externalRoutes){for(const[de,ge]of Object.entries(ce.externalRoutes))if(!ge.optional&&!le.has(ge))throw new Error(`External route '${de}' of the '${ce.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const nt=(0,oe.CT)("app-context"),tt=({appContext:le,children:H})=>{const ce=(0,oe.EI)({1:le});return r.createElement(nt.Provider,{value:ce,children:H})};function be(le){return new Error(`Tried to access IdentityApi ${le} before app was loaded`)}function Ze(le){console.warn(`WARNING: Call to ${le} is deprecated and will break in the future`)}class je{constructor(){q(this,"target");q(this,"waitForTarget");q(this,"resolveTarget",()=>{});this.waitForTarget=new Promise(H=>{this.resolveTarget=H})}setTarget(H){this.target=H,this.resolveTarget(H)}getUserId(){if(!this.target)throw be("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ze("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw be("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Ze("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(H=>H.getProfileInfo())}async getBackstageIdentity(){const H=await this.waitForTarget.then(ce=>ce.getBackstageIdentity());return H.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${H.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),H}async getCredentials(){return this.waitForTarget.then(H=>H.getCredentials())}async getIdToken(){return this.waitForTarget.then(H=>{if(!H.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Ze("getIdToken"),H.getIdToken()})}async signOut(){await this.waitForTarget.then(H=>H.signOut()),location.reload()}}var Je=e(72164);function vt(le,H,ce){if(le!==void 0){const ge=ce.find(De=>De.id===le);if(ge)return ge}if(H){const ge=ce.find(De=>De.variant==="dark");if(ge)return ge}const de=ce.find(ge=>ge.variant==="light");return de||ce[0]}const Dt=()=>{const le=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[H,ce]=(0,r.useState)(le.matches);return(0,r.useEffect)(()=>{const de=ge=>{ce(ge.matches)};return le.addListener(de),()=>{le.removeListener(de)}},[le]),H};function lt({children:le}){const H=(0,v.useApi)(v.appThemeApiRef),ce=(0,Je.Z)(H.activeThemeId$(),H.getActiveThemeId()),de=Boolean(window.matchMedia)?Dt():!1,ge=vt(ce,de,H.getInstalledThemes());if(!ge)throw new Error("App has no themes");return r.createElement(ge.Provider,{children:le})}var bt=e(46611);class Ft{constructor(){q(this,"apis",[])}add(H,ce){return this.apis.push([H.id,ce]),ce}build(){return new Pt(new Map(this.apis))}}class Pt{static builder(){return new Ft}static from(H){return new Pt(new Map(H.map(([ce,de])=>[ce.id,de])))}static with(H,ce){return new Pt(new Map([[H.id,ce]]))}constructor(H){this.apis=H}with(H,ce){return new Pt(new Map([...this.apis,[H.id,ce]]))}get(H){return this.apis.get(H.id)}}function Nt(le){const H=new Map;return le&&le({bind:(de,ge)=>{for(const[De,Ue]of Object.entries(ge)){const Ae=de[De];if(!Ae)throw new Error(`Key ${De} is not an existing external route`);if(!Ue&&!Ae.optional)throw new Error(`External route ${De} is required but was undefined`);Ue&&H.set(Ae,Ue)}}}),H}const wt=(0,r.createContext)({routeObjects:[]});function Wt(le){var ce;let{pathname:H}=new URL((ce=le.getOptionalString("app.baseUrl"))!=null?ce:"/","http://dummy.dev");return H=H.replace(/\/*$/,""),H}function nn(le,H,ce){var Ve;const de=Boolean(le),ge=(0,l.default)(le||(()=>Promise.resolve([])));let De;if(de&&ge.loading){const{Progress:ut}=H;De=r.createElement(ut,null)}else if(ge.error){const{BootErrorPage:ut}=H;De=r.createElement(ut,{step:"load-config",error:ge.error})}const{ThemeProvider:Ue=lt}=H;return De?{node:r.createElement(h.ApiProvider,{apis:Pt.with(v.appThemeApiRef,ce)},r.createElement(Ue,null,De))}:{api:h.ConfigReader.fromConfigs((Ve=ge.value)!=null?Ve:[])}}class $t{constructor(H){this.app=H}getPlugins(){return this.app.getPlugins()}getSystemIcon(H){return this.app.getSystemIcon(H)}getComponents(){return this.app.getComponents()}}class ht{constructor(H){q(this,"apiHolder");q(this,"configApi");q(this,"apis");q(this,"icons");q(this,"plugins");q(this,"components");q(this,"themes");q(this,"configLoader");q(this,"defaultApis");q(this,"bindRoutes");q(this,"appIdentityProxy",new je);q(this,"apiFactoryRegistry");var ce,de,ge,De;this.apis=(ce=H.apis)!=null?ce:[],this.icons=H.icons,this.plugins=new Set((de=H.plugins)!=null?de:[]),this.components=H.components,this.themes=H.themes,this.configLoader=(ge=H.configLoader)!=null?ge:bt.t,this.defaultApis=(De=H.defaultApis)!=null?De:[],this.bindRoutes=H.bindRoutes,this.apiFactoryRegistry=new m.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(H){return this.icons[H]}getComponents(){return this.components}getProvider(){const H=new $t(this);let ce=!1;return({children:ge})=>{const De=(0,r.useMemo)(()=>h.AppThemeSelector.createWithStorage(this.themes),[]),{routing:Ue,featureFlags:Ae,routeBindings:Ve}=(0,r.useMemo)(()=>{const ot=a({root:ge,discoverers:[f,y],collectors:{routing:R,collectedPlugins:u,featureFlags:L}});return ot.collectedPlugins.forEach(xt=>this.plugins.add(xt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...ot,routeBindings:Nt(this.bindRoutes)}},[ge]);ce||(ce=!0,He(Ue.paths,Ue.parents),ke(Ve,this.plugins));const ut=nn(this.configLoader,this.components,De),At="api"in ut;if(At){const{api:ot}=ut;this.configApi=ot}if((0,r.useEffect)(()=>{if(At){const ot=this.getApiHolder().get(v.featureFlagsApiRef);for(const xt of this.plugins.values())if("getFeatureFlags"in xt)for(const se of xt.getFeatureFlags())ot.registerFlag({name:se.name,pluginId:xt.getId()});else for(const se of xt.output())se.type==="feature-flag"&&ot.registerFlag({name:se.name,pluginId:xt.getId()});for(const xt of Ae)ot.registerFlag({name:xt,pluginId:""})}},[At,ut,Ae]),"node"in ut)return ut.node;const{ThemeProvider:gt=lt}=this.components;return r.createElement(h.ApiProvider,{apis:this.getApiHolder()},r.createElement(tt,{appContext:H},r.createElement(gt,null,r.createElement(We,{routePaths:Ue.paths,routeParents:Ue.parents,routeObjects:Ue.objects,routeBindings:Ve,basePath:Wt(ut.api)},r.createElement(wt.Provider,{value:{routeObjects:Ue.objects}},ge)))))}}getRouter(){const{Router:H,SignInPage:ce}=this.components,de=({component:De,children:Ue})=>{const[Ae,Ve]=(0,r.useState)();return Ae?(this.appIdentityProxy.setTarget(Ae),Ue):r.createElement(De,{onSignInSuccess:Ve})};return({children:De})=>{const Ue=(0,v.useApi)(v.configApiRef),Ae=`${Wt(Ue)}/*`,{routeObjects:Ve}=(0,r.useContext)(wt);return ce?r.createElement(H,null,r.createElement(xe,{routeObjects:Ve}),r.createElement(de,{component:ce},r.createElement(t.Z5,null,r.createElement(t.AW,{path:Ae,element:r.createElement(r.Fragment,null,De)})))):(this.appIdentityProxy.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}}),r.createElement(H,null,r.createElement(xe,{routeObjects:Ve}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:Ae,element:r.createElement(r.Fragment,null,De)}))))}}getApiHolder(){if(this.apiHolder){for(const H of this.plugins)for(const ce of H.getApis())this.apiFactoryRegistry.get(ce.api)||this.apiFactoryRegistry.register("default",ce);return m.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:v.appThemeApiRef,deps:{},factory:()=>h.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:v.configApiRef,deps:{},factory:()=>{if(!this.configApi)throw new Error("Tried to access config API before config was loaded");return this.configApi}}),this.apiFactoryRegistry.register("static",{api:v.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:v.featureFlagsApiRef,deps:{},factory:()=>new h.LocalStorageFeatureFlags});for(const H of this.defaultApis)this.apiFactoryRegistry.register("default",H);for(const H of this.plugins)for(const ce of H.getApis())if(!this.apiFactoryRegistry.register("default",ce))throw new Error(`Plugin ${H.getId()} tried to register duplicate or forbidden API factory for ${ce.api}`);for(const H of this.apis)if(!this.apiFactoryRegistry.register("app",H))throw new Error(`Duplicate or forbidden API factory for ${H.api} in app`);return m.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new m.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(H){const ce=new Set;for(const de of H){const ge=de.getId();if(ce.has(ge))throw new Error(`Duplicate plugin found '${ge}'`);ce.add(ge)}}}function Yt(le){return new ht(le)}},46611:function(_,i,e){"use strict";e.d(i,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const l=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!l)throw new Error("No static configuration provided");if(!Array.isArray(l))throw new Error("Static configuration has invalid format");const h=l.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const m=JSON.parse(t);Array.isArray(m)?h.push(...m):h.push({data:m,context:"env"})}catch(m){throw new Error(`Failed to load runtime configuration, ${m}`)}const v=window.__APP_CONFIG__;return v&&h.push({context:"window",data:v}),h}},44056:function(_,i,e){"use strict";e.d(i,{createSpecializedApp:function(){return r.b},defaultConfigLoader:function(){return t.t}});var r=e(82370),t=e(46611),l=e(73495),h=e.n(l);e.o(l,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return l.AtlassianAuth}}),e.o(l,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return l.BitbucketAuth}}),e.o(l,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return l.FlatRoutes}}),e.o(l,"GithubAuth")&&e.d(i,{GithubAuth:function(){return l.GithubAuth}}),e.o(l,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return l.GitlabAuth}}),e.o(l,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return l.GoogleAuth}}),e.o(l,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return l.MicrosoftAuth}}),e.o(l,"OktaAuth")&&e.d(i,{OktaAuth:function(){return l.OktaAuth}}),e.o(l,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return l.OneLoginAuth}})},73495:function(){},49208:function(_,i,e){"use strict";e.d(i,{AlertApiForwarder:function(){return r.AlertApiForwarder},ErrorAlerter:function(){return r.ErrorAlerter},ErrorApiForwarder:function(){return r.ErrorApiForwarder},FetchMiddlewares:function(){return r.FetchMiddlewares},FlatRoutes:function(){return l.w},NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi},OAuthRequestManager:function(){return r.OAuthRequestManager},UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return r.UrlPatternDiscovery},WebStorage:function(){return r.WebStorage},createFetchApi:function(){return r.createFetchApi},createSpecializedApp:function(){return t.createSpecializedApp},defaultConfigLoader:function(){return t.defaultConfigLoader}});var r=e(56494);e.o(r,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(i,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OktaAuth")&&e.d(i,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(i,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(i,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return t.OneLoginAuth}});var l=e(63938)},57018:function(_,i,e){"use strict";e.d(i,{RefreshingAuthSessionManager:function(){return m}});function r(s,f){for(const y of f)if(!s.has(y))return!1;return!0}class t{constructor(f){this.options=f}sessionExistsAndHasScope(f,y){if(!f)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const u=this.options.sessionScopes(f);return r(u,y)}getExtendedScope(f,y){const u=new Set(this.options.defaultScopes);if(f&&this.options.sessionScopes!==void 0){const A=this.options.sessionScopes(f);for(const C of A)u.add(C)}if(y)for(const A of y)u.add(A);return u}}var l=e(98005),h=e(36964);class v{constructor(){q(this,"subject",new l.X(h.SessionState.SignedOut));q(this,"signedIn",!1)}setIsSignedIn(f){this.signedIn!==f&&(this.signedIn=f,this.subject.next(this.signedIn?h.SessionState.SignedIn:h.SessionState.SignedOut))}sessionState$(){return this.subject}}class m{constructor(f){q(this,"connector");q(this,"helper");q(this,"sessionScopesFunc");q(this,"sessionShouldRefreshFunc");q(this,"stateTracker",new v);q(this,"refreshPromise");q(this,"currentSession");const{connector:y,defaultScopes:u=new Set,sessionScopes:A,sessionShouldRefresh:C}=f;this.connector=y,this.sessionScopesFunc=A,this.sessionShouldRefreshFunc=C,this.helper=new t({sessionScopes:A,defaultScopes:u})}async getSession(f){if(this.helper.sessionExistsAndHasScope(this.currentSession,f.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const u=await this.collapsedSessionRefresh(),A=this.sessionScopesFunc(this.currentSession),C=this.sessionScopesFunc(u);return r(C,A)&&(this.currentSession=u),u}catch(u){if(f.optional)return;throw u}}if(!this.currentSession&&!f.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(f)}catch{}if(!f.optional)return this.currentSession=await this.connector.createSession({...f,scopes:this.helper.getExtendedScope(this.currentSession,f.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession();try{const f=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),f}finally{delete this.refreshPromise}}}class a{constructor(f){q(this,"connector");q(this,"helper");q(this,"stateTracker",new SessionStateTracker);q(this,"currentSession");const{connector:y,defaultScopes:u=new Set,sessionScopes:A}=f;this.connector=y,this.helper=new SessionScopeHelper({sessionScopes:A,defaultScopes:u})}setSession(f){this.currentSession=f,this.stateTracker.setIsSignedIn(Boolean(f))}async getSession(f){if(this.helper.sessionExistsAndHasScope(this.currentSession,f.scopes))return this.currentSession;if(!f.optional)return this.currentSession=await this.connector.createSession({...f,scopes:this.helper.getExtendedScope(this.currentSession,f.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(_,i,e){"use strict";e.d(i,{J:function(){return l},X:function(){return h}});var r=e(82394),t=e.n(r);class l{constructor(){q(this,"isClosed",!1);q(this,"terminatingError");q(this,"observable",new(t())(m=>this.isClosed?(this.terminatingError?m.error(this.terminatingError):m.complete(),()=>{}):(this.subscribers.add(m),()=>{this.subscribers.delete(m)})));q(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(m){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(a=>a.next(m))}error(m){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=m,this.subscribers.forEach(a=>a.error(m))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(m=>m.complete())}subscribe(m,a,s){const f=typeof m=="function"?{next:m,error:a,complete:s}:m;return this.observable.subscribe(f)}}class h{constructor(m){q(this,"isClosed");q(this,"currentValue");q(this,"terminatingError");q(this,"observable");q(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=m,this.terminatingError=void 0,this.observable=new(t())(a=>this.isClosed?(this.terminatingError?a.error(this.terminatingError):a.complete(),()=>{}):(a.next(this.currentValue),this.subscribers.add(a),()=>{this.subscribers.delete(a)}))}[Symbol.observable](){return this}get closed(){return this.isClosed}next(m){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=m,this.subscribers.forEach(a=>a.next(m))}error(m){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=m,this.subscribers.forEach(a=>a.error(m))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(m=>m.complete())}subscribe(m,a,s){const f=typeof m=="function"?{next:m,error:a,complete:s}:m;return this.observable.subscribe(f)}}},88934:function(_,i,e){"use strict";e.d(i,{L:function(){return l}});var r=e(36964),t=e(2784);const l=h=>{const{children:v}=h,m=(0,r.useApi)(r.featureFlagsApiRef),a="with"in h?m.isActive(h.with):!m.isActive(h.without);return t.createElement(t.Fragment,null,a?v:null)};(0,r.attachComponentData)(l,"core.featureFlagged",!0)},63938:function(_,i,e){"use strict";e.d(i,{w:function(){return h}});var r=e(2784),t=e(10289),l=e(36964);const h=m=>{const a=(0,l.useApp)(),{NotFoundErrorPage:s}=a.getComponents(),f=(0,l.useElementFilter)(m.children,y=>y.getElements().flatMap(u=>{var C;let A=u.props.path;return A===""?[]:(A=(C=A==null?void 0:A.replace(/\/\*$/,""))!=null?C:"/",[{path:A,element:u,children:u.props.children?[{path:A==="/"?"/":"/*",element:u.props.children}]:void 0}])}).sort((u,A)=>A.path.localeCompare(u.path)).map(u=>(u.path=u.path==="/"?"/":`${u.path}/*`,u)));return f.push({element:r.createElement(s,null),path:"/*"}),(0,t.V$)(f)};var v=e(88934)},9118:function(_,i,e){"use strict";e.d(i,{Button:function(){return M},CodeSnippet:function(){return fe},Content:function(){return Wo},ContentHeader:function(){return qi},CreateButton:function(){return He},DependencyGraph:function(){return ot},DependencyGraphTypes:function(){return r},EmptyState:function(){return Re},ErrorPage:function(){return rs},ErrorPanel:function(){return cn},Header:function(){return Qo},HeaderIconLinkRow:function(){return or},HeaderLabel:function(){return ms},HeaderTabs:function(){return Ho},InfoCard:function(){return ft},ItemCardGrid:function(){return As},ItemCardHeader:function(){return ys},Link:function(){return L},LogViewer:function(){return Sr},MissingAnnotationEmptyState:function(){return dt},OverflowTooltip:function(){return Pr},Page:function(){return qo},PageWithHeader:function(){return Cs},Progress:function(){return Xn},ResponseErrorPanel:function(){return $r},RoutedTabs:function(){return jo},Select:function(){return et},Sidebar:function(){return Ya},SidebarContext:function(){return Br},SidebarDivider:function(){return li},SidebarItem:function(){return Zo},SidebarPage:function(){return Ma},SidebarPinStateContext:function(){return dr},SubvalueCell:function(){return Si},SupportButton:function(){return xa},Table:function(){return ji},WarningPanel:function(){return sn},sidebarConfig:function(){return Bn}});var r={};e.r(r),e.d(r,{Nm:function(){return ke},ht:function(){return be},LJ:function(){return tt}});var t=e(2784),l=e(36964),h=e(19928);function v(n){const[o,c]=useState([]),d=useApi(alertApiRef);if(useEffect(()=>{const I=d.alert$().subscribe(w=>c(K=>K.concat(w)));return()=>{I.unsubscribe()}},[d]),o.length===0)return null;const[g]=o,E=()=>{c(I=>I.filter(w=>w!==g))};return React.createElement(Snackbar,{open:!0,anchorOrigin:{vertical:"top",horizontal:"center"}},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:E,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:g.severity},React.createElement("span",null,g.message.toString(),o.length>1&&React.createElement("em",null,` (${o.length-1} older ${pluralize("message",o.length-1)})`))))}var m=e(79692),a=e(12420);const s=(0,m.Z)(n=>(0,a.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function f(n){const{displayName:o,picture:c,customStyles:d}=n,g=s();return React.createElement(MaterialAvatar,{alt:o,src:c,className:g.avatar,style:{backgroundColor:stringToColor(o||c||""),...d}},o&&extractInitials(o))}var y=e(77277),u=e(86689),A=e(62833);const C=n=>/^([a-z+.-]+):/.test(n),R=n=>{var o;return n instanceof Array?n.map(R).join(" ").trim():typeof n=="object"&&n?R((o=n==null?void 0:n.props)==null?void 0:o.children):["string","number"].includes(typeof n)?String(n):""},L=t.forwardRef(({onClick:n,noTrack:o,...c},d)=>{const g=(0,l.useAnalytics)(),E=String(c.to),I=R(c.children)||E,w=C(E),K=w&&!!/^https?:/.exec(E),W=ie=>{n==null||n(ie),o||g.captureEvent("click",I,{attributes:{to:E}})};return w?t.createElement(u.Z,{ref:d,href:E,onClick:W,...K?{target:"_blank",rel:"noopener"}:{},...c}):t.createElement(u.Z,{ref:d,component:A.rU,onClick:W,...c})}),oe=t.forwardRef((n,o)=>t.createElement(L,{ref:o,...n,color:"initial"})),M=t.forwardRef((n,o)=>t.createElement(y.Z,{ref:o,component:oe,...n}));var T=e(60364),D=e(61837),O=e(80030),B=e(19353),Q=e(95074);function ne(n){const{text:o,tooltipDelay:c=1e3,tooltipText:d="Text copied to clipboard"}=n,g=(0,l.useApi)(l.errorApiRef),[E,I]=(0,t.useState)(!1),[{error:w},K]=(0,Q.Z)();(0,t.useEffect)(()=>{w&&g.post(w)},[w,g]);const W=ie=>{ie.stopPropagation(),I(!0),K(o)};return t.createElement(t.Fragment,null,t.createElement(O.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:c,onClose:()=>I(!1),open:E},t.createElement(D.Z,{onClick:W},t.createElement(B.Z,null))))}var Te=e(55768),Ye=e(26639),We=e(39595);function fe(n){const{text:o,language:c,showLineNumbers:d=!1,highlightedNumbers:g,customStyle:E,showCopyCodeButton:I=!1}=n,w=(0,T.Z)(),K=w.palette.type==="dark"?Ye.Z:We.Z,W=w.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(Te.Z,{customStyle:E,language:c,style:K,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:w.palette.textVerySubtle},lineProps:ie=>g!=null&&g.includes(ie)?{style:{backgroundColor:W}}:{}},o),I&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(ne,{text:o})))}var ye=e(41156),xe=e(88188);function He(n){const{title:o,to:c}=n,d=(0,ye.Z)(g=>g.breakpoints.down("xs"));return c?d?t.createElement(D.Z,{component:A.rU,color:"primary",title:o,size:"small",to:c},t.createElement(xe.Z,null)):t.createElement(y.Z,{component:A.rU,variant:"contained",color:"primary",to:c},o):null}var ke;(function(n){const o="TB";n.TOP_BOTTOM=o;const c="BT";n.BOTTOM_TOP=c;const d="LR";n.LEFT_RIGHT=d;const g="RL";n.RIGHT_LEFT=g})(ke||(ke={}));var nt;(function(n){const o="UL";n.UP_LEFT=o;const c="UR";n.UP_RIGHT=c;const d="DL";n.DOWN_LEFT=d;const g="DR";n.DOWN_RIGHT=g})(nt||(nt={}));var tt;(function(n){const o="network-simplex";n.NETWORK_SIMPLEX=o;const c="tight-tree";n.TIGHT_TREE=c;const d="longest-path";n.LONGEST_PATH=d})(tt||(tt={}));var be;(function(n){const o="l";n.LEFT=o;const c="r";n.RIGHT=c;const d="c";n.CENTER=d})(be||(be={}));var Ze=e(13387),je=e(11105),Je=e(97963),vt=e(46506),Dt=e.n(vt),lt=e(54073),bt=e.n(lt),Ft=e(10368);const Pt=(0,m.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function Nt({node:{id:n}}){const o=Pt(),[c,d]=t.useState(0),[g,E]=t.useState(0),I=t.useRef(null);t.useLayoutEffect(()=>{if(I.current){let{height:ie,width:te}=I.current.getBBox();ie=Math.round(ie),te=Math.round(te),(ie!==g||te!==c)&&(d(te),E(ie))}},[c,g]);const w=10,K=c+w*2,W=g+w*2;return t.createElement("g",null,t.createElement("rect",{className:o.node,width:K,height:W,rx:10}),t.createElement("text",{ref:I,className:o.text,y:W/2,x:K/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const wt="arrow-marker",Wt="node",nn="edge",$t="label",ht=(0,Ft.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),Yt=n=>t.createElement(Nt,{...n});function le({render:n=Yt,setNode:o,node:c}){const{width:d,height:g,x:E=0,y:I=0}=c,w=c,K=ht(),W=t.useRef(null);return t.useLayoutEffect(()=>{if(W.current){let{height:ie,width:te}=W.current.getBBox();ie=Math.round(ie),te=Math.round(te),(ie!==g||te!==d)&&o(c.id,{...c,height:ie,width:te})}},[c,d,g,o]),t.createElement("g",{ref:W,"data-testid":Wt,className:K.node,transform:`translate(${E-d/2},${I-g/2})`},n({node:w}))}var H=e(40408),ce=e(49810),de=e(19574),ge=e.n(de);const De=(0,Ft.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function Ue({edge:{label:n}}){const o=De();return t.createElement("text",{className:o.text,textAnchor:"middle"},n)}const Ae=(0,Ft.Z)(n=>({path:{strokeWidth:2,stroke:n.palette.textSubtle,fill:"none",transition:`${n.transitions.duration.shortest}ms`},label:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),Ve=n=>t.createElement(Ue,{...n}),ut=H.Z().x(n=>n.x).y(n=>n.y).curve(ce.Z);function At({render:n=Ve,setEdge:o,id:c,edge:d}){const{x:g=0,y:E=0,width:I,height:w,points:K}=d,W=d,ie=Ae(),te=t.useRef(null);t.useLayoutEffect(()=>{if(te.current){let{height:ve,width:Pe}=te.current.getBBox();ve=Math.round(ve),Pe=Math.round(Pe),(ve!==w||Pe!==I)&&o(c,{...d,height:ve,width:Pe})}},[d,w,I,o,c]);let Se="";if(K){const ve=K.filter(Pe=>ge()(Pe.x)&&ge()(Pe.y));Se=ut(ve)||""}return t.createElement(t.Fragment,null,Se&&t.createElement("path",{"data-testid":nn,className:ie.path,markerEnd:`url(#${wt})`,d:Se}),W.label?t.createElement("g",{ref:te,"data-testid":$t,className:ie.label,transform:`translate(${g},${E})`},n({edge:W})):null)}const gt="workspace";function ot(n){var mr,aa;const{edges:o,nodes:c,renderNode:d,direction:g=ke.TOP_BOTTOM,align:E,nodeMargin:I=50,edgeMargin:w=10,rankMargin:K=50,paddingX:W=0,paddingY:ie=0,acyclicer:te,ranker:Se=tt.NETWORK_SIMPLEX,labelPosition:ve=be.RIGHT,labelOffset:Pe=10,edgeRanks:it=1,edgeWeight:Ct=1,renderLabel:Zt,defs:Vt,zoom:at="enabled",...Tt}=n,Ot=(0,Je.Z)(),[Jt,Zn]=t.useState(100),[Sn,wr]=t.useState(100),St=t.useRef(new(Dt()).graphlib.Graph),[zn,fo]=t.useState(((mr=St.current.graph())==null?void 0:mr.width)||0),[er,mo]=t.useState(((aa=St.current.graph())==null?void 0:aa.height)||0),[Xr,qr]=t.useState([]),[ho,qt]=t.useState([]),hn=Math.max(zn,Jt),Cn=Math.max(er,Sn),tr=t.useMemo(()=>bt()(Ht=>{if(!Ht)return;const _t=je.Z(Ht),zt=je.Z(Ht.getElementById(gt));function In(){_t.call(Ze.sP().scaleExtent([1,10]).on("zoom",Mn=>{Mn.transform.x=Math.min(0,Math.max(Mn.transform.x,hn-hn*Mn.transform.k)),Mn.transform.y=Math.min(0,Math.max(Mn.transform.y,Cn-Cn*Mn.transform.k)),zt.attr("transform",Mn.transform)}))}at==="enabled"?In():at==="enable-on-click"&&_t.on("click",()=>In());const{width:Ln,height:_r}=Ht.getBoundingClientRect();Jt!==Ln&&Zn(Ln),Sn!==_r&&wr(_r)},100),[Sn,Jt,hn,Cn,at]),Gt=t.useCallback(()=>{const Ht=St.current.nodes(),_t=St.current.edges();Ht.forEach(zt=>{c.some(Ln=>Ln.id===zt)||St.current.removeNode(zt)}),_t.forEach(zt=>{o.some(Ln=>Ln.from===zt.v&&Ln.to===zt.w)||St.current.removeEdge(zt.v,zt.w)}),c.forEach(zt=>{const In=St.current.nodes().find(Ln=>zt.id===Ln);if(In&&St.current.node(In)){const{width:Ln,height:_r,x:Mn,y:zs}=St.current.node(In);St.current.setNode(In,{...zt,width:Ln,height:_r,x:Mn,y:zs})}else St.current.setNode(zt.id,{...zt,width:0,height:0})}),o.forEach(zt=>{St.current.setEdge(zt.from,zt.to,{...zt,label:zt.label,width:0,height:0,labelpos:ve,labeloffset:Pe,weight:Ct,minlen:it})})},[o,c,ve,Pe,Ct,it]),Kt=t.useMemo(()=>bt()(()=>{Dt().layout(St.current);const{height:Ht,width:_t}=St.current.graph(),zt=Math.max(0,Ht||0),In=Math.max(0,_t||0);fo(In),mo(zt),qr(St.current.nodes()),qt(St.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(St.current.setGraph({rankdir:g,align:E,nodesep:I,edgesep:w,ranksep:K,marginx:W,marginy:ie,acyclicer:te,ranker:Se}),Gt(),Kt(),Kt.cancel),[te,E,g,w,W,ie,I,K,Se,Gt,Kt]);function fr(Ht,_t){return St.current.setNode(Ht,_t),Kt(),St.current}function nr(Ht,_t){return St.current.setEdge(Ht,_t),Kt(),St.current}return t.createElement("svg",{ref:tr,...Tt,width:"100%",height:Cn,viewBox:`0 0 ${hn} ${Cn}`},t.createElement("defs",null,t.createElement("marker",{id:wt,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:Ot.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),Vt),t.createElement("g",{id:gt},t.createElement("svg",{width:zn,height:er,y:Cn/2-er/2,x:hn/2-zn/2,viewBox:`0 0 ${zn} ${er}`},ho.map(Ht=>{const _t=St.current.edge(Ht);return _t?t.createElement(At,{key:`${Ht.v}-${Ht.w}`,id:Ht,setEdge:nr,render:Zt,edge:_t}):null}),Xr.map(Ht=>{const _t=St.current.node(Ht);return _t?t.createElement(le,{key:Ht,setNode:fr,render:d,node:_t}):null}))))}var xt=e(72779),se=e.n(xt);const j=(0,m.Z)(n=>{var o;return{root:{padding:n.spacing(0),marginBottom:n.spacing(0),marginTop:n.spacing(0),display:"flex",flexFlow:"row nowrap"},topPosition:{position:"relative",marginBottom:n.spacing(6),marginTop:-n.spacing(3),zIndex:"unset"},icon:{fontSize:20},content:{width:"100%",maxWidth:"inherit",flexWrap:"nowrap"},message:{display:"flex",alignItems:"center",color:n.palette.banner.text,"& a":{color:n.palette.banner.link}},info:{backgroundColor:n.palette.banner.info},error:{backgroundColor:n.palette.banner.error},warning:{backgroundColor:(o=n.palette.banner.warning)!=null?o:n.palette.banner.error}}},{name:"BackstageDismissableBanner"}),J=n=>{var ve;const{variant:o,message:c,id:d,fixed:g=!1}=n,E=j(),w=useApi(storageApiRef).forBucket("notifications"),K=(ve=w.snapshot("dismissedBanners").value)!=null?ve:[],[W,ie]=useState(new Set(K)),te=useObservable(w.observe$("dismissedBanners"));useEffect(()=>{var Pe;if(te!=null&&te.value){const it=(Pe=te==null?void 0:te.value)!=null?Pe:[];ie(new Set(it))}},[te==null?void 0:te.value]);const Se=()=>{w.set("dismissedBanners",[...W,d])};return React.createElement(Snackbar,{anchorOrigin:g?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!W.has(d),classes:{root:classNames(E.root,!g&&E.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(E.content,E[o]),message:E.message},message:c,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Se},React.createElement(Close,{className:E.icon}))]}))};var Y=e(60905),F=e(90436),ue=e(86284),pe=e(96465),z=e(19133),b=e(3871);const ee=(0,m.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),ae=({missing:n})=>{const o=ee();switch(n){case"field":return t.createElement("img",{src:ue,className:o.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:pe,alt:"no Information",className:o.generalImg});case"content":return t.createElement("img",{src:z,alt:"create Component",className:o.generalImg});case"data":return t.createElement("img",{src:b,alt:"no Build",className:o.generalImg});default:return null}},Ce=(0,m.Z)(n=>({root:{backgroundColor:n.palette.background.default,padding:n.spacing(2,0,0,0)},action:{marginTop:n.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function Re(n){const{title:o,description:c,missing:d,action:g}=n,E=Ce();return t.createElement(Y.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:E.root,spacing:2},t.createElement(Y.Z,{item:!0,xs:12,md:6},t.createElement(Y.Z,{container:!0,direction:"column"},t.createElement(Y.Z,{item:!0,xs:!0},t.createElement(F.Z,{variant:"h5"},o)),t.createElement(Y.Z,{item:!0,xs:!0},t.createElement(F.Z,{variant:"body1"},c)),t.createElement(Y.Z,{item:!0,xs:!0,className:E.action},g))),t.createElement(Y.Z,{item:!0,xs:12,md:6,className:E.imageContainer},t.createElement(ae,{missing:d})))}const Oe=`apiVersion: backstage.io/v1alpha1
2
+ kind: Component
3
+ metadata:
4
+ name: example
5
+ description: example.com
6
+ annotations:
7
+ ANNOTATION: value
8
+ spec:
9
+ type: website
10
+ lifecycle: production
11
+ owner: user:guest`,Qe=(0,m.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function dt(n){const{annotation:o}=n,c=Qe(),d=t.createElement(t.Fragment,null,"The ",t.createElement("code",null,o)," annotation is missing. You need to add the annotation to your component if you want to enable this tool.");return t.createElement(Re,{missing:"field",title:"Missing Annotation",description:d,action:t.createElement(t.Fragment,null,t.createElement(F.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:c.code},t.createElement(fe,{text:Oe.replace("ANNOTATION",o),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(y.Z,{color:"primary",component:L,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var yt=e(11776),rt=e(38402),st=e(49378),It=e(41128),Ke=e(27616),N=e(8284),p=e(70660),x=e(91750),$=e(38016);const G=(n,o)=>(o.palette.type==="light"?It._j:It.$n)(o.palette[n].light,.6),Ie=(n,o)=>(o.palette.type==="light"?It.$n:It._j)(o.palette[n].light,.9),Ee=(0,m.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:o})=>G(o,n)}})),$e=({severity:n})=>{const o=Ee({severity:n});return t.createElement(x.Z,{classes:o})},qe=({severity:n})=>{const o=Ee({severity:n});return t.createElement($.Z,{classes:o})},Rt=(0,m.Z)(n=>({panel:{backgroundColor:({severity:o})=>Ie(o,n),color:({severity:o})=>G(o,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:o})=>G(o,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:o})=>G(o,n),backgroundColor:({severity:o})=>Ie(o,n)},details:{width:"100%",display:"block",color:n.palette.textContrast,backgroundColor:n.palette.background.default,border:`1px solid ${n.palette.border}`,padding:n.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),en=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function sn(n){const{severity:o="warning",title:c,message:d,children:g,defaultExpanded:E}=n,I=Rt({severity:o}),w=en(o)+(c?`: ${c}`:"");return t.createElement(Ke.Z,{defaultExpanded:E!=null?E:!1,className:I.panel,role:"alert"},t.createElement(N.Z,{expandIcon:t.createElement(qe,{severity:o}),className:I.summary},t.createElement($e,{severity:o}),t.createElement(F.Z,{className:I.summaryText,variant:"subtitle1"},w)),(d||g)&&t.createElement(p.Z,null,t.createElement(Y.Z,{container:!0},d&&t.createElement(Y.Z,{item:!0,xs:12},t.createElement(F.Z,{className:I.message,variant:"body1"},d)),g&&t.createElement(Y.Z,{item:!0,xs:12,className:I.details},g))))}const Wn=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),bn=({error:n,message:o,stack:c,children:d})=>{const g=Wn();return t.createElement(yt.Z,{dense:!0},t.createElement(rt.Z,{alignItems:"flex-start"},t.createElement(st.Z,{classes:{secondary:g.text},primary:"Error",secondary:n}),t.createElement(ne,{text:n})),t.createElement(rt.Z,{alignItems:"flex-start"},t.createElement(st.Z,{classes:{secondary:g.text},primary:"Message",secondary:o}),t.createElement(ne,{text:o})),c&&t.createElement(rt.Z,{alignItems:"flex-start"},t.createElement(st.Z,{classes:{secondary:g.text},primary:"Stack Trace",secondary:c}),t.createElement(ne,{text:c})),d)};function cn(n){const{title:o,error:c,defaultExpanded:d,children:g}=n;return t.createElement(sn,{severity:"error",title:o!=null?o:c.message,defaultExpanded:d},t.createElement(bn,{error:c.name,message:c.message,stack:c.stack,children:g}))}var Hn=e(85256);const hr=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function $r(n){var Pe;const{title:o,error:c,defaultExpanded:d}=n,g=hr();if(c.name!=="ResponseError")return t.createElement(cn,{title:o!=null?o:c.message,defaultExpanded:d,error:c});const{body:E,cause:I}=c,{request:w,response:K}=E,W=`${K.statusCode}: ${I.name}`,ie=w&&`${w.method} ${w.url}`,te=I.message.replace(/\\n/g,`
12
+ `),Se=(Pe=I.stack)==null?void 0:Pe.replace(/\\n/g,`
13
+ `),ve=JSON.stringify(E,void 0,2);return t.createElement(cn,{title:o!=null?o:c.message,defaultExpanded:d,error:{name:W,message:te,stack:Se}},ie&&t.createElement(rt.Z,{alignItems:"flex-start"},t.createElement(st.Z,{classes:{secondary:g.text},primary:"Request",secondary:w?`${ie}`:void 0}),t.createElement(ne,{text:ie})),t.createElement(t.Fragment,null,t.createElement(Hn.Z,{component:"li",className:g.divider}),t.createElement(rt.Z,{alignItems:"flex-start"},t.createElement(st.Z,{classes:{secondary:g.text},primary:"Full Error as JSON"})),t.createElement(fe,{language:"json",text:ve,showCopyCodeButton:!0})))}var Nr=e(47093);function Ur(n){const o=document.createElement("div");return o.setAttribute("id",n),o}function kt(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function eo(n){const o=useRef(null);useEffect(function(){const g=document.querySelector(`#${n}`),E=g||Ur(n);return g||kt(E),E.appendChild(o.current),function(){o.current.remove(),E.childNodes.length===-1&&E.remove()}},[n]);function c(){return o.current||(o.current=document.createElement("div")),o.current}return c()}var gr=null;const jn="core.calloutSeen";function pr(){const[n,o]=useState(()=>{const d=localStorage.getItem(jn);return d?JSON.parse(d):{}}),c=useCallback((d,g)=>{const E=localStorage.getItem(jn),w={...E?JSON.parse(E):{},[d]:g};o(w),localStorage.setItem(jn,JSON.stringify(w))},[]);return{states:n,setState:c}}function Zr(n){const{states:o,setState:c}=pr(),d=useCallback(()=>{c(n,!0)},[c,n]);return{seen:o[n]===!0,markSeen:d}}function Vn(n){const{seen:o,markSeen:c}=Zr(n);return{show:o===!1,hide:c}}const yr=(0,m.Z)({"@keyframes pulsateSlightly":{"0%":{transform:"scale(1.0)"},"100%":{transform:"scale(1.1)"}},"@keyframes pulsateAndFade":{"0%":{transform:"scale(1.0)",opacity:.9},"100%":{transform:"scale(1.5)",opacity:0}},featureWrapper:{position:"relative"},backdrop:{zIndex:2e3,position:"fixed",overflow:"hidden",left:0,right:0,top:0,bottom:0},dot:{position:"absolute",backgroundColor:"transparent",borderRadius:"100%",border:"1px solid rgba(103, 146, 180, 0.98)",boxShadow:"0px 0px 0px 20000px rgba(0, 0, 0, 0.5)",zIndex:2001,transformOrigin:"center center",animation:"$pulsateSlightly 1744ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) alternate infinite"},pulseCircle:{width:"100%",height:"100%",backgroundColor:"transparent",borderRadius:"100%",border:"2px solid white",zIndex:2001,transformOrigin:"center center",animation:"$pulsateAndFade 872ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite"},text:{position:"absolute",color:"white",zIndex:2003}},{name:"BackstageFeatureCalloutCircular"});function Ut(n){const{featureId:o,title:c,description:d,children:g}=n,{show:E,hide:I}=useShowCallout(o),w=usePortal("core.callout"),K=useRef(null),[W,ie]=useState(),te=yr(),Se=useCallback(()=>{if(K.current){const ve=K.current.getBoundingClientRect(),Pe=Math.max(ve.width,ve.height),it=800,Ct=ve.x-(Pe-ve.width)/2-it,Zt=ve.y-(Pe-ve.height)/2-it,Vt=Pe+2*it,at=450,Tt=ve.x+ve.width/2-at,Ot=ve.y-(Pe-ve.height)/2+Pe+20;ie({dotLeft:Ct,dotTop:Zt,dotSize:Vt,borderWidth:it,textTop:Ot,textLeft:Tt,textWidth:at})}},[]);return useEffect(()=>(window.addEventListener("resize",Se),window.addEventListener("scroll",Se),()=>{window.removeEventListener("resize",Se),window.removeEventListener("scroll",Se)}),[Se]),useLayoutEffect(Se,[K.current,Se]),E?React.createElement(React.Fragment,null,React.createElement("div",{className:te.featureWrapper,ref:K},g),createPortal(React.createElement("div",{className:te.backdrop},React.createElement(ClickAwayListener,{onClickAway:I},React.createElement(React.Fragment,null,React.createElement("div",{className:te.dot,"data-testid":"dot",style:{left:W==null?void 0:W.dotLeft,top:W==null?void 0:W.dotTop,width:W==null?void 0:W.dotSize,height:W==null?void 0:W.dotSize,borderWidth:W==null?void 0:W.borderWidth},onClick:I,onKeyDown:I,role:"button",tabIndex:0},React.createElement("div",{className:te.pulseCircle})),React.createElement("div",{className:te.text,"data-testid":"text",style:{left:W==null?void 0:W.textLeft,top:W==null?void 0:W.textTop,width:W==null?void 0:W.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},c),React.createElement(Typography,null,d))))),w)):React.createElement(React.Fragment,null,g)}var zr=e(35292);const rr=(0,m.Z)(n=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:"gray",cursor:"default"},primary:{color:n.palette.primary.main},secondary:{color:n.palette.secondary.main},label:{fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function Wr({color:n="primary",disabled:o=!1,href:c="#",icon:d=t.createElement(zr.Z,null),label:g,onClick:E,title:I}){const w=rr();return o?t.createElement(u.Z,{title:I,className:se()(w.link,w.disabled),underline:"none"},d,t.createElement("span",{className:w.label},g)):t.createElement(u.Z,{title:I,className:se()(w.link,w[n]),to:c,component:L,onClick:E},d,t.createElement("span",{className:w.label},g))}const Er=(0,m.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function or(n){const{links:o}=n,c=Er();return t.createElement("nav",{className:c.links},o.map((d,g)=>t.createElement(Wr,{key:g+1,...d})))}const ar=n=>{const o=n==="dark"?"16%":"97%";return`
14
+ hsl(0, 0%, ${o}) 0%,
15
+ hsla(0, 0%, ${o}, 0.987) 8.1%,
16
+ hsla(0, 0%, ${o}, 0.951) 15.5%,
17
+ hsla(0, 0%, ${o}, 0.896) 22.5%,
18
+ hsla(0, 0%, ${o}, 0.825) 29%,
19
+ hsla(0, 0%, ${o}, 0.741) 35.3%,
20
+ hsla(0, 0%, ${o}, 0.648) 41.2%,
21
+ hsla(0, 0%, ${o}, 0.55) 47.1%,
22
+ hsla(0, 0%, ${o}, 0.45) 52.9%,
23
+ hsla(0, 0%, ${o}, 0.352) 58.8%,
24
+ hsla(0, 0%, ${o}, 0.259) 64.7%,
25
+ hsla(0, 0%, ${o}, 0.175) 71%,
26
+ hsla(0, 0%, ${o}, 0.104) 77.5%,
27
+ hsla(0, 0%, ${o}, 0.049) 84.5%,
28
+ hsla(0, 0%, ${o}, 0.013) 91.9%,
29
+ hsla(0, 0%, ${o}, 0) 100%
30
+ `},Gn=100,Kn=10,vr=(0,m.Z)(n=>({root:{position:"relative",display:"flex",flexFlow:"row nowrap",alignItems:"center"},container:{overflow:"auto",scrollbarWidth:0,"&::-webkit-scrollbar":{display:"none"}},fade:{position:"absolute",width:Gn,height:`calc(100% + ${Kn}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-Kn,background:`linear-gradient(90deg, ${ar(n.palette.type)})`},fadeRight:{right:-Kn,background:`linear-gradient(270deg, ${ar(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function Ar(n){const[[o,c],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const g=n.current;if(!g){d([0,0]);return}const E=()=>{const I=g.scrollLeft,w=g.scrollWidth-g.offsetWidth-g.scrollLeft;d([I,w])};return E(),g.addEventListener("scroll",E),window.addEventListener("resize",E),()=>{g.removeEventListener("scroll",E),window.removeEventListener("resize",E)}},[n]),[o,c]}function Rr(n,o,c){const[d,g]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const E=performance.now(),I=requestAnimationFrame(w=>{if(!n.current)return;const K=w-E,W=Math.abs(d)*K/o,te=Math.max(c,W)*Math.sign(d);n.current.scrollBy({left:te});const Se=d-te;Math.sign(d)!==Math.sign(Se)?g(0):g(Se)});return()=>cancelAnimationFrame(I)},[n,d,o,c]),g}function On(n){const{scrollStep:o=100,scrollSpeed:c=50,minScrollDistance:d=5,children:g,...E}=n,I=vr(n),w=React.useRef(),[K,W]=Ar(w),ie=Rr(w,c,d),te=Se=>{!w.current||ie(Se?o:-o)};return React.createElement("div",{...E,className:I.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:I.container,ref:w},g),React.createElement("div",{className:classNames(I.fade,I.fadeLeft,{[I.fadeHidden]:K===0})}),React.createElement("div",{className:classNames(I.fade,I.fadeRight,{[I.fadeHidden]:W===0})}),K>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>te(!1),className:classNames(I.button,I.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),W>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>te(!0),className:classNames(I.button,I.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const ln=(0,m.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function wn(n){const o=ln(n),{shorthand:c,alpha:d}=n;return c?React.createElement("span",{className:o[d?"alpha":"beta"],style:{fontSize:"120%"}},d?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:o[d?"alpha":"beta"]},d?"Alpha":"Beta")}const $n=(0,t.lazy)(()=>Promise.all([e.e(3860),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function Sr(n){const{Progress:o}=(0,l.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(o,null)},t.createElement($n,{...n}))}const Cr=(0,m.Z)(n=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${n.palette.border}`},"& th, & td":{border:`1px solid ${n.palette.border}`,padding:n.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:n.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:n.palette.background.paper},"& tr":{backgroundColor:n.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:n.palette.background.default},"& a":{color:n.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),Yn={code:({inline:n,className:o,children:c,...d})=>{const g=String(c).replace(/\n+$/,""),E=/language-(\w+)/.exec(o||"");return!n&&E?t.createElement(fe,{language:E[1],text:g}):t.createElement("code",{className:o,...d},c)}};function to(n){const{content:o,dialect:c="gfm",linkTarget:d}=n,g=Cr();return React.createElement(ReactMarkdown,{remarkPlugins:c==="gfm"?[gfm]:[],className:g.markdown,children:o,components:Yn,linkTarget:d})}var Tr=e(10179);const Jn=(0,m.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),pn=({request:n,busy:o,setBusy:c})=>{const d=Jn(),[g,E]=useState(),I=async()=>{c(!0);try{await n.trigger()}catch(K){E(isError(K)?K.message:"An unspecified error occurred")}finally{c(!1)}},w=n.provider.icon;return React.createElement(ListItem,{button:!0,disabled:o,classes:{root:d.root}},React.createElement(ListItemAvatar,null,React.createElement(w,{fontSize:"large"})),React.createElement(ListItemText,{primary:n.provider.title,secondary:g&&React.createElement(Typography,{color:"error"},g)}),React.createElement(Button,{color:"primary",variant:"contained",onClick:I},"Log in"))};var kn=null;const Nn=(0,m.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function ir(n){const o=Nn(),[c,d]=useState(!1),g=useApi(oauthRequestApiRef),E=useObservable(useMemo(()=>g.authRequest$(),[g]),[]),I=()=>{E.forEach(w=>w.reject())};return React.createElement(Dialog,{open:Boolean(E.length),fullWidth:!0,maxWidth:"xs",classes:{paper:o.dialog}},React.createElement(DialogTitle,{classes:{root:o.title}},"Login Required"),React.createElement(DialogContent,{dividers:!0,classes:{root:o.contentList}},React.createElement(List,null,E.map(w=>React.createElement(LoginRequestListItem,{key:w.provider.title,request:w,busy:c,setBusy:d})))),React.createElement(DialogActions,{classes:{root:o.actionButtons}},React.createElement(Button,{onClick:I},"Reject All")))}var sr=e(15277),br=e.n(sr),yn=e(29862);const Qn=(0,m.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Pr(n){var I;const[o,c]=(0,t.useState)(!1),d=(0,yn.t)(),g=Qn(),E=w=>{d()&&c(w)};return t.createElement(O.ZP,{title:(I=n.title)!=null?I:n.text||"",placement:n.placement,disableHoverListener:!o},t.createElement(br(),{text:n.text,line:n.line,onToggled:E,containerClassName:g.container}))}var Ir=e(67358);function Xn(n){const[o,c]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>c(!0),250);return()=>clearTimeout(d)},[]),o?t.createElement(Ir.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Lr=e(94339),cr=e(14503),Or=e(24579),lr=e(32552),Qt=e(15459),En=e(95544),Z=e(27597);const re=(0,m.Z)(n=>({root:{maxWidth:"fit-content",padding:n.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:n.palette.textSubtle},arrow:{color:n.palette.textSubtle}}),{name:"BackstageBottomLink"});function me(n){const{link:o,title:c,onClick:d}=n,g=re();return t.createElement("div",null,t.createElement(Hn.Z,null),t.createElement(L,{to:o,onClick:d,underline:"none"},t.createElement(En.Z,{display:"flex",alignItems:"center",className:g.root},t.createElement(En.Z,{className:g.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(F.Z,null,t.createElement("strong",null,c))),t.createElement(Z.Z,{className:g.arrow}))))}const Me=n=>{const{slackChannel:o}=n;if(o){if(typeof o=="string")return t.createElement(t.Fragment,null,"Please contact ",o," for help.");if(!o.href)return t.createElement(t.Fragment,null,"Please contact ",o.name," for help.")}else return null;return t.createElement(M,{to:o.href,variant:"contained"},o.name)},_e=class extends t.Component{constructor(o){super(o);this.state={error:void 0,errorInfo:void 0}}componentDidCatch(o,c){console.error(`ErrorBoundary, error: ${o}, info: ${c}`),this.setState({error:o,errorInfo:c})}render(){const{slackChannel:o,children:c}=this.props,{error:d}=this.state;return d?t.createElement(cn,{title:"Something Went Wrong",error:d},t.createElement(Me,{slackChannel:o})):c}},pt=(0,m.Z)(n=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:n.spacing(2,2,2,2.5)},headerTitle:{fontWeight:700},headerSubheader:{paddingTop:n.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),mt=(0,Qt.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(cr.Z),ct={card:{flex:{display:"flex",flexDirection:"column"},fullHeight:{display:"flex",flexDirection:"column",height:"100%"},gridItem:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"}},cardContent:{fullHeight:{flex:1},gridItem:{flex:1}}};function ft(n){const{title:o,subheader:c,divider:d=!0,deepLink:g,slackChannel:E,errorBoundaryProps:I,variant:w,children:K,headerStyle:W,headerProps:ie,icon:te,action:Se,actionsClassName:ve,actions:Pe,cardClassName:it,actionsTopRight:Ct,className:Zt,noPadding:Vt,titleTypographyProps:at}=n,Tt=pt();let Ot={},Jt={};w&&w.split(/[\s]+/g).forEach(St=>{Ot={...Ot,...ct.card[St]},Jt={...Jt,...ct.cardContent[St]}});const Zn=()=>t.createElement("div",{className:Tt.headerSubheader},c&&t.createElement("div",{className:Tt.subheader},c),te),Sn=I||(E?{slackChannel:E}:{});return t.createElement(Lr.Z,{style:Ot,className:Zt},t.createElement(_e,{...Sn},o&&t.createElement(lr.Z,{classes:{root:Tt.header,title:Tt.headerTitle,subheader:Tt.headerSubheader,avatar:Tt.headerAvatar,action:Tt.headerAction,content:Tt.headerContent},title:o,subheader:Zn(),action:Se,style:{...W},titleTypographyProps:at,...ie}),Ct&&t.createElement(mt,null,Ct),d&&t.createElement(Hn.Z,null),t.createElement(Or.Z,{className:se()(it,{[Tt.noPadding]:Vt}),style:Jt},K),Pe&&t.createElement(cr.Z,{className:ve},Pe),g&&t.createElement(me,{...g})))}var Lt=e(39307);const Mt=(0,m.Z)(n=>({root:{position:"relative",lineHeight:0},overlay:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -60%)",fontSize:45,fontWeight:"bold",color:n.palette.textContrast},description:{fontSize:"100%",top:"50%",left:"50%",transform:"translate(-50%, -50%)",position:"absolute",wordBreak:"break-all",display:"inline-block"},circle:{width:"80%",transform:"translate(10%, 0)"},colorUnknown:{}}),{name:"BackstageGauge"}),rn={fractional:!0,inverse:!1,unit:"%",max:100},tn=({palette:n,value:o,inverse:c,max:d})=>{if(isNaN(o))return"#ddd";const g=d||rn.max,E=c?g-o:o;return E<g/3?n.status.error:E<g*(2/3)?n.status.warning:n.status.ok};function qn(n){const[o,c]=useState(null),{getColor:d=tn}=n,g=Mt(n),{palette:E}=useTheme(),{value:I,fractional:w,inverse:K,unit:W,max:ie,description:te}={...rn,...n},Se=w?Math.round(I*ie):I,ve=ie!==100?Math.round(I):Se,[Pe,it]=useState(!1);return useEffect(()=>{const Ct=o,Zt=()=>it(!0),Vt=()=>it(!1);return Ct&&te?(Ct.addEventListener("mouseenter",Zt),Ct.addEventListener("mouseleave",Vt),()=>{Ct.removeEventListener("mouseenter",Zt),Ct.removeEventListener("mouseleave",Vt)}):()=>{it(!1)}},[te,o]),React.createElement("div",{ref:c,className:g.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Se,strokeWidth:12,trailWidth:12,strokeColor:d({palette:E,value:ve,inverse:K,max:ie}),className:g.circle}),te&&Pe?React.createElement("div",{className:g.description},te):React.createElement("div",{className:g.overlay},isNaN(I)?"N/A":`${ve}${W}`))}const vn=(0,m.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function _n(n){const o=vn(n),{title:c,subheader:d,progress:g,inverse:E,deepLink:I,description:w,icon:K,variant:W,getColor:ie}=n,te={inverse:E,description:w,getColor:ie,value:g};return React.createElement("div",{className:o.root},React.createElement(InfoCard,{title:c,subheader:d,deepLink:I,variant:W,icon:K},React.createElement(Gauge,{...te})))}function Hr(n){const{value:o,getColor:c=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(o))return null;let g=Math.round(o*100*100)/100;g>100&&(g=100);const E=c({palette:d,value:g,inverse:!1,max:100});return React.createElement(Tooltip,{title:`${g}%`},React.createElement("span",null,React.createElement(Line,{percent:g,strokeWidth:4,trailWidth:4,strokeColor:E})))}var Un=e(21324),jr=e(7089),S=e(1292),P=e(42494),U=e(74603),V=e(12231),X=e(73698),k=e(72379);const he=(0,m.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Ne=()=>{const n=he();return t.createElement(k.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"}))};const Fe=(0,m.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var we=()=>{const n=Fe();return t.createElement(k.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"}))};const Ge=(0,Qt.Z)(n=>(0,a.Z)({root:{"label + &":{marginTop:n.spacing(3)}},input:{borderRadius:4,position:"relative",backgroundColor:n.palette.background.paper,border:"1px solid #ced4da",fontSize:16,padding:"10px 26px 10px 12px",transition:n.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:n.palette.background.paper,borderRadius:4}}}),{name:"BackstageSelectInputBase"})(U.Z),Et=(0,m.Z)(n=>(0,a.Z)({formControl:{margin:`${n.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:n.typography.fontFamily,color:n.palette.text.primary,"&.Mui-focused":{color:n.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function et(n){const{multiple:o,items:c,label:d,placeholder:g,selected:E,onChange:I,triggerReset:w,native:K=!1,disabled:W=!1}=n,ie=Et(),[te,Se]=(0,t.useState)(E||(o?[]:"")),[ve,Pe]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Se(o?[]:"")},[w,o]),(0,t.useEffect)(()=>{E!==void 0&&Se(E)},[E]);const it=at=>{Se(at.target.value),I(at.target.value)},Ct=at=>{if(W){at.preventDefault();return}Pe(Tt=>o&&!(at.target instanceof HTMLElement)?!0:!Tt)},Zt=()=>{Pe(!1)},Vt=at=>()=>{const Tt=te.filter(Ot=>Ot!==at);Se(Tt),I(Tt)};return t.createElement("div",{className:ie.root},t.createElement(F.Z,{variant:"button"},d),t.createElement(S.Z,{onClickAway:Zt},t.createElement(P.Z,{className:ie.formControl},t.createElement(X.Z,{value:te,native:K,disabled:W,"data-testid":"select",displayEmpty:!0,multiple:o,onChange:it,onClick:Ct,open:ve,input:t.createElement(Ge,null),renderValue:at=>{var Tt;return o&&te.length!==0?t.createElement("div",{className:ie.chips},at.map(Ot=>{var Jt,Zn;return t.createElement(jr.Z,{key:(Jt=c.find(Sn=>Sn.value===Ot))==null?void 0:Jt.value,label:(Zn=c.find(Sn=>Sn.value===Ot))==null?void 0:Zn.label,clickable:!0,onDelete:Vt(Ot),className:ie.chip})})):t.createElement(F.Z,null,te.length===0?g||"":(Tt=c.find(Ot=>Ot.value===at))==null?void 0:Tt.label)},IconComponent:()=>ve?t.createElement(we,null):t.createElement(Ne,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},g&&!o&&t.createElement(V.Z,{value:[]},g),K?c&&c.map(at=>t.createElement("option",{value:at.value,key:at.value},at.label)):c&&c.map(at=>t.createElement(V.Z,{key:at.value,value:at.value},o&&t.createElement(Un.Z,{color:"primary",checked:te.includes(at.value)||!1,className:ie.checkbox}),at.label))))))}const ze=()=>{},Bt=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:ze,stepHistory:[],setStepHistory:ze,onStepChange:ze});function jt(n){const{children:o,elevated:c,onStepChange:d,activeStep:g=0}=n,[E,I]=useState(g),[w,K]=useState([0]);useEffect(()=>{I(g)},[g]);const W=[];let ie;return Children.forEach(o,te=>{isValidElement(te)&&(te.props.end?ie=te:W.push(te))}),React.createElement(React.Fragment,null,React.createElement(Bt.Provider,{value:{stepIndex:E,setStepIndex:I,stepHistory:w,setStepHistory:K,onStepChange:d,stepperLength:Children.count(o)}},React.createElement(MuiStepper,{activeStep:E,orientation:"vertical",elevation:c?2:0},W)),E>=Children.count(o)-1&&ie)}const Dn=(0,m.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),un=({text:n,handleClick:o})=>React.createElement(Button,{onClick:o},n||"Reset"),Xt=({text:n,handleClick:o,disabled:c,last:d,stepIndex:g})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:c,"data-testid":`nextButton-${g}`,onClick:o},n||(d?"Finish":"Next")),on=({text:n,handleClick:o,disabled:c,stepIndex:d})=>React.createElement(Button,{onClick:o,"data-testid":`backButton-${d}`,disabled:c},n||"Back"),An=({actions:n={},children:o})=>{const c=Dn(),{stepperLength:d,stepIndex:g,setStepIndex:E,stepHistory:I,setStepHistory:w,onStepChange:K}=useContext(VerticalStepperContext),W=(ve,Pe)=>{Pe&&Pe(),K&&K(g,ve),E(ve)},ie=()=>{const ve=n.nextStep?n.nextStep(g,d-1):g+1;W(ve,n.onNext),w([...I,ve])},te=()=>{I.pop(),W(I[I.length-1],n.onBack),w([...I])},Se=()=>{W(0,n.onRestart),w([0])};return React.createElement("div",{className:c.root},[void 0,!0].includes(n.showBack)&&g!==0&&React.createElement(on,{text:n.backText,handleClick:te,disabled:g===0,stepIndex:g}),[void 0,!0].includes(n.showNext)&&React.createElement(Xt,{text:n.nextText,handleClick:ie,disabled:!!d&&g>=d||!!n.canNext&&!n.canNext(),stepIndex:g}),n.showRestart&&g!==0&&React.createElement(un,{text:n.restartText,handleClick:Se,stepIndex:g}),o)},ur=(0,m.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function xr(n){const{title:o,children:c,end:d,actions:g,...E}=n,I=ur();return d?React.createElement("div",{className:I.end},React.createElement(Typography,{variant:"h6"},o),c,React.createElement(SimpleStepperFooter,{actions:{...g||{},showNext:!1}})):React.createElement(MuiStep,{...E},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},o)),React.createElement(StepContent,null,c,React.createElement(SimpleStepperFooter,{actions:g})))}const Fn=(0,m.Z)(n=>({status:{fontWeight:500,"&::before":{width:"0.7em",height:"0.7em",display:"inline-block",marginRight:8,borderRadius:"50%",content:'""'}},ok:{"&::before":{backgroundColor:n.palette.status.ok}},warning:{"&::before":{backgroundColor:n.palette.status.warning}},error:{"&::before":{backgroundColor:n.palette.status.error}},pending:{"&::before":{backgroundColor:n.palette.status.pending}},running:{"&::before":{backgroundColor:n.palette.status.running}},aborted:{"&::before":{backgroundColor:n.palette.status.aborted}}}),{name:"BackstageStatus"});function dn(n){const o=Fn(n);return React.createElement("span",{className:classNames(o.status,o.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function fn(n){const o=Fn(n);return React.createElement("span",{className:classNames(o.status,o.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Dr(n){const o=Fn(n);return React.createElement("span",{className:classNames(o.status,o.error),"aria-label":"Status error","aria-hidden":"true",...n})}function no(n){const o=Fn(n);return React.createElement("span",{className:classNames(o.status,o.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function js(n){const o=Fn(n);return React.createElement("span",{className:classNames(o.status,o.running),"aria-label":"Status running","aria-hidden":"true",...n})}function Vs(n){const o=Fn(n);return React.createElement("span",{className:classNames(o.status,o.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var Gs=e(74600),go=e(15584);const sa=n=>(0,a.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),ca={root:{border:"0",verticalAlign:"top"}},la=n=>(0,a.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),ua=n=>(0,a.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),da=(0,Qt.Z)(sa,{name:"BackstageMetadataTableTitleCell"})(go.Z),fa=(0,Qt.Z)(ca,{name:"BackstageMetadataTableCell"})(go.Z),Ks=({dense:n,children:o})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,o)),Ys=({title:n,children:o,...c})=>React.createElement(TableRow,null,n&&React.createElement(da,null,n),React.createElement(fa,{colSpan:n?1:2,...c},o)),po=(0,Qt.Z)(la,{name:"BackstageMetadataTableList"})(({classes:n,children:o})=>t.createElement("ul",{className:n.root},o)),Js=(0,Qt.Z)(ua,{name:"BackstageMetadataTableListItem"})(({classes:n,children:o})=>t.createElement("li",{className:n.root},o)),yo=(0,a.Z)({root:{margin:"0 0",listStyleType:"none"}}),ma=n=>(0,a.Z)({root:{...yo.root,paddingLeft:n.spacing(1)}}),Eo=(0,Qt.Z)(yo,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:o})=>t.createElement(po,{classes:n},o)),vo=(0,Qt.Z)(ma,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:o})=>t.createElement(po,{classes:n},o));function ha(n,o){const c=n.map((d,g)=>React.createElement(MetadataListItem,{key:g},ro(d)));return o?React.createElement(vo,null,c):React.createElement(Eo,null,c)}function ga(n,o,c){const d=Object.keys(n).map(g=>{const E=ro(n[g],!0),I=c&&c.titleFormat?c.titleFormat(g):startCase(g);return React.createElement(MetadataListItem,{key:g},`${I}: `,E)});return o?React.createElement(vo,null,d):React.createElement(Eo,null,d)}function ro(n,o,c){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?ga(n,o,c):Array.isArray(n)?ha(n,c):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const pa=({value:n,options:o})=>React.createElement(Fragment,null,ro(n,o)),ya=({title:n,value:o,options:c})=>React.createElement(MetadataTableItem,{title:c&&c.titleFormat?c.titleFormat(n):startCase(n)},React.createElement(pa,{value:o,options:c}));function Ea(n,o){return Object.keys(n).map(c=>React.createElement(ya,{key:c,title:c,value:n[c],options:o}))}function ks(n){const{metadata:o,dense:c=!0,options:d}=n,g=Ea(o,d||{});return React.createElement(MetadataTable,{dense:c},g)}var va=e(49429),Aa=e(86136),Ao=e(79784),Fr=e(76635),Ra=e(19126),Ro=e.n(Ra);function Sa(n){return qs.stringify(n,{strictNullHandling:!0})}function So(n){return qs.parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Co(n,o){return So(n)[o]}function Ca(n,o,c){const d={...So(n),[o]:c};return Sa(d)}function Qs(n,o=250){const[c,d]=useSearchParams(),g=c.toString(),[E,I]=useState(Co(g,n));return useEffect(()=>{const w=Co(g,n);I(K=>isEqual(w,K)?K:w)},[g,I,n]),useDebouncedEffect(()=>{const w=Ca(g,n,E);g!==w&&d(w,{replace:!0})},[d,E,g,n],o),[E,I]}const Ta={url:"https://github.com/backstage/backstage/issues",items:[{title:"Support Not Configured",icon:"warning",links:[{title:"Add `app.support` config key",url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]};function To(){const o=(0,l.useApiHolder)().get(l.configApiRef),c=o==null?void 0:o.getOptionalConfig("app.support");return c?{url:c.getString("url"),items:c.getConfigArray("items").flatMap(d=>{var g;return{title:d.getString("title"),icon:d.getOptionalString("icon"),links:((g=d.getOptionalConfigArray("links"))!=null?g:[]).flatMap(E=>({url:E.getString("url"),title:E.getString("title")}))}})}:Ta}var ba=e(80079);function Pn(n,o){const d=(0,l.useApp)().getSystemIcon(n);return d?t.createElement(d,{...o}):t.createElement(ba.Z,{...o})}function Xs(n){return Pn("brokenImage",n)}function _s(n){return Pn("catalog",n)}function ec(n){return Pn("chat",n)}function tc(n){return Pn("dashboard",n)}function nc(n){return Pn("docs",n)}function rc(n){return Pn("email",n)}function oc(n){return Pn("github",n)}function ac(n){return Pn("group",n)}function Vr(n){return Pn("help",n)}function ic(n){return Pn("user",n)}function sc(n){return Pn("warning",n)}const Pa=(0,m.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Ia=({icon:n})=>{var d;const o=(0,l.useApp)(),c=n&&(d=o.getSystemIcon(n))!=null?d:Vr;return t.createElement(c,null)},La=({link:n})=>{var o;return t.createElement(L,{to:n.url},(o=n.title)!=null?o:n.url)},Oa=({item:n})=>{var o;return t.createElement(rt.Z,null,t.createElement(Aa.Z,null,t.createElement(Ia,{icon:n.icon})),t.createElement(st.Z,{primary:n.title,secondary:(o=n.links)==null?void 0:o.reduce((c,d,g)=>[...c,g>0&&t.createElement("br",{key:g}),t.createElement(La,{link:d,key:d.url})],[])}))};function xa(n){const{title:o,children:c}=n,{items:d}=To(),[g,E]=(0,t.useState)(!1),[I,w]=(0,t.useState)(null),K=Pa(),W=(0,ye.Z)(Se=>Se.breakpoints.down("sm")),ie=Se=>{w(Se.currentTarget),E(!0)},te=()=>{E(!1)};return t.createElement(t.Fragment,null,t.createElement(En.Z,{display:"flex",ml:1},W?t.createElement(D.Z,{color:"primary",size:"small",onClick:ie,"data-testid":"support-button"},t.createElement(Vr,null)):t.createElement(y.Z,{"data-testid":"support-button",color:"primary",onClick:ie,startIcon:t.createElement(Vr,null)},"Support")),t.createElement(Ao.ZP,{"data-testid":"support-button-popover",open:g,anchorEl:I,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:te},t.createElement(yt.Z,{className:K.popoverList},o&&t.createElement(rt.Z,{alignItems:"flex-start"},t.createElement(F.Z,{variant:"subtitle1"},o)),t.Children.map(c,(Se,ve)=>t.createElement(rt.Z,{alignItems:"flex-start",key:`child-${ve}`},Se)),d&&d.map((Se,ve)=>t.createElement(Oa,{item:Se,key:`item-${ve}`}))),t.createElement(va.Z,null,t.createElement(y.Z,{color:"primary",onClick:te},"Close"))))}var oo=e(18671),Rn=e(10289);const Gr=72,bo=24,Po=18,Bn={drawerWidthClosed:Gr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Gr,iconSize:Gr-bo*2,iconPadding:bo,selectedIndicatorWidth:3,userBadgePadding:Po,userBadgeDiameter:Gr-Po*2,mobileSidebarHeight:56},Da=n=>({...Bn,...n,iconContainerWidth:Bn.drawerWidthClosed,iconSize:Bn.drawerWidthClosed-Bn.iconPadding*2,userBadgeDiameter:Bn.drawerWidthClosed-Bn.userBadgePadding*2}),Io={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:Bn.defaultOpenDelayMs+200},Fa=n=>({...Io,...n}),cc="@backstage/core/sidebar-intro-dismissed",Br=(0,t.createContext)({isOpen:!1,setOpen:()=>{}}),xn=(0,t.createContext)({sidebarConfig:Bn,submenuConfig:Io}),Lo=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var Kr;(function(n){const o="sidebarPinState";n.SIDEBAR_PIN_STATE=o})(Kr||(Kr={}));const Oo={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(Kr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(Kr.SIDEBAR_PIN_STATE,JSON.stringify(n))}},Ba=(0,m.Z)(n=>({root:o=>({width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:()=>o.isPinned?o.sidebarConfig.drawerWidthOpen:o.sidebarConfig.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:o.sidebarConfig.mobileSidebarHeight}}),content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),dr=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1}),xo=(0,t.createContext)({content:{contentRef:void 0}});function Ma(n){const[o,c]=(0,t.useState)(()=>Oo.getSidebarPinState()),{sidebarConfig:d}=(0,t.useContext)(xn),g=(0,t.useRef)(null),E=(0,t.useMemo)(()=>({content:{contentRef:g}}),[g]);(0,t.useEffect)(()=>{Oo.setSidebarPinState(o)},[o]);const I=(0,ye.Z)(W=>W.breakpoints.down("xs"),{noSsr:!0}),w=()=>c(!o),K=Ba({isPinned:o,sidebarConfig:d});return t.createElement(dr.Provider,{value:{isPinned:o,toggleSidebarPinState:w,isMobile:I}},t.createElement(xo.Provider,{value:E},t.createElement("div",{className:K.root},n.children)))}function Do(){const{content:n}=(0,t.useContext)(xo);return{focusContent:(0,t.useCallback)(()=>{var c,d;(d=(c=n==null?void 0:n.contentRef)==null?void 0:c.current)==null||d.focus()},[n]),contentRef:n==null?void 0:n.contentRef}}var wa=e(50023),$a=e(4190),Na=e(87685),Ua=e(44882),Za=e(57998);const za=(0,m.Z)(n=>({root:{flexGrow:0,margin:n.spacing(0,2),color:n.palette.navigation.color},selected:o=>({color:`${n.palette.navigation.selectedColor}!important`,borderTop:`solid ${o.sidebarConfig.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),Wa=n=>{const{to:o,label:c,icon:d,value:g}=n,{sidebarConfig:E}=(0,t.useContext)(xn),I=za({sidebarConfig:E}),w=(0,Rn.TH)(),{selectedMenuItemIndex:K,setSelectedMenuItemIndex:W}=(0,t.useContext)(Mo),ie=(Se,ve)=>{W(ve===K?-1:ve)},te=g===K&&K>=0||g!==K&&!(K>=0)&&o===w.pathname;return t.createElement(Za.Z,{label:c,icon:d,component:L,to:o||w.pathname,onChange:ie,value:g,selected:te,classes:I})},Fo=n=>{const{children:o,to:c,label:d,icon:g,value:E}=n,{isMobile:I}=(0,t.useContext)(dr);return I?t.createElement(Wa,{to:c,label:d,icon:g,value:E}):t.createElement(t.Fragment,null,o)},Bo=(0,m.Z)(n=>({root:{position:"fixed",backgroundColor:n.palette.navigation.background,color:n.palette.navigation.color,bottom:0,left:0,right:0,zIndex:n.zIndex.snackbar,borderTop:"1px solid #383838"},overlay:o=>({background:n.palette.navigation.background,width:"100%",bottom:`${o.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${o.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:n.palette.bursts.fontColor,alignItems:"center",justifyContent:"space-between",padding:n.spacing(2,3)},overlayHeaderClose:{color:n.palette.bursts.fontColor},marginMobileSidebar:o=>({marginBottom:`${o.sidebarConfig.mobileSidebarHeight}px`})})),Ha=n=>(0,Fr.orderBy)(n,({props:{priority:o}})=>Number.isInteger(o)?o:-1,"desc"),ja=t.createElement(Fo).type,Va=({children:n,label:o="Menu",open:c,onClose:d})=>{const{sidebarConfig:g}=(0,t.useContext)(xn),E=Bo({sidebarConfig:g});return t.createElement($a.ZP,{anchor:"bottom",open:c,onClose:d,ModalProps:{BackdropProps:{classes:{root:E.marginMobileSidebar}}},classes:{root:E.marginMobileSidebar,paperAnchorBottom:E.overlay}},t.createElement(En.Z,{className:E.overlayHeader},t.createElement(F.Z,{variant:"h3"},o),t.createElement(D.Z,{onClick:d,classes:{root:E.overlayHeaderClose}},t.createElement(Na.Z,null))),t.createElement(En.Z,null,n))},Mo=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),Ga=n=>{const{sidebarConfig:o}=(0,t.useContext)(xn),{children:c}=n,d=Bo({sidebarConfig:o}),g=(0,Rn.TH)(),[E,I]=(0,t.useState)(-1);(0,t.useEffect)(()=>{I(-1)},[g.pathname]);let w=(0,l.useElementFilter)(c,W=>W.getElements().filter(ie=>ie.type===ja));if(c)w.length?w=Ha(w):w.push(t.createElement(Fo,{key:"default_menu",icon:t.createElement(Ua.Z,null)},c));else return null;const K=E>=0&&!w[E].props.to;return t.createElement(Br.Provider,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(Mo.Provider,{value:{selectedMenuItemIndex:E,setSelectedMenuItemIndex:I}},t.createElement(Va,{label:w[E]&&w[E].props.label,open:K,onClose:()=>I(-1)},w[E]&&w[E].props.children),t.createElement(wa.Z,{className:d.root,"data-testid":"mobile-sidebar-root"},w)))},wo=(0,m.Z)(n=>({drawer:o=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:n.zIndex.appBar,background:n.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:o.sidebarConfig.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:o=>({width:o.sidebarConfig.drawerWidthOpen,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var mn;(function(n){n[n.Closed=0]="Closed";const c=0+1;n[n.Idle=c]="Idle";const d=c+1;n[n.Open=d]="Open"})(mn||(mn={}));const Ka=n=>{const{sidebarConfig:o}=(0,t.useContext)(xn),{openDelayMs:c=o.defaultOpenDelayMs,closeDelayMs:d=o.defaultCloseDelayMs,disableExpandOnHover:g,children:E}=n,I=wo({sidebarConfig:o}),w=(0,ye.Z)(Zt=>Zt.breakpoints.down("md"),{noSsr:!0}),[K,W]=(0,t.useState)(mn.Closed),ie=(0,t.useRef)(),{isPinned:te,toggleSidebarPinState:Se}=(0,t.useContext)(dr),ve=()=>{te||g||(ie.current&&(clearTimeout(ie.current),ie.current=void 0),K!==mn.Open&&!w&&(ie.current=window.setTimeout(()=>{ie.current=void 0,W(mn.Open)},c),W(mn.Idle)))},Pe=()=>{te||g||(ie.current&&(clearTimeout(ie.current),ie.current=void 0),K===mn.Idle?W(mn.Closed):K===mn.Open&&(ie.current=window.setTimeout(()=>{ie.current=void 0,W(mn.Closed)},d)))},it=K===mn.Open&&!w||te,Ct=Zt=>{Zt?(W(mn.Open),Se()):(W(mn.Closed),Se())};return t.createElement("div",{style:{}},t.createElement(Ja,null),t.createElement(Br.Provider,{value:{isOpen:it,setOpen:Ct}},t.createElement("div",{className:I.root,"data-testid":"sidebar-root",onMouseEnter:g?()=>{}:ve,onFocus:g?()=>{}:ve,onMouseLeave:g?()=>{}:Pe,onBlur:g?()=>{}:Pe},t.createElement("div",{className:se()(I.drawer,{[I.drawerOpen]:it})},E))))},Ya=n=>{var K,W;const o=Da((K=n.sidebarOptions)!=null?K:{}),c=Fa((W=n.submenuOptions)!=null?W:{}),{children:d,disableExpandOnHover:g,openDelayMs:E,closeDelayMs:I}=n,{isMobile:w}=(0,t.useContext)(dr);return w?t.createElement(Ga,null,d):t.createElement(xn.Provider,{value:{sidebarConfig:o,submenuConfig:c}},t.createElement(Ka,{openDelayMs:E,closeDelayMs:I,disableExpandOnHover:g},d))};function Ja(){const{sidebarConfig:n}=(0,t.useContext)(xn),{focusContent:o,contentRef:c}=Do(),d=wo({sidebarConfig:n});return c!=null&&c.current?t.createElement(y.Z,{onClick:o,variant:"contained",className:se()(d.visuallyHidden)},"Skip to content"):null}function $o(n,o){const c=new URLSearchParams(o.search).toString(),d=Ro().parse(c),g=new URLSearchParams(n.search).toString(),E=Ro().parse(g);return(0,Fr.isEqual)(o.pathname,n.pathname)&&(0,Fr.isMatch)(E,d)}const ka=(0,m.Z)(n=>({item:{height:48,width:"100%","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor},display:"flex",alignItems:"center",color:n.palette.navigation.color,padding:20,cursor:"pointer",position:"relative",background:"none",border:"none"},itemContainer:{width:"100%"},selected:{background:"#6f6f6f",color:"#FFF"},label:{margin:14,marginLeft:7,fontSize:14},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0"},textContent:{color:n.palette.navigation.color,display:"flex",justifyContent:"center",[n.breakpoints.down("xs")]:{display:"block",paddingLeft:n.spacing(4)},fontSize:"14px"}}),{name:"BackstageSidebarSubmenuItem"}),lc=n=>{const{title:o,to:c,icon:d,dropdownItems:g}=n,E=ka(),{setIsHoveredOn:I}=useContext(SidebarItemWithSubmenuContext),w=()=>{I(!1)},K=useResolvedPath(c),W=useLocation();let ie=isLocationMatch(W,K);const[te,Se]=useState(!1),ve=()=>{Se(!te)};return g!==void 0?(g.some(Pe=>{const it=resolvePath(Pe.to);return ie=isLocationMatch(W,it),ie}),React.createElement("div",{className:E.itemContainer},React.createElement("button",{onClick:ve,onTouchStart:Pe=>Pe.stopPropagation(),className:classnames(E.item,ie?E.selected:void 0)},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:E.label},o),te?React.createElement(ArrowDropUpIcon,{className:E.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:E.dropdownArrow})),g&&te&&React.createElement("div",{className:E.dropdown},g.map((Pe,it)=>React.createElement(Link,{to:Pe.to,underline:"none",className:E.dropdownItem,onClick:w,onTouchStart:Ct=>Ct.stopPropagation(),key:it},React.createElement(Typography,{className:E.textContent},Pe.title)))))):React.createElement("div",{className:E.itemContainer},React.createElement(Link,{to:c,underline:"none",className:classnames(E.item,ie?E.selected:void 0),onClick:w,onTouchStart:Pe=>Pe.stopPropagation()},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:E.label},o)))},Qa=(0,m.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:o=>{var c,d;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[n.breakpoints.up("sm")]:{marginLeft:o.left,transition:n.transitions.create("margin-left",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(d=(c=n.palette.navigation.submenu)==null?void 0:c.background)!=null?d:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:o.submenuConfig.drawerWidthClosed,transitionDelay:`${o.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}},drawerOpen:o=>({width:o.submenuConfig.drawerWidthOpen,[n.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:n.spacing(3),left:0,top:0}}),title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[n.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),Xa=n=>{const{isOpen:o}=(0,t.useContext)(Br),{sidebarConfig:c,submenuConfig:d}=(0,t.useContext)(xn),g=o?c.drawerWidthOpen:c.drawerWidthClosed,E=Qa({left:g,submenuConfig:d}),{isHoveredOn:I}=(0,t.useContext)(Lo),[w,K]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{K(I)},[I]),t.createElement("div",{className:se()(E.drawer,{[E.drawerOpen]:w})},t.createElement(F.Z,{variant:"h5",className:E.title},n.title),n.children)};var Yr=e(76600),qa=e(26739),_a=e(98989),ei=e(59797),ti=e(83543);const ni=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),uc=()=>{const n=ni();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})))};var dc=null;const ri=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),fc=()=>{const n=ri();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})))};var mc=null;const oi=n=>(0,m.Z)(o=>{var c,d,g,E;return{root:{color:o.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"100%",margin:0,padding:0,textAlign:"inherit",font:"inherit"},closed:{width:n.drawerWidthClosed,justifyContent:"center"},open:{[o.breakpoints.up("sm")]:{width:n.drawerWidthOpen}},highlightable:{"&:hover":{background:(d=(c=o.palette.navigation.navItem)==null?void 0:c.hoverBackground)!=null?d:"#404040"}},highlighted:{background:(E=(g=o.palette.navigation.navItem)==null?void 0:g.hoverBackground)!=null?E:"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:{boxSizing:"border-box",height:"100%",width:n.iconContainerWidth,marginRight:-o.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:o.typography.fontSize},searchFieldHTMLInput:{padding:o.spacing(2,0,2)},searchContainer:{width:n.drawerWidthOpen-n.iconContainerWidth},secondaryAction:{width:o.spacing(6),textAlign:"center",marginRight:o.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:o.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${n.selectedIndicatorWidth}px ${o.palette.navigation.indicator}`,color:o.palette.navigation.selectedColor},"&$closed":{width:n.drawerWidthClosed},"& $closedItemIcon":{paddingRight:n.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-n.selectedIndicatorWidth}}}},{name:"BackstageSidebarItem"});function Jr(n){return(0,t.useMemo)(()=>oi(n),[n])()}const ai=(n,o)=>(0,l.useElementFilter)(n.props.children,c=>{let d=!1;return c.getElements().forEach(({props:{to:g,dropdownItems:E}})=>{if(!d){if(E!=null&&E.length){E.forEach(({to:I})=>d=d||$o(o,(0,Rn.i3)(I)));return}g&&(d=$o(o,(0,Rn.i3)(g)))}}),d},[o.pathname]);function No(n){return n.to===void 0}const ii=t.createElement(Xa).type,si=t.forwardRef(function({to:o,end:c,style:d,className:g,activeStyle:E,caseSensitive:I,activeClassName:w="active","aria-current":K="page",...W},ie){let{pathname:te}=(0,Rn.TH)(),{pathname:Se}=(0,Rn.WU)(o);I||(te=te.toLocaleLowerCase("en-US"),Se=Se.toLocaleLowerCase("en-US"));let ve=te===Se;!ve&&!c&&(ve=te.startsWith(`${Se}/`));const Pe=ve?K:void 0;return t.createElement(A.rU,{...W,to:o,ref:ie,"aria-current":Pe,style:{...d,...ve?E:void 0},className:se()([g,ve?w:void 0])})}),Uo=(0,t.forwardRef)((n,o)=>{const{icon:c,text:d,hasNotifications:g=!1,disableHighlight:E=!1,onClick:I,children:w,className:K,...W}=n,{sidebarConfig:ie}=(0,t.useContext)(xn),te=Jr(ie),{isOpen:Se}=(0,t.useContext)(Br),ve=t.createElement(qa.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!g,className:se()({[te.closedItemIcon]:!Se})},t.createElement(c,{fontSize:"small"})),Pe=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:te.iconContainer},ve),d&&t.createElement(F.Z,{variant:"subtitle2",className:te.label},d),t.createElement("div",{className:te.secondaryAction},w)),it=Se?Pe:ve,Ct={onClick:I,className:se()(K,te.root,Se?te.open:te.closed,No(n)&&te.buttonItem,{[te.highlightable]:!E})};return No(n)?t.createElement("button",{"aria-label":d,...Ct,ref:o},it):t.createElement(si,{...Ct,activeClassName:te.selected,to:n.to?n.to:"",ref:o,"aria-label":d||n.to,...W},it)}),ci=({children:n,...o})=>{const{sidebarConfig:c}=(0,t.useContext)(xn),d=Jr(c),[g,E]=(0,t.useState)(!1),I=(0,Rn.TH)(),w=ai(n,I),K=(0,ye.Z)(Se=>Se.breakpoints.down("sm")),W=()=>{E(!0)},ie=()=>{E(!1)},te=()=>K?g?t.createElement(ei.Z,{fontSize:"small",className:d.submenuArrow}):t.createElement(ti.Z,{fontSize:"small",className:d.submenuArrow}):!g&&t.createElement(_a.Z,{fontSize:"small",className:d.submenuArrow});return t.createElement(Lo.Provider,{value:{isHoveredOn:g,setIsHoveredOn:E}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:ie,onTouchStart:g?ie:W,onMouseEnter:W,className:se()(g&&d.highlighted)},t.createElement(Uo,{className:w?d.selected:"",...o},te()),g&&n))},Zo=(0,t.forwardRef)((n,o)=>{const[c]=(0,l.useElementFilter)(n.children,d=>d.getElements().filter(g=>g.type===ii));return c?t.createElement(ci,{...n},c):t.createElement(Uo,{...n,ref:o})});function hc(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),[c,d]=useState(""),g=Jr(o),E=n.icon?n.icon:SearchIcon,I=()=>{n.onSearch(c),d("")},w=te=>{te.key==="Enter"&&(te.preventDefault(),I())},K=te=>{d(te.target.value)},W=te=>{te.preventDefault(),te.stopPropagation()},ie=te=>{I(),te.preventDefault()};return React.createElement("div",{className:g.searchRoot},React.createElement(Zo,{icon:E,to:n.to,onClick:ie,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:c,onClick:W,onChange:K,onKeyDown:w,className:g.searchContainer,InputProps:{disableUnderline:!0,className:g.searchField},inputProps:{className:g.searchFieldHTMLInput}})))}const gc=(0,Yr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),pc=(0,Yr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),li=(0,Yr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),ui=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),yc=(0,Yr.Z)("div")(({theme:n})=>{const o=ui(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":o,"&:hover":o}}),Ec=()=>{const{sidebarConfig:n}=useContext(SidebarConfigContext),o=Jr(n),{isOpen:c,setOpen:d}=useContext(SidebarContext);if(useMediaQuery(I=>I.breakpoints.down("md"),{noSsr:!0}))return null;const E=()=>{d(!c)};return React.createElement("button",{onClick:E,className:o.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:o.arrows},c?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},di=(0,m.Z)(n=>({introCard:o=>({color:"#b5b5b5",fontSize:12,width:o.sidebarConfig.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:o.sidebarConfig.iconPadding,paddingRight:o.sidebarConfig.iconPadding}),introDismiss:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:12},introDismissLink:{color:"#dddddd",display:"flex",alignItems:"center",marginBottom:4,"&:hover":{color:n.palette.linkHover,transition:n.transitions.create("color",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})}},introDismissText:{fontSize:"0.7rem",fontWeight:"bold",textTransform:"uppercase",letterSpacing:1},introDismissIcon:{width:18,height:18,marginRight:12}}),{name:"BackstageSidebarIntro"});function fi(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),c=di({sidebarConfig:o}),{text:d,onClose:g}=n,E=()=>g();return React.createElement("div",{className:c.introCard},React.createElement(Typography,{variant:"subtitle2"},d),React.createElement("div",{className:c.introDismiss},React.createElement(Link,{component:"button",onClick:E,underline:"none",className:c.introDismissLink},React.createElement(CloseIcon,{className:c.introDismissIcon}),React.createElement(Typography,{component:"span",className:c.introDismissText},"Dismiss"))))}const zo=n=>{const{text:o,onDismiss:c}=n,[d,g]=useState(!1),E=()=>{g(!0)};return React.createElement(Collapse,{in:!d,onExited:c},React.createElement(fi,{text:o,onClose:E}))},mi=null,hi="And your recently viewed plugins will pop up here!";function vc(n){const{isOpen:o}=useContext(SidebarContext),c={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,g]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:E,recentlyViewedItemsDismissed:I}=d!=null?d:{},w=()=>{g(W=>({...c,...W,starredItemsDismissed:!0}))},K=()=>{g(W=>({...c,...W,recentlyViewedItemsDismissed:!0}))};return o?React.createElement(React.Fragment,null,!E&&React.createElement(React.Fragment,null,React.createElement(zo,{text:mi,onDismiss:w}),React.createElement(SidebarDivider,null)),!I&&React.createElement(zo,{text:hi,onDismiss:K})):null}const gi=(0,m.Z)(n=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:n.spacing(3),paddingBottom:n.spacing(3),paddingLeft:n.spacing(2),paddingRight:n.spacing(2),[n.breakpoints.up("sm")]:{paddingLeft:n.spacing(3),paddingRight:n.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function Wo(n){const{className:o,stretch:c,noPadding:d,children:g,...E}=n,{contentRef:I}=Do(),w=gi();return t.createElement("article",{ref:I,tabIndex:-1,...E,className:se()(w.root,o,{[w.stretch]:c,[w.noPadding]:d})},g)}var pi=e(6487),yi=e(99152);const Ei=(0,m.Z)(n=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:n.palette.background.paper,paddingLeft:n.spacing(3)},defaultTab:{padding:n.spacing(3,3),...n.typography.caption,textTransform:"uppercase",fontWeight:"bold",color:n.palette.text.secondary},selected:{color:n.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:n.palette.background.default,color:n.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function Ho(n){const{tabs:o,onChange:c,selectedIndex:d}=n,[g,E]=(0,t.useState)(d!=null?d:0),I=Ei(),w=(K,W)=>{d===void 0&&E(W),c&&c(W)};return(0,t.useEffect)(()=>{d!==void 0&&E(d)},[d]),t.createElement("div",{className:I.tabsWrapper},t.createElement(yi.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:w,value:g},o.map((K,W)=>t.createElement(pi.Z,{...K.tabProps,"data-testid":`header-tab-${W}`,label:K.label,key:K.id,value:W,className:I.defaultTab,classes:{selected:I.selected,root:I.tabRoot}}))))}function vi(n){var w,K,W;const o=(0,Rn.UO)(),d=n.map(({path:ie,children:te})=>({caseSensitive:!1,path:`${ie}/*`,element:te})).sort((ie,te)=>te.path.replace(/\/\*$/,"").localeCompare(ie.path.replace(/\/\*$/,""))),g=(w=(0,Rn.V$)(d))!=null?w:n[0].children,[E]=(K=(0,Rn.fp)(d,`/${o["*"]}`))!=null?K:[],I=E?n.findIndex(ie=>`${ie.path}/*`===E.route.path):0;return{index:I===-1?0:I,element:g,route:(W=n[I])!=null?W:n[0]}}function jo(n){const{routes:o}=n,c=(0,Rn.s0)(),{index:d,route:g,element:E}=vi(o),I=(0,t.useMemo)(()=>o.map(K=>({id:K.path,label:K.title,tabProps:K.tabProps})),[o]),w=K=>c(o[K].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(Ho,{tabs:I,selectedIndex:d,onChange:w}),t.createElement(Wo,null,t.createElement(oo.q,{title:g.title}),E))}const ao=()=>null;(0,l.attachComponentData)(ao,"core.gatherMountPoints",!0);function Vo(n){const o=t.createElement(ao,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(c=>{if(!(0,t.isValidElement)(c))return[];if(c.type===t.Fragment)return Vo(c.props.children);if(c.type!==o)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:g,children:E,tabProps:I}=c.props;return[{path:d,title:g,children:E,tabProps:I}]})}function Ai(n){const o=Vo(n.children);return t.createElement(jo,{routes:o})}Ai.Route=ao;const Ri=(0,m.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function Si(n){const{value:o,subvalue:c}=n,d=Ri();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},o),t.createElement("div",{className:d.subvalue},c))}var Ci=e(21070),Ti=e(90324),bi=e(98281),Pi=e(48049),Go=e(51209),Ko=e(33375),Ii=e(44233),Li=e(27604),io=e(36444),Oi=e(37971),xi=e(59709),Di=e(17373),Fi=e(3702),Bi=e(93111),kr=e(67222);const Mi=(0,m.Z)(n=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:n.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:"60px",justifyContent:"space-between",borderBottom:`1px solid ${n.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:n.spacing(2)}}}),{name:"BackstageTableFilters"}),wi=n=>{var K;const o=Mi(),{onChangeFilters:c}=n,[d,g]=(0,t.useState)({...n.selectedFilters}),[E,I]=(0,t.useState)(!1),w=()=>{g({}),I(W=>!W)};return(0,t.useEffect)(()=>{c(d)},[d,c]),t.createElement("div",{className:o.root},t.createElement("div",{className:o.header},t.createElement("div",{className:o.value},"Filters"),t.createElement(y.Z,{color:"primary",onClick:w},"Clear all")),t.createElement("div",{className:o.filters},((K=n.filters)==null?void 0:K.length)&&n.filters.map(W=>t.createElement(et,{triggerReset:E,key:W.element.label,...W.element,selected:d[W.element.label],onChange:ie=>g({...d,[W.element.label]:ie})}))))},$i={Add:(0,t.forwardRef)((n,o)=>t.createElement(Ci.Z,{...n,ref:o})),Check:(0,t.forwardRef)((n,o)=>t.createElement(bi.Z,{...n,ref:o})),Clear:(0,t.forwardRef)((n,o)=>t.createElement(Ko.Z,{...n,ref:o})),Delete:(0,t.forwardRef)((n,o)=>t.createElement(Ii.Z,{...n,ref:o})),DetailPanel:(0,t.forwardRef)((n,o)=>t.createElement(Go.Z,{...n,ref:o})),Edit:(0,t.forwardRef)((n,o)=>t.createElement(Li.Z,{...n,ref:o})),Export:(0,t.forwardRef)((n,o)=>t.createElement(Fi.Z,{...n,ref:o})),Filter:(0,t.forwardRef)((n,o)=>t.createElement(io.Z,{...n,ref:o})),FirstPage:(0,t.forwardRef)((n,o)=>t.createElement(Oi.Z,{...n,ref:o})),LastPage:(0,t.forwardRef)((n,o)=>t.createElement(xi.Z,{...n,ref:o})),NextPage:(0,t.forwardRef)((n,o)=>t.createElement(Go.Z,{...n,ref:o})),PreviousPage:(0,t.forwardRef)((n,o)=>t.createElement(Pi.Z,{...n,ref:o})),ResetSearch:(0,t.forwardRef)((n,o)=>t.createElement(Ko.Z,{...n,ref:o})),Search:(0,t.forwardRef)((n,o)=>t.createElement(io.Z,{...n,ref:o})),SortArrow:(0,t.forwardRef)((n,o)=>t.createElement(Ti.Z,{...n,ref:o})),ThirdStateCheck:(0,t.forwardRef)((n,o)=>t.createElement(Di.Z,{...n,ref:o})),ViewColumn:(0,t.forwardRef)((n,o)=>t.createElement(Bi.Z,{...n,ref:o}))};function Yo(n,o){const c=o.split(".");let d=n[c[0]];for(let g=1;g<c.length;++g){if(d===void 0)return d;const E=c[g];d=d[E]}return d}const Ni=(0,Qt.Z)(n=>({header:{padding:n.spacing(1,2,1,2.5),borderTop:`1px solid ${n.palette.grey.A100}`,borderBottom:`1px solid ${n.palette.grey.A100}`,color:n.palette.textSubtle,fontWeight:n.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(kr.W$),Jo=(0,Qt.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(kr.UW),Ui=(0,m.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Zi=(0,m.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function zi(n,o){return n.map(c=>{const d={};let g=c.cellStyle||{};if(c.highlight)if(d.color=o.palette.textContrast,typeof g=="object")g.fontWeight=o.typography.fontWeightBold;else{const E=g;g=(I,w,K)=>({...E(I,w,K),fontWeight:o.typography.fontWeightBold})}return{...c,headerStyle:d,cellStyle:g}})}function Wi(n,o){return(0,Fr.transform)(n,(c,d,g)=>{(0,Fr.isEqual)(d,o[g])||(c[g]=d)})}const ko={search:"",filtersOpen:!1,filters:{}};function Hi(n){const{toolbarRef:o,setSearch:c,hasFilters:d,selectedFiltersLength:g,toggleFilters:E}=n,I=Ui(),w=(0,t.useCallback)(K=>{n.onSearchChanged(K),c(K)},[n,c]);return d?t.createElement("div",{className:I.root},t.createElement("div",{className:I.root},t.createElement(D.Z,{onClick:E,"aria-label":"filter list"},t.createElement(io.Z,null)),t.createElement(F.Z,{className:I.title},"Filters (",g,")")),t.createElement(Jo,{...n,ref:o,onSearchChanged:w})):t.createElement(Jo,{...n,ref:o,onSearchChanged:w})}function ji(n){const{data:o,columns:c,options:d,title:g,subtitle:E,filters:I,initialState:w,emptyContent:K,onStateChange:W,...ie}=n,te=Zi(),Se=(0,T.Z)(),ve={...ko,...w},[Pe,it]=(0,t.useState)(ve.filtersOpen),Ct=(0,t.useCallback)(()=>it(qt=>!qt),[it]),[Zt,Vt]=(0,t.useState)(0),[at,Tt]=(0,t.useState)(o),[Ot,Jt]=(0,t.useState)(ve.filters),Zn=zi(c,Se),[Sn,wr]=(0,t.useState)(ve.search);(0,t.useEffect)(()=>{if(W){const qt=Wi({search:Sn,filtersOpen:Pe,filters:Ot},ko);W(qt)}},[Sn,Pe,Ot,W]);const St={headerStyle:{textTransform:"uppercase"}},zn=(0,t.useCallback)(qt=>{var hn;return(hn=c.find(Cn=>Cn.title===qt))==null?void 0:hn.field},[c]);(0,t.useEffect)(()=>{if(typeof o=="function")return;if(!Ot){Tt(o);return}const qt=Object.values(Ot);if(o&&qt.flat().length){const hn=o.filter(Cn=>!!Object.entries(Ot).filter(([,tr])=>!!tr.length).every(([tr,Gt])=>{const Kt=Yo(Cn,zn(tr));return Array.isArray(Kt)&&Array.isArray(Gt)?Kt.some(fr=>Gt.includes(fr)):Array.isArray(Kt)?Kt.includes(Gt):Array.isArray(Gt)?Gt.includes(Kt):Kt===Gt}));Tt(hn)}else Tt(o);Vt(qt.flat().length)},[o,Ot,zn]);const fo=(qt,hn)=>{const Cn=Gt=>{const Kt=new Set,fr=nr=>{nr!=null&&Kt.add(nr)};return hn&&hn.forEach(nr=>{const mr=Yo(nr,zn(Gt));Array.isArray(mr)?mr.forEach(fr):fr(mr)}),Kt},tr=Gt=>({placeholder:"All results",label:Gt.column,multiple:Gt.type==="multiple-select",items:[...Cn(Gt.column)].sort().map(Kt=>({label:Kt,value:Kt}))});return qt.map(Gt=>({type:Gt.type,element:tr(Gt)}))},er=!!(I!=null&&I.length),mo=(0,t.useCallback)(qt=>t.createElement(Hi,{setSearch:wr,hasFilters:er,selectedFiltersLength:Zt,toggleFilters:Ct,...qt}),[Ct,er,Zt,wr]),Xr=typeof o!="function"&&o.length===0,qr=c.length,ho=(0,t.useCallback)(qt=>K&&Xr?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:qr},K))):t.createElement(kr.os,{...qt}),[Xr,K,qr]);return t.createElement("div",{className:te.root},Pe&&o&&typeof o!="function"&&(I==null?void 0:I.length)&&t.createElement(wi,{filters:fo(I,o),selectedFilters:Ot,onChangeFilters:Jt}),t.createElement(kr.ZP,{components:{Header:Ni,Toolbar:mo,Body:ho},options:{...St,...d},columns:Zn,icons:$i,title:t.createElement(t.Fragment,null,t.createElement(F.Z,{variant:"h5",component:"h3"},g),E&&t.createElement(F.Z,{color:"textSecondary",variant:"body1"},E)),data:typeof o=="function"?o:at,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...ie}))}const Ac=n=>{const{children:o,value:c,index:d,...g}=n;return React.createElement("div",{role:"tabpanel",hidden:c!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...g},c===d&&React.createElement(Box,{p:3},o))},Vi=(0,m.Z)(()=>({root:{color:"#6E6E6E",overflow:"visible",fontSize:"1.5rem",textAlign:"center",borderRadius:"50%",backgroundColor:"#E6E6E6",marginLeft:n=>n.isNext?"auto":"0",marginRight:n=>n.isNext?"0":"10px","&:hover":{backgroundColor:"#E6E6E6",opacity:"1"}}}),{name:"BackstageTabIcon"}),Rc=n=>{const o=Vi(n),{ariaLabel:c,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:o.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":c},n.children)},Gi=(n,o)=>o?n?"20px":"0":"40px",Ki=(0,m.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:o=>Gi(o.isFirstNav,o.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}}),{name:"BackstageTab"}),Sc=n=>{const o=Ki(n),{isFirstNav:c,isFirstIndex:d,...g}=n;return React.createElement(Tab,{classes:o,disableRipple:!0,...g})},Yi=(0,m.Z)(n=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:n.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Cc=n=>{const o=Yi(n);return React.createElement(Tabs,{classes:o,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},Ji=(0,m.Z)(n=>({root:{flexGrow:1,width:"100%"},styledTabs:{backgroundColor:n.palette.background.paper},appbar:{boxShadow:"none",backgroundColor:n.palette.background.paper,paddingLeft:"10px",paddingRight:"10px"}}),{name:"BackstageTabs"});function Tc(n){const{tabs:o}=n,c=Ji(),[d,g]=useState([0,0]),[E,I]=useState(0),[w,K]=useState(0),[W,ie]=useState([[]]),te=useRef(),{width:Se}=useWindowSize(),ve=(Vt,at)=>{g([E,at])},Pe=()=>{I(E-1)},it=()=>{I(E+1)},Ct=()=>E+1<W.length;useEffect(()=>{const at=E===0?1:2,Tt=te.current.offsetWidth-20-at*30,Ot=d[0]*w+d[1],Jt=Math.floor(Tt/170);K(Jt),ie(chunkArray(o,Jt)),g([Math.floor(Ot/Jt),Ot%Jt])},[Se,o]);const Zt=E===d[0]?d[1]:!1;return React.createElement("div",{className:c.root},React.createElement(AppBar,{ref:te,className:c.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:Zt,onChange:ve,selectionFollowsFocus:!0},E!==0&&React.createElement(StyledIcon,{onClick:Pe,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),W[E].map((Vt,at)=>React.createElement(StyledTab,{value:at,isFirstIndex:at===0,isFirstNav:E===0,key:at,icon:Vt.icon||void 0,label:Vt.label||void 0})),Ct()&&React.createElement(StyledIcon,{isNext:!0,onClick:it,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Zt!==!1?W[E].map((Vt,at)=>React.createElement(TabPanel,{key:at,value:at,index:Zt},Vt.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},W[d[0]][d[1]].content))}var bc=e(44311);function ki(n,o){const c=n[n.length-1];if(!!c)return c>=.9?o.palette.status.ok:c>=.5?o.palette.status.warning:o.palette.status.error}function Pc(n){var c;const o=useTheme();return n.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...n},n.title&&React.createElement("title",null,n.title),React.createElement(SparklinesLine,{color:(c=n.color)!=null?c:ki(n.data,o)})):null}const Qi=n=>(0,m.Z)(o=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:o.spacing(2),textAlign:n.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:o.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),Xi=({title:n="Unknown page",className:o})=>t.createElement(F.Z,{variant:"h4",component:"h2",className:o,"data-testid":"header-title"},n);function qi(n){const{description:o,title:c,titleComponent:d=void 0,children:g,textAlign:E="left"}=n,I=Qi({textAlign:E})(),w=d||t.createElement(Xi,{title:c,className:I.title});return t.createElement(t.Fragment,null,t.createElement(oo.q,{title:c}),t.createElement("div",{className:I.container},t.createElement("div",{className:I.leftItemsBox},w,o&&t.createElement(F.Z,{className:I.description,variant:"body2"},o)),t.createElement("div",{className:I.rightItemsBox},g)))}var _i=e(29788);const es=(0,m.Z)(n=>({micDrop:{maxWidth:"60%",position:"absolute",bottom:n.spacing(2),right:n.spacing(2),[n.breakpoints.down("xs")]:{maxWidth:"96%",position:"relative",bottom:"unset",right:"unset",margin:`${n.spacing(10)}px auto ${n.spacing(4)}px`}}}),{name:"BackstageErrorPageMicDrop"}),ts=()=>{const n=es();return t.createElement("img",{src:_i,className:n.micDrop,alt:"Girl dropping mic from her hands"})},ns=(0,m.Z)(n=>({container:{padding:n.spacing(8),[n.breakpoints.down("xs")]:{padding:n.spacing(2)}},title:{paddingBottom:n.spacing(5),[n.breakpoints.down("xs")]:{paddingBottom:n.spacing(4),fontSize:32}},subtitle:{color:n.palette.textSubtle}}),{name:"BackstageErrorPage"});function rs(n){const{status:o,statusMessage:c,additionalInfo:d,supportUrl:g}=n,E=ns(),I=(0,Rn.s0)(),w=To();return t.createElement(Y.Z,{container:!0,spacing:0,className:E.container},t.createElement(ts,null),t.createElement(Y.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(F.Z,{"data-testid":"error",variant:"body1",className:E.subtitle},"ERROR ",o,": ",c),t.createElement(F.Z,{variant:"body1",className:E.subtitle},d),t.createElement(F.Z,{variant:"h2",className:E.title},"Looks like someone dropped the mic!"),t.createElement(F.Z,{variant:"h6"},t.createElement(L,{to:"#","data-testid":"go-back-link",onClick:()=>I(-1)},"Go back"),"... or please"," ",t.createElement(L,{to:g||w.url},"contact support")," if you think this is a bug.")))}var os=e(16173);const as=(0,Qt.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(F.Z),so=(0,Qt.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(En.Z);function is(n){const{children:o,...c}=n,[d,g]=t.useState(null),E=t.Children.toArray(o),[I,w,...K]=E,W=K.length?K.pop():E[E.length-1],ie=E.length>3,te=Pe=>{g(Pe.currentTarget)},Se=()=>{g(null)},ve=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(os.Z,{"aria-label":"breadcrumb",...c},E.length>1&&t.createElement(so,{clone:!0},I),E.length>2&&t.createElement(so,{clone:!0},w),ie&&t.createElement(as,{onClick:te},"..."),t.createElement(En.Z,{style:{fontStyle:"italic"}},W)),t.createElement(Ao.ZP,{open:ve,anchorEl:d,onClose:Se,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(yt.Z,null,K.map((Pe,it)=>t.createElement(rt.Z,{key:it,button:!0},t.createElement(so,{clone:!0},Pe))))))}const ss=(0,m.Z)(n=>({header:{gridArea:"pageHeader",padding:n.spacing(3),width:"100%",boxShadow:n.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:n.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[n.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto"},title:{color:n.palette.bursts.fontColor,wordBreak:"break-word",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.palette.bursts.fontColor,opacity:.8,display:"inline-block",marginTop:n.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:n.spacing(1),color:n.palette.bursts.fontColor},breadcrumb:{color:n.palette.bursts.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-n.spacing(.3),marginBottom:n.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-n.spacing(.3),marginBottom:n.spacing(.3)}}),{name:"BackstageHeader"}),cs=({type:n,typeLink:o,classes:c,pageTitle:d})=>n?o?t.createElement(is,{className:c.breadcrumb},t.createElement(L,{to:o},n),t.createElement(F.Z,null,d)):t.createElement(F.Z,{className:c.type},n):null,ls=({pageTitle:n,classes:o,tooltip:c})=>{const d=t.createElement(F.Z,{className:o.title,variant:"h1"},n);return c?t.createElement(O.ZP,{title:c,placement:"top-start"},d):d},us=({classes:n,subtitle:o})=>o?typeof o!="string"?t.createElement(t.Fragment,null,o):t.createElement(F.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},o):null;function Qo(n){const{children:o,pageTitleOverride:c,style:d,subtitle:g,title:E,tooltip:I,type:w,typeLink:K}=n,W=ss(),te=(0,l.useApi)(l.configApiRef).getOptionalString("app.title")||"Backstage",Se=c||E,ve=E||c,Pe=`${Se} | %s | ${te}`,it=`${Se} | ${te}`;return t.createElement(t.Fragment,null,t.createElement(oo.q,{titleTemplate:Pe,defaultTitle:it}),t.createElement("header",{style:d,className:W.header},t.createElement(En.Z,{className:W.leftItemsBox},t.createElement(cs,{classes:W,type:w,typeLink:K,pageTitle:ve}),t.createElement(ls,{classes:W,pageTitle:ve,tooltip:I}),t.createElement(us,{classes:W,subtitle:g})),t.createElement(Y.Z,{container:!0,className:W.rightItemsBox,spacing:4},o)))}const ds=(0,m.Z)(n=>({root:{textAlign:"left"},label:{color:n.palette.common.white,fontWeight:"bold",letterSpacing:0,fontSize:n.typography.fontSize,marginBottom:n.spacing(1)/2,lineHeight:1},value:{color:"rgba(255, 255, 255, 0.8)",fontSize:n.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),fs=({value:n,className:o})=>t.createElement(F.Z,{className:o},n);function ms(n){const{label:o,value:c,url:d}=n,g=ds(),E=t.createElement(fs,{className:g.value,value:c||"<Unknown>"});return t.createElement(Y.Z,{item:!0},t.createElement("span",{className:g.root},t.createElement(F.Z,{className:g.label},o),d?t.createElement(L,{to:d},E):E))}const hs={hour:"2-digit",minute:"2-digit"};function Xo(n){const o=new Date,c=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const g=n.getConfigArray("homepage.clocks");for(const E of g)if(E.has("label")&&E.has("timezone")){let I=E.getString("label");const w={timeZone:E.getString("timezone"),...hs};try{new Date().toLocaleString(c,w)}catch{console.warn(`The timezone ${w.timeZone} is invalid. Defaulting to GMT`),w.timeZone="GMT",I="GMT"}const K=o.toLocaleTimeString(c,w);d.push({time:K,label:I})}return d}function Ic(n){const o=useApi(configApiRef),c=[],[d,g]=React.useState(c);return React.useEffect(()=>{g(Xo(o));const E=setInterval(()=>{g(Xo(o))},1e3);return()=>{clearInterval(E)}},[o]),d.length!==0?React.createElement(React.Fragment,null,d.map(E=>React.createElement(HeaderLabel,{label:E.label,value:E.time,key:E.label}))):null}const gs=n=>(0,a.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.palette.bursts.gradient.linear,backgroundPosition:0,backgroundSize:"inherit"}}),ps=(0,m.Z)(gs,{name:"BackstageItemCardHeader"});function ys(n){const{title:o,subtitle:c,children:d}=n,g=ps(n);return t.createElement("div",{className:g.root},c&&t.createElement(F.Z,{variant:"subtitle2",component:"h3"},c),o&&t.createElement(F.Z,{variant:"h6",component:"h4"},o),d)}function Lc(n){const{description:o,tags:c,title:d,type:g,subtitle:E,label:I,onClick:w,href:K}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:E||g})),React.createElement(CardContent,null,c!=null&&c.length?React.createElement(Box,null,c.map((W,ie)=>React.createElement(Chip,{size:"small",label:W,key:ie}))):null,o),React.createElement(CardActions,null,!K&&React.createElement(Button,{to:"#",onClick:w,color:"primary"},I),K&&React.createElement(Button,{to:K,color:"primary"},I)))}const Es=n=>(0,a.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),vs=(0,m.Z)(Es,{name:"BackstageItemCardGrid"});function As(n){const{children:o,...c}=n,d=vs(c);return t.createElement("div",{className:d.root,...c},o)}var Rs=e(41547);const Ss=(0,m.Z)(()=>({root:({isMobile:n})=>({display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",height:n?"100%":"100vh",overflowY:"auto"})}),{name:"BackstagePage"});function qo(n){const{themeId:o,children:c}=n,{isMobile:d}=(0,t.useContext)(dr),g=Ss({isMobile:d});return t.createElement(Rs.Z,{theme:E=>({...E,page:E.getPageTheme({themeId:o})})},t.createElement("div",{className:g.root},c))}function Cs(n){const{themeId:o,children:c,...d}=n;return t.createElement(qo,{themeId:o},t.createElement(Qo,{...d}),c)}var an=e(30195);const Oc=an.z.object({providerInfo:an.z.object({}).catchall(an.z.unknown()).optional(),profile:an.z.object({email:an.z.string().optional(),displayName:an.z.string().optional(),picture:an.z.string().optional()}),backstageIdentity:an.z.object({token:an.z.string(),identity:an.z.object({type:an.z.literal("user"),userEntityRef:an.z.string(),ownershipEntityRefs:an.z.array(an.z.string())})})}),_o={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function Ts(n){const o=new Date(Date.now()+_o.defaultTokenExpiryMillis);if(!n)return o;const[c,d,g]=n.split("."),E=JSON.parse(atob(d));return typeof E.exp!="number"?o:new Date(E.exp*1e3-_o.tokenExpiryMarginMillis)}class xc{constructor(o){q(this,"options");q(this,"abortController");q(this,"state");this.options=o,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:o}=this.getSessionSync(),c=o.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(c);if(!d)throw new TypeError(`Invalid user entity reference "${c}"`);return d[3]}async getIdToken(){return(await this.getSessionAsync()).backstageIdentity.token}getProfile(){return this.getSessionSync().profile}async getProfileInfo(){return(await this.getSessionAsync()).profile}async getBackstageIdentity(){return(await this.getSessionAsync()).backstageIdentity.identity}async getCredentials(){return{token:(await this.getSessionAsync()).backstageIdentity.token}}async signOut(){this.abortController.abort()}getSessionSync(){if(this.state.type==="active")return this.state.session;if(this.state.type==="fetching"&&this.state.previous)return this.state.previous;throw new Error("No session available. Try reloading your browser page.")}async getSessionAsync(){if(this.state.type==="fetching")return this.state.promise;if(this.state.type==="active"&&new Date<this.state.expiresAt)return this.state.session;const o=this.state.type==="active"?this.state.session:void 0,c=this.fetchSession().then(d=>(this.state={type:"active",session:d,expiresAt:Ts(d.backstageIdentity.token)},d),d=>{throw this.state={type:"failed",error:d},d});return this.state={type:"fetching",promise:c,previous:o},c}async fetchSession(){const o=await this.options.discoveryApi.getBaseUrl("auth"),c=await fetch(`${o}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!c.ok)throw await ResponseError.fromResponse(c);return proxiedSessionSchema.parse(await c.json())}}const Dc=n=>{const o=useApi(discoveryApiRef),[{status:c,error:d},{execute:g}]=useAsync(async()=>{const E=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:o});await E.start(),n.onSignInSuccess(E)});return useMountEffect(g),c==="loading"?React.createElement(Progress,null):d?React.createElement(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:d}):null},bs=(0,m.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),co=({children:n})=>{const o=bs();return t.createElement(Y.Z,{component:"li",item:!0,classes:o},n)};class lo{getUserId(){return"guest"}async getIdToken(){}getProfile(){return{email:"guest@example.com",displayName:"Guest"}}async getProfileInfo(){return{email:"guest@example.com",displayName:"Guest"}}async getBackstageIdentity(){const o="user:default/guest";return{type:"user",userEntityRef:o,ownershipEntityRefs:[o]}}async getCredentials(){return{}}async signOut(){}}function Ps(n){const[o,c,d]=n.split(".");return JSON.parse(atob(c))}class uo{constructor(o){this.result=o}getUserId(){return this.result.userId}static fromResult(o){return new uo(o)}async getIdToken(){var o,c;return(c=(o=this.result).getIdToken)==null?void 0:c.call(o)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const o=await this.getIdToken();if(!o){const g=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:g,ownershipEntityRefs:[g]}}const{sub:c,ent:d}=Ps(o);return{type:"user",userEntityRef:c,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var c,d;return{token:await((d=(c=this.result).getIdToken)==null?void 0:d.call(c))}}async signOut(){var o,c;return(c=(o=this.result).signOut)==null?void 0:c.call(o)}}class Mr{constructor(o,c,d){q(this,"profilePromise");this.identity=o,this.authApi=c,this.profile=d}static createGuest(){return new lo}static fromLegacy(o){return uo.fromResult(o)}static create(o){return new Mr(o.identity,o.authApi,o.profile)}getUserId(){const o=this.identity.userEntityRef,c=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(o);if(!c)throw new TypeError(`Invalid user entity reference "${o}"`);return c[3]}async getIdToken(){return(await this.authApi.getBackstageIdentity()).token}getProfile(){if(!this.profile)throw new Error("The identity API does not implement synchronous profile fetching, use getProfileInfo() instead");return this.profile}async getProfileInfo(){if(this.profilePromise)return await this.profilePromise;try{return this.profilePromise=this.authApi.getProfile(),await this.profilePromise}catch(o){throw this.profilePromise=void 0,o}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const Is={Component:({config:n,onSignInSuccess:o})=>{const{apiRef:c,title:d,message:g}=n,E=(0,l.useApi)(c),I=(0,l.useApi)(l.errorApiRef),w=async()=>{try{const K=await E.getBackstageIdentity({instantPopup:!0});if(!K)throw new Error(`The ${d} provider is not configured to support sign-in`);const W=await E.getProfile();o(Mr.create({identity:K.identity,profile:W,authApi:E}))}catch(K){I.post(new Tr.SP("Login failed",K))}};return t.createElement(co,null,t.createElement(ft,{variant:"fullHeight",title:d,actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:w},"Sign In")},t.createElement(F.Z,{variant:"body1"},g)))},loader:async(n,o)=>{const c=n.get(o),d=await c.getBackstageIdentity({optional:!0});if(!d)return;const g=await c.getProfile();return Mr.create({identity:d.identity,profile:g,authApi:c})}},Ls={Component:({onSignInSuccess:n})=>t.createElement(co,null,t.createElement(ft,{title:"Guest",variant:"fullHeight",actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:()=>n(new lo)},"Enter")},t.createElement(F.Z,{variant:"body1"},"Enter as a Guest User.",t.createElement("br",null),"You will not have a verified identity,",t.createElement("br",null),"meaning some features might be unavailable."))),loader:async()=>new lo};var Os=e(63955),ea=e(86619),ta=e(74828),xs=e(45455),Ds=e.n(xs);const Fs=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Bs=(0,m.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),na=n=>{const{ref:o,...c}=n;return{inputRef:o,...c}},Ms={Component:({onSignInSuccess:n})=>{const o=Bs(),{register:c,handleSubmit:d,formState:g}=(0,Os.cI)({mode:"onChange"}),{errors:E}=g,I=({userId:w})=>{n(Mr.fromLegacy({userId:w,profile:{email:`${w}@example.com`}}))};return t.createElement(co,null,t.createElement(ft,{title:"Custom User",variant:"fullHeight"},t.createElement(F.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:o.form,onSubmit:d(I)},t.createElement(P.Z,null,t.createElement(ea.Z,{...na(c("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(E.userId)}),E.userId&&t.createElement(ta.Z,{error:!0},E.userId.message)),t.createElement(P.Z,null,t.createElement(ea.Z,{...na(c("idToken",{required:!1,validate:w=>!w||Fs.test(w)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(E.idToken)}),E.idToken&&t.createElement(ta.Z,{error:!0},E.idToken.message)),t.createElement(y.Z,{type:"submit",color:"primary",variant:"outlined",className:o.button,disabled:!(g!=null&&g.isDirty)||!Ds()(E)},"Continue"))))},loader:async()=>{}},Qr="@backstage/core:SignInPage:provider",ra={guest:Ls,custom:Ms,common:Is};function oa(n,o){if(n in o)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function Uc(n){return n.reduce((c,d)=>{if(typeof d=="string")return oa(d,c),c[d]={components:ra[d],id:d},c;const{id:g}=d;return oa(g,c),c[g]={components:ra.common,id:g,config:d},c},{})}const Zc=(n,o)=>{const c=useApi(errorApiRef),d=useApiHolder(),[g,E]=useState(!0),I=useCallback(K=>{o(IdentityApiSignOutProxy.from({identityApi:K,signOut:async()=>{var W;localStorage.removeItem(Qr),await((W=K.signOut)==null?void 0:W.call(K))}}))},[o]);useLayoutEffect(()=>{var te;if(!g)return;const K=localStorage.getItem(Qr);if(K===null){E(!1);return}const W=n[K];if(!W){E(!1);return}let ie=!1;return W.components.loader(d,(te=W.config)==null?void 0:te.apiRef).then(Se=>{ie||(Se?I(Se):E(!1))}).catch(Se=>{ie||(localStorage.removeItem(Qr),c.post(Se),E(!1))}),()=>{ie=!0}},[g,c,o,d,n,I]);const w=useMemo(()=>Object.keys(n).map(K=>{const W=n[K],{Component:ie}=W.components,te=Se=>{localStorage.setItem(Qr,W.id),I(Se)};return React.createElement(ie,{key:W.id,config:W.config,onSignInSuccess:te})}),[n,I]);return[g,w]},ws=({onSignInSuccess:n,providers:o=[],title:c,align:d="left"})=>{const g=useApi(configApiRef),E=useStyles(),I=getSignInProviders(o),[w,K]=useSignInProviders(I,n);return w?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:g.getString("app.title")}),React.createElement(Content,null,c&&React.createElement(ContentHeader,{title:c,textAlign:d}),React.createElement(Grid,{container:!0,justifyContent:d==="center"?d:"flex-start",spacing:2,component:"ul",classes:E},K)))},$s=({provider:n,auto:o,onSignInSuccess:c})=>{const d=useStyles(),g=useApi(n.apiRef),E=useApi(configApiRef),[I,w]=useState(),[K,W]=useState(!1),ie=async({checkExisting:te,showPopup:Se})=>{try{let ve;if(te&&(ve=await g.getBackstageIdentity({optional:!0})),!ve&&(Se||o)&&(W(!0),ve=await g.getBackstageIdentity({instantPopup:!0}),!ve))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!ve){W(!0);return}const Pe=await g.getProfile();c(UserIdentity.create({identity:ve.identity,authApi:g,profile:Pe}))}catch(ve){w(ve),W(!0)}};return useMountEffect(()=>ie({checkExisting:!0})),K?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:E.getString("app.title")}),React.createElement(Content,null,React.createElement(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:d},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:n.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{ie({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},n.message),I&&I.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},I.message)))))):React.createElement(Progress,null)};function zc(n){return"provider"in n?React.createElement($s,{...n}):React.createElement(ws,{...n})}const Ns=(0,m.Z)(n=>({root:{padding:n.spacing(0,2,0,2.5),minHeight:n.spacing(3)},indicator:{backgroundColor:n.palette.info.main,height:n.spacing(.3)}}),{name:"BackstageTabbedCard"}),Us=(0,Qt.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(lr.Z);function Wc(n){const{slackChannel:o,errorBoundaryProps:c,children:d,title:g,deepLink:E,value:I,onChange:w}=n,K=Ns(),[W,ie]=useState(0),te=w||((Pe,it)=>ie(it));let Se;I?React.Children.map(d,Pe=>{React.isValidElement(Pe)&&(Pe==null?void 0:Pe.props.value)===I&&(Se=Pe==null?void 0:Pe.props.children)}):React.Children.map(d,(Pe,it)=>{React.isValidElement(Pe)&&it===W&&(Se=Pe==null?void 0:Pe.props.children)});const ve=c||(o?{slackChannel:o}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...ve},g&&React.createElement(Us,{title:g}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:K,value:I||W,onChange:te},d),React.createElement(Divider,null),React.createElement(CardContent,null,Se),E&&React.createElement(BottomLink,{...E})))}const Zs=(0,m.Z)(n=>({root:{minWidth:n.spacing(6),minHeight:n.spacing(3),margin:n.spacing(0,2,0,0),padding:n.spacing(.5,0,.5,0),textTransform:"none","&:hover":{opacity:1,backgroundColor:"transparent",color:n.palette.text.primary}},selected:{fontWeight:"bold"}}),{name:"BackstageCardTab"});function Hc(n){const{children:o,...c}=n,d=Zs();return React.createElement(Tab,{disableRipple:!0,classes:d,...c})}},88609:function(_,i,e){"use strict";e.d(i,{Os:function(){return h},fC:function(){return v}});var r=e(76241),t=e(2784);const l=(0,r.CT)("analytics-context"),h=()=>{const a=(0,t.useContext)(l);if(a===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const s=a.atVersion(1);if(s===void 0)throw new Error("No context found for version 1.");return s},v=a=>{const{attributes:s,children:f}=a,u={...h(),...s},A=(0,r.EI)({1:u});return t.createElement(l.Provider,{value:A},f)};function m(a,s){const f=y=>React.createElement(v,{attributes:s},React.createElement(a,{...y}));return f.displayName=`WithAnalyticsContext(${a.displayName||a.name||"Component"})`,f}},28461:function(_,i,e){"use strict";e.d(i,{f:function(){return r.fC},z:function(){return m}});var r=e(88609),t=e(27399),l=e(2784);class h{constructor(s,f={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=s,this.context=f}setContext(s){this.context=s}captureEvent(s,f,{value:y,attributes:u}={}){try{this.analyticsApi.captureEvent({action:s,subject:f,value:y,attributes:u,context:this.context})}catch(A){console.warn("Error during analytics event capture. %o",A)}}}function v(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function m(){const a=(0,l.useRef)(null),s=(0,r.Os)(),f=v();function y(){return a.current===null&&(a.current=new h(f)),a.current}const u=y();return u.setContext(s),u}},39135:function(_,i,e){"use strict";e.d(i,{CL:function(){return M},sM:function(){return t},$v:function(){return u},v_:function(){return A},hg:function(){return C},uB:function(){return y},bq:function(){return f},Ds:function(){return R},NW:function(){return L},VE:function(){return oe},W0:function(){return T},gP:function(){return D},F4:function(){return h},ux:function(){return m},Kp:function(){return l},$4:function(){return O},p_:function(){return a},ZM:function(){return B},D:function(){return v},gW:function(){return s},E6:function(){return Q}});var r=e(86833),t;(function(ne){const Te="SignedIn";ne.SignedIn=Te;const Ye="SignedOut";ne.SignedOut=Ye})(t||(t={}));const l=(0,r.createApiRef)({id:"core.auth.google"}),h=(0,r.createApiRef)({id:"core.auth.github"}),v=(0,r.createApiRef)({id:"core.auth.okta"}),m=(0,r.createApiRef)({id:"core.auth.gitlab"}),a=(0,r.createApiRef)({id:"core.auth.microsoft"}),s=(0,r.createApiRef)({id:"core.auth.onelogin"}),f=(0,r.createApiRef)({id:"core.auth.bitbucket"}),y=(0,r.createApiRef)({id:"core.auth.atlassian"}),u=(0,r.createApiRef)({id:"core.alert"}),A=(0,r.createApiRef)({id:"core.analytics"}),C=(0,r.createApiRef)({id:"core.apptheme"}),R=(0,r.createApiRef)({id:"core.config"}),L=(0,r.createApiRef)({id:"core.discovery"}),oe=(0,r.createApiRef)({id:"core.error"});var M;(function(ne){ne[ne.None=0]="None";const Ye=1;ne[ne.Active=Ye]="Active"})(M||(M={}));const T=(0,r.createApiRef)({id:"core.featureflags"}),D=(0,r.createApiRef)({id:"core.fetch"}),O=(0,r.createApiRef)({id:"core.identity"}),B=(0,r.createApiRef)({id:"core.oauthrequest"}),Q=(0,r.createApiRef)({id:"core.storage"})},27399:function(_,i,e){"use strict";e.d(i,{FeatureFlagState:function(){return t.CL},SessionState:function(){return t.sM},alertApiRef:function(){return t.$v},analyticsApiRef:function(){return t.v_},appThemeApiRef:function(){return t.hg},atlassianAuthApiRef:function(){return t.uB},bitbucketAuthApiRef:function(){return t.bq},configApiRef:function(){return t.Ds},createApiFactory:function(){return r.createApiFactory},createApiRef:function(){return r.createApiRef},discoveryApiRef:function(){return t.NW},errorApiRef:function(){return t.VE},featureFlagsApiRef:function(){return t.W0},fetchApiRef:function(){return t.gP},githubAuthApiRef:function(){return t.F4},gitlabAuthApiRef:function(){return t.ux},googleAuthApiRef:function(){return t.Kp},identityApiRef:function(){return t.$4},microsoftAuthApiRef:function(){return t.p_},oauthRequestApiRef:function(){return t.ZM},oktaAuthApiRef:function(){return t.D},oneloginAuthApiRef:function(){return t.gW},storageApiRef:function(){return t.E6},useApi:function(){return r.useApi},useApiHolder:function(){return r.useApiHolder}});var r=e(86833);e.o(r,"FeatureFlagState")&&e.d(i,{FeatureFlagState:function(){return r.FeatureFlagState}}),e.o(r,"SessionState")&&e.d(i,{SessionState:function(){return r.SessionState}}),e.o(r,"alertApiRef")&&e.d(i,{alertApiRef:function(){return r.alertApiRef}}),e.o(r,"analyticsApiRef")&&e.d(i,{analyticsApiRef:function(){return r.analyticsApiRef}}),e.o(r,"appThemeApiRef")&&e.d(i,{appThemeApiRef:function(){return r.appThemeApiRef}}),e.o(r,"atlassianAuthApiRef")&&e.d(i,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),e.o(r,"attachComponentData")&&e.d(i,{attachComponentData:function(){return r.attachComponentData}}),e.o(r,"bitbucketAuthApiRef")&&e.d(i,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),e.o(r,"configApiRef")&&e.d(i,{configApiRef:function(){return r.configApiRef}}),e.o(r,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return r.createComponentExtension}}),e.o(r,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),e.o(r,"createPlugin")&&e.d(i,{createPlugin:function(){return r.createPlugin}}),e.o(r,"createReactExtension")&&e.d(i,{createReactExtension:function(){return r.createReactExtension}}),e.o(r,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return r.createRoutableExtension}}),e.o(r,"createRouteRef")&&e.d(i,{createRouteRef:function(){return r.createRouteRef}}),e.o(r,"discoveryApiRef")&&e.d(i,{discoveryApiRef:function(){return r.discoveryApiRef}}),e.o(r,"errorApiRef")&&e.d(i,{errorApiRef:function(){return r.errorApiRef}}),e.o(r,"featureFlagsApiRef")&&e.d(i,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),e.o(r,"fetchApiRef")&&e.d(i,{fetchApiRef:function(){return r.fetchApiRef}}),e.o(r,"getComponentData")&&e.d(i,{getComponentData:function(){return r.getComponentData}}),e.o(r,"githubAuthApiRef")&&e.d(i,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),e.o(r,"gitlabAuthApiRef")&&e.d(i,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),e.o(r,"googleAuthApiRef")&&e.d(i,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),e.o(r,"identityApiRef")&&e.d(i,{identityApiRef:function(){return r.identityApiRef}}),e.o(r,"microsoftAuthApiRef")&&e.d(i,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),e.o(r,"oauthRequestApiRef")&&e.d(i,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),e.o(r,"oktaAuthApiRef")&&e.d(i,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),e.o(r,"oneloginAuthApiRef")&&e.d(i,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),e.o(r,"storageApiRef")&&e.d(i,{storageApiRef:function(){return r.storageApiRef}}),e.o(r,"useApp")&&e.d(i,{useApp:function(){return r.useApp}}),e.o(r,"useElementFilter")&&e.d(i,{useElementFilter:function(){return r.useElementFilter}}),e.o(r,"useRouteRef")&&e.d(i,{useRouteRef:function(){return r.useRouteRef}}),e.o(r,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return r.useRouteRefParams}});var t=e(39135)},90515:function(_,i,e){"use strict";e.d(i,{T:function(){return t}});class r{constructor(h){if(this.config=h,!h.id.split(".").flatMap(m=>m.split("-")).every(m=>m.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${h.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function t(l){return new r(l)}},25182:function(_,i,e){"use strict";e.d(i,{n:function(){return r}});function r(t,l){return"id"in t?{api:t,deps:{},factory:()=>l}:t}},86833:function(_,i,e){"use strict";e.d(i,{createApiFactory:function(){return v.n},createApiRef:function(){return t.T},useApi:function(){return r.h_},useApiHolder:function(){return r.I_}});var r=e(5761),t=e(90515),l=e(16362),h=e.n(l);e.o(l,"FeatureFlagState")&&e.d(i,{FeatureFlagState:function(){return l.FeatureFlagState}}),e.o(l,"SessionState")&&e.d(i,{SessionState:function(){return l.SessionState}}),e.o(l,"alertApiRef")&&e.d(i,{alertApiRef:function(){return l.alertApiRef}}),e.o(l,"analyticsApiRef")&&e.d(i,{analyticsApiRef:function(){return l.analyticsApiRef}}),e.o(l,"appThemeApiRef")&&e.d(i,{appThemeApiRef:function(){return l.appThemeApiRef}}),e.o(l,"atlassianAuthApiRef")&&e.d(i,{atlassianAuthApiRef:function(){return l.atlassianAuthApiRef}}),e.o(l,"attachComponentData")&&e.d(i,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"bitbucketAuthApiRef")&&e.d(i,{bitbucketAuthApiRef:function(){return l.bitbucketAuthApiRef}}),e.o(l,"configApiRef")&&e.d(i,{configApiRef:function(){return l.configApiRef}}),e.o(l,"createApiFactory")&&e.d(i,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(i,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createReactExtension")&&e.d(i,{createReactExtension:function(){return l.createReactExtension}}),e.o(l,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(i,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"discoveryApiRef")&&e.d(i,{discoveryApiRef:function(){return l.discoveryApiRef}}),e.o(l,"errorApiRef")&&e.d(i,{errorApiRef:function(){return l.errorApiRef}}),e.o(l,"featureFlagsApiRef")&&e.d(i,{featureFlagsApiRef:function(){return l.featureFlagsApiRef}}),e.o(l,"fetchApiRef")&&e.d(i,{fetchApiRef:function(){return l.fetchApiRef}}),e.o(l,"getComponentData")&&e.d(i,{getComponentData:function(){return l.getComponentData}}),e.o(l,"githubAuthApiRef")&&e.d(i,{githubAuthApiRef:function(){return l.githubAuthApiRef}}),e.o(l,"gitlabAuthApiRef")&&e.d(i,{gitlabAuthApiRef:function(){return l.gitlabAuthApiRef}}),e.o(l,"googleAuthApiRef")&&e.d(i,{googleAuthApiRef:function(){return l.googleAuthApiRef}}),e.o(l,"identityApiRef")&&e.d(i,{identityApiRef:function(){return l.identityApiRef}}),e.o(l,"microsoftAuthApiRef")&&e.d(i,{microsoftAuthApiRef:function(){return l.microsoftAuthApiRef}}),e.o(l,"oauthRequestApiRef")&&e.d(i,{oauthRequestApiRef:function(){return l.oauthRequestApiRef}}),e.o(l,"oktaAuthApiRef")&&e.d(i,{oktaAuthApiRef:function(){return l.oktaAuthApiRef}}),e.o(l,"oneloginAuthApiRef")&&e.d(i,{oneloginAuthApiRef:function(){return l.oneloginAuthApiRef}}),e.o(l,"storageApiRef")&&e.d(i,{storageApiRef:function(){return l.storageApiRef}}),e.o(l,"useApp")&&e.d(i,{useApp:function(){return l.useApp}}),e.o(l,"useElementFilter")&&e.d(i,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(i,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return l.useRouteRefParams}});var v=e(25182)},16362:function(){},5761:function(_,i,e){"use strict";e.d(i,{I_:function(){return l},h_:function(){return h}});var r=e(2784),t=e(76241);function l(){const m=(0,t.Vt)("api-context");if(!m)throw new Error("API context is not available");const a=m.atVersion(1);if(!a)throw new Error("ApiContext v1 not available");return a}function h(m){const s=l().get(m);if(!s)throw new Error(`No implementation available for ${m}`);return s}function v(m){return function(s){const f=u=>{const A=l(),C={};for(const R in m)if(m.hasOwnProperty(R)){const L=m[R],oe=A.get(L);if(!oe)throw new Error(`No implementation available for ${L}`);C[R]=oe}return React.createElement(s,{...u,...C})},y=s.displayName||s.name||"Component";return f.displayName=`withApis(${y})`,f}}},31311:function(_,i,e){"use strict";e.d(i,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),l=e.n(t);e.o(t,"attachComponentData")&&e.d(i,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(i,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(i,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(i,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(i,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(i,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(i,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(i,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(i,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(i,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(i,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(_,i,e){"use strict";e.d(i,{q:function(){return t}});var r=e(76241);const t=()=>{const l=(0,r.Vt)("app-context");if(!l)throw new Error("App context is not available");const h=l.atVersion(1);if(!h)throw new Error("AppContext v1 not available");return h}},74181:function(_,i,e){"use strict";e.d(i,{R5:function(){return h},CO:function(){return A},YO:function(){return C},P4:function(){return u},IY:function(){return v},vJ:function(){return M}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),l="__backstage_data";function h(T,D,O){var ne;const B=T;let Q=(ne=B[l])!=null?ne:t.get(T);if(Q||(Q={map:new Map},Object.defineProperty(B,l,{enumerable:!1,configurable:!0,writable:!1,value:Q}),t.set(T,Q)),Q.map.has(D)){const Te=T.displayName||T.name;throw new Error(`Attempted to attach duplicate data "${D}" to component "${Te}"`)}Q.map.set(D,O)}function v(T,D){var Q;if(!T)return;const O=T.type;if(!O)return;const B=(Q=O[l])!=null?Q:t.get(O);if(!!B)return B.map.get(D)}var m=e(2784),a=e(88609),s=e(31311),f=e(82772);class y extends m.Component{constructor(){super(...arguments);q(this,"state",{error:void 0});q(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(D){return{error:D}}render(){const{error:D}=this.state,{app:O,plugin:B}=this.props,{ErrorBoundaryFallback:Q}=O.getComponents();return D?m.createElement(Q,{error:D,resetError:this.handleErrorReset,plugin:B}):this.props.children}}function u(T){const{component:D,mountPoint:O,name:B}=T;return C({component:{lazy:()=>D().then(Q=>{const ne=Ye=>{try{(0,f.tg)(O)}catch(We){if(typeof We=="object"&&We!==null){const{message:fe}=We;if(typeof fe=="string"&&fe.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${O} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw We}return m.createElement(Q,{...Ye})},Te=B||Q.displayName||Q.name||"LazyComponent";return ne.displayName=`RoutableExtension(${Te})`,ne},Q=>Te=>{const Ye=(0,s.useApp)(),{BootErrorPage:We}=Ye.getComponents();return m.createElement(We,{step:"load-chunk",error:Q})})},data:{"core.mountPoint":O},name:B})}function A(T){const{component:D,name:O}=T;return C({component:D,name:O})}function C(T){const{data:D={},name:O}=T;O||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let B;if("lazy"in T.component){const ne=T.component.lazy;B=(0,m.lazy)(()=>ne().then(Te=>({default:Te})))}else B=T.component.sync;const Q=O||B.displayName||B.name||"Component";return{expose(ne){const Te=Ye=>{const We=(0,s.useApp)(),{Progress:fe}=We.getComponents(),ye=D==null?void 0:D["core.mountPoint"];return m.createElement(m.Suspense,{fallback:m.createElement(fe,null)},m.createElement(y,{app:We,plugin:ne},m.createElement(a.fC,{attributes:{pluginId:ne.getId(),...O&&{extension:O},...ye&&{routeRef:ye.id}}},m.createElement(B,{...Ye}))))};h(Te,"core.plugin",ne);for(const[Ye,We]of Object.entries(D))h(Te,Ye,We);return Te.displayName=`Extension(${Q})`,Te}}}var R=e(27399);function L(T,D,O,B){return m.Children.toArray(T).flatMap(Q=>{if(!(0,m.isValidElement)(Q))return[];if(Q.type===m.Fragment)return L(Q.props.children,D,O,B);if(v(Q,"core.featureFlagged")){const ne=Q.props;return("with"in ne?D.isActive(ne.with):!D.isActive(ne.without))?L(Q.props.children,D,O,B):[]}if(O===void 0||O(Q))return[Q];if(B)throw new Error(B);return L(Q.props.children,D,O,B)})}class oe{constructor(D,O){this.node=D,this.featureFlagsApi=O}selectByComponentData(D){const O=L(this.node,this.featureFlagsApi,B=>v(B,D.key)!==void 0,D.withStrictError);return new oe(O,this.featureFlagsApi)}findComponentData(D){return L(this.node,this.featureFlagsApi,B=>v(B,D.key)!==void 0).map(B=>v(B,D.key)).filter(B=>B!==void 0)}getElements(){return L(this.node,this.featureFlagsApi)}}function M(T,D,O=[]){const B=(0,R.useApi)(R.featureFlagsApiRef),Q=new oe(T,B);return(0,m.useMemo)(()=>D(Q),[T,...O])}},80274:function(){},36964:function(_,i,e){"use strict";e.d(i,{AnalyticsContext:function(){return r.f},FeatureFlagState:function(){return t.FeatureFlagState},SessionState:function(){return t.SessionState},alertApiRef:function(){return t.alertApiRef},analyticsApiRef:function(){return t.analyticsApiRef},appThemeApiRef:function(){return t.appThemeApiRef},atlassianAuthApiRef:function(){return t.atlassianAuthApiRef},attachComponentData:function(){return h.R5},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},createComponentExtension:function(){return h.CO},createExternalRouteRef:function(){return s.x8},createPlugin:function(){return a.r},createReactExtension:function(){return h.YO},createRoutableExtension:function(){return h.P4},createRouteRef:function(){return s.NT},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},getComponentData:function(){return h.IY},githubAuthApiRef:function(){return t.githubAuthApiRef},gitlabAuthApiRef:function(){return t.gitlabAuthApiRef},googleAuthApiRef:function(){return t.googleAuthApiRef},identityApiRef:function(){return t.identityApiRef},microsoftAuthApiRef:function(){return t.microsoftAuthApiRef},oauthRequestApiRef:function(){return t.oauthRequestApiRef},oktaAuthApiRef:function(){return t.oktaAuthApiRef},oneloginAuthApiRef:function(){return t.oneloginAuthApiRef},storageApiRef:function(){return t.storageApiRef},useAnalytics:function(){return r.z},useApp:function(){return l.useApp},useElementFilter:function(){return h.vJ},useRouteRef:function(){return s.tg},useRouteRefParams:function(){return s.Oi}});var r=e(28461),t=e(27399);e.o(t,"attachComponentData")&&e.d(i,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(i,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(i,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(i,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(i,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(i,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(i,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(i,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(i,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(i,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(i,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(i,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return t.useRouteRefParams}});var l=e(31311);e.o(l,"attachComponentData")&&e.d(i,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"createApiFactory")&&e.d(i,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createApiRef")&&e.d(i,{createApiRef:function(){return l.createApiRef}}),e.o(l,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(i,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createReactExtension")&&e.d(i,{createReactExtension:function(){return l.createReactExtension}}),e.o(l,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(i,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"getComponentData")&&e.d(i,{getComponentData:function(){return l.getComponentData}}),e.o(l,"useApi")&&e.d(i,{useApi:function(){return l.useApi}}),e.o(l,"useApiHolder")&&e.d(i,{useApiHolder:function(){return l.useApiHolder}}),e.o(l,"useElementFilter")&&e.d(i,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(i,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return l.useRouteRefParams}});var h=e(74181),v=e(80274),m=e.n(v);e.o(v,"createApiFactory")&&e.d(i,{createApiFactory:function(){return v.createApiFactory}}),e.o(v,"createApiRef")&&e.d(i,{createApiRef:function(){return v.createApiRef}}),e.o(v,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return v.createExternalRouteRef}}),e.o(v,"createPlugin")&&e.d(i,{createPlugin:function(){return v.createPlugin}}),e.o(v,"createRouteRef")&&e.d(i,{createRouteRef:function(){return v.createRouteRef}}),e.o(v,"useApi")&&e.d(i,{useApi:function(){return v.useApi}}),e.o(v,"useApiHolder")&&e.d(i,{useApiHolder:function(){return v.useApiHolder}}),e.o(v,"useRouteRef")&&e.d(i,{useRouteRef:function(){return v.useRouteRef}}),e.o(v,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return v.useRouteRefParams}});var a=e(96896),s=e(82772)},96896:function(_,i,e){"use strict";e.d(i,{r:function(){return t}});class r{constructor(h){this.config=h}getId(){return this.config.id}getApis(){var h;return(h=this.config.apis)!=null?h:[]}getFeatureFlags(){var h,v;return(v=(h=this.config.featureFlags)==null?void 0:h.slice())!=null?v:[]}get routes(){var h;return(h=this.config.routes)!=null?h:{}}get externalRoutes(){var h;return(h=this.config.externalRoutes)!=null?h:{}}provide(h){return h.expose(this)}toString(){return`plugin{${this.config.id}}`}}function t(l){return new r(l)}},82772:function(_,i,e){var R,L,oe;"use strict";e.d(i,{x8:function(){return f},NT:function(){return h},tg:function(){return A},Oi:function(){return C}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class l{constructor(T,D){q(this,R,"absolute");this.id=T,this.params=D}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}R=t;function h(M){var T;return new l(M.id,(T=M.params)!=null?T:[])}const v=/^\w+$/;class m{constructor(T,D,O,B){q(this,L,"sub");this.id=T,this.path=D,this.parent=O,this.params=B}toString(){return`routeRef{type=sub,id=${this.id}}`}}L=t;function a(M){const{id:T,path:D,parent:O}=M,B=D.split("/").filter(Te=>Te.startsWith(":")).map(Te=>Te.substring(1)),Q=[...O.params,...B];if(O.params.some(Te=>B.includes(Te)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!D.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${D}'`);if(D.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${D}'`);for(const Te of B)if(!v.test(Te))throw new Error(`SubRouteRef path has invalid param, got '${Te}'`);return new m(T,D,O,Q)}class s{constructor(T,D,O){q(this,oe,"external");this.id=T,this.params=D,this.optional=O}toString(){return`routeRef{type=external,id=${this.id}}`}}oe=t;function f(M){var T;return new s(M.id,(T=M.params)!=null?T:[],Boolean(M.optional))}var y=e(2784),u=e(10289);function A(M){const T=(0,u.TH)(),D=(0,r.Vt)("routing-context");if(!D)throw new Error("Routing context is not available");const O=D.atVersion(1),B=(0,y.useMemo)(()=>O&&O.resolve(M,T),[O,M,T]);if(!D)throw new Error("useRouteRef used outside of routing context");if(!O)throw new Error("RoutingContext v1 not available");const Q="optional"in M&&M.optional;if(!B&&!Q)throw new Error(`No path for ${M}`);return B}function C(M){return(0,u.UO)()}},10179:function(_,i,e){"use strict";e.d(i,{SP:function(){return R},dR:function(){return u},VL:function(){return oe},BD:function(){return t}});function r(M){if(typeof M!="object"||M===null||Array.isArray(M))return!1;const T=M;return!(typeof T.name!="string"||T.name===""||typeof T.message!="string")}function t(M){if(typeof M!="object"||M===null||Array.isArray(M))throw new Error(`Encountered invalid error, not an object, got '${M}'`);const T=M;if(typeof T.name!="string"||T.name==="")throw new Error(`Encountered error object without a name, got '${M}'`);if(typeof T.message!="string")throw new Error(`Encountered error object without a message, got '${M}'`)}var l=e(24852);function h(M,T){const D=serializeErrorInternal(M),O={name:"Unknown",message:"<no reason given>",...D};return T!=null&&T.includeStack||delete O.stack,O}function v(M){const T=(0,l.deserializeError)(M);return M.stack||(T.stack=void 0),T}function m(M){if(r(M)){const T=String(M);return T!=="[object Object]"?T:`${M.name}: ${M.message}`}return`unknown error '${M}'`}class a extends Error{constructor(T,D){var B;let O=T;if(D!==void 0){const Q=m(D);O?O+=`; caused by ${Q}`:O=`caused by ${Q}`}super(O);q(this,"cause");(B=Error.captureStackTrace)==null||B.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(D)?D:void 0}}class s extends null{}class f extends null{}class y extends null{}class u extends a{}class A extends null{}class C extends null{}class R extends a{constructor(T,D){super(T,D);this.name=r(D)?D.name:"Error"}}async function L(M){var T;try{const D=await M.text();if(D){if((T=M.headers.get("content-type"))!=null&&T.startsWith("application/json"))try{const O=JSON.parse(D);if(O.error&&O.response)return O}catch{}return{error:{name:"Error",message:`Request failed with status ${M.status} ${M.statusText}, ${D}`},response:{statusCode:M.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${M.status} ${M.statusText}`},response:{statusCode:M.status}}}class oe extends Error{constructor(T){super(T.message);q(this,"response");q(this,"body");q(this,"cause");this.name="ResponseError",this.response=T.response,this.body=T.data,this.cause=T.cause}static async fromResponse(T){const D=await L(T),O=D.response.statusCode||T.status,B=D.error.name||T.statusText,Q=`Request failed with ${O} ${B}`,ne=v(D.error);return new oe({message:Q,response:T,data:D,cause:ne})}}},36356:function(_,i,e){var u,A,C,R,L;"use strict";e.d(i,{nW:function(){return y},ae:function(){return m},q3:function(){return a}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class l{constructor(T){gn(this,u,void 0);Tn(this,u,T)}async getCredentials(T){const D=new URL(T.url),O=Xe(this,u).find(B=>B.isUrlSupported(D));if(!O)throw new Error(`No auth provider available for '${T.url}', see https://backstage.io/link?scm-auth`);return O.getCredentials(T)}}u=new WeakMap;const oe=class{constructor(T,D,O,B){gn(this,A,void 0);gn(this,C,void 0);gn(this,R,void 0);gn(this,L,void 0);Tn(this,A,D),Tn(this,C,O),Tn(this,R,B),Tn(this,L,T)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:T,gitlab:D,azure:O,bitbucket:B})=>oe.merge(oe.forGithub(T),oe.forGitlab(D),oe.forAzure(O),oe.forBitbucket(B))})}static forAuthApi(T,D){return new oe("generic",T,D.host,D.scopeMapping)}static forGithub(T,D){var B;const O=(B=D==null?void 0:D.host)!=null?B:"github.com";return new oe("github",T,O,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(T,D){var B;const O=(B=D==null?void 0:D.host)!=null?B:"gitlab.com";return new oe("gitlab",T,O,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(T,D){var B;const O=(B=D==null?void 0:D.host)!=null?B:"dev.azure.com";return new oe("azure",T,O,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(T,D){var B;const O=(B=D==null?void 0:D.host)!=null?B:"bitbucket.org";return new oe("bitbucket",T,O,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...T){return new l(T)}isUrlSupported(T){return T.host===Xe(this,C)}getAdditionalScopesForProvider(T){var D,O;return!(T!=null&&T.customScopes)||Xe(this,L)==="generic"?[]:(O=(D=T.customScopes)==null?void 0:D[Xe(this,L)])!=null?O:[]}async getCredentials(T){const{url:D,additionalScope:O,...B}=T,Q=Xe(this,R).default.slice();O!=null&&O.repoWrite&&Q.push(...Xe(this,R).repoWrite);const ne=this.getAdditionalScopesForProvider(O);ne.length&&Q.push(...ne);const Te=[...new Set(Q)],Ye=await Xe(this,A).getAccessToken(Te,B);return{token:Ye,headers:{Authorization:`Bearer ${Ye}`}}}};let h=oe;A=new WeakMap,C=new WeakMap,R=new WeakMap,L=new WeakMap;var v=e(86574);class m{static fromConfig(T){return v.Lx.fromConfig(T)}}const a=(0,r.createApiRef)({id:"integration.scmintegrations"});var s=e(73250),f=e(2784);const y=M=>{var Q;const{type:T}=M,D=(0,r.useApp)(),O=s.Z,B=T&&(Q=D.getSystemIcon(T))!=null?Q:O;return f.createElement(B,null)}},86574:function(_,i,e){var z,b,ee,ae,Ce,Re,Oe;"use strict";e.d(i,{Lx:function(){return pe},Pb:function(){return ge}});var r=e(82717),t=e.n(r),l=e(76635);function h(N){const p=new URL("http://example.com");return p.host=N,p.host===N}function v(N){try{return new URL(N),!0}catch{return!1}}function m(N,p){return{list(){return N},byUrl(x){try{const $=typeof x=="string"?new URL(x):x;return N.find(G=>p(G)===$.host)}catch{return}},byHost(x){return N.find($=>p($)===x)}}}function a(N){const{url:p,base:x,lineNumber:$}=N;try{return new URL(p),p}catch{}let G;if(p.startsWith("/")){const{filepath:Ie}=t()(x);G=new URL(x);const Ee=(0,l.trimEnd)(G.pathname.substring(0,G.pathname.length-Ie.length),"/");G.pathname=`${Ee}${p}`}else G=new URL(p,x);return G.search=new URL(x).search,$&&(G.hash=`L${$}`),G.toString()}const s="GB",Qe=class{constructor(p,x,$,G,Ie,Ee){gn(this,z,void 0);gn(this,b,void 0);gn(this,ee,void 0);gn(this,ae,void 0);gn(this,Ce,void 0);gn(this,Re,void 0);gn(this,Oe,(...p)=>{const x=new URL(Xe(this,z));return x.pathname=p.map($=>encodeURIComponent($)).join("/"),x});Tn(this,z,p),Tn(this,b,x),Tn(this,ee,$),Tn(this,ae,G),Tn(this,Ce,Ie),Tn(this,Re,Ee)}static fromRepoUrl(p){var en;const x=new URL(p);let $,G,Ie;const Ee=x.pathname.split("/").map(sn=>decodeURIComponent(sn));if(Ee[2]==="_git"?($=Ee[1],G=Ie=Ee[3]):Ee[3]==="_git"&&($=Ee[1],G=Ee[2],Ie=Ee[4]),!$||!G||!Ie)throw new Error("Azure URL must point to a git repository");const $e=(en=x.searchParams.get("path"))!=null?en:void 0;let qe;const Rt=x.searchParams.get("version");if(Rt){if(Rt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");qe=Rt.slice(2)}return new Qe(x.origin,$,G,Ie,$e,qe)}toRepoUrl(){let p;return Xe(this,ee)===Xe(this,ae)?p=Xe(this,Oe).call(this,Xe(this,b),"_git",Xe(this,ae)):p=Xe(this,Oe).call(this,Xe(this,b),Xe(this,ee),"_git",Xe(this,ae)),Xe(this,Ce)&&p.searchParams.set("path",Xe(this,Ce)),Xe(this,Re)&&p.searchParams.set("version",s+Xe(this,Re)),p.toString()}toFileUrl(){if(!Xe(this,Ce))throw new Error("Azure URL must point to a specific path to be able to download a file");const p=Xe(this,Oe).call(this,Xe(this,b),Xe(this,ee),"_apis","git","repositories",Xe(this,ae),"items");return p.searchParams.set("api-version","6.0"),p.searchParams.set("path",Xe(this,Ce)),Xe(this,Re)&&p.searchParams.set("version",Xe(this,Re)),p.toString()}toArchiveUrl(){const p=Xe(this,Oe).call(this,Xe(this,b),Xe(this,ee),"_apis","git","repositories",Xe(this,ae),"items");return p.searchParams.set("recursionLevel","full"),p.searchParams.set("download","true"),p.searchParams.set("api-version","6.0"),Xe(this,Ce)&&p.searchParams.set("scopePath",Xe(this,Ce)),Xe(this,Re)&&p.searchParams.set("version",Xe(this,Re)),p.toString()}toCommitsUrl(){const p=Xe(this,Oe).call(this,Xe(this,b),Xe(this,ee),"_apis","git","repositories",Xe(this,ae),"commits");return p.searchParams.set("api-version","6.0"),Xe(this,Re)&&p.searchParams.set("searchCriteria.itemVersion.version",Xe(this,Re)),p.toString()}getOwner(){return Xe(this,b)}getProject(){return Xe(this,ee)}getRepo(){return Xe(this,ae)}getPath(){return Xe(this,Ce)}getRef(){return Xe(this,Re)}};let f=Qe;z=new WeakMap,b=new WeakMap,ee=new WeakMap,ae=new WeakMap,Ce=new WeakMap,Re=new WeakMap,Oe=new WeakMap;const y="dev.azure.com";function u(N){var $;const p=($=N.getOptionalString("host"))!=null?$:y,x=N.getOptionalString("token");if(!h(p))throw new Error(`Invalid Azure integration config, '${p}' is not a valid host`);return{host:p,token:x}}function A(N){const p=N.map(u);return p.some(x=>x.host===y)||p.push({host:y}),p}const dt=class{constructor(p){this.integrationConfig=p}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(p){var G;const{url:x,base:$}=p;if(v(x))return x;try{const Ie=f.fromRepoUrl($),Ee=new URL($),$e=new URL(`https://a.com${(G=Ie.getPath())!=null?G:""}`),qe=new URL(x,$e).pathname;return Ee.searchParams.set("path",qe),p.lineNumber&&(Ee.searchParams.set("line",String(p.lineNumber)),Ee.searchParams.set("lineEnd",String(p.lineNumber+1)),Ee.searchParams.set("lineStartColumn","1"),Ee.searchParams.set("lineEndColumn","1")),Ee.toString()}catch{return new URL(x,$).toString()}}resolveEditUrl(p){return p}};let C=dt;q(C,"factory",({config:p})=>{var $;const x=A(($=p.getOptionalConfigArray("integrations.azure"))!=null?$:[]);return m(x.map(G=>new dt(G)),G=>G.config.host)});var R=e(48834).Buffer;function L(N){return AzureUrl.fromRepoUrl(N).toFileUrl()}function oe(N){return AzureUrl.fromRepoUrl(N).toArchiveUrl()}function M(N){return AzureUrl.fromRepoUrl(N).toCommitsUrl()}function T(N,p){const x=p?{...p}:{};if(N.token){const $=R.from(`:${N.token}`,"utf8");x.Authorization=`Basic ${$.toString("base64")}`}return{headers:x}}const D="bitbucket.org",O="https://api.bitbucket.org/2.0";function B(N){var Ee;const p=(Ee=N.getOptionalString("host"))!=null?Ee:D;let x=N.getOptionalString("apiBaseUrl");const $=N.getOptionalString("token"),G=N.getOptionalString("username"),Ie=N.getOptionalString("appPassword");if(!h(p))throw new Error(`Invalid Bitbucket integration config, '${p}' is not a valid host`);return x?x=(0,l.trimEnd)(x,"/"):p===D?x=O:x=`https://${p}/rest/api/1.0`,{host:p,apiBaseUrl:x,token:$,username:G,appPassword:Ie}}function Q(N){const p=N.map(B);return p.some(x=>x.host===D)||p.push({host:D,apiBaseUrl:O}),p}const yt=class{constructor(p){this.integrationConfig=p}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(p){const x=a(p);if(!p.lineNumber)return x;const $=new URL(x);return this.integrationConfig.host==="bitbucket.org"?$.hash=`lines-${p.lineNumber}`:$.hash=`${p.lineNumber}`,$.toString()}resolveEditUrl(p){const x=t()(p),$=new URL(p);return $.searchParams.set("mode","edit"),$.searchParams.set("spa","0"),$.searchParams.set("at",x.ref),$.toString()}};let ne=yt;q(ne,"factory",({config:p})=>{var $;const x=Q(($=p.getOptionalConfigArray("integrations.bitbucket"))!=null?$:[]);return m(x.map(G=>new yt(G)),G=>G.config.host)});var Te=e(96279),Ye=e(48834).Buffer;async function We(N,p){const{name:x,owner:$,resource:G}=parseGitUrl(N),Ie=G==="bitbucket.org";let Ee=Ie?`${p.apiBaseUrl}/repositories/${$}/${x}`:`${p.apiBaseUrl}/projects/${$}/repos/${x}/default-branch`,$e=await fetch(Ee,xe(p));if($e.status===404&&!Ie&&(Ee=`${p.apiBaseUrl}/projects/${$}/repos/${x}/branches/default`,$e=await fetch(Ee,xe(p))),!$e.ok){const Rt=`Failed to retrieve default branch from ${Ee}, ${$e.status} ${$e.statusText}`;throw new Error(Rt)}let qe;if(Ie)qe=(await $e.json()).mainbranch.name;else{const{displayId:Rt}=await $e.json();qe=Rt}if(!qe)throw new Error(`Failed to read default branch from ${Ee}. Response ${$e.status} ${$e.json()}`);return qe}async function fe(N,p){const{name:x,owner:$,ref:G,protocol:Ie,resource:Ee,filepath:$e}=parseGitUrl(N),qe=Ee==="bitbucket.org";let Rt=G;Rt||(Rt=await We(N,p));const en=$e?`&path=${encodeURIComponent($e)}`:"";return qe?`${Ie}://${Ee}/${$}/${x}/get/${Rt}.tar.gz`:`${p.apiBaseUrl}/projects/${$}/repos/${x}/archive?format=tgz&at=${Rt}&prefix=${$}-${x}${en}`}function ye(N,p){try{const{owner:x,name:$,ref:G,filepathtype:Ie,filepath:Ee}=parseGitUrl(N);if(!x||!$||Ie!=="browse"&&Ie!=="raw"&&Ie!=="src")throw new Error("Invalid Bitbucket URL or file path");const $e=Ee.replace(/^\//,"");if(p.host==="bitbucket.org"){if(!G)throw new Error("Invalid Bitbucket URL or file path");return`${p.apiBaseUrl}/repositories/${x}/${$}/src/${G}/${$e}`}return`${p.apiBaseUrl}/projects/${x}/repos/${$}/raw/${$e}?at=${G}`}catch(x){throw new Error(`Incorrect URL: ${N}, ${x}`)}}function xe(N){const p={};if(N.token)p.Authorization=`Bearer ${N.token}`;else if(N.username&&N.appPassword){const x=Ye.from(`${N.username}:${N.appPassword}`,"utf8");p.Authorization=`Basic ${x.toString("base64")}`}return{headers:p}}function He(N){const p=N.getString("host");let x=N.getOptionalString("baseUrl"),$=N.getOptionalString("gitilesBaseUrl");const G=N.getOptionalString("username"),Ie=N.getOptionalString("password");if(h(p)){if(x&&!v(x))throw new Error(`Invalid Gerrit integration config, '${x}' is not a valid baseUrl`);if($&&!v($))throw new Error(`Invalid Gerrit integration config, '${$}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${p}' is not a valid host`);return x?x=(0,l.trimEnd)(x,"/"):x=`https://${p}`,$?$=(0,l.trimEnd)($,"/"):$=`https://${p}`,{host:p,baseUrl:x,gitilesBaseUrl:$,username:G,password:Ie}}function ke(N){return N.map(He)}const rt=class{constructor(p){this.integrationConfig=p}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(p){const{url:x,base:$,lineNumber:G}=p;let Ie;return x?Ie=new URL(x,$):Ie=new URL($),G&&(Ie.hash=G.toString()),Ie.toString()}resolveEditUrl(p){return p}};let nt=rt;q(nt,"factory",({config:p})=>{var $;const x=ke(($=p.getOptionalConfigArray("integrations.gerrit"))!=null?$:[]);return m(x.map(G=>new rt(G)),G=>G.config.host)});var tt=e(48834).Buffer;const be=")]}'";function Ze(N,p){const $=p.replace(N.gitilesBaseUrl,"").split("/").filter(Rt=>!!Rt),G=$.indexOf("+");if(G<=0)throw new Error(`Unable to parse project from url: ${p}`);const Ie=trimStart($.slice(0,G).join("/"),"/"),Ee=$.indexOf("heads");if(Ee<=0)throw new Error(`Unable to parse branch from url: ${p}`);const $e=$[Ee+1],qe=$.slice(Ee+2).join("/");return{branch:$e,filePath:qe===""?"/":qe,project:Ie}}function je(N){return N.password?"/a/":"/"}function Je(N,p){const{branch:x,filePath:$,project:G}=Ze(N,p);return`${N.baseUrl}${je(N)}projects/${encodeURIComponent(G)}/branches/${x}/files/${encodeURIComponent($)}/content`}function vt(N){const p={};if(!N.password)return p;const x=tt.from(`${N.username}:${N.password}`,"utf8");return p.Authorization=`Basic ${x.toString("base64")}`,{headers:p}}async function Dt(N){const p=await N.text();if(p.startsWith(be))try{return JSON.parse(p.slice(be.length))}catch(x){throw new Error(`Invalid response from Gerrit: ${p.slice(0,10)} - ${x}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${p.slice(0,10)}`)}const lt="github.com",bt="https://api.github.com",Ft="https://raw.githubusercontent.com";function Pt(N){var Ee,$e;const p=(Ee=N.getOptionalString("host"))!=null?Ee:lt;let x=N.getOptionalString("apiBaseUrl"),$=N.getOptionalString("rawBaseUrl");const G=N.getOptionalString("token"),Ie=($e=N.getOptionalConfigArray("apps"))==null?void 0:$e.map(qe=>({appId:qe.getNumber("appId"),clientId:qe.getString("clientId"),clientSecret:qe.getString("clientSecret"),webhookSecret:qe.getString("webhookSecret"),privateKey:qe.getString("privateKey"),allowedInstallationOwners:qe.getOptionalStringArray("allowedInstallationOwners")}));if(!h(p))throw new Error(`Invalid GitHub integration config, '${p}' is not a valid host`);return x?x=(0,l.trimEnd)(x,"/"):p===lt&&(x=bt),$?$=(0,l.trimEnd)($,"/"):p===lt&&($=Ft),{host:p,apiBaseUrl:x,rawBaseUrl:$,token:G,apps:Ie}}function Nt(N){const p=N.map(Pt);return p.some(x=>x.host===lt)||p.push({host:lt,apiBaseUrl:bt,rawBaseUrl:Ft}),p}function wt(N,p,x){try{const{owner:$,name:G,ref:Ie,filepathtype:Ee,filepath:$e}=parseGitUrl(N);if(!$||!G||!Ie||Ee!=="blob"&&Ee!=="raw"&&Ee!=="tree")throw new Error("Invalid GitHub URL or file path");const qe=$e.replace(/^\//,"");return nn(p,x)==="api"?`${p.apiBaseUrl}/repos/${$}/${G}/contents/${qe}?ref=${Ie}`:`${p.rawBaseUrl}/${$}/${G}/${Ie}/${qe}`}catch($){throw new Error(`Incorrect URL: ${N}, ${$}`)}}function Wt(N,p){const x={};return nn(N,p)==="api"&&(x.Accept="application/vnd.github.v3.raw"),p.token&&(x.Authorization=`token ${p.token}`),{headers:x}}function nn(N,p){return N.apiBaseUrl&&(p.token||!N.rawBaseUrl)?"api":"raw"}class $t{constructor(){q(this,"tokenCache",new Map);q(this,"isNotExpired",p=>p.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(p,x){const $=this.tokenCache.get(p);if($&&this.isNotExpired($.expiresAt))return{accessToken:$.token};const G=await x();return this.tokenCache.set(p,G),{accessToken:G.token}}}const ht={Accept:"application/vnd.github.machine-man-preview+json"};class Yt{constructor(p,x){q(this,"appClient");q(this,"baseUrl");q(this,"baseAuthConfig");q(this,"cache",new $t);q(this,"allowedInstallationOwners");this.allowedInstallationOwners=p.allowedInstallationOwners,this.baseUrl=x,this.baseAuthConfig={appId:p.appId,privateKey:p.privateKey.replace(/\\n/gm,`
31
+ `)},this.appClient=new Octokit({baseUrl:x,headers:ht,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(p,x){var Ee;const{installationId:$,suspended:G}=await this.getInstallationData(p);if(this.allowedInstallationOwners&&!((Ee=this.allowedInstallationOwners)!=null&&Ee.includes(p)))return{accessToken:void 0};if(G)throw new Error(`The GitHub application for ${p} is suspended`);const Ie=x?`${p}/${x}`:p;return this.cache.getOrCreateToken(Ie,async()=>{const $e=await this.appClient.apps.createInstallationAccessToken({installation_id:$,headers:ht});if(x&&$e.data.repository_selection==="selected"){const qe=new Octokit({baseUrl:this.baseUrl,auth:$e.data.token});if(!(await qe.paginate(qe.apps.listReposAccessibleToInstallation)).some(sn=>sn.name===x))throw new Error(`The Backstage GitHub application used in the ${p} organization does not have access to a repository with the name ${x}`)}return{token:$e.data.token,expiresAt:DateTime.fromISO($e.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(p){const $=(await this.getInstallations()).find(Ie=>{var Ee,$e;return(($e=(Ee=Ie.account)==null?void 0:Ee.login)==null?void 0:$e.toLocaleLowerCase("en-US"))===p.toLocaleLowerCase("en-US")});if($)return{installationId:$.id,suspended:Boolean($.suspended_by)};const G=new Error(`No app installation found for ${p} in ${this.baseAuthConfig.appId}`);throw G.name="NotFoundError",G}}class le{constructor(p){q(this,"apps");var x,$;this.apps=($=(x=p.apps)==null?void 0:x.map(G=>new Yt(G,p.apiBaseUrl)))!=null?$:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(x=>x.getInstallations()))).flat():[]}async getAppToken(p,x){if(this.apps.length===0)return;const $=await Promise.all(this.apps.map($e=>$e.getInstallationCredentials(p,x).then(qe=>({credentials:qe,error:void 0}),qe=>({credentials:void 0,error:qe})))),G=$.find($e=>$e.credentials);if(G)return G.credentials.accessToken;const Ee=$.map($e=>$e.error).find($e=>$e.name!=="NotFoundError");if(Ee)throw Ee}}class H{constructor(p,x){this.githubAppCredentialsMux=p,this.token=x}async getCredentials(p){const x=parseGitUrl(p.url),$=x.owner||x.name,G=x.owner?x.name:void 0;let Ie="app",Ee=await this.githubAppCredentialsMux.getAppToken($,G);return Ee||(Ie="token",Ee=this.token),{headers:Ee?{Authorization:`Bearer ${Ee}`}:void 0,token:Ee,type:Ie}}}q(H,"create",null);class ce{static fromIntegrations(p){const x=new Map;return p.github.list().forEach($=>{const G=SingleInstanceGithubCredentialsProvider.create($.config);x.set($.config.host,G)}),new ce(x)}constructor(p){this.providers=p}async getCredentials(p){const x=new URL(p.url),$=this.providers.get(x.host);if(!$)throw new Error(`There is no GitHub integration that matches ${p.url}. Please add a configuration for an integration.`);return $.getCredentials(p)}}const st=class{constructor(p){this.integrationConfig=p}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(p){return ge(a(p),"tree")}resolveEditUrl(p){return ge(p,"edit")}};let de=st;q(de,"factory",({config:p})=>{var $;const x=Nt(($=p.getOptionalConfigArray("integrations.github"))!=null?$:[]);return m(x.map(G=>new st(G)),G=>G.config.host)});function ge(N,p){return N.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(x,$,G,Ie)=>`//${$}/${G}/${Ie}/${p}/`)}const De="gitlab.com",Ue="https://gitlab.com/api/v4";function Ae(N){const p=N.getString("host");let x=N.getOptionalString("apiBaseUrl");const $=N.getOptionalString("token");let G=N.getOptionalString("baseUrl");if(x?x=(0,l.trimEnd)(x,"/"):p===De&&(x=Ue),G?G=(0,l.trimEnd)(G,"/"):G=`https://${p}`,h(p)){if(!x||!v(x))throw new Error(`Invalid GitLab integration config, '${x}' is not a valid apiBaseUrl`);if(!v(G))throw new Error(`Invalid GitLab integration config, '${G}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${p}' is not a valid host`);return{host:p,token:$,apiBaseUrl:x,baseUrl:G}}function Ve(N){const p=N.map(Ae);return p.some(x=>x.host===De)||p.push({host:De,apiBaseUrl:Ue,baseUrl:`https://${De}`}),p}async function ut(N,p){if(N.includes("/-/blob/")){const x=await xt(N,p);return ot(N,x).toString()}return gt(N).toString()}function At(N){const{token:p=""}=N;return{headers:{"PRIVATE-TOKEN":p}}}function gt(N){try{const p=new URL(N),[x,$,G,Ie,...Ee]=p.pathname.split("/");if(x!==""||$===""||G===""||Ie!=="blob"||!Ee.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return p.pathname=[x,$,G,"raw",...Ee].join("/"),p}catch(p){throw new Error(`Incorrect url: ${N}, ${p}`)}}function ot(N,p){try{const x=new URL(N),$=x.pathname.split("/-/blob/")[1],[G,...Ie]=$.split("/");return x.pathname=["/api/v4/projects",p,"repository/files",encodeURIComponent(decodeURIComponent(Ie.join("/"))),"raw"].join("/"),x.search=`?ref=${G}`,x}catch(x){throw new Error(`Incorrect url: ${N}, ${x}`)}}async function xt(N,p){const x=new URL(N);if(!x.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const $=x.pathname.split("/-/blob/")[0],G=new URL(`${x.origin}/api/v4/projects/${encodeURIComponent($.replace(/^\//,""))}`),Ie=await fetch(G.toString(),At(p)),Ee=await Ie.json();if(!Ie.ok)throw new Error(`GitLab Error '${Ee.error}', ${Ee.error_description}`);return Number(Ee.id)}catch($){throw new Error(`Could not get GitLab project ID for: ${N}, ${$}`)}}const It=class{constructor(p){this.integrationConfig=p}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(p){return a(p)}resolveEditUrl(p){return j(p,"edit")}};let se=It;q(se,"factory",({config:p})=>{var $;const x=Ve(($=p.getOptionalConfigArray("integrations.gitlab"))!=null?$:[]);return m(x.map(G=>new It(G)),G=>G.config.host)});function j(N,p){return N.replace(/\/\-\/(blob|tree|edit)\//,`/-/${p}/`)}const J="amazonaws.com";function Y(N){var Rt;const p=N.getOptionalString("endpoint"),x=(Rt=N.getOptionalBoolean("s3ForcePathStyle"))!=null?Rt:!1;let $,G;if(p){try{const en=new URL(p);$=en.host,G=en.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${p}' is not a valid URL`)}if(G!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${p}'`)}else $=J;const Ie=N.getOptionalString("accessKeyId"),Ee=N.getOptionalString("secretAccessKey"),$e=N.getOptionalString("roleArn"),qe=N.getOptionalString("externalId");return{host:$,endpoint:p,s3ForcePathStyle:x,accessKeyId:Ie,secretAccessKey:Ee,roleArn:$e,externalId:qe}}function F(N){const p=N.map(Y);return p.some(x=>x.host===J)||p.push({host:J}),p}const Ke=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(p){this.integrationConfig=p}resolveUrl(p){return a(p)}resolveEditUrl(p){return p}};let ue=Ke;q(ue,"factory",({config:p})=>{var $;const x=F(($=p.getOptionalConfigArray("integrations.awsS3"))!=null?$:[]);return m(x.map(G=>new Ke(G)),G=>G.config.host)});class pe{constructor(p){q(this,"byType");this.byType=p}static fromConfig(p){return new pe({awsS3:ue.factory({config:p}),azure:C.factory({config:p}),bitbucket:ne.factory({config:p}),gerrit:nt.factory({config:p}),github:de.factory({config:p}),gitlab:se.factory({config:p})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}list(){return Object.values(this.byType).flatMap(p=>p.list())}byUrl(p){return Object.values(this.byType).map(x=>x.byUrl(p)).find(Boolean)}byHost(p){return Object.values(this.byType).map(x=>x.byHost(p)).find(Boolean)}resolveUrl(p){const x=this.byUrl(p.base);return x?x.resolveUrl(p):a(p)}resolveEditUrl(p){const x=this.byUrl(p);return x?x.resolveEditUrl(p):p}}},30294:function(_,i,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return v.plugin}});var t=e(2784),l=e(47093),h=e(10289),v=e(82250),m=e(47955),a=e(49208),s=e(36964),f=e(68099);const y=[(0,s.createApiFactory)({api:s.discoveryApiRef,deps:{configApi:s.configApiRef},factory:({configApi:Z})=>a.UrlPatternDiscovery.compile(`${Z.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,s.createApiFactory)({api:s.alertApiRef,deps:{},factory:()=>new a.AlertApiForwarder}),(0,s.createApiFactory)({api:s.analyticsApiRef,deps:{},factory:()=>new a.NoOpAnalyticsApi}),(0,s.createApiFactory)({api:s.errorApiRef,deps:{alertApi:s.alertApiRef},factory:({alertApi:Z})=>{const re=new a.ErrorAlerter(Z,new a.ErrorApiForwarder);return a.UnhandledErrorForwarder.forward(re,{hidden:!1}),re}}),(0,s.createApiFactory)({api:s.storageApiRef,deps:{errorApi:s.errorApiRef},factory:({errorApi:Z})=>a.WebStorage.create({errorApi:Z})}),(0,s.createApiFactory)({api:s.fetchApiRef,deps:{configApi:s.configApiRef,identityApi:s.identityApiRef,discoveryApi:s.discoveryApiRef},factory:({configApi:Z,identityApi:re,discoveryApi:me})=>(0,a.createFetchApi)({middleware:[a.FetchMiddlewares.resolvePluginProtocol({discoveryApi:me}),a.FetchMiddlewares.injectIdentityAuth({identityApi:re,config:Z})]})}),(0,s.createApiFactory)({api:s.oauthRequestApiRef,deps:{},factory:()=>new a.OAuthRequestManager}),(0,s.createApiFactory)({api:s.googleAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:Z,oauthRequestApi:re,configApi:me})=>a.GoogleAuth.create({discoveryApi:Z,oauthRequestApi:re,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.microsoftAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:Z,oauthRequestApi:re,configApi:me})=>a.MicrosoftAuth.create({discoveryApi:Z,oauthRequestApi:re,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.githubAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:Z,oauthRequestApi:re,configApi:me})=>a.GithubAuth.create({discoveryApi:Z,oauthRequestApi:re,defaultScopes:["read:user"],environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oktaAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:Z,oauthRequestApi:re,configApi:me})=>a.OktaAuth.create({discoveryApi:Z,oauthRequestApi:re,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.gitlabAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:Z,oauthRequestApi:re,configApi:me})=>a.GitlabAuth.create({discoveryApi:Z,oauthRequestApi:re,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oneloginAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:Z,oauthRequestApi:re,configApi:me})=>a.OneLoginAuth.create({discoveryApi:Z,oauthRequestApi:re,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.bitbucketAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:Z,oauthRequestApi:re,configApi:me})=>a.BitbucketAuth.create({discoveryApi:Z,oauthRequestApi:re,defaultScopes:["team"],environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.atlassianAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:Z,oauthRequestApi:re,configApi:me})=>a.AtlassianAuth.create({discoveryApi:Z,oauthRequestApi:re,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:f.RV,deps:{discovery:s.discoveryApiRef,identity:s.identityApiRef,config:s.configApiRef},factory:({config:Z,discovery:re,identity:me})=>f.iM.create({config:Z,discovery:re,identity:me})})];var u=e(77277),A=e(9118),C=e(62833);function R({children:Z}){return(0,h.GV)()?t.createElement(t.Fragment,null,Z):t.createElement(h.VA,null,Z)}const L=()=>t.createElement(A.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),oe=({step:Z,error:re})=>{let me="";return Z==="load-config"?me=`The configuration failed to load, someone should have a look at this error: ${re.message}`:Z==="load-chunk"&&(me=`Lazy loaded chunk failed to load, try to reload the page: ${re.message}`),t.createElement(R,null,t.createElement(A.ErrorPage,{status:"501",statusMessage:me}))},M=({error:Z,resetError:re,plugin:me})=>t.createElement(A.ErrorPanel,{title:`Error in ${me==null?void 0:me.getId()}`,defaultExpanded:!0,error:Z},t.createElement(u.Z,{variant:"outlined",onClick:re},"Retry")),T={Progress:A.Progress,Router:C.VK,NotFoundErrorPage:L,BootErrorPage:oe,ErrorBoundaryFallback:M};var D=e(43642),O=e(80079),B=e(90941),Q=e(32915),ne=e(40562),Te=e(21853),Ye=e(60744),We=e(66569),fe=e(30254),ye=e(13384),xe=e(15933),He=e(58838),ke=e(86737),nt=e(4989),tt=e(44407),be=e(18628),Ze=e(84219),je=e(98685),Je=e(39781);const vt={brokenImage:O.Z,catalog:be.Z,scaffolder:Q.Z,techdocs:ne.Z,search:Te.Z,chat:Ye.Z,dashboard:We.Z,docs:fe.Z,email:ye.Z,github:He.Z,group:Ze.Z,help:ke.Z,"kind:api":xe.Z,"kind:component":tt.Z,"kind:domain":D.Z,"kind:group":Ze.Z,"kind:location":nt.Z,"kind:system":B.Z,"kind:user":je.Z,user:je.Z,warning:Je.Z};var Dt=e(28981),lt=e(98192),bt=e(15222),Ft=e(41547),Pt=e(87561);const Nt=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(bt.Z,null),Provider:({children:Z})=>t.createElement(Ft.Z,{theme:Dt.lightTheme},t.createElement(Pt.ZP,null,Z))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(lt.Z,null),Provider:({children:Z})=>t.createElement(Ft.Z,{theme:Dt.darkTheme},t.createElement(Pt.ZP,null,Z))}];function wt(Z){var re,me,Me;return(0,a.createSpecializedApp)({...Z,apis:(re=Z==null?void 0:Z.apis)!=null?re:[],bindRoutes:Z==null?void 0:Z.bindRoutes,components:{...T,...Z==null?void 0:Z.components},configLoader:Z==null?void 0:Z.configLoader,defaultApis:y,icons:{...vt,...Z==null?void 0:Z.icons},plugins:(me=Z==null?void 0:Z.plugins)!=null?me:[],themes:(Me=Z==null?void 0:Z.themes)!=null?Me:Nt})}var Wt=e(82394),nn=e.n(Wt),$t=e(48023),ht=e(76635);async function Yt({storageApi:Z}){var pt;const re=Z.forBucket("settings"),me=Z.forBucket("starredEntities"),Me=re.snapshot("starredEntities").value;if(!(0,ht.isArray)(Me))return;const _e=new Set((pt=me.snapshot("entityRefs").value)!=null?pt:[]);Me.filter(ht.isString).map(mt=>mt.split(":")).filter(mt=>mt.length===4&&mt[0]==="entity").map(([mt,ct,ft,Lt])=>(0,$t.eE)({kind:ct,namespace:ft,name:Lt})).forEach(mt=>_e.add(mt)),await me.set("entityRefs",Array.from(_e)),await re.remove("starredEntities")}class le{constructor(re){q(this,"settingsStore");q(this,"starredEntities");q(this,"subscribers",new Set);q(this,"observable",new(nn())(re=>(re.next(new Set(this.starredEntities)),this.subscribers.add(re),()=>{this.subscribers.delete(re)})));var me;Yt(re).then(),this.settingsStore=re.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((me=this.settingsStore.snapshot("entityRefs").value)!=null?me:[]),this.settingsStore.observe$("entityRefs").subscribe({next:Me=>{var _e;this.starredEntities=new Set((_e=Me.value)!=null?_e:[]),this.notifyChanges()}})}async toggleStarred(re){this.starredEntities.has(re)?this.starredEntities.delete(re):this.starredEntities.add(re),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const re of this.subscribers)re.next(new Set(this.starredEntities))}}var H=e(39398),ce=e(49782),de=e(79692);const ge=(0,de.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function De(Z){const re=Z.result,me=ge();return React.createElement(Link,{to:re.location},React.createElement(ListItem,{alignItems:"flex-start",className:me.flexContainer},React.createElement(ListItemText,{className:me.itemText,primaryTypographyProps:{variant:"h6"},primary:re.title,secondary:re.text}),React.createElement(Box,null,re.kind&&React.createElement(Chip,{label:`Kind: ${re.kind}`,size:"small"}),re.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${re.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))}var Ue=e(30097),Ae=e(53479),Ve=e(95544),ut=e(99688),At=e(12231),gt=e(86136),ot=e(49378),xt=e(85256),se=e(61837),j=e(79784),J=e(50758),Y=e(49166),F=e(31654),ue=e(43054),pe=e(40749);const z="catalog-entity",b=(0,pe.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:z}),ee=(0,pe.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),ae=(0,pe.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:z}),Ce=(0,pe.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:z}),Re=(0,pe.J$)({name:"catalog.location.read",attributes:{action:"read"}}),Oe=(0,pe.J$)({name:"catalog.location.create",attributes:{action:"create"}}),Qe=(0,pe.J$)({name:"catalog.location.delete",attributes:{action:"delete"}}),dt=(0,de.Z)({button:{color:"white"}});function yt(Z){var qn;const{UNSTABLE_extraContextMenuItems:re,UNSTABLE_contextMenuOptions:me,onUnregisterEntity:Me,onInspectEntity:_e}=Z,[pt,mt]=(0,t.useState)(),ct=dt(),ft=(0,Ae.useEntityPermission)(ae),Lt=vn=>{mt(vn.currentTarget)},Mt=()=>{mt(void 0)},rn=re&&[...re.map(vn=>t.createElement(At.Z,{key:vn.title,onClick:()=>{Mt(),vn.onClick()}},t.createElement(gt.Z,null,t.createElement(vn.Icon,{fontSize:"small"})),t.createElement(ot.Z,{primary:vn.title}))),t.createElement(xt.Z,{key:"the divider is here!"})],tn=(qn=!ft.allowed||(me==null?void 0:me.disableUnregister))!=null?qn:!1;return t.createElement(t.Fragment,null,t.createElement(se.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:Lt,"data-testid":"menu-button",className:ct.button},t.createElement(ue.Z,null)),t.createElement(j.ZP,{open:Boolean(pt),onClose:Mt,anchorEl:pt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},t.createElement(J.Z,null,rn,t.createElement(At.Z,{onClick:()=>{Mt(),Me()},disabled:tn},t.createElement(gt.Z,null,t.createElement(Y.Z,{fontSize:"small"})),t.createElement(ot.Z,{primary:"Unregister entity"})),t.createElement(At.Z,{onClick:()=>{Mt(),_e()}},t.createElement(gt.Z,null,t.createElement(F.Z,{fontSize:"small"})),t.createElement(ot.Z,{primary:"Inspect entity"})))))}const rt="plugin.catalog.entityLayoutRoute",st=()=>null;(0,s.attachComponentData)(st,rt,!0),(0,s.attachComponentData)(st,"core.gatherMountPoints",!0);function It(Z){const{entity:re,title:me}=Z;return t.createElement(Ve.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(Ve.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},me),re&&t.createElement(Ae.FavoriteEntity,{entity:re}))}function Ke(Z,re,me,Me){var ct,ft,Lt,Mt,rn;const _e=(ct=Z!=null?Z:Me==null?void 0:Me.kind)!=null?ct:"",pt=(ft=re!=null?re:Me==null?void 0:Me.metadata.namespace)!=null?ft:"";return{headerTitle:`${(rn=(Mt=(Lt=Me==null?void 0:Me.metadata.title)!=null?Lt:me)!=null?Mt:Me==null?void 0:Me.metadata.name)!=null?rn:""}${pt&&pt!==$t.zG?` in ${pt}`:""}`,headerType:(()=>{let tn=_e.toLocaleLowerCase("en-US");return Me&&Me.spec&&"type"in Me.spec&&(tn+=" \u2014 ",tn+=Me.spec.type.toLocaleLowerCase("en-US")),tn})()}}function N(Z){var Me;const{entity:re}=Z,me=(0,Ae.getEntityRelations)(re,$t.S4);return t.createElement(t.Fragment,null,me.length>0&&t.createElement(A.HeaderLabel,{label:"Owner",value:t.createElement(Ae.EntityRefLinks,{entityRefs:me,defaultKind:"Group",color:"inherit"})}),((Me=re.spec)==null?void 0:Me.lifecycle)&&t.createElement(A.HeaderLabel,{label:"Lifecycle",value:re.spec.lifecycle}))}const p=Z=>{var P,U,V;const{UNSTABLE_extraContextMenuItems:re,UNSTABLE_contextMenuOptions:me,children:Me}=Z,{kind:_e,namespace:pt,name:mt}=(0,s.useRouteRefParams)(Ae.entityRouteRef),{entity:ct,loading:ft,error:Lt}=(0,Ae.useAsyncEntity)(),Mt=(0,h.TH)(),rn=(0,s.useElementFilter)(Me,X=>X.selectByComponentData({key:rt,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:k})=>{if(ct){if(k.if&&!k.if(ct))return[]}else return[];return[{path:k.path,title:k.title,children:k.children,tabProps:k.tabProps}]}),[ct]),{headerTitle:tn,headerType:qn}=Ke(_e,pt,mt,ct),[vn,_n]=(0,t.useState)(!1),[Hr,Un]=(0,t.useState)(!1),jr=(0,h.s0)(),S=async()=>{_n(!1),Un(!1),jr("/")};return(0,t.useEffect)(()=>{_n(!1),Un(!1)},[Mt.pathname]),t.createElement(A.Page,{themeId:(V=(U=(P=ct==null?void 0:ct.spec)==null?void 0:P.type)==null?void 0:U.toString())!=null?V:"home"},t.createElement(A.Header,{title:t.createElement(It,{title:tn,entity:ct}),pageTitleOverride:tn,type:qn},ct&&t.createElement(t.Fragment,null,t.createElement(N,{entity:ct}),t.createElement(yt,{UNSTABLE_extraContextMenuItems:re,UNSTABLE_contextMenuOptions:me,onUnregisterEntity:()=>_n(!0),onInspectEntity:()=>Un(!0)}))),ft&&t.createElement(A.Progress,null),ct&&t.createElement(A.RoutedTabs,{routes:rn}),Lt&&t.createElement(A.Content,null,t.createElement(ut.Z,{severity:"error"},Lt.toString())),!ft&&!Lt&&!ct&&t.createElement(A.Content,null,t.createElement(A.WarningPanel,{title:"Entity not found"},"There is no ",_e," with the requested"," ",t.createElement(A.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(Ae.UnregisterEntityDialog,{open:vn,entity:ct,onConfirm:S,onClose:()=>_n(!1)}),t.createElement(Ae.InspectEntityDialog,{open:Hr,entity:ct,onClose:()=>Un(!1)}))};p.Route=st;var x=e(10179);function $(Z){const{open:re,onClose:me,onConfirm:Me,entity:_e}=Z,[pt,mt]=useState(!1),ct=useApi(catalogApiRef),ft=useApi(alertApiRef),Lt=async()=>{mt(!0);try{const Mt=_e.metadata.uid;await ct.removeEntityByUid(Mt),Me()}catch(Mt){assertError(Mt),ft.post({message:Mt.message})}finally{mt(!1)}};return React.createElement(Dialog,{open:re,onClose:me},React.createElement(DialogTitle,{id:"responsive-dialog-title"},"Are you sure you want to delete this entity?"),React.createElement(DialogActions,null,React.createElement(Button,{variant:"contained",color:"secondary",disabled:pt,onClick:Lt},"Delete"),React.createElement(Button,{onClick:me,color:"primary"},"Cancel")))}var G=e(47851);function Ie(Z){var re,me;return((me=(re=Z==null?void 0:Z.metadata)==null?void 0:re.annotations)==null?void 0:me["backstage.io/orphan"])==="true"}function Ee(){const Z=useNavigate(),re=useRouteRef(rootRouteRef),[me,Me]=useState(!1),{entity:_e}=useEntity(),pt=async()=>{Me(!1),Z(re())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>Me(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:me,entity:_e,onConfirm:pt,onClose:()=>Me(!1)}))}var $e=e(30001);const qe=Z=>Z.error&&Z.level==="error"&&Z.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function Rt(Z,re){return{items:(await re.getEntityAncestors({entityRef:Z})).items.map(_e=>{var ct,ft;return{errors:((ft=(ct=_e.entity.status)==null?void 0:ct.items)!=null?ft:[]).filter(qe).map(Lt=>Lt.error).filter(Lt=>Boolean(Lt)),entity:_e.entity}}).filter(_e=>_e.errors.length>0)}}async function en(Z,re){const me=re.apis.get(catalogApiRef);if(!me)throw new Error(`No implementation available for ${catalogApiRef}`);return(await Rt(stringifyEntityRef(Z),me)).items.length>0}function sn(){const{entity:Z}=useEntity(),re=stringifyEntityRef(Z),me=useApi(catalogApiRef),{loading:Me,error:_e,value:pt}=useAsync(async()=>Rt(re,me),[re,me]);return _e?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:_e})):Me||!pt?null:React.createElement(React.Fragment,null,pt.items.map((mt,ct)=>React.createElement(Box,{key:ct,mb:1},stringifyEntityRef(Z)!==stringifyEntityRef(mt.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:mt.entity})),mt.errors.map((ft,Lt)=>React.createElement(ResponseErrorPanel,{key:Lt,error:ft})))))}var Wn=e(64279);const bn="core.backstage.entitySwitch",cn=Z=>null;(0,s.attachComponentData)(cn,bn,!0);const Hn=Z=>{var mt,ct;const{entity:re,loading:me}=(0,Ae.useAsyncEntity)(),Me=(0,s.useApiHolder)(),_e=(0,s.useElementFilter)(Z.children,ft=>ft.selectByComponentData({key:bn,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(Lt=>{var tn;if(me)return[];const{if:Mt,children:rn}=Lt.props;return re?[{if:(tn=Mt==null?void 0:Mt(re,{apis:Me}))!=null?tn:!0,children:rn}]:[{if:Mt===void 0,children:rn}]}),[Me,re,me]);return _e.some(ft=>typeof ft.if=="object"&&"then"in ft.if)?t.createElement(hr,{results:_e}):(ct=(mt=_e.find(ft=>ft.if))==null?void 0:mt.children)!=null?ct:null};function hr({results:Z}){const{loading:re,value:me}=(0,Wn.default)(async()=>{var _e;const Me=Z.map(async({if:pt,children:mt})=>{try{if(await pt)return mt}catch{}return null});return(_e=(await Promise.all(Me)).find(Boolean))!=null?_e:null},[Z]);return re||!me?null:me}Hn.Case=cn;const $r=null,Nr=Ae.CatalogFilterLayout.Filters,Ur=Ae.CatalogFilterLayout.Content,kt=(0,s.createPlugin)({id:"catalog",apis:[(0,s.createApiFactory)({api:Ae.catalogApiRef,deps:{discoveryApi:s.discoveryApiRef,fetchApi:s.fetchApiRef},factory:({discoveryApi:Z,fetchApi:re})=>new $e.MS({discoveryApi:Z,fetchApi:re})}),(0,s.createApiFactory)({api:Ae.starredEntitiesApiRef,deps:{storageApi:s.storageApiRef},factory:({storageApi:Z})=>new le({storageApi:Z})})],routes:{catalogIndex:G._Z,catalogEntity:Ae.entityRouteRef},externalRoutes:{createComponent:G.yw,viewTechDoc:G.jU}}),eo=kt.provide((0,s.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(Z=>Z.CatalogPage),mountPoint:G._Z})),gr=kt.provide((0,s.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(Z=>Z.CatalogEntityPage),mountPoint:Ae.entityRouteRef})),jn=kt.provide((0,s.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(Z=>Z.AboutCard)}})),pr=kt.provide((0,s.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(Z=>Z.EntityLinksCard)}})),Zr=kt.provide((0,s.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(Z=>Z.HasSystemsCard)}})),Vn=kt.provide((0,s.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(Z=>Z.HasComponentsCard)}})),yr=kt.provide((0,s.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(Z=>Z.HasSubcomponentsCard)}})),Ut=kt.provide((0,s.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(Z=>Z.HasResourcesCard)}})),zr=kt.provide((0,s.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(Z=>Z.DependsOnComponentsCard)}})),rr=kt.provide((0,s.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(Z=>Z.DependencyOfComponentsCard)}})),Wr=kt.provide((0,s.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(Z=>Z.DependsOnResourcesCard)}})),Er=kt.provide((0,s.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(Z=>Z.RelatedEntitiesCard)}}));var or=e(36356);class ar{constructor({configApi:re,discoveryApi:me,identityApi:Me}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=re,this.discoveryApi=me,this.identityApi=Me}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(re,me){const _e=`${await this.getApiOrigin()}/${me}`,pt=await fetch(`${_e.endsWith("/")?_e:`${_e}/`}index.html`);if(pt.status===404)throw new Error("Page not found");return pt.text()}async syncEntityDocs(re){return"cached"}async getBaseUrl(re,me,Me){const _e=await this.getApiOrigin();return new URL(re,`${_e}/${Me}`).toString()}}class Gn{constructor({configApi:re,discoveryApi:me,identityApi:Me}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=re,this.discoveryApi=me,this.identityApi=Me}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(re){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(re){return{site_name:"Live preview environment",site_description:""}}}const Kn=[(0,s.createApiFactory)({api:v.techdocsStorageApiRef,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:Z,discoveryApi:re,identityApi:me})=>new ar({configApi:Z,discoveryApi:re,identityApi:me})}),(0,s.createApiFactory)({api:v.techdocsApiRef,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:Z,discoveryApi:re,identityApi:me})=>new Gn({configApi:Z,discoveryApi:re,identityApi:me})}),(0,s.createApiFactory)({api:or.q3,deps:{configApi:s.configApiRef},factory:({configApi:Z})=>or.ae.fromConfig(Z)})],vr={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Ar={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Rr(){const Z=await fetch("/.detect");return Z.ok?(await Z.text()).trim()==="techdocs-cli-server":!1}async function On(){const Z=await(0,a.defaultConfigLoader)(),re=await Rr();return[...Z,{context:"detected",data:re?vr:Ar}]}var ln=e(86689),wn=e(58845);const $n=(0,de.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Cr=()=>{const Z=$n();return t.createElement("svg",{className:Z.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:Z.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"}))};const Yn=(0,de.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Tr=()=>{const Z=Yn();return t.createElement("svg",{className:Z.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:Z.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"}))};const Jn=(0,de.Z)({root:{width:A.sidebarConfig.drawerWidthClosed,height:3*A.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:A.sidebarConfig.drawerWidthClosed,marginLeft:24}}),pn=()=>{const Z=Jn(),{isOpen:re}=(0,t.useContext)(A.SidebarContext);return t.createElement("div",{className:Z.root},t.createElement(ln.Z,{component:C.OL,to:"/docs/default/component/local/",underline:"none",className:Z.link},re?t.createElement(Cr,null):t.createElement(Tr,null)))},kn=({children:Z})=>t.createElement(A.SidebarPage,null,t.createElement(A.Sidebar,null,t.createElement(pn,null),t.createElement(A.SidebarDivider,null),t.createElement(A.SidebarItem,{icon:wn.Z,to:"/docs/default/component/local",text:"Docs Preview"})),Z);var Nn=e(80030),ir=e(32388),sr=e(4142);const br=(0,de.Z)(Z=>({headerIcon:{color:Z.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:Z.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var yn;(function(Z){const re="light";Z.LIGHT=re;const me="dark";Z.DARK=me})(yn||(yn={}));const Qn=()=>{const Z=(0,s.useApi)(s.appThemeApiRef),re=br(),[me,Me]=(0,t.useState)(Z.getActiveThemeId()||yn.LIGHT),_e={[yn.LIGHT]:{icon:sr.Z,title:"Dark theme"},[yn.DARK]:{icon:ir.Z,title:"Light theme"}},{title:pt,icon:mt}=_e[me],ct=()=>{Me(ft=>{const Lt=ft===yn.LIGHT?yn.DARK:yn.LIGHT;return Z.setActiveThemeId(Lt),Lt})};return t.createElement(Ve.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(Nn.ZP,{title:pt,arrow:!0},t.createElement(se.Z,{size:"small",onClick:ct},t.createElement(mt,{className:re.headerIcon}))))},Pr=()=>t.createElement(v.TechDocsReaderPage,null,t.createElement(v.TechDocsReaderPageHeader,null),t.createElement(v.TechDocsReaderPageContent,{withSearch:!1})),Ir=t.createElement(Pr,null),Xn=wt({apis:Kn,configLoader:On,plugins:Object.values(r)}),Lr=Xn.getProvider(),cr=Xn.getRouter(),Or=v.techdocsPlugin.provide((0,m.KY)({name:"ThemeToggleAddon",component:Qn,location:m.oZ.Header})),lr=t.createElement(a.FlatRoutes,null,t.createElement(h.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(h.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(gr,null)}),t.createElement(h.AW,{path:"/docs",element:t.createElement(v.TechDocsIndexPage,null)},t.createElement(v.DefaultTechDocsHome,null)),t.createElement(h.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(v.TechDocsReaderPage,null)},Ir,t.createElement(m.DR,null,t.createElement(Or,null))));var En=()=>t.createElement(Lr,null,t.createElement(cr,null,t.createElement(kn,null,lr)));l.render(t.createElement(En,null),document.getElementById("root"))},28981:function(_,i,e){"use strict";e.d(i,{darkTheme:function(){return C},lightTheme:function(){return A}});var r=e(73689),t=e(48032);const l={wave:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,wave2:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1764' height='479' x='-229' y='-6' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M0 400h1350C1321 336 525 33 179-2c-345-34-395 236-408 402H0z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1378 177v223H0V217s219 75 327 52C436 246 717-35 965 45s254 144 413 132z'/%3e%3cpath fill='url(%23paint2_linear)' d='M26 400l-78-16c-170 205-44-6-137-30l-4-1 4 1 137 30c37-45 89-110 159-201 399-514-45 238 1176-50 275-65 354-39 91 267H26z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='431' x2='397.3' y1='-599' y2='372.8' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='236.5' x2='446.6' y1='-586' y2='381.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='851.8' x2='640.4' y1='-867.2' y2='363.7' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,round:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='2269' height='1408' x='-610' y='-509' maskUnits='userSpaceOnUse'%3e%3ccircle cx='1212.8' cy='74.8' r='317.5' fill='url(%23paint0_linear)' transform='rotate(-52 1213 75)'/%3e%3ccircle cx='737.8' cy='445.8' r='317.5' fill='url(%23paint1_linear)' transform='rotate(-116 738 446)'/%3e%3ccircle cx='601.8' cy='52.8' r='418.6' fill='url(%23paint2_linear)' transform='rotate(-117 602 53)'/%3e%3ccircle cx='999.8' cy='364' r='389.1' fill='url(%23paint3_linear)' transform='rotate(31 1000 364)'/%3e%3cellipse cx='-109.2' cy='263.5' fill='url(%23paint4_linear)' rx='429.2' ry='465.8' transform='rotate(-85 -109 264)'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='1301.2' x2='161.4' y1='-1879.7' y2='-969.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='826.2' x2='-313.6' y1='-1508.7' y2='-598.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='718.4' x2='-784.3' y1='-2524' y2='-1324.2' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='1108.2' x2='-288.6' y1='-2031.1' y2='-915.9' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear' x1='10.4' x2='-1626.5' y1='-2603.8' y2='-1399.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`},h={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"]};function v(R,L){const M=`linear-gradient(90deg, ${(R.length===1?[R[0],R[0]]:R).join(", ")})`,T=`${L}, ${M}`;return{colors:R,shape:L,backgroundImage:T}}const m={home:v(h.teal,l.wave),documentation:v(h.pinkSea,l.wave2),tool:v(h.purpleSky,l.round),service:v(h.marineBlue,l.wave),website:v(h.veryBlue,l.wave),library:v(h.rubyRed,l.wave),other:v(h.darkGrey,l.wave),app:v(h.toastyOrange,l.wave),apis:v(h.teal,l.wave2)},a='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function s(R){const{palette:L,fontFamily:oe=a,defaultPageTheme:M,pageTheme:T=m}=R;if(!T[M])throw new Error(`${M} is not defined in pageTheme.`);return{palette:L,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:oe,h5:{fontWeight:700},h4:{fontWeight:700,fontSize:28,marginBottom:6},h3:{fontSize:32,fontWeight:700,marginBottom:6},h2:{fontSize:40,fontWeight:700,marginBottom:8},h1:{fontSize:54,fontWeight:700,marginBottom:10}},page:T[M],getPageTheme:({themeId:D})=>{var O;return(O=T[D])!=null?O:T[M]}}}function f(R){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:R.typography.fontFamily},body:{height:"100%",fontFamily:R.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:R.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:R.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:R.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:R.spacing(1.5,2,1.5,2.5)},head:{wordBreak:"break-word",overflow:"hidden",color:"rgb(179, 179, 179)",fontWeight:"normal",lineHeight:"1"}},MuiTabs:{root:{minHeight:24}},MuiTab:{root:{color:R.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,t.darken)(R.palette.link,.3),background:(0,t.lighten)(R.palette.link,.95)},[R.breakpoints.up("md")]:{minWidth:120,fontSize:R.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:R.palette.link}},MuiTableSortLabel:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"}},active:{fontWeight:"bold",color:"inherit"}},MuiListItemText:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},MuiButton:{text:{padding:void 0}},MuiChip:{root:{backgroundColor:"#D9D9D9",marginRight:R.spacing(1),marginBottom:R.spacing(1),color:R.palette.grey[900]},outlined:{color:R.palette.text.primary},label:{lineHeight:`${R.spacing(2.5)}px`,fontWeight:R.typography.fontWeightMedium,fontSize:`${R.spacing(1.75)}px`},labelSmall:{fontSize:`${R.spacing(1.5)}px`},deleteIcon:{color:R.palette.grey[500],width:`${R.spacing(3)}px`,height:`${R.spacing(3)}px`,margin:`0 ${R.spacing(.75)}px 0 -${R.spacing(.75)}px`},deleteIconSmall:{width:`${R.spacing(2)}px`,height:`${R.spacing(2)}px`,margin:`0 ${R.spacing(.5)}px 0 -${R.spacing(.5)}px`}},MuiCard:{root:{display:"flex",flexDirection:"column"}},MuiCardHeader:{root:{paddingBottom:0}},MuiCardContent:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}},MuiCardActions:{root:{justifyContent:"flex-end"}}}}function y(R){const L=s(R),oe=(0,r.Z)(L),M=f(oe);return{...oe,overrides:M}}var u=e(34505);const A=y({palette:{type:"light",background:{default:"#F8F8F8"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#2E77D0",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#2E77D0"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#000000",textVerySubtle:"#DDD",textSubtle:"#6E6E6E",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#2196F3",link:"#0A6EBE",gold:u.Z.A700,navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:m}),C=y({palette:{type:"dark",background:{default:"#333333"},status:{ok:"#71CF88",warning:"#FFB84D",error:"#F84C55",running:"#3488E3",pending:"#FEF071",aborted:"#9E9E9E"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#9CC9FF",dark:"#82BAFD"},secondary:{main:"#FF88B2"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#FFFFFF",textVerySubtle:"#727272",textSubtle:"#CCCCCC",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#82BAFD",link:"#9CC9FF",gold:u.Z.A700,navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:m})},76241:function(_,i,e){"use strict";e.d(i,{CT:function(){return m},EI:function(){return f},uW:function(){return h},Vt:function(){return a}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),l=y=>`__@backstage/${y}__`;function h(y,u){const A=l(y);let C=t[A];return C||(C=u(),t[A]=C,C)}var v=e(2784);function m(y){return h(y,()=>(0,v.createContext)(void 0))}function a(y){return(0,v.useContext)(m(y))}function s(y){return{set(u){globalThis[`__@backstage/${y}__`]=createContext(createVersionedValueMap(u))},reset(){delete globalThis[`__@backstage/${y}__`]}}}function f(y){return Object.freeze(y),{atVersion(u){return y[u]}}}},53479:function(_,i,e){"use strict";e.d(i,{AsyncEntityProvider:function(){return B},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return T},EntityKindFilter:function(){return ce},EntityLifecyclePicker:function(){return st},EntityListProvider:function(){return Dt},EntityOwnerPicker:function(){return p},EntityRefLink:function(){return le},EntityRefLinks:function(){return H},EntityTable:function(){return qe},EntityTagPicker:function(){return Wn},EntityTypePicker:function(){return Hn},FavoriteEntity:function(){return eo},InspectEntityDialog:function(){return pt},UnregisterEntityDialog:function(){return rn},UserListPicker:function(){return Un},catalogApiRef:function(){return l},entityRouteRef:function(){return Wt},getEntityRelations:function(){return Ze},getEntitySourceLocation:function(){return je},humanizeEntityRef:function(){return $t},starredEntitiesApiRef:function(){return h},useAsyncEntity:function(){return Te},useEntity:function(){return ne},useEntityList:function(){return lt},useEntityOwnership:function(){return Y},useEntityPermission:function(){return ue},useRelatedEntities:function(){return gt},useStarredEntities:function(){return se}});var r=e(30001),t=e(36964);const l=(0,t.createApiRef)({id:"plugin.catalog.service"}),h=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var v=e(82394);class m{constructor(){q(this,"starredEntities",new Set);q(this,"subscribers",new Set);q(this,"observable",new ObservableImpl(P=>(P.next(new Set(this.starredEntities)),this.subscribers.add(P),()=>{this.subscribers.delete(P)})))}async toggleStarred(P){this.starredEntities.delete(P)||this.starredEntities.add(P);for(const U of this.subscribers)U.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var a=e(2784),s=e(41156),f=e(60364),y=e(77277),u=e(4190),A=e(95544),C=e(90436),R=e(60905),L=e(36444);const oe=S=>{const P=(0,s.Z)(k=>k.breakpoints.down("md")),U=(0,f.Z)(),[V,X]=(0,a.useState)(!1);return P?a.createElement(a.Fragment,null,a.createElement(y.Z,{style:{marginTop:U.spacing(1),marginLeft:U.spacing(1)},onClick:()=>X(!0),startIcon:a.createElement(L.Z,null)},"Filters"),a.createElement(u.ZP,{open:V,onClose:()=>X(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},a.createElement(A.Z,{m:2},a.createElement(C.Z,{variant:"h6",component:"h2",style:{marginBottom:U.spacing(1)}},"Filters"),S.children))):a.createElement(R.Z,{item:!0,lg:2},S.children)},M=S=>a.createElement(R.Z,{item:!0,xs:12,lg:10},S.children),T=S=>a.createElement(R.Z,{container:!0,style:{position:"relative"}},S.children);T.Filters=oe,T.Content=M;var D=e(76241);const O=(0,D.CT)("entity-context"),B=({children:S,entity:P,loading:U,error:V,refresh:X})=>{const k={entity:P,loading:U,error:V,refresh:X};return a.createElement(O.Provider,{value:(0,D.EI)({1:k})},S)},Q=S=>React.createElement(B,{entity:S.entity,loading:!Boolean(S.entity),error:void 0,refresh:void 0,children:S.children});function ne(){const S=(0,D.Vt)("entity-context");if(!S)throw new Error("Entity context is not available");const P=S.atVersion(1);if(!P)throw new Error("EntityContext v1 not available");if(!P.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:P.entity}}function Te(){const S=(0,D.Vt)("entity-context");if(!S)throw new Error("Entity context is not available");const P=S.atVersion(1);if(!P)throw new Error("EntityContext v1 not available");const{entity:U,loading:V,error:X,refresh:k}=P;return{entity:U,loading:V,error:X,refresh:k}}var Ye=e(76635),We=e(19126),fe=e.n(We),ye=e(10289),xe=e(69294),He=e(48760),ke=e(90736);function nt(S){return S.reduce((P,U)=>({...P,...U.getCatalogFilters?U.getCatalogFilters():{}}),{})}function tt(S){return P=>S.every(U=>!U.filterEntity||U.filterEntity(P))}var be=e(48023);function Ze(S,P,U){var X;let V=((X=S==null?void 0:S.relations)==null?void 0:X.filter(k=>k.type===P).map(k=>(0,be.of)(k.targetRef)))||[];return U!=null&&U.kind&&(V=V.filter(k=>k.kind.toLocaleLowerCase("en-US")===U.kind.toLocaleLowerCase("en-US"))),V}function je(S,P){var V;const U=(V=S.metadata.annotations)==null?void 0:V[be.M6];if(!!U)try{const X=(0,be.Ou)(U),k=P.byUrl(X.target);return{locationTargetUrl:X.target,integrationType:k==null?void 0:k.type}}catch{return}}function Je(S,P){const U=new Set([...getEntityRelations(S,RELATION_MEMBER_OF,{kind:"group"}),...S?[getCompoundEntityRef(S)]:[]].map(stringifyEntityRef)),V=getEntityRelations(P,RELATION_OWNED_BY).map(stringifyEntityRef);for(const X of V)if(U.has(X))return!0;return!1}const vt=(0,a.createContext)(void 0),Dt=({children:S})=>{const P=(0,ke.default)(),U=(0,t.useApi)(l),[V,X]=(0,a.useState)({}),k=(0,ye.TH)(),he=(0,a.useMemo)(()=>{var et;return(et=fe().parse(k.search,{ignoreQueryPrefix:!0}).filters)!=null?et:{}},[k]),[Le,Ne]=(0,a.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:Fe,error:Be},we]=(0,xe.default)(async()=>{var un;const et=(0,Ye.compact)(Object.values(V)),ze=tt(et),Bt=nt(et),jt=nt((0,Ye.compact)(Object.values(Le.appliedFilters))),Dn=Object.keys(V).reduce((Xt,on)=>{const An=V[on];return An!=null&&An.toQueryValue&&(Xt[on]=An.toQueryValue()),Xt},{});if((0,Ye.isEqual)(jt,Bt))Ne({appliedFilters:V,backendEntities:Le.backendEntities,entities:Le.backendEntities.filter(ze)});else{const Xt=await U.getEntities({filter:Bt});Ne({appliedFilters:V,backendEntities:Xt.items,entities:Xt.items.filter(ze)})}if(P()){const Xt=fe().parse(k.search,{ignoreQueryPrefix:!0}),on=fe().stringify({...Xt,filters:Dn},{addQueryPrefix:!0,arrayFormat:"repeat"}),An=`${window.location.pathname}${on}`;(un=window.history)==null||un.replaceState(null,document.title,An)}},[U,he,V,Le],{loading:!0});(0,He.Z)(we,10,[V]);const Ge=(0,a.useCallback)(et=>{X(ze=>{const Bt=typeof et=="function"?et(ze):et;return{...ze,...Bt}})},[]),Et=(0,a.useMemo)(()=>({filters:Le.appliedFilters,entities:Le.entities,backendEntities:Le.backendEntities,updateFilters:Ge,queryParameters:he,loading:Fe,error:Be}),[Le,Ge,he,Fe,Be]);return a.createElement(vt.Provider,{value:Et},S)};function lt(){const S=(0,a.useContext)(vt);if(!S)throw new Error("useEntityList must be used within EntityListProvider");return S}var bt=e(64279),Ft=e(18149),Pt=e.n(Ft),Nt=e(829),wt=e.n(Nt);const Wt=(0,D.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function nn(S){var P,U;return{kind:S.kind.toLocaleLowerCase("en-US"),namespace:(U=(P=S.metadata.namespace)==null?void 0:P.toLocaleLowerCase("en-US"))!=null?U:DEFAULT_NAMESPACE,name:S.metadata.name}}function $t(S,P){const U=P==null?void 0:P.defaultKind;let V,X,k;return"metadata"in S?(V=S.kind,X=S.metadata.namespace,k=S.metadata.name):(V=S.kind,X=S.namespace,k=S.name),X===be.zG&&(X=void 0),V=V.toLocaleLowerCase("en-US"),V=U&&U.toLocaleLowerCase("en-US")===V?void 0:V,`${V?`${V}:`:""}${X?`${X}/`:""}${k}`}var ht=e(9118),Yt=e(80030);const le=(0,a.forwardRef)((S,P)=>{var et;const{entityRef:U,defaultKind:V,title:X,children:k,...he}=S,Le=(0,t.useRouteRef)(Wt);let Ne,Fe,Be;if(typeof U=="string"){const ze=(0,be.of)(U);Ne=ze.kind,Fe=ze.namespace,Be=ze.name}else"metadata"in U?(Ne=U.kind,Fe=U.metadata.namespace,Be=U.metadata.name):(Ne=U.kind,Fe=U.namespace,Be=U.name);Ne=Ne.toLocaleLowerCase("en-US"),Fe=(et=Fe==null?void 0:Fe.toLocaleLowerCase("en-US"))!=null?et:be.zG;const we={kind:Ne,namespace:Fe,name:Be},Ge=$t({kind:Ne,namespace:Fe,name:Be},{defaultKind:V}),Et=a.createElement(ht.Link,{...he,ref:P,to:Le(we)},k,!k&&(X!=null?X:Ge));return X?a.createElement(Yt.ZP,{title:Ge},Et):Et});function H(S){const{entityRefs:P,defaultKind:U,...V}=S;return a.createElement(a.Fragment,null,P.map((X,k)=>a.createElement(a.Fragment,{key:k},k>0&&", ",a.createElement(le,{...V,entityRef:X,defaultKind:U}))))}class ce{constructor(P){this.value=P}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class de{constructor(P){this.value=P}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class ge{constructor(P){this.values=P}filterEntity(P){return this.values.every(U=>{var V;return((V=P.metadata.tags)!=null?V:[]).includes(U)})}toQueryValue(){return this.values}}class De{constructor(P){this.value=P}filterEntity(P){var V;const U=this.value.toLocaleUpperCase("en-US");return P.metadata.name.toLocaleUpperCase("en-US").includes(U)||`${P.metadata.title}`.toLocaleUpperCase("en-US").includes(U)||((V=P.metadata.tags)==null?void 0:V.join("").toLocaleUpperCase("en-US").indexOf(U))!==-1}}class Ue{constructor(P){this.values=P}filterEntity(P){return this.values.some(U=>Ze(P,be.S4).some(V=>$t(V,{defaultKind:"group"})===U))}toQueryValue(){return this.values}}class Ae{constructor(P){this.values=P}filterEntity(P){return this.values.some(U=>{var V;return((V=P.spec)==null?void 0:V.lifecycle)===U})}toQueryValue(){return this.values}}class Ve{constructor(P,U,V){this.value=P,this.isOwnedEntity=U,this.isStarredEntity=V}filterEntity(P){switch(this.value){case"owned":return this.isOwnedEntity(P);case"starred":return this.isStarredEntity(P);default:return!0}}toQueryValue(){return this.value}}function ut(){var ze;const S=(0,t.useApi)(l),{filters:{kind:P,type:U},queryParameters:{type:V},updateFilters:X}=lt(),k=(0,a.useMemo)(()=>[V].flat().filter(Boolean),[V]),[he,Le]=(0,a.useState)(k.length?k:(ze=U==null?void 0:U.getTypes())!=null?ze:[]);(0,a.useEffect)(()=>{k.length&&Le(k)},[k]);const[Ne,Fe]=(0,a.useState)([]),Be=(0,a.useMemo)(()=>P==null?void 0:P.value,[P]),{error:we,loading:Ge,value:Et}=(0,bt.default)(async()=>Be?await S.getEntityFacets({filter:{kind:Be},facets:["spec.type"]}).then(jt=>jt.facets["spec.type"]||[]):[],[Be,S]),et=(0,a.useRef)(Et);return(0,a.useEffect)(()=>{const Bt=et.current;if(et.current=Et,Ge||!Be||Bt===Et||!Et)return;const jt=wt()(Et,un=>-un.count).map(un=>un.value);Fe(jt);const Dn=he.filter(un=>jt.includes(un));Pt()(he,Dn)||Le(Dn)},[Ge,Be,he,Le,Et]),(0,a.useEffect)(()=>{X({type:he.length?new de(he):void 0})},[he,X]),{loading:Ge,error:we,availableTypes:Ne,selectedTypes:he,setSelectedTypes:Le}}const At=20;function gt(S,P){var Ne,Fe;const U=(Ne=P==null?void 0:P.type)==null?void 0:Ne.toLocaleLowerCase("en-US"),V=(Fe=P==null?void 0:P.kind)==null?void 0:Fe.toLocaleLowerCase("en-US"),X=(0,t.useApi)(l),{loading:k,value:he,error:Le}=(0,bt.default)(async()=>{var et;const Be=(et=S.relations)==null?void 0:et.map(ze=>({type:ze.type,target:(0,be.of)(ze.targetRef)})).filter(ze=>(!U||ze.type.toLocaleLowerCase("en-US")===U)&&(!V||ze.target.kind===V));if(!Be)return[];const we=Object.values((0,Ye.groupBy)(Be,({target:ze})=>`${ze.kind}:${ze.namespace}`.toLocaleLowerCase("en-US"))),Ge=[];for(const ze of we)Ge.push({kind:ze[0].target.kind,namespace:ze[0].target.namespace,nameBatches:(0,Ye.chunk)(ze.map(Bt=>Bt.target.name),At)});return(await Promise.all(Ge.flatMap(ze=>ze.nameBatches.map(Bt=>X.getEntities({filter:{kind:ze.kind,"metadata.namespace":ze.namespace,"metadata.name":Bt}}))))).flatMap(ze=>ze.items)},[S,U,V]);return{entities:he,loading:k,error:Le}}var ot=e(72164);function xt(S){return typeof S=="string"?S:(0,be.eE)(S)}function se(){const S=(0,t.useApi)(h),P=(0,ot.Z)(S.starredEntitie$(),new Set),U=(0,a.useCallback)(X=>P.has(xt(X)),[P]),V=(0,a.useCallback)(X=>S.toggleStarred(xt(X)).then(),[S]);return{starredEntities:P,toggleStarredEntity:V,isStarredEntity:U}}function j(S){return typeof S=="string"?S:(0,be.eE)(S)}function J(S){const P=(0,t.useApi)(h),[U,V]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{const k=P.starredEntitie$().subscribe({next(he){V(he.has(j(S)))}});return()=>{k.unsubscribe()}},[S,P]),{toggleStarredEntity:(0,a.useCallback)(()=>P.toggleStarred(j(S)).then(),[S,P]),isStarredEntity:U}}function Y(){const S=(0,t.useApi)(t.identityApiRef),{loading:P,value:U}=(0,bt.default)(async()=>{const{ownershipEntityRefs:X}=await S.getBackstageIdentity();return X},[]),V=(0,a.useMemo)(()=>{const X=new Set(U!=null?U:[]);return k=>{const he=Ze(k,be.S4).map(be.eE);for(const Le of he)if(X.has(Le))return!0;return!1}},[U]);return(0,a.useMemo)(()=>({loading:P,isOwnedEntity:V}),[P,V])}var F=e(68099);function ue(S){const{entity:P,loading:U,error:V}=Te(),{allowed:X,loading:k,error:he}=(0,F.gI)({permission:S,resourceRef:P?(0,be.eE)(P):void 0});return U||k?{loading:!0,allowed:!1}:V?{loading:!1,allowed:!1,error:V}:{loading:!1,allowed:X,error:he}}const pe=S=>{var he;const{initialFilter:P,hidden:U}=S,{updateFilters:V,queryParameters:{kind:X}}=useEntityList(),[k]=useState((he=[X].flat()[0])!=null?he:P);return useEffect(()=>{V({kind:k?new EntityKindFilter(k):void 0})},[k,V]),U?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var z=e(79692),b=e(5806),ee=e(21324),ae=e(86619),Ce=e(19996),Re=e(25505),Oe=e(38016),Qe=e(88013);const dt=(0,z.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),yt=a.createElement(Re.Z,{fontSize:"small"}),rt=a.createElement(Ce.Z,{fontSize:"small"}),st=()=>{var Fe,Be;const S=dt(),{updateFilters:P,backendEntities:U,filters:V,queryParameters:{lifecycles:X}}=lt(),k=(0,a.useMemo)(()=>[X].flat().filter(Boolean),[X]),[he,Le]=(0,a.useState)(k.length?k:(Be=(Fe=V.lifecycles)==null?void 0:Fe.values)!=null?Be:[]);(0,a.useEffect)(()=>{k.length&&Le(k)},[k]),(0,a.useEffect)(()=>{P({lifecycles:he.length?new Ae(he):void 0})},[he,P]);const Ne=(0,a.useMemo)(()=>[...new Set(U.map(we=>{var Ge;return(Ge=we.spec)==null?void 0:Ge.lifecycle}).filter(Boolean))].sort(),[U]);return Ne.length?a.createElement(A.Z,{pb:1,pt:1},a.createElement(C.Z,{variant:"button"},"Lifecycle"),a.createElement(Qe.ZP,{"aria-label":"Lifecycle",multiple:!0,options:Ne,value:he,onChange:(we,Ge)=>Le(Ge),renderOption:(we,{selected:Ge})=>a.createElement(b.Z,{control:a.createElement(ee.Z,{icon:yt,checkedIcon:rt,checked:Ge}),label:we}),size:"small",popupIcon:a.createElement(Oe.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:we=>a.createElement(ae.Z,{...we,className:S.input,variant:"outlined"})})):null},It=(0,z.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),Ke=a.createElement(Re.Z,{fontSize:"small"}),N=a.createElement(Ce.Z,{fontSize:"small"}),p=()=>{var Fe,Be;const S=It(),{updateFilters:P,backendEntities:U,filters:V,queryParameters:{owners:X}}=lt(),k=(0,a.useMemo)(()=>[X].flat().filter(Boolean),[X]),[he,Le]=(0,a.useState)(k.length?k:(Be=(Fe=V.owners)==null?void 0:Fe.values)!=null?Be:[]);(0,a.useEffect)(()=>{k.length&&Le(k)},[k]),(0,a.useEffect)(()=>{P({owners:he.length?new Ue(he):void 0})},[he,P]);const Ne=(0,a.useMemo)(()=>[...new Set(U.flatMap(we=>Ze(we,be.S4).map(Ge=>$t(Ge,{defaultKind:"group"}))).filter(Boolean))].sort(),[U]);return Ne.length?a.createElement(A.Z,{pb:1,pt:1},a.createElement(C.Z,{variant:"button"},"Owner"),a.createElement(Qe.ZP,{multiple:!0,"aria-label":"Owner",options:Ne,value:he,onChange:(we,Ge)=>Le(Ge),renderOption:(we,{selected:Ge})=>a.createElement(b.Z,{control:a.createElement(ee.Z,{icon:Ke,checkedIcon:N,checked:Ge}),label:we}),size:"small",popupIcon:a.createElement(Oe.Z,{"data-testid":"owner-picker-expand"}),renderInput:we=>a.createElement(ae.Z,{...we,className:S.input,variant:"outlined"})})):null},x=(0,z.Z)(S=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),$=()=>{var k,he;const S=x(),{filters:P,updateFilters:U}=useEntityList(),[V,X]=useState((he=(k=P.text)==null?void 0:k.value)!=null?he:"");return useDebounce(()=>{U({text:V.length?new EntityTextFilter(V):void 0})},250,[V,U]),React.createElement(Toolbar,{className:S.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:S.input,placeholder:"Search",autoComplete:"off",onChange:Le=>X(Le.target.value),value:V,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>X(""),edge:"end",disabled:V.length===0},React.createElement(Clear,null)))})))},G=Object.freeze({createEntityRefColumn(S){const{defaultKind:P}=S;function U(V){var X;return((X=V.metadata)==null?void 0:X.title)||$t(V,{defaultKind:P})}return{title:"Name",highlight:!0,customFilterAndSearch(V,X){return U(X).includes(V)},customSort(V,X){return U(V).localeCompare(U(X))},render:V=>{var X;return a.createElement(le,{entityRef:V,defaultKind:P,title:(X=V.metadata)==null?void 0:X.title})}}},createEntityRelationColumn({title:S,relation:P,defaultKind:U,filter:V}){function X(he){return Ze(he,P,V)}function k(he){return X(he).map(Le=>$t(Le,{defaultKind:U})).join(", ")}return{title:S,customFilterAndSearch(he,Le){return k(Le).includes(he)},customSort(he,Le){return k(he).localeCompare(k(Le))},render:he=>a.createElement(H,{entityRefs:X(he),defaultKind:U})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:be.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:be.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:be.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:S=>a.createElement(ht.OverflowTooltip,{text:S.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),Ie=[G.createEntityRefColumn({defaultKind:"system"}),G.createDomainColumn(),G.createOwnerColumn(),G.createMetadataDescriptionColumn()],Ee=[G.createEntityRefColumn({defaultKind:"component"}),G.createSystemColumn(),G.createOwnerColumn(),G.createSpecTypeColumn(),G.createSpecLifecycleColumn(),G.createMetadataDescriptionColumn()],$e=(0,z.Z)(S=>({empty:{padding:S.spacing(2),display:"flex",justifyContent:"center"}})),qe=S=>{const{entities:P,title:U,emptyContent:V,variant:X="gridItem",columns:k}=S,he=$e(),Le={minWidth:"0",width:"100%"};return X==="gridItem"&&(Le.height="calc(100% - 10px)"),a.createElement(ht.Table,{columns:k,title:U,style:Le,emptyContent:V&&a.createElement("div",{className:he.empty},V),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:P})};qe.columns=G,qe.systemEntityColumns=Ie,qe.componentEntityColumns=Ee;const Rt=(0,z.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),en=a.createElement(Re.Z,{fontSize:"small"}),sn=a.createElement(Ce.Z,{fontSize:"small"}),Wn=()=>{var Fe,Be;const S=Rt(),{updateFilters:P,filters:U,queryParameters:{tags:V}}=lt(),X=(0,t.useApi)(l),{value:k}=(0,bt.default)(async()=>{var Et;const we="metadata.tags",{facets:Ge}=await X.getEntityFacets({facets:[we],filter:(Et=U.kind)==null?void 0:Et.getCatalogFilters()});return Ge[we].map(({value:et})=>et)},[U.kind]),he=(0,a.useMemo)(()=>[V].flat().filter(Boolean),[V]),[Le,Ne]=(0,a.useState)(he.length?he:(Be=(Fe=U.tags)==null?void 0:Fe.values)!=null?Be:[]);return(0,a.useEffect)(()=>{he.length&&Ne(he)},[he]),(0,a.useEffect)(()=>{P({tags:Le.length?new ge(Le):void 0})},[Le,P]),k!=null&&k.length?a.createElement(A.Z,{pb:1,pt:1},a.createElement(C.Z,{variant:"button"},"Tags"),a.createElement(Qe.ZP,{multiple:!0,"aria-label":"Tags",options:k,value:Le,onChange:(we,Ge)=>Ne(Ge),renderOption:(we,{selected:Ge})=>a.createElement(b.Z,{control:a.createElement(ee.Z,{icon:en,checkedIcon:sn,checked:Ge}),label:we}),size:"small",popupIcon:a.createElement(Oe.Z,{"data-testid":"tag-picker-expand"}),renderInput:we=>a.createElement(ae.Z,{...we,className:S.input,variant:"outlined"})})):null};var bn=e(82108),cn=e.n(bn);const Hn=S=>{var Fe;const{hidden:P,initialFilter:U}=S,V=(0,t.useApi)(t.alertApiRef),{error:X,availableTypes:k,selectedTypes:he,setSelectedTypes:Le}=ut();if((0,a.useEffect)(()=>{X&&V.post({message:"Failed to load entity types",severity:"error"}),U&&Le([U])},[X,V,U,Le]),k.length===0||X)return null;const Ne=[{value:"all",label:"All"},...k.map(Be=>({value:Be,label:cn()(Be)}))];return P?null:a.createElement(A.Z,{pb:1,pt:1},a.createElement(ht.Select,{label:"Type",items:Ne,selected:(Fe=Ne.length>1?he[0]:void 0)!=null?Fe:"all",onChange:Be=>Le(Be==="all"?[]:[String(Be)])}))};var hr=e(15459),$r=e(61837),Nr=e(11640),Ur=e(28347);const kt=(0,hr.Z)({root:{color:"#f3ba37"}})(Nr.Z),eo=S=>{const{toggleStarredEntity:P,isStarredEntity:U}=J(S.entity);return a.createElement($r.Z,{"aria-label":"favorite",color:"inherit",...S,onClick:()=>P()},a.createElement(Yt.ZP,{title:U?"Remove from favorites":"Add to favorites"},U?a.createElement(kt,null):a.createElement(Ur.Z,null)))};var gr=e(8629),jn=e(79249),pr=e(38724),Zr=e(99152),Vn=e(6487),yr=e(49429),Ut=e(55999),zr=e(72779),rr=e.n(zr),Wr=e(39412);const Er=Wr.Z;function or(S,P){if(S)return S.toLocaleLowerCase("en-US");if(P)try{return(0,be.of)(P).kind.toLocaleLowerCase("en-US")}catch{return}}function ar(S,P){const U=(0,t.useApp)(),V=or(S,P);return V&&U.getSystemIcon(`kind:${V}`)||Er}function Gn(S){const{kind:P,entityRef:U,...V}=S,X=ar(P,U);return a.createElement(X,{...V})}const Kn=(0,z.Z)(S=>({node:{fill:S.palette.grey[300],stroke:S.palette.grey[300],"&.primary":{fill:S.palette.primary.light,stroke:S.palette.primary.light},"&.secondary":{fill:S.palette.secondary.light,stroke:S.palette.secondary.light}},text:{fill:S.palette.getContrastText(S.palette.grey[300]),"&.primary":{fill:S.palette.primary.contrastText},"&.secondary":{fill:S.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function vr(S){const P=(0,t.useApi)(l),U=(0,be.eE)(S),{loading:V,error:X,value:k}=(0,bt.default)(async()=>{const he=await P.getEntityAncestors({entityRef:U}),Le=new Array,Ne=new Array;for(const Fe of he.items){const Be=(0,be.eE)(Fe.entity),we=Be===he.rootEntityRef;Le.push({id:Be,root:we,...Fe.entity});for(const Ge of Fe.parentEntityRefs)Ne.push({from:Be,to:Ge})}return{nodes:Le,edges:Ne}},[U]);return{loading:V,error:X,nodes:(k==null?void 0:k.nodes)||[],edges:(k==null?void 0:k.edges)||[]}}function Ar({node:S}){const P=Kn(),U=(0,ye.s0)(),V=(0,t.useRouteRef)(Wt),[X,k]=(0,a.useState)(0),[he,Le]=(0,a.useState)(0),Ne=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{if(Ne.current){let{height:Bt,width:jt}=Ne.current.getBBox();Bt=Math.round(Bt),jt=Math.round(jt),(Bt!==he||jt!==X)&&(k(jt),Le(Bt))}},[X,he]);const Fe=10,Be=he,we=Be+Fe,Ge=we+X+Fe*2,Et=he+Fe*2,et=S.metadata.title||(S.kind&&S.metadata.name&&S.metadata.namespace?$t({kind:S.kind,name:S.metadata.name,namespace:S.metadata.namespace||""}):S.id),ze=()=>{U(V({kind:S.kind,namespace:S.metadata.namespace||be.zG,name:S.metadata.name}))};return a.createElement("g",{onClick:ze,className:P.clickable},a.createElement("rect",{className:rr()(P.node,S.root?"secondary":"primary"),width:Ge,height:Et,rx:10}),a.createElement(Gn,{kind:S.kind,y:Fe,x:Fe,width:Be,height:Be,className:rr()(P.text,S.root?"secondary":"primary")}),a.createElement("text",{ref:Ne,className:rr()(P.text,S.root?"secondary":"primary"),y:Et/2,x:we+(X+Fe*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},et))}function Rr(S){const{loading:P,error:U,nodes:V,edges:X}=vr(S.entity);return P?a.createElement(ht.Progress,null):U?a.createElement(ht.ResponseErrorPanel,{error:U}):a.createElement(a.Fragment,null,a.createElement(Ut.Z,{variant:"h2"},"Ancestry"),a.createElement(Ut.Z,{gutterBottom:!0},"This is the ancestry of entities above the current one - as in, the chain(s) of entities down to the current one, where"," ",a.createElement(ht.Link,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity"},"processors emitted")," ","child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations."),a.createElement(A.Z,{mt:4},a.createElement(ht.DependencyGraph,{nodes:V,edges:X,renderNode:Ar,direction:ht.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var On=e(11776),ln=e(38402),wn=e(86136),$n=e(99688),Sr=e(49378),Cr=e(54506),Yn=e(94339),to=e(24579),Tr=e(27685);const Jn=(0,z.Z)(S=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:S.spacing(2)},helpIcon:{marginLeft:S.spacing(1),color:S.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function pn(S){const P=Jn();return a.createElement(Sr.Z,{...S,primaryTypographyProps:{className:P.monospace},secondaryTypographyProps:{className:P.monospace}})}function kn(S){const P=Jn();return a.createElement(Cr.Z,{className:P.monospace},S.children)}function Nn(S){return a.createElement(A.Z,{mt:2},a.createElement(Yn.Z,{variant:"outlined"},a.createElement(to.Z,null,a.createElement(C.Z,{variant:"h6",gutterBottom:!0},S.title,S.helpLink&&a.createElement(sr,{to:S.helpLink})),S.children)))}function ir(S){const[P,U]=S.entry;return a.createElement(ln.Z,null,S.indent&&a.createElement(wn.Z,null),a.createElement(pn,{primary:P,secondary:U.match(/^url:https?:\/\//)?a.createElement(a.Fragment,null,U.substring(0,4),a.createElement(ht.Link,{to:U.substring(4)},U.substring(4))):U}))}function sr(S){const P=Jn();return a.createElement(ht.Link,{to:S.to,className:P.helpIcon},a.createElement(Tr.Z,{fontSize:"inherit"}))}const br=(0,z.Z)({root:{display:"flex",flexDirection:"column"}});function yn(S){var Ne,Fe;const P=(0,t.useApi)(l),U=(0,be.eE)(S),V=(Ne=S.metadata.annotations)==null?void 0:Ne[be.P1],X=(Fe=S.metadata.annotations)==null?void 0:Fe[be.q1],{loading:k,error:he,value:Le}=(0,bt.default)(async()=>!V&&!X?[]:(await P.getEntities({filter:[...V?[{[`metadata.annotations.${be.P1}`]:V}]:[],...X?[{[`metadata.annotations.${be.q1}`]:X}]:[]]})).items,[V,X]);return{loading:k,error:he,location:V,originLocation:X,colocatedEntities:Le==null?void 0:Le.filter(Be=>(0,be.eE)(Be)!==U)}}function Qn(S){return a.createElement(On.Z,{dense:!0},S.header&&a.createElement(ir,{key:"header",entry:S.header}),S.entities.map(P=>a.createElement(ln.Z,{key:(0,be.eE)(P)},a.createElement(wn.Z,null,a.createElement(Gn,{kind:P.kind})),a.createElement(pn,{primary:a.createElement(le,{entityRef:P})}))))}function Pr(S){const{entity:P}=S,{loading:U,error:V,location:X,originLocation:k,colocatedEntities:he}=yn(P);if(U)return a.createElement(ht.Progress,null);if(V)return a.createElement(ht.ResponseErrorPanel,{error:V});if(!X&&!k)return a.createElement($n.Z,{severity:"warning"},"Entity had no location information.");if(!(he!=null&&he.length))return a.createElement($n.Z,{severity:"info"},"There were no other entities on this location.");if(X===k)return a.createElement(Qn,{entities:he});const Le=he.filter(Fe=>{var Be;return((Be=Fe.metadata.annotations)==null?void 0:Be[be.P1])===X}),Ne=he.filter(Fe=>{var Be;return((Be=Fe.metadata.annotations)==null?void 0:Be[be.q1])===k});return a.createElement(a.Fragment,null,Le.length>0&&a.createElement(Qn,{entities:Le,header:["At the same location",X]}),Ne.length>0&&a.createElement(Qn,{entities:Ne,header:["At the same origin",k]}))}function Ir(S){const P=br();return a.createElement(a.Fragment,null,a.createElement(Ut.Z,{variant:"h2"},"Colocated"),a.createElement(Ut.Z,null,"These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL)."),a.createElement("div",{className:P.root},a.createElement(Pr,{entity:S.entity})))}function Xn(S){return Object.fromEntries([...Object.entries(S)].sort((P,U)=>P[0]<U[0]?-1:1))}function Lr(S){return a.createElement(a.Fragment,null,a.createElement(Ut.Z,{variant:"h2"},"Entity as JSON"),a.createElement(Ut.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),a.createElement(Ut.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(ht.CodeSnippet,{text:JSON.stringify(Xn(S.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var cr=e(3440),Or=e.n(cr);const lr=(0,z.Z)({root:{display:"flex",flexDirection:"column"}});function Qt(S){var Fe,Be;const P=lr(),{apiVersion:U,kind:V,metadata:X,spec:k,relations:he=[],status:Le={}}=S.entity,Ne=Or()(wt()(he,we=>we.targetRef),"type");return a.createElement(a.Fragment,null,a.createElement(Ut.Z,{variant:"h2"},"Overview"),a.createElement("div",{className:P.root},a.createElement(Nn,{title:"Identity"},a.createElement(On.Z,{dense:!0},a.createElement(ln.Z,null,a.createElement(pn,{primary:"apiVersion",secondary:U})),a.createElement(ln.Z,null,a.createElement(pn,{primary:"kind",secondary:V})),(k==null?void 0:k.type)&&a.createElement(ln.Z,null,a.createElement(pn,{primary:"spec.type",secondary:k.type})),X.uid&&a.createElement(ln.Z,null,a.createElement(pn,{primary:"uid",secondary:X.uid})),X.etag&&a.createElement(ln.Z,null,a.createElement(pn,{primary:"etag",secondary:X.etag})))),a.createElement(Nn,{title:"Metadata"},!!Object.keys(X.annotations||{}).length&&a.createElement(On.Z,{dense:!0,subheader:a.createElement(kn,null,"Annotations",a.createElement(sr,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(X.annotations).map(we=>a.createElement(ir,{key:we[0],indent:!0,entry:we}))),!!Object.keys(X.labels||{}).length&&a.createElement(On.Z,{dense:!0,subheader:a.createElement(kn,null,"Labels")},Object.entries(X.labels).map(we=>a.createElement(ir,{key:we[0],indent:!0,entry:we}))),!!((Fe=X.tags)!=null&&Fe.length)&&a.createElement(On.Z,{dense:!0,subheader:a.createElement(kn,null,"Tags")},X.tags.map((we,Ge)=>a.createElement(ln.Z,{key:`${we}-${Ge}`},a.createElement(wn.Z,null),a.createElement(pn,{primary:we}))))),!!he.length&&a.createElement(Nn,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Ne).map(([we,Ge],Et)=>a.createElement("div",{key:Et},a.createElement(On.Z,{dense:!0,subheader:a.createElement(kn,null,we)},Ge.map(et=>a.createElement(ln.Z,{key:et.targetRef},a.createElement(wn.Z,null,a.createElement(Gn,{entityRef:et.targetRef})),a.createElement(pn,{primary:a.createElement(le,{entityRef:et.targetRef})}))))))),!!((Be=Le.items)!=null&&Be.length)&&a.createElement(Nn,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},Le.items.map((we,Ge)=>a.createElement("div",{key:Ge},a.createElement(C.Z,null,we.level,": ",we.type),a.createElement(A.Z,{ml:2},we.message))))))}var En=e(60155),Z=e.n(En);function re(S){return a.createElement(a.Fragment,null,a.createElement(Ut.Z,{variant:"h2"},"Entity as YAML"),a.createElement(Ut.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),a.createElement(Ut.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(ht.CodeSnippet,{text:Z().stringify(Xn(S.entity)),language:"yaml",showCopyCodeButton:!0}))))}const me=(0,z.Z)(S=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:S.palette.background.paper},tabs:{borderRight:`1px solid ${S.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function Me(S){const{children:P,value:U,index:V,...X}=S,k=me();return a.createElement("div",{role:"tabpanel",hidden:U!==V,id:`vertical-tabpanel-${V}`,"aria-labelledby":`vertical-tab-${V}`,className:k.tabContents,...X},U===V&&a.createElement(A.Z,{pl:3,pr:3},P))}function _e(S){return{id:`vertical-tab-${S}`,"aria-controls":`vertical-tabpanel-${S}`}}function pt(S){const P=me(),[U,V]=a.useState(0);return(0,a.useEffect)(()=>{V(0)},[S.open]),S.entity?a.createElement(gr.Z,{fullWidth:!0,maxWidth:"xl",open:S.open,onClose:S.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:P.fullHeightDialog}},a.createElement(jn.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),a.createElement(pr.Z,{dividers:!0},a.createElement("div",{className:P.root},a.createElement(Zr.Z,{orientation:"vertical",variant:"scrollable",value:U,onChange:(X,k)=>V(k),"aria-label":"Inspector options",className:P.tabs},a.createElement(Vn.Z,{label:"Overview",..._e(0)}),a.createElement(Vn.Z,{label:"Ancestry",..._e(1)}),a.createElement(Vn.Z,{label:"Colocated",..._e(2)}),a.createElement(Vn.Z,{label:"Raw JSON",..._e(3)}),a.createElement(Vn.Z,{label:"Raw YAML",..._e(4)})),a.createElement(Me,{value:U,index:0},a.createElement(Qt,{entity:S.entity})),a.createElement(Me,{value:U,index:1},a.createElement(Rr,{entity:S.entity})),a.createElement(Me,{value:U,index:2},a.createElement(Ir,{entity:S.entity})),a.createElement(Me,{value:U,index:3},a.createElement(Lr,{entity:S.entity})),a.createElement(Me,{value:U,index:4},a.createElement(re,{entity:S.entity})))),a.createElement(yr.Z,null,a.createElement(y.Z,{onClick:S.onClose,color:"primary"},"Close"))):null}var mt=e(85256);function ct(S){var Et;const P=(0,t.useApi)(l),U=(Et=S.metadata.annotations)==null?void 0:Et[be.q1],V=S.metadata.uid,X=U==="bootstrap:bootstrap",k=(0,bt.default)(async()=>{const et=P.getLocationByRef(U);let ze;if(!U)ze=Promise.resolve([]);else{const Bt=`metadata.annotations.${be.q1}`;ze=P.getEntities({filter:{[Bt]:U},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(jt=>jt.items)}return Promise.all([et,ze]).then(([Bt,jt])=>({location:Bt,colocatedEntities:jt}))},[P,S]),he=(0,a.useCallback)(async function(){const{location:ze}=k.value;await P.removeLocationById(ze.id)},[P,k]),Le=(0,a.useCallback)(async function(){await P.removeEntityByUid(V)},[P,V]);if(X)return{type:"bootstrap",location:U,deleteEntity:Le};const{loading:Ne,error:Fe,value:Be}=k;if(Ne)return{type:"loading"};if(Fe)return{type:"error",error:Fe};const{location:we,colocatedEntities:Ge}=Be;return we?{type:"unregister",location:U,colocatedEntities:Ge.map(be.iB),unregisterLocation:he,deleteEntity:Le}:{type:"only-delete",deleteEntity:Le}}var ft=e(10179);const Lt=(0,z.Z)({advancedButton:{fontSize:"0.7em"}}),Mt=({entity:S,onConfirm:P})=>{var Et;const U=(0,t.useApi)(t.alertApiRef),V=(0,t.useApi)(t.configApiRef),X=Lt(),k=ct(S),[he,Le]=(0,a.useState)(!1),[Ne,Fe]=(0,a.useState)(!1),Be=(Et=V.getOptionalString("app.title"))!=null?Et:"Backstage",we=(0,a.useCallback)(async function(){if("unregisterLocation"in k){Fe(!0);try{await k.unregisterLocation(),P()}catch(ze){(0,ft.BD)(ze),U.post({message:ze.message})}finally{Fe(!1)}}},[U,P,k]),Ge=(0,a.useCallback)(async function(){if("deleteEntity"in k){Fe(!0);try{await k.deleteEntity(),P()}catch(ze){(0,ft.BD)(ze),U.post({message:ze.message})}finally{Fe(!1)}}},[U,P,k]);return k.type==="loading"?a.createElement(ht.Progress,null):k.type==="error"?a.createElement(ht.ResponseErrorPanel,{error:k.error}):k.type==="bootstrap"?a.createElement(a.Fragment,null,a.createElement($n.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',k.location,'"). If you believe this is in error, please contact the ',Be," ","integrator."),a.createElement(A.Z,{marginTop:2},!he&&a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:X.advancedButton,onClick:()=>Le(!0)},"Advanced Options"),he&&a.createElement(a.Fragment,null,a.createElement(Ut.Z,null,"You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."),a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:Ge},"Delete Entity")))):k.type==="only-delete"?a.createElement(a.Fragment,null,a.createElement(Ut.Z,null,"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog."),a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:Ge},"Delete Entity")):k.type==="unregister"?a.createElement(a.Fragment,null,a.createElement(Ut.Z,null,"This action will unregister the following entities:"),a.createElement(Ut.Z,{component:"ul"},k.colocatedEntities.map(et=>a.createElement("li",{key:`${et.kind}:${et.namespace}/${et.name}`},a.createElement(le,{entityRef:et})))),a.createElement(Ut.Z,null,"Located at the following location:"),a.createElement(Ut.Z,{component:"ul"},a.createElement("li",null,k.location)),a.createElement(Ut.Z,null,"To undo, just re-register the entity in ",Be,"."),a.createElement(A.Z,{marginTop:2},a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:we},"Unregister Location"),!he&&a.createElement(A.Z,{component:"span",marginLeft:2},a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:X.advancedButton,onClick:()=>Le(!0)},"Advanced Options"))),he&&a.createElement(a.Fragment,null,a.createElement(A.Z,{paddingTop:4,paddingBottom:4},a.createElement(mt.Z,null)),a.createElement(Ut.Z,null,"You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."),a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:Ge},"Delete Entity"))):a.createElement($n.Z,{severity:"error"},"Internal error: Unknown state")},rn=S=>{const{open:P,onConfirm:U,onClose:V,entity:X}=S;return a.createElement(gr.Z,{open:P,onClose:V},a.createElement(jn.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),a.createElement(pr.Z,null,a.createElement(Mt,{entity:X,onConfirm:U})),a.createElement(yr.Z,null,a.createElement(y.Z,{onClick:V,color:"primary"},"Cancel")))};var tn=e(12231),qn=e(9520),vn=e(47603);const _n=(0,z.Z)(S=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:S.spacing(1,0,1,0)},title:{margin:S.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:S.palette.text.primary},menuItem:{minHeight:S.spacing(6)},groupWrapper:{margin:S.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Hr(S){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:vn.Z},{id:"starred",label:"Starred",icon:Nr.Z}]},{name:S!=null?S:"Company",items:[{id:"all",label:"All"}]}]}const Un=S=>{var Fn;const{initialFilter:P,availableFilters:U}=S,V=_n(),k=(Fn=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?Fn:"Company",{filters:he,updateFilters:Le,backendEntities:Ne,queryParameters:{kind:Fe,user:Be},loading:we}=lt(),Ge=["starred","all"],Et=Hr(k).map(dn=>({...dn,items:dn.items.filter(({id:fn})=>["group","user"].some(Dr=>Dr===Fe)?Ge.includes(fn):!U||U.includes(fn))})).filter(({items:dn})=>!!dn.length),{isStarredEntity:et}=se(),{isOwnedEntity:ze,loading:Bt}=Y(),jt=we||Bt,Dn=(0,a.useMemo)(()=>new Ve("owned",ze,et),[ze,et]),un=(0,a.useMemo)(()=>new Ve("starred",ze,et),[ze,et]),Xt=(0,a.useMemo)(()=>[Be].flat()[0],[Be]),[on,An]=(0,a.useState)(Xt!=null?Xt:P),ur=(0,a.useMemo)(()=>Ne.filter(tt((0,Ye.compact)(Object.values({...he,user:void 0})))),[he,Ne]),xr=(0,a.useMemo)(()=>({all:ur.length,starred:ur.filter(dn=>un.filterEntity(dn)).length,owned:ur.filter(dn=>Dn.filterEntity(dn)).length}),[ur,un,Dn]);return(0,a.useEffect)(()=>{Xt&&An(Xt)},[Xt]),(0,a.useEffect)(()=>{!jt&&!!on&&on!=="all"&&xr[on]===0&&An("all")},[jt,xr,on,An]),(0,a.useEffect)(()=>{Le({user:on?new Ve(on,ze,et):void 0})},[on,ze,et,Le]),a.createElement(Yn.Z,{className:V.root},Et.map(dn=>a.createElement(a.Fragment,{key:dn.name},a.createElement(C.Z,{variant:"subtitle2",className:V.title},dn.name),a.createElement(Yn.Z,{className:V.groupWrapper},a.createElement(On.Z,{disablePadding:!0,dense:!0},dn.items.map(fn=>{var Dr,no;return a.createElement(tn.Z,{key:fn.id,button:!0,divider:!0,onClick:()=>An(fn.id),selected:fn.id===((Dr=he.user)==null?void 0:Dr.value),className:V.menuItem,disabled:xr[fn.id]===0,"data-testid":`user-picker-${fn.id}`},fn.icon&&a.createElement(wn.Z,{className:V.listIcon},a.createElement(fn.icon,{fontSize:"small"})),a.createElement(Sr.Z,null,a.createElement(C.Z,{variant:"body1"},fn.label)),a.createElement(qn.Z,null,(no=xr[fn.id])!=null?no:"-"))}))))))},jr=({children:S,value:P})=>{var Le;const[U,V]=useState((Le=P==null?void 0:P.filters)!=null?Le:{}),X=useCallback(Ne=>{V(Fe=>{const Be=typeof Ne=="function"?Ne(Fe):Ne;return{...Fe,...Be}})},[]),k=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),he=useMemo(()=>{var Ne,Fe,Be,we,Ge;return{entities:(Ne=P==null?void 0:P.entities)!=null?Ne:k.entities,backendEntities:(Fe=P==null?void 0:P.backendEntities)!=null?Fe:k.backendEntities,updateFilters:(Be=P==null?void 0:P.updateFilters)!=null?Be:X,filters:U,loading:(we=P==null?void 0:P.loading)!=null?we:!1,queryParameters:(Ge=P==null?void 0:P.queryParameters)!=null?Ge:k.queryParameters,error:P==null?void 0:P.error}},[P,k,U,X]);return React.createElement(EntityListContext.Provider,{value:he},S)}},39398:function(_,i,e){"use strict";e.r(i),e.d(i,{AboutCard:function(){return Ye},AboutContent:function(){return ne},AboutField:function(){return B}});var r=e(48023),t=e(9118),l=e(36964),h=e(36356),v=e(53479),m=e(79692),a=e(94339),s=e(32552),f=e(61837),y=e(85256),u=e(24579),A=e(52866),C=e(30254),R=e(27604),L=e(2784),oe=e(47851),M=e(60905),T=e(90436),D=e(7089);const O=(0,m.Z)(We=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:We.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function B(We){const{label:fe,value:ye,gridSizes:xe,children:He}=We,ke=O(),nt=(0,l.useElementFilter)(He,be=>be.getElements()),tt=nt.length>0?nt:L.createElement(T.Z,{variant:"body2",className:ke.value},ye||"unknown");return L.createElement(M.Z,{item:!0,...xe},L.createElement(T.Z,{variant:"subtitle2",className:ke.label},fe),tt)}const Q=(0,m.Z)({description:{wordBreak:"break-word"}});function ne(We){var lt,bt,Ft,Pt,Nt,wt;const{entity:fe}=We,ye=Q(),xe=fe.kind.toLocaleLowerCase("en-US")==="system",He=fe.kind.toLocaleLowerCase("en-US")==="resource",ke=fe.kind.toLocaleLowerCase("en-US")==="component",nt=fe.kind.toLocaleLowerCase("en-US")==="api",tt=fe.kind.toLocaleLowerCase("en-US")==="template",be=fe.kind.toLocaleLowerCase("en-US")==="location",Ze=fe.kind.toLocaleLowerCase("en-US")==="group",je=(0,v.getEntityRelations)(fe,r.cz,{kind:"system"}),Je=(0,v.getEntityRelations)(fe,r.cz,{kind:"component"}),vt=(0,v.getEntityRelations)(fe,r.cz,{kind:"domain"}),Dt=(0,v.getEntityRelations)(fe,r.S4);return L.createElement(M.Z,{container:!0},L.createElement(B,{label:"Description",gridSizes:{xs:12}},L.createElement(T.Z,{variant:"body2",paragraph:!0,className:ye.description},((lt=fe==null?void 0:fe.metadata)==null?void 0:lt.description)||"No description")),L.createElement(B,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},Dt.length>0&&L.createElement(v.EntityRefLinks,{entityRefs:Dt,defaultKind:"group"})),(xe||vt.length>0)&&L.createElement(B,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},vt.length>0&&L.createElement(v.EntityRefLinks,{entityRefs:vt,defaultKind:"domain"})),(nt||ke||He||je.length>0)&&L.createElement(B,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},je.length>0&&L.createElement(v.EntityRefLinks,{entityRefs:je,defaultKind:"system"})),ke&&Je.length>0&&L.createElement(B,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},L.createElement(v.EntityRefLinks,{entityRefs:Je,defaultKind:"component"})),(nt||ke||He||tt||Ze||be||typeof((bt=fe==null?void 0:fe.spec)==null?void 0:bt.type)=="string")&&L.createElement(B,{label:"Type",value:(Ft=fe==null?void 0:fe.spec)==null?void 0:Ft.type,gridSizes:{xs:12,sm:6,lg:4}}),(nt||ke||typeof((Pt=fe==null?void 0:fe.spec)==null?void 0:Pt.lifecycle)=="string")&&L.createElement(B,{label:"Lifecycle",value:(Nt=fe==null?void 0:fe.spec)==null?void 0:Nt.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),L.createElement(B,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((wt=fe==null?void 0:fe.metadata)==null?void 0:wt.tags)||[]).map(Wt=>L.createElement(D.Z,{key:Wt,size:"small",label:Wt}))))}const Te=(0,m.Z)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function Ye(We){var Pt,Nt,wt;const{variant:fe}=We,ye=Te(),{entity:xe}=(0,v.useEntity)(),He=(0,l.useApi)(h.q3),ke=(0,l.useApi)(v.catalogApiRef),nt=(0,l.useApi)(l.alertApiRef),tt=(0,l.useRouteRef)(oe.jU),be=(0,v.getEntitySourceLocation)(xe,He),Ze=(Pt=xe.metadata.annotations)==null?void 0:Pt[r.Tf],je={label:"View Source",disabled:!be,icon:L.createElement(h.nW,{type:be==null?void 0:be.integrationType}),href:be==null?void 0:be.locationTargetUrl},Je={label:"View TechDocs",disabled:!((Nt=xe.metadata.annotations)!=null&&Nt["backstage.io/techdocs-ref"])||!tt,icon:L.createElement(C.Z,null),href:tt&&tt({namespace:xe.metadata.namespace||r.zG,kind:xe.kind,name:xe.metadata.name})};let vt="";fe==="gridItem"?vt=ye.gridItemCard:fe==="fullHeight"&&(vt=ye.fullHeightCard);let Dt="";fe==="gridItem"?Dt=ye.gridItemCardContent:fe==="fullHeight"&&(Dt=ye.fullHeightCardContent);const lt=(wt=xe.metadata.annotations)==null?void 0:wt[r.P1],bt=(lt==null?void 0:lt.startsWith("url:"))||(lt==null?void 0:lt.startsWith("file:")),Ft=(0,L.useCallback)(async()=>{await ke.refreshEntity((0,r.eE)(xe)),nt.post({message:"Refresh scheduled",severity:"info"})},[ke,nt,xe]);return L.createElement(a.Z,{className:vt},L.createElement(s.Z,{title:"About",action:L.createElement(L.Fragment,null,bt&&L.createElement(f.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Ft},L.createElement(A.Z,null)),L.createElement(f.Z,{component:t.Link,"aria-label":"Edit",disabled:!Ze,title:"Edit Metadata",to:Ze!=null?Ze:"#"},L.createElement(R.Z,null))),subheader:L.createElement(t.HeaderIconLinkRow,{links:[je,Je]})}),L.createElement(y.Z,null),L.createElement(u.Z,{className:Dt},L.createElement(ne,{entity:xe})))}},49782:function(_,i,e){"use strict";e.d(i,{K:function(){return A}});var r=e(2784),t=e(79692),l=e(12420),h=e(97580),v=e(73698),m=e(74603),a=e(12231),s=e(53479),f=e(64279),y=e(36964);const u=(0,t.Z)(C=>(0,l.Z)({root:{...C.typography.h4}}));function A(C){var We;const{initialFilter:R="component",allowedKinds:L}=C,oe=u(),M=(0,y.useApi)(s.catalogApiRef),{value:T}=(0,f.default)(async()=>await M.getEntityFacets({facets:["kind"]}).then(fe=>{var ye;return((ye=fe.facets.kind)==null?void 0:ye.map(xe=>xe.value).sort())||[]})),{updateFilters:D,queryParameters:{kind:O}}=(0,s.useEntityList)(),B=(0,r.useMemo)(()=>{var fe;return(fe=[O].flat()[0])==null?void 0:fe.toLocaleLowerCase("en-US")},[O]),[Q,ne]=(0,r.useState)(B!=null?B:R);(0,r.useEffect)(()=>{D({kind:Q?new s.EntityKindFilter(Q):void 0})},[Q,D]),(0,r.useEffect)(()=>{B&&ne(B)},[B]);const Ye=[(0,h.Z)(Q)].concat((We=T==null?void 0:T.filter(fe=>L?L.some(ye=>ye.toLocaleLowerCase("en-US")===fe.toLocaleLowerCase("en-US")):!0))!=null?We:[]).sort().reduce((fe,ye)=>(fe[ye.toLocaleLowerCase("en-US")]=ye,fe),{});return r.createElement(v.Z,{input:r.createElement(m.Z,{value:Q}),value:Q,onChange:fe=>ne(fe.target.value),classes:oe},Object.keys(Ye).map(fe=>r.createElement(a.Z,{value:fe,key:fe},`${Ye[fe]}s`)))}},30097:function(_,i,e){"use strict";e.d(i,{E:function(){return R}});var r=e(48023),t=e(53479),l=e(27604),h=e(2997),v=e(76635),m=e(2784),a=e(7089),s=e(9118);const f=Object.freeze({createNameColumn(L){function oe(M){var T;return((T=M.metadata)==null?void 0:T.title)||(0,t.humanizeEntityRef)(M,{defaultKind:L==null?void 0:L.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:M},{entity:T}){return oe(M).localeCompare(oe(T))},render:({entity:M})=>{var T;return m.createElement(t.EntityRefLink,{entityRef:M,defaultKind:(L==null?void 0:L.defaultKind)||"Component",title:(T=M.metadata)==null?void 0:T.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:L})=>m.createElement(t.EntityRefLinks,{entityRefs:L.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:L})=>m.createElement(t.EntityRefLinks,{entityRefs:L.ownedByRelations,defaultKind:"group"})}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:L})=>m.createElement(s.OverflowTooltip,{text:L.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:L})=>m.createElement(m.Fragment,null,L.metadata.tags&&L.metadata.tags.map(oe=>m.createElement(a.Z,{key:oe,label:oe,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}});var y=e(28347),u=e(15459),A=e(11640);const C=(0,u.Z)({root:{color:"#f3ba37"}})(A.Z),R=L=>{var nt,tt,be;const{columns:oe,actions:M,tableOptions:T}=L,{isStarredEntity:D,toggleStarredEntity:O}=(0,t.useStarredEntities)(),{loading:B,error:Q,entities:ne,filters:Te}=(0,t.useEntityList)(),Ye=(0,m.useMemo)(()=>{var je;return[f.createNameColumn({defaultKind:(je=Te.kind)==null?void 0:je.value}),...Ze(),f.createMetadataDescriptionColumn(),f.createTagsColumn()];function Ze(){var Je;switch((Je=Te.kind)==null?void 0:Je.value){case"user":return[];case"domain":case"system":return[f.createOwnerColumn()];case"group":case"location":case"template":return[f.createSpecTypeColumn()];default:return[f.createSystemColumn(),f.createOwnerColumn(),f.createSpecTypeColumn(),f.createSpecLifecycleColumn()]}}},[(nt=Te.kind)==null?void 0:nt.value]),We=Te.type===void 0,fe=(0,v.capitalize)((be=(tt=Te.user)==null?void 0:tt.value)!=null?be:"all");if(Q)return m.createElement("div",null,m.createElement(s.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},m.createElement(s.CodeSnippet,{language:"text",text:Q.toString()})));const ye=[({entity:Ze})=>{var Je;const je=(Je=Ze.metadata.annotations)==null?void 0:Je[r.l2];return{icon:()=>m.createElement(h.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!je,onClick:()=>{!je||window.open(je,"_blank")}}},({entity:Ze})=>{var Je;const je=(Je=Ze.metadata.annotations)==null?void 0:Je[r.Tf];return{icon:()=>m.createElement(l.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!je,onClick:()=>{!je||window.open(je,"_blank")}}},({entity:Ze})=>{const je=D(Ze);return{cellStyle:{paddingLeft:"1em"},icon:()=>je?m.createElement(C,null):m.createElement(y.Z,null),tooltip:je?"Remove from favorites":"Add to favorites",onClick:()=>O(Ze)}}],xe=ne.map(Ze=>{const je=(0,t.getEntityRelations)(Ze,r.cz,{kind:"system"}),Je=(0,t.getEntityRelations)(Ze,r.S4);return{entity:Ze,resolved:{name:(0,t.humanizeEntityRef)(Ze,{defaultKind:"Component"}),ownedByRelationsTitle:Je.map(vt=>(0,t.humanizeEntityRef)(vt,{defaultKind:"group"})).join(", "),ownedByRelations:Je,partOfSystemRelationTitle:je.map(vt=>(0,t.humanizeEntityRef)(vt,{defaultKind:"system"})).join(", "),partOfSystemRelations:je}}}),He=(oe||Ye).find(Ze=>Ze.title==="Type");He&&(He.hidden=!We);const ke=xe.length>20;return m.createElement(s.Table,{isLoading:B,columns:oe||Ye,options:{paging:ke,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!B,padding:"dense",pageSizeOptions:[20,50,100],...T},title:`${fe} (${ne.length})`,data:xe,actions:M||ye})};R.columns=f},47851:function(_,i,e){"use strict";e.d(i,{_Z:function(){return h},jU:function(){return l},yw:function(){return t}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),l=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),h=(0,r.createRouteRef)({id:"catalog"})},40749:function(_,i,e){"use strict";e.d(i,{rG:function(){return r},Y2:function(){return D},J$:function(){return f},g2:function(){return l}});var r;(function(O){const B="DENY";O.DENY=B;const Q="ALLOW";O.ALLOW=Q;const ne="CONDITIONAL";O.CONDITIONAL=ne})(r||(r={}));function t(O,B){return O.name===B.name}function l(O,B){return"resourceType"in O?!B||O.resourceType===B:!1}function h(O){return O.attributes.action==="create"}function v(O){return O.attributes.action==="read"}function m(O){return O.attributes.action==="update"}function a(O){return O.attributes.action==="delete"}function s(O){return{authorize:async(B,Q)=>await O.authorize(B,Q),authorizeConditional(B,Q){const ne=B;return O.authorize(ne,Q)}}}function f({name:O,attributes:B,resourceType:Q}){return Q?{type:"resource",name:O,attributes:B,resourceType:Q}:{type:"basic",name:O,attributes:B}}var y=e(10179),u=e(96279),A=e.n(u),C=e(9571),R=e(30195);const L=R.z.lazy(()=>R.z.object({rule:R.z.string(),resourceType:R.z.string(),params:R.z.array(R.z.unknown())}).or(R.z.object({anyOf:R.z.array(L).nonempty()})).or(R.z.object({allOf:R.z.array(L).nonempty()})).or(R.z.object({not:L}))),oe=R.z.object({result:R.z.literal(r.ALLOW).or(R.z.literal(r.DENY))}),M=R.z.union([R.z.object({result:R.z.literal(r.ALLOW).or(R.z.literal(r.DENY))}),R.z.object({result:R.z.literal(r.CONDITIONAL),pluginId:R.z.string(),resourceType:R.z.string(),conditions:L})]),T=(O,B)=>R.z.object({items:R.z.array(R.z.intersection(R.z.object({id:R.z.string()}),O)).refine(Q=>Q.length===B.size&&Q.every(({id:ne})=>B.has(ne)),{message:"Items in response do not match request"})});class D{constructor(B){q(this,"enabled");q(this,"discovery");var Q;this.discovery=B.discovery,this.enabled=(Q=B.config.getOptionalBoolean("permission.enabled"))!=null?Q:!1}async authorize(B,Q){return this.makeRequest(B,oe,Q)}async authorizeConditional(B,Q){return this.makeRequest(B,M,Q)}async makeRequest(B,Q,ne){if(!this.enabled)return B.map(He=>({result:r.ALLOW}));const Te={items:B.map(He=>({id:C.Z(),...He}))},Ye=await this.discovery.getBaseUrl("permission"),We=await A()(`${Ye}/authorize`,{method:"POST",body:JSON.stringify(Te),headers:{...this.getAuthorizationHeader(ne==null?void 0:ne.token),"content-type":"application/json"}});if(!We.ok)throw await y.VL.fromResponse(We);const fe=await We.json(),xe=T(Q,new Set(Te.items.map(({id:He})=>He))).parse(fe).items.reduce((He,ke)=>(He[ke.id]=ke,He),{});return Te.items.map(He=>xe[He.id])}getAuthorizationHeader(B){return B?{Authorization:`Bearer ${B}`}:{}}}},68099:function(_,i,e){"use strict";e.d(i,{iM:function(){return v},RV:function(){return l},gI:function(){return a}});var r=e(2784),t=e(36964);const l=(0,t.createApiRef)({id:"plugin.permission.api"});var h=e(40749);class v{constructor(y,u){this.permissionClient=y,this.identityApi=u}static create(y){const{config:u,discovery:A,identity:C}=y,R=new h.Y2({discovery:A,config:u});return new v(R,C)}async authorize(y){return(await this.permissionClient.authorize([y],await this.identityApi.getCredentials()))[0]}}var m=e(49857);function a(f){const y=(0,t.useApi)(l),{data:u,error:A}=(0,m.ZP)(f,async C=>{if((0,h.g2)(C.permission)&&!C.resourceRef)return h.rG.DENY;const{result:R}=await y.authorize(C);return R});return A?{error:A,loading:!1,allowed:!1}:u===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:u===h.rG.ALLOW}}const s=f=>{const{permission:y,resourceRef:u,errorComponent:A,...C}=f,R=usePermission(isResourcePermission(y)?{permission:y,resourceRef:u}:{permission:y}),L=useApp(),{NotFoundErrorPage:oe}=L.getComponents();let M=A===void 0?React.createElement(oe,null):A;return R.loading?M=null:R.allowed&&(M=f.element),React.createElement(Route,{...C,element:M})}},47955:function(_,i,e){"use strict";e.d(i,{Zz:function(){return v},oZ:function(){return fe},DR:function(){return m},ZS:function(){return O},KY:function(){return s},$L:function(){return A},x1:function(){return B}});var r=e(2784),t=e(10289),l=e(36964);const h="techdocs.addons.addon.v1",v="techdocs.addons.wrapper.v1",m=()=>null;(0,l.attachComponentData)(m,v,!0);const a=ye=>`${h}.${ye.toLocaleLowerCase("en-US")}`;function s(ye){const{name:xe,component:He}=ye;return(0,l.createReactExtension)({name:xe,component:{sync:ke=>r.createElement(He,{...ke})},data:{[h]:ye,[a(xe)]:!0}})}const f=(ye,xe)=>ye.selectByComponentData({key:xe}).getElements()[0],y=ye=>ye.selectByComponentData({key:v}).selectByComponentData({key:h}),u=ye=>ye.selectByComponentData({key:v}).findComponentData({key:h}),A=()=>{const ye=(0,t.pC)(),xe=(0,l.useElementFilter)(ye,y),He=(0,l.useElementFilter)(ye,u),ke=(0,r.useCallback)(be=>{var je;if(!xe||!be)return null;const Ze=a(be.name);return(je=f(xe,Ze))!=null?je:null},[xe]),nt=(0,r.useCallback)(be=>{const Ze=He.find(je=>je.name===be);return Ze?ke(Ze):null},[He,ke]),tt=(0,r.useCallback)(be=>{const Ze=He.filter(je=>je.location===be);return Ze.length?Ze.map(ke):null},[He,ke]);return{renderComponentByName:nt,renderComponentsByLocation:tt}},C=(0,l.createApiRef)({id:"plugin.techdocs.service"});var R=e(64279),L=e(48023),oe=e(76241);const M=(ye,xe)=>(0,L.eE)(ye)===(0,L.eE)(xe),T={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},D=(0,oe.CT)("techdocs-reader-page-context"),O=(0,r.memo)(({entityRef:ye,children:xe})=>{const He=(0,l.useApi)(C),ke=(0,R.default)(async()=>He.getTechDocsMetadata(ye),[ye]),nt=(0,R.default)(async()=>He.getEntityMetadata(ye),[ye]),[tt,be]=(0,r.useState)(T.title),[Ze,je]=(0,r.useState)(T.subtitle),[Je,vt]=(0,r.useState)(T.shadowRoot),Dt={metadata:ke,entityRef:ye,entityMetadata:nt,shadowRoot:Je,setShadowRoot:vt,title:tt,setTitle:be,subtitle:Ze,setSubtitle:je},lt=(0,oe.EI)({1:Dt});return r.createElement(D.Provider,{value:lt},xe instanceof Function?xe(Dt):xe)},(ye,xe)=>M(ye.entityRef,xe.entityRef)),B=()=>{const ye=(0,r.useContext)(D);if(ye===void 0)return T;const xe=ye.atVersion(1);if(xe===void 0)throw new Error("No context found for version 1.");return xe};var Q=e(54073);const ne=()=>{const{shadowRoot:ye}=useTechDocsReaderPage();return ye},Te=ye=>{const xe=ne();return xe?ye.map(He=>xe==null?void 0:xe.querySelectorAll(He)).filter(He=>He.length).map(He=>Array.from(He)).flat():[]},Ye=ye=>ye.toString()&&ye.rangeCount&&ye.getRangeAt(0).getBoundingClientRect().top,We=(ye=0)=>{const xe=ne(),[He,ke]=useState(null),nt=useMemo(()=>debounce(()=>{const tt=xe,be=tt.getSelection?tt.getSelection():document.getSelection();be&&Ye(be)?ke(be):ke(null)},ye),[xe,ke,ye]);return useEffect(()=>(window.document.addEventListener("selectionchange",nt),()=>window.document.removeEventListener("selectionchange",nt)),[nt]),He},fe=Object.freeze({Header:"Header",Subheader:"Subheader",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},94067:function(_,i,e){"use strict";e.r(i),e.d(i,{EmbeddedDocsRouter:function(){return oe},Router:function(){return L},isTechDocsAvailable:function(){return R}});var r=e(2784),t=e(10289),l=e(49208),h=e(53479),v=e(9118),m=e(48023),a=e(20961),s=e(16172),f=e(28626);const y=({entity:M})=>{const T=(0,m.iB)(M);return r.createElement(a.I6,{entityRef:T},r.createElement(s.b,null),r.createElement(f.Fq,{withSearch:!1}))};var u=e(50021),A=e(26220);const C="backstage.io/techdocs-ref",R=M=>{var T,D;return Boolean((D=(T=M==null?void 0:M.metadata)==null?void 0:T.annotations)==null?void 0:D[C])},L=()=>r.createElement(t.Z5,null,r.createElement(t.AW,{path:"/",element:r.createElement(u.TechDocsIndexPage,null)}),r.createElement(t.AW,{path:"/:namespace/:kind/:name/*",element:r.createElement(A.TechDocsReaderPage,null)})),oe=M=>{var B;const{children:T}=M,{entity:D}=(0,h.useEntity)();return((B=D.metadata.annotations)==null?void 0:B[C])?r.createElement(l.FlatRoutes,null,r.createElement(t.AW,{path:"/*",element:r.createElement(y,{entity:D})},T)):r.createElement(v.MissingAnnotationEmptyState,{annotation:C})}},3337:function(_,i,e){"use strict";e.d(i,{D:function(){return t},g:function(){return l}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),l=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(_,i,e){"use strict";e.d(i,{k:function(){return v},p:function(){return h}});var r=e(10179),t=e(76372),l=e.n(t);class h{constructor(a){q(this,"configApi");q(this,"discoveryApi");q(this,"fetchApi");this.configApi=a.configApi,this.discoveryApi=a.discoveryApi,this.fetchApi=a.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(a){const{kind:s,namespace:f,name:y}=a,A=`${await this.getApiOrigin()}/metadata/techdocs/${f}/${s}/${y}`,C=await this.fetchApi.fetch(`${A}`);if(!C.ok)throw await r.VL.fromResponse(C);return await C.json()}async getEntityMetadata(a){const{kind:s,namespace:f,name:y}=a,A=`${await this.getApiOrigin()}/metadata/entity/${f}/${s}/${y}`,C=await this.fetchApi.fetch(`${A}`);if(!C.ok)throw await r.VL.fromResponse(C);return await C.json()}}class v{constructor(a){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");q(this,"fetchApi");this.configApi=a.configApi,this.discoveryApi=a.discoveryApi,this.identityApi=a.identityApi,this.fetchApi=a.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var a;return(a=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?a:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(a,s){const{kind:f,namespace:y,name:u}=a,C=`${await this.getStorageUrl()}/${y}/${f}/${u}/${s}`,R=await this.fetchApi.fetch(`${C.endsWith("/")?C:`${C}/`}index.html`);let L="";switch(R.status){case 404:throw L="Page not found. ",s||(L+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(L);case 500:throw L="Could not generate documentation or an error in the TechDocs backend. ",new Error(L);default:break}return R.text()}async syncEntityDocs(a,s=()=>{}){const{kind:f,namespace:y,name:u}=a,C=`${await this.getApiOrigin()}/sync/${y}/${f}/${u}`,{token:R}=await this.identityApi.getCredentials();return new Promise((L,oe)=>{const M=new t.EventSourcePolyfill(C,{withCredentials:!0,headers:R?{Authorization:`Bearer ${R}`}:{}});M.addEventListener("log",T=>{T.data&&s(JSON.parse(T.data))}),M.addEventListener("finish",T=>{let D=!1;T.data&&({updated:D}=JSON.parse(T.data)),L(D?"updated":"cached")}),M.onerror=T=>{switch(M.close(),T.status){case 404:oe(new r.dR(T.message));return;default:oe(new Error(T.data));return}}})}async getBaseUrl(a,s,f){const{kind:y,namespace:u,name:A}=s,R=`${await this.getApiOrigin()}/static/docs/${u}/${y}/${A}/${f}`;return new URL(a,R.endsWith("/")?R:`${R}/`).toString()}}},97589:function(_,i,e){"use strict";e.d(i,{D:function(){return r}});function r(t,l){return l.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(_,i,e){"use strict";e.d(i,{u:function(){return a}});var r=e(2784),t=e(9118),l=e(53479),h=e(1114),v=e(70335),m=e(21956);const a=s=>{const{initialFilter:f="all",columns:y,actions:u}=s;return r.createElement(h.j,null,r.createElement(t.Content,null,r.createElement(t.ContentHeader,{title:""},r.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),r.createElement(l.EntityListProvider,null,r.createElement(l.CatalogFilterLayout,null,r.createElement(l.CatalogFilterLayout.Filters,null,r.createElement(v.f,null),r.createElement(l.UserListPicker,{initialFilter:f}),r.createElement(l.EntityOwnerPicker,null),r.createElement(l.EntityTagPicker,null)),r.createElement(l.CatalogFilterLayout.Content,null,r.createElement(m.EntityListDocsTable,{actions:u,columns:y}))))))}},51016:function(_,i,e){"use strict";e.d(i,{f:function(){return y}});var r=e(68725),t=e(97589),l=e(36964),h=e(9118),v=e(94339),m=e(16111),a=e(24579),s=e(14503),f=e(2784);const y=C=>{const{entities:R}=C,L=(0,l.useRouteRef)(r.Fw),oe=(0,l.useApi)(l.configApiRef);return R?f.createElement(h.ItemCardGrid,{"data-testid":"docs-explore"},R!=null&&R.length?R.map((M,T)=>{var D,O;return f.createElement(v.Z,{key:T},f.createElement(m.Z,null,f.createElement(h.ItemCardHeader,{title:(D=M.metadata.title)!=null?D:M.metadata.name})),f.createElement(a.Z,null,M.metadata.description),f.createElement(s.Z,null,f.createElement(h.Button,{to:L({namespace:(0,t.D)((O=M.metadata.namespace)!=null?O:"default",oe),kind:(0,t.D)(M.kind,oe),name:(0,t.D)(M.metadata.name,oe)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var u=e(53479);const A=()=>{const{loading:C,error:R,entities:L}=useEntityList();return R?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:R.toString()})):C||!L?React.createElement(Progress,null):(L.sort((oe,M)=>{var T,D;return((T=oe.metadata.title)!=null?T:oe.metadata.name).localeCompare((D=M.metadata.title)!=null?D:M.metadata.name)}),React.createElement(DocsCardGrid,{entities:L}))}},81290:function(_,i,e){"use strict";e.d(i,{H:function(){return u}});var r=e(2784),t=e(95074),l=e(36964),h=e(48023),v=e(53479),m=e(68725),a=e(9118),s=e(98095),f=e(3792),y=e(97589);const u=A=>{const{entities:C,title:R,loading:L,columns:oe,actions:M}=A,[,T]=(0,t.Z)(),D=(0,l.useRouteRef)(m.Fw),O=(0,l.useApi)(l.configApiRef);if(!C)return null;const B=C.map(Te=>{var We;const Ye=(0,v.getEntityRelations)(Te,h.S4);return{entity:Te,resolved:{docsUrl:D({namespace:(0,y.D)((We=Te.metadata.namespace)!=null?We:"default",O),kind:(0,y.D)(Te.kind,O),name:(0,y.D)(Te.metadata.name,O)}),ownedByRelations:Ye,ownedByRelationsTitle:Ye.map(fe=>(0,v.humanizeEntityRef)(fe,{defaultKind:"group"})).join(", ")}}}),Q=[f.N.createNameColumn(),f.N.createOwnerColumn(),f.N.createTypeColumn()],ne=[s.n.createCopyDocsUrlAction(T)];return r.createElement(r.Fragment,null,L||B&&B.length>0?r.createElement(a.Table,{isLoading:L,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:B,columns:oe||Q,actions:M||ne,title:R?`${R} (${B.length})`:`All (${B.length})`}):r.createElement(a.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:r.createElement(a.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))};u.columns=f.N,u.actions=s.n},12481:function(_,i,e){"use strict";e.d(i,{n:function(){return y}});var r=e(2784),t=e(95074),l=e(76635),h=e.n(l),v=e(9118),m=e(53479),a=e(81290),s=e(98095),f=e(3792);const y=u=>{var ne,Te;const{columns:A,actions:C}=u,{loading:R,error:L,entities:oe,filters:M}=(0,m.useEntityList)(),{isStarredEntity:T,toggleStarredEntity:D}=(0,m.useStarredEntities)(),[,O]=(0,t.Z)(),B=(0,l.capitalize)((Te=(ne=M.user)==null?void 0:ne.value)!=null?Te:"all"),Q=[s.n.createCopyDocsUrlAction(O),s.n.createStarEntityAction(T,D)];return L?r.createElement(v.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(v.CodeSnippet,{language:"text",text:L.toString()})):r.createElement(a.H,{title:B,entities:oe,loading:R,actions:C||Q,columns:A})};y.columns=f.N,y.actions=s.n},98095:function(_,i,e){"use strict";e.d(i,{n:function(){return a}});var r=e(2784),t=e(39981),l=e(2337),h=e(11640),v=e(28347);const m=(0,l.Z)({root:{color:"#f3ba37"}})(h.Z),a={createCopyDocsUrlAction(s){return f=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>s(`${window.location.origin}${f.resolved.docsUrl}`)})},createStarEntityAction(s,f){return({entity:y})=>{const u=s(y);return{cellStyle:{paddingLeft:"1em"},icon:()=>u?r.createElement(m,null):r.createElement(v.Z,null),tooltip:u?"Remove from favorites":"Add to favorites",onClick:()=>f(y)}}}}},3792:function(_,i,e){"use strict";e.d(i,{N:function(){return v}});var r=e(2784),t=e(9118),l=e(53479);function h(m){return m.metadata.title||m.metadata.name}const v={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:m=>r.createElement(t.SubvalueCell,{value:r.createElement(t.Link,{to:m.resolved.docsUrl},h(m.entity)),subvalue:m.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:m})=>r.createElement(l.EntityRefLinks,{entityRefs:m.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},21956:function(_,i,e){"use strict";e.d(i,{DocsTable:function(){return t.H},EntityListDocsTable:function(){return r.n}});var r=e(12481),t=e(81290),l=e(72580),h=e.n(l);e.o(l,"DefaultTechDocsHome")&&e.d(i,{DefaultTechDocsHome:function(){return l.DefaultTechDocsHome}})},72580:function(){},50021:function(_,i,e){"use strict";e.r(i),e.d(i,{TechDocsIndexPage:function(){return h}});var r=e(2784),t=e(10289),l=e(2546);const h=()=>(0,t.pC)()||r.createElement(l.u,null)},1114:function(_,i,e){"use strict";e.d(i,{j:function(){return h}});var r=e(2784),t=e(9118),l=e(36964);const h=v=>{var f;const{children:m}=v,s=`Documentation available in ${(f=(0,l.useApi)(l.configApiRef).getOptionalString("organization.name"))!=null?f:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:s,themeId:"documentation"},m)}},70335:function(_,i,e){"use strict";e.d(i,{f:function(){return h}});var r=e(2784),t=e(53479);class l{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const h=()=>{const{updateFilters:v}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{v({techdocs:new l})},[v]),null}},19192:function(_,i,e){"use strict";e.d(i,{DefaultTechDocsHome:function(){return l.u}});var r=e(51016),t=e(21956),l=e(2546),h=e(1114),v=e(70335)},82250:function(_,i,e){"use strict";e.d(i,{DefaultTechDocsHome:function(){return a.DefaultTechDocsHome},TechDocsIndexPage:function(){return s.Jl},TechDocsReaderPage:function(){return s.I6},TechDocsReaderPageContent:function(){return v.Fq},TechDocsReaderPageHeader:function(){return v.SE},plugin:function(){return s.s4},techdocsApiRef:function(){return l.g},techdocsPlugin:function(){return s.s4},techdocsStorageApiRef:function(){return l.D}});var r=e(98157),t=e.n(r);e.o(r,"DefaultTechDocsHome")&&e.d(i,{DefaultTechDocsHome:function(){return r.DefaultTechDocsHome}}),e.o(r,"TechDocsReaderPageContent")&&e.d(i,{TechDocsReaderPageContent:function(){return r.TechDocsReaderPageContent}}),e.o(r,"TechDocsReaderPageHeader")&&e.d(i,{TechDocsReaderPageHeader:function(){return r.TechDocsReaderPageHeader}}),e.o(r,"techdocsApiRef")&&e.d(i,{techdocsApiRef:function(){return r.techdocsApiRef}}),e.o(r,"techdocsStorageApiRef")&&e.d(i,{techdocsStorageApiRef:function(){return r.techdocsStorageApiRef}});var l=e(3337),h=e(42723),v=e(96393),m=e(10459),a=e(19192),s=e(20961),f=e(94067)},20961:function(_,i,e){"use strict";e.d(i,{I6:function(){return y},Jl:function(){return f},s4:function(){return v}});var r=e(3337),t=e(42723),l=e(68725),h=e(36964);const v=(0,h.createPlugin)({id:"techdocs",apis:[(0,h.createApiFactory)({api:r.D,deps:{configApi:h.configApiRef,discoveryApi:h.discoveryApiRef,identityApi:h.identityApiRef,fetchApi:h.fetchApiRef},factory:({configApi:u,discoveryApi:A,identityApi:C,fetchApi:R})=>new t.k({configApi:u,discoveryApi:A,identityApi:C,fetchApi:R})}),(0,h.createApiFactory)({api:r.g,deps:{configApi:h.configApiRef,discoveryApi:h.discoveryApiRef,fetchApi:h.fetchApiRef},factory:({configApi:u,discoveryApi:A,fetchApi:C})=>new t.p({configApi:u,discoveryApi:A,fetchApi:C})})],routes:{root:l._Z,docRoot:l.Fw,entityContent:l.pd}}),m=v.provide((0,h.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(u=>u.Router),mountPoint:l._Z})),a=v.provide((0,h.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(u=>u.EmbeddedDocsRouter),mountPoint:l.pd})),s=v.provide((0,h.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(u=>u.TechDocsCustomHome),mountPoint:l._Z})),f=v.provide((0,h.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(u=>u.TechDocsIndexPage),mountPoint:l._Z})),y=v.provide((0,h.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,26220)).then(u=>u.TechDocsReaderPage),mountPoint:l.Fw}))},26220:function(_,i,e){"use strict";e.r(i),e.d(i,{TechDocsReaderLayout:function(){return s},TechDocsReaderPage:function(){return f}});var r=e(2784),t=e(10289),l=e(9118),h=e(47955),v=e(28626),m=e(99954),a=e(16172);const s=({withSearch:y,withHeader:u=!0})=>r.createElement(l.Page,{themeId:"documentation"},u&&r.createElement(m.S,null),r.createElement(a.b,null),r.createElement(v.Fq,{withSearch:y})),f=y=>{const{kind:u,name:A,namespace:C}=(0,t.UO)(),{children:R,entityRef:L={kind:u,name:A,namespace:C}}=y,oe=(0,t.pC)();if(!R){const T=(oe?r.Children.toArray(oe.props.children):[]).find(D=>{var B,Q;const{type:O}=D;return!((Q=(B=O==null?void 0:O.__backstage_data)==null?void 0:B.map)!=null&&Q.get(h.Zz))});return r.createElement(h.ZS,{entityRef:L},T||r.createElement(s,null))}return r.createElement(h.ZS,{entityRef:L},({metadata:M,entityMetadata:T,onReady:D})=>r.createElement(l.Page,{themeId:"documentation"},R instanceof Function?R({entityRef:L,techdocsMetadataValue:M.value,entityMetadataValue:T.value,onReady:D}):R))}},28626:function(_,i,e){"use strict";e.d(i,{Fq:function(){return se},DK:function(){return Te}});var r=e(2784),t=e(36617),l=e(79692),h=e(60905),v=e(8560),m=e(50236),a=e(19219),s=e(47955),f=e(9118),y=e(10459),u=e(23738),A=e(10289),C=e(60364),R=e(41128),L=e(36964),oe=e(36356),M=e(3337),T=e(64279),D=e(77446);function O({contentLoading:J,content:Y,activeSyncState:F}){return J||F==="BUILD_READY_RELOAD"||!Y&&F==="CHECKING"?"CHECKING":!Y&&F==="BUILDING"?"INITIAL_BUILD":Y?F==="BUILDING"?"CONTENT_STALE_REFRESHING":F==="BUILD_READY"?"CONTENT_STALE_READY":F==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function B(J,Y){const F={...J};switch(Y.type){case"sync":Y.state==="CHECKING"&&(F.buildLog=[]),F.activeSyncState=Y.state,F.syncError=Y.syncError;break;case"contentLoading":F.contentLoading=!0,F.contentError=void 0;break;case"content":typeof Y.path=="string"&&(F.path=Y.path),F.contentLoading=!1,F.content=Y.content,F.contentError=Y.contentError;break;case"buildLog":F.buildLog=F.buildLog.concat(Y.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(F.activeSyncState)&&["contentLoading","content"].includes(Y.type)&&(F.activeSyncState="UP_TO_DATE",F.buildLog=[]),F}function Q(J,Y,F,ue){var Re,Oe;const[pe,z]=(0,r.useReducer)(B,{activeSyncState:"CHECKING",path:ue,contentLoading:!0,buildLog:[]}),b=(0,L.useApi)(M.D),{retry:ee}=(0,D.Z)(async()=>{z({type:"contentLoading"});try{const Qe=await b.getEntityDocs({kind:J,namespace:Y,name:F},ue);return z({type:"content",content:Qe,path:ue}),Qe}catch(Qe){z({type:"content",contentError:Qe,path:ue})}},[b,J,Y,F,ue]),ae=(0,r.useRef)({content:void 0,reload:()=>{}});return ae.current={content:pe.content,reload:ee},(0,T.default)(async()=>{z({type:"sync",state:"CHECKING"});const Qe=setTimeout(()=>{z({type:"sync",state:"BUILDING"})},1e3);try{switch(await b.syncEntityDocs({kind:J,namespace:Y,name:F},yt=>{z({type:"buildLog",log:yt})})){case"updated":ae.current.content?z({type:"sync",state:"BUILD_READY"}):(ae.current.reload(),z({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":z({type:"sync",state:"UP_TO_DATE"});break;default:z({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(dt){z({type:"sync",state:"ERROR",syncError:dt})}finally{clearTimeout(Qe)}},[J,F,Y,b,z,ae]),{state:(0,r.useMemo)(()=>O({activeSyncState:pe.activeSyncState,contentLoading:pe.contentLoading,content:pe.content}),[pe.activeSyncState,pe.content,pe.contentLoading]),contentReload:ee,path:pe.path,content:pe.content,contentErrorMessage:(Re=pe.contentError)==null?void 0:Re.toString(),syncErrorMessage:(Oe=pe.syncError)==null?void 0:Oe.toString(),buildLog:pe.buildLog}}const ne=(0,r.createContext)({}),Te=()=>(0,r.useContext)(ne),Ye=({children:J})=>{const{"*":Y=""}=(0,A.UO)(),{entityRef:F}=(0,s.x1)(),{kind:ue,namespace:pe,name:z}=F,b=Q(ue,pe,z,Y);return r.createElement(ne.Provider,{value:b},J instanceof Function?J(b):J)},We=J=>Y=>r.createElement(Ye,null,r.createElement(J,{...Y})),fe=(J,Y,F)=>{const ue=J==="src"&&Y.endsWith(".svg"),pe=!Y.match(/^([a-z]*:)?\/\//i),z=Y.startsWith(F);return ue&&(pe||z)},ye=({techdocsStorageApi:J,entityId:Y,path:F})=>async ue=>{const pe=await J.getApiOrigin(),z=async(b,ee)=>{for(const ae of b)if(ae.hasAttribute(ee)){const Ce=ae.getAttribute(ee);if(!Ce)return;const Re=await J.getBaseUrl(Ce,Y,F);if(fe(ee,Ce,pe))try{const Qe=await(await fetch(Re,{credentials:"include"})).text();ae.setAttribute(ee,`data:image/svg+xml;base64,${btoa(Qe)}`)}catch{ae.setAttribute("alt",`Error: ${Ce}`)}else ae.setAttribute(ee,Re)}};return await Promise.all([z(ue.querySelectorAll("img"),"src"),z(ue.querySelectorAll("script"),"src"),z(ue.querySelectorAll("source"),"src"),z(ue.querySelectorAll("link"),"href"),z(ue.querySelectorAll("a[download]"),"href")]),ue};var xe=e(86574),He=e(67097),ke=e(47093),nt=e(82717),tt=e.n(nt);const be=J=>Y=>{const F=Y.querySelector('[title="Edit this page"]');if(!F||!F.href)return Y;const ue=new URL(F.href),pe=J.byUrl(ue);if((pe==null?void 0:pe.type)!=="github"&&(pe==null?void 0:pe.type)!=="gitlab")return Y;const z=Y.querySelector("article>h1").childNodes[0].textContent,b=encodeURIComponent(`Documentation Feedback: ${z}`),ee=encodeURIComponent(`Page source:
32
+ ${F.href}
33
+
34
+ Feedback:`),ae=(pe==null?void 0:pe.type)==="github"?(0,xe.Pb)(ue.href,"blob"):ue.href,Ce=tt()(ae),Re=`/${Ce.organization}/${Ce.name}`,Oe=F.cloneNode();switch(pe==null?void 0:pe.type){case"gitlab":Oe.href=`${ue.origin}${Re}/issues/new?issue[title]=${b}&issue[description]=${ee}`;break;case"github":Oe.href=`${ue.origin}${Re}/issues/new?title=${b}&body=${ee}`;break;default:return Y}return ke.render(r.createElement(He.Z),Oe),Oe.style.paddingLeft="5px",Oe.title="Leave feedback for this page",Oe.id="git-feedback-link",F==null||F.insertAdjacentElement("beforebegin",Oe),Y};var Ze=e(44882);const je=()=>J=>{const Y=J.querySelector('.md-header label[for="__drawer"]'),F=J.querySelector("article");if(!Y||!F)return J;const ue=Y.cloneNode();return ke.render(r.createElement(Ze.Z),ue),ue.id="toggle-sidebar",ue.title="Toggle Sidebar",ue.classList.add("md-content__button"),ue.style.setProperty("padding","0 0 0 5px"),ue.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),F==null||F.prepend(ue),J},Je=()=>J=>(((F,ue)=>{Array.from(F).filter(pe=>pe.hasAttribute(ue)).forEach(pe=>{const z=pe.getAttribute(ue);if(z){z.match(/^https?:\/\//i)&&pe.setAttribute("target","_blank");try{const b=vt(window.location.href);pe.setAttribute(ue,new URL(z,b).toString())}catch{pe.replaceWith(pe.textContent||z)}}})})(Array.from(J.getElementsByTagName("a")),"href"),J);function vt(J){const Y=new URL(J);return!Y.pathname.endsWith("/")&&!Y.pathname.endsWith(".html")&&(Y.pathname+="/"),Y.toString()}const Dt=({baseUrl:J,onClick:Y})=>F=>(Array.from(F.getElementsByTagName("a")).forEach(ue=>{ue.addEventListener("click",pe=>{const b=ue.getAttribute("href");!b||b.startsWith(J)&&!ue.hasAttribute("download")&&(pe.preventDefault(),Y(pe,b))})}),F);var lt=e(15459),bt=e(80030),Ft=e(72379),Pt=e(41547);const Nt=(0,lt.Z)(J=>({tooltip:{fontSize:"inherit",color:J.palette.text.primary,margin:0,padding:J.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(bt.ZP),wt=()=>r.createElement(Ft.Z,null,r.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})),Wt=({text:J})=>{const[Y,F]=(0,r.useState)(!1),ue=(0,r.useCallback)(()=>{navigator.clipboard.writeText(J),F(!0)},[J]),pe=(0,r.useCallback)(()=>{F(!1)},[F]);return r.createElement(Nt,{title:"Copied to clipboard",placement:"left",open:Y,onClose:pe,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:ue},r.createElement(wt,null)))},nn=J=>Y=>{var ue;const F=Y.querySelectorAll("pre > code");for(const pe of F){const z=pe.textContent||"",b=document.createElement("div");(ue=pe==null?void 0:pe.parentElement)==null||ue.prepend(b),ke.render(r.createElement(Pt.Z,{theme:J},r.createElement(Wt,{text:z})),b)}return Y},$t=()=>J=>{var Y;return(Y=J.querySelector(".md-header"))==null||Y.remove(),J},ht=()=>J=>{var Y,F;return(Y=J.querySelector(".md-footer .md-copyright"))==null||Y.remove(),(F=J.querySelector(".md-footer-copyright"))==null||F.remove(),J},Yt=({docStorageUrl:J,onLoading:Y,onLoaded:F})=>ue=>{const pe=Array.from(ue.querySelectorAll('head > link[rel="stylesheet"]')).filter(b=>{var ee;return(ee=b.getAttribute("href"))==null?void 0:ee.startsWith(J)});let z=pe.length;return z>0&&Y(ue),pe.forEach(b=>b.addEventListener("load",()=>{z-=1,z===0&&F(ue)})),ue};var le=e(35368),H=e.n(le);const ce=/main\.[A-Fa-f0-9]{8}\.min\.css$/,de=/^https:\/\/fonts\.googleapis\.com/,ge=/^https:\/\/fonts\.gstatic\.com/,De=J=>{if(J.nodeName&&J.nodeName==="LINK"){const Y=J.getAttribute("href")||"";Y.match(ce)&&J.setAttribute("rel","stylesheet"),Y.match(de)&&J.setAttribute("rel","stylesheet"),Y.match(ge)&&J.setAttribute("rel","preconnect")}return J},Ue=J=>Y=>{if(Y.nodeName==="IFRAME"){const F=Y.getAttribute("src");if(!F)return Y.remove(),Y;try{const ue=new URL(F);J.some(z=>ue.host===z)||Y.remove()}catch(ue){console.warn(`Invalid iframe src, ${ue}`),Y.remove()}}return Y},Ae=J=>{const Y=(J==null?void 0:J.getOptionalStringArray("allowedIframeHosts"))||[];return F=>{H().addHook("afterSanitizeAttributes",De);const ue=["link"];return Y.length>0&&(H().addHook("beforeSanitizeElements",Ue(Y)),ue.push("iframe")),H().sanitize(F.innerHTML,{ADD_TAGS:ue,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},Ve=({css:J})=>Y=>(Y.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${J}</style>`),Y),ut=()=>J=>(setTimeout(()=>{var Y;if(window.location.hash){const F=window.location.hash.slice(1);(Y=J==null?void 0:J.querySelector(`[id="${F}"]`))==null||Y.scrollIntoView()}},200),J),At=async(J,Y)=>{let F;if(typeof J=="string")F=new DOMParser().parseFromString(J,"text/html").documentElement;else if(J instanceof Element)F=J;else throw new Error("dom is not a recognized type");for(const ue of Y)F=await ue(F);return F},gt=["h1","h2","h3","h4","h5","h6"],ot=J=>{const Y=(0,A.s0)(),F=(0,C.Z)(),ue=(0,L.useApi)(M.D),pe=(0,L.useApi)(oe.q3),z=(0,L.useApi)(L.configApiRef),{namespace:b,kind:ee,name:ae}=J,{state:Ce,path:Re,content:Oe}=Te(),Qe=F.palette.type==="dark",[dt,yt]=(0,r.useState)(),[rt,st]=(0,r.useState)(null),{isPinned:It}=(0,r.useContext)(f.SidebarPinStateContext),Ke=(0,r.useCallback)(()=>{if(!rt||!dt)return;const $=rt.querySelector(".md-container > .md-tabs"),G=window.matchMedia("screen and (max-width: 76.1875em)").matches,Ie=Math.max(rt.getBoundingClientRect().top,0);dt.forEach(Ee=>{G?Ee.style.top="0px":$?Ee.style.top=`${Ie+$.getBoundingClientRect().height}px`:Ee.style.top=`${Ie}px`})},[rt,dt]);(0,r.useEffect)(()=>(Ke(),window.addEventListener("scroll",Ke,!0),window.addEventListener("resize",Ke),()=>{window.removeEventListener("scroll",Ke,!0),window.removeEventListener("resize",Ke)}),[Ke,Ce]);const N=(0,r.useCallback)(()=>{if(!rt)return;const $=rt.querySelector(".md-footer");$&&($.style.width=`${rt.getBoundingClientRect().width}px`)},[rt]);(0,r.useEffect)(()=>(N(),window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}));const p=(0,r.useCallback)(($,G)=>At($,[Ae(z.getOptionalConfig("techdocs.sanitizer")),ye({techdocsStorageApi:ue,entityId:{kind:ee,name:ae,namespace:b},path:G}),Je(),je(),$t(),ht(),be(pe),Ve({css:`
35
+ /*
36
+ As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.
37
+ As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
38
+ */
39
+ :host {
40
+ /* FONT */
41
+ --md-default-fg-color: ${F.palette.text.primary};
42
+ --md-default-fg-color--light: ${F.palette.text.secondary};
43
+ --md-default-fg-color--lighter: ${(0,R.$n)(F.palette.text.secondary,.7)};
44
+ --md-default-fg-color--lightest: ${(0,R.$n)(F.palette.text.secondary,.3)};
45
+
46
+ /* BACKGROUND */
47
+ --md-default-bg-color:${F.palette.background.default};
48
+ --md-default-bg-color--light: ${F.palette.background.paper};
49
+ --md-default-bg-color--lighter: ${(0,R.$n)(F.palette.background.paper,.7)};
50
+ --md-default-bg-color--lightest: ${(0,R.$n)(F.palette.background.paper,.3)};
51
+
52
+ /* PRIMARY */
53
+ --md-primary-fg-color: ${F.palette.primary.main};
54
+ --md-primary-fg-color--light: ${F.palette.primary.light};
55
+ --md-primary-fg-color--dark: ${F.palette.primary.dark};
56
+ --md-primary-bg-color: ${F.palette.primary.contrastText};
57
+ --md-primary-bg-color--light: ${(0,R.$n)(F.palette.primary.contrastText,.7)};
58
+
59
+ /* ACCENT */
60
+ --md-accent-fg-color: var(--md-primary-fg-color);
61
+
62
+ /* SHADOW */
63
+ --md-shadow-z1: ${F.shadows[1]};
64
+ --md-shadow-z2: ${F.shadows[2]};
65
+ --md-shadow-z3: ${F.shadows[3]};
66
+
67
+ /* EXTENSIONS */
68
+ --md-admonition-fg-color: var(--md-default-fg-color);
69
+ --md-admonition-bg-color: var(--md-default-bg-color);
70
+ /* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
71
+ --md-admonition-icon--note: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>');
72
+ --md-admonition-icon--abstract: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 5h16v2H4V5m0 4h16v2H4V9m0 4h16v2H4v-2m0 4h10v2H4v-2z"/></svg>');
73
+ --md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10A10 10 0 0012 2z"/></svg>');
74
+ --md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.55 11.2c-.23-.3-.5-.56-.76-.82-.65-.6-1.4-1.03-2.03-1.66C13.3 7.26 13 4.85 13.91 3c-.91.23-1.75.75-2.45 1.32-2.54 2.08-3.54 5.75-2.34 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.22.1-.46.04-.64-.12a.83.83 0 01-.15-.17c-1.1-1.43-1.28-3.48-.53-5.12C5.89 10 5 12.3 5.14 14.47c.04.5.1 1 .27 1.5.14.6.4 1.2.72 1.73 1.04 1.73 2.87 2.97 4.84 3.22 2.1.27 4.35-.12 5.96-1.6 1.8-1.66 2.45-4.32 1.5-6.6l-.13-.26c-.2-.46-.47-.87-.8-1.25l.05-.01m-3.1 6.3c-.28.24-.73.5-1.08.6-1.1.4-2.2-.16-2.87-.82 1.19-.28 1.89-1.16 2.09-2.05.17-.8-.14-1.46-.27-2.23-.12-.74-.1-1.37.18-2.06.17.38.37.76.6 1.06.76 1 1.95 1.44 2.2 2.8.04.14.06.28.06.43.03.82-.32 1.72-.92 2.27h.01z"/></svg>');
75
+ --md-admonition-icon--success: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
76
+ --md-admonition-icon--question: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.07 11.25l-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 00-2-2 2 2 0 00-2 2H8a4 4 0 014-4 4 4 0 014 4 3.2 3.2 0 01-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10c0-5.53-4.5-10-10-10z"/></svg>');
77
+ --md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z"/></svg>');
78
+ --md-admonition-icon--failure: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12 6.47 2 12 2m3.59 5L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41 15.59 7z"/></svg>');
79
+ --md-admonition-icon--danger: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.5 20l4.86-9.73H13V4l-5 9.73h3.5V20M12 2c2.75 0 5.1 1 7.05 2.95C21 6.9 22 9.25 22 12s-1 5.1-2.95 7.05C17.1 21 14.75 22 12 22s-5.1-1-7.05-2.95C3 17.1 2 14.75 2 12s1-5.1 2.95-7.05C6.9 3 9.25 2 12 2z"/></svg>');
80
+ --md-admonition-icon--bug: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 00-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 00-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z"/></svg>');
81
+ --md-admonition-icon--example: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 01.75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z"/></svg>');
82
+ --md-admonition-icon--quote: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z"/></svg>');
83
+ --md-footnotes-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.42L5.83 13H21V7h-2z"/></svg>');
84
+ --md-details-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
85
+ --md-tasklist-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>');
86
+ --md-tasklist-icon--checked: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
87
+ --md-nav-icon--prev: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>');
88
+ --md-nav-icon--next: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
89
+ --md-toc-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>');
90
+ --md-clipboard-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1z"/></svg>');
91
+ --md-search-result-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7c-.41-.25-.8-.56-1.14-.9-.33-.33-.61-.7-.86-1.1H6V4h7v5h5v1.18c.71.16 1.39.43 2 .82V8l-6-6m6.31 16.9c1.33-2.11.69-4.9-1.4-6.22-2.11-1.33-4.91-.68-6.22 1.4-1.34 2.11-.69 4.89 1.4 6.22 1.46.93 3.32.93 4.79.02L22 23.39 23.39 22l-3.08-3.1m-3.81.1a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5z"/></svg>');
92
+ --md-source-forks-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 2.122a2.25 2.25 0 1 0-1.5 0v.878A2.25 2.25 0 0 0 5.75 8.5h1.5v2.128a2.251 2.251 0 1 0 1.5 0V8.5h1.5a2.25 2.25 0 0 0 2.25-2.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75h-4.5A.75.75 0 0 1 5 6.25v-.878zm3.75 7.378a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm3-8.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z"/></svg>');
93
+ --md-source-repositories-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 1 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 0 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 0 1 1-1h8zM5 12.25v3.25a.25.25 0 0 0 .4.2l1.45-1.087a.25.25 0 0 1 .3 0L8.6 15.7a.25.25 0 0 0 .4-.2v-3.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25z"/></svg>');
94
+ --md-source-stars-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694v.001z"/></svg>');
95
+ --md-source-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 0 1 .25-.25h5.025a.25.25 0 0 1 .177.073l6.25 6.25a.25.25 0 0 1 0 .354l-5.025 5.025a.25.25 0 0 1-.354 0l-6.25-6.25a.25.25 0 0 1-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775zM6 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>');
96
+ --md-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="m310.6 246.6-127.1 128c-7.1 6.3-15.3 9.4-23.5 9.4s-16.38-3.125-22.63-9.375l-127.1-128C.224 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75s3.12 25.75-6.08 34.85z"/></svg>');
97
+ }
98
+
99
+ :host > * {
100
+ /* CODE */
101
+ --md-code-fg-color: ${F.palette.text.primary};
102
+ --md-code-bg-color: ${F.palette.background.paper};
103
+ --md-code-hl-color: ${(0,R.Fq)(F.palette.warning.main,.5)};
104
+ --md-code-hl-keyword-color: ${Qe?F.palette.primary.light:F.palette.primary.dark};
105
+ --md-code-hl-function-color: ${Qe?F.palette.secondary.light:F.palette.secondary.dark};
106
+ --md-code-hl-string-color: ${Qe?F.palette.success.light:F.palette.success.dark};
107
+ --md-code-hl-number-color: ${Qe?F.palette.error.light:F.palette.error.dark};
108
+ --md-code-hl-constant-color: var(--md-code-hl-function-color);
109
+ --md-code-hl-special-color: var(--md-code-hl-function-color);
110
+ --md-code-hl-name-color: var(--md-code-fg-color);
111
+ --md-code-hl-comment-color: var(--md-default-fg-color--light);
112
+ --md-code-hl-generic-color: var(--md-default-fg-color--light);
113
+ --md-code-hl-variable-color: var(--md-default-fg-color--light);
114
+ --md-code-hl-operator-color: var(--md-default-fg-color--light);
115
+ --md-code-hl-punctuation-color: var(--md-default-fg-color--light);
116
+
117
+ /* TYPESET */
118
+ --md-typeset-font-size: 1rem;
119
+ --md-typeset-color: var(--md-default-fg-color);
120
+ --md-typeset-a-color: var(--md-accent-fg-color);
121
+ --md-typeset-table-color: ${F.palette.text.primary};
122
+ --md-typeset-del-color: ${Qe?(0,R.Fq)(F.palette.error.dark,.5):(0,R.Fq)(F.palette.error.light,.5)};
123
+ --md-typeset-ins-color: ${Qe?(0,R.Fq)(F.palette.success.dark,.5):(0,R.Fq)(F.palette.success.light,.5)};
124
+ --md-typeset-mark-color: ${Qe?(0,R.Fq)(F.palette.warning.dark,.5):(0,R.Fq)(F.palette.warning.light,.5)};
125
+ }
126
+
127
+ @media screen and (max-width: 76.1875em) {
128
+ :host > * {
129
+ /* TYPESET */
130
+ --md-typeset-font-size: .9rem;
131
+ }
132
+ }
133
+
134
+ @media screen and (max-width: 600px) {
135
+ :host > * {
136
+ /* TYPESET */
137
+ --md-typeset-font-size: .7rem;
138
+ }
139
+ }
140
+ `}),Ve({css:`
141
+ body {
142
+ --md-text-color: var(--md-default-fg-color);
143
+ --md-text-link-color: var(--md-accent-fg-color);
144
+ --md-text-font-family: ${F.typography.fontFamily};
145
+ font-family: var(--md-text-font-family);
146
+ background-color: unset;
147
+ }
148
+ `}),Ve({css:`
149
+ .md-grid {
150
+ max-width: 100%;
151
+ margin: 0;
152
+ }
153
+
154
+ .md-nav {
155
+ font-size: calc(var(--md-typeset-font-size) * 0.9);
156
+ }
157
+ .md-nav__link {
158
+ display: flex;
159
+ align-items: center;
160
+ justify-content: space-between;
161
+ }
162
+ .md-nav__icon {
163
+ height: 20px !important;
164
+ width: 20px !important;
165
+ margin-left:${F.spacing(1)}px;
166
+ }
167
+ .md-nav__icon svg {
168
+ margin: 0;
169
+ width: 20px !important;
170
+ height: 20px !important;
171
+ }
172
+ .md-nav__icon:after {
173
+ width: 20px !important;
174
+ height: 20px !important;
175
+ }
176
+
177
+ .md-main__inner {
178
+ margin-top: 0;
179
+ }
180
+
181
+ .md-sidebar {
182
+ bottom: 75px;
183
+ position: fixed;
184
+ width: 16rem;
185
+ overflow-y: auto;
186
+ overflow-x: hidden;
187
+ scrollbar-color: rgb(193, 193, 193) #eee;
188
+ scrollbar-width: thin;
189
+ }
190
+ .md-sidebar .md-sidebar__scrollwrap {
191
+ width: calc(16rem - 10px);
192
+ }
193
+ .md-sidebar--secondary {
194
+ right: ${F.spacing(3)}px;
195
+ }
196
+ .md-sidebar::-webkit-scrollbar {
197
+ width: 5px;
198
+ }
199
+ .md-sidebar::-webkit-scrollbar-button {
200
+ width: 5px;
201
+ height: 5px;
202
+ }
203
+ .md-sidebar::-webkit-scrollbar-track {
204
+ background: #eee;
205
+ border: 1 px solid rgb(250, 250, 250);
206
+ box-shadow: 0px 0px 3px #dfdfdf inset;
207
+ border-radius: 3px;
208
+ }
209
+ .md-sidebar::-webkit-scrollbar-thumb {
210
+ width: 5px;
211
+ background: rgb(193, 193, 193);
212
+ border: transparent;
213
+ border-radius: 3px;
214
+ }
215
+ .md-sidebar::-webkit-scrollbar-thumb:hover {
216
+ background: rgb(125, 125, 125);
217
+ }
218
+
219
+ .md-content {
220
+ max-width: calc(100% - 16rem * 2);
221
+ margin-left: 16rem;
222
+ margin-bottom: 50px;
223
+ }
224
+
225
+ .md-footer {
226
+ position: fixed;
227
+ bottom: 0px;
228
+ }
229
+ .md-footer__title {
230
+ background-color: unset;
231
+ }
232
+ .md-footer-nav__link {
233
+ width: 16rem;
234
+ }
235
+
236
+ .md-dialog {
237
+ background-color: unset;
238
+ }
239
+
240
+ @media screen and (min-width: 76.25em) {
241
+ .md-sidebar {
242
+ height: auto;
243
+ }
244
+ }
245
+
246
+ @media screen and (max-width: 76.1875em) {
247
+ .md-nav {
248
+ transition: none !important;
249
+ background-color: var(--md-default-bg-color)
250
+ }
251
+ .md-nav--primary .md-nav__title {
252
+ cursor: auto;
253
+ color: var(--md-default-fg-color);
254
+ font-weight: 700;
255
+ white-space: normal;
256
+ line-height: 1rem;
257
+ height: auto;
258
+ display: flex;
259
+ flex-flow: column;
260
+ row-gap: 1.6rem;
261
+ padding: 1.2rem .8rem .8rem;
262
+ background-color: var(--md-default-bg-color);
263
+ }
264
+ .md-nav--primary .md-nav__title~.md-nav__list {
265
+ box-shadow: none;
266
+ }
267
+ .md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
268
+ border-top: none;
269
+ }
270
+ .md-nav--primary .md-nav__title .md-nav__button {
271
+ display: none;
272
+ }
273
+ .md-nav--primary .md-nav__title .md-nav__icon {
274
+ color: var(--md-default-fg-color);
275
+ position: static;
276
+ height: auto;
277
+ margin: 0 0 0 -0.2rem;
278
+ }
279
+ .md-nav--primary > .md-nav__title [for="none"] {
280
+ padding-top: 0;
281
+ }
282
+ .md-nav--primary .md-nav__item {
283
+ border-top: none;
284
+ }
285
+ .md-nav--primary :is(.md-nav__title,.md-nav__item) {
286
+ font-size : var(--md-typeset-font-size);
287
+ }
288
+ .md-nav .md-source {
289
+ display: none;
290
+ }
291
+
292
+ .md-sidebar {
293
+ height: 100%;
294
+ }
295
+ .md-sidebar--primary {
296
+ width: 12.1rem !important;
297
+ z-index: 200;
298
+ left: ${It?"calc(-12.1rem + 242px)":"calc(-12.1rem + 72px)"} !important;
299
+ }
300
+ .md-sidebar--secondary:not([hidden]) {
301
+ display: none;
302
+ }
303
+
304
+ .md-content {
305
+ max-width: 100%;
306
+ margin-left: 0;
307
+ }
308
+
309
+ .md-header__button {
310
+ margin: 0.4rem 0;
311
+ margin-left: 0.4rem;
312
+ padding: 0;
313
+ }
314
+
315
+ .md-overlay {
316
+ left: 0;
317
+ }
318
+
319
+ .md-footer {
320
+ position: static;
321
+ padding-left: 0;
322
+ }
323
+ .md-footer-nav__link {
324
+ /* footer links begin to overlap at small sizes without setting width */
325
+ width: 50%;
326
+ }
327
+ }
328
+
329
+ @media screen and (max-width: 600px) {
330
+ .md-sidebar--primary {
331
+ left: -12.1rem !important;
332
+ width: 12.1rem;
333
+ }
334
+ }
335
+ `}),Ve({css:`
336
+ .md-typeset {
337
+ font-size: var(--md-typeset-font-size);
338
+ }
339
+
340
+ ${gt.reduce((Ie,Ee)=>{const $e=F.typography[Ee],{lineHeight:qe,fontFamily:Rt,fontWeight:en,fontSize:sn}=$e,Wn=bn=>{let cn=1;return typeof bn=="number"&&(cn=bn/16*.6),typeof bn=="string"&&(cn=bn.replace("rem","")),`calc(${cn} * var(--md-typeset-font-size))`};return Ie.concat(`
341
+ .md-typeset ${Ee} {
342
+ color: var(--md-default-fg-color);
343
+ line-height: ${qe};
344
+ font-family: ${Rt};
345
+ font-weight: ${en};
346
+ font-size: ${Wn(sn)};
347
+ }
348
+ `)},"")}
349
+
350
+ .md-typeset .md-content__button {
351
+ color: var(--md-default-fg-color);
352
+ }
353
+
354
+ .md-typeset hr {
355
+ border-bottom: 0.05rem dotted ${F.palette.divider};
356
+ }
357
+
358
+ .md-typeset details {
359
+ font-size: var(--md-typeset-font-size) !important;
360
+ }
361
+ .md-typeset details summary {
362
+ padding-left: 2.5rem !important;
363
+ }
364
+ .md-typeset details summary:before,
365
+ .md-typeset details summary:after {
366
+ top: 50% !important;
367
+ width: 20px !important;
368
+ height: 20px !important;
369
+ transform: rotate(0deg) translateY(-50%) !important;
370
+ }
371
+ .md-typeset details[open] > summary:after {
372
+ transform: rotate(90deg) translateX(-50%) !important;
373
+ }
374
+
375
+ .md-typeset blockquote {
376
+ color: var(--md-default-fg-color--light);
377
+ border-left: 0.2rem solid var(--md-default-fg-color--light);
378
+ }
379
+
380
+ .md-typeset table:not([class]) {
381
+ font-size: var(--md-typeset-font-size);
382
+ border: 1px solid var(--md-default-fg-color);
383
+ border-bottom: none;
384
+ border-collapse: collapse;
385
+ }
386
+ .md-typeset table:not([class]) th {
387
+ font-weight: bold;
388
+ }
389
+ .md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
390
+ border-bottom: 1px solid var(--md-default-fg-color);
391
+ }
392
+
393
+ .md-typeset pre > code::-webkit-scrollbar-thumb {
394
+ background-color: hsla(0, 0%, 0%, 0.32);
395
+ }
396
+ .md-typeset pre > code::-webkit-scrollbar-thumb:hover {
397
+ background-color: hsla(0, 0%, 0%, 0.87);
398
+ }
399
+ `}),Ve({css:`
400
+ /*
401
+ Disable CSS animations on link colors as they lead to issues in dark mode.
402
+ The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
403
+ */
404
+ .md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
405
+ transition: none;
406
+ }
407
+ `}),Ve({css:`
408
+ /* HIGHLIGHT */
409
+ .highlight .md-clipboard:after {
410
+ content: unset;
411
+ }
412
+
413
+ .highlight .nx {
414
+ color: ${Qe?"#ff53a3":"#ec407a"};
415
+ }
416
+
417
+ /* CODE HILITE */
418
+ .codehilite .gd {
419
+ background-color: ${Qe?"rgba(248,81,73,0.65)":"#fdd"};
420
+ }
421
+
422
+ .codehilite .gi {
423
+ background-color: ${Qe?"rgba(46,160,67,0.65)":"#dfd"};
424
+ }
425
+
426
+ /* TABBED */
427
+ .tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
428
+ .tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
429
+ .tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
430
+ .tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
431
+ .tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
432
+ .tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
433
+ .tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
434
+ .tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
435
+ .tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
436
+ .tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
437
+ .tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
438
+ .tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
439
+ .tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
440
+ .tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
441
+ .tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
442
+ .tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
443
+ .tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
444
+ .tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
445
+ .tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
446
+ .tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
447
+ color: var(--md-accent-fg-color);
448
+ border-color: var(--md-accent-fg-color);
449
+ }
450
+
451
+ /* TASK-LIST */
452
+ .task-list-control .task-list-indicator::before {
453
+ background-color: ${F.palette.action.disabledBackground};
454
+ }
455
+ .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
456
+ background-color: ${F.palette.success.main};
457
+ }
458
+
459
+ /* ADMONITION */
460
+ .admonition {
461
+ font-size: var(--md-typeset-font-size) !important;
462
+ }
463
+ .admonition .admonition-title {
464
+ padding-left: 2.5rem !important;
465
+ }
466
+
467
+ .admonition .admonition-title:before {
468
+ top: 50% !important;
469
+ width: 20px !important;
470
+ height: 20px !important;
471
+ transform: translateY(-50%) !important;
472
+ }
473
+ `})]),[ee,ae,b,pe,z,ue,F,Qe,It]),x=(0,r.useCallback)(async $=>At($,[ut(),nn(F),Dt({baseUrl:window.location.origin,onClick:(G,Ie)=>{var qe;const Ee=G.ctrlKey||G.metaKey,$e=new URL(Ie);$e.hash?Ee?window.open(`${$e.pathname}${$e.hash}`,"_blank"):(Y(`${$e.pathname}${$e.hash}`),(qe=$==null?void 0:$.querySelector(`#${$e.hash.slice(1)}`))==null||qe.scrollIntoView()):Ee?window.open($e.pathname,"_blank"):Y($e.pathname)}}),Yt({docStorageUrl:await ue.getApiOrigin(),onLoading:G=>{G.style.setProperty("opacity","0")},onLoaded:G=>{var Ie;G.style.removeProperty("opacity"),(Ie=G.querySelector(".md-nav__title"))==null||Ie.removeAttribute("for"),yt(Array.from(G.querySelectorAll(".md-sidebar")))}})]),[F,Y,ue]);return(0,r.useEffect)(()=>{if(!Oe)return()=>{};let $=!0;return p(Oe,Re).then(async G=>{if(!(G!=null&&G.innerHTML)||!$)return;window.scroll({top:0});const Ie=await x(G);st(Ie)}),()=>{$=!1}},[Oe,Re,p,x]),rt},xt=(0,l.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),se=We(J=>{const{withSearch:Y=!0,onReady:F}=J,ue=xt(),pe=(0,s.$L)(),{entityRef:z,shadowRoot:b,setShadowRoot:ee}=(0,s.x1)(),ae=ot(z),[Ce,Re]=(0,r.useState)((0,t.Ue)({...(0,m.Z)(),insertionPoint:void 0})),Oe=(0,r.useCallback)(It=>{var N;if(!ae||!It)return;Re((0,t.Ue)({...(0,m.Z)(),insertionPoint:ae.querySelector("head")||void 0}));const Ke=(N=It.shadowRoot)!=null?N:It.attachShadow({mode:"open"});Ke.innerHTML="",Ke.appendChild(ae),ee(Ke),F instanceof Function&&F()},[ae,ee,F]),Qe=b==null?void 0:b.querySelector('[data-md-component="content"]'),dt=b==null?void 0:b.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]'),yt=b==null?void 0:b.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]'),rt=document.createElement("div");dt==null||dt.prepend(rt);const st=document.createElement("div");return yt==null||yt.prepend(st),ae?r.createElement(f.Content,null,r.createElement(h.Z,{container:!0},r.createElement(h.Z,{xs:12,item:!0},r.createElement(u.N,null)),Y&&r.createElement(h.Z,{className:ue.search,xs:"auto",item:!0},r.createElement(y.S,{entityId:z})),r.createElement(h.Z,{xs:12,item:!0},r.createElement(a.ZP,{jss:Ce,sheetsManager:new Map},r.createElement("div",{ref:Oe,"data-testid":"techdocs-native-shadowroot"}),r.createElement(v.Z,{container:rt},pe.renderComponentsByLocation(s.oZ.PrimarySidebar)),r.createElement(v.Z,{container:Qe},pe.renderComponentsByLocation(s.oZ.Content)),r.createElement(v.Z,{container:st},pe.renderComponentsByLocation(s.oZ.SecondarySidebar)))))):r.createElement(f.Content,null,r.createElement(f.Progress,null))}),j=null},99954:function(_,i,e){"use strict";e.d(i,{S:function(){return A}});var r=e(2784),t=e(18671),l=e(98069),h=e(73250),v=e(47955),m=e(53479),a=e(48023),s=e(9118),f=e(36964),y=e(68725);const u=r.createElement(l.Z,{animation:"wave",variant:"text",height:40}),A=C=>{const{children:R}=C,L=(0,v.$L)(),oe=(0,f.useApi)(f.configApiRef),{title:M,setTitle:T,subtitle:D,setSubtitle:O,entityRef:B,metadata:{value:Q},entityMetadata:{value:ne}}=(0,v.x1)();(0,r.useEffect)(()=>{!Q||(T(nt=>{const{site_name:tt}=Q;return nt||tt}),O(nt=>{let{site_description:tt}=Q;return(!tt||tt==="None")&&(tt="Home"),nt||tt}))},[Q,T,O]);const Te=oe.getOptional("app.title")||"Backstage",Ye=[D,M,Te].filter(Boolean).join(" | "),{locationMetadata:We,spec:fe}=ne||{},ye=fe==null?void 0:fe.lifecycle,xe=ne?(0,m.getEntityRelations)(ne,a.S4):[],He=(0,f.useRouteRef)(y._Z)(),ke=r.createElement(r.Fragment,null,r.createElement(s.HeaderLabel,{label:"Component",value:r.createElement(m.EntityRefLink,{color:"inherit",entityRef:B,defaultKind:"Component"})}),xe.length>0&&r.createElement(s.HeaderLabel,{label:"Owner",value:r.createElement(m.EntityRefLinks,{color:"inherit",entityRefs:xe,defaultKind:"group"})}),ye?r.createElement(s.HeaderLabel,{label:"Lifecycle",value:ye}):null,We&&We.type!=="dir"&&We.type!=="file"?r.createElement(s.HeaderLabel,{label:"",value:r.createElement("a",{href:We.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(h.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return r.createElement(s.Header,{type:"Documentation",typeLink:He,title:M||u,subtitle:D||u},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,Ye)),ke,R,L.renderComponentsByLocation(v.oZ.Header))}},16172:function(_,i,e){"use strict";e.d(i,{b:function(){return a}});var r=e(2784),t=e(79692),l=e(15223),h=e(95544),v=e(47955);const m=(0,t.Z)(s=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:s.spacing(3,3,0)}})),a=({toolbarProps:s})=>{const f=m(),u=(0,v.$L)().renderComponentsByLocation(v.oZ.Subheader);return u?r.createElement(l.Z,{classes:f,...s},u&&r.createElement(h.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},u)):null}},23738:function(_,i,e){"use strict";e.d(i,{N:function(){return O}});var r=e(2784),t=e(9118),l=e(79692),h=e(4614),v=e(77277),m=e(99688),a=e(12420),s=e(60905),f=e(90436),y=e(61837),u=e(4190),A=e(87685);const C=(0,l.Z)(B=>(0,a.Z)({paper:{width:"100%",[B.breakpoints.up("sm")]:{width:"75%"},[B.breakpoints.up("md")]:{width:"50%"},padding:B.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:B.palette.background.default}})),R=({buildLog:B,onClose:Q})=>{const ne=C(),Te=B.length===0?"Waiting for logs...":B.join(`
474
+ `);return r.createElement(s.Z,{container:!0,direction:"column",className:ne.root,spacing:0,wrap:"nowrap"},r.createElement(s.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(f.Z,{variant:"h5"},"Build Details"),r.createElement(y.Z,{key:"dismiss",title:"Close the drawer",onClick:Q,color:"inherit"},r.createElement(A.Z,null))),r.createElement(t.LogViewer,{text:Te,classes:{root:ne.logs}}))},L=({buildLog:B})=>{const Q=C(),[ne,Te]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(v.Z,{color:"inherit",onClick:()=>Te(!0)},"Show Build Logs"),r.createElement(u.ZP,{classes:{paper:Q.paper},anchor:"right",open:ne,onClose:()=>Te(!1)},r.createElement(R,{buildLog:B,onClose:()=>Te(!1)})))};var oe=e(36964);const M=({errorMessage:B})=>{const Q=(0,oe.useApi)(oe.configApiRef).getOptionalString("techdocs.builder");let ne="";return Q!=="local"&&(ne="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),r.createElement(t.ErrorPage,{status:"404",statusMessage:B||"Documentation not found",additionalInfo:ne})};var T=e(28626);const D=(0,l.Z)(B=>({root:{marginBottom:B.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),O=()=>{let B=null;const Q=D(),{state:ne,contentReload:Te,contentErrorMessage:Ye,syncErrorMessage:We,buildLog:fe}=(0,T.DK)(),ye=ne==="CHECKING"?r.createElement(t.Progress,null):null;return ne==="INITIAL_BUILD"&&(B=r.createElement(m.Z,{classes:{root:Q.root},variant:"outlined",severity:"info",icon:r.createElement(h.Z,{size:"24px"}),action:r.createElement(L,{buildLog:fe})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),ne==="CONTENT_STALE_REFRESHING"&&(B=r.createElement(m.Z,{variant:"outlined",severity:"info",icon:r.createElement(h.Z,{size:"24px"}),action:r.createElement(L,{buildLog:fe}),classes:{root:Q.root}},"A newer version of this documentation is being prepared and will be available shortly.")),ne==="CONTENT_STALE_READY"&&(B=r.createElement(m.Z,{variant:"outlined",severity:"success",action:r.createElement(v.Z,{color:"inherit",onClick:()=>Te()},"Refresh"),classes:{root:Q.root}},"A newer version of this documentation is now available, please refresh to view.")),ne==="CONTENT_STALE_ERROR"&&(B=r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(L,{buildLog:fe}),classes:{root:Q.root,message:Q.message}},"Building a newer version of this documentation failed."," ",We)),ne==="CONTENT_NOT_FOUND"&&(B=r.createElement(r.Fragment,null,We&&r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(L,{buildLog:fe}),classes:{root:Q.root,message:Q.message}},"Building a newer version of this documentation failed."," ",We),r.createElement(M,{errorMessage:Ye}))),r.createElement(r.Fragment,null,ye,B)}},96393:function(_,i,e){"use strict";e.d(i,{Fq:function(){return l.Fq},SE:function(){return t.S}});var r=e(26220),t=e(99954),l=e(28626),h=e(16172),v=e(23738)},68725:function(_,i,e){"use strict";e.d(i,{Fw:function(){return l},_Z:function(){return t},pd:function(){return h}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),l=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),h=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},10459:function(_,i,e){"use strict";e.d(i,{S:function(){return xt}});var r=e(2784),t=e(79692),l=e(49378),h=e(38402),v=e(85256),m=e(9118),a=e(15277),s=e.n(a);const f=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),y=se=>{const{result:j,lineClamp:J=5,asListItem:Y=!0,asLink:F=!0,title:ue}=se,pe=f(),z=()=>{var ae;return r.createElement(l.Z,{className:pe.itemText,primaryTypographyProps:{variant:"h6"},primary:ue||`${j.title} | ${(ae=j.entityTitle)!=null?ae:j.name} docs`,secondary:r.createElement(s(),{line:J,truncateText:"\u2026",text:j.text,element:"span"})})},b=({children:ae})=>F?r.createElement(m.Link,{to:j.location},ae):r.createElement(r.Fragment,null,ae),ee=({children:ae})=>Y?r.createElement(r.Fragment,null,r.createElement(h.Z,{alignItems:"flex-start",className:pe.flexContainer},ae),r.createElement(v.Z,{component:"li"})):r.createElement(r.Fragment,null,ae);return r.createElement(b,null,r.createElement(ee,null,r.createElement(z,null)))};var u=e(36964);const A=(0,u.createApiRef)({id:"plugin.search.queryservice"});var C=e(76241),R=e(64279),L=e(1849);const oe=(0,C.CT)("search-context"),M=()=>{const se=(0,r.useContext)(oe);if(!se)throw new Error("useSearch must be used within a SearchContextProvider");const j=se.atVersion(1);if(!j)throw new Error("No SearchContext v1 found");return j},T={term:"",pageCursor:void 0,filters:{},types:[]},D=se=>{var Ke,N,p,x;const{initialState:j=T,children:J}=se,Y=(0,u.useApi)(A),[F,ue]=(0,r.useState)(j.pageCursor),[pe,z]=(0,r.useState)(j.filters),[b,ee]=(0,r.useState)(j.term),[ae,Ce]=(0,r.useState)(j.types),Re=(0,L.Z)(b),Oe=(0,R.default)(()=>Y.query({term:b,filters:pe,pageCursor:F,types:ae}),[b,pe,ae,F]),Qe=!Oe.loading&&!Oe.error&&((Ke=Oe.value)==null?void 0:Ke.nextPageCursor),dt=!Oe.loading&&!Oe.error&&((N=Oe.value)==null?void 0:N.previousPageCursor),yt=(0,r.useCallback)(()=>{var $;ue(($=Oe.value)==null?void 0:$.nextPageCursor)},[(p=Oe.value)==null?void 0:p.nextPageCursor]),rt=(0,r.useCallback)(()=>{var $;ue(($=Oe.value)==null?void 0:$.previousPageCursor)},[(x=Oe.value)==null?void 0:x.previousPageCursor]);(0,r.useEffect)(()=>{b&&Re&&b!==Re&&ue(void 0)},[b,Re,j.pageCursor]);const st={result:Oe,filters:pe,setFilters:z,term:b,setTerm:ee,types:ae,setTypes:Ce,pageCursor:F,setPageCursor:ue,fetchNextPage:Qe?yt:void 0,fetchPreviousPage:dt?rt:void 0},It=(0,C.EI)({1:st});return r.createElement(u.AnalyticsContext,{attributes:{searchTypes:ae.sort().join(",")}},r.createElement(oe.Provider,{value:It,children:J}))};var O=e(49208),B=e(62159);class Q{constructor(j){q(this,"config");this.config=new ConfigReader(j)}has(j){return this.config.has(j)}keys(){return this.config.keys()}get(j){return this.config.get(j)}getOptional(j){return this.config.getOptional(j)}getConfig(j){return this.config.getConfig(j)}getOptionalConfig(j){return this.config.getOptionalConfig(j)}getConfigArray(j){return this.config.getConfigArray(j)}getOptionalConfigArray(j){return this.config.getOptionalConfigArray(j)}getNumber(j){return this.config.getNumber(j)}getOptionalNumber(j){return this.config.getOptionalNumber(j)}getBoolean(j){return this.config.getBoolean(j)}getOptionalBoolean(j){return this.config.getOptionalBoolean(j)}getString(j){return this.config.getString(j)}getOptionalString(j){return this.config.getOptionalString(j)}getStringArray(j){return this.config.getStringArray(j)}getOptionalStringArray(j){return this.config.getOptionalStringArray(j)}}const ne={subscribe:()=>({unsubscribe:()=>{},closed:!0}),[Symbol.observable](){return this}};class Te{constructor(j={}){q(this,"errors",new Array);q(this,"waiters",new Set);this.options=j}post(j,J){if(this.options.collect){this.errors.push({error:j,context:J});for(const Y of this.waiters)Y.pattern.test(j.message)&&(this.waiters.delete(Y),Y.resolve({error:j,context:J}));return}throw new Error(`MockErrorApi received unexpected error, ${j}`)}error$(){return ne}getErrors(){return this.errors}waitForError(j,J=2e3){return new Promise((Y,F)=>{setTimeout(()=>{F(new Error("Timed out waiting for error"))},J),this.waiters.add({resolve:Y,pattern:j})})}}var Ye=e(96279);class We{constructor(j){q(this,"implementation");this.implementation=fe(j)}get fetch(){return this.implementation.fetch}}function fe(se){return createFetchApi({baseImplementation:ye(se),middleware:[xe(se),He(se)].filter(j=>Boolean(j))})}function ye(se){const j=se==null?void 0:se.baseImplementation;if(j){if(j==="none")return()=>Promise.resolve(new Response)}else return crossFetch;return j}function xe(se){const j=se==null?void 0:se.resolvePluginProtocol;if(!!j)return FetchMiddlewares.resolvePluginProtocol({discoveryApi:j.discoveryApi})}function He(se){const j=se==null?void 0:se.injectIdentityAuth;if(!j)return;const J="token"in j?{getCredentials:async()=>({token:j.token})}:j.identityApi;return FetchMiddlewares.injectIdentityAuth({identityApi:J,allowUrl:()=>!0})}var ke=e(40749);class nt{constructor(j=()=>AuthorizeResult.ALLOW){this.requestHandler=j}async authorize(j){return{result:this.requestHandler(j)}}}var tt=e(82394),be=e.n(tt);class Ze{constructor(j,J,Y){q(this,"namespace");q(this,"data");q(this,"bucketStorageApis");q(this,"subscribers",new Set);q(this,"observable",new(be())(j=>(this.subscribers.add(j),()=>{this.subscribers.delete(j)})));this.namespace=j,this.bucketStorageApis=J,this.data={...Y}}static create(j){return new Ze("",new Map,j)}forBucket(j){return this.bucketStorageApis.has(j)||this.bucketStorageApis.set(j,new Ze(`${this.namespace}/${j}`,this.bucketStorageApis,this.data)),this.bucketStorageApis.get(j)}snapshot(j){if(this.data.hasOwnProperty(this.getKeyName(j))){const J=this.data[this.getKeyName(j)];return{key:j,presence:"present",value:J}}return{key:j,presence:"absent",value:void 0}}async set(j,J){const Y=JSON.parse(JSON.stringify(J),(F,ue)=>(typeof ue=="object"&&ue!==null&&Object.freeze(ue),ue));this.data[this.getKeyName(j)]=Y,this.notifyChanges({key:j,presence:"present",value:Y})}async remove(j){delete this.data[this.getKeyName(j)],this.notifyChanges({key:j,presence:"absent",value:void 0})}observe$(j){return this.observable.filter(({key:J})=>J===j)}getKeyName(j){return`${this.namespace}/${encodeURIComponent(j)}`}notifyChanges(j){for(const J of this.subscribers)J.next(j)}}var je=e(28981),Je=e(83677),vt=e(63751);async function Dt(se){let j;return await act(async()=>{j=render(se)}),j}const lt=[(0,u.createApiFactory)({api:u.discoveryApiRef,deps:{configApi:u.configApiRef},factory:({configApi:se})=>O.UrlPatternDiscovery.compile(`${se.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,u.createApiFactory)(u.alertApiRef,new O.AlertApiForwarder),(0,u.createApiFactory)(u.analyticsApiRef,new O.NoOpAnalyticsApi),(0,u.createApiFactory)({api:u.errorApiRef,deps:{alertApi:u.alertApiRef},factory:({alertApi:se})=>{const j=new O.ErrorAlerter(se,new O.ErrorApiForwarder);return O.UnhandledErrorForwarder.forward(j,{hidden:!1}),j}}),(0,u.createApiFactory)({api:u.storageApiRef,deps:{errorApi:u.errorApiRef},factory:({errorApi:se})=>O.WebStorage.create({errorApi:se})}),(0,u.createApiFactory)(u.oauthRequestApiRef,new O.OAuthRequestManager),(0,u.createApiFactory)({api:u.googleAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:se,oauthRequestApi:j,configApi:J})=>O.GoogleAuth.create({discoveryApi:se,oauthRequestApi:j,environment:J.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.microsoftAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:se,oauthRequestApi:j,configApi:J})=>O.MicrosoftAuth.create({discoveryApi:se,oauthRequestApi:j,environment:J.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.githubAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:se,oauthRequestApi:j,configApi:J})=>O.GithubAuth.create({discoveryApi:se,oauthRequestApi:j,defaultScopes:["read:user"],environment:J.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oktaAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:se,oauthRequestApi:j,configApi:J})=>O.OktaAuth.create({discoveryApi:se,oauthRequestApi:j,environment:J.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.gitlabAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:se,oauthRequestApi:j,configApi:J})=>O.GitlabAuth.create({discoveryApi:se,oauthRequestApi:j,environment:J.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oneloginAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:se,oauthRequestApi:j,configApi:J})=>O.OneLoginAuth.create({discoveryApi:se,oauthRequestApi:j,environment:J.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.bitbucketAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:se,oauthRequestApi:j,configApi:J})=>O.BitbucketAuth.create({discoveryApi:se,oauthRequestApi:j,defaultScopes:["team"],environment:J.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.atlassianAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:se,oauthRequestApi:j,configApi:J})=>O.AtlassianAuth.create({discoveryApi:se,oauthRequestApi:j,environment:J.getOptionalString("auth.environment")})})],bt=[(0,u.createApiFactory)(u.errorApiRef,new Te),(0,u.createApiFactory)(u.storageApiRef,Ze.create())],Ft={"kind:api":Je.Z,"kind:component":Je.Z,"kind:domain":Je.Z,"kind:group":Je.Z,"kind:location":Je.Z,"kind:system":Je.Z,"kind:user":Je.Z,brokenImage:Je.Z,catalog:Je.Z,scaffolder:Je.Z,techdocs:Je.Z,search:Je.Z,chat:Je.Z,dashboard:Je.Z,docs:Je.Z,email:Je.Z,github:Je.Z,group:Je.Z,help:Je.Z,user:Je.Z,warning:Je.Z},Pt=({error:se})=>{throw new Error(`Reached ErrorBoundaryFallback Page with error, ${se}`)},Nt=()=>{throw new Error("Reached NotFound Page")},wt=({step:se,error:j})=>{throw new Error(`Reached BootError Page at step ${se} with error ${j}`)},Wt=()=>React.createElement("div",{"data-testid":"progress"});function nn(se){return String(se).includes("{type=external,")}function $t(se,j={}){var ee;const{routeEntries:J=["/"]}=j,Y=new Map,F=createSpecializedApp({apis:mockApis,defaultApis,configLoader:!1,components:{Progress:Wt,BootErrorPage:wt,NotFoundErrorPage:Nt,ErrorBoundaryFallback:Pt,Router:({children:ae})=>React.createElement(MemoryRouter,{initialEntries:J,children:ae})},icons:Ft,plugins:[],themes:[{id:"light",title:"Test App Theme",variant:"light",Provider:({children:ae})=>React.createElement(ThemeProvider,{theme:lightTheme},React.createElement(CssBaseline,null,ae))}],bindRoutes:({bind:ae})=>{for(const[Ce,Re]of Y)ae({ref:Ce},{ref:Re})}});let ue;se instanceof Function?ue=React.createElement(se,null):ue=se;const pe=Object.entries((ee=j.mountedRoutes)!=null?ee:{}).map(([ae,Ce])=>{const Re=()=>React.createElement("div",null,"Mounted at ",ae);if(nn(Ce)){const Oe=createRouteRef({id:"id"});Y.set(Ce,Oe),attachComponentData(Re,"core.mountPoint",Oe)}else attachComponentData(Re,"core.mountPoint",Ce);return React.createElement(Route,{key:ae,path:ae,element:React.createElement(Re,null)})}),z=F.getProvider(),b=F.getRouter();return React.createElement(z,null,React.createElement(b,null,pe,React.createElement(Route,{path:"*",element:ue})))}async function ht(se,j={}){return renderWithEffects($t(se,j))}class Yt{static from(...j){return new Yt(new Map(j.map(([J,Y])=>[J.id,Y])))}constructor(j){this.apis=j}get(j){return this.apis.get(j.id)}}const le=se=>React.createElement(ApiProvider,{apis:Yt.from(...se.apis),children:se.children});function H(se){const{mockedResults:j,children:J}=se,Y=()=>Promise.resolve(j||{}),F=TestApiRegistry.from([searchApiRef,{query:Y}]);return React.createElement(ApiProvider,{apis:F,children:J})}const ce=se=>React.createElement(H,{...se},React.createElement(SearchContextProvider,{children:se.children}));var de=e(86619),ge=e(50581),De=e(61837),Ue=e(4614),Ae=e(21853),Ve=e(88013),ut=e(10289),At=e(48760);const gt=(0,t.Z)({root:{width:"100%"}}),ot=se=>{const{entityId:j,debounceTime:J=150}=se,[Y,F]=(0,r.useState)(!1),ue=(0,ut.s0)(),{term:pe,setTerm:z,setFilters:b,result:{loading:ee,value:ae}}=M(),Ce=gt(),[Re,Oe]=(0,r.useState)([]);(0,r.useEffect)(()=>{let N=!0;if(N&&ae){const p=ae.results.slice(0,10);Oe(p)}return()=>{N=!1}},[ee,ae]);const[Qe,dt]=(0,r.useState)(pe);(0,At.Z)(()=>z(Qe),J,[Qe]);const{kind:yt,name:rt,namespace:st}=j;(0,r.useEffect)(()=>{b(N=>({...N,kind:yt,namespace:st,name:rt}))},[yt,st,rt,b]);const It=N=>{Y||F(!0),dt(N.target.value)},Ke=(N,p)=>{if(p!=null&&p.document){const{location:x}=p.document;ue(x)}};return r.createElement(Ve.ZP,{classes:{root:Ce.root},"data-testid":"techdocs-search-bar",size:"small",open:Y,getOptionLabel:()=>"",filterOptions:N=>N,onClose:()=>{F(!1)},onFocus:()=>{F(!0)},onChange:Ke,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Re,renderOption:({document:N})=>r.createElement(y,{result:N,lineClamp:3,asListItem:!1,asLink:!1,title:N.title}),loading:ee,renderInput:N=>r.createElement(de.Z,{...N,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${j.name} docs`,value:Qe,onChange:It,InputProps:{...N.InputProps,startAdornment:r.createElement(ge.Z,{position:"start"},r.createElement(De.Z,{"aria-label":"Query",disabled:!0},r.createElement(Ae.Z,null))),endAdornment:r.createElement(r.Fragment,null,ee?r.createElement(Ue.Z,{color:"inherit",size:20}):null,N.InputProps.endAdornment)}})})},xt=se=>{const j={term:"",types:["techdocs"],pageCursor:"",filters:se.entityId};return r.createElement(D,{initialState:j},r.createElement(ot,{...se}))}},98157:function(){},19133:function(_,i,e){"use strict";_.exports=e.p+"static/createComponent.975d1e1e..svg"},86284:function(_,i,e){"use strict";_.exports=e.p+"static/missingAnnotation.67f79e98..svg"},3871:function(_,i,e){"use strict";_.exports=e.p+"static/noBuild.1715fa71..svg"},96465:function(_,i,e){"use strict";_.exports=e.p+"static/noInformation.4b426325..svg"},29788:function(_,i,e){"use strict";_.exports=e.p+"static/mic-drop.fe3ef4d0..svg"},53260:function(){}},function(_){var i=function(r){return _(_.s=r)};_.O(0,[2370,6202,2158,9284,2126,7012,4361,9035,4983,3222,5218,4736],function(){return i(88649),i(30294)});var e=_.O()}]);})();
475
+
476
+ //# sourceMappingURL=main.3efd9679.js.map