@techdocs/cli 0.8.16 → 0.8.17-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/{PublisherConfig-a09bdfcc.cjs.js → PublisherConfig-162efac5.cjs.js} +1 -1
  3. package/dist/cjs/{PublisherConfig-a09bdfcc.cjs.js.map → PublisherConfig-162efac5.cjs.js.map} +1 -1
  4. package/dist/cjs/{generate-20171bf9.cjs.js → generate-143a6de3.cjs.js} +4 -4
  5. package/dist/cjs/generate-143a6de3.cjs.js.map +1 -0
  6. package/dist/cjs/{migrate-04a51fb3.cjs.js → migrate-181e95f5.cjs.js} +5 -5
  7. package/dist/cjs/migrate-181e95f5.cjs.js.map +1 -0
  8. package/dist/cjs/{mkdocs-f1cf9408.cjs.js → mkdocs-30f530ff.cjs.js} +3 -3
  9. package/dist/cjs/{mkdocs-f1cf9408.cjs.js.map → mkdocs-30f530ff.cjs.js.map} +1 -1
  10. package/dist/cjs/{mkdocsServer-7058189d.cjs.js → mkdocsServer-758a3ae9.cjs.js} +1 -1
  11. package/dist/cjs/{mkdocsServer-7058189d.cjs.js.map → mkdocsServer-758a3ae9.cjs.js.map} +1 -1
  12. package/dist/cjs/{publish-d1ccb001.cjs.js → publish-7bf1e5f7.cjs.js} +5 -5
  13. package/dist/cjs/publish-7bf1e5f7.cjs.js.map +1 -0
  14. package/dist/cjs/{serve-be4ef843.cjs.js → serve-21d1e885.cjs.js} +3 -3
  15. package/dist/cjs/serve-21d1e885.cjs.js.map +1 -0
  16. package/dist/cjs/{utility-6042a9ba.cjs.js → utility-51f4a306.cjs.js} +1 -1
  17. package/dist/cjs/utility-51f4a306.cjs.js.map +1 -0
  18. package/dist/embedded-app/index.html +1 -1
  19. package/dist/embedded-app/static/{1553.8d50cd6e.chunk.js → 1553.b7bcb06c.chunk.js} +2 -2
  20. package/dist/embedded-app/static/{1553.8d50cd6e.chunk.js.map → 1553.b7bcb06c.chunk.js.map} +1 -1
  21. package/dist/embedded-app/static/{1959.3c856a1e.chunk.js → 1959.6c1762da.chunk.js} +2 -2
  22. package/dist/embedded-app/static/{1959.3c856a1e.chunk.js.map → 1959.6c1762da.chunk.js.map} +1 -1
  23. package/dist/embedded-app/static/{2426.0fc592b4.chunk.js → 2426.92f98d58.chunk.js} +2 -2
  24. package/dist/embedded-app/static/{2426.0fc592b4.chunk.js.map → 2426.92f98d58.chunk.js.map} +1 -1
  25. package/dist/embedded-app/static/3696.77a82030.chunk.js +3 -0
  26. package/dist/embedded-app/static/{5011.c8e98520.chunk.js.map → 3696.77a82030.chunk.js.map} +1 -1
  27. package/dist/embedded-app/static/{390.879c2086.chunk.js → 390.b97bc67e.chunk.js} +2 -2
  28. package/dist/embedded-app/static/{390.879c2086.chunk.js.map → 390.b97bc67e.chunk.js.map} +1 -1
  29. package/dist/embedded-app/static/{4022.0fe21618.chunk.js → 4022.482a5f92.chunk.js} +2 -2
  30. package/dist/embedded-app/static/{4022.0fe21618.chunk.js.map → 4022.482a5f92.chunk.js.map} +1 -1
  31. package/dist/embedded-app/static/{6235.c0346cdc.chunk.js → 6235.a1086c98.chunk.js} +2 -2
  32. package/dist/embedded-app/static/{6235.c0346cdc.chunk.js.map → 6235.a1086c98.chunk.js.map} +1 -1
  33. package/dist/embedded-app/static/{6583.ad8c5d41.chunk.js → 6583.035b49a3.chunk.js} +2 -2
  34. package/dist/embedded-app/static/{6583.ad8c5d41.chunk.js.map → 6583.035b49a3.chunk.js.map} +1 -1
  35. package/dist/embedded-app/static/7110.cac06b1c.chunk.js +3 -0
  36. package/dist/embedded-app/static/7110.cac06b1c.chunk.js.map +1 -0
  37. package/dist/embedded-app/static/{7758.2fe27149.chunk.js → 7758.cb484a7b.chunk.js} +2 -2
  38. package/dist/embedded-app/static/{7758.2fe27149.chunk.js.map → 7758.cb484a7b.chunk.js.map} +1 -1
  39. package/dist/embedded-app/static/{8061.8b41800d.chunk.js → 8061.b8ba1848.chunk.js} +2 -2
  40. package/dist/embedded-app/static/{8061.8b41800d.chunk.js.map → 8061.b8ba1848.chunk.js.map} +1 -1
  41. package/dist/embedded-app/static/8718.71563d4c.chunk.js +4 -0
  42. package/dist/embedded-app/static/{8718.8a863f87.chunk.js.map → 8718.71563d4c.chunk.js.map} +1 -1
  43. package/dist/embedded-app/static/{8792.c72ab612.chunk.js → 8792.e74d00e0.chunk.js} +2 -2
  44. package/dist/embedded-app/static/{8792.c72ab612.chunk.js.map → 8792.e74d00e0.chunk.js.map} +1 -1
  45. package/dist/embedded-app/static/{9028.decd1f17.chunk.js → 9028.0f028f46.chunk.js} +2 -2
  46. package/dist/embedded-app/static/{9028.decd1f17.chunk.js.map → 9028.0f028f46.chunk.js.map} +1 -1
  47. package/dist/embedded-app/static/main.a81ffeda.js +444 -0
  48. package/dist/embedded-app/static/main.a81ffeda.js.map +1 -0
  49. package/dist/embedded-app/static/{runtime.a73a2a40.js → runtime.a81ffeda.js} +2 -2
  50. package/dist/embedded-app/static/{runtime.a73a2a40.js.map → runtime.a81ffeda.js.map} +1 -1
  51. package/dist/embedded-app/static/{vendor.a73a2a40.js → vendor.a81ffeda.js} +3 -3
  52. package/dist/embedded-app/static/vendor.a81ffeda.js.map +1 -0
  53. package/dist/index.cjs.js +8 -8
  54. package/dist/index.cjs.js.map +1 -1
  55. package/package.json +11 -11
  56. package/dist/cjs/generate-20171bf9.cjs.js.map +0 -1
  57. package/dist/cjs/migrate-04a51fb3.cjs.js.map +0 -1
  58. package/dist/cjs/publish-d1ccb001.cjs.js.map +0 -1
  59. package/dist/cjs/serve-be4ef843.cjs.js.map +0 -1
  60. package/dist/cjs/utility-6042a9ba.cjs.js.map +0 -1
  61. package/dist/embedded-app/static/5011.c8e98520.chunk.js +0 -3
  62. package/dist/embedded-app/static/7110.5f7b5114.chunk.js +0 -3
  63. package/dist/embedded-app/static/7110.5f7b5114.chunk.js.map +0 -1
  64. package/dist/embedded-app/static/8718.8a863f87.chunk.js +0 -4
  65. package/dist/embedded-app/static/main.a73a2a40.js +0 -444
  66. package/dist/embedded-app/static/main.a73a2a40.js.map +0 -1
  67. package/dist/embedded-app/static/vendor.a73a2a40.js.map +0 -1
@@ -1,444 +0,0 @@
1
- (()=>{var Vi=Object.defineProperty;var ji=(ee,s,e)=>s in ee?Vi(ee,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):ee[s]=e;var oe=(ee,s,e)=>(ji(ee,typeof s!="symbol"?s+"":s,e),e),so=(ee,s,e)=>{if(!s.has(ee))throw TypeError("Cannot "+e)};var Ye=(ee,s,e)=>(so(ee,s,"read from private field"),e?e.call(ee):s.get(ee)),rn=(ee,s,e)=>{if(s.has(ee))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(ee):s.set(ee,e)},un=(ee,s,e,n)=>(so(ee,s,"write to private field"),n?n.call(ee,e):s.set(ee,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(ee,s,e){"use strict";e.d(s,{n3:function(){return v},MS:function(){return l}});var n=e(48023),t=e(10179),c=e(96279),m=e.n(c);const v=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class l{constructor(h){oe(this,"discoveryApi");oe(this,"fetchApi");this.discoveryApi=h.discoveryApi,this.fetchApi=h.fetchApi||{fetch:m()}}async getEntityAncestors(h,i){const{kind:E,namespace:g,name:R}=(0,n.of)(h.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(E)}/${encodeURIComponent(g)}/${encodeURIComponent(R)}/ancestry`,i)}async getLocationById(h,i){return await this.requestOptional("GET",`/locations/${encodeURIComponent(h)}`,i)}async getEntities(h,i){const{filter:E=[],fields:g=[],offset:R,limit:T,after:N}=h!=null?h:{},I=[];for(const L of[E].flat()){const B=[];for(const[z,K]of Object.entries(L))for(const ce of[K].flat())ce===v?B.push(encodeURIComponent(z)):typeof ce=="string"&&B.push(`${encodeURIComponent(z)}=${encodeURIComponent(ce)}`);B.length&&I.push(`filter=${B.join(",")}`)}g.length&&I.push(`fields=${g.map(encodeURIComponent).join(",")}`),R!==void 0&&I.push(`offset=${R}`),T!==void 0&&I.push(`limit=${T}`),N!==void 0&&I.push(`after=${encodeURIComponent(N)}`);const j=I.length?`?${I.join("&")}`:"",D=await this.requestRequired("GET",`/entities${j}`,i),C=(L,B)=>{var ce,he;if(((ce=L.metadata)==null?void 0:ce.name)===void 0||L.kind===void 0||((he=B.metadata)==null?void 0:he.name)===void 0||B.kind===void 0)return 0;const z=(0,n.eE)(L),K=(0,n.eE)(B);return z<K?-1:z>K?1:0};return{items:D.sort(C)}}async getEntityByRef(h,i){const{kind:E,namespace:g,name:R}=(0,n.of)(h);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(E)}/${encodeURIComponent(g)}/${encodeURIComponent(R)}`,i)}async getEntityByName(h,i){const{kind:E,namespace:g="default",name:R}=h;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(E)}/${encodeURIComponent(g)}/${encodeURIComponent(R)}`,i)}async refreshEntity(h,i){const E=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(i==null?void 0:i.token)&&{Authorization:`Bearer ${i==null?void 0:i.token}`}},method:"POST",body:JSON.stringify({entityRef:h})});if(E.status!==200)throw new Error(await E.text())}async getEntityFacets(h,i){const{filter:E=[],facets:g}=h,R=[];for(const N of[E].flat()){const I=[];for(const[j,D]of Object.entries(N))for(const C of[D].flat())C===v?I.push(encodeURIComponent(j)):typeof C=="string"&&I.push(`${encodeURIComponent(j)}=${encodeURIComponent(C)}`);I.length&&R.push(`filter=${I.join(",")}`)}for(const N of g)R.push(`facet=${encodeURIComponent(N)}`);const T=R.length?`?${R.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${T}`,i)}async addLocation({type:h="url",target:i,dryRun:E,presence:g},R){const T=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${E?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(R==null?void 0:R.token)&&{Authorization:`Bearer ${R==null?void 0:R.token}`}},method:"POST",body:JSON.stringify({type:h,target:i,presence:g})});if(T.status!==201)throw new Error(await T.text());const{location:N,entities:I,exists:j}=await T.json();if(!N)throw new Error(`Location wasn't added: ${i}`);return{location:N,entities:I,exists:j}}async getOriginLocationByEntity(h,i){var R;const E=(R=h.metadata.annotations)==null?void 0:R[n.q1];return E?(await this.requestRequired("GET","/locations",i)).map(T=>T.data).find(T=>E===(0,n.NZ)(T)):void 0}async getLocationByEntity(h,i){var R;const E=(R=h.metadata.annotations)==null?void 0:R[n.P1];return E?(await this.requestRequired("GET","/locations",i)).map(T=>T.data).find(T=>E===(0,n.NZ)(T)):void 0}async getLocationByRef(h,i){return(await this.requestRequired("GET","/locations",i)).map(g=>g.data).find(g=>h===(0,n.NZ)(g))}async removeLocationById(h,i){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(h)}`,i)}async removeEntityByUid(h,i){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(h)}`,i)}async requestIgnored(h,i,E){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${i}`,R=(E==null?void 0:E.token)?{Authorization:`Bearer ${E.token}`}:{},T=await this.fetchApi.fetch(g,{method:h,headers:R});if(!T.ok)throw await t.VL.fromResponse(T)}async requestRequired(h,i,E){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${i}`,R=(E==null?void 0:E.token)?{Authorization:`Bearer ${E.token}`}:{},T=await this.fetchApi.fetch(g,{method:h,headers:R});if(!T.ok)throw await t.VL.fromResponse(T);return await T.json()}async requestOptional(h,i,E){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${i}`,R=(E==null?void 0:E.token)?{Authorization:`Bearer ${E.token}`}:{},T=await this.fetchApi.fetch(g,{method:h,headers:R});if(!T.ok){if(T.status===404)return;throw await t.VL.fromResponse(T)}return await T.json()}}},48023:function(ee,s,e){"use strict";e.d(s,{Tf:function(){return c},P1:function(){return Ae},q1:function(){return Te},M6:function(){return Oe},l2:function(){return t},zG:function(){return n},w$:function(){return Z},nP:function(){return q},aS:function(){return xe},hr:function(){return ae},S4:function(){return Be},cz:function(){return Ze},iB:function(){return Je},of:function(){return He},Ou:function(){return yt},eE:function(){return Qe},NZ:function(){return lt}});const n="default",t="backstage.io/view-url",c="backstage.io/edit-url";var m=e(76635),v=e.n(m);class l{constructor(x=DEFAULT_NAMESPACE){oe(this,"namespace");this.namespace=x}async enforce(x){return x.metadata.namespace?x:lodash.merge({metadata:{namespace:this.namespace}},x)}}class o{static isValidPrefixAndOrSuffix(x,b,u,y){if(typeof x!="string")return!1;const P=x.split(b);return P.length===1?y(P[0]):P.length===2?u(P[0])&&y(P[1]):!1}static isJsonSafe(x){try{return v().isEqual(x,JSON.parse(JSON.stringify(x)))}catch{return!1}}static isValidDnsSubdomain(x){return typeof x=="string"&&x.length>=1&&x.length<=253&&x.split(".").every(o.isValidDnsLabel)}static isValidDnsLabel(x){return typeof x=="string"&&x.length>=1&&x.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(x)}static isValidTag(x){return typeof x=="string"&&x.length>=1&&x.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(x)}static isValidUrl(x){if(typeof x!="string")return!1;try{return new URL(x),!0}catch{return!1}}static isValidString(x){var b;return typeof x=="string"&&((b=x==null?void 0:x.trim())==null?void 0:b.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}}}}}'),i=e(48231),E=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"}}}`),g=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==","generation":13,"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},"generation":{"type":"integer","description":"A positive nonzero number that indicates the current generation of data for this entity; the value is incremented each time the spec changes. 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.","examples":[1],"minimum":1,"deprecated":true},"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}}}}}}'),R=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","target"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference"}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const T=new Map,N=[h,E,g,R];function I($){if(!($==null?void 0:$.length))throw new TypeError("Unknown error");const x=$[0];throw new TypeError(`${x.dataPath||"<root>"} ${x.message}${x.params?` - ${Object.entries(x.params).map(([b,u])=>`${b}: ${u}`).join(", ")}`:""}`)}function j($,x={}){var _;const b=(_=x==null?void 0:x.disableCache)!=null?_:!1,u=b?"":JSON.stringify($);if(!b){const te=T.get(u);if(te)return te}const y=D($),P=new i.ZP({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});y.length&&P.addSchema(y,void 0,void 0,!0);const F=P.compile($);return b||T.set(u,F),F}function D($){if(typeof $!="object")return[];const x=new Set;$.$id&&x.add($.$id);const b=new Array,u=[$];for(;u.length;){const y=u.pop();for(const P of C(y))if(!x.has(P)){x.add(P);const F=N.find(_=>_.$id===P);F&&(b.push(F),u.push(F))}}return b}function*C($){const x=[$];for(;x.length;){const b=x.pop();if(typeof b=="object"&&b)for(const[u,y]of Object.entries(b))u==="$ref"&&typeof y=="string"?yield y.split("#")[0]:x.push(y)}}function L($){const x=compileAjvSchema($||entityEnvelopeSchema);return b=>{if(x(b)===!0)return b;throw throwAjvError(x.errors)}}function B($){const x=j($);return b=>{var P;if(x(b)===!0)return b;const y=(P=x.errors)==null?void 0:P.filter(F=>["/kind","/apiVersion"].includes(F.dataPath));if((y==null?void 0:y.length)&&y.every(F=>F.keyword==="enum"))return!1;throw I(x.errors)}}function z($){const x=compileAjvSchema($||entitySchema);return b=>{if(x(b)===!0)return b;throw throwAjvError(x.errors)}}class K{static isValidApiVersion(x){return o.isValidPrefixAndOrSuffix(x,"/",o.isValidDnsSubdomain,b=>b.length>=1&&b.length<=63&&/^[a-z0-9A-Z]+$/.test(b))}static isValidKind(x){return typeof x=="string"&&x.length>=1&&x.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(x)}static isValidObjectName(x){return typeof x=="string"&&x.length>=1&&x.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(x)}static isValidNamespace(x){return o.isValidDnsLabel(x)}static isValidLabelKey(x){return o.isValidPrefixAndOrSuffix(x,"/",o.isValidDnsSubdomain,K.isValidObjectName)}static isValidLabelValue(x){return x===""||K.isValidObjectName(x)}static isValidAnnotationKey(x){return o.isValidPrefixAndOrSuffix(x,"/",o.isValidDnsSubdomain,K.isValidObjectName)}static isValidAnnotationValue(x){return typeof x=="string"}}const ce={isValidApiVersion:K.isValidApiVersion,isValidKind:K.isValidKind,isValidEntityName:K.isValidObjectName,isValidNamespace:K.isValidNamespace,isValidLabelKey:K.isValidLabelKey,isValidLabelValue:K.isValidLabelValue,isValidAnnotationKey:K.isValidAnnotationKey,isValidAnnotationValue:K.isValidAnnotationValue,isValidTag:o.isValidTag};function he($={}){return{...ce,...$}}class ve{constructor(x=makeValidator()){oe(this,"validators");this.validators=x}async enforce(x){var F,_,te,re,le,ge,Ne;function b(Pe,$e,Ge){if($e==null)throw new Error(`${Pe} must have a value`);let At;try{At=Ge($e)}catch(qe){throw new Error(`${Pe} could not be validated, ${qe}`)}if(!At){let qe;switch(Ge.name){case"isValidLabelValue":case"isValidObjectName":qe="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":qe="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":qe="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":qe="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":qe="a string";break;case"isValidKind":qe="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":qe="a string that is a valid url";break;case"isValidString":qe="a non empty string";break;default:qe=void 0;break}const Et=qe?` expected ${qe} but found "${$e}".`:"";throw new Error(`"${Pe}" is not valid;${Et} 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 u(Pe,$e,Ge){return $e===void 0||b(Pe,$e,Ge)}b("apiVersion",x.apiVersion,this.validators.isValidApiVersion),b("kind",x.kind,this.validators.isValidKind),b("metadata.name",x.metadata.name,this.validators.isValidEntityName),u("metadata.namespace",x.metadata.namespace,this.validators.isValidNamespace);for(const[Pe,$e]of Object.entries((F=x.metadata.labels)!=null?F:[]))b(`labels.${Pe}`,Pe,this.validators.isValidLabelKey),b(`labels.${Pe}`,$e,this.validators.isValidLabelValue);for(const[Pe,$e]of Object.entries((_=x.metadata.annotations)!=null?_:[]))b(`annotations.${Pe}`,Pe,this.validators.isValidAnnotationKey),b(`annotations.${Pe}`,$e,this.validators.isValidAnnotationValue);const y=(te=x.metadata.tags)!=null?te:[];for(let Pe=0;Pe<y.length;++Pe)b(`tags.${Pe}`,y[Pe],this.validators.isValidTag);const P=(re=x.metadata.links)!=null?re:[];for(let Pe=0;Pe<P.length;++Pe)b(`links.${Pe}.url`,(le=P[Pe])==null?void 0:le.url,CommonValidatorFunctions.isValidUrl),u(`links.${Pe}.title`,(ge=P[Pe])==null?void 0:ge.title,CommonValidatorFunctions.isValidString),u(`links.${Pe}.icon`,(Ne=P[Pe])==null?void 0:Ne.icon,KubernetesValidatorFunctions.isValidObjectName);return x}}class De{constructor(){oe(this,"validate")}async enforce(x){if(!this.validate){const y=new Ajv({allowUnionTypes:!0});this.validate=y.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(x)===!0)return x;const[u]=this.validate.errors||[];throw u?new Error(`Malformed envelope, ${u.dataPath||"<root>"} ${u.message}`):new Error("Malformed envelope, Unknown error")}}function pe($){var b,u;const x=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec($.trim());if(!x)throw new TypeError(`Entity reference "${$}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:(b=x[1])==null?void 0:b.slice(0,-1),namespace:(u=x[2])==null?void 0:u.slice(0,-1),name:x[3]}}const je=Je;function Je($){return{kind:$.kind,namespace:$.metadata.namespace||n,name:$.metadata.name}}function We($,x={}){const{kind:b,namespace:u,name:y}=He($,{defaultNamespace:DEFAULT_NAMESPACE,...x});if(!b)throw new Error(`Entity reference ${u}/${y} did not contain a kind`);return{kind:b,namespace:u,name:y}}function He($,x){var _,te,re,le;if(!$)throw new Error("Entity reference must not be empty");const b=x==null?void 0:x.defaultKind,u=(x==null?void 0:x.defaultNamespace)||n;let y,P,F;if(typeof $=="string"){const ge=pe($);y=(_=ge.kind)!=null?_:b,P=(te=ge.namespace)!=null?te:u,F=ge.name}else y=(re=$.kind)!=null?re:b,P=(le=$.namespace)!=null?le:u,F=$.name;if(y)if(P){if(!F){const ge=JSON.stringify($);throw new Error(`Entity reference ${ge} had missing or empty name`)}}else{const ge=JSON.stringify($);throw new Error(`Entity reference ${ge} had missing or empty namespace`)}else{const ge=JSON.stringify($);throw new Error(`Entity reference ${ge} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:y,namespace:P,name:F}}function Qe($){var y,P;let x,b,u;return"metadata"in $?(x=$.kind,b=(y=$.metadata.namespace)!=null?y:n,u=$.metadata.name):(x=$.kind,b=(P=$.namespace)!=null?P:n,u=$.name),`${x.toLocaleLowerCase("en-US")}:${b.toLocaleLowerCase("en-US")}/${u.toLocaleLowerCase("en-US")}`}class ot{constructor(x){this.policies=x}async enforce(x){let b=x;for(const u of this.policies){const y=await u.enforce(b);if(!y)throw new Error(`Policy ${u.constructor.name} did not return a result`);b=y}return b}}class we{constructor(x){this.policies=x}async enforce(x){for(const b of this.policies){const u=await b.enforce(x);if(u)return u}throw new Error("The entity did not match any known policy")}}const ke={allOf($){return new ot($)},oneOf($){return new we($)}};var rt=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 Xe($){const x=B($);return{async check(b){return x(b)===b}}}const ht=Xe(rt);var dt=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 ft=Xe(dt);var pt=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 Pt=Xe(pt);var st=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 et=Xe(st);var St=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 mt=Xe(St),Be="ownedBy",ut="ownerOf",tt="consumesApi",Ct="apiConsumedBy",it="providesApi",vt="apiProvidedBy",q="dependsOn",Z="dependencyOf",ne="parentOf",de="childOf",ae="memberOf",ye="hasMember",Ze="partOf",xe="hasPart";var ze=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 Q=Xe(ze);var H=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 w=Xe(H);var se=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 me=Xe(se),Ae="backstage.io/managed-by-location",Te="backstage.io/managed-by-origin-location",Oe="backstage.io/source-location";function yt($){if(typeof $!="string")throw new TypeError(`Unable to parse location ref '${$}', unexpected argument ${typeof $}`);const x=$.indexOf(":");if(x<0)throw new TypeError(`Unable to parse location ref '${$}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const b=$.substring(0,x).trim(),u=$.substring(x+1).trim();if(!b||!u)throw new TypeError(`Unable to parse location ref '${$}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(b==="http"||b==="https")throw new TypeError(`Invalid location ref '${$}', please prefix it with 'url:', e.g. 'url:${$}'`);return{type:b,target:u}}function lt($){const{type:x,target:b}=$;if(x){if(!b)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${x}:${b}`}function at($){var b,u,y,P,F;const x=(F=(u=(b=$.metadata)==null?void 0:b.annotations)==null?void 0:u[ANNOTATION_SOURCE_LOCATION])!=null?F:(P=(y=$.metadata)==null?void 0:y.annotations)==null?void 0:P[ANNOTATION_LOCATION];if(!x)throw new Error(`Entity '${stringifyEntityRef($)}' is missing location`);return yt(x)}},23235:function(ee,s,e){"use strict";e.d(s,{C:function(){return t}});var n=e(98005);class t{constructor(){oe(this,"subject",new n.J)}post(m){this.subject.next(m)}alert$(){return this.subject}}},47150:function(ee,s,e){"use strict";e.d(s,{g:function(){return n}});class n{captureEvent(c){}}},58652:function(ee,s,e){"use strict";e.d(s,{C:function(){return c}});var n=e(98005);const t="theme";class c{constructor(v){oe(this,"activeThemeId");oe(this,"subject",new n.X(void 0));this.themes=v}static createWithStorage(v){var h;const l=new c(v);if(!window.localStorage)return l;const o=(h=window.localStorage.getItem(t))!=null?h:void 0;return l.setActiveThemeId(o),l.activeThemeId$().subscribe(i=>{i?window.localStorage.setItem(t,i):window.localStorage.removeItem(t)}),window.addEventListener("storage",i=>{var E;if(i.key===t){const g=(E=localStorage.getItem(t))!=null?E:void 0;l.setActiveThemeId(g)}}),l}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(v){this.activeThemeId=v,this.subject.next(v)}}},14721:function(ee,s,e){"use strict";e.d(s,{m:function(){return i}});var n=e(9850),t=e.n(n),c=e(12782),m=e.n(c);const v=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function l(E){return typeof E=="object"&&E!==null&&!Array.isArray(E)}function o(E){if(E===null)return"null";if(Array.isArray(E))return"array";const g=typeof E;return g==="number"&&isNaN(E)?"nan":g==="string"&&E===""?"empty-string":g}const h={type(E,g,R,T){return`Invalid type in config for key '${E}' in '${g}', got ${R}, wanted ${T}`},missing(E){return`Missing required config value at '${E}'`},convert(E,g,R){return`Unable to convert config value for key '${E}' in '${g}' to a ${R}`}};class i{constructor(g,R="mock-config",T,N=""){oe(this,"filteredKeys");oe(this,"notifiedFilteredKeys",new Set);this.data=g,this.context=R,this.fallback=T,this.prefix=N}static fromConfigs(g){return g.length===0?new i(void 0):g.reduce((R,{data:T,context:N,filteredKeys:I,deprecatedKeys:j})=>{const D=new i(T,N,R);if(D.filteredKeys=I,j)for(const{key:C,description:L}of j)console.warn(`The configuration key '${C}' of ${N} is deprecated and may be removed soon. ${L||""}`);return D},void 0)}has(g){var T,N;return this.readValue(g)!==void 0?!0:(N=(T=this.fallback)==null?void 0:T.has(g))!=null?N:!1}keys(){var T,N;const g=this.data?Object.keys(this.data):[],R=(N=(T=this.fallback)==null?void 0:T.keys())!=null?N:[];return[...new Set([...g,...R])]}get(g){const R=this.getOptional(g);if(R===void 0)throw new Error(h.missing(this.fullKey(g!=null?g:"")));return R}getOptional(g){var N;const R=t()(this.readValue(g)),T=(N=this.fallback)==null?void 0:N.getOptional(g);return R===void 0?T:T===void 0?R:m()({},{value:T},{value:R},(I,j)=>!l(j)||!l(I)?j:void 0).value}getConfig(g){const R=this.getOptionalConfig(g);if(R===void 0)throw new Error(h.missing(this.fullKey(g)));return R}getOptionalConfig(g){var N;const R=this.readValue(g),T=(N=this.fallback)==null?void 0:N.getOptionalConfig(g);if(l(R))return this.copy(R,g,T);if(R!==void 0)throw new TypeError(h.type(this.fullKey(g),this.context,o(R),"object"));return T}getConfigArray(g){const R=this.getOptionalConfigArray(g);if(R===void 0)throw new Error(h.missing(this.fullKey(g)));return R}getOptionalConfigArray(g){const R=this.readConfigValue(g,T=>{if(!Array.isArray(T))return{expected:"object-array"};for(const[N,I]of T.entries())if(!l(I))return{expected:"object-array",value:I,key:`${g}[${N}]`};return!0});if(!!R)return R.map((T,N)=>this.copy(T,`${g}[${N}]`))}getNumber(g){const R=this.getOptionalNumber(g);if(R===void 0)throw new Error(h.missing(this.fullKey(g)));return R}getOptionalNumber(g){const R=this.readConfigValue(g,N=>typeof N=="number"||typeof N=="string"||{expected:"number"});if(typeof R=="number"||R===void 0)return R;const T=Number(R);if(!Number.isFinite(T))throw new Error(h.convert(this.fullKey(g),this.context,"number"));return T}getBoolean(g){const R=this.getOptionalBoolean(g);if(R===void 0)throw new Error(h.missing(this.fullKey(g)));return R}getOptionalBoolean(g){return this.readConfigValue(g,R=>typeof R=="boolean"||{expected:"boolean"})}getString(g){const R=this.getOptionalString(g);if(R===void 0)throw new Error(h.missing(this.fullKey(g)));return R}getOptionalString(g){return this.readConfigValue(g,R=>typeof R=="string"&&R!==""||{expected:"string"})}getStringArray(g){const R=this.getOptionalStringArray(g);if(R===void 0)throw new Error(h.missing(this.fullKey(g)));return R}getOptionalStringArray(g){return this.readConfigValue(g,R=>{if(!Array.isArray(R))return{expected:"string-array"};for(const[T,N]of R.entries())if(typeof N!="string"||N==="")return{expected:"string-array",value:N,key:`${g}[${T}]`};return!0})}fullKey(g){return`${this.prefix}${this.prefix?".":""}${g}`}copy(g,R,T){const N=new i(g,this.context,T,this.fullKey(R));return N.filteredKeys=this.filteredKeys,N}readConfigValue(g,R){var I;const T=this.readValue(g);if(T===void 0)return(I=this.fallback)==null?void 0:I.readConfigValue(g,R);const N=R(T);if(N!==!0){const{key:j=g,value:D=T,expected:C}=N;throw new TypeError(h.type(this.fullKey(j),this.context,o(D),C))}return T}readValue(g){const R=g?g.split("."):[];for(const N of R)if(!v.test(N))throw new TypeError(`Invalid config key '${g}'`);if(this.data===void 0)return;let T=this.data;for(const[N,I]of R.entries())if(l(T))T=T[I];else if(T!==void 0){const j=this.fullKey(R.slice(0,N).join("."));throw new TypeError(h.type(j,this.context,o(T),"object"))}return T}}},4333:function(ee,s,e){"use strict";e.d(s,{p:function(){return t}});const n="Invalid discovery URL pattern,";class t{static compile(m){const v=m.split(/\{\{\s*pluginId\s*\}\}/),l=v.join("pluginId");let o;try{o=new URL(l)}catch{throw new Error(`${n} URL '${l}' is invalid`)}if(o.hash)throw new Error(`${n} URL must not have a hash`);if(o.search)throw new Error(`${n} URL must not have a query`);if(l.endsWith("/"))throw new Error(`${n} URL must not end with a slash`);return new t(v)}constructor(m){this.parts=m}async getBaseUrl(m){return this.parts.join(m)}}},89536:function(ee,s,e){"use strict";e.d(s,{KN:function(){return n},gr:function(){return c},Jv:function(){return m}});class n{constructor(l,o){this.alertApi=l,this.errorApi=o}post(l,o){return(o==null?void 0:o.hidden)||this.alertApi.post({message:l.message,severity:"error"}),this.errorApi.post(l,o)}error$(){return this.errorApi.error$()}}var t=e(98005);class c{constructor(){oe(this,"subject",new t.J)}post(l,o){this.subject.next({error:l,context:o})}error$(){return this.subject}}class m{static forward(l,o){window.addEventListener("unhandledrejection",h=>{l.post(h.reason,o)})}}},14884:function(ee,s,e){"use strict";e.d(s,{b:function(){return c}});var n=e(36964);function t(m){if(m.length<3)throw new Error(`The '${m}' feature flag must have a minimum length of three characters.`);if(m.length>150)throw new Error(`The '${m}' feature flag must not exceed 150 characters.`);if(!m.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${m}' 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(){oe(this,"registeredFeatureFlags",[]);oe(this,"flags")}registerFlag(v){t(v.name),this.registeredFeatureFlags.push(v)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(v){return this.flags||(this.flags=this.load()),this.flags.get(v)===n.FeatureFlagState.Active}save(v){this.flags||(this.flags=this.load()),v.merge||this.flags.clear();for(const[o,h]of Object.entries(v.states))this.flags.set(o,h);const l=Array.from(this.flags.entries()).filter(([,o])=>o===n.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(l)))}load(){try{const v=window.localStorage.getItem("featureFlags");if(!v)return new Map;const l=JSON.parse(v);if(typeof l!="object"||l===null||Array.isArray(l))return new Map;const o=Object.entries(l).filter(([h,i])=>(t(h),i===n.FeatureFlagState.Active));return new Map(o)}catch{return new Map}}}},50160:function(ee,s,e){"use strict";e.d(s,{I:function(){return o},j:function(){return n}});function n(h){var g;let i=h.baseImplementation||e.g.fetch;const E=[(g=h.middleware)!=null?g:[]].flat().reverse();for(const R of E)i=R.apply(i);return{fetch:i}}class t{static create(i){var T,N;const E=c(i),g=((T=i.header)==null?void 0:T.name)||"authorization",R=((N=i.header)==null?void 0:N.value)||(I=>`Bearer ${I}`);return new t(i.identityApi,E,g,R)}constructor(i,E,g,R){this.identityApi=i,this.allowUrl=E,this.headerName=g,this.headerValue=R}apply(i){return async(E,g)=>{const R=new Request(E,g),{token:T}=await this.identityApi.getCredentials();return R.headers.get(this.headerName)||typeof T!="string"||!T||!this.allowUrl(R.url)?i(E,g):(R.headers.set(this.headerName,this.headerValue(T)),i(R))}}}function c(h){return h.allowUrl?h.allowUrl:h.urlPrefixAllowlist?m(h.urlPrefixAllowlist):h.config?m([h.config.getString("backend.baseUrl")]):()=>!1}function m(h){const i=h.map(E=>E.replace(/\/$/,""));return E=>i.some(g=>E===g||E.startsWith(`${g}/`))}function v(h,i){return!i||i==="/"?h:`${h.replace(/\/$/,"")}/${i.replace(/^\//,"")}`}class l{constructor(i){this.discoveryApi=i}apply(i){return async(E,g)=>{const R=new Request(E,g),T="plugin://";if(!R.url.startsWith(T))return i(E,g);const{hostname:N,pathname:I,search:j,hash:D,username:C,password:L}=new URL(`http://${R.url.substring(T.length)}`);let B=await this.discoveryApi.getBaseUrl(N);if(C||L){const K=new URL(B),ce=`${C}${L?`:${L}`:""}@`;B=`${K.protocol}//${ce}${K.host}${K.pathname}`}const z=`${v(B,I)}${j}${D}`;return i(z,R)}}}class o{static resolvePluginProtocol(i){return new l(i.discoveryApi)}static injectIdentityAuth(i){return t.create(i)}constructor(){}}},11358:function(ee,s,e){"use strict";e.d(s,{Y:function(){return v}});var n=e(98005);function t(l,o){for(const h of o)if(!l.has(h))return!1;return!0}function c(l,...o){const h=new Set(l);for(const i of o)for(const E of i)h.add(E);return h}class m{constructor(){oe(this,"requests",[]);oe(this,"subject",new n.X(this.getCurrentPending()))}request(o){return new Promise((h,i)=>{this.requests.push({scopes:o,resolve:h,reject:i}),this.subject.next(this.getCurrentPending())})}resolve(o,h){this.requests=this.requests.filter(i=>t(o,i.scopes)?(i.resolve(h),!1):!0),this.subject.next(this.getCurrentPending())}reject(o){this.requests.forEach(h=>h.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((h,i)=>c(h,i.scopes),this.requests[0].scopes);return{scopes:o,resolve:h=>{o&&this.resolve(o,h)},reject:h=>{o&&this.reject(h)}}}}class v{constructor(){oe(this,"subject",new n.X([]));oe(this,"currentRequests",[]);oe(this,"handlerCount",0)}createAuthRequester(o){const h=new m,i=this.handlerCount;return this.handlerCount++,h.pending().subscribe({next:E=>{const g=this.currentRequests.slice(),R=this.makeAuthRequest(E,o);R?g[i]=R:delete g[i],this.currentRequests=g,this.subject.next(g.filter(Boolean))}}),E=>h.request(E)}makeAuthRequest(o,h){const{scopes:i}=o;if(!!i)return{provider:h.provider,trigger:async()=>{const E=await h.onAuthRequest(i);o.resolve(E)},reject:()=>{const E=new Error("Login failed, rejected by user");E.name="RejectedError",o.reject(E)}}}authRequest$(){return this.subject}}},56054:function(ee,s,e){"use strict";e.d(s,{C:function(){return m}});var n=e(82394),t=e.n(n);const c=new Map;class m{constructor(l,o){oe(this,"subscribers",new Set);oe(this,"observable",new(t())(l=>(this.subscribers.add(l),()=>{this.subscribers.delete(l)})));this.namespace=l,this.errorApi=o}static create(l){var o;return new m((o=l.namespace)!=null?o:"",l.errorApi)}get(l){return this.snapshot(l).value}snapshot(l){let o,h="absent";try{const i=localStorage.getItem(this.getKeyName(l));i&&(o=JSON.parse(i,(E,g)=>(typeof g=="object"&&g!==null&&Object.freeze(g),g)),h="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${l}`))}return{key:l,value:o,presence:h}}forBucket(l){const o=`${this.namespace}/${l}`;return c.has(o)||c.set(o,new m(o,this.errorApi)),c.get(o)}async set(l,o){localStorage.setItem(this.getKeyName(l),JSON.stringify(o)),this.notifyChanges(l)}async remove(l){localStorage.removeItem(this.getKeyName(l)),this.notifyChanges(l)}observe$(l){return this.observable.filter(({key:o})=>o===l)}getKeyName(l){return`${this.namespace}/${encodeURIComponent(l)}`}notifyChanges(l){const o=this.snapshot(l);for(const h of this.subscribers)h.next(o)}}},59589:function(ee,s,e){"use strict";e.d(s,{u:function(){return c}});var n=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class c{static create(v){const{discoveryApi:l,environment:o="development",provider:h=t,oauthRequestApi:i}=v;return n.OAuth2.create({discoveryApi:l,oauthRequestApi:i,provider:h,environment:o})}}},6098:function(ee,s,e){"use strict";e.d(s,{Z:function(){return c}});var n=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class c{static create(v){const{discoveryApi:l,environment:o="development",provider:h=t,oauthRequestApi:i,defaultScopes:E=["team"]}=v;return n.OAuth2.create({discoveryApi:l,oauthRequestApi:i,provider:h,environment:o,defaultScopes:E})}}},44431:function(ee,s,e){"use strict";e.d(s,{BitbucketAuth:function(){return c.Z}});var n=e(19347),t=e.n(n);e.o(n,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return n.AlertApiForwarder}}),e.o(n,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return n.AppThemeSelector}}),e.o(n,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return n.AtlassianAuth}}),e.o(n,"ConfigReader")&&e.d(s,{ConfigReader:function(){return n.ConfigReader}}),e.o(n,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return n.ErrorAlerter}}),e.o(n,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return n.ErrorApiForwarder}}),e.o(n,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return n.FetchMiddlewares}}),e.o(n,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return n.FlatRoutes}}),e.o(n,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return n.LocalStorageFeatureFlags}}),e.o(n,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return n.NoOpAnalyticsApi}}),e.o(n,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return n.OAuthRequestManager}}),e.o(n,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return n.UnhandledErrorForwarder}}),e.o(n,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return n.UrlPatternDiscovery}}),e.o(n,"WebStorage")&&e.d(s,{WebStorage:function(){return n.WebStorage}}),e.o(n,"createFetchApi")&&e.d(s,{createFetchApi:function(){return n.createFetchApi}}),e.o(n,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return n.createSpecializedApp}}),e.o(n,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return n.defaultConfigLoader}});var c=e(6098)},19347:function(){},44474:function(ee,s,e){"use strict";e.d(s,{T:function(){return c}});var n=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class c{static create(v){const{discoveryApi:l,environment:o="development",provider:h=t,oauthRequestApi:i,defaultScopes:E=["read:user"]}=v;return n.OAuth2.create({discoveryApi:l,oauthRequestApi:i,provider:h,environment:o,defaultScopes:E})}}},2922:function(ee,s,e){"use strict";e.d(s,{a:function(){return c}});var n=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class c{static create(v){const{discoveryApi:l,environment:o="development",provider:h=t,oauthRequestApi:i,defaultScopes:E=["read_user"]}=v;return n.OAuth2.create({discoveryApi:l,oauthRequestApi:i,provider:h,environment:o,defaultScopes:E})}}},59938:function(ee,s,e){"use strict";e.d(s,{e:function(){return m}});var n=e(91205);const t={id:"google",title:"Google",icon:()=>null},c="https://www.googleapis.com/auth/";class m{static create(l){const{discoveryApi:o,oauthRequestApi:h,environment:i="development",provider:E=t,defaultScopes:g=["openid",`${c}userinfo.email`,`${c}userinfo.profile`]}=l;return n.OAuth2.create({discoveryApi:o,oauthRequestApi:h,provider:E,environment:i,defaultScopes:g,scopeTransform(R){return R.map(T=>T==="openid"?T:T==="profile"||T==="email"?`${c}userinfo.${T}`:T.startsWith(c)?T:`${c}${T}`)}})}}},91668:function(ee,s,e){"use strict";e.d(s,{GithubAuth:function(){return n.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return c.e},OktaAuth:function(){return v.s},MicrosoftAuth:function(){return o._},OneLoginAuth:function(){return h.$},BitbucketAuth:function(){return i.BitbucketAuth},AtlassianAuth:function(){return E.u}});var n=e(44474),t=e(2922),c=e(59938),m=e(91205);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,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return m.BitbucketAuth}}),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,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return m.MicrosoftAuth}}),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,"OktaAuth")&&e.d(s,{OktaAuth:function(){return m.OktaAuth}}),e.o(m,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return m.OneLoginAuth}}),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 v=e(26079),l=e(67604),o=e(38482),h=e(58381),i=e(44431);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,"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,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return i.NoOpAnalyticsApi}}),e.o(i,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return i.OAuthRequestManager}}),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 E=e(59589)},38482:function(ee,s,e){"use strict";e.d(s,{_:function(){return c}});var n=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class c{static create(v){const{environment:l="development",provider:o=t,oauthRequestApi:h,discoveryApi:i,defaultScopes:E=["openid","offline_access","profile","email","User.Read"]}=v;return n.OAuth2.create({discoveryApi:i,oauthRequestApi:h,provider:o,environment:l,defaultScopes:E})}}},73124:function(ee,s,e){"use strict";e.d(s,{Z:function(){return l}});function n(o){return new Promise((h,i)=>{const E=o.width||500,g=o.height||700,R=window.screen.width/2-E/2,T=window.screen.height/2-g/2,N=window.open(o.url,o.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${E},height=${g},top=${T},left=${R}`);let I="";if(!N||typeof N.closed=="undefined"||N.closed){const L=new Error("Failed to open auth popup.");L.name="PopupRejectedError",i(L);return}const j=L=>{if(L.source!==N||L.origin!==o.origin)return;const{data:B}=L;if(B.type==="config_info"){I=B.targetOrigin;return}if(B.type!=="authorization_response")return;const z=B;if("error"in z){const K=new Error(z.error.message);K.name=z.error.name,i(K)}else h(z.response);C()},D=setInterval(()=>{if(N.closed){const L=`Login failed, ${I&&I!==window.location.origin?`Incorrect app origin, expected ${I}`:"popup was closed"}`,B=new Error(L);B.name="PopupClosedError",i(B),C()}},100);function C(){window.removeEventListener("message",j),clearInterval(D)}window.addEventListener("message",j)})}function t(o){return[...o].join(" ")}class c{constructor(h){oe(this,"discoveryApi");oe(this,"environment");oe(this,"provider");oe(this,"joinScopesFunc");oe(this,"authRequester");oe(this,"sessionTransform");const{discoveryApi:i,environment:E,provider:g,joinScopes:R=t,oauthRequestApi:T,sessionTransform:N=I=>I}=h;this.authRequester=T.createAuthRequester({provider:g,onAuthRequest:I=>this.showPopup(I)}),this.discoveryApi=i,this.environment=E,this.provider=g,this.joinScopesFunc=R,this.sessionTransform=N}async createSession(h){return h.instantPopup?this.showPopup(h.scopes):this.authRequester(h.scopes)}async refreshSession(){const h=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(E=>{throw new Error(`Auth refresh request failed, ${E}`)});if(!h.ok){const E=new Error(`Auth refresh request failed, ${h.statusText}`);throw E.status=h.status,E}const i=await h.json();if(i.error){const E=new Error(i.error.message);throw i.error.name&&(E.name=i.error.name),E}return await this.sessionTransform(i)}async removeSession(){const h=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(i=>{throw new Error(`Logout request failed, ${i}`)});if(!h.ok){const i=new Error(`Logout request failed, ${h.statusText}`);throw i.status=h.status,i}}async showPopup(h){const i=this.joinScopesFunc(h),E=await this.buildUrl("/start",{scope:i,origin:location.origin}),g=await n({url:E,name:`${this.provider.title} Login`,origin:new URL(E).origin,width:450,height:730});return await this.sessionTransform(g)}async buildUrl(h,i){const E=await this.discoveryApi.getBaseUrl("auth"),g=this.buildQueryString({...i,env:this.environment});return`${E}/${this.provider.id}${h}${g}`}buildQueryString(h){if(!h)return"";const i=Object.entries(h).map(([E,g])=>{if(typeof g=="string")return`${encodeURIComponent(E)}=${encodeURIComponent(g)}`;if(g)return encodeURIComponent(E)}).filter(Boolean).join("&");return i?`?${i}`:""}}var m=e(57018);const v={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class l{constructor(h){oe(this,"sessionManager");oe(this,"scopeTransform");this.sessionManager=h.sessionManager,this.scopeTransform=h.scopeTransform}static create(h){const{discoveryApi:i,environment:E="development",provider:g=v,oauthRequestApi:R,defaultScopes:T=[],scopeTransform:N=D=>D}=h,I=new c({discoveryApi:i,environment:E,provider:g,oauthRequestApi:R,sessionTransform(D){return{...D,providerInfo:{idToken:D.providerInfo.idToken,accessToken:D.providerInfo.accessToken,scopes:l.normalizeScopes(N,D.providerInfo.scope),expiresAt:new Date(Date.now()+D.providerInfo.expiresInSeconds*1e3)}}}}),j=new m.RefreshingAuthSessionManager({connector:I,defaultScopes:new Set(T),sessionScopes:D=>D.providerInfo.scopes,sessionShouldRefresh:D=>(D.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new l({sessionManager:j,scopeTransform:N})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(h,i){var R;const E=l.normalizeScopes(this.scopeTransform,h),g=await this.sessionManager.getSession({...i,scopes:E});return(R=g==null?void 0:g.providerInfo.accessToken)!=null?R:""}async getIdToken(h={}){var E;const i=await this.sessionManager.getSession(h);return(E=i==null?void 0:i.providerInfo.idToken)!=null?E:""}async getBackstageIdentity(h={}){const i=await this.sessionManager.getSession(h);return i==null?void 0:i.backstageIdentity}async getProfile(h={}){const i=await this.sessionManager.getSession(h);return i==null?void 0:i.profile}static normalizeScopes(h,i){if(!i)return new Set;const E=Array.isArray(i)?i:i.split(/[\s|,]/).filter(Boolean);return new Set(h(E))}}},91205:function(ee,s,e){"use strict";e.d(s,{OAuth2:function(){return n.Z}});var n=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(ee,s,e){"use strict";e.d(s,{s:function(){return v}});var n=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),m="okta.";class v{static create(o){const{discoveryApi:h,environment:i="development",provider:E=t,oauthRequestApi:g,defaultScopes:R=["openid","email","profile","offline_access"]}=o;return n.OAuth2.create({discoveryApi:h,oauthRequestApi:g,provider:E,environment:i,defaultScopes:R,scopeTransform(T){return T.map(N=>c.has(N)||N.startsWith(m)?N:`${m}${N}`)}})}}},58381:function(ee,s,e){"use strict";e.d(s,{$:function(){return v}});var n=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),m="onelogin.";class v{static create(o){const{discoveryApi:h,environment:i="development",provider:E=t,oauthRequestApi:g}=o;return n.OAuth2.create({discoveryApi:h,oauthRequestApi:g,provider:E,environment:i,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(R){return R.map(T=>c.has(T)||T.startsWith(m)?T:`${m}${T}`)}})}}},67604:function(ee,s,e){"use strict";var n=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({id:t.z.string(),token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),m={id:"saml",title:"SAML",icon:()=>null};class v{static create(o){const{discoveryApi:h,environment:i="development",provider:E=m}=o,g=new DirectAuthConnector({discoveryApi:h,environment:i,provider:E}),R=new StaticAuthSessionManager({connector:g}),T=new AuthSessionStore({manager:R,storageKey:`${E.id}Session`,schema:samlSessionSchema});return new v(T)}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 h=await this.sessionManager.getSession(o);return h==null?void 0:h.backstageIdentity}async getProfile(o={}){const h=await this.sessionManager.getSession(o);return h==null?void 0:h.profile}}},91631:function(ee,s,e){"use strict";e.d(s,{AtlassianAuth:function(){return n.AtlassianAuth},GithubAuth:function(){return n.GithubAuth},GitlabAuth:function(){return n.GitlabAuth},GoogleAuth:function(){return n.GoogleAuth},MicrosoftAuth:function(){return n.MicrosoftAuth},OktaAuth:function(){return n.OktaAuth},OneLoginAuth:function(){return n.OneLoginAuth},AlertApiForwarder:function(){return t.C},NoOpAnalyticsApi:function(){return c.g},AppThemeSelector:function(){return m.C},ConfigReader:function(){return v.m},UrlPatternDiscovery:function(){return l.p},ErrorAlerter:function(){return o.KN},ErrorApiForwarder:function(){return o.gr},UnhandledErrorForwarder:function(){return o.Jv},LocalStorageFeatureFlags:function(){return h.b},FetchMiddlewares:function(){return i.I},createFetchApi:function(){return i.j},OAuthRequestManager:function(){return E.Y},WebStorage:function(){return g.C}});var n=e(91668);e.o(n,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return n.AlertApiForwarder}}),e.o(n,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return n.AppThemeSelector}}),e.o(n,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return n.BitbucketAuth}}),e.o(n,"ConfigReader")&&e.d(s,{ConfigReader:function(){return n.ConfigReader}}),e.o(n,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return n.ErrorAlerter}}),e.o(n,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return n.ErrorApiForwarder}}),e.o(n,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return n.FetchMiddlewares}}),e.o(n,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return n.FlatRoutes}}),e.o(n,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return n.LocalStorageFeatureFlags}}),e.o(n,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return n.NoOpAnalyticsApi}}),e.o(n,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return n.OAuthRequestManager}}),e.o(n,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return n.UnhandledErrorForwarder}}),e.o(n,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return n.UrlPatternDiscovery}}),e.o(n,"WebStorage")&&e.d(s,{WebStorage:function(){return n.WebStorage}}),e.o(n,"createFetchApi")&&e.d(s,{createFetchApi:function(){return n.createFetchApi}}),e.o(n,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return n.createSpecializedApp}}),e.o(n,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return n.defaultConfigLoader}});var t=e(23235),c=e(47150),m=e(58652),v=e(14721),l=e(4333),o=e(89536),h=e(14884),i=e(50160),E=e(11358),g=e(56054)},56494:function(ee,s,e){"use strict";e.d(s,{ApiProvider:function(){return n.ApiProvider},AlertApiForwarder:function(){return t.AlertApiForwarder},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 n=e(76105);e.o(n,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return n.AlertApiForwarder}}),e.o(n,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return n.AppThemeSelector}}),e.o(n,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return n.AtlassianAuth}}),e.o(n,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return n.BitbucketAuth}}),e.o(n,"ConfigReader")&&e.d(s,{ConfigReader:function(){return n.ConfigReader}}),e.o(n,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return n.ErrorAlerter}}),e.o(n,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return n.ErrorApiForwarder}}),e.o(n,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return n.FetchMiddlewares}}),e.o(n,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return n.FlatRoutes}}),e.o(n,"GithubAuth")&&e.d(s,{GithubAuth:function(){return n.GithubAuth}}),e.o(n,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return n.GitlabAuth}}),e.o(n,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return n.GoogleAuth}}),e.o(n,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return n.LocalStorageFeatureFlags}}),e.o(n,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return n.MicrosoftAuth}}),e.o(n,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return n.NoOpAnalyticsApi}}),e.o(n,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return n.OAuthRequestManager}}),e.o(n,"OktaAuth")&&e.d(s,{OktaAuth:function(){return n.OktaAuth}}),e.o(n,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return n.OneLoginAuth}}),e.o(n,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return n.UnhandledErrorForwarder}}),e.o(n,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return n.UrlPatternDiscovery}}),e.o(n,"WebStorage")&&e.d(s,{WebStorage:function(){return n.WebStorage}}),e.o(n,"createFetchApi")&&e.d(s,{createFetchApi:function(){return n.createFetchApi}}),e.o(n,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return n.createSpecializedApp}}),e.o(n,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return n.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(ee,s,e){"use strict";e.d(s,{p:function(){return t}});var n;(function(c){c[c.default=10]="default";const m=50;c[c.app=m]="app",c[c.static=100]="static"})(n||(n={}));class t{constructor(){oe(this,"factories",new Map)}register(m,v){const l=n[m],o=this.factories.get(v.api.id);return o&&o.priority>=l?!1:(this.factories.set(v.api.id,{priority:l,factory:v}),!0)}get(m){const v=this.factories.get(m.id);if(!!v)return v.factory}getAllApis(){const m=new Set;for(const{factory:v}of this.factories.values())m.add(v.api);return m}}},14406:function(ee,s,e){"use strict";e.d(s,{g:function(){return o}});var n=e(2784),t=e(13980),c=e.n(t);class m{constructor(...i){oe(this,"holders");this.holders=i}get(i){for(const E of this.holders){const g=E.get(i);if(g)return g}}}var v=e(76241);const l=(0,v.CT)("api-context"),o=h=>{var T;const{apis:i,children:E}=h,g=(T=(0,n.useContext)(l))==null?void 0:T.atVersion(1),R=g?new m(i,g):i;return n.createElement(l.Provider,{value:(0,v.EI)({1:R}),children:E})};o.propTypes={apis:c().shape({get:c().func.isRequired}).isRequired,children:c().node}},12132:function(ee,s,e){"use strict";e.d(s,{M:function(){return n}});class n{constructor(c){oe(this,"apis",new Map);this.factories=c}static validateFactories(c,m){for(const v of m){const l=[v],o=new Set;for(;l.length;){const h=l.shift(),i=c.get(h);if(!!i)for(const E of Object.values(i.deps)){if(E.id===v.id)throw new Error(`Circular dependency of api factory for ${v}`);o.has(E)||(o.add(E),l.push(E))}}}}get(c){return this.load(c)}load(c,m=[]){const v=this.apis.get(c.id);if(v)return v;const l=this.factories.get(c);if(!l)return;if(m.includes(l.api))throw new Error(`Circular dependency of api factory for ${l.api}`);const o=this.loadDeps(c,l.deps,[...m,l.api]),h=l.factory(o);return this.apis.set(c.id,h),h}loadDeps(c,m,v){const l={};for(const o in m)if(m.hasOwnProperty(o)){const h=m[o],i=this.load(h,v);if(!i)throw new Error(`No API factory available for dependency ${h} of dependent ${c}`);l[o]=i}return l}}},76105:function(ee,s,e){"use strict";e.d(s,{ApiProvider:function(){return n.g},ApiResolver:function(){return t.M},ApiFactoryRegistry:function(){return c.p}});var n=e(14406),t=e(12132),c=e(80396),m=e(82488),v=e.n(m);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,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return m.BitbucketAuth}}),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,"GithubAuth")&&e.d(s,{GithubAuth:function(){return m.GithubAuth}}),e.o(m,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return m.GitlabAuth}}),e.o(m,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return m.GoogleAuth}}),e.o(m,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return m.LocalStorageFeatureFlags}}),e.o(m,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return m.MicrosoftAuth}}),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,"OktaAuth")&&e.d(s,{OktaAuth:function(){return m.OktaAuth}}),e.o(m,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return m.OneLoginAuth}}),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}})},82488:function(){},82370:function(ee,s,e){"use strict";e.d(s,{b:function(){return vt}});var n=e(2784),t=e(10289),c=e(64279),m=e(56494),v=e(36964),l=e(76105);function o(q){const Z={};for(const de in q.collectors)q.collectors.hasOwnProperty(de)&&(Z[de]=q.collectors[de]());const ne=[{node:n.Children.toArray(q.root),parent:void 0,contexts:{}}];for(;ne.length!==0;){const{node:de,parent:ae,contexts:ye}=ne.shift();n.Children.forEach(de,Ze=>{if(!(0,n.isValidElement)(Ze))return;const xe={};for(const ze in Z)if(Z.hasOwnProperty(ze)){const Q=Z[ze];xe[ze]=Q.visit(Q.accumulator,Ze,ae,ye[ze])}for(const ze of q.discoverers){const Q=ze(Ze);Q&&ne.push({node:Q,parent:Ze,contexts:xe})}})}return Object.fromEntries(Object.entries(Z).map(([de,ae])=>[de,ae.accumulator]))}function h(q,Z){return()=>({accumulator:q(),visit:Z})}function i(q){var Z;return(Z=q.props)==null?void 0:Z.children}function E(q){var Z,ne,de;if(((Z=q.props)==null?void 0:Z.path)&&((ne=q.props)==null?void 0:ne.element))return(de=q.props)==null?void 0:de.element}const g=h(()=>new Set,(q,Z)=>{const ne=(0,v.getComponentData)(Z,"core.plugin");ne&&q.add(ne)});var R=e(88934);function T(q){var de;const Z=(de=q.props)==null?void 0:de.element;let ne=(0,v.getComponentData)(q,"core.mountPoint");return!ne&&(0,n.isValidElement)(Z)&&(ne=(0,v.getComponentData)(Z,"core.mountPoint")),ne}const N=h(()=>new Map,(q,Z,ne,de)=>{var Ze,xe;let ae=de;if((ne==null?void 0:ne.props.element)===Z)return ae;if((0,v.getComponentData)(Z,"core.gatherMountPoints")){const ze=(Ze=Z.props)==null?void 0:Ze.path;if(!ze)throw new Error("Mount point gatherer must have a path");ae=ze}const ye=T(Z);if(ye){let ze=(xe=Z.props)==null?void 0:xe.path;if(ae&&(ze?ae=void 0:ze=ae),!ze)throw new Error("Mounted routable extension must have a path");q.set(ye,ze)}return ae}),I=h(()=>new Map,(q,Z,ne,de)=>{var Ze;if((ne==null?void 0:ne.props.element)===Z)return de;let ae=de;const ye=T(Z);return ye&&(de&&"sticky"in de?(q.set(ye,de.sticky),((Ze=Z.props)==null?void 0:Ze.path)?ae=ye:ae=de):(q.set(ye,de),ae=ye)),(0,v.getComponentData)(Z,"core.gatherMountPoints")?{sticky:ae}:ae}),j={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},D=h(()=>Array(),(q,Z,ne,de)=>{var Q,H,w;const ae=(Q=de==null?void 0:de.children)!=null?Q:q;if((ne==null?void 0:ne.props.element)===Z)return de;const ye=(H=Z.props)==null?void 0:H.path,Ze=Boolean((w=Z.props)==null?void 0:w.caseSensitive),xe=T(Z);if(xe){if(ye){const se={caseSensitive:Ze,path:ye,element:"mounted",routeRefs:new Set([xe]),children:[j],plugin:(0,v.getComponentData)(Z.props.element,"core.plugin")};return ae.push(se),se}de==null||de.routeRefs.add(xe)}if((0,v.getComponentData)(Z,"core.gatherMountPoints")){if(!ye)throw new Error("Mount point gatherer must have a path");const se={caseSensitive:Ze,path:ye,element:"gathered",routeRefs:new Set,children:[j],plugin:de==null?void 0:de.plugin};return ae.push(se),se}return de}),C=h(()=>new Set,(q,Z)=>{if(Z.type===R.L){const ne=Z.props;q.add("with"in ne?ne.with:ne.without)}});var L=e(76241);const B=(0,L.uW)("route-ref-type",()=>Symbol("route-ref-type"));function z(q){return q[B]==="absolute"}function K(q){return q[B]==="sub"}function ce(q){return q[B]==="external"}function he(...q){const Z=q.join("/").replace(/\/\/+/g,"/");return Z!=="/"&&Z.endsWith("/")?Z.slice(0,-1):Z}function ve(q,Z,ne){let de,ae="";if(z(q))de=q;else if(K(q))de=q.parent,ae=q.path;else if(ce(q)){const xe=ne.get(q);if(!xe)return[void 0,""];if(z(xe))de=xe;else if(K(xe))de=xe.parent,ae=xe.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${xe}`)}else throw q[B]?new Error(`Unknown or invalid route ref type, ${q[B]}`):new Error(`Unknown object passed to useRouteRef, got ${q}`);if(!de)return[void 0,""];const ye=Z.get(de);if(!ye)return[void 0,""];const Ze=he(ye,ae);return[de,Ze]}function De(q,Z,ne,de,ae){var H;const ye=(H=(0,t.fp)(ae,Z))!=null?H:[],Ze=Array();let xe=-1;for(let w=q;w&&(xe=ye.findIndex(se=>se.route.routeRefs.has(w)),xe===-1);w=de.get(w))Ze.unshift(w);Ze.length===0&&(xe-=1);const ze=xe===-1?"":ye[xe].pathname,Q=he(...Ze.slice(0,-1).map(w=>{const se=ne.get(w);if(!se)throw new Error(`No path for ${w}`);if(se.includes(":"))throw new Error(`Cannot route to ${q} with parent ${w} as it has parameters`);return se}));return ze+Q}class pe{constructor(Z,ne,de,ae,ye){this.routePaths=Z,this.routeParents=ne,this.routeObjects=de,this.routeBindings=ae,this.appBasePath=ye}resolve(Z,ne){const[de,ae]=ve(Z,this.routePaths,this.routeBindings);if(!de)return;let ye;typeof ne=="string"?ye=this.trimPath(ne):ne.pathname?ye={...ne,pathname:this.trimPath(ne.pathname)}:ye=ne;const Ze=this.appBasePath+De(de,ye,this.routePaths,this.routeParents,this.routeObjects);return(...[ze])=>Ze+(0,t.Gn)(ae,ze)}trimPath(Z){return Z&&(Z.startsWith(this.appBasePath)?Z.slice(this.appBasePath.length):Z)}}const je=(0,L.CT)("routing-context"),Je=({routePaths:q,routeParents:Z,routeObjects:ne,routeBindings:de,basePath:ae="",children:ye})=>{const Ze=new pe(q,Z,ne,de,ae),xe=(0,L.EI)({1:Ze});return n.createElement(je.Provider,{value:xe},ye)},We=(q,Z)=>{var ne,de;try{const ae=(0,t.fp)(Z,{pathname:q}),ye=(ne=ae==null?void 0:ae.filter(xe=>{var ze;return((ze=xe==null?void 0:xe.route.routeRefs)==null?void 0:ze.size)>0}).pop())==null?void 0:ne.route;if(!ye)return{};let Ze;return ye.routeRefs.size===1&&(Ze=ye.routeRefs.values().next().value),{extension:"App",pluginId:((de=ye.plugin)==null?void 0:de.getId())||"root",...Ze?{routeRef:Ze.id}:{}}}catch{return{}}},He=({pathname:q,search:Z,hash:ne})=>{const de=(0,v.useAnalytics)();return(0,n.useEffect)(()=>{de.captureEvent("navigate",`${q}${Z}${ne}`)},[de,q,Z,ne]),null},Qe=({tree:q})=>{const{pathname:Z,search:ne,hash:de}=(0,t.TH)(),{routeObjects:ae}=(0,n.useMemo)(()=>o({root:q,discoverers:[i,E],collectors:{routeObjects:D}}),[q]);return n.createElement(v.AnalyticsContext,{attributes:We(Z,ae)},n.createElement(He,{pathname:Z,search:ne,hash:de}))};function ot(q,Z){const ne=new Set(Z.values());ne.delete(void 0);for(const de of Z.keys()){if(ne.has(de))continue;let ae=de,ye="";for(;ae;){const xe=q.get(ae);if(!xe)throw new Error(`No path for ${ae}`);ye=`${xe}${ye}`,ae=Z.get(ae)}const Ze=ye.match(/:(\w+)/g);if(Ze){for(let xe=0;xe<Ze.length;xe++)for(let ze=xe+1;ze<Ze.length;ze++)if(Ze[ze]===Ze[xe])throw new Error(`Parameter ${Ze[ze]} is duplicated in path ${ye}`)}}}function we(q,Z){for(const ne of Z)if(!!ne.externalRoutes){for(const[de,ae]of Object.entries(ne.externalRoutes))if(!ae.optional&&!q.has(ae))throw new Error(`External route '${de}' of the '${ne.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const ke=(0,L.CT)("app-context"),rt=({appContext:q,children:Z})=>{const ne=(0,L.EI)({1:q});return n.createElement(ke.Provider,{value:ne,children:Z})};function Xe(q){return new Error(`Tried to access IdentityApi ${q} before app was loaded`)}function ht(q){console.warn(`WARNING: Call to ${q} is deprecated and will break in the future`)}class dt{constructor(){oe(this,"target");oe(this,"waitForTarget");oe(this,"resolveTarget",()=>{});this.waitForTarget=new Promise(Z=>{this.resolveTarget=Z})}setTarget(Z){this.target=Z,this.resolveTarget(Z)}getUserId(){if(!this.target)throw Xe("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return ht("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Xe("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return ht("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(Z=>Z.getProfileInfo())}async getBackstageIdentity(){const Z=await this.waitForTarget.then(ne=>ne.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 ht("getIdToken"),Z.getIdToken()})}async signOut(){await this.waitForTarget.then(Z=>Z.signOut()),location.reload()}}var ft=e(72164);function pt(q,Z,ne){if(q!==void 0){const ae=ne.find(ye=>ye.id===q);if(ae)return ae}if(Z){const ae=ne.find(ye=>ye.variant==="dark");if(ae)return ae}const de=ne.find(ae=>ae.variant==="light");return de||ne[0]}const Pt=()=>{const q=(0,n.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[Z,ne]=(0,n.useState)(q.matches);return(0,n.useEffect)(()=>{const de=ae=>{ne(ae.matches)};return q.addListener(de),()=>{q.removeListener(de)}},[q]),Z};function st({children:q}){const Z=(0,v.useApi)(v.appThemeApiRef),ne=(0,ft.Z)(Z.activeThemeId$(),Z.getActiveThemeId()),de=Boolean(window.matchMedia)?Pt():!1,ae=pt(ne,de,Z.getInstalledThemes());if(!ae)throw new Error("App has no themes");return n.createElement(ae.Provider,{children:q})}var et=e(46611);class St{constructor(){oe(this,"apis",[])}add(Z,ne){return this.apis.push([Z.id,ne]),ne}build(){return new mt(new Map(this.apis))}}class mt{static builder(){return new St}static from(Z){return new mt(new Map(Z.map(([ne,de])=>[ne.id,de])))}static with(Z,ne){return new mt(new Map([[Z.id,ne]]))}constructor(Z){this.apis=Z}with(Z,ne){return new mt(new Map([...this.apis,[Z.id,ne]]))}get(Z){return this.apis.get(Z.id)}}function Be(q){const Z=new Map;return q&&q({bind:(de,ae)=>{for(const[ye,Ze]of Object.entries(ae)){const xe=de[ye];if(!xe)throw new Error(`Key ${ye} is not an existing external route`);if(!Ze&&!xe.optional)throw new Error(`External route ${ye} is required but was undefined`);Ze&&Z.set(xe,Ze)}}}),Z}function ut(q){var ne;let{pathname:Z}=new URL((ne=q.getOptionalString("app.baseUrl"))!=null?ne:"/","http://dummy.dev");return Z=Z.replace(/\/*$/,""),Z}function tt(q,Z,ne){var ze;const de=Boolean(q),ae=(0,c.default)(q||(()=>Promise.resolve([])));let ye;if(de&&ae.loading){const{Progress:Q}=Z;ye=n.createElement(Q,null)}else if(ae.error){const{BootErrorPage:Q}=Z;ye=n.createElement(Q,{step:"load-config",error:ae.error})}const{ThemeProvider:Ze=st}=Z;return ye?{node:n.createElement(m.ApiProvider,{apis:mt.with(v.appThemeApiRef,ne)},n.createElement(Ze,null,ye))}:{api:m.ConfigReader.fromConfigs((ze=ae.value)!=null?ze:[])}}class Ct{constructor(Z){this.app=Z}getPlugins(){return this.app.getPlugins()}getSystemIcon(Z){return this.app.getSystemIcon(Z)}getComponents(){return this.app.getComponents()}}class it{constructor(Z){oe(this,"apiHolder");oe(this,"configApi");oe(this,"apis");oe(this,"icons");oe(this,"plugins");oe(this,"components");oe(this,"themes");oe(this,"configLoader");oe(this,"defaultApis");oe(this,"bindRoutes");oe(this,"appIdentityProxy",new dt);oe(this,"apiFactoryRegistry");var ne,de,ae,ye;this.apis=(ne=Z.apis)!=null?ne:[],this.icons=Z.icons,this.plugins=new Set((de=Z.plugins)!=null?de:[]),this.components=Z.components,this.themes=Z.themes,this.configLoader=(ae=Z.configLoader)!=null?ae:et.t,this.defaultApis=(ye=Z.defaultApis)!=null?ye:[],this.bindRoutes=Z.bindRoutes,this.apiFactoryRegistry=new l.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(Z){return this.icons[Z]}getComponents(){return this.components}getProvider(){const Z=new Ct(this);let ne=!1;return({children:ae})=>{const ye=(0,n.useMemo)(()=>m.AppThemeSelector.createWithStorage(this.themes),[]),{routePaths:Ze,routeParents:xe,routeObjects:ze,featureFlags:Q,routeBindings:H}=(0,n.useMemo)(()=>{const Ae=o({root:ae,discoverers:[i,E],collectors:{routePaths:N,routeParents:I,routeObjects:D,collectedPlugins:g,featureFlags:C}});return Ae.collectedPlugins.forEach(Te=>this.plugins.add(Te)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...Ae,routeBindings:Be(this.bindRoutes)}},[ae]);ne||(ne=!0,ot(Ze,xe),we(H,this.plugins));const w=tt(this.configLoader,this.components,ye),se="api"in w;if(se){const{api:Ae}=w;this.configApi=Ae}if((0,n.useEffect)(()=>{if(se){const Ae=this.getApiHolder().get(v.featureFlagsApiRef);for(const Te of this.plugins.values())if("getFeatureFlags"in Te)for(const Oe of Te.getFeatureFlags())Ae.registerFlag({name:Oe.name,pluginId:Te.getId()});else for(const Oe of Te.output())Oe.type==="feature-flag"&&Ae.registerFlag({name:Oe.name,pluginId:Te.getId()});for(const Te of Q)Ae.registerFlag({name:Te,pluginId:""})}},[se,w,Q]),"node"in w)return w.node;const{ThemeProvider:me=st}=this.components;return n.createElement(m.ApiProvider,{apis:this.getApiHolder()},n.createElement(rt,{appContext:Z},n.createElement(me,null,n.createElement(Je,{routePaths:Ze,routeParents:xe,routeObjects:ze,routeBindings:H,basePath:ut(w.api)},ae))))}}getRouter(){const{Router:Z,SignInPage:ne}=this.components,de=({component:ye,children:Ze})=>{const[xe,ze]=(0,n.useState)();return xe?(this.appIdentityProxy.setTarget(xe),Ze):n.createElement(ye,{onSignInSuccess:ze})};return({children:ye})=>{const Ze=(0,v.useApi)(v.configApiRef),xe=`${ut(Ze)}/*`;return ne?n.createElement(Z,null,n.createElement(Qe,{tree:ye}),n.createElement(de,{component:ne},n.createElement(t.Z5,null,n.createElement(t.AW,{path:xe,element:n.createElement(n.Fragment,null,ye)})))):(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()=>{}}),n.createElement(Z,null,n.createElement(Qe,{tree:ye}),n.createElement(t.Z5,null,n.createElement(t.AW,{path:xe,element:n.createElement(n.Fragment,null,ye)}))))}}getApiHolder(){if(this.apiHolder){for(const Z of this.plugins)for(const ne of Z.getApis())this.apiFactoryRegistry.get(ne.api)||this.apiFactoryRegistry.register("default",ne);return l.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:v.appThemeApiRef,deps:{},factory:()=>m.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:v.configApiRef,deps:{},factory:()=>{if(!this.configApi)throw new Error("Tried to access config API before config was loaded");return this.configApi}}),this.apiFactoryRegistry.register("static",{api:v.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:v.featureFlagsApiRef,deps:{},factory:()=>new m.LocalStorageFeatureFlags});for(const Z of this.defaultApis)this.apiFactoryRegistry.register("default",Z);for(const Z of this.plugins)for(const ne of Z.getApis())if(!this.apiFactoryRegistry.register("default",ne))throw new Error(`Plugin ${Z.getId()} tried to register duplicate or forbidden API factory for ${ne.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 l.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new l.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(Z){const ne=new Set;for(const de of Z){const ae=de.getId();if(ne.has(ae))throw new Error(`Duplicate plugin found '${ae}'`);ne.add(ae)}}}function vt(q){return new it(q)}},46611:function(ee,s,e){"use strict";e.d(s,{t:function(){return n}});const n=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",requestUrl:"http://localhost:3000/api"}}}];if(!c)throw new Error("No static configuration provided");if(!Array.isArray(c))throw new Error("Static configuration has invalid format");const m=c.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const l=JSON.parse(t);Array.isArray(l)?m.push(...l):m.push({data:l,context:"env"})}catch(l){throw new Error(`Failed to load runtime configuration, ${l}`)}const v=window.__APP_CONFIG__;return v&&m.push({context:"window",data:v}),m}},44056:function(ee,s,e){"use strict";e.d(s,{createSpecializedApp:function(){return n.b},defaultConfigLoader:function(){return t.t}});var n=e(82370),t=e(46611),c=e(73495),m=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(ee,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return n.AlertApiForwarder},ErrorAlerter:function(){return n.ErrorAlerter},ErrorApiForwarder:function(){return n.ErrorApiForwarder},FetchMiddlewares:function(){return n.FetchMiddlewares},NoOpAnalyticsApi:function(){return n.NoOpAnalyticsApi},OAuthRequestManager:function(){return n.OAuthRequestManager},UnhandledErrorForwarder:function(){return n.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return n.UrlPatternDiscovery},WebStorage:function(){return n.WebStorage},createFetchApi:function(){return n.createFetchApi},createSpecializedApp:function(){return t.createSpecializedApp},defaultConfigLoader:function(){return t.defaultConfigLoader},FlatRoutes:function(){return c.w}});var n=e(56494);e.o(n,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return n.AtlassianAuth}}),e.o(n,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return n.BitbucketAuth}}),e.o(n,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return n.FlatRoutes}}),e.o(n,"GithubAuth")&&e.d(s,{GithubAuth:function(){return n.GithubAuth}}),e.o(n,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return n.GitlabAuth}}),e.o(n,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return n.GoogleAuth}}),e.o(n,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return n.MicrosoftAuth}}),e.o(n,"OktaAuth")&&e.d(s,{OktaAuth:function(){return n.OktaAuth}}),e.o(n,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return n.OneLoginAuth}}),e.o(n,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return n.createSpecializedApp}}),e.o(n,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return n.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(ee,s,e){"use strict";e.d(s,{RefreshingAuthSessionManager:function(){return l}});function n(h,i){for(const E of i)if(!h.has(E))return!1;return!0}class t{constructor(i){this.options=i}sessionExistsAndHasScope(i,E){if(!i)return!1;if(!E||this.options.sessionScopes===void 0)return!0;const g=this.options.sessionScopes(i);return n(g,E)}getExtendedScope(i,E){const g=new Set(this.options.defaultScopes);if(i&&this.options.sessionScopes!==void 0){const R=this.options.sessionScopes(i);for(const T of R)g.add(T)}if(E)for(const R of E)g.add(R);return g}}var c=e(98005),m=e(36964);class v{constructor(){oe(this,"subject",new c.X(m.SessionState.SignedOut));oe(this,"signedIn",!1)}setIsSignedIn(i){this.signedIn!==i&&(this.signedIn=i,this.subject.next(this.signedIn?m.SessionState.SignedIn:m.SessionState.SignedOut))}sessionState$(){return this.subject}}class l{constructor(i){oe(this,"connector");oe(this,"helper");oe(this,"sessionScopesFunc");oe(this,"sessionShouldRefreshFunc");oe(this,"stateTracker",new v);oe(this,"refreshPromise");oe(this,"currentSession");const{connector:E,defaultScopes:g=new Set,sessionScopes:R,sessionShouldRefresh:T}=i;this.connector=E,this.sessionScopesFunc=R,this.sessionShouldRefreshFunc=T,this.helper=new t({sessionScopes:R,defaultScopes:g})}async getSession(i){if(this.helper.sessionExistsAndHasScope(this.currentSession,i.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const g=await this.collapsedSessionRefresh(),R=this.sessionScopesFunc(this.currentSession),T=this.sessionScopesFunc(g);return n(T,R)&&(this.currentSession=g),g}catch(g){if(i.optional)return;throw g}}if(!this.currentSession&&!i.instantPopup)try{const E=await this.collapsedSessionRefresh();return this.currentSession=E,this.getSession(i)}catch{}if(!i.optional)return this.currentSession=await this.connector.createSession({...i,scopes:this.helper.getExtendedScope(this.currentSession,i.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 i=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),i}finally{delete this.refreshPromise}}}class o{constructor(i){oe(this,"connector");oe(this,"helper");oe(this,"stateTracker",new SessionStateTracker);oe(this,"currentSession");const{connector:E,defaultScopes:g=new Set,sessionScopes:R}=i;this.connector=E,this.helper=new SessionScopeHelper({sessionScopes:R,defaultScopes:g})}setSession(i){this.currentSession=i,this.stateTracker.setIsSignedIn(Boolean(i))}async getSession(i){if(this.helper.sessionExistsAndHasScope(this.currentSession,i.scopes))return this.currentSession;if(!i.optional)return this.currentSession=await this.connector.createSession({...i,scopes:this.helper.getExtendedScope(this.currentSession,i.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(ee,s,e){"use strict";e.d(s,{J:function(){return c},X:function(){return m}});var n=e(82394),t=e.n(n);class c{constructor(){oe(this,"isClosed",!1);oe(this,"terminatingError");oe(this,"observable",new(t())(l=>this.isClosed?(this.terminatingError?l.error(this.terminatingError):l.complete(),()=>{}):(this.subscribers.add(l),()=>{this.subscribers.delete(l)})));oe(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(l){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(o=>o.next(l))}error(l){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=l,this.subscribers.forEach(o=>o.error(l))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(l=>l.complete())}subscribe(l,o,h){const i=typeof l=="function"?{next:l,error:o,complete:h}:l;return this.observable.subscribe(i)}}class m{constructor(l){oe(this,"isClosed");oe(this,"currentValue");oe(this,"terminatingError");oe(this,"observable");oe(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=l,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(l){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=l,this.subscribers.forEach(o=>o.next(l))}error(l){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=l,this.subscribers.forEach(o=>o.error(l))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(l=>l.complete())}subscribe(l,o,h){const i=typeof l=="function"?{next:l,error:o,complete:h}:l;return this.observable.subscribe(i)}}},88934:function(ee,s,e){"use strict";e.d(s,{L:function(){return c}});var n=e(36964),t=e(2784);const c=m=>{const{children:v}=m,l=(0,n.useApi)(n.featureFlagsApiRef),o="with"in m?l.isActive(m.with):!l.isActive(m.without);return t.createElement(t.Fragment,null,o?v:null)};(0,n.attachComponentData)(c,"core.featureFlagged",!0)},63938:function(ee,s,e){"use strict";e.d(s,{w:function(){return m}});var n=e(2784),t=e(10289),c=e(36964);const m=l=>{const o=(0,c.useApp)(),{NotFoundErrorPage:h}=o.getComponents(),i=(0,c.useElementFilter)(l.children,E=>E.getElements().flatMap(g=>{var T;let R=g.props.path;return R===""?[]:(R=(T=R==null?void 0:R.replace(/\/\*$/,""))!=null?T:"/",[{path:R,element:g,children:g.props.children?[{path:R==="/"?"/":"/*",element:g.props.children}]:void 0}])}).sort((g,R)=>R.path.localeCompare(g.path)).map(g=>(g.path=g.path==="/"?"/":`${g.path}/*`,g)));return i.push({element:n.createElement(h,null),path:"/*"}),(0,t.V$)(i)};var v=e(88934)},9118:function(ee,s,e){"use strict";e.d(s,{Button:function(){return D},CodeSnippet:function(){return pe},Content:function(){return Wa},ContentHeader:function(){return ei},CreateButton:function(){return We},DependencyGraph:function(){return H},DependencyGraphTypes:function(){return n},EmptyState:function(){return y},ErrorPage:function(){return oi},ErrorPanel:function(){return be},Header:function(){return Xa},HeaderIconLinkRow:function(){return Ir},HeaderLabel:function(){return gi},HeaderTabs:function(){return Ha},InfoCard:function(){return En},ItemCardGrid:function(){return Si},ItemCardHeader:function(){return vi},Link:function(){return I},LogViewer:function(){return An},MissingAnnotationEmptyState:function(){return _},OverflowTooltip:function(){return Vn},Page:function(){return qa},PageWithHeader:function(){return Pi},Progress:function(){return Zr},ResponseErrorPanel:function(){return an},RoutedTabs:function(){return Va},Select:function(){return Le},Sidebar:function(){return Qo},SidebarContext:function(){return Xn},SidebarDivider:function(){return us},SidebarItem:function(){return wa},SidebarPage:function(){return No},SidebarPinStateContext:function(){return $n},SubvalueCell:function(){return Cs},SupportButton:function(){return Mo},Table:function(){return js},WarningPanel:function(){return qt},sidebarConfig:function(){return zt},useContent:function(){return ea},useQueryParamState:function(){return Lo}});var n={};e.r(n),e.d(n,{Nm:function(){return He},ht:function(){return we},LJ:function(){return ot}});var t=e(2784),c=e(36964),m=e(19928);function v(r){const[a,d]=useState([]),f=useApi(alertApiRef);if(useEffect(()=>{const M=f.alert$().subscribe(W=>d(J=>J.concat(W)));return()=>{M.unsubscribe()}},[f]),a.length===0)return null;const[p]=a,A=()=>{d(M=>M.filter(W=>W!==p))};return React.createElement(Snackbar,{open:!0,anchorOrigin:{vertical:"top",horizontal:"center"}},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:A,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:p.severity},React.createElement("span",null,p.message.toString(),a.length>1&&React.createElement("em",null,` (${a.length-1} older ${pluralize("message",a.length-1)})`))))}var l=e(79692),o=e(12420);const h=(0,l.Z)(r=>(0,o.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:r.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function i(r){const{displayName:a,picture:d,customStyles:f}=r,p=h();return React.createElement(MaterialAvatar,{alt:a,src:d,className:p.avatar,style:{backgroundColor:stringToColor(a||d||""),...f}},a&&extractInitials(a))}var E=e(77277),g=e(86689),R=e(62833);const T=r=>/^([a-z+.-]+):/.test(r),N=r=>{var a;return r instanceof Array?r.map(N).join(" ").trim():typeof r=="object"&&r?N((a=r==null?void 0:r.props)==null?void 0:a.children):["string","number"].includes(typeof r)?String(r):""},I=t.forwardRef(({onClick:r,noTrack:a,...d},f)=>{const p=(0,c.useAnalytics)(),A=String(d.to),M=N(d.children)||A,W=T(A),J=W&&!!/^https?:/.exec(A),V=ie=>{r==null||r(ie),a||p.captureEvent("click",M,{attributes:{to:A}})};return W?t.createElement(g.Z,{ref:f,href:A,onClick:V,...J?{target:"_blank",rel:"noopener"}:{},...d}):t.createElement(g.Z,{ref:f,component:R.rU,onClick:V,...d})}),j=t.forwardRef((r,a)=>t.createElement(I,{ref:a,...r,color:"initial"})),D=t.forwardRef((r,a)=>t.createElement(E.Z,{ref:a,component:j,...r}));var C=e(60364),L=e(61837),B=e(80030),z=e(19353),K=e(55295);function ce(r){const{text:a,tooltipDelay:d=1e3,tooltipText:f="Text copied to clipboard"}=r,p=(0,c.useApi)(c.errorApiRef),[A,M]=(0,t.useState)(!1),[{error:W},J]=(0,K.Z)();(0,t.useEffect)(()=>{W&&p.post(W)},[W,p]);const V=ie=>{ie.stopPropagation(),M(!0),J(a)};return t.createElement(t.Fragment,null,t.createElement(B.ZP,{id:"copy-test-tooltip",title:f,placement:"top",leaveDelay:d,onClose:()=>M(!1),open:A},t.createElement(L.Z,{onClick:V},t.createElement(z.Z,null))))}var he=e(70813),ve=e(26639),De=e(39595);function pe(r){const{text:a,language:d,showLineNumbers:f=!1,highlightedNumbers:p,customStyle:A,showCopyCodeButton:M=!1}=r,W=(0,C.Z)(),J=W.palette.type==="dark"?ve.Z:De.Z,V=W.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(he.Z,{customStyle:A,language:d,style:J,showLineNumbers:f,wrapLines:!0,lineNumberStyle:{color:W.palette.textVerySubtle},lineProps:ie=>(p==null?void 0:p.includes(ie))?{style:{backgroundColor:V}}:{}},a),M&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(ce,{text:a})))}var je=e(41156),Je=e(88188);function We(r){const{title:a,to:d}=r,f=(0,je.Z)(p=>p.breakpoints.down("xs"));return d?f?t.createElement(L.Z,{component:R.rU,color:"primary",title:a,size:"small",to:d},t.createElement(Je.Z,null)):t.createElement(E.Z,{component:R.rU,variant:"contained",color:"primary",to:d},a):null}var He;(function(r){const a="TB";r.TOP_BOTTOM=a;const d="BT";r.BOTTOM_TOP=d;const f="LR";r.LEFT_RIGHT=f;const p="RL";r.RIGHT_LEFT=p})(He||(He={}));var Qe;(function(r){const a="UL";r.UP_LEFT=a;const d="UR";r.UP_RIGHT=d;const f="DL";r.DOWN_LEFT=f;const p="DR";r.DOWN_RIGHT=p})(Qe||(Qe={}));var ot;(function(r){const a="network-simplex";r.NETWORK_SIMPLEX=a;const d="tight-tree";r.TIGHT_TREE=d;const f="longest-path";r.LONGEST_PATH=f})(ot||(ot={}));var we;(function(r){const a="l";r.LEFT=a;const d="r";r.RIGHT=d;const f="c";r.CENTER=f})(we||(we={}));var ke=e(13387),rt=e(11105),Xe=e(97963),ht=e(46506),dt=e.n(ht),ft=e(54073),pt=e.n(ft),Pt=e(10368);const st=(0,l.Z)(r=>({node:{fill:r.palette.primary.light,stroke:r.palette.primary.light},text:{fill:r.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function et({node:{id:r}}){const a=st(),[d,f]=t.useState(0),[p,A]=t.useState(0),M=t.useRef(null);t.useLayoutEffect(()=>{if(M.current){let{height:ie,width:ue}=M.current.getBBox();ie=Math.round(ie),ue=Math.round(ue),(ie!==p||ue!==d)&&(f(ue),A(ie))}},[d,p]);const W=10,J=d+W*2,V=p+W*2;return t.createElement("g",null,t.createElement("rect",{className:a.node,width:J,height:V,rx:10}),t.createElement("text",{ref:M,className:a.text,y:V/2,x:J/2,textAnchor:"middle",alignmentBaseline:"middle"},r))}const St="arrow-marker",mt="node",Be="edge",ut="label",tt=(0,Pt.Z)(r=>({node:{transition:`${r.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),Ct=r=>t.createElement(et,{...r});function it({render:r=Ct,setNode:a,node:d}){const{width:f,height:p,x:A=0,y:M=0}=d,W=d,J=tt(),V=t.useRef(null);return t.useLayoutEffect(()=>{if(V.current){let{height:ie,width:ue}=V.current.getBBox();ie=Math.round(ie),ue=Math.round(ue),(ie!==p||ue!==f)&&a(d.id,{...d,height:ie,width:ue})}},[d,f,p,a]),t.createElement("g",{ref:V,"data-testid":mt,className:J.node,transform:`translate(${A-f/2},${M-p/2})`},r({node:W}))}var vt=e(55876),q=e(66481),Z=e(19574),ne=e.n(Z);const de=(0,Pt.Z)(r=>({text:{fill:r.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function ae({edge:{label:r}}){const a=de();return t.createElement("text",{className:a.text,textAnchor:"middle"},r)}const ye=(0,Pt.Z)(r=>({path:{strokeWidth:2,stroke:r.palette.textSubtle,fill:"none",transition:`${r.transitions.duration.shortest}ms`},label:{transition:`${r.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),Ze=r=>t.createElement(ae,{...r}),xe=vt.Z().x(r=>r.x).y(r=>r.y).curve(q.Z);function ze({render:r=Ze,setEdge:a,id:d,edge:f}){const{x:p=0,y:A=0,width:M,height:W,points:J}=f,V=f,ie=ye(),ue=t.useRef(null);t.useLayoutEffect(()=>{if(ue.current){let{height:Ce,width:Ie}=ue.current.getBBox();Ce=Math.round(Ce),Ie=Math.round(Ie),(Ce!==W||Ie!==M)&&a(d,{...f,height:Ce,width:Ie})}},[f,W,M,a,d]);let Re="";if(J){const Ce=J.filter(Ie=>ne()(Ie.x)&&ne()(Ie.y));Re=xe(Ce)||""}return t.createElement(t.Fragment,null,Re&&t.createElement("path",{"data-testid":Be,className:ie.path,markerEnd:`url(#${St})`,d:Re}),V.label?t.createElement("g",{ref:ue,"data-testid":ut,className:ie.label,transform:`translate(${p},${A})`},r({edge:V})):null)}const Q="workspace";function H(r){var wn,oo;const{edges:a,nodes:d,renderNode:f,direction:p=He.TOP_BOTTOM,align:A,nodeMargin:M=50,edgeMargin:W=10,rankMargin:J=50,paddingX:V=0,paddingY:ie=0,acyclicer:ue,ranker:Re=ot.NETWORK_SIMPLEX,labelPosition:Ce=we.RIGHT,labelOffset:Ie=10,edgeRanks:ct=1,edgeWeight:Ot=1,renderLabel:Gt,defs:Wt,zoom:nt="enabled",...bt}=r,Dt=(0,Xe.Z)(),[Kt,Tn]=t.useState(100),[ln,qn]=t.useState(100),Lt=t.useRef(new(dt()).graphlib.Graph),[Pn,ia]=t.useState(((wn=Lt.current.graph())==null?void 0:wn.width)||0),[bn,la]=t.useState(((oo=Lt.current.graph())==null?void 0:oo.height)||0),[vr,Ar]=t.useState([]),[ca,Jt]=t.useState([]),nn=Math.max(Pn,Kt),cn=Math.max(bn,ln),On=t.useMemo(()=>pt()(Ut=>{if(!Ut)return;const Qt=rt.Z(Ut),Nt=rt.Z(Ut.getElementById(Q));function hn(){Qt.call(ke.sP().scaleExtent([1,10]).on("zoom",Sn=>{Sn.transform.x=Math.min(0,Math.max(Sn.transform.x,nn-nn*Sn.transform.k)),Sn.transform.y=Math.min(0,Math.max(Sn.transform.y,cn-cn*Sn.transform.k)),Nt.attr("transform",Sn.transform)}))}nt==="enabled"?hn():nt==="enable-on-click"&&Qt.on("click",()=>hn());const{width:gn,height:Rr}=Ut.getBoundingClientRect();Kt!==gn&&Tn(gn),ln!==Rr&&qn(Rr)},100),[ln,Kt,nn,cn,nt]),Vt=t.useCallback(()=>{const Ut=Lt.current.nodes(),Qt=Lt.current.edges();Ut.forEach(Nt=>{d.some(gn=>gn.id===Nt)||Lt.current.removeNode(Nt)}),Qt.forEach(Nt=>{a.some(gn=>gn.from===Nt.v&&gn.to===Nt.w)||Lt.current.removeEdge(Nt.v,Nt.w)}),d.forEach(Nt=>{const hn=Lt.current.nodes().find(gn=>Nt.id===gn);if(hn&&Lt.current.node(hn)){const{width:gn,height:Rr,x:Sn,y:Hi}=Lt.current.node(hn);Lt.current.setNode(hn,{...Nt,width:gn,height:Rr,x:Sn,y:Hi})}else Lt.current.setNode(Nt.id,{...Nt,width:0,height:0})}),a.forEach(Nt=>{Lt.current.setEdge(Nt.from,Nt.to,{...Nt,label:Nt.label,width:0,height:0,labelpos:Ce,labeloffset:Ie,weight:Ot,minlen:ct})})},[a,d,Ce,Ie,Ot,ct]),jt=t.useMemo(()=>pt()(()=>{dt().layout(Lt.current);const{height:Ut,width:Qt}=Lt.current.graph(),Nt=Math.max(0,Ut||0),hn=Math.max(0,Qt||0);ia(hn),la(Nt),Ar(Lt.current.nodes()),Jt(Lt.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(Lt.current.setGraph({rankdir:p,align:A,nodesep:M,edgesep:W,ranksep:J,marginx:V,marginy:ie,acyclicer:ue,ranker:Re}),Vt(),jt(),jt.cancel),[ue,A,p,W,V,ie,M,J,Re,Vt,jt]);function Un(Ut,Qt){return Lt.current.setNode(Ut,Qt),jt(),Lt.current}function Dn(Ut,Qt){return Lt.current.setEdge(Ut,Qt),jt(),Lt.current}return t.createElement("svg",{ref:On,...bt,width:"100%",height:cn,viewBox:`0 0 ${nn} ${cn}`},t.createElement("defs",null,t.createElement("marker",{id:St,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:Dt.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),Wt),t.createElement("g",{id:Q},t.createElement("svg",{width:Pn,height:bn,y:cn/2-bn/2,x:nn/2-Pn/2,viewBox:`0 0 ${Pn} ${bn}`},ca.map(Ut=>{const Qt=Lt.current.edge(Ut);return Qt?t.createElement(ze,{key:`${Ut.v}-${Ut.w}`,id:Ut,setEdge:Dn,render:Gt,edge:Qt}):null}),vr.map(Ut=>{const Qt=Lt.current.node(Ut);return Qt?t.createElement(it,{key:Ut,setNode:Un,render:f,node:Qt}):null}))))}var w=e(72779),se=e.n(w);const me=(0,l.Z)(r=>{var a;return{root:{padding:r.spacing(0),marginBottom:r.spacing(0),marginTop:r.spacing(0),display:"flex",flexFlow:"row nowrap"},topPosition:{position:"relative",marginBottom:r.spacing(6),marginTop:-r.spacing(3),zIndex:"unset"},icon:{fontSize:20},content:{width:"100%",maxWidth:"inherit",flexWrap:"nowrap"},message:{display:"flex",alignItems:"center",color:r.palette.banner.text,"& a":{color:r.palette.banner.link}},info:{backgroundColor:r.palette.banner.info},error:{backgroundColor:r.palette.banner.error},warning:{backgroundColor:(a=r.palette.banner.warning)!=null?a:r.palette.banner.error}}},{name:"BackstageDismissableBanner"}),Ae=r=>{var Ce;const{variant:a,message:d,id:f,fixed:p=!1}=r,A=me(),W=useApi(storageApiRef).forBucket("notifications"),J=(Ce=W.snapshot("dismissedBanners").value)!=null?Ce:[],[V,ie]=useState(new Set(J)),ue=useObservable(W.observe$("dismissedBanners"));useEffect(()=>{var Ie;if(ue==null?void 0:ue.value){const ct=(Ie=ue==null?void 0:ue.value)!=null?Ie:[];ie(new Set(ct))}},[ue==null?void 0:ue.value]);const Re=()=>{W.set("dismissedBanners",[...V,f])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!V.has(f),classes:{root:classNames(A.root,!p&&A.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(A.content,A[a]),message:A.message},message:d,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Re},React.createElement(Close,{className:A.icon}))]}))};var Te=e(60905),Oe=e(90436),yt=e(86284),lt=e(96465),at=e(19133),$=e(3871);const x=(0,l.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),b=({missing:r})=>{const a=x();switch(r){case"field":return t.createElement("img",{src:yt,className:a.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:lt,alt:"no Information",className:a.generalImg});case"content":return t.createElement("img",{src:at,alt:"create Component",className:a.generalImg});case"data":return t.createElement("img",{src:$,alt:"no Build",className:a.generalImg});default:return null}},u=(0,l.Z)(r=>({root:{backgroundColor:r.palette.background.default,padding:r.spacing(2,0,0,0)},action:{marginTop:r.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function y(r){const{title:a,description:d,missing:f,action:p}=r,A=u();return t.createElement(Te.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:A.root,spacing:2},t.createElement(Te.Z,{item:!0,xs:12,md:6},t.createElement(Te.Z,{container:!0,direction:"column"},t.createElement(Te.Z,{item:!0,xs:!0},t.createElement(Oe.Z,{variant:"h5"},a)),t.createElement(Te.Z,{item:!0,xs:!0},t.createElement(Oe.Z,{variant:"body1"},d)),t.createElement(Te.Z,{item:!0,xs:!0,className:A.action},p))),t.createElement(Te.Z,{item:!0,xs:12,md:6,className:A.imageContainer},t.createElement(b,{missing:f})))}const P=`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`,F=(0,l.Z)(r=>({code:{borderRadius:6,margin:`${r.spacing(2)}px 0px`,background:r.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function _(r){const{annotation:a}=r,d=F(),f=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(y,{missing:"field",title:"Missing Annotation",description:f,action:t.createElement(t.Fragment,null,t.createElement(Oe.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:d.code},t.createElement(pe,{text:P.replace("ANNOTATION",a),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(E.Z,{color:"primary",component:I,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var te=e(11776),re=e(38402),le=e(49378),ge=e(41128),Ne=e(27616),Pe=e(8284),$e=e(70660),Ge=e(91750),At=e(38016);const qe=(r,a)=>(a.palette.type==="light"?ge._j:ge.$n)(a.palette[r].light,.6),Et=(r,a)=>(a.palette.type==="light"?ge.$n:ge._j)(a.palette[r].light,.9),$t=(0,l.Z)(r=>({root:{marginRight:r.spacing(1),fill:({severity:a})=>qe(a,r)}})),wt=({severity:r})=>{const a=$t({severity:r});return t.createElement(Ge.Z,{classes:a})},gt=({severity:r})=>{const a=$t({severity:r});return t.createElement(At.Z,{classes:a})},Tt=(0,l.Z)(r=>({panel:{backgroundColor:({severity:a})=>Et(a,r),color:({severity:a})=>qe(a,r),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:a})=>qe(a,r),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:a})=>qe(a,r),backgroundColor:({severity:a})=>Et(a,r)},details:{width:"100%",display:"block",color:r.palette.textContrast,backgroundColor:r.palette.background.default,border:`1px solid ${r.palette.border}`,padding:r.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),Ht=r=>r.charAt(0).toLocaleUpperCase("en-US")+r.slice(1);function qt(r){const{severity:a="warning",title:d,message:f,children:p,defaultExpanded:A}=r,M=Tt({severity:a}),W=Ht(a)+(d?`: ${d}`:"");return t.createElement(Ne.Z,{defaultExpanded:A!=null?A:!1,className:M.panel,role:"alert"},t.createElement(Pe.Z,{expandIcon:t.createElement(gt,{severity:a}),className:M.summary},t.createElement(wt,{severity:a}),t.createElement(Oe.Z,{className:M.summaryText,variant:"subtitle1"},W)),(f||p)&&t.createElement($e.Z,null,t.createElement(Te.Z,{container:!0},f&&t.createElement(Te.Z,{item:!0,xs:12},t.createElement(Oe.Z,{className:M.message,variant:"body1"},f)),p&&t.createElement(Te.Z,{item:!0,xs:12,className:M.details},p))))}const Y=(0,l.Z)(r=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:r.spacing(2)},divider:{margin:r.spacing(2)}}),{name:"BackstageErrorPanel"}),Ee=({error:r,message:a,stack:d,children:f})=>{const p=Y();return t.createElement(te.Z,{dense:!0},t.createElement(re.Z,{alignItems:"flex-start"},t.createElement(le.Z,{classes:{secondary:p.text},primary:"Error",secondary:r}),t.createElement(ce,{text:r})),t.createElement(re.Z,{alignItems:"flex-start"},t.createElement(le.Z,{classes:{secondary:p.text},primary:"Message",secondary:a}),t.createElement(ce,{text:a})),d&&t.createElement(re.Z,{alignItems:"flex-start"},t.createElement(le.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:d}),t.createElement(ce,{text:d})),f)};function be(r){const{title:a,error:d,defaultExpanded:f,children:p}=r;return t.createElement(qt,{severity:"error",title:a!=null?a:d.message,defaultExpanded:f},t.createElement(Ee,{error:d.name,message:d.message,stack:d.stack,children:p}))}var It=e(85256);const Bt=(0,l.Z)(r=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:r.spacing(2)},divider:{margin:r.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function an(r){var Ie;const{title:a,error:d,defaultExpanded:f}=r,p=Bt();if(d.name!=="ResponseError")return t.createElement(be,{title:a!=null?a:d.message,defaultExpanded:f,error:d});const{body:A,cause:M}=d,{request:W,response:J}=A,V=`${J.statusCode}: ${M.name}`,ie=W&&`${W.method} ${W.url}`,ue=M.message.replace(/\\n/g,`
12
- `),Re=(Ie=M.stack)==null?void 0:Ie.replace(/\\n/g,`
13
- `),Ce=JSON.stringify(A,void 0,2);return t.createElement(be,{title:a!=null?a:d.message,defaultExpanded:f,error:{name:V,message:ue,stack:Re}},ie&&t.createElement(re.Z,{alignItems:"flex-start"},t.createElement(le.Z,{classes:{secondary:p.text},primary:"Request",secondary:W?`${ie}`:void 0}),t.createElement(ce,{text:ie})),t.createElement(t.Fragment,null,t.createElement(It.Z,{component:"li",className:p.divider}),t.createElement(re.Z,{alignItems:"flex-start"},t.createElement(le.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(pe,{language:"json",text:Ce,showCopyCodeButton:!0})))}var In=e(47093);function _n(r){const a=document.createElement("div");return a.setAttribute("id",r),a}function Sr(r){document.body.insertBefore(r,document.body.lastElementChild.nextElementSibling)}function Cr(r){const a=useRef(null);useEffect(function(){const p=document.querySelector(`#${r}`),A=p||_n(r);return p||Sr(A),A.appendChild(a.current),function(){a.current.remove(),A.childNodes.length===-1&&A.remove()}},[r]);function d(){return a.current||(a.current=document.createElement("div")),a.current}return d()}var io=null;const er="core.calloutSeen";function Tr(){const[r,a]=useState(()=>{const f=localStorage.getItem(er);return f?JSON.parse(f):{}}),d=useCallback((f,p)=>{const A=localStorage.getItem(er),W={...A?JSON.parse(A):{},[f]:p};a(W),localStorage.setItem(er,JSON.stringify(W))},[]);return{states:r,setState:d}}function tr(r){const{states:a,setState:d}=Tr(),f=useCallback(()=>{d(r,!0)},[d,r]);return{seen:a[r]===!0,markSeen:f}}function Pr(r){const{seen:a,markSeen:d}=tr(r);return{show:a===!1,hide:d}}const nr=(0,l.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 ua(r){const{featureId:a,title:d,description:f,children:p}=r,{show:A,hide:M}=useShowCallout(a),W=usePortal("core.callout"),J=useRef(null),[V,ie]=useState(),ue=nr(),Re=useCallback(()=>{if(J.current){const Ce=J.current.getBoundingClientRect(),Ie=Math.max(Ce.width,Ce.height),ct=800,Ot=Ce.x-(Ie-Ce.width)/2-ct,Gt=Ce.y-(Ie-Ce.height)/2-ct,Wt=Ie+2*ct,nt=450,bt=Ce.x+Ce.width/2-nt,Dt=Ce.y-(Ie-Ce.height)/2+Ie+20;ie({dotLeft:Ot,dotTop:Gt,dotSize:Wt,borderWidth:ct,textTop:Dt,textLeft:bt,textWidth:nt})}},[]);return useEffect(()=>(window.addEventListener("resize",Re),window.addEventListener("scroll",Re),()=>{window.removeEventListener("resize",Re),window.removeEventListener("scroll",Re)}),[Re]),useLayoutEffect(Re,[J.current,Re]),A?React.createElement(React.Fragment,null,React.createElement("div",{className:ue.featureWrapper,ref:J},p),createPortal(React.createElement("div",{className:ue.backdrop},React.createElement(ClickAwayListener,{onClickAway:M},React.createElement(React.Fragment,null,React.createElement("div",{className:ue.dot,"data-testid":"dot",style:{left:V==null?void 0:V.dotLeft,top:V==null?void 0:V.dotTop,width:V==null?void 0:V.dotSize,height:V==null?void 0:V.dotSize,borderWidth:V==null?void 0:V.borderWidth},onClick:M,onKeyDown:M,role:"button",tabIndex:0},React.createElement("div",{className:ue.pulseCircle})),React.createElement("div",{className:ue.text,"data-testid":"text",style:{left:V==null?void 0:V.textLeft,top:V==null?void 0:V.textTop,width:V==null?void 0:V.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},d),React.createElement(Typography,null,f))))),W)):React.createElement(React.Fragment,null,p)}var Ln=e(35292);const rr=(0,l.Z)(r=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:"gray",cursor:"default"},primary:{color:r.palette.primary.main},secondary:{color:r.palette.secondary.main},label:{fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function pn({color:r="primary",disabled:a=!1,href:d="#",icon:f=t.createElement(Ln.Z,null),label:p,onClick:A,title:M}){const W=rr();return a?t.createElement(g.Z,{title:M,className:se()(W.link,W.disabled),underline:"none"},f,t.createElement("span",{className:W.label},p)):t.createElement(g.Z,{title:M,className:se()(W.link,W[r]),to:d,component:I,onClick:A},f,t.createElement("span",{className:W.label},p))}const Mt=(0,l.Z)(r=>({links:{margin:r.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:r.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function Ir(r){const{links:a}=r,d=Mt();return t.createElement("nav",{className:d.links},a.map((f,p)=>t.createElement(pn,{key:p+1,...f})))}const Fn=r=>{const a=r==="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
- `},Lr=100,Bn=10,xr=(0,l.Z)(r=>({root:{position:"relative",display:"flex",flexFlow:"row nowrap",alignItems:"center"},container:{overflow:"auto",scrollbarWidth:0,"&::-webkit-scrollbar":{display:"none"}},fade:{position:"absolute",width:Lr,height:`calc(100% + ${Bn}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-Bn,background:`linear-gradient(90deg, ${Fn(r.palette.type)})`},fadeRight:{right:-Bn,background:`linear-gradient(270deg, ${Fn(r.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-r.spacing(2)},buttonRight:{right:-r.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function br(r){const[[a,d],f]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=r.current;if(!p){f([0,0]);return}const A=()=>{const M=p.scrollLeft,W=p.scrollWidth-p.offsetWidth-p.scrollLeft;f([M,W])};return A(),p.addEventListener("scroll",A),window.addEventListener("resize",A),()=>{p.removeEventListener("scroll",A),window.removeEventListener("resize",A)}},[r]),[a,d]}function zn(r,a,d){const[f,p]=React.useState(0);return React.useLayoutEffect(()=>{if(f===0)return;const A=performance.now(),M=requestAnimationFrame(W=>{if(!r.current)return;const J=W-A,V=Math.abs(f)*J/a,ue=Math.max(d,V)*Math.sign(f);r.current.scrollBy({left:ue});const Re=f-ue;Math.sign(f)!==Math.sign(Re)?p(0):p(Re)});return()=>cancelAnimationFrame(M)},[r,f,a,d]),p}function da(r){const{scrollStep:a=100,scrollSpeed:d=50,minScrollDistance:f=5,children:p,...A}=r,M=xr(r),W=React.useRef(),[J,V]=br(W),ie=zn(W,d,f),ue=Re=>{!W.current||ie(Re?a:-a)};return React.createElement("div",{...A,className:M.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:M.container,ref:W},p),React.createElement("div",{className:classNames(M.fade,M.fadeLeft,{[M.fadeHidden]:J===0})}),React.createElement("div",{className:classNames(M.fade,M.fadeRight,{[M.fadeHidden]:V===0})}),J>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>ue(!1),className:classNames(M.button,M.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),V>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>ue(!0),className:classNames(M.button,M.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Or=(0,l.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function fa(r){const a=Or(r),{shorthand:d,alpha:f}=r;return d?React.createElement("span",{className:a[f?"alpha":"beta"],style:{fontSize:"120%"}},f?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:a[f?"alpha":"beta"]},f?"Alpha":"Beta")}const Dr=(0,t.lazy)(()=>Promise.all([e.e(5011),e.e(8718)]).then(e.bind(e,98718)).then(r=>({default:r.RealLogViewer})));function An(r){const{Progress:a}=(0,c.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(a,null)},t.createElement(Dr,{...r}))}const dn=(0,l.Z)(r=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${r.palette.border}`},"& th, & td":{border:`1px solid ${r.palette.border}`,padding:r.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:r.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:r.palette.background.paper},"& tr":{backgroundColor:r.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:r.palette.background.default},"& a":{color:r.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),xn={code:({inline:r,className:a,children:d,...f})=>{const p=String(d).replace(/\n+$/,""),A=/language-(\w+)/.exec(a||"");return!r&&A?t.createElement(pe,{language:A[1],text:p}):t.createElement("code",{className:a,...f},d)}};function Wn(r){const{content:a,dialect:d="gfm",linkTarget:f}=r,p=dn();return React.createElement(ReactMarkdown,{remarkPlugins:d==="gfm"?[gfm]:[],className:p.markdown,children:a,components:xn,linkTarget:f})}var ar=e(10179);const Fr=(0,l.Z)(r=>({root:{paddingLeft:r.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),or=({request:r,busy:a,setBusy:d})=>{const f=Fr(),[p,A]=useState(),M=async()=>{d(!0);try{await r.trigger()}catch(J){A(isError(J)?J.message:"An unspecified error occurred")}finally{d(!1)}},W=r.provider.icon;return React.createElement(ListItem,{button:!0,disabled:a,classes:{root:f.root}},React.createElement(ListItemAvatar,null,React.createElement(W,{fontSize:"large"})),React.createElement(ListItemText,{primary:r.provider.title,secondary:p&&React.createElement(Typography,{color:"error"},p)}),React.createElement(Button,{color:"primary",variant:"contained",onClick:M},"Log in"))};var ma=null;const Br=(0,l.Z)(r=>({dialog:{paddingTop:r.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:r.spacing(2,0)}}),{name:"OAuthRequestDialog"});function sr(r){const a=Br(),[d,f]=useState(!1),p=useApi(oauthRequestApiRef),A=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),M=()=>{A.forEach(W=>W.reject())};return React.createElement(Dialog,{open:Boolean(A.length),fullWidth:!0,maxWidth:"xs",classes:{paper:a.dialog}},React.createElement(DialogTitle,{classes:{root:a.title}},"Login Required"),React.createElement(DialogContent,{dividers:!0,classes:{root:a.contentList}},React.createElement(List,null,A.map(W=>React.createElement(LoginRequestListItem,{key:W.provider.title,request:W,busy:d,setBusy:f})))),React.createElement(DialogActions,{classes:{root:a.actionButtons}},React.createElement(Button,{onClick:M},"Reject All")))}var fn=e(15277),Mn=e.n(fn),Zn=e(29862);const Hn=(0,l.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Vn(r){var M;const[a,d]=(0,t.useState)(!1),f=(0,Zn.t)(),p=Hn(),A=W=>{f()&&d(W)};return t.createElement(B.ZP,{title:(M=r.title)!=null?M:r.text||"",placement:r.placement,disableHoverListener:!a},t.createElement(Mn(),{text:r.text,line:r.line,onToggled:A,containerClassName:p.container}))}var Mr=e(67358);function Zr(r){const[a,d]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const f=setTimeout(()=>d(!0),250);return()=>clearTimeout(f)},[]),a?t.createElement(Mr.Z,{...r,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var jn=e(94339),ir=e(14503),Nr=e(24579),Gn=e(32552),Xt=e(15459),yn=e(95544),$r=e(27597);const Ur=(0,l.Z)(r=>({root:{maxWidth:"fit-content",padding:r.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:r.palette.textSubtle},arrow:{color:r.palette.textSubtle}}),{name:"BackstageBottomLink"});function wr(r){const{link:a,title:d,onClick:f}=r,p=Ur();return t.createElement("div",null,t.createElement(It.Z,null),t.createElement(I,{to:a,onClick:f,underline:"none"},t.createElement(yn.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(yn.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(Oe.Z,null,t.createElement("strong",null,d))),t.createElement($r.Z,{className:p.arrow}))))}const zr=r=>{const{slackChannel:a}=r;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(D,{to:a.href,variant:"contained"},a.name)},Wr=class extends t.Component{constructor(a){super(a);this.state={error:void 0,errorInfo:void 0}}componentDidCatch(a,d){console.error(`ErrorBoundary, error: ${a}, info: ${d}`),this.setState({error:a,errorInfo:d})}render(){const{slackChannel:a,children:d}=this.props,{error:f}=this.state;return f?t.createElement(be,{title:"Something Went Wrong",error:f},t.createElement(zr,{slackChannel:a})):d}},Hr=(0,l.Z)(r=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:r.spacing(2,2,2,2.5)},headerTitle:{fontWeight:700},headerSubheader:{paddingTop:r.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),lr=(0,Xt.Z)(r=>({root:{display:"inline-block",padding:r.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(ir.Z),Cn={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 En(r){const{title:a,subheader:d,divider:f=!0,deepLink:p,slackChannel:A,errorBoundaryProps:M,variant:W,children:J,headerStyle:V,headerProps:ie,icon:ue,action:Re,actionsClassName:Ce,actions:Ie,cardClassName:ct,actionsTopRight:Ot,className:Gt,noPadding:Wt,titleTypographyProps:nt}=r,bt=Hr();let Dt={},Kt={};W&&W.split(/[\s]+/g).forEach(Lt=>{Dt={...Dt,...Cn.card[Lt]},Kt={...Kt,...Cn.cardContent[Lt]}});const Tn=()=>t.createElement("div",{className:bt.headerSubheader},d&&t.createElement("div",{className:bt.subheader},d),ue),ln=M||(A?{slackChannel:A}:{});return t.createElement(jn.Z,{style:Dt,className:Gt},t.createElement(Wr,{...ln},a&&t.createElement(Gn.Z,{classes:{root:bt.header,title:bt.headerTitle,subheader:bt.headerSubheader,avatar:bt.headerAvatar,action:bt.headerAction,content:bt.headerContent},title:a,subheader:Tn(),action:Re,style:{...V},titleTypographyProps:nt,...ie}),Ot&&t.createElement(lr,null,Ot),f&&t.createElement(It.Z,null),t.createElement(Nr.Z,{className:se()(ct,{[bt.noPadding]:Wt}),style:Kt},J),Ie&&t.createElement(ir.Z,{className:Ce},Ie),p&&t.createElement(wr,{...p})))}var ha=e(39307);const Vr=(0,l.Z)(r=>({root:{position:"relative",lineHeight:0},overlay:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -60%)",fontSize:45,fontWeight:"bold",color:r.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"}),cr={fractional:!0,inverse:!1,unit:"%",max:100},ur=({palette:r,value:a,inverse:d,max:f})=>{if(isNaN(a))return"#ddd";const p=f||cr.max,A=d?p-a:a;return A<p/3?r.status.error:A<p*(2/3)?r.status.warning:r.status.ok};function ga(r){const[a,d]=useState(null),{getColor:f=ur}=r,p=Vr(r),{palette:A}=useTheme(),{value:M,fractional:W,inverse:J,unit:V,max:ie,description:ue}={...cr,...r},Re=W?Math.round(M*ie):M,Ce=ie!==100?Math.round(M):Re,[Ie,ct]=useState(!1);return useEffect(()=>{const Ot=a,Gt=()=>ct(!0),Wt=()=>ct(!1);return Ot&&ue?(Ot.addEventListener("mouseenter",Gt),Ot.addEventListener("mouseleave",Wt),()=>{Ot.removeEventListener("mouseenter",Gt),Ot.removeEventListener("mouseleave",Wt)}):()=>{ct(!1)}},[ue,a]),React.createElement("div",{ref:d,className:p.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Re,strokeWidth:12,trailWidth:12,strokeColor:f({palette:A,value:Ce,inverse:J,max:ie}),className:p.circle}),ue&&Ie?React.createElement("div",{className:p.description},ue):React.createElement("div",{className:p.overlay},isNaN(M)?"N/A":`${Ce}${V}`))}const jr=(0,l.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function pa(r){const a=jr(r),{title:d,subheader:f,progress:p,inverse:A,deepLink:M,description:W,icon:J,variant:V,getColor:ie}=r,ue={inverse:A,description:W,getColor:ie,value:p};return React.createElement("div",{className:a.root},React.createElement(InfoCard,{title:d,subheader:f,deepLink:M,variant:V,icon:J},React.createElement(Gauge,{...ue})))}function ya(r){const{value:a,getColor:d=getProgressColor}=r,{palette:f}=useTheme();if(isNaN(a))return null;let p=Math.round(a*100*100)/100;p>100&&(p=100);const A=d({palette:f,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:A})))}var Gr=e(21324),Kr=e(7089),Yr=e(1292),Kn=e(42494),Jr=e(74603),Qr=e(12231),Ea=e(73698),S=e(72379);const O=(0,l.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var G=()=>{const r=O();return t.createElement(S.Z,{className:r.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 X=(0,l.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var fe=()=>{const r=X();return t.createElement(S.Z,{className:r.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 Se=(0,Xt.Z)(r=>(0,o.Z)({root:{"label + &":{marginTop:r.spacing(3)}},input:{borderRadius:4,position:"relative",backgroundColor:r.palette.background.paper,border:"1px solid #ced4da",fontSize:16,padding:"10px 26px 10px 12px",transition:r.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:r.palette.background.paper,borderRadius:4}}}),{name:"BackstageSelectInputBase"})(Jr.Z),Fe=(0,l.Z)(r=>(0,o.Z)({formControl:{margin:`${r.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:r.typography.fontFamily,color:r.palette.text.primary,"&.Mui-focused":{color:r.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function Le(r){const{multiple:a,items:d,label:f,placeholder:p,selected:A,onChange:M,triggerReset:W,native:J=!1,disabled:V=!1}=r,ie=Fe(),[ue,Re]=(0,t.useState)(A||(a?[]:"")),[Ce,Ie]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Re(a?[]:"")},[W,a]),(0,t.useEffect)(()=>{A!==void 0&&Re(A)},[A]);const ct=nt=>{Re(nt.target.value),M(nt.target.value)},Ot=nt=>{if(V){nt.preventDefault();return}Ie(bt=>a&&!(nt.target instanceof HTMLElement)?!0:!bt)},Gt=()=>{Ie(!1)},Wt=nt=>()=>{const bt=ue.filter(Dt=>Dt!==nt);Re(bt),M(bt)};return t.createElement("div",{className:ie.root},t.createElement(Oe.Z,{variant:"button"},f),t.createElement(Yr.Z,{onClickAway:Gt},t.createElement(Kn.Z,{className:ie.formControl},t.createElement(Ea.Z,{value:ue,native:J,disabled:V,"data-testid":"select",displayEmpty:!0,multiple:a,onChange:ct,onClick:Ot,open:Ce,input:t.createElement(Se,null),renderValue:nt=>{var bt;return a&&ue.length!==0?t.createElement("div",{className:ie.chips},nt.map(Dt=>{var Kt,Tn;return t.createElement(Kr.Z,{key:(Kt=d.find(ln=>ln.value===Dt))==null?void 0:Kt.value,label:(Tn=d.find(ln=>ln.value===Dt))==null?void 0:Tn.label,clickable:!0,onDelete:Wt(Dt),className:ie.chip})})):t.createElement(Oe.Z,null,ue.length===0?p||"":(bt=d.find(Dt=>Dt.value===nt))==null?void 0:bt.label)},IconComponent:()=>Ce?t.createElement(fe,null):t.createElement(G,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!a&&t.createElement(Qr.Z,{value:[]},p),J?d&&d.map(nt=>t.createElement("option",{value:nt.value,key:nt.value},nt.label)):d&&d.map(nt=>t.createElement(Qr.Z,{key:nt.value,value:nt.value},a&&t.createElement(Gr.Z,{color:"primary",checked:ue.includes(nt.value)||!1,className:ie.checkbox}),nt.label))))))}const Me=()=>{},Ue=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:Me,stepHistory:[],setStepHistory:Me,onStepChange:Me});function Ve(r){const{children:a,elevated:d,onStepChange:f,activeStep:p=0}=r,[A,M]=useState(p),[W,J]=useState([0]);useEffect(()=>{M(p)},[p]);const V=[];let ie;return Children.forEach(a,ue=>{isValidElement(ue)&&(ue.props.end?ie=ue:V.push(ue))}),React.createElement(React.Fragment,null,React.createElement(Ue.Provider,{value:{stepIndex:A,setStepIndex:M,stepHistory:W,setStepHistory:J,onStepChange:f,stepperLength:Children.count(a)}},React.createElement(MuiStepper,{activeStep:A,orientation:"vertical",elevation:d?2:0},V)),A>=Children.count(a)-1&&ie)}const Rt=(0,l.Z)(r=>({root:{marginTop:r.spacing(3),"& button":{marginRight:r.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),_e=({text:r,handleClick:a})=>React.createElement(Button,{onClick:a},r||"Reset"),Ke=({text:r,handleClick:a,disabled:d,last:f,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:d,"data-testid":`nextButton-${p}`,onClick:a},r||(f?"Finish":"Next")),xt=({text:r,handleClick:a,disabled:d,stepIndex:f})=>React.createElement(Button,{onClick:a,"data-testid":`backButton-${f}`,disabled:d},r||"Back"),Zt=({actions:r={},children:a})=>{const d=Rt(),{stepperLength:f,stepIndex:p,setStepIndex:A,stepHistory:M,setStepHistory:W,onStepChange:J}=useContext(VerticalStepperContext),V=(Ce,Ie)=>{Ie&&Ie(),J&&J(p,Ce),A(Ce)},ie=()=>{const Ce=r.nextStep?r.nextStep(p,f-1):p+1;V(Ce,r.onNext),W([...M,Ce])},ue=()=>{M.pop(),V(M[M.length-1],r.onBack),W([...M])},Re=()=>{V(0,r.onRestart),W([0])};return React.createElement("div",{className:d.root},[void 0,!0].includes(r.showBack)&&p!==0&&React.createElement(xt,{text:r.backText,handleClick:ue,disabled:p===0,stepIndex:p}),[void 0,!0].includes(r.showNext)&&React.createElement(Ke,{text:r.nextText,handleClick:ie,disabled:!!f&&p>=f||!!r.canNext&&!r.canNext(),stepIndex:p}),r.showRestart&&p!==0&&React.createElement(_e,{text:r.restartText,handleClick:Re,stepIndex:p}),a)},Rn=(0,l.Z)(r=>({end:{padding:r.spacing(3)}}),{name:"SimpleStepperStep"});function Yt(r){const{title:a,children:d,end:f,actions:p,...A}=r,M=Rn();return f?React.createElement("div",{className:M.end},React.createElement(Typography,{variant:"h6"},a),d,React.createElement(SimpleStepperFooter,{actions:{...p||{},showNext:!1}})):React.createElement(MuiStep,{...A},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},a)),React.createElement(StepContent,null,d,React.createElement(SimpleStepperFooter,{actions:p})))}const Ft=(0,l.Z)(r=>({status:{fontWeight:500,"&::before":{width:"0.7em",height:"0.7em",display:"inline-block",marginRight:8,borderRadius:"50%",content:'""'}},ok:{"&::before":{backgroundColor:r.palette.status.ok}},warning:{"&::before":{backgroundColor:r.palette.status.warning}},error:{"&::before":{backgroundColor:r.palette.status.error}},pending:{"&::before":{backgroundColor:r.palette.status.pending}},running:{"&::before":{backgroundColor:r.palette.status.running}},aborted:{"&::before":{backgroundColor:r.palette.status.aborted}}}),{name:"BackstageStatus"});function vn(r){const a=Ft(r);return React.createElement("span",{className:classNames(a.status,a.ok),"aria-label":"Status ok","aria-hidden":"true",...r})}function on(r){const a=Ft(r);return React.createElement("span",{className:classNames(a.status,a.warning),"aria-label":"Status warning","aria-hidden":"true",...r})}function Yn(r){const a=Ft(r);return React.createElement("span",{className:classNames(a.status,a.error),"aria-label":"Status error","aria-hidden":"true",...r})}function Xr(r){const a=Ft(r);return React.createElement("span",{className:classNames(a.status,a.pending),"aria-label":"Status pending","aria-hidden":"true",...r})}function _t(r){const a=Ft(r);return React.createElement("span",{className:classNames(a.status,a.running),"aria-label":"Status running","aria-hidden":"true",...r})}function en(r){const a=Ft(r);return React.createElement("span",{className:classNames(a.status,a.aborted),"aria-label":"Status aborted","aria-hidden":"true",...r})}var Jn=e(74600),Qn=e(15584);const lo=r=>(0,o.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:r.spacing(4),border:"0",verticalAlign:"top"}}),co={root:{border:"0",verticalAlign:"top"}},uo=r=>(0,o.Z)({root:{listStyle:"none",margin:r.spacing(0,0,-1,0),padding:"0"}}),fo=r=>(0,o.Z)({root:{padding:r.spacing(0,0,1,0)},random:{}}),mo=(0,Xt.Z)(lo,{name:"BackstageMetadataTableTitleCell"})(Qn.Z),ho=(0,Xt.Z)(co,{name:"BackstageMetadataTableCell"})(Qn.Z),Gi=({dense:r,children:a})=>React.createElement(Table,{size:r?"small":"medium"},React.createElement(TableBody,null,a)),Ki=({title:r,children:a,...d})=>React.createElement(TableRow,null,r&&React.createElement(mo,null,r),React.createElement(ho,{colSpan:r?1:2,...d},a)),va=(0,Xt.Z)(uo,{name:"BackstageMetadataTableList"})(({classes:r,children:a})=>t.createElement("ul",{className:r.root},a)),Yi=(0,Xt.Z)(fo,{name:"BackstageMetadataTableListItem"})(({classes:r,children:a})=>t.createElement("li",{className:r.root},a)),Aa=(0,o.Z)({root:{margin:"0 0",listStyleType:"none"}}),go=r=>(0,o.Z)({root:{...Aa.root,paddingLeft:r.spacing(1)}}),Ra=(0,Xt.Z)(Aa,{name:"BackstageStructuredMetadataTableList"})(({classes:r,children:a})=>t.createElement(va,{classes:r},a)),Sa=(0,Xt.Z)(go,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:r,children:a})=>t.createElement(va,{classes:r},a));function po(r,a){const d=r.map((f,p)=>React.createElement(MetadataListItem,{key:p},kr(f)));return a?React.createElement(Sa,null,d):React.createElement(Ra,null,d)}function yo(r,a,d){const f=Object.keys(r).map(p=>{const A=kr(r[p],!0),M=d&&d.titleFormat?d.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${M}: `,A)});return a?React.createElement(Sa,null,f):React.createElement(Ra,null,f)}function kr(r,a,d){return React.isValidElement(r)?React.createElement(Fragment,null,r):typeof r=="object"&&!Array.isArray(r)?yo(r,a,d):Array.isArray(r)?po(r,d):typeof r=="boolean"?React.createElement(Fragment,null,r?"\u2705":"\u274C"):React.createElement(Fragment,null,r)}const Eo=({value:r,options:a})=>React.createElement(Fragment,null,kr(r,a)),vo=({title:r,value:a,options:d})=>React.createElement(MetadataTableItem,{title:d&&d.titleFormat?d.titleFormat(r):startCase(r)},React.createElement(Eo,{value:a,options:d}));function Ao(r,a){return Object.keys(r).map(d=>React.createElement(vo,{key:d,title:d,value:r[d],options:a}))}function Ji(r){const{metadata:a,dense:d=!0,options:f}=r,p=Ao(a,f||{});return React.createElement(MetadataTable,{dense:d},p)}var Ro=e(49429),So=e(86136),Ca=e(79784),Nn=e(76635),Co=e(19126),dr=e.n(Co),To=e(80277);function Po(r){return dr().stringify(r,{strictNullHandling:!0})}function Ta(r){return dr().parse(r,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Pa(r,a){return Ta(r)[a]}function Io(r,a,d){const f={...Ta(r),[a]:d};return Po(f)}function Lo(r,a=250){const[d,f]=(0,R.lr)(),p=d.toString(),[A,M]=(0,t.useState)(Pa(p,r));return(0,t.useEffect)(()=>{const W=Pa(p,r);M(J=>(0,Nn.isEqual)(W,J)?J:W)},[p,M,r]),(0,To.b)(()=>{const W=Io(p,r,A);p!==W&&f(W,{replace:!0})},[f,A,p,r],a),[A,M]}const xo={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/andrewthauer/backstage/blob/master/app-config.yaml"}]}]};function Ia(){const a=(0,c.useApiHolder)().get(c.configApiRef),d=a==null?void 0:a.getOptionalConfig("app.support");return d?{url:d.getString("url"),items:d.getConfigArray("items").flatMap(f=>{var p;return{title:f.getString("title"),icon:f.getOptionalString("icon"),links:((p=f.getOptionalConfigArray("links"))!=null?p:[]).flatMap(A=>({url:A.getString("url"),title:A.getString("title")}))}})}:xo}var bo=e(80079);function mn(r,a){const f=(0,c.useApp)().getSystemIcon(r);return f?t.createElement(f,{...a}):t.createElement(bo.Z,{...a})}function Qi(r){return mn("brokenImage",r)}function Xi(r){return mn("catalog",r)}function ki(r){return mn("chat",r)}function qi(r){return mn("dashboard",r)}function _i(r){return mn("docs",r)}function el(r){return mn("email",r)}function tl(r){return mn("github",r)}function nl(r){return mn("group",r)}function fr(r){return mn("help",r)}function rl(r){return mn("user",r)}function al(r){return mn("warning",r)}const Oo=(0,l.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Do=({icon:r})=>{var f;const a=(0,c.useApp)(),d=r&&(f=a.getSystemIcon(r))!=null?f:fr;return t.createElement(d,null)},Fo=({link:r})=>{var a;return t.createElement(I,{to:r.url},(a=r.title)!=null?a:r.url)},Bo=({item:r})=>{var a;return t.createElement(re.Z,null,t.createElement(So.Z,null,t.createElement(Do,{icon:r.icon})),t.createElement(le.Z,{primary:r.title,secondary:(a=r.links)==null?void 0:a.reduce((d,f,p)=>[...d,p>0&&t.createElement("br",{key:p}),t.createElement(Fo,{link:f,key:f.url})],[])}))};function Mo(r){const{title:a,children:d}=r,{items:f}=Ia(),[p,A]=(0,t.useState)(!1),[M,W]=(0,t.useState)(null),J=Oo(),V=(0,je.Z)(Re=>Re.breakpoints.down("sm")),ie=Re=>{W(Re.currentTarget),A(!0)},ue=()=>{A(!1)};return t.createElement(t.Fragment,null,t.createElement(yn.Z,{display:"flex",ml:1},V?t.createElement(L.Z,{color:"primary",size:"small",onClick:ie,"data-testid":"support-button"},t.createElement(fr,null)):t.createElement(E.Z,{"data-testid":"support-button",color:"primary",onClick:ie,startIcon:t.createElement(fr,null)},"Support")),t.createElement(Ca.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:M,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:ue},t.createElement(te.Z,{className:J.popoverList},a&&t.createElement(re.Z,{alignItems:"flex-start"},t.createElement(Oe.Z,{variant:"subtitle1"},a)),t.Children.map(d,(Re,Ce)=>t.createElement(re.Z,{alignItems:"flex-start",key:`child-${Ce}`},Re)),f&&f.map((Re,Ce)=>t.createElement(Bo,{item:Re,key:`item-${Ce}`}))),t.createElement(Ro.Z,null,t.createElement(E.Z,{color:"primary",onClick:ue},"Close"))))}var qr=e(18671),sn=e(10289);const mr=72,La=24,xa=18,zt={drawerWidthClosed:mr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:mr,iconSize:mr-La*2,iconPadding:La,selectedIndicatorWidth:3,userBadgePadding:xa,userBadgeDiameter:mr-xa*2,mobileSidebarHeight:56},_r={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:zt.defaultOpenDelayMs+200},ol="@backstage/core/sidebar-intro-dismissed",Xn=(0,t.createContext)({isOpen:!1,setOpen:()=>{}}),ba=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var hr;(function(r){const a="sidebarPinState";r.SIDEBAR_PIN_STATE=a})(hr||(hr={}));const Oa={getSidebarPinState(){let r;try{r=JSON.parse(window.localStorage.getItem(hr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!r},setSidebarPinState(r){return window.localStorage.setItem(hr.SIDEBAR_PIN_STATE,JSON.stringify(r))}},Zo=(0,l.Z)(r=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[r.breakpoints.up("sm")]:{paddingLeft:({isPinned:a})=>a?zt.drawerWidthOpen:zt.drawerWidthClosed},[r.breakpoints.down("xs")]:{paddingBottom:zt.mobileSidebarHeight}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),$n=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1}),Da=(0,t.createContext)({content:{contentRef:void 0}});function No(r){const[a,d]=(0,t.useState)(()=>Oa.getSidebarPinState()),f=(0,t.useRef)(null),p=(0,t.useMemo)(()=>({content:{contentRef:f}}),[f]);(0,t.useEffect)(()=>{Oa.setSidebarPinState(a)},[a]);const A=(0,je.Z)(J=>J.breakpoints.down("xs"),{noSsr:!0}),M=()=>d(!a),W=Zo({isPinned:a});return t.createElement($n.Provider,{value:{isPinned:a,toggleSidebarPinState:M,isMobile:A}},t.createElement(Da.Provider,{value:p},t.createElement("div",{className:W.root},r.children)))}function ea(){const{content:r}=(0,t.useContext)(Da);return{focusContent:(0,t.useCallback)(()=>{var d,f;(f=(d=r==null?void 0:r.contentRef)==null?void 0:d.current)==null||f.focus()},[r]),contentRef:r==null?void 0:r.contentRef}}var $o=e(50023),Uo=e(4190),wo=e(87685),zo=e(44882),Wo=e(57998);const Ho=(0,l.Z)(r=>({root:{flexGrow:0,margin:r.spacing(0,2),color:r.palette.navigation.color},selected:{color:`${r.palette.navigation.selectedColor}!important`,borderTop:`solid ${zt.selectedIndicatorWidth}px ${r.palette.navigation.indicator}`,marginTop:"-1px"},label:{display:"none"}})),Vo=r=>{const{to:a,label:d,icon:f,value:p}=r,A=Ho(),M=(0,sn.TH)(),{selectedMenuItemIndex:W,setSelectedMenuItemIndex:J}=(0,t.useContext)(Ma),V=(ue,Re)=>{J(Re===W?-1:Re)},ie=p===W&&W>=0||p!==W&&!(W>=0)&&a===M.pathname;return t.createElement(Wo.Z,{label:d,icon:f,component:I,to:a||M.pathname,onChange:V,value:p,selected:ie,classes:A})},Fa=r=>{const{children:a,to:d,label:f,icon:p,value:A}=r,{isMobile:M}=(0,t.useContext)($n);return M?t.createElement(Vo,{to:d,label:f,icon:p,value:A}):t.createElement(t.Fragment,null,a)},Ba=(0,l.Z)(r=>({root:{position:"fixed",backgroundColor:r.palette.navigation.background,color:r.palette.navigation.color,bottom:0,left:0,right:0,zIndex:r.zIndex.snackbar,borderTop:"1px solid #383838"},overlay:{background:r.palette.navigation.background,width:"100%",bottom:`${zt.mobileSidebarHeight}px`,height:`calc(100% - ${zt.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"},overlayHeader:{display:"flex",color:r.palette.bursts.fontColor,alignItems:"center",justifyContent:"space-between",padding:r.spacing(2,3)},overlayHeaderClose:{color:r.palette.bursts.fontColor},marginMobileSidebar:{marginBottom:`${zt.mobileSidebarHeight}px`}})),jo=r=>(0,Nn.orderBy)(r,({props:{priority:a}})=>Number.isInteger(a)?a:-1,"desc"),Go=t.createElement(Fa).type,Ko=({children:r,label:a="Menu",open:d,onClose:f})=>{const p=Ba();return t.createElement(Uo.ZP,{anchor:"bottom",open:d,onClose:f,ModalProps:{BackdropProps:{classes:{root:p.marginMobileSidebar}}},classes:{root:p.marginMobileSidebar,paperAnchorBottom:p.overlay}},t.createElement(yn.Z,{className:p.overlayHeader},t.createElement(Oe.Z,{variant:"h3"},a),t.createElement(L.Z,{onClick:f,classes:{root:p.overlayHeaderClose}},t.createElement(wo.Z,null))),t.createElement(yn.Z,null,r))},Ma=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),Yo=r=>{const{children:a}=r,d=Ba(),f=(0,sn.TH)(),[p,A]=(0,t.useState)(-1);(0,t.useEffect)(()=>{A(-1)},[f.pathname]);let M=(0,c.useElementFilter)(a,J=>J.getElements().filter(V=>V.type===Go));if(a)M.length?M=jo(M):M.push(t.createElement(Fa,{key:"default_menu",icon:t.createElement(zo.Z,null)},a));else return null;const W=p>=0&&!M[p].props.to;return t.createElement(Xn.Provider,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(Ma.Provider,{value:{selectedMenuItemIndex:p,setSelectedMenuItemIndex:A}},t.createElement(Ko,{label:M[p]&&M[p].props.label,open:W,onClose:()=>A(-1)},M[p]&&M[p].props.children),t.createElement($o.Z,{className:d.root,"data-testid":"mobile-sidebar-root"},M)))},Za=(0,l.Z)(r=>({drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:r.zIndex.appBar,background:r.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:zt.drawerWidthClosed,transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}},drawerOpen:{width:zt.drawerWidthOpen,transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shorter})},visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var tn;(function(r){r[r.Closed=0]="Closed";const d=0+1;r[r.Idle=d]="Idle";const f=d+1;r[r.Open=f]="Open"})(tn||(tn={}));const Jo=r=>{const{openDelayMs:a=zt.defaultOpenDelayMs,closeDelayMs:d=zt.defaultCloseDelayMs,disableExpandOnHover:f,children:p}=r,A=Za(),M=(0,je.Z)(Ot=>Ot.breakpoints.down("md"),{noSsr:!0}),[W,J]=(0,t.useState)(tn.Closed),V=(0,t.useRef)(),{isPinned:ie,toggleSidebarPinState:ue}=(0,t.useContext)($n),Re=()=>{ie||f||(V.current&&(clearTimeout(V.current),V.current=void 0),W!==tn.Open&&!M&&(V.current=window.setTimeout(()=>{V.current=void 0,J(tn.Open)},a),J(tn.Idle)))},Ce=()=>{ie||f||(V.current&&(clearTimeout(V.current),V.current=void 0),W===tn.Idle?J(tn.Closed):W===tn.Open&&(V.current=window.setTimeout(()=>{V.current=void 0,J(tn.Closed)},d)))},Ie=W===tn.Open&&!M||ie,ct=Ot=>{Ot?(J(tn.Open),ue()):(J(tn.Closed),ue())};return t.createElement("div",{style:{}},t.createElement(Xo,null),t.createElement(Xn.Provider,{value:{isOpen:Ie,setOpen:ct}},t.createElement("div",{className:A.root,"data-testid":"sidebar-root",onMouseEnter:f?()=>{}:Re,onFocus:f?()=>{}:Re,onMouseLeave:f?()=>{}:Ce,onBlur:f?()=>{}:Ce},t.createElement("div",{className:se()(A.drawer,{[A.drawerOpen]:Ie})},p))))},Qo=r=>{const{children:a,openDelayMs:d,closeDelayMs:f,disableExpandOnHover:p}=r,{isMobile:A}=(0,t.useContext)($n);return A?t.createElement(Yo,null,a):t.createElement(Jo,{openDelayMs:d,closeDelayMs:f,disableExpandOnHover:p},a)};function Xo(){const{focusContent:r,contentRef:a}=ea(),d=Za();return(a==null?void 0:a.current)?t.createElement(E.Z,{onClick:r,variant:"contained",className:se()(d.visuallyHidden)},"Skip to content"):null}function Na(r,a){const d=new URLSearchParams(a.search).toString(),f=dr().parse(d),p=new URLSearchParams(r.search).toString(),A=dr().parse(p);return(0,Nn.isEqual)(a.pathname,r.pathname)&&(0,Nn.isMatch)(A,f)}const ko=(0,l.Z)(r=>({item:{height:48,width:"100%","&:hover":{background:"#6f6f6f",color:r.palette.navigation.selectedColor},display:"flex",alignItems:"center",color:r.palette.navigation.color,padding:20,cursor:"pointer",position:"relative",background:"none",border:"none"},itemContainer:{width:"100%"},selected:{background:"#6f6f6f",color:"#FFF"},label:{margin:14,marginLeft:7,fontSize:14},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0"},textContent:{color:r.palette.navigation.color,display:"flex",justifyContent:"center",[r.breakpoints.down("xs")]:{display:"block",paddingLeft:r.spacing(4)},fontSize:"14px"}})),sl=r=>{const{title:a,to:d,icon:f,dropdownItems:p}=r,A=ko(),{setIsHoveredOn:M}=useContext(SidebarItemWithSubmenuContext),W=()=>{M(!1)},J=useResolvedPath(d),V=useLocation();let ie=isLocationMatch(V,J);const[ue,Re]=useState(!1),Ce=()=>{Re(!ue)};return p!==void 0?(p.some(Ie=>{const ct=resolvePath(Ie.to);return ie=isLocationMatch(V,ct),ie}),React.createElement("div",{className:A.itemContainer},React.createElement("button",{onClick:Ce,onTouchStart:Ie=>Ie.stopPropagation(),className:classnames(A.item,ie?A.selected:void 0)},React.createElement(f,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:A.label},a),ue?React.createElement(ArrowDropUpIcon,{className:A.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:A.dropdownArrow})),p&&ue&&React.createElement("div",{className:A.dropdown},p.map((Ie,ct)=>React.createElement(Link,{to:Ie.to,underline:"none",className:A.dropdownItem,onClick:W,onTouchStart:Ot=>Ot.stopPropagation(),key:ct},React.createElement(Typography,{className:A.textContent},Ie.title)))))):React.createElement("div",{className:A.itemContainer},React.createElement(Link,{to:d,underline:"none",className:classnames(A.item,ie?A.selected:void 0),onClick:W,onTouchStart:Ie=>Ie.stopPropagation()},React.createElement(f,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:A.label},a)))},qo=r=>(0,l.Z)(a=>{var d,f;return{root:{zIndex:1e3,position:"relative",overflow:"visible",width:a.spacing(7)+1},drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[a.breakpoints.up("sm")]:{marginLeft:r.left,transition:a.transitions.create("margin-left",{easing:a.transitions.easing.sharp,duration:a.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(f=(d=a.palette.navigation.submenu)==null?void 0:d.background)!=null?f:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:_r.drawerWidthClosed,transitionDelay:`${_r.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}},drawerOpen:{width:_r.drawerWidthOpen,[a.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:a.spacing(3),left:0,top:0}},title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[a.breakpoints.down("xs")]:{display:"none"}}}}),_o=r=>{const{isOpen:a}=(0,t.useContext)(Xn),d=a?zt.drawerWidthOpen:zt.drawerWidthClosed,f=qo({left:d})(),{isHoveredOn:p}=(0,t.useContext)(ba),[A,M]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{M(p)},[p]),t.createElement("div",{className:se()(f.drawer,{[f.drawerOpen]:A})},t.createElement(Oe.Z,{variant:"h5",className:f.title},r.title),r.children)};var gr=e(76600),es=e(26739),ts=e(98989),ns=e(59797),rs=e(83543);const as=(0,l.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),il=()=>{const r=as();return React.createElement("div",{className:r.iconContainer},React.createElement("div",{className:r.arrow1},React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})))};var ll=null;const os=(0,l.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),cl=()=>{const r=os();return React.createElement("div",{className:r.iconContainer},React.createElement("div",{className:r.arrow1},React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})))};var ul=null;const pr=(0,l.Z)(r=>{var A,M,W,J;const{selectedIndicatorWidth:a,drawerWidthClosed:d,drawerWidthOpen:f,iconContainerWidth:p}=zt;return{root:{color:r.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:d,justifyContent:"center"},open:{[r.breakpoints.up("sm")]:{width:f}},highlightable:{"&:hover":{background:(M=(A=r.palette.navigation.navItem)==null?void 0:A.hoverBackground)!=null?M:"#404040"}},highlighted:{background:(J=(W=r.palette.navigation.navItem)==null?void 0:W.hoverBackground)!=null?J:"#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:p,marginRight:-r.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:r.typography.fontSize},searchFieldHTMLInput:{padding:r.spacing(2,0,2)},searchContainer:{width:f-p},secondaryAction:{width:r.spacing(6),textAlign:"center",marginRight:r.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:r.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${a}px ${r.palette.navigation.indicator}`,color:r.palette.navigation.selectedColor},"&$closed":{width:d},"& $closedItemIcon":{paddingRight:a},"& $iconContainer":{marginLeft:-a}}}},{name:"BackstageSidebarItem"}),ss=(r,a)=>(0,c.useElementFilter)(r.props.children,d=>{let f=!1;return d.getElements().forEach(({props:{to:p,dropdownItems:A}})=>{if(!f){if(A==null?void 0:A.length){A.forEach(({to:M})=>f=f||Na(a,(0,sn.i3)(M)));return}p&&(f=Na(a,(0,sn.i3)(p)))}}),f},[a.pathname]);function $a(r){return r.to===void 0}const is=t.createElement(_o).type,ls=t.forwardRef(function({to:a,end:d,style:f,className:p,activeStyle:A,caseSensitive:M,activeClassName:W="active","aria-current":J="page",...V},ie){let{pathname:ue}=(0,sn.TH)(),{pathname:Re}=(0,sn.WU)(a);M||(ue=ue.toLocaleLowerCase("en-US"),Re=Re.toLocaleLowerCase("en-US"));let Ce=ue===Re;!Ce&&!d&&(Ce=ue.startsWith(`${Re}/`));const Ie=Ce?J:void 0;return t.createElement(R.rU,{...V,to:a,ref:ie,"aria-current":Ie,style:{...f,...Ce?A:void 0},className:se()([p,Ce?W:void 0])})}),Ua=(0,t.forwardRef)((r,a)=>{const{icon:d,text:f,hasNotifications:p=!1,disableHighlight:A=!1,onClick:M,children:W,className:J,...V}=r,ie=pr(),{isOpen:ue}=(0,t.useContext)(Xn),Re=t.createElement(es.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:se()({[ie.closedItemIcon]:!ue})},t.createElement(d,{fontSize:"small"})),Ce=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:ie.iconContainer},Re),f&&t.createElement(Oe.Z,{variant:"subtitle2",className:ie.label},f),t.createElement("div",{className:ie.secondaryAction},W)),Ie=ue?Ce:Re,ct={onClick:M,className:se()(J,ie.root,ue?ie.open:ie.closed,$a(r)&&ie.buttonItem,{[ie.highlightable]:!A})};return $a(r)?t.createElement("button",{"aria-label":f,...ct,ref:a},Ie):t.createElement(ls,{...ct,activeClassName:ie.selected,to:r.to?r.to:"",ref:a,"aria-label":f||r.to,...V},Ie)}),cs=({children:r,...a})=>{const d=pr(),[f,p]=(0,t.useState)(!1),A=(0,sn.TH)(),M=ss(r,A),W=(0,je.Z)(ue=>ue.breakpoints.down("sm")),J=()=>{p(!0)},V=()=>{p(!1)},ie=()=>W?f?t.createElement(ns.Z,{fontSize:"small",className:d.submenuArrow}):t.createElement(rs.Z,{fontSize:"small",className:d.submenuArrow}):!f&&t.createElement(ts.Z,{fontSize:"small",className:d.submenuArrow});return t.createElement(ba.Provider,{value:{isHoveredOn:f,setIsHoveredOn:p}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:V,onTouchStart:f?V:J,onMouseEnter:J,className:se()(f&&d.highlighted)},t.createElement(Ua,{className:M?d.selected:"",...a},ie()),f&&r))},wa=(0,t.forwardRef)((r,a)=>{const[d]=(0,c.useElementFilter)(r.children,f=>f.getElements().filter(p=>p.type===is));return d?t.createElement(cs,{...r},d):t.createElement(Ua,{...r,ref:a})});function dl(r){const[a,d]=useState(""),f=pr(),p=r.icon?r.icon:SearchIcon,A=()=>{r.onSearch(a),d("")},M=ie=>{ie.key==="Enter"&&(ie.preventDefault(),A())},W=ie=>{d(ie.target.value)},J=ie=>{ie.preventDefault(),ie.stopPropagation()},V=ie=>{A(),ie.preventDefault()};return React.createElement("div",{className:f.searchRoot},React.createElement(wa,{icon:p,to:r.to,onClick:V,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:a,onClick:J,onChange:W,onKeyDown:M,className:f.searchContainer,InputProps:{disableUnderline:!0,className:f.searchField},inputProps:{className:f.searchFieldHTMLInput}})))}const fl=(0,gr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),ml=(0,gr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),us=(0,gr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),ds=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.hint,borderRadius:"5px"}}),hl=(0,gr.Z)("div")(({theme:r})=>{const a=ds(r);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":a,"&:hover":a}}),gl=()=>{const r=pr(),{isOpen:a,setOpen:d}=useContext(SidebarContext);if(useMediaQuery(A=>A.breakpoints.down("md"),{noSsr:!0}))return null;const p=()=>{d(!a)};return React.createElement("button",{onClick:p,className:r.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:r.arrows},a?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},fs=(0,l.Z)(r=>({introCard:{color:"#b5b5b5",fontSize:12,width:zt.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:zt.iconPadding,paddingRight:zt.iconPadding},introDismiss:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:12},introDismissLink:{color:"#dddddd",display:"flex",alignItems:"center",marginBottom:4,"&:hover":{color:r.palette.linkHover,transition:r.transitions.create("color",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest})}},introDismissText:{fontSize:"0.7rem",fontWeight:"bold",textTransform:"uppercase",letterSpacing:1},introDismissIcon:{width:18,height:18,marginRight:12}}),{name:"BackstageSidebarIntro"});function ms(r){const a=fs(),{text:d,onClose:f}=r,p=()=>f();return React.createElement("div",{className:a.introCard},React.createElement(Typography,{variant:"subtitle2"},d),React.createElement("div",{className:a.introDismiss},React.createElement(Link,{component:"button",onClick:p,underline:"none",className:a.introDismissLink},React.createElement(CloseIcon,{className:a.introDismissIcon}),React.createElement(Typography,{component:"span",className:a.introDismissText},"Dismiss"))))}const za=r=>{const{text:a,onDismiss:d}=r,[f,p]=useState(!1),A=()=>{p(!0)};return React.createElement(Collapse,{in:!f,onExited:d},React.createElement(ms,{text:a,onClose:A}))},hs=null,gs="And your recently viewed plugins will pop up here!";function pl(r){const{isOpen:a}=useContext(SidebarContext),d={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[f,p]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:A,recentlyViewedItemsDismissed:M}=f!=null?f:{},W=()=>{p(V=>({...d,...V,starredItemsDismissed:!0}))},J=()=>{p(V=>({...d,...V,recentlyViewedItemsDismissed:!0}))};return a?React.createElement(React.Fragment,null,!A&&React.createElement(React.Fragment,null,React.createElement(za,{text:hs,onDismiss:W}),React.createElement(SidebarDivider,null)),!M&&React.createElement(za,{text:gs,onDismiss:J})):null}const ps=(0,l.Z)(r=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:r.spacing(3),paddingBottom:r.spacing(3),paddingLeft:r.spacing(2),paddingRight:r.spacing(2),[r.breakpoints.up("sm")]:{paddingLeft:r.spacing(3),paddingRight:r.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function Wa(r){const{className:a,stretch:d,noPadding:f,children:p,...A}=r,{contentRef:M}=ea(),W=ps();return t.createElement("article",{ref:M,tabIndex:-1,...A,className:se()(W.root,a,{[W.stretch]:d,[W.noPadding]:f})},p)}var ys=e(6487),Es=e(99152);const vs=(0,l.Z)(r=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:r.palette.background.paper,paddingLeft:r.spacing(3)},defaultTab:{padding:r.spacing(3,3),...r.typography.caption,textTransform:"uppercase",fontWeight:"bold",color:r.palette.text.secondary},selected:{color:r.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:r.palette.background.default,color:r.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function Ha(r){const{tabs:a,onChange:d,selectedIndex:f}=r,[p,A]=(0,t.useState)(f!=null?f:0),M=vs(),W=(J,V)=>{f===void 0&&A(V),d&&d(V)};return(0,t.useEffect)(()=>{f!==void 0&&A(f)},[f]),t.createElement("div",{className:M.tabsWrapper},t.createElement(Es.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:W,value:p},a.map((J,V)=>t.createElement(ys.Z,{...J.tabProps,"data-testid":`header-tab-${V}`,label:J.label,key:J.id,value:V,className:M.defaultTab,classes:{selected:M.selected,root:M.tabRoot}}))))}function As(r){var W,J,V;const a=(0,sn.UO)(),f=r.map(({path:ie,children:ue})=>({caseSensitive:!1,path:`${ie}/*`,element:ue})).sort((ie,ue)=>ue.path.replace(/\/\*$/,"").localeCompare(ie.path.replace(/\/\*$/,""))),p=(W=(0,sn.V$)(f))!=null?W:r[0].children,[A]=(J=(0,sn.fp)(f,`/${a["*"]}`))!=null?J:[],M=A?r.findIndex(ie=>`${ie.path}/*`===A.route.path):0;return{index:M===-1?0:M,element:p,route:(V=r[M])!=null?V:r[0]}}function Va(r){const{routes:a}=r,d=(0,sn.s0)(),{index:f,route:p,element:A}=As(a),M=(0,t.useMemo)(()=>a.map(J=>({id:J.path,label:J.title,tabProps:J.tabProps})),[a]),W=J=>d(a[J].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(Ha,{tabs:M,selectedIndex:f,onChange:W}),t.createElement(Wa,null,t.createElement(qr.q,{title:p.title}),A))}const ta=()=>null;(0,c.attachComponentData)(ta,"core.gatherMountPoints",!0);function ja(r){const a=t.createElement(ta,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(r).flatMap(d=>{if(!(0,t.isValidElement)(d))return[];if(d.type===t.Fragment)return ja(d.props.children);if(d.type!==a)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:f,title:p,children:A,tabProps:M}=d.props;return[{path:f,title:p,children:A,tabProps:M}]})}function Rs(r){const a=ja(r.children);return t.createElement(Va,{routes:a})}Rs.Route=ta;const Ss=(0,l.Z)(r=>({value:{marginBottom:"6px"},subvalue:{color:r.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function Cs(r){const{value:a,subvalue:d}=r,f=Ss();return t.createElement(t.Fragment,null,t.createElement("div",{className:f.value},a),t.createElement("div",{className:f.subvalue},d))}var Ts=e(21070),Ps=e(90324),Is=e(98281),Ls=e(48049),Ga=e(51209),Ka=e(33375),xs=e(44233),bs=e(27604),na=e(36444),Os=e(37971),Ds=e(59709),Fs=e(17373),Bs=e(3702),Ms=e(93111),yr=e(67222);const Zs=(0,l.Z)(r=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:r.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:"60px",justifyContent:"space-between",borderBottom:`1px solid ${r.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:r.spacing(2)}}}),{name:"BackstageTableFilters"}),Ns=r=>{var J;const a=Zs(),{onChangeFilters:d}=r,[f,p]=(0,t.useState)({...r.selectedFilters}),[A,M]=(0,t.useState)(!1),W=()=>{p({}),M(V=>!V)};return(0,t.useEffect)(()=>{d(f)},[f,d]),t.createElement("div",{className:a.root},t.createElement("div",{className:a.header},t.createElement("div",{className:a.value},"Filters"),t.createElement(E.Z,{color:"primary",onClick:W},"Clear all")),t.createElement("div",{className:a.filters},((J=r.filters)==null?void 0:J.length)&&r.filters.map(V=>t.createElement(Le,{triggerReset:A,key:V.element.label,...V.element,selected:f[V.element.label],onChange:ie=>p({...f,[V.element.label]:ie})}))))},$s={Add:(0,t.forwardRef)((r,a)=>t.createElement(Ts.Z,{...r,ref:a})),Check:(0,t.forwardRef)((r,a)=>t.createElement(Is.Z,{...r,ref:a})),Clear:(0,t.forwardRef)((r,a)=>t.createElement(Ka.Z,{...r,ref:a})),Delete:(0,t.forwardRef)((r,a)=>t.createElement(xs.Z,{...r,ref:a})),DetailPanel:(0,t.forwardRef)((r,a)=>t.createElement(Ga.Z,{...r,ref:a})),Edit:(0,t.forwardRef)((r,a)=>t.createElement(bs.Z,{...r,ref:a})),Export:(0,t.forwardRef)((r,a)=>t.createElement(Bs.Z,{...r,ref:a})),Filter:(0,t.forwardRef)((r,a)=>t.createElement(na.Z,{...r,ref:a})),FirstPage:(0,t.forwardRef)((r,a)=>t.createElement(Os.Z,{...r,ref:a})),LastPage:(0,t.forwardRef)((r,a)=>t.createElement(Ds.Z,{...r,ref:a})),NextPage:(0,t.forwardRef)((r,a)=>t.createElement(Ga.Z,{...r,ref:a})),PreviousPage:(0,t.forwardRef)((r,a)=>t.createElement(Ls.Z,{...r,ref:a})),ResetSearch:(0,t.forwardRef)((r,a)=>t.createElement(Ka.Z,{...r,ref:a})),Search:(0,t.forwardRef)((r,a)=>t.createElement(na.Z,{...r,ref:a})),SortArrow:(0,t.forwardRef)((r,a)=>t.createElement(Ps.Z,{...r,ref:a})),ThirdStateCheck:(0,t.forwardRef)((r,a)=>t.createElement(Fs.Z,{...r,ref:a})),ViewColumn:(0,t.forwardRef)((r,a)=>t.createElement(Ms.Z,{...r,ref:a}))};function Ya(r,a){const d=a.split(".");let f=r[d[0]];for(let p=1;p<d.length;++p){if(f===void 0)return f;const A=d[p];f=f[A]}return f}const Us=(0,Xt.Z)(r=>({header:{padding:r.spacing(1,2,1,2.5),borderTop:`1px solid ${r.palette.grey.A100}`,borderBottom:`1px solid ${r.palette.grey.A100}`,color:r.palette.textSubtle,fontWeight:r.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(yr.W$),Ja=(0,Xt.Z)(r=>({root:{padding:r.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:r.spacing(2)}}),{name:"BackstageTableToolbar"})(yr.UW),ws=(0,l.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),zs=(0,l.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Ws(r,a){return r.map(d=>{const f={};let p=d.cellStyle||{};if(d.highlight)if(f.color=a.palette.textContrast,typeof p=="object")p.fontWeight=a.typography.fontWeightBold;else{const A=p;p=(M,W,J)=>({...A(M,W,J),fontWeight:a.typography.fontWeightBold})}return{...d,headerStyle:f,cellStyle:p}})}function Hs(r,a){return(0,Nn.transform)(r,(d,f,p)=>{(0,Nn.isEqual)(f,a[p])||(d[p]=f)})}const Qa={search:"",filtersOpen:!1,filters:{}};function Vs(r){const{toolbarRef:a,setSearch:d,hasFilters:f,selectedFiltersLength:p,toggleFilters:A}=r,M=ws(),W=(0,t.useCallback)(J=>{r.onSearchChanged(J),d(J)},[r,d]);return f?t.createElement("div",{className:M.root},t.createElement("div",{className:M.root},t.createElement(L.Z,{onClick:A,"aria-label":"filter list"},t.createElement(na.Z,null)),t.createElement(Oe.Z,{className:M.title},"Filters (",p,")")),t.createElement(Ja,{...r,ref:a,onSearchChanged:W})):t.createElement(Ja,{...r,ref:a,onSearchChanged:W})}function js(r){const{data:a,columns:d,options:f,title:p,subtitle:A,filters:M,initialState:W,emptyContent:J,onStateChange:V,...ie}=r,ue=zs(),Re=(0,C.Z)(),Ce={...Qa,...W},[Ie,ct]=(0,t.useState)(Ce.filtersOpen),Ot=(0,t.useCallback)(()=>ct(Jt=>!Jt),[ct]),[Gt,Wt]=(0,t.useState)(0),[nt,bt]=(0,t.useState)(a),[Dt,Kt]=(0,t.useState)(Ce.filters),Tn=Ws(d,Re),[ln,qn]=(0,t.useState)(Ce.search);(0,t.useEffect)(()=>{if(V){const Jt=Hs({search:ln,filtersOpen:Ie,filters:Dt},Qa);V(Jt)}},[ln,Ie,Dt,V]);const Lt={headerStyle:{textTransform:"uppercase"}},Pn=(0,t.useCallback)(Jt=>{var nn;return(nn=d.find(cn=>cn.title===Jt))==null?void 0:nn.field},[d]);(0,t.useEffect)(()=>{if(typeof a=="function")return;if(!Dt){bt(a);return}const Jt=Object.values(Dt);if(a&&Jt.flat().length){const nn=a.filter(cn=>!!Object.entries(Dt).filter(([,On])=>!!On.length).every(([On,Vt])=>{const jt=Ya(cn,Pn(On));return Array.isArray(jt)&&Array.isArray(Vt)?jt.some(Un=>Vt.includes(Un)):Array.isArray(jt)?jt.includes(Vt):Array.isArray(Vt)?Vt.includes(jt):jt===Vt}));bt(nn)}else bt(a);Wt(Jt.flat().length)},[a,Dt,Pn]);const ia=(Jt,nn)=>{const cn=Vt=>{const jt=new Set,Un=Dn=>{Dn!=null&&jt.add(Dn)};return nn&&nn.forEach(Dn=>{const wn=Ya(Dn,Pn(Vt));Array.isArray(wn)?wn.forEach(Un):Un(wn)}),jt},On=Vt=>({placeholder:"All results",label:Vt.column,multiple:Vt.type==="multiple-select",items:[...cn(Vt.column)].sort().map(jt=>({label:jt,value:jt}))});return Jt.map(Vt=>({type:Vt.type,element:On(Vt)}))},bn=!!(M==null?void 0:M.length),la=(0,t.useCallback)(Jt=>t.createElement(Vs,{setSearch:qn,hasFilters:bn,selectedFiltersLength:Gt,toggleFilters:Ot,...Jt}),[Ot,bn,Gt,qn]),vr=typeof a!="function"&&a.length===0,Ar=d.length,ca=(0,t.useCallback)(Jt=>J&&vr?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:Ar},J))):t.createElement(yr.os,{...Jt}),[vr,J,Ar]);return t.createElement("div",{className:ue.root},Ie&&a&&typeof a!="function"&&(M==null?void 0:M.length)&&t.createElement(Ns,{filters:ia(M,a),selectedFilters:Dt,onChangeFilters:Kt}),t.createElement(yr.ZP,{components:{Header:Us,Toolbar:la,Body:ca},options:{...Lt,...f},columns:Tn,icons:$s,title:t.createElement(t.Fragment,null,t.createElement(Oe.Z,{variant:"h5",component:"h3"},p),A&&t.createElement(Oe.Z,{color:"textSecondary",variant:"body1"},A)),data:typeof a=="function"?a:nt,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...ie}))}const yl=r=>{const{children:a,value:d,index:f,...p}=r;return React.createElement("div",{role:"tabpanel",hidden:d!==f,"aria-labelledby":`scrollable-auto-tab-${f}`,...p},d===f&&React.createElement(Box,{p:3},a))},Gs=(0,l.Z)(()=>({root:{color:"#6E6E6E",overflow:"visible",fontSize:"1.5rem",textAlign:"center",borderRadius:"50%",backgroundColor:"#E6E6E6",marginLeft:r=>r.isNext?"auto":"0",marginRight:r=>r.isNext?"0":"10px","&:hover":{backgroundColor:"#E6E6E6",opacity:"1"}}}),{name:"BackstageTabIcon"}),El=r=>{const a=Gs(r),{ariaLabel:d,onClick:f}=r;return React.createElement(IconButton,{onClick:f,className:a.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":d},r.children)},Ks=(r,a)=>a?r?"20px":"0":"40px",Ys=(0,l.Z)(r=>({root:{textTransform:"none",height:"64px",fontWeight:r.typography.fontWeightBold,fontSize:r.typography.pxToRem(13),color:r.palette.textSubtle,marginLeft:a=>Ks(a.isFirstNav,a.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:r.palette.textSubtle}}})),vl=r=>{const a=Ys(r),{isFirstNav:d,isFirstIndex:f,...p}=r;return React.createElement(Tab,{className:a.root,disableRipple:!0,...p})},Js=(0,l.Z)(r=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:r.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Al=r=>{const a=Js(r);return React.createElement(Tabs,{classes:a,...r,TabIndicatorProps:{children:React.createElement("span",null)}})},Qs=(0,l.Z)(r=>({root:{flexGrow:1,width:"100%"},styledTabs:{backgroundColor:r.palette.background.paper},appbar:{boxShadow:"none",backgroundColor:r.palette.background.paper,paddingLeft:"10px",paddingRight:"10px"}}),{name:"BackstageTabs"});function Rl(r){const{tabs:a}=r,d=Qs(),[f,p]=useState([0,0]),[A,M]=useState(0),[W,J]=useState(0),[V,ie]=useState([[]]),ue=useRef(),{width:Re}=useWindowSize(),Ce=(Wt,nt)=>{p([A,nt])},Ie=()=>{M(A-1)},ct=()=>{M(A+1)},Ot=()=>A+1<V.length;useEffect(()=>{const nt=A===0?1:2,bt=ue.current.offsetWidth-20-nt*30,Dt=f[0]*W+f[1],Kt=Math.floor(bt/170);J(Kt),ie(chunkArray(a,Kt)),p([Math.floor(Dt/Kt),Dt%Kt])},[Re,a]);const Gt=A===f[0]?f[1]:!1;return React.createElement("div",{className:d.root},React.createElement(AppBar,{ref:ue,className:d.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:Gt,onChange:Ce,selectionFollowsFocus:!0},A!==0&&React.createElement(StyledIcon,{onClick:Ie,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),V[A].map((Wt,nt)=>React.createElement(StyledTab,{value:nt,isFirstIndex:nt===0,isFirstNav:A===0,key:nt,icon:Wt.icon||void 0,label:Wt.label||void 0})),Ot()&&React.createElement(StyledIcon,{isNext:!0,onClick:ct,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Gt!==!1?V[A].map((Wt,nt)=>React.createElement(TabPanel,{key:nt,value:nt,index:Gt},Wt.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:f[1],index:f[1]},V[f[0]][f[1]].content))}var Sl=e(44311);function Xs(r,a){const d=r[r.length-1];if(!!d)return d>=.9?a.palette.status.ok:d>=.5?a.palette.status.warning:a.palette.status.error}function Cl(r){var d;const a=useTheme();return r.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...r},r.title&&React.createElement("title",null,r.title),React.createElement(SparklinesLine,{color:(d=r.color)!=null?d:Xs(r.data,a)})):null}const ks=r=>(0,l.Z)(a=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:a.spacing(2),textAlign:r.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"}),_s=({title:r="Unknown page",className:a})=>t.createElement(Oe.Z,{variant:"h4",component:"h2",className:a,"data-testid":"header-title"},r);function ei(r){const{description:a,title:d,titleComponent:f=void 0,children:p,textAlign:A="left"}=r,M=ks({textAlign:A})(),W=f||t.createElement(_s,{title:d,className:M.title});return t.createElement(t.Fragment,null,t.createElement(qr.q,{title:d}),t.createElement("div",{className:M.container},t.createElement("div",{className:M.leftItemsBox},W,a&&t.createElement(Oe.Z,{className:M.description,variant:"body2"},a)),t.createElement("div",{className:M.rightItemsBox},p)))}var ti=e(29788);const ni=(0,l.Z)(r=>({micDrop:{maxWidth:"60%",position:"absolute",bottom:r.spacing(2),right:r.spacing(2),[r.breakpoints.down("xs")]:{maxWidth:"96%",position:"relative",bottom:"unset",right:"unset",margin:`${r.spacing(10)}px auto ${r.spacing(4)}px`}}}),{name:"BackstageErrorPageMicDrop"}),ri=()=>{const r=ni();return t.createElement("img",{src:ti,className:r.micDrop,alt:"Girl dropping mic from her hands"})},ai=(0,l.Z)(r=>({container:{padding:r.spacing(8),[r.breakpoints.down("xs")]:{padding:r.spacing(2)}},title:{paddingBottom:r.spacing(5),[r.breakpoints.down("xs")]:{paddingBottom:r.spacing(4),fontSize:32}},subtitle:{color:r.palette.textSubtle}}),{name:"BackstageErrorPage"});function oi(r){const{status:a,statusMessage:d,additionalInfo:f,supportUrl:p}=r,A=ai(),M=(0,sn.s0)(),W=Ia();return t.createElement(Te.Z,{container:!0,spacing:0,className:A.container},t.createElement(ri,null),t.createElement(Te.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(Oe.Z,{"data-testid":"error",variant:"body1",className:A.subtitle},"ERROR ",a,": ",d),t.createElement(Oe.Z,{variant:"body1",className:A.subtitle},f),t.createElement(Oe.Z,{variant:"h2",className:A.title},"Looks like someone dropped the mic!"),t.createElement(Oe.Z,{variant:"h6"},t.createElement(I,{to:"#","data-testid":"go-back-link",onClick:()=>M(-1)},"Go back"),"... or please"," ",t.createElement(I,{to:p||W.url},"contact support")," if you think this is a bug.")))}var si=e(16173);const ii=(0,Xt.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(Oe.Z),ra=(0,Xt.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(yn.Z);function li(r){const{children:a,...d}=r,[f,p]=t.useState(null),A=t.Children.toArray(a),[M,W,...J]=A,V=J.length?J.pop():A[A.length-1],ie=A.length>3,ue=Ie=>{p(Ie.currentTarget)},Re=()=>{p(null)},Ce=Boolean(f);return t.createElement(t.Fragment,null,t.createElement(si.Z,{"aria-label":"breadcrumb",...d},A.length>1&&t.createElement(ra,{clone:!0},M),A.length>2&&t.createElement(ra,{clone:!0},W),ie&&t.createElement(ii,{onClick:ue},"..."),t.createElement(yn.Z,{style:{fontStyle:"italic"}},V)),t.createElement(Ca.ZP,{open:Ce,anchorEl:f,onClose:Re,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(te.Z,null,J.map((Ie,ct)=>t.createElement(re.Z,{key:ct,button:!0},t.createElement(ra,{clone:!0},Ie))))))}const ci=(0,l.Z)(r=>({header:{gridArea:"pageHeader",padding:r.spacing(3),width:"100%",boxShadow:r.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:r.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[r.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto"},title:{color:r.palette.bursts.fontColor,wordBreak:"break-all",fontSize:r.typography.h3.fontSize,marginBottom:0},subtitle:{color:r.palette.bursts.fontColor,opacity:.8,display:"inline-block",marginTop:r.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:r.spacing(1),color:r.palette.bursts.fontColor},breadcrumb:{color:r.palette.bursts.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-r.spacing(.3),marginBottom:r.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-r.spacing(.3),marginBottom:r.spacing(.3)}}),{name:"BackstageHeader"}),ui=({type:r,typeLink:a,classes:d,pageTitle:f})=>r?a?t.createElement(li,{className:d.breadcrumb},t.createElement(I,{to:a},r),t.createElement(Oe.Z,null,f)):t.createElement(Oe.Z,{className:d.type},r):null,di=({pageTitle:r,classes:a,tooltip:d})=>{const f=t.createElement(Oe.Z,{className:a.title,variant:"h1"},r);return d?t.createElement(B.ZP,{title:d,placement:"top-start"},f):f},fi=({classes:r,subtitle:a})=>a?typeof a!="string"?t.createElement(t.Fragment,null,a):t.createElement(Oe.Z,{className:r.subtitle,variant:"subtitle2",component:"span"},a):null;function Xa(r){const{children:a,pageTitleOverride:d,style:f,subtitle:p,title:A,tooltip:M,type:W,typeLink:J}=r,V=ci(),ue=(0,c.useApi)(c.configApiRef).getOptionalString("app.title")||"Backstage",Re=d||A,Ce=A||d,Ie=`${Re} | %s | ${ue}`,ct=`${Re} | ${ue}`;return t.createElement(t.Fragment,null,t.createElement(qr.q,{titleTemplate:Ie,defaultTitle:ct}),t.createElement("header",{style:f,className:V.header},t.createElement(yn.Z,{className:V.leftItemsBox},t.createElement(ui,{classes:V,type:W,typeLink:J,pageTitle:Ce}),t.createElement(di,{classes:V,pageTitle:Ce,tooltip:M}),t.createElement(fi,{classes:V,subtitle:p})),t.createElement(Te.Z,{container:!0,className:V.rightItemsBox,spacing:4},a)))}const mi=(0,l.Z)(r=>({root:{textAlign:"left"},label:{color:r.palette.common.white,fontWeight:"bold",letterSpacing:0,fontSize:r.typography.fontSize,marginBottom:r.spacing(1)/2,lineHeight:1},value:{color:"rgba(255, 255, 255, 0.8)",fontSize:r.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),hi=({value:r,className:a})=>t.createElement(Oe.Z,{className:a},r);function gi(r){const{label:a,value:d,url:f}=r,p=mi(),A=t.createElement(hi,{className:p.value,value:d||"<Unknown>"});return t.createElement(Te.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(Oe.Z,{className:p.label},a),f?t.createElement(I,{to:f},A):A))}const pi={hour:"2-digit",minute:"2-digit"};function ka(r){const a=new Date,d=window.navigator.language,f=[];if(!r.has("homepage.clocks"))return f;const p=r.getConfigArray("homepage.clocks");for(const A of p)if(A.has("label")&&A.has("timezone")){let M=A.getString("label");const W={timeZone:A.getString("timezone"),...pi};try{new Date().toLocaleString(d,W)}catch{console.warn(`The timezone ${W.timeZone} is invalid. Defaulting to GMT`),W.timeZone="GMT",M="GMT"}const J=a.toLocaleTimeString(d,W);f.push({time:J,label:M})}return f}function Tl(r){const a=useApi(configApiRef),d=[],[f,p]=React.useState(d);return React.useEffect(()=>{p(ka(a));const A=setInterval(()=>{p(ka(a))},1e3);return()=>{clearInterval(A)}},[a]),f.length!==0?React.createElement(React.Fragment,null,f.map(A=>React.createElement(HeaderLabel,{label:A.label,value:A.time,key:A.label}))):null}const yi=r=>(0,o.Z)({root:{color:r.palette.common.white,padding:r.spacing(2,2,3),backgroundImage:r.palette.bursts.gradient.linear,backgroundPosition:0,backgroundSize:"inherit"}}),Ei=(0,l.Z)(yi,{name:"BackstageItemCardHeader"});function vi(r){const{title:a,subtitle:d,children:f}=r,p=Ei(r);return t.createElement("div",{className:p.root},d&&t.createElement(Oe.Z,{variant:"subtitle2",component:"h3"},d),a&&t.createElement(Oe.Z,{variant:"h6",component:"h4"},a),f)}function Pl(r){const{description:a,tags:d,title:f,type:p,subtitle:A,label:M,onClick:W,href:J}=r;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:f,subtitle:A||p})),React.createElement(CardContent,null,(d==null?void 0:d.length)?React.createElement(Box,null,d.map((V,ie)=>React.createElement(Chip,{size:"small",label:V,key:ie}))):null,a),React.createElement(CardActions,null,!J&&React.createElement(Button,{to:"#",onClick:W,color:"primary"},M),J&&React.createElement(Button,{to:J,color:"primary"},M)))}const Ai=r=>(0,o.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:r.spacing(2)}}),Ri=(0,l.Z)(Ai,{name:"BackstageItemCardGrid"});function Si(r){const{children:a,...d}=r,f=Ri(d);return t.createElement("div",{className:f.root,...d},a)}var Ci=e(41547);const Ti=(0,l.Z)(()=>({root:({isMobile:r})=>({display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",height:r?"100%":"100vh",overflowY:"auto"})}),{name:"BackstagePage"});function qa(r){const{themeId:a,children:d}=r,{isMobile:f}=(0,t.useContext)($n),p=Ti({isMobile:f});return t.createElement(Ci.Z,{theme:A=>({...A,page:A.getPageTheme({themeId:a})})},t.createElement("div",{className:p.root},d))}function Pi(r){const{themeId:a,children:d,...f}=r;return t.createElement(qa,{themeId:a},t.createElement(Xa,{...f}),d)}var kt=e(30195);const Il=kt.z.object({providerInfo:kt.z.object({}).catchall(kt.z.unknown()).optional(),profile:kt.z.object({email:kt.z.string().optional(),displayName:kt.z.string().optional(),picture:kt.z.string().optional()}),backstageIdentity:kt.z.object({token:kt.z.string(),identity:kt.z.object({type:kt.z.literal("user"),userEntityRef:kt.z.string(),ownershipEntityRefs:kt.z.array(kt.z.string())})})}),_a={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function Ii(r){const a=new Date(Date.now()+_a.defaultTokenExpiryMillis);if(!r)return a;const[d,f,p]=r.split("."),A=JSON.parse(atob(f));return typeof A.exp!="number"?a:new Date(A.exp*1e3-_a.tokenExpiryMarginMillis)}class Ll{constructor(a){oe(this,"options");oe(this,"abortController");oe(this,"state");this.options=a,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:a}=this.getSessionSync(),d=a.identity.userEntityRef,f=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(d);if(!f)throw new TypeError(`Invalid user entity reference "${d}"`);return f[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,d=this.fetchSession().then(f=>(this.state={type:"active",session:f,expiresAt:Ii(f.backstageIdentity.token)},f),f=>{throw this.state={type:"failed",error:f},f});return this.state={type:"fetching",promise:d,previous:a},d}async fetchSession(){const a=await this.options.discoveryApi.getBaseUrl("auth"),d=await fetch(`${a}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!d.ok)throw await ResponseError.fromResponse(d);return proxiedSessionSchema.parse(await d.json())}}const xl=r=>{const a=useApi(discoveryApiRef),[{status:d,error:f},{execute:p}]=useAsync(async()=>{const A=new ProxiedSignInIdentity({provider:r.provider,discoveryApi:a});await A.start(),r.onSignInSuccess(A)});return useMountEffect(p),d==="loading"?React.createElement(Progress,null):f?React.createElement(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:f}):null},Li=(0,l.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),aa=({children:r})=>{const a=Li();return t.createElement(Te.Z,{component:"li",item:!0,classes:a},r)};class oa{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 xi(r){const[a,d,f]=r.split(".");return JSON.parse(atob(d))}class sa{constructor(a){this.result=a}getUserId(){return this.result.userId}static fromResult(a){return new sa(a)}async getIdToken(){var a,d;return(d=(a=this.result).getIdToken)==null?void 0:d.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:d,ent:f}=xi(a);return{type:"user",userEntityRef:d,ownershipEntityRefs:f!=null?f:[]}}async getCredentials(){var d,f;return{token:await((f=(d=this.result).getIdToken)==null?void 0:f.call(d))}}async signOut(){var a,d;return(d=(a=this.result).signOut)==null?void 0:d.call(a)}}class kn{constructor(a,d,f){oe(this,"profilePromise");this.identity=a,this.authApi=d,this.profile=f}static createGuest(){return new oa}static fromLegacy(a){return sa.fromResult(a)}static create(a){return new kn(a.identity,a.authApi,a.profile)}getUserId(){const a=this.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(a);if(!d)throw new TypeError(`Invalid user entity reference "${a}"`);return d[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 bi={Component:({config:r,onSignInSuccess:a})=>{const{apiRef:d,title:f,message:p}=r,A=(0,c.useApi)(d),M=(0,c.useApi)(c.errorApiRef),W=async()=>{try{const J=await A.getBackstageIdentity({instantPopup:!0});if(!J)throw new Error(`The ${f} provider is not configured to support sign-in`);const V=await A.getProfile();a(kn.create({identity:J.identity,profile:V,authApi:A}))}catch(J){M.post(new ar.SP("Login failed",J))}};return t.createElement(aa,null,t.createElement(En,{variant:"fullHeight",title:f,actions:t.createElement(E.Z,{color:"primary",variant:"outlined",onClick:W},"Sign In")},t.createElement(Oe.Z,{variant:"body1"},p)))},loader:async(r,a)=>{const d=r.get(a),f=await d.getBackstageIdentity({optional:!0});if(!f)return;const p=await d.getProfile();return kn.create({identity:f.identity,profile:p,authApi:d})}},Oi={Component:({onSignInSuccess:r})=>t.createElement(aa,null,t.createElement(En,{title:"Guest",variant:"fullHeight",actions:t.createElement(E.Z,{color:"primary",variant:"outlined",onClick:()=>r(new oa)},"Enter")},t.createElement(Oe.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 oa};var Di=e(94106),eo=e(86619),to=e(74828),Fi=e(45455),Bi=e.n(Fi);const Mi=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Zi=(0,l.Z)(r=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:r.spacing(2)}}),{name:"BackstageCustomProvider"}),no=r=>{const{ref:a,...d}=r;return{inputRef:a,...d}},Ni={Component:({onSignInSuccess:r})=>{const a=Zi(),{register:d,handleSubmit:f,formState:p}=(0,Di.cI)({mode:"onChange"}),{errors:A}=p,M=({userId:W})=>{r(kn.fromLegacy({userId:W,profile:{email:`${W}@example.com`}}))};return t.createElement(aa,null,t.createElement(En,{title:"Custom User",variant:"fullHeight"},t.createElement(Oe.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:f(M)},t.createElement(Kn.Z,null,t.createElement(eo.Z,{...no(d("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(A.userId)}),A.userId&&t.createElement(to.Z,{error:!0},A.userId.message)),t.createElement(Kn.Z,null,t.createElement(eo.Z,{...no(d("idToken",{required:!1,validate:W=>!W||Mi.test(W)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(A.idToken)}),A.idToken&&t.createElement(to.Z,{error:!0},A.idToken.message)),t.createElement(E.Z,{type:"submit",color:"primary",variant:"outlined",className:a.button,disabled:!(p==null?void 0:p.isDirty)||!Bi()(A)},"Continue"))))},loader:async()=>{}},Er="@backstage/core:SignInPage:provider",ro={guest:Oi,custom:Ni,common:bi};function ao(r,a){if(r in a)throw new Error(`"${r}" ID is duplicated. IDs of identity providers have to be unique.`)}function Zl(r){return r.reduce((d,f)=>{if(typeof f=="string")return ao(f,d),d[f]={components:ro[f],id:f},d;const{id:p}=f;return ao(p,d),d[p]={components:ro.common,id:p,config:f},d},{})}const Nl=(r,a)=>{const d=useApi(errorApiRef),f=useApiHolder(),[p,A]=useState(!0),M=useCallback(J=>{a(IdentityApiSignOutProxy.from({identityApi:J,signOut:async()=>{var V;localStorage.removeItem(Er),await((V=J.signOut)==null?void 0:V.call(J))}}))},[a]);useLayoutEffect(()=>{var ue;if(!p)return;const J=localStorage.getItem(Er);if(J===null){A(!1);return}const V=r[J];if(!V){A(!1);return}let ie=!1;return V.components.loader(f,(ue=V.config)==null?void 0:ue.apiRef).then(Re=>{ie||(Re?M(Re):A(!1))}).catch(Re=>{ie||(localStorage.removeItem(Er),d.post(Re),A(!1))}),()=>{ie=!0}},[p,d,a,f,r,M]);const W=useMemo(()=>Object.keys(r).map(J=>{const V=r[J],{Component:ie}=V.components,ue=Re=>{localStorage.setItem(Er,V.id),M(Re)};return React.createElement(ie,{key:V.id,config:V.config,onSignInSuccess:ue})}),[r,M]);return[p,W]},$i=({onSignInSuccess:r,providers:a=[],title:d,align:f="left"})=>{const p=useApi(configApiRef),A=useStyles(),M=getSignInProviders(a),[W,J]=useSignInProviders(M,r);return W?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:p.getString("app.title")}),React.createElement(Content,null,d&&React.createElement(ContentHeader,{title:d,textAlign:f}),React.createElement(Grid,{container:!0,justifyContent:f==="center"?f:"flex-start",spacing:2,component:"ul",classes:A},J)))},Ui=({provider:r,auto:a,onSignInSuccess:d})=>{const f=useStyles(),p=useApi(r.apiRef),A=useApi(configApiRef),[M,W]=useState(),[J,V]=useState(!1),ie=async({checkExisting:ue,showPopup:Re})=>{try{let Ce;if(ue&&(Ce=await p.getBackstageIdentity({optional:!0})),!Ce&&(Re||a)&&(V(!0),Ce=await p.getBackstageIdentity({instantPopup:!0}),!Ce))throw new Error(`The ${r.title} provider is not configured to support sign-in`);if(!Ce){V(!0);return}const Ie=await p.getProfile();d(UserIdentity.create({identity:Ce.identity,authApi:p,profile:Ie}))}catch(Ce){W(Ce),V(!0)}};return useMountEffect(()=>ie({checkExisting:!0})),J?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:A.getString("app.title")}),React.createElement(Content,null,React.createElement(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:f},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:r.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{ie({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},r.message),M&&M.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},M.message)))))):React.createElement(Progress,null)};function $l(r){return"provider"in r?React.createElement(Ui,{...r}):React.createElement($i,{...r})}const wi=(0,l.Z)(r=>({root:{padding:r.spacing(0,2,0,2.5),minHeight:r.spacing(3)},indicator:{backgroundColor:r.palette.info.main,height:r.spacing(.3)}}),{name:"BackstageTabbedCard"}),zi=(0,Xt.Z)(r=>({root:{padding:r.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:r.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(Gn.Z);function Ul(r){const{slackChannel:a,errorBoundaryProps:d,children:f,title:p,deepLink:A,value:M,onChange:W}=r,J=wi(),[V,ie]=useState(0),ue=W||((Ie,ct)=>ie(ct));let Re;M?React.Children.map(f,Ie=>{React.isValidElement(Ie)&&(Ie==null?void 0:Ie.props.value)===M&&(Re=Ie==null?void 0:Ie.props.children)}):React.Children.map(f,(Ie,ct)=>{React.isValidElement(Ie)&&ct===V&&(Re=Ie==null?void 0:Ie.props.children)});const Ce=d||(a?{slackChannel:a}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Ce},p&&React.createElement(zi,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:J,value:M||V,onChange:ue},f),React.createElement(Divider,null),React.createElement(CardContent,null,Re),A&&React.createElement(BottomLink,{...A})))}const Wi=(0,l.Z)(r=>({root:{minWidth:r.spacing(6),minHeight:r.spacing(3),margin:r.spacing(0,2,0,0),padding:r.spacing(.5,0,.5,0),textTransform:"none","&:hover":{opacity:1,backgroundColor:"transparent",color:r.palette.text.primary}},selected:{fontWeight:"bold"}}),{name:"BackstageCardTab"});function wl(r){const{children:a,...d}=r,f=Wi();return React.createElement(Tab,{disableRipple:!0,classes:f,...d})}},88609:function(ee,s,e){"use strict";e.d(s,{Os:function(){return m},fC:function(){return v}});var n=e(76241),t=e(2784);const c=(0,n.CT)("analytics-context"),m=()=>{const o=(0,t.useContext)(c);if(o===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const h=o.atVersion(1);if(h===void 0)throw new Error("No context found for version 1.");return h},v=o=>{const{attributes:h,children:i}=o,g={...m(),...h},R=(0,n.EI)({1:g});return t.createElement(c.Provider,{value:R},i)};function l(o,h){const i=E=>React.createElement(v,{attributes:h},React.createElement(o,{...E}));return i.displayName=`WithAnalyticsContext(${o.displayName||o.name||"Component"})`,i}},28461:function(ee,s,e){"use strict";e.d(s,{f:function(){return n.fC},z:function(){return l}});var n=e(88609),t=e(27399),c=e(2784);class m{constructor(h,i={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=h,this.context=i}setContext(h){this.context=h}captureEvent(h,i,{value:E,attributes:g}={}){try{this.analyticsApi.captureEvent({action:h,subject:i,value:E,attributes:g,context:this.context})}catch(R){console.warn("Error during analytics event capture. %o",R)}}}function v(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function l(){const o=(0,c.useRef)(null),h=(0,n.Os)(),i=v();function E(){return o.current===null&&(o.current=new m(i)),o.current}const g=E();return g.setContext(h),g}},39135:function(ee,s,e){"use strict";e.d(s,{CL:function(){return D},sM:function(){return t},$v:function(){return g},v_:function(){return R},hg:function(){return T},uB:function(){return E},bq:function(){return i},Ds:function(){return N},NW:function(){return I},VE:function(){return j},W0:function(){return C},gP:function(){return L},F4:function(){return m},ux:function(){return l},Kp:function(){return c},$4:function(){return B},p_:function(){return o},ZM:function(){return z},D:function(){return v},gW:function(){return h},E6:function(){return K}});var n=e(86833),t;(function(ce){const he="SignedIn";ce.SignedIn=he;const ve="SignedOut";ce.SignedOut=ve})(t||(t={}));const c=(0,n.createApiRef)({id:"core.auth.google"}),m=(0,n.createApiRef)({id:"core.auth.github"}),v=(0,n.createApiRef)({id:"core.auth.okta"}),l=(0,n.createApiRef)({id:"core.auth.gitlab"}),o=(0,n.createApiRef)({id:"core.auth.microsoft"}),h=(0,n.createApiRef)({id:"core.auth.onelogin"}),i=(0,n.createApiRef)({id:"core.auth.bitbucket"}),E=(0,n.createApiRef)({id:"core.auth.atlassian"}),g=(0,n.createApiRef)({id:"core.alert"}),R=(0,n.createApiRef)({id:"core.analytics"}),T=(0,n.createApiRef)({id:"core.apptheme"}),N=(0,n.createApiRef)({id:"core.config"}),I=(0,n.createApiRef)({id:"core.discovery"}),j=(0,n.createApiRef)({id:"core.error"});var D;(function(ce){ce[ce.None=0]="None";const ve=1;ce[ce.Active=ve]="Active"})(D||(D={}));const C=(0,n.createApiRef)({id:"core.featureflags"}),L=(0,n.createApiRef)({id:"core.fetch"}),B=(0,n.createApiRef)({id:"core.identity"}),z=(0,n.createApiRef)({id:"core.oauthrequest"}),K=(0,n.createApiRef)({id:"core.storage"})},27399:function(ee,s,e){"use strict";e.d(s,{createApiFactory:function(){return n.createApiFactory},createApiRef:function(){return n.createApiRef},useApi:function(){return n.useApi},useApiHolder:function(){return n.useApiHolder},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},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}});var n=e(86833);e.o(n,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return n.FeatureFlagState}}),e.o(n,"SessionState")&&e.d(s,{SessionState:function(){return n.SessionState}}),e.o(n,"alertApiRef")&&e.d(s,{alertApiRef:function(){return n.alertApiRef}}),e.o(n,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return n.analyticsApiRef}}),e.o(n,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return n.appThemeApiRef}}),e.o(n,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return n.atlassianAuthApiRef}}),e.o(n,"attachComponentData")&&e.d(s,{attachComponentData:function(){return n.attachComponentData}}),e.o(n,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return n.bitbucketAuthApiRef}}),e.o(n,"configApiRef")&&e.d(s,{configApiRef:function(){return n.configApiRef}}),e.o(n,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return n.createComponentExtension}}),e.o(n,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return n.createExternalRouteRef}}),e.o(n,"createPlugin")&&e.d(s,{createPlugin:function(){return n.createPlugin}}),e.o(n,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return n.createRoutableExtension}}),e.o(n,"createRouteRef")&&e.d(s,{createRouteRef:function(){return n.createRouteRef}}),e.o(n,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return n.discoveryApiRef}}),e.o(n,"errorApiRef")&&e.d(s,{errorApiRef:function(){return n.errorApiRef}}),e.o(n,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return n.featureFlagsApiRef}}),e.o(n,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return n.fetchApiRef}}),e.o(n,"getComponentData")&&e.d(s,{getComponentData:function(){return n.getComponentData}}),e.o(n,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return n.githubAuthApiRef}}),e.o(n,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return n.gitlabAuthApiRef}}),e.o(n,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return n.googleAuthApiRef}}),e.o(n,"identityApiRef")&&e.d(s,{identityApiRef:function(){return n.identityApiRef}}),e.o(n,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return n.microsoftAuthApiRef}}),e.o(n,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return n.oauthRequestApiRef}}),e.o(n,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return n.oktaAuthApiRef}}),e.o(n,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return n.oneloginAuthApiRef}}),e.o(n,"storageApiRef")&&e.d(s,{storageApiRef:function(){return n.storageApiRef}}),e.o(n,"useApp")&&e.d(s,{useApp:function(){return n.useApp}}),e.o(n,"useElementFilter")&&e.d(s,{useElementFilter:function(){return n.useElementFilter}}),e.o(n,"useRouteRef")&&e.d(s,{useRouteRef:function(){return n.useRouteRef}}),e.o(n,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return n.useRouteRefParams}});var t=e(39135)},90515:function(ee,s,e){"use strict";e.d(s,{T:function(){return t}});class n{constructor(m){if(this.config=m,!m.id.split(".").flatMap(l=>l.split("-")).every(l=>l.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${m.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 n(c)}},25182:function(ee,s,e){"use strict";e.d(s,{n:function(){return n}});function n(t,c){return"id"in t?{api:t,deps:{},factory:()=>c}:t}},86833:function(ee,s,e){"use strict";e.d(s,{useApi:function(){return n.h_},useApiHolder:function(){return n.I_},createApiRef:function(){return t.T},createApiFactory:function(){return v.n}});var n=e(5761),t=e(90515),c=e(16362),m=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,"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,"useRouteRef")&&e.d(s,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return c.useRouteRefParams}});var v=e(25182)},16362:function(){},5761:function(ee,s,e){"use strict";e.d(s,{I_:function(){return c},h_:function(){return m}});var n=e(2784),t=e(76241);function c(){const l=(0,t.Vt)("api-context");if(!l)throw new Error("API context is not available");const o=l.atVersion(1);if(!o)throw new Error("ApiContext v1 not available");return o}function m(l){const h=c().get(l);if(!h)throw new Error(`No implementation available for ${l}`);return h}function v(l){return function(h){const i=g=>{const R=c(),T={};for(const N in l)if(l.hasOwnProperty(N)){const I=l[N],j=R.get(I);if(!j)throw new Error(`No implementation available for ${I}`);T[N]=j}return React.createElement(h,{...g,...T})},E=h.displayName||h.name||"Component";return i.displayName=`withApis(${E})`,i}}},31311:function(ee,s,e){"use strict";e.d(s,{useApp:function(){return n.q}});var n=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,"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(ee,s,e){"use strict";e.d(s,{q:function(){return t}});var n=e(76241);const t=()=>{const c=(0,n.Vt)("app-context");if(!c)throw new Error("App context is not available");const m=c.atVersion(1);if(!m)throw new Error("AppContext v1 not available");return m}},74181:function(ee,s,e){"use strict";e.d(s,{R5:function(){return m},CO:function(){return R},P4:function(){return g},IY:function(){return v},vJ:function(){return D}});var n=e(76241);const t=(0,n.uW)("component-data-store",()=>new WeakMap),c="__backstage_data";function m(C,L,B){var ce;const z=C;let K=(ce=z[c])!=null?ce:t.get(C);if(K||(K={map:new Map},Object.defineProperty(z,c,{enumerable:!1,configurable:!0,writable:!1,value:K}),t.set(C,K)),K.map.has(L)){const he=C.displayName||C.name;throw new Error(`Attempted to attach duplicate data "${L}" to component "${he}"`)}K.map.set(L,B)}function v(C,L){var K;if(!C)return;const B=C.type;if(!B)return;const z=(K=B[c])!=null?K:t.get(B);if(!!z)return z.map.get(L)}var l=e(2784),o=e(88609),h=e(31311),i=e(82772);class E extends l.Component{constructor(){super(...arguments);oe(this,"state",{error:void 0});oe(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(L){return{error:L}}render(){const{error:L}=this.state,{app:B,plugin:z}=this.props,{ErrorBoundaryFallback:K}=B.getComponents();return L?l.createElement(K,{error:L,resetError:this.handleErrorReset,plugin:z}):this.props.children}}function g(C){const{component:L,mountPoint:B,name:z}=C;return T({component:{lazy:()=>L().then(K=>{const ce=ve=>{try{(0,i.tg)(B)}catch(De){if(typeof De=="object"&&De!==null){const{message:pe}=De;if(typeof pe=="string"&&pe.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${B} 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 De}return l.createElement(K,{...ve})},he=z||K.displayName||K.name||"LazyComponent";return ce.displayName=`RoutableExtension(${he})`,ce},K=>he=>{const ve=(0,h.useApp)(),{BootErrorPage:De}=ve.getComponents();return l.createElement(De,{step:"load-chunk",error:K})})},data:{"core.mountPoint":B},name:z})}function R(C){const{component:L,name:B}=C;return T({component:L,name:B})}function T(C){const{data:L={},name:B}=C;B||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let z;if("lazy"in C.component){const ce=C.component.lazy;z=(0,l.lazy)(()=>ce().then(he=>({default:he})))}else z=C.component.sync;const K=B||z.displayName||z.name||"Component";return{expose(ce){const he=ve=>{const De=(0,h.useApp)(),{Progress:pe}=De.getComponents(),je=L==null?void 0:L["core.mountPoint"];return l.createElement(l.Suspense,{fallback:l.createElement(pe,null)},l.createElement(E,{app:De,plugin:ce},l.createElement(o.fC,{attributes:{pluginId:ce.getId(),...B&&{extension:B},...je&&{routeRef:je.id}}},l.createElement(z,{...ve}))))};m(he,"core.plugin",ce);for(const[ve,De]of Object.entries(L))m(he,ve,De);return he.displayName=`Extension(${K})`,he}}}var N=e(27399);function I(C,L,B,z){return l.Children.toArray(C).flatMap(K=>{if(!(0,l.isValidElement)(K))return[];if(K.type===l.Fragment)return I(K.props.children,L,B,z);if(v(K,"core.featureFlagged")){const ce=K.props;return("with"in ce?L.isActive(ce.with):!L.isActive(ce.without))?I(K.props.children,L,B,z):[]}if(B===void 0||B(K))return[K];if(z)throw new Error(z);return I(K.props.children,L,B,z)})}class j{constructor(L,B){this.node=L,this.featureFlagsApi=B}selectByComponentData(L){const B=I(this.node,this.featureFlagsApi,z=>v(z,L.key)!==void 0,L.withStrictError);return new j(B,this.featureFlagsApi)}findComponentData(L){return I(this.node,this.featureFlagsApi,z=>v(z,L.key)!==void 0).map(z=>v(z,L.key)).filter(z=>z!==void 0)}getElements(){return I(this.node,this.featureFlagsApi)}}function D(C,L,B=[]){const z=(0,N.useApi)(N.featureFlagsApiRef),K=new j(C,z);return(0,l.useMemo)(()=>L(K),[C,...B])}},80274:function(){},36964:function(ee,s,e){"use strict";e.d(s,{AnalyticsContext:function(){return n.f},useAnalytics:function(){return n.z},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},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},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},useApp:function(){return c.useApp},attachComponentData:function(){return m.R5},createComponentExtension:function(){return m.CO},createRoutableExtension:function(){return m.P4},getComponentData:function(){return m.IY},useElementFilter:function(){return m.vJ},createPlugin:function(){return o.r},createExternalRouteRef:function(){return h.x8},createRouteRef:function(){return h.NT},useRouteRef:function(){return h.tg},useRouteRefParams:function(){return h.Oi}});var n=e(28461),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,"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,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}});var c=e(31311);e.o(c,"attachComponentData")&&e.d(s,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"createApiFactory")&&e.d(s,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createApiRef")&&e.d(s,{createApiRef:function(){return c.createApiRef}}),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,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(s,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"getComponentData")&&e.d(s,{getComponentData:function(){return c.getComponentData}}),e.o(c,"useApi")&&e.d(s,{useApi:function(){return c.useApi}}),e.o(c,"useApiHolder")&&e.d(s,{useApiHolder:function(){return c.useApiHolder}}),e.o(c,"useElementFilter")&&e.d(s,{useElementFilter:function(){return c.useElementFilter}}),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 m=e(74181),v=e(80274),l=e.n(v);e.o(v,"createApiFactory")&&e.d(s,{createApiFactory:function(){return v.createApiFactory}}),e.o(v,"createApiRef")&&e.d(s,{createApiRef:function(){return v.createApiRef}}),e.o(v,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return v.createExternalRouteRef}}),e.o(v,"createPlugin")&&e.d(s,{createPlugin:function(){return v.createPlugin}}),e.o(v,"createRouteRef")&&e.d(s,{createRouteRef:function(){return v.createRouteRef}}),e.o(v,"useApi")&&e.d(s,{useApi:function(){return v.useApi}}),e.o(v,"useApiHolder")&&e.d(s,{useApiHolder:function(){return v.useApiHolder}}),e.o(v,"useRouteRef")&&e.d(s,{useRouteRef:function(){return v.useRouteRef}}),e.o(v,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return v.useRouteRefParams}});var o=e(96896),h=e(82772)},96896:function(ee,s,e){"use strict";e.d(s,{r:function(){return t}});class n{constructor(m){this.config=m}getId(){return this.config.id}getApis(){var m;return(m=this.config.apis)!=null?m:[]}getFeatureFlags(){var m,v;return(v=(m=this.config.featureFlags)==null?void 0:m.slice())!=null?v:[]}get routes(){var m;return(m=this.config.routes)!=null?m:{}}get externalRoutes(){var m;return(m=this.config.externalRoutes)!=null?m:{}}provide(m){return m.expose(this)}toString(){return`plugin{${this.config.id}}`}}function t(c){return new n(c)}},82772:function(ee,s,e){var N,I,j;"use strict";e.d(s,{x8:function(){return i},NT:function(){return m},tg:function(){return R},Oi:function(){return T}});var n=e(76241);const t=(0,n.uW)("route-ref-type",()=>Symbol("route-ref-type"));class c{constructor(C,L){oe(this,N,"absolute");this.id=C,this.params=L}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}N=t;function m(D){var C;return new c(D.id,(C=D.params)!=null?C:[])}const v=/^\w+$/;class l{constructor(C,L,B,z){oe(this,I,"sub");this.id=C,this.path=L,this.parent=B,this.params=z}toString(){return`routeRef{type=sub,id=${this.id}}`}}I=t;function o(D){const{id:C,path:L,parent:B}=D,z=L.split("/").filter(he=>he.startsWith(":")).map(he=>he.substring(1)),K=[...B.params,...z];if(B.params.some(he=>z.includes(he)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!L.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${L}'`);if(L.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${L}'`);for(const he of z)if(!v.test(he))throw new Error(`SubRouteRef path has invalid param, got '${he}'`);return new l(C,L,B,K)}class h{constructor(C,L,B){oe(this,j,"external");this.id=C,this.params=L,this.optional=B}toString(){return`routeRef{type=external,id=${this.id}}`}}j=t;function i(D){var C;return new h(D.id,(C=D.params)!=null?C:[],Boolean(D.optional))}var E=e(2784),g=e(10289);function R(D){const C=(0,g.TH)(),L=(0,n.Vt)("routing-context");if(!L)throw new Error("Routing context is not available");const B=L.atVersion(1),z=(0,E.useMemo)(()=>B&&B.resolve(D,C),[B,D,C]);if(!L)throw new Error("useRouteRef used outside of routing context");if(!B)throw new Error("RoutingContext v1 not available");const K="optional"in D&&D.optional;if(!z&&!K)throw new Error(`No path for ${D}`);return z}function T(D){return(0,g.UO)()}},10179:function(ee,s,e){"use strict";e.d(s,{SP:function(){return N},dR:function(){return g},VL:function(){return j},BD:function(){return t}});function n(D){if(typeof D!="object"||D===null||Array.isArray(D))return!1;const C=D;return!(typeof C.name!="string"||C.name===""||typeof C.message!="string")}function t(D){if(typeof D!="object"||D===null||Array.isArray(D))throw new Error(`Encountered invalid error, not an object, got '${D}'`);const C=D;if(typeof C.name!="string"||C.name==="")throw new Error(`Encountered error object without a name, got '${D}'`);if(typeof C.message!="string")throw new Error(`Encountered error object without a message, got '${D}'`)}var c=e(24852);function m(D,C){const L=serializeErrorInternal(D),B={name:"Unknown",message:"<no reason given>",...L};return(C==null?void 0:C.includeStack)||delete B.stack,B}function v(D){const C=(0,c.deserializeError)(D);return D.stack||(C.stack=void 0),C}function l(D){if(n(D)){const C=String(D);return C!=="[object Object]"?C:`${D.name}: ${D.message}`}return`unknown error '${D}'`}class o extends Error{constructor(C,L){var z;let B=C;if(L!==void 0){const K=l(L);B?B+=`; caused by ${K}`:B=`caused by ${K}`}super(B);oe(this,"cause");(z=Error.captureStackTrace)==null||z.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=n(L)?L:void 0}}class h extends null{}class i extends null{}class E extends null{}class g extends o{}class R extends null{}class T extends null{}class N extends o{constructor(C,L){super(C,L);this.name=n(L)?L.name:"Error"}}async function I(D){var C;try{const L=await D.text();if(L){if((C=D.headers.get("content-type"))==null?void 0:C.startsWith("application/json"))try{const B=JSON.parse(L);if(B.error&&B.response)return B}catch{}return{error:{name:"Error",message:`Request failed with status ${D.status} ${D.statusText}, ${L}`},response:{statusCode:D.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${D.status} ${D.statusText}`},response:{statusCode:D.status}}}class j extends Error{constructor(C){super(C.message);oe(this,"response");oe(this,"body");oe(this,"cause");this.name="ResponseError",this.response=C.response,this.body=C.data,this.cause=C.cause}static async fromResponse(C){const L=await I(C),B=L.response.statusCode||C.status,z=L.error.name||C.statusText,K=`Request failed with ${B} ${z}`,ce=v(L.error);return new j({message:K,response:C,data:L,cause:ce})}}},36356:function(ee,s,e){var g,R,T,N,I;"use strict";e.d(s,{nW:function(){return E},ae:function(){return l},q3:function(){return o}});var n=e(36964);const t=(0,n.createApiRef)({id:"core.scmauth"});class c{constructor(C){rn(this,g,void 0);un(this,g,C)}async getCredentials(C){const L=new URL(C.url),B=Ye(this,g).find(z=>z.isUrlSupported(L));if(!B)throw new Error(`No auth provider available for '${C.url}', see https://backstage.io/link?scm-auth`);return B.getCredentials(C)}}g=new WeakMap;const j=class{constructor(C,L,B,z){rn(this,R,void 0);rn(this,T,void 0);rn(this,N,void 0);rn(this,I,void 0);un(this,R,L),un(this,T,B),un(this,N,z),un(this,I,C)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:C,gitlab:L,azure:B,bitbucket:z})=>j.merge(j.forGithub(C),j.forGitlab(L),j.forAzure(B),j.forBitbucket(z))})}static forAuthApi(C,L){return new j("generic",C,L.host,L.scopeMapping)}static forGithub(C,L){var z;const B=(z=L==null?void 0:L.host)!=null?z:"github.com";return new j("github",C,B,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(C,L){var z;const B=(z=L==null?void 0:L.host)!=null?z:"gitlab.com";return new j("gitlab",C,B,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(C,L){var z;const B=(z=L==null?void 0:L.host)!=null?z:"dev.azure.com";return new j("azure",C,B,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(C,L){var z;const B=(z=L==null?void 0:L.host)!=null?z:"bitbucket.org";return new j("bitbucket",C,B,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...C){return new c(C)}isUrlSupported(C){return C.host===Ye(this,T)}getAdditionalScopesForProvider(C){var L,B;return!(C==null?void 0:C.customScopes)||Ye(this,I)==="generic"?[]:(B=(L=C.customScopes)==null?void 0:L[Ye(this,I)])!=null?B:[]}async getCredentials(C){const{url:L,additionalScope:B,...z}=C,K=Ye(this,N).default.slice();(B==null?void 0:B.repoWrite)&&K.push(...Ye(this,N).repoWrite);const ce=this.getAdditionalScopesForProvider(B);ce.length&&K.push(...ce);const he=[...new Set(K)],ve=await Ye(this,R).getAccessToken(he,z);return{token:ve,headers:{Authorization:`Bearer ${ve}`}}}};let m=j;R=new WeakMap,T=new WeakMap,N=new WeakMap,I=new WeakMap;var v=e(63925);class l{static fromConfig(C){return v.Lx.fromConfig(C)}}const o=(0,n.createApiRef)({id:"integration.scmintegrations"});var h=e(73250),i=e(2784);const E=D=>{var K;const{type:C}=D,L=(0,n.useApp)(),B=h.Z,z=C&&(K=L.getSystemIcon(C))!=null?K:B;return i.createElement(z,null)}},63925:function(ee,s,e){var Q,H,w,se,me,Ae,Te;"use strict";e.d(s,{Lx:function(){return ze},Pb:function(){return St}});var n=e(82717),t=e.n(n),c=e(76635);function m(b){const u=new URL("http://example.com");return u.host=b,u.host===b}function v(b){try{return new URL(b),!0}catch{return!1}}function l(b,u){return{list(){return b},byUrl(y){try{const P=typeof y=="string"?new URL(y):y;return b.find(F=>u(F)===P.host)}catch{return}},byHost(y){return b.find(P=>u(P)===y)}}}function o(b){const{url:u,base:y,lineNumber:P}=b;try{return new URL(u),u}catch{}let F;if(u.startsWith("/")){const{filepath:_}=t()(y);F=new URL(y);const te=(0,c.trimEnd)(F.pathname.substring(0,F.pathname.length-_.length),"/");F.pathname=`${te}${u}`}else F=new URL(u,y);return F.search=new URL(y).search,P&&(F.hash=`L${P}`),F.toString()}const h="GB",Oe=class{constructor(u,y,P,F,_,te){rn(this,Q,void 0);rn(this,H,void 0);rn(this,w,void 0);rn(this,se,void 0);rn(this,me,void 0);rn(this,Ae,void 0);rn(this,Te,(...u)=>{const y=new URL(Ye(this,Q));return y.pathname=u.map(P=>encodeURIComponent(P)).join("/"),y});un(this,Q,u),un(this,H,y),un(this,w,P),un(this,se,F),un(this,me,_),un(this,Ae,te)}static fromRepoUrl(u){var Ne;const y=new URL(u);let P,F,_;const te=y.pathname.split("/").map(Pe=>decodeURIComponent(Pe));if(te[2]==="_git"?(P=te[1],F=_=te[3]):te[3]==="_git"&&(P=te[1],F=te[2],_=te[4]),!P||!F||!_)throw new Error("Azure URL must point to a git repository");const re=(Ne=y.searchParams.get("path"))!=null?Ne:void 0;let le;const ge=y.searchParams.get("version");if(ge){if(ge.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");le=ge.slice(2)}return new Oe(y.origin,P,F,_,re,le)}toRepoUrl(){let u;return Ye(this,w)===Ye(this,se)?u=Ye(this,Te).call(this,Ye(this,H),"_git",Ye(this,se)):u=Ye(this,Te).call(this,Ye(this,H),Ye(this,w),"_git",Ye(this,se)),Ye(this,me)&&u.searchParams.set("path",Ye(this,me)),Ye(this,Ae)&&u.searchParams.set("version",h+Ye(this,Ae)),u.toString()}toFileUrl(){if(!Ye(this,me))throw new Error("Azure URL must point to a specific path to be able to download a file");const u=Ye(this,Te).call(this,Ye(this,H),Ye(this,w),"_apis","git","repositories",Ye(this,se),"items");return u.searchParams.set("api-version","6.0"),u.searchParams.set("path",Ye(this,me)),Ye(this,Ae)&&u.searchParams.set("version",Ye(this,Ae)),u.toString()}toArchiveUrl(){const u=Ye(this,Te).call(this,Ye(this,H),Ye(this,w),"_apis","git","repositories",Ye(this,se),"items");return u.searchParams.set("recursionLevel","full"),u.searchParams.set("download","true"),u.searchParams.set("api-version","6.0"),Ye(this,me)&&u.searchParams.set("scopePath",Ye(this,me)),Ye(this,Ae)&&u.searchParams.set("version",Ye(this,Ae)),u.toString()}toCommitsUrl(){const u=Ye(this,Te).call(this,Ye(this,H),Ye(this,w),"_apis","git","repositories",Ye(this,se),"commits");return u.searchParams.set("api-version","6.0"),Ye(this,Ae)&&u.searchParams.set("searchCriteria.itemVersion.version",Ye(this,Ae)),u.toString()}getOwner(){return Ye(this,H)}getProject(){return Ye(this,w)}getRepo(){return Ye(this,se)}getPath(){return Ye(this,me)}getRef(){return Ye(this,Ae)}};let i=Oe;Q=new WeakMap,H=new WeakMap,w=new WeakMap,se=new WeakMap,me=new WeakMap,Ae=new WeakMap,Te=new WeakMap;const E="dev.azure.com";function g(b){var P;const u=(P=b.getOptionalString("host"))!=null?P:E,y=b.getOptionalString("token");if(!m(u))throw new Error(`Invalid Azure integration config, '${u}' is not a valid host`);return{host:u,token:y}}function R(b){const u=b.map(g);return u.some(y=>y.host===E)||u.push({host:E}),u}const yt=class{constructor(u){this.integrationConfig=u}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){var F;const{url:y,base:P}=u;if(v(y))return y;try{const _=i.fromRepoUrl(P),te=new URL(P),re=new URL(`https://a.com${(F=_.getPath())!=null?F:""}`),le=new URL(y,re).pathname;return te.searchParams.set("path",le),u.lineNumber&&(te.searchParams.set("line",String(u.lineNumber)),te.searchParams.set("lineEnd",String(u.lineNumber+1)),te.searchParams.set("lineStartColumn","1"),te.searchParams.set("lineEndColumn","1")),te.toString()}catch{return new URL(y,P).toString()}}resolveEditUrl(u){return u}};let T=yt;oe(T,"factory",({config:u})=>{var P;const y=R((P=u.getOptionalConfigArray("integrations.azure"))!=null?P:[]);return l(y.map(F=>new yt(F)),F=>F.config.host)});var N=e(48834).Buffer;function I(b){return AzureUrl.fromRepoUrl(b).toFileUrl()}function j(b){return AzureUrl.fromRepoUrl(b).toArchiveUrl()}function D(b){return AzureUrl.fromRepoUrl(b).toCommitsUrl()}function C(b,u){const y=u?{...u}:{};if(b.token){const P=N.from(`:${b.token}`,"utf8");y.Authorization=`Basic ${P.toString("base64")}`}return{headers:y}}const L="bitbucket.org",B="https://api.bitbucket.org/2.0";function z(b){var te;const u=(te=b.getOptionalString("host"))!=null?te:L;let y=b.getOptionalString("apiBaseUrl");const P=b.getOptionalString("token"),F=b.getOptionalString("username"),_=b.getOptionalString("appPassword");if(!m(u))throw new Error(`Invalid Bitbucket integration config, '${u}' is not a valid host`);return y?y=(0,c.trimEnd)(y,"/"):u===L?y=B:y=`https://${u}/rest/api/1.0`,{host:u,apiBaseUrl:y,token:P,username:F,appPassword:_}}function K(b){const u=b.map(z);return u.some(y=>y.host===L)||u.push({host:L,apiBaseUrl:B}),u}const lt=class{constructor(u){this.integrationConfig=u}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const y=o(u);if(!u.lineNumber)return y;const P=new URL(y);return this.integrationConfig.host==="bitbucket.org"?P.hash=`lines-${u.lineNumber}`:P.hash=`${u.lineNumber}`,P.toString()}resolveEditUrl(u){const y=t()(u),P=new URL(u);return P.searchParams.set("mode","edit"),P.searchParams.set("spa","0"),P.searchParams.set("at",y.ref),P.toString()}};let ce=lt;oe(ce,"factory",({config:u})=>{var P;const y=K((P=u.getOptionalConfigArray("integrations.bitbucket"))!=null?P:[]);return l(y.map(F=>new lt(F)),F=>F.config.host)});var he=e(96279),ve=e(48834).Buffer;async function De(b,u){const{name:y,owner:P,resource:F}=parseGitUrl(b),_=F==="bitbucket.org";let te=_?`${u.apiBaseUrl}/repositories/${P}/${y}`:`${u.apiBaseUrl}/projects/${P}/repos/${y}/default-branch`,re=await fetch(te,Je(u));if(re.status===404&&!_&&(te=`${u.apiBaseUrl}/projects/${P}/repos/${y}/branches/default`,re=await fetch(te,Je(u))),!re.ok){const ge=`Failed to retrieve default branch from ${te}, ${re.status} ${re.statusText}`;throw new Error(ge)}let le;if(_)le=(await re.json()).mainbranch.name;else{const{displayId:ge}=await re.json();le=ge}if(!le)throw new Error(`Failed to read default branch from ${te}. Response ${re.status} ${re.json()}`);return le}async function pe(b,u){const{name:y,owner:P,ref:F,protocol:_,resource:te,filepath:re}=parseGitUrl(b),le=te==="bitbucket.org";let ge=F;ge||(ge=await De(b,u));const Ne=re?`&path=${encodeURIComponent(re)}`:"";return le?`${_}://${te}/${P}/${y}/get/${ge}.tar.gz`:`${u.apiBaseUrl}/projects/${P}/repos/${y}/archive?format=tgz&at=${ge}&prefix=${P}-${y}${Ne}`}function je(b,u){try{const{owner:y,name:P,ref:F,filepathtype:_,filepath:te}=parseGitUrl(b);if(!y||!P||_!=="browse"&&_!=="raw"&&_!=="src")throw new Error("Invalid Bitbucket URL or file path");const re=te.replace(/^\//,"");if(u.host==="bitbucket.org"){if(!F)throw new Error("Invalid Bitbucket URL or file path");return`${u.apiBaseUrl}/repositories/${y}/${P}/src/${F}/${re}`}return`${u.apiBaseUrl}/projects/${y}/repos/${P}/raw/${re}?at=${F}`}catch(y){throw new Error(`Incorrect URL: ${b}, ${y}`)}}function Je(b){const u={};if(b.token)u.Authorization=`Bearer ${b.token}`;else if(b.username&&b.appPassword){const y=ve.from(`${b.username}:${b.appPassword}`,"utf8");u.Authorization=`Basic ${y.toString("base64")}`}return{headers:u}}const We="github.com",He="https://api.github.com",Qe="https://raw.githubusercontent.com";function ot(b){var te,re;const u=(te=b.getOptionalString("host"))!=null?te:We;let y=b.getOptionalString("apiBaseUrl"),P=b.getOptionalString("rawBaseUrl");const F=b.getOptionalString("token"),_=(re=b.getOptionalConfigArray("apps"))==null?void 0:re.map(le=>({appId:le.getNumber("appId"),clientId:le.getString("clientId"),clientSecret:le.getString("clientSecret"),webhookSecret:le.getString("webhookSecret"),privateKey:le.getString("privateKey"),allowedInstallationOwners:le.getOptionalStringArray("allowedInstallationOwners")}));if(!m(u))throw new Error(`Invalid GitHub integration config, '${u}' is not a valid host`);return y?y=(0,c.trimEnd)(y,"/"):u===We&&(y=He),P?P=(0,c.trimEnd)(P,"/"):u===We&&(P=Qe),{host:u,apiBaseUrl:y,rawBaseUrl:P,token:F,apps:_}}function we(b){const u=b.map(ot);return u.some(y=>y.host===We)||u.push({host:We,apiBaseUrl:He,rawBaseUrl:Qe}),u}function ke(b,u,y){try{const{owner:P,name:F,ref:_,filepathtype:te,filepath:re}=parseGitUrl(b);if(!P||!F||!_||te!=="blob"&&te!=="raw"&&te!=="tree")throw new Error("Invalid GitHub URL or file path");const le=re.replace(/^\//,"");return Xe(u,y)==="api"?`${u.apiBaseUrl}/repos/${P}/${F}/contents/${le}?ref=${_}`:`${u.rawBaseUrl}/${P}/${F}/${_}/${le}`}catch(P){throw new Error(`Incorrect URL: ${b}, ${P}`)}}function rt(b,u){const y={};return Xe(b,u)==="api"&&(y.Accept="application/vnd.github.v3.raw"),u.token&&(y.Authorization=`token ${u.token}`),{headers:y}}function Xe(b,u){return b.apiBaseUrl&&(u.token||!b.rawBaseUrl)?"api":"raw"}class ht{constructor(){oe(this,"tokenCache",new Map);oe(this,"isNotExpired",u=>u.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(u,y){const P=this.tokenCache.get(u);if(P&&this.isNotExpired(P.expiresAt))return{accessToken:P.token};const F=await y();return this.tokenCache.set(u,F),{accessToken:F.token}}}const dt={Accept:"application/vnd.github.machine-man-preview+json"};class ft{constructor(u,y){oe(this,"appClient");oe(this,"baseUrl");oe(this,"baseAuthConfig");oe(this,"cache",new ht);oe(this,"allowedInstallationOwners");this.allowedInstallationOwners=u.allowedInstallationOwners,this.baseUrl=y,this.baseAuthConfig={appId:u.appId,privateKey:u.privateKey.replace(/\\n/gm,`
31
- `)},this.appClient=new Octokit({baseUrl:y,headers:dt,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(u,y){var te;const{installationId:P,suspended:F}=await this.getInstallationData(u);if(this.allowedInstallationOwners&&!((te=this.allowedInstallationOwners)==null?void 0:te.includes(u)))return{accessToken:void 0};if(F)throw new Error(`The GitHub application for ${u} is suspended`);const _=y?`${u}/${y}`:u;return this.cache.getOrCreateToken(_,async()=>{const re=await this.appClient.apps.createInstallationAccessToken({installation_id:P,headers:dt});if(y&&re.data.repository_selection==="selected"){const le=new Octokit({baseUrl:this.baseUrl,auth:re.data.token});if(!(await le.paginate(le.apps.listReposAccessibleToInstallation)).some(Pe=>Pe.name===y))throw new Error(`The Backstage GitHub application used in the ${u} organization does not have access to a repository with the name ${y}`)}return{token:re.data.token,expiresAt:DateTime.fromISO(re.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(u){const P=(await this.getInstallations()).find(_=>{var te,re;return((re=(te=_.account)==null?void 0:te.login)==null?void 0:re.toLocaleLowerCase("en-US"))===u.toLocaleLowerCase("en-US")});if(P)return{installationId:P.id,suspended:Boolean(P.suspended_by)};const F=new Error(`No app installation found for ${u} in ${this.baseAuthConfig.appId}`);throw F.name="NotFoundError",F}}class pt{constructor(u){oe(this,"apps");var y,P;this.apps=(P=(y=u.apps)==null?void 0:y.map(F=>new ft(F,u.apiBaseUrl)))!=null?P:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(y=>y.getInstallations()))).flat():[]}async getAppToken(u,y){if(this.apps.length===0)return;const P=await Promise.all(this.apps.map(re=>re.getInstallationCredentials(u,y).then(le=>({credentials:le,error:void 0}),le=>({credentials:void 0,error:le})))),F=P.find(re=>re.credentials);if(F)return F.credentials.accessToken;const te=P.map(re=>re.error).find(re=>re.name!=="NotFoundError");if(te)throw te}}class Pt{constructor(u,y){this.githubAppCredentialsMux=u,this.token=y}async getCredentials(u){const y=parseGitUrl(u.url),P=y.owner||y.name,F=y.owner?y.name:void 0;let _="app",te=await this.githubAppCredentialsMux.getAppToken(P,F);return te||(_="token",te=this.token),{headers:te?{Authorization:`Bearer ${te}`}:void 0,token:te,type:_}}}oe(Pt,"create",null);class st{static fromIntegrations(u){const y=new Map;return u.github.list().forEach(P=>{const F=SingleInstanceGithubCredentialsProvider.create(P.config);y.set(P.config.host,F)}),new st(y)}constructor(u){this.providers=u}async getCredentials(u){const y=new URL(u.url),P=this.providers.get(y.host);if(!P)throw new Error(`There is no GitHub integration that matches ${u.url}. Please add a configuration for an integration.`);return P.getCredentials(u)}}const at=class{constructor(u){this.integrationConfig=u}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){return St(o(u),"tree")}resolveEditUrl(u){return St(u,"edit")}};let et=at;oe(et,"factory",({config:u})=>{var P;const y=we((P=u.getOptionalConfigArray("integrations.github"))!=null?P:[]);return l(y.map(F=>new at(F)),F=>F.config.host)});function St(b,u){return b.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(y,P,F,_)=>`//${P}/${F}/${_}/${u}/`)}const mt="gitlab.com",Be="https://gitlab.com/api/v4";function ut(b){const u=b.getString("host");let y=b.getOptionalString("apiBaseUrl");const P=b.getOptionalString("token");let F=b.getOptionalString("baseUrl");if(y?y=(0,c.trimEnd)(y,"/"):u===mt&&(y=Be),F?F=(0,c.trimEnd)(F,"/"):F=`https://${u}`,m(u)){if(!y||!v(y))throw new Error(`Invalid GitLab integration config, '${y}' is not a valid apiBaseUrl`);if(!v(F))throw new Error(`Invalid GitLab integration config, '${F}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${u}' is not a valid host`);return{host:u,token:P,apiBaseUrl:y,baseUrl:F}}function tt(b){const u=b.map(ut);return u.some(y=>y.host===mt)||u.push({host:mt,apiBaseUrl:Be,baseUrl:`https://${mt}`}),u}async function Ct(b,u){if(b.includes("/-/blob/")){const y=await Z(b,u);return q(b,y).toString()}return vt(b).toString()}function it(b){const{token:u=""}=b;return{headers:{"PRIVATE-TOKEN":u}}}function vt(b){try{const u=new URL(b),[y,P,F,_,...te]=u.pathname.split("/");if(y!==""||P===""||F===""||_!=="blob"||!te.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return u.pathname=[y,P,F,"raw",...te].join("/"),u}catch(u){throw new Error(`Incorrect url: ${b}, ${u}`)}}function q(b,u){try{const y=new URL(b),P=y.pathname.split("/-/blob/")[1],[F,..._]=P.split("/");return y.pathname=["/api/v4/projects",u,"repository/files",encodeURIComponent(decodeURIComponent(_.join("/"))),"raw"].join("/"),y.search=`?ref=${F}`,y}catch(y){throw new Error(`Incorrect url: ${b}, ${y}`)}}async function Z(b,u){const y=new URL(b);if(!y.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const P=y.pathname.split("/-/blob/")[0],F=new URL(`${y.origin}/api/v4/projects/${encodeURIComponent(P.replace(/^\//,""))}`),_=await fetch(F.toString(),it(u)),te=await _.json();if(!_.ok)throw new Error(`GitLab Error '${te.error}', ${te.error_description}`);return Number(te.id)}catch(P){throw new Error(`Could not get GitLab project ID for: ${b}, ${P}`)}}const $=class{constructor(u){this.integrationConfig=u}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){return o(u)}resolveEditUrl(u){return de(u,"edit")}};let ne=$;oe(ne,"factory",({config:u})=>{var P;const y=tt((P=u.getOptionalConfigArray("integrations.gitlab"))!=null?P:[]);return l(y.map(F=>new $(F)),F=>F.config.host)});function de(b,u){return b.replace(/\/\-\/(blob|tree|edit)\//,`/-/${u}/`)}const ae="amazonaws.com";function ye(b){var le;const u=b.getOptionalString("endpoint"),y=(le=b.getOptionalBoolean("s3ForcePathStyle"))!=null?le:!1;let P,F;if(u){try{const ge=new URL(u);P=ge.host,F=ge.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${u}' is not a valid URL`)}if(F!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${u}'`)}else P=ae;const _=b.getOptionalString("accessKeyId"),te=b.getOptionalString("secretAccessKey"),re=b.getOptionalString("roleArn");return{host:P,endpoint:u,s3ForcePathStyle:y,accessKeyId:_,secretAccessKey:te,roleArn:re}}function Ze(b){const u=b.map(ye);return u.some(y=>y.host===ae)||u.push({host:ae}),u}const x=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(u){this.integrationConfig=u}resolveUrl(u){return o(u)}resolveEditUrl(u){return u}};let xe=x;oe(xe,"factory",({config:u})=>{var P;const y=Ze((P=u.getOptionalConfigArray("integrations.awsS3"))!=null?P:[]);return l(y.map(F=>new x(F)),F=>F.config.host)});class ze{constructor(u){oe(this,"byType");this.byType=u}static fromConfig(u){return new ze({awsS3:xe.factory({config:u}),azure:T.factory({config:u}),bitbucket:ce.factory({config:u}),github:et.factory({config:u}),gitlab:ne.factory({config:u})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}list(){return Object.values(this.byType).flatMap(u=>u.list())}byUrl(u){return Object.values(this.byType).map(y=>y.byUrl(u)).find(Boolean)}byHost(u){return Object.values(this.byType).map(y=>y.byHost(u)).find(Boolean)}resolveUrl(u){const y=this.byUrl(u.base);return y?y.resolveUrl(u):o(u)}resolveEditUrl(u){const y=this.byUrl(u);return y?y.resolveEditUrl(u):u}}},16119:function(ee,s,e){"use strict";var n={};e.r(n),e.d(n,{TechDocsPlugin:function(){return ae.plugin}});var t=e(2784),c=e(47093),m=e(10289),v=e(49208),l=e(36964),o=e(20221);const h=[(0,l.createApiFactory)({api:l.discoveryApiRef,deps:{configApi:l.configApiRef},factory:({configApi:Y})=>v.UrlPatternDiscovery.compile(`${Y.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,l.createApiFactory)({api:l.alertApiRef,deps:{},factory:()=>new v.AlertApiForwarder}),(0,l.createApiFactory)({api:l.analyticsApiRef,deps:{},factory:()=>new v.NoOpAnalyticsApi}),(0,l.createApiFactory)({api:l.errorApiRef,deps:{alertApi:l.alertApiRef},factory:({alertApi:Y})=>{const Ee=new v.ErrorAlerter(Y,new v.ErrorApiForwarder);return v.UnhandledErrorForwarder.forward(Ee,{hidden:!1}),Ee}}),(0,l.createApiFactory)({api:l.storageApiRef,deps:{errorApi:l.errorApiRef},factory:({errorApi:Y})=>v.WebStorage.create({errorApi:Y})}),(0,l.createApiFactory)({api:l.fetchApiRef,deps:{configApi:l.configApiRef,identityApi:l.identityApiRef,discoveryApi:l.discoveryApiRef},factory:({configApi:Y,identityApi:Ee,discoveryApi:be})=>(0,v.createFetchApi)({middleware:[v.FetchMiddlewares.resolvePluginProtocol({discoveryApi:be}),v.FetchMiddlewares.injectIdentityAuth({identityApi:Ee,config:Y})]})}),(0,l.createApiFactory)({api:l.oauthRequestApiRef,deps:{},factory:()=>new v.OAuthRequestManager}),(0,l.createApiFactory)({api:l.googleAuthApiRef,deps:{discoveryApi:l.discoveryApiRef,oauthRequestApi:l.oauthRequestApiRef,configApi:l.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:Ee,configApi:be})=>v.GoogleAuth.create({discoveryApi:Y,oauthRequestApi:Ee,environment:be.getOptionalString("auth.environment")})}),(0,l.createApiFactory)({api:l.microsoftAuthApiRef,deps:{discoveryApi:l.discoveryApiRef,oauthRequestApi:l.oauthRequestApiRef,configApi:l.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:Ee,configApi:be})=>v.MicrosoftAuth.create({discoveryApi:Y,oauthRequestApi:Ee,environment:be.getOptionalString("auth.environment")})}),(0,l.createApiFactory)({api:l.githubAuthApiRef,deps:{discoveryApi:l.discoveryApiRef,oauthRequestApi:l.oauthRequestApiRef,configApi:l.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:Ee,configApi:be})=>v.GithubAuth.create({discoveryApi:Y,oauthRequestApi:Ee,defaultScopes:["read:user"],environment:be.getOptionalString("auth.environment")})}),(0,l.createApiFactory)({api:l.oktaAuthApiRef,deps:{discoveryApi:l.discoveryApiRef,oauthRequestApi:l.oauthRequestApiRef,configApi:l.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:Ee,configApi:be})=>v.OktaAuth.create({discoveryApi:Y,oauthRequestApi:Ee,environment:be.getOptionalString("auth.environment")})}),(0,l.createApiFactory)({api:l.gitlabAuthApiRef,deps:{discoveryApi:l.discoveryApiRef,oauthRequestApi:l.oauthRequestApiRef,configApi:l.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:Ee,configApi:be})=>v.GitlabAuth.create({discoveryApi:Y,oauthRequestApi:Ee,environment:be.getOptionalString("auth.environment")})}),(0,l.createApiFactory)({api:l.oneloginAuthApiRef,deps:{discoveryApi:l.discoveryApiRef,oauthRequestApi:l.oauthRequestApiRef,configApi:l.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:Ee,configApi:be})=>v.OneLoginAuth.create({discoveryApi:Y,oauthRequestApi:Ee,environment:be.getOptionalString("auth.environment")})}),(0,l.createApiFactory)({api:l.bitbucketAuthApiRef,deps:{discoveryApi:l.discoveryApiRef,oauthRequestApi:l.oauthRequestApiRef,configApi:l.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:Ee,configApi:be})=>v.BitbucketAuth.create({discoveryApi:Y,oauthRequestApi:Ee,defaultScopes:["team"],environment:be.getOptionalString("auth.environment")})}),(0,l.createApiFactory)({api:l.atlassianAuthApiRef,deps:{discoveryApi:l.discoveryApiRef,oauthRequestApi:l.oauthRequestApiRef,configApi:l.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:Ee,configApi:be})=>v.AtlassianAuth.create({discoveryApi:Y,oauthRequestApi:Ee,environment:be.getOptionalString("auth.environment")})}),(0,l.createApiFactory)({api:o.RV,deps:{discovery:l.discoveryApiRef,identity:l.identityApiRef,config:l.configApiRef},factory:({config:Y,discovery:Ee,identity:be})=>o.iM.create({config:Y,discovery:Ee,identity:be})})];var i=e(77277),E=e(9118),g=e(62833);function R({children:Y}){return(0,m.GV)()?t.createElement(t.Fragment,null,Y):t.createElement(m.VA,null,Y)}const T=()=>t.createElement(E.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),N=({step:Y,error:Ee})=>{let be="";return Y==="load-config"?be=`The configuration failed to load, someone should have a look at this error: ${Ee.message}`:Y==="load-chunk"&&(be=`Lazy loaded chunk failed to load, try to reload the page: ${Ee.message}`),t.createElement(R,null,t.createElement(E.ErrorPage,{status:"501",statusMessage:be}))},I=({error:Y,resetError:Ee,plugin:be})=>t.createElement(E.ErrorPanel,{title:`Error in ${be==null?void 0:be.getId()}`,defaultExpanded:!0,error:Y},t.createElement(i.Z,{variant:"outlined",onClick:Ee},"Retry")),j={Progress:E.Progress,Router:g.VK,NotFoundErrorPage:T,BootErrorPage:N,ErrorBoundaryFallback:I};var D=e(43642),C=e(80079),L=e(90941),B=e(32915),z=e(40562),K=e(21853),ce=e(60744),he=e(66569),ve=e(30254),De=e(13384),pe=e(15933),je=e(58838),Je=e(86737),We=e(4989),He=e(44407),Qe=e(18628),ot=e(84219),we=e(98685),ke=e(39781);const rt={brokenImage:C.Z,catalog:Qe.Z,scaffolder:B.Z,techdocs:z.Z,search:K.Z,chat:ce.Z,dashboard:he.Z,docs:ve.Z,email:De.Z,github:je.Z,group:ot.Z,help:Je.Z,"kind:api":pe.Z,"kind:component":He.Z,"kind:domain":D.Z,"kind:group":ot.Z,"kind:location":We.Z,"kind:system":L.Z,"kind:user":we.Z,user:we.Z,warning:ke.Z};var Xe=e(73689),ht=e(48032);const dt={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")`},ft={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"]};function pt(Y,Ee){const It=`linear-gradient(90deg, ${(Y.length===1?[Y[0],Y[0]]:Y).join(", ")})`,Bt=`${Ee}, ${It}`;return{colors:Y,shape:Ee,backgroundImage:Bt}}const Pt={home:pt(ft.teal,dt.wave),documentation:pt(ft.pinkSea,dt.wave2),tool:pt(ft.purpleSky,dt.round),service:pt(ft.marineBlue,dt.wave),website:pt(ft.veryBlue,dt.wave),library:pt(ft.rubyRed,dt.wave),other:pt(ft.darkGrey,dt.wave),app:pt(ft.toastyOrange,dt.wave),apis:pt(ft.teal,dt.wave2)},st='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function et(Y){const{palette:Ee,fontFamily:be=st,defaultPageTheme:It,pageTheme:Bt=Pt}=Y;if(!Bt[It])throw new Error(`${It} is not defined in pageTheme.`);return{palette:Ee,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:be,h5:{fontWeight:700},h4:{fontWeight:700,fontSize:28,marginBottom:6},h3:{fontSize:32,fontWeight:700,marginBottom:6},h2:{fontSize:40,fontWeight:700,marginBottom:8},h1:{fontSize:54,fontWeight:700,marginBottom:10}},page:Bt[It],getPageTheme:({themeId:an})=>{var In;return(In=Bt[an])!=null?In:Bt[It]}}}function St(Y){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:Y.typography.fontFamily},body:{height:"100%",fontFamily:Y.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:Y.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:Y.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:Y.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:Y.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:Y.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,ht.darken)(Y.palette.link,.3),background:(0,ht.lighten)(Y.palette.link,.95)},[Y.breakpoints.up("md")]:{minWidth:120,fontSize:Y.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:Y.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:Y.spacing(1),marginBottom:Y.spacing(1),color:Y.palette.grey[900]},outlined:{color:Y.palette.text.primary},label:{lineHeight:`${Y.spacing(2.5)}px`,fontWeight:Y.typography.fontWeightMedium,fontSize:`${Y.spacing(1.75)}px`},labelSmall:{fontSize:`${Y.spacing(1.5)}px`},deleteIcon:{color:Y.palette.grey[500],width:`${Y.spacing(3)}px`,height:`${Y.spacing(3)}px`,margin:`0 ${Y.spacing(.75)}px 0 -${Y.spacing(.75)}px`},deleteIconSmall:{width:`${Y.spacing(2)}px`,height:`${Y.spacing(2)}px`,margin:`0 ${Y.spacing(.5)}px 0 -${Y.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 mt(Y){const Ee=et(Y),be=(0,Xe.Z)(Ee),It=St(be);return{...be,overrides:It}}var Be=e(34505);const ut=mt({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:Be.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:Pt}),tt=mt({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:Be.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:Pt});var Ct=e(98192),it=e(15222),vt=e(41547),q=e(87561);const Z=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(it.Z,null),Provider:({children:Y})=>t.createElement(vt.Z,{theme:ut},t.createElement(q.ZP,null,Y))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(Ct.Z,null),Provider:({children:Y})=>t.createElement(vt.Z,{theme:tt},t.createElement(q.ZP,null,Y))}];function ne(Y){var Ee,be,It;return(0,v.createSpecializedApp)({...Y,apis:(Ee=Y==null?void 0:Y.apis)!=null?Ee:[],bindRoutes:Y==null?void 0:Y.bindRoutes,components:{...j,...Y==null?void 0:Y.components},configLoader:Y==null?void 0:Y.configLoader,defaultApis:h,icons:{...rt,...Y==null?void 0:Y.icons},plugins:(be=Y==null?void 0:Y.plugins)!=null?be:[],themes:(It=Y==null?void 0:Y.themes)!=null?It:Z})}var de=e(92902),ae=e(82250),ye=e(36356);class Ze{constructor({configApi:Ee,discoveryApi:be,identityApi:It}){oe(this,"configApi");oe(this,"discoveryApi");oe(this,"identityApi");this.configApi=Ee,this.discoveryApi=be,this.identityApi=It}async getApiOrigin(){var Ee;return(Ee=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?Ee:await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var Ee;return(Ee=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?Ee:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(Ee,be){const Bt=`${await this.getApiOrigin()}/${be}`,an=await fetch(`${Bt.endsWith("/")?Bt:`${Bt}/`}index.html`);if(an.status===404)throw new Error("Page not found");return an.text()}async syncEntityDocs(Ee){return"cached"}async getBaseUrl(Ee,be,It){const Bt=await this.getApiOrigin();return new URL(Ee,`${Bt}/${It}`).toString()}}class xe{constructor({configApi:Ee,discoveryApi:be,identityApi:It}){oe(this,"configApi");oe(this,"discoveryApi");oe(this,"identityApi");this.configApi=Ee,this.discoveryApi=be,this.identityApi=It}async getApiOrigin(){var Ee;return(Ee=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?Ee:await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(Ee){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(Ee){return{site_name:"Live preview environment",site_description:""}}}const ze=[(0,l.createApiFactory)({api:ae.techdocsStorageApiRef,deps:{configApi:l.configApiRef,discoveryApi:l.discoveryApiRef,identityApi:l.identityApiRef},factory:({configApi:Y,discoveryApi:Ee,identityApi:be})=>new Ze({configApi:Y,discoveryApi:Ee,identityApi:be})}),(0,l.createApiFactory)({api:ae.techdocsApiRef,deps:{configApi:l.configApiRef,discoveryApi:l.discoveryApiRef,identityApi:l.identityApiRef},factory:({configApi:Y,discoveryApi:Ee,identityApi:be})=>new xe({configApi:Y,discoveryApi:Ee,identityApi:be})}),(0,l.createApiFactory)({api:ye.q3,deps:{configApi:l.configApiRef},factory:({configApi:Y})=>ye.ae.fromConfig(Y)})];var Q=e(79692),H=e(86689),w=e(58845);const se=(0,Q.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Ae=()=>{const Y=se();return t.createElement("svg",{className:Y.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:Y.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 Te=(0,Q.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var yt=()=>{const Y=Te();return t.createElement("svg",{className:Y.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:Y.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 lt=(0,Q.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}}),at=()=>{const Y=lt(),{isOpen:Ee}=(0,t.useContext)(E.SidebarContext);return t.createElement("div",{className:Y.root},t.createElement(H.Z,{component:g.OL,to:"/docs/default/component/local/",underline:"none",className:Y.link},Ee?t.createElement(Ae,null):t.createElement(yt,null)))},$=({children:Y})=>t.createElement(E.SidebarPage,null,t.createElement(E.Sidebar,null,t.createElement(at,null),t.createElement(E.SidebarDivider,null),t.createElement(E.SidebarItem,{icon:w.Z,to:"/docs/default/component/local",text:"Docs Preview"})),Y);var x=e(95544),b=e(80030),u=e(61837),y=e(32388),P=e(4142);const F=(0,Q.Z)(Y=>({headerIcon:{color:Y.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:Y.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var _;(function(Y){const Ee="light";Y.LIGHT=Ee;const be="dark";Y.DARK=be})(_||(_={}));const te=(0,t.createContext)({theme:_.LIGHT,toggleTheme:()=>{}}),re=({children:Y})=>{const[Ee,be]=(0,t.useState)(_.LIGHT),It=(0,t.useCallback)(()=>{be(In=>In===_.LIGHT?_.DARK:_.LIGHT)},[be]),Bt={theme:Ee,toggleTheme:It},an={[_.LIGHT]:ut,[_.DARK]:tt};return t.createElement(te.Provider,{value:Bt},t.createElement(vt.Z,{theme:an[Ee]},Y))},le=()=>(0,t.useContext)(te),ge=()=>{const Y=F(),{theme:Ee,toggleTheme:be}=le(),It={[_.LIGHT]:{icon:P.Z,title:"Dark theme"},[_.DARK]:{icon:y.Z,title:"Light theme"}},{title:Bt,icon:an}=It[Ee];return t.createElement(x.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(b.ZP,{title:Bt,arrow:!0},t.createElement(u.Z,{size:"small",onClick:be},t.createElement(an,{className:Y.headerIcon}))))},Ne=({onReady:Y,entityRef:Ee})=>{const be=F();return t.createElement(E.Content,{className:be.content,"data-testid":"techdocs-content"},t.createElement(ae.Reader,{onReady:Y,entityRef:Ee,withSearch:!1}))},Pe=()=>{const Y={site_name:"Live preview environment",site_description:""};return t.createElement(ae.TechDocsPage,null,({entityRef:Ee,onReady:be})=>t.createElement(t.Fragment,null,t.createElement(ae.TechDocsPageHeader,{entityRef:Ee,techDocsMetadata:Y},t.createElement(ge,null)),t.createElement(Ne,{entityRef:Ee,onReady:be})))},$e=t.createElement(re,null,t.createElement(Pe,null)),Ge={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external",requestUrl:"http://localhost:3000/api"}},At={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external",requestUrl:"http://localhost:7007/api"}};async function qe(){const Y=await fetch("/.detect");return Y.ok?(await Y.text()).trim()==="techdocs-cli-server":!1}async function Et(){const Y=await(0,v.defaultConfigLoader)(),Ee=await qe();return[...Y,{context:"detected",data:Ee?Ge:At}]}const $t=ne({apis:ze,configLoader:Et,plugins:Object.values(n)}),wt=$t.getProvider(),gt=$t.getRouter(),Tt=t.createElement(v.FlatRoutes,null,t.createElement(m.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(m.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(de.CatalogEntityPage,null)}),t.createElement(m.AW,{path:"/docs",element:t.createElement(ae.TechDocsIndexPage,null)},t.createElement(ae.DefaultTechDocsHome,null)),t.createElement(m.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(ae.TechDocsReaderPage,null)},$e));var qt=()=>t.createElement(wt,null,t.createElement(gt,null,t.createElement($,null,Tt)));c.render(t.createElement(qt,null),document.getElementById("root"))},76241:function(ee,s,e){"use strict";e.d(s,{CT:function(){return l},EI:function(){return i},uW:function(){return m},Vt:function(){return o}});function n(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=n(),c=E=>`__@backstage/${E}__`;function m(E,g){const R=c(E);let T=t[R];return T||(T=g(),t[R]=T,T)}var v=e(2784);function l(E){return m(E,()=>(0,v.createContext)(void 0))}function o(E){return(0,v.useContext)(l(E))}function h(E){return{set(g){globalThis[`__@backstage/${E}__`]=createContext(createVersionedValueMap(g))},reset(){delete globalThis[`__@backstage/${E}__`]}}}function i(E){return Object.freeze(E),{atVersion(g){return E[g]}}}},29663:function(ee,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return N},CATALOG_FILTER_EXISTS:function(){return n.n3},EntityKindFilter:function(){return ut},EntityLifecyclePicker:function(){return ge},EntityListProvider:function(){return we},EntityOwnerPicker:function(){return Ge},EntityRefLink:function(){return mt},EntityRefLinks:function(){return Be},EntityTable:function(){return Tt},EntityTagPicker:function(){return Ee},EntityTypePicker:function(){return Bt},FavoriteEntity:function(){return Tr},InspectEntityDialog:function(){return ha},UnregisterEntityDialog:function(){return pa},UserListPicker:function(){return Jr},catalogApiRef:function(){return c},entityRouteRef:function(){return E},getEntityRelations:function(){return We},getEntitySourceLocation:function(){return He},humanizeEntityRef:function(){return st},isOwnerOf:function(){return Qe},starredEntitiesApiRef:function(){return m},useAsyncEntity:function(){return C},useEntity:function(){return D},useEntityCompoundName:function(){return R},useEntityList:function(){return rt},useEntityPermission:function(){return Oe},useRelatedEntities:function(){return Ze},useStarredEntities:function(){return Q}});var n=e(30001),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.catalog.service"}),m=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var v=e(82394);class l{constructor(){oe(this,"starredEntities",new Set);oe(this,"subscribers",new Set);oe(this,"observable",new ObservableImpl(O=>(O.next(new Set(this.starredEntities)),this.subscribers.add(O),()=>{this.subscribers.delete(O)})))}async toggleStarred(O){this.starredEntities.delete(O)||this.starredEntities.add(O);for(const U of this.subscribers)U.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var o=e(2784),h=e(76241),i=e(48023);const E=(0,h.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function g(S){var O,U;return{kind:S.kind.toLocaleLowerCase("en-US"),namespace:(U=(O=S.metadata.namespace)==null?void 0:O.toLocaleLowerCase("en-US"))!=null?U:DEFAULT_NAMESPACE,name:S.metadata.name}}const R=()=>{const{kind:S,namespace:O,name:U}=(0,t.useRouteRefParams)(E);return{kind:S,namespace:O,name:U}},T=(0,h.CT)("entity-context"),N=({children:S,entity:O,loading:U,error:G,refresh:X})=>{const k={entity:O,loading:U,error:G,refresh:X};return o.createElement(T.Provider,{value:(0,h.EI)({1:k})},S)},I=({entity:S,children:O})=>React.createElement(N,{entity:S,loading:!Boolean(S),error:void 0,refresh:void 0,children:O}),j=()=>{const{kind:S,namespace:O,name:U}=useEntityCompoundName(),G=useNavigate(),X=useApi(errorApiRef),k=useApi(catalogApiRef),{value:fe,error:Se,loading:Fe,retry:Le}=useAsyncRetry(()=>k.getEntityByRef({kind:S,namespace:O,name:U}),[k,S,O,U]);return useEffect(()=>{U||(X.post(new Error("No name provided!")),G("/"))},[X,G,Se,Fe,fe,U]),{entity:fe,loading:Fe,error:Se,refresh:Le}};function D(){const S=(0,h.Vt)("entity-context");if(!S)throw new Error("Entity context is not available");const O=S.atVersion(1);if(!O)throw new Error("EntityContext v1 not available");O.entity||console.warn("DEPRECATION: useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead. This warning will be replaced with an error in future releases.");const{entity:U,loading:G,error:X,refresh:k}=O;return{entity:U,loading:G,error:X,refresh:k}}function C(){const S=(0,h.Vt)("entity-context");if(!S)throw new Error("Entity context is not available");const O=S.atVersion(1);if(!O)throw new Error("EntityContext v1 not available");const{entity:U,loading:G,error:X,refresh:k}=O;return{entity:U,loading:G,error:X,refresh:k}}var L=e(76635),B=e(19126),z=e.n(B),K=e(10289),ce=e(69294),he=e(48760),ve=e(90736);function De(S){return S.reduce((O,U)=>({...O,...U.getCatalogFilters?U.getCatalogFilters():{}}),{})}function pe(S){return O=>S.every(U=>!U.filterEntity||U.filterEntity(O))}function je(S){var O;return(O=S.metadata.annotations)==null?void 0:O[ANNOTATION_VIEW_URL]}function Je(S){var O;return(O=S.metadata.annotations)==null?void 0:O[ANNOTATION_EDIT_URL]}function We(S,O,U){var X;let G=((X=S==null?void 0:S.relations)==null?void 0:X.filter(k=>k.type===O).map(k=>(0,i.of)(k.targetRef)))||[];return(U==null?void 0:U.kind)&&(G=G.filter(k=>k.kind.toLocaleLowerCase("en-US")===U.kind.toLocaleLowerCase("en-US"))),G}function He(S,O){var G;const U=(G=S.metadata.annotations)==null?void 0:G[i.M6];if(!!U)try{const X=(0,i.Ou)(U),k=O.byUrl(X.target);return{locationTargetUrl:X.target,integrationType:k==null?void 0:k.type}}catch{return}}function Qe(S,O){const U=new Set([...We(S,i.hr,{kind:"group"}),...S?[(0,i.iB)(S)]:[]].map(i.eE)),G=We(O,i.S4).map(i.eE);for(const X of G)if(U.has(X))return!0;return!1}const ot=(0,o.createContext)(void 0),we=({children:S})=>{const O=(0,ve.default)(),U=(0,t.useApi)(c),[G,X]=(0,o.useState)({}),k=(0,K.TH)(),fe=(0,o.useMemo)(()=>{var _e;return(_e=z().parse(k.search,{ignoreQueryPrefix:!0}).filters)!=null?_e:{}},[k]),[Se,Fe]=(0,o.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:Le,error:Me},Ue]=(0,ce.default)(async()=>{var Yt;const _e=(0,L.compact)(Object.values(G)),Ke=pe(_e),xt=De(_e),Zt=De((0,L.compact)(Object.values(Se.appliedFilters))),Rn=Object.keys(G).reduce((Ft,vn)=>{const on=G[vn];return(on==null?void 0:on.toQueryValue)&&(Ft[vn]=on.toQueryValue()),Ft},{});if((0,L.isEqual)(Zt,xt))Fe({appliedFilters:G,backendEntities:Se.backendEntities,entities:Se.backendEntities.filter(Ke)});else{const Ft=await U.getEntities({filter:xt});Fe({appliedFilters:G,backendEntities:Ft.items,entities:Ft.items.filter(Ke)})}if(O()){const Ft=z().parse(k.search,{ignoreQueryPrefix:!0}),vn=z().stringify({...Ft,filters:Rn},{addQueryPrefix:!0}),on=`${window.location.pathname}${vn}`;(Yt=window.history)==null||Yt.replaceState(null,document.title,on)}},[U,fe,G,Se],{loading:!0});(0,he.Z)(Ue,10,[G]);const Ve=(0,o.useCallback)(_e=>{X(Ke=>{const xt=typeof _e=="function"?_e(Ke):_e;return{...Ke,...xt}})},[]),Rt=(0,o.useMemo)(()=>({filters:Se.appliedFilters,entities:Se.entities,backendEntities:Se.backendEntities,updateFilters:Ve,queryParameters:fe,loading:Le,error:Me}),[Se,Ve,fe,Le,Me]);return o.createElement(ot.Provider,{value:Rt},S)};function ke(){const S=useContext(ot);if(!S)throw new Error("useEntityList must be used within EntityListProvider");return S}function rt(){const S=(0,o.useContext)(ot);if(!S)throw new Error("useEntityList must be used within EntityListProvider");return S}var Xe=e(64279),ht=e(18149),dt=e.n(ht),ft=e(829),pt=e.n(ft);const Pt=st;function st(S,O){const U=O==null?void 0:O.defaultKind;let G,X,k;return"metadata"in S?(G=S.kind,X=S.metadata.namespace,k=S.metadata.name):(G=S.kind,X=S.namespace,k=S.name),X===i.zG&&(X=void 0),G=G.toLocaleLowerCase("en-US"),G=U&&U.toLocaleLowerCase("en-US")===G?void 0:G,`${G?`${G}:`:""}${X?`${X}/`:""}${k}`}var et=e(9118),St=e(80030);const mt=(0,o.forwardRef)((S,O)=>{var _e;const{entityRef:U,defaultKind:G,title:X,children:k,...fe}=S,Se=(0,t.useRouteRef)(E);let Fe,Le,Me;if(typeof U=="string"){const Ke=(0,i.of)(U);Fe=Ke.kind,Le=Ke.namespace,Me=Ke.name}else"metadata"in U?(Fe=U.kind,Le=U.metadata.namespace,Me=U.metadata.name):(Fe=U.kind,Le=U.namespace,Me=U.name);Fe=Fe.toLocaleLowerCase("en-US"),Le=(_e=Le==null?void 0:Le.toLocaleLowerCase("en-US"))!=null?_e:i.zG;const Ue={kind:Fe,namespace:Le,name:Me},Ve=st({kind:Fe,namespace:Le,name:Me},{defaultKind:G}),Rt=o.createElement(et.Link,{...fe,ref:O,to:Se(Ue)},k,!k&&(X!=null?X:Ve));return X?o.createElement(St.ZP,{title:Ve},Rt):Rt}),Be=({entityRefs:S,defaultKind:O,...U})=>o.createElement(o.Fragment,null,S.map((G,X)=>o.createElement(o.Fragment,{key:X},X>0&&", ",o.createElement(mt,{...U,entityRef:G,defaultKind:O}))));class ut{constructor(O){this.value=O}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class tt{constructor(O){this.value=O}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class Ct{constructor(O){this.values=O}filterEntity(O){return this.values.every(U=>{var G;return((G=O.metadata.tags)!=null?G:[]).includes(U)})}toQueryValue(){return this.values}}class it{constructor(O){this.value=O}filterEntity(O){var G;const U=this.value.toLocaleUpperCase("en-US");return O.metadata.name.toLocaleUpperCase("en-US").includes(U)||`${O.metadata.title}`.toLocaleUpperCase("en-US").includes(U)||((G=O.metadata.tags)==null?void 0:G.join("").toLocaleUpperCase("en-US").indexOf(U))!==-1}}class vt{constructor(O){this.values=O}filterEntity(O){return this.values.some(U=>We(O,i.S4).some(G=>st(G,{defaultKind:"group"})===U))}toQueryValue(){return this.values}}class q{constructor(O){this.values=O}filterEntity(O){return this.values.some(U=>{var G;return((G=O.spec)==null?void 0:G.lifecycle)===U})}toQueryValue(){return this.values}}class Z{constructor(O,U,G){this.value=O,this.isOwnedEntity=U,this.isStarredEntity=G}filterEntity(O){switch(this.value){case"owned":return this.isOwnedEntity(O);case"starred":return this.isStarredEntity(O);default:return!0}}toQueryValue(){return this.value}}function ne(){var Ke;const S=(0,t.useApi)(c),{filters:{kind:O,type:U},queryParameters:G,updateFilters:X}=rt(),k=(0,o.useMemo)(()=>[G.type].flat().filter(Boolean),[G]),[fe,Se]=(0,o.useState)(k.length?k:(Ke=U==null?void 0:U.getTypes())!=null?Ke:[]);(0,o.useEffect)(()=>{k.length&&Se(k)},[k]);const[Fe,Le]=(0,o.useState)([]),Me=(0,o.useMemo)(()=>O==null?void 0:O.value,[O]),{error:Ue,loading:Ve,value:Rt}=(0,Xe.default)(async()=>Me?await S.getEntityFacets({filter:{kind:Me},facets:["spec.type"]}).then(Zt=>Zt.facets["spec.type"]||[]):[],[Me,S]),_e=(0,o.useRef)(Rt);return(0,o.useEffect)(()=>{const xt=_e.current;if(_e.current=Rt,Ve||!Me||xt===Rt||!Rt)return;const Zt=pt()(Rt,Yt=>-Yt.count).map(Yt=>Yt.value);Le(Zt);const Rn=fe.filter(Yt=>Zt.includes(Yt));dt()(fe,Rn)||Se(Rn)},[Ve,Me,fe,Se,Rt]),(0,o.useEffect)(()=>{X({type:fe.length?new tt(fe):void 0})},[fe,X]),{loading:Ve,error:Ue,availableTypes:Fe,selectedTypes:fe,setSelectedTypes:Se}}function de(){const S=useApi(catalogApiRef),{error:O,loading:U,value:G}=useAsync(async()=>await S.getEntityFacets({facets:["kind"]}).then(X=>{var k;return((k=X.facets.kind)==null?void 0:k.map(fe=>fe.value).sort())||[]}));return{error:O,loading:U,kinds:G}}function ae(){const S=useApi(catalogApiRef),O=useApi(identityApiRef);return useAsync(async()=>{const U=await O.getBackstageIdentity();return S.getEntityByRef(parseEntityRef(U.userEntityRef,{defaultKind:"User",defaultNamespace:DEFAULT_NAMESPACE}))},[S,O])}const ye=20;function Ze(S,O){var Fe,Le;const U=(Fe=O==null?void 0:O.type)==null?void 0:Fe.toLocaleLowerCase("en-US"),G=(Le=O==null?void 0:O.kind)==null?void 0:Le.toLocaleLowerCase("en-US"),X=(0,t.useApi)(c),{loading:k,value:fe,error:Se}=(0,Xe.default)(async()=>{var _e;const Me=(_e=S.relations)==null?void 0:_e.map(Ke=>({type:Ke.type,target:(0,i.of)(Ke.targetRef)})).filter(Ke=>(!U||Ke.type.toLocaleLowerCase("en-US")===U)&&(!G||Ke.target.kind===G));if(!Me)return[];const Ue=Object.values((0,L.groupBy)(Me,({target:Ke})=>`${Ke.kind}:${Ke.namespace}`.toLocaleLowerCase("en-US"))),Ve=[];for(const Ke of Ue)Ve.push({kind:Ke[0].target.kind,namespace:Ke[0].target.namespace,nameBatches:(0,L.chunk)(Ke.map(xt=>xt.target.name),ye)});return(await Promise.all(Ve.flatMap(Ke=>Ke.nameBatches.map(xt=>X.getEntities({filter:{kind:Ke.kind,"metadata.namespace":Ke.namespace,"metadata.name":xt}}))))).flatMap(Ke=>Ke.items)},[S,U,G]);return{entities:fe,loading:k,error:Se}}var xe=e(72164);function ze(S){return typeof S=="string"?S:(0,i.eE)(S)}function Q(){const S=(0,t.useApi)(m),O=(0,xe.Z)(S.starredEntitie$(),new Set),U=(0,o.useCallback)(X=>O.has(ze(X)),[O]),G=(0,o.useCallback)(X=>S.toggleStarred(ze(X)).then(),[S]);return{starredEntities:O,toggleStarredEntity:G,isStarredEntity:U}}function H(S){return typeof S=="string"?S:(0,i.eE)(S)}function w(S){const O=(0,t.useApi)(m),[U,G]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{const k=O.starredEntitie$().subscribe({next(fe){G(fe.has(H(S)))}});return()=>{k.unsubscribe()}},[S,O]),{toggleStarredEntity:(0,o.useCallback)(()=>O.toggleStarred(H(S)).then(),[S,O]),isStarredEntity:U}}async function se(S,O){const U=new Array,G=O.find(X=>X.startsWith("user:"));if(G){const X=await S.getEntityByRef((0,i.of)(G));if(X){const k=We(X,i.hr,{kind:"Group"});for(const fe of k)U.push((0,i.eE)(fe))}}return U}function me(){const S=(0,t.useApi)(t.identityApiRef),O=(0,t.useApi)(c),{loading:U,value:G}=(0,Xe.default)(async()=>{const{ownershipEntityRefs:k}=await S.getBackstageIdentity(),fe=await se(O,k);return new Set([...k,...fe])},[]),X=(0,o.useMemo)(()=>{const k=new Set(G!=null?G:[]);return fe=>{const Se=We(fe,i.S4).map(i.eE);for(const Fe of Se)if(k.has(Fe))return!0;return!1}},[G]);return(0,o.useMemo)(()=>({loading:U,isOwnedEntity:X}),[U,X])}function Ae(S){const O=useApi(identityApiRef),U=useApi(catalogApiRef),{loading:G,value:X}=useAsync(async()=>{const Se=(await O.getBackstageIdentity()).ownershipEntityRefs,Fe=await loadCatalogOwnerRefs(U,Se);return await U.getEntities(S?{filter:{kind:S,[`relations.${RELATION_OWNED_BY}`]:[...Se,...Fe]}}:{filter:{[`relations.${RELATION_OWNED_BY}`]:[...Se,...Fe]}})},[]),k=useMemo(()=>X,[X]);return useMemo(()=>({loading:G,ownedEntities:k}),[G,k])}var Te=e(20221);function Oe(S){const{entity:O,loading:U,error:G}=D(),{allowed:X,loading:k,error:fe}=(0,Te.gI)(S,O?(0,i.eE)(O):void 0);return U||k?{loading:!0,allowed:!1}:G?{loading:!1,allowed:!1,error:G}:{loading:!1,allowed:X,error:fe}}const yt=S=>{var fe;const{initialFilter:O,hidden:U}=S,{updateFilters:G,queryParameters:X}=useEntityList(),[k]=useState((fe=[X.kind].flat()[0])!=null?fe:O);return useEffect(()=>{G({kind:k?new EntityKindFilter(k):void 0})},[k,G]),U?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var lt=e(79692),at=e(95544),$=e(90436),x=e(5806),b=e(21324),u=e(86619),y=e(19996),P=e(25505),F=e(38016),_=e(88013);const te=(0,lt.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),re=o.createElement(P.Z,{fontSize:"small"}),le=o.createElement(y.Z,{fontSize:"small"}),ge=()=>{var Le,Me;const S=te(),{updateFilters:O,backendEntities:U,filters:G,queryParameters:X}=rt(),k=(0,o.useMemo)(()=>[X.lifecycles].flat().filter(Boolean),[X]),[fe,Se]=(0,o.useState)(k.length?k:(Me=(Le=G.lifecycles)==null?void 0:Le.values)!=null?Me:[]);(0,o.useEffect)(()=>{k.length&&Se(k)},[k]),(0,o.useEffect)(()=>{O({lifecycles:fe.length?new q(fe):void 0})},[fe,O]);const Fe=(0,o.useMemo)(()=>[...new Set(U.map(Ue=>{var Ve;return(Ve=Ue.spec)==null?void 0:Ve.lifecycle}).filter(Boolean))].sort(),[U]);return Fe.length?o.createElement(at.Z,{pb:1,pt:1},o.createElement($.Z,{variant:"button"},"Lifecycle"),o.createElement(_.ZP,{"aria-label":"Lifecycle",multiple:!0,options:Fe,value:fe,onChange:(Ue,Ve)=>Se(Ve),renderOption:(Ue,{selected:Ve})=>o.createElement(x.Z,{control:o.createElement(b.Z,{icon:re,checkedIcon:le,checked:Ve}),label:Ue}),size:"small",popupIcon:o.createElement(F.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:Ue=>o.createElement(u.Z,{...Ue,className:S.input,variant:"outlined"})})):null},Ne=(0,lt.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),Pe=o.createElement(P.Z,{fontSize:"small"}),$e=o.createElement(y.Z,{fontSize:"small"}),Ge=()=>{var Le,Me;const S=Ne(),{updateFilters:O,backendEntities:U,filters:G,queryParameters:X}=rt(),k=(0,o.useMemo)(()=>[X.owners].flat().filter(Boolean),[X]),[fe,Se]=(0,o.useState)(k.length?k:(Me=(Le=G.owners)==null?void 0:Le.values)!=null?Me:[]);(0,o.useEffect)(()=>{k.length&&Se(k)},[k]),(0,o.useEffect)(()=>{O({owners:fe.length?new vt(fe):void 0})},[fe,O]);const Fe=(0,o.useMemo)(()=>[...new Set(U.flatMap(Ue=>We(Ue,i.S4).map(Ve=>st(Ve,{defaultKind:"group"}))).filter(Boolean))].sort(),[U]);return Fe.length?o.createElement(at.Z,{pb:1,pt:1},o.createElement($.Z,{variant:"button"},"Owner"),o.createElement(_.ZP,{multiple:!0,"aria-label":"Owner",options:Fe,value:fe,onChange:(Ue,Ve)=>Se(Ve),renderOption:(Ue,{selected:Ve})=>o.createElement(x.Z,{control:o.createElement(b.Z,{icon:Pe,checkedIcon:$e,checked:Ve}),label:Ue}),size:"small",popupIcon:o.createElement(F.Z,{"data-testid":"owner-picker-expand"}),renderInput:Ue=>o.createElement(u.Z,{...Ue,className:S.input,variant:"outlined"})})):null},At=(0,lt.Z)(S=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),qe=()=>{var k,fe;const S=At(),{filters:O,updateFilters:U}=useEntityList(),[G,X]=useState((fe=(k=O.text)==null?void 0:k.value)!=null?fe:"");return useDebounce(()=>{U({text:G.length?new EntityTextFilter(G):void 0})},250,[G,U]),React.createElement(Toolbar,{className:S.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{id:"input-with-icon-adornment",className:S.input,placeholder:"Search",autoComplete:"off",onChange:Se=>X(Se.target.value),value:G,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>X(""),edge:"end",disabled:G.length===0},React.createElement(Clear,null)))})))},Et=Object.freeze({createEntityRefColumn(S){const{defaultKind:O}=S;function U(G){var X;return((X=G.metadata)==null?void 0:X.title)||st(G,{defaultKind:O})}return{title:"Name",highlight:!0,customFilterAndSearch(G,X){return U(X).includes(G)},customSort(G,X){return U(G).localeCompare(U(X))},render:G=>{var X;return o.createElement(mt,{entityRef:G,defaultKind:O,title:(X=G.metadata)==null?void 0:X.title})}}},createEntityRelationColumn({title:S,relation:O,defaultKind:U,filter:G}){function X(fe){return We(fe,O,G)}function k(fe){return X(fe).map(Se=>st(Se,{defaultKind:U})).join(", ")}return{title:S,customFilterAndSearch(fe,Se){return k(Se).includes(fe)},customSort(fe,Se){return k(fe).localeCompare(k(Se))},render:fe=>o.createElement(Be,{entityRefs:X(fe),defaultKind:U})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:i.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:i.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:i.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:S=>o.createElement(et.OverflowTooltip,{text:S.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),$t=[Et.createEntityRefColumn({defaultKind:"system"}),Et.createDomainColumn(),Et.createOwnerColumn(),Et.createMetadataDescriptionColumn()],wt=[Et.createEntityRefColumn({defaultKind:"component"}),Et.createSystemColumn(),Et.createOwnerColumn(),Et.createSpecTypeColumn(),Et.createSpecLifecycleColumn(),Et.createMetadataDescriptionColumn()],gt=(0,lt.Z)(S=>({empty:{padding:S.spacing(2),display:"flex",justifyContent:"center"}})),Tt=S=>{const{entities:O,title:U,emptyContent:G,variant:X="gridItem",columns:k}=S,fe=gt(),Se={minWidth:"0",width:"100%"};return X==="gridItem"&&(Se.height="calc(100% - 10px)"),o.createElement(et.Table,{columns:k,title:U,style:Se,emptyContent:G&&o.createElement("div",{className:fe.empty},G),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:O})};Tt.columns=Et,Tt.systemEntityColumns=$t,Tt.componentEntityColumns=wt;const Ht=(0,lt.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),qt=o.createElement(P.Z,{fontSize:"small"}),Y=o.createElement(y.Z,{fontSize:"small"}),Ee=()=>{var Le,Me;const S=Ht(),{updateFilters:O,backendEntities:U,filters:G,queryParameters:X}=rt(),k=(0,o.useMemo)(()=>[X.tags].flat().filter(Boolean),[X]),[fe,Se]=(0,o.useState)(k.length?k:(Me=(Le=G.tags)==null?void 0:Le.values)!=null?Me:[]);(0,o.useEffect)(()=>{k.length&&Se(k)},[k]),(0,o.useEffect)(()=>{O({tags:fe.length?new Ct(fe):void 0})},[fe,O]);const Fe=(0,o.useMemo)(()=>[...new Set(U.flatMap(Ue=>Ue.metadata.tags).filter(Boolean))].sort(),[U]);return Fe.length?o.createElement(at.Z,{pb:1,pt:1},o.createElement($.Z,{variant:"button"},"Tags"),o.createElement(_.ZP,{multiple:!0,"aria-label":"Tags",options:Fe,value:fe,onChange:(Ue,Ve)=>Se(Ve),renderOption:(Ue,{selected:Ve})=>o.createElement(x.Z,{control:o.createElement(b.Z,{icon:qt,checkedIcon:Y,checked:Ve}),label:Ue}),size:"small",popupIcon:o.createElement(F.Z,{"data-testid":"tag-picker-expand"}),renderInput:Ue=>o.createElement(u.Z,{...Ue,className:S.input,variant:"outlined"})})):null};var be=e(82108),It=e.n(be);const Bt=S=>{var Le;const{hidden:O,initialFilter:U}=S,G=(0,t.useApi)(t.alertApiRef),{error:X,availableTypes:k,selectedTypes:fe,setSelectedTypes:Se}=ne();if((0,o.useEffect)(()=>{X&&G.post({message:"Failed to load entity types",severity:"error"}),U&&Se([U])},[X,G,U,Se]),k.length===0||X)return null;const Fe=[{value:"all",label:"All"},...k.map(Me=>({value:Me,label:It()(Me)}))];return O?null:o.createElement(at.Z,{pb:1,pt:1},o.createElement(et.Select,{label:"Type",items:Fe,selected:(Le=Fe.length>1?fe[0]:void 0)!=null?Le:"all",onChange:Me=>Se(Me==="all"?[]:[String(Me)])}))};var an=e(15459),In=e(61837),_n=e(11640),Sr=e(28347);const Cr=(0,an.Z)({root:{color:"#f3ba37"}})(_n.Z),io=S=>S?"Remove from favorites":"Add to favorites",er=S=>S?React.createElement(Cr,null):React.createElement(StarBorder,null),Tr=S=>{const{toggleStarredEntity:O,isStarredEntity:U}=w(S.entity);return o.createElement(In.Z,{color:"inherit",...S,onClick:()=>O()},o.createElement(St.ZP,{title:U?"Remove from favorites":"Add to favorites"},U?o.createElement(Cr,null):o.createElement(Sr.Z,null)))};var tr=e(8629),Pr=e(79249),nr=e(38724),ua=e(99152),Ln=e(6487),rr=e(49429),pn=e(77277),Mt=e(55999),Ir=e(72779),Fn=e.n(Ir),Lr=e(39412);const Bn=Lr.Z;function xr(S,O){if(S)return S.toLocaleLowerCase("en-US");if(O)try{return(0,i.of)(O).kind.toLocaleLowerCase("en-US")}catch{return}}function br(S,O){const U=(0,t.useApp)(),G=xr(S,O);return G&&U.getSystemIcon(`kind:${G}`)||Bn}function zn(S){const{kind:O,entityRef:U,...G}=S,X=br(O,U);return o.createElement(X,{...G})}const da=(0,lt.Z)(S=>({node:{fill:S.palette.grey[300],stroke:S.palette.grey[300],"&.primary":{fill:S.palette.primary.light,stroke:S.palette.primary.light},"&.secondary":{fill:S.palette.secondary.light,stroke:S.palette.secondary.light}},text:{fill:S.palette.getContrastText(S.palette.grey[300]),"&.primary":{fill:S.palette.primary.contrastText},"&.secondary":{fill:S.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function Or(S){const O=(0,t.useApi)(c),U=(0,i.eE)(S),{loading:G,error:X,value:k}=(0,Xe.default)(async()=>{const fe=await O.getEntityAncestors({entityRef:U}),Se=new Array,Fe=new Array;for(const Le of fe.items){const Me=(0,i.eE)(Le.entity),Ue=Me===fe.rootEntityRef;Se.push({id:Me,root:Ue,...Le.entity});for(const Ve of Le.parentEntityRefs)Fe.push({from:Me,to:Ve})}return{nodes:Se,edges:Fe}},[U]);return{loading:G,error:X,nodes:(k==null?void 0:k.nodes)||[],edges:(k==null?void 0:k.edges)||[]}}function fa({node:S}){const O=da(),U=(0,K.s0)(),G=(0,t.useRouteRef)(E),[X,k]=(0,o.useState)(0),[fe,Se]=(0,o.useState)(0),Fe=(0,o.useRef)(null);(0,o.useLayoutEffect)(()=>{if(Fe.current){let{height:xt,width:Zt}=Fe.current.getBBox();xt=Math.round(xt),Zt=Math.round(Zt),(xt!==fe||Zt!==X)&&(k(Zt),Se(xt))}},[X,fe]);const Le=10,Me=fe,Ue=Me+Le,Ve=Ue+X+Le*2,Rt=fe+Le*2,_e=S.metadata.title||(S.kind&&S.metadata.name&&S.metadata.namespace?st({kind:S.kind,name:S.metadata.name,namespace:S.metadata.namespace||""}):S.id),Ke=()=>{U(G({kind:S.kind,namespace:S.metadata.namespace||i.zG,name:S.metadata.name}))};return o.createElement("g",{onClick:Ke,className:O.clickable},o.createElement("rect",{className:Fn()(O.node,S.root?"secondary":"primary"),width:Ve,height:Rt,rx:10}),o.createElement(zn,{kind:S.kind,y:Le,x:Le,width:Me,height:Me,className:Fn()(O.text,S.root?"secondary":"primary")}),o.createElement("text",{ref:Fe,className:Fn()(O.text,S.root?"secondary":"primary"),y:Rt/2,x:Ue+(X+Le*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},_e))}function Dr(S){const{loading:O,error:U,nodes:G,edges:X}=Or(S.entity);return O?o.createElement(et.Progress,null):U?o.createElement(et.ResponseErrorPanel,{error:U}):o.createElement(o.Fragment,null,o.createElement(Mt.Z,{variant:"h2"},"Ancestry"),o.createElement(Mt.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(et.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(at.Z,{mt:4},o.createElement(et.DependencyGraph,{nodes:G,edges:X,renderNode:fa,direction:et.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var An=e(11776),dn=e(38402),xn=e(86136),Wn=e(99688),ar=e(49378),Fr=e(54506),or=e(94339),ma=e(24579),Br=e(27685);const sr=(0,lt.Z)(S=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:S.spacing(2)},helpIcon:{marginLeft:S.spacing(1),color:S.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function fn(S){const O=sr();return o.createElement(ar.Z,{...S,primaryTypographyProps:{className:O.monospace},secondaryTypographyProps:{className:O.monospace}})}function Mn(S){const O=sr();return o.createElement(Fr.Z,{className:O.monospace},S.children)}function Zn(S){return o.createElement(at.Z,{mt:2},o.createElement(or.Z,{variant:"outlined"},o.createElement(ma.Z,null,o.createElement($.Z,{variant:"h6",gutterBottom:!0},S.title,S.helpLink&&o.createElement(Vn,{to:S.helpLink})),S.children)))}function Hn(S){const[O,U]=S.entry;return o.createElement(dn.Z,null,S.indent&&o.createElement(xn.Z,null),o.createElement(fn,{primary:O,secondary:U.match(/^url:https?:\/\//)?o.createElement(o.Fragment,null,U.substring(0,4),o.createElement(et.Link,{to:U.substring(4)},U.substring(4))):U}))}function Vn(S){const O=sr();return o.createElement(et.Link,{to:S.to,className:O.helpIcon},o.createElement(Br.Z,{fontSize:"inherit"}))}const Mr=(0,lt.Z)({root:{display:"flex",flexDirection:"column"}});function Zr(S){var Fe,Le;const O=(0,t.useApi)(c),U=(0,i.eE)(S),G=(Fe=S.metadata.annotations)==null?void 0:Fe[i.P1],X=(Le=S.metadata.annotations)==null?void 0:Le[i.q1],{loading:k,error:fe,value:Se}=(0,Xe.default)(async()=>!G&&!X?[]:(await O.getEntities({filter:[...G?[{[`metadata.annotations.${i.P1}`]:G}]:[],...X?[{[`metadata.annotations.${i.q1}`]:X}]:[]]})).items,[G,X]);return{loading:k,error:fe,location:G,originLocation:X,colocatedEntities:Se==null?void 0:Se.filter(Me=>(0,i.eE)(Me)!==U)}}function jn(S){return o.createElement(An.Z,{dense:!0},S.header&&o.createElement(Hn,{key:"header",entry:S.header}),S.entities.map(O=>o.createElement(dn.Z,{key:(0,i.eE)(O)},o.createElement(xn.Z,null,o.createElement(zn,{kind:O.kind})),o.createElement(fn,{primary:o.createElement(mt,{entityRef:O})}))))}function ir(S){const{entity:O}=S,{loading:U,error:G,location:X,originLocation:k,colocatedEntities:fe}=Zr(O);if(U)return o.createElement(et.Progress,null);if(G)return o.createElement(et.ResponseErrorPanel,{error:G});if(!X&&!k)return o.createElement(Wn.Z,{severity:"warning"},"Entity had no location information.");if(!(fe==null?void 0:fe.length))return o.createElement(Wn.Z,{severity:"info"},"There were no other entities on this location.");if(X===k)return o.createElement(jn,{entities:fe});const Se=fe.filter(Le=>{var Me;return((Me=Le.metadata.annotations)==null?void 0:Me[i.P1])===X}),Fe=fe.filter(Le=>{var Me;return((Me=Le.metadata.annotations)==null?void 0:Me[i.q1])===k});return o.createElement(o.Fragment,null,Se.length>0&&o.createElement(jn,{entities:Se,header:["At the same location",X]}),Fe.length>0&&o.createElement(jn,{entities:Fe,header:["At the same origin",k]}))}function Nr(S){const O=Mr();return o.createElement(o.Fragment,null,o.createElement(Mt.Z,{variant:"h2"},"Colocated"),o.createElement(Mt.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:O.root},o.createElement(ir,{entity:S.entity})))}function Gn(S){return Object.fromEntries([...Object.entries(S)].sort((O,U)=>O[0]<U[0]?-1:1))}function Xt(S){return o.createElement(o.Fragment,null,o.createElement(Mt.Z,{variant:"h2"},"Entity as JSON"),o.createElement(Mt.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),o.createElement(Mt.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(et.CodeSnippet,{text:JSON.stringify(Gn(S.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var yn=e(3440),$r=e.n(yn);const Ur=(0,lt.Z)({root:{display:"flex",flexDirection:"column"}});function wr(S){var Le,Me;const O=Ur(),{apiVersion:U,kind:G,metadata:X,spec:k,relations:fe=[],status:Se={}}=S.entity,Fe=$r()(pt()(fe,Ue=>Ue.targetRef),"type");return o.createElement(o.Fragment,null,o.createElement(Mt.Z,{variant:"h2"},"Overview"),o.createElement("div",{className:O.root},o.createElement(Zn,{title:"Identity"},o.createElement(An.Z,{dense:!0},o.createElement(dn.Z,null,o.createElement(fn,{primary:"apiVersion",secondary:U})),o.createElement(dn.Z,null,o.createElement(fn,{primary:"kind",secondary:G})),(k==null?void 0:k.type)&&o.createElement(dn.Z,null,o.createElement(fn,{primary:"spec.type",secondary:k.type})),X.uid&&o.createElement(dn.Z,null,o.createElement(fn,{primary:"uid",secondary:X.uid})),X.etag&&o.createElement(dn.Z,null,o.createElement(fn,{primary:"etag",secondary:X.etag})))),o.createElement(Zn,{title:"Metadata"},!!Object.keys(X.annotations||{}).length&&o.createElement(An.Z,{dense:!0,subheader:o.createElement(Mn,null,"Annotations",o.createElement(Vn,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(X.annotations).map(Ue=>o.createElement(Hn,{key:Ue[0],indent:!0,entry:Ue}))),!!Object.keys(X.labels||{}).length&&o.createElement(An.Z,{dense:!0,subheader:o.createElement(Mn,null,"Labels",o.createElement(Vn,{to:"https://backstage.io/docs/features/software-catalog/well-known-labels"}))},Object.entries(X.labels).map(Ue=>o.createElement(Hn,{key:Ue[0],indent:!0,entry:Ue}))),!!((Le=X.tags)==null?void 0:Le.length)&&o.createElement(An.Z,{dense:!0,subheader:o.createElement(Mn,null,"Tags")},X.tags.map((Ue,Ve)=>o.createElement(dn.Z,{key:`${Ue}-${Ve}`},o.createElement(xn.Z,null),o.createElement(fn,{primary:Ue}))))),!!fe.length&&o.createElement(Zn,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Fe).map(([Ue,Ve],Rt)=>o.createElement("div",{key:Rt},o.createElement(An.Z,{dense:!0,subheader:o.createElement(Mn,null,Ue)},Ve.map(_e=>o.createElement(dn.Z,{key:_e.targetRef},o.createElement(xn.Z,null,o.createElement(zn,{entityRef:_e.targetRef})),o.createElement(fn,{primary:o.createElement(mt,{entityRef:_e.targetRef})}))))))),!!((Me=Se.items)==null?void 0:Me.length)&&o.createElement(Zn,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},Se.items.map((Ue,Ve)=>o.createElement("div",{key:Ve},o.createElement($.Z,null,Ue.level,": ",Ue.type),o.createElement(at.Z,{ml:2},Ue.message))))))}var zr=e(60155),Wr=e.n(zr);function Hr(S){return o.createElement(o.Fragment,null,o.createElement(Mt.Z,{variant:"h2"},"Entity as YAML"),o.createElement(Mt.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),o.createElement(Mt.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(et.CodeSnippet,{text:Wr().stringify(Gn(S.entity)),language:"yaml",showCopyCodeButton:!0}))))}const lr=(0,lt.Z)(S=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:S.palette.background.paper},tabs:{borderRight:`1px solid ${S.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function Cn(S){const{children:O,value:U,index:G,...X}=S,k=lr();return o.createElement("div",{role:"tabpanel",hidden:U!==G,id:`vertical-tabpanel-${G}`,"aria-labelledby":`vertical-tab-${G}`,className:k.tabContents,...X},U===G&&o.createElement(at.Z,{pl:3,pr:3},O))}function En(S){return{id:`vertical-tab-${S}`,"aria-controls":`vertical-tabpanel-${S}`}}function ha(S){const O=lr(),[U,G]=o.useState(0);return(0,o.useEffect)(()=>{G(0)},[S.open]),S.entity?o.createElement(tr.Z,{fullWidth:!0,maxWidth:"xl",open:S.open,onClose:S.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:O.fullHeightDialog}},o.createElement(Pr.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),o.createElement(nr.Z,{dividers:!0},o.createElement("div",{className:O.root},o.createElement(ua.Z,{orientation:"vertical",variant:"scrollable",value:U,onChange:(X,k)=>G(k),"aria-label":"Inspector options",className:O.tabs},o.createElement(Ln.Z,{label:"Overview",...En(0)}),o.createElement(Ln.Z,{label:"Ancestry",...En(1)}),o.createElement(Ln.Z,{label:"Colocated",...En(2)}),o.createElement(Ln.Z,{label:"Raw JSON",...En(3)}),o.createElement(Ln.Z,{label:"Raw YAML",...En(4)})),o.createElement(Cn,{value:U,index:0},o.createElement(wr,{entity:S.entity})),o.createElement(Cn,{value:U,index:1},o.createElement(Dr,{entity:S.entity})),o.createElement(Cn,{value:U,index:2},o.createElement(Nr,{entity:S.entity})),o.createElement(Cn,{value:U,index:3},o.createElement(Xt,{entity:S.entity})),o.createElement(Cn,{value:U,index:4},o.createElement(Hr,{entity:S.entity})))),o.createElement(rr.Z,null,o.createElement(pn.Z,{onClick:S.onClose,color:"primary"},"Close"))):null}var Vr=e(85256);function cr(S){var Rt;const O=(0,t.useApi)(c),U=(Rt=S.metadata.annotations)==null?void 0:Rt[i.q1],G=S.metadata.uid,X=U==="bootstrap:bootstrap",k=(0,Xe.default)(async()=>{const _e=O.getLocationByRef(U);let Ke;if(!U)Ke=Promise.resolve([]);else{const xt=`metadata.annotations.${i.q1}`;Ke=O.getEntities({filter:{[xt]:U},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(Zt=>Zt.items)}return Promise.all([_e,Ke]).then(([xt,Zt])=>({location:xt,colocatedEntities:Zt}))},[O,S]),fe=(0,o.useCallback)(async function(){const{location:Ke,colocatedEntities:xt}=k.value;await O.removeLocationById(Ke.id),await Promise.allSettled(xt.map(Zt=>O.removeEntityByUid(Zt.metadata.uid)))},[O,k]),Se=(0,o.useCallback)(async function(){await O.removeEntityByUid(G)},[O,G]);if(X)return{type:"bootstrap",location:U,deleteEntity:Se};const{loading:Fe,error:Le,value:Me}=k;if(Fe)return{type:"loading"};if(Le)return{type:"error",error:Le};const{location:Ue,colocatedEntities:Ve}=Me;return Ue?{type:"unregister",location:U,colocatedEntities:Ve.map(i.iB),unregisterLocation:fe,deleteEntity:Se}:{type:"only-delete",deleteEntity:Se}}var ur=e(10179);const ga=(0,lt.Z)({advancedButton:{fontSize:"0.7em"}}),jr=({entity:S,onConfirm:O})=>{var Rt;const U=(0,t.useApi)(t.alertApiRef),G=(0,t.useApi)(t.configApiRef),X=ga(),k=cr(S),[fe,Se]=(0,o.useState)(!1),[Fe,Le]=(0,o.useState)(!1),Me=(Rt=G.getOptionalString("app.title"))!=null?Rt:"Backstage",Ue=(0,o.useCallback)(async function(){if("unregisterLocation"in k){Le(!0);try{await k.unregisterLocation(),O()}catch(Ke){(0,ur.BD)(Ke),U.post({message:Ke.message})}finally{Le(!1)}}},[U,O,k]),Ve=(0,o.useCallback)(async function(){if("deleteEntity"in k){Le(!0);try{await k.deleteEntity(),O()}catch(Ke){(0,ur.BD)(Ke),U.post({message:Ke.message})}finally{Le(!1)}}},[U,O,k]);return k.type==="loading"?o.createElement(et.Progress,null):k.type==="error"?o.createElement(et.ResponseErrorPanel,{error:k.error}):k.type==="bootstrap"?o.createElement(o.Fragment,null,o.createElement(Wn.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',k.location,'"). If you believe this is in error, please contact the ',Me," ","integrator."),o.createElement(at.Z,{marginTop:2},!fe&&o.createElement(pn.Z,{variant:"text",size:"small",color:"primary",className:X.advancedButton,onClick:()=>Se(!0)},"Advanced Options"),fe&&o.createElement(o.Fragment,null,o.createElement(Mt.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(pn.Z,{variant:"contained",color:"secondary",disabled:Fe,onClick:Ve},"Delete Entity")))):k.type==="only-delete"?o.createElement(o.Fragment,null,o.createElement(Mt.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(pn.Z,{variant:"contained",color:"secondary",disabled:Fe,onClick:Ve},"Delete Entity")):k.type==="unregister"?o.createElement(o.Fragment,null,o.createElement(Mt.Z,null,"This action will unregister the following entities:"),o.createElement(Mt.Z,{component:"ul"},k.colocatedEntities.map(_e=>o.createElement("li",{key:`${_e.kind}:${_e.namespace}/${_e.name}`},o.createElement(mt,{entityRef:_e})))),o.createElement(Mt.Z,null,"Located at the following location:"),o.createElement(Mt.Z,{component:"ul"},o.createElement("li",null,k.location)),o.createElement(Mt.Z,null,"To undo, just re-register the entity in ",Me,"."),o.createElement(at.Z,{marginTop:2},o.createElement(pn.Z,{variant:"contained",color:"secondary",disabled:Fe,onClick:Ue},"Unregister Location"),!fe&&o.createElement(at.Z,{component:"span",marginLeft:2},o.createElement(pn.Z,{variant:"text",size:"small",color:"primary",className:X.advancedButton,onClick:()=>Se(!0)},"Advanced Options"))),fe&&o.createElement(o.Fragment,null,o.createElement(at.Z,{paddingTop:4,paddingBottom:4},o.createElement(Vr.Z,null)),o.createElement(Mt.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(pn.Z,{variant:"contained",color:"secondary",disabled:Fe,onClick:Ve},"Delete Entity"))):o.createElement(Wn.Z,{severity:"error"},"Internal error: Unknown state")},pa=S=>{const{open:O,onConfirm:U,onClose:G,entity:X}=S;return o.createElement(tr.Z,{open:O,onClose:G},o.createElement(Pr.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),o.createElement(nr.Z,null,o.createElement(jr,{entity:X,onConfirm:U})),o.createElement(rr.Z,null,o.createElement(pn.Z,{onClick:G,color:"primary"},"Cancel")))};var ya=e(12231),Gr=e(9520),Kr=e(47603);const Yr=(0,lt.Z)(S=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:S.spacing(1,0,1,0)},title:{margin:S.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:S.palette.text.primary},menuItem:{minHeight:S.spacing(6)},groupWrapper:{margin:S.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Kn(S){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:Kr.Z},{id:"starred",label:"Starred",icon:_n.Z}]},{name:S!=null?S:"Company",items:[{id:"all",label:"All"}]}]}const Jr=S=>{var Xr;const{initialFilter:O,availableFilters:U}=S,G=Yr(),k=(Xr=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?Xr:"Company",{filters:fe,updateFilters:Se,backendEntities:Fe,queryParameters:Le,loading:Me}=rt(),Ue=["starred","all"],Ve=Kn(k).map(_t=>({..._t,items:_t.items.filter(({id:en})=>["group","user"].some(Jn=>Jn===Le.kind)?Ue.includes(en):!U||U.includes(en))})).filter(({items:_t})=>!!_t.length),{isStarredEntity:Rt}=Q(),{isOwnedEntity:_e,loading:Ke}=me(),xt=Me||Ke,Zt=(0,o.useMemo)(()=>new Z("owned",_e,Rt),[_e,Rt]),Rn=(0,o.useMemo)(()=>new Z("starred",_e,Rt),[_e,Rt]),Yt=(0,o.useMemo)(()=>[Le.user].flat()[0],[Le]),[Ft,vn]=(0,o.useState)(Yt!=null?Yt:O),on=(0,o.useMemo)(()=>Fe.filter(pe((0,L.compact)(Object.values({...fe,user:void 0})))),[fe,Fe]),Yn=(0,o.useMemo)(()=>({all:on.length,starred:on.filter(_t=>Rn.filterEntity(_t)).length,owned:on.filter(_t=>Zt.filterEntity(_t)).length}),[on,Rn,Zt]);return(0,o.useEffect)(()=>{Yt&&vn(Yt)},[Yt]),(0,o.useEffect)(()=>{!xt&&!!Ft&&Ft!=="all"&&Yn[Ft]===0&&vn("all")},[xt,Yn,Ft,vn]),(0,o.useEffect)(()=>{Se({user:Ft?new Z(Ft,_e,Rt):void 0})},[Ft,_e,Rt,Se]),o.createElement(or.Z,{className:G.root},Ve.map(_t=>o.createElement(o.Fragment,{key:_t.name},o.createElement($.Z,{variant:"subtitle2",className:G.title},_t.name),o.createElement(or.Z,{className:G.groupWrapper},o.createElement(An.Z,{disablePadding:!0,dense:!0},_t.items.map(en=>{var Jn,Qn;return o.createElement(ya.Z,{key:en.id,button:!0,divider:!0,onClick:()=>vn(en.id),selected:en.id===((Jn=fe.user)==null?void 0:Jn.value),className:G.menuItem,disabled:Yn[en.id]===0,"data-testid":`user-picker-${en.id}`},en.icon&&o.createElement(xn.Z,{className:G.listIcon},o.createElement(en.icon,{fontSize:"small"})),o.createElement(ar.Z,null,o.createElement($.Z,{variant:"body1"},en.label)),o.createElement(Gr.Z,null,(Qn=Yn[en.id])!=null?Qn:"-"))}))))))},Qr=({children:S,value:O})=>{var Se;const[U,G]=useState((Se=O==null?void 0:O.filters)!=null?Se:{}),X=useCallback(Fe=>{G(Le=>{const Me=typeof Fe=="function"?Fe(Le):Fe;return{...Le,...Me}})},[]),k=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),fe=useMemo(()=>{var Fe,Le,Me,Ue,Ve;return{entities:(Fe=O==null?void 0:O.entities)!=null?Fe:k.entities,backendEntities:(Le=O==null?void 0:O.backendEntities)!=null?Le:k.backendEntities,updateFilters:(Me=O==null?void 0:O.updateFilters)!=null?Me:X,filters:U,loading:(Ue=O==null?void 0:O.loading)!=null?Ue:!1,queryParameters:(Ve=O==null?void 0:O.queryParameters)!=null?Ve:k.queryParameters,error:O==null?void 0:O.error}},[O,k,U,X]);return React.createElement(EntityListContext.Provider,{value:fe},S)};var Ea=e(92787)},92787:function(){},39398:function(ee,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return ve},AboutContent:function(){return ce},AboutField:function(){return z}});var n=e(48023),t=e(9118),c=e(36964),m=e(36356),v=e(29663),l=e(79692),o=e(94339),h=e(32552),i=e(61837),E=e(85256),g=e(24579),R=e(52866),T=e(30254),N=e(27604),I=e(2784),j=e(47851),D=e(60905),C=e(90436),L=e(7089);const B=(0,l.Z)(De=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:De.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function z(De){const{label:pe,value:je,gridSizes:Je,children:We}=De,He=B(),Qe=(0,c.useElementFilter)(We,we=>we.getElements()),ot=Qe.length>0?Qe:I.createElement(C.Z,{variant:"body2",className:He.value},je||"unknown");return I.createElement(D.Z,{item:!0,...Je},I.createElement(C.Z,{variant:"subtitle2",className:He.label},pe),ot)}const K=(0,l.Z)({description:{wordBreak:"break-word"}});function ce(De){var ft,pt,Pt,st,et,St;const{entity:pe}=De,je=K(),Je=pe.kind.toLocaleLowerCase("en-US")==="system",We=pe.kind.toLocaleLowerCase("en-US")==="resource",He=pe.kind.toLocaleLowerCase("en-US")==="component",Qe=pe.kind.toLocaleLowerCase("en-US")==="api",ot=pe.kind.toLocaleLowerCase("en-US")==="template",we=pe.kind.toLocaleLowerCase("en-US")==="location",ke=pe.kind.toLocaleLowerCase("en-US")==="group",rt=(0,v.getEntityRelations)(pe,n.cz,{kind:"system"}),Xe=(0,v.getEntityRelations)(pe,n.cz,{kind:"component"}),ht=(0,v.getEntityRelations)(pe,n.cz,{kind:"domain"}),dt=(0,v.getEntityRelations)(pe,n.S4);return I.createElement(D.Z,{container:!0},I.createElement(z,{label:"Description",gridSizes:{xs:12}},I.createElement(C.Z,{variant:"body2",paragraph:!0,className:je.description},((ft=pe==null?void 0:pe.metadata)==null?void 0:ft.description)||"No description")),I.createElement(z,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},dt.length>0&&I.createElement(v.EntityRefLinks,{entityRefs:dt,defaultKind:"group"})),(Je||ht.length>0)&&I.createElement(z,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},ht.length>0&&I.createElement(v.EntityRefLinks,{entityRefs:ht,defaultKind:"domain"})),(Qe||He||We||rt.length>0)&&I.createElement(z,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},rt.length>0&&I.createElement(v.EntityRefLinks,{entityRefs:rt,defaultKind:"system"})),He&&Xe.length>0&&I.createElement(z,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},I.createElement(v.EntityRefLinks,{entityRefs:Xe,defaultKind:"component"})),(Qe||He||We||ot||ke||we||typeof((pt=pe==null?void 0:pe.spec)==null?void 0:pt.type)=="string")&&I.createElement(z,{label:"Type",value:(Pt=pe==null?void 0:pe.spec)==null?void 0:Pt.type,gridSizes:{xs:12,sm:6,lg:4}}),(Qe||He||typeof((st=pe==null?void 0:pe.spec)==null?void 0:st.lifecycle)=="string")&&I.createElement(z,{label:"Lifecycle",value:(et=pe==null?void 0:pe.spec)==null?void 0:et.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),I.createElement(z,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((St=pe==null?void 0:pe.metadata)==null?void 0:St.tags)||[]).map(mt=>I.createElement(L.Z,{key:mt,size:"small",label:mt}))))}const he=(0,l.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 ve(De){var st,et,St;const{variant:pe}=De,je=he(),{entity:Je}=(0,v.useEntity)(),We=(0,c.useApi)(m.q3),He=(0,c.useApi)(v.catalogApiRef),Qe=(0,c.useApi)(c.alertApiRef),ot=(0,c.useRouteRef)(j.jU),we=(0,v.getEntitySourceLocation)(Je,We),ke=(st=Je.metadata.annotations)==null?void 0:st[n.Tf],rt={label:"View Source",disabled:!we,icon:I.createElement(m.nW,{type:we==null?void 0:we.integrationType}),href:we==null?void 0:we.locationTargetUrl},Xe={label:"View TechDocs",disabled:!((et=Je.metadata.annotations)==null?void 0:et["backstage.io/techdocs-ref"])||!ot,icon:I.createElement(T.Z,null),href:ot&&ot({namespace:Je.metadata.namespace||n.zG,kind:Je.kind,name:Je.metadata.name})};let ht="";pe==="gridItem"?ht=je.gridItemCard:pe==="fullHeight"&&(ht=je.fullHeightCard);let dt="";pe==="gridItem"?dt=je.gridItemCardContent:pe==="fullHeight"&&(dt=je.fullHeightCardContent);const ft=(St=Je.metadata.annotations)==null?void 0:St[n.P1],pt=(ft==null?void 0:ft.startsWith("url:"))||(ft==null?void 0:ft.startsWith("file:")),Pt=(0,I.useCallback)(async()=>{await He.refreshEntity((0,n.eE)(Je)),Qe.post({message:"Refresh scheduled",severity:"info"})},[He,Qe,Je]);return I.createElement(o.Z,{className:ht},I.createElement(h.Z,{title:"About",action:I.createElement(I.Fragment,null,pt&&I.createElement(i.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Pt},I.createElement(R.Z,null)),I.createElement(i.Z,{component:t.Link,"aria-label":"Edit",disabled:!ke,title:"Edit Metadata",to:ke!=null?ke:"#"},I.createElement(N.Z,null))),subheader:I.createElement(t.HeaderIconLinkRow,{links:[rt,Xe]})}),I.createElement(E.Z,null),I.createElement(g.Z,{className:dt},I.createElement(ce,{entity:Je})))}},49782:function(ee,s,e){"use strict";e.d(s,{K:function(){return R}});var n=e(2784),t=e(79692),c=e(12420),m=e(97580),v=e(73698),l=e(74603),o=e(12231),h=e(29663),i=e(64279),E=e(36964);const g=(0,t.Z)(T=>(0,c.Z)({root:{...T.typography.h4}}));function R(T){var ce;const{initialFilter:N="component"}=T,I=g(),j=(0,E.useApi)(h.catalogApiRef),{value:D}=(0,i.default)(async()=>await j.getEntityFacets({facets:["kind"]}).then(he=>{var ve;return((ve=he.facets.kind)==null?void 0:ve.map(De=>De.value).sort())||[]})),{updateFilters:C,queryParameters:L}=(0,h.useEntityList)(),[B,z]=(0,n.useState)(((ce=[L.kind].flat()[0])!=null?ce:N).toLocaleLowerCase("en-US"));(0,n.useEffect)(()=>{C({kind:B?new h.EntityKindFilter(B):void 0})},[B,C]);const K=[(0,m.Z)(B)].concat(D!=null?D:[]).sort().reduce((he,ve)=>(he[ve.toLocaleLowerCase("en-US")]=ve,he),{});return n.createElement(v.Z,{input:n.createElement(l.Z,{value:B}),value:B,onChange:he=>z(he.target.value),classes:I},Object.keys(K).map(he=>n.createElement(o.Z,{value:he,key:he},`${K[he]}s`)))}},30097:function(ee,s,e){"use strict";e.d(s,{E:function(){return N}});var n=e(48023),t=e(29663),c=e(27604),m=e(2997),v=e(76635),l=e(2784),o=e(7089),h=e(9118);const i=Object.freeze({createNameColumn(I){function j(D){var C;return((C=D.metadata)==null?void 0:C.title)||(0,t.humanizeEntityRef)(D,{defaultKind:I==null?void 0:I.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:D},{entity:C}){return j(D).localeCompare(j(C))},render:({entity:D})=>{var C;return l.createElement(t.EntityRefLink,{entityRef:D,defaultKind:(I==null?void 0:I.defaultKind)||"Component",title:(C=D.metadata)==null?void 0:C.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:I})=>l.createElement(t.EntityRefLinks,{entityRefs:I.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:I})=>l.createElement(t.EntityRefLinks,{entityRefs:I.ownedByRelations,defaultKind:"group"})}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:I})=>l.createElement(h.OverflowTooltip,{text:I.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:I})=>l.createElement(l.Fragment,null,I.metadata.tags&&I.metadata.tags.map(j=>l.createElement(o.Z,{key:j,label:j,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}});var E=e(28347),g=e(15459),R=e(11640);const T=(0,g.Z)({root:{color:"#f3ba37"}})(R.Z),N=I=>{var He,Qe,ot;const{columns:j,actions:D}=I,{isStarredEntity:C,toggleStarredEntity:L}=(0,t.useStarredEntities)(),{loading:B,error:z,entities:K,filters:ce}=(0,t.useEntityList)(),he=(0,l.useMemo)(()=>{var we;return[i.createNameColumn({defaultKind:(we=ce.kind)==null?void 0:we.value}),i.createSystemColumn(),i.createOwnerColumn(),i.createSpecTypeColumn(),i.createSpecLifecycleColumn(),i.createMetadataDescriptionColumn(),i.createTagsColumn()]},[(He=ce.kind)==null?void 0:He.value]),ve=ce.type===void 0,De=(0,v.capitalize)((ot=(Qe=ce.user)==null?void 0:Qe.value)!=null?ot:"all");if(z)return l.createElement("div",null,l.createElement(h.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},l.createElement(h.CodeSnippet,{language:"text",text:z.toString()})));const pe=[({entity:we})=>{var rt;const ke=(rt=we.metadata.annotations)==null?void 0:rt[n.l2];return{icon:()=>l.createElement(m.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!ke,onClick:()=>{!ke||window.open(ke,"_blank")}}},({entity:we})=>{var rt;const ke=(rt=we.metadata.annotations)==null?void 0:rt[n.Tf];return{icon:()=>l.createElement(c.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!ke,onClick:()=>{!ke||window.open(ke,"_blank")}}},({entity:we})=>{const ke=C(we);return{cellStyle:{paddingLeft:"1em"},icon:()=>ke?l.createElement(T,null):l.createElement(E.Z,null),tooltip:ke?"Remove from favorites":"Add to favorites",onClick:()=>L(we)}}],je=K.map(we=>{const ke=(0,t.getEntityRelations)(we,n.cz,{kind:"system"}),rt=(0,t.getEntityRelations)(we,n.S4);return{entity:we,resolved:{name:(0,t.humanizeEntityRef)(we,{defaultKind:"Component"}),ownedByRelationsTitle:rt.map(Xe=>(0,t.humanizeEntityRef)(Xe,{defaultKind:"group"})).join(", "),ownedByRelations:rt,partOfSystemRelationTitle:ke.map(Xe=>(0,t.humanizeEntityRef)(Xe,{defaultKind:"system"})).join(", "),partOfSystemRelations:ke}}}),Je=(j||he).find(we=>we.title==="Type");Je&&(Je.hidden=!ve);const We=je.length>20;return l.createElement(h.Table,{isLoading:B,columns:j||he,options:{paging:We,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!B,padding:"dense",pageSizeOptions:[20,50,100]},title:`${De} (${K.length})`,data:je,actions:D||pe})};N.columns=i},26997:function(ee,s,e){"use strict";e.d(s,{Nz:function(){return R},Gh:function(){return g},q7:function(){return c}});var n=e(60905),t=e(2784);function c(T){return t.createElement(n.Z,{container:!0,style:{position:"relative"}},T.children)}var m=e(41156),v=e(60364),l=e(77277),o=e(4190),h=e(95544),i=e(90436),E=e(36444);function g(T){const N=(0,m.Z)(C=>C.breakpoints.down("md")),I=(0,v.Z)(),[j,D]=(0,t.useState)(!1);return N?t.createElement(t.Fragment,null,t.createElement(l.Z,{style:{marginTop:I.spacing(1),marginLeft:I.spacing(1)},onClick:()=>D(!0),startIcon:t.createElement(E.Z,null)},"Filters"),t.createElement(o.ZP,{open:j,onClose:()=>D(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},t.createElement(h.Z,{m:2},t.createElement(i.Z,{variant:"h6",component:"h2",style:{marginBottom:I.spacing(1)}},"Filters"),T.children))):t.createElement(n.Z,{item:!0,lg:2},T.children)}function R(T){return t.createElement(n.Z,{item:!0,xs:12,lg:10},T.children)}},92902:function(ee,s,e){"use strict";e.d(s,{CatalogEntityPage:function(){return se},EntityListContainer:function(){return Q.Nz},FilterContainer:function(){return Q.Gh},FilteredEntityLayout:function(){return Q.q7}});var n=e(82394),t=e.n(n),c=e(48023),m=e(76635);async function v({storageApi:u}){var te;const y=u.forBucket("settings"),P=u.forBucket("starredEntities"),F=y.snapshot("starredEntities").value;if(!(0,m.isArray)(F))return;const _=new Set((te=P.snapshot("entityRefs").value)!=null?te:[]);F.filter(m.isString).map(re=>re.split(":")).filter(re=>re.length===4&&re[0]==="entity").map(([re,le,ge,Ne])=>(0,c.eE)({kind:le,namespace:ge,name:Ne})).forEach(re=>_.add(re)),await P.set("entityRefs",Array.from(_)),await y.remove("starredEntities")}class l{constructor(y){oe(this,"settingsStore");oe(this,"starredEntities");oe(this,"subscribers",new Set);oe(this,"observable",new(t())(y=>(y.next(new Set(this.starredEntities)),this.subscribers.add(y),()=>{this.subscribers.delete(y)})));var P;v(y).then(),this.settingsStore=y.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((P=this.settingsStore.snapshot("entityRefs").value)!=null?P:[]),this.settingsStore.observe$("entityRefs").subscribe({next:F=>{var _;this.starredEntities=new Set((_=F.value)!=null?_:[]),this.notifyChanges()}})}async toggleStarred(y){this.starredEntities.has(y)?this.starredEntities.delete(y):this.starredEntities.add(y),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const y of this.subscribers)y.next(new Set(this.starredEntities))}}var o=e(39398),h=e(49782),i=e(2784),E=e(79692),g=e(9118);const R=(0,E.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function T(u){const y=u.result,P=R();return React.createElement(Link,{to:y.location},React.createElement(ListItem,{alignItems:"flex-start",className:P.flexContainer},React.createElement(ListItemText,{className:P.itemText,primaryTypographyProps:{variant:"h6"},primary:y.title,secondary:y.text}),React.createElement(Box,null,y.kind&&React.createElement(Chip,{label:`Kind: ${y.kind}`,size:"small"}),y.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${y.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))}const N=null;var I=e(30097),j=e(36964),D=e(29663),C=e(95544),L=e(99688),B=e(10289),z=e(12231),K=e(86136),ce=e(49378),he=e(85256),ve=e(61837),De=e(79784),pe=e(50758),je=e(49166),Je=e(31654),We=e(43054);const He="catalog-entity",Qe={name:"catalog.entity.read",attributes:{action:"read"},resourceType:He},ot={name:"catalog.entity.create",attributes:{action:"create"}},we={name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:He},ke={name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:He},rt={name:"catalog.location.read",attributes:{action:"read"}},Xe={name:"catalog.location.create",attributes:{action:"create"}},ht={name:"catalog.location.delete",attributes:{action:"delete"}},dt=(0,E.Z)({button:{color:"white"}});function ft(u){var At;const{UNSTABLE_extraContextMenuItems:y,UNSTABLE_contextMenuOptions:P,onUnregisterEntity:F,onInspectEntity:_}=u,[te,re]=(0,i.useState)(),le=dt(),ge=(0,D.useEntityPermission)(we),Ne=qe=>{re(qe.currentTarget)},Pe=()=>{re(void 0)},$e=y&&[...y.map(qe=>i.createElement(z.Z,{key:qe.title,onClick:()=>{Pe(),qe.onClick()}},i.createElement(K.Z,null,i.createElement(qe.Icon,{fontSize:"small"})),i.createElement(ce.Z,{primary:qe.title}))),i.createElement(he.Z,{key:"the divider is here!"})],Ge=(At=!ge.allowed||(P==null?void 0:P.disableUnregister))!=null?At:!1;return i.createElement(i.Fragment,null,i.createElement(ve.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:Ne,"data-testid":"menu-button",className:le.button},i.createElement(We.Z,null)),i.createElement(De.ZP,{open:Boolean(te),onClose:Pe,anchorEl:te,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},i.createElement(pe.Z,null,$e,i.createElement(z.Z,{onClick:()=>{Pe(),F()},disabled:Ge},i.createElement(K.Z,null,i.createElement(je.Z,{fontSize:"small"})),i.createElement(ce.Z,{primary:"Unregister entity"})),i.createElement(z.Z,{onClick:()=>{Pe(),_()}},i.createElement(K.Z,null,i.createElement(Je.Z,{fontSize:"small"})),i.createElement(ce.Z,{primary:"Inspect entity"})))))}const pt="plugin.catalog.entityLayoutRoute",Pt=()=>null;(0,j.attachComponentData)(Pt,pt,!0),(0,j.attachComponentData)(Pt,"core.gatherMountPoints",!0);function st(u){const{entity:y,title:P}=u;return i.createElement(C.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},i.createElement(C.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},P),y&&i.createElement(D.FavoriteEntity,{entity:y}))}function et(u,y,P,F){var le,ge,Ne,Pe,$e;const _=(le=u!=null?u:F==null?void 0:F.kind)!=null?le:"",te=(ge=y!=null?y:F==null?void 0:F.metadata.namespace)!=null?ge:"";return{headerTitle:`${($e=(Pe=(Ne=F==null?void 0:F.metadata.title)!=null?Ne:P)!=null?Pe:F==null?void 0:F.metadata.name)!=null?$e:""}${te&&te!==c.zG?` in ${te}`:""}`,headerType:(()=>{let Ge=_.toLocaleLowerCase("en-US");return F&&F.spec&&"type"in F.spec&&(Ge+=" \u2014 ",Ge+=F.spec.type.toLocaleLowerCase("en-US")),Ge})()}}function St(u){var F;const{entity:y}=u,P=(0,D.getEntityRelations)(y,c.S4);return i.createElement(i.Fragment,null,P.length>0&&i.createElement(g.HeaderLabel,{label:"Owner",value:i.createElement(D.EntityRefLinks,{entityRefs:P,defaultKind:"Group",color:"inherit"})}),((F=y.spec)==null?void 0:F.lifecycle)&&i.createElement(g.HeaderLabel,{label:"Lifecycle",value:y.spec.lifecycle}))}const mt=u=>{var Ht,qt,Y;const{UNSTABLE_extraContextMenuItems:y,UNSTABLE_contextMenuOptions:P,children:F}=u,{kind:_,namespace:te,name:re}=(0,D.useEntityCompoundName)(),{entity:le,loading:ge,error:Ne}=(0,D.useAsyncEntity)(),Pe=(0,B.TH)(),$e=(0,j.useElementFilter)(F,Ee=>Ee.selectByComponentData({key:pt,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:be})=>{if(le){if(be.if&&!be.if(le))return[]}else return[];return[{path:be.path,title:be.title,children:be.children,tabProps:be.tabProps}]}),[le]),{headerTitle:Ge,headerType:At}=et(_,te,re,le),[qe,Et]=(0,i.useState)(!1),[$t,wt]=(0,i.useState)(!1),gt=(0,B.s0)(),Tt=async()=>{Et(!1),wt(!1),gt("/")};return(0,i.useEffect)(()=>{Et(!1),wt(!1)},[Pe.pathname]),i.createElement(g.Page,{themeId:(Y=(qt=(Ht=le==null?void 0:le.spec)==null?void 0:Ht.type)==null?void 0:qt.toString())!=null?Y:"home"},i.createElement(g.Header,{title:i.createElement(st,{title:Ge,entity:le}),pageTitleOverride:Ge,type:At},le&&i.createElement(i.Fragment,null,i.createElement(St,{entity:le}),i.createElement(ft,{UNSTABLE_extraContextMenuItems:y,UNSTABLE_contextMenuOptions:P,onUnregisterEntity:()=>Et(!0),onInspectEntity:()=>wt(!0)}))),ge&&i.createElement(g.Progress,null),le&&i.createElement(g.RoutedTabs,{routes:$e}),Ne&&i.createElement(g.Content,null,i.createElement(L.Z,{severity:"error"},Ne.toString())),!ge&&!Ne&&!le&&i.createElement(g.Content,null,i.createElement(g.WarningPanel,{title:"Entity not found"},"There is no ",_," with the requested"," ",i.createElement(g.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),i.createElement(D.UnregisterEntityDialog,{open:qe,entity:le,onConfirm:Tt,onClose:()=>Et(!1)}),i.createElement(D.InspectEntityDialog,{open:$t,entity:le,onClose:()=>wt(!1)}))};mt.Route=Pt;var Be=e(10179);function ut(u){const{open:y,onClose:P,onConfirm:F,entity:_}=u,[te,re]=useState(!1),le=useApi(catalogApiRef),ge=useApi(alertApiRef),Ne=async()=>{re(!0);try{const Pe=_.metadata.uid;await le.removeEntityByUid(Pe),F()}catch(Pe){assertError(Pe),ge.post({message:Pe.message})}finally{re(!1)}};return React.createElement(Dialog,{open:y,onClose:P},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:te,onClick:Ne},"Delete"),React.createElement(Button,{onClick:P,color:"primary"},"Cancel")))}var tt=e(47851);function Ct(u){var y,P;return((P=(y=u==null?void 0:u.metadata)==null?void 0:y.annotations)==null?void 0:P["backstage.io/orphan"])==="true"}function it(){const u=useNavigate(),y=useRouteRef(rootRouteRef),[P,F]=useState(!1),{entity:_}=useEntity(),te=async()=>{F(!1),u(y())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>F(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:P,entity:_,onConfirm:te,onClose:()=>F(!1)}))}var vt=e(30001);const q=u=>u.error&&u.level==="error"&&u.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function Z(u,y){return{items:(await y.getEntityAncestors({entityRef:u})).items.map(_=>{var le,ge;return{errors:((ge=(le=_.entity.status)==null?void 0:le.items)!=null?ge:[]).filter(q).map(Ne=>Ne.error).filter(Ne=>Boolean(Ne)),entity:_.entity}}).filter(_=>_.errors.length>0)}}async function ne(u,y){const P=y.apis.get(catalogApiRef);if(!P)throw new Error(`No implementation available for ${catalogApiRef}`);return(await Z(stringifyEntityRef(u),P)).items.length>0}function de(){const{entity:u}=useEntity(),y=stringifyEntityRef(u),P=useApi(catalogApiRef),{loading:F,error:_,value:te}=useAsync(async()=>Z(y,P),[y,P]);return _?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:_})):F||!te?null:React.createElement(React.Fragment,null,te.items.map((re,le)=>React.createElement(Box,{key:le,mb:1},stringifyEntityRef(u)!==stringifyEntityRef(re.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:re.entity})),re.errors.map((ge,Ne)=>React.createElement(ResponseErrorPanel,{key:Ne,error:ge})))))}var ae=e(64279);const ye="core.backstage.entitySwitch",Ze=u=>null;(0,j.attachComponentData)(Ze,ye,!0);const xe=u=>{var te,re;const{entity:y}=(0,D.useAsyncEntity)(),P=(0,j.useApiHolder)(),F=(0,j.useElementFilter)(u.children,le=>le.selectByComponentData({key:ye,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(ge=>{var $e;if(!y)return[];const{if:Ne,children:Pe}=ge.props;return[{if:($e=Ne==null?void 0:Ne(y,{apis:P}))!=null?$e:!0,children:Pe}]}),[P,y]);return F.some(le=>typeof le.if=="object"&&"then"in le.if)?i.createElement(ze,{results:F}):(re=(te=F.find(le=>le.if))==null?void 0:te.children)!=null?re:null};function ze({results:u}){const{loading:y,value:P}=(0,ae.default)(async()=>{var _;const F=u.map(async({if:te,children:re})=>{try{if(await te)return re}catch{}return null});return(_=(await Promise.all(F)).find(Boolean))!=null?_:null},[u]);return y||!P?null:P}xe.Case=Ze;var Q=e(26997);const H=(0,j.createPlugin)({id:"catalog",apis:[(0,j.createApiFactory)({api:D.catalogApiRef,deps:{discoveryApi:j.discoveryApiRef,fetchApi:j.fetchApiRef},factory:({discoveryApi:u,fetchApi:y})=>new vt.MS({discoveryApi:u,fetchApi:y})}),(0,j.createApiFactory)({api:D.starredEntitiesApiRef,deps:{storageApi:j.storageApiRef},factory:({storageApi:u})=>new l({storageApi:u})})],routes:{catalogIndex:tt._Z,catalogEntity:D.entityRouteRef},externalRoutes:{createComponent:tt.yw,viewTechDoc:tt.jU}}),w=H.provide((0,j.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(u=>u.CatalogPage),mountPoint:tt._Z})),se=H.provide((0,j.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(u=>u.CatalogEntityPage),mountPoint:D.entityRouteRef})),me=H.provide((0,j.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(u=>u.AboutCard)}})),Ae=H.provide((0,j.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(u=>u.EntityLinksCard)}})),Te=H.provide((0,j.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(u=>u.HasSystemsCard)}})),Oe=H.provide((0,j.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(u=>u.HasComponentsCard)}})),yt=H.provide((0,j.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(u=>u.HasSubcomponentsCard)}})),lt=H.provide((0,j.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(u=>u.HasResourcesCard)}})),at=H.provide((0,j.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(u=>u.DependsOnComponentsCard)}})),$=H.provide((0,j.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(u=>u.DependencyOfComponentsCard)}})),x=H.provide((0,j.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(u=>u.DependsOnResourcesCard)}})),b=H.provide((0,j.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(u=>u.RelatedEntitiesCard)}}))},47851:function(ee,s,e){"use strict";e.d(s,{yw:function(){return t},jU:function(){return c},_Z:function(){return m}});var n=e(36964);const t=(0,n.createExternalRouteRef)({id:"create-component",optional:!0}),c=(0,n.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),m=(0,n.createRouteRef)({id:"catalog"})},20221:function(ee,s,e){"use strict";e.d(s,{iM:function(){return T},RV:function(){return c},gI:function(){return I}});var n=e(2784),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.permission.api"});var m;(function(D){const C="DENY";D.DENY=C;const L="ALLOW";D.ALLOW=L;const B="CONDITIONAL";D.CONDITIONAL=B})(m||(m={}));var v=e(10179),l=e(96279),o=e.n(l),h=e(9571),i=e(30195);const E=i.z.lazy(()=>i.z.object({rule:i.z.string(),params:i.z.array(i.z.unknown())}).strict().or(i.z.object({anyOf:i.z.array(E).nonempty()}).strict()).or(i.z.object({allOf:i.z.array(E).nonempty()}).strict()).or(i.z.object({not:E}).strict())),g=i.z.object({items:i.z.array(i.z.object({id:i.z.string(),result:i.z.literal(m.ALLOW).or(i.z.literal(m.DENY))}).or(i.z.object({id:i.z.string(),result:i.z.literal(m.CONDITIONAL),conditions:E})))});class R{constructor(C){oe(this,"enabled");oe(this,"discovery");var L;this.discovery=C.discovery,this.enabled=(L=C.config.getOptionalBoolean("permission.enabled"))!=null?L:!1}async authorize(C,L){if(!this.enabled)return C.map(ve=>({result:m.ALLOW}));const B={items:C.map(ve=>({id:h.Z(),...ve}))},z=await this.discovery.getBaseUrl("permission"),K=await o()(`${z}/authorize`,{method:"POST",body:JSON.stringify(B),headers:{...this.getAuthorizationHeader(L==null?void 0:L.token),"content-type":"application/json"}});if(!K.ok)throw await v.VL.fromResponse(K);const ce=await K.json();this.assertValidResponse(B,ce);const he=ce.items.reduce((ve,De)=>(ve[De.id]=De,ve),{});return B.items.map(ve=>he[ve.id])}getAuthorizationHeader(C){return C?{Authorization:`Bearer ${C}`}:{}}assertValidResponse(C,L){const z=g.parse(L).items.map(ce=>ce.id);if(!C.items.every(ce=>z.includes(ce.id)))throw new Error("Unexpected authorization response from permission-backend")}}class T{constructor(C,L){this.permissionClient=C,this.identityApi=L}static create(C){const{config:L,discovery:B,identity:z}=C,K=new R({discovery:B,config:L});return new T(K,z)}async authorize(C){return(await this.permissionClient.authorize([C],await this.identityApi.getCredentials()))[0]}}var N=e(49857);const I=(D,C)=>{const L=(0,t.useApi)(c),{data:B,error:z}=(0,N.ZP)({permission:D,resourceRef:C},async K=>{const{result:ce}=await L.authorize(K);return ce});return z?{error:z,loading:!1,allowed:!1}:B===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:B===m.ALLOW}},j=D=>{const{permission:C,resourceRef:L,errorComponent:B,...z}=D,K=usePermission(C,L),ce=useApp(),{NotFoundErrorPage:he}=ce.getComponents();let ve=B===void 0?React.createElement(he,null):B;return K.loading?ve=null:K.allowed&&(ve=D.element),React.createElement(Route,{...z,element:ve})}},91512:function(ee,s,e){"use strict";e.d(s,{g:function(){return v},w:function(){return l}});var n=e(36964),t=e(10179),c=e(19126),m=e.n(c);const v=(0,n.createApiRef)({id:"plugin.search.queryservice"});class l{constructor(h){oe(this,"discoveryApi");oe(this,"identityApi");this.discoveryApi=h.discoveryApi,this.identityApi=h.identityApi}async query(h){const{token:i}=await this.identityApi.getCredentials(),E=m().stringify(h),g=`${await this.discoveryApi.getBaseUrl("search/query")}?${E}`,R=await fetch(g,{headers:i?{Authorization:`Bearer ${i}`}:{}});if(!R.ok)throw await t.VL.fromResponse(R);return R.json()}}},19941:function(ee,s,e){"use strict";e.r(s),e.d(s,{DefaultResultListItem:function(){return E}});var n=e(2784),t=e(38402),c=e(86136),m=e(49378),v=e(95544),l=e(85256),o=e(9118),h=e(15277),i=e.n(h);const E=({result:g,icon:R,secondaryAction:T,lineClamp:N=5})=>n.createElement(o.Link,{to:g.location},n.createElement(t.Z,{alignItems:"center"},R&&n.createElement(c.Z,null,R),n.createElement(m.Z,{primaryTypographyProps:{variant:"h6"},primary:g.title,secondary:n.createElement(i(),{line:N,truncateText:"\u2026",text:g.text,element:"span"})}),T&&n.createElement(v.Z,{alignItems:"flex-end"},T)),n.createElement(l.Z,null))},1795:function(ee,s,e){"use strict";e.r(s),e.d(s,{SearchBar:function(){return T},SearchBarBase:function(){return R}});var n=e(2784),t=e(48760),c=e(36964),m=e(50581),v=e(61837),l=e(74603),o=e(21853),h=e(33375),i=e(22313);const E=({children:N})=>{const I=(0,c.useAnalytics)(),{term:j}=(0,i.Rx)();return(0,n.useEffect)(()=>{j&&I.captureEvent("search",j)},[I,j]),n.createElement(n.Fragment,null,N)},g=()=>(0,n.useContext)(i.ci)!==void 0,R=({onChange:N,onKeyDown:I,onSubmit:j,debounceTime:D=200,clearButton:C=!0,fullWidth:L=!0,value:B,inputProps:z={},endAdornment:K,...ce})=>{const he=(0,c.useApi)(c.configApiRef),[ve,De]=(0,n.useState)(B),pe=g();(0,n.useEffect)(()=>{De(ke=>ke!==B?B:ke)},[B]),(0,t.Z)(()=>N(ve),D,[ve]);const je=(0,n.useCallback)(ke=>{De(ke.target.value)},[De]),Je=(0,n.useCallback)(ke=>{I&&I(ke),j&&ke.key==="Enter"&&j()},[I,j]),We=(0,n.useCallback)(()=>{N("")},[N]),He=`Search in ${he.getOptionalString("app.title")||"Backstage"}`,Qe=n.createElement(m.Z,{position:"start"},n.createElement(v.Z,{"aria-label":"Query",disabled:!0},n.createElement(o.Z,null))),ot=n.createElement(m.Z,{position:"end"},n.createElement(v.Z,{"aria-label":"Clear",onClick:We},n.createElement(h.Z,null))),we=n.createElement(E,null,n.createElement(l.Z,{"data-testid":"search-bar-next",value:ve,placeholder:He,startAdornment:Qe,endAdornment:C?ot:K,inputProps:{"aria-label":"Search",...z},fullWidth:L,onChange:je,onKeyDown:Je,...ce}));return pe?we:n.createElement(i.Nd,null,we)},T=({onChange:N,...I})=>{const{term:j,setTerm:D}=(0,i.Rx)(),C=(0,n.useCallback)(L=>{N?N(L):D(L)},[N,D]);return n.createElement(R,{value:j,onChange:C,...I})}},22313:function(ee,s,e){"use strict";e.d(s,{ci:function(){return l},Nd:function(){return h},Rx:function(){return i}});var n=e(36964),t=e(2784),c=e(64279),m=e(1849),v=e(91512);const l=(0,t.createContext)(void 0),o={term:"",pageCursor:void 0,filters:{},types:[]},h=({initialState:E=o,children:g})=>{var je,Je,We,He;const R=(0,n.useApi)(v.g),[T,N]=(0,t.useState)(E.pageCursor),[I,j]=(0,t.useState)(E.filters),[D,C]=(0,t.useState)(E.term),[L,B]=(0,t.useState)(E.types),z=(0,m.Z)(D),K=(0,c.default)(()=>R.query({term:D,filters:I,pageCursor:T,types:L}),[D,I,L,T]),ce=!K.loading&&!K.error&&((je=K.value)==null?void 0:je.nextPageCursor),he=!K.loading&&!K.error&&((Je=K.value)==null?void 0:Je.previousPageCursor),ve=(0,t.useCallback)(()=>{var Qe;N((Qe=K.value)==null?void 0:Qe.nextPageCursor)},[(We=K.value)==null?void 0:We.nextPageCursor]),De=(0,t.useCallback)(()=>{var Qe;N((Qe=K.value)==null?void 0:Qe.previousPageCursor)},[(He=K.value)==null?void 0:He.previousPageCursor]);(0,t.useEffect)(()=>{D&&z&&D!==z&&N(void 0)},[D,z,E.pageCursor]);const pe={result:K,filters:I,setFilters:j,term:D,setTerm:C,types:L,setTypes:B,pageCursor:T,setPageCursor:N,fetchNextPage:ce?ve:void 0,fetchPreviousPage:he?De:void 0};return t.createElement(n.AnalyticsContext,{attributes:{searchTypes:L.sort().join(",")}},t.createElement(l.Provider,{value:pe,children:g}))},i=()=>{const E=(0,t.useContext)(l);if(E===void 0)throw new Error("useSearch must be used within a SearchContextProvider");return E}},73032:function(ee,s,e){"use strict";e.d(s,{s:function(){return ce},O:function(){return he}});var n=e(2784),t=e(60364),c=e(79249),m=e(27556),v=e(38724),l=e(60905),o=e(85256),h=e(11776),i=e(49429),E=e(8629),g=e(69001),R=e(79692),T=e(1795),N=e(19941),I=e(39332),j=e(22313),D=e(8542),C=e(36964),L=e(9118),B=e(20863);const z=(0,R.Z)(ve=>({container:{borderRadius:30,display:"flex",height:"2.4em"},input:{flex:1},paperFullWidth:{height:"calc(100% - 128px)"},dialogActionsContainer:{padding:ve.spacing(1,3)},viewResultsLink:{verticalAlign:"0.5em"}})),K=({toggleModal:ve})=>{const De=(0,C.useRouteRef)(B._Z),pe=z(),{term:je}=(0,j.Rx)(),{focusContent:Je}=(0,L.useContent)(),{transitions:We}=(0,t.Z)(),He=()=>{ve(),setTimeout(Je,We.duration.leavingScreen)},Qe=()=>{He()};return n.createElement(n.Fragment,null,n.createElement(c.Z,null,n.createElement(m.Z,{className:pe.container},n.createElement(T.SearchBar,{className:pe.input}))),n.createElement(v.Z,null,n.createElement(l.Z,{container:!0,direction:"row-reverse",justifyContent:"flex-start",alignItems:"center"},n.createElement(l.Z,{item:!0},n.createElement(L.Link,{onClick:()=>{ve(),setTimeout(Je,We.duration.leavingScreen)},to:`${De()}?query=${je}`},n.createElement("span",{className:pe.viewResultsLink},"View Full Results"),n.createElement(g.Z,{color:"primary"})))),n.createElement(o.Z,null),n.createElement(I.SearchResult,null,({results:ot})=>n.createElement(h.Z,null,ot.map(({document:we})=>n.createElement("div",{role:"button",tabIndex:0,key:`${we.location}-btn`,onClick:He,onKeyPress:Qe},n.createElement(N.DefaultResultListItem,{key:we.location,result:we})))))),n.createElement(i.Z,{className:pe.dialogActionsContainer},n.createElement(l.Z,{container:!0,direction:"row"},n.createElement(l.Z,{item:!0,xs:12},n.createElement(D.G,null)))))},ce=({open:ve=!0,hidden:De,toggleModal:pe})=>{const je=z();return n.createElement(E.Z,{classes:{paperFullWidth:je.paperFullWidth},onClose:pe,"aria-labelledby":"search-modal-title",fullWidth:!0,maxWidth:"lg",open:ve,hidden:De},ve&&n.createElement(j.Nd,null,n.createElement(K,{toggleModal:pe})))};function he(ve=!1){const[De,pe]=(0,n.useState)({hidden:!ve,open:ve}),je=(0,n.useCallback)(()=>pe(We=>({open:!0,hidden:!We.hidden})),[]),Je=(0,n.useCallback)(We=>pe(He=>({open:He.open||We,hidden:!We})),[]);return{state:De,toggleModal:je,setOpen:Je}}},3992:function(ee,s,e){"use strict";e.r(s),e.d(s,{SearchPage:function(){return mt}});var n=e(2784),t=e(1849),c=e(19126),m=e.n(c),v=e(10289),l=e(22313),o=e(60905),h=e(48760),i=e(79692),E=e(27556),g=e(74603),R=e(61837),T=e(21853),N=e(33375);const I=(0,i.Z)(()=>({root:{display:"flex",alignItems:"center"},input:{flex:1}})),j=({searchQuery:Be,handleSearch:ut,handleClearSearchBar:tt})=>{const Ct=I();return n.createElement(E.Z,{component:"form",onSubmit:it=>ut(it),className:Ct.root},n.createElement(R.Z,{disabled:!0,type:"submit","aria-label":"search"},n.createElement(T.Z,null)),n.createElement(g.Z,{className:Ct.input,placeholder:"Search in Backstage",value:Be,onChange:it=>ut(it),inputProps:{"aria-label":"search backstage"}}),n.createElement(R.Z,{"aria-label":"search",onClick:()=>tt()},n.createElement(N.Z,null)))};var D=e(85256),C=e(90436),L=e(99688),B=e(64279),z=e(29663),K=e(36444);const ce=(0,i.Z)(Be=>({filters:{width:"250px",display:"flex"},icon:{margin:Be.spacing(-1,0,0,0)}})),he=({numberOfSelectedFilters:Be,handleToggleFilters:ut})=>{const tt=ce();return n.createElement("div",{className:tt.filters},n.createElement(R.Z,{className:tt.icon,"aria-label":"settings",onClick:ut},n.createElement(K.Z,null)),n.createElement(C.Z,{variant:"h6"},"Filters (",Be||0,")"))};var ve=e(94339),De=e(32552),pe=e(77277),je=e(24579),Je=e(73698),We=e(12231),He=e(11776),Qe=e(38402),ot=e(21324),we=e(49378);const ke=(0,i.Z)(Be=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:Be.spacing(0,1,0,1)},dropdown:{width:"100%"}})),rt=({filters:Be,filterOptions:ut,resetFilters:tt,updateSelected:Ct,updateChecked:it})=>{const vt=ke();return n.createElement(ve.Z,{className:vt.filters},n.createElement(De.Z,{title:n.createElement(C.Z,{variant:"h6"},"Filters"),action:n.createElement(pe.Z,{color:"primary",onClick:()=>tt()},"CLEAR ALL")}),n.createElement(D.Z,null),ut.kind.length===0&&ut.lifecycle.length===0&&n.createElement(je.Z,null,n.createElement(C.Z,{variant:"subtitle2"},"Filters cannot be applied to available results")),ut.kind.length>0&&n.createElement(je.Z,null,n.createElement(C.Z,{variant:"subtitle2"},"Kind"),n.createElement(Je.Z,{id:"outlined-select",onChange:q=>{var Z;return Ct((Z=q==null?void 0:q.target)==null?void 0:Z.value)},variant:"outlined",className:vt.dropdown,value:Be.selected},ut.kind.map(q=>n.createElement(We.Z,{selected:q==="",dense:!0,key:q,value:q},q)))),ut.lifecycle.length>0&&n.createElement(je.Z,null,n.createElement(C.Z,{variant:"subtitle2"},"Lifecycle"),n.createElement(He.Z,{disablePadding:!0,dense:!0},ut.lifecycle.map(q=>n.createElement(Qe.Z,{key:q,dense:!0,button:!0,onClick:()=>it(q)},n.createElement(ot.Z,{edge:"start",disableRipple:!0,className:vt.checkbox,color:"primary",checked:Be.checked.includes(q),tabIndex:-1,value:q,name:q}),n.createElement(we.Z,{id:q,primary:q}))))))};var Xe=e(48023),ht=e(9118),dt=e(36964);const ft=(0,i.Z)(Be=>({searchQuery:{color:Be.palette.text.primary,background:Be.palette.background.default,borderRadius:"10%"},tableHeader:{margin:Be.spacing(1,0,0,0),display:"flex"},divider:{width:"1px",margin:Be.spacing(0,2),padding:Be.spacing(2,0)}})),pt=[{title:"Name",field:"name",highlight:!0,render:Be=>n.createElement(ht.Link,{to:Be.url||""},Be.name)},{title:"Description",field:"description"},{title:"Owner",field:"owner"},{title:"Kind",field:"kind"},{title:"LifeCycle",field:"lifecycle"}],Pt=({searchQuery:Be,numberOfSelectedFilters:ut,numberOfResults:tt,handleToggleFilters:Ct})=>{const it=ft();return n.createElement("div",{className:it.tableHeader},n.createElement(he,{numberOfSelectedFilters:ut,handleToggleFilters:Ct}),n.createElement(D.Z,{className:it.divider,orientation:"vertical"}),n.createElement(o.Z,{item:!0,xs:12},Be?n.createElement(C.Z,{variant:"h6"},`${tt} `,tt>1?"results for ":"result for ",n.createElement("span",{className:it.searchQuery},'"',Be,'"')," "):n.createElement(C.Z,{variant:"h6"},`${tt} results`)))},st=({searchQuery:Be})=>{const ut=(0,dt.useApi)(z.catalogApiRef),[tt,Ct]=(0,n.useState)(!1),[it,vt]=(0,n.useState)({selected:"",checked:[]}),[q,Z]=(0,n.useState)([]),{loading:ne,error:de,value:ae}=(0,B.default)(async()=>(await ut.getEntities()).items.map(H=>{var w,se,me,Ae,Te;return{name:H.metadata.name,description:H.metadata.description,owner:typeof((w=H.spec)==null?void 0:w.owner)=="string"?(se=H.spec)==null?void 0:se.owner:void 0,kind:H.kind,lifecycle:typeof((me=H.spec)==null?void 0:me.lifecycle)=="string"?(Ae=H.spec)==null?void 0:Ae.lifecycle:void 0,url:`/catalog/${((Te=H.metadata.namespace)==null?void 0:Te.toLocaleLowerCase("en-US"))||Xe.zG}/${H.kind.toLocaleLowerCase("en-US")}/${H.metadata.name}`}}),[]);if((0,n.useEffect)(()=>{if(ae){let Q=ae;it.selected!==""&&(Q=ae.filter(H=>it.selected.includes(H.kind))),it.checked.length>0&&(Q=Q.filter(H=>H.lifecycle&&it.checked.includes(H.lifecycle))),Be&&(Q=Q.filter(H=>{var w,se,me;return((w=H.name)==null?void 0:w.toLocaleLowerCase("en-US").includes(Be))||((se=H.name)==null?void 0:se.toLocaleLowerCase("en-US").includes(Be.split(" ").join("-")))||((me=H.description)==null?void 0:me.toLocaleLowerCase("en-US").includes(Be))})),Z(Q)}},[it,Be,ae]),ne)return n.createElement(ht.Progress,null);if(de)return n.createElement(L.Z,{severity:"error"},"Error encountered while fetching search results. ",de.toString());if(!ae||ae.length===0)return n.createElement(ht.EmptyState,{missing:"data",title:"Sorry, no results were found"});const ye=()=>{vt({selected:"",checked:[]})},Ze=Q=>{vt(H=>({...H,selected:Q}))},xe=Q=>{if(it.checked.includes(Q)){vt(H=>({...H,checked:H.checked.filter(w=>w!==Q)}));return}vt(H=>({...H,checked:[...H.checked,Q]}))},ze=ae.reduce((Q,H)=>(H.kind&&Q.kind.indexOf(H.kind)<0&&Q.kind.push(H.kind),H.lifecycle&&Q.lifecycle.indexOf(H.lifecycle)<0&&Q.lifecycle.push(H.lifecycle),Q),{kind:[],lifecycle:[]});return n.createElement(n.Fragment,null,n.createElement(o.Z,{container:!0},tt&&n.createElement(o.Z,{item:!0,xs:3},n.createElement(rt,{filters:it,filterOptions:ze,resetFilters:ye,updateSelected:Ze,updateChecked:xe})),n.createElement(o.Z,{item:!0,xs:tt?9:12},n.createElement(ht.Table,{options:{paging:!0,pageSize:20,search:!1},data:q,columns:pt,title:n.createElement(Pt,{searchQuery:Be,numberOfResults:q.length,numberOfSelectedFilters:(it.selected!==""?1:0)+it.checked.length,handleToggleFilters:()=>Ct(!tt)})}))))},et=()=>{const[Be,ut]=(0,ht.useQueryParamState)("query"),[tt,Ct]=(0,n.useState)(Be!=null?Be:""),it=q=>{q.preventDefault(),Ct(q.target.value)};(0,n.useEffect)(()=>Ct(Be!=null?Be:""),[Be]),(0,h.Z)(()=>{ut(tt)},200,[tt]);const vt=()=>{Ct("")};return n.createElement(ht.Page,{themeId:"home"},n.createElement(ht.Header,{title:"Search"}),n.createElement(ht.Content,null,n.createElement(o.Z,{container:!0,direction:"row"},n.createElement(o.Z,{item:!0,xs:12},n.createElement(j,{handleSearch:it,handleClearSearchBar:vt,searchQuery:tt})),n.createElement(o.Z,{item:!0,xs:12},n.createElement(st,{searchQuery:(Be!=null?Be:"").toLocaleLowerCase("en-US")})))))},St=()=>{const Be=(0,v.TH)(),{term:ut,setTerm:tt,types:Ct,setTypes:it,pageCursor:vt,setPageCursor:q,filters:Z,setFilters:ne}=(0,l.Rx)(),de=(0,t.Z)(Be.search);return(0,n.useEffect)(()=>{if(Be.search===de)return;const ae=m().parse(Be.search.substring(1),{arrayLimit:0})||{};ae.filters&&ne(ae.filters),ae.query&&tt(ae.query),ae.pageCursor&&q(ae.pageCursor),ae.types&&it(ae.types)},[de,Be,tt,it,q,ne]),(0,n.useEffect)(()=>{const ae=m().stringify({query:ut,types:Ct,pageCursor:vt,filters:Z},{arrayFormat:"brackets"}),ye=`${window.location.pathname}?${ae}`;window.history.replaceState(null,document.title,ye)},[ut,Ct,vt,Z]),null},mt=()=>{const Be=(0,v.pC)();return n.createElement(l.Nd,null,n.createElement(St,null),Be||n.createElement(et,null))}},39332:function(ee,s,e){"use strict";e.r(s),e.d(s,{SearchResult:function(){return m}});var n=e(9118),t=e(2784),c=e(22313);const m=({children:v})=>{const{result:{loading:l,error:o,value:h}}=(0,c.Rx)();return l?t.createElement(n.Progress,null):o?t.createElement(n.ResponseErrorPanel,{title:"Error encountered while fetching search results",error:o}):(h==null?void 0:h.results.length)?t.createElement(t.Fragment,null,v({results:h.results})):t.createElement(n.EmptyState,{missing:"data",title:"Sorry, no results were found"})}},8542:function(ee,s,e){"use strict";e.d(s,{G:function(){return h}});var n=e(79692),t=e(77277),c=e(35352),m=e(27742),v=e(2784),l=e(22313);const o=(0,n.Z)(i=>({root:{display:"flex",justifyContent:"space-between",gap:i.spacing(2),margin:i.spacing(2,0)}})),h=()=>{const{fetchNextPage:i,fetchPreviousPage:E}=(0,l.Rx)(),g=o();return!i&&!E?v.createElement(v.Fragment,null):v.createElement("nav",{"arial-label":"pagination navigation",className:g.root},v.createElement(t.Z,{"aria-label":"previous page",disabled:!E,onClick:E,startIcon:v.createElement(c.Z,null)},"Previous"),v.createElement(t.Z,{"aria-label":"next page",disabled:!i,onClick:i,endIcon:v.createElement(m.Z,null)},"Next"))}},20863:function(ee,s,e){"use strict";e.d(s,{_Z:function(){return c}});var n=e(91512),t=e(36964);const c=(0,t.createRouteRef)({id:"search"}),m=(0,t.createRouteRef)({id:"search:next"}),v=(0,t.createPlugin)({id:"search",apis:[(0,t.createApiFactory)({api:n.g,deps:{discoveryApi:t.discoveryApiRef,identityApi:t.identityApiRef},factory:({discoveryApi:I,identityApi:j})=>new n.w({discoveryApi:I,identityApi:j})})],routes:{root:c,nextRoot:m}}),l=v.provide((0,t.createRoutableExtension)({name:"SearchPage",component:()=>Promise.resolve().then(e.bind(e,3992)).then(I=>I.SearchPage),mountPoint:c})),o=v.provide((0,t.createRoutableExtension)({name:"SearchPageNext",component:()=>Promise.resolve().then(e.bind(e,3992)).then(I=>I.SearchPage),mountPoint:m})),h=v.provide((0,t.createComponentExtension)({name:"SearchBar",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(I=>I.SearchBar)}})),i=v.provide((0,t.createComponentExtension)({name:"SearchBarNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(I=>I.SearchBar)}})),E=v.provide((0,t.createComponentExtension)({name:"SearchResult",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(I=>I.SearchResult)}})),g=v.provide((0,t.createComponentExtension)({name:"SearchResultNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(I=>I.SearchResult)}})),R=v.provide((0,t.createComponentExtension)({name:"SidebarSearchModal",component:{lazy:()=>e.e(3825).then(e.bind(e,43825)).then(I=>I.SidebarSearchModal)}})),T=v.provide((0,t.createComponentExtension)({name:"DefaultResultListItem",component:{lazy:()=>Promise.resolve().then(e.bind(e,19941)).then(I=>I.DefaultResultListItem)}})),N=v.provide((0,t.createComponentExtension)({name:"HomePageSearchBar",component:{lazy:()=>e.e(6105).then(e.bind(e,46105)).then(I=>I.HomePageSearchBar)}}))},94067:function(ee,s,e){"use strict";e.r(s),e.d(s,{EmbeddedDocsRouter:function(){return N},Router:function(){return T},isTechDocsAvailable:function(){return R}});var n=e(2784),t=e(29663),c=e(10289),m=e(50021),v=e(16292),l=e(96393),o=e(97589),h=e(36964);const i=({entity:I})=>{var D;const j=(0,h.useApi)(h.configApiRef);return n.createElement(l.Ej,{withSearch:!1,entityRef:{namespace:(0,o.D)((D=I.metadata.namespace)!=null?D:"default",j),kind:(0,o.D)(I.kind,j),name:(0,o.D)(I.metadata.name,j)}})};var E=e(9118);const g="backstage.io/techdocs-ref",R=I=>{var j,D;return Boolean((D=(j=I==null?void 0:I.metadata)==null?void 0:j.annotations)==null?void 0:D[g])},T=()=>n.createElement(c.Z5,null,n.createElement(c.AW,{path:"/",element:n.createElement(m.TechDocsIndexPage,null)}),n.createElement(c.AW,{path:"/:namespace/:kind/:name/*",element:n.createElement(v.TechDocsReaderPage,null)})),N=()=>{var D;const{entity:I}=(0,t.useEntity)();return((D=I.metadata.annotations)==null?void 0:D[g])?n.createElement(c.Z5,null,n.createElement(c.AW,{path:"/*",element:n.createElement(i,{entity:I})})):n.createElement(E.MissingAnnotationEmptyState,{annotation:g})}},3337:function(ee,s,e){"use strict";e.d(s,{D:function(){return t},g:function(){return c}});var n=e(36964);const t=(0,n.createApiRef)({id:"plugin.techdocs.storageservice"}),c=(0,n.createApiRef)({id:"plugin.techdocs.service"})},42723:function(ee,s,e){"use strict";e.d(s,{p:function(){return m},k:function(){return v}});var n=e(10179),t=e(76372),c=e.n(t);class m{constructor(o){oe(this,"configApi");oe(this,"discoveryApi");oe(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.fetchApi=o.fetchApi}async getApiOrigin(){var o;return(o=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?o:await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(o){const{kind:h,namespace:i,name:E}=o,R=`${await this.getApiOrigin()}/metadata/techdocs/${i}/${h}/${E}`,T=await this.fetchApi.fetch(`${R}`);if(!T.ok)throw await n.VL.fromResponse(T);return await T.json()}async getEntityMetadata(o){const{kind:h,namespace:i,name:E}=o,R=`${await this.getApiOrigin()}/metadata/entity/${i}/${h}/${E}`,T=await this.fetchApi.fetch(`${R}`);if(!T.ok)throw await n.VL.fromResponse(T);return await T.json()}}class v{constructor(o){oe(this,"configApi");oe(this,"discoveryApi");oe(this,"identityApi");oe(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.identityApi=o.identityApi,this.fetchApi=o.fetchApi}async getApiOrigin(){var o;return(o=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?o: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,h){const{kind:i,namespace:E,name:g}=o,T=`${await this.getStorageUrl()}/${E}/${i}/${g}/${h}`,N=await this.fetchApi.fetch(`${T.endsWith("/")?T:`${T}/`}index.html`);let I="";switch(N.status){case 404:throw I="Page not found. ",h||(I+="This could be because there is no index.md file in the root of the docs directory of this repository."),new n.dR(I);case 500:throw I="Could not generate documentation or an error in the TechDocs backend. ",new Error(I);default:break}return N.text()}async syncEntityDocs(o,h=()=>{}){const{kind:i,namespace:E,name:g}=o,T=`${await this.getApiOrigin()}/sync/${E}/${i}/${g}`,{token:N}=await this.identityApi.getCredentials();return new Promise((I,j)=>{const D=new t.EventSourcePolyfill(T,{withCredentials:!0,headers:N?{Authorization:`Bearer ${N}`}:{}});D.addEventListener("log",C=>{C.data&&h(JSON.parse(C.data))}),D.addEventListener("finish",C=>{let L=!1;C.data&&({updated:L}=JSON.parse(C.data)),I(L?"updated":"cached")}),D.onerror=C=>{switch(D.close(),C.status){case 404:j(new n.dR(C.message));return;default:j(new Error(C.data));return}}})}async getBaseUrl(o,h,i){const{kind:E,namespace:g,name:R}=h,N=`${await this.getApiOrigin()}/static/docs/${g}/${E}/${R}/${i}`;return new URL(o,N.endsWith("/")?N:`${N}/`).toString()}}},97589:function(ee,s,e){"use strict";e.d(s,{D:function(){return n}});function n(t,c){return c.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(ee,s,e){"use strict";e.d(s,{u:function(){return h}});var n=e(2784),t=e(9118),c=e(92902),m=e(29663),v=e(1114),l=e(70335),o=e(21956);const h=i=>{const{initialFilter:E="all",columns:g,actions:R}=i;return n.createElement(v.j,null,n.createElement(t.Content,null,n.createElement(t.ContentHeader,{title:""},n.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),n.createElement(m.EntityListProvider,null,n.createElement(c.FilteredEntityLayout,null,n.createElement(c.FilterContainer,null,n.createElement(l.f,null),n.createElement(m.UserListPicker,{initialFilter:E}),n.createElement(m.EntityOwnerPicker,null),n.createElement(m.EntityTagPicker,null)),n.createElement(c.EntityListContainer,null,n.createElement(o.EntityListDocsTable,{actions:R,columns:g}))))))}},51016:function(ee,s,e){"use strict";e.d(s,{f:function(){return E}});var n=e(68725),t=e(97589),c=e(36964),m=e(9118),v=e(94339),l=e(16111),o=e(24579),h=e(14503),i=e(2784);const E=T=>{const{entities:N}=T,I=(0,c.useRouteRef)(n.Fw),j=(0,c.useApi)(c.configApiRef);return N?i.createElement(m.ItemCardGrid,{"data-testid":"docs-explore"},(N==null?void 0:N.length)?N.map((D,C)=>{var L,B;return i.createElement(v.Z,{key:C},i.createElement(l.Z,null,i.createElement(m.ItemCardHeader,{title:(L=D.metadata.title)!=null?L:D.metadata.name})),i.createElement(o.Z,null,D.metadata.description),i.createElement(h.Z,null,i.createElement(m.Button,{to:I({namespace:(0,t.D)((B=D.metadata.namespace)!=null?B:"default",j),kind:(0,t.D)(D.kind,j),name:(0,t.D)(D.metadata.name,j)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var g=e(29663);const R=()=>{const{loading:T,error:N,entities:I}=useEntityList();return N?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:N.toString()})):T||!I?React.createElement(Progress,null):(I.sort((j,D)=>{var C,L;return((C=j.metadata.title)!=null?C:j.metadata.name).localeCompare((L=D.metadata.title)!=null?L:D.metadata.name)}),React.createElement(DocsCardGrid,{entities:I}))}},81290:function(ee,s,e){"use strict";e.d(s,{H:function(){return g}});var n=e(2784),t=e(95074),c=e(36964),m=e(48023),v=e(29663),l=e(68725),o=e(9118),h=e(98095),i=e(3792),E=e(97589);const g=R=>{const{entities:T,title:N,loading:I,columns:j,actions:D}=R,[,C]=(0,t.Z)(),L=(0,c.useRouteRef)(l.Fw),B=(0,c.useApi)(c.configApiRef);if(!T)return null;const z=T.map(he=>{var De;const ve=(0,v.getEntityRelations)(he,m.S4);return{entity:he,resolved:{docsUrl:L({namespace:(0,E.D)((De=he.metadata.namespace)!=null?De:"default",B),kind:(0,E.D)(he.kind,B),name:(0,E.D)(he.metadata.name,B)}),ownedByRelations:ve,ownedByRelationsTitle:ve.map(pe=>(0,v.humanizeEntityRef)(pe,{defaultKind:"group"})).join(", ")}}}),K=[i.N.createNameColumn(),i.N.createOwnerColumn(),i.N.createTypeColumn()],ce=[h.n.createCopyDocsUrlAction(C)];return n.createElement(n.Fragment,null,I||z&&z.length>0?n.createElement(o.Table,{isLoading:I,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:z,columns:j||K,actions:D||ce,title:N?`${N} (${z.length})`:`All (${z.length})`}):n.createElement(o.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:n.createElement(o.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))};g.columns=i.N,g.actions=h.n},12481:function(ee,s,e){"use strict";e.d(s,{n:function(){return E}});var n=e(2784),t=e(95074),c=e(76635),m=e.n(c),v=e(9118),l=e(29663),o=e(81290),h=e(98095),i=e(3792);const E=g=>{var ce,he;const{columns:R,actions:T}=g,{loading:N,error:I,entities:j,filters:D}=(0,l.useEntityList)(),{isStarredEntity:C,toggleStarredEntity:L}=(0,l.useStarredEntities)(),[,B]=(0,t.Z)(),z=(0,c.capitalize)((he=(ce=D.user)==null?void 0:ce.value)!=null?he:"all"),K=[h.n.createCopyDocsUrlAction(B),h.n.createStarEntityAction(C,L)];return I?n.createElement(v.WarningPanel,{severity:"error",title:"Could not load available documentation."},n.createElement(v.CodeSnippet,{language:"text",text:I.toString()})):n.createElement(o.H,{title:z,entities:j,loading:N,actions:T||K,columns:R})};E.columns=i.N,E.actions=h.n},98095:function(ee,s,e){"use strict";e.d(s,{n:function(){return o}});var n=e(2784),t=e(39981),c=e(2337),m=e(11640),v=e(28347);const l=(0,c.Z)({root:{color:"#f3ba37"}})(m.Z),o={createCopyDocsUrlAction(h){return i=>({icon:()=>n.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>h(`${window.location.origin}${i.resolved.docsUrl}`)})},createStarEntityAction(h,i){return({entity:E})=>{const g=h(E);return{cellStyle:{paddingLeft:"1em"},icon:()=>g?n.createElement(l,null):n.createElement(v.Z,null),tooltip:g?"Remove from favorites":"Add to favorites",onClick:()=>i(E)}}}}},3792:function(ee,s,e){"use strict";e.d(s,{N:function(){return v}});var n=e(2784),t=e(9118),c=e(29663);function m(l){return l.metadata.title||l.metadata.name}const v={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:l=>n.createElement(t.SubvalueCell,{value:n.createElement(t.Link,{to:l.resolved.docsUrl},m(l.entity)),subvalue:l.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:l})=>n.createElement(c.EntityRefLinks,{entityRefs:l.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},21956:function(ee,s,e){"use strict";e.d(s,{EntityListDocsTable:function(){return n.n},DocsTable:function(){return t.H}});var n=e(12481),t=e(81290),c=e(72580),m=e.n(c);e.o(c,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return c.DefaultTechDocsHome}})},72580:function(){},50021:function(ee,s,e){"use strict";e.r(s),e.d(s,{TechDocsIndexPage:function(){return m}});var n=e(2784),t=e(10289),c=e(2546);const m=()=>(0,t.pC)()||n.createElement(c.u,null)},1114:function(ee,s,e){"use strict";e.d(s,{j:function(){return m}});var n=e(2784),t=e(9118),c=e(36964);const m=v=>{var i;const{children:l}=v,h=`Documentation available in ${(i=(0,c.useApi)(c.configApiRef).getOptionalString("organization.name"))!=null?i:"Backstage"}`;return n.createElement(t.PageWithHeader,{title:"Documentation",subtitle:h,themeId:"documentation"},l)}},70335:function(ee,s,e){"use strict";e.d(s,{f:function(){return m}});var n=e(2784),t=e(29663);class c{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const m=()=>{const{updateFilters:v}=(0,t.useEntityList)();return(0,n.useEffect)(()=>{v({techdocs:new c})},[v]),null}},19192:function(ee,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return c.u}});var n=e(51016),t=e(21956),c=e(2546),m=e(1114),v=e(70335)},82250:function(ee,s,e){"use strict";e.d(s,{techdocsApiRef:function(){return c.g},techdocsStorageApiRef:function(){return c.D},Reader:function(){return v.Ej},TechDocsPage:function(){return v.EV},TechDocsPageHeader:function(){return v.nN},DefaultTechDocsHome:function(){return o.DefaultTechDocsHome},TechDocsIndexPage:function(){return h.Jl},TechDocsReaderPage:function(){return h.I6},plugin:function(){return h.s4}});var n=e(98157),t=e.n(n);e.o(n,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return n.DefaultTechDocsHome}}),e.o(n,"Reader")&&e.d(s,{Reader:function(){return n.Reader}}),e.o(n,"TechDocsPage")&&e.d(s,{TechDocsPage:function(){return n.TechDocsPage}}),e.o(n,"TechDocsPageHeader")&&e.d(s,{TechDocsPageHeader:function(){return n.TechDocsPageHeader}}),e.o(n,"techdocsApiRef")&&e.d(s,{techdocsApiRef:function(){return n.techdocsApiRef}}),e.o(n,"techdocsStorageApiRef")&&e.d(s,{techdocsStorageApiRef:function(){return n.techdocsStorageApiRef}});var c=e(3337),m=e(42723),v=e(96393),l=e(93566),o=e(19192),h=e(20961),i=e(94067)},20961:function(ee,s,e){"use strict";e.d(s,{s4:function(){return v},Jl:function(){return i},I6:function(){return E}});var n=e(3337),t=e(42723),c=e(68725),m=e(36964);const v=(0,m.createPlugin)({id:"techdocs",apis:[(0,m.createApiFactory)({api:n.D,deps:{configApi:m.configApiRef,discoveryApi:m.discoveryApiRef,identityApi:m.identityApiRef,fetchApi:m.fetchApiRef},factory:({configApi:g,discoveryApi:R,identityApi:T,fetchApi:N})=>new t.k({configApi:g,discoveryApi:R,identityApi:T,fetchApi:N})}),(0,m.createApiFactory)({api:n.g,deps:{configApi:m.configApiRef,discoveryApi:m.discoveryApiRef,fetchApi:m.fetchApiRef},factory:({configApi:g,discoveryApi:R,fetchApi:T})=>new t.p({configApi:g,discoveryApi:R,fetchApi:T})})],routes:{root:c._Z,docRoot:c.Fw,entityContent:c.pd}}),l=v.provide((0,m.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.Router),mountPoint:c._Z})),o=v.provide((0,m.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.EmbeddedDocsRouter),mountPoint:c.pd})),h=v.provide((0,m.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(g=>g.TechDocsCustomHome),mountPoint:c._Z})),i=v.provide((0,m.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(g=>g.TechDocsIndexPage),mountPoint:c._Z})),E=v.provide((0,m.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,16292)).then(g=>g.TechDocsReaderPage),mountPoint:c.Fw}))},53242:function(ee,s,e){"use strict";e.d(s,{Ej:function(){return ze},DK:function(){return ae}});var n=e(2784),t=e(10289),c=e(79692),m=e(60364),v=e(41128),l=e(60905),o=e(36964),h=e(36356),i=e(9118),E=e(3337);const g=(Q,H,w)=>{const se=Q==="src"&&H.endsWith(".svg"),me=!H.match(/^([a-z]*:)?\/\//i),Ae=H.startsWith(w);return se&&(me||Ae)},R=({techdocsStorageApi:Q,entityId:H,path:w})=>async se=>{const me=await Q.getApiOrigin(),Ae=async(Te,Oe)=>{for(const yt of Te)if(yt.hasAttribute(Oe)){const lt=yt.getAttribute(Oe);if(!lt)return;const at=await Q.getBaseUrl(lt,H,w);if(g(Oe,lt,me))try{const x=await(await fetch(at,{credentials:"include"})).text();yt.setAttribute(Oe,`data:image/svg+xml;base64,${btoa(x)}`)}catch{yt.setAttribute("alt",`Error: ${lt}`)}else yt.setAttribute(Oe,at)}};return await Promise.all([Ae(se.querySelectorAll("img"),"src"),Ae(se.querySelectorAll("script"),"src"),Ae(se.querySelectorAll("source"),"src"),Ae(se.querySelectorAll("link"),"href"),Ae(se.querySelectorAll("a[download]"),"href")]),se};var T=e(63925),N=e(67097),I=e(47093),j=e(82717),D=e.n(j);const C=Q=>H=>{const w=H.querySelector('[title="Edit this page"]');if(!w||!w.href)return H;const se=new URL(w.href),me=Q.byUrl(se);if((me==null?void 0:me.type)!=="github"&&(me==null?void 0:me.type)!=="gitlab")return H;const Ae=H.querySelector("article>h1").childNodes[0].textContent,Te=encodeURIComponent(`Documentation Feedback: ${Ae}`),Oe=encodeURIComponent(`Page source:
32
- ${w.href}
33
-
34
- Feedback:`),yt=(me==null?void 0:me.type)==="github"?(0,T.Pb)(se.href,"blob"):se.href,lt=D()(yt),at=`/${lt.organization}/${lt.name}`,$=w.cloneNode();switch(me==null?void 0:me.type){case"gitlab":$.href=`${se.origin}${at}/issues/new?issue[title]=${Te}&issue[description]=${Oe}`;break;case"github":$.href=`${se.origin}${at}/issues/new?title=${Te}&body=${Oe}`;break;default:return H}return I.render(n.createElement(N.Z),$),$.style.paddingLeft="5px",$.title="Leave feedback for this page",$.id="git-feedback-link",w==null||w.insertAdjacentElement("beforebegin",$),H};var L=e(44882);const B=()=>Q=>{const H=Q.querySelector('.md-header label[for="__drawer"]'),w=Q.querySelector("article");if(!H||!w)return Q;const se=H.cloneNode();return I.render(n.createElement(L.Z),se),se.style.paddingLeft="5px",se.classList.add("md-content__button"),se.title="Toggle Sidebar",se.id="toggle-sidebar",w==null||w.prepend(se),Q},z=()=>Q=>(((w,se)=>{Array.from(w).filter(me=>me.hasAttribute(se)).forEach(me=>{const Ae=me.getAttribute(se);if(Ae){Ae.match(/^https?:\/\//i)&&me.setAttribute("target","_blank");try{const Te=K(window.location.href);me.setAttribute(se,new URL(Ae,Te).toString())}catch{me.replaceWith(me.textContent||Ae)}}})})(Array.from(Q.getElementsByTagName("a")),"href"),Q);function K(Q){const H=new URL(Q);return!H.pathname.endsWith("/")&&!H.pathname.endsWith(".html")&&(H.pathname+="/"),H.toString()}const ce=({baseUrl:Q,onClick:H})=>w=>(Array.from(w.getElementsByTagName("a")).forEach(se=>{se.addEventListener("click",me=>{const Te=se.getAttribute("href");!Te||Te.startsWith(Q)&&!se.hasAttribute("download")&&(me.preventDefault(),H(me,Te))})}),w);var he=e(15459),ve=e(80030),De=e(72379),pe=e(41547);const je=(0,he.Z)(Q=>({tooltip:{fontSize:"inherit",color:Q.palette.text.primary,margin:0,padding:Q.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(ve.ZP),Je=()=>n.createElement(De.Z,null,n.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"})),We=({text:Q})=>{const[H,w]=(0,n.useState)(!1),se=(0,n.useCallback)(()=>{navigator.clipboard.writeText(Q),w(!0)},[Q]),me=(0,n.useCallback)(()=>{w(!1)},[w]);return n.createElement(je,{title:"Copied to clipboard",placement:"left",open:H,onClose:me,leaveDelay:1e3},n.createElement("button",{className:"md-clipboard md-icon",onClick:se},n.createElement(Je,null)))},He=Q=>H=>{var se;const w=H.querySelectorAll("pre > code");for(const me of w){const Ae=me.textContent||"",Te=document.createElement("div");(se=me==null?void 0:me.parentElement)==null||se.prepend(Te),I.render(n.createElement(pe.Z,{theme:Q},n.createElement(We,{text:Ae})),Te)}return H},Qe=()=>Q=>{var H;return(H=Q.querySelector(".md-header"))==null||H.remove(),Q},ot=()=>Q=>{var H,w;return(H=Q.querySelector(".md-footer .md-copyright"))==null||H.remove(),(w=Q.querySelector(".md-footer-copyright"))==null||w.remove(),Q},we=({docStorageUrl:Q,onLoading:H,onLoaded:w})=>se=>{const me=Array.from(se.querySelectorAll('head > link[rel="stylesheet"]')).filter(Te=>{var Oe;return(Oe=Te.getAttribute("href"))==null?void 0:Oe.startsWith(Q)});let Ae=me.length;return Ae>0&&H(se),me.forEach(Te=>Te.addEventListener("load",()=>{Ae-=1,Ae===0&&w(se)})),se};var ke=e(35368),rt=e.n(ke);const Xe=/main\.[A-Fa-f0-9]{8}\.min\.css$/,ht=/^https:\/\/fonts\.googleapis\.com/,dt=/^https:\/\/fonts\.gstatic\.com/,ft=Q=>{if(Q.nodeName&&Q.nodeName==="LINK"){const H=Q.getAttribute("href")||"";H.match(Xe)&&Q.setAttribute("rel","stylesheet"),H.match(ht)&&Q.setAttribute("rel","stylesheet"),H.match(dt)&&Q.setAttribute("rel","preconnect")}return Q},pt=Q=>H=>{if(H.nodeName==="IFRAME"){const w=H.getAttribute("src");if(!w)return H.remove(),H;try{const se=new URL(w);Q.some(Ae=>se.host===Ae)||H.remove()}catch(se){console.warn(`Invalid iframe src, ${se}`),H.remove()}}return H},Pt=Q=>{const H=(Q==null?void 0:Q.getOptionalStringArray("allowedIframeHosts"))||[];return w=>{rt().addHook("afterSanitizeAttributes",ft);const se=["link"];return H.length>0&&(rt().addHook("beforeSanitizeElements",pt(H)),se.push("iframe")),rt().sanitize(w.innerHTML,{ADD_TAGS:se,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},st=({css:Q})=>H=>(H.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${Q}</style>`),H),et=()=>Q=>(setTimeout(()=>{var H;if(window.location.hash){const w=window.location.hash.slice(1);(H=Q==null?void 0:Q.querySelector(`#${w}`))==null||H.scrollIntoView()}},200),Q),St=async(Q,H)=>{let w;if(typeof Q=="string")w=new DOMParser().parseFromString(Q,"text/html").documentElement;else if(Q instanceof Element)w=Q;else throw new Error("dom is not a recognized type");for(const se of H)w=await se(w);return w};var mt=e(93566),Be=e(25921),ut=e(64279),tt=e(77446);function Ct({contentLoading:Q,content:H,activeSyncState:w}){return Q||w==="BUILD_READY_RELOAD"||!H&&w==="CHECKING"?"CHECKING":!H&&w==="BUILDING"?"INITIAL_BUILD":H?w==="BUILDING"?"CONTENT_STALE_REFRESHING":w==="BUILD_READY"?"CONTENT_STALE_READY":w==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function it(Q,H){const w={...Q};switch(H.type){case"sync":H.state==="CHECKING"&&(w.buildLog=[]),w.activeSyncState=H.state,w.syncError=H.syncError;break;case"contentLoading":w.contentLoading=!0,w.contentError=void 0;break;case"content":typeof H.path=="string"&&(w.path=H.path),w.contentLoading=!1,w.content=H.content,w.contentError=H.contentError;break;case"buildLog":w.buildLog=w.buildLog.concat(H.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(w.activeSyncState)&&["contentLoading","content"].includes(H.type)&&(w.activeSyncState="UP_TO_DATE",w.buildLog=[]),w}function vt(Q,H,w,se){var at,$;const[me,Ae]=(0,n.useReducer)(it,{activeSyncState:"CHECKING",path:se,contentLoading:!0,buildLog:[]}),Te=(0,o.useApi)(E.D),{retry:Oe}=(0,tt.Z)(async()=>{Ae({type:"contentLoading"});try{const x=await Te.getEntityDocs({kind:Q,namespace:H,name:w},se);return Ae({type:"content",content:x,path:se}),x}catch(x){Ae({type:"content",contentError:x,path:se})}},[Te,Q,H,w,se]),yt=(0,n.useRef)({content:void 0,reload:()=>{}});return yt.current={content:me.content,reload:Oe},(0,ut.default)(async()=>{Ae({type:"sync",state:"CHECKING"});const x=setTimeout(()=>{Ae({type:"sync",state:"BUILDING"})},1e3);try{switch(await Te.syncEntityDocs({kind:Q,namespace:H,name:w},u=>{Ae({type:"buildLog",log:u})})){case"updated":yt.current.content?Ae({type:"sync",state:"BUILD_READY"}):(yt.current.reload(),Ae({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":Ae({type:"sync",state:"UP_TO_DATE"});break;default:Ae({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(b){Ae({type:"sync",state:"ERROR",syncError:b})}finally{clearTimeout(x)}},[Q,w,H,Te,Ae,yt]),{state:(0,n.useMemo)(()=>Ct({activeSyncState:me.activeSyncState,contentLoading:me.contentLoading,content:me.content}),[me.activeSyncState,me.content,me.contentLoading]),contentReload:Oe,path:me.path,content:me.content,contentErrorMessage:(at=me.contentError)==null?void 0:at.toString(),syncErrorMessage:($=me.syncError)==null?void 0:$.toString(),buildLog:me.buildLog}}const q=(0,c.Z)(Q=>({searchBar:{maxWidth:"calc(100% - 16rem * 2 - 2.4rem)",marginTop:0,marginBottom:Q.spacing(1),marginLeft:"calc(16rem + 1.2rem)","@media screen and (max-width: 76.1875em)":{marginLeft:"0",maxWidth:"100%"}}})),Z=(0,n.createContext)({}),ne=({children:Q,entityRef:H})=>{const{"*":w}=(0,t.UO)(),{kind:se,namespace:me,name:Ae}=H,Te=vt(se,me,Ae,w);return n.createElement(Z.Provider,{value:Te},Q)},de=(Q,H)=>w=>React.createElement(ne,{entityRef:H},React.createElement(Q,{...w})),ae=()=>(0,n.useContext)(Z),ye=["h1","h2","h3","h4","h5","h6"],Ze=Q=>{const H=(0,t.s0)(),w=(0,m.Z)(),se=(0,o.useApi)(E.D),me=(0,o.useApi)(h.q3),Ae=(0,o.useApi)(o.configApiRef),{namespace:Te="",kind:Oe="",name:yt=""}=Q,{state:lt,path:at,content:$}=ae(),x=w.palette.type==="dark",[b,u]=(0,n.useState)(),[y,P]=(0,n.useState)(null),{isPinned:F}=(0,n.useContext)(i.SidebarPinStateContext),_=(0,n.useCallback)(()=>{if(!y||!b)return;const ge=y.querySelector(".md-container > .md-tabs"),Ne=window.matchMedia("screen and (max-width: 76.1875em)").matches,Pe=Math.max(y.getBoundingClientRect().top,0);b.forEach($e=>{Ne?$e.style.top="0px":ge?$e.style.top=`${Pe+ge.getBoundingClientRect().height}px`:$e.style.top=`${Pe}px`})},[y,b]);(0,n.useEffect)(()=>(_(),window.addEventListener("scroll",_,!0),window.addEventListener("resize",_),()=>{window.removeEventListener("scroll",_,!0),window.removeEventListener("resize",_)}),[_,lt]);const te=(0,n.useCallback)(()=>{if(!y)return;const ge=y.querySelector(".md-footer");ge&&(ge.style.width=`${y.getBoundingClientRect().width}px`)},[y]);(0,n.useEffect)(()=>(te(),window.addEventListener("resize",te),()=>{window.removeEventListener("resize",te)}));const re=(0,n.useCallback)((ge,Ne)=>St(ge,[Pt(Ae.getOptionalConfig("techdocs.sanitizer")),R({techdocsStorageApi:se,entityId:{kind:Oe,name:yt,namespace:Te},path:Ne}),z(),B(),Qe(),ot(),C(me),st({css:`
35
- /*
36
- As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.
37
- As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
38
- */
39
- :host {
40
- /* FONT */
41
- --md-default-fg-color: ${w.palette.text.primary};
42
- --md-default-fg-color--light: ${w.palette.text.secondary};
43
- --md-default-fg-color--lighter: ${(0,v.$n)(w.palette.text.secondary,.7)};
44
- --md-default-fg-color--lightest: ${(0,v.$n)(w.palette.text.secondary,.3)};
45
-
46
- /* BACKGROUND */
47
- --md-default-bg-color:${w.palette.background.default};
48
- --md-default-bg-color--light: ${w.palette.background.paper};
49
- --md-default-bg-color--lighter: ${(0,v.$n)(w.palette.background.paper,.7)};
50
- --md-default-bg-color--lightest: ${(0,v.$n)(w.palette.background.paper,.3)};
51
-
52
- /* PRIMARY */
53
- --md-primary-fg-color: ${w.palette.primary.main};
54
- --md-primary-fg-color--light: ${w.palette.primary.light};
55
- --md-primary-fg-color--dark: ${w.palette.primary.dark};
56
- --md-primary-bg-color: ${w.palette.primary.contrastText};
57
- --md-primary-bg-color--light: ${(0,v.$n)(w.palette.primary.contrastText,.7)};
58
-
59
- /* ACCENT */
60
- --md-accent-fg-color: var(--md-primary-fg-color);
61
-
62
- /* SHADOW */
63
- --md-shadow-z1: ${w.shadows[1]};
64
- --md-shadow-z2: ${w.shadows[2]};
65
- --md-shadow-z3: ${w.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: ${w.palette.text.primary};
102
- --md-code-bg-color: ${w.palette.background.paper};
103
- --md-code-hl-color: ${(0,v.Fq)(w.palette.warning.main,.5)};
104
- --md-code-hl-keyword-color: ${x?w.palette.primary.light:w.palette.primary.dark};
105
- --md-code-hl-function-color: ${x?w.palette.secondary.light:w.palette.secondary.dark};
106
- --md-code-hl-string-color: ${x?w.palette.success.light:w.palette.success.dark};
107
- --md-code-hl-number-color: ${x?w.palette.error.light:w.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: ${w.palette.text.primary};
122
- --md-typeset-del-color: ${x?(0,v.Fq)(w.palette.error.dark,.5):(0,v.Fq)(w.palette.error.light,.5)};
123
- --md-typeset-ins-color: ${x?(0,v.Fq)(w.palette.success.dark,.5):(0,v.Fq)(w.palette.success.light,.5)};
124
- --md-typeset-mark-color: ${x?(0,v.Fq)(w.palette.warning.dark,.5):(0,v.Fq)(w.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
- `}),st({css:`
141
- body {
142
- --md-text-color: var(--md-default-fg-color);
143
- --md-text-link-color: var(--md-accent-fg-color);
144
- --md-text-font-family: ${w.typography.fontFamily};
145
- font-family: var(--md-text-font-family);
146
- background-color: unset;
147
- }
148
- `}),st({css:`
149
- .md-grid {
150
- max-width: 100%;
151
- margin: 0;
152
- }
153
-
154
- .md-nav {
155
- font-size: calc(var(--md-typeset-font-size) * 0.9);
156
- }
157
- .md-nav__link {
158
- display: flex;
159
- align-items: center;
160
- justify-content: space-between;
161
- }
162
- .md-nav__icon {
163
- height: 20px !important;
164
- width: 20px !important;
165
- margin-left:${w.spacing(1)}px;
166
- }
167
- .md-nav__icon svg {
168
- margin: 0;
169
- width: 20px !important;
170
- height: 20px !important;
171
- }
172
- .md-nav__icon:after {
173
- width: 20px !important;
174
- height: 20px !important;
175
- }
176
-
177
- .md-main__inner {
178
- margin-top: 0;
179
- }
180
-
181
- .md-sidebar {
182
- height: calc(100% - 100px);
183
- position: fixed;
184
- width: 16rem;
185
- }
186
- .md-sidebar .md-sidebar__scrollwrap {
187
- max-height: calc(100% - 100px);
188
- }
189
- .md-sidebar--secondary {
190
- right: ${w.spacing(3)}px;
191
- }
192
-
193
- .md-content {
194
- max-width: calc(100% - 16rem * 2);
195
- margin-left: 16rem;
196
- margin-bottom: 50px;
197
- }
198
-
199
- .md-footer {
200
- position: fixed;
201
- bottom: 0px;
202
- }
203
- .md-footer__title {
204
- background-color: unset;
205
- }
206
- .md-footer-nav__link {
207
- width: 16rem;
208
- }
209
-
210
- .md-dialog {
211
- background-color: unset;
212
- }
213
-
214
- @media screen and (max-width: 76.1875em) {
215
- .md-nav {
216
- transition: none !important;
217
- background-color: var(--md-default-bg-color)
218
- }
219
- .md-nav--primary .md-nav__title {
220
- cursor: auto;
221
- color: var(--md-default-fg-color);
222
- font-weight: 700;
223
- white-space: normal;
224
- line-height: 1rem;
225
- height: auto;
226
- display: flex;
227
- flex-flow: column;
228
- row-gap: 1.6rem;
229
- padding: 1.2rem .8rem .8rem;
230
- background-color: var(--md-default-bg-color);
231
- }
232
- .md-nav--primary .md-nav__title~.md-nav__list {
233
- box-shadow: none;
234
- }
235
- .md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
236
- border-top: none;
237
- }
238
- .md-nav--primary .md-nav__title .md-nav__button {
239
- display: none;
240
- }
241
- .md-nav--primary .md-nav__title .md-nav__icon {
242
- color: var(--md-default-fg-color);
243
- position: static;
244
- height: auto;
245
- margin: 0 0 0 -0.2rem;
246
- }
247
- .md-nav--primary > .md-nav__title [for="none"] {
248
- padding-top: 0;
249
- }
250
- .md-nav--primary .md-nav__item {
251
- border-top: none;
252
- }
253
- .md-nav--primary :is(.md-nav__title,.md-nav__item) {
254
- font-size : var(--md-typeset-font-size);
255
- }
256
- .md-nav .md-source {
257
- display: none;
258
- }
259
-
260
- .md-sidebar {
261
- height: 100%;
262
- }
263
- .md-sidebar--primary {
264
- width: 12.1rem !important;
265
- z-index: 200;
266
- left: ${F?"calc(-12.1rem + 242px)":"calc(-12.1rem + 72px)"} !important;
267
- }
268
- .md-sidebar--secondary:not([hidden]) {
269
- display: none;
270
- }
271
-
272
- .md-content {
273
- max-width: 100%;
274
- margin-left: 0;
275
- }
276
-
277
- .md-header__button {
278
- margin: 0.4rem 0;
279
- margin-left: 0.4rem;
280
- padding: 0;
281
- }
282
-
283
- .md-overlay {
284
- left: 0;
285
- }
286
-
287
- .md-footer {
288
- position: static;
289
- padding-left: 0;
290
- }
291
- .md-footer-nav__link {
292
- /* footer links begin to overlap at small sizes without setting width */
293
- width: 50%;
294
- }
295
- }
296
-
297
- @media screen and (max-width: 600px) {
298
- .md-sidebar--primary {
299
- left: -12.1rem !important;
300
- width: 12.1rem;
301
- }
302
- }
303
- `}),st({css:`
304
- .md-typeset {
305
- font-size: var(--md-typeset-font-size);
306
- }
307
-
308
- ${ye.reduce((Pe,$e)=>{const Ge=w.typography[$e],{lineHeight:At,fontFamily:qe,fontWeight:Et,fontSize:$t}=Ge,wt=gt=>{let Tt=1;return typeof gt=="number"&&(Tt=gt/16*.6),typeof gt=="string"&&(Tt=gt.replace("rem","")),`calc(${Tt} * var(--md-typeset-font-size))`};return Pe.concat(`
309
- .md-typeset ${$e} {
310
- color: var(--md-default-fg-color);
311
- line-height: ${At};
312
- font-family: ${qe};
313
- font-weight: ${Et};
314
- font-size: ${wt($t)};
315
- }
316
- `)},"")}
317
-
318
- .md-typeset .md-content__button {
319
- color: var(--md-default-fg-color);
320
- }
321
-
322
- .md-typeset hr {
323
- border-bottom: 0.05rem dotted ${w.palette.divider};
324
- }
325
-
326
- .md-typeset details {
327
- font-size: var(--md-typeset-font-size) !important;
328
- }
329
- .md-typeset details summary {
330
- padding-left: 2.5rem !important;
331
- }
332
- .md-typeset details summary:before,
333
- .md-typeset details summary:after {
334
- top: 50% !important;
335
- width: 20px !important;
336
- height: 20px !important;
337
- transform: rotate(0deg) translateY(-50%) !important;
338
- }
339
- .md-typeset details[open] > summary:after {
340
- transform: rotate(90deg) translateX(-50%) !important;
341
- }
342
-
343
- .md-typeset blockquote {
344
- color: var(--md-default-fg-color--light);
345
- border-left: 0.2rem solid var(--md-default-fg-color--light);
346
- }
347
-
348
- .md-typeset table:not([class]) {
349
- font-size: var(--md-typeset-font-size);
350
- border: 1px solid var(--md-default-fg-color);
351
- border-bottom: none;
352
- border-collapse: collapse;
353
- }
354
- .md-typeset table:not([class]) th {
355
- font-weight: bold;
356
- }
357
- .md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
358
- border-bottom: 1px solid var(--md-default-fg-color);
359
- }
360
-
361
- .md-typeset pre > code::-webkit-scrollbar-thumb {
362
- background-color: hsla(0, 0%, 0%, 0.32);
363
- }
364
- .md-typeset pre > code::-webkit-scrollbar-thumb:hover {
365
- background-color: hsla(0, 0%, 0%, 0.87);
366
- }
367
- `}),st({css:`
368
- /*
369
- Disable CSS animations on link colors as they lead to issues in dark mode.
370
- The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
371
- */
372
- .md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
373
- transition: none;
374
- }
375
- `}),st({css:`
376
- /* HIGHLIGHT */
377
- .highlight .md-clipboard:after {
378
- content: unset;
379
- }
380
-
381
- .highlight .nx {
382
- color: ${x?"#ff53a3":"#ec407a"};
383
- }
384
-
385
- /* CODE HILITE */
386
- .codehilite .gd {
387
- background-color: ${x?"rgba(248,81,73,0.65)":"#fdd"};
388
- }
389
-
390
- .codehilite .gi {
391
- background-color: ${x?"rgba(46,160,67,0.65)":"#dfd"};
392
- }
393
-
394
- /* TABBED */
395
- .tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
396
- .tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
397
- .tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
398
- .tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
399
- .tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
400
- .tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
401
- .tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
402
- .tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
403
- .tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
404
- .tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
405
- .tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
406
- .tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
407
- .tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
408
- .tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
409
- .tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
410
- .tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
411
- .tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
412
- .tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
413
- .tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
414
- .tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
415
- color: var(--md-accent-fg-color);
416
- border-color: var(--md-accent-fg-color);
417
- }
418
-
419
- /* TASK-LIST */
420
- .task-list-control .task-list-indicator::before {
421
- background-color: ${w.palette.action.disabledBackground};
422
- }
423
- .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
424
- background-color: ${w.palette.success.main};
425
- }
426
-
427
- /* ADMONITION */
428
- .admonition {
429
- font-size: var(--md-typeset-font-size) !important;
430
- }
431
- .admonition .admonition-title {
432
- padding-left: 2.5rem !important;
433
- }
434
-
435
- .admonition .admonition-title:before {
436
- top: 50% !important;
437
- width: 20px !important;
438
- height: 20px !important;
439
- transform: translateY(-50%) !important;
440
- }
441
- `})]),[Oe,yt,Te,me,Ae,se,w,x,F]),le=(0,n.useCallback)(async ge=>St(ge,[et(),He(w),ce({baseUrl:window.location.origin,onClick:(Ne,Pe)=>{var At,qe;const $e=Ne.ctrlKey||Ne.metaKey,Ge=new URL(Pe);Ge.hash?$e?window.open(`${Ge.pathname}${Ge.hash}`,"_blank"):(H(`${Ge.pathname}${Ge.hash}`),(At=ge==null?void 0:ge.querySelector(`#${Ge.hash.slice(1)}`))==null||At.scrollIntoView()):$e?window.open(Ge.pathname,"_blank"):(H(Ge.pathname),(qe=ge==null?void 0:ge.querySelector(".md-content__inner"))==null||qe.scrollIntoView())}}),we({docStorageUrl:await se.getApiOrigin(),onLoading:Ne=>{Ne.style.setProperty("opacity","0")},onLoaded:Ne=>{var Pe;Ne.style.removeProperty("opacity"),(Pe=Ne.querySelector(".md-nav__title"))==null||Pe.removeAttribute("for"),u(Array.from(Ne.querySelectorAll(".md-sidebar")))}})]),[w,H,se]);return(0,n.useEffect)(()=>{if(!$)return()=>{};let ge=!0;return re($,at).then(async Ne=>{if(!(Ne==null?void 0:Ne.innerHTML)||!ge)return;window.scroll({top:0});const Pe=await le(Ne);P(Pe)}),()=>{ge=!1}},[$,at,re,le]),y},xe=({entityRef:Q,onReady:H=()=>{},withSearch:w=!0})=>{var Oe,yt;const se=q(),me=Ze(Q),Ae=(0,n.useRef)(null),Te=(0,n.useRef)(H);return(0,n.useEffect)(()=>{Te.current=H},[H]),(0,n.useEffect)(()=>{if(!me||!Ae.current)return;const lt=Ae.current,at=lt.shadowRoot||lt.attachShadow({mode:"open"});Array.from(at.children).forEach($=>at.removeChild($)),at.appendChild(me),Te.current()},[me]),n.createElement(n.Fragment,null,n.createElement(Be.N,null),w&&((yt=(Oe=Ae==null?void 0:Ae.current)==null?void 0:Oe.shadowRoot)==null?void 0:yt.innerHTML)&&n.createElement(l.Z,{container:!0,className:se.searchBar},n.createElement(mt.S4,{entityId:Q})),n.createElement("div",{"data-testid":"techdocs-content-shadowroot",ref:Ae}))},ze=Q=>{const{entityRef:H,onReady:w=()=>{},withSearch:se=!0}=Q;return n.createElement(ne,{entityRef:H},n.createElement(xe,{entityRef:H,onReady:w,withSearch:se}))}},94252:function(ee,s,e){"use strict";e.d(s,{T:function(){return m}});var n=e(2784),t=e(36964),c=e(9118);const m=({errorMessage:v})=>{const l=(0,t.useApi)(t.configApiRef).getOptionalString("techdocs.builder");let o="";return l!=="local"&&(o="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."),n.createElement(c.ErrorPage,{status:"404",statusMessage:v||"Documentation not found",additionalInfo:o})}},16292:function(ee,s,e){"use strict";e.r(s),e.d(s,{TechDocsPage:function(){return R},TechDocsReaderPage:function(){return g}});var n=e(2784),t=e(10289),c=e(64279),m=e(3337),v=e(94252),l=e(36964),o=e(9118),h=e(53242),i=e(75505);const E=()=>{const[T,N]=(0,n.useState)(!1),{namespace:I,kind:j,name:D}=(0,t.UO)(),C=(0,l.useApi)(m.g),{value:L}=(0,c.default)(()=>T?C.getTechDocsMetadata({kind:j,namespace:I,name:D}):Promise.resolve(void 0),[j,I,D,C,T]),{value:B,error:z}=(0,c.default)(()=>C.getEntityMetadata({kind:j,namespace:I,name:D}),[j,I,D,C]),K=(0,n.useCallback)(()=>{N(!0)},[N]);return z?n.createElement(v.T,{errorMessage:z.message}):n.createElement(o.Page,{themeId:"documentation"},n.createElement(i.S,{techDocsMetadata:L,entityMetadata:B,entityRef:{kind:j,namespace:I,name:D}}),n.createElement(o.Content,{"data-testid":"techdocs-content"},n.createElement(h.Ej,{onReady:K,entityRef:{kind:j,namespace:I,name:D}})))},g=T=>{const{children:N}=T,{NotFoundErrorPage:I}=(0,l.useApp)().getComponents(),j=(0,t.pC)(),[D,C]=(0,n.useState)(!1),{namespace:L,kind:B,name:z}=(0,t.UO)(),K=(0,l.useApi)(m.g),{value:ce}=(0,c.default)(()=>D?K.getTechDocsMetadata({kind:B,namespace:L,name:z}):Promise.resolve(void 0),[B,L,z,K,D]),{value:he,error:ve}=(0,c.default)(()=>K.getEntityMetadata({kind:B,namespace:L,name:z}),[B,L,z,K]),De=(0,n.useCallback)(()=>{C(!0)},[C]);return ve?n.createElement(I,null):N?n.createElement(o.Page,{themeId:"documentation"},N instanceof Function?N({techdocsMetadataValue:ce,entityMetadataValue:he,entityRef:{kind:B,namespace:L,name:z},onReady:De}):N):j||n.createElement(E,null)},R=g},75505:function(ee,s,e){"use strict";e.d(s,{S:function(){return h},n:function(){return i}});var n=e(2784),t=e(73250),c=e(36964),m=e(9118),v=e(48023),l=e(29663),o=e(68725);const h=E=>{const{entityRef:g,entityMetadata:R,techDocsMetadata:T,children:N}=E,{name:I}=g,{site_name:j,site_description:D}=T||{},{locationMetadata:C,spec:L}=R||{},B=L==null?void 0:L.lifecycle,z=R?(0,l.getEntityRelations)(R,v.S4):[],K=(0,c.useRouteRef)(o._Z)(),ce=n.createElement(n.Fragment,null,n.createElement(m.HeaderLabel,{label:"Component",value:n.createElement(l.EntityRefLink,{color:"inherit",entityRef:g,defaultKind:"Component"})}),z.length>0&&n.createElement(m.HeaderLabel,{label:"Owner",value:n.createElement(l.EntityRefLinks,{color:"inherit",entityRefs:z,defaultKind:"group"})}),B?n.createElement(m.HeaderLabel,{label:"Lifecycle",value:B}):null,C&&C.type!=="dir"&&C.type!=="file"?n.createElement(m.HeaderLabel,{label:"",value:n.createElement("a",{href:C.target,target:"_blank",rel:"noopener noreferrer"},n.createElement(t.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return n.createElement(m.Header,{title:j||".",pageTitleOverride:j||I,subtitle:D&&D!=="None"?D:"",type:"Docs",typeLink:K},ce,N)},i=h},25921:function(ee,s,e){"use strict";e.d(s,{N:function(){return L}});var n=e(2784),t=e(9118),c=e(79692),m=e(4614),v=e(77277),l=e(99688),o=e(12420),h=e(60905),i=e(90436),E=e(61837),g=e(4190),R=e(87685);const T=(0,c.Z)(B=>(0,o.Z)({paper:{width:"100%",[B.breakpoints.up("sm")]:{width:"75%"},[B.breakpoints.up("md")]:{width:"50%"},padding:B.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:B.palette.background.default}})),N=({buildLog:B,onClose:z})=>{const K=T(),ce=B.length===0?"Waiting for logs...":B.join(`
442
- `);return n.createElement(h.Z,{container:!0,direction:"column",className:K.root,spacing:0,wrap:"nowrap"},n.createElement(h.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},n.createElement(i.Z,{variant:"h5"},"Build Details"),n.createElement(E.Z,{key:"dismiss",title:"Close the drawer",onClick:z,color:"inherit"},n.createElement(R.Z,null))),n.createElement(t.LogViewer,{text:ce,classes:{root:K.logs}}))},I=({buildLog:B})=>{const z=T(),[K,ce]=(0,n.useState)(!1);return n.createElement(n.Fragment,null,n.createElement(v.Z,{color:"inherit",onClick:()=>ce(!0)},"Show Build Logs"),n.createElement(g.ZP,{classes:{paper:z.paper},anchor:"right",open:K,onClose:()=>ce(!1)},n.createElement(N,{buildLog:B,onClose:()=>ce(!1)})))};var j=e(94252),D=e(53242);const C=(0,c.Z)(B=>({root:{marginBottom:B.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),L=()=>{let B=null;const z=C(),{state:K,contentReload:ce,contentErrorMessage:he,syncErrorMessage:ve,buildLog:De}=(0,D.DK)(),pe=K==="CHECKING"?n.createElement(t.Progress,null):null;return K==="INITIAL_BUILD"&&(B=n.createElement(l.Z,{classes:{root:z.root},variant:"outlined",severity:"info",icon:n.createElement(m.Z,{size:"24px"}),action:n.createElement(I,{buildLog:De})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),K==="CONTENT_STALE_REFRESHING"&&(B=n.createElement(l.Z,{variant:"outlined",severity:"info",icon:n.createElement(m.Z,{size:"24px"}),action:n.createElement(I,{buildLog:De}),classes:{root:z.root}},"A newer version of this documentation is being prepared and will be available shortly.")),K==="CONTENT_STALE_READY"&&(B=n.createElement(l.Z,{variant:"outlined",severity:"success",action:n.createElement(v.Z,{color:"inherit",onClick:()=>ce()},"Refresh"),classes:{root:z.root}},"A newer version of this documentation is now available, please refresh to view.")),K==="CONTENT_STALE_ERROR"&&(B=n.createElement(l.Z,{variant:"outlined",severity:"error",action:n.createElement(I,{buildLog:De}),classes:{root:z.root,message:z.message}},"Building a newer version of this documentation failed."," ",ve)),K==="CONTENT_NOT_FOUND"&&(B=n.createElement(n.Fragment,null,ve&&n.createElement(l.Z,{variant:"outlined",severity:"error",action:n.createElement(I,{buildLog:De}),classes:{root:z.root,message:z.message}},"Building a newer version of this documentation failed."," ",ve),n.createElement(j.T,{errorMessage:he}))),n.createElement(n.Fragment,null,pe,B)}},96393:function(ee,s,e){"use strict";e.d(s,{Ej:function(){return n.Ej},EV:function(){return t.TechDocsPage},nN:function(){return c.n}});var n=e(53242),t=e(16292),c=e(75505),m=e(25921)},68725:function(ee,s,e){"use strict";e.d(s,{_Z:function(){return t},Fw:function(){return c},pd:function(){return m}});var n=e(36964);const t=(0,n.createRouteRef)({id:"techdocs:index-page"}),c=(0,n.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),m=(0,n.createRouteRef)({id:"techdocs:catalog-reader-view"})},93566:function(ee,s,e){"use strict";e.d(s,{S4:function(){return at}});var n=e(2784),t=e(79692),c=e(49378),m=e(38402),v=e(85256),l=e(9118),o=e(15277),h=e.n(o);const i=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),E=$=>{const{result:x,lineClamp:b=5,asListItem:u=!0,asLink:y=!0,title:P}=$,F=i(),_=()=>{var le;return n.createElement(c.Z,{className:F.itemText,primaryTypographyProps:{variant:"h6"},primary:P||`${x.title} | ${(le=x.entityTitle)!=null?le:x.name} docs`,secondary:n.createElement(h(),{line:b,truncateText:"\u2026",text:x.text,element:"span"})})},te=({children:le})=>y?n.createElement(l.Link,{to:x.location},le):n.createElement(n.Fragment,null,le),re=({children:le})=>u?n.createElement(n.Fragment,null,n.createElement(m.Z,{alignItems:"flex-start",className:F.flexContainer},le),n.createElement(v.Z,{component:"li"})):n.createElement(n.Fragment,null,le);return n.createElement(te,null,n.createElement(re,null,n.createElement(_,null)))},g=null;var R=e(91512);const T=(0,t.Z)($=>({filters:{width:"250px",display:"flex"},icon:{margin:$.spacing(-1,0,0,0)}})),N=({numberOfSelectedFilters:$,handleToggleFilters:x})=>{const b=T();return React.createElement("div",{className:b.filters},React.createElement(IconButton,{className:b.icon,"aria-label":"settings",onClick:x},React.createElement(FilterListIcon,null)),React.createElement(Typography,{variant:"h6"},"Filters (",$||0,")"))},I=(0,t.Z)($=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:$.spacing(0,1,0,1)},dropdown:{width:"100%"}})),j=({filters:$,filterOptions:x,resetFilters:b,updateSelected:u,updateChecked:y})=>{const P=I();return React.createElement(Card,{className:P.filters},React.createElement(CardHeader,{title:React.createElement(Typography,{variant:"h6"},"Filters"),action:React.createElement(Button,{color:"primary",onClick:()=>b()},"CLEAR ALL")}),React.createElement(Divider,null),x.kind.length===0&&x.lifecycle.length===0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Filters cannot be applied to available results")),x.kind.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Kind"),React.createElement(Select,{id:"outlined-select",onChange:F=>{var _;return u((_=F==null?void 0:F.target)==null?void 0:_.value)},variant:"outlined",className:P.dropdown,value:$.selected},x.kind.map(F=>React.createElement(MenuItem,{selected:F==="",dense:!0,key:F,value:F},F)))),x.lifecycle.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Lifecycle"),React.createElement(List,{disablePadding:!0,dense:!0},x.lifecycle.map(F=>React.createElement(ListItem,{key:F,dense:!0,button:!0,onClick:()=>y(F)},React.createElement(Checkbox,{edge:"start",disableRipple:!0,className:P.checkbox,color:"primary",checked:$.checked.includes(F),tabIndex:-1,value:F,name:F}),React.createElement(ListItemText,{id:F,primary:F}))))))};var D=e(1795),C=e(22313),L=e(42494),B=e(84899),z=e(5806),K=e(21324),ce=e(56939),he=e(73698),ve=e(12231),De=e(86619),pe=e(7089),je=e(88013),Je=e(69294),We=e(48760);const He=($,x,b=[],u=250)=>{const y=(0,n.useRef)({}),P=$||(()=>Promise.resolve([])),[F,_]=(0,Je.default)(P,[x],{loading:!0});if((0,We.Z)(()=>{y.current[x]===void 0&&(y.current[x]=_(x).then(re=>(y.current[x]=re,re)))},u,[_,x]),b.length)return{loading:!1,value:b};const te=y.current[x];return Array.isArray(te)?{loading:!1,value:te}:F},Qe=($,x)=>{const{setFilters:b}=(0,C.Rx)();(0,n.useEffect)(()=>{x&&[x].flat().length>0&&b(u=>({...u,[$]:x}))},[])},ot=$=>{const{className:x,defaultValue:b,name:u,values:y,valuesDebounceMs:P,label:F,filterSelectedOptions:_,limitTags:te,multiple:re}=$,[le,ge]=(0,n.useState)("");Qe(u,b);const Ne=typeof y=="function"?y:void 0,Pe=typeof y=="function"?void 0:y,{value:$e,loading:Ge}=He(Ne,le,Pe,P),{filters:At,setFilters:qe}=(0,C.Rx)(),Et=At[u]||(re?[]:null),$t=(Tt,Ht)=>{qe(qt=>{const{[u]:Y,...Ee}=qt;return Ht?{...Ee,[u]:Ht}:{...Ee}})},wt=Tt=>n.createElement(De.Z,{...Tt,name:"search",variant:"outlined",label:F,fullWidth:!0}),gt=(Tt,Ht)=>Tt.map((qt,Y)=>n.createElement(pe.Z,{label:qt,color:"primary",...Ht({index:Y})}));return n.createElement(je.ZP,{filterSelectedOptions:_,limitTags:te,multiple:re,className:x,id:`${re?"multi-":""}select-filter-${u}--select`,options:$e||[],loading:Ge,value:Et,onChange:$t,onInputChange:(Tt,Ht)=>ge(Ht),renderInput:wt,renderTags:gt})},we=(0,t.Z)({label:{textTransform:"capitalize"}}),ke=$=>{const{className:x,defaultValue:b,label:u,name:y,values:P=[],valuesDebounceMs:F}=$,_=we(),{filters:te,setFilters:re}=(0,C.Rx)();Qe(y,b);const le=typeof P=="function"?P:void 0,ge=typeof P=="function"?void 0:P,{value:Ne=[],loading:Pe}=He(le,"",ge,F),$e=Ge=>{const{target:{value:At,checked:qe}}=Ge;re(Et=>{const{[y]:$t,...wt}=Et,gt=($t||[]).filter(Ht=>Ht!==At),Tt=qe?[...gt,At]:gt;return Tt.length?{...wt,[y]:Tt}:wt})};return n.createElement(L.Z,{className:x,disabled:Pe,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},u?n.createElement(B.Z,{className:_.label},u):null,Ne.map(Ge=>{var At;return n.createElement(z.Z,{key:Ge,control:n.createElement(K.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":Ge},value:Ge,name:Ge,onChange:$e,checked:((At=te[y])!=null?At:[]).includes(Ge)}),label:Ge})}))},rt=$=>{const{className:x,defaultValue:b,label:u,name:y,values:P,valuesDebounceMs:F}=$,_=we();Qe(y,b);const te=typeof P=="function"?P:void 0,re=typeof P=="function"?void 0:P,{value:le=[],loading:ge}=He(te,"",re,F),{filters:Ne,setFilters:Pe}=(0,C.Rx)(),$e=Ge=>{const{target:{value:At}}=Ge;Pe(qe=>{const{[y]:Et,...$t}=qe;return At?{...$t,[y]:At}:$t})};return n.createElement(L.Z,{disabled:ge,className:x,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},u?n.createElement(ce.Z,{className:_.label,margin:"dense"},u):null,n.createElement(he.Z,{variant:"outlined",value:Ne[y]||"",onChange:$e},n.createElement(ve.Z,{value:""},n.createElement("em",null,"All")),le.map(Ge=>n.createElement(ve.Z,{key:Ge,value:Ge},Ge))))},Xe=({component:$,...x})=>n.createElement($,{...x});Xe.Checkbox=$=>n.createElement(Xe,{...$,component:ke}),Xe.Select=$=>n.createElement(Xe,{...$,component:rt}),Xe.Autocomplete=$=>n.createElement(Xe,{...$,component:ot});const ht=null;var dt=e(73032),ft=e(3992),pt=e(8542),Pt=e(62155),st=e(94339),et=e(32552),St=e(24579),mt=e(27616),Be=e(8284),ut=e(70660),tt=e(11776),Ct=e(86136),it=e(38016),vt=e(56881);const q=(0,t.Z)($=>({card:{backgroundColor:"rgba(0, 0, 0, .11)"},cardContent:{paddingTop:$.spacing(1)},icon:{color:$.palette.common.black},list:{width:"100%"},listItemIcon:{width:"24px",height:"24px"},accordion:{backgroundColor:$.palette.background.paper},accordionSummary:{minHeight:"auto","&.Mui-expanded":{minHeight:"auto"}},accordionSummaryContent:{margin:$.spacing(2,0),"&.Mui-expanded":{margin:$.spacing(2,0)}},accordionDetails:{padding:$.spacing(0,0,1)}})),Z=$=>{const x=q(),{setPageCursor:b,setTypes:u,types:y}=(0,C.Rx)(),[P,F]=(0,n.useState)(!0),{defaultValue:_,name:te,types:re}=$,le=()=>F($e=>!$e),ge=$e=>()=>{u($e!==""?[$e]:[]),b(void 0),F(!1)};(0,n.useEffect)(()=>{_&&u([_])},[]);const Ne=[{value:"",name:"All",icon:n.createElement(vt.Z,null)},...re],Pe=y[0]||"";return n.createElement(st.Z,{className:x.card},n.createElement(et.Z,{title:te,titleTypographyProps:{variant:"overline"}}),n.createElement(St.Z,{className:x.cardContent},n.createElement(mt.Z,{className:x.accordion,expanded:P,onChange:le},n.createElement(Be.Z,{classes:{root:x.accordionSummary,content:x.accordionSummaryContent},expandIcon:n.createElement(it.Z,{className:x.icon}),IconButtonProps:{size:"small"}},P?"Collapse":Ne.filter($e=>$e.value===Pe)[0].name),n.createElement(ut.Z,{classes:{root:x.accordionDetails}},n.createElement(tt.Z,{className:x.list,component:"nav","aria-label":"filter by type",disablePadding:!0,dense:!0},Ne.map($e=>n.createElement(n.Fragment,{key:$e.value},n.createElement(v.Z,null),n.createElement(m.Z,{selected:y[0]===$e.value||y.length===0&&$e.value==="",onClick:ge($e.value),button:!0},n.createElement(Ct.Z,null,(0,n.cloneElement)($e.icon,{className:x.listItemIcon})),n.createElement(c.Z,{primary:$e.name})))))))))};var ne=e(99152),de=e(6487);const ae=(0,t.Z)($=>({tabs:{borderBottom:`1px solid ${$.palette.textVerySubtle}`,padding:$.spacing(0,4)},tab:{height:"50px",fontWeight:$.typography.fontWeightBold,fontSize:$.typography.pxToRem(13),color:$.palette.textSubtle,minWidth:"130px"}})),ye=$=>{const x=ae(),{setPageCursor:b,setTypes:u,types:y}=(0,C.Rx)(),{defaultValue:P,types:F}=$,_=(re,le)=>{u(le!==""?[le]:[]),b(void 0)};(0,n.useEffect)(()=>{P&&u([P])},[]);const te=[{value:"",name:"All"},...F];return n.createElement(ne.Z,{className:x.tabs,indicatorColor:"primary",value:y.length===0?"":y[0],onChange:_},te.map(re=>n.createElement(de.Z,{className:x.tab,disableRipple:!0,label:re.name,value:re.value})))},Ze=(0,t.Z)($=>({label:{textTransform:"capitalize"},chips:{display:"flex",flexWrap:"wrap",marginTop:$.spacing(1)},chip:{margin:2}})),xe=$=>{const{className:x,defaultValue:b,name:u,values:y=[]}=$,P=Ze(),{types:F,setTypes:_}=(0,C.Rx)();(0,Pt.Z)(()=>{F.length||(b&&Array.isArray(b)?_(b):b&&_([b]))});const te=re=>{const le=re.target.value;_(le)};return n.createElement(L.Z,{className:x,variant:"filled",fullWidth:!0,"data-testid":"search-typefilter-next"},n.createElement(ce.Z,{className:P.label,margin:"dense"},u),n.createElement(he.Z,{multiple:!0,variant:"outlined",value:F,onChange:te,placeholder:"All Results",renderValue:re=>n.createElement("div",{className:P.chips},re.map(le=>n.createElement(pe.Z,{key:le,label:le,className:P.chip,size:"small"})))},y.map(re=>n.createElement(ve.Z,{key:re,value:re},n.createElement(K.Z,{checked:F.indexOf(re)>-1}),n.createElement(c.Z,{primary:re})))))};xe.Accordion=$=>n.createElement(Z,{...$}),xe.Tabs=$=>n.createElement(ye,{...$});var ze=e(19126),Q=e(20863),H=e(36964);const w=$=>{const x=useRouteRef(rootRouteRef),{focusContent:b}=useContent(),u=useNavigate(),y=useCallback(P=>{const F=qs.stringify({query:P},{addQueryPrefix:!0});b(),u(`${x()}${F}`)},[b,u,x]);return React.createElement(SidebarSearchField,{icon:$.icon,onSearch:y,to:"/search"})};var se=e(50581),me=e(61837),Ae=e(4614),Te=e(21853),Oe=e(10289);const yt=(0,t.Z)({root:{width:"100%"}}),lt=$=>{const{entityId:x,debounceTime:b=150}=$,[u,y]=(0,n.useState)(!1),P=(0,Oe.s0)(),{term:F,setTerm:_,setFilters:te,result:{loading:re,value:le}}=(0,C.Rx)(),ge=yt(),[Ne,Pe]=(0,n.useState)([]);(0,n.useEffect)(()=>{let gt=!0;if(gt&&le){const Tt=le.results.slice(0,10);Pe(Tt)}return()=>{gt=!1}},[re,le]);const[$e,Ge]=(0,n.useState)(F);(0,We.Z)(()=>_($e),b,[$e]);const{kind:At,name:qe,namespace:Et}=x;(0,n.useEffect)(()=>{te(gt=>({...gt,kind:At,namespace:Et,name:qe}))},[At,Et,qe,te]);const $t=gt=>{u||y(!0),Ge(gt.target.value)},wt=(gt,Tt)=>{if(Tt==null?void 0:Tt.document){const{location:Ht}=Tt.document;P(Ht)}};return n.createElement(je.ZP,{classes:{root:ge.root},"data-testid":"techdocs-search-bar",size:"small",open:u,getOptionLabel:()=>"",filterOptions:gt=>gt,onClose:()=>{y(!1)},onFocus:()=>{y(!0)},onChange:wt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Ne,renderOption:({document:gt})=>n.createElement(E,{result:gt,lineClamp:3,asListItem:!1,asLink:!1,title:gt.title}),loading:re,renderInput:gt=>n.createElement(De.Z,{...gt,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${x.name} docs`,value:$e,onChange:$t,InputProps:{...gt.InputProps,startAdornment:n.createElement(se.Z,{position:"start"},n.createElement(me.Z,{"aria-label":"Query",disabled:!0},n.createElement(Te.Z,null))),endAdornment:n.createElement(n.Fragment,null,re?n.createElement(Ae.Z,{color:"inherit",size:20}):null,gt.InputProps.endAdornment)}})})},at=$=>{const x={term:"",types:["techdocs"],pageCursor:"",filters:$.entityId};return n.createElement(C.Nd,{initialState:x},n.createElement(lt,{...$}))}},98157:function(){},19133:function(ee,s,e){"use strict";ee.exports=e.p+"static/createComponent.975d1e1e..svg"},86284:function(ee,s,e){"use strict";ee.exports=e.p+"static/missingAnnotation.67f79e98..svg"},3871:function(ee,s,e){"use strict";ee.exports=e.p+"static/noBuild.1715fa71..svg"},96465:function(ee,s,e){"use strict";ee.exports=e.p+"static/noInformation.4b426325..svg"},29788:function(ee,s,e){"use strict";ee.exports=e.p+"static/mic-drop.fe3ef4d0..svg"},53260:function(){}},function(ee){var s=function(n){return ee(ee.s=n)};ee.O(0,[2370,6202,9284,2126,7012,9035,4983,5218,4736],function(){return s(88649),s(16119)});var e=ee.O()}]);})();
443
-
444
- //# sourceMappingURL=main.a73a2a40.js.map