@techdocs/cli 0.0.0-nightly-20220422024928 → 0.0.0-nightly-20220425024022
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 +2 -2
- package/dist/embedded-app/.config-schema.json +5 -0
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/main.613d3de3.js +476 -0
- package/dist/embedded-app/static/main.613d3de3.js.map +1 -0
- package/dist/embedded-app/static/{runtime.698e0a31.js → runtime.613d3de3.js} +1 -1
- package/dist/embedded-app/static/{runtime.698e0a31.js.map → runtime.613d3de3.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.698e0a31.js → vendor.613d3de3.js} +27 -27
- package/dist/embedded-app/static/vendor.613d3de3.js.map +1 -0
- package/package.json +3 -3
- package/dist/embedded-app/static/main.698e0a31.js +0 -476
- package/dist/embedded-app/static/main.698e0a31.js.map +0 -1
- package/dist/embedded-app/static/vendor.698e0a31.js.map +0 -1
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
(()=>{var Ws=Object.defineProperty;var Hs=(q,i,e)=>i in q?Ws(q,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):q[i]=e;var Q=(q,i,e)=>(Hs(q,typeof i!="symbol"?i+"":i,e),e),ia=(q,i,e)=>{if(!i.has(q))throw TypeError("Cannot "+e)};var Je=(q,i,e)=>(ia(q,i,"read from private field"),e?e.call(q):i.get(q)),In=(q,i,e)=>{if(i.has(q))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(q):i.set(q,e)},Un=(q,i,e,r)=>(ia(q,i,"write to private field"),r?r.call(q,e):i.set(q,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(q,i,e){"use strict";e.d(i,{n3:function(){return v},MS:function(){return m}});var r=e(48023),t=e(10179),c=e(96279),h=e.n(c);const v=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class m{constructor(s){Q(this,"discoveryApi");Q(this,"fetchApi");this.discoveryApi=s.discoveryApi,this.fetchApi=s.fetchApi||{fetch:h()}}async getEntityAncestors(s,f){const{kind:y,namespace:u,name:A}=(0,r.of)(s.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(u)}/${encodeURIComponent(A)}/ancestry`,f)}async getLocationById(s,f){return await this.requestOptional("GET",`/locations/${encodeURIComponent(s)}`,f)}async getEntities(s,f){const{filter:y=[],fields:u=[],offset:A,limit:b,after:S}=s!=null?s:{},F=[];for(const $ of[y].flat()){const B=[];for(const[x,J]of Object.entries($))for(const te of[J].flat())te===v?B.push(encodeURIComponent(x)):typeof te=="string"&&B.push(`${encodeURIComponent(x)}=${encodeURIComponent(te)}`);B.length&&F.push(`filter=${B.join(",")}`)}u.length&&F.push(`fields=${u.map(encodeURIComponent).join(",")}`),A!==void 0&&F.push(`offset=${A}`),b!==void 0&&F.push(`limit=${b}`),S!==void 0&&F.push(`after=${encodeURIComponent(S)}`);const _=F.length?`?${F.join("&")}`:"",M=await this.requestRequired("GET",`/entities${_}`,f),L=($,B)=>{var te,ve;if(((te=$.metadata)==null?void 0:te.name)===void 0||$.kind===void 0||((ve=B.metadata)==null?void 0:ve.name)===void 0||B.kind===void 0)return 0;const x=(0,r.eE)($),J=(0,r.eE)(B);return x<J?-1:x>J?1:0};return{items:M.sort(L)}}async getEntityByRef(s,f){const{kind:y,namespace:u,name:A}=(0,r.of)(s);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(u)}/${encodeURIComponent(A)}`,f)}async getEntityByName(s,f){const{kind:y,namespace:u="default",name:A}=s;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(u)}/${encodeURIComponent(A)}`,f)}async refreshEntity(s,f){const y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(f==null?void 0:f.token)&&{Authorization:`Bearer ${f==null?void 0:f.token}`}},method:"POST",body:JSON.stringify({entityRef:s})});if(y.status!==200)throw new Error(await y.text())}async getEntityFacets(s,f){const{filter:y=[],facets:u}=s,A=[];for(const S of[y].flat()){const F=[];for(const[_,M]of Object.entries(S))for(const L of[M].flat())L===v?F.push(encodeURIComponent(_)):typeof L=="string"&&F.push(`${encodeURIComponent(_)}=${encodeURIComponent(L)}`);F.length&&A.push(`filter=${F.join(",")}`)}for(const S of u)A.push(`facet=${encodeURIComponent(S)}`);const b=A.length?`?${A.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${b}`,f)}async addLocation({type:s="url",target:f,dryRun:y},u){const A=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${y?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(u==null?void 0:u.token)&&{Authorization:`Bearer ${u==null?void 0:u.token}`}},method:"POST",body:JSON.stringify({type:s,target:f})});if(A.status!==201)throw new Error(await A.text());const{location:b,entities:S,exists:F}=await A.json();if(!b)throw new Error(`Location wasn't added: ${f}`);return{location:b,entities:S,exists:F}}async getLocationByRef(s,f){return(await this.requestRequired("GET","/locations",f)).map(u=>u.data).find(u=>s===(0,r.NZ)(u))}async removeLocationById(s,f){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(s)}`,f)}async removeEntityByUid(s,f){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(s)}`,f)}async requestIgnored(s,f,y){const u=`${await this.discoveryApi.getBaseUrl("catalog")}${f}`,A=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},b=await this.fetchApi.fetch(u,{method:s,headers:A});if(!b.ok)throw await t.VL.fromResponse(b)}async requestRequired(s,f,y){const u=`${await this.discoveryApi.getBaseUrl("catalog")}${f}`,A=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},b=await this.fetchApi.fetch(u,{method:s,headers:A});if(!b.ok)throw await t.VL.fromResponse(b);return await b.json()}async requestOptional(s,f,y){const u=`${await this.discoveryApi.getBaseUrl("catalog")}${f}`,A=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},b=await this.fetchApi.fetch(u,{method:s,headers:A});if(!b.ok){if(b.status===404)return;throw await t.VL.fromResponse(b)}return await b.json()}}},48023:function(q,i,e){"use strict";e.d(i,{Tf:function(){return c},P1:function(){return sn},q1:function(){return z},M6:function(){return R},l2:function(){return t},zG:function(){return r},w$:function(){return ae},nP:function(){return j},aS:function(){return je},S4:function(){return wt},cz:function(){return Se},iB:function(){return Ie},of:function(){return He},Ou:function(){return P},eE:function(){return Ye},NZ:function(){return ce}});const r="default",t="backstage.io/view-url",c="backstage.io/edit-url";var h=e(76635),v=e.n(h);class m{constructor(D=DEFAULT_NAMESPACE){Q(this,"namespace");this.namespace=D}async enforce(D){return D.metadata.namespace?D:lodash.merge({metadata:{namespace:this.namespace}},D)}}class a{static isValidPrefixAndOrSuffix(D,re,ge,Pe){if(typeof D!="string")return!1;const pe=D.split(re);return pe.length===1?Pe(pe[0]):pe.length===2?ge(pe[0])&&Pe(pe[1]):!1}static isJsonSafe(D){try{return v().isEqual(D,JSON.parse(JSON.stringify(D)))}catch{return!1}}static isValidDnsSubdomain(D){return typeof D=="string"&&D.length>=1&&D.length<=253&&D.split(".").every(a.isValidDnsLabel)}static isValidDnsLabel(D){return typeof D=="string"&&D.length>=1&&D.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(D)}static isValidTag(D){return typeof D=="string"&&D.length>=1&&D.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(D)}static isValidUrl(D){if(typeof D!="string")return!1;try{return new URL(D),!0}catch{return!1}}static isValidString(D){var re;return typeof D=="string"&&((re=D==null?void 0:D.trim())==null?void 0:re.length)>=1}static isNonEmptyString(D){var re;return typeof D=="string"&&((re=D==null?void 0:D.trim())==null?void 0:re.length)>=1}}var s=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),f=e(48231),y=e.n(f),u=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"}}}`),A=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 S=new Map,F=[s,u,A,b];function _(Z){if(!(Z!=null&&Z.length))throw new TypeError("Unknown error");const D=Z[0];throw new TypeError(`${D.instancePath||"<root>"} ${D.message}${D.params?` - ${Object.entries(D.params).map(([re,ge])=>`${re}: ${ge}`).join(", ")}`:""}`)}function M(Z,D={}){var Ze;const re=(Ze=D==null?void 0:D.disableCache)!=null?Ze:!1,ge=re?"":JSON.stringify(Z);if(!re){const qe=S.get(ge);if(qe)return qe}const Pe=L(Z),pe=new(y())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});Pe.length&&pe.addSchema(Pe,void 0,void 0,!0);const we=pe.compile(Z);return re||S.set(ge,we),we}function L(Z){if(typeof Z!="object")return[];const D=new Set;Z.$id&&D.add(Z.$id);const re=new Array,ge=[Z];for(;ge.length;){const Pe=ge.pop();for(const pe of $(Pe))if(!D.has(pe)){D.add(pe);const we=F.find(Ze=>Ze.$id===pe);we&&(re.push(we),ge.push(we))}}return re}function*$(Z){const D=[Z];for(;D.length;){const re=D.pop();if(typeof re=="object"&&re)for(const[ge,Pe]of Object.entries(re))ge==="$ref"&&typeof Pe=="string"?yield Pe.split("#")[0]:D.push(Pe)}}function B(Z){const D=compileAjvSchema(Z||entityEnvelopeSchema);return re=>{if(D(re)===!0)return re;throw throwAjvError(D.errors)}}function x(Z){const D=M(Z);return re=>{var pe;if(D(re)===!0)return re;const Pe=(pe=D.errors)==null?void 0:pe.filter(we=>["/kind","/apiVersion"].includes(we.instancePath));if((Pe==null?void 0:Pe.length)&&Pe.every(we=>we.keyword==="enum"))return!1;throw _(D.errors)}}function J(Z){const D=compileAjvSchema(Z||entitySchema);return re=>{if(D(re)===!0)return re;throw throwAjvError(D.errors)}}class te{static isValidApiVersion(D){return a.isValidPrefixAndOrSuffix(D,"/",a.isValidDnsSubdomain,re=>re.length>=1&&re.length<=63&&/^[a-z0-9A-Z]+$/.test(re))}static isValidKind(D){return typeof D=="string"&&D.length>=1&&D.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(D)}static isValidObjectName(D){return typeof D=="string"&&D.length>=1&&D.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(D)}static isValidNamespace(D){return a.isValidDnsLabel(D)}static isValidLabelKey(D){return a.isValidPrefixAndOrSuffix(D,"/",a.isValidDnsSubdomain,te.isValidObjectName)}static isValidLabelValue(D){return D===""||te.isValidObjectName(D)}static isValidAnnotationKey(D){return a.isValidPrefixAndOrSuffix(D,"/",a.isValidDnsSubdomain,te.isValidObjectName)}static isValidAnnotationValue(D){return typeof D=="string"}}const ve={isValidApiVersion:te.isValidApiVersion,isValidKind:te.isValidKind,isValidEntityName:te.isValidObjectName,isValidNamespace:te.isValidNamespace,isValidLabelKey:te.isValidLabelKey,isValidLabelValue:te.isValidLabelValue,isValidAnnotationKey:te.isValidAnnotationKey,isValidAnnotationValue:te.isValidAnnotationValue,isValidTag:Z=>typeof Z=="string"&&Z.length>=1&&Z.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(Z)};function Ve(Z={}){return{...ve,...Z}}class We{constructor(D=makeValidator()){Q(this,"validators");this.validators=D}async enforce(D){var we,Ze,qe,At,st,lt,Mt;function re(ke,Rt,Yt){if(Rt==null)throw new Error(`${ke} must have a value`);let ht;try{ht=Yt(Rt)}catch(Qe){throw new Error(`${ke} could not be validated, ${Qe}`)}if(!ht){let Qe;switch(Yt.name){case"isValidLabelValue":case"isValidObjectName":Qe="a string that is sequences of [a-zA-Z0-9] separated by any of [-_.], at most 63 characters in total";break;case"isValidLabelKey":case"isValidApiVersion":case"isValidAnnotationKey":Qe="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":Qe="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":Qe="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":Qe="a string";break;case"isValidKind":Qe="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":Qe="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":Qe="a non empty string";break;default:Qe=void 0;break}const Xe=Qe?` expected ${Qe} but found "${Rt}".`:"";throw new Error(`"${ke}" is not valid;${Xe} 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 ge(ke,Rt,Yt){return Rt===void 0||re(ke,Rt,Yt)}re("apiVersion",D.apiVersion,this.validators.isValidApiVersion),re("kind",D.kind,this.validators.isValidKind),re("metadata.name",D.metadata.name,this.validators.isValidEntityName),ge("metadata.namespace",D.metadata.namespace,this.validators.isValidNamespace);for(const[ke,Rt]of Object.entries((we=D.metadata.labels)!=null?we:[]))re(`labels.${ke}`,ke,this.validators.isValidLabelKey),re(`labels.${ke}`,Rt,this.validators.isValidLabelValue);for(const[ke,Rt]of Object.entries((Ze=D.metadata.annotations)!=null?Ze:[]))re(`annotations.${ke}`,ke,this.validators.isValidAnnotationKey),re(`annotations.${ke}`,Rt,this.validators.isValidAnnotationValue);const Pe=(qe=D.metadata.tags)!=null?qe:[];for(let ke=0;ke<Pe.length;++ke)re(`tags.${ke}`,Pe[ke],this.validators.isValidTag);const pe=(At=D.metadata.links)!=null?At:[];for(let ke=0;ke<pe.length;++ke)re(`links.${ke}.url`,(st=pe[ke])==null?void 0:st.url,CommonValidatorFunctions.isValidUrl),ge(`links.${ke}.title`,(lt=pe[ke])==null?void 0:lt.title,CommonValidatorFunctions.isNonEmptyString),ge(`links.${ke}.icon`,(Mt=pe[ke])==null?void 0:Mt.icon,KubernetesValidatorFunctions.isValidObjectName);return D}}class ue{constructor(){Q(this,"validate")}async enforce(D){if(!this.validate){const Pe=new Ajv({allowUnionTypes:!0});this.validate=Pe.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(D)===!0)return D;const[ge]=this.validate.errors||[];throw ge?new Error(`Malformed envelope, ${ge.instancePath||"<root>"} ${ge.message}`):new Error("Malformed envelope, Unknown error")}}function Ee(Z){let D=Z.indexOf(":");const re=Z.indexOf("/");re!==-1&&re<D&&(D=-1);const ge=D===-1?void 0:Z.slice(0,D),Pe=re===-1?void 0:Z.slice(D+1,re),pe=Z.slice(Math.max(D+1,re+1));if(ge===""||Pe===""||pe==="")throw new TypeError(`Entity reference "${Z}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:ge,namespace:Pe,name:pe}}function Ie(Z){return{kind:Z.kind,namespace:Z.metadata.namespace||r,name:Z.metadata.name}}function He(Z,D){var Ze,qe,At,st;if(!Z)throw new Error("Entity reference must not be empty");const re=D==null?void 0:D.defaultKind,ge=(D==null?void 0:D.defaultNamespace)||r;let Pe,pe,we;if(typeof Z=="string"){const lt=Ee(Z);Pe=(Ze=lt.kind)!=null?Ze:re,pe=(qe=lt.namespace)!=null?qe:ge,we=lt.name}else Pe=(At=Z.kind)!=null?At:re,pe=(st=Z.namespace)!=null?st:ge,we=Z.name;if(Pe)if(pe){if(!we){const lt=JSON.stringify(Z);throw new Error(`Entity reference ${lt} had missing or empty name`)}}else{const lt=JSON.stringify(Z);throw new Error(`Entity reference ${lt} had missing or empty namespace`)}else{const lt=JSON.stringify(Z);throw new Error(`Entity reference ${lt} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:Pe,namespace:pe,name:we}}function Ye(Z){var Pe,pe;let D,re,ge;return"metadata"in Z?(D=Z.kind,re=(Pe=Z.metadata.namespace)!=null?Pe:r,ge=Z.metadata.name):(D=Z.kind,re=(pe=Z.namespace)!=null?pe:r,ge=Z.name),`${D.toLocaleLowerCase("en-US")}:${re.toLocaleLowerCase("en-US")}/${ge.toLocaleLowerCase("en-US")}`}class ot{constructor(D){this.policies=D}async enforce(D){let re=D;for(const ge of this.policies){const Pe=await ge.enforce(re);if(!Pe)throw new Error(`Policy ${ge.constructor.name} did not return a result`);re=Pe}return re}}class tt{constructor(D){this.policies=D}async enforce(D){for(const re of this.policies){const ge=await re.enforce(D);if(ge)return ge}throw new Error("The entity did not match any known policy")}}const Ce={allOf(Z){return new ot(Z)},oneOf(Z){return new tt(Z)}};var Ne=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 Ue(Z){const D=x(Z);return{async check(re){return D(re)===re}}}const pt=Ue(Ne);var Ke=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ComponentV1alpha1","description":"A Component describes a software component. It is typically intimately linked to the source code that constitutes the component, and should be what a developer may regard a \\"unit of software\\", usually with a distinct deployable or linkable artifact.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Component"]},"spec":{"type":"object","required":["type","lifecycle","owner"],"properties":{"type":{"type":"string","description":"The type of component.","examples":["service","website","library"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the component.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the component belongs to.","minLength":1},"subcomponentOf":{"type":"string","description":"An entity reference to another component of which the component is a part.","minLength":1},"providesApis":{"type":"array","description":"An array of entity references to the APIs that are provided by the component.","items":{"type":"string","minLength":1}},"consumesApis":{"type":"array","description":"An array of entity references to the APIs that are consumed by the component.","items":{"type":"string","minLength":1}},"dependsOn":{"type":"array","description":"An array of references to other entities that the component depends on to function.","items":{"type":"string","minLength":1}}}}}}]}');const Ft=Ue(Ke);var mt=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 Bt=Ue(mt);var Ht=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"GroupV1alpha1","description":"A group describes an organizational entity, such as for example a team, a business unit, or a loose collection of people in an interest group. Members of these groups are modeled in the catalog as kind User.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Group","metadata":{"name":"infrastructure","description":"The infra business unit"},"spec":{"type":"business-unit","profile":{"displayName":"Infrastructure","email":"infrastructure@example.com","picture":"https://example.com/groups/bu-infrastructure.jpeg"},"parent":"ops","children":["backstage","other"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Group"]},"spec":{"type":"object","required":["type","children"],"properties":{"type":{"type":"string","description":"The type of group. There is currently no enforced set of values for this field, so it is left up to the adopting organization to choose a nomenclature that matches their org hierarchy.","examples":["team","business-unit","product-area","root"],"minLength":1},"profile":{"type":"object","description":"Optional profile information about the group, mainly for display purposes. All fields of this structure are also optional. The email would be a group email of some form, that the group may wish to be used for contacting them. The picture is expected to be a URL pointing to an image that's representative of the group, and that a browser could fetch and render on a group page or similar.","properties":{"displayName":{"type":"string","description":"A simple display name to present to users.","examples":["Infrastructure"],"minLength":1},"email":{"type":"string","description":"An email where this entity can be reached.","examples":["infrastructure@example.com"],"minLength":1},"picture":{"type":"string","description":"The URL of an image that represents this entity.","examples":["https://example.com/groups/bu-infrastructure.jpeg"],"minLength":1}}},"parent":{"type":"string","description":"The immediate parent group in the hierarchy, if any. Not all groups must have a parent; the catalog supports multi-root hierarchies. Groups may however not have more than one parent. This field is an entity reference.","examples":["ops"],"minLength":1},"children":{"type":"array","description":"The immediate child groups of this group in the hierarchy (whose parent field points to this group). The list must be present, but may be empty if there are no child groups. The items are not guaranteed to be ordered in any particular way. The entries of this array are entity references.","items":{"type":"string","examples":["backstage","other"],"minLength":1}},"members":{"type":"array","description":"The users that are members of this group. The entries of this array are entity references.","items":{"type":"string","examples":["jdoe"],"minLength":1}}}}}}]}`);const Ot=Ue(Ht);var jt=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"LocationV1alpha1","description":"A location is a marker that references other places to look for catalog data.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Location","metadata":{"name":"org-data"},"spec":{"type":"url","targets":["http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-consultants.yaml"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Location"]},"spec":{"type":"object","required":[],"properties":{"type":{"type":"string","description":"The single location type, that's common to the targets specified in the spec. If it is left out, it is inherited from the location type that originally read the entity data.","examples":["url"],"minLength":1},"target":{"type":"string","description":"A single target as a string. Can be either an absolute path/URL (depending on the type), or a relative path such as ./details/catalog-info.yaml which is resolved relative to the location of this Location entity itself.","examples":["./details/catalog-info.yaml"],"minLength":1},"targets":{"type":"array","description":"A list of targets as strings. They can all be either absolute paths/URLs (depending on the type), or relative paths such as ./details/catalog-info.yaml which are resolved relative to the location of this Location entity itself.","items":{"type":"string","examples":["./details/catalog-info.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml"],"minLength":1}},"presence":{"type":"string","description":"Whether the presence of the location target is required and it should be considered an error if it can not be found","default":"required","examples":["required"],"enum":["required","optional"]}}}}}]}`);const Zt=Ue(jt),wt="ownedBy",An="ownerOf",Gt="consumesApi",Et="apiConsumedBy",un="providesApi",se="apiProvidedBy",j="dependsOn",ae="dependencyOf",le="parentOf",ye="childOf",Le="memberOf",Be="hasMember",Se="partOf",je="hasPart";var ut=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 bt=Ue(ut);var vt=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 at=Ue(vt);var Ct=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 dt=Ue(Ct),sn="backstage.io/managed-by-location",z="backstage.io/managed-by-origin-location",R="backstage.io/source-location";function P(Z){if(typeof Z!="string")throw new TypeError(`Unable to parse location ref '${Z}', unexpected argument ${typeof Z}`);const D=Z.indexOf(":");if(D<0)throw new TypeError(`Unable to parse location ref '${Z}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const re=Z.substring(0,D).trim(),ge=Z.substring(D+1).trim();if(!re||!ge)throw new TypeError(`Unable to parse location ref '${Z}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(re==="http"||re==="https")throw new TypeError(`Invalid location ref '${Z}', please prefix it with 'url:', e.g. 'url:${Z}'`);return{type:re,target:ge}}function ce(Z){const{type:D,target:re}=Z;if(D){if(!re)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${D}:${re}`}function de(Z){var re,ge,Pe,pe,we;const D=(we=(ge=(re=Z.metadata)==null?void 0:re.annotations)==null?void 0:ge[ANNOTATION_SOURCE_LOCATION])!=null?we:(pe=(Pe=Z.metadata)==null?void 0:Pe.annotations)==null?void 0:pe[ANNOTATION_LOCATION];if(!D)throw new Error(`Entity '${stringifyEntityRef(Z)}' is missing location`);return P(D)}},62159:function(q,i,e){"use strict";e.d(i,{m:function(){return f}});var r=e(9850),t=e.n(r),c=e(12782),h=e.n(c);const v=/^[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 u=typeof y;return u==="number"&&isNaN(y)?"nan":u==="string"&&y===""?"empty-string":u}const s={type(y,u,A,b){return`Invalid type in config for key '${y}' in '${u}', got ${A}, wanted ${b}`},missing(y){return`Missing required config value at '${y}'`},convert(y,u,A){return`Unable to convert config value for key '${y}' in '${u}' to a ${A}`}};class f{constructor(u,A="mock-config",b,S=""){Q(this,"filteredKeys");Q(this,"notifiedFilteredKeys",new Set);this.data=u,this.context=A,this.fallback=b,this.prefix=S}static fromConfigs(u){return u.length===0?new f(void 0):u.reduce((A,{data:b,context:S,filteredKeys:F,deprecatedKeys:_})=>{const M=new f(b,S,A);if(M.filteredKeys=F,_)for(const{key:L,description:$}of _)console.warn(`The configuration key '${L}' of ${S} is deprecated and may be removed soon. ${$||""}`);return M},void 0)}has(u){var b,S;return this.readValue(u)!==void 0?!0:(S=(b=this.fallback)==null?void 0:b.has(u))!=null?S:!1}keys(){var b,S;const u=this.data?Object.keys(this.data):[],A=(S=(b=this.fallback)==null?void 0:b.keys())!=null?S:[];return[...new Set([...u,...A])]}get(u){const A=this.getOptional(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u!=null?u:"")));return A}getOptional(u){var S;const A=t()(this.readValue(u)),b=(S=this.fallback)==null?void 0:S.getOptional(u);return A===void 0?b:b===void 0?A:h()({},{value:b},{value:A},(F,_)=>!m(_)||!m(F)?_:void 0).value}getConfig(u){const A=this.getOptionalConfig(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalConfig(u){var S;const A=this.readValue(u),b=(S=this.fallback)==null?void 0:S.getOptionalConfig(u);if(m(A))return this.copy(A,u,b);if(A!==void 0)throw new TypeError(s.type(this.fullKey(u),this.context,a(A),"object"));return b}getConfigArray(u){const A=this.getOptionalConfigArray(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalConfigArray(u){const A=this.readConfigValue(u,b=>{if(!Array.isArray(b))return{expected:"object-array"};for(const[S,F]of b.entries())if(!m(F))return{expected:"object-array",value:F,key:`${u}[${S}]`};return!0});if(!!A)return A.map((b,S)=>this.copy(b,`${u}[${S}]`))}getNumber(u){const A=this.getOptionalNumber(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalNumber(u){const A=this.readConfigValue(u,S=>typeof S=="number"||typeof S=="string"||{expected:"number"});if(typeof A=="number"||A===void 0)return A;const b=Number(A);if(!Number.isFinite(b))throw new Error(s.convert(this.fullKey(u),this.context,"number"));return b}getBoolean(u){const A=this.getOptionalBoolean(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalBoolean(u){return this.readConfigValue(u,A=>typeof A=="boolean"||{expected:"boolean"})}getString(u){const A=this.getOptionalString(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalString(u){return this.readConfigValue(u,A=>typeof A=="string"&&A!==""||{expected:"string"})}getStringArray(u){const A=this.getOptionalStringArray(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalStringArray(u){return this.readConfigValue(u,A=>{if(!Array.isArray(A))return{expected:"string-array"};for(const[b,S]of A.entries())if(typeof S!="string"||S==="")return{expected:"string-array",value:S,key:`${u}[${b}]`};return!0})}fullKey(u){return`${this.prefix}${this.prefix?".":""}${u}`}copy(u,A,b){const S=new f(u,this.context,b,this.fullKey(A));return S.filteredKeys=this.filteredKeys,S}readConfigValue(u,A){var F;const b=this.readValue(u);if(b===void 0)return(F=this.fallback)==null?void 0:F.readConfigValue(u,A);const S=A(b);if(S!==!0){const{key:_=u,value:M=b,expected:L}=S;throw new TypeError(s.type(this.fullKey(_),this.context,a(M),L))}return b}readValue(u){const A=u?u.split("."):[];for(const S of A)if(!v.test(S))throw new TypeError(`Invalid config key '${u}'`);if(this.data===void 0)return;let b=this.data;for(const[S,F]of A.entries())if(m(b))b=b[F];else if(b!==void 0){const _=this.fullKey(A.slice(0,S).join("."));throw new TypeError(s.type(_,this.context,a(b),"object"))}return b}}},23235:function(q,i,e){"use strict";e.d(i,{C:function(){return t}});var r=e(98005);class t{constructor(){Q(this,"subject",new r.J)}post(h){this.subject.next(h)}alert$(){return this.subject}}},47150:function(q,i,e){"use strict";e.d(i,{g:function(){return r}});class r{captureEvent(c){}}},58652:function(q,i,e){"use strict";e.d(i,{C:function(){return c}});var r=e(98005);const t="theme";class c{constructor(v){Q(this,"activeThemeId");Q(this,"subject",new r.X(void 0));this.themes=v}static createWithStorage(v){var s;const m=new c(v);if(!window.localStorage)return m;const a=(s=window.localStorage.getItem(t))!=null?s:void 0;return m.setActiveThemeId(a),m.activeThemeId$().subscribe(f=>{f?window.localStorage.setItem(t,f):window.localStorage.removeItem(t)}),window.addEventListener("storage",f=>{var y;if(f.key===t){const u=(y=localStorage.getItem(t))!=null?y:void 0;m.setActiveThemeId(u)}}),m}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(v){this.activeThemeId=v,this.subject.next(v)}}},22053:function(q,i,e){"use strict";e.d(i,{m:function(){return r.m}});var r=e(62159)},4333:function(q,i,e){"use strict";e.d(i,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(h){const v=h.split(/\{\{\s*pluginId\s*\}\}/),m=v.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(v)}constructor(h){this.parts=h}async getBaseUrl(h){return this.parts.join(h)}}},89536:function(q,i,e){"use strict";e.d(i,{KN:function(){return r},gr:function(){return c},Jv:function(){return h}});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(){Q(this,"subject",new t.J)}post(m,a){this.subject.next({error:m,context:a})}error$(){return this.subject}}class h{static forward(m,a){window.addEventListener("unhandledrejection",s=>{m.post(s.reason,a)})}}},14884:function(q,i,e){"use strict";e.d(i,{b:function(){return c}});var r=e(36964);function t(h){if(h.length<3)throw new Error(`The '${h}' feature flag must have a minimum length of three characters.`);if(h.length>150)throw new Error(`The '${h}' feature flag must not exceed 150 characters.`);if(!h.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${h}' 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(){Q(this,"registeredFeatureFlags",[]);Q(this,"flags")}registerFlag(v){t(v.name),this.registeredFeatureFlags.push(v)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(v){return this.flags||(this.flags=this.load()),this.flags.get(v)===r.FeatureFlagState.Active}save(v){this.flags||(this.flags=this.load()),v.merge||this.flags.clear();for(const[a,s]of Object.entries(v.states))this.flags.set(a,s);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 v=window.localStorage.getItem("featureFlags");if(!v)return new Map;const m=JSON.parse(v);if(typeof m!="object"||m===null||Array.isArray(m))return new Map;const a=Object.entries(m).filter(([s,f])=>(t(s),f===r.FeatureFlagState.Active));return new Map(a)}catch{return new Map}}}},50160:function(q,i,e){"use strict";e.d(i,{I:function(){return a},j:function(){return r}});function r(s){var u;let f=s.baseImplementation||e.g.fetch;const y=[(u=s.middleware)!=null?u:[]].flat().reverse();for(const A of y)f=A.apply(f);return{fetch:f}}class t{static create(f){var b,S;const y=c(f),u=((b=f.header)==null?void 0:b.name)||"authorization",A=((S=f.header)==null?void 0:S.value)||(F=>`Bearer ${F}`);return new t(f.identityApi,y,u,A)}constructor(f,y,u,A){this.identityApi=f,this.allowUrl=y,this.headerName=u,this.headerValue=A}apply(f){return async(y,u)=>{const A=new Request(y,u),{token:b}=await this.identityApi.getCredentials();return A.headers.get(this.headerName)||typeof b!="string"||!b||!this.allowUrl(A.url)?f(y,u):(A.headers.set(this.headerName,this.headerValue(b)),f(A))}}}function c(s){return s.allowUrl?s.allowUrl:s.urlPrefixAllowlist?h(s.urlPrefixAllowlist):s.config?h([s.config.getString("backend.baseUrl")]):()=>!1}function h(s){const f=s.map(y=>y.replace(/\/$/,""));return y=>f.some(u=>y===u||y.startsWith(`${u}/`))}function v(s,f){return!f||f==="/"?s:`${s.replace(/\/$/,"")}/${f.replace(/^\//,"")}`}class m{constructor(f){this.discoveryApi=f}apply(f){return async(y,u)=>{const A=new Request(y,u),b="plugin://";if(!A.url.startsWith(b))return f(y,u);const{hostname:S,pathname:F,search:_,hash:M,username:L,password:$}=new URL(`http://${A.url.substring(b.length)}`);let B=await this.discoveryApi.getBaseUrl(S);if(L||$){const J=new URL(B),te=`${L}${$?`:${$}`:""}@`;B=`${J.protocol}//${te}${J.host}${J.pathname}`}const x=`${v(B,F)}${_}${M}`;return f(x,typeof y=="string"?u:y)}}}class a{static resolvePluginProtocol(f){return new m(f.discoveryApi)}static injectIdentityAuth(f){return t.create(f)}constructor(){}}},11358:function(q,i,e){"use strict";e.d(i,{Y:function(){return v}});var r=e(98005);function t(m,a){for(const s of a)if(!m.has(s))return!1;return!0}function c(m,...a){const s=new Set(m);for(const f of a)for(const y of f)s.add(y);return s}class h{constructor(){Q(this,"requests",[]);Q(this,"subject",new r.X(this.getCurrentPending()))}request(a){return new Promise((s,f)=>{this.requests.push({scopes:a,resolve:s,reject:f}),this.subject.next(this.getCurrentPending())})}resolve(a,s){this.requests=this.requests.filter(f=>t(a,f.scopes)?(f.resolve(s),!1):!0),this.subject.next(this.getCurrentPending())}reject(a){this.requests.forEach(s=>s.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((s,f)=>c(s,f.scopes),this.requests[0].scopes);return{scopes:a,resolve:s=>{a&&this.resolve(a,s)},reject:s=>{a&&this.reject(s)}}}}class v{constructor(){Q(this,"subject",new r.X([]));Q(this,"currentRequests",[]);Q(this,"handlerCount",0)}createAuthRequester(a){const s=new h,f=this.handlerCount;return this.handlerCount++,s.pending().subscribe({next:y=>{const u=this.currentRequests.slice(),A=this.makeAuthRequest(y,a);A?u[f]=A:delete u[f],this.currentRequests=u,this.subject.next(u.filter(Boolean))}}),y=>s.request(y)}makeAuthRequest(a,s){const{scopes:f}=a;if(!!f)return{provider:s.provider,trigger:async()=>{const y=await s.onAuthRequest(f);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(q,i,e){"use strict";e.d(i,{C:function(){return h}});var r=e(82394),t=e.n(r);const c=new Map;class h{constructor(m,a){Q(this,"subscribers",new Set);Q(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 h((a=m.namespace)!=null?a:"",m.errorApi)}get(m){return this.snapshot(m).value}snapshot(m){let a,s="absent";try{const f=localStorage.getItem(this.getKeyName(m));f&&(a=JSON.parse(f,(y,u)=>(typeof u=="object"&&u!==null&&Object.freeze(u),u)),s="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${m}`))}return{key:m,value:a,presence:s}}forBucket(m){const a=`${this.namespace}/${m}`;return c.has(a)||c.set(a,new h(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 s of this.subscribers)s.next(a)}}},59589:function(q,i,e){"use strict";e.d(i,{u:function(){return c}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class c{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:f}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:s,environment:a})}}},6098:function(q,i,e){"use strict";e.d(i,{Z:function(){return c}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class c{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:f,defaultScopes:y=["team"]}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:s,environment:a,defaultScopes:y})}}},44431:function(q,i,e){"use strict";e.d(i,{BitbucketAuth:function(){return c.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(i,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(i,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(i,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var c=e(6098)},19347:function(){},44474:function(q,i,e){"use strict";e.d(i,{T:function(){return c}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class c{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:f,defaultScopes:y=["read:user"]}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:s,environment:a,defaultScopes:y})}}},2922:function(q,i,e){"use strict";e.d(i,{a:function(){return c}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class c{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:f,defaultScopes:y=["read_user"]}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:s,environment:a,defaultScopes:y})}}},59938:function(q,i,e){"use strict";e.d(i,{e:function(){return h}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},c="https://www.googleapis.com/auth/";class h{static create(m){const{discoveryApi:a,oauthRequestApi:s,environment:f="development",provider:y=t,defaultScopes:u=["openid",`${c}userinfo.email`,`${c}userinfo.profile`]}=m;return r.OAuth2.create({discoveryApi:a,oauthRequestApi:s,provider:y,environment:f,defaultScopes:u,scopeTransform(A){return A.map(b=>b==="openid"?b:b==="profile"||b==="email"?`${c}userinfo.${b}`:b.startsWith(c)?b:`${c}${b}`)}})}}},91668:function(q,i,e){"use strict";e.d(i,{AtlassianAuth:function(){return y.u},BitbucketAuth:function(){return f.BitbucketAuth},GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return c.e},MicrosoftAuth:function(){return a._},OktaAuth:function(){return v.s},OneLoginAuth:function(){return s.$}});var r=e(44474),t=e(2922),c=e(59938),h=e(91205);e.o(h,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return h.AlertApiForwarder}}),e.o(h,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return h.AppThemeSelector}}),e.o(h,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return h.AtlassianAuth}}),e.o(h,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return h.BitbucketAuth}}),e.o(h,"ConfigReader")&&e.d(i,{ConfigReader:function(){return h.ConfigReader}}),e.o(h,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return h.ErrorAlerter}}),e.o(h,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return h.ErrorApiForwarder}}),e.o(h,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return h.FetchMiddlewares}}),e.o(h,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return h.FlatRoutes}}),e.o(h,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return h.LocalStorageFeatureFlags}}),e.o(h,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return h.MicrosoftAuth}}),e.o(h,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return h.NoOpAnalyticsApi}}),e.o(h,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return h.OAuthRequestManager}}),e.o(h,"OktaAuth")&&e.d(i,{OktaAuth:function(){return h.OktaAuth}}),e.o(h,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return h.OneLoginAuth}}),e.o(h,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return h.UnhandledErrorForwarder}}),e.o(h,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return h.UrlPatternDiscovery}}),e.o(h,"WebStorage")&&e.d(i,{WebStorage:function(){return h.WebStorage}}),e.o(h,"createFetchApi")&&e.d(i,{createFetchApi:function(){return h.createFetchApi}}),e.o(h,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return h.createSpecializedApp}}),e.o(h,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return h.defaultConfigLoader}});var v=e(26079),m=e(67604),a=e(38482),s=e(58381),f=e(44431);e.o(f,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"ConfigReader")&&e.d(i,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(i,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(i,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return f.createSpecializedApp}}),e.o(f,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return f.defaultConfigLoader}});var y=e(59589)},38482:function(q,i,e){"use strict";e.d(i,{_:function(){return c}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class c{static create(v){const{environment:m="development",provider:a=t,oauthRequestApi:s,discoveryApi:f,defaultScopes:y=["openid","offline_access","profile","email","User.Read"]}=v;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:s,provider:a,environment:m,defaultScopes:y})}}},73124:function(q,i,e){"use strict";e.d(i,{Z:function(){return m}});function r(a){return new Promise((s,f)=>{const y=a.width||500,u=a.height||700,A=window.screen.width/2-y/2,b=window.screen.height/2-u/2,S=window.open(a.url,a.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${y},height=${u},top=${b},left=${A}`);let F="";if(!S||typeof S.closed=="undefined"||S.closed){const $=new Error("Failed to open auth popup.");$.name="PopupRejectedError",f($);return}const _=$=>{if($.source!==S||$.origin!==a.origin)return;const{data:B}=$;if(B.type==="config_info"){F=B.targetOrigin;return}if(B.type!=="authorization_response")return;const x=B;if("error"in x){const J=new Error(x.error.message);J.name=x.error.name,f(J)}else s(x.response);L()},M=setInterval(()=>{if(S.closed){const $=`Login failed, ${F&&F!==window.location.origin?`Incorrect app origin, expected ${F}`:"popup was closed"}`,B=new Error($);B.name="PopupClosedError",f(B),L()}},100);function L(){window.removeEventListener("message",_),clearInterval(M)}window.addEventListener("message",_)})}function t(a){return[...a].join(" ")}class c{constructor(s){Q(this,"discoveryApi");Q(this,"environment");Q(this,"provider");Q(this,"joinScopesFunc");Q(this,"authRequester");Q(this,"sessionTransform");const{discoveryApi:f,environment:y,provider:u,joinScopes:A=t,oauthRequestApi:b,sessionTransform:S=F=>F}=s;this.authRequester=b.createAuthRequester({provider:u,onAuthRequest:F=>this.showPopup(F)}),this.discoveryApi=f,this.environment=y,this.provider=u,this.joinScopesFunc=A,this.sessionTransform=S}async createSession(s){return s.instantPopup?this.showPopup(s.scopes):this.authRequester(s.scopes)}async refreshSession(){const s=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(!s.ok){const y=new Error(`Auth refresh request failed, ${s.statusText}`);throw y.status=s.status,y}const f=await s.json();if(f.error){const y=new Error(f.error.message);throw f.error.name&&(y.name=f.error.name),y}return await this.sessionTransform(f)}async removeSession(){const s=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(f=>{throw new Error(`Logout request failed, ${f}`)});if(!s.ok){const f=new Error(`Logout request failed, ${s.statusText}`);throw f.status=s.status,f}}async showPopup(s){const f=this.joinScopesFunc(s),y=await this.buildUrl("/start",{scope:f,origin:location.origin}),u=await r({url:y,name:`${this.provider.title} Login`,origin:new URL(y).origin,width:450,height:730});return await this.sessionTransform(u)}async buildUrl(s,f){const y=await this.discoveryApi.getBaseUrl("auth"),u=this.buildQueryString({...f,env:this.environment});return`${y}/${this.provider.id}${s}${u}`}buildQueryString(s){if(!s)return"";const f=Object.entries(s).map(([y,u])=>{if(typeof u=="string")return`${encodeURIComponent(y)}=${encodeURIComponent(u)}`;if(u)return encodeURIComponent(y)}).filter(Boolean).join("&");return f?`?${f}`:""}}var h=e(57018);const v={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class m{constructor(s){Q(this,"sessionManager");Q(this,"scopeTransform");this.sessionManager=s.sessionManager,this.scopeTransform=s.scopeTransform}static create(s){const{discoveryApi:f,environment:y="development",provider:u=v,oauthRequestApi:A,defaultScopes:b=[],scopeTransform:S=M=>M}=s,F=new c({discoveryApi:f,environment:y,provider:u,oauthRequestApi:A,sessionTransform(M){return{...M,providerInfo:{idToken:M.providerInfo.idToken,accessToken:M.providerInfo.accessToken,scopes:m.normalizeScopes(S,M.providerInfo.scope),expiresAt:new Date(Date.now()+M.providerInfo.expiresInSeconds*1e3)}}}}),_=new h.RefreshingAuthSessionManager({connector:F,defaultScopes:new Set(b),sessionScopes:M=>M.providerInfo.scopes,sessionShouldRefresh:M=>(M.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new m({sessionManager:_,scopeTransform:S})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(s,f){var A;const y=m.normalizeScopes(this.scopeTransform,s),u=await this.sessionManager.getSession({...f,scopes:y});return(A=u==null?void 0:u.providerInfo.accessToken)!=null?A:""}async getIdToken(s={}){var y;const f=await this.sessionManager.getSession(s);return(y=f==null?void 0:f.providerInfo.idToken)!=null?y:""}async getBackstageIdentity(s={}){const f=await this.sessionManager.getSession(s);return f==null?void 0:f.backstageIdentity}async getProfile(s={}){const f=await this.sessionManager.getSession(s);return f==null?void 0:f.profile}static normalizeScopes(s,f){if(!f)return new Set;const y=Array.isArray(f)?f:f.split(/[\s|,]/).filter(Boolean);return new Set(s(y))}}},91205:function(q,i,e){"use strict";e.d(i,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),c=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(i,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(i,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(i,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(i,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(q,i,e){"use strict";e.d(i,{s:function(){return v}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),h="okta.";class v{static create(a){const{discoveryApi:s,environment:f="development",provider:y=t,oauthRequestApi:u,defaultScopes:A=["openid","email","profile","offline_access"]}=a;return r.OAuth2.create({discoveryApi:s,oauthRequestApi:u,provider:y,environment:f,defaultScopes:A,scopeTransform(b){return b.map(S=>c.has(S)||S.startsWith(h)?S:`${h}${S}`)}})}}},58381:function(q,i,e){"use strict";e.d(i,{$:function(){return v}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),h="onelogin.";class v{static create(a){const{discoveryApi:s,environment:f="development",provider:y=t,oauthRequestApi:u}=a;return r.OAuth2.create({discoveryApi:s,oauthRequestApi:u,provider:y,environment:f,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(A){return A.map(b=>c.has(b)||b.startsWith(h)?b:`${h}${b}`)}})}}},67604:function(q,i,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({id:t.z.string(),token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),h={id:"saml",title:"SAML",icon:()=>null};class v{static create(a){const{discoveryApi:s,environment:f="development",provider:y=h}=a,u=new DirectAuthConnector({discoveryApi:s,environment:f,provider:y}),A=new StaticAuthSessionManager({connector:u}),b=new AuthSessionStore({manager:A,storageKey:`${y.id}Session`,schema:samlSessionSchema});return new v(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 s=await this.sessionManager.getSession(a);return s==null?void 0:s.backstageIdentity}async getProfile(a={}){const s=await this.sessionManager.getSession(a);return s==null?void 0:s.profile}}},91631:function(q,i,e){"use strict";e.d(i,{AlertApiForwarder:function(){return t.C},AppThemeSelector:function(){return h.C},AtlassianAuth:function(){return r.AtlassianAuth},ConfigReader:function(){return v.m},ErrorAlerter:function(){return a.KN},ErrorApiForwarder:function(){return a.gr},FetchMiddlewares:function(){return f.I},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},LocalStorageFeatureFlags:function(){return s.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 u.C},createFetchApi:function(){return f.j}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(i,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(i,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(i,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(23235),c=e(47150),h=e(58652),v=e(22053),m=e(4333),a=e(89536),s=e(14884),f=e(50160),y=e(11358),u=e(56054)},56494:function(q,i,e){"use strict";e.d(i,{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(i,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(i,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(i,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"OktaAuth")&&e.d(i,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(i,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(i,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(91631);e.o(t,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(i,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(i,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},80396:function(q,i,e){"use strict";e.d(i,{p:function(){return t}});var r;(function(c){c[c.default=10]="default";const h=50;c[c.app=h]="app",c[c.static=100]="static"})(r||(r={}));class t{constructor(){Q(this,"factories",new Map)}register(h,v){const m=r[h],a=this.factories.get(v.api.id);return a&&a.priority>=m?!1:(this.factories.set(v.api.id,{priority:m,factory:v}),!0)}get(h){const v=this.factories.get(h.id);if(!!v)return v.factory}getAllApis(){const h=new Set;for(const{factory:v}of this.factories.values())h.add(v.api);return h}}},14406:function(q,i,e){"use strict";e.d(i,{g:function(){return a}});var r=e(2784),t=e(13980),c=e.n(t);class h{constructor(...f){Q(this,"holders");this.holders=f}get(f){for(const y of this.holders){const u=y.get(f);if(u)return u}}}var v=e(76241);const m=(0,v.CT)("api-context"),a=s=>{var b;const{apis:f,children:y}=s,u=(b=(0,r.useContext)(m))==null?void 0:b.atVersion(1),A=u?new h(f,u):f;return r.createElement(m.Provider,{value:(0,v.EI)({1:A}),children:y})};a.propTypes={apis:c().shape({get:c().func.isRequired}).isRequired,children:c().node}},12132:function(q,i,e){"use strict";e.d(i,{M:function(){return r}});class r{constructor(c){Q(this,"apis",new Map);this.factories=c}static validateFactories(c,h){for(const v of h){const m=[v],a=new Set;for(;m.length;){const s=m.shift(),f=c.get(s);if(!!f)for(const y of Object.values(f.deps)){if(y.id===v.id)throw new Error(`Circular dependency of api factory for ${v}`);a.has(y)||(a.add(y),m.push(y))}}}}get(c){return this.load(c)}load(c,h=[]){const v=this.apis.get(c.id);if(v)return v;const m=this.factories.get(c);if(!m)return;if(h.includes(m.api))throw new Error(`Circular dependency of api factory for ${m.api}`);const a=this.loadDeps(c,m.deps,[...h,m.api]),s=m.factory(a);return this.apis.set(c.id,s),s}loadDeps(c,h,v){const m={};for(const a in h)if(h.hasOwnProperty(a)){const s=h[a],f=this.load(s,v);if(!f)throw new Error(`No API factory available for dependency ${s} of dependent ${c}`);m[a]=f}return m}}},76105:function(q,i,e){"use strict";e.d(i,{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),h=e(82488),v=e.n(h);e.o(h,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return h.AlertApiForwarder}}),e.o(h,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return h.AppThemeSelector}}),e.o(h,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return h.AtlassianAuth}}),e.o(h,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return h.BitbucketAuth}}),e.o(h,"ConfigReader")&&e.d(i,{ConfigReader:function(){return h.ConfigReader}}),e.o(h,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return h.ErrorAlerter}}),e.o(h,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return h.ErrorApiForwarder}}),e.o(h,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return h.FetchMiddlewares}}),e.o(h,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return h.FlatRoutes}}),e.o(h,"GithubAuth")&&e.d(i,{GithubAuth:function(){return h.GithubAuth}}),e.o(h,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return h.GitlabAuth}}),e.o(h,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return h.GoogleAuth}}),e.o(h,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return h.LocalStorageFeatureFlags}}),e.o(h,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return h.MicrosoftAuth}}),e.o(h,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return h.NoOpAnalyticsApi}}),e.o(h,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return h.OAuthRequestManager}}),e.o(h,"OktaAuth")&&e.d(i,{OktaAuth:function(){return h.OktaAuth}}),e.o(h,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return h.OneLoginAuth}}),e.o(h,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return h.UnhandledErrorForwarder}}),e.o(h,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return h.UrlPatternDiscovery}}),e.o(h,"WebStorage")&&e.d(i,{WebStorage:function(){return h.WebStorage}}),e.o(h,"createFetchApi")&&e.d(i,{createFetchApi:function(){return h.createFetchApi}}),e.o(h,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return h.createSpecializedApp}}),e.o(h,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return h.defaultConfigLoader}})},82488:function(){},82370:function(q,i,e){"use strict";e.d(i,{b:function(){return un}});var r=e(2784),t=e(10289),c=e(64279),h=e(56494),v=e(36964),m=e(76105);function a(se){const j={};for(const le in se.collectors)se.collectors.hasOwnProperty(le)&&(j[le]=se.collectors[le]());const ae=[{node:r.Children.toArray(se.root),parent:void 0,contexts:{}}];for(;ae.length!==0;){const{node:le,parent:ye,contexts:Le}=ae.shift();r.Children.forEach(le,Be=>{if(!(0,r.isValidElement)(Be))return;const Se={};for(const je in j)if(j.hasOwnProperty(je)){const ut=j[je];Se[je]=ut.visit(ut.accumulator,Be,ye,Le[je])}for(const je of se.discoverers){const ut=je(Be);ut&&ae.push({node:ut,parent:Be,contexts:Se})}})}return Object.fromEntries(Object.entries(j).map(([le,ye])=>[le,ye.accumulator]))}function s(se,j){return()=>({accumulator:se(),visit:j})}function f(se){var j;return(j=se.props)==null?void 0:j.children}function y(se){var j,ae,le;if(((j=se.props)==null?void 0:j.path)&&((ae=se.props)==null?void 0:ae.element))return(le=se.props)==null?void 0:le.element}const u=s(()=>new Set,(se,j)=>{const ae=(0,v.getComponentData)(j,"core.plugin");ae&&se.add(ae)});var A=e(88934);const b={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},S=s(()=>({paths:new Map,parents:new Map,objects:new Array}),(se,j,ae,le)=>{var dt,sn,z,R,P;if((ae==null?void 0:ae.props.element)===j)return le;let ye=le==null?void 0:le.obj,Le=le==null?void 0:le.routeRef,Be=le==null?void 0:le.sticky;const Se=(dt=j.props)==null?void 0:dt.path,je=(sn=ye==null?void 0:ye.children)!=null?sn:se.objects,ut=Boolean((z=j.props)==null?void 0:z.caseSensitive);let bt=le==null?void 0:le.path;if((0,v.getComponentData)(j,"core.gatherMountPoints")){if(!Se)throw new Error("Mount point gatherer must have a path");bt=Se}const vt=(R=j.props)==null?void 0:R.element;let at=(0,v.getComponentData)(j,"core.mountPoint");if(!at&&(0,r.isValidElement)(vt)&&(at=(0,v.getComponentData)(vt,"core.mountPoint")),at){let ce=Se;if(bt&&(ce?bt=void 0:ce=bt),!ce)throw new Error("Mounted routable extension must have a path");se.paths.set(at,ce),Le&&Be?(se.parents.set(at,Le),Se&&(Le=at,Be=!1)):(se.parents.set(at,Le),Le=at),Se?(ye={caseSensitive:ut,path:Se,element:"mounted",routeRefs:new Set([at]),children:[b],plugin:(0,v.getComponentData)(j.props.element,"core.plugin")},je.push(ye)):ye==null||ye.routeRefs.add(at)}if((0,v.getComponentData)(j,"core.gatherMountPoints")&&(Be=!0),(0,v.getComponentData)(j,"core.gatherMountPoints")){if(!Se)throw new Error("Mount point gatherer must have a path");at||(ye={caseSensitive:ut,path:Se,element:"gathered",routeRefs:new Set,children:[b],plugin:(P=le==null?void 0:le.obj)==null?void 0:P.plugin},je.push(ye))}return{obj:ye,path:bt,routeRef:Le,sticky:Be}}),F=s(()=>new Set,(se,j)=>{if(j.type===A.L){const ae=j.props;se.add("with"in ae?ae.with:ae.without)}});var _=e(76241);const M=(0,_.uW)("route-ref-type",()=>Symbol("route-ref-type"));function L(se){return se[M]==="absolute"}function $(se){return se[M]==="sub"}function B(se){return se[M]==="external"}function x(...se){const j=se.join("/").replace(/\/\/+/g,"/");return j!=="/"&&j.endsWith("/")?j.slice(0,-1):j}function J(se,j,ae){let le,ye="";if(L(se))le=se;else if($(se))le=se.parent,ye=se.path;else if(B(se)){const Se=ae.get(se);if(!Se)return[void 0,""];if(L(Se))le=Se;else if($(Se))le=Se.parent,ye=Se.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${Se}`)}else throw se[M]?new Error(`Unknown or invalid route ref type, ${se[M]}`):new Error(`Unknown object passed to useRouteRef, got ${se}`);if(!le)return[void 0,""];const Le=j.get(le);if(!Le)return[void 0,""];const Be=x(Le,ye);return[le,Be]}function te(se,j,ae,le,ye){var bt;const Le=(bt=(0,t.fp)(ye,j))!=null?bt:[],Be=Array();let Se=-1;for(let vt=se;vt&&(Se=Le.findIndex(at=>at.route.routeRefs.has(vt)),Se===-1);vt=le.get(vt))Be.unshift(vt);Be.length===0&&(Se-=1);const je=Se===-1?"":Le[Se].pathname,ut=x(...Be.slice(0,-1).map(vt=>{const at=ae.get(vt);if(!at)throw new Error(`No path for ${vt}`);if(at.includes(":"))throw new Error(`Cannot route to ${se} with parent ${vt} as it has parameters`);return at}));return je+ut}class ve{constructor(j,ae,le,ye,Le){this.routePaths=j,this.routeParents=ae,this.routeObjects=le,this.routeBindings=ye,this.appBasePath=Le}resolve(j,ae){const[le,ye]=J(j,this.routePaths,this.routeBindings);if(!le)return;let Le;typeof ae=="string"?Le=this.trimPath(ae):ae.pathname?Le={...ae,pathname:this.trimPath(ae.pathname)}:Le=ae;const Be=this.appBasePath+te(le,Le,this.routePaths,this.routeParents,this.routeObjects);return(...[je])=>Be+(0,t.Gn)(ye,je)}trimPath(j){return j&&(j.startsWith(this.appBasePath)?j.slice(this.appBasePath.length):j)}}const Ve=(0,_.CT)("routing-context"),We=({routePaths:se,routeParents:j,routeObjects:ae,routeBindings:le,basePath:ye="",children:Le})=>{const Be=new ve(se,j,ae,le,ye),Se=(0,_.EI)({1:Be});return r.createElement(Ve.Provider,{value:Se},Le)},ue=(se,j)=>{var ae,le;try{const ye=(0,t.fp)(j,{pathname:se}),Le=(ae=ye==null?void 0:ye.filter(Se=>{var je;return((je=Se==null?void 0:Se.route.routeRefs)==null?void 0:je.size)>0}).pop())==null?void 0:ae.route;if(!Le)return{};let Be;return Le.routeRefs.size===1&&(Be=Le.routeRefs.values().next().value),{extension:"App",pluginId:((le=Le.plugin)==null?void 0:le.getId())||"root",...Be?{routeRef:Be.id}:{}}}catch{return{}}},Ee=({pathname:se,search:j,hash:ae})=>{const le=(0,v.useAnalytics)();return(0,r.useEffect)(()=>{le.captureEvent("navigate",`${se}${j}${ae}`)},[le,se,j,ae]),null},Ie=({routeObjects:se})=>{const{pathname:j,search:ae,hash:le}=(0,t.TH)();return r.createElement(v.AnalyticsContext,{attributes:ue(j,se)},r.createElement(Ee,{pathname:j,search:ae,hash:le}))};function He(se,j){const ae=new Set(j.values());ae.delete(void 0);for(const le of j.keys()){if(ae.has(le))continue;let ye=le,Le="";for(;ye;){const Se=se.get(ye);if(!Se)throw new Error(`No path for ${ye}`);Le=`${Se}${Le}`,ye=j.get(ye)}const Be=Le.match(/:(\w+)/g);if(Be){for(let Se=0;Se<Be.length;Se++)for(let je=Se+1;je<Be.length;je++)if(Be[je]===Be[Se])throw new Error(`Parameter ${Be[je]} is duplicated in path ${Le}`)}}}function Ye(se,j){for(const ae of j)if(!!ae.externalRoutes){for(const[le,ye]of Object.entries(ae.externalRoutes))if(!ye.optional&&!se.has(ye))throw new Error(`External route '${le}' of the '${ae.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const ot=(0,_.CT)("app-context"),tt=({appContext:se,children:j})=>{const ae=(0,_.EI)({1:se});return r.createElement(ot.Provider,{value:ae,children:j})};function Ce(se){return new Error(`Tried to access IdentityApi ${se} before app was loaded`)}function Ne(se){console.warn(`WARNING: Call to ${se} is deprecated and will break in the future`)}class Ue{constructor(){Q(this,"target");Q(this,"waitForTarget");Q(this,"resolveTarget",()=>{});this.waitForTarget=new Promise(j=>{this.resolveTarget=j})}setTarget(j){this.target=j,this.resolveTarget(j)}getUserId(){if(!this.target)throw Ce("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ne("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Ce("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Ne("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 Ne("getIdToken"),j.getIdToken()})}async signOut(){await this.waitForTarget.then(j=>j.signOut()),location.reload()}}var pt=e(72164);function Ke(se,j,ae){if(se!==void 0){const ye=ae.find(Le=>Le.id===se);if(ye)return ye}if(j){const ye=ae.find(Le=>Le.variant==="dark");if(ye)return ye}const le=ae.find(ye=>ye.variant==="light");return le||ae[0]}const Ft=()=>{const se=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[j,ae]=(0,r.useState)(se.matches);return(0,r.useEffect)(()=>{const le=ye=>{ae(ye.matches)};return se.addListener(le),()=>{se.removeListener(le)}},[se]),j};function mt({children:se}){const j=(0,v.useApi)(v.appThemeApiRef),ae=(0,pt.Z)(j.activeThemeId$(),j.getActiveThemeId()),le=Boolean(window.matchMedia)?Ft():!1,ye=Ke(ae,le,j.getInstalledThemes());if(!ye)throw new Error("App has no themes");return r.createElement(ye.Provider,{children:se})}var Bt=e(46611);class Ht{constructor(){Q(this,"apis",[])}add(j,ae){return this.apis.push([j.id,ae]),ae}build(){return new Ot(new Map(this.apis))}}class Ot{static builder(){return new Ht}static from(j){return new Ot(new Map(j.map(([ae,le])=>[ae.id,le])))}static with(j,ae){return new Ot(new Map([[j.id,ae]]))}constructor(j){this.apis=j}with(j,ae){return new Ot(new Map([...this.apis,[j.id,ae]]))}get(j){return this.apis.get(j.id)}}function jt(se){const j=new Map;return se&&se({bind:(le,ye)=>{for(const[Le,Be]of Object.entries(ye)){const Se=le[Le];if(!Se)throw new Error(`Key ${Le} is not an existing external route`);if(!Be&&!Se.optional)throw new Error(`External route ${Le} is required but was undefined`);Be&&j.set(Se,Be)}}}),j}const Zt=(0,r.createContext)({routeObjects:[]});function wt(se){var ae;let{pathname:j}=new URL((ae=se.getOptionalString("app.baseUrl"))!=null?ae:"/","http://dummy.dev");return j=j.replace(/\/*$/,""),j}function An(se,j,ae){var je;const le=Boolean(se),ye=(0,c.default)(se||(()=>Promise.resolve([])));let Le;if(le&&ye.loading){const{Progress:ut}=j;Le=r.createElement(ut,null)}else if(ye.error){const{BootErrorPage:ut}=j;Le=r.createElement(ut,{step:"load-config",error:ye.error})}const{ThemeProvider:Be=mt}=j;return Le?{node:r.createElement(h.ApiProvider,{apis:Ot.with(v.appThemeApiRef,ae)},r.createElement(Be,null,Le))}:{api:h.ConfigReader.fromConfigs((je=ye.value)!=null?je:[])}}class Gt{constructor(j){this.app=j}getPlugins(){return this.app.getPlugins()}getSystemIcon(j){return this.app.getSystemIcon(j)}getComponents(){return this.app.getComponents()}}class Et{constructor(j){Q(this,"apiHolder");Q(this,"configApi");Q(this,"apis");Q(this,"icons");Q(this,"plugins");Q(this,"components");Q(this,"themes");Q(this,"configLoader");Q(this,"defaultApis");Q(this,"bindRoutes");Q(this,"appIdentityProxy",new Ue);Q(this,"apiFactoryRegistry");var ae,le,ye,Le;this.apis=(ae=j.apis)!=null?ae:[],this.icons=j.icons,this.plugins=new Set((le=j.plugins)!=null?le:[]),this.components=j.components,this.themes=j.themes,this.configLoader=(ye=j.configLoader)!=null?ye:Bt.t,this.defaultApis=(Le=j.defaultApis)!=null?Le:[],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 Gt(this);let ae=!1;return({children:ye})=>{const Le=(0,r.useMemo)(()=>h.AppThemeSelector.createWithStorage(this.themes),[]),{routing:Be,featureFlags:Se,routeBindings:je}=(0,r.useMemo)(()=>{const at=a({root:ye,discoverers:[f,y],collectors:{routing:S,collectedPlugins:u,featureFlags:F}});return at.collectedPlugins.forEach(Ct=>this.plugins.add(Ct)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...at,routeBindings:jt(this.bindRoutes)}},[ye]);ae||(ae=!0,He(Be.paths,Be.parents),Ye(je,this.plugins));const ut=An(this.configLoader,this.components,Le),bt="api"in ut;if(bt){const{api:at}=ut;this.configApi=at}if((0,r.useEffect)(()=>{if(bt){const at=this.getApiHolder().get(v.featureFlagsApiRef);for(const Ct of this.plugins.values())if("getFeatureFlags"in Ct)for(const dt of Ct.getFeatureFlags())at.registerFlag({name:dt.name,pluginId:Ct.getId()});else for(const dt of Ct.output())dt.type==="feature-flag"&&at.registerFlag({name:dt.name,pluginId:Ct.getId()});for(const Ct of Se)at.registerFlag({name:Ct,pluginId:""})}},[bt,ut,Se]),"node"in ut)return ut.node;const{ThemeProvider:vt=mt}=this.components;return r.createElement(h.ApiProvider,{apis:this.getApiHolder()},r.createElement(tt,{appContext:j},r.createElement(vt,null,r.createElement(We,{routePaths:Be.paths,routeParents:Be.parents,routeObjects:Be.objects,routeBindings:je,basePath:wt(ut.api)},r.createElement(Zt.Provider,{value:{routeObjects:Be.objects}},ye)))))}}getRouter(){const{Router:j,SignInPage:ae}=this.components,le=({component:Le,children:Be})=>{const[Se,je]=(0,r.useState)();return Se?(this.appIdentityProxy.setTarget(Se),Be):r.createElement(Le,{onSignInSuccess:je})};return({children:Le})=>{const Be=(0,v.useApi)(v.configApiRef),Se=`${wt(Be)}/*`,{routeObjects:je}=(0,r.useContext)(Zt);return ae?r.createElement(j,null,r.createElement(Ie,{routeObjects:je}),r.createElement(le,{component:ae},r.createElement(t.Z5,null,r.createElement(t.AW,{path:Se,element:r.createElement(r.Fragment,null,Le)})))):(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(Ie,{routeObjects:je}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:Se,element:r.createElement(r.Fragment,null,Le)}))))}}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:v.appThemeApiRef,deps:{},factory:()=>h.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:v.configApiRef,deps:{},factory:()=>{if(!this.configApi)throw new Error("Tried to access config API before config was loaded");return this.configApi}}),this.apiFactoryRegistry.register("static",{api:v.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:v.featureFlagsApiRef,deps:{},factory:()=>new h.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 le of j){const ye=le.getId();if(ae.has(ye))throw new Error(`Duplicate plugin found '${ye}'`);ae.add(ye)}}}function un(se){return new Et(se)}},46611:function(q,i,e){"use strict";e.d(i,{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 h=c.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const m=JSON.parse(t);Array.isArray(m)?h.push(...m):h.push({data:m,context:"env"})}catch(m){throw new Error(`Failed to load runtime configuration, ${m}`)}const v=window.__APP_CONFIG__;return v&&h.push({context:"window",data:v}),h}},44056:function(q,i,e){"use strict";e.d(i,{createSpecializedApp:function(){return r.b},defaultConfigLoader:function(){return t.t}});var r=e(82370),t=e(46611),c=e(73495),h=e.n(c);e.o(c,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return c.AtlassianAuth}}),e.o(c,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return c.BitbucketAuth}}),e.o(c,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return c.FlatRoutes}}),e.o(c,"GithubAuth")&&e.d(i,{GithubAuth:function(){return c.GithubAuth}}),e.o(c,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return c.GitlabAuth}}),e.o(c,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return c.GoogleAuth}}),e.o(c,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return c.MicrosoftAuth}}),e.o(c,"OktaAuth")&&e.d(i,{OktaAuth:function(){return c.OktaAuth}}),e.o(c,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return c.OneLoginAuth}})},73495:function(){},49208:function(q,i,e){"use strict";e.d(i,{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(i,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(i,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OktaAuth")&&e.d(i,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(i,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(i,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return t.OneLoginAuth}});var c=e(63938)},57018:function(q,i,e){"use strict";e.d(i,{RefreshingAuthSessionManager:function(){return m}});function r(s,f){for(const y of f)if(!s.has(y))return!1;return!0}class t{constructor(f){this.options=f}sessionExistsAndHasScope(f,y){if(!f)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const u=this.options.sessionScopes(f);return r(u,y)}getExtendedScope(f,y){const u=new Set(this.options.defaultScopes);if(f&&this.options.sessionScopes!==void 0){const A=this.options.sessionScopes(f);for(const b of A)u.add(b)}if(y)for(const A of y)u.add(A);return u}}var c=e(98005),h=e(36964);class v{constructor(){Q(this,"subject",new c.X(h.SessionState.SignedOut));Q(this,"signedIn",!1)}setIsSignedIn(f){this.signedIn!==f&&(this.signedIn=f,this.subject.next(this.signedIn?h.SessionState.SignedIn:h.SessionState.SignedOut))}sessionState$(){return this.subject}}class m{constructor(f){Q(this,"connector");Q(this,"helper");Q(this,"sessionScopesFunc");Q(this,"sessionShouldRefreshFunc");Q(this,"stateTracker",new v);Q(this,"refreshPromise");Q(this,"currentSession");const{connector:y,defaultScopes:u=new Set,sessionScopes:A,sessionShouldRefresh:b}=f;this.connector=y,this.sessionScopesFunc=A,this.sessionShouldRefreshFunc=b,this.helper=new t({sessionScopes:A,defaultScopes:u})}async getSession(f){if(this.helper.sessionExistsAndHasScope(this.currentSession,f.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const u=await this.collapsedSessionRefresh(),A=this.sessionScopesFunc(this.currentSession),b=this.sessionScopesFunc(u);return r(b,A)&&(this.currentSession=u),u}catch(u){if(f.optional)return;throw u}}if(!this.currentSession&&!f.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(f)}catch{}if(!f.optional)return this.currentSession=await this.connector.createSession({...f,scopes:this.helper.getExtendedScope(this.currentSession,f.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession();try{const f=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),f}finally{delete this.refreshPromise}}}class a{constructor(f){Q(this,"connector");Q(this,"helper");Q(this,"stateTracker",new SessionStateTracker);Q(this,"currentSession");const{connector:y,defaultScopes:u=new Set,sessionScopes:A}=f;this.connector=y,this.helper=new SessionScopeHelper({sessionScopes:A,defaultScopes:u})}setSession(f){this.currentSession=f,this.stateTracker.setIsSignedIn(Boolean(f))}async getSession(f){if(this.helper.sessionExistsAndHasScope(this.currentSession,f.scopes))return this.currentSession;if(!f.optional)return this.currentSession=await this.connector.createSession({...f,scopes:this.helper.getExtendedScope(this.currentSession,f.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(q,i,e){"use strict";e.d(i,{J:function(){return c},X:function(){return h}});var r=e(82394),t=e.n(r);class c{constructor(){Q(this,"isClosed",!1);Q(this,"terminatingError");Q(this,"observable",new(t())(m=>this.isClosed?(this.terminatingError?m.error(this.terminatingError):m.complete(),()=>{}):(this.subscribers.add(m),()=>{this.subscribers.delete(m)})));Q(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(m){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(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,s){const f=typeof m=="function"?{next:m,error:a,complete:s}:m;return this.observable.subscribe(f)}}class h{constructor(m){Q(this,"isClosed");Q(this,"currentValue");Q(this,"terminatingError");Q(this,"observable");Q(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=m,this.terminatingError=void 0,this.observable=new(t())(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,s){const f=typeof m=="function"?{next:m,error:a,complete:s}:m;return this.observable.subscribe(f)}}},88934:function(q,i,e){"use strict";e.d(i,{L:function(){return c}});var r=e(36964),t=e(2784);const c=h=>{const{children:v}=h,m=(0,r.useApi)(r.featureFlagsApiRef),a="with"in h?m.isActive(h.with):!m.isActive(h.without);return t.createElement(t.Fragment,null,a?v:null)};(0,r.attachComponentData)(c,"core.featureFlagged",!0)},63938:function(q,i,e){"use strict";e.d(i,{w:function(){return h}});var r=e(2784),t=e(10289),c=e(36964);const h=m=>{const a=(0,c.useApp)(),{NotFoundErrorPage:s}=a.getComponents(),f=(0,c.useElementFilter)(m.children,y=>y.getElements().flatMap(u=>{var b;let A=u.props.path;return A===""?[]:(A=(b=A==null?void 0:A.replace(/\/\*$/,""))!=null?b:"/",[{path:A,element:u,children:u.props.children?[{path:A==="/"?"/":"/*",element:u.props.children}]:void 0}])}).sort((u,A)=>A.path.localeCompare(u.path)).map(u=>(u.path=u.path==="/"?"/":`${u.path}/*`,u)));return f.push({element:r.createElement(s,null),path:"/*"}),(0,t.V$)(f)};var v=e(88934)},9118:function(q,i,e){"use strict";e.d(i,{Button:function(){return M},CodeSnippet:function(){return ue},Content:function(){return Wo},ContentHeader:function(){return qi},CreateButton:function(){return He},DependencyGraph:function(){return at},DependencyGraphTypes:function(){return r},EmptyState:function(){return pe},ErrorPage:function(){return rs},ErrorPanel:function(){return cn},Header:function(){return Qo},HeaderIconLinkRow:function(){return Ln},HeaderLabel:function(){return ms},HeaderTabs:function(){return Ho},InfoCard:function(){return ft},ItemCardGrid:function(){return As},ItemCardHeader:function(){return ys},Link:function(){return F},LogViewer:function(){return Or},MissingAnnotationEmptyState:function(){return qe},OverflowTooltip:function(){return Br},Page:function(){return qo},PageWithHeader:function(){return Cs},Progress:function(){return dr},ResponseErrorPanel:function(){return Jn},RoutedTabs:function(){return jo},Select:function(){return et},Sidebar:function(){return ka},SidebarContext:function(){return zr},SidebarDivider:function(){return li},SidebarItem:function(){return Zo},SidebarPage:function(){return wa},SidebarPinStateContext:function(){return Cr},SubvalueCell:function(){return Si},SupportButton:function(){return xa},Table:function(){return ji},WarningPanel:function(){return en},sidebarConfig:function(){return kn}});var r={};e.r(r),e.d(r,{Nm:function(){return Ye},ht:function(){return Ce},LJ:function(){return tt}});var t=e(2784),c=e(36964),h=e(19928);function v(n){const[o,l]=useState([]),d=useApi(alertApiRef);if(useEffect(()=>{const O=d.alert$().subscribe(U=>l(k=>k.concat(U)));return()=>{O.unsubscribe()}},[d]),o.length===0)return null;const[p]=o,E=()=>{l(O=>O.filter(U=>U!==p))};return React.createElement(Snackbar,{open:!0,anchorOrigin:{vertical:"top",horizontal:"center"}},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:E,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:p.severity},React.createElement("span",null,p.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 s=(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 f(n){const{displayName:o,picture:l,customStyles:d}=n,p=s();return React.createElement(MaterialAvatar,{alt:o,src:l,className:p.avatar,style:{backgroundColor:stringToColor(o||l||""),...d}},o&&extractInitials(o))}var y=e(77277),u=e(86689),A=e(62833);const b=n=>/^([a-z+.-]+):/.test(n),S=n=>{var o;return n instanceof Array?n.map(S).join(" ").trim():typeof n=="object"&&n?S((o=n==null?void 0:n.props)==null?void 0:o.children):["string","number"].includes(typeof n)?String(n):""},F=t.forwardRef(({onClick:n,noTrack:o,...l},d)=>{const p=(0,c.useAnalytics)(),E=String(l.to),O=S(l.children)||E,U=b(E),k=U&&!!/^https?:/.exec(E),G=oe=>{n==null||n(oe),o||p.captureEvent("click",O,{attributes:{to:E}})};return U?t.createElement(u.Z,{ref:d,href:E,onClick:G,...k?{target:"_blank",rel:"noopener"}:{},...l}):t.createElement(u.Z,{ref:d,component:A.rU,onClick:G,...l})}),_=t.forwardRef((n,o)=>t.createElement(F,{ref:o,...n,color:"initial"})),M=t.forwardRef((n,o)=>t.createElement(y.Z,{ref:o,component:_,...n}));var L=e(60364),$=e(61837),B=e(80030),x=e(19353),J=e(95074);function te(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:U},k]=(0,J.Z)();(0,t.useEffect)(()=>{U&&p.post(U)},[U,p]);const G=oe=>{oe.stopPropagation(),O(!0),k(o)};return t.createElement(t.Fragment,null,t.createElement(B.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:l,onClose:()=>O(!1),open:E},t.createElement($.Z,{onClick:G},t.createElement(x.Z,null))))}var ve=e(55768),Ve=e(26639),We=e(39595);function ue(n){const{text:o,language:l,showLineNumbers:d=!1,highlightedNumbers:p,customStyle:E,showCopyCodeButton:O=!1}=n,U=(0,L.Z)(),k=U.palette.type==="dark"?Ve.Z:We.Z,G=U.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(ve.Z,{customStyle:E,language:l,style:k,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:U.palette.textVerySubtle},lineProps:oe=>p!=null&&p.includes(oe)?{style:{backgroundColor:G}}:{}},o),O&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(te,{text:o})))}var Ee=e(41156),Ie=e(88188);function He(n){const{title:o,to:l}=n,d=(0,Ee.Z)(p=>p.breakpoints.down("xs"));return l?d?t.createElement($.Z,{component:A.rU,color:"primary",title:o,size:"small",to:l},t.createElement(Ie.Z,null)):t.createElement(y.Z,{component:A.rU,variant:"contained",color:"primary",to:l},o):null}var Ye;(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})(Ye||(Ye={}));var ot;(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})(ot||(ot={}));var tt;(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})(tt||(tt={}));var Ce;(function(n){const o="l";n.LEFT=o;const l="r";n.RIGHT=l;const d="c";n.CENTER=d})(Ce||(Ce={}));var Ne=e(13387),Ue=e(11105),pt=e(97963),Ke=e(46506),Ft=e.n(Ke),mt=e(54073),Bt=e.n(mt),Ht=e(10368);const Ot=(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=Ot(),[l,d]=t.useState(0),[p,E]=t.useState(0),O=t.useRef(null);t.useLayoutEffect(()=>{if(O.current){let{height:oe,width:ee}=O.current.getBBox();oe=Math.round(oe),ee=Math.round(ee),(oe!==p||ee!==l)&&(d(ee),E(oe))}},[l,p]);const U=10,k=l+U*2,G=p+U*2;return t.createElement("g",null,t.createElement("rect",{className:o.node,width:k,height:G,rx:10}),t.createElement("text",{ref:O,className:o.text,y:G/2,x:k/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const Zt="arrow-marker",wt="node",An="edge",Gt="label",Et=(0,Ht.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),un=n=>t.createElement(jt,{...n});function se({render:n=un,setNode:o,node:l}){const{width:d,height:p,x:E=0,y:O=0}=l,U=l,k=Et(),G=t.useRef(null);return t.useLayoutEffect(()=>{if(G.current){let{height:oe,width:ee}=G.current.getBBox();oe=Math.round(oe),ee=Math.round(ee),(oe!==p||ee!==d)&&o(l.id,{...l,height:oe,width:ee})}},[l,d,p,o]),t.createElement("g",{ref:G,"data-testid":wt,className:k.node,transform:`translate(${E-d/2},${O-p/2})`},n({node:U}))}var j=e(40408),ae=e(49810),le=e(19574),ye=e.n(le);const Le=(0,Ht.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function Be({edge:{label:n}}){const o=Le();return t.createElement("text",{className:o.text,textAnchor:"middle"},n)}const Se=(0,Ht.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"}),je=n=>t.createElement(Be,{...n}),ut=j.Z().x(n=>n.x).y(n=>n.y).curve(ae.Z);function bt({render:n=je,setEdge:o,id:l,edge:d}){const{x:p=0,y:E=0,width:O,height:U,points:k}=d,G=d,oe=Se(),ee=t.useRef(null);t.useLayoutEffect(()=>{if(ee.current){let{height:Ae,width:Te}=ee.current.getBBox();Ae=Math.round(Ae),Te=Math.round(Te),(Ae!==U||Te!==O)&&o(l,{...d,height:Ae,width:Te})}},[d,U,O,o,l]);let Re="";if(k){const Ae=k.filter(Te=>ye()(Te.x)&&ye()(Te.y));Re=ut(Ae)||""}return t.createElement(t.Fragment,null,Re&&t.createElement("path",{"data-testid":An,className:oe.path,markerEnd:`url(#${Zt})`,d:Re}),G.label?t.createElement("g",{ref:ee,"data-testid":Gt,className:oe.label,transform:`translate(${p},${E})`},n({edge:G})):null)}const vt="workspace";function at(n){var br,aa;const{edges:o,nodes:l,renderNode:d,direction:p=Ye.TOP_BOTTOM,align:E,nodeMargin:O=50,edgeMargin:U=10,rankMargin:k=50,paddingX:G=0,paddingY:oe=0,acyclicer:ee,ranker:Re=tt.NETWORK_SIMPLEX,labelPosition:Ae=Ce.RIGHT,labelOffset:Te=10,edgeRanks:it=1,edgeWeight:It=1,renderLabel:Kt,defs:nn,zoom:rt="enabled",...Lt}=n,Dt=(0,pt.Z)(),[ln,nr]=t.useState(100),[Mn,Hr]=t.useState(100),Tt=t.useRef(new(Ft()).graphlib.Graph),[rr,fo]=t.useState(((br=Tt.current.graph())==null?void 0:br.width)||0),[hr,mo]=t.useState(((aa=Tt.current.graph())==null?void 0:aa.height)||0),[qr,_r]=t.useState([]),[ho,mn]=t.useState([]),Pn=Math.max(rr,ln),$n=Math.max(hr,Mn),gr=t.useMemo(()=>Bt()(Xt=>{if(!Xt)return;const hn=Ue.Z(Xt),kt=Ue.Z(Xt.getElementById(vt));function zn(){hn.call(Ne.sP().scaleExtent([1,10]).on("zoom",Yn=>{Yn.transform.x=Math.min(0,Math.max(Yn.transform.x,Pn-Pn*Yn.transform.k)),Yn.transform.y=Math.min(0,Math.max(Yn.transform.y,$n-$n*Yn.transform.k)),kt.attr("transform",Yn.transform)}))}rt==="enabled"?zn():rt==="enable-on-click"&&hn.on("click",()=>zn());const{width:Wn,height:eo}=Xt.getBoundingClientRect();ln!==Wn&&nr(Wn),Mn!==eo&&Hr(eo)},100),[Mn,ln,Pn,$n,rt]),on=t.useCallback(()=>{const Xt=Tt.current.nodes(),hn=Tt.current.edges();Xt.forEach(kt=>{l.some(Wn=>Wn.id===kt)||Tt.current.removeNode(kt)}),hn.forEach(kt=>{o.some(Wn=>Wn.from===kt.v&&Wn.to===kt.w)||Tt.current.removeEdge(kt.v,kt.w)}),l.forEach(kt=>{const zn=Tt.current.nodes().find(Wn=>kt.id===Wn);if(zn&&Tt.current.node(zn)){const{width:Wn,height:eo,x:Yn,y:zs}=Tt.current.node(zn);Tt.current.setNode(zn,{...kt,width:Wn,height:eo,x:Yn,y:zs})}else Tt.current.setNode(kt.id,{...kt,width:0,height:0})}),o.forEach(kt=>{Tt.current.setEdge(kt.from,kt.to,{...kt,label:kt.label,width:0,height:0,labelpos:Ae,labeloffset:Te,weight:It,minlen:it})})},[o,l,Ae,Te,It,it]),an=t.useMemo(()=>Bt()(()=>{Ft().layout(Tt.current);const{height:Xt,width:hn}=Tt.current.graph(),kt=Math.max(0,Xt||0),zn=Math.max(0,hn||0);fo(zn),mo(kt),_r(Tt.current.nodes()),mn(Tt.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(Tt.current.setGraph({rankdir:p,align:E,nodesep:O,edgesep:U,ranksep:k,marginx:G,marginy:oe,acyclicer:ee,ranker:Re}),on(),an(),an.cancel),[ee,E,p,U,G,oe,O,k,Re,on,an]);function Tr(Xt,hn){return Tt.current.setNode(Xt,hn),an(),Tt.current}function pr(Xt,hn){return Tt.current.setEdge(Xt,hn),an(),Tt.current}return t.createElement("svg",{ref:gr,...Lt,width:"100%",height:$n,viewBox:`0 0 ${Pn} ${$n}`},t.createElement("defs",null,t.createElement("marker",{id:Zt,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"})),nn),t.createElement("g",{id:vt},t.createElement("svg",{width:rr,height:hr,y:$n/2-hr/2,x:Pn/2-rr/2,viewBox:`0 0 ${rr} ${hr}`},ho.map(Xt=>{const hn=Tt.current.edge(Xt);return hn?t.createElement(bt,{key:`${Xt.v}-${Xt.w}`,id:Xt,setEdge:pr,render:Kt,edge:hn}):null}),qr.map(Xt=>{const hn=Tt.current.node(Xt);return hn?t.createElement(se,{key:Xt,setNode:Tr,render:d,node:hn}):null}))))}var Ct=e(72779),dt=e.n(Ct);const sn=(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"}),z=n=>{var Ae;const{variant:o,message:l,id:d,fixed:p=!1}=n,E=sn(),U=useApi(storageApiRef).forBucket("notifications"),k=(Ae=U.snapshot("dismissedBanners").value)!=null?Ae:[],[G,oe]=useState(new Set(k)),ee=useObservable(U.observe$("dismissedBanners"));useEffect(()=>{var Te;if(ee!=null&&ee.value){const it=(Te=ee==null?void 0:ee.value)!=null?Te:[];oe(new Set(it))}},[ee==null?void 0:ee.value]);const Re=()=>{U.set("dismissedBanners",[...G,d])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!G.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:Re},React.createElement(Close,{className:E.icon}))]}))};var R=e(60905),P=e(90436),ce=e(86284),de=e(96465),Z=e(19133),D=e(3871);const re=(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=re();switch(n){case"field":return t.createElement("img",{src:ce,className:o.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:de,alt:"no Information",className:o.generalImg});case"content":return t.createElement("img",{src:Z,alt:"create Component",className:o.generalImg});case"data":return t.createElement("img",{src:D,alt:"no Build",className:o.generalImg});default:return null}},Pe=(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 pe(n){const{title:o,description:l,missing:d,action:p}=n,E=Pe();return t.createElement(R.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:E.root,spacing:2},t.createElement(R.Z,{item:!0,xs:12,md:6},t.createElement(R.Z,{container:!0,direction:"column"},t.createElement(R.Z,{item:!0,xs:!0},t.createElement(P.Z,{variant:"h5"},o)),t.createElement(R.Z,{item:!0,xs:!0},t.createElement(P.Z,{variant:"body1"},l)),t.createElement(R.Z,{item:!0,xs:!0,className:E.action},p))),t.createElement(R.Z,{item:!0,xs:12,md:6,className:E.imageContainer},t.createElement(ge,{missing:d})))}const we=`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`,Ze=(0,m.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function qe(n){const{annotation:o}=n,l=Ze(),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(pe,{missing:"field",title:"Missing Annotation",description:d,action:t.createElement(t.Fragment,null,t.createElement(P.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:we.replace("ANNOTATION",o),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(y.Z,{color:"primary",component:F,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var At=e(11776),st=e(38402),lt=e(49378),Mt=e(41128),ke=e(27616),Rt=e(8284),Yt=e(70660),ht=e(91750),Qe=e(38016);const Xe=(n,o)=>(o.palette.type==="light"?Mt._j:Mt.$n)(o.palette[n].light,.6),Pt=(n,o)=>(o.palette.type==="light"?Mt.$n:Mt._j)(o.palette[n].light,.9),qt=(0,m.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:o})=>Xe(o,n)}})),Wt=({severity:n})=>{const o=qt({severity:n});return t.createElement(ht.Z,{classes:o})},$t=({severity:n})=>{const o=qt({severity:n});return t.createElement(Qe.Z,{classes:o})},_t=(0,m.Z)(n=>({panel:{backgroundColor:({severity:o})=>Pt(o,n),color:({severity:o})=>Xe(o,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:o})=>Xe(o,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:o})=>Xe(o,n),backgroundColor:({severity:o})=>Pt(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"}),rn=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function en(n){const{severity:o="warning",title:l,message:d,children:p,defaultExpanded:E}=n,O=_t({severity:o}),U=rn(o)+(l?`: ${l}`:"");return t.createElement(ke.Z,{defaultExpanded:E!=null?E:!1,className:O.panel,role:"alert"},t.createElement(Rt.Z,{expandIcon:t.createElement($t,{severity:o}),className:O.summary},t.createElement(Wt,{severity:o}),t.createElement(P.Z,{className:O.summaryText,variant:"subtitle1"},U)),(d||p)&&t.createElement(Yt.Z,null,t.createElement(R.Z,{container:!0},d&&t.createElement(R.Z,{item:!0,xs:12},t.createElement(P.Z,{className:O.message,variant:"body1"},d)),p&&t.createElement(R.Z,{item:!0,xs:12,className:O.details},p))))}const Vt=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),Jt=({error:n,message:o,stack:l,children:d})=>{const p=Vt();return t.createElement(At.Z,{dense:!0},t.createElement(st.Z,{alignItems:"flex-start"},t.createElement(lt.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),t.createElement(te,{text:n})),t.createElement(st.Z,{alignItems:"flex-start"},t.createElement(lt.Z,{classes:{secondary:p.text},primary:"Message",secondary:o}),t.createElement(te,{text:o})),l&&t.createElement(st.Z,{alignItems:"flex-start"},t.createElement(lt.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:l}),t.createElement(te,{text:l})),d)};function cn(n){const{title:o,error:l,defaultExpanded:d,children:p}=n;return t.createElement(en,{severity:"error",title:o!=null?o:l.message,defaultExpanded:d},t.createElement(Jt,{error:l.name,message:l.message,stack:l.stack,children:p}))}var Nn=e(85256);const Gn=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function Jn(n){var Te;const{title:o,error:l,defaultExpanded:d}=n,p=Gn();if(l.name!=="ResponseError")return t.createElement(cn,{title:o!=null?o:l.message,defaultExpanded:d,error:l});const{body:E,cause:O}=l,{request:U,response:k}=E,G=`${k.statusCode}: ${O.name}`,oe=U&&`${U.method} ${U.url}`,ee=O.message.replace(/\\n/g,`
|
|
12
|
+
`),Re=(Te=O.stack)==null?void 0:Te.replace(/\\n/g,`
|
|
13
|
+
`),Ae=JSON.stringify(E,void 0,2);return t.createElement(cn,{title:o!=null?o:l.message,defaultExpanded:d,error:{name:G,message:ee,stack:Re}},oe&&t.createElement(st.Z,{alignItems:"flex-start"},t.createElement(lt.Z,{classes:{secondary:p.text},primary:"Request",secondary:U?`${oe}`:void 0}),t.createElement(te,{text:oe})),t.createElement(t.Fragment,null,t.createElement(Nn.Z,{component:"li",className:p.divider}),t.createElement(st.Z,{alignItems:"flex-start"},t.createElement(lt.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(ue,{language:"json",text:Ae,showCopyCodeButton:!0})))}var Qn=e(47093);function Xn(n){const o=document.createElement("div");return o.setAttribute("id",n),o}function Qt(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function or(n){const o=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),E=p||Xn(n);return p||Qt(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 N=null;const g="core.calloutSeen";function C(){const[n,o]=useState(()=>{const d=localStorage.getItem(g);return d?JSON.parse(d):{}}),l=useCallback((d,p)=>{const E=localStorage.getItem(g),U={...E?JSON.parse(E):{},[d]:p};o(U),localStorage.setItem(g,JSON.stringify(U))},[]);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 V(n){const{seen:o,markSeen:l}=w(n);return{show:o===!1,hide:l}}const fe=(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 ie(n){const{featureId:o,title:l,description:d,children:p}=n,{show:E,hide:O}=useShowCallout(o),U=usePortal("core.callout"),k=useRef(null),[G,oe]=useState(),ee=fe(),Re=useCallback(()=>{if(k.current){const Ae=k.current.getBoundingClientRect(),Te=Math.max(Ae.width,Ae.height),it=800,It=Ae.x-(Te-Ae.width)/2-it,Kt=Ae.y-(Te-Ae.height)/2-it,nn=Te+2*it,rt=450,Lt=Ae.x+Ae.width/2-rt,Dt=Ae.y-(Te-Ae.height)/2+Te+20;oe({dotLeft:It,dotTop:Kt,dotSize:nn,borderWidth:it,textTop:Dt,textLeft:Lt,textWidth:rt})}},[]);return useEffect(()=>(window.addEventListener("resize",Re),window.addEventListener("scroll",Re),()=>{window.removeEventListener("resize",Re),window.removeEventListener("scroll",Re)}),[Re]),useLayoutEffect(Re,[k.current,Re]),E?React.createElement(React.Fragment,null,React.createElement("div",{className:ee.featureWrapper,ref:k},p),createPortal(React.createElement("div",{className:ee.backdrop},React.createElement(ClickAwayListener,{onClickAway:O},React.createElement(React.Fragment,null,React.createElement("div",{className:ee.dot,"data-testid":"dot",style:{left:G==null?void 0:G.dotLeft,top:G==null?void 0:G.dotTop,width:G==null?void 0:G.dotSize,height:G==null?void 0:G.dotSize,borderWidth:G==null?void 0:G.borderWidth},onClick:O,onKeyDown:O,role:"button",tabIndex:0},React.createElement("div",{className:ee.pulseCircle})),React.createElement("div",{className:ee.text,"data-testid":"text",style:{left:G==null?void 0:G.textLeft,top:G==null?void 0:G.textTop,width:G==null?void 0:G.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},l),React.createElement(Typography,null,d))))),U)):React.createElement(React.Fragment,null,p)}var De=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 Ut({color:n="primary",disabled:o=!1,href:l="#",icon:d=t.createElement(De.Z,null),label:p,onClick:E,title:O}){const U=nt();return o?t.createElement(u.Z,{title:O,className:dt()(U.link,U.disabled),underline:"none"},d,t.createElement("span",{className:U.label},p)):t.createElement(u.Z,{title:O,className:dt()(U.link,U[n]),to:l,component:F,onClick:E},d,t.createElement("span",{className:U.label},p))}const pn=(0,m.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function Ln(n){const{links:o}=n,l=pn();return t.createElement("nav",{className:l.links},o.map((d,p)=>t.createElement(Ut,{key:p+1,...d})))}const yr=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
|
+
`},ar=100,ir=10,Pr=(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:ar,height:`calc(100% + ${ir}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-ir,background:`linear-gradient(90deg, ${yr(n.palette.type)})`},fadeRight:{right:-ir,background:`linear-gradient(270deg, ${yr(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function Ir(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,U=p.scrollWidth-p.offsetWidth-p.scrollLeft;d([O,U])};return E(),p.addEventListener("scroll",E),window.addEventListener("resize",E),()=>{p.removeEventListener("scroll",E),window.removeEventListener("resize",E)}},[n]),[o,l]}function Lr(n,o,l){const[d,p]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const E=performance.now(),O=requestAnimationFrame(U=>{if(!n.current)return;const k=U-E,G=Math.abs(d)*k/o,ee=Math.max(l,G)*Math.sign(d);n.current.scrollBy({left:ee});const Re=d-ee;Math.sign(d)!==Math.sign(Re)?p(0):p(Re)});return()=>cancelAnimationFrame(O)},[n,d,o,l]),p}function Hn(n){const{scrollStep:o=100,scrollSpeed:l=50,minScrollDistance:d=5,children:p,...E}=n,O=Pr(n),U=React.useRef(),[k,G]=Ir(U),oe=Lr(U,l,d),ee=Re=>{!U.current||oe(Re?o:-o)};return React.createElement("div",{...E,className:O.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:O.container,ref:U},p),React.createElement("div",{className:classNames(O.fade,O.fadeLeft,{[O.fadeHidden]:k===0})}),React.createElement("div",{className:classNames(O.fade,O.fadeRight,{[O.fadeHidden]:G===0})}),k>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>ee(!1),className:classNames(O.button,O.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),G>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>ee(!0),className:classNames(O.button,O.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Rn=(0,m.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function qn(n){const o=Rn(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 _n=(0,t.lazy)(()=>Promise.all([e.e(3860),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function Or(n){const{Progress:o}=(0,c.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(o,null)},t.createElement(_n,{...n}))}const xr=(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"}),sr={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 to(n){const{content:o,dialect:l="gfm",linkTarget:d}=n,p=xr();return React.createElement(ReactMarkdown,{remarkPlugins:l==="gfm"?[gfm]:[],className:p.markdown,children:o,components:sr,linkTarget:d})}var Dr=e(10179);const cr=(0,m.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),On=({request:n,busy:o,setBusy:l})=>{const d=cr(),[p,E]=useState(),O=async()=>{l(!0);try{await n.trigger()}catch(k){E(isError(k)?k.message:"An unspecified error occurred")}finally{l(!1)}},U=n.provider.icon;return React.createElement(ListItem,{button:!0,disabled:o,classes:{root:d.root}},React.createElement(ListItemAvatar,null,React.createElement(U,{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 lr=null;const er=(0,m.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function Er(n){const o=er(),[l,d]=useState(!1),p=useApi(oauthRequestApiRef),E=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),O=()=>{E.forEach(U=>U.reject())};return React.createElement(Dialog,{open:Boolean(E.length),fullWidth:!0,maxWidth:"xs",classes:{paper:o.dialog}},React.createElement(DialogTitle,{classes:{root:o.title}},"Login Required"),React.createElement(DialogContent,{dividers:!0,classes:{root:o.contentList}},React.createElement(List,null,E.map(U=>React.createElement(LoginRequestListItem,{key:U.provider.title,request:U,busy:l,setBusy:d})))),React.createElement(DialogActions,{classes:{root:o.actionButtons}},React.createElement(Button,{onClick:O},"Reject All")))}var vr=e(15277),Fr=e.n(vr),xn=e(29862);const ur=(0,m.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Br(n){var O;const[o,l]=(0,t.useState)(!1),d=(0,xn.t)(),p=ur(),E=U=>{d()&&l(U)};return t.createElement(B.ZP,{title:(O=n.title)!=null?O:n.text||"",placement:n.placement,disableHoverListener:!o},t.createElement(Fr(),{text:n.text,line:n.line,onToggled:E,containerClassName:p.container}))}var wr=e(67358);function dr(n){const[o,l]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>l(!0),250);return()=>clearTimeout(d)},[]),o?t.createElement(wr.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Mr=e(94339),Ar=e(14503),$r=e(24579),Rr=e(32552),dn=e(15459),Dn=e(95544),H=e(27597);const ne=(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 me(n){const{link:o,title:l,onClick:d}=n,p=ne();return t.createElement("div",null,t.createElement(Nn.Z,null),t.createElement(F,{to:o,onClick:d,underline:"none"},t.createElement(Dn.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(Dn.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(P.Z,null,t.createElement("strong",null,l))),t.createElement(H.Z,{className:p.arrow}))))}const Fe=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(M,{to:o.href,variant:"contained"},o.name)},_e=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(cn,{title:"Something Went Wrong",error:d},t.createElement(Fe,{slackChannel:o})):l}},yt=(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"}),gt=(0,dn.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(Ar.Z),ct={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 ft(n){const{title:o,subheader:l,divider:d=!0,deepLink:p,slackChannel:E,errorBoundaryProps:O,variant:U,children:k,headerStyle:G,headerProps:oe,icon:ee,action:Re,actionsClassName:Ae,actions:Te,cardClassName:it,actionsTopRight:It,className:Kt,noPadding:nn,titleTypographyProps:rt}=n,Lt=yt();let Dt={},ln={};U&&U.split(/[\s]+/g).forEach(Tt=>{Dt={...Dt,...ct.card[Tt]},ln={...ln,...ct.cardContent[Tt]}});const nr=()=>t.createElement("div",{className:Lt.headerSubheader},l&&t.createElement("div",{className:Lt.subheader},l),ee),Mn=O||(E?{slackChannel:E}:{});return t.createElement(Mr.Z,{style:Dt,className:Kt},t.createElement(_e,{...Mn},o&&t.createElement(Rr.Z,{classes:{root:Lt.header,title:Lt.headerTitle,subheader:Lt.headerSubheader,avatar:Lt.headerAvatar,action:Lt.headerAction,content:Lt.headerContent},title:o,subheader:nr(),action:Re,style:{...G},titleTypographyProps:rt,...oe}),It&&t.createElement(gt,null,It),d&&t.createElement(Nn.Z,null),t.createElement($r.Z,{className:dt()(it,{[Lt.noPadding]:nn}),style:ln},k),Te&&t.createElement(Ar.Z,{className:Ae},Te),p&&t.createElement(me,{...p})))}var xt=e(39307);const zt=(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"}),yn={fractional:!0,inverse:!1,unit:"%",max:100},gn=({palette:n,value:o,inverse:l,max:d})=>{if(isNaN(o))return"#ddd";const p=d||yn.max,E=l?p-o:o;return E<p/3?n.status.error:E<p*(2/3)?n.status.warning:n.status.ok};function fr(n){const[o,l]=useState(null),{getColor:d=gn}=n,p=zt(n),{palette:E}=useTheme(),{value:O,fractional:U,inverse:k,unit:G,max:oe,description:ee}={...yn,...n},Re=U?Math.round(O*oe):O,Ae=oe!==100?Math.round(O):Re,[Te,it]=useState(!1);return useEffect(()=>{const It=o,Kt=()=>it(!0),nn=()=>it(!1);return It&&ee?(It.addEventListener("mouseenter",Kt),It.addEventListener("mouseleave",nn),()=>{It.removeEventListener("mouseenter",Kt),It.removeEventListener("mouseleave",nn)}):()=>{it(!1)}},[ee,o]),React.createElement("div",{ref:l,className:p.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Re,strokeWidth:12,trailWidth:12,strokeColor:d({palette:E,value:Ae,inverse:k,max:oe}),className:p.circle}),ee&&Te?React.createElement("div",{className:p.description},ee):React.createElement("div",{className:p.overlay},isNaN(O)?"N/A":`${Ae}${G}`))}const Fn=(0,m.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function mr(n){const o=Fn(n),{title:l,subheader:d,progress:p,inverse:E,deepLink:O,description:U,icon:k,variant:G,getColor:oe}=n,ee={inverse:E,description:U,getColor:oe,value:p};return React.createElement("div",{className:o.root},React.createElement(InfoCard,{title:l,subheader:d,deepLink:O,variant:G,icon:k},React.createElement(Gauge,{...ee})))}function jr(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 tr=e(21324),Gr=e(7089),T=e(1292),I=e(42494),W=e(74603),K=e(12231),X=e(73698),Y=e(72379);const he=(0,m.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var $e=()=>{const n=he();return t.createElement(Y.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"}))};const Oe=(0,m.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var Me=()=>{const n=Oe();return t.createElement(Y.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,dn.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"})(W.Z),St=(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}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function et(n){const{multiple:o,items:l,label:d,placeholder:p,selected:E,onChange:O,triggerReset:U,native:k=!1,disabled:G=!1}=n,oe=St(),[ee,Re]=(0,t.useState)(E||(o?[]:"")),[Ae,Te]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Re(o?[]:"")},[U,o]),(0,t.useEffect)(()=>{E!==void 0&&Re(E)},[E]);const it=rt=>{Re(rt.target.value),O(rt.target.value)},It=rt=>{if(G){rt.preventDefault();return}Te(Lt=>o&&!(rt.target instanceof HTMLElement)?!0:!Lt)},Kt=()=>{Te(!1)},nn=rt=>()=>{const Lt=ee.filter(Dt=>Dt!==rt);Re(Lt),O(Lt)};return t.createElement("div",{className:oe.root},t.createElement(P.Z,{variant:"button"},d),t.createElement(T.Z,{onClickAway:Kt},t.createElement(I.Z,{className:oe.formControl},t.createElement(X.Z,{value:ee,native:k,disabled:G,"data-testid":"select",displayEmpty:!0,multiple:o,onChange:it,onClick:It,open:Ae,input:t.createElement(Ge,null),renderValue:rt=>{var Lt;return o&&ee.length!==0?t.createElement("div",{className:oe.chips},rt.map(Dt=>{var ln,nr;return t.createElement(Gr.Z,{key:(ln=l.find(Mn=>Mn.value===Dt))==null?void 0:ln.value,label:(nr=l.find(Mn=>Mn.value===Dt))==null?void 0:nr.label,clickable:!0,onDelete:nn(Dt),className:oe.chip})})):t.createElement(P.Z,null,ee.length===0?p||"":(Lt=l.find(Dt=>Dt.value===rt))==null?void 0:Lt.label)},IconComponent:()=>Ae?t.createElement(Me,null):t.createElement($e,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!o&&t.createElement(K.Z,{value:[]},p),k?l&&l.map(rt=>t.createElement("option",{value:rt.value,key:rt.value},rt.label)):l&&l.map(rt=>t.createElement(K.Z,{key:rt.value,value:rt.value},o&&t.createElement(tr.Z,{color:"primary",checked:ee.includes(rt.value)||!1,className:oe.checkbox}),rt.label))))))}const ze=()=>{},Nt=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:ze,stepHistory:[],setStepHistory:ze,onStepChange:ze});function tn(n){const{children:o,elevated:l,onStepChange:d,activeStep:p=0}=n,[E,O]=useState(p),[U,k]=useState([0]);useEffect(()=>{O(p)},[p]);const G=[];let oe;return Children.forEach(o,ee=>{isValidElement(ee)&&(ee.props.end?oe=ee:G.push(ee))}),React.createElement(React.Fragment,null,React.createElement(Nt.Provider,{value:{stepIndex:E,setStepIndex:O,stepHistory:U,setStepHistory:k,onStepChange:d,stepperLength:Children.count(o)}},React.createElement(MuiStepper,{activeStep:E,orientation:"vertical",elevation:l?2:0},G)),E>=Children.count(o)-1&&oe)}const Vn=(0,m.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),Sn=({text:n,handleClick:o})=>React.createElement(Button,{onClick:o},n||"Reset"),fn=({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")),En=({text:n,handleClick:o,disabled:l,stepIndex:d})=>React.createElement(Button,{onClick:o,"data-testid":`backButton-${d}`,disabled:l},n||"Back"),Bn=({actions:n={},children:o})=>{const l=Vn(),{stepperLength:d,stepIndex:p,setStepIndex:E,stepHistory:O,setStepHistory:U,onStepChange:k}=useContext(VerticalStepperContext),G=(Ae,Te)=>{Te&&Te(),k&&k(p,Ae),E(Ae)},oe=()=>{const Ae=n.nextStep?n.nextStep(p,d-1):p+1;G(Ae,n.onNext),U([...O,Ae])},ee=()=>{O.pop(),G(O[O.length-1],n.onBack),U([...O])},Re=()=>{G(0,n.onRestart),U([0])};return React.createElement("div",{className:l.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(En,{text:n.backText,handleClick:ee,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(fn,{text:n.nextText,handleClick:oe,disabled:!!d&&p>=d||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(Sn,{text:n.restartText,handleClick:Re,stepIndex:p}),o)},Sr=(0,m.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function Ur(n){const{title:o,children:l,end:d,actions:p,...E}=n,O=Sr();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 Kn=(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 Cn(n){const o=Kn(n);return React.createElement("span",{className:classNames(o.status,o.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function Tn(n){const o=Kn(n);return React.createElement("span",{className:classNames(o.status,o.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Nr(n){const o=Kn(n);return React.createElement("span",{className:classNames(o.status,o.error),"aria-label":"Status error","aria-hidden":"true",...n})}function no(n){const o=Kn(n);return React.createElement("span",{className:classNames(o.status,o.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function js(n){const o=Kn(n);return React.createElement("span",{className:classNames(o.status,o.running),"aria-label":"Status running","aria-hidden":"true",...n})}function Gs(n){const o=Kn(n);return React.createElement("span",{className:classNames(o.status,o.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var Vs=e(74600),go=e(15584);const sa=n=>(0,a.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),ca={root:{border:"0",verticalAlign:"top"}},la=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,dn.Z)(sa,{name:"BackstageMetadataTableTitleCell"})(go.Z),fa=(0,dn.Z)(ca,{name:"BackstageMetadataTableCell"})(go.Z),Ks=({dense:n,children:o})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,o)),ks=({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,dn.Z)(la,{name:"BackstageMetadataTableList"})(({classes:n,children:o})=>t.createElement("ul",{className:n.root},o)),Ys=(0,dn.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,dn.Z)(yo,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:o})=>t.createElement(po,{classes:n},o)),vo=(0,dn.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 Js(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),Zr=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 Qs(n,o=250){const[l,d]=useSearchParams(),p=l.toString(),[E,O]=useState(Co(p,n));return useEffect(()=>{const U=Co(p,n);O(k=>isEqual(U,k)?k:U)},[p,O,n]),useDebouncedEffect(()=>{const U=Ca(p,n,E);p!==U&&d(U,{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 Zn(n,o){const d=(0,c.useApp)().getSystemIcon(n);return d?t.createElement(d,{...o}):t.createElement(ba.Z,{...o})}function Xs(n){return Zn("brokenImage",n)}function _s(n){return Zn("catalog",n)}function ec(n){return Zn("chat",n)}function tc(n){return Zn("dashboard",n)}function nc(n){return Zn("docs",n)}function rc(n){return Zn("email",n)}function oc(n){return Zn("github",n)}function ac(n){return Zn("group",n)}function Vr(n){return Zn("help",n)}function ic(n){return Zn("user",n)}function sc(n){return Zn("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:Vr;return t.createElement(l,null)},La=({link:n})=>{var o;return t.createElement(F,{to:n.url},(o=n.title)!=null?o:n.url)},Oa=({item:n})=>{var o;return t.createElement(st.Z,null,t.createElement(Aa.Z,null,t.createElement(Ia,{icon:n.icon})),t.createElement(lt.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,U]=(0,t.useState)(null),k=Pa(),G=(0,Ee.Z)(Re=>Re.breakpoints.down("sm")),oe=Re=>{U(Re.currentTarget),E(!0)},ee=()=>{E(!1)};return t.createElement(t.Fragment,null,t.createElement(Dn.Z,{display:"flex",ml:1},G?t.createElement($.Z,{color:"primary",size:"small",onClick:oe,"data-testid":"support-button"},t.createElement(Vr,null)):t.createElement(y.Z,{"data-testid":"support-button",color:"primary",onClick:oe,startIcon:t.createElement(Vr,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:ee},t.createElement(At.Z,{className:k.popoverList},o&&t.createElement(st.Z,{alignItems:"flex-start"},t.createElement(P.Z,{variant:"subtitle1"},o)),t.Children.map(l,(Re,Ae)=>t.createElement(st.Z,{alignItems:"flex-start",key:`child-${Ae}`},Re)),d&&d.map((Re,Ae)=>t.createElement(Oa,{item:Re,key:`item-${Ae}`}))),t.createElement(va.Z,null,t.createElement(y.Z,{color:"primary",onClick:ee},"Close"))))}var oo=e(18671),wn=e(10289);const Kr=72,bo=24,Po=18,kn={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=>({...kn,...n,iconContainerWidth:kn.drawerWidthClosed,iconSize:kn.drawerWidthClosed-kn.iconPadding*2,userBadgeDiameter:kn.drawerWidthClosed-kn.userBadgePadding*2}),Io={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:kn.defaultOpenDelayMs+200},Fa=n=>({...Io,...n}),cc="@backstage/core/sidebar-intro-dismissed",zr=(0,t.createContext)({isOpen:!1,setOpen:()=>{}}),jn=(0,t.createContext)({sidebarConfig:kn,submenuConfig:Io}),Lo=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var kr;(function(n){const o="sidebarPinState";n.SIDEBAR_PIN_STATE=o})(kr||(kr={}));const Oo={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(kr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(kr.SIDEBAR_PIN_STATE,JSON.stringify(n))}},Ba=(0,m.Z)(n=>({root:o=>({width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:()=>o.isPinned?o.sidebarConfig.drawerWidthOpen:o.sidebarConfig.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:o.sidebarConfig.mobileSidebarHeight}}),content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),Cr=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1}),xo=(0,t.createContext)({content:{contentRef:void 0}});function wa(n){const[o,l]=(0,t.useState)(()=>Oo.getSidebarPinState()),{sidebarConfig:d}=(0,t.useContext)(jn),p=(0,t.useRef)(null),E=(0,t.useMemo)(()=>({content:{contentRef:p}}),[p]);(0,t.useEffect)(()=>{Oo.setSidebarPinState(o)},[o]);const O=(0,Ee.Z)(G=>G.breakpoints.down("xs"),{noSsr:!0}),U=()=>l(!o),k=Ba({isPinned:o,sidebarConfig:d});return t.createElement(Cr.Provider,{value:{isPinned:o,toggleSidebarPinState:U,isMobile:O}},t.createElement(xo.Provider,{value:E},t.createElement("div",{className:k.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 Ma=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)(jn),O=za({sidebarConfig:E}),U=(0,wn.TH)(),{selectedMenuItemIndex:k,setSelectedMenuItemIndex:G}=(0,t.useContext)(wo),oe=(Re,Ae)=>{G(Ae===k?-1:Ae)},ee=p===k&&k>=0||p!==k&&!(k>=0)&&o===U.pathname;return t.createElement(Za.Z,{label:l,icon:d,component:F,to:o||U.pathname,onChange:oe,value:p,selected:ee,classes:O})},Fo=n=>{const{children:o,to:l,label:d,icon:p,value:E}=n,{isMobile:O}=(0,t.useContext)(Cr);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,Zr.orderBy)(n,({props:{priority:o}})=>Number.isInteger(o)?o:-1,"desc"),ja=t.createElement(Fo).type,Ga=({children:n,label:o="Menu",open:l,onClose:d})=>{const{sidebarConfig:p}=(0,t.useContext)(jn),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(Dn.Z,{className:E.overlayHeader},t.createElement(P.Z,{variant:"h3"},o),t.createElement($.Z,{onClick:d,classes:{root:E.overlayHeaderClose}},t.createElement(Ua.Z,null))),t.createElement(Dn.Z,null,n))},wo=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),Va=n=>{const{sidebarConfig:o}=(0,t.useContext)(jn),{children:l}=n,d=Bo({sidebarConfig:o}),p=(0,wn.TH)(),[E,O]=(0,t.useState)(-1);(0,t.useEffect)(()=>{O(-1)},[p.pathname]);let U=(0,c.useElementFilter)(l,G=>G.getElements().filter(oe=>oe.type===ja));if(l)U.length?U=Ha(U):U.push(t.createElement(Fo,{key:"default_menu",icon:t.createElement(Na.Z,null)},l));else return null;const k=E>=0&&!U[E].props.to;return t.createElement(zr.Provider,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(wo.Provider,{value:{selectedMenuItemIndex:E,setSelectedMenuItemIndex:O}},t.createElement(Ga,{label:U[E]&&U[E].props.label,open:k,onClose:()=>O(-1)},U[E]&&U[E].props.children),t.createElement(Ma.Z,{className:d.root,"data-testid":"mobile-sidebar-root"},U)))},Mo=(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 bn;(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"})(bn||(bn={}));const Ka=n=>{const{sidebarConfig:o}=(0,t.useContext)(jn),{openDelayMs:l=o.defaultOpenDelayMs,closeDelayMs:d=o.defaultCloseDelayMs,disableExpandOnHover:p,children:E}=n,O=Mo({sidebarConfig:o}),U=(0,Ee.Z)(Kt=>Kt.breakpoints.down("md"),{noSsr:!0}),[k,G]=(0,t.useState)(bn.Closed),oe=(0,t.useRef)(),{isPinned:ee,toggleSidebarPinState:Re}=(0,t.useContext)(Cr),Ae=()=>{ee||p||(oe.current&&(clearTimeout(oe.current),oe.current=void 0),k!==bn.Open&&!U&&(oe.current=window.setTimeout(()=>{oe.current=void 0,G(bn.Open)},l),G(bn.Idle)))},Te=()=>{ee||p||(oe.current&&(clearTimeout(oe.current),oe.current=void 0),k===bn.Idle?G(bn.Closed):k===bn.Open&&(oe.current=window.setTimeout(()=>{oe.current=void 0,G(bn.Closed)},d)))},it=k===bn.Open&&!U||ee,It=Kt=>{Kt?(G(bn.Open),Re()):(G(bn.Closed),Re())};return t.createElement("div",{style:{}},t.createElement(Ya,null),t.createElement(zr.Provider,{value:{isOpen:it,setOpen:It}},t.createElement("div",{className:O.root,"data-testid":"sidebar-root",onMouseEnter:p?()=>{}:Ae,onFocus:p?()=>{}:Ae,onMouseLeave:p?()=>{}:Te,onBlur:p?()=>{}:Te},t.createElement("div",{className:dt()(O.drawer,{[O.drawerOpen]:it})},E))))},ka=n=>{var k,G;const o=Da((k=n.sidebarOptions)!=null?k:{}),l=Fa((G=n.submenuOptions)!=null?G:{}),{children:d,disableExpandOnHover:p,openDelayMs:E,closeDelayMs:O}=n,{isMobile:U}=(0,t.useContext)(Cr);return U?t.createElement(Va,null,d):t.createElement(jn.Provider,{value:{sidebarConfig:o,submenuConfig:l}},t.createElement(Ka,{openDelayMs:E,closeDelayMs:O,disableExpandOnHover:p},d))};function Ya(){const{sidebarConfig:n}=(0,t.useContext)(jn),{focusContent:o,contentRef:l}=Do(),d=Mo({sidebarConfig:n});return l!=null&&l.current?t.createElement(y.Z,{onClick:o,variant:"contained",className:dt()(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,Zr.isEqual)(o.pathname,n.pathname)&&(0,Zr.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},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0"},textContent:{color:n.palette.navigation.color,display:"flex",justifyContent:"center",[n.breakpoints.down("xs")]:{display:"block",paddingLeft:n.spacing(4)},fontSize:"14px"}}),{name:"BackstageSidebarSubmenuItem"}),lc=n=>{const{title:o,to:l,icon:d,dropdownItems:p}=n,E=Ja(),{setIsHoveredOn:O}=useContext(SidebarItemWithSubmenuContext),U=()=>{O(!1)},k=useResolvedPath(l),G=useLocation();let oe=isLocationMatch(G,k);const[ee,Re]=useState(!1),Ae=()=>{Re(!ee)};return p!==void 0?(p.some(Te=>{const it=resolvePath(Te.to);return oe=isLocationMatch(G,it),oe}),React.createElement("div",{className:E.itemContainer},React.createElement("button",{onClick:Ae,onTouchStart:Te=>Te.stopPropagation(),className:classnames(E.item,oe?E.selected:void 0)},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:E.label},o),ee?React.createElement(ArrowDropUpIcon,{className:E.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:E.dropdownArrow})),p&&ee&&React.createElement("div",{className:E.dropdown},p.map((Te,it)=>React.createElement(Link,{to:Te.to,underline:"none",className:E.dropdownItem,onClick:U,onTouchStart:It=>It.stopPropagation(),key:it},React.createElement(Typography,{className:E.textContent},Te.title)))))):React.createElement("div",{className:E.itemContainer},React.createElement(Link,{to:l,underline:"none",className:classnames(E.item,oe?E.selected:void 0),onClick:U,onTouchStart:Te=>Te.stopPropagation()},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)(zr),{sidebarConfig:l,submenuConfig:d}=(0,t.useContext)(jn),p=o?l.drawerWidthOpen:l.drawerWidthClosed,E=Qa({left:p,submenuConfig:d}),{isHoveredOn:O}=(0,t.useContext)(Lo),[U,k]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{k(O)},[O]),t.createElement("div",{className:dt()(E.drawer,{[E.drawerOpen]:U})},t.createElement(P.Z,{variant:"h5",className:E.title},n.title),n.children)};var Yr=e(76600),qa=e(26739),_a=e(98989),ei=e(59797),ti=e(83543);const ni=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),uc=()=>{const n=ni();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 dc=null;const ri=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),fc=()=>{const n=ri();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 mc=null;const oi=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 Jr(n){return(0,t.useMemo)(()=>oi(n),[n])()}const ai=(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,wn.i3)(O)));return}p&&(d=$o(o,(0,wn.i3)(p)))}}),d},[o.pathname]);function Uo(n){return n.to===void 0}const ii=t.createElement(Xa).type,si=t.forwardRef(function({to:o,end:l,style:d,className:p,activeStyle:E,caseSensitive:O,activeClassName:U="active","aria-current":k="page",...G},oe){let{pathname:ee}=(0,wn.TH)(),{pathname:Re}=(0,wn.WU)(o);O||(ee=ee.toLocaleLowerCase("en-US"),Re=Re.toLocaleLowerCase("en-US"));let Ae=ee===Re;!Ae&&!l&&(Ae=ee.startsWith(`${Re}/`));const Te=Ae?k:void 0;return t.createElement(A.rU,{...G,to:o,ref:oe,"aria-current":Te,style:{...d,...Ae?E:void 0},className:dt()([p,Ae?U:void 0])})}),No=(0,t.forwardRef)((n,o)=>{const{icon:l,text:d,hasNotifications:p=!1,disableHighlight:E=!1,onClick:O,children:U,className:k,...G}=n,{sidebarConfig:oe}=(0,t.useContext)(jn),ee=Jr(oe),{isOpen:Re}=(0,t.useContext)(zr),Ae=t.createElement(qa.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:dt()({[ee.closedItemIcon]:!Re})},t.createElement(l,{fontSize:"small"})),Te=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:ee.iconContainer},Ae),d&&t.createElement(P.Z,{variant:"subtitle2",className:ee.label},d),t.createElement("div",{className:ee.secondaryAction},U)),it=Re?Te:Ae,It={onClick:O,className:dt()(k,ee.root,Re?ee.open:ee.closed,Uo(n)&&ee.buttonItem,{[ee.highlightable]:!E})};return Uo(n)?t.createElement("button",{"aria-label":d,...It,ref:o},it):t.createElement(si,{...It,activeClassName:ee.selected,to:n.to?n.to:"",ref:o,"aria-label":d||n.to,...G},it)}),ci=({children:n,...o})=>{const{sidebarConfig:l}=(0,t.useContext)(jn),d=Jr(l),[p,E]=(0,t.useState)(!1),O=(0,wn.TH)(),U=ai(n,O),k=(0,Ee.Z)(Re=>Re.breakpoints.down("sm")),G=()=>{E(!0)},oe=()=>{E(!1)},ee=()=>k?p?t.createElement(ei.Z,{fontSize:"small",className:d.submenuArrow}):t.createElement(ti.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:oe,onTouchStart:p?oe:G,onMouseEnter:G,className:dt()(p&&d.highlighted)},t.createElement(No,{className:U?d.selected:"",...o},ee()),p&&n))},Zo=(0,t.forwardRef)((n,o)=>{const[l]=(0,c.useElementFilter)(n.children,d=>d.getElements().filter(p=>p.type===ii));return l?t.createElement(ci,{...n},l):t.createElement(No,{...n,ref:o})});function hc(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),[l,d]=useState(""),p=Jr(o),E=n.icon?n.icon:SearchIcon,O=()=>{n.onSearch(l),d("")},U=ee=>{ee.key==="Enter"&&(ee.preventDefault(),O())},k=ee=>{d(ee.target.value)},G=ee=>{ee.preventDefault(),ee.stopPropagation()},oe=ee=>{O(),ee.preventDefault()};return React.createElement("div",{className:p.searchRoot},React.createElement(Zo,{icon:E,to:n.to,onClick:oe,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:l,onClick:G,onChange:k,onKeyDown:U,className:p.searchContainer,InputProps:{disableUnderline:!0,className:p.searchField},inputProps:{className:p.searchFieldHTMLInput}})))}const gc=(0,Yr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),pc=(0,Yr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),li=(0,Yr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),ui=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),yc=(0,Yr.Z)("div")(({theme:n})=>{const o=ui(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":o,"&:hover":o}}),Ec=()=>{const{sidebarConfig:n}=useContext(SidebarConfigContext),o=Jr(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)))},di=(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 fi(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),l=di({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(fi,{text:o,onClose:E}))},mi=null,hi="And your recently viewed plugins will pop up here!";function vc(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:{},U=()=>{p(G=>({...l,...G,starredItemsDismissed:!0}))},k=()=>{p(G=>({...l,...G,recentlyViewedItemsDismissed:!0}))};return o?React.createElement(React.Fragment,null,!E&&React.createElement(React.Fragment,null,React.createElement(zo,{text:mi,onDismiss:U}),React.createElement(SidebarDivider,null)),!O&&React.createElement(zo,{text:hi,onDismiss:k})):null}const gi=(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(),U=gi();return t.createElement("article",{ref:O,tabIndex:-1,...E,className:dt()(U.root,o,{[U.stretch]:l,[U.noPadding]:d})},p)}var pi=e(6487),yi=e(99152);const Ei=(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=Ei(),U=(k,G)=>{d===void 0&&E(G),l&&l(G)};return(0,t.useEffect)(()=>{d!==void 0&&E(d)},[d]),t.createElement("div",{className:O.tabsWrapper},t.createElement(yi.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:U,value:p},o.map((k,G)=>t.createElement(pi.Z,{...k.tabProps,"data-testid":`header-tab-${G}`,label:k.label,key:k.id,value:G,className:O.defaultTab,classes:{selected:O.selected,root:O.tabRoot}}))))}function vi(n){var U,k,G;const o=(0,wn.UO)(),d=n.map(({path:oe,children:ee})=>({caseSensitive:!1,path:`${oe}/*`,element:ee})).sort((oe,ee)=>ee.path.replace(/\/\*$/,"").localeCompare(oe.path.replace(/\/\*$/,""))),p=(U=(0,wn.V$)(d))!=null?U:n[0].children,[E]=(k=(0,wn.fp)(d,`/${o["*"]}`))!=null?k:[],O=E?n.findIndex(oe=>`${oe.path}/*`===E.route.path):0;return{index:O===-1?0:O,element:p,route:(G=n[O])!=null?G:n[0]}}function jo(n){const{routes:o}=n,l=(0,wn.s0)(),{index:d,route:p,element:E}=vi(o),O=(0,t.useMemo)(()=>o.map(k=>({id:k.path,label:k.title,tabProps:k.tabProps})),[o]),U=k=>l(o[k].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(Ho,{tabs:O,selectedIndex:d,onChange:U}),t.createElement(Wo,null,t.createElement(oo.q,{title:p.title}),E))}const ao=()=>null;(0,c.attachComponentData)(ao,"core.gatherMountPoints",!0);function Go(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 Go(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 Ai(n){const o=Go(n.children);return t.createElement(jo,{routes:o})}Ai.Route=ao;const Ri=(0,m.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function Si(n){const{value:o,subvalue:l}=n,d=Ri();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},o),t.createElement("div",{className:d.subvalue},l))}var Ci=e(21070),Ti=e(90324),bi=e(98281),Pi=e(48049),Vo=e(51209),Ko=e(33375),Ii=e(44233),Li=e(27604),io=e(36444),Oi=e(37971),xi=e(59709),Di=e(17373),Fi=e(3702),Bi=e(93111),Qr=e(67222);const wi=(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"}),Mi=n=>{var k;const o=wi(),{onChangeFilters:l}=n,[d,p]=(0,t.useState)({...n.selectedFilters}),[E,O]=(0,t.useState)(!1),U=()=>{p({}),O(G=>!G)};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:U},"Clear all")),t.createElement("div",{className:o.filters},((k=n.filters)==null?void 0:k.length)&&n.filters.map(G=>t.createElement(et,{triggerReset:E,key:G.element.label,...G.element,selected:d[G.element.label],onChange:oe=>p({...d,[G.element.label]:oe})}))))},$i={Add:(0,t.forwardRef)((n,o)=>t.createElement(Ci.Z,{...n,ref:o})),Check:(0,t.forwardRef)((n,o)=>t.createElement(bi.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(Ii.Z,{...n,ref:o})),DetailPanel:(0,t.forwardRef)((n,o)=>t.createElement(Vo.Z,{...n,ref:o})),Edit:(0,t.forwardRef)((n,o)=>t.createElement(Li.Z,{...n,ref:o})),Export:(0,t.forwardRef)((n,o)=>t.createElement(Fi.Z,{...n,ref:o})),Filter:(0,t.forwardRef)((n,o)=>t.createElement(io.Z,{...n,ref:o})),FirstPage:(0,t.forwardRef)((n,o)=>t.createElement(Oi.Z,{...n,ref:o})),LastPage:(0,t.forwardRef)((n,o)=>t.createElement(xi.Z,{...n,ref:o})),NextPage:(0,t.forwardRef)((n,o)=>t.createElement(Vo.Z,{...n,ref:o})),PreviousPage:(0,t.forwardRef)((n,o)=>t.createElement(Pi.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(io.Z,{...n,ref:o})),SortArrow:(0,t.forwardRef)((n,o)=>t.createElement(Ti.Z,{...n,ref:o})),ThirdStateCheck:(0,t.forwardRef)((n,o)=>t.createElement(Di.Z,{...n,ref:o})),ViewColumn:(0,t.forwardRef)((n,o)=>t.createElement(Bi.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 Ui=(0,dn.Z)(n=>({header:{padding:n.spacing(1,2,1,2.5),borderTop:`1px solid ${n.palette.grey.A100}`,borderBottom:`1px solid ${n.palette.grey.A100}`,color:n.palette.textSubtle,fontWeight:n.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(Qr.W$),Yo=(0,dn.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(Qr.UW),Ni=(0,m.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Zi=(0,m.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function zi(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,U,k)=>({...E(O,U,k),fontWeight:o.typography.fontWeightBold})}return{...l,headerStyle:d,cellStyle:p}})}function Wi(n,o){return(0,Zr.transform)(n,(l,d,p)=>{(0,Zr.isEqual)(d,o[p])||(l[p]=d)})}const Jo={search:"",filtersOpen:!1,filters:{}};function Hi(n){const{toolbarRef:o,setSearch:l,hasFilters:d,selectedFiltersLength:p,toggleFilters:E}=n,O=Ni(),U=(0,t.useCallback)(k=>{n.onSearchChanged(k),l(k)},[n,l]);return d?t.createElement("div",{className:O.root},t.createElement("div",{className:O.root},t.createElement($.Z,{onClick:E,"aria-label":"filter list"},t.createElement(io.Z,null)),t.createElement(P.Z,{className:O.title},"Filters (",p,")")),t.createElement(Yo,{...n,ref:o,onSearchChanged:U})):t.createElement(Yo,{...n,ref:o,onSearchChanged:U})}function ji(n){const{data:o,columns:l,options:d,title:p,subtitle:E,filters:O,initialState:U,emptyContent:k,onStateChange:G,...oe}=n,ee=Zi(),Re=(0,L.Z)(),Ae={...Jo,...U},[Te,it]=(0,t.useState)(Ae.filtersOpen),It=(0,t.useCallback)(()=>it(mn=>!mn),[it]),[Kt,nn]=(0,t.useState)(0),[rt,Lt]=(0,t.useState)(o),[Dt,ln]=(0,t.useState)(Ae.filters),nr=zi(l,Re),[Mn,Hr]=(0,t.useState)(Ae.search);(0,t.useEffect)(()=>{if(G){const mn=Wi({search:Mn,filtersOpen:Te,filters:Dt},Jo);G(mn)}},[Mn,Te,Dt,G]);const Tt={headerStyle:{textTransform:"uppercase"}},rr=(0,t.useCallback)(mn=>{var Pn;return(Pn=l.find($n=>$n.title===mn))==null?void 0:Pn.field},[l]);(0,t.useEffect)(()=>{if(typeof o=="function")return;if(!Dt){Lt(o);return}const mn=Object.values(Dt);if(o&&mn.flat().length){const Pn=o.filter($n=>!!Object.entries(Dt).filter(([,gr])=>!!gr.length).every(([gr,on])=>{const an=ko($n,rr(gr));return Array.isArray(an)&&Array.isArray(on)?an.some(Tr=>on.includes(Tr)):Array.isArray(an)?an.includes(on):Array.isArray(on)?on.includes(an):an===on}));Lt(Pn)}else Lt(o);nn(mn.flat().length)},[o,Dt,rr]);const fo=(mn,Pn)=>{const $n=on=>{const an=new Set,Tr=pr=>{pr!=null&&an.add(pr)};return Pn&&Pn.forEach(pr=>{const br=ko(pr,rr(on));Array.isArray(br)?br.forEach(Tr):Tr(br)}),an},gr=on=>({placeholder:"All results",label:on.column,multiple:on.type==="multiple-select",items:[...$n(on.column)].sort().map(an=>({label:an,value:an}))});return mn.map(on=>({type:on.type,element:gr(on)}))},hr=!!(O!=null&&O.length),mo=(0,t.useCallback)(mn=>t.createElement(Hi,{setSearch:Hr,hasFilters:hr,selectedFiltersLength:Kt,toggleFilters:It,...mn}),[It,hr,Kt,Hr]),qr=typeof o!="function"&&o.length===0,_r=l.length,ho=(0,t.useCallback)(mn=>k&&qr?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:_r},k))):t.createElement(Qr.os,{...mn}),[qr,k,_r]);return t.createElement("div",{className:ee.root},Te&&o&&typeof o!="function"&&(O==null?void 0:O.length)&&t.createElement(Mi,{filters:fo(O,o),selectedFilters:Dt,onChangeFilters:ln}),t.createElement(Qr.ZP,{components:{Header:Ui,Toolbar:mo,Body:ho},options:{...Tt,...d},columns:nr,icons:$i,title:t.createElement(t.Fragment,null,t.createElement(P.Z,{variant:"h5",component:"h3"},p),E&&t.createElement(P.Z,{color:"textSecondary",variant:"body1"},E)),data:typeof o=="function"?o:rt,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...oe}))}const Ac=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))},Gi=(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"}),Rc=n=>{const o=Gi(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)},Vi=(n,o)=>o?n?"20px":"0":"40px",Ki=(0,m.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:o=>Vi(o.isFirstNav,o.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}}),{name:"BackstageTab"}),Sc=n=>{const o=Ki(n),{isFirstNav:l,isFirstIndex:d,...p}=n;return React.createElement(Tab,{classes:o,disableRipple:!0,...p})},ki=(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"}),Cc=n=>{const o=ki(n);return React.createElement(Tabs,{classes:o,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},Yi=(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 Tc(n){const{tabs:o}=n,l=Yi(),[d,p]=useState([0,0]),[E,O]=useState(0),[U,k]=useState(0),[G,oe]=useState([[]]),ee=useRef(),{width:Re}=useWindowSize(),Ae=(nn,rt)=>{p([E,rt])},Te=()=>{O(E-1)},it=()=>{O(E+1)},It=()=>E+1<G.length;useEffect(()=>{const rt=E===0?1:2,Lt=ee.current.offsetWidth-20-rt*30,Dt=d[0]*U+d[1],ln=Math.floor(Lt/170);k(ln),oe(chunkArray(o,ln)),p([Math.floor(Dt/ln),Dt%ln])},[Re,o]);const Kt=E===d[0]?d[1]:!1;return React.createElement("div",{className:l.root},React.createElement(AppBar,{ref:ee,className:l.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:Kt,onChange:Ae,selectionFollowsFocus:!0},E!==0&&React.createElement(StyledIcon,{onClick:Te,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),G[E].map((nn,rt)=>React.createElement(StyledTab,{value:rt,isFirstIndex:rt===0,isFirstNav:E===0,key:rt,icon:nn.icon||void 0,label:nn.label||void 0})),It()&&React.createElement(StyledIcon,{isNext:!0,onClick:it,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Kt!==!1?G[E].map((nn,rt)=>React.createElement(TabPanel,{key:rt,value:rt,index:Kt},nn.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},G[d[0]][d[1]].content))}var bc=e(44311);function Ji(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 Pc(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:Ji(n.data,o)})):null}const Qi=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"}),Xi=({title:n="Unknown page",className:o})=>t.createElement(P.Z,{variant:"h4",component:"h2",className:o,"data-testid":"header-title"},n);function qi(n){const{description:o,title:l,titleComponent:d=void 0,children:p,textAlign:E="left"}=n,O=Qi({textAlign:E})(),U=d||t.createElement(Xi,{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},U,o&&t.createElement(P.Z,{className:O.description,variant:"body2"},o)),t.createElement("div",{className:O.rightItemsBox},p)))}var _i=e(29788);const es=(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"}),ts=()=>{const n=es();return t.createElement("img",{src:_i,className:n.micDrop,alt:"Girl dropping mic from her hands"})},ns=(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 rs(n){const{status:o,statusMessage:l,additionalInfo:d,supportUrl:p}=n,E=ns(),O=(0,wn.s0)(),U=To();return t.createElement(R.Z,{container:!0,spacing:0,className:E.container},t.createElement(ts,null),t.createElement(R.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(P.Z,{"data-testid":"error",variant:"body1",className:E.subtitle},"ERROR ",o,": ",l),t.createElement(P.Z,{variant:"body1",className:E.subtitle},d),t.createElement(P.Z,{variant:"h2",className:E.title},"Looks like someone dropped the mic!"),t.createElement(P.Z,{variant:"h6"},t.createElement(F,{to:"#","data-testid":"go-back-link",onClick:()=>O(-1)},"Go back"),"... or please"," ",t.createElement(F,{to:p||U.url},"contact support")," if you think this is a bug.")))}var os=e(16173);const as=(0,dn.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(P.Z),so=(0,dn.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(Dn.Z);function is(n){const{children:o,...l}=n,[d,p]=t.useState(null),E=t.Children.toArray(o),[O,U,...k]=E,G=k.length?k.pop():E[E.length-1],oe=E.length>3,ee=Te=>{p(Te.currentTarget)},Re=()=>{p(null)},Ae=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(os.Z,{"aria-label":"breadcrumb",...l},E.length>1&&t.createElement(so,{clone:!0},O),E.length>2&&t.createElement(so,{clone:!0},U),oe&&t.createElement(as,{onClick:ee},"..."),t.createElement(Dn.Z,{style:{fontStyle:"italic"}},G)),t.createElement(Ao.ZP,{open:Ae,anchorEl:d,onClose:Re,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(At.Z,null,k.map((Te,it)=>t.createElement(st.Z,{key:it,button:!0},t.createElement(so,{clone:!0},Te))))))}const ss=(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"}),cs=({type:n,typeLink:o,classes:l,pageTitle:d})=>n?o?t.createElement(is,{className:l.breadcrumb},t.createElement(F,{to:o},n),t.createElement(P.Z,null,d)):t.createElement(P.Z,{className:l.type},n):null,ls=({pageTitle:n,classes:o,tooltip:l})=>{const d=t.createElement(P.Z,{className:o.title,variant:"h1"},n);return l?t.createElement(B.ZP,{title:l,placement:"top-start"},d):d},us=({classes:n,subtitle:o})=>o?typeof o!="string"?t.createElement(t.Fragment,null,o):t.createElement(P.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:U,typeLink:k}=n,G=ss(),ee=(0,c.useApi)(c.configApiRef).getOptionalString("app.title")||"Backstage",Re=l||E,Ae=E||l,Te=`${Re} | %s | ${ee}`,it=`${Re} | ${ee}`;return t.createElement(t.Fragment,null,t.createElement(oo.q,{titleTemplate:Te,defaultTitle:it}),t.createElement("header",{style:d,className:G.header},t.createElement(Dn.Z,{className:G.leftItemsBox},t.createElement(cs,{classes:G,type:U,typeLink:k,pageTitle:Ae}),t.createElement(ls,{classes:G,pageTitle:Ae,tooltip:O}),t.createElement(us,{classes:G,subtitle:p})),t.createElement(R.Z,{container:!0,className:G.rightItemsBox,spacing:4},o)))}const ds=(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"}),fs=({value:n,className:o})=>t.createElement(P.Z,{className:o},n);function ms(n){const{label:o,value:l,url:d}=n,p=ds(),E=t.createElement(fs,{className:p.value,value:l||"<Unknown>"});return t.createElement(R.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(P.Z,{className:p.label},o),d?t.createElement(F,{to:d},E):E))}const hs={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 U={timeZone:E.getString("timezone"),...hs};try{new Date().toLocaleString(l,U)}catch{console.warn(`The timezone ${U.timeZone} is invalid. Defaulting to GMT`),U.timeZone="GMT",O="GMT"}const k=o.toLocaleTimeString(l,U);d.push({time:k,label:O})}return d}function Ic(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 gs=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"}}),ps=(0,m.Z)(gs,{name:"BackstageItemCardHeader"});function ys(n){const{title:o,subtitle:l,children:d}=n,p=ps(n);return t.createElement("div",{className:p.root},l&&t.createElement(P.Z,{variant:"subtitle2",component:"h3"},l),o&&t.createElement(P.Z,{variant:"h6",component:"h4"},o),d)}function Lc(n){const{description:o,tags:l,title:d,type:p,subtitle:E,label:O,onClick:U,href:k}=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((G,oe)=>React.createElement(Chip,{size:"small",label:G,key:oe}))):null,o),React.createElement(CardActions,null,!k&&React.createElement(Button,{to:"#",onClick:U,color:"primary"},O),k&&React.createElement(Button,{to:k,color:"primary"},O)))}const Es=n=>(0,a.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),vs=(0,m.Z)(Es,{name:"BackstageItemCardGrid"});function As(n){const{children:o,...l}=n,d=vs(l);return t.createElement("div",{className:d.root,...l},o)}var Rs=e(41547);const Ss=(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)(Cr),p=Ss({isMobile:d});return t.createElement(Rs.Z,{theme:E=>({...E,page:E.getPageTheme({themeId:o})})},t.createElement("div",{className:p.root},l))}function Cs(n){const{themeId:o,children:l,...d}=n;return t.createElement(qo,{themeId:o},t.createElement(Qo,{...d}),l)}var vn=e(30195);const Oc=vn.z.object({providerInfo:vn.z.object({}).catchall(vn.z.unknown()).optional(),profile:vn.z.object({email:vn.z.string().optional(),displayName:vn.z.string().optional(),picture:vn.z.string().optional()}),backstageIdentity:vn.z.object({token:vn.z.string(),identity:vn.z.object({type:vn.z.literal("user"),userEntityRef:vn.z.string(),ownershipEntityRefs:vn.z.array(vn.z.string())})})}),_o={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function Ts(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 xc{constructor(o){Q(this,"options");Q(this,"abortController");Q(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:Ts(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 Dc=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},bs=(0,m.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),co=({children:n})=>{const o=bs();return t.createElement(R.Z,{component:"li",item:!0,classes:o},n)};class lo{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 Ps(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}=Ps(o);return{type:"user",userEntityRef:l,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var l,d;return{token:await((d=(l=this.result).getIdToken)==null?void 0:d.call(l))}}async signOut(){var o,l;return(l=(o=this.result).signOut)==null?void 0:l.call(o)}}class Wr{constructor(o,l,d){Q(this,"profilePromise");this.identity=o,this.authApi=l,this.profile=d}static createGuest(){return new lo}static fromLegacy(o){return uo.fromResult(o)}static create(o){return new Wr(o.identity,o.authApi,o.profile)}getUserId(){const o=this.identity.userEntityRef,l=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(o);if(!l)throw new TypeError(`Invalid user entity reference "${o}"`);return l[3]}async getIdToken(){return(await this.authApi.getBackstageIdentity()).token}getProfile(){if(!this.profile)throw new Error("The identity API does not implement synchronous profile fetching, use getProfileInfo() instead");return this.profile}async getProfileInfo(){if(this.profilePromise)return await this.profilePromise;try{return this.profilePromise=this.authApi.getProfile(),await this.profilePromise}catch(o){throw this.profilePromise=void 0,o}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const Is={Component:({config:n,onSignInSuccess:o})=>{const{apiRef:l,title:d,message:p}=n,E=(0,c.useApi)(l),O=(0,c.useApi)(c.errorApiRef),U=async()=>{try{const k=await E.getBackstageIdentity({instantPopup:!0});if(!k)throw new Error(`The ${d} provider is not configured to support sign-in`);const G=await E.getProfile();o(Wr.create({identity:k.identity,profile:G,authApi:E}))}catch(k){O.post(new Dr.SP("Login failed",k))}};return t.createElement(co,null,t.createElement(ft,{variant:"fullHeight",title:d,actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:U},"Sign In")},t.createElement(P.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 Wr.create({identity:d.identity,profile:p,authApi:l})}},Ls={Component:({onSignInSuccess:n})=>t.createElement(co,null,t.createElement(ft,{title:"Guest",variant:"fullHeight",actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:()=>n(new lo)},"Enter")},t.createElement(P.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 lo};var Os=e(63955),ea=e(86619),ta=e(74828),xs=e(45455),Ds=e.n(xs);const Fs=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Bs=(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}},ws={Component:({onSignInSuccess:n})=>{const o=Bs(),{register:l,handleSubmit:d,formState:p}=(0,Os.cI)({mode:"onChange"}),{errors:E}=p,O=({userId:U})=>{n(Wr.fromLegacy({userId:U,profile:{email:`${U}@example.com`}}))};return t.createElement(co,null,t.createElement(ft,{title:"Custom User",variant:"fullHeight"},t.createElement(P.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(I.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(I.Z,null,t.createElement(ea.Z,{...na(l("idToken",{required:!1,validate:U=>!U||Fs.test(U)||"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)||!Ds()(E)},"Continue"))))},loader:async()=>{}},Xr="@backstage/core:SignInPage:provider",ra={guest:Ls,custom:ws,common:Is};function oa(n,o){if(n in o)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function Nc(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 Zc=(n,o)=>{const l=useApi(errorApiRef),d=useApiHolder(),[p,E]=useState(!0),O=useCallback(k=>{o(IdentityApiSignOutProxy.from({identityApi:k,signOut:async()=>{var G;localStorage.removeItem(Xr),await((G=k.signOut)==null?void 0:G.call(k))}}))},[o]);useLayoutEffect(()=>{var ee;if(!p)return;const k=localStorage.getItem(Xr);if(k===null){E(!1);return}const G=n[k];if(!G){E(!1);return}let oe=!1;return G.components.loader(d,(ee=G.config)==null?void 0:ee.apiRef).then(Re=>{oe||(Re?O(Re):E(!1))}).catch(Re=>{oe||(localStorage.removeItem(Xr),l.post(Re),E(!1))}),()=>{oe=!0}},[p,l,o,d,n,O]);const U=useMemo(()=>Object.keys(n).map(k=>{const G=n[k],{Component:oe}=G.components,ee=Re=>{localStorage.setItem(Xr,G.id),O(Re)};return React.createElement(oe,{key:G.id,config:G.config,onSignInSuccess:ee})}),[n,O]);return[p,U]},Ms=({onSignInSuccess:n,providers:o=[],title:l,align:d="left"})=>{const p=useApi(configApiRef),E=useStyles(),O=getSignInProviders(o),[U,k]=useSignInProviders(O,n);return U?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},k)))},$s=({provider:n,auto:o,onSignInSuccess:l})=>{const d=useStyles(),p=useApi(n.apiRef),E=useApi(configApiRef),[O,U]=useState(),[k,G]=useState(!1),oe=async({checkExisting:ee,showPopup:Re})=>{try{let Ae;if(ee&&(Ae=await p.getBackstageIdentity({optional:!0})),!Ae&&(Re||o)&&(G(!0),Ae=await p.getBackstageIdentity({instantPopup:!0}),!Ae))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Ae){G(!0);return}const Te=await p.getProfile();l(UserIdentity.create({identity:Ae.identity,authApi:p,profile:Te}))}catch(Ae){U(Ae),G(!0)}};return useMountEffect(()=>oe({checkExisting:!0})),k?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:E.getString("app.title")}),React.createElement(Content,null,React.createElement(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:d},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:n.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{oe({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 zc(n){return"provider"in n?React.createElement($s,{...n}):React.createElement(Ms,{...n})}const Us=(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"}),Ns=(0,dn.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(Rr.Z);function Wc(n){const{slackChannel:o,errorBoundaryProps:l,children:d,title:p,deepLink:E,value:O,onChange:U}=n,k=Us(),[G,oe]=useState(0),ee=U||((Te,it)=>oe(it));let Re;O?React.Children.map(d,Te=>{React.isValidElement(Te)&&(Te==null?void 0:Te.props.value)===O&&(Re=Te==null?void 0:Te.props.children)}):React.Children.map(d,(Te,it)=>{React.isValidElement(Te)&&it===G&&(Re=Te==null?void 0:Te.props.children)});const Ae=l||(o?{slackChannel:o}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Ae},p&&React.createElement(Ns,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:k,value:O||G,onChange:ee},d),React.createElement(Divider,null),React.createElement(CardContent,null,Re),E&&React.createElement(BottomLink,{...E})))}const Zs=(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 Hc(n){const{children:o,...l}=n,d=Zs();return React.createElement(Tab,{disableRipple:!0,classes:d,...l})}},88609:function(q,i,e){"use strict";e.d(i,{Os:function(){return h},fC:function(){return v}});var r=e(76241),t=e(2784);const c=(0,r.CT)("analytics-context"),h=()=>{const a=(0,t.useContext)(c);if(a===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const s=a.atVersion(1);if(s===void 0)throw new Error("No context found for version 1.");return s},v=a=>{const{attributes:s,children:f}=a,u={...h(),...s},A=(0,r.EI)({1:u});return t.createElement(c.Provider,{value:A},f)};function m(a,s){const f=y=>React.createElement(v,{attributes:s},React.createElement(a,{...y}));return f.displayName=`WithAnalyticsContext(${a.displayName||a.name||"Component"})`,f}},28461:function(q,i,e){"use strict";e.d(i,{f:function(){return r.fC},z:function(){return m}});var r=e(88609),t=e(27399),c=e(2784);class h{constructor(s,f={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=s,this.context=f}setContext(s){this.context=s}captureEvent(s,f,{value:y,attributes:u}={}){try{this.analyticsApi.captureEvent({action:s,subject:f,value:y,attributes:u,context:this.context})}catch(A){console.warn("Error during analytics event capture. %o",A)}}}function v(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function m(){const a=(0,c.useRef)(null),s=(0,r.Os)(),f=v();function y(){return a.current===null&&(a.current=new h(f)),a.current}const u=y();return u.setContext(s),u}},39135:function(q,i,e){"use strict";e.d(i,{CL:function(){return M},sM:function(){return t},$v:function(){return u},v_:function(){return A},hg:function(){return b},uB:function(){return y},bq:function(){return f},Ds:function(){return S},NW:function(){return F},VE:function(){return _},W0:function(){return L},gP:function(){return $},F4:function(){return h},ux:function(){return m},Kp:function(){return c},$4:function(){return B},p_:function(){return a},ZM:function(){return x},D:function(){return v},gW:function(){return s},E6:function(){return J}});var r=e(86833),t;(function(te){const ve="SignedIn";te.SignedIn=ve;const Ve="SignedOut";te.SignedOut=Ve})(t||(t={}));const c=(0,r.createApiRef)({id:"core.auth.google"}),h=(0,r.createApiRef)({id:"core.auth.github"}),v=(0,r.createApiRef)({id:"core.auth.okta"}),m=(0,r.createApiRef)({id:"core.auth.gitlab"}),a=(0,r.createApiRef)({id:"core.auth.microsoft"}),s=(0,r.createApiRef)({id:"core.auth.onelogin"}),f=(0,r.createApiRef)({id:"core.auth.bitbucket"}),y=(0,r.createApiRef)({id:"core.auth.atlassian"}),u=(0,r.createApiRef)({id:"core.alert"}),A=(0,r.createApiRef)({id:"core.analytics"}),b=(0,r.createApiRef)({id:"core.apptheme"}),S=(0,r.createApiRef)({id:"core.config"}),F=(0,r.createApiRef)({id:"core.discovery"}),_=(0,r.createApiRef)({id:"core.error"});var M;(function(te){te[te.None=0]="None";const Ve=1;te[te.Active=Ve]="Active"})(M||(M={}));const L=(0,r.createApiRef)({id:"core.featureflags"}),$=(0,r.createApiRef)({id:"core.fetch"}),B=(0,r.createApiRef)({id:"core.identity"}),x=(0,r.createApiRef)({id:"core.oauthrequest"}),J=(0,r.createApiRef)({id:"core.storage"})},27399:function(q,i,e){"use strict";e.d(i,{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(i,{FeatureFlagState:function(){return r.FeatureFlagState}}),e.o(r,"SessionState")&&e.d(i,{SessionState:function(){return r.SessionState}}),e.o(r,"alertApiRef")&&e.d(i,{alertApiRef:function(){return r.alertApiRef}}),e.o(r,"analyticsApiRef")&&e.d(i,{analyticsApiRef:function(){return r.analyticsApiRef}}),e.o(r,"appThemeApiRef")&&e.d(i,{appThemeApiRef:function(){return r.appThemeApiRef}}),e.o(r,"atlassianAuthApiRef")&&e.d(i,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),e.o(r,"attachComponentData")&&e.d(i,{attachComponentData:function(){return r.attachComponentData}}),e.o(r,"bitbucketAuthApiRef")&&e.d(i,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),e.o(r,"configApiRef")&&e.d(i,{configApiRef:function(){return r.configApiRef}}),e.o(r,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return r.createComponentExtension}}),e.o(r,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),e.o(r,"createPlugin")&&e.d(i,{createPlugin:function(){return r.createPlugin}}),e.o(r,"createReactExtension")&&e.d(i,{createReactExtension:function(){return r.createReactExtension}}),e.o(r,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return r.createRoutableExtension}}),e.o(r,"createRouteRef")&&e.d(i,{createRouteRef:function(){return r.createRouteRef}}),e.o(r,"discoveryApiRef")&&e.d(i,{discoveryApiRef:function(){return r.discoveryApiRef}}),e.o(r,"errorApiRef")&&e.d(i,{errorApiRef:function(){return r.errorApiRef}}),e.o(r,"featureFlagsApiRef")&&e.d(i,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),e.o(r,"fetchApiRef")&&e.d(i,{fetchApiRef:function(){return r.fetchApiRef}}),e.o(r,"getComponentData")&&e.d(i,{getComponentData:function(){return r.getComponentData}}),e.o(r,"githubAuthApiRef")&&e.d(i,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),e.o(r,"gitlabAuthApiRef")&&e.d(i,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),e.o(r,"googleAuthApiRef")&&e.d(i,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),e.o(r,"identityApiRef")&&e.d(i,{identityApiRef:function(){return r.identityApiRef}}),e.o(r,"microsoftAuthApiRef")&&e.d(i,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),e.o(r,"oauthRequestApiRef")&&e.d(i,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),e.o(r,"oktaAuthApiRef")&&e.d(i,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),e.o(r,"oneloginAuthApiRef")&&e.d(i,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),e.o(r,"storageApiRef")&&e.d(i,{storageApiRef:function(){return r.storageApiRef}}),e.o(r,"useApp")&&e.d(i,{useApp:function(){return r.useApp}}),e.o(r,"useElementFilter")&&e.d(i,{useElementFilter:function(){return r.useElementFilter}}),e.o(r,"useRouteRef")&&e.d(i,{useRouteRef:function(){return r.useRouteRef}}),e.o(r,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return r.useRouteRefParams}});var t=e(39135)},90515:function(q,i,e){"use strict";e.d(i,{T:function(){return t}});class r{constructor(h){if(this.config=h,!h.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 '${h.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(q,i,e){"use strict";e.d(i,{n:function(){return r}});function r(t,c){return"id"in t?{api:t,deps:{},factory:()=>c}:t}},86833:function(q,i,e){"use strict";e.d(i,{createApiFactory:function(){return v.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),h=e.n(c);e.o(c,"FeatureFlagState")&&e.d(i,{FeatureFlagState:function(){return c.FeatureFlagState}}),e.o(c,"SessionState")&&e.d(i,{SessionState:function(){return c.SessionState}}),e.o(c,"alertApiRef")&&e.d(i,{alertApiRef:function(){return c.alertApiRef}}),e.o(c,"analyticsApiRef")&&e.d(i,{analyticsApiRef:function(){return c.analyticsApiRef}}),e.o(c,"appThemeApiRef")&&e.d(i,{appThemeApiRef:function(){return c.appThemeApiRef}}),e.o(c,"atlassianAuthApiRef")&&e.d(i,{atlassianAuthApiRef:function(){return c.atlassianAuthApiRef}}),e.o(c,"attachComponentData")&&e.d(i,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"bitbucketAuthApiRef")&&e.d(i,{bitbucketAuthApiRef:function(){return c.bitbucketAuthApiRef}}),e.o(c,"configApiRef")&&e.d(i,{configApiRef:function(){return c.configApiRef}}),e.o(c,"createApiFactory")&&e.d(i,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(i,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createReactExtension")&&e.d(i,{createReactExtension:function(){return c.createReactExtension}}),e.o(c,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(i,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"discoveryApiRef")&&e.d(i,{discoveryApiRef:function(){return c.discoveryApiRef}}),e.o(c,"errorApiRef")&&e.d(i,{errorApiRef:function(){return c.errorApiRef}}),e.o(c,"featureFlagsApiRef")&&e.d(i,{featureFlagsApiRef:function(){return c.featureFlagsApiRef}}),e.o(c,"fetchApiRef")&&e.d(i,{fetchApiRef:function(){return c.fetchApiRef}}),e.o(c,"getComponentData")&&e.d(i,{getComponentData:function(){return c.getComponentData}}),e.o(c,"githubAuthApiRef")&&e.d(i,{githubAuthApiRef:function(){return c.githubAuthApiRef}}),e.o(c,"gitlabAuthApiRef")&&e.d(i,{gitlabAuthApiRef:function(){return c.gitlabAuthApiRef}}),e.o(c,"googleAuthApiRef")&&e.d(i,{googleAuthApiRef:function(){return c.googleAuthApiRef}}),e.o(c,"identityApiRef")&&e.d(i,{identityApiRef:function(){return c.identityApiRef}}),e.o(c,"microsoftAuthApiRef")&&e.d(i,{microsoftAuthApiRef:function(){return c.microsoftAuthApiRef}}),e.o(c,"oauthRequestApiRef")&&e.d(i,{oauthRequestApiRef:function(){return c.oauthRequestApiRef}}),e.o(c,"oktaAuthApiRef")&&e.d(i,{oktaAuthApiRef:function(){return c.oktaAuthApiRef}}),e.o(c,"oneloginAuthApiRef")&&e.d(i,{oneloginAuthApiRef:function(){return c.oneloginAuthApiRef}}),e.o(c,"storageApiRef")&&e.d(i,{storageApiRef:function(){return c.storageApiRef}}),e.o(c,"useApp")&&e.d(i,{useApp:function(){return c.useApp}}),e.o(c,"useElementFilter")&&e.d(i,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"useRouteRef")&&e.d(i,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return c.useRouteRefParams}});var v=e(25182)},16362:function(){},5761:function(q,i,e){"use strict";e.d(i,{I_:function(){return c},h_:function(){return h}});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 h(m){const s=c().get(m);if(!s)throw new Error(`No implementation available for ${m}`);return s}function v(m){return function(s){const f=u=>{const A=c(),b={};for(const S in m)if(m.hasOwnProperty(S)){const F=m[S],_=A.get(F);if(!_)throw new Error(`No implementation available for ${F}`);b[S]=_}return React.createElement(s,{...u,...b})},y=s.displayName||s.name||"Component";return f.displayName=`withApis(${y})`,f}}},31311:function(q,i,e){"use strict";e.d(i,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),c=e.n(t);e.o(t,"attachComponentData")&&e.d(i,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(i,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(i,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(i,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(i,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(i,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(i,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(i,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(i,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(i,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(i,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(q,i,e){"use strict";e.d(i,{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 h=c.atVersion(1);if(!h)throw new Error("AppContext v1 not available");return h}},74181:function(q,i,e){"use strict";e.d(i,{R5:function(){return h},CO:function(){return A},YO:function(){return b},P4:function(){return u},IY:function(){return v},vJ:function(){return M}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),c="__backstage_data";function h(L,$,B){var te;const x=L;let J=(te=x[c])!=null?te:t.get(L);if(J||(J={map:new Map},Object.defineProperty(x,c,{enumerable:!1,configurable:!0,writable:!1,value:J}),t.set(L,J)),J.map.has($)){const ve=L.displayName||L.name;throw new Error(`Attempted to attach duplicate data "${$}" to component "${ve}"`)}J.map.set($,B)}function v(L,$){var J;if(!L)return;const B=L.type;if(!B)return;const x=(J=B[c])!=null?J:t.get(B);if(!!x)return x.map.get($)}var m=e(2784),a=e(88609),s=e(31311),f=e(82772);class y extends m.Component{constructor(){super(...arguments);Q(this,"state",{error:void 0});Q(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(B){return{error:B}}render(){const{error:B}=this.state,{app:x,plugin:J}=this.props,{ErrorBoundaryFallback:te}=x.getComponents();return B?m.createElement(te,{error:B,resetError:this.handleErrorReset,plugin:J}):this.props.children}}function u(L){const{component:$,mountPoint:B,name:x}=L;return b({component:{lazy:()=>$().then(J=>{const te=Ve=>{try{(0,f.tg)(B)}catch(We){if(typeof We=="object"&&We!==null){const{message:ue}=We;if(typeof ue=="string"&&ue.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${B} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw We}return m.createElement(J,{...Ve})},ve=x||J.displayName||J.name||"LazyComponent";return te.displayName=`RoutableExtension(${ve})`,te},J=>ve=>{const Ve=(0,s.useApp)(),{BootErrorPage:We}=Ve.getComponents();return m.createElement(We,{step:"load-chunk",error:J})})},data:{"core.mountPoint":B},name:x})}function A(L){const{component:$,name:B}=L;return b({component:$,name:B})}function b(L){const{data:$={},name:B}=L;B||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let x;if("lazy"in L.component){const te=L.component.lazy;x=(0,m.lazy)(()=>te().then(ve=>({default:ve})))}else x=L.component.sync;const J=B||x.displayName||x.name||"Component";return{expose(te){const ve=Ve=>{const We=(0,s.useApp)(),{Progress:ue}=We.getComponents(),Ee=$==null?void 0:$["core.mountPoint"];return m.createElement(m.Suspense,{fallback:m.createElement(ue,null)},m.createElement(y,{app:We,plugin:te},m.createElement(a.fC,{attributes:{pluginId:te.getId(),...B&&{extension:B},...Ee&&{routeRef:Ee.id}}},m.createElement(x,{...Ve}))))};h(ve,"core.plugin",te);for(const[Ve,We]of Object.entries($))h(ve,Ve,We);return ve.displayName=`Extension(${J})`,ve}}}var S=e(27399);function F(L,$,B,x){return m.Children.toArray(L).flatMap(J=>{if(!(0,m.isValidElement)(J))return[];if(J.type===m.Fragment)return F(J.props.children,$,B,x);if(v(J,"core.featureFlagged")){const te=J.props;return("with"in te?$.isActive(te.with):!$.isActive(te.without))?F(J.props.children,$,B,x):[]}if(B===void 0||B(J))return[J];if(x)throw new Error(x);return F(J.props.children,$,B,x)})}class _{constructor($,B){this.node=$,this.featureFlagsApi=B}selectByComponentData($){const B=F(this.node,this.featureFlagsApi,x=>v(x,$.key)!==void 0,$.withStrictError);return new _(B,this.featureFlagsApi)}findComponentData($){return F(this.node,this.featureFlagsApi,x=>v(x,$.key)!==void 0).map(x=>v(x,$.key)).filter(x=>x!==void 0)}getElements(){return F(this.node,this.featureFlagsApi)}}function M(L,$,B=[]){const x=(0,S.useApi)(S.featureFlagsApiRef),J=new _(L,x);return(0,m.useMemo)(()=>$(J),[L,...B])}},80274:function(){},36964:function(q,i,e){"use strict";e.d(i,{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 h.R5},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},createComponentExtension:function(){return h.CO},createExternalRouteRef:function(){return s.x8},createPlugin:function(){return a.r},createReactExtension:function(){return h.YO},createRoutableExtension:function(){return h.P4},createRouteRef:function(){return s.NT},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},getComponentData:function(){return h.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 h.vJ},useRouteRef:function(){return s.tg},useRouteRefParams:function(){return s.Oi}});var r=e(28461),t=e(27399);e.o(t,"attachComponentData")&&e.d(i,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(i,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(i,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(i,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(i,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(i,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(i,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(i,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(i,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(i,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(i,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(i,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return t.useRouteRefParams}});var c=e(31311);e.o(c,"attachComponentData")&&e.d(i,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"createApiFactory")&&e.d(i,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createApiRef")&&e.d(i,{createApiRef:function(){return c.createApiRef}}),e.o(c,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(i,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createReactExtension")&&e.d(i,{createReactExtension:function(){return c.createReactExtension}}),e.o(c,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(i,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"getComponentData")&&e.d(i,{getComponentData:function(){return c.getComponentData}}),e.o(c,"useApi")&&e.d(i,{useApi:function(){return c.useApi}}),e.o(c,"useApiHolder")&&e.d(i,{useApiHolder:function(){return c.useApiHolder}}),e.o(c,"useElementFilter")&&e.d(i,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"useRouteRef")&&e.d(i,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return c.useRouteRefParams}});var h=e(74181),v=e(80274),m=e.n(v);e.o(v,"createApiFactory")&&e.d(i,{createApiFactory:function(){return v.createApiFactory}}),e.o(v,"createApiRef")&&e.d(i,{createApiRef:function(){return v.createApiRef}}),e.o(v,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return v.createExternalRouteRef}}),e.o(v,"createPlugin")&&e.d(i,{createPlugin:function(){return v.createPlugin}}),e.o(v,"createRouteRef")&&e.d(i,{createRouteRef:function(){return v.createRouteRef}}),e.o(v,"useApi")&&e.d(i,{useApi:function(){return v.useApi}}),e.o(v,"useApiHolder")&&e.d(i,{useApiHolder:function(){return v.useApiHolder}}),e.o(v,"useRouteRef")&&e.d(i,{useRouteRef:function(){return v.useRouteRef}}),e.o(v,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return v.useRouteRefParams}});var a=e(96896),s=e(82772)},96896:function(q,i,e){"use strict";e.d(i,{r:function(){return t}});class r{constructor(h){this.config=h}getId(){return this.config.id}getApis(){var h;return(h=this.config.apis)!=null?h:[]}getFeatureFlags(){var h,v;return(v=(h=this.config.featureFlags)==null?void 0:h.slice())!=null?v:[]}get routes(){var h;return(h=this.config.routes)!=null?h:{}}get externalRoutes(){var h;return(h=this.config.externalRoutes)!=null?h:{}}provide(h){return h.expose(this)}toString(){return`plugin{${this.config.id}}`}}function t(c){return new r(c)}},82772:function(q,i,e){var S,F,_;"use strict";e.d(i,{x8:function(){return f},NT:function(){return h},tg:function(){return A},Oi:function(){return b}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class c{constructor(L,$){Q(this,S,"absolute");this.id=L,this.params=$}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}S=t;function h(M){var L;return new c(M.id,(L=M.params)!=null?L:[])}const v=/^\w+$/;class m{constructor(L,$,B,x){Q(this,F,"sub");this.id=L,this.path=$,this.parent=B,this.params=x}toString(){return`routeRef{type=sub,id=${this.id}}`}}F=t;function a(M){const{id:L,path:$,parent:B}=M,x=$.split("/").filter(ve=>ve.startsWith(":")).map(ve=>ve.substring(1)),J=[...B.params,...x];if(B.params.some(ve=>x.includes(ve)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!$.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${$}'`);if($.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${$}'`);for(const ve of x)if(!v.test(ve))throw new Error(`SubRouteRef path has invalid param, got '${ve}'`);return new m(L,$,B,J)}class s{constructor(L,$,B){Q(this,_,"external");this.id=L,this.params=$,this.optional=B}toString(){return`routeRef{type=external,id=${this.id}}`}}_=t;function f(M){var L;return new s(M.id,(L=M.params)!=null?L:[],Boolean(M.optional))}var y=e(2784),u=e(10289);function A(M){const L=(0,u.TH)(),$=(0,r.Vt)("routing-context");if(!$)throw new Error("Routing context is not available");const B=$.atVersion(1),x=(0,y.useMemo)(()=>B&&B.resolve(M,L),[B,M,L]);if(!$)throw new Error("useRouteRef used outside of routing context");if(!B)throw new Error("RoutingContext v1 not available");const J="optional"in M&&M.optional;if(!x&&!J)throw new Error(`No path for ${M}`);return x}function b(M){return(0,u.UO)()}},10179:function(q,i,e){"use strict";e.d(i,{SP:function(){return S},dR:function(){return u},VL:function(){return _},BD:function(){return t}});function r(M){if(typeof M!="object"||M===null||Array.isArray(M))return!1;const L=M;return!(typeof L.name!="string"||L.name===""||typeof L.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 L=M;if(typeof L.name!="string"||L.name==="")throw new Error(`Encountered error object without a name, got '${M}'`);if(typeof L.message!="string")throw new Error(`Encountered error object without a message, got '${M}'`)}var c=e(24852);function h(M,L){const $=serializeErrorInternal(M),B={name:"Unknown",message:"<no reason given>",...$};return L!=null&&L.includeStack||delete B.stack,B}function v(M){const L=(0,c.deserializeError)(M);return M.stack||(L.stack=void 0),L}function m(M){if(r(M)){const L=String(M);return L!=="[object Object]"?L:`${M.name}: ${M.message}`}return`unknown error '${M}'`}class a extends Error{constructor($,B){var J;let x=$;if(B!==void 0){const te=m(B);x?x+=`; caused by ${te}`:x=`caused by ${te}`}super(x);Q(this,"cause");(J=Error.captureStackTrace)==null||J.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(B)?B:void 0}}class s extends null{}class f extends null{}class y extends null{}class u extends a{}class A extends null{}class b extends null{}class S extends a{constructor(L,$){super(L,$),this.name=r($)?$.name:"Error"}}async function F(M){var L;try{const $=await M.text();if($){if((L=M.headers.get("content-type"))!=null&&L.startsWith("application/json"))try{const B=JSON.parse($);if(B.error&&B.response)return B}catch{}return{error:{name:"Error",message:`Request failed with status ${M.status} ${M.statusText}, ${$}`},response:{statusCode:M.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${M.status} ${M.statusText}`},response:{statusCode:M.status}}}class _ extends Error{constructor($){super($.message);Q(this,"response");Q(this,"body");Q(this,"cause");this.name="ResponseError",this.response=$.response,this.body=$.data,this.cause=$.cause}static async fromResponse($){const B=await F($),x=B.response.statusCode||$.status,J=B.error.name||$.statusText,te=`Request failed with ${x} ${J}`,ve=v(B.error);return new _({message:te,response:$,data:B,cause:ve})}}},36356:function(q,i,e){var u,A,b,S,F;"use strict";e.d(i,{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(L){In(this,u,void 0);Un(this,u,L)}async getCredentials(L){const $=new URL(L.url),B=Je(this,u).find(x=>x.isUrlSupported($));if(!B)throw new Error(`No auth provider available for '${L.url}', see https://backstage.io/link?scm-auth`);return B.getCredentials(L)}}u=new WeakMap;const _=class{constructor(L,$,B,x){In(this,A,void 0);In(this,b,void 0);In(this,S,void 0);In(this,F,void 0);Un(this,A,$),Un(this,b,B),Un(this,S,x),Un(this,F,L)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:L,gitlab:$,azure:B,bitbucket:x})=>_.merge(_.forGithub(L),_.forGitlab($),_.forAzure(B),_.forBitbucket(x))})}static forAuthApi(L,$){return new _("generic",L,$.host,$.scopeMapping)}static forGithub(L,$){var x;const B=(x=$==null?void 0:$.host)!=null?x:"github.com";return new _("github",L,B,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(L,$){var x;const B=(x=$==null?void 0:$.host)!=null?x:"gitlab.com";return new _("gitlab",L,B,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(L,$){var x;const B=(x=$==null?void 0:$.host)!=null?x:"dev.azure.com";return new _("azure",L,B,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(L,$){var x;const B=(x=$==null?void 0:$.host)!=null?x:"bitbucket.org";return new _("bitbucket",L,B,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...L){return new c(L)}isUrlSupported(L){return L.host===Je(this,b)}getAdditionalScopesForProvider(L){var $,B;return!(L!=null&&L.customScopes)||Je(this,F)==="generic"?[]:(B=($=L.customScopes)==null?void 0:$[Je(this,F)])!=null?B:[]}async getCredentials(L){const{url:$,additionalScope:B,...x}=L,J=Je(this,S).default.slice();B!=null&&B.repoWrite&&J.push(...Je(this,S).repoWrite);const te=this.getAdditionalScopesForProvider(B);te.length&&J.push(...te);const ve=[...new Set(J)],Ve=await Je(this,A).getAccessToken(ve,x);return{token:Ve,headers:{Authorization:`Bearer ${Ve}`}}}};let h=_;A=new WeakMap,b=new WeakMap,S=new WeakMap,F=new WeakMap;var v=e(68370);class m{static fromConfig(L){return v.Lx.fromConfig(L)}}const a=(0,r.createApiRef)({id:"integration.scmintegrations"});var s=e(73250),f=e(2784);const y=M=>{var J;const{type:L}=M,$=(0,r.useApp)(),B=s.Z,x=L&&(J=$.getSystemIcon(L))!=null?J:B;return f.createElement(x,null)}},68370:function(q,i,e){var Wt,$t,_t,rn,en,Vt,Jt;"use strict";e.d(i,{Lx:function(){return Pt},Pb:function(){return Ze}});var r=e(82717),t=e.n(r),c=e(76635);function h(N){const g=new URL("http://example.com");return g.host=N,g.host===N}function v(N){try{return new URL(N),!0}catch{return!1}}function m(N,g){return{list(){return N},byUrl(C){try{const w=typeof C=="string"?new URL(C):C;return N.find(V=>g(V)===w.host)}catch{return}},byHost(C){return N.find(w=>g(w)===C)}}}function a(N){const{url:g,base:C,lineNumber:w}=N;try{return new URL(g),g}catch{}let V;if(g.startsWith("/")){const{filepath:fe}=t()(C);V=new URL(C);const ie=(0,c.trimEnd)(V.pathname.substring(0,V.pathname.length-fe.length),"/");V.pathname=`${ie}${g}`}else V=new URL(g,C);return V.search=new URL(C).search,w&&(V.hash=`L${w}`),V.toString()}const s="amazonaws.com";function f(N){var Ut;const g=N.getOptionalString("endpoint"),C=(Ut=N.getOptionalBoolean("s3ForcePathStyle"))!=null?Ut:!1;let w,V;if(g){try{const pn=new URL(g);w=pn.host,V=pn.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${g}' is not a valid URL`)}if(V!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${g}'`)}else w=s;const fe=N.getOptionalString("accessKeyId"),ie=N.getOptionalString("secretAccessKey"),De=N.getOptionalString("roleArn"),nt=N.getOptionalString("externalId");return{host:w,endpoint:g,s3ForcePathStyle:C,accessKeyId:fe,secretAccessKey:ie,roleArn:De,externalId:nt}}function y(N){const g=N.map(f);return g.some(C=>C.host===s)||g.push({host:s}),g}const qt=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(g){this.integrationConfig=g}resolveUrl(g){return a(g)}resolveEditUrl(g){return g}};let u=qt;Q(u,"factory",({config:g})=>{var w;const C=y((w=g.getOptionalConfigArray("integrations.awsS3"))!=null?w:[]);return m(C.map(V=>new qt(V)),V=>V.config.host)});const A="GB",cn=class{constructor(g,C,w,V,fe,ie){In(this,Wt,void 0);In(this,$t,void 0);In(this,_t,void 0);In(this,rn,void 0);In(this,en,void 0);In(this,Vt,void 0);In(this,Jt,(...g)=>{const C=new URL(Je(this,Wt));return C.pathname=g.map(w=>encodeURIComponent(w)).join("/"),C});Un(this,Wt,g),Un(this,$t,C),Un(this,_t,w),Un(this,rn,V),Un(this,en,fe),Un(this,Vt,ie)}static fromRepoUrl(g){var pn;const C=new URL(g);let w,V,fe;const ie=C.pathname.split("/").map(Ln=>decodeURIComponent(Ln));if(ie[2]==="_git"?(w=ie[1],V=fe=ie[3]):ie[3]==="_git"&&(w=ie[1],V=ie[2],fe=ie[4]),!w||!V||!fe)throw new Error("Azure URL must point to a git repository");const De=(pn=C.searchParams.get("path"))!=null?pn:void 0;let nt;const Ut=C.searchParams.get("version");if(Ut){if(Ut.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");nt=Ut.slice(2)}return new cn(C.origin,w,V,fe,De,nt)}toRepoUrl(){let g;return Je(this,_t)===Je(this,rn)?g=Je(this,Jt).call(this,Je(this,$t),"_git",Je(this,rn)):g=Je(this,Jt).call(this,Je(this,$t),Je(this,_t),"_git",Je(this,rn)),Je(this,en)&&g.searchParams.set("path",Je(this,en)),Je(this,Vt)&&g.searchParams.set("version",A+Je(this,Vt)),g.toString()}toFileUrl(){if(!Je(this,en))throw new Error("Azure URL must point to a specific path to be able to download a file");const g=Je(this,Jt).call(this,Je(this,$t),Je(this,_t),"_apis","git","repositories",Je(this,rn),"items");return g.searchParams.set("api-version","6.0"),g.searchParams.set("path",Je(this,en)),Je(this,Vt)&&g.searchParams.set("version",Je(this,Vt)),g.toString()}toArchiveUrl(){const g=Je(this,Jt).call(this,Je(this,$t),Je(this,_t),"_apis","git","repositories",Je(this,rn),"items");return g.searchParams.set("recursionLevel","full"),g.searchParams.set("download","true"),g.searchParams.set("api-version","6.0"),Je(this,en)&&g.searchParams.set("scopePath",Je(this,en)),Je(this,Vt)&&g.searchParams.set("version",Je(this,Vt)),g.toString()}toCommitsUrl(){const g=Je(this,Jt).call(this,Je(this,$t),Je(this,_t),"_apis","git","repositories",Je(this,rn),"commits");return g.searchParams.set("api-version","6.0"),Je(this,Vt)&&g.searchParams.set("searchCriteria.itemVersion.version",Je(this,Vt)),g.toString()}getOwner(){return Je(this,$t)}getProject(){return Je(this,_t)}getRepo(){return Je(this,rn)}getPath(){return Je(this,en)}getRef(){return Je(this,Vt)}};let b=cn;Wt=new WeakMap,$t=new WeakMap,_t=new WeakMap,rn=new WeakMap,en=new WeakMap,Vt=new WeakMap,Jt=new WeakMap;const S="dev.azure.com";function F(N){var w;const g=(w=N.getOptionalString("host"))!=null?w:S,C=N.getOptionalString("token");if(!h(g))throw new Error(`Invalid Azure integration config, '${g}' is not a valid host`);return{host:g,token:C}}function _(N){const g=N.map(F);return g.some(C=>C.host===S)||g.push({host:S}),g}const Nn=class{constructor(g){this.integrationConfig=g}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){var V;const{url:C,base:w}=g;if(v(C))return C;try{const fe=b.fromRepoUrl(w),ie=new URL(w),De=new URL(`https://a.com${(V=fe.getPath())!=null?V:""}`),nt=new URL(C,De).pathname;return ie.searchParams.set("path",nt),g.lineNumber&&(ie.searchParams.set("line",String(g.lineNumber)),ie.searchParams.set("lineEnd",String(g.lineNumber+1)),ie.searchParams.set("lineStartColumn","1"),ie.searchParams.set("lineEndColumn","1")),ie.toString()}catch{return new URL(C,w).toString()}}resolveEditUrl(g){return g}};let M=Nn;Q(M,"factory",({config:g})=>{var w;const C=_((w=g.getOptionalConfigArray("integrations.azure"))!=null?w:[]);return m(C.map(V=>new Nn(V)),V=>V.config.host)});var L=e(48834).Buffer;function $(N){return AzureUrl.fromRepoUrl(N).toFileUrl()}function B(N){return AzureUrl.fromRepoUrl(N).toArchiveUrl()}function x(N){return AzureUrl.fromRepoUrl(N).toCommitsUrl()}function J(N,g){const C=g?{...g}:{};if(N.token){const w=L.from(`:${N.token}`,"utf8");C.Authorization=`Basic ${w.toString("base64")}`}return{headers:C}}const te="bitbucket.org",ve="https://api.bitbucket.org/2.0";function Ve(N){var ie;const g=(ie=N.getOptionalString("host"))!=null?ie:te;let C=N.getOptionalString("apiBaseUrl");const w=N.getOptionalString("token"),V=N.getOptionalString("username"),fe=N.getOptionalString("appPassword");if(!h(g))throw new Error(`Invalid Bitbucket integration config, '${g}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):g===te?C=ve:C=`https://${g}/rest/api/1.0`,{host:g,apiBaseUrl:C,token:w,username:V,appPassword:fe}}function We(N){const g=N.map(Ve);return g.some(C=>C.host===te)||g.push({host:te,apiBaseUrl:ve}),g}const Gn=class{constructor(g){this.integrationConfig=g}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const C=a(g);if(!g.lineNumber)return C;const w=new URL(C);return this.integrationConfig.host==="bitbucket.org"?w.hash=`lines-${g.lineNumber}`:w.hash=`${g.lineNumber}`,w.toString()}resolveEditUrl(g){const C=t()(g),w=new URL(g);return w.searchParams.set("mode","edit"),w.searchParams.set("spa","0"),w.searchParams.set("at",C.ref),w.toString()}};let ue=Gn;Q(ue,"factory",({config:g})=>{var w,V,fe;const C=We((fe=g.getOptionalConfigArray("integrations.bitbucket"))!=null?fe:[...(w=g.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?w:[],...(V=g.getOptionalConfigArray("integrations.bitbucketServer"))!=null?V:[]]);return m(C.map(ie=>new Gn(ie)),ie=>ie.config.host)});var Ee=e(96279),Ie=e(48834).Buffer;async function He(N,g){const{name:C,owner:w,resource:V}=parseGitUrl(N),fe=V==="bitbucket.org";let ie=fe?`${g.apiBaseUrl}/repositories/${w}/${C}`:`${g.apiBaseUrl}/projects/${w}/repos/${C}/default-branch`,De=await fetch(ie,tt(g));if(De.status===404&&!fe&&(ie=`${g.apiBaseUrl}/projects/${w}/repos/${C}/branches/default`,De=await fetch(ie,tt(g))),!De.ok){const Ut=`Failed to retrieve default branch from ${ie}, ${De.status} ${De.statusText}`;throw new Error(Ut)}let nt;if(fe)nt=(await De.json()).mainbranch.name;else{const{displayId:Ut}=await De.json();nt=Ut}if(!nt)throw new Error(`Failed to read default branch from ${ie}. Response ${De.status} ${De.json()}`);return nt}async function Ye(N,g){const{name:C,owner:w,ref:V,protocol:fe,resource:ie,filepath:De}=parseGitUrl(N),nt=ie==="bitbucket.org";let Ut=V;Ut||(Ut=await He(N,g));const pn=De?`&path=${encodeURIComponent(De)}`:"";return nt?`${fe}://${ie}/${w}/${C}/get/${Ut}.tar.gz`:`${g.apiBaseUrl}/projects/${w}/repos/${C}/archive?format=tgz&at=${Ut}&prefix=${w}-${C}${pn}`}function ot(N,g){try{const{owner:C,name:w,ref:V,filepathtype:fe,filepath:ie}=parseGitUrl(N);if(!C||!w||fe!=="browse"&&fe!=="raw"&&fe!=="src")throw new Error("Invalid Bitbucket URL or file path");const De=ie.replace(/^\//,"");if(g.host==="bitbucket.org"){if(!V)throw new Error("Invalid Bitbucket URL or file path");return`${g.apiBaseUrl}/repositories/${C}/${w}/src/${V}/${De}`}return`${g.apiBaseUrl}/projects/${C}/repos/${w}/raw/${De}?at=${V}`}catch(C){throw new Error(`Incorrect URL: ${N}, ${C}`)}}function tt(N){const g={};if(N.token)g.Authorization=`Bearer ${N.token}`;else if(N.username&&N.appPassword){const C=Ie.from(`${N.username}:${N.appPassword}`,"utf8");g.Authorization=`Basic ${C.toString("base64")}`}return{headers:g}}const Ce="bitbucket.org",Ne="https://api.bitbucket.org/2.0";function Ue(N){const g=Ce,C=Ne,w=N.getString("username"),V=N.getString("appPassword");return{host:g,apiBaseUrl:C,username:w,appPassword:V}}function pt(N){const g=N.map(Ue);return g.length===0&&g.push({host:Ce,apiBaseUrl:Ne}),g}const Jn=class{constructor(g){this.integrationConfig=g}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const C=a(g);if(g.lineNumber){const w=new URL(C);return w.hash=`lines-${g.lineNumber}`,w.toString()}return C}resolveEditUrl(g){const C=t()(g),w=new URL(g);return w.searchParams.set("mode","edit"),w.searchParams.set("at",C.ref),w.toString()}};let Ke=Jn;Q(Ke,"factory",({config:g})=>{var w;const C=pt((w=g.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?w:[]);return m(C.map(V=>new Jn(V)),V=>V.config.host)});var Ft=e(48834).Buffer;async function mt(N,g){const{name:C,owner:w}=parseGitUrl(N),V=`${g.apiBaseUrl}/repositories/${w}/${C}`,fe=await fetch(V,Ot(g));if(!fe.ok){const nt=`Failed to retrieve default branch from ${V}, ${fe.status} ${fe.statusText}`;throw new Error(nt)}const De=(await fe.json()).mainbranch.name;if(!De)throw new Error(`Failed to read default branch from ${V}. Response ${fe.status} ${fe.json()}`);return De}async function Bt(N,g){const{name:C,owner:w,ref:V,protocol:fe,resource:ie}=parseGitUrl(N);let De=V;return De||(De=await mt(N,g)),`${fe}://${ie}/${w}/${C}/get/${De}.tar.gz`}function Ht(N,g){try{const{owner:C,name:w,ref:V,filepathtype:fe,filepath:ie}=parseGitUrl(N);if(!C||!w||fe!=="src"&&fe!=="raw")throw new Error("Invalid Bitbucket Cloud URL or file path");const De=ie.replace(/^\//,"");if(!V)throw new Error("Invalid Bitbucket Cloud URL or file path");return`${g.apiBaseUrl}/repositories/${C}/${w}/src/${V}/${De}`}catch(C){throw new Error(`Incorrect URL: ${N}, ${C}`)}}function Ot(N){const g={};if(N.username&&N.appPassword){const C=Ft.from(`${N.username}:${N.appPassword}`,"utf8");g.Authorization=`Basic ${C.toString("base64")}`}return{headers:g}}function jt(N){const g=N.getString("host");let C=N.getOptionalString("apiBaseUrl");const w=N.getOptionalString("token");if(!h(g))throw new Error(`Invalid Bitbucket Server integration config, '${g}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):C=`https://${g}/rest/api/1.0`,{host:g,apiBaseUrl:C,token:w}}function Zt(N){return N.map(jt)}const Qn=class{constructor(g){this.integrationConfig=g}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const C=a(g);if(g.lineNumber){const w=new URL(C),V=w.pathname.split("/").slice(-1)[0];return w.hash=`${V}-${g.lineNumber}`,w.toString()}return C}resolveEditUrl(g){const C=t()(g),w=new URL(g);return w.searchParams.set("mode","edit"),w.searchParams.set("spa","0"),w.searchParams.set("at",C.ref),w.toString()}};let wt=Qn;Q(wt,"factory",({config:g})=>{var w;const C=Zt((w=g.getOptionalConfigArray("integrations.bitbucketServer"))!=null?w:[]);return m(C.map(V=>new Qn(V)),V=>V.config.host)});async function An(N,g){const{name:C,owner:w}=parseGitUrl(N);let V=`${g.apiBaseUrl}/projects/${w}/repos/${C}/default-branch`,fe=await fetch(V,un(g));if(fe.status===404&&(V=`${g.apiBaseUrl}/projects/${w}/repos/${C}/branches/default`,fe=await fetch(V,un(g))),!fe.ok){const nt=`Failed to retrieve default branch from ${V}, ${fe.status} ${fe.statusText}`;throw new Error(nt)}const{displayId:ie}=await fe.json(),De=ie;if(!De)throw new Error(`Failed to read default branch from ${V}. Response ${fe.status} ${fe.json()}`);return De}async function Gt(N,g){const{name:C,owner:w,ref:V,filepath:fe}=parseGitUrl(N);let ie=V;ie||(ie=await An(N,g));const De=fe?`&path=${encodeURIComponent(fe)}`:"";return`${g.apiBaseUrl}/projects/${w}/repos/${C}/archive?format=tgz&at=${ie}&prefix=${w}-${C}${De}`}function Et(N,g){try{const{owner:C,name:w,ref:V,filepathtype:fe,filepath:ie}=parseGitUrl(N);if(!C||!w||fe!=="browse"&&fe!=="raw"&&fe!=="src")throw new Error("Invalid Bitbucket Server URL or file path");const De=ie.replace(/^\//,"");return`${g.apiBaseUrl}/projects/${C}/repos/${w}/raw/${De}?at=${V}`}catch(C){throw new Error(`Incorrect URL: ${N}, ${C}`)}}function un(N){const g={};return N.token&&(g.Authorization=`Bearer ${N.token}`),{headers:g}}function se(N){const g=N.getString("host");let C=N.getOptionalString("baseUrl"),w=N.getOptionalString("cloneUrl"),V=N.getOptionalString("gitilesBaseUrl");const fe=N.getOptionalString("username"),ie=N.getOptionalString("password");if(h(g)){if(C&&!v(C))throw new Error(`Invalid Gerrit integration config, '${C}' is not a valid baseUrl`);if(w&&!v(w))throw new Error(`Invalid Gerrit integration config, '${w}' is not a valid cloneUrl`);if(V&&!v(V))throw new Error(`Invalid Gerrit integration config, '${V}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${g}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):C=`https://${g}`,V?V=(0,c.trimEnd)(V,"/"):V=`https://${g}`,w?w=(0,c.trimEnd)(w,"/"):w=C,{host:g,baseUrl:C,cloneUrl:w,gitilesBaseUrl:V,username:fe,password:ie}}function j(N){return N.map(se)}const Xn=class{constructor(g){this.integrationConfig=g}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const{url:C,base:w,lineNumber:V}=g;let fe;return C?fe=new URL(C,w):fe=new URL(w),V&&(fe.hash=V.toString()),fe.toString()}resolveEditUrl(g){return g}};let ae=Xn;Q(ae,"factory",({config:g})=>{var w;const C=j((w=g.getOptionalConfigArray("integrations.gerrit"))!=null?w:[]);return m(C.map(V=>new Xn(V)),V=>V.config.host)});var le=e(48834).Buffer;const ye=")]}'";function Le(N,g){const w=g.replace(N.gitilesBaseUrl,"").split("/").filter(Ut=>!!Ut),V=w.indexOf("+");if(V<=0)throw new Error(`Unable to parse project from url: ${g}`);const fe=trimStart(w.slice(0,V).join("/"),"/"),ie=w.indexOf("heads");if(ie<=0)throw new Error(`Unable to parse branch from url: ${g}`);const De=w[ie+1],nt=w.slice(ie+2).join("/");return{branch:De,filePath:nt===""?"/":nt,project:fe}}function Be(N){return N.password?"/a/":"/"}function Se(N,g){const{branch:C,project:w}=Le(N,g);return`${N.baseUrl}${Be(N)}projects/${encodeURIComponent(w)}/branches/${C}`}function je(N,g){const{project:C}=Le(N,g);return`${N.cloneUrl}${Be(N)}${C}`}function ut(N,g){const{branch:C,filePath:w,project:V}=Le(N,g);return`${N.baseUrl}${Be(N)}projects/${encodeURIComponent(V)}/branches/${C}/files/${encodeURIComponent(w)}/content`}function bt(N){return`${N.baseUrl}${Be(N)}projects/`}function vt(N){const g={};if(!N.password)return g;const C=le.from(`${N.username}:${N.password}`,"utf8");return g.Authorization=`Basic ${C.toString("base64")}`,{headers:g}}async function at(N){const g=await N.text();if(g.startsWith(ye))try{return JSON.parse(g.slice(ye.length))}catch(C){throw new Error(`Invalid response from Gerrit: ${g.slice(0,10)} - ${C}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${g.slice(0,10)}`)}const Ct="github.com",dt="https://api.github.com",sn="https://raw.githubusercontent.com";function z(N){var ie,De;const g=(ie=N.getOptionalString("host"))!=null?ie:Ct;let C=N.getOptionalString("apiBaseUrl"),w=N.getOptionalString("rawBaseUrl");const V=N.getOptionalString("token"),fe=(De=N.getOptionalConfigArray("apps"))==null?void 0:De.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(!h(g))throw new Error(`Invalid GitHub integration config, '${g}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):g===Ct&&(C=dt),w?w=(0,c.trimEnd)(w,"/"):g===Ct&&(w=sn),{host:g,apiBaseUrl:C,rawBaseUrl:w,token:V,apps:fe}}function R(N){const g=N.map(z);return g.some(C=>C.host===Ct)||g.push({host:Ct,apiBaseUrl:dt,rawBaseUrl:sn}),g}function P(N,g,C){try{const{owner:w,name:V,ref:fe,filepathtype:ie,filepath:De}=parseGitUrl(N);if(!w||!V||!fe||ie!=="blob"&&ie!=="raw"&&ie!=="tree")throw new Error("Invalid GitHub URL or file path");const nt=De.replace(/^\//,"");return de(g,C)==="api"?`${g.apiBaseUrl}/repos/${w}/${V}/contents/${nt}?ref=${fe}`:`${g.rawBaseUrl}/${w}/${V}/${fe}/${nt}`}catch(w){throw new Error(`Incorrect URL: ${N}, ${w}`)}}function ce(N,g){const C={};return de(N,g)==="api"&&(C.Accept="application/vnd.github.v3.raw"),g.token&&(C.Authorization=`token ${g.token}`),{headers:C}}function de(N,g){return N.apiBaseUrl&&(g.token||!N.rawBaseUrl)?"api":"raw"}class Z{constructor(){Q(this,"tokenCache",new Map);Q(this,"isNotExpired",g=>g.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(g,C){const w=this.tokenCache.get(g);if(w&&this.isNotExpired(w.expiresAt))return{accessToken:w.token};const V=await C();return this.tokenCache.set(g,V),{accessToken:V.token}}}const D={Accept:"application/vnd.github.machine-man-preview+json"};class re{constructor(g,C){Q(this,"appClient");Q(this,"baseUrl");Q(this,"baseAuthConfig");Q(this,"cache",new Z);Q(this,"allowedInstallationOwners");this.allowedInstallationOwners=g.allowedInstallationOwners,this.baseUrl=C,this.baseAuthConfig={appId:g.appId,privateKey:g.privateKey.replace(/\\n/gm,`
|
|
31
|
+
`)},this.appClient=new Octokit({baseUrl:C,headers:D,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(g,C){var ie;const{installationId:w,suspended:V}=await this.getInstallationData(g);if(this.allowedInstallationOwners&&!((ie=this.allowedInstallationOwners)!=null&&ie.includes(g)))return{accessToken:void 0};if(V)throw new Error(`The GitHub application for ${g} is suspended`);const fe=C?`${g}/${C}`:g;return this.cache.getOrCreateToken(fe,async()=>{const De=await this.appClient.apps.createInstallationAccessToken({installation_id:w,headers:D});if(C&&De.data.repository_selection==="selected"){const nt=new Octokit({baseUrl:this.baseUrl,auth:De.data.token});if(!(await nt.paginate(nt.apps.listReposAccessibleToInstallation)).some(Ln=>Ln.name===C))throw new Error(`The Backstage GitHub application used in the ${g} organization does not have access to a repository with the name ${C}`)}return{token:De.data.token,expiresAt:DateTime.fromISO(De.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(g){const w=(await this.getInstallations()).find(fe=>{var ie,De;return((De=(ie=fe.account)==null?void 0:ie.login)==null?void 0:De.toLocaleLowerCase("en-US"))===g.toLocaleLowerCase("en-US")});if(w)return{installationId:w.id,suspended:Boolean(w.suspended_by)};const V=new Error(`No app installation found for ${g} in ${this.baseAuthConfig.appId}`);throw V.name="NotFoundError",V}}class ge{constructor(g){Q(this,"apps");var C,w;this.apps=(w=(C=g.apps)==null?void 0:C.map(V=>new re(V,g.apiBaseUrl)))!=null?w:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(C=>C.getInstallations()))).flat():[]}async getAppToken(g,C){if(this.apps.length===0)return;const w=await Promise.all(this.apps.map(De=>De.getInstallationCredentials(g,C).then(nt=>({credentials:nt,error:void 0}),nt=>({credentials:void 0,error:nt})))),V=w.find(De=>De.credentials);if(V)return V.credentials.accessToken;const ie=w.map(De=>De.error).find(De=>De.name!=="NotFoundError");if(ie)throw ie}}class Pe{constructor(g,C){this.githubAppCredentialsMux=g,this.token=C}async getCredentials(g){const C=parseGitUrl(g.url),w=C.owner||C.name,V=C.owner?C.name:void 0;let fe="app",ie=await this.githubAppCredentialsMux.getAppToken(w,V);return ie||(fe="token",ie=this.token),{headers:ie?{Authorization:`Bearer ${ie}`}:void 0,token:ie,type:fe}}}Q(Pe,"create",null);class pe{static fromIntegrations(g){const C=new Map;return g.github.list().forEach(w=>{const V=SingleInstanceGithubCredentialsProvider.create(w.config);C.set(w.config.host,V)}),new pe(C)}constructor(g){this.providers=g}async getCredentials(g){const C=new URL(g.url),w=this.providers.get(C.host);if(!w)throw new Error(`There is no GitHub integration that matches ${g.url}. Please add a configuration for an integration.`);return w.getCredentials(g)}}const Qt=class{constructor(g){this.integrationConfig=g}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){return Ze(a(g),"tree")}resolveEditUrl(g){return Ze(g,"edit")}};let we=Qt;Q(we,"factory",({config:g})=>{var w;const C=R((w=g.getOptionalConfigArray("integrations.github"))!=null?w:[]);return m(C.map(V=>new Qt(V)),V=>V.config.host)});function Ze(N,g){return N.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(C,w,V,fe)=>`//${w}/${V}/${fe}/${g}/`)}const qe="gitlab.com",At="https://gitlab.com/api/v4";function st(N){const g=N.getString("host");let C=N.getOptionalString("apiBaseUrl");const w=N.getOptionalString("token");let V=N.getOptionalString("baseUrl");if(C?C=(0,c.trimEnd)(C,"/"):g===qe&&(C=At),V?V=(0,c.trimEnd)(V,"/"):V=`https://${g}`,h(g)){if(!C||!v(C))throw new Error(`Invalid GitLab integration config, '${C}' is not a valid apiBaseUrl`);if(!v(V))throw new Error(`Invalid GitLab integration config, '${V}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${g}' is not a valid host`);return{host:g,token:w,apiBaseUrl:C,baseUrl:V}}function lt(N){const g=N.map(st);return g.some(C=>C.host===qe)||g.push({host:qe,apiBaseUrl:At,baseUrl:`https://${qe}`}),g}async function Mt(N,g){if(N.includes("/-/blob/")){const C=await ht(N,g);return Yt(N,C).toString()}return Rt(N).toString()}function ke(N){const{token:g=""}=N;return{headers:{"PRIVATE-TOKEN":g}}}function Rt(N){try{const g=new URL(N),[C,w,V,fe,...ie]=g.pathname.split("/");if(C!==""||w===""||V===""||fe!=="blob"||!ie.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return g.pathname=[C,w,V,"raw",...ie].join("/"),g}catch(g){throw new Error(`Incorrect url: ${N}, ${g}`)}}function Yt(N,g){try{const C=new URL(N),w=C.pathname.split("/-/blob/")[1],[V,...fe]=w.split("/");return C.pathname=["/api/v4/projects",g,"repository/files",encodeURIComponent(decodeURIComponent(fe.join("/"))),"raw"].join("/"),C.search=`?ref=${V}`,C}catch(C){throw new Error(`Incorrect url: ${N}, ${C}`)}}async function ht(N,g){const C=new URL(N);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],V=new URL(`${C.origin}/api/v4/projects/${encodeURIComponent(w.replace(/^\//,""))}`),fe=await fetch(V.toString(),ke(g)),ie=await fe.json();if(!fe.ok)throw new Error(`GitLab Error '${ie.error}', ${ie.error_description}`);return Number(ie.id)}catch(w){throw new Error(`Could not get GitLab project ID for: ${N}, ${w}`)}}const or=class{constructor(g){this.integrationConfig=g}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){return a(g)}resolveEditUrl(g){return Xe(g,"edit")}};let Qe=or;Q(Qe,"factory",({config:g})=>{var w;const C=lt((w=g.getOptionalConfigArray("integrations.gitlab"))!=null?w:[]);return m(C.map(V=>new or(V)),V=>V.config.host)});function Xe(N,g){return N.replace(/\/\-\/(blob|tree|edit)\//,`/-/${g}/`)}class Pt{constructor(g){Q(this,"byType");this.byType=g}static fromConfig(g){return new Pt({awsS3:u.factory({config:g}),azure:M.factory({config:g}),bitbucket:ue.factory({config:g}),bitbucketCloud:Ke.factory({config:g}),bitbucketServer:wt.factory({config:g}),gerrit:ae.factory({config:g}),github:we.factory({config:g}),gitlab:Qe.factory({config:g})})}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(g=>g.list())}byUrl(g){return Object.values(this.byType).map(C=>C.byUrl(g)).find(Boolean)}byHost(g){return Object.values(this.byType).map(C=>C.byHost(g)).find(Boolean)}resolveUrl(g){const C=this.byUrl(g.base);return C?C.resolveUrl(g):a(g)}resolveEditUrl(g){const C=this.byUrl(g);return C?C.resolveEditUrl(g):g}}},30294:function(q,i,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return v.plugin}});var t=e(2784),c=e(47093),h=e(10289),v=e(82250),m=e(47955),a=e(49208),s=e(36964),f=e(68099);const y=[(0,s.createApiFactory)({api:s.discoveryApiRef,deps:{configApi:s.configApiRef},factory:({configApi:H})=>a.UrlPatternDiscovery.compile(`${H.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,s.createApiFactory)({api:s.alertApiRef,deps:{},factory:()=>new a.AlertApiForwarder}),(0,s.createApiFactory)({api:s.analyticsApiRef,deps:{},factory:()=>new a.NoOpAnalyticsApi}),(0,s.createApiFactory)({api:s.errorApiRef,deps:{alertApi:s.alertApiRef},factory:({alertApi:H})=>{const ne=new a.ErrorAlerter(H,new a.ErrorApiForwarder);return a.UnhandledErrorForwarder.forward(ne,{hidden:!1}),ne}}),(0,s.createApiFactory)({api:s.storageApiRef,deps:{errorApi:s.errorApiRef},factory:({errorApi:H})=>a.WebStorage.create({errorApi:H})}),(0,s.createApiFactory)({api:s.fetchApiRef,deps:{configApi:s.configApiRef,identityApi:s.identityApiRef,discoveryApi:s.discoveryApiRef},factory:({configApi:H,identityApi:ne,discoveryApi:me})=>(0,a.createFetchApi)({middleware:[a.FetchMiddlewares.resolvePluginProtocol({discoveryApi:me}),a.FetchMiddlewares.injectIdentityAuth({identityApi:ne,config:H})]})}),(0,s.createApiFactory)({api:s.oauthRequestApiRef,deps:{},factory:()=>new a.OAuthRequestManager}),(0,s.createApiFactory)({api:s.googleAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:me})=>a.GoogleAuth.create({discoveryApi:H,oauthRequestApi:ne,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.microsoftAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:me})=>a.MicrosoftAuth.create({discoveryApi:H,oauthRequestApi:ne,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.githubAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:me})=>a.GithubAuth.create({discoveryApi:H,oauthRequestApi:ne,defaultScopes:["read:user"],environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oktaAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:me})=>a.OktaAuth.create({discoveryApi:H,oauthRequestApi:ne,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.gitlabAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:me})=>a.GitlabAuth.create({discoveryApi:H,oauthRequestApi:ne,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oneloginAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:me})=>a.OneLoginAuth.create({discoveryApi:H,oauthRequestApi:ne,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.bitbucketAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:me})=>a.BitbucketAuth.create({discoveryApi:H,oauthRequestApi:ne,defaultScopes:["team"],environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.atlassianAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:me})=>a.AtlassianAuth.create({discoveryApi:H,oauthRequestApi:ne,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:f.RV,deps:{discovery:s.discoveryApiRef,identity:s.identityApiRef,config:s.configApiRef},factory:({config:H,discovery:ne,identity:me})=>f.iM.create({config:H,discovery:ne,identity:me})})];var u=e(77277),A=e(9118),b=e(62833);function S({children:H}){return(0,h.GV)()?t.createElement(t.Fragment,null,H):t.createElement(h.VA,null,H)}const F=()=>t.createElement(A.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),_=({step:H,error:ne})=>{let me="";return H==="load-config"?me=`The configuration failed to load, someone should have a look at this error: ${ne.message}`:H==="load-chunk"&&(me=`Lazy loaded chunk failed to load, try to reload the page: ${ne.message}`),t.createElement(S,null,t.createElement(A.ErrorPage,{status:"501",statusMessage:me}))},M=({error:H,resetError:ne,plugin:me})=>t.createElement(A.ErrorPanel,{title:`Error in ${me==null?void 0:me.getId()}`,defaultExpanded:!0,error:H},t.createElement(u.Z,{variant:"outlined",onClick:ne},"Retry")),L={Progress:A.Progress,Router:b.VK,NotFoundErrorPage:F,BootErrorPage:_,ErrorBoundaryFallback:M};var $=e(43642),B=e(80079),x=e(90941),J=e(32915),te=e(40562),ve=e(21853),Ve=e(60744),We=e(66569),ue=e(30254),Ee=e(13384),Ie=e(15933),He=e(58838),Ye=e(86737),ot=e(4989),tt=e(44407),Ce=e(18628),Ne=e(84219),Ue=e(98685),pt=e(39781);const Ke={brokenImage:B.Z,catalog:Ce.Z,scaffolder:J.Z,techdocs:te.Z,search:ve.Z,chat:Ve.Z,dashboard:We.Z,docs:ue.Z,email:Ee.Z,github:He.Z,group:Ne.Z,help:Ye.Z,"kind:api":Ie.Z,"kind:component":tt.Z,"kind:domain":$.Z,"kind:group":Ne.Z,"kind:location":ot.Z,"kind:system":x.Z,"kind:user":Ue.Z,user:Ue.Z,warning:pt.Z};var Ft=e(28981),mt=e(98192),Bt=e(15222),Ht=e(41547),Ot=e(87561);const jt=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(Bt.Z,null),Provider:({children:H})=>t.createElement(Ht.Z,{theme:Ft.lightTheme},t.createElement(Ot.ZP,null,H))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(mt.Z,null),Provider:({children:H})=>t.createElement(Ht.Z,{theme:Ft.darkTheme},t.createElement(Ot.ZP,null,H))}];function Zt(H){var ne,me,Fe;return(0,a.createSpecializedApp)({...H,apis:(ne=H==null?void 0:H.apis)!=null?ne:[],bindRoutes:H==null?void 0:H.bindRoutes,components:{...L,...H==null?void 0:H.components},configLoader:H==null?void 0:H.configLoader,defaultApis:y,icons:{...Ke,...H==null?void 0:H.icons},plugins:(me=H==null?void 0:H.plugins)!=null?me:[],themes:(Fe=H==null?void 0:H.themes)!=null?Fe:jt})}var wt=e(82394),An=e.n(wt),Gt=e(48023),Et=e(76635);async function un({storageApi:H}){var yt;const ne=H.forBucket("settings"),me=H.forBucket("starredEntities"),Fe=ne.snapshot("starredEntities").value;if(!(0,Et.isArray)(Fe))return;const _e=new Set((yt=me.snapshot("entityRefs").value)!=null?yt:[]);Fe.filter(Et.isString).map(gt=>gt.split(":")).filter(gt=>gt.length===4&>[0]==="entity").map(([gt,ct,ft,xt])=>(0,Gt.eE)({kind:ct,namespace:ft,name:xt})).forEach(gt=>_e.add(gt)),await me.set("entityRefs",Array.from(_e)),await ne.remove("starredEntities")}class se{constructor(ne){Q(this,"settingsStore");Q(this,"starredEntities");Q(this,"subscribers",new Set);Q(this,"observable",new(An())(ne=>(ne.next(new Set(this.starredEntities)),this.subscribers.add(ne),()=>{this.subscribers.delete(ne)})));var me;un(ne).then(),this.settingsStore=ne.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((me=this.settingsStore.snapshot("entityRefs").value)!=null?me:[]),this.settingsStore.observe$("entityRefs").subscribe({next:Fe=>{var _e;this.starredEntities=new Set((_e=Fe.value)!=null?_e:[]),this.notifyChanges()}})}async toggleStarred(ne){this.starredEntities.has(ne)?this.starredEntities.delete(ne):this.starredEntities.add(ne),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const ne of this.subscribers)ne.next(new Set(this.starredEntities))}}var j=e(39398),ae=e(49782),le=e(79692);const ye=(0,le.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function Le(H){const ne=H.result,me=ye();return React.createElement(Link,{to:ne.location},React.createElement(ListItem,{alignItems:"flex-start",className:me.flexContainer},React.createElement(ListItemText,{className:me.itemText,primaryTypographyProps:{variant:"h6"},primary:ne.title,secondary:ne.text}),React.createElement(Box,null,ne.kind&&React.createElement(Chip,{label:`Kind: ${ne.kind}`,size:"small"}),ne.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${ne.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))}var Be=e(30097),Se=e(53479),je=e(95544),ut=e(99688),bt=e(12231),vt=e(86136),at=e(49378),Ct=e(85256),dt=e(61837),sn=e(79784),z=e(50758),R=e(49166),P=e(31654),ce=e(43054),de=e(40749);const Z="catalog-entity",D=(0,de.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:Z}),re=(0,de.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),ge=(0,de.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:Z}),Pe=(0,de.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:Z}),pe=(0,de.J$)({name:"catalog.location.read",attributes:{action:"read"}}),we=(0,de.J$)({name:"catalog.location.create",attributes:{action:"create"}}),Ze=(0,de.J$)({name:"catalog.location.delete",attributes:{action:"delete"}}),qe=(0,le.Z)({button:{color:"white"}});function At(H){var fr;const{UNSTABLE_extraContextMenuItems:ne,UNSTABLE_contextMenuOptions:me,onUnregisterEntity:Fe,onInspectEntity:_e}=H,[yt,gt]=(0,t.useState)(),ct=qe(),ft=(0,Se.useEntityPermission)(ge),xt=Fn=>{gt(Fn.currentTarget)},zt=()=>{gt(void 0)},yn=ne&&[...ne.map(Fn=>t.createElement(bt.Z,{key:Fn.title,onClick:()=>{zt(),Fn.onClick()}},t.createElement(vt.Z,null,t.createElement(Fn.Icon,{fontSize:"small"})),t.createElement(at.Z,{primary:Fn.title}))),t.createElement(Ct.Z,{key:"the divider is here!"})],gn=(fr=!ft.allowed||(me==null?void 0:me.disableUnregister))!=null?fr:!1;return t.createElement(t.Fragment,null,t.createElement(dt.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:xt,"data-testid":"menu-button",className:ct.button},t.createElement(ce.Z,null)),t.createElement(sn.ZP,{open:Boolean(yt),onClose:zt,anchorEl:yt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},t.createElement(z.Z,null,yn,t.createElement(bt.Z,{onClick:()=>{zt(),Fe()},disabled:gn},t.createElement(vt.Z,null,t.createElement(R.Z,{fontSize:"small"})),t.createElement(at.Z,{primary:"Unregister entity"})),t.createElement(bt.Z,{onClick:()=>{zt(),_e()}},t.createElement(vt.Z,null,t.createElement(P.Z,{fontSize:"small"})),t.createElement(at.Z,{primary:"Inspect entity"})))))}const st="plugin.catalog.entityLayoutRoute",lt=()=>null;(0,s.attachComponentData)(lt,st,!0),(0,s.attachComponentData)(lt,"core.gatherMountPoints",!0);function Mt(H){const{entity:ne,title:me}=H;return t.createElement(je.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(je.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},me),ne&&t.createElement(Se.FavoriteEntity,{entity:ne}))}function ke(H,ne,me,Fe){var ct,ft,xt,zt,yn;const _e=(ct=H!=null?H:Fe==null?void 0:Fe.kind)!=null?ct:"",yt=(ft=ne!=null?ne:Fe==null?void 0:Fe.metadata.namespace)!=null?ft:"";return{headerTitle:`${(yn=(zt=(xt=Fe==null?void 0:Fe.metadata.title)!=null?xt:me)!=null?zt:Fe==null?void 0:Fe.metadata.name)!=null?yn:""}${yt&&yt!==Gt.zG?` in ${yt}`:""}`,headerType:(()=>{let gn=_e.toLocaleLowerCase("en-US");return Fe&&Fe.spec&&"type"in Fe.spec&&(gn+=" \u2014 ",gn+=Fe.spec.type.toLocaleLowerCase("en-US")),gn})()}}function Rt(H){var Fe;const{entity:ne}=H,me=(0,Se.getEntityRelations)(ne,Gt.S4);return t.createElement(t.Fragment,null,me.length>0&&t.createElement(A.HeaderLabel,{label:"Owner",value:t.createElement(Se.EntityRefLinks,{entityRefs:me,defaultKind:"Group",color:"inherit"})}),((Fe=ne.spec)==null?void 0:Fe.lifecycle)&&t.createElement(A.HeaderLabel,{label:"Lifecycle",value:ne.spec.lifecycle}))}const Yt=H=>{var I,W,K;const{UNSTABLE_extraContextMenuItems:ne,UNSTABLE_contextMenuOptions:me,children:Fe}=H,{kind:_e,namespace:yt,name:gt}=(0,s.useRouteRefParams)(Se.entityRouteRef),{entity:ct,loading:ft,error:xt}=(0,Se.useAsyncEntity)(),zt=(0,h.TH)(),yn=(0,s.useElementFilter)(Fe,X=>X.selectByComponentData({key:st,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:Y})=>{if(ct){if(Y.if&&!Y.if(ct))return[]}else return[];return[{path:Y.path,title:Y.title,children:Y.children,tabProps:Y.tabProps}]}),[ct]),{headerTitle:gn,headerType:fr}=ke(_e,yt,gt,ct),[Fn,mr]=(0,t.useState)(!1),[jr,tr]=(0,t.useState)(!1),Gr=(0,h.s0)(),T=async()=>{mr(!1),tr(!1),Gr("/")};return(0,t.useEffect)(()=>{mr(!1),tr(!1)},[zt.pathname]),t.createElement(A.Page,{themeId:(K=(W=(I=ct==null?void 0:ct.spec)==null?void 0:I.type)==null?void 0:W.toString())!=null?K:"home"},t.createElement(A.Header,{title:t.createElement(Mt,{title:gn,entity:ct}),pageTitleOverride:gn,type:fr},ct&&t.createElement(t.Fragment,null,t.createElement(Rt,{entity:ct}),t.createElement(At,{UNSTABLE_extraContextMenuItems:ne,UNSTABLE_contextMenuOptions:me,onUnregisterEntity:()=>mr(!0),onInspectEntity:()=>tr(!0)}))),ft&&t.createElement(A.Progress,null),ct&&t.createElement(A.RoutedTabs,{routes:yn}),xt&&t.createElement(A.Content,null,t.createElement(ut.Z,{severity:"error"},xt.toString())),!ft&&!xt&&!ct&&t.createElement(A.Content,null,t.createElement(A.WarningPanel,{title:"Entity not found"},"There is no ",_e," with the requested"," ",t.createElement(A.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(Se.UnregisterEntityDialog,{open:Fn,entity:ct,onConfirm:T,onClose:()=>mr(!1)}),t.createElement(Se.InspectEntityDialog,{open:jr,entity:ct,onClose:()=>tr(!1)}))};Yt.Route=lt;var ht=e(10179);function Qe(H){const{open:ne,onClose:me,onConfirm:Fe,entity:_e}=H,[yt,gt]=useState(!1),ct=useApi(catalogApiRef),ft=useApi(alertApiRef),xt=async()=>{gt(!0);try{const zt=_e.metadata.uid;await ct.removeEntityByUid(zt),Fe()}catch(zt){assertError(zt),ft.post({message:zt.message})}finally{gt(!1)}};return React.createElement(Dialog,{open:ne,onClose:me},React.createElement(DialogTitle,{id:"responsive-dialog-title"},"Are you sure you want to delete this entity?"),React.createElement(DialogActions,null,React.createElement(Button,{variant:"contained",color:"secondary",disabled:yt,onClick:xt},"Delete"),React.createElement(Button,{onClick:me,color:"primary"},"Cancel")))}var Xe=e(47851);function Pt(H){var ne,me;return((me=(ne=H==null?void 0:H.metadata)==null?void 0:ne.annotations)==null?void 0:me["backstage.io/orphan"])==="true"}function qt(){const H=useNavigate(),ne=useRouteRef(rootRouteRef),[me,Fe]=useState(!1),{entity:_e}=useEntity(),yt=async()=>{Fe(!1),H(ne())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>Fe(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:me,entity:_e,onConfirm:yt,onClose:()=>Fe(!1)}))}var Wt=e(30001);const $t=H=>H.error&&H.level==="error"&&H.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function _t(H,ne){return{items:(await ne.getEntityAncestors({entityRef:H})).items.map(_e=>{var ct,ft;return{errors:((ft=(ct=_e.entity.status)==null?void 0:ct.items)!=null?ft:[]).filter($t).map(xt=>xt.error).filter(xt=>Boolean(xt)),entity:_e.entity}}).filter(_e=>_e.errors.length>0)}}async function rn(H,ne){const me=ne.apis.get(catalogApiRef);if(!me)throw new Error(`No implementation available for ${catalogApiRef}`);return(await _t(stringifyEntityRef(H),me)).items.length>0}function en(){const{entity:H}=useEntity(),ne=stringifyEntityRef(H),me=useApi(catalogApiRef),{loading:Fe,error:_e,value:yt}=useAsync(async()=>_t(ne,me),[ne,me]);return _e?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:_e})):Fe||!yt?null:React.createElement(React.Fragment,null,yt.items.map((gt,ct)=>React.createElement(Box,{key:ct,mb:1},stringifyEntityRef(H)!==stringifyEntityRef(gt.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:gt.entity})),gt.errors.map((ft,xt)=>React.createElement(ResponseErrorPanel,{key:xt,error:ft})))))}var Vt=e(64279);const Jt="core.backstage.entitySwitch",cn=H=>null;(0,s.attachComponentData)(cn,Jt,!0);const Nn=H=>{var gt,ct;const{entity:ne,loading:me}=(0,Se.useAsyncEntity)(),Fe=(0,s.useApiHolder)(),_e=(0,s.useElementFilter)(H.children,ft=>ft.selectByComponentData({key:Jt,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(xt=>{var gn;if(me)return[];const{if:zt,children:yn}=xt.props;return ne?[{if:(gn=zt==null?void 0:zt(ne,{apis:Fe}))!=null?gn:!0,children:yn}]:[{if:zt===void 0,children:yn}]}),[Fe,ne,me]);return _e.some(ft=>typeof ft.if=="object"&&"then"in ft.if)?t.createElement(Gn,{results:_e}):(ct=(gt=_e.find(ft=>ft.if))==null?void 0:gt.children)!=null?ct:null};function Gn({results:H}){const{loading:ne,value:me}=(0,Vt.default)(async()=>{var _e;const Fe=H.map(async({if:yt,children:gt})=>{try{if(await yt)return gt}catch{}return null});return(_e=(await Promise.all(Fe)).find(Boolean))!=null?_e:null},[H]);return ne||!me?null:me}Nn.Case=cn;const Jn=null,Qn=Se.CatalogFilterLayout.Filters,Xn=Se.CatalogFilterLayout.Content,Qt=(0,s.createPlugin)({id:"catalog",apis:[(0,s.createApiFactory)({api:Se.catalogApiRef,deps:{discoveryApi:s.discoveryApiRef,fetchApi:s.fetchApiRef},factory:({discoveryApi:H,fetchApi:ne})=>new Wt.MS({discoveryApi:H,fetchApi:ne})}),(0,s.createApiFactory)({api:Se.starredEntitiesApiRef,deps:{storageApi:s.storageApiRef},factory:({storageApi:H})=>new se({storageApi:H})})],routes:{catalogIndex:Xe._Z,catalogEntity:Se.entityRouteRef},externalRoutes:{createComponent:Xe.yw,viewTechDoc:Xe.jU}}),or=Qt.provide((0,s.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(H=>H.CatalogPage),mountPoint:Xe._Z})),N=Qt.provide((0,s.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(H=>H.CatalogEntityPage),mountPoint:Se.entityRouteRef})),g=Qt.provide((0,s.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(H=>H.AboutCard)}})),C=Qt.provide((0,s.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(H=>H.EntityLinksCard)}})),w=Qt.provide((0,s.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(H=>H.HasSystemsCard)}})),V=Qt.provide((0,s.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(H=>H.HasComponentsCard)}})),fe=Qt.provide((0,s.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(H=>H.HasSubcomponentsCard)}})),ie=Qt.provide((0,s.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(H=>H.HasResourcesCard)}})),De=Qt.provide((0,s.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(H=>H.DependsOnComponentsCard)}})),nt=Qt.provide((0,s.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(H=>H.DependencyOfComponentsCard)}})),Ut=Qt.provide((0,s.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(H=>H.DependsOnResourcesCard)}})),pn=Qt.provide((0,s.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(H=>H.RelatedEntitiesCard)}}));var Ln=e(36356);class yr{constructor({configApi:ne,discoveryApi:me,identityApi:Fe}){Q(this,"configApi");Q(this,"discoveryApi");Q(this,"identityApi");this.configApi=ne,this.discoveryApi=me,this.identityApi=Fe}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(ne,me){const _e=`${await this.getApiOrigin()}/${me}`,yt=await fetch(`${_e.endsWith("/")?_e:`${_e}/`}index.html`);if(yt.status===404)throw new Error("Page not found");return yt.text()}async syncEntityDocs(ne){return"cached"}async getBaseUrl(ne,me,Fe){const _e=await this.getApiOrigin();return new URL(ne,`${_e}/${Fe}`).toString()}}class ar{constructor({configApi:ne,discoveryApi:me,identityApi:Fe}){Q(this,"configApi");Q(this,"discoveryApi");Q(this,"identityApi");this.configApi=ne,this.discoveryApi=me,this.identityApi=Fe}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(ne){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(ne){return{site_name:"Live preview environment",site_description:""}}}const ir=[(0,s.createApiFactory)({api:v.techdocsStorageApiRef,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:H,discoveryApi:ne,identityApi:me})=>new yr({configApi:H,discoveryApi:ne,identityApi:me})}),(0,s.createApiFactory)({api:v.techdocsApiRef,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:H,discoveryApi:ne,identityApi:me})=>new ar({configApi:H,discoveryApi:ne,identityApi:me})}),(0,s.createApiFactory)({api:Ln.q3,deps:{configApi:s.configApiRef},factory:({configApi:H})=>Ln.ae.fromConfig(H)})],Pr={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Ir={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Lr(){const H=await fetch("/.detect");return H.ok?(await H.text()).trim()==="techdocs-cli-server":!1}async function Hn(){const H=await(0,a.defaultConfigLoader)(),ne=await Lr();return[...H,{context:"detected",data:ne?Pr:Ir}]}var Rn=e(86689),qn=e(58845);const _n=(0,le.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var xr=()=>{const H=_n();return t.createElement("svg",{className:H.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:H.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 sr=(0,le.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Dr=()=>{const H=sr();return t.createElement("svg",{className:H.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:H.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"}))};const cr=(0,le.Z)({root:{width:A.sidebarConfig.drawerWidthClosed,height:3*A.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:A.sidebarConfig.drawerWidthClosed,marginLeft:24}}),On=()=>{const H=cr(),{isOpen:ne}=(0,t.useContext)(A.SidebarContext);return t.createElement("div",{className:H.root},t.createElement(Rn.Z,{component:b.OL,to:"/docs/default/component/local/",underline:"none",className:H.link},ne?t.createElement(xr,null):t.createElement(Dr,null)))},lr=({children:H})=>t.createElement(A.SidebarPage,null,t.createElement(A.Sidebar,null,t.createElement(On,null),t.createElement(A.SidebarDivider,null),t.createElement(A.SidebarItem,{icon:qn.Z,to:"/docs/default/component/local",text:"Docs Preview"})),H);var er=e(80030),Er=e(32388),vr=e(4142);const Fr=(0,le.Z)(H=>({headerIcon:{color:H.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:H.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var xn;(function(H){const ne="light";H.LIGHT=ne;const me="dark";H.DARK=me})(xn||(xn={}));const ur=()=>{const H=(0,s.useApi)(s.appThemeApiRef),ne=Fr(),[me,Fe]=(0,t.useState)(H.getActiveThemeId()||xn.LIGHT),_e={[xn.LIGHT]:{icon:vr.Z,title:"Dark theme"},[xn.DARK]:{icon:Er.Z,title:"Light theme"}},{title:yt,icon:gt}=_e[me],ct=()=>{Fe(ft=>{const xt=ft===xn.LIGHT?xn.DARK:xn.LIGHT;return H.setActiveThemeId(xt),xt})};return t.createElement(je.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(er.ZP,{title:yt,arrow:!0},t.createElement(dt.Z,{size:"small",onClick:ct},t.createElement(gt,{className:ne.headerIcon}))))},Br=()=>t.createElement(v.TechDocsReaderPage,null,t.createElement(v.TechDocsReaderPageHeader,null),t.createElement(v.TechDocsReaderPageContent,{withSearch:!1})),wr=t.createElement(Br,null),dr=Zt({apis:ir,configLoader:Hn,plugins:Object.values(r)}),Mr=dr.getProvider(),Ar=dr.getRouter(),$r=v.techdocsPlugin.provide((0,m.KY)({name:"ThemeToggleAddon",component:ur,location:m.oZ.Header})),Rr=t.createElement(a.FlatRoutes,null,t.createElement(h.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(h.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(N,null)}),t.createElement(h.AW,{path:"/docs",element:t.createElement(v.TechDocsIndexPage,null)},t.createElement(v.DefaultTechDocsHome,null)),t.createElement(h.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(v.TechDocsReaderPage,null)},wr,t.createElement(m.DR,null,t.createElement($r,null))));var Dn=()=>t.createElement(Mr,null,t.createElement(Ar,null,t.createElement(lr,null,Rr)));c.render(t.createElement(Dn,null),document.getElementById("root"))},28981:function(q,i,e){"use strict";e.d(i,{darkTheme:function(){return b},lightTheme:function(){return A}});var r=e(73689),t=e(48032);const c={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")`},h={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 v(S,F){const M=`linear-gradient(90deg, ${(S.length===1?[S[0],S[0]]:S).join(", ")})`,L=`${F}, ${M}`;return{colors:S,shape:F,backgroundImage:L}}const m={home:v(h.teal,c.wave),documentation:v(h.pinkSea,c.wave2),tool:v(h.purpleSky,c.round),service:v(h.marineBlue,c.wave),website:v(h.veryBlue,c.wave),library:v(h.rubyRed,c.wave),other:v(h.darkGrey,c.wave),app:v(h.toastyOrange,c.wave),apis:v(h.teal,c.wave2)},a='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function s(S){const{palette:F,fontFamily:_=a,defaultPageTheme:M,pageTheme:L=m}=S;if(!L[M])throw new Error(`${M} is not defined in pageTheme.`);return{palette:F,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:_,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:L[M],getPageTheme:({themeId:$})=>{var B;return(B=L[$])!=null?B:L[M]}}}function f(S){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:S.typography.fontFamily},body:{height:"100%",fontFamily:S.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:S.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:S.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:S.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:S.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:S.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,t.darken)(S.palette.link,.3),background:(0,t.lighten)(S.palette.link,.95)},[S.breakpoints.up("md")]:{minWidth:120,fontSize:S.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:S.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:S.spacing(1),marginBottom:S.spacing(1),color:S.palette.grey[900]},outlined:{color:S.palette.text.primary},label:{lineHeight:`${S.spacing(2.5)}px`,fontWeight:S.typography.fontWeightMedium,fontSize:`${S.spacing(1.75)}px`},labelSmall:{fontSize:`${S.spacing(1.5)}px`},deleteIcon:{color:S.palette.grey[500],width:`${S.spacing(3)}px`,height:`${S.spacing(3)}px`,margin:`0 ${S.spacing(.75)}px 0 -${S.spacing(.75)}px`},deleteIconSmall:{width:`${S.spacing(2)}px`,height:`${S.spacing(2)}px`,margin:`0 ${S.spacing(.5)}px 0 -${S.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 y(S){const F=s(S),_=(0,r.Z)(F),M=f(_);return{..._,overrides:M}}var u=e(34505);const A=y({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:u.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:m}),b=y({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:u.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:m})},76241:function(q,i,e){"use strict";e.d(i,{CT:function(){return m},EI:function(){return f},uW:function(){return h},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 h(y,u){const A=c(y);let b=t[A];return b||(b=u(),t[A]=b,b)}var v=e(2784);function m(y){return h(y,()=>(0,v.createContext)(void 0))}function a(y){return(0,v.useContext)(m(y))}function s(y){return{set(u){globalThis[`__@backstage/${y}__`]=createContext(createVersionedValueMap(u))},reset(){delete globalThis[`__@backstage/${y}__`]}}}function f(y){return Object.freeze(y),{atVersion(u){return y[u]}}}},53479:function(q,i,e){"use strict";e.d(i,{AsyncEntityProvider:function(){return x},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return L},EntityKindFilter:function(){return ae},EntityLifecyclePicker:function(){return lt},EntityListProvider:function(){return Ft},EntityOwnerPicker:function(){return Yt},EntityRefLink:function(){return se},EntityRefLinks:function(){return j},EntityTable:function(){return $t},EntityTagPicker:function(){return Vt},EntityTypePicker:function(){return Nn},FavoriteEntity:function(){return or},InspectEntityDialog:function(){return yt},UnregisterEntityDialog:function(){return yn},UserListPicker:function(){return tr},catalogApiRef:function(){return c},entityRouteRef:function(){return wt},getEntityRelations:function(){return Ne},getEntitySourceLocation:function(){return Ue},humanizeEntityRef:function(){return Gt},starredEntitiesApiRef:function(){return h},useAsyncEntity:function(){return ve},useEntity:function(){return te},useEntityList:function(){return mt},useEntityOwnership:function(){return R},useEntityPermission:function(){return ce},useRelatedEntities:function(){return vt},useStarredEntities:function(){return dt}});var r=e(30001),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.catalog.service"}),h=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var v=e(82394);class m{constructor(){Q(this,"starredEntities",new Set);Q(this,"subscribers",new Set);Q(this,"observable",new ObservableImpl(I=>(I.next(new Set(this.starredEntities)),this.subscribers.add(I),()=>{this.subscribers.delete(I)})))}async toggleStarred(I){this.starredEntities.delete(I)||this.starredEntities.add(I);for(const W of this.subscribers)W.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var a=e(2784),s=e(41156),f=e(60364),y=e(77277),u=e(4190),A=e(95544),b=e(90436),S=e(60905),F=e(36444);const _=T=>{const I=(0,s.Z)(Y=>Y.breakpoints.down("md")),W=(0,f.Z)(),[K,X]=(0,a.useState)(!1);return I?a.createElement(a.Fragment,null,a.createElement(y.Z,{style:{marginTop:W.spacing(1),marginLeft:W.spacing(1)},onClick:()=>X(!0),startIcon:a.createElement(F.Z,null)},"Filters"),a.createElement(u.ZP,{open:K,onClose:()=>X(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},a.createElement(A.Z,{m:2},a.createElement(b.Z,{variant:"h6",component:"h2",style:{marginBottom:W.spacing(1)}},"Filters"),T.children))):a.createElement(S.Z,{item:!0,lg:2},T.children)},M=T=>a.createElement(S.Z,{item:!0,xs:12,lg:10},T.children),L=T=>a.createElement(S.Z,{container:!0,style:{position:"relative"}},T.children);L.Filters=_,L.Content=M;var $=e(76241);const B=(0,$.CT)("entity-context"),x=({children:T,entity:I,loading:W,error:K,refresh:X})=>{const Y={entity:I,loading:W,error:K,refresh:X};return a.createElement(B.Provider,{value:(0,$.EI)({1:Y})},T)},J=T=>React.createElement(x,{entity:T.entity,loading:!Boolean(T.entity),error:void 0,refresh:void 0,children:T.children});function te(){const T=(0,$.Vt)("entity-context");if(!T)throw new Error("Entity context is not available");const I=T.atVersion(1);if(!I)throw new Error("EntityContext v1 not available");if(!I.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:I.entity}}function ve(){const T=(0,$.Vt)("entity-context");if(!T)throw new Error("Entity context is not available");const I=T.atVersion(1);if(!I)throw new Error("EntityContext v1 not available");const{entity:W,loading:K,error:X,refresh:Y}=I;return{entity:W,loading:K,error:X,refresh:Y}}var Ve=e(76635),We=e(19126),ue=e.n(We),Ee=e(10289),Ie=e(69294),He=e(48760),Ye=e(90736);function ot(T){return T.reduce((I,W)=>({...I,...W.getCatalogFilters?W.getCatalogFilters():{}}),{})}function tt(T){return I=>T.every(W=>!W.filterEntity||W.filterEntity(I))}var Ce=e(48023);function Ne(T,I,W){var X;let K=((X=T==null?void 0:T.relations)==null?void 0:X.filter(Y=>Y.type===I).map(Y=>(0,Ce.of)(Y.targetRef)))||[];return W!=null&&W.kind&&(K=K.filter(Y=>Y.kind.toLocaleLowerCase("en-US")===W.kind.toLocaleLowerCase("en-US"))),K}function Ue(T,I){var K;const W=(K=T.metadata.annotations)==null?void 0:K[Ce.M6];if(!!W)try{const X=(0,Ce.Ou)(W),Y=I.byUrl(X.target);return{locationTargetUrl:X.target,integrationType:Y==null?void 0:Y.type}}catch{return}}function pt(T,I){const W=new Set([...getEntityRelations(T,RELATION_MEMBER_OF,{kind:"group"}),...T?[getCompoundEntityRef(T)]:[]].map(stringifyEntityRef)),K=getEntityRelations(I,RELATION_OWNED_BY).map(stringifyEntityRef);for(const X of K)if(W.has(X))return!0;return!1}const Ke=(0,a.createContext)(void 0),Ft=({children:T})=>{const I=(0,Ye.default)(),W=(0,t.useApi)(c),[K,X]=(0,a.useState)({}),Y=(0,Ee.TH)(),he=(0,a.useMemo)(()=>{var et;return(et=ue().parse(Y.search,{ignoreQueryPrefix:!0}).filters)!=null?et:{}},[Y]),[be,$e]=(0,a.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:Oe,error:xe},Me]=(0,Ie.default)(async()=>{var Sn;const et=(0,Ve.compact)(Object.values(K)),ze=tt(et),Nt=ot(et),tn=ot((0,Ve.compact)(Object.values(be.appliedFilters))),Vn=Object.keys(K).reduce((fn,En)=>{const Bn=K[En];return Bn!=null&&Bn.toQueryValue&&(fn[En]=Bn.toQueryValue()),fn},{});if((0,Ve.isEqual)(tn,Nt))$e({appliedFilters:K,backendEntities:be.backendEntities,entities:be.backendEntities.filter(ze)});else{const fn=await W.getEntities({filter:Nt});$e({appliedFilters:K,backendEntities:fn.items,entities:fn.items.filter(ze)})}if(I()){const fn=ue().parse(Y.search,{ignoreQueryPrefix:!0}),En=ue().stringify({...fn,filters:Vn},{addQueryPrefix:!0,arrayFormat:"repeat"}),Bn=`${window.location.pathname}${En}`;(Sn=window.history)==null||Sn.replaceState(null,document.title,Bn)}},[W,he,K,be],{loading:!0});(0,He.Z)(Me,10,[K]);const Ge=(0,a.useCallback)(et=>{X(ze=>{const Nt=typeof et=="function"?et(ze):et;return{...ze,...Nt}})},[]),St=(0,a.useMemo)(()=>({filters:be.appliedFilters,entities:be.entities,backendEntities:be.backendEntities,updateFilters:Ge,queryParameters:he,loading:Oe,error:xe}),[be,Ge,he,Oe,xe]);return a.createElement(Ke.Provider,{value:St},T)};function mt(){const T=(0,a.useContext)(Ke);if(!T)throw new Error("useEntityList must be used within EntityListProvider");return T}var Bt=e(64279),Ht=e(18149),Ot=e.n(Ht),jt=e(829),Zt=e.n(jt);const wt=(0,$.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function An(T){var I,W;return{kind:T.kind.toLocaleLowerCase("en-US"),namespace:(W=(I=T.metadata.namespace)==null?void 0:I.toLocaleLowerCase("en-US"))!=null?W:DEFAULT_NAMESPACE,name:T.metadata.name}}function Gt(T,I){const W=I==null?void 0:I.defaultKind;let K,X,Y;return"metadata"in T?(K=T.kind,X=T.metadata.namespace,Y=T.metadata.name):(K=T.kind,X=T.namespace,Y=T.name),X===Ce.zG&&(X=void 0),K=K.toLocaleLowerCase("en-US"),K=W&&W.toLocaleLowerCase("en-US")===K?void 0:K,`${K?`${K}:`:""}${X?`${X}/`:""}${Y}`}var Et=e(9118),un=e(80030);const se=(0,a.forwardRef)((T,I)=>{var et;const{entityRef:W,defaultKind:K,title:X,children:Y,...he}=T,be=(0,t.useRouteRef)(wt);let $e,Oe,xe;if(typeof W=="string"){const ze=(0,Ce.of)(W);$e=ze.kind,Oe=ze.namespace,xe=ze.name}else"metadata"in W?($e=W.kind,Oe=W.metadata.namespace,xe=W.metadata.name):($e=W.kind,Oe=W.namespace,xe=W.name);$e=$e.toLocaleLowerCase("en-US"),Oe=(et=Oe==null?void 0:Oe.toLocaleLowerCase("en-US"))!=null?et:Ce.zG;const Me={kind:$e,namespace:Oe,name:xe},Ge=Gt({kind:$e,namespace:Oe,name:xe},{defaultKind:K}),St=a.createElement(Et.Link,{...he,ref:I,to:be(Me)},Y,!Y&&(X!=null?X:Ge));return X?a.createElement(un.ZP,{title:Ge},St):St});function j(T){const{entityRefs:I,defaultKind:W,...K}=T;return a.createElement(a.Fragment,null,I.map((X,Y)=>a.createElement(a.Fragment,{key:Y},Y>0&&", ",a.createElement(se,{...K,entityRef:X,defaultKind:W}))))}class ae{constructor(I){this.value=I}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class le{constructor(I){this.value=I}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class ye{constructor(I){this.values=I}filterEntity(I){return this.values.every(W=>{var K;return((K=I.metadata.tags)!=null?K:[]).includes(W)})}toQueryValue(){return this.values}}class Le{constructor(I){this.value=I}filterEntity(I){var K;const W=this.value.toLocaleUpperCase("en-US");return I.metadata.name.toLocaleUpperCase("en-US").includes(W)||`${I.metadata.title}`.toLocaleUpperCase("en-US").includes(W)||((K=I.metadata.tags)==null?void 0:K.join("").toLocaleUpperCase("en-US").indexOf(W))!==-1}}class Be{constructor(I){this.values=I}filterEntity(I){return this.values.some(W=>Ne(I,Ce.S4).some(K=>Gt(K,{defaultKind:"group"})===W))}toQueryValue(){return this.values}}class Se{constructor(I){this.values=I}filterEntity(I){return this.values.some(W=>{var K;return((K=I.spec)==null?void 0:K.lifecycle)===W})}toQueryValue(){return this.values}}class je{constructor(I,W,K){this.value=I,this.isOwnedEntity=W,this.isStarredEntity=K}filterEntity(I){switch(this.value){case"owned":return this.isOwnedEntity(I);case"starred":return this.isStarredEntity(I);default:return!0}}toQueryValue(){return this.value}}function ut(){var ze;const T=(0,t.useApi)(c),{filters:{kind:I,type:W},queryParameters:{type:K},updateFilters:X}=mt(),Y=(0,a.useMemo)(()=>[K].flat().filter(Boolean),[K]),[he,be]=(0,a.useState)(Y.length?Y:(ze=W==null?void 0:W.getTypes())!=null?ze:[]);(0,a.useEffect)(()=>{Y.length&&be(Y)},[Y]);const[$e,Oe]=(0,a.useState)([]),xe=(0,a.useMemo)(()=>I==null?void 0:I.value,[I]),{error:Me,loading:Ge,value:St}=(0,Bt.default)(async()=>xe?await T.getEntityFacets({filter:{kind:xe},facets:["spec.type"]}).then(tn=>tn.facets["spec.type"]||[]):[],[xe,T]),et=(0,a.useRef)(St);return(0,a.useEffect)(()=>{const Nt=et.current;if(et.current=St,Ge||!xe||Nt===St||!St)return;const tn=Zt()(St,Sn=>-Sn.count).map(Sn=>Sn.value);Oe(tn);const Vn=he.filter(Sn=>tn.includes(Sn));Ot()(he,Vn)||be(Vn)},[Ge,xe,he,be,St]),(0,a.useEffect)(()=>{X({type:he.length?new le(he):void 0})},[he,X]),{loading:Ge,error:Me,availableTypes:$e,selectedTypes:he,setSelectedTypes:be}}const bt=20;function vt(T,I){var $e,Oe;const W=($e=I==null?void 0:I.type)==null?void 0:$e.toLocaleLowerCase("en-US"),K=(Oe=I==null?void 0:I.kind)==null?void 0:Oe.toLocaleLowerCase("en-US"),X=(0,t.useApi)(c),{loading:Y,value:he,error:be}=(0,Bt.default)(async()=>{var et;const xe=(et=T.relations)==null?void 0:et.map(ze=>({type:ze.type,target:(0,Ce.of)(ze.targetRef)})).filter(ze=>(!W||ze.type.toLocaleLowerCase("en-US")===W)&&(!K||ze.target.kind===K));if(!xe)return[];const Me=Object.values((0,Ve.groupBy)(xe,({target:ze})=>`${ze.kind}:${ze.namespace}`.toLocaleLowerCase("en-US"))),Ge=[];for(const ze of Me)Ge.push({kind:ze[0].target.kind,namespace:ze[0].target.namespace,nameBatches:(0,Ve.chunk)(ze.map(Nt=>Nt.target.name),bt)});return(await Promise.all(Ge.flatMap(ze=>ze.nameBatches.map(Nt=>X.getEntities({filter:{kind:ze.kind,"metadata.namespace":ze.namespace,"metadata.name":Nt}}))))).flatMap(ze=>ze.items)},[T,W,K]);return{entities:he,loading:Y,error:be}}var at=e(72164);function Ct(T){return typeof T=="string"?T:(0,Ce.eE)(T)}function dt(){const T=(0,t.useApi)(h),I=(0,at.Z)(T.starredEntitie$(),new Set),W=(0,a.useCallback)(X=>I.has(Ct(X)),[I]),K=(0,a.useCallback)(X=>T.toggleStarred(Ct(X)).then(),[T]);return{starredEntities:I,toggleStarredEntity:K,isStarredEntity:W}}function sn(T){return typeof T=="string"?T:(0,Ce.eE)(T)}function z(T){const I=(0,t.useApi)(h),[W,K]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{const Y=I.starredEntitie$().subscribe({next(he){K(he.has(sn(T)))}});return()=>{Y.unsubscribe()}},[T,I]),{toggleStarredEntity:(0,a.useCallback)(()=>I.toggleStarred(sn(T)).then(),[T,I]),isStarredEntity:W}}function R(){const T=(0,t.useApi)(t.identityApiRef),{loading:I,value:W}=(0,Bt.default)(async()=>{const{ownershipEntityRefs:X}=await T.getBackstageIdentity();return X},[]),K=(0,a.useMemo)(()=>{const X=new Set(W!=null?W:[]);return Y=>{const he=Ne(Y,Ce.S4).map(Ce.eE);for(const be of he)if(X.has(be))return!0;return!1}},[W]);return(0,a.useMemo)(()=>({loading:I,isOwnedEntity:K}),[I,K])}var P=e(68099);function ce(T){const{entity:I,loading:W,error:K}=ve(),{allowed:X,loading:Y,error:he}=(0,P.gI)({permission:T,resourceRef:I?(0,Ce.eE)(I):void 0});return W||Y?{loading:!0,allowed:!1}:K?{loading:!1,allowed:!1,error:K}:{loading:!1,allowed:X,error:he}}const de=T=>{var he;const{initialFilter:I,hidden:W}=T,{updateFilters:K,queryParameters:{kind:X}}=useEntityList(),[Y]=useState((he=[X].flat()[0])!=null?he:I);return useEffect(()=>{K({kind:Y?new EntityKindFilter(Y):void 0})},[Y,K]),W?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var Z=e(79692),D=e(5806),re=e(21324),ge=e(86619),Pe=e(19996),pe=e(25505),we=e(38016),Ze=e(88013);const qe=(0,Z.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),At=a.createElement(pe.Z,{fontSize:"small"}),st=a.createElement(Pe.Z,{fontSize:"small"}),lt=()=>{var Oe,xe;const T=qe(),{updateFilters:I,backendEntities:W,filters:K,queryParameters:{lifecycles:X}}=mt(),Y=(0,a.useMemo)(()=>[X].flat().filter(Boolean),[X]),[he,be]=(0,a.useState)(Y.length?Y:(xe=(Oe=K.lifecycles)==null?void 0:Oe.values)!=null?xe:[]);(0,a.useEffect)(()=>{Y.length&&be(Y)},[Y]),(0,a.useEffect)(()=>{I({lifecycles:he.length?new Se(he):void 0})},[he,I]);const $e=(0,a.useMemo)(()=>[...new Set(W.map(Me=>{var Ge;return(Ge=Me.spec)==null?void 0:Ge.lifecycle}).filter(Boolean))].sort(),[W]);return $e.length?a.createElement(A.Z,{pb:1,pt:1},a.createElement(b.Z,{variant:"button"},"Lifecycle"),a.createElement(Ze.ZP,{"aria-label":"Lifecycle",multiple:!0,options:$e,value:he,onChange:(Me,Ge)=>be(Ge),renderOption:(Me,{selected:Ge})=>a.createElement(D.Z,{control:a.createElement(re.Z,{icon:At,checkedIcon:st,checked:Ge}),label:Me}),size:"small",popupIcon:a.createElement(we.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:Me=>a.createElement(ge.Z,{...Me,className:T.input,variant:"outlined"})})):null},Mt=(0,Z.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),ke=a.createElement(pe.Z,{fontSize:"small"}),Rt=a.createElement(Pe.Z,{fontSize:"small"}),Yt=()=>{var Oe,xe;const T=Mt(),{updateFilters:I,backendEntities:W,filters:K,queryParameters:{owners:X}}=mt(),Y=(0,a.useMemo)(()=>[X].flat().filter(Boolean),[X]),[he,be]=(0,a.useState)(Y.length?Y:(xe=(Oe=K.owners)==null?void 0:Oe.values)!=null?xe:[]);(0,a.useEffect)(()=>{Y.length&&be(Y)},[Y]),(0,a.useEffect)(()=>{I({owners:he.length?new Be(he):void 0})},[he,I]);const $e=(0,a.useMemo)(()=>[...new Set(W.flatMap(Me=>Ne(Me,Ce.S4).map(Ge=>Gt(Ge,{defaultKind:"group"}))).filter(Boolean))].sort(),[W]);return $e.length?a.createElement(A.Z,{pb:1,pt:1},a.createElement(b.Z,{variant:"button"},"Owner"),a.createElement(Ze.ZP,{multiple:!0,"aria-label":"Owner",options:$e,value:he,onChange:(Me,Ge)=>be(Ge),renderOption:(Me,{selected:Ge})=>a.createElement(D.Z,{control:a.createElement(re.Z,{icon:ke,checkedIcon:Rt,checked:Ge}),label:Me}),size:"small",popupIcon:a.createElement(we.Z,{"data-testid":"owner-picker-expand"}),renderInput:Me=>a.createElement(ge.Z,{...Me,className:T.input,variant:"outlined"})})):null},ht=(0,Z.Z)(T=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),Qe=()=>{var Y,he;const T=ht(),{filters:I,updateFilters:W}=useEntityList(),[K,X]=useState((he=(Y=I.text)==null?void 0:Y.value)!=null?he:"");return useDebounce(()=>{W({text:K.length?new EntityTextFilter(K):void 0})},250,[K,W]),React.createElement(Toolbar,{className:T.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:T.input,placeholder:"Search",autoComplete:"off",onChange:be=>X(be.target.value),value:K,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>X(""),edge:"end",disabled:K.length===0},React.createElement(Clear,null)))})))},Xe=Object.freeze({createEntityRefColumn(T){const{defaultKind:I}=T;function W(K){var X;return((X=K.metadata)==null?void 0:X.title)||Gt(K,{defaultKind:I})}return{title:"Name",highlight:!0,customFilterAndSearch(K,X){return W(X).includes(K)},customSort(K,X){return W(K).localeCompare(W(X))},render:K=>{var X;return a.createElement(se,{entityRef:K,defaultKind:I,title:(X=K.metadata)==null?void 0:X.title})}}},createEntityRelationColumn({title:T,relation:I,defaultKind:W,filter:K}){function X(he){return Ne(he,I,K)}function Y(he){return X(he).map(be=>Gt(be,{defaultKind:W})).join(", ")}return{title:T,customFilterAndSearch(he,be){return Y(be).includes(he)},customSort(he,be){return Y(he).localeCompare(Y(be))},render:he=>a.createElement(j,{entityRefs:X(he),defaultKind:W})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:Ce.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:Ce.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:Ce.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:T=>a.createElement(Et.OverflowTooltip,{text:T.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),Pt=[Xe.createEntityRefColumn({defaultKind:"system"}),Xe.createDomainColumn(),Xe.createOwnerColumn(),Xe.createMetadataDescriptionColumn()],qt=[Xe.createEntityRefColumn({defaultKind:"component"}),Xe.createSystemColumn(),Xe.createOwnerColumn(),Xe.createSpecTypeColumn(),Xe.createSpecLifecycleColumn(),Xe.createMetadataDescriptionColumn()],Wt=(0,Z.Z)(T=>({empty:{padding:T.spacing(2),display:"flex",justifyContent:"center"}})),$t=T=>{const{entities:I,title:W,emptyContent:K,variant:X="gridItem",columns:Y}=T,he=Wt(),be={minWidth:"0",width:"100%"};return X==="gridItem"&&(be.height="calc(100% - 10px)"),a.createElement(Et.Table,{columns:Y,title:W,style:be,emptyContent:K&&a.createElement("div",{className:he.empty},K),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:I})};$t.columns=Xe,$t.systemEntityColumns=Pt,$t.componentEntityColumns=qt;const _t=(0,Z.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),rn=a.createElement(pe.Z,{fontSize:"small"}),en=a.createElement(Pe.Z,{fontSize:"small"}),Vt=()=>{var Oe,xe;const T=_t(),{updateFilters:I,filters:W,queryParameters:{tags:K}}=mt(),X=(0,t.useApi)(c),{value:Y}=(0,Bt.default)(async()=>{var St;const Me="metadata.tags",{facets:Ge}=await X.getEntityFacets({facets:[Me],filter:(St=W.kind)==null?void 0:St.getCatalogFilters()});return Ge[Me].map(({value:et})=>et)},[W.kind]),he=(0,a.useMemo)(()=>[K].flat().filter(Boolean),[K]),[be,$e]=(0,a.useState)(he.length?he:(xe=(Oe=W.tags)==null?void 0:Oe.values)!=null?xe:[]);return(0,a.useEffect)(()=>{he.length&&$e(he)},[he]),(0,a.useEffect)(()=>{I({tags:be.length?new ye(be):void 0})},[be,I]),Y!=null&&Y.length?a.createElement(A.Z,{pb:1,pt:1},a.createElement(b.Z,{variant:"button"},"Tags"),a.createElement(Ze.ZP,{multiple:!0,"aria-label":"Tags",options:Y,value:be,onChange:(Me,Ge)=>$e(Ge),renderOption:(Me,{selected:Ge})=>a.createElement(D.Z,{control:a.createElement(re.Z,{icon:rn,checkedIcon:en,checked:Ge}),label:Me}),size:"small",popupIcon:a.createElement(we.Z,{"data-testid":"tag-picker-expand"}),renderInput:Me=>a.createElement(ge.Z,{...Me,className:T.input,variant:"outlined"})})):null};var Jt=e(82108),cn=e.n(Jt);const Nn=T=>{var Oe;const{hidden:I,initialFilter:W}=T,K=(0,t.useApi)(t.alertApiRef),{error:X,availableTypes:Y,selectedTypes:he,setSelectedTypes:be}=ut();if((0,a.useEffect)(()=>{X&&K.post({message:"Failed to load entity types",severity:"error"}),W&&be([W])},[X,K,W,be]),Y.length===0||X)return null;const $e=[{value:"all",label:"All"},...Y.map(xe=>({value:xe,label:cn()(xe)}))];return I?null:a.createElement(A.Z,{pb:1,pt:1},a.createElement(Et.Select,{label:"Type",items:$e,selected:(Oe=$e.length>1?he[0]:void 0)!=null?Oe:"all",onChange:xe=>be(xe==="all"?[]:[String(xe)])}))};var Gn=e(15459),Jn=e(61837),Qn=e(11640),Xn=e(28347);const Qt=(0,Gn.Z)({root:{color:"#f3ba37"}})(Qn.Z),or=T=>{const{toggleStarredEntity:I,isStarredEntity:W}=z(T.entity);return a.createElement(Jn.Z,{"aria-label":"favorite",color:"inherit",...T,onClick:()=>I()},a.createElement(un.ZP,{title:W?"Remove from favorites":"Add to favorites"},W?a.createElement(Qt,null):a.createElement(Xn.Z,null)))};var N=e(8629),g=e(79249),C=e(38724),w=e(99152),V=e(6487),fe=e(49429),ie=e(55999),De=e(72779),nt=e.n(De),Ut=e(39412);const pn=Ut.Z;function Ln(T,I){if(T)return T.toLocaleLowerCase("en-US");if(I)try{return(0,Ce.of)(I).kind.toLocaleLowerCase("en-US")}catch{return}}function yr(T,I){const W=(0,t.useApp)(),K=Ln(T,I);return K&&W.getSystemIcon(`kind:${K}`)||pn}function ar(T){const{kind:I,entityRef:W,...K}=T,X=yr(I,W);return a.createElement(X,{...K})}const ir=(0,Z.Z)(T=>({node:{fill:T.palette.grey[300],stroke:T.palette.grey[300],"&.primary":{fill:T.palette.primary.light,stroke:T.palette.primary.light},"&.secondary":{fill:T.palette.secondary.light,stroke:T.palette.secondary.light}},text:{fill:T.palette.getContrastText(T.palette.grey[300]),"&.primary":{fill:T.palette.primary.contrastText},"&.secondary":{fill:T.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function Pr(T){const I=(0,t.useApi)(c),W=(0,Ce.eE)(T),{loading:K,error:X,value:Y}=(0,Bt.default)(async()=>{const he=await I.getEntityAncestors({entityRef:W}),be=new Array,$e=new Array;for(const Oe of he.items){const xe=(0,Ce.eE)(Oe.entity),Me=xe===he.rootEntityRef;be.push({id:xe,root:Me,...Oe.entity});for(const Ge of Oe.parentEntityRefs)$e.push({from:xe,to:Ge})}return{nodes:be,edges:$e}},[W]);return{loading:K,error:X,nodes:(Y==null?void 0:Y.nodes)||[],edges:(Y==null?void 0:Y.edges)||[]}}function Ir({node:T}){const I=ir(),W=(0,Ee.s0)(),K=(0,t.useRouteRef)(wt),[X,Y]=(0,a.useState)(0),[he,be]=(0,a.useState)(0),$e=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{if($e.current){let{height:Nt,width:tn}=$e.current.getBBox();Nt=Math.round(Nt),tn=Math.round(tn),(Nt!==he||tn!==X)&&(Y(tn),be(Nt))}},[X,he]);const Oe=10,xe=he,Me=xe+Oe,Ge=Me+X+Oe*2,St=he+Oe*2,et=T.metadata.title||(T.kind&&T.metadata.name&&T.metadata.namespace?Gt({kind:T.kind,name:T.metadata.name,namespace:T.metadata.namespace||""}):T.id),ze=()=>{W(K({kind:T.kind,namespace:T.metadata.namespace||Ce.zG,name:T.metadata.name}))};return a.createElement("g",{onClick:ze,className:I.clickable},a.createElement("rect",{className:nt()(I.node,T.root?"secondary":"primary"),width:Ge,height:St,rx:10}),a.createElement(ar,{kind:T.kind,y:Oe,x:Oe,width:xe,height:xe,className:nt()(I.text,T.root?"secondary":"primary")}),a.createElement("text",{ref:$e,className:nt()(I.text,T.root?"secondary":"primary"),y:St/2,x:Me+(X+Oe*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},et))}function Lr(T){const{loading:I,error:W,nodes:K,edges:X}=Pr(T.entity);return I?a.createElement(Et.Progress,null):W?a.createElement(Et.ResponseErrorPanel,{error:W}):a.createElement(a.Fragment,null,a.createElement(ie.Z,{variant:"h2"},"Ancestry"),a.createElement(ie.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(Et.Link,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity"},"processors emitted")," ","child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations."),a.createElement(A.Z,{mt:4},a.createElement(Et.DependencyGraph,{nodes:K,edges:X,renderNode:Ir,direction:Et.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var Hn=e(11776),Rn=e(38402),qn=e(86136),_n=e(99688),Or=e(49378),xr=e(54506),sr=e(94339),to=e(24579),Dr=e(27685);const cr=(0,Z.Z)(T=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:T.spacing(2)},helpIcon:{marginLeft:T.spacing(1),color:T.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function On(T){const I=cr();return a.createElement(Or.Z,{...T,primaryTypographyProps:{className:I.monospace},secondaryTypographyProps:{className:I.monospace}})}function lr(T){const I=cr();return a.createElement(xr.Z,{className:I.monospace},T.children)}function er(T){return a.createElement(A.Z,{mt:2},a.createElement(sr.Z,{variant:"outlined"},a.createElement(to.Z,null,a.createElement(b.Z,{variant:"h6",gutterBottom:!0},T.title,T.helpLink&&a.createElement(vr,{to:T.helpLink})),T.children)))}function Er(T){const[I,W]=T.entry;return a.createElement(Rn.Z,null,T.indent&&a.createElement(qn.Z,null),a.createElement(On,{primary:I,secondary:W.match(/^url:https?:\/\//)?a.createElement(a.Fragment,null,W.substring(0,4),a.createElement(Et.Link,{to:W.substring(4)},W.substring(4))):W}))}function vr(T){const I=cr();return a.createElement(Et.Link,{to:T.to,className:I.helpIcon},a.createElement(Dr.Z,{fontSize:"inherit"}))}const Fr=(0,Z.Z)({root:{display:"flex",flexDirection:"column"}});function xn(T){var $e,Oe;const I=(0,t.useApi)(c),W=(0,Ce.eE)(T),K=($e=T.metadata.annotations)==null?void 0:$e[Ce.P1],X=(Oe=T.metadata.annotations)==null?void 0:Oe[Ce.q1],{loading:Y,error:he,value:be}=(0,Bt.default)(async()=>!K&&!X?[]:(await I.getEntities({filter:[...K?[{[`metadata.annotations.${Ce.P1}`]:K}]:[],...X?[{[`metadata.annotations.${Ce.q1}`]:X}]:[]]})).items,[K,X]);return{loading:Y,error:he,location:K,originLocation:X,colocatedEntities:be==null?void 0:be.filter(xe=>(0,Ce.eE)(xe)!==W)}}function ur(T){return a.createElement(Hn.Z,{dense:!0},T.header&&a.createElement(Er,{key:"header",entry:T.header}),T.entities.map(I=>a.createElement(Rn.Z,{key:(0,Ce.eE)(I)},a.createElement(qn.Z,null,a.createElement(ar,{kind:I.kind})),a.createElement(On,{primary:a.createElement(se,{entityRef:I})}))))}function Br(T){const{entity:I}=T,{loading:W,error:K,location:X,originLocation:Y,colocatedEntities:he}=xn(I);if(W)return a.createElement(Et.Progress,null);if(K)return a.createElement(Et.ResponseErrorPanel,{error:K});if(!X&&!Y)return a.createElement(_n.Z,{severity:"warning"},"Entity had no location information.");if(!(he!=null&&he.length))return a.createElement(_n.Z,{severity:"info"},"There were no other entities on this location.");if(X===Y)return a.createElement(ur,{entities:he});const be=he.filter(Oe=>{var xe;return((xe=Oe.metadata.annotations)==null?void 0:xe[Ce.P1])===X}),$e=he.filter(Oe=>{var xe;return((xe=Oe.metadata.annotations)==null?void 0:xe[Ce.q1])===Y});return a.createElement(a.Fragment,null,be.length>0&&a.createElement(ur,{entities:be,header:["At the same location",X]}),$e.length>0&&a.createElement(ur,{entities:$e,header:["At the same origin",Y]}))}function wr(T){const I=Fr();return a.createElement(a.Fragment,null,a.createElement(ie.Z,{variant:"h2"},"Colocated"),a.createElement(ie.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:I.root},a.createElement(Br,{entity:T.entity})))}function dr(T){return Object.fromEntries([...Object.entries(T)].sort((I,W)=>I[0]<W[0]?-1:1))}function Mr(T){return a.createElement(a.Fragment,null,a.createElement(ie.Z,{variant:"h2"},"Entity as JSON"),a.createElement(ie.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),a.createElement(ie.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(Et.CodeSnippet,{text:JSON.stringify(dr(T.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var Ar=e(3440),$r=e.n(Ar);const Rr=(0,Z.Z)({root:{display:"flex",flexDirection:"column"}});function dn(T){var Oe,xe;const I=Rr(),{apiVersion:W,kind:K,metadata:X,spec:Y,relations:he=[],status:be={}}=T.entity,$e=$r()(Zt()(he,Me=>Me.targetRef),"type");return a.createElement(a.Fragment,null,a.createElement(ie.Z,{variant:"h2"},"Overview"),a.createElement("div",{className:I.root},a.createElement(er,{title:"Identity"},a.createElement(Hn.Z,{dense:!0},a.createElement(Rn.Z,null,a.createElement(On,{primary:"apiVersion",secondary:W})),a.createElement(Rn.Z,null,a.createElement(On,{primary:"kind",secondary:K})),(Y==null?void 0:Y.type)&&a.createElement(Rn.Z,null,a.createElement(On,{primary:"spec.type",secondary:Y.type})),X.uid&&a.createElement(Rn.Z,null,a.createElement(On,{primary:"uid",secondary:X.uid})),X.etag&&a.createElement(Rn.Z,null,a.createElement(On,{primary:"etag",secondary:X.etag})))),a.createElement(er,{title:"Metadata"},!!Object.keys(X.annotations||{}).length&&a.createElement(Hn.Z,{dense:!0,subheader:a.createElement(lr,null,"Annotations",a.createElement(vr,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(X.annotations).map(Me=>a.createElement(Er,{key:Me[0],indent:!0,entry:Me}))),!!Object.keys(X.labels||{}).length&&a.createElement(Hn.Z,{dense:!0,subheader:a.createElement(lr,null,"Labels")},Object.entries(X.labels).map(Me=>a.createElement(Er,{key:Me[0],indent:!0,entry:Me}))),!!((Oe=X.tags)!=null&&Oe.length)&&a.createElement(Hn.Z,{dense:!0,subheader:a.createElement(lr,null,"Tags")},X.tags.map((Me,Ge)=>a.createElement(Rn.Z,{key:`${Me}-${Ge}`},a.createElement(qn.Z,null),a.createElement(On,{primary:Me}))))),!!he.length&&a.createElement(er,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries($e).map(([Me,Ge],St)=>a.createElement("div",{key:St},a.createElement(Hn.Z,{dense:!0,subheader:a.createElement(lr,null,Me)},Ge.map(et=>a.createElement(Rn.Z,{key:et.targetRef},a.createElement(qn.Z,null,a.createElement(ar,{entityRef:et.targetRef})),a.createElement(On,{primary:a.createElement(se,{entityRef:et.targetRef})}))))))),!!((xe=be.items)!=null&&xe.length)&&a.createElement(er,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},be.items.map((Me,Ge)=>a.createElement("div",{key:Ge},a.createElement(b.Z,null,Me.level,": ",Me.type),a.createElement(A.Z,{ml:2},Me.message))))))}var Dn=e(60155),H=e.n(Dn);function ne(T){return a.createElement(a.Fragment,null,a.createElement(ie.Z,{variant:"h2"},"Entity as YAML"),a.createElement(ie.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),a.createElement(ie.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(Et.CodeSnippet,{text:H().stringify(dr(T.entity)),language:"yaml",showCopyCodeButton:!0}))))}const me=(0,Z.Z)(T=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:T.palette.background.paper},tabs:{borderRight:`1px solid ${T.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function Fe(T){const{children:I,value:W,index:K,...X}=T,Y=me();return a.createElement("div",{role:"tabpanel",hidden:W!==K,id:`vertical-tabpanel-${K}`,"aria-labelledby":`vertical-tab-${K}`,className:Y.tabContents,...X},W===K&&a.createElement(A.Z,{pl:3,pr:3},I))}function _e(T){return{id:`vertical-tab-${T}`,"aria-controls":`vertical-tabpanel-${T}`}}function yt(T){const I=me(),[W,K]=a.useState(0);return(0,a.useEffect)(()=>{K(0)},[T.open]),T.entity?a.createElement(N.Z,{fullWidth:!0,maxWidth:"xl",open:T.open,onClose:T.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:I.fullHeightDialog}},a.createElement(g.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),a.createElement(C.Z,{dividers:!0},a.createElement("div",{className:I.root},a.createElement(w.Z,{orientation:"vertical",variant:"scrollable",value:W,onChange:(X,Y)=>K(Y),"aria-label":"Inspector options",className:I.tabs},a.createElement(V.Z,{label:"Overview",..._e(0)}),a.createElement(V.Z,{label:"Ancestry",..._e(1)}),a.createElement(V.Z,{label:"Colocated",..._e(2)}),a.createElement(V.Z,{label:"Raw JSON",..._e(3)}),a.createElement(V.Z,{label:"Raw YAML",..._e(4)})),a.createElement(Fe,{value:W,index:0},a.createElement(dn,{entity:T.entity})),a.createElement(Fe,{value:W,index:1},a.createElement(Lr,{entity:T.entity})),a.createElement(Fe,{value:W,index:2},a.createElement(wr,{entity:T.entity})),a.createElement(Fe,{value:W,index:3},a.createElement(Mr,{entity:T.entity})),a.createElement(Fe,{value:W,index:4},a.createElement(ne,{entity:T.entity})))),a.createElement(fe.Z,null,a.createElement(y.Z,{onClick:T.onClose,color:"primary"},"Close"))):null}var gt=e(85256);function ct(T){var St;const I=(0,t.useApi)(c),W=(St=T.metadata.annotations)==null?void 0:St[Ce.q1],K=T.metadata.uid,X=W==="bootstrap:bootstrap",Y=(0,Bt.default)(async()=>{const et=I.getLocationByRef(W);let ze;if(!W)ze=Promise.resolve([]);else{const Nt=`metadata.annotations.${Ce.q1}`;ze=I.getEntities({filter:{[Nt]:W},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(tn=>tn.items)}return Promise.all([et,ze]).then(([Nt,tn])=>({location:Nt,colocatedEntities:tn}))},[I,T]),he=(0,a.useCallback)(async function(){const{location:ze}=Y.value;await I.removeLocationById(ze.id)},[I,Y]),be=(0,a.useCallback)(async function(){await I.removeEntityByUid(K)},[I,K]);if(X)return{type:"bootstrap",location:W,deleteEntity:be};const{loading:$e,error:Oe,value:xe}=Y;if($e)return{type:"loading"};if(Oe)return{type:"error",error:Oe};const{location:Me,colocatedEntities:Ge}=xe;return Me?{type:"unregister",location:W,colocatedEntities:Ge.map(Ce.iB),unregisterLocation:he,deleteEntity:be}:{type:"only-delete",deleteEntity:be}}var ft=e(10179);const xt=(0,Z.Z)({advancedButton:{fontSize:"0.7em"}}),zt=({entity:T,onConfirm:I})=>{var St;const W=(0,t.useApi)(t.alertApiRef),K=(0,t.useApi)(t.configApiRef),X=xt(),Y=ct(T),[he,be]=(0,a.useState)(!1),[$e,Oe]=(0,a.useState)(!1),xe=(St=K.getOptionalString("app.title"))!=null?St:"Backstage",Me=(0,a.useCallback)(async function(){if("unregisterLocation"in Y){Oe(!0);try{await Y.unregisterLocation(),I()}catch(ze){(0,ft.BD)(ze),W.post({message:ze.message})}finally{Oe(!1)}}},[W,I,Y]),Ge=(0,a.useCallback)(async function(){if("deleteEntity"in Y){Oe(!0);try{await Y.deleteEntity(),I()}catch(ze){(0,ft.BD)(ze),W.post({message:ze.message})}finally{Oe(!1)}}},[W,I,Y]);return Y.type==="loading"?a.createElement(Et.Progress,null):Y.type==="error"?a.createElement(Et.ResponseErrorPanel,{error:Y.error}):Y.type==="bootstrap"?a.createElement(a.Fragment,null,a.createElement(_n.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',Y.location,'"). If you believe this is in error, please contact the ',xe," ","integrator."),a.createElement(A.Z,{marginTop:2},!he&&a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:X.advancedButton,onClick:()=>be(!0)},"Advanced Options"),he&&a.createElement(a.Fragment,null,a.createElement(ie.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:$e,onClick:Ge},"Delete Entity")))):Y.type==="only-delete"?a.createElement(a.Fragment,null,a.createElement(ie.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:$e,onClick:Ge},"Delete Entity")):Y.type==="unregister"?a.createElement(a.Fragment,null,a.createElement(ie.Z,null,"This action will unregister the following entities:"),a.createElement(ie.Z,{component:"ul"},Y.colocatedEntities.map(et=>a.createElement("li",{key:`${et.kind}:${et.namespace}/${et.name}`},a.createElement(se,{entityRef:et})))),a.createElement(ie.Z,null,"Located at the following location:"),a.createElement(ie.Z,{component:"ul"},a.createElement("li",null,Y.location)),a.createElement(ie.Z,null,"To undo, just re-register the entity in ",xe,"."),a.createElement(A.Z,{marginTop:2},a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:$e,onClick:Me},"Unregister Location"),!he&&a.createElement(A.Z,{component:"span",marginLeft:2},a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:X.advancedButton,onClick:()=>be(!0)},"Advanced Options"))),he&&a.createElement(a.Fragment,null,a.createElement(A.Z,{paddingTop:4,paddingBottom:4},a.createElement(gt.Z,null)),a.createElement(ie.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:$e,onClick:Ge},"Delete Entity"))):a.createElement(_n.Z,{severity:"error"},"Internal error: Unknown state")},yn=T=>{const{open:I,onConfirm:W,onClose:K,entity:X}=T;return a.createElement(N.Z,{open:I,onClose:K},a.createElement(g.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),a.createElement(C.Z,null,a.createElement(zt,{entity:X,onConfirm:W})),a.createElement(fe.Z,null,a.createElement(y.Z,{onClick:K,color:"primary"},"Cancel")))};var gn=e(12231),fr=e(9520),Fn=e(47603);const mr=(0,Z.Z)(T=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:T.spacing(1,0,1,0)},title:{margin:T.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:T.palette.text.primary},menuItem:{minHeight:T.spacing(6)},groupWrapper:{margin:T.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function jr(T){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:Fn.Z},{id:"starred",label:"Starred",icon:Qn.Z}]},{name:T!=null?T:"Company",items:[{id:"all",label:"All"}]}]}const tr=T=>{var Kn;const{initialFilter:I,availableFilters:W}=T,K=mr(),Y=(Kn=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?Kn:"Company",{filters:he,updateFilters:be,backendEntities:$e,queryParameters:{kind:Oe,user:xe},loading:Me}=mt(),Ge=["starred","all"],St=jr(Y).map(Cn=>({...Cn,items:Cn.items.filter(({id:Tn})=>["group","user"].some(Nr=>Nr===Oe)?Ge.includes(Tn):!W||W.includes(Tn))})).filter(({items:Cn})=>!!Cn.length),{isStarredEntity:et}=dt(),{isOwnedEntity:ze,loading:Nt}=R(),tn=Me||Nt,Vn=(0,a.useMemo)(()=>new je("owned",ze,et),[ze,et]),Sn=(0,a.useMemo)(()=>new je("starred",ze,et),[ze,et]),fn=(0,a.useMemo)(()=>[xe].flat()[0],[xe]),[En,Bn]=(0,a.useState)(fn!=null?fn:I),Sr=(0,a.useMemo)(()=>$e.filter(tt((0,Ve.compact)(Object.values({...he,user:void 0})))),[he,$e]),Ur=(0,a.useMemo)(()=>({all:Sr.length,starred:Sr.filter(Cn=>Sn.filterEntity(Cn)).length,owned:Sr.filter(Cn=>Vn.filterEntity(Cn)).length}),[Sr,Sn,Vn]);return(0,a.useEffect)(()=>{fn&&Bn(fn)},[fn]),(0,a.useEffect)(()=>{!tn&&!!En&&En!=="all"&&Ur[En]===0&&Bn("all")},[tn,Ur,En,Bn]),(0,a.useEffect)(()=>{be({user:En?new je(En,ze,et):void 0})},[En,ze,et,be]),a.createElement(sr.Z,{className:K.root},St.map(Cn=>a.createElement(a.Fragment,{key:Cn.name},a.createElement(b.Z,{variant:"subtitle2",className:K.title},Cn.name),a.createElement(sr.Z,{className:K.groupWrapper},a.createElement(Hn.Z,{disablePadding:!0,dense:!0},Cn.items.map(Tn=>{var Nr,no;return a.createElement(gn.Z,{key:Tn.id,button:!0,divider:!0,onClick:()=>Bn(Tn.id),selected:Tn.id===((Nr=he.user)==null?void 0:Nr.value),className:K.menuItem,disabled:Ur[Tn.id]===0,"data-testid":`user-picker-${Tn.id}`},Tn.icon&&a.createElement(qn.Z,{className:K.listIcon},a.createElement(Tn.icon,{fontSize:"small"})),a.createElement(Or.Z,null,a.createElement(b.Z,{variant:"body1"},Tn.label)),a.createElement(fr.Z,null,(no=Ur[Tn.id])!=null?no:"-"))}))))))},Gr=({children:T,value:I})=>{var be;const[W,K]=useState((be=I==null?void 0:I.filters)!=null?be:{}),X=useCallback($e=>{K(Oe=>{const xe=typeof $e=="function"?$e(Oe):$e;return{...Oe,...xe}})},[]),Y=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),he=useMemo(()=>{var $e,Oe,xe,Me,Ge;return{entities:($e=I==null?void 0:I.entities)!=null?$e:Y.entities,backendEntities:(Oe=I==null?void 0:I.backendEntities)!=null?Oe:Y.backendEntities,updateFilters:(xe=I==null?void 0:I.updateFilters)!=null?xe:X,filters:W,loading:(Me=I==null?void 0:I.loading)!=null?Me:!1,queryParameters:(Ge=I==null?void 0:I.queryParameters)!=null?Ge:Y.queryParameters,error:I==null?void 0:I.error}},[I,Y,W,X]);return React.createElement(EntityListContext.Provider,{value:he},T)}},39398:function(q,i,e){"use strict";e.r(i),e.d(i,{AboutCard:function(){return Ve},AboutContent:function(){return te},AboutField:function(){return x}});var r=e(48023),t=e(9118),c=e(36964),h=e(36356),v=e(53479),m=e(79692),a=e(94339),s=e(32552),f=e(61837),y=e(85256),u=e(24579),A=e(52866),b=e(30254),S=e(27604),F=e(2784),_=e(47851),M=e(60905),L=e(90436),$=e(7089);const B=(0,m.Z)(We=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:We.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function x(We){const{label:ue,value:Ee,gridSizes:Ie,children:He}=We,Ye=B(),ot=(0,c.useElementFilter)(He,Ce=>Ce.getElements()),tt=ot.length>0?ot:F.createElement(L.Z,{variant:"body2",className:Ye.value},Ee||"unknown");return F.createElement(M.Z,{item:!0,...Ie},F.createElement(L.Z,{variant:"subtitle2",className:Ye.label},ue),tt)}const J=(0,m.Z)({description:{wordBreak:"break-word"}});function te(We){var mt,Bt,Ht,Ot,jt,Zt;const{entity:ue}=We,Ee=J(),Ie=ue.kind.toLocaleLowerCase("en-US")==="system",He=ue.kind.toLocaleLowerCase("en-US")==="resource",Ye=ue.kind.toLocaleLowerCase("en-US")==="component",ot=ue.kind.toLocaleLowerCase("en-US")==="api",tt=ue.kind.toLocaleLowerCase("en-US")==="template",Ce=ue.kind.toLocaleLowerCase("en-US")==="location",Ne=ue.kind.toLocaleLowerCase("en-US")==="group",Ue=(0,v.getEntityRelations)(ue,r.cz,{kind:"system"}),pt=(0,v.getEntityRelations)(ue,r.cz,{kind:"component"}),Ke=(0,v.getEntityRelations)(ue,r.cz,{kind:"domain"}),Ft=(0,v.getEntityRelations)(ue,r.S4);return F.createElement(M.Z,{container:!0},F.createElement(x,{label:"Description",gridSizes:{xs:12}},F.createElement(L.Z,{variant:"body2",paragraph:!0,className:Ee.description},((mt=ue==null?void 0:ue.metadata)==null?void 0:mt.description)||"No description")),F.createElement(x,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},Ft.length>0&&F.createElement(v.EntityRefLinks,{entityRefs:Ft,defaultKind:"group"})),(Ie||Ke.length>0)&&F.createElement(x,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},Ke.length>0&&F.createElement(v.EntityRefLinks,{entityRefs:Ke,defaultKind:"domain"})),(ot||Ye||He||Ue.length>0)&&F.createElement(x,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},Ue.length>0&&F.createElement(v.EntityRefLinks,{entityRefs:Ue,defaultKind:"system"})),Ye&&pt.length>0&&F.createElement(x,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},F.createElement(v.EntityRefLinks,{entityRefs:pt,defaultKind:"component"})),(ot||Ye||He||tt||Ne||Ce||typeof((Bt=ue==null?void 0:ue.spec)==null?void 0:Bt.type)=="string")&&F.createElement(x,{label:"Type",value:(Ht=ue==null?void 0:ue.spec)==null?void 0:Ht.type,gridSizes:{xs:12,sm:6,lg:4}}),(ot||Ye||typeof((Ot=ue==null?void 0:ue.spec)==null?void 0:Ot.lifecycle)=="string")&&F.createElement(x,{label:"Lifecycle",value:(jt=ue==null?void 0:ue.spec)==null?void 0:jt.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),F.createElement(x,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((Zt=ue==null?void 0:ue.metadata)==null?void 0:Zt.tags)||[]).map(wt=>F.createElement($.Z,{key:wt,size:"small",label:wt}))))}const ve=(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 Ve(We){var Ot,jt,Zt;const{variant:ue}=We,Ee=ve(),{entity:Ie}=(0,v.useEntity)(),He=(0,c.useApi)(h.q3),Ye=(0,c.useApi)(v.catalogApiRef),ot=(0,c.useApi)(c.alertApiRef),tt=(0,c.useRouteRef)(_.jU),Ce=(0,v.getEntitySourceLocation)(Ie,He),Ne=(Ot=Ie.metadata.annotations)==null?void 0:Ot[r.Tf],Ue={label:"View Source",disabled:!Ce,icon:F.createElement(h.nW,{type:Ce==null?void 0:Ce.integrationType}),href:Ce==null?void 0:Ce.locationTargetUrl},pt={label:"View TechDocs",disabled:!((jt=Ie.metadata.annotations)!=null&&jt["backstage.io/techdocs-ref"])||!tt,icon:F.createElement(b.Z,null),href:tt&&tt({namespace:Ie.metadata.namespace||r.zG,kind:Ie.kind,name:Ie.metadata.name})};let Ke="";ue==="gridItem"?Ke=Ee.gridItemCard:ue==="fullHeight"&&(Ke=Ee.fullHeightCard);let Ft="";ue==="gridItem"?Ft=Ee.gridItemCardContent:ue==="fullHeight"&&(Ft=Ee.fullHeightCardContent);const mt=(Zt=Ie.metadata.annotations)==null?void 0:Zt[r.P1],Bt=(mt==null?void 0:mt.startsWith("url:"))||(mt==null?void 0:mt.startsWith("file:")),Ht=(0,F.useCallback)(async()=>{await Ye.refreshEntity((0,r.eE)(Ie)),ot.post({message:"Refresh scheduled",severity:"info"})},[Ye,ot,Ie]);return F.createElement(a.Z,{className:Ke},F.createElement(s.Z,{title:"About",action:F.createElement(F.Fragment,null,Bt&&F.createElement(f.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Ht},F.createElement(A.Z,null)),F.createElement(f.Z,{component:t.Link,"aria-label":"Edit",disabled:!Ne,title:"Edit Metadata",to:Ne!=null?Ne:"#"},F.createElement(S.Z,null))),subheader:F.createElement(t.HeaderIconLinkRow,{links:[Ue,pt]})}),F.createElement(y.Z,null),F.createElement(u.Z,{className:Ft},F.createElement(te,{entity:Ie})))}},49782:function(q,i,e){"use strict";e.d(i,{K:function(){return A}});var r=e(2784),t=e(79692),c=e(12420),h=e(97580),v=e(73698),m=e(74603),a=e(12231),s=e(53479),f=e(64279),y=e(36964);const u=(0,t.Z)(b=>(0,c.Z)({root:{...b.typography.h4}}));function A(b){var We;const{initialFilter:S="component",allowedKinds:F}=b,_=u(),M=(0,y.useApi)(s.catalogApiRef),{value:L}=(0,f.default)(async()=>await M.getEntityFacets({facets:["kind"]}).then(ue=>{var Ee;return((Ee=ue.facets.kind)==null?void 0:Ee.map(Ie=>Ie.value).sort())||[]})),{updateFilters:$,queryParameters:{kind:B}}=(0,s.useEntityList)(),x=(0,r.useMemo)(()=>{var ue;return(ue=[B].flat()[0])==null?void 0:ue.toLocaleLowerCase("en-US")},[B]),[J,te]=(0,r.useState)(x!=null?x:S);(0,r.useEffect)(()=>{$({kind:J?new s.EntityKindFilter(J):void 0})},[J,$]),(0,r.useEffect)(()=>{x&&te(x)},[x]);const Ve=[(0,h.Z)(J)].concat((We=L==null?void 0:L.filter(ue=>F?F.some(Ee=>Ee.toLocaleLowerCase("en-US")===ue.toLocaleLowerCase("en-US")):!0))!=null?We:[]).sort().reduce((ue,Ee)=>(ue[Ee.toLocaleLowerCase("en-US")]=Ee,ue),{});return r.createElement(v.Z,{input:r.createElement(m.Z,{value:J}),value:J,onChange:ue=>te(ue.target.value),classes:_},Object.keys(Ve).map(ue=>r.createElement(a.Z,{value:ue,key:ue},`${Ve[ue]}s`)))}},30097:function(q,i,e){"use strict";e.d(i,{E:function(){return S}});var r=e(48023),t=e(53479),c=e(27604),h=e(2997),v=e(76635),m=e(2784),a=e(7089),s=e(9118);const f=Object.freeze({createNameColumn(F){function _(M){var L;return((L=M.metadata)==null?void 0:L.title)||(0,t.humanizeEntityRef)(M,{defaultKind:F==null?void 0:F.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:M},{entity:L}){return _(M).localeCompare(_(L))},render:({entity:M})=>{var L;return m.createElement(t.EntityRefLink,{entityRef:M,defaultKind:(F==null?void 0:F.defaultKind)||"Component",title:(L=M.metadata)==null?void 0:L.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:F})=>m.createElement(t.EntityRefLinks,{entityRefs:F.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:F})=>m.createElement(t.EntityRefLinks,{entityRefs:F.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:F})=>m.createElement(s.OverflowTooltip,{text:F.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:F})=>m.createElement(m.Fragment,null,F.metadata.tags&&F.metadata.tags.map(_=>m.createElement(a.Z,{key:_,label:_,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}});var y=e(28347),u=e(15459),A=e(11640);const b=(0,u.Z)({root:{color:"#f3ba37"}})(A.Z),S=F=>{var ot,tt,Ce;const{columns:_,actions:M,tableOptions:L}=F,{isStarredEntity:$,toggleStarredEntity:B}=(0,t.useStarredEntities)(),{loading:x,error:J,entities:te,filters:ve}=(0,t.useEntityList)(),Ve=(0,m.useMemo)(()=>{var Ue;return[f.createNameColumn({defaultKind:(Ue=ve.kind)==null?void 0:Ue.value}),...Ne(),f.createMetadataDescriptionColumn(),f.createTagsColumn()];function Ne(){var pt;switch((pt=ve.kind)==null?void 0:pt.value){case"user":return[];case"domain":case"system":return[f.createOwnerColumn()];case"group":case"location":case"template":return[f.createSpecTypeColumn()];default:return[f.createSystemColumn(),f.createOwnerColumn(),f.createSpecTypeColumn(),f.createSpecLifecycleColumn()]}}},[(ot=ve.kind)==null?void 0:ot.value]),We=ve.type===void 0,ue=(0,v.capitalize)((Ce=(tt=ve.user)==null?void 0:tt.value)!=null?Ce:"all");if(J)return m.createElement("div",null,m.createElement(s.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},m.createElement(s.CodeSnippet,{language:"text",text:J.toString()})));const Ee=[({entity:Ne})=>{var pt;const Ue=(pt=Ne.metadata.annotations)==null?void 0:pt[r.l2];return{icon:()=>m.createElement(h.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!Ue,onClick:()=>{!Ue||window.open(Ue,"_blank")}}},({entity:Ne})=>{var pt;const Ue=(pt=Ne.metadata.annotations)==null?void 0:pt[r.Tf];return{icon:()=>m.createElement(c.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!Ue,onClick:()=>{!Ue||window.open(Ue,"_blank")}}},({entity:Ne})=>{const Ue=$(Ne);return{cellStyle:{paddingLeft:"1em"},icon:()=>Ue?m.createElement(b,null):m.createElement(y.Z,null),tooltip:Ue?"Remove from favorites":"Add to favorites",onClick:()=>B(Ne)}}],Ie=te.map(Ne=>{const Ue=(0,t.getEntityRelations)(Ne,r.cz,{kind:"system"}),pt=(0,t.getEntityRelations)(Ne,r.S4);return{entity:Ne,resolved:{name:(0,t.humanizeEntityRef)(Ne,{defaultKind:"Component"}),ownedByRelationsTitle:pt.map(Ke=>(0,t.humanizeEntityRef)(Ke,{defaultKind:"group"})).join(", "),ownedByRelations:pt,partOfSystemRelationTitle:Ue.map(Ke=>(0,t.humanizeEntityRef)(Ke,{defaultKind:"system"})).join(", "),partOfSystemRelations:Ue}}}),He=(_||Ve).find(Ne=>Ne.title==="Type");He&&(He.hidden=!We);const Ye=Ie.length>20;return m.createElement(s.Table,{isLoading:x,columns:_||Ve,options:{paging:Ye,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!x,padding:"dense",pageSizeOptions:[20,50,100],...L},title:`${ue} (${te.length})`,data:Ie,actions:M||Ee})};S.columns=f},47851:function(q,i,e){"use strict";e.d(i,{_Z:function(){return h},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"]}),h=(0,r.createRouteRef)({id:"catalog"})},40749:function(q,i,e){"use strict";e.d(i,{rG:function(){return r},Y2:function(){return $},J$:function(){return f},g2:function(){return c}});var r;(function(B){const x="DENY";B.DENY=x;const J="ALLOW";B.ALLOW=J;const te="CONDITIONAL";B.CONDITIONAL=te})(r||(r={}));function t(B,x){return B.name===x.name}function c(B,x){return"resourceType"in B?!x||B.resourceType===x:!1}function h(B){return B.attributes.action==="create"}function v(B){return B.attributes.action==="read"}function m(B){return B.attributes.action==="update"}function a(B){return B.attributes.action==="delete"}function s(B){return{authorize:async(x,J)=>await B.authorize(x,J),authorizeConditional(x,J){const te=x;return B.authorize(te,J)}}}function f({name:B,attributes:x,resourceType:J}){return J?{type:"resource",name:B,attributes:x,resourceType:J}:{type:"basic",name:B,attributes:x}}var y=e(10179),u=e(96279),A=e.n(u),b=e(9571),S=e(30195);const F=S.z.lazy(()=>S.z.object({rule:S.z.string(),resourceType:S.z.string(),params:S.z.array(S.z.unknown())}).or(S.z.object({anyOf:S.z.array(F).nonempty()})).or(S.z.object({allOf:S.z.array(F).nonempty()})).or(S.z.object({not:F}))),_=S.z.object({result:S.z.literal(r.ALLOW).or(S.z.literal(r.DENY))}),M=S.z.union([S.z.object({result:S.z.literal(r.ALLOW).or(S.z.literal(r.DENY))}),S.z.object({result:S.z.literal(r.CONDITIONAL),pluginId:S.z.string(),resourceType:S.z.string(),conditions:F})]),L=(B,x)=>S.z.object({items:S.z.array(S.z.intersection(S.z.object({id:S.z.string()}),B)).refine(J=>J.length===x.size&&J.every(({id:te})=>x.has(te)),{message:"Items in response do not match request"})});class ${constructor(x){Q(this,"enabled");Q(this,"discovery");var J;this.discovery=x.discovery,this.enabled=(J=x.config.getOptionalBoolean("permission.enabled"))!=null?J:!1}async authorize(x,J){return this.makeRequest(x,_,J)}async authorizeConditional(x,J){return this.makeRequest(x,M,J)}async makeRequest(x,J,te){if(!this.enabled)return x.map(He=>({result:r.ALLOW}));const ve={items:x.map(He=>({id:b.Z(),...He}))},Ve=await this.discovery.getBaseUrl("permission"),We=await A()(`${Ve}/authorize`,{method:"POST",body:JSON.stringify(ve),headers:{...this.getAuthorizationHeader(te==null?void 0:te.token),"content-type":"application/json"}});if(!We.ok)throw await y.VL.fromResponse(We);const ue=await We.json(),Ie=L(J,new Set(ve.items.map(({id:He})=>He))).parse(ue).items.reduce((He,Ye)=>(He[Ye.id]=Ye,He),{});return ve.items.map(He=>Ie[He.id])}getAuthorizationHeader(x){return x?{Authorization:`Bearer ${x}`}:{}}}},68099:function(q,i,e){"use strict";e.d(i,{iM:function(){return v},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 h=e(40749);class v{constructor(y,u){this.permissionClient=y,this.identityApi=u}static create(y){const{config:u,discovery:A,identity:b}=y,S=new h.Y2({discovery:A,config:u});return new v(S,b)}async authorize(y){return(await this.permissionClient.authorize([y],await this.identityApi.getCredentials()))[0]}}var m=e(49857);function a(f){const y=(0,t.useApi)(c),{data:u,error:A}=(0,m.ZP)(f,async b=>{if((0,h.g2)(b.permission)&&!b.resourceRef)return h.rG.DENY;const{result:S}=await y.authorize(b);return S});return A?{error:A,loading:!1,allowed:!1}:u===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:u===h.rG.ALLOW}}const s=f=>{const{permission:y,resourceRef:u,errorComponent:A,...b}=f,S=usePermission(isResourcePermission(y)?{permission:y,resourceRef:u}:{permission:y}),F=useApp(),{NotFoundErrorPage:_}=F.getComponents();let M=A===void 0?React.createElement(_,null):A;return S.loading?M=null:S.allowed&&(M=f.element),React.createElement(Route,{...b,element:M})}},47955:function(q,i,e){"use strict";e.d(i,{Zz:function(){return v},oZ:function(){return ue},DR:function(){return m},ZS:function(){return B},KY:function(){return s},$L:function(){return A},x1:function(){return x}});var r=e(2784),t=e(10289),c=e(36964);const h="techdocs.addons.addon.v1",v="techdocs.addons.wrapper.v1",m=()=>null;(0,c.attachComponentData)(m,v,!0);const a=Ee=>`${h}.${Ee.toLocaleLowerCase("en-US")}`;function s(Ee){const{name:Ie,component:He}=Ee;return(0,c.createReactExtension)({name:Ie,component:{sync:Ye=>r.createElement(He,{...Ye})},data:{[h]:Ee,[a(Ie)]:!0}})}const f=(Ee,Ie)=>Ee.selectByComponentData({key:Ie}).getElements()[0],y=Ee=>Ee.selectByComponentData({key:v}).selectByComponentData({key:h}),u=Ee=>Ee.selectByComponentData({key:v}).findComponentData({key:h}),A=()=>{const Ee=(0,t.pC)(),Ie=(0,c.useElementFilter)(Ee,y),He=(0,c.useElementFilter)(Ee,u),Ye=(0,r.useCallback)(Ce=>{var Ue;if(!Ie||!Ce)return null;const Ne=a(Ce.name);return(Ue=f(Ie,Ne))!=null?Ue:null},[Ie]),ot=(0,r.useCallback)(Ce=>{const Ne=He.find(Ue=>Ue.name===Ce);return Ne?Ye(Ne):null},[He,Ye]),tt=(0,r.useCallback)(Ce=>{const Ne=He.filter(Ue=>Ue.location===Ce);return Ne.length?Ne.map(Ye):null},[He,Ye]);return{renderComponentByName:ot,renderComponentsByLocation:tt}},b=(0,c.createApiRef)({id:"plugin.techdocs.service"});var S=e(64279),F=e(48023),_=e(76241);const M=(Ee,Ie)=>(0,F.eE)(Ee)===(0,F.eE)(Ie),L={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},$=(0,_.CT)("techdocs-reader-page-context"),B=(0,r.memo)(({entityRef:Ee,children:Ie})=>{const He=(0,c.useApi)(b),Ye=(0,S.default)(async()=>He.getTechDocsMetadata(Ee),[Ee]),ot=(0,S.default)(async()=>He.getEntityMetadata(Ee),[Ee]),[tt,Ce]=(0,r.useState)(L.title),[Ne,Ue]=(0,r.useState)(L.subtitle),[pt,Ke]=(0,r.useState)(L.shadowRoot),Ft={metadata:Ye,entityRef:Ee,entityMetadata:ot,shadowRoot:pt,setShadowRoot:Ke,title:tt,setTitle:Ce,subtitle:Ne,setSubtitle:Ue},mt=(0,_.EI)({1:Ft});return r.createElement($.Provider,{value:mt},Ie instanceof Function?Ie(Ft):Ie)},(Ee,Ie)=>M(Ee.entityRef,Ie.entityRef)),x=()=>{const Ee=(0,r.useContext)($);if(Ee===void 0)return L;const Ie=Ee.atVersion(1);if(Ie===void 0)throw new Error("No context found for version 1.");return Ie};var J=e(54073);const te=()=>{const{shadowRoot:Ee}=useTechDocsReaderPage();return Ee},ve=Ee=>{const Ie=te();return Ie?Ee.map(He=>Ie==null?void 0:Ie.querySelectorAll(He)).filter(He=>He.length).map(He=>Array.from(He)).flat():[]},Ve=Ee=>Ee.toString()&&Ee.rangeCount&&Ee.getRangeAt(0).getBoundingClientRect().top,We=(Ee=0)=>{const Ie=te(),[He,Ye]=useState(null),ot=useMemo(()=>debounce(()=>{const tt=Ie,Ce=tt.getSelection?tt.getSelection():document.getSelection();Ce&&Ve(Ce)?Ye(Ce):Ye(null)},Ee),[Ie,Ye,Ee]);return useEffect(()=>(window.document.addEventListener("selectionchange",ot),()=>window.document.removeEventListener("selectionchange",ot)),[ot]),He},ue=Object.freeze({Header:"Header",Subheader:"Subheader",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},94067:function(q,i,e){"use strict";e.r(i),e.d(i,{EmbeddedDocsRouter:function(){return F},Router:function(){return S},isTechDocsAvailable:function(){return b}});var r=e(2784),t=e(10289),c=e(53479),h=e(9118),v=e(48023),m=e(20961),a=e(16172),s=e(28626);const f=({entity:_})=>{const M=(0,v.iB)(_);return r.createElement(m.I6,{entityRef:M},r.createElement(a.b,null),r.createElement(s.Fq,{withSearch:!1}))};var y=e(50021),u=e(26220);const A="backstage.io/techdocs-ref",b=_=>{var M,L;return Boolean((L=(M=_==null?void 0:_.metadata)==null?void 0:M.annotations)==null?void 0:L[A])},S=()=>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(u.TechDocsReaderPage,null)})),F=_=>{var B;const{children:M}=_,{entity:L}=(0,c.useEntity)();return((B=L.metadata.annotations)==null?void 0:B[A])?r.createElement(t.Z5,null,r.createElement(t.AW,{element:r.createElement(f,{entity:L})},M)):r.createElement(h.MissingAnnotationEmptyState,{annotation:A})}},3337:function(q,i,e){"use strict";e.d(i,{D:function(){return t},g:function(){return c}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),c=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(q,i,e){"use strict";e.d(i,{k:function(){return v},p:function(){return h}});var r=e(10179),t=e(76372),c=e.n(t);class h{constructor(a){Q(this,"configApi");Q(this,"discoveryApi");Q(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:s,namespace:f,name:y}=a,A=`${await this.getApiOrigin()}/metadata/techdocs/${f}/${s}/${y}`,b=await this.fetchApi.fetch(`${A}`);if(!b.ok)throw await r.VL.fromResponse(b);return await b.json()}async getEntityMetadata(a){const{kind:s,namespace:f,name:y}=a,A=`${await this.getApiOrigin()}/metadata/entity/${f}/${s}/${y}`,b=await this.fetchApi.fetch(`${A}`);if(!b.ok)throw await r.VL.fromResponse(b);return await b.json()}}class v{constructor(a){Q(this,"configApi");Q(this,"discoveryApi");Q(this,"identityApi");Q(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,s){const{kind:f,namespace:y,name:u}=a,b=`${await this.getStorageUrl()}/${y}/${f}/${u}/${s}`,S=await this.fetchApi.fetch(`${b.endsWith("/")?b:`${b}/`}index.html`);let F="";switch(S.status){case 404:throw F="Page not found. ",s||(F+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(F);case 500:throw F="Could not generate documentation or an error in the TechDocs backend. ",new Error(F);default:break}return S.text()}async syncEntityDocs(a,s=()=>{}){const{kind:f,namespace:y,name:u}=a,b=`${await this.getApiOrigin()}/sync/${y}/${f}/${u}`,{token:S}=await this.identityApi.getCredentials();return new Promise((F,_)=>{const M=new t.EventSourcePolyfill(b,{withCredentials:!0,headers:S?{Authorization:`Bearer ${S}`}:{}});M.addEventListener("log",L=>{L.data&&s(JSON.parse(L.data))}),M.addEventListener("finish",L=>{let $=!1;L.data&&({updated:$}=JSON.parse(L.data)),F($?"updated":"cached")}),M.onerror=L=>{switch(M.close(),L.status){case 404:_(new r.dR(L.message));return;default:_(new Error(L.data));return}}})}async getBaseUrl(a,s,f){const{kind:y,namespace:u,name:A}=s,S=`${await this.getApiOrigin()}/static/docs/${u}/${y}/${A}/${f}`;return new URL(a,S.endsWith("/")?S:`${S}/`).toString()}}},97589:function(q,i,e){"use strict";e.d(i,{D:function(){return r}});function r(t,c){return c.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(q,i,e){"use strict";e.d(i,{u:function(){return a}});var r=e(2784),t=e(9118),c=e(53479),h=e(1114),v=e(70335),m=e(21956);const a=s=>{const{initialFilter:f="all",columns:y,actions:u}=s;return r.createElement(h.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(v.f,null),r.createElement(c.UserListPicker,{initialFilter:f}),r.createElement(c.EntityOwnerPicker,null),r.createElement(c.EntityTagPicker,null)),r.createElement(c.CatalogFilterLayout.Content,null,r.createElement(m.EntityListDocsTable,{actions:u,columns:y}))))))}},51016:function(q,i,e){"use strict";e.d(i,{f:function(){return y}});var r=e(68725),t=e(97589),c=e(36964),h=e(9118),v=e(94339),m=e(16111),a=e(24579),s=e(14503),f=e(2784);const y=b=>{const{entities:S}=b,F=(0,c.useRouteRef)(r.Fw),_=(0,c.useApi)(c.configApiRef);return S?f.createElement(h.ItemCardGrid,{"data-testid":"docs-explore"},S!=null&&S.length?S.map((M,L)=>{var $,B;return f.createElement(v.Z,{key:L},f.createElement(m.Z,null,f.createElement(h.ItemCardHeader,{title:($=M.metadata.title)!=null?$:M.metadata.name})),f.createElement(a.Z,null,M.metadata.description),f.createElement(s.Z,null,f.createElement(h.Button,{to:F({namespace:(0,t.D)((B=M.metadata.namespace)!=null?B:"default",_),kind:(0,t.D)(M.kind,_),name:(0,t.D)(M.metadata.name,_)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var u=e(53479);const A=()=>{const{loading:b,error:S,entities:F}=useEntityList();return S?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:S.toString()})):b||!F?React.createElement(Progress,null):(F.sort((_,M)=>{var L,$;return((L=_.metadata.title)!=null?L:_.metadata.name).localeCompare(($=M.metadata.title)!=null?$:M.metadata.name)}),React.createElement(DocsCardGrid,{entities:F}))}},38634:function(q,i,e){"use strict";e.d(i,{H:function(){return u}});var r=e(2784),t=e(95074),c=e(36964),h=e(48023),v=e(53479),m=e(68725),a=e(9118),s=e(98095),f=e(3792),y=e(97589);const u=A=>{const{entities:b,title:S,loading:F,columns:_,actions:M}=A,[,L]=(0,t.Z)(),$=(0,c.useRouteRef)(m.Fw),B=(0,c.useApi)(c.configApiRef);if(!b)return null;const x=b.map(ve=>{var We;const Ve=(0,v.getEntityRelations)(ve,h.S4);return{entity:ve,resolved:{docsUrl:$({namespace:(0,y.D)((We=ve.metadata.namespace)!=null?We:"default",B),kind:(0,y.D)(ve.kind,B),name:(0,y.D)(ve.metadata.name,B)}),ownedByRelations:Ve,ownedByRelationsTitle:Ve.map(ue=>(0,v.humanizeEntityRef)(ue,{defaultKind:"group"})).join(", ")}}}),J=[f.N.createNameColumn(),f.N.createOwnerColumn(),f.N.createTypeColumn()],te=[s.n.createCopyDocsUrlAction(L)];return r.createElement(r.Fragment,null,F||x&&x.length>0?r.createElement(a.Table,{isLoading:F,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:x,columns:_||J,actions:M||te,title:S?`${S} (${x.length})`:`All (${x.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")}))};u.columns=f.N,u.actions=s.n},12481:function(q,i,e){"use strict";e.d(i,{n:function(){return y}});var r=e(2784),t=e(95074),c=e(76635),h=e.n(c),v=e(9118),m=e(53479),a=e(38634),s=e(98095),f=e(3792);const y=u=>{var te,ve;const{columns:A,actions:b}=u,{loading:S,error:F,entities:_,filters:M}=(0,m.useEntityList)(),{isStarredEntity:L,toggleStarredEntity:$}=(0,m.useStarredEntities)(),[,B]=(0,t.Z)(),x=(0,c.capitalize)((ve=(te=M.user)==null?void 0:te.value)!=null?ve:"all"),J=[s.n.createCopyDocsUrlAction(B),s.n.createStarEntityAction(L,$)];return F?r.createElement(v.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(v.CodeSnippet,{language:"text",text:F.toString()})):r.createElement(a.H,{title:x,entities:_,loading:S,actions:b||J,columns:A})};y.columns=f.N,y.actions=s.n},98095:function(q,i,e){"use strict";e.d(i,{n:function(){return a}});var r=e(2784),t=e(39981),c=e(2337),h=e(11640),v=e(28347);const m=(0,c.Z)({root:{color:"#f3ba37"}})(h.Z),a={createCopyDocsUrlAction(s){return f=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>s(`${window.location.origin}${f.resolved.docsUrl}`)})},createStarEntityAction(s,f){return({entity:y})=>{const u=s(y);return{cellStyle:{paddingLeft:"1em"},icon:()=>u?r.createElement(m,null):r.createElement(v.Z,null),tooltip:u?"Remove from favorites":"Add to favorites",onClick:()=>f(y)}}}}},3792:function(q,i,e){"use strict";e.d(i,{N:function(){return v}});var r=e(2784),t=e(9118),c=e(53479);function h(m){return m.metadata.title||m.metadata.name}const v={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},h(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(q,i,e){"use strict";e.d(i,{DocsTable:function(){return t.H},EntityListDocsTable:function(){return r.n}});var r=e(12481),t=e(38634),c=e(72580),h=e.n(c);e.o(c,"DefaultTechDocsHome")&&e.d(i,{DefaultTechDocsHome:function(){return c.DefaultTechDocsHome}})},72580:function(){},50021:function(q,i,e){"use strict";e.r(i),e.d(i,{TechDocsIndexPage:function(){return h}});var r=e(2784),t=e(10289),c=e(2546);const h=()=>(0,t.pC)()||r.createElement(c.u,null)},1114:function(q,i,e){"use strict";e.d(i,{j:function(){return h}});var r=e(2784),t=e(9118),c=e(36964);const h=v=>{var f;const{children:m}=v,s=`Documentation available in ${(f=(0,c.useApi)(c.configApiRef).getOptionalString("organization.name"))!=null?f:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:s,themeId:"documentation"},m)}},70335:function(q,i,e){"use strict";e.d(i,{f:function(){return h}});var r=e(2784),t=e(53479);class c{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const h=()=>{const{updateFilters:v}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{v({techdocs:new c})},[v]),null}},19192:function(q,i,e){"use strict";e.d(i,{DefaultTechDocsHome:function(){return c.u}});var r=e(51016),t=e(21956),c=e(2546),h=e(1114),v=e(70335)},82250:function(q,i,e){"use strict";e.d(i,{DefaultTechDocsHome:function(){return a.DefaultTechDocsHome},TechDocsIndexPage:function(){return s.Jl},TechDocsReaderPage:function(){return s.I6},TechDocsReaderPageContent:function(){return v.Fq},TechDocsReaderPageHeader:function(){return v.SE},plugin:function(){return s.s4},techdocsApiRef:function(){return c.g},techdocsPlugin:function(){return s.s4},techdocsStorageApiRef:function(){return c.D}});var r=e(98157),t=e.n(r);e.o(r,"DefaultTechDocsHome")&&e.d(i,{DefaultTechDocsHome:function(){return r.DefaultTechDocsHome}}),e.o(r,"TechDocsReaderPageContent")&&e.d(i,{TechDocsReaderPageContent:function(){return r.TechDocsReaderPageContent}}),e.o(r,"TechDocsReaderPageHeader")&&e.d(i,{TechDocsReaderPageHeader:function(){return r.TechDocsReaderPageHeader}}),e.o(r,"techdocsApiRef")&&e.d(i,{techdocsApiRef:function(){return r.techdocsApiRef}}),e.o(r,"techdocsStorageApiRef")&&e.d(i,{techdocsStorageApiRef:function(){return r.techdocsStorageApiRef}});var c=e(3337),h=e(42723),v=e(96393),m=e(10459),a=e(19192),s=e(20961),f=e(94067)},20961:function(q,i,e){"use strict";e.d(i,{I6:function(){return y},Jl:function(){return f},s4:function(){return v}});var r=e(3337),t=e(42723),c=e(68725),h=e(36964);const v=(0,h.createPlugin)({id:"techdocs",apis:[(0,h.createApiFactory)({api:r.D,deps:{configApi:h.configApiRef,discoveryApi:h.discoveryApiRef,identityApi:h.identityApiRef,fetchApi:h.fetchApiRef},factory:({configApi:u,discoveryApi:A,identityApi:b,fetchApi:S})=>new t.k({configApi:u,discoveryApi:A,identityApi:b,fetchApi:S})}),(0,h.createApiFactory)({api:r.g,deps:{configApi:h.configApiRef,discoveryApi:h.discoveryApiRef,fetchApi:h.fetchApiRef},factory:({configApi:u,discoveryApi:A,fetchApi:b})=>new t.p({configApi:u,discoveryApi:A,fetchApi:b})})],routes:{root:c._Z,docRoot:c.Fw,entityContent:c.pd}}),m=v.provide((0,h.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(u=>u.Router),mountPoint:c._Z})),a=v.provide((0,h.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(u=>u.EmbeddedDocsRouter),mountPoint:c.pd})),s=v.provide((0,h.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(u=>u.TechDocsCustomHome),mountPoint:c._Z})),f=v.provide((0,h.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(u=>u.TechDocsIndexPage),mountPoint:c._Z})),y=v.provide((0,h.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,26220)).then(u=>u.TechDocsReaderPage),mountPoint:c.Fw}))},26220:function(q,i,e){"use strict";e.r(i),e.d(i,{TechDocsReaderLayout:function(){return s},TechDocsReaderPage:function(){return f}});var r=e(2784),t=e(10289),c=e(9118),h=e(47955),v=e(28626),m=e(99954),a=e(16172);const s=({withSearch:y,withHeader:u=!0})=>r.createElement(c.Page,{themeId:"documentation"},u&&r.createElement(m.S,null),r.createElement(a.b,null),r.createElement(v.Fq,{withSearch:y})),f=y=>{const{kind:u,name:A,namespace:b}=(0,t.UO)(),{children:S,entityRef:F={kind:u,name:A,namespace:b}}=y,_=(0,t.pC)();if(!S){const L=(_?r.Children.toArray(_.props.children):[]).find($=>{var x,J;const{type:B}=$;return!((J=(x=B==null?void 0:B.__backstage_data)==null?void 0:x.map)!=null&&J.get(h.Zz))});return r.createElement(h.ZS,{entityRef:F},L||r.createElement(s,null))}return r.createElement(h.ZS,{entityRef:F},({metadata:M,entityMetadata:L,onReady:$})=>r.createElement(c.Page,{themeId:"documentation"},S instanceof Function?S({entityRef:F,techdocsMetadataValue:M.value,entityMetadataValue:L.value,onReady:$}):S))}},28626:function(q,i,e){"use strict";e.d(i,{Fq:function(){return dt},DK:function(){return ve}});var r=e(2784),t=e(36617),c=e(79692),h=e(60905),v=e(8560),m=e(50236),a=e(19219),s=e(47955),f=e(9118),y=e(10459),u=e(23738),A=e(10289),b=e(60364),S=e(41128),F=e(36964),_=e(36356),M=e(3337),L=e(64279),$=e(77446);function B({contentLoading:z,content:R,activeSyncState:P}){return z||P==="BUILD_READY_RELOAD"||!R&&P==="CHECKING"?"CHECKING":!R&&P==="BUILDING"?"INITIAL_BUILD":R?P==="BUILDING"?"CONTENT_STALE_REFRESHING":P==="BUILD_READY"?"CONTENT_STALE_READY":P==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function x(z,R){const P={...z};switch(R.type){case"sync":R.state==="CHECKING"&&(P.buildLog=[]),P.activeSyncState=R.state,P.syncError=R.syncError;break;case"contentLoading":P.contentLoading=!0,P.contentError=void 0;break;case"content":typeof R.path=="string"&&(P.path=R.path),P.contentLoading=!1,P.content=R.content,P.contentError=R.contentError;break;case"buildLog":P.buildLog=P.buildLog.concat(R.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(P.activeSyncState)&&["contentLoading","content"].includes(R.type)&&(P.activeSyncState="UP_TO_DATE",P.buildLog=[]),P}function J(z,R,P,ce){var pe,we;const[de,Z]=(0,r.useReducer)(x,{activeSyncState:"CHECKING",path:ce,contentLoading:!0,buildLog:[]}),D=(0,F.useApi)(M.D),{retry:re}=(0,$.Z)(async()=>{Z({type:"contentLoading"});try{const Ze=await D.getEntityDocs({kind:z,namespace:R,name:P},ce);return Z({type:"content",content:Ze,path:ce}),Ze}catch(Ze){Z({type:"content",contentError:Ze,path:ce})}},[D,z,R,P,ce]),ge=(0,r.useRef)({content:void 0,reload:()=>{}});return ge.current={content:de.content,reload:re},(0,L.default)(async()=>{Z({type:"sync",state:"CHECKING"});const Ze=setTimeout(()=>{Z({type:"sync",state:"BUILDING"})},1e3);try{switch(await D.syncEntityDocs({kind:z,namespace:R,name:P},At=>{Z({type:"buildLog",log:At})})){case"updated":ge.current.content?Z({type:"sync",state:"BUILD_READY"}):(ge.current.reload(),Z({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":Z({type:"sync",state:"UP_TO_DATE"});break;default:Z({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(qe){Z({type:"sync",state:"ERROR",syncError:qe})}finally{clearTimeout(Ze)}},[z,P,R,D,Z,ge]),{state:(0,r.useMemo)(()=>B({activeSyncState:de.activeSyncState,contentLoading:de.contentLoading,content:de.content}),[de.activeSyncState,de.content,de.contentLoading]),contentReload:re,path:de.path,content:de.content,contentErrorMessage:(pe=de.contentError)==null?void 0:pe.toString(),syncErrorMessage:(we=de.syncError)==null?void 0:we.toString(),buildLog:de.buildLog}}const te=(0,r.createContext)({}),ve=()=>(0,r.useContext)(te),Ve=({children:z})=>{const{"*":R=""}=(0,A.UO)(),{entityRef:P}=(0,s.x1)(),{kind:ce,namespace:de,name:Z}=P,D=J(ce,de,Z,R);return r.createElement(te.Provider,{value:D},z instanceof Function?z(D):z)},We=z=>R=>r.createElement(Ve,null,r.createElement(z,{...R})),ue=(z,R,P)=>{const ce=z==="src"&&R.endsWith(".svg"),de=!R.match(/^([a-z]*:)?\/\//i),Z=R.startsWith(P);return ce&&(de||Z)},Ee=({techdocsStorageApi:z,entityId:R,path:P})=>async ce=>{const de=await z.getApiOrigin(),Z=async(D,re)=>{for(const ge of D)if(ge.hasAttribute(re)){const Pe=ge.getAttribute(re);if(!Pe)return;const pe=await z.getBaseUrl(Pe,R,P);if(ue(re,Pe,de))try{const Ze=await(await fetch(pe,{credentials:"include"})).text();ge.setAttribute(re,`data:image/svg+xml;base64,${btoa(Ze)}`)}catch{ge.setAttribute("alt",`Error: ${Pe}`)}else ge.setAttribute(re,pe)}};return await Promise.all([Z(ce.querySelectorAll("img"),"src"),Z(ce.querySelectorAll("script"),"src"),Z(ce.querySelectorAll("source"),"src"),Z(ce.querySelectorAll("link"),"href"),Z(ce.querySelectorAll("a[download]"),"href")]),ce};var Ie=e(68370),He=e(67097),Ye=e(47093),ot=e(82717),tt=e.n(ot);const Ce=z=>R=>{const P=R.querySelector('[title="Edit this page"]');if(!P||!P.href)return R;const ce=new URL(P.href),de=z.byUrl(ce);if((de==null?void 0:de.type)!=="github"&&(de==null?void 0:de.type)!=="gitlab")return R;const Z=R.querySelector("article>h1").childNodes[0].textContent,D=encodeURIComponent(`Documentation Feedback: ${Z}`),re=encodeURIComponent(`Page source:
|
|
32
|
+
${P.href}
|
|
33
|
+
|
|
34
|
+
Feedback:`),ge=(de==null?void 0:de.type)==="github"?(0,Ie.Pb)(ce.href,"blob"):ce.href,Pe=tt()(ge),pe=`/${Pe.organization}/${Pe.name}`,we=P.cloneNode();switch(de==null?void 0:de.type){case"gitlab":we.href=`${ce.origin}${pe}/issues/new?issue[title]=${D}&issue[description]=${re}`;break;case"github":we.href=`${ce.origin}${pe}/issues/new?title=${D}&body=${re}`;break;default:return R}return Ye.render(r.createElement(He.Z),we),we.style.paddingLeft="5px",we.title="Leave feedback for this page",we.id="git-feedback-link",P==null||P.insertAdjacentElement("beforebegin",we),R};var Ne=e(44882);const Ue=()=>z=>{const R=z.querySelector('.md-header label[for="__drawer"]'),P=z.querySelector("article");if(!R||!P)return z;const ce=R.cloneNode();return Ye.render(r.createElement(Ne.Z),ce),ce.id="toggle-sidebar",ce.title="Toggle Sidebar",ce.classList.add("md-content__button"),ce.style.setProperty("padding","0 0 0 5px"),ce.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),P==null||P.prepend(ce),z},pt=()=>z=>(((P,ce)=>{Array.from(P).filter(de=>de.hasAttribute(ce)).forEach(de=>{const Z=de.getAttribute(ce);if(Z){Z.match(/^https?:\/\//i)&&de.setAttribute("target","_blank");try{const D=Ke(window.location.href);de.setAttribute(ce,new URL(Z,D).toString())}catch{de.replaceWith(de.textContent||Z)}}})})(Array.from(z.getElementsByTagName("a")),"href"),z);function Ke(z){const R=new URL(z);return!R.pathname.endsWith("/")&&!R.pathname.endsWith(".html")&&(R.pathname+="/"),R.toString()}const Ft=({baseUrl:z,onClick:R})=>P=>(Array.from(P.getElementsByTagName("a")).forEach(ce=>{ce.addEventListener("click",de=>{const D=ce.getAttribute("href");!D||D.startsWith(z)&&!ce.hasAttribute("download")&&(de.preventDefault(),R(de,D))})}),P);var mt=e(15459),Bt=e(80030),Ht=e(72379),Ot=e(41547);const jt=(0,mt.Z)(z=>({tooltip:{fontSize:"inherit",color:z.palette.text.primary,margin:0,padding:z.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Bt.ZP),Zt=()=>r.createElement(Ht.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"})),wt=({text:z})=>{const[R,P]=(0,r.useState)(!1),ce=(0,r.useCallback)(()=>{navigator.clipboard.writeText(z),P(!0)},[z]),de=(0,r.useCallback)(()=>{P(!1)},[P]);return r.createElement(jt,{title:"Copied to clipboard",placement:"left",open:R,onClose:de,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:ce},r.createElement(Zt,null)))},An=z=>R=>{var ce;const P=R.querySelectorAll("pre > code");for(const de of P){const Z=de.textContent||"",D=document.createElement("div");(ce=de==null?void 0:de.parentElement)==null||ce.prepend(D),Ye.render(r.createElement(Ot.Z,{theme:z},r.createElement(wt,{text:Z})),D)}return R},Gt=()=>z=>{var R;return(R=z.querySelector(".md-header"))==null||R.remove(),z},Et=()=>z=>{var R,P;return(R=z.querySelector(".md-footer .md-copyright"))==null||R.remove(),(P=z.querySelector(".md-footer-copyright"))==null||P.remove(),z},un=({docStorageUrl:z,onLoading:R,onLoaded:P})=>ce=>{const de=Array.from(ce.querySelectorAll('head > link[rel="stylesheet"]')).filter(D=>{var re;return(re=D.getAttribute("href"))==null?void 0:re.startsWith(z)});let Z=de.length;return Z>0&&R(ce),de.forEach(D=>D.addEventListener("load",()=>{Z-=1,Z===0&&P(ce)})),ce};var se=e(35368),j=e.n(se);const ae=/main\.[A-Fa-f0-9]{8}\.min\.css$/,le=/^https:\/\/fonts\.googleapis\.com/,ye=/^https:\/\/fonts\.gstatic\.com/,Le=z=>{if(z.nodeName&&z.nodeName==="LINK"){const R=z.getAttribute("href")||"";R.match(ae)&&z.setAttribute("rel","stylesheet"),R.match(le)&&z.setAttribute("rel","stylesheet"),R.match(ye)&&z.setAttribute("rel","preconnect")}return z},Be=z=>R=>{if(R.nodeName==="IFRAME"){const P=R.getAttribute("src");if(!P)return R.remove(),R;try{const ce=new URL(P);z.some(Z=>ce.host===Z)||R.remove()}catch(ce){console.warn(`Invalid iframe src, ${ce}`),R.remove()}}return R},Se=z=>{const R=(z==null?void 0:z.getOptionalStringArray("allowedIframeHosts"))||[];return P=>{j().addHook("afterSanitizeAttributes",Le);const ce=["link"];return R.length>0&&(j().addHook("beforeSanitizeElements",Be(R)),ce.push("iframe")),j().sanitize(P.innerHTML,{ADD_TAGS:ce,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},je=({css:z})=>R=>(R.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${z}</style>`),R),ut=()=>z=>(setTimeout(()=>{var R;if(window.location.hash){const P=window.location.hash.slice(1);(R=z==null?void 0:z.querySelector(`[id="${P}"]`))==null||R.scrollIntoView()}},200),z),bt=async(z,R)=>{let P;if(typeof z=="string")P=new DOMParser().parseFromString(z,"text/html").documentElement;else if(z instanceof Element)P=z;else throw new Error("dom is not a recognized type");for(const ce of R)P=await ce(P);return P},vt=["h1","h2","h3","h4","h5","h6"],at=z=>{const R=(0,A.s0)(),P=(0,b.Z)(),ce=(0,F.useApi)(M.D),de=(0,F.useApi)(_.q3),Z=(0,F.useApi)(F.configApiRef),{namespace:D,kind:re,name:ge}=z,{state:Pe,path:pe,content:we}=ve(),Ze=P.palette.type==="dark",[qe,At]=(0,r.useState)(),[st,lt]=(0,r.useState)(null),{isPinned:Mt}=(0,r.useContext)(f.SidebarPinStateContext),ke=(0,r.useCallback)(()=>{if(!st||!qe)return;const Qe=st.querySelector(".md-container > .md-tabs"),Xe=window.matchMedia("screen and (max-width: 76.1875em)").matches,Pt=Math.max(st.getBoundingClientRect().top,0);qe.forEach(qt=>{Xe?qt.style.top="0px":Qe?qt.style.top=`${Pt+Qe.getBoundingClientRect().height}px`:qt.style.top=`${Pt}px`})},[st,qe]);(0,r.useEffect)(()=>(ke(),window.addEventListener("scroll",ke,!0),window.addEventListener("resize",ke),()=>{window.removeEventListener("scroll",ke,!0),window.removeEventListener("resize",ke)}),[ke,Pe]);const Rt=(0,r.useCallback)(()=>{if(!st)return;const Qe=st.querySelector(".md-footer");Qe&&(Qe.style.width=`${st.getBoundingClientRect().width}px`)},[st]);(0,r.useEffect)(()=>(Rt(),window.addEventListener("resize",Rt),()=>{window.removeEventListener("resize",Rt)}));const Yt=(0,r.useCallback)((Qe,Xe)=>bt(Qe,[Se(Z.getOptionalConfig("techdocs.sanitizer")),Ee({techdocsStorageApi:ce,entityId:{kind:re,name:ge,namespace:D},path:Xe}),pt(),Ue(),Gt(),Et(),Ce(de),je({css:`
|
|
35
|
+
/*
|
|
36
|
+
As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.
|
|
37
|
+
As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
|
|
38
|
+
*/
|
|
39
|
+
:host {
|
|
40
|
+
/* FONT */
|
|
41
|
+
--md-default-fg-color: ${P.palette.text.primary};
|
|
42
|
+
--md-default-fg-color--light: ${P.palette.text.secondary};
|
|
43
|
+
--md-default-fg-color--lighter: ${(0,S.$n)(P.palette.text.secondary,.7)};
|
|
44
|
+
--md-default-fg-color--lightest: ${(0,S.$n)(P.palette.text.secondary,.3)};
|
|
45
|
+
|
|
46
|
+
/* BACKGROUND */
|
|
47
|
+
--md-default-bg-color:${P.palette.background.default};
|
|
48
|
+
--md-default-bg-color--light: ${P.palette.background.paper};
|
|
49
|
+
--md-default-bg-color--lighter: ${(0,S.$n)(P.palette.background.paper,.7)};
|
|
50
|
+
--md-default-bg-color--lightest: ${(0,S.$n)(P.palette.background.paper,.3)};
|
|
51
|
+
|
|
52
|
+
/* PRIMARY */
|
|
53
|
+
--md-primary-fg-color: ${P.palette.primary.main};
|
|
54
|
+
--md-primary-fg-color--light: ${P.palette.primary.light};
|
|
55
|
+
--md-primary-fg-color--dark: ${P.palette.primary.dark};
|
|
56
|
+
--md-primary-bg-color: ${P.palette.primary.contrastText};
|
|
57
|
+
--md-primary-bg-color--light: ${(0,S.$n)(P.palette.primary.contrastText,.7)};
|
|
58
|
+
|
|
59
|
+
/* ACCENT */
|
|
60
|
+
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
61
|
+
|
|
62
|
+
/* SHADOW */
|
|
63
|
+
--md-shadow-z1: ${P.shadows[1]};
|
|
64
|
+
--md-shadow-z2: ${P.shadows[2]};
|
|
65
|
+
--md-shadow-z3: ${P.shadows[3]};
|
|
66
|
+
|
|
67
|
+
/* EXTENSIONS */
|
|
68
|
+
--md-admonition-fg-color: var(--md-default-fg-color);
|
|
69
|
+
--md-admonition-bg-color: var(--md-default-bg-color);
|
|
70
|
+
/* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
|
|
71
|
+
--md-admonition-icon--note: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>');
|
|
72
|
+
--md-admonition-icon--abstract: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 5h16v2H4V5m0 4h16v2H4V9m0 4h16v2H4v-2m0 4h10v2H4v-2z"/></svg>');
|
|
73
|
+
--md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10A10 10 0 0012 2z"/></svg>');
|
|
74
|
+
--md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.55 11.2c-.23-.3-.5-.56-.76-.82-.65-.6-1.4-1.03-2.03-1.66C13.3 7.26 13 4.85 13.91 3c-.91.23-1.75.75-2.45 1.32-2.54 2.08-3.54 5.75-2.34 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.22.1-.46.04-.64-.12a.83.83 0 01-.15-.17c-1.1-1.43-1.28-3.48-.53-5.12C5.89 10 5 12.3 5.14 14.47c.04.5.1 1 .27 1.5.14.6.4 1.2.72 1.73 1.04 1.73 2.87 2.97 4.84 3.22 2.1.27 4.35-.12 5.96-1.6 1.8-1.66 2.45-4.32 1.5-6.6l-.13-.26c-.2-.46-.47-.87-.8-1.25l.05-.01m-3.1 6.3c-.28.24-.73.5-1.08.6-1.1.4-2.2-.16-2.87-.82 1.19-.28 1.89-1.16 2.09-2.05.17-.8-.14-1.46-.27-2.23-.12-.74-.1-1.37.18-2.06.17.38.37.76.6 1.06.76 1 1.95 1.44 2.2 2.8.04.14.06.28.06.43.03.82-.32 1.72-.92 2.27h.01z"/></svg>');
|
|
75
|
+
--md-admonition-icon--success: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
76
|
+
--md-admonition-icon--question: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.07 11.25l-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 00-2-2 2 2 0 00-2 2H8a4 4 0 014-4 4 4 0 014 4 3.2 3.2 0 01-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10c0-5.53-4.5-10-10-10z"/></svg>');
|
|
77
|
+
--md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z"/></svg>');
|
|
78
|
+
--md-admonition-icon--failure: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12 6.47 2 12 2m3.59 5L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41 15.59 7z"/></svg>');
|
|
79
|
+
--md-admonition-icon--danger: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.5 20l4.86-9.73H13V4l-5 9.73h3.5V20M12 2c2.75 0 5.1 1 7.05 2.95C21 6.9 22 9.25 22 12s-1 5.1-2.95 7.05C17.1 21 14.75 22 12 22s-5.1-1-7.05-2.95C3 17.1 2 14.75 2 12s1-5.1 2.95-7.05C6.9 3 9.25 2 12 2z"/></svg>');
|
|
80
|
+
--md-admonition-icon--bug: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 00-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 00-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z"/></svg>');
|
|
81
|
+
--md-admonition-icon--example: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 01.75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z"/></svg>');
|
|
82
|
+
--md-admonition-icon--quote: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z"/></svg>');
|
|
83
|
+
--md-footnotes-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.42L5.83 13H21V7h-2z"/></svg>');
|
|
84
|
+
--md-details-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
85
|
+
--md-tasklist-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>');
|
|
86
|
+
--md-tasklist-icon--checked: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
87
|
+
--md-nav-icon--prev: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>');
|
|
88
|
+
--md-nav-icon--next: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
89
|
+
--md-toc-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>');
|
|
90
|
+
--md-clipboard-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1z"/></svg>');
|
|
91
|
+
--md-search-result-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7c-.41-.25-.8-.56-1.14-.9-.33-.33-.61-.7-.86-1.1H6V4h7v5h5v1.18c.71.16 1.39.43 2 .82V8l-6-6m6.31 16.9c1.33-2.11.69-4.9-1.4-6.22-2.11-1.33-4.91-.68-6.22 1.4-1.34 2.11-.69 4.89 1.4 6.22 1.46.93 3.32.93 4.79.02L22 23.39 23.39 22l-3.08-3.1m-3.81.1a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5z"/></svg>');
|
|
92
|
+
--md-source-forks-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 2.122a2.25 2.25 0 1 0-1.5 0v.878A2.25 2.25 0 0 0 5.75 8.5h1.5v2.128a2.251 2.251 0 1 0 1.5 0V8.5h1.5a2.25 2.25 0 0 0 2.25-2.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75h-4.5A.75.75 0 0 1 5 6.25v-.878zm3.75 7.378a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm3-8.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z"/></svg>');
|
|
93
|
+
--md-source-repositories-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 1 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 0 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 0 1 1-1h8zM5 12.25v3.25a.25.25 0 0 0 .4.2l1.45-1.087a.25.25 0 0 1 .3 0L8.6 15.7a.25.25 0 0 0 .4-.2v-3.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25z"/></svg>');
|
|
94
|
+
--md-source-stars-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694v.001z"/></svg>');
|
|
95
|
+
--md-source-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 0 1 .25-.25h5.025a.25.25 0 0 1 .177.073l6.25 6.25a.25.25 0 0 1 0 .354l-5.025 5.025a.25.25 0 0 1-.354 0l-6.25-6.25a.25.25 0 0 1-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775zM6 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>');
|
|
96
|
+
--md-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="m310.6 246.6-127.1 128c-7.1 6.3-15.3 9.4-23.5 9.4s-16.38-3.125-22.63-9.375l-127.1-128C.224 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75s3.12 25.75-6.08 34.85z"/></svg>');
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:host > * {
|
|
100
|
+
/* CODE */
|
|
101
|
+
--md-code-fg-color: ${P.palette.text.primary};
|
|
102
|
+
--md-code-bg-color: ${P.palette.background.paper};
|
|
103
|
+
--md-code-hl-color: ${(0,S.Fq)(P.palette.warning.main,.5)};
|
|
104
|
+
--md-code-hl-keyword-color: ${Ze?P.palette.primary.light:P.palette.primary.dark};
|
|
105
|
+
--md-code-hl-function-color: ${Ze?P.palette.secondary.light:P.palette.secondary.dark};
|
|
106
|
+
--md-code-hl-string-color: ${Ze?P.palette.success.light:P.palette.success.dark};
|
|
107
|
+
--md-code-hl-number-color: ${Ze?P.palette.error.light:P.palette.error.dark};
|
|
108
|
+
--md-code-hl-constant-color: var(--md-code-hl-function-color);
|
|
109
|
+
--md-code-hl-special-color: var(--md-code-hl-function-color);
|
|
110
|
+
--md-code-hl-name-color: var(--md-code-fg-color);
|
|
111
|
+
--md-code-hl-comment-color: var(--md-default-fg-color--light);
|
|
112
|
+
--md-code-hl-generic-color: var(--md-default-fg-color--light);
|
|
113
|
+
--md-code-hl-variable-color: var(--md-default-fg-color--light);
|
|
114
|
+
--md-code-hl-operator-color: var(--md-default-fg-color--light);
|
|
115
|
+
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
|
|
116
|
+
|
|
117
|
+
/* TYPESET */
|
|
118
|
+
--md-typeset-font-size: 1rem;
|
|
119
|
+
--md-typeset-color: var(--md-default-fg-color);
|
|
120
|
+
--md-typeset-a-color: var(--md-accent-fg-color);
|
|
121
|
+
--md-typeset-table-color: ${P.palette.text.primary};
|
|
122
|
+
--md-typeset-del-color: ${Ze?(0,S.Fq)(P.palette.error.dark,.5):(0,S.Fq)(P.palette.error.light,.5)};
|
|
123
|
+
--md-typeset-ins-color: ${Ze?(0,S.Fq)(P.palette.success.dark,.5):(0,S.Fq)(P.palette.success.light,.5)};
|
|
124
|
+
--md-typeset-mark-color: ${Ze?(0,S.Fq)(P.palette.warning.dark,.5):(0,S.Fq)(P.palette.warning.light,.5)};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@media screen and (max-width: 76.1875em) {
|
|
128
|
+
:host > * {
|
|
129
|
+
/* TYPESET */
|
|
130
|
+
--md-typeset-font-size: .9rem;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@media screen and (max-width: 600px) {
|
|
135
|
+
:host > * {
|
|
136
|
+
/* TYPESET */
|
|
137
|
+
--md-typeset-font-size: .7rem;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
`}),je({css:`
|
|
141
|
+
body {
|
|
142
|
+
--md-text-color: var(--md-default-fg-color);
|
|
143
|
+
--md-text-link-color: var(--md-accent-fg-color);
|
|
144
|
+
--md-text-font-family: ${P.typography.fontFamily};
|
|
145
|
+
font-family: var(--md-text-font-family);
|
|
146
|
+
background-color: unset;
|
|
147
|
+
}
|
|
148
|
+
`}),je({css:`
|
|
149
|
+
.md-grid {
|
|
150
|
+
max-width: 100%;
|
|
151
|
+
margin: 0;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.md-nav {
|
|
155
|
+
font-size: calc(var(--md-typeset-font-size) * 0.9);
|
|
156
|
+
}
|
|
157
|
+
.md-nav__link {
|
|
158
|
+
display: flex;
|
|
159
|
+
align-items: center;
|
|
160
|
+
justify-content: space-between;
|
|
161
|
+
}
|
|
162
|
+
.md-nav__icon {
|
|
163
|
+
height: 20px !important;
|
|
164
|
+
width: 20px !important;
|
|
165
|
+
margin-left:${P.spacing(1)}px;
|
|
166
|
+
}
|
|
167
|
+
.md-nav__icon svg {
|
|
168
|
+
margin: 0;
|
|
169
|
+
width: 20px !important;
|
|
170
|
+
height: 20px !important;
|
|
171
|
+
}
|
|
172
|
+
.md-nav__icon:after {
|
|
173
|
+
width: 20px !important;
|
|
174
|
+
height: 20px !important;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.md-main__inner {
|
|
178
|
+
margin-top: 0;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.md-sidebar {
|
|
182
|
+
bottom: 75px;
|
|
183
|
+
position: fixed;
|
|
184
|
+
width: 16rem;
|
|
185
|
+
overflow-y: auto;
|
|
186
|
+
overflow-x: hidden;
|
|
187
|
+
scrollbar-color: rgb(193, 193, 193) #eee;
|
|
188
|
+
scrollbar-width: thin;
|
|
189
|
+
}
|
|
190
|
+
.md-sidebar .md-sidebar__scrollwrap {
|
|
191
|
+
width: calc(16rem - 10px);
|
|
192
|
+
}
|
|
193
|
+
.md-sidebar--secondary {
|
|
194
|
+
right: ${P.spacing(3)}px;
|
|
195
|
+
}
|
|
196
|
+
.md-sidebar::-webkit-scrollbar {
|
|
197
|
+
width: 5px;
|
|
198
|
+
}
|
|
199
|
+
.md-sidebar::-webkit-scrollbar-button {
|
|
200
|
+
width: 5px;
|
|
201
|
+
height: 5px;
|
|
202
|
+
}
|
|
203
|
+
.md-sidebar::-webkit-scrollbar-track {
|
|
204
|
+
background: #eee;
|
|
205
|
+
border: 1 px solid rgb(250, 250, 250);
|
|
206
|
+
box-shadow: 0px 0px 3px #dfdfdf inset;
|
|
207
|
+
border-radius: 3px;
|
|
208
|
+
}
|
|
209
|
+
.md-sidebar::-webkit-scrollbar-thumb {
|
|
210
|
+
width: 5px;
|
|
211
|
+
background: rgb(193, 193, 193);
|
|
212
|
+
border: transparent;
|
|
213
|
+
border-radius: 3px;
|
|
214
|
+
}
|
|
215
|
+
.md-sidebar::-webkit-scrollbar-thumb:hover {
|
|
216
|
+
background: rgb(125, 125, 125);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.md-content {
|
|
220
|
+
max-width: calc(100% - 16rem * 2);
|
|
221
|
+
margin-left: 16rem;
|
|
222
|
+
margin-bottom: 50px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.md-footer {
|
|
226
|
+
position: fixed;
|
|
227
|
+
bottom: 0px;
|
|
228
|
+
}
|
|
229
|
+
.md-footer__title {
|
|
230
|
+
background-color: unset;
|
|
231
|
+
}
|
|
232
|
+
.md-footer-nav__link {
|
|
233
|
+
width: 16rem;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.md-dialog {
|
|
237
|
+
background-color: unset;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
@media screen and (min-width: 76.25em) {
|
|
241
|
+
.md-sidebar {
|
|
242
|
+
height: auto;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
@media screen and (max-width: 76.1875em) {
|
|
247
|
+
.md-nav {
|
|
248
|
+
transition: none !important;
|
|
249
|
+
background-color: var(--md-default-bg-color)
|
|
250
|
+
}
|
|
251
|
+
.md-nav--primary .md-nav__title {
|
|
252
|
+
cursor: auto;
|
|
253
|
+
color: var(--md-default-fg-color);
|
|
254
|
+
font-weight: 700;
|
|
255
|
+
white-space: normal;
|
|
256
|
+
line-height: 1rem;
|
|
257
|
+
height: auto;
|
|
258
|
+
display: flex;
|
|
259
|
+
flex-flow: column;
|
|
260
|
+
row-gap: 1.6rem;
|
|
261
|
+
padding: 1.2rem .8rem .8rem;
|
|
262
|
+
background-color: var(--md-default-bg-color);
|
|
263
|
+
}
|
|
264
|
+
.md-nav--primary .md-nav__title~.md-nav__list {
|
|
265
|
+
box-shadow: none;
|
|
266
|
+
}
|
|
267
|
+
.md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
|
|
268
|
+
border-top: none;
|
|
269
|
+
}
|
|
270
|
+
.md-nav--primary .md-nav__title .md-nav__button {
|
|
271
|
+
display: none;
|
|
272
|
+
}
|
|
273
|
+
.md-nav--primary .md-nav__title .md-nav__icon {
|
|
274
|
+
color: var(--md-default-fg-color);
|
|
275
|
+
position: static;
|
|
276
|
+
height: auto;
|
|
277
|
+
margin: 0 0 0 -0.2rem;
|
|
278
|
+
}
|
|
279
|
+
.md-nav--primary > .md-nav__title [for="none"] {
|
|
280
|
+
padding-top: 0;
|
|
281
|
+
}
|
|
282
|
+
.md-nav--primary .md-nav__item {
|
|
283
|
+
border-top: none;
|
|
284
|
+
}
|
|
285
|
+
.md-nav--primary :is(.md-nav__title,.md-nav__item) {
|
|
286
|
+
font-size : var(--md-typeset-font-size);
|
|
287
|
+
}
|
|
288
|
+
.md-nav .md-source {
|
|
289
|
+
display: none;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.md-sidebar {
|
|
293
|
+
height: 100%;
|
|
294
|
+
}
|
|
295
|
+
.md-sidebar--primary {
|
|
296
|
+
width: 12.1rem !important;
|
|
297
|
+
z-index: 200;
|
|
298
|
+
left: ${Mt?"calc(-12.1rem + 242px)":"calc(-12.1rem + 72px)"} !important;
|
|
299
|
+
}
|
|
300
|
+
.md-sidebar--secondary:not([hidden]) {
|
|
301
|
+
display: none;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.md-content {
|
|
305
|
+
max-width: 100%;
|
|
306
|
+
margin-left: 0;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.md-header__button {
|
|
310
|
+
margin: 0.4rem 0;
|
|
311
|
+
margin-left: 0.4rem;
|
|
312
|
+
padding: 0;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.md-overlay {
|
|
316
|
+
left: 0;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.md-footer {
|
|
320
|
+
position: static;
|
|
321
|
+
padding-left: 0;
|
|
322
|
+
}
|
|
323
|
+
.md-footer-nav__link {
|
|
324
|
+
/* footer links begin to overlap at small sizes without setting width */
|
|
325
|
+
width: 50%;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
@media screen and (max-width: 600px) {
|
|
330
|
+
.md-sidebar--primary {
|
|
331
|
+
left: -12.1rem !important;
|
|
332
|
+
width: 12.1rem;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
`}),je({css:`
|
|
336
|
+
.md-typeset {
|
|
337
|
+
font-size: var(--md-typeset-font-size);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
${vt.reduce((Pt,qt)=>{const Wt=P.typography[qt],{lineHeight:$t,fontFamily:_t,fontWeight:rn,fontSize:en}=Wt,Vt=Jt=>{let cn=1;return typeof Jt=="number"&&(cn=Jt/16*.6),typeof Jt=="string"&&(cn=Jt.replace("rem","")),`calc(${cn} * var(--md-typeset-font-size))`};return Pt.concat(`
|
|
341
|
+
.md-typeset ${qt} {
|
|
342
|
+
color: var(--md-default-fg-color);
|
|
343
|
+
line-height: ${$t};
|
|
344
|
+
font-family: ${_t};
|
|
345
|
+
font-weight: ${rn};
|
|
346
|
+
font-size: ${Vt(en)};
|
|
347
|
+
}
|
|
348
|
+
`)},"")}
|
|
349
|
+
|
|
350
|
+
.md-typeset .md-content__button {
|
|
351
|
+
color: var(--md-default-fg-color);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.md-typeset hr {
|
|
355
|
+
border-bottom: 0.05rem dotted ${P.palette.divider};
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.md-typeset details {
|
|
359
|
+
font-size: var(--md-typeset-font-size) !important;
|
|
360
|
+
}
|
|
361
|
+
.md-typeset details summary {
|
|
362
|
+
padding-left: 2.5rem !important;
|
|
363
|
+
}
|
|
364
|
+
.md-typeset details summary:before,
|
|
365
|
+
.md-typeset details summary:after {
|
|
366
|
+
top: 50% !important;
|
|
367
|
+
width: 20px !important;
|
|
368
|
+
height: 20px !important;
|
|
369
|
+
transform: rotate(0deg) translateY(-50%) !important;
|
|
370
|
+
}
|
|
371
|
+
.md-typeset details[open] > summary:after {
|
|
372
|
+
transform: rotate(90deg) translateX(-50%) !important;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.md-typeset blockquote {
|
|
376
|
+
color: var(--md-default-fg-color--light);
|
|
377
|
+
border-left: 0.2rem solid var(--md-default-fg-color--light);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.md-typeset table:not([class]) {
|
|
381
|
+
font-size: var(--md-typeset-font-size);
|
|
382
|
+
border: 1px solid var(--md-default-fg-color);
|
|
383
|
+
border-bottom: none;
|
|
384
|
+
border-collapse: collapse;
|
|
385
|
+
}
|
|
386
|
+
.md-typeset table:not([class]) th {
|
|
387
|
+
font-weight: bold;
|
|
388
|
+
}
|
|
389
|
+
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
|
|
390
|
+
border-bottom: 1px solid var(--md-default-fg-color);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.md-typeset pre > code::-webkit-scrollbar-thumb {
|
|
394
|
+
background-color: hsla(0, 0%, 0%, 0.32);
|
|
395
|
+
}
|
|
396
|
+
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
397
|
+
background-color: hsla(0, 0%, 0%, 0.87);
|
|
398
|
+
}
|
|
399
|
+
`}),je({css:`
|
|
400
|
+
/*
|
|
401
|
+
Disable CSS animations on link colors as they lead to issues in dark mode.
|
|
402
|
+
The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
|
|
403
|
+
*/
|
|
404
|
+
.md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
405
|
+
transition: none;
|
|
406
|
+
}
|
|
407
|
+
`}),je({css:`
|
|
408
|
+
/* HIGHLIGHT */
|
|
409
|
+
.highlight .md-clipboard:after {
|
|
410
|
+
content: unset;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.highlight .nx {
|
|
414
|
+
color: ${Ze?"#ff53a3":"#ec407a"};
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/* CODE HILITE */
|
|
418
|
+
.codehilite .gd {
|
|
419
|
+
background-color: ${Ze?"rgba(248,81,73,0.65)":"#fdd"};
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.codehilite .gi {
|
|
423
|
+
background-color: ${Ze?"rgba(46,160,67,0.65)":"#dfd"};
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/* TABBED */
|
|
427
|
+
.tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
|
|
428
|
+
.tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
|
|
429
|
+
.tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
|
|
430
|
+
.tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
|
|
431
|
+
.tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
|
|
432
|
+
.tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
|
|
433
|
+
.tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
|
|
434
|
+
.tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
|
|
435
|
+
.tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
|
|
436
|
+
.tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
|
|
437
|
+
.tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
|
|
438
|
+
.tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
|
|
439
|
+
.tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
|
|
440
|
+
.tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
|
|
441
|
+
.tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
|
|
442
|
+
.tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
|
|
443
|
+
.tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
|
|
444
|
+
.tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
|
|
445
|
+
.tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
|
|
446
|
+
.tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
|
|
447
|
+
color: var(--md-accent-fg-color);
|
|
448
|
+
border-color: var(--md-accent-fg-color);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/* TASK-LIST */
|
|
452
|
+
.task-list-control .task-list-indicator::before {
|
|
453
|
+
background-color: ${P.palette.action.disabledBackground};
|
|
454
|
+
}
|
|
455
|
+
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
456
|
+
background-color: ${P.palette.success.main};
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/* ADMONITION */
|
|
460
|
+
.admonition {
|
|
461
|
+
font-size: var(--md-typeset-font-size) !important;
|
|
462
|
+
}
|
|
463
|
+
.admonition .admonition-title {
|
|
464
|
+
padding-left: 2.5rem !important;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.admonition .admonition-title:before {
|
|
468
|
+
top: 50% !important;
|
|
469
|
+
width: 20px !important;
|
|
470
|
+
height: 20px !important;
|
|
471
|
+
transform: translateY(-50%) !important;
|
|
472
|
+
}
|
|
473
|
+
`})]),[re,ge,D,de,Z,ce,P,Ze,Mt]),ht=(0,r.useCallback)(async Qe=>bt(Qe,[ut(),An(P),Ft({baseUrl:window.location.origin,onClick:(Xe,Pt)=>{var $t;const qt=Xe.ctrlKey||Xe.metaKey,Wt=new URL(Pt);Wt.hash?qt?window.open(`${Wt.pathname}${Wt.hash}`,"_blank"):(R(`${Wt.pathname}${Wt.hash}`),($t=Qe==null?void 0:Qe.querySelector(`#${Wt.hash.slice(1)}`))==null||$t.scrollIntoView()):qt?window.open(Wt.pathname,"_blank"):R(Wt.pathname)}}),un({docStorageUrl:await ce.getApiOrigin(),onLoading:Xe=>{Xe.style.setProperty("opacity","0")},onLoaded:Xe=>{var Pt;Xe.style.removeProperty("opacity"),(Pt=Xe.querySelector(".md-nav__title"))==null||Pt.removeAttribute("for"),At(Array.from(Xe.querySelectorAll(".md-sidebar")))}})]),[P,R,ce]);return(0,r.useEffect)(()=>{if(!we)return()=>{};let Qe=!0;return Yt(we,pe).then(async Xe=>{if(!(Xe!=null&&Xe.innerHTML)||!Qe)return;window.scroll({top:0});const Pt=await ht(Xe);lt(Pt)}),()=>{Qe=!1}},[we,pe,Yt,ht]),st},Ct=(0,c.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),dt=We(z=>{const{withSearch:R=!0,onReady:P}=z,ce=Ct(),de=(0,s.$L)(),{entityRef:Z,shadowRoot:D,setShadowRoot:re}=(0,s.x1)(),ge=at(Z),[Pe,pe]=(0,r.useState)((0,t.Ue)({...(0,m.Z)(),insertionPoint:void 0})),we=(0,r.useCallback)(Mt=>{var Rt;if(!ge||!Mt)return;pe((0,t.Ue)({...(0,m.Z)(),insertionPoint:ge.querySelector("head")||void 0}));const ke=(Rt=Mt.shadowRoot)!=null?Rt:Mt.attachShadow({mode:"open"});ke.innerHTML="",ke.appendChild(ge),re(ke),P instanceof Function&&P()},[ge,re,P]),Ze=D==null?void 0:D.querySelector('[data-md-component="content"]'),qe=D==null?void 0:D.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]'),At=D==null?void 0:D.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]'),st=document.createElement("div");qe==null||qe.prepend(st);const lt=document.createElement("div");return At==null||At.prepend(lt),ge?r.createElement(f.Content,null,r.createElement(h.Z,{container:!0},r.createElement(h.Z,{xs:12,item:!0},r.createElement(u.N,null)),R&&r.createElement(h.Z,{className:ce.search,xs:"auto",item:!0},r.createElement(y.S,{entityId:Z})),r.createElement(h.Z,{xs:12,item:!0},r.createElement(a.ZP,{jss:Pe,sheetsManager:new Map},r.createElement("div",{ref:we,"data-testid":"techdocs-native-shadowroot"}),r.createElement(v.Z,{container:st},de.renderComponentsByLocation(s.oZ.PrimarySidebar)),r.createElement(v.Z,{container:Ze},de.renderComponentsByLocation(s.oZ.Content)),r.createElement(v.Z,{container:lt},de.renderComponentsByLocation(s.oZ.SecondarySidebar)))))):r.createElement(f.Content,null,r.createElement(f.Progress,null))}),sn=null},99954:function(q,i,e){"use strict";e.d(i,{S:function(){return A}});var r=e(2784),t=e(18671),c=e(98069),h=e(73250),v=e(47955),m=e(53479),a=e(48023),s=e(9118),f=e(36964),y=e(68725);const u=r.createElement(c.Z,{animation:"wave",variant:"text",height:40}),A=b=>{const{children:S}=b,F=(0,v.$L)(),_=(0,f.useApi)(f.configApiRef),{title:M,setTitle:L,subtitle:$,setSubtitle:B,entityRef:x,metadata:{value:J},entityMetadata:{value:te}}=(0,v.x1)();(0,r.useEffect)(()=>{!J||(L(ot=>{const{site_name:tt}=J;return ot||tt}),B(ot=>{let{site_description:tt}=J;return(!tt||tt==="None")&&(tt="Home"),ot||tt}))},[J,L,B]);const ve=_.getOptional("app.title")||"Backstage",Ve=[$,M,ve].filter(Boolean).join(" | "),{locationMetadata:We,spec:ue}=te||{},Ee=ue==null?void 0:ue.lifecycle,Ie=te?(0,m.getEntityRelations)(te,a.S4):[],He=(0,f.useRouteRef)(y._Z)(),Ye=r.createElement(r.Fragment,null,r.createElement(s.HeaderLabel,{label:"Component",value:r.createElement(m.EntityRefLink,{color:"inherit",entityRef:x,defaultKind:"Component"})}),Ie.length>0&&r.createElement(s.HeaderLabel,{label:"Owner",value:r.createElement(m.EntityRefLinks,{color:"inherit",entityRefs:Ie,defaultKind:"group"})}),Ee?r.createElement(s.HeaderLabel,{label:"Lifecycle",value:Ee}):null,We&&We.type!=="dir"&&We.type!=="file"?r.createElement(s.HeaderLabel,{label:"",value:r.createElement("a",{href:We.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(h.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return r.createElement(s.Header,{type:"Documentation",typeLink:He,title:M||u,subtitle:$||u},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,Ve)),Ye,S,F.renderComponentsByLocation(v.oZ.Header))}},16172:function(q,i,e){"use strict";e.d(i,{b:function(){return a}});var r=e(2784),t=e(79692),c=e(15223),h=e(95544),v=e(47955);const m=(0,t.Z)(s=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:s.spacing(3,3,0)}})),a=({toolbarProps:s})=>{const f=m(),u=(0,v.$L)().renderComponentsByLocation(v.oZ.Subheader);return u?r.createElement(c.Z,{classes:f,...s},u&&r.createElement(h.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},u)):null}},23738:function(q,i,e){"use strict";e.d(i,{N:function(){return B}});var r=e(2784),t=e(9118),c=e(79692),h=e(4614),v=e(77277),m=e(99688),a=e(12420),s=e(60905),f=e(90436),y=e(61837),u=e(4190),A=e(87685);const b=(0,c.Z)(x=>(0,a.Z)({paper:{width:"100%",[x.breakpoints.up("sm")]:{width:"75%"},[x.breakpoints.up("md")]:{width:"50%"},padding:x.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:x.palette.background.default}})),S=({buildLog:x,onClose:J})=>{const te=b(),ve=x.length===0?"Waiting for logs...":x.join(`
|
|
474
|
+
`);return r.createElement(s.Z,{container:!0,direction:"column",className:te.root,spacing:0,wrap:"nowrap"},r.createElement(s.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(f.Z,{variant:"h5"},"Build Details"),r.createElement(y.Z,{key:"dismiss",title:"Close the drawer",onClick:J,color:"inherit"},r.createElement(A.Z,null))),r.createElement(t.LogViewer,{text:ve,classes:{root:te.logs}}))},F=({buildLog:x})=>{const J=b(),[te,ve]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(v.Z,{color:"inherit",onClick:()=>ve(!0)},"Show Build Logs"),r.createElement(u.ZP,{classes:{paper:J.paper},anchor:"right",open:te,onClose:()=>ve(!1)},r.createElement(S,{buildLog:x,onClose:()=>ve(!1)})))};var _=e(36964);const M=({errorMessage:x})=>{const J=(0,_.useApi)(_.configApiRef).getOptionalString("techdocs.builder");let te="";return J!=="local"&&(te="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(t.ErrorPage,{status:"404",statusMessage:x||"Documentation not found",additionalInfo:te})};var L=e(28626);const $=(0,c.Z)(x=>({root:{marginBottom:x.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),B=()=>{let x=null;const J=$(),{state:te,contentReload:ve,contentErrorMessage:Ve,syncErrorMessage:We,buildLog:ue}=(0,L.DK)(),Ee=te==="CHECKING"?r.createElement(t.Progress,null):null;return te==="INITIAL_BUILD"&&(x=r.createElement(m.Z,{classes:{root:J.root},variant:"outlined",severity:"info",icon:r.createElement(h.Z,{size:"24px"}),action:r.createElement(F,{buildLog:ue})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),te==="CONTENT_STALE_REFRESHING"&&(x=r.createElement(m.Z,{variant:"outlined",severity:"info",icon:r.createElement(h.Z,{size:"24px"}),action:r.createElement(F,{buildLog:ue}),classes:{root:J.root}},"A newer version of this documentation is being prepared and will be available shortly.")),te==="CONTENT_STALE_READY"&&(x=r.createElement(m.Z,{variant:"outlined",severity:"success",action:r.createElement(v.Z,{color:"inherit",onClick:()=>ve()},"Refresh"),classes:{root:J.root}},"A newer version of this documentation is now available, please refresh to view.")),te==="CONTENT_STALE_ERROR"&&(x=r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(F,{buildLog:ue}),classes:{root:J.root,message:J.message}},"Building a newer version of this documentation failed."," ",We)),te==="CONTENT_NOT_FOUND"&&(x=r.createElement(r.Fragment,null,We&&r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(F,{buildLog:ue}),classes:{root:J.root,message:J.message}},"Building a newer version of this documentation failed."," ",We),r.createElement(M,{errorMessage:Ve}))),r.createElement(r.Fragment,null,Ee,x)}},96393:function(q,i,e){"use strict";e.d(i,{Fq:function(){return c.Fq},SE:function(){return t.S}});var r=e(26220),t=e(99954),c=e(28626),h=e(16172),v=e(23738)},68725:function(q,i,e){"use strict";e.d(i,{Fw:function(){return c},_Z:function(){return t},pd:function(){return h}});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"]}),h=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},10459:function(q,i,e){"use strict";e.d(i,{S:function(){return sn}});var r=e(2784),t=e(79692),c=e(49378),h=e(38402),v=e(85256),m=e(9118),a=e(15277),s=e.n(a);const f=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),y=z=>{const{result:R,lineClamp:P=5,asListItem:ce=!0,asLink:de=!0,title:Z}=z,D=f(),re=()=>{var pe;return r.createElement(c.Z,{className:D.itemText,primaryTypographyProps:{variant:"h6"},primary:Z||`${R.title} | ${(pe=R.entityTitle)!=null?pe:R.name} docs`,secondary:r.createElement(s(),{line:P,truncateText:"\u2026",text:R.text,element:"span"})})},ge=({children:pe})=>de?r.createElement(m.Link,{to:R.location},pe):r.createElement(r.Fragment,null,pe),Pe=({children:pe})=>ce?r.createElement(r.Fragment,null,r.createElement(h.Z,{alignItems:"flex-start",className:D.flexContainer},pe),r.createElement(v.Z,{component:"li"})):r.createElement(r.Fragment,null,pe);return r.createElement(ge,null,r.createElement(Pe,null,r.createElement(re,null)))};var u=e(36964);const A=(0,u.createApiRef)({id:"plugin.search.queryservice"});var b=e(76241),S=e(64279),F=e(1849);const _=(0,b.CT)("search-context"),M=()=>{const z=(0,r.useContext)(_);if(!z)throw new Error("useSearch must be used within a SearchContextProvider");const R=z.atVersion(1);if(!R)throw new Error("No SearchContext v1 found");return R},L=()=>useContext(_)!==void 0,$={term:"",pageCursor:void 0,filters:{},types:[]},B=z=>{var Yt,ht,Qe,Xe;const{initialState:R=$,children:P}=z,ce=(0,u.useApi)(A),[de,Z]=(0,r.useState)(R.pageCursor),[D,re]=(0,r.useState)(R.filters),[ge,Pe]=(0,r.useState)(R.term),[pe,we]=(0,r.useState)(R.types),Ze=(0,F.Z)(ge),qe=(0,S.default)(()=>ce.query({term:ge,filters:D,pageCursor:de,types:pe}),[ge,D,pe,de]),At=!qe.loading&&!qe.error&&((Yt=qe.value)==null?void 0:Yt.nextPageCursor),st=!qe.loading&&!qe.error&&((ht=qe.value)==null?void 0:ht.previousPageCursor),lt=(0,r.useCallback)(()=>{var Pt;Z((Pt=qe.value)==null?void 0:Pt.nextPageCursor)},[(Qe=qe.value)==null?void 0:Qe.nextPageCursor]),Mt=(0,r.useCallback)(()=>{var Pt;Z((Pt=qe.value)==null?void 0:Pt.previousPageCursor)},[(Xe=qe.value)==null?void 0:Xe.previousPageCursor]);(0,r.useEffect)(()=>{ge&&Ze&&ge!==Ze&&Z(void 0)},[ge,Ze,R.pageCursor]);const ke={result:qe,filters:D,setFilters:re,term:ge,setTerm:Pe,types:pe,setTypes:we,pageCursor:de,setPageCursor:Z,fetchNextPage:At?lt:void 0,fetchPreviousPage:st?Mt:void 0},Rt=(0,b.EI)({1:ke});return r.createElement(u.AnalyticsContext,{attributes:{searchTypes:pe.sort().join(",")}},r.createElement(_.Provider,{value:Rt,children:P}))};var x=e(49208),J=e(62159);class te{constructor(R){Q(this,"config");this.config=new ConfigReader(R)}has(R){return this.config.has(R)}keys(){return this.config.keys()}get(R){return this.config.get(R)}getOptional(R){return this.config.getOptional(R)}getConfig(R){return this.config.getConfig(R)}getOptionalConfig(R){return this.config.getOptionalConfig(R)}getConfigArray(R){return this.config.getConfigArray(R)}getOptionalConfigArray(R){return this.config.getOptionalConfigArray(R)}getNumber(R){return this.config.getNumber(R)}getOptionalNumber(R){return this.config.getOptionalNumber(R)}getBoolean(R){return this.config.getBoolean(R)}getOptionalBoolean(R){return this.config.getOptionalBoolean(R)}getString(R){return this.config.getString(R)}getOptionalString(R){return this.config.getOptionalString(R)}getStringArray(R){return this.config.getStringArray(R)}getOptionalStringArray(R){return this.config.getOptionalStringArray(R)}}const ve={subscribe:()=>({unsubscribe:()=>{},closed:!0}),[Symbol.observable](){return this}};class Ve{constructor(R={}){Q(this,"errors",new Array);Q(this,"waiters",new Set);this.options=R}post(R,P){if(this.options.collect){this.errors.push({error:R,context:P});for(const ce of this.waiters)ce.pattern.test(R.message)&&(this.waiters.delete(ce),ce.resolve({error:R,context:P}));return}throw new Error(`MockErrorApi received unexpected error, ${R}`)}error$(){return ve}getErrors(){return this.errors}waitForError(R,P=2e3){return new Promise((ce,de)=>{setTimeout(()=>{de(new Error("Timed out waiting for error"))},P),this.waiters.add({resolve:ce,pattern:R})})}}var We=e(96279);class ue{constructor(R){Q(this,"implementation");this.implementation=Ee(R)}get fetch(){return this.implementation.fetch}}function Ee(z){return createFetchApi({baseImplementation:Ie(z),middleware:[He(z),Ye(z)].filter(R=>Boolean(R))})}function Ie(z){const R=z==null?void 0:z.baseImplementation;if(R){if(R==="none")return()=>Promise.resolve(new Response)}else return crossFetch;return R}function He(z){const R=z==null?void 0:z.resolvePluginProtocol;if(!!R)return FetchMiddlewares.resolvePluginProtocol({discoveryApi:R.discoveryApi})}function Ye(z){const R=z==null?void 0:z.injectIdentityAuth;if(!R)return;const P="token"in R?{getCredentials:async()=>({token:R.token})}:R.identityApi;return FetchMiddlewares.injectIdentityAuth({identityApi:P,allowUrl:()=>!0})}var ot=e(40749);class tt{constructor(R=()=>AuthorizeResult.ALLOW){this.requestHandler=R}async authorize(R){return{result:this.requestHandler(R)}}}var Ce=e(82394),Ne=e.n(Ce);class Ue{constructor(R,P,ce){Q(this,"namespace");Q(this,"data");Q(this,"bucketStorageApis");Q(this,"subscribers",new Set);Q(this,"observable",new(Ne())(R=>(this.subscribers.add(R),()=>{this.subscribers.delete(R)})));this.namespace=R,this.bucketStorageApis=P,this.data={...ce}}static create(R){return new Ue("",new Map,R)}forBucket(R){return this.bucketStorageApis.has(R)||this.bucketStorageApis.set(R,new Ue(`${this.namespace}/${R}`,this.bucketStorageApis,this.data)),this.bucketStorageApis.get(R)}snapshot(R){if(this.data.hasOwnProperty(this.getKeyName(R))){const P=this.data[this.getKeyName(R)];return{key:R,presence:"present",value:P}}return{key:R,presence:"absent",value:void 0}}async set(R,P){const ce=JSON.parse(JSON.stringify(P),(de,Z)=>(typeof Z=="object"&&Z!==null&&Object.freeze(Z),Z));this.data[this.getKeyName(R)]=ce,this.notifyChanges({key:R,presence:"present",value:ce})}async remove(R){delete this.data[this.getKeyName(R)],this.notifyChanges({key:R,presence:"absent",value:void 0})}observe$(R){return this.observable.filter(({key:P})=>P===R)}getKeyName(R){return`${this.namespace}/${encodeURIComponent(R)}`}notifyChanges(R){for(const P of this.subscribers)P.next(R)}}var pt=e(28981),Ke=e(83677),Ft=e(63751);async function mt(z){let R;return await act(async()=>{R=render(z)}),R}const Bt=[(0,u.createApiFactory)({api:u.discoveryApiRef,deps:{configApi:u.configApiRef},factory:({configApi:z})=>x.UrlPatternDiscovery.compile(`${z.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,u.createApiFactory)(u.alertApiRef,new x.AlertApiForwarder),(0,u.createApiFactory)(u.analyticsApiRef,new x.NoOpAnalyticsApi),(0,u.createApiFactory)({api:u.errorApiRef,deps:{alertApi:u.alertApiRef},factory:({alertApi:z})=>{const R=new x.ErrorAlerter(z,new x.ErrorApiForwarder);return x.UnhandledErrorForwarder.forward(R,{hidden:!1}),R}}),(0,u.createApiFactory)({api:u.storageApiRef,deps:{errorApi:u.errorApiRef},factory:({errorApi:z})=>x.WebStorage.create({errorApi:z})}),(0,u.createApiFactory)(u.oauthRequestApiRef,new x.OAuthRequestManager),(0,u.createApiFactory)({api:u.googleAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.GoogleAuth.create({discoveryApi:z,oauthRequestApi:R,environment:P.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.microsoftAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.MicrosoftAuth.create({discoveryApi:z,oauthRequestApi:R,environment:P.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.githubAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.GithubAuth.create({discoveryApi:z,oauthRequestApi:R,defaultScopes:["read:user"],environment:P.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oktaAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.OktaAuth.create({discoveryApi:z,oauthRequestApi:R,environment:P.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.gitlabAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.GitlabAuth.create({discoveryApi:z,oauthRequestApi:R,environment:P.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oneloginAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.OneLoginAuth.create({discoveryApi:z,oauthRequestApi:R,environment:P.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.bitbucketAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.BitbucketAuth.create({discoveryApi:z,oauthRequestApi:R,defaultScopes:["team"],environment:P.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.atlassianAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.AtlassianAuth.create({discoveryApi:z,oauthRequestApi:R,environment:P.getOptionalString("auth.environment")})})],Ht=[(0,u.createApiFactory)(u.errorApiRef,new Ve),(0,u.createApiFactory)(u.storageApiRef,Ue.create())],Ot={"kind:api":Ke.Z,"kind:component":Ke.Z,"kind:domain":Ke.Z,"kind:group":Ke.Z,"kind:location":Ke.Z,"kind:system":Ke.Z,"kind:user":Ke.Z,brokenImage:Ke.Z,catalog:Ke.Z,scaffolder:Ke.Z,techdocs:Ke.Z,search:Ke.Z,chat:Ke.Z,dashboard:Ke.Z,docs:Ke.Z,email:Ke.Z,github:Ke.Z,group:Ke.Z,help:Ke.Z,user:Ke.Z,warning:Ke.Z},jt=({error:z})=>{throw new Error(`Reached ErrorBoundaryFallback Page with error, ${z}`)},Zt=()=>{throw new Error("Reached NotFound Page")},wt=({step:z,error:R})=>{throw new Error(`Reached BootError Page at step ${z} with error ${R}`)},An=()=>React.createElement("div",{"data-testid":"progress"}),Gt=z=>null;function Et(z){return String(z).includes("{type=external,")}function un(z,R={}){var Pe;const{routeEntries:P=["/"]}=R,ce=new Map,de=createSpecializedApp({apis:mockApis,defaultApis,configLoader:!1,components:{Progress:An,BootErrorPage:wt,NotFoundErrorPage:Zt,ErrorBoundaryFallback:jt,Router:({children:pe})=>React.createElement(MemoryRouter,{initialEntries:P,children:pe})},icons:Ot,plugins:[],themes:[{id:"light",title:"Test App Theme",variant:"light",Provider:({children:pe})=>React.createElement(ThemeProvider,{theme:lightTheme},React.createElement(CssBaseline,null,pe))}],bindRoutes:({bind:pe})=>{for(const[we,Ze]of ce)pe({ref:we},{ref:Ze})}});let Z;z instanceof Function?Z=React.createElement(z,null):Z=z;const D=Object.entries((Pe=R.mountedRoutes)!=null?Pe:{}).map(([pe,we])=>{const Ze=()=>React.createElement("div",null,"Mounted at ",pe);if(Et(we)){const qe=createRouteRef({id:"id"});ce.set(we,qe),attachComponentData(Ze,"core.mountPoint",qe)}else attachComponentData(Ze,"core.mountPoint",we);return React.createElement(Route,{key:pe,path:pe,element:React.createElement(Ze,null)})}),re=de.getProvider(),ge=de.getRouter();return React.createElement(re,null,React.createElement(ge,null,React.createElement(Gt,null,D),React.createElement(Routes,null,React.createElement(Route,{path:"/*",element:Z}))))}async function se(z,R={}){return renderWithEffects(un(z,R))}class j{static from(...R){return new j(new Map(R.map(([P,ce])=>[P.id,ce])))}constructor(R){this.apis=R}get(R){return this.apis.get(R.id)}}const ae=z=>React.createElement(ApiProvider,{apis:j.from(...z.apis),children:z.children});function le(z){const{mockedResults:R,children:P}=z,ce=()=>Promise.resolve(R||{}),de=TestApiRegistry.from([searchApiRef,{query:ce}]);return React.createElement(ApiProvider,{apis:de,children:P})}const ye=z=>React.createElement(le,{...z},React.createElement(SearchContextProvider,{children:z.children}));var Le=e(86619),Be=e(50581),Se=e(61837),je=e(4614),ut=e(21853),bt=e(88013),vt=e(10289),at=e(48760);const Ct=(0,t.Z)({root:{width:"100%"}}),dt=z=>{const{entityId:R,debounceTime:P=150}=z,[ce,de]=(0,r.useState)(!1),Z=(0,vt.s0)(),{term:D,setTerm:re,setFilters:ge,result:{loading:Pe,value:pe}}=M(),we=Ct(),[Ze,qe]=(0,r.useState)([]);(0,r.useEffect)(()=>{let ht=!0;if(ht&&pe){const Qe=pe.results.slice(0,10);qe(Qe)}return()=>{ht=!1}},[Pe,pe]);const[At,st]=(0,r.useState)(D);(0,at.Z)(()=>re(At),P,[At]);const{kind:lt,name:Mt,namespace:ke}=R;(0,r.useEffect)(()=>{ge(ht=>({...ht,kind:lt,namespace:ke,name:Mt}))},[lt,ke,Mt,ge]);const Rt=ht=>{ce||de(!0),st(ht.target.value)},Yt=(ht,Qe)=>{if(Qe!=null&&Qe.document){const{location:Xe}=Qe.document;Z(Xe)}};return r.createElement(bt.ZP,{classes:{root:we.root},"data-testid":"techdocs-search-bar",size:"small",open:ce,getOptionLabel:()=>"",filterOptions:ht=>ht,onClose:()=>{de(!1)},onFocus:()=>{de(!0)},onChange:Yt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Ze,renderOption:({document:ht})=>r.createElement(y,{result:ht,lineClamp:3,asListItem:!1,asLink:!1,title:ht.title}),loading:Pe,renderInput:ht=>r.createElement(Le.Z,{...ht,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${R.name} docs`,value:At,onChange:Rt,InputProps:{...ht.InputProps,startAdornment:r.createElement(Be.Z,{position:"start"},r.createElement(Se.Z,{"aria-label":"Query",disabled:!0},r.createElement(ut.Z,null))),endAdornment:r.createElement(r.Fragment,null,Pe?r.createElement(je.Z,{color:"inherit",size:20}):null,ht.InputProps.endAdornment)}})})},sn=z=>{const R={term:"",types:["techdocs"],pageCursor:"",filters:z.entityId};return r.createElement(B,{initialState:R},r.createElement(dt,{...z}))}},98157:function(){},19133:function(q,i,e){"use strict";q.exports=e.p+"static/createComponent.975d1e1e..svg"},86284:function(q,i,e){"use strict";q.exports=e.p+"static/missingAnnotation.67f79e98..svg"},3871:function(q,i,e){"use strict";q.exports=e.p+"static/noBuild.1715fa71..svg"},96465:function(q,i,e){"use strict";q.exports=e.p+"static/noInformation.4b426325..svg"},29788:function(q,i,e){"use strict";q.exports=e.p+"static/mic-drop.fe3ef4d0..svg"},53260:function(){}},function(q){var i=function(r){return q(q.s=r)};q.O(0,[2370,6202,2158,9284,2126,7012,4361,9035,4983,3222,5218,4736],function(){return i(88649),i(30294)});var e=q.O()}]);})();
|
|
475
|
+
|
|
476
|
+
//# sourceMappingURL=main.613d3de3.js.map
|