@techdocs/cli 1.1.3 → 1.2.0-next.2

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 (267) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/{PublisherConfig-7a0dc71c.cjs.js → PublisherConfig-0ea58467.cjs.js} +9 -3
  3. package/dist/cjs/{PublisherConfig-7a0dc71c.cjs.js.map → PublisherConfig-0ea58467.cjs.js.map} +1 -1
  4. package/dist/cjs/{generate-e530be0d.cjs.js → generate-b897bd89.cjs.js} +5 -3
  5. package/dist/cjs/{generate-e530be0d.cjs.js.map → generate-b897bd89.cjs.js.map} +1 -1
  6. package/dist/cjs/{migrate-122ec4bf.cjs.js → migrate-62035c68.cjs.js} +6 -4
  7. package/dist/cjs/{migrate-122ec4bf.cjs.js.map → migrate-62035c68.cjs.js.map} +1 -1
  8. package/dist/cjs/{mkdocs-3c3898e8.cjs.js → mkdocs-1501e940.cjs.js} +4 -3
  9. package/dist/cjs/{mkdocs-3c3898e8.cjs.js.map → mkdocs-1501e940.cjs.js.map} +1 -1
  10. package/dist/cjs/{mkdocsServer-0af6527d.cjs.js → mkdocsServer-99ec8af2.cjs.js} +31 -24
  11. package/dist/cjs/mkdocsServer-99ec8af2.cjs.js.map +1 -0
  12. package/dist/cjs/{publish-efa348a5.cjs.js → publish-af5607e2.cjs.js} +3 -3
  13. package/dist/cjs/{publish-efa348a5.cjs.js.map → publish-af5607e2.cjs.js.map} +1 -1
  14. package/dist/cjs/{serve-48337ec4.cjs.js → serve-176119a3.cjs.js} +48 -31
  15. package/dist/cjs/{serve-48337ec4.cjs.js.map → serve-176119a3.cjs.js.map} +1 -1
  16. package/dist/cjs/{utility-51f4a306.cjs.js → utility-647ad232.cjs.js} +4 -2
  17. package/dist/cjs/{utility-51f4a306.cjs.js.map → utility-647ad232.cjs.js.map} +1 -1
  18. package/dist/embedded-app/.config-schema.json +10 -0
  19. package/dist/embedded-app/index.html +1 -1
  20. package/dist/embedded-app/static/1553.c2a9eb50.chunk.js.map +1 -1
  21. package/dist/embedded-app/static/2426.32fc1ca1.chunk.js.map +1 -1
  22. package/dist/embedded-app/static/{3555.4d83af5a.chunk.js → 3555.f3a9371e.chunk.js} +1 -1
  23. package/dist/embedded-app/static/3555.f3a9371e.chunk.js.map +1 -0
  24. package/dist/embedded-app/static/390.74a27040.chunk.js.map +1 -1
  25. package/dist/embedded-app/static/4022.ca590614.chunk.js.map +1 -1
  26. package/dist/embedded-app/static/4949.bffcfed7.chunk.js.map +1 -1
  27. package/dist/embedded-app/static/5162.95e4bb5d.chunk.js +3 -0
  28. package/dist/embedded-app/static/5162.95e4bb5d.chunk.js.map +1 -0
  29. package/dist/embedded-app/static/6235.61c00d19.chunk.js.map +1 -1
  30. package/dist/embedded-app/static/{6583.0b42ebbe.chunk.js → 6583.492e5219.chunk.js} +1 -1
  31. package/dist/embedded-app/static/6583.492e5219.chunk.js.map +1 -0
  32. package/dist/embedded-app/static/{7110.135c2721.chunk.js → 7110.766c71fc.chunk.js} +1 -1
  33. package/dist/embedded-app/static/7110.766c71fc.chunk.js.map +1 -0
  34. package/dist/embedded-app/static/8061.f5e20bb7.chunk.js.map +1 -1
  35. package/dist/embedded-app/static/{8718.bd799167.chunk.js → 8718.2becf372.chunk.js} +1 -1
  36. package/dist/embedded-app/static/8718.2becf372.chunk.js.map +1 -0
  37. package/dist/embedded-app/static/8792.6f60e67c.chunk.js.map +1 -1
  38. package/dist/embedded-app/static/9028.1e31ab6a.chunk.js.map +1 -1
  39. package/dist/embedded-app/static/main.1f269f7a.js +492 -0
  40. package/dist/embedded-app/static/main.1f269f7a.js.map +1 -0
  41. package/dist/embedded-app/static/module-ajv.f2ae340e.js.map +1 -1
  42. package/dist/embedded-app/static/module-date-fns.667c4862.js.map +1 -1
  43. package/dist/embedded-app/static/module-hot-loader.baa19dda.js.map +1 -1
  44. package/dist/embedded-app/static/module-jss.df150ef8.js.map +1 -1
  45. package/dist/embedded-app/static/module-lodash.32f2edbb.js.map +1 -1
  46. package/dist/embedded-app/static/module-luxon.ee0def5d.js.map +1 -1
  47. package/dist/embedded-app/static/module-material-table.cd3af251.js.map +1 -1
  48. package/dist/embedded-app/static/module-material-ui.cd8dff4a.js.map +1 -1
  49. package/dist/embedded-app/static/module-react-beautiful-dnd.6085a9b0.js.map +1 -1
  50. package/dist/embedded-app/static/{module-yaml.0874c6f8.js → module-yaml.cef9da5e.js} +2 -2
  51. package/dist/embedded-app/static/module-yaml.cef9da5e.js.map +1 -0
  52. package/dist/embedded-app/static/module-zod.206c7997.js +3 -0
  53. package/dist/embedded-app/static/module-zod.206c7997.js.map +1 -0
  54. package/dist/embedded-app/static/react-syntax-highlighter/lowlight-import.6d99819e.chunk.js.map +1 -1
  55. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_abnf.e39098ec.chunk.js.map +1 -1
  56. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_accesslog.f0866c63.chunk.js.map +1 -1
  57. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_actionscript.07a8cb8b.chunk.js.map +1 -1
  58. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ada.cabf0da1.chunk.js.map +1 -1
  59. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_angelscript.a3a8277d.chunk.js.map +1 -1
  60. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_apache.ca80f87c.chunk.js.map +1 -1
  61. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_applescript.135bfeaa.chunk.js.map +1 -1
  62. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_arcade.26715cf0.chunk.js.map +1 -1
  63. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_arduino.222eae4d.chunk.js.map +1 -1
  64. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_armasm.36438d34.chunk.js.map +1 -1
  65. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_asciidoc.2f5b7895.chunk.js.map +1 -1
  66. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_aspectj.2b57cc97.chunk.js.map +1 -1
  67. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_autohotkey.e3c8bfdd.chunk.js.map +1 -1
  68. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_autoit.147f6883.chunk.js.map +1 -1
  69. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_avrasm.1c4bfd59.chunk.js.map +1 -1
  70. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_awk.ac969aa7.chunk.js.map +1 -1
  71. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_axapta.fd64947c.chunk.js.map +1 -1
  72. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_bash.0b9ed769.chunk.js.map +1 -1
  73. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_basic.eccb9aa9.chunk.js.map +1 -1
  74. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_bnf.fe69e953.chunk.js.map +1 -1
  75. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_brainfuck.ee6d6d18.chunk.js.map +1 -1
  76. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_c.3c6326f1.chunk.js.map +1 -1
  77. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_cLike.3e97e143.chunk.js.map +1 -1
  78. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_cal.4e11b53a.chunk.js.map +1 -1
  79. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_capnproto.85379200.chunk.js.map +1 -1
  80. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ceylon.4a7a71f8.chunk.js.map +1 -1
  81. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_clean.387c63bc.chunk.js.map +1 -1
  82. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_clojure.0dceed35.chunk.js.map +1 -1
  83. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_clojureRepl.9dabb11c.chunk.js.map +1 -1
  84. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_cmake.db17d430.chunk.js.map +1 -1
  85. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_coffeescript.f6d8e1a0.chunk.js.map +1 -1
  86. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_coq.9042b6b2.chunk.js.map +1 -1
  87. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_cos.e50bcc7d.chunk.js.map +1 -1
  88. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_cpp.82d44ead.chunk.js.map +1 -1
  89. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_crmsh.d381eca6.chunk.js.map +1 -1
  90. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_crystal.272a9559.chunk.js.map +1 -1
  91. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_csharp.d3c472c1.chunk.js.map +1 -1
  92. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_csp.d4ccbf98.chunk.js.map +1 -1
  93. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_css.0a9e5a1c.chunk.js.map +1 -1
  94. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_d.94da0b62.chunk.js.map +1 -1
  95. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dart.3786913e.chunk.js.map +1 -1
  96. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_delphi.94507fa8.chunk.js.map +1 -1
  97. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_diff.c75af221.chunk.js.map +1 -1
  98. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_django.c900f58e.chunk.js.map +1 -1
  99. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dns.1dd8382b.chunk.js.map +1 -1
  100. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dockerfile.a72872c7.chunk.js.map +1 -1
  101. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dos.fa8d03f3.chunk.js.map +1 -1
  102. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dsconfig.c5c47576.chunk.js.map +1 -1
  103. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dts.7b510c64.chunk.js.map +1 -1
  104. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dust.8c2deb45.chunk.js.map +1 -1
  105. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ebnf.11d9c7cc.chunk.js.map +1 -1
  106. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_elixir.3904fcdc.chunk.js.map +1 -1
  107. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_elm.eba0f5f3.chunk.js.map +1 -1
  108. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_erb.e8306333.chunk.js.map +1 -1
  109. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_erlang.bd9dfabc.chunk.js.map +1 -1
  110. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_erlangRepl.81bf896d.chunk.js.map +1 -1
  111. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_excel.11a999a4.chunk.js.map +1 -1
  112. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_fix.8fa1382d.chunk.js.map +1 -1
  113. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_flix.f9581318.chunk.js.map +1 -1
  114. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_fortran.82f42614.chunk.js.map +1 -1
  115. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_fsharp.1ab23dc7.chunk.js.map +1 -1
  116. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gams.f8848957.chunk.js.map +1 -1
  117. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gauss.dc02450b.chunk.js.map +1 -1
  118. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gcode.2898dc2c.chunk.js.map +1 -1
  119. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gherkin.d1d5658b.chunk.js.map +1 -1
  120. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_glsl.3293da06.chunk.js.map +1 -1
  121. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gml.9e71221f.chunk.js.map +1 -1
  122. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_go.8db77f58.chunk.js.map +1 -1
  123. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_golo.f5a950c4.chunk.js.map +1 -1
  124. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gradle.e2abba03.chunk.js.map +1 -1
  125. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_groovy.b688ce0f.chunk.js.map +1 -1
  126. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_haml.7c96773e.chunk.js.map +1 -1
  127. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_handlebars.2b1aa2f3.chunk.js.map +1 -1
  128. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_haskell.391c5d81.chunk.js.map +1 -1
  129. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_haxe.c3248588.chunk.js.map +1 -1
  130. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_hsp.7c51613c.chunk.js.map +1 -1
  131. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_htmlbars.29ebeff4.chunk.js.map +1 -1
  132. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_http.0d666e71.chunk.js.map +1 -1
  133. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_hy.a7c3ac6d.chunk.js.map +1 -1
  134. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_inform7.8b3a856c.chunk.js.map +1 -1
  135. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ini.ecdd651d.chunk.js.map +1 -1
  136. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_irpf90.fb690b85.chunk.js.map +1 -1
  137. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_isbl.00db46b1.chunk.js.map +1 -1
  138. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_java.9a95a2be.chunk.js.map +1 -1
  139. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_javascript.9dce5c58.chunk.js.map +1 -1
  140. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_jbossCli.5c16ea99.chunk.js.map +1 -1
  141. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_json.15050774.chunk.js.map +1 -1
  142. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_julia.838f4b42.chunk.js.map +1 -1
  143. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_juliaRepl.fe1b93bd.chunk.js.map +1 -1
  144. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_kotlin.e1b0b375.chunk.js.map +1 -1
  145. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_lasso.802249c5.chunk.js.map +1 -1
  146. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_latex.bc3d17c7.chunk.js.map +1 -1
  147. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ldif.bbef1e04.chunk.js.map +1 -1
  148. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_leaf.5bd76867.chunk.js.map +1 -1
  149. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_less.7deafe1c.chunk.js.map +1 -1
  150. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_lisp.d6ae9322.chunk.js.map +1 -1
  151. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_livecodeserver.86c42558.chunk.js.map +1 -1
  152. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_livescript.e488203b.chunk.js.map +1 -1
  153. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_llvm.c255e5d7.chunk.js.map +1 -1
  154. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_lsl.6a316349.chunk.js.map +1 -1
  155. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_lua.c95335ca.chunk.js.map +1 -1
  156. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_makefile.f2c5bd60.chunk.js.map +1 -1
  157. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_markdown.6464cedd.chunk.js.map +1 -1
  158. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mathematica.2e443797.chunk.js.map +1 -1
  159. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_matlab.4b560b02.chunk.js.map +1 -1
  160. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_maxima.69619b02.chunk.js.map +1 -1
  161. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mel.9b354734.chunk.js.map +1 -1
  162. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mercury.5613c599.chunk.js.map +1 -1
  163. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mipsasm.7281c70c.chunk.js.map +1 -1
  164. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mizar.d4e16722.chunk.js.map +1 -1
  165. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mojolicious.dcd5722f.chunk.js.map +1 -1
  166. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_monkey.7ef13093.chunk.js.map +1 -1
  167. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_moonscript.2d227b16.chunk.js.map +1 -1
  168. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_n1ql.dc787036.chunk.js.map +1 -1
  169. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_nginx.2c25fa32.chunk.js.map +1 -1
  170. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_nim.b7cc093e.chunk.js.map +1 -1
  171. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_nix.14ee6a41.chunk.js.map +1 -1
  172. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_nodeRepl.e51239c3.chunk.js.map +1 -1
  173. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_nsis.42bd0ec6.chunk.js.map +1 -1
  174. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_objectivec.4d2b6b78.chunk.js.map +1 -1
  175. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ocaml.71bd6857.chunk.js.map +1 -1
  176. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_oneC.6e9bd373.chunk.js.map +1 -1
  177. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_openscad.049274c0.chunk.js.map +1 -1
  178. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_oxygene.55cfb5e8.chunk.js.map +1 -1
  179. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_parser3.d2c708be.chunk.js.map +1 -1
  180. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_perl.8c1aa06b.chunk.js.map +1 -1
  181. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_pf.0223cc81.chunk.js.map +1 -1
  182. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_pgsql.77178bf9.chunk.js.map +1 -1
  183. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_php.bad25c03.chunk.js.map +1 -1
  184. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_phpTemplate.d7121bcf.chunk.js.map +1 -1
  185. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_plaintext.6313f5e4.chunk.js.map +1 -1
  186. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_pony.e09a7a8f.chunk.js.map +1 -1
  187. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_powershell.d5b5c33d.chunk.js.map +1 -1
  188. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_processing.65e160b6.chunk.js.map +1 -1
  189. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_profile.f852c59d.chunk.js.map +1 -1
  190. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_prolog.f397de12.chunk.js.map +1 -1
  191. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_properties.fd1db466.chunk.js.map +1 -1
  192. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_protobuf.8ab8a533.chunk.js.map +1 -1
  193. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_puppet.537bb714.chunk.js.map +1 -1
  194. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_purebasic.1d7e0865.chunk.js.map +1 -1
  195. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_python.4824cc5a.chunk.js.map +1 -1
  196. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_pythonRepl.ae681e7d.chunk.js.map +1 -1
  197. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_q.35cb97bc.chunk.js.map +1 -1
  198. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_qml.2cbe5345.chunk.js.map +1 -1
  199. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_r.7b8f8566.chunk.js.map +1 -1
  200. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_reasonml.740d48de.chunk.js.map +1 -1
  201. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_rib.28f71cc9.chunk.js.map +1 -1
  202. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_roboconf.a3dfe5d0.chunk.js.map +1 -1
  203. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_routeros.b3d0aad6.chunk.js.map +1 -1
  204. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_rsl.27f27574.chunk.js.map +1 -1
  205. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ruby.45e641c6.chunk.js.map +1 -1
  206. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ruleslanguage.cb817a76.chunk.js.map +1 -1
  207. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_rust.f82df236.chunk.js.map +1 -1
  208. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sas.111d6691.chunk.js.map +1 -1
  209. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_scala.d6161773.chunk.js.map +1 -1
  210. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_scheme.df9e0798.chunk.js.map +1 -1
  211. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_scilab.0f5a4588.chunk.js.map +1 -1
  212. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_scss.98065d4c.chunk.js.map +1 -1
  213. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_shell.1528656a.chunk.js.map +1 -1
  214. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_smali.3bf7bbf8.chunk.js.map +1 -1
  215. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_smalltalk.79718255.chunk.js.map +1 -1
  216. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sml.ff9a0389.chunk.js.map +1 -1
  217. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sqf.7cf62869.chunk.js.map +1 -1
  218. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sql.80fd4019.chunk.js.map +1 -1
  219. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sqlMore.3f7789bb.chunk.js.map +1 -1
  220. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_stan.262d2dee.chunk.js.map +1 -1
  221. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_stata.87f07d4d.chunk.js.map +1 -1
  222. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_step21.db98e52e.chunk.js.map +1 -1
  223. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_stylus.406058a9.chunk.js.map +1 -1
  224. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_subunit.ce1af113.chunk.js.map +1 -1
  225. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_swift.f2a2cdba.chunk.js.map +1 -1
  226. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_taggerscript.f4bc1bb5.chunk.js.map +1 -1
  227. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_tap.367ea734.chunk.js.map +1 -1
  228. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_tcl.802ccc02.chunk.js.map +1 -1
  229. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_thrift.10b7ec1d.chunk.js.map +1 -1
  230. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_tp.3646c41b.chunk.js.map +1 -1
  231. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_twig.f866e314.chunk.js.map +1 -1
  232. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_typescript.e4681d1d.chunk.js.map +1 -1
  233. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vala.4f6422d1.chunk.js.map +1 -1
  234. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vbnet.dec3a738.chunk.js.map +1 -1
  235. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vbscript.612b911b.chunk.js.map +1 -1
  236. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vbscriptHtml.3c097556.chunk.js.map +1 -1
  237. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_verilog.914ae836.chunk.js.map +1 -1
  238. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vhdl.6f7c3028.chunk.js.map +1 -1
  239. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vim.a3a567f0.chunk.js.map +1 -1
  240. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_x86asm.ac1eeb4d.chunk.js.map +1 -1
  241. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_xl.dec26abf.chunk.js.map +1 -1
  242. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_xml.befe59df.chunk.js.map +1 -1
  243. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_xquery.73a992c2.chunk.js.map +1 -1
  244. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_yaml.031487c1.chunk.js.map +1 -1
  245. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_zephir.14d469e9.chunk.js.map +1 -1
  246. package/dist/embedded-app/static/{runtime.a9307e40.js → runtime.1f269f7a.js} +2 -2
  247. package/dist/embedded-app/static/runtime.1f269f7a.js.map +1 -0
  248. package/dist/embedded-app/static/vendor.1f269f7a.js +102 -0
  249. package/dist/embedded-app/static/vendor.1f269f7a.js.map +1 -0
  250. package/dist/index.cjs.js +158 -6
  251. package/dist/index.cjs.js.map +1 -1
  252. package/package.json +6 -6
  253. package/dist/cjs/mkdocsServer-0af6527d.cjs.js.map +0 -1
  254. package/dist/embedded-app/static/3555.4d83af5a.chunk.js.map +0 -1
  255. package/dist/embedded-app/static/6583.0b42ebbe.chunk.js.map +0 -1
  256. package/dist/embedded-app/static/7110.135c2721.chunk.js.map +0 -1
  257. package/dist/embedded-app/static/7758.75aef2ae.chunk.js +0 -3
  258. package/dist/embedded-app/static/7758.75aef2ae.chunk.js.map +0 -1
  259. package/dist/embedded-app/static/8718.bd799167.chunk.js.map +0 -1
  260. package/dist/embedded-app/static/main.a9307e40.js +0 -487
  261. package/dist/embedded-app/static/main.a9307e40.js.map +0 -1
  262. package/dist/embedded-app/static/module-yaml.0874c6f8.js.map +0 -1
  263. package/dist/embedded-app/static/module-zod.53b5d347.js +0 -3
  264. package/dist/embedded-app/static/module-zod.53b5d347.js.map +0 -1
  265. package/dist/embedded-app/static/runtime.a9307e40.js.map +0 -1
  266. package/dist/embedded-app/static/vendor.a9307e40.js +0 -102
  267. package/dist/embedded-app/static/vendor.a9307e40.js.map +0 -1
@@ -0,0 +1,492 @@
1
+ (()=>{var nl=Object.defineProperty;var rl=(ne,s,e)=>s in ne?nl(ne,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):ne[s]=e;var q=(ne,s,e)=>(rl(ne,typeof s!="symbol"?s+"":s,e),e),Ao=(ne,s,e)=>{if(!s.has(ne))throw TypeError("Cannot "+e)};var ot=(ne,s,e)=>(Ao(ne,s,"read from private field"),e?e.call(ne):s.get(ne)),Fn=(ne,s,e)=>{if(s.has(ne))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(ne):s.set(ne,e)},Nn=(ne,s,e,r)=>(Ao(ne,s,"write to private field"),r?r.call(ne,e):s.set(ne,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(ne,s,e){"use strict";e.d(s,{n3:function(){return R},MS:function(){return f}});var r=e(48023),t=e(10179),c=e(96279),i=e.n(c);const R=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class f{constructor(u){q(this,"discoveryApi");q(this,"fetchApi");this.discoveryApi=u.discoveryApi,this.fetchApi=u.fetchApi||{fetch:i()}}async getEntityAncestors(u,m){const{kind:y,namespace:h,name:E}=(0,r.of)(u.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(h)}/${encodeURIComponent(E)}/ancestry`,m)}async getLocationById(u,m){return await this.requestOptional("GET",`/locations/${encodeURIComponent(u)}`,m)}async getEntities(u,m){const{filter:y=[],fields:h=[],offset:E,limit:S,after:b}=u!=null?u:{},L=[];for(const x of[y].flat()){const O=[];for(const[M,K]of Object.entries(x))for(const re of[K].flat())re===R?O.push(encodeURIComponent(M)):typeof re=="string"&&O.push(`${encodeURIComponent(M)}=${encodeURIComponent(re)}`);O.length&&L.push(`filter=${O.join(",")}`)}h.length&&L.push(`fields=${h.map(encodeURIComponent).join(",")}`),E!==void 0&&L.push(`offset=${E}`),S!==void 0&&L.push(`limit=${S}`),b!==void 0&&L.push(`after=${encodeURIComponent(b)}`);const $=L.length?`?${L.join("&")}`:"",B=await this.requestRequired("GET",`/entities${$}`,m),D=(x,O)=>{var re,le;if(((re=x.metadata)==null?void 0:re.name)===void 0||x.kind===void 0||((le=O.metadata)==null?void 0:le.name)===void 0||O.kind===void 0)return 0;const M=(0,r.eE)(x),K=(0,r.eE)(O);return M<K?-1:M>K?1:0};return{items:B.sort(D)}}async getEntityByRef(u,m){const{kind:y,namespace:h,name:E}=(0,r.of)(u);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(h)}/${encodeURIComponent(E)}`,m)}async getEntityByName(u,m){const{kind:y,namespace:h="default",name:E}=u;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(h)}/${encodeURIComponent(E)}`,m)}async refreshEntity(u,m){const y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(m==null?void 0:m.token)&&{Authorization:`Bearer ${m==null?void 0:m.token}`}},method:"POST",body:JSON.stringify({entityRef:u})});if(y.status!==200)throw new Error(await y.text())}async getEntityFacets(u,m){const{filter:y=[],facets:h}=u,E=[];for(const b of[y].flat()){const L=[];for(const[$,B]of Object.entries(b))for(const D of[B].flat())D===R?L.push(encodeURIComponent($)):typeof D=="string"&&L.push(`${encodeURIComponent($)}=${encodeURIComponent(D)}`);L.length&&E.push(`filter=${L.join(",")}`)}for(const b of h)E.push(`facet=${encodeURIComponent(b)}`);const S=E.length?`?${E.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${S}`,m)}async addLocation({type:u="url",target:m,dryRun:y},h){const E=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${y?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(h==null?void 0:h.token)&&{Authorization:`Bearer ${h==null?void 0:h.token}`}},method:"POST",body:JSON.stringify({type:u,target:m})});if(E.status!==201)throw new Error(await E.text());const{location:S,entities:b,exists:L}=await E.json();if(!S)throw new Error(`Location wasn't added: ${m}`);return{location:S,entities:b,exists:L}}async getLocationByRef(u,m){return(await this.requestRequired("GET","/locations",m)).map(h=>h.data).find(h=>u===(0,r.NZ)(h))}async removeLocationById(u,m){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(u)}`,m)}async removeEntityByUid(u,m){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(u)}`,m)}async requestIgnored(u,m,y){const h=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},S=await this.fetchApi.fetch(h,{method:u,headers:E});if(!S.ok)throw await t.VL.fromResponse(S)}async requestRequired(u,m,y){const h=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},S=await this.fetchApi.fetch(h,{method:u,headers:E});if(!S.ok)throw await t.VL.fromResponse(S);return await S.json()}async requestOptional(u,m,y){const h=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},S=await this.fetchApi.fetch(h,{method:u,headers:E});if(!S.ok){if(S.status===404)return;throw await t.VL.fromResponse(S)}return await S.json()}}},48023:function(ne,s,e){"use strict";e.d(s,{Tf:function(){return c},P1:function(){return Gt},q1:function(){return dn},M6:function(){return In},l2:function(){return t},zG:function(){return r},w$:function(){return Pe},nP:function(){return fe},aS:function(){return Rt},S4:function(){return Ue},cz:function(){return gt},iB:function(){return Tt},CV:function(){return Xe},of:function(){return At},Ou:function(){return Qt},eE:function(){return Ie},NZ:function(){return Zt}});const r="default",t="backstage.io/view-url",c="backstage.io/edit-url",i="kubernetes.io/api-server",R="kubernetes.io/api-server-certificate-authority",f="kubernetes.io/auth-provider";var o=e(76635),u=e.n(o);class m{constructor(j=DEFAULT_NAMESPACE){q(this,"namespace");this.namespace=j}async enforce(j){return j.metadata.namespace?j:lodash.merge({metadata:{namespace:this.namespace}},j)}}class y{static isValidPrefixAndOrSuffix(j,ye,Ke,qe){if(typeof j!="string")return!1;const st=j.split(ye);return st.length===1?qe(st[0]):st.length===2?Ke(st[0])&&qe(st[1]):!1}static isJsonSafe(j){try{return u().isEqual(j,JSON.parse(JSON.stringify(j)))}catch{return!1}}static isValidDnsSubdomain(j){return typeof j=="string"&&j.length>=1&&j.length<=253&&j.split(".").every(y.isValidDnsLabel)}static isValidDnsLabel(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(j)}static isValidTag(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(j)}static isValidUrl(j){if(typeof j!="string")return!1;try{return new URL(j),!0}catch{return!1}}static isValidString(j){var ye;return typeof j=="string"&&((ye=j==null?void 0:j.trim())==null?void 0:ye.length)>=1}static isNonEmptyString(j){var ye;return typeof j=="string"&&((ye=j==null?void 0:j.trim())==null?void 0:ye.length)>=1}}var h=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}}}}}'),E=e(48231),S=e.n(E),b=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"}}}`),L=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},"type":{"type":"string","description":"An optional value to categorize links into specific groups.","examples":["runbook","documentation","logs","dashboard"],"minLength":1}}}}}}'),$=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"},"targetRef":{"type":"string","minLength":1,"description":"The entity ref of the target of this relation."}}},"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 B=new Map,D=[h,b,L,$];function x(ue){if(!(ue!=null&&ue.length))throw new TypeError("Unknown error");const j=ue[0];throw new TypeError(`${j.instancePath||"<root>"} ${j.message}${j.params?` - ${Object.entries(j.params).map(([ye,Ke])=>`${ye}: ${Ke}`).join(", ")}`:""}`)}function O(ue,j={}){var Yt;const ye=(Yt=j==null?void 0:j.disableCache)!=null?Yt:!1,Ke=ye?"":JSON.stringify(ue);if(!ye){const _t=B.get(Ke);if(_t)return _t}const qe=M(ue),st=new(S())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});qe.length&&st.addSchema(qe,void 0,void 0,!0);const St=st.compile(ue);return ye||B.set(Ke,St),St}function M(ue){if(typeof ue!="object")return[];const j=new Set;ue.$id&&j.add(ue.$id);const ye=new Array,Ke=[ue];for(;Ke.length;){const qe=Ke.pop();for(const st of K(qe))if(!j.has(st)){j.add(st);const St=D.find(Yt=>Yt.$id===st);St&&(ye.push(St),Ke.push(St))}}return ye}function*K(ue){const j=[ue];for(;j.length;){const ye=j.pop();if(typeof ye=="object"&&ye)for(const[Ke,qe]of Object.entries(ye))Ke==="$ref"&&typeof qe=="string"?yield qe.split("#")[0]:j.push(qe)}}function re(ue){const j=compileAjvSchema(ue||entityEnvelopeSchema);return ye=>{if(j(ye)===!0)return ye;throw throwAjvError(j.errors)}}function le(ue){const j=O(ue);return ye=>{var st;if(j(ye)===!0)return ye;const qe=(st=j.errors)==null?void 0:st.filter(St=>["/kind","/apiVersion"].includes(St.instancePath));if((qe==null?void 0:qe.length)&&qe.every(St=>St.keyword==="enum"))return!1;throw x(j.errors)}}function Re(ue){const j=compileAjvSchema(ue||entitySchema);return ye=>{if(j(ye)===!0)return ye;throw throwAjvError(j.errors)}}class Fe{static isValidApiVersion(j){return y.isValidPrefixAndOrSuffix(j,"/",y.isValidDnsSubdomain,ye=>ye.length>=1&&ye.length<=63&&/^[a-z0-9A-Z]+$/.test(ye))}static isValidKind(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(j)}static isValidObjectName(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(j)}static isValidNamespace(j){return y.isValidDnsLabel(j)}static isValidLabelKey(j){return y.isValidPrefixAndOrSuffix(j,"/",y.isValidDnsSubdomain,Fe.isValidObjectName)}static isValidLabelValue(j){return j===""||Fe.isValidObjectName(j)}static isValidAnnotationKey(j){return y.isValidPrefixAndOrSuffix(j,"/",y.isValidDnsSubdomain,Fe.isValidObjectName)}static isValidAnnotationValue(j){return typeof j=="string"}}const Be={isValidApiVersion:Fe.isValidApiVersion,isValidKind:Fe.isValidKind,isValidEntityName:Fe.isValidObjectName,isValidNamespace:Fe.isValidNamespace,isValidLabelKey:Fe.isValidLabelKey,isValidLabelValue:Fe.isValidLabelValue,isValidAnnotationKey:Fe.isValidAnnotationKey,isValidAnnotationValue:Fe.isValidAnnotationValue,isValidTag:ue=>typeof ue=="string"&&ue.length>=1&&ue.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(ue)};function He(ue={}){return{...Be,...ue}}class ve{constructor(j=makeValidator()){q(this,"validators");this.validators=j}async enforce(j){var St,Yt,_t,en,mn,Xt,U;function ye(J,de,Ce){if(de==null)throw new Error(`${J} must have a value`);let xe;try{xe=Ce(de)}catch(we){throw new Error(`${J} could not be validated, ${we}`)}if(!xe){let we;switch(Ce.name){case"isValidLabelValue":case"isValidObjectName":we="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":we="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":we="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":we="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":we="a string";break;case"isValidKind":we="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":we="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":we="a non empty string";break;default:we=void 0;break}const pt=we?` expected ${we} but found "${de}".`:"";throw new Error(`"${J}" is not valid;${pt} 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 Ke(J,de,Ce){return de===void 0||ye(J,de,Ce)}ye("apiVersion",j.apiVersion,this.validators.isValidApiVersion),ye("kind",j.kind,this.validators.isValidKind),ye("metadata.name",j.metadata.name,this.validators.isValidEntityName),Ke("metadata.namespace",j.metadata.namespace,this.validators.isValidNamespace);for(const[J,de]of Object.entries((St=j.metadata.labels)!=null?St:[]))ye(`labels.${J}`,J,this.validators.isValidLabelKey),ye(`labels.${J}`,de,this.validators.isValidLabelValue);for(const[J,de]of Object.entries((Yt=j.metadata.annotations)!=null?Yt:[]))ye(`annotations.${J}`,J,this.validators.isValidAnnotationKey),ye(`annotations.${J}`,de,this.validators.isValidAnnotationValue);const qe=(_t=j.metadata.tags)!=null?_t:[];for(let J=0;J<qe.length;++J)ye(`tags.${J}`,qe[J],this.validators.isValidTag);const st=(en=j.metadata.links)!=null?en:[];for(let J=0;J<st.length;++J)ye(`links.${J}.url`,(mn=st[J])==null?void 0:mn.url,CommonValidatorFunctions.isValidUrl),Ke(`links.${J}.title`,(Xt=st[J])==null?void 0:Xt.title,CommonValidatorFunctions.isNonEmptyString),Ke(`links.${J}.icon`,(U=st[J])==null?void 0:U.icon,KubernetesValidatorFunctions.isValidObjectName);return j}}class Je{constructor(){q(this,"validate")}async enforce(j){if(!this.validate){const qe=new Ajv({allowUnionTypes:!0});this.validate=qe.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(j)===!0)return j;const[Ke]=this.validate.errors||[];throw Ke?new Error(`Malformed envelope, ${Ke.instancePath||"<root>"} ${Ke.message}`):new Error("Malformed envelope, Unknown error")}}function tt(ue){let j=ue.indexOf(":");const ye=ue.indexOf("/");ye!==-1&&ye<j&&(j=-1);const Ke=j===-1?void 0:ue.slice(0,j),qe=ye===-1?void 0:ue.slice(j+1,ye),st=ue.slice(Math.max(j+1,ye+1));if(Ke===""||qe===""||st==="")throw new TypeError(`Entity reference "${ue}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:Ke,namespace:qe,name:st}}function Tt(ue){return{kind:ue.kind,namespace:ue.metadata.namespace||r,name:ue.metadata.name}}function At(ue,j){var Yt,_t,en,mn;if(!ue)throw new Error("Entity reference must not be empty");const ye=j==null?void 0:j.defaultKind,Ke=(j==null?void 0:j.defaultNamespace)||r;let qe,st,St;if(typeof ue=="string"){const Xt=tt(ue);qe=(Yt=Xt.kind)!=null?Yt:ye,st=(_t=Xt.namespace)!=null?_t:Ke,St=Xt.name}else qe=(en=ue.kind)!=null?en:ye,st=(mn=ue.namespace)!=null?mn:Ke,St=ue.name;if(qe)if(st){if(!St){const Xt=JSON.stringify(ue);throw new Error(`Entity reference ${Xt} had missing or empty name`)}}else{const Xt=JSON.stringify(ue);throw new Error(`Entity reference ${Xt} had missing or empty namespace`)}else{const Xt=JSON.stringify(ue);throw new Error(`Entity reference ${Xt} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:qe,namespace:st,name:St}}function Ie(ue){var qe,st;let j,ye,Ke;return"metadata"in ue?(j=ue.kind,ye=(qe=ue.metadata.namespace)!=null?qe:r,Ke=ue.metadata.name):(j=ue.kind,ye=(st=ue.namespace)!=null?st:r,Ke=ue.name),`${j.toLocaleLowerCase("en-US")}:${ye.toLocaleLowerCase("en-US")}/${Ke.toLocaleLowerCase("en-US")}`}class mt{constructor(j){this.policies=j}async enforce(j){let ye=j;for(const Ke of this.policies){const qe=await Ke.enforce(ye);if(!qe)throw new Error(`Policy ${Ke.constructor.name} did not return a result`);ye=qe}return ye}}class ht{constructor(j){this.policies=j}async enforce(j){for(const ye of this.policies){const Ke=await ye.enforce(j);if(Ke)return Ke}throw new Error("The entity did not match any known policy")}}const lt={allOf(ue){return new mt(ue)},oneOf(ue){return new ht(ue)}};var ee=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 pe(ue){const j=le(ue);return{async check(ye){return j(ye)===ye}}}const be=pe(ee);var We=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 et=pe(We);var at=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 yt=pe(at);var se=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 ae=pe(se);var Ye=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 Ve=pe(Ye),Ue="ownedBy",nt="ownerOf",Q="consumesApi",z="apiConsumedBy",_="providesApi",ce="apiProvidedBy",fe="dependsOn",Pe="dependencyOf",Oe="parentOf",Se="childOf",Qe="memberOf",Ge="hasMember",gt="partOf",Rt="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 Ft=pe(ut);var xt=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 bt=pe(xt);var Pt=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 Vt=pe(Pt),Gt="backstage.io/managed-by-location",dn="backstage.io/managed-by-origin-location",In="backstage.io/source-location";function Qt(ue){if(typeof ue!="string")throw new TypeError(`Unable to parse location ref '${ue}', unexpected argument ${typeof ue}`);const j=ue.indexOf(":");if(j<0)throw new TypeError(`Unable to parse location ref '${ue}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const ye=ue.substring(0,j).trim(),Ke=ue.substring(j+1).trim();if(!ye||!Ke)throw new TypeError(`Unable to parse location ref '${ue}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(ye==="http"||ye==="https")throw new TypeError(`Invalid location ref '${ue}', please prefix it with 'url:', e.g. 'url:${ue}'`);return{type:ye,target:Ke}}function Zt(ue){const{type:j,target:ye}=ue;if(j){if(!ye)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${j}:${ye}`}function Xe(ue){var ye,Ke,qe,st,St;const j=(St=(Ke=(ye=ue.metadata)==null?void 0:ye.annotations)==null?void 0:Ke[In])!=null?St:(st=(qe=ue.metadata)==null?void 0:qe.annotations)==null?void 0:st[Gt];if(!j)throw new Error(`Entity '${Ie(ue)}' is missing location`);return Qt(j)}},23235:function(ne,s,e){"use strict";e.d(s,{C:function(){return t}});var r=e(98005);class t{constructor(){q(this,"subject",new r.J)}post(i){this.subject.next(i)}alert$(){return this.subject}}},47150:function(ne,s,e){"use strict";e.d(s,{g:function(){return r}});class r{captureEvent(c){}}},58652:function(ne,s,e){"use strict";e.d(s,{C:function(){return c}});var r=e(98005);const t="theme";class c{constructor(R){q(this,"activeThemeId");q(this,"subject",new r.X(void 0));this.themes=R}static createWithStorage(R){var u;const f=new c(R);if(!window.localStorage)return f;const o=(u=window.localStorage.getItem(t))!=null?u:void 0;return f.setActiveThemeId(o),f.activeThemeId$().subscribe(m=>{m?window.localStorage.setItem(t,m):window.localStorage.removeItem(t)}),window.addEventListener("storage",m=>{var y;if(m.key===t){const h=(y=localStorage.getItem(t))!=null?y:void 0;f.setActiveThemeId(h)}}),f}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(R){this.activeThemeId=R,this.subject.next(R)}}},14721:function(ne,s,e){"use strict";e.d(s,{m:function(){return m}});var r=e(9850),t=e.n(r),c=e(12782),i=e.n(c);const R=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function f(y){return typeof y=="object"&&y!==null&&!Array.isArray(y)}function o(y){if(y===null)return"null";if(Array.isArray(y))return"array";const h=typeof y;return h==="number"&&isNaN(y)?"nan":h==="string"&&y===""?"empty-string":h}const u={type(y,h,E,S){return`Invalid type in config for key '${y}' in '${h}', got ${E}, wanted ${S}`},missing(y){return`Missing required config value at '${y}'`},convert(y,h,E){return`Unable to convert config value for key '${y}' in '${h}' to a ${E}`}};class m{constructor(h,E="mock-config",S,b=""){q(this,"filteredKeys");q(this,"notifiedFilteredKeys",new Set);this.data=h,this.context=E,this.fallback=S,this.prefix=b}static fromConfigs(h){return h.length===0?new m(void 0):h.reduce((E,{data:S,context:b,filteredKeys:L,deprecatedKeys:$})=>{const B=new m(S,b,E);if(B.filteredKeys=L,$)for(const{key:D,description:x}of $)console.warn(`The configuration key '${D}' of ${b} is deprecated and may be removed soon. ${x||""}`);return B},void 0)}has(h){var S,b;return this.readValue(h)!==void 0?!0:(b=(S=this.fallback)==null?void 0:S.has(h))!=null?b:!1}keys(){var S,b;const h=this.data?Object.keys(this.data):[],E=(b=(S=this.fallback)==null?void 0:S.keys())!=null?b:[];return[...new Set([...h,...E])]}get(h){const E=this.getOptional(h);if(E===void 0)throw new Error(u.missing(this.fullKey(h!=null?h:"")));return E}getOptional(h){var b;const E=t()(this.readValue(h)),S=(b=this.fallback)==null?void 0:b.getOptional(h);return E===void 0?S:S===void 0?E:i()({},{value:S},{value:E},(L,$)=>!f($)||!f(L)?$:void 0).value}getConfig(h){const E=this.getOptionalConfig(h);if(E===void 0)throw new Error(u.missing(this.fullKey(h)));return E}getOptionalConfig(h){var b;const E=this.readValue(h),S=(b=this.fallback)==null?void 0:b.getOptionalConfig(h);if(f(E))return this.copy(E,h,S);if(E!==void 0)throw new TypeError(u.type(this.fullKey(h),this.context,o(E),"object"));return S}getConfigArray(h){const E=this.getOptionalConfigArray(h);if(E===void 0)throw new Error(u.missing(this.fullKey(h)));return E}getOptionalConfigArray(h){const E=this.readConfigValue(h,S=>{if(!Array.isArray(S))return{expected:"object-array"};for(const[b,L]of S.entries())if(!f(L))return{expected:"object-array",value:L,key:`${h}[${b}]`};return!0});if(!!E)return E.map((S,b)=>this.copy(S,`${h}[${b}]`))}getNumber(h){const E=this.getOptionalNumber(h);if(E===void 0)throw new Error(u.missing(this.fullKey(h)));return E}getOptionalNumber(h){const E=this.readConfigValue(h,b=>typeof b=="number"||typeof b=="string"||{expected:"number"});if(typeof E=="number"||E===void 0)return E;const S=Number(E);if(!Number.isFinite(S))throw new Error(u.convert(this.fullKey(h),this.context,"number"));return S}getBoolean(h){const E=this.getOptionalBoolean(h);if(E===void 0)throw new Error(u.missing(this.fullKey(h)));return E}getOptionalBoolean(h){return this.readConfigValue(h,E=>typeof E=="boolean"||{expected:"boolean"})}getString(h){const E=this.getOptionalString(h);if(E===void 0)throw new Error(u.missing(this.fullKey(h)));return E}getOptionalString(h){return this.readConfigValue(h,E=>typeof E=="string"&&E!==""||{expected:"string"})}getStringArray(h){const E=this.getOptionalStringArray(h);if(E===void 0)throw new Error(u.missing(this.fullKey(h)));return E}getOptionalStringArray(h){return this.readConfigValue(h,E=>{if(!Array.isArray(E))return{expected:"string-array"};for(const[S,b]of E.entries())if(typeof b!="string"||b==="")return{expected:"string-array",value:b,key:`${h}[${S}]`};return!0})}fullKey(h){return`${this.prefix}${this.prefix?".":""}${h}`}copy(h,E,S){const b=new m(h,this.context,S,this.fullKey(E));return b.filteredKeys=this.filteredKeys,b}readConfigValue(h,E){var L;const S=this.readValue(h);if(S===void 0)return(L=this.fallback)==null?void 0:L.readConfigValue(h,E);const b=E(S);if(b!==!0){const{key:$=h,value:B=S,expected:D}=b;throw new TypeError(u.type(this.fullKey($),this.context,o(B),D))}return S}readValue(h){const E=h?h.split("."):[];for(const b of E)if(!R.test(b))throw new TypeError(`Invalid config key '${h}'`);if(this.data===void 0)return;let S=this.data;for(const[b,L]of E.entries())if(f(S))S=S[L];else if(S!==void 0){const $=this.fullKey(E.slice(0,b).join("."));throw new TypeError(u.type($,this.context,o(S),"object"))}return S}}},4333:function(ne,s,e){"use strict";e.d(s,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(i){const R=i.split(/\{\{\s*pluginId\s*\}\}/),f=R.join("pluginId");let o;try{o=new URL(f)}catch{throw new Error(`${r} URL '${f}' is invalid`)}if(o.hash)throw new Error(`${r} URL must not have a hash`);if(o.search)throw new Error(`${r} URL must not have a query`);if(f.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(R)}constructor(i){this.parts=i}async getBaseUrl(i){return this.parts.join(i)}}},89536:function(ne,s,e){"use strict";e.d(s,{KN:function(){return r},gr:function(){return c},Jv:function(){return i}});class r{constructor(f,o){this.alertApi=f,this.errorApi=o}post(f,o){return o!=null&&o.hidden||this.alertApi.post({message:f.message,severity:"error"}),this.errorApi.post(f,o)}error$(){return this.errorApi.error$()}}var t=e(98005);class c{constructor(){q(this,"subject",new t.J)}post(f,o){this.subject.next({error:f,context:o})}error$(){return this.subject}}class i{static forward(f,o){window.addEventListener("unhandledrejection",u=>{f.post(u.reason,o)})}}},14884:function(ne,s,e){"use strict";e.d(s,{b:function(){return c}});var r=e(36964);function t(i){if(i.length<3)throw new Error(`The '${i}' feature flag must have a minimum length of three characters.`);if(i.length>150)throw new Error(`The '${i}' feature flag must not exceed 150 characters.`);if(!i.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${i}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class c{constructor(){q(this,"registeredFeatureFlags",[]);q(this,"flags")}registerFlag(R){t(R.name),this.registeredFeatureFlags.push(R)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(R){return this.flags||(this.flags=this.load()),this.flags.get(R)===r.FeatureFlagState.Active}save(R){this.flags||(this.flags=this.load()),R.merge||this.flags.clear();for(const[o,u]of Object.entries(R.states))this.flags.set(o,u);const f=Array.from(this.flags.entries()).filter(([,o])=>o===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(f)))}load(){try{const R=window.localStorage.getItem("featureFlags");if(!R)return new Map;const f=JSON.parse(R);if(typeof f!="object"||f===null||Array.isArray(f))return new Map;const o=Object.entries(f).filter(([u,m])=>(t(u),m===r.FeatureFlagState.Active));return new Map(o)}catch{return new Map}}}},50160:function(ne,s,e){"use strict";e.d(s,{I:function(){return u},j:function(){return r}});function r(m){var E;let y=m.baseImplementation||e.g.fetch;const h=[(E=m.middleware)!=null?E:[]].flat().reverse();for(const S of h)y=S.apply(y);return{fetch:y}}class t{static create(y){var b,L;const h=c(y),E=((b=y.header)==null?void 0:b.name)||"authorization",S=((L=y.header)==null?void 0:L.value)||($=>`Bearer ${$}`);return new t(y.identityApi,h,E,S)}constructor(y,h,E,S){this.identityApi=y,this.allowUrl=h,this.headerName=E,this.headerValue=S}apply(y){return async(h,E)=>{const S=new Request(h,E),{token:b}=await this.identityApi.getCredentials();return S.headers.get(this.headerName)||typeof b!="string"||!b||!this.allowUrl(S.url)?y(h,E):(S.headers.set(this.headerName,this.headerValue(b)),y(S))}}}function c(m){return m.allowUrl?m.allowUrl:m.urlPrefixAllowlist?i(m.urlPrefixAllowlist):m.config?i([m.config.getString("backend.baseUrl")]):()=>!1}function i(m){const y=m.map(h=>h.replace(/\/$/,""));return h=>y.some(E=>h===E||h.startsWith(`${E}/`))}function R(m,y){return!y||y==="/"?m:`${m.replace(/\/$/,"")}/${y.replace(/^\//,"")}`}class f{constructor(y){this.discoveryApi=y}apply(y){return async(h,E)=>{const S=new Request(h,E),b="plugin://";if(!S.url.startsWith(b))return y(h,E);const{hostname:L,pathname:$,search:B,hash:D,username:x,password:O}=new URL(`http://${S.url.substring(b.length)}`);let M=await this.discoveryApi.getBaseUrl(L);if(x||O){const re=new URL(M),le=`${x}${O?`:${O}`:""}@`;M=`${re.protocol}//${le}${re.host}${re.pathname}`}const K=`${R(M,$)}${B}${D}`;return y(K,typeof h=="string"||o(h)?E:h)}}}function o(m){return typeof m=="object"&&(m==null?void 0:m.constructor)===URL}class u{static resolvePluginProtocol(y){return new f(y.discoveryApi)}static injectIdentityAuth(y){return t.create(y)}constructor(){}}},11358:function(ne,s,e){"use strict";e.d(s,{Y:function(){return R}});var r=e(98005);function t(f,o){for(const u of o)if(!f.has(u))return!1;return!0}function c(f,...o){const u=new Set(f);for(const m of o)for(const y of m)u.add(y);return u}class i{constructor(){q(this,"requests",[]);q(this,"subject",new r.X(this.getCurrentPending()))}request(o){return new Promise((u,m)=>{this.requests.push({scopes:o,resolve:u,reject:m}),this.subject.next(this.getCurrentPending())})}resolve(o,u){this.requests=this.requests.filter(m=>t(o,m.scopes)?(m.resolve(u),!1):!0),this.subject.next(this.getCurrentPending())}reject(o){this.requests.forEach(u=>u.reject(o)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const o=this.requests.length===0?void 0:this.requests.slice(1).reduce((u,m)=>c(u,m.scopes),this.requests[0].scopes);return{scopes:o,resolve:u=>{o&&this.resolve(o,u)},reject:u=>{o&&this.reject(u)}}}}class R{constructor(){q(this,"subject",new r.X([]));q(this,"currentRequests",[]);q(this,"handlerCount",0)}createAuthRequester(o){const u=new i,m=this.handlerCount;return this.handlerCount++,u.pending().subscribe({next:y=>{const h=this.currentRequests.slice(),E=this.makeAuthRequest(y,o);E?h[m]=E:delete h[m],this.currentRequests=h,this.subject.next(h.filter(Boolean))}}),y=>u.request(y)}makeAuthRequest(o,u){const{scopes:m}=o;if(!!m)return{provider:u.provider,trigger:async()=>{const y=await u.onAuthRequest(m);o.resolve(y)},reject:()=>{const y=new Error("Login failed, rejected by user");y.name="RejectedError",o.reject(y)}}}authRequest$(){return this.subject}}},56054:function(ne,s,e){"use strict";e.d(s,{C:function(){return i}});var r=e(82394),t=e.n(r);const c=new Map;class i{constructor(f,o){q(this,"subscribers",new Set);q(this,"observable",new(t())(f=>(this.subscribers.add(f),()=>{this.subscribers.delete(f)})));this.namespace=f,this.errorApi=o}static create(f){var o;return new i((o=f.namespace)!=null?o:"",f.errorApi)}get(f){return this.snapshot(f).value}snapshot(f){let o,u="absent";try{const m=localStorage.getItem(this.getKeyName(f));m&&(o=JSON.parse(m,(y,h)=>(typeof h=="object"&&h!==null&&Object.freeze(h),h)),u="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${f}`))}return{key:f,value:o,presence:u}}forBucket(f){const o=`${this.namespace}/${f}`;return c.has(o)||c.set(o,new i(o,this.errorApi)),c.get(o)}async set(f,o){localStorage.setItem(this.getKeyName(f),JSON.stringify(o)),this.notifyChanges(f)}async remove(f){localStorage.removeItem(this.getKeyName(f)),this.notifyChanges(f)}observe$(f){return this.observable.filter(({key:o})=>o===f)}getKeyName(f){return`${this.namespace}/${encodeURIComponent(f)}`}notifyChanges(f){const o=this.snapshot(f);for(const u of this.subscribers)u.next(o)}}},59589:function(ne,s,e){"use strict";e.d(s,{u:function(){return c}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:o="development",provider:u=t,oauthRequestApi:m}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:o})}}},6098:function(ne,s,e){"use strict";e.d(s,{Z:function(){return c}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:o="development",provider:u=t,oauthRequestApi:m,defaultScopes:y=["team"]}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:o,defaultScopes:y})}}},44431:function(ne,s,e){"use strict";e.d(s,{BitbucketAuth:function(){return c.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var c=e(6098)},19347:function(){},44474:function(ne,s,e){"use strict";e.d(s,{T:function(){return c}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:o="development",provider:u=t,oauthRequestApi:m,defaultScopes:y=["read:user"]}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:o,defaultScopes:y})}}},2922:function(ne,s,e){"use strict";e.d(s,{a:function(){return c}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:o="development",provider:u=t,oauthRequestApi:m,defaultScopes:y=["read_user"]}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:o,defaultScopes:y})}}},59938:function(ne,s,e){"use strict";e.d(s,{e:function(){return i}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},c="https://www.googleapis.com/auth/";class i{static create(f){const{discoveryApi:o,oauthRequestApi:u,environment:m="development",provider:y=t,defaultScopes:h=["openid",`${c}userinfo.email`,`${c}userinfo.profile`]}=f;return r.OAuth2.create({discoveryApi:o,oauthRequestApi:u,provider:y,environment:m,defaultScopes:h,scopeTransform(E){return E.map(S=>S==="openid"?S:S==="profile"||S==="email"?`${c}userinfo.${S}`:S.startsWith(c)?S:`${c}${S}`)}})}}},91668:function(ne,s,e){"use strict";e.d(s,{AtlassianAuth:function(){return y.u},BitbucketAuth:function(){return m.BitbucketAuth},GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return c.e},MicrosoftAuth:function(){return o._},OktaAuth:function(){return R.s},OneLoginAuth:function(){return u.$}});var r=e(44474),t=e(2922),c=e(59938),i=e(91205);e.o(i,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return i.AlertApiForwarder}}),e.o(i,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return i.AppThemeSelector}}),e.o(i,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return i.AtlassianAuth}}),e.o(i,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return i.BitbucketAuth}}),e.o(i,"ConfigReader")&&e.d(s,{ConfigReader:function(){return i.ConfigReader}}),e.o(i,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return i.ErrorAlerter}}),e.o(i,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return i.ErrorApiForwarder}}),e.o(i,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return i.FetchMiddlewares}}),e.o(i,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return i.FlatRoutes}}),e.o(i,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return i.LocalStorageFeatureFlags}}),e.o(i,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return i.MicrosoftAuth}}),e.o(i,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return i.NoOpAnalyticsApi}}),e.o(i,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return i.OAuthRequestManager}}),e.o(i,"OktaAuth")&&e.d(s,{OktaAuth:function(){return i.OktaAuth}}),e.o(i,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return i.OneLoginAuth}}),e.o(i,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return i.UnhandledErrorForwarder}}),e.o(i,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return i.UrlPatternDiscovery}}),e.o(i,"WebStorage")&&e.d(s,{WebStorage:function(){return i.WebStorage}}),e.o(i,"createFetchApi")&&e.d(s,{createFetchApi:function(){return i.createFetchApi}}),e.o(i,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return i.createSpecializedApp}}),e.o(i,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return i.defaultConfigLoader}});var R=e(26079),f=e(67604),o=e(38482),u=e(58381),m=e(44431);e.o(m,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return m.AlertApiForwarder}}),e.o(m,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return m.AppThemeSelector}}),e.o(m,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return m.AtlassianAuth}}),e.o(m,"ConfigReader")&&e.d(s,{ConfigReader:function(){return m.ConfigReader}}),e.o(m,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return m.ErrorAlerter}}),e.o(m,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return m.ErrorApiForwarder}}),e.o(m,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return m.FetchMiddlewares}}),e.o(m,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return m.FlatRoutes}}),e.o(m,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return m.LocalStorageFeatureFlags}}),e.o(m,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return m.NoOpAnalyticsApi}}),e.o(m,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return m.OAuthRequestManager}}),e.o(m,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return m.UnhandledErrorForwarder}}),e.o(m,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return m.UrlPatternDiscovery}}),e.o(m,"WebStorage")&&e.d(s,{WebStorage:function(){return m.WebStorage}}),e.o(m,"createFetchApi")&&e.d(s,{createFetchApi:function(){return m.createFetchApi}}),e.o(m,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return m.createSpecializedApp}}),e.o(m,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return m.defaultConfigLoader}});var y=e(59589)},38482:function(ne,s,e){"use strict";e.d(s,{_:function(){return c}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class c{static create(R){const{environment:f="development",provider:o=t,oauthRequestApi:u,discoveryApi:m,defaultScopes:y=["openid","offline_access","profile","email","User.Read"]}=R;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:u,provider:o,environment:f,defaultScopes:y})}}},73124:function(ne,s,e){"use strict";e.d(s,{Z:function(){return f}});function r(o){return new Promise((u,m)=>{const y=o.width||500,h=o.height||700,E=window.screen.width/2-y/2,S=window.screen.height/2-h/2,b=window.open(o.url,o.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${y},height=${h},top=${S},left=${E}`);let L="";if(!b||typeof b.closed=="undefined"||b.closed){const x=new Error("Failed to open auth popup.");x.name="PopupRejectedError",m(x);return}const $=x=>{if(x.source!==b||x.origin!==o.origin)return;const{data:O}=x;if(O.type==="config_info"){L=O.targetOrigin;return}if(O.type!=="authorization_response")return;const M=O;if("error"in M){const K=new Error(M.error.message);K.name=M.error.name,m(K)}else u(M.response);D()},B=setInterval(()=>{if(b.closed){const x=`Login failed, ${L&&L!==window.location.origin?`Incorrect app origin, expected ${L}`:"popup was closed"}`,O=new Error(x);O.name="PopupClosedError",m(O),D()}},100);function D(){window.removeEventListener("message",$),clearInterval(B)}window.addEventListener("message",$)})}function t(o){return[...o].join(" ")}class c{constructor(u){q(this,"discoveryApi");q(this,"environment");q(this,"provider");q(this,"joinScopesFunc");q(this,"authRequester");q(this,"sessionTransform");const{discoveryApi:m,environment:y,provider:h,joinScopes:E=t,oauthRequestApi:S,sessionTransform:b=L=>L}=u;this.authRequester=S.createAuthRequester({provider:h,onAuthRequest:L=>this.showPopup(L)}),this.discoveryApi=m,this.environment=y,this.provider=h,this.joinScopesFunc=E,this.sessionTransform=b}async createSession(u){return u.instantPopup?this.showPopup(u.scopes):this.authRequester(u.scopes)}async refreshSession(){const u=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(!u.ok){const y=new Error(`Auth refresh request failed, ${u.statusText}`);throw y.status=u.status,y}const m=await u.json();if(m.error){const y=new Error(m.error.message);throw m.error.name&&(y.name=m.error.name),y}return await this.sessionTransform(m)}async removeSession(){const u=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(m=>{throw new Error(`Logout request failed, ${m}`)});if(!u.ok){const m=new Error(`Logout request failed, ${u.statusText}`);throw m.status=u.status,m}}async showPopup(u){const m=this.joinScopesFunc(u),y=await this.buildUrl("/start",{scope:m,origin:location.origin}),h=await r({url:y,name:`${this.provider.title} Login`,origin:new URL(y).origin,width:450,height:730});return await this.sessionTransform(h)}async buildUrl(u,m){const y=await this.discoveryApi.getBaseUrl("auth"),h=this.buildQueryString({...m,env:this.environment});return`${y}/${this.provider.id}${u}${h}`}buildQueryString(u){if(!u)return"";const m=Object.entries(u).map(([y,h])=>{if(typeof h=="string")return`${encodeURIComponent(y)}=${encodeURIComponent(h)}`;if(h)return encodeURIComponent(y)}).filter(Boolean).join("&");return m?`?${m}`:""}}var i=e(57018);const R={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class f{constructor(u){q(this,"sessionManager");q(this,"scopeTransform");this.sessionManager=u.sessionManager,this.scopeTransform=u.scopeTransform}static create(u){const{discoveryApi:m,environment:y="development",provider:h=R,oauthRequestApi:E,defaultScopes:S=[],scopeTransform:b=B=>B}=u,L=new c({discoveryApi:m,environment:y,provider:h,oauthRequestApi:E,sessionTransform(B){return{...B,providerInfo:{idToken:B.providerInfo.idToken,accessToken:B.providerInfo.accessToken,scopes:f.normalizeScopes(b,B.providerInfo.scope),expiresAt:new Date(Date.now()+B.providerInfo.expiresInSeconds*1e3)}}}}),$=new i.RefreshingAuthSessionManager({connector:L,defaultScopes:new Set(S),sessionScopes:B=>B.providerInfo.scopes,sessionShouldRefresh:B=>(B.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new f({sessionManager:$,scopeTransform:b})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(u,m){var E;const y=f.normalizeScopes(this.scopeTransform,u),h=await this.sessionManager.getSession({...m,scopes:y});return(E=h==null?void 0:h.providerInfo.accessToken)!=null?E:""}async getIdToken(u={}){var y;const m=await this.sessionManager.getSession(u);return(y=m==null?void 0:m.providerInfo.idToken)!=null?y:""}async getBackstageIdentity(u={}){const m=await this.sessionManager.getSession(u);return m==null?void 0:m.backstageIdentity}async getProfile(u={}){const m=await this.sessionManager.getSession(u);return m==null?void 0:m.profile}static normalizeScopes(u,m){if(!m)return new Set;const y=Array.isArray(m)?m:m.split(/[\s|,]/).filter(Boolean);return new Set(u(y))}}},91205:function(ne,s,e){"use strict";e.d(s,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),c=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(s,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(s,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(s,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(ne,s,e){"use strict";e.d(s,{s:function(){return R}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),i="okta.";class R{static create(o){const{discoveryApi:u,environment:m="development",provider:y=t,oauthRequestApi:h,defaultScopes:E=["openid","email","profile","offline_access"]}=o;return r.OAuth2.create({discoveryApi:u,oauthRequestApi:h,provider:y,environment:m,defaultScopes:E,scopeTransform(S){return S.map(b=>c.has(b)||b.startsWith(i)?b:`${i}${b}`)}})}}},58381:function(ne,s,e){"use strict";e.d(s,{$:function(){return R}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),i="onelogin.";class R{static create(o){const{discoveryApi:u,environment:m="development",provider:y=t,oauthRequestApi:h}=o;return r.OAuth2.create({discoveryApi:u,oauthRequestApi:h,provider:y,environment:m,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(E){return E.map(S=>c.has(S)||S.startsWith(i)?S:`${i}${S}`)}})}}},67604:function(ne,s,e){"use strict";var r=e(57018),t=e(30195);const c=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({token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),i={id:"saml",title:"SAML",icon:()=>null};class R{static create(o){const{discoveryApi:u,environment:m="development",provider:y=i}=o,h=new DirectAuthConnector({discoveryApi:u,environment:m,provider:y}),E=new StaticAuthSessionManager({connector:h}),S=new AuthSessionStore({manager:E,storageKey:`${y.id}Session`,schema:samlSessionSchema});return new R(S)}sessionState$(){return this.sessionManager.sessionState$()}constructor(o){this.sessionManager=o}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(o={}){const u=await this.sessionManager.getSession(o);return u==null?void 0:u.backstageIdentity}async getProfile(o={}){const u=await this.sessionManager.getSession(o);return u==null?void 0:u.profile}}},91631:function(ne,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.C},AppThemeSelector:function(){return i.C},AtlassianAuth:function(){return r.AtlassianAuth},ConfigReader:function(){return R.m},ErrorAlerter:function(){return o.KN},ErrorApiForwarder:function(){return o.gr},FetchMiddlewares:function(){return m.I},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},LocalStorageFeatureFlags:function(){return u.b},MicrosoftAuth:function(){return r.MicrosoftAuth},NoOpAnalyticsApi:function(){return c.g},OAuthRequestManager:function(){return y.Y},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},UnhandledErrorForwarder:function(){return o.Jv},UrlPatternDiscovery:function(){return f.p},WebStorage:function(){return h.C},createFetchApi:function(){return m.j}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(23235),c=e(47150),i=e(58652),R=e(14721),f=e(4333),o=e(89536),u=e(14884),m=e(50160),y=e(11358),h=e(56054)},56494:function(ne,s,e){"use strict";e.d(s,{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(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(91631);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},80396:function(ne,s,e){"use strict";e.d(s,{p:function(){return t}});var r;(function(c){c[c.default=10]="default";const i=50;c[c.app=i]="app",c[c.static=100]="static"})(r||(r={}));class t{constructor(){q(this,"factories",new Map)}register(i,R){const f=r[i],o=this.factories.get(R.api.id);return o&&o.priority>=f?!1:(this.factories.set(R.api.id,{priority:f,factory:R}),!0)}get(i){const R=this.factories.get(i.id);if(!!R)return R.factory}getAllApis(){const i=new Set;for(const{factory:R}of this.factories.values())i.add(R.api);return i}}},14406:function(ne,s,e){"use strict";e.d(s,{g:function(){return o}});var r=e(2784),t=e(13980),c=e.n(t);class i{constructor(...m){q(this,"holders");this.holders=m}get(m){for(const y of this.holders){const h=y.get(m);if(h)return h}}}var R=e(76241);const f=(0,R.CT)("api-context"),o=u=>{var S;const{apis:m,children:y}=u,h=(S=(0,r.useContext)(f))==null?void 0:S.atVersion(1),E=h?new i(m,h):m;return r.createElement(f.Provider,{value:(0,R.EI)({1:E}),children:y})};o.propTypes={apis:c().shape({get:c().func.isRequired}).isRequired,children:c().node}},12132:function(ne,s,e){"use strict";e.d(s,{M:function(){return r}});class r{constructor(c){q(this,"apis",new Map);this.factories=c}static validateFactories(c,i){for(const R of i){const f=[R],o=new Set;for(;f.length;){const u=f.shift(),m=c.get(u);if(!!m)for(const y of Object.values(m.deps)){if(y.id===R.id)throw new Error(`Circular dependency of api factory for ${R}`);o.has(y)||(o.add(y),f.push(y))}}}}get(c){return this.load(c)}load(c,i=[]){const R=this.apis.get(c.id);if(R)return R;const f=this.factories.get(c);if(!f)return;if(i.includes(f.api))throw new Error(`Circular dependency of api factory for ${f.api}`);const o=this.loadDeps(c,f.deps,[...i,f.api]),u=f.factory(o);return this.apis.set(c.id,u),u}loadDeps(c,i,R){const f={};for(const o in i)if(i.hasOwnProperty(o)){const u=i[o],m=this.load(u,R);if(!m)throw new Error(`No API factory available for dependency ${u} of dependent ${c}`);f[o]=m}return f}}},76105:function(ne,s,e){"use strict";e.d(s,{ApiFactoryRegistry:function(){return c.p},ApiProvider:function(){return r.g},ApiResolver:function(){return t.M}});var r=e(14406),t=e(12132),c=e(80396),i=e(82488),R=e.n(i);e.o(i,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return i.AlertApiForwarder}}),e.o(i,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return i.AppThemeSelector}}),e.o(i,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return i.AtlassianAuth}}),e.o(i,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return i.BitbucketAuth}}),e.o(i,"ConfigReader")&&e.d(s,{ConfigReader:function(){return i.ConfigReader}}),e.o(i,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return i.ErrorAlerter}}),e.o(i,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return i.ErrorApiForwarder}}),e.o(i,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return i.FetchMiddlewares}}),e.o(i,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return i.FlatRoutes}}),e.o(i,"GithubAuth")&&e.d(s,{GithubAuth:function(){return i.GithubAuth}}),e.o(i,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return i.GitlabAuth}}),e.o(i,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return i.GoogleAuth}}),e.o(i,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return i.LocalStorageFeatureFlags}}),e.o(i,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return i.MicrosoftAuth}}),e.o(i,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return i.NoOpAnalyticsApi}}),e.o(i,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return i.OAuthRequestManager}}),e.o(i,"OktaAuth")&&e.d(s,{OktaAuth:function(){return i.OktaAuth}}),e.o(i,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return i.OneLoginAuth}}),e.o(i,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return i.UnhandledErrorForwarder}}),e.o(i,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return i.UrlPatternDiscovery}}),e.o(i,"WebStorage")&&e.d(s,{WebStorage:function(){return i.WebStorage}}),e.o(i,"createFetchApi")&&e.d(s,{createFetchApi:function(){return i.createFetchApi}}),e.o(i,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return i.createSpecializedApp}}),e.o(i,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return i.defaultConfigLoader}})},82488:function(){},82370:function(ne,s,e){"use strict";e.d(s,{b:function(){return nt}});var r=e(2784),t=e(10289),c=e(64279),i=e(56494),R=e(36964),f=e(76105);function o(Q){const z={};for(const ce in Q.collectors)Q.collectors.hasOwnProperty(ce)&&(z[ce]=Q.collectors[ce]());const _=[{node:r.Children.toArray(Q.root),parent:void 0,contexts:{}}];for(;_.length!==0;){const{node:ce,parent:fe,contexts:Pe}=_.shift();r.Children.forEach(ce,Oe=>{if(!(0,r.isValidElement)(Oe))return;const Se={};for(const Qe in z)if(z.hasOwnProperty(Qe)){const Ge=z[Qe];Se[Qe]=Ge.visit(Ge.accumulator,Oe,fe,Pe[Qe])}for(const Qe of Q.discoverers){const Ge=Qe(Oe);Ge&&_.push({node:Ge,parent:Oe,contexts:Se})}})}return Object.fromEntries(Object.entries(z).map(([ce,fe])=>[ce,fe.accumulator]))}function u(Q,z){return()=>({accumulator:Q(),visit:z})}function m(Q){var z;return(z=Q.props)==null?void 0:z.children}function y(Q){var z,_,ce;if(((z=Q.props)==null?void 0:z.path)&&((_=Q.props)==null?void 0:_.element))return(ce=Q.props)==null?void 0:ce.element}const h=u(()=>new Set,(Q,z)=>{const _=(0,R.getComponentData)(z,"core.plugin");_&&Q.add(_)});var E=e(88934);const S={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},b=u(()=>({paths:new Map,parents:new Map,objects:new Array}),(Q,z,_,ce)=>{var xt,bt,Pt,Vt,Gt;if((_==null?void 0:_.props.element)===z)return ce;let fe=ce==null?void 0:ce.obj,Pe=ce==null?void 0:ce.routeRef,Oe=ce==null?void 0:ce.sticky;const Se=(xt=z.props)==null?void 0:xt.path,Qe=(bt=fe==null?void 0:fe.children)!=null?bt:Q.objects,Ge=Boolean((Pt=z.props)==null?void 0:Pt.caseSensitive);let gt=ce==null?void 0:ce.path;if((0,R.getComponentData)(z,"core.gatherMountPoints")){if(!Se)throw new Error("Mount point gatherer must have a path");gt=Se}const Rt=(Vt=z.props)==null?void 0:Vt.element;let ut=(0,R.getComponentData)(z,"core.mountPoint");if(!ut&&(0,r.isValidElement)(Rt)&&(ut=(0,R.getComponentData)(Rt,"core.mountPoint")),ut){let dn=Se;if(gt&&(dn?gt=void 0:dn=gt),!dn)throw new Error("Mounted routable extension must have a path");Q.paths.set(ut,dn),Pe&&Oe?(Q.parents.set(ut,Pe),Se&&(Pe=ut,Oe=!1)):(Q.parents.set(ut,Pe),Pe=ut),Se?(fe={caseSensitive:Ge,path:Se,element:"mounted",routeRefs:new Set([ut]),children:[S],plugin:(0,R.getComponentData)(z.props.element,"core.plugin")},Qe.push(fe)):fe==null||fe.routeRefs.add(ut)}if((0,R.getComponentData)(z,"core.gatherMountPoints")&&(Oe=!0),(0,R.getComponentData)(z,"core.gatherMountPoints")){if(!Se)throw new Error("Mount point gatherer must have a path");ut||(fe={caseSensitive:Ge,path:Se,element:"gathered",routeRefs:new Set,children:[S],plugin:(Gt=ce==null?void 0:ce.obj)==null?void 0:Gt.plugin},Qe.push(fe))}return{obj:fe,path:gt,routeRef:Pe,sticky:Oe}}),L=u(()=>new Set,(Q,z)=>{if(z.type===E.L){const _=z.props;Q.add("with"in _?_.with:_.without)}});var $=e(76241);const B=(0,$.uW)("route-ref-type",()=>Symbol("route-ref-type"));function D(Q){return Q[B]==="absolute"}function x(Q){return Q[B]==="sub"}function O(Q){return Q[B]==="external"}function M(...Q){const z=Q.join("/").replace(/\/\/+/g,"/");return z!=="/"&&z.endsWith("/")?z.slice(0,-1):z}function K(Q,z,_){let ce,fe="";if(D(Q))ce=Q;else if(x(Q))ce=Q.parent,fe=Q.path;else if(O(Q)){const Se=_.get(Q);if(!Se)return[void 0,""];if(D(Se))ce=Se;else if(x(Se))ce=Se.parent,fe=Se.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${Se}`)}else throw Q[B]?new Error(`Unknown or invalid route ref type, ${Q[B]}`):new Error(`Unknown object passed to useRouteRef, got ${Q}`);if(!ce)return[void 0,""];const Pe=z.get(ce);if(!Pe)return[void 0,""];const Oe=M(Pe,fe);return[ce,Oe]}function re(Q,z,_,ce,fe){var gt;const Pe=(gt=(0,t.fp)(fe,z))!=null?gt:[],Oe=Array();let Se=-1;for(let Rt=Q;Rt&&(Se=Pe.findIndex(ut=>ut.route.routeRefs.has(Rt)),Se===-1);Rt=ce.get(Rt))Oe.unshift(Rt);Oe.length===0&&(Se-=1);const Qe=Se===-1?"":Pe[Se].pathname,Ge=M(...Oe.slice(0,-1).map(Rt=>{const ut=_.get(Rt);if(!ut)throw new Error(`No path for ${Rt}`);if(ut.includes(":"))throw new Error(`Cannot route to ${Q} with parent ${Rt} as it has parameters`);return ut}));return Qe+Ge}class le{constructor(z,_,ce,fe,Pe){this.routePaths=z,this.routeParents=_,this.routeObjects=ce,this.routeBindings=fe,this.appBasePath=Pe}resolve(z,_){const[ce,fe]=K(z,this.routePaths,this.routeBindings);if(!ce)return;let Pe;typeof _=="string"?Pe=this.trimPath(_):_.pathname?Pe={..._,pathname:this.trimPath(_.pathname)}:Pe=_;const Oe=this.appBasePath+re(ce,Pe,this.routePaths,this.routeParents,this.routeObjects);return(...[Qe])=>Oe+(0,t.Gn)(fe,Qe)}trimPath(z){return z&&(z.startsWith(this.appBasePath)?z.slice(this.appBasePath.length):z)}}const Re=(0,$.CT)("routing-context"),Fe=({routePaths:Q,routeParents:z,routeObjects:_,routeBindings:ce,basePath:fe="",children:Pe})=>{const Oe=new le(Q,z,_,ce,fe),Se=(0,$.EI)({1:Oe});return r.createElement(Re.Provider,{value:Se},Pe)},Be=(Q,z)=>{var _,ce;try{const fe=(0,t.fp)(z,{pathname:Q}),Pe=(_=fe==null?void 0:fe.filter(Se=>{var Qe;return((Qe=Se==null?void 0:Se.route.routeRefs)==null?void 0:Qe.size)>0}).pop())==null?void 0:_.route;if(!Pe)return{};let Oe;return Pe.routeRefs.size===1&&(Oe=Pe.routeRefs.values().next().value),{extension:"App",pluginId:((ce=Pe.plugin)==null?void 0:ce.getId())||"root",...Oe?{routeRef:Oe.id}:{}}}catch{return{}}},He=({pathname:Q,search:z,hash:_})=>{const ce=(0,R.useAnalytics)();return(0,r.useEffect)(()=>{ce.captureEvent("navigate",`${Q}${z}${_}`)},[ce,Q,z,_]),null},ve=({routeObjects:Q})=>{const{pathname:z,search:_,hash:ce}=(0,t.TH)();return r.createElement(R.AnalyticsContext,{attributes:Be(z,Q)},r.createElement(He,{pathname:z,search:_,hash:ce}))};function Je(Q,z){const _=new Set(z.values());_.delete(void 0);for(const ce of z.keys()){if(_.has(ce))continue;let fe=ce,Pe="";for(;fe;){const Se=Q.get(fe);if(!Se)throw new Error(`No path for ${fe}`);Pe=`${Se}${Pe}`,fe=z.get(fe)}const Oe=Pe.match(/:(\w+)/g);if(Oe){for(let Se=0;Se<Oe.length;Se++)for(let Qe=Se+1;Qe<Oe.length;Qe++)if(Oe[Qe]===Oe[Se])throw new Error(`Parameter ${Oe[Qe]} is duplicated in path ${Pe}`)}}}function tt(Q,z){for(const _ of z)if(!!_.externalRoutes){for(const[ce,fe]of Object.entries(_.externalRoutes))if(!fe.optional&&!Q.has(fe))throw new Error(`External route '${ce}' of the '${_.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const Tt=(0,$.CT)("app-context"),At=({appContext:Q,children:z})=>{const _=(0,$.EI)({1:Q});return r.createElement(Tt.Provider,{value:_,children:z})};function Ie(Q){return new Error(`Tried to access IdentityApi ${Q} before app was loaded`)}function mt(Q){console.warn(`WARNING: Call to ${Q} is deprecated and will break in the future`)}class ht{constructor(){q(this,"target");q(this,"waitForTarget");q(this,"resolveTarget",()=>{});q(this,"signOutTargetUrl","/");this.waitForTarget=new Promise(z=>{this.resolveTarget=z})}setTarget(z,_){this.target=z,this.signOutTargetUrl=_.signOutTargetUrl,this.resolveTarget(z)}getUserId(){if(!this.target)throw Ie("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return mt("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Ie("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return mt("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(z=>z.getProfileInfo())}async getBackstageIdentity(){const z=await this.waitForTarget.then(_=>_.getBackstageIdentity());return z.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${z.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),z}async getCredentials(){return this.waitForTarget.then(z=>z.getCredentials())}async getIdToken(){return this.waitForTarget.then(z=>{if(!z.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return mt("getIdToken"),z.getIdToken()})}async signOut(){await this.waitForTarget.then(z=>z.signOut()),location.href=this.signOutTargetUrl}}var lt=e(72164);function ee(Q,z,_){if(Q!==void 0){const fe=_.find(Pe=>Pe.id===Q);if(fe)return fe}if(z){const fe=_.find(Pe=>Pe.variant==="dark");if(fe)return fe}const ce=_.find(fe=>fe.variant==="light");return ce||_[0]}const pe=()=>{const Q=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[z,_]=(0,r.useState)(Q.matches);return(0,r.useEffect)(()=>{const ce=fe=>{_(fe.matches)};return Q.addListener(ce),()=>{Q.removeListener(ce)}},[Q]),z};function be({children:Q}){const z=(0,R.useApi)(R.appThemeApiRef),_=(0,lt.Z)(z.activeThemeId$(),z.getActiveThemeId()),ce=Boolean(window.matchMedia)?pe():!1,fe=ee(_,ce,z.getInstalledThemes());if(!fe)throw new Error("App has no themes");return r.createElement(fe.Provider,{children:Q})}var We=e(46611);class et{constructor(){q(this,"apis",[])}add(z,_){return this.apis.push([z.id,_]),_}build(){return new at(new Map(this.apis))}}class at{static builder(){return new et}static from(z){return new at(new Map(z.map(([_,ce])=>[_.id,ce])))}static with(z,_){return new at(new Map([[z.id,_]]))}constructor(z){this.apis=z}with(z,_){return new at(new Map([...this.apis,[z.id,_]]))}get(z){return this.apis.get(z.id)}}function yt(Q){const z=new Map;return Q&&Q({bind:(ce,fe)=>{for(const[Pe,Oe]of Object.entries(fe)){const Se=ce[Pe];if(!Se)throw new Error(`Key ${Pe} is not an existing external route`);if(!Oe&&!Se.optional)throw new Error(`External route ${Pe} is required but was undefined`);Oe&&z.set(Se,Oe)}}}),z}const se=(0,r.createContext)({routeObjects:[]});function ae(Q){var _;let{pathname:z}=new URL((_=Q.getOptionalString("app.baseUrl"))!=null?_:"/","http://dummy.dev");return z=z.replace(/\/*$/,""),z}function Ye(Q,z,_){var Qe;const ce=Boolean(Q),fe=(0,c.default)(Q||(()=>Promise.resolve([])));let Pe;if(ce&&fe.loading){const{Progress:Ge}=z;Pe=r.createElement(Ge,null)}else if(fe.error){const{BootErrorPage:Ge}=z;Pe=r.createElement(Ge,{step:"load-config",error:fe.error})}const{ThemeProvider:Oe=be}=z;return Pe?{node:r.createElement(i.ApiProvider,{apis:at.with(R.appThemeApiRef,_)},r.createElement(Oe,null,Pe))}:{api:i.ConfigReader.fromConfigs((Qe=fe.value)!=null?Qe:[])}}class Ve{constructor(z){this.app=z}getPlugins(){return this.app.getPlugins()}getSystemIcon(z){return this.app.getSystemIcon(z)}getComponents(){return this.app.getComponents()}}class Ue{constructor(z){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 ht);q(this,"apiFactoryRegistry");var _,ce,fe,Pe;this.apis=(_=z.apis)!=null?_:[],this.icons=z.icons,this.plugins=new Set((ce=z.plugins)!=null?ce:[]),this.components=z.components,this.themes=z.themes,this.configLoader=(fe=z.configLoader)!=null?fe:We.t,this.defaultApis=(Pe=z.defaultApis)!=null?Pe:[],this.bindRoutes=z.bindRoutes,this.apiFactoryRegistry=new f.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(z){return this.icons[z]}getComponents(){return this.components}getProvider(){const z=new Ve(this);let _=!1;return({children:fe})=>{const Pe=(0,r.useMemo)(()=>i.AppThemeSelector.createWithStorage(this.themes),[]),{routing:Oe,featureFlags:Se,routeBindings:Qe}=(0,r.useMemo)(()=>{const ut=o({root:fe,discoverers:[m,y],collectors:{routing:b,collectedPlugins:h,featureFlags:L}});return ut.collectedPlugins.forEach(Ft=>this.plugins.add(Ft)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...ut,routeBindings:yt(this.bindRoutes)}},[fe]);_||(_=!0,Je(Oe.paths,Oe.parents),tt(Qe,this.plugins));const Ge=Ye(this.configLoader,this.components,Pe),gt="api"in Ge;if(gt){const{api:ut}=Ge;this.configApi=ut}if((0,r.useEffect)(()=>{if(gt){const ut=this.getApiHolder().get(R.featureFlagsApiRef);for(const Ft of this.plugins.values())if("getFeatureFlags"in Ft)for(const xt of Ft.getFeatureFlags())ut.registerFlag({name:xt.name,pluginId:Ft.getId()});else for(const xt of Ft.output())xt.type==="feature-flag"&&ut.registerFlag({name:xt.name,pluginId:Ft.getId()});for(const Ft of Se)ut.registerFlag({name:Ft,pluginId:""})}},[gt,Ge,Se]),"node"in Ge)return Ge.node;const{ThemeProvider:Rt=be}=this.components;return r.createElement(i.ApiProvider,{apis:this.getApiHolder()},r.createElement(At,{appContext:z},r.createElement(Rt,null,r.createElement(Fe,{routePaths:Oe.paths,routeParents:Oe.parents,routeObjects:Oe.objects,routeBindings:Qe,basePath:ae(Ge.api)},r.createElement(se.Provider,{value:{routeObjects:Oe.objects}},fe)))))}}getRouter(){const{Router:z,SignInPage:_}=this.components,ce=({component:Pe,children:Oe})=>{const[Se,Qe]=(0,r.useState)(),Ge=(0,R.useApi)(R.configApiRef),gt=ae(Ge);return Se?(this.appIdentityProxy.setTarget(Se,{signOutTargetUrl:gt||"/"}),Oe):r.createElement(Pe,{onSignInSuccess:Qe})};return({children:Pe})=>{const Oe=(0,R.useApi)(R.configApiRef),Se=ae(Oe),Qe=`${Se}/*`,{routeObjects:Ge}=(0,r.useContext)(se);return _?r.createElement(z,null,r.createElement(ve,{routeObjects:Ge}),r.createElement(ce,{component:_},r.createElement(t.Z5,null,r.createElement(t.AW,{path:Qe,element:r.createElement(r.Fragment,null,Pe)})))):(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()=>{}},{signOutTargetUrl:Se||"/"}),r.createElement(z,null,r.createElement(ve,{routeObjects:Ge}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:Qe,element:r.createElement(r.Fragment,null,Pe)}))))}}getApiHolder(){if(this.apiHolder){for(const z of this.plugins)for(const _ of z.getApis())this.apiFactoryRegistry.get(_.api)||this.apiFactoryRegistry.register("default",_);return f.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:R.appThemeApiRef,deps:{},factory:()=>i.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:R.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:R.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:R.featureFlagsApiRef,deps:{},factory:()=>new i.LocalStorageFeatureFlags});for(const z of this.defaultApis)this.apiFactoryRegistry.register("default",z);for(const z of this.plugins)for(const _ of z.getApis())if(!this.apiFactoryRegistry.register("default",_))throw new Error(`Plugin ${z.getId()} tried to register duplicate or forbidden API factory for ${_.api}`);for(const z of this.apis)if(!this.apiFactoryRegistry.register("app",z))throw new Error(`Duplicate or forbidden API factory for ${z.api} in app`);return f.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new f.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(z){const _=new Set;for(const ce of z){const fe=ce.getId();if(_.has(fe))throw new Error(`Duplicate plugin found '${fe}'`);_.add(fe)}}}function nt(Q){return new Ue(Q)}},46611:function(ne,s,e){"use strict";e.d(s,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const c=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!c)throw new Error("No static configuration provided");if(!Array.isArray(c))throw new Error("Static configuration has invalid format");const i=c.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const f=JSON.parse(t);Array.isArray(f)?i.push(...f):i.push({data:f,context:"env"})}catch(f){throw new Error(`Failed to load runtime configuration, ${f}`)}const R=window.__APP_CONFIG__;return R&&i.push({context:"window",data:R}),i}},44056:function(ne,s,e){"use strict";e.d(s,{createSpecializedApp:function(){return r.b},defaultConfigLoader:function(){return t.t}});var r=e(82370),t=e(46611),c=e(73495),i=e.n(c);e.o(c,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return c.AtlassianAuth}}),e.o(c,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return c.BitbucketAuth}}),e.o(c,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return c.FlatRoutes}}),e.o(c,"GithubAuth")&&e.d(s,{GithubAuth:function(){return c.GithubAuth}}),e.o(c,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return c.GitlabAuth}}),e.o(c,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return c.GoogleAuth}}),e.o(c,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return c.MicrosoftAuth}}),e.o(c,"OktaAuth")&&e.d(s,{OktaAuth:function(){return c.OktaAuth}}),e.o(c,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return c.OneLoginAuth}})},73495:function(){},49208:function(ne,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder},ErrorAlerter:function(){return r.ErrorAlerter},ErrorApiForwarder:function(){return r.ErrorApiForwarder},FetchMiddlewares:function(){return r.FetchMiddlewares},FlatRoutes:function(){return c.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(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}});var c=e(63938)},57018:function(ne,s,e){"use strict";e.d(s,{RefreshingAuthSessionManager:function(){return f}});function r(u,m){for(const y of m)if(!u.has(y))return!1;return!0}class t{constructor(m){this.options=m}sessionExistsAndHasScope(m,y){if(!m)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const h=this.options.sessionScopes(m);return r(h,y)}getExtendedScope(m,y){const h=new Set(this.options.defaultScopes);if(m&&this.options.sessionScopes!==void 0){const E=this.options.sessionScopes(m);for(const S of E)h.add(S)}if(y)for(const E of y)h.add(E);return h}}var c=e(98005),i=e(36964);class R{constructor(){q(this,"subject",new c.X(i.SessionState.SignedOut));q(this,"signedIn",!1)}setIsSignedIn(m){this.signedIn!==m&&(this.signedIn=m,this.subject.next(this.signedIn?i.SessionState.SignedIn:i.SessionState.SignedOut))}sessionState$(){return this.subject}}class f{constructor(m){q(this,"connector");q(this,"helper");q(this,"sessionScopesFunc");q(this,"sessionShouldRefreshFunc");q(this,"stateTracker",new R);q(this,"refreshPromise");q(this,"currentSession");const{connector:y,defaultScopes:h=new Set,sessionScopes:E,sessionShouldRefresh:S}=m;this.connector=y,this.sessionScopesFunc=E,this.sessionShouldRefreshFunc=S,this.helper=new t({sessionScopes:E,defaultScopes:h})}async getSession(m){if(this.helper.sessionExistsAndHasScope(this.currentSession,m.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const h=await this.collapsedSessionRefresh(),E=this.sessionScopesFunc(this.currentSession),S=this.sessionScopesFunc(h);return r(S,E)&&(this.currentSession=h),h}catch(h){if(m.optional)return;throw h}}if(!this.currentSession&&!m.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(m)}catch{}if(!m.optional)return this.currentSession=await this.connector.createSession({...m,scopes:this.helper.getExtendedScope(this.currentSession,m.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 m=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),m}finally{delete this.refreshPromise}}}class o{constructor(m){q(this,"connector");q(this,"helper");q(this,"stateTracker",new SessionStateTracker);q(this,"currentSession");const{connector:y,defaultScopes:h=new Set,sessionScopes:E}=m;this.connector=y,this.helper=new SessionScopeHelper({sessionScopes:E,defaultScopes:h})}setSession(m){this.currentSession=m,this.stateTracker.setIsSignedIn(Boolean(m))}async getSession(m){if(this.helper.sessionExistsAndHasScope(this.currentSession,m.scopes))return this.currentSession;if(!m.optional)return this.currentSession=await this.connector.createSession({...m,scopes:this.helper.getExtendedScope(this.currentSession,m.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(ne,s,e){"use strict";e.d(s,{J:function(){return c},X:function(){return i}});var r=e(82394),t=e.n(r);class c{constructor(){q(this,"isClosed",!1);q(this,"terminatingError");q(this,"observable",new(t())(f=>this.isClosed?(this.terminatingError?f.error(this.terminatingError):f.complete(),()=>{}):(this.subscribers.add(f),()=>{this.subscribers.delete(f)})));q(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(f){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(o=>o.next(f))}error(f){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=f,this.subscribers.forEach(o=>o.error(f))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(f=>f.complete())}subscribe(f,o,u){const m=typeof f=="function"?{next:f,error:o,complete:u}:f;return this.observable.subscribe(m)}}class i{constructor(f){q(this,"isClosed");q(this,"currentValue");q(this,"terminatingError");q(this,"observable");q(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=f,this.terminatingError=void 0,this.observable=new(t())(o=>this.isClosed?(this.terminatingError?o.error(this.terminatingError):o.complete(),()=>{}):(o.next(this.currentValue),this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}[Symbol.observable](){return this}get closed(){return this.isClosed}next(f){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=f,this.subscribers.forEach(o=>o.next(f))}error(f){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=f,this.subscribers.forEach(o=>o.error(f))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(f=>f.complete())}subscribe(f,o,u){const m=typeof f=="function"?{next:f,error:o,complete:u}:f;return this.observable.subscribe(m)}}},88934:function(ne,s,e){"use strict";e.d(s,{L:function(){return c}});var r=e(36964),t=e(2784);const c=i=>{const{children:R}=i,f=(0,r.useApi)(r.featureFlagsApiRef),o="with"in i?f.isActive(i.with):!f.isActive(i.without);return t.createElement(t.Fragment,null,o?R:null)};(0,r.attachComponentData)(c,"core.featureFlagged",!0)},63938:function(ne,s,e){"use strict";e.d(s,{w:function(){return i}});var r=e(2784),t=e(10289),c=e(36964);const i=f=>{const o=(0,c.useApp)(),{NotFoundErrorPage:u}=o.getComponents(),m=(0,c.useElementFilter)(f.children,y=>y.getElements().flatMap(h=>{var S;let E=h.props.path;return E===""?[]:(E=(S=E==null?void 0:E.replace(/\/\*$/,""))!=null?S:"/",[{path:E,element:h,children:h.props.children?[{path:E==="/"?"/":"/*",element:h.props.children}]:void 0}])}).sort((h,E)=>E.path.localeCompare(h.path)).map(h=>(h.path=h.path==="/"?"/":`${h.path}/*`,h)));return m.push({element:r.createElement(u,null),path:"/*"}),(0,t.V$)(m)};var R=e(88934)},82339:function(ne,s,e){"use strict";e.d(s,{Button:function(){return le},CodeSnippet:function(){return Ie},Content:function(){return to},ContentHeader:function(){return mi},CreateButton:function(){return lt},DependencyGraph:function(){return dn},DependencyGraphTypes:function(){return r},EmptyState:function(){return Yt},ErrorPage:function(){return Ei},ErrorPanel:function(){return Ht},Header:function(){return uo},HeaderIconLinkRow:function(){return sr},HeaderLabel:function(){return Li},HeaderTabs:function(){return no},InfoCard:function(){return tr},ItemCardGrid:function(){return wi},ItemCardHeader:function(){return Fi},Link:function(){return K},LogViewer:function(){return fr},MissingAnnotationEmptyState:function(){return mn},OverflowTooltip:function(){return Fr},Page:function(){return mo},PageWithHeader:function(){return Ni},Progress:function(){return Mr},ResponseErrorPanel:function(){return Rn},RoutedTabs:function(){return ro},Select:function(){return rt},Sidebar:function(){return ls},SidebarDivider:function(){return Cs},SidebarItem:function(){return _a},SidebarPage:function(){return Jo},SubvalueCell:function(){return $s},SupportButton:function(){return Vo},Table:function(){return ai},WarningPanel:function(){return nn},sidebarConfig:function(){return Jn},useSidebarOpenState:function(){return fa},useSidebarPinState:function(){return jr}});var r={};e.r(r),e.d(r,{Nm:function(){return ee},ht:function(){return We},LJ:function(){return be}});var t=e(2784),c=e(36964),i=e(19928);function R(n){const[a,l]=useState([]),d=useApi(alertApiRef),{anchorOrigin:p={vertical:"top",horizontal:"center"}}=n;if(useEffect(()=>{const Z=d.alert$().subscribe(G=>l(H=>H.concat(G)));return()=>{Z.unsubscribe()}},[d]),a.length===0)return null;const[v]=a,P=()=>{l(Z=>Z.filter(G=>G!==v))};return React.createElement(Snackbar,{open:!0,anchorOrigin:p},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:P,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:v.severity},React.createElement("span",null,v.message.toString(),a.length>1&&React.createElement("em",null,` (${a.length-1} older ${pluralize("message",a.length-1)})`))))}var f=e(79692),o=e(12420);const u=(0,f.Z)(n=>(0,o.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function m(n){const{displayName:a,picture:l,customStyles:d}=n,p=u();let v={...d};return l||(v={backgroundColor:stringToColor(a||""),...d}),React.createElement(MaterialAvatar,{alt:a,src:l,className:p.avatar,style:v},a&&extractInitials(a))}var y=e(77277),h=e(72779),E=e.n(h),S=e(86689),b=e(62833),L=e(76635);const $=(0,f.Z)({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"}},{name:"Link"}),B=n=>/^([a-z+.-]+):/.test(n),D=()=>{try{return(0,c.useApi)(c.configApiRef).getOptionalString("app.baseUrl")}catch{return}},x=()=>{var d;const n="http://dummy.dev",a=(d=D())!=null?d:"/",{pathname:l}=new URL(a,n);return(0,L.trimEnd)(l,"/")},O=n=>{let a=String(n);const l=x(),d=B(a),p=a.startsWith(l);return!d&&!p&&(a=l.concat(a)),a},M=n=>{var a;return n instanceof Array?n.map(M).join(" ").trim():typeof n=="object"&&n?M((a=n==null?void 0:n.props)==null?void 0:a.children):["string","number"].includes(typeof n)?String(n):""},K=t.forwardRef(({onClick:n,noTrack:a,...l},d)=>{const p=$(),v=(0,c.useAnalytics)(),P=O(l.to),Z=M(l.children)||P,G=B(P),H=G&&!!/^https?:/.exec(P),ie=te=>{n==null||n(te),a||v.captureEvent("click",Z,{attributes:{to:P}})};return G?t.createElement(S.Z,{...H?{target:"_blank",rel:"noopener"}:{},...l,ref:d,href:P,onClick:ie,className:E()(p.externalLink,l.className)},l.children,t.createElement("span",{className:p.visuallyHidden},", Opens in a new window")):t.createElement(S.Z,{...l,ref:d,component:b.rU,to:P,onClick:ie})}),re=t.forwardRef((n,a)=>t.createElement(K,{ref:a,...n,color:"initial"})),le=t.forwardRef((n,a)=>t.createElement(y.Z,{ref:a,component:re,...n}));var Re=e(60364),Fe=e(61837),Be=e(80030),He=e(19353),ve=e(95074);function Je(n){const{text:a,tooltipDelay:l=1e3,tooltipText:d="Text copied to clipboard","aria-label":p="Copy text"}=n,v=(0,c.useApi)(c.errorApiRef),[P,Z]=(0,t.useState)(!1),[{error:G},H]=(0,ve.Z)();(0,t.useEffect)(()=>{G&&v.post(G)},[G,v]);const ie=te=>{te.stopPropagation(),Z(!0),H(a)};return t.createElement(t.Fragment,null,t.createElement(Be.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:l,onClose:()=>Z(!1),open:P},t.createElement(Fe.Z,{onClick:ie,"aria-label":p},t.createElement(He.Z,null))))}var tt=e(83229),Tt=e(26639),At=e(39595);function Ie(n){const{text:a,language:l,showLineNumbers:d=!1,highlightedNumbers:p,customStyle:v,showCopyCodeButton:P=!1}=n,Z=(0,Re.Z)(),G=Z.palette.type==="dark"?Tt.Z:At.Z,H=Z.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(tt.Z,{customStyle:v,language:l,style:G,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:Z.palette.textVerySubtle},lineProps:ie=>p!=null&&p.includes(ie)?{style:{backgroundColor:H}}:{}},a),P&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(Je,{text:a})))}var mt=e(41156),ht=e(88188);function lt(n){const{title:a,to:l}=n,d=(0,mt.Z)(p=>p.breakpoints.down("xs"));return l?d?t.createElement(Fe.Z,{component:b.rU,color:"primary",title:a,size:"small",to:l},t.createElement(ht.Z,null)):t.createElement(y.Z,{component:b.rU,variant:"contained",color:"primary",to:l},a):null}var ee;(function(n){const a="TB";n.TOP_BOTTOM=a;const l="BT";n.BOTTOM_TOP=l;const d="LR";n.LEFT_RIGHT=d;const p="RL";n.RIGHT_LEFT=p})(ee||(ee={}));var pe;(function(n){const a="UL";n.UP_LEFT=a;const l="UR";n.UP_RIGHT=l;const d="DL";n.DOWN_LEFT=d;const p="DR";n.DOWN_RIGHT=p})(pe||(pe={}));var be;(function(n){const a="network-simplex";n.NETWORK_SIMPLEX=a;const l="tight-tree";n.TIGHT_TREE=l;const d="longest-path";n.LONGEST_PATH=d})(be||(be={}));var We;(function(n){const a="l";n.LEFT=a;const l="r";n.RIGHT=l;const d="c";n.CENTER=d})(We||(We={}));var et=e(84945),at=e(11105),yt=e(97963),se=e(46506),ae=e.n(se),Ye=e(54073),Ve=e.n(Ye),Ue=e(10368);const nt=(0,f.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function Q({node:{id:n}}){const a=nt(),[l,d]=t.useState(0),[p,v]=t.useState(0),P=t.useRef(null);t.useLayoutEffect(()=>{if(P.current){let{height:ie,width:te}=P.current.getBBox();ie=Math.round(ie),te=Math.round(te),(ie!==p||te!==l)&&(d(te),v(ie))}},[l,p]);const Z=10,G=l+Z*2,H=p+Z*2;return t.createElement("g",null,t.createElement("rect",{className:a.node,width:G,height:H,rx:10}),t.createElement("text",{ref:P,className:a.text,y:H/2,x:G/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const z="arrow-marker",_="node",ce="edge",fe="label",Pe=(0,Ue.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),Oe=n=>t.createElement(Q,{...n});function Se({render:n=Oe,setNode:a,node:l}){const{width:d,height:p,x:v=0,y:P=0}=l,Z=l,G=Pe(),H=t.useRef(null);return t.useLayoutEffect(()=>{if(H.current){let{height:ie,width:te}=H.current.getBBox();ie=Math.round(ie),te=Math.round(te),(ie!==p||te!==d)&&a(l.id,{...l,height:ie,width:te})}},[l,d,p,a]),t.createElement("g",{ref:H,"data-testid":_,className:G.node,transform:`translate(${v-d/2},${P-p/2})`},n({node:Z}))}var Qe=e(55876),Ge=e(66481),gt=e(19574),Rt=e.n(gt);const ut=(0,Ue.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function Ft({edge:{label:n}}){const a=ut();return t.createElement("text",{className:a.text,textAnchor:"middle"},n)}const xt=(0,Ue.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"}),bt=n=>t.createElement(Ft,{...n}),Pt=Qe.Z().x(n=>n.x).y(n=>n.y).curve(Ge.Z);function Vt({render:n=bt,setEdge:a,id:l,edge:d}){const{x:p=0,y:v=0,width:P,height:Z,points:G}=d,H=d,ie=xt(),te=t.useRef(null);t.useLayoutEffect(()=>{if(te.current){let{height:Te,width:$e}=te.current.getBBox();Te=Math.round(Te),$e=Math.round($e),(Te!==Z||$e!==P)&&a(l,{...d,height:Te,width:$e})}},[d,Z,P,a,l]);let Ee="";if(G){const Te=G.filter($e=>Rt()($e.x)&&Rt()($e.y));Ee=Pt(Te)||""}return t.createElement(t.Fragment,null,Ee&&t.createElement("path",{"data-testid":ce,className:ie.path,markerEnd:`url(#${z})`,d:Ee}),H.label?t.createElement("g",{ref:te,"data-testid":fe,className:ie.label,transform:`translate(${p},${v})`},n({edge:H})):null)}const Gt="workspace";function dn(n){var ar,br;const{edges:a,nodes:l,renderNode:d,direction:p=ee.TOP_BOTTOM,align:v,nodeMargin:P=50,edgeMargin:Z=10,rankMargin:G=50,paddingX:H=0,paddingY:ie=0,acyclicer:te,ranker:Ee=be.NETWORK_SIMPLEX,labelPosition:Te=We.RIGHT,labelOffset:$e=10,edgeRanks:ct=1,edgeWeight:$t=1,renderLabel:Jt,defs:qt,zoom:kt="enabled",...Ct}=n,tn=(0,yt.Z)(),[Nt,nr]=t.useState(100),[Gn,Qn]=t.useState(100),Ut=t.useRef(new(ae()).graphlib.Graph),[Sr,Gr]=t.useState(((ar=Ut.current.graph())==null?void 0:ar.width)||0),[Cr,ra]=t.useState(((br=Ut.current.graph())==null?void 0:br.height)||0),[va,aa]=t.useState([]),[oa,Aa]=t.useState([]),cn=Math.max(Sr,Nt),bn=Math.max(Cr,Gn),lr=t.useMemo(()=>Ve()(un=>{if(!un)return;const vn=at.Z(un),on=at.Z(un.getElementById(Gt));function Wn(){vn.call(et.sP().scaleExtent([1,10]).on("zoom",Xn=>{Xn.transform.x=Math.min(0,Math.max(Xn.transform.x,cn-cn*Xn.transform.k)),Xn.transform.y=Math.min(0,Math.max(Xn.transform.y,bn-bn*Xn.transform.k)),on.attr("transform",Xn.transform)}))}kt==="enabled"?Wn():kt==="enable-on-click"&&vn.on("click",()=>Wn());const{width:Hn,height:sa}=un.getBoundingClientRect();Nt!==Hn&&nr(Hn),Gn!==sa&&Qn(sa)},100),[Gn,Nt,cn,bn,kt]),rr=t.useCallback(()=>{const un=Ut.current.nodes(),vn=Ut.current.edges();un.forEach(on=>{l.some(Hn=>Hn.id===on)||Ut.current.removeNode(on)}),vn.forEach(on=>{a.some(Hn=>Hn.from===on.v&&Hn.to===on.w)||Ut.current.removeEdge(on.v,on.w)}),l.forEach(on=>{const Wn=Ut.current.nodes().find(Hn=>on.id===Hn);if(Wn&&Ut.current.node(Wn)){const{width:Hn,height:sa,x:Xn,y:tl}=Ut.current.node(Wn);Ut.current.setNode(Wn,{...on,width:Hn,height:sa,x:Xn,y:tl})}else Ut.current.setNode(on.id,{...on,width:0,height:0})}),a.forEach(on=>{Ut.current.setEdge(on.from,on.to,{...on,label:on.label,width:0,height:0,labelpos:Te,labeloffset:$e,weight:$t,minlen:ct})})},[a,l,Te,$e,$t,ct]),an=t.useMemo(()=>Ve()(()=>{ae().layout(Ut.current);const{height:un,width:vn}=Ut.current.graph(),on=Math.max(0,un||0),Wn=Math.max(0,vn||0);Gr(Wn),ra(on),aa(Ut.current.nodes()),Aa(Ut.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(Ut.current.setGraph({rankdir:p,align:v,nodesep:P,edgesep:Z,ranksep:G,marginx:H,marginy:ie,acyclicer:te,ranker:Ee}),rr(),an(),an.cancel),[te,v,p,Z,H,ie,P,G,Ee,rr,an]);function Pn(un,vn){return Ut.current.setNode(un,vn),an(),Ut.current}function Tr(un,vn){return Ut.current.setEdge(un,vn),an(),Ut.current}return t.createElement("svg",{ref:lr,...Ct,width:"100%",height:bn,viewBox:`0 0 ${cn} ${bn}`},t.createElement("defs",null,t.createElement("marker",{id:z,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:tn.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),qt),t.createElement("g",{id:Gt},t.createElement("svg",{width:Sr,height:Cr,y:bn/2-Cr/2,x:cn/2-Sr/2,viewBox:`0 0 ${Sr} ${Cr}`},oa.map(un=>{const vn=Ut.current.edge(un);return vn?t.createElement(Vt,{key:`${un.v}-${un.w}`,id:un,setEdge:Tr,render:Jt,edge:vn}):null}),va.map(un=>{const vn=Ut.current.node(un);return vn?t.createElement(Se,{key:un,setNode:Pn,render:d,node:vn}):null}))))}const In=(0,f.Z)(n=>{var a;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:(a=n.palette.banner.warning)!=null?a:n.palette.banner.error}}},{name:"BackstageDismissableBanner"}),Qt=n=>{var Te;const{variant:a,message:l,id:d,fixed:p=!1}=n,v=In(),Z=useApi(storageApiRef).forBucket("notifications"),G=(Te=Z.snapshot("dismissedBanners").value)!=null?Te:[],[H,ie]=useState(new Set(G)),te=useObservable(Z.observe$("dismissedBanners"));useEffect(()=>{var $e;if(te!=null&&te.value){const ct=($e=te==null?void 0:te.value)!=null?$e:[];ie(new Set(ct))}},[te==null?void 0:te.value]);const Ee=()=>{Z.set("dismissedBanners",[...H,d])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!H.has(d),classes:{root:classNames(v.root,!p&&v.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(v.content,v[a]),message:v.message},message:l,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Ee},React.createElement(Close,{className:v.icon}))]}))};var Zt=e(60905),Xe=e(90436),ue=e.p+"static/missingAnnotation.67f79e98..svg",j=e.p+"static/noInformation.4b426325..svg",ye=e.p+"static/createComponent.975d1e1e..svg",Ke=e.p+"static/noBuild.1715fa71..svg";const qe=(0,f.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),st=({missing:n})=>{const a=qe();switch(n){case"field":return t.createElement("img",{src:ue,className:a.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:j,alt:"no Information",className:a.generalImg});case"content":return t.createElement("img",{src:ye,alt:"create Component",className:a.generalImg});case"data":return t.createElement("img",{src:Ke,alt:"no Build",className:a.generalImg});default:return null}},St=(0,f.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 Yt(n){const{title:a,description:l,missing:d,action:p}=n,v=St();return t.createElement(Zt.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:v.root,spacing:2},t.createElement(Zt.Z,{item:!0,xs:12,md:6},t.createElement(Zt.Z,{container:!0,direction:"column"},t.createElement(Zt.Z,{item:!0,xs:!0},t.createElement(Xe.Z,{variant:"h5"},a)),t.createElement(Zt.Z,{item:!0,xs:!0},t.createElement(Xe.Z,{variant:"body1"},l)),t.createElement(Zt.Z,{item:!0,xs:!0,className:v.action},p))),t.createElement(Zt.Z,{item:!0,xs:12,md:6,className:v.imageContainer},t.createElement(st,{missing:d})))}const _t=`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`,en=(0,f.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function mn(n){const{annotation:a,readMoreUrl:l}=n,d=l||"https://backstage.io/docs/features/software-catalog/well-known-annotations",p=en(),v=t.createElement(t.Fragment,null,"The ",t.createElement("code",null,a)," annotation is missing. You need to add the annotation to your component if you want to enable this tool.");return t.createElement(Yt,{missing:"field",title:"Missing Annotation",description:v,action:t.createElement(t.Fragment,null,t.createElement(Xe.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:p.code},t.createElement(Ie,{text:_t.replace("ANNOTATION",a),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(y.Z,{color:"primary",component:K,to:d},"Read more"))})}var Xt=e(11776),U=e(38402),J=e(49378),de=e(41128),Ce=e(27616),xe=e(8284),we=e(70660),pt=e(91750),Kt=e(38016);const zt=(n,a)=>(a.palette.type==="light"?de._j:de.$n)(a.palette[n].light,.6),Mt=(n,a)=>(a.palette.type==="light"?de.$n:de._j)(a.palette[n].light,.9),It=(0,f.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:a})=>zt(a,n)}})),it=({severity:n})=>{const a=It({severity:n});return t.createElement(pt.Z,{classes:a})},wt=({severity:n})=>{const a=It({severity:n});return t.createElement(Kt.Z,{classes:a})},sn=(0,f.Z)(n=>({panel:{backgroundColor:({severity:a})=>Mt(a,n),color:({severity:a})=>zt(a,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:a})=>zt(a,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:a})=>zt(a,n),backgroundColor:({severity:a})=>Mt(a,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"}),Wt=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function nn(n){const{severity:a="warning",title:l,message:d,children:p,defaultExpanded:v}=n,P=sn({severity:a}),Z=Wt(a)+(l?`: ${l}`:"");return t.createElement(Ce.Z,{defaultExpanded:v!=null?v:!1,className:P.panel,role:"alert"},t.createElement(xe.Z,{expandIcon:t.createElement(wt,{severity:a}),className:P.summary},t.createElement(it,{severity:a}),t.createElement(Xe.Z,{className:P.summaryText,variant:"subtitle1"},Z)),(d||p)&&t.createElement(we.Z,null,t.createElement(Zt.Z,{container:!0},d&&t.createElement(Zt.Z,{item:!0,xs:12},t.createElement(Xe.Z,{className:P.message,variant:"body1"},d)),p&&t.createElement(Zt.Z,{item:!0,xs:12,className:P.details},p))))}const Bn=(0,f.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),Zn=({error:n,message:a,stack:l,children:d})=>{const p=Bn();return t.createElement(Xt.Z,{dense:!0},t.createElement(U.Z,{alignItems:"flex-start"},t.createElement(J.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),t.createElement(Je,{text:n})),t.createElement(U.Z,{alignItems:"flex-start"},t.createElement(J.Z,{classes:{secondary:p.text},primary:"Message",secondary:a}),t.createElement(Je,{text:a})),l&&t.createElement(U.Z,{alignItems:"flex-start"},t.createElement(J.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:l}),t.createElement(Je,{text:l})),d)};function Ht(n){const{title:a,error:l,defaultExpanded:d,children:p}=n;return t.createElement(nn,{severity:"error",title:a!=null?a:l.message,defaultExpanded:d},t.createElement(Zn,{error:l.name,message:l.message,stack:l.stack,children:p}))}var Lt=e(85256);const hn=(0,f.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function Rn(n){var $e;const{title:a,error:l,defaultExpanded:d}=n,p=hn();if(l.name!=="ResponseError")return t.createElement(Ht,{title:a!=null?a:l.message,defaultExpanded:d,error:l});const{body:v,cause:P}=l,{request:Z,response:G}=v,H=`${G.statusCode}: ${P.name}`,ie=Z&&`${Z.method} ${Z.url}`,te=P.message.replace(/\\n/g,`
12
+ `),Ee=($e=P.stack)==null?void 0:$e.replace(/\\n/g,`
13
+ `),Te=JSON.stringify(v,void 0,2);return t.createElement(Ht,{title:a!=null?a:l.message,defaultExpanded:d,error:{name:H,message:te,stack:Ee}},ie&&t.createElement(U.Z,{alignItems:"flex-start"},t.createElement(J.Z,{classes:{secondary:p.text},primary:"Request",secondary:Z?`${ie}`:void 0}),t.createElement(Je,{text:ie})),t.createElement(t.Fragment,null,t.createElement(Lt.Z,{component:"li",className:p.divider}),t.createElement(U.Z,{alignItems:"flex-start"},t.createElement(J.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(Ie,{language:"json",text:Te,showCopyCodeButton:!0})))}var ln=e(47093);function gn(n){const a=document.createElement("div");return a.setAttribute("id",n),a}function w(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function g(n){const a=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),v=p||gn(n);return p||w(v),v.appendChild(a.current),function(){a.current.remove(),v.childNodes.length===-1&&v.remove()}},[n]);function l(){return a.current||(a.current=document.createElement("div")),a.current}return l()}var C=null;const F="core.calloutSeen";function V(){const[n,a]=useState(()=>{const d=localStorage.getItem(F);return d?JSON.parse(d):{}}),l=useCallback((d,p)=>{const v=localStorage.getItem(F),Z={...v?JSON.parse(v):{},[d]:p};a(Z),localStorage.setItem(F,JSON.stringify(Z))},[]);return{states:n,setState:l}}function oe(n){const{states:a,setState:l}=V(),d=useCallback(()=>{l(n,!0)},[l,n]);return{seen:a[n]===!0,markSeen:d}}function he(n){const{seen:a,markSeen:l}=oe(n);return{show:a===!1,hide:l}}const Le=(0,f.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 Et(n){const{featureId:a,title:l,description:d,children:p}=n,{show:v,hide:P}=useShowCallout(a),Z=usePortal("core.callout"),G=useRef(null),[H,ie]=useState(),te=Le(),Ee=useCallback(()=>{if(G.current){const Te=G.current.getBoundingClientRect(),$e=Math.max(Te.width,Te.height),ct=800,$t=Te.x-($e-Te.width)/2-ct,Jt=Te.y-($e-Te.height)/2-ct,qt=$e+2*ct,kt=450,Ct=Te.x+Te.width/2-kt,tn=Te.y-($e-Te.height)/2+$e+20;ie({dotLeft:$t,dotTop:Jt,dotSize:qt,borderWidth:ct,textTop:tn,textLeft:Ct,textWidth:kt})}},[]);return useEffect(()=>(window.addEventListener("resize",Ee),window.addEventListener("scroll",Ee),()=>{window.removeEventListener("resize",Ee),window.removeEventListener("scroll",Ee)}),[Ee]),useLayoutEffect(Ee,[G.current,Ee]),v?React.createElement(React.Fragment,null,React.createElement("div",{className:te.featureWrapper,ref:G},p),createPortal(React.createElement("div",{className:te.backdrop},React.createElement(ClickAwayListener,{onClickAway:P},React.createElement(React.Fragment,null,React.createElement("div",{className:te.dot,"data-testid":"dot",style:{left:H==null?void 0:H.dotLeft,top:H==null?void 0:H.dotTop,width:H==null?void 0:H.dotSize,height:H==null?void 0:H.dotSize,borderWidth:H==null?void 0:H.borderWidth},onClick:P,onKeyDown:P,role:"button",tabIndex:0},React.createElement("div",{className:te.pulseCircle})),React.createElement("div",{className:te.text,"data-testid":"text",style:{left:H==null?void 0:H.textLeft,top:H==null?void 0:H.textTop,width:H==null?void 0:H.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},l),React.createElement(Typography,null,d))))),Z)):React.createElement(React.Fragment,null,p)}var jt=e(35292);const An=(0,f.Z)(n=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:n.palette.text.secondary,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 rn({color:n="primary",disabled:a=!1,href:l="#",icon:d=t.createElement(jt.Z,null),label:p,onClick:v,title:P}){const Z=An();return a?t.createElement(S.Z,{title:P,className:E()(Z.link,Z.disabled),underline:"none"},d,t.createElement("span",{className:Z.label},p)):t.createElement(S.Z,{title:P,className:E()(Z.link,Z[n]),to:l,component:K,onClick:v},d,t.createElement("span",{className:Z.label},p))}const or=(0,f.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function sr(n){const{links:a}=n,l=or();return t.createElement("nav",{className:l.links},a.map((d,p)=>t.createElement(rn,{key:p+1,...d})))}const Pr=n=>{const a=n==="dark"?"16%":"97%";return`
14
+ hsl(0, 0%, ${a}) 0%,
15
+ hsla(0, 0%, ${a}, 0.987) 8.1%,
16
+ hsla(0, 0%, ${a}, 0.951) 15.5%,
17
+ hsla(0, 0%, ${a}, 0.896) 22.5%,
18
+ hsla(0, 0%, ${a}, 0.825) 29%,
19
+ hsla(0, 0%, ${a}, 0.741) 35.3%,
20
+ hsla(0, 0%, ${a}, 0.648) 41.2%,
21
+ hsla(0, 0%, ${a}, 0.55) 47.1%,
22
+ hsla(0, 0%, ${a}, 0.45) 52.9%,
23
+ hsla(0, 0%, ${a}, 0.352) 58.8%,
24
+ hsla(0, 0%, ${a}, 0.259) 64.7%,
25
+ hsla(0, 0%, ${a}, 0.175) 71%,
26
+ hsla(0, 0%, ${a}, 0.104) 77.5%,
27
+ hsla(0, 0%, ${a}, 0.049) 84.5%,
28
+ hsla(0, 0%, ${a}, 0.013) 91.9%,
29
+ hsla(0, 0%, ${a}, 0) 100%
30
+ `},Kr=100,cr=10,jn=(0,f.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:Kr,height:`calc(100% + ${cr}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-cr,background:`linear-gradient(90deg, ${Pr(n.palette.type)})`},fadeRight:{right:-cr,background:`linear-gradient(270deg, ${Pr(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function Mn(n){const[[a,l],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=n.current;if(!p){d([0,0]);return}const v=()=>{const P=p.scrollLeft,Z=p.scrollWidth-p.offsetWidth-p.scrollLeft;d([P,Z])};return v(),p.addEventListener("scroll",v),window.addEventListener("resize",v),()=>{p.removeEventListener("scroll",v),window.removeEventListener("resize",v)}},[n]),[a,l]}function qn(n,a,l){const[d,p]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const v=performance.now(),P=requestAnimationFrame(Z=>{if(!n.current)return;const G=Z-v,H=Math.abs(d)*G/a,te=Math.max(l,H)*Math.sign(d);n.current.scrollBy({left:te});const Ee=d-te;Math.sign(d)!==Math.sign(Ee)?p(0):p(Ee)});return()=>cancelAnimationFrame(P)},[n,d,a,l]),p}function ur(n){const{scrollStep:a=100,scrollSpeed:l=50,minScrollDistance:d=5,children:p,...v}=n,P=jn(n),Z=React.useRef(),[G,H]=Mn(Z),ie=qn(Z,l,d),te=Ee=>{!Z.current||ie(Ee?a:-a)};return React.createElement("div",{...v,className:P.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:P.container,ref:Z},p),React.createElement("div",{className:classNames(P.fade,P.fadeLeft,{[P.fadeHidden]:G===0})}),React.createElement("div",{className:classNames(P.fade,P.fadeRight,{[P.fadeHidden]:H===0})}),G>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>te(!1),className:classNames(P.button,P.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),H>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>te(!0),className:classNames(P.button,P.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Ir=(0,f.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function ia(n){const a=Ir(n),{shorthand:l,alpha:d}=n;return l?React.createElement("span",{className:a[d?"alpha":"beta"],style:{fontSize:"120%"}},d?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:a[d?"alpha":"beta"]},d?"Alpha":"Beta")}const dr=(0,t.lazy)(()=>Promise.all([e.e(4949),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function fr(n){const{Progress:a}=(0,c.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(a,null)},t.createElement(dr,{...n}))}const Lr=(0,f.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"}),ir={code:({inline:n,className:a,children:l,...d})=>{const p=String(l).replace(/\n+$/,""),v=/language-(\w+)/.exec(a||"");return!n&&v?t.createElement(Ie,{language:v[1],text:p}):t.createElement("code",{className:a,...d},l)}};function wn(n){const{content:a,dialect:l="gfm",linkTarget:d,transformLinkUri:p,transformImageUri:v,className:P}=n,Z=Lr();return React.createElement(ReactMarkdown,{remarkPlugins:l==="gfm"?[gfm]:[],className:`${Z.markdown} ${P}`,children:a,components:ir,linkTarget:d,transformLinkUri:p,transformImageUri:v})}var _n=e(10179);const er=(0,f.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),kr=({request:n,busy:a,setBusy:l})=>{const d=er(),[p,v]=useState(),P=async()=>{l(!0);try{await n.trigger()}catch(G){v(isError(G)?G.message:"An unspecified error occurred")}finally{l(!1)}},Z=n.provider.icon;return React.createElement(ListItem,{disabled:a,classes:{root:d.root}},React.createElement(ListItemAvatar,null,React.createElement(Z,{fontSize:"large"})),React.createElement(ListItemText,{primary:n.provider.title,secondary:p&&React.createElement(Typography,{color:"error"},p)}),React.createElement(Button,{color:"primary",variant:"contained",onClick:P},"Log in"))};var mr=null;const hr=(0,f.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},titleHeading:{fontSize:n.typography.h6.fontSize},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function Yr(n){const a=hr(),[l,d]=useState(!1),p=useApi(oauthRequestApiRef),v=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),P=()=>{v.forEach(Z=>Z.reject())};return React.createElement(Dialog,{open:Boolean(v.length),fullWidth:!0,maxWidth:"xs",classes:{paper:a.dialog},"aria-labelledby":"oauth-req-dialog-title"},React.createElement("main",null,React.createElement(DialogTitle,{classes:{root:a.title},id:"oauth-req-dialog-title"},React.createElement(Typography,{className:a.titleHeading,variant:"h1"},"Login Required")),React.createElement(DialogContent,{dividers:!0,classes:{root:a.contentList}},React.createElement(List,null,v.map(Z=>React.createElement(LoginRequestListItem,{key:Z.provider.title,request:Z,busy:l,setBusy:d}))))),React.createElement(DialogActions,{classes:{root:a.actionButtons}},React.createElement(Button,{onClick:P},"Reject All")))}var Or=e(15277),gr=e.n(Or),xr=e(29862);const Dr=(0,f.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Fr(n){var P;const[a,l]=(0,t.useState)(!1),d=(0,xr.t)(),p=Dr(),v=Z=>{d()&&l(Z)};return t.createElement(Be.ZP,{title:(P=n.title)!=null?P:n.text||"",placement:n.placement,disableHoverListener:!a},t.createElement(gr(),{text:n.text,line:n.line,onToggled:v,containerClassName:p.container}))}var Br=e(67358);function Mr(n){const[a,l]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>l(!0),250);return()=>clearTimeout(d)},[]),a?t.createElement(Br.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var wr=e(94339),pr=e(14503),$r=e(24579),yr=e(32552),pn=e(15459),Ln=e(95544),yn=e(27597);const Kn=(0,f.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 Ur(n){const{link:a,title:l,onClick:d}=n,p=Kn();return t.createElement("div",null,t.createElement(Lt.Z,null),t.createElement(K,{to:a,onClick:d,underline:"none"},t.createElement(Ln.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(Ln.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(Xe.Z,null,t.createElement("strong",null,l))),t.createElement(yn.Z,{className:p.arrow}))))}const Nr=n=>{const{slackChannel:a}=n;if(a){if(typeof a=="string")return t.createElement(t.Fragment,null,"Please contact ",a," for help.");if(!a.href)return t.createElement(t.Fragment,null,"Please contact ",a.name," for help.")}else return null;return t.createElement(le,{to:a.href,variant:"contained"},a.name)},Er=class extends t.Component{constructor(a){super(a),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(a,l){console.error(`ErrorBoundary, error: ${a}, info: ${l}`),this.setState({error:a,errorInfo:l})}render(){const{slackChannel:a,children:l}=this.props,{error:d}=this.state;return d?t.createElement(Ht,{title:"Something Went Wrong",error:d},t.createElement(Nr,{slackChannel:a})):l}},vr=(0,f.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"}),Zr=(0,pn.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(pr.Z),Ar={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 tr(n){const{title:a,subheader:l,divider:d=!0,deepLink:p,slackChannel:v,errorBoundaryProps:P,variant:Z,children:G,headerStyle:H,headerProps:ie,icon:te,action:Ee,actionsClassName:Te,actions:$e,cardClassName:ct,actionsTopRight:$t,className:Jt,noPadding:qt,titleTypographyProps:kt}=n,Ct=vr();let tn={},Nt={};Z&&Z.split(/[\s]+/g).forEach(Ut=>{tn={...tn,...Ar.card[Ut]},Nt={...Nt,...Ar.cardContent[Ut]}});const nr=()=>t.createElement("div",{className:Ct.headerSubheader},l&&t.createElement("div",{className:Ct.subheader},l),te),Gn=P||(v?{slackChannel:v}:{});return t.createElement(wr.Z,{style:tn,className:Jt},t.createElement(Er,{...Gn},a&&t.createElement(yr.Z,{classes:{root:Ct.header,title:Ct.headerTitle,subheader:Ct.headerSubheader,avatar:Ct.headerAvatar,action:Ct.headerAction,content:Ct.headerContent},title:a,subheader:nr(),action:Ee,style:{...H},titleTypographyProps:kt,...ie}),$t&&t.createElement(Zr,null,$t),d&&t.createElement(Lt.Z,null),t.createElement($r.Z,{className:E()(ct,{[Ct.noPadding]:qt}),style:Nt},G),$e&&t.createElement(pr.Z,{className:Te},$e),p&&t.createElement(Ur,{...p})))}var la=e(39307);const zr=(0,f.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"}),I={fractional:!0,inverse:!1,unit:"%",max:100},k=({palette:n,value:a,inverse:l,max:d})=>{if(isNaN(a))return"#ddd";const p=d||I.max,v=l?p-a:a;return v<p/3?n.status.error:v<p*(2/3)?n.status.warning:n.status.ok};function me(n){const[a,l]=useState(null),{getColor:d=k}=n,p=zr(n),{palette:v}=useTheme(),{value:P,fractional:Z,inverse:G,unit:H,max:ie,description:te}={...I,...n},Ee=Z?Math.round(P*ie):P,Te=ie!==100?Math.round(P):Ee,[$e,ct]=useState(!1);return useEffect(()=>{const $t=a,Jt=()=>ct(!0),qt=()=>ct(!1);return $t&&te?($t.addEventListener("mouseenter",Jt),$t.addEventListener("mouseleave",qt),()=>{$t.removeEventListener("mouseenter",Jt),$t.removeEventListener("mouseleave",qt)}):()=>{ct(!1)}},[te,a]),React.createElement("div",{ref:l,className:p.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Ee,strokeWidth:12,trailWidth:12,strokeColor:d({palette:v,value:Te,inverse:G,max:ie}),className:p.circle}),te&&$e?React.createElement("div",{className:p.description},te):React.createElement("div",{className:p.overlay},isNaN(P)?"N/A":`${Te}${H}`))}const Me=(0,f.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function _e(n){const a=Me(n),{title:l,subheader:d,progress:p,inverse:v,deepLink:P,description:Z,icon:G,variant:H,getColor:ie}=n,te={inverse:v,description:Z,getColor:ie,value:p};return React.createElement("div",{className:a.root},React.createElement(InfoCard,{title:l,subheader:d,deepLink:P,variant:H,icon:G},React.createElement(Gauge,{...te})))}function ft(n){const{value:a,getColor:l=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(a))return null;let p=Math.round(a*100*100)/100;p>100&&(p=100);const v=l({palette:d,value:p,inverse:!1,max:100});return React.createElement(Tooltip,{title:`${p}%`},React.createElement("span",null,React.createElement(Line,{percent:p,strokeWidth:4,trailWidth:4,strokeColor:v})))}var vt=e(21324),Dt=e(7089),dt=e(1292),A=e(42494),T=e(74603),N=e(56939),W=e(12231),Y=e(73698),X=e(72379);const ge=(0,f.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Ne=()=>{const n=ge();return t.createElement(X.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 De=(0,f.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var ze=()=>{const n=De();return t.createElement(X.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 ke=(0,pn.Z)(n=>(0,o.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"})(T.Z),Ot=(0,f.Z)(n=>(0,o.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}},formLabel:{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 rt(n){const{multiple:a,items:l,label:d,placeholder:p,selected:v,onChange:P,triggerReset:Z,native:G=!1,disabled:H=!1,margin:ie}=n,te=Ot(),[Ee,Te]=(0,t.useState)(v||(a?[]:"")),[$e,ct]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Te(a?[]:"")},[Z,a]),(0,t.useEffect)(()=>{v!==void 0&&Te(v)},[v]);const $t=Ct=>{Te(Ct.target.value),P(Ct.target.value)},Jt=Ct=>{if(H){Ct.preventDefault();return}ct(tn=>a&&!(Ct.target instanceof HTMLElement)?!0:!tn)},qt=()=>{ct(!1)},kt=Ct=>()=>{const tn=Ee.filter(Nt=>Nt!==Ct);Te(tn),P(tn)};return t.createElement("div",{className:te.root},t.createElement(dt.Z,{onClickAway:qt},t.createElement(A.Z,{className:te.formControl},t.createElement(N.Z,{className:te.formLabel},d),t.createElement(Y.Z,{"aria-label":d,value:Ee,native:G,disabled:H,"data-testid":"select",displayEmpty:!0,multiple:a,margin:ie,onChange:$t,onClick:Jt,open:$e,input:t.createElement(ke,null),label:d,tabIndex:0,renderValue:Ct=>{var tn;return a&&Ee.length!==0?t.createElement("div",{className:te.chips},Ct.map(Nt=>{var nr,Gn;return t.createElement(Dt.Z,{key:(nr=l.find(Qn=>Qn.value===Nt))==null?void 0:nr.value,label:(Gn=l.find(Qn=>Qn.value===Nt))==null?void 0:Gn.label,clickable:!0,onDelete:kt(Nt),className:te.chip})})):t.createElement(Xe.Z,null,Ee.length===0?p||"":(tn=l.find(Nt=>Nt.value===Ct))==null?void 0:tn.label)},IconComponent:()=>$e?t.createElement(ze,null):t.createElement(Ne,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!a&&t.createElement(W.Z,{value:[]},p),G?l&&l.map(Ct=>t.createElement("option",{value:Ct.value,key:Ct.value},Ct.label)):l&&l.map(Ct=>t.createElement(W.Z,{key:Ct.value,value:Ct.value},a&&t.createElement(vt.Z,{color:"primary",checked:Ee.includes(Ct.value)||!1,className:te.checkbox}),Ct.label))))))}const je=()=>{},Bt=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:je,stepHistory:[],setStepHistory:je,onStepChange:je});function fn(n){const{children:a,elevated:l,onStepChange:d,activeStep:p=0}=n,[v,P]=useState(p),[Z,G]=useState([0]);useEffect(()=>{P(p)},[p]);const H=[];let ie;return Children.forEach(a,te=>{isValidElement(te)&&(te.props.end?ie=te:H.push(te))}),React.createElement(React.Fragment,null,React.createElement(Bt.Provider,{value:{stepIndex:v,setStepIndex:P,stepHistory:Z,setStepHistory:G,onStepChange:d,stepperLength:Children.count(a)}},React.createElement(MuiStepper,{activeStep:v,orientation:"vertical",elevation:l?2:0},H)),v>=Children.count(a)-1&&ie)}const kn=(0,f.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),On=({text:n,handleClick:a})=>React.createElement(Button,{onClick:a},n||"Reset"),En=({text:n,handleClick:a,disabled:l,last:d,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:l,"data-testid":`nextButton-${p}`,onClick:a},n||(d?"Finish":"Next")),Sn=({text:n,handleClick:a,disabled:l,stepIndex:d})=>React.createElement(Button,{onClick:a,"data-testid":`backButton-${d}`,disabled:l},n||"Back"),$n=({actions:n={},children:a})=>{const l=kn(),{stepperLength:d,stepIndex:p,setStepIndex:v,stepHistory:P,setStepHistory:Z,onStepChange:G}=useContext(VerticalStepperContext),H=(Te,$e)=>{$e&&$e(),G&&G(p,Te),v(Te)},ie=()=>{const Te=n.nextStep?n.nextStep(p,d-1):p+1;H(Te,n.onNext),Z([...P,Te])},te=()=>{P.pop(),H(P[P.length-1],n.onBack),Z([...P])},Ee=()=>{H(0,n.onRestart),Z([0])};return React.createElement("div",{className:l.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(Sn,{text:n.backText,handleClick:te,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(En,{text:n.nextText,handleClick:ie,disabled:!!d&&p>=d||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(On,{text:n.restartText,handleClick:Ee,stepIndex:p}),a)},Rr=(0,f.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function Wr(n){const{title:a,children:l,end:d,actions:p,...v}=n,P=Rr();return d?React.createElement("div",{className:P.end},React.createElement(Typography,{variant:"h6"},a),l,React.createElement(SimpleStepperFooter,{actions:{...p||{},showNext:!1}})):React.createElement(MuiStep,{...v},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},a)),React.createElement(StepContent,null,l,React.createElement(SimpleStepperFooter,{actions:p})))}const Yn=(0,f.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 Cn(n){const a=Yn(n);return React.createElement("span",{className:classNames(a.status,a.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function xn(n){const a=Yn(n);return React.createElement("span",{className:classNames(a.status,a.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Hr(n){const a=Yn(n);return React.createElement("span",{className:classNames(a.status,a.error),"aria-label":"Status error","aria-hidden":"true",...n})}function ca(n){const a=Yn(n);return React.createElement("span",{className:classNames(a.status,a.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function al(n){const a=Yn(n);return React.createElement("span",{className:classNames(a.status,a.running),"aria-label":"Status running","aria-hidden":"true",...n})}function ol(n){const a=Yn(n);return React.createElement("span",{className:classNames(a.status,a.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var sl=e(74600),Ra=e(15584);const Ro=n=>(0,o.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),So={root:{border:"0",verticalAlign:"top"}},Co=n=>(0,o.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),To=n=>(0,o.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),bo=(0,pn.Z)(Ro,{name:"BackstageMetadataTableTitleCell"})(Ra.Z),Po=(0,pn.Z)(So,{name:"BackstageMetadataTableCell"})(Ra.Z),il=({dense:n,children:a})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,a)),ll=({title:n,children:a,...l})=>React.createElement(TableRow,null,n&&React.createElement(bo,null,n),React.createElement(Po,{colSpan:n?1:2,...l},a)),Sa=(0,pn.Z)(Co,{name:"BackstageMetadataTableList"})(({classes:n,children:a})=>t.createElement("ul",{className:n.root},a)),cl=(0,pn.Z)(To,{name:"BackstageMetadataTableListItem"})(({classes:n,children:a})=>t.createElement("li",{className:n.root},a)),Ca=(0,o.Z)({root:{margin:"0 0",listStyleType:"none"}}),Io=n=>(0,o.Z)({root:{...Ca.root,paddingLeft:n.spacing(1)}}),Ta=(0,pn.Z)(Ca,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:a})=>t.createElement(Sa,{classes:n},a)),ba=(0,pn.Z)(Io,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:a})=>t.createElement(Sa,{classes:n},a));function Lo(n,a){const l=n.map((d,p)=>React.createElement(MetadataListItem,{key:p},ua(d)));return a?React.createElement(ba,null,l):React.createElement(Ta,null,l)}function Oo(n,a,l){const d=Object.keys(n).map(p=>{const v=ua(n[p],!0),P=l&&l.titleFormat?l.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${P}: `,v)});return a?React.createElement(ba,null,d):React.createElement(Ta,null,d)}function ua(n,a,l){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?Oo(n,a,l):Array.isArray(n)?Lo(n,l):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const xo=({value:n,options:a})=>React.createElement(Fragment,null,ua(n,a)),Do=({title:n,value:a,options:l})=>React.createElement(MetadataTableItem,{title:l&&l.titleFormat?l.titleFormat(n):startCase(n)},React.createElement(xo,{value:a,options:l}));function Fo(n,a){return Object.keys(n).map(l=>React.createElement(Do,{key:l,title:l,value:n[l],options:a}))}function ul(n){const{metadata:a,dense:l=!0,options:d}=n,p=Fo(a,d||{});return React.createElement(MetadataTable,{dense:l},p)}var Bo=e(49429),Mo=e(86136),Pa=e(79784),wo=e(19126),Ia=e.n(wo);function $o(n){return qs.stringify(n,{strictNullHandling:!0})}function La(n){return qs.parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Oa(n,a){return La(n)[a]}function Uo(n,a,l){const d={...La(n),[a]:l};return $o(d)}function dl(n,a=250){const[l,d]=useSearchParams(),p=l.toString(),[v,P]=useState(Oa(p,n));return useEffect(()=>{const Z=Oa(p,n);P(G=>isEqual(Z,G)?G:Z)},[p,P,n]),useDebouncedEffect(()=>{const Z=Uo(p,n,v);p!==Z&&d(Z,{replace:!0})},[d,v,p,n],a),[v,P]}const No={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 xa(){const a=(0,c.useApiHolder)().get(c.configApiRef),l=a==null?void 0:a.getOptionalConfig("app.support");return l?{url:l.getString("url"),items:l.getConfigArray("items").flatMap(d=>{var p;return{title:d.getString("title"),icon:d.getOptionalString("icon"),links:((p=d.getOptionalConfigArray("links"))!=null?p:[]).flatMap(v=>({url:v.getString("url"),title:v.getString("title")}))}})}:No}var Zo=e(80079);function zn(n,a){const d=(0,c.useApp)().getSystemIcon(n);return d?t.createElement(d,{...a}):t.createElement(Zo.Z,{...a})}function fl(n){return zn("brokenImage",n)}function ml(n){return zn("catalog",n)}function hl(n){return zn("chat",n)}function gl(n){return zn("dashboard",n)}function pl(n){return zn("docs",n)}function yl(n){return zn("email",n)}function El(n){return zn("github",n)}function vl(n){return zn("group",n)}function Jr(n){return zn("help",n)}function Al(n){return zn("user",n)}function Rl(n){return zn("warning",n)}const zo=(0,f.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Wo=({icon:n})=>{var d;const a=(0,c.useApp)(),l=n&&(d=a.getSystemIcon(n))!=null?d:Jr;return t.createElement(l,null)},Ho=({link:n})=>{var a;return t.createElement(K,{to:n.url},(a=n.title)!=null?a:n.url)},jo=({item:n})=>{var a;return t.createElement(U.Z,null,t.createElement(Mo.Z,null,t.createElement(Wo,{icon:n.icon})),t.createElement(J.Z,{primary:n.title,secondary:(a=n.links)==null?void 0:a.reduce((l,d,p)=>[...l,p>0&&t.createElement("br",{key:p}),t.createElement(Ho,{link:d,key:d.url})],[])}))};function Vo(n){const{title:a,children:l}=n,{items:d}=xa(),[p,v]=(0,t.useState)(!1),[P,Z]=(0,t.useState)(null),G=zo(),H=(0,mt.Z)(Ee=>Ee.breakpoints.down("sm")),ie=Ee=>{Z(Ee.currentTarget),v(!0)},te=()=>{v(!1)};return t.createElement(t.Fragment,null,t.createElement(Ln.Z,{display:"flex",ml:1},H?t.createElement(Fe.Z,{color:"primary",size:"small",onClick:ie,"data-testid":"support-button"},t.createElement(Jr,null)):t.createElement(y.Z,{"data-testid":"support-button","aria-label":"support",color:"primary",onClick:ie,startIcon:t.createElement(Jr,null)},"Support")),t.createElement(Pa.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:te},t.createElement(Xt.Z,{className:G.popoverList},a&&t.createElement(U.Z,{alignItems:"flex-start"},t.createElement(Xe.Z,{variant:"subtitle1"},a)),t.Children.map(l,(Ee,Te)=>t.createElement(U.Z,{alignItems:"flex-start",key:`child-${Te}`},Ee)),d&&d.map((Ee,Te)=>t.createElement(jo,{item:Ee,key:`item-${Te}`}))),t.createElement(Bo.Z,null,t.createElement(y.Z,{color:"primary",onClick:te},"Close"))))}var da=e(18671),Un=e(10289);const Qr=72,Da=24,Fa=18,Jn={drawerWidthClosed:Qr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Qr,iconSize:Qr-Da*2,iconPadding:Da,selectedIndicatorWidth:3,userBadgePadding:Fa,userBadgeDiameter:Qr-Fa*2,mobileSidebarHeight:56},Go=n=>({...Jn,...n,iconContainerWidth:Jn.drawerWidthClosed,iconSize:Jn.drawerWidthClosed-Jn.iconPadding*2,userBadgeDiameter:Jn.drawerWidthClosed-Jn.userBadgePadding*2}),Ba={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:Jn.defaultOpenDelayMs+200},Ko=n=>({...Ba,...n}),Sl="@backstage/core/sidebar-intro-dismissed",Vn=(0,t.createContext)({sidebarConfig:Jn,submenuConfig:Ba}),Ma=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var Xr;(function(n){const a="sidebarPinState";n.SIDEBAR_PIN_STATE=a})(Xr||(Xr={}));const wa={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(Xr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(Xr.SIDEBAR_PIN_STATE,JSON.stringify(n))}};var qr=e(76241);const $a={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},Ua=(0,t.createContext)($a),Na=(0,qr.CT)("sidebar-pin-state-context"),ko=({children:n,value:a})=>t.createElement(Ua.Provider,{value:a},t.createElement(Na.Provider,{value:(0,qr.EI)({1:a})},n)),jr=()=>{const n=(0,t.useContext)(Na),a=(0,t.useContext)(Ua);if(n===void 0)return a||$a;const l=n.atVersion(1);if(l===void 0)throw new Error("No context found for version 1.");return l},Yo=(0,f.Z)(n=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:a=>a.isPinned?a.sidebarConfig.drawerWidthOpen:a.sidebarConfig.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:a=>a.sidebarConfig.mobileSidebarHeight}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),Za=(0,t.createContext)({content:{contentRef:void 0}});function Jo(n){const[a,l]=(0,t.useState)(()=>wa.getSidebarPinState()),{sidebarConfig:d}=(0,t.useContext)(Vn),p=(0,t.useRef)(null),v=(0,t.useMemo)(()=>({content:{contentRef:p}}),[p]);(0,t.useEffect)(()=>{wa.setSidebarPinState(a)},[a]);const P=(0,mt.Z)(H=>H.breakpoints.down("xs"),{noSsr:!0}),Z=()=>l(!a),G=Yo({isPinned:a,sidebarConfig:d});return t.createElement(ko,{value:{isPinned:a,toggleSidebarPinState:Z,isMobile:P}},t.createElement(Za.Provider,{value:v},t.createElement("div",{className:G.root},n.children)))}function za(){const{content:n}=(0,t.useContext)(Za);return{focusContent:(0,t.useCallback)(()=>{var l,d;(d=(l=n==null?void 0:n.contentRef)==null?void 0:l.current)==null||d.focus()},[n]),contentRef:n==null?void 0:n.contentRef}}const Wa={isOpen:!1,setOpen:()=>{}},Ha=(0,t.createContext)(Wa),ja=(0,qr.CT)("sidebar-open-state-context"),Va=({children:n,value:a})=>t.createElement(Ha.Provider,{value:a},t.createElement(ja.Provider,{value:(0,qr.EI)({1:a})},n)),fa=()=>{const n=(0,t.useContext)(ja),a=(0,t.useContext)(Ha);if(n===void 0)return a||Wa;const l=n.atVersion(1);if(l===void 0)throw new Error("No context found for version 1.");return l};var Qo=e(50023),Xo=e(4190),qo=e(87685),_o=e(44882),es=e(57998);const ts=(0,f.Z)(n=>({root:{flexGrow:0,margin:n.spacing(0,2),color:n.palette.navigation.color},selected:a=>({color:`${n.palette.navigation.selectedColor}!important`,borderTop:`solid ${a.sidebarConfig.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),ns=n=>{const{to:a,label:l,icon:d,value:p}=n,{sidebarConfig:v}=(0,t.useContext)(Vn),P=ts({sidebarConfig:v}),Z=(0,Un.TH)(),{selectedMenuItemIndex:G,setSelectedMenuItemIndex:H}=(0,t.useContext)(ka),ie=(Ee,Te)=>{H(Te===G?-1:Te)},te=p===G&&G>=0||p!==G&&!(G>=0)&&a===Z.pathname;return t.createElement(es.Z,{label:l,icon:d,component:K,to:a||Z.pathname,onChange:ie,value:p,selected:te,classes:P})},Ga=n=>{const{children:a,to:l,label:d,icon:p,value:v}=n,{isMobile:P}=jr();return P?t.createElement(ns,{to:l,label:d,icon:p,value:v}):t.createElement(t.Fragment,null,a)},Ka=(0,f.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:a=>({background:n.palette.navigation.background,width:"100%",bottom:`${a.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${a.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:n.palette.text.primary,alignItems:"center",justifyContent:"space-between",padding:n.spacing(2,3)},overlayHeaderClose:{color:n.palette.text.primary},marginMobileSidebar:a=>({marginBottom:`${a.sidebarConfig.mobileSidebarHeight}px`})})),rs=n=>(0,L.orderBy)(n,({props:{priority:a}})=>Number.isInteger(a)?a:-1,"desc"),as=t.createElement(Ga).type,os=({children:n,label:a="Menu",open:l,onClose:d})=>{const{sidebarConfig:p}=(0,t.useContext)(Vn),v=Ka({sidebarConfig:p});return t.createElement(Xo.ZP,{anchor:"bottom",open:l,onClose:d,ModalProps:{BackdropProps:{classes:{root:v.marginMobileSidebar}}},classes:{root:v.marginMobileSidebar,paperAnchorBottom:v.overlay}},t.createElement(Ln.Z,{className:v.overlayHeader},t.createElement(Xe.Z,{variant:"h3"},a),t.createElement(Fe.Z,{onClick:d,classes:{root:v.overlayHeaderClose}},t.createElement(qo.Z,null))),t.createElement(Ln.Z,{component:"nav"},n))},ka=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),ss=n=>{const{sidebarConfig:a}=(0,t.useContext)(Vn),{children:l}=n,d=Ka({sidebarConfig:a}),p=(0,Un.TH)(),[v,P]=(0,t.useState)(-1);(0,t.useEffect)(()=>{P(-1)},[p.pathname]);let Z=(0,c.useElementFilter)(l,H=>H.getElements().filter(ie=>ie.type===as));if(l)Z.length?Z=rs(Z):Z.push(t.createElement(Ga,{key:"default_menu",icon:t.createElement(_o.Z,null)},l));else return null;const G=v>=0&&!Z[v].props.to;return t.createElement(Va,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(ka.Provider,{value:{selectedMenuItemIndex:v,setSelectedMenuItemIndex:P}},t.createElement(os,{label:Z[v]&&Z[v].props.label,open:G,onClose:()=>P(-1)},Z[v]&&Z[v].props.children),t.createElement(Qo.Z,{className:d.root,"data-testid":"mobile-sidebar-root",component:"nav"},Z)))},Ya=(0,f.Z)(n=>({drawer:a=>({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:a.sidebarConfig.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:a=>({width:a.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 Dn;(function(n){n[n.Closed=0]="Closed";const l=0+1;n[n.Idle=l]="Idle";const d=l+1;n[n.Open=d]="Open"})(Dn||(Dn={}));const is=n=>{const{sidebarConfig:a}=(0,t.useContext)(Vn),{openDelayMs:l=a.defaultOpenDelayMs,closeDelayMs:d=a.defaultCloseDelayMs,disableExpandOnHover:p,children:v}=n,P=Ya({sidebarConfig:a}),Z=(0,mt.Z)(Jt=>Jt.breakpoints.down("md"),{noSsr:!0}),[G,H]=(0,t.useState)(Dn.Closed),ie=(0,t.useRef)(),{isPinned:te,toggleSidebarPinState:Ee}=jr(),Te=()=>{te||p||(ie.current&&(clearTimeout(ie.current),ie.current=void 0),G!==Dn.Open&&!Z&&(ie.current=window.setTimeout(()=>{ie.current=void 0,H(Dn.Open)},l),H(Dn.Idle)))},$e=()=>{te||p||(ie.current&&(clearTimeout(ie.current),ie.current=void 0),G===Dn.Idle?H(Dn.Closed):G===Dn.Open&&(ie.current=window.setTimeout(()=>{ie.current=void 0,H(Dn.Closed)},d)))},ct=G===Dn.Open&&!Z||te,$t=Jt=>{Jt?(H(Dn.Open),Ee()):(H(Dn.Closed),Ee())};return t.createElement("nav",{style:{},"aria-label":"sidebar nav"},t.createElement(cs,null),t.createElement(Va,{value:{isOpen:ct,setOpen:$t}},t.createElement("div",{className:P.root,"data-testid":"sidebar-root",onMouseEnter:p?()=>{}:Te,onFocus:p?()=>{}:Te,onMouseLeave:p?()=>{}:$e,onBlur:p?()=>{}:$e},t.createElement("div",{className:E()(P.drawer,{[P.drawerOpen]:ct})},v))))},ls=n=>{var G,H;const a=Go((G=n.sidebarOptions)!=null?G:{}),l=Ko((H=n.submenuOptions)!=null?H:{}),{children:d,disableExpandOnHover:p,openDelayMs:v,closeDelayMs:P}=n,{isMobile:Z}=jr();return Z?t.createElement(ss,null,d):t.createElement(Vn.Provider,{value:{sidebarConfig:a,submenuConfig:l}},t.createElement(is,{openDelayMs:v,closeDelayMs:P,disableExpandOnHover:p},d))};function cs(){const{sidebarConfig:n}=(0,t.useContext)(Vn),{focusContent:a,contentRef:l}=za(),d=Ya({sidebarConfig:n});return l!=null&&l.current?t.createElement(y.Z,{onClick:a,variant:"contained",className:E()(d.visuallyHidden)},"Skip to content"):null}function Ja(n,a){const l=new URLSearchParams(a.search).toString(),d=Ia().parse(l),p=new URLSearchParams(n.search).toString(),v=Ia().parse(p);return(0,L.isEqual)(a.pathname,n.pathname)&&(0,L.isMatch)(v,d)}const us=(0,f.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,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis",lineHeight:1},subtitle:{fontSize:10,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor}},textContent:{color:n.palette.navigation.color,paddingLeft:n.spacing(4),paddingRight:n.spacing(1),fontSize:"14px",whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"}}),{name:"BackstageSidebarSubmenuItem"}),Cl=n=>{const{title:a,subtitle:l,to:d,icon:p,dropdownItems:v}=n,P=us(),{setIsHoveredOn:Z}=useContext(SidebarItemWithSubmenuContext),G=()=>{Z(!1)},H=useResolvedPath(d!=null?d:""),ie=useLocation();let te=isLocationMatch(ie,H);const[Ee,Te]=useState(!1),$e=()=>{Te(!Ee)};return v!==void 0?(v.some(ct=>{const $t=resolvePath(ct.to);return te=isLocationMatch(ie,$t),te}),React.createElement("div",{className:P.itemContainer},React.createElement(Tooltip,{title:a,enterDelay:500,enterNextDelay:500},React.createElement("button",{onClick:$e,onTouchStart:ct=>ct.stopPropagation(),className:classnames(P.item,te?P.selected:void 0)},p&&React.createElement(p,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:P.label},a,React.createElement("br",null),l&&React.createElement(Typography,{variant:"caption",className:P.subtitle},l)),Ee?React.createElement(ArrowDropUpIcon,{className:P.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:P.dropdownArrow}))),v&&Ee&&React.createElement("div",{className:P.dropdown},v.map((ct,$t)=>React.createElement(Tooltip,{key:$t,title:ct.title,enterDelay:500,enterNextDelay:500},React.createElement(Link,{to:ct.to,underline:"none",className:P.dropdownItem,onClick:G,onTouchStart:Jt=>Jt.stopPropagation()},React.createElement(Typography,{className:P.textContent},ct.title))))))):React.createElement("div",{className:P.itemContainer},React.createElement(Tooltip,{title:a,enterDelay:500,enterNextDelay:500},React.createElement(Link,{to:d,underline:"none",className:classnames(P.item,te?P.selected:void 0),onClick:G,onTouchStart:ct=>ct.stopPropagation()},p&&React.createElement(p,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:P.label},a,React.createElement("br",null),l&&React.createElement(Typography,{variant:"caption",className:P.subtitle},l)))))},ds=(0,f.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:a=>{var l,d;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[n.breakpoints.up("sm")]:{marginLeft:a.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=(l=n.palette.navigation.submenu)==null?void 0:l.background)!=null?d:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:a.submenuConfig.drawerWidthClosed,transitionDelay:`${a.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}},drawerOpen:a=>({width:a.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"}),fs=n=>{const{isOpen:a}=fa(),{sidebarConfig:l,submenuConfig:d}=(0,t.useContext)(Vn),p=a?l.drawerWidthOpen:l.drawerWidthClosed,v=ds({left:p,submenuConfig:d}),{isHoveredOn:P}=(0,t.useContext)(Ma),[Z,G]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{G(P)},[P]),t.createElement("div",{className:E()(v.drawer,{[v.drawerOpen]:Z})},t.createElement(Xe.Z,{variant:"h5",className:v.title},n.title),n.children)};var _r=e(76600),ms=e(26739),Qa=e(98989),hs=e(59797),gs=e(83543);const ps=(0,f.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Tl=()=>{const n=ps();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 bl=null;const ys=(0,f.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Pl=()=>{const n=ys();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 Il=null;const Es=n=>(0,f.Z)(a=>{var l,d,p,v;return{root:{color:a.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:{[a.breakpoints.up("sm")]:{width:n.drawerWidthOpen}},highlightable:{"&:hover":{background:(d=(l=a.palette.navigation.navItem)==null?void 0:l.hoverBackground)!=null?d:"#404040"}},highlighted:{background:(v=(p=a.palette.navigation.navItem)==null?void 0:p.hoverBackground)!=null?v:"#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:-a.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:a.typography.fontSize},searchFieldHTMLInput:{padding:a.spacing(2,0,2)},searchContainer:{width:n.drawerWidthOpen-n.iconContainerWidth},secondaryAction:{width:a.spacing(6),textAlign:"center",marginRight:a.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:a.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${n.selectedIndicatorWidth}px ${a.palette.navigation.indicator}`,color:a.palette.navigation.selectedColor},"&$closed":{width:n.drawerWidthClosed},"& $closedItemIcon":{paddingRight:n.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-n.selectedIndicatorWidth}}}},{name:"BackstageSidebarItem"});function ea(n){return(0,t.useMemo)(()=>Es(n),[n])()}const vs=(n,a)=>(0,c.useElementFilter)(n.props.children,l=>{let d=!1;return l.getElements().forEach(({props:{to:p,dropdownItems:v}})=>{if(!d){if(v!=null&&v.length){v.forEach(({to:P})=>d=d||Ja(a,(0,Un.i3)(P)));return}p&&(d=Ja(a,(0,Un.i3)(p)))}}),d},[a.pathname]);function Xa(n){return n.to===void 0}const As=t.createElement(fs).type,Rs=t.forwardRef(function({to:a,end:l,style:d,className:p,activeStyle:v,caseSensitive:P,activeClassName:Z="active","aria-current":G="page",...H},ie){let{pathname:te}=(0,Un.TH)(),{pathname:Ee}=(0,Un.WU)(a);P||(te=te.toLocaleLowerCase("en-US"),Ee=Ee.toLocaleLowerCase("en-US"));let Te=te===Ee;!Te&&!l&&(Te=te.startsWith(`${Ee}/`));const $e=Te?G:void 0;return t.createElement(b.rU,{...H,to:a,ref:ie,"aria-current":$e,style:{...d,...Te?v:void 0},className:E()([p,Te?Z:void 0])})}),qa=(0,t.forwardRef)((n,a)=>{const{icon:l,text:d,hasNotifications:p=!1,hasSubmenu:v=!1,disableHighlight:P=!1,onClick:Z,children:G,className:H,...ie}=n,{sidebarConfig:te}=(0,t.useContext)(Vn),Ee=ea(te),{isOpen:Te}=fa(),$e=!Te&&v?{display:"flex",marginLeft:"24px"}:{},ct=t.createElement("div",{style:$e},t.createElement(l,{fontSize:"small"}),!Te&&v?t.createElement(Qa.Z,null):t.createElement(t.Fragment,null)),$t=t.createElement(ms.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:E()({[Ee.closedItemIcon]:!Te})},ct),Jt=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:Ee.iconContainer},$t),d&&t.createElement(Xe.Z,{variant:"subtitle2",className:Ee.label},d),t.createElement("div",{className:Ee.secondaryAction},G)),qt=Te?Jt:$t,kt={onClick:Z,className:E()(H,Ee.root,Te?Ee.open:Ee.closed,Xa(n)&&Ee.buttonItem,{[Ee.highlightable]:!P})};return Xa(n)?t.createElement("button",{"aria-label":d,...kt,ref:a},qt):t.createElement(Rs,{...kt,activeClassName:Ee.selected,to:n.to?n.to:"",ref:a,"aria-label":d||n.to,...ie},qt)}),Ss=({children:n,...a})=>{const{sidebarConfig:l}=(0,t.useContext)(Vn),d=ea(l),[p,v]=(0,t.useState)(!1),P=(0,Un.TH)(),Z=vs(n,P),G=(0,mt.Z)(Ee=>Ee.breakpoints.down("sm")),H=()=>{v(!0)},ie=()=>{v(!1)},te=()=>G?p?t.createElement(hs.Z,{fontSize:"small",className:d.submenuArrow}):t.createElement(gs.Z,{fontSize:"small",className:d.submenuArrow}):!p&&t.createElement(Qa.Z,{fontSize:"small",className:d.submenuArrow});return t.createElement(Ma.Provider,{value:{isHoveredOn:p,setIsHoveredOn:v}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:ie,onTouchStart:p?ie:H,onMouseEnter:H,className:E()(p&&d.highlighted)},t.createElement(qa,{hasSubmenu:!0,className:Z?d.selected:"",...a},te()),p&&n))},_a=(0,t.forwardRef)((n,a)=>{const[l]=(0,c.useElementFilter)(n.children,d=>d.getElements().filter(p=>p.type===As));return l?t.createElement(Ss,{...n},l):t.createElement(qa,{...n,ref:a})});function Ll(n){const{sidebarConfig:a}=useContext(SidebarConfigContext),[l,d]=useState(""),p=ea(a),v=n.icon?n.icon:SearchIcon,P=()=>{n.onSearch(l),d("")},Z=te=>{te.key==="Enter"&&(te.preventDefault(),P())},G=te=>{d(te.target.value)},H=te=>{te.preventDefault(),te.stopPropagation()},ie=te=>{P(),te.preventDefault()};return React.createElement("div",{className:p.searchRoot},React.createElement(_a,{icon:v,to:n.to,onClick:ie,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:l,onClick:H,onChange:G,onKeyDown:Z,className:p.searchContainer,InputProps:{disableUnderline:!0,className:p.searchField},inputProps:{className:p.searchFieldHTMLInput}})))}const Ol=(0,_r.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),xl=(0,_r.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),Cs=(0,_r.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),Ts=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),Dl=(0,_r.Z)("div")(({theme:n})=>{const a=Ts(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":a,"&:hover":a}}),Fl=()=>{const{sidebarConfig:n}=useContext(SidebarConfigContext),a=ea(n),{isOpen:l,setOpen:d}=useSidebarOpenState();if(useMediaQuery(P=>P.breakpoints.down("md"),{noSsr:!0}))return null;const v=()=>{d(!l)};return React.createElement("button",{onClick:v,className:a.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:a.arrows},l?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},bs=(0,f.Z)(n=>({introCard:a=>({color:"#b5b5b5",fontSize:12,width:a.sidebarConfig.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:a.sidebarConfig.iconPadding,paddingRight:a.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 Ps(n){const{sidebarConfig:a}=useContext(SidebarConfigContext),l=bs({sidebarConfig:a}),{text:d,onClose:p}=n,v=()=>p();return React.createElement("div",{className:l.introCard},React.createElement(Typography,{variant:"subtitle2"},d),React.createElement("div",{className:l.introDismiss},React.createElement(Link,{component:"button",onClick:v,underline:"none",className:l.introDismissLink},React.createElement(CloseIcon,{className:l.introDismissIcon}),React.createElement(Typography,{component:"span",className:l.introDismissText},"Dismiss"))))}const eo=n=>{const{text:a,onDismiss:l}=n,[d,p]=useState(!1),v=()=>{p(!0)};return React.createElement(Collapse,{in:!d,onExited:l},React.createElement(Ps,{text:a,onClose:v}))},Is=null,Ls="And your recently viewed plugins will pop up here!";function Bl(n){const{isOpen:a}=useSidebarOpenState(),l={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,p]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:v,recentlyViewedItemsDismissed:P}=d!=null?d:{},Z=()=>{p(H=>({...l,...H,starredItemsDismissed:!0}))},G=()=>{p(H=>({...l,...H,recentlyViewedItemsDismissed:!0}))};return a?React.createElement(React.Fragment,null,!v&&React.createElement(React.Fragment,null,React.createElement(eo,{text:Is,onDismiss:Z}),React.createElement(SidebarDivider,null)),!P&&React.createElement(eo,{text:Ls,onDismiss:G})):null}const Os=(0,f.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 to(n){const{className:a,stretch:l,noPadding:d,children:p,...v}=n,{contentRef:P}=za(),Z=Os();return t.createElement("article",{ref:P,tabIndex:-1,...v,className:E()(Z.root,a,{[Z.stretch]:l,[Z.noPadding]:d})},p)}var xs=e(6487),Ds=e(99152);const Fs=(0,f.Z)(n=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:n.palette.background.paper,paddingLeft:n.spacing(3),minWidth:0},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 no(n){const{tabs:a,onChange:l,selectedIndex:d}=n,[p,v]=(0,t.useState)(d!=null?d:0),P=Fs(),Z=(0,t.useCallback)((G,H)=>{d===void 0&&v(H),l&&d!==H&&l(H)},[d,l]);return(0,t.useEffect)(()=>{d!==void 0&&v(d)},[d]),t.createElement("div",{className:P.tabsWrapper},t.createElement(Ds.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:Z,value:p},a.map((G,H)=>t.createElement(xs.Z,{...G.tabProps,"data-testid":`header-tab-${H}`,label:G.label,key:G.id,value:H,className:P.defaultTab,classes:{selected:P.selected,root:P.tabRoot}}))))}function Bs(n){var Z,G,H;const a=(0,Un.UO)(),d=n.map(({path:ie,children:te})=>({caseSensitive:!1,path:`${ie}/*`,element:te})).sort((ie,te)=>te.path.replace(/\/\*$/,"").localeCompare(ie.path.replace(/\/\*$/,""))),p=(Z=(0,Un.V$)(d))!=null?Z:n[0].children,[v]=(G=(0,Un.fp)(d,`/${a["*"]}`))!=null?G:[],P=v?n.findIndex(ie=>`${ie.path}/*`===v.route.path):0;return{index:P===-1?0:P,element:p,route:(H=n[P])!=null?H:n[0]}}function ro(n){const{routes:a}=n,l=(0,Un.s0)(),{index:d,route:p,element:v}=Bs(a),P=(0,t.useMemo)(()=>a.map(G=>({id:G.path,label:G.title,tabProps:G.tabProps})),[a]),Z=G=>l(a[G].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(no,{tabs:P,selectedIndex:d,onChange:Z}),t.createElement(to,null,t.createElement(da.q,{title:p.title}),v))}const ma=()=>null;(0,c.attachComponentData)(ma,"core.gatherMountPoints",!0);function ao(n){const a=t.createElement(ma,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(l=>{if(!(0,t.isValidElement)(l))return[];if(l.type===t.Fragment)return ao(l.props.children);if(l.type!==a)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:p,children:v,tabProps:P}=l.props;return[{path:d,title:p,children:v,tabProps:P}]})}function Ms(n){const a=ao(n.children);return t.createElement(ro,{routes:a})}Ms.Route=ma;const ws=(0,f.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function $s(n){const{value:a,subvalue:l}=n,d=ws();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},a),t.createElement("div",{className:d.subvalue},l))}var Us=e(21070),Ns=e(90324),Zs=e(98281),zs=e(48049),oo=e(51209),so=e(33375),Ws=e(44233),Hs=e(27604),ha=e(36444),js=e(37971),Vs=e(59709),Gs=e(17373),Ks=e(3702),ks=e(93111),ta=e(67222);const Ys=(0,f.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"}),Js=n=>{var G;const a=Ys(),{onChangeFilters:l}=n,[d,p]=(0,t.useState)({...n.selectedFilters}),[v,P]=(0,t.useState)(!1),Z=()=>{p({}),P(H=>!H)};return(0,t.useEffect)(()=>{l(d)},[d,l]),t.createElement("div",{className:a.root},t.createElement("div",{className:a.header},t.createElement("div",{className:a.value},"Filters"),t.createElement(y.Z,{color:"primary",onClick:Z},"Clear all")),t.createElement("div",{className:a.filters},((G=n.filters)==null?void 0:G.length)&&n.filters.map(H=>t.createElement(rt,{triggerReset:v,key:H.element.label,...H.element,selected:d[H.element.label],onChange:ie=>p({...d,[H.element.label]:ie})}))))},Qs={Add:(0,t.forwardRef)((n,a)=>t.createElement(Us.Z,{...n,ref:a})),Check:(0,t.forwardRef)((n,a)=>t.createElement(Zs.Z,{...n,ref:a})),Clear:(0,t.forwardRef)((n,a)=>t.createElement(so.Z,{...n,ref:a})),Delete:(0,t.forwardRef)((n,a)=>t.createElement(Ws.Z,{...n,ref:a})),DetailPanel:(0,t.forwardRef)((n,a)=>t.createElement(oo.Z,{...n,ref:a})),Edit:(0,t.forwardRef)((n,a)=>t.createElement(Hs.Z,{...n,ref:a})),Export:(0,t.forwardRef)((n,a)=>t.createElement(Ks.Z,{...n,ref:a})),Filter:(0,t.forwardRef)((n,a)=>t.createElement(ha.Z,{...n,ref:a})),FirstPage:(0,t.forwardRef)((n,a)=>t.createElement(js.Z,{...n,ref:a})),LastPage:(0,t.forwardRef)((n,a)=>t.createElement(Vs.Z,{...n,ref:a})),NextPage:(0,t.forwardRef)((n,a)=>t.createElement(oo.Z,{...n,ref:a})),PreviousPage:(0,t.forwardRef)((n,a)=>t.createElement(zs.Z,{...n,ref:a})),ResetSearch:(0,t.forwardRef)((n,a)=>t.createElement(so.Z,{...n,ref:a})),Search:(0,t.forwardRef)((n,a)=>t.createElement(ha.Z,{...n,ref:a})),SortArrow:(0,t.forwardRef)((n,a)=>t.createElement(Ns.Z,{...n,ref:a})),ThirdStateCheck:(0,t.forwardRef)((n,a)=>t.createElement(Gs.Z,{...n,ref:a})),ViewColumn:(0,t.forwardRef)((n,a)=>t.createElement(ks.Z,{...n,ref:a}))};function io(n,a){const l=a.split(".");let d=n[l[0]];for(let p=1;p<l.length;++p){if(d===void 0)return d;const v=l[p];d=d[v]}return d}const Xs=(0,pn.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"})(ta.W$),lo=(0,pn.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(ta.UW),_s=(0,f.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),ei=(0,f.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function ti(n,a){return n.map(l=>{const d={};let p=l.cellStyle||{};if(l.highlight)if(d.color=a.palette.textContrast,typeof p=="object")p.fontWeight=a.typography.fontWeightBold;else{const v=p;p=(P,Z,G)=>({...v(P,Z,G),fontWeight:a.typography.fontWeightBold})}return{...l,headerStyle:d,cellStyle:p}})}function ni(n,a){return(0,L.transform)(n,(l,d,p)=>{(0,L.isEqual)(d,a[p])||(l[p]=d)})}const co={search:"",filtersOpen:!1,filters:{}};function ri(n){const{toolbarRef:a,setSearch:l,hasFilters:d,selectedFiltersLength:p,toggleFilters:v}=n,P=_s(),Z=(0,t.useCallback)(G=>{n.onSearchChanged(G),l(G)},[n,l]);return d?t.createElement("div",{className:P.root},t.createElement("div",{className:P.root},t.createElement(Fe.Z,{onClick:v,"aria-label":"filter list"},t.createElement(ha.Z,null)),t.createElement(Xe.Z,{className:P.title},"Filters (",p,")")),t.createElement(lo,{...n,ref:a,onSearchChanged:Z})):t.createElement(lo,{...n,ref:a,onSearchChanged:Z})}function ai(n){const{data:a,columns:l,options:d,title:p,subtitle:v,filters:P,initialState:Z,emptyContent:G,onStateChange:H,components:ie,...te}=n,Ee=ei(),Te=(0,Re.Z)(),$e={...co,...Z},[ct,$t]=(0,t.useState)($e.filtersOpen),Jt=(0,t.useCallback)(()=>$t(cn=>!cn),[$t]),[qt,kt]=(0,t.useState)(0),[Ct,tn]=(0,t.useState)(a),[Nt,nr]=(0,t.useState)($e.filters),Gn=ti(l,Te),[Qn,Ut]=(0,t.useState)($e.search);(0,t.useEffect)(()=>{if(H){const cn=ni({search:Qn,filtersOpen:ct,filters:Nt},co);H(cn)}},[Qn,ct,Nt,H]);const Sr={headerStyle:{textTransform:"uppercase"}},Gr=(0,t.useCallback)(cn=>{var bn;return(bn=l.find(lr=>lr.title===cn))==null?void 0:bn.field},[l]);(0,t.useEffect)(()=>{if(typeof a=="function")return;if(!Nt){tn(a);return}const cn=Object.values(Nt);if(a&&cn.flat().length){const bn=a.filter(lr=>!!Object.entries(Nt).filter(([,rr])=>!!rr.length).every(([rr,an])=>{const Pn=io(lr,Gr(rr));return Array.isArray(Pn)&&Array.isArray(an)?Pn.some(Tr=>an.includes(Tr)):Array.isArray(Pn)?Pn.includes(an):Array.isArray(an)?an.includes(Pn):Pn===an}));tn(bn)}else tn(a);kt(cn.flat().length)},[a,Nt,Gr]);const Cr=(cn,bn)=>{const lr=an=>{const Pn=new Set,Tr=ar=>{ar!=null&&Pn.add(ar)};return bn&&bn.forEach(ar=>{const br=io(ar,Gr(an));Array.isArray(br)?br.forEach(Tr):Tr(br)}),Pn},rr=an=>({placeholder:"All results",label:an.column,multiple:an.type==="multiple-select",items:[...lr(an.column)].sort().map(Pn=>({label:Pn,value:Pn}))});return cn.map(an=>({type:an.type,element:rr(an)}))},ra=!!(P!=null&&P.length),va=(0,t.useCallback)(cn=>t.createElement(ri,{setSearch:Ut,hasFilters:ra,selectedFiltersLength:qt,toggleFilters:Jt,...cn}),[Jt,ra,qt,Ut]),aa=typeof a!="function"&&a.length===0,oa=l.length,Aa=(0,t.useCallback)(cn=>G&&aa?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:oa},G))):t.createElement(ta.os,{...cn}),[aa,G,oa]);return t.createElement("div",{className:Ee.root},ct&&a&&typeof a!="function"&&(P==null?void 0:P.length)&&t.createElement(Js,{filters:Cr(P,a),selectedFilters:Nt,onChangeFilters:nr}),t.createElement(ta.ZP,{components:{Header:Xs,Toolbar:va,Body:Aa,...ie},options:{...Sr,...d},columns:Gn,icons:Qs,title:t.createElement(t.Fragment,null,t.createElement(Xe.Z,{variant:"h5",component:"h2"},p),v&&t.createElement(Xe.Z,{color:"textSecondary",variant:"body1"},v)),data:typeof a=="function"?a:Ct,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...te}))}const Ml=n=>{const{children:a,value:l,index:d,...p}=n;return React.createElement("div",{role:"tabpanel",hidden:l!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...p},l===d&&React.createElement(Box,{p:3},a))},oi=(0,f.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"}),wl=n=>{const a=oi(n),{ariaLabel:l,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:a.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":l},n.children)},si=(n,a)=>a?n?"20px":"0":"40px",ii=(0,f.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:a=>si(a.isFirstNav,a.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}}),{name:"BackstageTab"}),$l=n=>{const a=ii(n),{isFirstNav:l,isFirstIndex:d,...p}=n;return React.createElement(Tab,{classes:a,disableRipple:!0,...p})},li=(0,f.Z)(n=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:n.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Ul=n=>{const a=li(n);return React.createElement(Tabs,{classes:a,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},ci=(0,f.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 Nl(n){const{tabs:a}=n,l=ci(),[d,p]=useState([0,0]),[v,P]=useState(0),[Z,G]=useState(0),[H,ie]=useState([[]]),te=useRef(),{width:Ee}=useWindowSize(),Te=(qt,kt)=>{p([v,kt])},$e=()=>{P(v-1)},ct=()=>{P(v+1)},$t=()=>v+1<H.length;useEffect(()=>{const kt=v===0?1:2,Ct=te.current.offsetWidth-20-kt*30,tn=d[0]*Z+d[1],Nt=Math.floor(Ct/170);G(Nt),ie(chunkArray(a,Nt)),p([Math.floor(tn/Nt),tn%Nt])},[Ee,a]);const Jt=v===d[0]?d[1]:!1;return React.createElement("div",{className:l.root},React.createElement(AppBar,{ref:te,className:l.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:Jt,onChange:Te,selectionFollowsFocus:!0},v!==0&&React.createElement(StyledIcon,{onClick:$e,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),H[v].map((qt,kt)=>React.createElement(StyledTab,{value:kt,isFirstIndex:kt===0,isFirstNav:v===0,key:kt,icon:qt.icon||void 0,label:qt.label||void 0})),$t()&&React.createElement(StyledIcon,{isNext:!0,onClick:ct,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Jt!==!1?H[v].map((qt,kt)=>React.createElement(TabPanel,{key:kt,value:kt,index:Jt},qt.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},H[d[0]][d[1]].content))}var Zl=e(44311);function ui(n,a){const l=n[n.length-1];if(!!l)return l>=.9?a.palette.status.ok:l>=.5?a.palette.status.warning:a.palette.status.error}function zl(n){var l;const a=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:(l=n.color)!=null?l:ui(n.data,a)})):null}const di=n=>(0,f.Z)(a=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:a.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:a.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),fi=({title:n="Unknown page",className:a})=>t.createElement(Xe.Z,{variant:"h4",component:"h2",className:a,"data-testid":"header-title"},n);function mi(n){const{description:a,title:l,titleComponent:d=void 0,children:p,textAlign:v="left"}=n,P=di({textAlign:v})(),Z=d||t.createElement(fi,{title:l,className:P.title});return t.createElement(t.Fragment,null,t.createElement(da.q,{title:l}),t.createElement("div",{className:P.container},t.createElement("div",{className:P.leftItemsBox},Z,a&&t.createElement(Xe.Z,{className:P.description,variant:"body2"},a)),t.createElement("div",{className:P.rightItemsBox},p)))}var hi=e.p+"static/mic-drop.fe3ef4d0..svg";const gi=(0,f.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"}),pi=()=>{const n=gi();return t.createElement("img",{src:hi,className:n.micDrop,alt:"Girl dropping mic from her hands"})},yi=(0,f.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 Ei(n){const{status:a,statusMessage:l,additionalInfo:d,supportUrl:p}=n,v=yi(),P=(0,Un.s0)(),Z=xa();return t.createElement(Zt.Z,{container:!0,spacing:0,className:v.container},t.createElement(pi,null),t.createElement(Zt.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(Xe.Z,{"data-testid":"error",variant:"body1",className:v.subtitle},"ERROR ",a,": ",l),t.createElement(Xe.Z,{variant:"body1",className:v.subtitle},d),t.createElement(Xe.Z,{variant:"h2",className:v.title},"Looks like someone dropped the mic!"),t.createElement(Xe.Z,{variant:"h6"},t.createElement(K,{to:"#","data-testid":"go-back-link",onClick:()=>P(-1)},"Go back"),"... or please"," ",t.createElement(K,{to:p||Z.url},"contact support")," if you think this is a bug.")))}var vi=e(16173);const Ai=(0,pn.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(Xe.Z),ga=(0,pn.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(Ln.Z);function Ri(n){const{children:a,...l}=n,[d,p]=t.useState(null),v=t.Children.toArray(a),[P,Z,...G]=v,H=G.length?G.pop():v[v.length-1],ie=v.length>3,te=$e=>{p($e.currentTarget)},Ee=()=>{p(null)},Te=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(vi.Z,{"aria-label":"breadcrumb",...l},v.length>1&&t.createElement(ga,{clone:!0},P),v.length>2&&t.createElement(ga,{clone:!0},Z),ie&&t.createElement(Ai,{onClick:te},"..."),t.createElement(Ln.Z,{style:{fontStyle:"italic"}},H)),t.createElement(Pa.ZP,{open:Te,anchorEl:d,onClose:Ee,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(Xt.Z,null,G.map(($e,ct)=>t.createElement(U.Z,{key:ct,button:!0},t.createElement(ga,{clone:!0},$e))))))}const Si=(0,f.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",alignItems:"center"},title:{color:n.page.fontColor,wordBreak:"break-word",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.page.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.page.fontColor},breadcrumb:{color:n.page.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"}),Ci=({type:n,typeLink:a,classes:l,pageTitle:d})=>n?a?t.createElement(Ri,{className:l.breadcrumb},t.createElement(K,{to:a},n),t.createElement(Xe.Z,null,d)):t.createElement(Xe.Z,{className:l.type},n):null,Ti=({pageTitle:n,classes:a,tooltip:l})=>{const d=t.createElement(Xe.Z,{className:a.title,variant:"h1"},n);return l?t.createElement(Be.ZP,{title:l,placement:"top-start"},d):d},bi=({classes:n,subtitle:a})=>a?typeof a!="string"?t.createElement(t.Fragment,null,a):t.createElement(Xe.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},a):null;function uo(n){const{children:a,pageTitleOverride:l,style:d,subtitle:p,title:v,tooltip:P,type:Z,typeLink:G}=n,H=Si(),te=(0,c.useApi)(c.configApiRef).getOptionalString("app.title")||"Backstage",Ee=l||v,Te=v||l,$e=`${Ee} | %s | ${te}`,ct=`${Ee} | ${te}`;return t.createElement(t.Fragment,null,t.createElement(da.q,{titleTemplate:$e,defaultTitle:ct}),t.createElement("header",{style:d,className:H.header},t.createElement(Ln.Z,{className:H.leftItemsBox},t.createElement(Ci,{classes:H,type:Z,typeLink:G,pageTitle:Te}),t.createElement(Ti,{classes:H,pageTitle:Te,tooltip:P}),t.createElement(bi,{classes:H,subtitle:p})),t.createElement(Zt.Z,{container:!0,className:H.rightItemsBox,spacing:4},a)))}const Pi=(0,f.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"}),Ii=({value:n,className:a})=>t.createElement(Xe.Z,{className:a},n);function Li(n){const{label:a,value:l,url:d}=n,p=Pi(),v=t.createElement(Ii,{className:p.value,value:l||"<Unknown>"});return t.createElement(Zt.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(Xe.Z,{className:p.label},a),d?t.createElement(K,{to:d},v):v))}const Oi={hour:"2-digit",minute:"2-digit"};function fo(n){const a=new Date,l=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const p=n.getConfigArray("homepage.clocks");for(const v of p)if(v.has("label")&&v.has("timezone")){let P=v.getString("label");const Z={timeZone:v.getString("timezone"),...Oi};try{new Date().toLocaleString(l,Z)}catch{console.warn(`The timezone ${Z.timeZone} is invalid. Defaulting to GMT`),Z.timeZone="GMT",P="GMT"}const G=a.toLocaleTimeString(l,Z);d.push({time:G,label:P})}return d}function Wl(n){const a=useApi(configApiRef),l=[],[d,p]=React.useState(l);return React.useEffect(()=>{p(fo(a));const v=setInterval(()=>{p(fo(a))},1e3);return()=>{clearInterval(v)}},[a]),d.length!==0?React.createElement(React.Fragment,null,d.map(v=>React.createElement(HeaderLabel,{label:v.label,value:v.time,key:v.label}))):null}const xi=n=>(0,o.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.getPageTheme({themeId:"card"}).backgroundImage,backgroundPosition:0,backgroundSize:"inherit"}}),Di=(0,f.Z)(xi,{name:"BackstageItemCardHeader"});function Fi(n){const{title:a,subtitle:l,children:d}=n,p=Di(n);return t.createElement("div",{className:p.root},l&&t.createElement(Xe.Z,{variant:"subtitle2",component:"h3"},l),a&&t.createElement(Xe.Z,{variant:"h6",component:"h4"},a),d)}function Hl(n){const{description:a,tags:l,title:d,type:p,subtitle:v,label:P,onClick:Z,href:G}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:v||p})),React.createElement(CardContent,null,l!=null&&l.length?React.createElement(Box,null,l.map((H,ie)=>React.createElement(Chip,{size:"small",label:H,key:ie}))):null,a),React.createElement(CardActions,null,!G&&React.createElement(Button,{to:"#",onClick:Z,color:"primary"},P),G&&React.createElement(Button,{to:G,color:"primary"},P)))}const Bi=n=>(0,o.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),Mi=(0,f.Z)(Bi,{name:"BackstageItemCardGrid"});function wi(n){const{children:a,...l}=n,d=Mi(l);return t.createElement("div",{className:d.root,...l},a)}var $i=e(41547);const Ui=(0,f.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 mo(n){const{themeId:a,children:l}=n,{isMobile:d}=jr(),p=Ui({isMobile:d});return t.createElement($i.Z,{theme:v=>({...v,page:v.getPageTheme({themeId:a})})},t.createElement("main",{className:p.root},l))}function Ni(n){const{themeId:a,children:l,...d}=n;return t.createElement(mo,{themeId:a},t.createElement(uo,{...d}),l)}var Tn=e(30195);const jl=Tn.z.object({providerInfo:Tn.z.object({}).catchall(Tn.z.unknown()).optional(),profile:Tn.z.object({email:Tn.z.string().optional(),displayName:Tn.z.string().optional(),picture:Tn.z.string().optional()}),backstageIdentity:Tn.z.object({token:Tn.z.string(),identity:Tn.z.object({type:Tn.z.literal("user"),userEntityRef:Tn.z.string(),ownershipEntityRefs:Tn.z.array(Tn.z.string())})})}),ho={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function Zi(n){const a=new Date(Date.now()+ho.defaultTokenExpiryMillis);if(!n)return a;const[l,d,p]=n.split("."),v=JSON.parse(atob(d));return typeof v.exp!="number"?a:new Date(v.exp*1e3-ho.tokenExpiryMarginMillis)}class Vl{constructor(a){q(this,"options");q(this,"abortController");q(this,"state");this.options=a,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:a}=this.getSessionSync(),l=a.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(l);if(!d)throw new TypeError(`Invalid user entity reference "${l}"`);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 a=this.state.type==="active"?this.state.session:void 0,l=this.fetchSession().then(d=>(this.state={type:"active",session:d,expiresAt:Zi(d.backstageIdentity.token)},d),d=>{throw this.state={type:"failed",error:d},d});return this.state={type:"fetching",promise:l,previous:a},l}async fetchSession(){const a=await this.options.discoveryApi.getBaseUrl("auth"),l=await fetch(`${a}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!l.ok)throw await ResponseError.fromResponse(l);return proxiedSessionSchema.parse(await l.json())}}const Gl=n=>{const a=useApi(discoveryApiRef),[{status:l,error:d},{execute:p}]=useAsync(async()=>{const v=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:a});await v.start(),n.onSignInSuccess(v)});return useMountEffect(p),l==="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},zi=(0,f.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),pa=({children:n})=>{const a=zi();return t.createElement(Zt.Z,{component:"li",item:!0,classes:a},n)};class ya{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 a="user:default/guest";return{type:"user",userEntityRef:a,ownershipEntityRefs:[a]}}async getCredentials(){return{}}async signOut(){}}function Wi(n){const[a,l,d]=n.split(".");return JSON.parse(atob(l))}class Ea{constructor(a){this.result=a}getUserId(){return this.result.userId}static fromResult(a){return new Ea(a)}async getIdToken(){var a,l;return(l=(a=this.result).getIdToken)==null?void 0:l.call(a)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const a=await this.getIdToken();if(!a){const p=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:p,ownershipEntityRefs:[p]}}const{sub:l,ent:d}=Wi(a);return{type:"user",userEntityRef:l,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var l,d;return{token:await((d=(l=this.result).getIdToken)==null?void 0:d.call(l))}}async signOut(){var a,l;return(l=(a=this.result).signOut)==null?void 0:l.call(a)}}class Vr{constructor(a,l,d){q(this,"profilePromise");this.identity=a,this.authApi=l,this.profile=d}static createGuest(){return new ya}static fromLegacy(a){return Ea.fromResult(a)}static create(a){return new Vr(a.identity,a.authApi,a.profile)}getUserId(){const a=this.identity.userEntityRef,l=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(a);if(!l)throw new TypeError(`Invalid user entity reference "${a}"`);return l[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(a){throw this.profilePromise=void 0,a}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const Hi={Component:({config:n,onSignInSuccess:a})=>{const{apiRef:l,title:d,message:p}=n,v=(0,c.useApi)(l),P=(0,c.useApi)(c.errorApiRef),Z=async()=>{try{const G=await v.getBackstageIdentity({instantPopup:!0});if(!G)throw new Error(`The ${d} provider is not configured to support sign-in`);const H=await v.getProfile();a(Vr.create({identity:G.identity,profile:H,authApi:v}))}catch(G){P.post(new _n.SP("Login failed",G))}};return t.createElement(pa,null,t.createElement(tr,{variant:"fullHeight",title:d,actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:Z},"Sign In")},t.createElement(Xe.Z,{variant:"body1"},p)))},loader:async(n,a)=>{const l=n.get(a),d=await l.getBackstageIdentity({optional:!0});if(!d)return;const p=await l.getProfile();return Vr.create({identity:d.identity,profile:p,authApi:l})}},ji={Component:({onSignInSuccess:n})=>t.createElement(pa,null,t.createElement(tr,{title:"Guest",variant:"fullHeight",actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:()=>n(new ya)},"Enter")},t.createElement(Xe.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 ya};var Vi=e(63955),go=e(86619),po=e(74828),Gi=e(45455),Ki=e.n(Gi);const ki=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Yi=(0,f.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),yo=n=>{const{ref:a,...l}=n;return{inputRef:a,...l}},Ji={Component:({onSignInSuccess:n})=>{const a=Yi(),{register:l,handleSubmit:d,formState:p}=(0,Vi.cI)({mode:"onChange"}),{errors:v}=p,P=({userId:Z})=>{n(Vr.fromLegacy({userId:Z,profile:{email:`${Z}@example.com`}}))};return t.createElement(pa,null,t.createElement(tr,{title:"Custom User",variant:"fullHeight"},t.createElement(Xe.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:a.form,onSubmit:d(P)},t.createElement(A.Z,null,t.createElement(go.Z,{...yo(l("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(v.userId)}),v.userId&&t.createElement(po.Z,{error:!0},v.userId.message)),t.createElement(A.Z,null,t.createElement(go.Z,{...yo(l("idToken",{required:!1,validate:Z=>!Z||ki.test(Z)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(v.idToken)}),v.idToken&&t.createElement(po.Z,{error:!0},v.idToken.message)),t.createElement(y.Z,{type:"submit",color:"primary",variant:"outlined",className:a.button,disabled:!(p!=null&&p.isDirty)||!Ki()(v)},"Continue"))))},loader:async()=>{}},na="@backstage/core:SignInPage:provider",Eo={guest:ji,custom:Ji,common:Hi};function vo(n,a){if(n in a)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function ql(n){return n.reduce((l,d)=>{if(typeof d=="string")return vo(d,l),l[d]={components:Eo[d],id:d},l;const{id:p}=d;return vo(p,l),l[p]={components:Eo.common,id:p,config:d},l},{})}const _l=(n,a)=>{const l=useApi(errorApiRef),d=useApiHolder(),[p,v]=useState(!0),P=useCallback(G=>{a(IdentityApiSignOutProxy.from({identityApi:G,signOut:async()=>{var H;localStorage.removeItem(na),await((H=G.signOut)==null?void 0:H.call(G))}}))},[a]);useLayoutEffect(()=>{var te;if(!p)return;const G=localStorage.getItem(na);if(G===null){v(!1);return}const H=n[G];if(!H){v(!1);return}let ie=!1;return H.components.loader(d,(te=H.config)==null?void 0:te.apiRef).then(Ee=>{ie||(Ee?P(Ee):v(!1))}).catch(Ee=>{ie||(localStorage.removeItem(na),l.post(Ee),v(!1))}),()=>{ie=!0}},[p,l,a,d,n,P]);const Z=useMemo(()=>Object.keys(n).map(G=>{const H=n[G],{Component:ie}=H.components,te=Ee=>{localStorage.setItem(na,H.id),P(Ee)};return React.createElement(ie,{key:H.id,config:H.config,onSignInSuccess:te})}),[n,P]);return[p,Z]},Qi=({onSignInSuccess:n,providers:a=[],title:l,align:d="left"})=>{const p=useApi(configApiRef),v=useStyles(),P=getSignInProviders(a),[Z,G]=useSignInProviders(P,n);return Z?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:p.getString("app.title")}),React.createElement(Content,null,l&&React.createElement(ContentHeader,{title:l,textAlign:d}),React.createElement(Grid,{container:!0,justifyContent:d==="center"?d:"flex-start",spacing:2,component:"ul",classes:v},G)))},Xi=({provider:n,auto:a,onSignInSuccess:l})=>{const d=useStyles(),p=useApi(n.apiRef),v=useApi(configApiRef),[P,Z]=useState(),[G,H]=useState(!1),ie=async({checkExisting:te,showPopup:Ee})=>{try{let Te;if(te&&(Te=await p.getBackstageIdentity({optional:!0})),!Te&&(Ee||a)&&(H(!0),Te=await p.getBackstageIdentity({instantPopup:!0}),!Te))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Te){H(!0);return}const $e=await p.getProfile();l(UserIdentity.create({identity:Te.identity,authApi:p,profile:$e}))}catch(Te){Z(Te),H(!0)}};return useMountEffect(()=>ie({checkExisting:!0})),G?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:v.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),P&&P.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},P.message)))))):React.createElement(Progress,null)};function ec(n){return"provider"in n?React.createElement(Xi,{...n}):React.createElement(Qi,{...n})}const qi=(0,f.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"}),_i=(0,pn.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(yr.Z);function tc(n){const{slackChannel:a,errorBoundaryProps:l,children:d,title:p,deepLink:v,value:P,onChange:Z}=n,G=qi(),[H,ie]=useState(0),te=Z||(($e,ct)=>ie(ct));let Ee;P?React.Children.map(d,$e=>{React.isValidElement($e)&&($e==null?void 0:$e.props.value)===P&&(Ee=$e==null?void 0:$e.props.children)}):React.Children.map(d,($e,ct)=>{React.isValidElement($e)&&ct===H&&(Ee=$e==null?void 0:$e.props.children)});const Te=l||(a?{slackChannel:a}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Te},p&&React.createElement(_i,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:G,value:P||H,onChange:te},d),React.createElement(Divider,null),React.createElement(CardContent,null,Ee),v&&React.createElement(BottomLink,{...v})))}const el=(0,f.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 nc(n){const{children:a,...l}=n,d=el();return React.createElement(Tab,{disableRipple:!0,classes:d,...l})}},24877:function(ne,s,e){"use strict";e.d(s,{f:function(){return R},z:function(){return y}});var r=e(76241),t=e(2784);const c=(0,r.CT)("analytics-context"),i=()=>{const h=(0,t.useContext)(c);if(h===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const E=h.atVersion(1);if(E===void 0)throw new Error("No context found for version 1.");return E},R=h=>{const{attributes:E,children:S}=h,L={...i(),...E},$=(0,r.EI)({1:L});return t.createElement(c.Provider,{value:$},S)};function f(h,E){const S=b=>React.createElement(R,{attributes:E},React.createElement(h,{...b}));return S.displayName=`WithAnalyticsContext(${h.displayName||h.name||"Component"})`,S}var o=e(27399);class u{constructor(E,S={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=E,this.context=S}setContext(E){this.context=E}captureEvent(E,S,{value:b,attributes:L}={}){try{this.analyticsApi.captureEvent({action:E,subject:S,value:b,attributes:L,context:this.context})}catch($){console.warn("Error during analytics event capture. %o",$)}}}function m(){try{return(0,o.useApi)(o.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function y(){const h=(0,t.useRef)(null),E=i(),S=m();function b(){return h.current===null&&(h.current=new u(S)),h.current}const L=b();return L.setContext(E),L}},39135:function(ne,s,e){"use strict";e.d(s,{CL:function(){return B},sM:function(){return t},$v:function(){return h},v_:function(){return E},hg:function(){return S},uB:function(){return y},bq:function(){return m},Ds:function(){return b},NW:function(){return L},VE:function(){return $},W0:function(){return D},gP:function(){return x},F4:function(){return i},ux:function(){return f},Kp:function(){return c},$4:function(){return O},p_:function(){return o},ZM:function(){return M},D:function(){return R},gW:function(){return u},E6:function(){return K}});var r=e(86833),t;(function(re){const le="SignedIn";re.SignedIn=le;const Re="SignedOut";re.SignedOut=Re})(t||(t={}));const c=(0,r.createApiRef)({id:"core.auth.google"}),i=(0,r.createApiRef)({id:"core.auth.github"}),R=(0,r.createApiRef)({id:"core.auth.okta"}),f=(0,r.createApiRef)({id:"core.auth.gitlab"}),o=(0,r.createApiRef)({id:"core.auth.microsoft"}),u=(0,r.createApiRef)({id:"core.auth.onelogin"}),m=(0,r.createApiRef)({id:"core.auth.bitbucket"}),y=(0,r.createApiRef)({id:"core.auth.atlassian"}),h=(0,r.createApiRef)({id:"core.alert"}),E=(0,r.createApiRef)({id:"core.analytics"}),S=(0,r.createApiRef)({id:"core.apptheme"}),b=(0,r.createApiRef)({id:"core.config"}),L=(0,r.createApiRef)({id:"core.discovery"}),$=(0,r.createApiRef)({id:"core.error"});var B;(function(re){re[re.None=0]="None";const Re=1;re[re.Active=Re]="Active"})(B||(B={}));const D=(0,r.createApiRef)({id:"core.featureflags"}),x=(0,r.createApiRef)({id:"core.fetch"}),O=(0,r.createApiRef)({id:"core.identity"}),M=(0,r.createApiRef)({id:"core.oauthrequest"}),K=(0,r.createApiRef)({id:"core.storage"})},27399:function(ne,s,e){"use strict";e.d(s,{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(s,{FeatureFlagState:function(){return r.FeatureFlagState}}),e.o(r,"SessionState")&&e.d(s,{SessionState:function(){return r.SessionState}}),e.o(r,"alertApiRef")&&e.d(s,{alertApiRef:function(){return r.alertApiRef}}),e.o(r,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return r.analyticsApiRef}}),e.o(r,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return r.appThemeApiRef}}),e.o(r,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),e.o(r,"attachComponentData")&&e.d(s,{attachComponentData:function(){return r.attachComponentData}}),e.o(r,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),e.o(r,"configApiRef")&&e.d(s,{configApiRef:function(){return r.configApiRef}}),e.o(r,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return r.createComponentExtension}}),e.o(r,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),e.o(r,"createPlugin")&&e.d(s,{createPlugin:function(){return r.createPlugin}}),e.o(r,"createReactExtension")&&e.d(s,{createReactExtension:function(){return r.createReactExtension}}),e.o(r,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return r.createRoutableExtension}}),e.o(r,"createRouteRef")&&e.d(s,{createRouteRef:function(){return r.createRouteRef}}),e.o(r,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return r.discoveryApiRef}}),e.o(r,"errorApiRef")&&e.d(s,{errorApiRef:function(){return r.errorApiRef}}),e.o(r,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),e.o(r,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return r.fetchApiRef}}),e.o(r,"getComponentData")&&e.d(s,{getComponentData:function(){return r.getComponentData}}),e.o(r,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),e.o(r,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),e.o(r,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),e.o(r,"identityApiRef")&&e.d(s,{identityApiRef:function(){return r.identityApiRef}}),e.o(r,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),e.o(r,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),e.o(r,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),e.o(r,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),e.o(r,"storageApiRef")&&e.d(s,{storageApiRef:function(){return r.storageApiRef}}),e.o(r,"useApp")&&e.d(s,{useApp:function(){return r.useApp}}),e.o(r,"useElementFilter")&&e.d(s,{useElementFilter:function(){return r.useElementFilter}}),e.o(r,"usePluginOptions")&&e.d(s,{usePluginOptions:function(){return r.usePluginOptions}}),e.o(r,"useRouteRef")&&e.d(s,{useRouteRef:function(){return r.useRouteRef}}),e.o(r,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return r.useRouteRefParams}});var t=e(39135)},90515:function(ne,s,e){"use strict";e.d(s,{T:function(){return t}});class r{constructor(i){if(this.config=i,!i.id.split(".").flatMap(f=>f.split("-")).every(f=>f.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${i.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(c){return new r(c)}},25182:function(ne,s,e){"use strict";e.d(s,{n:function(){return r}});function r(t,c){return"id"in t?{api:t,deps:{},factory:()=>c}:t}},86833:function(ne,s,e){"use strict";e.d(s,{createApiFactory:function(){return R.n},createApiRef:function(){return t.T},useApi:function(){return r.h_},useApiHolder:function(){return r.I_}});var r=e(5761),t=e(90515),c=e(16362),i=e.n(c);e.o(c,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return c.FeatureFlagState}}),e.o(c,"SessionState")&&e.d(s,{SessionState:function(){return c.SessionState}}),e.o(c,"alertApiRef")&&e.d(s,{alertApiRef:function(){return c.alertApiRef}}),e.o(c,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return c.analyticsApiRef}}),e.o(c,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return c.appThemeApiRef}}),e.o(c,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return c.atlassianAuthApiRef}}),e.o(c,"attachComponentData")&&e.d(s,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return c.bitbucketAuthApiRef}}),e.o(c,"configApiRef")&&e.d(s,{configApiRef:function(){return c.configApiRef}}),e.o(c,"createApiFactory")&&e.d(s,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(s,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createReactExtension")&&e.d(s,{createReactExtension:function(){return c.createReactExtension}}),e.o(c,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(s,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return c.discoveryApiRef}}),e.o(c,"errorApiRef")&&e.d(s,{errorApiRef:function(){return c.errorApiRef}}),e.o(c,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return c.featureFlagsApiRef}}),e.o(c,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return c.fetchApiRef}}),e.o(c,"getComponentData")&&e.d(s,{getComponentData:function(){return c.getComponentData}}),e.o(c,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return c.githubAuthApiRef}}),e.o(c,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return c.gitlabAuthApiRef}}),e.o(c,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return c.googleAuthApiRef}}),e.o(c,"identityApiRef")&&e.d(s,{identityApiRef:function(){return c.identityApiRef}}),e.o(c,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return c.microsoftAuthApiRef}}),e.o(c,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return c.oauthRequestApiRef}}),e.o(c,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return c.oktaAuthApiRef}}),e.o(c,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return c.oneloginAuthApiRef}}),e.o(c,"storageApiRef")&&e.d(s,{storageApiRef:function(){return c.storageApiRef}}),e.o(c,"useApp")&&e.d(s,{useApp:function(){return c.useApp}}),e.o(c,"useElementFilter")&&e.d(s,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"usePluginOptions")&&e.d(s,{usePluginOptions:function(){return c.usePluginOptions}}),e.o(c,"useRouteRef")&&e.d(s,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return c.useRouteRefParams}});var R=e(25182)},16362:function(){},5761:function(ne,s,e){"use strict";e.d(s,{I_:function(){return c},h_:function(){return i}});var r=e(2784),t=e(76241);function c(){const f=(0,t.Vt)("api-context");if(!f)throw new Error("API context is not available");const o=f.atVersion(1);if(!o)throw new Error("ApiContext v1 not available");return o}function i(f){const u=c().get(f);if(!u)throw new Error(`No implementation available for ${f}`);return u}function R(f){return function(u){const m=h=>{const E=c(),S={};for(const b in f)if(f.hasOwnProperty(b)){const L=f[b],$=E.get(L);if(!$)throw new Error(`No implementation available for ${L}`);S[b]=$}return React.createElement(u,{...h,...S})},y=u.displayName||u.name||"Component";return m.displayName=`withApis(${y})`,m}}},31311:function(ne,s,e){"use strict";e.d(s,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),c=e.n(t);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(s,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(ne,s,e){"use strict";e.d(s,{q:function(){return t}});var r=e(76241);const t=()=>{const c=(0,r.Vt)("app-context");if(!c)throw new Error("App context is not available");const i=c.atVersion(1);if(!i)throw new Error("AppContext v1 not available");return i}},74181:function(ne,s,e){"use strict";e.d(s,{R5:function(){return i},CO:function(){return S},YO:function(){return b},P4:function(){return E},IY:function(){return R},vJ:function(){return D}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),c="__backstage_data";function i(x,O,M){var le;const K=x;let re=(le=K[c])!=null?le:t.get(x);if(re||(re={map:new Map},Object.defineProperty(K,c,{enumerable:!1,configurable:!0,writable:!1,value:re}),t.set(x,re)),re.map.has(O)){const Re=x.displayName||x.name;throw new Error(`Attempted to attach duplicate data "${O}" to component "${Re}"`)}re.map.set(O,M)}function R(x,O){var re;if(!x)return;const M=x.type;if(!M)return;const K=(re=M[c])!=null?re:t.get(M);if(!!K)return K.map.get(O)}var f=e(2784),o=e(24877),u=e(31311),m=e(82772);class y extends f.Component{constructor(){super(...arguments);q(this,"state",{error:void 0});q(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(M){return{error:M}}render(){const{error:M}=this.state,{app:K,plugin:re}=this.props,{ErrorBoundaryFallback:le}=K.getComponents();return M?f.createElement(le,{error:M,resetError:this.handleErrorReset,plugin:re}):this.props.children}}var h=e(40338);function E(x){const{component:O,mountPoint:M,name:K}=x;return b({component:{lazy:()=>O().then(re=>{const le=Fe=>{try{(0,m.tg)(M)}catch(Be){if(typeof Be=="object"&&Be!==null){const{message:He}=Be;if(typeof He=="string"&&He.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${M} 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 Be}return f.createElement(re,{...Fe})},Re=K||re.displayName||re.name||"LazyComponent";return le.displayName=`RoutableExtension(${Re})`,le},re=>Re=>{const Fe=(0,u.useApp)(),{BootErrorPage:Be}=Fe.getComponents();return f.createElement(Be,{step:"load-chunk",error:re})})},data:{"core.mountPoint":M},name:K})}function S(x){const{component:O,name:M}=x;return b({component:O,name:M})}function b(x){const{data:O={},name:M}=x;M||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let K;if("lazy"in x.component){const le=x.component.lazy;K=(0,f.lazy)(()=>le().then(Re=>({default:Re})))}else K=x.component.sync;const re=M||K.displayName||K.name||"Component";return{expose(le){const Re=Fe=>{const Be=(0,u.useApp)(),{Progress:He}=Be.getComponents(),ve=O==null?void 0:O["core.mountPoint"];return f.createElement(f.Suspense,{fallback:f.createElement(He,null)},f.createElement(y,{app:Be,plugin:le},f.createElement(o.f,{attributes:{pluginId:le.getId(),...M&&{extension:M},...ve&&{routeRef:ve.id}}},f.createElement(h.o,{plugin:le},f.createElement(K,{...Fe})))))};i(Re,"core.plugin",le);for(const[Fe,Be]of Object.entries(O))i(Re,Fe,Be);return Re.displayName=`Extension(${re})`,Re}}}var L=e(27399);function $(x,O,M,K){return f.Children.toArray(x).flatMap(re=>{if(!(0,f.isValidElement)(re))return[];if(re.type===f.Fragment)return $(re.props.children,O,M,K);if(R(re,"core.featureFlagged")){const le=re.props;return("with"in le?O.isActive(le.with):!O.isActive(le.without))?$(re.props.children,O,M,K):[]}if(M===void 0||M(re))return[re];if(K)throw new Error(K);return $(re.props.children,O,M,K)})}class B{constructor(O,M){this.node=O,this.featureFlagsApi=M}selectByComponentData(O){const M=$(this.node,this.featureFlagsApi,K=>R(K,O.key)!==void 0,O.withStrictError);return new B(M,this.featureFlagsApi)}findComponentData(O){return $(this.node,this.featureFlagsApi,K=>R(K,O.key)!==void 0).map(K=>R(K,O.key)).filter(K=>K!==void 0)}getElements(){return $(this.node,this.featureFlagsApi)}}function D(x,O,M=[]){const K=(0,L.useApi)(L.featureFlagsApiRef),re=new B(x,K);return(0,f.useMemo)(()=>O(re),[x,...M])}},80274:function(){},36964:function(ne,s,e){"use strict";e.d(s,{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 R.R5},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},createComponentExtension:function(){return R.CO},createExternalRouteRef:function(){return m.x8},createPlugin:function(){return u.r},createReactExtension:function(){return R.YO},createRoutableExtension:function(){return R.P4},createRouteRef:function(){return m.NT},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},getComponentData:function(){return R.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 i.useApp},useElementFilter:function(){return R.vJ},usePluginOptions:function(){return c.y},useRouteRef:function(){return m.tg},useRouteRefParams:function(){return m.Oi}});var r=e(24877),t=e(27399);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(s,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(s,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"usePluginOptions")&&e.d(s,{usePluginOptions:function(){return t.usePluginOptions}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}});var c=e(40338),i=e(31311);e.o(i,"attachComponentData")&&e.d(s,{attachComponentData:function(){return i.attachComponentData}}),e.o(i,"createApiFactory")&&e.d(s,{createApiFactory:function(){return i.createApiFactory}}),e.o(i,"createApiRef")&&e.d(s,{createApiRef:function(){return i.createApiRef}}),e.o(i,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return i.createComponentExtension}}),e.o(i,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return i.createExternalRouteRef}}),e.o(i,"createPlugin")&&e.d(s,{createPlugin:function(){return i.createPlugin}}),e.o(i,"createReactExtension")&&e.d(s,{createReactExtension:function(){return i.createReactExtension}}),e.o(i,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return i.createRoutableExtension}}),e.o(i,"createRouteRef")&&e.d(s,{createRouteRef:function(){return i.createRouteRef}}),e.o(i,"getComponentData")&&e.d(s,{getComponentData:function(){return i.getComponentData}}),e.o(i,"useApi")&&e.d(s,{useApi:function(){return i.useApi}}),e.o(i,"useApiHolder")&&e.d(s,{useApiHolder:function(){return i.useApiHolder}}),e.o(i,"useElementFilter")&&e.d(s,{useElementFilter:function(){return i.useElementFilter}}),e.o(i,"useRouteRef")&&e.d(s,{useRouteRef:function(){return i.useRouteRef}}),e.o(i,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return i.useRouteRefParams}});var R=e(74181),f=e(80274),o=e.n(f);e.o(f,"createApiFactory")&&e.d(s,{createApiFactory:function(){return f.createApiFactory}}),e.o(f,"createApiRef")&&e.d(s,{createApiRef:function(){return f.createApiRef}}),e.o(f,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return f.createExternalRouteRef}}),e.o(f,"createPlugin")&&e.d(s,{createPlugin:function(){return f.createPlugin}}),e.o(f,"createRouteRef")&&e.d(s,{createRouteRef:function(){return f.createRouteRef}}),e.o(f,"useApi")&&e.d(s,{useApi:function(){return f.useApi}}),e.o(f,"useApiHolder")&&e.d(s,{useApiHolder:function(){return f.useApiHolder}}),e.o(f,"useRouteRef")&&e.d(s,{useRouteRef:function(){return f.useRouteRef}}),e.o(f,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return f.useRouteRefParams}});var u=e(96896),m=e(82772)},40338:function(ne,s,e){"use strict";e.d(s,{o:function(){return i},y:function(){return R}});var r=e(76241),t=e(2784);const c="plugin-context",i=({children:f,plugin:o})=>{const{Provider:u}=(0,r.CT)(c);return t.createElement(u,{value:(0,r.EI)({1:{plugin:o}})},f)};function R(){const f=(0,r.Vt)(c);if(!f)throw new Error("Plugin Options context is not available");const o=f.atVersion(1);if(!o)throw new Error("Plugin Options v1 is not available");return o.plugin.getPluginOptions()}},96896:function(ne,s,e){"use strict";e.d(s,{r:function(){return t}});class r{constructor(i){q(this,"options");this.config=i}getId(){return this.config.id}getApis(){var i;return(i=this.config.apis)!=null?i:[]}getFeatureFlags(){var i,R;return(R=(i=this.config.featureFlags)==null?void 0:i.slice())!=null?R:[]}get routes(){var i;return(i=this.config.routes)!=null?i:{}}get externalRoutes(){var i;return(i=this.config.externalRoutes)!=null?i:{}}provide(i){return i.expose(this)}__experimentalReconfigure(i){this.config.__experimentalConfigure&&(this.options=this.config.__experimentalConfigure(i))}getPluginOptions(){var i;return this.config.__experimentalConfigure&&!this.options&&(this.options=this.config.__experimentalConfigure()),(i=this.options)!=null?i:{}}toString(){return`plugin{${this.config.id}}`}}function t(c){return new r(c)}},82772:function(ne,s,e){var b,L,$;"use strict";e.d(s,{x8:function(){return m},NT:function(){return i},tg:function(){return E},Oi:function(){return S}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class c{constructor(D,x){q(this,b,"absolute");this.id=D,this.params=x}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}b=t;function i(B){var D;return new c(B.id,(D=B.params)!=null?D:[])}const R=/^\w+$/;class f{constructor(D,x,O,M){q(this,L,"sub");this.id=D,this.path=x,this.parent=O,this.params=M}toString(){return`routeRef{type=sub,id=${this.id}}`}}L=t;function o(B){const{id:D,path:x,parent:O}=B,M=x.split("/").filter(le=>le.startsWith(":")).map(le=>le.substring(1)),K=[...O.params,...M];if(O.params.some(le=>M.includes(le)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!x.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${x}'`);if(x.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${x}'`);for(const le of M)if(!R.test(le))throw new Error(`SubRouteRef path has invalid param, got '${le}'`);return new f(D,x,O,K)}class u{constructor(D,x,O){q(this,$,"external");this.id=D,this.params=x,this.optional=O}toString(){return`routeRef{type=external,id=${this.id}}`}}$=t;function m(B){var D;return new u(B.id,(D=B.params)!=null?D:[],Boolean(B.optional))}var y=e(2784),h=e(10289);function E(B){const D=(0,h.TH)(),x=(0,r.Vt)("routing-context");if(!x)throw new Error("Routing context is not available");const O=x.atVersion(1),M=(0,y.useMemo)(()=>O&&O.resolve(B,D),[O,B,D]);if(!x)throw new Error("useRouteRef used outside of routing context");if(!O)throw new Error("RoutingContext v1 not available");const K="optional"in B&&B.optional;if(!M&&!K)throw new Error(`No path for ${B}`);return M}function S(B){return(0,h.UO)()}},10179:function(ne,s,e){"use strict";e.d(s,{SP:function(){return b},dR:function(){return h},VL:function(){return $},BD:function(){return t}});function r(B){if(typeof B!="object"||B===null||Array.isArray(B))return!1;const D=B;return!(typeof D.name!="string"||D.name===""||typeof D.message!="string")}function t(B){if(typeof B!="object"||B===null||Array.isArray(B))throw new Error(`Encountered invalid error, not an object, got '${B}'`);const D=B;if(typeof D.name!="string"||D.name==="")throw new Error(`Encountered error object without a name, got '${B}'`);if(typeof D.message!="string")throw new Error(`Encountered error object without a message, got '${B}'`)}var c=e(24852);function i(B,D){const x=serializeErrorInternal(B),O={name:"Unknown",message:"<no reason given>",...x};return D!=null&&D.includeStack||delete O.stack,O}function R(B){const D=(0,c.deserializeError)(B);return B.stack||(D.stack=void 0),D}function f(B){if(r(B)){const D=String(B);return D!=="[object Object]"?D:`${B.name}: ${B.message}`}return`unknown error '${B}'`}class o extends Error{constructor(x,O){var K;let M=x;if(O!==void 0){const re=f(O);M?M+=`; caused by ${re}`:M=`caused by ${re}`}super(M);q(this,"cause");(K=Error.captureStackTrace)==null||K.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(O)?O:void 0}}class u extends null{}class m extends null{}class y extends null{}class h extends o{}class E extends null{}class S extends null{}class b extends o{constructor(D,x){super(D,x),this.name=r(x)?x.name:"Error"}}async function L(B){var D;try{const x=await B.text();if(x){if((D=B.headers.get("content-type"))!=null&&D.startsWith("application/json"))try{const O=JSON.parse(x);if(O.error&&O.response)return O}catch{}return{error:{name:"Error",message:`Request failed with status ${B.status} ${B.statusText}, ${x}`},response:{statusCode:B.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${B.status} ${B.statusText}`},response:{statusCode:B.status}}}class $ extends Error{constructor(x){super(x.message);q(this,"response");q(this,"body");q(this,"cause");this.name="ResponseError",this.response=x.response,this.body=x.data,this.cause=x.cause}static async fromResponse(x){const O=await L(x),M=O.response.statusCode||x.status,K=O.error.name||x.statusText,re=`Request failed with ${M} ${K}`,le=R(O.error);return new $({message:re,response:x,data:O,cause:le})}}},36356:function(ne,s,e){var h,E,S,b,L;"use strict";e.d(s,{nW:function(){return y},ae:function(){return f},q3:function(){return o}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class c{constructor(D){Fn(this,h,void 0);Nn(this,h,D)}async getCredentials(D){const x=new URL(D.url),O=ot(this,h).find(M=>M.isUrlSupported(x));if(!O)throw new Error(`No auth provider available for '${D.url}', see https://backstage.io/link?scm-auth`);return O.getCredentials(D)}}h=new WeakMap;const $=class{constructor(D,x,O,M){Fn(this,E,void 0);Fn(this,S,void 0);Fn(this,b,void 0);Fn(this,L,void 0);Nn(this,E,x),Nn(this,S,O),Nn(this,b,M),Nn(this,L,D)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:D,gitlab:x,azure:O,bitbucket:M})=>$.merge($.forGithub(D),$.forGitlab(x),$.forAzure(O),$.forBitbucket(M))})}static forAuthApi(D,x){return new $("generic",D,x.host,x.scopeMapping)}static forGithub(D,x){var M;const O=(M=x==null?void 0:x.host)!=null?M:"github.com";return new $("github",D,O,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(D,x){var M;const O=(M=x==null?void 0:x.host)!=null?M:"gitlab.com";return new $("gitlab",D,O,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(D,x){var M;const O=(M=x==null?void 0:x.host)!=null?M:"dev.azure.com";return new $("azure",D,O,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(D,x){var M;const O=(M=x==null?void 0:x.host)!=null?M:"bitbucket.org";return new $("bitbucket",D,O,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...D){return new c(D)}isUrlSupported(D){return D.host===ot(this,S)}getAdditionalScopesForProvider(D){var x,O;return!(D!=null&&D.customScopes)||ot(this,L)==="generic"?[]:(O=(x=D.customScopes)==null?void 0:x[ot(this,L)])!=null?O:[]}async getCredentials(D){const{url:x,additionalScope:O,...M}=D,K=ot(this,b).default.slice();O!=null&&O.repoWrite&&K.push(...ot(this,b).repoWrite);const re=this.getAdditionalScopesForProvider(O);re.length&&K.push(...re);const le=[...new Set(K)],Re=await ot(this,E).getAccessToken(le,M);return{token:Re,headers:{Authorization:`Bearer ${Re}`}}}};let i=$;E=new WeakMap,S=new WeakMap,b=new WeakMap,L=new WeakMap;var R=e(68370);class f{static fromConfig(D){return R.Lx.fromConfig(D)}}const o=(0,r.createApiRef)({id:"integration.scmintegrations"});var u=e(73250),m=e(2784);const y=B=>{var K;const{type:D}=B,x=(0,r.useApp)(),O=u.Z,M=D&&(K=x.getSystemIcon(D))!=null?K:O;return m.createElement(M,null)}},68370:function(ne,s,e){var Mt,It,it,wt,sn,Wt,nn;"use strict";e.d(s,{Lx:function(){return Kt},Pb:function(){return Yt}});var r=e(82717),t=e.n(r),c=e(76635);function i(w){const g=new URL("http://example.com");return g.host=w,g.host===w}function R(w){try{return new URL(w),!0}catch{return!1}}function f(w,g){return{list(){return w},byUrl(C){try{const F=typeof C=="string"?new URL(C):C;return w.find(V=>g(V)===F.host)}catch{return}},byHost(C){return w.find(F=>g(F)===C)}}}function o(w){const{url:g,base:C,lineNumber:F}=w;try{return new URL(g),g}catch{}let V;if(g.startsWith("/")){const{filepath:oe}=t()(C);V=new URL(C);const he=(0,c.trimEnd)(V.pathname.substring(0,V.pathname.length-oe.length),"/");V.pathname=`${he}${g}`}else V=new URL(g,C);return V.search=new URL(C).search,F&&(V.hash=`L${F}`),V.toString()}const u="amazonaws.com";function m(w){var jt;const g=w.getOptionalString("endpoint"),C=(jt=w.getOptionalBoolean("s3ForcePathStyle"))!=null?jt:!1;let F,V;if(g){try{const An=new URL(g);F=An.host,V=An.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${g}' is not a valid URL`)}if(V!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${g}'`)}else F=u;const oe=w.getOptionalString("accessKeyId"),he=w.getOptionalString("secretAccessKey"),Le=w.getOptionalString("roleArn"),Et=w.getOptionalString("externalId");return{host:F,endpoint:g,s3ForcePathStyle:C,accessKeyId:oe,secretAccessKey:he,roleArn:Le,externalId:Et}}function y(w){const g=w.map(m);return g.some(C=>C.host===u)||g.push({host:u}),g}const zt=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(g){this.integrationConfig=g}resolveUrl(g){return o(g)}resolveEditUrl(g){return g}};let h=zt;q(h,"factory",({config:g})=>{var F;const C=y((F=g.getOptionalConfigArray("integrations.awsS3"))!=null?F:[]);return f(C.map(V=>new zt(V)),V=>V.config.host)});const E="GB",Bn=class{constructor(g,C,F,V,oe,he){Fn(this,Mt,void 0);Fn(this,It,void 0);Fn(this,it,void 0);Fn(this,wt,void 0);Fn(this,sn,void 0);Fn(this,Wt,void 0);Fn(this,nn,(...g)=>{const C=new URL(ot(this,Mt));return C.pathname=g.map(F=>encodeURIComponent(F)).join("/"),C});Nn(this,Mt,g),Nn(this,It,C),Nn(this,it,F),Nn(this,wt,V),Nn(this,sn,oe),Nn(this,Wt,he)}static fromRepoUrl(g){var An;const C=new URL(g);let F,V,oe;const he=C.pathname.split("/").map(rn=>decodeURIComponent(rn));if(he[2]==="_git"?(F=he[1],V=oe=he[3]):he[3]==="_git"?(F=he[1],V=he[2],oe=he[4]):he[4]==="_git"&&(F=`${he[1]}/${he[2]}`,V=he[3],oe=he[5]),!F||!V||!oe)throw new Error("Azure URL must point to a git repository");const Le=(An=C.searchParams.get("path"))!=null?An:void 0;let Et;const jt=C.searchParams.get("version");if(jt){if(jt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Et=jt.slice(2)}return new Bn(C.origin,F,V,oe,Le,Et)}toRepoUrl(){let g;return ot(this,it)===ot(this,wt)?g=ot(this,nn).call(this,ot(this,It),"_git",ot(this,wt)):g=ot(this,nn).call(this,ot(this,It),ot(this,it),"_git",ot(this,wt)),ot(this,sn)&&g.searchParams.set("path",ot(this,sn)),ot(this,Wt)&&g.searchParams.set("version",E+ot(this,Wt)),g.toString()}toFileUrl(){if(!ot(this,sn))throw new Error("Azure URL must point to a specific path to be able to download a file");const g=ot(this,nn).call(this,ot(this,It),ot(this,it),"_apis","git","repositories",ot(this,wt),"items");return g.searchParams.set("api-version","6.0"),g.searchParams.set("path",ot(this,sn)),ot(this,Wt)&&g.searchParams.set("version",ot(this,Wt)),g.toString()}toArchiveUrl(){const g=ot(this,nn).call(this,ot(this,It),ot(this,it),"_apis","git","repositories",ot(this,wt),"items");return g.searchParams.set("recursionLevel","full"),g.searchParams.set("download","true"),g.searchParams.set("api-version","6.0"),ot(this,sn)&&g.searchParams.set("scopePath",ot(this,sn)),ot(this,Wt)&&g.searchParams.set("version",ot(this,Wt)),g.toString()}toCommitsUrl(){const g=ot(this,nn).call(this,ot(this,It),ot(this,it),"_apis","git","repositories",ot(this,wt),"commits");return g.searchParams.set("api-version","6.0"),ot(this,Wt)&&g.searchParams.set("searchCriteria.itemVersion.version",ot(this,Wt)),g.toString()}getOwner(){return ot(this,It)}getProject(){return ot(this,it)}getRepo(){return ot(this,wt)}getPath(){return ot(this,sn)}getRef(){return ot(this,Wt)}};let S=Bn;Mt=new WeakMap,It=new WeakMap,it=new WeakMap,wt=new WeakMap,sn=new WeakMap,Wt=new WeakMap,nn=new WeakMap;const b="dev.azure.com";function L(w){var F;const g=(F=w.getOptionalString("host"))!=null?F:b,C=w.getOptionalString("token");if(!i(g))throw new Error(`Invalid Azure integration config, '${g}' is not a valid host`);return{host:g,token:C}}function $(w){const g=w.map(L);return g.some(C=>C.host===b)||g.push({host:b}),g}const Zn=class{constructor(g){this.integrationConfig=g}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){var V;const{url:C,base:F}=g;if(R(C))return C;try{const oe=S.fromRepoUrl(F),he=new URL(F),Le=new URL(`https://a.com${(V=oe.getPath())!=null?V:""}`),Et=new URL(C,Le).pathname;return he.searchParams.set("path",Et),g.lineNumber&&(he.searchParams.set("line",String(g.lineNumber)),he.searchParams.set("lineEnd",String(g.lineNumber+1)),he.searchParams.set("lineStartColumn","1"),he.searchParams.set("lineEndColumn","1")),he.toString()}catch{return new URL(C,F).toString()}}resolveEditUrl(g){return g}};let B=Zn;q(B,"factory",({config:g})=>{var F;const C=$((F=g.getOptionalConfigArray("integrations.azure"))!=null?F:[]);return f(C.map(V=>new Zn(V)),V=>V.config.host)});var D=e(48834).lW;function x(w){return AzureUrl.fromRepoUrl(w).toFileUrl()}function O(w){return AzureUrl.fromRepoUrl(w).toArchiveUrl()}function M(w){return AzureUrl.fromRepoUrl(w).toCommitsUrl()}function K(w,g){const C=g?{...g}:{};if(w.token){const F=D.from(`:${w.token}`,"utf8");C.Authorization=`Basic ${F.toString("base64")}`}return{headers:C}}const re="bitbucket.org",le="https://api.bitbucket.org/2.0";function Re(w){var he;const g=(he=w.getOptionalString("host"))!=null?he:re;let C=w.getOptionalString("apiBaseUrl");const F=w.getOptionalString("token"),V=w.getOptionalString("username"),oe=w.getOptionalString("appPassword");if(!i(g))throw new Error(`Invalid Bitbucket integration config, '${g}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):g===re?C=le:C=`https://${g}/rest/api/1.0`,{host:g,apiBaseUrl:C,token:F,username:V,appPassword:oe}}function Fe(w){const g=w.map(Re);return g.some(C=>C.host===re)||g.push({host:re,apiBaseUrl:le}),g}const Ht=class{constructor(g){this.integrationConfig=g}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const C=o(g);if(!g.lineNumber)return C;const F=new URL(C);return this.integrationConfig.host==="bitbucket.org"?F.hash=`lines-${g.lineNumber}`:F.hash=`${g.lineNumber}`,F.toString()}resolveEditUrl(g){const C=t()(g),F=new URL(g);return F.searchParams.set("mode","edit"),F.searchParams.set("spa","0"),F.searchParams.set("at",C.ref),F.toString()}};let Be=Ht;q(Be,"factory",({config:g})=>{var F,V,oe;const C=Fe((oe=g.getOptionalConfigArray("integrations.bitbucket"))!=null?oe:[...(F=g.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?F:[],...(V=g.getOptionalConfigArray("integrations.bitbucketServer"))!=null?V:[]]);return f(C.map(he=>new Ht(he)),he=>he.config.host)});var He=e(96279),ve=e(48834).lW;async function Je(w,g){const{name:C,owner:F,resource:V}=parseGitUrl(w),oe=V==="bitbucket.org";let he=oe?`${g.apiBaseUrl}/repositories/${F}/${C}`:`${g.apiBaseUrl}/projects/${F}/repos/${C}/default-branch`,Le=await fetch(he,At(g));if(Le.status===404&&!oe&&(he=`${g.apiBaseUrl}/projects/${F}/repos/${C}/branches/default`,Le=await fetch(he,At(g))),!Le.ok){const jt=`Failed to retrieve default branch from ${he}, ${Le.status} ${Le.statusText}`;throw new Error(jt)}let Et;if(oe)Et=(await Le.json()).mainbranch.name;else{const{displayId:jt}=await Le.json();Et=jt}if(!Et)throw new Error(`Failed to read default branch from ${he}. Response ${Le.status} ${Le.json()}`);return Et}async function tt(w,g){const{name:C,owner:F,ref:V,protocol:oe,resource:he,filepath:Le}=parseGitUrl(w),Et=he==="bitbucket.org";let jt=V;jt||(jt=await Je(w,g));const An=Le?`&path=${encodeURIComponent(decodeURIComponent(Le))}`:"";return Et?`${oe}://${he}/${F}/${C}/get/${jt}.tar.gz`:`${g.apiBaseUrl}/projects/${F}/repos/${C}/archive?format=tgz&at=${jt}&prefix=${F}-${C}${An}`}function Tt(w,g){try{const{owner:C,name:F,ref:V,filepathtype:oe,filepath:he}=parseGitUrl(w);if(!C||!F||oe!=="browse"&&oe!=="raw"&&oe!=="src")throw new Error("Invalid Bitbucket URL or file path");const Le=he.replace(/^\//,"");if(g.host==="bitbucket.org"){if(!V)throw new Error("Invalid Bitbucket URL or file path");return`${g.apiBaseUrl}/repositories/${C}/${F}/src/${V}/${Le}`}return`${g.apiBaseUrl}/projects/${C}/repos/${F}/raw/${Le}?at=${V}`}catch(C){throw new Error(`Incorrect URL: ${w}, ${C}`)}}function At(w){const g={};if(w.token)g.Authorization=`Bearer ${w.token}`;else if(w.username&&w.appPassword){const C=ve.from(`${w.username}:${w.appPassword}`,"utf8");g.Authorization=`Basic ${C.toString("base64")}`}return{headers:g}}const Ie="bitbucket.org",mt="https://api.bitbucket.org/2.0";function ht(w){const g=Ie,C=mt,F=w.getString("username"),V=w.getString("appPassword");return{host:g,apiBaseUrl:C,username:F,appPassword:V}}function lt(w){const g=w.map(ht);return g.length===0&&g.push({host:Ie,apiBaseUrl:mt}),g}const Lt=class{constructor(g){this.integrationConfig=g}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const C=o(g);if(g.lineNumber){const F=new URL(C);return F.hash=`lines-${g.lineNumber}`,F.toString()}return C}resolveEditUrl(g){const C=t()(g),F=new URL(g);return F.searchParams.set("mode","edit"),F.searchParams.set("at",C.ref),F.toString()}};let ee=Lt;q(ee,"factory",({config:g})=>{var F;const C=lt((F=g.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?F:[]);return f(C.map(V=>new Lt(V)),V=>V.config.host)});var pe=e(48834).lW;async function be(w,g){const{name:C,owner:F}=parseGitUrl(w),V=`${g.apiBaseUrl}/repositories/${F}/${C}`,oe=await fetch(V,at(g));if(!oe.ok){const Et=`Failed to retrieve default branch from ${V}, ${oe.status} ${oe.statusText}`;throw new Error(Et)}const Le=(await oe.json()).mainbranch.name;if(!Le)throw new Error(`Failed to read default branch from ${V}. Response ${oe.status} ${oe.json()}`);return Le}async function We(w,g){const{name:C,owner:F,ref:V,protocol:oe,resource:he}=parseGitUrl(w);let Le=V;return Le||(Le=await be(w,g)),`${oe}://${he}/${F}/${C}/get/${Le}.tar.gz`}function et(w,g){try{const{owner:C,name:F,ref:V,filepathtype:oe,filepath:he}=parseGitUrl(w);if(!C||!F||oe!=="src"&&oe!=="raw")throw new Error("Invalid Bitbucket Cloud URL or file path");const Le=he.replace(/^\//,"");if(!V)throw new Error("Invalid Bitbucket Cloud URL or file path");return`${g.apiBaseUrl}/repositories/${C}/${F}/src/${V}/${Le}`}catch(C){throw new Error(`Incorrect URL: ${w}, ${C}`)}}function at(w){const g={};if(w.username&&w.appPassword){const C=pe.from(`${w.username}:${w.appPassword}`,"utf8");g.Authorization=`Basic ${C.toString("base64")}`}return{headers:g}}function yt(w){const g=w.getString("host");let C=w.getOptionalString("apiBaseUrl");const F=w.getOptionalString("token"),V=w.getOptionalString("username"),oe=w.getOptionalString("password");if(!i(g))throw new Error(`Invalid Bitbucket Server integration config, '${g}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):C=`https://${g}/rest/api/1.0`,{host:g,apiBaseUrl:C,token:F,username:V,password:oe}}function se(w){return w.map(yt)}const hn=class{constructor(g){this.integrationConfig=g}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const C=o(g);if(g.lineNumber){const F=new URL(C);return F.hash=g.lineNumber.toString(),F.toString()}return C}resolveEditUrl(g){return g.includes("?")?g.substring(0,g.indexOf("?")):g}};let ae=hn;q(ae,"factory",({config:g})=>{var F;const C=se((F=g.getOptionalConfigArray("integrations.bitbucketServer"))!=null?F:[]);return f(C.map(V=>new hn(V)),V=>V.config.host)});var Ye=e(48834).lW;async function Ve(w,g){const{name:C,owner:F}=parseGitUrl(w);let V=`${g.apiBaseUrl}/projects/${F}/repos/${C}/default-branch`,oe=await fetch(V,Q(g));if(oe.status===404&&(V=`${g.apiBaseUrl}/projects/${F}/repos/${C}/branches/default`,oe=await fetch(V,Q(g))),!oe.ok){const Et=`Failed to retrieve default branch from ${V}, ${oe.status} ${oe.statusText}`;throw new Error(Et)}const{displayId:he}=await oe.json(),Le=he;if(!Le)throw new Error(`Failed to read default branch from ${V}. Response ${oe.status} ${oe.json()}`);return Le}async function Ue(w,g){const{name:C,owner:F,ref:V,filepath:oe}=parseGitUrl(w);let he=V;he||(he=await Ve(w,g));const Le=oe?`&path=${encodeURIComponent(decodeURIComponent(oe))}`:"";return`${g.apiBaseUrl}/projects/${F}/repos/${C}/archive?format=tgz&at=${he}&prefix=${F}-${C}${Le}`}function nt(w,g){try{const{owner:C,name:F,ref:V,filepathtype:oe,filepath:he}=parseGitUrl(w);if(!C||!F||oe!=="browse"&&oe!=="raw"&&oe!=="src")throw new Error("Invalid Bitbucket Server URL or file path");const Le=he.replace(/^\//,"");return`${g.apiBaseUrl}/projects/${C}/repos/${F}/raw/${Le}?at=${V}`}catch(C){throw new Error(`Incorrect URL: ${w}, ${C}`)}}function Q(w){const g={};if(w.token&&(g.Authorization=`Bearer ${w.token}`),w.username&&w.password){const C=Ye.from(`${w.username}:${w.password}`,"utf8");g.Authorization=`Basic ${C.toString("base64")}`}return{headers:g}}function z(w){const g=w.getString("host");let C=w.getOptionalString("baseUrl"),F=w.getOptionalString("cloneUrl"),V=w.getOptionalString("gitilesBaseUrl");const oe=w.getOptionalString("username"),he=w.getOptionalString("password");if(i(g)){if(C&&!R(C))throw new Error(`Invalid Gerrit integration config, '${C}' is not a valid baseUrl`);if(F&&!R(F))throw new Error(`Invalid Gerrit integration config, '${F}' is not a valid cloneUrl`);if(V&&!R(V))throw new Error(`Invalid Gerrit integration config, '${V}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${g}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):C=`https://${g}`,V?V=(0,c.trimEnd)(V,"/"):V=`https://${g}`,F?F=(0,c.trimEnd)(F,"/"):F=C,{host:g,baseUrl:C,cloneUrl:F,gitilesBaseUrl:V,username:oe,password:he}}function _(w){return w.map(z)}var ce=e(48834).lW;const fe=")]}'";function Pe(w,g){const F=g.replace(w.gitilesBaseUrl,"").split("/").filter(jt=>!!jt),V=F.indexOf("+");if(V<=0)throw new Error(`Unable to parse project from url: ${g}`);const oe=(0,c.trimStart)(F.slice(0,V).join("/"),"/"),he=F.indexOf("heads");if(he<=0)throw new Error(`Unable to parse branch from url: ${g}`);const Le=F[he+1],Et=F.slice(he+2).join("/");return{branch:Le,filePath:Et===""?"/":Et,project:oe}}function Oe(w,g,C,F){return`${w.gitilesBaseUrl}/${g}/+/refs/heads/${C}/${(0,c.trimStart)(F,"/")}`}function Se(w){return w.password?"/a/":"/"}function Qe(w,g){const{branch:C,project:F}=Pe(w,g);return`${w.baseUrl}${Se(w)}projects/${encodeURIComponent(F)}/branches/${C}`}function Ge(w,g){const{project:C}=Pe(w,g);return`${w.cloneUrl}${Se(w)}${C}`}function gt(w,g){const{branch:C,filePath:F,project:V}=Pe(w,g);return`${w.baseUrl}${Se(w)}projects/${encodeURIComponent(V)}/branches/${C}/files/${encodeURIComponent(F)}/content`}function Rt(w){return`${w.baseUrl}${Se(w)}projects/`}function ut(w){const g={};if(!w.password)return g;const C=ce.from(`${w.username}:${w.password}`,"utf8");return g.Authorization=`Basic ${C.toString("base64")}`,{headers:g}}async function Ft(w){const g=await w.text();if(g.startsWith(fe))try{return JSON.parse(g.slice(fe.length))}catch(C){throw new Error(`Invalid response from Gerrit: ${g.slice(0,10)} - ${C}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${g.slice(0,10)}`)}const Rn=class{constructor(g){this.integrationConfig=g}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const{url:C,base:F,lineNumber:V}=g;let oe;if(C.startsWith("/")){const{branch:he,project:Le}=Pe(this.config,F);return Oe(this.config,Le,he,C)}return C?oe=new URL(C,F):oe=new URL(F),V&&(oe.hash=V.toString()),oe.toString()}resolveEditUrl(g){return g}};let xt=Rn;q(xt,"factory",({config:g})=>{var F;const C=_((F=g.getOptionalConfigArray("integrations.gerrit"))!=null?F:[]);return f(C.map(V=>new Rn(V)),V=>V.config.host)});const bt="github.com",Pt="https://api.github.com",Vt="https://raw.githubusercontent.com";function Gt(w){var he,Le;const g=(he=w.getOptionalString("host"))!=null?he:bt;let C=w.getOptionalString("apiBaseUrl"),F=w.getOptionalString("rawBaseUrl");const V=w.getOptionalString("token"),oe=(Le=w.getOptionalConfigArray("apps"))==null?void 0:Le.map(Et=>({appId:Et.getNumber("appId"),clientId:Et.getString("clientId"),clientSecret:Et.getString("clientSecret"),webhookSecret:Et.getString("webhookSecret"),privateKey:Et.getString("privateKey"),allowedInstallationOwners:Et.getOptionalStringArray("allowedInstallationOwners")}));if(!i(g))throw new Error(`Invalid GitHub integration config, '${g}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):g===bt&&(C=Pt),F?F=(0,c.trimEnd)(F,"/"):g===bt&&(F=Vt),{host:g,apiBaseUrl:C,rawBaseUrl:F,token:V,apps:oe}}function dn(w){const g=w.map(Gt);return g.some(C=>C.host===bt)||g.push({host:bt,apiBaseUrl:Pt,rawBaseUrl:Vt}),g}function In(w,g,C){try{const{owner:F,name:V,ref:oe,filepathtype:he,filepath:Le}=parseGitUrl(w);if(!F||!V||!oe||he!=="blob"&&he!=="raw"&&he!=="tree")throw new Error("Invalid GitHub URL or file path");const Et=Le.replace(/^\//,"");return Zt(g,C)==="api"?`${g.apiBaseUrl}/repos/${F}/${V}/contents/${Et}?ref=${oe}`:`${g.rawBaseUrl}/${F}/${V}/${oe}/${Et}`}catch(F){throw new Error(`Incorrect URL: ${w}, ${F}`)}}function Qt(w,g){const C={};return Zt(w,g)==="api"&&(C.Accept="application/vnd.github.v3.raw"),g.token&&(C.Authorization=`token ${g.token}`),{headers:C}}function Zt(w,g){return w.apiBaseUrl&&(g.token||!w.rawBaseUrl)?"api":"raw"}var Xe=e(55912);class ue{constructor(){q(this,"tokenCache",new Map);q(this,"isNotExpired",g=>g.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(g,C){const F=this.tokenCache.get(g);if(F&&this.isNotExpired(F.expiresAt))return{accessToken:F.token};const V=await C();return this.tokenCache.set(g,V),{accessToken:V.token}}}const j={Accept:"application/vnd.github.machine-man-preview+json"};class ye{constructor(g,C){q(this,"appClient");q(this,"baseUrl");q(this,"baseAuthConfig");q(this,"cache",new ue);q(this,"allowedInstallationOwners");this.allowedInstallationOwners=g.allowedInstallationOwners,this.baseUrl=C,this.baseAuthConfig={appId:g.appId,privateKey:g.privateKey.replace(/\\n/gm,`
31
+ `)},this.appClient=new Octokit({baseUrl:C,headers:j,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(g,C){var he;const{installationId:F,suspended:V}=await this.getInstallationData(g);if(this.allowedInstallationOwners&&!((he=this.allowedInstallationOwners)!=null&&he.includes(g)))return{accessToken:void 0};if(V)throw new Error(`The GitHub application for ${g} is suspended`);const oe=C?`${g}/${C}`:g;return this.cache.getOrCreateToken(oe,async()=>{var Et;const Le=await this.appClient.apps.createInstallationAccessToken({installation_id:F,headers:j});if(C&&Le.data.repository_selection==="selected"){const jt=new Octokit({baseUrl:this.baseUrl,auth:Le.data.token}),An=await jt.paginate(jt.apps.listReposAccessibleToInstallation);if(!((Et=An.repositories)!=null?Et:An).some(sr=>sr.name===C))throw new Error(`The Backstage GitHub application used in the ${g} organization does not have access to a repository with the name ${C}`)}return{token:Le.data.token,expiresAt:DateTime.fromISO(Le.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(g){const F=(await this.getInstallations()).find(oe=>{var he,Le;return((Le=(he=oe.account)==null?void 0:he.login)==null?void 0:Le.toLocaleLowerCase("en-US"))===g.toLocaleLowerCase("en-US")});if(F)return{installationId:F.id,suspended:Boolean(F.suspended_by)};const V=new Error(`No app installation found for ${g} in ${this.baseAuthConfig.appId}`);throw V.name="NotFoundError",V}}class Ke{constructor(g){q(this,"apps");var C,F;this.apps=(F=(C=g.apps)==null?void 0:C.map(V=>new ye(V,g.apiBaseUrl)))!=null?F:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(C=>C.getInstallations()))).flat():[]}async getAppToken(g,C){if(this.apps.length===0)return;const F=await Promise.all(this.apps.map(Le=>Le.getInstallationCredentials(g,C).then(Et=>({credentials:Et,error:void 0}),Et=>({credentials:void 0,error:Et})))),V=F.find(Le=>Le.credentials);if(V)return V.credentials.accessToken;const he=F.map(Le=>Le.error).find(Le=>Le.name!=="NotFoundError");if(he)throw he}}class qe{constructor(g,C){this.githubAppCredentialsMux=g,this.token=C}async getCredentials(g){const C=parseGitUrl(g.url),F=C.owner||C.name,V=C.owner?C.name:void 0;let oe="app",he=await this.githubAppCredentialsMux.getAppToken(F,V);return he||(oe="token",he=this.token),{headers:he?{Authorization:`Bearer ${he}`}:void 0,token:he,type:oe}}}q(qe,"create",null);class st{static fromIntegrations(g){const C=new Map;return g.github.list().forEach(F=>{const V=SingleInstanceGithubCredentialsProvider.create(F.config);C.set(F.config.host,V)}),new st(C)}constructor(g){this.providers=g}async getCredentials(g){const C=new URL(g.url),F=this.providers.get(C.host);if(!F)throw new Error(`There is no GitHub integration that matches ${g.url}. Please add a configuration for an integration.`);return F.getCredentials(g)}}const ln=class{constructor(g){this.integrationConfig=g}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){return Yt(o(g),"tree")}resolveEditUrl(g){return Yt(g,"edit")}};let St=ln;q(St,"factory",({config:g})=>{var F;const C=dn((F=g.getOptionalConfigArray("integrations.github"))!=null?F:[]);return f(C.map(V=>new ln(V)),V=>V.config.host)});function Yt(w,g){return w.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(C,F,V,oe)=>`//${F}/${V}/${oe}/${g}/`)}const _t="gitlab.com",en="https://gitlab.com/api/v4";function mn(w){const g=w.getString("host");let C=w.getOptionalString("apiBaseUrl");const F=w.getOptionalString("token");let V=w.getOptionalString("baseUrl");if(C?C=(0,c.trimEnd)(C,"/"):g===_t&&(C=en),V?V=(0,c.trimEnd)(V,"/"):V=`https://${g}`,i(g)){if(!C||!R(C))throw new Error(`Invalid GitLab integration config, '${C}' is not a valid apiBaseUrl`);if(!R(V))throw new Error(`Invalid GitLab integration config, '${V}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${g}' is not a valid host`);return{host:g,token:F,apiBaseUrl:C,baseUrl:V}}function Xt(w){const g=w.map(mn);return g.some(C=>C.host===_t)||g.push({host:_t,apiBaseUrl:en,baseUrl:`https://${_t}`}),g}function U(w){let g="";return w.host!==_t&&(g=new URL(w.baseUrl).pathname),trimEnd(g,"/")}async function J(w,g){const C=await xe(w,g);return Ce(w,C,g).toString()}function de(w){const{token:g=""}=w;return{headers:{"PRIVATE-TOKEN":g}}}function Ce(w,g,C){try{const F=new URL(w),V=F.pathname.split("/blob/").slice(1).join("/blob/"),[oe,...he]=V.split("/"),Le=getGitLabIntegrationRelativePath(C);return F.pathname=[...Le?[Le]:[],"api/v4/projects",g,"repository/files",encodeURIComponent(decodeURIComponent(he.join("/"))),"raw"].join("/"),F.search=`?ref=${oe}`,F}catch(F){throw new Error(`Incorrect url: ${w}, ${F}`)}}async function xe(w,g){const C=new URL(w);if(!C.pathname.includes("/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{let F=C.pathname.split("/-/blob/")[0].split("/blob/")[0];const V=getGitLabIntegrationRelativePath(g);V&&(F=F.replace(V,""));const oe=new URL(`${C.origin}${V}/api/v4/projects/${encodeURIComponent(F.replace(/^\//,""))}`),he=await fetch(oe.toString(),de(g)),Le=await he.json();if(!he.ok)throw new Error(`GitLab Error '${Le.error}', ${Le.error_description}`);return Number(Le.id)}catch(F){throw new Error(`Could not get GitLab project ID for: ${w}, ${F}`)}}const gn=class{constructor(g){this.integrationConfig=g}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){return o(g)}resolveEditUrl(g){return pt(g,"edit")}};let we=gn;q(we,"factory",({config:g})=>{var F;const C=Xt((F=g.getOptionalConfigArray("integrations.gitlab"))!=null?F:[]);return f(C.map(V=>new gn(V)),V=>V.config.host)});function pt(w,g){return w.replace(/\/\-\/(blob|tree|edit)\//,`/-/${g}/`)}class Kt{constructor(g){q(this,"byType");this.byType=g}static fromConfig(g){return new Kt({awsS3:h.factory({config:g}),azure:B.factory({config:g}),bitbucket:Be.factory({config:g}),bitbucketCloud:ee.factory({config:g}),bitbucketServer:ae.factory({config:g}),gerrit:xt.factory({config:g}),github:St.factory({config:g}),gitlab:we.factory({config:g})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get bitbucketCloud(){return this.byType.bitbucketCloud}get bitbucketServer(){return this.byType.bitbucketServer}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(g=>g.list())}byUrl(g){let C=Object.values(this.byType).map(F=>F.byUrl(g)).filter(Boolean);if(C.length>1){const F=C.filter(V=>!(V instanceof Be));F.length!==0&&(C=F)}return C[0]}byHost(g){return Object.values(this.byType).map(C=>C.byHost(g)).find(Boolean)}resolveUrl(g){const C=this.byUrl(g.base);return C?C.resolveUrl(g):o(g)}resolveEditUrl(g){const C=this.byUrl(g);return C?C.resolveEditUrl(g):g}}},90775:function(ne,s,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return R.plugin}});var t=e(2784),c=e(47093),i=e(10289),R=e(82250),f=e(56338),o=e(49208),u=e(36964),m=e(68099);const y=[(0,u.createApiFactory)({api:u.discoveryApiRef,deps:{configApi:u.configApiRef},factory:({configApi:I})=>o.UrlPatternDiscovery.compile(`${I.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,u.createApiFactory)({api:u.alertApiRef,deps:{},factory:()=>new o.AlertApiForwarder}),(0,u.createApiFactory)({api:u.analyticsApiRef,deps:{},factory:()=>new o.NoOpAnalyticsApi}),(0,u.createApiFactory)({api:u.errorApiRef,deps:{alertApi:u.alertApiRef},factory:({alertApi:I})=>{const k=new o.ErrorAlerter(I,new o.ErrorApiForwarder);return o.UnhandledErrorForwarder.forward(k,{hidden:!1}),k}}),(0,u.createApiFactory)({api:u.storageApiRef,deps:{errorApi:u.errorApiRef},factory:({errorApi:I})=>o.WebStorage.create({errorApi:I})}),(0,u.createApiFactory)({api:u.fetchApiRef,deps:{configApi:u.configApiRef,identityApi:u.identityApiRef,discoveryApi:u.discoveryApiRef},factory:({configApi:I,identityApi:k,discoveryApi:me})=>(0,o.createFetchApi)({middleware:[o.FetchMiddlewares.resolvePluginProtocol({discoveryApi:me}),o.FetchMiddlewares.injectIdentityAuth({identityApi:k,config:I})]})}),(0,u.createApiFactory)({api:u.oauthRequestApiRef,deps:{},factory:()=>new o.OAuthRequestManager}),(0,u.createApiFactory)({api:u.googleAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.GoogleAuth.create({discoveryApi:I,oauthRequestApi:k,environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.microsoftAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.MicrosoftAuth.create({discoveryApi:I,oauthRequestApi:k,environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.githubAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.GithubAuth.create({discoveryApi:I,oauthRequestApi:k,defaultScopes:["read:user"],environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oktaAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.OktaAuth.create({discoveryApi:I,oauthRequestApi:k,environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.gitlabAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.GitlabAuth.create({discoveryApi:I,oauthRequestApi:k,environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oneloginAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.OneLoginAuth.create({discoveryApi:I,oauthRequestApi:k,environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.bitbucketAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.BitbucketAuth.create({discoveryApi:I,oauthRequestApi:k,defaultScopes:["team"],environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.atlassianAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.AtlassianAuth.create({discoveryApi:I,oauthRequestApi:k,environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:m.RV,deps:{discovery:u.discoveryApiRef,identity:u.identityApiRef,config:u.configApiRef},factory:({config:I,discovery:k,identity:me})=>m.iM.create({config:I,discovery:k,identity:me})})];var h=e(77277),E=e(82339),S=e(62833);function b({children:I}){return(0,i.GV)()?t.createElement(t.Fragment,null,I):t.createElement(i.VA,null,I)}const L=()=>t.createElement(E.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),$=({step:I,error:k})=>{let me="";return I==="load-config"?me=`The configuration failed to load, someone should have a look at this error: ${k.message}`:I==="load-chunk"&&(me=`Lazy loaded chunk failed to load, try to reload the page: ${k.message}`),t.createElement(b,null,t.createElement(E.ErrorPage,{status:"501",statusMessage:me}))},B=({error:I,resetError:k,plugin:me})=>t.createElement(E.ErrorPanel,{title:`Error in ${me==null?void 0:me.getId()}`,defaultExpanded:!0,error:I},t.createElement(h.Z,{variant:"outlined",onClick:k},"Retry")),D={Progress:E.Progress,Router:S.VK,NotFoundErrorPage:L,BootErrorPage:$,ErrorBoundaryFallback:B};var x=e(43642),O=e(80079),M=e(90941),K=e(32915),re=e(40562),le=e(21853),Re=e(60744),Fe=e(66569),Be=e(30254),He=e(13384),ve=e(15933),Je=e(58838),tt=e(86737),Tt=e(4989),At=e(44407),Ie=e(18628),mt=e(84219),ht=e(98685),lt=e(39781);const ee={brokenImage:O.Z,catalog:Ie.Z,scaffolder:K.Z,techdocs:re.Z,search:le.Z,chat:Re.Z,dashboard:Fe.Z,docs:Be.Z,email:He.Z,github:Je.Z,group:mt.Z,help:tt.Z,"kind:api":ve.Z,"kind:component":At.Z,"kind:domain":x.Z,"kind:group":mt.Z,"kind:location":Tt.Z,"kind:system":M.Z,"kind:user":ht.Z,user:ht.Z,warning:lt.Z};var pe=e(73689),be=e(48032);const We={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")`},et={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"],greens:["#4BB8A5","#187656"]};function at(I){var dt;const{colors:k,shape:me,options:Me}=I,ft=`linear-gradient(90deg, ${(k.length===1?[k[0],k[0]]:k).join(", ")})`,vt=`${me}, ${ft}`,Dt=(dt=Me==null?void 0:Me.fontColor)!=null?dt:"#FFFFFF";return{colors:k,shape:me,backgroundImage:vt,fontColor:Dt}}const yt={home:at({colors:et.teal,shape:We.wave}),documentation:at({colors:et.pinkSea,shape:We.wave2}),tool:at({colors:et.purpleSky,shape:We.round}),service:at({colors:et.marineBlue,shape:We.wave}),website:at({colors:et.veryBlue,shape:We.wave}),library:at({colors:et.rubyRed,shape:We.wave}),other:at({colors:et.darkGrey,shape:We.wave}),app:at({colors:et.toastyOrange,shape:We.wave}),apis:at({colors:et.teal,shape:We.wave2}),card:at({colors:et.greens,shape:We.wave})},se=16,ae='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function Ye(I){const{palette:k,htmlFontSize:me=se,fontFamily:Me=ae,defaultPageTheme:_e,pageTheme:ft=yt}=I;if(!ft[_e])throw new Error(`${_e} is not defined in pageTheme.`);return{palette:k,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{htmlFontSize:me,fontFamily:Me,h6:{fontWeight:700,fontSize:20,marginBottom:2},h5:{fontWeight:700,fontSize:24,marginBottom:4},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:ft[_e],getPageTheme:({themeId:vt})=>{var Dt;return(Dt=ft[vt])!=null?Dt:ft[_e]}}}function Ve(I){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:I.typography.fontFamily},body:{height:"100%",fontFamily:I.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:I.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:I.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:I.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:I.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:I.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,be.darken)(I.palette.link,.3),background:(0,be.lighten)(I.palette.link,.95)},[I.breakpoints.up("md")]:{minWidth:120,fontSize:I.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:I.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:I.spacing(1),marginBottom:I.spacing(1),color:I.palette.grey[900]},outlined:{color:I.palette.text.primary},label:{lineHeight:`${I.spacing(2.5)}px`,fontWeight:I.typography.fontWeightMedium,fontSize:`${I.spacing(1.75)}px`},labelSmall:{fontSize:`${I.spacing(1.5)}px`},deleteIcon:{color:I.palette.grey[500],width:`${I.spacing(3)}px`,height:`${I.spacing(3)}px`,margin:`0 ${I.spacing(.75)}px 0 -${I.spacing(.75)}px`},deleteIconSmall:{width:`${I.spacing(2)}px`,height:`${I.spacing(2)}px`,margin:`0 ${I.spacing(.5)}px 0 -${I.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 Ue(I){const k=Ye(I),me=(0,pe.Z)(k),Me=Ve(me);return{...me,overrides:Me}}var nt=e(34505);const Q=Ue({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:nt.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:yt}),z=Ue({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:nt.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:yt});var _=e(98192),ce=e(15222),fe=e(41547),Pe=e(87561);const Oe=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(ce.Z,null),Provider:({children:I})=>t.createElement(fe.Z,{theme:Q},t.createElement(Pe.ZP,null,I))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(_.Z,null),Provider:({children:I})=>t.createElement(fe.Z,{theme:z},t.createElement(Pe.ZP,null,I))}];function Se(I){var k,me,Me;return(0,o.createSpecializedApp)({...I,apis:(k=I==null?void 0:I.apis)!=null?k:[],bindRoutes:I==null?void 0:I.bindRoutes,components:{...D,...I==null?void 0:I.components},configLoader:I==null?void 0:I.configLoader,defaultApis:y,icons:{...ee,...I==null?void 0:I.icons},plugins:(me=I==null?void 0:I.plugins)!=null?me:[],themes:(Me=I==null?void 0:I.themes)!=null?Me:Oe})}var Qe=e(82394),Ge=e.n(Qe),gt=e(48023),Rt=e(76635);async function ut({storageApi:I}){var ft;const k=I.forBucket("settings"),me=I.forBucket("starredEntities"),Me=k.snapshot("starredEntities").value;if(!(0,Rt.isArray)(Me))return;const _e=new Set((ft=me.snapshot("entityRefs").value)!=null?ft:[]);Me.filter(Rt.isString).map(vt=>vt.split(":")).filter(vt=>vt.length===4&&vt[0]==="entity").map(([vt,Dt,dt,A])=>(0,gt.eE)({kind:Dt,namespace:dt,name:A})).forEach(vt=>_e.add(vt)),await me.set("entityRefs",Array.from(_e)),await k.remove("starredEntities")}class Ft{constructor(k){q(this,"settingsStore");q(this,"starredEntities");q(this,"subscribers",new Set);q(this,"observable",new(Ge())(k=>(k.next(new Set(this.starredEntities)),this.subscribers.add(k),()=>{this.subscribers.delete(k)})));var me;ut(k).then(),this.settingsStore=k.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(k){this.starredEntities.has(k)?this.starredEntities.delete(k):this.starredEntities.add(k),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const k of this.subscribers)k.next(new Set(this.starredEntities))}}var xt=e(39398),bt=e(49782),Pt=e(79692),Vt=e(74450);const Gt=(0,Pt.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function dn(I){var ft,vt;const k=I.result,me=Gt(),Me=useAnalytics(),_e=()=>{Me.captureEvent("discover",k.title,{attributes:{to:k.location},value:I.rank})};return React.createElement(Link,{noTrack:!0,to:k.location,onClick:_e},React.createElement(ListItem,{alignItems:"flex-start"},I.icon&&React.createElement(ListItemIcon,null,I.icon),React.createElement("div",{className:me.flexContainer},React.createElement(ListItemText,{className:me.itemText,primaryTypographyProps:{variant:"h6"},primary:(ft=I.highlight)!=null&&ft.fields.title?React.createElement(HighlightedSearchResultText,{text:I.highlight.fields.title,preTag:I.highlight.preTag,postTag:I.highlight.postTag}):k.title,secondary:(vt=I.highlight)!=null&&vt.fields.text?React.createElement(HighlightedSearchResultText,{text:I.highlight.fields.text,preTag:I.highlight.preTag,postTag:I.highlight.postTag}):k.text}),React.createElement(Box,null,k.kind&&React.createElement(Chip,{label:`Kind: ${k.kind}`,size:"small"}),k.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${k.lifecycle}`,size:"small"})))),React.createElement(Divider,{component:"li"}))}var In=e(30097),Qt=e(17429),Zt=e(95544),Xe=e(99688),ue=e(12231),j=e(86136),ye=e(49378),Ke=e(85256),qe=e(61837),st=e(79784),St=e(50758),Yt=e(31654),_t=e(43054),en=e(40749);const mn="catalog-entity",Xt=(0,en.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:mn}),U=(0,en.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),J=(0,en.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:mn}),de=(0,en.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:mn}),Ce=(0,en.J$)({name:"catalog.location.read",attributes:{action:"read"}}),xe=(0,en.J$)({name:"catalog.location.create",attributes:{action:"create"}}),we=(0,en.J$)({name:"catalog.location.delete",attributes:{action:"delete"}}),pt=[Xt,U,J,de,Ce,xe,we];var Kt=e(49166);function zt(I){var dt;const{unregisterEntityOptions:k,isUnregisterAllowed:me,onUnregisterEntity:Me,onClose:_e}=I,ft=typeof(k==null?void 0:k.disableUnregister)=="boolean",vt=(dt=!me||(ft?!!(k!=null&&k.disableUnregister):(k==null?void 0:k.disableUnregister)==="disable"))!=null?dt:!1;let Dt=t.createElement(t.Fragment,null);return(k==null?void 0:k.disableUnregister)!=="hidden"&&(Dt=t.createElement(ue.Z,{onClick:()=>{_e(),Me()},disabled:vt},t.createElement(j.Z,null,t.createElement(Kt.Z,{fontSize:"small"})),t.createElement(ye.Z,{primary:"Unregister entity"}))),t.createElement(t.Fragment,null,Dt)}const Mt=(0,Pt.Z)(I=>({button:{color:I.page.fontColor}}),{name:"PluginCatalogEntityContextMenu"});function It(I){const{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:me,onUnregisterEntity:Me,onInspectEntity:_e}=I,[ft,vt]=(0,t.useState)(),Dt=Mt(),A=(0,Qt.useEntityPermission)(J).allowed,T=Y=>{vt(Y.currentTarget)},N=()=>{vt(void 0)},W=k&&[...k.map(Y=>t.createElement(ue.Z,{key:Y.title,onClick:()=>{N(),Y.onClick()}},t.createElement(j.Z,null,t.createElement(Y.Icon,{fontSize:"small"})),t.createElement(ye.Z,{primary:Y.title}))),t.createElement(Ke.Z,{key:"the divider is here!"})];return t.createElement(t.Fragment,null,t.createElement(qe.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true","aria-expanded":!!ft,role:"button",onClick:T,"data-testid":"menu-button",className:Dt.button,id:"long-menu"},t.createElement(_t.Z,null)),t.createElement(st.ZP,{open:Boolean(ft),onClose:N,anchorEl:ft,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},"aria-labelledby":"long-menu"},t.createElement(St.Z,null,W,t.createElement(zt,{unregisterEntityOptions:me,isUnregisterAllowed:A,onUnregisterEntity:Me,onClose:N}),t.createElement(ue.Z,{onClick:()=>{N(),_e()}},t.createElement(j.Z,null,t.createElement(Yt.Z,{fontSize:"small"})),t.createElement(ye.Z,{primary:"Inspect entity"})))))}const it="plugin.catalog.entityLayoutRoute",wt=()=>null;(0,u.attachComponentData)(wt,it,!0),(0,u.attachComponentData)(wt,"core.gatherMountPoints",!0);function sn(I){const{entity:k,title:me}=I;return t.createElement(Zt.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(Zt.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},me),k&&t.createElement(Qt.FavoriteEntity,{entity:k}))}function Wt(I,k,me,Me){var Dt,dt,A,T,N;const _e=(Dt=I!=null?I:Me==null?void 0:Me.kind)!=null?Dt:"",ft=(dt=k!=null?k:Me==null?void 0:Me.metadata.namespace)!=null?dt:"";return{headerTitle:`${(N=(T=(A=Me==null?void 0:Me.metadata.title)!=null?A:me)!=null?T:Me==null?void 0:Me.metadata.name)!=null?N:""}${ft&&ft!==gt.zG?` in ${ft}`:""}`,headerType:(()=>{let W=_e.toLocaleLowerCase("en-US");return Me&&Me.spec&&"type"in Me.spec&&(W+=" \u2014 ",W+=Me.spec.type.toLocaleLowerCase("en-US")),W})()}}function nn(I){var Me;const{entity:k}=I,me=(0,Qt.getEntityRelations)(k,gt.S4);return t.createElement(t.Fragment,null,me.length>0&&t.createElement(E.HeaderLabel,{label:"Owner",value:t.createElement(Qt.EntityRefLinks,{entityRefs:me,defaultKind:"Group",color:"inherit"})}),((Me=k.spec)==null?void 0:Me.lifecycle)&&t.createElement(E.HeaderLabel,{label:"Lifecycle",value:k.spec.lifecycle}))}const Bn=I=>{var ke,Ot,rt;const{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:me,children:Me,NotFoundComponent:_e}=I,{kind:ft,namespace:vt,name:Dt}=(0,u.useRouteRefParams)(Qt.entityRouteRef),{entity:dt,loading:A,error:T}=(0,Qt.useAsyncEntity)(),N=(0,i.TH)(),W=(0,u.useElementFilter)(Me,je=>je.selectByComponentData({key:it,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:Bt})=>{if(dt){if(Bt.if&&!Bt.if(dt))return[]}else return[];return[{path:Bt.path,title:Bt.title,children:Bt.children,tabProps:Bt.tabProps}]}),[dt]),{headerTitle:Y,headerType:X}=Wt(ft,vt,Dt,dt),[ge,Ae]=(0,t.useState)(!1),[Ne,De]=(0,t.useState)(!1),Ze=(0,i.s0)(),ze=async()=>{Ae(!1),De(!1),Ze("/")};return(0,t.useEffect)(()=>{Ae(!1),De(!1)},[N.pathname]),t.createElement(E.Page,{themeId:(rt=(Ot=(ke=dt==null?void 0:dt.spec)==null?void 0:ke.type)==null?void 0:Ot.toString())!=null?rt:"home"},t.createElement(E.Header,{title:t.createElement(sn,{title:Y,entity:dt}),pageTitleOverride:Y,type:X},dt&&t.createElement(t.Fragment,null,t.createElement(nn,{entity:dt}),t.createElement(It,{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:me,onUnregisterEntity:()=>Ae(!0),onInspectEntity:()=>De(!0)}))),A&&t.createElement(E.Progress,null),dt&&t.createElement(E.RoutedTabs,{routes:W}),T&&t.createElement(E.Content,null,t.createElement(Xe.Z,{severity:"error"},T.toString())),!A&&!T&&!dt&&t.createElement(E.Content,null,_e||t.createElement(E.WarningPanel,{title:"Entity not found"},"There is no ",ft," with the requested"," ",t.createElement(E.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(Qt.UnregisterEntityDialog,{open:ge,entity:dt,onConfirm:ze,onClose:()=>Ae(!1)}),t.createElement(Qt.InspectEntityDialog,{open:Ne,entity:dt,onClose:()=>De(!1)}))};Bn.Route=wt;var Zn=e(10179);function Ht(I){const{open:k,onClose:me,onConfirm:Me,entity:_e}=I,[ft,vt]=useState(!1),Dt=useApi(catalogApiRef),dt=useApi(alertApiRef),A=async()=>{vt(!0);try{const T=_e.metadata.uid;await Dt.removeEntityByUid(T),Me()}catch(T){assertError(T),dt.post({message:T.message})}finally{vt(!1)}};return React.createElement(Dialog,{open:k,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:ft,onClick:A},"Delete"),React.createElement(Button,{onClick:me,color:"primary"},"Cancel")))}var Lt=e(47851);function hn(I){var k,me;return((me=(k=I==null?void 0:I.metadata)==null?void 0:k.annotations)==null?void 0:me["backstage.io/orphan"])==="true"}function Rn(){const I=useNavigate(),k=useRouteRef(rootRouteRef),[me,Me]=useState(!1),{entity:_e}=useEntity(),ft=async()=>{Me(!1),I(k())};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:ft,onClose:()=>Me(!1)}))}var ln=e(30001);const gn=I=>I.error&&I.level==="error"&&I.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function w(I,k){return{items:(await k.getEntityAncestors({entityRef:I})).items.map(_e=>{var Dt,dt;return{errors:((dt=(Dt=_e.entity.status)==null?void 0:Dt.items)!=null?dt:[]).filter(gn).map(A=>A.error).filter(A=>Boolean(A)),entity:_e.entity}}).filter(_e=>_e.errors.length>0)}}async function g(I,k){const me=k.apis.get(catalogApiRef);if(!me)throw new Error(`No implementation available for ${catalogApiRef}`);return(await w(stringifyEntityRef(I),me)).items.length>0}function C(){const{entity:I}=useEntity(),k=stringifyEntityRef(I),me=useApi(catalogApiRef),{loading:Me,error:_e,value:ft}=useAsync(async()=>w(k,me),[k,me]);return _e?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:_e})):Me||!ft?null:React.createElement(React.Fragment,null,ft.items.map((vt,Dt)=>React.createElement(Box,{key:Dt,mb:1},stringifyEntityRef(I)!==stringifyEntityRef(vt.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:vt.entity})),vt.errors.map((dt,A)=>React.createElement(ResponseErrorPanel,{key:A,error:dt})))))}var F=e(64279);const V="core.backstage.entitySwitch",oe=I=>null;(0,u.attachComponentData)(oe,V,!0);const he=I=>{var vt,Dt;const{entity:k,loading:me}=(0,Qt.useAsyncEntity)(),Me=(0,u.useApiHolder)(),_e=(0,u.useElementFilter)(I.children,dt=>dt.selectByComponentData({key:V,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(A=>{var W;if(me)return[];const{if:T,children:N}=A.props;return k?[{if:(W=T==null?void 0:T(k,{apis:Me}))!=null?W:!0,children:N}]:[{if:T===void 0,children:N}]}),[Me,k,me]);return _e.some(dt=>typeof dt.if=="object"&&"then"in dt.if)?t.createElement(Le,{results:_e}):(Dt=(vt=_e.find(dt=>dt.if))==null?void 0:vt.children)!=null?Dt:null};function Le({results:I}){const{loading:k,value:me}=(0,F.default)(async()=>{var _e;const Me=I.map(async({if:ft,children:vt})=>{try{if(await ft)return vt}catch{}return null});return(_e=(await Promise.all(Me)).find(Boolean))!=null?_e:null},[I]);return k||!me?null:me}he.Case=oe;const Et=null,jt=Qt.CatalogFilterLayout.Filters,An=Qt.CatalogFilterLayout.Content,rn=(0,u.createPlugin)({id:"catalog",apis:[(0,u.createApiFactory)({api:Qt.catalogApiRef,deps:{discoveryApi:u.discoveryApiRef,fetchApi:u.fetchApiRef},factory:({discoveryApi:I,fetchApi:k})=>new ln.MS({discoveryApi:I,fetchApi:k})}),(0,u.createApiFactory)({api:Qt.starredEntitiesApiRef,deps:{storageApi:u.storageApiRef},factory:({storageApi:I})=>new Ft({storageApi:I})})],routes:{catalogIndex:Lt._Z,catalogEntity:Qt.entityRouteRef},externalRoutes:{createComponent:Lt.yw,viewTechDoc:Lt.jU},__experimentalConfigure(I){return{...{createButtonTitle:"Create"},...I}}}),or=rn.provide((0,u.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(5162).then(e.bind(e,74036)).then(I=>I.CatalogPage),mountPoint:Lt._Z})),sr=rn.provide((0,u.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(I=>I.CatalogEntityPage),mountPoint:Qt.entityRouteRef})),Pr=rn.provide((0,u.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(I=>I.AboutCard)}})),Kr=rn.provide((0,u.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(3555).then(e.bind(e,73555)).then(I=>I.EntityLinksCard)}})),cr=rn.provide((0,u.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(I=>I.HasSystemsCard)}})),jn=rn.provide((0,u.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(I=>I.HasComponentsCard)}})),Mn=rn.provide((0,u.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(I=>I.HasSubcomponentsCard)}})),qn=rn.provide((0,u.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(I=>I.HasResourcesCard)}})),ur=rn.provide((0,u.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(I=>I.DependsOnComponentsCard)}})),Ir=rn.provide((0,u.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(I=>I.DependencyOfComponentsCard)}})),ia=rn.provide((0,u.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(I=>I.DependsOnResourcesCard)}})),dr=rn.provide((0,u.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(I=>I.RelatedEntitiesCard)}}));var fr=e(36356);class Lr{constructor({configApi:k,discoveryApi:me,identityApi:Me}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=k,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(k,me){const _e=`${await this.getApiOrigin()}/${me}`,ft=await fetch(`${_e.endsWith("/")?_e:`${_e}/`}index.html`);if(ft.status===404)throw new Error("Page not found");return ft.text()}async syncEntityDocs(k){return"cached"}async getBaseUrl(k,me,Me){const _e=await this.getApiOrigin();return new URL(k,`${_e}/${Me}`).toString()}}class ir{constructor({configApi:k,discoveryApi:me,identityApi:Me}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=k,this.discoveryApi=me,this.identityApi=Me}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(k){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(k){return{site_name:"Live preview environment",site_description:""}}}const wn=[(0,u.createApiFactory)({api:f.Dl,deps:{configApi:u.configApiRef,discoveryApi:u.discoveryApiRef,identityApi:u.identityApiRef},factory:({configApi:I,discoveryApi:k,identityApi:me})=>new Lr({configApi:I,discoveryApi:k,identityApi:me})}),(0,u.createApiFactory)({api:f.gT,deps:{configApi:u.configApiRef,discoveryApi:u.discoveryApiRef,identityApi:u.identityApiRef},factory:({configApi:I,discoveryApi:k,identityApi:me})=>new ir({configApi:I,discoveryApi:k,identityApi:me})}),(0,u.createApiFactory)({api:fr.q3,deps:{configApi:u.configApiRef},factory:({configApi:I})=>fr.ae.fromConfig(I)})],_n={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},er={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function kr(){const I=await fetch("/.detect");return I.ok?(await I.text()).trim()==="techdocs-cli-server":!1}async function mr(){const I=await(0,o.defaultConfigLoader)(),k=await kr();return[...I,{context:"detected",data:k?_n:er}]}var hr=e(86689),Yr=e(58845);const Or=(0,Pt.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var xr=()=>{const I=Or();return t.createElement("svg",{className:I.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:I.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 Dr=(0,Pt.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Br=()=>{const I=Dr();return t.createElement("svg",{className:I.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:I.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 Mr=(0,Pt.Z)({root:{width:E.sidebarConfig.drawerWidthClosed,height:3*E.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:E.sidebarConfig.drawerWidthClosed,marginLeft:24}}),wr=()=>{const I=Mr(),{isOpen:k}=(0,E.useSidebarOpenState)();return t.createElement("div",{className:I.root},t.createElement(hr.Z,{component:S.OL,to:"/docs/default/component/local/",underline:"none",className:I.link},k?t.createElement(xr,null):t.createElement(Br,null)))},pr=({children:I})=>t.createElement(E.SidebarPage,null,t.createElement(E.Sidebar,null,t.createElement(wr,null),t.createElement(E.SidebarDivider,null),t.createElement(E.SidebarItem,{icon:Yr.Z,to:"/docs/default/component/local",text:"Docs Preview"})),I);var $r=e(80030),yr=e(32388),pn=e(4142);const Ln=(0,Pt.Z)(I=>({headerIcon:{color:I.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:I.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var yn;(function(I){const k="light";I.LIGHT=k;const me="dark";I.DARK=me})(yn||(yn={}));const Kn=()=>{const I=(0,u.useApi)(u.appThemeApiRef),k=Ln(),[me,Me]=(0,t.useState)(I.getActiveThemeId()||yn.LIGHT),_e={[yn.LIGHT]:{icon:pn.Z,title:"Dark theme"},[yn.DARK]:{icon:yr.Z,title:"Light theme"}},{title:ft,icon:vt}=_e[me],Dt=()=>{Me(dt=>{const A=dt===yn.LIGHT?yn.DARK:yn.LIGHT;return I.setActiveThemeId(A),A})};return t.createElement(Zt.Z,{display:"flex",alignItems:"center",mr:2},t.createElement($r.ZP,{title:ft,arrow:!0},t.createElement(qe.Z,{size:"small",onClick:Dt},t.createElement(vt,{className:k.headerIcon}))))},Ur=()=>t.createElement(R.TechDocsReaderPage,null,t.createElement(R.TechDocsReaderPageHeader,null),t.createElement(R.TechDocsReaderPageContent,{withSearch:!1})),Nr=t.createElement(Ur,null),Er=Se({apis:wn,configLoader:mr,plugins:Object.values(r)}),vr=Er.getProvider(),Zr=Er.getRouter(),Ar=R.techdocsPlugin.provide((0,f.KY)({name:"ThemeToggleAddon",component:Kn,location:f.oZ.Header})),tr=t.createElement(o.FlatRoutes,null,t.createElement(i.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(i.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(sr,null)}),t.createElement(i.AW,{path:"/docs",element:t.createElement(R.TechDocsIndexPage,null)},t.createElement(R.DefaultTechDocsHome,null)),t.createElement(i.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(R.TechDocsReaderPage,null)},Nr,t.createElement(f.DR,null,t.createElement(Ar,null))));var zr=()=>t.createElement(vr,null,t.createElement(Zr,null,t.createElement(pr,null,tr)));c.render(t.createElement(zr,null),document.getElementById("root"))},76241:function(ne,s,e){"use strict";e.d(s,{CT:function(){return f},EI:function(){return m},uW:function(){return i},Vt:function(){return o}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),c=y=>`__@backstage/${y}__`;function i(y,h){const E=c(y);let S=t[E];return S||(S=h(),t[E]=S,S)}var R=e(2784);function f(y){return i(y,()=>(0,R.createContext)(void 0))}function o(y){return(0,R.useContext)(f(y))}function u(y){return{set(h){globalThis[`__@backstage/${y}__`]=createContext(createVersionedValueMap(h))},reset(){delete globalThis[`__@backstage/${y}__`]}}}function m(y){return Object.freeze(y),{atVersion(h){return y[h]}}}},17429:function(ne,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return M},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return D},EntityKindFilter:function(){return _},EntityLifecyclePicker:function(){return mn},EntityListProvider:function(){return pe},EntityOwnerPicker:function(){return de},EntityProcessingStatusPicker:function(){return Dt},EntityRefLink:function(){return Q},EntityRefLinks:function(){return z},EntityTable:function(){return Mt},EntityTagPicker:function(){return sn},EntityTypePicker:function(){return Bn},FavoriteEntity:function(){return ln},InspectEntityDialog:function(){return Ur},UnregisterEntityDialog:function(){return tr},UserListPicker:function(){return Me},catalogApiRef:function(){return c},entityRouteRef:function(){return ae},getEntityRelations:function(){return mt},getEntitySourceLocation:function(){return ht},humanizeEntityRef:function(){return Ve},starredEntitiesApiRef:function(){return i},useAsyncEntity:function(){return le},useEntity:function(){return re},useEntityList:function(){return be},useEntityOwnership:function(){return dn},useEntityPermission:function(){return Qt},useRelatedEntities:function(){return Ft},useStarredEntities:function(){return Pt}});var r=e(30001),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.catalog.service"}),i=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var R=e(82394);class f{constructor(){q(this,"starredEntities",new Set);q(this,"subscribers",new Set);q(this,"observable",new ObservableImpl(T=>(T.next(new Set(this.starredEntities)),this.subscribers.add(T),()=>{this.subscribers.delete(T)})))}async toggleStarred(T){this.starredEntities.delete(T)||this.starredEntities.add(T);for(const N of this.subscribers)N.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var o=e(2784),u=e(41156),m=e(60364),y=e(77277),h=e(4190),E=e(95544),S=e(90436),b=e(60905),L=e(36444);const $=A=>{const T=(0,u.Z)(X=>X.breakpoints.down("md")),N=(0,m.Z)(),[W,Y]=(0,o.useState)(!1);return T?o.createElement(o.Fragment,null,o.createElement(y.Z,{style:{marginTop:N.spacing(1),marginLeft:N.spacing(1)},onClick:()=>Y(!0),startIcon:o.createElement(L.Z,null)},"Filters"),o.createElement(h.ZP,{open:W,onClose:()=>Y(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},o.createElement(E.Z,{m:2},o.createElement(S.Z,{variant:"h6",component:"h2",style:{marginBottom:N.spacing(1)}},"Filters"),A.children))):o.createElement(b.Z,{item:!0,lg:2},A.children)},B=A=>o.createElement(b.Z,{item:!0,xs:12,lg:10},A.children),D=A=>o.createElement(b.Z,{container:!0,style:{position:"relative"}},A.children);D.Filters=$,D.Content=B;var x=e(76241);const O=(0,x.CT)("entity-context"),M=({children:A,entity:T,loading:N,error:W,refresh:Y})=>{const X={entity:T,loading:N,error:W,refresh:Y};return o.createElement(O.Provider,{value:(0,x.EI)({1:X})},A)},K=A=>React.createElement(M,{entity:A.entity,loading:!Boolean(A.entity),error:void 0,refresh:void 0,children:A.children});function re(){const A=(0,x.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const T=A.atVersion(1);if(!T)throw new Error("EntityContext v1 not available");if(!T.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:T.entity}}function le(){const A=(0,x.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const T=A.atVersion(1);if(!T)throw new Error("EntityContext v1 not available");const{entity:N,loading:W,error:Y,refresh:X}=T;return{entity:N,loading:W,error:Y,refresh:X}}var Re=e(76635),Fe=e(19126),Be=e.n(Fe),He=e(10289),ve=e(69294),Je=e(48760),tt=e(90736);function Tt(A){return A.reduce((T,N)=>({...T,...N.getCatalogFilters?N.getCatalogFilters():{}}),{})}function At(A){return T=>A.every(N=>!N.filterEntity||N.filterEntity(T))}var Ie=e(48023);function mt(A,T,N){var Y;let W=((Y=A==null?void 0:A.relations)==null?void 0:Y.filter(X=>X.type===T).map(X=>(0,Ie.of)(X.targetRef)))||[];return N!=null&&N.kind&&(W=W.filter(X=>X.kind.toLocaleLowerCase("en-US")===N.kind.toLocaleLowerCase("en-US"))),W}function ht(A,T){var W;const N=(W=A.metadata.annotations)==null?void 0:W[Ie.M6];if(!!N)try{const Y=(0,Ie.Ou)(N),X=T.byUrl(Y.target);return{locationTargetUrl:Y.target,integrationType:X==null?void 0:X.type}}catch{return}}function lt(A,T){const N=new Set([...getEntityRelations(A,RELATION_MEMBER_OF,{kind:"group"}),...A?[getCompoundEntityRef(A)]:[]].map(stringifyEntityRef)),W=getEntityRelations(T,RELATION_OWNED_BY).map(stringifyEntityRef);for(const Y of W)if(N.has(Y))return!0;return!1}const ee=(0,o.createContext)(void 0),pe=({children:A})=>{const T=(0,tt.default)(),N=(0,t.useApi)(c),[W,Y]=(0,o.useState)({}),X=(0,He.TH)(),ge=(0,o.useMemo)(()=>{var rt;return(rt=Be().parse(X.search,{ignoreQueryPrefix:!0}).filters)!=null?rt:{}},[X]),[Ae,Ne]=(0,o.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:De,error:Ze},ze]=(0,ve.default)(async()=>{var On;const rt=(0,Re.compact)(Object.values(W)),je=At(rt),Bt=Tt(rt),fn=Tt((0,Re.compact)(Object.values(Ae.appliedFilters))),kn=Object.keys(W).reduce((En,Sn)=>{const $n=W[Sn];return $n!=null&&$n.toQueryValue&&(En[Sn]=$n.toQueryValue()),En},{});if((0,Re.isEqual)(fn,Bt))Ne({appliedFilters:W,backendEntities:Ae.backendEntities,entities:Ae.backendEntities.filter(je)});else{const En=await N.getEntities({filter:Bt});Ne({appliedFilters:W,backendEntities:En.items,entities:En.items.filter(je)})}if(T()){const En=Be().parse(X.search,{ignoreQueryPrefix:!0}),Sn=Be().stringify({...En,filters:kn},{addQueryPrefix:!0,arrayFormat:"repeat"}),$n=`${window.location.pathname}${Sn}`;(On=window.history)==null||On.replaceState(null,document.title,$n)}},[N,ge,W,Ae],{loading:!0});(0,Je.Z)(ze,10,[W]);const ke=(0,o.useCallback)(rt=>{Y(je=>{const Bt=typeof rt=="function"?rt(je):rt;return{...je,...Bt}})},[]),Ot=(0,o.useMemo)(()=>({filters:Ae.appliedFilters,entities:Ae.entities,backendEntities:Ae.backendEntities,updateFilters:ke,queryParameters:ge,loading:De,error:Ze}),[Ae,ke,ge,De,Ze]);return o.createElement(ee.Provider,{value:Ot},A)};function be(){const A=(0,o.useContext)(ee);if(!A)throw new Error("useEntityList must be used within EntityListProvider");return A}var We=e(64279),et=e(18149),at=e.n(et),yt=e(829),se=e.n(yt);const ae=(0,x.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function Ye(A){var T,N;return{kind:A.kind.toLocaleLowerCase("en-US"),namespace:(N=(T=A.metadata.namespace)==null?void 0:T.toLocaleLowerCase("en-US"))!=null?N:DEFAULT_NAMESPACE,name:A.metadata.name}}function Ve(A,T){const N=T==null?void 0:T.defaultKind;let W,Y,X;return"metadata"in A?(W=A.kind,Y=A.metadata.namespace,X=A.metadata.name):(W=A.kind,Y=A.namespace,X=A.name),Y===Ie.zG&&(Y=void 0),W=W.toLocaleLowerCase("en-US"),W=N&&N.toLocaleLowerCase("en-US")===W?void 0:W,`${W?`${W}:`:""}${Y?`${Y}/`:""}${X}`}var Ue=e(82339),nt=e(80030);const Q=(0,o.forwardRef)((A,T)=>{var rt;const{entityRef:N,defaultKind:W,title:Y,children:X,...ge}=A,Ae=(0,t.useRouteRef)(ae);let Ne,De,Ze;if(typeof N=="string"){const je=(0,Ie.of)(N);Ne=je.kind,De=je.namespace,Ze=je.name}else"metadata"in N?(Ne=N.kind,De=N.metadata.namespace,Ze=N.metadata.name):(Ne=N.kind,De=N.namespace,Ze=N.name);Ne=Ne.toLocaleLowerCase("en-US"),De=(rt=De==null?void 0:De.toLocaleLowerCase("en-US"))!=null?rt:Ie.zG;const ze={kind:Ne,namespace:De,name:Ze},ke=Ve({kind:Ne,namespace:De,name:Ze},{defaultKind:W}),Ot=o.createElement(Ue.Link,{...ge,ref:T,to:Ae(ze)},X,!X&&(Y!=null?Y:ke));return Y?o.createElement(nt.ZP,{title:ke},Ot):Ot});function z(A){const{entityRefs:T,defaultKind:N,...W}=A;return o.createElement(o.Fragment,null,T.map((Y,X)=>o.createElement(o.Fragment,{key:X},X>0&&", ",o.createElement(Q,{...W,entityRef:Y,defaultKind:N}))))}class _{constructor(T){this.value=T}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class ce{constructor(T){this.value=T}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class fe{constructor(T){this.values=T}filterEntity(T){return this.values.every(N=>{var W;return((W=T.metadata.tags)!=null?W:[]).includes(N)})}toQueryValue(){return this.values}}class Pe{constructor(T){this.value=T}filterEntity(T){var W;const N=this.value.toLocaleUpperCase("en-US");return T.metadata.name.toLocaleUpperCase("en-US").includes(N)||`${T.metadata.title}`.toLocaleUpperCase("en-US").includes(N)||((W=T.metadata.tags)==null?void 0:W.join("").toLocaleUpperCase("en-US").indexOf(N))!==-1}}class Oe{constructor(T){this.values=T}filterEntity(T){return this.values.some(N=>mt(T,Ie.S4).some(W=>Ve(W,{defaultKind:"group"})===N))}toQueryValue(){return this.values}}class Se{constructor(T){this.values=T}filterEntity(T){return this.values.some(N=>{var W;return((W=T.spec)==null?void 0:W.lifecycle)===N})}toQueryValue(){return this.values}}class Qe{constructor(T,N,W){this.value=T,this.isOwnedEntity=N,this.isStarredEntity=W}filterEntity(T){switch(this.value){case"owned":return this.isOwnedEntity(T);case"starred":return this.isStarredEntity(T);default:return!0}}toQueryValue(){return this.value}}class Ge{constructor(T){this.value=T}filterEntity(T){var W;const N=(W=T.metadata.annotations)==null?void 0:W["backstage.io/orphan"];return N!==void 0&&this.value.toString()===N}}class gt{constructor(T){this.value=T}filterEntity(T){var W,Y;const N=((Y=(W=T==null?void 0:T.status)==null?void 0:W.items)==null?void 0:Y.length)>0;return N!==void 0&&this.value===N}}function Rt(){var je;const A=(0,t.useApi)(c),{filters:{kind:T,type:N},queryParameters:{type:W},updateFilters:Y}=be(),X=(0,o.useMemo)(()=>[W].flat().filter(Boolean),[W]),[ge,Ae]=(0,o.useState)(X.length?X:(je=N==null?void 0:N.getTypes())!=null?je:[]);(0,o.useEffect)(()=>{X.length&&Ae(X)},[X]);const[Ne,De]=(0,o.useState)([]),Ze=(0,o.useMemo)(()=>T==null?void 0:T.value,[T]),{error:ze,loading:ke,value:Ot}=(0,We.default)(async()=>Ze?await A.getEntityFacets({filter:{kind:Ze},facets:["spec.type"]}).then(fn=>fn.facets["spec.type"]||[]):[],[Ze,A]),rt=(0,o.useRef)(Ot);return(0,o.useEffect)(()=>{const Bt=rt.current;if(rt.current=Ot,ke||!Ze||Bt===Ot||!Ot)return;const fn=[...new Set(se()(Ot,On=>-On.count).map(On=>On.value.toLocaleLowerCase("en-US")))];De(fn);const kn=ge.filter(On=>fn.includes(On));at()(ge,kn)||Ae(kn)},[ke,Ze,ge,Ae,Ot]),(0,o.useEffect)(()=>{Y({type:ge.length?new ce(ge):void 0})},[ge,Y]),{loading:ke,error:ze,availableTypes:Ne,selectedTypes:ge,setSelectedTypes:Ae}}const ut=20;function Ft(A,T){var Ne,De;const N=(Ne=T==null?void 0:T.type)==null?void 0:Ne.toLocaleLowerCase("en-US"),W=(De=T==null?void 0:T.kind)==null?void 0:De.toLocaleLowerCase("en-US"),Y=(0,t.useApi)(c),{loading:X,value:ge,error:Ae}=(0,We.default)(async()=>{var rt;const Ze=(rt=A.relations)==null?void 0:rt.map(je=>({type:je.type,target:(0,Ie.of)(je.targetRef)})).filter(je=>(!N||je.type.toLocaleLowerCase("en-US")===N)&&(!W||je.target.kind===W));if(!Ze)return[];const ze=Object.values((0,Re.groupBy)(Ze,({target:je})=>`${je.kind}:${je.namespace}`.toLocaleLowerCase("en-US"))),ke=[];for(const je of ze)ke.push({kind:je[0].target.kind,namespace:je[0].target.namespace,nameBatches:(0,Re.chunk)(je.map(Bt=>Bt.target.name),ut)});return(await Promise.all(ke.flatMap(je=>je.nameBatches.map(Bt=>Y.getEntities({filter:{kind:je.kind,"metadata.namespace":je.namespace,"metadata.name":Bt}}))))).flatMap(je=>je.items)},[A,N,W]);return{entities:ge,loading:X,error:Ae}}var xt=e(72164);function bt(A){return typeof A=="string"?A:(0,Ie.eE)(A)}function Pt(){const A=(0,t.useApi)(i),T=(0,xt.Z)(A.starredEntitie$(),new Set),N=(0,o.useCallback)(Y=>T.has(bt(Y)),[T]),W=(0,o.useCallback)(Y=>A.toggleStarred(bt(Y)).then(),[A]);return{starredEntities:T,toggleStarredEntity:W,isStarredEntity:N}}function Vt(A){return typeof A=="string"?A:(0,Ie.eE)(A)}function Gt(A){const T=(0,t.useApi)(i),[N,W]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{const X=T.starredEntitie$().subscribe({next(ge){W(ge.has(Vt(A)))}});return()=>{X.unsubscribe()}},[A,T]),{toggleStarredEntity:(0,o.useCallback)(()=>T.toggleStarred(Vt(A)).then(),[A,T]),isStarredEntity:N}}function dn(){const A=(0,t.useApi)(t.identityApiRef),{loading:T,value:N}=(0,We.default)(async()=>{const{ownershipEntityRefs:Y}=await A.getBackstageIdentity();return Y},[]),W=(0,o.useMemo)(()=>{const Y=new Set(N!=null?N:[]);return X=>{const ge=mt(X,Ie.S4).map(Ie.eE);for(const Ae of ge)if(Y.has(Ae))return!0;return!1}},[N]);return(0,o.useMemo)(()=>({loading:T,isOwnedEntity:W}),[T,W])}var In=e(68099);function Qt(A){const{entity:T,loading:N,error:W}=le(),{allowed:Y,loading:X,error:ge}=(0,In.gI)({permission:A,resourceRef:T?(0,Ie.eE)(T):void 0});return N||X?{loading:!0,allowed:!1}:W?{loading:!1,allowed:!1,error:W}:{loading:!1,allowed:Y,error:ge}}const Zt=A=>{var ge;const{initialFilter:T,hidden:N}=A,{updateFilters:W,queryParameters:{kind:Y}}=useEntityList(),[X]=useState((ge=[Y].flat()[0])!=null?ge:T);return useEffect(()=>{W({kind:X?new EntityKindFilter(X):void 0})},[X,W]),N?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var Xe=e(79692),ue=e(5806),j=e(21324),ye=e(86619),Ke=e(19996),qe=e(25505),st=e(38016),St=e(88013);const Yt=(0,Xe.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),_t=o.createElement(qe.Z,{fontSize:"small"}),en=o.createElement(Ke.Z,{fontSize:"small"}),mn=()=>{var De,Ze;const A=Yt(),{updateFilters:T,backendEntities:N,filters:W,queryParameters:{lifecycles:Y}}=be(),X=(0,o.useMemo)(()=>[Y].flat().filter(Boolean),[Y]),[ge,Ae]=(0,o.useState)(X.length?X:(Ze=(De=W.lifecycles)==null?void 0:De.values)!=null?Ze:[]);(0,o.useEffect)(()=>{X.length&&Ae(X)},[X]),(0,o.useEffect)(()=>{T({lifecycles:ge.length?new Se(ge):void 0})},[ge,T]);const Ne=(0,o.useMemo)(()=>[...new Set(N.map(ze=>{var ke;return(ke=ze.spec)==null?void 0:ke.lifecycle}).filter(Boolean))].sort(),[N]);return Ne.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Lifecycle",o.createElement(St.ZP,{multiple:!0,options:Ne,value:ge,onChange:(ze,ke)=>Ae(ke),renderOption:(ze,{selected:ke})=>o.createElement(ue.Z,{control:o.createElement(j.Z,{icon:_t,checkedIcon:en,checked:ke}),label:ze}),size:"small",popupIcon:o.createElement(st.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:ze=>o.createElement(ye.Z,{...ze,className:A.input,variant:"outlined"})}))):null},Xt=(0,Xe.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),U=o.createElement(qe.Z,{fontSize:"small"}),J=o.createElement(Ke.Z,{fontSize:"small"}),de=()=>{var De,Ze;const A=Xt(),{updateFilters:T,backendEntities:N,filters:W,queryParameters:{owners:Y}}=be(),X=(0,o.useMemo)(()=>[Y].flat().filter(Boolean),[Y]),[ge,Ae]=(0,o.useState)(X.length?X:(Ze=(De=W.owners)==null?void 0:De.values)!=null?Ze:[]);(0,o.useEffect)(()=>{X.length&&Ae(X)},[X]),(0,o.useEffect)(()=>{T({owners:ge.length?new Oe(ge):void 0})},[ge,T]);const Ne=(0,o.useMemo)(()=>[...new Set(N.flatMap(ze=>mt(ze,Ie.S4).map(ke=>Ve(ke,{defaultKind:"group"}))).filter(Boolean))].sort(),[N]);return Ne.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Owner",o.createElement(St.ZP,{multiple:!0,options:Ne,value:ge,onChange:(ze,ke)=>Ae(ke),renderOption:(ze,{selected:ke})=>o.createElement(ue.Z,{control:o.createElement(j.Z,{icon:U,checkedIcon:J,checked:ke}),label:ze}),size:"small",popupIcon:o.createElement(st.Z,{"data-testid":"owner-picker-expand"}),renderInput:ze=>o.createElement(ye.Z,{...ze,className:A.input,variant:"outlined"})}))):null},Ce=(0,Xe.Z)(A=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),xe=()=>{var X,ge;const A=Ce(),{filters:T,updateFilters:N}=useEntityList(),[W,Y]=useState((ge=(X=T.text)==null?void 0:X.value)!=null?ge:"");return useDebounce(()=>{N({text:W.length?new EntityTextFilter(W):void 0})},250,[W,N]),React.createElement(Toolbar,{className:A.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:A.input,placeholder:"Search",autoComplete:"off",onChange:Ae=>Y(Ae.target.value),value:W,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>Y(""),edge:"end",disabled:W.length===0},React.createElement(Clear,null)))})))},we=Object.freeze({createEntityRefColumn(A){const{defaultKind:T}=A;function N(W){var Y;return((Y=W.metadata)==null?void 0:Y.title)||Ve(W,{defaultKind:T})}return{title:"Name",highlight:!0,customFilterAndSearch(W,Y){return N(Y).includes(W)},customSort(W,Y){return N(W).localeCompare(N(Y))},render:W=>{var Y;return o.createElement(Q,{entityRef:W,defaultKind:T,title:(Y=W.metadata)==null?void 0:Y.title})}}},createEntityRelationColumn({title:A,relation:T,defaultKind:N,filter:W}){function Y(ge){return mt(ge,T,W)}function X(ge){return Y(ge).map(Ae=>Ve(Ae,{defaultKind:N})).join(", ")}return{title:A,customFilterAndSearch(ge,Ae){return X(Ae).includes(ge)},customSort(ge,Ae){return X(ge).localeCompare(X(Ae))},render:ge=>o.createElement(z,{entityRefs:Y(ge),defaultKind:N})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:Ie.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:Ie.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:Ie.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:A=>o.createElement(Ue.OverflowTooltip,{text:A.metadata.description,placement:"bottom-start",line:2})}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),pt=[we.createEntityRefColumn({defaultKind:"system"}),we.createDomainColumn(),we.createOwnerColumn(),we.createMetadataDescriptionColumn()],Kt=[we.createEntityRefColumn({defaultKind:"component"}),we.createSystemColumn(),we.createOwnerColumn(),we.createSpecTypeColumn(),we.createSpecLifecycleColumn(),we.createMetadataDescriptionColumn()],zt=(0,Xe.Z)(A=>({empty:{padding:A.spacing(2),display:"flex",justifyContent:"center"}})),Mt=A=>{const{entities:T,title:N,emptyContent:W,variant:Y="gridItem",columns:X}=A,ge=zt(),Ae={minWidth:"0",width:"100%"};return Y==="gridItem"&&(Ae.height="calc(100% - 10px)"),o.createElement(Ue.Table,{columns:X,title:N,style:Ae,emptyContent:W&&o.createElement("div",{className:ge.empty},W),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense",draggable:!1},data:T})};Mt.columns=we,Mt.systemEntityColumns=pt,Mt.componentEntityColumns=Kt;const It=(0,Xe.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),it=o.createElement(qe.Z,{fontSize:"small"}),wt=o.createElement(Ke.Z,{fontSize:"small"}),sn=()=>{var De,Ze;const A=It(),{updateFilters:T,filters:N,queryParameters:{tags:W}}=be(),Y=(0,t.useApi)(c),{value:X}=(0,We.default)(async()=>{var Ot;const ze="metadata.tags",{facets:ke}=await Y.getEntityFacets({facets:[ze],filter:(Ot=N.kind)==null?void 0:Ot.getCatalogFilters()});return ke[ze].map(({value:rt})=>rt)},[N.kind]),ge=(0,o.useMemo)(()=>[W].flat().filter(Boolean),[W]),[Ae,Ne]=(0,o.useState)(ge.length?ge:(Ze=(De=N.tags)==null?void 0:De.values)!=null?Ze:[]);return(0,o.useEffect)(()=>{ge.length&&Ne(ge)},[ge]),(0,o.useEffect)(()=>{T({tags:Ae.length?new fe(Ae):void 0})},[Ae,T]),X!=null&&X.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Tags",o.createElement(St.ZP,{multiple:!0,options:X,value:Ae,onChange:(ze,ke)=>Ne(ke),renderOption:(ze,{selected:ke})=>o.createElement(ue.Z,{control:o.createElement(j.Z,{icon:it,checkedIcon:wt,checked:ke}),label:ze}),size:"small",popupIcon:o.createElement(st.Z,{"data-testid":"tag-picker-expand"}),renderInput:ze=>o.createElement(ye.Z,{...ze,className:A.input,variant:"outlined"})}))):null};var Wt=e(82108),nn=e.n(Wt);const Bn=A=>{var De;const{hidden:T,initialFilter:N}=A,W=(0,t.useApi)(t.alertApiRef),{error:Y,availableTypes:X,selectedTypes:ge,setSelectedTypes:Ae}=Rt();if((0,o.useEffect)(()=>{Y&&W.post({message:"Failed to load entity types",severity:"error"}),N&&Ae([N])},[Y,W,N,Ae]),X.length===0||Y)return null;const Ne=[{value:"all",label:"All"},...X.map(Ze=>({value:Ze,label:nn()(Ze)}))];return T?null:o.createElement(E.Z,{pb:1,pt:1},o.createElement(Ue.Select,{label:"Type",items:Ne,selected:(De=Ne.length>1?ge[0]:void 0)!=null?De:"all",onChange:Ze=>Ae(Ze==="all"?[]:[String(Ze)])}))};var Zn=e(15459),Ht=e(61837),Lt=e(11640),hn=e(28347);const Rn=(0,Zn.Z)({root:{color:"#f3ba37"}})(Lt.Z),ln=A=>{const{toggleStarredEntity:T,isStarredEntity:N}=Gt(A.entity);return o.createElement(Ht.Z,{"aria-label":"favorite",color:"inherit",...A,onClick:()=>T()},o.createElement(nt.ZP,{title:N?"Remove from favorites":"Add to favorites"},N?o.createElement(Rn,null):o.createElement(hn.Z,null)))};var gn=e(8629),w=e(79249),g=e(38724),C=e(99152),F=e(6487),V=e(49429),oe=e(55999),he=e(72779),Le=e.n(he),Et=e(39412);const jt=Et.Z;function An(A,T){if(A)return A.toLocaleLowerCase("en-US");if(T)try{return(0,Ie.of)(T).kind.toLocaleLowerCase("en-US")}catch{return}}function rn(A,T){const N=(0,t.useApp)(),W=An(A,T);return W&&N.getSystemIcon(`kind:${W}`)||jt}function or(A){const{kind:T,entityRef:N,...W}=A,Y=rn(T,N);return o.createElement(Y,{...W})}const sr=(0,Xe.Z)(A=>({node:{fill:A.palette.grey[300],stroke:A.palette.grey[300],"&.primary":{fill:A.palette.primary.light,stroke:A.palette.primary.light},"&.secondary":{fill:A.palette.secondary.light,stroke:A.palette.secondary.light}},text:{fill:A.palette.getContrastText(A.palette.grey[300]),"&.primary":{fill:A.palette.primary.contrastText},"&.secondary":{fill:A.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function Pr(A){const T=(0,t.useApi)(c),N=(0,Ie.eE)(A),{loading:W,error:Y,value:X}=(0,We.default)(async()=>{const ge=await T.getEntityAncestors({entityRef:N}),Ae=new Array,Ne=new Array;for(const De of ge.items){const Ze=(0,Ie.eE)(De.entity),ze=Ze===ge.rootEntityRef;Ae.push({id:Ze,root:ze,...De.entity});for(const ke of De.parentEntityRefs)Ne.push({from:Ze,to:ke})}return{nodes:Ae,edges:Ne}},[N]);return{loading:W,error:Y,nodes:(X==null?void 0:X.nodes)||[],edges:(X==null?void 0:X.edges)||[]}}function Kr({node:A}){const T=sr(),N=(0,He.s0)(),W=(0,t.useRouteRef)(ae),[Y,X]=(0,o.useState)(0),[ge,Ae]=(0,o.useState)(0),Ne=(0,o.useRef)(null);(0,o.useLayoutEffect)(()=>{if(Ne.current){let{height:Bt,width:fn}=Ne.current.getBBox();Bt=Math.round(Bt),fn=Math.round(fn),(Bt!==ge||fn!==Y)&&(X(fn),Ae(Bt))}},[Y,ge]);const De=10,Ze=ge,ze=Ze+De,ke=ze+Y+De*2,Ot=ge+De*2,rt=A.metadata.title||(A.kind&&A.metadata.name&&A.metadata.namespace?Ve({kind:A.kind,name:A.metadata.name,namespace:A.metadata.namespace||""}):A.id),je=()=>{N(W({kind:A.kind,namespace:A.metadata.namespace||Ie.zG,name:A.metadata.name}))};return o.createElement("g",{onClick:je,className:T.clickable},o.createElement("rect",{className:Le()(T.node,A.root?"secondary":"primary"),width:ke,height:Ot,rx:10}),o.createElement(or,{kind:A.kind,y:De,x:De,width:Ze,height:Ze,className:Le()(T.text,A.root?"secondary":"primary")}),o.createElement("text",{ref:Ne,className:Le()(T.text,A.root?"secondary":"primary"),y:Ot/2,x:ze+(Y+De*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},rt))}function cr(A){const{loading:T,error:N,nodes:W,edges:Y}=Pr(A.entity);return T?o.createElement(Ue.Progress,null):N?o.createElement(Ue.ResponseErrorPanel,{error:N}):o.createElement(o.Fragment,null,o.createElement(oe.Z,{variant:"h2"},"Ancestry"),o.createElement(oe.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"," ",o.createElement(Ue.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."),o.createElement(E.Z,{mt:4},o.createElement(Ue.DependencyGraph,{nodes:W,edges:Y,renderNode:Kr,direction:Ue.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var jn=e(11776),Mn=e(38402),qn=e(86136),ur=e(99688),Ir=e(49378),ia=e(54506),dr=e(94339),fr=e(24579),Lr=e(27685);const ir=(0,Xe.Z)(A=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:A.spacing(2)},helpIcon:{marginLeft:A.spacing(1),color:A.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function wn(A){const T=ir();return o.createElement(Ir.Z,{...A,primaryTypographyProps:{className:T.monospace},secondaryTypographyProps:{className:T.monospace}})}function _n(A){const T=ir();return o.createElement(ia.Z,{className:T.monospace},A.children)}function er(A){return o.createElement(E.Z,{mt:2},o.createElement(dr.Z,{variant:"outlined"},o.createElement(fr.Z,null,o.createElement(S.Z,{variant:"h6",gutterBottom:!0},A.title,A.helpLink&&o.createElement(hr,{to:A.helpLink})),A.children)))}function kr(A){if(A.match(/^url:https?:\/\//))return A.slice(4);if(A.match(/^https?:\/\//))return A}function mr(A){const[T,N]=A.entry,W=kr(N);return o.createElement(Mn.Z,null,A.indent&&o.createElement(qn.Z,null),o.createElement(wn,{primary:T,secondary:W?o.createElement(Ue.Link,{to:W},N):N}))}function hr(A){const T=ir();return o.createElement(Ue.Link,{to:A.to,className:T.helpIcon},o.createElement(Lr.Z,{fontSize:"inherit"}))}const Yr=(0,Xe.Z)({root:{display:"flex",flexDirection:"column"}});function Or(A){var Ne,De;const T=(0,t.useApi)(c),N=(0,Ie.eE)(A),W=(Ne=A.metadata.annotations)==null?void 0:Ne[Ie.P1],Y=(De=A.metadata.annotations)==null?void 0:De[Ie.q1],{loading:X,error:ge,value:Ae}=(0,We.default)(async()=>!W&&!Y?[]:(await T.getEntities({filter:[...W?[{[`metadata.annotations.${Ie.P1}`]:W}]:[],...Y?[{[`metadata.annotations.${Ie.q1}`]:Y}]:[]]})).items,[W,Y]);return{loading:X,error:ge,location:W,originLocation:Y,colocatedEntities:Ae==null?void 0:Ae.filter(Ze=>(0,Ie.eE)(Ze)!==N)}}function gr(A){return o.createElement(jn.Z,{dense:!0},A.header&&o.createElement(mr,{key:"header",entry:A.header}),A.entities.map(T=>o.createElement(Mn.Z,{key:(0,Ie.eE)(T)},o.createElement(qn.Z,null,o.createElement(or,{kind:T.kind})),o.createElement(wn,{primary:o.createElement(Q,{entityRef:T})}))))}function xr(A){const{entity:T}=A,{loading:N,error:W,location:Y,originLocation:X,colocatedEntities:ge}=Or(T);if(N)return o.createElement(Ue.Progress,null);if(W)return o.createElement(Ue.ResponseErrorPanel,{error:W});if(!Y&&!X)return o.createElement(ur.Z,{severity:"warning"},"Entity had no location information.");if(!(ge!=null&&ge.length))return o.createElement(ur.Z,{severity:"info"},"There were no other entities on this location.");if(Y===X)return o.createElement(gr,{entities:ge});const Ae=ge.filter(De=>{var Ze;return((Ze=De.metadata.annotations)==null?void 0:Ze[Ie.P1])===Y}),Ne=ge.filter(De=>{var Ze;return((Ze=De.metadata.annotations)==null?void 0:Ze[Ie.q1])===X});return o.createElement(o.Fragment,null,Ae.length>0&&o.createElement(gr,{entities:Ae,header:["At the same location",Y]}),Ne.length>0&&o.createElement(gr,{entities:Ne,header:["At the same origin",X]}))}function Dr(A){const T=Yr();return o.createElement(o.Fragment,null,o.createElement(oe.Z,{variant:"h2"},"Colocated"),o.createElement(oe.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)."),o.createElement("div",{className:T.root},o.createElement(xr,{entity:A.entity})))}function Fr(A){return Object.fromEntries([...Object.entries(A)].sort((T,N)=>T[0]<N[0]?-1:1))}function Br(A){return o.createElement(o.Fragment,null,o.createElement(oe.Z,{variant:"h2"},"Entity as JSON"),o.createElement(oe.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),o.createElement(oe.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(Ue.CodeSnippet,{text:JSON.stringify(Fr(A.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var Mr=e(3440),wr=e.n(Mr);const pr=(0,Xe.Z)({root:{display:"flex",flexDirection:"column"}});function $r(A){var De,Ze;const T=pr(),{apiVersion:N,kind:W,metadata:Y,spec:X,relations:ge=[],status:Ae={}}=A.entity,Ne=wr()(se()(ge,ze=>ze.targetRef),"type");return o.createElement(o.Fragment,null,o.createElement(oe.Z,{variant:"h2"},"Overview"),o.createElement("div",{className:T.root},o.createElement(er,{title:"Identity"},o.createElement(jn.Z,{dense:!0},o.createElement(Mn.Z,null,o.createElement(wn,{primary:"apiVersion",secondary:N})),o.createElement(Mn.Z,null,o.createElement(wn,{primary:"kind",secondary:W})),(X==null?void 0:X.type)&&o.createElement(Mn.Z,null,o.createElement(wn,{primary:"spec.type",secondary:X.type})),Y.uid&&o.createElement(Mn.Z,null,o.createElement(wn,{primary:"uid",secondary:Y.uid})),Y.etag&&o.createElement(Mn.Z,null,o.createElement(wn,{primary:"etag",secondary:Y.etag})))),o.createElement(er,{title:"Metadata"},!!Object.keys(Y.annotations||{}).length&&o.createElement(jn.Z,{dense:!0,subheader:o.createElement(_n,null,"Annotations",o.createElement(hr,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(Y.annotations).map(ze=>o.createElement(mr,{key:ze[0],indent:!0,entry:ze}))),!!Object.keys(Y.labels||{}).length&&o.createElement(jn.Z,{dense:!0,subheader:o.createElement(_n,null,"Labels")},Object.entries(Y.labels).map(ze=>o.createElement(mr,{key:ze[0],indent:!0,entry:ze}))),!!((De=Y.tags)!=null&&De.length)&&o.createElement(jn.Z,{dense:!0,subheader:o.createElement(_n,null,"Tags")},Y.tags.map((ze,ke)=>o.createElement(Mn.Z,{key:`${ze}-${ke}`},o.createElement(qn.Z,null),o.createElement(wn,{primary:ze}))))),!!ge.length&&o.createElement(er,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Ne).map(([ze,ke],Ot)=>o.createElement("div",{key:Ot},o.createElement(jn.Z,{dense:!0,subheader:o.createElement(_n,null,ze)},ke.map(rt=>o.createElement(Mn.Z,{key:rt.targetRef},o.createElement(qn.Z,null,o.createElement(or,{entityRef:rt.targetRef})),o.createElement(wn,{primary:o.createElement(Q,{entityRef:rt.targetRef})}))))))),!!((Ze=Ae.items)!=null&&Ze.length)&&o.createElement(er,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},Ae.items.map((ze,ke)=>o.createElement("div",{key:ke},o.createElement(S.Z,null,ze.level,": ",ze.type),o.createElement(E.Z,{ml:2},ze.message))))))}var yr=e(72847);function pn(A){return o.createElement(o.Fragment,null,o.createElement(oe.Z,{variant:"h2"},"Entity as YAML"),o.createElement(oe.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),o.createElement(oe.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(Ue.CodeSnippet,{text:yr.ZP.stringify(Fr(A.entity)),language:"yaml",showCopyCodeButton:!0}))))}const Ln=(0,Xe.Z)(A=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:A.palette.background.paper},tabs:{borderRight:`1px solid ${A.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function yn(A){const{children:T,value:N,index:W,...Y}=A,X=Ln();return o.createElement("div",{role:"tabpanel",hidden:N!==W,id:`vertical-tabpanel-${W}`,"aria-labelledby":`vertical-tab-${W}`,className:X.tabContents,...Y},N===W&&o.createElement(E.Z,{pl:3,pr:3},T))}function Kn(A){return{id:`vertical-tab-${A}`,"aria-controls":`vertical-tabpanel-${A}`}}function Ur(A){const T=Ln(),[N,W]=o.useState(0);return(0,o.useEffect)(()=>{W(0)},[A.open]),A.entity?o.createElement(gn.Z,{fullWidth:!0,maxWidth:"xl",open:A.open,onClose:A.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:T.fullHeightDialog}},o.createElement(w.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),o.createElement(g.Z,{dividers:!0},o.createElement("div",{className:T.root},o.createElement(C.Z,{orientation:"vertical",variant:"scrollable",value:N,onChange:(Y,X)=>W(X),"aria-label":"Inspector options",className:T.tabs},o.createElement(F.Z,{label:"Overview",...Kn(0)}),o.createElement(F.Z,{label:"Ancestry",...Kn(1)}),o.createElement(F.Z,{label:"Colocated",...Kn(2)}),o.createElement(F.Z,{label:"Raw JSON",...Kn(3)}),o.createElement(F.Z,{label:"Raw YAML",...Kn(4)})),o.createElement(yn,{value:N,index:0},o.createElement($r,{entity:A.entity})),o.createElement(yn,{value:N,index:1},o.createElement(cr,{entity:A.entity})),o.createElement(yn,{value:N,index:2},o.createElement(Dr,{entity:A.entity})),o.createElement(yn,{value:N,index:3},o.createElement(Br,{entity:A.entity})),o.createElement(yn,{value:N,index:4},o.createElement(pn,{entity:A.entity})))),o.createElement(V.Z,null,o.createElement(y.Z,{onClick:A.onClose,color:"primary"},"Close"))):null}var Nr=e(85256);function Er(A){var Ot;const T=(0,t.useApi)(c),N=(Ot=A.metadata.annotations)==null?void 0:Ot[Ie.q1],W=A.metadata.uid,Y=N==="bootstrap:bootstrap",X=(0,We.default)(async()=>{const rt=T.getLocationByRef(N);let je;if(!N)je=Promise.resolve([]);else{const Bt=`metadata.annotations.${Ie.q1}`;je=T.getEntities({filter:{[Bt]:N},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(fn=>fn.items)}return Promise.all([rt,je]).then(([Bt,fn])=>({location:Bt,colocatedEntities:fn}))},[T,A]),ge=(0,o.useCallback)(async function(){const{location:je}=X.value;await T.removeLocationById(je.id)},[T,X]),Ae=(0,o.useCallback)(async function(){await T.removeEntityByUid(W)},[T,W]);if(Y)return{type:"bootstrap",location:N,deleteEntity:Ae};const{loading:Ne,error:De,value:Ze}=X;if(Ne)return{type:"loading"};if(De)return{type:"error",error:De};const{location:ze,colocatedEntities:ke}=Ze;return ze?{type:"unregister",location:N,colocatedEntities:ke.map(Ie.iB),unregisterLocation:ge,deleteEntity:Ae}:{type:"only-delete",deleteEntity:Ae}}var vr=e(10179);const Zr=(0,Xe.Z)({advancedButton:{fontSize:"0.7em"}}),Ar=({entity:A,onConfirm:T})=>{var Ot;const N=(0,t.useApi)(t.alertApiRef),W=(0,t.useApi)(t.configApiRef),Y=Zr(),X=Er(A),[ge,Ae]=(0,o.useState)(!1),[Ne,De]=(0,o.useState)(!1),Ze=(Ot=W.getOptionalString("app.title"))!=null?Ot:"Backstage",ze=(0,o.useCallback)(async function(){if("unregisterLocation"in X){De(!0);try{await X.unregisterLocation(),T()}catch(je){(0,vr.BD)(je),N.post({message:je.message})}finally{De(!1)}}},[N,T,X]),ke=(0,o.useCallback)(async function(){if("deleteEntity"in X){De(!0);try{await X.deleteEntity(),T()}catch(je){(0,vr.BD)(je),N.post({message:je.message})}finally{De(!1)}}},[N,T,X]);return X.type==="loading"?o.createElement(Ue.Progress,null):X.type==="error"?o.createElement(Ue.ResponseErrorPanel,{error:X.error}):X.type==="bootstrap"?o.createElement(o.Fragment,null,o.createElement(ur.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',X.location,'"). If you believe this is in error, please contact the ',Ze," ","integrator."),o.createElement(E.Z,{marginTop:2},!ge&&o.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:Y.advancedButton,onClick:()=>Ae(!0)},"Advanced Options"),ge&&o.createElement(o.Fragment,null,o.createElement(oe.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."),o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:ke},"Delete Entity")))):X.type==="only-delete"?o.createElement(o.Fragment,null,o.createElement(oe.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."),o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:ke},"Delete Entity")):X.type==="unregister"?o.createElement(o.Fragment,null,o.createElement(oe.Z,null,"This action will unregister the following entities:"),o.createElement(oe.Z,{component:"ul"},X.colocatedEntities.map(rt=>o.createElement("li",{key:`${rt.kind}:${rt.namespace}/${rt.name}`},o.createElement(Q,{entityRef:rt})))),o.createElement(oe.Z,null,"Located at the following location:"),o.createElement(oe.Z,{component:"ul"},o.createElement("li",null,X.location)),o.createElement(oe.Z,null,"To undo, just re-register the entity in ",Ze,"."),o.createElement(E.Z,{marginTop:2},o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:ze},"Unregister Location"),!ge&&o.createElement(E.Z,{component:"span",marginLeft:2},o.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:Y.advancedButton,onClick:()=>Ae(!0)},"Advanced Options"))),ge&&o.createElement(o.Fragment,null,o.createElement(E.Z,{paddingTop:4,paddingBottom:4},o.createElement(Nr.Z,null)),o.createElement(oe.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."),o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:ke},"Delete Entity"))):o.createElement(ur.Z,{severity:"error"},"Internal error: Unknown state")},tr=A=>{const{open:T,onConfirm:N,onClose:W,entity:Y}=A;return o.createElement(gn.Z,{open:T,onClose:W},o.createElement(w.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),o.createElement(g.Z,null,o.createElement(Ar,{entity:Y,onConfirm:N})),o.createElement(V.Z,null,o.createElement(y.Z,{onClick:W,color:"primary"},"Cancel")))};var la=e(12231),zr=e(9520),I=e(47603);const k=(0,Xe.Z)(A=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:A.spacing(1,0,1,0)},title:{margin:A.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:A.palette.text.primary},menuItem:{minHeight:A.spacing(6)},groupWrapper:{margin:A.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function me(A){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:I.Z},{id:"starred",label:"Starred",icon:Lt.Z}]},{name:A!=null?A:"Company",items:[{id:"all",label:"All"}]}]}const Me=A=>{var Yn;const{initialFilter:T,availableFilters:N}=A,W=k(),X=(Yn=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?Yn:"Company",{filters:ge,updateFilters:Ae,backendEntities:Ne,queryParameters:{kind:De,user:Ze},loading:ze}=be(),ke=["starred","all"],Ot=me(X).map(Cn=>({...Cn,items:Cn.items.filter(({id:xn})=>["group","user"].some(Hr=>Hr===De)?ke.includes(xn):!N||N.includes(xn))})).filter(({items:Cn})=>!!Cn.length),{isStarredEntity:rt}=Pt(),{isOwnedEntity:je,loading:Bt}=dn(),fn=ze||Bt,kn=(0,o.useMemo)(()=>new Qe("owned",je,rt),[je,rt]),On=(0,o.useMemo)(()=>new Qe("starred",je,rt),[je,rt]),En=(0,o.useMemo)(()=>[Ze].flat()[0],[Ze]),[Sn,$n]=(0,o.useState)(En!=null?En:T),Rr=(0,o.useMemo)(()=>Ne.filter(At((0,Re.compact)(Object.values({...ge,user:void 0})))),[ge,Ne]),Wr=(0,o.useMemo)(()=>({all:Rr.length,starred:Rr.filter(Cn=>On.filterEntity(Cn)).length,owned:Rr.filter(Cn=>kn.filterEntity(Cn)).length}),[Rr,On,kn]);return(0,o.useEffect)(()=>{En&&$n(En)},[En]),(0,o.useEffect)(()=>{!fn&&!!Sn&&Sn!=="all"&&Wr[Sn]===0&&$n("all")},[fn,Wr,Sn,$n]),(0,o.useEffect)(()=>{Ae({user:Sn?new Qe(Sn,je,rt):void 0})},[Sn,je,rt,Ae]),o.createElement(dr.Z,{className:W.root},Ot.map(Cn=>o.createElement(o.Fragment,{key:Cn.name},o.createElement(S.Z,{variant:"subtitle2",component:"span",className:W.title},Cn.name),o.createElement(dr.Z,{className:W.groupWrapper},o.createElement(jn.Z,{disablePadding:!0,dense:!0,role:"menu","aria-label":Cn.name},Cn.items.map(xn=>{var Hr,ca;return o.createElement(la.Z,{role:"none presentation",key:xn.id,button:!0,divider:!0,onClick:()=>$n(xn.id),selected:xn.id===((Hr=ge.user)==null?void 0:Hr.value),className:W.menuItem,disabled:Wr[xn.id]===0,"data-testid":`user-picker-${xn.id}`,tabIndex:0,ContainerProps:{role:"menuitem"}},xn.icon&&o.createElement(qn.Z,{className:W.listIcon},o.createElement(xn.icon,{fontSize:"small"})),o.createElement(Ir.Z,null,o.createElement(S.Z,{variant:"body1"},xn.label," ")),o.createElement(zr.Z,null,(ca=Wr[xn.id])!=null?ca:"-"))}))))))},_e=(0,Xe.Z)({input:{}},{name:"CatalogReactEntityProcessingStatusPickerPicker"}),ft=o.createElement(qe.Z,{fontSize:"small"}),vt=o.createElement(Ke.Z,{fontSize:"small"}),Dt=()=>{const A=_e(),{updateFilters:T}=be(),[N,W]=(0,o.useState)([]);function Y(Ae){T({orphan:Ae?new Ge(Ae):void 0})}function X(Ae){T({error:Ae?new gt(Ae):void 0})}const ge=["Is Orphan","Has Error"];return o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Processing Status",o.createElement(St.ZP,{multiple:!0,options:ge,value:N,onChange:(Ae,Ne)=>{W(Ne),Y(Ne.includes("Is Orphan")),X(Ne.includes("Has Error"))},renderOption:(Ae,{selected:Ne})=>o.createElement(ue.Z,{control:o.createElement(j.Z,{icon:ft,checkedIcon:vt,checked:Ne}),label:Ae}),size:"small",popupIcon:o.createElement(st.Z,{"data-testid":"processing-status-picker-expand"}),renderInput:Ae=>o.createElement(ye.Z,{...Ae,className:A.input,variant:"outlined"})})))},dt=({children:A,value:T})=>{var Ae;const[N,W]=useState((Ae=T==null?void 0:T.filters)!=null?Ae:{}),Y=useCallback(Ne=>{W(De=>{const Ze=typeof Ne=="function"?Ne(De):Ne;return{...De,...Ze}})},[]),X=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),ge=useMemo(()=>{var Ne,De,Ze,ze,ke;return{entities:(Ne=T==null?void 0:T.entities)!=null?Ne:X.entities,backendEntities:(De=T==null?void 0:T.backendEntities)!=null?De:X.backendEntities,updateFilters:(Ze=T==null?void 0:T.updateFilters)!=null?Ze:Y,filters:N,loading:(ze=T==null?void 0:T.loading)!=null?ze:!1,queryParameters:(ke=T==null?void 0:T.queryParameters)!=null?ke:X.queryParameters,error:T==null?void 0:T.error}},[T,X,N,Y]);return React.createElement(EntityListContext.Provider,{value:ge},A)}},39398:function(ne,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return Be},AboutContent:function(){return Re},AboutField:function(){return M}});var r=e(48023),t=e(82339),c=e(36964),i=e(36356),R=e(17429),f=e(79692),o=e(94339),u=e(32552),m=e(61837),y=e(85256),h=e(24579),E=e(52866),S=e(30254),b=e(27604),L=e(2784),$=e(47851),B=e(60905),D=e(90436),x=e(7089);const O=(0,f.Z)(He=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:He.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function M(He){const{label:ve,value:Je,gridSizes:tt,children:Tt}=He,At=O(),Ie=(0,c.useElementFilter)(Tt,ht=>ht.getElements()),mt=Ie.length>0?Ie:L.createElement(D.Z,{variant:"body2",className:At.value},Je||"unknown");return L.createElement(B.Z,{item:!0,...tt},L.createElement(D.Z,{variant:"h2",className:At.label},ve),mt)}var K=e(45915);const re=(0,f.Z)({description:{wordBreak:"break-word"}});function le(He,ve,Je){if(ve==="url"||He.includes("://"))return He;const tt=Je.type==="file"?`file://${Je.target}`:Je.target;return ve==="file"||Je.type==="file"?new URL(He,tt).href:tt}function Re(He){var at,yt,se,ae,Ye,Ve,Ue,nt;const{entity:ve}=He,Je=re(),tt=ve.kind.toLocaleLowerCase("en-US")==="system",Tt=ve.kind.toLocaleLowerCase("en-US")==="resource",At=ve.kind.toLocaleLowerCase("en-US")==="component",Ie=ve.kind.toLocaleLowerCase("en-US")==="api",mt=ve.kind.toLocaleLowerCase("en-US")==="template",ht=ve.kind.toLocaleLowerCase("en-US")==="location",lt=ve.kind.toLocaleLowerCase("en-US")==="group",ee=(0,R.getEntityRelations)(ve,r.cz,{kind:"system"}),pe=(0,R.getEntityRelations)(ve,r.cz,{kind:"component"}),be=(0,R.getEntityRelations)(ve,r.cz,{kind:"domain"}),We=(0,R.getEntityRelations)(ve,r.S4);let et;try{et=(0,r.CV)(ve)}catch{et=void 0}return L.createElement(B.Z,{container:!0},L.createElement(M,{label:"Description",gridSizes:{xs:12}},L.createElement(D.Z,{variant:"body2",paragraph:!0,className:Je.description},((at=ve==null?void 0:ve.metadata)==null?void 0:at.description)||"No description")),L.createElement(M,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},We.length>0&&L.createElement(R.EntityRefLinks,{entityRefs:We,defaultKind:"group"})),(tt||be.length>0)&&L.createElement(M,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},be.length>0&&L.createElement(R.EntityRefLinks,{entityRefs:be,defaultKind:"domain"})),(Ie||At||Tt||ee.length>0)&&L.createElement(M,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},ee.length>0&&L.createElement(R.EntityRefLinks,{entityRefs:ee,defaultKind:"system"})),At&&pe.length>0&&L.createElement(M,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},L.createElement(R.EntityRefLinks,{entityRefs:pe,defaultKind:"component"})),(Ie||At||Tt||mt||lt||ht||typeof((yt=ve==null?void 0:ve.spec)==null?void 0:yt.type)=="string")&&L.createElement(M,{label:"Type",value:(se=ve==null?void 0:ve.spec)==null?void 0:se.type,gridSizes:{xs:12,sm:6,lg:4}}),(Ie||At||typeof((ae=ve==null?void 0:ve.spec)==null?void 0:ae.lifecycle)=="string")&&L.createElement(M,{label:"Lifecycle",value:(Ye=ve==null?void 0:ve.spec)==null?void 0:Ye.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),L.createElement(M,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((Ve=ve==null?void 0:ve.metadata)==null?void 0:Ve.tags)||[]).map(Q=>L.createElement(x.Z,{key:Q,size:"small",label:Q}))),ht&&(((Ue=ve==null?void 0:ve.spec)==null?void 0:Ue.targets)||((nt=ve==null?void 0:ve.spec)==null?void 0:nt.target))&&L.createElement(M,{label:"Targets",gridSizes:{xs:12}},L.createElement(K.s,{cols:1,items:(ve.spec.targets||[ve.spec.target]).map(Q=>Q).map(Q=>{var z;return{text:Q,href:le(Q,((z=ve==null?void 0:ve.spec)==null?void 0:z.type)||"unknown",et)}})})))}const Fe=(0,f.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 Be(He){var se,ae,Ye;const{variant:ve}=He,Je=Fe(),{entity:tt}=(0,R.useEntity)(),Tt=(0,c.useApi)(i.q3),At=(0,c.useApi)(R.catalogApiRef),Ie=(0,c.useApi)(c.alertApiRef),mt=(0,c.useRouteRef)($.jU),ht=(0,R.getEntitySourceLocation)(tt,Tt),lt=(se=tt.metadata.annotations)==null?void 0:se[r.Tf],ee={label:"View Source",disabled:!ht,icon:L.createElement(i.nW,{type:ht==null?void 0:ht.integrationType}),href:ht==null?void 0:ht.locationTargetUrl},pe={label:"View TechDocs",disabled:!((ae=tt.metadata.annotations)!=null&&ae["backstage.io/techdocs-ref"])||!mt,icon:L.createElement(S.Z,null),href:mt&&mt({namespace:tt.metadata.namespace||r.zG,kind:tt.kind,name:tt.metadata.name})};let be="";ve==="gridItem"?be=Je.gridItemCard:ve==="fullHeight"&&(be=Je.fullHeightCard);let We="";ve==="gridItem"?We=Je.gridItemCardContent:ve==="fullHeight"&&(We=Je.fullHeightCardContent);const et=(Ye=tt.metadata.annotations)==null?void 0:Ye[r.P1],at=(et==null?void 0:et.startsWith("url:"))||(et==null?void 0:et.startsWith("file:")),yt=(0,L.useCallback)(async()=>{await At.refreshEntity((0,r.eE)(tt)),Ie.post({message:"Refresh scheduled",severity:"info"})},[At,Ie,tt]);return L.createElement(o.Z,{className:be},L.createElement(u.Z,{title:"About",action:L.createElement(L.Fragment,null,at&&L.createElement(m.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:yt},L.createElement(E.Z,null)),L.createElement(m.Z,{component:t.Link,"aria-label":"Edit",disabled:!lt,title:"Edit Metadata",to:lt!=null?lt:"#"},L.createElement(b.Z,null))),subheader:L.createElement(t.HeaderIconLinkRow,{links:[ee,pe]})}),L.createElement(y.Z,null),L.createElement(h.Z,{className:We},L.createElement(Re,{entity:tt})))}},49782:function(ne,s,e){"use strict";e.d(s,{K:function(){return E}});var r=e(2784),t=e(79692),c=e(12420),i=e(97580),R=e(73698),f=e(74603),o=e(12231),u=e(17429),m=e(64279),y=e(36964);const h=(0,t.Z)(S=>(0,c.Z)({root:{...S.typography.h4}}));function E(S){var Fe;const{initialFilter:b="component",allowedKinds:L}=S,$=h(),B=(0,y.useApi)(u.catalogApiRef),{value:D}=(0,m.default)(async()=>await B.getEntityFacets({facets:["kind"]}).then(Be=>{var He;return((He=Be.facets.kind)==null?void 0:He.map(ve=>ve.value).sort())||[]})),{updateFilters:x,queryParameters:{kind:O}}=(0,u.useEntityList)(),M=(0,r.useMemo)(()=>{var Be;return(Be=[O].flat()[0])==null?void 0:Be.toLocaleLowerCase("en-US")},[O]),[K,re]=(0,r.useState)(M!=null?M:b);(0,r.useEffect)(()=>{x({kind:K?new u.EntityKindFilter(K):void 0})},[K,x]),(0,r.useEffect)(()=>{M&&re(M)},[M]);const Re=[(0,i.Z)(K)].concat((Fe=D==null?void 0:D.filter(Be=>L?L.some(He=>He.toLocaleLowerCase("en-US")===Be.toLocaleLowerCase("en-US")):!0))!=null?Fe:[]).sort().reduce((Be,He)=>(Be[He.toLocaleLowerCase("en-US")]=He,Be),{});return r.createElement(R.Z,{input:r.createElement(f.Z,{value:K}),value:K,onChange:Be=>re(Be.target.value),classes:$},Object.keys(Re).map(Be=>r.createElement(o.Z,{value:Be,key:Be},`${Re[Be]}s`)))}},30097:function(ne,s,e){"use strict";e.d(s,{E:function(){return L}});var r=e(48023),t=e(82339),c=e(17429),i=e(90436),R=e(15459),f=e(27604),o=e(2997),u=e(11640),m=e(28347),y=e(76635),h=e(2784),E=e(7089);const S=Object.freeze({createNameColumn($){function B(D){var x;return((x=D.metadata)==null?void 0:x.title)||(0,c.humanizeEntityRef)(D,{defaultKind:$==null?void 0:$.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:D},{entity:x}){return B(D).localeCompare(B(x))},render:({entity:D})=>{var x;return h.createElement(c.EntityRefLink,{entityRef:D,defaultKind:($==null?void 0:$.defaultKind)||"Component",title:(x=D.metadata)==null?void 0:x.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:$})=>h.createElement(c.EntityRefLinks,{entityRefs:$.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:$})=>h.createElement(c.EntityRefLinks,{entityRefs:$.ownedByRelations,defaultKind:"group"})}},createSpecTargetsColumn(){return{title:"Targets",field:"entity.spec.targets",render:({entity:$})=>{var B,D;return h.createElement(h.Fragment,null,(((B=$==null?void 0:$.spec)==null?void 0:B.targets)||((D=$==null?void 0:$.spec)==null?void 0:D.target))&&h.createElement(t.OverflowTooltip,{text:($.spec.targets||[$.spec.target]).join(", "),placement:"bottom-start"}))}}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0,width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:$})=>h.createElement(t.OverflowTooltip,{text:$.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:$})=>h.createElement(h.Fragment,null,$.metadata.tags&&$.metadata.tags.map(B=>h.createElement(E.Z,{key:B,label:B,size:"small",variant:"outlined",style:{marginBottom:"0px"}}))),width:"auto"}},createTitleColumn($){return{title:"Title",field:"entity.metadata.title",hidden:$==null?void 0:$.hidden,searchable:!0}}}),b=(0,R.Z)({root:{color:"#f3ba37"}})(u.Z),L=$=>{var Ie,mt,ht;const{columns:B,actions:D,tableOptions:x,subtitle:O}=$,{isStarredEntity:M,toggleStarredEntity:K}=(0,c.useStarredEntities)(),{loading:re,error:le,entities:Re,filters:Fe}=(0,c.useEntityList)(),Be=(0,h.useMemo)(()=>{var ee;return[S.createTitleColumn({hidden:!0}),S.createNameColumn({defaultKind:(ee=Fe.kind)==null?void 0:ee.value}),...lt(),S.createMetadataDescriptionColumn(),S.createTagsColumn()];function lt(){var pe;switch((pe=Fe.kind)==null?void 0:pe.value){case"user":return[];case"domain":case"system":return[S.createOwnerColumn()];case"group":case"template":return[S.createSpecTypeColumn()];case"location":return[S.createSpecTypeColumn(),S.createSpecTargetsColumn()];default:return[S.createSystemColumn(),S.createOwnerColumn(),S.createSpecTypeColumn(),S.createSpecLifecycleColumn()]}}},[(Ie=Fe.kind)==null?void 0:Ie.value]),He=Fe.type===void 0,ve=(0,y.capitalize)((ht=(mt=Fe.user)==null?void 0:mt.value)!=null?ht:"all");if(le)return h.createElement("div",null,h.createElement(t.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},h.createElement(t.CodeSnippet,{language:"text",text:le.toString()})));const Je=[({entity:lt})=>{var be;const ee=(be=lt.metadata.annotations)==null?void 0:be[r.l2],pe="View";return{icon:()=>h.createElement(h.Fragment,null,h.createElement(i.Z,{variant:"srOnly"},pe),h.createElement(o.Z,{fontSize:"small"})),tooltip:pe,disabled:!ee,onClick:()=>{!ee||window.open(ee,"_blank")}}},({entity:lt})=>{var be;const ee=(be=lt.metadata.annotations)==null?void 0:be[r.Tf],pe="Edit";return{icon:()=>h.createElement(h.Fragment,null,h.createElement(i.Z,{variant:"srOnly"},pe),h.createElement(f.Z,{fontSize:"small"})),tooltip:pe,disabled:!ee,onClick:()=>{!ee||window.open(ee,"_blank")}}},({entity:lt})=>{const ee=M(lt),pe=ee?"Remove from favorites":"Add to favorites";return{cellStyle:{paddingLeft:"1em"},icon:()=>h.createElement(h.Fragment,null,h.createElement(i.Z,{variant:"srOnly"},pe),ee?h.createElement(b,null):h.createElement(m.Z,null)),tooltip:pe,onClick:()=>K(lt)}}],tt=Re.map(lt=>{const ee=(0,c.getEntityRelations)(lt,r.cz,{kind:"system"}),pe=(0,c.getEntityRelations)(lt,r.S4);return{entity:lt,resolved:{name:(0,c.humanizeEntityRef)(lt,{defaultKind:"Component"}),ownedByRelationsTitle:pe.map(be=>(0,c.humanizeEntityRef)(be,{defaultKind:"group"})).join(", "),ownedByRelations:pe,partOfSystemRelationTitle:ee.map(be=>(0,c.humanizeEntityRef)(be,{defaultKind:"system"})).join(", "),partOfSystemRelations:ee}}}),Tt=(B||Be).find(lt=>lt.title==="Type");Tt&&(Tt.hidden=!He);const At=tt.length>20;return h.createElement(t.Table,{isLoading:re,columns:B||Be,options:{paging:At,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!re,padding:"dense",pageSizeOptions:[20,50,100],...x},title:`${ve} (${Re.length})`,data:tt,actions:D||Je,subtitle:O})};L.columns=S},45915:function(ne,s,e){"use strict";e.d(s,{s:function(){return b}});var r=e(90348),t=e(11861),c=e(2784),i=e(79692),R=e(95544),f=e(90436),o=e(52160),u=e(82339);const m=(0,i.Z)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function y(L){const{href:$,text:B,Icon:D}=L,x=m();return c.createElement(R.Z,{display:"flex"},c.createElement(R.Z,{mr:1,className:x.svgIcon},c.createElement(f.Z,{component:"div"},D?c.createElement(D,null):c.createElement(o.Z,null))),c.createElement(R.Z,{flexGrow:"1"},c.createElement(u.Link,{to:$,target:"_blank",rel:"noopener"},B||$)))}var h=e(41156);const E={xs:1,sm:1,md:1,lg:2,xl:3};function S(L){var D,x;const $=[(0,h.Z)(O=>O.breakpoints.up("xl"))?"xl":null,(0,h.Z)(O=>O.breakpoints.up("lg"))?"lg":null,(0,h.Z)(O=>O.breakpoints.up("md"))?"md":null,(0,h.Z)(O=>O.breakpoints.up("sm"))?"sm":null,(0,h.Z)(O=>O.breakpoints.up("xs"))?"xs":null];let B=1;if(typeof L=="number")B=L;else{const O=(D=$.find(M=>M!==null))!=null?D:"xs";B=(x=L==null?void 0:L[O])!=null?x:E[O]}return B}function b(L){const{items:$,cols:B=void 0}=L,D=S(B);return c.createElement(r.Z,{rowHeight:"auto",cols:D},$.map(({text:x,href:O,Icon:M},K)=>c.createElement(t.Z,{key:K},c.createElement(y,{href:O,text:x!=null?x:O,Icon:M}))))}},47851:function(ne,s,e){"use strict";e.d(s,{_Z:function(){return i},jU:function(){return c},yw:function(){return t}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),c=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),i=(0,r.createRouteRef)({id:"catalog"})},40749:function(ne,s,e){"use strict";e.d(s,{rG:function(){return r},Y2:function(){return x},J$:function(){return m},g2:function(){return c}});var r;(function(O){const M="DENY";O.DENY=M;const K="ALLOW";O.ALLOW=K;const re="CONDITIONAL";O.CONDITIONAL=re})(r||(r={}));function t(O,M){return O.name===M.name}function c(O,M){return"resourceType"in O?!M||O.resourceType===M:!1}function i(O){return O.attributes.action==="create"}function R(O){return O.attributes.action==="read"}function f(O){return O.attributes.action==="update"}function o(O){return O.attributes.action==="delete"}function u(O){return{authorize:async(M,K)=>await O.authorize(M,K),authorizeConditional(M,K){const re=M;return O.authorize(re,K)}}}function m({name:O,attributes:M,resourceType:K}){return K?{type:"resource",name:O,attributes:M,resourceType:K}:{type:"basic",name:O,attributes:M}}var y=e(10179),h=e(96279),E=e.n(h),S=e(9571),b=e(30195);const L=b.z.lazy(()=>b.z.object({rule:b.z.string(),resourceType:b.z.string(),params:b.z.array(b.z.unknown())}).or(b.z.object({anyOf:b.z.array(L).nonempty()})).or(b.z.object({allOf:b.z.array(L).nonempty()})).or(b.z.object({not:L}))),$=b.z.object({result:b.z.literal(r.ALLOW).or(b.z.literal(r.DENY))}),B=b.z.union([b.z.object({result:b.z.literal(r.ALLOW).or(b.z.literal(r.DENY))}),b.z.object({result:b.z.literal(r.CONDITIONAL),pluginId:b.z.string(),resourceType:b.z.string(),conditions:L})]),D=(O,M)=>b.z.object({items:b.z.array(b.z.intersection(b.z.object({id:b.z.string()}),O)).refine(K=>K.length===M.size&&K.every(({id:re})=>M.has(re)),{message:"Items in response do not match request"})});class x{constructor(M){q(this,"enabled");q(this,"discovery");var K;this.discovery=M.discovery,this.enabled=(K=M.config.getOptionalBoolean("permission.enabled"))!=null?K:!1}async authorize(M,K){return this.makeRequest(M,$,K)}async authorizeConditional(M,K){return this.makeRequest(M,B,K)}async makeRequest(M,K,re){if(!this.enabled)return M.map(Je=>({result:r.ALLOW}));const le={items:M.map(Je=>({id:S.Z(),...Je}))},Re=await this.discovery.getBaseUrl("permission"),Fe=await E()(`${Re}/authorize`,{method:"POST",body:JSON.stringify(le),headers:{...this.getAuthorizationHeader(re==null?void 0:re.token),"content-type":"application/json"}});if(!Fe.ok)throw await y.VL.fromResponse(Fe);const Be=await Fe.json(),ve=D(K,new Set(le.items.map(({id:Je})=>Je))).parse(Be).items.reduce((Je,tt)=>(Je[tt.id]=tt,Je),{});return le.items.map(Je=>ve[Je.id])}getAuthorizationHeader(M){return M?{Authorization:`Bearer ${M}`}:{}}}},68099:function(ne,s,e){"use strict";e.d(s,{iM:function(){return R},RV:function(){return c},gI:function(){return o}});var r=e(2784),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.permission.api"});var i=e(40749);class R{constructor(y,h){this.permissionClient=y,this.identityApi=h}static create(y){const{config:h,discovery:E,identity:S}=y,b=new i.Y2({discovery:E,config:h});return new R(b,S)}async authorize(y){return(await this.permissionClient.authorize([y],await this.identityApi.getCredentials()))[0]}}var f=e(49857);function o(m){const y=(0,t.useApi)(c),{data:h,error:E}=(0,f.ZP)(m,async S=>{if((0,i.g2)(S.permission)&&!S.resourceRef)return i.rG.DENY;const{result:b}=await y.authorize(S);return b});return E?{error:E,loading:!1,allowed:!1}:h===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:h===i.rG.ALLOW}}const u=m=>{const{permission:y,resourceRef:h,errorComponent:E,...S}=m,b=usePermission(isResourcePermission(y)?{permission:y,resourceRef:h}:{permission:y}),L=useApp(),{NotFoundErrorPage:$}=L.getComponents();let B=E===void 0?React.createElement($,null):E;return b.loading?B=null:b.allowed&&(B=m.element),React.createElement(Route,{...S,element:B})}},74450:function(ne,s,e){"use strict";e.d(s,{FA:function(){return o},Nd:function(){return K},Rx:function(){return x}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.search.queryservice"});class c{constructor(ae){this.mockedResults=ae}query(){return Promise.resolve(this.mockedResults||{results:[]})}}var i=e(2784),R=e(79692);const f=(0,R.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),o=({text:se,preTag:ae,postTag:Ye})=>{const Ve=f(),Ue=(0,i.useMemo)(()=>se.split(new RegExp(`(${ae}.+?${Ye})`)),[Ye,ae,se]);return i.createElement(i.Fragment,null,Ue.map((nt,Q)=>nt.includes(ae)?i.createElement("mark",{className:Ve.highlight,key:Q},nt.replace(new RegExp(`${ae}|${Ye}`,"g"),"")):nt))};var u=e(42494),m=e(84899),y=e(5806),h=e(21324),E=e(56939),S=e(73698),b=e(12231),L=e(76241),$=e(64279),B=e(1849);const D=(0,L.CT)("search-context"),x=()=>{const se=(0,i.useContext)(D);if(!se)throw new Error("useSearch must be used within a SearchContextProvider");const ae=se.atVersion(1);if(!ae)throw new Error("No SearchContext v1 found");return ae},O=()=>useContext(D)!==void 0,M={term:"",pageCursor:void 0,filters:{},types:[]},K=se=>{var xt,bt,Pt,Vt;const{initialState:ae=M,children:Ye}=se,Ve=(0,r.useApi)(t),[Ue,nt]=(0,i.useState)(ae.pageCursor),[Q,z]=(0,i.useState)(ae.filters),[_,ce]=(0,i.useState)(ae.term),[fe,Pe]=(0,i.useState)(ae.types),Oe=(0,B.Z)(_),Se=(0,$.default)(()=>Ve.query({term:_,filters:Q,pageCursor:Ue,types:fe}),[_,Q,fe,Ue]),Qe=!Se.loading&&!Se.error&&((xt=Se.value)==null?void 0:xt.nextPageCursor),Ge=!Se.loading&&!Se.error&&((bt=Se.value)==null?void 0:bt.previousPageCursor),gt=(0,i.useCallback)(()=>{var Gt;nt((Gt=Se.value)==null?void 0:Gt.nextPageCursor)},[(Pt=Se.value)==null?void 0:Pt.nextPageCursor]),Rt=(0,i.useCallback)(()=>{var Gt;nt((Gt=Se.value)==null?void 0:Gt.previousPageCursor)},[(Vt=Se.value)==null?void 0:Vt.previousPageCursor]);(0,i.useEffect)(()=>{Oe!==void 0&&_!==Oe&&nt(void 0)},[_,Oe,nt]);const ut={result:Se,filters:Q,setFilters:z,term:_,setTerm:ce,types:fe,setTypes:Pe,pageCursor:Ue,setPageCursor:nt,fetchNextPage:Qe?gt:void 0,fetchPreviousPage:Ge?Rt:void 0},Ft=(0,L.EI)({1:ut});return i.createElement(r.AnalyticsContext,{attributes:{searchTypes:fe.sort().join(",")}},i.createElement(D.Provider,{value:Ft,children:Ye}))};var re=e(86619),le=e(7089),Re=e(88013),Fe=e(69294),Be=e(48760);const He=(se,ae,Ye=[],Ve=250)=>{const Ue=(0,i.useRef)({}),nt=se||(()=>Promise.resolve([])),[Q,z]=(0,Fe.default)(nt,[ae],{loading:!0});if((0,Be.Z)(()=>{Ue.current[ae]===void 0&&(Ue.current[ae]=z(ae).then(ce=>(Ue.current[ae]=ce,ce)))},Ve,[z,ae]),Ye.length)return{loading:!1,value:Ye};const _=Ue.current[ae];return Array.isArray(_)?{loading:!1,value:_}:Q},ve=(se,ae)=>{const{setFilters:Ye}=x();(0,i.useEffect)(()=>{ae&&[ae].flat().length>0&&Ye(Ve=>({...Ve,[se]:ae}))},[])},Je=se=>{const{className:ae,defaultValue:Ye,name:Ve,values:Ue,valuesDebounceMs:nt,label:Q,filterSelectedOptions:z,limitTags:_,multiple:ce}=se,[fe,Pe]=(0,i.useState)("");ve(Ve,Ye);const Oe=typeof Ue=="function"?Ue:void 0,Se=typeof Ue=="function"?void 0:Ue,{value:Qe,loading:Ge}=He(Oe,fe,Se,nt),{filters:gt,setFilters:Rt}=x(),ut=gt[Ve]||(ce?[]:null),Ft=(Pt,Vt)=>{Rt(Gt=>{const{[Ve]:dn,...In}=Gt;return Vt?{...In,[Ve]:Vt}:{...In}})},xt=Pt=>i.createElement(re.Z,{...Pt,name:"search",variant:"outlined",label:Q,fullWidth:!0}),bt=(Pt,Vt)=>Pt.map((Gt,dn)=>i.createElement(le.Z,{label:Gt,color:"primary",...Vt({index:dn})}));return i.createElement(Re.ZP,{filterSelectedOptions:z,limitTags:_,multiple:ce,className:ae,id:`${ce?"multi-":""}select-filter-${Ve}--select`,options:Qe||[],loading:Ge,value:ut,onChange:Ft,onInputChange:(Pt,Vt)=>Pe(Vt),renderInput:xt,renderTags:bt})},tt=(0,R.Z)({label:{textTransform:"capitalize"}}),Tt=se=>{const{className:ae,defaultValue:Ye,label:Ve,name:Ue,values:nt=[],valuesDebounceMs:Q}=se,z=tt(),{filters:_,setFilters:ce}=x();ve(Ue,Ye);const fe=typeof nt=="function"?nt:void 0,Pe=typeof nt=="function"?void 0:nt,{value:Oe=[],loading:Se}=He(fe,"",Pe,Q),Qe=Ge=>{const{target:{value:gt,checked:Rt}}=Ge;ce(ut=>{const{[Ue]:Ft,...xt}=ut,bt=(Ft||[]).filter(Vt=>Vt!==gt),Pt=Rt?[...bt,gt]:bt;return Pt.length?{...xt,[Ue]:Pt}:xt})};return i.createElement(u.Z,{className:ae,disabled:Se,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},Ve?i.createElement(m.Z,{className:z.label},Ve):null,Oe.map(Ge=>{var gt;return i.createElement(y.Z,{key:Ge,control:i.createElement(h.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":Ge},value:Ge,name:Ge,onChange:Qe,checked:((gt=_[Ue])!=null?gt:[]).includes(Ge)}),label:Ge})}))},At=se=>{const{className:ae,defaultValue:Ye,label:Ve,name:Ue,values:nt,valuesDebounceMs:Q}=se,z=tt();ve(Ue,Ye);const _=typeof nt=="function"?nt:void 0,ce=typeof nt=="function"?void 0:nt,{value:fe=[],loading:Pe}=He(_,"",ce,Q),{filters:Oe,setFilters:Se}=x(),Qe=Ge=>{const{target:{value:gt}}=Ge;Se(Rt=>{const{[Ue]:ut,...Ft}=Rt;return gt?{...Ft,[Ue]:gt}:Ft})};return i.createElement(u.Z,{disabled:Pe,className:ae,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},Ve?i.createElement(E.Z,{className:z.label,margin:"dense"},Ve):null,i.createElement(S.Z,{variant:"outlined",value:Oe[Ue]||"",onChange:Qe},i.createElement(b.Z,{value:""},i.createElement("em",null,"All")),fe.map(Ge=>i.createElement(b.Z,{key:Ge,value:Ge},Ge))))},Ie=({component:se,...ae})=>i.createElement(se,{...ae});Ie.Checkbox=se=>i.createElement(Ie,{...se,component:Tt}),Ie.Select=se=>i.createElement(Ie,{...se,component:At}),Ie.Autocomplete=se=>i.createElement(Ie,{...se,component:Je});var mt=e(82339);const ht=({children:se})=>{const{result:{loading:ae,error:Ye,value:Ve}}=useSearch();return ae?React.createElement(Progress,null):Ye?React.createElement(ResponseErrorPanel,{title:"Error encountered while fetching search results",error:Ye}):Ve!=null&&Ve.results.length?React.createElement(React.Fragment,null,se({results:Ve.results})):React.createElement(EmptyState,{missing:"data",title:"Sorry, no results were found"})},lt=se=>React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchResult"}},React.createElement(ht,{...se})),ee=(0,R.Z)(se=>({root:{display:"flex",justifyContent:"space-between",gap:se.spacing(2),margin:se.spacing(2,0)}})),pe=()=>{const{fetchNextPage:se,fetchPreviousPage:ae}=useSearch(),Ye=ee();return!se&&!ae?React.createElement(React.Fragment,null):React.createElement("nav",{"arial-label":"pagination navigation",className:Ye.root},React.createElement(Button,{"aria-label":"previous page",disabled:!ae,onClick:ae,startIcon:React.createElement(ArrowBackIosIcon,null)},"Previous"),React.createElement(Button,{"aria-label":"next page",disabled:!se,onClick:se,endIcon:React.createElement(ArrowForwardIosIcon,null)},"Next"))},be=({children:se})=>{const ae=useAnalytics(),{term:Ye}=useSearch();return useEffect(()=>{Ye&&ae.captureEvent("search",Ye)},[ae,Ye]),React.createElement(React.Fragment,null,se)},We=({onChange:se,onKeyDown:ae,onSubmit:Ye,debounceTime:Ve=200,clearButton:Ue=!0,fullWidth:nt=!0,value:Q,inputProps:z={},endAdornment:_,...ce})=>{const fe=useApi(configApiRef),[Pe,Oe]=useState(Q),Se=useSearchContextCheck();useEffect(()=>{Oe(bt=>bt!==Q?Q:bt)},[Q]),useDebounce(()=>se(Pe),Ve,[Pe]);const Qe=useCallback(bt=>{Oe(bt.target.value)},[Oe]),Ge=useCallback(bt=>{ae&&ae(bt),Ye&&bt.key==="Enter"&&Ye()},[ae,Ye]),gt=useCallback(()=>{se("")},[se]),Rt=`Search in ${fe.getOptionalString("app.title")||"Backstage"}`,ut=React.createElement(InputAdornment,{position:"start"},React.createElement(IconButton,{"aria-label":"Query",disabled:!0},React.createElement(SearchIcon,null))),Ft=React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"Clear",onClick:gt},React.createElement(ClearButton,null))),xt=React.createElement(TrackSearch,null,React.createElement(InputBase,{"data-testid":"search-bar-next",value:Pe,placeholder:Rt,startAdornment:ut,endAdornment:Ue?Ft:_,inputProps:{"aria-label":"Search",...z},fullWidth:nt,onChange:Qe,onKeyDown:Ge,...ce}));return Se?xt:React.createElement(SearchContextProvider,null,xt)},et=({onChange:se,...ae})=>{const{term:Ye,setTerm:Ve}=useSearch(),Ue=useCallback(nt=>{se?se(nt):Ve(nt)},[se,Ve]);return React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchBar"}},React.createElement(We,{value:Ye,onChange:Ue,...ae}))},at=({result:se,highlight:ae,rank:Ye,icon:Ve,secondaryAction:Ue,lineClamp:nt=5})=>{const Q=useAnalytics(),z=()=>{Q.captureEvent("discover",se.title,{attributes:{to:se.location},value:Ye})};return React.createElement(Link,{noTrack:!0,to:se.location,onClick:z},React.createElement(ListItem,{alignItems:"center"},Ve&&React.createElement(ListItemIcon,null,Ve),React.createElement(ListItemText,{primaryTypographyProps:{variant:"h6"},primary:ae!=null&&ae.fields.title?React.createElement(HighlightedSearchResultText,{text:ae.fields.title,preTag:ae.preTag,postTag:ae.postTag}):se.title,secondary:React.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:nt,overflow:"hidden"}},ae!=null&&ae.fields.text?React.createElement(HighlightedSearchResultText,{text:ae.fields.text,preTag:ae.preTag,postTag:ae.postTag}):se.text)}),Ue&&React.createElement(Box,{alignItems:"flex-end"},Ue)),React.createElement(Divider,null))},yt=se=>React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"DefaultResultListItem"}},React.createElement(at,{...se}))},56338:function(ne,s,e){"use strict";e.d(s,{Ox:function(){return ve},Zz:function(){return R},oZ:function(){return le},DR:function(){return f},ZS:function(){return K},VA:function(){return Tt},KY:function(){return u},gT:function(){return S},Dl:function(){return b},ux:function(){return tt},$L:function(){return E},x1:function(){return re}});var r=e(2784),t=e(10289),c=e(36964);const i="techdocs.addons.addon.v1",R="techdocs.addons.wrapper.v1",f=()=>null;(0,c.attachComponentData)(f,R,!0);const o=ee=>`${i}.${ee.toLocaleLowerCase("en-US")}`;function u(ee){const{name:pe,component:be}=ee;return(0,c.createReactExtension)({name:pe,component:{sync:We=>r.createElement(be,{...We})},data:{[i]:ee,[o(pe)]:!0}})}const m=(ee,pe)=>ee.selectByComponentData({key:pe}).getElements()[0],y=ee=>ee.selectByComponentData({key:R}).selectByComponentData({key:i}),h=ee=>ee.selectByComponentData({key:R}).findComponentData({key:i}),E=()=>{const ee=(0,t.pC)(),pe=(0,c.useElementFilter)(ee,y),be=(0,c.useElementFilter)(ee,h),We=(0,r.useCallback)(yt=>{var ae;if(!pe||!yt)return null;const se=o(yt.name);return(ae=m(pe,se))!=null?ae:null},[pe]),et=(0,r.useCallback)(yt=>{const se=be.find(ae=>ae.name===yt);return se?We(se):null},[be,We]),at=(0,r.useCallback)(yt=>{const se=be.filter(ae=>ae.location===yt);return se.length?se.map(We):null},[be,We]);return{renderComponentByName:et,renderComponentsByLocation:at}},S=(0,c.createApiRef)({id:"plugin.techdocs.service"}),b=(0,c.createApiRef)({id:"plugin.techdocs.storageservice"});var L=e(64279),$=e(48023),B=e(76241);function D(ee,pe){return pe.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(ee.kind=ee.kind.toLocaleLowerCase(),ee.name=ee.name.toLocaleLowerCase(),ee.namespace=ee.namespace.toLocaleLowerCase()),ee}const x=(ee,pe)=>(0,$.eE)(ee)===(0,$.eE)(pe),O={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},M=(0,B.CT)("techdocs-reader-page-context"),K=(0,r.memo)(({entityRef:ee,children:pe})=>{const be=(0,c.useApi)(S),We=(0,c.useApi)(c.configApiRef),et=(0,L.default)(async()=>be.getTechDocsMetadata(ee),[ee]),at=(0,L.default)(async()=>be.getEntityMetadata(ee),[ee]),[yt,se]=(0,r.useState)(O.title),[ae,Ye]=(0,r.useState)(O.subtitle),[Ve,Ue]=(0,r.useState)(O.shadowRoot),nt={metadata:et,entityRef:D(ee,We),entityMetadata:at,shadowRoot:Ve,setShadowRoot:Ue,title:yt,setTitle:se,subtitle:ae,setSubtitle:Ye},Q=(0,B.EI)({1:nt});return r.createElement(M.Provider,{value:Q},pe instanceof Function?pe(nt):pe)},(ee,pe)=>x(ee.entityRef,pe.entityRef)),re=()=>{const ee=(0,r.useContext)(M);if(ee===void 0)return O;const pe=ee.atVersion(1);if(pe===void 0)throw new Error("No context found for version 1.");return pe},le=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"});var Re=e(6553),Fe=e(50236),Be=e(19219),He=e(82339);const ve="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",Je=ee=>{(0,r.useEffect)(()=>{var at;if(!ee)return()=>{};const pe=ee.querySelectorAll('head > link[rel="stylesheet"]');let be=(at=pe==null?void 0:pe.length)!=null?at:0;const We=new CustomEvent(ve);if(!be)return ee.dispatchEvent(We),()=>{};const et=()=>{--be===0&&ee.dispatchEvent(We)};return pe==null||pe.forEach(yt=>{yt.addEventListener("load",et)}),()=>{pe==null||pe.forEach(yt=>{yt.removeEventListener("load",et)})}},[ee])},tt=ee=>{const[pe,be]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!ee)return()=>{};be(!0);const We=ee.style;We.setProperty("opacity","0");const et=()=>{be(!1),We.setProperty("opacity","1")};return ee.addEventListener(ve,et),()=>{ee.removeEventListener(ve,et)}},[ee]),pe},Tt=({element:ee,onAppend:pe,children:be})=>{const[We,et]=(0,r.useState)((0,Re.Ue)({...(0,Fe.Z)(),insertionPoint:void 0}));Je(ee);const at=tt(ee),yt=(0,r.useCallback)(se=>{if(!ee||!se)return;et((0,Re.Ue)({...(0,Fe.Z)(),insertionPoint:ee.querySelector("head")||void 0}));let ae=se.shadowRoot;ae||(ae=se.attachShadow({mode:"open"})),ae.replaceChildren(ee),typeof pe=="function"&&pe(ae)},[ee,pe]);return r.createElement(r.Fragment,null,at&&r.createElement(He.Progress,null),r.createElement(Be.ZP,{jss:We,sheetsManager:new Map},r.createElement("div",{ref:yt,"data-testid":"techdocs-native-shadowroot"}),be))};var At=e(54073);const Ie=()=>{const{shadowRoot:ee}=useTechDocsReaderPage();return ee},mt=ee=>{const pe=Ie();return pe?ee.map(be=>pe==null?void 0:pe.querySelectorAll(be)).filter(be=>be.length).map(be=>Array.from(be)).flat():[]},ht=ee=>ee.toString()&&ee.rangeCount&&ee.getRangeAt(0).getBoundingClientRect().top,lt=(ee=0)=>{const pe=Ie(),[be,We]=useState(null),et=useMemo(()=>debounce(()=>{const at=pe,yt=at.getSelection?at.getSelection():document.getSelection();yt&&ht(yt)?We(yt):We(null)},ee),[pe,We,ee]);return useEffect(()=>(window.document.addEventListener("selectionchange",et),()=>window.document.removeEventListener("selectionchange",et)),[et]),be}},94067:function(ne,s,e){"use strict";e.r(s),e.d(s,{EmbeddedDocsRouter:function(){return L},Router:function(){return b},isTechDocsAvailable:function(){return S}});var r=e(2784),t=e(10289),c=e(17429),i=e(82339),R=e(48023),f=e(20961),o=e(16172),u=e(16639);const m=({entity:$})=>{const B=(0,R.iB)($);return r.createElement(f.I6,{entityRef:B},r.createElement(o.b,null),r.createElement(u.F,{withSearch:!1}))};var y=e(50021),h=e(26220);const E="backstage.io/techdocs-ref",S=$=>{var B,D;return Boolean((D=(B=$==null?void 0:$.metadata)==null?void 0:B.annotations)==null?void 0:D[E])},b=()=>r.createElement(t.Z5,null,r.createElement(t.AW,{path:"/",element:r.createElement(y.TechDocsIndexPage,null)}),r.createElement(t.AW,{path:"/:namespace/:kind/:name/*",element:r.createElement(h.TechDocsReaderPage,null)})),L=$=>{var M;const{children:B}=$,{entity:D}=(0,c.useEntity)(),x=(0,t.V$)([{path:"/*",element:r.createElement(m,{entity:D}),children:[{path:"/*",element:B}]}]);return((M=D.metadata.annotations)==null?void 0:M[E])?x:r.createElement(i.MissingAnnotationEmptyState,{annotation:E})}},3337:function(ne,s,e){"use strict";var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),c=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(ne,s,e){"use strict";e.d(s,{k:function(){return R},p:function(){return i}});var r=e(10179),t=e(76372),c=e.n(t);class i{constructor(o){q(this,"configApi");q(this,"discoveryApi");q(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.fetchApi=o.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(o){const{kind:u,namespace:m,name:y}=o,E=`${await this.getApiOrigin()}/metadata/techdocs/${m}/${u}/${y}`,S=await this.fetchApi.fetch(`${E}`);if(!S.ok)throw await r.VL.fromResponse(S);return await S.json()}async getEntityMetadata(o){const{kind:u,namespace:m,name:y}=o,E=`${await this.getApiOrigin()}/metadata/entity/${m}/${u}/${y}`,S=await this.fetchApi.fetch(`${E}`);if(!S.ok)throw await r.VL.fromResponse(S);return await S.json()}}class R{constructor(o){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");q(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.identityApi=o.identityApi,this.fetchApi=o.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var o;return(o=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?o:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(o,u){const{kind:m,namespace:y,name:h}=o,S=`${await this.getStorageUrl()}/${y}/${m}/${h}/${u}`,b=await this.fetchApi.fetch(`${S.endsWith("/")?S:`${S}/`}index.html`);let L="";switch(b.status){case 404:throw L="Page not found. ",u||(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 b.text()}async syncEntityDocs(o,u=()=>{}){const{kind:m,namespace:y,name:h}=o,S=`${await this.getApiOrigin()}/sync/${y}/${m}/${h}`,{token:b}=await this.identityApi.getCredentials();return new Promise((L,$)=>{const B=new t.EventSourcePolyfill(S,{withCredentials:!0,headers:b?{Authorization:`Bearer ${b}`}:{}});B.addEventListener("log",D=>{D.data&&u(JSON.parse(D.data))}),B.addEventListener("finish",D=>{let x=!1;D.data&&({updated:x}=JSON.parse(D.data)),L(x?"updated":"cached")}),B.onerror=D=>{switch(B.close(),D.status){case 404:$(new r.dR(D.message));return;default:$(new Error(D.data));return}}})}async getBaseUrl(o,u,m){const{kind:y,namespace:h,name:E}=u,b=`${await this.getApiOrigin()}/static/docs/${h}/${y}/${E}/${m}`;return new URL(o,b.endsWith("/")?b:`${b}/`).toString()}}},97589:function(ne,s,e){"use strict";e.d(s,{D:function(){return r}});function r(t,c){return c.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(ne,s,e){"use strict";e.d(s,{u:function(){return o}});var r=e(2784),t=e(82339),c=e(17429),i=e(1114),R=e(70335),f=e(21956);const o=u=>{const{initialFilter:m="owned",columns:y,actions:h}=u;return r.createElement(i.j,null,r.createElement(t.Content,null,r.createElement(t.ContentHeader,{title:""},r.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),r.createElement(c.EntityListProvider,null,r.createElement(c.CatalogFilterLayout,null,r.createElement(c.CatalogFilterLayout.Filters,null,r.createElement(R.f,null),r.createElement(c.UserListPicker,{initialFilter:m}),r.createElement(c.EntityOwnerPicker,null),r.createElement(c.EntityTagPicker,null)),r.createElement(c.CatalogFilterLayout.Content,null,r.createElement(f.EntityListDocsTable,{actions:h,columns:y}))))))}},51016:function(ne,s,e){"use strict";e.d(s,{f:function(){return y}});var r=e(68725),t=e(97589),c=e(36964),i=e(82339),R=e(94339),f=e(16111),o=e(24579),u=e(14503),m=e(2784);const y=S=>{const{entities:b}=S,L=(0,c.useRouteRef)(r.Fw),$=(0,c.useApi)(c.configApiRef);return b?m.createElement(i.ItemCardGrid,{"data-testid":"docs-explore"},b!=null&&b.length?b.map((B,D)=>{var x,O;return m.createElement(R.Z,{key:D},m.createElement(f.Z,null,m.createElement(i.ItemCardHeader,{title:(x=B.metadata.title)!=null?x:B.metadata.name})),m.createElement(o.Z,null,B.metadata.description),m.createElement(u.Z,null,m.createElement(i.Button,{to:L({namespace:(0,t.D)((O=B.metadata.namespace)!=null?O:"default",$),kind:(0,t.D)(B.kind,$),name:(0,t.D)(B.metadata.name,$)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var h=e(17429);const E=()=>{const{loading:S,error:b,entities:L}=useEntityList();return b?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:b.toString()})):S||!L?React.createElement(Progress,null):(L.sort(($,B)=>{var D,x;return((D=$.metadata.title)!=null?D:$.metadata.name).localeCompare((x=B.metadata.title)!=null?x:B.metadata.name)}),React.createElement(DocsCardGrid,{entities:L}))}},38634:function(ne,s,e){"use strict";e.d(s,{H:function(){return h}});var r=e(2784),t=e(95074),c=e(36964),i=e(48023),R=e(17429),f=e(68725),o=e(82339),u=e(98095),m=e(3792),y=e(97589);const h=E=>{const{entities:S,title:b,loading:L,columns:$,actions:B}=E,[,D]=(0,t.Z)(),x=(0,c.useRouteRef)(f.Fw),O=(0,c.useApi)(c.configApiRef);if(!S)return null;const M=S.map(le=>{var Fe;const Re=(0,R.getEntityRelations)(le,i.S4);return{entity:le,resolved:{docsUrl:x({namespace:(0,y.D)((Fe=le.metadata.namespace)!=null?Fe:"default",O),kind:(0,y.D)(le.kind,O),name:(0,y.D)(le.metadata.name,O)}),ownedByRelations:Re,ownedByRelationsTitle:Re.map(Be=>(0,R.humanizeEntityRef)(Be,{defaultKind:"group"})).join(", ")}}}),K=[m.N.createNameColumn(),m.N.createOwnerColumn(),m.N.createTypeColumn()],re=[u.n.createCopyDocsUrlAction(D)];return r.createElement(r.Fragment,null,L||M&&M.length>0?r.createElement(o.Table,{isLoading:L,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:M,columns:$||K,actions:B||re,title:b?`${b} (${M.length})`:`All (${M.length})`}):r.createElement(o.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:r.createElement(o.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))};h.columns=m.N,h.actions=u.n},12481:function(ne,s,e){"use strict";e.d(s,{n:function(){return y}});var r=e(2784),t=e(95074),c=e(76635),i=e.n(c),R=e(82339),f=e(17429),o=e(38634),u=e(98095),m=e(3792);const y=h=>{var re,le;const{columns:E,actions:S}=h,{loading:b,error:L,entities:$,filters:B}=(0,f.useEntityList)(),{isStarredEntity:D,toggleStarredEntity:x}=(0,f.useStarredEntities)(),[,O]=(0,t.Z)(),M=(0,c.capitalize)((le=(re=B.user)==null?void 0:re.value)!=null?le:"all"),K=[u.n.createCopyDocsUrlAction(O),u.n.createStarEntityAction(D,x)];return L?r.createElement(R.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(R.CodeSnippet,{language:"text",text:L.toString()})):r.createElement(o.H,{title:M,entities:$,loading:b,actions:S||K,columns:E})};y.columns=m.N,y.actions=u.n},98095:function(ne,s,e){"use strict";e.d(s,{n:function(){return o}});var r=e(2784),t=e(39981),c=e(2337),i=e(11640),R=e(28347);const f=(0,c.Z)({root:{color:"#f3ba37"}})(i.Z),o={createCopyDocsUrlAction(u){return m=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>u(`${window.location.origin}${m.resolved.docsUrl}`)})},createStarEntityAction(u,m){return({entity:y})=>{const h=u(y);return{cellStyle:{paddingLeft:"1em"},icon:()=>h?r.createElement(f,null):r.createElement(R.Z,null),tooltip:h?"Remove from favorites":"Add to favorites",onClick:()=>m(y)}}}}},3792:function(ne,s,e){"use strict";e.d(s,{N:function(){return R}});var r=e(2784),t=e(82339),c=e(17429);function i(f){return f.metadata.title||f.metadata.name}const R={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:f=>r.createElement(t.SubvalueCell,{value:r.createElement(t.Link,{to:f.resolved.docsUrl},i(f.entity)),subvalue:f.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:f})=>r.createElement(c.EntityRefLinks,{entityRefs:f.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},21956:function(ne,s,e){"use strict";e.d(s,{DocsTable:function(){return t.H},EntityListDocsTable:function(){return r.n}});var r=e(12481),t=e(38634),c=e(72580),i=e.n(c);e.o(c,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return c.DefaultTechDocsHome}})},72580:function(){},50021:function(ne,s,e){"use strict";e.r(s),e.d(s,{TechDocsIndexPage:function(){return i}});var r=e(2784),t=e(10289),c=e(2546);const i=R=>(0,t.pC)()||r.createElement(c.u,{...R})},1114:function(ne,s,e){"use strict";e.d(s,{j:function(){return i}});var r=e(2784),t=e(82339),c=e(36964);const i=R=>{var m;const{children:f}=R,u=`Documentation available in ${(m=(0,c.useApi)(c.configApiRef).getOptionalString("organization.name"))!=null?m:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:u,themeId:"documentation"},f)}},70335:function(ne,s,e){"use strict";e.d(s,{f:function(){return i}});var r=e(2784),t=e(17429);class c{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const i=()=>{const{updateFilters:R}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{R({techdocs:new c})},[R]),null}},19192:function(ne,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return c.u}});var r=e(51016),t=e(21956),c=e(2546),i=e(1114),R=e(70335)},82250:function(ne,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return o.DefaultTechDocsHome},TechDocsIndexPage:function(){return u.Jl},TechDocsReaderPage:function(){return u.I6},TechDocsReaderPageContent:function(){return R.Fq},TechDocsReaderPageHeader:function(){return R.SE},plugin:function(){return u.s4},techdocsPlugin:function(){return u.s4}});var r=e(98157),t=e.n(r);e.o(r,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return r.DefaultTechDocsHome}}),e.o(r,"TechDocsReaderPageContent")&&e.d(s,{TechDocsReaderPageContent:function(){return r.TechDocsReaderPageContent}}),e.o(r,"TechDocsReaderPageHeader")&&e.d(s,{TechDocsReaderPageHeader:function(){return r.TechDocsReaderPageHeader}});var c=e(3337),i=e(42723),R=e(96393),f=e(47861),o=e(19192),u=e(20961),m=e(94067)},20961:function(ne,s,e){"use strict";e.d(s,{I6:function(){return y},Jl:function(){return m},s4:function(){return R}});var r=e(56338),t=e(42723),c=e(68725),i=e(36964);const R=(0,i.createPlugin)({id:"techdocs",apis:[(0,i.createApiFactory)({api:r.Dl,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef,fetchApi:i.fetchApiRef},factory:({configApi:h,discoveryApi:E,identityApi:S,fetchApi:b})=>new t.k({configApi:h,discoveryApi:E,identityApi:S,fetchApi:b})}),(0,i.createApiFactory)({api:r.gT,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,fetchApi:i.fetchApiRef},factory:({configApi:h,discoveryApi:E,fetchApi:S})=>new t.p({configApi:h,discoveryApi:E,fetchApi:S})})],routes:{root:c._Z,docRoot:c.Fw,entityContent:c.pd}}),f=R.provide((0,i.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(h=>h.Router),mountPoint:c._Z})),o=R.provide((0,i.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(h=>h.EmbeddedDocsRouter),mountPoint:c.pd})),u=R.provide((0,i.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(h=>h.TechDocsCustomHome),mountPoint:c._Z})),m=R.provide((0,i.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(h=>h.TechDocsIndexPage),mountPoint:c._Z})),y=R.provide((0,i.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,26220)).then(h=>h.TechDocsReaderPage),mountPoint:c.Fw}))},26220:function(ne,s,e){"use strict";e.r(s),e.d(s,{TechDocsReaderLayout:function(){return u},TechDocsReaderPage:function(){return m}});var r=e(2784),t=e(10289),c=e(82339),i=e(56338),R=e(16639),f=e(99954),o=e(16172);const u=({withSearch:y,withHeader:h=!0})=>r.createElement(c.Page,{themeId:"documentation"},h&&r.createElement(f.S,null),r.createElement(o.b,null),r.createElement(R.F,{withSearch:y})),m=y=>{const{kind:h,name:E,namespace:S}=(0,t.UO)(),{children:b,entityRef:L={kind:h,name:E,namespace:S}}=y,$=(0,t.pC)();if(!b){const D=($?r.Children.toArray($.props.children):[]).find(x=>{var M,K;const{type:O}=x;return!((K=(M=O==null?void 0:O.__backstage_data)==null?void 0:M.map)!=null&&K.get(i.Zz))});return r.createElement(i.ZS,{entityRef:L},D||r.createElement(u,null))}return r.createElement(i.ZS,{entityRef:L},({metadata:B,entityMetadata:D,onReady:x})=>r.createElement("div",{className:"techdocs-reader-page"},r.createElement(c.Page,{themeId:"documentation"},b instanceof Function?b({entityRef:L,techdocsMetadataValue:B.value,entityMetadataValue:D.value,onReady:x}):b)))}},16639:function(ne,s,e){"use strict";e.d(s,{F:function(){return mn}});var r=e(2784),t=e(79692),c=e(60905),i=e(56338),R=e(82339),f=e(47861),o=e(4614),u=e(77277),m=e(99688),y=e(12420),h=e(90436),E=e(61837),S=e(4190),b=e(87685);const L=(0,t.Z)(U=>(0,y.Z)({paper:{width:"100%",[U.breakpoints.up("sm")]:{width:"75%"},[U.breakpoints.up("md")]:{width:"50%"},padding:U.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:U.palette.background.default}})),$=({buildLog:U,onClose:J})=>{const de=L(),Ce=U.length===0?"Waiting for logs...":U.join(`
32
+ `);return r.createElement(c.Z,{container:!0,direction:"column",className:de.root,spacing:0,wrap:"nowrap"},r.createElement(c.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(h.Z,{variant:"h5"},"Build Details"),r.createElement(E.Z,{key:"dismiss",title:"Close the drawer",onClick:J,color:"inherit"},r.createElement(b.Z,null))),r.createElement(R.LogViewer,{text:Ce,classes:{root:de.logs}}))},B=({buildLog:U})=>{const J=L(),[de,Ce]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(u.Z,{color:"inherit",onClick:()=>Ce(!0)},"Show Build Logs"),r.createElement(S.ZP,{classes:{paper:J.paper},anchor:"right",open:de,onClose:()=>Ce(!1)},r.createElement($,{buildLog:U,onClose:()=>Ce(!1)})))};var D=e(36964);const x=({errorMessage:U})=>{const J=(0,D.useApi)(D.configApiRef).getOptionalString("techdocs.builder");let de="";return J!=="local"&&(de="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(R.ErrorPage,{status:"404",statusMessage:U||"Documentation not found",additionalInfo:de})};var O=e(2263);const M=(0,t.Z)(U=>({root:{marginBottom:U.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),K=()=>{let U=null;const J=M(),{state:de,contentReload:Ce,contentErrorMessage:xe,syncErrorMessage:we,buildLog:pt}=(0,O.DK)();return de==="INITIAL_BUILD"&&(U=r.createElement(m.Z,{classes:{root:J.root},variant:"outlined",severity:"info",icon:r.createElement(o.Z,{size:"24px"}),action:r.createElement(B,{buildLog:pt})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),de==="CONTENT_STALE_REFRESHING"&&(U=r.createElement(m.Z,{variant:"outlined",severity:"info",icon:r.createElement(o.Z,{size:"24px"}),action:r.createElement(B,{buildLog:pt}),classes:{root:J.root}},"A newer version of this documentation is being prepared and will be available shortly.")),de==="CONTENT_STALE_READY"&&(U=r.createElement(m.Z,{variant:"outlined",severity:"success",action:r.createElement(u.Z,{color:"inherit",onClick:()=>Ce()},"Refresh"),classes:{root:J.root}},"A newer version of this documentation is now available, please refresh to view.")),de==="CONTENT_STALE_ERROR"&&(U=r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(B,{buildLog:pt}),classes:{root:J.root,message:J.message}},"Building a newer version of this documentation failed."," ",we)),de==="CONTENT_NOT_FOUND"&&(U=r.createElement(r.Fragment,null,we&&r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(B,{buildLog:pt}),classes:{root:J.root,message:J.message}},"Building a newer version of this documentation failed."," ",we),r.createElement(x,{errorMessage:xe}))),U};var re=e(10289),le=e(60364),Re=e(41156),Fe=e(36356),Be=e(35368),He=e.n(Be);const ve=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Je=/^https:\/\/fonts\.googleapis\.com/,tt=/^https:\/\/fonts\.gstatic\.com/,Tt=U=>U.nodeName==="LINK",At=U=>{const J=(U==null?void 0:U.getAttribute("href"))||"",de=J.match(ve),Ce=J.match(Je),xe=J.match(tt);return de||Ce||xe},Ie=U=>(Tt(U)&&!At(U)&&U.remove(),U),mt=U=>U.nodeName==="IFRAME",ht=(U,J)=>{const de=U.getAttribute("src")||"";try{const{host:Ce}=new URL(de);return J.includes(Ce)}catch{return!1}},lt=U=>J=>(mt(J)&&!ht(J,U)&&J.remove(),J),ee=()=>{const U=(0,D.useApi)(D.configApiRef);return(0,r.useMemo)(()=>U.getOptionalConfig("techdocs.sanitizer"),[U])},pe=()=>{const U=ee();return(0,r.useCallback)(async J=>{const de=U==null?void 0:U.getOptionalStringArray("allowedIframeHosts");He().addHook("beforeSanitizeElements",Ie);const Ce=["link"];return de&&(Ce.push("iframe"),He().addHook("beforeSanitizeElements",lt(de))),He().sanitize(J.innerHTML,{ADD_TAGS:Ce,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[U])};var be=e(41128),We=({theme:U})=>`
33
+ /*================== Variables ==================*/
34
+ /*
35
+ 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.
36
+ 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.
37
+ */
38
+
39
+ :host {
40
+ /* FONT */
41
+ --md-default-fg-color: ${U.palette.text.primary};
42
+ --md-default-fg-color--light: ${U.palette.text.secondary};
43
+ --md-default-fg-color--lighter: ${(0,be.$n)(U.palette.text.secondary,.7)};
44
+ --md-default-fg-color--lightest: ${(0,be.$n)(U.palette.text.secondary,.3)};
45
+
46
+ /* BACKGROUND */
47
+ --md-default-bg-color:${U.palette.background.default};
48
+ --md-default-bg-color--light: ${U.palette.background.paper};
49
+ --md-default-bg-color--lighter: ${(0,be.$n)(U.palette.background.paper,.7)};
50
+ --md-default-bg-color--lightest: ${(0,be.$n)(U.palette.background.paper,.3)};
51
+
52
+ /* PRIMARY */
53
+ --md-primary-fg-color: ${U.palette.primary.main};
54
+ --md-primary-fg-color--light: ${U.palette.primary.light};
55
+ --md-primary-fg-color--dark: ${U.palette.primary.dark};
56
+ --md-primary-bg-color: ${U.palette.primary.contrastText};
57
+ --md-primary-bg-color--light: ${(0,be.$n)(U.palette.primary.contrastText,.7)};
58
+
59
+ /* ACCENT */
60
+ --md-accent-fg-color: var(--md-primary-fg-color);
61
+
62
+ /* SHADOW */
63
+ --md-shadow-z1: ${U.shadows[1]};
64
+ --md-shadow-z2: ${U.shadows[2]};
65
+ --md-shadow-z3: ${U.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: ${U.palette.text.primary};
102
+ --md-code-bg-color: ${U.palette.background.paper};
103
+ --md-code-hl-color: ${(0,be.Fq)(U.palette.warning.main,.5)};
104
+ --md-code-hl-keyword-color: ${U.palette.type==="dark"?U.palette.primary.light:U.palette.primary.dark};
105
+ --md-code-hl-function-color: ${U.palette.type==="dark"?U.palette.secondary.light:U.palette.secondary.dark};
106
+ --md-code-hl-string-color: ${U.palette.type==="dark"?U.palette.success.light:U.palette.success.dark};
107
+ --md-code-hl-number-color: ${U.palette.type==="dark"?U.palette.error.light:U.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: ${U.palette.text.primary};
122
+ --md-typeset-del-color: ${U.palette.type==="dark"?(0,be.Fq)(U.palette.error.dark,.5):(0,be.Fq)(U.palette.error.light,.5)};
123
+ --md-typeset-ins-color: ${U.palette.type==="dark"?(0,be.Fq)(U.palette.success.dark,.5):(0,be.Fq)(U.palette.success.light,.5)};
124
+ --md-typeset-mark-color: ${U.palette.type==="dark"?(0,be.Fq)(U.palette.warning.dark,.5):(0,be.Fq)(U.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
+ `,et=({theme:U})=>`
141
+ /*================== Reset ==================*/
142
+
143
+ body {
144
+ --md-text-color: var(--md-default-fg-color);
145
+ --md-text-link-color: var(--md-accent-fg-color);
146
+ --md-text-font-family: ${U.typography.fontFamily};
147
+ font-family: var(--md-text-font-family);
148
+ background-color: unset;
149
+ }
150
+ `;const at="224px";var yt=({theme:U,sidebar:J})=>`
151
+ /*================== Layout ==================*/
152
+
153
+ .md-grid {
154
+ max-width: 100%;
155
+ margin: 0;
156
+ }
157
+
158
+ .md-nav {
159
+ font-size: calc(var(--md-typeset-font-size) * 0.9);
160
+ }
161
+ .md-nav__link {
162
+ display: flex;
163
+ align-items: center;
164
+ justify-content: space-between;
165
+ }
166
+ .md-nav__icon {
167
+ height: 20px !important;
168
+ width: 20px !important;
169
+ margin-left:${U.spacing(1)}px;
170
+ }
171
+ .md-nav__icon svg {
172
+ margin: 0;
173
+ width: 20px !important;
174
+ height: 20px !important;
175
+ }
176
+ .md-nav__icon:after {
177
+ width: 20px !important;
178
+ height: 20px !important;
179
+ }
180
+
181
+ .md-nav__item--active > .md-nav__link, a.md-nav__link--active {
182
+ text-decoration: underline;
183
+ color: var(--md-typeset-a-color);
184
+ }
185
+
186
+ .md-main__inner {
187
+ margin-top: 0;
188
+ }
189
+
190
+ .md-sidebar {
191
+ bottom: 75px;
192
+ position: fixed;
193
+ width: 16rem;
194
+ overflow-y: auto;
195
+ overflow-x: hidden;
196
+ scrollbar-color: rgb(193, 193, 193) #eee;
197
+ scrollbar-width: thin;
198
+ }
199
+ .md-sidebar .md-sidebar__scrollwrap {
200
+ width: calc(12.1rem);
201
+ }
202
+ .md-sidebar--secondary {
203
+ right: ${U.spacing(3)}px;
204
+ }
205
+ .md-sidebar::-webkit-scrollbar {
206
+ width: 5px;
207
+ }
208
+ .md-sidebar::-webkit-scrollbar-button {
209
+ width: 5px;
210
+ height: 5px;
211
+ }
212
+ .md-sidebar::-webkit-scrollbar-track {
213
+ background: #eee;
214
+ border: 1 px solid rgb(250, 250, 250);
215
+ box-shadow: 0px 0px 3px #dfdfdf inset;
216
+ border-radius: 3px;
217
+ }
218
+ .md-sidebar::-webkit-scrollbar-thumb {
219
+ width: 5px;
220
+ background: rgb(193, 193, 193);
221
+ border: transparent;
222
+ border-radius: 3px;
223
+ }
224
+ .md-sidebar::-webkit-scrollbar-thumb:hover {
225
+ background: rgb(125, 125, 125);
226
+ }
227
+
228
+ .md-content {
229
+ max-width: calc(100% - 16rem * 2);
230
+ margin-left: 16rem;
231
+ margin-bottom: 50px;
232
+ }
233
+
234
+ .md-footer {
235
+ position: fixed;
236
+ bottom: 0px;
237
+ }
238
+ .md-footer__title {
239
+ background-color: unset;
240
+ }
241
+ .md-footer-nav__link {
242
+ width: 16rem;
243
+ }
244
+
245
+ .md-dialog {
246
+ background-color: unset;
247
+ }
248
+
249
+ @media screen and (min-width: 76.25em) {
250
+ .md-sidebar {
251
+ height: auto;
252
+ }
253
+ }
254
+
255
+ @media screen and (max-width: 76.1875em) {
256
+ .md-nav {
257
+ transition: none !important;
258
+ background-color: var(--md-default-bg-color)
259
+ }
260
+ .md-nav--primary .md-nav__title {
261
+ cursor: auto;
262
+ color: var(--md-default-fg-color);
263
+ font-weight: 700;
264
+ white-space: normal;
265
+ line-height: 1rem;
266
+ height: auto;
267
+ display: flex;
268
+ flex-flow: column;
269
+ row-gap: 1.6rem;
270
+ padding: 1.2rem .8rem .8rem;
271
+ background-color: var(--md-default-bg-color);
272
+ }
273
+ .md-nav--primary .md-nav__title~.md-nav__list {
274
+ box-shadow: none;
275
+ }
276
+ .md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
277
+ border-top: none;
278
+ }
279
+ .md-nav--primary .md-nav__title .md-nav__button {
280
+ display: none;
281
+ }
282
+ .md-nav--primary .md-nav__title .md-nav__icon {
283
+ color: var(--md-default-fg-color);
284
+ position: static;
285
+ height: auto;
286
+ margin: 0 0 0 -0.2rem;
287
+ }
288
+ .md-nav--primary > .md-nav__title [for="none"] {
289
+ padding-top: 0;
290
+ }
291
+ .md-nav--primary .md-nav__item {
292
+ border-top: none;
293
+ }
294
+ .md-nav--primary :is(.md-nav__title,.md-nav__item) {
295
+ font-size : var(--md-typeset-font-size);
296
+ }
297
+ .md-nav .md-source {
298
+ display: none;
299
+ }
300
+
301
+ .md-sidebar {
302
+ height: 100%;
303
+ }
304
+ .md-sidebar--primary {
305
+ width: 12.1rem !important;
306
+ z-index: 200;
307
+ left: ${J.isPinned?`calc(-12.1rem + ${at})`:"calc(-12.1rem + 72px)"} !important;
308
+ }
309
+ .md-sidebar--secondary:not([hidden]) {
310
+ display: none;
311
+ }
312
+
313
+ .md-content {
314
+ max-width: 100%;
315
+ margin-left: 0;
316
+ }
317
+
318
+ .md-header__button {
319
+ margin: 0.4rem 0;
320
+ margin-left: 0.4rem;
321
+ padding: 0;
322
+ }
323
+
324
+ .md-overlay {
325
+ left: 0;
326
+ }
327
+
328
+ .md-footer {
329
+ position: static;
330
+ padding-left: 0;
331
+ }
332
+ .md-footer-nav__link {
333
+ /* footer links begin to overlap at small sizes without setting width */
334
+ width: 50%;
335
+ }
336
+ }
337
+
338
+ @media screen and (max-width: 600px) {
339
+ .md-sidebar--primary {
340
+ left: -12.1rem !important;
341
+ width: 12.1rem;
342
+ }
343
+ }
344
+ `;const se=["h1","h2","h3","h4","h5","h6"];var ae=({theme:U})=>`
345
+ /*================== Typeset ==================*/
346
+
347
+ .md-typeset {
348
+ font-size: var(--md-typeset-font-size);
349
+ }
350
+
351
+ ${se.reduce((J,de)=>{var It;const Ce=(It=U.typography.htmlFontSize)!=null?It:16,xe=U.typography[de],{lineHeight:we,fontFamily:pt,fontWeight:Kt,fontSize:zt}=xe,Mt=it=>{let wt=1;return typeof it=="number"&&(wt=it/Ce),typeof it=="string"&&(wt=it.replace("rem","")),`calc(${wt} * var(--md-typeset-font-size))`};return J.concat(`
352
+ .md-typeset ${de} {
353
+ color: var(--md-default-fg-color);
354
+ line-height: ${we};
355
+ font-family: ${pt};
356
+ font-weight: ${Kt};
357
+ font-size: ${Mt(zt)};
358
+ }
359
+ `)},"")}
360
+
361
+ .md-typeset .md-content__button {
362
+ color: var(--md-default-fg-color);
363
+ }
364
+
365
+ .md-typeset hr {
366
+ border-bottom: 0.05rem dotted ${U.palette.divider};
367
+ }
368
+
369
+ .md-typeset details {
370
+ font-size: var(--md-typeset-font-size) !important;
371
+ }
372
+ .md-typeset details summary {
373
+ padding-left: 2.5rem !important;
374
+ }
375
+ .md-typeset details summary:before,
376
+ .md-typeset details summary:after {
377
+ top: 50% !important;
378
+ width: 20px !important;
379
+ height: 20px !important;
380
+ transform: rotate(0deg) translateY(-50%) !important;
381
+ }
382
+ .md-typeset details[open] > summary:after {
383
+ transform: rotate(90deg) translateX(-50%) !important;
384
+ }
385
+
386
+ .md-typeset blockquote {
387
+ color: var(--md-default-fg-color--light);
388
+ border-left: 0.2rem solid var(--md-default-fg-color--light);
389
+ }
390
+
391
+ .md-typeset table:not([class]) {
392
+ font-size: var(--md-typeset-font-size);
393
+ border: 1px solid var(--md-default-fg-color);
394
+ border-bottom: none;
395
+ border-collapse: collapse;
396
+ }
397
+ .md-typeset table:not([class]) th {
398
+ font-weight: bold;
399
+ }
400
+ .md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
401
+ border-bottom: 1px solid var(--md-default-fg-color);
402
+ }
403
+
404
+ .md-typeset pre > code::-webkit-scrollbar-thumb {
405
+ background-color: hsla(0, 0%, 0%, 0.32);
406
+ }
407
+ .md-typeset pre > code::-webkit-scrollbar-thumb:hover {
408
+ background-color: hsla(0, 0%, 0%, 0.87);
409
+ }
410
+ `,Ye=()=>`
411
+ /*================== Animations ==================*/
412
+ /*
413
+ Disable CSS animations on link colors as they lead to issues in dark mode.
414
+ The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
415
+ */
416
+ .md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
417
+ transition: none;
418
+ }
419
+ `,Ve=({theme:U})=>`
420
+ /*================== Extensions ==================*/
421
+
422
+ /* HIGHLIGHT */
423
+ .highlight .md-clipboard:after {
424
+ content: unset;
425
+ }
426
+
427
+ .highlight .nx {
428
+ color: ${U.palette.type==="dark"?"#ff53a3":"#ec407a"};
429
+ }
430
+
431
+ /* CODE HILITE */
432
+ .codehilite .gd {
433
+ background-color: ${U.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
434
+ }
435
+
436
+ .codehilite .gi {
437
+ background-color: ${U.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
438
+ }
439
+
440
+ /* TABBED */
441
+ .tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
442
+ .tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
443
+ .tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
444
+ .tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
445
+ .tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
446
+ .tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
447
+ .tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
448
+ .tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
449
+ .tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
450
+ .tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
451
+ .tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
452
+ .tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
453
+ .tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
454
+ .tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
455
+ .tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
456
+ .tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
457
+ .tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
458
+ .tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
459
+ .tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
460
+ .tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
461
+ color: var(--md-accent-fg-color);
462
+ border-color: var(--md-accent-fg-color);
463
+ }
464
+
465
+ /* TASK-LIST */
466
+ .task-list-control .task-list-indicator::before {
467
+ background-color: ${U.palette.action.disabledBackground};
468
+ }
469
+ .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
470
+ background-color: ${U.palette.success.main};
471
+ }
472
+
473
+ /* ADMONITION */
474
+ .admonition {
475
+ font-size: var(--md-typeset-font-size) !important;
476
+ }
477
+ .admonition .admonition-title {
478
+ padding-left: 2.5rem !important;
479
+ }
480
+
481
+ .admonition .admonition-title:before {
482
+ top: 50% !important;
483
+ width: 20px !important;
484
+ height: 20px !important;
485
+ transform: translateY(-50%) !important;
486
+ }
487
+ `;const Ue=[We,et,yt,ae,Ye,Ve],nt=()=>(0,R.useSidebarPinState)(),Q=()=>{const U=nt(),J=(0,le.Z)();return(0,r.useMemo)(()=>{const de={theme:J,sidebar:U};return Ue.reduce((Ce,xe)=>Ce+xe(de),"")},[J,U])},z=()=>{const U=Q();return(0,r.useCallback)(J=>(J.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${U}</style>`),J),[U])},_=(U,J,de)=>{const Ce=U==="src"&&J.endsWith(".svg"),xe=!J.match(/^([a-z]*:)?\/\//i),we=J.startsWith(de);return Ce&&(xe||we)},ce=({techdocsStorageApi:U,entityId:J,path:de})=>async Ce=>{const xe=await U.getApiOrigin(),we=async(pt,Kt)=>{for(const zt of pt)if(zt.hasAttribute(Kt)){const Mt=zt.getAttribute(Kt);if(!Mt)return;const It=await U.getBaseUrl(Mt,J,de);if(_(Kt,Mt,xe))try{const wt=await(await fetch(It,{credentials:"include"})).text();zt.setAttribute(Kt,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(wt)))}`)}catch{zt.setAttribute("alt",`Error: ${Mt}`)}else zt.setAttribute(Kt,It)}};return await Promise.all([we(Ce.querySelectorAll("img"),"src"),we(Ce.querySelectorAll("script"),"src"),we(Ce.querySelectorAll("source"),"src"),we(Ce.querySelectorAll("link"),"href"),we(Ce.querySelectorAll("a[download]"),"href")]),Ce};var fe=e(68370),Pe=e(67097),Oe=e(47093),Se=e(82717),Qe=e.n(Se);const Ge=U=>J=>{var wt;const de=J.querySelector('[title="Edit this page"]');if(!de||!de.href)return J;const Ce=new URL(de.href),xe=U.byUrl(Ce);if((xe==null?void 0:xe.type)!=="github"&&(xe==null?void 0:xe.type)!=="gitlab")return J;const we=((wt=J.querySelector("article>h1"))==null?void 0:wt.childNodes[0].textContent)||"",pt=encodeURIComponent(`Documentation Feedback: ${we}`),Kt=encodeURIComponent(`Page source:
488
+ ${de.href}
489
+
490
+ Feedback:`),zt=(xe==null?void 0:xe.type)==="github"?(0,fe.Pb)(Ce.href,"blob"):Ce.href,Mt=Qe()(zt),It=`/${Mt.organization}/${Mt.name}`,it=de.cloneNode();switch(xe==null?void 0:xe.type){case"gitlab":it.href=`${Ce.origin}${It}/issues/new?issue[title]=${pt}&issue[description]=${Kt}`;break;case"github":it.href=`${Ce.origin}${It}/issues/new?title=${pt}&body=${Kt}`;break;default:return J}return Oe.render(r.createElement(Pe.Z),it),it.style.paddingLeft="5px",it.title="Leave feedback for this page",it.id="git-feedback-link",de==null||de.insertAdjacentElement("beforebegin",it),J};var gt=e(44882);const Rt=()=>U=>{const J=U.querySelector('.md-header label[for="__drawer"]'),de=U.querySelector("article");if(!J||!de)return U;const Ce=J.cloneNode();return Oe.render(r.createElement(gt.Z),Ce),Ce.id="toggle-sidebar",Ce.title="Toggle Sidebar",Ce.classList.add("md-content__button"),Ce.style.setProperty("padding","0 0 0 5px"),Ce.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),de==null||de.prepend(Ce),U},ut=()=>U=>(((de,Ce)=>{Array.from(de).filter(xe=>xe.hasAttribute(Ce)).forEach(xe=>{const we=xe.getAttribute(Ce);if(we){we.match(/^https?:\/\//i)&&xe.setAttribute("target","_blank");try{const pt=Ft(window.location.href);xe.setAttribute(Ce,new URL(we,pt).toString())}catch{xe.replaceWith(xe.textContent||we)}}})})(Array.from(U.getElementsByTagName("a")),"href"),U);function Ft(U){const J=new URL(U);return!J.pathname.endsWith("/")&&!J.pathname.endsWith(".html")&&(J.pathname+="/"),J.toString()}const xt=({baseUrl:U,onClick:J})=>de=>(Array.from(de.getElementsByTagName("a")).forEach(Ce=>{Ce.addEventListener("click",xe=>{const pt=Ce.getAttribute("href");!pt||pt.startsWith(U)&&!Ce.hasAttribute("download")&&(xe.preventDefault(),J(xe,pt))})}),de);var bt=e(15459),Pt=e(80030),Vt=e(72379),Gt=e(41547);const dn=(0,bt.Z)(U=>({tooltip:{fontSize:"inherit",color:U.palette.text.primary,margin:0,padding:U.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Pt.ZP),In=()=>r.createElement(Vt.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"})),Qt=({text:U})=>{const[J,de]=(0,r.useState)(!1),Ce=(0,r.useCallback)(()=>{navigator.clipboard.writeText(U),de(!0)},[U]),xe=(0,r.useCallback)(()=>{de(!1)},[de]);return r.createElement(dn,{title:"Copied to clipboard",placement:"left",open:J,onClose:xe,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:Ce},r.createElement(In,null)))},Zt=U=>J=>{var Ce;const de=J.querySelectorAll("pre > code");for(const xe of de){const we=xe.textContent||"",pt=document.createElement("div");(Ce=xe==null?void 0:xe.parentElement)==null||Ce.prepend(pt),Oe.render(r.createElement(Gt.Z,{theme:U},r.createElement(Qt,{text:we})),pt)}return J},Xe=()=>U=>{var J;return(J=U.querySelector(".md-header"))==null||J.remove(),U},ue=()=>U=>{var J,de;return(J=U.querySelector(".md-footer .md-copyright"))==null||J.remove(),(de=U.querySelector(".md-footer-copyright"))==null||de.remove(),U},j=({onLoading:U,onLoaded:J})=>de=>(U(),de.addEventListener(i.Ox,function Ce(){J(),de.removeEventListener(i.Ox,Ce)}),de),ye=()=>U=>(setTimeout(()=>{var J;if(window.location.hash){const de=window.location.hash.slice(1);(J=U==null?void 0:U.querySelector(`[id="${de}"]`))==null||J.scrollIntoView()}},200),U),Ke=()=>U=>(setTimeout(()=>{const J=U==null?void 0:U.querySelectorAll("li.md-nav__item--active");J.length!==0&&(J.forEach(Ce=>{const xe=Ce==null?void 0:Ce.querySelector("input");xe!=null&&xe.checked||xe==null||xe.click()}),J[J.length-1].scrollIntoView())},200),U),qe=async(U,J)=>{let de;if(typeof U=="string")de=new DOMParser().parseFromString(U,"text/html").documentElement;else if(U instanceof Element)de=U;else throw new Error("dom is not a recognized type");for(const Ce of J)de=await Ce(de);return de},st="screen and (max-width: 76.1875em)",St=U=>{const J=(0,re.s0)(),de=(0,le.Z)(),Ce=(0,Re.Z)(st),xe=pe(),we=z(),pt=(0,D.useApi)(i.Dl),Kt=(0,D.useApi)(Fe.q3),{state:zt,path:Mt,content:It}=(0,O.DK)(),[it,wt]=(0,r.useState)(null),sn=(0,i.ux)(it),Wt=(0,r.useCallback)(()=>{if(!it)return;it.querySelectorAll(".md-sidebar").forEach(Lt=>{var hn,Rn,ln;if(Ce)Lt.style.top="0px";else{const gn=document==null?void 0:document.querySelector(".techdocs-reader-page"),w=(hn=gn==null?void 0:gn.getBoundingClientRect().top)!=null?hn:0;let g=(Rn=it.getBoundingClientRect().top)!=null?Rn:0;const C=it.querySelector(".md-container > .md-tabs"),F=(ln=C==null?void 0:C.getBoundingClientRect().height)!=null?ln:0;g<w&&(g=w),Lt.style.top=`${Math.max(g,0)+F}px`}Lt.style.setProperty("opacity","1")})},[it,Ce]);(0,r.useEffect)(()=>(window.addEventListener("resize",Wt),window.addEventListener("scroll",Wt,!0),()=>{window.removeEventListener("resize",Wt),window.removeEventListener("scroll",Wt,!0)}),[it,Wt]);const nn=(0,r.useCallback)(()=>{if(!it)return;const Ht=it.querySelector(".md-footer");Ht&&(Ht.style.width=`${it.getBoundingClientRect().width}px`)},[it]);(0,r.useEffect)(()=>(window.addEventListener("resize",nn),()=>{window.removeEventListener("resize",nn)}),[it,nn]),(0,r.useEffect)(()=>{sn||(nn(),Wt())},[zt,sn,nn,Wt]);const Bn=(0,r.useCallback)((Ht,Lt)=>qe(Ht,[xe,ce({techdocsStorageApi:pt,entityId:U,path:Lt}),ut(),Rt(),Xe(),ue(),Ge(Kt),we]),[U,Kt,pt,xe,we]),Zn=(0,r.useCallback)(async Ht=>qe(Ht,[ye(),Ke(),Zt(de),xt({baseUrl:window.location.origin,onClick:(Lt,hn)=>{var gn;const Rn=Lt.ctrlKey||Lt.metaKey,ln=new URL(hn);ln.hash?Rn?window.open(`${ln.pathname}${ln.hash}`,"_blank"):(J(`${ln.pathname}${ln.hash}`),(gn=Ht==null?void 0:Ht.querySelector(`#${ln.hash.slice(1)}`))==null||gn.scrollIntoView()):Rn?window.open(ln.pathname,"_blank"):J(ln.pathname)}}),j({onLoading:()=>{},onLoaded:()=>{var Lt;(Lt=Ht.querySelector(".md-nav__title"))==null||Lt.removeAttribute("for")}}),j({onLoading:()=>{Array.from(Ht.querySelectorAll(".md-sidebar")).forEach(hn=>{hn.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[de,J]);return(0,r.useEffect)(()=>{if(!It)return()=>{};let Ht=!0;return Bn(It,Mt).then(async Lt=>{if(!(Lt!=null&&Lt.innerHTML)||!Ht)return;window.scroll({top:0});const hn=await Zn(Lt);wt(hn)}),()=>{Ht=!1}},[It,Mt,Bn,Zn]),it};var Yt=e(8560);const _t=()=>{const U=(0,i.$L)(),{shadowRoot:J}=(0,i.x1)(),de=J==null?void 0:J.querySelector('[data-md-component="content"]'),Ce=J==null?void 0:J.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let xe=Ce==null?void 0:Ce.querySelector('[data-techdocs-addons-location="primary sidebar"]');xe||(xe=document.createElement("div"),xe.setAttribute("data-techdocs-addons-location","primary sidebar"),Ce==null||Ce.prepend(xe));const we=J==null?void 0:J.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let pt=we==null?void 0:we.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return pt||(pt=document.createElement("div"),pt.setAttribute("data-techdocs-addons-location","secondary sidebar"),we==null||we.prepend(pt)),r.createElement(r.Fragment,null,r.createElement(Yt.Z,{container:xe},U.renderComponentsByLocation(i.oZ.PrimarySidebar)),r.createElement(Yt.Z,{container:de},U.renderComponentsByLocation(i.oZ.Content)),r.createElement(Yt.Z,{container:pt},U.renderComponentsByLocation(i.oZ.SecondarySidebar)))},en=(0,t.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),mn=(0,O.m1)(U=>{var It;const{withSearch:J=!0,onReady:de}=U,Ce=en(),{entityMetadata:{value:xe,loading:we},entityRef:pt,setShadowRoot:Kt}=(0,i.x1)(),zt=St(pt),Mt=(0,r.useCallback)(it=>{Kt(it),de instanceof Function&&de()},[Kt,de]);return we===!1&&!xe?r.createElement(R.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}):zt?r.createElement(R.Content,null,r.createElement(c.Z,{container:!0},r.createElement(c.Z,{xs:12,item:!0},r.createElement(K,null)),J&&r.createElement(c.Z,{className:Ce.search,xs:"auto",item:!0},r.createElement(f.S,{entityId:pt,entityTitle:(It=xe==null?void 0:xe.metadata)==null?void 0:It.title})),r.createElement(c.Z,{xs:12,item:!0},r.createElement(i.VA,{element:zt,onAppend:Mt},r.createElement(_t,null))))):r.createElement(R.Content,null,r.createElement(c.Z,{container:!0},r.createElement(c.Z,{xs:12,item:!0},r.createElement(K,null))))}),Xt=null},99954:function(ne,s,e){"use strict";e.d(s,{S:function(){return E}});var r=e(2784),t=e(18671),c=e(98069),i=e(73250),R=e(56338),f=e(17429),o=e(48023),u=e(82339),m=e(36964),y=e(68725);const h=r.createElement(c.Z,{animation:"wave",variant:"text",height:40}),E=S=>{const{children:b}=S,L=(0,R.$L)(),$=(0,m.useApi)(m.configApiRef),{title:B,setTitle:D,subtitle:x,setSubtitle:O,entityRef:M,metadata:{value:K,loading:re},entityMetadata:{value:le,loading:Re}}=(0,R.x1)();(0,r.useEffect)(()=>{!K||(D(ht=>{const{site_name:lt}=K;return ht||lt}),O(ht=>{let{site_description:lt}=K;return(!lt||lt==="None")&&(lt="Home"),ht||lt}))},[K,D,O]);const Fe=$.getOptional("app.title")||"Backstage",Be=[B,x,Fe].filter(Boolean).join(" | "),{locationMetadata:He,spec:ve}=le||{},Je=ve==null?void 0:ve.lifecycle,tt=le?(0,f.getEntityRelations)(le,o.S4):[],Tt=(0,m.useRouteRef)(y._Z)(),At=r.createElement(r.Fragment,null,r.createElement(u.HeaderLabel,{label:"Component",value:r.createElement(f.EntityRefLink,{color:"inherit",entityRef:M,title:le==null?void 0:le.metadata.title,defaultKind:"Component"})}),tt.length>0&&r.createElement(u.HeaderLabel,{label:"Owner",value:r.createElement(f.EntityRefLinks,{color:"inherit",entityRefs:tt,defaultKind:"group"})}),Je?r.createElement(u.HeaderLabel,{label:"Lifecycle",value:Je}):null,He&&He.type!=="dir"&&He.type!=="file"?r.createElement(u.HeaderLabel,{label:"",value:r.createElement("a",{href:He.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(i.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return!Re&&le===void 0||!re&&K===void 0?null:r.createElement(u.Header,{type:"Documentation",typeLink:Tt,title:B||h,subtitle:x||h},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,Be)),At,b,L.renderComponentsByLocation(R.oZ.Header))}},16172:function(ne,s,e){"use strict";e.d(s,{b:function(){return h}});var r=e(2784),t=e(79692),c=e(15223),i=e(95544),R=e(80030),f=e(61837),o=e(48348),u=e(47603),m=e(56338);const y=(0,t.Z)(E=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:E.spacing(3,3,0)}})),h=({toolbarProps:E})=>{const S=y(),[b,L]=(0,r.useState)(null),$=(0,r.useCallback)(re=>{L(re.currentTarget)},[]),B=(0,r.useCallback)(()=>{L(null)},[]),{entityMetadata:{value:D,loading:x}}=(0,m.x1)(),O=(0,m.$L)(),M=O.renderComponentsByLocation(m.oZ.Subheader),K=O.renderComponentsByLocation(m.oZ.Settings);return!M&&!K||x===!1&&!D?null:r.createElement(c.Z,{classes:S,...E},r.createElement(i.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},M,K?r.createElement(r.Fragment,null,r.createElement(R.ZP,{title:"Settings"},r.createElement(f.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:$},r.createElement(u.Z,null))),r.createElement(o.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:b,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(b),onClose:B,keepMounted:!0},K)):null))}},2263:function(ne,s,e){"use strict";e.d(s,{DK:function(){return h},m1:function(){return S}});var r=e(2784),t=e(10289),c=e(56338),i=e(36964),R=e(64279),f=e(77446);function o({contentLoading:b,content:L,activeSyncState:$}){return b||$==="BUILD_READY_RELOAD"||!L&&$==="CHECKING"?"CHECKING":!L&&$==="BUILDING"?"INITIAL_BUILD":L?$==="BUILDING"?"CONTENT_STALE_REFRESHING":$==="BUILD_READY"?"CONTENT_STALE_READY":$==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function u(b,L){const $={...b};switch(L.type){case"sync":L.state==="CHECKING"&&($.buildLog=[]),$.activeSyncState=L.state,$.syncError=L.syncError;break;case"contentLoading":$.contentLoading=!0,$.contentError=void 0;break;case"content":typeof L.path=="string"&&($.path=L.path),$.contentLoading=!1,$.content=L.content,$.contentError=L.contentError;break;case"buildLog":$.buildLog=$.buildLog.concat(L.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes($.activeSyncState)&&["contentLoading","content"].includes(L.type)&&($.activeSyncState="UP_TO_DATE",$.buildLog=[]),$}function m(b,L,$,B){var le,Re;const[D,x]=(0,r.useReducer)(u,{activeSyncState:"CHECKING",path:B,contentLoading:!0,buildLog:[]}),O=(0,i.useApi)(c.Dl),{retry:M}=(0,f.Z)(async()=>{x({type:"contentLoading"});try{const Fe=await O.getEntityDocs({kind:b,namespace:L,name:$},B);return x({type:"content",content:Fe,path:B}),Fe}catch(Fe){x({type:"content",contentError:Fe,path:B})}},[O,b,L,$,B]),K=(0,r.useRef)({content:void 0,reload:()=>{}});return K.current={content:D.content,reload:M},(0,R.default)(async()=>{x({type:"sync",state:"CHECKING"});const Fe=setTimeout(()=>{x({type:"sync",state:"BUILDING"})},1e3);try{switch(await O.syncEntityDocs({kind:b,namespace:L,name:$},He=>{x({type:"buildLog",log:He})})){case"updated":K.current.content?x({type:"sync",state:"BUILD_READY"}):(K.current.reload(),x({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":x({type:"sync",state:"UP_TO_DATE"});break;default:x({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(Be){x({type:"sync",state:"ERROR",syncError:Be})}finally{clearTimeout(Fe)}},[b,$,L,O,x,K]),{state:(0,r.useMemo)(()=>o({activeSyncState:D.activeSyncState,contentLoading:D.contentLoading,content:D.content}),[D.activeSyncState,D.content,D.contentLoading]),contentReload:M,path:D.path,content:D.content,contentErrorMessage:(le=D.contentError)==null?void 0:le.toString(),syncErrorMessage:(Re=D.syncError)==null?void 0:Re.toString(),buildLog:D.buildLog}}const y=(0,r.createContext)({}),h=()=>(0,r.useContext)(y),E=({children:b})=>{const{"*":L=""}=(0,t.UO)(),{entityRef:$}=(0,c.x1)(),{kind:B,namespace:D,name:x}=$,O=m(B,D,x,L);return r.createElement(y.Provider,{value:O},b instanceof Function?b(O):b)},S=b=>L=>r.createElement(E,null,r.createElement(b,{...L}))},96393:function(ne,s,e){"use strict";e.d(s,{Fq:function(){return i.F},SE:function(){return c.S}});var r=e(2263),t=e(26220),c=e(99954),i=e(16639),R=e(16172)},68725:function(ne,s,e){"use strict";e.d(s,{Fw:function(){return c},_Z:function(){return t},pd:function(){return i}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),c=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),i=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},47861:function(ne,s,e){"use strict";e.d(s,{S:function(){return K}});var r=e(2784),t=e(79692),c=e(49378),i=e(38402),R=e(86136),f=e(85256),o=e(82339),u=e(36964),m=e(74450);const y=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),h=re=>{const{result:le,highlight:Re,rank:Fe,lineClamp:Be=5,asListItem:He=!0,asLink:ve=!0,title:Je,icon:tt}=re,Tt=y(),At=(0,u.useAnalytics)(),Ie=()=>{At.captureEvent("discover",le.title,{attributes:{to:le.location},value:Fe})},mt=()=>{const ee=Re!=null&&Re.fields.title?r.createElement(m.FA,{text:Re.fields.title,preTag:Re.preTag,postTag:Re.postTag}):le.title,pe=Re!=null&&Re.fields.entityTitle?r.createElement(m.FA,{text:Re.fields.entityTitle,preTag:Re.preTag,postTag:Re.postTag}):le.entityTitle,be=Re!=null&&Re.fields.name?r.createElement(m.FA,{text:Re.fields.name,preTag:Re.preTag,postTag:Re.postTag}):le.name;return r.createElement(c.Z,{className:Tt.itemText,primaryTypographyProps:{variant:"h6"},primary:Je||r.createElement(r.Fragment,null,ee," | ",pe!=null?pe:be," docs"),secondary:r.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:Be,overflow:"hidden"}},Re!=null&&Re.fields.text?r.createElement(m.FA,{text:Re.fields.text,preTag:Re.preTag,postTag:Re.postTag}):le.text)})},ht=({children:ee})=>ve?r.createElement(o.Link,{noTrack:!0,to:le.location,onClick:Ie},ee):r.createElement(r.Fragment,null,ee),lt=({children:ee})=>He?r.createElement(r.Fragment,null,r.createElement(i.Z,{alignItems:"flex-start"},tt&&r.createElement(R.Z,null,tt),r.createElement("div",{className:Tt.flexContainer},ee)),r.createElement(f.Z,{component:"li"})):r.createElement(r.Fragment,null,ee);return r.createElement(ht,null,r.createElement(lt,null,r.createElement(mt,null)))};var E=e(86619),S=e(50581),b=e(61837),L=e(4614),$=e(21853),B=e(88013),D=e(10289),x=e(48760);const O=(0,t.Z)({root:{width:"100%"}}),M=re=>{const{entityId:le,entityTitle:Re,debounceTime:Fe=150}=re,[Be,He]=(0,r.useState)(!1),ve=(0,D.s0)(),{term:Je,setTerm:tt,setFilters:Tt,result:{loading:At,value:Ie}}=(0,m.Rx)(),mt=O(),[ht,lt]=(0,r.useState)([]);(0,r.useEffect)(()=>{let se=!0;if(se&&Ie){const ae=Ie.results.slice(0,10);lt(ae)}return()=>{se=!1}},[At,Ie]);const[ee,pe]=(0,r.useState)(Je);(0,x.Z)(()=>tt(ee),Fe,[ee]);const{kind:be,name:We,namespace:et}=le;(0,r.useEffect)(()=>{Tt(se=>({...se,kind:be,namespace:et,name:We}))},[be,et,We,Tt]);const at=se=>{Be||He(!0),pe(se.target.value)},yt=(se,ae)=>{if(ae!=null&&ae.document){const{location:Ye}=ae.document;ve(Ye)}};return r.createElement(B.ZP,{classes:{root:mt.root},"data-testid":"techdocs-search-bar",size:"small",open:Be,getOptionLabel:()=>"",filterOptions:se=>se,onClose:()=>{He(!1)},onFocus:()=>{He(!0)},onChange:yt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:ht,renderOption:({document:se,highlight:ae})=>r.createElement(h,{result:se,lineClamp:3,asListItem:!1,asLink:!1,title:se.title,highlight:ae}),loading:At,renderInput:se=>r.createElement(E.Z,{...se,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${Re||le.name} docs`,value:ee,onChange:at,InputProps:{...se.InputProps,startAdornment:r.createElement(S.Z,{position:"start"},r.createElement(b.Z,{"aria-label":"Query",disabled:!0},r.createElement($.Z,null))),endAdornment:r.createElement(r.Fragment,null,At?r.createElement(L.Z,{color:"inherit",size:20}):null,se.InputProps.endAdornment)}})})},K=re=>{const le={term:"",types:["techdocs"],pageCursor:"",filters:re.entityId};return r.createElement(m.Nd,{initialState:le},r.createElement(M,{...re}))}},98157:function(){},53260:function(){}},function(ne){var s=function(r){return ne(ne.s=r)};ne.O(0,[2370,6202,9284,9035,2126,7012,2194,4983,3222,6816,5218,4736],function(){return s(88649),s(90775)});var e=ne.O()}]);})();
491
+
492
+ //# sourceMappingURL=main.1f269f7a.js.map