@techdocs/cli 1.3.3-next.0 → 1.4.0-next.1
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.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/index/{PublisherConfig-f679e718.cjs.js → PublisherConfig-9dfc07ee.cjs.js} +3 -2
- package/dist/cjs/index/{PublisherConfig-f679e718.cjs.js.map → PublisherConfig-9dfc07ee.cjs.js.map} +1 -1
- package/dist/cjs/index/{generate-8f4ae280.cjs.js → generate-8722d4c2.cjs.js} +5 -4
- package/dist/cjs/index/generate-8722d4c2.cjs.js.map +1 -0
- package/dist/cjs/index/{migrate-20cb2ea3.cjs.js → migrate-5312e76c.cjs.js} +5 -3
- package/dist/cjs/index/{migrate-20cb2ea3.cjs.js.map → migrate-5312e76c.cjs.js.map} +1 -1
- package/dist/cjs/index/{mkdocs-9fabcb0c.cjs.js → mkdocs-b897f254.cjs.js} +4 -2
- package/dist/cjs/index/{mkdocs-9fabcb0c.cjs.js.map → mkdocs-b897f254.cjs.js.map} +1 -1
- package/dist/cjs/index/{publish-7e1bb507.cjs.js → publish-f0f203ef.cjs.js} +5 -3
- package/dist/cjs/index/{publish-7e1bb507.cjs.js.map → publish-f0f203ef.cjs.js.map} +1 -1
- package/dist/cjs/index/{serve-aea8398a.cjs.js → serve-8c722cc8.cjs.js} +4 -2
- package/dist/cjs/index/{serve-aea8398a.cjs.js.map → serve-8c722cc8.cjs.js.map} +1 -1
- package/dist/cjs/index/{utility-8be2be15.cjs.js → utility-2edd5bff.cjs.js} +16 -1
- package/dist/cjs/index/utility-2edd5bff.cjs.js.map +1 -0
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/1032.90746959.chunk.js +3 -0
- package/dist/embedded-app/static/1032.90746959.chunk.js.map +1 -0
- package/dist/embedded-app/static/{1105.6191ca0a.chunk.js → 1105.0c932be4.chunk.js} +1 -1
- package/dist/embedded-app/static/{1105.6191ca0a.chunk.js.map → 1105.0c932be4.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{184.26a4caf6.chunk.js → 184.0de82ef1.chunk.js} +1 -1
- package/dist/embedded-app/static/{184.26a4caf6.chunk.js.map → 184.0de82ef1.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{2440.184525b4.chunk.js → 2440.0219755d.chunk.js} +1 -1
- package/dist/embedded-app/static/{2440.184525b4.chunk.js.map → 2440.0219755d.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{5458.68e9cdc0.chunk.js → 5458.36bd7281.chunk.js} +1 -1
- package/dist/embedded-app/static/{5458.68e9cdc0.chunk.js.map → 5458.36bd7281.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{732.e1699a4c.chunk.js → 732.b3a19fae.chunk.js} +1 -1
- package/dist/embedded-app/static/{732.e1699a4c.chunk.js.map → 732.b3a19fae.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7560.93e152cb.chunk.js → 7560.b6001518.chunk.js} +1 -1
- package/dist/embedded-app/static/{7560.93e152cb.chunk.js.map → 7560.b6001518.chunk.js.map} +1 -1
- package/dist/embedded-app/static/7670.8383e359.chunk.js +3 -0
- package/dist/embedded-app/static/7670.8383e359.chunk.js.map +1 -0
- package/dist/embedded-app/static/7750.c29731fc.chunk.js +8 -0
- package/dist/embedded-app/static/7750.c29731fc.chunk.js.map +1 -0
- package/dist/embedded-app/static/{9323.d3b0b6b6.chunk.js → 9323.f715e2ef.chunk.js} +1 -1
- package/dist/embedded-app/static/{9323.d3b0b6b6.chunk.js.map → 9323.f715e2ef.chunk.js.map} +1 -1
- package/dist/embedded-app/static/9545.12d478b4.chunk.js +3 -0
- package/dist/embedded-app/static/{1032.91b320eb.chunk.js.map → 9545.12d478b4.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9770.a743fc85.chunk.js → 9770.94e79bff.chunk.js} +1 -1
- package/dist/embedded-app/static/{9770.a743fc85.chunk.js.map → 9770.94e79bff.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.f29d79fc.js +503 -0
- package/dist/embedded-app/static/main.f29d79fc.js.map +1 -0
- package/dist/embedded-app/static/{runtime.ca2552f1.js → runtime.f29d79fc.js} +2 -2
- package/dist/embedded-app/static/{runtime.ca2552f1.js.map → runtime.f29d79fc.js.map} +1 -1
- package/dist/embedded-app/static/vendor.f29d79fc.js +270 -0
- package/dist/embedded-app/static/vendor.f29d79fc.js.map +1 -0
- package/dist/index.cjs.js +9 -6
- package/dist/index.cjs.js.map +1 -1
- package/package.json +7 -7
- package/dist/cjs/index/generate-8f4ae280.cjs.js.map +0 -1
- package/dist/cjs/index/utility-8be2be15.cjs.js.map +0 -1
- package/dist/embedded-app/static/1032.91b320eb.chunk.js +0 -3
- package/dist/embedded-app/static/7670.433cf15c.chunk.js +0 -3
- package/dist/embedded-app/static/7670.433cf15c.chunk.js.map +0 -1
- package/dist/embedded-app/static/7750.90d0b9bd.chunk.js +0 -8
- package/dist/embedded-app/static/7750.90d0b9bd.chunk.js.map +0 -1
- package/dist/embedded-app/static/9545.27f02c72.chunk.js +0 -3
- package/dist/embedded-app/static/9545.27f02c72.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.ca2552f1.js +0 -503
- package/dist/embedded-app/static/main.ca2552f1.js.map +0 -1
- package/dist/embedded-app/static/vendor.ca2552f1.js +0 -270
- package/dist/embedded-app/static/vendor.ca2552f1.js.map +0 -1
|
@@ -1,503 +0,0 @@
|
|
|
1
|
-
(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{4791:function(bt,Oe,t){"use strict";t.d(Oe,{n3:function(){return g},MS:function(){return $}});var h=t(25271),r=t(23054),M=t(96279),P=t.n(M);const g=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");function y(Se){return!Se.cursor}function a(Se){return!y(Se)}class ${async getEntityAncestors(J,H){const{kind:I,namespace:T,name:Q}=(0,h.of)(J.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(I)}/${encodeURIComponent(T)}/${encodeURIComponent(Q)}/ancestry`,H)}async getLocationById(J,H){return await this.requestOptional("GET",`/locations/${encodeURIComponent(J)}`,H)}async getEntities(J,H){const{filter:I=[],fields:T=[],order:Q,offset:se,limit:ne,after:k}=J!=null?J:{},E=this.getParams(I);if(T.length&&E.push(`fields=${T.map(encodeURIComponent).join(",")}`),Q)for(const oe of[Q].flat())oe&&E.push(`order=${encodeURIComponent(oe.order)}:${encodeURIComponent(oe.field)}`);se!==void 0&&E.push(`offset=${se}`),ne!==void 0&&E.push(`limit=${ne}`),k!==void 0&&E.push(`after=${encodeURIComponent(k)}`);const z=E.length?`?${E.join("&")}`:"",N=await this.requestRequired("GET",`/entities${z}`,H),R=(oe,Ae)=>{var _e,Ye;if(((_e=oe.metadata)===null||_e===void 0?void 0:_e.name)===void 0||oe.kind===void 0||((Ye=Ae.metadata)===null||Ye===void 0?void 0:Ye.name)===void 0||Ae.kind===void 0)return 0;const dt=(0,h.eE)(oe),Me=(0,h.eE)(Ae);return dt<Me?-1:dt>Me?1:0};return{items:N.sort(R)}}async getEntitiesByRefs(J,H){var I;const T={entityRefs:J.entityRefs};!((I=J.fields)===null||I===void 0)&&I.length&&(T.fields=J.fields);const se=`${await this.discoveryApi.getBaseUrl("catalog")}/entities/by-refs`,ne=await this.fetchApi.fetch(se,{headers:{"Content-Type":"application/json",...(H==null?void 0:H.token)&&{Authorization:`Bearer ${H==null?void 0:H.token}`}},method:"POST",body:JSON.stringify(T)});if(!ne.ok)throw await r.VL.fromResponse(ne);const{items:k}=await ne.json();return{items:k}}async queryEntities(J={},H){const I=[];if(y(J)){var T,Q;const{fields:ne=[],filter:k,limit:E,orderFields:z,fullTextFilter:N}=J;I.push(...this.getParams(k)),E!==void 0&&I.push(`limit=${E}`),z!==void 0&&(Array.isArray(z)?z:[z]).forEach(({field:oe,order:Ae})=>I.push(`sortField=${oe},${Ae}`)),ne.length&&I.push(`fields=${ne.map(encodeURIComponent).join(",")}`);const R=N==null||(T=N.term)===null||T===void 0?void 0:T.trim();R&&I.push(`fullTextFilterTerm=${R}`),!(N==null||(Q=N.fields)===null||Q===void 0)&&Q.length&&I.push(`fullTextFilterFields=${N.fields.join(",")}`)}else{const{fields:ne=[],limit:k,cursor:E}=J;I.push(`cursor=${E}`),k!==void 0&&I.push(`limit=${k}`),ne.length&&I.push(`fields=${ne.map(encodeURIComponent).join(",")}`)}const se=I.length?`?${I.join("&")}`:"";return this.requestRequired("GET",`/entities/by-query${se}`,H)}async getEntityByRef(J,H){const{kind:I,namespace:T,name:Q}=(0,h.of)(J);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(I)}/${encodeURIComponent(T)}/${encodeURIComponent(Q)}`,H)}async getEntityByName(J,H){const{kind:I,namespace:T="default",name:Q}=J;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(I)}/${encodeURIComponent(T)}/${encodeURIComponent(Q)}`,H)}async refreshEntity(J,H){const I=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(H==null?void 0:H.token)&&{Authorization:`Bearer ${H==null?void 0:H.token}`}},method:"POST",body:JSON.stringify({entityRef:J})});if(I.status!==200)throw new Error(await I.text())}async getEntityFacets(J,H){const{filter:I=[],facets:T}=J,Q=this.getParams(I);for(const ne of T)Q.push(`facet=${encodeURIComponent(ne)}`);const se=Q.length?`?${Q.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${se}`,H)}async addLocation(J,H){const{type:I="url",target:T,dryRun:Q}=J,se=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${Q?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(H==null?void 0:H.token)&&{Authorization:`Bearer ${H==null?void 0:H.token}`}},method:"POST",body:JSON.stringify({type:I,target:T})});if(se.status!==201)throw new Error(await se.text());const{location:ne,entities:k,exists:E}=await se.json();if(!ne)throw new Error(`Location wasn't added: ${T}`);return{location:ne,entities:k,exists:E}}async getLocationByRef(J,H){return(await this.requestRequired("GET","/locations",H)).map(T=>T.data).find(T=>J===(0,h.NZ)(T))}async removeLocationById(J,H){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(J)}`,H)}async removeEntityByUid(J,H){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(J)}`,H)}async validateEntity(J,H,I){const T=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/validate-entity`,{headers:{"Content-Type":"application/json",...(I==null?void 0:I.token)&&{Authorization:`Bearer ${I==null?void 0:I.token}`}},method:"POST",body:JSON.stringify({entity:J,location:H})});if(T.ok)return{valid:!0};if(T.status!==400)throw await r.VL.fromResponse(T);const{errors:Q=[]}=await T.json();return{valid:!1,errors:Q}}async requestIgnored(J,H,I){const T=`${await this.discoveryApi.getBaseUrl("catalog")}${H}`,Q=I!=null&&I.token?{Authorization:`Bearer ${I.token}`}:{},se=await this.fetchApi.fetch(T,{method:J,headers:Q});if(!se.ok)throw await r.VL.fromResponse(se)}async requestRequired(J,H,I){const T=`${await this.discoveryApi.getBaseUrl("catalog")}${H}`,Q=I!=null&&I.token?{Authorization:`Bearer ${I.token}`}:{},se=await this.fetchApi.fetch(T,{method:J,headers:Q});if(!se.ok)throw await r.VL.fromResponse(se);return se.json()}async requestOptional(J,H,I){const T=`${await this.discoveryApi.getBaseUrl("catalog")}${H}`,Q=I!=null&&I.token?{Authorization:`Bearer ${I.token}`}:{},se=await this.fetchApi.fetch(T,{method:J,headers:Q});if(!se.ok){if(se.status===404)return;throw await r.VL.fromResponse(se)}return await se.json()}getParams(J=[]){const H=[];for(const I of[J].flat()){const T=[];for(const[Q,se]of Object.entries(I))for(const ne of[se].flat())ne===g?T.push(encodeURIComponent(Q)):typeof ne=="string"&&T.push(`${encodeURIComponent(Q)}=${encodeURIComponent(ne)}`);T.length&&H.push(`filter=${T.join(",")}`)}return H}constructor(J){this.discoveryApi=J.discoveryApi,this.fetchApi=J.fetchApi||{fetch:P()}}}},25271:function(bt,Oe,t){"use strict";t.d(Oe,{Tf:function(){return M},P1:function(){return re},q1:function(){return Pe},M6:function(){return Ie},l2:function(){return r},zG:function(){return h},w$:function(){return pn},nP:function(){return Rn},aS:function(){return Cn},S4:function(){return Yt},cz:function(){return Pn},iB:function(){return $e},CV:function(){return kt},of:function(){return St},Ou:function(){return ht},eE:function(){return gt},NZ:function(){return Gt}});const h="default",r="backstage.io/view-url",M="backstage.io/edit-url",P="kubernetes.io/api-server",g="kubernetes.io/api-server-certificate-authority",y="kubernetes.io/auth-provider";var a=t(76635),$=t.n(a);class Se{async enforce(W){return W.metadata.namespace?W:lodash.merge({metadata:{namespace:this.namespace}},W)}constructor(W=DEFAULT_NAMESPACE){this.namespace=W}}class J{static isValidPrefixAndOrSuffix(W,he,Ve,ut){if(typeof W!="string")return!1;const ze=W.split(he);return ze.length===1?ut(ze[0]):ze.length===2?Ve(ze[0])&&ut(ze[1]):!1}static isJsonSafe(W){try{return $().isEqual(W,JSON.parse(JSON.stringify(W)))}catch{return!1}}static isValidDnsSubdomain(W){return typeof W=="string"&&W.length>=1&&W.length<=253&&W.split(".").every(J.isValidDnsLabel)}static isValidDnsLabel(W){return typeof W=="string"&&W.length>=1&&W.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(W)}static isValidTag(W){return typeof W=="string"&&W.length>=1&&W.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(W)}static isValidUrl(W){if(typeof W!="string")return!1;try{return new URL(W),!0}catch{return!1}}static isValidString(W){var he;return typeof W=="string"&&((he=W==null?void 0:W.trim())===null||he===void 0?void 0:he.length)>=1}static isNonEmptyString(W){var he;return typeof W=="string"&&((he=W==null?void 0:W.trim())===null||he===void 0?void 0:he.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=t(27991),T=t.n(I),Q=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"}}}`),se=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"type":{"type":"string","description":"An optional value to categorize links into specific groups.","examples":["runbook","documentation","logs","dashboard"],"minLength":1}}}}}}'),ne=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","target"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference"},"targetRef":{"type":"string","minLength":1,"description":"The entity ref of the target of this relation."}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const k=new Map,E=[H,Q,se,ne];function z(le){if(!(le!=null&&le.length))throw new TypeError("Unknown error");const W=le[0];throw new TypeError(`${W.instancePath||"<root>"} ${W.message}${W.params?` - ${Object.entries(W.params).map(([he,Ve])=>`${he}: ${Ve}`).join(", ")}`:""}`)}function N(le,W={}){var he;const Ve=(he=W==null?void 0:W.disableCache)!==null&&he!==void 0?he:!1,ut=Ve?"":JSON.stringify(le);if(!Ve){const rn=k.get(ut);if(rn)return rn}const ze=R(le),It=new(T())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});ze.length&&It.addSchema(ze,void 0,void 0,!0);const Jt=It.compile(le);return Ve||k.set(ut,Jt),Jt}function R(le){if(typeof le!="object")return[];const W=new Set;le.$id&&W.add(le.$id);const he=new Array,Ve=[le];for(;Ve.length;){const ut=Ve.pop();for(const ze of oe(ut))if(!W.has(ze)){W.add(ze);const It=E.find(Jt=>Jt.$id===ze);It&&(he.push(It),Ve.push(It))}}return he}function*oe(le){const W=[le];for(;W.length;){const he=W.pop();if(typeof he=="object"&&he)for(const[Ve,ut]of Object.entries(he))Ve==="$ref"&&typeof ut=="string"?yield ut.split("#")[0]:W.push(ut)}}function Ae(le){const W=compileAjvSchema(le||entityEnvelopeSchema);return he=>{if(W(he)===!0)return he;throw throwAjvError(W.errors)}}function _e(le){const W=N(le);return he=>{var Ve;if(W(he)===!0)return he;const ze=(Ve=W.errors)===null||Ve===void 0?void 0:Ve.filter(It=>["/kind","/apiVersion"].includes(It.instancePath));if(ze!=null&&ze.length&&ze.every(It=>It.keyword==="enum"))return!1;throw z(W.errors)}}function Ye(le){const W=compileAjvSchema(le||entitySchema);return he=>{if(W(he)===!0)return he;throw throwAjvError(W.errors)}}class dt{static isValidApiVersion(W){return J.isValidPrefixAndOrSuffix(W,"/",J.isValidDnsSubdomain,he=>he.length>=1&&he.length<=63&&/^[a-z0-9A-Z]+$/.test(he))}static isValidKind(W){return typeof W=="string"&&W.length>=1&&W.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(W)}static isValidObjectName(W){return typeof W=="string"&&W.length>=1&&W.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(W)}static isValidNamespace(W){return J.isValidDnsLabel(W)}static isValidLabelKey(W){return J.isValidPrefixAndOrSuffix(W,"/",J.isValidDnsSubdomain,dt.isValidObjectName)}static isValidLabelValue(W){return W===""||dt.isValidObjectName(W)}static isValidAnnotationKey(W){return J.isValidPrefixAndOrSuffix(W,"/",J.isValidDnsSubdomain,dt.isValidObjectName)}static isValidAnnotationValue(W){return typeof W=="string"}}const Me={isValidApiVersion:dt.isValidApiVersion,isValidKind:dt.isValidKind,isValidEntityName:dt.isValidObjectName,isValidNamespace:dt.isValidNamespace,isValidLabelKey:dt.isValidLabelKey,isValidLabelValue:dt.isValidLabelValue,isValidAnnotationKey:dt.isValidAnnotationKey,isValidAnnotationValue:dt.isValidAnnotationValue,isValidTag:le=>typeof le=="string"&&le.length>=1&&le.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(le)};function at(le={}){return{...Me,...le}}class rt{async enforce(W){function he(C,Z,K){if(Z==null)throw new Error(`${C} must have a value`);let ce;try{ce=K(Z)}catch(de){throw new Error(`${C} could not be validated, ${de}`)}if(!ce){let de;switch(K.name){case"isValidLabelValue":case"isValidObjectName":de="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":de="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":de="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":de="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":de="a string";break;case"isValidKind":de="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":de="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":de="a non empty string";break;default:de=void 0;break}const Re=de?` expected ${de} but found "${Z}".`:"";throw new Error(`"${C}" is not valid;${Re} 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 Ve(C,Z,K){return Z===void 0||he(C,Z,K)}he("apiVersion",W.apiVersion,this.validators.isValidApiVersion),he("kind",W.kind,this.validators.isValidKind),he("metadata.name",W.metadata.name,this.validators.isValidEntityName),Ve("metadata.namespace",W.metadata.namespace,this.validators.isValidNamespace);var ut;for(const[C,Z]of Object.entries((ut=W.metadata.labels)!==null&&ut!==void 0?ut:[]))he(`labels.${C}`,C,this.validators.isValidLabelKey),he(`labels.${C}`,Z,this.validators.isValidLabelValue);var ze;for(const[C,Z]of Object.entries((ze=W.metadata.annotations)!==null&&ze!==void 0?ze:[]))he(`annotations.${C}`,C,this.validators.isValidAnnotationKey),he(`annotations.${C}`,Z,this.validators.isValidAnnotationValue);var It;const Jt=(It=W.metadata.tags)!==null&&It!==void 0?It:[];for(let C=0;C<Jt.length;++C)he(`tags.${C}`,Jt[C],this.validators.isValidTag);var rn;const on=(rn=W.metadata.links)!==null&&rn!==void 0?rn:[];for(let C=0;C<on.length;++C){var q,G,m;he(`links.${C}.url`,(q=on[C])===null||q===void 0?void 0:q.url,CommonValidatorFunctions.isValidUrl),Ve(`links.${C}.title`,(G=on[C])===null||G===void 0?void 0:G.title,CommonValidatorFunctions.isNonEmptyString),Ve(`links.${C}.icon`,(m=on[C])===null||m===void 0?void 0:m.icon,KubernetesValidatorFunctions.isValidObjectName)}return W}constructor(W=makeValidator()){this.validators=W}}class ot{async enforce(W){if(!this.validate){const ut=new Ajv({allowUnionTypes:!0});this.validate=ut.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(W)===!0)return W;const[Ve]=this.validate.errors||[];throw Ve?new Error(`Malformed envelope, ${Ve.instancePath||"<root>"} ${Ve.message}`):new Error("Malformed envelope, Unknown error")}}function We(le){let W=le.indexOf(":");const he=le.indexOf("/");he!==-1&&he<W&&(W=-1);const Ve=W===-1?void 0:le.slice(0,W),ut=he===-1?void 0:le.slice(W+1,he),ze=le.slice(Math.max(W+1,he+1));if(Ve===""||ut===""||ze==="")throw new TypeError(`Entity reference "${le}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:Ve,namespace:ut,name:ze}}function $e(le){return{kind:le.kind,namespace:le.metadata.namespace||h,name:le.metadata.name}}function St(le,W){if(!le)throw new Error("Entity reference must not be empty");const he=W==null?void 0:W.defaultKind,Ve=(W==null?void 0:W.defaultNamespace)||h;let ut,ze,It;if(typeof le=="string"){const G=We(le);var Jt;ut=(Jt=G.kind)!==null&&Jt!==void 0?Jt:he;var rn;ze=(rn=G.namespace)!==null&&rn!==void 0?rn:Ve,It=G.name}else{var on;ut=(on=le.kind)!==null&&on!==void 0?on:he;var q;ze=(q=le.namespace)!==null&&q!==void 0?q:Ve,It=le.name}if(ut)if(ze){if(!It){const G=JSON.stringify(le);throw new Error(`Entity reference ${G} had missing or empty name`)}}else{const G=JSON.stringify(le);throw new Error(`Entity reference ${G} had missing or empty namespace`)}else{const G=JSON.stringify(le);throw new Error(`Entity reference ${G} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:ut,namespace:ze,name:It}}function gt(le){let W,he,Ve;if("metadata"in le){W=le.kind;var ut;he=(ut=le.metadata.namespace)!==null&&ut!==void 0?ut:h,Ve=le.metadata.name}else{W=le.kind;var ze;he=(ze=le.namespace)!==null&&ze!==void 0?ze:h,Ve=le.name}return`${W.toLocaleLowerCase("en-US")}:${he.toLocaleLowerCase("en-US")}/${Ve.toLocaleLowerCase("en-US")}`}class Ct{async enforce(W){let he=W;for(const Ve of this.policies){const ut=await Ve.enforce(he);if(!ut)throw new Error(`Policy ${Ve.constructor.name} did not return a result`);he=ut}return he}constructor(W){this.policies=W}}class Nt{async enforce(W){for(const he of this.policies){const Ve=await he.enforce(W);if(Ve)return Ve}throw new Error("The entity did not match any known policy")}constructor(W){this.policies=W}}const Lt={allOf(le){return new Ct(le)},oneOf(le){return new Nt(le)}};var Fe=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","trpc"],"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 ge(le){let W;return{async check(he){return W||(W=_e(le)),W(he)===he}}}const Le=ge(Fe);var Te=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 De=ge(Te);var Je=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 Wt=ge(Je);var vt=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 Tt=ge(vt);var yt=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 Pt=ge(yt),Yt="ownedBy",sn="ownerOf",hn="consumesApi",$t="apiConsumedBy",xn="providesApi",bn="apiProvidedBy",Rn="dependsOn",pn="dependencyOf",Un="parentOf",Ln="childOf",Xn="memberOf",ct="hasMember",Pn="partOf",Cn="hasPart";var ln=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 kn=ge(ln);var Mn=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 wn=ge(Mn);var Gn=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 ve=ge(Gn),re="backstage.io/managed-by-location",Pe="backstage.io/managed-by-origin-location",Ie="backstage.io/source-location",He=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;function ht(le){if(typeof le!="string")throw new TypeError(`Unable to parse location ref '${le}', unexpected argument ${typeof le}`);const W=le.indexOf(":");if(W<0)throw new TypeError(`Unable to parse location ref '${le}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const he=le.substring(0,W).trim(),Ve=le.substring(W+1).trim();if(!he||!Ve)throw new TypeError(`Unable to parse location ref '${le}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(he==="http"||he==="https")throw new TypeError(`Invalid location ref '${le}', please prefix it with 'url:', e.g. 'url:${le}'`);if(He.test(Ve))throw new TypeError(`Invalid location ref '${le}', target is a javascript: URL`);return{type:he,target:Ve}}function Gt(le){const{type:W,target:he}=le;if(W){if(!he)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(He.test(he))throw new TypeError(`Invalid location ref '${W}:${he}', target is a javascript: URL`);return`${W}:${he}`}function kt(le){var W,he,Ve,ut,ze;const It=(ze=(W=le.metadata)===null||W===void 0||(he=W.annotations)===null||he===void 0?void 0:he[Ie])!==null&&ze!==void 0?ze:(Ve=le.metadata)===null||Ve===void 0||(ut=Ve.annotations)===null||ut===void 0?void 0:ut[re];if(!It)throw new Error(`Entity '${gt(le)}' is missing location`);return ht(It)}},23196:function(bt,Oe,t){"use strict";t.d(Oe,{zx:function(){return We},Oi:function(){return De},VY:function(){return Ut},yW:function(){return il},XF:function(){return vt},mn:function(){return W},NX:function(){return h},ub:function(){return C},mf:function(){return ul},yu:function(){return w},h4:function(){return Ca},M6:function(){return fr},i9:function(){return Cl},aR:function(){return nr},rJ:function(){return Pr},Oh:function(){return Il},hu:function(){return El},rU:function(){return at},nU:function(){return jo},SA:function(){return Ao},sk:function(){return Et},Or:function(){return Sr},T3:function(){return wa},g9:function(){return Pl},Ex:function(){return Po},Gk:function(){return A},tn:function(){return js},Ph:function(){return En},YE:function(){return di},v7:function(){return f},R6:function(){return i},tR:function(){return la},uw:function(){return ka},qt:function(){return Qi},iA:function(){return Sa},GB:function(){return gn},po:function(){return _n},mZ:function(){return Wo},Pf:function(){return Jr}});var h={};t.r(h),t.d(h,{Nm:function(){return Tt},ht:function(){return Yt},LJ:function(){return Pt}});var r=t(52322),M=t(60871),P=t(19928),g=t(2784);function y(e){const[o,l]=useState([]),u=useApi(alertApiRef),{anchorOrigin:p={vertical:"top",horizontal:"center"},transientTimeoutMs:v}=e,j=v!=null?v:5e3;useEffect(()=>{const U=u.alert$().subscribe(ue=>l(ae=>ae.concat(ue)));return()=>{U.unsubscribe()}},[u]);const[D]=o;if(useEffect(()=>{if(D&&D.display==="transient"){const U=setTimeout(()=>{l(ue=>{const ae=ue.filter(ye=>ye!==D);return ae.length===ue.length?ue:ae})},j);return()=>clearTimeout(U)}},[D,j]),o.length===0)return null;const Y=()=>{l(U=>U.filter(ue=>ue!==D))};return _jsx(Snackbar,{open:!0,anchorOrigin:p,children:_jsx(Alert,{action:_jsx(IconButton,{color:"inherit",size:"small",onClick:Y,"data-testid":"error-button-close",children:_jsx(CloseIcon,{})}),severity:D.severity,children:_jsxs(Typography,{component:"span",children:[String(D.message),o.length>1&&_jsx("em",{children:` (${o.length-1} older ${pluralize("message",o.length-1)})`})]})})})}var a=t(79692),$=t(12420);const Se=(0,a.Z)(e=>(0,$.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff"},avatarText:{fontWeight:e.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function J(e){const{displayName:o,picture:l,customStyles:u}=e,p=Se();let v={...u};const j={fontFamily:v.fontFamily,fontSize:v.fontSize,fontWeight:v.fontWeight};return l||(v={backgroundColor:stringToColor(o||""),...u}),_jsx(MaterialAvatar,{alt:o,src:l,className:p.avatar,style:v,children:o&&_jsx(Typography,{variant:"h6",component:"span",className:p.avatarText,style:j,children:extractInitials(o)})})}var H=t(77277),I=t(86689),T=t(90436),Q=t(72779),se=t.n(Q),ne=t(76635),k=t(79635),E=t(39857);function z(){const[e]=(0,k.is)((0,r.jsx)(k.AW,{index:!0,element:(0,r.jsx)("div",{})}));return!e.index}const N=(0,a.Z)({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"}},{name:"Link"}),R=e=>/^([a-z+.-]+):/.test(e),oe=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,Ae=window.open;if(Ae&&!Ae.__backstage){const e=function(...l){const u=String(l[0]);if(oe.test(u))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return Ae.apply(this,l)};e.__backstage=!0,window.open=e}const _e=()=>{try{return(0,M.h_)(M.Ds).getOptionalString("app.baseUrl")}catch{return}},Ye=()=>{const e="http://sample.dev";var o;const l=(o=_e())!==null&&o!==void 0?o:"/",{pathname:u}=new URL(l,e);return(0,ne.trimEnd)(u,"/")},dt=e=>{let o=String(e);const l=Ye(),u=R(o),p=o.startsWith(l);return!u&&!p&&(o=l.concat(o)),o},Me=e=>{if(e instanceof Array)return e.map(Me).join(" ").trim();if(typeof e=="object"&&e){var o;return Me(e==null||(o=e.props)===null||o===void 0?void 0:o.children)}return["string","number"].includes(typeof e)?String(e):""},at=g.forwardRef(({onClick:e,noTrack:o,...l},u)=>{const p=N(),v=(0,M.z$)(),j=z()?dt(l.to):l.to,D=Me(l.children)||j,Y=R(j),U=Y&&!!/^https?:/.exec(j);if(oe.test(j))throw new Error("Link component rejected javascript: URL as a security precaution");const ue=ae=>{e==null||e(ae),o||v.captureEvent("click",D,{attributes:{to:j}})};return Y?(0,r.jsxs)(I.Z,{...U?{target:"_blank",rel:"noopener"}:{},...l,ref:u,href:j,onClick:ue,className:se()(p.externalLink,l.className),children:[l.children,(0,r.jsx)(T.Z,{component:"span",className:p.visuallyHidden,children:", Opens in a new window"})]}):(0,r.jsx)(I.Z,{...l,ref:u,component:E.rU,to:j,onClick:ue})}),rt=g.forwardRef((e,o)=>(0,r.jsx)(at,{ref:o,...e,color:"initial"})),We=g.forwardRef((e,o)=>(0,r.jsx)(H.Z,{ref:o,component:rt,...e}));var $e=t(95544),St=t(60364),gt=t(83229),Ct=t(26639),Nt=t(39595),Lt=t(61837),Fe=t(80030),ge=t(19353),Le=t(95074);function Te(e){const{text:o,tooltipDelay:l=1e3,tooltipText:u="Text copied to clipboard","aria-label":p="Copy text"}=e,v=(0,M.h_)(M.VE),[j,D]=(0,g.useState)(!1),[{error:Y},U]=(0,Le.Z)();(0,g.useEffect)(()=>{Y&&v.post(Y)},[Y,v]);const ue=ae=>{ae.stopPropagation(),D(!0),U(o)};return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(Fe.ZP,{id:"copy-test-tooltip",title:u,placement:"top",leaveDelay:l,onClose:()=>D(!1),open:j,children:(0,r.jsx)(Lt.Z,{onClick:ue,"aria-label":p,children:(0,r.jsx)(ge.Z,{})})})})}function De(e){const{text:o,language:l,showLineNumbers:u=!1,highlightedNumbers:p,customStyle:v,showCopyCodeButton:j=!1}=e,D=(0,St.Z)(),Y=D.palette.type==="dark"?Ct.Z:Nt.Z,U=D.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,r.jsxs)($e.Z,{position:"relative",children:[(0,r.jsx)(gt.Z,{customStyle:v,language:l,style:Y,showLineNumbers:u,wrapLines:!0,lineNumberStyle:{color:D.palette.textVerySubtle},lineProps:ue=>p!=null&&p.includes(ue)?{style:{backgroundColor:U}}:{},children:o}),j&&(0,r.jsx)($e.Z,{position:"absolute",top:0,right:0,children:(0,r.jsx)(Te,{text:o})})]})}var Je=t(41156),Wt=t(88188);function vt(e){const{title:o,to:l}=e,u=(0,Je.Z)(p=>p.breakpoints.down("xs"));return l?u?(0,r.jsx)(Lt.Z,{component:E.rU,color:"primary",title:o,size:"small",to:l,children:(0,r.jsx)(Wt.Z,{})}):(0,r.jsx)(H.Z,{component:E.rU,variant:"contained",color:"primary",to:l,children:o}):null}var Tt;(function(e){e.TOP_BOTTOM="TB",e.BOTTOM_TOP="BT",e.LEFT_RIGHT="LR",e.RIGHT_LEFT="RL"})(Tt||(Tt={}));var yt;(function(e){e.UP_LEFT="UL",e.UP_RIGHT="UR",e.DOWN_LEFT="DL",e.DOWN_RIGHT="DR"})(yt||(yt={}));var Pt;(function(e){e.NETWORK_SIMPLEX="network-simplex",e.TIGHT_TREE="tight-tree",e.LONGEST_PATH="longest-path"})(Pt||(Pt={}));var Yt;(function(e){e.LEFT="l",e.RIGHT="r",e.CENTER="c"})(Yt||(Yt={}));var sn=t(27397),hn=t(11105),$t=t(97963),xn=t(46506),bn=t.n(xn),Rn=t(54073),pn=t.n(Rn),Un=t(10368);const Ln=(0,a.Z)(e=>({node:{fill:e.palette.primary.light,stroke:e.palette.primary.light},text:{fill:e.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function Xn({node:{id:e}}){const o=Ln(),[l,u]=g.useState(0),[p,v]=g.useState(0),j=g.useRef(null);g.useLayoutEffect(()=>{if(j.current){let{height:ue,width:ae}=j.current.getBBox();ue=Math.round(ue),ae=Math.round(ae),(ue!==p||ae!==l)&&(u(ae),v(ue))}},[l,p]);const D=10,Y=l+D*2,U=p+D*2;return(0,r.jsxs)("g",{children:[(0,r.jsx)("rect",{className:o.node,width:Y,height:U,rx:10}),(0,r.jsx)("text",{ref:j,className:o.text,y:U/2,x:Y/2,textAnchor:"middle",alignmentBaseline:"middle",children:e})]})}const ct="arrow-marker",Pn="node",Cn="edge",ln="label",kn=(0,Un.Z)(e=>({node:{transition:`${e.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),Mn=e=>(0,r.jsx)(Xn,{...e});function wn({render:e=Mn,setNode:o,node:l}){const{width:u,height:p,x:v=0,y:j=0}=l,D=l,Y=kn(),U=g.useRef(null);return g.useLayoutEffect(()=>{if(U.current){let{height:ue,width:ae}=U.current.getBBox();ue=Math.round(ue),ae=Math.round(ae),(ue!==p||ae!==u)&&o(l.id,{...l,height:ue,width:ae})}},[l,u,p,o]),(0,r.jsx)("g",{ref:U,"data-testid":Pn,className:Y.node,transform:`translate(${v-u/2},${j-p/2})`,children:e({node:D})})}var Gn=t(76985),ve=t(39829),re=t(19574),Pe=t.n(re);const Ie=(0,Un.Z)(e=>({text:{fill:e.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function He({edge:{label:e}}){const o=Ie();return(0,r.jsx)("text",{className:o.text,textAnchor:"middle",children:e})}const ht=(0,Un.Z)(e=>({path:{strokeWidth:1,stroke:e.palette.textSubtle,fill:"none",transition:`${e.transitions.duration.shortest}ms`},label:{transition:`${e.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),Gt=e=>(0,r.jsx)(He,{...e});function kt({render:e=Gt,setEdge:o,id:l,edge:u,curve:p}){const{x:v=0,y:j=0,width:D,height:Y,points:U}=u,ue=u,ae=ht(),ye=g.useRef(null);g.useLayoutEffect(()=>{if(ye.current){let{height:Ke,width:Ot}=ye.current.getBBox();Ke=Math.round(Ke),Ot=Math.round(Ot),(Ke!==Y||Ot!==D)&&o(l,{...u,height:Ke,width:Ot})}},[u,Y,D,o,l]);let Ee="";const Ue=g.useMemo(()=>Gn.Z().x(Ke=>Ke.x).y(Ke=>Ke.y).curve(ve[p]),[p]);if(U){const Ke=U.filter(Ot=>Pe()(Ot.x)&&Pe()(Ot.y));Ee=Ue(Ke)||""}return(0,r.jsxs)(r.Fragment,{children:[Ee&&(0,r.jsx)("path",{"data-testid":Cn,className:ae.path,d:Ee}),ue.label?(0,r.jsx)("g",{ref:ye,"data-testid":ln,className:ae.label,transform:`translate(${v},${j})`,children:e({edge:ue})}):null]})}const le="workspace";function W(e){var o,l;const{edges:u,nodes:p,renderNode:v,direction:j=Tt.TOP_BOTTOM,align:D,nodeMargin:Y=50,edgeMargin:U=10,rankMargin:ue=50,paddingX:ae=0,paddingY:ye=0,acyclicer:Ee,ranker:Ue=Pt.NETWORK_SIMPLEX,labelPosition:Ke=Yt.RIGHT,labelOffset:Ot=10,edgeRanks:Xt=1,edgeWeight:tn=1,renderLabel:nn,defs:Bt,zoom:en="enabled",curve:Qt="curveMonotoneX",fit:wr="grow",...jr}=e,Er=(0,$t.Z)(),[Ar,Li]=g.useState(100),[Dr,Pi]=g.useState(100),qt=g.useRef(new(bn()).graphlib.Graph),[vo,Ts]=g.useState(((o=qt.current.graph())===null||o===void 0?void 0:o.width)||0),[Nr,ki]=g.useState(((l=qt.current.graph())===null||l===void 0?void 0:l.height)||0),[Nn,yr]=g.useState([]),[Qr,qr]=g.useState([]),dn=Math.max(vo,Ar),Sn=Math.max(Nr,Dr),yo=Math.min(Nr,Dr),_r=wr==="grow"?Sn:yo,Qo=g.useMemo(()=>pn()(yn=>{if(!yn)return;const Fn=hn.Z(yn),un=hn.Z(yn.getElementById(le));function ur(){Fn.call(sn.sP().scaleExtent([1,10]).on("zoom",Tr=>{Tr.transform.x=Math.min(0,Math.max(Tr.transform.x,dn-dn*Tr.transform.k)),Tr.transform.y=Math.min(0,Math.max(Tr.transform.y,Sn-Sn*Tr.transform.k)),un.attr("transform",Tr.transform)}))}en==="enabled"?ur():en==="enable-on-click"&&Fn.on("click",()=>ur());const{width:hr,height:Is}=yn.getBoundingClientRect();Ar!==hr&&Li(hr),Dr!==Is&&Pi(Is)},100),[Dr,Ar,dn,Sn,en]),La=g.useCallback(()=>{const yn=qt.current.nodes(),Fn=qt.current.edges();yn.forEach(un=>{p.some(hr=>hr.id===un)||qt.current.removeNode(un)}),Fn.forEach(un=>{u.some(hr=>hr.from===un.v&&hr.to===un.w)||qt.current.removeEdge(un.v,un.w)}),p.forEach(un=>{const ur=qt.current.nodes().find(hr=>un.id===hr);if(ur&&qt.current.node(ur)){const{width:hr,height:Is,x:Tr,y:Xl}=qt.current.node(ur);qt.current.setNode(ur,{...un,width:hr,height:Is,x:Tr,y:Xl})}else qt.current.setNode(un.id,{...un,width:0,height:0})}),u.forEach(un=>{qt.current.setEdge(un.from,un.to,{...un,label:un.label,width:0,height:0,labelpos:Ke,labeloffset:Ot,weight:tn,minlen:Xt})})},[u,p,Ke,Ot,tn,Xt]),qo=g.useMemo(()=>pn()(()=>{bn().layout(qt.current);const{height:yn,width:Fn}=qt.current.graph(),un=Math.max(0,yn||0),ur=Math.max(0,Fn||0);Ts(ur),ki(un),yr(qt.current.nodes()),qr(qt.current.edges())},250,{leading:!0}),[]);g.useEffect(()=>(qt.current.setGraph({rankdir:j,align:D,nodesep:Y,edgesep:U,ranksep:ue,marginx:ae,marginy:ye,acyclicer:Ee,ranker:Ue}),La(),qo(),qo.cancel),[Ee,D,j,U,ae,ye,Y,ue,Ue,La,qo]);function Yl(yn,Fn){return qt.current.setNode(yn,Fn),qo(),qt.current}function Jl(yn,Fn){return qt.current.setEdge(yn,Fn),qo(),qt.current}return(0,r.jsxs)("svg",{ref:Qo,...jr,width:"100%",height:_r,viewBox:`0 0 ${dn} ${Sn}`,children:[(0,r.jsxs)("defs",{children:[(0,r.jsx)("marker",{id:ct,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth",children:(0,r.jsx)("path",{fill:Er.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),Bt]}),(0,r.jsx)("g",{id:le,children:(0,r.jsxs)("svg",{width:vo,height:Nr,y:Sn/2-Nr/2,x:dn/2-vo/2,viewBox:`0 0 ${vo} ${Nr}`,children:[Qr.map(yn=>{const Fn=qt.current.edge(yn);return Fn?(0,r.jsx)(kt,{id:yn,setEdge:Jl,render:nn,edge:Fn,curve:Qt},`${yn.v}-${yn.w}`):null}),Nn.map(yn=>{const Fn=qt.current.node(yn);return Fn?(0,r.jsx)(wn,{setNode:Yl,render:v,node:Fn},yn):null})]})})]})}var he;const Ve=(0,a.Z)(e=>({root:{padding:e.spacing(0),marginBottom:e.spacing(0),marginTop:e.spacing(0),display:"flex",flexFlow:"row nowrap"},topPosition:{position:"relative",marginBottom:e.spacing(6),marginTop:-e.spacing(3),zIndex:"unset"},icon:{fontSize:e.typography.h6.fontSize},content:{width:"100%",maxWidth:"inherit",flexWrap:"nowrap"},message:{display:"flex",alignItems:"center",color:e.palette.banner.text,"& a":{color:e.palette.banner.link}},info:{backgroundColor:e.palette.banner.info},error:{backgroundColor:e.palette.banner.error},warning:{backgroundColor:(he=e.palette.banner.warning)!==null&&he!==void 0?he:e.palette.banner.error}}),{name:"BackstageDismissableBanner"}),ut=e=>{const{variant:o,message:l,id:u,fixed:p=!1}=e,v=Ve(),D=useApi(storageApiRef).forBucket("notifications");var Y;const U=(Y=D.snapshot("dismissedBanners").value)!==null&&Y!==void 0?Y:[],[ue,ae]=useState(new Set(U)),ye=useObservable(D.observe$("dismissedBanners"));useEffect(()=>{if(ye!=null&&ye.value){var Ue;const Ke=(Ue=ye==null?void 0:ye.value)!==null&&Ue!==void 0?Ue:[];ae(new Set(Ke))}},[ye==null?void 0:ye.value]);const Ee=()=>{D.set("dismissedBanners",[...ue,u])};return _jsx(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!ue.has(u),classes:{root:classNames(v.root,!p&&v.topPosition)},children:_jsx(SnackbarContent,{classes:{root:classNames(v.content,v[o]),message:v.message},message:l,action:[_jsx(IconButton,{title:"Permanently dismiss this message",color:"inherit",onClick:Ee,children:_jsx(Close,{className:v.icon})},"dismiss")]})})};var ze=t(60905),It=t.p+"static/missingAnnotation.67f79e98..svg",Jt=t.p+"static/noInformation.4b426325..svg",rn=t.p+"static/createComponent.975d1e1e..svg",on=t.p+"static/noBuild.1715fa71..svg";const q=(0,a.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),G=({missing:e})=>{const o=q();switch(e){case"field":return(0,r.jsx)("img",{src:It,className:o.generalImg,alt:"annotation is missing"});case"info":return(0,r.jsx)("img",{src:Jt,alt:"no Information",className:o.generalImg});case"content":return(0,r.jsx)("img",{src:rn,alt:"create Component",className:o.generalImg});case"data":return(0,r.jsx)("img",{src:on,alt:"no Build",className:o.generalImg});default:return null}},m=(0,a.Z)(e=>({root:{backgroundColor:e.palette.background.default,padding:e.spacing(2,0,0,0)},action:{marginTop:e.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function C(e){const{title:o,description:l,missing:u,action:p}=e,v=m();return(0,r.jsxs)(ze.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:v.root,spacing:2,children:[(0,r.jsx)(ze.Z,{item:!0,xs:12,md:6,children:(0,r.jsxs)(ze.Z,{container:!0,direction:"column",children:[(0,r.jsx)(ze.Z,{item:!0,xs:!0,children:(0,r.jsx)(T.Z,{variant:"h5",children:o})}),(0,r.jsx)(ze.Z,{item:!0,xs:!0,children:(0,r.jsx)(T.Z,{variant:"body1",children:l})}),(0,r.jsx)(ze.Z,{item:!0,xs:!0,className:v.action,children:p})]})}),(0,r.jsx)(ze.Z,{item:!0,xs:12,md:6,className:v.imageContainer,children:typeof u=="string"?(0,r.jsx)(G,{missing:u}):u.customImage})]})}const Z=`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`,K=/^.*ANNOTATION.*$/m,ce=Z.match(K)[0],de=Z.split(`
|
|
12
|
-
`).findIndex(e=>K.test(e)),Re=(0,a.Z)(e=>({code:{borderRadius:6,margin:`${e.spacing(2)}px 0px`,background:e.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function st(e){return Array.from(Array(e+1).keys(),o=>o+de)}function Ge(e){const o=e.map(l=>ce.replace("ANNOTATION",l)).join(`
|
|
13
|
-
`);return Z.replace(ce,o)}function mt(e){const o=e.length<=1;return(0,r.jsxs)(r.Fragment,{children:["The ",o?"annotation":"annotations"," ",e.map(l=>(0,r.jsx)("code",{children:l})).reduce((l,u)=>(0,r.jsxs)(r.Fragment,{children:[l,", ",u]}))," ",o?"is":"are"," missing. You need to add the"," ",o?"annotation":"annotations"," to your component if you want to enable this tool."]})}function Et(e){const{annotation:o,readMoreUrl:l}=e,u=Array.isArray(o)?o:[o],p=l||"https://backstage.io/docs/features/software-catalog/well-known-annotations",v=Re();return(0,r.jsx)(C,{missing:"field",title:"Missing Annotation",description:mt(u),action:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T.Z,{variant:"body1",children:"Add the annotation to your component YAML as shown in the highlighted example below:"}),(0,r.jsx)($e.Z,{className:v.code,children:(0,r.jsx)(De,{text:Ge(u),language:"yaml",showLineNumbers:!0,highlightedNumbers:st(u.length),customStyle:{background:"inherit",fontSize:"115%"}})}),(0,r.jsx)(H.Z,{color:"primary",component:at,to:p,children:"Read more"})]})})}var et=t(11776),Ze=t(38402),pt=t(49378),At=t(41128),Vt=t(27616),Dt=t(8284),Mt=t(70660),Ht=t(91750),Rt=t(38016);const tt=(e,o)=>(o.palette.type==="light"?At._j:At.$n)(o.palette[e].light,.6),Xe=(e,o)=>(o.palette.type==="light"?At.$n:At._j)(o.palette[e].light,.9),Kt=(0,a.Z)(e=>({root:{marginRight:e.spacing(1),fill:({severity:o})=>tt(o,e)}})),fn=({severity:e})=>{const o=Kt({severity:e});return(0,r.jsx)(Ht.Z,{classes:o})},an=({severity:e})=>{const o=Kt({severity:e});return(0,r.jsx)(Rt.Z,{classes:o})},zn=(0,a.Z)(e=>({panel:{backgroundColor:({severity:o})=>Xe(o,e),color:({severity:o})=>tt(o,e),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:o})=>tt(o,e),fontWeight:e.typography.fontWeightBold},message:{width:"100%",display:"block",color:({severity:o})=>tt(o,e),backgroundColor:({severity:o})=>Xe(o,e)},details:{width:"100%",display:"block",color:e.palette.textContrast,backgroundColor:e.palette.background.default,border:`1px solid ${e.palette.border}`,padding:e.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),Qn=e=>e.charAt(0).toLocaleUpperCase("en-US")+e.slice(1);function gn(e){const{severity:o="warning",title:l,message:u,children:p,defaultExpanded:v}=e,j=zn({severity:o}),D=Qn(o)+(l?`: ${l}`:"");return(0,r.jsxs)(Vt.Z,{defaultExpanded:v!=null?v:!1,className:j.panel,role:"alert",children:[(0,r.jsxs)(Dt.Z,{expandIcon:(0,r.jsx)(an,{severity:o}),className:j.summary,children:[(0,r.jsx)(fn,{severity:o}),(0,r.jsx)(T.Z,{className:j.summaryText,variant:"subtitle1",children:D})]}),(u||p)&&(0,r.jsx)(Mt.Z,{children:(0,r.jsxs)(ze.Z,{container:!0,children:[u&&(0,r.jsx)(ze.Z,{item:!0,xs:12,children:(0,r.jsx)(T.Z,{className:j.message,variant:"body1",children:u})}),p&&(0,r.jsx)(ze.Z,{item:!0,xs:12,className:j.details,children:p})]})})]})}const Kn=(0,a.Z)(e=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:e.spacing(2)},divider:{margin:e.spacing(2)}}),{name:"BackstageErrorPanel"}),pr=({error:e,message:o,stack:l,children:u})=>{const p=Kn();return(0,r.jsxs)(et.Z,{dense:!0,children:[(0,r.jsxs)(Ze.Z,{alignItems:"flex-start",children:[(0,r.jsx)(pt.Z,{classes:{secondary:p.text},primary:"Error",secondary:e}),(0,r.jsx)(Te,{text:e})]}),(0,r.jsxs)(Ze.Z,{alignItems:"flex-start",children:[(0,r.jsx)(pt.Z,{classes:{secondary:p.text},primary:"Message",secondary:o}),(0,r.jsx)(Te,{text:o})]}),l&&(0,r.jsxs)(Ze.Z,{alignItems:"flex-start",children:[(0,r.jsx)(pt.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:l}),(0,r.jsx)(Te,{text:l})]}),u]})};function w(e){const{title:o,error:l,defaultExpanded:u,children:p}=e;return(0,r.jsx)(gn,{severity:"error",title:o!=null?o:l.message,defaultExpanded:u,children:(0,r.jsx)(pr,{error:l.name,message:l.message,stack:l.stack,children:p})})}var d=t(85256);const x=(0,a.Z)(e=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:e.spacing(2)},divider:{margin:e.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function A(e){var o;const{title:l,error:u,defaultExpanded:p}=e,v=x();if(u.name!=="ResponseError")return(0,r.jsx)(w,{title:l!=null?l:u.message,defaultExpanded:p,error:u});const{body:j,cause:D}=u,{request:Y,response:U}=j,ue=`${U.statusCode}: ${D.name}`,ae=Y&&`${Y.method} ${Y.url}`,ye=D.message.replace(/\\n/g,`
|
|
14
|
-
`),Ee=(o=D.stack)===null||o===void 0?void 0:o.replace(/\\n/g,`
|
|
15
|
-
`),Ue=JSON.stringify(j,void 0,2);return(0,r.jsxs)(w,{title:l!=null?l:u.message,defaultExpanded:p,error:{name:ue,message:ye,stack:Ee},children:[ae&&(0,r.jsxs)(Ze.Z,{alignItems:"flex-start",children:[(0,r.jsx)(pt.Z,{classes:{secondary:v.text},primary:"Request",secondary:Y?`${ae}`:void 0}),(0,r.jsx)(Te,{text:ae})]}),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Z,{component:"li",className:v.divider}),(0,r.jsx)(Ze.Z,{alignItems:"flex-start",children:(0,r.jsx)(pt.Z,{classes:{secondary:v.text},primary:"Full Error as JSON"})}),(0,r.jsx)(De,{language:"json",text:Ue,showCopyCodeButton:!0})]})]})}var X=t(28316);function pe(e){const o=document.createElement("div");return o.setAttribute("id",e),o}function xe(e){document.body.insertBefore(e,document.body.lastElementChild.nextElementSibling)}function be(e){const o=useRef(null);useEffect(function(){const p=document.querySelector(`#${e}`),v=p||pe(e);return p||xe(v),v.appendChild(o.current),function(){o.current.remove(),v.childNodes.length===-1&&v.remove()}},[e]);function l(){return o.current||(o.current=document.createElement("div")),o.current}return l()}var ft=null;const Ft="core.calloutSeen";function cn(){const[e,o]=useState(()=>{const u=localStorage.getItem(Ft);return u?JSON.parse(u):{}}),l=useCallback((u,p)=>{const v=localStorage.getItem(Ft),D={...v?JSON.parse(v):{},[u]:p};o(D),localStorage.setItem(Ft,JSON.stringify(D))},[]);return{states:e,setState:l}}function Wn(e){const{states:o,setState:l}=cn(),u=useCallback(()=>{l(e,!0)},[l,e]);return{seen:o[e]===!0,markSeen:u}}function rr(e){const{seen:o,markSeen:l}=Wn(e);return{show:o===!1,hide:l}}const Ir=(0,a.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 xo(e){const{featureId:o,title:l,description:u,children:p}=e,{show:v,hide:j}=useShowCallout(o),D=usePortal("core.callout"),Y=useRef(null),[U,ue]=useState(),ae=Ir(),ye=useCallback(()=>{if(Y.current){const Ee=Y.current.getBoundingClientRect(),Ue=Math.max(Ee.width,Ee.height),Ke=800,Ot=Ee.x-(Ue-Ee.width)/2-Ke,Xt=Ee.y-(Ue-Ee.height)/2-Ke,tn=Ue+2*Ke,nn=450,Bt=Ee.x+Ee.width/2-nn,en=Ee.y-(Ue-Ee.height)/2+Ue+20;ue({dotLeft:Ot,dotTop:Xt,dotSize:tn,borderWidth:Ke,textTop:en,textLeft:Bt,textWidth:nn})}},[]);return useEffect(()=>(window.addEventListener("resize",ye),window.addEventListener("scroll",ye),()=>{window.removeEventListener("resize",ye),window.removeEventListener("scroll",ye)}),[ye]),useLayoutEffect(ye,[Y.current,ye]),v?_jsxs(_Fragment,{children:[_jsx(Box,{className:ae.featureWrapper,ref:Y,children:p}),createPortal(_jsx(Box,{className:ae.backdrop,children:_jsx(ClickAwayListener,{onClickAway:j,children:_jsxs(_Fragment,{children:[_jsx(Box,{className:ae.dot,"data-testid":"dot",style:{left:U==null?void 0:U.dotLeft,top:U==null?void 0:U.dotTop,width:U==null?void 0:U.dotSize,height:U==null?void 0:U.dotSize,borderWidth:U==null?void 0:U.borderWidth},onClick:j,onKeyDown:j,role:"button",tabIndex:0,children:_jsx(Box,{className:ae.pulseCircle})}),_jsxs(Box,{className:ae.text,"data-testid":"text",style:{left:U==null?void 0:U.textLeft,top:U==null?void 0:U.textTop,width:U==null?void 0:U.textWidth},children:[_jsx(Typography,{variant:"h2",paragraph:!0,children:l}),_jsx(Typography,{children:u})]})]})})}),D)]}):_jsx(_Fragment,{children:p})}var bo=t(35292);const So=(0,a.Z)(e=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:e.palette.text.secondary,cursor:"default"},primary:{color:e.palette.primary.main},secondary:{color:e.palette.secondary.main},label:{textTransform:"uppercase",fontWeight:e.typography.fontWeightBold,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function or({color:e="primary",disabled:o=!1,href:l="#",icon:u=(0,r.jsx)(bo.Z,{}),label:p,onClick:v,title:j}){const D=So();return o?(0,r.jsxs)($e.Z,{title:j,className:se()(D.link,D.disabled),children:[u,(0,r.jsx)(T.Z,{variant:"caption",component:"span",className:D.label,children:p})]}):(0,r.jsxs)(at,{title:j,className:se()(D.link,D[e]),to:l,onClick:v,children:[u,(0,r.jsx)(T.Z,{variant:"caption",component:"span",className:D.label,children:p})]})}const An=(0,a.Z)(e=>({links:{margin:e.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:e.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function fr(e){const{links:o}=e,l=An();return(0,r.jsx)("nav",{className:l.links,children:o.map((u,p)=>(0,r.jsx)(or,{...u},p+1))})}const gr=e=>{const o=e==="dark"?"16%":"97%";return`
|
|
16
|
-
hsl(0, 0%, ${o}) 0%,
|
|
17
|
-
hsla(0, 0%, ${o}, 0.987) 8.1%,
|
|
18
|
-
hsla(0, 0%, ${o}, 0.951) 15.5%,
|
|
19
|
-
hsla(0, 0%, ${o}, 0.896) 22.5%,
|
|
20
|
-
hsla(0, 0%, ${o}, 0.825) 29%,
|
|
21
|
-
hsla(0, 0%, ${o}, 0.741) 35.3%,
|
|
22
|
-
hsla(0, 0%, ${o}, 0.648) 41.2%,
|
|
23
|
-
hsla(0, 0%, ${o}, 0.55) 47.1%,
|
|
24
|
-
hsla(0, 0%, ${o}, 0.45) 52.9%,
|
|
25
|
-
hsla(0, 0%, ${o}, 0.352) 58.8%,
|
|
26
|
-
hsla(0, 0%, ${o}, 0.259) 64.7%,
|
|
27
|
-
hsla(0, 0%, ${o}, 0.175) 71%,
|
|
28
|
-
hsla(0, 0%, ${o}, 0.104) 77.5%,
|
|
29
|
-
hsla(0, 0%, ${o}, 0.049) 84.5%,
|
|
30
|
-
hsla(0, 0%, ${o}, 0.013) 91.9%,
|
|
31
|
-
hsla(0, 0%, ${o}, 0) 100%
|
|
32
|
-
`},eo=100,mr=10,Fr=(0,a.Z)(e=>({root:{position:"relative",display:"flex",flexFlow:"row nowrap",alignItems:"center"},container:{overflow:"auto",scrollbarWidth:0,"&::-webkit-scrollbar":{display:"none"}},fade:{position:"absolute",width:eo,height:`calc(100% + ${mr}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-mr,background:`linear-gradient(90deg, ${gr(e.palette.type)})`},fadeRight:{right:-mr,background:`linear-gradient(270deg, ${gr(e.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-e.spacing(2)},buttonRight:{right:-e.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function Co(e){const[[o,l],u]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=e.current;if(!p){u([0,0]);return}const v=()=>{const j=p.scrollLeft,D=p.scrollWidth-p.offsetWidth-p.scrollLeft;u([j,D])};return v(),p.addEventListener("scroll",v),window.addEventListener("resize",v),()=>{p.removeEventListener("scroll",v),window.removeEventListener("resize",v)}},[e]),[o,l]}function wo(e,o,l){const[u,p]=React.useState(0);return React.useLayoutEffect(()=>{if(u===0)return;const v=window.performance.now(),j=requestAnimationFrame(D=>{if(!e.current)return;const Y=D-v,U=Math.abs(u)*Y/o,ae=Math.max(l,U)*Math.sign(u);e.current.scrollBy({left:ae});const ye=u-ae;Math.sign(u)!==Math.sign(ye)?p(0):p(ye)});return()=>cancelAnimationFrame(j)},[e,u,o,l]),p}function to(e){const{scrollStep:o=100,scrollSpeed:l=50,minScrollDistance:u=5,children:p,...v}=e,j=Fr(e),D=React.useRef(),[Y,U]=Co(D),ue=wo(D,l,u),ae=ye=>{D.current&&ue(ye?o:-o)};return _jsxs(Box,{...v,className:j.root,children:[_jsx(Grid,{container:!0,direction:"row",wrap:"nowrap",className:j.container,ref:D,children:p}),_jsx(Box,{className:classNames(j.fade,j.fadeLeft,{[j.fadeHidden]:Y===0})}),_jsx(Box,{className:classNames(j.fade,j.fadeRight,{[j.fadeHidden]:U===0})}),Y>0&&_jsx(IconButton,{title:"Scroll Left",onClick:()=>ae(!1),className:classNames(j.button,j.buttonLeft,{}),children:_jsx(ChevronLeftIcon,{})}),U>0&&_jsx(IconButton,{title:"Scroll Right",onClick:()=>ae(!0),className:classNames(j.button,j.buttonRight,{}),children:_jsx(ChevronRightIcon,{})})]})}const qn=(0,a.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function Ur(e){const o=qn(e),{shorthand:l,alpha:u}=e;return l?_jsx(Typography,{component:"span",className:o[u?"alpha":"beta"],style:{fontSize:"120%"},children:u?_jsx(_Fragment,{children:"\u03B1"}):_jsx(_Fragment,{children:"\u03B2"})}):_jsx(Typography,{component:"span",className:o[u?"alpha":"beta"],children:u?"Alpha":"Beta"})}const Rr=(0,g.lazy)(()=>Promise.all([t.e(5869),t.e(6051)]).then(t.bind(t,76051)).then(e=>({default:e.RealLogViewer})));function jo(e){const{Progress:o}=(0,M.qD)().getComponents();return(0,r.jsx)(g.Suspense,{fallback:(0,r.jsx)(o,{}),children:(0,r.jsx)(Rr,{...e})})}var Mr=t(28865),zr=t(60251);const Wr=(0,a.Z)(e=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${e.palette.border}`},"& th, & td":{border:`1px solid ${e.palette.border}`,padding:e.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:e.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:e.palette.background.paper},"& tr":{backgroundColor:e.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:e.palette.background.default},"& a":{color:e.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),no=(e,o)=>o?typeof o=="string"?e+o:g.Children.toArray(o.props.children).reduce(no,e):e,er=({level:e,children:o})=>{const p=g.Children.toArray(o).reduce(no,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return g.createElement(`h${e}`,{id:p},o)},Eo={code:({inline:e,className:o,children:l,...u})=>{const p=String(l).replace(/\n+$/,""),v=/language-(\w+)/.exec(o||"");return!e&&v?(0,r.jsx)(De,{language:v[1],text:p}):(0,r.jsx)("code",{className:o,...u,children:l})},h1:er,h2:er,h3:er,h4:er,h5:er,h6:er};function Ao(e){const{content:o,dialect:l="gfm",linkTarget:u,transformLinkUri:p,transformImageUri:v,className:j}=e,D=Wr();return(0,r.jsx)(Mr.D,{remarkPlugins:l==="gfm"?[zr.Z]:[],className:`${D.markdown} ${j}`,children:o,components:Eo,linkTarget:u,transformLinkUri:p,transformImageUri:v})}var Vr=t(23054);const ro=(0,a.Z)(e=>({root:{paddingLeft:e.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),_o=({request:e,busy:o,setBusy:l})=>{const u=ro(),[p,v]=useState(),j=async()=>{l(!0);try{await e.trigger()}catch(Y){v(isError(Y)?Y.message:"An unspecified error occurred")}finally{l(!1)}},D=e.provider.icon;return _jsxs(ListItem,{disabled:o,classes:{root:u.root},children:[_jsx(ListItemAvatar,{children:_jsx(D,{fontSize:"large"})}),_jsx(ListItemText,{primary:e.provider.title,secondary:p&&_jsx(Typography,{color:"error",children:p})}),_jsx(Button,{color:"primary",variant:"contained",onClick:j,children:"Log in"})]})};var xr=null;const To=(0,a.Z)(e=>({dialog:{paddingTop:e.spacing(1)},title:{minWidth:0},titleHeading:{fontSize:e.typography.h6.fontSize},contentList:{padding:0},actionButtons:{padding:e.spacing(2,0)}}),{name:"OAuthRequestDialog"});function Io(e){const o=To(),[l,u]=useState(!1),p=useApi(oauthRequestApiRef),v=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),j=()=>{v.forEach(D=>D.reject())};return _jsxs(Dialog,{open:Boolean(v.length),fullWidth:!0,maxWidth:"xs",classes:{paper:o.dialog},"aria-labelledby":"oauth-req-dialog-title",children:[_jsxs("main",{children:[_jsx(DialogTitle,{classes:{root:o.title},id:"oauth-req-dialog-title",children:_jsx(Typography,{className:o.titleHeading,variant:"h1",children:"Login Required"})}),_jsx(DialogContent,{dividers:!0,classes:{root:o.contentList},children:_jsx(List,{children:v.map(D=>_jsx(LoginRequestListItem,{request:D,busy:l,setBusy:u},D.provider.title))})})]}),_jsx(DialogActions,{classes:{root:o.actionButtons},children:_jsx(Button,{onClick:j,children:"Reject All"})})]})}var Ro=t(15277),Lo=t.n(Ro),Lr=t(29862);const br=(0,a.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Sr(e){const[o,l]=(0,g.useState)(!1),u=(0,Lr.t)(),p=br(),v=D=>{u()&&l(D)};var j;return(0,r.jsx)(Fe.ZP,{title:(j=e.title)!==null&&j!==void 0?j:e.text||"",placement:e.placement,disableHoverListener:!o,children:(0,r.jsx)(Lo(),{text:e.text,line:e.line,onToggled:v,containerClassName:p.container})})}var oo=t(67358);function Po(e){const o=(0,St.Z)(),[l,u]=(0,g.useState)(!1);return(0,g.useEffect)(()=>{const p=setTimeout(()=>u(!0),o.transitions.duration.short);return()=>clearTimeout(p)},[o.transitions.duration.short]),l?(0,r.jsx)(oo.Z,{...e,"data-testid":"progress"}):(0,r.jsx)($e.Z,{display:"none"})}var so=t(94339),On=t(14503),es=t(24579),io=t(32552),Bn=t(15459),ts=t(27597);const ns=(0,a.Z)(e=>({root:{maxWidth:"fit-content",padding:e.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:e.palette.textSubtle},arrow:{color:e.palette.textSubtle}}),{name:"BackstageBottomLink"});function rs(e){const{link:o,title:l,onClick:u}=e,p=ns();return(0,r.jsxs)($e.Z,{children:[(0,r.jsx)(d.Z,{}),(0,r.jsx)(at,{to:o,onClick:u,underline:"none",children:(0,r.jsxs)($e.Z,{display:"flex",alignItems:"center",className:p.root,children:[(0,r.jsx)($e.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1,children:(0,r.jsx)(T.Z,{children:(0,r.jsx)("strong",{children:l})})}),(0,r.jsx)(ts.Z,{className:p.arrow})]})})]})}const os=e=>{const{slackChannel:o}=e;if(o){if(typeof o=="string")return(0,r.jsxs)(T.Z,{children:["Please contact ",o," for help."]});if(!o.href)return(0,r.jsxs)(T.Z,{children:["Please contact ",o.name," for help."]})}else return null;return(0,r.jsx)(We,{to:o.href,variant:"contained",children:o.name})},sr=class extends g.Component{componentDidCatch(o,l){console.error(`ErrorBoundary, error: ${o}, info: ${l}`),this.setState({error:o,errorInfo:l})}render(){const{slackChannel:o,children:l}=this.props,{error:u}=this.state;return u?(0,r.jsx)(w,{title:"Something Went Wrong",error:u,children:(0,r.jsx)(os,{slackChannel:o})}):l}constructor(o){super(o),this.state={error:void 0,errorInfo:void 0}}},ko=(0,a.Z)(e=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:e.spacing(2,2,2,2.5)},headerTitle:{fontWeight:e.typography.fontWeightBold},headerSubheader:{paddingTop:e.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),Oo=(0,Bn.Z)(e=>({root:{display:"inline-block",padding:e.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(On.Z),ao={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 Pr(e){const{title:o,subheader:l,divider:u=!0,deepLink:p,slackChannel:v,errorBoundaryProps:j,variant:D,children:Y,headerStyle:U,headerProps:ue,icon:ae,action:ye,actionsClassName:Ee,actions:Ue,cardClassName:Ke,actionsTopRight:Ot,className:Xt,noPadding:tn,titleTypographyProps:nn}=e,Bt=ko();let en={},Qt={};D&&D.split(/[\s]+/g).forEach(Ar=>{en={...en,...ao.card[Ar]},Qt={...Qt,...ao.cardContent[Ar]}});const wr=()=>!l&&!ae?null:(0,r.jsxs)("div",{className:Bt.headerSubheader,"data-testid":"info-card-subheader",children:[l&&(0,r.jsx)("div",{className:Bt.subheader,children:l}),ae]}),jr=j||(v?{slackChannel:v}:{});return(0,r.jsx)(so.Z,{style:en,className:Xt,children:(0,r.jsxs)(sr,{...jr,children:[o&&(0,r.jsx)(io.Z,{classes:{root:Bt.header,title:Bt.headerTitle,subheader:Bt.headerSubheader,avatar:Bt.headerAvatar,action:Bt.headerAction,content:Bt.headerContent},title:o,subheader:wr(),action:ye,style:{...U},titleTypographyProps:nn,...ue}),Ot&&(0,r.jsx)(Oo,{children:Ot}),u&&(0,r.jsx)(d.Z,{}),(0,r.jsx)(es.Z,{className:se()(Ke,{[Bt.noPadding]:tn}),style:Qt,children:Y}),Ue&&(0,r.jsx)(On.Z,{className:Ee,children:Ue}),p&&(0,r.jsx)(rs,{...p})]})})}var Hr=t(39307);const ss=(0,a.Z)(e=>({root:{position:"relative",lineHeight:0},overlay:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -60%)",fontSize:e.typography.pxToRem(45),fontWeight:e.typography.fontWeightBold,color:e.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"}),b={fractional:!0,inverse:!1,unit:"%",max:100},S=({palette:e,value:o,inverse:l,max:u})=>{if(isNaN(o))return"#ddd";const p=u||b.max,v=l?p-o:o;return v<p/3?e.status.error:v<p*(2/3)?e.status.warning:e.status.ok};function B(e){const[o,l]=useState(null),{getColor:u=S}=e,p=ss(e),{palette:v}=useTheme(),{value:j,fractional:D,inverse:Y,unit:U,max:ue,description:ae}={...b,...e},ye=D?Math.round(j*ue):j,Ee=ue!==100?Math.round(j):ye,[Ue,Ke]=useState(!1);return useEffect(()=>{const Ot=o,Xt=()=>Ke(!0),tn=()=>Ke(!1);return Ot&&ae?(Ot.addEventListener("mouseenter",Xt),Ot.addEventListener("mouseleave",tn),()=>{Ot.removeEventListener("mouseenter",Xt),Ot.removeEventListener("mouseleave",tn)}):()=>{Ke(!1)}},[ae,o]),_jsxs(Box,{ref:l,className:p.root,children:[_jsx(Circle,{strokeLinecap:"butt",percent:ye,strokeWidth:12,trailWidth:12,strokeColor:u({palette:v,value:Ee,inverse:Y,max:ue}),className:p.circle}),ae&&Ue?_jsx(Box,{className:p.description,children:ae}):_jsx(Box,{className:p.overlay,children:isNaN(j)?"N/A":`${Ee}${U}`})]})}const F=(0,a.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function _(e){const o=F(e),{title:l,subheader:u,progress:p,inverse:v,deepLink:j,description:D,icon:Y,variant:U,getColor:ue}=e,ae={inverse:v,description:D,getColor:ue,value:p};return _jsx(Box,{className:o.root,children:_jsx(InfoCard,{title:l,subheader:u,deepLink:j,variant:U,icon:Y,children:_jsx(Gauge,{...ae})})})}function ie(e){const{value:o,getColor:l=getProgressColor}=e,{palette:u}=useTheme();if(isNaN(o))return null;let p=Math.round(o*100*100)/100;p>100&&(p=100);const v=l({palette:u,value:p,inverse:!1,max:100});return _jsx(Tooltip,{title:`${p}%`,children:_jsx(Typography,{component:"span",children:_jsx(Line,{percent:p,strokeWidth:4,trailWidth:4,strokeColor:v})})})}var te=t(21324),fe=t(7089),Ce=t(1292),je=t(42494),me=t(74603),ke=t(56939),Qe=t(12231),it=t(73698),nt=t(72379);const Be=(0,a.Z)(e=>(0,$.Z)({icon:{position:"absolute",right:e.spacing(.5),pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Zt=()=>{const e=Be();return(0,r.jsx)(nt.Z,{className:e.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"})})};const mn=(0,a.Z)(e=>(0,$.Z)({icon:{position:"absolute",right:e.spacing(.5),pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var Tn=()=>{const e=mn();return(0,r.jsx)(nt.Z,{className:e.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"})})};const vn=(0,Bn.Z)(e=>(0,$.Z)({root:{"label + &":{marginTop:e.spacing(3)}},input:{borderRadius:e.shape.borderRadius,position:"relative",backgroundColor:e.palette.background.paper,border:"1px solid #ced4da",fontSize:e.typography.body1.fontSize,padding:e.spacing(1.25,3.25,1.25,1.5),transition:e.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:e.palette.background.paper,borderRadius:e.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(me.Z),jn=(0,a.Z)(e=>(0,$.Z)({formControl:{margin:`${e.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:e.typography.body2.fontSize,fontFamily:e.typography.fontFamily,color:e.palette.text.primary,"&.Mui-focused":{color:e.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:e.typography.body2.fontSize,fontFamily:e.typography.fontFamily,color:e.palette.text.primary,"&.Mui-focused":{color:e.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function En(e){const{multiple:o,items:l,label:u,placeholder:p,selected:v,onChange:j,triggerReset:D,native:Y=!1,disabled:U=!1,margin:ue}=e,ae=jn(),[ye,Ee]=(0,g.useState)(v||(o?[]:"")),[Ue,Ke]=(0,g.useState)(!1);(0,g.useEffect)(()=>{Ee(o?[]:"")},[D,o]),(0,g.useEffect)(()=>{v!==void 0&&Ee(v)},[v]);const Ot=Bt=>{Ee(Bt.target.value),j(Bt.target.value)},Xt=Bt=>{if(U){Bt.preventDefault();return}Ke(en=>o&&!(Bt.target instanceof HTMLElement)?!0:!en)},tn=()=>{Ke(!1)},nn=Bt=>()=>{const en=ye.filter(Qt=>Qt!==Bt);Ee(en),j(en)};return(0,r.jsx)($e.Z,{className:ae.root,children:(0,r.jsx)(Ce.Z,{onClickAway:tn,children:(0,r.jsxs)(je.Z,{className:ae.formControl,children:[(0,r.jsx)(ke.Z,{className:ae.formLabel,children:u}),(0,r.jsxs)(it.Z,{"aria-label":u,value:ye,native:Y,disabled:U,"data-testid":"select",displayEmpty:!0,multiple:o,margin:ue,onChange:Ot,onClick:Xt,open:Ue,input:(0,r.jsx)(vn,{}),label:u,tabIndex:0,renderValue:Bt=>{var en;return o&&ye.length!==0?(0,r.jsx)($e.Z,{className:ae.chips,children:Bt.map(Qt=>{var wr,jr;return(0,r.jsx)(fe.Z,{label:(wr=l.find(Er=>Er.value===Qt))===null||wr===void 0?void 0:wr.label,clickable:!0,onDelete:nn(Qt),className:ae.chip},(jr=l.find(Er=>Er.value===Qt))===null||jr===void 0?void 0:jr.value)})}):(0,r.jsx)(T.Z,{children:ye.length===0?p||"":(en=l.find(Qt=>Qt.value===Bt))===null||en===void 0?void 0:en.label})},IconComponent:()=>Ue?(0,r.jsx)(Tn,{}):(0,r.jsx)(Zt,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[p&&!o&&(0,r.jsx)(Qe.Z,{value:[],children:p}),Y?l&&l.map(Bt=>(0,r.jsx)("option",{value:Bt.value,children:Bt.label},Bt.value)):l&&l.map(Bt=>(0,r.jsxs)(Qe.Z,{value:Bt.value,children:[o&&(0,r.jsx)(te.Z,{color:"primary",checked:ye.includes(Bt.value)||!1,className:ae.checkbox}),Bt.label]},Bt.value))]})]})})})}const vr=()=>{},kr=g.createContext({stepperLength:0,stepIndex:0,setStepIndex:vr,stepHistory:[],setStepHistory:vr,onStepChange:vr});function lo(e){const{children:o,elevated:l,onStepChange:u,activeStep:p=0}=e,[v,j]=useState(p),[D,Y]=useState([0]);useEffect(()=>{j(p)},[p]);const U=[];let ue;return Children.forEach(o,ae=>{isValidElement(ae)&&(ae.props.end?ue=ae:U.push(ae))}),_jsxs(_Fragment,{children:[_jsx(kr.Provider,{value:{stepIndex:v,setStepIndex:j,stepHistory:D,setStepHistory:Y,onStepChange:u,stepperLength:Children.count(o)},children:_jsx(MuiStepper,{activeStep:v,orientation:"vertical",elevation:l?2:0,children:U})}),v>=Children.count(o)-1&&ue]})}const In=(0,a.Z)(e=>({root:{marginTop:e.spacing(3),"& button":{marginRight:e.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),$n=({text:e,handleClick:o})=>_jsx(Button,{onClick:o,children:e||"Reset"}),Cr=({text:e,handleClick:o,disabled:l,last:u,stepIndex:p})=>_jsx(Button,{variant:"contained",color:"primary",disabled:l,"data-testid":`nextButton-${p}`,onClick:o,children:e||(u?"Finish":"Next")}),Rs=({text:e,handleClick:o,disabled:l,stepIndex:u})=>_jsx(Button,{variant:"outlined",color:"primary",disabled:l,"data-testid":`skipButton-${u}`,onClick:o,children:e||"Skip"}),Ls=({text:e,handleClick:o,disabled:l,stepIndex:u})=>_jsx(Button,{onClick:o,"data-testid":`backButton-${u}`,disabled:l,children:e||"Back"}),Oi=({actions:e={},children:o})=>{const l=In(),{stepperLength:u,stepIndex:p,setStepIndex:v,stepHistory:j,setStepHistory:D,onStepChange:Y}=useContext(VerticalStepperContext),U=(Ee,Ue)=>{Ue&&Ue(),Y&&Y(p,Ee),v(Ee)},ue=()=>{const Ee=e.nextStep?e.nextStep(p,u-1):p+1;U(Ee,e.onNext),D([...j,Ee])},ae=()=>{j.pop(),U(j[j.length-1],e.onBack),D([...j])},ye=()=>{U(0,e.onRestart),D([0])};return _jsxs(Box,{className:l.root,children:[[void 0,!0].includes(e.showBack)&&p!==0&&_jsx(Ls,{text:e.backText,handleClick:ae,disabled:p===0,stepIndex:p}),e.showSkip&&_jsx(Rs,{text:e.skipText,handleClick:ue,disabled:!!u&&p>=u||!!e.canSkip&&!e.canSkip(),stepIndex:p}),[void 0,!0].includes(e.showNext)&&_jsx(Cr,{text:e.nextText,handleClick:ue,disabled:!!u&&p>=u||!!e.canNext&&!e.canNext(),stepIndex:p}),e.showRestart&&p!==0&&_jsx($n,{text:e.restartText,handleClick:ye,stepIndex:p}),o]})},is=(0,a.Z)(e=>({end:{padding:e.spacing(3)}}),{name:"SimpleStepperStep"});function Ps(e){const{title:o,children:l,end:u,actions:p,...v}=e,j=is();return u?_jsxs(Box,{className:j.end,children:[_jsx(Typography,{variant:"h6",children:o}),l,_jsx(SimpleStepperFooter,{actions:{...p||{},showNext:!1}})]}):_jsxs(MuiStep,{...v,children:[_jsx(StepLabel,{children:_jsx(Typography,{variant:"h6",children:o})}),_jsxs(StepContent,{children:[l,_jsx(SimpleStepperFooter,{actions:p})]})]})}const Or=(0,a.Z)(e=>({status:{fontWeight:e.typography.fontWeightMedium,"&::before":{width:"0.7em",height:"0.7em",display:"inline-block",marginRight:e.spacing(1),borderRadius:"50%",content:'""'}},ok:{"&::before":{backgroundColor:e.palette.status.ok}},warning:{"&::before":{backgroundColor:e.palette.status.warning}},error:{"&::before":{backgroundColor:e.palette.status.error}},pending:{"&::before":{backgroundColor:e.palette.status.pending}},running:{"&::before":{backgroundColor:e.palette.status.running}},aborted:{"&::before":{backgroundColor:e.palette.status.aborted}}}),{name:"BackstageStatus"});function Bi(e){const o=Or(e);return _jsx(Typography,{component:"span",className:classNames(o.status,o.ok),"aria-label":"Status ok","aria-hidden":"true",...e})}function $i(e){const o=Or(e);return _jsx(Typography,{component:"span",className:classNames(o.status,o.warning),"aria-label":"Status warning","aria-hidden":"true",...e})}function ks(e){const o=Or(e);return _jsx(Typography,{component:"span",className:classNames(o.status,o.error),"aria-label":"Status error","aria-hidden":"true",...e})}function ir(e){const o=Or(e);return _jsx(Typography,{component:"span",className:classNames(o.status,o.pending),"aria-label":"Status pending","aria-hidden":"true",...e})}function ar(e){const o=Or(e);return _jsx(Typography,{component:"span",className:classNames(o.status,o.running),"aria-label":"Status running","aria-hidden":"true",...e})}function lr(e){const o=Or(e);return _jsx(Typography,{component:"span",className:classNames(o.status,o.aborted),"aria-label":"Status aborted","aria-hidden":"true",...e})}var as=t(74600),ls=t(15584);const Os=e=>(0,$.Z)({root:{fontWeight:e.typography.fontWeightBold,whiteSpace:"nowrap",paddingRight:e.spacing(4),border:"0",verticalAlign:"top"}}),Bs={root:{border:"0",verticalAlign:"top"}},$s=e=>(0,$.Z)({root:{margin:e.spacing(0,0,-1,0)}}),cs=e=>(0,$.Z)({root:{padding:e.spacing(0,0,1,0)},random:{}}),ds=(0,Bn.Z)(Os,{name:"BackstageMetadataTableTitleCell"})(ls.Z),Zs=(0,Bn.Z)(Bs,{name:"BackstageMetadataTableCell"})(ls.Z),Zi=({dense:e,children:o})=>_jsx(Table,{size:e?"small":"medium",children:_jsx(TableBody,{children:o})}),Di=({title:e,children:o,...l})=>_jsxs(TableRow,{children:[e&&_jsx(ds,{children:e}),_jsx(Zs,{colSpan:e?1:2,...l,children:o})]}),us=(0,Bn.Z)($s,{name:"BackstageMetadataTableList"})(({classes:e,children:o})=>(0,r.jsx)(et.Z,{disablePadding:!0,className:e.root,children:o})),Ds=(0,Bn.Z)(cs,{name:"BackstageMetadataTableListItem"})(({classes:e,children:o})=>(0,r.jsx)(Ze.Z,{className:e.root,children:o})),Bo=(0,$.Z)({root:{margin:"0 0",listStyleType:"none"}}),Ns=e=>(0,$.Z)({root:{...Bo.root,paddingLeft:e.spacing(1)}}),hs=(0,Bn.Z)(Bo,{name:"BackstageStructuredMetadataTableList"})(({classes:e,children:o})=>(0,r.jsx)(us,{classes:e,children:o})),Gr=(0,Bn.Z)(Ns,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:e,children:o})=>(0,r.jsx)(us,{classes:e,children:o}));function ps(e,o){const l=e.map((u,p)=>_jsx(MetadataListItem,{children:$o(u)},p));return o?_jsx(Gr,{children:l}):_jsx(hs,{children:l})}function Fs(e,o,l){const u=Object.keys(e).map(p=>{const v=$o(e[p],!0),j=l&&l.titleFormat?l.titleFormat(p):startCase(p);return _jsxs(MetadataListItem,{children:[_jsx(Typography,{variant:"body2",component:"span",children:`${j}: `}),v]},p)});return o?_jsx(Gr,{children:u}):_jsx(hs,{children:u})}function $o(e,o,l){return React.isValidElement(e)?_jsx(Fragment,{children:e}):typeof e=="object"&&!Array.isArray(e)?Fs(e,o,l):Array.isArray(e)?ps(e,l):typeof e=="boolean"?_jsx(Fragment,{children:e?"\u2705":"\u274C"}):_jsx(Typography,{variant:"body2",component:"span",children:e})}const Ni=({value:e,options:o})=>_jsx(Fragment,{children:$o(e,o)}),Br=({title:e,value:o,options:l})=>_jsx(MetadataTableItem,{title:l&&l.titleFormat?l.titleFormat(e):startCase(e),children:_jsx(Ni,{value:o,options:l})});function Us(e,o){return Object.keys(e).map(l=>_jsx(Br,{title:l,value:e[l],options:o},l))}function Vn(e){const{metadata:o,dense:l=!0,options:u}=e,p=Us(o,u||{});return _jsx(MetadataTable,{dense:l,children:p})}var Fi=t(49429),Ui=t(86136),Ms=t(79784),zs=t(19126),Ws=t.n(zs);function Mi(e){return qs.stringify(e,{strictNullHandling:!0})}function co(e){return qs.parse(e,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function fs(e,o){return co(e)[o]}function uo(e,o,l){const u={...co(e),[o]:l};return Mi(u)}function Zo(e,o=250){const[l,u]=useSearchParams(),p=l.toString(),[v,j]=useState(fs(p,e));return useEffect(()=>{const D=fs(p,e);j(Y=>isEqual(D,Y)?Y:D)},[p,j,e]),useDebouncedEffect(()=>{const D=uo(p,e,v);p!==D&&u(D,{replace:!0})},[u,v,p,e],o),[v,j]}const ho={url:"https://github.com/backstage/backstage/issues",items:[{title:"Support Not Configured",icon:"warning",links:[{title:"Add `app.support` config key",url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]};function gs(){const o=(0,M.I_)().get(M.Ds),l=o==null?void 0:o.getOptionalConfig("app.support");if(!l)return ho;var u;return{url:l.getString("url"),items:l.getConfigArray("items").flatMap(p=>({title:p.getString("title"),icon:p.getOptionalString("icon"),links:((u=p.getOptionalConfigArray("links"))!==null&&u!==void 0?u:[]).flatMap(v=>({url:v.getString("url"),title:v.getString("title")}))}))}}var ms=t(80079);function Yn(e,o){const u=(0,M.qD)().getSystemIcon(e);return u?(0,r.jsx)(u,{...o}):(0,r.jsx)(ms.Z,{...o})}function zi(e){return Yn("brokenImage",e)}function Wi(e){return Yn("catalog",e)}function Vi(e){return Yn("chat",e)}function Hi(e){return Yn("dashboard",e)}function Gi(e){return Yn("docs",e)}function Pa(e){return Yn("email",e)}function Ki(e){return Yn("github",e)}function Yi(e){return Yn("group",e)}function $r(e){return Yn("help",e)}function Ji(e){return Yn("user",e)}function Xi(e){return Yn("warning",e)}const vs=(0,a.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Vs=({icon:e})=>{const o=(0,M.qD)();var l;const u=e&&(l=o.getSystemIcon(e))!==null&&l!==void 0?l:$r;return(0,r.jsx)(u,{})};var Do;const Hs=({link:e})=>(0,r.jsx)(at,{to:e.url,children:(Do=e.title)!==null&&Do!==void 0?Do:e.url}),Gs=({item:e})=>{var o;return(0,r.jsxs)(Ze.Z,{children:[(0,r.jsx)(Ui.Z,{children:(0,r.jsx)(Vs,{icon:e.icon})}),(0,r.jsx)(pt.Z,{primary:e.title,secondary:(o=e.links)===null||o===void 0?void 0:o.reduce((l,u,p)=>[...l,p>0&&(0,r.jsx)("br",{},p),(0,r.jsx)(Hs,{link:u},u.url)],[])})]})};function Qi(e){const{title:o,items:l,children:u}=e,{items:p}=gs(),[v,j]=(0,g.useState)(!1),[D,Y]=(0,g.useState)(null),U=vs(),ue=(0,Je.Z)(Ee=>Ee.breakpoints.down("sm")),ae=Ee=>{Y(Ee.currentTarget),j(!0)},ye=()=>{j(!1)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)($e.Z,{display:"flex",ml:1,children:ue?(0,r.jsx)(Lt.Z,{color:"primary",size:"small",onClick:ae,"data-testid":"support-button","aria-label":"Support",children:(0,r.jsx)($r,{})}):(0,r.jsx)(H.Z,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:ae,startIcon:(0,r.jsx)($r,{}),children:"Support"})}),(0,r.jsxs)(Ms.ZP,{"data-testid":"support-button-popover",open:v,anchorEl:D,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:ye,children:[(0,r.jsxs)(et.Z,{className:U.popoverList,children:[o&&(0,r.jsx)(Ze.Z,{alignItems:"flex-start",children:(0,r.jsx)(T.Z,{variant:"subtitle1",children:o})}),g.Children.map(u,(Ee,Ue)=>(0,r.jsx)(Ze.Z,{alignItems:"flex-start",children:Ee},`child-${Ue}`)),(l!=null?l:p).map((Ee,Ue)=>(0,r.jsx)(Gs,{item:Ee},`item-${Ue}`))]}),(0,r.jsx)(Fi.Z,{children:(0,r.jsx)(H.Z,{color:"primary",onClick:ye,"aria-label":"Close",children:"Close"})})]})]})}var No=t(18671),Fo=t(16060);const po=72,ys=24,Uo=18,_n={drawerWidthClosed:po,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:po,iconSize:po-ys*2,iconPadding:ys,selectedIndicatorWidth:3,userBadgePadding:Uo,userBadgeDiameter:po-Uo*2,mobileSidebarHeight:56},Ks=e=>({..._n,...e,iconContainerWidth:_n.drawerWidthClosed,iconSize:_n.drawerWidthClosed-_n.iconPadding*2,userBadgeDiameter:_n.drawerWidthClosed-_n.userBadgePadding*2}),xs={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:_n.defaultOpenDelayMs+200},Ys=e=>({...xs,...e}),qi="@backstage/core/sidebar-intro-dismissed",cr=(0,g.createContext)({sidebarConfig:_n,submenuConfig:xs}),Kr=(0,g.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var _i=t(50023),ea=t(4190),Js=t(87685),Xs=t(44882),Yr=t(51837);const Qs={isOpen:!1,setOpen:()=>{}},_s=(0,g.createContext)(Qs),Mo=(0,Yr.CT)("sidebar-open-state-context");function zo(e){const{children:o,value:l}=e;return(0,r.jsx)(_s.Provider,{value:l,children:(0,r.jsx)(Mo.Provider,{value:(0,Yr.EI)({1:l}),children:o})})}const Wo=()=>{const e=(0,g.useContext)(Mo),o=(0,g.useContext)(_s);if(e===void 0)return o||Qs;const l=e.atVersion(1);if(l===void 0)throw new Error("No context found for version 1.");return l};var ei=t(57998);const ti={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},ni=(0,g.createContext)(ti),ri=(0,Yr.CT)("sidebar-pin-state-context");function ta(e){const{children:o,value:l}=e;return(0,r.jsx)(ni.Provider,{value:l,children:(0,r.jsx)(ri.Provider,{value:(0,Yr.EI)({1:l}),children:o})})}const Jr=()=>{const e=(0,g.useContext)(ri),o=(0,g.useContext)(ni);if(e===void 0)return o||ti;const l=e.atVersion(1);if(l===void 0)throw new Error("No context found for version 1.");return l},Zn=(0,a.Z)(e=>({root:{flexGrow:0,margin:e.spacing(0,2),color:e.palette.navigation.color},selected:o=>({color:`${e.palette.navigation.selectedColor}!important`,borderTop:`solid ${o.sidebarConfig.selectedIndicatorWidth}px ${e.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),na=e=>{const{to:o,label:l,icon:u,value:p}=e,{sidebarConfig:v}=(0,g.useContext)(cr),j=Zn({sidebarConfig:v}),D=(0,k.TH)(),{selectedMenuItemIndex:Y,setSelectedMenuItemIndex:U}=(0,g.useContext)(si),ue=(ye,Ee)=>{U(Ee===Y?-1:Ee)},ae=p===Y&&Y>=0||p!==Y&&!(Y>=0)&&o===D.pathname;return(0,r.jsx)(ei.Z,{"aria-label":l,label:l,icon:u,component:at,to:o||D.pathname,onChange:ue,value:p,selected:ae,classes:j})},bs=e=>{const{children:o,to:l,label:u,icon:p,value:v}=e,{isMobile:j}=Jr();return j?(0,r.jsx)(na,{to:l,label:u,icon:p,value:v}):(0,r.jsx)(r.Fragment,{children:o})},oi=(0,a.Z)(e=>({root:{position:"fixed",backgroundColor:e.palette.navigation.background,color:e.palette.navigation.color,bottom:0,left:0,right:0,zIndex:e.zIndex.snackbar,borderTop:"1px solid #383838"},overlay:o=>({background:e.palette.navigation.background,width:"100%",bottom:`${o.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${o.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:e.palette.text.primary,alignItems:"center",justifyContent:"space-between",padding:e.spacing(2,3)},overlayHeaderClose:{color:e.palette.text.primary},marginMobileSidebar:o=>({marginBottom:`${o.sidebarConfig.mobileSidebarHeight}px`})})),ra=e=>(0,ne.orderBy)(e,({props:{priority:o}})=>Number.isInteger(o)?o:-1,"desc"),oa=g.createElement(bs).type,sa=({children:e,label:o="Menu",open:l,onClose:u})=>{const{sidebarConfig:p}=(0,g.useContext)(cr),v=oi({sidebarConfig:p});return(0,r.jsxs)(ea.ZP,{anchor:"bottom",open:l,onClose:u,ModalProps:{BackdropProps:{classes:{root:v.marginMobileSidebar}}},classes:{root:v.marginMobileSidebar,paperAnchorBottom:v.overlay},children:[(0,r.jsxs)($e.Z,{className:v.overlayHeader,children:[(0,r.jsx)(T.Z,{variant:"h3",children:o}),(0,r.jsx)(Lt.Z,{onClick:u,classes:{root:v.overlayHeaderClose},children:(0,r.jsx)(Js.Z,{})})]}),(0,r.jsx)($e.Z,{component:"nav",children:e})]})},si=(0,g.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),ia=e=>{const{sidebarConfig:o}=(0,g.useContext)(cr),{children:l}=e,u=oi({sidebarConfig:o}),p=(0,k.TH)(),[v,j]=(0,g.useState)(-1);(0,g.useEffect)(()=>{j(-1)},[p.pathname]);let D=(0,M.vJ)(l,U=>U.getElements().filter(ue=>ue.type===oa));if(l)D.length?D=ra(D):D.push((0,r.jsx)(bs,{icon:(0,r.jsx)(Xs.Z,{}),children:l},"default_menu"));else return null;const Y=v>=0&&!D[v].props.to;return(0,r.jsx)(zo,{value:{isOpen:!0,setOpen:()=>{}},children:(0,r.jsxs)(si.Provider,{value:{selectedMenuItemIndex:v,setSelectedMenuItemIndex:j},children:[(0,r.jsx)(sa,{label:D[v]&&D[v].props.label,open:Y,onClose:()=>j(-1),children:D[v]&&D[v].props.children}),(0,r.jsx)(_i.Z,{className:u.root,"data-testid":"mobile-sidebar-root",component:"nav",children:D})]})})};var Vo;(function(e){e.SIDEBAR_PIN_STATE="sidebarPinState"})(Vo||(Vo={}));const ii={getSidebarPinState(){let e;try{e=JSON.parse(window.localStorage.getItem(Vo.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!e},setSidebarPinState(e){return window.localStorage.setItem(Vo.SIDEBAR_PIN_STATE,JSON.stringify(e))}},aa=(0,a.Z)(e=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[e.breakpoints.up("sm")]:{paddingLeft:o=>o.isPinned?o.sidebarConfig.drawerWidthOpen:o.sidebarConfig.drawerWidthClosed},[e.breakpoints.down("xs")]:{paddingBottom:o=>o.sidebarConfig.mobileSidebarHeight}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),ai=(0,g.createContext)({content:{contentRef:void 0}});function la(e){const[o,l]=(0,g.useState)(()=>ii.getSidebarPinState()),{sidebarConfig:u}=(0,g.useContext)(cr),p=(0,g.useRef)(null),v=(0,g.useMemo)(()=>({content:{contentRef:p}}),[p]);(0,g.useEffect)(()=>{ii.setSidebarPinState(o)},[o]);const j=(0,Je.Z)(U=>U.breakpoints.down("xs"),{noSsr:!0}),D=()=>l(!o),Y=aa({isPinned:o,sidebarConfig:u});return(0,r.jsx)(ta,{value:{isPinned:o,toggleSidebarPinState:D,isMobile:j},children:(0,r.jsx)(ai.Provider,{value:v,children:(0,r.jsx)($e.Z,{className:Y.root,children:e.children})})})}function li(){const{content:e}=(0,g.useContext)(ai);return{focusContent:(0,g.useCallback)(()=>{var l,u;e==null||(l=e.contentRef)===null||l===void 0||(u=l.current)===null||u===void 0||u.focus()},[e]),contentRef:e==null?void 0:e.contentRef}}const Ho=(0,a.Z)(e=>({drawer:o=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:e.zIndex.appBar,background:e.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:o.sidebarConfig.drawerWidthClosed,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"},"& .MuiButtonBase-root":{textTransform:"none"}}),drawerOpen:o=>({width:o.sidebarConfig.drawerWidthOpen,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var Hn;(function(e){e[e.Closed=0]="Closed",e[e.Idle=1]="Idle",e[e.Open=2]="Open"})(Hn||(Hn={}));const ci=e=>{const{sidebarConfig:o}=(0,g.useContext)(cr),{openDelayMs:l=o.defaultOpenDelayMs,closeDelayMs:u=o.defaultCloseDelayMs,disableExpandOnHover:p,children:v}=e,j=Ho({sidebarConfig:o}),D=(0,Je.Z)(Xt=>Xt.breakpoints.down("md"),{noSsr:!0}),[Y,U]=(0,g.useState)(Hn.Closed),ue=(0,g.useRef)(),{isPinned:ae,toggleSidebarPinState:ye}=Jr(),Ee=()=>{ae||p||(ue.current&&(clearTimeout(ue.current),ue.current=void 0),Y!==Hn.Open&&!D&&(ue.current=window.setTimeout(()=>{ue.current=void 0,U(Hn.Open)},l),U(Hn.Idle)))},Ue=()=>{ae||p||(ue.current&&(clearTimeout(ue.current),ue.current=void 0),Y===Hn.Idle?U(Hn.Closed):Y===Hn.Open&&(ue.current=window.setTimeout(()=>{ue.current=void 0,U(Hn.Closed)},u)))},Ke=Y===Hn.Open&&!D||ae,Ot=Xt=>{Xt?(U(Hn.Open),ye()):(U(Hn.Closed),ye())};return(0,r.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,r.jsx)(ui,{}),(0,r.jsx)(zo,{value:{isOpen:Ke,setOpen:Ot},children:(0,r.jsx)($e.Z,{className:j.root,"data-testid":"sidebar-root",onMouseEnter:p?()=>{}:Ee,onFocus:p?()=>{}:Ee,onMouseLeave:p?()=>{}:Ue,onBlur:p?()=>{}:Ue,children:(0,r.jsx)($e.Z,{className:se()(j.drawer,{[j.drawerOpen]:Ke}),children:v})})})]})},di=e=>{var o;const l=Ks((o=e.sidebarOptions)!==null&&o!==void 0?o:{});var u;const p=Ys((u=e.submenuOptions)!==null&&u!==void 0?u:{}),{children:v,disableExpandOnHover:j,openDelayMs:D,closeDelayMs:Y}=e,{isMobile:U}=Jr();return U?(0,r.jsx)(ia,{children:v}):(0,r.jsx)(cr.Provider,{value:{sidebarConfig:l,submenuConfig:p},children:(0,r.jsx)(ci,{openDelayMs:D,closeDelayMs:Y,disableExpandOnHover:j,children:v})})};function ui(){const{sidebarConfig:e}=(0,g.useContext)(cr),{focusContent:o,contentRef:l}=li(),u=Ho({sidebarConfig:e});return l!=null&&l.current?(0,r.jsx)(H.Z,{onClick:o,variant:"contained",className:se()(u.visuallyHidden),children:"Skip to content"}):null}function Ss(e,o){const l=new URLSearchParams(o.search).toString(),u=Ws().parse(l),p=new URLSearchParams(e.search).toString(),v=Ws().parse(p);return(0,ne.isEqual)(o.pathname,e.pathname)&&(0,ne.isMatch)(v,u)}const hi=(0,a.Z)(e=>({item:{height:48,width:"100%","&:hover":{background:"#6f6f6f",color:e.palette.navigation.selectedColor},display:"flex",alignItems:"center",color:e.palette.navigation.color,padding:e.spacing(2.5),cursor:"pointer",position:"relative",background:"none",border:"none"},itemContainer:{width:"100%"},selected:{background:"#6f6f6f",color:"#FFF"},label:{margin:e.spacing(1.75),marginLeft:e.spacing(1),fontSize:e.typography.body2.fontSize,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis",lineHeight:1},subtitle:{fontSize:10,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0","&:hover":{background:"#6f6f6f",color:e.palette.navigation.selectedColor}},textContent:{color:e.palette.navigation.color,paddingLeft:e.spacing(4),paddingRight:e.spacing(1),fontSize:e.typography.body2.fontSize,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"}}),{name:"BackstageSidebarSubmenuItem"}),ca=e=>{const{title:o,subtitle:l,to:u,icon:p,dropdownItems:v}=e,j=hi(),{setIsHoveredOn:D}=useContext(SidebarItemWithSubmenuContext),Y=()=>{D(!1)},U=useResolvedPath(u!=null?u:""),ue=useLocation();let ae=isLocationMatch(ue,U);const[ye,Ee]=useState(!1),Ue=()=>{Ee(!ye)};return v!==void 0?(v.some(Ke=>{const Ot=resolvePath(Ke.to);return ae=isLocationMatch(ue,Ot),ae}),_jsxs(Box,{className:j.itemContainer,children:[_jsx(Tooltip,{title:o,enterDelay:500,enterNextDelay:500,children:_jsxs(Button,{role:"button",onClick:Ue,onTouchStart:Ke=>Ke.stopPropagation(),className:classnames(j.item,ae?j.selected:void 0),children:[p&&_jsx(p,{fontSize:"small"}),_jsxs(Typography,{variant:"subtitle1",className:j.label,children:[o,_jsx("br",{}),l&&_jsx(Typography,{variant:"caption",className:j.subtitle,children:l})]}),ye?_jsx(ArrowDropUpIcon,{className:j.dropdownArrow}):_jsx(ArrowDropDownIcon,{className:j.dropdownArrow})]})}),v&&ye&&_jsx(Box,{className:j.dropdown,children:v.map((Ke,Ot)=>_jsx(Tooltip,{title:Ke.title,enterDelay:500,enterNextDelay:500,children:_jsx(Link,{to:Ke.to,underline:"none",className:j.dropdownItem,onClick:Y,onTouchStart:Xt=>Xt.stopPropagation(),children:_jsx(Typography,{className:j.textContent,children:Ke.title})})},Ot))})]})):_jsx(Box,{className:j.itemContainer,children:_jsx(Tooltip,{title:o,enterDelay:500,enterNextDelay:500,children:_jsxs(Link,{to:u,underline:"none",className:classnames(j.item,ae?j.selected:void 0),onClick:Y,onTouchStart:Ke=>Ke.stopPropagation(),children:[p&&_jsx(p,{fontSize:"small"}),_jsxs(Typography,{variant:"subtitle1",className:j.label,children:[o,_jsx("br",{}),l&&_jsx(Typography,{variant:"caption",className:j.subtitle,children:l})]})]})})})};var Go;const pi=(0,a.Z)(e=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:e.spacing(7)+1},drawer:o=>{var l;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[e.breakpoints.up("sm")]:{marginLeft:o.left,transition:e.transitions.create("margin-left",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(Go=(l=e.palette.navigation.submenu)===null||l===void 0?void 0:l.background)!==null&&Go!==void 0?Go:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:o.submenuConfig.drawerWidthClosed,transitionDelay:`${o.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}},drawerOpen:o=>({width:o.submenuConfig.drawerWidthOpen,[e.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:e.spacing(3),left:0,top:0}}),title:{fontSize:e.typography.h5.fontSize,fontWeight:e.typography.fontWeightMedium,color:"#FFF",padding:e.spacing(2.5),[e.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),da=e=>{const{isOpen:o}=Wo(),{sidebarConfig:l,submenuConfig:u}=(0,g.useContext)(cr),p=o?l.drawerWidthOpen:l.drawerWidthClosed,v=pi({left:p,submenuConfig:u}),{isHoveredOn:j}=(0,g.useContext)(Kr),[D,Y]=(0,g.useState)(!1);return(0,g.useEffect)(()=>{Y(j)},[j]),(0,r.jsxs)($e.Z,{className:se()(v.drawer,{[v.drawerOpen]:D}),children:[(0,r.jsx)(T.Z,{variant:"h5",className:v.title,children:e.title}),e.children]})};var fi=t(26739),fo=t(76600),ua=t(83543),gi=t(59797),Cs=t(98989);const mi=(0,a.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),ha=()=>{const e=mi();return _jsxs(Box,{className:e.iconContainer,children:[_jsx(Box,{className:e.arrow1,children:_jsx(ArrowBackIosIcon,{style:{fontSize:"12px"}})}),_jsx(Box,{children:_jsx(ArrowBackIosIcon,{style:{fontSize:"12px"}})})]})};var pa=null;const vi=(0,a.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),fa=()=>{const e=vi();return _jsxs(Box,{className:e.iconContainer,children:[_jsx(Box,{className:e.arrow1,children:_jsx(ArrowForwardIosIcon,{style:{fontSize:"12px"}})}),_jsx(Box,{children:_jsx(ArrowForwardIosIcon,{style:{fontSize:"12px"}})})]})};var dr=null,Ko,Yo;const yi=e=>(0,a.Z)(o=>{var l,u;return{root:{color:o.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"100%",margin:0,padding:0,textAlign:"inherit",font:"inherit"},closed:{width:e.drawerWidthClosed,justifyContent:"center"},open:{[o.breakpoints.up("sm")]:{width:e.drawerWidthOpen}},highlightable:{"&:hover":{background:(Ko=(l=o.palette.navigation.navItem)===null||l===void 0?void 0:l.hoverBackground)!==null&&Ko!==void 0?Ko:"#404040"}},highlighted:{background:(Yo=(u=o.palette.navigation.navItem)===null||u===void 0?void 0:u.hoverBackground)!==null&&Yo!==void 0?Yo:"#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:e.iconContainerWidth,marginRight:-o.spacing(2),display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"0"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:o.typography.fontWeightBold,fontSize:o.typography.fontSize},searchFieldHTMLInput:{padding:o.spacing(2,0,2)},searchContainer:{width:e.drawerWidthOpen-e.iconContainerWidth},secondaryAction:{width:o.spacing(6),textAlign:"center",marginRight:o.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:o.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${e.selectedIndicatorWidth}px ${o.palette.navigation.indicator}`,color:o.palette.navigation.selectedColor},"&$closed":{width:e.drawerWidthClosed},"& $closedItemIcon":{paddingRight:e.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-e.selectedIndicatorWidth}}}},{name:"BackstageSidebarItem"});function Xr(e){return(0,g.useMemo)(()=>yi(e),[e])()}const xi=(e,o)=>(0,M.vJ)(e.props.children,l=>{let u=!1;return l.getElements().forEach(({props:{to:p,dropdownItems:v}})=>{if(!u){if(v!=null&&v.length){v.forEach(({to:j})=>u=u||Ss(o,(0,Fo.i3)(j)));return}p&&(u=Ss(o,(0,Fo.i3)(p)))}}),u},[o.pathname]);function ws(e){return e.to===void 0}const bi=g.createElement(da).type,Si=g.forwardRef(function({to:o,end:l,style:u,className:p,activeStyle:v,caseSensitive:j,activeClassName:D="active","aria-current":Y="page",...U},ue){let{pathname:ae}=(0,k.TH)(),{pathname:ye}=(0,k.WU)(o);j||(ae=ae.toLocaleLowerCase("en-US"),ye=ye.toLocaleLowerCase("en-US"));let Ee=ae===ye;!Ee&&!l&&(Ee=ae.startsWith(`${ye}/`));const Ue=Ee?Y:void 0;return(0,r.jsx)(E.rU,{...U,to:o,ref:ue,"aria-current":Ue,style:{...u,...Ee?v:void 0},className:se()([p,Ee?D:void 0])})}),Ci=(0,g.forwardRef)((e,o)=>{const{icon:l,text:u,hasNotifications:p=!1,hasSubmenu:v=!1,disableHighlight:j=!1,onClick:D,children:Y,className:U,...ue}=e,{sidebarConfig:ae}=(0,g.useContext)(cr),ye=Xr(ae),{isOpen:Ee}=Wo(),Ue=!Ee&&v?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},Ke=(0,r.jsxs)($e.Z,{style:Ue,children:[(0,r.jsx)(l,{fontSize:"small"}),!Ee&&v?(0,r.jsx)(Cs.Z,{fontSize:"small"}):(0,r.jsx)(r.Fragment,{})]}),Ot=(0,r.jsx)(fi.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:se()({[ye.closedItemIcon]:!Ee}),children:Ke}),Xt=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)($e.Z,{"data-testid":"login-button",className:ye.iconContainer,children:Ot}),u&&(0,r.jsx)(T.Z,{variant:"subtitle2",className:ye.label,children:u}),(0,r.jsx)("div",{className:ye.secondaryAction,children:Y})]}),tn=Ee?Xt:Ot,nn={onClick:D,className:se()(U,ye.root,Ee?ye.open:ye.closed,ws(e)&&ye.buttonItem,{[ye.highlightable]:!j})};return ws(e)?(0,r.jsx)(H.Z,{role:"button","aria-label":u,...nn,ref:o,children:tn}):(0,r.jsx)(Si,{...nn,activeClassName:ye.selected,to:e.to?e.to:"",ref:o,"aria-label":u||e.to,...ue,children:tn})}),wi=({children:e,...o})=>{const{sidebarConfig:l}=(0,g.useContext)(cr),u=Xr(l),[p,v]=(0,g.useState)(!1),j=(0,k.TH)(),D=xi(e,j),Y=(0,Je.Z)(ye=>ye.breakpoints.down("sm")),U=()=>{v(!0)},ue=()=>{v(!1)},ae=()=>Y?p?(0,r.jsx)(gi.Z,{fontSize:"small",className:u.submenuArrow}):(0,r.jsx)(ua.Z,{fontSize:"small",className:u.submenuArrow}):!p&&(0,r.jsx)(Cs.Z,{fontSize:"small",className:u.submenuArrow});return(0,r.jsx)(Kr.Provider,{value:{isHoveredOn:p,setIsHoveredOn:v},children:(0,r.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:ue,onTouchStart:p?ue:U,onMouseEnter:U,className:se()(p&&u.highlighted),children:[(0,r.jsx)(Ci,{hasSubmenu:!0,className:D?u.selected:"",...o,children:ae()}),p&&e]})})},i=(0,g.forwardRef)((e,o)=>{const[l]=(0,M.vJ)(e.children,u=>u.getElements().filter(p=>p.type===bi));return l?(0,r.jsx)(wi,{...e,children:l}):(0,r.jsx)(Ci,{...e,ref:o})});function n(e){const{sidebarConfig:o}=useContext(SidebarConfigContext),[l,u]=useState(""),p=Xr(o),v=e.icon?e.icon:SearchIcon,j=()=>{e.onSearch(l),u("")},D=ae=>{ae.key==="Enter"&&(ae.preventDefault(),j())},Y=ae=>{u(ae.target.value)},U=ae=>{ae.preventDefault(),ae.stopPropagation()},ue=ae=>{j(),ae.preventDefault()};return _jsx(Box,{className:p.searchRoot,children:_jsx(i,{icon:v,to:e.to,onClick:ue,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:l,onClick:U,onChange:Y,onKeyDown:D,className:p.searchContainer,InputProps:{disableUnderline:!0,className:p.searchField},inputProps:{className:p.searchFieldHTMLInput}})})})}const s=(0,fo.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),c=(0,fo.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),f=(0,fo.Z)("hr")(({theme:e})=>({height:1,width:"100%",background:"#383838",border:"none",margin:e.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),L=e=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:e.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:e.palette.text.hint,borderRadius:"5px"}}),O=(0,fo.Z)("div")(({theme:e})=>{const o=L(e);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":o,"&:hover":o}}),V=()=>{const{sidebarConfig:e}=useContext(SidebarConfigContext),o=Xr(e),{isOpen:l,setOpen:u}=useSidebarOpenState();if(useMediaQuery(j=>j.breakpoints.down("md"),{noSsr:!0}))return null;const v=()=>{u(!l)};return _jsx(Button,{role:"button",onClick:v,className:o.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:o.arrows,children:l?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},ee=(0,a.Z)(e=>({introCard:o=>({color:"#b5b5b5",fontSize:12,width:o.sidebarConfig.drawerWidthOpen,marginTop:e.spacing(2.25),marginBottom:e.spacing(1.5),paddingLeft:o.sidebarConfig.iconPadding,paddingRight:o.sidebarConfig.iconPadding}),introDismiss:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:e.spacing(1.5)},introDismissLink:{color:"#dddddd",display:"flex",alignItems:"center",marginBottom:e.spacing(.5),"&:hover":{color:e.palette.linkHover,transition:e.transitions.create("color",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.shortest})}},introDismissText:{fontSize:"0.7rem",fontWeight:"bold",textTransform:"uppercase",letterSpacing:1},introDismissIcon:{width:18,height:18,marginRight:e.spacing(1.5)}}),{name:"BackstageSidebarIntro"});function Ne(e){const{sidebarConfig:o}=useContext(SidebarConfigContext),l=ee({sidebarConfig:o}),{text:u,onClose:p}=e,v=()=>p();return _jsxs(Box,{className:l.introCard,children:[_jsx(Typography,{variant:"subtitle2",children:u}),_jsx(Box,{className:l.introDismiss,children:_jsxs(IconButton,{onClick:v,className:l.introDismissLink,children:[_jsx(CloseIcon,{className:l.introDismissIcon}),_jsx(Typography,{component:"span",className:l.introDismissText,children:"Dismiss"})]})})]})}const we=e=>{const{text:o,onDismiss:l}=e,[u,p]=useState(!1),v=()=>{p(!0)};return _jsx(Collapse,{in:!u,onExited:l,children:_jsx(Ne,{text:o,onClose:v})})},qe=null,lt="And your recently viewed plugins will pop up here!";function wt(e){const{isOpen:o}=useSidebarOpenState(),l={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},{value:u,set:p}=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:v,recentlyViewedItemsDismissed:j}=u!=null?u:{},D=()=>{p(U=>({...l,...U,starredItemsDismissed:!0}))},Y=()=>{p(U=>({...l,...U,recentlyViewedItemsDismissed:!0}))};return o?_jsxs(_Fragment,{children:[!v&&_jsxs(_Fragment,{children:[_jsx(we,{text:qe,onDismiss:D}),_jsx(SidebarDivider,{})]}),!j&&_jsx(we,{text:lt,onDismiss:Y})]}):null}const jt=(0,a.Z)(e=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:e.spacing(3),paddingBottom:e.spacing(3),paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function Ut(e){const{className:o,stretch:l,noPadding:u,children:p,...v}=e,{contentRef:j}=li(),D=jt();return(0,r.jsx)("article",{ref:j,tabIndex:-1,...v,className:se()(D.root,o,{[D.stretch]:l,[D.noPadding]:u}),children:p})}var zt=t(6487),Dn=t(99152);const tr=(0,a.Z)(e=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:e.palette.background.paper,paddingLeft:e.spacing(3),minWidth:0},defaultTab:{...e.typography.caption,padding:e.spacing(3,3),textTransform:"uppercase",fontWeight:e.typography.fontWeightBold,color:e.palette.text.secondary},selected:{color:e.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:e.palette.background.default,color:e.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function nr(e){const{tabs:o,onChange:l,selectedIndex:u}=e,[p,v]=(0,g.useState)(u!=null?u:0),j=tr(),D=(0,g.useCallback)((Y,U)=>{u===void 0&&v(U),l&&u!==U&&l(U)},[u,l]);return(0,g.useEffect)(()=>{u!==void 0&&v(u)},[u]),(0,r.jsx)($e.Z,{className:j.tabsWrapper,children:(0,r.jsx)(Dn.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:D,value:p,children:o.map((Y,U)=>(0,g.createElement)(zt.Z,{...Y.tabProps,"data-testid":`header-tab-${U}`,label:Y.label,key:Y.id,value:U,className:j.defaultTab,classes:{selected:j.selected,root:j.tabRoot}}))})})}function go(e){const o=(0,k.UO)(),u=e.map(({path:ye,children:Ee})=>({caseSensitive:!1,path:`${ye}/*`,element:Ee})).sort((ye,Ee)=>Ee.path.replace(/\/\*$/,"").localeCompare(ye.path.replace(/\/\*$/,"")));var p;const v=(p=(0,k.V$)(u))!==null&&p!==void 0?p:e[0].children;var j;let D=(j=o["*"])!==null&&j!==void 0?j:"";D.startsWith("/")||(D=`/${D}`);var Y;const[U]=(Y=(0,Fo.fp)(u,D))!==null&&Y!==void 0?Y:[],ue=U?e.findIndex(ye=>`${ye.path}/*`===U.route.path):0;var ae;return{index:ue===-1?0:ue,element:v,route:(ae=e[ue])!==null&&ae!==void 0?ae:e[0]}}function js(e){const{routes:o}=e,l=(0,k.s0)(),{index:u,route:p,element:v}=go(o),j=(0,g.useMemo)(()=>o.map(Y=>({id:Y.path,label:Y.title,tabProps:Y.tabProps})),[o]),D=Y=>{let{path:U}=o[Y];U=U.replace(/\/\*$/,""),U=U.replace(/^\//,""),l(U)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(nr,{tabs:j,selectedIndex:u,onChange:D}),(0,r.jsxs)(Ut,{children:[(0,r.jsx)(No.q,{title:p.title}),v]})]})}const Jo=()=>null;(0,M.R5)(Jo,"core.gatherMountPoints",!0);function mo(e){const o=(0,r.jsx)(Jo,{path:"",title:"",children:(0,r.jsx)("div",{})}).type;return g.Children.toArray(e).flatMap(l=>{if(!(0,g.isValidElement)(l))return[];if(l.type===g.Fragment)return mo(l.props.children);if(l.type!==o)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:u,title:p,children:v,tabProps:j}=l.props;return[{path:u,title:p,children:v,tabProps:j}]})}function ji(e){const o=mo(e.children);return(0,r.jsx)(js,{routes:o})}ji.Route=Jo;const Zr=(0,a.Z)(e=>({value:{marginBottom:e.spacing(.75)},subvalue:{color:e.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function ka(e){const{value:o,subvalue:l}=e,u=Zr();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)($e.Z,{className:u.value,children:o}),(0,r.jsx)($e.Z,{className:u.subvalue,children:l})]})}var Es=t(67222),Oa=t(21070),Ba=t(90324),$a=t(98281),Za=t(48049),ga=t(51209),ma=t(33375),Da=t(44233),Na=t(27604),Ei=t(36444),Fa=t(37971),Ua=t(59709),Ma=t(17373),za=t(3702),Wa=t(93111);const Va=(0,a.Z)(e=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:e.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:e.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:e.spacing(2)}}}),{name:"BackstageTableFilters"}),Ha=e=>{var o;const l=Va(),{onChangeFilters:u}=e,[p,v]=(0,g.useState)({...e.selectedFilters}),[j,D]=(0,g.useState)(!1),Y=()=>{v({}),D(U=>!U)};return(0,g.useEffect)(()=>{u(p)},[p,u]),(0,r.jsxs)($e.Z,{className:l.root,children:[(0,r.jsxs)($e.Z,{className:l.header,children:[(0,r.jsx)($e.Z,{className:l.value,children:"Filters"}),(0,r.jsx)(H.Z,{color:"primary",onClick:Y,children:"Clear all"})]}),(0,r.jsx)($e.Z,{className:l.filters,children:((o=e.filters)===null||o===void 0?void 0:o.length)&&e.filters.map(U=>(0,r.jsx)(En,{triggerReset:j,...U.element,selected:p[U.element.label],onChange:ue=>v({...p,[U.element.label]:ue})},U.element.label))})]})},va={Add:(0,g.forwardRef)((e,o)=>(0,r.jsx)(Oa.Z,{...e,ref:o})),Check:(0,g.forwardRef)((e,o)=>(0,r.jsx)($a.Z,{...e,ref:o})),Clear:(0,g.forwardRef)((e,o)=>(0,r.jsx)(ma.Z,{...e,ref:o})),Delete:(0,g.forwardRef)((e,o)=>(0,r.jsx)(Da.Z,{...e,ref:o})),DetailPanel:(0,g.forwardRef)((e,o)=>(0,r.jsx)(ga.Z,{...e,ref:o})),Edit:(0,g.forwardRef)((e,o)=>(0,r.jsx)(Na.Z,{...e,ref:o})),Export:(0,g.forwardRef)((e,o)=>(0,r.jsx)(za.Z,{...e,ref:o})),Filter:(0,g.forwardRef)((e,o)=>(0,r.jsx)(Ei.Z,{...e,ref:o})),FirstPage:(0,g.forwardRef)((e,o)=>(0,r.jsx)(Fa.Z,{...e,ref:o})),LastPage:(0,g.forwardRef)((e,o)=>(0,r.jsx)(Ua.Z,{...e,ref:o})),NextPage:(0,g.forwardRef)((e,o)=>(0,r.jsx)(ga.Z,{...e,ref:o})),PreviousPage:(0,g.forwardRef)((e,o)=>(0,r.jsx)(Za.Z,{...e,ref:o})),ResetSearch:(0,g.forwardRef)((e,o)=>(0,r.jsx)(ma.Z,{...e,ref:o})),Search:(0,g.forwardRef)((e,o)=>(0,r.jsx)(Ei.Z,{...e,ref:o})),SortArrow:(0,g.forwardRef)((e,o)=>(0,r.jsx)(Ba.Z,{...e,ref:o})),ThirdStateCheck:(0,g.forwardRef)((e,o)=>(0,r.jsx)(Ma.Z,{...e,ref:o})),ViewColumn:(0,g.forwardRef)((e,o)=>(0,r.jsx)(Wa.Z,{...e,ref:o}))};function ya(e,o){const l=o.split(".");let u=e[l[0]];for(let p=1;p<l.length;++p){if(u===void 0)return u;const v=l[p];u=u[v]}return u}const Ga=(0,Bn.Z)(e=>({header:{padding:e.spacing(1,2,1,2.5),borderTop:`1px solid ${e.palette.grey.A100}`,borderBottom:`1px solid ${e.palette.grey.A100}`,color:e.palette.textSubtle,fontWeight:e.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(Es.W$),xa=(0,Bn.Z)(e=>({root:{padding:e.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:e.typography.fontWeightBold}},searchField:{paddingRight:e.spacing(2)}}),{name:"BackstageTableToolbar"})(Es.UW),Ka=(0,a.Z)(e=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:e.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Ya=(0,a.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Ja(e,o){return e.map(l=>{const u={};let p=l.cellStyle||{};if(l.highlight)if(u.color=o.palette.textContrast,typeof p=="object")p.fontWeight=o.typography.fontWeightBold;else{const v=p;p=(j,D,Y)=>({...v(j,D,Y),fontWeight:o.typography.fontWeightBold})}return{...l,headerStyle:u,cellStyle:p}})}function Xa(e,o){return(0,ne.transform)(e,(l,u,p)=>{(0,ne.isEqual)(u,o[p])||(l[p]=u)})}const ba={search:"",filtersOpen:!1,filters:{}};function Qa(e){const{toolbarRef:o,setSearch:l,hasFilters:u,selectedFiltersLength:p,toggleFilters:v}=e,j=Ka(),D=(0,g.useCallback)(Y=>{e.onSearchChanged(Y),l(Y)},[e,l]);return u?(0,r.jsxs)($e.Z,{className:j.root,children:[(0,r.jsxs)($e.Z,{className:j.root,children:[(0,r.jsx)(Lt.Z,{onClick:v,"aria-label":"filter list",children:(0,r.jsx)(Ei.Z,{})}),(0,r.jsxs)(T.Z,{className:j.title,children:["Filters (",p,")"]})]}),(0,r.jsx)(xa,{...e,ref:o,onSearchChanged:D})]}):(0,r.jsx)(xa,{...e,ref:o,onSearchChanged:D})}function Sa(e){const{data:o,columns:l,options:u,title:p,subtitle:v,filters:j,initialState:D,emptyContent:Y,onStateChange:U,components:ue,...ae}=e,ye=Ya(),Ee=(0,St.Z)(),Ue={...ba,...D},[Ke,Ot]=(0,g.useState)(Ue.filtersOpen),Xt=(0,g.useCallback)(()=>Ot(Nn=>!Nn),[Ot]),[tn,nn]=(0,g.useState)(0),[Bt,en]=(0,g.useState)(o),[Qt,wr]=(0,g.useState)(Ue.filters),jr=Ja(l,Ee),[Er,Ar]=(0,g.useState)(Ue.search);(0,g.useEffect)(()=>{if(U){const Nn=Xa({search:Er,filtersOpen:Ke,filters:Qt},ba);U(Nn)}},[Er,Ke,Qt,U]);const Li={headerStyle:{textTransform:"uppercase"}},Dr=(0,g.useCallback)(Nn=>{var yr;return(yr=l.find(Qr=>Qr.title===Nn))===null||yr===void 0?void 0:yr.field},[l]);(0,g.useEffect)(()=>{if(typeof o=="function")return;if(!Qt){en(o);return}const Nn=Object.values(Qt);if(o&&Nn.flat().length){const yr=o.filter(Qr=>!!Object.entries(Qt).filter(([,qr])=>!!qr.length).every(([qr,dn])=>{const Sn=ya(Qr,Dr(qr));return Array.isArray(Sn)&&Array.isArray(dn)?Sn.some(yo=>dn.includes(yo)):Array.isArray(Sn)?Sn.includes(dn):Array.isArray(dn)?dn.includes(Sn):Sn===dn}));en(yr)}else en(o);nn(Nn.flat().length)},[o,Qt,Dr]);const Pi=(Nn,yr)=>{const Qr=dn=>{const Sn=new Set,yo=_r=>{_r!=null&&Sn.add(_r)};return yr&&yr.forEach(_r=>{const Qo=ya(_r,Dr(dn));Array.isArray(Qo)?Qo.forEach(yo):yo(Qo)}),Sn},qr=dn=>({placeholder:"All results",label:dn.column,multiple:dn.type==="multiple-select",items:[...Qr(dn.column)].sort().map(Sn=>({label:Sn,value:Sn}))});return Nn.map(dn=>({type:dn.type,element:qr(dn)}))},qt=!!(j!=null&&j.length),vo=(0,g.useCallback)(Nn=>(0,r.jsx)(Qa,{setSearch:Ar,hasFilters:qt,selectedFiltersLength:tn,toggleFilters:Xt,...Nn}),[Xt,qt,tn,Ar]),Ts=typeof o!="function"&&o.length===0,Nr=l.length,ki=(0,g.useCallback)(Nn=>Y&&Ts?(0,r.jsx)("tbody",{children:(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:Nr,children:Y})})}):(0,r.jsx)(Es.os,{...Nn}),[Ts,Y,Nr]);return(0,r.jsxs)($e.Z,{className:ye.root,children:[Ke&&o&&typeof o!="function"&&(j==null?void 0:j.length)&&(0,r.jsx)(Ha,{filters:Pi(j,o),selectedFilters:Qt,onChangeFilters:wr}),(0,r.jsx)(Es.ZP,{components:{Header:Ga,Toolbar:vo,Body:ki,...ue},options:{...Li,...u},columns:jr,icons:va,title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T.Z,{variant:"h5",component:"h2",children:p}),v&&(0,r.jsx)(T.Z,{color:"textSecondary",variant:"body1",children:v})]}),data:typeof o=="function"?o:Bt,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter",searchTooltip:"Filter"}},...ae})]})}Sa.icons=Object.freeze(va);const Ql=e=>{const{children:o,value:l,index:u,...p}=e;return _jsx(Box,{role:"tabpanel",hidden:l!==u,"aria-labelledby":`scrollable-auto-tab-${u}`,...p,children:l===u&&_jsx(Box,{p:3,children:o})})},qa=(0,a.Z)(e=>({root:{color:"#6E6E6E",overflow:"visible",fontSize:e.typography.h5.fontSize,textAlign:"center",borderRadius:"50%",backgroundColor:"#E6E6E6",marginLeft:o=>o.isNext?"auto":"0",marginRight:o=>o.isNext?"0":e.spacing(1.25),"&:hover":{backgroundColor:"#E6E6E6",opacity:"1"}}}),{name:"BackstageTabIcon"}),ql=e=>{const o=qa(e),{ariaLabel:l,onClick:u}=e;return _jsx(IconButton,{onClick:u,className:o.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":l,children:e.children})},_a=(e,o)=>o?e?"20px":"0":"40px",el=(0,a.Z)(e=>({root:{textTransform:"none",height:"64px",fontWeight:e.typography.fontWeightBold,fontSize:e.typography.pxToRem(13),color:e.palette.textSubtle,marginLeft:o=>_a(o.isFirstNav,o.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:e.palette.textSubtle}}}),{name:"BackstageTab"}),_l=e=>{const o=el(e),{isFirstNav:l,isFirstIndex:u,...p}=e;return _jsx(Tab,{classes:o,disableRipple:!0,...p})},tl=(0,a.Z)(e=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:e.palette.tabbar.indicator,height:e.spacing(.5)},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),ec=e=>{const o=tl(e);return _jsx(Tabs,{classes:o,...e,TabIndicatorProps:{children:_jsx(Typography,{component:"span"})}})},nl=(0,a.Z)(e=>({root:{flexGrow:1,width:"100%"},styledTabs:{backgroundColor:e.palette.background.paper},appbar:{boxShadow:"none",backgroundColor:e.palette.background.paper,paddingLeft:e.spacing(1.25),paddingRight:e.spacing(1.25)}}),{name:"BackstageTabs"});function tc(e){const{tabs:o}=e,l=nl(),[u,p]=useState([0,0]),[v,j]=useState(0),[D,Y]=useState(0),[U,ue]=useState([[]]),ae=useRef(),{width:ye}=useWindowSize(),Ee=(tn,nn)=>{p([v,nn])},Ue=()=>{j(v-1)},Ke=()=>{j(v+1)},Ot=()=>v+1<U.length;useEffect(()=>{const nn=v===0?1:2,Bt=ae.current.offsetWidth-20-nn*30,en=u[0]*D+u[1],Qt=Math.floor(Bt/170);Y(Qt),ue(chunkArray(o,Qt)),p([Math.floor(en/Qt),en%Qt])},[ye,o]);const Xt=v===u[0]?u[1]:!1;return _jsxs(Box,{className:l.root,children:[_jsx(AppBar,{ref:ae,className:l.appbar,position:"static",children:_jsx(Box,{children:_jsxs(StyledTabs,{value:Xt,onChange:Ee,selectionFollowsFocus:!0,children:[v!==0&&_jsx(StyledIcon,{onClick:Ue,ariaLabel:"navigate-before",children:_jsx(NavigateBeforeIcon,{})}),U[v].map((tn,nn)=>_jsx(StyledTab,{value:nn,isFirstIndex:nn===0,isFirstNav:v===0,icon:tn.icon||void 0,label:tn.label||void 0},nn)),Ot()&&_jsx(StyledIcon,{isNext:!0,onClick:Ke,ariaLabel:"navigate-next",children:_jsx(NavigateNextIcon,{})})]})})}),Xt!==!1?U[v].map((tn,nn)=>_jsx(TabPanel,{value:nn,index:Xt,children:tn.content},nn)):_jsx(TabPanel,{value:u[1],index:u[1],children:U[u[0]][u[1]].content},"panel_outside_chunked_array")]})}var nc=t(44311);function rl(e,o){const l=e[e.length-1];if(l)return l>=.9?o.palette.status.ok:l>=.5?o.palette.status.warning:o.palette.status.error}function rc(e){const o=useTheme();if(!e.data)return null;var l;return _jsxs(Sparklines,{width:120,height:30,min:0,max:1,...e,children:[e.title&&_jsx("title",{children:e.title}),_jsx(SparklinesLine,{color:(l=e.color)!==null&&l!==void 0?l:rl(e.data,o)})]})}const ol=e=>(0,a.Z)(o=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:o.spacing(2),textAlign:e.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:o.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),sl=({title:e="Unknown page",className:o})=>(0,r.jsx)(T.Z,{variant:"h4",component:"h2",className:o,"data-testid":"header-title",children:e});function il(e){const{description:o,title:l,titleComponent:u=void 0,children:p,textAlign:v="left"}=e,j=ol({textAlign:v})(),D=u||(0,r.jsx)(sl,{title:l,className:j.title});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(No.q,{title:l}),(0,r.jsxs)($e.Z,{className:j.container,children:[(0,r.jsxs)($e.Z,{className:j.leftItemsBox,children:[D,o&&(0,r.jsx)(T.Z,{className:j.description,variant:"body2",children:o})]}),(0,r.jsx)($e.Z,{className:j.rightItemsBox,children:p})]})]})}var al=t.p+"static/mic-drop.fe3ef4d0..svg";const ll=(0,a.Z)(e=>({micDrop:{maxWidth:"60%",bottom:e.spacing(2),right:e.spacing(2),[e.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:`${e.spacing(10)}px auto ${e.spacing(4)}px`}}}),{name:"BackstageErrorPageMicDrop"}),cl=()=>{const e=ll();return(0,r.jsx)("img",{src:al,className:e.micDrop,alt:"Girl dropping mic from her hands"})},dl=(0,a.Z)(e=>({container:{padding:e.spacing(8),[e.breakpoints.down("xs")]:{padding:e.spacing(2)}},title:{paddingBottom:e.spacing(5),[e.breakpoints.down("xs")]:{paddingBottom:e.spacing(4),fontSize:e.typography.h3.fontSize}},subtitle:{color:e.palette.textSubtle}}),{name:"BackstageErrorPage"});function ul(e){const{status:o,statusMessage:l,additionalInfo:u,supportUrl:p}=e,v=dl(),j=(0,k.s0)(),D=gs();return(0,r.jsxs)(ze.Z,{container:!0,spacing:0,className:v.container,children:[(0,r.jsxs)(ze.Z,{item:!0,xs:12,sm:8,md:4,children:[(0,r.jsxs)(T.Z,{"data-testid":"error",variant:"body1",className:v.subtitle,children:["ERROR ",o,": ",l]}),(0,r.jsx)(T.Z,{variant:"body1",className:v.subtitle,children:u}),(0,r.jsx)(T.Z,{variant:"h2",className:v.title,children:"Looks like someone dropped the mic!"}),(0,r.jsxs)(T.Z,{variant:"h6",children:[(0,r.jsx)(at,{to:"#","data-testid":"go-back-link",onClick:()=>j(-1),children:"Go back"}),"... or please"," ",(0,r.jsx)(at,{to:p||D.url,children:"contact support"})," if you think this is a bug."]})]}),(0,r.jsx)(cl,{})]})}var hl=t(16173);const pl=(0,Bn.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(T.Z),Ai=(0,Bn.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})($e.Z);function fl(e){const{children:o,...l}=e,[u,p]=g.useState(null),v=g.Children.toArray(o),[j,D,...Y]=v,U=Y.length?Y.pop():v[v.length-1],ue=v.length>3,ae=Ue=>{p(Ue.currentTarget)},ye=()=>{p(null)},Ee=Boolean(u);return(0,r.jsxs)(g.Fragment,{children:[(0,r.jsxs)(hl.Z,{"aria-label":"breadcrumb",...l,children:[v.length>1&&(0,r.jsx)(Ai,{clone:!0,children:j}),v.length>2&&(0,r.jsx)(Ai,{clone:!0,children:D}),ue&&(0,r.jsx)(pl,{onClick:ae,children:"..."}),(0,r.jsx)($e.Z,{style:{fontStyle:"italic"},children:U})]}),(0,r.jsx)(Ms.ZP,{open:Ee,anchorEl:u,onClose:ye,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,r.jsx)(et.Z,{children:Y.map((Ue,Ke)=>(0,r.jsx)(Ze.Z,{button:!0,children:(0,r.jsx)(Ai,{clone:!0,children:Ue})},Ke))})})]})}const gl=(0,a.Z)(e=>({header:{gridArea:"pageHeader",padding:e.spacing(3),width:"100%",boxShadow:e.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:e.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[e.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:e.page.fontColor,wordBreak:"break-word",fontSize:e.typography.h3.fontSize,marginBottom:0},subtitle:{color:e.page.fontColor,opacity:.8,display:"inline-block",marginTop:e.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:e.spacing(1),color:e.page.fontColor},breadcrumb:{color:e.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-e.spacing(.3),marginBottom:e.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-e.spacing(.3),marginBottom:e.spacing(.3)}}),{name:"BackstageHeader"}),ml=({type:e,typeLink:o,classes:l,pageTitle:u})=>e?o?(0,r.jsxs)(fl,{className:l.breadcrumb,children:[(0,r.jsx)(at,{to:o,children:e}),(0,r.jsx)(T.Z,{children:u})]}):(0,r.jsx)(T.Z,{className:l.type,children:e}):null,vl=({pageTitle:e,classes:o,tooltip:l})=>{const u=(0,r.jsx)(T.Z,{className:o.title,variant:"h1",children:e});return l?(0,r.jsx)(Fe.ZP,{title:l,placement:"top-start",children:u}):u},yl=({classes:e,subtitle:o})=>o?typeof o!="string"?(0,r.jsx)(r.Fragment,{children:o}):(0,r.jsx)(T.Z,{className:e.subtitle,variant:"subtitle2",component:"span",children:o}):null;function Ca(e){const{children:o,pageTitleOverride:l,style:u,subtitle:p,title:v,tooltip:j,type:D,typeLink:Y}=e,U=gl(),ae=(0,M.h_)(M.Ds).getOptionalString("app.title")||"Backstage",ye=l||v,Ee=v||l,Ue=`${ye} | %s | ${ae}`,Ke=`${ye} | ${ae}`;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(No.q,{titleTemplate:Ue,defaultTitle:Ke}),(0,r.jsxs)("header",{style:u,className:U.header,children:[(0,r.jsxs)($e.Z,{className:U.leftItemsBox,children:[(0,r.jsx)(ml,{classes:U,type:D,typeLink:Y,pageTitle:Ee}),(0,r.jsx)(vl,{classes:U,pageTitle:Ee,tooltip:j}),(0,r.jsx)(yl,{classes:U,subtitle:p})]}),(0,r.jsx)(ze.Z,{container:!0,className:U.rightItemsBox,spacing:4,children:o})]})]})}const xl=({label:e,secondaryLabel:o,icon:l,disabled:u=!1,onClick:p})=>_jsx(Fragment,{children:_jsxs(ListItem,{"data-testid":"header-action-item",disabled:u,button:!0,onClick:v=>{p&&p(v)},children:[l&&_jsx(ListItemIcon,{children:l}),_jsx(ListItemText,{primary:e,secondary:o})]})});function oc(e){const{actionItems:o}=e,[l,u]=React.useState(!1),p=React.useRef(null);return _jsxs(Fragment,{children:[_jsx(IconButton,{onClick:()=>u(!0),"data-testid":"header-action-menu",ref:p,style:{color:"white",height:56,width:56,marginRight:-4,padding:0},children:_jsx(MoreVert,{})}),_jsx(Popover,{open:l,anchorEl:p.current,anchorOrigin:{horizontal:"right",vertical:"bottom"},transformOrigin:{horizontal:"right",vertical:"top"},onClose:()=>u(!1),children:_jsx(List,{children:o.map((v,j)=>_jsx(xl,{...v},`header-action-menu-${j}`))})})]})}const bl=(0,a.Z)(e=>({root:{textAlign:"left"},label:{color:e.palette.common.white,fontWeight:e.typography.fontWeightBold,letterSpacing:0,fontSize:e.typography.fontSize,marginBottom:e.spacing(1)/2,lineHeight:1},value:{color:"rgba(255, 255, 255, 0.8)",fontSize:e.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),Sl=({value:e,className:o})=>(0,r.jsx)(T.Z,{className:o,children:e});function Cl(e){const{label:o,value:l,url:u}=e,p=bl(),v=(0,r.jsx)(Sl,{className:p.value,value:l||"<Unknown>"});return(0,r.jsx)(ze.Z,{item:!0,children:(0,r.jsxs)(T.Z,{component:"span",className:p.root,children:[(0,r.jsx)(T.Z,{className:p.label,children:o}),u?(0,r.jsx)(at,{to:u,children:v}):v]})})}const wl=e=>(0,$.Z)({root:{color:e.palette.common.white,padding:e.spacing(2,2,3),backgroundImage:e.getPageTheme({themeId:"card"}).backgroundImage,backgroundPosition:0,backgroundSize:"inherit"}}),jl=(0,a.Z)(wl,{name:"BackstageItemCardHeader"});function El(e){const{title:o,subtitle:l,children:u}=e,p=jl(e);return(0,r.jsxs)($e.Z,{className:p.root,children:[l&&(0,r.jsx)(T.Z,{variant:"subtitle2",component:"h3",children:l}),o&&(0,r.jsx)(T.Z,{variant:"h6",component:"h4",children:o}),u]})}function sc(e){const{description:o,tags:l,title:u,type:p,subtitle:v,label:j,onClick:D,href:Y}=e;return _jsxs(Card,{children:[_jsx(CardMedia,{children:_jsx(ItemCardHeader,{title:u,subtitle:v||p})}),_jsxs(CardContent,{children:[l!=null&&l.length?_jsx(Box,{children:l.map((U,ue)=>_jsx(Chip,{size:"small",label:U},ue))}):null,o]}),_jsxs(CardActions,{children:[!Y&&_jsx(Button,{to:"#",onClick:D,color:"primary",children:j}),Y&&_jsx(Button,{to:Y,color:"primary",children:j})]})]})}const Al=e=>(0,$.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:e.spacing(2)}}),Tl=(0,a.Z)(Al,{name:"BackstageItemCardGrid"});function Il(e){const{children:o,...l}=e,u=Tl(l);return(0,r.jsx)($e.Z,{className:u.root,...l,children:o})}var Rl=t(41547);const Ll=(0,a.Z)(()=>({root:({isMobile:e})=>({display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",height:e?"100%":"100vh",overflowY:"auto"})}),{name:"BackstagePage"});function wa(e){const{themeId:o,children:l}=e,{isMobile:u}=Jr(),p=Ll({isMobile:u});return(0,r.jsx)(Rl.Z,{theme:v=>({...v,page:v.getPageTheme({themeId:o})}),children:(0,r.jsx)("main",{className:p.root,children:l})})}function Pl(e){const{themeId:o,children:l,...u}=e;return(0,r.jsxs)(wa,{themeId:o,children:[(0,r.jsx)(Ca,{...u}),l]})}var Jn=t(30195);const ic=Jn.z.object({providerInfo:Jn.z.object({}).catchall(Jn.z.unknown()).optional(),profile:Jn.z.object({email:Jn.z.string().optional(),displayName:Jn.z.string().optional(),picture:Jn.z.string().optional()}),backstageIdentity:Jn.z.object({token:Jn.z.string(),identity:Jn.z.object({type:Jn.z.literal("user"),userEntityRef:Jn.z.string(),ownershipEntityRefs:Jn.z.array(Jn.z.string())})})}),ja={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function kl(e){const o=new Date(Date.now()+ja.defaultTokenExpiryMillis);if(!e)return o;const[l,u,p]=e.split("."),v=JSON.parse(window.atob(u));return typeof v.exp!="number"?o:new Date(v.exp*1e3-ja.tokenExpiryMarginMillis)}class ac{async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:o}=this.getSessionSync(),l=o.identity.userEntityRef,u=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(l);if(!u)throw new TypeError(`Invalid user entity reference "${l}"`);return u[3]}async getIdToken(){return(await this.getSessionAsync()).backstageIdentity.token}getProfile(){return this.getSessionSync().profile}async getProfileInfo(){return(await this.getSessionAsync()).profile}async getBackstageIdentity(){return(await this.getSessionAsync()).backstageIdentity.identity}async getCredentials(){return{token:(await this.getSessionAsync()).backstageIdentity.token}}async signOut(){this.abortController.abort()}getSessionSync(){if(this.state.type==="active")return this.state.session;if(this.state.type==="fetching"&&this.state.previous)return this.state.previous;throw new Error("No session available. Try reloading your browser page.")}async getSessionAsync(){if(this.state.type==="fetching")return this.state.promise;if(this.state.type==="active"&&new Date<this.state.expiresAt)return this.state.session;const o=this.state.type==="active"?this.state.session:void 0,l=this.fetchSession().then(u=>(this.state={type:"active",session:u,expiresAt:kl(u.backstageIdentity.token)},u),u=>{throw this.state={type:"failed",error:u},u});return this.state={type:"fetching",promise:l,previous:o},l}async fetchSession(){const o=await this.options.discoveryApi.getBaseUrl("auth"),l=typeof this.options.headers=="function"?await this.options.headers():this.options.headers,u=new Headers(l);u.set("X-Requested-With","XMLHttpRequest");const p=await fetch(`${o}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:u,credentials:"include"});if(!p.ok)throw await ResponseError.fromResponse(p);return proxiedSessionSchema.parse(await p.json())}constructor(o){this.options=o,this.abortController=new AbortController,this.state={type:"empty"}}}const lc=e=>{const o=useApi(discoveryApiRef),[{status:l,error:u},{execute:p}]=useAsync(async()=>{const v=new ProxiedSignInIdentity({provider:e.provider,discoveryApi:o,headers:e.headers});await v.start(),e.onSignInSuccess(v)});return useMountEffect(p),l==="loading"?_jsx(Progress,{}):u?_jsx(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:u}):null},Ol=(0,a.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),Ti=({children:e})=>{const o=Ol();return(0,r.jsx)(ze.Z,{component:"li",item:!0,classes:o,children:e})};class Ii{getUserId(){return"guest"}async getIdToken(){}getProfile(){return{email:"guest@example.com",displayName:"Guest"}}async getProfileInfo(){return{email:"guest@example.com",displayName:"Guest"}}async getBackstageIdentity(){const o="user:default/guest";return{type:"user",userEntityRef:o,ownershipEntityRefs:[o]}}async getCredentials(){return{}}async signOut(){}}function Bl(e){const[o,l,u]=e.split(".");return JSON.parse(window.atob(l))}class Ri{getUserId(){return this.result.userId}static fromResult(o){return new Ri(o)}async getIdToken(){var o,l;return(l=(o=this.result).getIdToken)===null||l===void 0?void 0:l.call(o)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const o=await this.getIdToken();if(!o){const p=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:p,ownershipEntityRefs:[p]}}const{sub:l,ent:u}=Bl(o);return{type:"user",userEntityRef:l,ownershipEntityRefs:u!=null?u:[]}}async getCredentials(){var o,l;return{token:await((l=(o=this.result).getIdToken)===null||l===void 0?void 0:l.call(o))}}async signOut(){var o,l;return(l=(o=this.result).signOut)===null||l===void 0?void 0:l.call(o)}constructor(o){this.result=o}}class Xo{static createGuest(){return new Ii}static fromLegacy(o){return Ri.fromResult(o)}static create(o){return new Xo(o.identity,o.authApi,o.profile)}getUserId(){const o=this.identity.userEntityRef,l=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(o);if(!l)throw new TypeError(`Invalid user entity reference "${o}"`);return l[3]}async getIdToken(){return(await this.authApi.getBackstageIdentity()).token}getProfile(){if(!this.profile)throw new Error("The identity API does not implement synchronous profile fetching, use getProfileInfo() instead");return this.profile}async getProfileInfo(){if(this.profilePromise)return await this.profilePromise;try{return this.profilePromise=this.authApi.getProfile(),await this.profilePromise}catch(o){throw this.profilePromise=void 0,o}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}constructor(o,l,u){this.identity=o,this.authApi=l,this.profile=u}}const $l={Component:({config:e,onSignInSuccess:o})=>{const{apiRef:l,title:u,message:p}=e,v=(0,M.h_)(l),j=(0,M.h_)(M.VE),D=async()=>{try{const Y=await v.getBackstageIdentity({instantPopup:!0});if(!Y)throw new Error(`The ${u} provider is not configured to support sign-in`);const U=await v.getProfile();o(Xo.create({identity:Y.identity,profile:U,authApi:v}))}catch(Y){j.post(new Vr.SP("Login failed",Y))}};return(0,r.jsx)(Ti,{children:(0,r.jsx)(Pr,{variant:"fullHeight",title:u,actions:(0,r.jsx)(H.Z,{color:"primary",variant:"outlined",onClick:D,children:"Sign In"}),children:(0,r.jsx)(T.Z,{variant:"body1",children:p})})})},loader:async(e,o)=>{const l=e.get(o),u=await l.getBackstageIdentity({optional:!0});if(!u)return;const p=await l.getProfile();return Xo.create({identity:u.identity,profile:p,authApi:l})}},Zl={Component:({onSignInSuccess:e})=>(0,r.jsx)(Ti,{children:(0,r.jsx)(Pr,{title:"Guest",variant:"fullHeight",actions:(0,r.jsx)(H.Z,{color:"primary",variant:"outlined",onClick:()=>e(new Ii),children:"Enter"}),children:(0,r.jsxs)(T.Z,{variant:"body1",children:["Enter as a Guest User.",(0,r.jsx)("br",{}),"You will not have a verified identity,",(0,r.jsx)("br",{}),"meaning some features might be unavailable."]})})}),loader:async()=>new Ii};var Dl=t(63955),Ea=t(86619),Aa=t(74828),Nl=t(45455),Fl=t.n(Nl);const Ul=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Ml=(0,a.Z)(e=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:e.spacing(2)}}),{name:"BackstageCustomProvider"}),Ta=e=>{const{ref:o,...l}=e;return{inputRef:o,...l}},zl={Component:({onSignInSuccess:e})=>{const o=Ml(),{register:l,handleSubmit:u,formState:p}=(0,Dl.cI)({mode:"onChange"}),{errors:v}=p,j=({userId:D,idToken:Y})=>{e(Xo.fromLegacy({userId:D,getIdToken:Y!==void 0?async()=>Y:void 0,profile:{email:`${D}@example.com`}}))};return(0,r.jsx)(Ti,{children:(0,r.jsxs)(Pr,{title:"Custom User",variant:"fullHeight",children:[(0,r.jsxs)(T.Z,{variant:"body1",children:["Enter your own User ID and credentials.",(0,r.jsx)("br",{}),"This selection will not be stored."]}),(0,r.jsxs)("form",{className:o.form,onSubmit:u(j),children:[(0,r.jsxs)(je.Z,{children:[(0,r.jsx)(Ea.Z,{...Ta(l("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(v.userId)}),v.userId&&(0,r.jsx)(Aa.Z,{error:!0,children:v.userId.message})]}),(0,r.jsxs)(je.Z,{children:[(0,r.jsx)(Ea.Z,{...Ta(l("idToken",{required:!1,validate:D=>!D||Ul.test(D)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(v.idToken)}),v.idToken&&(0,r.jsx)(Aa.Z,{error:!0,children:v.idToken.message})]}),(0,r.jsx)(H.Z,{type:"submit",color:"primary",variant:"outlined",className:o.button,disabled:!(p!=null&&p.isDirty)||!Fl()(v),children:"Continue"})]})]})})},loader:async()=>{}},As="@backstage/core:SignInPage:provider",Ia={guest:Zl,custom:zl,common:$l};function Ra(e,o){if(e in o)throw new Error(`"${e}" ID is duplicated. IDs of identity providers have to be unique.`)}function gc(e){return e.reduce((l,u)=>{if(typeof u=="string")return Ra(u,l),l[u]={components:Ia[u],id:u},l;const{id:p}=u;return Ra(p,l),l[p]={components:Ia.common,id:p,config:u},l},{})}const mc=(e,o)=>{const l=useApi(errorApiRef),u=useApiHolder(),[p,v]=useState(!0),j=useCallback(Y=>{o(IdentityApiSignOutProxy.from({identityApi:Y,signOut:async()=>{var U;localStorage.removeItem(As),await((U=Y.signOut)===null||U===void 0?void 0:U.call(Y))}}))},[o]);useLayoutEffect(()=>{var Y;if(!p)return;const U=localStorage.getItem(As);if(U===null){v(!1);return}const ue=e[U];if(!ue){v(!1);return}let ae=!1;return ue.components.loader(u,(Y=ue.config)===null||Y===void 0?void 0:Y.apiRef).then(ye=>{ae||(ye?j(ye):v(!1))}).catch(ye=>{ae||(localStorage.removeItem(As),l.post(ye),v(!1))}),()=>{ae=!0}},[p,l,o,u,e,j]);const D=useMemo(()=>Object.keys(e).map(Y=>{const U=e[Y],{Component:ue}=U.components,ae=ye=>{localStorage.setItem(As,U.id),j(ye)};return _jsx(ue,{config:U.config,onSignInSuccess:ae},U.id)}),[e,j]);return[p,D]},Wl=({onSignInSuccess:e,providers:o=[],title:l,align:u="left"})=>{const p=useApi(configApiRef),v=useStyles(),j=getSignInProviders(o),[D,Y]=useSignInProviders(j,e);return D?_jsx(Progress,{}):_jsxs(Page,{themeId:"home",children:[_jsx(Header,{title:p.getString("app.title")}),_jsxs(Content,{children:[l&&_jsx(ContentHeader,{title:l,textAlign:u}),_jsx(Grid,{container:!0,justifyContent:u==="center"?u:"flex-start",spacing:2,component:"ul",classes:v,children:Y})]})]})},Vl=({provider:e,auto:o,onSignInSuccess:l})=>{const u=useStyles(),p=useApi(e.apiRef),v=useApi(configApiRef),[j,D]=useState(),[Y,U]=useState(!1),ue=async({checkExisting:ae,showPopup:ye})=>{try{let Ee;if(ae&&(Ee=await p.getBackstageIdentity({optional:!0})),!Ee&&(ye||o)&&(U(!0),Ee=await p.getBackstageIdentity({instantPopup:!0}),!Ee))throw new Error(`The ${e.title} provider is not configured to support sign-in`);if(!Ee){U(!0);return}const Ue=await p.getProfile();l(UserIdentity.create({identity:Ee.identity,authApi:p,profile:Ue}))}catch(Ee){D(Ee),U(!0)}};return useMountEffect(()=>ue({checkExisting:!0})),Y?_jsxs(Page,{themeId:"home",children:[_jsx(Header,{title:v.getString("app.title")}),_jsx(Content,{children:_jsx(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:u,children:_jsx(GridItem,{children:_jsxs(InfoCard,{variant:"fullHeight",title:e.title,actions:_jsx(Button,{color:"primary",variant:"outlined",onClick:()=>{ue({showPopup:!0})},children:"Sign In"}),children:[_jsx(Typography,{variant:"body1",children:e.message}),j&&j.name!=="PopupRejectedError"&&_jsx(Typography,{variant:"body1",color:"error",children:j.message})]})})})})]}):_jsx(Progress,{})};function vc(e){return"provider"in e?_jsx(Vl,{...e}):_jsx(Wl,{...e})}const Hl=(0,a.Z)(e=>({root:{padding:e.spacing(0,2,0,2.5),minHeight:e.spacing(3)},indicator:{backgroundColor:e.palette.info.main,height:e.spacing(.3)}}),{name:"BackstageTabbedCard"}),Gl=(0,Bn.Z)(e=>({root:{padding:e.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:e.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(io.Z);function yc(e){const{slackChannel:o,errorBoundaryProps:l,children:u,title:p,deepLink:v,value:j,onChange:D}=e,Y=Hl(),[U,ue]=useState(0),ae=D||((Ue,Ke)=>ue(Ke));let ye;j?React.Children.map(u,Ue=>{if(React.isValidElement(Ue)&&(Ue==null?void 0:Ue.props.value)===j){var Ke;ye=Ue==null||(Ke=Ue.props)===null||Ke===void 0?void 0:Ke.children}}):React.Children.map(u,(Ue,Ke)=>{React.isValidElement(Ue)&&Ke===U&&(ye=Ue==null?void 0:Ue.props.children)});const Ee=l||(o?{slackChannel:o}:{});return _jsx(Card,{children:_jsxs(ErrorBoundary,{...Ee,children:[p&&_jsx(Gl,{title:p}),_jsx(Tabs,{selectionFollowsFocus:!0,classes:Y,value:j||U,onChange:ae,children:u}),_jsx(Divider,{}),_jsx(CardContent,{children:ye}),v&&_jsx(BottomLink,{...v})]})})}const Kl=(0,a.Z)(e=>({root:{minWidth:e.spacing(6),minHeight:e.spacing(3),margin:e.spacing(0,2,0,0),padding:e.spacing(.5,0,.5,0),textTransform:"none","&:hover":{opacity:1,backgroundColor:"transparent",color:e.palette.text.primary}},selected:{fontWeight:e.typography.fontWeightBold}}),{name:"BackstageCardTab"});function xc(e){const{children:o,...l}=e,u=Kl();return _jsx(Tab,{disableRipple:!0,classes:u,...l})}},60871:function(bt,Oe,t){"use strict";t.d(Oe,{fC:function(){return y},CL:function(){return ot},sM:function(){return Q},$v:function(){return _e},v_:function(){return Ye},hg:function(){return dt},uB:function(){return Ae},R5:function(){return De},bq:function(){return R},Km:function(){return oe},Ds:function(){return Me},ni:function(){return T},T0:function(){return I},CO:function(){return Pn},x8:function(){return bn},rx:function(){return Gn},YO:function(){return Cn},P4:function(){return ct},NT:function(){return yt},NW:function(){return at},VE:function(){return rt},W0:function(){return We},gP:function(){return $e},IY:function(){return Je},F4:function(){return ne},ux:function(){return E},Kp:function(){return se},$4:function(){return St},p_:function(){return z},ZM:function(){return gt},D:function(){return k},gW:function(){return N},E6:function(){return Ct},z$:function(){return Fe},h_:function(){return Se},I_:function(){return $},qD:function(){return ge},vJ:function(){return Mn},tg:function(){return pn},Oi:function(){return Un}});var h=t(52322),r=t(51837),M=t(2784);const P=(0,r.CT)("analytics-context"),g=()=>{const ve=(0,M.useContext)(P);if(ve===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const re=ve.atVersion(1);if(re===void 0)throw new Error("No context found for version 1.");return re},y=ve=>{const{attributes:re,children:Pe}=ve,He={...g(),...re},ht=(0,r.EI)({1:He});return(0,h.jsx)(P.Provider,{value:ht,children:Pe})};function a(ve,re){const Pe=Ie=>_jsx(y,{attributes:re,children:_jsx(ve,{...Ie})});return Pe.displayName=`WithAnalyticsContext(${ve.displayName||ve.name||"Component"})`,Pe}function $(){const ve=(0,r.Vt)("api-context");if(!ve)throw new Error("API context is not available");const re=ve.atVersion(1);if(!re)throw new Error("ApiContext v1 not available");return re}function Se(ve){const Pe=$().get(ve);if(!Pe)throw new Error(`No implementation available for ${ve}`);return Pe}function J(ve){return function(Pe){const Ie=ht=>{const Gt=$(),kt={};for(const le in ve)if(ve.hasOwnProperty(le)){const W=ve[le],he=Gt.get(W);if(!he)throw new Error(`No implementation available for ${W}`);kt[le]=he}return _jsx(Pe,{...ht,...kt})},He=Pe.displayName||Pe.name||"Component";return Ie.displayName=`withApis(${He})`,Ie}}class H{get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}constructor(re){if(this.config=re,!re.id.split(".").flatMap(Ie=>Ie.split("-")).every(Ie=>Ie.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${re.id}'`)}}function I(ve){return new H(ve)}function T(ve,re){return"id"in ve?{api:ve,deps:{},factory:()=>re}:ve}var Q;(function(ve){ve.SignedIn="SignedIn",ve.SignedOut="SignedOut"})(Q||(Q={}));const se=I({id:"core.auth.google"}),ne=I({id:"core.auth.github"}),k=I({id:"core.auth.okta"}),E=I({id:"core.auth.gitlab"}),z=I({id:"core.auth.microsoft"}),N=I({id:"core.auth.onelogin"}),R=I({id:"core.auth.bitbucket"}),oe=I({id:"core.auth.bitbucket-server"}),Ae=I({id:"core.auth.atlassian"}),_e=I({id:"core.alert"}),Ye=I({id:"core.analytics"}),dt=I({id:"core.apptheme"}),Me=I({id:"core.config"}),at=I({id:"core.discovery"}),rt=I({id:"core.error"});var ot;(function(ve){ve[ve.None=0]="None",ve[ve.Active=1]="Active"})(ot||(ot={}));const We=I({id:"core.featureflags"}),$e=I({id:"core.fetch"}),St=I({id:"core.identity"}),gt=I({id:"core.oauthrequest"}),Ct=I({id:"core.storage"});class Nt{setContext(re){this.context=re}captureEvent(re,Pe,{value:Ie,attributes:He}={}){try{this.analyticsApi.captureEvent({action:re,subject:Pe,value:Ie,attributes:He,context:this.context})}catch(ht){console.warn("Error during analytics event capture. %o",ht)}}constructor(re,Pe={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=re,this.context=Pe}}function Lt(){try{return Se(Ye)}catch{return{captureEvent:()=>{}}}}function Fe(){const ve=(0,M.useRef)(null),re=g(),Pe=Lt();function Ie(){return ve.current===null&&(ve.current=new Nt(Pe)),ve.current}const He=Ie();return He.setContext(re),He}const ge=()=>{const ve=(0,r.Vt)("app-context");if(!ve)throw new Error("App context is not available");const re=ve.atVersion(1);if(!re)throw new Error("AppContext v1 not available");return re},Le=(0,r.uW)("component-data-store",()=>new WeakMap),Te="__backstage_data";function De(ve,re,Pe){const Ie=ve;var He;let ht=(He=Ie[Te])!==null&&He!==void 0?He:Le.get(ve);if(ht||(ht={map:new Map},Object.defineProperty(Ie,Te,{enumerable:!1,configurable:!0,writable:!1,value:ht}),Le.set(ve,ht)),ht.map.has(re)){const Gt=ve.displayName||ve.name;throw new Error(`Attempted to attach duplicate data "${re}" to component "${Gt}"`)}ht.map.set(re,Pe)}function Je(ve,re){if(!ve)return;const Pe=ve.type;if(!Pe)return;var Ie;const He=(Ie=Pe[Te])!==null&&Ie!==void 0?Ie:Le.get(Pe);if(He)return He.map.get(re)}const Wt=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));let vt=Wt;class Tt{get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}constructor(re,Pe){this.id=re,this.params=Pe,this[vt]="absolute"}}function yt(ve){var re;return new Tt(ve.id,(re=ve.params)!==null&&re!==void 0?re:[])}const Pt=/^\w+$/;let Yt=null;class sn{toString(){return`routeRef{type=sub,id=${this.id}}`}constructor(re,Pe,Ie,He){this.id=re,this.path=Pe,this.parent=Ie,this.params=He,this[Yt]="sub"}}function hn(ve){const{id:re,path:Pe,parent:Ie}=ve,He=Pe.split("/").filter(kt=>kt.startsWith(":")).map(kt=>kt.substring(1)),ht=[...Ie.params,...He];if(Ie.params.some(kt=>He.includes(kt)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!Pe.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${Pe}'`);if(Pe.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${Pe}'`);for(const kt of He)if(!Pt.test(kt))throw new Error(`SubRouteRef path has invalid param, got '${kt}'`);return new sn(re,Pe,Ie,ht)}let $t=Wt;class xn{toString(){return`routeRef{type=external,id=${this.id}}`}constructor(re,Pe,Ie){this.id=re,this.params=Pe,this.optional=Ie,this[$t]="external"}}function bn(ve){var re;return new xn(ve.id,(re=ve.params)!==null&&re!==void 0?re:[],Boolean(ve.optional))}var Rn=t(79635);function pn(ve){const{pathname:re}=(0,Rn.TH)(),Pe=(0,r.Vt)("routing-context");if(!Pe)throw new Error("Routing context is not available");const Ie=Pe.atVersion(1),He=(0,M.useMemo)(()=>Ie&&Ie.resolve(ve,{pathname:re}),[Ie,ve,re]);if(!Pe)throw new Error("useRouteRef used outside of routing context");if(!Ie)throw new Error("RoutingContext v1 not available");const ht="optional"in ve&&ve.optional;if(!He&&!ht)throw new Error(`No path for ${ve}`);return He}function Un(ve){return(0,Rn.UO)()}class Ln extends M.Component{static getDerivedStateFromError(re){return{error:re}}render(){const{error:re}=this.state,{app:Pe,plugin:Ie}=this.props,{ErrorBoundaryFallback:He}=Pe.getComponents();return re?(0,h.jsx)(He,{error:re,resetError:this.handleErrorReset,plugin:Ie}):this.props.children}constructor(...re){super(...re),this.state={error:void 0},this.handleErrorReset=()=>{this.setState({error:void 0})}}}var Xn=t(64355);function ct(ve){const{component:re,mountPoint:Pe,name:Ie}=ve;return Cn({component:{lazy:()=>re().then(He=>{const ht=kt=>{try{pn(Pe)}catch(le){if(typeof le=="object"&&le!==null){const{message:W}=le;if(typeof W=="string"&&W.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${Pe} 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 le}return(0,h.jsx)(He,{...kt})},Gt=Ie||He.displayName||He.name||"LazyComponent";return ht.displayName=`RoutableExtension(${Gt})`,ht},He=>Gt=>{const kt=ge(),{BootErrorPage:le}=kt.getComponents();return(0,h.jsx)(le,{step:"load-chunk",error:He})})},data:{"core.mountPoint":Pe},name:Ie})}function Pn(ve){const{component:re,name:Pe}=ve;return Cn({component:re,name:Pe})}function Cn(ve){const{data:re={},name:Pe}=ve;Pe||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let Ie;if("lazy"in ve.component){const ht=ve.component.lazy;Ie=(0,M.lazy)(()=>ht().then(Gt=>({default:Gt})))}else Ie=ve.component.sync;const He=Pe||Ie.displayName||Ie.name||"Component";return{expose(ht){const Gt=kt=>{const le=ge(),{Progress:W}=le.getComponents(),he=re==null?void 0:re["core.mountPoint"];return(0,h.jsx)(M.Suspense,{fallback:(0,h.jsx)(W,{}),children:(0,h.jsx)(Ln,{app:le,plugin:ht,children:(0,h.jsx)(y,{attributes:{pluginId:ht.getId(),...Pe&&{extension:Pe},...he&&{routeRef:he.id}},children:(0,h.jsx)(Xn.o,{plugin:ht,children:(0,h.jsx)(Ie,{...kt})})})})})};De(Gt,"core.plugin",ht);for(const[kt,le]of Object.entries(re))De(Gt,kt,le);return Gt.displayName=`Extension(${He})`,Gt}}}function ln(ve,re,Pe,Ie){return M.Children.toArray(ve).flatMap(He=>{if(!(0,M.isValidElement)(He))return[];if(He.type===M.Fragment)return ln(He.props.children,re,Pe,Ie);if(Je(He,"core.featureFlagged")){const ht=He.props;return("with"in ht?re.isActive(ht.with):!re.isActive(ht.without))?ln(He.props.children,re,Pe,Ie):[]}if(Pe===void 0||Pe(He))return[He];if(Ie)throw new Error(Ie);return ln(He.props.children,re,Pe,Ie)})}class kn{selectByComponentData(re){const Pe=ln(this.node,this.featureFlagsApi,Ie=>Je(Ie,re.key)!==void 0,re.withStrictError);return new kn(Pe,this.featureFlagsApi)}findComponentData(re){return ln(this.node,this.featureFlagsApi,Ie=>Je(Ie,re.key)!==void 0).map(Ie=>Je(Ie,re.key)).filter(Ie=>Ie!==void 0)}getElements(){return ln(this.node,this.featureFlagsApi)}constructor(re,Pe){this.node=re,this.featureFlagsApi=Pe}}function Mn(ve,re,Pe=[]){const Ie=Se(We),He=new kn(ve,Ie);return(0,M.useMemo)(()=>re(He),[ve,...Pe])}class wn{getId(){return this.config.id}getApis(){var re;return(re=this.config.apis)!==null&&re!==void 0?re:[]}getFeatureFlags(){var re,Pe;return(Pe=(re=this.config.featureFlags)===null||re===void 0?void 0:re.slice())!==null&&Pe!==void 0?Pe:[]}get routes(){var re;return(re=this.config.routes)!==null&&re!==void 0?re:{}}get externalRoutes(){var re;return(re=this.config.externalRoutes)!==null&&re!==void 0?re:{}}provide(re){return re.expose(this)}__experimentalReconfigure(re){this.config.__experimentalConfigure&&(this.options=this.config.__experimentalConfigure(re))}getPluginOptions(){this.config.__experimentalConfigure&&!this.options&&(this.options=this.config.__experimentalConfigure());var re;return(re=this.options)!==null&&re!==void 0?re:{}}toString(){return`plugin{${this.config.id}}`}constructor(re){this.config=re,this.options=void 0}}function Gn(ve){return new wn(ve)}},64355:function(bt,Oe,t){"use strict";t.d(Oe,{o:function(){return g},y:function(){return y}});var h=t(52322),r=t(51837),M=t(2784);const P="plugin-context",g=a=>{const{children:$,plugin:Se}=a,{Provider:J}=(0,r.CT)(P);return(0,h.jsx)(J,{value:(0,r.EI)({1:{plugin:Se}}),children:$})};function y(){const a=(0,r.Vt)(P);if(!a)throw new Error("Plugin Options context is not available");const $=a.atVersion(1);if(!$)throw new Error("Plugin Options v1 is not available");return $.plugin.getPluginOptions()}},23054:function(bt,Oe,t){"use strict";t.d(Oe,{SP:function(){return Q},dR:function(){return H},VL:function(){return ne},BD:function(){return r}});function h(k){if(typeof k!="object"||k===null||Array.isArray(k))return!1;const E=k;return!(typeof E.name!="string"||E.name===""||typeof E.message!="string")}function r(k){if(typeof k!="object"||k===null||Array.isArray(k))throw new Error(`Encountered invalid error, not an object, got '${k}'`);const E=k;if(typeof E.name!="string"||E.name==="")throw new Error(`Encountered error object without a name, got '${k}'`);if(typeof E.message!="string")throw new Error(`Encountered error object without a message, got '${k}'`)}var M=t(24852);function P(k,E){const N={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(k)};return E!=null&&E.includeStack||delete N.stack,N}function g(k){const E=(0,M.deserializeError)(k);return k.stack||(E.stack=void 0),E}function y(k){if(h(k)){const E=String(k);return E!=="[object Object]"?E:`${k.name}: ${k.message}`}return`unknown error '${k}'`}class a extends Error{constructor(E,z){var N;let R=E;if(z!==void 0){const oe=y(z);R?R+=`; caused by ${oe}`:R=`caused by ${oe}`}super(R),(N=Error.captureStackTrace)===null||N===void 0||N.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=h(z)?z:void 0}}class $ extends null{}class Se extends null{}class J extends null{}class H extends a{}class I extends null{}class T extends null{}class Q extends a{constructor(E,z){super(E,z),this.name=h(z)?z.name:"Error"}}async function se(k){try{const z=await k.text();if(z){var E;if(!((E=k.headers.get("content-type"))===null||E===void 0)&&E.startsWith("application/json"))try{const N=JSON.parse(z);if(N.error&&N.response)return N}catch{}return{error:{name:"Error",message:`Request failed with status ${k.status} ${k.statusText}, ${z}`},response:{statusCode:k.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${k.status} ${k.statusText}`},response:{statusCode:k.status}}}class ne extends Error{static async fromResponse(E){const z=await se(E),N=z.response.statusCode||E.status,R=z.error.name||E.statusText,oe=`Request failed with ${N} ${R}`,Ae=g(z.error);return new ne({message:oe,response:E,data:z,cause:Ae})}constructor(E){super(E.message),this.name="ResponseError",this.response=E.response,this.body=E.data,this.cause=E.cause}}},32838:function(bt,Oe,t){"use strict";t.d(Oe,{nW:function(){return ne},ae:function(){return H},q3:function(){return I}});var h=t(60871);const r=(0,h.T0)({id:"core.scmauth"});var M=new WeakMap;class P{async getCredentials(E){const z=new URL(E.url),N=_class_private_field_get(this,M).find(R=>R.isUrlSupported(z));if(!N)throw new Error(`No auth provider available for '${E.url}', see https://backstage.io/link?scm-auth`);return N.getCredentials(E)}constructor(E){_class_private_field_init(this,M,{writable:!0,value:void 0}),_class_private_field_set(this,M,E)}}var g=new WeakMap,y=new WeakMap,a=new WeakMap,$=new WeakMap;class Se{static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:E,gitlab:z,azure:N,bitbucket:R})=>Se.merge(Se.forGithub(E),Se.forGitlab(z),Se.forAzure(N),Se.forBitbucket(R))})}static forAuthApi(E,z){return new Se("generic",E,z.host,z.scopeMapping)}static forGithub(E,z){var N;const R=(N=z==null?void 0:z.host)!==null&&N!==void 0?N:"github.com";return new Se("github",E,R,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(E,z){var N;const R=(N=z==null?void 0:z.host)!==null&&N!==void 0?N:"gitlab.com";return new Se("gitlab",E,R,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(E,z){var N;const R=(N=z==null?void 0:z.host)!==null&&N!==void 0?N:"dev.azure.com";return new Se("azure",E,R,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(E,z){var N;const R=(N=z==null?void 0:z.host)!==null&&N!==void 0?N:"bitbucket.org";return new Se("bitbucket",E,R,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...E){return new P(E)}isUrlSupported(E){return E.host===_class_private_field_get(this,y)}getAdditionalScopesForProvider(E){var z;if(!(E!=null&&E.customScopes)||_class_private_field_get(this,$)==="generic")return[];var N;return(N=(z=E.customScopes)===null||z===void 0?void 0:z[_class_private_field_get(this,$)])!==null&&N!==void 0?N:[]}async getCredentials(E){const{url:z,additionalScope:N,...R}=E,oe=_class_private_field_get(this,a).default.slice();N!=null&&N.repoWrite&&oe.push(..._class_private_field_get(this,a).repoWrite);const Ae=this.getAdditionalScopesForProvider(N);Ae.length&&oe.push(...Ae);const _e=[...new Set(oe)],Ye=await _class_private_field_get(this,g).getAccessToken(_e,R);return{token:Ye,headers:{Authorization:`Bearer ${Ye}`}}}constructor(E,z,N,R){_class_private_field_init(this,g,{writable:!0,value:void 0}),_class_private_field_init(this,y,{writable:!0,value:void 0}),_class_private_field_init(this,a,{writable:!0,value:void 0}),_class_private_field_init(this,$,{writable:!0,value:void 0}),_class_private_field_set(this,g,z),_class_private_field_set(this,y,N),_class_private_field_set(this,a,R),_class_private_field_set(this,$,E)}}var J=t(79158);class H{static fromConfig(E){return J.Lx.fromConfig(E)}}const I=(0,h.T0)({id:"integration.scmintegrations"});var T=t(52322),Q=t(73250),se=t(2784);const ne=k=>{const{type:E}=k,z=(0,h.qD)(),N=Q.Z;var R;const oe=E&&(R=z.getSystemIcon(E))!==null&&R!==void 0?R:N;return(0,T.jsx)(oe,{})}},79158:function(bt,Oe,t){"use strict";t.d(Oe,{Lx:function(){return pr},BT:function(){return Ze}});var h=t(82717),r=t.n(h),M=t(76635);function P(w){const d=new URL("http://example.com");return d.host=w,d.host===w}function g(w){try{return new URL(w),!0}catch{return!1}}function y(w,d){return{list(){return w},byUrl(x){try{const A=typeof x=="string"?new URL(x):x;return w.find(X=>d(X)===A.host)}catch{return}},byHost(x){return w.find(A=>d(A)===x)}}}function a(w){const{url:d,base:x,lineNumber:A}=w;try{return new URL(d),d}catch{}let X;if(d.startsWith("/")){const{filepath:pe}=r()(x);X=new URL(x);const xe=(0,M.trimEnd)(X.pathname.substring(0,X.pathname.length-pe.length),"/");X.pathname=`${xe}${d}`}else X=new URL(d,x);return X.search=new URL(x).search,A&&(X.hash=`L${A}`),X.toString()}const $="amazonaws.com";function Se(w){const d=w.getOptionalString("endpoint");var x;const A=(x=w.getOptionalBoolean("s3ForcePathStyle"))!==null&&x!==void 0?x:!1;let X,pe;if(d){try{const cn=new URL(d);X=cn.host,pe=cn.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${d}' is not a valid URL`)}if(pe!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${d}'`)}else X=$;const xe=w.getOptionalString("accessKeyId"),be=w.getOptionalString("secretAccessKey"),ft=w.getOptionalString("roleArn"),Ft=w.getOptionalString("externalId");return{host:X,endpoint:d,s3ForcePathStyle:A,accessKeyId:xe,secretAccessKey:be,roleArn:ft,externalId:Ft}}function J(w){const d=w.map(Se);return d.some(x=>x.host===$)||d.push({host:$}),d}class H{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){return a(d)}resolveEditUrl(d){return d}constructor(d){this.integrationConfig=d}}H.factory=({config:w})=>{var d;const x=J((d=w.getOptionalConfigArray("integrations.awsS3"))!==null&&d!==void 0?d:[]);return y(x.map(A=>new H(A)),A=>A.config.host)};var I=t(90383),T=t(22504),Q=t(69866);const se="GB";var ne=new WeakMap,k=new WeakMap,E=new WeakMap,z=new WeakMap,N=new WeakMap,R=new WeakMap,oe=new WeakMap;class Ae{static fromRepoUrl(d){const x=new URL(d);let A,X,pe;const xe=x.pathname.split("/").map(Wn=>decodeURIComponent(Wn));if(xe[2]==="_git"?(A=xe[1],X=pe=xe[3]):xe[3]==="_git"?(A=xe[1],X=xe[2],pe=xe[4]):xe[4]==="_git"&&(A=`${xe[1]}/${xe[2]}`,X=xe[3],pe=xe[5]),!A||!X||!pe)throw new Error("Azure URL must point to a git repository");var be;const ft=(be=x.searchParams.get("path"))!==null&&be!==void 0?be:void 0;let Ft;const cn=x.searchParams.get("version");if(cn){if(cn.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Ft=cn.slice(2)}return new Ae(x.origin,A,X,pe,ft,Ft)}toRepoUrl(){let d;return(0,I.Z)(this,E)===(0,I.Z)(this,z)?d=(0,I.Z)(this,oe).call(this,(0,I.Z)(this,k),"_git",(0,I.Z)(this,z)):d=(0,I.Z)(this,oe).call(this,(0,I.Z)(this,k),(0,I.Z)(this,E),"_git",(0,I.Z)(this,z)),(0,I.Z)(this,N)&&d.searchParams.set("path",(0,I.Z)(this,N)),(0,I.Z)(this,R)&&d.searchParams.set("version",se+(0,I.Z)(this,R)),d.toString()}toFileUrl(){if(!(0,I.Z)(this,N))throw new Error("Azure URL must point to a specific path to be able to download a file");const d=(0,I.Z)(this,oe).call(this,(0,I.Z)(this,k),(0,I.Z)(this,E),"_apis","git","repositories",(0,I.Z)(this,z),"items");return d.searchParams.set("api-version","6.0"),d.searchParams.set("path",(0,I.Z)(this,N)),(0,I.Z)(this,R)&&d.searchParams.set("version",(0,I.Z)(this,R)),d.toString()}toArchiveUrl(){const d=(0,I.Z)(this,oe).call(this,(0,I.Z)(this,k),(0,I.Z)(this,E),"_apis","git","repositories",(0,I.Z)(this,z),"items");return d.searchParams.set("recursionLevel","full"),d.searchParams.set("download","true"),d.searchParams.set("api-version","6.0"),(0,I.Z)(this,N)&&d.searchParams.set("scopePath",(0,I.Z)(this,N)),(0,I.Z)(this,R)&&d.searchParams.set("version",(0,I.Z)(this,R)),d.toString()}toCommitsUrl(){const d=(0,I.Z)(this,oe).call(this,(0,I.Z)(this,k),(0,I.Z)(this,E),"_apis","git","repositories",(0,I.Z)(this,z),"commits");return d.searchParams.set("api-version","6.0"),(0,I.Z)(this,R)&&d.searchParams.set("searchCriteria.itemVersion.version",(0,I.Z)(this,R)),d.toString()}getOwner(){return(0,I.Z)(this,k)}getProject(){return(0,I.Z)(this,E)}getRepo(){return(0,I.Z)(this,z)}getPath(){return(0,I.Z)(this,N)}getRef(){return(0,I.Z)(this,R)}constructor(d,x,A,X,pe,xe){(0,T.Z)(this,ne,{writable:!0,value:void 0}),(0,T.Z)(this,k,{writable:!0,value:void 0}),(0,T.Z)(this,E,{writable:!0,value:void 0}),(0,T.Z)(this,z,{writable:!0,value:void 0}),(0,T.Z)(this,N,{writable:!0,value:void 0}),(0,T.Z)(this,R,{writable:!0,value:void 0}),(0,T.Z)(this,oe,{writable:!0,value:(...be)=>{const ft=new URL((0,I.Z)(this,ne));return ft.pathname=be.map(Ft=>encodeURIComponent(Ft)).join("/"),ft}}),(0,Q.Z)(this,ne,d),(0,Q.Z)(this,k,x),(0,Q.Z)(this,E,A),(0,Q.Z)(this,z,X),(0,Q.Z)(this,N,pe),(0,Q.Z)(this,R,xe)}}const _e="dev.azure.com";function Ye(w){var d;const x=(d=w.getOptionalString("host"))!==null&&d!==void 0?d:_e,A=w.getOptionalString("token");if(!P(x))throw new Error(`Invalid Azure integration config, '${x}' is not a valid host`);return{host:x,token:A}}function dt(w){const d=w.map(Ye);return d.some(x=>x.host===_e)||d.push({host:_e}),d}class Me{get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){const{url:x,base:A}=d;if(g(x))return x;try{const pe=Ae.fromRepoUrl(A),xe=new URL(A);var X;const be=new URL(`https://a.com${(X=pe.getPath())!==null&&X!==void 0?X:""}`),ft=new URL(x,be).pathname;return xe.searchParams.set("path",ft),d.lineNumber&&(xe.searchParams.set("line",String(d.lineNumber)),xe.searchParams.set("lineEnd",String(d.lineNumber+1)),xe.searchParams.set("lineStartColumn","1"),xe.searchParams.set("lineEndColumn","1")),xe.toString()}catch{return new URL(x,A).toString()}}resolveEditUrl(d){return d}constructor(d){this.integrationConfig=d}}Me.factory=({config:w})=>{var d;const x=dt((d=w.getOptionalConfigArray("integrations.azure"))!==null&&d!==void 0?d:[]);return y(x.map(A=>new Me(A)),A=>A.config.host)};var at=t(48834).lW;function rt(w){return AzureUrl.fromRepoUrl(w).toFileUrl()}function ot(w){return AzureUrl.fromRepoUrl(w).toArchiveUrl()}function We(w){return AzureUrl.fromRepoUrl(w).toCommitsUrl()}function $e(w,d){const x=d?{...d}:{};if(w.token){const A=at.from(`:${w.token}`,"utf8");x.Authorization=`Basic ${A.toString("base64")}`}return{headers:x}}const St="bitbucket.org",gt="https://api.bitbucket.org/2.0";function Ct(w){var d;const x=(d=w.getOptionalString("host"))!==null&&d!==void 0?d:St;let A=w.getOptionalString("apiBaseUrl");const X=w.getOptionalString("token"),pe=w.getOptionalString("username"),xe=w.getOptionalString("appPassword");if(!P(x))throw new Error(`Invalid Bitbucket integration config, '${x}' is not a valid host`);return A?A=(0,M.trimEnd)(A,"/"):x===St?A=gt:A=`https://${x}/rest/api/1.0`,{host:x,apiBaseUrl:A,token:X,username:pe,appPassword:xe}}function Nt(w){const d=w.map(Ct);return d.some(x=>x.host===St)||d.push({host:St,apiBaseUrl:gt}),d}class Lt{get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){const x=a(d);if(!d.lineNumber)return x;const A=new URL(x);return this.integrationConfig.host==="bitbucket.org"?A.hash=`lines-${d.lineNumber}`:A.hash=`${d.lineNumber}`,A.toString()}resolveEditUrl(d){const x=r()(d),A=new URL(d);return A.searchParams.set("mode","edit"),A.searchParams.set("spa","0"),A.searchParams.set("at",x.ref),A.toString()}constructor(d){this.integrationConfig=d}}Lt.factory=({config:w})=>{var d,x,A;const X=Nt((A=w.getOptionalConfigArray("integrations.bitbucket"))!==null&&A!==void 0?A:[...(d=w.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&d!==void 0?d:[],...(x=w.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&x!==void 0?x:[]]);return y(X.map(pe=>new Lt(pe)),pe=>pe.config.host)};var Fe=t(96279),ge=t(48834).lW;async function Le(w,d){const{name:x,owner:A,resource:X}=parseGitUrl(w),pe=X==="bitbucket.org";let xe=pe?`${d.apiBaseUrl}/repositories/${A}/${x}`:`${d.apiBaseUrl}/projects/${A}/repos/${x}/default-branch`,be=await fetch(xe,Je(d));if(be.status===404&&!pe&&(xe=`${d.apiBaseUrl}/projects/${A}/repos/${x}/branches/default`,be=await fetch(xe,Je(d))),!be.ok){const Ft=`Failed to retrieve default branch from ${xe}, ${be.status} ${be.statusText}`;throw new Error(Ft)}let ft;if(pe)ft=(await be.json()).mainbranch.name;else{const{displayId:Ft}=await be.json();ft=Ft}if(!ft)throw new Error(`Failed to read default branch from ${xe}. Response ${be.status} ${be.json()}`);return ft}async function Te(w,d){const{name:x,owner:A,ref:X,protocol:pe,resource:xe,filepath:be}=parseGitUrl(w),ft=xe==="bitbucket.org";let Ft=X;Ft||(Ft=await Le(w,d));const cn=be?`&path=${encodeURIComponent(decodeURIComponent(be))}`:"";return ft?`${pe}://${xe}/${A}/${x}/get/${Ft}.tar.gz`:`${d.apiBaseUrl}/projects/${A}/repos/${x}/archive?format=tgz&at=${Ft}&prefix=${A}-${x}${cn}`}function De(w,d){try{const{owner:x,name:A,ref:X,filepathtype:pe,filepath:xe}=parseGitUrl(w);if(!x||!A||pe!=="browse"&&pe!=="raw"&&pe!=="src")throw new Error("Invalid Bitbucket URL or file path");const be=xe.replace(/^\//,"");if(d.host==="bitbucket.org"){if(!X)throw new Error("Invalid Bitbucket URL or file path");return`${d.apiBaseUrl}/repositories/${x}/${A}/src/${X}/${be}`}return`${d.apiBaseUrl}/projects/${x}/repos/${A}/raw/${be}?at=${X}`}catch(x){throw new Error(`Incorrect URL: ${w}, ${x}`)}}function Je(w){const d={};if(w.token)d.Authorization=`Bearer ${w.token}`;else if(w.username&&w.appPassword){const x=ge.from(`${w.username}:${w.appPassword}`,"utf8");d.Authorization=`Basic ${x.toString("base64")}`}return{headers:d}}const Wt="bitbucket.org",vt="https://api.bitbucket.org/2.0";function Tt(w){const d=Wt,x=vt,A=w.getString("username"),X=w.getString("appPassword");return{host:d,apiBaseUrl:x,username:A,appPassword:X}}function yt(w){const d=w.map(Tt);return d.length===0&&d.push({host:Wt,apiBaseUrl:vt}),d}class Pt{get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){const x=a(d);if(d.lineNumber){const A=new URL(x);return A.hash=`lines-${d.lineNumber}`,A.toString()}return x}resolveEditUrl(d){const x=r()(d),A=new URL(d);return A.searchParams.set("mode","edit"),A.searchParams.set("at",x.ref),A.toString()}constructor(d){this.integrationConfig=d}}Pt.factory=({config:w})=>{var d;const x=yt((d=w.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&d!==void 0?d:[]);return y(x.map(A=>new Pt(A)),A=>A.config.host)};var Yt=t(48834).lW;async function sn(w,d){const{name:x,owner:A}=parseGitUrl(w),X=`${d.apiBaseUrl}/repositories/${A}/${x}`,pe=await fetch(X,xn(d));if(!pe.ok){const ft=`Failed to retrieve default branch from ${X}, ${pe.status} ${pe.statusText}`;throw new Error(ft)}const be=(await pe.json()).mainbranch.name;if(!be)throw new Error(`Failed to read default branch from ${X}. Response ${pe.status} ${pe.json()}`);return be}async function hn(w,d){const{name:x,owner:A,ref:X,protocol:pe,resource:xe}=parseGitUrl(w);let be=X;return be||(be=await sn(w,d)),`${pe}://${xe}/${A}/${x}/get/${be}.tar.gz`}function $t(w,d){try{const{owner:x,name:A,ref:X,filepathtype:pe,filepath:xe}=parseGitUrl(w);if(!x||!A||pe!=="src"&&pe!=="raw")throw new Error("Invalid Bitbucket Cloud URL or file path");const be=xe.replace(/^\//,"");if(!X)throw new Error("Invalid Bitbucket Cloud URL or file path");return`${d.apiBaseUrl}/repositories/${x}/${A}/src/${X}/${be}`}catch(x){throw new Error(`Incorrect URL: ${w}, ${x}`)}}function xn(w){const d={};if(w.username&&w.appPassword){const x=Yt.from(`${w.username}:${w.appPassword}`,"utf8");d.Authorization=`Basic ${x.toString("base64")}`}return{headers:d}}function bn(w){const d=w.getString("host");let x=w.getOptionalString("apiBaseUrl");const A=w.getOptionalString("token"),X=w.getOptionalString("username"),pe=w.getOptionalString("password");if(!P(d))throw new Error(`Invalid Bitbucket Server integration config, '${d}' is not a valid host`);return x?x=(0,M.trimEnd)(x,"/"):x=`https://${d}/rest/api/1.0`,{host:d,apiBaseUrl:x,token:A,username:X,password:pe}}function Rn(w){return w.map(bn)}class pn{get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){const x=a(d);if(d.lineNumber){const A=new URL(x);return A.hash=d.lineNumber.toString(),A.toString()}return x}resolveEditUrl(d){return d.includes("?")?d.substring(0,d.indexOf("?")):d}constructor(d){this.integrationConfig=d}}pn.factory=({config:w})=>{var d;const x=Rn((d=w.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&d!==void 0?d:[]);return y(x.map(A=>new pn(A)),A=>A.config.host)};var Un=t(48834).lW;async function Ln(w,d){const{name:x,owner:A}=parseGitUrl(w);let X=`${d.apiBaseUrl}/projects/${A}/repos/${x}/default-branch`,pe=await fetch(X,Pn(d));if(pe.status===404&&(X=`${d.apiBaseUrl}/projects/${A}/repos/${x}/branches/default`,pe=await fetch(X,Pn(d))),!pe.ok){const ft=`Failed to retrieve default branch from ${X}, ${pe.status} ${pe.statusText}`;throw new Error(ft)}const{displayId:xe}=await pe.json(),be=xe;if(!be)throw new Error(`Failed to read default branch from ${X}. Response ${pe.status} ${pe.json()}`);return be}async function Xn(w,d){const{name:x,owner:A,ref:X,filepath:pe}=parseGitUrl(w);let xe=X;xe||(xe=await Ln(w,d));const be=pe?`&path=${encodeURIComponent(decodeURIComponent(pe))}`:"";return`${d.apiBaseUrl}/projects/${A}/repos/${x}/archive?format=tgz&at=${xe}&prefix=${A}-${x}${be}`}function ct(w,d){try{const{owner:x,name:A,ref:X,filepathtype:pe,filepath:xe}=parseGitUrl(w);if(!x||!A||pe!=="browse"&&pe!=="raw"&&pe!=="src")throw new Error("Invalid Bitbucket Server URL or file path");const be=xe.replace(/^\//,"");return`${d.apiBaseUrl}/projects/${x}/repos/${A}/raw/${be}?at=${X}`}catch(x){throw new Error(`Incorrect URL: ${w}, ${x}`)}}function Pn(w){const d={};if(w.token)d.Authorization=`Bearer ${w.token}`;else if(w.username&&w.password){const x=Un.from(`${w.username}:${w.password}`,"utf8");d.Authorization=`Basic ${x.toString("base64")}`}return{headers:d}}function Cn(w){const d=w.getString("host");let x=w.getOptionalString("baseUrl"),A=w.getOptionalString("cloneUrl"),X=w.getOptionalString("gitilesBaseUrl");const pe=w.getOptionalString("username"),xe=w.getOptionalString("password");if(P(d)){if(x&&!g(x))throw new Error(`Invalid Gerrit integration config, '${x}' is not a valid baseUrl`);if(A&&!g(A))throw new Error(`Invalid Gerrit integration config, '${A}' is not a valid cloneUrl`);if(X&&!g(X))throw new Error(`Invalid Gerrit integration config, '${X}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${d}' is not a valid host`);return x?x=(0,M.trimEnd)(x,"/"):x=`https://${d}`,X?X=(0,M.trimEnd)(X,"/"):X=`https://${d}`,A?A=(0,M.trimEnd)(A,"/"):A=x,{host:d,baseUrl:x,cloneUrl:A,gitilesBaseUrl:X,username:pe,password:xe}}function ln(w){return w.map(Cn)}var kn=t(48834).lW;const Mn=")]}'";function wn(w,d){const A=d.replace(w.gitilesBaseUrl,"").split("/").filter(Ft=>!!Ft),X=A.indexOf("+");if(X<=0)throw new Error(`Unable to parse project from url: ${d}`);const pe=(0,M.trimStart)(A.slice(0,X).join("/"),"/"),xe=A.indexOf("heads");if(xe<=0)throw new Error(`Unable to parse branch from url: ${d}`);const be=A[xe+1],ft=A.slice(xe+2).join("/");return{branch:be,filePath:ft===""?"/":ft,project:pe}}function Gn(w,d,x,A){return`${w.gitilesBaseUrl}/${d}/+/refs/heads/${x}/${(0,M.trimStart)(A,"/")}`}function ve(w){return w.password?"/a/":"/"}function re(w,d){const{branch:x,project:A}=wn(w,d);return`${w.baseUrl}${ve(w)}projects/${encodeURIComponent(A)}/branches/${x}`}function Pe(w,d){const{project:x}=wn(w,d);return`${w.cloneUrl}${ve(w)}${x}`}function Ie(w,d){const{branch:x,filePath:A,project:X}=wn(w,d);return`${w.baseUrl}${ve(w)}projects/${encodeURIComponent(X)}/branches/${x}/files/${encodeURIComponent(A)}/content`}function He(w){return`${w.baseUrl}${ve(w)}projects/`}function ht(w){const d={};if(!w.password)return d;const x=kn.from(`${w.username}:${w.password}`,"utf8");return d.Authorization=`Basic ${x.toString("base64")}`,{headers:d}}async function Gt(w){const d=await w.text();if(d.startsWith(Mn))try{return JSON.parse(d.slice(Mn.length))}catch(x){throw new Error(`Invalid response from Gerrit: ${d.slice(0,10)} - ${x}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${d.slice(0,10)}`)}class kt{get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){const{url:x,base:A,lineNumber:X}=d;let pe;if(x.startsWith("/")){const{branch:xe,project:be}=wn(this.config,A);return Gn(this.config,be,xe,x)}return x?pe=new URL(x,A):pe=new URL(A),X&&(pe.hash=X.toString()),pe.toString()}resolveEditUrl(d){return d}constructor(d){this.integrationConfig=d}}kt.factory=({config:w})=>{var d;const x=ln((d=w.getOptionalConfigArray("integrations.gerrit"))!==null&&d!==void 0?d:[]);return y(x.map(A=>new kt(A)),A=>A.config.host)};function le(w){const d=w.getString("host");let x=w.getOptionalString("baseUrl");const A=w.getOptionalString("username"),X=w.getOptionalString("password");if(!P(d))throw new Error(`Invalid Gitea integration config, '${d}' is not a valid host`);return x?x=(0,M.trimEnd)(x,"/"):x=`https://${d}`,{host:d,baseUrl:x,username:A,password:X}}var W=t(48834).lW;function he(w,d){try{var x;const A=(x=w.baseUrl)!==null&&x!==void 0?x:`https://${w.host}`,[X,pe,xe,be,ft,Ft,...cn]=d.replace(A,"").split("/"),Wn=cn.join("/").replace(/^\//,"");return`${A}/${pe}/${xe}/_edit/${Ft}/${Wn}`}catch(A){throw new Error(`Incorrect URL: ${d}, ${A}`)}}function Ve(w,d){try{var x;const A=(x=w.baseUrl)!==null&&x!==void 0?x:`https://${w.host}`,[X,pe,xe,be,ft,Ft,...cn]=d.replace(A,"").split("/"),Wn=cn.join("/").replace(/^\//,"");return`${A}/api/v1/repos/${pe}/${xe}/contents/${Wn}?ref=${Ft}`}catch(A){throw new Error(`Incorrect URL: ${d}, ${A}`)}}function ut(w){const d={},{username:x,password:A}=w;return A?(x?d.Authorization=`basic ${W.from(`${x}:${A}`).toString("base64")}`:d.Authorization=`token ${A}`,{headers:d}):d}class ze{get type(){return"gitea"}get title(){return this.config.host}resolveUrl(d){return a(d)}resolveEditUrl(d){return he(this.config,d)}constructor(d){this.config=d}}ze.factory=({config:w})=>{var d;const A=((d=w.getOptionalConfigArray("integrations.gitea"))!==null&&d!==void 0?d:[]).map(X=>le(X));return y(A.map(X=>new ze(X)),X=>X.config.host)};const It="github.com",Jt="https://api.github.com",rn="https://raw.githubusercontent.com";function on(w){var d,x;const A=(x=w.getOptionalString("host"))!==null&&x!==void 0?x:It;let X=w.getOptionalString("apiBaseUrl"),pe=w.getOptionalString("rawBaseUrl");const xe=w.getOptionalString("token"),be=(d=w.getOptionalConfigArray("apps"))===null||d===void 0?void 0:d.map(ft=>({appId:ft.getNumber("appId"),clientId:ft.getString("clientId"),clientSecret:ft.getString("clientSecret"),webhookSecret:ft.getString("webhookSecret"),privateKey:ft.getString("privateKey"),allowedInstallationOwners:ft.getOptionalStringArray("allowedInstallationOwners")}));if(!P(A))throw new Error(`Invalid GitHub integration config, '${A}' is not a valid host`);return X?X=(0,M.trimEnd)(X,"/"):A===It&&(X=Jt),pe?pe=(0,M.trimEnd)(pe,"/"):A===It&&(pe=rn),{host:A,apiBaseUrl:X,rawBaseUrl:pe,token:xe,apps:be}}function q(w){const d=w.map(on);return d.some(x=>x.host===It)||d.push({host:It,apiBaseUrl:Jt,rawBaseUrl:rn}),d}function G(w,d,x){try{const{owner:A,name:X,ref:pe,filepathtype:xe,filepath:be}=parseGitUrl(w);if(!A||!X||!pe||xe!=="blob"&&xe!=="raw"&&xe!=="tree")throw new Error("Invalid GitHub URL or file path");const ft=be.replace(/^\//,"");return C(d,x)==="api"?`${d.apiBaseUrl}/repos/${A}/${X}/contents/${ft}?ref=${pe}`:`${d.rawBaseUrl}/${A}/${X}/${pe}/${ft}`}catch(A){throw new Error(`Incorrect URL: ${w}, ${A}`)}}function m(w,d){const x={};return C(w,d)==="api"&&(x.Accept="application/vnd.github.v3.raw"),d.token&&(x.Authorization=`token ${d.token}`),{headers:x}}function C(w,d){return w.apiBaseUrl&&(d.token||!w.rawBaseUrl)?"api":"raw"}var Z=t(42822),K=t(89393),ce=t(26228);class de{async getOrCreateToken(d,x,A){let X=this.tokenCache.get(d);if((!X||this.isExpired(X.expiresAt))&&(X=await A(),X.expiresAt=X.expiresAt.minus({minutes:10}),this.tokenCache.set(d,X)),!this.appliesToRepo(X,x))throw new Error(`The Backstage GitHub application used in the ${d} organization does not have access to a repository with the name ${x}`);return{accessToken:X.token}}appliesToRepo(d,x){return x===void 0?!0:d.repositories!==void 0?d.repositories.includes(x):!0}constructor(){this.tokenCache=new Map,this.isExpired=d=>ce.ou.local()>d}}const Re={Accept:"application/vnd.github.machine-man-preview+json"};class st{async getInstallationCredentials(d,x){if(this.allowedInstallationOwners){var A;if(!(!((A=this.allowedInstallationOwners)===null||A===void 0)&&A.includes(d)))return{accessToken:void 0}}return this.cache.getOrCreateToken(d,x,async()=>{const{installationId:X,suspended:pe}=await this.getInstallationData(d);if(pe)throw new Error(`The GitHub application for ${d} is suspended`);const xe=await this.appClient.apps.createInstallationAccessToken({installation_id:X,headers:Re});let be;if(xe.data.repository_selection==="selected"){const Ft=new K.v({baseUrl:this.baseUrl,auth:xe.data.token}),cn=await Ft.paginate(Ft.apps.listReposAccessibleToInstallation);var ft;be=((ft=cn.repositories)!==null&&ft!==void 0?ft:cn).map(rr=>rr.name)}return{token:xe.data.token,expiresAt:ce.ou.fromISO(xe.data.expires_at),repositories:be}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(d){const A=(await this.getInstallations()).find(pe=>{var xe,be;return((xe=pe.account)===null||xe===void 0||(be=xe.login)===null||be===void 0?void 0:be.toLocaleLowerCase("en-US"))===d.toLocaleLowerCase("en-US")});if(A)return{installationId:A.id,suspended:Boolean(A.suspended_by)};const X=new Error(`No app installation found for ${d} in ${this.baseAuthConfig.appId}`);throw X.name="NotFoundError",X}constructor(d,x){this.cache=new de,this.allowedInstallationOwners=d.allowedInstallationOwners,this.baseUrl=x,this.baseAuthConfig={appId:d.appId,privateKey:d.privateKey.replace(/\\n/gm,`
|
|
33
|
-
`)},this.appClient=new K.v({baseUrl:x,headers:Re,authStrategy:Z.i,auth:this.baseAuthConfig})}}class Ge{async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(x=>x.getInstallations()))).flat():[]}async getAppToken(d,x){if(this.apps.length===0)return;const A=await Promise.all(this.apps.map(be=>be.getInstallationCredentials(d,x).then(ft=>({credentials:ft,error:void 0}),ft=>({credentials:void 0,error:ft})))),X=A.find(be=>be.credentials);if(X)return X.credentials.accessToken;const xe=A.map(be=>be.error).find(be=>be.name!=="NotFoundError");if(xe)throw xe}constructor(d){var x,A;this.apps=(A=(x=d.apps)===null||x===void 0?void 0:x.map(X=>new st(X,d.apiBaseUrl)))!==null&&A!==void 0?A:[]}}class mt{async getCredentials(d){const x=r()(d.url),A=x.owner||x.name,X=x.owner?x.name:void 0;let pe="app",xe=await this.githubAppCredentialsMux.getAppToken(A,X);return xe||(pe="token",xe=this.token),{headers:xe?{Authorization:`Bearer ${xe}`}:void 0,token:xe,type:pe}}constructor(d,x){this.githubAppCredentialsMux=d,this.token=x}}mt.create=w=>new mt(new Ge(w),w.token);class Et{static fromIntegrations(d){const x=new Map;return d.github.list().forEach(A=>{const X=SingleInstanceGithubCredentialsProvider.create(A.config);x.set(A.config.host,X)}),new Et(x)}async getCredentials(d){const x=new URL(d.url),A=this.providers.get(x.host);if(!A)throw new Error(`There is no GitHub integration that matches ${d.url}. Please add a configuration for an integration.`);return A.getCredentials(d)}constructor(d){this.providers=d}}class et{get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){return Ze(a(d),"tree")}resolveEditUrl(d){return Ze(d,"edit")}constructor(d){this.integrationConfig=d}}et.factory=({config:w})=>{var d;const x=q((d=w.getOptionalConfigArray("integrations.github"))!==null&&d!==void 0?d:[]);return y(x.map(A=>new et(A)),A=>A.config.host)};function Ze(w,d){return w.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(x,A,X,pe)=>`//${A}/${X}/${pe}/${d}/`)}const pt=null;class At extends et{get config(){return super.config}constructor(d){super(d)}}At.factory=et.factory;const Vt=null,Dt=null,Mt=null,Ht="gitlab.com",Rt="https://gitlab.com/api/v4";function tt(w){const d=w.getString("host");let x=w.getOptionalString("apiBaseUrl");const A=w.getOptionalString("token");let X=w.getOptionalString("baseUrl");if(x?x=(0,M.trimEnd)(x,"/"):d===Ht&&(x=Rt),X?X=(0,M.trimEnd)(X,"/"):X=`https://${d}`,P(d)){if(!x||!g(x))throw new Error(`Invalid GitLab integration config, '${x}' is not a valid apiBaseUrl`);if(!g(X))throw new Error(`Invalid GitLab integration config, '${X}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${d}' is not a valid host`);return{host:d,token:A,apiBaseUrl:x,baseUrl:X}}function Xe(w){const d=w.map(tt);return d.some(x=>x.host===Ht)||d.push({host:Ht,apiBaseUrl:Rt,baseUrl:`https://${Ht}`}),d}function Kt(w){let d="";return w.host!==Ht&&(d=new URL(w.baseUrl).pathname),trimEnd(d,"/")}async function fn(w,d){const x=await Qn(w,d);return zn(w,x,d).toString()}function an(w){const{token:d=""}=w;return{headers:{"PRIVATE-TOKEN":d}}}function zn(w,d,x){try{const A=new URL(w),X=A.pathname.split("/blob/").slice(1).join("/blob/"),[pe,...xe]=X.split("/"),be=getGitLabIntegrationRelativePath(x);return A.pathname=[...be?[be]:[],"api/v4/projects",d,"repository/files",encodeURIComponent(decodeURIComponent(xe.join("/"))),"raw"].join("/"),A.search=`?ref=${pe}`,A}catch(A){throw new Error(`Incorrect url: ${w}, ${A}`)}}async function Qn(w,d){const x=new URL(w);if(!x.pathname.includes("/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{let A=x.pathname.split("/-/blob/")[0].split("/blob/")[0];const X=getGitLabIntegrationRelativePath(d);X&&(A=A.replace(X,""));const pe=new URL(`${x.origin}${X}/api/v4/projects/${encodeURIComponent(A.replace(/^\//,""))}`),xe=await fetch(pe.toString(),an(d)),be=await xe.json();if(!xe.ok)throw new Error(`GitLab Error '${be.error}', ${be.error_description}`);return Number(be.id)}catch(A){throw new Error(`Could not get GitLab project ID for: ${w}, ${A}`)}}class gn{get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){return a(d)}resolveEditUrl(d){return Kn(d,"edit")}constructor(d){this.integrationConfig=d}}gn.factory=({config:w})=>{var d;const x=Xe((d=w.getOptionalConfigArray("integrations.gitlab"))!==null&&d!==void 0?d:[]);return y(x.map(A=>new gn(A)),A=>A.config.host)};function Kn(w,d){return w.replace(/\/\-\/(blob|tree|edit)\//,`/-/${d}/`)}class pr{static fromConfig(d){return new pr({awsS3:H.factory({config:d}),azure:Me.factory({config:d}),bitbucket:Lt.factory({config:d}),bitbucketCloud:Pt.factory({config:d}),bitbucketServer:pn.factory({config:d}),gerrit:kt.factory({config:d}),github:et.factory({config:d}),gitlab:gn.factory({config:d}),gitea:ze.factory({config:d})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get bitbucketCloud(){return this.byType.bitbucketCloud}get bitbucketServer(){return this.byType.bitbucketServer}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}get gitea(){return this.byType.gitea}list(){return Object.values(this.byType).flatMap(d=>d.list())}byUrl(d){let x=Object.values(this.byType).map(A=>A.byUrl(d)).filter(Boolean);if(x.length>1){const A=x.filter(X=>!(X instanceof Lt));A.length!==0&&(x=A)}return x[0]}byHost(d){return Object.values(this.byType).map(x=>x.byHost(d)).find(Boolean)}resolveUrl(d){const x=this.byUrl(d.base);return x?x.resolveUrl(d):a(d)}resolveEditUrl(d){const x=this.byUrl(d);return x?x.resolveEditUrl(d):d}constructor(d){this.byType=d}}},6290:function(bt,Oe,t){"use strict";var h={};t.r(h),t.d(h,{TechDocsPlugin:function(){return R.s4}});var r=t(52322),M=t(2784),P=t(28316),g=t(79635),y=t(60871);const a=(0,y.T0)({id:"plugin.techdocs.storageservice"}),$=(0,y.T0)({id:"plugin.techdocs.service"});var Se=t(92077),J=t(95481),H=t(7476),I=t(93225),T=t(67896),Q=t(65124),se=t(22478),ne=t(85478),k=t(68435),E=t(3482),z=t(42081),N=t(48431),R=t(89258),oe=t(52943),Ae=t(61886),_e=t(13980),Ye=t.n(_e);class dt{get(n){for(const s of this.holders){const c=s.get(n);if(c)return c}}constructor(...n){this.holders=n}}var Me=t(51837);const at=(0,Me.CT)("api-context"),rt=i=>{var n;const{apis:s,children:c}=i,f=(n=(0,M.useContext)(at))===null||n===void 0?void 0:n.atVersion(1),L=f?new dt(s,f):s;return(0,r.jsx)(at.Provider,{value:(0,Me.EI)({1:L}),children:c})};rt.propTypes={apis:Ye().shape({get:Ye().func.isRequired}).isRequired,children:Ye().node};class ot{static validateFactories(n,s){for(const c of s){const f=[c],L=new Set;for(;f.length;){const O=f.shift(),V=n.get(O);if(V)for(const ee of Object.values(V.deps)){if(ee.id===c.id)throw new Error(`Circular dependency of api factory for ${c}`);L.has(ee)||(L.add(ee),f.push(ee))}}}}get(n){return this.load(n)}load(n,s=[]){const c=this.apis.get(n.id);if(c)return c;const f=this.factories.get(n);if(!f)return;if(s.includes(f.api))throw new Error(`Circular dependency of api factory for ${f.api}`);const L=this.loadDeps(n,f.deps,[...s,f.api]),O=f.factory(L);return this.apis.set(n.id,O),O}loadDeps(n,s,c){const f={};for(const L in s)if(s.hasOwnProperty(L)){const O=s[L],V=this.load(O,c);if(!V)throw new Error(`No API factory available for dependency ${O} of dependent ${n}`);f[L]=V}return f}constructor(n){this.factories=n,this.apis=new Map}}var We;(function(i){i[i.default=10]="default",i[i.app=50]="app",i[i.static=100]="static"})(We||(We={}));class $e{register(n,s){const c=We[n],f=this.factories.get(s.api.id);return f&&f.priority>=c?!1:(this.factories.set(s.api.id,{priority:c,factory:s}),!0)}get(n){const s=this.factories.get(n.id);if(s)return s.factory}getAllApis(){const n=new Set;for(const{factory:s}of this.factories.values())n.add(s.api);return n}constructor(){this.factories=new Map}}function St(i){return new Promise((n,s)=>{const c=i.width||500,f=i.height||700,L=window.screen.width/2-c/2,O=window.screen.height/2-f/2,V=window.open(i.url,i.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${c},height=${f},top=${O},left=${L}`);let ee="";if(!V||typeof V.closed=="undefined"||V.closed){const lt=new Error("Failed to open auth popup.");lt.name="PopupRejectedError",s(lt);return}const Ne=lt=>{if(lt.source!==V||lt.origin!==i.origin)return;const{data:wt}=lt;if(wt.type==="config_info"){ee=wt.targetOrigin;return}if(wt.type!=="authorization_response")return;const jt=wt;if("error"in jt){const Ut=new Error(jt.error.message);Ut.name=jt.error.name,s(Ut)}else n(jt.response);qe()},we=setInterval(()=>{if(V.closed){const lt=`Login failed, ${ee&&ee!==window.location.origin?`Incorrect app origin, expected ${ee}`:"popup was closed"}`,wt=new Error(lt);wt.name="PopupClosedError",s(wt),qe()}},100);function qe(){window.removeEventListener("message",Ne),clearInterval(we)}window.addEventListener("message",Ne)})}function gt(i){return[...i].join(" ")}class Ct{async createSession(n){return n.instantPopup?this.showPopup(n.scopes):this.authRequester(n.scopes)}async refreshSession(){const n=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(c=>{throw new Error(`Auth refresh request failed, ${c}`)});if(!n.ok){const c=new Error(`Auth refresh request failed, ${n.statusText}`);throw c.status=n.status,c}const s=await n.json();if(s.error){const c=new Error(s.error.message);throw s.error.name&&(c.name=s.error.name),c}return await this.sessionTransform(s)}async removeSession(){const n=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(s=>{throw new Error(`Logout request failed, ${s}`)});if(!n.ok){const s=new Error(`Logout request failed, ${n.statusText}`);throw s.status=n.status,s}}async showPopup(n){const s=this.joinScopesFunc(n),c=await this.buildUrl("/start",{scope:s,origin:window.location.origin}),f=await St({url:c,name:`${this.provider.title} Login`,origin:new URL(c).origin,width:450,height:730});return await this.sessionTransform(f)}async buildUrl(n,s){const c=await this.discoveryApi.getBaseUrl("auth"),f=this.buildQueryString({...s,env:this.environment});return`${c}/${this.provider.id}${n}${f}`}buildQueryString(n){if(!n)return"";const s=Object.entries(n).map(([c,f])=>{if(typeof f=="string")return`${encodeURIComponent(c)}=${encodeURIComponent(f)}`;if(f)return encodeURIComponent(c)}).filter(Boolean).join("&");return s?`?${s}`:""}constructor(n){const{discoveryApi:s,environment:c,provider:f,joinScopes:L=gt,oauthRequestApi:O,sessionTransform:V=ee=>ee}=n;this.authRequester=O.createAuthRequester({provider:f,onAuthRequest:ee=>this.showPopup(ee)}),this.discoveryApi=s,this.environment=c,this.provider=f,this.joinScopesFunc=L,this.sessionTransform=V}}function Nt(i,n){for(const s of n)if(!i.has(s))return!1;return!0}class Lt{sessionExistsAndHasScope(n,s){if(!n)return!1;if(!s||this.options.sessionScopes===void 0)return!0;const c=this.options.sessionScopes(n);return Nt(c,s)}getExtendedScope(n,s){const c=new Set(this.options.defaultScopes);if(n&&this.options.sessionScopes!==void 0){const f=this.options.sessionScopes(n);for(const L of f)c.add(L)}if(s)for(const f of s)c.add(f);return c}constructor(n){this.options=n}}var Fe=t(82394),ge=t.n(Fe);let Le=Symbol.observable;class Te{[Le](){return this}get closed(){return this.isClosed}next(n){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(s=>s.next(n))}error(n){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=n,this.subscribers.forEach(s=>s.error(n))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(n=>n.complete())}subscribe(n,s,c){const f=typeof n=="function"?{next:n,error:s,complete:c}:n;return this.observable.subscribe(f)}constructor(){this.isClosed=!1,this.observable=new(ge())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(this.subscribers.add(n),()=>{this.subscribers.delete(n)})),this.subscribers=new Set}}let De=Symbol.observable;class Je{[De](){return this}get closed(){return this.isClosed}next(n){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=n,this.subscribers.forEach(s=>s.next(n))}error(n){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=n,this.subscribers.forEach(s=>s.error(n))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(n=>n.complete())}subscribe(n,s,c){const f=typeof n=="function"?{next:n,error:s,complete:c}:n;return this.observable.subscribe(f)}constructor(n){this.subscribers=new Set,this.isClosed=!1,this.currentValue=n,this.terminatingError=void 0,this.observable=new(ge())(s=>this.isClosed?(this.terminatingError?s.error(this.terminatingError):s.complete(),()=>{}):(s.next(this.currentValue),this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}}class Wt{setIsSignedIn(n){this.signedIn!==n&&(this.signedIn=n,this.subject.next(this.signedIn?y.sM.SignedIn:y.sM.SignedOut))}sessionState$(){return this.subject}constructor(){this.subject=new Je(y.sM.SignedOut),this.signedIn=!1}}class vt{async getSession(n){if(this.helper.sessionExistsAndHasScope(this.currentSession,n.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const c=await this.collapsedSessionRefresh(),f=this.sessionScopesFunc(this.currentSession),L=this.sessionScopesFunc(c);return Nt(L,f)&&(this.currentSession=c),c}catch(c){if(n.optional)return;throw c}}if(!this.currentSession&&!n.instantPopup)try{const s=await this.collapsedSessionRefresh();return this.currentSession=s,this.getSession(n)}catch{}if(!n.optional)return this.currentSession=await this.connector.createSession({...n,scopes:this.helper.getExtendedScope(this.currentSession,n.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 n=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),n}finally{delete this.refreshPromise}}constructor(n){this.stateTracker=new Wt;const{connector:s,defaultScopes:c=new Set,sessionScopes:f,sessionShouldRefresh:L}=n;this.connector=s,this.sessionScopesFunc=f,this.sessionShouldRefreshFunc=L,this.helper=new Lt({sessionScopes:f,defaultScopes:c})}}class Tt{setSession(n){this.currentSession=n,this.stateTracker.setIsSignedIn(Boolean(n))}async getSession(n){if(this.helper.sessionExistsAndHasScope(this.currentSession,n.scopes))return this.currentSession;if(!n.optional)return this.currentSession=await this.connector.createSession({...n,scopes:this.helper.getExtendedScope(this.currentSession,n.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}constructor(n){this.stateTracker=new SessionStateTracker;const{connector:s,defaultScopes:c=new Set,sessionScopes:f}=n;this.connector=s,this.helper=new SessionScopeHelper({sessionScopes:f,defaultScopes:c})}}const yt={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class Pt{static create(n){const{discoveryApi:s,environment:c="development",provider:f=yt,oauthRequestApi:L,defaultScopes:O=[],scopeTransform:V=we=>we}=n,ee=new Ct({discoveryApi:s,environment:c,provider:f,oauthRequestApi:L,sessionTransform(we){return{...we,providerInfo:{idToken:we.providerInfo.idToken,accessToken:we.providerInfo.accessToken,scopes:Pt.normalizeScopes(V,we.providerInfo.scope),expiresAt:new Date(Date.now()+we.providerInfo.expiresInSeconds*1e3)}}}}),Ne=new vt({connector:ee,defaultScopes:new Set(O),sessionScopes:we=>we.providerInfo.scopes,sessionShouldRefresh:we=>(we.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new Pt({sessionManager:Ne,scopeTransform:V})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(n,s){const c=Pt.normalizeScopes(this.scopeTransform,n),f=await this.sessionManager.getSession({...s,scopes:c});var L;return(L=f==null?void 0:f.providerInfo.accessToken)!==null&&L!==void 0?L:""}async getIdToken(n={}){const s=await this.sessionManager.getSession(n);var c;return(c=s==null?void 0:s.providerInfo.idToken)!==null&&c!==void 0?c:""}async getBackstageIdentity(n={}){const s=await this.sessionManager.getSession(n);return s==null?void 0:s.backstageIdentity}async getProfile(n={}){const s=await this.sessionManager.getSession(n);return s==null?void 0:s.profile}static normalizeScopes(n,s){if(!s)return new Set;const c=Array.isArray(s)?s:s.split(/[\s|,]/).filter(Boolean);return new Set(n(c))}constructor(n){this.sessionManager=n.sessionManager,this.scopeTransform=n.scopeTransform}}const Yt={id:"github",title:"GitHub",icon:()=>null};class sn{static create(n){const{discoveryApi:s,environment:c="development",provider:f=Yt,oauthRequestApi:L,defaultScopes:O=["read:user"]}=n;return Pt.create({discoveryApi:s,oauthRequestApi:L,provider:f,environment:c,defaultScopes:O})}}const hn={id:"gitlab",title:"GitLab",icon:()=>null};class $t{static create(n){const{discoveryApi:s,environment:c="development",provider:f=hn,oauthRequestApi:L,defaultScopes:O=["read_user"]}=n;return Pt.create({discoveryApi:s,oauthRequestApi:L,provider:f,environment:c,defaultScopes:O})}}const xn={id:"google",title:"Google",icon:()=>null},bn="https://www.googleapis.com/auth/";class Rn{static create(n){const{discoveryApi:s,oauthRequestApi:c,environment:f="development",provider:L=xn,defaultScopes:O=["openid",`${bn}userinfo.email`,`${bn}userinfo.profile`]}=n;return Pt.create({discoveryApi:s,oauthRequestApi:c,provider:L,environment:f,defaultScopes:O,scopeTransform(V){return V.map(ee=>ee==="openid"?ee:ee==="profile"||ee==="email"?`${bn}userinfo.${ee}`:ee.startsWith(bn)?ee:`${bn}${ee}`)}})}}const pn={id:"okta",title:"Okta",icon:()=>null},Un=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Ln="okta.";class Xn{static create(n){const{discoveryApi:s,environment:c="development",provider:f=pn,oauthRequestApi:L,defaultScopes:O=["openid","email","profile","offline_access"]}=n;return Pt.create({discoveryApi:s,oauthRequestApi:L,provider:f,environment:c,defaultScopes:O,scopeTransform(V){return V.map(ee=>Un.has(ee)||ee.startsWith(Ln)?ee:`${Ln}${ee}`)}})}}var ct=t(30195);const Pn=ct.z.object({profile:ct.z.object({email:ct.z.string().optional(),displayName:ct.z.string().optional(),picture:ct.z.string().optional()}),backstageIdentity:ct.z.object({token:ct.z.string(),identity:ct.z.object({type:ct.z.literal("user"),userEntityRef:ct.z.string(),ownershipEntityRefs:ct.z.array(ct.z.string())})})}),Cn={id:"saml",title:"SAML",icon:()=>null};class ln{static create(n){const{discoveryApi:s,environment:c="development",provider:f=Cn}=n,L=new DirectAuthConnector({discoveryApi:s,environment:c,provider:f}),O=new StaticAuthSessionManager({connector:L}),V=new AuthSessionStore({manager:O,storageKey:`${f.id}Session`,schema:samlSessionSchema});return new ln(V)}sessionState$(){return this.sessionManager.sessionState$()}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(n={}){const s=await this.sessionManager.getSession(n);return s==null?void 0:s.backstageIdentity}async getProfile(n={}){const s=await this.sessionManager.getSession(n);return s==null?void 0:s.profile}constructor(n){this.sessionManager=n}}const kn={id:"microsoft",title:"Microsoft",icon:()=>null};class Mn{static create(n){const{environment:s="development",provider:c=kn,oauthRequestApi:f,discoveryApi:L,defaultScopes:O=["openid","offline_access","profile","email","User.Read"]}=n;return Pt.create({discoveryApi:L,oauthRequestApi:f,provider:c,environment:s,defaultScopes:O})}}const wn={id:"onelogin",title:"onelogin",icon:()=>null},Gn=new Set(["openid","profile","email","phone","address","groups","offline_access"]),ve="onelogin.";class re{static create(n){const{discoveryApi:s,environment:c="development",provider:f=wn,oauthRequestApi:L}=n;return Pt.create({discoveryApi:s,oauthRequestApi:L,provider:f,environment:c,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(O){return O.map(V=>Gn.has(V)||V.startsWith(ve)?V:`${ve}${V}`)}})}}const Pe={id:"bitbucket",title:"Bitbucket",icon:()=>null};class Ie{static create(n){const{discoveryApi:s,environment:c="development",provider:f=Pe,oauthRequestApi:L,defaultScopes:O=["team"]}=n;return Pt.create({discoveryApi:s,oauthRequestApi:L,provider:f,environment:c,defaultScopes:O})}}const He={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class ht{static create(n){const{discoveryApi:s,environment:c="development",provider:f=He,oauthRequestApi:L,defaultScopes:O=["PROJECT_ADMIN"]}=n;return Pt.create({discoveryApi:s,oauthRequestApi:L,provider:f,environment:c,defaultScopes:O})}}const Gt={id:"atlassian",title:"Atlassian",icon:()=>null};class kt{static create(n){const{discoveryApi:s,environment:c="development",provider:f=Gt,oauthRequestApi:L}=n;return Pt.create({discoveryApi:s,oauthRequestApi:L,provider:f,environment:c})}}class le{post(n){this.subject.next(n)}alert$(){return this.subject}constructor(){this.subject=new Te}}class W{captureEvent(n){}}const he="theme";class Ve{static createWithStorage(n){const s=new Ve(n);if(!window.localStorage)return s;var c;const f=(c=window.localStorage.getItem(he))!==null&&c!==void 0?c:void 0;return s.setActiveThemeId(f),s.activeThemeId$().subscribe(L=>{L?window.localStorage.setItem(he,L):window.localStorage.removeItem(he)}),window.addEventListener("storage",L=>{if(L.key===he){var O;const V=(O=localStorage.getItem(he))!==null&&O!==void 0?O:void 0;s.setActiveThemeId(V)}}),s}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(n){this.activeThemeId=n,this.subject.next(n)}constructor(n){this.themes=n,this.subject=new Je(void 0)}}var ut=t(9850),ze=t.n(ut),It=t(12782),Jt=t.n(It);const rn=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function on(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function q(i){if(i===null)return"null";if(Array.isArray(i))return"array";const n=typeof i;return n==="number"&&isNaN(i)?"nan":n==="string"&&i===""?"empty-string":n}const G={type(i,n,s,c){return`Invalid type in config for key '${i}' in '${n}', got ${s}, wanted ${c}`},missing(i){return`Missing required config value at '${i}'`},convert(i,n,s){return`Unable to convert config value for key '${i}' in '${n}' to a ${s}`}};class m{static fromConfigs(n){return n.length===0?new m(void 0):n.reduce((s,{data:c,context:f,filteredKeys:L,deprecatedKeys:O})=>{const V=new m(c,f,s);if(V.filteredKeys=L,O)for(const{key:ee,description:Ne}of O)console.warn(`The configuration key '${ee}' of ${f} is deprecated and may be removed soon. ${Ne||""}`);return V},void 0)}has(n){var s;if(this.readValue(n)!==void 0)return!0;var f;return(f=(s=this.fallback)===null||s===void 0?void 0:s.has(n))!==null&&f!==void 0?f:!1}keys(){var n;const s=this.data?Object.keys(this.data):[];var c;const f=(c=(n=this.fallback)===null||n===void 0?void 0:n.keys())!==null&&c!==void 0?c:[];return[...new Set([...s,...f])]}get(n){const s=this.getOptional(n);if(s===void 0)throw new Error(G.missing(this.fullKey(n!=null?n:"")));return s}getOptional(n){var s;const c=ze()(this.readValue(n)),f=(s=this.fallback)===null||s===void 0?void 0:s.getOptional(n);if(c===void 0){if(!1)var L;return f}else if(f===void 0)return c;return Jt()({},{value:f},{value:c},(O,V)=>!on(V)||!on(O)?V:void 0).value}getConfig(n){const s=this.getOptionalConfig(n);if(s===void 0)throw new Error(G.missing(this.fullKey(n)));return s}getOptionalConfig(n){var s;const c=this.readValue(n),f=(s=this.fallback)===null||s===void 0?void 0:s.getOptionalConfig(n);if(on(c))return this.copy(c,n,f);if(c!==void 0)throw new TypeError(G.type(this.fullKey(n),this.context,q(c),"object"));return f}getConfigArray(n){const s=this.getOptionalConfigArray(n);if(s===void 0)throw new Error(G.missing(this.fullKey(n)));return s}getOptionalConfigArray(n){const s=this.readConfigValue(n,f=>{if(!Array.isArray(f))return{expected:"object-array"};for(const[L,O]of f.entries())if(!on(O))return{expected:"object-array",value:O,key:`${n}[${L}]`};return!0});if(!s){if(!1)var c;return}return s.map((f,L)=>this.copy(f,`${n}[${L}]`))}getNumber(n){const s=this.getOptionalNumber(n);if(s===void 0)throw new Error(G.missing(this.fullKey(n)));return s}getOptionalNumber(n){const s=this.readConfigValue(n,f=>typeof f=="number"||typeof f=="string"||{expected:"number"});if(typeof s=="number"||s===void 0)return s;const c=Number(s);if(!Number.isFinite(c))throw new Error(G.convert(this.fullKey(n),this.context,"number"));return c}getBoolean(n){const s=this.getOptionalBoolean(n);if(s===void 0)throw new Error(G.missing(this.fullKey(n)));return s}getOptionalBoolean(n){const s=this.readConfigValue(n,f=>typeof f=="boolean"||typeof f=="number"||typeof f=="string"||{expected:"boolean"});if(typeof s=="boolean"||s===void 0)return s;const c=String(s).trim();if(/^(?:y|yes|true|1|on)$/i.test(c))return!0;if(/^(?:n|no|false|0|off)$/i.test(c))return!1;throw new Error(G.convert(this.fullKey(n),this.context,"boolean"))}getString(n){const s=this.getOptionalString(n);if(s===void 0)throw new Error(G.missing(this.fullKey(n)));return s}getOptionalString(n){return this.readConfigValue(n,s=>typeof s=="string"&&s!==""||{expected:"string"})}getStringArray(n){const s=this.getOptionalStringArray(n);if(s===void 0)throw new Error(G.missing(this.fullKey(n)));return s}getOptionalStringArray(n){return this.readConfigValue(n,s=>{if(!Array.isArray(s))return{expected:"string-array"};for(const[c,f]of s.entries())if(typeof f!="string"||f==="")return{expected:"string-array",value:f,key:`${n}[${c}]`};return!0})}fullKey(n){return`${this.prefix}${this.prefix?".":""}${n}`}copy(n,s,c){const f=new m(n,this.context,c,this.fullKey(s));return f.filteredKeys=this.filteredKeys,f}readConfigValue(n,s){const c=this.readValue(n);if(c===void 0){var f;if(!1)var L;return(f=this.fallback)===null||f===void 0?void 0:f.readConfigValue(n,s)}const O=s(c);if(O!==!0){const{key:V=n,value:ee=c,expected:Ne}=O;throw new TypeError(G.type(this.fullKey(V),this.context,q(ee),Ne))}return c}readValue(n){const s=n?n.split("."):[];for(const f of s)if(!rn.test(f))throw new TypeError(`Invalid config key '${n}'`);if(this.data===void 0)return;let c=this.data;for(const[f,L]of s.entries())if(on(c))c=c[L];else if(c!==void 0){const O=this.fullKey(s.slice(0,f).join("."));throw new TypeError(G.type(O,this.context,q(c),"object"))}return c}constructor(n,s="mock-config",c,f=""){this.data=n,this.context=s,this.fallback=c,this.prefix=f,this.notifiedFilteredKeys=new Set}}const C="Invalid discovery URL pattern,";class Z{static compile(n){const s=n.split(/\{\{\s*pluginId\s*\}\}/),c=s.join("pluginId");let f;try{f=new URL(c)}catch{throw new Error(`${C} URL '${c}' is invalid`)}if(f.hash)throw new Error(`${C} URL must not have a hash`);if(f.search)throw new Error(`${C} URL must not have a query`);if(c.endsWith("/"))throw new Error(`${C} URL must not end with a slash`);return new Z(s)}async getBaseUrl(n){return this.parts.join(n)}constructor(n){this.parts=n}}class K{post(n,s){return s!=null&&s.hidden||this.alertApi.post({message:n.message,severity:"error"}),this.errorApi.post(n,s)}error$(){return this.errorApi.error$()}constructor(n,s){this.alertApi=n,this.errorApi=s}}class ce{post(n,s){this.subject.next({error:n,context:s})}error$(){return this.subject}constructor(){this.subject=new Te}}class de{static forward(n,s){window.addEventListener("unhandledrejection",c=>{n.post(c.reason,s)})}}function Re(i){if(i.length<3)throw new Error(`The '${i}' feature flag must have a minimum length of three characters.`);if(i.length>150)throw new Error(`The '${i}' feature flag must not exceed 150 characters.`);if(!i.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${i}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class st{registerFlag(n){Re(n.name),this.registeredFeatureFlags.push(n)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(n){return this.flags||(this.flags=this.load()),this.flags.get(n)===y.CL.Active}save(n){this.flags||(this.flags=this.load()),n.merge||this.flags.clear();for(const[c,f]of Object.entries(n.states))this.flags.set(c,f);const s=Array.from(this.flags.entries()).filter(([,c])=>c===y.CL.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(s)))}load(){try{const n=window.localStorage.getItem("featureFlags");if(!n)return new Map;const s=JSON.parse(n);if(typeof s!="object"||s===null||Array.isArray(s))return new Map;const c=Object.entries(s).filter(([f,L])=>(Re(f),L===y.CL.Active));return new Map(c)}catch{return new Map}}constructor(){this.registeredFeatureFlags=[]}}function Ge(i){let n=i.baseImplementation||t.g.fetch;var s;const c=[(s=i.middleware)!==null&&s!==void 0?s:[]].flat().reverse();for(const f of c)n=f.apply(n);return{fetch:n}}class mt{static create(n){var s,c;const f=Et(n),L=((s=n.header)===null||s===void 0?void 0:s.name)||"authorization",O=((c=n.header)===null||c===void 0?void 0:c.value)||(V=>`Bearer ${V}`);return new mt(n.identityApi,f,L,O)}apply(n){return async(s,c)=>{const f=new Request(s,c),{token:L}=await this.identityApi.getCredentials();return f.headers.get(this.headerName)||typeof L!="string"||!L||!this.allowUrl(f.url)?n(s,c):(f.headers.set(this.headerName,this.headerValue(L)),n(f))}}constructor(n,s,c,f){this.identityApi=n,this.allowUrl=s,this.headerName=c,this.headerValue=f}}function Et(i){return i.allowUrl?i.allowUrl:i.urlPrefixAllowlist?et(i.urlPrefixAllowlist):i.config?et([i.config.getString("backend.baseUrl")]):()=>!1}function et(i){const n=i.map(s=>s.replace(/\/$/,""));return s=>n.some(c=>s===c||s.startsWith(`${c}/`))}function Ze(i,n){return!n||n==="/"?i:`${i.replace(/\/$/,"")}/${n.replace(/^\//,"")}`}class pt{apply(n){return async(s,c)=>{const f=new Request(s,c),L="plugin://";if(!f.url.startsWith(L))return n(s,c);const{hostname:O,pathname:V,search:ee,hash:Ne,username:we,password:qe}=new URL(`http://${f.url.substring(L.length)}`);let lt=await this.discoveryApi.getBaseUrl(O);if(we||qe){const jt=new URL(lt),Ut=`${we}${qe?`:${qe}`:""}@`;lt=`${jt.protocol}//${Ut}${jt.host}${jt.pathname}`}const wt=`${Ze(lt,V)}${ee}${Ne}`;return n(wt,typeof s=="string"||At(s)?c:s)}}constructor(n){this.discoveryApi=n}}function At(i){return typeof i=="object"&&(i==null?void 0:i.constructor)===URL}class Vt{static resolvePluginProtocol(n){return new pt(n.discoveryApi)}static injectIdentityAuth(n){return mt.create(n)}constructor(){}}function Dt(i,n){for(const s of n)if(!i.has(s))return!1;return!0}function Mt(i,...n){const s=new Set(i);for(const c of n)for(const f of c)s.add(f);return s}class Ht{request(n){return new Promise((s,c)=>{this.requests.push({scopes:n,resolve:s,reject:c}),this.subject.next(this.getCurrentPending())})}resolve(n,s){this.requests=this.requests.filter(c=>Dt(n,c.scopes)?(c.resolve(s),!1):!0),this.subject.next(this.getCurrentPending())}reject(n){this.requests.forEach(s=>s.reject(n)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const n=this.requests.length===0?void 0:this.requests.slice(1).reduce((s,c)=>Mt(s,c.scopes),this.requests[0].scopes);return{scopes:n,resolve:s=>{n&&this.resolve(n,s)},reject:s=>{n&&this.reject(s)}}}constructor(){this.requests=[],this.subject=new Je(this.getCurrentPending())}}class Rt{createAuthRequester(n){const s=new Ht,c=this.handlerCount;return this.handlerCount++,s.pending().subscribe({next:f=>{const L=this.currentRequests.slice(),O=this.makeAuthRequest(f,n);O?L[c]=O:delete L[c],this.currentRequests=L,this.subject.next(L.filter(Boolean))}}),f=>s.request(f)}makeAuthRequest(n,s){const{scopes:c}=n;if(c)return{provider:s.provider,trigger:async()=>{const f=await s.onAuthRequest(c);n.resolve(f)},reject:()=>{const f=new Error("Login failed, rejected by user");f.name="RejectedError",n.reject(f)}}}authRequest$(){return this.subject}constructor(){this.subject=new Je([]),this.currentRequests=[],this.handlerCount=0}}const tt=new Map;class Xe{static create(n){var s;return new Xe((s=n.namespace)!==null&&s!==void 0?s:"",n.errorApi)}static addStorageEventListener(){window.addEventListener("storage",n=>{for(const[c,f]of tt.entries()){var s;!((s=n.key)===null||s===void 0)&&s.startsWith(c)&&f.handleStorageChange(n.key)}})}get(n){return this.snapshot(n).value}snapshot(n){let s,c="absent";try{const f=localStorage.getItem(this.getKeyName(n));f&&(s=JSON.parse(f,(L,O)=>(typeof O=="object"&&O!==null&&Object.freeze(O),O)),c="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${n}`))}return{key:n,value:s,presence:c}}forBucket(n){const s=`${this.namespace}/${n}`;return tt.has(s)||tt.set(s,new Xe(s,this.errorApi)),tt.get(s)}async set(n,s){localStorage.setItem(this.getKeyName(n),JSON.stringify(s)),this.notifyChanges(n)}async remove(n){localStorage.removeItem(this.getKeyName(n)),this.notifyChanges(n)}observe$(n){return Xe.hasSubscribed||(Xe.addStorageEventListener(),Xe.hasSubscribed=!0),this.observable.filter(({key:s})=>s===n)}handleStorageChange(n){if(!(n!=null&&n.startsWith(this.namespace)))return;const s=n==null?void 0:n.slice(`${this.namespace}/`.length);s.includes("/")||this.notifyChanges(decodeURIComponent(s))}getKeyName(n){return`${this.namespace}/${encodeURIComponent(n)}`}notifyChanges(n){const s=this.snapshot(n);for(const c of this.subscribers)c.next(s)}constructor(n,s){this.namespace=n,this.errorApi=s,this.subscribers=new Set,this.observable=new(ge())(c=>(this.subscribers.add(c),()=>{this.subscribers.delete(c)}))}}Xe.hasSubscribed=!1;const Kt=(0,M.createContext)(void 0);function fn(){const[i]=(0,g.is)((0,r.jsx)(g.AW,{index:!0,element:(0,r.jsx)("div",{})}));return!i.index}var an=t(16060);const zn=(i,n)=>{try{var s,c;const f=(0,an.fp)(n,{pathname:i}),L=(s=f==null?void 0:f.filter(V=>{var ee;return((ee=V==null?void 0:V.route.routeRefs)===null||ee===void 0?void 0:ee.size)>0}).pop())===null||s===void 0?void 0:s.route;if(!L)return{};let O;return L.routeRefs.size===1&&(O=L.routeRefs.values().next().value),{extension:"App",pluginId:((c=L.plugin)===null||c===void 0?void 0:c.getId())||"root",...O?{routeRef:O.id}:{}}}catch{return{}}},Qn=({pathname:i,search:n,hash:s})=>{const c=(0,y.z$)();return(0,M.useEffect)(()=>{c.captureEvent("navigate",`${i}${n}${s}`)},[c,i,n,s]),null},gn=({routeObjects:i})=>{const{pathname:n,search:s,hash:c}=(0,g.TH)();return(0,r.jsx)(y.fC,{attributes:zn(n,i),children:(0,r.jsx)(Qn,{pathname:n,search:s,hash:c})})};function Kn(i){return fn()?pr(i):""}function pr(i){var n;let{pathname:s}=new URL((n=i.getOptionalString("app.baseUrl"))!==null&&n!==void 0?n:"/","http://sample.dev");return s=s.replace(/\/*$/,""),s}function w({component:i,appIdentityProxy:n,children:s}){const[c,f]=(0,M.useState)(),L=(0,y.h_)(y.Ds),O=Kn(L);return c?(n.setTarget(c,{signOutTargetUrl:O||"/"}),(0,r.jsx)(r.Fragment,{children:s})):(0,r.jsx)(i,{onSignInSuccess:f})}function d(i){const{Router:n,SignInPage:s}=(0,y.qD)().getComponents(),c=(0,y.h_)(y.Ds),f=pr(c),L=`${f}/*`,O=(0,M.useContext)(Kt);if(!O)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:V,appIdentityProxy:ee}=O;return s?fn()?(0,r.jsxs)(n,{children:[(0,r.jsx)(gn,{routeObjects:V}),(0,r.jsx)(w,{component:s,appIdentityProxy:ee,children:(0,r.jsx)(g.Z5,{children:(0,r.jsx)(g.AW,{path:L,element:(0,r.jsx)(r.Fragment,{children:i.children})})})})]}):(0,r.jsxs)(n,{basename:f,children:[(0,r.jsx)(gn,{routeObjects:V}),(0,r.jsx)(w,{component:s,appIdentityProxy:ee,children:i.children})]}):(ee.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}},{signOutTargetUrl:f||"/"}),fn()?(0,r.jsxs)(n,{children:[(0,r.jsx)(gn,{routeObjects:V}),(0,r.jsx)(g.Z5,{children:(0,r.jsx)(g.AW,{path:L,element:(0,r.jsx)(r.Fragment,{children:i.children})})})]}):(0,r.jsxs)(n,{basename:f,children:[(0,r.jsx)(gn,{routeObjects:V}),i.children]}))}var x=t(90383),A=t(22504),X=t(69866),pe=t(64279);function xe(i){const n={};for(const c in i.collectors)i.collectors.hasOwnProperty(c)&&(n[c]=i.collectors[c]());const s=[{node:M.Children.toArray(i.root),parent:void 0,contexts:{}}];for(;s.length!==0;){const{node:c,parent:f,contexts:L}=s.shift();M.Children.forEach(c,O=>{if(!(0,M.isValidElement)(O))return;const V={};for(const ee in n)if(n.hasOwnProperty(ee)){const Ne=n[ee];V[ee]=Ne.visit(Ne.accumulator,O,f,L[ee])}for(const ee of i.discoverers){const Ne=ee(O);Ne&&s.push({node:Ne,parent:O,contexts:V})}})}return Object.fromEntries(Object.entries(n).map(([c,f])=>[c,f.accumulator]))}function be(i,n){return()=>({accumulator:i(),visit:n})}function ft(i){var n;return(n=i.props)===null||n===void 0?void 0:n.children}function Ft(i){var n,s;if(!((n=i.props)===null||n===void 0)&&n.path&&(!((s=i.props)===null||s===void 0)&&s.element)){var c;return(c=i.props)===null||c===void 0?void 0:c.element}}const cn=be(()=>new Set,(i,n)=>{const s=(0,y.IY)(n,"core.plugin");s&&i.add(s)}),Wn=i=>{const{children:n}=i,s=(0,y.h_)(y.W0),c="with"in i?s.isActive(i.with):!s.isActive(i.without);return(0,r.jsx)(r.Fragment,{children:c?n:null})};(0,y.R5)(Wn,"core.featureFlagged",!0);const rr={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set};function Ir(i){const n=i;if(n!=null&&n.type){var s,c;return(c=(s=n.type.displayName)!==null&&s!==void 0?s:n.type.name)!==null&&c!==void 0?c:String(n.type)}return String(n)}function xo(i,n=new Array){return M.Children.forEach(i,s=>{if(!(0,M.isValidElement)(s))return;const c=(0,y.IY)(s,"core.mountPoint");if(c){const f=(0,y.IY)(s,"core.plugin");n.push({routeRef:c,plugin:f})}xo(s.props.children,n)}),n}const bo=be(()=>({paths:new Map,parents:new Map,objects:new Array}),(i,n,s,c)=>{var f,L;if(c!=null&&c.isElementAncestor)return c;if((s==null?void 0:s.props.element)===n)return{...c,isElementAncestor:!0};const O=(f=n.props)===null||f===void 0?void 0:f.path,V=(0,y.IY)(n,"core.mountPoint");if(V&&O)throw new Error(`Path property may not be set directly on a routable extension "${Ir(n)}"`);var ee;const Ne=(ee=c==null||(L=c.obj)===null||L===void 0?void 0:L.children)!==null&&ee!==void 0?ee:i.objects;if(O!==void 0){if(typeof O!="string")throw new Error(`Element path must be a string at "${Ir(n)}"`);const wt=O.startsWith("/")?O.slice(1):O,jt=n.props.element;if((0,y.IY)(n,"core.gatherMountPoints")){var we;if(jt)throw new Error(`Mount point gatherers may not have an element prop "${Ir(n)}"`);const Ut={path:wt,element:"gathered",routeRefs:new Set,caseSensitive:Boolean((we=n.props)===null||we===void 0?void 0:we.caseSensitive),children:[rr],plugin:void 0};return Ne.push(Ut),{obj:Ut,gatherPath:wt,routeRef:c==null?void 0:c.routeRef,gatherRouteRef:c==null?void 0:c.routeRef}}if(jt){var qe;const[Ut,...zt]=xo(jt);if(zt.length>0)throw new Error(`Route element with path "${O}" may not contain multiple routable extensions`);if(!Ut)return c;const{routeRef:Dn,plugin:tr}=Ut,nr={path:wt,element:"mounted",routeRefs:new Set([Dn]),caseSensitive:Boolean((qe=n.props)===null||qe===void 0?void 0:qe.caseSensitive),children:[rr],plugin:tr};return Ne.push(nr),i.paths.set(Dn,wt),i.parents.set(Dn,c==null?void 0:c.routeRef),{obj:nr,routeRef:Dn!=null?Dn:c==null?void 0:c.routeRef,gatherPath:wt,gatherRouteRef:c==null?void 0:c.gatherRouteRef}}}if(V){var lt;if((c==null?void 0:c.gatherPath)===void 0)throw new Error(`Routable extension "${Ir(n)}" with mount point "${V}" must be assigned a path`);return c==null||(lt=c.obj)===null||lt===void 0||lt.routeRefs.add(V),i.paths.set(V,c.gatherPath),i.parents.set(V,c==null?void 0:c.gatherRouteRef),{...c,routeRef:V}}return c}),So=be(()=>({paths:new Map,parents:new Map,objects:new Array}),(i,n,s,c)=>{var f,L,O;if((s==null?void 0:s.props.element)===n)return c;let V=c==null?void 0:c.obj,ee=c==null?void 0:c.routeRef,Ne=c==null?void 0:c.sticky;const we=(f=n.props)===null||f===void 0?void 0:f.path;var qe;const lt=(qe=V==null?void 0:V.children)!==null&&qe!==void 0?qe:i.objects,wt=Boolean((L=n.props)===null||L===void 0?void 0:L.caseSensitive);let jt=c==null?void 0:c.path;if((0,y.IY)(n,"core.gatherMountPoints")){if(!we)throw new Error("Mount point gatherer must have a path");jt=we}const Ut=(O=n.props)===null||O===void 0?void 0:O.element;let zt=(0,y.IY)(n,"core.mountPoint");if(!zt&&(0,M.isValidElement)(Ut)&&(zt=(0,y.IY)(Ut,"core.mountPoint")),zt){let nr=we;if(jt&&(nr?jt=void 0:nr=jt),!nr)throw new Error("Mounted routable extension must have a path");i.paths.set(zt,nr),ee&&Ne?(i.parents.set(zt,ee),we&&(ee=zt,Ne=!1)):(i.parents.set(zt,ee),ee=zt),we?(V={caseSensitive:wt,path:we,element:"mounted",routeRefs:new Set([zt]),children:[rr],plugin:(0,y.IY)(n.props.element,"core.plugin")},lt.push(V)):V==null||V.routeRefs.add(zt)}if((0,y.IY)(n,"core.gatherMountPoints")&&(Ne=!0),(0,y.IY)(n,"core.gatherMountPoints")){if(!we)throw new Error("Mount point gatherer must have a path");if(!zt){var tr;V={caseSensitive:wt,path:we,element:"gathered",routeRefs:new Set,children:[rr],plugin:c==null||(tr=c.obj)===null||tr===void 0?void 0:tr.plugin},lt.push(V)}}return{obj:V,path:jt,routeRef:ee,sticky:Ne}}),or=be(()=>new Set,(i,n)=>{if(n.type===Wn){const s=n.props;i.add("with"in s?s.with:s.without)}}),An=(0,Me.uW)("route-ref-type",()=>Symbol("route-ref-type"));function fr(i){return i[An]==="absolute"}function gr(i){return i[An]==="sub"}function eo(i){return i[An]==="external"}function mr(...i){const n=i.join("/").replace(/\/\/+/g,"/");return n!=="/"&&n.endsWith("/")?n.slice(0,-1):n}function Fr(i,n,s){let c,f="";if(fr(i))c=i;else if(gr(i))c=i.parent,f=i.path;else if(eo(i)){const V=s.get(i);if(!V)return[void 0,""];if(fr(V))c=V;else if(gr(V))c=V.parent,f=V.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${V}`)}else throw i[An]?new Error(`Unknown or invalid route ref type, ${i[An]}`):new Error(`Unknown object passed to useRouteRef, got ${i}`);if(!c)return[void 0,""];const L=n.get(c);if(L===void 0)return[void 0,""];const O=mr(L,f);return[c,O]}function Co(i,n,s,c,f){var L;const O=(L=(0,an.fp)(f,n))!==null&&L!==void 0?L:[],V=Array();let ee=-1;for(let qe=i;qe&&(ee=O.findIndex(lt=>lt.route.routeRefs.has(qe)),ee===-1);qe=c.get(qe))V.unshift(qe);V.length===0&&(ee-=1);const Ne=ee===-1?"":O[ee].pathname,we=V.slice(0,-1).map(qe=>{const lt=s.get(qe);if(lt===void 0)throw new Error(`No path for ${qe}`);if(lt.includes(":"))throw new Error(`Cannot route to ${i} with parent ${qe} as it has parameters`);return lt});return`${mr(Ne,...we)}/`}class wo{resolve(n,s){const[c,f]=Fr(n,this.routePaths,this.routeBindings);if(!c)return;let L;typeof s=="string"?L=this.trimPath(s):s.pathname?L={...s,pathname:this.trimPath(s.pathname)}:L=s;const O=this.appBasePath+Co(c,L,this.routePaths,this.routeParents,this.routeObjects);return(...[ee])=>mr(O,(0,an.Gn)(f,ee))}trimPath(n){return n&&(n.startsWith(this.appBasePath)?n.slice(this.appBasePath.length):n)}constructor(n,s,c,f,L){this.routePaths=n,this.routeParents=s,this.routeObjects=c,this.routeBindings=f,this.appBasePath=L}}const to=(0,Me.CT)("routing-context"),qn=({routePaths:i,routeParents:n,routeObjects:s,routeBindings:c,basePath:f="",children:L})=>{const O=new wo(i,n,s,c,f),V=(0,Me.EI)({1:O});return(0,r.jsx)(to.Provider,{value:V,children:L})};function Ur(i,n){const s=new Set(n.values());s.delete(void 0);for(const c of n.keys()){if(s.has(c))continue;let f=c,L="";for(;f;){const V=i.get(f);if(V===void 0)throw new Error(`No path for ${f}`);L=mr(V,L),f=n.get(f)}const O=L.match(/:(\w+)/g);if(O){for(let V=0;V<O.length;V++)for(let ee=V+1;ee<O.length;ee++)if(O[ee]===O[V])throw new Error(`Parameter ${O[ee]} is duplicated in path ${L}`)}}}function Rr(i,n){for(const s of n)if(s.externalRoutes){for(const[c,f]of Object.entries(s.externalRoutes))if(!f.optional&&!i.has(f))throw new Error(`External route '${c}' of the '${s.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const jo=(0,Me.CT)("app-context"),Mr=({appContext:i,children:n})=>{const s=(0,Me.EI)({1:i});return(0,r.jsx)(jo.Provider,{value:s,children:n})};function zr(i){return new Error(`Tried to access IdentityApi ${i} before app was loaded`)}function Wr(i){console.warn(`WARNING: Call to ${i} is deprecated and will break in the future`)}class no{setTarget(n,s){this.target=n,this.signOutTargetUrl=s.signOutTargetUrl,this.resolveTarget(n)}getUserId(){if(!this.target)throw zr("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Wr("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw zr("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Wr("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(n=>n.getProfileInfo())}async getBackstageIdentity(){const n=await this.waitForTarget.then(s=>s.getBackstageIdentity());return n.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${n.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),n}async getCredentials(){return this.waitForTarget.then(n=>n.getCredentials())}async getIdToken(){return this.waitForTarget.then(n=>{if(!n.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Wr("getIdToken"),n.getIdToken()})}async signOut(){await this.waitForTarget.then(n=>n.signOut()),window.location.href=this.signOutTargetUrl}constructor(){this.resolveTarget=()=>{},this.signOutTargetUrl="/",this.waitForTarget=new Promise(n=>{this.resolveTarget=n})}}var er=t(72164);function Eo(i,n,s){if(i!==void 0){const f=s.find(L=>L.id===i);if(f)return f}if(n){const f=s.find(L=>L.variant==="dark");if(f)return f}const c=s.find(f=>f.variant==="light");return c||s[0]}const Ao=()=>{const i=(0,M.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[n,s]=(0,M.useState)(i.matches);return(0,M.useEffect)(()=>{const c=f=>{s(f.matches)};return i.addListener(c),()=>{i.removeListener(c)}},[i]),n};function Vr({children:i}){const n=(0,y.h_)(y.hg),s=(0,er.Z)(n.activeThemeId$(),n.getActiveThemeId()),c=Boolean(window.matchMedia)?Ao():!1,f=Eo(s,c,n.getInstalledThemes());if(!f)throw new Error("App has no themes");return(0,r.jsx)(f.Provider,{children:i})}const ro=async(i="__APP_INJECTED_RUNTIME_CONFIG__")=>{const n=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!n)throw new Error("No static configuration provided");if(!Array.isArray(n))throw new Error("Static configuration has invalid format");const s=n.slice();if(i!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const f=JSON.parse(i);Array.isArray(f)?s.push(...f):s.push({data:f,context:"env"})}catch(f){throw new Error(`Failed to load runtime configuration, ${f}`)}const c=window.__APP_CONFIG__;return c&&s.push({context:"window",data:c}),s};class _o{add(n,s){return this.apis.push([n.id,s]),s}build(){return new xr(new Map(this.apis))}constructor(){this.apis=[]}}class xr{static builder(){return new _o}static from(n){return new xr(new Map(n.map(([s,c])=>[s.id,c])))}static with(n,s){return new xr(new Map([[n.id,s]]))}with(n,s){return new xr(new Map([...this.apis,[n.id,s]]))}get(n){return this.apis.get(n.id)}constructor(n){this.apis=n}}function To(i){const n=new Map;return i&&i({bind:(c,f)=>{for(const[L,O]of Object.entries(f)){const V=c[L];if(!V)throw new Error(`Key ${L} is not an existing external route`);if(!O&&!V.optional)throw new Error(`External route ${L} is required but was undefined`);O&&n.set(V,O)}}}),n}function Io(i){const n=new URL(i);return n.protocol=document.location.protocol,n.hostname=document.location.hostname,n.port=document.location.port,n.toString().replace(/\/$/,"")}function Ro(i,n,s){var c;const f=Boolean(i),L=(0,pe.default)(i||(()=>Promise.resolve([])));let O;if(f&&L.loading){const{Progress:Ne}=n;O=(0,r.jsx)(Ne,{})}else if(L.error){const{BootErrorPage:Ne}=n;O=(0,r.jsx)(Ne,{step:"load-config",error:L.error})}const{ThemeProvider:V=Vr}=n;if(O)return{node:(0,r.jsx)(rt,{apis:xr.with(y.hg,s),children:(0,r.jsx)(V,{children:O})})};let ee;if(!((c=L.value)===null||c===void 0)&&c.length){const Ne=m.fromConfigs(L.value),we=Ne.getOptionalString("app.baseUrl"),qe=Ne.getOptionalString("backend.baseUrl");let lt=L.value;const wt={data:{},context:"relative-resolver"};if(we&&qe){const jt=new URL(we).origin,Ut=new URL(qe).origin;if(jt===Ut){const zt=Io(qe);qe!==zt&&(wt.data.backend={baseUrl:zt})}}if(we){const jt=Io(we);we!==jt&&(wt.data.app={baseUrl:jt})}Object.keys(wt.data).length&&(lt=lt.concat([wt])),ee=m.fromConfigs(lt)}else ee=m.fromConfigs([]);return{api:ee}}class Lo{getPlugins(){return this.app.getPlugins()}getSystemIcon(n){return this.app.getSystemIcon(n)}getSystemIcons(){return this.app.getSystemIcons()}getComponents(){return this.app.getComponents()}constructor(n){this.app=n}}var Lr=new WeakMap;class br{getPlugins(){return Array.from(this.plugins)}getSystemIcon(n){return this.icons[n]}getSystemIcons(){return this.icons}getComponents(){return this.components}createRoot(n){const s=this.getProvider();return()=>(0,r.jsx)(s,{children:n})}getProvider(){if((0,x.Z)(this,Lr))throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");(0,X.Z)(this,Lr,!0);const n=new Lo(this);let s=!1;return({children:f})=>{const L=(0,M.useRef)(!0),O=(0,M.useMemo)(()=>Ve.createWithStorage(this.themes),[]),{routing:V,featureFlags:ee,routeBindings:Ne}=(0,M.useMemo)(()=>{const wt=xe({root:f,discoverers:[ft,Ft],collectors:{routing:fn()?So:bo,collectedPlugins:cn,featureFlags:or}});return wt.collectedPlugins.forEach(jt=>this.plugins.add(jt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...wt,routeBindings:To(this.bindRoutes)}},[f]);s||(s=!0,Ur(V.paths,V.parents),Rr(Ne,this.plugins));const we=Ro(this.configLoader,this.components,O),qe="api"in we;if(qe){const{api:wt}=we;this.configApi=wt}if("node"in we)return we.node;if(qe&&L.current){L.current=!1;const wt=this.getApiHolder().get(y.W0);if(wt){for(const zt of this.featureFlags)wt.registerFlag({...zt,pluginId:""});for(const zt of this.plugins.values())if("getFeatureFlags"in zt)for(const Dn of zt.getFeatureFlags())wt.registerFlag({name:Dn.name,pluginId:zt.getId()});else for(const Dn of zt.output())Dn.type==="feature-flag"&&wt.registerFlag({name:Dn.name,pluginId:zt.getId()});const jt=wt.getRegisteredFlags(),Ut=new Set(jt.map(zt=>zt.name));for(const zt of ee)Ut.has(zt)||wt.registerFlag({name:zt,pluginId:""})}}const{ThemeProvider:lt=Vr}=this.components;return(0,r.jsx)(rt,{apis:this.getApiHolder(),children:(0,r.jsx)(Mr,{appContext:n,children:(0,r.jsx)(lt,{children:(0,r.jsx)(qn,{routePaths:V.paths,routeParents:V.parents,routeObjects:V.objects,routeBindings:Ne,basePath:Kn(we.api),children:(0,r.jsx)(Kt.Provider,{value:{routeObjects:V.objects,appIdentityProxy:this.appIdentityProxy},children:f})})})})})}}getRouter(){return d}getApiHolder(){if(this.apiHolder){for(const n of this.plugins)for(const s of n.getApis())this.apiFactoryRegistry.get(s.api)||this.apiFactoryRegistry.register("default",s);return ot.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:y.hg,deps:{},factory:()=>Ve.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:y.Ds,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:y.$4,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:y.W0,deps:{},factory:()=>new st});for(const n of this.defaultApis)this.apiFactoryRegistry.register("default",n);for(const n of this.plugins)for(const s of n.getApis())if(!this.apiFactoryRegistry.register("default",s))throw new Error(`Plugin ${n.getId()} tried to register duplicate or forbidden API factory for ${s.api}`);for(const n of this.apis)if(!this.apiFactoryRegistry.register("app",n))throw new Error(`Duplicate or forbidden API factory for ${n.api} in app`);return ot.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new ot(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(n){const s=new Set;for(const c of n){const f=c.getId();if(s.has(f))throw new Error(`Duplicate plugin found '${f}'`);s.add(f)}}constructor(n){this.appIdentityProxy=new no,(0,A.Z)(this,Lr,{writable:!0,value:!1});var s;this.apis=(s=n.apis)!==null&&s!==void 0?s:[],this.icons=n.icons;var c;this.plugins=new Set((c=n.plugins)!==null&&c!==void 0?c:[]);var f;this.featureFlags=(f=n.featureFlags)!==null&&f!==void 0?f:[],this.components=n.components,this.themes=n.themes;var L;this.configLoader=(L=n.configLoader)!==null&&L!==void 0?L:ro;var O;this.defaultApis=(O=n.defaultApis)!==null&&O!==void 0?O:[],this.bindRoutes=n.bindRoutes,this.apiFactoryRegistry=new $e}}function Sr(i){return new br(i)}let oo=!1;const Po=i=>{const n=(0,y.qD)(),{NotFoundErrorPage:s}=n.getComponents(),c=(0,M.useMemo)(()=>fn(),[]),L=[...(0,y.vJ)(i.children,O=>O.getElements().flatMap(V=>{let ee=V.props.path;if(ee==="")return[];var Ne;ee=(Ne=ee==null?void 0:ee.replace(/\/\*$/,""))!==null&&Ne!==void 0?Ne:"/";let we=c?V:V.props.element;return!c&&!we&&(we=V,oo||(console.warn("DEPRECATION WARNING: All elements within <FlatRoutes> must be of type <Route> with an element prop. Existing usages of <Navigate key=[path] to=[to] /> should be replaced with <Route path=[path] element={<Navigate to=[to] />} />."),oo=!0)),[{path:ee,element:we,children:V.props.children?[{path:ee==="/"?"/":"*",element:V.props.children}]:void 0}]}).sort((V,ee)=>ee.path.localeCompare(V.path)).map(V=>({...V,path:V.path==="/"?"/":`${V.path}/*`}))),{path:"*",element:(0,r.jsx)(s,{})}];return(0,g.V$)(L)},so=(0,y.T0)({id:"plugin.permission.api"});var On;(function(i){i.DENY="DENY",i.ALLOW="ALLOW",i.CONDITIONAL="CONDITIONAL"})(On||(On={}));function es(i,n){return i.name===n.name}function io(i,n){return"resourceType"in i?!n||i.resourceType===n:!1}function Bn(i){return i.attributes.action==="create"}function ts(i){return i.attributes.action==="read"}function ns(i){return i.attributes.action==="update"}function rs(i){return i.attributes.action==="delete"}function os(i){return{authorize:async(n,s)=>await i.authorize(n,s),authorizeConditional(n,s){const c=n;return i.authorize(c,s)}}}function sr({name:i,attributes:n,resourceType:s}){return s?{type:"resource",name:i,attributes:n,resourceType:s}:{type:"basic",name:i,attributes:n}}var ko=t(23054),Oo=t(96279),ao=t.n(Oo),Pr=t(9571);const Hr=ct.z.lazy(()=>ct.z.object({rule:ct.z.string(),resourceType:ct.z.string(),params:ct.z.record(ct.z.any()).optional()}).or(ct.z.object({anyOf:ct.z.array(Hr).nonempty()})).or(ct.z.object({allOf:ct.z.array(Hr).nonempty()})).or(ct.z.object({not:Hr}))),ss=ct.z.object({result:ct.z.literal(On.ALLOW).or(ct.z.literal(On.DENY))}),b=ct.z.union([ct.z.object({result:ct.z.literal(On.ALLOW).or(ct.z.literal(On.DENY))}),ct.z.object({result:ct.z.literal(On.CONDITIONAL),pluginId:ct.z.string(),resourceType:ct.z.string(),conditions:Hr})]),S=(i,n)=>ct.z.object({items:ct.z.array(ct.z.intersection(ct.z.object({id:ct.z.string()}),i)).refine(s=>s.length===n.size&&s.every(({id:c})=>n.has(c)),{message:"Items in response do not match request"})});class B{async authorize(n,s){return this.makeRequest(n,ss,s)}async authorizeConditional(n,s){return this.makeRequest(n,b,s)}async makeRequest(n,s,c){if(!this.enabled)return n.map(we=>({result:On.ALLOW}));const f={items:n.map(we=>({id:Pr.Z(),...we}))},L=await this.discovery.getBaseUrl("permission"),O=await ao()(`${L}/authorize`,{method:"POST",body:JSON.stringify(f),headers:{...this.getAuthorizationHeader(c==null?void 0:c.token),"content-type":"application/json"}});if(!O.ok)throw await ko.VL.fromResponse(O);const V=await O.json(),Ne=S(s,new Set(f.items.map(({id:we})=>we))).parse(V).items.reduce((we,qe)=>(we[qe.id]=qe,we),{});return f.items.map(we=>Ne[we.id])}getAuthorizationHeader(n){return n?{Authorization:`Bearer ${n}`}:{}}constructor(n){this.discovery=n.discovery;var s;this.enabled=(s=n.config.getOptionalBoolean("permission.enabled"))!==null&&s!==void 0?s:!1}}class F{static create(n){const{config:s,discovery:c,identity:f}=n,L=new B({discovery:c,config:s});return new F(L,f)}async authorize(n){return(await this.permissionClient.authorize([n],await this.identityApi.getCredentials()))[0]}constructor(n,s){this.permissionClient=n,this.identityApi=s}}var _=t(69984);function ie(i){const n=(0,y.h_)(so),{data:s,error:c}=(0,_.ZP)(i,async f=>{if(io(f.permission)&&!f.resourceRef)return On.DENY;const{result:L}=await n.authorize(f);return L});return c?{error:c,loading:!1,allowed:!1}:s===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:s===On.ALLOW}}const te=i=>{const{permission:n,resourceRef:s,errorComponent:c,...f}=i,L=usePermission(isResourcePermission(n)?{permission:n,resourceRef:s}:{permission:n}),O=useApp(),{NotFoundErrorPage:V}=O.getComponents();let ee=c===void 0?_jsx(V,{}):c;return L.loading?ee=null:L.allowed&&(ee=i.element),_jsx(Route,{...f,element:ee})};function fe(i){const{permission:n,resourceRef:s}=i,c=usePermission(isResourcePermission(n)?{permission:n,resourceRef:s}:{permission:n}),f=useApp();if(c.loading)return null;if(c.allowed)return _jsx(_Fragment,{children:i.children});if(i.errorPage)return _jsx(_Fragment,{children:i.errorPage});const{NotFoundErrorPage:L}=f.getComponents();return _jsx(L,{})}const Ce=[(0,y.ni)({api:y.NW,deps:{configApi:y.Ds},factory:({configApi:i})=>Z.compile(`${i.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,y.ni)({api:y.$v,deps:{},factory:()=>new le}),(0,y.ni)({api:y.v_,deps:{},factory:()=>new W}),(0,y.ni)({api:y.VE,deps:{alertApi:y.$v},factory:({alertApi:i})=>{const n=new K(i,new ce);return de.forward(n,{hidden:!1}),n}}),(0,y.ni)({api:y.E6,deps:{errorApi:y.VE},factory:({errorApi:i})=>Xe.create({errorApi:i})}),(0,y.ni)({api:y.gP,deps:{configApi:y.Ds,identityApi:y.$4,discoveryApi:y.NW},factory:({configApi:i,identityApi:n,discoveryApi:s})=>Ge({middleware:[Vt.resolvePluginProtocol({discoveryApi:s}),Vt.injectIdentityAuth({identityApi:n,config:i})]})}),(0,y.ni)({api:y.ZM,deps:{},factory:()=>new Rt}),(0,y.ni)({api:y.Kp,deps:{discoveryApi:y.NW,oauthRequestApi:y.ZM,configApi:y.Ds},factory:({discoveryApi:i,oauthRequestApi:n,configApi:s})=>Rn.create({discoveryApi:i,oauthRequestApi:n,environment:s.getOptionalString("auth.environment")})}),(0,y.ni)({api:y.p_,deps:{discoveryApi:y.NW,oauthRequestApi:y.ZM,configApi:y.Ds},factory:({discoveryApi:i,oauthRequestApi:n,configApi:s})=>Mn.create({discoveryApi:i,oauthRequestApi:n,environment:s.getOptionalString("auth.environment")})}),(0,y.ni)({api:y.F4,deps:{discoveryApi:y.NW,oauthRequestApi:y.ZM,configApi:y.Ds},factory:({discoveryApi:i,oauthRequestApi:n,configApi:s})=>sn.create({discoveryApi:i,oauthRequestApi:n,defaultScopes:["read:user"],environment:s.getOptionalString("auth.environment")})}),(0,y.ni)({api:y.D,deps:{discoveryApi:y.NW,oauthRequestApi:y.ZM,configApi:y.Ds},factory:({discoveryApi:i,oauthRequestApi:n,configApi:s})=>Xn.create({discoveryApi:i,oauthRequestApi:n,environment:s.getOptionalString("auth.environment")})}),(0,y.ni)({api:y.ux,deps:{discoveryApi:y.NW,oauthRequestApi:y.ZM,configApi:y.Ds},factory:({discoveryApi:i,oauthRequestApi:n,configApi:s})=>$t.create({discoveryApi:i,oauthRequestApi:n,environment:s.getOptionalString("auth.environment")})}),(0,y.ni)({api:y.gW,deps:{discoveryApi:y.NW,oauthRequestApi:y.ZM,configApi:y.Ds},factory:({discoveryApi:i,oauthRequestApi:n,configApi:s})=>re.create({discoveryApi:i,oauthRequestApi:n,environment:s.getOptionalString("auth.environment")})}),(0,y.ni)({api:y.bq,deps:{discoveryApi:y.NW,oauthRequestApi:y.ZM,configApi:y.Ds},factory:({discoveryApi:i,oauthRequestApi:n,configApi:s})=>Ie.create({discoveryApi:i,oauthRequestApi:n,defaultScopes:["team"],environment:s.getOptionalString("auth.environment")})}),(0,y.ni)({api:y.Km,deps:{discoveryApi:y.NW,oauthRequestApi:y.ZM},factory:({discoveryApi:i,oauthRequestApi:n})=>ht.create({discoveryApi:i,oauthRequestApi:n,defaultScopes:["REPO_READ"]})}),(0,y.ni)({api:y.uB,deps:{discoveryApi:y.NW,oauthRequestApi:y.ZM,configApi:y.Ds},factory:({discoveryApi:i,oauthRequestApi:n,configApi:s})=>kt.create({discoveryApi:i,oauthRequestApi:n,environment:s.getOptionalString("auth.environment")})}),(0,y.ni)({api:so,deps:{discovery:y.NW,identity:y.$4,config:y.Ds},factory:({config:i,discovery:n,identity:s})=>F.create({config:i,discovery:n,identity:s})})];var je=t(77277),me=t(23196),ke=t(39857);function Qe({children:i}){return(0,g.GV)()?(0,r.jsx)(r.Fragment,{children:i}):(0,r.jsx)(g.VA,{children:i})}const it=()=>(0,r.jsx)(me.mf,{status:"404",statusMessage:"PAGE NOT FOUND"}),nt=({step:i,error:n})=>{let s="";return i==="load-config"?s=`The configuration failed to load, someone should have a look at this error: ${n.message}`:i==="load-chunk"&&(s=`Lazy loaded chunk failed to load, try to reload the page: ${n.message}`),(0,r.jsx)(Qe,{children:(0,r.jsx)(me.mf,{status:"501",statusMessage:s})})},Be=({error:i,resetError:n,plugin:s})=>(0,r.jsx)(me.yu,{title:`Error in ${s==null?void 0:s.getId()}`,defaultExpanded:!0,error:i,children:(0,r.jsx)(je.Z,{variant:"outlined",onClick:n,children:"Retry"})}),xt={Progress:me.Ex,Router:ke.VK,NotFoundErrorPage:it,BootErrorPage:nt,ErrorBoundaryFallback:Be};var Zt=t(43642),mn=t(80079),_t=t(90941),Tn=t(32915),vn=t(40562),jn=t(21853),En=t(60744),vr=t(66569),kr=t(30254),lo=t(13384),In=t(15933),$n=t(58838),Cr=t(86737),Rs=t(4989),Ls=t(44407),Oi=t(18628),is=t(84219),Ps=t(98685),Or=t(39781);const Bi={brokenImage:mn.Z,catalog:Oi.Z,scaffolder:Tn.Z,techdocs:vn.Z,search:jn.Z,chat:En.Z,dashboard:vr.Z,docs:kr.Z,email:lo.Z,github:$n.Z,group:is.Z,help:Cr.Z,"kind:api":In.Z,"kind:component":Ls.Z,"kind:domain":Zt.Z,"kind:group":is.Z,"kind:location":Rs.Z,"kind:system":_t.Z,"kind:user":Ps.Z,user:Ps.Z,warning:Or.Z};var $i=t(73689),ks=t(48032);const ir={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")`},ar={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"],greens:["#4BB8A5","#187656"]};function lr(i){const{colors:n,shape:s,options:c}=i,L=`linear-gradient(90deg, ${(n.length===1?[n[0],n[0]]:n).join(", ")})`,O=`${s}, ${L}`;var V;const ee=(V=c==null?void 0:c.fontColor)!==null&&V!==void 0?V:"#FFFFFF";return{colors:n,shape:s,backgroundImage:O,fontColor:ee}}const as={home:lr({colors:ar.teal,shape:ir.wave}),documentation:lr({colors:ar.pinkSea,shape:ir.wave2}),tool:lr({colors:ar.purpleSky,shape:ir.round}),service:lr({colors:ar.marineBlue,shape:ir.wave}),website:lr({colors:ar.veryBlue,shape:ir.wave}),library:lr({colors:ar.rubyRed,shape:ir.wave}),other:lr({colors:ar.darkGrey,shape:ir.wave}),app:lr({colors:ar.toastyOrange,shape:ir.wave}),apis:lr({colors:ar.teal,shape:ir.wave2}),card:lr({colors:ar.greens,shape:ir.wave})},ls=16,Os='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function Bs(i){const{palette:n,htmlFontSize:s=ls,fontFamily:c=Os,defaultPageTheme:f,pageTheme:L=as}=i;if(!L[f])throw new Error(`${f} is not defined in pageTheme.`);var O;return{palette:n,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{htmlFontSize:s,fontFamily:c,h6:{fontWeight:700,fontSize:20,marginBottom:2},h5:{fontWeight:700,fontSize:24,marginBottom:4},h4:{fontWeight:700,fontSize:28,marginBottom:6},h3:{fontSize:32,fontWeight:700,marginBottom:6},h2:{fontSize:40,fontWeight:700,marginBottom:8},h1:{fontSize:54,fontWeight:700,marginBottom:10}},page:L[f],getPageTheme:({themeId:V})=>(O=L[V])!==null&&O!==void 0?O:L[f]}}function $s(i){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:i.typography.fontFamily},body:{height:"100%",fontFamily:i.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:i.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:i.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:i.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:i.spacing(1.5,2,1.5,2.5)},head:{wordBreak:"break-word",overflow:"hidden",color:i.palette.textSubtle,fontWeight:"normal",lineHeight:"1"}},MuiTabs:{root:{minHeight:24}},MuiTab:{root:{color:i.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,ks.darken)(i.palette.link,.3),background:(0,ks.lighten)(i.palette.link,.95)},[i.breakpoints.up("md")]:{minWidth:120,fontSize:i.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:i.palette.link}},MuiTableSortLabel:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"}},active:{fontWeight:"bold",color:"inherit"}},MuiListItemText:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},MuiButton:{text:{padding:void 0}},MuiChip:{root:{backgroundColor:"#D9D9D9",marginRight:i.spacing(1),marginBottom:i.spacing(1),color:i.palette.grey[900]},outlined:{color:i.palette.text.primary},label:{lineHeight:`${i.spacing(2.5)}px`,fontWeight:i.typography.fontWeightMedium,fontSize:`${i.spacing(1.75)}px`},labelSmall:{fontSize:`${i.spacing(1.5)}px`},deleteIcon:{color:i.palette.grey[500],width:`${i.spacing(3)}px`,height:`${i.spacing(3)}px`,margin:`0 ${i.spacing(.75)}px 0 -${i.spacing(.75)}px`},deleteIconSmall:{width:`${i.spacing(2)}px`,height:`${i.spacing(2)}px`,margin:`0 ${i.spacing(.5)}px 0 -${i.spacing(.5)}px`}},MuiCard:{root:{display:"flex",flexDirection:"column"}},MuiCardHeader:{root:{paddingBottom:0}},MuiCardContent:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}},MuiCardActions:{root:{justifyContent:"flex-end"}}}}function cs(i){const n=Bs(i),s=(0,$i.Z)(n),c=$s(s);return{...s,overrides:c}}var ds=t(34505);const Zs=cs({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:ds.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:as}),Zi=cs({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:ds.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:as});var Di=t(98192),us=t(15222),Ds=t(41547),Bo=t(87561);const Ns=[{id:"light",title:"Light Theme",variant:"light",icon:(0,r.jsx)(us.Z,{}),Provider:({children:i})=>(0,r.jsx)(Ds.Z,{theme:Zs,children:(0,r.jsx)(Bo.ZP,{children:i})})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,r.jsx)(Di.Z,{}),Provider:({children:i})=>(0,r.jsx)(Ds.Z,{theme:Zi,children:(0,r.jsx)(Bo.ZP,{children:i})})}];function hs(i){var n,s,c,f;return Sr({...i,apis:(n=i==null?void 0:i.apis)!==null&&n!==void 0?n:[],bindRoutes:i==null?void 0:i.bindRoutes,components:{...xt,...i==null?void 0:i.components},configLoader:i==null?void 0:i.configLoader,defaultApis:Ce,icons:{...Bi,...i==null?void 0:i.icons},plugins:(s=i==null?void 0:i.plugins)!==null&&s!==void 0?s:[],featureFlags:(c=i==null?void 0:i.featureFlags)!==null&&c!==void 0?c:[],themes:(f=i==null?void 0:i.themes)!==null&&f!==void 0?f:Ns})}var Gr=t(25271),ps=t(76635);async function Fs({storageApi:i}){const n=i.forBucket("settings"),s=i.forBucket("starredEntities"),c=n.snapshot("starredEntities").value;if(!(0,ps.isArray)(c))return;var f;const L=new Set((f=s.snapshot("entityRefs").value)!==null&&f!==void 0?f:[]);c.filter(ps.isString).map(O=>O.split(":")).filter(O=>O.length===4&&O[0]==="entity").map(([O,V,ee,Ne])=>(0,Gr.eE)({kind:V,namespace:ee,name:Ne})).forEach(O=>L.add(O)),await s.set("entityRefs",Array.from(L)),await n.remove("starredEntities")}class $o{async toggleStarred(n){this.starredEntities.has(n)?this.starredEntities.delete(n):this.starredEntities.add(n),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const n of this.subscribers)n.next(new Set(this.starredEntities))}constructor(n){this.subscribers=new Set,this.observable=new(ge())(c=>(c.next(new Set(this.starredEntities)),this.subscribers.add(c),()=>{this.subscribers.delete(c)})),Fs(n).then(),this.settingsStore=n.storageApi.forBucket("starredEntities");var s;this.starredEntities=new Set((s=this.settingsStore.snapshot("entityRefs").value)!==null&&s!==void 0?s:[]),this.settingsStore.observe$("entityRefs").subscribe({next:c=>{var f;this.starredEntities=new Set((f=c.value)!==null&&f!==void 0?f:[]),this.notifyChanges()}})}}var Ni=t(33414),Br=t(79692),Us=t(12420),Vn=t(40303),Fi=t(19928);function Ui(){const i=useApi(catalogApiRef),{error:n,loading:s,value:c}=useAsync(async()=>await i.getEntityFacets({facets:["kind"]}).then(L=>{var O;return((O=L.facets.kind)===null||O===void 0?void 0:O.map(V=>V.value).sort())||[]}),[i]);return{loading:s,error:n,allKinds:c!=null?c:[]}}function Ms(i,n,s){let c=i;return n&&(c=c.filter(L=>n.some(O=>O.toLocaleLowerCase("en-US")===L.toLocaleLowerCase("en-US")))),s&&!i.some(L=>L.toLocaleLowerCase("en-US")===s.toLocaleLowerCase("en-US"))&&(c=c.concat([s])),c.sort().reduce((L,O)=>(L[O.toLocaleLowerCase("en-US")]=O,L),{})}const zs=(0,Br.Z)(i=>(0,Us.Z)({root:{...i.typography.h4}}));function Ws(i){var n;const{initialFilter:s="component",allowedKinds:c}=i,f=zs(),{allKinds:L}=useAllKinds(),{filters:O,updateFilters:V,queryParameters:{kind:ee}}=useEntityList(),Ne=useMemo(()=>[ee].flat()[0],[ee]);var we;const[qe,lt]=useState((we=Ne!=null?Ne:(n=O.kind)===null||n===void 0?void 0:n.value)!==null&&we!==void 0?we:s);useEffect(()=>{Ne&<(Ne)},[Ne]),useEffect(()=>{var jt;if(!((jt=O.kind)===null||jt===void 0)&&jt.value){var Ut;lt((Ut=O.kind)===null||Ut===void 0?void 0:Ut.value)}},[O.kind]),useEffect(()=>{V({kind:qe?new EntityKindFilter(qe):void 0})},[qe,V]);const wt=filterKinds(L,c,qe);return _jsx(Select,{input:_jsx(InputBase,{}),value:qe.toLocaleLowerCase("en-US"),onChange:jt=>lt(jt.target.value),classes:f,children:Object.keys(wt).map(jt=>_jsx(MenuItem,{value:jt,children:`${pluralize(wt[jt])}`},jt))})}var Mi=t(86359),co=t(95544),fs=t(99688),uo=t(12231),Zo=t(86136),ho=t(49378),gs=t(85256),ms=t(80030),Yn=t(61837),zi=t(79784),Wi=t(50758),Vi=t(31654),Hi=t(43054),Gi=t(65759),Pa=t(49280),Ki=t(96641);function Yi(i){const{entity:n,loading:s,error:c}=(0,Ki.ce)(),{allowed:f,loading:L,error:O}=ie({permission:i,resourceRef:n?(0,Gr.eE)(n):void 0});return s||L?{loading:!0,allowed:!1}:c?{loading:!1,allowed:!1,error:c}:{loading:!1,allowed:f,error:O}}const $r="catalog-entity",Ji=sr({name:"catalog.entity.read",attributes:{action:"read"},resourceType:$r}),Xi=sr({name:"catalog.entity.create",attributes:{action:"create"}}),vs=sr({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:$r}),Vs=sr({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:$r}),Do=sr({name:"catalog.location.read",attributes:{action:"read"}}),Hs=sr({name:"catalog.location.create",attributes:{action:"create"}}),Gs=sr({name:"catalog.location.delete",attributes:{action:"delete"}}),Qi=[Ji,Xi,vs,Vs,Do,Hs,Gs];var No=t(49166);function Fo(i){const{unregisterEntityOptions:n,isUnregisterAllowed:s,onUnregisterEntity:c,onClose:f}=i,L=typeof(n==null?void 0:n.disableUnregister)=="boolean";var O;const V=(O=!s||(L?!!(n!=null&&n.disableUnregister):(n==null?void 0:n.disableUnregister)==="disable"))!==null&&O!==void 0?O:!1;let ee=(0,r.jsx)(r.Fragment,{});return(n==null?void 0:n.disableUnregister)!=="hidden"&&(ee=(0,r.jsxs)(uo.Z,{onClick:()=>{f(),c()},disabled:V,children:[(0,r.jsx)(Zo.Z,{children:(0,r.jsx)(No.Z,{fontSize:"small"})}),(0,r.jsx)(ho.Z,{primary:"Unregister entity"})]})),(0,r.jsx)(r.Fragment,{children:ee})}const po=(0,Br.Z)(i=>({button:{color:i.page.fontColor}}),{name:"PluginCatalogEntityContextMenu"});function ys(i){const{UNSTABLE_extraContextMenuItems:n,UNSTABLE_contextMenuOptions:s,onUnregisterEntity:c,onInspectEntity:f}=i,[L,O]=(0,M.useState)(),V=po(),Ne=Yi(vs).allowed,we=Ut=>{O(Ut.currentTarget)},qe=()=>{O(void 0)},lt=(0,y.h_)(y.$v),wt=(0,M.useCallback)(()=>{window.navigator.clipboard.writeText(window.location.toString()).then(()=>lt.post({message:"Copied!",severity:"info"}))},[lt]),jt=n&&[...n.map(Ut=>(0,r.jsxs)(uo.Z,{onClick:()=>{qe(),Ut.onClick()},children:[(0,r.jsx)(Zo.Z,{children:(0,r.jsx)(Ut.Icon,{fontSize:"small"})}),(0,r.jsx)(ho.Z,{primary:Ut.title})]},Ut.title)),(0,r.jsx)(gs.Z,{},"the divider is here!")];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ms.ZP,{title:"More",arrow:!0,children:(0,r.jsx)(Yn.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true","aria-expanded":!!L,role:"button",onClick:we,"data-testid":"menu-button",className:V.button,id:"long-menu",children:(0,r.jsx)(Hi.Z,{})})}),(0,r.jsx)(zi.ZP,{open:Boolean(L),onClose:qe,anchorEl:L,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},"aria-labelledby":"long-menu",children:(0,r.jsxs)(Wi.Z,{children:[jt,(0,r.jsx)(Fo,{unregisterEntityOptions:s,isUnregisterAllowed:Ne,onUnregisterEntity:c,onClose:qe}),(0,r.jsxs)(uo.Z,{onClick:()=>{qe(),f()},children:[(0,r.jsx)(Zo.Z,{children:(0,r.jsx)(Vi.Z,{fontSize:"small"})}),(0,r.jsx)(ho.Z,{primary:"Inspect entity"})]}),(0,r.jsxs)(uo.Z,{onClick:()=>{qe(),wt()},children:[(0,r.jsx)(Zo.Z,{children:(0,r.jsx)(Gi.Z,{fontSize:"small"})}),(0,r.jsx)(ho.Z,{primary:"Copy entity URL"})]})]})})]})}const Uo="plugin.catalog.entityLayoutRoute",_n=()=>null;(0,y.R5)(_n,Uo,!0),(0,y.R5)(_n,"core.gatherMountPoints",!0);function Ks(i){const{entity:n,title:s}=i;return(0,r.jsxs)(co.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%",children:[(0,r.jsx)(co.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:s}),n&&(0,r.jsx)(Vn.LH,{entity:n})]})}function xs(i,n,s,c){var f;const L=(f=i!=null?i:c==null?void 0:c.kind)!==null&&f!==void 0?f:"";var O;const V=(O=n!=null?n:c==null?void 0:c.metadata.namespace)!==null&&O!==void 0?O:"";var ee,Ne,we;return{headerTitle:`${(we=(Ne=(ee=c==null?void 0:c.metadata.title)!==null&&ee!==void 0?ee:s)!==null&&Ne!==void 0?Ne:c==null?void 0:c.metadata.name)!==null&&we!==void 0?we:""}${V&&V!==Gr.zG?` in ${V}`:""}`,headerType:(()=>{let lt=L.toLocaleLowerCase("en-US");return c&&c.spec&&"type"in c.spec&&(lt+=" \u2014 ",lt+=c.spec.type.toLocaleLowerCase("en-US")),lt})()}}function Ys(i){var n;const{entity:s}=i,c=(0,Vn.hF)(s,Gr.S4);return(0,r.jsxs)(r.Fragment,{children:[c.length>0&&(0,r.jsx)(me.i9,{label:"Owner",value:(0,r.jsx)(Vn.rI,{entityRefs:c,defaultKind:"Group",color:"inherit"})}),((n=s.spec)===null||n===void 0?void 0:n.lifecycle)&&(0,r.jsx)(me.i9,{label:"Lifecycle",value:s.spec.lifecycle})]})}const qi=i=>{var n,s;const{UNSTABLE_extraContextMenuItems:c,UNSTABLE_contextMenuOptions:f,children:L,NotFoundComponent:O}=i,{kind:V,namespace:ee,name:Ne}=(0,y.Oi)(Vn.wi),{entity:we,loading:qe,error:lt}=(0,Vn.ce)(),wt=(0,g.TH)(),jt=(0,y.vJ)(L,ji=>ji.selectByComponentData({key:Uo,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:Zr})=>{if(we){if(Zr.if&&!Zr.if(we))return[]}else return[];return[{path:Zr.path,title:Zr.title,children:Zr.children,tabProps:Zr.tabProps}]}),[we]),{headerTitle:Ut,headerType:zt}=xs(V,ee,Ne,we),[Dn,tr]=(0,M.useState)(!1),[nr,go]=(0,M.useState)(!1),js=(0,g.s0)(),Jo=async()=>{tr(!1),go(!1),js("/")};(0,M.useEffect)(()=>{tr(!1),go(!1)},[wt.pathname]);var mo;return(0,r.jsxs)(me.T3,{themeId:(mo=we==null||(n=we.spec)===null||n===void 0||(s=n.type)===null||s===void 0?void 0:s.toString())!==null&&mo!==void 0?mo:"home",children:[(0,r.jsx)(me.h4,{title:(0,r.jsx)(Ks,{title:Ut,entity:we}),pageTitleOverride:Ut,type:zt,children:we&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Ys,{entity:we}),(0,r.jsx)(ys,{UNSTABLE_extraContextMenuItems:c,UNSTABLE_contextMenuOptions:f,onUnregisterEntity:()=>tr(!0),onInspectEntity:()=>go(!0)})]})}),qe&&(0,r.jsx)(me.Ex,{}),we&&(0,r.jsx)(me.tn,{routes:jt}),lt&&(0,r.jsx)(me.VY,{children:(0,r.jsx)(fs.Z,{severity:"error",children:lt.toString()})}),!qe&&!lt&&!we&&(0,r.jsx)(me.VY,{children:O||(0,r.jsxs)(me.GB,{title:"Entity not found",children:["There is no ",V," with the requested"," ",(0,r.jsx)(me.rU,{to:"https://backstage.io/docs/features/software-catalog/references",children:"kind, namespace, and name"}),"."]})}),(0,r.jsx)(Vn.pp,{open:Dn,entity:we,onConfirm:Jo,onClose:()=>tr(!1)}),(0,r.jsx)(Vn.U_,{open:nr,entity:we,onClose:()=>go(!1)})]})};qi.Route=_n;function cr(i){const{open:n,onClose:s,onConfirm:c,entity:f}=i,[L,O]=useState(!1),V=useApi(catalogApiRef),ee=useApi(alertApiRef),Ne=async()=>{O(!0);try{const we=f.metadata.uid;await V.removeEntityByUid(we),c()}catch(we){assertError(we),ee.post({message:we.message})}finally{O(!1)}};return _jsxs(Dialog,{open:n,onClose:s,children:[_jsx(DialogTitle,{id:"responsive-dialog-title",children:"Are you sure you want to delete this entity?"}),_jsxs(DialogActions,{children:[_jsx(Button,{variant:"contained",color:"secondary",disabled:L,onClick:Ne,children:"Delete"}),_jsx(Button,{onClick:s,color:"primary",children:"Cancel"})]})]})}var Kr=t(19625);function _i(i){var n,s;return(i==null||(n=i.metadata)===null||n===void 0||(s=n.annotations)===null||s===void 0?void 0:s["backstage.io/orphan"])==="true"}function ea(){const i=useNavigate(),n=useRouteRef(rootRouteRef),[s,c]=useState(!1),{entity:f}=useEntity(),L=async()=>{c(!1),i(n())};return _jsxs(_Fragment,{children:[_jsx(Alert,{severity:"warning",onClick:()=>c(!0),children:"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."}),_jsx(DeleteEntityDialog,{open:s,entity:f,onConfirm:L,onClose:()=>c(!1)})]})}var Js=t(4791);const Xs=i=>i.error&&i.level==="error"&&i.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function Yr(i,n){return{items:(await n.getEntityAncestors({entityRef:i})).items.map(f=>{var L,O;return{errors:((O=(L=f.entity.status)===null||L===void 0?void 0:L.items)!==null&&O!==void 0?O:[]).filter(Xs).map(Ne=>Ne.error).filter(Ne=>Boolean(Ne)),entity:f.entity}}).filter(f=>f.errors.length>0)}}async function Qs(i,n){const s=n.apis.get(catalogApiRef);if(!s)throw new Error(`No implementation available for ${catalogApiRef}`);return(await Yr(stringifyEntityRef(i),s)).items.length>0}function _s(){const{entity:i}=useEntity(),n=stringifyEntityRef(i),s=useApi(catalogApiRef),{loading:c,error:f,value:L}=useAsync(async()=>Yr(n,s),[n,s]);return f?_jsx(Box,{mb:1,children:_jsx(ResponseErrorPanel,{error:f})}):c||!L?null:_jsx(_Fragment,{children:L.items.map((O,V)=>_jsxs(Box,{mb:1,children:[stringifyEntityRef(i)!==stringifyEntityRef(O.entity)&&_jsxs(Box,{p:1,children:["The error below originates from"," ",_jsx(EntityRefLink,{entityRef:O.entity})]}),O.errors.map((ee,Ne)=>_jsx(ResponseErrorPanel,{error:ee},Ne))]},V))})}const Mo="core.backstage.entitySwitch",zo=i=>null;(0,y.R5)(zo,Mo,!0);const Wo=i=>{var n;const{entity:s,loading:c}=(0,Vn.ce)(),f=(0,y.I_)(),L=(0,y.vJ)(i.children,ee=>ee.selectByComponentData({key:Mo,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(Ne=>{if(c)return[];const{if:we,children:qe}=Ne.props;if(!s)return[{if:we===void 0,children:qe}];var lt;return[{if:(lt=we==null?void 0:we(s,{apis:f}))!==null&<!==void 0?lt:!0,children:qe}]}),[f,s,c]);if(L.some(ee=>typeof ee.if=="object"&&"then"in ee.if))return(0,r.jsx)(ei,{results:L});var V;return(V=(n=L.find(ee=>ee.if))===null||n===void 0?void 0:n.children)!==null&&V!==void 0?V:null};function ei({results:i}){const{loading:n,value:s}=(0,pe.default)(async()=>{const c=i.map(async({if:L,children:O})=>{try{if(await L)return O}catch{}return null});var f;return(f=(await Promise.all(c)).find(Boolean))!==null&&f!==void 0?f:null},[i]);return n||!s?null:s}Wo.Case=zo;const ti=null,ni=Vn._i.Filters,ri=Vn._i.Content;var ta=t(85877),Jr=t(15096);const Zn=(0,y.rx)({id:"catalog",apis:[(0,y.ni)({api:Vn.Ah,deps:{discoveryApi:y.NW,fetchApi:y.gP},factory:({discoveryApi:i,fetchApi:n})=>new Js.MS({discoveryApi:i,fetchApi:n})}),(0,y.ni)({api:Vn.p3,deps:{storageApi:y.E6},factory:({storageApi:i})=>new $o({storageApi:i})})],routes:{catalogIndex:Kr._Z,catalogEntity:Vn.wi},externalRoutes:{createComponent:Kr.yw,viewTechDoc:Kr.jU},__experimentalConfigure(i){return{...{createButtonTitle:"Create"},...i}}}),na=Zn.provide((0,y.P4)({name:"CatalogIndexPage",component:()=>t.e(9323).then(t.bind(t,89323)).then(i=>i.CatalogPage),mountPoint:Kr._Z})),bs=Zn.provide((0,y.P4)({name:"CatalogEntityPage",component:()=>t.e(8951).then(t.bind(t,78951)).then(i=>i.CatalogEntityPage),mountPoint:Vn.wi})),oi=Zn.provide((0,y.CO)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(t.bind(t,33414)).then(i=>i.AboutCard)}})),ra=Zn.provide((0,y.CO)({name:"EntityLinksCard",component:{lazy:()=>t.e(7750).then(t.bind(t,17750)).then(i=>i.EntityLinksCard)}})),oa=Zn.provide((0,y.CO)({name:"EntityLabelsCard",component:{lazy:()=>Promise.resolve().then(t.bind(t,85877)).then(i=>i.EntityLabelsCard)}})),sa=Zn.provide((0,y.CO)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(5458).then(t.bind(t,5458)).then(i=>i.HasSystemsCard)}})),si=Zn.provide((0,y.CO)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(1105).then(t.bind(t,1105)).then(i=>i.HasComponentsCard)}})),ia=Zn.provide((0,y.CO)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(2440).then(t.bind(t,82440)).then(i=>i.HasSubcomponentsCard)}})),Vo=Zn.provide((0,y.CO)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(9770).then(t.bind(t,79770)).then(i=>i.HasResourcesCard)}})),ii=Zn.provide((0,y.CO)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(9545).then(t.bind(t,19545)).then(i=>i.DependsOnComponentsCard)}})),aa=Zn.provide((0,y.CO)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(184).then(t.bind(t,40184)).then(i=>i.DependencyOfComponentsCard)}})),ai=Zn.provide((0,y.CO)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(1032).then(t.bind(t,81032)).then(i=>i.DependsOnResourcesCard)}})),la=Zn.provide((0,y.CO)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(732).then(t.bind(t,732)).then(i=>i.RelatedEntitiesCard)}})),li=Zn.provide((0,Jr.E5)({name:"CatalogSearchResultListItem",component:()=>t.e(7670).then(t.bind(t,27670)).then(i=>i.CatalogSearchResultListItem),predicate:i=>i.type==="software-catalog"}));var Ho=t(32838);class Hn{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(n,s){const f=`${await this.getApiOrigin()}/${s}`,L=await fetch(`${f.endsWith("/")?f:`${f}/`}index.html`);if(L.status===404)throw new Error("Page not found");return L.text()}async syncEntityDocs(n){return"cached"}async getBaseUrl(n,s,c){const f=await this.getApiOrigin();return new URL(n,`${f}/${c}`).toString()}constructor({configApi:n,discoveryApi:s,identityApi:c}){this.configApi=n,this.discoveryApi=s,this.identityApi=c}}class ci{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(n){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(n){return{site_name:"Live preview environment",site_description:""}}constructor({configApi:n,discoveryApi:s,identityApi:c}){this.configApi=n,this.discoveryApi=s,this.identityApi=c}}const di=[(0,y.ni)({api:Ae.Dl,deps:{configApi:y.Ds,discoveryApi:y.NW,identityApi:y.$4},factory:({configApi:i,discoveryApi:n,identityApi:s})=>new Hn({configApi:i,discoveryApi:n,identityApi:s})}),(0,y.ni)({api:Ae.gT,deps:{configApi:y.Ds,discoveryApi:y.NW,identityApi:y.$4},factory:({configApi:i,discoveryApi:n,identityApi:s})=>new ci({configApi:i,discoveryApi:n,identityApi:s})}),(0,y.ni)({api:Ho.q3,deps:{configApi:y.Ds},factory:({configApi:i})=>Ho.ae.fromConfig(i)})],ui={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Ss={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function hi(){const i=await fetch("/.detect");return i.ok?(await i.text()).trim()==="techdocs-cli-server":!1}async function ca(){const i=await ro(),n=await hi();return[...i,{context:"detected",data:n?ui:Ss}]}var Go=t(58845);const pi=(0,Br.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var fi=()=>{const i=pi();return(0,r.jsx)("svg",{className:i.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,r.jsx)("path",{className:i.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"})})};const fo=(0,Br.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var gi=()=>{const i=fo();return(0,r.jsx)("svg",{className:i.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,r.jsx)("path",{className:i.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"})})};const Cs=(0,Br.Z)({root:{width:me.po.drawerWidthClosed,height:3*me.po.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:me.po.drawerWidthClosed,marginLeft:24}}),mi=()=>{const i=Cs(),{isOpen:n}=(0,me.mZ)();return(0,r.jsx)("div",{className:i.root,children:(0,r.jsx)(me.rU,{to:"/docs/default/component/local/",underline:"none",className:i.link,children:n?(0,r.jsx)(fi,{}):(0,r.jsx)(gi,{})})})},ha=({children:i})=>(0,r.jsxs)(me.tR,{children:[(0,r.jsxs)(me.YE,{children:[(0,r.jsx)(mi,{}),(0,r.jsx)(me.v7,{}),(0,r.jsx)(me.R6,{icon:Go.Z,to:"/docs/default/component/local",text:"Docs Preview"})]}),i]});var pa=t(32388),vi=t(4142);const fa=(0,Br.Z)(i=>({headerIcon:{color:i.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:i.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var dr;(function(i){i.LIGHT="light",i.DARK="dark"})(dr||(dr={}));const Ko=()=>{const i=(0,y.h_)(y.hg),n=fa(),[s,c]=(0,M.useState)(i.getActiveThemeId()===dr.DARK?dr.DARK:dr.LIGHT),f={[dr.LIGHT]:{icon:vi.Z,title:"Dark theme"},[dr.DARK]:{icon:pa.Z,title:"Light theme"}},{title:L,icon:O}=f[s],V=()=>{c(ee=>{const Ne=ee===dr.LIGHT?dr.DARK:dr.LIGHT;return i.setActiveThemeId(Ne),Ne})};return(0,r.jsx)(co.Z,{display:"flex",alignItems:"center",mr:2,children:(0,r.jsx)(ms.ZP,{title:L,arrow:!0,children:(0,r.jsx)(Yn.Z,{size:"small",onClick:V,children:(0,r.jsx)(O,{className:n.headerIcon})})})})},Yo=()=>(0,r.jsxs)(R.I6,{children:[(0,r.jsx)(I.S,{}),(0,r.jsx)(T.F,{withSearch:!1})]}),yi=(0,r.jsx)(Yo,{}),Xr=hs({apis:di,configLoader:ca,plugins:Object.values(h)}),xi=Xr.getProvider(),ws=Xr.getRouter(),bi=R.s4.provide((0,Ae.KY)({name:"ThemeToggleAddon",component:Ko,location:Ae.oZ.Header})),Si=(0,r.jsxs)(Po,{children:[(0,r.jsx)(g.Fg,{to:"/docs/default/component/local/"},"/"),(0,r.jsx)(g.AW,{path:"/catalog/:namespace/:kind/:name",element:(0,r.jsx)(bs,{})}),(0,r.jsx)(g.AW,{path:"/docs",element:(0,r.jsx)(R.Jl,{}),children:(0,r.jsx)(E.u,{})}),(0,r.jsxs)(g.AW,{path:"/docs/:namespace/:kind/:name/*",element:(0,r.jsx)(R.I6,{}),children:[yi,(0,r.jsx)(Ae.DR,{children:(0,r.jsx)(bi,{})})]})]});var wi=()=>(0,r.jsx)(xi,{children:(0,r.jsx)(ws,{children:(0,r.jsx)(ha,{children:Si})})});P.render((0,r.jsx)(wi,{}),document.getElementById("root"))},51837:function(bt,Oe,t){"use strict";t.d(Oe,{CT:function(){return y},EI:function(){return Se},uW:function(){return P},Vt:function(){return a}});function h(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const r=h(),M=J=>`__@backstage/${J}__`;function P(J,H){const I=M(J);let T=r[I];return T||(T=H(),r[I]=T,T)}var g=t(2784);function y(J){return P(J,()=>(0,g.createContext)(void 0))}function a(J){return(0,g.useContext)(y(J))}function $(J){return{set(H){globalThis[`__@backstage/${J}__`]=createContext(createVersionedValueMap(H))},reset(){delete globalThis[`__@backstage/${J}__`]}}}function Se(J){Object.freeze(J);const H={atVersion(I){return J[I]}};return Object.defineProperty(H,"$map",{configurable:!0,enumerable:!0,get(){return J}}),H}},96641:function(bt,Oe,t){"use strict";t.d(Oe,{X2:function(){return Se},ce:function(){return J},h$:function(){return a}});var h=t(52322),r=t(25271),M=t(60871),P=t(51837),g=t(2784);const y=(0,P.CT)("entity-context"),a=({children:H,entity:I,loading:T,error:Q,refresh:se})=>{const ne={entity:I,loading:T,error:Q,refresh:se};return(0,h.jsx)(y.Provider,{value:(0,P.EI)({1:ne}),children:(0,h.jsx)(M.fC,{attributes:{...I?{entityRef:(0,r.eE)(I)}:void 0},children:H})})},$=H=>_jsx(a,{entity:H.entity,loading:!Boolean(H.entity),error:void 0,refresh:void 0,children:H.children});function Se(){const H=(0,P.Vt)("entity-context");if(!H)throw new Error("Entity context is not available");const I=H.atVersion(1);if(!I)throw new Error("EntityContext v1 not available");if(!I.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:I.entity}}function J(){const H=(0,P.Vt)("entity-context");if(!H)throw new Error("Entity context is not available");const I=H.atVersion(1);if(!I)throw new Error("EntityContext v1 not available");const{entity:T,loading:Q,error:se,refresh:ne}=I;return{entity:T,loading:Q,error:se,refresh:ne}}},40303:function(bt,Oe,t){"use strict";t.d(Oe,{h$:function(){return Te.h$},n3:function(){return h.n3},_i:function(){return z},tW:function(){return Pe},df:function(){return It},UO:function(){return hn},dq:function(){return q},nl:function(){return Hr},dx:function(){return Me},rI:function(){return ot},u3:function(){return Ze},xE:function(){return fn},sL:function(){return an},LH:function(){return w},U_:function(){return oo},pp:function(){return Bn},EW:function(){return ko},Ah:function(){return M},wi:function(){return Ae},hF:function(){return We.hF},CV:function(){return We.CV},$3:function(){return Ye},p3:function(){return P},ce:function(){return Te.ce},X2:function(){return Te.X2},wp:function(){return $t},ZW:function(){return wn},eK:function(){return Xn},CR:function(){return Cn}});var h=t(4791),r=t(60871);const M=(0,r.T0)({id:"plugin.catalog.service"}),P=(0,r.T0)({id:"catalog-react.starred-entities"});var g=t(82394);class y{async toggleStarred(S){this.starredEntities.delete(S)||this.starredEntities.add(S);for(const B of this.subscribers)B.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}constructor(){this.starredEntities=new Set,this.subscribers=new Set,this.observable=new ObservableImpl(S=>(S.next(new Set(this.starredEntities)),this.subscribers.add(S),()=>{this.subscribers.delete(S)}))}}var a=t(52322),$=t(2784),Se=t(41156),J=t(60364),H=t(77277),I=t(4190),T=t(95544),Q=t(90436),se=t(60905),ne=t(36444);const k=b=>{const S=(0,Se.Z)(ie=>ie.breakpoints.down("md")),B=(0,J.Z)(),[F,_]=(0,$.useState)(!1);return S?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(H.Z,{style:{marginTop:B.spacing(1),marginLeft:B.spacing(1)},onClick:()=>_(!0),startIcon:(0,a.jsx)(ne.Z,{}),children:"Filters"}),(0,a.jsx)(I.ZP,{open:F,onClose:()=>_(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,a.jsxs)(T.Z,{m:2,children:[(0,a.jsx)(Q.Z,{variant:"h6",component:"h2",style:{marginBottom:B.spacing(1)},children:"Filters"}),b.children]})})]}):(0,a.jsx)(se.Z,{item:!0,lg:2,children:b.children})},E=b=>(0,a.jsx)(se.Z,{item:!0,xs:12,lg:10,children:b.children}),z=b=>(0,a.jsx)(se.Z,{container:!0,style:{position:"relative"},children:b.children});z.Filters=k,z.Content=E;var N=t(23196),R=t(25271),oe=t(51837);const Ae=(0,oe.uW)("catalog:entity-route-ref",()=>(0,r.NT)({id:"catalog:entity",params:["namespace","kind","name"]}));function _e(b){var S,B;return{kind:b.kind.toLocaleLowerCase("en-US"),namespace:(B=(S=b.metadata.namespace)===null||S===void 0?void 0:S.toLocaleLowerCase("en-US"))!==null&&B!==void 0?B:DEFAULT_NAMESPACE,name:b.metadata.name}}function Ye(b,S){const B=S==null?void 0:S.defaultKind;let F,_,ie;return"metadata"in b?(F=b.kind,_=b.metadata.namespace,ie=b.metadata.name):(F=b.kind,_=b.namespace,ie=b.name),(_===void 0||_==="")&&(_=R.zG),(S==null?void 0:S.defaultNamespace)!==void 0?(S==null?void 0:S.defaultNamespace)===_&&(_=void 0):_===R.zG&&(_=void 0),F=F.toLocaleLowerCase("en-US"),F=B&&B.toLocaleLowerCase("en-US")===F?void 0:F,`${F?`${F}:`:""}${_?`${_}/`:""}${ie}`}var dt=t(80030);const Me=(0,$.forwardRef)((b,S)=>{const{entityRef:B,defaultKind:F,title:_,children:ie,...te}=b,fe=(0,r.tg)(Ae);let Ce,je,me;if(typeof B=="string"){const Be=(0,R.of)(B);Ce=Be.kind,je=Be.namespace,me=Be.name}else"metadata"in B?(Ce=B.kind,je=B.metadata.namespace,me=B.metadata.name):(Ce=B.kind,je=B.namespace,me=B.name);Ce=Ce.toLocaleLowerCase("en-US");var ke;je=(ke=je==null?void 0:je.toLocaleLowerCase("en-US"))!==null&&ke!==void 0?ke:R.zG;const Qe={kind:Ce,namespace:je,name:me},it=Ye({kind:Ce,namespace:je,name:me},{defaultKind:F}),nt=(0,a.jsxs)(N.rU,{...te,ref:S,to:fe(Qe),children:[ie,!ie&&(_!=null?_:it)]});return _?(0,a.jsx)(dt.ZP,{title:it,children:nt}):nt});var at=t(64279);function rt(b){const{entityRefs:S,defaultKind:B,getTitle:F,..._}=b,ie=(0,r.h_)(M),{value:te=new Array,loading:fe,error:Ce}=(0,at.default)(async()=>{const je=S.reduce((ke,Qe)=>"metadata"in Qe?ke:[...ke,(0,R.of)(Qe)],new Array),me=S.filter(ke=>"metadata"in ke);return je.length>0?[...(await ie.getEntities({filter:je.map(ke=>({kind:ke.kind,"metadata.namespace":ke.namespace,"metadata.name":ke.name}))})).items,...me]:me},[S]);return fe?(0,a.jsx)(N.Ex,{}):Ce?(0,a.jsx)(N.yu,{error:Ce}):(0,a.jsx)(a.Fragment,{children:te.map((je,me)=>(0,a.jsxs)($.Fragment,{children:[me>0&&", ",(0,a.jsx)(Me,{..._,defaultKind:B,entityRef:je,title:F(je)})]},me))})}function ot(b){const{entityRefs:S,defaultKind:B,fetchEntities:F,getTitle:_,...ie}=b;return F?(0,a.jsx)(rt,{...ie,defaultKind:B,entityRefs:S,getTitle:_}):(0,a.jsx)(a.Fragment,{children:S.map((te,fe)=>(0,a.jsxs)($.Fragment,{children:[fe>0&&", ",(0,a.jsx)(Me,{...ie,defaultKind:B,entityRef:te,title:_?_(te):void 0})]},fe))})}var We=t(49280);class $e{getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}constructor(S){this.value=S}}class St{getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}constructor(S){this.value=S}}class gt{filterEntity(S){var B;return this.values.every(F=>((B=S.metadata.tags)!==null&&B!==void 0?B:[]).includes(F))}toQueryValue(){return this.values}constructor(S){this.values=S}}class Ct{filterEntity(S){const B=this.toUpperArray(this.value.split(/\s/)),F=this.toUpperArray([S.metadata.tags]),_=this.toUpperArray([S.metadata.name,S.metadata.title]);for(const ie of B)if(F.every(te=>te!==ie)&&_.every(te=>!te.includes(ie)))return!1;return!0}toUpperArray(S){return S.flat().filter(B=>Boolean(B)).map(B=>B.toLocaleUpperCase("en-US"))}constructor(S){this.value=S}}class Nt{filterEntity(S){return this.values.some(B=>(0,We.hF)(S,R.S4).some(F=>Ye(F,{defaultKind:"group"})===B))}toQueryValue(){return this.values}constructor(S){this.values=S}}class Lt{filterEntity(S){return this.values.some(B=>{var F;return((F=S.spec)===null||F===void 0?void 0:F.lifecycle)===B})}toQueryValue(){return this.values}constructor(S){this.values=S}}class Fe{filterEntity(S){switch(this.value){case"owned":return this.isOwnedEntity(S);case"starred":return this.isStarredEntity(S);default:return!0}}toQueryValue(){return this.value}constructor(S,B,F){this.value=S,this.isOwnedEntity=B,this.isStarredEntity=F}}class ge{filterEntity(S){var B;const F=(B=S.metadata.annotations)===null||B===void 0?void 0:B["backstage.io/orphan"];return F!==void 0&&this.value.toString()===F}constructor(S){this.value=S}}class Le{filterEntity(S){var B,F;const _=(S==null||(B=S.status)===null||B===void 0||(F=B.items)===null||F===void 0?void 0:F.length)>0;return _!==void 0&&this.value===_}constructor(S){this.value=S}}var Te=t(96641),De=t(76635),Je=t.n(De),Wt=t(19126),vt=t.n(Wt),Tt=t(79635),yt=t(69294),Pt=t(48760),Yt=t(90736);const sn=(0,$.createContext)(void 0),hn=({children:b})=>{const S=(0,Yt.default)(),B=(0,r.h_)(M),[F,_]=(0,$.useState)({}),ie=(0,Tt.TH)();var te;const fe=(0,$.useMemo)(()=>(te=vt().parse(ie.search,{ignoreQueryPrefix:!0}).filters)!==null&&te!==void 0?te:{},[ie]),[Ce,je]=(0,$.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:me,error:ke},Qe]=(0,yt.default)(async()=>{const Be=(0,De.compact)(Object.values(F)),xt=(0,We.Gz)(Be),Zt=(0,We.wq)(Be),mn=(0,We.wq)((0,De.compact)(Object.values(Ce.appliedFilters))),_t=Object.keys(F).reduce((vn,jn)=>{const En=F[jn];return En!=null&&En.toQueryValue&&(vn[jn]=En.toQueryValue()),vn},{});if((0,De.isEqual)(mn,Zt))je({appliedFilters:F,backendEntities:Ce.backendEntities,entities:Ce.backendEntities.filter(xt)});else{const vn=await B.getEntities({filter:Zt});je({appliedFilters:F,backendEntities:vn.items,entities:vn.items.filter(xt)})}if(S()){var Tn;const vn=vt().parse(ie.search,{ignoreQueryPrefix:!0}),jn=vt().stringify({...vn,filters:_t},{addQueryPrefix:!0,arrayFormat:"repeat"}),En=`${window.location.pathname}${jn}`;(Tn=window.history)===null||Tn===void 0||Tn.replaceState(null,document.title,En)}},[B,fe,F,Ce],{loading:!0});(0,Pt.Z)(Qe,10,[F]);const it=(0,$.useCallback)(Be=>{_(xt=>{const Zt=typeof Be=="function"?Be(xt):Be;return{...xt,...Zt}})},[]),nt=(0,$.useMemo)(()=>({filters:Ce.appliedFilters,entities:Ce.entities,backendEntities:Ce.backendEntities,updateFilters:it,queryParameters:fe,loading:me,error:ke}),[Ce,it,fe,me,ke]);return(0,a.jsx)(sn.Provider,{value:nt,children:b})};function $t(){const b=(0,$.useContext)(sn);if(!b)throw new Error("useEntityList must be used within EntityListProvider");return b}var xn=t(18149),bn=t.n(xn),Rn=t(829),pn=t.n(Rn);function Un(){const b=(0,r.h_)(M),{filters:{kind:S,type:B},queryParameters:{type:F},updateFilters:_}=$t(),ie=(0,$.useMemo)(()=>[F].flat().filter(Boolean),[F]);var te;const[fe,Ce]=(0,$.useState)(ie.length?ie:(te=B==null?void 0:B.getTypes())!==null&&te!==void 0?te:[]);(0,$.useEffect)(()=>{ie.length&&Ce(ie)},[ie]);const[je,me]=(0,$.useState)([]),ke=(0,$.useMemo)(()=>S==null?void 0:S.value,[S]),{error:Qe,loading:it,value:nt}=(0,at.default)(async()=>ke?await b.getEntityFacets({filter:{kind:ke},facets:["spec.type"]}).then(Zt=>Zt.facets["spec.type"]||[]):[],[ke,b]),Be=(0,$.useRef)(nt);return(0,$.useEffect)(()=>{const xt=Be.current;if(Be.current=nt,it||!ke||xt===nt||!nt)return;const Zt=[...new Set(pn()(nt,_t=>-_t.count).map(_t=>_t.value.toLocaleLowerCase("en-US")))];me(Zt);const mn=fe.filter(_t=>Zt.includes(_t));bn()(fe,mn)||Ce(mn)},[it,ke,fe,Ce,nt]),(0,$.useEffect)(()=>{_({type:fe.length?new St(fe):void 0})},[fe,_]),{loading:it,error:Qe,availableTypes:je,selectedTypes:fe,setSelectedTypes:Ce}}const Ln=20;function Xn(b,S){var B,F;const _=S==null||(B=S.type)===null||B===void 0?void 0:B.toLocaleLowerCase("en-US"),ie=S==null||(F=S.kind)===null||F===void 0?void 0:F.toLocaleLowerCase("en-US"),te=(0,r.h_)(M),{loading:fe,value:Ce,error:je}=(0,at.default)(async()=>{var me;const ke=(me=b.relations)===null||me===void 0?void 0:me.map(Be=>({type:Be.type,target:(0,R.of)(Be.targetRef)})).filter(Be=>(!_||Be.type.toLocaleLowerCase("en-US")===_)&&(!ie||Be.target.kind===ie));if(!ke)return[];const Qe=Object.values((0,De.groupBy)(ke,({target:Be})=>`${Be.kind}:${Be.namespace}`.toLocaleLowerCase("en-US"))),it=[];for(const Be of Qe)it.push({kind:Be[0].target.kind,namespace:Be[0].target.namespace,nameBatches:(0,De.chunk)(Be.map(xt=>xt.target.name),Ln)});return(await Promise.all(it.flatMap(Be=>Be.nameBatches.map(xt=>te.getEntities({filter:{kind:Be.kind,"metadata.namespace":Be.namespace,"metadata.name":xt}}))))).flatMap(Be=>Be.items)},[b,_,ie]);return{entities:Ce,loading:fe,error:je}}var ct=t(72164);function Pn(b){return typeof b=="string"?b:(0,R.eE)(b)}function Cn(){const b=(0,r.h_)(P),S=(0,ct.Z)(b.starredEntitie$(),new Set),B=(0,$.useCallback)(_=>S.has(Pn(_)),[S]),F=(0,$.useCallback)(_=>b.toggleStarred(Pn(_)).then(),[b]);return{starredEntities:S,toggleStarredEntity:F,isStarredEntity:B}}function ln(b){return typeof b=="string"?b:(0,R.eE)(b)}function kn(b){const S=(0,r.h_)(P),[B,F]=(0,$.useState)(!1);return(0,$.useEffect)(()=>{const ie=S.starredEntitie$().subscribe({next(te){F(te.has(ln(b)))}});return()=>{ie.unsubscribe()}},[b,S]),{toggleStarredEntity:(0,$.useCallback)(()=>S.toggleStarred(ln(b)).then(),[b,S]),isStarredEntity:B}}var Mn=t(75435);function wn(){const b=(0,r.h_)(r.$4),{loading:S,value:B}=(0,at.default)(async()=>{const{ownershipEntityRefs:_}=await b.getBackstageIdentity();return _},[]),F=(0,$.useMemo)(()=>{const _=new Set(B!=null?B:[]);return ie=>{const te=(0,Mn.h)(ie,R.S4).map(R.eE);for(const fe of te)if(_.has(fe))return!0;return!1}},[B]);return(0,$.useMemo)(()=>({loading:S,isOwnedEntity:F}),[S,F])}function Gn(){const b=(0,r.h_)(M),{error:S,loading:B,value:F}=(0,at.default)(async()=>await b.getEntityFacets({facets:["kind"]}).then(ie=>{var te;return((te=ie.facets.kind)===null||te===void 0?void 0:te.map(fe=>fe.value).sort())||[]}),[b]);return{loading:B,error:S,allKinds:F!=null?F:[]}}function ve(b,S,B){let F=b;return S&&(F=F.filter(ie=>S.some(te=>te.toLocaleLowerCase("en-US")===ie.toLocaleLowerCase("en-US")))),B&&!b.some(ie=>ie.toLocaleLowerCase("en-US")===B.toLocaleLowerCase("en-US"))&&(F=F.concat([B])),F.sort().reduce((ie,te)=>(ie[te.toLocaleLowerCase("en-US")]=te,ie),{})}function re(b){var S;const{filters:B,queryParameters:{kind:F},updateFilters:_}=$t(),ie=(0,$.useMemo)(()=>[F].flat()[0],[F]);var te;const[fe,Ce]=(0,$.useState)((te=ie!=null?ie:(S=B.kind)===null||S===void 0?void 0:S.value)!==null&&te!==void 0?te:b.initialFilter);(0,$.useEffect)(()=>{ie&&Ce(ie)},[ie]),(0,$.useEffect)(()=>{var Qe;if(!((Qe=B.kind)===null||Qe===void 0)&&Qe.value){var it;Ce((it=B.kind)===null||it===void 0?void 0:it.value)}},[B.kind]),(0,$.useEffect)(()=>{_({kind:fe?new $e(fe):void 0})},[fe,_]);const{allKinds:je,loading:me,error:ke}=Gn();return{loading:me,error:ke,allKinds:je!=null?je:[],selectedKind:fe,setSelectedKind:Ce}}const Pe=b=>{const{allowedKinds:S,hidden:B,initialFilter:F="component"}=b,_=(0,r.h_)(r.$v),{error:ie,allKinds:te,selectedKind:fe,setSelectedKind:Ce}=re({initialFilter:F});if((0,$.useEffect)(()=>{ie&&_.post({message:"Failed to load entity kinds",severity:"error"})},[ie,_]),ie)return null;const je=ve(te,S,fe),me=Object.keys(je).map(ke=>({value:ke,label:je[ke]}));return B?null:(0,a.jsx)(T.Z,{pb:1,pt:1,children:(0,a.jsx)(N.Ph,{label:"Kind",items:me,selected:fe.toLocaleLowerCase("en-US"),onChange:ke=>Ce(String(ke))})})};var Ie=t(79692),He=t(5806),ht=t(21324),Gt=t(86619),kt=t(19996),le=t(25505),W=t(38016),he=t(88013);const Ve=(0,Ie.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),ut=(0,a.jsx)(le.Z,{fontSize:"small"}),ze=(0,a.jsx)(kt.Z,{fontSize:"small"}),It=b=>{var S;const{initialFilter:B=[]}=b,F=Ve(),{updateFilters:_,backendEntities:ie,filters:te,queryParameters:{lifecycles:fe}}=$t(),Ce=(0,$.useMemo)(()=>[fe].flat().filter(Boolean),[fe]);var je;const[me,ke]=(0,$.useState)(Ce.length?Ce:(je=(S=te.lifecycles)===null||S===void 0?void 0:S.values)!==null&&je!==void 0?je:B);(0,$.useEffect)(()=>{Ce.length&&ke(Ce)},[Ce]);const Qe=(0,$.useMemo)(()=>[...new Set(ie.map(it=>{var nt;return(nt=it.spec)===null||nt===void 0?void 0:nt.lifecycle}).filter(Boolean))].sort(),[ie]);return(0,$.useEffect)(()=>{_({lifecycles:me.length&&Qe.length?new Lt(me):void 0})},[me,_,Qe]),Qe.length?(0,a.jsx)(T.Z,{pb:1,pt:1,children:(0,a.jsxs)(Q.Z,{variant:"button",component:"label",children:["Lifecycle",(0,a.jsx)(he.ZP,{multiple:!0,options:Qe,value:me,onChange:(it,nt)=>ke(nt),renderOption:(it,{selected:nt})=>(0,a.jsx)(He.Z,{control:(0,a.jsx)(ht.Z,{icon:ut,checkedIcon:ze,checked:nt}),label:it}),size:"small",popupIcon:(0,a.jsx)(W.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:it=>(0,a.jsx)(Gt.Z,{...it,className:F.input,variant:"outlined"})})]})}):null},Jt=(0,Ie.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),rn=(0,a.jsx)(le.Z,{fontSize:"small"}),on=(0,a.jsx)(kt.Z,{fontSize:"small"}),q=()=>{var b;const S=Jt(),{updateFilters:B,backendEntities:F,filters:_,queryParameters:{owners:ie}}=$t(),te=(0,$.useMemo)(()=>[ie].flat().filter(Boolean),[ie]);var fe;const[Ce,je]=(0,$.useState)(te.length?te:(fe=(b=_.owners)===null||b===void 0?void 0:b.values)!==null&&fe!==void 0?fe:[]);(0,$.useEffect)(()=>{te.length&&je(te)},[te]);const me=(0,$.useMemo)(()=>[...new Set(F.flatMap(ke=>(0,We.hF)(ke,R.S4).map(Qe=>Ye(Qe,{defaultKind:"group"}))).filter(Boolean))].sort(),[F]);return(0,$.useEffect)(()=>{B({owners:Ce.length&&me.length?new Nt(Ce):void 0})},[Ce,B,me]),me.length?(0,a.jsx)(T.Z,{pb:1,pt:1,children:(0,a.jsxs)(Q.Z,{variant:"button",component:"label",children:["Owner",(0,a.jsx)(he.ZP,{multiple:!0,options:me,value:Ce,onChange:(ke,Qe)=>je(Qe),renderOption:(ke,{selected:Qe})=>(0,a.jsx)(He.Z,{control:(0,a.jsx)(ht.Z,{icon:rn,checkedIcon:on,checked:Qe}),label:ke}),size:"small",popupIcon:(0,a.jsx)(W.Z,{"data-testid":"owner-picker-expand"}),renderInput:ke=>(0,a.jsx)(Gt.Z,{...ke,className:S.input,variant:"outlined"})})]})}):null},G=b=>{const S=useRouteRef(entityRouteRef);return _jsx(IconButton,{component:Link,"aria-label":"Show",title:"Show details",to:S(getCompoundEntityRef(b.entity)),children:_jsx(InfoIcon,{})})},m=b=>_jsx(IconButton,{component:Link,"aria-label":"Email",title:`Email ${b.email}`,to:`mailto:${b.email}`,children:_jsx(EmailIcon,{})}),C=b=>{var S;const B=(S=b.entity.spec.profile)===null||S===void 0?void 0:S.email;return B?_jsx(EmailCardAction,{email:B}):null},Z=b=>{var S;const B=(S=b.entity.spec.profile)===null||S===void 0?void 0:S.email;return B?_jsx(EmailCardAction,{email:B}):null},K=(0,Ie.Z)(()=>({popoverPaper:{width:"30em"},descriptionTypography:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"}})),ce=4,de=b=>{var S,B,F;const{entityRef:_,children:ie,delayTime:te=500}=b,fe=K(),Ce=useApiHolder(),je=usePopupState({variant:"popover",popupId:"entity-peek-ahead"}),[me,ke]=useState(!1),Qe=useMemo(()=>debounce(()=>ke(!0),te),[te]),[{loading:it,error:nt,value:Be},xt]=useAsyncFn(async()=>{const mn=Ce.get(catalogApiRef);if(mn){const _t=await mn.getEntityByRef(_);if(!_t)throw new Error(`${_} not found`);return _t}},[Ce,_]),Zt=()=>{ke(!1),Qe.cancel()};return useEffect(()=>{je.isOpen&&!Be&&!nt&&!it&&xt()},[je.isOpen,xt,Be,nt,it]),_jsxs(_Fragment,{children:[_jsx(Typography,{component:"span",onMouseEnter:Qe,children:_jsx(Typography,{component:"span","data-testid":"trigger",...bindHover(je),children:ie})}),me&&_jsx(HoverPopover,{PaperProps:{className:fe.popoverPaper},...bindPopover(je),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},onMouseLeave:Zt,children:_jsxs(Card,{children:[_jsxs(CardContent,{children:[nt&&_jsx(ResponseErrorPanel,{error:nt}),it&&_jsx(Progress,{}),Be&&_jsxs(_Fragment,{children:[_jsx(Typography,{color:"textSecondary",children:Be.metadata.namespace}),_jsx(Typography,{variant:"h5",component:"div",children:Be.metadata.name}),_jsx(Typography,{color:"textSecondary",gutterBottom:!0,children:Be.kind}),Be.metadata.description&&_jsx(Typography,{className:fe.descriptionTypography,paragraph:!0,children:Be.metadata.description}),_jsx(Typography,{children:(S=Be.spec)===null||S===void 0?void 0:S.type}),_jsxs(Box,{marginTop:"0.5em",children:[(Be.metadata.tags||[]).slice(0,ce).map(mn=>_jsx(Chip,{size:"small",label:mn},mn)),((B=Be.metadata.tags)===null||B===void 0?void 0:B.length)&&((F=Be.metadata.tags)===null||F===void 0?void 0:F.length)>ce&&_jsx(Tooltip,{title:"Drill into the entity to see all of the tags.",children:_jsx(Chip,{size:"small",label:"..."},"other-tags")})]})]})]}),!nt&&Be&&_jsx(CardActions,{children:_jsxs(_Fragment,{children:[isUserEntity(Be)&&_jsx(UserCardActions,{entity:Be}),isGroupEntity(Be)&&_jsx(GroupCardActions,{entity:Be}),_jsx(EntityCardActions,{entity:Be})]})})]})})]})},Re=(0,Ie.Z)(b=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),st=()=>{var b;const S=Re(),{filters:B,updateFilters:F}=useEntityList();var _;const[ie,te]=useState((_=(b=B.text)===null||b===void 0?void 0:b.value)!==null&&_!==void 0?_:"");return useDebounce(()=>{F({text:ie.length?new EntityTextFilter(ie):void 0})},250,[ie,F]),_jsx(Toolbar,{className:S.searchToolbar,children:_jsx(FormControl,{children:_jsx(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:S.input,placeholder:"Search",autoComplete:"off",onChange:fe=>te(fe.target.value),value:ie,startAdornment:_jsx(InputAdornment,{position:"start",children:_jsx(Search,{})}),endAdornment:_jsx(InputAdornment,{position:"end",children:_jsx(IconButton,{"aria-label":"clear search",onClick:()=>te(""),edge:"end",disabled:ie.length===0,children:_jsx(Clear,{})})})})})})},Ge=Object.freeze({createEntityRefColumn(b){const{defaultKind:S}=b;function B(F){var _;return((_=F.metadata)===null||_===void 0?void 0:_.title)||Ye(F,{defaultKind:S})}return{title:"Name",highlight:!0,customFilterAndSearch(F,_){return B(_).includes(F)},customSort(F,_){return B(F).localeCompare(B(_))},render:F=>{var _;return(0,a.jsx)(Me,{entityRef:F,defaultKind:S,title:(_=F.metadata)===null||_===void 0?void 0:_.title})}}},createEntityRelationColumn(b){const{title:S,relation:B,defaultKind:F,filter:_}=b;function ie(fe){return(0,We.hF)(fe,B,_)}function te(fe){return ie(fe).map(Ce=>Ye(Ce,{defaultKind:F})).join(", ")}return{title:S,customFilterAndSearch(fe,Ce){return te(Ce).includes(fe)},customSort(fe,Ce){return te(fe).localeCompare(te(Ce))},render:fe=>(0,a.jsx)(ot,{entityRefs:ie(fe),defaultKind:F})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:R.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:R.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:R.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:b=>(0,a.jsx)(N.Or,{text:b.metadata.description,placement:"bottom-start",line:2})}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),mt=[Ge.createEntityRefColumn({defaultKind:"system"}),Ge.createDomainColumn(),Ge.createOwnerColumn(),Ge.createMetadataDescriptionColumn()],Et=[Ge.createEntityRefColumn({defaultKind:"component"}),Ge.createSystemColumn(),Ge.createOwnerColumn(),Ge.createSpecTypeColumn(),Ge.createSpecLifecycleColumn(),Ge.createMetadataDescriptionColumn()],et=(0,Ie.Z)(b=>({empty:{padding:b.spacing(2),display:"flex",justifyContent:"center"}})),Ze=b=>{const{entities:S,title:B,emptyContent:F,variant:_="gridItem",columns:ie}=b,te=et(),fe={minWidth:"0",width:"100%"};return _==="gridItem"&&(fe.height="calc(100% - 10px)"),(0,a.jsx)(N.iA,{columns:ie,title:B,style:fe,emptyContent:F&&(0,a.jsx)("div",{className:te.empty,children:F}),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense",draggable:!1},data:S})};Ze.columns=Ge,Ze.systemEntityColumns=mt,Ze.componentEntityColumns=Et;const pt=(0,a.jsx)(le.Z,{fontSize:"small"}),At=(0,a.jsx)(kt.Z,{fontSize:"small"});function Vt({selected:b}){return(0,a.jsx)(ht.Z,{icon:pt,checkedIcon:At,checked:b})}const Dt=(0,$.memo)(b=>{const{selected:S,value:B,availableOptions:F,showCounts:_}=b,ie=_?`${B} (${F==null?void 0:F[B]})`:B;return(0,a.jsx)(He.Z,{control:(0,a.jsx)(Vt,{selected:S}),label:ie})});var Mt=t(72779),Ht=t.n(Mt);const Rt=(0,Ie.Z)({input:{}},{name:"CatalogReactEntityAutocompletePickerInput"});function tt(b){const S=Rt();return(0,a.jsx)(Gt.Z,{variant:"outlined",...b,className:Ht()(S.input,b.className)})}function Xe(b){var S;const{label:B,name:F,path:_,showCounts:ie,Filter:te,InputProps:fe}=b,{updateFilters:Ce,filters:je,queryParameters:{[F]:me}}=$t(),ke=(0,r.h_)(M),{value:Qe}=(0,at.default)(async()=>{var _t;const Tn=_,{facets:vn}=await ke.getEntityFacets({facets:[Tn],filter:(_t=je.kind)===null||_t===void 0?void 0:_t.getCatalogFilters()});return Object.fromEntries(vn[Tn].map(({value:jn,count:En})=>[jn,En]))},[je.kind]),it=(0,$.useMemo)(()=>[me].flat().filter(Boolean),[me]);var nt;const[Be,xt]=(0,$.useState)(it.length?it:(nt=(S=je[F])===null||S===void 0?void 0:S.values)!==null&&nt!==void 0?nt:[]);(0,$.useEffect)(()=>{it.length&&!Je().isEqual(Be,it)&&xt(it)},[Be,it]);const Zt=Object.keys(Qe!=null?Qe:{}),mn=Be.length&&Zt.length;return(0,$.useEffect)(()=>{Ce({[F]:mn?new te(Be):void 0})},[F,mn,Be,te,Ce]),je[F]&&!("values"in je[F])||!Zt.length?null:(0,a.jsx)(T.Z,{pb:1,pt:1,children:(0,a.jsxs)(Q.Z,{variant:"button",component:"label",children:[B,(0,a.jsx)(he.ZP,{multiple:!0,options:Zt,value:Be,onChange:(_t,Tn)=>xt(Tn),renderOption:(_t,{selected:Tn})=>(0,a.jsx)(Dt,{selected:Tn,value:_t,availableOptions:Qe,showCounts:!!ie}),size:"small",popupIcon:(0,a.jsx)(W.Z,{"data-testid":`${String(F)}-picker-expand`}),renderInput:_t=>(0,a.jsx)(tt,{..._t,...fe})})]})})}const Kt=(0,Ie.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),fn=b=>{const S=Kt();return(0,a.jsx)(Xe,{label:"Tags",name:"tags",path:"metadata.tags",Filter:gt,showCounts:b.showCounts,InputProps:{className:S.input}})},an=b=>{const{hidden:S,initialFilter:B}=b,F=(0,r.h_)(r.$v),{error:_,availableTypes:ie,selectedTypes:te,setSelectedTypes:fe}=Un();if((0,$.useEffect)(()=>{_&&F.post({message:"Failed to load entity types",severity:"error"}),B&&fe([B])},[_,F,B,fe]),ie.length===0||_)return null;const Ce=[{value:"all",label:"all"},...ie.map(me=>({value:me,label:me}))];var je;return S?null:(0,a.jsx)(T.Z,{pb:1,pt:1,children:(0,a.jsx)(N.Ph,{label:"Type",items:Ce,selected:(je=Ce.length>1?te[0]:void 0)!==null&&je!==void 0?je:"all",onChange:me=>fe(me==="all"?[]:[String(me)])})})};var zn=t(15459),Qn=t(61837),gn=t(11640),Kn=t(28347);const pr=(0,zn.Z)({root:{color:"#f3ba37"}})(gn.Z),w=b=>{const{toggleStarredEntity:S,isStarredEntity:B}=kn(b.entity);return(0,a.jsx)(Qn.Z,{"aria-label":"favorite",color:"inherit",...b,onClick:()=>S(),children:(0,a.jsx)(dt.ZP,{title:B?"Remove from favorites":"Add to favorites",children:B?(0,a.jsx)(pr,{}):(0,a.jsx)(Kn.Z,{})})})};var d=t(8629),x=t(79249),A=t(38724),X=t(99152),pe=t(6487),xe=t(49429),be=t(55999),ft=t(39412);const Ft=ft.Z;function cn(b,S){if(b)return b.toLocaleLowerCase("en-US");if(S)try{return(0,R.of)(S).kind.toLocaleLowerCase("en-US")}catch{return}}function Wn(b,S){const B=(0,r.qD)(),F=cn(b,S);return F&&B.getSystemIcon(`kind:${F}`)||Ft}function rr(b){const{kind:S,entityRef:B,...F}=b,_=Wn(S,B);return(0,a.jsx)(_,{...F})}const Ir=(0,Ie.Z)(b=>({node:{fill:b.palette.grey[300],stroke:b.palette.grey[300],"&.primary":{fill:b.palette.primary.light,stroke:b.palette.primary.light},"&.secondary":{fill:b.palette.secondary.light,stroke:b.palette.secondary.light}},text:{fill:b.palette.getContrastText(b.palette.grey[300]),"&.primary":{fill:b.palette.primary.contrastText},"&.secondary":{fill:b.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function xo(b){const S=(0,r.h_)(M),B=(0,R.eE)(b),{loading:F,error:_,value:ie}=(0,at.default)(async()=>{const te=await S.getEntityAncestors({entityRef:B}),fe=new Array,Ce=new Array;for(const je of te.items){const me=(0,R.eE)(je.entity),ke=me===te.rootEntityRef;fe.push({id:me,root:ke,...je.entity});for(const Qe of je.parentEntityRefs)Ce.push({from:me,to:Qe})}return{nodes:fe,edges:Ce}},[B]);return{loading:F,error:_,nodes:(ie==null?void 0:ie.nodes)||[],edges:(ie==null?void 0:ie.edges)||[]}}function bo({node:b}){const S=Ir(),B=(0,Tt.s0)(),F=(0,r.tg)(Ae),[_,ie]=(0,$.useState)(0),[te,fe]=(0,$.useState)(0),Ce=(0,$.useRef)(null);(0,$.useLayoutEffect)(()=>{if(Ce.current){let{height:xt,width:Zt}=Ce.current.getBBox();xt=Math.round(xt),Zt=Math.round(Zt),(xt!==te||Zt!==_)&&(ie(Zt),fe(xt))}},[_,te]);const je=10,me=te,ke=me+je,Qe=ke+_+je*2,it=te+je*2,nt=b.metadata.title||(b.kind&&b.metadata.name&&b.metadata.namespace?Ye({kind:b.kind,name:b.metadata.name,namespace:b.metadata.namespace||""}):b.id),Be=()=>{B(F({kind:b.kind,namespace:b.metadata.namespace||R.zG,name:b.metadata.name}))};return(0,a.jsxs)("g",{onClick:Be,className:S.clickable,children:[(0,a.jsx)("rect",{className:Ht()(S.node,b.root?"secondary":"primary"),width:Qe,height:it,rx:10}),(0,a.jsx)(rr,{kind:b.kind,y:je,x:je,width:me,height:me,className:Ht()(S.text,b.root?"secondary":"primary")}),(0,a.jsx)("text",{ref:Ce,className:Ht()(S.text,b.root?"secondary":"primary"),y:it/2,x:ke+(_+je*2)/2,textAnchor:"middle",alignmentBaseline:"middle",children:nt})]})}function So(b){const{loading:S,error:B,nodes:F,edges:_}=xo(b.entity);return S?(0,a.jsx)(N.Ex,{}):B?(0,a.jsx)(N.Gk,{error:B}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(be.Z,{variant:"h2",children:"Ancestry"}),(0,a.jsxs)(be.Z,{gutterBottom:!0,children:["This is the ancestry of entities above the current one - as in, the chain(s) of entities down to the current one, where"," ",(0,a.jsx)(N.rU,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity",children:"processors emitted"})," ","child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations."]}),(0,a.jsx)(T.Z,{mt:4,children:(0,a.jsx)(N.mn,{nodes:F,edges:_,renderNode:bo,direction:N.NX.Nm.BOTTOM_TOP,zoom:"enable-on-click"})})]})}var or=t(11776),An=t(38402),fr=t(86136),gr=t(99688),eo=t(49378),mr=t(54506),Fr=t(94339),Co=t(24579),wo=t(27685);const to=(0,Ie.Z)(b=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:b.spacing(2)},helpIcon:{marginLeft:b.spacing(1),color:b.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function qn(b){const S=to();return(0,a.jsx)(eo.Z,{...b,primaryTypographyProps:{className:S.monospace},secondaryTypographyProps:{className:S.monospace}})}function Ur(b){const S=to();return(0,a.jsx)(mr.Z,{className:S.monospace,children:b.children})}function Rr(b){return(0,a.jsx)(T.Z,{mt:2,children:(0,a.jsx)(Fr.Z,{variant:"outlined",children:(0,a.jsxs)(Co.Z,{children:[(0,a.jsxs)(Q.Z,{variant:"h6",gutterBottom:!0,children:[b.title,b.helpLink&&(0,a.jsx)(zr,{to:b.helpLink})]}),b.children]})})})}function jo(b){if(b.match(/^url:https?:\/\//))return b.slice(4);if(b.match(/^https?:\/\//))return b}function Mr(b){const[S,B]=b.entry,F=jo(B);return(0,a.jsxs)(An.Z,{children:[b.indent&&(0,a.jsx)(fr.Z,{}),(0,a.jsx)(qn,{primary:S,secondary:F?(0,a.jsx)(N.rU,{to:F,children:B}):B})]})}function zr(b){const S=to();return(0,a.jsx)(N.rU,{to:b.to,className:S.helpIcon,children:(0,a.jsx)(wo.Z,{fontSize:"inherit"})})}const Wr=(0,Ie.Z)({root:{display:"flex",flexDirection:"column"}});function no(b){var S,B;const F=(0,r.h_)(M),_=(0,R.eE)(b),ie=(S=b.metadata.annotations)===null||S===void 0?void 0:S[R.P1],te=(B=b.metadata.annotations)===null||B===void 0?void 0:B[R.q1],{loading:fe,error:Ce,value:je}=(0,at.default)(async()=>!ie&&!te?[]:(await F.getEntities({filter:[...ie?[{[`metadata.annotations.${R.P1}`]:ie}]:[],...te?[{[`metadata.annotations.${R.q1}`]:te}]:[]]})).items,[ie,te]);return{loading:fe,error:Ce,location:ie,originLocation:te,colocatedEntities:je==null?void 0:je.filter(me=>(0,R.eE)(me)!==_)}}function er(b){return(0,a.jsxs)(or.Z,{dense:!0,children:[b.header&&(0,a.jsx)(Mr,{entry:b.header},"header"),b.entities.map(S=>(0,a.jsxs)(An.Z,{children:[(0,a.jsx)(fr.Z,{children:(0,a.jsx)(rr,{kind:S.kind})}),(0,a.jsx)(qn,{primary:(0,a.jsx)(Me,{entityRef:S})})]},(0,R.eE)(S)))]})}function Eo(b){const{entity:S}=b,{loading:B,error:F,location:_,originLocation:ie,colocatedEntities:te}=no(S);if(B)return(0,a.jsx)(N.Ex,{});if(F)return(0,a.jsx)(N.Gk,{error:F});if(!_&&!ie)return(0,a.jsx)(gr.Z,{severity:"warning",children:"Entity had no location information."});if(!(te!=null&&te.length))return(0,a.jsx)(gr.Z,{severity:"info",children:"There were no other entities on this location."});if(_===ie)return(0,a.jsx)(er,{entities:te});const fe=te.filter(je=>{var me;return((me=je.metadata.annotations)===null||me===void 0?void 0:me[R.P1])===_}),Ce=te.filter(je=>{var me;return((me=je.metadata.annotations)===null||me===void 0?void 0:me[R.q1])===ie});return(0,a.jsxs)(a.Fragment,{children:[fe.length>0&&(0,a.jsx)(er,{entities:fe,header:["At the same location",_]}),Ce.length>0&&(0,a.jsx)(er,{entities:Ce,header:["At the same origin",ie]})]})}function Ao(b){const S=Wr();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(be.Z,{variant:"h2",children:"Colocated"}),(0,a.jsx)(be.Z,{children:"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)."}),(0,a.jsx)("div",{className:S.root,children:(0,a.jsx)(Eo,{entity:b.entity})})]})}function Vr(b){return Object.fromEntries([...Object.entries(b)].sort((S,B)=>S[0]<B[0]?-1:1))}function ro(b){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(be.Z,{variant:"h2",children:"Entity as JSON"}),(0,a.jsx)(be.Z,{children:"This is the raw entity data as received from the catalog, on JSON form."}),(0,a.jsx)(be.Z,{children:(0,a.jsx)("div",{style:{fontSize:"75%"},"data-testid":"code-snippet",children:(0,a.jsx)(N.Oi,{text:JSON.stringify(Vr(b.entity),void 0,2),language:"json",showCopyCodeButton:!0})})})]})}var _o=t(3440),xr=t.n(_o);const To=(0,Ie.Z)({root:{display:"flex",flexDirection:"column"}});function Io(b){var S,B;const F=To(),{apiVersion:_,kind:ie,metadata:te,spec:fe,relations:Ce=[],status:je={}}=b.entity,me=xr()(pn()(Ce,ke=>ke.targetRef),"type");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(be.Z,{variant:"h2",children:"Overview"}),(0,a.jsxs)("div",{className:F.root,children:[(0,a.jsx)(Rr,{title:"Identity",children:(0,a.jsxs)(or.Z,{dense:!0,children:[(0,a.jsx)(An.Z,{children:(0,a.jsx)(qn,{primary:"apiVersion",secondary:_})}),(0,a.jsx)(An.Z,{children:(0,a.jsx)(qn,{primary:"kind",secondary:ie})}),(fe==null?void 0:fe.type)&&(0,a.jsx)(An.Z,{children:(0,a.jsx)(qn,{primary:"spec.type",secondary:fe.type})}),te.uid&&(0,a.jsx)(An.Z,{children:(0,a.jsx)(qn,{primary:"uid",secondary:te.uid})}),te.etag&&(0,a.jsx)(An.Z,{children:(0,a.jsx)(qn,{primary:"etag",secondary:te.etag})})]})}),(0,a.jsxs)(Rr,{title:"Metadata",children:[!!Object.keys(te.annotations||{}).length&&(0,a.jsx)(or.Z,{dense:!0,subheader:(0,a.jsxs)(Ur,{children:["Annotations",(0,a.jsx)(zr,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"})]}),children:Object.entries(te.annotations).map(ke=>(0,a.jsx)(Mr,{indent:!0,entry:ke},ke[0]))}),!!Object.keys(te.labels||{}).length&&(0,a.jsx)(or.Z,{dense:!0,subheader:(0,a.jsx)(Ur,{children:"Labels"}),children:Object.entries(te.labels).map(ke=>(0,a.jsx)(Mr,{indent:!0,entry:ke},ke[0]))}),!!(!((S=te.tags)===null||S===void 0)&&S.length)&&(0,a.jsx)(or.Z,{dense:!0,subheader:(0,a.jsx)(Ur,{children:"Tags"}),children:te.tags.map((ke,Qe)=>(0,a.jsxs)(An.Z,{children:[(0,a.jsx)(fr.Z,{}),(0,a.jsx)(qn,{primary:ke})]},`${ke}-${Qe}`))})]}),!!Ce.length&&(0,a.jsx)(Rr,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations",children:Object.entries(me).map(([ke,Qe],it)=>(0,a.jsx)("div",{children:(0,a.jsx)(or.Z,{dense:!0,subheader:(0,a.jsx)(Ur,{children:ke}),children:Qe.map(nt=>(0,a.jsxs)(An.Z,{children:[(0,a.jsx)(fr.Z,{children:(0,a.jsx)(rr,{entityRef:nt.targetRef})}),(0,a.jsx)(qn,{primary:(0,a.jsx)(Me,{entityRef:nt.targetRef})})]},nt.targetRef))})},it))}),!!(!((B=je.items)===null||B===void 0)&&B.length)&&(0,a.jsx)(Rr,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses",children:je.items.map((ke,Qe)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)(Q.Z,{children:[ke.level,": ",ke.type]}),(0,a.jsx)(T.Z,{ml:2,children:ke.message})]},Qe))})]})]})}var Ro=t(72847);function Lo(b){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(be.Z,{variant:"h2",children:"Entity as YAML"}),(0,a.jsx)(be.Z,{children:"This is the raw entity data as received from the catalog, on YAML form."}),(0,a.jsx)(be.Z,{children:(0,a.jsx)("div",{style:{fontSize:"75%"},"data-testid":"code-snippet",children:(0,a.jsx)(N.Oi,{text:Ro.ZP.stringify(Vr(b.entity)),language:"yaml",showCopyCodeButton:!0})})})]})}const Lr=(0,Ie.Z)(b=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:b.palette.background.paper},tabs:{borderRight:`1px solid ${b.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function br(b){const{children:S,value:B,index:F,..._}=b,ie=Lr();return(0,a.jsx)("div",{role:"tabpanel",hidden:B!==F,id:`vertical-tabpanel-${F}`,"aria-labelledby":`vertical-tab-${F}`,className:ie.tabContents,..._,children:B===F&&(0,a.jsx)(T.Z,{pl:3,pr:3,children:S})})}function Sr(b){return{id:`vertical-tab-${b}`,"aria-controls":`vertical-tabpanel-${b}`}}function oo(b){const S=Lr(),[B,F]=$.useState(0);return(0,$.useEffect)(()=>{F(0)},[b.open]),b.entity?(0,a.jsxs)(d.Z,{fullWidth:!0,maxWidth:"xl",open:b.open,onClose:b.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:S.fullHeightDialog},children:[(0,a.jsx)(x.Z,{id:"entity-inspector-dialog-title",children:"Entity Inspector"}),(0,a.jsx)(A.Z,{dividers:!0,children:(0,a.jsxs)("div",{className:S.root,children:[(0,a.jsxs)(X.Z,{orientation:"vertical",variant:"scrollable",value:B,onChange:(_,ie)=>F(ie),"aria-label":"Inspector options",className:S.tabs,children:[(0,a.jsx)(pe.Z,{label:"Overview",...Sr(0)}),(0,a.jsx)(pe.Z,{label:"Ancestry",...Sr(1)}),(0,a.jsx)(pe.Z,{label:"Colocated",...Sr(2)}),(0,a.jsx)(pe.Z,{label:"Raw JSON",...Sr(3)}),(0,a.jsx)(pe.Z,{label:"Raw YAML",...Sr(4)})]}),(0,a.jsx)(br,{value:B,index:0,children:(0,a.jsx)(Io,{entity:b.entity})}),(0,a.jsx)(br,{value:B,index:1,children:(0,a.jsx)(So,{entity:b.entity})}),(0,a.jsx)(br,{value:B,index:2,children:(0,a.jsx)(Ao,{entity:b.entity})}),(0,a.jsx)(br,{value:B,index:3,children:(0,a.jsx)(ro,{entity:b.entity})}),(0,a.jsx)(br,{value:B,index:4,children:(0,a.jsx)(Lo,{entity:b.entity})})]})}),(0,a.jsx)(xe.Z,{children:(0,a.jsx)(H.Z,{onClick:b.onClose,color:"primary",children:"Close"})})]}):null}var Po=t(85256);function so(b){var S;const B=(0,r.h_)(M),F=(S=b.metadata.annotations)===null||S===void 0?void 0:S[R.q1],_=b.metadata.uid,ie=F==="bootstrap:bootstrap",te=(0,at.default)(async()=>{const nt=B.getLocationByRef(F);let Be;if(!F)Be=Promise.resolve([]);else{const xt=`metadata.annotations.${R.q1}`;Be=B.getEntities({filter:{[xt]:F},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(Zt=>Zt.items)}return Promise.all([nt,Be]).then(([xt,Zt])=>({location:xt,colocatedEntities:Zt}))},[B,b]),fe=(0,$.useCallback)(async function(){const{location:Be}=te.value;await B.removeLocationById(Be.id)},[B,te]),Ce=(0,$.useCallback)(async function(){await B.removeEntityByUid(_)},[B,_]);if(ie)return{type:"bootstrap",location:F,deleteEntity:Ce};const{loading:je,error:me,value:ke}=te;if(je)return{type:"loading"};if(me)return{type:"error",error:me};const{location:Qe,colocatedEntities:it}=ke;return Qe?{type:"unregister",location:F,colocatedEntities:it.map(R.iB),unregisterLocation:fe,deleteEntity:Ce}:{type:"only-delete",deleteEntity:Ce}}var On=t(23054);const es=(0,Ie.Z)({advancedButton:{fontSize:"0.7em"},dialogActions:{display:"inline-block"}}),io=({entity:b,onConfirm:S,onClose:B})=>{const F=(0,r.h_)(r.$v),_=(0,r.h_)(r.Ds),ie=es(),te=so(b),[fe,Ce]=(0,$.useState)(!1),[je,me]=(0,$.useState)(!1);var ke;const Qe=(ke=_.getOptionalString("app.title"))!==null&&ke!==void 0?ke:"Backstage",it=(0,$.useCallback)(async function(){if("unregisterLocation"in te){me(!0);try{await te.unregisterLocation(),S()}catch(Zt){(0,On.BD)(Zt),F.post({message:Zt.message})}finally{me(!1)}}},[F,S,te]),nt=(0,$.useCallback)(async function(){if("deleteEntity"in te){me(!0);try{await te.deleteEntity(),S()}catch(Zt){(0,On.BD)(Zt),F.post({message:Zt.message})}finally{me(!1)}}},[F,S,te]),Be=()=>(0,a.jsx)(xe.Z,{className:ie.dialogActions,children:(0,a.jsx)(H.Z,{onClick:B,color:"primary",children:"Cancel"})});return te.type==="loading"?(0,a.jsx)(N.Ex,{}):te.type==="error"?(0,a.jsx)(N.Gk,{error:te.error}):te.type==="bootstrap"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(gr.Z,{severity:"info",children:['You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',te.location,'"). If you believe this is in error, please contact the ',Qe," ","integrator."]}),(0,a.jsxs)(T.Z,{marginTop:2,children:[!fe&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(H.Z,{variant:"text",size:"small",color:"primary",className:ie.advancedButton,onClick:()=>Ce(!0),children:"Advanced Options"}),(0,a.jsx)(Be,{})]}),fe&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(be.Z,{children:"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."}),(0,a.jsx)(H.Z,{variant:"contained",color:"secondary",disabled:je,onClick:nt,children:"Delete Entity"}),(0,a.jsx)(Be,{})]})]})]}):te.type==="only-delete"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(be.Z,{children:"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog."}),(0,a.jsx)(H.Z,{variant:"contained",color:"secondary",disabled:je,onClick:nt,children:"Delete Entity"}),(0,a.jsx)(Be,{})]}):te.type==="unregister"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(be.Z,{children:"This action will unregister the following entities:"}),(0,a.jsx)(be.Z,{component:"ul",children:te.colocatedEntities.map(xt=>(0,a.jsx)("li",{children:(0,a.jsx)(Me,{entityRef:xt})},`${xt.kind}:${xt.namespace}/${xt.name}`))}),(0,a.jsx)(be.Z,{children:"Located at the following location:"}),(0,a.jsx)(be.Z,{component:"ul",children:(0,a.jsx)("li",{children:te.location})}),(0,a.jsxs)(be.Z,{children:["To undo, just re-register the entity in ",Qe,"."]}),(0,a.jsxs)(T.Z,{marginTop:2,children:[(0,a.jsx)(H.Z,{variant:"contained",color:"secondary",disabled:je,onClick:it,children:"Unregister Location"}),!fe&&(0,a.jsx)(T.Z,{component:"span",marginLeft:2,children:(0,a.jsx)(H.Z,{variant:"text",size:"small",color:"primary",className:ie.advancedButton,onClick:()=>Ce(!0),children:"Advanced Options"})})]}),fe&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(T.Z,{paddingTop:4,paddingBottom:4,children:(0,a.jsx)(Po.Z,{})}),(0,a.jsx)(be.Z,{children:"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."}),(0,a.jsx)(H.Z,{variant:"contained",color:"secondary",disabled:je,onClick:nt,children:"Delete Entity"})]})]}):(0,a.jsx)(gr.Z,{severity:"error",children:"Internal error: Unknown state"})},Bn=b=>{const{open:S,onConfirm:B,onClose:F,entity:_}=b;return(0,a.jsxs)(d.Z,{open:S,onClose:F,children:[(0,a.jsx)(x.Z,{id:"responsive-dialog-title",children:"Are you sure you want to unregister this entity?"}),(0,a.jsx)(A.Z,{children:(0,a.jsx)(io,{entity:_,onConfirm:B,onClose:F})})]})};var ts=t(12231),ns=t(9520),rs=t(47603);const os=(0,Ie.Z)(b=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:b.spacing(1,0,1,0)},title:{margin:b.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:b.palette.text.primary},menuItem:{minHeight:b.spacing(6)},groupWrapper:{margin:b.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function sr(b){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:rs.Z},{id:"starred",label:"Starred",icon:gn.Z}]},{name:b!=null?b:"Company",items:[{id:"all",label:"All"}]}]}const ko=b=>{const{initialFilter:S,availableFilters:B}=b,F=os(),_=(0,r.h_)(r.Ds);var ie;const te=(ie=_.getOptionalString("organization.name"))!==null&&ie!==void 0?ie:"Company",{filters:fe,updateFilters:Ce,backendEntities:je,queryParameters:{kind:me,user:ke},loading:Qe}=$t(),it=["starred","all"],nt=sr(te).map(In=>({...In,items:In.items.filter(({id:$n})=>["group","user"].some(Cr=>Cr===me)?it.includes($n):!B||B.includes($n))})).filter(({items:In})=>!!In.length),{isStarredEntity:Be}=Cn(),{isOwnedEntity:xt,loading:Zt}=wn(),mn=Qe||Zt,_t=(0,$.useMemo)(()=>new Fe("owned",xt,Be),[xt,Be]),Tn=(0,$.useMemo)(()=>new Fe("starred",xt,Be),[xt,Be]),vn=(0,$.useMemo)(()=>[ke].flat()[0],[ke]),[jn,En]=(0,$.useState)(vn!=null?vn:S),vr=(0,$.useMemo)(()=>je.filter((0,We.Gz)((0,De.compact)(Object.values({...fe,user:void 0})))),[fe,je]),kr=(0,$.useMemo)(()=>({all:vr.length,starred:vr.filter(In=>Tn.filterEntity(In)).length,owned:vr.filter(In=>_t.filterEntity(In)).length}),[vr,Tn,_t]);(0,$.useEffect)(()=>{vn&&En(vn)},[vn]),(0,$.useEffect)(()=>{!mn&&jn&&jn!=="all"&&kr[jn]===0&&En("all")},[mn,kr,jn,En]),(0,$.useEffect)(()=>{Ce({user:jn?new Fe(jn,xt,Be):void 0})},[jn,xt,Be,Ce]);var lo;return(0,a.jsx)(Fr.Z,{className:F.root,children:nt.map(In=>(0,a.jsxs)($.Fragment,{children:[(0,a.jsx)(Q.Z,{variant:"subtitle2",component:"span",className:F.title,children:In.name}),(0,a.jsx)(Fr.Z,{className:F.groupWrapper,children:(0,a.jsx)(or.Z,{disablePadding:!0,dense:!0,role:"menu","aria-label":In.name,children:In.items.map($n=>{var Cr;return(0,a.jsxs)(ts.Z,{role:"none presentation",button:!0,divider:!0,onClick:()=>En($n.id),selected:$n.id===((Cr=fe.user)===null||Cr===void 0?void 0:Cr.value),className:F.menuItem,disabled:kr[$n.id]===0,"data-testid":`user-picker-${$n.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[$n.icon&&(0,a.jsx)(fr.Z,{className:F.listIcon,children:(0,a.jsx)($n.icon,{fontSize:"small"})}),(0,a.jsx)(eo.Z,{children:(0,a.jsxs)(Q.Z,{variant:"body1",children:[$n.label," "]})}),(0,a.jsx)(ns.Z,{children:(lo=kr[$n.id])!==null&&lo!==void 0?lo:"-"})]},$n.id)})})})]},In.name))})},Oo=(0,Ie.Z)({input:{}},{name:"CatalogReactEntityProcessingStatusPickerPicker"}),ao=(0,a.jsx)(le.Z,{fontSize:"small"}),Pr=(0,a.jsx)(kt.Z,{fontSize:"small"}),Hr=()=>{const b=Oo(),{updateFilters:S}=$t(),[B,F]=(0,$.useState)([]);function _(fe){S({orphan:fe?new ge(fe):void 0})}function ie(fe){S({error:fe?new Le(fe):void 0})}const te=["Is Orphan","Has Error"];return(0,a.jsx)(T.Z,{pb:1,pt:1,children:(0,a.jsxs)(Q.Z,{variant:"button",component:"label",children:["Processing Status",(0,a.jsx)(he.ZP,{multiple:!0,options:te,value:B,onChange:(fe,Ce)=>{F(Ce),_(Ce.includes("Is Orphan")),ie(Ce.includes("Has Error"))},renderOption:(fe,{selected:Ce})=>(0,a.jsx)(He.Z,{control:(0,a.jsx)(ht.Z,{icon:ao,checkedIcon:Pr,checked:Ce}),label:fe}),size:"small",popupIcon:(0,a.jsx)(W.Z,{"data-testid":"processing-status-picker-expand"}),renderInput:fe=>(0,a.jsx)(Gt.Z,{...fe,className:b.input,variant:"outlined"})})]})})};function ss({children:b,value:S}){var B;const[F,_]=useState((B=S==null?void 0:S.filters)!==null&&B!==void 0?B:{}),ie=useCallback(it=>{_(nt=>{const Be=typeof it=="function"?it(nt):it;return{...nt,...Be}})},[]),te=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]);var fe,Ce,je,me,ke;const Qe=useMemo(()=>({entities:(fe=S==null?void 0:S.entities)!==null&&fe!==void 0?fe:te.entities,backendEntities:(Ce=S==null?void 0:S.backendEntities)!==null&&Ce!==void 0?Ce:te.backendEntities,updateFilters:(je=S==null?void 0:S.updateFilters)!==null&&je!==void 0?je:ie,filters:F,loading:(me=S==null?void 0:S.loading)!==null&&me!==void 0?me:!1,queryParameters:(ke=S==null?void 0:S.queryParameters)!==null&&ke!==void 0?ke:te.queryParameters,error:S==null?void 0:S.error}),[S,te,F,ie]);return _jsx(EntityListContext.Provider,{value:Qe,children:b})}},75435:function(bt,Oe,t){"use strict";t.d(Oe,{h:function(){return r}});var h=t(25271);function r(M,P,g){var y;let a=(M==null||(y=M.relations)===null||y===void 0?void 0:y.filter($=>$.type===P).map($=>(0,h.of)($.targetRef)))||[];return g!=null&&g.kind&&(a=a.filter($=>$.kind.toLocaleLowerCase("en-US")===g.kind.toLocaleLowerCase("en-US"))),a}},49280:function(bt,Oe,t){"use strict";t.d(Oe,{hF:function(){return M.h},CV:function(){return g},wq:function(){return h},Gz:function(){return r}});function h(a){return a.reduce(($,Se)=>({...$,...Se.getCatalogFilters?Se.getCatalogFilters():{}}),{})}function r(a){return $=>a.every(Se=>!Se.filterEntity||Se.filterEntity($))}var M=t(75435),P=t(25271);function g(a,$){var Se;const J=(Se=a.metadata.annotations)===null||Se===void 0?void 0:Se[P.M6];if(J)try{const H=(0,P.Ou)(J),I=$.byUrl(H.target);return{locationTargetUrl:H.target,integrationType:I==null?void 0:I.type}}catch{return}}function y(a,$){const Se=new Set([...getEntityRelations(a,RELATION_MEMBER_OF,{kind:"group"}),...a?[getCompoundEntityRef(a)]:[]].map(stringifyEntityRef)),J=getEntityRelations($,RELATION_OWNED_BY).map(stringifyEntityRef);for(const H of J)if(Se.has(H))return!0;return!1}},33414:function(bt,Oe,t){"use strict";t.r(Oe),t.d(Oe,{AboutCard:function(){return at},AboutContent:function(){return dt},AboutField:function(){return oe}});var h=t(52322),r=t(25271),M=t(23196),P=t(60871),g=t(32838),y=t(40303),a=t(79692),$=t(94339),Se=t(32552),J=t(61837),H=t(85256),I=t(24579),T=t(52866),Q=t(30254),se=t(27604),ne=t(2784),k=t(19625),E=t(60905),z=t(7089),N=t(90436);const R=(0,a.Z)(rt=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:rt.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function oe(rt){const{label:ot,value:We,gridSizes:$e,children:St}=rt,gt=R(),Ct=(0,P.vJ)(St,Lt=>Lt.getElements()),Nt=Ct.length>0?Ct:(0,h.jsx)(N.Z,{variant:"body2",className:gt.value,children:We||"unknown"});return(0,h.jsxs)(E.Z,{item:!0,...$e,children:[(0,h.jsx)(N.Z,{variant:"h2",className:gt.label,children:ot}),Nt]})}var Ae=t(24851);const _e=(0,a.Z)({description:{wordBreak:"break-word"}});function Ye(rt,ot,We){if(ot==="url"||rt.includes("://"))return rt;const $e=We.type==="file"?`file://${We.target}`:We.target;return ot==="file"||We.type==="file"?new URL(rt,$e).href:$e}function dt(rt){var ot,We,$e,St,gt,Ct,Nt,Lt;const{entity:Fe}=rt,ge=_e(),Le=Fe.kind.toLocaleLowerCase("en-US")==="system",Te=Fe.kind.toLocaleLowerCase("en-US")==="resource",De=Fe.kind.toLocaleLowerCase("en-US")==="component",Je=Fe.kind.toLocaleLowerCase("en-US")==="api",Wt=Fe.kind.toLocaleLowerCase("en-US")==="template",vt=Fe.kind.toLocaleLowerCase("en-US")==="location",Tt=Fe.kind.toLocaleLowerCase("en-US")==="group",yt=(0,y.hF)(Fe,r.cz,{kind:"system"}),Pt=(0,y.hF)(Fe,r.cz,{kind:"component"}),Yt=(0,y.hF)(Fe,r.cz,{kind:"domain"}),sn=(0,y.hF)(Fe,r.S4);let hn;try{hn=(0,r.CV)(Fe)}catch{hn=void 0}return(0,h.jsxs)(E.Z,{container:!0,children:[(0,h.jsx)(oe,{label:"Description",gridSizes:{xs:12},children:(0,h.jsx)(M.SA,{className:ge.description,content:(Fe==null||(ot=Fe.metadata)===null||ot===void 0?void 0:ot.description)||"No description"})}),(0,h.jsx)(oe,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4},children:sn.length>0&&(0,h.jsx)(y.rI,{entityRefs:sn,defaultKind:"group"})}),(Le||Yt.length>0)&&(0,h.jsx)(oe,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4},children:Yt.length>0&&(0,h.jsx)(y.rI,{entityRefs:Yt,defaultKind:"domain"})}),(Je||De||Te||yt.length>0)&&(0,h.jsx)(oe,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4},children:yt.length>0&&(0,h.jsx)(y.rI,{entityRefs:yt,defaultKind:"system"})}),De&&Pt.length>0&&(0,h.jsx)(oe,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4},children:(0,h.jsx)(y.rI,{entityRefs:Pt,defaultKind:"component"})}),(Je||De||Te||Wt||Tt||vt||typeof(Fe==null||(We=Fe.spec)===null||We===void 0?void 0:We.type)=="string")&&(0,h.jsx)(oe,{label:"Type",value:Fe==null||($e=Fe.spec)===null||$e===void 0?void 0:$e.type,gridSizes:{xs:12,sm:6,lg:4}}),(Je||De||typeof(Fe==null||(St=Fe.spec)===null||St===void 0?void 0:St.lifecycle)=="string")&&(0,h.jsx)(oe,{label:"Lifecycle",value:Fe==null||(gt=Fe.spec)===null||gt===void 0?void 0:gt.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),(0,h.jsx)(oe,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4},children:((Fe==null||(Ct=Fe.metadata)===null||Ct===void 0?void 0:Ct.tags)||[]).map($t=>(0,h.jsx)(z.Z,{size:"small",label:$t},$t))}),vt&&((Fe==null||(Nt=Fe.spec)===null||Nt===void 0?void 0:Nt.targets)||(Fe==null||(Lt=Fe.spec)===null||Lt===void 0?void 0:Lt.target))&&(0,h.jsx)(oe,{label:"Targets",gridSizes:{xs:12},children:(0,h.jsx)(Ae.s,{cols:1,items:(Fe.spec.targets||[Fe.spec.target]).map($t=>$t).map($t=>{var xn;return{text:$t,href:Ye($t,(Fe==null||(xn=Fe.spec)===null||xn===void 0?void 0:xn.type)||"unknown",hn)}})})})]})}const Me=(0,a.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 at(rt){var ot,We,$e;const{variant:St}=rt,gt=Me(),{entity:Ct}=(0,y.X2)(),Nt=(0,P.h_)(g.q3),Lt=(0,P.h_)(y.Ah),Fe=(0,P.h_)(P.$v),ge=(0,P.h_)(P.VE),Le=(0,P.tg)(k.jU),Te=(0,y.CV)(Ct,Nt),De=(ot=Ct.metadata.annotations)===null||ot===void 0?void 0:ot[r.Tf],Je={label:"View Source",disabled:!Te,icon:(0,h.jsx)(g.nW,{type:Te==null?void 0:Te.integrationType}),href:Te==null?void 0:Te.locationTargetUrl},Wt={label:"View TechDocs",disabled:!(!((We=Ct.metadata.annotations)===null||We===void 0)&&We["backstage.io/techdocs-ref"])||!Le,icon:(0,h.jsx)(Q.Z,{}),href:Le&&Le({namespace:Ct.metadata.namespace||r.zG,kind:Ct.kind,name:Ct.metadata.name})};let vt="";St==="gridItem"?vt=gt.gridItemCard:St==="fullHeight"&&(vt=gt.fullHeightCard);let Tt="";St==="gridItem"?Tt=gt.gridItemCardContent:St==="fullHeight"&&(Tt=gt.fullHeightCardContent);const yt=($e=Ct.metadata.annotations)===null||$e===void 0?void 0:$e[r.P1],Pt=(yt==null?void 0:yt.startsWith("url:"))||(yt==null?void 0:yt.startsWith("file:")),Yt=(0,ne.useCallback)(async()=>{try{await Lt.refreshEntity((0,r.eE)(Ct)),Fe.post({message:"Refresh scheduled",severity:"info"})}catch(sn){ge.post(sn)}},[Lt,Fe,ge,Ct]);return(0,h.jsxs)($.Z,{className:vt,children:[(0,h.jsx)(Se.Z,{title:"About",action:(0,h.jsxs)(h.Fragment,{children:[Pt&&(0,h.jsx)(J.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Yt,children:(0,h.jsx)(T.Z,{})}),(0,h.jsx)(J.Z,{component:M.rU,"aria-label":"Edit",disabled:!De,title:"Edit Metadata",to:De!=null?De:"#",children:(0,h.jsx)(se.Z,{})})]}),subheader:(0,h.jsx)(M.M6,{links:[Je,Wt]})}),(0,h.jsx)(H.Z,{}),(0,h.jsx)(I.Z,{className:Tt,children:(0,h.jsx)(dt,{entity:Ct})})]})}},86359:function(bt,Oe,t){"use strict";t.d(Oe,{E:function(){return k}});var h=t(52322),r=t(25271),M=t(23196),P=t(40303),g=t(90436),y=t(15459),a=t(27604),$=t(2997),Se=t(11640),J=t(28347),H=t(76635),I=t(2784),T=t(7089);const Q=Object.freeze({createNameColumn(E){function z(N){var R;return((R=N.metadata)===null||R===void 0?void 0:R.title)||(0,P.$3)(N,{defaultKind:E==null?void 0:E.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:N},{entity:R}){return z(N).localeCompare(z(R))},render:({entity:N})=>{var R;return(0,h.jsx)(P.dx,{entityRef:N,defaultKind:(E==null?void 0:E.defaultKind)||"Component",title:(R=N.metadata)===null||R===void 0?void 0:R.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:E})=>(0,h.jsx)(P.rI,{entityRefs:E.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:E})=>(0,h.jsx)(P.rI,{entityRefs:E.ownedByRelations,defaultKind:"group"})}},createSpecTargetsColumn(){return{title:"Targets",field:"entity.spec.targets",render:({entity:E})=>{var z,N;return(0,h.jsx)(h.Fragment,{children:((E==null||(z=E.spec)===null||z===void 0?void 0:z.targets)||(E==null||(N=E.spec)===null||N===void 0?void 0:N.target))&&(0,h.jsx)(M.Or,{text:(E.spec.targets||[E.spec.target]).join(", "),placement:"bottom-start"})})}}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0,width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:E})=>(0,h.jsx)(M.Or,{text:E.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:E})=>(0,h.jsx)(h.Fragment,{children:E.metadata.tags&&E.metadata.tags.map(z=>(0,h.jsx)(T.Z,{label:z,size:"small",variant:"outlined",style:{marginBottom:"0px"}},z))}),width:"auto"}},createTitleColumn(E){return{title:"Title",field:"entity.metadata.title",hidden:E==null?void 0:E.hidden,searchable:!0}},createLabelColumn(E,z){return{title:(z==null?void 0:z.title)||"Label",field:"entity.metadata.labels",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:N})=>{var R;const oe=(R=N.metadata)===null||R===void 0?void 0:R.labels,Ae=oe&&oe[E]||(z==null?void 0:z.defaultValue);return(0,h.jsx)(h.Fragment,{children:Ae&&(0,h.jsx)(T.Z,{label:Ae,size:"small",variant:"outlined"},Ae)})},width:"auto"}}}),se=(0,y.Z)({root:{color:"#f3ba37"}})(Se.Z),ne=(E,z)=>{const N=R=>R.metadata.title||(0,P.$3)(R,{defaultKind:"Component"});return N(E).localeCompare(N(z))},k=E=>{var z,N;const{columns:R,actions:oe,tableOptions:Ae,subtitle:_e,emptyContent:Ye}=E,{isStarredEntity:dt,toggleStarredEntity:Me}=(0,P.CR)(),{loading:at,error:rt,entities:ot,filters:We}=(0,P.wp)(),$e=(0,I.useMemo)(()=>{var Le;return[Q.createTitleColumn({hidden:!0}),Q.createNameColumn({defaultKind:(Le=We.kind)===null||Le===void 0?void 0:Le.value}),...Te(),Q.createMetadataDescriptionColumn(),Q.createTagsColumn()];function Te(){var De;switch((De=We.kind)===null||De===void 0?void 0:De.value){case"user":return[];case"domain":case"system":return[Q.createOwnerColumn()];case"group":case"template":return[Q.createSpecTypeColumn()];case"location":return[Q.createSpecTypeColumn(),Q.createSpecTargetsColumn()];default:return[Q.createSystemColumn(),Q.createOwnerColumn(),Q.createSpecTypeColumn(),Q.createSpecLifecycleColumn()]}}},[(z=We.kind)===null||z===void 0?void 0:z.value]),St=We.type===void 0;var gt;const Ct=(0,H.capitalize)((gt=(N=We.user)===null||N===void 0?void 0:N.value)!==null&>!==void 0?gt:"all");if(rt)return(0,h.jsx)("div",{children:(0,h.jsx)(M.GB,{severity:"error",title:"Could not fetch catalog entities.",children:(0,h.jsx)(M.Oi,{language:"text",text:rt.toString()})})});const Nt=[({entity:Le})=>{var Te;const De=(Te=Le.metadata.annotations)===null||Te===void 0?void 0:Te[r.l2],Je="View";return{icon:()=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(g.Z,{variant:"srOnly",children:Je}),(0,h.jsx)($.Z,{fontSize:"small"})]}),tooltip:Je,disabled:!De,onClick:()=>{De&&window.open(De,"_blank")}}},({entity:Le})=>{var Te;const De=(Te=Le.metadata.annotations)===null||Te===void 0?void 0:Te[r.Tf],Je="Edit";return{icon:()=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(g.Z,{variant:"srOnly",children:Je}),(0,h.jsx)(a.Z,{fontSize:"small"})]}),tooltip:Je,disabled:!De,onClick:()=>{De&&window.open(De,"_blank")}}},({entity:Le})=>{const Te=dt(Le),De=Te?"Remove from favorites":"Add to favorites";return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(g.Z,{variant:"srOnly",children:De}),Te?(0,h.jsx)(se,{}):(0,h.jsx)(J.Z,{})]}),tooltip:De,onClick:()=>Me(Le)}}],Lt=ot.sort(ne).map(Le=>{const Te=(0,P.hF)(Le,r.cz,{kind:"system"}),De=(0,P.hF)(Le,r.S4);return{entity:Le,resolved:{name:(0,P.$3)(Le,{defaultKind:"Component"}),ownedByRelationsTitle:De.map(Je=>(0,P.$3)(Je,{defaultKind:"group"})).join(", "),ownedByRelations:De,partOfSystemRelationTitle:Te.map(Je=>(0,P.$3)(Je,{defaultKind:"system"})).join(", "),partOfSystemRelations:Te}}}),Fe=(R||$e).find(Le=>Le.title==="Type");Fe&&(Fe.hidden=!St);const ge=Lt.length>20;return(0,h.jsx)(M.iA,{isLoading:at,columns:R||$e,options:{paging:ge,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!at,padding:"dense",pageSizeOptions:[20,50,100],...Ae},title:`${Ct} (${ot.length})`,data:Lt,actions:oe||Nt,subtitle:_e,emptyContent:Ye})};k.columns=Q},85877:function(bt,Oe,t){"use strict";t.r(Oe),t.d(Oe,{EntityLabelsCard:function(){return I},hasLabels:function(){return T}});var h=t(52322),r=t(40303),M=t(2784),P=t(23196),g=t(79692),y=t(90436),a=t(77277);const $=`metadata:
|
|
34
|
-
name: example
|
|
35
|
-
labels:
|
|
36
|
-
javaVersion: 1.2.3`,Se=(0,g.Z)(Q=>({code:{borderRadius:6,margin:`${Q.spacing(2)}px 0px`,background:Q.palette.type==="dark"?"#444":"#fff"}}),{name:"PluginCatalogEntityLabelsEmptyState"});function J(){const Q=Se();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(y.Z,{variant:"body1",children:"No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:"}),(0,h.jsx)("div",{className:Q.code,children:(0,h.jsx)(P.Oi,{text:$,language:"yaml",showLineNumbers:!0,highlightedNumbers:[3,4,5,6],customStyle:{background:"inherit",fontSize:"115%"}})}),(0,h.jsx)(a.Z,{variant:"contained",color:"primary",target:"_blank",href:"https://backstage.io/docs/features/software-catalog/descriptor-format#labels-optional",children:"Read more"})]})}const H=(0,g.Z)(Q=>({key:{fontWeight:"bold"}})),I=Q=>{var se;const{variant:ne,title:k}=Q,{entity:E}=(0,r.X2)(),z=H(),N=[{render:oe=>(0,h.jsx)(y.Z,{className:z.key,variant:"body2",children:oe.key})},{field:"value"}],R=E==null||(se=E.metadata)===null||se===void 0?void 0:se.labels;return(0,h.jsx)(P.rJ,{title:k||"Labels",variant:ne,children:!R||Object.keys(R).length===0?(0,h.jsx)(J,{}):(0,h.jsx)(P.iA,{columns:N,data:Object.keys(R).map(oe=>({key:oe,value:R[oe]})),options:{search:!1,showTitle:!0,loadingType:"linear",header:!1,padding:"dense",pageSize:5,toolbar:!1,paging:Object.keys(R).length>5}})})};function T(Q){var se,ne;return!(Q==null||(se=Q.metadata)===null||se===void 0)&&se.labels?Object.keys(Q==null||(ne=Q.metadata)===null||ne===void 0?void 0:ne.labels).some(Boolean):!1}},24851:function(bt,Oe,t){"use strict";t.d(Oe,{s:function(){return se}});var h=t(52322),r=t(90348),M=t(11861),P=t(2784),g=t(79692),y=t(95544),a=t(90436),$=t(52160),Se=t(23196);const J=(0,g.Z)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function H(ne){const{href:k,text:E,Icon:z}=ne,N=J();return(0,h.jsxs)(y.Z,{display:"flex",children:[(0,h.jsx)(y.Z,{mr:1,className:N.svgIcon,children:(0,h.jsx)(a.Z,{component:"div",children:z?(0,h.jsx)(z,{}):(0,h.jsx)($.Z,{})})}),(0,h.jsx)(y.Z,{flexGrow:"1",children:(0,h.jsx)(Se.rU,{to:k,target:"_blank",rel:"noopener",children:E||k})})]})}var I=t(41156);const T={xs:1,sm:1,md:1,lg:2,xl:3};function Q(ne){const k=[(0,I.Z)(R=>R.breakpoints.up("xl"))?"xl":null,(0,I.Z)(R=>R.breakpoints.up("lg"))?"lg":null,(0,I.Z)(R=>R.breakpoints.up("md"))?"md":null,(0,I.Z)(R=>R.breakpoints.up("sm"))?"sm":null,(0,I.Z)(R=>R.breakpoints.up("xs"))?"xs":null];let E=1;if(typeof ne=="number")E=ne;else{var z;const R=(z=k.find(oe=>oe!==null))!==null&&z!==void 0?z:"xs";var N;E=(N=ne==null?void 0:ne[R])!==null&&N!==void 0?N:T[R]}return E}function se(ne){const{items:k,cols:E=void 0}=ne,z=Q(E);return(0,h.jsx)(r.Z,{rowHeight:"auto",cols:z,children:k.map(({text:N,href:R,Icon:oe},Ae)=>(0,h.jsx)(M.Z,{children:(0,h.jsx)(H,{href:R,text:N!=null?N:R,Icon:oe})},Ae))})}},19625:function(bt,Oe,t){"use strict";t.d(Oe,{_Z:function(){return P},jU:function(){return M},yw:function(){return r}});var h=t(60871);const r=(0,h.x8)({id:"create-component",optional:!0}),M=(0,h.x8)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),P=(0,h.NT)({id:"catalog"})},15096:function(bt,Oe,t){"use strict";t.d(Oe,{FA:function(){return Se},qO:function(){return gt},Nd:function(){return dt},E5:function(){return Jt},Rx:function(){return R}});var h=t(60871);const r=(0,h.T0)({id:"plugin.search.queryservice"});class M{query(){return Promise.resolve(this.mockedResults||{results:[]})}constructor(G){this.mockedResults=G}}var P=t(52322),g=t(2784),y=t(38402),a=t(79692);const $=(0,a.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),Se=({text:q,preTag:G,postTag:m})=>{const C=$(),Z=(0,g.useMemo)(()=>q.split(new RegExp(`(${G}.+?${m})`)),[m,G,q]);return(0,P.jsx)(P.Fragment,{children:Z.map((K,ce)=>K.includes(G)?(0,P.jsx)("mark",{className:C.highlight,children:K.replace(new RegExp(`${G}|${m}`,"g"),"")},ce):K)})};var J=t(48760),H=t(50581),I=t(61837),T=t(74603),Q=t(21853),se=t(33375),ne=t(76635),k=t(64279),E=t(1849),z=t(51837);const N=(0,z.CT)("search-context"),R=()=>{const q=(0,g.useContext)(N);if(!q)throw new Error("useSearch must be used within a SearchContextProvider");const G=q.atVersion(1);if(!G)throw new Error("No SearchContext v1 found");return G},oe=()=>(0,g.useContext)(N)!==void 0,Ae={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},_e=(q=Ae)=>{var G,m,C,Z;const K=(0,h.h_)(r),[ce,de]=(0,g.useState)(q.term),[Re,st]=(0,g.useState)(q.types),[Ge,mt]=(0,g.useState)(q.filters),[Et,et]=(0,g.useState)(q.pageLimit),[Ze,pt]=(0,g.useState)(q.pageCursor),At=(0,E.Z)(ce),Vt=(0,E.Z)(Ge),Dt=(0,k.default)(()=>K.query({term:ce,types:Re,filters:Ge,pageLimit:Et,pageCursor:Ze}),[ce,Re,Ge,Et,Ze]),Mt=!Dt.loading&&!Dt.error&&((G=Dt.value)===null||G===void 0?void 0:G.nextPageCursor),Ht=!Dt.loading&&!Dt.error&&((m=Dt.value)===null||m===void 0?void 0:m.previousPageCursor),Rt=(0,g.useCallback)(()=>{var Kt;pt((Kt=Dt.value)===null||Kt===void 0?void 0:Kt.nextPageCursor)},[(C=Dt.value)===null||C===void 0?void 0:C.nextPageCursor]),tt=(0,g.useCallback)(()=>{var Kt;pt((Kt=Dt.value)===null||Kt===void 0?void 0:Kt.previousPageCursor)},[(Z=Dt.value)===null||Z===void 0?void 0:Z.previousPageCursor]);return(0,g.useEffect)(()=>{At!==void 0&&ce!==At&&pt(void 0)},[ce,At,pt]),(0,g.useEffect)(()=>{Vt!==void 0&&!(0,ne.isEqual)(Ge,Vt)&&pt(void 0)},[Ge,Vt,pt]),{result:Dt,term:ce,setTerm:de,types:Re,setTypes:st,filters:Ge,setFilters:mt,pageLimit:Et,setPageLimit:et,pageCursor:Ze,setPageCursor:pt,fetchNextPage:Mt?Rt:void 0,fetchPreviousPage:Ht?tt:void 0}},Ye=q=>{const{initialState:G,children:m}=q,C=_e(G);return(0,P.jsx)(h.fC,{attributes:{searchTypes:C.types.sort().join(",")},children:(0,P.jsx)(N.Provider,{value:(0,z.EI)({1:C}),children:m})})},dt=q=>{const{initialState:G,inheritParentContextIfAvailable:m,children:C}=q;return oe()&&m?(0,P.jsx)(P.Fragment,{children:C}):(0,P.jsx)(Ye,{initialState:G,children:C})},Me=({children:q})=>{var G;const m=Ge=>(0,E.Z)(Ge)!==Ge,C=(0,h.z$)(),{term:Z,result:K}=R();var ce;const de=(ce=(G=K.value)===null||G===void 0?void 0:G.numberOfResults)!==null&&ce!==void 0?ce:void 0,st=m(K.loading)&&!K.loading;return(0,g.useEffect)(()=>{Z&&st&&C.captureEvent("search",Z,{value:de})},[C,Z,de,st]),(0,P.jsx)(P.Fragment,{children:q})};function at(q){return(0,g.forwardRef)((G,m)=>(0,P.jsx)(dt,{inheritParentContextIfAvailable:!0,children:(0,P.jsx)(q,{...G,ref:m})}))}const rt=at((0,g.forwardRef)((q,G)=>{const{onChange:m,onKeyDown:C=()=>{},onClear:Z=()=>{},onSubmit:K=()=>{},debounceTime:ce=200,clearButton:de=!0,fullWidth:Re=!0,value:st,placeholder:Ge,inputProps:mt={},endAdornment:Et,...et}=q,Ze=(0,h.h_)(h.Ds),[pt,At]=(0,g.useState)("");(0,g.useEffect)(()=>{At(Xe=>Xe!==st?String(st):Xe)},[st]),(0,J.Z)(()=>m(pt),ce,[pt]);const Vt=(0,g.useCallback)(Xe=>{At(Xe.target.value)},[At]),Dt=(0,g.useCallback)(Xe=>{C&&C(Xe),K&&Xe.key==="Enter"&&K()},[C,K]),Mt=(0,g.useCallback)(()=>{m(""),Z&&Z()},[m,Z]),Ht=Ge!=null?Ge:`Search in ${Ze.getOptionalString("app.title")||"Backstage"}`,Rt=(0,P.jsx)(H.Z,{position:"start",children:(0,P.jsx)(I.Z,{"aria-label":"Query",size:"small",disabled:!0,children:(0,P.jsx)(Q.Z,{})})}),tt=(0,P.jsx)(H.Z,{position:"end",children:(0,P.jsx)(I.Z,{"aria-label":"Clear",size:"small",onClick:Mt,children:(0,P.jsx)(se.Z,{})})});return(0,P.jsx)(Me,{children:(0,P.jsx)(T.Z,{"data-testid":"search-bar-next",ref:G,value:pt,placeholder:Ht,startAdornment:Rt,endAdornment:de?tt:Et,inputProps:{"aria-label":"Search",...mt},fullWidth:Re,onChange:Vt,onKeyDown:Dt,...et})})})),ot=at((0,g.forwardRef)((q,G)=>{const{value:m="",onChange:C,...Z}=q,{term:K,setTerm:ce}=R();(0,g.useEffect)(()=>{m&&ce(String(m))},[m,ce]);const de=(0,g.useCallback)(Re=>{C?C(Re):ce(Re)},[C,ce]);return(0,P.jsx)(h.fC,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,P.jsx)(rt,{...Z,ref:G,value:K,onChange:de})})}));var We=t(4614),$e=t(88013);const gt=(q=>G=>(0,P.jsx)(dt,{inheritParentContextIfAvailable:!0,children:(0,P.jsx)(q,{...G})}))(function(G){const{loading:m,value:C,onChange:Z=()=>{},options:K=[],getOptionLabel:ce=Mt=>String(Mt),inputPlaceholder:de,inputDebounceTime:Re,freeSolo:st=!0,fullWidth:Ge=!0,clearOnBlur:mt=!1,"data-testid":Et="search-autocomplete",...et}=G,{setTerm:Ze}=R(),pt=(0,g.useCallback)(Mt=>Mt?typeof Mt=="string"?Mt:ce(Mt):"",[ce]),At=(0,g.useMemo)(()=>pt(C),[C,pt]),Vt=(0,g.useCallback)((Mt,Ht,Rt,tt)=>{Ze(pt(Ht)),Z(Mt,Ht,Rt,tt)},[pt,Ze,Z]),Dt=(0,g.useCallback)(({InputProps:{ref:Mt,endAdornment:Ht},InputLabelProps:Rt,...tt})=>(0,P.jsx)(ot,{...tt,ref:Mt,clearButton:!1,value:At,placeholder:de,debounceTime:Re,endAdornment:m?(0,P.jsx)(We.Z,{"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20}):Ht}),[m,At,de,Re]);return(0,P.jsx)($e.ZP,{...et,"data-testid":Et,value:C,onChange:Vt,options:K,getOptionLabel:ce,renderInput:Dt,freeSolo:st,fullWidth:Ge,clearOnBlur:mt})}),Ct=({icon:q,primaryText:G,primaryTextTypographyProps:m,secondaryText:C,secondaryTextTypographyProps:Z,disableTextTypography:K})=>_jsxs(_Fragment,{children:[q?_jsx(ListItemIcon,{children:q}):null,_jsx(ListItemText,{primary:G,primaryTypographyProps:m,secondary:C,secondaryTypographyProps:Z,disableTypography:K})]});var Nt=t(42494),Lt=t(84899),Fe=t(5806),ge=t(21324),Le=t(56939),Te=t(73698),De=t(12231),Je=t(86619),Wt=t(7089),vt=t(69294);const Tt=(q,G,m=[],C=250)=>{const Z=(0,g.useRef)({}),K=q||(()=>Promise.resolve([])),[ce,de]=(0,vt.default)(K,[G],{loading:!0});if((0,J.Z)(()=>{Z.current[G]===void 0&&(Z.current[G]=de(G).then(st=>(Z.current[G]=st,st)))},C,[de,G]),m.length)return{loading:!1,value:m};const Re=Z.current[G];return Array.isArray(Re)?{loading:!1,value:Re}:ce},yt=(q,G)=>{const{setFilters:m}=R();(0,g.useEffect)(()=>{G&&[G].flat().length>0&&m(C=>({...C,[q]:G}))},[])},Pt=q=>{const{className:G,defaultValue:m,name:C,values:Z,valuesDebounceMs:K,label:ce,filterSelectedOptions:de,limitTags:Re,multiple:st}=q,[Ge,mt]=(0,g.useState)("");yt(C,m);const Et=typeof Z=="function"?Z:void 0,et=typeof Z=="function"?void 0:Z,{value:Ze,loading:pt}=Tt(Et,Ge,et,K),{filters:At,setFilters:Vt}=R(),Dt=At[C]||(st?[]:null),Mt=(tt,Xe)=>{Vt(Kt=>{const{[C]:fn,...an}=Kt;return Xe?{...an,[C]:Xe}:{...an}})},Ht=tt=>(0,P.jsx)(Je.Z,{...tt,name:"search",variant:"outlined",label:ce,fullWidth:!0}),Rt=(tt,Xe)=>tt.map((Kt,fn)=>(0,P.jsx)(Wt.Z,{label:Kt,color:"primary",...Xe({index:fn})}));return(0,P.jsx)($e.ZP,{filterSelectedOptions:de,limitTags:Re,multiple:st,className:G,id:`${st?"multi-":""}select-filter-${C}--select`,options:Ze||[],loading:pt,value:Dt,onChange:Mt,onInputChange:(tt,Xe)=>mt(Xe),renderInput:Ht,renderTags:Rt})},Yt=(0,a.Z)({label:{textTransform:"capitalize"}}),sn=q=>{const{className:G,defaultValue:m,label:C,name:Z,values:K=[],valuesDebounceMs:ce}=q,de=Yt(),{filters:Re,setFilters:st}=R();yt(Z,m);const Ge=typeof K=="function"?K:void 0,mt=typeof K=="function"?void 0:K,{value:Et=[],loading:et}=Tt(Ge,"",mt,ce),Ze=At=>{const{target:{value:Vt,checked:Dt}}=At;st(Mt=>{const{[Z]:Ht,...Rt}=Mt,tt=(Ht||[]).filter(Kt=>Kt!==Vt),Xe=Dt?[...tt,Vt]:tt;return Xe.length?{...Rt,[Z]:Xe}:Rt})};var pt;return(0,P.jsxs)(Nt.Z,{className:G,disabled:et,fullWidth:!0,"data-testid":"search-checkboxfilter-next",children:[C?(0,P.jsx)(Lt.Z,{className:de.label,children:C}):null,Et.map(At=>(0,P.jsx)(Fe.Z,{control:(0,P.jsx)(ge.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":At},value:At,name:At,onChange:Ze,checked:((pt=Re[Z])!==null&&pt!==void 0?pt:[]).includes(At)}),label:At},At))]})},hn=q=>{const{className:G,defaultValue:m,label:C,name:Z,values:K,valuesDebounceMs:ce}=q,de=Yt();yt(Z,m);const Re=typeof K=="function"?K:void 0,st=typeof K=="function"?void 0:K,{value:Ge=[],loading:mt}=Tt(Re,"",st,ce),{filters:Et,setFilters:et}=R(),Ze=pt=>{const{target:{value:At}}=pt;et(Vt=>{const{[Z]:Dt,...Mt}=Vt;return At?{...Mt,[Z]:At}:Mt})};return(0,P.jsxs)(Nt.Z,{disabled:mt,className:G,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next",children:[C?(0,P.jsx)(Le.Z,{className:de.label,margin:"dense",children:C}):null,(0,P.jsxs)(Te.Z,{variant:"outlined",value:Et[Z]||"",onChange:Ze,children:[(0,P.jsx)(De.Z,{value:"",children:(0,P.jsx)("em",{children:"All"})}),Ge.map(pt=>(0,P.jsx)(De.Z,{value:pt,children:pt},pt))]})]})},$t=({component:q,...G})=>(0,P.jsx)(q,{...G});$t.Checkbox=q=>(0,P.jsx)($t,{...q,component:sn}),$t.Select=q=>(0,P.jsx)($t,{...q,component:hn}),$t.Autocomplete=q=>(0,P.jsx)($t,{...q,component:Pt});var xn=t(48834).lW;const bn=q=>xn.from(q.toString(),"utf-8").toString("base64"),Rn=q=>q?Number(xn.from(q,"base64").toString("utf-8")):0,pn=q=>{const{total:G=-1,cursor:m,onCursorChange:C,limit:Z=25,limitLabel:K="Results per page:",limitText:ce=({from:et,to:Ze})=>G>0?`of ${G}`:`${et}-${Ze}`,limitOptions:de,onLimitChange:Re,...st}=q,Ge=useMemo(()=>Rn(m),[m]),mt=useCallback((et,Ze)=>{C==null||C(bn(Ze))},[C]),Et=useCallback(et=>{const Ze=et.target.value;Re==null||Re(parseInt(Ze,10))},[Re]);return _jsx(TablePagination,{...st,component:"div",count:G,page:Ge,onPageChange:mt,rowsPerPage:Z,labelRowsPerPage:K,labelDisplayedRows:ce,rowsPerPageOptions:de,onRowsPerPageChange:Et})},Un=q=>{const{pageLimit:G,setPageLimit:m,pageCursor:C,setPageCursor:Z}=useSearch();return _jsx(pn,{...q,limit:G,onLimitChange:m,cursor:C,onCursorChange:Z})};var Ln=t(23196);const Xn=q=>{const{children:G}=q,m=useSearch(),{result:C,...Z}=m;return G(C,Z)},ct=q=>{const{query:G,children:m}=q,C=useApi(searchApiRef),Z=useAsync(()=>{const{term:K="",types:ce=[],filters:de={},...Re}=G;return C.query({...Re,term:K,types:ce,filters:de})},[G]);return m(Z,G)},Pn=q=>{const{query:G,children:m}=q;return G?_jsx(ct,{query:G,children:m}):_jsx(Xn,{children:m})},Cn=q=>{const{query:G,children:m,noResultsComponent:C=_jsx(EmptyState,{missing:"data",title:"Sorry, no results were found"}),...Z}=q;return _jsx(Pn,{query:G,children:({loading:K,error:ce,value:de})=>K?_jsx(Progress,{}):ce?_jsx(ResponseErrorPanel,{title:"Error encountered while fetching search results",error:ce}):de!=null&&de.results.length?isFunction(m)?m(de):_jsx(SearchResultListItemExtensions,{...Z,results:de.results,children:m}):C})},ln=q=>_jsx(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchResult"},children:_jsx(Cn,{...q})}),kn=({result:q,highlight:G,icon:m,secondaryAction:C,lineClamp:Z=5})=>q?_jsxs(_Fragment,{children:[m&&_jsx(ListItemIcon,{children:m}),_jsx(ListItemText,{primaryTypographyProps:{variant:"h6"},primary:_jsx(Link,{noTrack:!0,to:q.location,children:G!=null&&G.fields.title?_jsx(HighlightedSearchResultText,{text:(G==null?void 0:G.fields.title)||"",preTag:(G==null?void 0:G.preTag)||"",postTag:(G==null?void 0:G.postTag)||""}):q.title}),secondary:_jsx(Typography,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:Z,overflow:"hidden"},children:G!=null&&G.fields.text?_jsx(HighlightedSearchResultText,{text:G.fields.text,preTag:G.preTag,postTag:G.postTag}):q.text})}),C&&_jsx(Box,{alignItems:"flex-end",children:C})]}):null,Mn=q=>_jsx(AnalyticsContext,{attributes:{pluginId:"search",extension:"DefaultResultListItem"},children:_jsx(kn,{...q})}),wn=q=>{const{error:G,loading:m,resultItems:C,renderResultItem:Z=Re=>_jsx(DefaultResultListItem,{result:Re.document},Re.document.location),disableRenderingWithNoResults:K,noResultsComponent:ce=K?null:_jsx(EmptyState,{missing:"data",title:"Sorry, no results were found"}),...de}=q;return m?_jsx(Progress,{}):G?_jsx(ResponseErrorPanel,{title:"Error encountered while fetching search results",error:G}):C!=null&&C.length?_jsx(List,{...de,children:C.map(Z)}):_jsx(_Fragment,{children:ce})},Gn=q=>{const{query:G,renderResultItem:m,children:C,...Z}=q,K=useSearchResultListItemExtensions(C);return _jsx(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchResultList"},children:_jsx(SearchResultState,{query:G,children:({loading:ce,error:de,value:Re})=>_jsx(wn,{...Z,error:de,loading:ce,resultItems:Re==null?void 0:Re.results,renderResultItem:m!=null?m:K})})})};var ve=t(19126);const re=(0,a.Z)(q=>({listSubheader:{display:"flex",alignItems:"center"},listSubheaderName:{marginLeft:q.spacing(1),textTransform:"uppercase"},listSubheaderChip:{color:q.palette.text.secondary,margin:q.spacing(0,0,0,1.5)},listSubheaderFilter:{display:"flex",color:q.palette.text.secondary,margin:q.spacing(0,0,0,1.5)},listSubheaderLink:{marginLeft:"auto",display:"flex",alignItems:"center"},listSubheaderLinkIcon:{fontSize:"inherit",marginLeft:q.spacing(.5)}})),Pe=q=>{const G=re(),{label:m,children:C,...Z}=q;return _jsx(Chip,{...Z,className:G.listSubheaderFilter,variant:"outlined",label:_jsxs(_Fragment,{children:[m,": ",C]})})},Ie=()=>null,He=(0,a.Z)(q=>({root:{fontSize:"inherit","&:focus":{outline:"none",background:q.palette.common.white},"&:not(:focus)":{cursor:"pointer",color:q.palette.primary.main,"&:hover":{textDecoration:"underline"}}}})),ht=q=>{const G=He(),{label:m,value:C="None",onChange:Z,onDelete:K}=q,ce=useCallback(de=>{Z(de.target.value)},[Z]);return _jsx(Pe,{label:m,onDelete:K,children:_jsx(Typography,{role:"textbox",component:"span",className:G.root,onChange:ce,contentEditable:!0,suppressContentEditableWarning:!0,children:C})})},Gt=(0,a.Z)(q=>({root:{fontSize:"inherit","&:not(:focus)":{cursor:"pointer",color:q.palette.primary.main,"&:hover":{textDecoration:"underline"}},"&:focus":{outline:"none"},"&>div:first-child":{padding:0}}})),kt=q=>{const G=Gt(),{label:m,value:C="none",onChange:Z,onDelete:K,children:ce}=q,de=useCallback(Re=>{Z(Re.target.value)},[Z]);return _jsx(Pe,{label:m,onDelete:K,children:_jsxs(Select,{className:G.root,value:C,onChange:de,input:_jsx(InputBase,{}),IconComponent:Ie,children:[_jsx(MenuItem,{value:"none",children:"None"}),ce]})})};function le(q){const G=re(),[m,C]=useState(null),{error:Z,loading:K,icon:ce,title:de,titleProps:Re={},link:st=_jsxs(_Fragment,{children:["See all",_jsx(ArrowRightIcon,{className:G.listSubheaderLinkIcon})]}),linkProps:Ge={},filterOptions:mt,renderFilterOption:Et=Xe=>_jsx(MenuItem,{value:String(Xe),children:Xe},String(Xe)),filterFields:et,renderFilterField:Ze,resultItems:pt,renderResultItem:At=Xe=>_jsx(DefaultResultListItem,{result:Xe.document},Xe.document.location),disableRenderingWithNoResults:Vt,noResultsComponent:Dt=Vt?null:_jsx(EmptyState,{missing:"data",title:"Sorry, no results were found"}),...Mt}=q,Ht=useCallback(Xe=>{C(Xe.currentTarget)},[]),Rt=useCallback(()=>{C(null)},[]);if(K)return _jsx(Progress,{});if(Z)return _jsx(ResponseErrorPanel,{title:"Error encountered while fetching search results",error:Z});if(!(pt!=null&&pt.length))return _jsx(_Fragment,{children:Dt});var tt;return _jsxs(List,{...Mt,children:[_jsxs(ListSubheader,{className:G.listSubheader,children:[ce,_jsx(Typography,{className:G.listSubheaderName,component:"strong",...Re,children:de}),mt?_jsx(Chip,{className:G.listSubheaderChip,component:"button",icon:_jsx(AddIcon,{}),variant:"outlined",label:"Add filter","aria-controls":"filters-menu","aria-haspopup":"true",onClick:Ht}):null,mt?_jsx(Menu,{id:"filters-menu",anchorEl:m,open:Boolean(m),onClose:Rt,onClick:Rt,keepMounted:!0,children:mt.map(Et)}):null,et==null?void 0:et.map(Xe=>(tt=Ze==null?void 0:Ze(Xe))!==null&&tt!==void 0?tt:null),_jsx(Link,{className:G.listSubheaderLink,to:"/search",...Ge,children:st})]}),pt.map(At)]})}function W(q){const{query:G,children:m,renderResultItem:C,linkProps:Z={},...K}=q,ce=useSearchResultListItemExtensions(m);return _jsx(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchResultGroup"},children:_jsx(SearchResultState,{query:G,children:({loading:de,error:Re,value:st},{term:Ge,types:mt,pageCursor:Et,filters:et={}})=>{const Ze=`/search?${qs.stringify({term:Ge,types:mt,filters:et,pageCursor:Et,query:Ge},{arrayFormat:"brackets"})}`;return _jsx(le,{...K,error:Re,loading:de,linkProps:{to:Ze,...Z},filterFields:Object.keys(et),resultItems:st==null?void 0:st.results,renderResultItem:C!=null?C:ce})}})})}const he=(0,a.Z)(q=>({root:{display:"flex",justifyContent:"space-between",gap:q.spacing(2),margin:q.spacing(2,0)}})),Ve=()=>{const{fetchNextPage:q,fetchPreviousPage:G}=useSearch(),m=he();return!q&&!G?_jsx(_Fragment,{}):_jsxs("nav",{"aria-label":"pagination navigation",className:m.root,children:[_jsx(Button,{"aria-label":"previous page",disabled:!G,onClick:G,startIcon:_jsx(ArrowBackIosIcon,{}),children:"Previous"}),_jsx(Button,{"aria-label":"next page",disabled:!q,onClick:q,endIcon:_jsx(ArrowForwardIosIcon,{}),children:"Next"})]})},ut="search.results.list.items.extensions.v1",ze=(q,G)=>{for(const m of q){if(!isValidElement(m))continue;const C=getComponentData(m,ut);if(C!=null&&C(G))return cloneElement(m,{rank:G.rank,highlight:G.highlight,result:G.document,...m.props})}return null},It=q=>{const{rank:G,result:m,noTrack:C,children:Z,alignItems:K="flex-start",...ce}=q,de=(0,h.z$)(),Re=(0,g.useCallback)(()=>{C||m&&de.captureEvent("discover",m.title,{attributes:{to:m.location},value:G})},[G,m,C,de]);return(0,P.jsx)(y.Z,{divider:!0,alignItems:K,onClickCapture:Re,...ce,children:Z})},Jt=q=>{const{name:G,component:m,predicate:C=()=>!0}=q;return(0,h.YO)({name:G,component:{lazy:()=>m().then(Z=>K=>(0,P.jsx)(It,{rank:K.rank,result:K.result,noTrack:K.noTrack,children:(0,g.createElement)(Z,K)}))},data:{[ut]:C}})},rn=q=>{const G=useElementFilter(q,m=>m.selectByComponentData({key:ut}).getElements(),[q]);return useCallback((m,C)=>{const Z=ze(G,m);return _jsx(Fragment,{children:Z!=null?Z:_jsx(It,{rank:m.rank,result:m.document,children:_jsx(DefaultResultListItem,{rank:m.rank,highlight:m.highlight,result:m.document})})},C)},[G])},on=q=>{const{results:G,children:m,...C}=q,Z=rn(m);return _jsx(List,{...C,children:G.map(Z)})}},61886:function(bt,Oe,t){"use strict";t.d(Oe,{Ox:function(){return ot},jM:function(){return g},Zz:function(){return y},oZ:function(){return Ye},DR:function(){return a},ZS:function(){return Ae},VA:function(){return St},KY:function(){return Se},gT:function(){return Q},Dl:function(){return se},ux:function(){return $e},$L:function(){return T},x1:function(){return _e}});var h=t(52322),r=t(2784),M=t(79635),P=t(60871);const g="techdocs.addons.addon.v1",y="techdocs.addons.wrapper.v1",a=()=>null;(0,P.R5)(a,y,!0);const $=ge=>`${g}.${ge.toLocaleLowerCase("en-US")}`;function Se(ge){const{name:Le,component:Te}=ge;return(0,P.YO)({name:Le,component:{sync:De=>(0,h.jsx)(Te,{...De})},data:{[g]:ge,[$(Le)]:!0}})}const J=(ge,Le)=>ge.selectByComponentData({key:Le}).getElements()[0],H=ge=>ge.selectByComponentData({key:y}).selectByComponentData({key:g}),I=ge=>ge.selectByComponentData({key:y}).findComponentData({key:g}),T=()=>{const ge=(0,M.pC)(),Le=(0,P.vJ)(ge,H),Te=(0,P.vJ)(ge,I),De=(0,r.useCallback)(vt=>{if(!Le||!vt)return null;const Tt=$(vt.name);var yt;return(yt=J(Le,Tt))!==null&&yt!==void 0?yt:null},[Le]),Je=(0,r.useCallback)(vt=>{const Tt=Te.find(yt=>yt.name===vt);return Tt?De(Tt):null},[Te,De]),Wt=(0,r.useCallback)(vt=>{const Tt=Te.filter(yt=>yt.location===vt);return Tt.length?Tt.map(De):null},[Te,De]);return{renderComponentByName:Je,renderComponentsByLocation:Wt}},Q=(0,P.T0)({id:"plugin.techdocs.service"}),se=(0,P.T0)({id:"plugin.techdocs.storageservice"});var ne=t(64279),k=t(25271),E=t(51837);function z(ge,Le){return Le.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(ge.kind=ge.kind.toLocaleLowerCase(),ge.name=ge.name.toLocaleLowerCase(),ge.namespace=ge.namespace.toLocaleLowerCase()),ge}const N=(ge,Le)=>(0,k.eE)(ge)===(0,k.eE)(Le),R={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},oe=(0,E.CT)("techdocs-reader-page-context"),Ae=(0,r.memo)(({entityRef:ge,children:Le})=>{const Te=(0,P.h_)(Q),De=(0,P.h_)(P.Ds),Je=(0,ne.default)(async()=>Te.getTechDocsMetadata(ge),[ge]),Wt=(0,ne.default)(async()=>Te.getEntityMetadata(ge),[ge]),[vt,Tt]=(0,r.useState)(R.title),[yt,Pt]=(0,r.useState)(R.subtitle),[Yt,sn]=(0,r.useState)(R.shadowRoot),hn={metadata:Je,entityRef:z(ge,De),entityMetadata:Wt,shadowRoot:Yt,setShadowRoot:sn,title:vt,setTitle:Tt,subtitle:yt,setSubtitle:Pt},$t=(0,E.EI)({1:hn});return(0,h.jsx)(P.fC,{attributes:{entityRef:(0,k.eE)(ge)},children:(0,h.jsx)(oe.Provider,{value:$t,children:Le instanceof Function?Le(hn):Le})})},(ge,Le)=>N(ge.entityRef,Le.entityRef)),_e=()=>{const ge=(0,r.useContext)(oe);if(ge===void 0)return R;const Le=ge.atVersion(1);if(Le===void 0)throw new Error("No context found for version 1.");return Le},Ye=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"});var dt=t(70882),Me=t(50236),at=t(19219),rt=t(23196);const ot="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",We=ge=>{(0,r.useEffect)(()=>{if(!ge)return()=>{};const Le=ge.querySelectorAll('head > link[rel="stylesheet"]');var Te;let De=(Te=Le==null?void 0:Le.length)!==null&&Te!==void 0?Te:0;const Je=new CustomEvent(ot);if(!De)return ge.dispatchEvent(Je),()=>{};const Wt=()=>{--De===0&&ge.dispatchEvent(Je)};return Le==null||Le.forEach(vt=>{vt.addEventListener("load",Wt)}),()=>{Le==null||Le.forEach(vt=>{vt.removeEventListener("load",Wt)})}},[ge])},$e=ge=>{const[Le,Te]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!ge)return()=>{};Te(!0);const De=ge.style;De.setProperty("opacity","0");const Je=()=>{Te(!1),De.setProperty("opacity","1")};return ge.addEventListener(ot,Je),()=>{ge.removeEventListener(ot,Je)}},[ge]),Le},St=({element:ge,onAppend:Le,children:Te})=>{const[De,Je]=(0,r.useState)((0,dt.Ue)({...(0,Me.Z)(),insertionPoint:void 0}));We(ge);const Wt=$e(ge),vt=(0,r.useCallback)(Tt=>{if(!ge||!Tt)return;Je((0,dt.Ue)({...(0,Me.Z)(),insertionPoint:ge.querySelector("head")||void 0}));let yt=Tt.shadowRoot;yt||(yt=Tt.attachShadow({mode:"open"})),yt.replaceChildren(ge),typeof Le=="function"&&Le(yt)},[ge,Le]);return(0,h.jsxs)(h.Fragment,{children:[Wt&&(0,h.jsx)(rt.Ex,{}),(0,h.jsxs)(at.ZP,{jss:De,sheetsManager:new Map,children:[(0,h.jsx)("div",{ref:vt,"data-testid":"techdocs-native-shadowroot"}),Te]})]})};var gt=t(54073);const Ct=()=>{const{shadowRoot:ge}=useTechDocsReaderPage();return ge},Nt=ge=>{const Le=Ct();return Le?ge.map(Te=>Le==null?void 0:Le.querySelectorAll(Te)).filter(Te=>Te.length).map(Te=>Array.from(Te)).flat():[]},Lt=ge=>ge.toString()&&ge.rangeCount&&ge.getRangeAt(0).getBoundingClientRect().top,Fe=(ge=0)=>{const Le=Ct(),[Te,De]=useState(null),Je=useMemo(()=>debounce(()=>{const Wt=Le,vt=Wt.getSelection?Wt.getSelection():document.getSelection();vt&&Lt(vt)?De(vt):De(null)},ge),[Le,De,ge]);return useEffect(()=>(window.document.addEventListener("selectionchange",Je),()=>window.document.removeEventListener("selectionchange",Je)),[Je]),Te}},52943:function(bt,Oe,t){"use strict";t.r(Oe),t.d(Oe,{EmbeddedDocsRouter:function(){return ne},Router:function(){return se},isTechDocsAvailable:function(){return Q}});var h=t(52322),r=t(2784),M=t(79635),P=t(40303),g=t(23196),y=t(25271),a=t(89258),$=t(65124),Se=t(67896);const J=({entity:k})=>{const E=(0,y.iB)(k);return(0,h.jsxs)(a.I6,{entityRef:E,children:[(0,h.jsx)($.b,{}),(0,h.jsx)(Se.F,{withSearch:!1})]})};var H=t(18662),I=t(7476);const T="backstage.io/techdocs-ref",Q=k=>{var E,z;return Boolean(k==null||(E=k.metadata)===null||E===void 0||(z=E.annotations)===null||z===void 0?void 0:z[T])},se=()=>(0,h.jsxs)(M.Z5,{children:[(0,h.jsx)(M.AW,{path:"/",element:(0,h.jsx)(H.TechDocsIndexPage,{})}),(0,h.jsx)(M.AW,{path:"/:namespace/:kind/:name/*",element:(0,h.jsx)(I.TechDocsReaderPage,{})})]}),ne=k=>{var E;const{children:z}=k,{entity:N}=(0,P.X2)(),R=(0,M.V$)([{path:"/*",element:(0,h.jsx)(J,{entity:N}),children:[{path:"*",element:z}]}]);return((E=N.metadata.annotations)===null||E===void 0?void 0:E[T])?R:(0,h.jsx)(g.sk,{annotation:T})}},92077:function(bt,Oe,t){"use strict";t.d(Oe,{k:function(){return g},p:function(){return P}});var h=t(23054),r=t(76372),M=t.n(r);class P{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(a){const{kind:$,namespace:Se,name:J}=a,I=`${await this.getApiOrigin()}/metadata/techdocs/${Se}/${$}/${J}`,T=await this.fetchApi.fetch(`${I}`);if(!T.ok)throw await h.VL.fromResponse(T);return await T.json()}async getEntityMetadata(a){const{kind:$,namespace:Se,name:J}=a,I=`${await this.getApiOrigin()}/metadata/entity/${Se}/${$}/${J}`,T=await this.fetchApi.fetch(`${I}`);if(!T.ok)throw await h.VL.fromResponse(T);return await T.json()}constructor(a){this.configApi=a.configApi,this.discoveryApi=a.discoveryApi,this.fetchApi=a.fetchApi}}class g{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var a;return(a=this.configApi.getOptionalString("techdocs.storageUrl"))!==null&&a!==void 0?a:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(a,$){const{kind:Se,namespace:J,name:H}=a,T=`${await this.getStorageUrl()}/${J}/${Se}/${H}/${$}`,Q=await this.fetchApi.fetch(`${T.endsWith("/")?T:`${T}/`}index.html`);let se="";switch(Q.status){case 404:throw se="Page not found. ",$||(se+="This could be because there is no index.md file in the root of the docs directory of this repository."),new h.dR(se);case 500:throw se="Could not generate documentation or an error in the TechDocs backend. ",new Error(se);default:break}return Q.text()}async syncEntityDocs(a,$=()=>{}){const{kind:Se,namespace:J,name:H}=a,T=`${await this.getApiOrigin()}/sync/${J}/${Se}/${H}`,{token:Q}=await this.identityApi.getCredentials();return new Promise((se,ne)=>{const k=new r.EventSourcePolyfill(T,{withCredentials:!0,headers:Q?{Authorization:`Bearer ${Q}`}:{}});k.addEventListener("log",E=>{E.data&&$(JSON.parse(E.data))}),k.addEventListener("finish",E=>{let z=!1;E.data&&({updated:z}=JSON.parse(E.data)),se(z?"updated":"cached")}),k.onerror=E=>{switch(k.close(),E.status){case 404:ne(new h.dR(E.message));return;default:ne(new Error(E.data));return}}})}async getBaseUrl(a,$,Se){const{kind:J,namespace:H,name:I}=$,Q=`${await this.getApiOrigin()}/static/docs/${H}/${J}/${I}/${Se}`;return new URL(a,Q.endsWith("/")?Q:`${Q}/`).toString()}constructor(a){this.configApi=a.configApi,this.discoveryApi=a.discoveryApi,this.identityApi=a.identityApi,this.fetchApi=a.fetchApi}}},51953:function(bt,Oe,t){"use strict";t.d(Oe,{D:function(){return h}});function h(r,M){return M.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?r:r.toLocaleLowerCase("en-US")}},3482:function(bt,Oe,t){"use strict";t.d(Oe,{u:function(){return $}});var h=t(52322),r=t(2784),M=t(23196),P=t(40303),g=t(42081),y=t(48431),a=t(68435);const $=Se=>{const{initialFilter:J="owned",columns:H,actions:I}=Se;return(0,h.jsx)(g.j,{children:(0,h.jsxs)(M.VY,{children:[(0,h.jsx)(M.yW,{title:"",children:(0,h.jsx)(M.qt,{children:"Discover documentation in your ecosystem."})}),(0,h.jsx)(P.UO,{children:(0,h.jsxs)(P._i,{children:[(0,h.jsxs)(P._i.Filters,{children:[(0,h.jsx)(y.f,{}),(0,h.jsx)(P.EW,{initialFilter:J}),(0,h.jsx)(P.dq,{}),(0,h.jsx)(P.xE,{})]}),(0,h.jsx)(P._i.Content,{children:(0,h.jsx)(a.n,{actions:I,columns:H})})]})})]})})}},85478:function(bt,Oe,t){"use strict";t.d(Oe,{f:function(){return H}});var h=t(52322),r=t(95573),M=t(51953),P=t(60871),g=t(23196),y=t(94339),a=t(16111),$=t(24579),Se=t(14503),J=t(2784);const H=ne=>{const{entities:k}=ne,E=(0,P.tg)(r.Fw),z=(0,P.h_)(P.Ds);if(!k)return null;var N,R;return(0,h.jsx)(g.Oh,{"data-testid":"docs-explore",children:k!=null&&k.length?k.map((oe,Ae)=>(0,h.jsxs)(y.Z,{children:[(0,h.jsx)(a.Z,{children:(0,h.jsx)(g.hu,{title:(N=oe.metadata.title)!==null&&N!==void 0?N:oe.metadata.name})}),(0,h.jsx)($.Z,{children:oe.metadata.description}),(0,h.jsx)(Se.Z,{children:(0,h.jsx)(g.zx,{to:E({namespace:(0,M.D)((R=oe.metadata.namespace)!==null&&R!==void 0?R:"default",z),kind:(0,M.D)(oe.kind,z),name:(0,M.D)(oe.metadata.name,z)}),color:"primary","data-testid":"read_docs",children:"Read Docs"})})]},Ae)):null})};var I=t(40303);const T={title:"All Documentation",filterPredicate:()=>!0},Q=({entities:ne,group:k})=>{const{loading:E,isOwnedEntity:z}=useEntityOwnership(),N=ne.filter(oe=>k.filterPredicate==="ownedByUser"?E?!1:z(oe):typeof k.filterPredicate=="function"&&k.filterPredicate(oe)),R=(()=>typeof k.title=="string"?_jsx(ContentHeader,{title:k.title}):k.title)();return N.length===0?null:_jsxs(Content,{children:[R,_jsx(DocsCardGrid,{entities:N})]})},se=({groups:ne})=>{const{loading:k,error:E,entities:z}=useEntityList();if(E)return _jsx(WarningPanel,{severity:"error",title:"Could not load available documentation.",children:_jsx(CodeSnippet,{language:"text",text:E.toString()})});if(k)return _jsx(Progress,{});if(z.length===0)return _jsx("div",{"data-testid":"doc-not-found",children:_jsxs(Typography,{variant:"body2",children:["No documentation found that match your filter. Learn more about"," ",_jsx(Link,{to:"https://backstage.io/docs/features/techdocs/creating-and-publishing",children:"publishing documentation"}),"."]})});var N,R;return z.sort((oe,Ae)=>((N=oe.metadata.title)!==null&&N!==void 0?N:oe.metadata.name).localeCompare((R=Ae.metadata.title)!==null&&R!==void 0?R:Ae.metadata.name)),_jsx(Content,{children:(ne||[T]).map((oe,Ae)=>_jsx(Q,{entities:z,group:oe},`${oe.title}-${Ae}`))})}},68435:function(bt,Oe,t){"use strict";t.d(Oe,{H:function(){return z},n:function(){return N}});var h=t(52322),r=t(2784),M=t(95074),P=t(76635),g=t(23196),y=t(40303),a=t(60871),$=t(25271),Se=t(95573),J=t(39981),H=t(2337),I=t(11640),T=t(28347);const Q=(0,H.Z)({root:{color:"#f3ba37"}})(I.Z),se={createCopyDocsUrlAction(R){return oe=>({icon:()=>(0,h.jsx)(J.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>R(`${window.location.origin}${oe.resolved.docsUrl}`)})},createStarEntityAction(R,oe){return({entity:Ae})=>{const _e=R(Ae);return{cellStyle:{paddingLeft:"1em"},icon:()=>_e?(0,h.jsx)(Q,{}):(0,h.jsx)(T.Z,{}),tooltip:_e?"Remove from favorites":"Add to favorites",onClick:()=>oe(Ae)}}}};function ne(R){return R.metadata.title||R.metadata.name}const k={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:R=>(0,h.jsx)(g.uw,{value:(0,h.jsx)(g.rU,{to:R.resolved.docsUrl,children:ne(R.entity)}),subvalue:R.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:R})=>(0,h.jsx)(y.rI,{entityRefs:R.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}};var E=t(51953);const z=R=>{const{entities:oe,title:Ae,loading:_e,columns:Ye,actions:dt,options:Me}=R,[,at]=(0,M.Z)(),rt=(0,a.tg)(Se.Fw),ot=(0,a.h_)(a.Ds);if(!oe)return null;const We=oe.map(gt=>{const Ct=(0,y.hF)(gt,$.S4);var Nt;return{entity:gt,resolved:{docsUrl:rt({namespace:(0,E.D)((Nt=gt.metadata.namespace)!==null&&Nt!==void 0?Nt:"default",ot),kind:(0,E.D)(gt.kind,ot),name:(0,E.D)(gt.metadata.name,ot)}),ownedByRelations:Ct,ownedByRelationsTitle:Ct.map(Lt=>(0,y.$3)(Lt,{defaultKind:"group"})).join(", ")}}}),$e=[k.createNameColumn(),k.createOwnerColumn(),k.createTypeColumn()],St=[se.createCopyDocsUrlAction(at)];return(0,h.jsx)(h.Fragment,{children:_e||We&&We.length>0?(0,h.jsx)(g.iA,{isLoading:_e,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1,...Me},data:We,columns:Ye||$e,actions:dt||St,title:Ae?`${Ae} (${We.length})`:`All (${We.length})`}):(0,h.jsx)(g.ub,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,h.jsx)(g.zx,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};z.columns=k,z.actions=se;const N=R=>{var oe;const{columns:Ae,actions:_e,options:Ye}=R,{loading:dt,error:Me,entities:at,filters:rt}=(0,y.wp)(),{isStarredEntity:ot,toggleStarredEntity:We}=(0,y.CR)(),[,$e]=(0,M.Z)();var St;const gt=(0,P.capitalize)((St=(oe=rt.user)===null||oe===void 0?void 0:oe.value)!==null&&St!==void 0?St:"all"),Ct=[se.createCopyDocsUrlAction($e),se.createStarEntityAction(ot,We)];return Me?(0,h.jsx)(g.GB,{severity:"error",title:"Could not load available documentation.",children:(0,h.jsx)(g.Oi,{language:"text",text:Me.toString()})}):(0,h.jsx)(z,{title:gt,entities:at,loading:dt,actions:_e||Ct,columns:Ae,options:Ye})};N.columns=k,N.actions=se},18662:function(bt,Oe,t){"use strict";t.r(Oe),t.d(Oe,{TechDocsIndexPage:function(){return g}});var h=t(52322),r=t(2784),M=t(79635),P=t(3482);const g=y=>(0,M.pC)()||(0,h.jsx)(P.u,{...y})},42081:function(bt,Oe,t){"use strict";t.d(Oe,{j:function(){return g}});var h=t(52322),r=t(2784),M=t(23196),P=t(60871);const g=y=>{const{children:a}=y,$=(0,P.h_)(P.Ds);var Se;const J=`Documentation available in ${(Se=$.getOptionalString("organization.name"))!==null&&Se!==void 0?Se:"Backstage"}`;return(0,h.jsx)(M.g9,{title:"Documentation",subtitle:J,themeId:"documentation",children:a})}},48431:function(bt,Oe,t){"use strict";t.d(Oe,{f:function(){return P}});var h=t(2784),r=t(40303);class M{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":r.n3}}}const P=()=>{const{updateFilters:g}=(0,r.wp)();return(0,h.useEffect)(()=>{g({techdocs:new M})},[g]),null}},89258:function(bt,Oe,t){"use strict";t.d(Oe,{I6:function(){return H},Jl:function(){return J},s4:function(){return y}});var h=t(61886),r=t(92077),M=t(95573),P=t(60871),g=t(15096);const y=(0,P.rx)({id:"techdocs",apis:[(0,P.ni)({api:h.Dl,deps:{configApi:P.Ds,discoveryApi:P.NW,identityApi:P.$4,fetchApi:P.gP},factory:({configApi:T,discoveryApi:Q,identityApi:se,fetchApi:ne})=>new r.k({configApi:T,discoveryApi:Q,identityApi:se,fetchApi:ne})}),(0,P.ni)({api:h.gT,deps:{configApi:P.Ds,discoveryApi:P.NW,fetchApi:P.gP},factory:({configApi:T,discoveryApi:Q,fetchApi:se})=>new r.p({configApi:T,discoveryApi:Q,fetchApi:se})})],routes:{root:M._Z,docRoot:M.Fw,entityContent:M.pd}}),a=y.provide((0,P.P4)({name:"TechdocsPage",component:()=>Promise.resolve().then(t.bind(t,52943)).then(T=>T.Router),mountPoint:M._Z})),$=y.provide((0,P.P4)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(t.bind(t,52943)).then(T=>T.EmbeddedDocsRouter),mountPoint:M.pd})),Se=y.provide((0,P.P4)({name:"TechDocsCustomHome",component:()=>t.e(7560).then(t.bind(t,27560)).then(T=>T.TechDocsCustomHome),mountPoint:M._Z})),J=y.provide((0,P.P4)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(t.bind(t,18662)).then(T=>T.TechDocsIndexPage),mountPoint:M._Z})),H=y.provide((0,P.P4)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(t.bind(t,7476)).then(T=>T.TechDocsReaderPage),mountPoint:M.Fw})),I=y.provide((0,g.E5)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,55511)).then(T=>T.TechDocsSearchResultListItem),predicate:T=>T.type==="techdocs"}))},7476:function(bt,Oe,t){"use strict";t.r(Oe),t.d(Oe,{TechDocsReaderLayout:function(){return H},TechDocsReaderPage:function(){return I}});var h=t(52322),r=t(2784),M=t(79635),P=t(23196),g=t(61886),y=t(67896),a=t(93225),$=t(65124),Se=t(95573),J=t(60871);const H=({withSearch:T,withHeader:Q=!0})=>(0,h.jsxs)(P.T3,{themeId:"documentation",children:[Q&&(0,h.jsx)(a.S,{}),(0,h.jsx)($.b,{}),(0,h.jsx)(y.F,{withSearch:T})]}),I=T=>{const{kind:Q,name:se,namespace:ne}=(0,J.Oi)(Se.Fw),{children:k,entityRef:E={kind:Q,name:se,namespace:ne}}=T,z=(0,M.pC)();if(!k){const R=z?r.Children.toArray(z.props.children):[];var N;const Ae=R.flatMap(_e=>{var Ye;return(N=_e==null||(Ye=_e.props)===null||Ye===void 0?void 0:Ye.children)!==null&&N!==void 0?N:[]}).find(_e=>!(0,J.IY)(_e,g.Zz)&&!(0,J.IY)(_e,g.jM));return(0,h.jsx)(g.ZS,{entityRef:E,children:Ae||(0,h.jsx)(H,{})})}return(0,h.jsx)(g.ZS,{entityRef:E,children:({metadata:R,entityMetadata:oe,onReady:Ae})=>(0,h.jsx)("div",{className:"techdocs-reader-page",children:(0,h.jsx)(P.T3,{themeId:"documentation",children:k instanceof Function?k({entityRef:E,techdocsMetadataValue:R.value,entityMetadataValue:oe.value,onReady:Ae}):k})})})}},67896:function(bt,Oe,t){"use strict";t.d(Oe,{F:function(){return q}});var h=t(52322),r=t(2784),M=t(79692),P=t(60905),g=t(61886),y=t(23196),a=t(22478),$=t(4614),Se=t(77277),J=t(99688),H=t(12420),I=t(90436),T=t(61837),Q=t(4190),se=t(87685);const ne=(0,M.Z)(m=>(0,H.Z)({paper:{width:"100%",[m.breakpoints.up("sm")]:{width:"75%"},[m.breakpoints.up("md")]:{width:"50%"},padding:m.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:m.palette.background.default}})),k=({buildLog:m,onClose:C})=>{const Z=ne(),K=m.length===0?"Waiting for logs...":m.join(`
|
|
37
|
-
`);return(0,h.jsxs)(P.Z,{container:!0,direction:"column",className:Z.root,spacing:0,wrap:"nowrap",children:[(0,h.jsxs)(P.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,h.jsx)(I.Z,{variant:"h5",children:"Build Details"}),(0,h.jsx)(T.Z,{title:"Close the drawer",onClick:C,color:"inherit",children:(0,h.jsx)(se.Z,{})},"dismiss")]}),(0,h.jsx)(P.Z,{item:!0,xs:!0,children:(0,h.jsx)(y.nU,{text:K,classes:{root:Z.logs}})})]})},E=({buildLog:m})=>{const C=ne(),[Z,K]=(0,r.useState)(!1);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Se.Z,{color:"inherit",onClick:()=>K(!0),children:"Show Build Logs"}),(0,h.jsx)(Q.ZP,{classes:{paper:C.paper},anchor:"right",open:Z,onClose:()=>K(!1),children:(0,h.jsx)(k,{buildLog:m,onClose:()=>K(!1)})})]})};var z=t(60871);const N=({errorMessage:m})=>{const C=(0,z.h_)(z.Ds).getOptionalString("techdocs.builder");let Z="";return C!=="local"&&(Z="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."),(0,h.jsx)(y.mf,{status:"404",statusMessage:m||"Documentation not found",additionalInfo:Z})};var R=t(95481);const oe=(0,M.Z)(m=>({root:{marginBottom:m.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),Ae=()=>{let m=null;const C=oe(),{state:Z,contentReload:K,contentErrorMessage:ce,syncErrorMessage:de,buildLog:Re}=(0,R.DK)();return Z==="INITIAL_BUILD"&&(m=(0,h.jsx)(J.Z,{classes:{root:C.root},variant:"outlined",severity:"info",icon:(0,h.jsx)($.Z,{size:"24px"}),action:(0,h.jsx)(E,{buildLog:Re}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),Z==="CONTENT_STALE_REFRESHING"&&(m=(0,h.jsx)(J.Z,{variant:"outlined",severity:"info",icon:(0,h.jsx)($.Z,{size:"24px"}),action:(0,h.jsx)(E,{buildLog:Re}),classes:{root:C.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),Z==="CONTENT_STALE_READY"&&(m=(0,h.jsx)(J.Z,{variant:"outlined",severity:"success",action:(0,h.jsx)(Se.Z,{color:"inherit",onClick:()=>K(),children:"Refresh"}),classes:{root:C.root},children:"A newer version of this documentation is now available, please refresh to view."})),Z==="CONTENT_STALE_ERROR"&&(m=(0,h.jsxs)(J.Z,{variant:"outlined",severity:"error",action:(0,h.jsx)(E,{buildLog:Re}),classes:{root:C.root,message:C.message},children:["Building a newer version of this documentation failed."," ",de]})),Z==="CONTENT_NOT_FOUND"&&(m=(0,h.jsxs)(h.Fragment,{children:[de&&(0,h.jsxs)(J.Z,{variant:"outlined",severity:"error",action:(0,h.jsx)(E,{buildLog:Re}),classes:{root:C.root,message:C.message},children:["Building a newer version of this documentation failed."," ",de]}),(0,h.jsx)(N,{errorMessage:ce})]})),m};var _e=t(79635),Ye=t(60364),dt=t(41156),Me=t(32838),at=t(35368),rt=t.n(at);const ot=/main\.[A-Fa-f0-9]{8}\.min\.css$/,We=/^https:\/\/fonts\.googleapis\.com/,$e=/^https:\/\/fonts\.gstatic\.com/,St=m=>m.nodeName==="LINK",gt=m=>{const C=(m==null?void 0:m.getAttribute("href"))||"",Z=C.match(ot),K=C.match(We),ce=C.match($e);return Z||K||ce},Ct=m=>(St(m)&&!gt(m)&&m.remove(),m),Nt=m=>m.nodeName==="IFRAME",Lt=(m,C)=>{const Z=m.getAttribute("src")||"";try{const{host:K}=new URL(Z);return C.includes(K)}catch{return!1}},Fe=m=>C=>(Nt(C)&&!Lt(C,m)&&C.remove(),C),ge=()=>{const m=(0,z.h_)(z.Ds);return(0,r.useMemo)(()=>m.getOptionalConfig("techdocs.sanitizer"),[m])},Le=()=>{const m=ge();return(0,r.useCallback)(async C=>{const Z=m==null?void 0:m.getOptionalStringArray("allowedIframeHosts");rt().addHook("beforeSanitizeElements",Ct);const K=["link"];return Z&&(K.push("iframe"),rt().addHook("beforeSanitizeElements",Fe(Z))),rt().sanitize(C.outerHTML,{ADD_TAGS:K,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[m])};var Te=t(41128),De=({theme:m})=>`
|
|
38
|
-
/*================== Variables ==================*/
|
|
39
|
-
/*
|
|
40
|
-
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.
|
|
41
|
-
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.
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
|
-
:host {
|
|
45
|
-
/* FONT */
|
|
46
|
-
--md-default-fg-color: ${m.palette.text.primary};
|
|
47
|
-
--md-default-fg-color--light: ${m.palette.text.secondary};
|
|
48
|
-
--md-default-fg-color--lighter: ${(0,Te.$n)(m.palette.text.secondary,.7)};
|
|
49
|
-
--md-default-fg-color--lightest: ${(0,Te.$n)(m.palette.text.secondary,.3)};
|
|
50
|
-
|
|
51
|
-
/* BACKGROUND */
|
|
52
|
-
--md-default-bg-color:${m.palette.background.default};
|
|
53
|
-
--md-default-bg-color--light: ${m.palette.background.paper};
|
|
54
|
-
--md-default-bg-color--lighter: ${(0,Te.$n)(m.palette.background.paper,.7)};
|
|
55
|
-
--md-default-bg-color--lightest: ${(0,Te.$n)(m.palette.background.paper,.3)};
|
|
56
|
-
|
|
57
|
-
/* PRIMARY */
|
|
58
|
-
--md-primary-fg-color: ${m.palette.primary.main};
|
|
59
|
-
--md-primary-fg-color--light: ${m.palette.primary.light};
|
|
60
|
-
--md-primary-fg-color--dark: ${m.palette.primary.dark};
|
|
61
|
-
--md-primary-bg-color: ${m.palette.primary.contrastText};
|
|
62
|
-
--md-primary-bg-color--light: ${(0,Te.$n)(m.palette.primary.contrastText,.7)};
|
|
63
|
-
|
|
64
|
-
/* ACCENT */
|
|
65
|
-
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
66
|
-
|
|
67
|
-
/* SHADOW */
|
|
68
|
-
--md-shadow-z1: ${m.shadows[1]};
|
|
69
|
-
--md-shadow-z2: ${m.shadows[2]};
|
|
70
|
-
--md-shadow-z3: ${m.shadows[3]};
|
|
71
|
-
|
|
72
|
-
/* EXTENSIONS */
|
|
73
|
-
--md-admonition-fg-color: var(--md-default-fg-color);
|
|
74
|
-
--md-admonition-bg-color: var(--md-default-bg-color);
|
|
75
|
-
/* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
|
|
76
|
-
--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>');
|
|
77
|
-
--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>');
|
|
78
|
-
--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>');
|
|
79
|
-
--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>');
|
|
80
|
-
--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>');
|
|
81
|
-
--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>');
|
|
82
|
-
--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>');
|
|
83
|
-
--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>');
|
|
84
|
-
--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>');
|
|
85
|
-
--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>');
|
|
86
|
-
--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>');
|
|
87
|
-
--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>');
|
|
88
|
-
--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>');
|
|
89
|
-
--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>');
|
|
90
|
-
--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>');
|
|
91
|
-
--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>');
|
|
92
|
-
--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>');
|
|
93
|
-
--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>');
|
|
94
|
-
--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>');
|
|
95
|
-
--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>');
|
|
96
|
-
--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>');
|
|
97
|
-
--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>');
|
|
98
|
-
--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>');
|
|
99
|
-
--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>');
|
|
100
|
-
--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>');
|
|
101
|
-
--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>');
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
:host > * {
|
|
105
|
-
/* CODE */
|
|
106
|
-
--md-code-fg-color: ${m.palette.text.primary};
|
|
107
|
-
--md-code-bg-color: ${m.palette.background.paper};
|
|
108
|
-
--md-code-hl-color: ${(0,Te.Fq)(m.palette.warning.main,.5)};
|
|
109
|
-
--md-code-hl-keyword-color: ${m.palette.type==="dark"?m.palette.primary.light:m.palette.primary.dark};
|
|
110
|
-
--md-code-hl-function-color: ${m.palette.type==="dark"?m.palette.secondary.light:m.palette.secondary.dark};
|
|
111
|
-
--md-code-hl-string-color: ${m.palette.type==="dark"?m.palette.success.light:m.palette.success.dark};
|
|
112
|
-
--md-code-hl-number-color: ${m.palette.type==="dark"?m.palette.error.light:m.palette.error.dark};
|
|
113
|
-
--md-code-hl-constant-color: var(--md-code-hl-function-color);
|
|
114
|
-
--md-code-hl-special-color: var(--md-code-hl-function-color);
|
|
115
|
-
--md-code-hl-name-color: var(--md-code-fg-color);
|
|
116
|
-
--md-code-hl-comment-color: var(--md-default-fg-color--light);
|
|
117
|
-
--md-code-hl-generic-color: var(--md-default-fg-color--light);
|
|
118
|
-
--md-code-hl-variable-color: var(--md-default-fg-color--light);
|
|
119
|
-
--md-code-hl-operator-color: var(--md-default-fg-color--light);
|
|
120
|
-
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
|
|
121
|
-
|
|
122
|
-
/* TYPESET */
|
|
123
|
-
--md-typeset-font-size: 1rem;
|
|
124
|
-
--md-typeset-color: var(--md-default-fg-color);
|
|
125
|
-
--md-typeset-a-color: var(--md-accent-fg-color);
|
|
126
|
-
--md-typeset-table-color: ${m.palette.text.primary};
|
|
127
|
-
--md-typeset-del-color: ${m.palette.type==="dark"?(0,Te.Fq)(m.palette.error.dark,.5):(0,Te.Fq)(m.palette.error.light,.5)};
|
|
128
|
-
--md-typeset-ins-color: ${m.palette.type==="dark"?(0,Te.Fq)(m.palette.success.dark,.5):(0,Te.Fq)(m.palette.success.light,.5)};
|
|
129
|
-
--md-typeset-mark-color: ${m.palette.type==="dark"?(0,Te.Fq)(m.palette.warning.dark,.5):(0,Te.Fq)(m.palette.warning.light,.5)};
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
@media screen and (max-width: 76.1875em) {
|
|
133
|
-
:host > * {
|
|
134
|
-
/* TYPESET */
|
|
135
|
-
--md-typeset-font-size: .9rem;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
@media screen and (max-width: 600px) {
|
|
140
|
-
:host > * {
|
|
141
|
-
/* TYPESET */
|
|
142
|
-
--md-typeset-font-size: .7rem;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
`,Je=({theme:m})=>`
|
|
146
|
-
/*================== Reset ==================*/
|
|
147
|
-
|
|
148
|
-
body {
|
|
149
|
-
--md-text-color: var(--md-default-fg-color);
|
|
150
|
-
--md-text-link-color: var(--md-accent-fg-color);
|
|
151
|
-
--md-text-font-family: ${m.typography.fontFamily};
|
|
152
|
-
font-family: var(--md-text-font-family);
|
|
153
|
-
background-color: unset;
|
|
154
|
-
}
|
|
155
|
-
`;const Wt="224px";var vt=({theme:m,sidebar:C})=>`
|
|
156
|
-
/*================== Layout ==================*/
|
|
157
|
-
|
|
158
|
-
.md-grid {
|
|
159
|
-
max-width: 100%;
|
|
160
|
-
margin: 0;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.md-nav {
|
|
164
|
-
font-size: calc(var(--md-typeset-font-size) * 0.9);
|
|
165
|
-
}
|
|
166
|
-
.md-nav__link {
|
|
167
|
-
display: flex;
|
|
168
|
-
align-items: center;
|
|
169
|
-
justify-content: space-between;
|
|
170
|
-
}
|
|
171
|
-
.md-nav__icon {
|
|
172
|
-
height: 20px !important;
|
|
173
|
-
width: 20px !important;
|
|
174
|
-
margin-left:${m.spacing(1)}px;
|
|
175
|
-
}
|
|
176
|
-
.md-nav__icon svg {
|
|
177
|
-
margin: 0;
|
|
178
|
-
width: 20px !important;
|
|
179
|
-
height: 20px !important;
|
|
180
|
-
}
|
|
181
|
-
.md-nav__icon:after {
|
|
182
|
-
width: 20px !important;
|
|
183
|
-
height: 20px !important;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.md-nav__item--active > .md-nav__link, a.md-nav__link--active {
|
|
187
|
-
text-decoration: underline;
|
|
188
|
-
color: var(--md-typeset-a-color);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.md-main__inner {
|
|
192
|
-
margin-top: 0;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.md-sidebar {
|
|
196
|
-
bottom: 75px;
|
|
197
|
-
position: fixed;
|
|
198
|
-
width: 16rem;
|
|
199
|
-
overflow-y: auto;
|
|
200
|
-
overflow-x: hidden;
|
|
201
|
-
scrollbar-color: rgb(193, 193, 193) #eee;
|
|
202
|
-
scrollbar-width: thin;
|
|
203
|
-
}
|
|
204
|
-
.md-sidebar .md-sidebar__scrollwrap {
|
|
205
|
-
width: calc(12.1rem);
|
|
206
|
-
}
|
|
207
|
-
.md-sidebar--secondary {
|
|
208
|
-
right: ${m.spacing(3)}px;
|
|
209
|
-
}
|
|
210
|
-
.md-sidebar::-webkit-scrollbar {
|
|
211
|
-
width: 5px;
|
|
212
|
-
}
|
|
213
|
-
.md-sidebar::-webkit-scrollbar-button {
|
|
214
|
-
width: 5px;
|
|
215
|
-
height: 5px;
|
|
216
|
-
}
|
|
217
|
-
.md-sidebar::-webkit-scrollbar-track {
|
|
218
|
-
background: #eee;
|
|
219
|
-
border: 1 px solid rgb(250, 250, 250);
|
|
220
|
-
box-shadow: 0px 0px 3px #dfdfdf inset;
|
|
221
|
-
border-radius: 3px;
|
|
222
|
-
}
|
|
223
|
-
.md-sidebar::-webkit-scrollbar-thumb {
|
|
224
|
-
width: 5px;
|
|
225
|
-
background: rgb(193, 193, 193);
|
|
226
|
-
border: transparent;
|
|
227
|
-
border-radius: 3px;
|
|
228
|
-
}
|
|
229
|
-
.md-sidebar::-webkit-scrollbar-thumb:hover {
|
|
230
|
-
background: rgb(125, 125, 125);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.md-content {
|
|
234
|
-
max-width: calc(100% - 16rem * 2);
|
|
235
|
-
margin-left: 16rem;
|
|
236
|
-
margin-bottom: 50px;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.md-footer {
|
|
240
|
-
position: fixed;
|
|
241
|
-
bottom: 0px;
|
|
242
|
-
pointer-events: none;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.md-footer-nav__link {
|
|
246
|
-
pointer-events: all;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.md-footer__title {
|
|
250
|
-
background-color: unset;
|
|
251
|
-
}
|
|
252
|
-
.md-footer-nav__link {
|
|
253
|
-
width: 16rem;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.md-dialog {
|
|
257
|
-
background-color: unset;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
@media screen and (min-width: 76.25em) {
|
|
261
|
-
.md-sidebar {
|
|
262
|
-
height: auto;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
@media screen and (max-width: 76.1875em) {
|
|
267
|
-
.md-nav {
|
|
268
|
-
transition: none !important;
|
|
269
|
-
background-color: var(--md-default-bg-color)
|
|
270
|
-
}
|
|
271
|
-
.md-nav--primary .md-nav__title {
|
|
272
|
-
cursor: auto;
|
|
273
|
-
color: var(--md-default-fg-color);
|
|
274
|
-
font-weight: 700;
|
|
275
|
-
white-space: normal;
|
|
276
|
-
line-height: 1rem;
|
|
277
|
-
height: auto;
|
|
278
|
-
display: flex;
|
|
279
|
-
flex-flow: column;
|
|
280
|
-
row-gap: 1.6rem;
|
|
281
|
-
padding: 1.2rem .8rem .8rem;
|
|
282
|
-
background-color: var(--md-default-bg-color);
|
|
283
|
-
}
|
|
284
|
-
.md-nav--primary .md-nav__title~.md-nav__list {
|
|
285
|
-
box-shadow: none;
|
|
286
|
-
}
|
|
287
|
-
.md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
|
|
288
|
-
border-top: none;
|
|
289
|
-
}
|
|
290
|
-
.md-nav--primary .md-nav__title .md-nav__button {
|
|
291
|
-
display: none;
|
|
292
|
-
}
|
|
293
|
-
.md-nav--primary .md-nav__title .md-nav__icon {
|
|
294
|
-
color: var(--md-default-fg-color);
|
|
295
|
-
position: static;
|
|
296
|
-
height: auto;
|
|
297
|
-
margin: 0 0 0 -0.2rem;
|
|
298
|
-
}
|
|
299
|
-
.md-nav--primary > .md-nav__title [for="none"] {
|
|
300
|
-
padding-top: 0;
|
|
301
|
-
}
|
|
302
|
-
.md-nav--primary .md-nav__item {
|
|
303
|
-
border-top: none;
|
|
304
|
-
}
|
|
305
|
-
.md-nav--primary :is(.md-nav__title,.md-nav__item) {
|
|
306
|
-
font-size : var(--md-typeset-font-size);
|
|
307
|
-
}
|
|
308
|
-
.md-nav .md-source {
|
|
309
|
-
display: none;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
.md-sidebar {
|
|
313
|
-
height: 100%;
|
|
314
|
-
}
|
|
315
|
-
.md-sidebar--primary {
|
|
316
|
-
width: 12.1rem !important;
|
|
317
|
-
z-index: 200;
|
|
318
|
-
left: ${C.isPinned?`calc(-12.1rem + ${Wt})`:"calc(-12.1rem + 72px)"} !important;
|
|
319
|
-
}
|
|
320
|
-
.md-sidebar--secondary:not([hidden]) {
|
|
321
|
-
display: none;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.md-content {
|
|
325
|
-
max-width: 100%;
|
|
326
|
-
margin-left: 0;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
.md-header__button {
|
|
330
|
-
margin: 0.4rem 0;
|
|
331
|
-
margin-left: 0.4rem;
|
|
332
|
-
padding: 0;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.md-overlay {
|
|
336
|
-
left: 0;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.md-footer {
|
|
340
|
-
position: static;
|
|
341
|
-
padding-left: 0;
|
|
342
|
-
}
|
|
343
|
-
.md-footer-nav__link {
|
|
344
|
-
/* footer links begin to overlap at small sizes without setting width */
|
|
345
|
-
width: 50%;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
@media screen and (max-width: 600px) {
|
|
350
|
-
.md-sidebar--primary {
|
|
351
|
-
left: -12.1rem !important;
|
|
352
|
-
width: 12.1rem;
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
`;const Tt=["h1","h2","h3","h4","h5","h6"];var yt=({theme:m})=>`
|
|
356
|
-
/*================== Typeset ==================*/
|
|
357
|
-
|
|
358
|
-
.md-typeset {
|
|
359
|
-
font-size: var(--md-typeset-font-size);
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
${Tt.reduce((C,Z)=>{var K;const ce=(K=m.typography.htmlFontSize)!==null&&K!==void 0?K:16,de=m.typography[Z],{lineHeight:Re,fontFamily:st,fontWeight:Ge,fontSize:mt}=de,Et=et=>{let Ze=1;return typeof et=="number"&&(Ze=et/ce*.6),typeof et=="string"&&(Ze=et.replace("rem","")),`calc(${Ze} * var(--md-typeset-font-size))`};return C.concat(`
|
|
363
|
-
.md-typeset ${Z} {
|
|
364
|
-
color: var(--md-default-fg-color);
|
|
365
|
-
line-height: ${Re};
|
|
366
|
-
font-family: ${st};
|
|
367
|
-
font-weight: ${Ge};
|
|
368
|
-
font-size: ${Et(mt)};
|
|
369
|
-
}
|
|
370
|
-
`)},"")}
|
|
371
|
-
|
|
372
|
-
.md-typeset .md-content__button {
|
|
373
|
-
color: var(--md-default-fg-color);
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
.md-typeset hr {
|
|
377
|
-
border-bottom: 0.05rem dotted ${m.palette.divider};
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.md-typeset details {
|
|
381
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
382
|
-
}
|
|
383
|
-
.md-typeset details summary {
|
|
384
|
-
padding-left: 2.5rem !important;
|
|
385
|
-
}
|
|
386
|
-
.md-typeset details summary:before,
|
|
387
|
-
.md-typeset details summary:after {
|
|
388
|
-
top: 50% !important;
|
|
389
|
-
width: 20px !important;
|
|
390
|
-
height: 20px !important;
|
|
391
|
-
transform: rotate(0deg) translateY(-50%) !important;
|
|
392
|
-
}
|
|
393
|
-
.md-typeset details[open] > summary:after {
|
|
394
|
-
transform: rotate(90deg) translateX(-50%) !important;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
.md-typeset blockquote {
|
|
398
|
-
color: var(--md-default-fg-color--light);
|
|
399
|
-
border-left: 0.2rem solid var(--md-default-fg-color--light);
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
.md-typeset table:not([class]) {
|
|
403
|
-
font-size: var(--md-typeset-font-size);
|
|
404
|
-
border: 1px solid var(--md-default-fg-color);
|
|
405
|
-
border-bottom: none;
|
|
406
|
-
border-collapse: collapse;
|
|
407
|
-
}
|
|
408
|
-
.md-typeset table:not([class]) th {
|
|
409
|
-
font-weight: bold;
|
|
410
|
-
}
|
|
411
|
-
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
|
|
412
|
-
border-bottom: 1px solid var(--md-default-fg-color);
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb {
|
|
416
|
-
background-color: hsla(0, 0%, 0%, 0.32);
|
|
417
|
-
}
|
|
418
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
419
|
-
background-color: hsla(0, 0%, 0%, 0.87);
|
|
420
|
-
}
|
|
421
|
-
`,Pt=()=>`
|
|
422
|
-
/*================== Animations ==================*/
|
|
423
|
-
/*
|
|
424
|
-
Disable CSS animations on link colors as they lead to issues in dark mode.
|
|
425
|
-
The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
|
|
426
|
-
*/
|
|
427
|
-
.md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
428
|
-
transition: none;
|
|
429
|
-
}
|
|
430
|
-
`,Yt=({theme:m})=>`
|
|
431
|
-
/*================== Extensions ==================*/
|
|
432
|
-
|
|
433
|
-
/* HIGHLIGHT */
|
|
434
|
-
.highlight .md-clipboard:after {
|
|
435
|
-
content: unset;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
.highlight .nx {
|
|
439
|
-
color: ${m.palette.type==="dark"?"#ff53a3":"#ec407a"};
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
/* CODE HILITE */
|
|
443
|
-
.codehilite .gd {
|
|
444
|
-
background-color: ${m.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
.codehilite .gi {
|
|
448
|
-
background-color: ${m.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
/* TABBED */
|
|
452
|
-
.tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
|
|
453
|
-
.tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
|
|
454
|
-
.tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
|
|
455
|
-
.tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
|
|
456
|
-
.tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
|
|
457
|
-
.tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
|
|
458
|
-
.tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
|
|
459
|
-
.tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
|
|
460
|
-
.tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
|
|
461
|
-
.tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
|
|
462
|
-
.tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
|
|
463
|
-
.tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
|
|
464
|
-
.tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
|
|
465
|
-
.tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
|
|
466
|
-
.tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
|
|
467
|
-
.tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
|
|
468
|
-
.tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
|
|
469
|
-
.tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
|
|
470
|
-
.tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
|
|
471
|
-
.tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
|
|
472
|
-
color: var(--md-accent-fg-color);
|
|
473
|
-
border-color: var(--md-accent-fg-color);
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
/* TASK-LIST */
|
|
477
|
-
.task-list-control .task-list-indicator::before {
|
|
478
|
-
background-color: ${m.palette.action.disabledBackground};
|
|
479
|
-
}
|
|
480
|
-
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
481
|
-
background-color: ${m.palette.success.main};
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
/* ADMONITION */
|
|
485
|
-
.admonition {
|
|
486
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
487
|
-
}
|
|
488
|
-
.admonition .admonition-title {
|
|
489
|
-
padding-left: 2.5rem !important;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
.admonition .admonition-title:before {
|
|
493
|
-
top: 50% !important;
|
|
494
|
-
width: 20px !important;
|
|
495
|
-
height: 20px !important;
|
|
496
|
-
transform: translateY(-50%) !important;
|
|
497
|
-
}
|
|
498
|
-
`;const sn=[De,Je,vt,yt,Pt,Yt],hn=()=>(0,y.Pf)(),$t=()=>{const m=hn(),C=(0,Ye.Z)();return(0,r.useMemo)(()=>{const Z={theme:C,sidebar:m};return sn.reduce((K,ce)=>K+ce(Z),"")},[C,m])},xn=()=>{const m=$t();return(0,r.useCallback)(C=>(C.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${m}</style>`),C),[m])},bn=(m,C,Z)=>{const K=m==="src"&&C.endsWith(".svg"),ce=!C.match(/^([a-z]*:)?\/\//i),de=C.startsWith(Z);return K&&(ce||de)},Rn=({techdocsStorageApi:m,entityId:C,path:Z})=>async K=>{const ce=await m.getApiOrigin(),de=async(Re,st)=>{for(const Ge of Re)if(Ge.hasAttribute(st)){const mt=Ge.getAttribute(st);if(!mt)return;const Et=await m.getBaseUrl(mt,C,Z);if(bn(st,mt,ce))try{const Ze=await(await fetch(Et,{credentials:"include"})).text();Ge.setAttribute(st,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Ze)))}`)}catch{Ge.setAttribute("alt",`Error: ${mt}`)}else Ge.setAttribute(st,Et)}};return await Promise.all([de(K.querySelectorAll("img"),"src"),de(K.querySelectorAll("script"),"src"),de(K.querySelectorAll("source"),"src"),de(K.querySelectorAll("link"),"href"),de(K.querySelectorAll("a[download]"),"href")]),K};var pn=t(79158),Un=t(67097),Ln=t(28316),Xn=t(82717),ct=t.n(Xn);const Pn=m=>C=>{var Z;const K=C.querySelector('[title="Edit this page"]');if(!K||!K.href)return C;const ce=new URL(K.href),de=m.byUrl(ce);if((de==null?void 0:de.type)!=="github"&&(de==null?void 0:de.type)!=="gitlab")return C;const Re=((Z=C.querySelector("article>h1"))===null||Z===void 0?void 0:Z.childNodes[0].textContent)||"",st=encodeURIComponent(`Documentation Feedback: ${Re}`),Ge=encodeURIComponent(`Page source:
|
|
499
|
-
${K.href}
|
|
500
|
-
|
|
501
|
-
Feedback:`),mt=(de==null?void 0:de.type)==="github"?(0,pn.BT)(ce.href,"blob"):ce.href,Et=ct()(mt),et=`/${Et.organization}/${Et.name}`,Ze=K.cloneNode();switch(de==null?void 0:de.type){case"gitlab":Ze.href=`${ce.origin}${et}/issues/new?issue[title]=${st}&issue[description]=${Ge}`;break;case"github":Ze.href=`${ce.origin}${et}/issues/new?title=${st}&body=${Ge}`;break;default:return C}return Ln.render(r.createElement(Un.Z),Ze),Ze.style.paddingLeft="5px",Ze.title="Leave feedback for this page",Ze.id="git-feedback-link",K==null||K.insertAdjacentElement("beforebegin",Ze),C};var Cn=t(44882);const ln=()=>m=>{const C=m.querySelector('.md-header label[for="__drawer"]'),Z=m.querySelector("article");if(!C||!Z)return m;const K=C.cloneNode();return Ln.render(r.createElement(Cn.Z),K),K.id="toggle-sidebar",K.title="Toggle Sidebar",K.classList.add("md-content__button"),K.style.setProperty("padding","0 0 0 5px"),K.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),Z==null||Z.prepend(K),m},kn=()=>m=>(((Z,K)=>{Array.from(Z).filter(ce=>ce.hasAttribute(K)).forEach(ce=>{const de=ce.getAttribute(K);if(de){de.match(/^https?:\/\//i)&&ce.setAttribute("target","_blank");try{const Re=Mn(window.location.href);ce.setAttribute(K,new URL(de,Re).toString())}catch{ce.replaceWith(ce.textContent||de)}}})})(Array.from(m.getElementsByTagName("a")),"href"),m);function Mn(m){const C=new URL(m);return!C.pathname.endsWith("/")&&!C.pathname.endsWith(".html")&&(C.pathname+="/"),C.toString()}const wn=({baseUrl:m,onClick:C})=>Z=>(Array.from(Z.getElementsByTagName("a")).forEach(K=>{K.addEventListener("click",ce=>{const Re=K.getAttribute("href");Re&&Re.startsWith(m)&&!K.hasAttribute("download")&&(ce.preventDefault(),C(ce,Re))})}),Z);var Gn=t(15459),ve=t(80030),re=t(72379),Pe=t(41547);const Ie=(0,Gn.Z)(m=>({tooltip:{fontSize:"inherit",color:m.palette.text.primary,margin:0,padding:m.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(ve.ZP),He=()=>(0,h.jsx)(re.Z,{children:(0,h.jsx)("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"})}),ht=({text:m})=>{const[C,Z]=(0,r.useState)(!1),K=(0,r.useCallback)(()=>{window.navigator.clipboard.writeText(m),Z(!0)},[m]),ce=(0,r.useCallback)(()=>{Z(!1)},[Z]);return(0,h.jsx)(Ie,{title:"Copied to clipboard",placement:"left",open:C,onClose:ce,leaveDelay:1e3,children:(0,h.jsx)(Se.Z,{className:"md-clipboard md-icon",onClick:K,children:(0,h.jsx)(He,{})})})},Gt=m=>C=>{const Z=C.querySelectorAll("pre > code");for(const ce of Z){var K;const de=ce.textContent||"",Re=document.createElement("div");ce==null||(K=ce.parentElement)===null||K===void 0||K.prepend(Re),Ln.render((0,h.jsx)(Pe.Z,{theme:m,children:(0,h.jsx)(ht,{text:de})}),Re)}return C},kt=()=>m=>{var C;return(C=m.querySelector(".md-header"))===null||C===void 0||C.remove(),m},le=()=>m=>{var C,Z;return(C=m.querySelector(".md-footer .md-copyright"))===null||C===void 0||C.remove(),(Z=m.querySelector(".md-footer-copyright"))===null||Z===void 0||Z.remove(),m},W=({onLoading:m,onLoaded:C})=>Z=>(m(),Z.addEventListener(g.Ox,function K(){C(),Z.removeEventListener(g.Ox,K)}),Z),he=()=>m=>(m.addEventListener(g.Ox,function C(){if(window.location.hash){var Z;const K=window.location.hash.slice(1);(Z=m==null?void 0:m.querySelector(`[id="${K}"]`))===null||Z===void 0||Z.scrollIntoView()}m.removeEventListener(g.Ox,C)}),m),Ve=()=>m=>(setTimeout(()=>{const C=m==null?void 0:m.querySelectorAll("li.md-nav__item--active");C.length!==0&&(C.forEach(K=>{const ce=K==null?void 0:K.querySelector("input");ce!=null&&ce.checked||ce==null||ce.click()}),C[C.length-1].scrollIntoView())},200),m),ut=async(m,C)=>{let Z;if(typeof m=="string")Z=new DOMParser().parseFromString(m,"text/html").documentElement;else if(m instanceof Element)Z=m;else throw new Error("dom is not a recognized type");for(const K of C)Z=await K(Z);return Z},ze="screen and (max-width: 76.1875em)",It=m=>{const C=(0,_e.s0)(),Z=(0,Ye.Z)(),K=(0,dt.Z)(ze),ce=Le(),de=xn(),Re=(0,z.z$)(),st=(0,z.h_)(g.Dl),Ge=(0,z.h_)(Me.q3),{state:mt,path:Et,content:et}=(0,R.DK)(),[Ze,pt]=(0,r.useState)(null),At=(0,g.ux)(Ze),Vt=(0,r.useCallback)(()=>{if(!Ze)return;Ze.querySelectorAll(".md-sidebar").forEach(tt=>{if(K)tt.style.top="0px";else{const an=document==null?void 0:document.querySelector(".techdocs-reader-page");var Xe;const zn=(Xe=an==null?void 0:an.getBoundingClientRect().top)!==null&&Xe!==void 0?Xe:0;var Kt;let Qn=(Kt=Ze.getBoundingClientRect().top)!==null&&Kt!==void 0?Kt:0;const gn=Ze.querySelector(".md-container > .md-tabs");var fn;const Kn=(fn=gn==null?void 0:gn.getBoundingClientRect().height)!==null&&fn!==void 0?fn:0;Qn<zn&&(Qn=zn),tt.style.top=`${Math.max(Qn,0)+Kn}px`}tt.style.setProperty("opacity","1")})},[Ze,K]);(0,r.useEffect)(()=>(window.addEventListener("resize",Vt),window.addEventListener("scroll",Vt,!0),()=>{window.removeEventListener("resize",Vt),window.removeEventListener("scroll",Vt,!0)}),[Ze,Vt]);const Dt=(0,r.useCallback)(()=>{if(!Ze)return;const Rt=Ze.querySelector(".md-footer");Rt&&(Rt.style.width=`${Ze.getBoundingClientRect().width}px`)},[Ze]);(0,r.useEffect)(()=>(window.addEventListener("resize",Dt),()=>{window.removeEventListener("resize",Dt)}),[Ze,Dt]),(0,r.useEffect)(()=>{At||(Dt(),Vt())},[mt,At,Dt,Vt]);const Mt=(0,r.useCallback)((Rt,tt)=>ut(Rt,[ce,Rn({techdocsStorageApi:st,entityId:m,path:tt}),kn(),ln(),kt(),le(),Pn(Ge),de]),[m,Ge,st,ce,de]),Ht=(0,r.useCallback)(async Rt=>ut(Rt,[he(),Ve(),Gt(Z),wn({baseUrl:window.location.origin,onClick:(tt,Xe)=>{var Kt;const fn=tt.ctrlKey||tt.metaKey,an=new URL(Xe),zn=`${an.pathname}${an.search}${an.hash}`,Qn=((Kt=tt.target)===null||Kt===void 0?void 0:Kt.innerText)||Xe,gn=Xe.replace(window.location.origin,"");if(Re.captureEvent("click",Qn,{attributes:{to:gn}}),an.hash)if(fn)window.open(zn,"_blank");else{var Kn;C(zn),(Kn=Rt==null?void 0:Rt.querySelector(`[id="${an.hash.slice(1)}"]`))===null||Kn===void 0||Kn.scrollIntoView()}else fn?window.open(zn,"_blank"):C(zn)}}),W({onLoading:()=>{},onLoaded:()=>{var tt;(tt=Rt.querySelector(".md-nav__title"))===null||tt===void 0||tt.removeAttribute("for")}}),W({onLoading:()=>{Array.from(Rt.querySelectorAll(".md-sidebar")).forEach(Xe=>{Xe.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[Z,C,Re]);return(0,r.useEffect)(()=>{if(!et)return()=>{};let Rt=!0;return Mt(et,Et).then(async tt=>{if(!(tt!=null&&tt.innerHTML)||!Rt)return;window.scroll({top:0});const Xe=await Ht(tt);pt(Xe)}),()=>{Rt=!1}},[et,Et,Mt,Ht]),Ze};var Jt=t(8560);const rn=()=>{const m=(0,g.$L)(),{shadowRoot:C}=(0,g.x1)(),Z=C==null?void 0:C.querySelector('[data-md-component="content"]'),K=C==null?void 0:C.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let ce=K==null?void 0:K.querySelector('[data-techdocs-addons-location="primary sidebar"]');ce||(ce=document.createElement("div"),ce.setAttribute("data-techdocs-addons-location","primary sidebar"),K==null||K.prepend(ce));const de=C==null?void 0:C.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let Re=de==null?void 0:de.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return Re||(Re=document.createElement("div"),Re.setAttribute("data-techdocs-addons-location","secondary sidebar"),de==null||de.prepend(Re)),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Jt.Z,{container:ce,children:m.renderComponentsByLocation(g.oZ.PrimarySidebar)}),(0,h.jsx)(Jt.Z,{container:Z,children:m.renderComponentsByLocation(g.oZ.Content)}),(0,h.jsx)(Jt.Z,{container:Re,children:m.renderComponentsByLocation(g.oZ.SecondarySidebar)})]})},on=(0,M.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),q=(0,R.m1)(m=>{var C;const{withSearch:Z=!0,onReady:K}=m,ce=on(),{entityMetadata:{value:de,loading:Re},entityRef:st,setShadowRoot:Ge}=(0,g.x1)(),mt=It(st),Et=(0,r.useCallback)(et=>{Ge(et),K instanceof Function&&K()},[Ge,K]);return Re===!1&&!de?(0,h.jsx)(y.mf,{status:"404",statusMessage:"PAGE NOT FOUND"}):mt?(0,h.jsx)(y.VY,{children:(0,h.jsxs)(P.Z,{container:!0,children:[(0,h.jsx)(P.Z,{xs:12,item:!0,children:(0,h.jsx)(Ae,{})}),Z&&(0,h.jsx)(P.Z,{className:ce.search,xs:"auto",item:!0,children:(0,h.jsx)(a.S,{entityId:st,entityTitle:de==null||(C=de.metadata)===null||C===void 0?void 0:C.title})}),(0,h.jsx)(P.Z,{xs:12,item:!0,children:(0,h.jsx)(g.VA,{element:mt,onAppend:Et,children:(0,h.jsx)(rn,{})})})]})}):(0,h.jsx)(y.VY,{children:(0,h.jsx)(P.Z,{container:!0,children:(0,h.jsx)(P.Z,{xs:12,item:!0,children:(0,h.jsx)(Ae,{})})})})}),G=null},93225:function(bt,Oe,t){"use strict";t.d(Oe,{S:function(){return se}});var h=t(52322),r=t(2784),M=t(18671),P=t(60905),g=t(98069),y=t(73250),a=t(61886),$=t(40303),Se=t(25271),J=t(23196),H=t(60871),I=t(76635),T=t(95573);const Q=(0,h.jsx)(g.Z,{animation:"wave",variant:"text",height:40}),se=ne=>{const{children:k}=ne,E=(0,a.$L)(),z=(0,H.h_)(H.Ds),{title:N,setTitle:R,subtitle:oe,setSubtitle:Ae,entityRef:_e,metadata:{value:Ye,loading:dt},entityMetadata:{value:Me,loading:at}}=(0,a.x1)();(0,r.useEffect)(()=>{Ye&&(R(Ye.site_name),Ae(()=>{let{site_description:ge}=Ye;return(!ge||ge==="None")&&(ge=""),ge}))},[Ye,R,Ae]);const rt=z.getOptional("app.title")||"Backstage",ot=[N,oe,rt].filter(Boolean).join(" | "),{locationMetadata:We,spec:$e}=Me||{},St=$e==null?void 0:$e.lifecycle,gt=Me?(0,$.hF)(Me,Se.S4):[],Ct=(0,H.tg)(T._Z)(),Nt=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(J.i9,{label:(0,I.capitalize)((Me==null?void 0:Me.kind)||"entity"),value:(0,h.jsx)($.dx,{color:"inherit",entityRef:_e,title:Me==null?void 0:Me.metadata.title,defaultKind:"Component"})}),gt.length>0&&(0,h.jsx)(J.i9,{label:"Owner",value:(0,h.jsx)($.rI,{color:"inherit",entityRefs:gt,defaultKind:"group"})}),St?(0,h.jsx)(J.i9,{label:"Lifecycle",value:St}):null,We&&We.type!=="dir"&&We.type!=="file"?(0,h.jsx)(J.i9,{label:"",value:(0,h.jsxs)(P.Z,{container:!0,direction:"column",alignItems:"center",style:{color:"#fff"},children:[(0,h.jsx)(P.Z,{style:{padding:0},item:!0,children:(0,h.jsx)(y.Z,{style:{marginTop:"-25px"}})}),(0,h.jsx)(P.Z,{style:{padding:0},item:!0,children:"Source"})]}),url:We.target}):null]});return!at&&Me===void 0||!dt&&Ye===void 0?null:(0,h.jsxs)(J.h4,{type:"Documentation",typeLink:Ct,title:N||Q,subtitle:oe===""?void 0:oe||Q,children:[(0,h.jsx)(M.Z,{titleTemplate:"%s",children:(0,h.jsx)("title",{children:ot})}),Nt,k,E.renderComponentsByLocation(a.oZ.Header)]})}},65124:function(bt,Oe,t){"use strict";t.d(Oe,{b:function(){return I}});var h=t(52322),r=t(2784),M=t(79692),P=t(15223),g=t(95544),y=t(80030),a=t(61837),$=t(48348),Se=t(47603),J=t(61886);const H=(0,M.Z)(T=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:T.spacing(3,3,0)}})),I=T=>{const Q=H(),[se,ne]=(0,r.useState)(null),k=(0,r.useCallback)(_e=>{ne(_e.currentTarget)},[]),E=(0,r.useCallback)(()=>{ne(null)},[]),{entityMetadata:{value:z,loading:N}}=(0,J.x1)(),R=(0,J.$L)(),oe=R.renderComponentsByLocation(J.oZ.Subheader),Ae=R.renderComponentsByLocation(J.oZ.Settings);return!oe&&!Ae||N===!1&&!z?null:(0,h.jsx)(P.Z,{classes:Q,...T.toolbarProps,children:(0,h.jsxs)(g.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap",children:[oe,Ae?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(y.ZP,{title:"Settings",children:(0,h.jsx)(a.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:k,children:(0,h.jsx)(Se.Z,{})})}),(0,h.jsx)($.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:se,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(se),onClose:E,keepMounted:!0,children:Ae})]}):null]})})}},95481:function(bt,Oe,t){"use strict";t.d(Oe,{DK:function(){return I},m1:function(){return Q}});var h=t(52322),r=t(2784),M=t(79635),P=t(61886),g=t(60871),y=t(64279),a=t(77446);function $({contentLoading:se,content:ne,activeSyncState:k}){return se||k==="BUILD_READY_RELOAD"||!ne&&k==="CHECKING"?"CHECKING":!ne&&k==="BUILDING"?"INITIAL_BUILD":ne?k==="BUILDING"?"CONTENT_STALE_REFRESHING":k==="BUILD_READY"?"CONTENT_STALE_READY":k==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function Se(se,ne){const k={...se};switch(ne.type){case"sync":ne.state==="CHECKING"&&(k.buildLog=[]),k.activeSyncState=ne.state,k.syncError=ne.syncError;break;case"contentLoading":k.contentLoading=!0,k.contentError=void 0;break;case"content":typeof ne.path=="string"&&(k.path=ne.path),k.contentLoading=!1,k.content=ne.content,k.contentError=ne.contentError;break;case"buildLog":k.buildLog=k.buildLog.concat(ne.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(k.activeSyncState)&&["contentLoading","content"].includes(ne.type)&&(k.activeSyncState="UP_TO_DATE",k.buildLog=[]),k}function J(se,ne,k,E){var z,N;const[R,oe]=(0,r.useReducer)(Se,{activeSyncState:"CHECKING",path:E,contentLoading:!0,buildLog:[]}),Ae=(0,g.h_)(P.Dl),{retry:_e}=(0,a.Z)(async()=>{oe({type:"contentLoading"});try{const Me=await Ae.getEntityDocs({kind:se,namespace:ne,name:k},E);return oe({type:"content",content:Me,path:E}),Me}catch(Me){oe({type:"content",contentError:Me,path:E})}},[Ae,se,ne,k,E]),Ye=(0,r.useRef)({content:void 0,reload:()=>{}});return Ye.current={content:R.content,reload:_e},(0,y.default)(async()=>{oe({type:"sync",state:"CHECKING"});const Me=setTimeout(()=>{oe({type:"sync",state:"BUILDING"})},1e3);try{switch(await Ae.syncEntityDocs({kind:se,namespace:ne,name:k},rt=>{oe({type:"buildLog",log:rt})})){case"updated":Ye.current.content?oe({type:"sync",state:"BUILD_READY"}):(Ye.current.reload(),oe({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":oe({type:"sync",state:"UP_TO_DATE"});break;default:oe({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(at){oe({type:"sync",state:"ERROR",syncError:at})}finally{clearTimeout(Me)}},[se,k,ne,Ae,oe,Ye]),{state:(0,r.useMemo)(()=>$({activeSyncState:R.activeSyncState,contentLoading:R.contentLoading,content:R.content}),[R.activeSyncState,R.content,R.contentLoading]),contentReload:_e,path:R.path,content:R.content,contentErrorMessage:(z=R.contentError)===null||z===void 0?void 0:z.toString(),syncErrorMessage:(N=R.syncError)===null||N===void 0?void 0:N.toString(),buildLog:R.buildLog}}const H=(0,r.createContext)({}),I=()=>(0,r.useContext)(H),T=({children:se})=>{const{"*":ne=""}=(0,M.UO)(),{entityRef:k}=(0,P.x1)(),{kind:E,namespace:z,name:N}=k,R=J(E,z,N,ne);return(0,h.jsx)(H.Provider,{value:R,children:se instanceof Function?se(R):se})},Q=se=>ne=>(0,h.jsx)(T,{children:(0,h.jsx)(se,{...ne})})},95573:function(bt,Oe,t){"use strict";t.d(Oe,{Fw:function(){return M},_Z:function(){return r},pd:function(){return P}});var h=t(60871);const r=(0,h.NT)({id:"techdocs:index-page"}),M=(0,h.NT)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),P=(0,h.NT)({id:"techdocs:catalog-reader-view"})},55511:function(bt,Oe,t){"use strict";t.r(Oe),t.d(Oe,{TechDocsSearchResultListItem:function(){return J}});var h=t(52322),r=t(2784),M=t(79692),P=t(49378),g=t(86136),y=t(90436),a=t(23196),$=t(15096);const Se=(0,M.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),J=H=>{const{result:I,highlight:T,lineClamp:Q=5,asListItem:se=!0,asLink:ne=!0,title:k,icon:E}=H,z=Se(),N=({children:Ae})=>ne?(0,h.jsx)(a.rU,{noTrack:!0,to:I.location,children:Ae}):(0,h.jsx)(h.Fragment,{children:Ae}),R=()=>{const Ae=T!=null&&T.fields.title?(0,h.jsx)($.FA,{text:T.fields.title,preTag:T.preTag,postTag:T.postTag}):I.title,_e=T!=null&&T.fields.entityTitle?(0,h.jsx)($.FA,{text:T.fields.entityTitle,preTag:T.preTag,postTag:T.postTag}):I.entityTitle,Ye=T!=null&&T.fields.name?(0,h.jsx)($.FA,{text:T.fields.name,preTag:T.preTag,postTag:T.postTag}):I.name;return I?(0,h.jsx)(P.Z,{className:z.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,h.jsx)(N,{children:k||(0,h.jsxs)(h.Fragment,{children:[Ae," | ",_e!=null?_e:Ye," docs"]})}),secondary:(0,h.jsx)(y.Z,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:Q,overflow:"hidden"},children:T!=null&&T.fields.text?(0,h.jsx)($.FA,{text:T.fields.text,preTag:T.preTag,postTag:T.postTag}):I.text})}):null},oe=({children:Ae})=>se?(0,h.jsxs)(h.Fragment,{children:[E&&(0,h.jsx)(g.Z,{children:typeof E=="function"?E(I):E}),(0,h.jsx)("div",{className:z.flexContainer,children:Ae})]}):(0,h.jsx)(h.Fragment,{children:Ae});return(0,h.jsx)(oe,{children:(0,h.jsx)(R,{})})}},22478:function(bt,Oe,t){"use strict";t.d(Oe,{S:function(){return H}});var h=t(52322),r=t(15096),M=t(79692),P=t(27556),g=t(2784),y=t(79635),a=t(55511);const $=(0,M.Z)(I=>({root:{width:"100%"},bar:{padding:I.spacing(1)}})),Se=I=>I==null?void 0:I.document,J=I=>{const{entityId:T,entityTitle:Q,debounceTime:se=150}=I,[ne,k]=(0,g.useState)(!1),E=(0,y.s0)(),{setFilters:z,result:{loading:N,value:R}}=(0,r.Rx)(),oe=$(),[Ae,_e]=(0,g.useState)([]);(0,g.useEffect)(()=>{let rt=!0;if(rt&&R){const ot=R.results.slice(0,10);_e(ot)}return()=>{rt=!1}},[N,R]);const{kind:Ye,name:dt,namespace:Me}=T;(0,g.useEffect)(()=>{z(rt=>({...rt,kind:Ye,namespace:Me,name:dt}))},[Ye,Me,dt,z]);const at=(rt,ot)=>{if(Se(ot)){const{location:We}=ot.document;E(We)}};return(0,h.jsx)(P.Z,{className:oe.bar,variant:"outlined",children:(0,h.jsx)(r.qO,{classes:{root:oe.root},"data-testid":"techdocs-search-bar",size:"small",open:ne,getOptionLabel:()=>"",filterOptions:rt=>rt,onClose:()=>{k(!1)},onFocus:()=>{k(!0)},onChange:at,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Ae,renderOption:({document:rt,highlight:ot})=>(0,h.jsx)(a.TechDocsSearchResultListItem,{result:rt,lineClamp:3,asListItem:!1,asLink:!1,title:rt.title,highlight:ot}),loading:N,inputDebounceTime:se,inputPlaceholder:`Search ${Q||T.name} docs`,freeSolo:!1})})},H=I=>{const T={term:"",types:["techdocs"],pageCursor:"",filters:I.entityId};return(0,h.jsx)(r.Nd,{initialState:T,children:(0,h.jsx)(J,{...I})})}},53260:function(){}},function(bt){var Oe=function(h){return bt(bt.s=h)};bt.O(0,[2370,6202,9284,9035,2126,7012,2194,1410,427,6816,5218,5924,4736],function(){return Oe(6290)});var t=bt.O()}]);})();
|
|
502
|
-
|
|
503
|
-
//# sourceMappingURL=main.ca2552f1.js.map
|