@techdocs/cli 1.1.1-next.2 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,476 @@
1
+ (()=>{var ji=Object.defineProperty;var Vi=(ee,s,e)=>s in ee?ji(ee,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):ee[s]=e;var _=(ee,s,e)=>(Vi(ee,typeof s!="symbol"?s+"":s,e),e),la=(ee,s,e)=>{if(!s.has(ee))throw TypeError("Cannot "+e)};var Ge=(ee,s,e)=>(la(ee,s,"read from private field"),e?e.call(ee):s.get(ee)),Tn=(ee,s,e)=>{if(s.has(ee))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(ee):s.set(ee,e)},Dn=(ee,s,e,r)=>(la(ee,s,"write to private field"),r?r.call(ee,e):s.set(ee,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(ee,s,e){"use strict";e.d(s,{n3:function(){return S},MS:function(){return m}});var r=e(48023),t=e(10179),c=e(96279),f=e.n(c);const S=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class m{constructor(i){_(this,"discoveryApi");_(this,"fetchApi");this.discoveryApi=i.discoveryApi,this.fetchApi=i.fetchApi||{fetch:f()}}async getEntityAncestors(i,u){const{kind:y,namespace:p,name:v}=(0,r.of)(i.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(p)}/${encodeURIComponent(v)}/ancestry`,u)}async getLocationById(i,u){return await this.requestOptional("GET",`/locations/${encodeURIComponent(i)}`,u)}async getEntities(i,u){const{filter:y=[],fields:p=[],offset:v,limit:b,after:L}=i!=null?i:{},x=[];for(const F of[y].flat()){const B=[];for(const[w,V]of Object.entries(F))for(const Q of[V].flat())Q===S?B.push(encodeURIComponent(w)):typeof Q=="string"&&B.push(`${encodeURIComponent(w)}=${encodeURIComponent(Q)}`);B.length&&x.push(`filter=${B.join(",")}`)}p.length&&x.push(`fields=${p.map(encodeURIComponent).join(",")}`),v!==void 0&&x.push(`offset=${v}`),b!==void 0&&x.push(`limit=${b}`),L!==void 0&&x.push(`after=${encodeURIComponent(L)}`);const j=x.length?`?${x.join("&")}`:"",D=await this.requestRequired("GET",`/entities${j}`,u),P=(F,B)=>{var Q,ue;if(((Q=F.metadata)==null?void 0:Q.name)===void 0||F.kind===void 0||((ue=B.metadata)==null?void 0:ue.name)===void 0||B.kind===void 0)return 0;const w=(0,r.eE)(F),V=(0,r.eE)(B);return w<V?-1:w>V?1:0};return{items:D.sort(P)}}async getEntityByRef(i,u){const{kind:y,namespace:p,name:v}=(0,r.of)(i);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(p)}/${encodeURIComponent(v)}`,u)}async getEntityByName(i,u){const{kind:y,namespace:p="default",name:v}=i;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(p)}/${encodeURIComponent(v)}`,u)}async refreshEntity(i,u){const y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(u==null?void 0:u.token)&&{Authorization:`Bearer ${u==null?void 0:u.token}`}},method:"POST",body:JSON.stringify({entityRef:i})});if(y.status!==200)throw new Error(await y.text())}async getEntityFacets(i,u){const{filter:y=[],facets:p}=i,v=[];for(const L of[y].flat()){const x=[];for(const[j,D]of Object.entries(L))for(const P of[D].flat())P===S?x.push(encodeURIComponent(j)):typeof P=="string"&&x.push(`${encodeURIComponent(j)}=${encodeURIComponent(P)}`);x.length&&v.push(`filter=${x.join(",")}`)}for(const L of p)v.push(`facet=${encodeURIComponent(L)}`);const b=v.length?`?${v.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${b}`,u)}async addLocation({type:i="url",target:u,dryRun:y},p){const v=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:i,target:u})});if(v.status!==201)throw new Error(await v.text());const{location:b,entities:L,exists:x}=await v.json();if(!b)throw new Error(`Location wasn't added: ${u}`);return{location:b,entities:L,exists:x}}async getLocationByRef(i,u){return(await this.requestRequired("GET","/locations",u)).map(p=>p.data).find(p=>i===(0,r.NZ)(p))}async removeLocationById(i,u){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(i)}`,u)}async removeEntityByUid(i,u){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(i)}`,u)}async requestIgnored(i,u,y){const p=`${await this.discoveryApi.getBaseUrl("catalog")}${u}`,v=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},b=await this.fetchApi.fetch(p,{method:i,headers:v});if(!b.ok)throw await t.VL.fromResponse(b)}async requestRequired(i,u,y){const p=`${await this.discoveryApi.getBaseUrl("catalog")}${u}`,v=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},b=await this.fetchApi.fetch(p,{method:i,headers:v});if(!b.ok)throw await t.VL.fromResponse(b);return await b.json()}async requestOptional(i,u,y){const p=`${await this.discoveryApi.getBaseUrl("catalog")}${u}`,v=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},b=await this.fetchApi.fetch(p,{method:i,headers:v});if(!b.ok){if(b.status===404)return;throw await t.VL.fromResponse(b)}return await b.json()}}},48023:function(ee,s,e){"use strict";e.d(s,{Tf:function(){return c},P1:function(){return Vt},q1:function(){return gn},M6:function(){return fn},l2:function(){return t},zG:function(){return r},w$:function(){return oe},nP:function(){return H},aS:function(){return ke},S4:function(){return zt},cz:function(){return De},iB:function(){return ae},of:function(){return Re},Ou:function(){return bt},eE:function(){return Me},NZ:function(){return Je}});const r="default",t="backstage.io/view-url",c="backstage.io/edit-url";var f=e(76635),S=e.n(f);class m{constructor(A=DEFAULT_NAMESPACE){_(this,"namespace");this.namespace=A}async enforce(A){return A.metadata.namespace?A:lodash.merge({metadata:{namespace:this.namespace}},A)}}class a{static isValidPrefixAndOrSuffix(A,G,ie,ye){if(typeof A!="string")return!1;const Se=A.split(G);return Se.length===1?ye(Se[0]):Se.length===2?ie(Se[0])&&ye(Se[1]):!1}static isJsonSafe(A){try{return S().isEqual(A,JSON.parse(JSON.stringify(A)))}catch{return!1}}static isValidDnsSubdomain(A){return typeof A=="string"&&A.length>=1&&A.length<=253&&A.split(".").every(a.isValidDnsLabel)}static isValidDnsLabel(A){return typeof A=="string"&&A.length>=1&&A.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(A)}static isValidTag(A){return typeof A=="string"&&A.length>=1&&A.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(A)}static isValidUrl(A){if(typeof A!="string")return!1;try{return new URL(A),!0}catch{return!1}}static isValidString(A){var G;return typeof A=="string"&&((G=A==null?void 0:A.trim())==null?void 0:G.length)>=1}static isNonEmptyString(A){var G;return typeof A=="string"&&((G=A==null?void 0:A.trim())==null?void 0:G.length)>=1}}var i=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}}}}}'),u=e(48231),y=e.n(u),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"}}}`),v=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}}}}}}'),b=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","target"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference"}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const L=new Map,x=[i,p,v,b];function j($){if(!($!=null&&$.length))throw new TypeError("Unknown error");const A=$[0];throw new TypeError(`${A.instancePath||"<root>"} ${A.message}${A.params?` - ${Object.entries(A.params).map(([G,ie])=>`${G}: ${ie}`).join(", ")}`:""}`)}function D($,A={}){var Xe;const G=(Xe=A==null?void 0:A.disableCache)!=null?Xe:!1,ie=G?"":JSON.stringify($);if(!G){const ut=L.get(ie);if(ut)return ut}const ye=P($),Se=new(y())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});ye.length&&Se.addSchema(ye,void 0,void 0,!0);const Ne=Se.compile($);return G||L.set(ie,Ne),Ne}function P($){if(typeof $!="object")return[];const A=new Set;$.$id&&A.add($.$id);const G=new Array,ie=[$];for(;ie.length;){const ye=ie.pop();for(const Se of F(ye))if(!A.has(Se)){A.add(Se);const Ne=x.find(Xe=>Xe.$id===Se);Ne&&(G.push(Ne),ie.push(Ne))}}return G}function*F($){const A=[$];for(;A.length;){const G=A.pop();if(typeof G=="object"&&G)for(const[ie,ye]of Object.entries(G))ie==="$ref"&&typeof ye=="string"?yield ye.split("#")[0]:A.push(ye)}}function B($){const A=compileAjvSchema($||entityEnvelopeSchema);return G=>{if(A(G)===!0)return G;throw throwAjvError(A.errors)}}function w($){const A=D($);return G=>{var Se;if(A(G)===!0)return G;const ye=(Se=A.errors)==null?void 0:Se.filter(Ne=>["/kind","/apiVersion"].includes(Ne.instancePath));if((ye==null?void 0:ye.length)&&ye.every(Ne=>Ne.keyword==="enum"))return!1;throw j(A.errors)}}function V($){const A=compileAjvSchema($||entitySchema);return G=>{if(A(G)===!0)return G;throw throwAjvError(A.errors)}}class Q{static isValidApiVersion(A){return a.isValidPrefixAndOrSuffix(A,"/",a.isValidDnsSubdomain,G=>G.length>=1&&G.length<=63&&/^[a-z0-9A-Z]+$/.test(G))}static isValidKind(A){return typeof A=="string"&&A.length>=1&&A.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(A)}static isValidObjectName(A){return typeof A=="string"&&A.length>=1&&A.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(A)}static isValidNamespace(A){return a.isValidDnsLabel(A)}static isValidLabelKey(A){return a.isValidPrefixAndOrSuffix(A,"/",a.isValidDnsSubdomain,Q.isValidObjectName)}static isValidLabelValue(A){return A===""||Q.isValidObjectName(A)}static isValidAnnotationKey(A){return a.isValidPrefixAndOrSuffix(A,"/",a.isValidDnsSubdomain,Q.isValidObjectName)}static isValidAnnotationValue(A){return typeof A=="string"}}const ue={isValidApiVersion:Q.isValidApiVersion,isValidKind:Q.isValidKind,isValidEntityName:Q.isValidObjectName,isValidNamespace:Q.isValidNamespace,isValidLabelKey:Q.isValidLabelKey,isValidLabelValue:Q.isValidLabelValue,isValidAnnotationKey:Q.isValidAnnotationKey,isValidAnnotationValue:Q.isValidAnnotationValue,isValidTag:$=>typeof $=="string"&&$.length>=1&&$.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test($)};function $e($={}){return{...ue,...$}}class Pe{constructor(A=makeValidator()){_(this,"validators");this.validators=A}async enforce(A){var Ne,Xe,ut,gt,ht,Ke,Lt;function G(qe,dt,qt){if(dt==null)throw new Error(`${qe} must have a value`);let nn;try{nn=qt(dt)}catch(pt){throw new Error(`${qe} could not be validated, ${pt}`)}if(!nn){let pt;switch(qt.name){case"isValidLabelValue":case"isValidObjectName":pt="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":pt="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":pt="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":pt="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":pt="a string";break;case"isValidKind":pt="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":pt="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":pt="a non empty string";break;default:pt=void 0;break}const yt=pt?` expected ${pt} but found "${dt}".`:"";throw new Error(`"${qe}" is not valid;${yt} 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 ie(qe,dt,qt){return dt===void 0||G(qe,dt,qt)}G("apiVersion",A.apiVersion,this.validators.isValidApiVersion),G("kind",A.kind,this.validators.isValidKind),G("metadata.name",A.metadata.name,this.validators.isValidEntityName),ie("metadata.namespace",A.metadata.namespace,this.validators.isValidNamespace);for(const[qe,dt]of Object.entries((Ne=A.metadata.labels)!=null?Ne:[]))G(`labels.${qe}`,qe,this.validators.isValidLabelKey),G(`labels.${qe}`,dt,this.validators.isValidLabelValue);for(const[qe,dt]of Object.entries((Xe=A.metadata.annotations)!=null?Xe:[]))G(`annotations.${qe}`,qe,this.validators.isValidAnnotationKey),G(`annotations.${qe}`,dt,this.validators.isValidAnnotationValue);const ye=(ut=A.metadata.tags)!=null?ut:[];for(let qe=0;qe<ye.length;++qe)G(`tags.${qe}`,ye[qe],this.validators.isValidTag);const Se=(gt=A.metadata.links)!=null?gt:[];for(let qe=0;qe<Se.length;++qe)G(`links.${qe}.url`,(ht=Se[qe])==null?void 0:ht.url,CommonValidatorFunctions.isValidUrl),ie(`links.${qe}.title`,(Ke=Se[qe])==null?void 0:Ke.title,CommonValidatorFunctions.isNonEmptyString),ie(`links.${qe}.icon`,(Lt=Se[qe])==null?void 0:Lt.icon,KubernetesValidatorFunctions.isValidObjectName);return A}}class de{constructor(){_(this,"validate")}async enforce(A){if(!this.validate){const ye=new Ajv({allowUnionTypes:!0});this.validate=ye.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(A)===!0)return A;const[ie]=this.validate.errors||[];throw ie?new Error(`Malformed envelope, ${ie.instancePath||"<root>"} ${ie.message}`):new Error("Malformed envelope, Unknown error")}}function ze($){let A=$.indexOf(":");const G=$.indexOf("/");G!==-1&&G<A&&(A=-1);const ie=A===-1?void 0:$.slice(0,A),ye=G===-1?void 0:$.slice(A+1,G),Se=$.slice(Math.max(A+1,G+1));if(ie===""||ye===""||Se==="")throw new TypeError(`Entity reference "${$}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:ie,namespace:ye,name:Se}}function ae($){return{kind:$.kind,namespace:$.metadata.namespace||r,name:$.metadata.name}}function Re($,A){var Xe,ut,gt,ht;if(!$)throw new Error("Entity reference must not be empty");const G=A==null?void 0:A.defaultKind,ie=(A==null?void 0:A.defaultNamespace)||r;let ye,Se,Ne;if(typeof $=="string"){const Ke=ze($);ye=(Xe=Ke.kind)!=null?Xe:G,Se=(ut=Ke.namespace)!=null?ut:ie,Ne=Ke.name}else ye=(gt=$.kind)!=null?gt:G,Se=(ht=$.namespace)!=null?ht:ie,Ne=$.name;if(ye)if(Se){if(!Ne){const Ke=JSON.stringify($);throw new Error(`Entity reference ${Ke} had missing or empty name`)}}else{const Ke=JSON.stringify($);throw new Error(`Entity reference ${Ke} had missing or empty namespace`)}else{const Ke=JSON.stringify($);throw new Error(`Entity reference ${Ke} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:ye,namespace:Se,name:Ne}}function Me($){var ye,Se;let A,G,ie;return"metadata"in $?(A=$.kind,G=(ye=$.metadata.namespace)!=null?ye:r,ie=$.metadata.name):(A=$.kind,G=(Se=$.namespace)!=null?Se:r,ie=$.name),`${A.toLocaleLowerCase("en-US")}:${G.toLocaleLowerCase("en-US")}/${ie.toLocaleLowerCase("en-US")}`}class We{constructor(A){this.policies=A}async enforce(A){let G=A;for(const ie of this.policies){const ye=await ie.enforce(G);if(!ye)throw new Error(`Policy ${ie.constructor.name} did not return a result`);G=ye}return G}}class Ye{constructor(A){this.policies=A}async enforce(A){for(const G of this.policies){const ie=await G.enforce(A);if(ie)return ie}throw new Error("The entity did not match any known policy")}}const ve={allOf($){return new We($)},oneOf($){return new Ye($)}};var Le=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ApiV1alpha1","description":"An API describes an interface that can be exposed by a component. The API can be defined in different formats, like OpenAPI, AsyncAPI, GraphQL, gRPC, or other formats.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"API","metadata":{"name":"artist-api","description":"Retrieve artist details","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"openapi","lifecycle":"production","owner":"artist-relations-team","system":"artist-engagement-portal","definition":"openapi: \\"3.0.0\\"\\ninfo:..."}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["API"]},"spec":{"type":"object","required":["type","lifecycle","owner","definition"],"properties":{"type":{"type":"string","description":"The type of the API definition.","examples":["openapi","asyncapi","graphql","grpc"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the API.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the API.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the API belongs to.","minLength":1},"definition":{"type":"string","description":"The definition of the API, based on the format defined by the type.","minLength":1}}}}}]}');function xe($){const A=w($);return{async check(G){return A(G)===G}}}const He=xe(Le);var at=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 At=xe(at);var et=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 it=xe(et);var Qe=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 rt=xe(Qe);var wt=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 Zt=xe(wt),zt="ownedBy",Fn="ownerOf",Yt="consumesApi",Rt="apiConsumedBy",dn="providesApi",se="apiProvidedBy",H="dependsOn",oe="dependencyOf",fe="parentOf",he="childOf",Te="memberOf",we="hasMember",De="partOf",ke="hasPart";var lt=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 Ut=xe(lt);var Ft=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 tt=xe(Ft);var It=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 jt=xe(It),Vt="backstage.io/managed-by-location",gn="backstage.io/managed-by-origin-location",fn="backstage.io/source-location";function bt($){if(typeof $!="string")throw new TypeError(`Unable to parse location ref '${$}', unexpected argument ${typeof $}`);const A=$.indexOf(":");if(A<0)throw new TypeError(`Unable to parse location ref '${$}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const G=$.substring(0,A).trim(),ie=$.substring(A+1).trim();if(!G||!ie)throw new TypeError(`Unable to parse location ref '${$}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(G==="http"||G==="https")throw new TypeError(`Invalid location ref '${$}', please prefix it with 'url:', e.g. 'url:${$}'`);return{type:G,target:ie}}function Je($){const{type:A,target:G}=$;if(A){if(!G)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${A}:${G}`}function re($){var G,ie,ye,Se,Ne;const A=(Ne=(ie=(G=$.metadata)==null?void 0:G.annotations)==null?void 0:ie[ANNOTATION_SOURCE_LOCATION])!=null?Ne:(Se=(ye=$.metadata)==null?void 0:ye.annotations)==null?void 0:Se[ANNOTATION_LOCATION];if(!A)throw new Error(`Entity '${stringifyEntityRef($)}' is missing location`);return bt(A)}},23235:function(ee,s,e){"use strict";e.d(s,{C:function(){return t}});var r=e(98005);class t{constructor(){_(this,"subject",new r.J)}post(f){this.subject.next(f)}alert$(){return this.subject}}},47150:function(ee,s,e){"use strict";e.d(s,{g:function(){return r}});class r{captureEvent(c){}}},58652:function(ee,s,e){"use strict";e.d(s,{C:function(){return c}});var r=e(98005);const t="theme";class c{constructor(S){_(this,"activeThemeId");_(this,"subject",new r.X(void 0));this.themes=S}static createWithStorage(S){var i;const m=new c(S);if(!window.localStorage)return m;const a=(i=window.localStorage.getItem(t))!=null?i:void 0;return m.setActiveThemeId(a),m.activeThemeId$().subscribe(u=>{u?window.localStorage.setItem(t,u):window.localStorage.removeItem(t)}),window.addEventListener("storage",u=>{var y;if(u.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(S){this.activeThemeId=S,this.subject.next(S)}}},14721:function(ee,s,e){"use strict";e.d(s,{m:function(){return u}});var r=e(9850),t=e.n(r),c=e(12782),f=e.n(c);const S=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function m(y){return typeof y=="object"&&y!==null&&!Array.isArray(y)}function a(y){if(y===null)return"null";if(Array.isArray(y))return"array";const p=typeof y;return p==="number"&&isNaN(y)?"nan":p==="string"&&y===""?"empty-string":p}const i={type(y,p,v,b){return`Invalid type in config for key '${y}' in '${p}', got ${v}, wanted ${b}`},missing(y){return`Missing required config value at '${y}'`},convert(y,p,v){return`Unable to convert config value for key '${y}' in '${p}' to a ${v}`}};class u{constructor(p,v="mock-config",b,L=""){_(this,"filteredKeys");_(this,"notifiedFilteredKeys",new Set);this.data=p,this.context=v,this.fallback=b,this.prefix=L}static fromConfigs(p){return p.length===0?new u(void 0):p.reduce((v,{data:b,context:L,filteredKeys:x,deprecatedKeys:j})=>{const D=new u(b,L,v);if(D.filteredKeys=x,j)for(const{key:P,description:F}of j)console.warn(`The configuration key '${P}' of ${L} is deprecated and may be removed soon. ${F||""}`);return D},void 0)}has(p){var b,L;return this.readValue(p)!==void 0?!0:(L=(b=this.fallback)==null?void 0:b.has(p))!=null?L:!1}keys(){var b,L;const p=this.data?Object.keys(this.data):[],v=(L=(b=this.fallback)==null?void 0:b.keys())!=null?L:[];return[...new Set([...p,...v])]}get(p){const v=this.getOptional(p);if(v===void 0)throw new Error(i.missing(this.fullKey(p!=null?p:"")));return v}getOptional(p){var L;const v=t()(this.readValue(p)),b=(L=this.fallback)==null?void 0:L.getOptional(p);return v===void 0?b:b===void 0?v:f()({},{value:b},{value:v},(x,j)=>!m(j)||!m(x)?j:void 0).value}getConfig(p){const v=this.getOptionalConfig(p);if(v===void 0)throw new Error(i.missing(this.fullKey(p)));return v}getOptionalConfig(p){var L;const v=this.readValue(p),b=(L=this.fallback)==null?void 0:L.getOptionalConfig(p);if(m(v))return this.copy(v,p,b);if(v!==void 0)throw new TypeError(i.type(this.fullKey(p),this.context,a(v),"object"));return b}getConfigArray(p){const v=this.getOptionalConfigArray(p);if(v===void 0)throw new Error(i.missing(this.fullKey(p)));return v}getOptionalConfigArray(p){const v=this.readConfigValue(p,b=>{if(!Array.isArray(b))return{expected:"object-array"};for(const[L,x]of b.entries())if(!m(x))return{expected:"object-array",value:x,key:`${p}[${L}]`};return!0});if(!!v)return v.map((b,L)=>this.copy(b,`${p}[${L}]`))}getNumber(p){const v=this.getOptionalNumber(p);if(v===void 0)throw new Error(i.missing(this.fullKey(p)));return v}getOptionalNumber(p){const v=this.readConfigValue(p,L=>typeof L=="number"||typeof L=="string"||{expected:"number"});if(typeof v=="number"||v===void 0)return v;const b=Number(v);if(!Number.isFinite(b))throw new Error(i.convert(this.fullKey(p),this.context,"number"));return b}getBoolean(p){const v=this.getOptionalBoolean(p);if(v===void 0)throw new Error(i.missing(this.fullKey(p)));return v}getOptionalBoolean(p){return this.readConfigValue(p,v=>typeof v=="boolean"||{expected:"boolean"})}getString(p){const v=this.getOptionalString(p);if(v===void 0)throw new Error(i.missing(this.fullKey(p)));return v}getOptionalString(p){return this.readConfigValue(p,v=>typeof v=="string"&&v!==""||{expected:"string"})}getStringArray(p){const v=this.getOptionalStringArray(p);if(v===void 0)throw new Error(i.missing(this.fullKey(p)));return v}getOptionalStringArray(p){return this.readConfigValue(p,v=>{if(!Array.isArray(v))return{expected:"string-array"};for(const[b,L]of v.entries())if(typeof L!="string"||L==="")return{expected:"string-array",value:L,key:`${p}[${b}]`};return!0})}fullKey(p){return`${this.prefix}${this.prefix?".":""}${p}`}copy(p,v,b){const L=new u(p,this.context,b,this.fullKey(v));return L.filteredKeys=this.filteredKeys,L}readConfigValue(p,v){var x;const b=this.readValue(p);if(b===void 0)return(x=this.fallback)==null?void 0:x.readConfigValue(p,v);const L=v(b);if(L!==!0){const{key:j=p,value:D=b,expected:P}=L;throw new TypeError(i.type(this.fullKey(j),this.context,a(D),P))}return b}readValue(p){const v=p?p.split("."):[];for(const L of v)if(!S.test(L))throw new TypeError(`Invalid config key '${p}'`);if(this.data===void 0)return;let b=this.data;for(const[L,x]of v.entries())if(m(b))b=b[x];else if(b!==void 0){const j=this.fullKey(v.slice(0,L).join("."));throw new TypeError(i.type(j,this.context,a(b),"object"))}return b}}},4333:function(ee,s,e){"use strict";e.d(s,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(f){const S=f.split(/\{\{\s*pluginId\s*\}\}/),m=S.join("pluginId");let a;try{a=new URL(m)}catch{throw new Error(`${r} URL '${m}' is invalid`)}if(a.hash)throw new Error(`${r} URL must not have a hash`);if(a.search)throw new Error(`${r} URL must not have a query`);if(m.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(S)}constructor(f){this.parts=f}async getBaseUrl(f){return this.parts.join(f)}}},89536:function(ee,s,e){"use strict";e.d(s,{KN:function(){return r},gr:function(){return c},Jv:function(){return f}});class r{constructor(m,a){this.alertApi=m,this.errorApi=a}post(m,a){return a!=null&&a.hidden||this.alertApi.post({message:m.message,severity:"error"}),this.errorApi.post(m,a)}error$(){return this.errorApi.error$()}}var t=e(98005);class c{constructor(){_(this,"subject",new t.J)}post(m,a){this.subject.next({error:m,context:a})}error$(){return this.subject}}class f{static forward(m,a){window.addEventListener("unhandledrejection",i=>{m.post(i.reason,a)})}}},14884:function(ee,s,e){"use strict";e.d(s,{b:function(){return c}});var r=e(36964);function t(f){if(f.length<3)throw new Error(`The '${f}' feature flag must have a minimum length of three characters.`);if(f.length>150)throw new Error(`The '${f}' feature flag must not exceed 150 characters.`);if(!f.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${f}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class c{constructor(){_(this,"registeredFeatureFlags",[]);_(this,"flags")}registerFlag(S){t(S.name),this.registeredFeatureFlags.push(S)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(S){return this.flags||(this.flags=this.load()),this.flags.get(S)===r.FeatureFlagState.Active}save(S){this.flags||(this.flags=this.load()),S.merge||this.flags.clear();for(const[a,i]of Object.entries(S.states))this.flags.set(a,i);const m=Array.from(this.flags.entries()).filter(([,a])=>a===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(m)))}load(){try{const S=window.localStorage.getItem("featureFlags");if(!S)return new Map;const m=JSON.parse(S);if(typeof m!="object"||m===null||Array.isArray(m))return new Map;const a=Object.entries(m).filter(([i,u])=>(t(i),u===r.FeatureFlagState.Active));return new Map(a)}catch{return new Map}}}},50160:function(ee,s,e){"use strict";e.d(s,{I:function(){return a},j:function(){return r}});function r(i){var p;let u=i.baseImplementation||e.g.fetch;const y=[(p=i.middleware)!=null?p:[]].flat().reverse();for(const v of y)u=v.apply(u);return{fetch:u}}class t{static create(u){var b,L;const y=c(u),p=((b=u.header)==null?void 0:b.name)||"authorization",v=((L=u.header)==null?void 0:L.value)||(x=>`Bearer ${x}`);return new t(u.identityApi,y,p,v)}constructor(u,y,p,v){this.identityApi=u,this.allowUrl=y,this.headerName=p,this.headerValue=v}apply(u){return async(y,p)=>{const v=new Request(y,p),{token:b}=await this.identityApi.getCredentials();return v.headers.get(this.headerName)||typeof b!="string"||!b||!this.allowUrl(v.url)?u(y,p):(v.headers.set(this.headerName,this.headerValue(b)),u(v))}}}function c(i){return i.allowUrl?i.allowUrl:i.urlPrefixAllowlist?f(i.urlPrefixAllowlist):i.config?f([i.config.getString("backend.baseUrl")]):()=>!1}function f(i){const u=i.map(y=>y.replace(/\/$/,""));return y=>u.some(p=>y===p||y.startsWith(`${p}/`))}function S(i,u){return!u||u==="/"?i:`${i.replace(/\/$/,"")}/${u.replace(/^\//,"")}`}class m{constructor(u){this.discoveryApi=u}apply(u){return async(y,p)=>{const v=new Request(y,p),b="plugin://";if(!v.url.startsWith(b))return u(y,p);const{hostname:L,pathname:x,search:j,hash:D,username:P,password:F}=new URL(`http://${v.url.substring(b.length)}`);let B=await this.discoveryApi.getBaseUrl(L);if(P||F){const V=new URL(B),Q=`${P}${F?`:${F}`:""}@`;B=`${V.protocol}//${Q}${V.host}${V.pathname}`}const w=`${S(B,x)}${j}${D}`;return u(w,typeof y=="string"?p:y)}}}class a{static resolvePluginProtocol(u){return new m(u.discoveryApi)}static injectIdentityAuth(u){return t.create(u)}constructor(){}}},11358:function(ee,s,e){"use strict";e.d(s,{Y:function(){return S}});var r=e(98005);function t(m,a){for(const i of a)if(!m.has(i))return!1;return!0}function c(m,...a){const i=new Set(m);for(const u of a)for(const y of u)i.add(y);return i}class f{constructor(){_(this,"requests",[]);_(this,"subject",new r.X(this.getCurrentPending()))}request(a){return new Promise((i,u)=>{this.requests.push({scopes:a,resolve:i,reject:u}),this.subject.next(this.getCurrentPending())})}resolve(a,i){this.requests=this.requests.filter(u=>t(a,u.scopes)?(u.resolve(i),!1):!0),this.subject.next(this.getCurrentPending())}reject(a){this.requests.forEach(i=>i.reject(a)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const a=this.requests.length===0?void 0:this.requests.slice(1).reduce((i,u)=>c(i,u.scopes),this.requests[0].scopes);return{scopes:a,resolve:i=>{a&&this.resolve(a,i)},reject:i=>{a&&this.reject(i)}}}}class S{constructor(){_(this,"subject",new r.X([]));_(this,"currentRequests",[]);_(this,"handlerCount",0)}createAuthRequester(a){const i=new f,u=this.handlerCount;return this.handlerCount++,i.pending().subscribe({next:y=>{const p=this.currentRequests.slice(),v=this.makeAuthRequest(y,a);v?p[u]=v:delete p[u],this.currentRequests=p,this.subject.next(p.filter(Boolean))}}),y=>i.request(y)}makeAuthRequest(a,i){const{scopes:u}=a;if(!!u)return{provider:i.provider,trigger:async()=>{const y=await i.onAuthRequest(u);a.resolve(y)},reject:()=>{const y=new Error("Login failed, rejected by user");y.name="RejectedError",a.reject(y)}}}authRequest$(){return this.subject}}},56054:function(ee,s,e){"use strict";e.d(s,{C:function(){return f}});var r=e(82394),t=e.n(r);const c=new Map;class f{constructor(m,a){_(this,"subscribers",new Set);_(this,"observable",new(t())(m=>(this.subscribers.add(m),()=>{this.subscribers.delete(m)})));this.namespace=m,this.errorApi=a}static create(m){var a;return new f((a=m.namespace)!=null?a:"",m.errorApi)}get(m){return this.snapshot(m).value}snapshot(m){let a,i="absent";try{const u=localStorage.getItem(this.getKeyName(m));u&&(a=JSON.parse(u,(y,p)=>(typeof p=="object"&&p!==null&&Object.freeze(p),p)),i="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${m}`))}return{key:m,value:a,presence:i}}forBucket(m){const a=`${this.namespace}/${m}`;return c.has(a)||c.set(a,new f(a,this.errorApi)),c.get(a)}async set(m,a){localStorage.setItem(this.getKeyName(m),JSON.stringify(a)),this.notifyChanges(m)}async remove(m){localStorage.removeItem(this.getKeyName(m)),this.notifyChanges(m)}observe$(m){return this.observable.filter(({key:a})=>a===m)}getKeyName(m){return`${this.namespace}/${encodeURIComponent(m)}`}notifyChanges(m){const a=this.snapshot(m);for(const i of this.subscribers)i.next(a)}}},59589:function(ee,s,e){"use strict";e.d(s,{u:function(){return c}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class c{static create(S){const{discoveryApi:m,environment:a="development",provider:i=t,oauthRequestApi:u}=S;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:u,provider:i,environment:a})}}},6098:function(ee,s,e){"use strict";e.d(s,{Z:function(){return c}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class c{static create(S){const{discoveryApi:m,environment:a="development",provider:i=t,oauthRequestApi:u,defaultScopes:y=["team"]}=S;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:u,provider:i,environment:a,defaultScopes:y})}}},44431:function(ee,s,e){"use strict";e.d(s,{BitbucketAuth:function(){return c.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var c=e(6098)},19347:function(){},44474:function(ee,s,e){"use strict";e.d(s,{T:function(){return c}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class c{static create(S){const{discoveryApi:m,environment:a="development",provider:i=t,oauthRequestApi:u,defaultScopes:y=["read:user"]}=S;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:u,provider:i,environment:a,defaultScopes:y})}}},2922:function(ee,s,e){"use strict";e.d(s,{a:function(){return c}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class c{static create(S){const{discoveryApi:m,environment:a="development",provider:i=t,oauthRequestApi:u,defaultScopes:y=["read_user"]}=S;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:u,provider:i,environment:a,defaultScopes:y})}}},59938:function(ee,s,e){"use strict";e.d(s,{e:function(){return f}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},c="https://www.googleapis.com/auth/";class f{static create(m){const{discoveryApi:a,oauthRequestApi:i,environment:u="development",provider:y=t,defaultScopes:p=["openid",`${c}userinfo.email`,`${c}userinfo.profile`]}=m;return r.OAuth2.create({discoveryApi:a,oauthRequestApi:i,provider:y,environment:u,defaultScopes:p,scopeTransform(v){return v.map(b=>b==="openid"?b:b==="profile"||b==="email"?`${c}userinfo.${b}`:b.startsWith(c)?b:`${c}${b}`)}})}}},91668:function(ee,s,e){"use strict";e.d(s,{AtlassianAuth:function(){return y.u},BitbucketAuth:function(){return u.BitbucketAuth},GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return c.e},MicrosoftAuth:function(){return a._},OktaAuth:function(){return S.s},OneLoginAuth:function(){return i.$}});var r=e(44474),t=e(2922),c=e(59938),f=e(91205);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,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return f.BitbucketAuth}}),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,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return f.MicrosoftAuth}}),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,"OktaAuth")&&e.d(s,{OktaAuth:function(){return f.OktaAuth}}),e.o(f,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return f.OneLoginAuth}}),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 S=e(26079),m=e(67604),a=e(38482),i=e(58381),u=e(44431);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,"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,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return u.NoOpAnalyticsApi}}),e.o(u,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return u.OAuthRequestManager}}),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 y=e(59589)},38482:function(ee,s,e){"use strict";e.d(s,{_:function(){return c}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class c{static create(S){const{environment:m="development",provider:a=t,oauthRequestApi:i,discoveryApi:u,defaultScopes:y=["openid","offline_access","profile","email","User.Read"]}=S;return r.OAuth2.create({discoveryApi:u,oauthRequestApi:i,provider:a,environment:m,defaultScopes:y})}}},73124:function(ee,s,e){"use strict";e.d(s,{Z:function(){return m}});function r(a){return new Promise((i,u)=>{const y=a.width||500,p=a.height||700,v=window.screen.width/2-y/2,b=window.screen.height/2-p/2,L=window.open(a.url,a.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${y},height=${p},top=${b},left=${v}`);let x="";if(!L||typeof L.closed=="undefined"||L.closed){const F=new Error("Failed to open auth popup.");F.name="PopupRejectedError",u(F);return}const j=F=>{if(F.source!==L||F.origin!==a.origin)return;const{data:B}=F;if(B.type==="config_info"){x=B.targetOrigin;return}if(B.type!=="authorization_response")return;const w=B;if("error"in w){const V=new Error(w.error.message);V.name=w.error.name,u(V)}else i(w.response);P()},D=setInterval(()=>{if(L.closed){const F=`Login failed, ${x&&x!==window.location.origin?`Incorrect app origin, expected ${x}`:"popup was closed"}`,B=new Error(F);B.name="PopupClosedError",u(B),P()}},100);function P(){window.removeEventListener("message",j),clearInterval(D)}window.addEventListener("message",j)})}function t(a){return[...a].join(" ")}class c{constructor(i){_(this,"discoveryApi");_(this,"environment");_(this,"provider");_(this,"joinScopesFunc");_(this,"authRequester");_(this,"sessionTransform");const{discoveryApi:u,environment:y,provider:p,joinScopes:v=t,oauthRequestApi:b,sessionTransform:L=x=>x}=i;this.authRequester=b.createAuthRequester({provider:p,onAuthRequest:x=>this.showPopup(x)}),this.discoveryApi=u,this.environment=y,this.provider=p,this.joinScopesFunc=v,this.sessionTransform=L}async createSession(i){return i.instantPopup?this.showPopup(i.scopes):this.authRequester(i.scopes)}async refreshSession(){const i=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(!i.ok){const y=new Error(`Auth refresh request failed, ${i.statusText}`);throw y.status=i.status,y}const u=await i.json();if(u.error){const y=new Error(u.error.message);throw u.error.name&&(y.name=u.error.name),y}return await this.sessionTransform(u)}async removeSession(){const i=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(u=>{throw new Error(`Logout request failed, ${u}`)});if(!i.ok){const u=new Error(`Logout request failed, ${i.statusText}`);throw u.status=i.status,u}}async showPopup(i){const u=this.joinScopesFunc(i),y=await this.buildUrl("/start",{scope:u,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(i,u){const y=await this.discoveryApi.getBaseUrl("auth"),p=this.buildQueryString({...u,env:this.environment});return`${y}/${this.provider.id}${i}${p}`}buildQueryString(i){if(!i)return"";const u=Object.entries(i).map(([y,p])=>{if(typeof p=="string")return`${encodeURIComponent(y)}=${encodeURIComponent(p)}`;if(p)return encodeURIComponent(y)}).filter(Boolean).join("&");return u?`?${u}`:""}}var f=e(57018);const S={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class m{constructor(i){_(this,"sessionManager");_(this,"scopeTransform");this.sessionManager=i.sessionManager,this.scopeTransform=i.scopeTransform}static create(i){const{discoveryApi:u,environment:y="development",provider:p=S,oauthRequestApi:v,defaultScopes:b=[],scopeTransform:L=D=>D}=i,x=new c({discoveryApi:u,environment:y,provider:p,oauthRequestApi:v,sessionTransform(D){return{...D,providerInfo:{idToken:D.providerInfo.idToken,accessToken:D.providerInfo.accessToken,scopes:m.normalizeScopes(L,D.providerInfo.scope),expiresAt:new Date(Date.now()+D.providerInfo.expiresInSeconds*1e3)}}}}),j=new f.RefreshingAuthSessionManager({connector:x,defaultScopes:new Set(b),sessionScopes:D=>D.providerInfo.scopes,sessionShouldRefresh:D=>(D.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(i,u){var v;const y=m.normalizeScopes(this.scopeTransform,i),p=await this.sessionManager.getSession({...u,scopes:y});return(v=p==null?void 0:p.providerInfo.accessToken)!=null?v:""}async getIdToken(i={}){var y;const u=await this.sessionManager.getSession(i);return(y=u==null?void 0:u.providerInfo.idToken)!=null?y:""}async getBackstageIdentity(i={}){const u=await this.sessionManager.getSession(i);return u==null?void 0:u.backstageIdentity}async getProfile(i={}){const u=await this.sessionManager.getSession(i);return u==null?void 0:u.profile}static normalizeScopes(i,u){if(!u)return new Set;const y=Array.isArray(u)?u:u.split(/[\s|,]/).filter(Boolean);return new Set(i(y))}}},91205:function(ee,s,e){"use strict";e.d(s,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),c=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(s,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(s,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(s,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(ee,s,e){"use strict";e.d(s,{s:function(){return S}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),f="okta.";class S{static create(a){const{discoveryApi:i,environment:u="development",provider:y=t,oauthRequestApi:p,defaultScopes:v=["openid","email","profile","offline_access"]}=a;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:p,provider:y,environment:u,defaultScopes:v,scopeTransform(b){return b.map(L=>c.has(L)||L.startsWith(f)?L:`${f}${L}`)}})}}},58381:function(ee,s,e){"use strict";e.d(s,{$:function(){return S}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),f="onelogin.";class S{static create(a){const{discoveryApi:i,environment:u="development",provider:y=t,oauthRequestApi:p}=a;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:p,provider:y,environment:u,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(v){return v.map(b=>c.has(b)||b.startsWith(f)?b:`${f}${b}`)}})}}},67604:function(ee,s,e){"use strict";var r=e(57018),t=e(30195);const c=t.z.object({profile:t.z.object({email:t.z.string().optional(),displayName:t.z.string().optional(),picture:t.z.string().optional()}),backstageIdentity:t.z.object({token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),f={id:"saml",title:"SAML",icon:()=>null};class S{static create(a){const{discoveryApi:i,environment:u="development",provider:y=f}=a,p=new DirectAuthConnector({discoveryApi:i,environment:u,provider:y}),v=new StaticAuthSessionManager({connector:p}),b=new AuthSessionStore({manager:v,storageKey:`${y.id}Session`,schema:samlSessionSchema});return new S(b)}sessionState$(){return this.sessionManager.sessionState$()}constructor(a){this.sessionManager=a}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(a={}){const i=await this.sessionManager.getSession(a);return i==null?void 0:i.backstageIdentity}async getProfile(a={}){const i=await this.sessionManager.getSession(a);return i==null?void 0:i.profile}}},91631:function(ee,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.C},AppThemeSelector:function(){return f.C},AtlassianAuth:function(){return r.AtlassianAuth},ConfigReader:function(){return S.m},ErrorAlerter:function(){return a.KN},ErrorApiForwarder:function(){return a.gr},FetchMiddlewares:function(){return u.I},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},LocalStorageFeatureFlags:function(){return i.b},MicrosoftAuth:function(){return r.MicrosoftAuth},NoOpAnalyticsApi:function(){return c.g},OAuthRequestManager:function(){return y.Y},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},UnhandledErrorForwarder:function(){return a.Jv},UrlPatternDiscovery:function(){return m.p},WebStorage:function(){return p.C},createFetchApi:function(){return u.j}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(23235),c=e(47150),f=e(58652),S=e(14721),m=e(4333),a=e(89536),i=e(14884),u=e(50160),y=e(11358),p=e(56054)},56494:function(ee,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(ee,s,e){"use strict";e.d(s,{p:function(){return t}});var r;(function(c){c[c.default=10]="default";const f=50;c[c.app=f]="app",c[c.static=100]="static"})(r||(r={}));class t{constructor(){_(this,"factories",new Map)}register(f,S){const m=r[f],a=this.factories.get(S.api.id);return a&&a.priority>=m?!1:(this.factories.set(S.api.id,{priority:m,factory:S}),!0)}get(f){const S=this.factories.get(f.id);if(!!S)return S.factory}getAllApis(){const f=new Set;for(const{factory:S}of this.factories.values())f.add(S.api);return f}}},14406:function(ee,s,e){"use strict";e.d(s,{g:function(){return a}});var r=e(2784),t=e(13980),c=e.n(t);class f{constructor(...u){_(this,"holders");this.holders=u}get(u){for(const y of this.holders){const p=y.get(u);if(p)return p}}}var S=e(76241);const m=(0,S.CT)("api-context"),a=i=>{var b;const{apis:u,children:y}=i,p=(b=(0,r.useContext)(m))==null?void 0:b.atVersion(1),v=p?new f(u,p):u;return r.createElement(m.Provider,{value:(0,S.EI)({1:v}),children:y})};a.propTypes={apis:c().shape({get:c().func.isRequired}).isRequired,children:c().node}},12132:function(ee,s,e){"use strict";e.d(s,{M:function(){return r}});class r{constructor(c){_(this,"apis",new Map);this.factories=c}static validateFactories(c,f){for(const S of f){const m=[S],a=new Set;for(;m.length;){const i=m.shift(),u=c.get(i);if(!!u)for(const y of Object.values(u.deps)){if(y.id===S.id)throw new Error(`Circular dependency of api factory for ${S}`);a.has(y)||(a.add(y),m.push(y))}}}}get(c){return this.load(c)}load(c,f=[]){const S=this.apis.get(c.id);if(S)return S;const m=this.factories.get(c);if(!m)return;if(f.includes(m.api))throw new Error(`Circular dependency of api factory for ${m.api}`);const a=this.loadDeps(c,m.deps,[...f,m.api]),i=m.factory(a);return this.apis.set(c.id,i),i}loadDeps(c,f,S){const m={};for(const a in f)if(f.hasOwnProperty(a)){const i=f[a],u=this.load(i,S);if(!u)throw new Error(`No API factory available for dependency ${i} of dependent ${c}`);m[a]=u}return m}}},76105:function(ee,s,e){"use strict";e.d(s,{ApiFactoryRegistry:function(){return c.p},ApiProvider:function(){return r.g},ApiResolver:function(){return t.M}});var r=e(14406),t=e(12132),c=e(80396),f=e(82488),S=e.n(f);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,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return f.BitbucketAuth}}),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,"GithubAuth")&&e.d(s,{GithubAuth:function(){return f.GithubAuth}}),e.o(f,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return f.GitlabAuth}}),e.o(f,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return f.GoogleAuth}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return f.MicrosoftAuth}}),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,"OktaAuth")&&e.d(s,{OktaAuth:function(){return f.OktaAuth}}),e.o(f,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return f.OneLoginAuth}}),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}})},82488:function(){},82370:function(ee,s,e){"use strict";e.d(s,{b:function(){return dn}});var r=e(2784),t=e(10289),c=e(64279),f=e(56494),S=e(36964),m=e(76105);function a(se){const H={};for(const fe in se.collectors)se.collectors.hasOwnProperty(fe)&&(H[fe]=se.collectors[fe]());const oe=[{node:r.Children.toArray(se.root),parent:void 0,contexts:{}}];for(;oe.length!==0;){const{node:fe,parent:he,contexts:Te}=oe.shift();r.Children.forEach(fe,we=>{if(!(0,r.isValidElement)(we))return;const De={};for(const ke in H)if(H.hasOwnProperty(ke)){const lt=H[ke];De[ke]=lt.visit(lt.accumulator,we,he,Te[ke])}for(const ke of se.discoverers){const lt=ke(we);lt&&oe.push({node:lt,parent:we,contexts:De})}})}return Object.fromEntries(Object.entries(H).map(([fe,he])=>[fe,he.accumulator]))}function i(se,H){return()=>({accumulator:se(),visit:H})}function u(se){var H;return(H=se.props)==null?void 0:H.children}function y(se){var H,oe,fe;if(((H=se.props)==null?void 0:H.path)&&((oe=se.props)==null?void 0:oe.element))return(fe=se.props)==null?void 0:fe.element}const p=i(()=>new Set,(se,H)=>{const oe=(0,S.getComponentData)(H,"core.plugin");oe&&se.add(oe)});var v=e(88934);const b={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},L=i(()=>({paths:new Map,parents:new Map,objects:new Array}),(se,H,oe,fe)=>{var jt,Vt,gn,fn,bt;if((oe==null?void 0:oe.props.element)===H)return fe;let he=fe==null?void 0:fe.obj,Te=fe==null?void 0:fe.routeRef,we=fe==null?void 0:fe.sticky;const De=(jt=H.props)==null?void 0:jt.path,ke=(Vt=he==null?void 0:he.children)!=null?Vt:se.objects,lt=Boolean((gn=H.props)==null?void 0:gn.caseSensitive);let Ut=fe==null?void 0:fe.path;if((0,S.getComponentData)(H,"core.gatherMountPoints")){if(!De)throw new Error("Mount point gatherer must have a path");Ut=De}const Ft=(fn=H.props)==null?void 0:fn.element;let tt=(0,S.getComponentData)(H,"core.mountPoint");if(!tt&&(0,r.isValidElement)(Ft)&&(tt=(0,S.getComponentData)(Ft,"core.mountPoint")),tt){let Je=De;if(Ut&&(Je?Ut=void 0:Je=Ut),!Je)throw new Error("Mounted routable extension must have a path");se.paths.set(tt,Je),Te&&we?(se.parents.set(tt,Te),De&&(Te=tt,we=!1)):(se.parents.set(tt,Te),Te=tt),De?(he={caseSensitive:lt,path:De,element:"mounted",routeRefs:new Set([tt]),children:[b],plugin:(0,S.getComponentData)(H.props.element,"core.plugin")},ke.push(he)):he==null||he.routeRefs.add(tt)}if((0,S.getComponentData)(H,"core.gatherMountPoints")&&(we=!0),(0,S.getComponentData)(H,"core.gatherMountPoints")){if(!De)throw new Error("Mount point gatherer must have a path");tt||(he={caseSensitive:lt,path:De,element:"gathered",routeRefs:new Set,children:[b],plugin:(bt=fe==null?void 0:fe.obj)==null?void 0:bt.plugin},ke.push(he))}return{obj:he,path:Ut,routeRef:Te,sticky:we}}),x=i(()=>new Set,(se,H)=>{if(H.type===v.L){const oe=H.props;se.add("with"in oe?oe.with:oe.without)}});var j=e(76241);const D=(0,j.uW)("route-ref-type",()=>Symbol("route-ref-type"));function P(se){return se[D]==="absolute"}function F(se){return se[D]==="sub"}function B(se){return se[D]==="external"}function w(...se){const H=se.join("/").replace(/\/\/+/g,"/");return H!=="/"&&H.endsWith("/")?H.slice(0,-1):H}function V(se,H,oe){let fe,he="";if(P(se))fe=se;else if(F(se))fe=se.parent,he=se.path;else if(B(se)){const De=oe.get(se);if(!De)return[void 0,""];if(P(De))fe=De;else if(F(De))fe=De.parent,he=De.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${De}`)}else throw se[D]?new Error(`Unknown or invalid route ref type, ${se[D]}`):new Error(`Unknown object passed to useRouteRef, got ${se}`);if(!fe)return[void 0,""];const Te=H.get(fe);if(!Te)return[void 0,""];const we=w(Te,he);return[fe,we]}function Q(se,H,oe,fe,he){var Ut;const Te=(Ut=(0,t.fp)(he,H))!=null?Ut:[],we=Array();let De=-1;for(let Ft=se;Ft&&(De=Te.findIndex(tt=>tt.route.routeRefs.has(Ft)),De===-1);Ft=fe.get(Ft))we.unshift(Ft);we.length===0&&(De-=1);const ke=De===-1?"":Te[De].pathname,lt=w(...we.slice(0,-1).map(Ft=>{const tt=oe.get(Ft);if(!tt)throw new Error(`No path for ${Ft}`);if(tt.includes(":"))throw new Error(`Cannot route to ${se} with parent ${Ft} as it has parameters`);return tt}));return ke+lt}class ue{constructor(H,oe,fe,he,Te){this.routePaths=H,this.routeParents=oe,this.routeObjects=fe,this.routeBindings=he,this.appBasePath=Te}resolve(H,oe){const[fe,he]=V(H,this.routePaths,this.routeBindings);if(!fe)return;let Te;typeof oe=="string"?Te=this.trimPath(oe):oe.pathname?Te={...oe,pathname:this.trimPath(oe.pathname)}:Te=oe;const we=this.appBasePath+Q(fe,Te,this.routePaths,this.routeParents,this.routeObjects);return(...[ke])=>we+(0,t.Gn)(he,ke)}trimPath(H){return H&&(H.startsWith(this.appBasePath)?H.slice(this.appBasePath.length):H)}}const $e=(0,j.CT)("routing-context"),Pe=({routePaths:se,routeParents:H,routeObjects:oe,routeBindings:fe,basePath:he="",children:Te})=>{const we=new ue(se,H,oe,fe,he),De=(0,j.EI)({1:we});return r.createElement($e.Provider,{value:De},Te)},de=(se,H)=>{var oe,fe;try{const he=(0,t.fp)(H,{pathname:se}),Te=(oe=he==null?void 0:he.filter(De=>{var ke;return((ke=De==null?void 0:De.route.routeRefs)==null?void 0:ke.size)>0}).pop())==null?void 0:oe.route;if(!Te)return{};let we;return Te.routeRefs.size===1&&(we=Te.routeRefs.values().next().value),{extension:"App",pluginId:((fe=Te.plugin)==null?void 0:fe.getId())||"root",...we?{routeRef:we.id}:{}}}catch{return{}}},ze=({pathname:se,search:H,hash:oe})=>{const fe=(0,S.useAnalytics)();return(0,r.useEffect)(()=>{fe.captureEvent("navigate",`${se}${H}${oe}`)},[fe,se,H,oe]),null},ae=({routeObjects:se})=>{const{pathname:H,search:oe,hash:fe}=(0,t.TH)();return r.createElement(S.AnalyticsContext,{attributes:de(H,se)},r.createElement(ze,{pathname:H,search:oe,hash:fe}))};function Re(se,H){const oe=new Set(H.values());oe.delete(void 0);for(const fe of H.keys()){if(oe.has(fe))continue;let he=fe,Te="";for(;he;){const De=se.get(he);if(!De)throw new Error(`No path for ${he}`);Te=`${De}${Te}`,he=H.get(he)}const we=Te.match(/:(\w+)/g);if(we){for(let De=0;De<we.length;De++)for(let ke=De+1;ke<we.length;ke++)if(we[ke]===we[De])throw new Error(`Parameter ${we[ke]} is duplicated in path ${Te}`)}}}function Me(se,H){for(const oe of H)if(!!oe.externalRoutes){for(const[fe,he]of Object.entries(oe.externalRoutes))if(!he.optional&&!se.has(he))throw new Error(`External route '${fe}' of the '${oe.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const We=(0,j.CT)("app-context"),Ye=({appContext:se,children:H})=>{const oe=(0,j.EI)({1:se});return r.createElement(We.Provider,{value:oe,children:H})};function ve(se){return new Error(`Tried to access IdentityApi ${se} before app was loaded`)}function Le(se){console.warn(`WARNING: Call to ${se} is deprecated and will break in the future`)}class xe{constructor(){_(this,"target");_(this,"waitForTarget");_(this,"resolveTarget",()=>{});this.waitForTarget=new Promise(H=>{this.resolveTarget=H})}setTarget(H){this.target=H,this.resolveTarget(H)}getUserId(){if(!this.target)throw ve("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Le("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw ve("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Le("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(H=>H.getProfileInfo())}async getBackstageIdentity(){const H=await this.waitForTarget.then(oe=>oe.getBackstageIdentity());return H.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${H.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),H}async getCredentials(){return this.waitForTarget.then(H=>H.getCredentials())}async getIdToken(){return this.waitForTarget.then(H=>{if(!H.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Le("getIdToken"),H.getIdToken()})}async signOut(){await this.waitForTarget.then(H=>H.signOut()),location.reload()}}var He=e(72164);function at(se,H,oe){if(se!==void 0){const he=oe.find(Te=>Te.id===se);if(he)return he}if(H){const he=oe.find(Te=>Te.variant==="dark");if(he)return he}const fe=oe.find(he=>he.variant==="light");return fe||oe[0]}const At=()=>{const se=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[H,oe]=(0,r.useState)(se.matches);return(0,r.useEffect)(()=>{const fe=he=>{oe(he.matches)};return se.addListener(fe),()=>{se.removeListener(fe)}},[se]),H};function et({children:se}){const H=(0,S.useApi)(S.appThemeApiRef),oe=(0,He.Z)(H.activeThemeId$(),H.getActiveThemeId()),fe=Boolean(window.matchMedia)?At():!1,he=at(oe,fe,H.getInstalledThemes());if(!he)throw new Error("App has no themes");return r.createElement(he.Provider,{children:se})}var it=e(46611);class Qe{constructor(){_(this,"apis",[])}add(H,oe){return this.apis.push([H.id,oe]),oe}build(){return new rt(new Map(this.apis))}}class rt{static builder(){return new Qe}static from(H){return new rt(new Map(H.map(([oe,fe])=>[oe.id,fe])))}static with(H,oe){return new rt(new Map([[H.id,oe]]))}constructor(H){this.apis=H}with(H,oe){return new rt(new Map([...this.apis,[H.id,oe]]))}get(H){return this.apis.get(H.id)}}function wt(se){const H=new Map;return se&&se({bind:(fe,he)=>{for(const[Te,we]of Object.entries(he)){const De=fe[Te];if(!De)throw new Error(`Key ${Te} is not an existing external route`);if(!we&&!De.optional)throw new Error(`External route ${Te} is required but was undefined`);we&&H.set(De,we)}}}),H}const Zt=(0,r.createContext)({routeObjects:[]});function zt(se){var oe;let{pathname:H}=new URL((oe=se.getOptionalString("app.baseUrl"))!=null?oe:"/","http://dummy.dev");return H=H.replace(/\/*$/,""),H}function Fn(se,H,oe){var ke;const fe=Boolean(se),he=(0,c.default)(se||(()=>Promise.resolve([])));let Te;if(fe&&he.loading){const{Progress:lt}=H;Te=r.createElement(lt,null)}else if(he.error){const{BootErrorPage:lt}=H;Te=r.createElement(lt,{step:"load-config",error:he.error})}const{ThemeProvider:we=et}=H;return Te?{node:r.createElement(f.ApiProvider,{apis:rt.with(S.appThemeApiRef,oe)},r.createElement(we,null,Te))}:{api:f.ConfigReader.fromConfigs((ke=he.value)!=null?ke:[])}}class Yt{constructor(H){this.app=H}getPlugins(){return this.app.getPlugins()}getSystemIcon(H){return this.app.getSystemIcon(H)}getComponents(){return this.app.getComponents()}}class Rt{constructor(H){_(this,"apiHolder");_(this,"configApi");_(this,"apis");_(this,"icons");_(this,"plugins");_(this,"components");_(this,"themes");_(this,"configLoader");_(this,"defaultApis");_(this,"bindRoutes");_(this,"appIdentityProxy",new xe);_(this,"apiFactoryRegistry");var oe,fe,he,Te;this.apis=(oe=H.apis)!=null?oe:[],this.icons=H.icons,this.plugins=new Set((fe=H.plugins)!=null?fe:[]),this.components=H.components,this.themes=H.themes,this.configLoader=(he=H.configLoader)!=null?he:it.t,this.defaultApis=(Te=H.defaultApis)!=null?Te:[],this.bindRoutes=H.bindRoutes,this.apiFactoryRegistry=new m.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(H){return this.icons[H]}getComponents(){return this.components}getProvider(){const H=new Yt(this);let oe=!1;return({children:he})=>{const Te=(0,r.useMemo)(()=>f.AppThemeSelector.createWithStorage(this.themes),[]),{routing:we,featureFlags:De,routeBindings:ke}=(0,r.useMemo)(()=>{const tt=a({root:he,discoverers:[u,y],collectors:{routing:L,collectedPlugins:p,featureFlags:x}});return tt.collectedPlugins.forEach(It=>this.plugins.add(It)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...tt,routeBindings:wt(this.bindRoutes)}},[he]);oe||(oe=!0,Re(we.paths,we.parents),Me(ke,this.plugins));const lt=Fn(this.configLoader,this.components,Te),Ut="api"in lt;if(Ut){const{api:tt}=lt;this.configApi=tt}if((0,r.useEffect)(()=>{if(Ut){const tt=this.getApiHolder().get(S.featureFlagsApiRef);for(const It of this.plugins.values())if("getFeatureFlags"in It)for(const jt of It.getFeatureFlags())tt.registerFlag({name:jt.name,pluginId:It.getId()});else for(const jt of It.output())jt.type==="feature-flag"&&tt.registerFlag({name:jt.name,pluginId:It.getId()});for(const It of De)tt.registerFlag({name:It,pluginId:""})}},[Ut,lt,De]),"node"in lt)return lt.node;const{ThemeProvider:Ft=et}=this.components;return r.createElement(f.ApiProvider,{apis:this.getApiHolder()},r.createElement(Ye,{appContext:H},r.createElement(Ft,null,r.createElement(Pe,{routePaths:we.paths,routeParents:we.parents,routeObjects:we.objects,routeBindings:ke,basePath:zt(lt.api)},r.createElement(Zt.Provider,{value:{routeObjects:we.objects}},he)))))}}getRouter(){const{Router:H,SignInPage:oe}=this.components,fe=({component:Te,children:we})=>{const[De,ke]=(0,r.useState)();return De?(this.appIdentityProxy.setTarget(De),we):r.createElement(Te,{onSignInSuccess:ke})};return({children:Te})=>{const we=(0,S.useApi)(S.configApiRef),De=`${zt(we)}/*`,{routeObjects:ke}=(0,r.useContext)(Zt);return oe?r.createElement(H,null,r.createElement(ae,{routeObjects:ke}),r.createElement(fe,{component:oe},r.createElement(t.Z5,null,r.createElement(t.AW,{path:De,element:r.createElement(r.Fragment,null,Te)})))):(this.appIdentityProxy.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}}),r.createElement(H,null,r.createElement(ae,{routeObjects:ke}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:De,element:r.createElement(r.Fragment,null,Te)}))))}}getApiHolder(){if(this.apiHolder){for(const H of this.plugins)for(const oe of H.getApis())this.apiFactoryRegistry.get(oe.api)||this.apiFactoryRegistry.register("default",oe);return m.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:S.appThemeApiRef,deps:{},factory:()=>f.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:S.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:S.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:S.featureFlagsApiRef,deps:{},factory:()=>new f.LocalStorageFeatureFlags});for(const H of this.defaultApis)this.apiFactoryRegistry.register("default",H);for(const H of this.plugins)for(const oe of H.getApis())if(!this.apiFactoryRegistry.register("default",oe))throw new Error(`Plugin ${H.getId()} tried to register duplicate or forbidden API factory for ${oe.api}`);for(const H of this.apis)if(!this.apiFactoryRegistry.register("app",H))throw new Error(`Duplicate or forbidden API factory for ${H.api} in app`);return m.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new m.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(H){const oe=new Set;for(const fe of H){const he=fe.getId();if(oe.has(he))throw new Error(`Duplicate plugin found '${he}'`);oe.add(he)}}}function dn(se){return new Rt(se)}},46611:function(ee,s,e){"use strict";e.d(s,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const c=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!c)throw new Error("No static configuration provided");if(!Array.isArray(c))throw new Error("Static configuration has invalid format");const f=c.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const m=JSON.parse(t);Array.isArray(m)?f.push(...m):f.push({data:m,context:"env"})}catch(m){throw new Error(`Failed to load runtime configuration, ${m}`)}const S=window.__APP_CONFIG__;return S&&f.push({context:"window",data:S}),f}},44056:function(ee,s,e){"use strict";e.d(s,{createSpecializedApp:function(){return r.b},defaultConfigLoader:function(){return t.t}});var r=e(82370),t=e(46611),c=e(73495),f=e.n(c);e.o(c,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return c.AtlassianAuth}}),e.o(c,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return c.BitbucketAuth}}),e.o(c,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return c.FlatRoutes}}),e.o(c,"GithubAuth")&&e.d(s,{GithubAuth:function(){return c.GithubAuth}}),e.o(c,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return c.GitlabAuth}}),e.o(c,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return c.GoogleAuth}}),e.o(c,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return c.MicrosoftAuth}}),e.o(c,"OktaAuth")&&e.d(s,{OktaAuth:function(){return c.OktaAuth}}),e.o(c,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return c.OneLoginAuth}})},73495:function(){},49208:function(ee,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder},ErrorAlerter:function(){return r.ErrorAlerter},ErrorApiForwarder:function(){return r.ErrorApiForwarder},FetchMiddlewares:function(){return r.FetchMiddlewares},FlatRoutes:function(){return c.w},NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi},OAuthRequestManager:function(){return r.OAuthRequestManager},UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return r.UrlPatternDiscovery},WebStorage:function(){return r.WebStorage},createFetchApi:function(){return r.createFetchApi},createSpecializedApp:function(){return t.createSpecializedApp},defaultConfigLoader:function(){return t.defaultConfigLoader}});var r=e(56494);e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}});var c=e(63938)},57018:function(ee,s,e){"use strict";e.d(s,{RefreshingAuthSessionManager:function(){return m}});function r(i,u){for(const y of u)if(!i.has(y))return!1;return!0}class t{constructor(u){this.options=u}sessionExistsAndHasScope(u,y){if(!u)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const p=this.options.sessionScopes(u);return r(p,y)}getExtendedScope(u,y){const p=new Set(this.options.defaultScopes);if(u&&this.options.sessionScopes!==void 0){const v=this.options.sessionScopes(u);for(const b of v)p.add(b)}if(y)for(const v of y)p.add(v);return p}}var c=e(98005),f=e(36964);class S{constructor(){_(this,"subject",new c.X(f.SessionState.SignedOut));_(this,"signedIn",!1)}setIsSignedIn(u){this.signedIn!==u&&(this.signedIn=u,this.subject.next(this.signedIn?f.SessionState.SignedIn:f.SessionState.SignedOut))}sessionState$(){return this.subject}}class m{constructor(u){_(this,"connector");_(this,"helper");_(this,"sessionScopesFunc");_(this,"sessionShouldRefreshFunc");_(this,"stateTracker",new S);_(this,"refreshPromise");_(this,"currentSession");const{connector:y,defaultScopes:p=new Set,sessionScopes:v,sessionShouldRefresh:b}=u;this.connector=y,this.sessionScopesFunc=v,this.sessionShouldRefreshFunc=b,this.helper=new t({sessionScopes:v,defaultScopes:p})}async getSession(u){if(this.helper.sessionExistsAndHasScope(this.currentSession,u.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const p=await this.collapsedSessionRefresh(),v=this.sessionScopesFunc(this.currentSession),b=this.sessionScopesFunc(p);return r(b,v)&&(this.currentSession=p),p}catch(p){if(u.optional)return;throw p}}if(!this.currentSession&&!u.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(u)}catch{}if(!u.optional)return this.currentSession=await this.connector.createSession({...u,scopes:this.helper.getExtendedScope(this.currentSession,u.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 u=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),u}finally{delete this.refreshPromise}}}class a{constructor(u){_(this,"connector");_(this,"helper");_(this,"stateTracker",new SessionStateTracker);_(this,"currentSession");const{connector:y,defaultScopes:p=new Set,sessionScopes:v}=u;this.connector=y,this.helper=new SessionScopeHelper({sessionScopes:v,defaultScopes:p})}setSession(u){this.currentSession=u,this.stateTracker.setIsSignedIn(Boolean(u))}async getSession(u){if(this.helper.sessionExistsAndHasScope(this.currentSession,u.scopes))return this.currentSession;if(!u.optional)return this.currentSession=await this.connector.createSession({...u,scopes:this.helper.getExtendedScope(this.currentSession,u.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(ee,s,e){"use strict";e.d(s,{J:function(){return c},X:function(){return f}});var r=e(82394),t=e.n(r);class c{constructor(){_(this,"isClosed",!1);_(this,"terminatingError");_(this,"observable",new(t())(m=>this.isClosed?(this.terminatingError?m.error(this.terminatingError):m.complete(),()=>{}):(this.subscribers.add(m),()=>{this.subscribers.delete(m)})));_(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(m){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(a=>a.next(m))}error(m){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=m,this.subscribers.forEach(a=>a.error(m))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(m=>m.complete())}subscribe(m,a,i){const u=typeof m=="function"?{next:m,error:a,complete:i}:m;return this.observable.subscribe(u)}}class f{constructor(m){_(this,"isClosed");_(this,"currentValue");_(this,"terminatingError");_(this,"observable");_(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=m,this.terminatingError=void 0,this.observable=new(t())(a=>this.isClosed?(this.terminatingError?a.error(this.terminatingError):a.complete(),()=>{}):(a.next(this.currentValue),this.subscribers.add(a),()=>{this.subscribers.delete(a)}))}[Symbol.observable](){return this}get closed(){return this.isClosed}next(m){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=m,this.subscribers.forEach(a=>a.next(m))}error(m){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=m,this.subscribers.forEach(a=>a.error(m))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(m=>m.complete())}subscribe(m,a,i){const u=typeof m=="function"?{next:m,error:a,complete:i}:m;return this.observable.subscribe(u)}}},88934:function(ee,s,e){"use strict";e.d(s,{L:function(){return c}});var r=e(36964),t=e(2784);const c=f=>{const{children:S}=f,m=(0,r.useApi)(r.featureFlagsApiRef),a="with"in f?m.isActive(f.with):!m.isActive(f.without);return t.createElement(t.Fragment,null,a?S:null)};(0,r.attachComponentData)(c,"core.featureFlagged",!0)},63938:function(ee,s,e){"use strict";e.d(s,{w:function(){return f}});var r=e(2784),t=e(10289),c=e(36964);const f=m=>{const a=(0,c.useApp)(),{NotFoundErrorPage:i}=a.getComponents(),u=(0,c.useElementFilter)(m.children,y=>y.getElements().flatMap(p=>{var b;let v=p.props.path;return v===""?[]:(v=(b=v==null?void 0:v.replace(/\/\*$/,""))!=null?b:"/",[{path:v,element:p,children:p.props.children?[{path:v==="/"?"/":"/*",element:p.props.children}]:void 0}])}).sort((p,v)=>v.path.localeCompare(p.path)).map(p=>(p.path=p.path==="/"?"/":`${p.path}/*`,p)));return u.push({element:r.createElement(i,null),path:"/*"}),(0,t.V$)(u)};var S=e(88934)},53492:function(ee,s,e){"use strict";e.d(s,{Button:function(){return B},CodeSnippet:function(){return Re},Content:function(){return jo},ContentHeader:function(){return ei},CreateButton:function(){return Ye},DependencyGraph:function(){return Vt},DependencyGraphTypes:function(){return r},EmptyState:function(){return Ne},ErrorPage:function(){return ai},ErrorPanel:function(){return pn},Header:function(){return qo},HeaderIconLinkRow:function(){return Nn},HeaderLabel:function(){return gi},HeaderTabs:function(){return Vo},InfoCard:function(){return Gn},ItemCardGrid:function(){return Si},ItemCardHeader:function(){return vi},Link:function(){return P},LogViewer:function(){return zr},MissingAnnotationEmptyState:function(){return gt},OverflowTooltip:function(){return Pr},Page:function(){return ea},PageWithHeader:function(){return bi},Progress:function(){return dr},ResponseErrorPanel:function(){return yn},RoutedTabs:function(){return Go},Select:function(){return Ue},Sidebar:function(){return Ja},SidebarContext:function(){return Mr},SidebarDivider:function(){return us},SidebarItem:function(){return Wo},SidebarPage:function(){return $a},SidebarPinStateContext:function(){return vr},SubvalueCell:function(){return Cs},SupportButton:function(){return Fa},Table:function(){return Vs},WarningPanel:function(){return Nt},sidebarConfig:function(){return Kn}});var r={};e.r(r),e.d(r,{Nm:function(){return ve},ht:function(){return He},LJ:function(){return xe}});var t=e(2784),c=e(36964),f=e(19928);function S(n){const[o,l]=useState([]),d=useApi(alertApiRef),{anchorOrigin:g={vertical:"top",horizontal:"center"}}=n;if(useEffect(()=>{const N=d.alert$().subscribe(k=>l(W=>W.concat(k)));return()=>{N.unsubscribe()}},[d]),o.length===0)return null;const[E]=o,O=()=>{l(N=>N.filter(k=>k!==E))};return React.createElement(Snackbar,{open:!0,anchorOrigin:g},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:O,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:E.severity},React.createElement("span",null,E.message.toString(),o.length>1&&React.createElement("em",null,` (${o.length-1} older ${pluralize("message",o.length-1)})`))))}var m=e(79692),a=e(12420);const i=(0,m.Z)(n=>(0,a.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function u(n){const{displayName:o,picture:l,customStyles:d}=n,g=i();let E={...d};return l||(E={backgroundColor:stringToColor(o||""),...d}),React.createElement(MaterialAvatar,{alt:o,src:l,className:g.avatar,style:E},o&&extractInitials(o))}var y=e(77277),p=e(72779),v=e.n(p),b=e(86689),L=e(62833);const x=(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),D=n=>{var o;return n instanceof Array?n.map(D).join(" ").trim():typeof n=="object"&&n?D((o=n==null?void 0:n.props)==null?void 0:o.children):["string","number"].includes(typeof n)?String(n):""},P=t.forwardRef(({onClick:n,noTrack:o,...l},d)=>{const g=x(),E=(0,c.useAnalytics)(),O=String(l.to),N=D(l.children)||O,k=j(O),W=k&&!!/^https?:/.exec(O),te=X=>{n==null||n(X),o||E.captureEvent("click",N,{attributes:{to:O}})};return k?t.createElement(b.Z,{ref:d,href:O,onClick:te,...W?{target:"_blank",rel:"noopener"}:{},...l,className:v()(g.externalLink,l.className)},l.children,t.createElement("span",{className:g.visuallyHidden},", Opens in a new window")):t.createElement(b.Z,{ref:d,component:L.rU,onClick:te,...l})}),F=t.forwardRef((n,o)=>t.createElement(P,{ref:o,...n,color:"initial"})),B=t.forwardRef((n,o)=>t.createElement(y.Z,{ref:o,component:F,...n}));var w=e(60364),V=e(61837),Q=e(80030),ue=e(19353),$e=e(95074);function Pe(n){const{text:o,tooltipDelay:l=1e3,tooltipText:d="Text copied to clipboard"}=n,g=(0,c.useApi)(c.errorApiRef),[E,O]=(0,t.useState)(!1),[{error:N},k]=(0,$e.Z)();(0,t.useEffect)(()=>{N&&g.post(N)},[N,g]);const W=te=>{te.stopPropagation(),O(!0),k(o)};return t.createElement(t.Fragment,null,t.createElement(Q.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:l,onClose:()=>O(!1),open:E},t.createElement(V.Z,{onClick:W},t.createElement(ue.Z,null))))}var de=e(83229),ze=e(26639),ae=e(39595);function Re(n){const{text:o,language:l,showLineNumbers:d=!1,highlightedNumbers:g,customStyle:E,showCopyCodeButton:O=!1}=n,N=(0,w.Z)(),k=N.palette.type==="dark"?ze.Z:ae.Z,W=N.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(de.Z,{customStyle:E,language:l,style:k,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:N.palette.textVerySubtle},lineProps:te=>g!=null&&g.includes(te)?{style:{backgroundColor:W}}:{}},o),O&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(Pe,{text:o})))}var Me=e(41156),We=e(88188);function Ye(n){const{title:o,to:l}=n,d=(0,Me.Z)(g=>g.breakpoints.down("xs"));return l?d?t.createElement(V.Z,{component:L.rU,color:"primary",title:o,size:"small",to:l},t.createElement(We.Z,null)):t.createElement(y.Z,{component:L.rU,variant:"contained",color:"primary",to:l},o):null}var ve;(function(n){const o="TB";n.TOP_BOTTOM=o;const l="BT";n.BOTTOM_TOP=l;const d="LR";n.LEFT_RIGHT=d;const g="RL";n.RIGHT_LEFT=g})(ve||(ve={}));var Le;(function(n){const o="UL";n.UP_LEFT=o;const l="UR";n.UP_RIGHT=l;const d="DL";n.DOWN_LEFT=d;const g="DR";n.DOWN_RIGHT=g})(Le||(Le={}));var xe;(function(n){const o="network-simplex";n.NETWORK_SIMPLEX=o;const l="tight-tree";n.TIGHT_TREE=l;const d="longest-path";n.LONGEST_PATH=d})(xe||(xe={}));var He;(function(n){const o="l";n.LEFT=o;const l="r";n.RIGHT=l;const d="c";n.CENTER=d})(He||(He={}));var at=e(13387),At=e(11105),et=e(97963),it=e(46506),Qe=e.n(it),rt=e(54073),wt=e.n(rt),Zt=e(10368);const zt=(0,m.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function Fn({node:{id:n}}){const o=zt(),[l,d]=t.useState(0),[g,E]=t.useState(0),O=t.useRef(null);t.useLayoutEffect(()=>{if(O.current){let{height:te,width:X}=O.current.getBBox();te=Math.round(te),X=Math.round(X),(te!==g||X!==l)&&(d(X),E(te))}},[l,g]);const N=10,k=l+N*2,W=g+N*2;return t.createElement("g",null,t.createElement("rect",{className:o.node,width:k,height:W,rx:10}),t.createElement("text",{ref:O,className:o.text,y:W/2,x:k/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const Yt="arrow-marker",Rt="node",dn="edge",se="label",H=(0,Zt.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),oe=n=>t.createElement(Fn,{...n});function fe({render:n=oe,setNode:o,node:l}){const{width:d,height:g,x:E=0,y:O=0}=l,N=l,k=H(),W=t.useRef(null);return t.useLayoutEffect(()=>{if(W.current){let{height:te,width:X}=W.current.getBBox();te=Math.round(te),X=Math.round(X),(te!==g||X!==d)&&o(l.id,{...l,height:te,width:X})}},[l,d,g,o]),t.createElement("g",{ref:W,"data-testid":Rt,className:k.node,transform:`translate(${E-d/2},${O-g/2})`},n({node:N}))}var he=e(40408),Te=e(49810),we=e(19574),De=e.n(we);const ke=(0,Zt.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function lt({edge:{label:n}}){const o=ke();return t.createElement("text",{className:o.text,textAnchor:"middle"},n)}const Ut=(0,Zt.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"}),Ft=n=>t.createElement(lt,{...n}),tt=he.Z().x(n=>n.x).y(n=>n.y).curve(Te.Z);function It({render:n=Ft,setEdge:o,id:l,edge:d}){const{x:g=0,y:E=0,width:O,height:N,points:k}=d,W=d,te=Ut(),X=t.useRef(null);t.useLayoutEffect(()=>{if(X.current){let{height:Ee,width:Ae}=X.current.getBBox();Ee=Math.round(Ee),Ae=Math.round(Ae),(Ee!==N||Ae!==O)&&o(l,{...d,height:Ee,width:Ae})}},[d,N,O,o,l]);let pe="";if(k){const Ee=k.filter(Ae=>De()(Ae.x)&&De()(Ae.y));pe=tt(Ee)||""}return t.createElement(t.Fragment,null,pe&&t.createElement("path",{"data-testid":dn,className:te.path,markerEnd:`url(#${Yt})`,d:pe}),W.label?t.createElement("g",{ref:X,"data-testid":se,className:te.label,transform:`translate(${g},${E})`},n({edge:W})):null)}const jt="workspace";function Vt(n){var Rr,ia;const{edges:o,nodes:l,renderNode:d,direction:g=ve.TOP_BOTTOM,align:E,nodeMargin:O=50,edgeMargin:N=10,rankMargin:k=50,paddingX:W=0,paddingY:te=0,acyclicer:X,ranker:pe=xe.NETWORK_SIMPLEX,labelPosition:Ee=He.RIGHT,labelOffset:Ae=10,edgeRanks:ot=1,edgeWeight:xt=1,renderLabel:$t,defs:Ht,zoom:nt="enabled",...Pt}=n,Dt=(0,et.Z)(),[tn,Xn]=t.useState(100),[On,$r]=t.useState(100),Tt=t.useRef(new(Qe()).graphlib.Graph),[qn,mo]=t.useState(((Rr=Tt.current.graph())==null?void 0:Rr.width)||0),[or,ho]=t.useState(((ia=Tt.current.graph())==null?void 0:ia.height)||0),[_r,eo]=t.useState([]),[go,sn]=t.useState([]),Cn=Math.max(qn,tn),xn=Math.max(or,On),ar=t.useMemo(()=>wt()(kt=>{if(!kt)return;const ln=At.Z(kt),Kt=At.Z(kt.getElementById(jt));function wn(){ln.call(at.sP().scaleExtent([1,10]).on("zoom",kn=>{kn.transform.x=Math.min(0,Math.max(kn.transform.x,Cn-Cn*kn.transform.k)),kn.transform.y=Math.min(0,Math.max(kn.transform.y,xn-xn*kn.transform.k)),Kt.attr("transform",kn.transform)}))}nt==="enabled"?wn():nt==="enable-on-click"&&ln.on("click",()=>wn());const{width:$n,height:to}=kt.getBoundingClientRect();tn!==$n&&Xn($n),On!==to&&$r(to)},100),[On,tn,Cn,xn,nt]),Qt=t.useCallback(()=>{const kt=Tt.current.nodes(),ln=Tt.current.edges();kt.forEach(Kt=>{l.some($n=>$n.id===Kt)||Tt.current.removeNode(Kt)}),ln.forEach(Kt=>{o.some($n=>$n.from===Kt.v&&$n.to===Kt.w)||Tt.current.removeEdge(Kt.v,Kt.w)}),l.forEach(Kt=>{const wn=Tt.current.nodes().find($n=>Kt.id===$n);if(wn&&Tt.current.node(wn)){const{width:$n,height:to,x:kn,y:Hi}=Tt.current.node(wn);Tt.current.setNode(wn,{...Kt,width:$n,height:to,x:kn,y:Hi})}else Tt.current.setNode(Kt.id,{...Kt,width:0,height:0})}),o.forEach(Kt=>{Tt.current.setEdge(Kt.from,Kt.to,{...Kt,label:Kt.label,width:0,height:0,labelpos:Ee,labeloffset:Ae,weight:xt,minlen:ot})})},[o,l,Ee,Ae,xt,ot]),Xt=t.useMemo(()=>wt()(()=>{Qe().layout(Tt.current);const{height:kt,width:ln}=Tt.current.graph(),Kt=Math.max(0,kt||0),wn=Math.max(0,ln||0);mo(wn),ho(Kt),eo(Tt.current.nodes()),sn(Tt.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(Tt.current.setGraph({rankdir:g,align:E,nodesep:O,edgesep:N,ranksep:k,marginx:W,marginy:te,acyclicer:X,ranker:pe}),Qt(),Xt(),Xt.cancel),[X,E,g,N,W,te,O,k,pe,Qt,Xt]);function Ar(kt,ln){return Tt.current.setNode(kt,ln),Xt(),Tt.current}function sr(kt,ln){return Tt.current.setEdge(kt,ln),Xt(),Tt.current}return t.createElement("svg",{ref:ar,...Pt,width:"100%",height:xn,viewBox:`0 0 ${Cn} ${xn}`},t.createElement("defs",null,t.createElement("marker",{id:Yt,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:Dt.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),Ht),t.createElement("g",{id:jt},t.createElement("svg",{width:qn,height:or,y:xn/2-or/2,x:Cn/2-qn/2,viewBox:`0 0 ${qn} ${or}`},go.map(kt=>{const ln=Tt.current.edge(kt);return ln?t.createElement(It,{key:`${kt.v}-${kt.w}`,id:kt,setEdge:sr,render:$t,edge:ln}):null}),_r.map(kt=>{const ln=Tt.current.node(kt);return ln?t.createElement(fe,{key:kt,setNode:Ar,render:d,node:ln}):null}))))}const gn=(0,m.Z)(n=>{var o;return{root:{padding:n.spacing(0),marginBottom:n.spacing(0),marginTop:n.spacing(0),display:"flex",flexFlow:"row nowrap"},topPosition:{position:"relative",marginBottom:n.spacing(6),marginTop:-n.spacing(3),zIndex:"unset"},icon:{fontSize:20},content:{width:"100%",maxWidth:"inherit",flexWrap:"nowrap"},message:{display:"flex",alignItems:"center",color:n.palette.banner.text,"& a":{color:n.palette.banner.link}},info:{backgroundColor:n.palette.banner.info},error:{backgroundColor:n.palette.banner.error},warning:{backgroundColor:(o=n.palette.banner.warning)!=null?o:n.palette.banner.error}}},{name:"BackstageDismissableBanner"}),fn=n=>{var Ee;const{variant:o,message:l,id:d,fixed:g=!1}=n,E=gn(),N=useApi(storageApiRef).forBucket("notifications"),k=(Ee=N.snapshot("dismissedBanners").value)!=null?Ee:[],[W,te]=useState(new Set(k)),X=useObservable(N.observe$("dismissedBanners"));useEffect(()=>{var Ae;if(X!=null&&X.value){const ot=(Ae=X==null?void 0:X.value)!=null?Ae:[];te(new Set(ot))}},[X==null?void 0:X.value]);const pe=()=>{N.set("dismissedBanners",[...W,d])};return React.createElement(Snackbar,{anchorOrigin:g?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!W.has(d),classes:{root:classNames(E.root,!g&&E.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(E.content,E[o]),message:E.message},message:l,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:pe},React.createElement(Close,{className:E.icon}))]}))};var bt=e(60905),Je=e(90436),re=e.p+"static/missingAnnotation.67f79e98..svg",$=e.p+"static/noInformation.4b426325..svg",A=e.p+"static/createComponent.975d1e1e..svg",G=e.p+"static/noBuild.1715fa71..svg";const ie=(0,m.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),ye=({missing:n})=>{const o=ie();switch(n){case"field":return t.createElement("img",{src:re,className:o.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:$,alt:"no Information",className:o.generalImg});case"content":return t.createElement("img",{src:A,alt:"create Component",className:o.generalImg});case"data":return t.createElement("img",{src:G,alt:"no Build",className:o.generalImg});default:return null}},Se=(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 Ne(n){const{title:o,description:l,missing:d,action:g}=n,E=Se();return t.createElement(bt.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:E.root,spacing:2},t.createElement(bt.Z,{item:!0,xs:12,md:6},t.createElement(bt.Z,{container:!0,direction:"column"},t.createElement(bt.Z,{item:!0,xs:!0},t.createElement(Je.Z,{variant:"h5"},o)),t.createElement(bt.Z,{item:!0,xs:!0},t.createElement(Je.Z,{variant:"body1"},l)),t.createElement(bt.Z,{item:!0,xs:!0,className:E.action},g))),t.createElement(bt.Z,{item:!0,xs:12,md:6,className:E.imageContainer},t.createElement(ye,{missing:d})))}const Xe=`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`,ut=(0,m.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function gt(n){const{annotation:o,readMoreUrl:l}=n,d=l||"https://backstage.io/docs/features/software-catalog/well-known-annotations",g=ut(),E=t.createElement(t.Fragment,null,"The ",t.createElement("code",null,o)," annotation is missing. You need to add the annotation to your component if you want to enable this tool.");return t.createElement(Ne,{missing:"field",title:"Missing Annotation",description:E,action:t.createElement(t.Fragment,null,t.createElement(Je.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(Re,{text:Xe.replace("ANNOTATION",o),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(y.Z,{color:"primary",component:P,to:d},"Read more"))})}var ht=e(11776),Ke=e(38402),Lt=e(49378),qe=e(41128),dt=e(27616),qt=e(8284),nn=e(70660),pt=e(91750),yt=e(38016);const rn=(n,o)=>(o.palette.type==="light"?qe._j:qe.$n)(o.palette[n].light,.6),cn=(n,o)=>(o.palette.type==="light"?qe.$n:qe._j)(o.palette[n].light,.9),Ot=(0,m.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:o})=>rn(o,n)}})),ft=({severity:n})=>{const o=Ot({severity:n});return t.createElement(pt.Z,{classes:o})},Et=({severity:n})=>{const o=Ot({severity:n});return t.createElement(yt.Z,{classes:o})},St=(0,m.Z)(n=>({panel:{backgroundColor:({severity:o})=>cn(o,n),color:({severity:o})=>rn(o,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:o})=>rn(o,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:o})=>rn(o,n),backgroundColor:({severity:o})=>cn(o,n)},details:{width:"100%",display:"block",color:n.palette.textContrast,backgroundColor:n.palette.background.default,border:`1px solid ${n.palette.border}`,padding:n.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),Ct=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function Nt(n){const{severity:o="warning",title:l,message:d,children:g,defaultExpanded:E}=n,O=St({severity:o}),N=Ct(o)+(l?`: ${l}`:"");return t.createElement(dt.Z,{defaultExpanded:E!=null?E:!1,className:O.panel,role:"alert"},t.createElement(qt.Z,{expandIcon:t.createElement(Et,{severity:o}),className:O.summary},t.createElement(ft,{severity:o}),t.createElement(Je.Z,{className:O.summaryText,variant:"subtitle1"},N)),(d||g)&&t.createElement(nn.Z,null,t.createElement(bt.Z,{container:!0},d&&t.createElement(bt.Z,{item:!0,xs:12},t.createElement(Je.Z,{className:O.message,variant:"body1"},d)),g&&t.createElement(bt.Z,{item:!0,xs:12,className:O.details},g))))}const Gt=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),on=({error:n,message:o,stack:l,children:d})=>{const g=Gt();return t.createElement(ht.Z,{dense:!0},t.createElement(Ke.Z,{alignItems:"flex-start"},t.createElement(Lt.Z,{classes:{secondary:g.text},primary:"Error",secondary:n}),t.createElement(Pe,{text:n})),t.createElement(Ke.Z,{alignItems:"flex-start"},t.createElement(Lt.Z,{classes:{secondary:g.text},primary:"Message",secondary:o}),t.createElement(Pe,{text:o})),l&&t.createElement(Ke.Z,{alignItems:"flex-start"},t.createElement(Lt.Z,{classes:{secondary:g.text},primary:"Stack Trace",secondary:l}),t.createElement(Pe,{text:l})),d)};function pn(n){const{title:o,error:l,defaultExpanded:d,children:g}=n;return t.createElement(Nt,{severity:"error",title:o!=null?o:l.message,defaultExpanded:d},t.createElement(on,{error:l.name,message:l.message,stack:l.stack,children:g}))}var bn=e(85256);const _t=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function yn(n){var Ae;const{title:o,error:l,defaultExpanded:d}=n,g=_t();if(l.name!=="ResponseError")return t.createElement(pn,{title:o!=null?o:l.message,defaultExpanded:d,error:l});const{body:E,cause:O}=l,{request:N,response:k}=E,W=`${k.statusCode}: ${O.name}`,te=N&&`${N.method} ${N.url}`,X=O.message.replace(/\\n/g,`
12
+ `),pe=(Ae=O.stack)==null?void 0:Ae.replace(/\\n/g,`
13
+ `),Ee=JSON.stringify(E,void 0,2);return t.createElement(pn,{title:o!=null?o:l.message,defaultExpanded:d,error:{name:W,message:X,stack:pe}},te&&t.createElement(Ke.Z,{alignItems:"flex-start"},t.createElement(Lt.Z,{classes:{secondary:g.text},primary:"Request",secondary:N?`${te}`:void 0}),t.createElement(Pe,{text:te})),t.createElement(t.Fragment,null,t.createElement(bn.Z,{component:"li",className:g.divider}),t.createElement(Ke.Z,{alignItems:"flex-start"},t.createElement(Lt.Z,{classes:{secondary:g.text},primary:"Full Error as JSON"})),t.createElement(Re,{language:"json",text:Ee,showCopyCodeButton:!0})))}var _n=e(47093);function Wn(n){const o=document.createElement("div");return o.setAttribute("id",n),o}function Hn(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function Un(n){const o=useRef(null);useEffect(function(){const g=document.querySelector(`#${n}`),E=g||Wn(n);return g||Hn(E),E.appendChild(o.current),function(){o.current.remove(),E.childNodes.length===-1&&E.remove()}},[n]);function l(){return o.current||(o.current=document.createElement("div")),o.current}return l()}var Z=null;const h="core.calloutSeen";function T(){const[n,o]=useState(()=>{const d=localStorage.getItem(h);return d?JSON.parse(d):{}}),l=useCallback((d,g)=>{const E=localStorage.getItem(h),N={...E?JSON.parse(E):{},[d]:g};o(N),localStorage.setItem(h,JSON.stringify(N))},[]);return{states:n,setState:l}}function M(n){const{states:o,setState:l}=T(),d=useCallback(()=>{l(n,!0)},[l,n]);return{seen:o[n]===!0,markSeen:d}}function K(n){const{seen:o,markSeen:l}=M(n);return{show:o===!1,hide:l}}const ne=(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 me(n){const{featureId:o,title:l,description:d,children:g}=n,{show:E,hide:O}=useShowCallout(o),N=usePortal("core.callout"),k=useRef(null),[W,te]=useState(),X=ne(),pe=useCallback(()=>{if(k.current){const Ee=k.current.getBoundingClientRect(),Ae=Math.max(Ee.width,Ee.height),ot=800,xt=Ee.x-(Ae-Ee.width)/2-ot,$t=Ee.y-(Ae-Ee.height)/2-ot,Ht=Ae+2*ot,nt=450,Pt=Ee.x+Ee.width/2-nt,Dt=Ee.y-(Ae-Ee.height)/2+Ae+20;te({dotLeft:xt,dotTop:$t,dotSize:Ht,borderWidth:ot,textTop:Dt,textLeft:Pt,textWidth:nt})}},[]);return useEffect(()=>(window.addEventListener("resize",pe),window.addEventListener("scroll",pe),()=>{window.removeEventListener("resize",pe),window.removeEventListener("scroll",pe)}),[pe]),useLayoutEffect(pe,[k.current,pe]),E?React.createElement(React.Fragment,null,React.createElement("div",{className:X.featureWrapper,ref:k},g),createPortal(React.createElement("div",{className:X.backdrop},React.createElement(ClickAwayListener,{onClickAway:O},React.createElement(React.Fragment,null,React.createElement("div",{className:X.dot,"data-testid":"dot",style:{left:W==null?void 0:W.dotLeft,top:W==null?void 0:W.dotTop,width:W==null?void 0:W.dotSize,height:W==null?void 0:W.dotSize,borderWidth:W==null?void 0:W.borderWidth},onClick:O,onKeyDown:O,role:"button",tabIndex:0},React.createElement("div",{className:X.pulseCircle})),React.createElement("div",{className:X.text,"data-testid":"text",style:{left:W==null?void 0:W.textLeft,top:W==null?void 0:W.textTop,width:W==null?void 0:W.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},l),React.createElement(Typography,null,d))))),N)):React.createElement(React.Fragment,null,g)}var Oe=e(35292);const _e=(0,m.Z)(n=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:"gray",cursor:"default"},primary:{color:n.palette.primary.main},secondary:{color:n.palette.secondary.main},label:{fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function Bt({color:n="primary",disabled:o=!1,href:l="#",icon:d=t.createElement(Oe.Z,null),label:g,onClick:E,title:O}){const N=_e();return o?t.createElement(b.Z,{title:O,className:v()(N.link,N.disabled),underline:"none"},d,t.createElement("span",{className:N.label},g)):t.createElement(b.Z,{title:O,className:v()(N.link,N[n]),to:l,component:P,onClick:E},d,t.createElement("span",{className:N.label},g))}const Mt=(0,m.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function Nn(n){const{links:o}=n,l=Mt();return t.createElement("nav",{className:l.links},o.map((d,g)=>t.createElement(Bt,{key:g+1,...d})))}const Yn=n=>{const o=n==="dark"?"16%":"97%";return`
14
+ hsl(0, 0%, ${o}) 0%,
15
+ hsla(0, 0%, ${o}, 0.987) 8.1%,
16
+ hsla(0, 0%, ${o}, 0.951) 15.5%,
17
+ hsla(0, 0%, ${o}, 0.896) 22.5%,
18
+ hsla(0, 0%, ${o}, 0.825) 29%,
19
+ hsla(0, 0%, ${o}, 0.741) 35.3%,
20
+ hsla(0, 0%, ${o}, 0.648) 41.2%,
21
+ hsla(0, 0%, ${o}, 0.55) 47.1%,
22
+ hsla(0, 0%, ${o}, 0.45) 52.9%,
23
+ hsla(0, 0%, ${o}, 0.352) 58.8%,
24
+ hsla(0, 0%, ${o}, 0.259) 64.7%,
25
+ hsla(0, 0%, ${o}, 0.175) 71%,
26
+ hsla(0, 0%, ${o}, 0.104) 77.5%,
27
+ hsla(0, 0%, ${o}, 0.049) 84.5%,
28
+ hsla(0, 0%, ${o}, 0.013) 91.9%,
29
+ hsla(0, 0%, ${o}, 0) 100%
30
+ `},Ur=100,ir=10,Nr=(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:Ur,height:`calc(100% + ${ir}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-ir,background:`linear-gradient(90deg, ${Yn(n.palette.type)})`},fadeRight:{right:-ir,background:`linear-gradient(270deg, ${Yn(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function Zr(n){const[[o,l],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const g=n.current;if(!g){d([0,0]);return}const E=()=>{const O=g.scrollLeft,N=g.scrollWidth-g.offsetWidth-g.scrollLeft;d([O,N])};return E(),g.addEventListener("scroll",E),window.addEventListener("resize",E),()=>{g.removeEventListener("scroll",E),window.removeEventListener("resize",E)}},[n]),[o,l]}function Zn(n,o,l){const[d,g]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const E=performance.now(),O=requestAnimationFrame(N=>{if(!n.current)return;const k=N-E,W=Math.abs(d)*k/o,X=Math.max(l,W)*Math.sign(d);n.current.scrollBy({left:X});const pe=d-X;Math.sign(d)!==Math.sign(pe)?g(0):g(pe)});return()=>cancelAnimationFrame(O)},[n,d,o,l]),g}function Bn(n){const{scrollStep:o=100,scrollSpeed:l=50,minScrollDistance:d=5,children:g,...E}=n,O=Nr(n),N=React.useRef(),[k,W]=Zr(N),te=Zn(N,l,d),X=pe=>{!N.current||te(pe?o:-o)};return React.createElement("div",{...E,className:O.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:O.container,ref:N},g),React.createElement("div",{className:classNames(O.fade,O.fadeLeft,{[O.fadeHidden]:k===0})}),React.createElement("div",{className:classNames(O.fade,O.fadeRight,{[O.fadeHidden]:W===0})}),k>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>X(!1),className:classNames(O.button,O.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),W>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>X(!0),className:classNames(O.button,O.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Jn=(0,m.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function lr(n){const o=Jn(n),{shorthand:l,alpha:d}=n;return l?React.createElement("span",{className:o[d?"alpha":"beta"],style:{fontSize:"120%"}},d?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:o[d?"alpha":"beta"]},d?"Alpha":"Beta")}const Sr=(0,t.lazy)(()=>Promise.all([e.e(3860),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function zr(n){const{Progress:o}=(0,c.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(o,null)},t.createElement(Sr,{...n}))}const Qn=(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"}),Cr={code:({inline:n,className:o,children:l,...d})=>{const g=String(l).replace(/\n+$/,""),E=/language-(\w+)/.exec(o||"");return!n&&E?t.createElement(Re,{language:E[1],text:g}):t.createElement("code",{className:o,...d},l)}};function Wr(n){const{content:o,dialect:l="gfm",linkTarget:d}=n,g=Qn();return React.createElement(ReactMarkdown,{remarkPlugins:l==="gfm"?[gfm]:[],className:g.markdown,children:o,components:Cr,linkTarget:d})}var er=e(10179);const En=(0,m.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),tr=({request:n,busy:o,setBusy:l})=>{const d=En(),[g,E]=useState(),O=async()=>{l(!0);try{await n.trigger()}catch(k){E(isError(k)?k.message:"An unspecified error occurred")}finally{l(!1)}},N=n.provider.icon;return React.createElement(ListItem,{disabled:o,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:O},"Log in"))};var nr=null;const Tr=(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 cr(n){const o=Tr(),[l,d]=useState(!1),g=useApi(oauthRequestApiRef),E=useObservable(useMemo(()=>g.authRequest$(),[g]),[]),O=()=>{E.forEach(N=>N.reject())};return React.createElement(Dialog,{open:Boolean(E.length),fullWidth:!0,maxWidth:"xs",classes:{paper:o.dialog},"aria-labelledby":"oauth-req-dialog-title"},React.createElement("main",null,React.createElement(DialogTitle,{classes:{root:o.title},id:"oauth-req-dialog-title"},React.createElement(Typography,{className:o.titleHeading,variant:"h1"},"Login Required")),React.createElement(DialogContent,{dividers:!0,classes:{root:o.contentList}},React.createElement(List,null,E.map(N=>React.createElement(LoginRequestListItem,{key:N.provider.title,request:N,busy:l,setBusy:d}))))),React.createElement(DialogActions,{classes:{root:o.actionButtons}},React.createElement(Button,{onClick:O},"Reject All")))}var ur=e(15277),br=e.n(ur),Hr=e(29862);const rr=(0,m.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Pr(n){var O;const[o,l]=(0,t.useState)(!1),d=(0,Hr.t)(),g=rr(),E=N=>{d()&&l(N)};return t.createElement(Q.ZP,{title:(O=n.title)!=null?O:n.text||"",placement:n.placement,disableHoverListener:!o},t.createElement(br(),{text:n.text,line:n.line,onToggled:E,containerClassName:g.container}))}var jr=e(67358);function dr(n){const[o,l]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>l(!0),250);return()=>clearTimeout(d)},[]),o?t.createElement(jr.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Ir=e(94339),fr=e(14503),Lr=e(24579),mr=e(32552),en=e(15459),Pn=e(95544),Or=e(27597);const In=(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 hr(n){const{link:o,title:l,onClick:d}=n,g=In();return t.createElement("div",null,t.createElement(bn.Z,null),t.createElement(P,{to:o,onClick:d,underline:"none"},t.createElement(Pn.Z,{display:"flex",alignItems:"center",className:g.root},t.createElement(Pn.Z,{className:g.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(Je.Z,null,t.createElement("strong",null,l))),t.createElement(Or.Z,{className:g.arrow}))))}const jn=n=>{const{slackChannel:o}=n;if(o){if(typeof o=="string")return t.createElement(t.Fragment,null,"Please contact ",o," for help.");if(!o.href)return t.createElement(t.Fragment,null,"Please contact ",o.name," for help.")}else return null;return t.createElement(B,{to:o.href,variant:"contained"},o.name)},Vn=class extends t.Component{constructor(o){super(o),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(o,l){console.error(`ErrorBoundary, error: ${o}, info: ${l}`),this.setState({error:o,errorInfo:l})}render(){const{slackChannel:o,children:l}=this.props,{error:d}=this.state;return d?t.createElement(pn,{title:"Something Went Wrong",error:d},t.createElement(jn,{slackChannel:o})):l}},gr=(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"}),xr=(0,en.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(fr.Z),pr={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:o,subheader:l,divider:d=!0,deepLink:g,slackChannel:E,errorBoundaryProps:O,variant:N,children:k,headerStyle:W,headerProps:te,icon:X,action:pe,actionsClassName:Ee,actions:Ae,cardClassName:ot,actionsTopRight:xt,className:$t,noPadding:Ht,titleTypographyProps:nt}=n,Pt=gr();let Dt={},tn={};N&&N.split(/[\s]+/g).forEach(Tt=>{Dt={...Dt,...pr.card[Tt]},tn={...tn,...pr.cardContent[Tt]}});const Xn=()=>t.createElement("div",{className:Pt.headerSubheader},l&&t.createElement("div",{className:Pt.subheader},l),X),On=O||(E?{slackChannel:E}:{});return t.createElement(Ir.Z,{style:Dt,className:$t},t.createElement(Vn,{...On},o&&t.createElement(mr.Z,{classes:{root:Pt.header,title:Pt.headerTitle,subheader:Pt.headerSubheader,avatar:Pt.headerAvatar,action:Pt.headerAction,content:Pt.headerContent},title:o,subheader:Xn(),action:pe,style:{...W},titleTypographyProps:nt,...te}),xt&&t.createElement(xr,null,xt),d&&t.createElement(bn.Z,null),t.createElement(Lr.Z,{className:v()(ot,{[Pt.noPadding]:Ht}),style:tn},k),Ae&&t.createElement(fr.Z,{className:Ee},Ae),g&&t.createElement(hr,{...g})))}var Vr=e(39307);const Gr=(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"}),yr={fractional:!0,inverse:!1,unit:"%",max:100},I=({palette:n,value:o,inverse:l,max:d})=>{if(isNaN(o))return"#ddd";const g=d||yr.max,E=l?g-o:o;return E<g/3?n.status.error:E<g*(2/3)?n.status.warning:n.status.ok};function q(n){const[o,l]=useState(null),{getColor:d=I}=n,g=Gr(n),{palette:E}=useTheme(),{value:O,fractional:N,inverse:k,unit:W,max:te,description:X}={...yr,...n},pe=N?Math.round(O*te):O,Ee=te!==100?Math.round(O):pe,[Ae,ot]=useState(!1);return useEffect(()=>{const xt=o,$t=()=>ot(!0),Ht=()=>ot(!1);return xt&&X?(xt.addEventListener("mouseenter",$t),xt.addEventListener("mouseleave",Ht),()=>{xt.removeEventListener("mouseenter",$t),xt.removeEventListener("mouseleave",Ht)}):()=>{ot(!1)}},[X,o]),React.createElement("div",{ref:l,className:g.root},React.createElement(Circle,{strokeLinecap:"butt",percent:pe,strokeWidth:12,trailWidth:12,strokeColor:d({palette:E,value:Ee,inverse:k,max:te}),className:g.circle}),X&&Ae?React.createElement("div",{className:g.description},X):React.createElement("div",{className:g.overlay},isNaN(O)?"N/A":`${Ee}${W}`))}const ce=(0,m.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function be(n){const o=ce(n),{title:l,subheader:d,progress:g,inverse:E,deepLink:O,description:N,icon:k,variant:W,getColor:te}=n,X={inverse:E,description:N,getColor:te,value:g};return React.createElement("div",{className:o.root},React.createElement(InfoCard,{title:l,subheader:d,deepLink:O,variant:W,icon:k},React.createElement(Gauge,{...X})))}function je(n){const{value:o,getColor:l=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(o))return null;let g=Math.round(o*100*100)/100;g>100&&(g=100);const E=l({palette:d,value:g,inverse:!1,max:100});return React.createElement(Tooltip,{title:`${g}%`},React.createElement("span",null,React.createElement(Line,{percent:g,strokeWidth:4,trailWidth:4,strokeColor:E})))}var st=e(21324),ct=e(7089),R=e(1292),C=e(42494),U=e(74603),z=e(56939),J=e(12231),Y=e(73698),le=e(72379);const ge=(0,m.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Ce=()=>{const n=ge();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 Ie=(0,m.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var Ze=()=>{const n=Ie();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 mt=(0,en.Z)(n=>(0,a.Z)({root:{"label + &":{marginTop:n.spacing(3)}},input:{borderRadius:4,position:"relative",backgroundColor:n.palette.background.paper,border:"1px solid #ced4da",fontSize:16,padding:"10px 26px 10px 12px",transition:n.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:n.palette.background.paper,borderRadius:4}}}),{name:"BackstageSelectInputBase"})(U.Z),Ve=(0,m.Z)(n=>(0,a.Z)({formControl:{margin:`${n.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:n.typography.fontFamily,color:n.palette.text.primary,"&.Mui-focused":{color:n.palette.text.primary}},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 Ue(n){const{multiple:o,items:l,label:d,placeholder:g,selected:E,onChange:O,triggerReset:N,native:k=!1,disabled:W=!1}=n,te=Ve(),[X,pe]=(0,t.useState)(E||(o?[]:"")),[Ee,Ae]=(0,t.useState)(!1);(0,t.useEffect)(()=>{pe(o?[]:"")},[N,o]),(0,t.useEffect)(()=>{E!==void 0&&pe(E)},[E]);const ot=nt=>{pe(nt.target.value),O(nt.target.value)},xt=nt=>{if(W){nt.preventDefault();return}Ae(Pt=>o&&!(nt.target instanceof HTMLElement)?!0:!Pt)},$t=()=>{Ae(!1)},Ht=nt=>()=>{const Pt=X.filter(Dt=>Dt!==nt);pe(Pt),O(Pt)};return t.createElement("div",{className:te.root},t.createElement(R.Z,{onClickAway:$t},t.createElement(C.Z,{className:te.formControl},t.createElement(z.Z,{className:te.formLabel},d),t.createElement(Y.Z,{value:X,native:k,disabled:W,"data-testid":"select",displayEmpty:!0,multiple:o,onChange:ot,onClick:xt,open:Ee,input:t.createElement(mt,null),label:d,tabIndex:0,renderValue:nt=>{var Pt;return o&&X.length!==0?t.createElement("div",{className:te.chips},nt.map(Dt=>{var tn,Xn;return t.createElement(ct.Z,{key:(tn=l.find(On=>On.value===Dt))==null?void 0:tn.value,label:(Xn=l.find(On=>On.value===Dt))==null?void 0:Xn.label,clickable:!0,onDelete:Ht(Dt),className:te.chip})})):t.createElement(Je.Z,null,X.length===0?g||"":(Pt=l.find(Dt=>Dt.value===nt))==null?void 0:Pt.label)},IconComponent:()=>Ee?t.createElement(Ze,null):t.createElement(Ce,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},g&&!o&&t.createElement(J.Z,{value:[]},g),k?l&&l.map(nt=>t.createElement("option",{value:nt.value,key:nt.value},nt.label)):l&&l.map(nt=>t.createElement(J.Z,{key:nt.value,value:nt.value},o&&t.createElement(st.Z,{color:"primary",checked:X.includes(nt.value)||!1,className:te.checkbox}),nt.label))))))}const vt=()=>{},Wt=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:vt,stepHistory:[],setStepHistory:vt,onStepChange:vt});function un(n){const{children:o,elevated:l,onStepChange:d,activeStep:g=0}=n,[E,O]=useState(g),[N,k]=useState([0]);useEffect(()=>{O(g)},[g]);const W=[];let te;return Children.forEach(o,X=>{isValidElement(X)&&(X.props.end?te=X:W.push(X))}),React.createElement(React.Fragment,null,React.createElement(Wt.Provider,{value:{stepIndex:E,setStepIndex:O,stepHistory:N,setStepHistory:k,onStepChange:d,stepperLength:Children.count(o)}},React.createElement(MuiStepper,{activeStep:E,orientation:"vertical",elevation:l?2:0},W)),E>=Children.count(o)-1&&te)}const vn=(0,m.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),an=({text:n,handleClick:o})=>React.createElement(Button,{onClick:o},n||"Reset"),mn=({text:n,handleClick:o,disabled:l,last:d,stepIndex:g})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:l,"data-testid":`nextButton-${g}`,onClick:o},n||(d?"Finish":"Next")),An=({text:n,handleClick:o,disabled:l,stepIndex:d})=>React.createElement(Button,{onClick:o,"data-testid":`backButton-${d}`,disabled:l},n||"Back"),Dr=({actions:n={},children:o})=>{const l=vn(),{stepperLength:d,stepIndex:g,setStepIndex:E,stepHistory:O,setStepHistory:N,onStepChange:k}=useContext(VerticalStepperContext),W=(Ee,Ae)=>{Ae&&Ae(),k&&k(g,Ee),E(Ee)},te=()=>{const Ee=n.nextStep?n.nextStep(g,d-1):g+1;W(Ee,n.onNext),N([...O,Ee])},X=()=>{O.pop(),W(O[O.length-1],n.onBack),N([...O])},pe=()=>{W(0,n.onRestart),N([0])};return React.createElement("div",{className:l.root},[void 0,!0].includes(n.showBack)&&g!==0&&React.createElement(An,{text:n.backText,handleClick:X,disabled:g===0,stepIndex:g}),[void 0,!0].includes(n.showNext)&&React.createElement(mn,{text:n.nextText,handleClick:te,disabled:!!d&&g>=d||!!n.canNext&&!n.canNext(),stepIndex:g}),n.showRestart&&g!==0&&React.createElement(an,{text:n.restartText,handleClick:pe,stepIndex:g}),o)},Er=(0,m.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function no(n){const{title:o,children:l,end:d,actions:g,...E}=n,O=Er();return d?React.createElement("div",{className:O.end},React.createElement(Typography,{variant:"h6"},o),l,React.createElement(SimpleStepperFooter,{actions:{...g||{},showNext:!1}})):React.createElement(MuiStep,{...E},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},o)),React.createElement(StepContent,null,l,React.createElement(SimpleStepperFooter,{actions:g})))}const Jt=(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 Rn(n){const o=Jt(n);return React.createElement("span",{className:classNames(o.status,o.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function Fr(n){const o=Jt(n);return React.createElement("span",{className:classNames(o.status,o.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function ro(n){const o=Jt(n);return React.createElement("span",{className:classNames(o.status,o.error),"aria-label":"Status error","aria-hidden":"true",...n})}function Gi(n){const o=Jt(n);return React.createElement("span",{className:classNames(o.status,o.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function Ki(n){const o=Jt(n);return React.createElement("span",{className:classNames(o.status,o.running),"aria-label":"Status running","aria-hidden":"true",...n})}function ki(n){const o=Jt(n);return React.createElement("span",{className:classNames(o.status,o.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var Yi=e(74600),po=e(15584);const ca=n=>(0,a.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),ua={root:{border:"0",verticalAlign:"top"}},da=n=>(0,a.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),fa=n=>(0,a.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),ma=(0,en.Z)(ca,{name:"BackstageMetadataTableTitleCell"})(po.Z),ha=(0,en.Z)(ua,{name:"BackstageMetadataTableCell"})(po.Z),Ji=({dense:n,children:o})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,o)),Qi=({title:n,children:o,...l})=>React.createElement(TableRow,null,n&&React.createElement(ma,null,n),React.createElement(ha,{colSpan:n?1:2,...l},o)),yo=(0,en.Z)(da,{name:"BackstageMetadataTableList"})(({classes:n,children:o})=>t.createElement("ul",{className:n.root},o)),Xi=(0,en.Z)(fa,{name:"BackstageMetadataTableListItem"})(({classes:n,children:o})=>t.createElement("li",{className:n.root},o)),Eo=(0,a.Z)({root:{margin:"0 0",listStyleType:"none"}}),ga=n=>(0,a.Z)({root:{...Eo.root,paddingLeft:n.spacing(1)}}),vo=(0,en.Z)(Eo,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:o})=>t.createElement(yo,{classes:n},o)),Ao=(0,en.Z)(ga,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:o})=>t.createElement(yo,{classes:n},o));function pa(n,o){const l=n.map((d,g)=>React.createElement(MetadataListItem,{key:g},oo(d)));return o?React.createElement(Ao,null,l):React.createElement(vo,null,l)}function ya(n,o,l){const d=Object.keys(n).map(g=>{const E=oo(n[g],!0),O=l&&l.titleFormat?l.titleFormat(g):startCase(g);return React.createElement(MetadataListItem,{key:g},`${O}: `,E)});return o?React.createElement(Ao,null,d):React.createElement(vo,null,d)}function oo(n,o,l){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?ya(n,o,l):Array.isArray(n)?pa(n,l):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const Ea=({value:n,options:o})=>React.createElement(Fragment,null,oo(n,o)),va=({title:n,value:o,options:l})=>React.createElement(MetadataTableItem,{title:l&&l.titleFormat?l.titleFormat(n):startCase(n)},React.createElement(Ea,{value:o,options:l}));function Aa(n,o){return Object.keys(n).map(l=>React.createElement(va,{key:l,title:l,value:n[l],options:o}))}function qi(n){const{metadata:o,dense:l=!0,options:d}=n,g=Aa(o,d||{});return React.createElement(MetadataTable,{dense:l},g)}var Ra=e(49429),Sa=e(86136),Ro=e(79784),Br=e(76635),Ca=e(19126),So=e.n(Ca);function Ta(n){return qs.stringify(n,{strictNullHandling:!0})}function Co(n){return qs.parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function To(n,o){return Co(n)[o]}function ba(n,o,l){const d={...Co(n),[o]:l};return Ta(d)}function _i(n,o=250){const[l,d]=useSearchParams(),g=l.toString(),[E,O]=useState(To(g,n));return useEffect(()=>{const N=To(g,n);O(k=>isEqual(N,k)?k:N)},[g,O,n]),useDebouncedEffect(()=>{const N=ba(g,n,E);g!==N&&d(N,{replace:!0})},[d,E,g,n],o),[E,O]}const Pa={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 bo(){const o=(0,c.useApiHolder)().get(c.configApiRef),l=o==null?void 0:o.getOptionalConfig("app.support");return l?{url:l.getString("url"),items:l.getConfigArray("items").flatMap(d=>{var g;return{title:d.getString("title"),icon:d.getOptionalString("icon"),links:((g=d.getOptionalConfigArray("links"))!=null?g:[]).flatMap(E=>({url:E.getString("url"),title:E.getString("title")}))}})}:Pa}var Ia=e(80079);function Mn(n,o){const d=(0,c.useApp)().getSystemIcon(n);return d?t.createElement(d,{...o}):t.createElement(Ia.Z,{...o})}function el(n){return Mn("brokenImage",n)}function tl(n){return Mn("catalog",n)}function nl(n){return Mn("chat",n)}function rl(n){return Mn("dashboard",n)}function ol(n){return Mn("docs",n)}function al(n){return Mn("email",n)}function sl(n){return Mn("github",n)}function il(n){return Mn("group",n)}function Kr(n){return Mn("help",n)}function ll(n){return Mn("user",n)}function cl(n){return Mn("warning",n)}const La=(0,m.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Oa=({icon:n})=>{var d;const o=(0,c.useApp)(),l=n&&(d=o.getSystemIcon(n))!=null?d:Kr;return t.createElement(l,null)},xa=({link:n})=>{var o;return t.createElement(P,{to:n.url},(o=n.title)!=null?o:n.url)},Da=({item:n})=>{var o;return t.createElement(Ke.Z,null,t.createElement(Sa.Z,null,t.createElement(Oa,{icon:n.icon})),t.createElement(Lt.Z,{primary:n.title,secondary:(o=n.links)==null?void 0:o.reduce((l,d,g)=>[...l,g>0&&t.createElement("br",{key:g}),t.createElement(xa,{link:d,key:d.url})],[])}))};function Fa(n){const{title:o,children:l}=n,{items:d}=bo(),[g,E]=(0,t.useState)(!1),[O,N]=(0,t.useState)(null),k=La(),W=(0,Me.Z)(pe=>pe.breakpoints.down("sm")),te=pe=>{N(pe.currentTarget),E(!0)},X=()=>{E(!1)};return t.createElement(t.Fragment,null,t.createElement(Pn.Z,{display:"flex",ml:1},W?t.createElement(V.Z,{color:"primary",size:"small",onClick:te,"data-testid":"support-button"},t.createElement(Kr,null)):t.createElement(y.Z,{"data-testid":"support-button","aria-label":"support",color:"primary",onClick:te,startIcon:t.createElement(Kr,null)},"Support")),t.createElement(Ro.ZP,{"data-testid":"support-button-popover",open:g,anchorEl:O,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:X},t.createElement(ht.Z,{className:k.popoverList},o&&t.createElement(Ke.Z,{alignItems:"flex-start"},t.createElement(Je.Z,{variant:"subtitle1"},o)),t.Children.map(l,(pe,Ee)=>t.createElement(Ke.Z,{alignItems:"flex-start",key:`child-${Ee}`},pe)),d&&d.map((pe,Ee)=>t.createElement(Da,{item:pe,key:`item-${Ee}`}))),t.createElement(Ra.Z,null,t.createElement(y.Z,{color:"primary",onClick:X},"Close"))))}var ao=e(18671),Ln=e(10289);const kr=72,Po=24,Io=18,Kn={drawerWidthClosed:kr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:kr,iconSize:kr-Po*2,iconPadding:Po,selectedIndicatorWidth:3,userBadgePadding:Io,userBadgeDiameter:kr-Io*2,mobileSidebarHeight:56},Ba=n=>({...Kn,...n,iconContainerWidth:Kn.drawerWidthClosed,iconSize:Kn.drawerWidthClosed-Kn.iconPadding*2,userBadgeDiameter:Kn.drawerWidthClosed-Kn.userBadgePadding*2}),Lo={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:Kn.defaultOpenDelayMs+200},Ma=n=>({...Lo,...n}),ul="@backstage/core/sidebar-intro-dismissed",Mr=(0,t.createContext)({isOpen:!1,setOpen:()=>{}}),zn=(0,t.createContext)({sidebarConfig:Kn,submenuConfig:Lo}),Oo=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var Yr;(function(n){const o="sidebarPinState";n.SIDEBAR_PIN_STATE=o})(Yr||(Yr={}));const xo={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))}},wa=(0,m.Z)(n=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:o=>o.isPinned?o.sidebarConfig.drawerWidthOpen:o.sidebarConfig.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:o=>o.sidebarConfig.mobileSidebarHeight}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),vr=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1}),Do=(0,t.createContext)({content:{contentRef:void 0}});function $a(n){const[o,l]=(0,t.useState)(()=>xo.getSidebarPinState()),{sidebarConfig:d}=(0,t.useContext)(zn),g=(0,t.useRef)(null),E=(0,t.useMemo)(()=>({content:{contentRef:g}}),[g]);(0,t.useEffect)(()=>{xo.setSidebarPinState(o)},[o]);const O=(0,Me.Z)(W=>W.breakpoints.down("xs"),{noSsr:!0}),N=()=>l(!o),k=wa({isPinned:o,sidebarConfig:d});return t.createElement(vr.Provider,{value:{isPinned:o,toggleSidebarPinState:N,isMobile:O}},t.createElement(Do.Provider,{value:E},t.createElement("div",{className:k.root},n.children)))}function Fo(){const{content:n}=(0,t.useContext)(Do);return{focusContent:(0,t.useCallback)(()=>{var l,d;(d=(l=n==null?void 0:n.contentRef)==null?void 0:l.current)==null||d.focus()},[n]),contentRef:n==null?void 0:n.contentRef}}var Ua=e(50023),Na=e(4190),Za=e(87685),za=e(44882),Wa=e(57998);const Ha=(0,m.Z)(n=>({root:{flexGrow:0,margin:n.spacing(0,2),color:n.palette.navigation.color},selected:o=>({color:`${n.palette.navigation.selectedColor}!important`,borderTop:`solid ${o.sidebarConfig.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),ja=n=>{const{to:o,label:l,icon:d,value:g}=n,{sidebarConfig:E}=(0,t.useContext)(zn),O=Ha({sidebarConfig:E}),N=(0,Ln.TH)(),{selectedMenuItemIndex:k,setSelectedMenuItemIndex:W}=(0,t.useContext)(wo),te=(pe,Ee)=>{W(Ee===k?-1:Ee)},X=g===k&&k>=0||g!==k&&!(k>=0)&&o===N.pathname;return t.createElement(Wa.Z,{label:l,icon:d,component:P,to:o||N.pathname,onChange:te,value:g,selected:X,classes:O})},Bo=n=>{const{children:o,to:l,label:d,icon:g,value:E}=n,{isMobile:O}=(0,t.useContext)(vr);return O?t.createElement(ja,{to:l,label:d,icon:g,value:E}):t.createElement(t.Fragment,null,o)},Mo=(0,m.Z)(n=>({root:{position:"fixed",backgroundColor:n.palette.navigation.background,color:n.palette.navigation.color,bottom:0,left:0,right:0,zIndex:n.zIndex.snackbar,borderTop:"1px solid #383838"},overlay:o=>({background:n.palette.navigation.background,width:"100%",bottom:`${o.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${o.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:n.palette.bursts.fontColor,alignItems:"center",justifyContent:"space-between",padding:n.spacing(2,3)},overlayHeaderClose:{color:n.palette.bursts.fontColor},marginMobileSidebar:o=>({marginBottom:`${o.sidebarConfig.mobileSidebarHeight}px`})})),Va=n=>(0,Br.orderBy)(n,({props:{priority:o}})=>Number.isInteger(o)?o:-1,"desc"),Ga=t.createElement(Bo).type,Ka=({children:n,label:o="Menu",open:l,onClose:d})=>{const{sidebarConfig:g}=(0,t.useContext)(zn),E=Mo({sidebarConfig:g});return t.createElement(Na.ZP,{anchor:"bottom",open:l,onClose:d,ModalProps:{BackdropProps:{classes:{root:E.marginMobileSidebar}}},classes:{root:E.marginMobileSidebar,paperAnchorBottom:E.overlay}},t.createElement(Pn.Z,{className:E.overlayHeader},t.createElement(Je.Z,{variant:"h3"},o),t.createElement(V.Z,{onClick:d,classes:{root:E.overlayHeaderClose}},t.createElement(Za.Z,null))),t.createElement(Pn.Z,{component:"nav"},n))},wo=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),ka=n=>{const{sidebarConfig:o}=(0,t.useContext)(zn),{children:l}=n,d=Mo({sidebarConfig:o}),g=(0,Ln.TH)(),[E,O]=(0,t.useState)(-1);(0,t.useEffect)(()=>{O(-1)},[g.pathname]);let N=(0,c.useElementFilter)(l,W=>W.getElements().filter(te=>te.type===Ga));if(l)N.length?N=Va(N):N.push(t.createElement(Bo,{key:"default_menu",icon:t.createElement(za.Z,null)},l));else return null;const k=E>=0&&!N[E].props.to;return t.createElement(Mr.Provider,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(wo.Provider,{value:{selectedMenuItemIndex:E,setSelectedMenuItemIndex:O}},t.createElement(Ka,{label:N[E]&&N[E].props.label,open:k,onClose:()=>O(-1)},N[E]&&N[E].props.children),t.createElement(Ua.Z,{className:d.root,"data-testid":"mobile-sidebar-root",component:"nav"},N)))},$o=(0,m.Z)(n=>({drawer:o=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:n.zIndex.appBar,background:n.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:o.sidebarConfig.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:o=>({width:o.sidebarConfig.drawerWidthOpen,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var Sn;(function(n){n[n.Closed=0]="Closed";const l=0+1;n[n.Idle=l]="Idle";const d=l+1;n[n.Open=d]="Open"})(Sn||(Sn={}));const Ya=n=>{const{sidebarConfig:o}=(0,t.useContext)(zn),{openDelayMs:l=o.defaultOpenDelayMs,closeDelayMs:d=o.defaultCloseDelayMs,disableExpandOnHover:g,children:E}=n,O=$o({sidebarConfig:o}),N=(0,Me.Z)($t=>$t.breakpoints.down("md"),{noSsr:!0}),[k,W]=(0,t.useState)(Sn.Closed),te=(0,t.useRef)(),{isPinned:X,toggleSidebarPinState:pe}=(0,t.useContext)(vr),Ee=()=>{X||g||(te.current&&(clearTimeout(te.current),te.current=void 0),k!==Sn.Open&&!N&&(te.current=window.setTimeout(()=>{te.current=void 0,W(Sn.Open)},l),W(Sn.Idle)))},Ae=()=>{X||g||(te.current&&(clearTimeout(te.current),te.current=void 0),k===Sn.Idle?W(Sn.Closed):k===Sn.Open&&(te.current=window.setTimeout(()=>{te.current=void 0,W(Sn.Closed)},d)))},ot=k===Sn.Open&&!N||X,xt=$t=>{$t?(W(Sn.Open),pe()):(W(Sn.Closed),pe())};return t.createElement("nav",{style:{},"aria-label":"sidebar nav"},t.createElement(Qa,null),t.createElement(Mr.Provider,{value:{isOpen:ot,setOpen:xt}},t.createElement("div",{className:O.root,"data-testid":"sidebar-root",onMouseEnter:g?()=>{}:Ee,onFocus:g?()=>{}:Ee,onMouseLeave:g?()=>{}:Ae,onBlur:g?()=>{}:Ae},t.createElement("div",{className:v()(O.drawer,{[O.drawerOpen]:ot})},E))))},Ja=n=>{var k,W;const o=Ba((k=n.sidebarOptions)!=null?k:{}),l=Ma((W=n.submenuOptions)!=null?W:{}),{children:d,disableExpandOnHover:g,openDelayMs:E,closeDelayMs:O}=n,{isMobile:N}=(0,t.useContext)(vr);return N?t.createElement(ka,null,d):t.createElement(zn.Provider,{value:{sidebarConfig:o,submenuConfig:l}},t.createElement(Ya,{openDelayMs:E,closeDelayMs:O,disableExpandOnHover:g},d))};function Qa(){const{sidebarConfig:n}=(0,t.useContext)(zn),{focusContent:o,contentRef:l}=Fo(),d=$o({sidebarConfig:n});return l!=null&&l.current?t.createElement(y.Z,{onClick:o,variant:"contained",className:v()(d.visuallyHidden)},"Skip to content"):null}function Uo(n,o){const l=new URLSearchParams(o.search).toString(),d=So().parse(l),g=new URLSearchParams(n.search).toString(),E=So().parse(g);return(0,Br.isEqual)(o.pathname,n.pathname)&&(0,Br.isMatch)(E,d)}const Xa=(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"},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"}),dl=n=>{const{title:o,to:l,icon:d,dropdownItems:g}=n,E=Xa(),{setIsHoveredOn:O}=useContext(SidebarItemWithSubmenuContext),N=()=>{O(!1)},k=useResolvedPath(l!=null?l:""),W=useLocation();let te=isLocationMatch(W,k);const[X,pe]=useState(!1),Ee=()=>{pe(!X)};return g!==void 0?(g.some(Ae=>{const ot=resolvePath(Ae.to);return te=isLocationMatch(W,ot),te}),React.createElement("div",{className:E.itemContainer},React.createElement(Tooltip,{title:o,enterDelay:500,enterNextDelay:500},React.createElement("button",{onClick:Ee,onTouchStart:Ae=>Ae.stopPropagation(),className:classnames(E.item,te?E.selected:void 0)},d&&React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:E.label},o),X?React.createElement(ArrowDropUpIcon,{className:E.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:E.dropdownArrow}))),g&&X&&React.createElement("div",{className:E.dropdown},g.map((Ae,ot)=>React.createElement(Tooltip,{key:ot,title:Ae.title,enterDelay:500,enterNextDelay:500},React.createElement(Link,{to:Ae.to,underline:"none",className:E.dropdownItem,onClick:N,onTouchStart:xt=>xt.stopPropagation()},React.createElement(Typography,{className:E.textContent},Ae.title))))))):React.createElement("div",{className:E.itemContainer},React.createElement(Tooltip,{title:o,enterDelay:500,enterNextDelay:500},React.createElement(Link,{to:l,underline:"none",className:classnames(E.item,te?E.selected:void 0),onClick:N,onTouchStart:Ae=>Ae.stopPropagation()},d&&React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:E.label},o))))},qa=(0,m.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:o=>{var l,d;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[n.breakpoints.up("sm")]:{marginLeft:o.left,transition:n.transitions.create("margin-left",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(d=(l=n.palette.navigation.submenu)==null?void 0:l.background)!=null?d:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:o.submenuConfig.drawerWidthClosed,transitionDelay:`${o.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}},drawerOpen:o=>({width:o.submenuConfig.drawerWidthOpen,[n.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:n.spacing(3),left:0,top:0}}),title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[n.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),_a=n=>{const{isOpen:o}=(0,t.useContext)(Mr),{sidebarConfig:l,submenuConfig:d}=(0,t.useContext)(zn),g=o?l.drawerWidthOpen:l.drawerWidthClosed,E=qa({left:g,submenuConfig:d}),{isHoveredOn:O}=(0,t.useContext)(Oo),[N,k]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{k(O)},[O]),t.createElement("div",{className:v()(E.drawer,{[E.drawerOpen]:N})},t.createElement(Je.Z,{variant:"h5",className:E.title},n.title),n.children)};var Jr=e(76600),es=e(26739),No=e(98989),ts=e(59797),ns=e(83543);const rs=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),fl=()=>{const n=rs();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 ml=null;const os=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),hl=()=>{const n=os();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 gl=null;const as=n=>(0,m.Z)(o=>{var l,d,g,E;return{root:{color:o.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"100%",margin:0,padding:0,textAlign:"inherit",font:"inherit"},closed:{width:n.drawerWidthClosed,justifyContent:"center"},open:{[o.breakpoints.up("sm")]:{width:n.drawerWidthOpen}},highlightable:{"&:hover":{background:(d=(l=o.palette.navigation.navItem)==null?void 0:l.hoverBackground)!=null?d:"#404040"}},highlighted:{background:(E=(g=o.palette.navigation.navItem)==null?void 0:g.hoverBackground)!=null?E:"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:{boxSizing:"border-box",height:"100%",width:n.iconContainerWidth,marginRight:-o.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:o.typography.fontSize},searchFieldHTMLInput:{padding:o.spacing(2,0,2)},searchContainer:{width:n.drawerWidthOpen-n.iconContainerWidth},secondaryAction:{width:o.spacing(6),textAlign:"center",marginRight:o.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:o.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${n.selectedIndicatorWidth}px ${o.palette.navigation.indicator}`,color:o.palette.navigation.selectedColor},"&$closed":{width:n.drawerWidthClosed},"& $closedItemIcon":{paddingRight:n.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-n.selectedIndicatorWidth}}}},{name:"BackstageSidebarItem"});function Qr(n){return(0,t.useMemo)(()=>as(n),[n])()}const ss=(n,o)=>(0,c.useElementFilter)(n.props.children,l=>{let d=!1;return l.getElements().forEach(({props:{to:g,dropdownItems:E}})=>{if(!d){if(E!=null&&E.length){E.forEach(({to:O})=>d=d||Uo(o,(0,Ln.i3)(O)));return}g&&(d=Uo(o,(0,Ln.i3)(g)))}}),d},[o.pathname]);function Zo(n){return n.to===void 0}const is=t.createElement(_a).type,ls=t.forwardRef(function({to:o,end:l,style:d,className:g,activeStyle:E,caseSensitive:O,activeClassName:N="active","aria-current":k="page",...W},te){let{pathname:X}=(0,Ln.TH)(),{pathname:pe}=(0,Ln.WU)(o);O||(X=X.toLocaleLowerCase("en-US"),pe=pe.toLocaleLowerCase("en-US"));let Ee=X===pe;!Ee&&!l&&(Ee=X.startsWith(`${pe}/`));const Ae=Ee?k:void 0;return t.createElement(L.rU,{...W,to:o,ref:te,"aria-current":Ae,style:{...d,...Ee?E:void 0},className:v()([g,Ee?N:void 0])})}),zo=(0,t.forwardRef)((n,o)=>{const{icon:l,text:d,hasNotifications:g=!1,disableHighlight:E=!1,onClick:O,children:N,className:k,...W}=n,{sidebarConfig:te}=(0,t.useContext)(zn),X=Qr(te),{isOpen:pe}=(0,t.useContext)(Mr),Ee=!pe&&N?{display:"flex",marginLeft:"24px"}:{},Ae=t.createElement("div",{style:Ee},t.createElement(l,{fontSize:"small"}),!pe&&N?t.createElement(No.Z,null):t.createElement(t.Fragment,null)),ot=t.createElement(es.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!g,className:v()({[X.closedItemIcon]:!pe})},Ae),xt=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:X.iconContainer},ot),d&&t.createElement(Je.Z,{variant:"subtitle2",className:X.label},d),t.createElement("div",{className:X.secondaryAction},N)),$t=pe?xt:ot,Ht={onClick:O,className:v()(k,X.root,pe?X.open:X.closed,Zo(n)&&X.buttonItem,{[X.highlightable]:!E})};return Zo(n)?t.createElement("button",{"aria-label":d,...Ht,ref:o},$t):t.createElement(ls,{...Ht,activeClassName:X.selected,to:n.to?n.to:"",ref:o,"aria-label":d||n.to,...W},$t)}),cs=({children:n,...o})=>{const{sidebarConfig:l}=(0,t.useContext)(zn),d=Qr(l),[g,E]=(0,t.useState)(!1),O=(0,Ln.TH)(),N=ss(n,O),k=(0,Me.Z)(pe=>pe.breakpoints.down("sm")),W=()=>{E(!0)},te=()=>{E(!1)},X=()=>k?g?t.createElement(ts.Z,{fontSize:"small",className:d.submenuArrow}):t.createElement(ns.Z,{fontSize:"small",className:d.submenuArrow}):!g&&t.createElement(No.Z,{fontSize:"small",className:d.submenuArrow});return t.createElement(Oo.Provider,{value:{isHoveredOn:g,setIsHoveredOn:E}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:te,onTouchStart:g?te:W,onMouseEnter:W,className:v()(g&&d.highlighted)},t.createElement(zo,{className:N?d.selected:"",...o},X()),g&&n))},Wo=(0,t.forwardRef)((n,o)=>{const[l]=(0,c.useElementFilter)(n.children,d=>d.getElements().filter(g=>g.type===is));return l?t.createElement(cs,{...n},l):t.createElement(zo,{...n,ref:o})});function pl(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),[l,d]=useState(""),g=Qr(o),E=n.icon?n.icon:SearchIcon,O=()=>{n.onSearch(l),d("")},N=X=>{X.key==="Enter"&&(X.preventDefault(),O())},k=X=>{d(X.target.value)},W=X=>{X.preventDefault(),X.stopPropagation()},te=X=>{O(),X.preventDefault()};return React.createElement("div",{className:g.searchRoot},React.createElement(Wo,{icon:E,to:n.to,onClick:te,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:l,onClick:W,onChange:k,onKeyDown:N,className:g.searchContainer,InputProps:{disableUnderline:!0,className:g.searchField},inputProps:{className:g.searchFieldHTMLInput}})))}const yl=(0,Jr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),El=(0,Jr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),us=(0,Jr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),ds=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),vl=(0,Jr.Z)("div")(({theme:n})=>{const o=ds(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":o,"&:hover":o}}),Al=()=>{const{sidebarConfig:n}=useContext(SidebarConfigContext),o=Qr(n),{isOpen:l,setOpen:d}=useContext(SidebarContext);if(useMediaQuery(O=>O.breakpoints.down("md"),{noSsr:!0}))return null;const E=()=>{d(!l)};return React.createElement("button",{onClick:E,className:o.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:o.arrows},l?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},fs=(0,m.Z)(n=>({introCard:o=>({color:"#b5b5b5",fontSize:12,width:o.sidebarConfig.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:o.sidebarConfig.iconPadding,paddingRight:o.sidebarConfig.iconPadding}),introDismiss:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:12},introDismissLink:{color:"#dddddd",display:"flex",alignItems:"center",marginBottom:4,"&:hover":{color:n.palette.linkHover,transition:n.transitions.create("color",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})}},introDismissText:{fontSize:"0.7rem",fontWeight:"bold",textTransform:"uppercase",letterSpacing:1},introDismissIcon:{width:18,height:18,marginRight:12}}),{name:"BackstageSidebarIntro"});function ms(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),l=fs({sidebarConfig:o}),{text:d,onClose:g}=n,E=()=>g();return React.createElement("div",{className:l.introCard},React.createElement(Typography,{variant:"subtitle2"},d),React.createElement("div",{className:l.introDismiss},React.createElement(Link,{component:"button",onClick:E,underline:"none",className:l.introDismissLink},React.createElement(CloseIcon,{className:l.introDismissIcon}),React.createElement(Typography,{component:"span",className:l.introDismissText},"Dismiss"))))}const Ho=n=>{const{text:o,onDismiss:l}=n,[d,g]=useState(!1),E=()=>{g(!0)};return React.createElement(Collapse,{in:!d,onExited:l},React.createElement(ms,{text:o,onClose:E}))},hs=null,gs="And your recently viewed plugins will pop up here!";function Rl(n){const{isOpen:o}=useContext(SidebarContext),l={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,g]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:E,recentlyViewedItemsDismissed:O}=d!=null?d:{},N=()=>{g(W=>({...l,...W,starredItemsDismissed:!0}))},k=()=>{g(W=>({...l,...W,recentlyViewedItemsDismissed:!0}))};return o?React.createElement(React.Fragment,null,!E&&React.createElement(React.Fragment,null,React.createElement(Ho,{text:hs,onDismiss:N}),React.createElement(SidebarDivider,null)),!O&&React.createElement(Ho,{text:gs,onDismiss:k})):null}const ps=(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 jo(n){const{className:o,stretch:l,noPadding:d,children:g,...E}=n,{contentRef:O}=Fo(),N=ps();return t.createElement("article",{ref:O,tabIndex:-1,...E,className:v()(N.root,o,{[N.stretch]:l,[N.noPadding]:d})},g)}var ys=e(6487),Es=e(99152);const vs=(0,m.Z)(n=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:n.palette.background.paper,paddingLeft:n.spacing(3)},defaultTab:{padding:n.spacing(3,3),...n.typography.caption,textTransform:"uppercase",fontWeight:"bold",color:n.palette.text.secondary},selected:{color:n.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:n.palette.background.default,color:n.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function Vo(n){const{tabs:o,onChange:l,selectedIndex:d}=n,[g,E]=(0,t.useState)(d!=null?d:0),O=vs(),N=(k,W)=>{d===void 0&&E(W),l&&l(W)};return(0,t.useEffect)(()=>{d!==void 0&&E(d)},[d]),t.createElement("div",{className:O.tabsWrapper},t.createElement(Es.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:N,value:g},o.map((k,W)=>t.createElement(ys.Z,{...k.tabProps,"data-testid":`header-tab-${W}`,label:k.label,key:k.id,value:W,className:O.defaultTab,classes:{selected:O.selected,root:O.tabRoot}}))))}function As(n){var N,k,W;const o=(0,Ln.UO)(),d=n.map(({path:te,children:X})=>({caseSensitive:!1,path:`${te}/*`,element:X})).sort((te,X)=>X.path.replace(/\/\*$/,"").localeCompare(te.path.replace(/\/\*$/,""))),g=(N=(0,Ln.V$)(d))!=null?N:n[0].children,[E]=(k=(0,Ln.fp)(d,`/${o["*"]}`))!=null?k:[],O=E?n.findIndex(te=>`${te.path}/*`===E.route.path):0;return{index:O===-1?0:O,element:g,route:(W=n[O])!=null?W:n[0]}}function Go(n){const{routes:o}=n,l=(0,Ln.s0)(),{index:d,route:g,element:E}=As(o),O=(0,t.useMemo)(()=>o.map(k=>({id:k.path,label:k.title,tabProps:k.tabProps})),[o]),N=k=>l(o[k].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(Vo,{tabs:O,selectedIndex:d,onChange:N}),t.createElement(jo,null,t.createElement(ao.q,{title:g.title}),E))}const so=()=>null;(0,c.attachComponentData)(so,"core.gatherMountPoints",!0);function Ko(n){const o=t.createElement(so,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(l=>{if(!(0,t.isValidElement)(l))return[];if(l.type===t.Fragment)return Ko(l.props.children);if(l.type!==o)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:g,children:E,tabProps:O}=l.props;return[{path:d,title:g,children:E,tabProps:O}]})}function Rs(n){const o=Ko(n.children);return t.createElement(Go,{routes:o})}Rs.Route=so;const Ss=(0,m.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function Cs(n){const{value:o,subvalue:l}=n,d=Ss();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},o),t.createElement("div",{className:d.subvalue},l))}var Ts=e(21070),bs=e(90324),Ps=e(98281),Is=e(48049),ko=e(51209),Yo=e(33375),Ls=e(44233),Os=e(27604),io=e(36444),xs=e(37971),Ds=e(59709),Fs=e(17373),Bs=e(3702),Ms=e(93111),Xr=e(67222);const ws=(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"}),$s=n=>{var k;const o=ws(),{onChangeFilters:l}=n,[d,g]=(0,t.useState)({...n.selectedFilters}),[E,O]=(0,t.useState)(!1),N=()=>{g({}),O(W=>!W)};return(0,t.useEffect)(()=>{l(d)},[d,l]),t.createElement("div",{className:o.root},t.createElement("div",{className:o.header},t.createElement("div",{className:o.value},"Filters"),t.createElement(y.Z,{color:"primary",onClick:N},"Clear all")),t.createElement("div",{className:o.filters},((k=n.filters)==null?void 0:k.length)&&n.filters.map(W=>t.createElement(Ue,{triggerReset:E,key:W.element.label,...W.element,selected:d[W.element.label],onChange:te=>g({...d,[W.element.label]:te})}))))},Us={Add:(0,t.forwardRef)((n,o)=>t.createElement(Ts.Z,{...n,ref:o})),Check:(0,t.forwardRef)((n,o)=>t.createElement(Ps.Z,{...n,ref:o})),Clear:(0,t.forwardRef)((n,o)=>t.createElement(Yo.Z,{...n,ref:o})),Delete:(0,t.forwardRef)((n,o)=>t.createElement(Ls.Z,{...n,ref:o})),DetailPanel:(0,t.forwardRef)((n,o)=>t.createElement(ko.Z,{...n,ref:o})),Edit:(0,t.forwardRef)((n,o)=>t.createElement(Os.Z,{...n,ref:o})),Export:(0,t.forwardRef)((n,o)=>t.createElement(Bs.Z,{...n,ref:o})),Filter:(0,t.forwardRef)((n,o)=>t.createElement(io.Z,{...n,ref:o})),FirstPage:(0,t.forwardRef)((n,o)=>t.createElement(xs.Z,{...n,ref:o})),LastPage:(0,t.forwardRef)((n,o)=>t.createElement(Ds.Z,{...n,ref:o})),NextPage:(0,t.forwardRef)((n,o)=>t.createElement(ko.Z,{...n,ref:o})),PreviousPage:(0,t.forwardRef)((n,o)=>t.createElement(Is.Z,{...n,ref:o})),ResetSearch:(0,t.forwardRef)((n,o)=>t.createElement(Yo.Z,{...n,ref:o})),Search:(0,t.forwardRef)((n,o)=>t.createElement(io.Z,{...n,ref:o})),SortArrow:(0,t.forwardRef)((n,o)=>t.createElement(bs.Z,{...n,ref:o})),ThirdStateCheck:(0,t.forwardRef)((n,o)=>t.createElement(Fs.Z,{...n,ref:o})),ViewColumn:(0,t.forwardRef)((n,o)=>t.createElement(Ms.Z,{...n,ref:o}))};function Jo(n,o){const l=o.split(".");let d=n[l[0]];for(let g=1;g<l.length;++g){if(d===void 0)return d;const E=l[g];d=d[E]}return d}const Ns=(0,en.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"})(Xr.W$),Qo=(0,en.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(Xr.UW),Zs=(0,m.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),zs=(0,m.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Ws(n,o){return n.map(l=>{const d={};let g=l.cellStyle||{};if(l.highlight)if(d.color=o.palette.textContrast,typeof g=="object")g.fontWeight=o.typography.fontWeightBold;else{const E=g;g=(O,N,k)=>({...E(O,N,k),fontWeight:o.typography.fontWeightBold})}return{...l,headerStyle:d,cellStyle:g}})}function Hs(n,o){return(0,Br.transform)(n,(l,d,g)=>{(0,Br.isEqual)(d,o[g])||(l[g]=d)})}const Xo={search:"",filtersOpen:!1,filters:{}};function js(n){const{toolbarRef:o,setSearch:l,hasFilters:d,selectedFiltersLength:g,toggleFilters:E}=n,O=Zs(),N=(0,t.useCallback)(k=>{n.onSearchChanged(k),l(k)},[n,l]);return d?t.createElement("div",{className:O.root},t.createElement("div",{className:O.root},t.createElement(V.Z,{onClick:E,"aria-label":"filter list"},t.createElement(io.Z,null)),t.createElement(Je.Z,{className:O.title},"Filters (",g,")")),t.createElement(Qo,{...n,ref:o,onSearchChanged:N})):t.createElement(Qo,{...n,ref:o,onSearchChanged:N})}function Vs(n){const{data:o,columns:l,options:d,title:g,subtitle:E,filters:O,initialState:N,emptyContent:k,onStateChange:W,...te}=n,X=zs(),pe=(0,w.Z)(),Ee={...Xo,...N},[Ae,ot]=(0,t.useState)(Ee.filtersOpen),xt=(0,t.useCallback)(()=>ot(sn=>!sn),[ot]),[$t,Ht]=(0,t.useState)(0),[nt,Pt]=(0,t.useState)(o),[Dt,tn]=(0,t.useState)(Ee.filters),Xn=Ws(l,pe),[On,$r]=(0,t.useState)(Ee.search);(0,t.useEffect)(()=>{if(W){const sn=Hs({search:On,filtersOpen:Ae,filters:Dt},Xo);W(sn)}},[On,Ae,Dt,W]);const Tt={headerStyle:{textTransform:"uppercase"}},qn=(0,t.useCallback)(sn=>{var Cn;return(Cn=l.find(xn=>xn.title===sn))==null?void 0:Cn.field},[l]);(0,t.useEffect)(()=>{if(typeof o=="function")return;if(!Dt){Pt(o);return}const sn=Object.values(Dt);if(o&&sn.flat().length){const Cn=o.filter(xn=>!!Object.entries(Dt).filter(([,ar])=>!!ar.length).every(([ar,Qt])=>{const Xt=Jo(xn,qn(ar));return Array.isArray(Xt)&&Array.isArray(Qt)?Xt.some(Ar=>Qt.includes(Ar)):Array.isArray(Xt)?Xt.includes(Qt):Array.isArray(Qt)?Qt.includes(Xt):Xt===Qt}));Pt(Cn)}else Pt(o);Ht(sn.flat().length)},[o,Dt,qn]);const mo=(sn,Cn)=>{const xn=Qt=>{const Xt=new Set,Ar=sr=>{sr!=null&&Xt.add(sr)};return Cn&&Cn.forEach(sr=>{const Rr=Jo(sr,qn(Qt));Array.isArray(Rr)?Rr.forEach(Ar):Ar(Rr)}),Xt},ar=Qt=>({placeholder:"All results",label:Qt.column,multiple:Qt.type==="multiple-select",items:[...xn(Qt.column)].sort().map(Xt=>({label:Xt,value:Xt}))});return sn.map(Qt=>({type:Qt.type,element:ar(Qt)}))},or=!!(O!=null&&O.length),ho=(0,t.useCallback)(sn=>t.createElement(js,{setSearch:$r,hasFilters:or,selectedFiltersLength:$t,toggleFilters:xt,...sn}),[xt,or,$t,$r]),_r=typeof o!="function"&&o.length===0,eo=l.length,go=(0,t.useCallback)(sn=>k&&_r?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:eo},k))):t.createElement(Xr.os,{...sn}),[_r,k,eo]);return t.createElement("div",{className:X.root},Ae&&o&&typeof o!="function"&&(O==null?void 0:O.length)&&t.createElement($s,{filters:mo(O,o),selectedFilters:Dt,onChangeFilters:tn}),t.createElement(Xr.ZP,{components:{Header:Ns,Toolbar:ho,Body:go},options:{...Tt,...d},columns:Xn,icons:Us,title:t.createElement(t.Fragment,null,t.createElement(Je.Z,{variant:"h5",component:"h3"},g),E&&t.createElement(Je.Z,{color:"textSecondary",variant:"body1"},E)),data:typeof o=="function"?o:nt,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...te}))}const Sl=n=>{const{children:o,value:l,index:d,...g}=n;return React.createElement("div",{role:"tabpanel",hidden:l!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...g},l===d&&React.createElement(Box,{p:3},o))},Gs=(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"}),Cl=n=>{const o=Gs(n),{ariaLabel:l,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:o.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":l},n.children)},Ks=(n,o)=>o?n?"20px":"0":"40px",ks=(0,m.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:o=>Ks(o.isFirstNav,o.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}}),{name:"BackstageTab"}),Tl=n=>{const o=ks(n),{isFirstNav:l,isFirstIndex:d,...g}=n;return React.createElement(Tab,{classes:o,disableRipple:!0,...g})},Ys=(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"}),bl=n=>{const o=Ys(n);return React.createElement(Tabs,{classes:o,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},Js=(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 Pl(n){const{tabs:o}=n,l=Js(),[d,g]=useState([0,0]),[E,O]=useState(0),[N,k]=useState(0),[W,te]=useState([[]]),X=useRef(),{width:pe}=useWindowSize(),Ee=(Ht,nt)=>{g([E,nt])},Ae=()=>{O(E-1)},ot=()=>{O(E+1)},xt=()=>E+1<W.length;useEffect(()=>{const nt=E===0?1:2,Pt=X.current.offsetWidth-20-nt*30,Dt=d[0]*N+d[1],tn=Math.floor(Pt/170);k(tn),te(chunkArray(o,tn)),g([Math.floor(Dt/tn),Dt%tn])},[pe,o]);const $t=E===d[0]?d[1]:!1;return React.createElement("div",{className:l.root},React.createElement(AppBar,{ref:X,className:l.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:$t,onChange:Ee,selectionFollowsFocus:!0},E!==0&&React.createElement(StyledIcon,{onClick:Ae,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),W[E].map((Ht,nt)=>React.createElement(StyledTab,{value:nt,isFirstIndex:nt===0,isFirstNav:E===0,key:nt,icon:Ht.icon||void 0,label:Ht.label||void 0})),xt()&&React.createElement(StyledIcon,{isNext:!0,onClick:ot,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),$t!==!1?W[E].map((Ht,nt)=>React.createElement(TabPanel,{key:nt,value:nt,index:$t},Ht.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},W[d[0]][d[1]].content))}var Il=e(44311);function Qs(n,o){const l=n[n.length-1];if(!!l)return l>=.9?o.palette.status.ok:l>=.5?o.palette.status.warning:o.palette.status.error}function Ll(n){var l;const o=useTheme();return n.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...n},n.title&&React.createElement("title",null,n.title),React.createElement(SparklinesLine,{color:(l=n.color)!=null?l:Qs(n.data,o)})):null}const Xs=n=>(0,m.Z)(o=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:o.spacing(2),textAlign:n.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:o.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),_s=({title:n="Unknown page",className:o})=>t.createElement(Je.Z,{variant:"h4",component:"h2",className:o,"data-testid":"header-title"},n);function ei(n){const{description:o,title:l,titleComponent:d=void 0,children:g,textAlign:E="left"}=n,O=Xs({textAlign:E})(),N=d||t.createElement(_s,{title:l,className:O.title});return t.createElement(t.Fragment,null,t.createElement(ao.q,{title:l}),t.createElement("div",{className:O.container},t.createElement("div",{className:O.leftItemsBox},N,o&&t.createElement(Je.Z,{className:O.description,variant:"body2"},o)),t.createElement("div",{className:O.rightItemsBox},g)))}var ti=e.p+"static/mic-drop.fe3ef4d0..svg";const ni=(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"}),ri=()=>{const n=ni();return t.createElement("img",{src:ti,className:n.micDrop,alt:"Girl dropping mic from her hands"})},oi=(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 ai(n){const{status:o,statusMessage:l,additionalInfo:d,supportUrl:g}=n,E=oi(),O=(0,Ln.s0)(),N=bo();return t.createElement(bt.Z,{container:!0,spacing:0,className:E.container},t.createElement(ri,null),t.createElement(bt.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(Je.Z,{"data-testid":"error",variant:"body1",className:E.subtitle},"ERROR ",o,": ",l),t.createElement(Je.Z,{variant:"body1",className:E.subtitle},d),t.createElement(Je.Z,{variant:"h2",className:E.title},"Looks like someone dropped the mic!"),t.createElement(Je.Z,{variant:"h6"},t.createElement(P,{to:"#","data-testid":"go-back-link",onClick:()=>O(-1)},"Go back"),"... or please"," ",t.createElement(P,{to:g||N.url},"contact support")," if you think this is a bug.")))}var si=e(16173);const ii=(0,en.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(Je.Z),lo=(0,en.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(Pn.Z);function li(n){const{children:o,...l}=n,[d,g]=t.useState(null),E=t.Children.toArray(o),[O,N,...k]=E,W=k.length?k.pop():E[E.length-1],te=E.length>3,X=Ae=>{g(Ae.currentTarget)},pe=()=>{g(null)},Ee=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(si.Z,{"aria-label":"breadcrumb",...l},E.length>1&&t.createElement(lo,{clone:!0},O),E.length>2&&t.createElement(lo,{clone:!0},N),te&&t.createElement(ii,{onClick:X},"..."),t.createElement(Pn.Z,{style:{fontStyle:"italic"}},W)),t.createElement(Ro.ZP,{open:Ee,anchorEl:d,onClose:pe,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(ht.Z,null,k.map((Ae,ot)=>t.createElement(Ke.Z,{key:ot,button:!0},t.createElement(lo,{clone:!0},Ae))))))}const ci=(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"}),ui=({type:n,typeLink:o,classes:l,pageTitle:d})=>n?o?t.createElement(li,{className:l.breadcrumb},t.createElement(P,{to:o},n),t.createElement(Je.Z,null,d)):t.createElement(Je.Z,{className:l.type},n):null,di=({pageTitle:n,classes:o,tooltip:l})=>{const d=t.createElement(Je.Z,{className:o.title,variant:"h1"},n);return l?t.createElement(Q.ZP,{title:l,placement:"top-start"},d):d},fi=({classes:n,subtitle:o})=>o?typeof o!="string"?t.createElement(t.Fragment,null,o):t.createElement(Je.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},o):null;function qo(n){const{children:o,pageTitleOverride:l,style:d,subtitle:g,title:E,tooltip:O,type:N,typeLink:k}=n,W=ci(),X=(0,c.useApi)(c.configApiRef).getOptionalString("app.title")||"Backstage",pe=l||E,Ee=E||l,Ae=`${pe} | %s | ${X}`,ot=`${pe} | ${X}`;return t.createElement(t.Fragment,null,t.createElement(ao.q,{titleTemplate:Ae,defaultTitle:ot}),t.createElement("header",{style:d,className:W.header},t.createElement(Pn.Z,{className:W.leftItemsBox},t.createElement(ui,{classes:W,type:N,typeLink:k,pageTitle:Ee}),t.createElement(di,{classes:W,pageTitle:Ee,tooltip:O}),t.createElement(fi,{classes:W,subtitle:g})),t.createElement(bt.Z,{container:!0,className:W.rightItemsBox,spacing:4},o)))}const mi=(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"}),hi=({value:n,className:o})=>t.createElement(Je.Z,{className:o},n);function gi(n){const{label:o,value:l,url:d}=n,g=mi(),E=t.createElement(hi,{className:g.value,value:l||"<Unknown>"});return t.createElement(bt.Z,{item:!0},t.createElement("span",{className:g.root},t.createElement(Je.Z,{className:g.label},o),d?t.createElement(P,{to:d},E):E))}const pi={hour:"2-digit",minute:"2-digit"};function _o(n){const o=new Date,l=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const g=n.getConfigArray("homepage.clocks");for(const E of g)if(E.has("label")&&E.has("timezone")){let O=E.getString("label");const N={timeZone:E.getString("timezone"),...pi};try{new Date().toLocaleString(l,N)}catch{console.warn(`The timezone ${N.timeZone} is invalid. Defaulting to GMT`),N.timeZone="GMT",O="GMT"}const k=o.toLocaleTimeString(l,N);d.push({time:k,label:O})}return d}function Ol(n){const o=useApi(configApiRef),l=[],[d,g]=React.useState(l);return React.useEffect(()=>{g(_o(o));const E=setInterval(()=>{g(_o(o))},1e3);return()=>{clearInterval(E)}},[o]),d.length!==0?React.createElement(React.Fragment,null,d.map(E=>React.createElement(HeaderLabel,{label:E.label,value:E.time,key:E.label}))):null}const yi=n=>(0,a.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.palette.bursts.gradient.linear,backgroundPosition:0,backgroundSize:"inherit"}}),Ei=(0,m.Z)(yi,{name:"BackstageItemCardHeader"});function vi(n){const{title:o,subtitle:l,children:d}=n,g=Ei(n);return t.createElement("div",{className:g.root},l&&t.createElement(Je.Z,{variant:"subtitle2",component:"h3"},l),o&&t.createElement(Je.Z,{variant:"h6",component:"h4"},o),d)}function xl(n){const{description:o,tags:l,title:d,type:g,subtitle:E,label:O,onClick:N,href:k}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:E||g})),React.createElement(CardContent,null,l!=null&&l.length?React.createElement(Box,null,l.map((W,te)=>React.createElement(Chip,{size:"small",label:W,key:te}))):null,o),React.createElement(CardActions,null,!k&&React.createElement(Button,{to:"#",onClick:N,color:"primary"},O),k&&React.createElement(Button,{to:k,color:"primary"},O)))}const Ai=n=>(0,a.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),Ri=(0,m.Z)(Ai,{name:"BackstageItemCardGrid"});function Si(n){const{children:o,...l}=n,d=Ri(l);return t.createElement("div",{className:d.root,...l},o)}var Ci=e(41547);const Ti=(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 ea(n){const{themeId:o,children:l}=n,{isMobile:d}=(0,t.useContext)(vr),g=Ti({isMobile:d});return t.createElement(Ci.Z,{theme:E=>({...E,page:E.getPageTheme({themeId:o})})},t.createElement("main",{className:g.root},l))}function bi(n){const{themeId:o,children:l,...d}=n;return t.createElement(ea,{themeId:o},t.createElement(qo,{...d}),l)}var hn=e(30195);const Dl=hn.z.object({providerInfo:hn.z.object({}).catchall(hn.z.unknown()).optional(),profile:hn.z.object({email:hn.z.string().optional(),displayName:hn.z.string().optional(),picture:hn.z.string().optional()}),backstageIdentity:hn.z.object({token:hn.z.string(),identity:hn.z.object({type:hn.z.literal("user"),userEntityRef:hn.z.string(),ownershipEntityRefs:hn.z.array(hn.z.string())})})}),ta={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function Pi(n){const o=new Date(Date.now()+ta.defaultTokenExpiryMillis);if(!n)return o;const[l,d,g]=n.split("."),E=JSON.parse(atob(d));return typeof E.exp!="number"?o:new Date(E.exp*1e3-ta.tokenExpiryMarginMillis)}class Fl{constructor(o){_(this,"options");_(this,"abortController");_(this,"state");this.options=o,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:o}=this.getSessionSync(),l=o.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(l);if(!d)throw new TypeError(`Invalid user entity reference "${l}"`);return d[3]}async getIdToken(){return(await this.getSessionAsync()).backstageIdentity.token}getProfile(){return this.getSessionSync().profile}async getProfileInfo(){return(await this.getSessionAsync()).profile}async getBackstageIdentity(){return(await this.getSessionAsync()).backstageIdentity.identity}async getCredentials(){return{token:(await this.getSessionAsync()).backstageIdentity.token}}async signOut(){this.abortController.abort()}getSessionSync(){if(this.state.type==="active")return this.state.session;if(this.state.type==="fetching"&&this.state.previous)return this.state.previous;throw new Error("No session available. Try reloading your browser page.")}async getSessionAsync(){if(this.state.type==="fetching")return this.state.promise;if(this.state.type==="active"&&new Date<this.state.expiresAt)return this.state.session;const o=this.state.type==="active"?this.state.session:void 0,l=this.fetchSession().then(d=>(this.state={type:"active",session:d,expiresAt:Pi(d.backstageIdentity.token)},d),d=>{throw this.state={type:"failed",error:d},d});return this.state={type:"fetching",promise:l,previous:o},l}async fetchSession(){const o=await this.options.discoveryApi.getBaseUrl("auth"),l=await fetch(`${o}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!l.ok)throw await ResponseError.fromResponse(l);return proxiedSessionSchema.parse(await l.json())}}const Bl=n=>{const o=useApi(discoveryApiRef),[{status:l,error:d},{execute:g}]=useAsync(async()=>{const E=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:o});await E.start(),n.onSignInSuccess(E)});return useMountEffect(g),l==="loading"?React.createElement(Progress,null):d?React.createElement(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:d}):null},Ii=(0,m.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),co=({children:n})=>{const o=Ii();return t.createElement(bt.Z,{component:"li",item:!0,classes:o},n)};class uo{getUserId(){return"guest"}async getIdToken(){}getProfile(){return{email:"guest@example.com",displayName:"Guest"}}async getProfileInfo(){return{email:"guest@example.com",displayName:"Guest"}}async getBackstageIdentity(){const o="user:default/guest";return{type:"user",userEntityRef:o,ownershipEntityRefs:[o]}}async getCredentials(){return{}}async signOut(){}}function Li(n){const[o,l,d]=n.split(".");return JSON.parse(atob(l))}class fo{constructor(o){this.result=o}getUserId(){return this.result.userId}static fromResult(o){return new fo(o)}async getIdToken(){var o,l;return(l=(o=this.result).getIdToken)==null?void 0:l.call(o)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const o=await this.getIdToken();if(!o){const g=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:g,ownershipEntityRefs:[g]}}const{sub:l,ent:d}=Li(o);return{type:"user",userEntityRef:l,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var l,d;return{token:await((d=(l=this.result).getIdToken)==null?void 0:d.call(l))}}async signOut(){var o,l;return(l=(o=this.result).signOut)==null?void 0:l.call(o)}}class wr{constructor(o,l,d){_(this,"profilePromise");this.identity=o,this.authApi=l,this.profile=d}static createGuest(){return new uo}static fromLegacy(o){return fo.fromResult(o)}static create(o){return new wr(o.identity,o.authApi,o.profile)}getUserId(){const o=this.identity.userEntityRef,l=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(o);if(!l)throw new TypeError(`Invalid user entity reference "${o}"`);return l[3]}async getIdToken(){return(await this.authApi.getBackstageIdentity()).token}getProfile(){if(!this.profile)throw new Error("The identity API does not implement synchronous profile fetching, use getProfileInfo() instead");return this.profile}async getProfileInfo(){if(this.profilePromise)return await this.profilePromise;try{return this.profilePromise=this.authApi.getProfile(),await this.profilePromise}catch(o){throw this.profilePromise=void 0,o}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const Oi={Component:({config:n,onSignInSuccess:o})=>{const{apiRef:l,title:d,message:g}=n,E=(0,c.useApi)(l),O=(0,c.useApi)(c.errorApiRef),N=async()=>{try{const k=await E.getBackstageIdentity({instantPopup:!0});if(!k)throw new Error(`The ${d} provider is not configured to support sign-in`);const W=await E.getProfile();o(wr.create({identity:k.identity,profile:W,authApi:E}))}catch(k){O.post(new er.SP("Login failed",k))}};return t.createElement(co,null,t.createElement(Gn,{variant:"fullHeight",title:d,actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:N},"Sign In")},t.createElement(Je.Z,{variant:"body1"},g)))},loader:async(n,o)=>{const l=n.get(o),d=await l.getBackstageIdentity({optional:!0});if(!d)return;const g=await l.getProfile();return wr.create({identity:d.identity,profile:g,authApi:l})}},xi={Component:({onSignInSuccess:n})=>t.createElement(co,null,t.createElement(Gn,{title:"Guest",variant:"fullHeight",actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:()=>n(new uo)},"Enter")},t.createElement(Je.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 uo};var Di=e(63955),na=e(86619),ra=e(74828),Fi=e(45455),Bi=e.n(Fi);const Mi=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,wi=(0,m.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),oa=n=>{const{ref:o,...l}=n;return{inputRef:o,...l}},$i={Component:({onSignInSuccess:n})=>{const o=wi(),{register:l,handleSubmit:d,formState:g}=(0,Di.cI)({mode:"onChange"}),{errors:E}=g,O=({userId:N})=>{n(wr.fromLegacy({userId:N,profile:{email:`${N}@example.com`}}))};return t.createElement(co,null,t.createElement(Gn,{title:"Custom User",variant:"fullHeight"},t.createElement(Je.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:o.form,onSubmit:d(O)},t.createElement(C.Z,null,t.createElement(na.Z,{...oa(l("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(E.userId)}),E.userId&&t.createElement(ra.Z,{error:!0},E.userId.message)),t.createElement(C.Z,null,t.createElement(na.Z,{...oa(l("idToken",{required:!1,validate:N=>!N||Mi.test(N)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(E.idToken)}),E.idToken&&t.createElement(ra.Z,{error:!0},E.idToken.message)),t.createElement(y.Z,{type:"submit",color:"primary",variant:"outlined",className:o.button,disabled:!(g!=null&&g.isDirty)||!Bi()(E)},"Continue"))))},loader:async()=>{}},qr="@backstage/core:SignInPage:provider",aa={guest:xi,custom:$i,common:Oi};function sa(n,o){if(n in o)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function zl(n){return n.reduce((l,d)=>{if(typeof d=="string")return sa(d,l),l[d]={components:aa[d],id:d},l;const{id:g}=d;return sa(g,l),l[g]={components:aa.common,id:g,config:d},l},{})}const Wl=(n,o)=>{const l=useApi(errorApiRef),d=useApiHolder(),[g,E]=useState(!0),O=useCallback(k=>{o(IdentityApiSignOutProxy.from({identityApi:k,signOut:async()=>{var W;localStorage.removeItem(qr),await((W=k.signOut)==null?void 0:W.call(k))}}))},[o]);useLayoutEffect(()=>{var X;if(!g)return;const k=localStorage.getItem(qr);if(k===null){E(!1);return}const W=n[k];if(!W){E(!1);return}let te=!1;return W.components.loader(d,(X=W.config)==null?void 0:X.apiRef).then(pe=>{te||(pe?O(pe):E(!1))}).catch(pe=>{te||(localStorage.removeItem(qr),l.post(pe),E(!1))}),()=>{te=!0}},[g,l,o,d,n,O]);const N=useMemo(()=>Object.keys(n).map(k=>{const W=n[k],{Component:te}=W.components,X=pe=>{localStorage.setItem(qr,W.id),O(pe)};return React.createElement(te,{key:W.id,config:W.config,onSignInSuccess:X})}),[n,O]);return[g,N]},Ui=({onSignInSuccess:n,providers:o=[],title:l,align:d="left"})=>{const g=useApi(configApiRef),E=useStyles(),O=getSignInProviders(o),[N,k]=useSignInProviders(O,n);return N?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:g.getString("app.title")}),React.createElement(Content,null,l&&React.createElement(ContentHeader,{title:l,textAlign:d}),React.createElement(Grid,{container:!0,justifyContent:d==="center"?d:"flex-start",spacing:2,component:"ul",classes:E},k)))},Ni=({provider:n,auto:o,onSignInSuccess:l})=>{const d=useStyles(),g=useApi(n.apiRef),E=useApi(configApiRef),[O,N]=useState(),[k,W]=useState(!1),te=async({checkExisting:X,showPopup:pe})=>{try{let Ee;if(X&&(Ee=await g.getBackstageIdentity({optional:!0})),!Ee&&(pe||o)&&(W(!0),Ee=await g.getBackstageIdentity({instantPopup:!0}),!Ee))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Ee){W(!0);return}const Ae=await g.getProfile();l(UserIdentity.create({identity:Ee.identity,authApi:g,profile:Ae}))}catch(Ee){N(Ee),W(!0)}};return useMountEffect(()=>te({checkExisting:!0})),k?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:E.getString("app.title")}),React.createElement(Content,null,React.createElement(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:d},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:n.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{te({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},n.message),O&&O.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},O.message)))))):React.createElement(Progress,null)};function Hl(n){return"provider"in n?React.createElement(Ni,{...n}):React.createElement(Ui,{...n})}const Zi=(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"}),zi=(0,en.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(mr.Z);function jl(n){const{slackChannel:o,errorBoundaryProps:l,children:d,title:g,deepLink:E,value:O,onChange:N}=n,k=Zi(),[W,te]=useState(0),X=N||((Ae,ot)=>te(ot));let pe;O?React.Children.map(d,Ae=>{React.isValidElement(Ae)&&(Ae==null?void 0:Ae.props.value)===O&&(pe=Ae==null?void 0:Ae.props.children)}):React.Children.map(d,(Ae,ot)=>{React.isValidElement(Ae)&&ot===W&&(pe=Ae==null?void 0:Ae.props.children)});const Ee=l||(o?{slackChannel:o}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Ee},g&&React.createElement(zi,{title:g}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:k,value:O||W,onChange:X},d),React.createElement(Divider,null),React.createElement(CardContent,null,pe),E&&React.createElement(BottomLink,{...E})))}const Wi=(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 Vl(n){const{children:o,...l}=n,d=Wi();return React.createElement(Tab,{disableRipple:!0,classes:d,...l})}},88609:function(ee,s,e){"use strict";e.d(s,{Os:function(){return f},fC:function(){return S}});var r=e(76241),t=e(2784);const c=(0,r.CT)("analytics-context"),f=()=>{const a=(0,t.useContext)(c);if(a===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const i=a.atVersion(1);if(i===void 0)throw new Error("No context found for version 1.");return i},S=a=>{const{attributes:i,children:u}=a,p={...f(),...i},v=(0,r.EI)({1:p});return t.createElement(c.Provider,{value:v},u)};function m(a,i){const u=y=>React.createElement(S,{attributes:i},React.createElement(a,{...y}));return u.displayName=`WithAnalyticsContext(${a.displayName||a.name||"Component"})`,u}},28461:function(ee,s,e){"use strict";e.d(s,{f:function(){return r.fC},z:function(){return m}});var r=e(88609),t=e(27399),c=e(2784);class f{constructor(i,u={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=i,this.context=u}setContext(i){this.context=i}captureEvent(i,u,{value:y,attributes:p}={}){try{this.analyticsApi.captureEvent({action:i,subject:u,value:y,attributes:p,context:this.context})}catch(v){console.warn("Error during analytics event capture. %o",v)}}}function S(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function m(){const a=(0,c.useRef)(null),i=(0,r.Os)(),u=S();function y(){return a.current===null&&(a.current=new f(u)),a.current}const p=y();return p.setContext(i),p}},39135:function(ee,s,e){"use strict";e.d(s,{CL:function(){return D},sM:function(){return t},$v:function(){return p},v_:function(){return v},hg:function(){return b},uB:function(){return y},bq:function(){return u},Ds:function(){return L},NW:function(){return x},VE:function(){return j},W0:function(){return P},gP:function(){return F},F4:function(){return f},ux:function(){return m},Kp:function(){return c},$4:function(){return B},p_:function(){return a},ZM:function(){return w},D:function(){return S},gW:function(){return i},E6:function(){return V}});var r=e(86833),t;(function(Q){const ue="SignedIn";Q.SignedIn=ue;const $e="SignedOut";Q.SignedOut=$e})(t||(t={}));const c=(0,r.createApiRef)({id:"core.auth.google"}),f=(0,r.createApiRef)({id:"core.auth.github"}),S=(0,r.createApiRef)({id:"core.auth.okta"}),m=(0,r.createApiRef)({id:"core.auth.gitlab"}),a=(0,r.createApiRef)({id:"core.auth.microsoft"}),i=(0,r.createApiRef)({id:"core.auth.onelogin"}),u=(0,r.createApiRef)({id:"core.auth.bitbucket"}),y=(0,r.createApiRef)({id:"core.auth.atlassian"}),p=(0,r.createApiRef)({id:"core.alert"}),v=(0,r.createApiRef)({id:"core.analytics"}),b=(0,r.createApiRef)({id:"core.apptheme"}),L=(0,r.createApiRef)({id:"core.config"}),x=(0,r.createApiRef)({id:"core.discovery"}),j=(0,r.createApiRef)({id:"core.error"});var D;(function(Q){Q[Q.None=0]="None";const $e=1;Q[Q.Active=$e]="Active"})(D||(D={}));const P=(0,r.createApiRef)({id:"core.featureflags"}),F=(0,r.createApiRef)({id:"core.fetch"}),B=(0,r.createApiRef)({id:"core.identity"}),w=(0,r.createApiRef)({id:"core.oauthrequest"}),V=(0,r.createApiRef)({id:"core.storage"})},27399:function(ee,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(ee,s,e){"use strict";e.d(s,{T:function(){return t}});class r{constructor(f){if(this.config=f,!f.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 '${f.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function t(c){return new r(c)}},25182:function(ee,s,e){"use strict";e.d(s,{n:function(){return r}});function r(t,c){return"id"in t?{api:t,deps:{},factory:()=>c}:t}},86833:function(ee,s,e){"use strict";e.d(s,{createApiFactory:function(){return S.n},createApiRef:function(){return t.T},useApi:function(){return r.h_},useApiHolder:function(){return r.I_}});var r=e(5761),t=e(90515),c=e(16362),f=e.n(c);e.o(c,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return c.FeatureFlagState}}),e.o(c,"SessionState")&&e.d(s,{SessionState:function(){return c.SessionState}}),e.o(c,"alertApiRef")&&e.d(s,{alertApiRef:function(){return c.alertApiRef}}),e.o(c,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return c.analyticsApiRef}}),e.o(c,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return c.appThemeApiRef}}),e.o(c,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return c.atlassianAuthApiRef}}),e.o(c,"attachComponentData")&&e.d(s,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return c.bitbucketAuthApiRef}}),e.o(c,"configApiRef")&&e.d(s,{configApiRef:function(){return c.configApiRef}}),e.o(c,"createApiFactory")&&e.d(s,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(s,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createReactExtension")&&e.d(s,{createReactExtension:function(){return c.createReactExtension}}),e.o(c,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(s,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return c.discoveryApiRef}}),e.o(c,"errorApiRef")&&e.d(s,{errorApiRef:function(){return c.errorApiRef}}),e.o(c,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return c.featureFlagsApiRef}}),e.o(c,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return c.fetchApiRef}}),e.o(c,"getComponentData")&&e.d(s,{getComponentData:function(){return c.getComponentData}}),e.o(c,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return c.githubAuthApiRef}}),e.o(c,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return c.gitlabAuthApiRef}}),e.o(c,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return c.googleAuthApiRef}}),e.o(c,"identityApiRef")&&e.d(s,{identityApiRef:function(){return c.identityApiRef}}),e.o(c,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return c.microsoftAuthApiRef}}),e.o(c,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return c.oauthRequestApiRef}}),e.o(c,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return c.oktaAuthApiRef}}),e.o(c,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return c.oneloginAuthApiRef}}),e.o(c,"storageApiRef")&&e.d(s,{storageApiRef:function(){return c.storageApiRef}}),e.o(c,"useApp")&&e.d(s,{useApp:function(){return c.useApp}}),e.o(c,"useElementFilter")&&e.d(s,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"useRouteRef")&&e.d(s,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return c.useRouteRefParams}});var S=e(25182)},16362:function(){},5761:function(ee,s,e){"use strict";e.d(s,{I_:function(){return c},h_:function(){return f}});var r=e(2784),t=e(76241);function c(){const m=(0,t.Vt)("api-context");if(!m)throw new Error("API context is not available");const a=m.atVersion(1);if(!a)throw new Error("ApiContext v1 not available");return a}function f(m){const i=c().get(m);if(!i)throw new Error(`No implementation available for ${m}`);return i}function S(m){return function(i){const u=p=>{const v=c(),b={};for(const L in m)if(m.hasOwnProperty(L)){const x=m[L],j=v.get(x);if(!j)throw new Error(`No implementation available for ${x}`);b[L]=j}return React.createElement(i,{...p,...b})},y=i.displayName||i.name||"Component";return u.displayName=`withApis(${y})`,u}}},31311:function(ee,s,e){"use strict";e.d(s,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),c=e.n(t);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(s,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(ee,s,e){"use strict";e.d(s,{q:function(){return t}});var r=e(76241);const t=()=>{const c=(0,r.Vt)("app-context");if(!c)throw new Error("App context is not available");const f=c.atVersion(1);if(!f)throw new Error("AppContext v1 not available");return f}},74181:function(ee,s,e){"use strict";e.d(s,{R5:function(){return f},CO:function(){return v},YO:function(){return b},P4:function(){return p},IY:function(){return S},vJ:function(){return D}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),c="__backstage_data";function f(P,F,B){var Q;const w=P;let V=(Q=w[c])!=null?Q:t.get(P);if(V||(V={map:new Map},Object.defineProperty(w,c,{enumerable:!1,configurable:!0,writable:!1,value:V}),t.set(P,V)),V.map.has(F)){const ue=P.displayName||P.name;throw new Error(`Attempted to attach duplicate data "${F}" to component "${ue}"`)}V.map.set(F,B)}function S(P,F){var V;if(!P)return;const B=P.type;if(!B)return;const w=(V=B[c])!=null?V:t.get(B);if(!!w)return w.map.get(F)}var m=e(2784),a=e(88609),i=e(31311),u=e(82772);class y extends m.Component{constructor(){super(...arguments);_(this,"state",{error:void 0});_(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(B){return{error:B}}render(){const{error:B}=this.state,{app:w,plugin:V}=this.props,{ErrorBoundaryFallback:Q}=w.getComponents();return B?m.createElement(Q,{error:B,resetError:this.handleErrorReset,plugin:V}):this.props.children}}function p(P){const{component:F,mountPoint:B,name:w}=P;return b({component:{lazy:()=>F().then(V=>{const Q=$e=>{try{(0,u.tg)(B)}catch(Pe){if(typeof Pe=="object"&&Pe!==null){const{message:de}=Pe;if(typeof de=="string"&&de.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${B} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw Pe}return m.createElement(V,{...$e})},ue=w||V.displayName||V.name||"LazyComponent";return Q.displayName=`RoutableExtension(${ue})`,Q},V=>ue=>{const $e=(0,i.useApp)(),{BootErrorPage:Pe}=$e.getComponents();return m.createElement(Pe,{step:"load-chunk",error:V})})},data:{"core.mountPoint":B},name:w})}function v(P){const{component:F,name:B}=P;return b({component:F,name:B})}function b(P){const{data:F={},name:B}=P;B||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let w;if("lazy"in P.component){const Q=P.component.lazy;w=(0,m.lazy)(()=>Q().then(ue=>({default:ue})))}else w=P.component.sync;const V=B||w.displayName||w.name||"Component";return{expose(Q){const ue=$e=>{const Pe=(0,i.useApp)(),{Progress:de}=Pe.getComponents(),ze=F==null?void 0:F["core.mountPoint"];return m.createElement(m.Suspense,{fallback:m.createElement(de,null)},m.createElement(y,{app:Pe,plugin:Q},m.createElement(a.fC,{attributes:{pluginId:Q.getId(),...B&&{extension:B},...ze&&{routeRef:ze.id}}},m.createElement(w,{...$e}))))};f(ue,"core.plugin",Q);for(const[$e,Pe]of Object.entries(F))f(ue,$e,Pe);return ue.displayName=`Extension(${V})`,ue}}}var L=e(27399);function x(P,F,B,w){return m.Children.toArray(P).flatMap(V=>{if(!(0,m.isValidElement)(V))return[];if(V.type===m.Fragment)return x(V.props.children,F,B,w);if(S(V,"core.featureFlagged")){const Q=V.props;return("with"in Q?F.isActive(Q.with):!F.isActive(Q.without))?x(V.props.children,F,B,w):[]}if(B===void 0||B(V))return[V];if(w)throw new Error(w);return x(V.props.children,F,B,w)})}class j{constructor(F,B){this.node=F,this.featureFlagsApi=B}selectByComponentData(F){const B=x(this.node,this.featureFlagsApi,w=>S(w,F.key)!==void 0,F.withStrictError);return new j(B,this.featureFlagsApi)}findComponentData(F){return x(this.node,this.featureFlagsApi,w=>S(w,F.key)!==void 0).map(w=>S(w,F.key)).filter(w=>w!==void 0)}getElements(){return x(this.node,this.featureFlagsApi)}}function D(P,F,B=[]){const w=(0,L.useApi)(L.featureFlagsApiRef),V=new j(P,w);return(0,m.useMemo)(()=>F(V),[P,...B])}},80274:function(){},36964:function(ee,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 f.R5},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},createComponentExtension:function(){return f.CO},createExternalRouteRef:function(){return i.x8},createPlugin:function(){return a.r},createReactExtension:function(){return f.YO},createRoutableExtension:function(){return f.P4},createRouteRef:function(){return i.NT},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},getComponentData:function(){return f.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 c.useApp},useElementFilter:function(){return f.vJ},useRouteRef:function(){return i.tg},useRouteRefParams:function(){return i.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 c=e(31311);e.o(c,"attachComponentData")&&e.d(s,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"createApiFactory")&&e.d(s,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createApiRef")&&e.d(s,{createApiRef:function(){return c.createApiRef}}),e.o(c,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(s,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createReactExtension")&&e.d(s,{createReactExtension:function(){return c.createReactExtension}}),e.o(c,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(s,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"getComponentData")&&e.d(s,{getComponentData:function(){return c.getComponentData}}),e.o(c,"useApi")&&e.d(s,{useApi:function(){return c.useApi}}),e.o(c,"useApiHolder")&&e.d(s,{useApiHolder:function(){return c.useApiHolder}}),e.o(c,"useElementFilter")&&e.d(s,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"useRouteRef")&&e.d(s,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return c.useRouteRefParams}});var f=e(74181),S=e(80274),m=e.n(S);e.o(S,"createApiFactory")&&e.d(s,{createApiFactory:function(){return S.createApiFactory}}),e.o(S,"createApiRef")&&e.d(s,{createApiRef:function(){return S.createApiRef}}),e.o(S,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return S.createExternalRouteRef}}),e.o(S,"createPlugin")&&e.d(s,{createPlugin:function(){return S.createPlugin}}),e.o(S,"createRouteRef")&&e.d(s,{createRouteRef:function(){return S.createRouteRef}}),e.o(S,"useApi")&&e.d(s,{useApi:function(){return S.useApi}}),e.o(S,"useApiHolder")&&e.d(s,{useApiHolder:function(){return S.useApiHolder}}),e.o(S,"useRouteRef")&&e.d(s,{useRouteRef:function(){return S.useRouteRef}}),e.o(S,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return S.useRouteRefParams}});var a=e(96896),i=e(82772)},96896:function(ee,s,e){"use strict";e.d(s,{r:function(){return t}});class r{constructor(f){this.config=f}getId(){return this.config.id}getApis(){var f;return(f=this.config.apis)!=null?f:[]}getFeatureFlags(){var f,S;return(S=(f=this.config.featureFlags)==null?void 0:f.slice())!=null?S:[]}get routes(){var f;return(f=this.config.routes)!=null?f:{}}get externalRoutes(){var f;return(f=this.config.externalRoutes)!=null?f:{}}provide(f){return f.expose(this)}toString(){return`plugin{${this.config.id}}`}}function t(c){return new r(c)}},82772:function(ee,s,e){var L,x,j;"use strict";e.d(s,{x8:function(){return u},NT:function(){return f},tg:function(){return v},Oi:function(){return b}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class c{constructor(P,F){_(this,L,"absolute");this.id=P,this.params=F}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}L=t;function f(D){var P;return new c(D.id,(P=D.params)!=null?P:[])}const S=/^\w+$/;class m{constructor(P,F,B,w){_(this,x,"sub");this.id=P,this.path=F,this.parent=B,this.params=w}toString(){return`routeRef{type=sub,id=${this.id}}`}}x=t;function a(D){const{id:P,path:F,parent:B}=D,w=F.split("/").filter(ue=>ue.startsWith(":")).map(ue=>ue.substring(1)),V=[...B.params,...w];if(B.params.some(ue=>w.includes(ue)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!F.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${F}'`);if(F.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${F}'`);for(const ue of w)if(!S.test(ue))throw new Error(`SubRouteRef path has invalid param, got '${ue}'`);return new m(P,F,B,V)}class i{constructor(P,F,B){_(this,j,"external");this.id=P,this.params=F,this.optional=B}toString(){return`routeRef{type=external,id=${this.id}}`}}j=t;function u(D){var P;return new i(D.id,(P=D.params)!=null?P:[],Boolean(D.optional))}var y=e(2784),p=e(10289);function v(D){const P=(0,p.TH)(),F=(0,r.Vt)("routing-context");if(!F)throw new Error("Routing context is not available");const B=F.atVersion(1),w=(0,y.useMemo)(()=>B&&B.resolve(D,P),[B,D,P]);if(!F)throw new Error("useRouteRef used outside of routing context");if(!B)throw new Error("RoutingContext v1 not available");const V="optional"in D&&D.optional;if(!w&&!V)throw new Error(`No path for ${D}`);return w}function b(D){return(0,p.UO)()}},10179:function(ee,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(D){if(typeof D!="object"||D===null||Array.isArray(D))return!1;const P=D;return!(typeof P.name!="string"||P.name===""||typeof P.message!="string")}function t(D){if(typeof D!="object"||D===null||Array.isArray(D))throw new Error(`Encountered invalid error, not an object, got '${D}'`);const P=D;if(typeof P.name!="string"||P.name==="")throw new Error(`Encountered error object without a name, got '${D}'`);if(typeof P.message!="string")throw new Error(`Encountered error object without a message, got '${D}'`)}var c=e(24852);function f(D,P){const F=serializeErrorInternal(D),B={name:"Unknown",message:"<no reason given>",...F};return P!=null&&P.includeStack||delete B.stack,B}function S(D){const P=(0,c.deserializeError)(D);return D.stack||(P.stack=void 0),P}function m(D){if(r(D)){const P=String(D);return P!=="[object Object]"?P:`${D.name}: ${D.message}`}return`unknown error '${D}'`}class a extends Error{constructor(F,B){var V;let w=F;if(B!==void 0){const Q=m(B);w?w+=`; caused by ${Q}`:w=`caused by ${Q}`}super(w);_(this,"cause");(V=Error.captureStackTrace)==null||V.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(B)?B:void 0}}class i extends null{}class u extends null{}class y extends null{}class p extends a{}class v extends null{}class b extends null{}class L extends a{constructor(P,F){super(P,F),this.name=r(F)?F.name:"Error"}}async function x(D){var P;try{const F=await D.text();if(F){if((P=D.headers.get("content-type"))!=null&&P.startsWith("application/json"))try{const B=JSON.parse(F);if(B.error&&B.response)return B}catch{}return{error:{name:"Error",message:`Request failed with status ${D.status} ${D.statusText}, ${F}`},response:{statusCode:D.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${D.status} ${D.statusText}`},response:{statusCode:D.status}}}class j extends Error{constructor(F){super(F.message);_(this,"response");_(this,"body");_(this,"cause");this.name="ResponseError",this.response=F.response,this.body=F.data,this.cause=F.cause}static async fromResponse(F){const B=await x(F),w=B.response.statusCode||F.status,V=B.error.name||F.statusText,Q=`Request failed with ${w} ${V}`,ue=S(B.error);return new j({message:Q,response:F,data:B,cause:ue})}}},36356:function(ee,s,e){var p,v,b,L,x;"use strict";e.d(s,{nW:function(){return y},ae:function(){return m},q3:function(){return a}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class c{constructor(P){Tn(this,p,void 0);Dn(this,p,P)}async getCredentials(P){const F=new URL(P.url),B=Ge(this,p).find(w=>w.isUrlSupported(F));if(!B)throw new Error(`No auth provider available for '${P.url}', see https://backstage.io/link?scm-auth`);return B.getCredentials(P)}}p=new WeakMap;const j=class{constructor(P,F,B,w){Tn(this,v,void 0);Tn(this,b,void 0);Tn(this,L,void 0);Tn(this,x,void 0);Dn(this,v,F),Dn(this,b,B),Dn(this,L,w),Dn(this,x,P)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:P,gitlab:F,azure:B,bitbucket:w})=>j.merge(j.forGithub(P),j.forGitlab(F),j.forAzure(B),j.forBitbucket(w))})}static forAuthApi(P,F){return new j("generic",P,F.host,F.scopeMapping)}static forGithub(P,F){var w;const B=(w=F==null?void 0:F.host)!=null?w:"github.com";return new j("github",P,B,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(P,F){var w;const B=(w=F==null?void 0:F.host)!=null?w:"gitlab.com";return new j("gitlab",P,B,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(P,F){var w;const B=(w=F==null?void 0:F.host)!=null?w:"dev.azure.com";return new j("azure",P,B,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(P,F){var w;const B=(w=F==null?void 0:F.host)!=null?w:"bitbucket.org";return new j("bitbucket",P,B,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...P){return new c(P)}isUrlSupported(P){return P.host===Ge(this,b)}getAdditionalScopesForProvider(P){var F,B;return!(P!=null&&P.customScopes)||Ge(this,x)==="generic"?[]:(B=(F=P.customScopes)==null?void 0:F[Ge(this,x)])!=null?B:[]}async getCredentials(P){const{url:F,additionalScope:B,...w}=P,V=Ge(this,L).default.slice();B!=null&&B.repoWrite&&V.push(...Ge(this,L).repoWrite);const Q=this.getAdditionalScopesForProvider(B);Q.length&&V.push(...Q);const ue=[...new Set(V)],$e=await Ge(this,v).getAccessToken(ue,w);return{token:$e,headers:{Authorization:`Bearer ${$e}`}}}};let f=j;v=new WeakMap,b=new WeakMap,L=new WeakMap,x=new WeakMap;var S=e(68370);class m{static fromConfig(P){return S.Lx.fromConfig(P)}}const a=(0,r.createApiRef)({id:"integration.scmintegrations"});var i=e(73250),u=e(2784);const y=D=>{var V;const{type:P}=D,F=(0,r.useApp)(),B=i.Z,w=P&&(V=F.getSystemIcon(P))!=null?V:B;return u.createElement(w,null)}},68370:function(ee,s,e){var ft,Et,St,Ct,Nt,Gt,on;"use strict";e.d(s,{Lx:function(){return cn},Pb:function(){return Xe}});var r=e(82717),t=e.n(r),c=e(76635);function f(Z){const h=new URL("http://example.com");return h.host=Z,h.host===Z}function S(Z){try{return new URL(Z),!0}catch{return!1}}function m(Z,h){return{list(){return Z},byUrl(T){try{const M=typeof T=="string"?new URL(T):T;return Z.find(K=>h(K)===M.host)}catch{return}},byHost(T){return Z.find(M=>h(M)===T)}}}function a(Z){const{url:h,base:T,lineNumber:M}=Z;try{return new URL(h),h}catch{}let K;if(h.startsWith("/")){const{filepath:ne}=t()(T);K=new URL(T);const me=(0,c.trimEnd)(K.pathname.substring(0,K.pathname.length-ne.length),"/");K.pathname=`${me}${h}`}else K=new URL(h,T);return K.search=new URL(T).search,M&&(K.hash=`L${M}`),K.toString()}const i="amazonaws.com";function u(Z){var Bt;const h=Z.getOptionalString("endpoint"),T=(Bt=Z.getOptionalBoolean("s3ForcePathStyle"))!=null?Bt:!1;let M,K;if(h){try{const Mt=new URL(h);M=Mt.host,K=Mt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${h}' is not a valid URL`)}if(K!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${h}'`)}else M=i;const ne=Z.getOptionalString("accessKeyId"),me=Z.getOptionalString("secretAccessKey"),Oe=Z.getOptionalString("roleArn"),_e=Z.getOptionalString("externalId");return{host:M,endpoint:h,s3ForcePathStyle:T,accessKeyId:ne,secretAccessKey:me,roleArn:Oe,externalId:_e}}function y(Z){const h=Z.map(u);return h.some(T=>T.host===i)||h.push({host:i}),h}const Ot=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(h){this.integrationConfig=h}resolveUrl(h){return a(h)}resolveEditUrl(h){return h}};let p=Ot;_(p,"factory",({config:h})=>{var M;const T=y((M=h.getOptionalConfigArray("integrations.awsS3"))!=null?M:[]);return m(T.map(K=>new Ot(K)),K=>K.config.host)});const v="GB",pn=class{constructor(h,T,M,K,ne,me){Tn(this,ft,void 0);Tn(this,Et,void 0);Tn(this,St,void 0);Tn(this,Ct,void 0);Tn(this,Nt,void 0);Tn(this,Gt,void 0);Tn(this,on,(...h)=>{const T=new URL(Ge(this,ft));return T.pathname=h.map(M=>encodeURIComponent(M)).join("/"),T});Dn(this,ft,h),Dn(this,Et,T),Dn(this,St,M),Dn(this,Ct,K),Dn(this,Nt,ne),Dn(this,Gt,me)}static fromRepoUrl(h){var Mt;const T=new URL(h);let M,K,ne;const me=T.pathname.split("/").map(Nn=>decodeURIComponent(Nn));if(me[2]==="_git"?(M=me[1],K=ne=me[3]):me[3]==="_git"&&(M=me[1],K=me[2],ne=me[4]),!M||!K||!ne)throw new Error("Azure URL must point to a git repository");const Oe=(Mt=T.searchParams.get("path"))!=null?Mt:void 0;let _e;const Bt=T.searchParams.get("version");if(Bt){if(Bt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");_e=Bt.slice(2)}return new pn(T.origin,M,K,ne,Oe,_e)}toRepoUrl(){let h;return Ge(this,St)===Ge(this,Ct)?h=Ge(this,on).call(this,Ge(this,Et),"_git",Ge(this,Ct)):h=Ge(this,on).call(this,Ge(this,Et),Ge(this,St),"_git",Ge(this,Ct)),Ge(this,Nt)&&h.searchParams.set("path",Ge(this,Nt)),Ge(this,Gt)&&h.searchParams.set("version",v+Ge(this,Gt)),h.toString()}toFileUrl(){if(!Ge(this,Nt))throw new Error("Azure URL must point to a specific path to be able to download a file");const h=Ge(this,on).call(this,Ge(this,Et),Ge(this,St),"_apis","git","repositories",Ge(this,Ct),"items");return h.searchParams.set("api-version","6.0"),h.searchParams.set("path",Ge(this,Nt)),Ge(this,Gt)&&h.searchParams.set("version",Ge(this,Gt)),h.toString()}toArchiveUrl(){const h=Ge(this,on).call(this,Ge(this,Et),Ge(this,St),"_apis","git","repositories",Ge(this,Ct),"items");return h.searchParams.set("recursionLevel","full"),h.searchParams.set("download","true"),h.searchParams.set("api-version","6.0"),Ge(this,Nt)&&h.searchParams.set("scopePath",Ge(this,Nt)),Ge(this,Gt)&&h.searchParams.set("version",Ge(this,Gt)),h.toString()}toCommitsUrl(){const h=Ge(this,on).call(this,Ge(this,Et),Ge(this,St),"_apis","git","repositories",Ge(this,Ct),"commits");return h.searchParams.set("api-version","6.0"),Ge(this,Gt)&&h.searchParams.set("searchCriteria.itemVersion.version",Ge(this,Gt)),h.toString()}getOwner(){return Ge(this,Et)}getProject(){return Ge(this,St)}getRepo(){return Ge(this,Ct)}getPath(){return Ge(this,Nt)}getRef(){return Ge(this,Gt)}};let b=pn;ft=new WeakMap,Et=new WeakMap,St=new WeakMap,Ct=new WeakMap,Nt=new WeakMap,Gt=new WeakMap,on=new WeakMap;const L="dev.azure.com";function x(Z){var M;const h=(M=Z.getOptionalString("host"))!=null?M:L,T=Z.getOptionalString("token");if(!f(h))throw new Error(`Invalid Azure integration config, '${h}' is not a valid host`);return{host:h,token:T}}function j(Z){const h=Z.map(x);return h.some(T=>T.host===L)||h.push({host:L}),h}const bn=class{constructor(h){this.integrationConfig=h}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){var K;const{url:T,base:M}=h;if(S(T))return T;try{const ne=b.fromRepoUrl(M),me=new URL(M),Oe=new URL(`https://a.com${(K=ne.getPath())!=null?K:""}`),_e=new URL(T,Oe).pathname;return me.searchParams.set("path",_e),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(T,M).toString()}}resolveEditUrl(h){return h}};let D=bn;_(D,"factory",({config:h})=>{var M;const T=j((M=h.getOptionalConfigArray("integrations.azure"))!=null?M:[]);return m(T.map(K=>new bn(K)),K=>K.config.host)});var P=e(48834).Buffer;function F(Z){return AzureUrl.fromRepoUrl(Z).toFileUrl()}function B(Z){return AzureUrl.fromRepoUrl(Z).toArchiveUrl()}function w(Z){return AzureUrl.fromRepoUrl(Z).toCommitsUrl()}function V(Z,h){const T=h?{...h}:{};if(Z.token){const M=P.from(`:${Z.token}`,"utf8");T.Authorization=`Basic ${M.toString("base64")}`}return{headers:T}}const Q="bitbucket.org",ue="https://api.bitbucket.org/2.0";function $e(Z){var me;const h=(me=Z.getOptionalString("host"))!=null?me:Q;let T=Z.getOptionalString("apiBaseUrl");const M=Z.getOptionalString("token"),K=Z.getOptionalString("username"),ne=Z.getOptionalString("appPassword");if(!f(h))throw new Error(`Invalid Bitbucket integration config, '${h}' is not a valid host`);return T?T=(0,c.trimEnd)(T,"/"):h===Q?T=ue:T=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:T,token:M,username:K,appPassword:ne}}function Pe(Z){const h=Z.map($e);return h.some(T=>T.host===Q)||h.push({host:Q,apiBaseUrl:ue}),h}const _t=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const T=a(h);if(!h.lineNumber)return T;const M=new URL(T);return this.integrationConfig.host==="bitbucket.org"?M.hash=`lines-${h.lineNumber}`:M.hash=`${h.lineNumber}`,M.toString()}resolveEditUrl(h){const T=t()(h),M=new URL(h);return M.searchParams.set("mode","edit"),M.searchParams.set("spa","0"),M.searchParams.set("at",T.ref),M.toString()}};let de=_t;_(de,"factory",({config:h})=>{var M,K,ne;const T=Pe((ne=h.getOptionalConfigArray("integrations.bitbucket"))!=null?ne:[...(M=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?M:[],...(K=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?K:[]]);return m(T.map(me=>new _t(me)),me=>me.config.host)});var ze=e(96279),ae=e(48834).Buffer;async function Re(Z,h){const{name:T,owner:M,resource:K}=parseGitUrl(Z),ne=K==="bitbucket.org";let me=ne?`${h.apiBaseUrl}/repositories/${M}/${T}`:`${h.apiBaseUrl}/projects/${M}/repos/${T}/default-branch`,Oe=await fetch(me,Ye(h));if(Oe.status===404&&!ne&&(me=`${h.apiBaseUrl}/projects/${M}/repos/${T}/branches/default`,Oe=await fetch(me,Ye(h))),!Oe.ok){const Bt=`Failed to retrieve default branch from ${me}, ${Oe.status} ${Oe.statusText}`;throw new Error(Bt)}let _e;if(ne)_e=(await Oe.json()).mainbranch.name;else{const{displayId:Bt}=await Oe.json();_e=Bt}if(!_e)throw new Error(`Failed to read default branch from ${me}. Response ${Oe.status} ${Oe.json()}`);return _e}async function Me(Z,h){const{name:T,owner:M,ref:K,protocol:ne,resource:me,filepath:Oe}=parseGitUrl(Z),_e=me==="bitbucket.org";let Bt=K;Bt||(Bt=await Re(Z,h));const Mt=Oe?`&path=${encodeURIComponent(Oe)}`:"";return _e?`${ne}://${me}/${M}/${T}/get/${Bt}.tar.gz`:`${h.apiBaseUrl}/projects/${M}/repos/${T}/archive?format=tgz&at=${Bt}&prefix=${M}-${T}${Mt}`}function We(Z,h){try{const{owner:T,name:M,ref:K,filepathtype:ne,filepath:me}=parseGitUrl(Z);if(!T||!M||ne!=="browse"&&ne!=="raw"&&ne!=="src")throw new Error("Invalid Bitbucket URL or file path");const Oe=me.replace(/^\//,"");if(h.host==="bitbucket.org"){if(!K)throw new Error("Invalid Bitbucket URL or file path");return`${h.apiBaseUrl}/repositories/${T}/${M}/src/${K}/${Oe}`}return`${h.apiBaseUrl}/projects/${T}/repos/${M}/raw/${Oe}?at=${K}`}catch(T){throw new Error(`Incorrect URL: ${Z}, ${T}`)}}function Ye(Z){const h={};if(Z.token)h.Authorization=`Bearer ${Z.token}`;else if(Z.username&&Z.appPassword){const T=ae.from(`${Z.username}:${Z.appPassword}`,"utf8");h.Authorization=`Basic ${T.toString("base64")}`}return{headers:h}}const ve="bitbucket.org",Le="https://api.bitbucket.org/2.0";function xe(Z){const h=ve,T=Le,M=Z.getString("username"),K=Z.getString("appPassword");return{host:h,apiBaseUrl:T,username:M,appPassword:K}}function He(Z){const h=Z.map(xe);return h.length===0&&h.push({host:ve,apiBaseUrl:Le}),h}const yn=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const T=a(h);if(h.lineNumber){const M=new URL(T);return M.hash=`lines-${h.lineNumber}`,M.toString()}return T}resolveEditUrl(h){const T=t()(h),M=new URL(h);return M.searchParams.set("mode","edit"),M.searchParams.set("at",T.ref),M.toString()}};let at=yn;_(at,"factory",({config:h})=>{var M;const T=He((M=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?M:[]);return m(T.map(K=>new yn(K)),K=>K.config.host)});var At=e(48834).Buffer;async function et(Z,h){const{name:T,owner:M}=parseGitUrl(Z),K=`${h.apiBaseUrl}/repositories/${M}/${T}`,ne=await fetch(K,rt(h));if(!ne.ok){const _e=`Failed to retrieve default branch from ${K}, ${ne.status} ${ne.statusText}`;throw new Error(_e)}const Oe=(await ne.json()).mainbranch.name;if(!Oe)throw new Error(`Failed to read default branch from ${K}. Response ${ne.status} ${ne.json()}`);return Oe}async function it(Z,h){const{name:T,owner:M,ref:K,protocol:ne,resource:me}=parseGitUrl(Z);let Oe=K;return Oe||(Oe=await et(Z,h)),`${ne}://${me}/${M}/${T}/get/${Oe}.tar.gz`}function Qe(Z,h){try{const{owner:T,name:M,ref:K,filepathtype:ne,filepath:me}=parseGitUrl(Z);if(!T||!M||ne!=="src"&&ne!=="raw")throw new Error("Invalid Bitbucket Cloud URL or file path");const Oe=me.replace(/^\//,"");if(!K)throw new Error("Invalid Bitbucket Cloud URL or file path");return`${h.apiBaseUrl}/repositories/${T}/${M}/src/${K}/${Oe}`}catch(T){throw new Error(`Incorrect URL: ${Z}, ${T}`)}}function rt(Z){const h={};if(Z.username&&Z.appPassword){const T=At.from(`${Z.username}:${Z.appPassword}`,"utf8");h.Authorization=`Basic ${T.toString("base64")}`}return{headers:h}}function wt(Z){const h=Z.getString("host");let T=Z.getOptionalString("apiBaseUrl");const M=Z.getOptionalString("token");if(!f(h))throw new Error(`Invalid Bitbucket Server integration config, '${h}' is not a valid host`);return T?T=(0,c.trimEnd)(T,"/"):T=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:T,token:M}}function Zt(Z){return Z.map(wt)}const _n=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const T=a(h);if(h.lineNumber){const M=new URL(T),K=M.pathname.split("/").slice(-1)[0];return M.hash=`${K}-${h.lineNumber}`,M.toString()}return T}resolveEditUrl(h){const T=t()(h),M=new URL(h);return M.searchParams.set("mode","edit"),M.searchParams.set("spa","0"),M.searchParams.set("at",T.ref),M.toString()}};let zt=_n;_(zt,"factory",({config:h})=>{var M;const T=Zt((M=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?M:[]);return m(T.map(K=>new _n(K)),K=>K.config.host)});async function Fn(Z,h){const{name:T,owner:M}=parseGitUrl(Z);let K=`${h.apiBaseUrl}/projects/${M}/repos/${T}/default-branch`,ne=await fetch(K,dn(h));if(ne.status===404&&(K=`${h.apiBaseUrl}/projects/${M}/repos/${T}/branches/default`,ne=await fetch(K,dn(h))),!ne.ok){const _e=`Failed to retrieve default branch from ${K}, ${ne.status} ${ne.statusText}`;throw new Error(_e)}const{displayId:me}=await ne.json(),Oe=me;if(!Oe)throw new Error(`Failed to read default branch from ${K}. Response ${ne.status} ${ne.json()}`);return Oe}async function Yt(Z,h){const{name:T,owner:M,ref:K,filepath:ne}=parseGitUrl(Z);let me=K;me||(me=await Fn(Z,h));const Oe=ne?`&path=${encodeURIComponent(ne)}`:"";return`${h.apiBaseUrl}/projects/${M}/repos/${T}/archive?format=tgz&at=${me}&prefix=${M}-${T}${Oe}`}function Rt(Z,h){try{const{owner:T,name:M,ref:K,filepathtype:ne,filepath:me}=parseGitUrl(Z);if(!T||!M||ne!=="browse"&&ne!=="raw"&&ne!=="src")throw new Error("Invalid Bitbucket Server URL or file path");const Oe=me.replace(/^\//,"");return`${h.apiBaseUrl}/projects/${T}/repos/${M}/raw/${Oe}?at=${K}`}catch(T){throw new Error(`Incorrect URL: ${Z}, ${T}`)}}function dn(Z){const h={};return Z.token&&(h.Authorization=`Bearer ${Z.token}`),{headers:h}}function se(Z){const h=Z.getString("host");let T=Z.getOptionalString("baseUrl"),M=Z.getOptionalString("cloneUrl"),K=Z.getOptionalString("gitilesBaseUrl");const ne=Z.getOptionalString("username"),me=Z.getOptionalString("password");if(f(h)){if(T&&!S(T))throw new Error(`Invalid Gerrit integration config, '${T}' is not a valid baseUrl`);if(M&&!S(M))throw new Error(`Invalid Gerrit integration config, '${M}' is not a valid cloneUrl`);if(K&&!S(K))throw new Error(`Invalid Gerrit integration config, '${K}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${h}' is not a valid host`);return T?T=(0,c.trimEnd)(T,"/"):T=`https://${h}`,K?K=(0,c.trimEnd)(K,"/"):K=`https://${h}`,M?M=(0,c.trimEnd)(M,"/"):M=T,{host:h,baseUrl:T,cloneUrl:M,gitilesBaseUrl:K,username:ne,password:me}}function H(Z){return Z.map(se)}const Wn=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:T,base:M,lineNumber:K}=h;let ne;return T?ne=new URL(T,M):ne=new URL(M),K&&(ne.hash=K.toString()),ne.toString()}resolveEditUrl(h){return h}};let oe=Wn;_(oe,"factory",({config:h})=>{var M;const T=H((M=h.getOptionalConfigArray("integrations.gerrit"))!=null?M:[]);return m(T.map(K=>new Wn(K)),K=>K.config.host)});var fe=e(48834).Buffer;const he=")]}'";function Te(Z,h){const M=h.replace(Z.gitilesBaseUrl,"").split("/").filter(Bt=>!!Bt),K=M.indexOf("+");if(K<=0)throw new Error(`Unable to parse project from url: ${h}`);const ne=trimStart(M.slice(0,K).join("/"),"/"),me=M.indexOf("heads");if(me<=0)throw new Error(`Unable to parse branch from url: ${h}`);const Oe=M[me+1],_e=M.slice(me+2).join("/");return{branch:Oe,filePath:_e===""?"/":_e,project:ne}}function we(Z){return Z.password?"/a/":"/"}function De(Z,h){const{branch:T,project:M}=Te(Z,h);return`${Z.baseUrl}${we(Z)}projects/${encodeURIComponent(M)}/branches/${T}`}function ke(Z,h){const{project:T}=Te(Z,h);return`${Z.cloneUrl}${we(Z)}${T}`}function lt(Z,h){const{branch:T,filePath:M,project:K}=Te(Z,h);return`${Z.baseUrl}${we(Z)}projects/${encodeURIComponent(K)}/branches/${T}/files/${encodeURIComponent(M)}/content`}function Ut(Z){return`${Z.baseUrl}${we(Z)}projects/`}function Ft(Z){const h={};if(!Z.password)return h;const T=fe.from(`${Z.username}:${Z.password}`,"utf8");return h.Authorization=`Basic ${T.toString("base64")}`,{headers:h}}async function tt(Z){const h=await Z.text();if(h.startsWith(he))try{return JSON.parse(h.slice(he.length))}catch(T){throw new Error(`Invalid response from Gerrit: ${h.slice(0,10)} - ${T}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${h.slice(0,10)}`)}const It="github.com",jt="https://api.github.com",Vt="https://raw.githubusercontent.com";function gn(Z){var me,Oe;const h=(me=Z.getOptionalString("host"))!=null?me:It;let T=Z.getOptionalString("apiBaseUrl"),M=Z.getOptionalString("rawBaseUrl");const K=Z.getOptionalString("token"),ne=(Oe=Z.getOptionalConfigArray("apps"))==null?void 0:Oe.map(_e=>({appId:_e.getNumber("appId"),clientId:_e.getString("clientId"),clientSecret:_e.getString("clientSecret"),webhookSecret:_e.getString("webhookSecret"),privateKey:_e.getString("privateKey"),allowedInstallationOwners:_e.getOptionalStringArray("allowedInstallationOwners")}));if(!f(h))throw new Error(`Invalid GitHub integration config, '${h}' is not a valid host`);return T?T=(0,c.trimEnd)(T,"/"):h===It&&(T=jt),M?M=(0,c.trimEnd)(M,"/"):h===It&&(M=Vt),{host:h,apiBaseUrl:T,rawBaseUrl:M,token:K,apps:ne}}function fn(Z){const h=Z.map(gn);return h.some(T=>T.host===It)||h.push({host:It,apiBaseUrl:jt,rawBaseUrl:Vt}),h}function bt(Z,h,T){try{const{owner:M,name:K,ref:ne,filepathtype:me,filepath:Oe}=parseGitUrl(Z);if(!M||!K||!ne||me!=="blob"&&me!=="raw"&&me!=="tree")throw new Error("Invalid GitHub URL or file path");const _e=Oe.replace(/^\//,"");return re(h,T)==="api"?`${h.apiBaseUrl}/repos/${M}/${K}/contents/${_e}?ref=${ne}`:`${h.rawBaseUrl}/${M}/${K}/${ne}/${_e}`}catch(M){throw new Error(`Incorrect URL: ${Z}, ${M}`)}}function Je(Z,h){const T={};return re(Z,h)==="api"&&(T.Accept="application/vnd.github.v3.raw"),h.token&&(T.Authorization=`token ${h.token}`),{headers:T}}function re(Z,h){return Z.apiBaseUrl&&(h.token||!Z.rawBaseUrl)?"api":"raw"}class ${constructor(){_(this,"tokenCache",new Map);_(this,"isNotExpired",h=>h.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(h,T){const M=this.tokenCache.get(h);if(M&&this.isNotExpired(M.expiresAt))return{accessToken:M.token};const K=await T();return this.tokenCache.set(h,K),{accessToken:K.token}}}const A={Accept:"application/vnd.github.machine-man-preview+json"};class G{constructor(h,T){_(this,"appClient");_(this,"baseUrl");_(this,"baseAuthConfig");_(this,"cache",new $);_(this,"allowedInstallationOwners");this.allowedInstallationOwners=h.allowedInstallationOwners,this.baseUrl=T,this.baseAuthConfig={appId:h.appId,privateKey:h.privateKey.replace(/\\n/gm,`
31
+ `)},this.appClient=new Octokit({baseUrl:T,headers:A,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(h,T){var me;const{installationId:M,suspended:K}=await this.getInstallationData(h);if(this.allowedInstallationOwners&&!((me=this.allowedInstallationOwners)!=null&&me.includes(h)))return{accessToken:void 0};if(K)throw new Error(`The GitHub application for ${h} is suspended`);const ne=T?`${h}/${T}`:h;return this.cache.getOrCreateToken(ne,async()=>{const Oe=await this.appClient.apps.createInstallationAccessToken({installation_id:M,headers:A});if(T&&Oe.data.repository_selection==="selected"){const _e=new Octokit({baseUrl:this.baseUrl,auth:Oe.data.token});if(!(await _e.paginate(_e.apps.listReposAccessibleToInstallation)).some(Nn=>Nn.name===T))throw new Error(`The Backstage GitHub application used in the ${h} organization does not have access to a repository with the name ${T}`)}return{token:Oe.data.token,expiresAt:DateTime.fromISO(Oe.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(h){const M=(await this.getInstallations()).find(ne=>{var me,Oe;return((Oe=(me=ne.account)==null?void 0:me.login)==null?void 0:Oe.toLocaleLowerCase("en-US"))===h.toLocaleLowerCase("en-US")});if(M)return{installationId:M.id,suspended:Boolean(M.suspended_by)};const K=new Error(`No app installation found for ${h} in ${this.baseAuthConfig.appId}`);throw K.name="NotFoundError",K}}class ie{constructor(h){_(this,"apps");var T,M;this.apps=(M=(T=h.apps)==null?void 0:T.map(K=>new G(K,h.apiBaseUrl)))!=null?M:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(T=>T.getInstallations()))).flat():[]}async getAppToken(h,T){if(this.apps.length===0)return;const M=await Promise.all(this.apps.map(Oe=>Oe.getInstallationCredentials(h,T).then(_e=>({credentials:_e,error:void 0}),_e=>({credentials:void 0,error:_e})))),K=M.find(Oe=>Oe.credentials);if(K)return K.credentials.accessToken;const me=M.map(Oe=>Oe.error).find(Oe=>Oe.name!=="NotFoundError");if(me)throw me}}class ye{constructor(h,T){this.githubAppCredentialsMux=h,this.token=T}async getCredentials(h){const T=parseGitUrl(h.url),M=T.owner||T.name,K=T.owner?T.name:void 0;let ne="app",me=await this.githubAppCredentialsMux.getAppToken(M,K);return me||(ne="token",me=this.token),{headers:me?{Authorization:`Bearer ${me}`}:void 0,token:me,type:ne}}}_(ye,"create",null);class Se{static fromIntegrations(h){const T=new Map;return h.github.list().forEach(M=>{const K=SingleInstanceGithubCredentialsProvider.create(M.config);T.set(M.config.host,K)}),new Se(T)}constructor(h){this.providers=h}async getCredentials(h){const T=new URL(h.url),M=this.providers.get(T.host);if(!M)throw new Error(`There is no GitHub integration that matches ${h.url}. Please add a configuration for an integration.`);return M.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 Xe(a(h),"tree")}resolveEditUrl(h){return Xe(h,"edit")}};let Ne=Hn;_(Ne,"factory",({config:h})=>{var M;const T=fn((M=h.getOptionalConfigArray("integrations.github"))!=null?M:[]);return m(T.map(K=>new Hn(K)),K=>K.config.host)});function Xe(Z,h){return Z.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(T,M,K,ne)=>`//${M}/${K}/${ne}/${h}/`)}const ut="gitlab.com",gt="https://gitlab.com/api/v4";function ht(Z){const h=Z.getString("host");let T=Z.getOptionalString("apiBaseUrl");const M=Z.getOptionalString("token");let K=Z.getOptionalString("baseUrl");if(T?T=(0,c.trimEnd)(T,"/"):h===ut&&(T=gt),K?K=(0,c.trimEnd)(K,"/"):K=`https://${h}`,f(h)){if(!T||!S(T))throw new Error(`Invalid GitLab integration config, '${T}' is not a valid apiBaseUrl`);if(!S(K))throw new Error(`Invalid GitLab integration config, '${K}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${h}' is not a valid host`);return{host:h,token:M,apiBaseUrl:T,baseUrl:K}}function Ke(Z){const h=Z.map(ht);return h.some(T=>T.host===ut)||h.push({host:ut,apiBaseUrl:gt,baseUrl:`https://${ut}`}),h}var Lt=e(10179);async function qe(Z,h){if(Z.includes("/-/blob/")){const T=await pt(Z,h);return nn(Z,T).toString()}return qt(Z).toString()}function dt(Z){const{token:h=""}=Z;return{headers:{"PRIVATE-TOKEN":h}}}function qt(Z){try{const h=new URL(Z),T=h.pathname.split("/").filter(Boolean),M=T.indexOf("blob",2);if(M<2||M===T.length-1)throw new InputError("Wrong GitLab URL");const K=T.slice(0,M),ne=T.slice(M+1);if(!ne.join("/").match(/\.(yaml|yml)$/))throw new InputError("Wrong GitLab URL");return h.pathname=[...K,"raw",...ne].join("/"),h}catch(h){throw new InputError(`Incorrect url: ${Z}, ${h}`)}}function nn(Z,h){try{const T=new URL(Z),M=T.pathname.split("/-/blob/")[1],[K,...ne]=M.split("/");return T.pathname=["/api/v4/projects",h,"repository/files",encodeURIComponent(decodeURIComponent(ne.join("/"))),"raw"].join("/"),T.search=`?ref=${K}`,T}catch(T){throw new Error(`Incorrect url: ${Z}, ${T}`)}}async function pt(Z,h){const T=new URL(Z);if(!T.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const M=T.pathname.split("/-/blob/")[0],K=new URL(`${T.origin}/api/v4/projects/${encodeURIComponent(M.replace(/^\//,""))}`),ne=await fetch(K.toString(),dt(h)),me=await ne.json();if(!ne.ok)throw new Error(`GitLab Error '${me.error}', ${me.error_description}`);return Number(me.id)}catch(M){throw new Error(`Could not get GitLab project ID for: ${Z}, ${M}`)}}const Un=class{constructor(h){this.integrationConfig=h}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return a(h)}resolveEditUrl(h){return rn(h,"edit")}};let yt=Un;_(yt,"factory",({config:h})=>{var M;const T=Ke((M=h.getOptionalConfigArray("integrations.gitlab"))!=null?M:[]);return m(T.map(K=>new Un(K)),K=>K.config.host)});function rn(Z,h){return Z.replace(/\/\-\/(blob|tree|edit)\//,`/-/${h}/`)}class cn{constructor(h){_(this,"byType");this.byType=h}static fromConfig(h){return new cn({awsS3:p.factory({config:h}),azure:D.factory({config:h}),bitbucket:de.factory({config:h}),bitbucketCloud:at.factory({config:h}),bitbucketServer:zt.factory({config:h}),gerrit:oe.factory({config:h}),github:Ne.factory({config:h}),gitlab:yt.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(T=>T.byUrl(h)).find(Boolean)}byHost(h){return Object.values(this.byType).map(T=>T.byHost(h)).find(Boolean)}resolveUrl(h){const T=this.byUrl(h.base);return T?T.resolveUrl(h):a(h)}resolveEditUrl(h){const T=this.byUrl(h);return T?T.resolveEditUrl(h):h}}},46054:function(ee,s,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return S.plugin}});var t=e(2784),c=e(47093),f=e(10289),S=e(82250),m=e(47955),a=e(49208),i=e(36964),u=e(68099);const y=[(0,i.createApiFactory)({api:i.discoveryApiRef,deps:{configApi:i.configApiRef},factory:({configApi:I})=>a.UrlPatternDiscovery.compile(`${I.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,i.createApiFactory)({api:i.alertApiRef,deps:{},factory:()=>new a.AlertApiForwarder}),(0,i.createApiFactory)({api:i.analyticsApiRef,deps:{},factory:()=>new a.NoOpAnalyticsApi}),(0,i.createApiFactory)({api:i.errorApiRef,deps:{alertApi:i.alertApiRef},factory:({alertApi:I})=>{const q=new a.ErrorAlerter(I,new a.ErrorApiForwarder);return a.UnhandledErrorForwarder.forward(q,{hidden:!1}),q}}),(0,i.createApiFactory)({api:i.storageApiRef,deps:{errorApi:i.errorApiRef},factory:({errorApi:I})=>a.WebStorage.create({errorApi:I})}),(0,i.createApiFactory)({api:i.fetchApiRef,deps:{configApi:i.configApiRef,identityApi:i.identityApiRef,discoveryApi:i.discoveryApiRef},factory:({configApi:I,identityApi:q,discoveryApi:ce})=>(0,a.createFetchApi)({middleware:[a.FetchMiddlewares.resolvePluginProtocol({discoveryApi:ce}),a.FetchMiddlewares.injectIdentityAuth({identityApi:q,config:I})]})}),(0,i.createApiFactory)({api:i.oauthRequestApiRef,deps:{},factory:()=>new a.OAuthRequestManager}),(0,i.createApiFactory)({api:i.googleAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:I,oauthRequestApi:q,configApi:ce})=>a.GoogleAuth.create({discoveryApi:I,oauthRequestApi:q,environment:ce.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.microsoftAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:I,oauthRequestApi:q,configApi:ce})=>a.MicrosoftAuth.create({discoveryApi:I,oauthRequestApi:q,environment:ce.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.githubAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:I,oauthRequestApi:q,configApi:ce})=>a.GithubAuth.create({discoveryApi:I,oauthRequestApi:q,defaultScopes:["read:user"],environment:ce.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oktaAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:I,oauthRequestApi:q,configApi:ce})=>a.OktaAuth.create({discoveryApi:I,oauthRequestApi:q,environment:ce.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.gitlabAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:I,oauthRequestApi:q,configApi:ce})=>a.GitlabAuth.create({discoveryApi:I,oauthRequestApi:q,environment:ce.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oneloginAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:I,oauthRequestApi:q,configApi:ce})=>a.OneLoginAuth.create({discoveryApi:I,oauthRequestApi:q,environment:ce.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.bitbucketAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:I,oauthRequestApi:q,configApi:ce})=>a.BitbucketAuth.create({discoveryApi:I,oauthRequestApi:q,defaultScopes:["team"],environment:ce.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.atlassianAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:I,oauthRequestApi:q,configApi:ce})=>a.AtlassianAuth.create({discoveryApi:I,oauthRequestApi:q,environment:ce.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:u.RV,deps:{discovery:i.discoveryApiRef,identity:i.identityApiRef,config:i.configApiRef},factory:({config:I,discovery:q,identity:ce})=>u.iM.create({config:I,discovery:q,identity:ce})})];var p=e(77277),v=e(53492),b=e(62833);function L({children:I}){return(0,f.GV)()?t.createElement(t.Fragment,null,I):t.createElement(f.VA,null,I)}const x=()=>t.createElement(v.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),j=({step:I,error:q})=>{let ce="";return I==="load-config"?ce=`The configuration failed to load, someone should have a look at this error: ${q.message}`:I==="load-chunk"&&(ce=`Lazy loaded chunk failed to load, try to reload the page: ${q.message}`),t.createElement(L,null,t.createElement(v.ErrorPage,{status:"501",statusMessage:ce}))},D=({error:I,resetError:q,plugin:ce})=>t.createElement(v.ErrorPanel,{title:`Error in ${ce==null?void 0:ce.getId()}`,defaultExpanded:!0,error:I},t.createElement(p.Z,{variant:"outlined",onClick:q},"Retry")),P={Progress:v.Progress,Router:b.VK,NotFoundErrorPage:x,BootErrorPage:j,ErrorBoundaryFallback:D};var F=e(43642),B=e(80079),w=e(90941),V=e(32915),Q=e(40562),ue=e(21853),$e=e(60744),Pe=e(66569),de=e(30254),ze=e(13384),ae=e(15933),Re=e(58838),Me=e(86737),We=e(4989),Ye=e(44407),ve=e(18628),Le=e(84219),xe=e(98685),He=e(39781);const at={brokenImage:B.Z,catalog:ve.Z,scaffolder:V.Z,techdocs:Q.Z,search:ue.Z,chat:$e.Z,dashboard:Pe.Z,docs:de.Z,email:ze.Z,github:Re.Z,group:Le.Z,help:Me.Z,"kind:api":ae.Z,"kind:component":Ye.Z,"kind:domain":F.Z,"kind:group":Le.Z,"kind:location":We.Z,"kind:system":w.Z,"kind:user":xe.Z,user:xe.Z,warning:He.Z};var At=e(73689),et=e(48032);const it={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")`},Qe={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 rt(I,q){const be=`linear-gradient(90deg, ${(I.length===1?[I[0],I[0]]:I).join(", ")})`,je=`${q}, ${be}`;return{colors:I,shape:q,backgroundImage:je}}const wt={home:rt(Qe.teal,it.wave),documentation:rt(Qe.pinkSea,it.wave2),tool:rt(Qe.purpleSky,it.round),service:rt(Qe.marineBlue,it.wave),website:rt(Qe.veryBlue,it.wave),library:rt(Qe.rubyRed,it.wave),other:rt(Qe.darkGrey,it.wave),app:rt(Qe.toastyOrange,it.wave),apis:rt(Qe.teal,it.wave2)},Zt='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function zt(I){const{palette:q,fontFamily:ce=Zt,defaultPageTheme:be,pageTheme:je=wt}=I;if(!je[be])throw new Error(`${be} is not defined in pageTheme.`);return{palette:q,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:ce,h5:{fontWeight:700},h4:{fontWeight:700,fontSize:28,marginBottom:6},h3:{fontSize:32,fontWeight:700,marginBottom:6},h2:{fontSize:40,fontWeight:700,marginBottom:8},h1:{fontSize:54,fontWeight:700,marginBottom:10}},page:je[be],getPageTheme:({themeId:st})=>{var ct;return(ct=je[st])!=null?ct:je[be]}}}function Fn(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,et.darken)(I.palette.link,.3),background:(0,et.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 Yt(I){const q=zt(I),ce=(0,At.Z)(q),be=Fn(ce);return{...ce,overrides:be}}var Rt=e(34505);const dn=Yt({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:Rt.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:wt}),se=Yt({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:Rt.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:wt});var H=e(98192),oe=e(15222),fe=e(41547),he=e(87561);const Te=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(oe.Z,null),Provider:({children:I})=>t.createElement(fe.Z,{theme:dn},t.createElement(he.ZP,null,I))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(H.Z,null),Provider:({children:I})=>t.createElement(fe.Z,{theme:se},t.createElement(he.ZP,null,I))}];function we(I){var q,ce,be;return(0,a.createSpecializedApp)({...I,apis:(q=I==null?void 0:I.apis)!=null?q:[],bindRoutes:I==null?void 0:I.bindRoutes,components:{...P,...I==null?void 0:I.components},configLoader:I==null?void 0:I.configLoader,defaultApis:y,icons:{...at,...I==null?void 0:I.icons},plugins:(ce=I==null?void 0:I.plugins)!=null?ce:[],themes:(be=I==null?void 0:I.themes)!=null?be:Te})}var De=e(82394),ke=e.n(De),lt=e(48023),Ut=e(76635);async function Ft({storageApi:I}){var st;const q=I.forBucket("settings"),ce=I.forBucket("starredEntities"),be=q.snapshot("starredEntities").value;if(!(0,Ut.isArray)(be))return;const je=new Set((st=ce.snapshot("entityRefs").value)!=null?st:[]);be.filter(Ut.isString).map(ct=>ct.split(":")).filter(ct=>ct.length===4&&ct[0]==="entity").map(([ct,R,C,U])=>(0,lt.eE)({kind:R,namespace:C,name:U})).forEach(ct=>je.add(ct)),await ce.set("entityRefs",Array.from(je)),await q.remove("starredEntities")}class tt{constructor(q){_(this,"settingsStore");_(this,"starredEntities");_(this,"subscribers",new Set);_(this,"observable",new(ke())(q=>(q.next(new Set(this.starredEntities)),this.subscribers.add(q),()=>{this.subscribers.delete(q)})));var ce;Ft(q).then(),this.settingsStore=q.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((ce=this.settingsStore.snapshot("entityRefs").value)!=null?ce:[]),this.settingsStore.observe$("entityRefs").subscribe({next:be=>{var je;this.starredEntities=new Set((je=be.value)!=null?je:[]),this.notifyChanges()}})}async toggleStarred(q){this.starredEntities.has(q)?this.starredEntities.delete(q):this.starredEntities.add(q),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const q of this.subscribers)q.next(new Set(this.starredEntities))}}var It=e(39398),jt=e(49782),Vt=e(79692),gn=e(73624);const fn=(0,Vt.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function bt(I){var be,je;const q=I.result,ce=fn();return React.createElement(Link,{to:q.location},React.createElement(ListItem,{alignItems:"flex-start",className:ce.flexContainer},React.createElement(ListItemText,{className:ce.itemText,primaryTypographyProps:{variant:"h6"},primary:(be=I.highlight)!=null&&be.fields.title?React.createElement(HighlightedSearchResultText,{text:I.highlight.fields.title,preTag:I.highlight.preTag,postTag:I.highlight.postTag}):q.title,secondary:(je=I.highlight)!=null&&je.fields.text?React.createElement(HighlightedSearchResultText,{text:I.highlight.fields.text,preTag:I.highlight.preTag,postTag:I.highlight.postTag}):q.text}),React.createElement(Box,null,q.kind&&React.createElement(Chip,{label:`Kind: ${q.kind}`,size:"small"}),q.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${q.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))}var Je=e(30097),re=e(53479),$=e(95544),A=e(99688),G=e(12231),ie=e(86136),ye=e(49378),Se=e(85256),Ne=e(61837),Xe=e(79784),ut=e(50758),gt=e(49166),ht=e(31654),Ke=e(43054),Lt=e(40749);const qe="catalog-entity",dt=(0,Lt.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:qe}),qt=(0,Lt.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),nn=(0,Lt.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:qe}),pt=(0,Lt.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:qe}),yt=(0,Lt.J$)({name:"catalog.location.read",attributes:{action:"read"}}),rn=(0,Lt.J$)({name:"catalog.location.create",attributes:{action:"create"}}),cn=(0,Lt.J$)({name:"catalog.location.delete",attributes:{action:"delete"}}),Ot=(0,Vt.Z)({button:{color:"white"}});function ft(I){var le;const{UNSTABLE_extraContextMenuItems:q,UNSTABLE_contextMenuOptions:ce,onUnregisterEntity:be,onInspectEntity:je}=I,[st,ct]=(0,t.useState)(),R=Ot(),C=(0,re.useEntityPermission)(nn),U=ge=>{ct(ge.currentTarget)},z=()=>{ct(void 0)},J=q&&[...q.map(ge=>t.createElement(G.Z,{key:ge.title,onClick:()=>{z(),ge.onClick()}},t.createElement(ie.Z,null,t.createElement(ge.Icon,{fontSize:"small"})),t.createElement(ye.Z,{primary:ge.title}))),t.createElement(Se.Z,{key:"the divider is here!"})],Y=(le=!C.allowed||(ce==null?void 0:ce.disableUnregister))!=null?le:!1;return t.createElement(t.Fragment,null,t.createElement(Ne.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true","aria-expanded":!!st,role:"button",onClick:U,"data-testid":"menu-button",className:R.button,id:"long-menu"},t.createElement(Ke.Z,null)),t.createElement(Xe.ZP,{open:Boolean(st),onClose:z,anchorEl:st,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},"aria-labelledby":"long-menu"},t.createElement(ut.Z,null,J,t.createElement(G.Z,{onClick:()=>{z(),be()},disabled:Y},t.createElement(ie.Z,null,t.createElement(gt.Z,{fontSize:"small"})),t.createElement(ye.Z,{primary:"Unregister entity"})),t.createElement(G.Z,{onClick:()=>{z(),je()}},t.createElement(ie.Z,null,t.createElement(ht.Z,{fontSize:"small"})),t.createElement(ye.Z,{primary:"Inspect entity"})))))}const Et="plugin.catalog.entityLayoutRoute",St=()=>null;(0,i.attachComponentData)(St,Et,!0),(0,i.attachComponentData)(St,"core.gatherMountPoints",!0);function Ct(I){const{entity:q,title:ce}=I;return t.createElement($.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement($.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},ce),q&&t.createElement(re.FavoriteEntity,{entity:q}))}function Nt(I,q,ce,be){var R,C,U,z,J;const je=(R=I!=null?I:be==null?void 0:be.kind)!=null?R:"",st=(C=q!=null?q:be==null?void 0:be.metadata.namespace)!=null?C:"";return{headerTitle:`${(J=(z=(U=be==null?void 0:be.metadata.title)!=null?U:ce)!=null?z:be==null?void 0:be.metadata.name)!=null?J:""}${st&&st!==lt.zG?` in ${st}`:""}`,headerType:(()=>{let Y=je.toLocaleLowerCase("en-US");return be&&be.spec&&"type"in be.spec&&(Y+=" \u2014 ",Y+=be.spec.type.toLocaleLowerCase("en-US")),Y})()}}function Gt(I){var be;const{entity:q}=I,ce=(0,re.getEntityRelations)(q,lt.S4);return t.createElement(t.Fragment,null,ce.length>0&&t.createElement(v.HeaderLabel,{label:"Owner",value:t.createElement(re.EntityRefLinks,{entityRefs:ce,defaultKind:"Group",color:"inherit"})}),((be=q.spec)==null?void 0:be.lifecycle)&&t.createElement(v.HeaderLabel,{label:"Lifecycle",value:q.spec.lifecycle}))}const on=I=>{var Ve,Ue,vt;const{UNSTABLE_extraContextMenuItems:q,UNSTABLE_contextMenuOptions:ce,children:be,NotFoundComponent:je}=I,{kind:st,namespace:ct,name:R}=(0,i.useRouteRefParams)(re.entityRouteRef),{entity:C,loading:U,error:z}=(0,re.useAsyncEntity)(),J=(0,f.TH)(),Y=(0,i.useElementFilter)(be,Wt=>Wt.selectByComponentData({key:Et,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:un})=>{if(C){if(un.if&&!un.if(C))return[]}else return[];return[{path:un.path,title:un.title,children:un.children,tabProps:un.tabProps}]}),[C]),{headerTitle:le,headerType:ge}=Nt(st,ct,R,C),[Be,Ce]=(0,t.useState)(!1),[Ie,Fe]=(0,t.useState)(!1),Ze=(0,f.s0)(),mt=async()=>{Ce(!1),Fe(!1),Ze("/")};return(0,t.useEffect)(()=>{Ce(!1),Fe(!1)},[J.pathname]),t.createElement(v.Page,{themeId:(vt=(Ue=(Ve=C==null?void 0:C.spec)==null?void 0:Ve.type)==null?void 0:Ue.toString())!=null?vt:"home"},t.createElement(v.Header,{title:t.createElement(Ct,{title:le,entity:C}),pageTitleOverride:le,type:ge},C&&t.createElement(t.Fragment,null,t.createElement(Gt,{entity:C}),t.createElement(ft,{UNSTABLE_extraContextMenuItems:q,UNSTABLE_contextMenuOptions:ce,onUnregisterEntity:()=>Ce(!0),onInspectEntity:()=>Fe(!0)}))),U&&t.createElement(v.Progress,null),C&&t.createElement(v.RoutedTabs,{routes:Y}),z&&t.createElement(v.Content,null,t.createElement(A.Z,{severity:"error"},z.toString())),!U&&!z&&!C&&t.createElement(v.Content,null,je||t.createElement(v.WarningPanel,{title:"Entity not found"},"There is no ",st," with the requested"," ",t.createElement(v.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(re.UnregisterEntityDialog,{open:Be,entity:C,onConfirm:mt,onClose:()=>Ce(!1)}),t.createElement(re.InspectEntityDialog,{open:Ie,entity:C,onClose:()=>Fe(!1)}))};on.Route=St;var pn=e(10179);function bn(I){const{open:q,onClose:ce,onConfirm:be,entity:je}=I,[st,ct]=useState(!1),R=useApi(catalogApiRef),C=useApi(alertApiRef),U=async()=>{ct(!0);try{const z=je.metadata.uid;await R.removeEntityByUid(z),be()}catch(z){assertError(z),C.post({message:z.message})}finally{ct(!1)}};return React.createElement(Dialog,{open:q,onClose:ce},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:st,onClick:U},"Delete"),React.createElement(Button,{onClick:ce,color:"primary"},"Cancel")))}var _t=e(47851);function yn(I){var q,ce;return((ce=(q=I==null?void 0:I.metadata)==null?void 0:q.annotations)==null?void 0:ce["backstage.io/orphan"])==="true"}function _n(){const I=useNavigate(),q=useRouteRef(rootRouteRef),[ce,be]=useState(!1),{entity:je}=useEntity(),st=async()=>{be(!1),I(q())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>be(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:ce,entity:je,onConfirm:st,onClose:()=>be(!1)}))}var Wn=e(30001);const Hn=I=>I.error&&I.level==="error"&&I.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function Un(I,q){return{items:(await q.getEntityAncestors({entityRef:I})).items.map(je=>{var R,C;return{errors:((C=(R=je.entity.status)==null?void 0:R.items)!=null?C:[]).filter(Hn).map(U=>U.error).filter(U=>Boolean(U)),entity:je.entity}}).filter(je=>je.errors.length>0)}}async function Z(I,q){const ce=q.apis.get(catalogApiRef);if(!ce)throw new Error(`No implementation available for ${catalogApiRef}`);return(await Un(stringifyEntityRef(I),ce)).items.length>0}function h(){const{entity:I}=useEntity(),q=stringifyEntityRef(I),ce=useApi(catalogApiRef),{loading:be,error:je,value:st}=useAsync(async()=>Un(q,ce),[q,ce]);return je?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:je})):be||!st?null:React.createElement(React.Fragment,null,st.items.map((ct,R)=>React.createElement(Box,{key:R,mb:1},stringifyEntityRef(I)!==stringifyEntityRef(ct.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:ct.entity})),ct.errors.map((C,U)=>React.createElement(ResponseErrorPanel,{key:U,error:C})))))}var T=e(64279);const M="core.backstage.entitySwitch",K=I=>null;(0,i.attachComponentData)(K,M,!0);const ne=I=>{var ct,R;const{entity:q,loading:ce}=(0,re.useAsyncEntity)(),be=(0,i.useApiHolder)(),je=(0,i.useElementFilter)(I.children,C=>C.selectByComponentData({key:M,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(U=>{var Y;if(ce)return[];const{if:z,children:J}=U.props;return q?[{if:(Y=z==null?void 0:z(q,{apis:be}))!=null?Y:!0,children:J}]:[{if:z===void 0,children:J}]}),[be,q,ce]);return je.some(C=>typeof C.if=="object"&&"then"in C.if)?t.createElement(me,{results:je}):(R=(ct=je.find(C=>C.if))==null?void 0:ct.children)!=null?R:null};function me({results:I}){const{loading:q,value:ce}=(0,T.default)(async()=>{var je;const be=I.map(async({if:st,children:ct})=>{try{if(await st)return ct}catch{}return null});return(je=(await Promise.all(be)).find(Boolean))!=null?je:null},[I]);return q||!ce?null:ce}ne.Case=K;const Oe=null,_e=re.CatalogFilterLayout.Filters,Bt=re.CatalogFilterLayout.Content,Mt=(0,i.createPlugin)({id:"catalog",apis:[(0,i.createApiFactory)({api:re.catalogApiRef,deps:{discoveryApi:i.discoveryApiRef,fetchApi:i.fetchApiRef},factory:({discoveryApi:I,fetchApi:q})=>new Wn.MS({discoveryApi:I,fetchApi:q})}),(0,i.createApiFactory)({api:re.starredEntitiesApiRef,deps:{storageApi:i.storageApiRef},factory:({storageApi:I})=>new tt({storageApi:I})})],routes:{catalogIndex:_t._Z,catalogEntity:re.entityRouteRef},externalRoutes:{createComponent:_t.yw,viewTechDoc:_t.jU}}),Nn=Mt.provide((0,i.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(I=>I.CatalogPage),mountPoint:_t._Z})),Yn=Mt.provide((0,i.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(I=>I.CatalogEntityPage),mountPoint:re.entityRouteRef})),Ur=Mt.provide((0,i.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(I=>I.AboutCard)}})),ir=Mt.provide((0,i.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(I=>I.EntityLinksCard)}})),Nr=Mt.provide((0,i.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(I=>I.HasSystemsCard)}})),Zr=Mt.provide((0,i.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(I=>I.HasComponentsCard)}})),Zn=Mt.provide((0,i.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(I=>I.HasSubcomponentsCard)}})),Bn=Mt.provide((0,i.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(I=>I.HasResourcesCard)}})),Jn=Mt.provide((0,i.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(I=>I.DependsOnComponentsCard)}})),lr=Mt.provide((0,i.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(I=>I.DependencyOfComponentsCard)}})),Sr=Mt.provide((0,i.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(I=>I.DependsOnResourcesCard)}})),zr=Mt.provide((0,i.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(I=>I.RelatedEntitiesCard)}}));var Qn=e(36356);class Cr{constructor({configApi:q,discoveryApi:ce,identityApi:be}){_(this,"configApi");_(this,"discoveryApi");_(this,"identityApi");this.configApi=q,this.discoveryApi=ce,this.identityApi=be}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(q,ce){const je=`${await this.getApiOrigin()}/${ce}`,st=await fetch(`${je.endsWith("/")?je:`${je}/`}index.html`);if(st.status===404)throw new Error("Page not found");return st.text()}async syncEntityDocs(q){return"cached"}async getBaseUrl(q,ce,be){const je=await this.getApiOrigin();return new URL(q,`${je}/${be}`).toString()}}class Wr{constructor({configApi:q,discoveryApi:ce,identityApi:be}){_(this,"configApi");_(this,"discoveryApi");_(this,"identityApi");this.configApi=q,this.discoveryApi=ce,this.identityApi=be}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(q){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(q){return{site_name:"Live preview environment",site_description:""}}}const er=[(0,i.createApiFactory)({api:m.Dl,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:I,discoveryApi:q,identityApi:ce})=>new Cr({configApi:I,discoveryApi:q,identityApi:ce})}),(0,i.createApiFactory)({api:m.gT,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:I,discoveryApi:q,identityApi:ce})=>new Wr({configApi:I,discoveryApi:q,identityApi:ce})}),(0,i.createApiFactory)({api:Qn.q3,deps:{configApi:i.configApiRef},factory:({configApi:I})=>Qn.ae.fromConfig(I)})],En={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},tr={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function nr(){const I=await fetch("/.detect");return I.ok?(await I.text()).trim()==="techdocs-cli-server":!1}async function Tr(){const I=await(0,a.defaultConfigLoader)(),q=await nr();return[...I,{context:"detected",data:q?En:tr}]}var cr=e(86689),ur=e(58845);const br=(0,Vt.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var rr=()=>{const I=br();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 Pr=(0,Vt.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var dr=()=>{const I=Pr();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 Ir=(0,Vt.Z)({root:{width:v.sidebarConfig.drawerWidthClosed,height:3*v.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:v.sidebarConfig.drawerWidthClosed,marginLeft:24}}),fr=()=>{const I=Ir(),{isOpen:q}=(0,t.useContext)(v.SidebarContext);return t.createElement("div",{className:I.root},t.createElement(cr.Z,{component:b.OL,to:"/docs/default/component/local/",underline:"none",className:I.link},q?t.createElement(rr,null):t.createElement(dr,null)))},Lr=({children:I})=>t.createElement(v.SidebarPage,null,t.createElement(v.Sidebar,null,t.createElement(fr,null),t.createElement(v.SidebarDivider,null),t.createElement(v.SidebarItem,{icon:ur.Z,to:"/docs/default/component/local",text:"Docs Preview"})),I);var mr=e(80030),en=e(32388),Pn=e(4142);const Or=(0,Vt.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 In;(function(I){const q="light";I.LIGHT=q;const ce="dark";I.DARK=ce})(In||(In={}));const hr=()=>{const I=(0,i.useApi)(i.appThemeApiRef),q=Or(),[ce,be]=(0,t.useState)(I.getActiveThemeId()||In.LIGHT),je={[In.LIGHT]:{icon:Pn.Z,title:"Dark theme"},[In.DARK]:{icon:en.Z,title:"Light theme"}},{title:st,icon:ct}=je[ce],R=()=>{be(C=>{const U=C===In.LIGHT?In.DARK:In.LIGHT;return I.setActiveThemeId(U),U})};return t.createElement($.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(mr.ZP,{title:st,arrow:!0},t.createElement(Ne.Z,{size:"small",onClick:R},t.createElement(ct,{className:q.headerIcon}))))},jn=()=>t.createElement(S.TechDocsReaderPage,null,t.createElement(S.TechDocsReaderPageHeader,null),t.createElement(S.TechDocsReaderPageContent,{withSearch:!1})),Vn=t.createElement(jn,null),gr=we({apis:er,configLoader:Tr,plugins:Object.values(r)}),xr=gr.getProvider(),pr=gr.getRouter(),Gn=S.techdocsPlugin.provide((0,m.KY)({name:"ThemeToggleAddon",component:hr,location:m.oZ.Header})),Vr=t.createElement(a.FlatRoutes,null,t.createElement(f.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(f.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(Yn,null)}),t.createElement(f.AW,{path:"/docs",element:t.createElement(S.TechDocsIndexPage,null)},t.createElement(S.DefaultTechDocsHome,null)),t.createElement(f.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(S.TechDocsReaderPage,null)},Vn,t.createElement(m.DR,null,t.createElement(Gn,null))));var yr=()=>t.createElement(xr,null,t.createElement(pr,null,t.createElement(Lr,null,Vr)));c.render(t.createElement(yr,null),document.getElementById("root"))},76241:function(ee,s,e){"use strict";e.d(s,{CT:function(){return m},EI:function(){return u},uW:function(){return f},Vt:function(){return a}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),c=y=>`__@backstage/${y}__`;function f(y,p){const v=c(y);let b=t[v];return b||(b=p(),t[v]=b,b)}var S=e(2784);function m(y){return f(y,()=>(0,S.createContext)(void 0))}function a(y){return(0,S.useContext)(m(y))}function i(y){return{set(p){globalThis[`__@backstage/${y}__`]=createContext(createVersionedValueMap(p))},reset(){delete globalThis[`__@backstage/${y}__`]}}}function u(y){return Object.freeze(y),{atVersion(p){return y[p]}}}},53479:function(ee,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return w},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return P},EntityKindFilter:function(){return oe},EntityLifecyclePicker:function(){return Ke},EntityListProvider:function(){return At},EntityOwnerPicker:function(){return qt},EntityRefLink:function(){return se},EntityRefLinks:function(){return H},EntityTable:function(){return ft},EntityTagPicker:function(){return Nt},EntityTypePicker:function(){return pn},FavoriteEntity:function(){return Hn},InspectEntityDialog:function(){return gr},UnregisterEntityDialog:function(){return yr},UserListPicker:function(){return st},catalogApiRef:function(){return c},entityRouteRef:function(){return zt},getEntityRelations:function(){return Le},getEntitySourceLocation:function(){return xe},humanizeEntityRef:function(){return Yt},starredEntitiesApiRef:function(){return f},useAsyncEntity:function(){return ue},useEntity:function(){return Q},useEntityList:function(){return et},useEntityOwnership:function(){return fn},useEntityPermission:function(){return Je},useRelatedEntities:function(){return Ft},useStarredEntities:function(){return jt}});var r=e(30001),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.catalog.service"}),f=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var S=e(82394);class m{constructor(){_(this,"starredEntities",new Set);_(this,"subscribers",new Set);_(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 U of this.subscribers)U.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var a=e(2784),i=e(41156),u=e(60364),y=e(77277),p=e(4190),v=e(95544),b=e(90436),L=e(60905),x=e(36444);const j=R=>{const C=(0,i.Z)(Y=>Y.breakpoints.down("md")),U=(0,u.Z)(),[z,J]=(0,a.useState)(!1);return C?a.createElement(a.Fragment,null,a.createElement(y.Z,{style:{marginTop:U.spacing(1),marginLeft:U.spacing(1)},onClick:()=>J(!0),startIcon:a.createElement(x.Z,null)},"Filters"),a.createElement(p.ZP,{open:z,onClose:()=>J(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},a.createElement(v.Z,{m:2},a.createElement(b.Z,{variant:"h6",component:"h2",style:{marginBottom:U.spacing(1)}},"Filters"),R.children))):a.createElement(L.Z,{item:!0,lg:2},R.children)},D=R=>a.createElement(L.Z,{item:!0,xs:12,lg:10},R.children),P=R=>a.createElement(L.Z,{container:!0,style:{position:"relative"}},R.children);P.Filters=j,P.Content=D;var F=e(76241);const B=(0,F.CT)("entity-context"),w=({children:R,entity:C,loading:U,error:z,refresh:J})=>{const Y={entity:C,loading:U,error:z,refresh:J};return a.createElement(B.Provider,{value:(0,F.EI)({1:Y})},R)},V=R=>React.createElement(w,{entity:R.entity,loading:!Boolean(R.entity),error:void 0,refresh:void 0,children:R.children});function Q(){const R=(0,F.Vt)("entity-context");if(!R)throw new Error("Entity context is not available");const C=R.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 R=(0,F.Vt)("entity-context");if(!R)throw new Error("Entity context is not available");const C=R.atVersion(1);if(!C)throw new Error("EntityContext v1 not available");const{entity:U,loading:z,error:J,refresh:Y}=C;return{entity:U,loading:z,error:J,refresh:Y}}var $e=e(76635),Pe=e(19126),de=e.n(Pe),ze=e(10289),ae=e(69294),Re=e(48760),Me=e(90736);function We(R){return R.reduce((C,U)=>({...C,...U.getCatalogFilters?U.getCatalogFilters():{}}),{})}function Ye(R){return C=>R.every(U=>!U.filterEntity||U.filterEntity(C))}var ve=e(48023);function Le(R,C,U){var J;let z=((J=R==null?void 0:R.relations)==null?void 0:J.filter(Y=>Y.type===C).map(Y=>(0,ve.of)(Y.targetRef)))||[];return U!=null&&U.kind&&(z=z.filter(Y=>Y.kind.toLocaleLowerCase("en-US")===U.kind.toLocaleLowerCase("en-US"))),z}function xe(R,C){var z;const U=(z=R.metadata.annotations)==null?void 0:z[ve.M6];if(!!U)try{const J=(0,ve.Ou)(U),Y=C.byUrl(J.target);return{locationTargetUrl:J.target,integrationType:Y==null?void 0:Y.type}}catch{return}}function He(R,C){const U=new Set([...getEntityRelations(R,RELATION_MEMBER_OF,{kind:"group"}),...R?[getCompoundEntityRef(R)]:[]].map(stringifyEntityRef)),z=getEntityRelations(C,RELATION_OWNED_BY).map(stringifyEntityRef);for(const J of z)if(U.has(J))return!0;return!1}const at=(0,a.createContext)(void 0),At=({children:R})=>{const C=(0,Me.default)(),U=(0,t.useApi)(c),[z,J]=(0,a.useState)({}),Y=(0,ze.TH)(),le=(0,a.useMemo)(()=>{var Ve;return(Ve=de().parse(Y.search,{ignoreQueryPrefix:!0}).filters)!=null?Ve:{}},[Y]),[ge,Be]=(0,a.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:Ce,error:Ie},Fe]=(0,ae.default)(async()=>{var vn;const Ve=(0,$e.compact)(Object.values(z)),Ue=Ye(Ve),vt=We(Ve),Wt=We((0,$e.compact)(Object.values(ge.appliedFilters))),un=Object.keys(z).reduce((an,mn)=>{const An=z[mn];return An!=null&&An.toQueryValue&&(an[mn]=An.toQueryValue()),an},{});if((0,$e.isEqual)(Wt,vt))Be({appliedFilters:z,backendEntities:ge.backendEntities,entities:ge.backendEntities.filter(Ue)});else{const an=await U.getEntities({filter:vt});Be({appliedFilters:z,backendEntities:an.items,entities:an.items.filter(Ue)})}if(C()){const an=de().parse(Y.search,{ignoreQueryPrefix:!0}),mn=de().stringify({...an,filters:un},{addQueryPrefix:!0,arrayFormat:"repeat"}),An=`${window.location.pathname}${mn}`;(vn=window.history)==null||vn.replaceState(null,document.title,An)}},[U,le,z,ge],{loading:!0});(0,Re.Z)(Fe,10,[z]);const Ze=(0,a.useCallback)(Ve=>{J(Ue=>{const vt=typeof Ve=="function"?Ve(Ue):Ve;return{...Ue,...vt}})},[]),mt=(0,a.useMemo)(()=>({filters:ge.appliedFilters,entities:ge.entities,backendEntities:ge.backendEntities,updateFilters:Ze,queryParameters:le,loading:Ce,error:Ie}),[ge,Ze,le,Ce,Ie]);return a.createElement(at.Provider,{value:mt},R)};function et(){const R=(0,a.useContext)(at);if(!R)throw new Error("useEntityList must be used within EntityListProvider");return R}var it=e(64279),Qe=e(18149),rt=e.n(Qe),wt=e(829),Zt=e.n(wt);const zt=(0,F.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function Fn(R){var C,U;return{kind:R.kind.toLocaleLowerCase("en-US"),namespace:(U=(C=R.metadata.namespace)==null?void 0:C.toLocaleLowerCase("en-US"))!=null?U:DEFAULT_NAMESPACE,name:R.metadata.name}}function Yt(R,C){const U=C==null?void 0:C.defaultKind;let z,J,Y;return"metadata"in R?(z=R.kind,J=R.metadata.namespace,Y=R.metadata.name):(z=R.kind,J=R.namespace,Y=R.name),J===ve.zG&&(J=void 0),z=z.toLocaleLowerCase("en-US"),z=U&&U.toLocaleLowerCase("en-US")===z?void 0:z,`${z?`${z}:`:""}${J?`${J}/`:""}${Y}`}var Rt=e(53492),dn=e(80030);const se=(0,a.forwardRef)((R,C)=>{var Ve;const{entityRef:U,defaultKind:z,title:J,children:Y,...le}=R,ge=(0,t.useRouteRef)(zt);let Be,Ce,Ie;if(typeof U=="string"){const Ue=(0,ve.of)(U);Be=Ue.kind,Ce=Ue.namespace,Ie=Ue.name}else"metadata"in U?(Be=U.kind,Ce=U.metadata.namespace,Ie=U.metadata.name):(Be=U.kind,Ce=U.namespace,Ie=U.name);Be=Be.toLocaleLowerCase("en-US"),Ce=(Ve=Ce==null?void 0:Ce.toLocaleLowerCase("en-US"))!=null?Ve:ve.zG;const Fe={kind:Be,namespace:Ce,name:Ie},Ze=Yt({kind:Be,namespace:Ce,name:Ie},{defaultKind:z}),mt=a.createElement(Rt.Link,{...le,ref:C,to:ge(Fe)},Y,!Y&&(J!=null?J:Ze));return J?a.createElement(dn.ZP,{title:Ze},mt):mt});function H(R){const{entityRefs:C,defaultKind:U,...z}=R;return a.createElement(a.Fragment,null,C.map((J,Y)=>a.createElement(a.Fragment,{key:Y},Y>0&&", ",a.createElement(se,{...z,entityRef:J,defaultKind:U}))))}class oe{constructor(C){this.value=C}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class fe{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 he{constructor(C){this.values=C}filterEntity(C){return this.values.every(U=>{var z;return((z=C.metadata.tags)!=null?z:[]).includes(U)})}toQueryValue(){return this.values}}class Te{constructor(C){this.value=C}filterEntity(C){var z;const U=this.value.toLocaleUpperCase("en-US");return C.metadata.name.toLocaleUpperCase("en-US").includes(U)||`${C.metadata.title}`.toLocaleUpperCase("en-US").includes(U)||((z=C.metadata.tags)==null?void 0:z.join("").toLocaleUpperCase("en-US").indexOf(U))!==-1}}class we{constructor(C){this.values=C}filterEntity(C){return this.values.some(U=>Le(C,ve.S4).some(z=>Yt(z,{defaultKind:"group"})===U))}toQueryValue(){return this.values}}class De{constructor(C){this.values=C}filterEntity(C){return this.values.some(U=>{var z;return((z=C.spec)==null?void 0:z.lifecycle)===U})}toQueryValue(){return this.values}}class ke{constructor(C,U,z){this.value=C,this.isOwnedEntity=U,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 lt(){var Ue;const R=(0,t.useApi)(c),{filters:{kind:C,type:U},queryParameters:{type:z},updateFilters:J}=et(),Y=(0,a.useMemo)(()=>[z].flat().filter(Boolean),[z]),[le,ge]=(0,a.useState)(Y.length?Y:(Ue=U==null?void 0:U.getTypes())!=null?Ue:[]);(0,a.useEffect)(()=>{Y.length&&ge(Y)},[Y]);const[Be,Ce]=(0,a.useState)([]),Ie=(0,a.useMemo)(()=>C==null?void 0:C.value,[C]),{error:Fe,loading:Ze,value:mt}=(0,it.default)(async()=>Ie?await R.getEntityFacets({filter:{kind:Ie},facets:["spec.type"]}).then(Wt=>Wt.facets["spec.type"]||[]):[],[Ie,R]),Ve=(0,a.useRef)(mt);return(0,a.useEffect)(()=>{const vt=Ve.current;if(Ve.current=mt,Ze||!Ie||vt===mt||!mt)return;const Wt=[...new Set(Zt()(mt,vn=>-vn.count).map(vn=>vn.value.toLocaleLowerCase("en-US")))];Ce(Wt);const un=le.filter(vn=>Wt.includes(vn));rt()(le,un)||ge(un)},[Ze,Ie,le,ge,mt]),(0,a.useEffect)(()=>{J({type:le.length?new fe(le):void 0})},[le,J]),{loading:Ze,error:Fe,availableTypes:Be,selectedTypes:le,setSelectedTypes:ge}}const Ut=20;function Ft(R,C){var Be,Ce;const U=(Be=C==null?void 0:C.type)==null?void 0:Be.toLocaleLowerCase("en-US"),z=(Ce=C==null?void 0:C.kind)==null?void 0:Ce.toLocaleLowerCase("en-US"),J=(0,t.useApi)(c),{loading:Y,value:le,error:ge}=(0,it.default)(async()=>{var Ve;const Ie=(Ve=R.relations)==null?void 0:Ve.map(Ue=>({type:Ue.type,target:(0,ve.of)(Ue.targetRef)})).filter(Ue=>(!U||Ue.type.toLocaleLowerCase("en-US")===U)&&(!z||Ue.target.kind===z));if(!Ie)return[];const Fe=Object.values((0,$e.groupBy)(Ie,({target:Ue})=>`${Ue.kind}:${Ue.namespace}`.toLocaleLowerCase("en-US"))),Ze=[];for(const Ue of Fe)Ze.push({kind:Ue[0].target.kind,namespace:Ue[0].target.namespace,nameBatches:(0,$e.chunk)(Ue.map(vt=>vt.target.name),Ut)});return(await Promise.all(Ze.flatMap(Ue=>Ue.nameBatches.map(vt=>J.getEntities({filter:{kind:Ue.kind,"metadata.namespace":Ue.namespace,"metadata.name":vt}}))))).flatMap(Ue=>Ue.items)},[R,U,z]);return{entities:le,loading:Y,error:ge}}var tt=e(72164);function It(R){return typeof R=="string"?R:(0,ve.eE)(R)}function jt(){const R=(0,t.useApi)(f),C=(0,tt.Z)(R.starredEntitie$(),new Set),U=(0,a.useCallback)(J=>C.has(It(J)),[C]),z=(0,a.useCallback)(J=>R.toggleStarred(It(J)).then(),[R]);return{starredEntities:C,toggleStarredEntity:z,isStarredEntity:U}}function Vt(R){return typeof R=="string"?R:(0,ve.eE)(R)}function gn(R){const C=(0,t.useApi)(f),[U,z]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{const Y=C.starredEntitie$().subscribe({next(le){z(le.has(Vt(R)))}});return()=>{Y.unsubscribe()}},[R,C]),{toggleStarredEntity:(0,a.useCallback)(()=>C.toggleStarred(Vt(R)).then(),[R,C]),isStarredEntity:U}}function fn(){const R=(0,t.useApi)(t.identityApiRef),{loading:C,value:U}=(0,it.default)(async()=>{const{ownershipEntityRefs:J}=await R.getBackstageIdentity();return J},[]),z=(0,a.useMemo)(()=>{const J=new Set(U!=null?U:[]);return Y=>{const le=Le(Y,ve.S4).map(ve.eE);for(const ge of le)if(J.has(ge))return!0;return!1}},[U]);return(0,a.useMemo)(()=>({loading:C,isOwnedEntity:z}),[C,z])}var bt=e(68099);function Je(R){const{entity:C,loading:U,error:z}=ue(),{allowed:J,loading:Y,error:le}=(0,bt.gI)({permission:R,resourceRef:C?(0,ve.eE)(C):void 0});return U||Y?{loading:!0,allowed:!1}:z?{loading:!1,allowed:!1,error:z}:{loading:!1,allowed:J,error:le}}const re=R=>{var le;const{initialFilter:C,hidden:U}=R,{updateFilters:z,queryParameters:{kind:J}}=useEntityList(),[Y]=useState((le=[J].flat()[0])!=null?le:C);return useEffect(()=>{z({kind:Y?new EntityKindFilter(Y):void 0})},[Y,z]),U?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var $=e(79692),A=e(5806),G=e(21324),ie=e(86619),ye=e(19996),Se=e(25505),Ne=e(38016),Xe=e(88013);const ut=(0,$.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),gt=a.createElement(Se.Z,{fontSize:"small"}),ht=a.createElement(ye.Z,{fontSize:"small"}),Ke=()=>{var Ce,Ie;const R=ut(),{updateFilters:C,backendEntities:U,filters:z,queryParameters:{lifecycles:J}}=et(),Y=(0,a.useMemo)(()=>[J].flat().filter(Boolean),[J]),[le,ge]=(0,a.useState)(Y.length?Y:(Ie=(Ce=z.lifecycles)==null?void 0:Ce.values)!=null?Ie:[]);(0,a.useEffect)(()=>{Y.length&&ge(Y)},[Y]),(0,a.useEffect)(()=>{C({lifecycles:le.length?new De(le):void 0})},[le,C]);const Be=(0,a.useMemo)(()=>[...new Set(U.map(Fe=>{var Ze;return(Ze=Fe.spec)==null?void 0:Ze.lifecycle}).filter(Boolean))].sort(),[U]);return Be.length?a.createElement(v.Z,{pb:1,pt:1},a.createElement(b.Z,{variant:"button"},"Lifecycle"),a.createElement(Xe.ZP,{"aria-label":"Lifecycle",multiple:!0,options:Be,value:le,onChange:(Fe,Ze)=>ge(Ze),renderOption:(Fe,{selected:Ze})=>a.createElement(A.Z,{control:a.createElement(G.Z,{icon:gt,checkedIcon:ht,checked:Ze}),label:Fe}),size:"small",popupIcon:a.createElement(Ne.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:Fe=>a.createElement(ie.Z,{...Fe,className:R.input,variant:"outlined"})})):null},Lt=(0,$.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),qe=a.createElement(Se.Z,{fontSize:"small"}),dt=a.createElement(ye.Z,{fontSize:"small"}),qt=()=>{var Ce,Ie;const R=Lt(),{updateFilters:C,backendEntities:U,filters:z,queryParameters:{owners:J}}=et(),Y=(0,a.useMemo)(()=>[J].flat().filter(Boolean),[J]),[le,ge]=(0,a.useState)(Y.length?Y:(Ie=(Ce=z.owners)==null?void 0:Ce.values)!=null?Ie:[]);(0,a.useEffect)(()=>{Y.length&&ge(Y)},[Y]),(0,a.useEffect)(()=>{C({owners:le.length?new we(le):void 0})},[le,C]);const Be=(0,a.useMemo)(()=>[...new Set(U.flatMap(Fe=>Le(Fe,ve.S4).map(Ze=>Yt(Ze,{defaultKind:"group"}))).filter(Boolean))].sort(),[U]);return Be.length?a.createElement(v.Z,{pb:1,pt:1},a.createElement(b.Z,{variant:"button"},"Owner"),a.createElement(Xe.ZP,{multiple:!0,"aria-label":"Owner",options:Be,value:le,onChange:(Fe,Ze)=>ge(Ze),renderOption:(Fe,{selected:Ze})=>a.createElement(A.Z,{control:a.createElement(G.Z,{icon:qe,checkedIcon:dt,checked:Ze}),label:Fe}),size:"small",popupIcon:a.createElement(Ne.Z,{"data-testid":"owner-picker-expand"}),renderInput:Fe=>a.createElement(ie.Z,{...Fe,className:R.input,variant:"outlined"})})):null},nn=(0,$.Z)(R=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),pt=()=>{var Y,le;const R=nn(),{filters:C,updateFilters:U}=useEntityList(),[z,J]=useState((le=(Y=C.text)==null?void 0:Y.value)!=null?le:"");return useDebounce(()=>{U({text:z.length?new EntityTextFilter(z):void 0})},250,[z,U]),React.createElement(Toolbar,{className:R.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:R.input,placeholder:"Search",autoComplete:"off",onChange:ge=>J(ge.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:()=>J(""),edge:"end",disabled:z.length===0},React.createElement(Clear,null)))})))},yt=Object.freeze({createEntityRefColumn(R){const{defaultKind:C}=R;function U(z){var J;return((J=z.metadata)==null?void 0:J.title)||Yt(z,{defaultKind:C})}return{title:"Name",highlight:!0,customFilterAndSearch(z,J){return U(J).includes(z)},customSort(z,J){return U(z).localeCompare(U(J))},render:z=>{var J;return a.createElement(se,{entityRef:z,defaultKind:C,title:(J=z.metadata)==null?void 0:J.title})}}},createEntityRelationColumn({title:R,relation:C,defaultKind:U,filter:z}){function J(le){return Le(le,C,z)}function Y(le){return J(le).map(ge=>Yt(ge,{defaultKind:U})).join(", ")}return{title:R,customFilterAndSearch(le,ge){return Y(ge).includes(le)},customSort(le,ge){return Y(le).localeCompare(Y(ge))},render:le=>a.createElement(H,{entityRefs:J(le),defaultKind:U})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:ve.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:ve.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:ve.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:R=>a.createElement(Rt.OverflowTooltip,{text:R.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),rn=[yt.createEntityRefColumn({defaultKind:"system"}),yt.createDomainColumn(),yt.createOwnerColumn(),yt.createMetadataDescriptionColumn()],cn=[yt.createEntityRefColumn({defaultKind:"component"}),yt.createSystemColumn(),yt.createOwnerColumn(),yt.createSpecTypeColumn(),yt.createSpecLifecycleColumn(),yt.createMetadataDescriptionColumn()],Ot=(0,$.Z)(R=>({empty:{padding:R.spacing(2),display:"flex",justifyContent:"center"}})),ft=R=>{const{entities:C,title:U,emptyContent:z,variant:J="gridItem",columns:Y}=R,le=Ot(),ge={minWidth:"0",width:"100%"};return J==="gridItem"&&(ge.height="calc(100% - 10px)"),a.createElement(Rt.Table,{columns:Y,title:U,style:ge,emptyContent:z&&a.createElement("div",{className:le.empty},z),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:C})};ft.columns=yt,ft.systemEntityColumns=rn,ft.componentEntityColumns=cn;const Et=(0,$.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),St=a.createElement(Se.Z,{fontSize:"small"}),Ct=a.createElement(ye.Z,{fontSize:"small"}),Nt=()=>{var Ce,Ie;const R=Et(),{updateFilters:C,filters:U,queryParameters:{tags:z}}=et(),J=(0,t.useApi)(c),{value:Y}=(0,it.default)(async()=>{var mt;const Fe="metadata.tags",{facets:Ze}=await J.getEntityFacets({facets:[Fe],filter:(mt=U.kind)==null?void 0:mt.getCatalogFilters()});return Ze[Fe].map(({value:Ve})=>Ve)},[U.kind]),le=(0,a.useMemo)(()=>[z].flat().filter(Boolean),[z]),[ge,Be]=(0,a.useState)(le.length?le:(Ie=(Ce=U.tags)==null?void 0:Ce.values)!=null?Ie:[]);return(0,a.useEffect)(()=>{le.length&&Be(le)},[le]),(0,a.useEffect)(()=>{C({tags:ge.length?new he(ge):void 0})},[ge,C]),Y!=null&&Y.length?a.createElement(v.Z,{pb:1,pt:1},a.createElement(b.Z,{variant:"button"},"Tags"),a.createElement(Xe.ZP,{multiple:!0,"aria-label":"Tags",options:Y,value:ge,onChange:(Fe,Ze)=>Be(Ze),renderOption:(Fe,{selected:Ze})=>a.createElement(A.Z,{control:a.createElement(G.Z,{icon:St,checkedIcon:Ct,checked:Ze}),label:Fe}),size:"small",popupIcon:a.createElement(Ne.Z,{"data-testid":"tag-picker-expand"}),renderInput:Fe=>a.createElement(ie.Z,{...Fe,className:R.input,variant:"outlined"})})):null};var Gt=e(82108),on=e.n(Gt);const pn=R=>{var Ce;const{hidden:C,initialFilter:U}=R,z=(0,t.useApi)(t.alertApiRef),{error:J,availableTypes:Y,selectedTypes:le,setSelectedTypes:ge}=lt();if((0,a.useEffect)(()=>{J&&z.post({message:"Failed to load entity types",severity:"error"}),U&&ge([U])},[J,z,U,ge]),Y.length===0||J)return null;const Be=[{value:"all",label:"All"},...Y.map(Ie=>({value:Ie,label:on()(Ie)}))];return C?null:a.createElement(v.Z,{pb:1,pt:1},a.createElement(Rt.Select,{label:"Type",items:Be,selected:(Ce=Be.length>1?le[0]:void 0)!=null?Ce:"all",onChange:Ie=>ge(Ie==="all"?[]:[String(Ie)])}))};var bn=e(15459),_t=e(61837),yn=e(11640),_n=e(28347);const Wn=(0,bn.Z)({root:{color:"#f3ba37"}})(yn.Z),Hn=R=>{const{toggleStarredEntity:C,isStarredEntity:U}=gn(R.entity);return a.createElement(_t.Z,{"aria-label":"favorite",color:"inherit",...R,onClick:()=>C()},a.createElement(dn.ZP,{title:U?"Remove from favorites":"Add to favorites"},U?a.createElement(Wn,null):a.createElement(_n.Z,null)))};var Un=e(8629),Z=e(79249),h=e(38724),T=e(99152),M=e(6487),K=e(49429),ne=e(55999),me=e(72779),Oe=e.n(me),_e=e(39412);const Bt=_e.Z;function Mt(R,C){if(R)return R.toLocaleLowerCase("en-US");if(C)try{return(0,ve.of)(C).kind.toLocaleLowerCase("en-US")}catch{return}}function Nn(R,C){const U=(0,t.useApp)(),z=Mt(R,C);return z&&U.getSystemIcon(`kind:${z}`)||Bt}function Yn(R){const{kind:C,entityRef:U,...z}=R,J=Nn(C,U);return a.createElement(J,{...z})}const Ur=(0,$.Z)(R=>({node:{fill:R.palette.grey[300],stroke:R.palette.grey[300],"&.primary":{fill:R.palette.primary.light,stroke:R.palette.primary.light},"&.secondary":{fill:R.palette.secondary.light,stroke:R.palette.secondary.light}},text:{fill:R.palette.getContrastText(R.palette.grey[300]),"&.primary":{fill:R.palette.primary.contrastText},"&.secondary":{fill:R.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function ir(R){const C=(0,t.useApi)(c),U=(0,ve.eE)(R),{loading:z,error:J,value:Y}=(0,it.default)(async()=>{const le=await C.getEntityAncestors({entityRef:U}),ge=new Array,Be=new Array;for(const Ce of le.items){const Ie=(0,ve.eE)(Ce.entity),Fe=Ie===le.rootEntityRef;ge.push({id:Ie,root:Fe,...Ce.entity});for(const Ze of Ce.parentEntityRefs)Be.push({from:Ie,to:Ze})}return{nodes:ge,edges:Be}},[U]);return{loading:z,error:J,nodes:(Y==null?void 0:Y.nodes)||[],edges:(Y==null?void 0:Y.edges)||[]}}function Nr({node:R}){const C=Ur(),U=(0,ze.s0)(),z=(0,t.useRouteRef)(zt),[J,Y]=(0,a.useState)(0),[le,ge]=(0,a.useState)(0),Be=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{if(Be.current){let{height:vt,width:Wt}=Be.current.getBBox();vt=Math.round(vt),Wt=Math.round(Wt),(vt!==le||Wt!==J)&&(Y(Wt),ge(vt))}},[J,le]);const Ce=10,Ie=le,Fe=Ie+Ce,Ze=Fe+J+Ce*2,mt=le+Ce*2,Ve=R.metadata.title||(R.kind&&R.metadata.name&&R.metadata.namespace?Yt({kind:R.kind,name:R.metadata.name,namespace:R.metadata.namespace||""}):R.id),Ue=()=>{U(z({kind:R.kind,namespace:R.metadata.namespace||ve.zG,name:R.metadata.name}))};return a.createElement("g",{onClick:Ue,className:C.clickable},a.createElement("rect",{className:Oe()(C.node,R.root?"secondary":"primary"),width:Ze,height:mt,rx:10}),a.createElement(Yn,{kind:R.kind,y:Ce,x:Ce,width:Ie,height:Ie,className:Oe()(C.text,R.root?"secondary":"primary")}),a.createElement("text",{ref:Be,className:Oe()(C.text,R.root?"secondary":"primary"),y:mt/2,x:Fe+(J+Ce*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},Ve))}function Zr(R){const{loading:C,error:U,nodes:z,edges:J}=ir(R.entity);return C?a.createElement(Rt.Progress,null):U?a.createElement(Rt.ResponseErrorPanel,{error:U}):a.createElement(a.Fragment,null,a.createElement(ne.Z,{variant:"h2"},"Ancestry"),a.createElement(ne.Z,{gutterBottom:!0},"This is the ancestry of entities above the current one - as in, the chain(s) of entities down to the current one, where"," ",a.createElement(Rt.Link,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity"},"processors emitted")," ","child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations."),a.createElement(v.Z,{mt:4},a.createElement(Rt.DependencyGraph,{nodes:z,edges:J,renderNode:Nr,direction:Rt.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var Zn=e(11776),Bn=e(38402),Jn=e(86136),lr=e(99688),Sr=e(49378),zr=e(54506),Qn=e(94339),Cr=e(24579),Wr=e(27685);const er=(0,$.Z)(R=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:R.spacing(2)},helpIcon:{marginLeft:R.spacing(1),color:R.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function En(R){const C=er();return a.createElement(Sr.Z,{...R,primaryTypographyProps:{className:C.monospace},secondaryTypographyProps:{className:C.monospace}})}function tr(R){const C=er();return a.createElement(zr.Z,{className:C.monospace},R.children)}function nr(R){return a.createElement(v.Z,{mt:2},a.createElement(Qn.Z,{variant:"outlined"},a.createElement(Cr.Z,null,a.createElement(b.Z,{variant:"h6",gutterBottom:!0},R.title,R.helpLink&&a.createElement(ur,{to:R.helpLink})),R.children)))}function Tr(R){if(R.match(/^url:https?:\/\//))return R.slice(4);if(R.match(/^https?:\/\//))return R}function cr(R){const[C,U]=R.entry,z=Tr(U);return a.createElement(Bn.Z,null,R.indent&&a.createElement(Jn.Z,null),a.createElement(En,{primary:C,secondary:z?a.createElement(Rt.Link,{to:z},U):U}))}function ur(R){const C=er();return a.createElement(Rt.Link,{to:R.to,className:C.helpIcon},a.createElement(Wr.Z,{fontSize:"inherit"}))}const br=(0,$.Z)({root:{display:"flex",flexDirection:"column"}});function Hr(R){var Be,Ce;const C=(0,t.useApi)(c),U=(0,ve.eE)(R),z=(Be=R.metadata.annotations)==null?void 0:Be[ve.P1],J=(Ce=R.metadata.annotations)==null?void 0:Ce[ve.q1],{loading:Y,error:le,value:ge}=(0,it.default)(async()=>!z&&!J?[]:(await C.getEntities({filter:[...z?[{[`metadata.annotations.${ve.P1}`]:z}]:[],...J?[{[`metadata.annotations.${ve.q1}`]:J}]:[]]})).items,[z,J]);return{loading:Y,error:le,location:z,originLocation:J,colocatedEntities:ge==null?void 0:ge.filter(Ie=>(0,ve.eE)(Ie)!==U)}}function rr(R){return a.createElement(Zn.Z,{dense:!0},R.header&&a.createElement(cr,{key:"header",entry:R.header}),R.entities.map(C=>a.createElement(Bn.Z,{key:(0,ve.eE)(C)},a.createElement(Jn.Z,null,a.createElement(Yn,{kind:C.kind})),a.createElement(En,{primary:a.createElement(se,{entityRef:C})}))))}function Pr(R){const{entity:C}=R,{loading:U,error:z,location:J,originLocation:Y,colocatedEntities:le}=Hr(C);if(U)return a.createElement(Rt.Progress,null);if(z)return a.createElement(Rt.ResponseErrorPanel,{error:z});if(!J&&!Y)return a.createElement(lr.Z,{severity:"warning"},"Entity had no location information.");if(!(le!=null&&le.length))return a.createElement(lr.Z,{severity:"info"},"There were no other entities on this location.");if(J===Y)return a.createElement(rr,{entities:le});const ge=le.filter(Ce=>{var Ie;return((Ie=Ce.metadata.annotations)==null?void 0:Ie[ve.P1])===J}),Be=le.filter(Ce=>{var Ie;return((Ie=Ce.metadata.annotations)==null?void 0:Ie[ve.q1])===Y});return a.createElement(a.Fragment,null,ge.length>0&&a.createElement(rr,{entities:ge,header:["At the same location",J]}),Be.length>0&&a.createElement(rr,{entities:Be,header:["At the same origin",Y]}))}function jr(R){const C=br();return a.createElement(a.Fragment,null,a.createElement(ne.Z,{variant:"h2"},"Colocated"),a.createElement(ne.Z,null,"These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL)."),a.createElement("div",{className:C.root},a.createElement(Pr,{entity:R.entity})))}function dr(R){return Object.fromEntries([...Object.entries(R)].sort((C,U)=>C[0]<U[0]?-1:1))}function Ir(R){return a.createElement(a.Fragment,null,a.createElement(ne.Z,{variant:"h2"},"Entity as JSON"),a.createElement(ne.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),a.createElement(ne.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(Rt.CodeSnippet,{text:JSON.stringify(dr(R.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var fr=e(3440),Lr=e.n(fr);const mr=(0,$.Z)({root:{display:"flex",flexDirection:"column"}});function en(R){var Ce,Ie;const C=mr(),{apiVersion:U,kind:z,metadata:J,spec:Y,relations:le=[],status:ge={}}=R.entity,Be=Lr()(Zt()(le,Fe=>Fe.targetRef),"type");return a.createElement(a.Fragment,null,a.createElement(ne.Z,{variant:"h2"},"Overview"),a.createElement("div",{className:C.root},a.createElement(nr,{title:"Identity"},a.createElement(Zn.Z,{dense:!0},a.createElement(Bn.Z,null,a.createElement(En,{primary:"apiVersion",secondary:U})),a.createElement(Bn.Z,null,a.createElement(En,{primary:"kind",secondary:z})),(Y==null?void 0:Y.type)&&a.createElement(Bn.Z,null,a.createElement(En,{primary:"spec.type",secondary:Y.type})),J.uid&&a.createElement(Bn.Z,null,a.createElement(En,{primary:"uid",secondary:J.uid})),J.etag&&a.createElement(Bn.Z,null,a.createElement(En,{primary:"etag",secondary:J.etag})))),a.createElement(nr,{title:"Metadata"},!!Object.keys(J.annotations||{}).length&&a.createElement(Zn.Z,{dense:!0,subheader:a.createElement(tr,null,"Annotations",a.createElement(ur,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(J.annotations).map(Fe=>a.createElement(cr,{key:Fe[0],indent:!0,entry:Fe}))),!!Object.keys(J.labels||{}).length&&a.createElement(Zn.Z,{dense:!0,subheader:a.createElement(tr,null,"Labels")},Object.entries(J.labels).map(Fe=>a.createElement(cr,{key:Fe[0],indent:!0,entry:Fe}))),!!((Ce=J.tags)!=null&&Ce.length)&&a.createElement(Zn.Z,{dense:!0,subheader:a.createElement(tr,null,"Tags")},J.tags.map((Fe,Ze)=>a.createElement(Bn.Z,{key:`${Fe}-${Ze}`},a.createElement(Jn.Z,null),a.createElement(En,{primary:Fe}))))),!!le.length&&a.createElement(nr,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Be).map(([Fe,Ze],mt)=>a.createElement("div",{key:mt},a.createElement(Zn.Z,{dense:!0,subheader:a.createElement(tr,null,Fe)},Ze.map(Ve=>a.createElement(Bn.Z,{key:Ve.targetRef},a.createElement(Jn.Z,null,a.createElement(Yn,{entityRef:Ve.targetRef})),a.createElement(En,{primary:a.createElement(se,{entityRef:Ve.targetRef})}))))))),!!((Ie=ge.items)!=null&&Ie.length)&&a.createElement(nr,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},ge.items.map((Fe,Ze)=>a.createElement("div",{key:Ze},a.createElement(b.Z,null,Fe.level,": ",Fe.type),a.createElement(v.Z,{ml:2},Fe.message))))))}var Pn=e(60155),Or=e.n(Pn);function In(R){return a.createElement(a.Fragment,null,a.createElement(ne.Z,{variant:"h2"},"Entity as YAML"),a.createElement(ne.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),a.createElement(ne.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(Rt.CodeSnippet,{text:Or().stringify(dr(R.entity)),language:"yaml",showCopyCodeButton:!0}))))}const hr=(0,$.Z)(R=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:R.palette.background.paper},tabs:{borderRight:`1px solid ${R.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function jn(R){const{children:C,value:U,index:z,...J}=R,Y=hr();return a.createElement("div",{role:"tabpanel",hidden:U!==z,id:`vertical-tabpanel-${z}`,"aria-labelledby":`vertical-tab-${z}`,className:Y.tabContents,...J},U===z&&a.createElement(v.Z,{pl:3,pr:3},C))}function Vn(R){return{id:`vertical-tab-${R}`,"aria-controls":`vertical-tabpanel-${R}`}}function gr(R){const C=hr(),[U,z]=a.useState(0);return(0,a.useEffect)(()=>{z(0)},[R.open]),R.entity?a.createElement(Un.Z,{fullWidth:!0,maxWidth:"xl",open:R.open,onClose:R.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:C.fullHeightDialog}},a.createElement(Z.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),a.createElement(h.Z,{dividers:!0},a.createElement("div",{className:C.root},a.createElement(T.Z,{orientation:"vertical",variant:"scrollable",value:U,onChange:(J,Y)=>z(Y),"aria-label":"Inspector options",className:C.tabs},a.createElement(M.Z,{label:"Overview",...Vn(0)}),a.createElement(M.Z,{label:"Ancestry",...Vn(1)}),a.createElement(M.Z,{label:"Colocated",...Vn(2)}),a.createElement(M.Z,{label:"Raw JSON",...Vn(3)}),a.createElement(M.Z,{label:"Raw YAML",...Vn(4)})),a.createElement(jn,{value:U,index:0},a.createElement(en,{entity:R.entity})),a.createElement(jn,{value:U,index:1},a.createElement(Zr,{entity:R.entity})),a.createElement(jn,{value:U,index:2},a.createElement(jr,{entity:R.entity})),a.createElement(jn,{value:U,index:3},a.createElement(Ir,{entity:R.entity})),a.createElement(jn,{value:U,index:4},a.createElement(In,{entity:R.entity})))),a.createElement(K.Z,null,a.createElement(y.Z,{onClick:R.onClose,color:"primary"},"Close"))):null}var xr=e(85256);function pr(R){var mt;const C=(0,t.useApi)(c),U=(mt=R.metadata.annotations)==null?void 0:mt[ve.q1],z=R.metadata.uid,J=U==="bootstrap:bootstrap",Y=(0,it.default)(async()=>{const Ve=C.getLocationByRef(U);let Ue;if(!U)Ue=Promise.resolve([]);else{const vt=`metadata.annotations.${ve.q1}`;Ue=C.getEntities({filter:{[vt]:U},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(Wt=>Wt.items)}return Promise.all([Ve,Ue]).then(([vt,Wt])=>({location:vt,colocatedEntities:Wt}))},[C,R]),le=(0,a.useCallback)(async function(){const{location:Ue}=Y.value;await C.removeLocationById(Ue.id)},[C,Y]),ge=(0,a.useCallback)(async function(){await C.removeEntityByUid(z)},[C,z]);if(J)return{type:"bootstrap",location:U,deleteEntity:ge};const{loading:Be,error:Ce,value:Ie}=Y;if(Be)return{type:"loading"};if(Ce)return{type:"error",error:Ce};const{location:Fe,colocatedEntities:Ze}=Ie;return Fe?{type:"unregister",location:U,colocatedEntities:Ze.map(ve.iB),unregisterLocation:le,deleteEntity:ge}:{type:"only-delete",deleteEntity:ge}}var Gn=e(10179);const Vr=(0,$.Z)({advancedButton:{fontSize:"0.7em"}}),Gr=({entity:R,onConfirm:C})=>{var mt;const U=(0,t.useApi)(t.alertApiRef),z=(0,t.useApi)(t.configApiRef),J=Vr(),Y=pr(R),[le,ge]=(0,a.useState)(!1),[Be,Ce]=(0,a.useState)(!1),Ie=(mt=z.getOptionalString("app.title"))!=null?mt:"Backstage",Fe=(0,a.useCallback)(async function(){if("unregisterLocation"in Y){Ce(!0);try{await Y.unregisterLocation(),C()}catch(Ue){(0,Gn.BD)(Ue),U.post({message:Ue.message})}finally{Ce(!1)}}},[U,C,Y]),Ze=(0,a.useCallback)(async function(){if("deleteEntity"in Y){Ce(!0);try{await Y.deleteEntity(),C()}catch(Ue){(0,Gn.BD)(Ue),U.post({message:Ue.message})}finally{Ce(!1)}}},[U,C,Y]);return Y.type==="loading"?a.createElement(Rt.Progress,null):Y.type==="error"?a.createElement(Rt.ResponseErrorPanel,{error:Y.error}):Y.type==="bootstrap"?a.createElement(a.Fragment,null,a.createElement(lr.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',Y.location,'"). If you believe this is in error, please contact the ',Ie," ","integrator."),a.createElement(v.Z,{marginTop:2},!le&&a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:J.advancedButton,onClick:()=>ge(!0)},"Advanced Options"),le&&a.createElement(a.Fragment,null,a.createElement(ne.Z,null,"You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."),a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Be,onClick:Ze},"Delete Entity")))):Y.type==="only-delete"?a.createElement(a.Fragment,null,a.createElement(ne.Z,null,"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog."),a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Be,onClick:Ze},"Delete Entity")):Y.type==="unregister"?a.createElement(a.Fragment,null,a.createElement(ne.Z,null,"This action will unregister the following entities:"),a.createElement(ne.Z,{component:"ul"},Y.colocatedEntities.map(Ve=>a.createElement("li",{key:`${Ve.kind}:${Ve.namespace}/${Ve.name}`},a.createElement(se,{entityRef:Ve})))),a.createElement(ne.Z,null,"Located at the following location:"),a.createElement(ne.Z,{component:"ul"},a.createElement("li",null,Y.location)),a.createElement(ne.Z,null,"To undo, just re-register the entity in ",Ie,"."),a.createElement(v.Z,{marginTop:2},a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Be,onClick:Fe},"Unregister Location"),!le&&a.createElement(v.Z,{component:"span",marginLeft:2},a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:J.advancedButton,onClick:()=>ge(!0)},"Advanced Options"))),le&&a.createElement(a.Fragment,null,a.createElement(v.Z,{paddingTop:4,paddingBottom:4},a.createElement(xr.Z,null)),a.createElement(ne.Z,null,"You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."),a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Be,onClick:Ze},"Delete Entity"))):a.createElement(lr.Z,{severity:"error"},"Internal error: Unknown state")},yr=R=>{const{open:C,onConfirm:U,onClose:z,entity:J}=R;return a.createElement(Un.Z,{open:C,onClose:z},a.createElement(Z.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),a.createElement(h.Z,null,a.createElement(Gr,{entity:J,onConfirm:U})),a.createElement(K.Z,null,a.createElement(y.Z,{onClick:z,color:"primary"},"Cancel")))};var I=e(12231),q=e(9520),ce=e(47603);const be=(0,$.Z)(R=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:R.spacing(1,0,1,0)},title:{margin:R.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:R.palette.text.primary},menuItem:{minHeight:R.spacing(6)},groupWrapper:{margin:R.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function je(R){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:ce.Z},{id:"starred",label:"Starred",icon:yn.Z}]},{name:R!=null?R:"Company",items:[{id:"all",label:"All"}]}]}const st=R=>{var no;const{initialFilter:C,availableFilters:U}=R,z=be(),Y=(no=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?no:"Company",{filters:le,updateFilters:ge,backendEntities:Be,queryParameters:{kind:Ce,user:Ie},loading:Fe}=et(),Ze=["starred","all"],mt=je(Y).map(Jt=>({...Jt,items:Jt.items.filter(({id:Rn})=>["group","user"].some(Fr=>Fr===Ce)?Ze.includes(Rn):!U||U.includes(Rn))})).filter(({items:Jt})=>!!Jt.length),{isStarredEntity:Ve}=jt(),{isOwnedEntity:Ue,loading:vt}=fn(),Wt=Fe||vt,un=(0,a.useMemo)(()=>new ke("owned",Ue,Ve),[Ue,Ve]),vn=(0,a.useMemo)(()=>new ke("starred",Ue,Ve),[Ue,Ve]),an=(0,a.useMemo)(()=>[Ie].flat()[0],[Ie]),[mn,An]=(0,a.useState)(an!=null?an:C),Dr=(0,a.useMemo)(()=>Be.filter(Ye((0,$e.compact)(Object.values({...le,user:void 0})))),[le,Be]),Er=(0,a.useMemo)(()=>({all:Dr.length,starred:Dr.filter(Jt=>vn.filterEntity(Jt)).length,owned:Dr.filter(Jt=>un.filterEntity(Jt)).length}),[Dr,vn,un]);return(0,a.useEffect)(()=>{an&&An(an)},[an]),(0,a.useEffect)(()=>{!Wt&&!!mn&&mn!=="all"&&Er[mn]===0&&An("all")},[Wt,Er,mn,An]),(0,a.useEffect)(()=>{ge({user:mn?new ke(mn,Ue,Ve):void 0})},[mn,Ue,Ve,ge]),a.createElement(Qn.Z,{className:z.root},mt.map(Jt=>a.createElement(a.Fragment,{key:Jt.name},a.createElement(b.Z,{variant:"subtitle2",className:z.title},Jt.name),a.createElement(Qn.Z,{className:z.groupWrapper},a.createElement(Zn.Z,{disablePadding:!0,dense:!0,role:"menu"},Jt.items.map(Rn=>{var Fr,ro;return a.createElement(I.Z,{key:Rn.id,button:!0,divider:!0,onClick:()=>An(Rn.id),selected:Rn.id===((Fr=le.user)==null?void 0:Fr.value),className:z.menuItem,disabled:Er[Rn.id]===0,"data-testid":`user-picker-${Rn.id}`,tabIndex:0},Rn.icon&&a.createElement(Jn.Z,{className:z.listIcon},a.createElement(Rn.icon,{fontSize:"small"})),a.createElement(Sr.Z,null,a.createElement(b.Z,{variant:"body1"},Rn.label)),a.createElement(q.Z,null,(ro=Er[Rn.id])!=null?ro:"-"))}))))))},ct=({children:R,value:C})=>{var ge;const[U,z]=useState((ge=C==null?void 0:C.filters)!=null?ge:{}),J=useCallback(Be=>{z(Ce=>{const Ie=typeof Be=="function"?Be(Ce):Be;return{...Ce,...Ie}})},[]),Y=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),le=useMemo(()=>{var Be,Ce,Ie,Fe,Ze;return{entities:(Be=C==null?void 0:C.entities)!=null?Be:Y.entities,backendEntities:(Ce=C==null?void 0:C.backendEntities)!=null?Ce:Y.backendEntities,updateFilters:(Ie=C==null?void 0:C.updateFilters)!=null?Ie:J,filters:U,loading:(Fe=C==null?void 0:C.loading)!=null?Fe:!1,queryParameters:(Ze=C==null?void 0:C.queryParameters)!=null?Ze:Y.queryParameters,error:C==null?void 0:C.error}},[C,Y,U,J]);return React.createElement(EntityListContext.Provider,{value:le},R)}},39398:function(ee,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return $e},AboutContent:function(){return Q},AboutField:function(){return w}});var r=e(48023),t=e(53492),c=e(36964),f=e(36356),S=e(53479),m=e(79692),a=e(94339),i=e(32552),u=e(61837),y=e(85256),p=e(24579),v=e(52866),b=e(30254),L=e(27604),x=e(2784),j=e(47851),D=e(60905),P=e(90436),F=e(7089);const B=(0,m.Z)(Pe=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:Pe.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function w(Pe){const{label:de,value:ze,gridSizes:ae,children:Re}=Pe,Me=B(),We=(0,c.useElementFilter)(Re,ve=>ve.getElements()),Ye=We.length>0?We:x.createElement(P.Z,{variant:"body2",className:Me.value},ze||"unknown");return x.createElement(D.Z,{item:!0,...ae},x.createElement(P.Z,{variant:"h2",className:Me.label},de),Ye)}const V=(0,m.Z)({description:{wordBreak:"break-word"}});function Q(Pe){var et,it,Qe,rt,wt,Zt;const{entity:de}=Pe,ze=V(),ae=de.kind.toLocaleLowerCase("en-US")==="system",Re=de.kind.toLocaleLowerCase("en-US")==="resource",Me=de.kind.toLocaleLowerCase("en-US")==="component",We=de.kind.toLocaleLowerCase("en-US")==="api",Ye=de.kind.toLocaleLowerCase("en-US")==="template",ve=de.kind.toLocaleLowerCase("en-US")==="location",Le=de.kind.toLocaleLowerCase("en-US")==="group",xe=(0,S.getEntityRelations)(de,r.cz,{kind:"system"}),He=(0,S.getEntityRelations)(de,r.cz,{kind:"component"}),at=(0,S.getEntityRelations)(de,r.cz,{kind:"domain"}),At=(0,S.getEntityRelations)(de,r.S4);return x.createElement(D.Z,{container:!0},x.createElement(w,{label:"Description",gridSizes:{xs:12}},x.createElement(P.Z,{variant:"body2",paragraph:!0,className:ze.description},((et=de==null?void 0:de.metadata)==null?void 0:et.description)||"No description")),x.createElement(w,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},At.length>0&&x.createElement(S.EntityRefLinks,{entityRefs:At,defaultKind:"group"})),(ae||at.length>0)&&x.createElement(w,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},at.length>0&&x.createElement(S.EntityRefLinks,{entityRefs:at,defaultKind:"domain"})),(We||Me||Re||xe.length>0)&&x.createElement(w,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},xe.length>0&&x.createElement(S.EntityRefLinks,{entityRefs:xe,defaultKind:"system"})),Me&&He.length>0&&x.createElement(w,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},x.createElement(S.EntityRefLinks,{entityRefs:He,defaultKind:"component"})),(We||Me||Re||Ye||Le||ve||typeof((it=de==null?void 0:de.spec)==null?void 0:it.type)=="string")&&x.createElement(w,{label:"Type",value:(Qe=de==null?void 0:de.spec)==null?void 0:Qe.type,gridSizes:{xs:12,sm:6,lg:4}}),(We||Me||typeof((rt=de==null?void 0:de.spec)==null?void 0:rt.lifecycle)=="string")&&x.createElement(w,{label:"Lifecycle",value:(wt=de==null?void 0:de.spec)==null?void 0:wt.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),x.createElement(w,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((Zt=de==null?void 0:de.metadata)==null?void 0:Zt.tags)||[]).map(zt=>x.createElement(F.Z,{key:zt,size:"small",label:zt}))))}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 $e(Pe){var rt,wt,Zt;const{variant:de}=Pe,ze=ue(),{entity:ae}=(0,S.useEntity)(),Re=(0,c.useApi)(f.q3),Me=(0,c.useApi)(S.catalogApiRef),We=(0,c.useApi)(c.alertApiRef),Ye=(0,c.useRouteRef)(j.jU),ve=(0,S.getEntitySourceLocation)(ae,Re),Le=(rt=ae.metadata.annotations)==null?void 0:rt[r.Tf],xe={label:"View Source",disabled:!ve,icon:x.createElement(f.nW,{type:ve==null?void 0:ve.integrationType}),href:ve==null?void 0:ve.locationTargetUrl},He={label:"View TechDocs",disabled:!((wt=ae.metadata.annotations)!=null&&wt["backstage.io/techdocs-ref"])||!Ye,icon:x.createElement(b.Z,null),href:Ye&&Ye({namespace:ae.metadata.namespace||r.zG,kind:ae.kind,name:ae.metadata.name})};let at="";de==="gridItem"?at=ze.gridItemCard:de==="fullHeight"&&(at=ze.fullHeightCard);let At="";de==="gridItem"?At=ze.gridItemCardContent:de==="fullHeight"&&(At=ze.fullHeightCardContent);const et=(Zt=ae.metadata.annotations)==null?void 0:Zt[r.P1],it=(et==null?void 0:et.startsWith("url:"))||(et==null?void 0:et.startsWith("file:")),Qe=(0,x.useCallback)(async()=>{await Me.refreshEntity((0,r.eE)(ae)),We.post({message:"Refresh scheduled",severity:"info"})},[Me,We,ae]);return x.createElement(a.Z,{className:at},x.createElement(i.Z,{title:"About",action:x.createElement(x.Fragment,null,it&&x.createElement(u.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Qe},x.createElement(v.Z,null)),x.createElement(u.Z,{component:t.Link,"aria-label":"Edit",disabled:!Le,title:"Edit Metadata",to:Le!=null?Le:"#"},x.createElement(L.Z,null))),subheader:x.createElement(t.HeaderIconLinkRow,{links:[xe,He]})}),x.createElement(y.Z,null),x.createElement(p.Z,{className:At},x.createElement(Q,{entity:ae})))}},49782:function(ee,s,e){"use strict";e.d(s,{K:function(){return v}});var r=e(2784),t=e(79692),c=e(12420),f=e(97580),S=e(73698),m=e(74603),a=e(12231),i=e(53479),u=e(64279),y=e(36964);const p=(0,t.Z)(b=>(0,c.Z)({root:{...b.typography.h4}}));function v(b){var Pe;const{initialFilter:L="component",allowedKinds:x}=b,j=p(),D=(0,y.useApi)(i.catalogApiRef),{value:P}=(0,u.default)(async()=>await D.getEntityFacets({facets:["kind"]}).then(de=>{var ze;return((ze=de.facets.kind)==null?void 0:ze.map(ae=>ae.value).sort())||[]})),{updateFilters:F,queryParameters:{kind:B}}=(0,i.useEntityList)(),w=(0,r.useMemo)(()=>{var de;return(de=[B].flat()[0])==null?void 0:de.toLocaleLowerCase("en-US")},[B]),[V,Q]=(0,r.useState)(w!=null?w:L);(0,r.useEffect)(()=>{F({kind:V?new i.EntityKindFilter(V):void 0})},[V,F]),(0,r.useEffect)(()=>{w&&Q(w)},[w]);const $e=[(0,f.Z)(V)].concat((Pe=P==null?void 0:P.filter(de=>x?x.some(ze=>ze.toLocaleLowerCase("en-US")===de.toLocaleLowerCase("en-US")):!0))!=null?Pe:[]).sort().reduce((de,ze)=>(de[ze.toLocaleLowerCase("en-US")]=ze,de),{});return r.createElement(S.Z,{input:r.createElement(m.Z,{value:V}),value:V,onChange:de=>Q(de.target.value),classes:j},Object.keys($e).map(de=>r.createElement(a.Z,{value:de,key:de},`${$e[de]}s`)))}},30097:function(ee,s,e){"use strict";e.d(s,{E:function(){return L}});var r=e(48023),t=e(53479),c=e(27604),f=e(2997),S=e(76635),m=e(2784),a=e(7089),i=e(53492);const u=Object.freeze({createNameColumn(x){function j(D){var P;return((P=D.metadata)==null?void 0:P.title)||(0,t.humanizeEntityRef)(D,{defaultKind:x==null?void 0:x.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:D},{entity:P}){return j(D).localeCompare(j(P))},render:({entity:D})=>{var P;return m.createElement(t.EntityRefLink,{entityRef:D,defaultKind:(x==null?void 0:x.defaultKind)||"Component",title:(P=D.metadata)==null?void 0:P.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:x})=>m.createElement(t.EntityRefLinks,{entityRefs:x.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:x})=>m.createElement(t.EntityRefLinks,{entityRefs:x.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:x})=>m.createElement(i.OverflowTooltip,{text:x.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:x})=>m.createElement(m.Fragment,null,x.metadata.tags&&x.metadata.tags.map(j=>m.createElement(a.Z,{key:j,label:j,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}});var y=e(28347),p=e(15459),v=e(11640);const b=(0,p.Z)({root:{color:"#f3ba37"}})(v.Z),L=x=>{var We,Ye,ve;const{columns:j,actions:D,tableOptions:P}=x,{isStarredEntity:F,toggleStarredEntity:B}=(0,t.useStarredEntities)(),{loading:w,error:V,entities:Q,filters:ue}=(0,t.useEntityList)(),$e=(0,m.useMemo)(()=>{var xe;return[u.createNameColumn({defaultKind:(xe=ue.kind)==null?void 0:xe.value}),...Le(),u.createMetadataDescriptionColumn(),u.createTagsColumn()];function Le(){var He;switch((He=ue.kind)==null?void 0:He.value){case"user":return[];case"domain":case"system":return[u.createOwnerColumn()];case"group":case"location":case"template":return[u.createSpecTypeColumn()];default:return[u.createSystemColumn(),u.createOwnerColumn(),u.createSpecTypeColumn(),u.createSpecLifecycleColumn()]}}},[(We=ue.kind)==null?void 0:We.value]),Pe=ue.type===void 0,de=(0,S.capitalize)((ve=(Ye=ue.user)==null?void 0:Ye.value)!=null?ve:"all");if(V)return m.createElement("div",null,m.createElement(i.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},m.createElement(i.CodeSnippet,{language:"text",text:V.toString()})));const ze=[({entity:Le})=>{var He;const xe=(He=Le.metadata.annotations)==null?void 0:He[r.l2];return{icon:()=>m.createElement(f.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!xe,onClick:()=>{!xe||window.open(xe,"_blank")}}},({entity:Le})=>{var He;const xe=(He=Le.metadata.annotations)==null?void 0:He[r.Tf];return{icon:()=>m.createElement(c.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!xe,onClick:()=>{!xe||window.open(xe,"_blank")}}},({entity:Le})=>{const xe=F(Le);return{cellStyle:{paddingLeft:"1em"},icon:()=>xe?m.createElement(b,null):m.createElement(y.Z,null),tooltip:xe?"Remove from favorites":"Add to favorites",onClick:()=>B(Le)}}],ae=Q.map(Le=>{const xe=(0,t.getEntityRelations)(Le,r.cz,{kind:"system"}),He=(0,t.getEntityRelations)(Le,r.S4);return{entity:Le,resolved:{name:(0,t.humanizeEntityRef)(Le,{defaultKind:"Component"}),ownedByRelationsTitle:He.map(at=>(0,t.humanizeEntityRef)(at,{defaultKind:"group"})).join(", "),ownedByRelations:He,partOfSystemRelationTitle:xe.map(at=>(0,t.humanizeEntityRef)(at,{defaultKind:"system"})).join(", "),partOfSystemRelations:xe}}}),Re=(j||$e).find(Le=>Le.title==="Type");Re&&(Re.hidden=!Pe);const Me=ae.length>20;return m.createElement(i.Table,{isLoading:w,columns:j||$e,options:{paging:Me,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!w,padding:"dense",pageSizeOptions:[20,50,100],...P},title:`${de} (${Q.length})`,data:ae,actions:D||ze})};L.columns=u},47851:function(ee,s,e){"use strict";e.d(s,{_Z:function(){return f},jU:function(){return c},yw:function(){return t}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),c=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),f=(0,r.createRouteRef)({id:"catalog"})},40749:function(ee,s,e){"use strict";e.d(s,{rG:function(){return r},Y2:function(){return F},J$:function(){return u},g2:function(){return c}});var r;(function(B){const w="DENY";B.DENY=w;const V="ALLOW";B.ALLOW=V;const Q="CONDITIONAL";B.CONDITIONAL=Q})(r||(r={}));function t(B,w){return B.name===w.name}function c(B,w){return"resourceType"in B?!w||B.resourceType===w:!1}function f(B){return B.attributes.action==="create"}function S(B){return B.attributes.action==="read"}function m(B){return B.attributes.action==="update"}function a(B){return B.attributes.action==="delete"}function i(B){return{authorize:async(w,V)=>await B.authorize(w,V),authorizeConditional(w,V){const Q=w;return B.authorize(Q,V)}}}function u({name:B,attributes:w,resourceType:V}){return V?{type:"resource",name:B,attributes:w,resourceType:V}:{type:"basic",name:B,attributes:w}}var y=e(10179),p=e(96279),v=e.n(p),b=e(9571),L=e(30195);const x=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(x).nonempty()})).or(L.z.object({allOf:L.z.array(x).nonempty()})).or(L.z.object({not:x}))),j=L.z.object({result:L.z.literal(r.ALLOW).or(L.z.literal(r.DENY))}),D=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:x})]),P=(B,w)=>L.z.object({items:L.z.array(L.z.intersection(L.z.object({id:L.z.string()}),B)).refine(V=>V.length===w.size&&V.every(({id:Q})=>w.has(Q)),{message:"Items in response do not match request"})});class F{constructor(w){_(this,"enabled");_(this,"discovery");var V;this.discovery=w.discovery,this.enabled=(V=w.config.getOptionalBoolean("permission.enabled"))!=null?V:!1}async authorize(w,V){return this.makeRequest(w,j,V)}async authorizeConditional(w,V){return this.makeRequest(w,D,V)}async makeRequest(w,V,Q){if(!this.enabled)return w.map(Re=>({result:r.ALLOW}));const ue={items:w.map(Re=>({id:b.Z(),...Re}))},$e=await this.discovery.getBaseUrl("permission"),Pe=await v()(`${$e}/authorize`,{method:"POST",body:JSON.stringify(ue),headers:{...this.getAuthorizationHeader(Q==null?void 0:Q.token),"content-type":"application/json"}});if(!Pe.ok)throw await y.VL.fromResponse(Pe);const de=await Pe.json(),ae=P(V,new Set(ue.items.map(({id:Re})=>Re))).parse(de).items.reduce((Re,Me)=>(Re[Me.id]=Me,Re),{});return ue.items.map(Re=>ae[Re.id])}getAuthorizationHeader(w){return w?{Authorization:`Bearer ${w}`}:{}}}},68099:function(ee,s,e){"use strict";e.d(s,{iM:function(){return S},RV:function(){return c},gI:function(){return a}});var r=e(2784),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.permission.api"});var f=e(40749);class S{constructor(y,p){this.permissionClient=y,this.identityApi=p}static create(y){const{config:p,discovery:v,identity:b}=y,L=new f.Y2({discovery:v,config:p});return new S(L,b)}async authorize(y){return(await this.permissionClient.authorize([y],await this.identityApi.getCredentials()))[0]}}var m=e(49857);function a(u){const y=(0,t.useApi)(c),{data:p,error:v}=(0,m.ZP)(u,async b=>{if((0,f.g2)(b.permission)&&!b.resourceRef)return f.rG.DENY;const{result:L}=await y.authorize(b);return L});return v?{error:v,loading:!1,allowed:!1}:p===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:p===f.rG.ALLOW}}const i=u=>{const{permission:y,resourceRef:p,errorComponent:v,...b}=u,L=usePermission(isResourcePermission(y)?{permission:y,resourceRef:p}:{permission:y}),x=useApp(),{NotFoundErrorPage:j}=x.getComponents();let D=v===void 0?React.createElement(j,null):v;return L.loading?D=null:L.allowed&&(D=u.element),React.createElement(Route,{...b,element:D})}},73624:function(ee,s,e){"use strict";e.d(s,{FA:function(){return a},Nd:function(){return x},Rx:function(){return v}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.search.queryservice"});class c{constructor(D){this.mockedResults=D}query(){return Promise.resolve(this.mockedResults||{results:[]})}}var f=e(2784),S=e(79692);const m=(0,S.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),a=({text:j,preTag:D,postTag:P})=>{const F=m(),B=(0,f.useMemo)(()=>j.split(new RegExp(`(${D}.+?${P})`)),[P,D,j]);return f.createElement(f.Fragment,null,B.map((w,V)=>w.includes(D)?f.createElement("mark",{className:F.highlight,key:V},w.replace(new RegExp(`${D}|${P}`,"g"),"")):w))};var i=e(76241),u=e(64279),y=e(1849);const p=(0,i.CT)("search-context"),v=()=>{const j=(0,f.useContext)(p);if(!j)throw new Error("useSearch must be used within a SearchContextProvider");const D=j.atVersion(1);if(!D)throw new Error("No SearchContext v1 found");return D},b=()=>useContext(p)!==void 0,L={term:"",pageCursor:void 0,filters:{},types:[]},x=j=>{var xe,He,at,At;const{initialState:D=L,children:P}=j,F=(0,r.useApi)(t),[B,w]=(0,f.useState)(D.pageCursor),[V,Q]=(0,f.useState)(D.filters),[ue,$e]=(0,f.useState)(D.term),[Pe,de]=(0,f.useState)(D.types),ze=(0,y.Z)(ue),ae=(0,u.default)(()=>F.query({term:ue,filters:V,pageCursor:B,types:Pe}),[ue,V,Pe,B]),Re=!ae.loading&&!ae.error&&((xe=ae.value)==null?void 0:xe.nextPageCursor),Me=!ae.loading&&!ae.error&&((He=ae.value)==null?void 0:He.previousPageCursor),We=(0,f.useCallback)(()=>{var et;w((et=ae.value)==null?void 0:et.nextPageCursor)},[(at=ae.value)==null?void 0:at.nextPageCursor]),Ye=(0,f.useCallback)(()=>{var et;w((et=ae.value)==null?void 0:et.previousPageCursor)},[(At=ae.value)==null?void 0:At.previousPageCursor]);(0,f.useEffect)(()=>{ue&&ze&&ue!==ze&&w(void 0)},[ue,ze,D.pageCursor]);const ve={result:ae,filters:V,setFilters:Q,term:ue,setTerm:$e,types:Pe,setTypes:de,pageCursor:B,setPageCursor:w,fetchNextPage:Re?We:void 0,fetchPreviousPage:Me?Ye:void 0},Le=(0,i.EI)({1:ve});return f.createElement(r.AnalyticsContext,{attributes:{searchTypes:Pe.sort().join(",")}},f.createElement(p.Provider,{value:Le,children:P}))}},47955:function(ee,s,e){"use strict";e.d(s,{Zz:function(){return S},oZ:function(){return ze},DR:function(){return m},ZS:function(){return w},KY:function(){return i},gT:function(){return b},Dl:function(){return L},$L:function(){return v},x1:function(){return V}});var r=e(2784),t=e(10289),c=e(36964);const f="techdocs.addons.addon.v1",S="techdocs.addons.wrapper.v1",m=()=>null;(0,c.attachComponentData)(m,S,!0);const a=ae=>`${f}.${ae.toLocaleLowerCase("en-US")}`;function i(ae){const{name:Re,component:Me}=ae;return(0,c.createReactExtension)({name:Re,component:{sync:We=>r.createElement(Me,{...We})},data:{[f]:ae,[a(Re)]:!0}})}const u=(ae,Re)=>ae.selectByComponentData({key:Re}).getElements()[0],y=ae=>ae.selectByComponentData({key:S}).selectByComponentData({key:f}),p=ae=>ae.selectByComponentData({key:S}).findComponentData({key:f}),v=()=>{const ae=(0,t.pC)(),Re=(0,c.useElementFilter)(ae,y),Me=(0,c.useElementFilter)(ae,p),We=(0,r.useCallback)(Le=>{var He;if(!Re||!Le)return null;const xe=a(Le.name);return(He=u(Re,xe))!=null?He:null},[Re]),Ye=(0,r.useCallback)(Le=>{const xe=Me.find(He=>He.name===Le);return xe?We(xe):null},[Me,We]),ve=(0,r.useCallback)(Le=>{const xe=Me.filter(He=>He.location===Le);return xe.length?xe.map(We):null},[Me,We]);return{renderComponentByName:Ye,renderComponentsByLocation:ve}},b=(0,c.createApiRef)({id:"plugin.techdocs.service"}),L=(0,c.createApiRef)({id:"plugin.techdocs.storageservice"});var x=e(64279),j=e(48023),D=e(76241);const P=(ae,Re)=>(0,j.eE)(ae)===(0,j.eE)(Re),F={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},B=(0,D.CT)("techdocs-reader-page-context"),w=(0,r.memo)(({entityRef:ae,children:Re})=>{const Me=(0,c.useApi)(b),We=(0,x.default)(async()=>Me.getTechDocsMetadata(ae),[ae]),Ye=(0,x.default)(async()=>Me.getEntityMetadata(ae),[ae]),[ve,Le]=(0,r.useState)(F.title),[xe,He]=(0,r.useState)(F.subtitle),[at,At]=(0,r.useState)(F.shadowRoot),et={metadata:We,entityRef:ae,entityMetadata:Ye,shadowRoot:at,setShadowRoot:At,title:ve,setTitle:Le,subtitle:xe,setSubtitle:He},it=(0,D.EI)({1:et});return r.createElement(B.Provider,{value:it},Re instanceof Function?Re(et):Re)},(ae,Re)=>P(ae.entityRef,Re.entityRef)),V=()=>{const ae=(0,r.useContext)(B);if(ae===void 0)return F;const Re=ae.atVersion(1);if(Re===void 0)throw new Error("No context found for version 1.");return Re};var Q=e(54073);const ue=()=>{const{shadowRoot:ae}=useTechDocsReaderPage();return ae},$e=ae=>{const Re=ue();return Re?ae.map(Me=>Re==null?void 0:Re.querySelectorAll(Me)).filter(Me=>Me.length).map(Me=>Array.from(Me)).flat():[]},Pe=ae=>ae.toString()&&ae.rangeCount&&ae.getRangeAt(0).getBoundingClientRect().top,de=(ae=0)=>{const Re=ue(),[Me,We]=useState(null),Ye=useMemo(()=>debounce(()=>{const ve=Re,Le=ve.getSelection?ve.getSelection():document.getSelection();Le&&Pe(Le)?We(Le):We(null)},ae),[Re,We,ae]);return useEffect(()=>(window.document.addEventListener("selectionchange",Ye),()=>window.document.removeEventListener("selectionchange",Ye)),[Ye]),Me},ze=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},94067:function(ee,s,e){"use strict";e.r(s),e.d(s,{EmbeddedDocsRouter:function(){return x},Router:function(){return L},isTechDocsAvailable:function(){return b}});var r=e(2784),t=e(10289),c=e(53479),f=e(53492),S=e(48023),m=e(20961),a=e(16172),i=e(74581);const u=({entity:j})=>{const D=(0,S.iB)(j);return r.createElement(m.I6,{entityRef:D},r.createElement(a.b,null),r.createElement(i.F,{withSearch:!1}))};var y=e(50021),p=e(26220);const v="backstage.io/techdocs-ref",b=j=>{var D,P;return Boolean((P=(D=j==null?void 0:j.metadata)==null?void 0:D.annotations)==null?void 0:P[v])},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)})),x=j=>{var B;const{children:D}=j,{entity:P}=(0,c.useEntity)();return((B=P.metadata.annotations)==null?void 0:B[v])?r.createElement(t.Z5,null,r.createElement(t.AW,{path:"*",element:r.createElement(u,{entity:P})},D)):r.createElement(f.MissingAnnotationEmptyState,{annotation:v})}},3337:function(ee,s,e){"use strict";var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),c=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(ee,s,e){"use strict";e.d(s,{k:function(){return S},p:function(){return f}});var r=e(10179),t=e(76372),c=e.n(t);class f{constructor(a){_(this,"configApi");_(this,"discoveryApi");_(this,"fetchApi");this.configApi=a.configApi,this.discoveryApi=a.discoveryApi,this.fetchApi=a.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(a){const{kind:i,namespace:u,name:y}=a,v=`${await this.getApiOrigin()}/metadata/techdocs/${u}/${i}/${y}`,b=await this.fetchApi.fetch(`${v}`);if(!b.ok)throw await r.VL.fromResponse(b);return await b.json()}async getEntityMetadata(a){const{kind:i,namespace:u,name:y}=a,v=`${await this.getApiOrigin()}/metadata/entity/${u}/${i}/${y}`,b=await this.fetchApi.fetch(`${v}`);if(!b.ok)throw await r.VL.fromResponse(b);return await b.json()}}class S{constructor(a){_(this,"configApi");_(this,"discoveryApi");_(this,"identityApi");_(this,"fetchApi");this.configApi=a.configApi,this.discoveryApi=a.discoveryApi,this.identityApi=a.identityApi,this.fetchApi=a.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var a;return(a=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?a:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(a,i){const{kind:u,namespace:y,name:p}=a,b=`${await this.getStorageUrl()}/${y}/${u}/${p}/${i}`,L=await this.fetchApi.fetch(`${b.endsWith("/")?b:`${b}/`}index.html`);let x="";switch(L.status){case 404:throw x="Page not found. ",i||(x+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(x);case 500:throw x="Could not generate documentation or an error in the TechDocs backend. ",new Error(x);default:break}return L.text()}async syncEntityDocs(a,i=()=>{}){const{kind:u,namespace:y,name:p}=a,b=`${await this.getApiOrigin()}/sync/${y}/${u}/${p}`,{token:L}=await this.identityApi.getCredentials();return new Promise((x,j)=>{const D=new t.EventSourcePolyfill(b,{withCredentials:!0,headers:L?{Authorization:`Bearer ${L}`}:{}});D.addEventListener("log",P=>{P.data&&i(JSON.parse(P.data))}),D.addEventListener("finish",P=>{let F=!1;P.data&&({updated:F}=JSON.parse(P.data)),x(F?"updated":"cached")}),D.onerror=P=>{switch(D.close(),P.status){case 404:j(new r.dR(P.message));return;default:j(new Error(P.data));return}}})}async getBaseUrl(a,i,u){const{kind:y,namespace:p,name:v}=i,L=`${await this.getApiOrigin()}/static/docs/${p}/${y}/${v}/${u}`;return new URL(a,L.endsWith("/")?L:`${L}/`).toString()}}},97589:function(ee,s,e){"use strict";e.d(s,{D:function(){return r}});function r(t,c){return c.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(ee,s,e){"use strict";e.d(s,{u:function(){return a}});var r=e(2784),t=e(53492),c=e(53479),f=e(1114),S=e(70335),m=e(21956);const a=i=>{const{initialFilter:u="all",columns:y,actions:p}=i;return r.createElement(f.j,null,r.createElement(t.Content,null,r.createElement(t.ContentHeader,{title:""},r.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),r.createElement(c.EntityListProvider,null,r.createElement(c.CatalogFilterLayout,null,r.createElement(c.CatalogFilterLayout.Filters,null,r.createElement(S.f,null),r.createElement(c.UserListPicker,{initialFilter:u}),r.createElement(c.EntityOwnerPicker,null),r.createElement(c.EntityTagPicker,null)),r.createElement(c.CatalogFilterLayout.Content,null,r.createElement(m.EntityListDocsTable,{actions:p,columns:y}))))))}},51016:function(ee,s,e){"use strict";e.d(s,{f:function(){return y}});var r=e(68725),t=e(97589),c=e(36964),f=e(53492),S=e(94339),m=e(16111),a=e(24579),i=e(14503),u=e(2784);const y=b=>{const{entities:L}=b,x=(0,c.useRouteRef)(r.Fw),j=(0,c.useApi)(c.configApiRef);return L?u.createElement(f.ItemCardGrid,{"data-testid":"docs-explore"},L!=null&&L.length?L.map((D,P)=>{var F,B;return u.createElement(S.Z,{key:P},u.createElement(m.Z,null,u.createElement(f.ItemCardHeader,{title:(F=D.metadata.title)!=null?F:D.metadata.name})),u.createElement(a.Z,null,D.metadata.description),u.createElement(i.Z,null,u.createElement(f.Button,{to:x({namespace:(0,t.D)((B=D.metadata.namespace)!=null?B:"default",j),kind:(0,t.D)(D.kind,j),name:(0,t.D)(D.metadata.name,j)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var p=e(53479);const v=()=>{const{loading:b,error:L,entities:x}=useEntityList();return L?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:L.toString()})):b||!x?React.createElement(Progress,null):(x.sort((j,D)=>{var P,F;return((P=j.metadata.title)!=null?P:j.metadata.name).localeCompare((F=D.metadata.title)!=null?F:D.metadata.name)}),React.createElement(DocsCardGrid,{entities:x}))}},38634:function(ee,s,e){"use strict";e.d(s,{H:function(){return p}});var r=e(2784),t=e(95074),c=e(36964),f=e(48023),S=e(53479),m=e(68725),a=e(53492),i=e(98095),u=e(3792),y=e(97589);const p=v=>{const{entities:b,title:L,loading:x,columns:j,actions:D}=v,[,P]=(0,t.Z)(),F=(0,c.useRouteRef)(m.Fw),B=(0,c.useApi)(c.configApiRef);if(!b)return null;const w=b.map(ue=>{var Pe;const $e=(0,S.getEntityRelations)(ue,f.S4);return{entity:ue,resolved:{docsUrl:F({namespace:(0,y.D)((Pe=ue.metadata.namespace)!=null?Pe:"default",B),kind:(0,y.D)(ue.kind,B),name:(0,y.D)(ue.metadata.name,B)}),ownedByRelations:$e,ownedByRelationsTitle:$e.map(de=>(0,S.humanizeEntityRef)(de,{defaultKind:"group"})).join(", ")}}}),V=[u.N.createNameColumn(),u.N.createOwnerColumn(),u.N.createTypeColumn()],Q=[i.n.createCopyDocsUrlAction(P)];return r.createElement(r.Fragment,null,x||w&&w.length>0?r.createElement(a.Table,{isLoading:x,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:w,columns:j||V,actions:D||Q,title:L?`${L} (${w.length})`:`All (${w.length})`}):r.createElement(a.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:r.createElement(a.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))};p.columns=u.N,p.actions=i.n},12481:function(ee,s,e){"use strict";e.d(s,{n:function(){return y}});var r=e(2784),t=e(95074),c=e(76635),f=e.n(c),S=e(53492),m=e(53479),a=e(38634),i=e(98095),u=e(3792);const y=p=>{var Q,ue;const{columns:v,actions:b}=p,{loading:L,error:x,entities:j,filters:D}=(0,m.useEntityList)(),{isStarredEntity:P,toggleStarredEntity:F}=(0,m.useStarredEntities)(),[,B]=(0,t.Z)(),w=(0,c.capitalize)((ue=(Q=D.user)==null?void 0:Q.value)!=null?ue:"all"),V=[i.n.createCopyDocsUrlAction(B),i.n.createStarEntityAction(P,F)];return x?r.createElement(S.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(S.CodeSnippet,{language:"text",text:x.toString()})):r.createElement(a.H,{title:w,entities:j,loading:L,actions:b||V,columns:v})};y.columns=u.N,y.actions=i.n},98095:function(ee,s,e){"use strict";e.d(s,{n:function(){return a}});var r=e(2784),t=e(39981),c=e(2337),f=e(11640),S=e(28347);const m=(0,c.Z)({root:{color:"#f3ba37"}})(f.Z),a={createCopyDocsUrlAction(i){return u=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>i(`${window.location.origin}${u.resolved.docsUrl}`)})},createStarEntityAction(i,u){return({entity:y})=>{const p=i(y);return{cellStyle:{paddingLeft:"1em"},icon:()=>p?r.createElement(m,null):r.createElement(S.Z,null),tooltip:p?"Remove from favorites":"Add to favorites",onClick:()=>u(y)}}}}},3792:function(ee,s,e){"use strict";e.d(s,{N:function(){return S}});var r=e(2784),t=e(53492),c=e(53479);function f(m){return m.metadata.title||m.metadata.name}const S={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},f(m.entity)),subvalue:m.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:m})=>r.createElement(c.EntityRefLinks,{entityRefs:m.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},21956:function(ee,s,e){"use strict";e.d(s,{DocsTable:function(){return t.H},EntityListDocsTable:function(){return r.n}});var r=e(12481),t=e(38634),c=e(72580),f=e.n(c);e.o(c,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return c.DefaultTechDocsHome}})},72580:function(){},50021:function(ee,s,e){"use strict";e.r(s),e.d(s,{TechDocsIndexPage:function(){return f}});var r=e(2784),t=e(10289),c=e(2546);const f=()=>(0,t.pC)()||r.createElement(c.u,null)},1114:function(ee,s,e){"use strict";e.d(s,{j:function(){return f}});var r=e(2784),t=e(53492),c=e(36964);const f=S=>{var u;const{children:m}=S,i=`Documentation available in ${(u=(0,c.useApi)(c.configApiRef).getOptionalString("organization.name"))!=null?u:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:i,themeId:"documentation"},m)}},70335:function(ee,s,e){"use strict";e.d(s,{f:function(){return f}});var r=e(2784),t=e(53479);class c{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const f=()=>{const{updateFilters:S}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{S({techdocs:new c})},[S]),null}},19192:function(ee,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return c.u}});var r=e(51016),t=e(21956),c=e(2546),f=e(1114),S=e(70335)},82250:function(ee,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return a.DefaultTechDocsHome},TechDocsIndexPage:function(){return i.Jl},TechDocsReaderPage:function(){return i.I6},TechDocsReaderPageContent:function(){return S.Fq},TechDocsReaderPageHeader:function(){return S.SE},plugin:function(){return i.s4},techdocsPlugin:function(){return i.s4}});var r=e(98157),t=e.n(r);e.o(r,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return r.DefaultTechDocsHome}}),e.o(r,"TechDocsReaderPageContent")&&e.d(s,{TechDocsReaderPageContent:function(){return r.TechDocsReaderPageContent}}),e.o(r,"TechDocsReaderPageHeader")&&e.d(s,{TechDocsReaderPageHeader:function(){return r.TechDocsReaderPageHeader}});var c=e(3337),f=e(42723),S=e(96393),m=e(47861),a=e(19192),i=e(20961),u=e(94067)},20961:function(ee,s,e){"use strict";e.d(s,{I6:function(){return y},Jl:function(){return u},s4:function(){return S}});var r=e(47955),t=e(42723),c=e(68725),f=e(36964);const S=(0,f.createPlugin)({id:"techdocs",apis:[(0,f.createApiFactory)({api:r.Dl,deps:{configApi:f.configApiRef,discoveryApi:f.discoveryApiRef,identityApi:f.identityApiRef,fetchApi:f.fetchApiRef},factory:({configApi:p,discoveryApi:v,identityApi:b,fetchApi:L})=>new t.k({configApi:p,discoveryApi:v,identityApi:b,fetchApi:L})}),(0,f.createApiFactory)({api:r.gT,deps:{configApi:f.configApiRef,discoveryApi:f.discoveryApiRef,fetchApi:f.fetchApiRef},factory:({configApi:p,discoveryApi:v,fetchApi:b})=>new t.p({configApi:p,discoveryApi:v,fetchApi:b})})],routes:{root:c._Z,docRoot:c.Fw,entityContent:c.pd}}),m=S.provide((0,f.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(p=>p.Router),mountPoint:c._Z})),a=S.provide((0,f.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(p=>p.EmbeddedDocsRouter),mountPoint:c.pd})),i=S.provide((0,f.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(p=>p.TechDocsCustomHome),mountPoint:c._Z})),u=S.provide((0,f.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(p=>p.TechDocsIndexPage),mountPoint:c._Z})),y=S.provide((0,f.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,26220)).then(p=>p.TechDocsReaderPage),mountPoint:c.Fw}))},26220:function(ee,s,e){"use strict";e.r(s),e.d(s,{TechDocsReaderLayout:function(){return i},TechDocsReaderPage:function(){return u}});var r=e(2784),t=e(10289),c=e(53492),f=e(47955),S=e(74581),m=e(99954),a=e(16172);const i=({withSearch:y,withHeader:p=!0})=>r.createElement(c.Page,{themeId:"documentation"},p&&r.createElement(m.S,null),r.createElement(a.b,null),r.createElement(S.F,{withSearch:y})),u=y=>{const{kind:p,name:v,namespace:b}=(0,t.UO)(),{children:L,entityRef:x={kind:p,name:v,namespace:b}}=y,j=(0,t.pC)();if(!L){const P=(j?r.Children.toArray(j.props.children):[]).find(F=>{var w,V;const{type:B}=F;return!((V=(w=B==null?void 0:B.__backstage_data)==null?void 0:w.map)!=null&&V.get(f.Zz))});return r.createElement(f.ZS,{entityRef:x},P||r.createElement(i,null))}return r.createElement(f.ZS,{entityRef:x},({metadata:D,entityMetadata:P,onReady:F})=>r.createElement(c.Page,{themeId:"documentation"},L instanceof Function?L({entityRef:x,techdocsMetadataValue:D.value,entityMetadataValue:P.value,onReady:F}):L))}},74581:function(ee,s,e){"use strict";e.d(s,{F:function(){return bt}});var r=e(2784),t=e(36617),c=e(79692),f=e(60905),S=e(8560),m=e(50236),a=e(19219),i=e(47955),u=e(53492),y=e(47861),p=e(4614),v=e(77277),b=e(99688),L=e(12420),x=e(90436),j=e(61837),D=e(4190),P=e(87685);const F=(0,c.Z)(re=>(0,L.Z)({paper:{width:"100%",[re.breakpoints.up("sm")]:{width:"75%"},[re.breakpoints.up("md")]:{width:"50%"},padding:re.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:re.palette.background.default}})),B=({buildLog:re,onClose:$})=>{const A=F(),G=re.length===0?"Waiting for logs...":re.join(`
32
+ `);return r.createElement(f.Z,{container:!0,direction:"column",className:A.root,spacing:0,wrap:"nowrap"},r.createElement(f.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(x.Z,{variant:"h5"},"Build Details"),r.createElement(j.Z,{key:"dismiss",title:"Close the drawer",onClick:$,color:"inherit"},r.createElement(P.Z,null))),r.createElement(u.LogViewer,{text:G,classes:{root:A.logs}}))},w=({buildLog:re})=>{const $=F(),[A,G]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(v.Z,{color:"inherit",onClick:()=>G(!0)},"Show Build Logs"),r.createElement(D.ZP,{classes:{paper:$.paper},anchor:"right",open:A,onClose:()=>G(!1)},r.createElement(B,{buildLog:re,onClose:()=>G(!1)})))};var V=e(36964);const Q=({errorMessage:re})=>{const $=(0,V.useApi)(V.configApiRef).getOptionalString("techdocs.builder");let A="";return $!=="local"&&(A="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(u.ErrorPage,{status:"404",statusMessage:re||"Documentation not found",additionalInfo:A})};var ue=e(2263);const $e=(0,c.Z)(re=>({root:{marginBottom:re.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),Pe=()=>{let re=null;const $=$e(),{state:A,contentReload:G,contentErrorMessage:ie,syncErrorMessage:ye,buildLog:Se}=(0,ue.DK)(),Ne=A==="CHECKING"?r.createElement(u.Progress,null):null;return A==="INITIAL_BUILD"&&(re=r.createElement(b.Z,{classes:{root:$.root},variant:"outlined",severity:"info",icon:r.createElement(p.Z,{size:"24px"}),action:r.createElement(w,{buildLog:Se})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),A==="CONTENT_STALE_REFRESHING"&&(re=r.createElement(b.Z,{variant:"outlined",severity:"info",icon:r.createElement(p.Z,{size:"24px"}),action:r.createElement(w,{buildLog:Se}),classes:{root:$.root}},"A newer version of this documentation is being prepared and will be available shortly.")),A==="CONTENT_STALE_READY"&&(re=r.createElement(b.Z,{variant:"outlined",severity:"success",action:r.createElement(v.Z,{color:"inherit",onClick:()=>G()},"Refresh"),classes:{root:$.root}},"A newer version of this documentation is now available, please refresh to view.")),A==="CONTENT_STALE_ERROR"&&(re=r.createElement(b.Z,{variant:"outlined",severity:"error",action:r.createElement(w,{buildLog:Se}),classes:{root:$.root,message:$.message}},"Building a newer version of this documentation failed."," ",ye)),A==="CONTENT_NOT_FOUND"&&(re=r.createElement(r.Fragment,null,ye&&r.createElement(b.Z,{variant:"outlined",severity:"error",action:r.createElement(w,{buildLog:Se}),classes:{root:$.root,message:$.message}},"Building a newer version of this documentation failed."," ",ye),r.createElement(Q,{errorMessage:ie}))),r.createElement(r.Fragment,null,Ne,re)};var de=e(10289),ze=e(60364),ae=e(41128),Re=e(36356);const Me=(re,$,A)=>{const G=re==="src"&&$.endsWith(".svg"),ie=!$.match(/^([a-z]*:)?\/\//i),ye=$.startsWith(A);return G&&(ie||ye)},We=({techdocsStorageApi:re,entityId:$,path:A})=>async G=>{const ie=await re.getApiOrigin(),ye=async(Se,Ne)=>{for(const Xe of Se)if(Xe.hasAttribute(Ne)){const ut=Xe.getAttribute(Ne);if(!ut)return;const gt=await re.getBaseUrl(ut,$,A);if(Me(Ne,ut,ie))try{const Ke=await(await fetch(gt,{credentials:"include"})).text();Xe.setAttribute(Ne,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Ke)))}`)}catch{Xe.setAttribute("alt",`Error: ${ut}`)}else Xe.setAttribute(Ne,gt)}};return await Promise.all([ye(G.querySelectorAll("img"),"src"),ye(G.querySelectorAll("script"),"src"),ye(G.querySelectorAll("source"),"src"),ye(G.querySelectorAll("link"),"href"),ye(G.querySelectorAll("a[download]"),"href")]),G};var Ye=e(68370),ve=e(67097),Le=e(47093),xe=e(82717),He=e.n(xe);const at=re=>$=>{var Ke;const A=$.querySelector('[title="Edit this page"]');if(!A||!A.href)return $;const G=new URL(A.href),ie=re.byUrl(G);if((ie==null?void 0:ie.type)!=="github"&&(ie==null?void 0:ie.type)!=="gitlab")return $;const ye=((Ke=$.querySelector("article>h1"))==null?void 0:Ke.childNodes[0].textContent)||"",Se=encodeURIComponent(`Documentation Feedback: ${ye}`),Ne=encodeURIComponent(`Page source:
33
+ ${A.href}
34
+
35
+ Feedback:`),Xe=(ie==null?void 0:ie.type)==="github"?(0,Ye.Pb)(G.href,"blob"):G.href,ut=He()(Xe),gt=`/${ut.organization}/${ut.name}`,ht=A.cloneNode();switch(ie==null?void 0:ie.type){case"gitlab":ht.href=`${G.origin}${gt}/issues/new?issue[title]=${Se}&issue[description]=${Ne}`;break;case"github":ht.href=`${G.origin}${gt}/issues/new?title=${Se}&body=${Ne}`;break;default:return $}return Le.render(r.createElement(ve.Z),ht),ht.style.paddingLeft="5px",ht.title="Leave feedback for this page",ht.id="git-feedback-link",A==null||A.insertAdjacentElement("beforebegin",ht),$};var At=e(44882);const et=()=>re=>{const $=re.querySelector('.md-header label[for="__drawer"]'),A=re.querySelector("article");if(!$||!A)return re;const G=$.cloneNode();return Le.render(r.createElement(At.Z),G),G.id="toggle-sidebar",G.title="Toggle Sidebar",G.classList.add("md-content__button"),G.style.setProperty("padding","0 0 0 5px"),G.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),A==null||A.prepend(G),re},it=()=>re=>(((A,G)=>{Array.from(A).filter(ie=>ie.hasAttribute(G)).forEach(ie=>{const ye=ie.getAttribute(G);if(ye){ye.match(/^https?:\/\//i)&&ie.setAttribute("target","_blank");try{const Se=Qe(window.location.href);ie.setAttribute(G,new URL(ye,Se).toString())}catch{ie.replaceWith(ie.textContent||ye)}}})})(Array.from(re.getElementsByTagName("a")),"href"),re);function Qe(re){const $=new URL(re);return!$.pathname.endsWith("/")&&!$.pathname.endsWith(".html")&&($.pathname+="/"),$.toString()}const rt=({baseUrl:re,onClick:$})=>A=>(Array.from(A.getElementsByTagName("a")).forEach(G=>{G.addEventListener("click",ie=>{const Se=G.getAttribute("href");!Se||Se.startsWith(re)&&!G.hasAttribute("download")&&(ie.preventDefault(),$(ie,Se))})}),A);var wt=e(15459),Zt=e(80030),zt=e(72379),Fn=e(41547);const Yt=(0,wt.Z)(re=>({tooltip:{fontSize:"inherit",color:re.palette.text.primary,margin:0,padding:re.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Zt.ZP),Rt=()=>r.createElement(zt.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"})),dn=({text:re})=>{const[$,A]=(0,r.useState)(!1),G=(0,r.useCallback)(()=>{navigator.clipboard.writeText(re),A(!0)},[re]),ie=(0,r.useCallback)(()=>{A(!1)},[A]);return r.createElement(Yt,{title:"Copied to clipboard",placement:"left",open:$,onClose:ie,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:G},r.createElement(Rt,null)))},se=re=>$=>{var G;const A=$.querySelectorAll("pre > code");for(const ie of A){const ye=ie.textContent||"",Se=document.createElement("div");(G=ie==null?void 0:ie.parentElement)==null||G.prepend(Se),Le.render(r.createElement(Fn.Z,{theme:re},r.createElement(dn,{text:ye})),Se)}return $},H=()=>re=>{var $;return($=re.querySelector(".md-header"))==null||$.remove(),re},oe=()=>re=>{var $,A;return($=re.querySelector(".md-footer .md-copyright"))==null||$.remove(),(A=re.querySelector(".md-footer-copyright"))==null||A.remove(),re},fe=({docStorageUrl:re,onLoading:$,onLoaded:A})=>G=>{const ie=Array.from(G.querySelectorAll('head > link[rel="stylesheet"]')).filter(Se=>{var Ne;return(Ne=Se.getAttribute("href"))==null?void 0:Ne.startsWith(re)});let ye=ie.length;return ye>0&&$(G),ie.forEach(Se=>Se.addEventListener("load",()=>{ye-=1,ye===0&&A(G)})),G};var he=e(35368),Te=e.n(he);const we=/main\.[A-Fa-f0-9]{8}\.min\.css$/,De=/^https:\/\/fonts\.googleapis\.com/,ke=/^https:\/\/fonts\.gstatic\.com/,lt=re=>{if(re.nodeName&&re.nodeName==="LINK"){const $=re.getAttribute("href")||"";$.match(we)&&re.setAttribute("rel","stylesheet"),$.match(De)&&re.setAttribute("rel","stylesheet"),$.match(ke)&&re.setAttribute("rel","preconnect")}return re},Ut=re=>$=>{if($.nodeName==="IFRAME"){const A=$.getAttribute("src");if(!A)return $.remove(),$;try{const G=new URL(A);re.some(ye=>G.host===ye)||$.remove()}catch(G){console.warn(`Invalid iframe src, ${G}`),$.remove()}}return $},Ft=re=>{const $=(re==null?void 0:re.getOptionalStringArray("allowedIframeHosts"))||[];return A=>{Te().addHook("afterSanitizeAttributes",lt);const G=["link"];return $.length>0&&(Te().addHook("beforeSanitizeElements",Ut($)),G.push("iframe")),Te().sanitize(A.innerHTML,{ADD_TAGS:G,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},tt=({css:re})=>$=>($.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${re}</style>`),$),It=()=>re=>(setTimeout(()=>{var $;if(window.location.hash){const A=window.location.hash.slice(1);($=re==null?void 0:re.querySelector(`[id="${A}"]`))==null||$.scrollIntoView()}},200),re),jt=async(re,$)=>{let A;if(typeof re=="string")A=new DOMParser().parseFromString(re,"text/html").documentElement;else if(re instanceof Element)A=re;else throw new Error("dom is not a recognized type");for(const G of $)A=await G(A);return A},Vt=["h1","h2","h3","h4","h5","h6"],gn=re=>{const $=(0,de.s0)(),A=(0,ze.Z)(),G=(0,V.useApi)(i.Dl),ie=(0,V.useApi)(Re.q3),ye=(0,V.useApi)(V.configApiRef),{namespace:Se,kind:Ne,name:Xe}=re,{state:ut,path:gt,content:ht}=(0,ue.DK)(),Ke=A.palette.type==="dark",[Lt,qe]=(0,r.useState)(),[dt,qt]=(0,r.useState)(null),{isPinned:nn}=(0,r.useContext)(u.SidebarPinStateContext),pt=(0,r.useCallback)(()=>{if(!dt||!Lt)return;const Ot=dt.querySelector(".md-container > .md-tabs"),ft=window.matchMedia("screen and (max-width: 76.1875em)").matches,Et=Math.max(dt.getBoundingClientRect().top,0);Lt.forEach(St=>{ft?St.style.top="0px":Ot?St.style.top=`${Et+Ot.getBoundingClientRect().height}px`:St.style.top=`${Et}px`})},[dt,Lt]);(0,r.useEffect)(()=>(pt(),window.addEventListener("scroll",pt,!0),window.addEventListener("resize",pt),()=>{window.removeEventListener("scroll",pt,!0),window.removeEventListener("resize",pt)}),[pt,ut]);const yt=(0,r.useCallback)(()=>{if(!dt)return;const Ot=dt.querySelector(".md-footer");Ot&&(Ot.style.width=`${dt.getBoundingClientRect().width}px`)},[dt]);(0,r.useEffect)(()=>(yt(),window.addEventListener("resize",yt),()=>{window.removeEventListener("resize",yt)}));const rn=(0,r.useCallback)((Ot,ft)=>jt(Ot,[Ft(ye.getOptionalConfig("techdocs.sanitizer")),We({techdocsStorageApi:G,entityId:{kind:Ne,name:Xe,namespace:Se},path:ft}),it(),et(),H(),oe(),at(ie),tt({css:`
36
+ /*
37
+ 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.
38
+ 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.
39
+ */
40
+ :host {
41
+ /* FONT */
42
+ --md-default-fg-color: ${A.palette.text.primary};
43
+ --md-default-fg-color--light: ${A.palette.text.secondary};
44
+ --md-default-fg-color--lighter: ${(0,ae.$n)(A.palette.text.secondary,.7)};
45
+ --md-default-fg-color--lightest: ${(0,ae.$n)(A.palette.text.secondary,.3)};
46
+
47
+ /* BACKGROUND */
48
+ --md-default-bg-color:${A.palette.background.default};
49
+ --md-default-bg-color--light: ${A.palette.background.paper};
50
+ --md-default-bg-color--lighter: ${(0,ae.$n)(A.palette.background.paper,.7)};
51
+ --md-default-bg-color--lightest: ${(0,ae.$n)(A.palette.background.paper,.3)};
52
+
53
+ /* PRIMARY */
54
+ --md-primary-fg-color: ${A.palette.primary.main};
55
+ --md-primary-fg-color--light: ${A.palette.primary.light};
56
+ --md-primary-fg-color--dark: ${A.palette.primary.dark};
57
+ --md-primary-bg-color: ${A.palette.primary.contrastText};
58
+ --md-primary-bg-color--light: ${(0,ae.$n)(A.palette.primary.contrastText,.7)};
59
+
60
+ /* ACCENT */
61
+ --md-accent-fg-color: var(--md-primary-fg-color);
62
+
63
+ /* SHADOW */
64
+ --md-shadow-z1: ${A.shadows[1]};
65
+ --md-shadow-z2: ${A.shadows[2]};
66
+ --md-shadow-z3: ${A.shadows[3]};
67
+
68
+ /* EXTENSIONS */
69
+ --md-admonition-fg-color: var(--md-default-fg-color);
70
+ --md-admonition-bg-color: var(--md-default-bg-color);
71
+ /* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
72
+ --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>');
73
+ --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>');
74
+ --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>');
75
+ --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>');
76
+ --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>');
77
+ --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>');
78
+ --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>');
79
+ --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>');
80
+ --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>');
81
+ --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>');
82
+ --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>');
83
+ --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>');
84
+ --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>');
85
+ --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>');
86
+ --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>');
87
+ --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>');
88
+ --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>');
89
+ --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>');
90
+ --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>');
91
+ --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>');
92
+ --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>');
93
+ --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>');
94
+ --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>');
95
+ --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>');
96
+ --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>');
97
+ --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>');
98
+ }
99
+
100
+ :host > * {
101
+ /* CODE */
102
+ --md-code-fg-color: ${A.palette.text.primary};
103
+ --md-code-bg-color: ${A.palette.background.paper};
104
+ --md-code-hl-color: ${(0,ae.Fq)(A.palette.warning.main,.5)};
105
+ --md-code-hl-keyword-color: ${Ke?A.palette.primary.light:A.palette.primary.dark};
106
+ --md-code-hl-function-color: ${Ke?A.palette.secondary.light:A.palette.secondary.dark};
107
+ --md-code-hl-string-color: ${Ke?A.palette.success.light:A.palette.success.dark};
108
+ --md-code-hl-number-color: ${Ke?A.palette.error.light:A.palette.error.dark};
109
+ --md-code-hl-constant-color: var(--md-code-hl-function-color);
110
+ --md-code-hl-special-color: var(--md-code-hl-function-color);
111
+ --md-code-hl-name-color: var(--md-code-fg-color);
112
+ --md-code-hl-comment-color: var(--md-default-fg-color--light);
113
+ --md-code-hl-generic-color: var(--md-default-fg-color--light);
114
+ --md-code-hl-variable-color: var(--md-default-fg-color--light);
115
+ --md-code-hl-operator-color: var(--md-default-fg-color--light);
116
+ --md-code-hl-punctuation-color: var(--md-default-fg-color--light);
117
+
118
+ /* TYPESET */
119
+ --md-typeset-font-size: 1rem;
120
+ --md-typeset-color: var(--md-default-fg-color);
121
+ --md-typeset-a-color: var(--md-accent-fg-color);
122
+ --md-typeset-table-color: ${A.palette.text.primary};
123
+ --md-typeset-del-color: ${Ke?(0,ae.Fq)(A.palette.error.dark,.5):(0,ae.Fq)(A.palette.error.light,.5)};
124
+ --md-typeset-ins-color: ${Ke?(0,ae.Fq)(A.palette.success.dark,.5):(0,ae.Fq)(A.palette.success.light,.5)};
125
+ --md-typeset-mark-color: ${Ke?(0,ae.Fq)(A.palette.warning.dark,.5):(0,ae.Fq)(A.palette.warning.light,.5)};
126
+ }
127
+
128
+ @media screen and (max-width: 76.1875em) {
129
+ :host > * {
130
+ /* TYPESET */
131
+ --md-typeset-font-size: .9rem;
132
+ }
133
+ }
134
+
135
+ @media screen and (max-width: 600px) {
136
+ :host > * {
137
+ /* TYPESET */
138
+ --md-typeset-font-size: .7rem;
139
+ }
140
+ }
141
+ `}),tt({css:`
142
+ body {
143
+ --md-text-color: var(--md-default-fg-color);
144
+ --md-text-link-color: var(--md-accent-fg-color);
145
+ --md-text-font-family: ${A.typography.fontFamily};
146
+ font-family: var(--md-text-font-family);
147
+ background-color: unset;
148
+ }
149
+ `}),tt({css:`
150
+ .md-grid {
151
+ max-width: 100%;
152
+ margin: 0;
153
+ }
154
+
155
+ .md-nav {
156
+ font-size: calc(var(--md-typeset-font-size) * 0.9);
157
+ }
158
+ .md-nav__link {
159
+ display: flex;
160
+ align-items: center;
161
+ justify-content: space-between;
162
+ }
163
+ .md-nav__icon {
164
+ height: 20px !important;
165
+ width: 20px !important;
166
+ margin-left:${A.spacing(1)}px;
167
+ }
168
+ .md-nav__icon svg {
169
+ margin: 0;
170
+ width: 20px !important;
171
+ height: 20px !important;
172
+ }
173
+ .md-nav__icon:after {
174
+ width: 20px !important;
175
+ height: 20px !important;
176
+ }
177
+
178
+ .md-main__inner {
179
+ margin-top: 0;
180
+ }
181
+
182
+ .md-sidebar {
183
+ bottom: 75px;
184
+ position: fixed;
185
+ width: 16rem;
186
+ overflow-y: auto;
187
+ overflow-x: hidden;
188
+ scrollbar-color: rgb(193, 193, 193) #eee;
189
+ scrollbar-width: thin;
190
+ }
191
+ .md-sidebar .md-sidebar__scrollwrap {
192
+ width: calc(16rem - 10px);
193
+ }
194
+ .md-sidebar--secondary {
195
+ right: ${A.spacing(3)}px;
196
+ }
197
+ .md-sidebar::-webkit-scrollbar {
198
+ width: 5px;
199
+ }
200
+ .md-sidebar::-webkit-scrollbar-button {
201
+ width: 5px;
202
+ height: 5px;
203
+ }
204
+ .md-sidebar::-webkit-scrollbar-track {
205
+ background: #eee;
206
+ border: 1 px solid rgb(250, 250, 250);
207
+ box-shadow: 0px 0px 3px #dfdfdf inset;
208
+ border-radius: 3px;
209
+ }
210
+ .md-sidebar::-webkit-scrollbar-thumb {
211
+ width: 5px;
212
+ background: rgb(193, 193, 193);
213
+ border: transparent;
214
+ border-radius: 3px;
215
+ }
216
+ .md-sidebar::-webkit-scrollbar-thumb:hover {
217
+ background: rgb(125, 125, 125);
218
+ }
219
+
220
+ .md-content {
221
+ max-width: calc(100% - 16rem * 2);
222
+ margin-left: 16rem;
223
+ margin-bottom: 50px;
224
+ }
225
+
226
+ .md-footer {
227
+ position: fixed;
228
+ bottom: 0px;
229
+ }
230
+ .md-footer__title {
231
+ background-color: unset;
232
+ }
233
+ .md-footer-nav__link {
234
+ width: 16rem;
235
+ }
236
+
237
+ .md-dialog {
238
+ background-color: unset;
239
+ }
240
+
241
+ @media screen and (min-width: 76.25em) {
242
+ .md-sidebar {
243
+ height: auto;
244
+ }
245
+ }
246
+
247
+ @media screen and (max-width: 76.1875em) {
248
+ .md-nav {
249
+ transition: none !important;
250
+ background-color: var(--md-default-bg-color)
251
+ }
252
+ .md-nav--primary .md-nav__title {
253
+ cursor: auto;
254
+ color: var(--md-default-fg-color);
255
+ font-weight: 700;
256
+ white-space: normal;
257
+ line-height: 1rem;
258
+ height: auto;
259
+ display: flex;
260
+ flex-flow: column;
261
+ row-gap: 1.6rem;
262
+ padding: 1.2rem .8rem .8rem;
263
+ background-color: var(--md-default-bg-color);
264
+ }
265
+ .md-nav--primary .md-nav__title~.md-nav__list {
266
+ box-shadow: none;
267
+ }
268
+ .md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
269
+ border-top: none;
270
+ }
271
+ .md-nav--primary .md-nav__title .md-nav__button {
272
+ display: none;
273
+ }
274
+ .md-nav--primary .md-nav__title .md-nav__icon {
275
+ color: var(--md-default-fg-color);
276
+ position: static;
277
+ height: auto;
278
+ margin: 0 0 0 -0.2rem;
279
+ }
280
+ .md-nav--primary > .md-nav__title [for="none"] {
281
+ padding-top: 0;
282
+ }
283
+ .md-nav--primary .md-nav__item {
284
+ border-top: none;
285
+ }
286
+ .md-nav--primary :is(.md-nav__title,.md-nav__item) {
287
+ font-size : var(--md-typeset-font-size);
288
+ }
289
+ .md-nav .md-source {
290
+ display: none;
291
+ }
292
+
293
+ .md-sidebar {
294
+ height: 100%;
295
+ }
296
+ .md-sidebar--primary {
297
+ width: 12.1rem !important;
298
+ z-index: 200;
299
+ left: ${nn?"calc(-12.1rem + 242px)":"calc(-12.1rem + 72px)"} !important;
300
+ }
301
+ .md-sidebar--secondary:not([hidden]) {
302
+ display: none;
303
+ }
304
+
305
+ .md-content {
306
+ max-width: 100%;
307
+ margin-left: 0;
308
+ }
309
+
310
+ .md-header__button {
311
+ margin: 0.4rem 0;
312
+ margin-left: 0.4rem;
313
+ padding: 0;
314
+ }
315
+
316
+ .md-overlay {
317
+ left: 0;
318
+ }
319
+
320
+ .md-footer {
321
+ position: static;
322
+ padding-left: 0;
323
+ }
324
+ .md-footer-nav__link {
325
+ /* footer links begin to overlap at small sizes without setting width */
326
+ width: 50%;
327
+ }
328
+ }
329
+
330
+ @media screen and (max-width: 600px) {
331
+ .md-sidebar--primary {
332
+ left: -12.1rem !important;
333
+ width: 12.1rem;
334
+ }
335
+ }
336
+ `}),tt({css:`
337
+ .md-typeset {
338
+ font-size: var(--md-typeset-font-size);
339
+ }
340
+
341
+ ${Vt.reduce((Et,St)=>{const Ct=A.typography[St],{lineHeight:Nt,fontFamily:Gt,fontWeight:on,fontSize:pn}=Ct,bn=_t=>{let yn=1;return typeof _t=="number"&&(yn=_t/16*.6),typeof _t=="string"&&(yn=_t.replace("rem","")),`calc(${yn} * var(--md-typeset-font-size))`};return Et.concat(`
342
+ .md-typeset ${St} {
343
+ color: var(--md-default-fg-color);
344
+ line-height: ${Nt};
345
+ font-family: ${Gt};
346
+ font-weight: ${on};
347
+ font-size: ${bn(pn)};
348
+ }
349
+ `)},"")}
350
+
351
+ .md-typeset .md-content__button {
352
+ color: var(--md-default-fg-color);
353
+ }
354
+
355
+ .md-typeset hr {
356
+ border-bottom: 0.05rem dotted ${A.palette.divider};
357
+ }
358
+
359
+ .md-typeset details {
360
+ font-size: var(--md-typeset-font-size) !important;
361
+ }
362
+ .md-typeset details summary {
363
+ padding-left: 2.5rem !important;
364
+ }
365
+ .md-typeset details summary:before,
366
+ .md-typeset details summary:after {
367
+ top: 50% !important;
368
+ width: 20px !important;
369
+ height: 20px !important;
370
+ transform: rotate(0deg) translateY(-50%) !important;
371
+ }
372
+ .md-typeset details[open] > summary:after {
373
+ transform: rotate(90deg) translateX(-50%) !important;
374
+ }
375
+
376
+ .md-typeset blockquote {
377
+ color: var(--md-default-fg-color--light);
378
+ border-left: 0.2rem solid var(--md-default-fg-color--light);
379
+ }
380
+
381
+ .md-typeset table:not([class]) {
382
+ font-size: var(--md-typeset-font-size);
383
+ border: 1px solid var(--md-default-fg-color);
384
+ border-bottom: none;
385
+ border-collapse: collapse;
386
+ }
387
+ .md-typeset table:not([class]) th {
388
+ font-weight: bold;
389
+ }
390
+ .md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
391
+ border-bottom: 1px solid var(--md-default-fg-color);
392
+ }
393
+
394
+ .md-typeset pre > code::-webkit-scrollbar-thumb {
395
+ background-color: hsla(0, 0%, 0%, 0.32);
396
+ }
397
+ .md-typeset pre > code::-webkit-scrollbar-thumb:hover {
398
+ background-color: hsla(0, 0%, 0%, 0.87);
399
+ }
400
+ `}),tt({css:`
401
+ /*
402
+ Disable CSS animations on link colors as they lead to issues in dark mode.
403
+ The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
404
+ */
405
+ .md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
406
+ transition: none;
407
+ }
408
+ `}),tt({css:`
409
+ /* HIGHLIGHT */
410
+ .highlight .md-clipboard:after {
411
+ content: unset;
412
+ }
413
+
414
+ .highlight .nx {
415
+ color: ${Ke?"#ff53a3":"#ec407a"};
416
+ }
417
+
418
+ /* CODE HILITE */
419
+ .codehilite .gd {
420
+ background-color: ${Ke?"rgba(248,81,73,0.65)":"#fdd"};
421
+ }
422
+
423
+ .codehilite .gi {
424
+ background-color: ${Ke?"rgba(46,160,67,0.65)":"#dfd"};
425
+ }
426
+
427
+ /* TABBED */
428
+ .tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
429
+ .tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
430
+ .tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
431
+ .tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
432
+ .tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
433
+ .tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
434
+ .tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
435
+ .tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
436
+ .tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
437
+ .tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
438
+ .tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
439
+ .tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
440
+ .tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
441
+ .tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
442
+ .tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
443
+ .tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
444
+ .tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
445
+ .tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
446
+ .tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
447
+ .tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
448
+ color: var(--md-accent-fg-color);
449
+ border-color: var(--md-accent-fg-color);
450
+ }
451
+
452
+ /* TASK-LIST */
453
+ .task-list-control .task-list-indicator::before {
454
+ background-color: ${A.palette.action.disabledBackground};
455
+ }
456
+ .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
457
+ background-color: ${A.palette.success.main};
458
+ }
459
+
460
+ /* ADMONITION */
461
+ .admonition {
462
+ font-size: var(--md-typeset-font-size) !important;
463
+ }
464
+ .admonition .admonition-title {
465
+ padding-left: 2.5rem !important;
466
+ }
467
+
468
+ .admonition .admonition-title:before {
469
+ top: 50% !important;
470
+ width: 20px !important;
471
+ height: 20px !important;
472
+ transform: translateY(-50%) !important;
473
+ }
474
+ `})]),[Ne,Xe,Se,ie,ye,G,A,Ke,nn]),cn=(0,r.useCallback)(async Ot=>jt(Ot,[It(),se(A),rt({baseUrl:window.location.origin,onClick:(ft,Et)=>{var Nt;const St=ft.ctrlKey||ft.metaKey,Ct=new URL(Et);Ct.hash?St?window.open(`${Ct.pathname}${Ct.hash}`,"_blank"):($(`${Ct.pathname}${Ct.hash}`),(Nt=Ot==null?void 0:Ot.querySelector(`#${Ct.hash.slice(1)}`))==null||Nt.scrollIntoView()):St?window.open(Ct.pathname,"_blank"):$(Ct.pathname)}}),fe({docStorageUrl:await G.getApiOrigin(),onLoading:ft=>{ft.style.setProperty("opacity","0")},onLoaded:ft=>{var Et;ft.style.removeProperty("opacity"),(Et=ft.querySelector(".md-nav__title"))==null||Et.removeAttribute("for"),qe(Array.from(ft.querySelectorAll(".md-sidebar")))}})]),[A,$,G]);return(0,r.useEffect)(()=>{if(!ht)return()=>{};let Ot=!0;return rn(ht,gt).then(async ft=>{if(!(ft!=null&&ft.innerHTML)||!Ot)return;window.scroll({top:0});const Et=await cn(ft);qt(Et)}),()=>{Ot=!1}},[ht,gt,rn,cn]),dt},fn=(0,c.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),bt=(0,ue.m1)(re=>{const{withSearch:$=!0,onReady:A}=re,G=fn(),ie=(0,i.$L)(),{entityMetadata:{value:ye,loading:Se},entityRef:Ne,shadowRoot:Xe,setShadowRoot:ut}=(0,i.x1)(),gt=gn(Ne),[ht,Ke]=(0,r.useState)((0,t.Ue)({...(0,m.Z)(),insertionPoint:void 0})),Lt=(0,r.useCallback)(yt=>{var cn;if(!gt||!yt)return;Ke((0,t.Ue)({...(0,m.Z)(),insertionPoint:gt.querySelector("head")||void 0}));const rn=(cn=yt.shadowRoot)!=null?cn:yt.attachShadow({mode:"open"});rn.innerHTML="",rn.appendChild(gt),ut(rn),A instanceof Function&&A()},[gt,ut,A]),qe=Xe==null?void 0:Xe.querySelector('[data-md-component="content"]'),dt=Xe==null?void 0:Xe.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]'),qt=Xe==null?void 0:Xe.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]'),nn=document.createElement("div");dt==null||dt.prepend(nn);const pt=document.createElement("div");return qt==null||qt.prepend(pt),Se===!1&&!ye?r.createElement(u.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}):gt?r.createElement(u.Content,null,r.createElement(f.Z,{container:!0},r.createElement(f.Z,{xs:12,item:!0},r.createElement(Pe,null)),$&&r.createElement(f.Z,{className:G.search,xs:"auto",item:!0},r.createElement(y.S,{entityId:Ne})),r.createElement(f.Z,{xs:12,item:!0},r.createElement(a.ZP,{jss:ht,sheetsManager:new Map},r.createElement("div",{ref:Lt,"data-testid":"techdocs-native-shadowroot"}),r.createElement(S.Z,{container:nn},ie.renderComponentsByLocation(i.oZ.PrimarySidebar)),r.createElement(S.Z,{container:qe},ie.renderComponentsByLocation(i.oZ.Content)),r.createElement(S.Z,{container:pt},ie.renderComponentsByLocation(i.oZ.SecondarySidebar)))))):r.createElement(u.Content,null,r.createElement(f.Z,{container:!0},r.createElement(f.Z,{xs:12,item:!0},r.createElement(Pe,null))))}),Je=null},99954:function(ee,s,e){"use strict";e.d(s,{S:function(){return v}});var r=e(2784),t=e(18671),c=e(98069),f=e(73250),S=e(47955),m=e(53479),a=e(48023),i=e(53492),u=e(36964),y=e(68725);const p=r.createElement(c.Z,{animation:"wave",variant:"text",height:40}),v=b=>{const{children:L}=b,x=(0,S.$L)(),j=(0,u.useApi)(u.configApiRef),{title:D,setTitle:P,subtitle:F,setSubtitle:B,entityRef:w,metadata:{value:V,loading:Q},entityMetadata:{value:ue,loading:$e}}=(0,S.x1)();(0,r.useEffect)(()=>{!V||(P(xe=>{const{site_name:He}=V;return xe||He}),B(xe=>{let{site_description:He}=V;return(!He||He==="None")&&(He="Home"),xe||He}))},[V,P,B]);const Pe=j.getOptional("app.title")||"Backstage",de=[F,D,Pe].filter(Boolean).join(" | "),{locationMetadata:ze,spec:ae}=ue||{},Re=ae==null?void 0:ae.lifecycle,Me=ue?(0,m.getEntityRelations)(ue,a.S4):[],We=(0,u.useRouteRef)(y._Z)(),Ye=r.createElement(r.Fragment,null,r.createElement(i.HeaderLabel,{label:"Component",value:r.createElement(m.EntityRefLink,{color:"inherit",entityRef:w,defaultKind:"Component"})}),Me.length>0&&r.createElement(i.HeaderLabel,{label:"Owner",value:r.createElement(m.EntityRefLinks,{color:"inherit",entityRefs:Me,defaultKind:"group"})}),Re?r.createElement(i.HeaderLabel,{label:"Lifecycle",value:Re}):null,ze&&ze.type!=="dir"&&ze.type!=="file"?r.createElement(i.HeaderLabel,{label:"",value:r.createElement("a",{href:ze.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(f.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return!$e&&ue===void 0||!Q&&V===void 0?null:r.createElement(i.Header,{type:"Documentation",typeLink:We,title:D||p,subtitle:F||p},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,de)),Ye,L,x.renderComponentsByLocation(S.oZ.Header))}},16172:function(ee,s,e){"use strict";e.d(s,{b:function(){return p}});var r=e(2784),t=e(79692),c=e(15223),f=e(95544),S=e(80030),m=e(61837),a=e(48348),i=e(47603),u=e(47955);const y=(0,t.Z)(v=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:v.spacing(3,3,0)}})),p=({toolbarProps:v})=>{const b=y(),[L,x]=(0,r.useState)(null),j=(0,r.useCallback)(Q=>{x(Q.currentTarget)},[]),D=(0,r.useCallback)(()=>{x(null)},[]),{entityMetadata:{value:P,loading:F}}=(0,u.x1)(),B=(0,u.$L)(),w=B.renderComponentsByLocation(u.oZ.Subheader),V=B.renderComponentsByLocation(u.oZ.Settings);return!w&&!V||F===!1&&!P?null:r.createElement(c.Z,{classes:b,...v},r.createElement(f.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},w,V?r.createElement(r.Fragment,null,r.createElement(S.ZP,{title:"Settings"},r.createElement(m.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:j},r.createElement(i.Z,null))),r.createElement(a.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:L,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(L),onClose:D,keepMounted:!0},V)):null))}},2263:function(ee,s,e){"use strict";e.d(s,{DK:function(){return p},m1:function(){return b}});var r=e(2784),t=e(10289),c=e(47955),f=e(36964),S=e(64279),m=e(77446);function a({contentLoading:L,content:x,activeSyncState:j}){return L||j==="BUILD_READY_RELOAD"||!x&&j==="CHECKING"?"CHECKING":!x&&j==="BUILDING"?"INITIAL_BUILD":x?j==="BUILDING"?"CONTENT_STALE_REFRESHING":j==="BUILD_READY"?"CONTENT_STALE_READY":j==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function i(L,x){const j={...L};switch(x.type){case"sync":x.state==="CHECKING"&&(j.buildLog=[]),j.activeSyncState=x.state,j.syncError=x.syncError;break;case"contentLoading":j.contentLoading=!0,j.contentError=void 0;break;case"content":typeof x.path=="string"&&(j.path=x.path),j.contentLoading=!1,j.content=x.content,j.contentError=x.contentError;break;case"buildLog":j.buildLog=j.buildLog.concat(x.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(j.activeSyncState)&&["contentLoading","content"].includes(x.type)&&(j.activeSyncState="UP_TO_DATE",j.buildLog=[]),j}function u(L,x,j,D){var ue,$e;const[P,F]=(0,r.useReducer)(i,{activeSyncState:"CHECKING",path:D,contentLoading:!0,buildLog:[]}),B=(0,f.useApi)(c.Dl),{retry:w}=(0,m.Z)(async()=>{F({type:"contentLoading"});try{const Pe=await B.getEntityDocs({kind:L,namespace:x,name:j},D);return F({type:"content",content:Pe,path:D}),Pe}catch(Pe){F({type:"content",contentError:Pe,path:D})}},[B,L,x,j,D]),V=(0,r.useRef)({content:void 0,reload:()=>{}});return V.current={content:P.content,reload:w},(0,S.default)(async()=>{F({type:"sync",state:"CHECKING"});const Pe=setTimeout(()=>{F({type:"sync",state:"BUILDING"})},1e3);try{switch(await B.syncEntityDocs({kind:L,namespace:x,name:j},ze=>{F({type:"buildLog",log:ze})})){case"updated":V.current.content?F({type:"sync",state:"BUILD_READY"}):(V.current.reload(),F({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":F({type:"sync",state:"UP_TO_DATE"});break;default:F({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(de){F({type:"sync",state:"ERROR",syncError:de})}finally{clearTimeout(Pe)}},[L,j,x,B,F,V]),{state:(0,r.useMemo)(()=>a({activeSyncState:P.activeSyncState,contentLoading:P.contentLoading,content:P.content}),[P.activeSyncState,P.content,P.contentLoading]),contentReload:w,path:P.path,content:P.content,contentErrorMessage:(ue=P.contentError)==null?void 0:ue.toString(),syncErrorMessage:($e=P.syncError)==null?void 0:$e.toString(),buildLog:P.buildLog}}const y=(0,r.createContext)({}),p=()=>(0,r.useContext)(y),v=({children:L})=>{const{"*":x=""}=(0,t.UO)(),{entityRef:j}=(0,c.x1)(),{kind:D,namespace:P,name:F}=j,B=u(D,P,F,x);return r.createElement(y.Provider,{value:B},L instanceof Function?L(B):L)},b=L=>x=>r.createElement(v,null,r.createElement(L,{...x}))},96393:function(ee,s,e){"use strict";e.d(s,{Fq:function(){return f.F},SE:function(){return c.S}});var r=e(2263),t=e(26220),c=e(99954),f=e(74581),S=e(16172)},68725:function(ee,s,e){"use strict";e.d(s,{Fw:function(){return c},_Z:function(){return t},pd:function(){return f}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),c=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),f=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},47861:function(ee,s,e){"use strict";e.d(s,{S:function(){return B}});var r=e(2784),t=e(79692),c=e(49378),f=e(38402),S=e(85256),m=e(53492),a=e(73624);const i=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),u=w=>{const{result:V,highlight:Q,lineClamp:ue=5,asListItem:$e=!0,asLink:Pe=!0,title:de}=w,ze=i(),ae=()=>{const We=Q!=null&&Q.fields.title?r.createElement(a.FA,{text:Q.fields.title,preTag:Q.preTag,postTag:Q.postTag}):V.title,Ye=Q!=null&&Q.fields.entityTitle?r.createElement(a.FA,{text:Q.fields.entityTitle,preTag:Q.preTag,postTag:Q.postTag}):V.entityTitle,ve=Q!=null&&Q.fields.name?r.createElement(a.FA,{text:Q.fields.name,preTag:Q.preTag,postTag:Q.postTag}):V.name;return r.createElement(c.Z,{className:ze.itemText,primaryTypographyProps:{variant:"h6"},primary:de||r.createElement(r.Fragment,null,We," | ",Ye!=null?Ye:ve," docs"),secondary:r.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:ue,overflow:"hidden"}},Q!=null&&Q.fields.text?r.createElement(a.FA,{text:Q.fields.text,preTag:Q.preTag,postTag:Q.postTag}):V.text)})},Re=({children:We})=>Pe?r.createElement(m.Link,{to:V.location},We):r.createElement(r.Fragment,null,We),Me=({children:We})=>$e?r.createElement(r.Fragment,null,r.createElement(f.Z,{alignItems:"flex-start",className:ze.flexContainer},We),r.createElement(S.Z,{component:"li"})):r.createElement(r.Fragment,null,We);return r.createElement(Re,null,r.createElement(Me,null,r.createElement(ae,null)))};var y=e(86619),p=e(50581),v=e(61837),b=e(4614),L=e(21853),x=e(88013),j=e(10289),D=e(48760);const P=(0,t.Z)({root:{width:"100%"}}),F=w=>{const{entityId:V,debounceTime:Q=150}=w,[ue,$e]=(0,r.useState)(!1),Pe=(0,j.s0)(),{term:de,setTerm:ze,setFilters:ae,result:{loading:Re,value:Me}}=(0,a.Rx)(),We=P(),[Ye,ve]=(0,r.useState)([]);(0,r.useEffect)(()=>{let Qe=!0;if(Qe&&Me){const rt=Me.results.slice(0,10);ve(rt)}return()=>{Qe=!1}},[Re,Me]);const[Le,xe]=(0,r.useState)(de);(0,D.Z)(()=>ze(Le),Q,[Le]);const{kind:He,name:at,namespace:At}=V;(0,r.useEffect)(()=>{ae(Qe=>({...Qe,kind:He,namespace:At,name:at}))},[He,At,at,ae]);const et=Qe=>{ue||$e(!0),xe(Qe.target.value)},it=(Qe,rt)=>{if(rt!=null&&rt.document){const{location:wt}=rt.document;Pe(wt)}};return r.createElement(x.ZP,{classes:{root:We.root},"data-testid":"techdocs-search-bar",size:"small",open:ue,getOptionLabel:()=>"",filterOptions:Qe=>Qe,onClose:()=>{$e(!1)},onFocus:()=>{$e(!0)},onChange:it,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Ye,renderOption:({document:Qe,highlight:rt})=>r.createElement(u,{result:Qe,lineClamp:3,asListItem:!1,asLink:!1,title:Qe.title,highlight:rt}),loading:Re,renderInput:Qe=>r.createElement(y.Z,{...Qe,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${V.name} docs`,value:Le,onChange:et,InputProps:{...Qe.InputProps,startAdornment:r.createElement(p.Z,{position:"start"},r.createElement(v.Z,{"aria-label":"Query",disabled:!0},r.createElement(L.Z,null))),endAdornment:r.createElement(r.Fragment,null,Re?r.createElement(b.Z,{color:"inherit",size:20}):null,Qe.InputProps.endAdornment)}})})},B=w=>{const V={term:"",types:["techdocs"],pageCursor:"",filters:w.entityId};return r.createElement(a.Nd,{initialState:V},r.createElement(F,{...w}))}},98157:function(){},53260:function(){}},function(ee){var s=function(r){return ee(ee.s=r)};ee.O(0,[2370,6202,9284,2126,7012,9035,4983,3222,5218,4736],function(){return s(88649),s(46054)});var e=ee.O()}]);})();
475
+
476
+ //# sourceMappingURL=main.f8792fde.js.map