@techdocs/cli 0.0.0-nightly-20220509024521 → 0.0.0-nightly-20220512024113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -5
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/main.5cc31a3e.js +476 -0
- package/dist/embedded-app/static/main.5cc31a3e.js.map +1 -0
- package/dist/embedded-app/static/{runtime.e51237fb.js → runtime.5cc31a3e.js} +1 -1
- package/dist/embedded-app/static/{runtime.e51237fb.js.map → runtime.5cc31a3e.js.map} +1 -1
- package/dist/embedded-app/static/vendor.5cc31a3e.js +102 -0
- package/dist/embedded-app/static/vendor.5cc31a3e.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/package.json +7 -7
- package/dist/embedded-app/static/main.e51237fb.js +0 -476
- package/dist/embedded-app/static/main.e51237fb.js.map +0 -1
- package/dist/embedded-app/static/vendor.e51237fb.js +0 -105
- package/dist/embedded-app/static/vendor.e51237fb.js.map +0 -1
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
(()=>{var Hi=Object.defineProperty;var ji=(ee,s,e)=>s in ee?Hi(ee,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):ee[s]=e;var _=(ee,s,e)=>(ji(ee,typeof s!="symbol"?s+"":s,e),e),sa=(ee,s,e)=>{if(!s.has(ee))throw TypeError("Cannot "+e)};var Ve=(ee,s,e)=>(sa(ee,s,"read from private field"),e?e.call(ee):s.get(ee)),Cn=(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)},On=(ee,s,e,r)=>(sa(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:g,name:v}=(0,r.of)(i.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${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:g=[],offset:v,limit:b,after:L}=i!=null?i:{},D=[];for(const B of[y].flat()){const F=[];for(const[$,G]of Object.entries(B))for(const Q of[G].flat())Q===S?F.push(encodeURIComponent($)):typeof Q=="string"&&F.push(`${encodeURIComponent($)}=${encodeURIComponent(Q)}`);F.length&&D.push(`filter=${F.join(",")}`)}g.length&&D.push(`fields=${g.map(encodeURIComponent).join(",")}`),v!==void 0&&D.push(`offset=${v}`),b!==void 0&&D.push(`limit=${b}`),L!==void 0&&D.push(`after=${encodeURIComponent(L)}`);const W=D.length?`?${D.join("&")}`:"",M=await this.requestRequired("GET",`/entities${W}`,u),P=(B,F)=>{var Q,ce;if(((Q=B.metadata)==null?void 0:Q.name)===void 0||B.kind===void 0||((ce=F.metadata)==null?void 0:ce.name)===void 0||F.kind===void 0)return 0;const $=(0,r.eE)(B),G=(0,r.eE)(F);return $<G?-1:$>G?1:0};return{items:M.sort(P)}}async getEntityByRef(i,u){const{kind:y,namespace:g,name:v}=(0,r.of)(i);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(v)}`,u)}async getEntityByName(i,u){const{kind:y,namespace:g="default",name:v}=i;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${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:g}=i,v=[];for(const L of[y].flat()){const D=[];for(const[W,M]of Object.entries(L))for(const P of[M].flat())P===S?D.push(encodeURIComponent(W)):typeof P=="string"&&D.push(`${encodeURIComponent(W)}=${encodeURIComponent(P)}`);D.length&&v.push(`filter=${D.join(",")}`)}for(const L of g)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},g){const v=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${y?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(g==null?void 0:g.token)&&{Authorization:`Bearer ${g==null?void 0:g.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:D}=await v.json();if(!b)throw new Error(`Location wasn't added: ${u}`);return{location:b,entities:L,exists:D}}async getLocationByRef(i,u){return(await this.requestRequired("GET","/locations",u)).map(g=>g.data).find(g=>i===(0,r.NZ)(g))}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 g=`${await this.discoveryApi.getBaseUrl("catalog")}${u}`,v=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},b=await this.fetchApi.fetch(g,{method:i,headers:v});if(!b.ok)throw await t.VL.fromResponse(b)}async requestRequired(i,u,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${u}`,v=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},b=await this.fetchApi.fetch(g,{method:i,headers:v});if(!b.ok)throw await t.VL.fromResponse(b);return await b.json()}async requestOptional(i,u,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${u}`,v=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},b=await this.fetchApi.fetch(g,{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 mt},q1:function(){return hn},M6:function(){return dn},l2:function(){return t},zG:function(){return r},w$:function(){return ae},nP:function(){return j},aS:function(){return Ye},S4:function(){return Ut},cz:function(){return De},iB:function(){return re},of:function(){return Se},Ou:function(){return bt},eE:function(){return Ne},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(R=DEFAULT_NAMESPACE){_(this,"namespace");this.namespace=R}async enforce(R){return R.metadata.namespace?R:lodash.merge({metadata:{namespace:this.namespace}},R)}}class a{static isValidPrefixAndOrSuffix(R,V,ie,ge){if(typeof R!="string")return!1;const Re=R.split(V);return Re.length===1?ge(Re[0]):Re.length===2?ie(Re[0])&&ge(Re[1]):!1}static isJsonSafe(R){try{return S().isEqual(R,JSON.parse(JSON.stringify(R)))}catch{return!1}}static isValidDnsSubdomain(R){return typeof R=="string"&&R.length>=1&&R.length<=253&&R.split(".").every(a.isValidDnsLabel)}static isValidDnsLabel(R){return typeof R=="string"&&R.length>=1&&R.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(R)}static isValidTag(R){return typeof R=="string"&&R.length>=1&&R.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(R)}static isValidUrl(R){if(typeof R!="string")return!1;try{return new URL(R),!0}catch{return!1}}static isValidString(R){var V;return typeof R=="string"&&((V=R==null?void 0:R.trim())==null?void 0:V.length)>=1}static isNonEmptyString(R){var V;return typeof R=="string"&&((V=R==null?void 0:R.trim())==null?void 0:V.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),g=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,D=[i,g,v,b];function W(U){if(!(U!=null&&U.length))throw new TypeError("Unknown error");const R=U[0];throw new TypeError(`${R.instancePath||"<root>"} ${R.message}${R.params?` - ${Object.entries(R.params).map(([V,ie])=>`${V}: ${ie}`).join(", ")}`:""}`)}function M(U,R={}){var Xe;const V=(Xe=R==null?void 0:R.disableCache)!=null?Xe:!1,ie=V?"":JSON.stringify(U);if(!V){const ct=L.get(ie);if(ct)return ct}const ge=P(U),Re=new(y())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});ge.length&&Re.addSchema(ge,void 0,void 0,!0);const We=Re.compile(U);return V||L.set(ie,We),We}function P(U){if(typeof U!="object")return[];const R=new Set;U.$id&&R.add(U.$id);const V=new Array,ie=[U];for(;ie.length;){const ge=ie.pop();for(const Re of B(ge))if(!R.has(Re)){R.add(Re);const We=D.find(Xe=>Xe.$id===Re);We&&(V.push(We),ie.push(We))}}return V}function*B(U){const R=[U];for(;R.length;){const V=R.pop();if(typeof V=="object"&&V)for(const[ie,ge]of Object.entries(V))ie==="$ref"&&typeof ge=="string"?yield ge.split("#")[0]:R.push(ge)}}function F(U){const R=compileAjvSchema(U||entityEnvelopeSchema);return V=>{if(R(V)===!0)return V;throw throwAjvError(R.errors)}}function $(U){const R=M(U);return V=>{var Re;if(R(V)===!0)return V;const ge=(Re=R.errors)==null?void 0:Re.filter(We=>["/kind","/apiVersion"].includes(We.instancePath));if((ge==null?void 0:ge.length)&&ge.every(We=>We.keyword==="enum"))return!1;throw W(R.errors)}}function G(U){const R=compileAjvSchema(U||entitySchema);return V=>{if(R(V)===!0)return V;throw throwAjvError(R.errors)}}class Q{static isValidApiVersion(R){return a.isValidPrefixAndOrSuffix(R,"/",a.isValidDnsSubdomain,V=>V.length>=1&&V.length<=63&&/^[a-z0-9A-Z]+$/.test(V))}static isValidKind(R){return typeof R=="string"&&R.length>=1&&R.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(R)}static isValidObjectName(R){return typeof R=="string"&&R.length>=1&&R.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(R)}static isValidNamespace(R){return a.isValidDnsLabel(R)}static isValidLabelKey(R){return a.isValidPrefixAndOrSuffix(R,"/",a.isValidDnsSubdomain,Q.isValidObjectName)}static isValidLabelValue(R){return R===""||Q.isValidObjectName(R)}static isValidAnnotationKey(R){return a.isValidPrefixAndOrSuffix(R,"/",a.isValidDnsSubdomain,Q.isValidObjectName)}static isValidAnnotationValue(R){return typeof R=="string"}}const ce={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:U=>typeof U=="string"&&U.length>=1&&U.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(U)};function we(U={}){return{...ce,...U}}class xe{constructor(R=makeValidator()){_(this,"validators");this.validators=R}async enforce(R){var We,Xe,ct,gt,ht,Ke,Ot;function V(qe,ut,qt){if(ut==null)throw new Error(`${qe} must have a value`);let nn;try{nn=qt(ut)}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 "${ut}".`:"";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,ut,qt){return ut===void 0||V(qe,ut,qt)}V("apiVersion",R.apiVersion,this.validators.isValidApiVersion),V("kind",R.kind,this.validators.isValidKind),V("metadata.name",R.metadata.name,this.validators.isValidEntityName),ie("metadata.namespace",R.metadata.namespace,this.validators.isValidNamespace);for(const[qe,ut]of Object.entries((We=R.metadata.labels)!=null?We:[]))V(`labels.${qe}`,qe,this.validators.isValidLabelKey),V(`labels.${qe}`,ut,this.validators.isValidLabelValue);for(const[qe,ut]of Object.entries((Xe=R.metadata.annotations)!=null?Xe:[]))V(`annotations.${qe}`,qe,this.validators.isValidAnnotationKey),V(`annotations.${qe}`,ut,this.validators.isValidAnnotationValue);const ge=(ct=R.metadata.tags)!=null?ct:[];for(let qe=0;qe<ge.length;++qe)V(`tags.${qe}`,ge[qe],this.validators.isValidTag);const Re=(gt=R.metadata.links)!=null?gt:[];for(let qe=0;qe<Re.length;++qe)V(`links.${qe}.url`,(ht=Re[qe])==null?void 0:ht.url,CommonValidatorFunctions.isValidUrl),ie(`links.${qe}.title`,(Ke=Re[qe])==null?void 0:Ke.title,CommonValidatorFunctions.isNonEmptyString),ie(`links.${qe}.icon`,(Ot=Re[qe])==null?void 0:Ot.icon,KubernetesValidatorFunctions.isValidObjectName);return R}}class de{constructor(){_(this,"validate")}async enforce(R){if(!this.validate){const ge=new Ajv({allowUnionTypes:!0});this.validate=ge.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(R)===!0)return R;const[ie]=this.validate.errors||[];throw ie?new Error(`Malformed envelope, ${ie.instancePath||"<root>"} ${ie.message}`):new Error("Malformed envelope, Unknown error")}}function Ue(U){let R=U.indexOf(":");const V=U.indexOf("/");V!==-1&&V<R&&(R=-1);const ie=R===-1?void 0:U.slice(0,R),ge=V===-1?void 0:U.slice(R+1,V),Re=U.slice(Math.max(R+1,V+1));if(ie===""||ge===""||Re==="")throw new TypeError(`Entity reference "${U}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:ie,namespace:ge,name:Re}}function re(U){return{kind:U.kind,namespace:U.metadata.namespace||r,name:U.metadata.name}}function Se(U,R){var Xe,ct,gt,ht;if(!U)throw new Error("Entity reference must not be empty");const V=R==null?void 0:R.defaultKind,ie=(R==null?void 0:R.defaultNamespace)||r;let ge,Re,We;if(typeof U=="string"){const Ke=Ue(U);ge=(Xe=Ke.kind)!=null?Xe:V,Re=(ct=Ke.namespace)!=null?ct:ie,We=Ke.name}else ge=(gt=U.kind)!=null?gt:V,Re=(ht=U.namespace)!=null?ht:ie,We=U.name;if(ge)if(Re){if(!We){const Ke=JSON.stringify(U);throw new Error(`Entity reference ${Ke} had missing or empty name`)}}else{const Ke=JSON.stringify(U);throw new Error(`Entity reference ${Ke} had missing or empty namespace`)}else{const Ke=JSON.stringify(U);throw new Error(`Entity reference ${Ke} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:ge,namespace:Re,name:We}}function Ne(U){var ge,Re;let R,V,ie;return"metadata"in U?(R=U.kind,V=(ge=U.metadata.namespace)!=null?ge:r,ie=U.metadata.name):(R=U.kind,V=(Re=U.namespace)!=null?Re:r,ie=U.name),`${R.toLocaleLowerCase("en-US")}:${V.toLocaleLowerCase("en-US")}/${ie.toLocaleLowerCase("en-US")}`}class ze{constructor(R){this.policies=R}async enforce(R){let V=R;for(const ie of this.policies){const ge=await ie.enforce(V);if(!ge)throw new Error(`Policy ${ie.constructor.name} did not return a result`);V=ge}return V}}class ke{constructor(R){this.policies=R}async enforce(R){for(const V of this.policies){const ie=await V.enforce(R);if(ie)return ie}throw new Error("The entity did not match any known policy")}}const ve={allOf(U){return new ze(U)},oneOf(U){return new ke(U)}};var Ie=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 Be(U){const R=$(U);return{async check(V){return R(V)===V}}}const je=Be(Ie);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 Tt=Be(at);var _e=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 st=Be(_e);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 et=Be(Qe);var $t=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 jt=Be($t),Ut="ownedBy",xn="ownerOf",Jt="consumesApi",vt="apiConsumedBy",un="providesApi",se="apiProvidedBy",j="dependsOn",ae="dependencyOf",fe="parentOf",he="childOf",Te="memberOf",Me="hasMember",De="partOf",Ye="hasPart";var it=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 Nt=Be(it);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=Be(Ft);var Lt=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"UserV1alpha1","description":"A user describes a person, such as an employee, a contractor, or similar. Users belong to Group entities in the catalog. These catalog user entries are connected to the way that authentication within the Backstage ecosystem works. See the auth section of the docs for a discussion of these concepts.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"User","metadata":{"name":"jdoe"},"spec":{"profile":{"displayName":"Jenny Doe","email":"jenny-doe@example.com","picture":"https://example.com/staff/jenny-with-party-hat.jpeg"},"memberOf":["team-b","employees"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["User"]},"spec":{"type":"object","required":["memberOf"],"properties":{"profile":{"type":"object","description":"Optional profile information about the user, mainly for display purposes. All fields of this structure are also optional. The email would be a primary email of some form, that the user may wish to be used for contacting them. The picture is expected to be a URL pointing to an image that's representative of the user, and that a browser could fetch and render on a profile page or similar.","properties":{"displayName":{"type":"string","description":"A simple display name to present to users.","examples":["Jenny Doe"],"minLength":1},"email":{"type":"string","description":"An email where this user can be reached.","examples":["jenny-doe@example.com"],"minLength":1},"picture":{"type":"string","description":"The URL of an image that represents this user.","examples":["https://example.com/staff/jenny-with-party-hat.jpeg"],"minLength":1}}},"memberOf":{"type":"array","description":"The list of groups that the user is a direct member of (i.e., no transitive memberships are listed here). The list must be present, but may be empty if the user is not member of any groups. The items are not guaranteed to be ordered in any particular way. The entries of this array are entity references.","items":{"type":"string","examples":["team-b","employees"],"minLength":1}}}}}}]}`);const Vt=Be(Lt),mt="backstage.io/managed-by-location",hn="backstage.io/managed-by-origin-location",dn="backstage.io/source-location";function bt(U){if(typeof U!="string")throw new TypeError(`Unable to parse location ref '${U}', unexpected argument ${typeof U}`);const R=U.indexOf(":");if(R<0)throw new TypeError(`Unable to parse location ref '${U}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const V=U.substring(0,R).trim(),ie=U.substring(R+1).trim();if(!V||!ie)throw new TypeError(`Unable to parse location ref '${U}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(V==="http"||V==="https")throw new TypeError(`Invalid location ref '${U}', please prefix it with 'url:', e.g. 'url:${U}'`);return{type:V,target:ie}}function Je(U){const{type:R,target:V}=U;if(R){if(!V)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${R}:${V}`}function oe(U){var V,ie,ge,Re,We;const R=(We=(ie=(V=U.metadata)==null?void 0:V.annotations)==null?void 0:ie[ANNOTATION_SOURCE_LOCATION])!=null?We:(Re=(ge=U.metadata)==null?void 0:ge.annotations)==null?void 0:Re[ANNOTATION_LOCATION];if(!R)throw new Error(`Entity '${stringifyEntityRef(U)}' is missing location`);return bt(R)}},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 g=(y=localStorage.getItem(t))!=null?y:void 0;m.setActiveThemeId(g)}}),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 g=typeof y;return g==="number"&&isNaN(y)?"nan":g==="string"&&y===""?"empty-string":g}const i={type(y,g,v,b){return`Invalid type in config for key '${y}' in '${g}', got ${v}, wanted ${b}`},missing(y){return`Missing required config value at '${y}'`},convert(y,g,v){return`Unable to convert config value for key '${y}' in '${g}' to a ${v}`}};class u{constructor(g,v="mock-config",b,L=""){_(this,"filteredKeys");_(this,"notifiedFilteredKeys",new Set);this.data=g,this.context=v,this.fallback=b,this.prefix=L}static fromConfigs(g){return g.length===0?new u(void 0):g.reduce((v,{data:b,context:L,filteredKeys:D,deprecatedKeys:W})=>{const M=new u(b,L,v);if(M.filteredKeys=D,W)for(const{key:P,description:B}of W)console.warn(`The configuration key '${P}' of ${L} is deprecated and may be removed soon. ${B||""}`);return M},void 0)}has(g){var b,L;return this.readValue(g)!==void 0?!0:(L=(b=this.fallback)==null?void 0:b.has(g))!=null?L:!1}keys(){var b,L;const g=this.data?Object.keys(this.data):[],v=(L=(b=this.fallback)==null?void 0:b.keys())!=null?L:[];return[...new Set([...g,...v])]}get(g){const v=this.getOptional(g);if(v===void 0)throw new Error(i.missing(this.fullKey(g!=null?g:"")));return v}getOptional(g){var L;const v=t()(this.readValue(g)),b=(L=this.fallback)==null?void 0:L.getOptional(g);return v===void 0?b:b===void 0?v:f()({},{value:b},{value:v},(D,W)=>!m(W)||!m(D)?W:void 0).value}getConfig(g){const v=this.getOptionalConfig(g);if(v===void 0)throw new Error(i.missing(this.fullKey(g)));return v}getOptionalConfig(g){var L;const v=this.readValue(g),b=(L=this.fallback)==null?void 0:L.getOptionalConfig(g);if(m(v))return this.copy(v,g,b);if(v!==void 0)throw new TypeError(i.type(this.fullKey(g),this.context,a(v),"object"));return b}getConfigArray(g){const v=this.getOptionalConfigArray(g);if(v===void 0)throw new Error(i.missing(this.fullKey(g)));return v}getOptionalConfigArray(g){const v=this.readConfigValue(g,b=>{if(!Array.isArray(b))return{expected:"object-array"};for(const[L,D]of b.entries())if(!m(D))return{expected:"object-array",value:D,key:`${g}[${L}]`};return!0});if(!!v)return v.map((b,L)=>this.copy(b,`${g}[${L}]`))}getNumber(g){const v=this.getOptionalNumber(g);if(v===void 0)throw new Error(i.missing(this.fullKey(g)));return v}getOptionalNumber(g){const v=this.readConfigValue(g,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(g),this.context,"number"));return b}getBoolean(g){const v=this.getOptionalBoolean(g);if(v===void 0)throw new Error(i.missing(this.fullKey(g)));return v}getOptionalBoolean(g){return this.readConfigValue(g,v=>typeof v=="boolean"||{expected:"boolean"})}getString(g){const v=this.getOptionalString(g);if(v===void 0)throw new Error(i.missing(this.fullKey(g)));return v}getOptionalString(g){return this.readConfigValue(g,v=>typeof v=="string"&&v!==""||{expected:"string"})}getStringArray(g){const v=this.getOptionalStringArray(g);if(v===void 0)throw new Error(i.missing(this.fullKey(g)));return v}getOptionalStringArray(g){return this.readConfigValue(g,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:`${g}[${b}]`};return!0})}fullKey(g){return`${this.prefix}${this.prefix?".":""}${g}`}copy(g,v,b){const L=new u(g,this.context,b,this.fullKey(v));return L.filteredKeys=this.filteredKeys,L}readConfigValue(g,v){var D;const b=this.readValue(g);if(b===void 0)return(D=this.fallback)==null?void 0:D.readConfigValue(g,v);const L=v(b);if(L!==!0){const{key:W=g,value:M=b,expected:P}=L;throw new TypeError(i.type(this.fullKey(W),this.context,a(M),P))}return b}readValue(g){const v=g?g.split("."):[];for(const L of v)if(!S.test(L))throw new TypeError(`Invalid config key '${g}'`);if(this.data===void 0)return;let b=this.data;for(const[L,D]of v.entries())if(m(b))b=b[D];else if(b!==void 0){const W=this.fullKey(v.slice(0,L).join("."));throw new TypeError(i.type(W,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 g;let u=i.baseImplementation||e.g.fetch;const y=[(g=i.middleware)!=null?g:[]].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),g=((b=u.header)==null?void 0:b.name)||"authorization",v=((L=u.header)==null?void 0:L.value)||(D=>`Bearer ${D}`);return new t(u.identityApi,y,g,v)}constructor(u,y,g,v){this.identityApi=u,this.allowUrl=y,this.headerName=g,this.headerValue=v}apply(u){return async(y,g)=>{const v=new Request(y,g),{token:b}=await this.identityApi.getCredentials();return v.headers.get(this.headerName)||typeof b!="string"||!b||!this.allowUrl(v.url)?u(y,g):(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(g=>y===g||y.startsWith(`${g}/`))}function S(i,u){return!u||u==="/"?i:`${i.replace(/\/$/,"")}/${u.replace(/^\//,"")}`}class m{constructor(u){this.discoveryApi=u}apply(u){return async(y,g)=>{const v=new Request(y,g),b="plugin://";if(!v.url.startsWith(b))return u(y,g);const{hostname:L,pathname:D,search:W,hash:M,username:P,password:B}=new URL(`http://${v.url.substring(b.length)}`);let F=await this.discoveryApi.getBaseUrl(L);if(P||B){const G=new URL(F),Q=`${P}${B?`:${B}`:""}@`;F=`${G.protocol}//${Q}${G.host}${G.pathname}`}const $=`${S(F,D)}${W}${M}`;return u($,typeof y=="string"?g: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 g=this.currentRequests.slice(),v=this.makeAuthRequest(y,a);v?g[u]=v:delete g[u],this.currentRequests=g,this.subject.next(g.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,g)=>(typeof g=="object"&&g!==null&&Object.freeze(g),g)),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:g=["openid",`${c}userinfo.email`,`${c}userinfo.profile`]}=m;return r.OAuth2.create({discoveryApi:a,oauthRequestApi:i,provider:y,environment:u,defaultScopes:g,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,g=a.height||700,v=window.screen.width/2-y/2,b=window.screen.height/2-g/2,L=window.open(a.url,a.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${y},height=${g},top=${b},left=${v}`);let D="";if(!L||typeof L.closed=="undefined"||L.closed){const B=new Error("Failed to open auth popup.");B.name="PopupRejectedError",u(B);return}const W=B=>{if(B.source!==L||B.origin!==a.origin)return;const{data:F}=B;if(F.type==="config_info"){D=F.targetOrigin;return}if(F.type!=="authorization_response")return;const $=F;if("error"in $){const G=new Error($.error.message);G.name=$.error.name,u(G)}else i($.response);P()},M=setInterval(()=>{if(L.closed){const B=`Login failed, ${D&&D!==window.location.origin?`Incorrect app origin, expected ${D}`:"popup was closed"}`,F=new Error(B);F.name="PopupClosedError",u(F),P()}},100);function P(){window.removeEventListener("message",W),clearInterval(M)}window.addEventListener("message",W)})}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:g,joinScopes:v=t,oauthRequestApi:b,sessionTransform:L=D=>D}=i;this.authRequester=b.createAuthRequester({provider:g,onAuthRequest:D=>this.showPopup(D)}),this.discoveryApi=u,this.environment=y,this.provider=g,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}),g=await r({url:y,name:`${this.provider.title} Login`,origin:new URL(y).origin,width:450,height:730});return await this.sessionTransform(g)}async buildUrl(i,u){const y=await this.discoveryApi.getBaseUrl("auth"),g=this.buildQueryString({...u,env:this.environment});return`${y}/${this.provider.id}${i}${g}`}buildQueryString(i){if(!i)return"";const u=Object.entries(i).map(([y,g])=>{if(typeof g=="string")return`${encodeURIComponent(y)}=${encodeURIComponent(g)}`;if(g)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:g=S,oauthRequestApi:v,defaultScopes:b=[],scopeTransform:L=M=>M}=i,D=new c({discoveryApi:u,environment:y,provider:g,oauthRequestApi:v,sessionTransform(M){return{...M,providerInfo:{idToken:M.providerInfo.idToken,accessToken:M.providerInfo.accessToken,scopes:m.normalizeScopes(L,M.providerInfo.scope),expiresAt:new Date(Date.now()+M.providerInfo.expiresInSeconds*1e3)}}}}),W=new f.RefreshingAuthSessionManager({connector:D,defaultScopes:new Set(b),sessionScopes:M=>M.providerInfo.scopes,sessionShouldRefresh:M=>(M.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new m({sessionManager:W,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),g=await this.sessionManager.getSession({...u,scopes:y});return(v=g==null?void 0:g.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:g,defaultScopes:v=["openid","email","profile","offline_access"]}=a;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:g,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:g}=a;return r.OAuth2.create({discoveryApi:i,oauthRequestApi:g,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,g=new DirectAuthConnector({discoveryApi:i,environment:u,provider:y}),v=new StaticAuthSessionManager({connector:g}),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 g.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),g=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 g=y.get(u);if(g)return g}}}var S=e(76241);const m=(0,S.CT)("api-context"),a=i=>{var b;const{apis:u,children:y}=i,g=(b=(0,r.useContext)(m))==null?void 0:b.atVersion(1),v=g?new f(u,g):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 un}});var r=e(2784),t=e(10289),c=e(64279),f=e(56494),S=e(36964),m=e(76105);function a(se){const j={};for(const fe in se.collectors)se.collectors.hasOwnProperty(fe)&&(j[fe]=se.collectors[fe]());const ae=[{node:r.Children.toArray(se.root),parent:void 0,contexts:{}}];for(;ae.length!==0;){const{node:fe,parent:he,contexts:Te}=ae.shift();r.Children.forEach(fe,Me=>{if(!(0,r.isValidElement)(Me))return;const De={};for(const Ye in j)if(j.hasOwnProperty(Ye)){const it=j[Ye];De[Ye]=it.visit(it.accumulator,Me,he,Te[Ye])}for(const Ye of se.discoverers){const it=Ye(Me);it&&ae.push({node:it,parent:Me,contexts:De})}})}return Object.fromEntries(Object.entries(j).map(([fe,he])=>[fe,he.accumulator]))}function i(se,j){return()=>({accumulator:se(),visit:j})}function u(se){var j;return(j=se.props)==null?void 0:j.children}function y(se){var j,ae,fe;if(((j=se.props)==null?void 0:j.path)&&((ae=se.props)==null?void 0:ae.element))return(fe=se.props)==null?void 0:fe.element}const g=i(()=>new Set,(se,j)=>{const ae=(0,S.getComponentData)(j,"core.plugin");ae&&se.add(ae)});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,j,ae,fe)=>{var Vt,mt,hn,dn,bt;if((ae==null?void 0:ae.props.element)===j)return fe;let he=fe==null?void 0:fe.obj,Te=fe==null?void 0:fe.routeRef,Me=fe==null?void 0:fe.sticky;const De=(Vt=j.props)==null?void 0:Vt.path,Ye=(mt=he==null?void 0:he.children)!=null?mt:se.objects,it=Boolean((hn=j.props)==null?void 0:hn.caseSensitive);let Nt=fe==null?void 0:fe.path;if((0,S.getComponentData)(j,"core.gatherMountPoints")){if(!De)throw new Error("Mount point gatherer must have a path");Nt=De}const Ft=(dn=j.props)==null?void 0:dn.element;let tt=(0,S.getComponentData)(j,"core.mountPoint");if(!tt&&(0,r.isValidElement)(Ft)&&(tt=(0,S.getComponentData)(Ft,"core.mountPoint")),tt){let Je=De;if(Nt&&(Je?Nt=void 0:Je=Nt),!Je)throw new Error("Mounted routable extension must have a path");se.paths.set(tt,Je),Te&&Me?(se.parents.set(tt,Te),De&&(Te=tt,Me=!1)):(se.parents.set(tt,Te),Te=tt),De?(he={caseSensitive:it,path:De,element:"mounted",routeRefs:new Set([tt]),children:[b],plugin:(0,S.getComponentData)(j.props.element,"core.plugin")},Ye.push(he)):he==null||he.routeRefs.add(tt)}if((0,S.getComponentData)(j,"core.gatherMountPoints")&&(Me=!0),(0,S.getComponentData)(j,"core.gatherMountPoints")){if(!De)throw new Error("Mount point gatherer must have a path");tt||(he={caseSensitive:it,path:De,element:"gathered",routeRefs:new Set,children:[b],plugin:(bt=fe==null?void 0:fe.obj)==null?void 0:bt.plugin},Ye.push(he))}return{obj:he,path:Nt,routeRef:Te,sticky:Me}}),D=i(()=>new Set,(se,j)=>{if(j.type===v.L){const ae=j.props;se.add("with"in ae?ae.with:ae.without)}});var W=e(76241);const M=(0,W.uW)("route-ref-type",()=>Symbol("route-ref-type"));function P(se){return se[M]==="absolute"}function B(se){return se[M]==="sub"}function F(se){return se[M]==="external"}function $(...se){const j=se.join("/").replace(/\/\/+/g,"/");return j!=="/"&&j.endsWith("/")?j.slice(0,-1):j}function G(se,j,ae){let fe,he="";if(P(se))fe=se;else if(B(se))fe=se.parent,he=se.path;else if(F(se)){const De=ae.get(se);if(!De)return[void 0,""];if(P(De))fe=De;else if(B(De))fe=De.parent,he=De.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${De}`)}else throw se[M]?new Error(`Unknown or invalid route ref type, ${se[M]}`):new Error(`Unknown object passed to useRouteRef, got ${se}`);if(!fe)return[void 0,""];const Te=j.get(fe);if(!Te)return[void 0,""];const Me=$(Te,he);return[fe,Me]}function Q(se,j,ae,fe,he){var Nt;const Te=(Nt=(0,t.fp)(he,j))!=null?Nt:[],Me=Array();let De=-1;for(let Ft=se;Ft&&(De=Te.findIndex(tt=>tt.route.routeRefs.has(Ft)),De===-1);Ft=fe.get(Ft))Me.unshift(Ft);Me.length===0&&(De-=1);const Ye=De===-1?"":Te[De].pathname,it=$(...Me.slice(0,-1).map(Ft=>{const tt=ae.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 Ye+it}class ce{constructor(j,ae,fe,he,Te){this.routePaths=j,this.routeParents=ae,this.routeObjects=fe,this.routeBindings=he,this.appBasePath=Te}resolve(j,ae){const[fe,he]=G(j,this.routePaths,this.routeBindings);if(!fe)return;let Te;typeof ae=="string"?Te=this.trimPath(ae):ae.pathname?Te={...ae,pathname:this.trimPath(ae.pathname)}:Te=ae;const Me=this.appBasePath+Q(fe,Te,this.routePaths,this.routeParents,this.routeObjects);return(...[Ye])=>Me+(0,t.Gn)(he,Ye)}trimPath(j){return j&&(j.startsWith(this.appBasePath)?j.slice(this.appBasePath.length):j)}}const we=(0,W.CT)("routing-context"),xe=({routePaths:se,routeParents:j,routeObjects:ae,routeBindings:fe,basePath:he="",children:Te})=>{const Me=new ce(se,j,ae,fe,he),De=(0,W.EI)({1:Me});return r.createElement(we.Provider,{value:De},Te)},de=(se,j)=>{var ae,fe;try{const he=(0,t.fp)(j,{pathname:se}),Te=(ae=he==null?void 0:he.filter(De=>{var Ye;return((Ye=De==null?void 0:De.route.routeRefs)==null?void 0:Ye.size)>0}).pop())==null?void 0:ae.route;if(!Te)return{};let Me;return Te.routeRefs.size===1&&(Me=Te.routeRefs.values().next().value),{extension:"App",pluginId:((fe=Te.plugin)==null?void 0:fe.getId())||"root",...Me?{routeRef:Me.id}:{}}}catch{return{}}},Ue=({pathname:se,search:j,hash:ae})=>{const fe=(0,S.useAnalytics)();return(0,r.useEffect)(()=>{fe.captureEvent("navigate",`${se}${j}${ae}`)},[fe,se,j,ae]),null},re=({routeObjects:se})=>{const{pathname:j,search:ae,hash:fe}=(0,t.TH)();return r.createElement(S.AnalyticsContext,{attributes:de(j,se)},r.createElement(Ue,{pathname:j,search:ae,hash:fe}))};function Se(se,j){const ae=new Set(j.values());ae.delete(void 0);for(const fe of j.keys()){if(ae.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=j.get(he)}const Me=Te.match(/:(\w+)/g);if(Me){for(let De=0;De<Me.length;De++)for(let Ye=De+1;Ye<Me.length;Ye++)if(Me[Ye]===Me[De])throw new Error(`Parameter ${Me[Ye]} is duplicated in path ${Te}`)}}}function Ne(se,j){for(const ae of j)if(!!ae.externalRoutes){for(const[fe,he]of Object.entries(ae.externalRoutes))if(!he.optional&&!se.has(he))throw new Error(`External route '${fe}' of the '${ae.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const ze=(0,W.CT)("app-context"),ke=({appContext:se,children:j})=>{const ae=(0,W.EI)({1:se});return r.createElement(ze.Provider,{value:ae,children:j})};function ve(se){return new Error(`Tried to access IdentityApi ${se} before app was loaded`)}function Ie(se){console.warn(`WARNING: Call to ${se} is deprecated and will break in the future`)}class Be{constructor(){_(this,"target");_(this,"waitForTarget");_(this,"resolveTarget",()=>{});this.waitForTarget=new Promise(j=>{this.resolveTarget=j})}setTarget(j){this.target=j,this.resolveTarget(j)}getUserId(){if(!this.target)throw ve("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ie("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw ve("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Ie("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(j=>j.getProfileInfo())}async getBackstageIdentity(){const j=await this.waitForTarget.then(ae=>ae.getBackstageIdentity());return j.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${j.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),j}async getCredentials(){return this.waitForTarget.then(j=>j.getCredentials())}async getIdToken(){return this.waitForTarget.then(j=>{if(!j.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Ie("getIdToken"),j.getIdToken()})}async signOut(){await this.waitForTarget.then(j=>j.signOut()),location.reload()}}var je=e(72164);function at(se,j,ae){if(se!==void 0){const he=ae.find(Te=>Te.id===se);if(he)return he}if(j){const he=ae.find(Te=>Te.variant==="dark");if(he)return he}const fe=ae.find(he=>he.variant==="light");return fe||ae[0]}const Tt=()=>{const se=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[j,ae]=(0,r.useState)(se.matches);return(0,r.useEffect)(()=>{const fe=he=>{ae(he.matches)};return se.addListener(fe),()=>{se.removeListener(fe)}},[se]),j};function _e({children:se}){const j=(0,S.useApi)(S.appThemeApiRef),ae=(0,je.Z)(j.activeThemeId$(),j.getActiveThemeId()),fe=Boolean(window.matchMedia)?Tt():!1,he=at(ae,fe,j.getInstalledThemes());if(!he)throw new Error("App has no themes");return r.createElement(he.Provider,{children:se})}var st=e(46611);class Qe{constructor(){_(this,"apis",[])}add(j,ae){return this.apis.push([j.id,ae]),ae}build(){return new et(new Map(this.apis))}}class et{static builder(){return new Qe}static from(j){return new et(new Map(j.map(([ae,fe])=>[ae.id,fe])))}static with(j,ae){return new et(new Map([[j.id,ae]]))}constructor(j){this.apis=j}with(j,ae){return new et(new Map([...this.apis,[j.id,ae]]))}get(j){return this.apis.get(j.id)}}function $t(se){const j=new Map;return se&&se({bind:(fe,he)=>{for(const[Te,Me]of Object.entries(he)){const De=fe[Te];if(!De)throw new Error(`Key ${Te} is not an existing external route`);if(!Me&&!De.optional)throw new Error(`External route ${Te} is required but was undefined`);Me&&j.set(De,Me)}}}),j}const jt=(0,r.createContext)({routeObjects:[]});function Ut(se){var ae;let{pathname:j}=new URL((ae=se.getOptionalString("app.baseUrl"))!=null?ae:"/","http://dummy.dev");return j=j.replace(/\/*$/,""),j}function xn(se,j,ae){var Ye;const fe=Boolean(se),he=(0,c.default)(se||(()=>Promise.resolve([])));let Te;if(fe&&he.loading){const{Progress:it}=j;Te=r.createElement(it,null)}else if(he.error){const{BootErrorPage:it}=j;Te=r.createElement(it,{step:"load-config",error:he.error})}const{ThemeProvider:Me=_e}=j;return Te?{node:r.createElement(f.ApiProvider,{apis:et.with(S.appThemeApiRef,ae)},r.createElement(Me,null,Te))}:{api:f.ConfigReader.fromConfigs((Ye=he.value)!=null?Ye:[])}}class Jt{constructor(j){this.app=j}getPlugins(){return this.app.getPlugins()}getSystemIcon(j){return this.app.getSystemIcon(j)}getComponents(){return this.app.getComponents()}}class vt{constructor(j){_(this,"apiHolder");_(this,"configApi");_(this,"apis");_(this,"icons");_(this,"plugins");_(this,"components");_(this,"themes");_(this,"configLoader");_(this,"defaultApis");_(this,"bindRoutes");_(this,"appIdentityProxy",new Be);_(this,"apiFactoryRegistry");var ae,fe,he,Te;this.apis=(ae=j.apis)!=null?ae:[],this.icons=j.icons,this.plugins=new Set((fe=j.plugins)!=null?fe:[]),this.components=j.components,this.themes=j.themes,this.configLoader=(he=j.configLoader)!=null?he:st.t,this.defaultApis=(Te=j.defaultApis)!=null?Te:[],this.bindRoutes=j.bindRoutes,this.apiFactoryRegistry=new m.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(j){return this.icons[j]}getComponents(){return this.components}getProvider(){const j=new Jt(this);let ae=!1;return({children:he})=>{const Te=(0,r.useMemo)(()=>f.AppThemeSelector.createWithStorage(this.themes),[]),{routing:Me,featureFlags:De,routeBindings:Ye}=(0,r.useMemo)(()=>{const tt=a({root:he,discoverers:[u,y],collectors:{routing:L,collectedPlugins:g,featureFlags:D}});return tt.collectedPlugins.forEach(Lt=>this.plugins.add(Lt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...tt,routeBindings:$t(this.bindRoutes)}},[he]);ae||(ae=!0,Se(Me.paths,Me.parents),Ne(Ye,this.plugins));const it=xn(this.configLoader,this.components,Te),Nt="api"in it;if(Nt){const{api:tt}=it;this.configApi=tt}if((0,r.useEffect)(()=>{if(Nt){const tt=this.getApiHolder().get(S.featureFlagsApiRef);for(const Lt of this.plugins.values())if("getFeatureFlags"in Lt)for(const Vt of Lt.getFeatureFlags())tt.registerFlag({name:Vt.name,pluginId:Lt.getId()});else for(const Vt of Lt.output())Vt.type==="feature-flag"&&tt.registerFlag({name:Vt.name,pluginId:Lt.getId()});for(const Lt of De)tt.registerFlag({name:Lt,pluginId:""})}},[Nt,it,De]),"node"in it)return it.node;const{ThemeProvider:Ft=_e}=this.components;return r.createElement(f.ApiProvider,{apis:this.getApiHolder()},r.createElement(ke,{appContext:j},r.createElement(Ft,null,r.createElement(xe,{routePaths:Me.paths,routeParents:Me.parents,routeObjects:Me.objects,routeBindings:Ye,basePath:Ut(it.api)},r.createElement(jt.Provider,{value:{routeObjects:Me.objects}},he)))))}}getRouter(){const{Router:j,SignInPage:ae}=this.components,fe=({component:Te,children:Me})=>{const[De,Ye]=(0,r.useState)();return De?(this.appIdentityProxy.setTarget(De),Me):r.createElement(Te,{onSignInSuccess:Ye})};return({children:Te})=>{const Me=(0,S.useApi)(S.configApiRef),De=`${Ut(Me)}/*`,{routeObjects:Ye}=(0,r.useContext)(jt);return ae?r.createElement(j,null,r.createElement(re,{routeObjects:Ye}),r.createElement(fe,{component:ae},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(j,null,r.createElement(re,{routeObjects:Ye}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:De,element:r.createElement(r.Fragment,null,Te)}))))}}getApiHolder(){if(this.apiHolder){for(const j of this.plugins)for(const ae of j.getApis())this.apiFactoryRegistry.get(ae.api)||this.apiFactoryRegistry.register("default",ae);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 j of this.defaultApis)this.apiFactoryRegistry.register("default",j);for(const j of this.plugins)for(const ae of j.getApis())if(!this.apiFactoryRegistry.register("default",ae))throw new Error(`Plugin ${j.getId()} tried to register duplicate or forbidden API factory for ${ae.api}`);for(const j of this.apis)if(!this.apiFactoryRegistry.register("app",j))throw new Error(`Duplicate or forbidden API factory for ${j.api} in app`);return m.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new m.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(j){const ae=new Set;for(const fe of j){const he=fe.getId();if(ae.has(he))throw new Error(`Duplicate plugin found '${he}'`);ae.add(he)}}}function un(se){return new vt(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 g=this.options.sessionScopes(u);return r(g,y)}getExtendedScope(u,y){const g=new Set(this.options.defaultScopes);if(u&&this.options.sessionScopes!==void 0){const v=this.options.sessionScopes(u);for(const b of v)g.add(b)}if(y)for(const v of y)g.add(v);return g}}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:g=new Set,sessionScopes:v,sessionShouldRefresh:b}=u;this.connector=y,this.sessionScopesFunc=v,this.sessionShouldRefreshFunc=b,this.helper=new t({sessionScopes:v,defaultScopes:g})}async getSession(u){if(this.helper.sessionExistsAndHasScope(this.currentSession,u.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const g=await this.collapsedSessionRefresh(),v=this.sessionScopesFunc(this.currentSession),b=this.sessionScopesFunc(g);return r(b,v)&&(this.currentSession=g),g}catch(g){if(u.optional)return;throw g}}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:g=new Set,sessionScopes:v}=u;this.connector=y,this.helper=new SessionScopeHelper({sessionScopes:v,defaultScopes:g})}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(g=>{var b;let v=g.props.path;return v===""?[]:(v=(b=v==null?void 0:v.replace(/\/\*$/,""))!=null?b:"/",[{path:v,element:g,children:g.props.children?[{path:v==="/"?"/":"/*",element:g.props.children}]:void 0}])}).sort((g,v)=>v.path.localeCompare(g.path)).map(g=>(g.path=g.path==="/"?"/":`${g.path}/*`,g)));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 P},CodeSnippet:function(){return Ue},Content:function(){return Wo},ContentHeader:function(){return _s},CreateButton:function(){return Ne},DependencyGraph:function(){return Lt},DependencyGraphTypes:function(){return r},EmptyState:function(){return We},ErrorPage:function(){return oi},ErrorPanel:function(){return gn},Header:function(){return Qo},HeaderIconLinkRow:function(){return Un},HeaderLabel:function(){return hi},HeaderTabs:function(){return Ho},InfoCard:function(){return Jn},ItemCardGrid:function(){return Ri},ItemCardHeader:function(){return Ei},Link:function(){return W},LogViewer:function(){return Wr},MissingAnnotationEmptyState:function(){return gt},OverflowTooltip:function(){return Tr},Page:function(){return qo},PageWithHeader:function(){return Ti},Progress:function(){return Pr},ResponseErrorPanel:function(){return pn},RoutedTabs:function(){return jo},Select:function(){return St},Sidebar:function(){return ka},SidebarContext:function(){return wr},SidebarDivider:function(){return cs},SidebarItem:function(){return Zo},SidebarPage:function(){return Ma},SidebarPinStateContext:function(){return gr},SubvalueCell:function(){return Ss},SupportButton:function(){return xa},Table:function(){return js},WarningPanel:function(){return Zt},sidebarConfig:function(){return Vn}});var r={};e.r(r),e.d(r,{Nm:function(){return ze},ht:function(){return Ie},LJ:function(){return ve}});var t=e(2784),c=e(36964),f=e(19928);function S(n){const[o,l]=useState([]),d=useApi(alertApiRef),{anchorOrigin:p={vertical:"top",horizontal:"center"}}=n;if(useEffect(()=>{const N=d.alert$().subscribe(Y=>l(H=>H.concat(Y)));return()=>{N.unsubscribe()}},[d]),o.length===0)return null;const[E]=o,O=()=>{l(N=>N.filter(Y=>Y!==E))};return React.createElement(Snackbar,{open:!0,anchorOrigin:p},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,p=i();let E={...d};return l||(E={backgroundColor:stringToColor(o||""),...d}),React.createElement(MaterialAvatar,{alt:o,src:l,className:p.avatar,style:E},o&&extractInitials(o))}var y=e(77277),g=e(86689),v=e(62833);const b=(0,m.Z)({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",height:1,width:1}},{name:"Link"}),L=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):""},W=t.forwardRef(({onClick:n,noTrack:o,...l},d)=>{const p=b(),E=(0,c.useAnalytics)(),O=String(l.to),N=D(l.children)||O,Y=L(O),H=Y&&!!/^https?:/.exec(O),te=X=>{n==null||n(X),o||E.captureEvent("click",N,{attributes:{to:O}})};return Y?t.createElement(g.Z,{ref:d,href:O,onClick:te,...H?{target:"_blank",rel:"noopener"}:{},...l},l.children,t.createElement("span",{className:p.visuallyHidden},", Opens in a new window")):t.createElement(g.Z,{ref:d,component:v.rU,onClick:te,...l})}),M=t.forwardRef((n,o)=>t.createElement(W,{ref:o,...n,color:"initial"})),P=t.forwardRef((n,o)=>t.createElement(y.Z,{ref:o,component:M,...n}));var B=e(60364),F=e(61837),$=e(80030),G=e(19353),Q=e(95074);function ce(n){const{text:o,tooltipDelay:l=1e3,tooltipText:d="Text copied to clipboard"}=n,p=(0,c.useApi)(c.errorApiRef),[E,O]=(0,t.useState)(!1),[{error:N},Y]=(0,Q.Z)();(0,t.useEffect)(()=>{N&&p.post(N)},[N,p]);const H=te=>{te.stopPropagation(),O(!0),Y(o)};return t.createElement(t.Fragment,null,t.createElement($.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:l,onClose:()=>O(!1),open:E},t.createElement(F.Z,{onClick:H},t.createElement(G.Z,null))))}var we=e(83229),xe=e(26639),de=e(39595);function Ue(n){const{text:o,language:l,showLineNumbers:d=!1,highlightedNumbers:p,customStyle:E,showCopyCodeButton:O=!1}=n,N=(0,B.Z)(),Y=N.palette.type==="dark"?xe.Z:de.Z,H=N.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(we.Z,{customStyle:E,language:l,style:Y,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:N.palette.textVerySubtle},lineProps:te=>p!=null&&p.includes(te)?{style:{backgroundColor:H}}:{}},o),O&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(ce,{text:o})))}var re=e(41156),Se=e(88188);function Ne(n){const{title:o,to:l}=n,d=(0,re.Z)(p=>p.breakpoints.down("xs"));return l?d?t.createElement(F.Z,{component:v.rU,color:"primary",title:o,size:"small",to:l},t.createElement(Se.Z,null)):t.createElement(y.Z,{component:v.rU,variant:"contained",color:"primary",to:l},o):null}var ze;(function(n){const o="TB";n.TOP_BOTTOM=o;const l="BT";n.BOTTOM_TOP=l;const d="LR";n.LEFT_RIGHT=d;const p="RL";n.RIGHT_LEFT=p})(ze||(ze={}));var ke;(function(n){const o="UL";n.UP_LEFT=o;const l="UR";n.UP_RIGHT=l;const d="DL";n.DOWN_LEFT=d;const p="DR";n.DOWN_RIGHT=p})(ke||(ke={}));var ve;(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})(ve||(ve={}));var Ie;(function(n){const o="l";n.LEFT=o;const l="r";n.RIGHT=l;const d="c";n.CENTER=d})(Ie||(Ie={}));var Be=e(13387),je=e(11105),at=e(97963),Tt=e(46506),_e=e.n(Tt),st=e(54073),Qe=e.n(st),et=e(10368);const $t=(0,m.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function jt({node:{id:n}}){const o=$t(),[l,d]=t.useState(0),[p,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!==p||X!==l)&&(d(X),E(te))}},[l,p]);const N=10,Y=l+N*2,H=p+N*2;return t.createElement("g",null,t.createElement("rect",{className:o.node,width:Y,height:H,rx:10}),t.createElement("text",{ref:O,className:o.text,y:H/2,x:Y/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const Ut="arrow-marker",xn="node",Jt="edge",vt="label",un=(0,et.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),se=n=>t.createElement(jt,{...n});function j({render:n=se,setNode:o,node:l}){const{width:d,height:p,x:E=0,y:O=0}=l,N=l,Y=un(),H=t.useRef(null);return t.useLayoutEffect(()=>{if(H.current){let{height:te,width:X}=H.current.getBBox();te=Math.round(te),X=Math.round(X),(te!==p||X!==d)&&o(l.id,{...l,height:te,width:X})}},[l,d,p,o]),t.createElement("g",{ref:H,"data-testid":xn,className:Y.node,transform:`translate(${E-d/2},${O-p/2})`},n({node:N}))}var ae=e(55876),fe=e(66481),he=e(19574),Te=e.n(he);const Me=(0,et.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function De({edge:{label:n}}){const o=Me();return t.createElement("text",{className:o.text,textAnchor:"middle"},n)}const Ye=(0,et.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"}),it=n=>t.createElement(De,{...n}),Nt=ae.Z().x(n=>n.x).y(n=>n.y).curve(fe.Z);function Ft({render:n=it,setEdge:o,id:l,edge:d}){const{x:p=0,y:E=0,width:O,height:N,points:Y}=d,H=d,te=Ye(),X=t.useRef(null);t.useLayoutEffect(()=>{if(X.current){let{height:pe,width:Ae}=X.current.getBBox();pe=Math.round(pe),Ae=Math.round(Ae),(pe!==N||Ae!==O)&&o(l,{...d,height:pe,width:Ae})}},[d,N,O,o,l]);let Ee="";if(Y){const pe=Y.filter(Ae=>Te()(Ae.x)&&Te()(Ae.y));Ee=Nt(pe)||""}return t.createElement(t.Fragment,null,Ee&&t.createElement("path",{"data-testid":Jt,className:te.path,markerEnd:`url(#${Ut})`,d:Ee}),H.label?t.createElement("g",{ref:X,"data-testid":vt,className:te.label,transform:`translate(${p},${E})`},n({edge:H})):null)}const tt="workspace";function Lt(n){var yr,aa;const{edges:o,nodes:l,renderNode:d,direction:p=ze.TOP_BOTTOM,align:E,nodeMargin:O=50,edgeMargin:N=10,rankMargin:Y=50,paddingX:H=0,paddingY:te=0,acyclicer:X,ranker:Ee=ve.NETWORK_SIMPLEX,labelPosition:pe=Ie.RIGHT,labelOffset:Ae=10,edgeRanks:ot=1,edgeWeight:Pt=1,renderLabel:Wt,defs:Yt,zoom:rt="enabled",...It}=n,Dt=(0,at.Z)(),[tn,Qn]=t.useState(100),[In,Ur]=t.useState(100),Ct=t.useRef(new(_e()).graphlib.Graph),[Xn,fo]=t.useState(((yr=Ct.current.graph())==null?void 0:yr.width)||0),[or,mo]=t.useState(((aa=Ct.current.graph())==null?void 0:aa.height)||0),[_r,eo]=t.useState([]),[ho,sn]=t.useState([]),Sn=Math.max(Xn,tn),Ln=Math.max(or,In),ar=t.useMemo(()=>Qe()(Gt=>{if(!Gt)return;const ln=je.Z(Gt),Ht=je.Z(Gt.getElementById(tt));function Mn(){ln.call(Be.sP().scaleExtent([1,10]).on("zoom",Gn=>{Gn.transform.x=Math.min(0,Math.max(Gn.transform.x,Sn-Sn*Gn.transform.k)),Gn.transform.y=Math.min(0,Math.max(Gn.transform.y,Ln-Ln*Gn.transform.k)),Ht.attr("transform",Gn.transform)}))}rt==="enabled"?Mn():rt==="enable-on-click"&&ln.on("click",()=>Mn());const{width:wn,height:to}=Gt.getBoundingClientRect();tn!==wn&&Qn(wn),In!==to&&Ur(to)},100),[In,tn,Sn,Ln,rt]),Qt=t.useCallback(()=>{const Gt=Ct.current.nodes(),ln=Ct.current.edges();Gt.forEach(Ht=>{l.some(wn=>wn.id===Ht)||Ct.current.removeNode(Ht)}),ln.forEach(Ht=>{o.some(wn=>wn.from===Ht.v&&wn.to===Ht.w)||Ct.current.removeEdge(Ht.v,Ht.w)}),l.forEach(Ht=>{const Mn=Ct.current.nodes().find(wn=>Ht.id===wn);if(Mn&&Ct.current.node(Mn)){const{width:wn,height:to,x:Gn,y:Wi}=Ct.current.node(Mn);Ct.current.setNode(Mn,{...Ht,width:wn,height:to,x:Gn,y:Wi})}else Ct.current.setNode(Ht.id,{...Ht,width:0,height:0})}),o.forEach(Ht=>{Ct.current.setEdge(Ht.from,Ht.to,{...Ht,label:Ht.label,width:0,height:0,labelpos:pe,labeloffset:Ae,weight:Pt,minlen:ot})})},[o,l,pe,Ae,Pt,ot]),Xt=t.useMemo(()=>Qe()(()=>{_e().layout(Ct.current);const{height:Gt,width:ln}=Ct.current.graph(),Ht=Math.max(0,Gt||0),Mn=Math.max(0,ln||0);fo(Mn),mo(Ht),eo(Ct.current.nodes()),sn(Ct.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(Ct.current.setGraph({rankdir:p,align:E,nodesep:O,edgesep:N,ranksep:Y,marginx:H,marginy:te,acyclicer:X,ranker:Ee}),Qt(),Xt(),Xt.cancel),[X,E,p,N,H,te,O,Y,Ee,Qt,Xt]);function pr(Gt,ln){return Ct.current.setNode(Gt,ln),Xt(),Ct.current}function sr(Gt,ln){return Ct.current.setEdge(Gt,ln),Xt(),Ct.current}return t.createElement("svg",{ref:ar,...It,width:"100%",height:Ln,viewBox:`0 0 ${Sn} ${Ln}`},t.createElement("defs",null,t.createElement("marker",{id:Ut,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"})),Yt),t.createElement("g",{id:tt},t.createElement("svg",{width:Xn,height:or,y:Ln/2-or/2,x:Sn/2-Xn/2,viewBox:`0 0 ${Xn} ${or}`},ho.map(Gt=>{const ln=Ct.current.edge(Gt);return ln?t.createElement(Ft,{key:`${Gt.v}-${Gt.w}`,id:Gt,setEdge:sr,render:Wt,edge:ln}):null}),_r.map(Gt=>{const ln=Ct.current.node(Gt);return ln?t.createElement(j,{key:Gt,setNode:pr,render:d,node:ln}):null}))))}var Vt=e(72779),mt=e.n(Vt);const hn=(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"}),dn=n=>{var pe;const{variant:o,message:l,id:d,fixed:p=!1}=n,E=hn(),N=useApi(storageApiRef).forBucket("notifications"),Y=(pe=N.snapshot("dismissedBanners").value)!=null?pe:[],[H,te]=useState(new Set(Y)),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 Ee=()=>{N.set("dismissedBanners",[...H,d])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!H.has(d),classes:{root:classNames(E.root,!p&&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:Ee},React.createElement(Close,{className:E.icon}))]}))};var bt=e(60905),Je=e(90436),oe=e.p+"static/missingAnnotation.67f79e98..svg",U=e.p+"static/noInformation.4b426325..svg",R=e.p+"static/createComponent.975d1e1e..svg",V=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"}),ge=({missing:n})=>{const o=ie();switch(n){case"field":return t.createElement("img",{src:oe,className:o.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:U,alt:"no Information",className:o.generalImg});case"content":return t.createElement("img",{src:R,alt:"create Component",className:o.generalImg});case"data":return t.createElement("img",{src:V,alt:"no Build",className:o.generalImg});default:return null}},Re=(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 We(n){const{title:o,description:l,missing:d,action:p}=n,E=Re();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},p))),t.createElement(bt.Z,{item:!0,xs:12,md:6,className:E.imageContainer},t.createElement(ge,{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`,ct=(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}=n,l=ct(),d=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(We,{missing:"field",title:"Missing Annotation",description:d,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:l.code},t.createElement(Ue,{text:Xe.replace("ANNOTATION",o),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(y.Z,{color:"primary",component:W,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var ht=e(11776),Ke=e(38402),Ot=e(49378),qe=e(41128),ut=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),xt=(0,m.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:o})=>rn(o,n)}})),dt=({severity:n})=>{const o=xt({severity:n});return t.createElement(pt.Z,{classes:o})},Et=({severity:n})=>{const o=xt({severity:n});return t.createElement(yt.Z,{classes:o})},At=(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"}),Rt=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function Zt(n){const{severity:o="warning",title:l,message:d,children:p,defaultExpanded:E}=n,O=At({severity:o}),N=Rt(o)+(l?`: ${l}`:"");return t.createElement(ut.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(dt,{severity:o}),t.createElement(Je.Z,{className:O.summaryText,variant:"subtitle1"},N)),(d||p)&&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)),p&&t.createElement(bt.Z,{item:!0,xs:12,className:O.details},p))))}const zt=(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 p=zt();return t.createElement(ht.Z,{dense:!0},t.createElement(Ke.Z,{alignItems:"flex-start"},t.createElement(Ot.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),t.createElement(ce,{text:n})),t.createElement(Ke.Z,{alignItems:"flex-start"},t.createElement(Ot.Z,{classes:{secondary:p.text},primary:"Message",secondary:o}),t.createElement(ce,{text:o})),l&&t.createElement(Ke.Z,{alignItems:"flex-start"},t.createElement(Ot.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:l}),t.createElement(ce,{text:l})),d)};function gn(n){const{title:o,error:l,defaultExpanded:d,children:p}=n;return t.createElement(Zt,{severity:"error",title:o!=null?o:l.message,defaultExpanded:d},t.createElement(on,{error:l.name,message:l.message,stack:l.stack,children:p}))}var Tn=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 pn(n){var Ae;const{title:o,error:l,defaultExpanded:d}=n,p=_t();if(l.name!=="ResponseError")return t.createElement(gn,{title:o!=null?o:l.message,defaultExpanded:d,error:l});const{body:E,cause:O}=l,{request:N,response:Y}=E,H=`${Y.statusCode}: ${O.name}`,te=N&&`${N.method} ${N.url}`,X=O.message.replace(/\\n/g,`
|
|
12
|
+
`),Ee=(Ae=O.stack)==null?void 0:Ae.replace(/\\n/g,`
|
|
13
|
+
`),pe=JSON.stringify(E,void 0,2);return t.createElement(gn,{title:o!=null?o:l.message,defaultExpanded:d,error:{name:H,message:X,stack:Ee}},te&&t.createElement(Ke.Z,{alignItems:"flex-start"},t.createElement(Ot.Z,{classes:{secondary:p.text},primary:"Request",secondary:N?`${te}`:void 0}),t.createElement(ce,{text:te})),t.createElement(t.Fragment,null,t.createElement(Tn.Z,{component:"li",className:p.divider}),t.createElement(Ke.Z,{alignItems:"flex-start"},t.createElement(Ot.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(Ue,{language:"json",text:pe,showCopyCodeButton:!0})))}var qn=e(47093);function zn(n){const o=document.createElement("div");return o.setAttribute("id",n),o}function Wn(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function $n(n){const o=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),E=p||zn(n);return p||Wn(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 C(){const[n,o]=useState(()=>{const d=localStorage.getItem(h);return d?JSON.parse(d):{}}),l=useCallback((d,p)=>{const E=localStorage.getItem(h),N={...E?JSON.parse(E):{},[d]:p};o(N),localStorage.setItem(h,JSON.stringify(N))},[]);return{states:n,setState:l}}function w(n){const{states:o,setState:l}=C(),d=useCallback(()=>{l(n,!0)},[l,n]);return{seen:o[n]===!0,markSeen:d}}function K(n){const{seen:o,markSeen:l}=w(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:p}=n,{show:E,hide:O}=useShowCallout(o),N=usePortal("core.callout"),Y=useRef(null),[H,te]=useState(),X=ne(),Ee=useCallback(()=>{if(Y.current){const pe=Y.current.getBoundingClientRect(),Ae=Math.max(pe.width,pe.height),ot=800,Pt=pe.x-(Ae-pe.width)/2-ot,Wt=pe.y-(Ae-pe.height)/2-ot,Yt=Ae+2*ot,rt=450,It=pe.x+pe.width/2-rt,Dt=pe.y-(Ae-pe.height)/2+Ae+20;te({dotLeft:Pt,dotTop:Wt,dotSize:Yt,borderWidth:ot,textTop:Dt,textLeft:It,textWidth:rt})}},[]);return useEffect(()=>(window.addEventListener("resize",Ee),window.addEventListener("scroll",Ee),()=>{window.removeEventListener("resize",Ee),window.removeEventListener("scroll",Ee)}),[Ee]),useLayoutEffect(Ee,[Y.current,Ee]),E?React.createElement(React.Fragment,null,React.createElement("div",{className:X.featureWrapper,ref:Y},p),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:H==null?void 0:H.dotLeft,top:H==null?void 0:H.dotTop,width:H==null?void 0:H.dotSize,height:H==null?void 0:H.dotSize,borderWidth:H==null?void 0:H.borderWidth},onClick:O,onKeyDown:O,role:"button",tabIndex:0},React.createElement("div",{className:X.pulseCircle})),React.createElement("div",{className:X.text,"data-testid":"text",style:{left:H==null?void 0:H.textLeft,top:H==null?void 0:H.textTop,width:H==null?void 0:H.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},l),React.createElement(Typography,null,d))))),N)):React.createElement(React.Fragment,null,p)}var Oe=e(35292);const nt=(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:p,onClick:E,title:O}){const N=nt();return o?t.createElement(g.Z,{title:O,className:mt()(N.link,N.disabled),underline:"none"},d,t.createElement("span",{className:N.label},p)):t.createElement(g.Z,{title:O,className:mt()(N.link,N[n]),to:l,component:W,onClick:E},d,t.createElement("span",{className:N.label},p))}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 Un(n){const{links:o}=n,l=Mt();return t.createElement("nav",{className:l.links},o.map((d,p)=>t.createElement(Bt,{key:p+1,...d})))}const Kn=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
|
+
`},Nr=100,ir=10,Zr=(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:Nr,height:`calc(100% + ${ir}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-ir,background:`linear-gradient(90deg, ${Kn(n.palette.type)})`},fadeRight:{right:-ir,background:`linear-gradient(270deg, ${Kn(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 p=n.current;if(!p){d([0,0]);return}const E=()=>{const O=p.scrollLeft,N=p.scrollWidth-p.offsetWidth-p.scrollLeft;d([O,N])};return E(),p.addEventListener("scroll",E),window.addEventListener("resize",E),()=>{p.removeEventListener("scroll",E),window.removeEventListener("resize",E)}},[n]),[o,l]}function Nn(n,o,l){const[d,p]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const E=performance.now(),O=requestAnimationFrame(N=>{if(!n.current)return;const Y=N-E,H=Math.abs(d)*Y/o,X=Math.max(l,H)*Math.sign(d);n.current.scrollBy({left:X});const Ee=d-X;Math.sign(d)!==Math.sign(Ee)?p(0):p(Ee)});return()=>cancelAnimationFrame(O)},[n,d,o,l]),p}function Dn(n){const{scrollStep:o=100,scrollSpeed:l=50,minScrollDistance:d=5,children:p,...E}=n,O=Zr(n),N=React.useRef(),[Y,H]=zr(N),te=Nn(N,l,d),X=Ee=>{!N.current||te(Ee?o:-o)};return React.createElement("div",{...E,className:O.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:O.container,ref:N},p),React.createElement("div",{className:classNames(O.fade,O.fadeLeft,{[O.fadeHidden]:Y===0})}),React.createElement("div",{className:classNames(O.fade,O.fadeRight,{[O.fadeHidden]:H===0})}),Y>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>X(!1),className:classNames(O.button,O.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),H>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>X(!0),className:classNames(O.button,O.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const kn=(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=kn(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 Er=(0,t.lazy)(()=>Promise.all([e.e(3860),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function Wr(n){const{Progress:o}=(0,c.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(o,null)},t.createElement(Er,{...n}))}const Yn=(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"}),vr={code:({inline:n,className:o,children:l,...d})=>{const p=String(l).replace(/\n+$/,""),E=/language-(\w+)/.exec(o||"");return!n&&E?t.createElement(Ue,{language:E[1],text:p}):t.createElement("code",{className:o,...d},l)}};function Hr(n){const{content:o,dialect:l="gfm",linkTarget:d}=n,p=Yn();return React.createElement(ReactMarkdown,{remarkPlugins:l==="gfm"?[gfm]:[],className:p.markdown,children:o,components:vr,linkTarget:d})}var _n=e(10179);const yn=(0,m.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),er=({request:n,busy:o,setBusy:l})=>{const d=yn(),[p,E]=useState(),O=async()=>{l(!0);try{await n.trigger()}catch(Y){E(isError(Y)?Y.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:p&&React.createElement(Typography,{color:"error"},p)}),React.createElement(Button,{color:"primary",variant:"contained",onClick:O},"Log in"))};var tr=null;const nr=(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 Ar(n){const o=nr(),[l,d]=useState(!1),p=useApi(oauthRequestApiRef),E=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),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 Rr=e(15277),Sr=e.n(Rr),cr=e(29862);const Cr=(0,m.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Tr(n){var O;const[o,l]=(0,t.useState)(!1),d=(0,cr.t)(),p=Cr(),E=N=>{d()&&l(N)};return t.createElement($.ZP,{title:(O=n.title)!=null?O:n.text||"",placement:n.placement,disableHoverListener:!o},t.createElement(Sr(),{text:n.text,line:n.line,onToggled:E,containerClassName:p.container}))}var br=e(67358);function Pr(n){const[o,l]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>l(!0),250);return()=>clearTimeout(d)},[]),o?t.createElement(br.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Ir=e(94339),ur=e(14503),Lr=e(24579),dr=e(32552),en=e(15459),bn=e(95544),Or=e(27597);const En=(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 Hn(n){const{link:o,title:l,onClick:d}=n,p=En();return t.createElement("div",null,t.createElement(Tn.Z,null),t.createElement(W,{to:o,onClick:d,underline:"none"},t.createElement(bn.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(bn.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(Je.Z,null,t.createElement("strong",null,l))),t.createElement(Or.Z,{className:p.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(P,{to:o.href,variant:"contained"},o.name)},xr=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(gn,{title:"Something Went Wrong",error:d},t.createElement(jn,{slackChannel:o})):l}},fr=(0,m.Z)(n=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:n.spacing(2,2,2,2.5)},headerTitle:{fontWeight:700},headerSubheader:{paddingTop:n.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),Dr=(0,en.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(ur.Z),rr={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 Jn(n){const{title:o,subheader:l,divider:d=!0,deepLink:p,slackChannel:E,errorBoundaryProps:O,variant:N,children:Y,headerStyle:H,headerProps:te,icon:X,action:Ee,actionsClassName:pe,actions:Ae,cardClassName:ot,actionsTopRight:Pt,className:Wt,noPadding:Yt,titleTypographyProps:rt}=n,It=fr();let Dt={},tn={};N&&N.split(/[\s]+/g).forEach(Ct=>{Dt={...Dt,...rr.card[Ct]},tn={...tn,...rr.cardContent[Ct]}});const Qn=()=>t.createElement("div",{className:It.headerSubheader},l&&t.createElement("div",{className:It.subheader},l),X),In=O||(E?{slackChannel:E}:{});return t.createElement(Ir.Z,{style:Dt,className:Wt},t.createElement(xr,{...In},o&&t.createElement(dr.Z,{classes:{root:It.header,title:It.headerTitle,subheader:It.headerSubheader,avatar:It.headerAvatar,action:It.headerAction,content:It.headerContent},title:o,subheader:Qn(),action:Ee,style:{...H},titleTypographyProps:rt,...te}),Pt&&t.createElement(Dr,null,Pt),d&&t.createElement(Tn.Z,null),t.createElement(Lr.Z,{className:mt()(ot,{[It.noPadding]:Yt}),style:tn},Y),Ae&&t.createElement(ur.Z,{className:pe},Ae),p&&t.createElement(Hn,{...p})))}var jr=e(39307);const Vr=(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"}),mr={fractional:!0,inverse:!1,unit:"%",max:100},I=({palette:n,value:o,inverse:l,max:d})=>{if(isNaN(o))return"#ddd";const p=d||mr.max,E=l?p-o:o;return E<p/3?n.status.error:E<p*(2/3)?n.status.warning:n.status.ok};function q(n){const[o,l]=useState(null),{getColor:d=I}=n,p=Vr(n),{palette:E}=useTheme(),{value:O,fractional:N,inverse:Y,unit:H,max:te,description:X}={...mr,...n},Ee=N?Math.round(O*te):O,pe=te!==100?Math.round(O):Ee,[Ae,ot]=useState(!1);return useEffect(()=>{const Pt=o,Wt=()=>ot(!0),Yt=()=>ot(!1);return Pt&&X?(Pt.addEventListener("mouseenter",Wt),Pt.addEventListener("mouseleave",Yt),()=>{Pt.removeEventListener("mouseenter",Wt),Pt.removeEventListener("mouseleave",Yt)}):()=>{ot(!1)}},[X,o]),React.createElement("div",{ref:l,className:p.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Ee,strokeWidth:12,trailWidth:12,strokeColor:d({palette:E,value:pe,inverse:Y,max:te}),className:p.circle}),X&&Ae?React.createElement("div",{className:p.description},X):React.createElement("div",{className:p.overlay},isNaN(O)?"N/A":`${pe}${H}`))}const ue=(0,m.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function be(n){const o=ue(n),{title:l,subheader:d,progress:p,inverse:E,deepLink:O,description:N,icon:Y,variant:H,getColor:te}=n,X={inverse:E,description:N,getColor:te,value:p};return React.createElement("div",{className:o.root},React.createElement(InfoCard,{title:l,subheader:d,deepLink:O,variant:H,icon:Y},React.createElement(Gauge,{...X})))}function He(n){const{value:o,getColor:l=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(o))return null;let p=Math.round(o*100*100)/100;p>100&&(p=100);const E=l({palette:d,value:p,inverse:!1,max:100});return React.createElement(Tooltip,{title:`${p}%`},React.createElement("span",null,React.createElement(Line,{percent:p,strokeWidth:4,trailWidth:4,strokeColor:E})))}var lt=e(21324),A=e(7089),T=e(1292),x=e(42494),z=e(74603),k=e(56939),J=e(12231),le=e(73698),ye=e(72379);const Pe=(0,m.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Ce=()=>{const n=Pe();return t.createElement(ye.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 Fe=(0,m.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var ft=()=>{const n=Fe();return t.createElement(ye.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 Ge=(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"})(z.Z),Ze=(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 St(n){const{multiple:o,items:l,label:d,placeholder:p,selected:E,onChange:O,triggerReset:N,native:Y=!1,disabled:H=!1}=n,te=Ze(),[X,Ee]=(0,t.useState)(E||(o?[]:"")),[pe,Ae]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Ee(o?[]:"")},[N,o]),(0,t.useEffect)(()=>{E!==void 0&&Ee(E)},[E]);const ot=rt=>{Ee(rt.target.value),O(rt.target.value)},Pt=rt=>{if(H){rt.preventDefault();return}Ae(It=>o&&!(rt.target instanceof HTMLElement)?!0:!It)},Wt=()=>{Ae(!1)},Yt=rt=>()=>{const It=X.filter(Dt=>Dt!==rt);Ee(It),O(It)};return t.createElement("div",{className:te.root},t.createElement(T.Z,{onClickAway:Wt},t.createElement(x.Z,{className:te.formControl},t.createElement(k.Z,{className:te.formLabel},d),t.createElement(le.Z,{value:X,native:Y,disabled:H,"data-testid":"select",displayEmpty:!0,multiple:o,onChange:ot,onClick:Pt,open:pe,input:t.createElement(Ge,null),label:d,tabIndex:0,renderValue:rt=>{var It;return o&&X.length!==0?t.createElement("div",{className:te.chips},rt.map(Dt=>{var tn,Qn;return t.createElement(A.Z,{key:(tn=l.find(In=>In.value===Dt))==null?void 0:tn.value,label:(Qn=l.find(In=>In.value===Dt))==null?void 0:Qn.label,clickable:!0,onDelete:Yt(Dt),className:te.chip})})):t.createElement(Je.Z,null,X.length===0?p||"":(It=l.find(Dt=>Dt.value===rt))==null?void 0:It.label)},IconComponent:()=>pe?t.createElement(ft,null):t.createElement(Ce,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!o&&t.createElement(J.Z,{value:[]},p),Y?l&&l.map(rt=>t.createElement("option",{value:rt.value,key:rt.value},rt.label)):l&&l.map(rt=>t.createElement(J.Z,{key:rt.value,value:rt.value},o&&t.createElement(lt.Z,{color:"primary",checked:X.includes(rt.value)||!1,className:te.checkbox}),rt.label))))))}const wt=()=>{},Fn=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:wt,stepHistory:[],setStepHistory:wt,onStepChange:wt});function Kt(n){const{children:o,elevated:l,onStepChange:d,activeStep:p=0}=n,[E,O]=useState(p),[N,Y]=useState([0]);useEffect(()=>{O(p)},[p]);const H=[];let te;return Children.forEach(o,X=>{isValidElement(X)&&(X.props.end?te=X:H.push(X))}),React.createElement(React.Fragment,null,React.createElement(Fn.Provider,{value:{stepIndex:E,setStepIndex:O,stepHistory:N,setStepHistory:Y,onStepChange:d,stepperLength:Children.count(o)}},React.createElement(MuiStepper,{activeStep:E,orientation:"vertical",elevation:l?2:0},H)),E>=Children.count(o)-1&&te)}const an=(0,m.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),fn=({text:n,handleClick:o})=>React.createElement(Button,{onClick:o},n||"Reset"),vn=({text:n,handleClick:o,disabled:l,last:d,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:l,"data-testid":`nextButton-${p}`,onClick:o},n||(d?"Finish":"Next")),hr=({text:n,handleClick:o,disabled:l,stepIndex:d})=>React.createElement(Button,{onClick:o,"data-testid":`backButton-${d}`,disabled:l},n||"Back"),Fr=({actions:n={},children:o})=>{const l=an(),{stepperLength:d,stepIndex:p,setStepIndex:E,stepHistory:O,setStepHistory:N,onStepChange:Y}=useContext(VerticalStepperContext),H=(pe,Ae)=>{Ae&&Ae(),Y&&Y(p,pe),E(pe)},te=()=>{const pe=n.nextStep?n.nextStep(p,d-1):p+1;H(pe,n.onNext),N([...O,pe])},X=()=>{O.pop(),H(O[O.length-1],n.onBack),N([...O])},Ee=()=>{H(0,n.onRestart),N([0])};return React.createElement("div",{className:l.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(hr,{text:n.backText,handleClick:X,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(vn,{text:n.nextText,handleClick:te,disabled:!!d&&p>=d||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(fn,{text:n.restartText,handleClick:Ee,stepIndex:p}),o)},Gr=(0,m.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function An(n){const{title:o,children:l,end:d,actions:p,...E}=n,O=Gr();return d?React.createElement("div",{className:O.end},React.createElement(Typography,{variant:"h6"},o),l,React.createElement(SimpleStepperFooter,{actions:{...p||{},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:p})))}const kt=(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 Br(n){const o=kt(n);return React.createElement("span",{className:classNames(o.status,o.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function no(n){const o=kt(n);return React.createElement("span",{className:classNames(o.status,o.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Vi(n){const o=kt(n);return React.createElement("span",{className:classNames(o.status,o.error),"aria-label":"Status error","aria-hidden":"true",...n})}function Gi(n){const o=kt(n);return React.createElement("span",{className:classNames(o.status,o.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function Ki(n){const o=kt(n);return React.createElement("span",{className:classNames(o.status,o.running),"aria-label":"Status running","aria-hidden":"true",...n})}function ki(n){const o=kt(n);return React.createElement("span",{className:classNames(o.status,o.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var Yi=e(74600),go=e(15584);const ia=n=>(0,a.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),la={root:{border:"0",verticalAlign:"top"}},ca=n=>(0,a.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),ua=n=>(0,a.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),da=(0,en.Z)(ia,{name:"BackstageMetadataTableTitleCell"})(go.Z),fa=(0,en.Z)(la,{name:"BackstageMetadataTableCell"})(go.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(da,null,n),React.createElement(fa,{colSpan:n?1:2,...l},o)),po=(0,en.Z)(ca,{name:"BackstageMetadataTableList"})(({classes:n,children:o})=>t.createElement("ul",{className:n.root},o)),Xi=(0,en.Z)(ua,{name:"BackstageMetadataTableListItem"})(({classes:n,children:o})=>t.createElement("li",{className:n.root},o)),yo=(0,a.Z)({root:{margin:"0 0",listStyleType:"none"}}),ma=n=>(0,a.Z)({root:{...yo.root,paddingLeft:n.spacing(1)}}),Eo=(0,en.Z)(yo,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:o})=>t.createElement(po,{classes:n},o)),vo=(0,en.Z)(ma,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:o})=>t.createElement(po,{classes:n},o));function ha(n,o){const l=n.map((d,p)=>React.createElement(MetadataListItem,{key:p},ro(d)));return o?React.createElement(vo,null,l):React.createElement(Eo,null,l)}function ga(n,o,l){const d=Object.keys(n).map(p=>{const E=ro(n[p],!0),O=l&&l.titleFormat?l.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${O}: `,E)});return o?React.createElement(vo,null,d):React.createElement(Eo,null,d)}function ro(n,o,l){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?ga(n,o,l):Array.isArray(n)?ha(n,l):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const pa=({value:n,options:o})=>React.createElement(Fragment,null,ro(n,o)),ya=({title:n,value:o,options:l})=>React.createElement(MetadataTableItem,{title:l&&l.titleFormat?l.titleFormat(n):startCase(n)},React.createElement(pa,{value:o,options:l}));function Ea(n,o){return Object.keys(n).map(l=>React.createElement(ya,{key:l,title:l,value:n[l],options:o}))}function qi(n){const{metadata:o,dense:l=!0,options:d}=n,p=Ea(o,d||{});return React.createElement(MetadataTable,{dense:l},p)}var va=e(49429),Aa=e(86136),Ao=e(79784),Mr=e(76635),Ra=e(19126),Ro=e.n(Ra);function Sa(n){return qs.stringify(n,{strictNullHandling:!0})}function So(n){return qs.parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Co(n,o){return So(n)[o]}function Ca(n,o,l){const d={...So(n),[o]:l};return Sa(d)}function _i(n,o=250){const[l,d]=useSearchParams(),p=l.toString(),[E,O]=useState(Co(p,n));return useEffect(()=>{const N=Co(p,n);O(Y=>isEqual(N,Y)?Y:N)},[p,O,n]),useDebouncedEffect(()=>{const N=Ca(p,n,E);p!==N&&d(N,{replace:!0})},[d,E,p,n],o),[E,O]}const Ta={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 To(){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 p;return{title:d.getString("title"),icon:d.getOptionalString("icon"),links:((p=d.getOptionalConfigArray("links"))!=null?p:[]).flatMap(E=>({url:E.getString("url"),title:E.getString("title")}))}})}:Ta}var ba=e(80079);function Bn(n,o){const d=(0,c.useApp)().getSystemIcon(n);return d?t.createElement(d,{...o}):t.createElement(ba.Z,{...o})}function el(n){return Bn("brokenImage",n)}function tl(n){return Bn("catalog",n)}function nl(n){return Bn("chat",n)}function rl(n){return Bn("dashboard",n)}function ol(n){return Bn("docs",n)}function al(n){return Bn("email",n)}function sl(n){return Bn("github",n)}function il(n){return Bn("group",n)}function Kr(n){return Bn("help",n)}function ll(n){return Bn("user",n)}function cl(n){return Bn("warning",n)}const Pa=(0,m.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Ia=({icon:n})=>{var d;const o=(0,c.useApp)(),l=n&&(d=o.getSystemIcon(n))!=null?d:Kr;return t.createElement(l,null)},La=({link:n})=>{var o;return t.createElement(W,{to:n.url},(o=n.title)!=null?o:n.url)},Oa=({item:n})=>{var o;return t.createElement(Ke.Z,null,t.createElement(Aa.Z,null,t.createElement(Ia,{icon:n.icon})),t.createElement(Ot.Z,{primary:n.title,secondary:(o=n.links)==null?void 0:o.reduce((l,d,p)=>[...l,p>0&&t.createElement("br",{key:p}),t.createElement(La,{link:d,key:d.url})],[])}))};function xa(n){const{title:o,children:l}=n,{items:d}=To(),[p,E]=(0,t.useState)(!1),[O,N]=(0,t.useState)(null),Y=Pa(),H=(0,re.Z)(Ee=>Ee.breakpoints.down("sm")),te=Ee=>{N(Ee.currentTarget),E(!0)},X=()=>{E(!1)};return t.createElement(t.Fragment,null,t.createElement(bn.Z,{display:"flex",ml:1},H?t.createElement(F.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(Ao.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:O,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:X},t.createElement(ht.Z,{className:Y.popoverList},o&&t.createElement(Ke.Z,{alignItems:"flex-start"},t.createElement(Je.Z,{variant:"subtitle1"},o)),t.Children.map(l,(Ee,pe)=>t.createElement(Ke.Z,{alignItems:"flex-start",key:`child-${pe}`},Ee)),d&&d.map((Ee,pe)=>t.createElement(Oa,{item:Ee,key:`item-${pe}`}))),t.createElement(va.Z,null,t.createElement(y.Z,{color:"primary",onClick:X},"Close"))))}var oo=e(18671),Pn=e(10289);const kr=72,bo=24,Po=18,Vn={drawerWidthClosed:kr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:kr,iconSize:kr-bo*2,iconPadding:bo,selectedIndicatorWidth:3,userBadgePadding:Po,userBadgeDiameter:kr-Po*2,mobileSidebarHeight:56},Da=n=>({...Vn,...n,iconContainerWidth:Vn.drawerWidthClosed,iconSize:Vn.drawerWidthClosed-Vn.iconPadding*2,userBadgeDiameter:Vn.drawerWidthClosed-Vn.userBadgePadding*2}),Io={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:Vn.defaultOpenDelayMs+200},Fa=n=>({...Io,...n}),ul="@backstage/core/sidebar-intro-dismissed",wr=(0,t.createContext)({isOpen:!1,setOpen:()=>{}}),Zn=(0,t.createContext)({sidebarConfig:Vn,submenuConfig:Io}),Lo=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var Yr;(function(n){const o="sidebarPinState";n.SIDEBAR_PIN_STATE=o})(Yr||(Yr={}));const Oo={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))}},Ba=(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"}),gr=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1}),xo=(0,t.createContext)({content:{contentRef:void 0}});function Ma(n){const[o,l]=(0,t.useState)(()=>Oo.getSidebarPinState()),{sidebarConfig:d}=(0,t.useContext)(Zn),p=(0,t.useRef)(null),E=(0,t.useMemo)(()=>({content:{contentRef:p}}),[p]);(0,t.useEffect)(()=>{Oo.setSidebarPinState(o)},[o]);const O=(0,re.Z)(H=>H.breakpoints.down("xs"),{noSsr:!0}),N=()=>l(!o),Y=Ba({isPinned:o,sidebarConfig:d});return t.createElement(gr.Provider,{value:{isPinned:o,toggleSidebarPinState:N,isMobile:O}},t.createElement(xo.Provider,{value:E},t.createElement("div",{className:Y.root},n.children)))}function Do(){const{content:n}=(0,t.useContext)(xo);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 wa=e(50023),$a=e(4190),Ua=e(87685),Na=e(44882),Za=e(57998);const za=(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"}})),Wa=n=>{const{to:o,label:l,icon:d,value:p}=n,{sidebarConfig:E}=(0,t.useContext)(Zn),O=za({sidebarConfig:E}),N=(0,Pn.TH)(),{selectedMenuItemIndex:Y,setSelectedMenuItemIndex:H}=(0,t.useContext)(Mo),te=(Ee,pe)=>{H(pe===Y?-1:pe)},X=p===Y&&Y>=0||p!==Y&&!(Y>=0)&&o===N.pathname;return t.createElement(Za.Z,{label:l,icon:d,component:W,to:o||N.pathname,onChange:te,value:p,selected:X,classes:O})},Fo=n=>{const{children:o,to:l,label:d,icon:p,value:E}=n,{isMobile:O}=(0,t.useContext)(gr);return O?t.createElement(Wa,{to:l,label:d,icon:p,value:E}):t.createElement(t.Fragment,null,o)},Bo=(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`})})),Ha=n=>(0,Mr.orderBy)(n,({props:{priority:o}})=>Number.isInteger(o)?o:-1,"desc"),ja=t.createElement(Fo).type,Va=({children:n,label:o="Menu",open:l,onClose:d})=>{const{sidebarConfig:p}=(0,t.useContext)(Zn),E=Bo({sidebarConfig:p});return t.createElement($a.ZP,{anchor:"bottom",open:l,onClose:d,ModalProps:{BackdropProps:{classes:{root:E.marginMobileSidebar}}},classes:{root:E.marginMobileSidebar,paperAnchorBottom:E.overlay}},t.createElement(bn.Z,{className:E.overlayHeader},t.createElement(Je.Z,{variant:"h3"},o),t.createElement(F.Z,{onClick:d,classes:{root:E.overlayHeaderClose}},t.createElement(Ua.Z,null))),t.createElement(bn.Z,{component:"nav"},n))},Mo=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),Ga=n=>{const{sidebarConfig:o}=(0,t.useContext)(Zn),{children:l}=n,d=Bo({sidebarConfig:o}),p=(0,Pn.TH)(),[E,O]=(0,t.useState)(-1);(0,t.useEffect)(()=>{O(-1)},[p.pathname]);let N=(0,c.useElementFilter)(l,H=>H.getElements().filter(te=>te.type===ja));if(l)N.length?N=Ha(N):N.push(t.createElement(Fo,{key:"default_menu",icon:t.createElement(Na.Z,null)},l));else return null;const Y=E>=0&&!N[E].props.to;return t.createElement(wr.Provider,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(Mo.Provider,{value:{selectedMenuItemIndex:E,setSelectedMenuItemIndex:O}},t.createElement(Va,{label:N[E]&&N[E].props.label,open:Y,onClose:()=>O(-1)},N[E]&&N[E].props.children),t.createElement(wa.Z,{className:d.root,"data-testid":"mobile-sidebar-root",component:"nav"},N)))},wo=(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 Rn;(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"})(Rn||(Rn={}));const Ka=n=>{const{sidebarConfig:o}=(0,t.useContext)(Zn),{openDelayMs:l=o.defaultOpenDelayMs,closeDelayMs:d=o.defaultCloseDelayMs,disableExpandOnHover:p,children:E}=n,O=wo({sidebarConfig:o}),N=(0,re.Z)(Wt=>Wt.breakpoints.down("md"),{noSsr:!0}),[Y,H]=(0,t.useState)(Rn.Closed),te=(0,t.useRef)(),{isPinned:X,toggleSidebarPinState:Ee}=(0,t.useContext)(gr),pe=()=>{X||p||(te.current&&(clearTimeout(te.current),te.current=void 0),Y!==Rn.Open&&!N&&(te.current=window.setTimeout(()=>{te.current=void 0,H(Rn.Open)},l),H(Rn.Idle)))},Ae=()=>{X||p||(te.current&&(clearTimeout(te.current),te.current=void 0),Y===Rn.Idle?H(Rn.Closed):Y===Rn.Open&&(te.current=window.setTimeout(()=>{te.current=void 0,H(Rn.Closed)},d)))},ot=Y===Rn.Open&&!N||X,Pt=Wt=>{Wt?(H(Rn.Open),Ee()):(H(Rn.Closed),Ee())};return t.createElement("nav",{style:{},"aria-label":"sidebar nav"},t.createElement(Ya,null),t.createElement(wr.Provider,{value:{isOpen:ot,setOpen:Pt}},t.createElement("div",{className:O.root,"data-testid":"sidebar-root",onMouseEnter:p?()=>{}:pe,onFocus:p?()=>{}:pe,onMouseLeave:p?()=>{}:Ae,onBlur:p?()=>{}:Ae},t.createElement("div",{className:mt()(O.drawer,{[O.drawerOpen]:ot})},E))))},ka=n=>{var Y,H;const o=Da((Y=n.sidebarOptions)!=null?Y:{}),l=Fa((H=n.submenuOptions)!=null?H:{}),{children:d,disableExpandOnHover:p,openDelayMs:E,closeDelayMs:O}=n,{isMobile:N}=(0,t.useContext)(gr);return N?t.createElement(Ga,null,d):t.createElement(Zn.Provider,{value:{sidebarConfig:o,submenuConfig:l}},t.createElement(Ka,{openDelayMs:E,closeDelayMs:O,disableExpandOnHover:p},d))};function Ya(){const{sidebarConfig:n}=(0,t.useContext)(Zn),{focusContent:o,contentRef:l}=Do(),d=wo({sidebarConfig:n});return l!=null&&l.current?t.createElement(y.Z,{onClick:o,variant:"contained",className:mt()(d.visuallyHidden)},"Skip to content"):null}function $o(n,o){const l=new URLSearchParams(o.search).toString(),d=Ro().parse(l),p=new URLSearchParams(n.search).toString(),E=Ro().parse(p);return(0,Mr.isEqual)(o.pathname,n.pathname)&&(0,Mr.isMatch)(E,d)}const Ja=(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:p}=n,E=Ja(),{setIsHoveredOn:O}=useContext(SidebarItemWithSubmenuContext),N=()=>{O(!1)},Y=useResolvedPath(l!=null?l:""),H=useLocation();let te=isLocationMatch(H,Y);const[X,Ee]=useState(!1),pe=()=>{Ee(!X)};return p!==void 0?(p.some(Ae=>{const ot=resolvePath(Ae.to);return te=isLocationMatch(H,ot),te}),React.createElement("div",{className:E.itemContainer},React.createElement(Tooltip,{title:o,enterDelay:500,enterNextDelay:500},React.createElement("button",{onClick:pe,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}))),p&&X&&React.createElement("div",{className:E.dropdown},p.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:Pt=>Pt.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"}),Xa=n=>{const{isOpen:o}=(0,t.useContext)(wr),{sidebarConfig:l,submenuConfig:d}=(0,t.useContext)(Zn),p=o?l.drawerWidthOpen:l.drawerWidthClosed,E=Qa({left:p,submenuConfig:d}),{isHoveredOn:O}=(0,t.useContext)(Lo),[N,Y]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{Y(O)},[O]),t.createElement("div",{className:mt()(E.drawer,{[E.drawerOpen]:N})},t.createElement(Je.Z,{variant:"h5",className:E.title},n.title),n.children)};var Jr=e(76600),qa=e(26739),_a=e(98989),es=e(59797),ts=e(83543);const ns=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),fl=()=>{const n=ns();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 rs=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),hl=()=>{const n=rs();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 os=n=>(0,m.Z)(o=>{var l,d,p,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=(p=o.palette.navigation.navItem)==null?void 0:p.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)(()=>os(n),[n])()}const as=(n,o)=>(0,c.useElementFilter)(n.props.children,l=>{let d=!1;return l.getElements().forEach(({props:{to:p,dropdownItems:E}})=>{if(!d){if(E!=null&&E.length){E.forEach(({to:O})=>d=d||$o(o,(0,Pn.i3)(O)));return}p&&(d=$o(o,(0,Pn.i3)(p)))}}),d},[o.pathname]);function Uo(n){return n.to===void 0}const ss=t.createElement(Xa).type,is=t.forwardRef(function({to:o,end:l,style:d,className:p,activeStyle:E,caseSensitive:O,activeClassName:N="active","aria-current":Y="page",...H},te){let{pathname:X}=(0,Pn.TH)(),{pathname:Ee}=(0,Pn.WU)(o);O||(X=X.toLocaleLowerCase("en-US"),Ee=Ee.toLocaleLowerCase("en-US"));let pe=X===Ee;!pe&&!l&&(pe=X.startsWith(`${Ee}/`));const Ae=pe?Y:void 0;return t.createElement(v.rU,{...H,to:o,ref:te,"aria-current":Ae,style:{...d,...pe?E:void 0},className:mt()([p,pe?N:void 0])})}),No=(0,t.forwardRef)((n,o)=>{const{icon:l,text:d,hasNotifications:p=!1,disableHighlight:E=!1,onClick:O,children:N,className:Y,...H}=n,{sidebarConfig:te}=(0,t.useContext)(Zn),X=Qr(te),{isOpen:Ee}=(0,t.useContext)(wr),pe=t.createElement(qa.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:mt()({[X.closedItemIcon]:!Ee})},t.createElement(l,{fontSize:"small"})),Ae=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:X.iconContainer},pe),d&&t.createElement(Je.Z,{variant:"subtitle2",className:X.label},d),t.createElement("div",{className:X.secondaryAction},N)),ot=Ee?Ae:pe,Pt={onClick:O,className:mt()(Y,X.root,Ee?X.open:X.closed,Uo(n)&&X.buttonItem,{[X.highlightable]:!E})};return Uo(n)?t.createElement("button",{"aria-label":d,...Pt,ref:o},ot):t.createElement(is,{...Pt,activeClassName:X.selected,to:n.to?n.to:"",ref:o,"aria-label":d||n.to,...H},ot)}),ls=({children:n,...o})=>{const{sidebarConfig:l}=(0,t.useContext)(Zn),d=Qr(l),[p,E]=(0,t.useState)(!1),O=(0,Pn.TH)(),N=as(n,O),Y=(0,re.Z)(Ee=>Ee.breakpoints.down("sm")),H=()=>{E(!0)},te=()=>{E(!1)},X=()=>Y?p?t.createElement(es.Z,{fontSize:"small",className:d.submenuArrow}):t.createElement(ts.Z,{fontSize:"small",className:d.submenuArrow}):!p&&t.createElement(_a.Z,{fontSize:"small",className:d.submenuArrow});return t.createElement(Lo.Provider,{value:{isHoveredOn:p,setIsHoveredOn:E}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:te,onTouchStart:p?te:H,onMouseEnter:H,className:mt()(p&&d.highlighted)},t.createElement(No,{className:N?d.selected:"",...o},X()),p&&n))},Zo=(0,t.forwardRef)((n,o)=>{const[l]=(0,c.useElementFilter)(n.children,d=>d.getElements().filter(p=>p.type===ss));return l?t.createElement(ls,{...n},l):t.createElement(No,{...n,ref:o})});function pl(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),[l,d]=useState(""),p=Qr(o),E=n.icon?n.icon:SearchIcon,O=()=>{n.onSearch(l),d("")},N=X=>{X.key==="Enter"&&(X.preventDefault(),O())},Y=X=>{d(X.target.value)},H=X=>{X.preventDefault(),X.stopPropagation()},te=X=>{O(),X.preventDefault()};return React.createElement("div",{className:p.searchRoot},React.createElement(Zo,{icon:E,to:n.to,onClick:te,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:l,onClick:H,onChange:Y,onKeyDown:N,className:p.searchContainer,InputProps:{disableUnderline:!0,className:p.searchField},inputProps:{className:p.searchFieldHTMLInput}})))}const yl=(0,Jr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),El=(0,Jr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),cs=(0,Jr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),us=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=us(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)))},ds=(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 fs(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),l=ds({sidebarConfig:o}),{text:d,onClose:p}=n,E=()=>p();return React.createElement("div",{className:l.introCard},React.createElement(Typography,{variant:"subtitle2"},d),React.createElement("div",{className:l.introDismiss},React.createElement(Link,{component:"button",onClick:E,underline:"none",className:l.introDismissLink},React.createElement(CloseIcon,{className:l.introDismissIcon}),React.createElement(Typography,{component:"span",className:l.introDismissText},"Dismiss"))))}const zo=n=>{const{text:o,onDismiss:l}=n,[d,p]=useState(!1),E=()=>{p(!0)};return React.createElement(Collapse,{in:!d,onExited:l},React.createElement(fs,{text:o,onClose:E}))},ms=null,hs="And your recently viewed plugins will pop up here!";function Rl(n){const{isOpen:o}=useContext(SidebarContext),l={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,p]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:E,recentlyViewedItemsDismissed:O}=d!=null?d:{},N=()=>{p(H=>({...l,...H,starredItemsDismissed:!0}))},Y=()=>{p(H=>({...l,...H,recentlyViewedItemsDismissed:!0}))};return o?React.createElement(React.Fragment,null,!E&&React.createElement(React.Fragment,null,React.createElement(zo,{text:ms,onDismiss:N}),React.createElement(SidebarDivider,null)),!O&&React.createElement(zo,{text:hs,onDismiss:Y})):null}const gs=(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 Wo(n){const{className:o,stretch:l,noPadding:d,children:p,...E}=n,{contentRef:O}=Do(),N=gs();return t.createElement("article",{ref:O,tabIndex:-1,...E,className:mt()(N.root,o,{[N.stretch]:l,[N.noPadding]:d})},p)}var ps=e(6487),ys=e(99152);const Es=(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 Ho(n){const{tabs:o,onChange:l,selectedIndex:d}=n,[p,E]=(0,t.useState)(d!=null?d:0),O=Es(),N=(Y,H)=>{d===void 0&&E(H),l&&l(H)};return(0,t.useEffect)(()=>{d!==void 0&&E(d)},[d]),t.createElement("div",{className:O.tabsWrapper},t.createElement(ys.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:N,value:p},o.map((Y,H)=>t.createElement(ps.Z,{...Y.tabProps,"data-testid":`header-tab-${H}`,label:Y.label,key:Y.id,value:H,className:O.defaultTab,classes:{selected:O.selected,root:O.tabRoot}}))))}function vs(n){var N,Y,H;const o=(0,Pn.UO)(),d=n.map(({path:te,children:X})=>({caseSensitive:!1,path:`${te}/*`,element:X})).sort((te,X)=>X.path.replace(/\/\*$/,"").localeCompare(te.path.replace(/\/\*$/,""))),p=(N=(0,Pn.V$)(d))!=null?N:n[0].children,[E]=(Y=(0,Pn.fp)(d,`/${o["*"]}`))!=null?Y:[],O=E?n.findIndex(te=>`${te.path}/*`===E.route.path):0;return{index:O===-1?0:O,element:p,route:(H=n[O])!=null?H:n[0]}}function jo(n){const{routes:o}=n,l=(0,Pn.s0)(),{index:d,route:p,element:E}=vs(o),O=(0,t.useMemo)(()=>o.map(Y=>({id:Y.path,label:Y.title,tabProps:Y.tabProps})),[o]),N=Y=>l(o[Y].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(Ho,{tabs:O,selectedIndex:d,onChange:N}),t.createElement(Wo,null,t.createElement(oo.q,{title:p.title}),E))}const ao=()=>null;(0,c.attachComponentData)(ao,"core.gatherMountPoints",!0);function Vo(n){const o=t.createElement(ao,{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 Vo(l.props.children);if(l.type!==o)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:p,children:E,tabProps:O}=l.props;return[{path:d,title:p,children:E,tabProps:O}]})}function As(n){const o=Vo(n.children);return t.createElement(jo,{routes:o})}As.Route=ao;const Rs=(0,m.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function Ss(n){const{value:o,subvalue:l}=n,d=Rs();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},o),t.createElement("div",{className:d.subvalue},l))}var Cs=e(21070),Ts=e(90324),bs=e(98281),Ps=e(48049),Go=e(51209),Ko=e(33375),Is=e(44233),Ls=e(27604),so=e(36444),Os=e(37971),xs=e(59709),Ds=e(17373),Fs=e(3702),Bs=e(93111),Xr=e(67222);const Ms=(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"}),ws=n=>{var Y;const o=Ms(),{onChangeFilters:l}=n,[d,p]=(0,t.useState)({...n.selectedFilters}),[E,O]=(0,t.useState)(!1),N=()=>{p({}),O(H=>!H)};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},((Y=n.filters)==null?void 0:Y.length)&&n.filters.map(H=>t.createElement(St,{triggerReset:E,key:H.element.label,...H.element,selected:d[H.element.label],onChange:te=>p({...d,[H.element.label]:te})}))))},$s={Add:(0,t.forwardRef)((n,o)=>t.createElement(Cs.Z,{...n,ref:o})),Check:(0,t.forwardRef)((n,o)=>t.createElement(bs.Z,{...n,ref:o})),Clear:(0,t.forwardRef)((n,o)=>t.createElement(Ko.Z,{...n,ref:o})),Delete:(0,t.forwardRef)((n,o)=>t.createElement(Is.Z,{...n,ref:o})),DetailPanel:(0,t.forwardRef)((n,o)=>t.createElement(Go.Z,{...n,ref:o})),Edit:(0,t.forwardRef)((n,o)=>t.createElement(Ls.Z,{...n,ref:o})),Export:(0,t.forwardRef)((n,o)=>t.createElement(Fs.Z,{...n,ref:o})),Filter:(0,t.forwardRef)((n,o)=>t.createElement(so.Z,{...n,ref:o})),FirstPage:(0,t.forwardRef)((n,o)=>t.createElement(Os.Z,{...n,ref:o})),LastPage:(0,t.forwardRef)((n,o)=>t.createElement(xs.Z,{...n,ref:o})),NextPage:(0,t.forwardRef)((n,o)=>t.createElement(Go.Z,{...n,ref:o})),PreviousPage:(0,t.forwardRef)((n,o)=>t.createElement(Ps.Z,{...n,ref:o})),ResetSearch:(0,t.forwardRef)((n,o)=>t.createElement(Ko.Z,{...n,ref:o})),Search:(0,t.forwardRef)((n,o)=>t.createElement(so.Z,{...n,ref:o})),SortArrow:(0,t.forwardRef)((n,o)=>t.createElement(Ts.Z,{...n,ref:o})),ThirdStateCheck:(0,t.forwardRef)((n,o)=>t.createElement(Ds.Z,{...n,ref:o})),ViewColumn:(0,t.forwardRef)((n,o)=>t.createElement(Bs.Z,{...n,ref:o}))};function ko(n,o){const l=o.split(".");let d=n[l[0]];for(let p=1;p<l.length;++p){if(d===void 0)return d;const E=l[p];d=d[E]}return d}const Us=(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$),Yo=(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),Ns=(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 zs(n,o){return n.map(l=>{const d={};let p=l.cellStyle||{};if(l.highlight)if(d.color=o.palette.textContrast,typeof p=="object")p.fontWeight=o.typography.fontWeightBold;else{const E=p;p=(O,N,Y)=>({...E(O,N,Y),fontWeight:o.typography.fontWeightBold})}return{...l,headerStyle:d,cellStyle:p}})}function Ws(n,o){return(0,Mr.transform)(n,(l,d,p)=>{(0,Mr.isEqual)(d,o[p])||(l[p]=d)})}const Jo={search:"",filtersOpen:!1,filters:{}};function Hs(n){const{toolbarRef:o,setSearch:l,hasFilters:d,selectedFiltersLength:p,toggleFilters:E}=n,O=Ns(),N=(0,t.useCallback)(Y=>{n.onSearchChanged(Y),l(Y)},[n,l]);return d?t.createElement("div",{className:O.root},t.createElement("div",{className:O.root},t.createElement(F.Z,{onClick:E,"aria-label":"filter list"},t.createElement(so.Z,null)),t.createElement(Je.Z,{className:O.title},"Filters (",p,")")),t.createElement(Yo,{...n,ref:o,onSearchChanged:N})):t.createElement(Yo,{...n,ref:o,onSearchChanged:N})}function js(n){const{data:o,columns:l,options:d,title:p,subtitle:E,filters:O,initialState:N,emptyContent:Y,onStateChange:H,...te}=n,X=Zs(),Ee=(0,B.Z)(),pe={...Jo,...N},[Ae,ot]=(0,t.useState)(pe.filtersOpen),Pt=(0,t.useCallback)(()=>ot(sn=>!sn),[ot]),[Wt,Yt]=(0,t.useState)(0),[rt,It]=(0,t.useState)(o),[Dt,tn]=(0,t.useState)(pe.filters),Qn=zs(l,Ee),[In,Ur]=(0,t.useState)(pe.search);(0,t.useEffect)(()=>{if(H){const sn=Ws({search:In,filtersOpen:Ae,filters:Dt},Jo);H(sn)}},[In,Ae,Dt,H]);const Ct={headerStyle:{textTransform:"uppercase"}},Xn=(0,t.useCallback)(sn=>{var Sn;return(Sn=l.find(Ln=>Ln.title===sn))==null?void 0:Sn.field},[l]);(0,t.useEffect)(()=>{if(typeof o=="function")return;if(!Dt){It(o);return}const sn=Object.values(Dt);if(o&&sn.flat().length){const Sn=o.filter(Ln=>!!Object.entries(Dt).filter(([,ar])=>!!ar.length).every(([ar,Qt])=>{const Xt=ko(Ln,Xn(ar));return Array.isArray(Xt)&&Array.isArray(Qt)?Xt.some(pr=>Qt.includes(pr)):Array.isArray(Xt)?Xt.includes(Qt):Array.isArray(Qt)?Qt.includes(Xt):Xt===Qt}));It(Sn)}else It(o);Yt(sn.flat().length)},[o,Dt,Xn]);const fo=(sn,Sn)=>{const Ln=Qt=>{const Xt=new Set,pr=sr=>{sr!=null&&Xt.add(sr)};return Sn&&Sn.forEach(sr=>{const yr=ko(sr,Xn(Qt));Array.isArray(yr)?yr.forEach(pr):pr(yr)}),Xt},ar=Qt=>({placeholder:"All results",label:Qt.column,multiple:Qt.type==="multiple-select",items:[...Ln(Qt.column)].sort().map(Xt=>({label:Xt,value:Xt}))});return sn.map(Qt=>({type:Qt.type,element:ar(Qt)}))},or=!!(O!=null&&O.length),mo=(0,t.useCallback)(sn=>t.createElement(Hs,{setSearch:Ur,hasFilters:or,selectedFiltersLength:Wt,toggleFilters:Pt,...sn}),[Pt,or,Wt,Ur]),_r=typeof o!="function"&&o.length===0,eo=l.length,ho=(0,t.useCallback)(sn=>Y&&_r?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:eo},Y))):t.createElement(Xr.os,{...sn}),[_r,Y,eo]);return t.createElement("div",{className:X.root},Ae&&o&&typeof o!="function"&&(O==null?void 0:O.length)&&t.createElement(ws,{filters:fo(O,o),selectedFilters:Dt,onChangeFilters:tn}),t.createElement(Xr.ZP,{components:{Header:Us,Toolbar:mo,Body:ho},options:{...Ct,...d},columns:Qn,icons:$s,title:t.createElement(t.Fragment,null,t.createElement(Je.Z,{variant:"h5",component:"h3"},p),E&&t.createElement(Je.Z,{color:"textSecondary",variant:"body1"},E)),data:typeof o=="function"?o:rt,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...te}))}const Sl=n=>{const{children:o,value:l,index:d,...p}=n;return React.createElement("div",{role:"tabpanel",hidden:l!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...p},l===d&&React.createElement(Box,{p:3},o))},Vs=(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=Vs(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)},Gs=(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=>Gs(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,...p}=n;return React.createElement(Tab,{classes:o,disableRipple:!0,...p})},ks=(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=ks(n);return React.createElement(Tabs,{classes:o,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},Ys=(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=Ys(),[d,p]=useState([0,0]),[E,O]=useState(0),[N,Y]=useState(0),[H,te]=useState([[]]),X=useRef(),{width:Ee}=useWindowSize(),pe=(Yt,rt)=>{p([E,rt])},Ae=()=>{O(E-1)},ot=()=>{O(E+1)},Pt=()=>E+1<H.length;useEffect(()=>{const rt=E===0?1:2,It=X.current.offsetWidth-20-rt*30,Dt=d[0]*N+d[1],tn=Math.floor(It/170);Y(tn),te(chunkArray(o,tn)),p([Math.floor(Dt/tn),Dt%tn])},[Ee,o]);const Wt=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:Wt,onChange:pe,selectionFollowsFocus:!0},E!==0&&React.createElement(StyledIcon,{onClick:Ae,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),H[E].map((Yt,rt)=>React.createElement(StyledTab,{value:rt,isFirstIndex:rt===0,isFirstNav:E===0,key:rt,icon:Yt.icon||void 0,label:Yt.label||void 0})),Pt()&&React.createElement(StyledIcon,{isNext:!0,onClick:ot,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Wt!==!1?H[E].map((Yt,rt)=>React.createElement(TabPanel,{key:rt,value:rt,index:Wt},Yt.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},H[d[0]][d[1]].content))}var Il=e(44311);function Js(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:Js(n.data,o)})):null}const Qs=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"}),Xs=({title:n="Unknown page",className:o})=>t.createElement(Je.Z,{variant:"h4",component:"h2",className:o,"data-testid":"header-title"},n);function _s(n){const{description:o,title:l,titleComponent:d=void 0,children:p,textAlign:E="left"}=n,O=Qs({textAlign:E})(),N=d||t.createElement(Xs,{title:l,className:O.title});return t.createElement(t.Fragment,null,t.createElement(oo.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},p)))}var ei=e.p+"static/mic-drop.fe3ef4d0..svg";const ti=(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"}),ni=()=>{const n=ti();return t.createElement("img",{src:ei,className:n.micDrop,alt:"Girl dropping mic from her hands"})},ri=(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 oi(n){const{status:o,statusMessage:l,additionalInfo:d,supportUrl:p}=n,E=ri(),O=(0,Pn.s0)(),N=To();return t.createElement(bt.Z,{container:!0,spacing:0,className:E.container},t.createElement(ni,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(W,{to:"#","data-testid":"go-back-link",onClick:()=>O(-1)},"Go back"),"... or please"," ",t.createElement(W,{to:p||N.url},"contact support")," if you think this is a bug.")))}var ai=e(16173);const si=(0,en.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(Je.Z),io=(0,en.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(bn.Z);function ii(n){const{children:o,...l}=n,[d,p]=t.useState(null),E=t.Children.toArray(o),[O,N,...Y]=E,H=Y.length?Y.pop():E[E.length-1],te=E.length>3,X=Ae=>{p(Ae.currentTarget)},Ee=()=>{p(null)},pe=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(ai.Z,{"aria-label":"breadcrumb",...l},E.length>1&&t.createElement(io,{clone:!0},O),E.length>2&&t.createElement(io,{clone:!0},N),te&&t.createElement(si,{onClick:X},"..."),t.createElement(bn.Z,{style:{fontStyle:"italic"}},H)),t.createElement(Ao.ZP,{open:pe,anchorEl:d,onClose:Ee,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(ht.Z,null,Y.map((Ae,ot)=>t.createElement(Ke.Z,{key:ot,button:!0},t.createElement(io,{clone:!0},Ae))))))}const li=(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"}),ci=({type:n,typeLink:o,classes:l,pageTitle:d})=>n?o?t.createElement(ii,{className:l.breadcrumb},t.createElement(W,{to:o},n),t.createElement(Je.Z,null,d)):t.createElement(Je.Z,{className:l.type},n):null,ui=({pageTitle:n,classes:o,tooltip:l})=>{const d=t.createElement(Je.Z,{className:o.title,variant:"h1"},n);return l?t.createElement($.ZP,{title:l,placement:"top-start"},d):d},di=({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:p,title:E,tooltip:O,type:N,typeLink:Y}=n,H=li(),X=(0,c.useApi)(c.configApiRef).getOptionalString("app.title")||"Backstage",Ee=l||E,pe=E||l,Ae=`${Ee} | %s | ${X}`,ot=`${Ee} | ${X}`;return t.createElement(t.Fragment,null,t.createElement(oo.q,{titleTemplate:Ae,defaultTitle:ot}),t.createElement("header",{style:d,className:H.header},t.createElement(bn.Z,{className:H.leftItemsBox},t.createElement(ci,{classes:H,type:N,typeLink:Y,pageTitle:pe}),t.createElement(ui,{classes:H,pageTitle:pe,tooltip:O}),t.createElement(di,{classes:H,subtitle:p})),t.createElement(bt.Z,{container:!0,className:H.rightItemsBox,spacing:4},o)))}const fi=(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"}),mi=({value:n,className:o})=>t.createElement(Je.Z,{className:o},n);function hi(n){const{label:o,value:l,url:d}=n,p=fi(),E=t.createElement(mi,{className:p.value,value:l||"<Unknown>"});return t.createElement(bt.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(Je.Z,{className:p.label},o),d?t.createElement(W,{to:d},E):E))}const gi={hour:"2-digit",minute:"2-digit"};function Xo(n){const o=new Date,l=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const p=n.getConfigArray("homepage.clocks");for(const E of p)if(E.has("label")&&E.has("timezone")){let O=E.getString("label");const N={timeZone:E.getString("timezone"),...gi};try{new Date().toLocaleString(l,N)}catch{console.warn(`The timezone ${N.timeZone} is invalid. Defaulting to GMT`),N.timeZone="GMT",O="GMT"}const Y=o.toLocaleTimeString(l,N);d.push({time:Y,label:O})}return d}function Ol(n){const o=useApi(configApiRef),l=[],[d,p]=React.useState(l);return React.useEffect(()=>{p(Xo(o));const E=setInterval(()=>{p(Xo(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 pi=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"}}),yi=(0,m.Z)(pi,{name:"BackstageItemCardHeader"});function Ei(n){const{title:o,subtitle:l,children:d}=n,p=yi(n);return t.createElement("div",{className:p.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:p,subtitle:E,label:O,onClick:N,href:Y}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:E||p})),React.createElement(CardContent,null,l!=null&&l.length?React.createElement(Box,null,l.map((H,te)=>React.createElement(Chip,{size:"small",label:H,key:te}))):null,o),React.createElement(CardActions,null,!Y&&React.createElement(Button,{to:"#",onClick:N,color:"primary"},O),Y&&React.createElement(Button,{to:Y,color:"primary"},O)))}const vi=n=>(0,a.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),Ai=(0,m.Z)(vi,{name:"BackstageItemCardGrid"});function Ri(n){const{children:o,...l}=n,d=Ai(l);return t.createElement("div",{className:d.root,...l},o)}var Si=e(41547);const Ci=(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 qo(n){const{themeId:o,children:l}=n,{isMobile:d}=(0,t.useContext)(gr),p=Ci({isMobile:d});return t.createElement(Si.Z,{theme:E=>({...E,page:E.getPageTheme({themeId:o})})},t.createElement("main",{className:p.root},l))}function Ti(n){const{themeId:o,children:l,...d}=n;return t.createElement(qo,{themeId:o},t.createElement(Qo,{...d}),l)}var mn=e(30195);const Dl=mn.z.object({providerInfo:mn.z.object({}).catchall(mn.z.unknown()).optional(),profile:mn.z.object({email:mn.z.string().optional(),displayName:mn.z.string().optional(),picture:mn.z.string().optional()}),backstageIdentity:mn.z.object({token:mn.z.string(),identity:mn.z.object({type:mn.z.literal("user"),userEntityRef:mn.z.string(),ownershipEntityRefs:mn.z.array(mn.z.string())})})}),_o={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function bi(n){const o=new Date(Date.now()+_o.defaultTokenExpiryMillis);if(!n)return o;const[l,d,p]=n.split("."),E=JSON.parse(atob(d));return typeof E.exp!="number"?o:new Date(E.exp*1e3-_o.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:bi(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:p}]=useAsync(async()=>{const E=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:o});await E.start(),n.onSignInSuccess(E)});return useMountEffect(p),l==="loading"?React.createElement(Progress,null):d?React.createElement(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:d}):null},Pi=(0,m.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),lo=({children:n})=>{const o=Pi();return t.createElement(bt.Z,{component:"li",item:!0,classes:o},n)};class co{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 Ii(n){const[o,l,d]=n.split(".");return JSON.parse(atob(l))}class uo{constructor(o){this.result=o}getUserId(){return this.result.userId}static fromResult(o){return new uo(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 p=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:p,ownershipEntityRefs:[p]}}const{sub:l,ent:d}=Ii(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 $r{constructor(o,l,d){_(this,"profilePromise");this.identity=o,this.authApi=l,this.profile=d}static createGuest(){return new co}static fromLegacy(o){return uo.fromResult(o)}static create(o){return new $r(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 Li={Component:({config:n,onSignInSuccess:o})=>{const{apiRef:l,title:d,message:p}=n,E=(0,c.useApi)(l),O=(0,c.useApi)(c.errorApiRef),N=async()=>{try{const Y=await E.getBackstageIdentity({instantPopup:!0});if(!Y)throw new Error(`The ${d} provider is not configured to support sign-in`);const H=await E.getProfile();o($r.create({identity:Y.identity,profile:H,authApi:E}))}catch(Y){O.post(new _n.SP("Login failed",Y))}};return t.createElement(lo,null,t.createElement(Jn,{variant:"fullHeight",title:d,actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:N},"Sign In")},t.createElement(Je.Z,{variant:"body1"},p)))},loader:async(n,o)=>{const l=n.get(o),d=await l.getBackstageIdentity({optional:!0});if(!d)return;const p=await l.getProfile();return $r.create({identity:d.identity,profile:p,authApi:l})}},Oi={Component:({onSignInSuccess:n})=>t.createElement(lo,null,t.createElement(Jn,{title:"Guest",variant:"fullHeight",actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:()=>n(new co)},"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 co};var xi=e(63955),ea=e(86619),ta=e(74828),Di=e(45455),Fi=e.n(Di);const Bi=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Mi=(0,m.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),na=n=>{const{ref:o,...l}=n;return{inputRef:o,...l}},wi={Component:({onSignInSuccess:n})=>{const o=Mi(),{register:l,handleSubmit:d,formState:p}=(0,xi.cI)({mode:"onChange"}),{errors:E}=p,O=({userId:N})=>{n($r.fromLegacy({userId:N,profile:{email:`${N}@example.com`}}))};return t.createElement(lo,null,t.createElement(Jn,{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(x.Z,null,t.createElement(ea.Z,{...na(l("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(E.userId)}),E.userId&&t.createElement(ta.Z,{error:!0},E.userId.message)),t.createElement(x.Z,null,t.createElement(ea.Z,{...na(l("idToken",{required:!1,validate:N=>!N||Bi.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(ta.Z,{error:!0},E.idToken.message)),t.createElement(y.Z,{type:"submit",color:"primary",variant:"outlined",className:o.button,disabled:!(p!=null&&p.isDirty)||!Fi()(E)},"Continue"))))},loader:async()=>{}},qr="@backstage/core:SignInPage:provider",ra={guest:Oi,custom:wi,common:Li};function oa(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 oa(d,l),l[d]={components:ra[d],id:d},l;const{id:p}=d;return oa(p,l),l[p]={components:ra.common,id:p,config:d},l},{})}const Wl=(n,o)=>{const l=useApi(errorApiRef),d=useApiHolder(),[p,E]=useState(!0),O=useCallback(Y=>{o(IdentityApiSignOutProxy.from({identityApi:Y,signOut:async()=>{var H;localStorage.removeItem(qr),await((H=Y.signOut)==null?void 0:H.call(Y))}}))},[o]);useLayoutEffect(()=>{var X;if(!p)return;const Y=localStorage.getItem(qr);if(Y===null){E(!1);return}const H=n[Y];if(!H){E(!1);return}let te=!1;return H.components.loader(d,(X=H.config)==null?void 0:X.apiRef).then(Ee=>{te||(Ee?O(Ee):E(!1))}).catch(Ee=>{te||(localStorage.removeItem(qr),l.post(Ee),E(!1))}),()=>{te=!0}},[p,l,o,d,n,O]);const N=useMemo(()=>Object.keys(n).map(Y=>{const H=n[Y],{Component:te}=H.components,X=Ee=>{localStorage.setItem(qr,H.id),O(Ee)};return React.createElement(te,{key:H.id,config:H.config,onSignInSuccess:X})}),[n,O]);return[p,N]},$i=({onSignInSuccess:n,providers:o=[],title:l,align:d="left"})=>{const p=useApi(configApiRef),E=useStyles(),O=getSignInProviders(o),[N,Y]=useSignInProviders(O,n);return N?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:p.getString("app.title")}),React.createElement(Content,null,l&&React.createElement(ContentHeader,{title:l,textAlign:d}),React.createElement(Grid,{container:!0,justifyContent:d==="center"?d:"flex-start",spacing:2,component:"ul",classes:E},Y)))},Ui=({provider:n,auto:o,onSignInSuccess:l})=>{const d=useStyles(),p=useApi(n.apiRef),E=useApi(configApiRef),[O,N]=useState(),[Y,H]=useState(!1),te=async({checkExisting:X,showPopup:Ee})=>{try{let pe;if(X&&(pe=await p.getBackstageIdentity({optional:!0})),!pe&&(Ee||o)&&(H(!0),pe=await p.getBackstageIdentity({instantPopup:!0}),!pe))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!pe){H(!0);return}const Ae=await p.getProfile();l(UserIdentity.create({identity:pe.identity,authApi:p,profile:Ae}))}catch(pe){N(pe),H(!0)}};return useMountEffect(()=>te({checkExisting:!0})),Y?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(Ui,{...n}):React.createElement($i,{...n})}const Ni=(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"})(dr.Z);function jl(n){const{slackChannel:o,errorBoundaryProps:l,children:d,title:p,deepLink:E,value:O,onChange:N}=n,Y=Ni(),[H,te]=useState(0),X=N||((Ae,ot)=>te(ot));let Ee;O?React.Children.map(d,Ae=>{React.isValidElement(Ae)&&(Ae==null?void 0:Ae.props.value)===O&&(Ee=Ae==null?void 0:Ae.props.children)}):React.Children.map(d,(Ae,ot)=>{React.isValidElement(Ae)&&ot===H&&(Ee=Ae==null?void 0:Ae.props.children)});const pe=l||(o?{slackChannel:o}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...pe},p&&React.createElement(Zi,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:Y,value:O||H,onChange:X},d),React.createElement(Divider,null),React.createElement(CardContent,null,Ee),E&&React.createElement(BottomLink,{...E})))}const zi=(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=zi();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,g={...f(),...i},v=(0,r.EI)({1:g});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:g}={}){try{this.analyticsApi.captureEvent({action:i,subject:u,value:y,attributes:g,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 g=y();return g.setContext(i),g}},39135:function(ee,s,e){"use strict";e.d(s,{CL:function(){return M},sM:function(){return t},$v:function(){return g},v_:function(){return v},hg:function(){return b},uB:function(){return y},bq:function(){return u},Ds:function(){return L},NW:function(){return D},VE:function(){return W},W0:function(){return P},gP:function(){return B},F4:function(){return f},ux:function(){return m},Kp:function(){return c},$4:function(){return F},p_:function(){return a},ZM:function(){return $},D:function(){return S},gW:function(){return i},E6:function(){return G}});var r=e(86833),t;(function(Q){const ce="SignedIn";Q.SignedIn=ce;const we="SignedOut";Q.SignedOut=we})(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"}),g=(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"}),D=(0,r.createApiRef)({id:"core.discovery"}),W=(0,r.createApiRef)({id:"core.error"});var M;(function(Q){Q[Q.None=0]="None";const we=1;Q[Q.Active=we]="Active"})(M||(M={}));const P=(0,r.createApiRef)({id:"core.featureflags"}),B=(0,r.createApiRef)({id:"core.fetch"}),F=(0,r.createApiRef)({id:"core.identity"}),$=(0,r.createApiRef)({id:"core.oauthrequest"}),G=(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=g=>{const v=c(),b={};for(const L in m)if(m.hasOwnProperty(L)){const D=m[L],W=v.get(D);if(!W)throw new Error(`No implementation available for ${D}`);b[L]=W}return React.createElement(i,{...g,...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 g},IY:function(){return S},vJ:function(){return M}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),c="__backstage_data";function f(P,B,F){var Q;const $=P;let G=(Q=$[c])!=null?Q:t.get(P);if(G||(G={map:new Map},Object.defineProperty($,c,{enumerable:!1,configurable:!0,writable:!1,value:G}),t.set(P,G)),G.map.has(B)){const ce=P.displayName||P.name;throw new Error(`Attempted to attach duplicate data "${B}" to component "${ce}"`)}G.map.set(B,F)}function S(P,B){var G;if(!P)return;const F=P.type;if(!F)return;const $=(G=F[c])!=null?G:t.get(F);if(!!$)return $.map.get(B)}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(F){return{error:F}}render(){const{error:F}=this.state,{app:$,plugin:G}=this.props,{ErrorBoundaryFallback:Q}=$.getComponents();return F?m.createElement(Q,{error:F,resetError:this.handleErrorReset,plugin:G}):this.props.children}}function g(P){const{component:B,mountPoint:F,name:$}=P;return b({component:{lazy:()=>B().then(G=>{const Q=we=>{try{(0,u.tg)(F)}catch(xe){if(typeof xe=="object"&&xe!==null){const{message:de}=xe;if(typeof de=="string"&&de.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${F} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw xe}return m.createElement(G,{...we})},ce=$||G.displayName||G.name||"LazyComponent";return Q.displayName=`RoutableExtension(${ce})`,Q},G=>ce=>{const we=(0,i.useApp)(),{BootErrorPage:xe}=we.getComponents();return m.createElement(xe,{step:"load-chunk",error:G})})},data:{"core.mountPoint":F},name:$})}function v(P){const{component:B,name:F}=P;return b({component:B,name:F})}function b(P){const{data:B={},name:F}=P;F||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let $;if("lazy"in P.component){const Q=P.component.lazy;$=(0,m.lazy)(()=>Q().then(ce=>({default:ce})))}else $=P.component.sync;const G=F||$.displayName||$.name||"Component";return{expose(Q){const ce=we=>{const xe=(0,i.useApp)(),{Progress:de}=xe.getComponents(),Ue=B==null?void 0:B["core.mountPoint"];return m.createElement(m.Suspense,{fallback:m.createElement(de,null)},m.createElement(y,{app:xe,plugin:Q},m.createElement(a.fC,{attributes:{pluginId:Q.getId(),...F&&{extension:F},...Ue&&{routeRef:Ue.id}}},m.createElement($,{...we}))))};f(ce,"core.plugin",Q);for(const[we,xe]of Object.entries(B))f(ce,we,xe);return ce.displayName=`Extension(${G})`,ce}}}var L=e(27399);function D(P,B,F,$){return m.Children.toArray(P).flatMap(G=>{if(!(0,m.isValidElement)(G))return[];if(G.type===m.Fragment)return D(G.props.children,B,F,$);if(S(G,"core.featureFlagged")){const Q=G.props;return("with"in Q?B.isActive(Q.with):!B.isActive(Q.without))?D(G.props.children,B,F,$):[]}if(F===void 0||F(G))return[G];if($)throw new Error($);return D(G.props.children,B,F,$)})}class W{constructor(B,F){this.node=B,this.featureFlagsApi=F}selectByComponentData(B){const F=D(this.node,this.featureFlagsApi,$=>S($,B.key)!==void 0,B.withStrictError);return new W(F,this.featureFlagsApi)}findComponentData(B){return D(this.node,this.featureFlagsApi,$=>S($,B.key)!==void 0).map($=>S($,B.key)).filter($=>$!==void 0)}getElements(){return D(this.node,this.featureFlagsApi)}}function M(P,B,F=[]){const $=(0,L.useApi)(L.featureFlagsApiRef),G=new W(P,$);return(0,m.useMemo)(()=>B(G),[P,...F])}},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,D,W;"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,B){_(this,L,"absolute");this.id=P,this.params=B}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}L=t;function f(M){var P;return new c(M.id,(P=M.params)!=null?P:[])}const S=/^\w+$/;class m{constructor(P,B,F,$){_(this,D,"sub");this.id=P,this.path=B,this.parent=F,this.params=$}toString(){return`routeRef{type=sub,id=${this.id}}`}}D=t;function a(M){const{id:P,path:B,parent:F}=M,$=B.split("/").filter(ce=>ce.startsWith(":")).map(ce=>ce.substring(1)),G=[...F.params,...$];if(F.params.some(ce=>$.includes(ce)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!B.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${B}'`);if(B.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${B}'`);for(const ce of $)if(!S.test(ce))throw new Error(`SubRouteRef path has invalid param, got '${ce}'`);return new m(P,B,F,G)}class i{constructor(P,B,F){_(this,W,"external");this.id=P,this.params=B,this.optional=F}toString(){return`routeRef{type=external,id=${this.id}}`}}W=t;function u(M){var P;return new i(M.id,(P=M.params)!=null?P:[],Boolean(M.optional))}var y=e(2784),g=e(10289);function v(M){const P=(0,g.TH)(),B=(0,r.Vt)("routing-context");if(!B)throw new Error("Routing context is not available");const F=B.atVersion(1),$=(0,y.useMemo)(()=>F&&F.resolve(M,P),[F,M,P]);if(!B)throw new Error("useRouteRef used outside of routing context");if(!F)throw new Error("RoutingContext v1 not available");const G="optional"in M&&M.optional;if(!$&&!G)throw new Error(`No path for ${M}`);return $}function b(M){return(0,g.UO)()}},10179:function(ee,s,e){"use strict";e.d(s,{SP:function(){return L},dR:function(){return g},VL:function(){return W},BD:function(){return t}});function r(M){if(typeof M!="object"||M===null||Array.isArray(M))return!1;const P=M;return!(typeof P.name!="string"||P.name===""||typeof P.message!="string")}function t(M){if(typeof M!="object"||M===null||Array.isArray(M))throw new Error(`Encountered invalid error, not an object, got '${M}'`);const P=M;if(typeof P.name!="string"||P.name==="")throw new Error(`Encountered error object without a name, got '${M}'`);if(typeof P.message!="string")throw new Error(`Encountered error object without a message, got '${M}'`)}var c=e(24852);function f(M,P){const B=serializeErrorInternal(M),F={name:"Unknown",message:"<no reason given>",...B};return P!=null&&P.includeStack||delete F.stack,F}function S(M){const P=(0,c.deserializeError)(M);return M.stack||(P.stack=void 0),P}function m(M){if(r(M)){const P=String(M);return P!=="[object Object]"?P:`${M.name}: ${M.message}`}return`unknown error '${M}'`}class a extends Error{constructor(B,F){var G;let $=B;if(F!==void 0){const Q=m(F);$?$+=`; caused by ${Q}`:$=`caused by ${Q}`}super($);_(this,"cause");(G=Error.captureStackTrace)==null||G.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(F)?F:void 0}}class i extends null{}class u extends null{}class y extends null{}class g extends a{}class v extends null{}class b extends null{}class L extends a{constructor(P,B){super(P,B),this.name=r(B)?B.name:"Error"}}async function D(M){var P;try{const B=await M.text();if(B){if((P=M.headers.get("content-type"))!=null&&P.startsWith("application/json"))try{const F=JSON.parse(B);if(F.error&&F.response)return F}catch{}return{error:{name:"Error",message:`Request failed with status ${M.status} ${M.statusText}, ${B}`},response:{statusCode:M.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${M.status} ${M.statusText}`},response:{statusCode:M.status}}}class W extends Error{constructor(B){super(B.message);_(this,"response");_(this,"body");_(this,"cause");this.name="ResponseError",this.response=B.response,this.body=B.data,this.cause=B.cause}static async fromResponse(B){const F=await D(B),$=F.response.statusCode||B.status,G=F.error.name||B.statusText,Q=`Request failed with ${$} ${G}`,ce=S(F.error);return new W({message:Q,response:B,data:F,cause:ce})}}},36356:function(ee,s,e){var g,v,b,L,D;"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){Cn(this,g,void 0);On(this,g,P)}async getCredentials(P){const B=new URL(P.url),F=Ve(this,g).find($=>$.isUrlSupported(B));if(!F)throw new Error(`No auth provider available for '${P.url}', see https://backstage.io/link?scm-auth`);return F.getCredentials(P)}}g=new WeakMap;const W=class{constructor(P,B,F,$){Cn(this,v,void 0);Cn(this,b,void 0);Cn(this,L,void 0);Cn(this,D,void 0);On(this,v,B),On(this,b,F),On(this,L,$),On(this,D,P)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:P,gitlab:B,azure:F,bitbucket:$})=>W.merge(W.forGithub(P),W.forGitlab(B),W.forAzure(F),W.forBitbucket($))})}static forAuthApi(P,B){return new W("generic",P,B.host,B.scopeMapping)}static forGithub(P,B){var $;const F=($=B==null?void 0:B.host)!=null?$:"github.com";return new W("github",P,F,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(P,B){var $;const F=($=B==null?void 0:B.host)!=null?$:"gitlab.com";return new W("gitlab",P,F,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(P,B){var $;const F=($=B==null?void 0:B.host)!=null?$:"dev.azure.com";return new W("azure",P,F,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(P,B){var $;const F=($=B==null?void 0:B.host)!=null?$:"bitbucket.org";return new W("bitbucket",P,F,{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===Ve(this,b)}getAdditionalScopesForProvider(P){var B,F;return!(P!=null&&P.customScopes)||Ve(this,D)==="generic"?[]:(F=(B=P.customScopes)==null?void 0:B[Ve(this,D)])!=null?F:[]}async getCredentials(P){const{url:B,additionalScope:F,...$}=P,G=Ve(this,L).default.slice();F!=null&&F.repoWrite&&G.push(...Ve(this,L).repoWrite);const Q=this.getAdditionalScopesForProvider(F);Q.length&&G.push(...Q);const ce=[...new Set(G)],we=await Ve(this,v).getAccessToken(ce,$);return{token:we,headers:{Authorization:`Bearer ${we}`}}}};let f=W;v=new WeakMap,b=new WeakMap,L=new WeakMap,D=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=M=>{var G;const{type:P}=M,B=(0,r.useApp)(),F=i.Z,$=P&&(G=B.getSystemIcon(P))!=null?G:F;return u.createElement($,null)}},68370:function(ee,s,e){var dt,Et,At,Rt,Zt,zt,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(C){try{const w=typeof C=="string"?new URL(C):C;return Z.find(K=>h(K)===w.host)}catch{return}},byHost(C){return Z.find(w=>h(w)===C)}}}function a(Z){const{url:h,base:C,lineNumber:w}=Z;try{return new URL(h),h}catch{}let K;if(h.startsWith("/")){const{filepath:ne}=t()(C);K=new URL(C);const me=(0,c.trimEnd)(K.pathname.substring(0,K.pathname.length-ne.length),"/");K.pathname=`${me}${h}`}else K=new URL(h,C);return K.search=new URL(C).search,w&&(K.hash=`L${w}`),K.toString()}const i="amazonaws.com";function u(Z){var Bt;const h=Z.getOptionalString("endpoint"),C=(Bt=Z.getOptionalBoolean("s3ForcePathStyle"))!=null?Bt:!1;let w,K;if(h){try{const Mt=new URL(h);w=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 w=i;const ne=Z.getOptionalString("accessKeyId"),me=Z.getOptionalString("secretAccessKey"),Oe=Z.getOptionalString("roleArn"),nt=Z.getOptionalString("externalId");return{host:w,endpoint:h,s3ForcePathStyle:C,accessKeyId:ne,secretAccessKey:me,roleArn:Oe,externalId:nt}}function y(Z){const h=Z.map(u);return h.some(C=>C.host===i)||h.push({host:i}),h}const xt=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 g=xt;_(g,"factory",({config:h})=>{var w;const C=y((w=h.getOptionalConfigArray("integrations.awsS3"))!=null?w:[]);return m(C.map(K=>new xt(K)),K=>K.config.host)});const v="GB",gn=class{constructor(h,C,w,K,ne,me){Cn(this,dt,void 0);Cn(this,Et,void 0);Cn(this,At,void 0);Cn(this,Rt,void 0);Cn(this,Zt,void 0);Cn(this,zt,void 0);Cn(this,on,(...h)=>{const C=new URL(Ve(this,dt));return C.pathname=h.map(w=>encodeURIComponent(w)).join("/"),C});On(this,dt,h),On(this,Et,C),On(this,At,w),On(this,Rt,K),On(this,Zt,ne),On(this,zt,me)}static fromRepoUrl(h){var Mt;const C=new URL(h);let w,K,ne;const me=C.pathname.split("/").map(Un=>decodeURIComponent(Un));if(me[2]==="_git"?(w=me[1],K=ne=me[3]):me[3]==="_git"&&(w=me[1],K=me[2],ne=me[4]),!w||!K||!ne)throw new Error("Azure URL must point to a git repository");const Oe=(Mt=C.searchParams.get("path"))!=null?Mt:void 0;let nt;const Bt=C.searchParams.get("version");if(Bt){if(Bt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");nt=Bt.slice(2)}return new gn(C.origin,w,K,ne,Oe,nt)}toRepoUrl(){let h;return Ve(this,At)===Ve(this,Rt)?h=Ve(this,on).call(this,Ve(this,Et),"_git",Ve(this,Rt)):h=Ve(this,on).call(this,Ve(this,Et),Ve(this,At),"_git",Ve(this,Rt)),Ve(this,Zt)&&h.searchParams.set("path",Ve(this,Zt)),Ve(this,zt)&&h.searchParams.set("version",v+Ve(this,zt)),h.toString()}toFileUrl(){if(!Ve(this,Zt))throw new Error("Azure URL must point to a specific path to be able to download a file");const h=Ve(this,on).call(this,Ve(this,Et),Ve(this,At),"_apis","git","repositories",Ve(this,Rt),"items");return h.searchParams.set("api-version","6.0"),h.searchParams.set("path",Ve(this,Zt)),Ve(this,zt)&&h.searchParams.set("version",Ve(this,zt)),h.toString()}toArchiveUrl(){const h=Ve(this,on).call(this,Ve(this,Et),Ve(this,At),"_apis","git","repositories",Ve(this,Rt),"items");return h.searchParams.set("recursionLevel","full"),h.searchParams.set("download","true"),h.searchParams.set("api-version","6.0"),Ve(this,Zt)&&h.searchParams.set("scopePath",Ve(this,Zt)),Ve(this,zt)&&h.searchParams.set("version",Ve(this,zt)),h.toString()}toCommitsUrl(){const h=Ve(this,on).call(this,Ve(this,Et),Ve(this,At),"_apis","git","repositories",Ve(this,Rt),"commits");return h.searchParams.set("api-version","6.0"),Ve(this,zt)&&h.searchParams.set("searchCriteria.itemVersion.version",Ve(this,zt)),h.toString()}getOwner(){return Ve(this,Et)}getProject(){return Ve(this,At)}getRepo(){return Ve(this,Rt)}getPath(){return Ve(this,Zt)}getRef(){return Ve(this,zt)}};let b=gn;dt=new WeakMap,Et=new WeakMap,At=new WeakMap,Rt=new WeakMap,Zt=new WeakMap,zt=new WeakMap,on=new WeakMap;const L="dev.azure.com";function D(Z){var w;const h=(w=Z.getOptionalString("host"))!=null?w:L,C=Z.getOptionalString("token");if(!f(h))throw new Error(`Invalid Azure integration config, '${h}' is not a valid host`);return{host:h,token:C}}function W(Z){const h=Z.map(D);return h.some(C=>C.host===L)||h.push({host:L}),h}const Tn=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:C,base:w}=h;if(S(C))return C;try{const ne=b.fromRepoUrl(w),me=new URL(w),Oe=new URL(`https://a.com${(K=ne.getPath())!=null?K:""}`),nt=new URL(C,Oe).pathname;return me.searchParams.set("path",nt),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(C,w).toString()}}resolveEditUrl(h){return h}};let M=Tn;_(M,"factory",({config:h})=>{var w;const C=W((w=h.getOptionalConfigArray("integrations.azure"))!=null?w:[]);return m(C.map(K=>new Tn(K)),K=>K.config.host)});var P=e(48834).Buffer;function B(Z){return AzureUrl.fromRepoUrl(Z).toFileUrl()}function F(Z){return AzureUrl.fromRepoUrl(Z).toArchiveUrl()}function $(Z){return AzureUrl.fromRepoUrl(Z).toCommitsUrl()}function G(Z,h){const C=h?{...h}:{};if(Z.token){const w=P.from(`:${Z.token}`,"utf8");C.Authorization=`Basic ${w.toString("base64")}`}return{headers:C}}const Q="bitbucket.org",ce="https://api.bitbucket.org/2.0";function we(Z){var me;const h=(me=Z.getOptionalString("host"))!=null?me:Q;let C=Z.getOptionalString("apiBaseUrl");const w=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 C?C=(0,c.trimEnd)(C,"/"):h===Q?C=ce:C=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:C,token:w,username:K,appPassword:ne}}function xe(Z){const h=Z.map(we);return h.some(C=>C.host===Q)||h.push({host:Q,apiBaseUrl:ce}),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 C=a(h);if(!h.lineNumber)return C;const w=new URL(C);return this.integrationConfig.host==="bitbucket.org"?w.hash=`lines-${h.lineNumber}`:w.hash=`${h.lineNumber}`,w.toString()}resolveEditUrl(h){const C=t()(h),w=new URL(h);return w.searchParams.set("mode","edit"),w.searchParams.set("spa","0"),w.searchParams.set("at",C.ref),w.toString()}};let de=_t;_(de,"factory",({config:h})=>{var w,K,ne;const C=xe((ne=h.getOptionalConfigArray("integrations.bitbucket"))!=null?ne:[...(w=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?w:[],...(K=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?K:[]]);return m(C.map(me=>new _t(me)),me=>me.config.host)});var Ue=e(96279),re=e(48834).Buffer;async function Se(Z,h){const{name:C,owner:w,resource:K}=parseGitUrl(Z),ne=K==="bitbucket.org";let me=ne?`${h.apiBaseUrl}/repositories/${w}/${C}`:`${h.apiBaseUrl}/projects/${w}/repos/${C}/default-branch`,Oe=await fetch(me,ke(h));if(Oe.status===404&&!ne&&(me=`${h.apiBaseUrl}/projects/${w}/repos/${C}/branches/default`,Oe=await fetch(me,ke(h))),!Oe.ok){const Bt=`Failed to retrieve default branch from ${me}, ${Oe.status} ${Oe.statusText}`;throw new Error(Bt)}let nt;if(ne)nt=(await Oe.json()).mainbranch.name;else{const{displayId:Bt}=await Oe.json();nt=Bt}if(!nt)throw new Error(`Failed to read default branch from ${me}. Response ${Oe.status} ${Oe.json()}`);return nt}async function Ne(Z,h){const{name:C,owner:w,ref:K,protocol:ne,resource:me,filepath:Oe}=parseGitUrl(Z),nt=me==="bitbucket.org";let Bt=K;Bt||(Bt=await Se(Z,h));const Mt=Oe?`&path=${encodeURIComponent(Oe)}`:"";return nt?`${ne}://${me}/${w}/${C}/get/${Bt}.tar.gz`:`${h.apiBaseUrl}/projects/${w}/repos/${C}/archive?format=tgz&at=${Bt}&prefix=${w}-${C}${Mt}`}function ze(Z,h){try{const{owner:C,name:w,ref:K,filepathtype:ne,filepath:me}=parseGitUrl(Z);if(!C||!w||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/${C}/${w}/src/${K}/${Oe}`}return`${h.apiBaseUrl}/projects/${C}/repos/${w}/raw/${Oe}?at=${K}`}catch(C){throw new Error(`Incorrect URL: ${Z}, ${C}`)}}function ke(Z){const h={};if(Z.token)h.Authorization=`Bearer ${Z.token}`;else if(Z.username&&Z.appPassword){const C=re.from(`${Z.username}:${Z.appPassword}`,"utf8");h.Authorization=`Basic ${C.toString("base64")}`}return{headers:h}}const ve="bitbucket.org",Ie="https://api.bitbucket.org/2.0";function Be(Z){const h=ve,C=Ie,w=Z.getString("username"),K=Z.getString("appPassword");return{host:h,apiBaseUrl:C,username:w,appPassword:K}}function je(Z){const h=Z.map(Be);return h.length===0&&h.push({host:ve,apiBaseUrl:Ie}),h}const pn=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const C=a(h);if(h.lineNumber){const w=new URL(C);return w.hash=`lines-${h.lineNumber}`,w.toString()}return C}resolveEditUrl(h){const C=t()(h),w=new URL(h);return w.searchParams.set("mode","edit"),w.searchParams.set("at",C.ref),w.toString()}};let at=pn;_(at,"factory",({config:h})=>{var w;const C=je((w=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?w:[]);return m(C.map(K=>new pn(K)),K=>K.config.host)});var Tt=e(48834).Buffer;async function _e(Z,h){const{name:C,owner:w}=parseGitUrl(Z),K=`${h.apiBaseUrl}/repositories/${w}/${C}`,ne=await fetch(K,et(h));if(!ne.ok){const nt=`Failed to retrieve default branch from ${K}, ${ne.status} ${ne.statusText}`;throw new Error(nt)}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 st(Z,h){const{name:C,owner:w,ref:K,protocol:ne,resource:me}=parseGitUrl(Z);let Oe=K;return Oe||(Oe=await _e(Z,h)),`${ne}://${me}/${w}/${C}/get/${Oe}.tar.gz`}function Qe(Z,h){try{const{owner:C,name:w,ref:K,filepathtype:ne,filepath:me}=parseGitUrl(Z);if(!C||!w||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/${C}/${w}/src/${K}/${Oe}`}catch(C){throw new Error(`Incorrect URL: ${Z}, ${C}`)}}function et(Z){const h={};if(Z.username&&Z.appPassword){const C=Tt.from(`${Z.username}:${Z.appPassword}`,"utf8");h.Authorization=`Basic ${C.toString("base64")}`}return{headers:h}}function $t(Z){const h=Z.getString("host");let C=Z.getOptionalString("apiBaseUrl");const w=Z.getOptionalString("token");if(!f(h))throw new Error(`Invalid Bitbucket Server integration config, '${h}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):C=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:C,token:w}}function jt(Z){return Z.map($t)}const qn=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const C=a(h);if(h.lineNumber){const w=new URL(C),K=w.pathname.split("/").slice(-1)[0];return w.hash=`${K}-${h.lineNumber}`,w.toString()}return C}resolveEditUrl(h){const C=t()(h),w=new URL(h);return w.searchParams.set("mode","edit"),w.searchParams.set("spa","0"),w.searchParams.set("at",C.ref),w.toString()}};let Ut=qn;_(Ut,"factory",({config:h})=>{var w;const C=jt((w=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?w:[]);return m(C.map(K=>new qn(K)),K=>K.config.host)});async function xn(Z,h){const{name:C,owner:w}=parseGitUrl(Z);let K=`${h.apiBaseUrl}/projects/${w}/repos/${C}/default-branch`,ne=await fetch(K,un(h));if(ne.status===404&&(K=`${h.apiBaseUrl}/projects/${w}/repos/${C}/branches/default`,ne=await fetch(K,un(h))),!ne.ok){const nt=`Failed to retrieve default branch from ${K}, ${ne.status} ${ne.statusText}`;throw new Error(nt)}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 Jt(Z,h){const{name:C,owner:w,ref:K,filepath:ne}=parseGitUrl(Z);let me=K;me||(me=await xn(Z,h));const Oe=ne?`&path=${encodeURIComponent(ne)}`:"";return`${h.apiBaseUrl}/projects/${w}/repos/${C}/archive?format=tgz&at=${me}&prefix=${w}-${C}${Oe}`}function vt(Z,h){try{const{owner:C,name:w,ref:K,filepathtype:ne,filepath:me}=parseGitUrl(Z);if(!C||!w||ne!=="browse"&&ne!=="raw"&&ne!=="src")throw new Error("Invalid Bitbucket Server URL or file path");const Oe=me.replace(/^\//,"");return`${h.apiBaseUrl}/projects/${C}/repos/${w}/raw/${Oe}?at=${K}`}catch(C){throw new Error(`Incorrect URL: ${Z}, ${C}`)}}function un(Z){const h={};return Z.token&&(h.Authorization=`Bearer ${Z.token}`),{headers:h}}function se(Z){const h=Z.getString("host");let C=Z.getOptionalString("baseUrl"),w=Z.getOptionalString("cloneUrl"),K=Z.getOptionalString("gitilesBaseUrl");const ne=Z.getOptionalString("username"),me=Z.getOptionalString("password");if(f(h)){if(C&&!S(C))throw new Error(`Invalid Gerrit integration config, '${C}' is not a valid baseUrl`);if(w&&!S(w))throw new Error(`Invalid Gerrit integration config, '${w}' 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 C?C=(0,c.trimEnd)(C,"/"):C=`https://${h}`,K?K=(0,c.trimEnd)(K,"/"):K=`https://${h}`,w?w=(0,c.trimEnd)(w,"/"):w=C,{host:h,baseUrl:C,cloneUrl:w,gitilesBaseUrl:K,username:ne,password:me}}function j(Z){return Z.map(se)}const zn=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:C,base:w,lineNumber:K}=h;let ne;return C?ne=new URL(C,w):ne=new URL(w),K&&(ne.hash=K.toString()),ne.toString()}resolveEditUrl(h){return h}};let ae=zn;_(ae,"factory",({config:h})=>{var w;const C=j((w=h.getOptionalConfigArray("integrations.gerrit"))!=null?w:[]);return m(C.map(K=>new zn(K)),K=>K.config.host)});var fe=e(48834).Buffer;const he=")]}'";function Te(Z,h){const w=h.replace(Z.gitilesBaseUrl,"").split("/").filter(Bt=>!!Bt),K=w.indexOf("+");if(K<=0)throw new Error(`Unable to parse project from url: ${h}`);const ne=trimStart(w.slice(0,K).join("/"),"/"),me=w.indexOf("heads");if(me<=0)throw new Error(`Unable to parse branch from url: ${h}`);const Oe=w[me+1],nt=w.slice(me+2).join("/");return{branch:Oe,filePath:nt===""?"/":nt,project:ne}}function Me(Z){return Z.password?"/a/":"/"}function De(Z,h){const{branch:C,project:w}=Te(Z,h);return`${Z.baseUrl}${Me(Z)}projects/${encodeURIComponent(w)}/branches/${C}`}function Ye(Z,h){const{project:C}=Te(Z,h);return`${Z.cloneUrl}${Me(Z)}${C}`}function it(Z,h){const{branch:C,filePath:w,project:K}=Te(Z,h);return`${Z.baseUrl}${Me(Z)}projects/${encodeURIComponent(K)}/branches/${C}/files/${encodeURIComponent(w)}/content`}function Nt(Z){return`${Z.baseUrl}${Me(Z)}projects/`}function Ft(Z){const h={};if(!Z.password)return h;const C=fe.from(`${Z.username}:${Z.password}`,"utf8");return h.Authorization=`Basic ${C.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(C){throw new Error(`Invalid response from Gerrit: ${h.slice(0,10)} - ${C}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${h.slice(0,10)}`)}const Lt="github.com",Vt="https://api.github.com",mt="https://raw.githubusercontent.com";function hn(Z){var me,Oe;const h=(me=Z.getOptionalString("host"))!=null?me:Lt;let C=Z.getOptionalString("apiBaseUrl"),w=Z.getOptionalString("rawBaseUrl");const K=Z.getOptionalString("token"),ne=(Oe=Z.getOptionalConfigArray("apps"))==null?void 0:Oe.map(nt=>({appId:nt.getNumber("appId"),clientId:nt.getString("clientId"),clientSecret:nt.getString("clientSecret"),webhookSecret:nt.getString("webhookSecret"),privateKey:nt.getString("privateKey"),allowedInstallationOwners:nt.getOptionalStringArray("allowedInstallationOwners")}));if(!f(h))throw new Error(`Invalid GitHub integration config, '${h}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):h===Lt&&(C=Vt),w?w=(0,c.trimEnd)(w,"/"):h===Lt&&(w=mt),{host:h,apiBaseUrl:C,rawBaseUrl:w,token:K,apps:ne}}function dn(Z){const h=Z.map(hn);return h.some(C=>C.host===Lt)||h.push({host:Lt,apiBaseUrl:Vt,rawBaseUrl:mt}),h}function bt(Z,h,C){try{const{owner:w,name:K,ref:ne,filepathtype:me,filepath:Oe}=parseGitUrl(Z);if(!w||!K||!ne||me!=="blob"&&me!=="raw"&&me!=="tree")throw new Error("Invalid GitHub URL or file path");const nt=Oe.replace(/^\//,"");return oe(h,C)==="api"?`${h.apiBaseUrl}/repos/${w}/${K}/contents/${nt}?ref=${ne}`:`${h.rawBaseUrl}/${w}/${K}/${ne}/${nt}`}catch(w){throw new Error(`Incorrect URL: ${Z}, ${w}`)}}function Je(Z,h){const C={};return oe(Z,h)==="api"&&(C.Accept="application/vnd.github.v3.raw"),h.token&&(C.Authorization=`token ${h.token}`),{headers:C}}function oe(Z,h){return Z.apiBaseUrl&&(h.token||!Z.rawBaseUrl)?"api":"raw"}class U{constructor(){_(this,"tokenCache",new Map);_(this,"isNotExpired",h=>h.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(h,C){const w=this.tokenCache.get(h);if(w&&this.isNotExpired(w.expiresAt))return{accessToken:w.token};const K=await C();return this.tokenCache.set(h,K),{accessToken:K.token}}}const R={Accept:"application/vnd.github.machine-man-preview+json"};class V{constructor(h,C){_(this,"appClient");_(this,"baseUrl");_(this,"baseAuthConfig");_(this,"cache",new U);_(this,"allowedInstallationOwners");this.allowedInstallationOwners=h.allowedInstallationOwners,this.baseUrl=C,this.baseAuthConfig={appId:h.appId,privateKey:h.privateKey.replace(/\\n/gm,`
|
|
31
|
+
`)},this.appClient=new Octokit({baseUrl:C,headers:R,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(h,C){var me;const{installationId:w,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=C?`${h}/${C}`:h;return this.cache.getOrCreateToken(ne,async()=>{const Oe=await this.appClient.apps.createInstallationAccessToken({installation_id:w,headers:R});if(C&&Oe.data.repository_selection==="selected"){const nt=new Octokit({baseUrl:this.baseUrl,auth:Oe.data.token});if(!(await nt.paginate(nt.apps.listReposAccessibleToInstallation)).some(Un=>Un.name===C))throw new Error(`The Backstage GitHub application used in the ${h} organization does not have access to a repository with the name ${C}`)}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 w=(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(w)return{installationId:w.id,suspended:Boolean(w.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 C,w;this.apps=(w=(C=h.apps)==null?void 0:C.map(K=>new V(K,h.apiBaseUrl)))!=null?w:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(C=>C.getInstallations()))).flat():[]}async getAppToken(h,C){if(this.apps.length===0)return;const w=await Promise.all(this.apps.map(Oe=>Oe.getInstallationCredentials(h,C).then(nt=>({credentials:nt,error:void 0}),nt=>({credentials:void 0,error:nt})))),K=w.find(Oe=>Oe.credentials);if(K)return K.credentials.accessToken;const me=w.map(Oe=>Oe.error).find(Oe=>Oe.name!=="NotFoundError");if(me)throw me}}class ge{constructor(h,C){this.githubAppCredentialsMux=h,this.token=C}async getCredentials(h){const C=parseGitUrl(h.url),w=C.owner||C.name,K=C.owner?C.name:void 0;let ne="app",me=await this.githubAppCredentialsMux.getAppToken(w,K);return me||(ne="token",me=this.token),{headers:me?{Authorization:`Bearer ${me}`}:void 0,token:me,type:ne}}}_(ge,"create",null);class Re{static fromIntegrations(h){const C=new Map;return h.github.list().forEach(w=>{const K=SingleInstanceGithubCredentialsProvider.create(w.config);C.set(w.config.host,K)}),new Re(C)}constructor(h){this.providers=h}async getCredentials(h){const C=new URL(h.url),w=this.providers.get(C.host);if(!w)throw new Error(`There is no GitHub integration that matches ${h.url}. Please add a configuration for an integration.`);return w.getCredentials(h)}}const Wn=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 We=Wn;_(We,"factory",({config:h})=>{var w;const C=dn((w=h.getOptionalConfigArray("integrations.github"))!=null?w:[]);return m(C.map(K=>new Wn(K)),K=>K.config.host)});function Xe(Z,h){return Z.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(C,w,K,ne)=>`//${w}/${K}/${ne}/${h}/`)}const ct="gitlab.com",gt="https://gitlab.com/api/v4";function ht(Z){const h=Z.getString("host");let C=Z.getOptionalString("apiBaseUrl");const w=Z.getOptionalString("token");let K=Z.getOptionalString("baseUrl");if(C?C=(0,c.trimEnd)(C,"/"):h===ct&&(C=gt),K?K=(0,c.trimEnd)(K,"/"):K=`https://${h}`,f(h)){if(!C||!S(C))throw new Error(`Invalid GitLab integration config, '${C}' 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:w,apiBaseUrl:C,baseUrl:K}}function Ke(Z){const h=Z.map(ht);return h.some(C=>C.host===ct)||h.push({host:ct,apiBaseUrl:gt,baseUrl:`https://${ct}`}),h}var Ot=e(10179);async function qe(Z,h){if(Z.includes("/-/blob/")){const C=await pt(Z,h);return nn(Z,C).toString()}return qt(Z).toString()}function ut(Z){const{token:h=""}=Z;return{headers:{"PRIVATE-TOKEN":h}}}function qt(Z){try{const h=new URL(Z),C=h.pathname.split("/").filter(Boolean),w=C.indexOf("blob",2);if(w<2||w===C.length-1)throw new InputError("Wrong GitLab URL");const K=C.slice(0,w),ne=C.slice(w+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 C=new URL(Z),w=C.pathname.split("/-/blob/")[1],[K,...ne]=w.split("/");return C.pathname=["/api/v4/projects",h,"repository/files",encodeURIComponent(decodeURIComponent(ne.join("/"))),"raw"].join("/"),C.search=`?ref=${K}`,C}catch(C){throw new Error(`Incorrect url: ${Z}, ${C}`)}}async function pt(Z,h){const C=new URL(Z);if(!C.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const w=C.pathname.split("/-/blob/")[0],K=new URL(`${C.origin}/api/v4/projects/${encodeURIComponent(w.replace(/^\//,""))}`),ne=await fetch(K.toString(),ut(h)),me=await ne.json();if(!ne.ok)throw new Error(`GitLab Error '${me.error}', ${me.error_description}`);return Number(me.id)}catch(w){throw new Error(`Could not get GitLab project ID for: ${Z}, ${w}`)}}const $n=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=$n;_(yt,"factory",({config:h})=>{var w;const C=Ke((w=h.getOptionalConfigArray("integrations.gitlab"))!=null?w:[]);return m(C.map(K=>new $n(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:g.factory({config:h}),azure:M.factory({config:h}),bitbucket:de.factory({config:h}),bitbucketCloud:at.factory({config:h}),bitbucketServer:Ut.factory({config:h}),gerrit:ae.factory({config:h}),github:We.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(C=>C.byUrl(h)).find(Boolean)}byHost(h){return Object.values(this.byType).map(C=>C.byHost(h)).find(Boolean)}resolveUrl(h){const C=this.byUrl(h.base);return C?C.resolveUrl(h):a(h)}resolveEditUrl(h){const C=this.byUrl(h);return C?C.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:ue})=>(0,a.createFetchApi)({middleware:[a.FetchMiddlewares.resolvePluginProtocol({discoveryApi:ue}),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:ue})=>a.GoogleAuth.create({discoveryApi:I,oauthRequestApi:q,environment:ue.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:ue})=>a.MicrosoftAuth.create({discoveryApi:I,oauthRequestApi:q,environment:ue.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:ue})=>a.GithubAuth.create({discoveryApi:I,oauthRequestApi:q,defaultScopes:["read:user"],environment:ue.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:ue})=>a.OktaAuth.create({discoveryApi:I,oauthRequestApi:q,environment:ue.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:ue})=>a.GitlabAuth.create({discoveryApi:I,oauthRequestApi:q,environment:ue.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:ue})=>a.OneLoginAuth.create({discoveryApi:I,oauthRequestApi:q,environment:ue.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:ue})=>a.BitbucketAuth.create({discoveryApi:I,oauthRequestApi:q,defaultScopes:["team"],environment:ue.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:ue})=>a.AtlassianAuth.create({discoveryApi:I,oauthRequestApi:q,environment:ue.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:ue})=>u.iM.create({config:I,discovery:q,identity:ue})})];var g=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 D=()=>t.createElement(v.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),W=({step:I,error:q})=>{let ue="";return I==="load-config"?ue=`The configuration failed to load, someone should have a look at this error: ${q.message}`:I==="load-chunk"&&(ue=`Lazy loaded chunk failed to load, try to reload the page: ${q.message}`),t.createElement(L,null,t.createElement(v.ErrorPage,{status:"501",statusMessage:ue}))},M=({error:I,resetError:q,plugin:ue})=>t.createElement(v.ErrorPanel,{title:`Error in ${ue==null?void 0:ue.getId()}`,defaultExpanded:!0,error:I},t.createElement(g.Z,{variant:"outlined",onClick:q},"Retry")),P={Progress:v.Progress,Router:b.VK,NotFoundErrorPage:D,BootErrorPage:W,ErrorBoundaryFallback:M};var B=e(43642),F=e(80079),$=e(90941),G=e(32915),Q=e(40562),ce=e(21853),we=e(60744),xe=e(66569),de=e(30254),Ue=e(13384),re=e(15933),Se=e(58838),Ne=e(86737),ze=e(4989),ke=e(44407),ve=e(18628),Ie=e(84219),Be=e(98685),je=e(39781);const at={brokenImage:F.Z,catalog:ve.Z,scaffolder:G.Z,techdocs:Q.Z,search:ce.Z,chat:we.Z,dashboard:xe.Z,docs:de.Z,email:Ue.Z,github:Se.Z,group:Ie.Z,help:Ne.Z,"kind:api":re.Z,"kind:component":ke.Z,"kind:domain":B.Z,"kind:group":Ie.Z,"kind:location":ze.Z,"kind:system":$.Z,"kind:user":Be.Z,user:Be.Z,warning:je.Z};var Tt=e(73689),_e=e(48032);const st={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 et(I,q){const be=`linear-gradient(90deg, ${(I.length===1?[I[0],I[0]]:I).join(", ")})`,He=`${q}, ${be}`;return{colors:I,shape:q,backgroundImage:He}}const $t={home:et(Qe.teal,st.wave),documentation:et(Qe.pinkSea,st.wave2),tool:et(Qe.purpleSky,st.round),service:et(Qe.marineBlue,st.wave),website:et(Qe.veryBlue,st.wave),library:et(Qe.rubyRed,st.wave),other:et(Qe.darkGrey,st.wave),app:et(Qe.toastyOrange,st.wave),apis:et(Qe.teal,st.wave2)},jt='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function Ut(I){const{palette:q,fontFamily:ue=jt,defaultPageTheme:be,pageTheme:He=$t}=I;if(!He[be])throw new Error(`${be} is not defined in pageTheme.`);return{palette:q,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:ue,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:He[be],getPageTheme:({themeId:lt})=>{var A;return(A=He[lt])!=null?A:He[be]}}}function xn(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,_e.darken)(I.palette.link,.3),background:(0,_e.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 Jt(I){const q=Ut(I),ue=(0,Tt.Z)(q),be=xn(ue);return{...ue,overrides:be}}var vt=e(34505);const un=Jt({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:vt.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:$t}),se=Jt({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:vt.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:$t});var j=e(98192),ae=e(15222),fe=e(41547),he=e(87561);const Te=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(ae.Z,null),Provider:({children:I})=>t.createElement(fe.Z,{theme:un},t.createElement(he.ZP,null,I))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(j.Z,null),Provider:({children:I})=>t.createElement(fe.Z,{theme:se},t.createElement(he.ZP,null,I))}];function Me(I){var q,ue,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:(ue=I==null?void 0:I.plugins)!=null?ue:[],themes:(be=I==null?void 0:I.themes)!=null?be:Te})}var De=e(82394),Ye=e.n(De),it=e(48023),Nt=e(76635);async function Ft({storageApi:I}){var lt;const q=I.forBucket("settings"),ue=I.forBucket("starredEntities"),be=q.snapshot("starredEntities").value;if(!(0,Nt.isArray)(be))return;const He=new Set((lt=ue.snapshot("entityRefs").value)!=null?lt:[]);be.filter(Nt.isString).map(A=>A.split(":")).filter(A=>A.length===4&&A[0]==="entity").map(([A,T,x,z])=>(0,it.eE)({kind:T,namespace:x,name:z})).forEach(A=>He.add(A)),await ue.set("entityRefs",Array.from(He)),await q.remove("starredEntities")}class tt{constructor(q){_(this,"settingsStore");_(this,"starredEntities");_(this,"subscribers",new Set);_(this,"observable",new(Ye())(q=>(q.next(new Set(this.starredEntities)),this.subscribers.add(q),()=>{this.subscribers.delete(q)})));var ue;Ft(q).then(),this.settingsStore=q.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((ue=this.settingsStore.snapshot("entityRefs").value)!=null?ue:[]),this.settingsStore.observe$("entityRefs").subscribe({next:be=>{var He;this.starredEntities=new Set((He=be.value)!=null?He:[]),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 Lt=e(39398),Vt=e(49782),mt=e(79692),hn=e(73624);const dn=(0,mt.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function bt(I){var be,He;const q=I.result,ue=dn();return React.createElement(Link,{to:q.location},React.createElement(ListItem,{alignItems:"flex-start",className:ue.flexContainer},React.createElement(ListItemText,{className:ue.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:(He=I.highlight)!=null&&He.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),oe=e(53479),U=e(95544),R=e(99688),V=e(12231),ie=e(86136),ge=e(49378),Re=e(85256),We=e(61837),Xe=e(79784),ct=e(50758),gt=e(49166),ht=e(31654),Ke=e(43054),Ot=e(40749);const qe="catalog-entity",ut=(0,Ot.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:qe}),qt=(0,Ot.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),nn=(0,Ot.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:qe}),pt=(0,Ot.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:qe}),yt=(0,Ot.J$)({name:"catalog.location.read",attributes:{action:"read"}}),rn=(0,Ot.J$)({name:"catalog.location.create",attributes:{action:"create"}}),cn=(0,Ot.J$)({name:"catalog.location.delete",attributes:{action:"delete"}}),xt=(0,mt.Z)({button:{color:"white"}});function dt(I){var ye;const{UNSTABLE_extraContextMenuItems:q,UNSTABLE_contextMenuOptions:ue,onUnregisterEntity:be,onInspectEntity:He}=I,[lt,A]=(0,t.useState)(),T=xt(),x=(0,oe.useEntityPermission)(nn),z=Pe=>{A(Pe.currentTarget)},k=()=>{A(void 0)},J=q&&[...q.map(Pe=>t.createElement(V.Z,{key:Pe.title,onClick:()=>{k(),Pe.onClick()}},t.createElement(ie.Z,null,t.createElement(Pe.Icon,{fontSize:"small"})),t.createElement(ge.Z,{primary:Pe.title}))),t.createElement(Re.Z,{key:"the divider is here!"})],le=(ye=!x.allowed||(ue==null?void 0:ue.disableUnregister))!=null?ye:!1;return t.createElement(t.Fragment,null,t.createElement(We.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true","aria-expanded":!!lt,role:"button",onClick:z,"data-testid":"menu-button",className:T.button,id:"long-menu"},t.createElement(Ke.Z,null)),t.createElement(Xe.ZP,{open:Boolean(lt),onClose:k,anchorEl:lt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},"aria-labelledby":"long-menu"},t.createElement(ct.Z,null,J,t.createElement(V.Z,{onClick:()=>{k(),be()},disabled:le},t.createElement(ie.Z,null,t.createElement(gt.Z,{fontSize:"small"})),t.createElement(ge.Z,{primary:"Unregister entity"})),t.createElement(V.Z,{onClick:()=>{k(),He()}},t.createElement(ie.Z,null,t.createElement(ht.Z,{fontSize:"small"})),t.createElement(ge.Z,{primary:"Inspect entity"})))))}const Et="plugin.catalog.entityLayoutRoute",At=()=>null;(0,i.attachComponentData)(At,Et,!0),(0,i.attachComponentData)(At,"core.gatherMountPoints",!0);function Rt(I){const{entity:q,title:ue}=I;return t.createElement(U.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(U.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},ue),q&&t.createElement(oe.FavoriteEntity,{entity:q}))}function Zt(I,q,ue,be){var T,x,z,k,J;const He=(T=I!=null?I:be==null?void 0:be.kind)!=null?T:"",lt=(x=q!=null?q:be==null?void 0:be.metadata.namespace)!=null?x:"";return{headerTitle:`${(J=(k=(z=be==null?void 0:be.metadata.title)!=null?z:ue)!=null?k:be==null?void 0:be.metadata.name)!=null?J:""}${lt&<!==it.zG?` in ${lt}`:""}`,headerType:(()=>{let le=He.toLocaleLowerCase("en-US");return be&&be.spec&&"type"in be.spec&&(le+=" \u2014 ",le+=be.spec.type.toLocaleLowerCase("en-US")),le})()}}function zt(I){var be;const{entity:q}=I,ue=(0,oe.getEntityRelations)(q,it.S4);return t.createElement(t.Fragment,null,ue.length>0&&t.createElement(v.HeaderLabel,{label:"Owner",value:t.createElement(oe.EntityRefLinks,{entityRefs:ue,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 Ze,St,wt;const{UNSTABLE_extraContextMenuItems:q,UNSTABLE_contextMenuOptions:ue,children:be,NotFoundComponent:He}=I,{kind:lt,namespace:A,name:T}=(0,i.useRouteRefParams)(oe.entityRouteRef),{entity:x,loading:z,error:k}=(0,oe.useAsyncEntity)(),J=(0,f.TH)(),le=(0,i.useElementFilter)(be,Fn=>Fn.selectByComponentData({key:Et,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:Kt})=>{if(x){if(Kt.if&&!Kt.if(x))return[]}else return[];return[{path:Kt.path,title:Kt.title,children:Kt.children,tabProps:Kt.tabProps}]}),[x]),{headerTitle:ye,headerType:Pe}=Zt(lt,A,T,x),[Le,Ce]=(0,t.useState)(!1),[Fe,$e]=(0,t.useState)(!1),ft=(0,f.s0)(),Ge=async()=>{Ce(!1),$e(!1),ft("/")};return(0,t.useEffect)(()=>{Ce(!1),$e(!1)},[J.pathname]),t.createElement(v.Page,{themeId:(wt=(St=(Ze=x==null?void 0:x.spec)==null?void 0:Ze.type)==null?void 0:St.toString())!=null?wt:"home"},t.createElement(v.Header,{title:t.createElement(Rt,{title:ye,entity:x}),pageTitleOverride:ye,type:Pe},x&&t.createElement(t.Fragment,null,t.createElement(zt,{entity:x}),t.createElement(dt,{UNSTABLE_extraContextMenuItems:q,UNSTABLE_contextMenuOptions:ue,onUnregisterEntity:()=>Ce(!0),onInspectEntity:()=>$e(!0)}))),z&&t.createElement(v.Progress,null),x&&t.createElement(v.RoutedTabs,{routes:le}),k&&t.createElement(v.Content,null,t.createElement(R.Z,{severity:"error"},k.toString())),!z&&!k&&!x&&t.createElement(v.Content,null,He||t.createElement(v.WarningPanel,{title:"Entity not found"},"There is no ",lt," with the requested"," ",t.createElement(v.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(oe.UnregisterEntityDialog,{open:Le,entity:x,onConfirm:Ge,onClose:()=>Ce(!1)}),t.createElement(oe.InspectEntityDialog,{open:Fe,entity:x,onClose:()=>$e(!1)}))};on.Route=At;var gn=e(10179);function Tn(I){const{open:q,onClose:ue,onConfirm:be,entity:He}=I,[lt,A]=useState(!1),T=useApi(catalogApiRef),x=useApi(alertApiRef),z=async()=>{A(!0);try{const k=He.metadata.uid;await T.removeEntityByUid(k),be()}catch(k){assertError(k),x.post({message:k.message})}finally{A(!1)}};return React.createElement(Dialog,{open:q,onClose:ue},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:lt,onClick:z},"Delete"),React.createElement(Button,{onClick:ue,color:"primary"},"Cancel")))}var _t=e(47851);function pn(I){var q,ue;return((ue=(q=I==null?void 0:I.metadata)==null?void 0:q.annotations)==null?void 0:ue["backstage.io/orphan"])==="true"}function qn(){const I=useNavigate(),q=useRouteRef(rootRouteRef),[ue,be]=useState(!1),{entity:He}=useEntity(),lt=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:ue,entity:He,onConfirm:lt,onClose:()=>be(!1)}))}var zn=e(30001);const Wn=I=>I.error&&I.level==="error"&&I.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function $n(I,q){return{items:(await q.getEntityAncestors({entityRef:I})).items.map(He=>{var T,x;return{errors:((x=(T=He.entity.status)==null?void 0:T.items)!=null?x:[]).filter(Wn).map(z=>z.error).filter(z=>Boolean(z)),entity:He.entity}}).filter(He=>He.errors.length>0)}}async function Z(I,q){const ue=q.apis.get(catalogApiRef);if(!ue)throw new Error(`No implementation available for ${catalogApiRef}`);return(await $n(stringifyEntityRef(I),ue)).items.length>0}function h(){const{entity:I}=useEntity(),q=stringifyEntityRef(I),ue=useApi(catalogApiRef),{loading:be,error:He,value:lt}=useAsync(async()=>$n(q,ue),[q,ue]);return He?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:He})):be||!lt?null:React.createElement(React.Fragment,null,lt.items.map((A,T)=>React.createElement(Box,{key:T,mb:1},stringifyEntityRef(I)!==stringifyEntityRef(A.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:A.entity})),A.errors.map((x,z)=>React.createElement(ResponseErrorPanel,{key:z,error:x})))))}var C=e(64279);const w="core.backstage.entitySwitch",K=I=>null;(0,i.attachComponentData)(K,w,!0);const ne=I=>{var A,T;const{entity:q,loading:ue}=(0,oe.useAsyncEntity)(),be=(0,i.useApiHolder)(),He=(0,i.useElementFilter)(I.children,x=>x.selectByComponentData({key:w,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(z=>{var le;if(ue)return[];const{if:k,children:J}=z.props;return q?[{if:(le=k==null?void 0:k(q,{apis:be}))!=null?le:!0,children:J}]:[{if:k===void 0,children:J}]}),[be,q,ue]);return He.some(x=>typeof x.if=="object"&&"then"in x.if)?t.createElement(me,{results:He}):(T=(A=He.find(x=>x.if))==null?void 0:A.children)!=null?T:null};function me({results:I}){const{loading:q,value:ue}=(0,C.default)(async()=>{var He;const be=I.map(async({if:lt,children:A})=>{try{if(await lt)return A}catch{}return null});return(He=(await Promise.all(be)).find(Boolean))!=null?He:null},[I]);return q||!ue?null:ue}ne.Case=K;const Oe=null,nt=oe.CatalogFilterLayout.Filters,Bt=oe.CatalogFilterLayout.Content,Mt=(0,i.createPlugin)({id:"catalog",apis:[(0,i.createApiFactory)({api:oe.catalogApiRef,deps:{discoveryApi:i.discoveryApiRef,fetchApi:i.fetchApiRef},factory:({discoveryApi:I,fetchApi:q})=>new zn.MS({discoveryApi:I,fetchApi:q})}),(0,i.createApiFactory)({api:oe.starredEntitiesApiRef,deps:{storageApi:i.storageApiRef},factory:({storageApi:I})=>new tt({storageApi:I})})],routes:{catalogIndex:_t._Z,catalogEntity:oe.entityRouteRef},externalRoutes:{createComponent:_t.yw,viewTechDoc:_t.jU}}),Un=Mt.provide((0,i.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(I=>I.CatalogPage),mountPoint:_t._Z})),Kn=Mt.provide((0,i.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(I=>I.CatalogEntityPage),mountPoint:oe.entityRouteRef})),Nr=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)}})),Zr=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)}})),Nn=Mt.provide((0,i.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(I=>I.HasSubcomponentsCard)}})),Dn=Mt.provide((0,i.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(I=>I.HasResourcesCard)}})),kn=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)}})),Er=Mt.provide((0,i.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(I=>I.DependsOnResourcesCard)}})),Wr=Mt.provide((0,i.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(I=>I.RelatedEntitiesCard)}}));var Yn=e(36356);class vr{constructor({configApi:q,discoveryApi:ue,identityApi:be}){_(this,"configApi");_(this,"discoveryApi");_(this,"identityApi");this.configApi=q,this.discoveryApi=ue,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,ue){const He=`${await this.getApiOrigin()}/${ue}`,lt=await fetch(`${He.endsWith("/")?He:`${He}/`}index.html`);if(lt.status===404)throw new Error("Page not found");return lt.text()}async syncEntityDocs(q){return"cached"}async getBaseUrl(q,ue,be){const He=await this.getApiOrigin();return new URL(q,`${He}/${be}`).toString()}}class Hr{constructor({configApi:q,discoveryApi:ue,identityApi:be}){_(this,"configApi");_(this,"discoveryApi");_(this,"identityApi");this.configApi=q,this.discoveryApi=ue,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 _n=[(0,i.createApiFactory)({api:m.Dl,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:I,discoveryApi:q,identityApi:ue})=>new vr({configApi:I,discoveryApi:q,identityApi:ue})}),(0,i.createApiFactory)({api:m.gT,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:I,discoveryApi:q,identityApi:ue})=>new Hr({configApi:I,discoveryApi:q,identityApi:ue})}),(0,i.createApiFactory)({api:Yn.q3,deps:{configApi:i.configApiRef},factory:({configApi:I})=>Yn.ae.fromConfig(I)})],yn={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},er={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function tr(){const I=await fetch("/.detect");return I.ok?(await I.text()).trim()==="techdocs-cli-server":!1}async function nr(){const I=await(0,a.defaultConfigLoader)(),q=await tr();return[...I,{context:"detected",data:q?yn:er}]}var Ar=e(86689),Rr=e(58845);const Sr=(0,mt.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Cr=()=>{const I=Sr();return t.createElement("svg",{className:I.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:I.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"}))};const Tr=(0,mt.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Pr=()=>{const I=Tr();return t.createElement("svg",{className:I.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:I.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"}))};const Ir=(0,mt.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}}),ur=()=>{const I=Ir(),{isOpen:q}=(0,t.useContext)(v.SidebarContext);return t.createElement("div",{className:I.root},t.createElement(Ar.Z,{component:b.OL,to:"/docs/default/component/local/",underline:"none",className:I.link},q?t.createElement(Cr,null):t.createElement(Pr,null)))},Lr=({children:I})=>t.createElement(v.SidebarPage,null,t.createElement(v.Sidebar,null,t.createElement(ur,null),t.createElement(v.SidebarDivider,null),t.createElement(v.SidebarItem,{icon:Rr.Z,to:"/docs/default/component/local",text:"Docs Preview"})),I);var dr=e(80030),en=e(32388),bn=e(4142);const Or=(0,mt.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 En;(function(I){const q="light";I.LIGHT=q;const ue="dark";I.DARK=ue})(En||(En={}));const Hn=()=>{const I=(0,i.useApi)(i.appThemeApiRef),q=Or(),[ue,be]=(0,t.useState)(I.getActiveThemeId()||En.LIGHT),He={[En.LIGHT]:{icon:bn.Z,title:"Dark theme"},[En.DARK]:{icon:en.Z,title:"Light theme"}},{title:lt,icon:A}=He[ue],T=()=>{be(x=>{const z=x===En.LIGHT?En.DARK:En.LIGHT;return I.setActiveThemeId(z),z})};return t.createElement(U.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(dr.ZP,{title:lt,arrow:!0},t.createElement(We.Z,{size:"small",onClick:T},t.createElement(A,{className:q.headerIcon}))))},jn=()=>t.createElement(S.TechDocsReaderPage,null,t.createElement(S.TechDocsReaderPageHeader,null),t.createElement(S.TechDocsReaderPageContent,{withSearch:!1})),xr=t.createElement(jn,null),fr=Me({apis:_n,configLoader:nr,plugins:Object.values(r)}),Dr=fr.getProvider(),rr=fr.getRouter(),Jn=S.techdocsPlugin.provide((0,m.KY)({name:"ThemeToggleAddon",component:Hn,location:m.oZ.Header})),jr=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(Kn,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)},xr,t.createElement(m.DR,null,t.createElement(Jn,null))));var mr=()=>t.createElement(Dr,null,t.createElement(rr,null,t.createElement(Lr,null,jr)));c.render(t.createElement(mr,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,g){const v=c(y);let b=t[v];return b||(b=g(),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(g){globalThis[`__@backstage/${y}__`]=createContext(createVersionedValueMap(g))},reset(){delete globalThis[`__@backstage/${y}__`]}}}function u(y){return Object.freeze(y),{atVersion(g){return y[g]}}}},53479:function(ee,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return $},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return P},EntityKindFilter:function(){return ae},EntityLifecyclePicker:function(){return Ke},EntityListProvider:function(){return Tt},EntityOwnerPicker:function(){return qt},EntityRefLink:function(){return se},EntityRefLinks:function(){return j},EntityTable:function(){return dt},EntityTagPicker:function(){return Zt},EntityTypePicker:function(){return gn},FavoriteEntity:function(){return Wn},InspectEntityDialog:function(){return xr},UnregisterEntityDialog:function(){return Vr},UserListPicker:function(){return He},catalogApiRef:function(){return c},entityRouteRef:function(){return Ut},getEntityRelations:function(){return Ie},getEntitySourceLocation:function(){return Be},humanizeEntityRef:function(){return Jt},starredEntitiesApiRef:function(){return f},useAsyncEntity:function(){return ce},useEntity:function(){return Q},useEntityList:function(){return _e},useEntityOwnership:function(){return dn},useEntityPermission:function(){return Je},useRelatedEntities:function(){return Ft},useStarredEntities:function(){return Vt}});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(T=>(T.next(new Set(this.starredEntities)),this.subscribers.add(T),()=>{this.subscribers.delete(T)})))}async toggleStarred(T){this.starredEntities.delete(T)||this.starredEntities.add(T);for(const x of this.subscribers)x.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var a=e(2784),i=e(41156),u=e(60364),y=e(77277),g=e(4190),v=e(95544),b=e(90436),L=e(60905),D=e(36444);const W=A=>{const T=(0,i.Z)(J=>J.breakpoints.down("md")),x=(0,u.Z)(),[z,k]=(0,a.useState)(!1);return T?a.createElement(a.Fragment,null,a.createElement(y.Z,{style:{marginTop:x.spacing(1),marginLeft:x.spacing(1)},onClick:()=>k(!0),startIcon:a.createElement(D.Z,null)},"Filters"),a.createElement(g.ZP,{open:z,onClose:()=>k(!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:x.spacing(1)}},"Filters"),A.children))):a.createElement(L.Z,{item:!0,lg:2},A.children)},M=A=>a.createElement(L.Z,{item:!0,xs:12,lg:10},A.children),P=A=>a.createElement(L.Z,{container:!0,style:{position:"relative"}},A.children);P.Filters=W,P.Content=M;var B=e(76241);const F=(0,B.CT)("entity-context"),$=({children:A,entity:T,loading:x,error:z,refresh:k})=>{const J={entity:T,loading:x,error:z,refresh:k};return a.createElement(F.Provider,{value:(0,B.EI)({1:J})},A)},G=A=>React.createElement($,{entity:A.entity,loading:!Boolean(A.entity),error:void 0,refresh:void 0,children:A.children});function Q(){const A=(0,B.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const T=A.atVersion(1);if(!T)throw new Error("EntityContext v1 not available");if(!T.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:T.entity}}function ce(){const A=(0,B.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const T=A.atVersion(1);if(!T)throw new Error("EntityContext v1 not available");const{entity:x,loading:z,error:k,refresh:J}=T;return{entity:x,loading:z,error:k,refresh:J}}var we=e(76635),xe=e(19126),de=e.n(xe),Ue=e(10289),re=e(69294),Se=e(48760),Ne=e(90736);function ze(A){return A.reduce((T,x)=>({...T,...x.getCatalogFilters?x.getCatalogFilters():{}}),{})}function ke(A){return T=>A.every(x=>!x.filterEntity||x.filterEntity(T))}var ve=e(48023);function Ie(A,T,x){var k;let z=((k=A==null?void 0:A.relations)==null?void 0:k.filter(J=>J.type===T).map(J=>(0,ve.of)(J.targetRef)))||[];return x!=null&&x.kind&&(z=z.filter(J=>J.kind.toLocaleLowerCase("en-US")===x.kind.toLocaleLowerCase("en-US"))),z}function Be(A,T){var z;const x=(z=A.metadata.annotations)==null?void 0:z[ve.M6];if(!!x)try{const k=(0,ve.Ou)(x),J=T.byUrl(k.target);return{locationTargetUrl:k.target,integrationType:J==null?void 0:J.type}}catch{return}}function je(A,T){const x=new Set([...getEntityRelations(A,RELATION_MEMBER_OF,{kind:"group"}),...A?[getCompoundEntityRef(A)]:[]].map(stringifyEntityRef)),z=getEntityRelations(T,RELATION_OWNED_BY).map(stringifyEntityRef);for(const k of z)if(x.has(k))return!0;return!1}const at=(0,a.createContext)(void 0),Tt=({children:A})=>{const T=(0,Ne.default)(),x=(0,t.useApi)(c),[z,k]=(0,a.useState)({}),J=(0,Ue.TH)(),le=(0,a.useMemo)(()=>{var Ge;return(Ge=de().parse(J.search,{ignoreQueryPrefix:!0}).filters)!=null?Ge:{}},[J]),[ye,Pe]=(0,a.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:Le,error:Ce},Fe]=(0,re.default)(async()=>{var Kt;const Ge=(0,we.compact)(Object.values(z)),Ze=ke(Ge),St=ze(Ge),wt=ze((0,we.compact)(Object.values(ye.appliedFilters))),Fn=Object.keys(z).reduce((an,fn)=>{const vn=z[fn];return vn!=null&&vn.toQueryValue&&(an[fn]=vn.toQueryValue()),an},{});if((0,we.isEqual)(wt,St))Pe({appliedFilters:z,backendEntities:ye.backendEntities,entities:ye.backendEntities.filter(Ze)});else{const an=await x.getEntities({filter:St});Pe({appliedFilters:z,backendEntities:an.items,entities:an.items.filter(Ze)})}if(T()){const an=de().parse(J.search,{ignoreQueryPrefix:!0}),fn=de().stringify({...an,filters:Fn},{addQueryPrefix:!0,arrayFormat:"repeat"}),vn=`${window.location.pathname}${fn}`;(Kt=window.history)==null||Kt.replaceState(null,document.title,vn)}},[x,le,z,ye],{loading:!0});(0,Se.Z)(Fe,10,[z]);const $e=(0,a.useCallback)(Ge=>{k(Ze=>{const St=typeof Ge=="function"?Ge(Ze):Ge;return{...Ze,...St}})},[]),ft=(0,a.useMemo)(()=>({filters:ye.appliedFilters,entities:ye.entities,backendEntities:ye.backendEntities,updateFilters:$e,queryParameters:le,loading:Le,error:Ce}),[ye,$e,le,Le,Ce]);return a.createElement(at.Provider,{value:ft},A)};function _e(){const A=(0,a.useContext)(at);if(!A)throw new Error("useEntityList must be used within EntityListProvider");return A}var st=e(64279),Qe=e(18149),et=e.n(Qe),$t=e(829),jt=e.n($t);const Ut=(0,B.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function xn(A){var T,x;return{kind:A.kind.toLocaleLowerCase("en-US"),namespace:(x=(T=A.metadata.namespace)==null?void 0:T.toLocaleLowerCase("en-US"))!=null?x:DEFAULT_NAMESPACE,name:A.metadata.name}}function Jt(A,T){const x=T==null?void 0:T.defaultKind;let z,k,J;return"metadata"in A?(z=A.kind,k=A.metadata.namespace,J=A.metadata.name):(z=A.kind,k=A.namespace,J=A.name),k===ve.zG&&(k=void 0),z=z.toLocaleLowerCase("en-US"),z=x&&x.toLocaleLowerCase("en-US")===z?void 0:z,`${z?`${z}:`:""}${k?`${k}/`:""}${J}`}var vt=e(53492),un=e(80030);const se=(0,a.forwardRef)((A,T)=>{var Ge;const{entityRef:x,defaultKind:z,title:k,children:J,...le}=A,ye=(0,t.useRouteRef)(Ut);let Pe,Le,Ce;if(typeof x=="string"){const Ze=(0,ve.of)(x);Pe=Ze.kind,Le=Ze.namespace,Ce=Ze.name}else"metadata"in x?(Pe=x.kind,Le=x.metadata.namespace,Ce=x.metadata.name):(Pe=x.kind,Le=x.namespace,Ce=x.name);Pe=Pe.toLocaleLowerCase("en-US"),Le=(Ge=Le==null?void 0:Le.toLocaleLowerCase("en-US"))!=null?Ge:ve.zG;const Fe={kind:Pe,namespace:Le,name:Ce},$e=Jt({kind:Pe,namespace:Le,name:Ce},{defaultKind:z}),ft=a.createElement(vt.Link,{...le,ref:T,to:ye(Fe)},J,!J&&(k!=null?k:$e));return k?a.createElement(un.ZP,{title:$e},ft):ft});function j(A){const{entityRefs:T,defaultKind:x,...z}=A;return a.createElement(a.Fragment,null,T.map((k,J)=>a.createElement(a.Fragment,{key:J},J>0&&", ",a.createElement(se,{...z,entityRef:k,defaultKind:x}))))}class ae{constructor(T){this.value=T}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class fe{constructor(T){this.value=T}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class he{constructor(T){this.values=T}filterEntity(T){return this.values.every(x=>{var z;return((z=T.metadata.tags)!=null?z:[]).includes(x)})}toQueryValue(){return this.values}}class Te{constructor(T){this.value=T}filterEntity(T){var z;const x=this.value.toLocaleUpperCase("en-US");return T.metadata.name.toLocaleUpperCase("en-US").includes(x)||`${T.metadata.title}`.toLocaleUpperCase("en-US").includes(x)||((z=T.metadata.tags)==null?void 0:z.join("").toLocaleUpperCase("en-US").indexOf(x))!==-1}}class Me{constructor(T){this.values=T}filterEntity(T){return this.values.some(x=>Ie(T,ve.S4).some(z=>Jt(z,{defaultKind:"group"})===x))}toQueryValue(){return this.values}}class De{constructor(T){this.values=T}filterEntity(T){return this.values.some(x=>{var z;return((z=T.spec)==null?void 0:z.lifecycle)===x})}toQueryValue(){return this.values}}class Ye{constructor(T,x,z){this.value=T,this.isOwnedEntity=x,this.isStarredEntity=z}filterEntity(T){switch(this.value){case"owned":return this.isOwnedEntity(T);case"starred":return this.isStarredEntity(T);default:return!0}}toQueryValue(){return this.value}}function it(){var Ze;const A=(0,t.useApi)(c),{filters:{kind:T,type:x},queryParameters:{type:z},updateFilters:k}=_e(),J=(0,a.useMemo)(()=>[z].flat().filter(Boolean),[z]),[le,ye]=(0,a.useState)(J.length?J:(Ze=x==null?void 0:x.getTypes())!=null?Ze:[]);(0,a.useEffect)(()=>{J.length&&ye(J)},[J]);const[Pe,Le]=(0,a.useState)([]),Ce=(0,a.useMemo)(()=>T==null?void 0:T.value,[T]),{error:Fe,loading:$e,value:ft}=(0,st.default)(async()=>Ce?await A.getEntityFacets({filter:{kind:Ce},facets:["spec.type"]}).then(wt=>wt.facets["spec.type"]||[]):[],[Ce,A]),Ge=(0,a.useRef)(ft);return(0,a.useEffect)(()=>{const St=Ge.current;if(Ge.current=ft,$e||!Ce||St===ft||!ft)return;const wt=jt()(ft,Kt=>-Kt.count).map(Kt=>Kt.value);Le(wt);const Fn=le.filter(Kt=>wt.includes(Kt));et()(le,Fn)||ye(Fn)},[$e,Ce,le,ye,ft]),(0,a.useEffect)(()=>{k({type:le.length?new fe(le):void 0})},[le,k]),{loading:$e,error:Fe,availableTypes:Pe,selectedTypes:le,setSelectedTypes:ye}}const Nt=20;function Ft(A,T){var Pe,Le;const x=(Pe=T==null?void 0:T.type)==null?void 0:Pe.toLocaleLowerCase("en-US"),z=(Le=T==null?void 0:T.kind)==null?void 0:Le.toLocaleLowerCase("en-US"),k=(0,t.useApi)(c),{loading:J,value:le,error:ye}=(0,st.default)(async()=>{var Ge;const Ce=(Ge=A.relations)==null?void 0:Ge.map(Ze=>({type:Ze.type,target:(0,ve.of)(Ze.targetRef)})).filter(Ze=>(!x||Ze.type.toLocaleLowerCase("en-US")===x)&&(!z||Ze.target.kind===z));if(!Ce)return[];const Fe=Object.values((0,we.groupBy)(Ce,({target:Ze})=>`${Ze.kind}:${Ze.namespace}`.toLocaleLowerCase("en-US"))),$e=[];for(const Ze of Fe)$e.push({kind:Ze[0].target.kind,namespace:Ze[0].target.namespace,nameBatches:(0,we.chunk)(Ze.map(St=>St.target.name),Nt)});return(await Promise.all($e.flatMap(Ze=>Ze.nameBatches.map(St=>k.getEntities({filter:{kind:Ze.kind,"metadata.namespace":Ze.namespace,"metadata.name":St}}))))).flatMap(Ze=>Ze.items)},[A,x,z]);return{entities:le,loading:J,error:ye}}var tt=e(72164);function Lt(A){return typeof A=="string"?A:(0,ve.eE)(A)}function Vt(){const A=(0,t.useApi)(f),T=(0,tt.Z)(A.starredEntitie$(),new Set),x=(0,a.useCallback)(k=>T.has(Lt(k)),[T]),z=(0,a.useCallback)(k=>A.toggleStarred(Lt(k)).then(),[A]);return{starredEntities:T,toggleStarredEntity:z,isStarredEntity:x}}function mt(A){return typeof A=="string"?A:(0,ve.eE)(A)}function hn(A){const T=(0,t.useApi)(f),[x,z]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{const J=T.starredEntitie$().subscribe({next(le){z(le.has(mt(A)))}});return()=>{J.unsubscribe()}},[A,T]),{toggleStarredEntity:(0,a.useCallback)(()=>T.toggleStarred(mt(A)).then(),[A,T]),isStarredEntity:x}}function dn(){const A=(0,t.useApi)(t.identityApiRef),{loading:T,value:x}=(0,st.default)(async()=>{const{ownershipEntityRefs:k}=await A.getBackstageIdentity();return k},[]),z=(0,a.useMemo)(()=>{const k=new Set(x!=null?x:[]);return J=>{const le=Ie(J,ve.S4).map(ve.eE);for(const ye of le)if(k.has(ye))return!0;return!1}},[x]);return(0,a.useMemo)(()=>({loading:T,isOwnedEntity:z}),[T,z])}var bt=e(68099);function Je(A){const{entity:T,loading:x,error:z}=ce(),{allowed:k,loading:J,error:le}=(0,bt.gI)({permission:A,resourceRef:T?(0,ve.eE)(T):void 0});return x||J?{loading:!0,allowed:!1}:z?{loading:!1,allowed:!1,error:z}:{loading:!1,allowed:k,error:le}}const oe=A=>{var le;const{initialFilter:T,hidden:x}=A,{updateFilters:z,queryParameters:{kind:k}}=useEntityList(),[J]=useState((le=[k].flat()[0])!=null?le:T);return useEffect(()=>{z({kind:J?new EntityKindFilter(J):void 0})},[J,z]),x?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var U=e(79692),R=e(5806),V=e(21324),ie=e(86619),ge=e(19996),Re=e(25505),We=e(38016),Xe=e(88013);const ct=(0,U.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),gt=a.createElement(Re.Z,{fontSize:"small"}),ht=a.createElement(ge.Z,{fontSize:"small"}),Ke=()=>{var Le,Ce;const A=ct(),{updateFilters:T,backendEntities:x,filters:z,queryParameters:{lifecycles:k}}=_e(),J=(0,a.useMemo)(()=>[k].flat().filter(Boolean),[k]),[le,ye]=(0,a.useState)(J.length?J:(Ce=(Le=z.lifecycles)==null?void 0:Le.values)!=null?Ce:[]);(0,a.useEffect)(()=>{J.length&&ye(J)},[J]),(0,a.useEffect)(()=>{T({lifecycles:le.length?new De(le):void 0})},[le,T]);const Pe=(0,a.useMemo)(()=>[...new Set(x.map(Fe=>{var $e;return($e=Fe.spec)==null?void 0:$e.lifecycle}).filter(Boolean))].sort(),[x]);return Pe.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:Pe,value:le,onChange:(Fe,$e)=>ye($e),renderOption:(Fe,{selected:$e})=>a.createElement(R.Z,{control:a.createElement(V.Z,{icon:gt,checkedIcon:ht,checked:$e}),label:Fe}),size:"small",popupIcon:a.createElement(We.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:Fe=>a.createElement(ie.Z,{...Fe,className:A.input,variant:"outlined"})})):null},Ot=(0,U.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),qe=a.createElement(Re.Z,{fontSize:"small"}),ut=a.createElement(ge.Z,{fontSize:"small"}),qt=()=>{var Le,Ce;const A=Ot(),{updateFilters:T,backendEntities:x,filters:z,queryParameters:{owners:k}}=_e(),J=(0,a.useMemo)(()=>[k].flat().filter(Boolean),[k]),[le,ye]=(0,a.useState)(J.length?J:(Ce=(Le=z.owners)==null?void 0:Le.values)!=null?Ce:[]);(0,a.useEffect)(()=>{J.length&&ye(J)},[J]),(0,a.useEffect)(()=>{T({owners:le.length?new Me(le):void 0})},[le,T]);const Pe=(0,a.useMemo)(()=>[...new Set(x.flatMap(Fe=>Ie(Fe,ve.S4).map($e=>Jt($e,{defaultKind:"group"}))).filter(Boolean))].sort(),[x]);return Pe.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:Pe,value:le,onChange:(Fe,$e)=>ye($e),renderOption:(Fe,{selected:$e})=>a.createElement(R.Z,{control:a.createElement(V.Z,{icon:qe,checkedIcon:ut,checked:$e}),label:Fe}),size:"small",popupIcon:a.createElement(We.Z,{"data-testid":"owner-picker-expand"}),renderInput:Fe=>a.createElement(ie.Z,{...Fe,className:A.input,variant:"outlined"})})):null},nn=(0,U.Z)(A=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),pt=()=>{var J,le;const A=nn(),{filters:T,updateFilters:x}=useEntityList(),[z,k]=useState((le=(J=T.text)==null?void 0:J.value)!=null?le:"");return useDebounce(()=>{x({text:z.length?new EntityTextFilter(z):void 0})},250,[z,x]),React.createElement(Toolbar,{className:A.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:A.input,placeholder:"Search",autoComplete:"off",onChange:ye=>k(ye.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:()=>k(""),edge:"end",disabled:z.length===0},React.createElement(Clear,null)))})))},yt=Object.freeze({createEntityRefColumn(A){const{defaultKind:T}=A;function x(z){var k;return((k=z.metadata)==null?void 0:k.title)||Jt(z,{defaultKind:T})}return{title:"Name",highlight:!0,customFilterAndSearch(z,k){return x(k).includes(z)},customSort(z,k){return x(z).localeCompare(x(k))},render:z=>{var k;return a.createElement(se,{entityRef:z,defaultKind:T,title:(k=z.metadata)==null?void 0:k.title})}}},createEntityRelationColumn({title:A,relation:T,defaultKind:x,filter:z}){function k(le){return Ie(le,T,z)}function J(le){return k(le).map(ye=>Jt(ye,{defaultKind:x})).join(", ")}return{title:A,customFilterAndSearch(le,ye){return J(ye).includes(le)},customSort(le,ye){return J(le).localeCompare(J(ye))},render:le=>a.createElement(j,{entityRefs:k(le),defaultKind:x})}},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:A=>a.createElement(vt.OverflowTooltip,{text:A.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()],xt=(0,U.Z)(A=>({empty:{padding:A.spacing(2),display:"flex",justifyContent:"center"}})),dt=A=>{const{entities:T,title:x,emptyContent:z,variant:k="gridItem",columns:J}=A,le=xt(),ye={minWidth:"0",width:"100%"};return k==="gridItem"&&(ye.height="calc(100% - 10px)"),a.createElement(vt.Table,{columns:J,title:x,style:ye,emptyContent:z&&a.createElement("div",{className:le.empty},z),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:T})};dt.columns=yt,dt.systemEntityColumns=rn,dt.componentEntityColumns=cn;const Et=(0,U.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),At=a.createElement(Re.Z,{fontSize:"small"}),Rt=a.createElement(ge.Z,{fontSize:"small"}),Zt=()=>{var Le,Ce;const A=Et(),{updateFilters:T,filters:x,queryParameters:{tags:z}}=_e(),k=(0,t.useApi)(c),{value:J}=(0,st.default)(async()=>{var ft;const Fe="metadata.tags",{facets:$e}=await k.getEntityFacets({facets:[Fe],filter:(ft=x.kind)==null?void 0:ft.getCatalogFilters()});return $e[Fe].map(({value:Ge})=>Ge)},[x.kind]),le=(0,a.useMemo)(()=>[z].flat().filter(Boolean),[z]),[ye,Pe]=(0,a.useState)(le.length?le:(Ce=(Le=x.tags)==null?void 0:Le.values)!=null?Ce:[]);return(0,a.useEffect)(()=>{le.length&&Pe(le)},[le]),(0,a.useEffect)(()=>{T({tags:ye.length?new he(ye):void 0})},[ye,T]),J!=null&&J.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:J,value:ye,onChange:(Fe,$e)=>Pe($e),renderOption:(Fe,{selected:$e})=>a.createElement(R.Z,{control:a.createElement(V.Z,{icon:At,checkedIcon:Rt,checked:$e}),label:Fe}),size:"small",popupIcon:a.createElement(We.Z,{"data-testid":"tag-picker-expand"}),renderInput:Fe=>a.createElement(ie.Z,{...Fe,className:A.input,variant:"outlined"})})):null};var zt=e(82108),on=e.n(zt);const gn=A=>{var Le;const{hidden:T,initialFilter:x}=A,z=(0,t.useApi)(t.alertApiRef),{error:k,availableTypes:J,selectedTypes:le,setSelectedTypes:ye}=it();if((0,a.useEffect)(()=>{k&&z.post({message:"Failed to load entity types",severity:"error"}),x&&ye([x])},[k,z,x,ye]),J.length===0||k)return null;const Pe=[{value:"all",label:"All"},...J.map(Ce=>({value:Ce,label:on()(Ce)}))];return T?null:a.createElement(v.Z,{pb:1,pt:1},a.createElement(vt.Select,{label:"Type",items:Pe,selected:(Le=Pe.length>1?le[0]:void 0)!=null?Le:"all",onChange:Ce=>ye(Ce==="all"?[]:[String(Ce)])}))};var Tn=e(15459),_t=e(61837),pn=e(11640),qn=e(28347);const zn=(0,Tn.Z)({root:{color:"#f3ba37"}})(pn.Z),Wn=A=>{const{toggleStarredEntity:T,isStarredEntity:x}=hn(A.entity);return a.createElement(_t.Z,{"aria-label":"favorite",color:"inherit",...A,onClick:()=>T()},a.createElement(un.ZP,{title:x?"Remove from favorites":"Add to favorites"},x?a.createElement(zn,null):a.createElement(qn.Z,null)))};var $n=e(8629),Z=e(79249),h=e(38724),C=e(99152),w=e(6487),K=e(49429),ne=e(55999),me=e(72779),Oe=e.n(me),nt=e(39412);const Bt=nt.Z;function Mt(A,T){if(A)return A.toLocaleLowerCase("en-US");if(T)try{return(0,ve.of)(T).kind.toLocaleLowerCase("en-US")}catch{return}}function Un(A,T){const x=(0,t.useApp)(),z=Mt(A,T);return z&&x.getSystemIcon(`kind:${z}`)||Bt}function Kn(A){const{kind:T,entityRef:x,...z}=A,k=Un(T,x);return a.createElement(k,{...z})}const Nr=(0,U.Z)(A=>({node:{fill:A.palette.grey[300],stroke:A.palette.grey[300],"&.primary":{fill:A.palette.primary.light,stroke:A.palette.primary.light},"&.secondary":{fill:A.palette.secondary.light,stroke:A.palette.secondary.light}},text:{fill:A.palette.getContrastText(A.palette.grey[300]),"&.primary":{fill:A.palette.primary.contrastText},"&.secondary":{fill:A.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function ir(A){const T=(0,t.useApi)(c),x=(0,ve.eE)(A),{loading:z,error:k,value:J}=(0,st.default)(async()=>{const le=await T.getEntityAncestors({entityRef:x}),ye=new Array,Pe=new Array;for(const Le of le.items){const Ce=(0,ve.eE)(Le.entity),Fe=Ce===le.rootEntityRef;ye.push({id:Ce,root:Fe,...Le.entity});for(const $e of Le.parentEntityRefs)Pe.push({from:Ce,to:$e})}return{nodes:ye,edges:Pe}},[x]);return{loading:z,error:k,nodes:(J==null?void 0:J.nodes)||[],edges:(J==null?void 0:J.edges)||[]}}function Zr({node:A}){const T=Nr(),x=(0,Ue.s0)(),z=(0,t.useRouteRef)(Ut),[k,J]=(0,a.useState)(0),[le,ye]=(0,a.useState)(0),Pe=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{if(Pe.current){let{height:St,width:wt}=Pe.current.getBBox();St=Math.round(St),wt=Math.round(wt),(St!==le||wt!==k)&&(J(wt),ye(St))}},[k,le]);const Le=10,Ce=le,Fe=Ce+Le,$e=Fe+k+Le*2,ft=le+Le*2,Ge=A.metadata.title||(A.kind&&A.metadata.name&&A.metadata.namespace?Jt({kind:A.kind,name:A.metadata.name,namespace:A.metadata.namespace||""}):A.id),Ze=()=>{x(z({kind:A.kind,namespace:A.metadata.namespace||ve.zG,name:A.metadata.name}))};return a.createElement("g",{onClick:Ze,className:T.clickable},a.createElement("rect",{className:Oe()(T.node,A.root?"secondary":"primary"),width:$e,height:ft,rx:10}),a.createElement(Kn,{kind:A.kind,y:Le,x:Le,width:Ce,height:Ce,className:Oe()(T.text,A.root?"secondary":"primary")}),a.createElement("text",{ref:Pe,className:Oe()(T.text,A.root?"secondary":"primary"),y:ft/2,x:Fe+(k+Le*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},Ge))}function zr(A){const{loading:T,error:x,nodes:z,edges:k}=ir(A.entity);return T?a.createElement(vt.Progress,null):x?a.createElement(vt.ResponseErrorPanel,{error:x}):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(vt.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(vt.DependencyGraph,{nodes:z,edges:k,renderNode:Zr,direction:vt.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var Nn=e(11776),Dn=e(38402),kn=e(86136),lr=e(99688),Er=e(49378),Wr=e(54506),Yn=e(94339),vr=e(24579),Hr=e(27685);const _n=(0,U.Z)(A=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:A.spacing(2)},helpIcon:{marginLeft:A.spacing(1),color:A.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function yn(A){const T=_n();return a.createElement(Er.Z,{...A,primaryTypographyProps:{className:T.monospace},secondaryTypographyProps:{className:T.monospace}})}function er(A){const T=_n();return a.createElement(Wr.Z,{className:T.monospace},A.children)}function tr(A){return a.createElement(v.Z,{mt:2},a.createElement(Yn.Z,{variant:"outlined"},a.createElement(vr.Z,null,a.createElement(b.Z,{variant:"h6",gutterBottom:!0},A.title,A.helpLink&&a.createElement(Ar,{to:A.helpLink})),A.children)))}function nr(A){const[T,x]=A.entry;return a.createElement(Dn.Z,null,A.indent&&a.createElement(kn.Z,null),a.createElement(yn,{primary:T,secondary:x.match(/^url:https?:\/\//)?a.createElement(a.Fragment,null,x.substring(0,4),a.createElement(vt.Link,{to:x.substring(4)},x.substring(4))):x}))}function Ar(A){const T=_n();return a.createElement(vt.Link,{to:A.to,className:T.helpIcon},a.createElement(Hr.Z,{fontSize:"inherit"}))}const Rr=(0,U.Z)({root:{display:"flex",flexDirection:"column"}});function Sr(A){var Pe,Le;const T=(0,t.useApi)(c),x=(0,ve.eE)(A),z=(Pe=A.metadata.annotations)==null?void 0:Pe[ve.P1],k=(Le=A.metadata.annotations)==null?void 0:Le[ve.q1],{loading:J,error:le,value:ye}=(0,st.default)(async()=>!z&&!k?[]:(await T.getEntities({filter:[...z?[{[`metadata.annotations.${ve.P1}`]:z}]:[],...k?[{[`metadata.annotations.${ve.q1}`]:k}]:[]]})).items,[z,k]);return{loading:J,error:le,location:z,originLocation:k,colocatedEntities:ye==null?void 0:ye.filter(Ce=>(0,ve.eE)(Ce)!==x)}}function cr(A){return a.createElement(Nn.Z,{dense:!0},A.header&&a.createElement(nr,{key:"header",entry:A.header}),A.entities.map(T=>a.createElement(Dn.Z,{key:(0,ve.eE)(T)},a.createElement(kn.Z,null,a.createElement(Kn,{kind:T.kind})),a.createElement(yn,{primary:a.createElement(se,{entityRef:T})}))))}function Cr(A){const{entity:T}=A,{loading:x,error:z,location:k,originLocation:J,colocatedEntities:le}=Sr(T);if(x)return a.createElement(vt.Progress,null);if(z)return a.createElement(vt.ResponseErrorPanel,{error:z});if(!k&&!J)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(k===J)return a.createElement(cr,{entities:le});const ye=le.filter(Le=>{var Ce;return((Ce=Le.metadata.annotations)==null?void 0:Ce[ve.P1])===k}),Pe=le.filter(Le=>{var Ce;return((Ce=Le.metadata.annotations)==null?void 0:Ce[ve.q1])===J});return a.createElement(a.Fragment,null,ye.length>0&&a.createElement(cr,{entities:ye,header:["At the same location",k]}),Pe.length>0&&a.createElement(cr,{entities:Pe,header:["At the same origin",J]}))}function Tr(A){const T=Rr();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:T.root},a.createElement(Cr,{entity:A.entity})))}function br(A){return Object.fromEntries([...Object.entries(A)].sort((T,x)=>T[0]<x[0]?-1:1))}function Pr(A){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(vt.CodeSnippet,{text:JSON.stringify(br(A.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var Ir=e(3440),ur=e.n(Ir);const Lr=(0,U.Z)({root:{display:"flex",flexDirection:"column"}});function dr(A){var Le,Ce;const T=Lr(),{apiVersion:x,kind:z,metadata:k,spec:J,relations:le=[],status:ye={}}=A.entity,Pe=ur()(jt()(le,Fe=>Fe.targetRef),"type");return a.createElement(a.Fragment,null,a.createElement(ne.Z,{variant:"h2"},"Overview"),a.createElement("div",{className:T.root},a.createElement(tr,{title:"Identity"},a.createElement(Nn.Z,{dense:!0},a.createElement(Dn.Z,null,a.createElement(yn,{primary:"apiVersion",secondary:x})),a.createElement(Dn.Z,null,a.createElement(yn,{primary:"kind",secondary:z})),(J==null?void 0:J.type)&&a.createElement(Dn.Z,null,a.createElement(yn,{primary:"spec.type",secondary:J.type})),k.uid&&a.createElement(Dn.Z,null,a.createElement(yn,{primary:"uid",secondary:k.uid})),k.etag&&a.createElement(Dn.Z,null,a.createElement(yn,{primary:"etag",secondary:k.etag})))),a.createElement(tr,{title:"Metadata"},!!Object.keys(k.annotations||{}).length&&a.createElement(Nn.Z,{dense:!0,subheader:a.createElement(er,null,"Annotations",a.createElement(Ar,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(k.annotations).map(Fe=>a.createElement(nr,{key:Fe[0],indent:!0,entry:Fe}))),!!Object.keys(k.labels||{}).length&&a.createElement(Nn.Z,{dense:!0,subheader:a.createElement(er,null,"Labels")},Object.entries(k.labels).map(Fe=>a.createElement(nr,{key:Fe[0],indent:!0,entry:Fe}))),!!((Le=k.tags)!=null&&Le.length)&&a.createElement(Nn.Z,{dense:!0,subheader:a.createElement(er,null,"Tags")},k.tags.map((Fe,$e)=>a.createElement(Dn.Z,{key:`${Fe}-${$e}`},a.createElement(kn.Z,null),a.createElement(yn,{primary:Fe}))))),!!le.length&&a.createElement(tr,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Pe).map(([Fe,$e],ft)=>a.createElement("div",{key:ft},a.createElement(Nn.Z,{dense:!0,subheader:a.createElement(er,null,Fe)},$e.map(Ge=>a.createElement(Dn.Z,{key:Ge.targetRef},a.createElement(kn.Z,null,a.createElement(Kn,{entityRef:Ge.targetRef})),a.createElement(yn,{primary:a.createElement(se,{entityRef:Ge.targetRef})}))))))),!!((Ce=ye.items)!=null&&Ce.length)&&a.createElement(tr,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},ye.items.map((Fe,$e)=>a.createElement("div",{key:$e},a.createElement(b.Z,null,Fe.level,": ",Fe.type),a.createElement(v.Z,{ml:2},Fe.message))))))}var en=e(60155),bn=e.n(en);function Or(A){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(vt.CodeSnippet,{text:bn().stringify(br(A.entity)),language:"yaml",showCopyCodeButton:!0}))))}const En=(0,U.Z)(A=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:A.palette.background.paper},tabs:{borderRight:`1px solid ${A.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function Hn(A){const{children:T,value:x,index:z,...k}=A,J=En();return a.createElement("div",{role:"tabpanel",hidden:x!==z,id:`vertical-tabpanel-${z}`,"aria-labelledby":`vertical-tab-${z}`,className:J.tabContents,...k},x===z&&a.createElement(v.Z,{pl:3,pr:3},T))}function jn(A){return{id:`vertical-tab-${A}`,"aria-controls":`vertical-tabpanel-${A}`}}function xr(A){const T=En(),[x,z]=a.useState(0);return(0,a.useEffect)(()=>{z(0)},[A.open]),A.entity?a.createElement($n.Z,{fullWidth:!0,maxWidth:"xl",open:A.open,onClose:A.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:T.fullHeightDialog}},a.createElement(Z.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),a.createElement(h.Z,{dividers:!0},a.createElement("div",{className:T.root},a.createElement(C.Z,{orientation:"vertical",variant:"scrollable",value:x,onChange:(k,J)=>z(J),"aria-label":"Inspector options",className:T.tabs},a.createElement(w.Z,{label:"Overview",...jn(0)}),a.createElement(w.Z,{label:"Ancestry",...jn(1)}),a.createElement(w.Z,{label:"Colocated",...jn(2)}),a.createElement(w.Z,{label:"Raw JSON",...jn(3)}),a.createElement(w.Z,{label:"Raw YAML",...jn(4)})),a.createElement(Hn,{value:x,index:0},a.createElement(dr,{entity:A.entity})),a.createElement(Hn,{value:x,index:1},a.createElement(zr,{entity:A.entity})),a.createElement(Hn,{value:x,index:2},a.createElement(Tr,{entity:A.entity})),a.createElement(Hn,{value:x,index:3},a.createElement(Pr,{entity:A.entity})),a.createElement(Hn,{value:x,index:4},a.createElement(Or,{entity:A.entity})))),a.createElement(K.Z,null,a.createElement(y.Z,{onClick:A.onClose,color:"primary"},"Close"))):null}var fr=e(85256);function Dr(A){var ft;const T=(0,t.useApi)(c),x=(ft=A.metadata.annotations)==null?void 0:ft[ve.q1],z=A.metadata.uid,k=x==="bootstrap:bootstrap",J=(0,st.default)(async()=>{const Ge=T.getLocationByRef(x);let Ze;if(!x)Ze=Promise.resolve([]);else{const St=`metadata.annotations.${ve.q1}`;Ze=T.getEntities({filter:{[St]:x},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(wt=>wt.items)}return Promise.all([Ge,Ze]).then(([St,wt])=>({location:St,colocatedEntities:wt}))},[T,A]),le=(0,a.useCallback)(async function(){const{location:Ze}=J.value;await T.removeLocationById(Ze.id)},[T,J]),ye=(0,a.useCallback)(async function(){await T.removeEntityByUid(z)},[T,z]);if(k)return{type:"bootstrap",location:x,deleteEntity:ye};const{loading:Pe,error:Le,value:Ce}=J;if(Pe)return{type:"loading"};if(Le)return{type:"error",error:Le};const{location:Fe,colocatedEntities:$e}=Ce;return Fe?{type:"unregister",location:x,colocatedEntities:$e.map(ve.iB),unregisterLocation:le,deleteEntity:ye}:{type:"only-delete",deleteEntity:ye}}var rr=e(10179);const Jn=(0,U.Z)({advancedButton:{fontSize:"0.7em"}}),jr=({entity:A,onConfirm:T})=>{var ft;const x=(0,t.useApi)(t.alertApiRef),z=(0,t.useApi)(t.configApiRef),k=Jn(),J=Dr(A),[le,ye]=(0,a.useState)(!1),[Pe,Le]=(0,a.useState)(!1),Ce=(ft=z.getOptionalString("app.title"))!=null?ft:"Backstage",Fe=(0,a.useCallback)(async function(){if("unregisterLocation"in J){Le(!0);try{await J.unregisterLocation(),T()}catch(Ze){(0,rr.BD)(Ze),x.post({message:Ze.message})}finally{Le(!1)}}},[x,T,J]),$e=(0,a.useCallback)(async function(){if("deleteEntity"in J){Le(!0);try{await J.deleteEntity(),T()}catch(Ze){(0,rr.BD)(Ze),x.post({message:Ze.message})}finally{Le(!1)}}},[x,T,J]);return J.type==="loading"?a.createElement(vt.Progress,null):J.type==="error"?a.createElement(vt.ResponseErrorPanel,{error:J.error}):J.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 "',J.location,'"). If you believe this is in error, please contact the ',Ce," ","integrator."),a.createElement(v.Z,{marginTop:2},!le&&a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:k.advancedButton,onClick:()=>ye(!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:Pe,onClick:$e},"Delete Entity")))):J.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:Pe,onClick:$e},"Delete Entity")):J.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"},J.colocatedEntities.map(Ge=>a.createElement("li",{key:`${Ge.kind}:${Ge.namespace}/${Ge.name}`},a.createElement(se,{entityRef:Ge})))),a.createElement(ne.Z,null,"Located at the following location:"),a.createElement(ne.Z,{component:"ul"},a.createElement("li",null,J.location)),a.createElement(ne.Z,null,"To undo, just re-register the entity in ",Ce,"."),a.createElement(v.Z,{marginTop:2},a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Pe,onClick:Fe},"Unregister Location"),!le&&a.createElement(v.Z,{component:"span",marginLeft:2},a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:k.advancedButton,onClick:()=>ye(!0)},"Advanced Options"))),le&&a.createElement(a.Fragment,null,a.createElement(v.Z,{paddingTop:4,paddingBottom:4},a.createElement(fr.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:Pe,onClick:$e},"Delete Entity"))):a.createElement(lr.Z,{severity:"error"},"Internal error: Unknown state")},Vr=A=>{const{open:T,onConfirm:x,onClose:z,entity:k}=A;return a.createElement($n.Z,{open:T,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(jr,{entity:k,onConfirm:x})),a.createElement(K.Z,null,a.createElement(y.Z,{onClick:z,color:"primary"},"Cancel")))};var mr=e(12231),I=e(9520),q=e(47603);const ue=(0,U.Z)(A=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:A.spacing(1,0,1,0)},title:{margin:A.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:A.palette.text.primary},menuItem:{minHeight:A.spacing(6)},groupWrapper:{margin:A.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function be(A){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:q.Z},{id:"starred",label:"Starred",icon:pn.Z}]},{name:A!=null?A:"Company",items:[{id:"all",label:"All"}]}]}const He=A=>{var Gr;const{initialFilter:T,availableFilters:x}=A,z=ue(),J=(Gr=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?Gr:"Company",{filters:le,updateFilters:ye,backendEntities:Pe,queryParameters:{kind:Le,user:Ce},loading:Fe}=_e(),$e=["starred","all"],ft=be(J).map(An=>({...An,items:An.items.filter(({id:kt})=>["group","user"].some(Br=>Br===Le)?$e.includes(kt):!x||x.includes(kt))})).filter(({items:An})=>!!An.length),{isStarredEntity:Ge}=Vt(),{isOwnedEntity:Ze,loading:St}=dn(),wt=Fe||St,Fn=(0,a.useMemo)(()=>new Ye("owned",Ze,Ge),[Ze,Ge]),Kt=(0,a.useMemo)(()=>new Ye("starred",Ze,Ge),[Ze,Ge]),an=(0,a.useMemo)(()=>[Ce].flat()[0],[Ce]),[fn,vn]=(0,a.useState)(an!=null?an:T),hr=(0,a.useMemo)(()=>Pe.filter(ke((0,we.compact)(Object.values({...le,user:void 0})))),[le,Pe]),Fr=(0,a.useMemo)(()=>({all:hr.length,starred:hr.filter(An=>Kt.filterEntity(An)).length,owned:hr.filter(An=>Fn.filterEntity(An)).length}),[hr,Kt,Fn]);return(0,a.useEffect)(()=>{an&&vn(an)},[an]),(0,a.useEffect)(()=>{!wt&&!!fn&&fn!=="all"&&Fr[fn]===0&&vn("all")},[wt,Fr,fn,vn]),(0,a.useEffect)(()=>{ye({user:fn?new Ye(fn,Ze,Ge):void 0})},[fn,Ze,Ge,ye]),a.createElement(Yn.Z,{className:z.root},ft.map(An=>a.createElement(a.Fragment,{key:An.name},a.createElement(b.Z,{variant:"subtitle2",className:z.title},An.name),a.createElement(Yn.Z,{className:z.groupWrapper},a.createElement(Nn.Z,{disablePadding:!0,dense:!0,role:"menu"},An.items.map(kt=>{var Br,no;return a.createElement(mr.Z,{key:kt.id,button:!0,divider:!0,onClick:()=>vn(kt.id),selected:kt.id===((Br=le.user)==null?void 0:Br.value),className:z.menuItem,disabled:Fr[kt.id]===0,"data-testid":`user-picker-${kt.id}`,tabIndex:0},kt.icon&&a.createElement(kn.Z,{className:z.listIcon},a.createElement(kt.icon,{fontSize:"small"})),a.createElement(Er.Z,null,a.createElement(b.Z,{variant:"body1"},kt.label)),a.createElement(I.Z,null,(no=Fr[kt.id])!=null?no:"-"))}))))))},lt=({children:A,value:T})=>{var ye;const[x,z]=useState((ye=T==null?void 0:T.filters)!=null?ye:{}),k=useCallback(Pe=>{z(Le=>{const Ce=typeof Pe=="function"?Pe(Le):Pe;return{...Le,...Ce}})},[]),J=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),le=useMemo(()=>{var Pe,Le,Ce,Fe,$e;return{entities:(Pe=T==null?void 0:T.entities)!=null?Pe:J.entities,backendEntities:(Le=T==null?void 0:T.backendEntities)!=null?Le:J.backendEntities,updateFilters:(Ce=T==null?void 0:T.updateFilters)!=null?Ce:k,filters:x,loading:(Fe=T==null?void 0:T.loading)!=null?Fe:!1,queryParameters:($e=T==null?void 0:T.queryParameters)!=null?$e:J.queryParameters,error:T==null?void 0:T.error}},[T,J,x,k]);return React.createElement(EntityListContext.Provider,{value:le},A)}},39398:function(ee,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return we},AboutContent:function(){return Q},AboutField:function(){return $}});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),g=e(24579),v=e(52866),b=e(30254),L=e(27604),D=e(2784),W=e(47851),M=e(60905),P=e(90436),B=e(7089);const F=(0,m.Z)(xe=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:xe.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function $(xe){const{label:de,value:Ue,gridSizes:re,children:Se}=xe,Ne=F(),ze=(0,c.useElementFilter)(Se,ve=>ve.getElements()),ke=ze.length>0?ze:D.createElement(P.Z,{variant:"body2",className:Ne.value},Ue||"unknown");return D.createElement(M.Z,{item:!0,...re},D.createElement(P.Z,{variant:"h2",className:Ne.label},de),ke)}const G=(0,m.Z)({description:{wordBreak:"break-word"}});function Q(xe){var _e,st,Qe,et,$t,jt;const{entity:de}=xe,Ue=G(),re=de.kind.toLocaleLowerCase("en-US")==="system",Se=de.kind.toLocaleLowerCase("en-US")==="resource",Ne=de.kind.toLocaleLowerCase("en-US")==="component",ze=de.kind.toLocaleLowerCase("en-US")==="api",ke=de.kind.toLocaleLowerCase("en-US")==="template",ve=de.kind.toLocaleLowerCase("en-US")==="location",Ie=de.kind.toLocaleLowerCase("en-US")==="group",Be=(0,S.getEntityRelations)(de,r.cz,{kind:"system"}),je=(0,S.getEntityRelations)(de,r.cz,{kind:"component"}),at=(0,S.getEntityRelations)(de,r.cz,{kind:"domain"}),Tt=(0,S.getEntityRelations)(de,r.S4);return D.createElement(M.Z,{container:!0},D.createElement($,{label:"Description",gridSizes:{xs:12}},D.createElement(P.Z,{variant:"body2",paragraph:!0,className:Ue.description},((_e=de==null?void 0:de.metadata)==null?void 0:_e.description)||"No description")),D.createElement($,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},Tt.length>0&&D.createElement(S.EntityRefLinks,{entityRefs:Tt,defaultKind:"group"})),(re||at.length>0)&&D.createElement($,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},at.length>0&&D.createElement(S.EntityRefLinks,{entityRefs:at,defaultKind:"domain"})),(ze||Ne||Se||Be.length>0)&&D.createElement($,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},Be.length>0&&D.createElement(S.EntityRefLinks,{entityRefs:Be,defaultKind:"system"})),Ne&&je.length>0&&D.createElement($,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},D.createElement(S.EntityRefLinks,{entityRefs:je,defaultKind:"component"})),(ze||Ne||Se||ke||Ie||ve||typeof((st=de==null?void 0:de.spec)==null?void 0:st.type)=="string")&&D.createElement($,{label:"Type",value:(Qe=de==null?void 0:de.spec)==null?void 0:Qe.type,gridSizes:{xs:12,sm:6,lg:4}}),(ze||Ne||typeof((et=de==null?void 0:de.spec)==null?void 0:et.lifecycle)=="string")&&D.createElement($,{label:"Lifecycle",value:($t=de==null?void 0:de.spec)==null?void 0:$t.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),D.createElement($,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((jt=de==null?void 0:de.metadata)==null?void 0:jt.tags)||[]).map(Ut=>D.createElement(B.Z,{key:Ut,size:"small",label:Ut}))))}const ce=(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 we(xe){var et,$t,jt;const{variant:de}=xe,Ue=ce(),{entity:re}=(0,S.useEntity)(),Se=(0,c.useApi)(f.q3),Ne=(0,c.useApi)(S.catalogApiRef),ze=(0,c.useApi)(c.alertApiRef),ke=(0,c.useRouteRef)(W.jU),ve=(0,S.getEntitySourceLocation)(re,Se),Ie=(et=re.metadata.annotations)==null?void 0:et[r.Tf],Be={label:"View Source",disabled:!ve,icon:D.createElement(f.nW,{type:ve==null?void 0:ve.integrationType}),href:ve==null?void 0:ve.locationTargetUrl},je={label:"View TechDocs",disabled:!(($t=re.metadata.annotations)!=null&&$t["backstage.io/techdocs-ref"])||!ke,icon:D.createElement(b.Z,null),href:ke&&ke({namespace:re.metadata.namespace||r.zG,kind:re.kind,name:re.metadata.name})};let at="";de==="gridItem"?at=Ue.gridItemCard:de==="fullHeight"&&(at=Ue.fullHeightCard);let Tt="";de==="gridItem"?Tt=Ue.gridItemCardContent:de==="fullHeight"&&(Tt=Ue.fullHeightCardContent);const _e=(jt=re.metadata.annotations)==null?void 0:jt[r.P1],st=(_e==null?void 0:_e.startsWith("url:"))||(_e==null?void 0:_e.startsWith("file:")),Qe=(0,D.useCallback)(async()=>{await Ne.refreshEntity((0,r.eE)(re)),ze.post({message:"Refresh scheduled",severity:"info"})},[Ne,ze,re]);return D.createElement(a.Z,{className:at},D.createElement(i.Z,{title:"About",action:D.createElement(D.Fragment,null,st&&D.createElement(u.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Qe},D.createElement(v.Z,null)),D.createElement(u.Z,{component:t.Link,"aria-label":"Edit",disabled:!Ie,title:"Edit Metadata",to:Ie!=null?Ie:"#"},D.createElement(L.Z,null))),subheader:D.createElement(t.HeaderIconLinkRow,{links:[Be,je]})}),D.createElement(y.Z,null),D.createElement(g.Z,{className:Tt},D.createElement(Q,{entity:re})))}},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 g=(0,t.Z)(b=>(0,c.Z)({root:{...b.typography.h4}}));function v(b){var xe;const{initialFilter:L="component",allowedKinds:D}=b,W=g(),M=(0,y.useApi)(i.catalogApiRef),{value:P}=(0,u.default)(async()=>await M.getEntityFacets({facets:["kind"]}).then(de=>{var Ue;return((Ue=de.facets.kind)==null?void 0:Ue.map(re=>re.value).sort())||[]})),{updateFilters:B,queryParameters:{kind:F}}=(0,i.useEntityList)(),$=(0,r.useMemo)(()=>{var de;return(de=[F].flat()[0])==null?void 0:de.toLocaleLowerCase("en-US")},[F]),[G,Q]=(0,r.useState)($!=null?$:L);(0,r.useEffect)(()=>{B({kind:G?new i.EntityKindFilter(G):void 0})},[G,B]),(0,r.useEffect)(()=>{$&&Q($)},[$]);const we=[(0,f.Z)(G)].concat((xe=P==null?void 0:P.filter(de=>D?D.some(Ue=>Ue.toLocaleLowerCase("en-US")===de.toLocaleLowerCase("en-US")):!0))!=null?xe:[]).sort().reduce((de,Ue)=>(de[Ue.toLocaleLowerCase("en-US")]=Ue,de),{});return r.createElement(S.Z,{input:r.createElement(m.Z,{value:G}),value:G,onChange:de=>Q(de.target.value),classes:W},Object.keys(we).map(de=>r.createElement(a.Z,{value:de,key:de},`${we[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(D){function W(M){var P;return((P=M.metadata)==null?void 0:P.title)||(0,t.humanizeEntityRef)(M,{defaultKind:D==null?void 0:D.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:M},{entity:P}){return W(M).localeCompare(W(P))},render:({entity:M})=>{var P;return m.createElement(t.EntityRefLink,{entityRef:M,defaultKind:(D==null?void 0:D.defaultKind)||"Component",title:(P=M.metadata)==null?void 0:P.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:D})=>m.createElement(t.EntityRefLinks,{entityRefs:D.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:D})=>m.createElement(t.EntityRefLinks,{entityRefs:D.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:D})=>m.createElement(i.OverflowTooltip,{text:D.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:D})=>m.createElement(m.Fragment,null,D.metadata.tags&&D.metadata.tags.map(W=>m.createElement(a.Z,{key:W,label:W,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}});var y=e(28347),g=e(15459),v=e(11640);const b=(0,g.Z)({root:{color:"#f3ba37"}})(v.Z),L=D=>{var ze,ke,ve;const{columns:W,actions:M,tableOptions:P}=D,{isStarredEntity:B,toggleStarredEntity:F}=(0,t.useStarredEntities)(),{loading:$,error:G,entities:Q,filters:ce}=(0,t.useEntityList)(),we=(0,m.useMemo)(()=>{var Be;return[u.createNameColumn({defaultKind:(Be=ce.kind)==null?void 0:Be.value}),...Ie(),u.createMetadataDescriptionColumn(),u.createTagsColumn()];function Ie(){var je;switch((je=ce.kind)==null?void 0:je.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()]}}},[(ze=ce.kind)==null?void 0:ze.value]),xe=ce.type===void 0,de=(0,S.capitalize)((ve=(ke=ce.user)==null?void 0:ke.value)!=null?ve:"all");if(G)return m.createElement("div",null,m.createElement(i.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},m.createElement(i.CodeSnippet,{language:"text",text:G.toString()})));const Ue=[({entity:Ie})=>{var je;const Be=(je=Ie.metadata.annotations)==null?void 0:je[r.l2];return{icon:()=>m.createElement(f.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!Be,onClick:()=>{!Be||window.open(Be,"_blank")}}},({entity:Ie})=>{var je;const Be=(je=Ie.metadata.annotations)==null?void 0:je[r.Tf];return{icon:()=>m.createElement(c.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!Be,onClick:()=>{!Be||window.open(Be,"_blank")}}},({entity:Ie})=>{const Be=B(Ie);return{cellStyle:{paddingLeft:"1em"},icon:()=>Be?m.createElement(b,null):m.createElement(y.Z,null),tooltip:Be?"Remove from favorites":"Add to favorites",onClick:()=>F(Ie)}}],re=Q.map(Ie=>{const Be=(0,t.getEntityRelations)(Ie,r.cz,{kind:"system"}),je=(0,t.getEntityRelations)(Ie,r.S4);return{entity:Ie,resolved:{name:(0,t.humanizeEntityRef)(Ie,{defaultKind:"Component"}),ownedByRelationsTitle:je.map(at=>(0,t.humanizeEntityRef)(at,{defaultKind:"group"})).join(", "),ownedByRelations:je,partOfSystemRelationTitle:Be.map(at=>(0,t.humanizeEntityRef)(at,{defaultKind:"system"})).join(", "),partOfSystemRelations:Be}}}),Se=(W||we).find(Ie=>Ie.title==="Type");Se&&(Se.hidden=!xe);const Ne=re.length>20;return m.createElement(i.Table,{isLoading:$,columns:W||we,options:{paging:Ne,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!$,padding:"dense",pageSizeOptions:[20,50,100],...P},title:`${de} (${Q.length})`,data:re,actions:M||Ue})};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 B},J$:function(){return u},g2:function(){return c}});var r;(function(F){const $="DENY";F.DENY=$;const G="ALLOW";F.ALLOW=G;const Q="CONDITIONAL";F.CONDITIONAL=Q})(r||(r={}));function t(F,$){return F.name===$.name}function c(F,$){return"resourceType"in F?!$||F.resourceType===$:!1}function f(F){return F.attributes.action==="create"}function S(F){return F.attributes.action==="read"}function m(F){return F.attributes.action==="update"}function a(F){return F.attributes.action==="delete"}function i(F){return{authorize:async($,G)=>await F.authorize($,G),authorizeConditional($,G){const Q=$;return F.authorize(Q,G)}}}function u({name:F,attributes:$,resourceType:G}){return G?{type:"resource",name:F,attributes:$,resourceType:G}:{type:"basic",name:F,attributes:$}}var y=e(10179),g=e(96279),v=e.n(g),b=e(9571),L=e(30195);const D=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(D).nonempty()})).or(L.z.object({allOf:L.z.array(D).nonempty()})).or(L.z.object({not:D}))),W=L.z.object({result:L.z.literal(r.ALLOW).or(L.z.literal(r.DENY))}),M=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:D})]),P=(F,$)=>L.z.object({items:L.z.array(L.z.intersection(L.z.object({id:L.z.string()}),F)).refine(G=>G.length===$.size&&G.every(({id:Q})=>$.has(Q)),{message:"Items in response do not match request"})});class B{constructor($){_(this,"enabled");_(this,"discovery");var G;this.discovery=$.discovery,this.enabled=(G=$.config.getOptionalBoolean("permission.enabled"))!=null?G:!1}async authorize($,G){return this.makeRequest($,W,G)}async authorizeConditional($,G){return this.makeRequest($,M,G)}async makeRequest($,G,Q){if(!this.enabled)return $.map(Se=>({result:r.ALLOW}));const ce={items:$.map(Se=>({id:b.Z(),...Se}))},we=await this.discovery.getBaseUrl("permission"),xe=await v()(`${we}/authorize`,{method:"POST",body:JSON.stringify(ce),headers:{...this.getAuthorizationHeader(Q==null?void 0:Q.token),"content-type":"application/json"}});if(!xe.ok)throw await y.VL.fromResponse(xe);const de=await xe.json(),re=P(G,new Set(ce.items.map(({id:Se})=>Se))).parse(de).items.reduce((Se,Ne)=>(Se[Ne.id]=Ne,Se),{});return ce.items.map(Se=>re[Se.id])}getAuthorizationHeader($){return $?{Authorization:`Bearer ${$}`}:{}}}},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,g){this.permissionClient=y,this.identityApi=g}static create(y){const{config:g,discovery:v,identity:b}=y,L=new f.Y2({discovery:v,config:g});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:g,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}:g===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:g===f.rG.ALLOW}}const i=u=>{const{permission:y,resourceRef:g,errorComponent:v,...b}=u,L=usePermission(isResourcePermission(y)?{permission:y,resourceRef:g}:{permission:y}),D=useApp(),{NotFoundErrorPage:W}=D.getComponents();let M=v===void 0?React.createElement(W,null):v;return L.loading?M=null:L.allowed&&(M=u.element),React.createElement(Route,{...b,element:M})}},73624:function(ee,s,e){"use strict";e.d(s,{FA:function(){return a},Nd:function(){return D},Rx:function(){return v}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.search.queryservice"});class c{constructor(M){this.mockedResults=M}query(){return Promise.resolve(this.mockedResults||{results:[]})}}var f=e(2784),S=e(79692);const m=(0,S.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),a=({text:W,preTag:M,postTag:P})=>{const B=m(),F=(0,f.useMemo)(()=>W.split(new RegExp(`(${M}.+?${P})`)),[P,M,W]);return f.createElement(f.Fragment,null,F.map(($,G)=>$.includes(M)?f.createElement("mark",{className:B.highlight,key:G},$.replace(new RegExp(`${M}|${P}`,"g"),"")):$))};var i=e(76241),u=e(64279),y=e(1849);const g=(0,i.CT)("search-context"),v=()=>{const W=(0,f.useContext)(g);if(!W)throw new Error("useSearch must be used within a SearchContextProvider");const M=W.atVersion(1);if(!M)throw new Error("No SearchContext v1 found");return M},b=()=>useContext(g)!==void 0,L={term:"",pageCursor:void 0,filters:{},types:[]},D=W=>{var Be,je,at,Tt;const{initialState:M=L,children:P}=W,B=(0,r.useApi)(t),[F,$]=(0,f.useState)(M.pageCursor),[G,Q]=(0,f.useState)(M.filters),[ce,we]=(0,f.useState)(M.term),[xe,de]=(0,f.useState)(M.types),Ue=(0,y.Z)(ce),re=(0,u.default)(()=>B.query({term:ce,filters:G,pageCursor:F,types:xe}),[ce,G,xe,F]),Se=!re.loading&&!re.error&&((Be=re.value)==null?void 0:Be.nextPageCursor),Ne=!re.loading&&!re.error&&((je=re.value)==null?void 0:je.previousPageCursor),ze=(0,f.useCallback)(()=>{var _e;$((_e=re.value)==null?void 0:_e.nextPageCursor)},[(at=re.value)==null?void 0:at.nextPageCursor]),ke=(0,f.useCallback)(()=>{var _e;$((_e=re.value)==null?void 0:_e.previousPageCursor)},[(Tt=re.value)==null?void 0:Tt.previousPageCursor]);(0,f.useEffect)(()=>{ce&&Ue&&ce!==Ue&&$(void 0)},[ce,Ue,M.pageCursor]);const ve={result:re,filters:G,setFilters:Q,term:ce,setTerm:we,types:xe,setTypes:de,pageCursor:F,setPageCursor:$,fetchNextPage:Se?ze:void 0,fetchPreviousPage:Ne?ke:void 0},Ie=(0,i.EI)({1:ve});return f.createElement(r.AnalyticsContext,{attributes:{searchTypes:xe.sort().join(",")}},f.createElement(g.Provider,{value:Ie,children:P}))}},47955:function(ee,s,e){"use strict";e.d(s,{Zz:function(){return S},oZ:function(){return Ue},DR:function(){return m},ZS:function(){return $},KY:function(){return i},gT:function(){return b},Dl:function(){return L},$L:function(){return v},x1:function(){return G}});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=re=>`${f}.${re.toLocaleLowerCase("en-US")}`;function i(re){const{name:Se,component:Ne}=re;return(0,c.createReactExtension)({name:Se,component:{sync:ze=>r.createElement(Ne,{...ze})},data:{[f]:re,[a(Se)]:!0}})}const u=(re,Se)=>re.selectByComponentData({key:Se}).getElements()[0],y=re=>re.selectByComponentData({key:S}).selectByComponentData({key:f}),g=re=>re.selectByComponentData({key:S}).findComponentData({key:f}),v=()=>{const re=(0,t.pC)(),Se=(0,c.useElementFilter)(re,y),Ne=(0,c.useElementFilter)(re,g),ze=(0,r.useCallback)(Ie=>{var je;if(!Se||!Ie)return null;const Be=a(Ie.name);return(je=u(Se,Be))!=null?je:null},[Se]),ke=(0,r.useCallback)(Ie=>{const Be=Ne.find(je=>je.name===Ie);return Be?ze(Be):null},[Ne,ze]),ve=(0,r.useCallback)(Ie=>{const Be=Ne.filter(je=>je.location===Ie);return Be.length?Be.map(ze):null},[Ne,ze]);return{renderComponentByName:ke,renderComponentsByLocation:ve}},b=(0,c.createApiRef)({id:"plugin.techdocs.service"}),L=(0,c.createApiRef)({id:"plugin.techdocs.storageservice"});var D=e(64279),W=e(48023),M=e(76241);const P=(re,Se)=>(0,W.eE)(re)===(0,W.eE)(Se),B={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},F=(0,M.CT)("techdocs-reader-page-context"),$=(0,r.memo)(({entityRef:re,children:Se})=>{const Ne=(0,c.useApi)(b),ze=(0,D.default)(async()=>Ne.getTechDocsMetadata(re),[re]),ke=(0,D.default)(async()=>Ne.getEntityMetadata(re),[re]),[ve,Ie]=(0,r.useState)(B.title),[Be,je]=(0,r.useState)(B.subtitle),[at,Tt]=(0,r.useState)(B.shadowRoot),_e={metadata:ze,entityRef:re,entityMetadata:ke,shadowRoot:at,setShadowRoot:Tt,title:ve,setTitle:Ie,subtitle:Be,setSubtitle:je},st=(0,M.EI)({1:_e});return r.createElement(F.Provider,{value:st},Se instanceof Function?Se(_e):Se)},(re,Se)=>P(re.entityRef,Se.entityRef)),G=()=>{const re=(0,r.useContext)(F);if(re===void 0)return B;const Se=re.atVersion(1);if(Se===void 0)throw new Error("No context found for version 1.");return Se};var Q=e(54073);const ce=()=>{const{shadowRoot:re}=useTechDocsReaderPage();return re},we=re=>{const Se=ce();return Se?re.map(Ne=>Se==null?void 0:Se.querySelectorAll(Ne)).filter(Ne=>Ne.length).map(Ne=>Array.from(Ne)).flat():[]},xe=re=>re.toString()&&re.rangeCount&&re.getRangeAt(0).getBoundingClientRect().top,de=(re=0)=>{const Se=ce(),[Ne,ze]=useState(null),ke=useMemo(()=>debounce(()=>{const ve=Se,Ie=ve.getSelection?ve.getSelection():document.getSelection();Ie&&xe(Ie)?ze(Ie):ze(null)},re),[Se,ze,re]);return useEffect(()=>(window.document.addEventListener("selectionchange",ke),()=>window.document.removeEventListener("selectionchange",ke)),[ke]),Ne},Ue=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 D},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:W})=>{const M=(0,S.iB)(W);return r.createElement(m.I6,{entityRef:M},r.createElement(a.b,null),r.createElement(i.F,{withSearch:!1}))};var y=e(50021),g=e(26220);const v="backstage.io/techdocs-ref",b=W=>{var M,P;return Boolean((P=(M=W==null?void 0:W.metadata)==null?void 0:M.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(g.TechDocsReaderPage,null)})),D=W=>{var F;const{children:M}=W,{entity:P}=(0,c.useEntity)();return((F=P.metadata.annotations)==null?void 0:F[v])?r.createElement(t.Z5,null,r.createElement(t.AW,{element:r.createElement(u,{entity:P})},M)):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:g}=a,b=`${await this.getStorageUrl()}/${y}/${u}/${g}/${i}`,L=await this.fetchApi.fetch(`${b.endsWith("/")?b:`${b}/`}index.html`);let D="";switch(L.status){case 404:throw D="Page not found. ",i||(D+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(D);case 500:throw D="Could not generate documentation or an error in the TechDocs backend. ",new Error(D);default:break}return L.text()}async syncEntityDocs(a,i=()=>{}){const{kind:u,namespace:y,name:g}=a,b=`${await this.getApiOrigin()}/sync/${y}/${u}/${g}`,{token:L}=await this.identityApi.getCredentials();return new Promise((D,W)=>{const M=new t.EventSourcePolyfill(b,{withCredentials:!0,headers:L?{Authorization:`Bearer ${L}`}:{}});M.addEventListener("log",P=>{P.data&&i(JSON.parse(P.data))}),M.addEventListener("finish",P=>{let B=!1;P.data&&({updated:B}=JSON.parse(P.data)),D(B?"updated":"cached")}),M.onerror=P=>{switch(M.close(),P.status){case 404:W(new r.dR(P.message));return;default:W(new Error(P.data));return}}})}async getBaseUrl(a,i,u){const{kind:y,namespace:g,name:v}=i,L=`${await this.getApiOrigin()}/static/docs/${g}/${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:g}=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:g,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,D=(0,c.useRouteRef)(r.Fw),W=(0,c.useApi)(c.configApiRef);return L?u.createElement(f.ItemCardGrid,{"data-testid":"docs-explore"},L!=null&&L.length?L.map((M,P)=>{var B,F;return u.createElement(S.Z,{key:P},u.createElement(m.Z,null,u.createElement(f.ItemCardHeader,{title:(B=M.metadata.title)!=null?B:M.metadata.name})),u.createElement(a.Z,null,M.metadata.description),u.createElement(i.Z,null,u.createElement(f.Button,{to:D({namespace:(0,t.D)((F=M.metadata.namespace)!=null?F:"default",W),kind:(0,t.D)(M.kind,W),name:(0,t.D)(M.metadata.name,W)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var g=e(53479);const v=()=>{const{loading:b,error:L,entities:D}=useEntityList();return L?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:L.toString()})):b||!D?React.createElement(Progress,null):(D.sort((W,M)=>{var P,B;return((P=W.metadata.title)!=null?P:W.metadata.name).localeCompare((B=M.metadata.title)!=null?B:M.metadata.name)}),React.createElement(DocsCardGrid,{entities:D}))}},38634:function(ee,s,e){"use strict";e.d(s,{H:function(){return g}});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 g=v=>{const{entities:b,title:L,loading:D,columns:W,actions:M}=v,[,P]=(0,t.Z)(),B=(0,c.useRouteRef)(m.Fw),F=(0,c.useApi)(c.configApiRef);if(!b)return null;const $=b.map(ce=>{var xe;const we=(0,S.getEntityRelations)(ce,f.S4);return{entity:ce,resolved:{docsUrl:B({namespace:(0,y.D)((xe=ce.metadata.namespace)!=null?xe:"default",F),kind:(0,y.D)(ce.kind,F),name:(0,y.D)(ce.metadata.name,F)}),ownedByRelations:we,ownedByRelationsTitle:we.map(de=>(0,S.humanizeEntityRef)(de,{defaultKind:"group"})).join(", ")}}}),G=[u.N.createNameColumn(),u.N.createOwnerColumn(),u.N.createTypeColumn()],Q=[i.n.createCopyDocsUrlAction(P)];return r.createElement(r.Fragment,null,D||$&&$.length>0?r.createElement(a.Table,{isLoading:D,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:$,columns:W||G,actions:M||Q,title:L?`${L} (${$.length})`:`All (${$.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")}))};g.columns=u.N,g.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=g=>{var Q,ce;const{columns:v,actions:b}=g,{loading:L,error:D,entities:W,filters:M}=(0,m.useEntityList)(),{isStarredEntity:P,toggleStarredEntity:B}=(0,m.useStarredEntities)(),[,F]=(0,t.Z)(),$=(0,c.capitalize)((ce=(Q=M.user)==null?void 0:Q.value)!=null?ce:"all"),G=[i.n.createCopyDocsUrlAction(F),i.n.createStarEntityAction(P,B)];return D?r.createElement(S.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(S.CodeSnippet,{language:"text",text:D.toString()})):r.createElement(a.H,{title:$,entities:W,loading:L,actions:b||G,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 g=i(y);return{cellStyle:{paddingLeft:"1em"},icon:()=>g?r.createElement(m,null):r.createElement(S.Z,null),tooltip:g?"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:g,discoveryApi:v,identityApi:b,fetchApi:L})=>new t.k({configApi:g,discoveryApi:v,identityApi:b,fetchApi:L})}),(0,f.createApiFactory)({api:r.gT,deps:{configApi:f.configApiRef,discoveryApi:f.discoveryApiRef,fetchApi:f.fetchApiRef},factory:({configApi:g,discoveryApi:v,fetchApi:b})=>new t.p({configApi:g,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(g=>g.Router),mountPoint:c._Z})),a=S.provide((0,f.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.EmbeddedDocsRouter),mountPoint:c.pd})),i=S.provide((0,f.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(g=>g.TechDocsCustomHome),mountPoint:c._Z})),u=S.provide((0,f.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(g=>g.TechDocsIndexPage),mountPoint:c._Z})),y=S.provide((0,f.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,26220)).then(g=>g.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:g=!0})=>r.createElement(c.Page,{themeId:"documentation"},g&&r.createElement(m.S,null),r.createElement(a.b,null),r.createElement(S.F,{withSearch:y})),u=y=>{const{kind:g,name:v,namespace:b}=(0,t.UO)(),{children:L,entityRef:D={kind:g,name:v,namespace:b}}=y,W=(0,t.pC)();if(!L){const P=(W?r.Children.toArray(W.props.children):[]).find(B=>{var $,G;const{type:F}=B;return!((G=($=F==null?void 0:F.__backstage_data)==null?void 0:$.map)!=null&&G.get(f.Zz))});return r.createElement(f.ZS,{entityRef:D},P||r.createElement(i,null))}return r.createElement(f.ZS,{entityRef:D},({metadata:M,entityMetadata:P,onReady:B})=>r.createElement(c.Page,{themeId:"documentation"},L instanceof Function?L({entityRef:D,techdocsMetadataValue:M.value,entityMetadataValue:P.value,onReady:B}):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),g=e(4614),v=e(77277),b=e(99688),L=e(12420),D=e(90436),W=e(61837),M=e(4190),P=e(87685);const B=(0,c.Z)(oe=>(0,L.Z)({paper:{width:"100%",[oe.breakpoints.up("sm")]:{width:"75%"},[oe.breakpoints.up("md")]:{width:"50%"},padding:oe.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:oe.palette.background.default}})),F=({buildLog:oe,onClose:U})=>{const R=B(),V=oe.length===0?"Waiting for logs...":oe.join(`
|
|
32
|
+
`);return r.createElement(f.Z,{container:!0,direction:"column",className:R.root,spacing:0,wrap:"nowrap"},r.createElement(f.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(D.Z,{variant:"h5"},"Build Details"),r.createElement(W.Z,{key:"dismiss",title:"Close the drawer",onClick:U,color:"inherit"},r.createElement(P.Z,null))),r.createElement(u.LogViewer,{text:V,classes:{root:R.logs}}))},$=({buildLog:oe})=>{const U=B(),[R,V]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(v.Z,{color:"inherit",onClick:()=>V(!0)},"Show Build Logs"),r.createElement(M.ZP,{classes:{paper:U.paper},anchor:"right",open:R,onClose:()=>V(!1)},r.createElement(F,{buildLog:oe,onClose:()=>V(!1)})))};var G=e(36964);const Q=({errorMessage:oe})=>{const U=(0,G.useApi)(G.configApiRef).getOptionalString("techdocs.builder");let R="";return U!=="local"&&(R="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:oe||"Documentation not found",additionalInfo:R})};var ce=e(2263);const we=(0,c.Z)(oe=>({root:{marginBottom:oe.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),xe=()=>{let oe=null;const U=we(),{state:R,contentReload:V,contentErrorMessage:ie,syncErrorMessage:ge,buildLog:Re}=(0,ce.DK)(),We=R==="CHECKING"?r.createElement(u.Progress,null):null;return R==="INITIAL_BUILD"&&(oe=r.createElement(b.Z,{classes:{root:U.root},variant:"outlined",severity:"info",icon:r.createElement(g.Z,{size:"24px"}),action:r.createElement($,{buildLog:Re})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),R==="CONTENT_STALE_REFRESHING"&&(oe=r.createElement(b.Z,{variant:"outlined",severity:"info",icon:r.createElement(g.Z,{size:"24px"}),action:r.createElement($,{buildLog:Re}),classes:{root:U.root}},"A newer version of this documentation is being prepared and will be available shortly.")),R==="CONTENT_STALE_READY"&&(oe=r.createElement(b.Z,{variant:"outlined",severity:"success",action:r.createElement(v.Z,{color:"inherit",onClick:()=>V()},"Refresh"),classes:{root:U.root}},"A newer version of this documentation is now available, please refresh to view.")),R==="CONTENT_STALE_ERROR"&&(oe=r.createElement(b.Z,{variant:"outlined",severity:"error",action:r.createElement($,{buildLog:Re}),classes:{root:U.root,message:U.message}},"Building a newer version of this documentation failed."," ",ge)),R==="CONTENT_NOT_FOUND"&&(oe=r.createElement(r.Fragment,null,ge&&r.createElement(b.Z,{variant:"outlined",severity:"error",action:r.createElement($,{buildLog:Re}),classes:{root:U.root,message:U.message}},"Building a newer version of this documentation failed."," ",ge),r.createElement(Q,{errorMessage:ie}))),r.createElement(r.Fragment,null,We,oe)};var de=e(10289),Ue=e(60364),re=e(41128),Se=e(36356);const Ne=(oe,U,R)=>{const V=oe==="src"&&U.endsWith(".svg"),ie=!U.match(/^([a-z]*:)?\/\//i),ge=U.startsWith(R);return V&&(ie||ge)},ze=({techdocsStorageApi:oe,entityId:U,path:R})=>async V=>{const ie=await oe.getApiOrigin(),ge=async(Re,We)=>{for(const Xe of Re)if(Xe.hasAttribute(We)){const ct=Xe.getAttribute(We);if(!ct)return;const gt=await oe.getBaseUrl(ct,U,R);if(Ne(We,ct,ie))try{const Ke=await(await fetch(gt,{credentials:"include"})).text();Xe.setAttribute(We,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Ke)))}`)}catch{Xe.setAttribute("alt",`Error: ${ct}`)}else Xe.setAttribute(We,gt)}};return await Promise.all([ge(V.querySelectorAll("img"),"src"),ge(V.querySelectorAll("script"),"src"),ge(V.querySelectorAll("source"),"src"),ge(V.querySelectorAll("link"),"href"),ge(V.querySelectorAll("a[download]"),"href")]),V};var ke=e(68370),ve=e(67097),Ie=e(47093),Be=e(82717),je=e.n(Be);const at=oe=>U=>{var Ke;const R=U.querySelector('[title="Edit this page"]');if(!R||!R.href)return U;const V=new URL(R.href),ie=oe.byUrl(V);if((ie==null?void 0:ie.type)!=="github"&&(ie==null?void 0:ie.type)!=="gitlab")return U;const ge=((Ke=U.querySelector("article>h1"))==null?void 0:Ke.childNodes[0].textContent)||"",Re=encodeURIComponent(`Documentation Feedback: ${ge}`),We=encodeURIComponent(`Page source:
|
|
33
|
+
${R.href}
|
|
34
|
+
|
|
35
|
+
Feedback:`),Xe=(ie==null?void 0:ie.type)==="github"?(0,ke.Pb)(V.href,"blob"):V.href,ct=je()(Xe),gt=`/${ct.organization}/${ct.name}`,ht=R.cloneNode();switch(ie==null?void 0:ie.type){case"gitlab":ht.href=`${V.origin}${gt}/issues/new?issue[title]=${Re}&issue[description]=${We}`;break;case"github":ht.href=`${V.origin}${gt}/issues/new?title=${Re}&body=${We}`;break;default:return U}return Ie.render(r.createElement(ve.Z),ht),ht.style.paddingLeft="5px",ht.title="Leave feedback for this page",ht.id="git-feedback-link",R==null||R.insertAdjacentElement("beforebegin",ht),U};var Tt=e(44882);const _e=()=>oe=>{const U=oe.querySelector('.md-header label[for="__drawer"]'),R=oe.querySelector("article");if(!U||!R)return oe;const V=U.cloneNode();return Ie.render(r.createElement(Tt.Z),V),V.id="toggle-sidebar",V.title="Toggle Sidebar",V.classList.add("md-content__button"),V.style.setProperty("padding","0 0 0 5px"),V.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),R==null||R.prepend(V),oe},st=()=>oe=>(((R,V)=>{Array.from(R).filter(ie=>ie.hasAttribute(V)).forEach(ie=>{const ge=ie.getAttribute(V);if(ge){ge.match(/^https?:\/\//i)&&ie.setAttribute("target","_blank");try{const Re=Qe(window.location.href);ie.setAttribute(V,new URL(ge,Re).toString())}catch{ie.replaceWith(ie.textContent||ge)}}})})(Array.from(oe.getElementsByTagName("a")),"href"),oe);function Qe(oe){const U=new URL(oe);return!U.pathname.endsWith("/")&&!U.pathname.endsWith(".html")&&(U.pathname+="/"),U.toString()}const et=({baseUrl:oe,onClick:U})=>R=>(Array.from(R.getElementsByTagName("a")).forEach(V=>{V.addEventListener("click",ie=>{const Re=V.getAttribute("href");!Re||Re.startsWith(oe)&&!V.hasAttribute("download")&&(ie.preventDefault(),U(ie,Re))})}),R);var $t=e(15459),jt=e(80030),Ut=e(72379),xn=e(41547);const Jt=(0,$t.Z)(oe=>({tooltip:{fontSize:"inherit",color:oe.palette.text.primary,margin:0,padding:oe.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(jt.ZP),vt=()=>r.createElement(Ut.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"})),un=({text:oe})=>{const[U,R]=(0,r.useState)(!1),V=(0,r.useCallback)(()=>{navigator.clipboard.writeText(oe),R(!0)},[oe]),ie=(0,r.useCallback)(()=>{R(!1)},[R]);return r.createElement(Jt,{title:"Copied to clipboard",placement:"left",open:U,onClose:ie,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:V},r.createElement(vt,null)))},se=oe=>U=>{var V;const R=U.querySelectorAll("pre > code");for(const ie of R){const ge=ie.textContent||"",Re=document.createElement("div");(V=ie==null?void 0:ie.parentElement)==null||V.prepend(Re),Ie.render(r.createElement(xn.Z,{theme:oe},r.createElement(un,{text:ge})),Re)}return U},j=()=>oe=>{var U;return(U=oe.querySelector(".md-header"))==null||U.remove(),oe},ae=()=>oe=>{var U,R;return(U=oe.querySelector(".md-footer .md-copyright"))==null||U.remove(),(R=oe.querySelector(".md-footer-copyright"))==null||R.remove(),oe},fe=({docStorageUrl:oe,onLoading:U,onLoaded:R})=>V=>{const ie=Array.from(V.querySelectorAll('head > link[rel="stylesheet"]')).filter(Re=>{var We;return(We=Re.getAttribute("href"))==null?void 0:We.startsWith(oe)});let ge=ie.length;return ge>0&&U(V),ie.forEach(Re=>Re.addEventListener("load",()=>{ge-=1,ge===0&&R(V)})),V};var he=e(35368),Te=e.n(he);const Me=/main\.[A-Fa-f0-9]{8}\.min\.css$/,De=/^https:\/\/fonts\.googleapis\.com/,Ye=/^https:\/\/fonts\.gstatic\.com/,it=oe=>{if(oe.nodeName&&oe.nodeName==="LINK"){const U=oe.getAttribute("href")||"";U.match(Me)&&oe.setAttribute("rel","stylesheet"),U.match(De)&&oe.setAttribute("rel","stylesheet"),U.match(Ye)&&oe.setAttribute("rel","preconnect")}return oe},Nt=oe=>U=>{if(U.nodeName==="IFRAME"){const R=U.getAttribute("src");if(!R)return U.remove(),U;try{const V=new URL(R);oe.some(ge=>V.host===ge)||U.remove()}catch(V){console.warn(`Invalid iframe src, ${V}`),U.remove()}}return U},Ft=oe=>{const U=(oe==null?void 0:oe.getOptionalStringArray("allowedIframeHosts"))||[];return R=>{Te().addHook("afterSanitizeAttributes",it);const V=["link"];return U.length>0&&(Te().addHook("beforeSanitizeElements",Nt(U)),V.push("iframe")),Te().sanitize(R.innerHTML,{ADD_TAGS:V,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},tt=({css:oe})=>U=>(U.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${oe}</style>`),U),Lt=()=>oe=>(setTimeout(()=>{var U;if(window.location.hash){const R=window.location.hash.slice(1);(U=oe==null?void 0:oe.querySelector(`[id="${R}"]`))==null||U.scrollIntoView()}},200),oe),Vt=async(oe,U)=>{let R;if(typeof oe=="string")R=new DOMParser().parseFromString(oe,"text/html").documentElement;else if(oe instanceof Element)R=oe;else throw new Error("dom is not a recognized type");for(const V of U)R=await V(R);return R},mt=["h1","h2","h3","h4","h5","h6"],hn=oe=>{const U=(0,de.s0)(),R=(0,Ue.Z)(),V=(0,G.useApi)(i.Dl),ie=(0,G.useApi)(Se.q3),ge=(0,G.useApi)(G.configApiRef),{namespace:Re,kind:We,name:Xe}=oe,{state:ct,path:gt,content:ht}=(0,ce.DK)(),Ke=R.palette.type==="dark",[Ot,qe]=(0,r.useState)(),[ut,qt]=(0,r.useState)(null),{isPinned:nn}=(0,r.useContext)(u.SidebarPinStateContext),pt=(0,r.useCallback)(()=>{if(!ut||!Ot)return;const xt=ut.querySelector(".md-container > .md-tabs"),dt=window.matchMedia("screen and (max-width: 76.1875em)").matches,Et=Math.max(ut.getBoundingClientRect().top,0);Ot.forEach(At=>{dt?At.style.top="0px":xt?At.style.top=`${Et+xt.getBoundingClientRect().height}px`:At.style.top=`${Et}px`})},[ut,Ot]);(0,r.useEffect)(()=>(pt(),window.addEventListener("scroll",pt,!0),window.addEventListener("resize",pt),()=>{window.removeEventListener("scroll",pt,!0),window.removeEventListener("resize",pt)}),[pt,ct]);const yt=(0,r.useCallback)(()=>{if(!ut)return;const xt=ut.querySelector(".md-footer");xt&&(xt.style.width=`${ut.getBoundingClientRect().width}px`)},[ut]);(0,r.useEffect)(()=>(yt(),window.addEventListener("resize",yt),()=>{window.removeEventListener("resize",yt)}));const rn=(0,r.useCallback)((xt,dt)=>Vt(xt,[Ft(ge.getOptionalConfig("techdocs.sanitizer")),ze({techdocsStorageApi:V,entityId:{kind:We,name:Xe,namespace:Re},path:dt}),st(),_e(),j(),ae(),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: ${R.palette.text.primary};
|
|
43
|
+
--md-default-fg-color--light: ${R.palette.text.secondary};
|
|
44
|
+
--md-default-fg-color--lighter: ${(0,re.$n)(R.palette.text.secondary,.7)};
|
|
45
|
+
--md-default-fg-color--lightest: ${(0,re.$n)(R.palette.text.secondary,.3)};
|
|
46
|
+
|
|
47
|
+
/* BACKGROUND */
|
|
48
|
+
--md-default-bg-color:${R.palette.background.default};
|
|
49
|
+
--md-default-bg-color--light: ${R.palette.background.paper};
|
|
50
|
+
--md-default-bg-color--lighter: ${(0,re.$n)(R.palette.background.paper,.7)};
|
|
51
|
+
--md-default-bg-color--lightest: ${(0,re.$n)(R.palette.background.paper,.3)};
|
|
52
|
+
|
|
53
|
+
/* PRIMARY */
|
|
54
|
+
--md-primary-fg-color: ${R.palette.primary.main};
|
|
55
|
+
--md-primary-fg-color--light: ${R.palette.primary.light};
|
|
56
|
+
--md-primary-fg-color--dark: ${R.palette.primary.dark};
|
|
57
|
+
--md-primary-bg-color: ${R.palette.primary.contrastText};
|
|
58
|
+
--md-primary-bg-color--light: ${(0,re.$n)(R.palette.primary.contrastText,.7)};
|
|
59
|
+
|
|
60
|
+
/* ACCENT */
|
|
61
|
+
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
62
|
+
|
|
63
|
+
/* SHADOW */
|
|
64
|
+
--md-shadow-z1: ${R.shadows[1]};
|
|
65
|
+
--md-shadow-z2: ${R.shadows[2]};
|
|
66
|
+
--md-shadow-z3: ${R.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: ${R.palette.text.primary};
|
|
103
|
+
--md-code-bg-color: ${R.palette.background.paper};
|
|
104
|
+
--md-code-hl-color: ${(0,re.Fq)(R.palette.warning.main,.5)};
|
|
105
|
+
--md-code-hl-keyword-color: ${Ke?R.palette.primary.light:R.palette.primary.dark};
|
|
106
|
+
--md-code-hl-function-color: ${Ke?R.palette.secondary.light:R.palette.secondary.dark};
|
|
107
|
+
--md-code-hl-string-color: ${Ke?R.palette.success.light:R.palette.success.dark};
|
|
108
|
+
--md-code-hl-number-color: ${Ke?R.palette.error.light:R.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: ${R.palette.text.primary};
|
|
123
|
+
--md-typeset-del-color: ${Ke?(0,re.Fq)(R.palette.error.dark,.5):(0,re.Fq)(R.palette.error.light,.5)};
|
|
124
|
+
--md-typeset-ins-color: ${Ke?(0,re.Fq)(R.palette.success.dark,.5):(0,re.Fq)(R.palette.success.light,.5)};
|
|
125
|
+
--md-typeset-mark-color: ${Ke?(0,re.Fq)(R.palette.warning.dark,.5):(0,re.Fq)(R.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: ${R.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:${R.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: ${R.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
|
+
${mt.reduce((Et,At)=>{const Rt=R.typography[At],{lineHeight:Zt,fontFamily:zt,fontWeight:on,fontSize:gn}=Rt,Tn=_t=>{let pn=1;return typeof _t=="number"&&(pn=_t/16*.6),typeof _t=="string"&&(pn=_t.replace("rem","")),`calc(${pn} * var(--md-typeset-font-size))`};return Et.concat(`
|
|
342
|
+
.md-typeset ${At} {
|
|
343
|
+
color: var(--md-default-fg-color);
|
|
344
|
+
line-height: ${Zt};
|
|
345
|
+
font-family: ${zt};
|
|
346
|
+
font-weight: ${on};
|
|
347
|
+
font-size: ${Tn(gn)};
|
|
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 ${R.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: ${R.palette.action.disabledBackground};
|
|
455
|
+
}
|
|
456
|
+
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
457
|
+
background-color: ${R.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
|
+
`})]),[We,Xe,Re,ie,ge,V,R,Ke,nn]),cn=(0,r.useCallback)(async xt=>Vt(xt,[Lt(),se(R),et({baseUrl:window.location.origin,onClick:(dt,Et)=>{var Zt;const At=dt.ctrlKey||dt.metaKey,Rt=new URL(Et);Rt.hash?At?window.open(`${Rt.pathname}${Rt.hash}`,"_blank"):(U(`${Rt.pathname}${Rt.hash}`),(Zt=xt==null?void 0:xt.querySelector(`#${Rt.hash.slice(1)}`))==null||Zt.scrollIntoView()):At?window.open(Rt.pathname,"_blank"):U(Rt.pathname)}}),fe({docStorageUrl:await V.getApiOrigin(),onLoading:dt=>{dt.style.setProperty("opacity","0")},onLoaded:dt=>{var Et;dt.style.removeProperty("opacity"),(Et=dt.querySelector(".md-nav__title"))==null||Et.removeAttribute("for"),qe(Array.from(dt.querySelectorAll(".md-sidebar")))}})]),[R,U,V]);return(0,r.useEffect)(()=>{if(!ht)return()=>{};let xt=!0;return rn(ht,gt).then(async dt=>{if(!(dt!=null&&dt.innerHTML)||!xt)return;window.scroll({top:0});const Et=await cn(dt);qt(Et)}),()=>{xt=!1}},[ht,gt,rn,cn]),ut},dn=(0,c.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),bt=(0,ce.m1)(oe=>{const{withSearch:U=!0,onReady:R}=oe,V=dn(),ie=(0,i.$L)(),{entityMetadata:{value:ge,loading:Re},entityRef:We,shadowRoot:Xe,setShadowRoot:ct}=(0,i.x1)(),gt=hn(We),[ht,Ke]=(0,r.useState)((0,t.Ue)({...(0,m.Z)(),insertionPoint:void 0})),Ot=(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),ct(rn),R instanceof Function&&R()},[gt,ct,R]),qe=Xe==null?void 0:Xe.querySelector('[data-md-component="content"]'),ut=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");ut==null||ut.prepend(nn);const pt=document.createElement("div");return qt==null||qt.prepend(pt),Re===!1&&!ge?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(xe,null)),U&&r.createElement(f.Z,{className:V.search,xs:"auto",item:!0},r.createElement(y.S,{entityId:We})),r.createElement(f.Z,{xs:12,item:!0},r.createElement(a.ZP,{jss:ht,sheetsManager:new Map},r.createElement("div",{ref:Ot,"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(xe,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 g=r.createElement(c.Z,{animation:"wave",variant:"text",height:40}),v=b=>{const{children:L}=b,D=(0,S.$L)(),W=(0,u.useApi)(u.configApiRef),{title:M,setTitle:P,subtitle:B,setSubtitle:F,entityRef:$,metadata:{value:G,loading:Q},entityMetadata:{value:ce,loading:we}}=(0,S.x1)();(0,r.useEffect)(()=>{!G||(P(Be=>{const{site_name:je}=G;return Be||je}),F(Be=>{let{site_description:je}=G;return(!je||je==="None")&&(je="Home"),Be||je}))},[G,P,F]);const xe=W.getOptional("app.title")||"Backstage",de=[B,M,xe].filter(Boolean).join(" | "),{locationMetadata:Ue,spec:re}=ce||{},Se=re==null?void 0:re.lifecycle,Ne=ce?(0,m.getEntityRelations)(ce,a.S4):[],ze=(0,u.useRouteRef)(y._Z)(),ke=r.createElement(r.Fragment,null,r.createElement(i.HeaderLabel,{label:"Component",value:r.createElement(m.EntityRefLink,{color:"inherit",entityRef:$,defaultKind:"Component"})}),Ne.length>0&&r.createElement(i.HeaderLabel,{label:"Owner",value:r.createElement(m.EntityRefLinks,{color:"inherit",entityRefs:Ne,defaultKind:"group"})}),Se?r.createElement(i.HeaderLabel,{label:"Lifecycle",value:Se}):null,Ue&&Ue.type!=="dir"&&Ue.type!=="file"?r.createElement(i.HeaderLabel,{label:"",value:r.createElement("a",{href:Ue.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(f.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return!we&&ce===void 0||!Q&&G===void 0?null:r.createElement(i.Header,{type:"Documentation",typeLink:ze,title:M||g,subtitle:B||g},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,de)),ke,L,D.renderComponentsByLocation(S.oZ.Header))}},16172:function(ee,s,e){"use strict";e.d(s,{b:function(){return g}});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)}})),g=({toolbarProps:v})=>{const b=y(),[L,D]=(0,r.useState)(null),W=(0,r.useCallback)(Q=>{D(Q.currentTarget)},[]),M=(0,r.useCallback)(()=>{D(null)},[]),{entityMetadata:{value:P,loading:B}}=(0,u.x1)(),F=(0,u.$L)(),$=F.renderComponentsByLocation(u.oZ.Subheader),G=F.renderComponentsByLocation(u.oZ.Settings);return!$&&!G||B===!1&&!P?null:r.createElement(c.Z,{classes:b,...v},r.createElement(f.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},$,G?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:W},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:M,keepMounted:!0},G)):null))}},2263:function(ee,s,e){"use strict";e.d(s,{DK:function(){return g},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:D,activeSyncState:W}){return L||W==="BUILD_READY_RELOAD"||!D&&W==="CHECKING"?"CHECKING":!D&&W==="BUILDING"?"INITIAL_BUILD":D?W==="BUILDING"?"CONTENT_STALE_REFRESHING":W==="BUILD_READY"?"CONTENT_STALE_READY":W==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function i(L,D){const W={...L};switch(D.type){case"sync":D.state==="CHECKING"&&(W.buildLog=[]),W.activeSyncState=D.state,W.syncError=D.syncError;break;case"contentLoading":W.contentLoading=!0,W.contentError=void 0;break;case"content":typeof D.path=="string"&&(W.path=D.path),W.contentLoading=!1,W.content=D.content,W.contentError=D.contentError;break;case"buildLog":W.buildLog=W.buildLog.concat(D.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(W.activeSyncState)&&["contentLoading","content"].includes(D.type)&&(W.activeSyncState="UP_TO_DATE",W.buildLog=[]),W}function u(L,D,W,M){var ce,we;const[P,B]=(0,r.useReducer)(i,{activeSyncState:"CHECKING",path:M,contentLoading:!0,buildLog:[]}),F=(0,f.useApi)(c.Dl),{retry:$}=(0,m.Z)(async()=>{B({type:"contentLoading"});try{const xe=await F.getEntityDocs({kind:L,namespace:D,name:W},M);return B({type:"content",content:xe,path:M}),xe}catch(xe){B({type:"content",contentError:xe,path:M})}},[F,L,D,W,M]),G=(0,r.useRef)({content:void 0,reload:()=>{}});return G.current={content:P.content,reload:$},(0,S.default)(async()=>{B({type:"sync",state:"CHECKING"});const xe=setTimeout(()=>{B({type:"sync",state:"BUILDING"})},1e3);try{switch(await F.syncEntityDocs({kind:L,namespace:D,name:W},Ue=>{B({type:"buildLog",log:Ue})})){case"updated":G.current.content?B({type:"sync",state:"BUILD_READY"}):(G.current.reload(),B({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":B({type:"sync",state:"UP_TO_DATE"});break;default:B({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(de){B({type:"sync",state:"ERROR",syncError:de})}finally{clearTimeout(xe)}},[L,W,D,F,B,G]),{state:(0,r.useMemo)(()=>a({activeSyncState:P.activeSyncState,contentLoading:P.contentLoading,content:P.content}),[P.activeSyncState,P.content,P.contentLoading]),contentReload:$,path:P.path,content:P.content,contentErrorMessage:(ce=P.contentError)==null?void 0:ce.toString(),syncErrorMessage:(we=P.syncError)==null?void 0:we.toString(),buildLog:P.buildLog}}const y=(0,r.createContext)({}),g=()=>(0,r.useContext)(y),v=({children:L})=>{const{"*":D=""}=(0,t.UO)(),{entityRef:W}=(0,c.x1)(),{kind:M,namespace:P,name:B}=W,F=u(M,P,B,D);return r.createElement(y.Provider,{value:F},L instanceof Function?L(F):L)},b=L=>D=>r.createElement(v,null,r.createElement(L,{...D}))},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 F}});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=$=>{const{result:G,highlight:Q,lineClamp:ce=5,asListItem:we=!0,asLink:xe=!0,title:de}=$,Ue=i(),re=()=>{const ze=Q!=null&&Q.fields.title?r.createElement(a.FA,{text:Q.fields.title,preTag:Q.preTag,postTag:Q.postTag}):G.title,ke=Q!=null&&Q.fields.entityTitle?r.createElement(a.FA,{text:Q.fields.entityTitle,preTag:Q.preTag,postTag:Q.postTag}):G.entityTitle,ve=Q!=null&&Q.fields.name?r.createElement(a.FA,{text:Q.fields.name,preTag:Q.preTag,postTag:Q.postTag}):G.name;return r.createElement(c.Z,{className:Ue.itemText,primaryTypographyProps:{variant:"h6"},primary:de||r.createElement(r.Fragment,null,ze," | ",ke!=null?ke:ve," docs"),secondary:r.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:ce,overflow:"hidden"}},Q!=null&&Q.fields.text?r.createElement(a.FA,{text:Q.fields.text,preTag:Q.preTag,postTag:Q.postTag}):G.text)})},Se=({children:ze})=>xe?r.createElement(m.Link,{to:G.location},ze):r.createElement(r.Fragment,null,ze),Ne=({children:ze})=>we?r.createElement(r.Fragment,null,r.createElement(f.Z,{alignItems:"flex-start",className:Ue.flexContainer},ze),r.createElement(S.Z,{component:"li"})):r.createElement(r.Fragment,null,ze);return r.createElement(Se,null,r.createElement(Ne,null,r.createElement(re,null)))};var y=e(86619),g=e(50581),v=e(61837),b=e(4614),L=e(21853),D=e(88013),W=e(10289),M=e(48760);const P=(0,t.Z)({root:{width:"100%"}}),B=$=>{const{entityId:G,debounceTime:Q=150}=$,[ce,we]=(0,r.useState)(!1),xe=(0,W.s0)(),{term:de,setTerm:Ue,setFilters:re,result:{loading:Se,value:Ne}}=(0,a.Rx)(),ze=P(),[ke,ve]=(0,r.useState)([]);(0,r.useEffect)(()=>{let Qe=!0;if(Qe&&Ne){const et=Ne.results.slice(0,10);ve(et)}return()=>{Qe=!1}},[Se,Ne]);const[Ie,Be]=(0,r.useState)(de);(0,M.Z)(()=>Ue(Ie),Q,[Ie]);const{kind:je,name:at,namespace:Tt}=G;(0,r.useEffect)(()=>{re(Qe=>({...Qe,kind:je,namespace:Tt,name:at}))},[je,Tt,at,re]);const _e=Qe=>{ce||we(!0),Be(Qe.target.value)},st=(Qe,et)=>{if(et!=null&&et.document){const{location:$t}=et.document;xe($t)}};return r.createElement(D.ZP,{classes:{root:ze.root},"data-testid":"techdocs-search-bar",size:"small",open:ce,getOptionLabel:()=>"",filterOptions:Qe=>Qe,onClose:()=>{we(!1)},onFocus:()=>{we(!0)},onChange:st,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:ke,renderOption:({document:Qe,highlight:et})=>r.createElement(u,{result:Qe,lineClamp:3,asListItem:!1,asLink:!1,title:Qe.title,highlight:et}),loading:Se,renderInput:Qe=>r.createElement(y.Z,{...Qe,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${G.name} docs`,value:Ie,onChange:_e,InputProps:{...Qe.InputProps,startAdornment:r.createElement(g.Z,{position:"start"},r.createElement(v.Z,{"aria-label":"Query",disabled:!0},r.createElement(L.Z,null))),endAdornment:r.createElement(r.Fragment,null,Se?r.createElement(b.Z,{color:"inherit",size:20}):null,Qe.InputProps.endAdornment)}})})},F=$=>{const G={term:"",types:["techdocs"],pageCursor:"",filters:$.entityId};return r.createElement(a.Nd,{initialState:G},r.createElement(B,{...$}))}},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.5cc31a3e.js.map
|