@techdocs/cli 1.1.3-next.1 → 1.1.3
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 +11 -0
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{1553.c884332b.chunk.js → 1553.c2a9eb50.chunk.js} +2 -2
- package/dist/embedded-app/static/{1553.c884332b.chunk.js.map → 1553.c2a9eb50.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{2426.56f057f3.chunk.js → 2426.32fc1ca1.chunk.js} +2 -2
- package/dist/embedded-app/static/{2426.56f057f3.chunk.js.map → 2426.32fc1ca1.chunk.js.map} +1 -1
- package/dist/embedded-app/static/3555.4d83af5a.chunk.js +8 -0
- package/dist/embedded-app/static/3555.4d83af5a.chunk.js.map +1 -0
- package/dist/embedded-app/static/{390.7315e170.chunk.js → 390.74a27040.chunk.js} +2 -2
- package/dist/embedded-app/static/{390.7315e170.chunk.js.map → 390.74a27040.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{4022.e53705a4.chunk.js → 4022.ca590614.chunk.js} +2 -2
- package/dist/embedded-app/static/{4022.e53705a4.chunk.js.map → 4022.ca590614.chunk.js.map} +1 -1
- package/dist/embedded-app/static/4949.bffcfed7.chunk.js +3 -0
- package/dist/embedded-app/static/4949.bffcfed7.chunk.js.map +1 -0
- package/dist/embedded-app/static/{6235.fb68ef83.chunk.js → 6235.61c00d19.chunk.js} +2 -2
- package/dist/embedded-app/static/{6235.fb68ef83.chunk.js.map → 6235.61c00d19.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{6583.19098eda.chunk.js → 6583.0b42ebbe.chunk.js} +2 -2
- package/dist/embedded-app/static/{6583.19098eda.chunk.js.map → 6583.0b42ebbe.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7110.b2c2b46c.chunk.js → 7110.135c2721.chunk.js} +2 -2
- package/dist/embedded-app/static/{7110.b2c2b46c.chunk.js.map → 7110.135c2721.chunk.js.map} +1 -1
- package/dist/embedded-app/static/7758.75aef2ae.chunk.js +3 -0
- package/dist/embedded-app/static/7758.75aef2ae.chunk.js.map +1 -0
- package/dist/embedded-app/static/{8061.b78f645f.chunk.js → 8061.f5e20bb7.chunk.js} +2 -2
- package/dist/embedded-app/static/{8061.b78f645f.chunk.js.map → 8061.f5e20bb7.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8718.b6fd1dca.chunk.js → 8718.bd799167.chunk.js} +2 -2
- package/dist/embedded-app/static/8718.bd799167.chunk.js.map +1 -0
- package/dist/embedded-app/static/{8792.0fea0909.chunk.js → 8792.6f60e67c.chunk.js} +2 -2
- package/dist/embedded-app/static/{8792.0fea0909.chunk.js.map → 8792.6f60e67c.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9028.48dec376.chunk.js → 9028.1e31ab6a.chunk.js} +2 -2
- package/dist/embedded-app/static/{9028.48dec376.chunk.js.map → 9028.1e31ab6a.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.a9307e40.js +487 -0
- package/dist/embedded-app/static/main.a9307e40.js.map +1 -0
- package/dist/embedded-app/static/module-luxon.ee0def5d.js +3 -0
- package/dist/embedded-app/static/module-luxon.ee0def5d.js.map +1 -0
- package/dist/embedded-app/static/{module-material-ui.1e05f502.js → module-material-ui.cd8dff4a.js} +11 -11
- package/dist/embedded-app/static/module-material-ui.cd8dff4a.js.map +1 -0
- package/dist/embedded-app/static/module-yaml.0874c6f8.js +136 -0
- package/dist/embedded-app/static/module-yaml.0874c6f8.js.map +1 -0
- package/dist/embedded-app/static/module-zod.53b5d347.js +3 -0
- package/dist/embedded-app/static/module-zod.53b5d347.js.map +1 -0
- package/dist/embedded-app/static/{runtime.a38c77d9.js → runtime.a9307e40.js} +2 -2
- package/dist/embedded-app/static/{runtime.a38c77d9.js.map → runtime.a9307e40.js.map} +1 -1
- package/dist/embedded-app/static/vendor.a9307e40.js +102 -0
- package/dist/embedded-app/static/vendor.a9307e40.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/package.json +7 -7
- package/dist/embedded-app/static/1959.9f791e1b.chunk.js +0 -8
- package/dist/embedded-app/static/1959.9f791e1b.chunk.js.map +0 -1
- package/dist/embedded-app/static/3860.30afe880.chunk.js +0 -3
- package/dist/embedded-app/static/3860.30afe880.chunk.js.map +0 -1
- package/dist/embedded-app/static/7758.94a98122.chunk.js +0 -3
- package/dist/embedded-app/static/7758.94a98122.chunk.js.map +0 -1
- package/dist/embedded-app/static/8718.b6fd1dca.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.a38c77d9.js +0 -487
- package/dist/embedded-app/static/main.a38c77d9.js.map +0 -1
- package/dist/embedded-app/static/module-material-ui.1e05f502.js.map +0 -1
- package/dist/embedded-app/static/module-yaml.63d08f2d.js +0 -151
- package/dist/embedded-app/static/module-yaml.63d08f2d.js.map +0 -1
- package/dist/embedded-app/static/module-zod.2193e794.js +0 -3
- package/dist/embedded-app/static/module-zod.2193e794.js.map +0 -1
- package/dist/embedded-app/static/vendor.a38c77d9.js +0 -103
- package/dist/embedded-app/static/vendor.a38c77d9.js.map +0 -1
|
@@ -1,487 +0,0 @@
|
|
|
1
|
-
(()=>{var qi=Object.defineProperty;var _i=(te,s,e)=>s in te?qi(te,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):te[s]=e;var q=(te,s,e)=>(_i(te,typeof s!="symbol"?s+"":s,e),e),po=(te,s,e)=>{if(!s.has(te))throw TypeError("Cannot "+e)};var rt=(te,s,e)=>(po(te,s,"read from private field"),e?e.call(te):s.get(te)),On=(te,s,e)=>{if(s.has(te))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(te):s.set(te,e)},Bn=(te,s,e,r)=>(po(te,s,"write to private field"),r?r.call(te,e):s.set(te,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(te,s,e){"use strict";e.d(s,{n3:function(){return R},MS:function(){return m}});var r=e(48023),t=e(10179),l=e(96279),u=e.n(l);const R=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class m{constructor(c){q(this,"discoveryApi");q(this,"fetchApi");this.discoveryApi=c.discoveryApi,this.fetchApi=c.fetchApi||{fetch:u()}}async getEntityAncestors(c,f){const{kind:y,namespace:p,name:E}=(0,r.of)(c.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(p)}/${encodeURIComponent(E)}/ancestry`,f)}async getLocationById(c,f){return await this.requestOptional("GET",`/locations/${encodeURIComponent(c)}`,f)}async getEntities(c,f){const{filter:y=[],fields:p=[],offset:E,limit:T,after:L}=c!=null?c:{},M=[];for(const O of[y].flat()){const F=[];for(const[U,Y]of Object.entries(O))for(const ne of[Y].flat())ne===R?F.push(encodeURIComponent(U)):typeof ne=="string"&&F.push(`${encodeURIComponent(U)}=${encodeURIComponent(ne)}`);F.length&&M.push(`filter=${F.join(",")}`)}p.length&&M.push(`fields=${p.map(encodeURIComponent).join(",")}`),E!==void 0&&M.push(`offset=${E}`),T!==void 0&&M.push(`limit=${T}`),L!==void 0&&M.push(`after=${encodeURIComponent(L)}`);const j=M.length?`?${M.join("&")}`:"",w=await this.requestRequired("GET",`/entities${j}`,f),b=(O,F)=>{var ne,ue;if(((ne=O.metadata)==null?void 0:ne.name)===void 0||O.kind===void 0||((ue=F.metadata)==null?void 0:ue.name)===void 0||F.kind===void 0)return 0;const U=(0,r.eE)(O),Y=(0,r.eE)(F);return U<Y?-1:U>Y?1:0};return{items:w.sort(b)}}async getEntityByRef(c,f){const{kind:y,namespace:p,name:E}=(0,r.of)(c);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(p)}/${encodeURIComponent(E)}`,f)}async getEntityByName(c,f){const{kind:y,namespace:p="default",name:E}=c;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(p)}/${encodeURIComponent(E)}`,f)}async refreshEntity(c,f){const y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(f==null?void 0:f.token)&&{Authorization:`Bearer ${f==null?void 0:f.token}`}},method:"POST",body:JSON.stringify({entityRef:c})});if(y.status!==200)throw new Error(await y.text())}async getEntityFacets(c,f){const{filter:y=[],facets:p}=c,E=[];for(const L of[y].flat()){const M=[];for(const[j,w]of Object.entries(L))for(const b of[w].flat())b===R?M.push(encodeURIComponent(j)):typeof b=="string"&&M.push(`${encodeURIComponent(j)}=${encodeURIComponent(b)}`);M.length&&E.push(`filter=${M.join(",")}`)}for(const L of p)E.push(`facet=${encodeURIComponent(L)}`);const T=E.length?`?${E.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${T}`,f)}async addLocation({type:c="url",target:f,dryRun:y},p){const E=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${y?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(p==null?void 0:p.token)&&{Authorization:`Bearer ${p==null?void 0:p.token}`}},method:"POST",body:JSON.stringify({type:c,target:f})});if(E.status!==201)throw new Error(await E.text());const{location:T,entities:L,exists:M}=await E.json();if(!T)throw new Error(`Location wasn't added: ${f}`);return{location:T,entities:L,exists:M}}async getLocationByRef(c,f){return(await this.requestRequired("GET","/locations",f)).map(p=>p.data).find(p=>c===(0,r.NZ)(p))}async removeLocationById(c,f){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(c)}`,f)}async removeEntityByUid(c,f){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(c)}`,f)}async requestIgnored(c,f,y){const p=`${await this.discoveryApi.getBaseUrl("catalog")}${f}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},T=await this.fetchApi.fetch(p,{method:c,headers:E});if(!T.ok)throw await t.VL.fromResponse(T)}async requestRequired(c,f,y){const p=`${await this.discoveryApi.getBaseUrl("catalog")}${f}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},T=await this.fetchApi.fetch(p,{method:c,headers:E});if(!T.ok)throw await t.VL.fromResponse(T);return await T.json()}async requestOptional(c,f,y){const p=`${await this.discoveryApi.getBaseUrl("catalog")}${f}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},T=await this.fetchApi.fetch(p,{method:c,headers:E});if(!T.ok){if(T.status===404)return;throw await t.VL.fromResponse(T)}return await T.json()}}},48023:function(te,s,e){"use strict";e.d(s,{Tf:function(){return l},P1:function(){return Lt},q1:function(){return Pt},M6:function(){return Nt},l2:function(){return t},zG:function(){return r},w$:function(){return Q},nP:function(){return Z},aS:function(){return Ke},S4:function(){return fe},cz:function(){return Ae},iB:function(){return _e},of:function(){return et},Ou:function(){return At},eE:function(){return it},NZ:function(){return at}});const r="default",t="backstage.io/view-url",l="backstage.io/edit-url";var u=e(76635),R=e.n(u);class m{constructor(V=DEFAULT_NAMESPACE){q(this,"namespace");this.namespace=V}async enforce(V){return V.metadata.namespace?V:lodash.merge({metadata:{namespace:this.namespace}},V)}}class o{static isValidPrefixAndOrSuffix(V,ye,We,qe){if(typeof V!="string")return!1;const nt=V.split(ye);return nt.length===1?qe(nt[0]):nt.length===2?We(nt[0])&&qe(nt[1]):!1}static isJsonSafe(V){try{return R().isEqual(V,JSON.parse(JSON.stringify(V)))}catch{return!1}}static isValidDnsSubdomain(V){return typeof V=="string"&&V.length>=1&&V.length<=253&&V.split(".").every(o.isValidDnsLabel)}static isValidDnsLabel(V){return typeof V=="string"&&V.length>=1&&V.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(V)}static isValidTag(V){return typeof V=="string"&&V.length>=1&&V.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(V)}static isValidUrl(V){if(typeof V!="string")return!1;try{return new URL(V),!0}catch{return!1}}static isValidString(V){var ye;return typeof V=="string"&&((ye=V==null?void 0:V.trim())==null?void 0:ye.length)>=1}static isNonEmptyString(V){var ye;return typeof V=="string"&&((ye=V==null?void 0:V.trim())==null?void 0:ye.length)>=1}}var c=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),f=e(48231),y=e.n(f),p=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"}}}`),E=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}}}}}}'),T=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 L=new Map,M=[c,p,E,T];function j(_){if(!(_!=null&&_.length))throw new TypeError("Unknown error");const V=_[0];throw new TypeError(`${V.instancePath||"<root>"} ${V.message}${V.params?` - ${Object.entries(V.params).map(([ye,We])=>`${ye}: ${We}`).join(", ")}`:""}`)}function w(_,V={}){var Ut;const ye=(Ut=V==null?void 0:V.disableCache)!=null?Ut:!1,We=ye?"":JSON.stringify(_);if(!ye){const Xt=L.get(We);if(Xt)return Xt}const qe=b(_),nt=new(y())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});qe.length&&nt.addSchema(qe,void 0,void 0,!0);const Tt=nt.compile(_);return ye||L.set(We,Tt),Tt}function b(_){if(typeof _!="object")return[];const V=new Set;_.$id&&V.add(_.$id);const ye=new Array,We=[_];for(;We.length;){const qe=We.pop();for(const nt of O(qe))if(!V.has(nt)){V.add(nt);const Tt=M.find(Ut=>Ut.$id===nt);Tt&&(ye.push(Tt),We.push(Tt))}}return ye}function*O(_){const V=[_];for(;V.length;){const ye=V.pop();if(typeof ye=="object"&&ye)for(const[We,qe]of Object.entries(ye))We==="$ref"&&typeof qe=="string"?yield qe.split("#")[0]:V.push(qe)}}function F(_){const V=compileAjvSchema(_||entityEnvelopeSchema);return ye=>{if(V(ye)===!0)return ye;throw throwAjvError(V.errors)}}function U(_){const V=w(_);return ye=>{var nt;if(V(ye)===!0)return ye;const qe=(nt=V.errors)==null?void 0:nt.filter(Tt=>["/kind","/apiVersion"].includes(Tt.instancePath));if((qe==null?void 0:qe.length)&&qe.every(Tt=>Tt.keyword==="enum"))return!1;throw j(V.errors)}}function Y(_){const V=compileAjvSchema(_||entitySchema);return ye=>{if(V(ye)===!0)return ye;throw throwAjvError(V.errors)}}class ne{static isValidApiVersion(V){return o.isValidPrefixAndOrSuffix(V,"/",o.isValidDnsSubdomain,ye=>ye.length>=1&&ye.length<=63&&/^[a-z0-9A-Z]+$/.test(ye))}static isValidKind(V){return typeof V=="string"&&V.length>=1&&V.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(V)}static isValidObjectName(V){return typeof V=="string"&&V.length>=1&&V.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(V)}static isValidNamespace(V){return o.isValidDnsLabel(V)}static isValidLabelKey(V){return o.isValidPrefixAndOrSuffix(V,"/",o.isValidDnsSubdomain,ne.isValidObjectName)}static isValidLabelValue(V){return V===""||ne.isValidObjectName(V)}static isValidAnnotationKey(V){return o.isValidPrefixAndOrSuffix(V,"/",o.isValidDnsSubdomain,ne.isValidObjectName)}static isValidAnnotationValue(V){return typeof V=="string"}}const ue={isValidApiVersion:ne.isValidApiVersion,isValidKind:ne.isValidKind,isValidEntityName:ne.isValidObjectName,isValidNamespace:ne.isValidNamespace,isValidLabelKey:ne.isValidLabelKey,isValidLabelValue:ne.isValidLabelValue,isValidAnnotationKey:ne.isValidAnnotationKey,isValidAnnotationValue:ne.isValidAnnotationValue,isValidTag:_=>typeof _=="string"&&_.length>=1&&_.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(_)};function Re(_={}){return{...ue,..._}}class we{constructor(V=makeValidator()){q(this,"validators");this.validators=V}async enforce(V){var Tt,Ut,Xt,cn,un,xt,fn;function ye(x,re,ve){if(re==null)throw new Error(`${x} must have a value`);let be;try{be=ve(re)}catch(Ie){throw new Error(`${x} could not be validated, ${Ie}`)}if(!be){let Ie;switch(ve.name){case"isValidLabelValue":case"isValidObjectName":Ie="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":Ie="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":Ie="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":Ie="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":Ie="a string";break;case"isValidKind":Ie="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":Ie="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":Ie="a non empty string";break;default:Ie=void 0;break}const Je=Ie?` expected ${Ie} but found "${re}".`:"";throw new Error(`"${x}" is not valid;${Je} 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 We(x,re,ve){return re===void 0||ye(x,re,ve)}ye("apiVersion",V.apiVersion,this.validators.isValidApiVersion),ye("kind",V.kind,this.validators.isValidKind),ye("metadata.name",V.metadata.name,this.validators.isValidEntityName),We("metadata.namespace",V.metadata.namespace,this.validators.isValidNamespace);for(const[x,re]of Object.entries((Tt=V.metadata.labels)!=null?Tt:[]))ye(`labels.${x}`,x,this.validators.isValidLabelKey),ye(`labels.${x}`,re,this.validators.isValidLabelValue);for(const[x,re]of Object.entries((Ut=V.metadata.annotations)!=null?Ut:[]))ye(`annotations.${x}`,x,this.validators.isValidAnnotationKey),ye(`annotations.${x}`,re,this.validators.isValidAnnotationValue);const qe=(Xt=V.metadata.tags)!=null?Xt:[];for(let x=0;x<qe.length;++x)ye(`tags.${x}`,qe[x],this.validators.isValidTag);const nt=(cn=V.metadata.links)!=null?cn:[];for(let x=0;x<nt.length;++x)ye(`links.${x}.url`,(un=nt[x])==null?void 0:un.url,CommonValidatorFunctions.isValidUrl),We(`links.${x}.title`,(xt=nt[x])==null?void 0:xt.title,CommonValidatorFunctions.isNonEmptyString),We(`links.${x}.icon`,(fn=nt[x])==null?void 0:fn.icon,KubernetesValidatorFunctions.isValidObjectName);return V}}class ge{constructor(){q(this,"validate")}async enforce(V){if(!this.validate){const qe=new Ajv({allowUnionTypes:!0});this.validate=qe.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(V)===!0)return V;const[We]=this.validate.errors||[];throw We?new Error(`Malformed envelope, ${We.instancePath||"<root>"} ${We.message}`):new Error("Malformed envelope, Unknown error")}}function ze(_){let V=_.indexOf(":");const ye=_.indexOf("/");ye!==-1&&ye<V&&(V=-1);const We=V===-1?void 0:_.slice(0,V),qe=ye===-1?void 0:_.slice(V+1,ye),nt=_.slice(Math.max(V+1,ye+1));if(We===""||qe===""||nt==="")throw new TypeError(`Entity reference "${_}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:We,namespace:qe,name:nt}}function _e(_){return{kind:_.kind,namespace:_.metadata.namespace||r,name:_.metadata.name}}function et(_,V){var Ut,Xt,cn,un;if(!_)throw new Error("Entity reference must not be empty");const ye=V==null?void 0:V.defaultKind,We=(V==null?void 0:V.defaultNamespace)||r;let qe,nt,Tt;if(typeof _=="string"){const xt=ze(_);qe=(Ut=xt.kind)!=null?Ut:ye,nt=(Xt=xt.namespace)!=null?Xt:We,Tt=xt.name}else qe=(cn=_.kind)!=null?cn:ye,nt=(un=_.namespace)!=null?un:We,Tt=_.name;if(qe)if(nt){if(!Tt){const xt=JSON.stringify(_);throw new Error(`Entity reference ${xt} had missing or empty name`)}}else{const xt=JSON.stringify(_);throw new Error(`Entity reference ${xt} had missing or empty namespace`)}else{const xt=JSON.stringify(_);throw new Error(`Entity reference ${xt} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:qe,namespace:nt,name:Tt}}function it(_){var qe,nt;let V,ye,We;return"metadata"in _?(V=_.kind,ye=(qe=_.metadata.namespace)!=null?qe:r,We=_.metadata.name):(V=_.kind,ye=(nt=_.namespace)!=null?nt:r,We=_.name),`${V.toLocaleLowerCase("en-US")}:${ye.toLocaleLowerCase("en-US")}/${We.toLocaleLowerCase("en-US")}`}class St{constructor(V){this.policies=V}async enforce(V){let ye=V;for(const We of this.policies){const qe=await We.enforce(ye);if(!qe)throw new Error(`Policy ${We.constructor.name} did not return a result`);ye=qe}return ye}}class Et{constructor(V){this.policies=V}async enforce(V){for(const ye of this.policies){const We=await ye.enforce(V);if(We)return We}throw new Error("The entity did not match any known policy")}}const Pe={allOf(_){return new St(_)},oneOf(_){return new Et(_)}};var pt=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ApiV1alpha1","description":"An API describes an interface that can be exposed by a component. The API can be defined in different formats, like OpenAPI, AsyncAPI, GraphQL, gRPC, or other formats.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"API","metadata":{"name":"artist-api","description":"Retrieve artist details","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"openapi","lifecycle":"production","owner":"artist-relations-team","system":"artist-engagement-portal","definition":"openapi: \\"3.0.0\\"\\ninfo:..."}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["API"]},"spec":{"type":"object","required":["type","lifecycle","owner","definition"],"properties":{"type":{"type":"string","description":"The type of the API definition.","examples":["openapi","asyncapi","graphql","grpc"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the API.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the API.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the API belongs to.","minLength":1},"definition":{"type":"string","description":"The definition of the API, based on the format defined by the type.","minLength":1}}}}}]}');function Ge(_){const V=U(_);return{async check(ye){return V(ye)===ye}}}const ie=Ge(pt);var de=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 Ue=Ge(de);var Be=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 Xe=Ge(Be);var ht=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 ke=Ge(ht);var vt=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 oe=Ge(vt),fe="ownedBy",tt="ownerOf",Ye="consumesApi",Ne="apiConsumedBy",ut="providesApi",X="apiProvidedBy",Z="dependsOn",Q="dependencyOf",se="parentOf",ce="childOf",Ce="memberOf",Le="hasMember",Ae="partOf",Ke="hasPart";var je=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 gt=Ge(je);var Ct=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 dt=Ge(Ct);var Rt=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 bt=Ge(Rt),Lt="backstage.io/managed-by-location",Pt="backstage.io/managed-by-origin-location",Nt="backstage.io/source-location";function At(_){if(typeof _!="string")throw new TypeError(`Unable to parse location ref '${_}', unexpected argument ${typeof _}`);const V=_.indexOf(":");if(V<0)throw new TypeError(`Unable to parse location ref '${_}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const ye=_.substring(0,V).trim(),We=_.substring(V+1).trim();if(!ye||!We)throw new TypeError(`Unable to parse location ref '${_}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(ye==="http"||ye==="https")throw new TypeError(`Invalid location ref '${_}', please prefix it with 'url:', e.g. 'url:${_}'`);return{type:ye,target:We}}function at(_){const{type:V,target:ye}=_;if(V){if(!ye)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${V}:${ye}`}function Zn(_){var ye,We,qe,nt,Tt;const V=(Tt=(We=(ye=_.metadata)==null?void 0:ye.annotations)==null?void 0:We[ANNOTATION_SOURCE_LOCATION])!=null?Tt:(nt=(qe=_.metadata)==null?void 0:qe.annotations)==null?void 0:nt[ANNOTATION_LOCATION];if(!V)throw new Error(`Entity '${stringifyEntityRef(_)}' is missing location`);return At(V)}},23235:function(te,s,e){"use strict";e.d(s,{C:function(){return t}});var r=e(98005);class t{constructor(){q(this,"subject",new r.J)}post(u){this.subject.next(u)}alert$(){return this.subject}}},47150:function(te,s,e){"use strict";e.d(s,{g:function(){return r}});class r{captureEvent(l){}}},58652:function(te,s,e){"use strict";e.d(s,{C:function(){return l}});var r=e(98005);const t="theme";class l{constructor(R){q(this,"activeThemeId");q(this,"subject",new r.X(void 0));this.themes=R}static createWithStorage(R){var c;const m=new l(R);if(!window.localStorage)return m;const o=(c=window.localStorage.getItem(t))!=null?c:void 0;return m.setActiveThemeId(o),m.activeThemeId$().subscribe(f=>{f?window.localStorage.setItem(t,f):window.localStorage.removeItem(t)}),window.addEventListener("storage",f=>{var y;if(f.key===t){const p=(y=localStorage.getItem(t))!=null?y:void 0;m.setActiveThemeId(p)}}),m}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(R){this.activeThemeId=R,this.subject.next(R)}}},14721:function(te,s,e){"use strict";e.d(s,{m:function(){return f}});var r=e(9850),t=e.n(r),l=e(12782),u=e.n(l);const R=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function m(y){return typeof y=="object"&&y!==null&&!Array.isArray(y)}function o(y){if(y===null)return"null";if(Array.isArray(y))return"array";const p=typeof y;return p==="number"&&isNaN(y)?"nan":p==="string"&&y===""?"empty-string":p}const c={type(y,p,E,T){return`Invalid type in config for key '${y}' in '${p}', got ${E}, wanted ${T}`},missing(y){return`Missing required config value at '${y}'`},convert(y,p,E){return`Unable to convert config value for key '${y}' in '${p}' to a ${E}`}};class f{constructor(p,E="mock-config",T,L=""){q(this,"filteredKeys");q(this,"notifiedFilteredKeys",new Set);this.data=p,this.context=E,this.fallback=T,this.prefix=L}static fromConfigs(p){return p.length===0?new f(void 0):p.reduce((E,{data:T,context:L,filteredKeys:M,deprecatedKeys:j})=>{const w=new f(T,L,E);if(w.filteredKeys=M,j)for(const{key:b,description:O}of j)console.warn(`The configuration key '${b}' of ${L} is deprecated and may be removed soon. ${O||""}`);return w},void 0)}has(p){var T,L;return this.readValue(p)!==void 0?!0:(L=(T=this.fallback)==null?void 0:T.has(p))!=null?L:!1}keys(){var T,L;const p=this.data?Object.keys(this.data):[],E=(L=(T=this.fallback)==null?void 0:T.keys())!=null?L:[];return[...new Set([...p,...E])]}get(p){const E=this.getOptional(p);if(E===void 0)throw new Error(c.missing(this.fullKey(p!=null?p:"")));return E}getOptional(p){var L;const E=t()(this.readValue(p)),T=(L=this.fallback)==null?void 0:L.getOptional(p);return E===void 0?T:T===void 0?E:u()({},{value:T},{value:E},(M,j)=>!m(j)||!m(M)?j:void 0).value}getConfig(p){const E=this.getOptionalConfig(p);if(E===void 0)throw new Error(c.missing(this.fullKey(p)));return E}getOptionalConfig(p){var L;const E=this.readValue(p),T=(L=this.fallback)==null?void 0:L.getOptionalConfig(p);if(m(E))return this.copy(E,p,T);if(E!==void 0)throw new TypeError(c.type(this.fullKey(p),this.context,o(E),"object"));return T}getConfigArray(p){const E=this.getOptionalConfigArray(p);if(E===void 0)throw new Error(c.missing(this.fullKey(p)));return E}getOptionalConfigArray(p){const E=this.readConfigValue(p,T=>{if(!Array.isArray(T))return{expected:"object-array"};for(const[L,M]of T.entries())if(!m(M))return{expected:"object-array",value:M,key:`${p}[${L}]`};return!0});if(!!E)return E.map((T,L)=>this.copy(T,`${p}[${L}]`))}getNumber(p){const E=this.getOptionalNumber(p);if(E===void 0)throw new Error(c.missing(this.fullKey(p)));return E}getOptionalNumber(p){const E=this.readConfigValue(p,L=>typeof L=="number"||typeof L=="string"||{expected:"number"});if(typeof E=="number"||E===void 0)return E;const T=Number(E);if(!Number.isFinite(T))throw new Error(c.convert(this.fullKey(p),this.context,"number"));return T}getBoolean(p){const E=this.getOptionalBoolean(p);if(E===void 0)throw new Error(c.missing(this.fullKey(p)));return E}getOptionalBoolean(p){return this.readConfigValue(p,E=>typeof E=="boolean"||{expected:"boolean"})}getString(p){const E=this.getOptionalString(p);if(E===void 0)throw new Error(c.missing(this.fullKey(p)));return E}getOptionalString(p){return this.readConfigValue(p,E=>typeof E=="string"&&E!==""||{expected:"string"})}getStringArray(p){const E=this.getOptionalStringArray(p);if(E===void 0)throw new Error(c.missing(this.fullKey(p)));return E}getOptionalStringArray(p){return this.readConfigValue(p,E=>{if(!Array.isArray(E))return{expected:"string-array"};for(const[T,L]of E.entries())if(typeof L!="string"||L==="")return{expected:"string-array",value:L,key:`${p}[${T}]`};return!0})}fullKey(p){return`${this.prefix}${this.prefix?".":""}${p}`}copy(p,E,T){const L=new f(p,this.context,T,this.fullKey(E));return L.filteredKeys=this.filteredKeys,L}readConfigValue(p,E){var M;const T=this.readValue(p);if(T===void 0)return(M=this.fallback)==null?void 0:M.readConfigValue(p,E);const L=E(T);if(L!==!0){const{key:j=p,value:w=T,expected:b}=L;throw new TypeError(c.type(this.fullKey(j),this.context,o(w),b))}return T}readValue(p){const E=p?p.split("."):[];for(const L of E)if(!R.test(L))throw new TypeError(`Invalid config key '${p}'`);if(this.data===void 0)return;let T=this.data;for(const[L,M]of E.entries())if(m(T))T=T[M];else if(T!==void 0){const j=this.fullKey(E.slice(0,L).join("."));throw new TypeError(c.type(j,this.context,o(T),"object"))}return T}}},4333:function(te,s,e){"use strict";e.d(s,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(u){const R=u.split(/\{\{\s*pluginId\s*\}\}/),m=R.join("pluginId");let o;try{o=new URL(m)}catch{throw new Error(`${r} URL '${m}' is invalid`)}if(o.hash)throw new Error(`${r} URL must not have a hash`);if(o.search)throw new Error(`${r} URL must not have a query`);if(m.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(R)}constructor(u){this.parts=u}async getBaseUrl(u){return this.parts.join(u)}}},89536:function(te,s,e){"use strict";e.d(s,{KN:function(){return r},gr:function(){return l},Jv:function(){return u}});class r{constructor(m,o){this.alertApi=m,this.errorApi=o}post(m,o){return o!=null&&o.hidden||this.alertApi.post({message:m.message,severity:"error"}),this.errorApi.post(m,o)}error$(){return this.errorApi.error$()}}var t=e(98005);class l{constructor(){q(this,"subject",new t.J)}post(m,o){this.subject.next({error:m,context:o})}error$(){return this.subject}}class u{static forward(m,o){window.addEventListener("unhandledrejection",c=>{m.post(c.reason,o)})}}},14884:function(te,s,e){"use strict";e.d(s,{b:function(){return l}});var r=e(36964);function t(u){if(u.length<3)throw new Error(`The '${u}' feature flag must have a minimum length of three characters.`);if(u.length>150)throw new Error(`The '${u}' feature flag must not exceed 150 characters.`);if(!u.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${u}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class l{constructor(){q(this,"registeredFeatureFlags",[]);q(this,"flags")}registerFlag(R){t(R.name),this.registeredFeatureFlags.push(R)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(R){return this.flags||(this.flags=this.load()),this.flags.get(R)===r.FeatureFlagState.Active}save(R){this.flags||(this.flags=this.load()),R.merge||this.flags.clear();for(const[o,c]of Object.entries(R.states))this.flags.set(o,c);const m=Array.from(this.flags.entries()).filter(([,o])=>o===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(m)))}load(){try{const R=window.localStorage.getItem("featureFlags");if(!R)return new Map;const m=JSON.parse(R);if(typeof m!="object"||m===null||Array.isArray(m))return new Map;const o=Object.entries(m).filter(([c,f])=>(t(c),f===r.FeatureFlagState.Active));return new Map(o)}catch{return new Map}}}},50160:function(te,s,e){"use strict";e.d(s,{I:function(){return c},j:function(){return r}});function r(f){var E;let y=f.baseImplementation||e.g.fetch;const p=[(E=f.middleware)!=null?E:[]].flat().reverse();for(const T of p)y=T.apply(y);return{fetch:y}}class t{static create(y){var L,M;const p=l(y),E=((L=y.header)==null?void 0:L.name)||"authorization",T=((M=y.header)==null?void 0:M.value)||(j=>`Bearer ${j}`);return new t(y.identityApi,p,E,T)}constructor(y,p,E,T){this.identityApi=y,this.allowUrl=p,this.headerName=E,this.headerValue=T}apply(y){return async(p,E)=>{const T=new Request(p,E),{token:L}=await this.identityApi.getCredentials();return T.headers.get(this.headerName)||typeof L!="string"||!L||!this.allowUrl(T.url)?y(p,E):(T.headers.set(this.headerName,this.headerValue(L)),y(T))}}}function l(f){return f.allowUrl?f.allowUrl:f.urlPrefixAllowlist?u(f.urlPrefixAllowlist):f.config?u([f.config.getString("backend.baseUrl")]):()=>!1}function u(f){const y=f.map(p=>p.replace(/\/$/,""));return p=>y.some(E=>p===E||p.startsWith(`${E}/`))}function R(f,y){return!y||y==="/"?f:`${f.replace(/\/$/,"")}/${y.replace(/^\//,"")}`}class m{constructor(y){this.discoveryApi=y}apply(y){return async(p,E)=>{const T=new Request(p,E),L="plugin://";if(!T.url.startsWith(L))return y(p,E);const{hostname:M,pathname:j,search:w,hash:b,username:O,password:F}=new URL(`http://${T.url.substring(L.length)}`);let U=await this.discoveryApi.getBaseUrl(M);if(O||F){const ne=new URL(U),ue=`${O}${F?`:${F}`:""}@`;U=`${ne.protocol}//${ue}${ne.host}${ne.pathname}`}const Y=`${R(U,j)}${w}${b}`;return y(Y,typeof p=="string"||o(p)?E:p)}}}function o(f){return typeof f=="object"&&(f==null?void 0:f.constructor)===URL}class c{static resolvePluginProtocol(y){return new m(y.discoveryApi)}static injectIdentityAuth(y){return t.create(y)}constructor(){}}},11358:function(te,s,e){"use strict";e.d(s,{Y:function(){return R}});var r=e(98005);function t(m,o){for(const c of o)if(!m.has(c))return!1;return!0}function l(m,...o){const c=new Set(m);for(const f of o)for(const y of f)c.add(y);return c}class u{constructor(){q(this,"requests",[]);q(this,"subject",new r.X(this.getCurrentPending()))}request(o){return new Promise((c,f)=>{this.requests.push({scopes:o,resolve:c,reject:f}),this.subject.next(this.getCurrentPending())})}resolve(o,c){this.requests=this.requests.filter(f=>t(o,f.scopes)?(f.resolve(c),!1):!0),this.subject.next(this.getCurrentPending())}reject(o){this.requests.forEach(c=>c.reject(o)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const o=this.requests.length===0?void 0:this.requests.slice(1).reduce((c,f)=>l(c,f.scopes),this.requests[0].scopes);return{scopes:o,resolve:c=>{o&&this.resolve(o,c)},reject:c=>{o&&this.reject(c)}}}}class R{constructor(){q(this,"subject",new r.X([]));q(this,"currentRequests",[]);q(this,"handlerCount",0)}createAuthRequester(o){const c=new u,f=this.handlerCount;return this.handlerCount++,c.pending().subscribe({next:y=>{const p=this.currentRequests.slice(),E=this.makeAuthRequest(y,o);E?p[f]=E:delete p[f],this.currentRequests=p,this.subject.next(p.filter(Boolean))}}),y=>c.request(y)}makeAuthRequest(o,c){const{scopes:f}=o;if(!!f)return{provider:c.provider,trigger:async()=>{const y=await c.onAuthRequest(f);o.resolve(y)},reject:()=>{const y=new Error("Login failed, rejected by user");y.name="RejectedError",o.reject(y)}}}authRequest$(){return this.subject}}},56054:function(te,s,e){"use strict";e.d(s,{C:function(){return u}});var r=e(82394),t=e.n(r);const l=new Map;class u{constructor(m,o){q(this,"subscribers",new Set);q(this,"observable",new(t())(m=>(this.subscribers.add(m),()=>{this.subscribers.delete(m)})));this.namespace=m,this.errorApi=o}static create(m){var o;return new u((o=m.namespace)!=null?o:"",m.errorApi)}get(m){return this.snapshot(m).value}snapshot(m){let o,c="absent";try{const f=localStorage.getItem(this.getKeyName(m));f&&(o=JSON.parse(f,(y,p)=>(typeof p=="object"&&p!==null&&Object.freeze(p),p)),c="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${m}`))}return{key:m,value:o,presence:c}}forBucket(m){const o=`${this.namespace}/${m}`;return l.has(o)||l.set(o,new u(o,this.errorApi)),l.get(o)}async set(m,o){localStorage.setItem(this.getKeyName(m),JSON.stringify(o)),this.notifyChanges(m)}async remove(m){localStorage.removeItem(this.getKeyName(m)),this.notifyChanges(m)}observe$(m){return this.observable.filter(({key:o})=>o===m)}getKeyName(m){return`${this.namespace}/${encodeURIComponent(m)}`}notifyChanges(m){const o=this.snapshot(m);for(const c of this.subscribers)c.next(o)}}},59589:function(te,s,e){"use strict";e.d(s,{u:function(){return l}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(R){const{discoveryApi:m,environment:o="development",provider:c=t,oauthRequestApi:f}=R;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:c,environment:o})}}},6098:function(te,s,e){"use strict";e.d(s,{Z:function(){return l}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class l{static create(R){const{discoveryApi:m,environment:o="development",provider:c=t,oauthRequestApi:f,defaultScopes:y=["team"]}=R;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:c,environment:o,defaultScopes:y})}}},44431:function(te,s,e){"use strict";e.d(s,{BitbucketAuth:function(){return l.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var l=e(6098)},19347:function(){},44474:function(te,s,e){"use strict";e.d(s,{T:function(){return l}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class l{static create(R){const{discoveryApi:m,environment:o="development",provider:c=t,oauthRequestApi:f,defaultScopes:y=["read:user"]}=R;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:c,environment:o,defaultScopes:y})}}},2922:function(te,s,e){"use strict";e.d(s,{a:function(){return l}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class l{static create(R){const{discoveryApi:m,environment:o="development",provider:c=t,oauthRequestApi:f,defaultScopes:y=["read_user"]}=R;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:c,environment:o,defaultScopes:y})}}},59938:function(te,s,e){"use strict";e.d(s,{e:function(){return u}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},l="https://www.googleapis.com/auth/";class u{static create(m){const{discoveryApi:o,oauthRequestApi:c,environment:f="development",provider:y=t,defaultScopes:p=["openid",`${l}userinfo.email`,`${l}userinfo.profile`]}=m;return r.OAuth2.create({discoveryApi:o,oauthRequestApi:c,provider:y,environment:f,defaultScopes:p,scopeTransform(E){return E.map(T=>T==="openid"?T:T==="profile"||T==="email"?`${l}userinfo.${T}`:T.startsWith(l)?T:`${l}${T}`)}})}}},91668:function(te,s,e){"use strict";e.d(s,{AtlassianAuth:function(){return y.u},BitbucketAuth:function(){return f.BitbucketAuth},GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return l.e},MicrosoftAuth:function(){return o._},OktaAuth:function(){return R.s},OneLoginAuth:function(){return c.$}});var r=e(44474),t=e(2922),l=e(59938),u=e(91205);e.o(u,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return u.AlertApiForwarder}}),e.o(u,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return u.AppThemeSelector}}),e.o(u,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return u.AtlassianAuth}}),e.o(u,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return u.BitbucketAuth}}),e.o(u,"ConfigReader")&&e.d(s,{ConfigReader:function(){return u.ConfigReader}}),e.o(u,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return u.ErrorAlerter}}),e.o(u,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return u.ErrorApiForwarder}}),e.o(u,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return u.FetchMiddlewares}}),e.o(u,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return u.FlatRoutes}}),e.o(u,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return u.LocalStorageFeatureFlags}}),e.o(u,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return u.MicrosoftAuth}}),e.o(u,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return u.NoOpAnalyticsApi}}),e.o(u,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return u.OAuthRequestManager}}),e.o(u,"OktaAuth")&&e.d(s,{OktaAuth:function(){return u.OktaAuth}}),e.o(u,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return u.OneLoginAuth}}),e.o(u,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return u.UnhandledErrorForwarder}}),e.o(u,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return u.UrlPatternDiscovery}}),e.o(u,"WebStorage")&&e.d(s,{WebStorage:function(){return u.WebStorage}}),e.o(u,"createFetchApi")&&e.d(s,{createFetchApi:function(){return u.createFetchApi}}),e.o(u,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return u.createSpecializedApp}}),e.o(u,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return u.defaultConfigLoader}});var R=e(26079),m=e(67604),o=e(38482),c=e(58381),f=e(44431);e.o(f,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"ConfigReader")&&e.d(s,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(s,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(s,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return f.createSpecializedApp}}),e.o(f,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return f.defaultConfigLoader}});var y=e(59589)},38482:function(te,s,e){"use strict";e.d(s,{_:function(){return l}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class l{static create(R){const{environment:m="development",provider:o=t,oauthRequestApi:c,discoveryApi:f,defaultScopes:y=["openid","offline_access","profile","email","User.Read"]}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:c,provider:o,environment:m,defaultScopes:y})}}},73124:function(te,s,e){"use strict";e.d(s,{Z:function(){return m}});function r(o){return new Promise((c,f)=>{const y=o.width||500,p=o.height||700,E=window.screen.width/2-y/2,T=window.screen.height/2-p/2,L=window.open(o.url,o.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${y},height=${p},top=${T},left=${E}`);let M="";if(!L||typeof L.closed=="undefined"||L.closed){const O=new Error("Failed to open auth popup.");O.name="PopupRejectedError",f(O);return}const j=O=>{if(O.source!==L||O.origin!==o.origin)return;const{data:F}=O;if(F.type==="config_info"){M=F.targetOrigin;return}if(F.type!=="authorization_response")return;const U=F;if("error"in U){const Y=new Error(U.error.message);Y.name=U.error.name,f(Y)}else c(U.response);b()},w=setInterval(()=>{if(L.closed){const O=`Login failed, ${M&&M!==window.location.origin?`Incorrect app origin, expected ${M}`:"popup was closed"}`,F=new Error(O);F.name="PopupClosedError",f(F),b()}},100);function b(){window.removeEventListener("message",j),clearInterval(w)}window.addEventListener("message",j)})}function t(o){return[...o].join(" ")}class l{constructor(c){q(this,"discoveryApi");q(this,"environment");q(this,"provider");q(this,"joinScopesFunc");q(this,"authRequester");q(this,"sessionTransform");const{discoveryApi:f,environment:y,provider:p,joinScopes:E=t,oauthRequestApi:T,sessionTransform:L=M=>M}=c;this.authRequester=T.createAuthRequester({provider:p,onAuthRequest:M=>this.showPopup(M)}),this.discoveryApi=f,this.environment=y,this.provider=p,this.joinScopesFunc=E,this.sessionTransform=L}async createSession(c){return c.instantPopup?this.showPopup(c.scopes):this.authRequester(c.scopes)}async refreshSession(){const c=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(y=>{throw new Error(`Auth refresh request failed, ${y}`)});if(!c.ok){const y=new Error(`Auth refresh request failed, ${c.statusText}`);throw y.status=c.status,y}const f=await c.json();if(f.error){const y=new Error(f.error.message);throw f.error.name&&(y.name=f.error.name),y}return await this.sessionTransform(f)}async removeSession(){const c=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(f=>{throw new Error(`Logout request failed, ${f}`)});if(!c.ok){const f=new Error(`Logout request failed, ${c.statusText}`);throw f.status=c.status,f}}async showPopup(c){const f=this.joinScopesFunc(c),y=await this.buildUrl("/start",{scope:f,origin:location.origin}),p=await r({url:y,name:`${this.provider.title} Login`,origin:new URL(y).origin,width:450,height:730});return await this.sessionTransform(p)}async buildUrl(c,f){const y=await this.discoveryApi.getBaseUrl("auth"),p=this.buildQueryString({...f,env:this.environment});return`${y}/${this.provider.id}${c}${p}`}buildQueryString(c){if(!c)return"";const f=Object.entries(c).map(([y,p])=>{if(typeof p=="string")return`${encodeURIComponent(y)}=${encodeURIComponent(p)}`;if(p)return encodeURIComponent(y)}).filter(Boolean).join("&");return f?`?${f}`:""}}var u=e(57018);const R={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class m{constructor(c){q(this,"sessionManager");q(this,"scopeTransform");this.sessionManager=c.sessionManager,this.scopeTransform=c.scopeTransform}static create(c){const{discoveryApi:f,environment:y="development",provider:p=R,oauthRequestApi:E,defaultScopes:T=[],scopeTransform:L=w=>w}=c,M=new l({discoveryApi:f,environment:y,provider:p,oauthRequestApi:E,sessionTransform(w){return{...w,providerInfo:{idToken:w.providerInfo.idToken,accessToken:w.providerInfo.accessToken,scopes:m.normalizeScopes(L,w.providerInfo.scope),expiresAt:new Date(Date.now()+w.providerInfo.expiresInSeconds*1e3)}}}}),j=new u.RefreshingAuthSessionManager({connector:M,defaultScopes:new Set(T),sessionScopes:w=>w.providerInfo.scopes,sessionShouldRefresh:w=>(w.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new m({sessionManager:j,scopeTransform:L})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(c,f){var E;const y=m.normalizeScopes(this.scopeTransform,c),p=await this.sessionManager.getSession({...f,scopes:y});return(E=p==null?void 0:p.providerInfo.accessToken)!=null?E:""}async getIdToken(c={}){var y;const f=await this.sessionManager.getSession(c);return(y=f==null?void 0:f.providerInfo.idToken)!=null?y:""}async getBackstageIdentity(c={}){const f=await this.sessionManager.getSession(c);return f==null?void 0:f.backstageIdentity}async getProfile(c={}){const f=await this.sessionManager.getSession(c);return f==null?void 0:f.profile}static normalizeScopes(c,f){if(!f)return new Set;const y=Array.isArray(f)?f:f.split(/[\s|,]/).filter(Boolean);return new Set(c(y))}}},91205:function(te,s,e){"use strict";e.d(s,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),l=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(s,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(s,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(s,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(te,s,e){"use strict";e.d(s,{s:function(){return R}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),u="okta.";class R{static create(o){const{discoveryApi:c,environment:f="development",provider:y=t,oauthRequestApi:p,defaultScopes:E=["openid","email","profile","offline_access"]}=o;return r.OAuth2.create({discoveryApi:c,oauthRequestApi:p,provider:y,environment:f,defaultScopes:E,scopeTransform(T){return T.map(L=>l.has(L)||L.startsWith(u)?L:`${u}${L}`)}})}}},58381:function(te,s,e){"use strict";e.d(s,{$:function(){return R}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),u="onelogin.";class R{static create(o){const{discoveryApi:c,environment:f="development",provider:y=t,oauthRequestApi:p}=o;return r.OAuth2.create({discoveryApi:c,oauthRequestApi:p,provider:y,environment:f,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(E){return E.map(T=>l.has(T)||T.startsWith(u)?T:`${u}${T}`)}})}}},67604:function(te,s,e){"use strict";var r=e(57018),t=e(30195);const l=t.z.object({profile:t.z.object({email:t.z.string().optional(),displayName:t.z.string().optional(),picture:t.z.string().optional()}),backstageIdentity:t.z.object({token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),u={id:"saml",title:"SAML",icon:()=>null};class R{static create(o){const{discoveryApi:c,environment:f="development",provider:y=u}=o,p=new DirectAuthConnector({discoveryApi:c,environment:f,provider:y}),E=new StaticAuthSessionManager({connector:p}),T=new AuthSessionStore({manager:E,storageKey:`${y.id}Session`,schema:samlSessionSchema});return new R(T)}sessionState$(){return this.sessionManager.sessionState$()}constructor(o){this.sessionManager=o}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(o={}){const c=await this.sessionManager.getSession(o);return c==null?void 0:c.backstageIdentity}async getProfile(o={}){const c=await this.sessionManager.getSession(o);return c==null?void 0:c.profile}}},91631:function(te,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.C},AppThemeSelector:function(){return u.C},AtlassianAuth:function(){return r.AtlassianAuth},ConfigReader:function(){return R.m},ErrorAlerter:function(){return o.KN},ErrorApiForwarder:function(){return o.gr},FetchMiddlewares:function(){return f.I},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},LocalStorageFeatureFlags:function(){return c.b},MicrosoftAuth:function(){return r.MicrosoftAuth},NoOpAnalyticsApi:function(){return l.g},OAuthRequestManager:function(){return y.Y},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},UnhandledErrorForwarder:function(){return o.Jv},UrlPatternDiscovery:function(){return m.p},WebStorage:function(){return p.C},createFetchApi:function(){return f.j}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(23235),l=e(47150),u=e(58652),R=e(14721),m=e(4333),o=e(89536),c=e(14884),f=e(50160),y=e(11358),p=e(56054)},56494:function(te,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder},ApiProvider:function(){return r.ApiProvider},AppThemeSelector:function(){return t.AppThemeSelector},ConfigReader:function(){return t.ConfigReader},ErrorAlerter:function(){return t.ErrorAlerter},ErrorApiForwarder:function(){return t.ErrorApiForwarder},FetchMiddlewares:function(){return t.FetchMiddlewares},LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags},NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi},OAuthRequestManager:function(){return t.OAuthRequestManager},UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return t.UrlPatternDiscovery},WebStorage:function(){return t.WebStorage},createFetchApi:function(){return t.createFetchApi}});var r=e(76105);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(91631);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},80396:function(te,s,e){"use strict";e.d(s,{p:function(){return t}});var r;(function(l){l[l.default=10]="default";const u=50;l[l.app=u]="app",l[l.static=100]="static"})(r||(r={}));class t{constructor(){q(this,"factories",new Map)}register(u,R){const m=r[u],o=this.factories.get(R.api.id);return o&&o.priority>=m?!1:(this.factories.set(R.api.id,{priority:m,factory:R}),!0)}get(u){const R=this.factories.get(u.id);if(!!R)return R.factory}getAllApis(){const u=new Set;for(const{factory:R}of this.factories.values())u.add(R.api);return u}}},14406:function(te,s,e){"use strict";e.d(s,{g:function(){return o}});var r=e(2784),t=e(13980),l=e.n(t);class u{constructor(...f){q(this,"holders");this.holders=f}get(f){for(const y of this.holders){const p=y.get(f);if(p)return p}}}var R=e(76241);const m=(0,R.CT)("api-context"),o=c=>{var T;const{apis:f,children:y}=c,p=(T=(0,r.useContext)(m))==null?void 0:T.atVersion(1),E=p?new u(f,p):f;return r.createElement(m.Provider,{value:(0,R.EI)({1:E}),children:y})};o.propTypes={apis:l().shape({get:l().func.isRequired}).isRequired,children:l().node}},12132:function(te,s,e){"use strict";e.d(s,{M:function(){return r}});class r{constructor(l){q(this,"apis",new Map);this.factories=l}static validateFactories(l,u){for(const R of u){const m=[R],o=new Set;for(;m.length;){const c=m.shift(),f=l.get(c);if(!!f)for(const y of Object.values(f.deps)){if(y.id===R.id)throw new Error(`Circular dependency of api factory for ${R}`);o.has(y)||(o.add(y),m.push(y))}}}}get(l){return this.load(l)}load(l,u=[]){const R=this.apis.get(l.id);if(R)return R;const m=this.factories.get(l);if(!m)return;if(u.includes(m.api))throw new Error(`Circular dependency of api factory for ${m.api}`);const o=this.loadDeps(l,m.deps,[...u,m.api]),c=m.factory(o);return this.apis.set(l.id,c),c}loadDeps(l,u,R){const m={};for(const o in u)if(u.hasOwnProperty(o)){const c=u[o],f=this.load(c,R);if(!f)throw new Error(`No API factory available for dependency ${c} of dependent ${l}`);m[o]=f}return m}}},76105:function(te,s,e){"use strict";e.d(s,{ApiFactoryRegistry:function(){return l.p},ApiProvider:function(){return r.g},ApiResolver:function(){return t.M}});var r=e(14406),t=e(12132),l=e(80396),u=e(82488),R=e.n(u);e.o(u,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return u.AlertApiForwarder}}),e.o(u,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return u.AppThemeSelector}}),e.o(u,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return u.AtlassianAuth}}),e.o(u,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return u.BitbucketAuth}}),e.o(u,"ConfigReader")&&e.d(s,{ConfigReader:function(){return u.ConfigReader}}),e.o(u,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return u.ErrorAlerter}}),e.o(u,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return u.ErrorApiForwarder}}),e.o(u,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return u.FetchMiddlewares}}),e.o(u,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return u.FlatRoutes}}),e.o(u,"GithubAuth")&&e.d(s,{GithubAuth:function(){return u.GithubAuth}}),e.o(u,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return u.GitlabAuth}}),e.o(u,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return u.GoogleAuth}}),e.o(u,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return u.LocalStorageFeatureFlags}}),e.o(u,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return u.MicrosoftAuth}}),e.o(u,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return u.NoOpAnalyticsApi}}),e.o(u,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return u.OAuthRequestManager}}),e.o(u,"OktaAuth")&&e.d(s,{OktaAuth:function(){return u.OktaAuth}}),e.o(u,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return u.OneLoginAuth}}),e.o(u,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return u.UnhandledErrorForwarder}}),e.o(u,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return u.UrlPatternDiscovery}}),e.o(u,"WebStorage")&&e.d(s,{WebStorage:function(){return u.WebStorage}}),e.o(u,"createFetchApi")&&e.d(s,{createFetchApi:function(){return u.createFetchApi}}),e.o(u,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return u.createSpecializedApp}}),e.o(u,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return u.defaultConfigLoader}})},82488:function(){},82370:function(te,s,e){"use strict";e.d(s,{b:function(){return ut}});var r=e(2784),t=e(10289),l=e(64279),u=e(56494),R=e(36964),m=e(76105);function o(X){const Z={};for(const se in X.collectors)X.collectors.hasOwnProperty(se)&&(Z[se]=X.collectors[se]());const Q=[{node:r.Children.toArray(X.root),parent:void 0,contexts:{}}];for(;Q.length!==0;){const{node:se,parent:ce,contexts:Ce}=Q.shift();r.Children.forEach(se,Le=>{if(!(0,r.isValidElement)(Le))return;const Ae={};for(const Ke in Z)if(Z.hasOwnProperty(Ke)){const je=Z[Ke];Ae[Ke]=je.visit(je.accumulator,Le,ce,Ce[Ke])}for(const Ke of X.discoverers){const je=Ke(Le);je&&Q.push({node:je,parent:Le,contexts:Ae})}})}return Object.fromEntries(Object.entries(Z).map(([se,ce])=>[se,ce.accumulator]))}function c(X,Z){return()=>({accumulator:X(),visit:Z})}function f(X){var Z;return(Z=X.props)==null?void 0:Z.children}function y(X){var Z,Q,se;if(((Z=X.props)==null?void 0:Z.path)&&((Q=X.props)==null?void 0:Q.element))return(se=X.props)==null?void 0:se.element}const p=c(()=>new Set,(X,Z)=>{const Q=(0,R.getComponentData)(Z,"core.plugin");Q&&X.add(Q)});var E=e(88934);const T={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},L=c(()=>({paths:new Map,parents:new Map,objects:new Array}),(X,Z,Q,se)=>{var bt,Lt,Pt,Nt,At;if((Q==null?void 0:Q.props.element)===Z)return se;let ce=se==null?void 0:se.obj,Ce=se==null?void 0:se.routeRef,Le=se==null?void 0:se.sticky;const Ae=(bt=Z.props)==null?void 0:bt.path,Ke=(Lt=ce==null?void 0:ce.children)!=null?Lt:X.objects,je=Boolean((Pt=Z.props)==null?void 0:Pt.caseSensitive);let gt=se==null?void 0:se.path;if((0,R.getComponentData)(Z,"core.gatherMountPoints")){if(!Ae)throw new Error("Mount point gatherer must have a path");gt=Ae}const Ct=(Nt=Z.props)==null?void 0:Nt.element;let dt=(0,R.getComponentData)(Z,"core.mountPoint");if(!dt&&(0,r.isValidElement)(Ct)&&(dt=(0,R.getComponentData)(Ct,"core.mountPoint")),dt){let at=Ae;if(gt&&(at?gt=void 0:at=gt),!at)throw new Error("Mounted routable extension must have a path");X.paths.set(dt,at),Ce&&Le?(X.parents.set(dt,Ce),Ae&&(Ce=dt,Le=!1)):(X.parents.set(dt,Ce),Ce=dt),Ae?(ce={caseSensitive:je,path:Ae,element:"mounted",routeRefs:new Set([dt]),children:[T],plugin:(0,R.getComponentData)(Z.props.element,"core.plugin")},Ke.push(ce)):ce==null||ce.routeRefs.add(dt)}if((0,R.getComponentData)(Z,"core.gatherMountPoints")&&(Le=!0),(0,R.getComponentData)(Z,"core.gatherMountPoints")){if(!Ae)throw new Error("Mount point gatherer must have a path");dt||(ce={caseSensitive:je,path:Ae,element:"gathered",routeRefs:new Set,children:[T],plugin:(At=se==null?void 0:se.obj)==null?void 0:At.plugin},Ke.push(ce))}return{obj:ce,path:gt,routeRef:Ce,sticky:Le}}),M=c(()=>new Set,(X,Z)=>{if(Z.type===E.L){const Q=Z.props;X.add("with"in Q?Q.with:Q.without)}});var j=e(76241);const w=(0,j.uW)("route-ref-type",()=>Symbol("route-ref-type"));function b(X){return X[w]==="absolute"}function O(X){return X[w]==="sub"}function F(X){return X[w]==="external"}function U(...X){const Z=X.join("/").replace(/\/\/+/g,"/");return Z!=="/"&&Z.endsWith("/")?Z.slice(0,-1):Z}function Y(X,Z,Q){let se,ce="";if(b(X))se=X;else if(O(X))se=X.parent,ce=X.path;else if(F(X)){const Ae=Q.get(X);if(!Ae)return[void 0,""];if(b(Ae))se=Ae;else if(O(Ae))se=Ae.parent,ce=Ae.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${Ae}`)}else throw X[w]?new Error(`Unknown or invalid route ref type, ${X[w]}`):new Error(`Unknown object passed to useRouteRef, got ${X}`);if(!se)return[void 0,""];const Ce=Z.get(se);if(!Ce)return[void 0,""];const Le=U(Ce,ce);return[se,Le]}function ne(X,Z,Q,se,ce){var gt;const Ce=(gt=(0,t.fp)(ce,Z))!=null?gt:[],Le=Array();let Ae=-1;for(let Ct=X;Ct&&(Ae=Ce.findIndex(dt=>dt.route.routeRefs.has(Ct)),Ae===-1);Ct=se.get(Ct))Le.unshift(Ct);Le.length===0&&(Ae-=1);const Ke=Ae===-1?"":Ce[Ae].pathname,je=U(...Le.slice(0,-1).map(Ct=>{const dt=Q.get(Ct);if(!dt)throw new Error(`No path for ${Ct}`);if(dt.includes(":"))throw new Error(`Cannot route to ${X} with parent ${Ct} as it has parameters`);return dt}));return Ke+je}class ue{constructor(Z,Q,se,ce,Ce){this.routePaths=Z,this.routeParents=Q,this.routeObjects=se,this.routeBindings=ce,this.appBasePath=Ce}resolve(Z,Q){const[se,ce]=Y(Z,this.routePaths,this.routeBindings);if(!se)return;let Ce;typeof Q=="string"?Ce=this.trimPath(Q):Q.pathname?Ce={...Q,pathname:this.trimPath(Q.pathname)}:Ce=Q;const Le=this.appBasePath+ne(se,Ce,this.routePaths,this.routeParents,this.routeObjects);return(...[Ke])=>Le+(0,t.Gn)(ce,Ke)}trimPath(Z){return Z&&(Z.startsWith(this.appBasePath)?Z.slice(this.appBasePath.length):Z)}}const Re=(0,j.CT)("routing-context"),we=({routePaths:X,routeParents:Z,routeObjects:Q,routeBindings:se,basePath:ce="",children:Ce})=>{const Le=new ue(X,Z,Q,se,ce),Ae=(0,j.EI)({1:Le});return r.createElement(Re.Provider,{value:Ae},Ce)},ge=(X,Z)=>{var Q,se;try{const ce=(0,t.fp)(Z,{pathname:X}),Ce=(Q=ce==null?void 0:ce.filter(Ae=>{var Ke;return((Ke=Ae==null?void 0:Ae.route.routeRefs)==null?void 0:Ke.size)>0}).pop())==null?void 0:Q.route;if(!Ce)return{};let Le;return Ce.routeRefs.size===1&&(Le=Ce.routeRefs.values().next().value),{extension:"App",pluginId:((se=Ce.plugin)==null?void 0:se.getId())||"root",...Le?{routeRef:Le.id}:{}}}catch{return{}}},ze=({pathname:X,search:Z,hash:Q})=>{const se=(0,R.useAnalytics)();return(0,r.useEffect)(()=>{se.captureEvent("navigate",`${X}${Z}${Q}`)},[se,X,Z,Q]),null},_e=({routeObjects:X})=>{const{pathname:Z,search:Q,hash:se}=(0,t.TH)();return r.createElement(R.AnalyticsContext,{attributes:ge(Z,X)},r.createElement(ze,{pathname:Z,search:Q,hash:se}))};function et(X,Z){const Q=new Set(Z.values());Q.delete(void 0);for(const se of Z.keys()){if(Q.has(se))continue;let ce=se,Ce="";for(;ce;){const Ae=X.get(ce);if(!Ae)throw new Error(`No path for ${ce}`);Ce=`${Ae}${Ce}`,ce=Z.get(ce)}const Le=Ce.match(/:(\w+)/g);if(Le){for(let Ae=0;Ae<Le.length;Ae++)for(let Ke=Ae+1;Ke<Le.length;Ke++)if(Le[Ke]===Le[Ae])throw new Error(`Parameter ${Le[Ke]} is duplicated in path ${Ce}`)}}}function it(X,Z){for(const Q of Z)if(!!Q.externalRoutes){for(const[se,ce]of Object.entries(Q.externalRoutes))if(!ce.optional&&!X.has(ce))throw new Error(`External route '${se}' of the '${Q.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const St=(0,j.CT)("app-context"),Et=({appContext:X,children:Z})=>{const Q=(0,j.EI)({1:X});return r.createElement(St.Provider,{value:Q,children:Z})};function Pe(X){return new Error(`Tried to access IdentityApi ${X} before app was loaded`)}function pt(X){console.warn(`WARNING: Call to ${X} is deprecated and will break in the future`)}class Ge{constructor(){q(this,"target");q(this,"waitForTarget");q(this,"resolveTarget",()=>{});q(this,"signOutTargetUrl","/");this.waitForTarget=new Promise(Z=>{this.resolveTarget=Z})}setTarget(Z,Q){this.target=Z,this.signOutTargetUrl=Q.signOutTargetUrl,this.resolveTarget(Z)}getUserId(){if(!this.target)throw Pe("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return pt("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Pe("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return pt("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(Z=>Z.getProfileInfo())}async getBackstageIdentity(){const Z=await this.waitForTarget.then(Q=>Q.getBackstageIdentity());return Z.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${Z.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),Z}async getCredentials(){return this.waitForTarget.then(Z=>Z.getCredentials())}async getIdToken(){return this.waitForTarget.then(Z=>{if(!Z.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return pt("getIdToken"),Z.getIdToken()})}async signOut(){await this.waitForTarget.then(Z=>Z.signOut()),location.href=this.signOutTargetUrl}}var ie=e(72164);function de(X,Z,Q){if(X!==void 0){const ce=Q.find(Ce=>Ce.id===X);if(ce)return ce}if(Z){const ce=Q.find(Ce=>Ce.variant==="dark");if(ce)return ce}const se=Q.find(ce=>ce.variant==="light");return se||Q[0]}const Ue=()=>{const X=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[Z,Q]=(0,r.useState)(X.matches);return(0,r.useEffect)(()=>{const se=ce=>{Q(ce.matches)};return X.addListener(se),()=>{X.removeListener(se)}},[X]),Z};function Be({children:X}){const Z=(0,R.useApi)(R.appThemeApiRef),Q=(0,ie.Z)(Z.activeThemeId$(),Z.getActiveThemeId()),se=Boolean(window.matchMedia)?Ue():!1,ce=de(Q,se,Z.getInstalledThemes());if(!ce)throw new Error("App has no themes");return r.createElement(ce.Provider,{children:X})}var Xe=e(46611);class ht{constructor(){q(this,"apis",[])}add(Z,Q){return this.apis.push([Z.id,Q]),Q}build(){return new ke(new Map(this.apis))}}class ke{static builder(){return new ht}static from(Z){return new ke(new Map(Z.map(([Q,se])=>[Q.id,se])))}static with(Z,Q){return new ke(new Map([[Z.id,Q]]))}constructor(Z){this.apis=Z}with(Z,Q){return new ke(new Map([...this.apis,[Z.id,Q]]))}get(Z){return this.apis.get(Z.id)}}function vt(X){const Z=new Map;return X&&X({bind:(se,ce)=>{for(const[Ce,Le]of Object.entries(ce)){const Ae=se[Ce];if(!Ae)throw new Error(`Key ${Ce} is not an existing external route`);if(!Le&&!Ae.optional)throw new Error(`External route ${Ce} is required but was undefined`);Le&&Z.set(Ae,Le)}}}),Z}const oe=(0,r.createContext)({routeObjects:[]});function fe(X){var Q;let{pathname:Z}=new URL((Q=X.getOptionalString("app.baseUrl"))!=null?Q:"/","http://dummy.dev");return Z=Z.replace(/\/*$/,""),Z}function tt(X,Z,Q){var Ke;const se=Boolean(X),ce=(0,l.default)(X||(()=>Promise.resolve([])));let Ce;if(se&&ce.loading){const{Progress:je}=Z;Ce=r.createElement(je,null)}else if(ce.error){const{BootErrorPage:je}=Z;Ce=r.createElement(je,{step:"load-config",error:ce.error})}const{ThemeProvider:Le=Be}=Z;return Ce?{node:r.createElement(u.ApiProvider,{apis:ke.with(R.appThemeApiRef,Q)},r.createElement(Le,null,Ce))}:{api:u.ConfigReader.fromConfigs((Ke=ce.value)!=null?Ke:[])}}class Ye{constructor(Z){this.app=Z}getPlugins(){return this.app.getPlugins()}getSystemIcon(Z){return this.app.getSystemIcon(Z)}getComponents(){return this.app.getComponents()}}class Ne{constructor(Z){q(this,"apiHolder");q(this,"configApi");q(this,"apis");q(this,"icons");q(this,"plugins");q(this,"components");q(this,"themes");q(this,"configLoader");q(this,"defaultApis");q(this,"bindRoutes");q(this,"appIdentityProxy",new Ge);q(this,"apiFactoryRegistry");var Q,se,ce,Ce;this.apis=(Q=Z.apis)!=null?Q:[],this.icons=Z.icons,this.plugins=new Set((se=Z.plugins)!=null?se:[]),this.components=Z.components,this.themes=Z.themes,this.configLoader=(ce=Z.configLoader)!=null?ce:Xe.t,this.defaultApis=(Ce=Z.defaultApis)!=null?Ce:[],this.bindRoutes=Z.bindRoutes,this.apiFactoryRegistry=new m.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(Z){return this.icons[Z]}getComponents(){return this.components}getProvider(){const Z=new Ye(this);let Q=!1;return({children:ce})=>{const Ce=(0,r.useMemo)(()=>u.AppThemeSelector.createWithStorage(this.themes),[]),{routing:Le,featureFlags:Ae,routeBindings:Ke}=(0,r.useMemo)(()=>{const dt=o({root:ce,discoverers:[f,y],collectors:{routing:L,collectedPlugins:p,featureFlags:M}});return dt.collectedPlugins.forEach(Rt=>this.plugins.add(Rt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...dt,routeBindings:vt(this.bindRoutes)}},[ce]);Q||(Q=!0,et(Le.paths,Le.parents),it(Ke,this.plugins));const je=tt(this.configLoader,this.components,Ce),gt="api"in je;if(gt){const{api:dt}=je;this.configApi=dt}if((0,r.useEffect)(()=>{if(gt){const dt=this.getApiHolder().get(R.featureFlagsApiRef);for(const Rt of this.plugins.values())if("getFeatureFlags"in Rt)for(const bt of Rt.getFeatureFlags())dt.registerFlag({name:bt.name,pluginId:Rt.getId()});else for(const bt of Rt.output())bt.type==="feature-flag"&&dt.registerFlag({name:bt.name,pluginId:Rt.getId()});for(const Rt of Ae)dt.registerFlag({name:Rt,pluginId:""})}},[gt,je,Ae]),"node"in je)return je.node;const{ThemeProvider:Ct=Be}=this.components;return r.createElement(u.ApiProvider,{apis:this.getApiHolder()},r.createElement(Et,{appContext:Z},r.createElement(Ct,null,r.createElement(we,{routePaths:Le.paths,routeParents:Le.parents,routeObjects:Le.objects,routeBindings:Ke,basePath:fe(je.api)},r.createElement(oe.Provider,{value:{routeObjects:Le.objects}},ce)))))}}getRouter(){const{Router:Z,SignInPage:Q}=this.components,se=({component:Ce,children:Le})=>{const[Ae,Ke]=(0,r.useState)(),je=(0,R.useApi)(R.configApiRef),gt=fe(je);return Ae?(this.appIdentityProxy.setTarget(Ae,{signOutTargetUrl:gt||"/"}),Le):r.createElement(Ce,{onSignInSuccess:Ke})};return({children:Ce})=>{const Le=(0,R.useApi)(R.configApiRef),Ae=fe(Le),Ke=`${Ae}/*`,{routeObjects:je}=(0,r.useContext)(oe);return Q?r.createElement(Z,null,r.createElement(_e,{routeObjects:je}),r.createElement(se,{component:Q},r.createElement(t.Z5,null,r.createElement(t.AW,{path:Ke,element:r.createElement(r.Fragment,null,Ce)})))):(this.appIdentityProxy.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}},{signOutTargetUrl:Ae||"/"}),r.createElement(Z,null,r.createElement(_e,{routeObjects:je}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:Ke,element:r.createElement(r.Fragment,null,Ce)}))))}}getApiHolder(){if(this.apiHolder){for(const Z of this.plugins)for(const Q of Z.getApis())this.apiFactoryRegistry.get(Q.api)||this.apiFactoryRegistry.register("default",Q);return m.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:R.appThemeApiRef,deps:{},factory:()=>u.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:R.configApiRef,deps:{},factory:()=>{if(!this.configApi)throw new Error("Tried to access config API before config was loaded");return this.configApi}}),this.apiFactoryRegistry.register("static",{api:R.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:R.featureFlagsApiRef,deps:{},factory:()=>new u.LocalStorageFeatureFlags});for(const Z of this.defaultApis)this.apiFactoryRegistry.register("default",Z);for(const Z of this.plugins)for(const Q of Z.getApis())if(!this.apiFactoryRegistry.register("default",Q))throw new Error(`Plugin ${Z.getId()} tried to register duplicate or forbidden API factory for ${Q.api}`);for(const Z of this.apis)if(!this.apiFactoryRegistry.register("app",Z))throw new Error(`Duplicate or forbidden API factory for ${Z.api} in app`);return m.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new m.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(Z){const Q=new Set;for(const se of Z){const ce=se.getId();if(Q.has(ce))throw new Error(`Duplicate plugin found '${ce}'`);Q.add(ce)}}}function ut(X){return new Ne(X)}},46611:function(te,s,e){"use strict";e.d(s,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const l=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!l)throw new Error("No static configuration provided");if(!Array.isArray(l))throw new Error("Static configuration has invalid format");const u=l.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const m=JSON.parse(t);Array.isArray(m)?u.push(...m):u.push({data:m,context:"env"})}catch(m){throw new Error(`Failed to load runtime configuration, ${m}`)}const R=window.__APP_CONFIG__;return R&&u.push({context:"window",data:R}),u}},44056:function(te,s,e){"use strict";e.d(s,{createSpecializedApp:function(){return r.b},defaultConfigLoader:function(){return t.t}});var r=e(82370),t=e(46611),l=e(73495),u=e.n(l);e.o(l,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return l.AtlassianAuth}}),e.o(l,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return l.BitbucketAuth}}),e.o(l,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return l.FlatRoutes}}),e.o(l,"GithubAuth")&&e.d(s,{GithubAuth:function(){return l.GithubAuth}}),e.o(l,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return l.GitlabAuth}}),e.o(l,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return l.GoogleAuth}}),e.o(l,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return l.MicrosoftAuth}}),e.o(l,"OktaAuth")&&e.d(s,{OktaAuth:function(){return l.OktaAuth}}),e.o(l,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return l.OneLoginAuth}})},73495:function(){},49208:function(te,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder},ErrorAlerter:function(){return r.ErrorAlerter},ErrorApiForwarder:function(){return r.ErrorApiForwarder},FetchMiddlewares:function(){return r.FetchMiddlewares},FlatRoutes:function(){return l.w},NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi},OAuthRequestManager:function(){return r.OAuthRequestManager},UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return r.UrlPatternDiscovery},WebStorage:function(){return r.WebStorage},createFetchApi:function(){return r.createFetchApi},createSpecializedApp:function(){return t.createSpecializedApp},defaultConfigLoader:function(){return t.defaultConfigLoader}});var r=e(56494);e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}});var l=e(63938)},57018:function(te,s,e){"use strict";e.d(s,{RefreshingAuthSessionManager:function(){return m}});function r(c,f){for(const y of f)if(!c.has(y))return!1;return!0}class t{constructor(f){this.options=f}sessionExistsAndHasScope(f,y){if(!f)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const p=this.options.sessionScopes(f);return r(p,y)}getExtendedScope(f,y){const p=new Set(this.options.defaultScopes);if(f&&this.options.sessionScopes!==void 0){const E=this.options.sessionScopes(f);for(const T of E)p.add(T)}if(y)for(const E of y)p.add(E);return p}}var l=e(98005),u=e(36964);class R{constructor(){q(this,"subject",new l.X(u.SessionState.SignedOut));q(this,"signedIn",!1)}setIsSignedIn(f){this.signedIn!==f&&(this.signedIn=f,this.subject.next(this.signedIn?u.SessionState.SignedIn:u.SessionState.SignedOut))}sessionState$(){return this.subject}}class m{constructor(f){q(this,"connector");q(this,"helper");q(this,"sessionScopesFunc");q(this,"sessionShouldRefreshFunc");q(this,"stateTracker",new R);q(this,"refreshPromise");q(this,"currentSession");const{connector:y,defaultScopes:p=new Set,sessionScopes:E,sessionShouldRefresh:T}=f;this.connector=y,this.sessionScopesFunc=E,this.sessionShouldRefreshFunc=T,this.helper=new t({sessionScopes:E,defaultScopes:p})}async getSession(f){if(this.helper.sessionExistsAndHasScope(this.currentSession,f.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const p=await this.collapsedSessionRefresh(),E=this.sessionScopesFunc(this.currentSession),T=this.sessionScopesFunc(p);return r(T,E)&&(this.currentSession=p),p}catch(p){if(f.optional)return;throw p}}if(!this.currentSession&&!f.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(f)}catch{}if(!f.optional)return this.currentSession=await this.connector.createSession({...f,scopes:this.helper.getExtendedScope(this.currentSession,f.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession();try{const f=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),f}finally{delete this.refreshPromise}}}class o{constructor(f){q(this,"connector");q(this,"helper");q(this,"stateTracker",new SessionStateTracker);q(this,"currentSession");const{connector:y,defaultScopes:p=new Set,sessionScopes:E}=f;this.connector=y,this.helper=new SessionScopeHelper({sessionScopes:E,defaultScopes:p})}setSession(f){this.currentSession=f,this.stateTracker.setIsSignedIn(Boolean(f))}async getSession(f){if(this.helper.sessionExistsAndHasScope(this.currentSession,f.scopes))return this.currentSession;if(!f.optional)return this.currentSession=await this.connector.createSession({...f,scopes:this.helper.getExtendedScope(this.currentSession,f.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(te,s,e){"use strict";e.d(s,{J:function(){return l},X:function(){return u}});var r=e(82394),t=e.n(r);class l{constructor(){q(this,"isClosed",!1);q(this,"terminatingError");q(this,"observable",new(t())(m=>this.isClosed?(this.terminatingError?m.error(this.terminatingError):m.complete(),()=>{}):(this.subscribers.add(m),()=>{this.subscribers.delete(m)})));q(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(m){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(o=>o.next(m))}error(m){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=m,this.subscribers.forEach(o=>o.error(m))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(m=>m.complete())}subscribe(m,o,c){const f=typeof m=="function"?{next:m,error:o,complete:c}:m;return this.observable.subscribe(f)}}class u{constructor(m){q(this,"isClosed");q(this,"currentValue");q(this,"terminatingError");q(this,"observable");q(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=m,this.terminatingError=void 0,this.observable=new(t())(o=>this.isClosed?(this.terminatingError?o.error(this.terminatingError):o.complete(),()=>{}):(o.next(this.currentValue),this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}[Symbol.observable](){return this}get closed(){return this.isClosed}next(m){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=m,this.subscribers.forEach(o=>o.next(m))}error(m){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=m,this.subscribers.forEach(o=>o.error(m))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(m=>m.complete())}subscribe(m,o,c){const f=typeof m=="function"?{next:m,error:o,complete:c}:m;return this.observable.subscribe(f)}}},88934:function(te,s,e){"use strict";e.d(s,{L:function(){return l}});var r=e(36964),t=e(2784);const l=u=>{const{children:R}=u,m=(0,r.useApi)(r.featureFlagsApiRef),o="with"in u?m.isActive(u.with):!m.isActive(u.without);return t.createElement(t.Fragment,null,o?R:null)};(0,r.attachComponentData)(l,"core.featureFlagged",!0)},63938:function(te,s,e){"use strict";e.d(s,{w:function(){return u}});var r=e(2784),t=e(10289),l=e(36964);const u=m=>{const o=(0,l.useApp)(),{NotFoundErrorPage:c}=o.getComponents(),f=(0,l.useElementFilter)(m.children,y=>y.getElements().flatMap(p=>{var T;let E=p.props.path;return E===""?[]:(E=(T=E==null?void 0:E.replace(/\/\*$/,""))!=null?T:"/",[{path:E,element:p,children:p.props.children?[{path:E==="/"?"/":"/*",element:p.props.children}]:void 0}])}).sort((p,E)=>E.path.localeCompare(p.path)).map(p=>(p.path=p.path==="/"?"/":`${p.path}/*`,p)));return f.push({element:r.createElement(c,null),path:"/*"}),(0,t.V$)(f)};var R=e(88934)},82339:function(te,s,e){"use strict";e.d(s,{Button:function(){return F},CodeSnippet:function(){return et},Content:function(){return Xa},ContentHeader:function(){return ci},CreateButton:function(){return Et},DependencyGraph:function(){return Lt},DependencyGraphTypes:function(){return r},EmptyState:function(){return Tt},ErrorPage:function(){return hi},ErrorPanel:function(){return nn},Header:function(){return so},HeaderIconLinkRow:function(){return Wt},HeaderLabel:function(){return Ti},HeaderTabs:function(){return qa},InfoCard:function(){return Gn},ItemCardGrid:function(){return Di},ItemCardHeader:function(){return Li},Link:function(){return b},LogViewer:function(){return jr},MissingAnnotationEmptyState:function(){return cn},OverflowTooltip:function(){return Cr},Page:function(){return lo},PageWithHeader:function(){return Mi},Progress:function(){return br},ResponseErrorPanel:function(){return Ot},RoutedTabs:function(){return _a},Select:function(){return Ve},Sidebar:function(){return as},SidebarDivider:function(){return vs},SidebarItem:function(){return Ja},SidebarPage:function(){return Go},SubvalueCell:function(){return Fs},SupportButton:function(){return zo},Table:function(){return ei},WarningPanel:function(){return _t},sidebarConfig:function(){return Kn},useSidebarOpenState:function(){return la},useSidebarPinState:function(){return Ur}});var r={};e.r(r),e.d(r,{Nm:function(){return Pe},ht:function(){return ie},LJ:function(){return Ge}});var t=e(2784),l=e(36964),u=e(19928);function R(n){const[a,i]=useState([]),d=useApi(alertApiRef),{anchorOrigin:g={vertical:"top",horizontal:"center"}}=n;if(useEffect(()=>{const N=d.alert$().subscribe(K=>i(H=>H.concat(K)));return()=>{N.unsubscribe()}},[d]),a.length===0)return null;const[A]=a,P=()=>{i(N=>N.filter(K=>K!==A))};return React.createElement(Snackbar,{open:!0,anchorOrigin:g},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:P,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:A.severity},React.createElement("span",null,A.message.toString(),a.length>1&&React.createElement("em",null,` (${a.length-1} older ${pluralize("message",a.length-1)})`))))}var m=e(79692),o=e(12420);const c=(0,m.Z)(n=>(0,o.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function f(n){const{displayName:a,picture:i,customStyles:d}=n,g=c();let A={...d};return i||(A={backgroundColor:stringToColor(a||""),...d}),React.createElement(MaterialAvatar,{alt:a,src:i,className:g.avatar,style:A},a&&extractInitials(a))}var y=e(77277),p=e(72779),E=e.n(p),T=e(86689),L=e(62833);const M=(0,m.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"}),j=n=>/^([a-z+.-]+):/.test(n),w=n=>{var a;return n instanceof Array?n.map(w).join(" ").trim():typeof n=="object"&&n?w((a=n==null?void 0:n.props)==null?void 0:a.children):["string","number"].includes(typeof n)?String(n):""},b=t.forwardRef(({onClick:n,noTrack:a,...i},d)=>{const g=M(),A=(0,l.useAnalytics)(),P=String(i.to),N=w(i.children)||P,K=j(P),H=K&&!!/^https?:/.exec(P),ae=ee=>{n==null||n(ee),a||A.captureEvent("click",N,{attributes:{to:P}})};return K?t.createElement(T.Z,{ref:d,href:P,onClick:ae,...H?{target:"_blank",rel:"noopener"}:{},...i,className:E()(g.externalLink,i.className)},i.children,t.createElement("span",{className:g.visuallyHidden},", Opens in a new window")):t.createElement(T.Z,{ref:d,component:L.rU,onClick:ae,...i})}),O=t.forwardRef((n,a)=>t.createElement(b,{ref:a,...n,color:"initial"})),F=t.forwardRef((n,a)=>t.createElement(y.Z,{ref:a,component:O,...n}));var U=e(60364),Y=e(61837),ne=e(80030),ue=e(19353),Re=e(95074);function we(n){const{text:a,tooltipDelay:i=1e3,tooltipText:d="Text copied to clipboard"}=n,g=(0,l.useApi)(l.errorApiRef),[A,P]=(0,t.useState)(!1),[{error:N},K]=(0,Re.Z)();(0,t.useEffect)(()=>{N&&g.post(N)},[N,g]);const H=ae=>{ae.stopPropagation(),P(!0),K(a)};return t.createElement(t.Fragment,null,t.createElement(ne.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:i,onClose:()=>P(!1),open:A},t.createElement(Y.Z,{onClick:H},t.createElement(ue.Z,null))))}var ge=e(83229),ze=e(26639),_e=e(39595);function et(n){const{text:a,language:i,showLineNumbers:d=!1,highlightedNumbers:g,customStyle:A,showCopyCodeButton:P=!1}=n,N=(0,U.Z)(),K=N.palette.type==="dark"?ze.Z:_e.Z,H=N.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(ge.Z,{customStyle:A,language:i,style:K,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:N.palette.textVerySubtle},lineProps:ae=>g!=null&&g.includes(ae)?{style:{backgroundColor:H}}:{}},a),P&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(we,{text:a})))}var it=e(41156),St=e(88188);function Et(n){const{title:a,to:i}=n,d=(0,it.Z)(g=>g.breakpoints.down("xs"));return i?d?t.createElement(Y.Z,{component:L.rU,color:"primary",title:a,size:"small",to:i},t.createElement(St.Z,null)):t.createElement(y.Z,{component:L.rU,variant:"contained",color:"primary",to:i},a):null}var Pe;(function(n){const a="TB";n.TOP_BOTTOM=a;const i="BT";n.BOTTOM_TOP=i;const d="LR";n.LEFT_RIGHT=d;const g="RL";n.RIGHT_LEFT=g})(Pe||(Pe={}));var pt;(function(n){const a="UL";n.UP_LEFT=a;const i="UR";n.UP_RIGHT=i;const d="DL";n.DOWN_LEFT=d;const g="DR";n.DOWN_RIGHT=g})(pt||(pt={}));var Ge;(function(n){const a="network-simplex";n.NETWORK_SIMPLEX=a;const i="tight-tree";n.TIGHT_TREE=i;const d="longest-path";n.LONGEST_PATH=d})(Ge||(Ge={}));var ie;(function(n){const a="l";n.LEFT=a;const i="r";n.RIGHT=i;const d="c";n.CENTER=d})(ie||(ie={}));var de=e(84945),Ue=e(11105),Be=e(97963),Xe=e(46506),ht=e.n(Xe),ke=e(54073),vt=e.n(ke),oe=e(10368);const fe=(0,m.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function tt({node:{id:n}}){const a=fe(),[i,d]=t.useState(0),[g,A]=t.useState(0),P=t.useRef(null);t.useLayoutEffect(()=>{if(P.current){let{height:ae,width:ee}=P.current.getBBox();ae=Math.round(ae),ee=Math.round(ee),(ae!==g||ee!==i)&&(d(ee),A(ae))}},[i,g]);const N=10,K=i+N*2,H=g+N*2;return t.createElement("g",null,t.createElement("rect",{className:a.node,width:K,height:H,rx:10}),t.createElement("text",{ref:P,className:a.text,y:H/2,x:K/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const Ye="arrow-marker",Ne="node",ut="edge",X="label",Z=(0,oe.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),Q=n=>t.createElement(tt,{...n});function se({render:n=Q,setNode:a,node:i}){const{width:d,height:g,x:A=0,y:P=0}=i,N=i,K=Z(),H=t.useRef(null);return t.useLayoutEffect(()=>{if(H.current){let{height:ae,width:ee}=H.current.getBBox();ae=Math.round(ae),ee=Math.round(ee),(ae!==g||ee!==d)&&a(i.id,{...i,height:ae,width:ee})}},[i,d,g,a]),t.createElement("g",{ref:H,"data-testid":Ne,className:K.node,transform:`translate(${A-d/2},${P-g/2})`},n({node:N}))}var ce=e(55876),Ce=e(66481),Le=e(19574),Ae=e.n(Le);const Ke=(0,oe.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function je({edge:{label:n}}){const a=Ke();return t.createElement("text",{className:a.text,textAnchor:"middle"},n)}const gt=(0,oe.Z)(n=>({path:{strokeWidth:2,stroke:n.palette.textSubtle,fill:"none",transition:`${n.transitions.duration.shortest}ms`},label:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),Ct=n=>t.createElement(je,{...n}),dt=ce.Z().x(n=>n.x).y(n=>n.y).curve(Ce.Z);function Rt({render:n=Ct,setEdge:a,id:i,edge:d}){const{x:g=0,y:A=0,width:P,height:N,points:K}=d,H=d,ae=gt(),ee=t.useRef(null);t.useLayoutEffect(()=>{if(ee.current){let{height:Se,width:De}=ee.current.getBBox();Se=Math.round(Se),De=Math.round(De),(Se!==N||De!==P)&&a(i,{...d,height:Se,width:De})}},[d,N,P,a,i]);let Ee="";if(K){const Se=K.filter(De=>Ae()(De.x)&&Ae()(De.y));Ee=dt(Se)||""}return t.createElement(t.Fragment,null,Ee&&t.createElement("path",{"data-testid":ut,className:ae.path,markerEnd:`url(#${Ye})`,d:Ee}),H.label?t.createElement("g",{ref:ee,"data-testid":X,className:ae.label,transform:`translate(${g},${A})`},n({edge:H})):null)}const bt="workspace";function Lt(n){var Xn,yr;const{edges:a,nodes:i,renderNode:d,direction:g=Pe.TOP_BOTTOM,align:A,nodeMargin:P=50,edgeMargin:N=10,rankMargin:K=50,paddingX:H=0,paddingY:ae=0,acyclicer:ee,ranker:Ee=Ge.NETWORK_SIMPLEX,labelPosition:Se=ie.RIGHT,labelOffset:De=10,edgeRanks:ct=1,edgeWeight:Bt=1,renderLabel:Ht,defs:Jt,zoom:ft="enabled",...jt}=n,qt=(0,Be.Z)(),[Qt,Jn]=t.useState(100),[$n,Zr]=t.useState(100),Mt=t.useRef(new(ht()).graphlib.Graph),[hr,zr]=t.useState(((Xn=Mt.current.graph())==null?void 0:Xn.width)||0),[gr,ea]=t.useState(((yr=Mt.current.graph())==null?void 0:yr.height)||0),[ga,ta]=t.useState([]),[na,pa]=t.useState([]),sn=Math.max(hr,Qt),An=Math.max(gr,$n),tr=t.useMemo(()=>vt()(ln=>{if(!ln)return;const pn=Ue.Z(ln),tn=Ue.Z(ln.getElementById(bt));function Un(){pn.call(de.sP().scaleExtent([1,10]).on("zoom",kn=>{kn.transform.x=Math.min(0,Math.max(kn.transform.x,sn-sn*kn.transform.k)),kn.transform.y=Math.min(0,Math.max(kn.transform.y,An-An*kn.transform.k)),tn.attr("transform",kn.transform)}))}ft==="enabled"?Un():ft==="enable-on-click"&&pn.on("click",()=>Un());const{width:Nn,height:ra}=ln.getBoundingClientRect();Qt!==Nn&&Jn(Nn),$n!==ra&&Zr(ra)},100),[$n,Qt,sn,An,ft]),Qn=t.useCallback(()=>{const ln=Mt.current.nodes(),pn=Mt.current.edges();ln.forEach(tn=>{i.some(Nn=>Nn.id===tn)||Mt.current.removeNode(tn)}),pn.forEach(tn=>{a.some(Nn=>Nn.from===tn.v&&Nn.to===tn.w)||Mt.current.removeEdge(tn.v,tn.w)}),i.forEach(tn=>{const Un=Mt.current.nodes().find(Nn=>tn.id===Nn);if(Un&&Mt.current.node(Un)){const{width:Nn,height:ra,x:kn,y:Xi}=Mt.current.node(Un);Mt.current.setNode(Un,{...tn,width:Nn,height:ra,x:kn,y:Xi})}else Mt.current.setNode(tn.id,{...tn,width:0,height:0})}),a.forEach(tn=>{Mt.current.setEdge(tn.from,tn.to,{...tn,label:tn.label,width:0,height:0,labelpos:Se,labeloffset:De,weight:Bt,minlen:ct})})},[a,i,Se,De,Bt,ct]),en=t.useMemo(()=>vt()(()=>{ht().layout(Mt.current);const{height:ln,width:pn}=Mt.current.graph(),tn=Math.max(0,ln||0),Un=Math.max(0,pn||0);zr(Un),ea(tn),ta(Mt.current.nodes()),pa(Mt.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(Mt.current.setGraph({rankdir:g,align:A,nodesep:P,edgesep:N,ranksep:K,marginx:H,marginy:ae,acyclicer:ee,ranker:Ee}),Qn(),en(),en.cancel),[ee,A,g,N,H,ae,P,K,Ee,Qn,en]);function Rn(ln,pn){return Mt.current.setNode(ln,pn),en(),Mt.current}function pr(ln,pn){return Mt.current.setEdge(ln,pn),en(),Mt.current}return t.createElement("svg",{ref:tr,...jt,width:"100%",height:An,viewBox:`0 0 ${sn} ${An}`},t.createElement("defs",null,t.createElement("marker",{id:Ye,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:qt.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),Jt),t.createElement("g",{id:bt},t.createElement("svg",{width:hr,height:gr,y:An/2-gr/2,x:sn/2-hr/2,viewBox:`0 0 ${hr} ${gr}`},na.map(ln=>{const pn=Mt.current.edge(ln);return pn?t.createElement(Rt,{key:`${ln.v}-${ln.w}`,id:ln,setEdge:pr,render:Ht,edge:pn}):null}),ga.map(ln=>{const pn=Mt.current.node(ln);return pn?t.createElement(se,{key:ln,setNode:Rn,render:d,node:pn}):null}))))}const Pt=(0,m.Z)(n=>{var a;return{root:{padding:n.spacing(0),marginBottom:n.spacing(0),marginTop:n.spacing(0),display:"flex",flexFlow:"row nowrap"},topPosition:{position:"relative",marginBottom:n.spacing(6),marginTop:-n.spacing(3),zIndex:"unset"},icon:{fontSize:20},content:{width:"100%",maxWidth:"inherit",flexWrap:"nowrap"},message:{display:"flex",alignItems:"center",color:n.palette.banner.text,"& a":{color:n.palette.banner.link}},info:{backgroundColor:n.palette.banner.info},error:{backgroundColor:n.palette.banner.error},warning:{backgroundColor:(a=n.palette.banner.warning)!=null?a:n.palette.banner.error}}},{name:"BackstageDismissableBanner"}),Nt=n=>{var Se;const{variant:a,message:i,id:d,fixed:g=!1}=n,A=Pt(),N=useApi(storageApiRef).forBucket("notifications"),K=(Se=N.snapshot("dismissedBanners").value)!=null?Se:[],[H,ae]=useState(new Set(K)),ee=useObservable(N.observe$("dismissedBanners"));useEffect(()=>{var De;if(ee!=null&&ee.value){const ct=(De=ee==null?void 0:ee.value)!=null?De:[];ae(new Set(ct))}},[ee==null?void 0:ee.value]);const Ee=()=>{N.set("dismissedBanners",[...H,d])};return React.createElement(Snackbar,{anchorOrigin:g?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!H.has(d),classes:{root:classNames(A.root,!g&&A.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(A.content,A[a]),message:A.message},message:i,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Ee},React.createElement(Close,{className:A.icon}))]}))};var At=e(60905),at=e(90436),Zn=e.p+"static/missingAnnotation.67f79e98..svg",_=e.p+"static/noInformation.4b426325..svg",V=e.p+"static/createComponent.975d1e1e..svg",ye=e.p+"static/noBuild.1715fa71..svg";const We=(0,m.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),qe=({missing:n})=>{const a=We();switch(n){case"field":return t.createElement("img",{src:Zn,className:a.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:_,alt:"no Information",className:a.generalImg});case"content":return t.createElement("img",{src:V,alt:"create Component",className:a.generalImg});case"data":return t.createElement("img",{src:ye,alt:"no Build",className:a.generalImg});default:return null}},nt=(0,m.Z)(n=>({root:{backgroundColor:n.palette.background.default,padding:n.spacing(2,0,0,0)},action:{marginTop:n.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function Tt(n){const{title:a,description:i,missing:d,action:g}=n,A=nt();return t.createElement(At.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:A.root,spacing:2},t.createElement(At.Z,{item:!0,xs:12,md:6},t.createElement(At.Z,{container:!0,direction:"column"},t.createElement(At.Z,{item:!0,xs:!0},t.createElement(at.Z,{variant:"h5"},a)),t.createElement(At.Z,{item:!0,xs:!0},t.createElement(at.Z,{variant:"body1"},i)),t.createElement(At.Z,{item:!0,xs:!0,className:A.action},g))),t.createElement(At.Z,{item:!0,xs:12,md:6,className:A.imageContainer},t.createElement(qe,{missing:d})))}const Ut=`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`,Xt=(0,m.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function cn(n){const{annotation:a,readMoreUrl:i}=n,d=i||"https://backstage.io/docs/features/software-catalog/well-known-annotations",g=Xt(),A=t.createElement(t.Fragment,null,"The ",t.createElement("code",null,a)," annotation is missing. You need to add the annotation to your component if you want to enable this tool.");return t.createElement(Tt,{missing:"field",title:"Missing Annotation",description:A,action:t.createElement(t.Fragment,null,t.createElement(at.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:g.code},t.createElement(et,{text:Ut.replace("ANNOTATION",a),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(y.Z,{color:"primary",component:b,to:d},"Read more"))})}var un=e(11776),xt=e(38402),fn=e(49378),x=e(41128),re=e(27616),ve=e(8284),be=e(70660),Ie=e(91750),Je=e(38016);const lt=(n,a)=>(a.palette.type==="light"?x._j:x.$n)(a.palette[n].light,.6),Vt=(n,a)=>(a.palette.type==="light"?x.$n:x._j)(a.palette[n].light,.9),Gt=(0,m.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:a})=>lt(a,n)}})),wt=({severity:n})=>{const a=Gt({severity:n});return t.createElement(Ie.Z,{classes:a})},$t=({severity:n})=>{const a=Gt({severity:n});return t.createElement(Je.Z,{classes:a})},ot=(0,m.Z)(n=>({panel:{backgroundColor:({severity:a})=>Vt(a,n),color:({severity:a})=>lt(a,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:a})=>lt(a,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:a})=>lt(a,n),backgroundColor:({severity:a})=>Vt(a,n)},details:{width:"100%",display:"block",color:n.palette.textContrast,backgroundColor:n.palette.background.default,border:`1px solid ${n.palette.border}`,padding:n.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),Dt=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function _t(n){const{severity:a="warning",title:i,message:d,children:g,defaultExpanded:A}=n,P=ot({severity:a}),N=Dt(a)+(i?`: ${i}`:"");return t.createElement(re.Z,{defaultExpanded:A!=null?A:!1,className:P.panel,role:"alert"},t.createElement(ve.Z,{expandIcon:t.createElement($t,{severity:a}),className:P.summary},t.createElement(wt,{severity:a}),t.createElement(at.Z,{className:P.summaryText,variant:"subtitle1"},N)),(d||g)&&t.createElement(be.Z,null,t.createElement(At.Z,{container:!0},d&&t.createElement(At.Z,{item:!0,xs:12},t.createElement(at.Z,{className:P.message,variant:"body1"},d)),g&&t.createElement(At.Z,{item:!0,xs:12,className:P.details},g))))}const Zt=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),zt=({error:n,message:a,stack:i,children:d})=>{const g=Zt();return t.createElement(un.Z,{dense:!0},t.createElement(xt.Z,{alignItems:"flex-start"},t.createElement(fn.Z,{classes:{secondary:g.text},primary:"Error",secondary:n}),t.createElement(we,{text:n})),t.createElement(xt.Z,{alignItems:"flex-start"},t.createElement(fn.Z,{classes:{secondary:g.text},primary:"Message",secondary:a}),t.createElement(we,{text:a})),i&&t.createElement(xt.Z,{alignItems:"flex-start"},t.createElement(fn.Z,{classes:{secondary:g.text},primary:"Stack Trace",secondary:i}),t.createElement(we,{text:i})),d)};function nn(n){const{title:a,error:i,defaultExpanded:d,children:g}=n;return t.createElement(_t,{severity:"error",title:a!=null?a:i.message,defaultExpanded:d},t.createElement(zt,{error:i.name,message:i.message,stack:i.stack,children:g}))}var Sn=e(85256);const Kt=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function Ot(n){var De;const{title:a,error:i,defaultExpanded:d}=n,g=Kt();if(i.name!=="ResponseError")return t.createElement(nn,{title:a!=null?a:i.message,defaultExpanded:d,error:i});const{body:A,cause:P}=i,{request:N,response:K}=A,H=`${K.statusCode}: ${P.name}`,ae=N&&`${N.method} ${N.url}`,ee=P.message.replace(/\\n/g,`
|
|
12
|
-
`),Ee=(De=P.stack)==null?void 0:De.replace(/\\n/g,`
|
|
13
|
-
`),Se=JSON.stringify(A,void 0,2);return t.createElement(nn,{title:a!=null?a:i.message,defaultExpanded:d,error:{name:H,message:ee,stack:Ee}},ae&&t.createElement(xt.Z,{alignItems:"flex-start"},t.createElement(fn.Z,{classes:{secondary:g.text},primary:"Request",secondary:N?`${ae}`:void 0}),t.createElement(we,{text:ae})),t.createElement(t.Fragment,null,t.createElement(Sn.Z,{component:"li",className:g.divider}),t.createElement(xt.Z,{alignItems:"flex-start"},t.createElement(fn.Z,{classes:{secondary:g.text},primary:"Full Error as JSON"})),t.createElement(et,{language:"json",text:Se,showCopyCodeButton:!0})))}var mn=e(47093);function yn(n){const a=document.createElement("div");return a.setAttribute("id",n),a}function rn(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function hn(n){const a=useRef(null);useEffect(function(){const g=document.querySelector(`#${n}`),A=g||yn(n);return g||rn(A),A.appendChild(a.current),function(){a.current.remove(),A.childNodes.length===-1&&A.remove()}},[n]);function i(){return a.current||(a.current=document.createElement("div")),a.current}return i()}var xn=null;const $="core.calloutSeen";function h(){const[n,a]=useState(()=>{const d=localStorage.getItem($);return d?JSON.parse(d):{}}),i=useCallback((d,g)=>{const A=localStorage.getItem($),N={...A?JSON.parse(A):{},[d]:g};a(N),localStorage.setItem($,JSON.stringify(N))},[]);return{states:n,setState:i}}function S(n){const{states:a,setState:i}=h(),d=useCallback(()=>{i(n,!0)},[i,n]);return{seen:a[n]===!0,markSeen:d}}function B(n){const{seen:a,markSeen:i}=S(n);return{show:a===!1,hide:i}}const W=(0,m.Z)({"@keyframes pulsateSlightly":{"0%":{transform:"scale(1.0)"},"100%":{transform:"scale(1.1)"}},"@keyframes pulsateAndFade":{"0%":{transform:"scale(1.0)",opacity:.9},"100%":{transform:"scale(1.5)",opacity:0}},featureWrapper:{position:"relative"},backdrop:{zIndex:2e3,position:"fixed",overflow:"hidden",left:0,right:0,top:0,bottom:0},dot:{position:"absolute",backgroundColor:"transparent",borderRadius:"100%",border:"1px solid rgba(103, 146, 180, 0.98)",boxShadow:"0px 0px 0px 20000px rgba(0, 0, 0, 0.5)",zIndex:2001,transformOrigin:"center center",animation:"$pulsateSlightly 1744ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) alternate infinite"},pulseCircle:{width:"100%",height:"100%",backgroundColor:"transparent",borderRadius:"100%",border:"2px solid white",zIndex:2001,transformOrigin:"center center",animation:"$pulsateAndFade 872ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite"},text:{position:"absolute",color:"white",zIndex:2003}},{name:"BackstageFeatureCalloutCircular"});function pe(n){const{featureId:a,title:i,description:d,children:g}=n,{show:A,hide:P}=useShowCallout(a),N=usePortal("core.callout"),K=useRef(null),[H,ae]=useState(),ee=W(),Ee=useCallback(()=>{if(K.current){const Se=K.current.getBoundingClientRect(),De=Math.max(Se.width,Se.height),ct=800,Bt=Se.x-(De-Se.width)/2-ct,Ht=Se.y-(De-Se.height)/2-ct,Jt=De+2*ct,ft=450,jt=Se.x+Se.width/2-ft,qt=Se.y-(De-Se.height)/2+De+20;ae({dotLeft:Bt,dotTop:Ht,dotSize:Jt,borderWidth:ct,textTop:qt,textLeft:jt,textWidth:ft})}},[]);return useEffect(()=>(window.addEventListener("resize",Ee),window.addEventListener("scroll",Ee),()=>{window.removeEventListener("resize",Ee),window.removeEventListener("scroll",Ee)}),[Ee]),useLayoutEffect(Ee,[K.current,Ee]),A?React.createElement(React.Fragment,null,React.createElement("div",{className:ee.featureWrapper,ref:K},g),createPortal(React.createElement("div",{className:ee.backdrop},React.createElement(ClickAwayListener,{onClickAway:P},React.createElement(React.Fragment,null,React.createElement("div",{className:ee.dot,"data-testid":"dot",style:{left:H==null?void 0:H.dotLeft,top:H==null?void 0:H.dotTop,width:H==null?void 0:H.dotSize,height:H==null?void 0:H.dotSize,borderWidth:H==null?void 0:H.borderWidth},onClick:P,onKeyDown:P,role:"button",tabIndex:0},React.createElement("div",{className:ee.pulseCircle})),React.createElement("div",{className:ee.text,"data-testid":"text",style:{left:H==null?void 0:H.textLeft,top:H==null?void 0:H.textTop,width:H==null?void 0:H.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},i),React.createElement(Typography,null,d))))),N)):React.createElement(React.Fragment,null,g)}var me=e(35292);const Me=(0,m.Z)(n=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:n.palette.text.secondary,cursor:"default"},primary:{color:n.palette.primary.main},secondary:{color:n.palette.secondary.main},label:{fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function mt({color:n="primary",disabled:a=!1,href:i="#",icon:d=t.createElement(me.Z,null),label:g,onClick:A,title:P}){const N=Me();return a?t.createElement(T.Z,{title:P,className:E()(N.link,N.disabled),underline:"none"},d,t.createElement("span",{className:N.label},g)):t.createElement(T.Z,{title:P,className:E()(N.link,N[n]),to:i,component:b,onClick:A},d,t.createElement("span",{className:N.label},g))}const kt=(0,m.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function Wt(n){const{links:a}=n,i=kt();return t.createElement("nav",{className:i.links},a.map((d,g)=>t.createElement(mt,{key:g+1,...d})))}const Cn=n=>{const a=n==="dark"?"16%":"97%";return`
|
|
14
|
-
hsl(0, 0%, ${a}) 0%,
|
|
15
|
-
hsla(0, 0%, ${a}, 0.987) 8.1%,
|
|
16
|
-
hsla(0, 0%, ${a}, 0.951) 15.5%,
|
|
17
|
-
hsla(0, 0%, ${a}, 0.896) 22.5%,
|
|
18
|
-
hsla(0, 0%, ${a}, 0.825) 29%,
|
|
19
|
-
hsla(0, 0%, ${a}, 0.741) 35.3%,
|
|
20
|
-
hsla(0, 0%, ${a}, 0.648) 41.2%,
|
|
21
|
-
hsla(0, 0%, ${a}, 0.55) 47.1%,
|
|
22
|
-
hsla(0, 0%, ${a}, 0.45) 52.9%,
|
|
23
|
-
hsla(0, 0%, ${a}, 0.352) 58.8%,
|
|
24
|
-
hsla(0, 0%, ${a}, 0.259) 64.7%,
|
|
25
|
-
hsla(0, 0%, ${a}, 0.175) 71%,
|
|
26
|
-
hsla(0, 0%, ${a}, 0.104) 77.5%,
|
|
27
|
-
hsla(0, 0%, ${a}, 0.049) 84.5%,
|
|
28
|
-
hsla(0, 0%, ${a}, 0.013) 91.9%,
|
|
29
|
-
hsla(0, 0%, ${a}, 0) 100%
|
|
30
|
-
`},Er=100,nr=10,Wr=(0,m.Z)(n=>({root:{position:"relative",display:"flex",flexFlow:"row nowrap",alignItems:"center"},container:{overflow:"auto",scrollbarWidth:0,"&::-webkit-scrollbar":{display:"none"}},fade:{position:"absolute",width:Er,height:`calc(100% + ${nr}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-nr,background:`linear-gradient(90deg, ${Cn(n.palette.type)})`},fadeRight:{right:-nr,background:`linear-gradient(270deg, ${Cn(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function Hr(n){const[[a,i],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const g=n.current;if(!g){d([0,0]);return}const A=()=>{const P=g.scrollLeft,N=g.scrollWidth-g.offsetWidth-g.scrollLeft;d([P,N])};return A(),g.addEventListener("scroll",A),window.addEventListener("resize",A),()=>{g.removeEventListener("scroll",A),window.removeEventListener("resize",A)}},[n]),[a,i]}function zn(n,a,i){const[d,g]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const A=performance.now(),P=requestAnimationFrame(N=>{if(!n.current)return;const K=N-A,H=Math.abs(d)*K/a,ee=Math.max(i,H)*Math.sign(d);n.current.scrollBy({left:ee});const Ee=d-ee;Math.sign(d)!==Math.sign(Ee)?g(0):g(Ee)});return()=>cancelAnimationFrame(P)},[n,d,a,i]),g}function Mn(n){const{scrollStep:a=100,scrollSpeed:i=50,minScrollDistance:d=5,children:g,...A}=n,P=Wr(n),N=React.useRef(),[K,H]=Hr(N),ae=zn(N,i,d),ee=Ee=>{!N.current||ae(Ee?a:-a)};return React.createElement("div",{...A,className:P.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:P.container,ref:N},g),React.createElement("div",{className:classNames(P.fade,P.fadeLeft,{[P.fadeHidden]:K===0})}),React.createElement("div",{className:classNames(P.fade,P.fadeRight,{[P.fadeHidden]:H===0})}),K>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>ee(!1),className:classNames(P.button,P.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),H>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>ee(!0),className:classNames(P.button,P.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Yn=(0,m.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function rr(n){const a=Yn(n),{shorthand:i,alpha:d}=n;return i?React.createElement("span",{className:a[d?"alpha":"beta"],style:{fontSize:"120%"}},d?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:a[d?"alpha":"beta"]},d?"Alpha":"Beta")}const vr=(0,t.lazy)(()=>Promise.all([e.e(3860),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function jr(n){const{Progress:a}=(0,l.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(a,null)},t.createElement(vr,{...n}))}const ar=(0,m.Z)(n=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${n.palette.border}`},"& th, & td":{border:`1px solid ${n.palette.border}`,padding:n.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:n.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:n.palette.background.paper},"& tr":{backgroundColor:n.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:n.palette.background.default},"& a":{color:n.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),or={code:({inline:n,className:a,children:i,...d})=>{const g=String(i).replace(/\n+$/,""),A=/language-(\w+)/.exec(a||"");return!n&&A?t.createElement(et,{language:A[1],text:g}):t.createElement("code",{className:a,...d},i)}};function Vr(n){const{content:a,dialect:i="gfm",linkTarget:d}=n,g=ar();return React.createElement(ReactMarkdown,{remarkPlugins:i==="gfm"?[gfm]:[],className:g.markdown,children:a,components:or,linkTarget:d})}var qn=e(10179);const Tn=(0,m.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),_n=({request:n,busy:a,setBusy:i})=>{const d=Tn(),[g,A]=useState(),P=async()=>{i(!0);try{await n.trigger()}catch(K){A(isError(K)?K.message:"An unspecified error occurred")}finally{i(!1)}},N=n.provider.icon;return React.createElement(ListItem,{disabled:a,classes:{root:d.root}},React.createElement(ListItemAvatar,null,React.createElement(N,{fontSize:"large"})),React.createElement(ListItemText,{primary:n.provider.title,secondary:g&&React.createElement(Typography,{color:"error"},g)}),React.createElement(Button,{color:"primary",variant:"contained",onClick:P},"Log in"))};var er=null;const Ar=(0,m.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},titleHeading:{fontSize:n.typography.h6.fontSize},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function sr(n){const a=Ar(),[i,d]=useState(!1),g=useApi(oauthRequestApiRef),A=useObservable(useMemo(()=>g.authRequest$(),[g]),[]),P=()=>{A.forEach(N=>N.reject())};return React.createElement(Dialog,{open:Boolean(A.length),fullWidth:!0,maxWidth:"xs",classes:{paper:a.dialog},"aria-labelledby":"oauth-req-dialog-title"},React.createElement("main",null,React.createElement(DialogTitle,{classes:{root:a.title},id:"oauth-req-dialog-title"},React.createElement(Typography,{className:a.titleHeading,variant:"h1"},"Login Required")),React.createElement(DialogContent,{dividers:!0,classes:{root:a.contentList}},React.createElement(List,null,A.map(N=>React.createElement(LoginRequestListItem,{key:N.provider.title,request:N,busy:i,setBusy:d}))))),React.createElement(DialogActions,{classes:{root:a.actionButtons}},React.createElement(Button,{onClick:P},"Reject All")))}var ir=e(15277),Rr=e.n(ir),Sr=e(29862);const lr=(0,m.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Cr(n){var P;const[a,i]=(0,t.useState)(!1),d=(0,Sr.t)(),g=lr(),A=N=>{d()&&i(N)};return t.createElement(ne.ZP,{title:(P=n.title)!=null?P:n.text||"",placement:n.placement,disableHoverListener:!a},t.createElement(Rr(),{text:n.text,line:n.line,onToggled:A,containerClassName:g.container}))}var Tr=e(67358);function br(n){const[a,i]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>i(!0),250);return()=>clearTimeout(d)},[]),a?t.createElement(Tr.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Pr=e(94339),cr=e(14503),Ir=e(24579),ur=e(32552),dn=e(15459),Dn=e(95544),Lr=e(27597);const Or=(0,m.Z)(n=>({root:{maxWidth:"fit-content",padding:n.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:n.palette.textSubtle},arrow:{color:n.palette.textSubtle}}),{name:"BackstageBottomLink"});function bn(n){const{link:a,title:i,onClick:d}=n,g=Or();return t.createElement("div",null,t.createElement(Sn.Z,null),t.createElement(b,{to:a,onClick:d,underline:"none"},t.createElement(Dn.Z,{display:"flex",alignItems:"center",className:g.root},t.createElement(Dn.Z,{className:g.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(at.Z,null,t.createElement("strong",null,i))),t.createElement(Lr.Z,{className:g.arrow}))))}const jn=n=>{const{slackChannel:a}=n;if(a){if(typeof a=="string")return t.createElement(t.Fragment,null,"Please contact ",a," for help.");if(!a.href)return t.createElement(t.Fragment,null,"Please contact ",a.name," for help.")}else return null;return t.createElement(F,{to:a.href,variant:"contained"},a.name)},Vn=class extends t.Component{constructor(a){super(a),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(a,i){console.error(`ErrorBoundary, error: ${a}, info: ${i}`),this.setState({error:a,errorInfo:i})}render(){const{slackChannel:a,children:i}=this.props,{error:d}=this.state;return d?t.createElement(nn,{title:"Something Went Wrong",error:d},t.createElement(jn,{slackChannel:a})):i}},xr=(0,m.Z)(n=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:n.spacing(2,2,2,2.5)},headerTitle:{fontWeight:700},headerSubheader:{paddingTop:n.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),dr=(0,dn.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(cr.Z),fr={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 Gn(n){const{title:a,subheader:i,divider:d=!0,deepLink:g,slackChannel:A,errorBoundaryProps:P,variant:N,children:K,headerStyle:H,headerProps:ae,icon:ee,action:Ee,actionsClassName:Se,actions:De,cardClassName:ct,actionsTopRight:Bt,className:Ht,noPadding:Jt,titleTypographyProps:ft}=n,jt=xr();let qt={},Qt={};N&&N.split(/[\s]+/g).forEach(Mt=>{qt={...qt,...fr.card[Mt]},Qt={...Qt,...fr.cardContent[Mt]}});const Jn=()=>t.createElement("div",{className:jt.headerSubheader},i&&t.createElement("div",{className:jt.subheader},i),ee),$n=P||(A?{slackChannel:A}:{});return t.createElement(Pr.Z,{style:qt,className:Ht},t.createElement(Vn,{...$n},a&&t.createElement(ur.Z,{classes:{root:jt.header,title:jt.headerTitle,subheader:jt.headerSubheader,avatar:jt.headerAvatar,action:jt.headerAction,content:jt.headerContent},title:a,subheader:Jn(),action:Ee,style:{...H},titleTypographyProps:ft,...ae}),Bt&&t.createElement(dr,null,Bt),d&&t.createElement(Sn.Z,null),t.createElement(Ir.Z,{className:E()(ct,{[jt.noPadding]:Jt}),style:Qt},K),De&&t.createElement(cr.Z,{className:Se},De),g&&t.createElement(bn,{...g})))}var Gr=e(39307);const Dr=(0,m.Z)(n=>({root:{position:"relative",lineHeight:0},overlay:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -60%)",fontSize:45,fontWeight:"bold",color:n.palette.textContrast},description:{fontSize:"100%",top:"50%",left:"50%",transform:"translate(-50%, -50%)",position:"absolute",wordBreak:"break-all",display:"inline-block"},circle:{width:"80%",transform:"translate(10%, 0)"},colorUnknown:{}}),{name:"BackstageGauge"}),Fr={fractional:!0,inverse:!1,unit:"%",max:100},Br=({palette:n,value:a,inverse:i,max:d})=>{if(isNaN(a))return"#ddd";const g=d||Fr.max,A=i?g-a:a;return A<g/3?n.status.error:A<g*(2/3)?n.status.warning:n.status.ok};function I(n){const[a,i]=useState(null),{getColor:d=Br}=n,g=Dr(n),{palette:A}=useTheme(),{value:P,fractional:N,inverse:K,unit:H,max:ae,description:ee}={...Fr,...n},Ee=N?Math.round(P*ae):P,Se=ae!==100?Math.round(P):Ee,[De,ct]=useState(!1);return useEffect(()=>{const Bt=a,Ht=()=>ct(!0),Jt=()=>ct(!1);return Bt&&ee?(Bt.addEventListener("mouseenter",Ht),Bt.addEventListener("mouseleave",Jt),()=>{Bt.removeEventListener("mouseenter",Ht),Bt.removeEventListener("mouseleave",Jt)}):()=>{ct(!1)}},[ee,a]),React.createElement("div",{ref:i,className:g.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Ee,strokeWidth:12,trailWidth:12,strokeColor:d({palette:A,value:Se,inverse:K,max:ae}),className:g.circle}),ee&&De?React.createElement("div",{className:g.description},ee):React.createElement("div",{className:g.overlay},isNaN(P)?"N/A":`${Se}${H}`))}const J=(0,m.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function he(n){const a=J(n),{title:i,subheader:d,progress:g,inverse:A,deepLink:P,description:N,icon:K,variant:H,getColor:ae}=n,ee={inverse:A,description:N,getColor:ae,value:g};return React.createElement("div",{className:a.root},React.createElement(InfoCard,{title:i,subheader:d,deepLink:P,variant:H,icon:K},React.createElement(Gauge,{...ee})))}function $e(n){const{value:a,getColor:i=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(a))return null;let g=Math.round(a*100*100)/100;g>100&&(g=100);const A=i({palette:d,value:g,inverse:!1,max:100});return React.createElement(Tooltip,{title:`${g}%`},React.createElement("span",null,React.createElement(Line,{percent:g,strokeWidth:4,trailWidth:4,strokeColor:A})))}var Qe=e(21324),yt=e(7089),v=e(1292),C=e(42494),D=e(74603),z=e(56939),G=e(12231),k=e(73698),le=e(72379);const Te=(0,m.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var xe=()=>{const n=Te();return t.createElement(le.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"}))};const Oe=(0,m.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var He=()=>{const n=Oe();return t.createElement(le.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"}))};const It=(0,dn.Z)(n=>(0,o.Z)({root:{"label + &":{marginTop:n.spacing(3)}},input:{borderRadius:4,position:"relative",backgroundColor:n.palette.background.paper,border:"1px solid #ced4da",fontSize:16,padding:"10px 26px 10px 12px",transition:n.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:n.palette.background.paper,borderRadius:4}}}),{name:"BackstageSelectInputBase"})(D.Z),st=(0,m.Z)(n=>(0,o.Z)({formControl:{margin:`${n.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:n.typography.fontFamily,color:n.palette.text.primary,"&.Mui-focused":{color:n.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:n.typography.fontFamily,color:n.palette.text.primary,"&.Mui-focused":{color:n.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function Ve(n){const{multiple:a,items:i,label:d,placeholder:g,selected:A,onChange:P,triggerReset:N,native:K=!1,disabled:H=!1}=n,ae=st(),[ee,Ee]=(0,t.useState)(A||(a?[]:"")),[Se,De]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Ee(a?[]:"")},[N,a]),(0,t.useEffect)(()=>{A!==void 0&&Ee(A)},[A]);const ct=ft=>{Ee(ft.target.value),P(ft.target.value)},Bt=ft=>{if(H){ft.preventDefault();return}De(jt=>a&&!(ft.target instanceof HTMLElement)?!0:!jt)},Ht=()=>{De(!1)},Jt=ft=>()=>{const jt=ee.filter(qt=>qt!==ft);Ee(jt),P(jt)};return t.createElement("div",{className:ae.root},t.createElement(v.Z,{onClickAway:Ht},t.createElement(C.Z,{className:ae.formControl},t.createElement(z.Z,{className:ae.formLabel},d),t.createElement(k.Z,{"aria-label":d,value:ee,native:K,disabled:H,"data-testid":"select",displayEmpty:!0,multiple:a,onChange:ct,onClick:Bt,open:Se,input:t.createElement(It,null),label:d,tabIndex:0,renderValue:ft=>{var jt;return a&&ee.length!==0?t.createElement("div",{className:ae.chips},ft.map(qt=>{var Qt,Jn;return t.createElement(yt.Z,{key:(Qt=i.find($n=>$n.value===qt))==null?void 0:Qt.value,label:(Jn=i.find($n=>$n.value===qt))==null?void 0:Jn.label,clickable:!0,onDelete:Jt(qt),className:ae.chip})})):t.createElement(at.Z,null,ee.length===0?g||"":(jt=i.find(qt=>qt.value===ft))==null?void 0:jt.label)},IconComponent:()=>Se?t.createElement(He,null):t.createElement(xe,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},g&&!a&&t.createElement(G.Z,{value:[]},g),K?i&&i.map(ft=>t.createElement("option",{value:ft.value,key:ft.value},ft.label)):i&&i.map(ft=>t.createElement(G.Z,{key:ft.value,value:ft.value},a&&t.createElement(Qe.Z,{color:"primary",checked:ee.includes(ft.value)||!1,className:ae.checkbox}),ft.label))))))}const Ft=()=>{},Yt=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:Ft,stepHistory:[],setStepHistory:Ft,onStepChange:Ft});function Wn(n){const{children:a,elevated:i,onStepChange:d,activeStep:g=0}=n,[A,P]=useState(g),[N,K]=useState([0]);useEffect(()=>{P(g)},[g]);const H=[];let ae;return Children.forEach(a,ee=>{isValidElement(ee)&&(ee.props.end?ae=ee:H.push(ee))}),React.createElement(React.Fragment,null,React.createElement(Yt.Provider,{value:{stepIndex:A,setStepIndex:P,stepHistory:N,setStepHistory:K,onStepChange:d,stepperLength:Children.count(a)}},React.createElement(MuiStepper,{activeStep:A,orientation:"vertical",elevation:i?2:0},H)),A>=Children.count(a)-1&&ae)}const an=(0,m.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),gn=({text:n,handleClick:a})=>React.createElement(Button,{onClick:a},n||"Reset"),En=({text:n,handleClick:a,disabled:i,last:d,stepIndex:g})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:i,"data-testid":`nextButton-${g}`,onClick:a},n||(d?"Finish":"Next")),Pn=({text:n,handleClick:a,disabled:i,stepIndex:d})=>React.createElement(Button,{onClick:a,"data-testid":`backButton-${d}`,disabled:i},n||"Back"),Mr=({actions:n={},children:a})=>{const i=an(),{stepperLength:d,stepIndex:g,setStepIndex:A,stepHistory:P,setStepHistory:N,onStepChange:K}=useContext(VerticalStepperContext),H=(Se,De)=>{De&&De(),K&&K(g,Se),A(Se)},ae=()=>{const Se=n.nextStep?n.nextStep(g,d-1):g+1;H(Se,n.onNext),N([...P,Se])},ee=()=>{P.pop(),H(P[P.length-1],n.onBack),N([...P])},Ee=()=>{H(0,n.onRestart),N([0])};return React.createElement("div",{className:i.root},[void 0,!0].includes(n.showBack)&&g!==0&&React.createElement(Pn,{text:n.backText,handleClick:ee,disabled:g===0,stepIndex:g}),[void 0,!0].includes(n.showNext)&&React.createElement(En,{text:n.nextText,handleClick:ae,disabled:!!d&&g>=d||!!n.canNext&&!n.canNext(),stepIndex:g}),n.showRestart&&g!==0&&React.createElement(gn,{text:n.restartText,handleClick:Ee,stepIndex:g}),a)},mr=(0,m.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function aa(n){const{title:a,children:i,end:d,actions:g,...A}=n,P=mr();return d?React.createElement("div",{className:P.end},React.createElement(Typography,{variant:"h6"},a),i,React.createElement(SimpleStepperFooter,{actions:{...g||{},showNext:!1}})):React.createElement(MuiStep,{...A},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},a)),React.createElement(StepContent,null,i,React.createElement(SimpleStepperFooter,{actions:g})))}const on=(0,m.Z)(n=>({status:{fontWeight:500,"&::before":{width:"0.7em",height:"0.7em",display:"inline-block",marginRight:8,borderRadius:"50%",content:'""'}},ok:{"&::before":{backgroundColor:n.palette.status.ok}},warning:{"&::before":{backgroundColor:n.palette.status.warning}},error:{"&::before":{backgroundColor:n.palette.status.error}},pending:{"&::before":{backgroundColor:n.palette.status.pending}},running:{"&::before":{backgroundColor:n.palette.status.running}},aborted:{"&::before":{backgroundColor:n.palette.status.aborted}}}),{name:"BackstageStatus"});function In(n){const a=on(n);return React.createElement("span",{className:classNames(a.status,a.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function wr(n){const a=on(n);return React.createElement("span",{className:classNames(a.status,a.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function oa(n){const a=on(n);return React.createElement("span",{className:classNames(a.status,a.error),"aria-label":"Status error","aria-hidden":"true",...n})}function el(n){const a=on(n);return React.createElement("span",{className:classNames(a.status,a.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function tl(n){const a=on(n);return React.createElement("span",{className:classNames(a.status,a.running),"aria-label":"Status running","aria-hidden":"true",...n})}function nl(n){const a=on(n);return React.createElement("span",{className:classNames(a.status,a.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var rl=e(74600),ya=e(15584);const yo=n=>(0,o.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),Eo={root:{border:"0",verticalAlign:"top"}},vo=n=>(0,o.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),Ao=n=>(0,o.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),Ro=(0,dn.Z)(yo,{name:"BackstageMetadataTableTitleCell"})(ya.Z),So=(0,dn.Z)(Eo,{name:"BackstageMetadataTableCell"})(ya.Z),al=({dense:n,children:a})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,a)),ol=({title:n,children:a,...i})=>React.createElement(TableRow,null,n&&React.createElement(Ro,null,n),React.createElement(So,{colSpan:n?1:2,...i},a)),Ea=(0,dn.Z)(vo,{name:"BackstageMetadataTableList"})(({classes:n,children:a})=>t.createElement("ul",{className:n.root},a)),sl=(0,dn.Z)(Ao,{name:"BackstageMetadataTableListItem"})(({classes:n,children:a})=>t.createElement("li",{className:n.root},a)),va=(0,o.Z)({root:{margin:"0 0",listStyleType:"none"}}),Co=n=>(0,o.Z)({root:{...va.root,paddingLeft:n.spacing(1)}}),Aa=(0,dn.Z)(va,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:a})=>t.createElement(Ea,{classes:n},a)),Ra=(0,dn.Z)(Co,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:a})=>t.createElement(Ea,{classes:n},a));function To(n,a){const i=n.map((d,g)=>React.createElement(MetadataListItem,{key:g},sa(d)));return a?React.createElement(Ra,null,i):React.createElement(Aa,null,i)}function bo(n,a,i){const d=Object.keys(n).map(g=>{const A=sa(n[g],!0),P=i&&i.titleFormat?i.titleFormat(g):startCase(g);return React.createElement(MetadataListItem,{key:g},`${P}: `,A)});return a?React.createElement(Ra,null,d):React.createElement(Aa,null,d)}function sa(n,a,i){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?bo(n,a,i):Array.isArray(n)?To(n,i):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const Po=({value:n,options:a})=>React.createElement(Fragment,null,sa(n,a)),Io=({title:n,value:a,options:i})=>React.createElement(MetadataTableItem,{title:i&&i.titleFormat?i.titleFormat(n):startCase(n)},React.createElement(Po,{value:a,options:i}));function Lo(n,a){return Object.keys(n).map(i=>React.createElement(Io,{key:i,title:i,value:n[i],options:a}))}function il(n){const{metadata:a,dense:i=!0,options:d}=n,g=Lo(a,d||{});return React.createElement(MetadataTable,{dense:i},g)}var Oo=e(49429),xo=e(86136),Sa=e(79784),$r=e(76635),Do=e(19126),Ca=e.n(Do);function Fo(n){return qs.stringify(n,{strictNullHandling:!0})}function Ta(n){return qs.parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function ba(n,a){return Ta(n)[a]}function Bo(n,a,i){const d={...Ta(n),[a]:i};return Fo(d)}function ll(n,a=250){const[i,d]=useSearchParams(),g=i.toString(),[A,P]=useState(ba(g,n));return useEffect(()=>{const N=ba(g,n);P(K=>isEqual(N,K)?K:N)},[g,P,n]),useDebouncedEffect(()=>{const N=Bo(g,n,A);g!==N&&d(N,{replace:!0})},[d,A,g,n],a),[A,P]}const Mo={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 Pa(){const a=(0,l.useApiHolder)().get(l.configApiRef),i=a==null?void 0:a.getOptionalConfig("app.support");return i?{url:i.getString("url"),items:i.getConfigArray("items").flatMap(d=>{var g;return{title:d.getString("title"),icon:d.getOptionalString("icon"),links:((g=d.getOptionalConfigArray("links"))!=null?g:[]).flatMap(A=>({url:A.getString("url"),title:A.getString("title")}))}})}:Mo}var wo=e(80079);function wn(n,a){const d=(0,l.useApp)().getSystemIcon(n);return d?t.createElement(d,{...a}):t.createElement(wo.Z,{...a})}function cl(n){return wn("brokenImage",n)}function ul(n){return wn("catalog",n)}function dl(n){return wn("chat",n)}function fl(n){return wn("dashboard",n)}function ml(n){return wn("docs",n)}function hl(n){return wn("email",n)}function gl(n){return wn("github",n)}function pl(n){return wn("group",n)}function Kr(n){return wn("help",n)}function yl(n){return wn("user",n)}function El(n){return wn("warning",n)}const $o=(0,m.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Uo=({icon:n})=>{var d;const a=(0,l.useApp)(),i=n&&(d=a.getSystemIcon(n))!=null?d:Kr;return t.createElement(i,null)},No=({link:n})=>{var a;return t.createElement(b,{to:n.url},(a=n.title)!=null?a:n.url)},Zo=({item:n})=>{var a;return t.createElement(xt.Z,null,t.createElement(xo.Z,null,t.createElement(Uo,{icon:n.icon})),t.createElement(fn.Z,{primary:n.title,secondary:(a=n.links)==null?void 0:a.reduce((i,d,g)=>[...i,g>0&&t.createElement("br",{key:g}),t.createElement(No,{link:d,key:d.url})],[])}))};function zo(n){const{title:a,children:i}=n,{items:d}=Pa(),[g,A]=(0,t.useState)(!1),[P,N]=(0,t.useState)(null),K=$o(),H=(0,it.Z)(Ee=>Ee.breakpoints.down("sm")),ae=Ee=>{N(Ee.currentTarget),A(!0)},ee=()=>{A(!1)};return t.createElement(t.Fragment,null,t.createElement(Dn.Z,{display:"flex",ml:1},H?t.createElement(Y.Z,{color:"primary",size:"small",onClick:ae,"data-testid":"support-button"},t.createElement(Kr,null)):t.createElement(y.Z,{"data-testid":"support-button","aria-label":"support",color:"primary",onClick:ae,startIcon:t.createElement(Kr,null)},"Support")),t.createElement(Sa.ZP,{"data-testid":"support-button-popover",open:g,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:ee},t.createElement(un.Z,{className:K.popoverList},a&&t.createElement(xt.Z,{alignItems:"flex-start"},t.createElement(at.Z,{variant:"subtitle1"},a)),t.Children.map(i,(Ee,Se)=>t.createElement(xt.Z,{alignItems:"flex-start",key:`child-${Se}`},Ee)),d&&d.map((Ee,Se)=>t.createElement(Zo,{item:Ee,key:`item-${Se}`}))),t.createElement(Oo.Z,null,t.createElement(y.Z,{color:"primary",onClick:ee},"Close"))))}var ia=e(18671),Fn=e(10289);const kr=72,Ia=24,La=18,Kn={drawerWidthClosed:kr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:kr,iconSize:kr-Ia*2,iconPadding:Ia,selectedIndicatorWidth:3,userBadgePadding:La,userBadgeDiameter:kr-La*2,mobileSidebarHeight:56},Wo=n=>({...Kn,...n,iconContainerWidth:Kn.drawerWidthClosed,iconSize:Kn.drawerWidthClosed-Kn.iconPadding*2,userBadgeDiameter:Kn.drawerWidthClosed-Kn.userBadgePadding*2}),Oa={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:Kn.defaultOpenDelayMs+200},Ho=n=>({...Oa,...n}),vl="@backstage/core/sidebar-intro-dismissed",Hn=(0,t.createContext)({sidebarConfig:Kn,submenuConfig:Oa}),xa=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var Yr;(function(n){const a="sidebarPinState";n.SIDEBAR_PIN_STATE=a})(Yr||(Yr={}));const Da={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(Yr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(Yr.SIDEBAR_PIN_STATE,JSON.stringify(n))}};var Jr=e(76241);const Fa={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},Ba=(0,t.createContext)(Fa),Ma=(0,Jr.CT)("sidebar-pin-state-context"),jo=({children:n,value:a})=>t.createElement(Ba.Provider,{value:a},t.createElement(Ma.Provider,{value:(0,Jr.EI)({1:a})},n)),Ur=()=>{const n=(0,t.useContext)(Ma),a=(0,t.useContext)(Ba);if(n===void 0)return a||Fa;const i=n.atVersion(1);if(i===void 0)throw new Error("No context found for version 1.");return i},Vo=(0,m.Z)(n=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:a=>a.isPinned?a.sidebarConfig.drawerWidthOpen:a.sidebarConfig.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:a=>a.sidebarConfig.mobileSidebarHeight}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),wa=(0,t.createContext)({content:{contentRef:void 0}});function Go(n){const[a,i]=(0,t.useState)(()=>Da.getSidebarPinState()),{sidebarConfig:d}=(0,t.useContext)(Hn),g=(0,t.useRef)(null),A=(0,t.useMemo)(()=>({content:{contentRef:g}}),[g]);(0,t.useEffect)(()=>{Da.setSidebarPinState(a)},[a]);const P=(0,it.Z)(H=>H.breakpoints.down("xs"),{noSsr:!0}),N=()=>i(!a),K=Vo({isPinned:a,sidebarConfig:d});return t.createElement(jo,{value:{isPinned:a,toggleSidebarPinState:N,isMobile:P}},t.createElement(wa.Provider,{value:A},t.createElement("div",{className:K.root},n.children)))}function $a(){const{content:n}=(0,t.useContext)(wa);return{focusContent:(0,t.useCallback)(()=>{var i,d;(d=(i=n==null?void 0:n.contentRef)==null?void 0:i.current)==null||d.focus()},[n]),contentRef:n==null?void 0:n.contentRef}}const Ua={isOpen:!1,setOpen:()=>{}},Na=(0,t.createContext)(Ua),Za=(0,Jr.CT)("sidebar-open-state-context"),za=({children:n,value:a})=>t.createElement(Na.Provider,{value:a},t.createElement(Za.Provider,{value:(0,Jr.EI)({1:a})},n)),la=()=>{const n=(0,t.useContext)(Za),a=(0,t.useContext)(Na);if(n===void 0)return a||Ua;const i=n.atVersion(1);if(i===void 0)throw new Error("No context found for version 1.");return i};var Ko=e(50023),ko=e(4190),Yo=e(87685),Jo=e(44882),Qo=e(57998);const Xo=(0,m.Z)(n=>({root:{flexGrow:0,margin:n.spacing(0,2),color:n.palette.navigation.color},selected:a=>({color:`${n.palette.navigation.selectedColor}!important`,borderTop:`solid ${a.sidebarConfig.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),qo=n=>{const{to:a,label:i,icon:d,value:g}=n,{sidebarConfig:A}=(0,t.useContext)(Hn),P=Xo({sidebarConfig:A}),N=(0,Fn.TH)(),{selectedMenuItemIndex:K,setSelectedMenuItemIndex:H}=(0,t.useContext)(ja),ae=(Ee,Se)=>{H(Se===K?-1:Se)},ee=g===K&&K>=0||g!==K&&!(K>=0)&&a===N.pathname;return t.createElement(Qo.Z,{label:i,icon:d,component:b,to:a||N.pathname,onChange:ae,value:g,selected:ee,classes:P})},Wa=n=>{const{children:a,to:i,label:d,icon:g,value:A}=n,{isMobile:P}=Ur();return P?t.createElement(qo,{to:i,label:d,icon:g,value:A}):t.createElement(t.Fragment,null,a)},Ha=(0,m.Z)(n=>({root:{position:"fixed",backgroundColor:n.palette.navigation.background,color:n.palette.navigation.color,bottom:0,left:0,right:0,zIndex:n.zIndex.snackbar,borderTop:"1px solid #383838"},overlay:a=>({background:n.palette.navigation.background,width:"100%",bottom:`${a.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${a.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:n.palette.bursts.fontColor,alignItems:"center",justifyContent:"space-between",padding:n.spacing(2,3)},overlayHeaderClose:{color:n.palette.bursts.fontColor},marginMobileSidebar:a=>({marginBottom:`${a.sidebarConfig.mobileSidebarHeight}px`})})),_o=n=>(0,$r.orderBy)(n,({props:{priority:a}})=>Number.isInteger(a)?a:-1,"desc"),es=t.createElement(Wa).type,ts=({children:n,label:a="Menu",open:i,onClose:d})=>{const{sidebarConfig:g}=(0,t.useContext)(Hn),A=Ha({sidebarConfig:g});return t.createElement(ko.ZP,{anchor:"bottom",open:i,onClose:d,ModalProps:{BackdropProps:{classes:{root:A.marginMobileSidebar}}},classes:{root:A.marginMobileSidebar,paperAnchorBottom:A.overlay}},t.createElement(Dn.Z,{className:A.overlayHeader},t.createElement(at.Z,{variant:"h3"},a),t.createElement(Y.Z,{onClick:d,classes:{root:A.overlayHeaderClose}},t.createElement(Yo.Z,null))),t.createElement(Dn.Z,{component:"nav"},n))},ja=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),ns=n=>{const{sidebarConfig:a}=(0,t.useContext)(Hn),{children:i}=n,d=Ha({sidebarConfig:a}),g=(0,Fn.TH)(),[A,P]=(0,t.useState)(-1);(0,t.useEffect)(()=>{P(-1)},[g.pathname]);let N=(0,l.useElementFilter)(i,H=>H.getElements().filter(ae=>ae.type===es));if(i)N.length?N=_o(N):N.push(t.createElement(Wa,{key:"default_menu",icon:t.createElement(Jo.Z,null)},i));else return null;const K=A>=0&&!N[A].props.to;return t.createElement(za,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(ja.Provider,{value:{selectedMenuItemIndex:A,setSelectedMenuItemIndex:P}},t.createElement(ts,{label:N[A]&&N[A].props.label,open:K,onClose:()=>P(-1)},N[A]&&N[A].props.children),t.createElement(Ko.Z,{className:d.root,"data-testid":"mobile-sidebar-root",component:"nav"},N)))},Va=(0,m.Z)(n=>({drawer:a=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:n.zIndex.appBar,background:n.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:a.sidebarConfig.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:a=>({width:a.sidebarConfig.drawerWidthOpen,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var Ln;(function(n){n[n.Closed=0]="Closed";const i=0+1;n[n.Idle=i]="Idle";const d=i+1;n[n.Open=d]="Open"})(Ln||(Ln={}));const rs=n=>{const{sidebarConfig:a}=(0,t.useContext)(Hn),{openDelayMs:i=a.defaultOpenDelayMs,closeDelayMs:d=a.defaultCloseDelayMs,disableExpandOnHover:g,children:A}=n,P=Va({sidebarConfig:a}),N=(0,it.Z)(Ht=>Ht.breakpoints.down("md"),{noSsr:!0}),[K,H]=(0,t.useState)(Ln.Closed),ae=(0,t.useRef)(),{isPinned:ee,toggleSidebarPinState:Ee}=Ur(),Se=()=>{ee||g||(ae.current&&(clearTimeout(ae.current),ae.current=void 0),K!==Ln.Open&&!N&&(ae.current=window.setTimeout(()=>{ae.current=void 0,H(Ln.Open)},i),H(Ln.Idle)))},De=()=>{ee||g||(ae.current&&(clearTimeout(ae.current),ae.current=void 0),K===Ln.Idle?H(Ln.Closed):K===Ln.Open&&(ae.current=window.setTimeout(()=>{ae.current=void 0,H(Ln.Closed)},d)))},ct=K===Ln.Open&&!N||ee,Bt=Ht=>{Ht?(H(Ln.Open),Ee()):(H(Ln.Closed),Ee())};return t.createElement("nav",{style:{},"aria-label":"sidebar nav"},t.createElement(os,null),t.createElement(za,{value:{isOpen:ct,setOpen:Bt}},t.createElement("div",{className:P.root,"data-testid":"sidebar-root",onMouseEnter:g?()=>{}:Se,onFocus:g?()=>{}:Se,onMouseLeave:g?()=>{}:De,onBlur:g?()=>{}:De},t.createElement("div",{className:E()(P.drawer,{[P.drawerOpen]:ct})},A))))},as=n=>{var K,H;const a=Wo((K=n.sidebarOptions)!=null?K:{}),i=Ho((H=n.submenuOptions)!=null?H:{}),{children:d,disableExpandOnHover:g,openDelayMs:A,closeDelayMs:P}=n,{isMobile:N}=Ur();return N?t.createElement(ns,null,d):t.createElement(Hn.Provider,{value:{sidebarConfig:a,submenuConfig:i}},t.createElement(rs,{openDelayMs:A,closeDelayMs:P,disableExpandOnHover:g},d))};function os(){const{sidebarConfig:n}=(0,t.useContext)(Hn),{focusContent:a,contentRef:i}=$a(),d=Va({sidebarConfig:n});return i!=null&&i.current?t.createElement(y.Z,{onClick:a,variant:"contained",className:E()(d.visuallyHidden)},"Skip to content"):null}function Ga(n,a){const i=new URLSearchParams(a.search).toString(),d=Ca().parse(i),g=new URLSearchParams(n.search).toString(),A=Ca().parse(g);return(0,$r.isEqual)(a.pathname,n.pathname)&&(0,$r.isMatch)(A,d)}const ss=(0,m.Z)(n=>({item:{height:48,width:"100%","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor},display:"flex",alignItems:"center",color:n.palette.navigation.color,padding:20,cursor:"pointer",position:"relative",background:"none",border:"none"},itemContainer:{width:"100%"},selected:{background:"#6f6f6f",color:"#FFF"},label:{margin:14,marginLeft:7,fontSize:14,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis",lineHeight:1},subtitle:{fontSize:10,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor}},textContent:{color:n.palette.navigation.color,paddingLeft:n.spacing(4),paddingRight:n.spacing(1),fontSize:"14px",whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"}}),{name:"BackstageSidebarSubmenuItem"}),Al=n=>{const{title:a,subtitle:i,to:d,icon:g,dropdownItems:A}=n,P=ss(),{setIsHoveredOn:N}=useContext(SidebarItemWithSubmenuContext),K=()=>{N(!1)},H=useResolvedPath(d!=null?d:""),ae=useLocation();let ee=isLocationMatch(ae,H);const[Ee,Se]=useState(!1),De=()=>{Se(!Ee)};return A!==void 0?(A.some(ct=>{const Bt=resolvePath(ct.to);return ee=isLocationMatch(ae,Bt),ee}),React.createElement("div",{className:P.itemContainer},React.createElement(Tooltip,{title:a,enterDelay:500,enterNextDelay:500},React.createElement("button",{onClick:De,onTouchStart:ct=>ct.stopPropagation(),className:classnames(P.item,ee?P.selected:void 0)},g&&React.createElement(g,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:P.label},a,React.createElement("br",null),i&&React.createElement(Typography,{variant:"caption",className:P.subtitle},i)),Ee?React.createElement(ArrowDropUpIcon,{className:P.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:P.dropdownArrow}))),A&&Ee&&React.createElement("div",{className:P.dropdown},A.map((ct,Bt)=>React.createElement(Tooltip,{key:Bt,title:ct.title,enterDelay:500,enterNextDelay:500},React.createElement(Link,{to:ct.to,underline:"none",className:P.dropdownItem,onClick:K,onTouchStart:Ht=>Ht.stopPropagation()},React.createElement(Typography,{className:P.textContent},ct.title))))))):React.createElement("div",{className:P.itemContainer},React.createElement(Tooltip,{title:a,enterDelay:500,enterNextDelay:500},React.createElement(Link,{to:d,underline:"none",className:classnames(P.item,ee?P.selected:void 0),onClick:K,onTouchStart:ct=>ct.stopPropagation()},g&&React.createElement(g,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:P.label},a,React.createElement("br",null),i&&React.createElement(Typography,{variant:"caption",className:P.subtitle},i)))))},is=(0,m.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:a=>{var i,d;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[n.breakpoints.up("sm")]:{marginLeft:a.left,transition:n.transitions.create("margin-left",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(d=(i=n.palette.navigation.submenu)==null?void 0:i.background)!=null?d:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:a.submenuConfig.drawerWidthClosed,transitionDelay:`${a.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}},drawerOpen:a=>({width:a.submenuConfig.drawerWidthOpen,[n.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:n.spacing(3),left:0,top:0}}),title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[n.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),ls=n=>{const{isOpen:a}=la(),{sidebarConfig:i,submenuConfig:d}=(0,t.useContext)(Hn),g=a?i.drawerWidthOpen:i.drawerWidthClosed,A=is({left:g,submenuConfig:d}),{isHoveredOn:P}=(0,t.useContext)(xa),[N,K]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{K(P)},[P]),t.createElement("div",{className:E()(A.drawer,{[A.drawerOpen]:N})},t.createElement(at.Z,{variant:"h5",className:A.title},n.title),n.children)};var Qr=e(76600),cs=e(26739),Ka=e(98989),us=e(59797),ds=e(83543);const fs=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Rl=()=>{const n=fs();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})))};var Sl=null;const ms=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Cl=()=>{const n=ms();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})))};var Tl=null;const hs=n=>(0,m.Z)(a=>{var i,d,g,A;return{root:{color:a.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"100%",margin:0,padding:0,textAlign:"inherit",font:"inherit"},closed:{width:n.drawerWidthClosed,justifyContent:"center"},open:{[a.breakpoints.up("sm")]:{width:n.drawerWidthOpen}},highlightable:{"&:hover":{background:(d=(i=a.palette.navigation.navItem)==null?void 0:i.hoverBackground)!=null?d:"#404040"}},highlighted:{background:(A=(g=a.palette.navigation.navItem)==null?void 0:g.hoverBackground)!=null?A:"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:{boxSizing:"border-box",height:"100%",width:n.iconContainerWidth,marginRight:-a.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:a.typography.fontSize},searchFieldHTMLInput:{padding:a.spacing(2,0,2)},searchContainer:{width:n.drawerWidthOpen-n.iconContainerWidth},secondaryAction:{width:a.spacing(6),textAlign:"center",marginRight:a.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:a.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${n.selectedIndicatorWidth}px ${a.palette.navigation.indicator}`,color:a.palette.navigation.selectedColor},"&$closed":{width:n.drawerWidthClosed},"& $closedItemIcon":{paddingRight:n.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-n.selectedIndicatorWidth}}}},{name:"BackstageSidebarItem"});function Xr(n){return(0,t.useMemo)(()=>hs(n),[n])()}const gs=(n,a)=>(0,l.useElementFilter)(n.props.children,i=>{let d=!1;return i.getElements().forEach(({props:{to:g,dropdownItems:A}})=>{if(!d){if(A!=null&&A.length){A.forEach(({to:P})=>d=d||Ga(a,(0,Fn.i3)(P)));return}g&&(d=Ga(a,(0,Fn.i3)(g)))}}),d},[a.pathname]);function ka(n){return n.to===void 0}const ps=t.createElement(ls).type,ys=t.forwardRef(function({to:a,end:i,style:d,className:g,activeStyle:A,caseSensitive:P,activeClassName:N="active","aria-current":K="page",...H},ae){let{pathname:ee}=(0,Fn.TH)(),{pathname:Ee}=(0,Fn.WU)(a);P||(ee=ee.toLocaleLowerCase("en-US"),Ee=Ee.toLocaleLowerCase("en-US"));let Se=ee===Ee;!Se&&!i&&(Se=ee.startsWith(`${Ee}/`));const De=Se?K:void 0;return t.createElement(L.rU,{...H,to:a,ref:ae,"aria-current":De,style:{...d,...Se?A:void 0},className:E()([g,Se?N:void 0])})}),Ya=(0,t.forwardRef)((n,a)=>{const{icon:i,text:d,hasNotifications:g=!1,hasSubmenu:A=!1,disableHighlight:P=!1,onClick:N,children:K,className:H,...ae}=n,{sidebarConfig:ee}=(0,t.useContext)(Hn),Ee=Xr(ee),{isOpen:Se}=la(),De=!Se&&A?{display:"flex",marginLeft:"24px"}:{},ct=t.createElement("div",{style:De},t.createElement(i,{fontSize:"small"}),!Se&&A?t.createElement(Ka.Z,null):t.createElement(t.Fragment,null)),Bt=t.createElement(cs.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!g,className:E()({[Ee.closedItemIcon]:!Se})},ct),Ht=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:Ee.iconContainer},Bt),d&&t.createElement(at.Z,{variant:"subtitle2",className:Ee.label},d),t.createElement("div",{className:Ee.secondaryAction},K)),Jt=Se?Ht:Bt,ft={onClick:N,className:E()(H,Ee.root,Se?Ee.open:Ee.closed,ka(n)&&Ee.buttonItem,{[Ee.highlightable]:!P})};return ka(n)?t.createElement("button",{"aria-label":d,...ft,ref:a},Jt):t.createElement(ys,{...ft,activeClassName:Ee.selected,to:n.to?n.to:"",ref:a,"aria-label":d||n.to,...ae},Jt)}),Es=({children:n,...a})=>{const{sidebarConfig:i}=(0,t.useContext)(Hn),d=Xr(i),[g,A]=(0,t.useState)(!1),P=(0,Fn.TH)(),N=gs(n,P),K=(0,it.Z)(Ee=>Ee.breakpoints.down("sm")),H=()=>{A(!0)},ae=()=>{A(!1)},ee=()=>K?g?t.createElement(us.Z,{fontSize:"small",className:d.submenuArrow}):t.createElement(ds.Z,{fontSize:"small",className:d.submenuArrow}):!g&&t.createElement(Ka.Z,{fontSize:"small",className:d.submenuArrow});return t.createElement(xa.Provider,{value:{isHoveredOn:g,setIsHoveredOn:A}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:ae,onTouchStart:g?ae:H,onMouseEnter:H,className:E()(g&&d.highlighted)},t.createElement(Ya,{hasSubmenu:!0,className:N?d.selected:"",...a},ee()),g&&n))},Ja=(0,t.forwardRef)((n,a)=>{const[i]=(0,l.useElementFilter)(n.children,d=>d.getElements().filter(g=>g.type===ps));return i?t.createElement(Es,{...n},i):t.createElement(Ya,{...n,ref:a})});function bl(n){const{sidebarConfig:a}=useContext(SidebarConfigContext),[i,d]=useState(""),g=Xr(a),A=n.icon?n.icon:SearchIcon,P=()=>{n.onSearch(i),d("")},N=ee=>{ee.key==="Enter"&&(ee.preventDefault(),P())},K=ee=>{d(ee.target.value)},H=ee=>{ee.preventDefault(),ee.stopPropagation()},ae=ee=>{P(),ee.preventDefault()};return React.createElement("div",{className:g.searchRoot},React.createElement(Ja,{icon:A,to:n.to,onClick:ae,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:i,onClick:H,onChange:K,onKeyDown:N,className:g.searchContainer,InputProps:{disableUnderline:!0,className:g.searchField},inputProps:{className:g.searchFieldHTMLInput}})))}const Pl=(0,Qr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),Il=(0,Qr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),vs=(0,Qr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),As=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),Ll=(0,Qr.Z)("div")(({theme:n})=>{const a=As(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":a,"&:hover":a}}),Ol=()=>{const{sidebarConfig:n}=useContext(SidebarConfigContext),a=Xr(n),{isOpen:i,setOpen:d}=useSidebarOpenState();if(useMediaQuery(P=>P.breakpoints.down("md"),{noSsr:!0}))return null;const A=()=>{d(!i)};return React.createElement("button",{onClick:A,className:a.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:a.arrows},i?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},Rs=(0,m.Z)(n=>({introCard:a=>({color:"#b5b5b5",fontSize:12,width:a.sidebarConfig.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:a.sidebarConfig.iconPadding,paddingRight:a.sidebarConfig.iconPadding}),introDismiss:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:12},introDismissLink:{color:"#dddddd",display:"flex",alignItems:"center",marginBottom:4,"&:hover":{color:n.palette.linkHover,transition:n.transitions.create("color",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})}},introDismissText:{fontSize:"0.7rem",fontWeight:"bold",textTransform:"uppercase",letterSpacing:1},introDismissIcon:{width:18,height:18,marginRight:12}}),{name:"BackstageSidebarIntro"});function Ss(n){const{sidebarConfig:a}=useContext(SidebarConfigContext),i=Rs({sidebarConfig:a}),{text:d,onClose:g}=n,A=()=>g();return React.createElement("div",{className:i.introCard},React.createElement(Typography,{variant:"subtitle2"},d),React.createElement("div",{className:i.introDismiss},React.createElement(Link,{component:"button",onClick:A,underline:"none",className:i.introDismissLink},React.createElement(CloseIcon,{className:i.introDismissIcon}),React.createElement(Typography,{component:"span",className:i.introDismissText},"Dismiss"))))}const Qa=n=>{const{text:a,onDismiss:i}=n,[d,g]=useState(!1),A=()=>{g(!0)};return React.createElement(Collapse,{in:!d,onExited:i},React.createElement(Ss,{text:a,onClose:A}))},Cs=null,Ts="And your recently viewed plugins will pop up here!";function xl(n){const{isOpen:a}=useSidebarOpenState(),i={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,g]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:A,recentlyViewedItemsDismissed:P}=d!=null?d:{},N=()=>{g(H=>({...i,...H,starredItemsDismissed:!0}))},K=()=>{g(H=>({...i,...H,recentlyViewedItemsDismissed:!0}))};return a?React.createElement(React.Fragment,null,!A&&React.createElement(React.Fragment,null,React.createElement(Qa,{text:Cs,onDismiss:N}),React.createElement(SidebarDivider,null)),!P&&React.createElement(Qa,{text:Ts,onDismiss:K})):null}const bs=(0,m.Z)(n=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:n.spacing(3),paddingBottom:n.spacing(3),paddingLeft:n.spacing(2),paddingRight:n.spacing(2),[n.breakpoints.up("sm")]:{paddingLeft:n.spacing(3),paddingRight:n.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function Xa(n){const{className:a,stretch:i,noPadding:d,children:g,...A}=n,{contentRef:P}=$a(),N=bs();return t.createElement("article",{ref:P,tabIndex:-1,...A,className:E()(N.root,a,{[N.stretch]:i,[N.noPadding]:d})},g)}var Ps=e(6487),Is=e(99152);const Ls=(0,m.Z)(n=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:n.palette.background.paper,paddingLeft:n.spacing(3),minWidth:0},defaultTab:{padding:n.spacing(3,3),...n.typography.caption,textTransform:"uppercase",fontWeight:"bold",color:n.palette.text.secondary},selected:{color:n.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:n.palette.background.default,color:n.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function qa(n){const{tabs:a,onChange:i,selectedIndex:d}=n,[g,A]=(0,t.useState)(d!=null?d:0),P=Ls(),N=(K,H)=>{d===void 0&&A(H),i&&i(H)};return(0,t.useEffect)(()=>{d!==void 0&&A(d)},[d]),t.createElement("div",{className:P.tabsWrapper},t.createElement(Is.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:N,value:g},a.map((K,H)=>t.createElement(Ps.Z,{...K.tabProps,"data-testid":`header-tab-${H}`,label:K.label,key:K.id,value:H,className:P.defaultTab,classes:{selected:P.selected,root:P.tabRoot}}))))}function Os(n){var N,K,H;const a=(0,Fn.UO)(),d=n.map(({path:ae,children:ee})=>({caseSensitive:!1,path:`${ae}/*`,element:ee})).sort((ae,ee)=>ee.path.replace(/\/\*$/,"").localeCompare(ae.path.replace(/\/\*$/,""))),g=(N=(0,Fn.V$)(d))!=null?N:n[0].children,[A]=(K=(0,Fn.fp)(d,`/${a["*"]}`))!=null?K:[],P=A?n.findIndex(ae=>`${ae.path}/*`===A.route.path):0;return{index:P===-1?0:P,element:g,route:(H=n[P])!=null?H:n[0]}}function _a(n){const{routes:a}=n,i=(0,Fn.s0)(),{index:d,route:g,element:A}=Os(a),P=(0,t.useMemo)(()=>a.map(K=>({id:K.path,label:K.title,tabProps:K.tabProps})),[a]),N=K=>i(a[K].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(qa,{tabs:P,selectedIndex:d,onChange:N}),t.createElement(Xa,null,t.createElement(ia.q,{title:g.title}),A))}const ca=()=>null;(0,l.attachComponentData)(ca,"core.gatherMountPoints",!0);function eo(n){const a=t.createElement(ca,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(i=>{if(!(0,t.isValidElement)(i))return[];if(i.type===t.Fragment)return eo(i.props.children);if(i.type!==a)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:g,children:A,tabProps:P}=i.props;return[{path:d,title:g,children:A,tabProps:P}]})}function xs(n){const a=eo(n.children);return t.createElement(_a,{routes:a})}xs.Route=ca;const Ds=(0,m.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function Fs(n){const{value:a,subvalue:i}=n,d=Ds();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},a),t.createElement("div",{className:d.subvalue},i))}var Bs=e(21070),Ms=e(90324),ws=e(98281),$s=e(48049),to=e(51209),no=e(33375),Us=e(44233),Ns=e(27604),ua=e(36444),Zs=e(37971),zs=e(59709),Ws=e(17373),Hs=e(3702),js=e(93111),qr=e(67222);const Vs=(0,m.Z)(n=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:n.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:"60px",justifyContent:"space-between",borderBottom:`1px solid ${n.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:n.spacing(2)}}}),{name:"BackstageTableFilters"}),Gs=n=>{var K;const a=Vs(),{onChangeFilters:i}=n,[d,g]=(0,t.useState)({...n.selectedFilters}),[A,P]=(0,t.useState)(!1),N=()=>{g({}),P(H=>!H)};return(0,t.useEffect)(()=>{i(d)},[d,i]),t.createElement("div",{className:a.root},t.createElement("div",{className:a.header},t.createElement("div",{className:a.value},"Filters"),t.createElement(y.Z,{color:"primary",onClick:N},"Clear all")),t.createElement("div",{className:a.filters},((K=n.filters)==null?void 0:K.length)&&n.filters.map(H=>t.createElement(Ve,{triggerReset:A,key:H.element.label,...H.element,selected:d[H.element.label],onChange:ae=>g({...d,[H.element.label]:ae})}))))},Ks={Add:(0,t.forwardRef)((n,a)=>t.createElement(Bs.Z,{...n,ref:a})),Check:(0,t.forwardRef)((n,a)=>t.createElement(ws.Z,{...n,ref:a})),Clear:(0,t.forwardRef)((n,a)=>t.createElement(no.Z,{...n,ref:a})),Delete:(0,t.forwardRef)((n,a)=>t.createElement(Us.Z,{...n,ref:a})),DetailPanel:(0,t.forwardRef)((n,a)=>t.createElement(to.Z,{...n,ref:a})),Edit:(0,t.forwardRef)((n,a)=>t.createElement(Ns.Z,{...n,ref:a})),Export:(0,t.forwardRef)((n,a)=>t.createElement(Hs.Z,{...n,ref:a})),Filter:(0,t.forwardRef)((n,a)=>t.createElement(ua.Z,{...n,ref:a})),FirstPage:(0,t.forwardRef)((n,a)=>t.createElement(Zs.Z,{...n,ref:a})),LastPage:(0,t.forwardRef)((n,a)=>t.createElement(zs.Z,{...n,ref:a})),NextPage:(0,t.forwardRef)((n,a)=>t.createElement(to.Z,{...n,ref:a})),PreviousPage:(0,t.forwardRef)((n,a)=>t.createElement($s.Z,{...n,ref:a})),ResetSearch:(0,t.forwardRef)((n,a)=>t.createElement(no.Z,{...n,ref:a})),Search:(0,t.forwardRef)((n,a)=>t.createElement(ua.Z,{...n,ref:a})),SortArrow:(0,t.forwardRef)((n,a)=>t.createElement(Ms.Z,{...n,ref:a})),ThirdStateCheck:(0,t.forwardRef)((n,a)=>t.createElement(Ws.Z,{...n,ref:a})),ViewColumn:(0,t.forwardRef)((n,a)=>t.createElement(js.Z,{...n,ref:a}))};function ro(n,a){const i=a.split(".");let d=n[i[0]];for(let g=1;g<i.length;++g){if(d===void 0)return d;const A=i[g];d=d[A]}return d}const ks=(0,dn.Z)(n=>({header:{padding:n.spacing(1,2,1,2.5),borderTop:`1px solid ${n.palette.grey.A100}`,borderBottom:`1px solid ${n.palette.grey.A100}`,color:n.palette.textSubtle,fontWeight:n.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(qr.W$),ao=(0,dn.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(qr.UW),Ys=(0,m.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Js=(0,m.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Qs(n,a){return n.map(i=>{const d={};let g=i.cellStyle||{};if(i.highlight)if(d.color=a.palette.textContrast,typeof g=="object")g.fontWeight=a.typography.fontWeightBold;else{const A=g;g=(P,N,K)=>({...A(P,N,K),fontWeight:a.typography.fontWeightBold})}return{...i,headerStyle:d,cellStyle:g}})}function Xs(n,a){return(0,$r.transform)(n,(i,d,g)=>{(0,$r.isEqual)(d,a[g])||(i[g]=d)})}const oo={search:"",filtersOpen:!1,filters:{}};function _s(n){const{toolbarRef:a,setSearch:i,hasFilters:d,selectedFiltersLength:g,toggleFilters:A}=n,P=Ys(),N=(0,t.useCallback)(K=>{n.onSearchChanged(K),i(K)},[n,i]);return d?t.createElement("div",{className:P.root},t.createElement("div",{className:P.root},t.createElement(Y.Z,{onClick:A,"aria-label":"filter list"},t.createElement(ua.Z,null)),t.createElement(at.Z,{className:P.title},"Filters (",g,")")),t.createElement(ao,{...n,ref:a,onSearchChanged:N})):t.createElement(ao,{...n,ref:a,onSearchChanged:N})}function ei(n){const{data:a,columns:i,options:d,title:g,subtitle:A,filters:P,initialState:N,emptyContent:K,onStateChange:H,components:ae,...ee}=n,Ee=Js(),Se=(0,U.Z)(),De={...oo,...N},[ct,Bt]=(0,t.useState)(De.filtersOpen),Ht=(0,t.useCallback)(()=>Bt(sn=>!sn),[Bt]),[Jt,ft]=(0,t.useState)(0),[jt,qt]=(0,t.useState)(a),[Qt,Jn]=(0,t.useState)(De.filters),$n=Qs(i,Se),[Zr,Mt]=(0,t.useState)(De.search);(0,t.useEffect)(()=>{if(H){const sn=Xs({search:Zr,filtersOpen:ct,filters:Qt},oo);H(sn)}},[Zr,ct,Qt,H]);const hr={headerStyle:{textTransform:"uppercase"}},zr=(0,t.useCallback)(sn=>{var An;return(An=i.find(tr=>tr.title===sn))==null?void 0:An.field},[i]);(0,t.useEffect)(()=>{if(typeof a=="function")return;if(!Qt){qt(a);return}const sn=Object.values(Qt);if(a&&sn.flat().length){const An=a.filter(tr=>!!Object.entries(Qt).filter(([,Qn])=>!!Qn.length).every(([Qn,en])=>{const Rn=ro(tr,zr(Qn));return Array.isArray(Rn)&&Array.isArray(en)?Rn.some(pr=>en.includes(pr)):Array.isArray(Rn)?Rn.includes(en):Array.isArray(en)?en.includes(Rn):Rn===en}));qt(An)}else qt(a);ft(sn.flat().length)},[a,Qt,zr]);const gr=(sn,An)=>{const tr=en=>{const Rn=new Set,pr=Xn=>{Xn!=null&&Rn.add(Xn)};return An&&An.forEach(Xn=>{const yr=ro(Xn,zr(en));Array.isArray(yr)?yr.forEach(pr):pr(yr)}),Rn},Qn=en=>({placeholder:"All results",label:en.column,multiple:en.type==="multiple-select",items:[...tr(en.column)].sort().map(Rn=>({label:Rn,value:Rn}))});return sn.map(en=>({type:en.type,element:Qn(en)}))},ea=!!(P!=null&&P.length),ga=(0,t.useCallback)(sn=>t.createElement(_s,{setSearch:Mt,hasFilters:ea,selectedFiltersLength:Jt,toggleFilters:Ht,...sn}),[Ht,ea,Jt,Mt]),ta=typeof a!="function"&&a.length===0,na=i.length,pa=(0,t.useCallback)(sn=>K&&ta?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:na},K))):t.createElement(qr.os,{...sn}),[ta,K,na]);return t.createElement("div",{className:Ee.root},ct&&a&&typeof a!="function"&&(P==null?void 0:P.length)&&t.createElement(Gs,{filters:gr(P,a),selectedFilters:Qt,onChangeFilters:Jn}),t.createElement(qr.ZP,{components:{Header:ks,Toolbar:ga,Body:pa,...ae},options:{...hr,...d},columns:$n,icons:Ks,title:t.createElement(t.Fragment,null,t.createElement(at.Z,{variant:"h5",component:"h2"},g),A&&t.createElement(at.Z,{color:"textSecondary",variant:"body1"},A)),data:typeof a=="function"?a:jt,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...ee}))}const Dl=n=>{const{children:a,value:i,index:d,...g}=n;return React.createElement("div",{role:"tabpanel",hidden:i!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...g},i===d&&React.createElement(Box,{p:3},a))},ti=(0,m.Z)(()=>({root:{color:"#6E6E6E",overflow:"visible",fontSize:"1.5rem",textAlign:"center",borderRadius:"50%",backgroundColor:"#E6E6E6",marginLeft:n=>n.isNext?"auto":"0",marginRight:n=>n.isNext?"0":"10px","&:hover":{backgroundColor:"#E6E6E6",opacity:"1"}}}),{name:"BackstageTabIcon"}),Fl=n=>{const a=ti(n),{ariaLabel:i,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:a.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":i},n.children)},ni=(n,a)=>a?n?"20px":"0":"40px",ri=(0,m.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:a=>ni(a.isFirstNav,a.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}}),{name:"BackstageTab"}),Bl=n=>{const a=ri(n),{isFirstNav:i,isFirstIndex:d,...g}=n;return React.createElement(Tab,{classes:a,disableRipple:!0,...g})},ai=(0,m.Z)(n=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:n.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Ml=n=>{const a=ai(n);return React.createElement(Tabs,{classes:a,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},oi=(0,m.Z)(n=>({root:{flexGrow:1,width:"100%"},styledTabs:{backgroundColor:n.palette.background.paper},appbar:{boxShadow:"none",backgroundColor:n.palette.background.paper,paddingLeft:"10px",paddingRight:"10px"}}),{name:"BackstageTabs"});function wl(n){const{tabs:a}=n,i=oi(),[d,g]=useState([0,0]),[A,P]=useState(0),[N,K]=useState(0),[H,ae]=useState([[]]),ee=useRef(),{width:Ee}=useWindowSize(),Se=(Jt,ft)=>{g([A,ft])},De=()=>{P(A-1)},ct=()=>{P(A+1)},Bt=()=>A+1<H.length;useEffect(()=>{const ft=A===0?1:2,jt=ee.current.offsetWidth-20-ft*30,qt=d[0]*N+d[1],Qt=Math.floor(jt/170);K(Qt),ae(chunkArray(a,Qt)),g([Math.floor(qt/Qt),qt%Qt])},[Ee,a]);const Ht=A===d[0]?d[1]:!1;return React.createElement("div",{className:i.root},React.createElement(AppBar,{ref:ee,className:i.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:Ht,onChange:Se,selectionFollowsFocus:!0},A!==0&&React.createElement(StyledIcon,{onClick:De,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),H[A].map((Jt,ft)=>React.createElement(StyledTab,{value:ft,isFirstIndex:ft===0,isFirstNav:A===0,key:ft,icon:Jt.icon||void 0,label:Jt.label||void 0})),Bt()&&React.createElement(StyledIcon,{isNext:!0,onClick:ct,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Ht!==!1?H[A].map((Jt,ft)=>React.createElement(TabPanel,{key:ft,value:ft,index:Ht},Jt.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},H[d[0]][d[1]].content))}var $l=e(44311);function si(n,a){const i=n[n.length-1];if(!!i)return i>=.9?a.palette.status.ok:i>=.5?a.palette.status.warning:a.palette.status.error}function Ul(n){var i;const a=useTheme();return n.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...n},n.title&&React.createElement("title",null,n.title),React.createElement(SparklinesLine,{color:(i=n.color)!=null?i:si(n.data,a)})):null}const ii=n=>(0,m.Z)(a=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:a.spacing(2),textAlign:n.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:a.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),li=({title:n="Unknown page",className:a})=>t.createElement(at.Z,{variant:"h4",component:"h2",className:a,"data-testid":"header-title"},n);function ci(n){const{description:a,title:i,titleComponent:d=void 0,children:g,textAlign:A="left"}=n,P=ii({textAlign:A})(),N=d||t.createElement(li,{title:i,className:P.title});return t.createElement(t.Fragment,null,t.createElement(ia.q,{title:i}),t.createElement("div",{className:P.container},t.createElement("div",{className:P.leftItemsBox},N,a&&t.createElement(at.Z,{className:P.description,variant:"body2"},a)),t.createElement("div",{className:P.rightItemsBox},g)))}var ui=e.p+"static/mic-drop.fe3ef4d0..svg";const di=(0,m.Z)(n=>({micDrop:{maxWidth:"60%",position:"absolute",bottom:n.spacing(2),right:n.spacing(2),[n.breakpoints.down("xs")]:{maxWidth:"96%",position:"relative",bottom:"unset",right:"unset",margin:`${n.spacing(10)}px auto ${n.spacing(4)}px`}}}),{name:"BackstageErrorPageMicDrop"}),fi=()=>{const n=di();return t.createElement("img",{src:ui,className:n.micDrop,alt:"Girl dropping mic from her hands"})},mi=(0,m.Z)(n=>({container:{padding:n.spacing(8),[n.breakpoints.down("xs")]:{padding:n.spacing(2)}},title:{paddingBottom:n.spacing(5),[n.breakpoints.down("xs")]:{paddingBottom:n.spacing(4),fontSize:32}},subtitle:{color:n.palette.textSubtle}}),{name:"BackstageErrorPage"});function hi(n){const{status:a,statusMessage:i,additionalInfo:d,supportUrl:g}=n,A=mi(),P=(0,Fn.s0)(),N=Pa();return t.createElement(At.Z,{container:!0,spacing:0,className:A.container},t.createElement(fi,null),t.createElement(At.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(at.Z,{"data-testid":"error",variant:"body1",className:A.subtitle},"ERROR ",a,": ",i),t.createElement(at.Z,{variant:"body1",className:A.subtitle},d),t.createElement(at.Z,{variant:"h2",className:A.title},"Looks like someone dropped the mic!"),t.createElement(at.Z,{variant:"h6"},t.createElement(b,{to:"#","data-testid":"go-back-link",onClick:()=>P(-1)},"Go back"),"... or please"," ",t.createElement(b,{to:g||N.url},"contact support")," if you think this is a bug.")))}var gi=e(16173);const pi=(0,dn.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(at.Z),da=(0,dn.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(Dn.Z);function yi(n){const{children:a,...i}=n,[d,g]=t.useState(null),A=t.Children.toArray(a),[P,N,...K]=A,H=K.length?K.pop():A[A.length-1],ae=A.length>3,ee=De=>{g(De.currentTarget)},Ee=()=>{g(null)},Se=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(gi.Z,{"aria-label":"breadcrumb",...i},A.length>1&&t.createElement(da,{clone:!0},P),A.length>2&&t.createElement(da,{clone:!0},N),ae&&t.createElement(pi,{onClick:ee},"..."),t.createElement(Dn.Z,{style:{fontStyle:"italic"}},H)),t.createElement(Sa.ZP,{open:Se,anchorEl:d,onClose:Ee,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(un.Z,null,K.map((De,ct)=>t.createElement(xt.Z,{key:ct,button:!0},t.createElement(da,{clone:!0},De))))))}const Ei=(0,m.Z)(n=>({header:{gridArea:"pageHeader",padding:n.spacing(3),width:"100%",boxShadow:n.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:n.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[n.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto"},title:{color:n.palette.bursts.fontColor,wordBreak:"break-word",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.palette.bursts.fontColor,opacity:.8,display:"inline-block",marginTop:n.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:n.spacing(1),color:n.palette.bursts.fontColor},breadcrumb:{color:n.palette.bursts.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-n.spacing(.3),marginBottom:n.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-n.spacing(.3),marginBottom:n.spacing(.3)}}),{name:"BackstageHeader"}),vi=({type:n,typeLink:a,classes:i,pageTitle:d})=>n?a?t.createElement(yi,{className:i.breadcrumb},t.createElement(b,{to:a},n),t.createElement(at.Z,null,d)):t.createElement(at.Z,{className:i.type},n):null,Ai=({pageTitle:n,classes:a,tooltip:i})=>{const d=t.createElement(at.Z,{className:a.title,variant:"h1"},n);return i?t.createElement(ne.ZP,{title:i,placement:"top-start"},d):d},Ri=({classes:n,subtitle:a})=>a?typeof a!="string"?t.createElement(t.Fragment,null,a):t.createElement(at.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},a):null;function so(n){const{children:a,pageTitleOverride:i,style:d,subtitle:g,title:A,tooltip:P,type:N,typeLink:K}=n,H=Ei(),ee=(0,l.useApi)(l.configApiRef).getOptionalString("app.title")||"Backstage",Ee=i||A,Se=A||i,De=`${Ee} | %s | ${ee}`,ct=`${Ee} | ${ee}`;return t.createElement(t.Fragment,null,t.createElement(ia.q,{titleTemplate:De,defaultTitle:ct}),t.createElement("header",{style:d,className:H.header},t.createElement(Dn.Z,{className:H.leftItemsBox},t.createElement(vi,{classes:H,type:N,typeLink:K,pageTitle:Se}),t.createElement(Ai,{classes:H,pageTitle:Se,tooltip:P}),t.createElement(Ri,{classes:H,subtitle:g})),t.createElement(At.Z,{container:!0,className:H.rightItemsBox,spacing:4},a)))}const Si=(0,m.Z)(n=>({root:{textAlign:"left"},label:{color:n.palette.common.white,fontWeight:"bold",letterSpacing:0,fontSize:n.typography.fontSize,marginBottom:n.spacing(1)/2,lineHeight:1},value:{color:"rgba(255, 255, 255, 0.8)",fontSize:n.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),Ci=({value:n,className:a})=>t.createElement(at.Z,{className:a},n);function Ti(n){const{label:a,value:i,url:d}=n,g=Si(),A=t.createElement(Ci,{className:g.value,value:i||"<Unknown>"});return t.createElement(At.Z,{item:!0},t.createElement("span",{className:g.root},t.createElement(at.Z,{className:g.label},a),d?t.createElement(b,{to:d},A):A))}const bi={hour:"2-digit",minute:"2-digit"};function io(n){const a=new Date,i=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const g=n.getConfigArray("homepage.clocks");for(const A of g)if(A.has("label")&&A.has("timezone")){let P=A.getString("label");const N={timeZone:A.getString("timezone"),...bi};try{new Date().toLocaleString(i,N)}catch{console.warn(`The timezone ${N.timeZone} is invalid. Defaulting to GMT`),N.timeZone="GMT",P="GMT"}const K=a.toLocaleTimeString(i,N);d.push({time:K,label:P})}return d}function Nl(n){const a=useApi(configApiRef),i=[],[d,g]=React.useState(i);return React.useEffect(()=>{g(io(a));const A=setInterval(()=>{g(io(a))},1e3);return()=>{clearInterval(A)}},[a]),d.length!==0?React.createElement(React.Fragment,null,d.map(A=>React.createElement(HeaderLabel,{label:A.label,value:A.time,key:A.label}))):null}const Pi=n=>(0,o.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.palette.bursts.gradient.linear,backgroundPosition:0,backgroundSize:"inherit"}}),Ii=(0,m.Z)(Pi,{name:"BackstageItemCardHeader"});function Li(n){const{title:a,subtitle:i,children:d}=n,g=Ii(n);return t.createElement("div",{className:g.root},i&&t.createElement(at.Z,{variant:"subtitle2",component:"h3"},i),a&&t.createElement(at.Z,{variant:"h6",component:"h4"},a),d)}function Zl(n){const{description:a,tags:i,title:d,type:g,subtitle:A,label:P,onClick:N,href:K}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:A||g})),React.createElement(CardContent,null,i!=null&&i.length?React.createElement(Box,null,i.map((H,ae)=>React.createElement(Chip,{size:"small",label:H,key:ae}))):null,a),React.createElement(CardActions,null,!K&&React.createElement(Button,{to:"#",onClick:N,color:"primary"},P),K&&React.createElement(Button,{to:K,color:"primary"},P)))}const Oi=n=>(0,o.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),xi=(0,m.Z)(Oi,{name:"BackstageItemCardGrid"});function Di(n){const{children:a,...i}=n,d=xi(i);return t.createElement("div",{className:d.root,...i},a)}var Fi=e(41547);const Bi=(0,m.Z)(()=>({root:({isMobile:n})=>({display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",height:n?"100%":"100vh",overflowY:"auto"})}),{name:"BackstagePage"});function lo(n){const{themeId:a,children:i}=n,{isMobile:d}=Ur(),g=Bi({isMobile:d});return t.createElement(Fi.Z,{theme:A=>({...A,page:A.getPageTheme({themeId:a})})},t.createElement("main",{className:g.root},i))}function Mi(n){const{themeId:a,children:i,...d}=n;return t.createElement(lo,{themeId:a},t.createElement(so,{...d}),i)}var vn=e(30195);const zl=vn.z.object({providerInfo:vn.z.object({}).catchall(vn.z.unknown()).optional(),profile:vn.z.object({email:vn.z.string().optional(),displayName:vn.z.string().optional(),picture:vn.z.string().optional()}),backstageIdentity:vn.z.object({token:vn.z.string(),identity:vn.z.object({type:vn.z.literal("user"),userEntityRef:vn.z.string(),ownershipEntityRefs:vn.z.array(vn.z.string())})})}),co={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function wi(n){const a=new Date(Date.now()+co.defaultTokenExpiryMillis);if(!n)return a;const[i,d,g]=n.split("."),A=JSON.parse(atob(d));return typeof A.exp!="number"?a:new Date(A.exp*1e3-co.tokenExpiryMarginMillis)}class Wl{constructor(a){q(this,"options");q(this,"abortController");q(this,"state");this.options=a,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:a}=this.getSessionSync(),i=a.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(i);if(!d)throw new TypeError(`Invalid user entity reference "${i}"`);return d[3]}async getIdToken(){return(await this.getSessionAsync()).backstageIdentity.token}getProfile(){return this.getSessionSync().profile}async getProfileInfo(){return(await this.getSessionAsync()).profile}async getBackstageIdentity(){return(await this.getSessionAsync()).backstageIdentity.identity}async getCredentials(){return{token:(await this.getSessionAsync()).backstageIdentity.token}}async signOut(){this.abortController.abort()}getSessionSync(){if(this.state.type==="active")return this.state.session;if(this.state.type==="fetching"&&this.state.previous)return this.state.previous;throw new Error("No session available. Try reloading your browser page.")}async getSessionAsync(){if(this.state.type==="fetching")return this.state.promise;if(this.state.type==="active"&&new Date<this.state.expiresAt)return this.state.session;const a=this.state.type==="active"?this.state.session:void 0,i=this.fetchSession().then(d=>(this.state={type:"active",session:d,expiresAt:wi(d.backstageIdentity.token)},d),d=>{throw this.state={type:"failed",error:d},d});return this.state={type:"fetching",promise:i,previous:a},i}async fetchSession(){const a=await this.options.discoveryApi.getBaseUrl("auth"),i=await fetch(`${a}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!i.ok)throw await ResponseError.fromResponse(i);return proxiedSessionSchema.parse(await i.json())}}const Hl=n=>{const a=useApi(discoveryApiRef),[{status:i,error:d},{execute:g}]=useAsync(async()=>{const A=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:a});await A.start(),n.onSignInSuccess(A)});return useMountEffect(g),i==="loading"?React.createElement(Progress,null):d?React.createElement(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:d}):null},$i=(0,m.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),fa=({children:n})=>{const a=$i();return t.createElement(At.Z,{component:"li",item:!0,classes:a},n)};class ma{getUserId(){return"guest"}async getIdToken(){}getProfile(){return{email:"guest@example.com",displayName:"Guest"}}async getProfileInfo(){return{email:"guest@example.com",displayName:"Guest"}}async getBackstageIdentity(){const a="user:default/guest";return{type:"user",userEntityRef:a,ownershipEntityRefs:[a]}}async getCredentials(){return{}}async signOut(){}}function Ui(n){const[a,i,d]=n.split(".");return JSON.parse(atob(i))}class ha{constructor(a){this.result=a}getUserId(){return this.result.userId}static fromResult(a){return new ha(a)}async getIdToken(){var a,i;return(i=(a=this.result).getIdToken)==null?void 0:i.call(a)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const a=await this.getIdToken();if(!a){const g=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:g,ownershipEntityRefs:[g]}}const{sub:i,ent:d}=Ui(a);return{type:"user",userEntityRef:i,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var i,d;return{token:await((d=(i=this.result).getIdToken)==null?void 0:d.call(i))}}async signOut(){var a,i;return(i=(a=this.result).signOut)==null?void 0:i.call(a)}}class Nr{constructor(a,i,d){q(this,"profilePromise");this.identity=a,this.authApi=i,this.profile=d}static createGuest(){return new ma}static fromLegacy(a){return ha.fromResult(a)}static create(a){return new Nr(a.identity,a.authApi,a.profile)}getUserId(){const a=this.identity.userEntityRef,i=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(a);if(!i)throw new TypeError(`Invalid user entity reference "${a}"`);return i[3]}async getIdToken(){return(await this.authApi.getBackstageIdentity()).token}getProfile(){if(!this.profile)throw new Error("The identity API does not implement synchronous profile fetching, use getProfileInfo() instead");return this.profile}async getProfileInfo(){if(this.profilePromise)return await this.profilePromise;try{return this.profilePromise=this.authApi.getProfile(),await this.profilePromise}catch(a){throw this.profilePromise=void 0,a}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const Ni={Component:({config:n,onSignInSuccess:a})=>{const{apiRef:i,title:d,message:g}=n,A=(0,l.useApi)(i),P=(0,l.useApi)(l.errorApiRef),N=async()=>{try{const K=await A.getBackstageIdentity({instantPopup:!0});if(!K)throw new Error(`The ${d} provider is not configured to support sign-in`);const H=await A.getProfile();a(Nr.create({identity:K.identity,profile:H,authApi:A}))}catch(K){P.post(new qn.SP("Login failed",K))}};return t.createElement(fa,null,t.createElement(Gn,{variant:"fullHeight",title:d,actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:N},"Sign In")},t.createElement(at.Z,{variant:"body1"},g)))},loader:async(n,a)=>{const i=n.get(a),d=await i.getBackstageIdentity({optional:!0});if(!d)return;const g=await i.getProfile();return Nr.create({identity:d.identity,profile:g,authApi:i})}},Zi={Component:({onSignInSuccess:n})=>t.createElement(fa,null,t.createElement(Gn,{title:"Guest",variant:"fullHeight",actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:()=>n(new ma)},"Enter")},t.createElement(at.Z,{variant:"body1"},"Enter as a Guest User.",t.createElement("br",null),"You will not have a verified identity,",t.createElement("br",null),"meaning some features might be unavailable."))),loader:async()=>new ma};var zi=e(63955),uo=e(86619),fo=e(74828),Wi=e(45455),Hi=e.n(Wi);const ji=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Vi=(0,m.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),mo=n=>{const{ref:a,...i}=n;return{inputRef:a,...i}},Gi={Component:({onSignInSuccess:n})=>{const a=Vi(),{register:i,handleSubmit:d,formState:g}=(0,zi.cI)({mode:"onChange"}),{errors:A}=g,P=({userId:N})=>{n(Nr.fromLegacy({userId:N,profile:{email:`${N}@example.com`}}))};return t.createElement(fa,null,t.createElement(Gn,{title:"Custom User",variant:"fullHeight"},t.createElement(at.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:a.form,onSubmit:d(P)},t.createElement(C.Z,null,t.createElement(uo.Z,{...mo(i("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(A.userId)}),A.userId&&t.createElement(fo.Z,{error:!0},A.userId.message)),t.createElement(C.Z,null,t.createElement(uo.Z,{...mo(i("idToken",{required:!1,validate:N=>!N||ji.test(N)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(A.idToken)}),A.idToken&&t.createElement(fo.Z,{error:!0},A.idToken.message)),t.createElement(y.Z,{type:"submit",color:"primary",variant:"outlined",className:a.button,disabled:!(g!=null&&g.isDirty)||!Hi()(A)},"Continue"))))},loader:async()=>{}},_r="@backstage/core:SignInPage:provider",ho={guest:Zi,custom:Gi,common:Ni};function go(n,a){if(n in a)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function Jl(n){return n.reduce((i,d)=>{if(typeof d=="string")return go(d,i),i[d]={components:ho[d],id:d},i;const{id:g}=d;return go(g,i),i[g]={components:ho.common,id:g,config:d},i},{})}const Ql=(n,a)=>{const i=useApi(errorApiRef),d=useApiHolder(),[g,A]=useState(!0),P=useCallback(K=>{a(IdentityApiSignOutProxy.from({identityApi:K,signOut:async()=>{var H;localStorage.removeItem(_r),await((H=K.signOut)==null?void 0:H.call(K))}}))},[a]);useLayoutEffect(()=>{var ee;if(!g)return;const K=localStorage.getItem(_r);if(K===null){A(!1);return}const H=n[K];if(!H){A(!1);return}let ae=!1;return H.components.loader(d,(ee=H.config)==null?void 0:ee.apiRef).then(Ee=>{ae||(Ee?P(Ee):A(!1))}).catch(Ee=>{ae||(localStorage.removeItem(_r),i.post(Ee),A(!1))}),()=>{ae=!0}},[g,i,a,d,n,P]);const N=useMemo(()=>Object.keys(n).map(K=>{const H=n[K],{Component:ae}=H.components,ee=Ee=>{localStorage.setItem(_r,H.id),P(Ee)};return React.createElement(ae,{key:H.id,config:H.config,onSignInSuccess:ee})}),[n,P]);return[g,N]},Ki=({onSignInSuccess:n,providers:a=[],title:i,align:d="left"})=>{const g=useApi(configApiRef),A=useStyles(),P=getSignInProviders(a),[N,K]=useSignInProviders(P,n);return N?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:g.getString("app.title")}),React.createElement(Content,null,i&&React.createElement(ContentHeader,{title:i,textAlign:d}),React.createElement(Grid,{container:!0,justifyContent:d==="center"?d:"flex-start",spacing:2,component:"ul",classes:A},K)))},ki=({provider:n,auto:a,onSignInSuccess:i})=>{const d=useStyles(),g=useApi(n.apiRef),A=useApi(configApiRef),[P,N]=useState(),[K,H]=useState(!1),ae=async({checkExisting:ee,showPopup:Ee})=>{try{let Se;if(ee&&(Se=await g.getBackstageIdentity({optional:!0})),!Se&&(Ee||a)&&(H(!0),Se=await g.getBackstageIdentity({instantPopup:!0}),!Se))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Se){H(!0);return}const De=await g.getProfile();i(UserIdentity.create({identity:Se.identity,authApi:g,profile:De}))}catch(Se){N(Se),H(!0)}};return useMountEffect(()=>ae({checkExisting:!0})),K?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:A.getString("app.title")}),React.createElement(Content,null,React.createElement(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:d},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:n.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{ae({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},n.message),P&&P.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},P.message)))))):React.createElement(Progress,null)};function Xl(n){return"provider"in n?React.createElement(ki,{...n}):React.createElement(Ki,{...n})}const Yi=(0,m.Z)(n=>({root:{padding:n.spacing(0,2,0,2.5),minHeight:n.spacing(3)},indicator:{backgroundColor:n.palette.info.main,height:n.spacing(.3)}}),{name:"BackstageTabbedCard"}),Ji=(0,dn.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(ur.Z);function ql(n){const{slackChannel:a,errorBoundaryProps:i,children:d,title:g,deepLink:A,value:P,onChange:N}=n,K=Yi(),[H,ae]=useState(0),ee=N||((De,ct)=>ae(ct));let Ee;P?React.Children.map(d,De=>{React.isValidElement(De)&&(De==null?void 0:De.props.value)===P&&(Ee=De==null?void 0:De.props.children)}):React.Children.map(d,(De,ct)=>{React.isValidElement(De)&&ct===H&&(Ee=De==null?void 0:De.props.children)});const Se=i||(a?{slackChannel:a}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Se},g&&React.createElement(Ji,{title:g}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:K,value:P||H,onChange:ee},d),React.createElement(Divider,null),React.createElement(CardContent,null,Ee),A&&React.createElement(BottomLink,{...A})))}const Qi=(0,m.Z)(n=>({root:{minWidth:n.spacing(6),minHeight:n.spacing(3),margin:n.spacing(0,2,0,0),padding:n.spacing(.5,0,.5,0),textTransform:"none","&:hover":{opacity:1,backgroundColor:"transparent",color:n.palette.text.primary}},selected:{fontWeight:"bold"}}),{name:"BackstageCardTab"});function _l(n){const{children:a,...i}=n,d=Qi();return React.createElement(Tab,{disableRipple:!0,classes:d,...i})}},88609:function(te,s,e){"use strict";e.d(s,{Os:function(){return u},fC:function(){return R}});var r=e(76241),t=e(2784);const l=(0,r.CT)("analytics-context"),u=()=>{const o=(0,t.useContext)(l);if(o===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const c=o.atVersion(1);if(c===void 0)throw new Error("No context found for version 1.");return c},R=o=>{const{attributes:c,children:f}=o,p={...u(),...c},E=(0,r.EI)({1:p});return t.createElement(l.Provider,{value:E},f)};function m(o,c){const f=y=>React.createElement(R,{attributes:c},React.createElement(o,{...y}));return f.displayName=`WithAnalyticsContext(${o.displayName||o.name||"Component"})`,f}},28461:function(te,s,e){"use strict";e.d(s,{f:function(){return r.fC},z:function(){return m}});var r=e(88609),t=e(27399),l=e(2784);class u{constructor(c,f={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=c,this.context=f}setContext(c){this.context=c}captureEvent(c,f,{value:y,attributes:p}={}){try{this.analyticsApi.captureEvent({action:c,subject:f,value:y,attributes:p,context:this.context})}catch(E){console.warn("Error during analytics event capture. %o",E)}}}function R(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function m(){const o=(0,l.useRef)(null),c=(0,r.Os)(),f=R();function y(){return o.current===null&&(o.current=new u(f)),o.current}const p=y();return p.setContext(c),p}},39135:function(te,s,e){"use strict";e.d(s,{CL:function(){return w},sM:function(){return t},$v:function(){return p},v_:function(){return E},hg:function(){return T},uB:function(){return y},bq:function(){return f},Ds:function(){return L},NW:function(){return M},VE:function(){return j},W0:function(){return b},gP:function(){return O},F4:function(){return u},ux:function(){return m},Kp:function(){return l},$4:function(){return F},p_:function(){return o},ZM:function(){return U},D:function(){return R},gW:function(){return c},E6:function(){return Y}});var r=e(86833),t;(function(ne){const ue="SignedIn";ne.SignedIn=ue;const Re="SignedOut";ne.SignedOut=Re})(t||(t={}));const l=(0,r.createApiRef)({id:"core.auth.google"}),u=(0,r.createApiRef)({id:"core.auth.github"}),R=(0,r.createApiRef)({id:"core.auth.okta"}),m=(0,r.createApiRef)({id:"core.auth.gitlab"}),o=(0,r.createApiRef)({id:"core.auth.microsoft"}),c=(0,r.createApiRef)({id:"core.auth.onelogin"}),f=(0,r.createApiRef)({id:"core.auth.bitbucket"}),y=(0,r.createApiRef)({id:"core.auth.atlassian"}),p=(0,r.createApiRef)({id:"core.alert"}),E=(0,r.createApiRef)({id:"core.analytics"}),T=(0,r.createApiRef)({id:"core.apptheme"}),L=(0,r.createApiRef)({id:"core.config"}),M=(0,r.createApiRef)({id:"core.discovery"}),j=(0,r.createApiRef)({id:"core.error"});var w;(function(ne){ne[ne.None=0]="None";const Re=1;ne[ne.Active=Re]="Active"})(w||(w={}));const b=(0,r.createApiRef)({id:"core.featureflags"}),O=(0,r.createApiRef)({id:"core.fetch"}),F=(0,r.createApiRef)({id:"core.identity"}),U=(0,r.createApiRef)({id:"core.oauthrequest"}),Y=(0,r.createApiRef)({id:"core.storage"})},27399:function(te,s,e){"use strict";e.d(s,{FeatureFlagState:function(){return t.CL},SessionState:function(){return t.sM},alertApiRef:function(){return t.$v},analyticsApiRef:function(){return t.v_},appThemeApiRef:function(){return t.hg},atlassianAuthApiRef:function(){return t.uB},bitbucketAuthApiRef:function(){return t.bq},configApiRef:function(){return t.Ds},createApiFactory:function(){return r.createApiFactory},createApiRef:function(){return r.createApiRef},discoveryApiRef:function(){return t.NW},errorApiRef:function(){return t.VE},featureFlagsApiRef:function(){return t.W0},fetchApiRef:function(){return t.gP},githubAuthApiRef:function(){return t.F4},gitlabAuthApiRef:function(){return t.ux},googleAuthApiRef:function(){return t.Kp},identityApiRef:function(){return t.$4},microsoftAuthApiRef:function(){return t.p_},oauthRequestApiRef:function(){return t.ZM},oktaAuthApiRef:function(){return t.D},oneloginAuthApiRef:function(){return t.gW},storageApiRef:function(){return t.E6},useApi:function(){return r.useApi},useApiHolder:function(){return r.useApiHolder}});var r=e(86833);e.o(r,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return r.FeatureFlagState}}),e.o(r,"SessionState")&&e.d(s,{SessionState:function(){return r.SessionState}}),e.o(r,"alertApiRef")&&e.d(s,{alertApiRef:function(){return r.alertApiRef}}),e.o(r,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return r.analyticsApiRef}}),e.o(r,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return r.appThemeApiRef}}),e.o(r,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),e.o(r,"attachComponentData")&&e.d(s,{attachComponentData:function(){return r.attachComponentData}}),e.o(r,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),e.o(r,"configApiRef")&&e.d(s,{configApiRef:function(){return r.configApiRef}}),e.o(r,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return r.createComponentExtension}}),e.o(r,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),e.o(r,"createPlugin")&&e.d(s,{createPlugin:function(){return r.createPlugin}}),e.o(r,"createReactExtension")&&e.d(s,{createReactExtension:function(){return r.createReactExtension}}),e.o(r,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return r.createRoutableExtension}}),e.o(r,"createRouteRef")&&e.d(s,{createRouteRef:function(){return r.createRouteRef}}),e.o(r,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return r.discoveryApiRef}}),e.o(r,"errorApiRef")&&e.d(s,{errorApiRef:function(){return r.errorApiRef}}),e.o(r,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),e.o(r,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return r.fetchApiRef}}),e.o(r,"getComponentData")&&e.d(s,{getComponentData:function(){return r.getComponentData}}),e.o(r,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),e.o(r,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),e.o(r,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),e.o(r,"identityApiRef")&&e.d(s,{identityApiRef:function(){return r.identityApiRef}}),e.o(r,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),e.o(r,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),e.o(r,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),e.o(r,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),e.o(r,"storageApiRef")&&e.d(s,{storageApiRef:function(){return r.storageApiRef}}),e.o(r,"useApp")&&e.d(s,{useApp:function(){return r.useApp}}),e.o(r,"useElementFilter")&&e.d(s,{useElementFilter:function(){return r.useElementFilter}}),e.o(r,"useRouteRef")&&e.d(s,{useRouteRef:function(){return r.useRouteRef}}),e.o(r,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return r.useRouteRefParams}});var t=e(39135)},90515:function(te,s,e){"use strict";e.d(s,{T:function(){return t}});class r{constructor(u){if(this.config=u,!u.id.split(".").flatMap(m=>m.split("-")).every(m=>m.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${u.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function t(l){return new r(l)}},25182:function(te,s,e){"use strict";e.d(s,{n:function(){return r}});function r(t,l){return"id"in t?{api:t,deps:{},factory:()=>l}:t}},86833:function(te,s,e){"use strict";e.d(s,{createApiFactory:function(){return R.n},createApiRef:function(){return t.T},useApi:function(){return r.h_},useApiHolder:function(){return r.I_}});var r=e(5761),t=e(90515),l=e(16362),u=e.n(l);e.o(l,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return l.FeatureFlagState}}),e.o(l,"SessionState")&&e.d(s,{SessionState:function(){return l.SessionState}}),e.o(l,"alertApiRef")&&e.d(s,{alertApiRef:function(){return l.alertApiRef}}),e.o(l,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return l.analyticsApiRef}}),e.o(l,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return l.appThemeApiRef}}),e.o(l,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return l.atlassianAuthApiRef}}),e.o(l,"attachComponentData")&&e.d(s,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return l.bitbucketAuthApiRef}}),e.o(l,"configApiRef")&&e.d(s,{configApiRef:function(){return l.configApiRef}}),e.o(l,"createApiFactory")&&e.d(s,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(s,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createReactExtension")&&e.d(s,{createReactExtension:function(){return l.createReactExtension}}),e.o(l,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(s,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return l.discoveryApiRef}}),e.o(l,"errorApiRef")&&e.d(s,{errorApiRef:function(){return l.errorApiRef}}),e.o(l,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return l.featureFlagsApiRef}}),e.o(l,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return l.fetchApiRef}}),e.o(l,"getComponentData")&&e.d(s,{getComponentData:function(){return l.getComponentData}}),e.o(l,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return l.githubAuthApiRef}}),e.o(l,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return l.gitlabAuthApiRef}}),e.o(l,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return l.googleAuthApiRef}}),e.o(l,"identityApiRef")&&e.d(s,{identityApiRef:function(){return l.identityApiRef}}),e.o(l,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return l.microsoftAuthApiRef}}),e.o(l,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return l.oauthRequestApiRef}}),e.o(l,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return l.oktaAuthApiRef}}),e.o(l,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return l.oneloginAuthApiRef}}),e.o(l,"storageApiRef")&&e.d(s,{storageApiRef:function(){return l.storageApiRef}}),e.o(l,"useApp")&&e.d(s,{useApp:function(){return l.useApp}}),e.o(l,"useElementFilter")&&e.d(s,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(s,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return l.useRouteRefParams}});var R=e(25182)},16362:function(){},5761:function(te,s,e){"use strict";e.d(s,{I_:function(){return l},h_:function(){return u}});var r=e(2784),t=e(76241);function l(){const m=(0,t.Vt)("api-context");if(!m)throw new Error("API context is not available");const o=m.atVersion(1);if(!o)throw new Error("ApiContext v1 not available");return o}function u(m){const c=l().get(m);if(!c)throw new Error(`No implementation available for ${m}`);return c}function R(m){return function(c){const f=p=>{const E=l(),T={};for(const L in m)if(m.hasOwnProperty(L)){const M=m[L],j=E.get(M);if(!j)throw new Error(`No implementation available for ${M}`);T[L]=j}return React.createElement(c,{...p,...T})},y=c.displayName||c.name||"Component";return f.displayName=`withApis(${y})`,f}}},31311:function(te,s,e){"use strict";e.d(s,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),l=e.n(t);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(s,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(te,s,e){"use strict";e.d(s,{q:function(){return t}});var r=e(76241);const t=()=>{const l=(0,r.Vt)("app-context");if(!l)throw new Error("App context is not available");const u=l.atVersion(1);if(!u)throw new Error("AppContext v1 not available");return u}},74181:function(te,s,e){"use strict";e.d(s,{R5:function(){return u},CO:function(){return E},YO:function(){return T},P4:function(){return p},IY:function(){return R},vJ:function(){return w}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),l="__backstage_data";function u(b,O,F){var ne;const U=b;let Y=(ne=U[l])!=null?ne:t.get(b);if(Y||(Y={map:new Map},Object.defineProperty(U,l,{enumerable:!1,configurable:!0,writable:!1,value:Y}),t.set(b,Y)),Y.map.has(O)){const ue=b.displayName||b.name;throw new Error(`Attempted to attach duplicate data "${O}" to component "${ue}"`)}Y.map.set(O,F)}function R(b,O){var Y;if(!b)return;const F=b.type;if(!F)return;const U=(Y=F[l])!=null?Y:t.get(F);if(!!U)return U.map.get(O)}var m=e(2784),o=e(88609),c=e(31311),f=e(82772);class y extends m.Component{constructor(){super(...arguments);q(this,"state",{error:void 0});q(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(F){return{error:F}}render(){const{error:F}=this.state,{app:U,plugin:Y}=this.props,{ErrorBoundaryFallback:ne}=U.getComponents();return F?m.createElement(ne,{error:F,resetError:this.handleErrorReset,plugin:Y}):this.props.children}}function p(b){const{component:O,mountPoint:F,name:U}=b;return T({component:{lazy:()=>O().then(Y=>{const ne=Re=>{try{(0,f.tg)(F)}catch(we){if(typeof we=="object"&&we!==null){const{message:ge}=we;if(typeof ge=="string"&&ge.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${F} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw we}return m.createElement(Y,{...Re})},ue=U||Y.displayName||Y.name||"LazyComponent";return ne.displayName=`RoutableExtension(${ue})`,ne},Y=>ue=>{const Re=(0,c.useApp)(),{BootErrorPage:we}=Re.getComponents();return m.createElement(we,{step:"load-chunk",error:Y})})},data:{"core.mountPoint":F},name:U})}function E(b){const{component:O,name:F}=b;return T({component:O,name:F})}function T(b){const{data:O={},name:F}=b;F||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let U;if("lazy"in b.component){const ne=b.component.lazy;U=(0,m.lazy)(()=>ne().then(ue=>({default:ue})))}else U=b.component.sync;const Y=F||U.displayName||U.name||"Component";return{expose(ne){const ue=Re=>{const we=(0,c.useApp)(),{Progress:ge}=we.getComponents(),ze=O==null?void 0:O["core.mountPoint"];return m.createElement(m.Suspense,{fallback:m.createElement(ge,null)},m.createElement(y,{app:we,plugin:ne},m.createElement(o.fC,{attributes:{pluginId:ne.getId(),...F&&{extension:F},...ze&&{routeRef:ze.id}}},m.createElement(U,{...Re}))))};u(ue,"core.plugin",ne);for(const[Re,we]of Object.entries(O))u(ue,Re,we);return ue.displayName=`Extension(${Y})`,ue}}}var L=e(27399);function M(b,O,F,U){return m.Children.toArray(b).flatMap(Y=>{if(!(0,m.isValidElement)(Y))return[];if(Y.type===m.Fragment)return M(Y.props.children,O,F,U);if(R(Y,"core.featureFlagged")){const ne=Y.props;return("with"in ne?O.isActive(ne.with):!O.isActive(ne.without))?M(Y.props.children,O,F,U):[]}if(F===void 0||F(Y))return[Y];if(U)throw new Error(U);return M(Y.props.children,O,F,U)})}class j{constructor(O,F){this.node=O,this.featureFlagsApi=F}selectByComponentData(O){const F=M(this.node,this.featureFlagsApi,U=>R(U,O.key)!==void 0,O.withStrictError);return new j(F,this.featureFlagsApi)}findComponentData(O){return M(this.node,this.featureFlagsApi,U=>R(U,O.key)!==void 0).map(U=>R(U,O.key)).filter(U=>U!==void 0)}getElements(){return M(this.node,this.featureFlagsApi)}}function w(b,O,F=[]){const U=(0,L.useApi)(L.featureFlagsApiRef),Y=new j(b,U);return(0,m.useMemo)(()=>O(Y),[b,...F])}},80274:function(){},36964:function(te,s,e){"use strict";e.d(s,{AnalyticsContext:function(){return r.f},FeatureFlagState:function(){return t.FeatureFlagState},SessionState:function(){return t.SessionState},alertApiRef:function(){return t.alertApiRef},analyticsApiRef:function(){return t.analyticsApiRef},appThemeApiRef:function(){return t.appThemeApiRef},atlassianAuthApiRef:function(){return t.atlassianAuthApiRef},attachComponentData:function(){return u.R5},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},createComponentExtension:function(){return u.CO},createExternalRouteRef:function(){return c.x8},createPlugin:function(){return o.r},createReactExtension:function(){return u.YO},createRoutableExtension:function(){return u.P4},createRouteRef:function(){return c.NT},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},getComponentData:function(){return u.IY},githubAuthApiRef:function(){return t.githubAuthApiRef},gitlabAuthApiRef:function(){return t.gitlabAuthApiRef},googleAuthApiRef:function(){return t.googleAuthApiRef},identityApiRef:function(){return t.identityApiRef},microsoftAuthApiRef:function(){return t.microsoftAuthApiRef},oauthRequestApiRef:function(){return t.oauthRequestApiRef},oktaAuthApiRef:function(){return t.oktaAuthApiRef},oneloginAuthApiRef:function(){return t.oneloginAuthApiRef},storageApiRef:function(){return t.storageApiRef},useAnalytics:function(){return r.z},useApp:function(){return l.useApp},useElementFilter:function(){return u.vJ},useRouteRef:function(){return c.tg},useRouteRefParams:function(){return c.Oi}});var r=e(28461),t=e(27399);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(s,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(s,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}});var l=e(31311);e.o(l,"attachComponentData")&&e.d(s,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"createApiFactory")&&e.d(s,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createApiRef")&&e.d(s,{createApiRef:function(){return l.createApiRef}}),e.o(l,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(s,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createReactExtension")&&e.d(s,{createReactExtension:function(){return l.createReactExtension}}),e.o(l,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(s,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"getComponentData")&&e.d(s,{getComponentData:function(){return l.getComponentData}}),e.o(l,"useApi")&&e.d(s,{useApi:function(){return l.useApi}}),e.o(l,"useApiHolder")&&e.d(s,{useApiHolder:function(){return l.useApiHolder}}),e.o(l,"useElementFilter")&&e.d(s,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(s,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return l.useRouteRefParams}});var u=e(74181),R=e(80274),m=e.n(R);e.o(R,"createApiFactory")&&e.d(s,{createApiFactory:function(){return R.createApiFactory}}),e.o(R,"createApiRef")&&e.d(s,{createApiRef:function(){return R.createApiRef}}),e.o(R,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return R.createExternalRouteRef}}),e.o(R,"createPlugin")&&e.d(s,{createPlugin:function(){return R.createPlugin}}),e.o(R,"createRouteRef")&&e.d(s,{createRouteRef:function(){return R.createRouteRef}}),e.o(R,"useApi")&&e.d(s,{useApi:function(){return R.useApi}}),e.o(R,"useApiHolder")&&e.d(s,{useApiHolder:function(){return R.useApiHolder}}),e.o(R,"useRouteRef")&&e.d(s,{useRouteRef:function(){return R.useRouteRef}}),e.o(R,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return R.useRouteRefParams}});var o=e(96896),c=e(82772)},96896:function(te,s,e){"use strict";e.d(s,{r:function(){return t}});class r{constructor(u){this.config=u}getId(){return this.config.id}getApis(){var u;return(u=this.config.apis)!=null?u:[]}getFeatureFlags(){var u,R;return(R=(u=this.config.featureFlags)==null?void 0:u.slice())!=null?R:[]}get routes(){var u;return(u=this.config.routes)!=null?u:{}}get externalRoutes(){var u;return(u=this.config.externalRoutes)!=null?u:{}}provide(u){return u.expose(this)}toString(){return`plugin{${this.config.id}}`}}function t(l){return new r(l)}},82772:function(te,s,e){var L,M,j;"use strict";e.d(s,{x8:function(){return f},NT:function(){return u},tg:function(){return E},Oi:function(){return T}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class l{constructor(b,O){q(this,L,"absolute");this.id=b,this.params=O}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}L=t;function u(w){var b;return new l(w.id,(b=w.params)!=null?b:[])}const R=/^\w+$/;class m{constructor(b,O,F,U){q(this,M,"sub");this.id=b,this.path=O,this.parent=F,this.params=U}toString(){return`routeRef{type=sub,id=${this.id}}`}}M=t;function o(w){const{id:b,path:O,parent:F}=w,U=O.split("/").filter(ue=>ue.startsWith(":")).map(ue=>ue.substring(1)),Y=[...F.params,...U];if(F.params.some(ue=>U.includes(ue)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!O.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${O}'`);if(O.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${O}'`);for(const ue of U)if(!R.test(ue))throw new Error(`SubRouteRef path has invalid param, got '${ue}'`);return new m(b,O,F,Y)}class c{constructor(b,O,F){q(this,j,"external");this.id=b,this.params=O,this.optional=F}toString(){return`routeRef{type=external,id=${this.id}}`}}j=t;function f(w){var b;return new c(w.id,(b=w.params)!=null?b:[],Boolean(w.optional))}var y=e(2784),p=e(10289);function E(w){const b=(0,p.TH)(),O=(0,r.Vt)("routing-context");if(!O)throw new Error("Routing context is not available");const F=O.atVersion(1),U=(0,y.useMemo)(()=>F&&F.resolve(w,b),[F,w,b]);if(!O)throw new Error("useRouteRef used outside of routing context");if(!F)throw new Error("RoutingContext v1 not available");const Y="optional"in w&&w.optional;if(!U&&!Y)throw new Error(`No path for ${w}`);return U}function T(w){return(0,p.UO)()}},10179:function(te,s,e){"use strict";e.d(s,{SP:function(){return L},dR:function(){return p},VL:function(){return j},BD:function(){return t}});function r(w){if(typeof w!="object"||w===null||Array.isArray(w))return!1;const b=w;return!(typeof b.name!="string"||b.name===""||typeof b.message!="string")}function t(w){if(typeof w!="object"||w===null||Array.isArray(w))throw new Error(`Encountered invalid error, not an object, got '${w}'`);const b=w;if(typeof b.name!="string"||b.name==="")throw new Error(`Encountered error object without a name, got '${w}'`);if(typeof b.message!="string")throw new Error(`Encountered error object without a message, got '${w}'`)}var l=e(24852);function u(w,b){const O=serializeErrorInternal(w),F={name:"Unknown",message:"<no reason given>",...O};return b!=null&&b.includeStack||delete F.stack,F}function R(w){const b=(0,l.deserializeError)(w);return w.stack||(b.stack=void 0),b}function m(w){if(r(w)){const b=String(w);return b!=="[object Object]"?b:`${w.name}: ${w.message}`}return`unknown error '${w}'`}class o extends Error{constructor(O,F){var Y;let U=O;if(F!==void 0){const ne=m(F);U?U+=`; caused by ${ne}`:U=`caused by ${ne}`}super(U);q(this,"cause");(Y=Error.captureStackTrace)==null||Y.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(F)?F:void 0}}class c extends null{}class f extends null{}class y extends null{}class p extends o{}class E extends null{}class T extends null{}class L extends o{constructor(b,O){super(b,O),this.name=r(O)?O.name:"Error"}}async function M(w){var b;try{const O=await w.text();if(O){if((b=w.headers.get("content-type"))!=null&&b.startsWith("application/json"))try{const F=JSON.parse(O);if(F.error&&F.response)return F}catch{}return{error:{name:"Error",message:`Request failed with status ${w.status} ${w.statusText}, ${O}`},response:{statusCode:w.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${w.status} ${w.statusText}`},response:{statusCode:w.status}}}class j extends Error{constructor(O){super(O.message);q(this,"response");q(this,"body");q(this,"cause");this.name="ResponseError",this.response=O.response,this.body=O.data,this.cause=O.cause}static async fromResponse(O){const F=await M(O),U=F.response.statusCode||O.status,Y=F.error.name||O.statusText,ne=`Request failed with ${U} ${Y}`,ue=R(F.error);return new j({message:ne,response:O,data:F,cause:ue})}}},36356:function(te,s,e){var p,E,T,L,M;"use strict";e.d(s,{nW:function(){return y},ae:function(){return m},q3:function(){return o}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class l{constructor(b){On(this,p,void 0);Bn(this,p,b)}async getCredentials(b){const O=new URL(b.url),F=rt(this,p).find(U=>U.isUrlSupported(O));if(!F)throw new Error(`No auth provider available for '${b.url}', see https://backstage.io/link?scm-auth`);return F.getCredentials(b)}}p=new WeakMap;const j=class{constructor(b,O,F,U){On(this,E,void 0);On(this,T,void 0);On(this,L,void 0);On(this,M,void 0);Bn(this,E,O),Bn(this,T,F),Bn(this,L,U),Bn(this,M,b)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:b,gitlab:O,azure:F,bitbucket:U})=>j.merge(j.forGithub(b),j.forGitlab(O),j.forAzure(F),j.forBitbucket(U))})}static forAuthApi(b,O){return new j("generic",b,O.host,O.scopeMapping)}static forGithub(b,O){var U;const F=(U=O==null?void 0:O.host)!=null?U:"github.com";return new j("github",b,F,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(b,O){var U;const F=(U=O==null?void 0:O.host)!=null?U:"gitlab.com";return new j("gitlab",b,F,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(b,O){var U;const F=(U=O==null?void 0:O.host)!=null?U:"dev.azure.com";return new j("azure",b,F,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(b,O){var U;const F=(U=O==null?void 0:O.host)!=null?U:"bitbucket.org";return new j("bitbucket",b,F,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...b){return new l(b)}isUrlSupported(b){return b.host===rt(this,T)}getAdditionalScopesForProvider(b){var O,F;return!(b!=null&&b.customScopes)||rt(this,M)==="generic"?[]:(F=(O=b.customScopes)==null?void 0:O[rt(this,M)])!=null?F:[]}async getCredentials(b){const{url:O,additionalScope:F,...U}=b,Y=rt(this,L).default.slice();F!=null&&F.repoWrite&&Y.push(...rt(this,L).repoWrite);const ne=this.getAdditionalScopesForProvider(F);ne.length&&Y.push(...ne);const ue=[...new Set(Y)],Re=await rt(this,E).getAccessToken(ue,U);return{token:Re,headers:{Authorization:`Bearer ${Re}`}}}};let u=j;E=new WeakMap,T=new WeakMap,L=new WeakMap,M=new WeakMap;var R=e(68370);class m{static fromConfig(b){return R.Lx.fromConfig(b)}}const o=(0,r.createApiRef)({id:"integration.scmintegrations"});var c=e(73250),f=e(2784);const y=w=>{var Y;const{type:b}=w,O=(0,r.useApp)(),F=c.Z,U=b&&(Y=O.getSystemIcon(b))!=null?Y:F;return f.createElement(U,null)}},68370:function(te,s,e){var $t,ot,Dt,_t,Zt,zt,nn;"use strict";e.d(s,{Lx:function(){return Gt},Pb:function(){return Xt}});var r=e(82717),t=e.n(r),l=e(76635);function u($){const h=new URL("http://example.com");return h.host=$,h.host===$}function R($){try{return new URL($),!0}catch{return!1}}function m($,h){return{list(){return $},byUrl(S){try{const B=typeof S=="string"?new URL(S):S;return $.find(W=>h(W)===B.host)}catch{return}},byHost(S){return $.find(B=>h(B)===S)}}}function o($){const{url:h,base:S,lineNumber:B}=$;try{return new URL(h),h}catch{}let W;if(h.startsWith("/")){const{filepath:pe}=t()(S);W=new URL(S);const me=(0,l.trimEnd)(W.pathname.substring(0,W.pathname.length-pe.length),"/");W.pathname=`${me}${h}`}else W=new URL(h,S);return W.search=new URL(S).search,B&&(W.hash=`L${B}`),W.toString()}const c="amazonaws.com";function f($){var kt;const h=$.getOptionalString("endpoint"),S=(kt=$.getOptionalBoolean("s3ForcePathStyle"))!=null?kt:!1;let B,W;if(h){try{const Wt=new URL(h);B=Wt.host,W=Wt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${h}' is not a valid URL`)}if(W!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${h}'`)}else B=c;const pe=$.getOptionalString("accessKeyId"),me=$.getOptionalString("secretAccessKey"),Me=$.getOptionalString("roleArn"),mt=$.getOptionalString("externalId");return{host:B,endpoint:h,s3ForcePathStyle:S,accessKeyId:pe,secretAccessKey:me,roleArn:Me,externalId:mt}}function y($){const h=$.map(f);return h.some(S=>S.host===c)||h.push({host:c}),h}const wt=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(h){this.integrationConfig=h}resolveUrl(h){return o(h)}resolveEditUrl(h){return h}};let p=wt;q(p,"factory",({config:h})=>{var B;const S=y((B=h.getOptionalConfigArray("integrations.awsS3"))!=null?B:[]);return m(S.map(W=>new wt(W)),W=>W.config.host)});const E="GB",Sn=class{constructor(h,S,B,W,pe,me){On(this,$t,void 0);On(this,ot,void 0);On(this,Dt,void 0);On(this,_t,void 0);On(this,Zt,void 0);On(this,zt,void 0);On(this,nn,(...h)=>{const S=new URL(rt(this,$t));return S.pathname=h.map(B=>encodeURIComponent(B)).join("/"),S});Bn(this,$t,h),Bn(this,ot,S),Bn(this,Dt,B),Bn(this,_t,W),Bn(this,Zt,pe),Bn(this,zt,me)}static fromRepoUrl(h){var Wt;const S=new URL(h);let B,W,pe;const me=S.pathname.split("/").map(Cn=>decodeURIComponent(Cn));if(me[2]==="_git"?(B=me[1],W=pe=me[3]):me[3]==="_git"?(B=me[1],W=me[2],pe=me[4]):me[4]==="_git"&&(B=`${me[1]}/${me[2]}`,W=me[3],pe=me[5]),!B||!W||!pe)throw new Error("Azure URL must point to a git repository");const Me=(Wt=S.searchParams.get("path"))!=null?Wt:void 0;let mt;const kt=S.searchParams.get("version");if(kt){if(kt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");mt=kt.slice(2)}return new Sn(S.origin,B,W,pe,Me,mt)}toRepoUrl(){let h;return rt(this,Dt)===rt(this,_t)?h=rt(this,nn).call(this,rt(this,ot),"_git",rt(this,_t)):h=rt(this,nn).call(this,rt(this,ot),rt(this,Dt),"_git",rt(this,_t)),rt(this,Zt)&&h.searchParams.set("path",rt(this,Zt)),rt(this,zt)&&h.searchParams.set("version",E+rt(this,zt)),h.toString()}toFileUrl(){if(!rt(this,Zt))throw new Error("Azure URL must point to a specific path to be able to download a file");const h=rt(this,nn).call(this,rt(this,ot),rt(this,Dt),"_apis","git","repositories",rt(this,_t),"items");return h.searchParams.set("api-version","6.0"),h.searchParams.set("path",rt(this,Zt)),rt(this,zt)&&h.searchParams.set("version",rt(this,zt)),h.toString()}toArchiveUrl(){const h=rt(this,nn).call(this,rt(this,ot),rt(this,Dt),"_apis","git","repositories",rt(this,_t),"items");return h.searchParams.set("recursionLevel","full"),h.searchParams.set("download","true"),h.searchParams.set("api-version","6.0"),rt(this,Zt)&&h.searchParams.set("scopePath",rt(this,Zt)),rt(this,zt)&&h.searchParams.set("version",rt(this,zt)),h.toString()}toCommitsUrl(){const h=rt(this,nn).call(this,rt(this,ot),rt(this,Dt),"_apis","git","repositories",rt(this,_t),"commits");return h.searchParams.set("api-version","6.0"),rt(this,zt)&&h.searchParams.set("searchCriteria.itemVersion.version",rt(this,zt)),h.toString()}getOwner(){return rt(this,ot)}getProject(){return rt(this,Dt)}getRepo(){return rt(this,_t)}getPath(){return rt(this,Zt)}getRef(){return rt(this,zt)}};let T=Sn;$t=new WeakMap,ot=new WeakMap,Dt=new WeakMap,_t=new WeakMap,Zt=new WeakMap,zt=new WeakMap,nn=new WeakMap;const L="dev.azure.com";function M($){var B;const h=(B=$.getOptionalString("host"))!=null?B:L,S=$.getOptionalString("token");if(!u(h))throw new Error(`Invalid Azure integration config, '${h}' is not a valid host`);return{host:h,token:S}}function j($){const h=$.map(M);return h.some(S=>S.host===L)||h.push({host:L}),h}const Kt=class{constructor(h){this.integrationConfig=h}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){var W;const{url:S,base:B}=h;if(R(S))return S;try{const pe=T.fromRepoUrl(B),me=new URL(B),Me=new URL(`https://a.com${(W=pe.getPath())!=null?W:""}`),mt=new URL(S,Me).pathname;return me.searchParams.set("path",mt),h.lineNumber&&(me.searchParams.set("line",String(h.lineNumber)),me.searchParams.set("lineEnd",String(h.lineNumber+1)),me.searchParams.set("lineStartColumn","1"),me.searchParams.set("lineEndColumn","1")),me.toString()}catch{return new URL(S,B).toString()}}resolveEditUrl(h){return h}};let w=Kt;q(w,"factory",({config:h})=>{var B;const S=j((B=h.getOptionalConfigArray("integrations.azure"))!=null?B:[]);return m(S.map(W=>new Kt(W)),W=>W.config.host)});var b=e(48834).Buffer;function O($){return AzureUrl.fromRepoUrl($).toFileUrl()}function F($){return AzureUrl.fromRepoUrl($).toArchiveUrl()}function U($){return AzureUrl.fromRepoUrl($).toCommitsUrl()}function Y($,h){const S=h?{...h}:{};if($.token){const B=b.from(`:${$.token}`,"utf8");S.Authorization=`Basic ${B.toString("base64")}`}return{headers:S}}const ne="bitbucket.org",ue="https://api.bitbucket.org/2.0";function Re($){var me;const h=(me=$.getOptionalString("host"))!=null?me:ne;let S=$.getOptionalString("apiBaseUrl");const B=$.getOptionalString("token"),W=$.getOptionalString("username"),pe=$.getOptionalString("appPassword");if(!u(h))throw new Error(`Invalid Bitbucket integration config, '${h}' is not a valid host`);return S?S=(0,l.trimEnd)(S,"/"):h===ne?S=ue:S=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:S,token:B,username:W,appPassword:pe}}function we($){const h=$.map(Re);return h.some(S=>S.host===ne)||h.push({host:ne,apiBaseUrl:ue}),h}const Ot=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const S=o(h);if(!h.lineNumber)return S;const B=new URL(S);return this.integrationConfig.host==="bitbucket.org"?B.hash=`lines-${h.lineNumber}`:B.hash=`${h.lineNumber}`,B.toString()}resolveEditUrl(h){const S=t()(h),B=new URL(h);return B.searchParams.set("mode","edit"),B.searchParams.set("spa","0"),B.searchParams.set("at",S.ref),B.toString()}};let ge=Ot;q(ge,"factory",({config:h})=>{var B,W,pe;const S=we((pe=h.getOptionalConfigArray("integrations.bitbucket"))!=null?pe:[...(B=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?B:[],...(W=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?W:[]]);return m(S.map(me=>new Ot(me)),me=>me.config.host)});var ze=e(96279),_e=e(48834).Buffer;async function et($,h){const{name:S,owner:B,resource:W}=parseGitUrl($),pe=W==="bitbucket.org";let me=pe?`${h.apiBaseUrl}/repositories/${B}/${S}`:`${h.apiBaseUrl}/projects/${B}/repos/${S}/default-branch`,Me=await fetch(me,Et(h));if(Me.status===404&&!pe&&(me=`${h.apiBaseUrl}/projects/${B}/repos/${S}/branches/default`,Me=await fetch(me,Et(h))),!Me.ok){const kt=`Failed to retrieve default branch from ${me}, ${Me.status} ${Me.statusText}`;throw new Error(kt)}let mt;if(pe)mt=(await Me.json()).mainbranch.name;else{const{displayId:kt}=await Me.json();mt=kt}if(!mt)throw new Error(`Failed to read default branch from ${me}. Response ${Me.status} ${Me.json()}`);return mt}async function it($,h){const{name:S,owner:B,ref:W,protocol:pe,resource:me,filepath:Me}=parseGitUrl($),mt=me==="bitbucket.org";let kt=W;kt||(kt=await et($,h));const Wt=Me?`&path=${encodeURIComponent(Me)}`:"";return mt?`${pe}://${me}/${B}/${S}/get/${kt}.tar.gz`:`${h.apiBaseUrl}/projects/${B}/repos/${S}/archive?format=tgz&at=${kt}&prefix=${B}-${S}${Wt}`}function St($,h){try{const{owner:S,name:B,ref:W,filepathtype:pe,filepath:me}=parseGitUrl($);if(!S||!B||pe!=="browse"&&pe!=="raw"&&pe!=="src")throw new Error("Invalid Bitbucket URL or file path");const Me=me.replace(/^\//,"");if(h.host==="bitbucket.org"){if(!W)throw new Error("Invalid Bitbucket URL or file path");return`${h.apiBaseUrl}/repositories/${S}/${B}/src/${W}/${Me}`}return`${h.apiBaseUrl}/projects/${S}/repos/${B}/raw/${Me}?at=${W}`}catch(S){throw new Error(`Incorrect URL: ${$}, ${S}`)}}function Et($){const h={};if($.token)h.Authorization=`Bearer ${$.token}`;else if($.username&&$.appPassword){const S=_e.from(`${$.username}:${$.appPassword}`,"utf8");h.Authorization=`Basic ${S.toString("base64")}`}return{headers:h}}const Pe="bitbucket.org",pt="https://api.bitbucket.org/2.0";function Ge($){const h=Pe,S=pt,B=$.getString("username"),W=$.getString("appPassword");return{host:h,apiBaseUrl:S,username:B,appPassword:W}}function ie($){const h=$.map(Ge);return h.length===0&&h.push({host:Pe,apiBaseUrl:pt}),h}const mn=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const S=o(h);if(h.lineNumber){const B=new URL(S);return B.hash=`lines-${h.lineNumber}`,B.toString()}return S}resolveEditUrl(h){const S=t()(h),B=new URL(h);return B.searchParams.set("mode","edit"),B.searchParams.set("at",S.ref),B.toString()}};let de=mn;q(de,"factory",({config:h})=>{var B;const S=ie((B=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?B:[]);return m(S.map(W=>new mn(W)),W=>W.config.host)});var Ue=e(48834).Buffer;async function Be($,h){const{name:S,owner:B}=parseGitUrl($),W=`${h.apiBaseUrl}/repositories/${B}/${S}`,pe=await fetch(W,ke(h));if(!pe.ok){const mt=`Failed to retrieve default branch from ${W}, ${pe.status} ${pe.statusText}`;throw new Error(mt)}const Me=(await pe.json()).mainbranch.name;if(!Me)throw new Error(`Failed to read default branch from ${W}. Response ${pe.status} ${pe.json()}`);return Me}async function Xe($,h){const{name:S,owner:B,ref:W,protocol:pe,resource:me}=parseGitUrl($);let Me=W;return Me||(Me=await Be($,h)),`${pe}://${me}/${B}/${S}/get/${Me}.tar.gz`}function ht($,h){try{const{owner:S,name:B,ref:W,filepathtype:pe,filepath:me}=parseGitUrl($);if(!S||!B||pe!=="src"&&pe!=="raw")throw new Error("Invalid Bitbucket Cloud URL or file path");const Me=me.replace(/^\//,"");if(!W)throw new Error("Invalid Bitbucket Cloud URL or file path");return`${h.apiBaseUrl}/repositories/${S}/${B}/src/${W}/${Me}`}catch(S){throw new Error(`Incorrect URL: ${$}, ${S}`)}}function ke($){const h={};if($.username&&$.appPassword){const S=Ue.from(`${$.username}:${$.appPassword}`,"utf8");h.Authorization=`Basic ${S.toString("base64")}`}return{headers:h}}function vt($){const h=$.getString("host");let S=$.getOptionalString("apiBaseUrl");const B=$.getOptionalString("token");if(!u(h))throw new Error(`Invalid Bitbucket Server integration config, '${h}' is not a valid host`);return S?S=(0,l.trimEnd)(S,"/"):S=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:S,token:B}}function oe($){return $.map(vt)}const yn=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const S=o(h);if(h.lineNumber){const B=new URL(S),W=B.pathname.split("/").slice(-1)[0];return B.hash=`${W}-${h.lineNumber}`,B.toString()}return S}resolveEditUrl(h){const S=t()(h),B=new URL(h);return B.searchParams.set("mode","edit"),B.searchParams.set("spa","0"),B.searchParams.set("at",S.ref),B.toString()}};let fe=yn;q(fe,"factory",({config:h})=>{var B;const S=oe((B=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?B:[]);return m(S.map(W=>new yn(W)),W=>W.config.host)});async function tt($,h){const{name:S,owner:B}=parseGitUrl($);let W=`${h.apiBaseUrl}/projects/${B}/repos/${S}/default-branch`,pe=await fetch(W,ut(h));if(pe.status===404&&(W=`${h.apiBaseUrl}/projects/${B}/repos/${S}/branches/default`,pe=await fetch(W,ut(h))),!pe.ok){const mt=`Failed to retrieve default branch from ${W}, ${pe.status} ${pe.statusText}`;throw new Error(mt)}const{displayId:me}=await pe.json(),Me=me;if(!Me)throw new Error(`Failed to read default branch from ${W}. Response ${pe.status} ${pe.json()}`);return Me}async function Ye($,h){const{name:S,owner:B,ref:W,filepath:pe}=parseGitUrl($);let me=W;me||(me=await tt($,h));const Me=pe?`&path=${encodeURIComponent(pe)}`:"";return`${h.apiBaseUrl}/projects/${B}/repos/${S}/archive?format=tgz&at=${me}&prefix=${B}-${S}${Me}`}function Ne($,h){try{const{owner:S,name:B,ref:W,filepathtype:pe,filepath:me}=parseGitUrl($);if(!S||!B||pe!=="browse"&&pe!=="raw"&&pe!=="src")throw new Error("Invalid Bitbucket Server URL or file path");const Me=me.replace(/^\//,"");return`${h.apiBaseUrl}/projects/${S}/repos/${B}/raw/${Me}?at=${W}`}catch(S){throw new Error(`Incorrect URL: ${$}, ${S}`)}}function ut($){const h={};return $.token&&(h.Authorization=`Bearer ${$.token}`),{headers:h}}function X($){const h=$.getString("host");let S=$.getOptionalString("baseUrl"),B=$.getOptionalString("cloneUrl"),W=$.getOptionalString("gitilesBaseUrl");const pe=$.getOptionalString("username"),me=$.getOptionalString("password");if(u(h)){if(S&&!R(S))throw new Error(`Invalid Gerrit integration config, '${S}' is not a valid baseUrl`);if(B&&!R(B))throw new Error(`Invalid Gerrit integration config, '${B}' is not a valid cloneUrl`);if(W&&!R(W))throw new Error(`Invalid Gerrit integration config, '${W}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${h}' is not a valid host`);return S?S=(0,l.trimEnd)(S,"/"):S=`https://${h}`,W?W=(0,l.trimEnd)(W,"/"):W=`https://${h}`,B?B=(0,l.trimEnd)(B,"/"):B=S,{host:h,baseUrl:S,cloneUrl:B,gitilesBaseUrl:W,username:pe,password:me}}function Z($){return $.map(X)}var Q=e(48834).Buffer;const se=")]}'";function ce($,h){const B=h.replace($.gitilesBaseUrl,"").split("/").filter(kt=>!!kt),W=B.indexOf("+");if(W<=0)throw new Error(`Unable to parse project from url: ${h}`);const pe=(0,l.trimStart)(B.slice(0,W).join("/"),"/"),me=B.indexOf("heads");if(me<=0)throw new Error(`Unable to parse branch from url: ${h}`);const Me=B[me+1],mt=B.slice(me+2).join("/");return{branch:Me,filePath:mt===""?"/":mt,project:pe}}function Ce($,h,S,B){return`${$.gitilesBaseUrl}/${h}/+/refs/heads/${S}/${(0,l.trimStart)(B,"/")}`}function Le($){return $.password?"/a/":"/"}function Ae($,h){const{branch:S,project:B}=ce($,h);return`${$.baseUrl}${Le($)}projects/${encodeURIComponent(B)}/branches/${S}`}function Ke($,h){const{project:S}=ce($,h);return`${$.cloneUrl}${Le($)}${S}`}function je($,h){const{branch:S,filePath:B,project:W}=ce($,h);return`${$.baseUrl}${Le($)}projects/${encodeURIComponent(W)}/branches/${S}/files/${encodeURIComponent(B)}/content`}function gt($){return`${$.baseUrl}${Le($)}projects/`}function Ct($){const h={};if(!$.password)return h;const S=Q.from(`${$.username}:${$.password}`,"utf8");return h.Authorization=`Basic ${S.toString("base64")}`,{headers:h}}async function dt($){const h=await $.text();if(h.startsWith(se))try{return JSON.parse(h.slice(se.length))}catch(S){throw new Error(`Invalid response from Gerrit: ${h.slice(0,10)} - ${S}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${h.slice(0,10)}`)}const rn=class{constructor(h){this.integrationConfig=h}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const{url:S,base:B,lineNumber:W}=h;let pe;if(S.startsWith("/")){const{branch:me,project:Me}=ce(this.config,B);return Ce(this.config,Me,me,S)}return S?pe=new URL(S,B):pe=new URL(B),W&&(pe.hash=W.toString()),pe.toString()}resolveEditUrl(h){return h}};let Rt=rn;q(Rt,"factory",({config:h})=>{var B;const S=Z((B=h.getOptionalConfigArray("integrations.gerrit"))!=null?B:[]);return m(S.map(W=>new rn(W)),W=>W.config.host)});const bt="github.com",Lt="https://api.github.com",Pt="https://raw.githubusercontent.com";function Nt($){var me,Me;const h=(me=$.getOptionalString("host"))!=null?me:bt;let S=$.getOptionalString("apiBaseUrl"),B=$.getOptionalString("rawBaseUrl");const W=$.getOptionalString("token"),pe=(Me=$.getOptionalConfigArray("apps"))==null?void 0:Me.map(mt=>({appId:mt.getNumber("appId"),clientId:mt.getString("clientId"),clientSecret:mt.getString("clientSecret"),webhookSecret:mt.getString("webhookSecret"),privateKey:mt.getString("privateKey"),allowedInstallationOwners:mt.getOptionalStringArray("allowedInstallationOwners")}));if(!u(h))throw new Error(`Invalid GitHub integration config, '${h}' is not a valid host`);return S?S=(0,l.trimEnd)(S,"/"):h===bt&&(S=Lt),B?B=(0,l.trimEnd)(B,"/"):h===bt&&(B=Pt),{host:h,apiBaseUrl:S,rawBaseUrl:B,token:W,apps:pe}}function At($){const h=$.map(Nt);return h.some(S=>S.host===bt)||h.push({host:bt,apiBaseUrl:Lt,rawBaseUrl:Pt}),h}function at($,h,S){try{const{owner:B,name:W,ref:pe,filepathtype:me,filepath:Me}=parseGitUrl($);if(!B||!W||!pe||me!=="blob"&&me!=="raw"&&me!=="tree")throw new Error("Invalid GitHub URL or file path");const mt=Me.replace(/^\//,"");return _(h,S)==="api"?`${h.apiBaseUrl}/repos/${B}/${W}/contents/${mt}?ref=${pe}`:`${h.rawBaseUrl}/${B}/${W}/${pe}/${mt}`}catch(B){throw new Error(`Incorrect URL: ${$}, ${B}`)}}function Zn($,h){const S={};return _($,h)==="api"&&(S.Accept="application/vnd.github.v3.raw"),h.token&&(S.Authorization=`token ${h.token}`),{headers:S}}function _($,h){return $.apiBaseUrl&&(h.token||!$.rawBaseUrl)?"api":"raw"}class V{constructor(){q(this,"tokenCache",new Map);q(this,"isNotExpired",h=>h.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(h,S){const B=this.tokenCache.get(h);if(B&&this.isNotExpired(B.expiresAt))return{accessToken:B.token};const W=await S();return this.tokenCache.set(h,W),{accessToken:W.token}}}const ye={Accept:"application/vnd.github.machine-man-preview+json"};class We{constructor(h,S){q(this,"appClient");q(this,"baseUrl");q(this,"baseAuthConfig");q(this,"cache",new V);q(this,"allowedInstallationOwners");this.allowedInstallationOwners=h.allowedInstallationOwners,this.baseUrl=S,this.baseAuthConfig={appId:h.appId,privateKey:h.privateKey.replace(/\\n/gm,`
|
|
31
|
-
`)},this.appClient=new Octokit({baseUrl:S,headers:ye,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(h,S){var me;const{installationId:B,suspended:W}=await this.getInstallationData(h);if(this.allowedInstallationOwners&&!((me=this.allowedInstallationOwners)!=null&&me.includes(h)))return{accessToken:void 0};if(W)throw new Error(`The GitHub application for ${h} is suspended`);const pe=S?`${h}/${S}`:h;return this.cache.getOrCreateToken(pe,async()=>{const Me=await this.appClient.apps.createInstallationAccessToken({installation_id:B,headers:ye});if(S&&Me.data.repository_selection==="selected"){const mt=new Octokit({baseUrl:this.baseUrl,auth:Me.data.token});if(!(await mt.paginate(mt.apps.listReposAccessibleToInstallation)).some(Cn=>Cn.name===S))throw new Error(`The Backstage GitHub application used in the ${h} organization does not have access to a repository with the name ${S}`)}return{token:Me.data.token,expiresAt:DateTime.fromISO(Me.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(h){const B=(await this.getInstallations()).find(pe=>{var me,Me;return((Me=(me=pe.account)==null?void 0:me.login)==null?void 0:Me.toLocaleLowerCase("en-US"))===h.toLocaleLowerCase("en-US")});if(B)return{installationId:B.id,suspended:Boolean(B.suspended_by)};const W=new Error(`No app installation found for ${h} in ${this.baseAuthConfig.appId}`);throw W.name="NotFoundError",W}}class qe{constructor(h){q(this,"apps");var S,B;this.apps=(B=(S=h.apps)==null?void 0:S.map(W=>new We(W,h.apiBaseUrl)))!=null?B:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(S=>S.getInstallations()))).flat():[]}async getAppToken(h,S){if(this.apps.length===0)return;const B=await Promise.all(this.apps.map(Me=>Me.getInstallationCredentials(h,S).then(mt=>({credentials:mt,error:void 0}),mt=>({credentials:void 0,error:mt})))),W=B.find(Me=>Me.credentials);if(W)return W.credentials.accessToken;const me=B.map(Me=>Me.error).find(Me=>Me.name!=="NotFoundError");if(me)throw me}}class nt{constructor(h,S){this.githubAppCredentialsMux=h,this.token=S}async getCredentials(h){const S=parseGitUrl(h.url),B=S.owner||S.name,W=S.owner?S.name:void 0;let pe="app",me=await this.githubAppCredentialsMux.getAppToken(B,W);return me||(pe="token",me=this.token),{headers:me?{Authorization:`Bearer ${me}`}:void 0,token:me,type:pe}}}q(nt,"create",null);class Tt{static fromIntegrations(h){const S=new Map;return h.github.list().forEach(B=>{const W=SingleInstanceGithubCredentialsProvider.create(B.config);S.set(B.config.host,W)}),new Tt(S)}constructor(h){this.providers=h}async getCredentials(h){const S=new URL(h.url),B=this.providers.get(S.host);if(!B)throw new Error(`There is no GitHub integration that matches ${h.url}. Please add a configuration for an integration.`);return B.getCredentials(h)}}const hn=class{constructor(h){this.integrationConfig=h}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return Xt(o(h),"tree")}resolveEditUrl(h){return Xt(h,"edit")}};let Ut=hn;q(Ut,"factory",({config:h})=>{var B;const S=At((B=h.getOptionalConfigArray("integrations.github"))!=null?B:[]);return m(S.map(W=>new hn(W)),W=>W.config.host)});function Xt($,h){return $.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(S,B,W,pe)=>`//${B}/${W}/${pe}/${h}/`)}const cn="gitlab.com",un="https://gitlab.com/api/v4";function xt($){const h=$.getString("host");let S=$.getOptionalString("apiBaseUrl");const B=$.getOptionalString("token");let W=$.getOptionalString("baseUrl");if(S?S=(0,l.trimEnd)(S,"/"):h===cn&&(S=un),W?W=(0,l.trimEnd)(W,"/"):W=`https://${h}`,u(h)){if(!S||!R(S))throw new Error(`Invalid GitLab integration config, '${S}' is not a valid apiBaseUrl`);if(!R(W))throw new Error(`Invalid GitLab integration config, '${W}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${h}' is not a valid host`);return{host:h,token:B,apiBaseUrl:S,baseUrl:W}}function fn($){const h=$.map(xt);return h.some(S=>S.host===cn)||h.push({host:cn,apiBaseUrl:un,baseUrl:`https://${cn}`}),h}var x=e(10179);async function re($,h){if($.includes("/-/blob/")){const S=await Je($,h);return Ie($,S).toString()}return be($).toString()}function ve($){const{token:h=""}=$;return{headers:{"PRIVATE-TOKEN":h}}}function be($){try{const h=new URL($),S=h.pathname.split("/").filter(Boolean),B=S.indexOf("blob",2);if(B<2||B===S.length-1)throw new InputError("Wrong GitLab URL");const W=S.slice(0,B),pe=S.slice(B+1);if(!pe.join("/").match(/\.(yaml|yml)$/))throw new InputError("Wrong GitLab URL");return h.pathname=[...W,"raw",...pe].join("/"),h}catch(h){throw new InputError(`Incorrect url: ${$}, ${h}`)}}function Ie($,h){try{const S=new URL($),B=S.pathname.split("/-/blob/")[1],[W,...pe]=B.split("/");return S.pathname=["/api/v4/projects",h,"repository/files",encodeURIComponent(decodeURIComponent(pe.join("/"))),"raw"].join("/"),S.search=`?ref=${W}`,S}catch(S){throw new Error(`Incorrect url: ${$}, ${S}`)}}async function Je($,h){const S=new URL($);if(!S.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const B=S.pathname.split("/-/blob/")[0],W=new URL(`${S.origin}/api/v4/projects/${encodeURIComponent(B.replace(/^\//,""))}`),pe=await fetch(W.toString(),ve(h)),me=await pe.json();if(!pe.ok)throw new Error(`GitLab Error '${me.error}', ${me.error_description}`);return Number(me.id)}catch(B){throw new Error(`Could not get GitLab project ID for: ${$}, ${B}`)}}const xn=class{constructor(h){this.integrationConfig=h}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return o(h)}resolveEditUrl(h){return Vt(h,"edit")}};let lt=xn;q(lt,"factory",({config:h})=>{var B;const S=fn((B=h.getOptionalConfigArray("integrations.gitlab"))!=null?B:[]);return m(S.map(W=>new xn(W)),W=>W.config.host)});function Vt($,h){return $.replace(/\/\-\/(blob|tree|edit)\//,`/-/${h}/`)}class Gt{constructor(h){q(this,"byType");this.byType=h}static fromConfig(h){return new Gt({awsS3:p.factory({config:h}),azure:w.factory({config:h}),bitbucket:ge.factory({config:h}),bitbucketCloud:de.factory({config:h}),bitbucketServer:fe.factory({config:h}),gerrit:Rt.factory({config:h}),github:Ut.factory({config:h}),gitlab:lt.factory({config:h})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get bitbucketCloud(){return this.byType.bitbucketCloud}get bitbucketServer(){return this.byType.bitbucketServer}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}list(){return Object.values(this.byType).flatMap(h=>h.list())}byUrl(h){return Object.values(this.byType).map(S=>S.byUrl(h)).find(Boolean)}byHost(h){return Object.values(this.byType).map(S=>S.byHost(h)).find(Boolean)}resolveUrl(h){const S=this.byUrl(h.base);return S?S.resolveUrl(h):o(h)}resolveEditUrl(h){const S=this.byUrl(h);return S?S.resolveEditUrl(h):h}}},46054:function(te,s,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return R.plugin}});var t=e(2784),l=e(47093),u=e(10289),R=e(82250),m=e(26136),o=e(49208),c=e(36964),f=e(68099);const y=[(0,c.createApiFactory)({api:c.discoveryApiRef,deps:{configApi:c.configApiRef},factory:({configApi:I})=>o.UrlPatternDiscovery.compile(`${I.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,c.createApiFactory)({api:c.alertApiRef,deps:{},factory:()=>new o.AlertApiForwarder}),(0,c.createApiFactory)({api:c.analyticsApiRef,deps:{},factory:()=>new o.NoOpAnalyticsApi}),(0,c.createApiFactory)({api:c.errorApiRef,deps:{alertApi:c.alertApiRef},factory:({alertApi:I})=>{const J=new o.ErrorAlerter(I,new o.ErrorApiForwarder);return o.UnhandledErrorForwarder.forward(J,{hidden:!1}),J}}),(0,c.createApiFactory)({api:c.storageApiRef,deps:{errorApi:c.errorApiRef},factory:({errorApi:I})=>o.WebStorage.create({errorApi:I})}),(0,c.createApiFactory)({api:c.fetchApiRef,deps:{configApi:c.configApiRef,identityApi:c.identityApiRef,discoveryApi:c.discoveryApiRef},factory:({configApi:I,identityApi:J,discoveryApi:he})=>(0,o.createFetchApi)({middleware:[o.FetchMiddlewares.resolvePluginProtocol({discoveryApi:he}),o.FetchMiddlewares.injectIdentityAuth({identityApi:J,config:I})]})}),(0,c.createApiFactory)({api:c.oauthRequestApiRef,deps:{},factory:()=>new o.OAuthRequestManager}),(0,c.createApiFactory)({api:c.googleAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:I,oauthRequestApi:J,configApi:he})=>o.GoogleAuth.create({discoveryApi:I,oauthRequestApi:J,environment:he.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:c.microsoftAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:I,oauthRequestApi:J,configApi:he})=>o.MicrosoftAuth.create({discoveryApi:I,oauthRequestApi:J,environment:he.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:c.githubAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:I,oauthRequestApi:J,configApi:he})=>o.GithubAuth.create({discoveryApi:I,oauthRequestApi:J,defaultScopes:["read:user"],environment:he.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:c.oktaAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:I,oauthRequestApi:J,configApi:he})=>o.OktaAuth.create({discoveryApi:I,oauthRequestApi:J,environment:he.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:c.gitlabAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:I,oauthRequestApi:J,configApi:he})=>o.GitlabAuth.create({discoveryApi:I,oauthRequestApi:J,environment:he.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:c.oneloginAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:I,oauthRequestApi:J,configApi:he})=>o.OneLoginAuth.create({discoveryApi:I,oauthRequestApi:J,environment:he.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:c.bitbucketAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:I,oauthRequestApi:J,configApi:he})=>o.BitbucketAuth.create({discoveryApi:I,oauthRequestApi:J,defaultScopes:["team"],environment:he.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:c.atlassianAuthApiRef,deps:{discoveryApi:c.discoveryApiRef,oauthRequestApi:c.oauthRequestApiRef,configApi:c.configApiRef},factory:({discoveryApi:I,oauthRequestApi:J,configApi:he})=>o.AtlassianAuth.create({discoveryApi:I,oauthRequestApi:J,environment:he.getOptionalString("auth.environment")})}),(0,c.createApiFactory)({api:f.RV,deps:{discovery:c.discoveryApiRef,identity:c.identityApiRef,config:c.configApiRef},factory:({config:I,discovery:J,identity:he})=>f.iM.create({config:I,discovery:J,identity:he})})];var p=e(77277),E=e(82339),T=e(62833);function L({children:I}){return(0,u.GV)()?t.createElement(t.Fragment,null,I):t.createElement(u.VA,null,I)}const M=()=>t.createElement(E.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),j=({step:I,error:J})=>{let he="";return I==="load-config"?he=`The configuration failed to load, someone should have a look at this error: ${J.message}`:I==="load-chunk"&&(he=`Lazy loaded chunk failed to load, try to reload the page: ${J.message}`),t.createElement(L,null,t.createElement(E.ErrorPage,{status:"501",statusMessage:he}))},w=({error:I,resetError:J,plugin:he})=>t.createElement(E.ErrorPanel,{title:`Error in ${he==null?void 0:he.getId()}`,defaultExpanded:!0,error:I},t.createElement(p.Z,{variant:"outlined",onClick:J},"Retry")),b={Progress:E.Progress,Router:T.VK,NotFoundErrorPage:M,BootErrorPage:j,ErrorBoundaryFallback:w};var O=e(43642),F=e(80079),U=e(90941),Y=e(32915),ne=e(40562),ue=e(21853),Re=e(60744),we=e(66569),ge=e(30254),ze=e(13384),_e=e(15933),et=e(58838),it=e(86737),St=e(4989),Et=e(44407),Pe=e(18628),pt=e(84219),Ge=e(98685),ie=e(39781);const de={brokenImage:F.Z,catalog:Pe.Z,scaffolder:Y.Z,techdocs:ne.Z,search:ue.Z,chat:Re.Z,dashboard:we.Z,docs:ge.Z,email:ze.Z,github:et.Z,group:pt.Z,help:it.Z,"kind:api":_e.Z,"kind:component":Et.Z,"kind:domain":O.Z,"kind:group":pt.Z,"kind:location":St.Z,"kind:system":U.Z,"kind:user":Ge.Z,user:Ge.Z,warning:ie.Z};var Ue=e(73689),Be=e(48032);const Xe={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")`},ht={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"]};function ke(I,J){const $e=`linear-gradient(90deg, ${(I.length===1?[I[0],I[0]]:I).join(", ")})`,Qe=`${J}, ${$e}`;return{colors:I,shape:J,backgroundImage:Qe}}const vt={home:ke(ht.teal,Xe.wave),documentation:ke(ht.pinkSea,Xe.wave2),tool:ke(ht.purpleSky,Xe.round),service:ke(ht.marineBlue,Xe.wave),website:ke(ht.veryBlue,Xe.wave),library:ke(ht.rubyRed,Xe.wave),other:ke(ht.darkGrey,Xe.wave),app:ke(ht.toastyOrange,Xe.wave),apis:ke(ht.teal,Xe.wave2)},oe=16,fe='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function tt(I){const{palette:J,htmlFontSize:he=oe,fontFamily:$e=fe,defaultPageTheme:Qe,pageTheme:yt=vt}=I;if(!yt[Qe])throw new Error(`${Qe} is not defined in pageTheme.`);return{palette:J,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{htmlFontSize:he,fontFamily:$e,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:yt[Qe],getPageTheme:({themeId:v})=>{var C;return(C=yt[v])!=null?C:yt[Qe]}}}function Ye(I){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:I.typography.fontFamily},body:{height:"100%",fontFamily:I.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:I.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:I.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:I.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:I.spacing(1.5,2,1.5,2.5)},head:{wordBreak:"break-word",overflow:"hidden",color:"rgb(179, 179, 179)",fontWeight:"normal",lineHeight:"1"}},MuiTabs:{root:{minHeight:24}},MuiTab:{root:{color:I.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,Be.darken)(I.palette.link,.3),background:(0,Be.lighten)(I.palette.link,.95)},[I.breakpoints.up("md")]:{minWidth:120,fontSize:I.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:I.palette.link}},MuiTableSortLabel:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"}},active:{fontWeight:"bold",color:"inherit"}},MuiListItemText:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},MuiButton:{text:{padding:void 0}},MuiChip:{root:{backgroundColor:"#D9D9D9",marginRight:I.spacing(1),marginBottom:I.spacing(1),color:I.palette.grey[900]},outlined:{color:I.palette.text.primary},label:{lineHeight:`${I.spacing(2.5)}px`,fontWeight:I.typography.fontWeightMedium,fontSize:`${I.spacing(1.75)}px`},labelSmall:{fontSize:`${I.spacing(1.5)}px`},deleteIcon:{color:I.palette.grey[500],width:`${I.spacing(3)}px`,height:`${I.spacing(3)}px`,margin:`0 ${I.spacing(.75)}px 0 -${I.spacing(.75)}px`},deleteIconSmall:{width:`${I.spacing(2)}px`,height:`${I.spacing(2)}px`,margin:`0 ${I.spacing(.5)}px 0 -${I.spacing(.5)}px`}},MuiCard:{root:{display:"flex",flexDirection:"column"}},MuiCardHeader:{root:{paddingBottom:0}},MuiCardContent:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}},MuiCardActions:{root:{justifyContent:"flex-end"}}}}function Ne(I){const J=tt(I),he=(0,Ue.Z)(J),$e=Ye(he);return{...he,overrides:$e}}var ut=e(34505);const X=Ne({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:ut.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:vt}),Z=Ne({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:ut.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:vt});var Q=e(98192),se=e(15222),ce=e(41547),Ce=e(87561);const Le=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(se.Z,null),Provider:({children:I})=>t.createElement(ce.Z,{theme:X},t.createElement(Ce.ZP,null,I))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(Q.Z,null),Provider:({children:I})=>t.createElement(ce.Z,{theme:Z},t.createElement(Ce.ZP,null,I))}];function Ae(I){var J,he,$e;return(0,o.createSpecializedApp)({...I,apis:(J=I==null?void 0:I.apis)!=null?J:[],bindRoutes:I==null?void 0:I.bindRoutes,components:{...b,...I==null?void 0:I.components},configLoader:I==null?void 0:I.configLoader,defaultApis:y,icons:{...de,...I==null?void 0:I.icons},plugins:(he=I==null?void 0:I.plugins)!=null?he:[],themes:($e=I==null?void 0:I.themes)!=null?$e:Le})}var Ke=e(82394),je=e.n(Ke),gt=e(48023),Ct=e(76635);async function dt({storageApi:I}){var yt;const J=I.forBucket("settings"),he=I.forBucket("starredEntities"),$e=J.snapshot("starredEntities").value;if(!(0,Ct.isArray)($e))return;const Qe=new Set((yt=he.snapshot("entityRefs").value)!=null?yt:[]);$e.filter(Ct.isString).map(v=>v.split(":")).filter(v=>v.length===4&&v[0]==="entity").map(([v,C,D,z])=>(0,gt.eE)({kind:C,namespace:D,name:z})).forEach(v=>Qe.add(v)),await he.set("entityRefs",Array.from(Qe)),await J.remove("starredEntities")}class Rt{constructor(J){q(this,"settingsStore");q(this,"starredEntities");q(this,"subscribers",new Set);q(this,"observable",new(je())(J=>(J.next(new Set(this.starredEntities)),this.subscribers.add(J),()=>{this.subscribers.delete(J)})));var he;dt(J).then(),this.settingsStore=J.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((he=this.settingsStore.snapshot("entityRefs").value)!=null?he:[]),this.settingsStore.observe$("entityRefs").subscribe({next:$e=>{var Qe;this.starredEntities=new Set((Qe=$e.value)!=null?Qe:[]),this.notifyChanges()}})}async toggleStarred(J){this.starredEntities.has(J)?this.starredEntities.delete(J):this.starredEntities.add(J),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const J of this.subscribers)J.next(new Set(this.starredEntities))}}var bt=e(39398),Lt=e(49782),Pt=e(79692),Nt=e(74450);const At=(0,Pt.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function at(I){var yt,v;const J=I.result,he=At(),$e=useAnalytics(),Qe=()=>{$e.captureEvent("discover",J.title,{attributes:{to:J.location},value:I.rank})};return React.createElement(Link,{noTrack:!0,to:J.location,onClick:Qe},React.createElement(ListItem,{alignItems:"flex-start"},I.icon&&React.createElement(ListItemIcon,null,I.icon),React.createElement("div",{className:he.flexContainer},React.createElement(ListItemText,{className:he.itemText,primaryTypographyProps:{variant:"h6"},primary:(yt=I.highlight)!=null&&yt.fields.title?React.createElement(HighlightedSearchResultText,{text:I.highlight.fields.title,preTag:I.highlight.preTag,postTag:I.highlight.postTag}):J.title,secondary:(v=I.highlight)!=null&&v.fields.text?React.createElement(HighlightedSearchResultText,{text:I.highlight.fields.text,preTag:I.highlight.preTag,postTag:I.highlight.postTag}):J.text}),React.createElement(Box,null,J.kind&&React.createElement(Chip,{label:`Kind: ${J.kind}`,size:"small"}),J.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${J.lifecycle}`,size:"small"})))),React.createElement(Divider,{component:"li"}))}var Zn=e(30097),_=e(53479),V=e(95544),ye=e(99688),We=e(12231),qe=e(86136),nt=e(49378),Tt=e(85256),Ut=e(61837),Xt=e(79784),cn=e(50758),un=e(49166),xt=e(31654),fn=e(43054),x=e(40749);const re="catalog-entity",ve=(0,x.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:re}),be=(0,x.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),Ie=(0,x.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:re}),Je=(0,x.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:re}),lt=(0,x.J$)({name:"catalog.location.read",attributes:{action:"read"}}),Vt=(0,x.J$)({name:"catalog.location.create",attributes:{action:"create"}}),Gt=(0,x.J$)({name:"catalog.location.delete",attributes:{action:"delete"}}),wt=(0,Pt.Z)(I=>({button:{color:I.palette.bursts.fontColor}}),{name:"PluginCatalogEntityContextMenu"});function $t(I){var Te;const{UNSTABLE_extraContextMenuItems:J,UNSTABLE_contextMenuOptions:he,onUnregisterEntity:$e,onInspectEntity:Qe}=I,[yt,v]=(0,t.useState)(),C=wt(),D=(0,_.useEntityPermission)(Ie),z=Fe=>{v(Fe.currentTarget)},G=()=>{v(void 0)},k=J&&[...J.map(Fe=>t.createElement(We.Z,{key:Fe.title,onClick:()=>{G(),Fe.onClick()}},t.createElement(qe.Z,null,t.createElement(Fe.Icon,{fontSize:"small"})),t.createElement(nt.Z,{primary:Fe.title}))),t.createElement(Tt.Z,{key:"the divider is here!"})],le=(Te=!D.allowed||(he==null?void 0:he.disableUnregister))!=null?Te:!1;return t.createElement(t.Fragment,null,t.createElement(Ut.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true","aria-expanded":!!yt,role:"button",onClick:z,"data-testid":"menu-button",className:C.button,id:"long-menu"},t.createElement(fn.Z,null)),t.createElement(Xt.ZP,{open:Boolean(yt),onClose:G,anchorEl:yt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},"aria-labelledby":"long-menu"},t.createElement(cn.Z,null,k,t.createElement(We.Z,{onClick:()=>{G(),$e()},disabled:le},t.createElement(qe.Z,null,t.createElement(un.Z,{fontSize:"small"})),t.createElement(nt.Z,{primary:"Unregister entity"})),t.createElement(We.Z,{onClick:()=>{G(),Qe()}},t.createElement(qe.Z,null,t.createElement(xt.Z,{fontSize:"small"})),t.createElement(nt.Z,{primary:"Inspect entity"})))))}const ot="plugin.catalog.entityLayoutRoute",Dt=()=>null;(0,c.attachComponentData)(Dt,ot,!0),(0,c.attachComponentData)(Dt,"core.gatherMountPoints",!0);function _t(I){const{entity:J,title:he}=I;return t.createElement(V.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(V.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},he),J&&t.createElement(_.FavoriteEntity,{entity:J}))}function Zt(I,J,he,$e){var C,D,z,G,k;const Qe=(C=I!=null?I:$e==null?void 0:$e.kind)!=null?C:"",yt=(D=J!=null?J:$e==null?void 0:$e.metadata.namespace)!=null?D:"";return{headerTitle:`${(k=(G=(z=$e==null?void 0:$e.metadata.title)!=null?z:he)!=null?G:$e==null?void 0:$e.metadata.name)!=null?k:""}${yt&&yt!==gt.zG?` in ${yt}`:""}`,headerType:(()=>{let le=Qe.toLocaleLowerCase("en-US");return $e&&$e.spec&&"type"in $e.spec&&(le+=" \u2014 ",le+=$e.spec.type.toLocaleLowerCase("en-US")),le})()}}function zt(I){var $e;const{entity:J}=I,he=(0,_.getEntityRelations)(J,gt.S4);return t.createElement(t.Fragment,null,he.length>0&&t.createElement(E.HeaderLabel,{label:"Owner",value:t.createElement(_.EntityRefLinks,{entityRefs:he,defaultKind:"Group",color:"inherit"})}),(($e=J.spec)==null?void 0:$e.lifecycle)&&t.createElement(E.HeaderLabel,{label:"Lifecycle",value:J.spec.lifecycle}))}const nn=I=>{var Ve,Ft,Yt;const{UNSTABLE_extraContextMenuItems:J,UNSTABLE_contextMenuOptions:he,children:$e,NotFoundComponent:Qe}=I,{kind:yt,namespace:v,name:C}=(0,c.useRouteRefParams)(_.entityRouteRef),{entity:D,loading:z,error:G}=(0,_.useAsyncEntity)(),k=(0,u.TH)(),le=(0,c.useElementFilter)($e,Wn=>Wn.selectByComponentData({key:ot,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:an})=>{if(D){if(an.if&&!an.if(D))return[]}else return[];return[{path:an.path,title:an.title,children:an.children,tabProps:an.tabProps}]}),[D]),{headerTitle:Te,headerType:Fe}=Zt(yt,v,C,D),[xe,Oe]=(0,t.useState)(!1),[Ze,He]=(0,t.useState)(!1),It=(0,u.s0)(),st=async()=>{Oe(!1),He(!1),It("/")};return(0,t.useEffect)(()=>{Oe(!1),He(!1)},[k.pathname]),t.createElement(E.Page,{themeId:(Yt=(Ft=(Ve=D==null?void 0:D.spec)==null?void 0:Ve.type)==null?void 0:Ft.toString())!=null?Yt:"home"},t.createElement(E.Header,{title:t.createElement(_t,{title:Te,entity:D}),pageTitleOverride:Te,type:Fe},D&&t.createElement(t.Fragment,null,t.createElement(zt,{entity:D}),t.createElement($t,{UNSTABLE_extraContextMenuItems:J,UNSTABLE_contextMenuOptions:he,onUnregisterEntity:()=>Oe(!0),onInspectEntity:()=>He(!0)}))),z&&t.createElement(E.Progress,null),D&&t.createElement(E.RoutedTabs,{routes:le}),G&&t.createElement(E.Content,null,t.createElement(ye.Z,{severity:"error"},G.toString())),!z&&!G&&!D&&t.createElement(E.Content,null,Qe||t.createElement(E.WarningPanel,{title:"Entity not found"},"There is no ",yt," with the requested"," ",t.createElement(E.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(_.UnregisterEntityDialog,{open:xe,entity:D,onConfirm:st,onClose:()=>Oe(!1)}),t.createElement(_.InspectEntityDialog,{open:Ze,entity:D,onClose:()=>He(!1)}))};nn.Route=Dt;var Sn=e(10179);function Kt(I){const{open:J,onClose:he,onConfirm:$e,entity:Qe}=I,[yt,v]=useState(!1),C=useApi(catalogApiRef),D=useApi(alertApiRef),z=async()=>{v(!0);try{const G=Qe.metadata.uid;await C.removeEntityByUid(G),$e()}catch(G){assertError(G),D.post({message:G.message})}finally{v(!1)}};return React.createElement(Dialog,{open:J,onClose:he},React.createElement(DialogTitle,{id:"responsive-dialog-title"},"Are you sure you want to delete this entity?"),React.createElement(DialogActions,null,React.createElement(Button,{variant:"contained",color:"secondary",disabled:yt,onClick:z},"Delete"),React.createElement(Button,{onClick:he,color:"primary"},"Cancel")))}var Ot=e(47851);function mn(I){var J,he;return((he=(J=I==null?void 0:I.metadata)==null?void 0:J.annotations)==null?void 0:he["backstage.io/orphan"])==="true"}function yn(){const I=useNavigate(),J=useRouteRef(rootRouteRef),[he,$e]=useState(!1),{entity:Qe}=useEntity(),yt=async()=>{$e(!1),I(J())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>$e(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:he,entity:Qe,onConfirm:yt,onClose:()=>$e(!1)}))}var rn=e(30001);const hn=I=>I.error&&I.level==="error"&&I.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function xn(I,J){return{items:(await J.getEntityAncestors({entityRef:I})).items.map(Qe=>{var C,D;return{errors:((D=(C=Qe.entity.status)==null?void 0:C.items)!=null?D:[]).filter(hn).map(z=>z.error).filter(z=>Boolean(z)),entity:Qe.entity}}).filter(Qe=>Qe.errors.length>0)}}async function $(I,J){const he=J.apis.get(catalogApiRef);if(!he)throw new Error(`No implementation available for ${catalogApiRef}`);return(await xn(stringifyEntityRef(I),he)).items.length>0}function h(){const{entity:I}=useEntity(),J=stringifyEntityRef(I),he=useApi(catalogApiRef),{loading:$e,error:Qe,value:yt}=useAsync(async()=>xn(J,he),[J,he]);return Qe?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:Qe})):$e||!yt?null:React.createElement(React.Fragment,null,yt.items.map((v,C)=>React.createElement(Box,{key:C,mb:1},stringifyEntityRef(I)!==stringifyEntityRef(v.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:v.entity})),v.errors.map((D,z)=>React.createElement(ResponseErrorPanel,{key:z,error:D})))))}var S=e(64279);const B="core.backstage.entitySwitch",W=I=>null;(0,c.attachComponentData)(W,B,!0);const pe=I=>{var v,C;const{entity:J,loading:he}=(0,_.useAsyncEntity)(),$e=(0,c.useApiHolder)(),Qe=(0,c.useElementFilter)(I.children,D=>D.selectByComponentData({key:B,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(z=>{var le;if(he)return[];const{if:G,children:k}=z.props;return J?[{if:(le=G==null?void 0:G(J,{apis:$e}))!=null?le:!0,children:k}]:[{if:G===void 0,children:k}]}),[$e,J,he]);return Qe.some(D=>typeof D.if=="object"&&"then"in D.if)?t.createElement(me,{results:Qe}):(C=(v=Qe.find(D=>D.if))==null?void 0:v.children)!=null?C:null};function me({results:I}){const{loading:J,value:he}=(0,S.default)(async()=>{var Qe;const $e=I.map(async({if:yt,children:v})=>{try{if(await yt)return v}catch{}return null});return(Qe=(await Promise.all($e)).find(Boolean))!=null?Qe:null},[I]);return J||!he?null:he}pe.Case=W;const Me=null,mt=_.CatalogFilterLayout.Filters,kt=_.CatalogFilterLayout.Content,Wt=(0,c.createPlugin)({id:"catalog",apis:[(0,c.createApiFactory)({api:_.catalogApiRef,deps:{discoveryApi:c.discoveryApiRef,fetchApi:c.fetchApiRef},factory:({discoveryApi:I,fetchApi:J})=>new rn.MS({discoveryApi:I,fetchApi:J})}),(0,c.createApiFactory)({api:_.starredEntitiesApiRef,deps:{storageApi:c.storageApiRef},factory:({storageApi:I})=>new Rt({storageApi:I})})],routes:{catalogIndex:Ot._Z,catalogEntity:_.entityRouteRef},externalRoutes:{createComponent:Ot.yw,viewTechDoc:Ot.jU}}),Cn=Wt.provide((0,c.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(I=>I.CatalogPage),mountPoint:Ot._Z})),Er=Wt.provide((0,c.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(I=>I.CatalogEntityPage),mountPoint:_.entityRouteRef})),nr=Wt.provide((0,c.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(I=>I.AboutCard)}})),Wr=Wt.provide((0,c.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(I=>I.EntityLinksCard)}})),Hr=Wt.provide((0,c.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(I=>I.HasSystemsCard)}})),zn=Wt.provide((0,c.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(I=>I.HasComponentsCard)}})),Mn=Wt.provide((0,c.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(I=>I.HasSubcomponentsCard)}})),Yn=Wt.provide((0,c.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(I=>I.HasResourcesCard)}})),rr=Wt.provide((0,c.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(I=>I.DependsOnComponentsCard)}})),vr=Wt.provide((0,c.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(I=>I.DependencyOfComponentsCard)}})),jr=Wt.provide((0,c.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(I=>I.DependsOnResourcesCard)}})),ar=Wt.provide((0,c.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(I=>I.RelatedEntitiesCard)}}));var or=e(36356);class Vr{constructor({configApi:J,discoveryApi:he,identityApi:$e}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=J,this.discoveryApi=he,this.identityApi=$e}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(J,he){const Qe=`${await this.getApiOrigin()}/${he}`,yt=await fetch(`${Qe.endsWith("/")?Qe:`${Qe}/`}index.html`);if(yt.status===404)throw new Error("Page not found");return yt.text()}async syncEntityDocs(J){return"cached"}async getBaseUrl(J,he,$e){const Qe=await this.getApiOrigin();return new URL(J,`${Qe}/${$e}`).toString()}}class qn{constructor({configApi:J,discoveryApi:he,identityApi:$e}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=J,this.discoveryApi=he,this.identityApi=$e}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(J){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(J){return{site_name:"Live preview environment",site_description:""}}}const Tn=[(0,c.createApiFactory)({api:m.Dl,deps:{configApi:c.configApiRef,discoveryApi:c.discoveryApiRef,identityApi:c.identityApiRef},factory:({configApi:I,discoveryApi:J,identityApi:he})=>new Vr({configApi:I,discoveryApi:J,identityApi:he})}),(0,c.createApiFactory)({api:m.gT,deps:{configApi:c.configApiRef,discoveryApi:c.discoveryApiRef,identityApi:c.identityApiRef},factory:({configApi:I,discoveryApi:J,identityApi:he})=>new qn({configApi:I,discoveryApi:J,identityApi:he})}),(0,c.createApiFactory)({api:or.q3,deps:{configApi:c.configApiRef},factory:({configApi:I})=>or.ae.fromConfig(I)})],_n={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},er={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Ar(){const I=await fetch("/.detect");return I.ok?(await I.text()).trim()==="techdocs-cli-server":!1}async function sr(){const I=await(0,o.defaultConfigLoader)(),J=await Ar();return[...I,{context:"detected",data:J?_n:er}]}var ir=e(86689),Rr=e(58845);const Sr=(0,Pt.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Cr=()=>{const I=Sr();return t.createElement("svg",{className:I.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:I.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"}))};const Tr=(0,Pt.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Pr=()=>{const I=Tr();return t.createElement("svg",{className:I.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:I.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"}))};const cr=(0,Pt.Z)({root:{width:E.sidebarConfig.drawerWidthClosed,height:3*E.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:E.sidebarConfig.drawerWidthClosed,marginLeft:24}}),Ir=()=>{const I=cr(),{isOpen:J}=(0,E.useSidebarOpenState)();return t.createElement("div",{className:I.root},t.createElement(ir.Z,{component:T.OL,to:"/docs/default/component/local/",underline:"none",className:I.link},J?t.createElement(Cr,null):t.createElement(Pr,null)))},ur=({children:I})=>t.createElement(E.SidebarPage,null,t.createElement(E.Sidebar,null,t.createElement(Ir,null),t.createElement(E.SidebarDivider,null),t.createElement(E.SidebarItem,{icon:Rr.Z,to:"/docs/default/component/local",text:"Docs Preview"})),I);var dn=e(80030),Dn=e(32388),Lr=e(4142);const Or=(0,Pt.Z)(I=>({headerIcon:{color:I.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:I.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var bn;(function(I){const J="light";I.LIGHT=J;const he="dark";I.DARK=he})(bn||(bn={}));const jn=()=>{const I=(0,c.useApi)(c.appThemeApiRef),J=Or(),[he,$e]=(0,t.useState)(I.getActiveThemeId()||bn.LIGHT),Qe={[bn.LIGHT]:{icon:Lr.Z,title:"Dark theme"},[bn.DARK]:{icon:Dn.Z,title:"Light theme"}},{title:yt,icon:v}=Qe[he],C=()=>{$e(D=>{const z=D===bn.LIGHT?bn.DARK:bn.LIGHT;return I.setActiveThemeId(z),z})};return t.createElement(V.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(dn.ZP,{title:yt,arrow:!0},t.createElement(Ut.Z,{size:"small",onClick:C},t.createElement(v,{className:J.headerIcon}))))},Vn=()=>t.createElement(R.TechDocsReaderPage,null,t.createElement(R.TechDocsReaderPageHeader,null),t.createElement(R.TechDocsReaderPageContent,{withSearch:!1})),xr=t.createElement(Vn,null),dr=Ae({apis:Tn,configLoader:sr,plugins:Object.values(r)}),fr=dr.getProvider(),Gn=dr.getRouter(),Gr=R.techdocsPlugin.provide((0,m.KY)({name:"ThemeToggleAddon",component:jn,location:m.oZ.Header})),Dr=t.createElement(o.FlatRoutes,null,t.createElement(u.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(u.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(Er,null)}),t.createElement(u.AW,{path:"/docs",element:t.createElement(R.TechDocsIndexPage,null)},t.createElement(R.DefaultTechDocsHome,null)),t.createElement(u.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(R.TechDocsReaderPage,null)},xr,t.createElement(m.DR,null,t.createElement(Gr,null))));var Br=()=>t.createElement(fr,null,t.createElement(Gn,null,t.createElement(ur,null,Dr)));l.render(t.createElement(Br,null),document.getElementById("root"))},76241:function(te,s,e){"use strict";e.d(s,{CT:function(){return m},EI:function(){return f},uW:function(){return u},Vt:function(){return o}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),l=y=>`__@backstage/${y}__`;function u(y,p){const E=l(y);let T=t[E];return T||(T=p(),t[E]=T,T)}var R=e(2784);function m(y){return u(y,()=>(0,R.createContext)(void 0))}function o(y){return(0,R.useContext)(m(y))}function c(y){return{set(p){globalThis[`__@backstage/${y}__`]=createContext(createVersionedValueMap(p))},reset(){delete globalThis[`__@backstage/${y}__`]}}}function f(y){return Object.freeze(y),{atVersion(p){return y[p]}}}},53479:function(te,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return U},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return b},EntityKindFilter:function(){return Q},EntityLifecyclePicker:function(){return xt},EntityListProvider:function(){return Ue},EntityOwnerPicker:function(){return ve},EntityRefLink:function(){return X},EntityRefLinks:function(){return Z},EntityTable:function(){return wt},EntityTagPicker:function(){return _t},EntityTypePicker:function(){return nn},FavoriteEntity:function(){return rn},InspectEntityDialog:function(){return xr},UnregisterEntityDialog:function(){return Fr},UserListPicker:function(){return Qe},catalogApiRef:function(){return l},entityRouteRef:function(){return fe},getEntityRelations:function(){return pt},getEntitySourceLocation:function(){return Ge},humanizeEntityRef:function(){return Ye},starredEntitiesApiRef:function(){return u},useAsyncEntity:function(){return ue},useEntity:function(){return ne},useEntityList:function(){return Be},useEntityOwnership:function(){return Nt},useEntityPermission:function(){return at},useRelatedEntities:function(){return Ct},useStarredEntities:function(){return bt}});var r=e(30001),t=e(36964);const l=(0,t.createApiRef)({id:"plugin.catalog.service"}),u=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var R=e(82394);class m{constructor(){q(this,"starredEntities",new Set);q(this,"subscribers",new Set);q(this,"observable",new ObservableImpl(C=>(C.next(new Set(this.starredEntities)),this.subscribers.add(C),()=>{this.subscribers.delete(C)})))}async toggleStarred(C){this.starredEntities.delete(C)||this.starredEntities.add(C);for(const D of this.subscribers)D.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var o=e(2784),c=e(41156),f=e(60364),y=e(77277),p=e(4190),E=e(95544),T=e(90436),L=e(60905),M=e(36444);const j=v=>{const C=(0,c.Z)(k=>k.breakpoints.down("md")),D=(0,f.Z)(),[z,G]=(0,o.useState)(!1);return C?o.createElement(o.Fragment,null,o.createElement(y.Z,{style:{marginTop:D.spacing(1),marginLeft:D.spacing(1)},onClick:()=>G(!0),startIcon:o.createElement(M.Z,null)},"Filters"),o.createElement(p.ZP,{open:z,onClose:()=>G(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},o.createElement(E.Z,{m:2},o.createElement(T.Z,{variant:"h6",component:"h2",style:{marginBottom:D.spacing(1)}},"Filters"),v.children))):o.createElement(L.Z,{item:!0,lg:2},v.children)},w=v=>o.createElement(L.Z,{item:!0,xs:12,lg:10},v.children),b=v=>o.createElement(L.Z,{container:!0,style:{position:"relative"}},v.children);b.Filters=j,b.Content=w;var O=e(76241);const F=(0,O.CT)("entity-context"),U=({children:v,entity:C,loading:D,error:z,refresh:G})=>{const k={entity:C,loading:D,error:z,refresh:G};return o.createElement(F.Provider,{value:(0,O.EI)({1:k})},v)},Y=v=>React.createElement(U,{entity:v.entity,loading:!Boolean(v.entity),error:void 0,refresh:void 0,children:v.children});function ne(){const v=(0,O.Vt)("entity-context");if(!v)throw new Error("Entity context is not available");const C=v.atVersion(1);if(!C)throw new Error("EntityContext v1 not available");if(!C.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:C.entity}}function ue(){const v=(0,O.Vt)("entity-context");if(!v)throw new Error("Entity context is not available");const C=v.atVersion(1);if(!C)throw new Error("EntityContext v1 not available");const{entity:D,loading:z,error:G,refresh:k}=C;return{entity:D,loading:z,error:G,refresh:k}}var Re=e(76635),we=e(19126),ge=e.n(we),ze=e(10289),_e=e(69294),et=e(48760),it=e(90736);function St(v){return v.reduce((C,D)=>({...C,...D.getCatalogFilters?D.getCatalogFilters():{}}),{})}function Et(v){return C=>v.every(D=>!D.filterEntity||D.filterEntity(C))}var Pe=e(48023);function pt(v,C,D){var G;let z=((G=v==null?void 0:v.relations)==null?void 0:G.filter(k=>k.type===C).map(k=>(0,Pe.of)(k.targetRef)))||[];return D!=null&&D.kind&&(z=z.filter(k=>k.kind.toLocaleLowerCase("en-US")===D.kind.toLocaleLowerCase("en-US"))),z}function Ge(v,C){var z;const D=(z=v.metadata.annotations)==null?void 0:z[Pe.M6];if(!!D)try{const G=(0,Pe.Ou)(D),k=C.byUrl(G.target);return{locationTargetUrl:G.target,integrationType:k==null?void 0:k.type}}catch{return}}function ie(v,C){const D=new Set([...getEntityRelations(v,RELATION_MEMBER_OF,{kind:"group"}),...v?[getCompoundEntityRef(v)]:[]].map(stringifyEntityRef)),z=getEntityRelations(C,RELATION_OWNED_BY).map(stringifyEntityRef);for(const G of z)if(D.has(G))return!0;return!1}const de=(0,o.createContext)(void 0),Ue=({children:v})=>{const C=(0,it.default)(),D=(0,t.useApi)(l),[z,G]=(0,o.useState)({}),k=(0,ze.TH)(),le=(0,o.useMemo)(()=>{var st;return(st=ge().parse(k.search,{ignoreQueryPrefix:!0}).filters)!=null?st:{}},[k]),[Te,Fe]=(0,o.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:xe,error:Oe},Ze]=(0,_e.default)(async()=>{var an;const st=(0,Re.compact)(Object.values(z)),Ve=Et(st),Ft=St(st),Yt=St((0,Re.compact)(Object.values(Te.appliedFilters))),Wn=Object.keys(z).reduce((gn,En)=>{const Pn=z[En];return Pn!=null&&Pn.toQueryValue&&(gn[En]=Pn.toQueryValue()),gn},{});if((0,Re.isEqual)(Yt,Ft))Fe({appliedFilters:z,backendEntities:Te.backendEntities,entities:Te.backendEntities.filter(Ve)});else{const gn=await D.getEntities({filter:Ft});Fe({appliedFilters:z,backendEntities:gn.items,entities:gn.items.filter(Ve)})}if(C()){const gn=ge().parse(k.search,{ignoreQueryPrefix:!0}),En=ge().stringify({...gn,filters:Wn},{addQueryPrefix:!0,arrayFormat:"repeat"}),Pn=`${window.location.pathname}${En}`;(an=window.history)==null||an.replaceState(null,document.title,Pn)}},[D,le,z,Te],{loading:!0});(0,et.Z)(Ze,10,[z]);const He=(0,o.useCallback)(st=>{G(Ve=>{const Ft=typeof st=="function"?st(Ve):st;return{...Ve,...Ft}})},[]),It=(0,o.useMemo)(()=>({filters:Te.appliedFilters,entities:Te.entities,backendEntities:Te.backendEntities,updateFilters:He,queryParameters:le,loading:xe,error:Oe}),[Te,He,le,xe,Oe]);return o.createElement(de.Provider,{value:It},v)};function Be(){const v=(0,o.useContext)(de);if(!v)throw new Error("useEntityList must be used within EntityListProvider");return v}var Xe=e(64279),ht=e(18149),ke=e.n(ht),vt=e(829),oe=e.n(vt);const fe=(0,O.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function tt(v){var C,D;return{kind:v.kind.toLocaleLowerCase("en-US"),namespace:(D=(C=v.metadata.namespace)==null?void 0:C.toLocaleLowerCase("en-US"))!=null?D:DEFAULT_NAMESPACE,name:v.metadata.name}}function Ye(v,C){const D=C==null?void 0:C.defaultKind;let z,G,k;return"metadata"in v?(z=v.kind,G=v.metadata.namespace,k=v.metadata.name):(z=v.kind,G=v.namespace,k=v.name),G===Pe.zG&&(G=void 0),z=z.toLocaleLowerCase("en-US"),z=D&&D.toLocaleLowerCase("en-US")===z?void 0:z,`${z?`${z}:`:""}${G?`${G}/`:""}${k}`}var Ne=e(82339),ut=e(80030);const X=(0,o.forwardRef)((v,C)=>{var st;const{entityRef:D,defaultKind:z,title:G,children:k,...le}=v,Te=(0,t.useRouteRef)(fe);let Fe,xe,Oe;if(typeof D=="string"){const Ve=(0,Pe.of)(D);Fe=Ve.kind,xe=Ve.namespace,Oe=Ve.name}else"metadata"in D?(Fe=D.kind,xe=D.metadata.namespace,Oe=D.metadata.name):(Fe=D.kind,xe=D.namespace,Oe=D.name);Fe=Fe.toLocaleLowerCase("en-US"),xe=(st=xe==null?void 0:xe.toLocaleLowerCase("en-US"))!=null?st:Pe.zG;const Ze={kind:Fe,namespace:xe,name:Oe},He=Ye({kind:Fe,namespace:xe,name:Oe},{defaultKind:z}),It=o.createElement(Ne.Link,{...le,ref:C,to:Te(Ze)},k,!k&&(G!=null?G:He));return G?o.createElement(ut.ZP,{title:He},It):It});function Z(v){const{entityRefs:C,defaultKind:D,...z}=v;return o.createElement(o.Fragment,null,C.map((G,k)=>o.createElement(o.Fragment,{key:k},k>0&&", ",o.createElement(X,{...z,entityRef:G,defaultKind:D}))))}class Q{constructor(C){this.value=C}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class se{constructor(C){this.value=C}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class ce{constructor(C){this.values=C}filterEntity(C){return this.values.every(D=>{var z;return((z=C.metadata.tags)!=null?z:[]).includes(D)})}toQueryValue(){return this.values}}class Ce{constructor(C){this.value=C}filterEntity(C){var z;const D=this.value.toLocaleUpperCase("en-US");return C.metadata.name.toLocaleUpperCase("en-US").includes(D)||`${C.metadata.title}`.toLocaleUpperCase("en-US").includes(D)||((z=C.metadata.tags)==null?void 0:z.join("").toLocaleUpperCase("en-US").indexOf(D))!==-1}}class Le{constructor(C){this.values=C}filterEntity(C){return this.values.some(D=>pt(C,Pe.S4).some(z=>Ye(z,{defaultKind:"group"})===D))}toQueryValue(){return this.values}}class Ae{constructor(C){this.values=C}filterEntity(C){return this.values.some(D=>{var z;return((z=C.spec)==null?void 0:z.lifecycle)===D})}toQueryValue(){return this.values}}class Ke{constructor(C,D,z){this.value=C,this.isOwnedEntity=D,this.isStarredEntity=z}filterEntity(C){switch(this.value){case"owned":return this.isOwnedEntity(C);case"starred":return this.isStarredEntity(C);default:return!0}}toQueryValue(){return this.value}}function je(){var Ve;const v=(0,t.useApi)(l),{filters:{kind:C,type:D},queryParameters:{type:z},updateFilters:G}=Be(),k=(0,o.useMemo)(()=>[z].flat().filter(Boolean),[z]),[le,Te]=(0,o.useState)(k.length?k:(Ve=D==null?void 0:D.getTypes())!=null?Ve:[]);(0,o.useEffect)(()=>{k.length&&Te(k)},[k]);const[Fe,xe]=(0,o.useState)([]),Oe=(0,o.useMemo)(()=>C==null?void 0:C.value,[C]),{error:Ze,loading:He,value:It}=(0,Xe.default)(async()=>Oe?await v.getEntityFacets({filter:{kind:Oe},facets:["spec.type"]}).then(Yt=>Yt.facets["spec.type"]||[]):[],[Oe,v]),st=(0,o.useRef)(It);return(0,o.useEffect)(()=>{const Ft=st.current;if(st.current=It,He||!Oe||Ft===It||!It)return;const Yt=[...new Set(oe()(It,an=>-an.count).map(an=>an.value.toLocaleLowerCase("en-US")))];xe(Yt);const Wn=le.filter(an=>Yt.includes(an));ke()(le,Wn)||Te(Wn)},[He,Oe,le,Te,It]),(0,o.useEffect)(()=>{G({type:le.length?new se(le):void 0})},[le,G]),{loading:He,error:Ze,availableTypes:Fe,selectedTypes:le,setSelectedTypes:Te}}const gt=20;function Ct(v,C){var Fe,xe;const D=(Fe=C==null?void 0:C.type)==null?void 0:Fe.toLocaleLowerCase("en-US"),z=(xe=C==null?void 0:C.kind)==null?void 0:xe.toLocaleLowerCase("en-US"),G=(0,t.useApi)(l),{loading:k,value:le,error:Te}=(0,Xe.default)(async()=>{var st;const Oe=(st=v.relations)==null?void 0:st.map(Ve=>({type:Ve.type,target:(0,Pe.of)(Ve.targetRef)})).filter(Ve=>(!D||Ve.type.toLocaleLowerCase("en-US")===D)&&(!z||Ve.target.kind===z));if(!Oe)return[];const Ze=Object.values((0,Re.groupBy)(Oe,({target:Ve})=>`${Ve.kind}:${Ve.namespace}`.toLocaleLowerCase("en-US"))),He=[];for(const Ve of Ze)He.push({kind:Ve[0].target.kind,namespace:Ve[0].target.namespace,nameBatches:(0,Re.chunk)(Ve.map(Ft=>Ft.target.name),gt)});return(await Promise.all(He.flatMap(Ve=>Ve.nameBatches.map(Ft=>G.getEntities({filter:{kind:Ve.kind,"metadata.namespace":Ve.namespace,"metadata.name":Ft}}))))).flatMap(Ve=>Ve.items)},[v,D,z]);return{entities:le,loading:k,error:Te}}var dt=e(72164);function Rt(v){return typeof v=="string"?v:(0,Pe.eE)(v)}function bt(){const v=(0,t.useApi)(u),C=(0,dt.Z)(v.starredEntitie$(),new Set),D=(0,o.useCallback)(G=>C.has(Rt(G)),[C]),z=(0,o.useCallback)(G=>v.toggleStarred(Rt(G)).then(),[v]);return{starredEntities:C,toggleStarredEntity:z,isStarredEntity:D}}function Lt(v){return typeof v=="string"?v:(0,Pe.eE)(v)}function Pt(v){const C=(0,t.useApi)(u),[D,z]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{const k=C.starredEntitie$().subscribe({next(le){z(le.has(Lt(v)))}});return()=>{k.unsubscribe()}},[v,C]),{toggleStarredEntity:(0,o.useCallback)(()=>C.toggleStarred(Lt(v)).then(),[v,C]),isStarredEntity:D}}function Nt(){const v=(0,t.useApi)(t.identityApiRef),{loading:C,value:D}=(0,Xe.default)(async()=>{const{ownershipEntityRefs:G}=await v.getBackstageIdentity();return G},[]),z=(0,o.useMemo)(()=>{const G=new Set(D!=null?D:[]);return k=>{const le=pt(k,Pe.S4).map(Pe.eE);for(const Te of le)if(G.has(Te))return!0;return!1}},[D]);return(0,o.useMemo)(()=>({loading:C,isOwnedEntity:z}),[C,z])}var At=e(68099);function at(v){const{entity:C,loading:D,error:z}=ue(),{allowed:G,loading:k,error:le}=(0,At.gI)({permission:v,resourceRef:C?(0,Pe.eE)(C):void 0});return D||k?{loading:!0,allowed:!1}:z?{loading:!1,allowed:!1,error:z}:{loading:!1,allowed:G,error:le}}const Zn=v=>{var le;const{initialFilter:C,hidden:D}=v,{updateFilters:z,queryParameters:{kind:G}}=useEntityList(),[k]=useState((le=[G].flat()[0])!=null?le:C);return useEffect(()=>{z({kind:k?new EntityKindFilter(k):void 0})},[k,z]),D?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var _=e(79692),V=e(5806),ye=e(21324),We=e(86619),qe=e(19996),nt=e(25505),Tt=e(38016),Ut=e(88013);const Xt=(0,_.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),cn=o.createElement(nt.Z,{fontSize:"small"}),un=o.createElement(qe.Z,{fontSize:"small"}),xt=()=>{var xe,Oe;const v=Xt(),{updateFilters:C,backendEntities:D,filters:z,queryParameters:{lifecycles:G}}=Be(),k=(0,o.useMemo)(()=>[G].flat().filter(Boolean),[G]),[le,Te]=(0,o.useState)(k.length?k:(Oe=(xe=z.lifecycles)==null?void 0:xe.values)!=null?Oe:[]);(0,o.useEffect)(()=>{k.length&&Te(k)},[k]),(0,o.useEffect)(()=>{C({lifecycles:le.length?new Ae(le):void 0})},[le,C]);const Fe=(0,o.useMemo)(()=>[...new Set(D.map(Ze=>{var He;return(He=Ze.spec)==null?void 0:He.lifecycle}).filter(Boolean))].sort(),[D]);return Fe.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(T.Z,{variant:"button",component:"label"},"Lifecycle",o.createElement(Ut.ZP,{multiple:!0,options:Fe,value:le,onChange:(Ze,He)=>Te(He),renderOption:(Ze,{selected:He})=>o.createElement(V.Z,{control:o.createElement(ye.Z,{icon:cn,checkedIcon:un,checked:He}),label:Ze}),size:"small",popupIcon:o.createElement(Tt.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:Ze=>o.createElement(We.Z,{...Ze,className:v.input,variant:"outlined"})}))):null},fn=(0,_.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),x=o.createElement(nt.Z,{fontSize:"small"}),re=o.createElement(qe.Z,{fontSize:"small"}),ve=()=>{var xe,Oe;const v=fn(),{updateFilters:C,backendEntities:D,filters:z,queryParameters:{owners:G}}=Be(),k=(0,o.useMemo)(()=>[G].flat().filter(Boolean),[G]),[le,Te]=(0,o.useState)(k.length?k:(Oe=(xe=z.owners)==null?void 0:xe.values)!=null?Oe:[]);(0,o.useEffect)(()=>{k.length&&Te(k)},[k]),(0,o.useEffect)(()=>{C({owners:le.length?new Le(le):void 0})},[le,C]);const Fe=(0,o.useMemo)(()=>[...new Set(D.flatMap(Ze=>pt(Ze,Pe.S4).map(He=>Ye(He,{defaultKind:"group"}))).filter(Boolean))].sort(),[D]);return Fe.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(T.Z,{variant:"button",component:"label"},"Owner",o.createElement(Ut.ZP,{multiple:!0,options:Fe,value:le,onChange:(Ze,He)=>Te(He),renderOption:(Ze,{selected:He})=>o.createElement(V.Z,{control:o.createElement(ye.Z,{icon:x,checkedIcon:re,checked:He}),label:Ze}),size:"small",popupIcon:o.createElement(Tt.Z,{"data-testid":"owner-picker-expand"}),renderInput:Ze=>o.createElement(We.Z,{...Ze,className:v.input,variant:"outlined"})}))):null},be=(0,_.Z)(v=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),Ie=()=>{var k,le;const v=be(),{filters:C,updateFilters:D}=useEntityList(),[z,G]=useState((le=(k=C.text)==null?void 0:k.value)!=null?le:"");return useDebounce(()=>{D({text:z.length?new EntityTextFilter(z):void 0})},250,[z,D]),React.createElement(Toolbar,{className:v.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:v.input,placeholder:"Search",autoComplete:"off",onChange:Te=>G(Te.target.value),value:z,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>G(""),edge:"end",disabled:z.length===0},React.createElement(Clear,null)))})))},Je=Object.freeze({createEntityRefColumn(v){const{defaultKind:C}=v;function D(z){var G;return((G=z.metadata)==null?void 0:G.title)||Ye(z,{defaultKind:C})}return{title:"Name",highlight:!0,customFilterAndSearch(z,G){return D(G).includes(z)},customSort(z,G){return D(z).localeCompare(D(G))},render:z=>{var G;return o.createElement(X,{entityRef:z,defaultKind:C,title:(G=z.metadata)==null?void 0:G.title})}}},createEntityRelationColumn({title:v,relation:C,defaultKind:D,filter:z}){function G(le){return pt(le,C,z)}function k(le){return G(le).map(Te=>Ye(Te,{defaultKind:D})).join(", ")}return{title:v,customFilterAndSearch(le,Te){return k(Te).includes(le)},customSort(le,Te){return k(le).localeCompare(k(Te))},render:le=>o.createElement(Z,{entityRefs:G(le),defaultKind:D})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:Pe.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:Pe.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:Pe.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:v=>o.createElement(Ne.OverflowTooltip,{text:v.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),lt=[Je.createEntityRefColumn({defaultKind:"system"}),Je.createDomainColumn(),Je.createOwnerColumn(),Je.createMetadataDescriptionColumn()],Vt=[Je.createEntityRefColumn({defaultKind:"component"}),Je.createSystemColumn(),Je.createOwnerColumn(),Je.createSpecTypeColumn(),Je.createSpecLifecycleColumn(),Je.createMetadataDescriptionColumn()],Gt=(0,_.Z)(v=>({empty:{padding:v.spacing(2),display:"flex",justifyContent:"center"}})),wt=v=>{const{entities:C,title:D,emptyContent:z,variant:G="gridItem",columns:k}=v,le=Gt(),Te={minWidth:"0",width:"100%"};return G==="gridItem"&&(Te.height="calc(100% - 10px)"),o.createElement(Ne.Table,{columns:k,title:D,style:Te,emptyContent:z&&o.createElement("div",{className:le.empty},z),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense",draggable:!1},data:C})};wt.columns=Je,wt.systemEntityColumns=lt,wt.componentEntityColumns=Vt;const $t=(0,_.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),ot=o.createElement(nt.Z,{fontSize:"small"}),Dt=o.createElement(qe.Z,{fontSize:"small"}),_t=()=>{var xe,Oe;const v=$t(),{updateFilters:C,filters:D,queryParameters:{tags:z}}=Be(),G=(0,t.useApi)(l),{value:k}=(0,Xe.default)(async()=>{var It;const Ze="metadata.tags",{facets:He}=await G.getEntityFacets({facets:[Ze],filter:(It=D.kind)==null?void 0:It.getCatalogFilters()});return He[Ze].map(({value:st})=>st)},[D.kind]),le=(0,o.useMemo)(()=>[z].flat().filter(Boolean),[z]),[Te,Fe]=(0,o.useState)(le.length?le:(Oe=(xe=D.tags)==null?void 0:xe.values)!=null?Oe:[]);return(0,o.useEffect)(()=>{le.length&&Fe(le)},[le]),(0,o.useEffect)(()=>{C({tags:Te.length?new ce(Te):void 0})},[Te,C]),k!=null&&k.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(T.Z,{variant:"button",component:"label"},"Tags",o.createElement(Ut.ZP,{multiple:!0,options:k,value:Te,onChange:(Ze,He)=>Fe(He),renderOption:(Ze,{selected:He})=>o.createElement(V.Z,{control:o.createElement(ye.Z,{icon:ot,checkedIcon:Dt,checked:He}),label:Ze}),size:"small",popupIcon:o.createElement(Tt.Z,{"data-testid":"tag-picker-expand"}),renderInput:Ze=>o.createElement(We.Z,{...Ze,className:v.input,variant:"outlined"})}))):null};var Zt=e(82108),zt=e.n(Zt);const nn=v=>{var xe;const{hidden:C,initialFilter:D}=v,z=(0,t.useApi)(t.alertApiRef),{error:G,availableTypes:k,selectedTypes:le,setSelectedTypes:Te}=je();if((0,o.useEffect)(()=>{G&&z.post({message:"Failed to load entity types",severity:"error"}),D&&Te([D])},[G,z,D,Te]),k.length===0||G)return null;const Fe=[{value:"all",label:"All"},...k.map(Oe=>({value:Oe,label:zt()(Oe)}))];return C?null:o.createElement(E.Z,{pb:1,pt:1},o.createElement(Ne.Select,{label:"Type",items:Fe,selected:(xe=Fe.length>1?le[0]:void 0)!=null?xe:"all",onChange:Oe=>Te(Oe==="all"?[]:[String(Oe)])}))};var Sn=e(15459),Kt=e(61837),Ot=e(11640),mn=e(28347);const yn=(0,Sn.Z)({root:{color:"#f3ba37"}})(Ot.Z),rn=v=>{const{toggleStarredEntity:C,isStarredEntity:D}=Pt(v.entity);return o.createElement(Kt.Z,{"aria-label":"favorite",color:"inherit",...v,onClick:()=>C()},o.createElement(ut.ZP,{title:D?"Remove from favorites":"Add to favorites"},D?o.createElement(yn,null):o.createElement(mn.Z,null)))};var hn=e(8629),xn=e(79249),$=e(38724),h=e(99152),S=e(6487),B=e(49429),W=e(55999),pe=e(72779),me=e.n(pe),Me=e(39412);const mt=Me.Z;function kt(v,C){if(v)return v.toLocaleLowerCase("en-US");if(C)try{return(0,Pe.of)(C).kind.toLocaleLowerCase("en-US")}catch{return}}function Wt(v,C){const D=(0,t.useApp)(),z=kt(v,C);return z&&D.getSystemIcon(`kind:${z}`)||mt}function Cn(v){const{kind:C,entityRef:D,...z}=v,G=Wt(C,D);return o.createElement(G,{...z})}const Er=(0,_.Z)(v=>({node:{fill:v.palette.grey[300],stroke:v.palette.grey[300],"&.primary":{fill:v.palette.primary.light,stroke:v.palette.primary.light},"&.secondary":{fill:v.palette.secondary.light,stroke:v.palette.secondary.light}},text:{fill:v.palette.getContrastText(v.palette.grey[300]),"&.primary":{fill:v.palette.primary.contrastText},"&.secondary":{fill:v.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function nr(v){const C=(0,t.useApi)(l),D=(0,Pe.eE)(v),{loading:z,error:G,value:k}=(0,Xe.default)(async()=>{const le=await C.getEntityAncestors({entityRef:D}),Te=new Array,Fe=new Array;for(const xe of le.items){const Oe=(0,Pe.eE)(xe.entity),Ze=Oe===le.rootEntityRef;Te.push({id:Oe,root:Ze,...xe.entity});for(const He of xe.parentEntityRefs)Fe.push({from:Oe,to:He})}return{nodes:Te,edges:Fe}},[D]);return{loading:z,error:G,nodes:(k==null?void 0:k.nodes)||[],edges:(k==null?void 0:k.edges)||[]}}function Wr({node:v}){const C=Er(),D=(0,ze.s0)(),z=(0,t.useRouteRef)(fe),[G,k]=(0,o.useState)(0),[le,Te]=(0,o.useState)(0),Fe=(0,o.useRef)(null);(0,o.useLayoutEffect)(()=>{if(Fe.current){let{height:Ft,width:Yt}=Fe.current.getBBox();Ft=Math.round(Ft),Yt=Math.round(Yt),(Ft!==le||Yt!==G)&&(k(Yt),Te(Ft))}},[G,le]);const xe=10,Oe=le,Ze=Oe+xe,He=Ze+G+xe*2,It=le+xe*2,st=v.metadata.title||(v.kind&&v.metadata.name&&v.metadata.namespace?Ye({kind:v.kind,name:v.metadata.name,namespace:v.metadata.namespace||""}):v.id),Ve=()=>{D(z({kind:v.kind,namespace:v.metadata.namespace||Pe.zG,name:v.metadata.name}))};return o.createElement("g",{onClick:Ve,className:C.clickable},o.createElement("rect",{className:me()(C.node,v.root?"secondary":"primary"),width:He,height:It,rx:10}),o.createElement(Cn,{kind:v.kind,y:xe,x:xe,width:Oe,height:Oe,className:me()(C.text,v.root?"secondary":"primary")}),o.createElement("text",{ref:Fe,className:me()(C.text,v.root?"secondary":"primary"),y:It/2,x:Ze+(G+xe*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},st))}function Hr(v){const{loading:C,error:D,nodes:z,edges:G}=nr(v.entity);return C?o.createElement(Ne.Progress,null):D?o.createElement(Ne.ResponseErrorPanel,{error:D}):o.createElement(o.Fragment,null,o.createElement(W.Z,{variant:"h2"},"Ancestry"),o.createElement(W.Z,{gutterBottom:!0},"This is the ancestry of entities above the current one - as in, the chain(s) of entities down to the current one, where"," ",o.createElement(Ne.Link,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity"},"processors emitted")," ","child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations."),o.createElement(E.Z,{mt:4},o.createElement(Ne.DependencyGraph,{nodes:z,edges:G,renderNode:Wr,direction:Ne.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var zn=e(11776),Mn=e(38402),Yn=e(86136),rr=e(99688),vr=e(49378),jr=e(54506),ar=e(94339),or=e(24579),Vr=e(27685);const qn=(0,_.Z)(v=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:v.spacing(2)},helpIcon:{marginLeft:v.spacing(1),color:v.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function Tn(v){const C=qn();return o.createElement(vr.Z,{...v,primaryTypographyProps:{className:C.monospace},secondaryTypographyProps:{className:C.monospace}})}function _n(v){const C=qn();return o.createElement(jr.Z,{className:C.monospace},v.children)}function er(v){return o.createElement(E.Z,{mt:2},o.createElement(ar.Z,{variant:"outlined"},o.createElement(or.Z,null,o.createElement(T.Z,{variant:"h6",gutterBottom:!0},v.title,v.helpLink&&o.createElement(ir,{to:v.helpLink})),v.children)))}function Ar(v){if(v.match(/^url:https?:\/\//))return v.slice(4);if(v.match(/^https?:\/\//))return v}function sr(v){const[C,D]=v.entry,z=Ar(D);return o.createElement(Mn.Z,null,v.indent&&o.createElement(Yn.Z,null),o.createElement(Tn,{primary:C,secondary:z?o.createElement(Ne.Link,{to:z},D):D}))}function ir(v){const C=qn();return o.createElement(Ne.Link,{to:v.to,className:C.helpIcon},o.createElement(Vr.Z,{fontSize:"inherit"}))}const Rr=(0,_.Z)({root:{display:"flex",flexDirection:"column"}});function Sr(v){var Fe,xe;const C=(0,t.useApi)(l),D=(0,Pe.eE)(v),z=(Fe=v.metadata.annotations)==null?void 0:Fe[Pe.P1],G=(xe=v.metadata.annotations)==null?void 0:xe[Pe.q1],{loading:k,error:le,value:Te}=(0,Xe.default)(async()=>!z&&!G?[]:(await C.getEntities({filter:[...z?[{[`metadata.annotations.${Pe.P1}`]:z}]:[],...G?[{[`metadata.annotations.${Pe.q1}`]:G}]:[]]})).items,[z,G]);return{loading:k,error:le,location:z,originLocation:G,colocatedEntities:Te==null?void 0:Te.filter(Oe=>(0,Pe.eE)(Oe)!==D)}}function lr(v){return o.createElement(zn.Z,{dense:!0},v.header&&o.createElement(sr,{key:"header",entry:v.header}),v.entities.map(C=>o.createElement(Mn.Z,{key:(0,Pe.eE)(C)},o.createElement(Yn.Z,null,o.createElement(Cn,{kind:C.kind})),o.createElement(Tn,{primary:o.createElement(X,{entityRef:C})}))))}function Cr(v){const{entity:C}=v,{loading:D,error:z,location:G,originLocation:k,colocatedEntities:le}=Sr(C);if(D)return o.createElement(Ne.Progress,null);if(z)return o.createElement(Ne.ResponseErrorPanel,{error:z});if(!G&&!k)return o.createElement(rr.Z,{severity:"warning"},"Entity had no location information.");if(!(le!=null&&le.length))return o.createElement(rr.Z,{severity:"info"},"There were no other entities on this location.");if(G===k)return o.createElement(lr,{entities:le});const Te=le.filter(xe=>{var Oe;return((Oe=xe.metadata.annotations)==null?void 0:Oe[Pe.P1])===G}),Fe=le.filter(xe=>{var Oe;return((Oe=xe.metadata.annotations)==null?void 0:Oe[Pe.q1])===k});return o.createElement(o.Fragment,null,Te.length>0&&o.createElement(lr,{entities:Te,header:["At the same location",G]}),Fe.length>0&&o.createElement(lr,{entities:Fe,header:["At the same origin",k]}))}function Tr(v){const C=Rr();return o.createElement(o.Fragment,null,o.createElement(W.Z,{variant:"h2"},"Colocated"),o.createElement(W.Z,null,"These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL)."),o.createElement("div",{className:C.root},o.createElement(Cr,{entity:v.entity})))}function br(v){return Object.fromEntries([...Object.entries(v)].sort((C,D)=>C[0]<D[0]?-1:1))}function Pr(v){return o.createElement(o.Fragment,null,o.createElement(W.Z,{variant:"h2"},"Entity as JSON"),o.createElement(W.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),o.createElement(W.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(Ne.CodeSnippet,{text:JSON.stringify(br(v.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var cr=e(3440),Ir=e.n(cr);const ur=(0,_.Z)({root:{display:"flex",flexDirection:"column"}});function dn(v){var xe,Oe;const C=ur(),{apiVersion:D,kind:z,metadata:G,spec:k,relations:le=[],status:Te={}}=v.entity,Fe=Ir()(oe()(le,Ze=>Ze.targetRef),"type");return o.createElement(o.Fragment,null,o.createElement(W.Z,{variant:"h2"},"Overview"),o.createElement("div",{className:C.root},o.createElement(er,{title:"Identity"},o.createElement(zn.Z,{dense:!0},o.createElement(Mn.Z,null,o.createElement(Tn,{primary:"apiVersion",secondary:D})),o.createElement(Mn.Z,null,o.createElement(Tn,{primary:"kind",secondary:z})),(k==null?void 0:k.type)&&o.createElement(Mn.Z,null,o.createElement(Tn,{primary:"spec.type",secondary:k.type})),G.uid&&o.createElement(Mn.Z,null,o.createElement(Tn,{primary:"uid",secondary:G.uid})),G.etag&&o.createElement(Mn.Z,null,o.createElement(Tn,{primary:"etag",secondary:G.etag})))),o.createElement(er,{title:"Metadata"},!!Object.keys(G.annotations||{}).length&&o.createElement(zn.Z,{dense:!0,subheader:o.createElement(_n,null,"Annotations",o.createElement(ir,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(G.annotations).map(Ze=>o.createElement(sr,{key:Ze[0],indent:!0,entry:Ze}))),!!Object.keys(G.labels||{}).length&&o.createElement(zn.Z,{dense:!0,subheader:o.createElement(_n,null,"Labels")},Object.entries(G.labels).map(Ze=>o.createElement(sr,{key:Ze[0],indent:!0,entry:Ze}))),!!((xe=G.tags)!=null&&xe.length)&&o.createElement(zn.Z,{dense:!0,subheader:o.createElement(_n,null,"Tags")},G.tags.map((Ze,He)=>o.createElement(Mn.Z,{key:`${Ze}-${He}`},o.createElement(Yn.Z,null),o.createElement(Tn,{primary:Ze}))))),!!le.length&&o.createElement(er,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Fe).map(([Ze,He],It)=>o.createElement("div",{key:It},o.createElement(zn.Z,{dense:!0,subheader:o.createElement(_n,null,Ze)},He.map(st=>o.createElement(Mn.Z,{key:st.targetRef},o.createElement(Yn.Z,null,o.createElement(Cn,{entityRef:st.targetRef})),o.createElement(Tn,{primary:o.createElement(X,{entityRef:st.targetRef})}))))))),!!((Oe=Te.items)!=null&&Oe.length)&&o.createElement(er,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},Te.items.map((Ze,He)=>o.createElement("div",{key:He},o.createElement(T.Z,null,Ze.level,": ",Ze.type),o.createElement(E.Z,{ml:2},Ze.message))))))}var Dn=e(60155),Lr=e.n(Dn);function Or(v){return o.createElement(o.Fragment,null,o.createElement(W.Z,{variant:"h2"},"Entity as YAML"),o.createElement(W.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),o.createElement(W.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(Ne.CodeSnippet,{text:Lr().stringify(br(v.entity)),language:"yaml",showCopyCodeButton:!0}))))}const bn=(0,_.Z)(v=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:v.palette.background.paper},tabs:{borderRight:`1px solid ${v.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function jn(v){const{children:C,value:D,index:z,...G}=v,k=bn();return o.createElement("div",{role:"tabpanel",hidden:D!==z,id:`vertical-tabpanel-${z}`,"aria-labelledby":`vertical-tab-${z}`,className:k.tabContents,...G},D===z&&o.createElement(E.Z,{pl:3,pr:3},C))}function Vn(v){return{id:`vertical-tab-${v}`,"aria-controls":`vertical-tabpanel-${v}`}}function xr(v){const C=bn(),[D,z]=o.useState(0);return(0,o.useEffect)(()=>{z(0)},[v.open]),v.entity?o.createElement(hn.Z,{fullWidth:!0,maxWidth:"xl",open:v.open,onClose:v.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:C.fullHeightDialog}},o.createElement(xn.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),o.createElement($.Z,{dividers:!0},o.createElement("div",{className:C.root},o.createElement(h.Z,{orientation:"vertical",variant:"scrollable",value:D,onChange:(G,k)=>z(k),"aria-label":"Inspector options",className:C.tabs},o.createElement(S.Z,{label:"Overview",...Vn(0)}),o.createElement(S.Z,{label:"Ancestry",...Vn(1)}),o.createElement(S.Z,{label:"Colocated",...Vn(2)}),o.createElement(S.Z,{label:"Raw JSON",...Vn(3)}),o.createElement(S.Z,{label:"Raw YAML",...Vn(4)})),o.createElement(jn,{value:D,index:0},o.createElement(dn,{entity:v.entity})),o.createElement(jn,{value:D,index:1},o.createElement(Hr,{entity:v.entity})),o.createElement(jn,{value:D,index:2},o.createElement(Tr,{entity:v.entity})),o.createElement(jn,{value:D,index:3},o.createElement(Pr,{entity:v.entity})),o.createElement(jn,{value:D,index:4},o.createElement(Or,{entity:v.entity})))),o.createElement(B.Z,null,o.createElement(y.Z,{onClick:v.onClose,color:"primary"},"Close"))):null}var dr=e(85256);function fr(v){var It;const C=(0,t.useApi)(l),D=(It=v.metadata.annotations)==null?void 0:It[Pe.q1],z=v.metadata.uid,G=D==="bootstrap:bootstrap",k=(0,Xe.default)(async()=>{const st=C.getLocationByRef(D);let Ve;if(!D)Ve=Promise.resolve([]);else{const Ft=`metadata.annotations.${Pe.q1}`;Ve=C.getEntities({filter:{[Ft]:D},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(Yt=>Yt.items)}return Promise.all([st,Ve]).then(([Ft,Yt])=>({location:Ft,colocatedEntities:Yt}))},[C,v]),le=(0,o.useCallback)(async function(){const{location:Ve}=k.value;await C.removeLocationById(Ve.id)},[C,k]),Te=(0,o.useCallback)(async function(){await C.removeEntityByUid(z)},[C,z]);if(G)return{type:"bootstrap",location:D,deleteEntity:Te};const{loading:Fe,error:xe,value:Oe}=k;if(Fe)return{type:"loading"};if(xe)return{type:"error",error:xe};const{location:Ze,colocatedEntities:He}=Oe;return Ze?{type:"unregister",location:D,colocatedEntities:He.map(Pe.iB),unregisterLocation:le,deleteEntity:Te}:{type:"only-delete",deleteEntity:Te}}var Gn=e(10179);const Gr=(0,_.Z)({advancedButton:{fontSize:"0.7em"}}),Dr=({entity:v,onConfirm:C})=>{var It;const D=(0,t.useApi)(t.alertApiRef),z=(0,t.useApi)(t.configApiRef),G=Gr(),k=fr(v),[le,Te]=(0,o.useState)(!1),[Fe,xe]=(0,o.useState)(!1),Oe=(It=z.getOptionalString("app.title"))!=null?It:"Backstage",Ze=(0,o.useCallback)(async function(){if("unregisterLocation"in k){xe(!0);try{await k.unregisterLocation(),C()}catch(Ve){(0,Gn.BD)(Ve),D.post({message:Ve.message})}finally{xe(!1)}}},[D,C,k]),He=(0,o.useCallback)(async function(){if("deleteEntity"in k){xe(!0);try{await k.deleteEntity(),C()}catch(Ve){(0,Gn.BD)(Ve),D.post({message:Ve.message})}finally{xe(!1)}}},[D,C,k]);return k.type==="loading"?o.createElement(Ne.Progress,null):k.type==="error"?o.createElement(Ne.ResponseErrorPanel,{error:k.error}):k.type==="bootstrap"?o.createElement(o.Fragment,null,o.createElement(rr.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',k.location,'"). If you believe this is in error, please contact the ',Oe," ","integrator."),o.createElement(E.Z,{marginTop:2},!le&&o.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:G.advancedButton,onClick:()=>Te(!0)},"Advanced Options"),le&&o.createElement(o.Fragment,null,o.createElement(W.Z,null,"You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."),o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Fe,onClick:He},"Delete Entity")))):k.type==="only-delete"?o.createElement(o.Fragment,null,o.createElement(W.Z,null,"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog."),o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Fe,onClick:He},"Delete Entity")):k.type==="unregister"?o.createElement(o.Fragment,null,o.createElement(W.Z,null,"This action will unregister the following entities:"),o.createElement(W.Z,{component:"ul"},k.colocatedEntities.map(st=>o.createElement("li",{key:`${st.kind}:${st.namespace}/${st.name}`},o.createElement(X,{entityRef:st})))),o.createElement(W.Z,null,"Located at the following location:"),o.createElement(W.Z,{component:"ul"},o.createElement("li",null,k.location)),o.createElement(W.Z,null,"To undo, just re-register the entity in ",Oe,"."),o.createElement(E.Z,{marginTop:2},o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Fe,onClick:Ze},"Unregister Location"),!le&&o.createElement(E.Z,{component:"span",marginLeft:2},o.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:G.advancedButton,onClick:()=>Te(!0)},"Advanced Options"))),le&&o.createElement(o.Fragment,null,o.createElement(E.Z,{paddingTop:4,paddingBottom:4},o.createElement(dr.Z,null)),o.createElement(W.Z,null,"You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."),o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Fe,onClick:He},"Delete Entity"))):o.createElement(rr.Z,{severity:"error"},"Internal error: Unknown state")},Fr=v=>{const{open:C,onConfirm:D,onClose:z,entity:G}=v;return o.createElement(hn.Z,{open:C,onClose:z},o.createElement(xn.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),o.createElement($.Z,null,o.createElement(Dr,{entity:G,onConfirm:D})),o.createElement(B.Z,null,o.createElement(y.Z,{onClick:z,color:"primary"},"Cancel")))};var Br=e(12231),I=e(9520),J=e(47603);const he=(0,_.Z)(v=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:v.spacing(1,0,1,0)},title:{margin:v.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:v.palette.text.primary},menuItem:{minHeight:v.spacing(6)},groupWrapper:{margin:v.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function $e(v){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:J.Z},{id:"starred",label:"Starred",icon:Ot.Z}]},{name:v!=null?v:"Company",items:[{id:"all",label:"All"}]}]}const Qe=v=>{var aa;const{initialFilter:C,availableFilters:D}=v,z=he(),k=(aa=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?aa:"Company",{filters:le,updateFilters:Te,backendEntities:Fe,queryParameters:{kind:xe,user:Oe},loading:Ze}=Be(),He=["starred","all"],It=$e(k).map(on=>({...on,items:on.items.filter(({id:In})=>["group","user"].some(wr=>wr===xe)?He.includes(In):!D||D.includes(In))})).filter(({items:on})=>!!on.length),{isStarredEntity:st}=bt(),{isOwnedEntity:Ve,loading:Ft}=Nt(),Yt=Ze||Ft,Wn=(0,o.useMemo)(()=>new Ke("owned",Ve,st),[Ve,st]),an=(0,o.useMemo)(()=>new Ke("starred",Ve,st),[Ve,st]),gn=(0,o.useMemo)(()=>[Oe].flat()[0],[Oe]),[En,Pn]=(0,o.useState)(gn!=null?gn:C),Mr=(0,o.useMemo)(()=>Fe.filter(Et((0,Re.compact)(Object.values({...le,user:void 0})))),[le,Fe]),mr=(0,o.useMemo)(()=>({all:Mr.length,starred:Mr.filter(on=>an.filterEntity(on)).length,owned:Mr.filter(on=>Wn.filterEntity(on)).length}),[Mr,an,Wn]);return(0,o.useEffect)(()=>{gn&&Pn(gn)},[gn]),(0,o.useEffect)(()=>{!Yt&&!!En&&En!=="all"&&mr[En]===0&&Pn("all")},[Yt,mr,En,Pn]),(0,o.useEffect)(()=>{Te({user:En?new Ke(En,Ve,st):void 0})},[En,Ve,st,Te]),o.createElement(ar.Z,{className:z.root},It.map(on=>o.createElement(o.Fragment,{key:on.name},o.createElement(T.Z,{variant:"subtitle2",component:"span",className:z.title},on.name),o.createElement(ar.Z,{className:z.groupWrapper},o.createElement(zn.Z,{disablePadding:!0,dense:!0,role:"menu","aria-label":on.name},on.items.map(In=>{var wr,oa;return o.createElement(Br.Z,{role:"none presentation",key:In.id,button:!0,divider:!0,onClick:()=>Pn(In.id),selected:In.id===((wr=le.user)==null?void 0:wr.value),className:z.menuItem,disabled:mr[In.id]===0,"data-testid":`user-picker-${In.id}`,tabIndex:0,ContainerProps:{role:"menuitem"}},In.icon&&o.createElement(Yn.Z,{className:z.listIcon},o.createElement(In.icon,{fontSize:"small"})),o.createElement(vr.Z,null,o.createElement(T.Z,{variant:"body1"},In.label," ")),o.createElement(I.Z,null,(oa=mr[In.id])!=null?oa:"-"))}))))))},yt=({children:v,value:C})=>{var Te;const[D,z]=useState((Te=C==null?void 0:C.filters)!=null?Te:{}),G=useCallback(Fe=>{z(xe=>{const Oe=typeof Fe=="function"?Fe(xe):Fe;return{...xe,...Oe}})},[]),k=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),le=useMemo(()=>{var Fe,xe,Oe,Ze,He;return{entities:(Fe=C==null?void 0:C.entities)!=null?Fe:k.entities,backendEntities:(xe=C==null?void 0:C.backendEntities)!=null?xe:k.backendEntities,updateFilters:(Oe=C==null?void 0:C.updateFilters)!=null?Oe:G,filters:D,loading:(Ze=C==null?void 0:C.loading)!=null?Ze:!1,queryParameters:(He=C==null?void 0:C.queryParameters)!=null?He:k.queryParameters,error:C==null?void 0:C.error}},[C,k,D,G]);return React.createElement(EntityListContext.Provider,{value:le},v)}},39398:function(te,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return Re},AboutContent:function(){return ne},AboutField:function(){return U}});var r=e(48023),t=e(82339),l=e(36964),u=e(36356),R=e(53479),m=e(79692),o=e(94339),c=e(32552),f=e(61837),y=e(85256),p=e(24579),E=e(52866),T=e(30254),L=e(27604),M=e(2784),j=e(47851),w=e(60905),b=e(90436),O=e(7089);const F=(0,m.Z)(we=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:we.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function U(we){const{label:ge,value:ze,gridSizes:_e,children:et}=we,it=F(),St=(0,l.useElementFilter)(et,Pe=>Pe.getElements()),Et=St.length>0?St:M.createElement(b.Z,{variant:"body2",className:it.value},ze||"unknown");return M.createElement(w.Z,{item:!0,..._e},M.createElement(b.Z,{variant:"h2",className:it.label},ge),Et)}const Y=(0,m.Z)({description:{wordBreak:"break-word"}});function ne(we){var Be,Xe,ht,ke,vt,oe;const{entity:ge}=we,ze=Y(),_e=ge.kind.toLocaleLowerCase("en-US")==="system",et=ge.kind.toLocaleLowerCase("en-US")==="resource",it=ge.kind.toLocaleLowerCase("en-US")==="component",St=ge.kind.toLocaleLowerCase("en-US")==="api",Et=ge.kind.toLocaleLowerCase("en-US")==="template",Pe=ge.kind.toLocaleLowerCase("en-US")==="location",pt=ge.kind.toLocaleLowerCase("en-US")==="group",Ge=(0,R.getEntityRelations)(ge,r.cz,{kind:"system"}),ie=(0,R.getEntityRelations)(ge,r.cz,{kind:"component"}),de=(0,R.getEntityRelations)(ge,r.cz,{kind:"domain"}),Ue=(0,R.getEntityRelations)(ge,r.S4);return M.createElement(w.Z,{container:!0},M.createElement(U,{label:"Description",gridSizes:{xs:12}},M.createElement(b.Z,{variant:"body2",paragraph:!0,className:ze.description},((Be=ge==null?void 0:ge.metadata)==null?void 0:Be.description)||"No description")),M.createElement(U,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},Ue.length>0&&M.createElement(R.EntityRefLinks,{entityRefs:Ue,defaultKind:"group"})),(_e||de.length>0)&&M.createElement(U,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},de.length>0&&M.createElement(R.EntityRefLinks,{entityRefs:de,defaultKind:"domain"})),(St||it||et||Ge.length>0)&&M.createElement(U,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},Ge.length>0&&M.createElement(R.EntityRefLinks,{entityRefs:Ge,defaultKind:"system"})),it&&ie.length>0&&M.createElement(U,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},M.createElement(R.EntityRefLinks,{entityRefs:ie,defaultKind:"component"})),(St||it||et||Et||pt||Pe||typeof((Xe=ge==null?void 0:ge.spec)==null?void 0:Xe.type)=="string")&&M.createElement(U,{label:"Type",value:(ht=ge==null?void 0:ge.spec)==null?void 0:ht.type,gridSizes:{xs:12,sm:6,lg:4}}),(St||it||typeof((ke=ge==null?void 0:ge.spec)==null?void 0:ke.lifecycle)=="string")&&M.createElement(U,{label:"Lifecycle",value:(vt=ge==null?void 0:ge.spec)==null?void 0:vt.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),M.createElement(U,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((oe=ge==null?void 0:ge.metadata)==null?void 0:oe.tags)||[]).map(fe=>M.createElement(O.Z,{key:fe,size:"small",label:fe}))))}const ue=(0,m.Z)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function Re(we){var ke,vt,oe;const{variant:ge}=we,ze=ue(),{entity:_e}=(0,R.useEntity)(),et=(0,l.useApi)(u.q3),it=(0,l.useApi)(R.catalogApiRef),St=(0,l.useApi)(l.alertApiRef),Et=(0,l.useRouteRef)(j.jU),Pe=(0,R.getEntitySourceLocation)(_e,et),pt=(ke=_e.metadata.annotations)==null?void 0:ke[r.Tf],Ge={label:"View Source",disabled:!Pe,icon:M.createElement(u.nW,{type:Pe==null?void 0:Pe.integrationType}),href:Pe==null?void 0:Pe.locationTargetUrl},ie={label:"View TechDocs",disabled:!((vt=_e.metadata.annotations)!=null&&vt["backstage.io/techdocs-ref"])||!Et,icon:M.createElement(T.Z,null),href:Et&&Et({namespace:_e.metadata.namespace||r.zG,kind:_e.kind,name:_e.metadata.name})};let de="";ge==="gridItem"?de=ze.gridItemCard:ge==="fullHeight"&&(de=ze.fullHeightCard);let Ue="";ge==="gridItem"?Ue=ze.gridItemCardContent:ge==="fullHeight"&&(Ue=ze.fullHeightCardContent);const Be=(oe=_e.metadata.annotations)==null?void 0:oe[r.P1],Xe=(Be==null?void 0:Be.startsWith("url:"))||(Be==null?void 0:Be.startsWith("file:")),ht=(0,M.useCallback)(async()=>{await it.refreshEntity((0,r.eE)(_e)),St.post({message:"Refresh scheduled",severity:"info"})},[it,St,_e]);return M.createElement(o.Z,{className:de},M.createElement(c.Z,{title:"About",action:M.createElement(M.Fragment,null,Xe&&M.createElement(f.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:ht},M.createElement(E.Z,null)),M.createElement(f.Z,{component:t.Link,"aria-label":"Edit",disabled:!pt,title:"Edit Metadata",to:pt!=null?pt:"#"},M.createElement(L.Z,null))),subheader:M.createElement(t.HeaderIconLinkRow,{links:[Ge,ie]})}),M.createElement(y.Z,null),M.createElement(p.Z,{className:Ue},M.createElement(ne,{entity:_e})))}},49782:function(te,s,e){"use strict";e.d(s,{K:function(){return E}});var r=e(2784),t=e(79692),l=e(12420),u=e(97580),R=e(73698),m=e(74603),o=e(12231),c=e(53479),f=e(64279),y=e(36964);const p=(0,t.Z)(T=>(0,l.Z)({root:{...T.typography.h4}}));function E(T){var we;const{initialFilter:L="component",allowedKinds:M}=T,j=p(),w=(0,y.useApi)(c.catalogApiRef),{value:b}=(0,f.default)(async()=>await w.getEntityFacets({facets:["kind"]}).then(ge=>{var ze;return((ze=ge.facets.kind)==null?void 0:ze.map(_e=>_e.value).sort())||[]})),{updateFilters:O,queryParameters:{kind:F}}=(0,c.useEntityList)(),U=(0,r.useMemo)(()=>{var ge;return(ge=[F].flat()[0])==null?void 0:ge.toLocaleLowerCase("en-US")},[F]),[Y,ne]=(0,r.useState)(U!=null?U:L);(0,r.useEffect)(()=>{O({kind:Y?new c.EntityKindFilter(Y):void 0})},[Y,O]),(0,r.useEffect)(()=>{U&&ne(U)},[U]);const Re=[(0,u.Z)(Y)].concat((we=b==null?void 0:b.filter(ge=>M?M.some(ze=>ze.toLocaleLowerCase("en-US")===ge.toLocaleLowerCase("en-US")):!0))!=null?we:[]).sort().reduce((ge,ze)=>(ge[ze.toLocaleLowerCase("en-US")]=ze,ge),{});return r.createElement(R.Z,{input:r.createElement(m.Z,{value:Y}),value:Y,onChange:ge=>ne(ge.target.value),classes:j},Object.keys(Re).map(ge=>r.createElement(o.Z,{value:ge,key:ge},`${Re[ge]}s`)))}},30097:function(te,s,e){"use strict";e.d(s,{E:function(){return M}});var r=e(48023),t=e(53479),l=e(27604),u=e(2997),R=e(76635),m=e(2784),o=e(7089),c=e(82339);const f=Object.freeze({createNameColumn(j){function w(b){var O;return((O=b.metadata)==null?void 0:O.title)||(0,t.humanizeEntityRef)(b,{defaultKind:j==null?void 0:j.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:b},{entity:O}){return w(b).localeCompare(w(O))},render:({entity:b})=>{var O;return m.createElement(t.EntityRefLink,{entityRef:b,defaultKind:(j==null?void 0:j.defaultKind)||"Component",title:(O=b.metadata)==null?void 0:O.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:j})=>m.createElement(t.EntityRefLinks,{entityRefs:j.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:j})=>m.createElement(t.EntityRefLinks,{entityRefs:j.ownedByRelations,defaultKind:"group"})}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:j})=>m.createElement(c.OverflowTooltip,{text:j.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:j})=>m.createElement(m.Fragment,null,j.metadata.tags&&j.metadata.tags.map(w=>m.createElement(o.Z,{key:w,label:w,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}});var y=e(28347),p=e(15459),E=e(11640),T=e(90436);const L=(0,p.Z)({root:{color:"#f3ba37"}})(E.Z),M=j=>{var Et,Pe,pt;const{columns:w,actions:b,tableOptions:O}=j,{isStarredEntity:F,toggleStarredEntity:U}=(0,t.useStarredEntities)(),{loading:Y,error:ne,entities:ue,filters:Re}=(0,t.useEntityList)(),we=(0,m.useMemo)(()=>{var ie;return[f.createNameColumn({defaultKind:(ie=Re.kind)==null?void 0:ie.value}),...Ge(),f.createMetadataDescriptionColumn(),f.createTagsColumn()];function Ge(){var de;switch((de=Re.kind)==null?void 0:de.value){case"user":return[];case"domain":case"system":return[f.createOwnerColumn()];case"group":case"location":case"template":return[f.createSpecTypeColumn()];default:return[f.createSystemColumn(),f.createOwnerColumn(),f.createSpecTypeColumn(),f.createSpecLifecycleColumn()]}}},[(Et=Re.kind)==null?void 0:Et.value]),ge=Re.type===void 0,ze=(0,R.capitalize)((pt=(Pe=Re.user)==null?void 0:Pe.value)!=null?pt:"all");if(ne)return m.createElement("div",null,m.createElement(c.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},m.createElement(c.CodeSnippet,{language:"text",text:ne.toString()})));const _e=[({entity:Ge})=>{var Ue;const ie=(Ue=Ge.metadata.annotations)==null?void 0:Ue[r.l2],de="View";return{icon:()=>m.createElement(m.Fragment,null,m.createElement(T.Z,{variant:"srOnly"},de),m.createElement(u.Z,{fontSize:"small"})),tooltip:de,disabled:!ie,onClick:()=>{!ie||window.open(ie,"_blank")}}},({entity:Ge})=>{var Ue;const ie=(Ue=Ge.metadata.annotations)==null?void 0:Ue[r.Tf],de="Edit";return{icon:()=>m.createElement(m.Fragment,null,m.createElement(T.Z,{variant:"srOnly"},de),m.createElement(l.Z,{fontSize:"small"})),tooltip:de,disabled:!ie,onClick:()=>{!ie||window.open(ie,"_blank")}}},({entity:Ge})=>{const ie=F(Ge),de=ie?"Remove from favorites":"Add to favorites";return{cellStyle:{paddingLeft:"1em"},icon:()=>m.createElement(m.Fragment,null,m.createElement(T.Z,{variant:"srOnly"},de),ie?m.createElement(L,null):m.createElement(y.Z,null)),tooltip:de,onClick:()=>U(Ge)}}],et=ue.map(Ge=>{const ie=(0,t.getEntityRelations)(Ge,r.cz,{kind:"system"}),de=(0,t.getEntityRelations)(Ge,r.S4);return{entity:Ge,resolved:{name:(0,t.humanizeEntityRef)(Ge,{defaultKind:"Component"}),ownedByRelationsTitle:de.map(Ue=>(0,t.humanizeEntityRef)(Ue,{defaultKind:"group"})).join(", "),ownedByRelations:de,partOfSystemRelationTitle:ie.map(Ue=>(0,t.humanizeEntityRef)(Ue,{defaultKind:"system"})).join(", "),partOfSystemRelations:ie}}}),it=(w||we).find(Ge=>Ge.title==="Type");it&&(it.hidden=!ge);const St=et.length>20;return m.createElement(c.Table,{isLoading:Y,columns:w||we,options:{paging:St,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!Y,padding:"dense",pageSizeOptions:[20,50,100],...O},title:`${ze} (${ue.length})`,data:et,actions:b||_e})};M.columns=f},47851:function(te,s,e){"use strict";e.d(s,{_Z:function(){return u},jU:function(){return l},yw:function(){return t}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),l=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),u=(0,r.createRouteRef)({id:"catalog"})},40749:function(te,s,e){"use strict";e.d(s,{rG:function(){return r},Y2:function(){return O},J$:function(){return f},g2:function(){return l}});var r;(function(F){const U="DENY";F.DENY=U;const Y="ALLOW";F.ALLOW=Y;const ne="CONDITIONAL";F.CONDITIONAL=ne})(r||(r={}));function t(F,U){return F.name===U.name}function l(F,U){return"resourceType"in F?!U||F.resourceType===U:!1}function u(F){return F.attributes.action==="create"}function R(F){return F.attributes.action==="read"}function m(F){return F.attributes.action==="update"}function o(F){return F.attributes.action==="delete"}function c(F){return{authorize:async(U,Y)=>await F.authorize(U,Y),authorizeConditional(U,Y){const ne=U;return F.authorize(ne,Y)}}}function f({name:F,attributes:U,resourceType:Y}){return Y?{type:"resource",name:F,attributes:U,resourceType:Y}:{type:"basic",name:F,attributes:U}}var y=e(10179),p=e(96279),E=e.n(p),T=e(9571),L=e(30195);const M=L.z.lazy(()=>L.z.object({rule:L.z.string(),resourceType:L.z.string(),params:L.z.array(L.z.unknown())}).or(L.z.object({anyOf:L.z.array(M).nonempty()})).or(L.z.object({allOf:L.z.array(M).nonempty()})).or(L.z.object({not:M}))),j=L.z.object({result:L.z.literal(r.ALLOW).or(L.z.literal(r.DENY))}),w=L.z.union([L.z.object({result:L.z.literal(r.ALLOW).or(L.z.literal(r.DENY))}),L.z.object({result:L.z.literal(r.CONDITIONAL),pluginId:L.z.string(),resourceType:L.z.string(),conditions:M})]),b=(F,U)=>L.z.object({items:L.z.array(L.z.intersection(L.z.object({id:L.z.string()}),F)).refine(Y=>Y.length===U.size&&Y.every(({id:ne})=>U.has(ne)),{message:"Items in response do not match request"})});class O{constructor(U){q(this,"enabled");q(this,"discovery");var Y;this.discovery=U.discovery,this.enabled=(Y=U.config.getOptionalBoolean("permission.enabled"))!=null?Y:!1}async authorize(U,Y){return this.makeRequest(U,j,Y)}async authorizeConditional(U,Y){return this.makeRequest(U,w,Y)}async makeRequest(U,Y,ne){if(!this.enabled)return U.map(et=>({result:r.ALLOW}));const ue={items:U.map(et=>({id:T.Z(),...et}))},Re=await this.discovery.getBaseUrl("permission"),we=await E()(`${Re}/authorize`,{method:"POST",body:JSON.stringify(ue),headers:{...this.getAuthorizationHeader(ne==null?void 0:ne.token),"content-type":"application/json"}});if(!we.ok)throw await y.VL.fromResponse(we);const ge=await we.json(),_e=b(Y,new Set(ue.items.map(({id:et})=>et))).parse(ge).items.reduce((et,it)=>(et[it.id]=it,et),{});return ue.items.map(et=>_e[et.id])}getAuthorizationHeader(U){return U?{Authorization:`Bearer ${U}`}:{}}}},68099:function(te,s,e){"use strict";e.d(s,{iM:function(){return R},RV:function(){return l},gI:function(){return o}});var r=e(2784),t=e(36964);const l=(0,t.createApiRef)({id:"plugin.permission.api"});var u=e(40749);class R{constructor(y,p){this.permissionClient=y,this.identityApi=p}static create(y){const{config:p,discovery:E,identity:T}=y,L=new u.Y2({discovery:E,config:p});return new R(L,T)}async authorize(y){return(await this.permissionClient.authorize([y],await this.identityApi.getCredentials()))[0]}}var m=e(49857);function o(f){const y=(0,t.useApi)(l),{data:p,error:E}=(0,m.ZP)(f,async T=>{if((0,u.g2)(T.permission)&&!T.resourceRef)return u.rG.DENY;const{result:L}=await y.authorize(T);return L});return E?{error:E,loading:!1,allowed:!1}:p===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:p===u.rG.ALLOW}}const c=f=>{const{permission:y,resourceRef:p,errorComponent:E,...T}=f,L=usePermission(isResourcePermission(y)?{permission:y,resourceRef:p}:{permission:y}),M=useApp(),{NotFoundErrorPage:j}=M.getComponents();let w=E===void 0?React.createElement(j,null):E;return L.loading?w=null:L.allowed&&(w=f.element),React.createElement(Route,{...T,element:w})}},74450:function(te,s,e){"use strict";e.d(s,{FA:function(){return o},Nd:function(){return Y},Rx:function(){return O}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.search.queryservice"});class l{constructor(fe){this.mockedResults=fe}query(){return Promise.resolve(this.mockedResults||{results:[]})}}var u=e(2784),R=e(79692);const m=(0,R.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),o=({text:oe,preTag:fe,postTag:tt})=>{const Ye=m(),Ne=(0,u.useMemo)(()=>oe.split(new RegExp(`(${fe}.+?${tt})`)),[tt,fe,oe]);return u.createElement(u.Fragment,null,Ne.map((ut,X)=>ut.includes(fe)?u.createElement("mark",{className:Ye.highlight,key:X},ut.replace(new RegExp(`${fe}|${tt}`,"g"),"")):ut))};var c=e(42494),f=e(84899),y=e(5806),p=e(21324),E=e(56939),T=e(73698),L=e(12231),M=e(76241),j=e(64279),w=e(1849);const b=(0,M.CT)("search-context"),O=()=>{const oe=(0,u.useContext)(b);if(!oe)throw new Error("useSearch must be used within a SearchContextProvider");const fe=oe.atVersion(1);if(!fe)throw new Error("No SearchContext v1 found");return fe},F=()=>useContext(b)!==void 0,U={term:"",pageCursor:void 0,filters:{},types:[]},Y=oe=>{var bt,Lt,Pt,Nt;const{initialState:fe=U,children:tt}=oe,Ye=(0,r.useApi)(t),[Ne,ut]=(0,u.useState)(fe.pageCursor),[X,Z]=(0,u.useState)(fe.filters),[Q,se]=(0,u.useState)(fe.term),[ce,Ce]=(0,u.useState)(fe.types),Le=(0,w.Z)(Q),Ae=(0,j.default)(()=>Ye.query({term:Q,filters:X,pageCursor:Ne,types:ce}),[Q,X,ce,Ne]),Ke=!Ae.loading&&!Ae.error&&((bt=Ae.value)==null?void 0:bt.nextPageCursor),je=!Ae.loading&&!Ae.error&&((Lt=Ae.value)==null?void 0:Lt.previousPageCursor),gt=(0,u.useCallback)(()=>{var At;ut((At=Ae.value)==null?void 0:At.nextPageCursor)},[(Pt=Ae.value)==null?void 0:Pt.nextPageCursor]),Ct=(0,u.useCallback)(()=>{var At;ut((At=Ae.value)==null?void 0:At.previousPageCursor)},[(Nt=Ae.value)==null?void 0:Nt.previousPageCursor]);(0,u.useEffect)(()=>{Q&&Le&&Q!==Le&&ut(void 0)},[Q,Le,fe.pageCursor]);const dt={result:Ae,filters:X,setFilters:Z,term:Q,setTerm:se,types:ce,setTypes:Ce,pageCursor:Ne,setPageCursor:ut,fetchNextPage:Ke?gt:void 0,fetchPreviousPage:je?Ct:void 0},Rt=(0,M.EI)({1:dt});return u.createElement(r.AnalyticsContext,{attributes:{searchTypes:ce.sort().join(",")}},u.createElement(b.Provider,{value:Rt,children:tt}))};var ne=e(86619),ue=e(7089),Re=e(88013),we=e(69294),ge=e(48760);const ze=(oe,fe,tt=[],Ye=250)=>{const Ne=(0,u.useRef)({}),ut=oe||(()=>Promise.resolve([])),[X,Z]=(0,we.default)(ut,[fe],{loading:!0});if((0,ge.Z)(()=>{Ne.current[fe]===void 0&&(Ne.current[fe]=Z(fe).then(se=>(Ne.current[fe]=se,se)))},Ye,[Z,fe]),tt.length)return{loading:!1,value:tt};const Q=Ne.current[fe];return Array.isArray(Q)?{loading:!1,value:Q}:X},_e=(oe,fe)=>{const{setFilters:tt}=O();(0,u.useEffect)(()=>{fe&&[fe].flat().length>0&&tt(Ye=>({...Ye,[oe]:fe}))},[])},et=oe=>{const{className:fe,defaultValue:tt,name:Ye,values:Ne,valuesDebounceMs:ut,label:X,filterSelectedOptions:Z,limitTags:Q,multiple:se}=oe,[ce,Ce]=(0,u.useState)("");_e(Ye,tt);const Le=typeof Ne=="function"?Ne:void 0,Ae=typeof Ne=="function"?void 0:Ne,{value:Ke,loading:je}=ze(Le,ce,Ae,ut),{filters:gt,setFilters:Ct}=O(),dt=gt[Ye]||(se?[]:null),Rt=(Pt,Nt)=>{Ct(At=>{const{[Ye]:at,...Zn}=At;return Nt?{...Zn,[Ye]:Nt}:{...Zn}})},bt=Pt=>u.createElement(ne.Z,{...Pt,name:"search",variant:"outlined",label:X,fullWidth:!0}),Lt=(Pt,Nt)=>Pt.map((At,at)=>u.createElement(ue.Z,{label:At,color:"primary",...Nt({index:at})}));return u.createElement(Re.ZP,{filterSelectedOptions:Z,limitTags:Q,multiple:se,className:fe,id:`${se?"multi-":""}select-filter-${Ye}--select`,options:Ke||[],loading:je,value:dt,onChange:Rt,onInputChange:(Pt,Nt)=>Ce(Nt),renderInput:bt,renderTags:Lt})},it=(0,R.Z)({label:{textTransform:"capitalize"}}),St=oe=>{const{className:fe,defaultValue:tt,label:Ye,name:Ne,values:ut=[],valuesDebounceMs:X}=oe,Z=it(),{filters:Q,setFilters:se}=O();_e(Ne,tt);const ce=typeof ut=="function"?ut:void 0,Ce=typeof ut=="function"?void 0:ut,{value:Le=[],loading:Ae}=ze(ce,"",Ce,X),Ke=je=>{const{target:{value:gt,checked:Ct}}=je;se(dt=>{const{[Ne]:Rt,...bt}=dt,Lt=(Rt||[]).filter(Nt=>Nt!==gt),Pt=Ct?[...Lt,gt]:Lt;return Pt.length?{...bt,[Ne]:Pt}:bt})};return u.createElement(c.Z,{className:fe,disabled:Ae,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},Ye?u.createElement(f.Z,{className:Z.label},Ye):null,Le.map(je=>{var gt;return u.createElement(y.Z,{key:je,control:u.createElement(p.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":je},value:je,name:je,onChange:Ke,checked:((gt=Q[Ne])!=null?gt:[]).includes(je)}),label:je})}))},Et=oe=>{const{className:fe,defaultValue:tt,label:Ye,name:Ne,values:ut,valuesDebounceMs:X}=oe,Z=it();_e(Ne,tt);const Q=typeof ut=="function"?ut:void 0,se=typeof ut=="function"?void 0:ut,{value:ce=[],loading:Ce}=ze(Q,"",se,X),{filters:Le,setFilters:Ae}=O(),Ke=je=>{const{target:{value:gt}}=je;Ae(Ct=>{const{[Ne]:dt,...Rt}=Ct;return gt?{...Rt,[Ne]:gt}:Rt})};return u.createElement(c.Z,{disabled:Ce,className:fe,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},Ye?u.createElement(E.Z,{className:Z.label,margin:"dense"},Ye):null,u.createElement(T.Z,{variant:"outlined",value:Le[Ne]||"",onChange:Ke},u.createElement(L.Z,{value:""},u.createElement("em",null,"All")),ce.map(je=>u.createElement(L.Z,{key:je,value:je},je))))},Pe=({component:oe,...fe})=>u.createElement(oe,{...fe});Pe.Checkbox=oe=>u.createElement(Pe,{...oe,component:St}),Pe.Select=oe=>u.createElement(Pe,{...oe,component:Et}),Pe.Autocomplete=oe=>u.createElement(Pe,{...oe,component:et});var pt=e(82339);const Ge=({children:oe})=>{const{result:{loading:fe,error:tt,value:Ye}}=useSearch();return fe?React.createElement(Progress,null):tt?React.createElement(ResponseErrorPanel,{title:"Error encountered while fetching search results",error:tt}):Ye!=null&&Ye.results.length?React.createElement(React.Fragment,null,oe({results:Ye.results})):React.createElement(EmptyState,{missing:"data",title:"Sorry, no results were found"})},ie=oe=>React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchResult"}},React.createElement(Ge,{...oe})),de=(0,R.Z)(oe=>({root:{display:"flex",justifyContent:"space-between",gap:oe.spacing(2),margin:oe.spacing(2,0)}})),Ue=()=>{const{fetchNextPage:oe,fetchPreviousPage:fe}=useSearch(),tt=de();return!oe&&!fe?React.createElement(React.Fragment,null):React.createElement("nav",{"arial-label":"pagination navigation",className:tt.root},React.createElement(Button,{"aria-label":"previous page",disabled:!fe,onClick:fe,startIcon:React.createElement(ArrowBackIosIcon,null)},"Previous"),React.createElement(Button,{"aria-label":"next page",disabled:!oe,onClick:oe,endIcon:React.createElement(ArrowForwardIosIcon,null)},"Next"))},Be=({children:oe})=>{const fe=useAnalytics(),{term:tt}=useSearch();return useEffect(()=>{tt&&fe.captureEvent("search",tt)},[fe,tt]),React.createElement(React.Fragment,null,oe)},Xe=({onChange:oe,onKeyDown:fe,onSubmit:tt,debounceTime:Ye=200,clearButton:Ne=!0,fullWidth:ut=!0,value:X,inputProps:Z={},endAdornment:Q,...se})=>{const ce=useApi(configApiRef),[Ce,Le]=useState(X),Ae=useSearchContextCheck();useEffect(()=>{Le(Lt=>Lt!==X?X:Lt)},[X]),useDebounce(()=>oe(Ce),Ye,[Ce]);const Ke=useCallback(Lt=>{Le(Lt.target.value)},[Le]),je=useCallback(Lt=>{fe&&fe(Lt),tt&&Lt.key==="Enter"&&tt()},[fe,tt]),gt=useCallback(()=>{oe("")},[oe]),Ct=`Search in ${ce.getOptionalString("app.title")||"Backstage"}`,dt=React.createElement(InputAdornment,{position:"start"},React.createElement(IconButton,{"aria-label":"Query",disabled:!0},React.createElement(SearchIcon,null))),Rt=React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"Clear",onClick:gt},React.createElement(ClearButton,null))),bt=React.createElement(TrackSearch,null,React.createElement(InputBase,{"data-testid":"search-bar-next",value:Ce,placeholder:Ct,startAdornment:dt,endAdornment:Ne?Rt:Q,inputProps:{"aria-label":"Search",...Z},fullWidth:ut,onChange:Ke,onKeyDown:je,...se}));return Ae?bt:React.createElement(SearchContextProvider,null,bt)},ht=({onChange:oe,...fe})=>{const{term:tt,setTerm:Ye}=useSearch(),Ne=useCallback(ut=>{oe?oe(ut):Ye(ut)},[oe,Ye]);return React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchBar"}},React.createElement(Xe,{value:tt,onChange:Ne,...fe}))},ke=({result:oe,highlight:fe,rank:tt,icon:Ye,secondaryAction:Ne,lineClamp:ut=5})=>{const X=useAnalytics(),Z=()=>{X.captureEvent("discover",oe.title,{attributes:{to:oe.location},value:tt})};return React.createElement(Link,{noTrack:!0,to:oe.location,onClick:Z},React.createElement(ListItem,{alignItems:"center"},Ye&&React.createElement(ListItemIcon,null,Ye),React.createElement(ListItemText,{primaryTypographyProps:{variant:"h6"},primary:fe!=null&&fe.fields.title?React.createElement(HighlightedSearchResultText,{text:fe.fields.title,preTag:fe.preTag,postTag:fe.postTag}):oe.title,secondary:React.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:ut,overflow:"hidden"}},fe!=null&&fe.fields.text?React.createElement(HighlightedSearchResultText,{text:fe.fields.text,preTag:fe.preTag,postTag:fe.postTag}):oe.text)}),Ne&&React.createElement(Box,{alignItems:"flex-end"},Ne)),React.createElement(Divider,null))},vt=oe=>React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"DefaultResultListItem"}},React.createElement(ke,{...oe}))},26136:function(te,s,e){"use strict";e.d(s,{Ox:function(){return ze},Zz:function(){return R},oZ:function(){return ne},DR:function(){return m},ZS:function(){return U},VA:function(){return it},KY:function(){return c},gT:function(){return T},Dl:function(){return L},ux:function(){return et},$L:function(){return E},x1:function(){return Y}});var r=e(2784),t=e(10289),l=e(36964);const u="techdocs.addons.addon.v1",R="techdocs.addons.wrapper.v1",m=()=>null;(0,l.attachComponentData)(m,R,!0);const o=ie=>`${u}.${ie.toLocaleLowerCase("en-US")}`;function c(ie){const{name:de,component:Ue}=ie;return(0,l.createReactExtension)({name:de,component:{sync:Be=>r.createElement(Ue,{...Be})},data:{[u]:ie,[o(de)]:!0}})}const f=(ie,de)=>ie.selectByComponentData({key:de}).getElements()[0],y=ie=>ie.selectByComponentData({key:R}).selectByComponentData({key:u}),p=ie=>ie.selectByComponentData({key:R}).findComponentData({key:u}),E=()=>{const ie=(0,t.pC)(),de=(0,l.useElementFilter)(ie,y),Ue=(0,l.useElementFilter)(ie,p),Be=(0,r.useCallback)(ke=>{var oe;if(!de||!ke)return null;const vt=o(ke.name);return(oe=f(de,vt))!=null?oe:null},[de]),Xe=(0,r.useCallback)(ke=>{const vt=Ue.find(oe=>oe.name===ke);return vt?Be(vt):null},[Ue,Be]),ht=(0,r.useCallback)(ke=>{const vt=Ue.filter(oe=>oe.location===ke);return vt.length?vt.map(Be):null},[Ue,Be]);return{renderComponentByName:Xe,renderComponentsByLocation:ht}},T=(0,l.createApiRef)({id:"plugin.techdocs.service"}),L=(0,l.createApiRef)({id:"plugin.techdocs.storageservice"});var M=e(64279),j=e(48023),w=e(76241);const b=(ie,de)=>(0,j.eE)(ie)===(0,j.eE)(de),O={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},F=(0,w.CT)("techdocs-reader-page-context"),U=(0,r.memo)(({entityRef:ie,children:de})=>{const Ue=(0,l.useApi)(T),Be=(0,M.default)(async()=>Ue.getTechDocsMetadata(ie),[ie]),Xe=(0,M.default)(async()=>Ue.getEntityMetadata(ie),[ie]),[ht,ke]=(0,r.useState)(O.title),[vt,oe]=(0,r.useState)(O.subtitle),[fe,tt]=(0,r.useState)(O.shadowRoot),Ye={metadata:Be,entityRef:ie,entityMetadata:Xe,shadowRoot:fe,setShadowRoot:tt,title:ht,setTitle:ke,subtitle:vt,setSubtitle:oe},Ne=(0,w.EI)({1:Ye});return r.createElement(F.Provider,{value:Ne},de instanceof Function?de(Ye):de)},(ie,de)=>b(ie.entityRef,de.entityRef)),Y=()=>{const ie=(0,r.useContext)(F);if(ie===void 0)return O;const de=ie.atVersion(1);if(de===void 0)throw new Error("No context found for version 1.");return de},ne=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"});var ue=e(6553),Re=e(50236),we=e(19219),ge=e(82339);const ze="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",_e=ie=>{(0,r.useEffect)(()=>{var ht;if(!ie)return()=>{};const de=ie.querySelectorAll('head > link[rel="stylesheet"]');let Ue=(ht=de==null?void 0:de.length)!=null?ht:0;const Be=new CustomEvent(ze);if(!Ue)return ie.dispatchEvent(Be),()=>{};const Xe=()=>{--Ue===0&&ie.dispatchEvent(Be)};return de==null||de.forEach(ke=>{ke.addEventListener("load",Xe)}),()=>{de==null||de.forEach(ke=>{ke.removeEventListener("load",Xe)})}},[ie])},et=ie=>{const[de,Ue]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!ie)return()=>{};Ue(!0);const Be=ie.style;Be.setProperty("opacity","0");const Xe=()=>{Ue(!1),Be.setProperty("opacity","1")};return ie.addEventListener(ze,Xe),()=>{ie.removeEventListener(ze,Xe)}},[ie]),de},it=({element:ie,onAppend:de,children:Ue})=>{const[Be,Xe]=(0,r.useState)((0,ue.Ue)({...(0,Re.Z)(),insertionPoint:void 0}));_e(ie);const ht=et(ie),ke=(0,r.useCallback)(vt=>{if(!ie||!vt)return;Xe((0,ue.Ue)({...(0,Re.Z)(),insertionPoint:ie.querySelector("head")||void 0}));let oe=vt.shadowRoot;oe||(oe=vt.attachShadow({mode:"open"})),oe.replaceChildren(ie),typeof de=="function"&&de(oe)},[ie,de]);return r.createElement(r.Fragment,null,ht&&r.createElement(ge.Progress,null),r.createElement(we.ZP,{jss:Be,sheetsManager:new Map},r.createElement("div",{ref:ke,"data-testid":"techdocs-native-shadowroot"}),Ue))};var St=e(54073);const Et=()=>{const{shadowRoot:ie}=useTechDocsReaderPage();return ie},Pe=ie=>{const de=Et();return de?ie.map(Ue=>de==null?void 0:de.querySelectorAll(Ue)).filter(Ue=>Ue.length).map(Ue=>Array.from(Ue)).flat():[]},pt=ie=>ie.toString()&&ie.rangeCount&&ie.getRangeAt(0).getBoundingClientRect().top,Ge=(ie=0)=>{const de=Et(),[Ue,Be]=useState(null),Xe=useMemo(()=>debounce(()=>{const ht=de,ke=ht.getSelection?ht.getSelection():document.getSelection();ke&&pt(ke)?Be(ke):Be(null)},ie),[de,Be,ie]);return useEffect(()=>(window.document.addEventListener("selectionchange",Xe),()=>window.document.removeEventListener("selectionchange",Xe)),[Xe]),Ue}},94067:function(te,s,e){"use strict";e.r(s),e.d(s,{EmbeddedDocsRouter:function(){return M},Router:function(){return L},isTechDocsAvailable:function(){return T}});var r=e(2784),t=e(10289),l=e(53479),u=e(82339),R=e(48023),m=e(20961),o=e(16172),c=e(63126);const f=({entity:j})=>{const w=(0,R.iB)(j);return r.createElement(m.I6,{entityRef:w},r.createElement(o.b,null),r.createElement(c.F,{withSearch:!1}))};var y=e(50021),p=e(26220);const E="backstage.io/techdocs-ref",T=j=>{var w,b;return Boolean((b=(w=j==null?void 0:j.metadata)==null?void 0:w.annotations)==null?void 0:b[E])},L=()=>r.createElement(t.Z5,null,r.createElement(t.AW,{path:"/",element:r.createElement(y.TechDocsIndexPage,null)}),r.createElement(t.AW,{path:"/:namespace/:kind/:name/*",element:r.createElement(p.TechDocsReaderPage,null)})),M=j=>{var U;const{children:w}=j,{entity:b}=(0,l.useEntity)(),O=(0,t.V$)([{path:"/*",element:r.createElement(f,{entity:b}),children:[{path:"/*",element:w}]}]);return((U=b.metadata.annotations)==null?void 0:U[E])?O:r.createElement(u.MissingAnnotationEmptyState,{annotation:E})}},3337:function(te,s,e){"use strict";var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),l=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(te,s,e){"use strict";e.d(s,{k:function(){return R},p:function(){return u}});var r=e(10179),t=e(76372),l=e.n(t);class u{constructor(o){q(this,"configApi");q(this,"discoveryApi");q(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.fetchApi=o.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(o){const{kind:c,namespace:f,name:y}=o,E=`${await this.getApiOrigin()}/metadata/techdocs/${f}/${c}/${y}`,T=await this.fetchApi.fetch(`${E}`);if(!T.ok)throw await r.VL.fromResponse(T);return await T.json()}async getEntityMetadata(o){const{kind:c,namespace:f,name:y}=o,E=`${await this.getApiOrigin()}/metadata/entity/${f}/${c}/${y}`,T=await this.fetchApi.fetch(`${E}`);if(!T.ok)throw await r.VL.fromResponse(T);return await T.json()}}class R{constructor(o){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");q(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.identityApi=o.identityApi,this.fetchApi=o.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var o;return(o=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?o:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(o,c){const{kind:f,namespace:y,name:p}=o,T=`${await this.getStorageUrl()}/${y}/${f}/${p}/${c}`,L=await this.fetchApi.fetch(`${T.endsWith("/")?T:`${T}/`}index.html`);let M="";switch(L.status){case 404:throw M="Page not found. ",c||(M+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(M);case 500:throw M="Could not generate documentation or an error in the TechDocs backend. ",new Error(M);default:break}return L.text()}async syncEntityDocs(o,c=()=>{}){const{kind:f,namespace:y,name:p}=o,T=`${await this.getApiOrigin()}/sync/${y}/${f}/${p}`,{token:L}=await this.identityApi.getCredentials();return new Promise((M,j)=>{const w=new t.EventSourcePolyfill(T,{withCredentials:!0,headers:L?{Authorization:`Bearer ${L}`}:{}});w.addEventListener("log",b=>{b.data&&c(JSON.parse(b.data))}),w.addEventListener("finish",b=>{let O=!1;b.data&&({updated:O}=JSON.parse(b.data)),M(O?"updated":"cached")}),w.onerror=b=>{switch(w.close(),b.status){case 404:j(new r.dR(b.message));return;default:j(new Error(b.data));return}}})}async getBaseUrl(o,c,f){const{kind:y,namespace:p,name:E}=c,L=`${await this.getApiOrigin()}/static/docs/${p}/${y}/${E}/${f}`;return new URL(o,L.endsWith("/")?L:`${L}/`).toString()}}},97589:function(te,s,e){"use strict";e.d(s,{D:function(){return r}});function r(t,l){return l.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(te,s,e){"use strict";e.d(s,{u:function(){return o}});var r=e(2784),t=e(82339),l=e(53479),u=e(1114),R=e(70335),m=e(21956);const o=c=>{const{initialFilter:f="all",columns:y,actions:p}=c;return r.createElement(u.j,null,r.createElement(t.Content,null,r.createElement(t.ContentHeader,{title:""},r.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),r.createElement(l.EntityListProvider,null,r.createElement(l.CatalogFilterLayout,null,r.createElement(l.CatalogFilterLayout.Filters,null,r.createElement(R.f,null),r.createElement(l.UserListPicker,{initialFilter:f}),r.createElement(l.EntityOwnerPicker,null),r.createElement(l.EntityTagPicker,null)),r.createElement(l.CatalogFilterLayout.Content,null,r.createElement(m.EntityListDocsTable,{actions:p,columns:y}))))))}},51016:function(te,s,e){"use strict";e.d(s,{f:function(){return y}});var r=e(68725),t=e(97589),l=e(36964),u=e(82339),R=e(94339),m=e(16111),o=e(24579),c=e(14503),f=e(2784);const y=T=>{const{entities:L}=T,M=(0,l.useRouteRef)(r.Fw),j=(0,l.useApi)(l.configApiRef);return L?f.createElement(u.ItemCardGrid,{"data-testid":"docs-explore"},L!=null&&L.length?L.map((w,b)=>{var O,F;return f.createElement(R.Z,{key:b},f.createElement(m.Z,null,f.createElement(u.ItemCardHeader,{title:(O=w.metadata.title)!=null?O:w.metadata.name})),f.createElement(o.Z,null,w.metadata.description),f.createElement(c.Z,null,f.createElement(u.Button,{to:M({namespace:(0,t.D)((F=w.metadata.namespace)!=null?F:"default",j),kind:(0,t.D)(w.kind,j),name:(0,t.D)(w.metadata.name,j)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var p=e(53479);const E=()=>{const{loading:T,error:L,entities:M}=useEntityList();return L?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:L.toString()})):T||!M?React.createElement(Progress,null):(M.sort((j,w)=>{var b,O;return((b=j.metadata.title)!=null?b:j.metadata.name).localeCompare((O=w.metadata.title)!=null?O:w.metadata.name)}),React.createElement(DocsCardGrid,{entities:M}))}},38634:function(te,s,e){"use strict";e.d(s,{H:function(){return p}});var r=e(2784),t=e(95074),l=e(36964),u=e(48023),R=e(53479),m=e(68725),o=e(82339),c=e(98095),f=e(3792),y=e(97589);const p=E=>{const{entities:T,title:L,loading:M,columns:j,actions:w}=E,[,b]=(0,t.Z)(),O=(0,l.useRouteRef)(m.Fw),F=(0,l.useApi)(l.configApiRef);if(!T)return null;const U=T.map(ue=>{var we;const Re=(0,R.getEntityRelations)(ue,u.S4);return{entity:ue,resolved:{docsUrl:O({namespace:(0,y.D)((we=ue.metadata.namespace)!=null?we:"default",F),kind:(0,y.D)(ue.kind,F),name:(0,y.D)(ue.metadata.name,F)}),ownedByRelations:Re,ownedByRelationsTitle:Re.map(ge=>(0,R.humanizeEntityRef)(ge,{defaultKind:"group"})).join(", ")}}}),Y=[f.N.createNameColumn(),f.N.createOwnerColumn(),f.N.createTypeColumn()],ne=[c.n.createCopyDocsUrlAction(b)];return r.createElement(r.Fragment,null,M||U&&U.length>0?r.createElement(o.Table,{isLoading:M,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:U,columns:j||Y,actions:w||ne,title:L?`${L} (${U.length})`:`All (${U.length})`}):r.createElement(o.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:r.createElement(o.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))};p.columns=f.N,p.actions=c.n},12481:function(te,s,e){"use strict";e.d(s,{n:function(){return y}});var r=e(2784),t=e(95074),l=e(76635),u=e.n(l),R=e(82339),m=e(53479),o=e(38634),c=e(98095),f=e(3792);const y=p=>{var ne,ue;const{columns:E,actions:T}=p,{loading:L,error:M,entities:j,filters:w}=(0,m.useEntityList)(),{isStarredEntity:b,toggleStarredEntity:O}=(0,m.useStarredEntities)(),[,F]=(0,t.Z)(),U=(0,l.capitalize)((ue=(ne=w.user)==null?void 0:ne.value)!=null?ue:"all"),Y=[c.n.createCopyDocsUrlAction(F),c.n.createStarEntityAction(b,O)];return M?r.createElement(R.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(R.CodeSnippet,{language:"text",text:M.toString()})):r.createElement(o.H,{title:U,entities:j,loading:L,actions:T||Y,columns:E})};y.columns=f.N,y.actions=c.n},98095:function(te,s,e){"use strict";e.d(s,{n:function(){return o}});var r=e(2784),t=e(39981),l=e(2337),u=e(11640),R=e(28347);const m=(0,l.Z)({root:{color:"#f3ba37"}})(u.Z),o={createCopyDocsUrlAction(c){return f=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>c(`${window.location.origin}${f.resolved.docsUrl}`)})},createStarEntityAction(c,f){return({entity:y})=>{const p=c(y);return{cellStyle:{paddingLeft:"1em"},icon:()=>p?r.createElement(m,null):r.createElement(R.Z,null),tooltip:p?"Remove from favorites":"Add to favorites",onClick:()=>f(y)}}}}},3792:function(te,s,e){"use strict";e.d(s,{N:function(){return R}});var r=e(2784),t=e(82339),l=e(53479);function u(m){return m.metadata.title||m.metadata.name}const R={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:m=>r.createElement(t.SubvalueCell,{value:r.createElement(t.Link,{to:m.resolved.docsUrl},u(m.entity)),subvalue:m.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:m})=>r.createElement(l.EntityRefLinks,{entityRefs:m.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},21956:function(te,s,e){"use strict";e.d(s,{DocsTable:function(){return t.H},EntityListDocsTable:function(){return r.n}});var r=e(12481),t=e(38634),l=e(72580),u=e.n(l);e.o(l,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return l.DefaultTechDocsHome}})},72580:function(){},50021:function(te,s,e){"use strict";e.r(s),e.d(s,{TechDocsIndexPage:function(){return u}});var r=e(2784),t=e(10289),l=e(2546);const u=()=>(0,t.pC)()||r.createElement(l.u,null)},1114:function(te,s,e){"use strict";e.d(s,{j:function(){return u}});var r=e(2784),t=e(82339),l=e(36964);const u=R=>{var f;const{children:m}=R,c=`Documentation available in ${(f=(0,l.useApi)(l.configApiRef).getOptionalString("organization.name"))!=null?f:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:c,themeId:"documentation"},m)}},70335:function(te,s,e){"use strict";e.d(s,{f:function(){return u}});var r=e(2784),t=e(53479);class l{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const u=()=>{const{updateFilters:R}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{R({techdocs:new l})},[R]),null}},19192:function(te,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return l.u}});var r=e(51016),t=e(21956),l=e(2546),u=e(1114),R=e(70335)},82250:function(te,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return o.DefaultTechDocsHome},TechDocsIndexPage:function(){return c.Jl},TechDocsReaderPage:function(){return c.I6},TechDocsReaderPageContent:function(){return R.Fq},TechDocsReaderPageHeader:function(){return R.SE},plugin:function(){return c.s4},techdocsPlugin:function(){return c.s4}});var r=e(98157),t=e.n(r);e.o(r,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return r.DefaultTechDocsHome}}),e.o(r,"TechDocsReaderPageContent")&&e.d(s,{TechDocsReaderPageContent:function(){return r.TechDocsReaderPageContent}}),e.o(r,"TechDocsReaderPageHeader")&&e.d(s,{TechDocsReaderPageHeader:function(){return r.TechDocsReaderPageHeader}});var l=e(3337),u=e(42723),R=e(96393),m=e(47861),o=e(19192),c=e(20961),f=e(94067)},20961:function(te,s,e){"use strict";e.d(s,{I6:function(){return y},Jl:function(){return f},s4:function(){return R}});var r=e(26136),t=e(42723),l=e(68725),u=e(36964);const R=(0,u.createPlugin)({id:"techdocs",apis:[(0,u.createApiFactory)({api:r.Dl,deps:{configApi:u.configApiRef,discoveryApi:u.discoveryApiRef,identityApi:u.identityApiRef,fetchApi:u.fetchApiRef},factory:({configApi:p,discoveryApi:E,identityApi:T,fetchApi:L})=>new t.k({configApi:p,discoveryApi:E,identityApi:T,fetchApi:L})}),(0,u.createApiFactory)({api:r.gT,deps:{configApi:u.configApiRef,discoveryApi:u.discoveryApiRef,fetchApi:u.fetchApiRef},factory:({configApi:p,discoveryApi:E,fetchApi:T})=>new t.p({configApi:p,discoveryApi:E,fetchApi:T})})],routes:{root:l._Z,docRoot:l.Fw,entityContent:l.pd}}),m=R.provide((0,u.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(p=>p.Router),mountPoint:l._Z})),o=R.provide((0,u.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(p=>p.EmbeddedDocsRouter),mountPoint:l.pd})),c=R.provide((0,u.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(p=>p.TechDocsCustomHome),mountPoint:l._Z})),f=R.provide((0,u.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(p=>p.TechDocsIndexPage),mountPoint:l._Z})),y=R.provide((0,u.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,26220)).then(p=>p.TechDocsReaderPage),mountPoint:l.Fw}))},26220:function(te,s,e){"use strict";e.r(s),e.d(s,{TechDocsReaderLayout:function(){return c},TechDocsReaderPage:function(){return f}});var r=e(2784),t=e(10289),l=e(82339),u=e(26136),R=e(63126),m=e(99954),o=e(16172);const c=({withSearch:y,withHeader:p=!0})=>r.createElement(l.Page,{themeId:"documentation"},p&&r.createElement(m.S,null),r.createElement(o.b,null),r.createElement(R.F,{withSearch:y})),f=y=>{const{kind:p,name:E,namespace:T}=(0,t.UO)(),{children:L,entityRef:M={kind:p,name:E,namespace:T}}=y,j=(0,t.pC)();if(!L){const b=(j?r.Children.toArray(j.props.children):[]).find(O=>{var U,Y;const{type:F}=O;return!((Y=(U=F==null?void 0:F.__backstage_data)==null?void 0:U.map)!=null&&Y.get(u.Zz))});return r.createElement(u.ZS,{entityRef:M},b||r.createElement(c,null))}return r.createElement(u.ZS,{entityRef:M},({metadata:w,entityMetadata:b,onReady:O})=>r.createElement(l.Page,{themeId:"documentation"},L instanceof Function?L({entityRef:M,techdocsMetadataValue:w.value,entityMetadataValue:b.value,onReady:O}):L))}},63126:function(te,s,e){"use strict";e.d(s,{F:function(){return xt}});var r=e(2784),t=e(79692),l=e(60905),u=e(26136),R=e(82339),m=e(47861),o=e(4614),c=e(77277),f=e(99688),y=e(12420),p=e(90436),E=e(61837),T=e(4190),L=e(87685);const M=(0,t.Z)(x=>(0,y.Z)({paper:{width:"100%",[x.breakpoints.up("sm")]:{width:"75%"},[x.breakpoints.up("md")]:{width:"50%"},padding:x.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:x.palette.background.default}})),j=({buildLog:x,onClose:re})=>{const ve=M(),be=x.length===0?"Waiting for logs...":x.join(`
|
|
32
|
-
`);return r.createElement(l.Z,{container:!0,direction:"column",className:ve.root,spacing:0,wrap:"nowrap"},r.createElement(l.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(p.Z,{variant:"h5"},"Build Details"),r.createElement(E.Z,{key:"dismiss",title:"Close the drawer",onClick:re,color:"inherit"},r.createElement(L.Z,null))),r.createElement(R.LogViewer,{text:be,classes:{root:ve.logs}}))},w=({buildLog:x})=>{const re=M(),[ve,be]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(c.Z,{color:"inherit",onClick:()=>be(!0)},"Show Build Logs"),r.createElement(T.ZP,{classes:{paper:re.paper},anchor:"right",open:ve,onClose:()=>be(!1)},r.createElement(j,{buildLog:x,onClose:()=>be(!1)})))};var b=e(36964);const O=({errorMessage:x})=>{const re=(0,b.useApi)(b.configApiRef).getOptionalString("techdocs.builder");let ve="";return re!=="local"&&(ve="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),r.createElement(R.ErrorPage,{status:"404",statusMessage:x||"Documentation not found",additionalInfo:ve})};var F=e(2263);const U=(0,t.Z)(x=>({root:{marginBottom:x.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),Y=()=>{let x=null;const re=U(),{state:ve,contentReload:be,contentErrorMessage:Ie,syncErrorMessage:Je,buildLog:lt}=(0,F.DK)();return ve==="INITIAL_BUILD"&&(x=r.createElement(f.Z,{classes:{root:re.root},variant:"outlined",severity:"info",icon:r.createElement(o.Z,{size:"24px"}),action:r.createElement(w,{buildLog:lt})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),ve==="CONTENT_STALE_REFRESHING"&&(x=r.createElement(f.Z,{variant:"outlined",severity:"info",icon:r.createElement(o.Z,{size:"24px"}),action:r.createElement(w,{buildLog:lt}),classes:{root:re.root}},"A newer version of this documentation is being prepared and will be available shortly.")),ve==="CONTENT_STALE_READY"&&(x=r.createElement(f.Z,{variant:"outlined",severity:"success",action:r.createElement(c.Z,{color:"inherit",onClick:()=>be()},"Refresh"),classes:{root:re.root}},"A newer version of this documentation is now available, please refresh to view.")),ve==="CONTENT_STALE_ERROR"&&(x=r.createElement(f.Z,{variant:"outlined",severity:"error",action:r.createElement(w,{buildLog:lt}),classes:{root:re.root,message:re.message}},"Building a newer version of this documentation failed."," ",Je)),ve==="CONTENT_NOT_FOUND"&&(x=r.createElement(r.Fragment,null,Je&&r.createElement(f.Z,{variant:"outlined",severity:"error",action:r.createElement(w,{buildLog:lt}),classes:{root:re.root,message:re.message}},"Building a newer version of this documentation failed."," ",Je),r.createElement(O,{errorMessage:Ie}))),x};var ne=e(10289),ue=e(60364),Re=e(41156),we=e(36356),ge=e(35368),ze=e.n(ge);const _e=/main\.[A-Fa-f0-9]{8}\.min\.css$/,et=/^https:\/\/fonts\.googleapis\.com/,it=/^https:\/\/fonts\.gstatic\.com/,St=x=>x.nodeName==="LINK",Et=x=>{const re=(x==null?void 0:x.getAttribute("href"))||"",ve=re.match(_e),be=re.match(et),Ie=re.match(it);return ve||be||Ie},Pe=x=>(St(x)&&!Et(x)&&x.remove(),x),pt=x=>x.nodeName==="IFRAME",Ge=(x,re)=>{const ve=x.getAttribute("src")||"";try{const{host:be}=new URL(ve);return re.includes(be)}catch{return!1}},ie=x=>re=>(pt(re)&&!Ge(re,x)&&re.remove(),re),de=()=>{const x=(0,b.useApi)(b.configApiRef);return(0,r.useMemo)(()=>x.getOptionalConfig("techdocs.sanitizer"),[x])},Ue=()=>{const x=de();return(0,r.useCallback)(async re=>{const ve=x==null?void 0:x.getOptionalStringArray("allowedIframeHosts");ze().addHook("beforeSanitizeElements",Pe);const be=["link"];return ve&&(be.push("iframe"),ze().addHook("beforeSanitizeElements",ie(ve))),ze().sanitize(re.innerHTML,{ADD_TAGS:be,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[x])};var Be=e(41128),Xe=({theme:x})=>`
|
|
33
|
-
/*================== Variables ==================*/
|
|
34
|
-
/*
|
|
35
|
-
As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.
|
|
36
|
-
As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
:host {
|
|
40
|
-
/* FONT */
|
|
41
|
-
--md-default-fg-color: ${x.palette.text.primary};
|
|
42
|
-
--md-default-fg-color--light: ${x.palette.text.secondary};
|
|
43
|
-
--md-default-fg-color--lighter: ${(0,Be.$n)(x.palette.text.secondary,.7)};
|
|
44
|
-
--md-default-fg-color--lightest: ${(0,Be.$n)(x.palette.text.secondary,.3)};
|
|
45
|
-
|
|
46
|
-
/* BACKGROUND */
|
|
47
|
-
--md-default-bg-color:${x.palette.background.default};
|
|
48
|
-
--md-default-bg-color--light: ${x.palette.background.paper};
|
|
49
|
-
--md-default-bg-color--lighter: ${(0,Be.$n)(x.palette.background.paper,.7)};
|
|
50
|
-
--md-default-bg-color--lightest: ${(0,Be.$n)(x.palette.background.paper,.3)};
|
|
51
|
-
|
|
52
|
-
/* PRIMARY */
|
|
53
|
-
--md-primary-fg-color: ${x.palette.primary.main};
|
|
54
|
-
--md-primary-fg-color--light: ${x.palette.primary.light};
|
|
55
|
-
--md-primary-fg-color--dark: ${x.palette.primary.dark};
|
|
56
|
-
--md-primary-bg-color: ${x.palette.primary.contrastText};
|
|
57
|
-
--md-primary-bg-color--light: ${(0,Be.$n)(x.palette.primary.contrastText,.7)};
|
|
58
|
-
|
|
59
|
-
/* ACCENT */
|
|
60
|
-
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
61
|
-
|
|
62
|
-
/* SHADOW */
|
|
63
|
-
--md-shadow-z1: ${x.shadows[1]};
|
|
64
|
-
--md-shadow-z2: ${x.shadows[2]};
|
|
65
|
-
--md-shadow-z3: ${x.shadows[3]};
|
|
66
|
-
|
|
67
|
-
/* EXTENSIONS */
|
|
68
|
-
--md-admonition-fg-color: var(--md-default-fg-color);
|
|
69
|
-
--md-admonition-bg-color: var(--md-default-bg-color);
|
|
70
|
-
/* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
|
|
71
|
-
--md-admonition-icon--note: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>');
|
|
72
|
-
--md-admonition-icon--abstract: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 5h16v2H4V5m0 4h16v2H4V9m0 4h16v2H4v-2m0 4h10v2H4v-2z"/></svg>');
|
|
73
|
-
--md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10A10 10 0 0012 2z"/></svg>');
|
|
74
|
-
--md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.55 11.2c-.23-.3-.5-.56-.76-.82-.65-.6-1.4-1.03-2.03-1.66C13.3 7.26 13 4.85 13.91 3c-.91.23-1.75.75-2.45 1.32-2.54 2.08-3.54 5.75-2.34 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.22.1-.46.04-.64-.12a.83.83 0 01-.15-.17c-1.1-1.43-1.28-3.48-.53-5.12C5.89 10 5 12.3 5.14 14.47c.04.5.1 1 .27 1.5.14.6.4 1.2.72 1.73 1.04 1.73 2.87 2.97 4.84 3.22 2.1.27 4.35-.12 5.96-1.6 1.8-1.66 2.45-4.32 1.5-6.6l-.13-.26c-.2-.46-.47-.87-.8-1.25l.05-.01m-3.1 6.3c-.28.24-.73.5-1.08.6-1.1.4-2.2-.16-2.87-.82 1.19-.28 1.89-1.16 2.09-2.05.17-.8-.14-1.46-.27-2.23-.12-.74-.1-1.37.18-2.06.17.38.37.76.6 1.06.76 1 1.95 1.44 2.2 2.8.04.14.06.28.06.43.03.82-.32 1.72-.92 2.27h.01z"/></svg>');
|
|
75
|
-
--md-admonition-icon--success: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
76
|
-
--md-admonition-icon--question: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.07 11.25l-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 00-2-2 2 2 0 00-2 2H8a4 4 0 014-4 4 4 0 014 4 3.2 3.2 0 01-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10c0-5.53-4.5-10-10-10z"/></svg>');
|
|
77
|
-
--md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z"/></svg>');
|
|
78
|
-
--md-admonition-icon--failure: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12 6.47 2 12 2m3.59 5L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41 15.59 7z"/></svg>');
|
|
79
|
-
--md-admonition-icon--danger: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.5 20l4.86-9.73H13V4l-5 9.73h3.5V20M12 2c2.75 0 5.1 1 7.05 2.95C21 6.9 22 9.25 22 12s-1 5.1-2.95 7.05C17.1 21 14.75 22 12 22s-5.1-1-7.05-2.95C3 17.1 2 14.75 2 12s1-5.1 2.95-7.05C6.9 3 9.25 2 12 2z"/></svg>');
|
|
80
|
-
--md-admonition-icon--bug: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 00-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 00-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z"/></svg>');
|
|
81
|
-
--md-admonition-icon--example: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 01.75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z"/></svg>');
|
|
82
|
-
--md-admonition-icon--quote: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z"/></svg>');
|
|
83
|
-
--md-footnotes-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.42L5.83 13H21V7h-2z"/></svg>');
|
|
84
|
-
--md-details-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
85
|
-
--md-tasklist-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>');
|
|
86
|
-
--md-tasklist-icon--checked: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
87
|
-
--md-nav-icon--prev: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>');
|
|
88
|
-
--md-nav-icon--next: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
89
|
-
--md-toc-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>');
|
|
90
|
-
--md-clipboard-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1z"/></svg>');
|
|
91
|
-
--md-search-result-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7c-.41-.25-.8-.56-1.14-.9-.33-.33-.61-.7-.86-1.1H6V4h7v5h5v1.18c.71.16 1.39.43 2 .82V8l-6-6m6.31 16.9c1.33-2.11.69-4.9-1.4-6.22-2.11-1.33-4.91-.68-6.22 1.4-1.34 2.11-.69 4.89 1.4 6.22 1.46.93 3.32.93 4.79.02L22 23.39 23.39 22l-3.08-3.1m-3.81.1a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5z"/></svg>');
|
|
92
|
-
--md-source-forks-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 2.122a2.25 2.25 0 1 0-1.5 0v.878A2.25 2.25 0 0 0 5.75 8.5h1.5v2.128a2.251 2.251 0 1 0 1.5 0V8.5h1.5a2.25 2.25 0 0 0 2.25-2.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75h-4.5A.75.75 0 0 1 5 6.25v-.878zm3.75 7.378a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm3-8.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z"/></svg>');
|
|
93
|
-
--md-source-repositories-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 1 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 0 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 0 1 1-1h8zM5 12.25v3.25a.25.25 0 0 0 .4.2l1.45-1.087a.25.25 0 0 1 .3 0L8.6 15.7a.25.25 0 0 0 .4-.2v-3.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25z"/></svg>');
|
|
94
|
-
--md-source-stars-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694v.001z"/></svg>');
|
|
95
|
-
--md-source-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 0 1 .25-.25h5.025a.25.25 0 0 1 .177.073l6.25 6.25a.25.25 0 0 1 0 .354l-5.025 5.025a.25.25 0 0 1-.354 0l-6.25-6.25a.25.25 0 0 1-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775zM6 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>');
|
|
96
|
-
--md-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="m310.6 246.6-127.1 128c-7.1 6.3-15.3 9.4-23.5 9.4s-16.38-3.125-22.63-9.375l-127.1-128C.224 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75s3.12 25.75-6.08 34.85z"/></svg>');
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
:host > * {
|
|
100
|
-
/* CODE */
|
|
101
|
-
--md-code-fg-color: ${x.palette.text.primary};
|
|
102
|
-
--md-code-bg-color: ${x.palette.background.paper};
|
|
103
|
-
--md-code-hl-color: ${(0,Be.Fq)(x.palette.warning.main,.5)};
|
|
104
|
-
--md-code-hl-keyword-color: ${x.palette.type==="dark"?x.palette.primary.light:x.palette.primary.dark};
|
|
105
|
-
--md-code-hl-function-color: ${x.palette.type==="dark"?x.palette.secondary.light:x.palette.secondary.dark};
|
|
106
|
-
--md-code-hl-string-color: ${x.palette.type==="dark"?x.palette.success.light:x.palette.success.dark};
|
|
107
|
-
--md-code-hl-number-color: ${x.palette.type==="dark"?x.palette.error.light:x.palette.error.dark};
|
|
108
|
-
--md-code-hl-constant-color: var(--md-code-hl-function-color);
|
|
109
|
-
--md-code-hl-special-color: var(--md-code-hl-function-color);
|
|
110
|
-
--md-code-hl-name-color: var(--md-code-fg-color);
|
|
111
|
-
--md-code-hl-comment-color: var(--md-default-fg-color--light);
|
|
112
|
-
--md-code-hl-generic-color: var(--md-default-fg-color--light);
|
|
113
|
-
--md-code-hl-variable-color: var(--md-default-fg-color--light);
|
|
114
|
-
--md-code-hl-operator-color: var(--md-default-fg-color--light);
|
|
115
|
-
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
|
|
116
|
-
|
|
117
|
-
/* TYPESET */
|
|
118
|
-
--md-typeset-font-size: 1rem;
|
|
119
|
-
--md-typeset-color: var(--md-default-fg-color);
|
|
120
|
-
--md-typeset-a-color: var(--md-accent-fg-color);
|
|
121
|
-
--md-typeset-table-color: ${x.palette.text.primary};
|
|
122
|
-
--md-typeset-del-color: ${x.palette.type==="dark"?(0,Be.Fq)(x.palette.error.dark,.5):(0,Be.Fq)(x.palette.error.light,.5)};
|
|
123
|
-
--md-typeset-ins-color: ${x.palette.type==="dark"?(0,Be.Fq)(x.palette.success.dark,.5):(0,Be.Fq)(x.palette.success.light,.5)};
|
|
124
|
-
--md-typeset-mark-color: ${x.palette.type==="dark"?(0,Be.Fq)(x.palette.warning.dark,.5):(0,Be.Fq)(x.palette.warning.light,.5)};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
@media screen and (max-width: 76.1875em) {
|
|
128
|
-
:host > * {
|
|
129
|
-
/* TYPESET */
|
|
130
|
-
--md-typeset-font-size: .9rem;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
@media screen and (max-width: 600px) {
|
|
135
|
-
:host > * {
|
|
136
|
-
/* TYPESET */
|
|
137
|
-
--md-typeset-font-size: .7rem;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
`,ht=({theme:x})=>`
|
|
141
|
-
/*================== Reset ==================*/
|
|
142
|
-
|
|
143
|
-
body {
|
|
144
|
-
--md-text-color: var(--md-default-fg-color);
|
|
145
|
-
--md-text-link-color: var(--md-accent-fg-color);
|
|
146
|
-
--md-text-font-family: ${x.typography.fontFamily};
|
|
147
|
-
font-family: var(--md-text-font-family);
|
|
148
|
-
background-color: unset;
|
|
149
|
-
}
|
|
150
|
-
`,ke=({theme:x,sidebar:re})=>`
|
|
151
|
-
/*================== Layout ==================*/
|
|
152
|
-
|
|
153
|
-
.md-grid {
|
|
154
|
-
max-width: 100%;
|
|
155
|
-
margin: 0;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.md-nav {
|
|
159
|
-
font-size: calc(var(--md-typeset-font-size) * 0.9);
|
|
160
|
-
}
|
|
161
|
-
.md-nav__link {
|
|
162
|
-
display: flex;
|
|
163
|
-
align-items: center;
|
|
164
|
-
justify-content: space-between;
|
|
165
|
-
}
|
|
166
|
-
.md-nav__icon {
|
|
167
|
-
height: 20px !important;
|
|
168
|
-
width: 20px !important;
|
|
169
|
-
margin-left:${x.spacing(1)}px;
|
|
170
|
-
}
|
|
171
|
-
.md-nav__icon svg {
|
|
172
|
-
margin: 0;
|
|
173
|
-
width: 20px !important;
|
|
174
|
-
height: 20px !important;
|
|
175
|
-
}
|
|
176
|
-
.md-nav__icon:after {
|
|
177
|
-
width: 20px !important;
|
|
178
|
-
height: 20px !important;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.md-main__inner {
|
|
182
|
-
margin-top: 0;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.md-sidebar {
|
|
186
|
-
bottom: 75px;
|
|
187
|
-
position: fixed;
|
|
188
|
-
width: 16rem;
|
|
189
|
-
overflow-y: auto;
|
|
190
|
-
overflow-x: hidden;
|
|
191
|
-
scrollbar-color: rgb(193, 193, 193) #eee;
|
|
192
|
-
scrollbar-width: thin;
|
|
193
|
-
}
|
|
194
|
-
.md-sidebar .md-sidebar__scrollwrap {
|
|
195
|
-
width: calc(16rem - 10px);
|
|
196
|
-
}
|
|
197
|
-
.md-sidebar--secondary {
|
|
198
|
-
right: ${x.spacing(3)}px;
|
|
199
|
-
}
|
|
200
|
-
.md-sidebar::-webkit-scrollbar {
|
|
201
|
-
width: 5px;
|
|
202
|
-
}
|
|
203
|
-
.md-sidebar::-webkit-scrollbar-button {
|
|
204
|
-
width: 5px;
|
|
205
|
-
height: 5px;
|
|
206
|
-
}
|
|
207
|
-
.md-sidebar::-webkit-scrollbar-track {
|
|
208
|
-
background: #eee;
|
|
209
|
-
border: 1 px solid rgb(250, 250, 250);
|
|
210
|
-
box-shadow: 0px 0px 3px #dfdfdf inset;
|
|
211
|
-
border-radius: 3px;
|
|
212
|
-
}
|
|
213
|
-
.md-sidebar::-webkit-scrollbar-thumb {
|
|
214
|
-
width: 5px;
|
|
215
|
-
background: rgb(193, 193, 193);
|
|
216
|
-
border: transparent;
|
|
217
|
-
border-radius: 3px;
|
|
218
|
-
}
|
|
219
|
-
.md-sidebar::-webkit-scrollbar-thumb:hover {
|
|
220
|
-
background: rgb(125, 125, 125);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.md-content {
|
|
224
|
-
max-width: calc(100% - 16rem * 2);
|
|
225
|
-
margin-left: 16rem;
|
|
226
|
-
margin-bottom: 50px;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.md-footer {
|
|
230
|
-
position: fixed;
|
|
231
|
-
bottom: 0px;
|
|
232
|
-
}
|
|
233
|
-
.md-footer__title {
|
|
234
|
-
background-color: unset;
|
|
235
|
-
}
|
|
236
|
-
.md-footer-nav__link {
|
|
237
|
-
width: 16rem;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.md-dialog {
|
|
241
|
-
background-color: unset;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
@media screen and (min-width: 76.25em) {
|
|
245
|
-
.md-sidebar {
|
|
246
|
-
height: auto;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
@media screen and (max-width: 76.1875em) {
|
|
251
|
-
.md-nav {
|
|
252
|
-
transition: none !important;
|
|
253
|
-
background-color: var(--md-default-bg-color)
|
|
254
|
-
}
|
|
255
|
-
.md-nav--primary .md-nav__title {
|
|
256
|
-
cursor: auto;
|
|
257
|
-
color: var(--md-default-fg-color);
|
|
258
|
-
font-weight: 700;
|
|
259
|
-
white-space: normal;
|
|
260
|
-
line-height: 1rem;
|
|
261
|
-
height: auto;
|
|
262
|
-
display: flex;
|
|
263
|
-
flex-flow: column;
|
|
264
|
-
row-gap: 1.6rem;
|
|
265
|
-
padding: 1.2rem .8rem .8rem;
|
|
266
|
-
background-color: var(--md-default-bg-color);
|
|
267
|
-
}
|
|
268
|
-
.md-nav--primary .md-nav__title~.md-nav__list {
|
|
269
|
-
box-shadow: none;
|
|
270
|
-
}
|
|
271
|
-
.md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
|
|
272
|
-
border-top: none;
|
|
273
|
-
}
|
|
274
|
-
.md-nav--primary .md-nav__title .md-nav__button {
|
|
275
|
-
display: none;
|
|
276
|
-
}
|
|
277
|
-
.md-nav--primary .md-nav__title .md-nav__icon {
|
|
278
|
-
color: var(--md-default-fg-color);
|
|
279
|
-
position: static;
|
|
280
|
-
height: auto;
|
|
281
|
-
margin: 0 0 0 -0.2rem;
|
|
282
|
-
}
|
|
283
|
-
.md-nav--primary > .md-nav__title [for="none"] {
|
|
284
|
-
padding-top: 0;
|
|
285
|
-
}
|
|
286
|
-
.md-nav--primary .md-nav__item {
|
|
287
|
-
border-top: none;
|
|
288
|
-
}
|
|
289
|
-
.md-nav--primary :is(.md-nav__title,.md-nav__item) {
|
|
290
|
-
font-size : var(--md-typeset-font-size);
|
|
291
|
-
}
|
|
292
|
-
.md-nav .md-source {
|
|
293
|
-
display: none;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
.md-sidebar {
|
|
297
|
-
height: 100%;
|
|
298
|
-
}
|
|
299
|
-
.md-sidebar--primary {
|
|
300
|
-
width: 12.1rem !important;
|
|
301
|
-
z-index: 200;
|
|
302
|
-
left: ${re.isPinned?"calc(-12.1rem + 242px)":"calc(-12.1rem + 72px)"} !important;
|
|
303
|
-
}
|
|
304
|
-
.md-sidebar--secondary:not([hidden]) {
|
|
305
|
-
display: none;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
.md-content {
|
|
309
|
-
max-width: 100%;
|
|
310
|
-
margin-left: 0;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.md-header__button {
|
|
314
|
-
margin: 0.4rem 0;
|
|
315
|
-
margin-left: 0.4rem;
|
|
316
|
-
padding: 0;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
.md-overlay {
|
|
320
|
-
left: 0;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
.md-footer {
|
|
324
|
-
position: static;
|
|
325
|
-
padding-left: 0;
|
|
326
|
-
}
|
|
327
|
-
.md-footer-nav__link {
|
|
328
|
-
/* footer links begin to overlap at small sizes without setting width */
|
|
329
|
-
width: 50%;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
@media screen and (max-width: 600px) {
|
|
334
|
-
.md-sidebar--primary {
|
|
335
|
-
left: -12.1rem !important;
|
|
336
|
-
width: 12.1rem;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
`;const vt=["h1","h2","h3","h4","h5","h6"];var oe=({theme:x})=>`
|
|
340
|
-
/*================== Typeset ==================*/
|
|
341
|
-
|
|
342
|
-
.md-typeset {
|
|
343
|
-
font-size: var(--md-typeset-font-size);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
${vt.reduce((re,ve)=>{var $t;const be=($t=x.typography.htmlFontSize)!=null?$t:16,Ie=x.typography[ve],{lineHeight:Je,fontFamily:lt,fontWeight:Vt,fontSize:Gt}=Ie,wt=ot=>{let Dt=1;return typeof ot=="number"&&(Dt=ot/be),typeof ot=="string"&&(Dt=ot.replace("rem","")),`calc(${Dt} * var(--md-typeset-font-size))`};return re.concat(`
|
|
347
|
-
.md-typeset ${ve} {
|
|
348
|
-
color: var(--md-default-fg-color);
|
|
349
|
-
line-height: ${Je};
|
|
350
|
-
font-family: ${lt};
|
|
351
|
-
font-weight: ${Vt};
|
|
352
|
-
font-size: ${wt(Gt)};
|
|
353
|
-
}
|
|
354
|
-
`)},"")}
|
|
355
|
-
|
|
356
|
-
.md-typeset .md-content__button {
|
|
357
|
-
color: var(--md-default-fg-color);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
.md-typeset hr {
|
|
361
|
-
border-bottom: 0.05rem dotted ${x.palette.divider};
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
.md-typeset details {
|
|
365
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
366
|
-
}
|
|
367
|
-
.md-typeset details summary {
|
|
368
|
-
padding-left: 2.5rem !important;
|
|
369
|
-
}
|
|
370
|
-
.md-typeset details summary:before,
|
|
371
|
-
.md-typeset details summary:after {
|
|
372
|
-
top: 50% !important;
|
|
373
|
-
width: 20px !important;
|
|
374
|
-
height: 20px !important;
|
|
375
|
-
transform: rotate(0deg) translateY(-50%) !important;
|
|
376
|
-
}
|
|
377
|
-
.md-typeset details[open] > summary:after {
|
|
378
|
-
transform: rotate(90deg) translateX(-50%) !important;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.md-typeset blockquote {
|
|
382
|
-
color: var(--md-default-fg-color--light);
|
|
383
|
-
border-left: 0.2rem solid var(--md-default-fg-color--light);
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.md-typeset table:not([class]) {
|
|
387
|
-
font-size: var(--md-typeset-font-size);
|
|
388
|
-
border: 1px solid var(--md-default-fg-color);
|
|
389
|
-
border-bottom: none;
|
|
390
|
-
border-collapse: collapse;
|
|
391
|
-
}
|
|
392
|
-
.md-typeset table:not([class]) th {
|
|
393
|
-
font-weight: bold;
|
|
394
|
-
}
|
|
395
|
-
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
|
|
396
|
-
border-bottom: 1px solid var(--md-default-fg-color);
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb {
|
|
400
|
-
background-color: hsla(0, 0%, 0%, 0.32);
|
|
401
|
-
}
|
|
402
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
403
|
-
background-color: hsla(0, 0%, 0%, 0.87);
|
|
404
|
-
}
|
|
405
|
-
`,fe=()=>`
|
|
406
|
-
/*================== Animations ==================*/
|
|
407
|
-
/*
|
|
408
|
-
Disable CSS animations on link colors as they lead to issues in dark mode.
|
|
409
|
-
The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
|
|
410
|
-
*/
|
|
411
|
-
.md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
412
|
-
transition: none;
|
|
413
|
-
}
|
|
414
|
-
`,tt=({theme:x})=>`
|
|
415
|
-
/*================== Extensions ==================*/
|
|
416
|
-
|
|
417
|
-
/* HIGHLIGHT */
|
|
418
|
-
.highlight .md-clipboard:after {
|
|
419
|
-
content: unset;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
.highlight .nx {
|
|
423
|
-
color: ${x.palette.type==="dark"?"#ff53a3":"#ec407a"};
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
/* CODE HILITE */
|
|
427
|
-
.codehilite .gd {
|
|
428
|
-
background-color: ${x.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
.codehilite .gi {
|
|
432
|
-
background-color: ${x.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
/* TABBED */
|
|
436
|
-
.tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
|
|
437
|
-
.tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
|
|
438
|
-
.tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
|
|
439
|
-
.tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
|
|
440
|
-
.tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
|
|
441
|
-
.tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
|
|
442
|
-
.tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
|
|
443
|
-
.tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
|
|
444
|
-
.tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
|
|
445
|
-
.tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
|
|
446
|
-
.tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
|
|
447
|
-
.tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
|
|
448
|
-
.tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
|
|
449
|
-
.tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
|
|
450
|
-
.tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
|
|
451
|
-
.tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
|
|
452
|
-
.tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
|
|
453
|
-
.tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
|
|
454
|
-
.tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
|
|
455
|
-
.tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
|
|
456
|
-
color: var(--md-accent-fg-color);
|
|
457
|
-
border-color: var(--md-accent-fg-color);
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
/* TASK-LIST */
|
|
461
|
-
.task-list-control .task-list-indicator::before {
|
|
462
|
-
background-color: ${x.palette.action.disabledBackground};
|
|
463
|
-
}
|
|
464
|
-
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
465
|
-
background-color: ${x.palette.success.main};
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
/* ADMONITION */
|
|
469
|
-
.admonition {
|
|
470
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
471
|
-
}
|
|
472
|
-
.admonition .admonition-title {
|
|
473
|
-
padding-left: 2.5rem !important;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
.admonition .admonition-title:before {
|
|
477
|
-
top: 50% !important;
|
|
478
|
-
width: 20px !important;
|
|
479
|
-
height: 20px !important;
|
|
480
|
-
transform: translateY(-50%) !important;
|
|
481
|
-
}
|
|
482
|
-
`;const Ye=[Xe,ht,ke,oe,fe,tt],Ne=()=>(0,R.useSidebarPinState)(),ut=()=>{const x=Ne(),re=(0,ue.Z)();return(0,r.useMemo)(()=>{const ve={theme:re,sidebar:x};return Ye.reduce((be,Ie)=>be+Ie(ve),"")},[re,x])},X=()=>{const x=ut();return(0,r.useCallback)(re=>(re.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${x}</style>`),re),[x])},Z=(x,re,ve)=>{const be=x==="src"&&re.endsWith(".svg"),Ie=!re.match(/^([a-z]*:)?\/\//i),Je=re.startsWith(ve);return be&&(Ie||Je)},Q=({techdocsStorageApi:x,entityId:re,path:ve})=>async be=>{const Ie=await x.getApiOrigin(),Je=async(lt,Vt)=>{for(const Gt of lt)if(Gt.hasAttribute(Vt)){const wt=Gt.getAttribute(Vt);if(!wt)return;const $t=await x.getBaseUrl(wt,re,ve);if(Z(Vt,wt,Ie))try{const Dt=await(await fetch($t,{credentials:"include"})).text();Gt.setAttribute(Vt,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Dt)))}`)}catch{Gt.setAttribute("alt",`Error: ${wt}`)}else Gt.setAttribute(Vt,$t)}};return await Promise.all([Je(be.querySelectorAll("img"),"src"),Je(be.querySelectorAll("script"),"src"),Je(be.querySelectorAll("source"),"src"),Je(be.querySelectorAll("link"),"href"),Je(be.querySelectorAll("a[download]"),"href")]),be};var se=e(68370),ce=e(67097),Ce=e(47093),Le=e(82717),Ae=e.n(Le);const Ke=x=>re=>{var Dt;const ve=re.querySelector('[title="Edit this page"]');if(!ve||!ve.href)return re;const be=new URL(ve.href),Ie=x.byUrl(be);if((Ie==null?void 0:Ie.type)!=="github"&&(Ie==null?void 0:Ie.type)!=="gitlab")return re;const Je=((Dt=re.querySelector("article>h1"))==null?void 0:Dt.childNodes[0].textContent)||"",lt=encodeURIComponent(`Documentation Feedback: ${Je}`),Vt=encodeURIComponent(`Page source:
|
|
483
|
-
${ve.href}
|
|
484
|
-
|
|
485
|
-
Feedback:`),Gt=(Ie==null?void 0:Ie.type)==="github"?(0,se.Pb)(be.href,"blob"):be.href,wt=Ae()(Gt),$t=`/${wt.organization}/${wt.name}`,ot=ve.cloneNode();switch(Ie==null?void 0:Ie.type){case"gitlab":ot.href=`${be.origin}${$t}/issues/new?issue[title]=${lt}&issue[description]=${Vt}`;break;case"github":ot.href=`${be.origin}${$t}/issues/new?title=${lt}&body=${Vt}`;break;default:return re}return Ce.render(r.createElement(ce.Z),ot),ot.style.paddingLeft="5px",ot.title="Leave feedback for this page",ot.id="git-feedback-link",ve==null||ve.insertAdjacentElement("beforebegin",ot),re};var je=e(44882);const gt=()=>x=>{const re=x.querySelector('.md-header label[for="__drawer"]'),ve=x.querySelector("article");if(!re||!ve)return x;const be=re.cloneNode();return Ce.render(r.createElement(je.Z),be),be.id="toggle-sidebar",be.title="Toggle Sidebar",be.classList.add("md-content__button"),be.style.setProperty("padding","0 0 0 5px"),be.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),ve==null||ve.prepend(be),x},Ct=()=>x=>(((ve,be)=>{Array.from(ve).filter(Ie=>Ie.hasAttribute(be)).forEach(Ie=>{const Je=Ie.getAttribute(be);if(Je){Je.match(/^https?:\/\//i)&&Ie.setAttribute("target","_blank");try{const lt=dt(window.location.href);Ie.setAttribute(be,new URL(Je,lt).toString())}catch{Ie.replaceWith(Ie.textContent||Je)}}})})(Array.from(x.getElementsByTagName("a")),"href"),x);function dt(x){const re=new URL(x);return!re.pathname.endsWith("/")&&!re.pathname.endsWith(".html")&&(re.pathname+="/"),re.toString()}const Rt=({baseUrl:x,onClick:re})=>ve=>(Array.from(ve.getElementsByTagName("a")).forEach(be=>{be.addEventListener("click",Ie=>{const lt=be.getAttribute("href");!lt||lt.startsWith(x)&&!be.hasAttribute("download")&&(Ie.preventDefault(),re(Ie,lt))})}),ve);var bt=e(15459),Lt=e(80030),Pt=e(72379),Nt=e(41547);const At=(0,bt.Z)(x=>({tooltip:{fontSize:"inherit",color:x.palette.text.primary,margin:0,padding:x.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Lt.ZP),at=()=>r.createElement(Pt.Z,null,r.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})),Zn=({text:x})=>{const[re,ve]=(0,r.useState)(!1),be=(0,r.useCallback)(()=>{navigator.clipboard.writeText(x),ve(!0)},[x]),Ie=(0,r.useCallback)(()=>{ve(!1)},[ve]);return r.createElement(At,{title:"Copied to clipboard",placement:"left",open:re,onClose:Ie,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:be},r.createElement(at,null)))},_=x=>re=>{var be;const ve=re.querySelectorAll("pre > code");for(const Ie of ve){const Je=Ie.textContent||"",lt=document.createElement("div");(be=Ie==null?void 0:Ie.parentElement)==null||be.prepend(lt),Ce.render(r.createElement(Nt.Z,{theme:x},r.createElement(Zn,{text:Je})),lt)}return re},V=()=>x=>{var re;return(re=x.querySelector(".md-header"))==null||re.remove(),x},ye=()=>x=>{var re,ve;return(re=x.querySelector(".md-footer .md-copyright"))==null||re.remove(),(ve=x.querySelector(".md-footer-copyright"))==null||ve.remove(),x},We=({onLoading:x,onLoaded:re})=>ve=>(x(),ve.addEventListener(u.Ox,function be(){re(),ve.removeEventListener(u.Ox,be)}),ve),qe=()=>x=>(setTimeout(()=>{var re;if(window.location.hash){const ve=window.location.hash.slice(1);(re=x==null?void 0:x.querySelector(`[id="${ve}"]`))==null||re.scrollIntoView()}},200),x),nt=async(x,re)=>{let ve;if(typeof x=="string")ve=new DOMParser().parseFromString(x,"text/html").documentElement;else if(x instanceof Element)ve=x;else throw new Error("dom is not a recognized type");for(const be of re)ve=await be(ve);return ve},Tt="screen and (max-width: 76.1875em)",Ut=x=>{const re=(0,ne.s0)(),ve=(0,ue.Z)(),be=(0,Re.Z)(Tt),Ie=Ue(),Je=X(),lt=(0,b.useApi)(u.Dl),Vt=(0,b.useApi)(we.q3),{state:Gt,path:wt,content:$t}=(0,F.DK)(),[ot,Dt]=(0,r.useState)(null),_t=(0,u.ux)(ot),Zt=(0,r.useCallback)(()=>{if(!ot)return;ot.querySelectorAll(".md-sidebar").forEach(Ot=>{var mn,yn;if(be)Ot.style.top="0px";else{const rn=(mn=ot.getBoundingClientRect().top)!=null?mn:0,hn=ot.querySelector(".md-container > .md-tabs"),xn=(yn=hn==null?void 0:hn.getBoundingClientRect().height)!=null?yn:0;Ot.style.top=`${Math.max(rn,0)+xn}px`}Ot.style.setProperty("opacity","1")})},[ot,be]);(0,r.useEffect)(()=>(window.addEventListener("resize",Zt),window.addEventListener("scroll",Zt,!0),()=>{window.removeEventListener("resize",Zt),window.removeEventListener("scroll",Zt,!0)}),[ot,Zt]);const zt=(0,r.useCallback)(()=>{if(!ot)return;const Kt=ot.querySelector(".md-footer");Kt&&(Kt.style.width=`${ot.getBoundingClientRect().width}px`)},[ot]);(0,r.useEffect)(()=>(window.addEventListener("resize",zt),()=>{window.removeEventListener("resize",zt)}),[ot,zt]),(0,r.useEffect)(()=>{_t||(zt(),Zt())},[Gt,_t,zt,Zt]);const nn=(0,r.useCallback)((Kt,Ot)=>nt(Kt,[Ie,Q({techdocsStorageApi:lt,entityId:x,path:Ot}),Ct(),gt(),V(),ye(),Ke(Vt),Je]),[x,Vt,lt,Ie,Je]),Sn=(0,r.useCallback)(async Kt=>nt(Kt,[qe(),_(ve),Rt({baseUrl:window.location.origin,onClick:(Ot,mn)=>{var hn;const yn=Ot.ctrlKey||Ot.metaKey,rn=new URL(mn);rn.hash?yn?window.open(`${rn.pathname}${rn.hash}`,"_blank"):(re(`${rn.pathname}${rn.hash}`),(hn=Kt==null?void 0:Kt.querySelector(`#${rn.hash.slice(1)}`))==null||hn.scrollIntoView()):yn?window.open(rn.pathname,"_blank"):re(rn.pathname)}}),We({onLoading:()=>{},onLoaded:()=>{var Ot;(Ot=Kt.querySelector(".md-nav__title"))==null||Ot.removeAttribute("for")}}),We({onLoading:()=>{Array.from(Kt.querySelectorAll(".md-sidebar")).forEach(mn=>{mn.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[ve,re]);return(0,r.useEffect)(()=>{if(!$t)return()=>{};let Kt=!0;return nn($t,wt).then(async Ot=>{if(!(Ot!=null&&Ot.innerHTML)||!Kt)return;window.scroll({top:0});const mn=await Sn(Ot);Dt(mn)}),()=>{Kt=!1}},[$t,wt,nn,Sn]),ot};var Xt=e(8560);const cn=()=>{const x=(0,u.$L)(),{shadowRoot:re}=(0,u.x1)(),ve=re==null?void 0:re.querySelector('[data-md-component="content"]'),be=re==null?void 0:re.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let Ie=be==null?void 0:be.querySelector('[data-techdocs-addons-location="primary sidebar"]');Ie||(Ie=document.createElement("div"),Ie.setAttribute("data-techdocs-addons-location","primary sidebar"),be==null||be.prepend(Ie));const Je=re==null?void 0:re.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let lt=Je==null?void 0:Je.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return lt||(lt=document.createElement("div"),lt.setAttribute("data-techdocs-addons-location","secondary sidebar"),Je==null||Je.prepend(lt)),r.createElement(r.Fragment,null,r.createElement(Xt.Z,{container:Ie},x.renderComponentsByLocation(u.oZ.PrimarySidebar)),r.createElement(Xt.Z,{container:ve},x.renderComponentsByLocation(u.oZ.Content)),r.createElement(Xt.Z,{container:lt},x.renderComponentsByLocation(u.oZ.SecondarySidebar)))},un=(0,t.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),xt=(0,F.m1)(x=>{var $t;const{withSearch:re=!0,onReady:ve}=x,be=un(),{entityMetadata:{value:Ie,loading:Je},entityRef:lt,setShadowRoot:Vt}=(0,u.x1)(),Gt=Ut(lt),wt=(0,r.useCallback)(ot=>{Vt(ot),ve instanceof Function&&ve()},[Vt,ve]);return Je===!1&&!Ie?r.createElement(R.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}):Gt?r.createElement(R.Content,null,r.createElement(l.Z,{container:!0},r.createElement(l.Z,{xs:12,item:!0},r.createElement(Y,null)),re&&r.createElement(l.Z,{className:be.search,xs:"auto",item:!0},r.createElement(m.S,{entityId:lt,entityTitle:($t=Ie==null?void 0:Ie.metadata)==null?void 0:$t.title})),r.createElement(l.Z,{xs:12,item:!0},r.createElement(u.VA,{element:Gt,onAppend:wt},r.createElement(cn,null))))):r.createElement(R.Content,null,r.createElement(l.Z,{container:!0},r.createElement(l.Z,{xs:12,item:!0},r.createElement(Y,null))))}),fn=null},99954:function(te,s,e){"use strict";e.d(s,{S:function(){return E}});var r=e(2784),t=e(18671),l=e(98069),u=e(73250),R=e(26136),m=e(53479),o=e(48023),c=e(82339),f=e(36964),y=e(68725);const p=r.createElement(l.Z,{animation:"wave",variant:"text",height:40}),E=T=>{const{children:L}=T,M=(0,R.$L)(),j=(0,f.useApi)(f.configApiRef),{title:w,setTitle:b,subtitle:O,setSubtitle:F,entityRef:U,metadata:{value:Y,loading:ne},entityMetadata:{value:ue,loading:Re}}=(0,R.x1)();(0,r.useEffect)(()=>{!Y||(b(Ge=>{const{site_name:ie}=Y;return Ge||ie}),F(Ge=>{let{site_description:ie}=Y;return(!ie||ie==="None")&&(ie="Home"),Ge||ie}))},[Y,b,F]);const we=j.getOptional("app.title")||"Backstage",ge=[w,O,we].filter(Boolean).join(" | "),{locationMetadata:ze,spec:_e}=ue||{},et=_e==null?void 0:_e.lifecycle,it=ue?(0,m.getEntityRelations)(ue,o.S4):[],St=(0,f.useRouteRef)(y._Z)(),Et=r.createElement(r.Fragment,null,r.createElement(c.HeaderLabel,{label:"Component",value:r.createElement(m.EntityRefLink,{color:"inherit",entityRef:U,title:ue==null?void 0:ue.metadata.title,defaultKind:"Component"})}),it.length>0&&r.createElement(c.HeaderLabel,{label:"Owner",value:r.createElement(m.EntityRefLinks,{color:"inherit",entityRefs:it,defaultKind:"group"})}),et?r.createElement(c.HeaderLabel,{label:"Lifecycle",value:et}):null,ze&&ze.type!=="dir"&&ze.type!=="file"?r.createElement(c.HeaderLabel,{label:"",value:r.createElement("a",{href:ze.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(u.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return!Re&&ue===void 0||!ne&&Y===void 0?null:r.createElement(c.Header,{type:"Documentation",typeLink:St,title:w||p,subtitle:O||p},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,ge)),Et,L,M.renderComponentsByLocation(R.oZ.Header))}},16172:function(te,s,e){"use strict";e.d(s,{b:function(){return p}});var r=e(2784),t=e(79692),l=e(15223),u=e(95544),R=e(80030),m=e(61837),o=e(48348),c=e(47603),f=e(26136);const y=(0,t.Z)(E=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:E.spacing(3,3,0)}})),p=({toolbarProps:E})=>{const T=y(),[L,M]=(0,r.useState)(null),j=(0,r.useCallback)(ne=>{M(ne.currentTarget)},[]),w=(0,r.useCallback)(()=>{M(null)},[]),{entityMetadata:{value:b,loading:O}}=(0,f.x1)(),F=(0,f.$L)(),U=F.renderComponentsByLocation(f.oZ.Subheader),Y=F.renderComponentsByLocation(f.oZ.Settings);return!U&&!Y||O===!1&&!b?null:r.createElement(l.Z,{classes:T,...E},r.createElement(u.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},U,Y?r.createElement(r.Fragment,null,r.createElement(R.ZP,{title:"Settings"},r.createElement(m.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:j},r.createElement(c.Z,null))),r.createElement(o.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:L,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(L),onClose:w,keepMounted:!0},Y)):null))}},2263:function(te,s,e){"use strict";e.d(s,{DK:function(){return p},m1:function(){return T}});var r=e(2784),t=e(10289),l=e(26136),u=e(36964),R=e(64279),m=e(77446);function o({contentLoading:L,content:M,activeSyncState:j}){return L||j==="BUILD_READY_RELOAD"||!M&&j==="CHECKING"?"CHECKING":!M&&j==="BUILDING"?"INITIAL_BUILD":M?j==="BUILDING"?"CONTENT_STALE_REFRESHING":j==="BUILD_READY"?"CONTENT_STALE_READY":j==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function c(L,M){const j={...L};switch(M.type){case"sync":M.state==="CHECKING"&&(j.buildLog=[]),j.activeSyncState=M.state,j.syncError=M.syncError;break;case"contentLoading":j.contentLoading=!0,j.contentError=void 0;break;case"content":typeof M.path=="string"&&(j.path=M.path),j.contentLoading=!1,j.content=M.content,j.contentError=M.contentError;break;case"buildLog":j.buildLog=j.buildLog.concat(M.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(j.activeSyncState)&&["contentLoading","content"].includes(M.type)&&(j.activeSyncState="UP_TO_DATE",j.buildLog=[]),j}function f(L,M,j,w){var ue,Re;const[b,O]=(0,r.useReducer)(c,{activeSyncState:"CHECKING",path:w,contentLoading:!0,buildLog:[]}),F=(0,u.useApi)(l.Dl),{retry:U}=(0,m.Z)(async()=>{O({type:"contentLoading"});try{const we=await F.getEntityDocs({kind:L,namespace:M,name:j},w);return O({type:"content",content:we,path:w}),we}catch(we){O({type:"content",contentError:we,path:w})}},[F,L,M,j,w]),Y=(0,r.useRef)({content:void 0,reload:()=>{}});return Y.current={content:b.content,reload:U},(0,R.default)(async()=>{O({type:"sync",state:"CHECKING"});const we=setTimeout(()=>{O({type:"sync",state:"BUILDING"})},1e3);try{switch(await F.syncEntityDocs({kind:L,namespace:M,name:j},ze=>{O({type:"buildLog",log:ze})})){case"updated":Y.current.content?O({type:"sync",state:"BUILD_READY"}):(Y.current.reload(),O({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":O({type:"sync",state:"UP_TO_DATE"});break;default:O({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(ge){O({type:"sync",state:"ERROR",syncError:ge})}finally{clearTimeout(we)}},[L,j,M,F,O,Y]),{state:(0,r.useMemo)(()=>o({activeSyncState:b.activeSyncState,contentLoading:b.contentLoading,content:b.content}),[b.activeSyncState,b.content,b.contentLoading]),contentReload:U,path:b.path,content:b.content,contentErrorMessage:(ue=b.contentError)==null?void 0:ue.toString(),syncErrorMessage:(Re=b.syncError)==null?void 0:Re.toString(),buildLog:b.buildLog}}const y=(0,r.createContext)({}),p=()=>(0,r.useContext)(y),E=({children:L})=>{const{"*":M=""}=(0,t.UO)(),{entityRef:j}=(0,l.x1)(),{kind:w,namespace:b,name:O}=j,F=f(w,b,O,M);return r.createElement(y.Provider,{value:F},L instanceof Function?L(F):L)},T=L=>M=>r.createElement(E,null,r.createElement(L,{...M}))},96393:function(te,s,e){"use strict";e.d(s,{Fq:function(){return u.F},SE:function(){return l.S}});var r=e(2263),t=e(26220),l=e(99954),u=e(63126),R=e(16172)},68725:function(te,s,e){"use strict";e.d(s,{Fw:function(){return l},_Z:function(){return t},pd:function(){return u}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),l=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),u=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},47861:function(te,s,e){"use strict";e.d(s,{S:function(){return Y}});var r=e(2784),t=e(79692),l=e(49378),u=e(38402),R=e(86136),m=e(85256),o=e(82339),c=e(36964),f=e(74450);const y=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),p=ne=>{const{result:ue,highlight:Re,rank:we,lineClamp:ge=5,asListItem:ze=!0,asLink:_e=!0,title:et,icon:it}=ne,St=y(),Et=(0,c.useAnalytics)(),Pe=()=>{Et.captureEvent("discover",ue.title,{attributes:{to:ue.location},value:we})},pt=()=>{const de=Re!=null&&Re.fields.title?r.createElement(f.FA,{text:Re.fields.title,preTag:Re.preTag,postTag:Re.postTag}):ue.title,Ue=Re!=null&&Re.fields.entityTitle?r.createElement(f.FA,{text:Re.fields.entityTitle,preTag:Re.preTag,postTag:Re.postTag}):ue.entityTitle,Be=Re!=null&&Re.fields.name?r.createElement(f.FA,{text:Re.fields.name,preTag:Re.preTag,postTag:Re.postTag}):ue.name;return r.createElement(l.Z,{className:St.itemText,primaryTypographyProps:{variant:"h6"},primary:et||r.createElement(r.Fragment,null,de," | ",Ue!=null?Ue:Be," docs"),secondary:r.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:ge,overflow:"hidden"}},Re!=null&&Re.fields.text?r.createElement(f.FA,{text:Re.fields.text,preTag:Re.preTag,postTag:Re.postTag}):ue.text)})},Ge=({children:de})=>_e?r.createElement(o.Link,{noTrack:!0,to:ue.location,onClick:Pe},de):r.createElement(r.Fragment,null,de),ie=({children:de})=>ze?r.createElement(r.Fragment,null,r.createElement(u.Z,{alignItems:"flex-start"},it&&r.createElement(R.Z,null,it),r.createElement("div",{className:St.flexContainer},de)),r.createElement(m.Z,{component:"li"})):r.createElement(r.Fragment,null,de);return r.createElement(Ge,null,r.createElement(ie,null,r.createElement(pt,null)))};var E=e(86619),T=e(50581),L=e(61837),M=e(4614),j=e(21853),w=e(88013),b=e(10289),O=e(48760);const F=(0,t.Z)({root:{width:"100%"}}),U=ne=>{const{entityId:ue,entityTitle:Re,debounceTime:we=150}=ne,[ge,ze]=(0,r.useState)(!1),_e=(0,b.s0)(),{term:et,setTerm:it,setFilters:St,result:{loading:Et,value:Pe}}=(0,f.Rx)(),pt=F(),[Ge,ie]=(0,r.useState)([]);(0,r.useEffect)(()=>{let oe=!0;if(oe&&Pe){const fe=Pe.results.slice(0,10);ie(fe)}return()=>{oe=!1}},[Et,Pe]);const[de,Ue]=(0,r.useState)(et);(0,O.Z)(()=>it(de),we,[de]);const{kind:Be,name:Xe,namespace:ht}=ue;(0,r.useEffect)(()=>{St(oe=>({...oe,kind:Be,namespace:ht,name:Xe}))},[Be,ht,Xe,St]);const ke=oe=>{ge||ze(!0),Ue(oe.target.value)},vt=(oe,fe)=>{if(fe!=null&&fe.document){const{location:tt}=fe.document;_e(tt)}};return r.createElement(w.ZP,{classes:{root:pt.root},"data-testid":"techdocs-search-bar",size:"small",open:ge,getOptionLabel:()=>"",filterOptions:oe=>oe,onClose:()=>{ze(!1)},onFocus:()=>{ze(!0)},onChange:vt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Ge,renderOption:({document:oe,highlight:fe})=>r.createElement(p,{result:oe,lineClamp:3,asListItem:!1,asLink:!1,title:oe.title,highlight:fe}),loading:Et,renderInput:oe=>r.createElement(E.Z,{...oe,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${Re||ue.name} docs`,value:de,onChange:ke,InputProps:{...oe.InputProps,startAdornment:r.createElement(T.Z,{position:"start"},r.createElement(L.Z,{"aria-label":"Query",disabled:!0},r.createElement(j.Z,null))),endAdornment:r.createElement(r.Fragment,null,Et?r.createElement(M.Z,{color:"inherit",size:20}):null,oe.InputProps.endAdornment)}})})},Y=ne=>{const ue={term:"",types:["techdocs"],pageCursor:"",filters:ne.entityId};return r.createElement(f.Nd,{initialState:ue},r.createElement(U,{...ne}))}},98157:function(){},53260:function(){}},function(te){var s=function(r){return te(te.s=r)};te.O(0,[2370,6202,9284,2126,7012,9035,4983,3222,6816,5218,4736],function(){return s(88649),s(46054)});var e=te.O()}]);})();
|
|
486
|
-
|
|
487
|
-
//# sourceMappingURL=main.a38c77d9.js.map
|