@techdocs/cli 0.0.0-nightly-20220730024935 → 0.0.0-nightly-20220802025813
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 +3 -3
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/main.f60454f5.js +492 -0
- package/dist/embedded-app/static/main.f60454f5.js.map +1 -0
- package/dist/embedded-app/static/{runtime.ec77374e.js → runtime.f60454f5.js} +1 -1
- package/dist/embedded-app/static/{runtime.ec77374e.js.map → runtime.f60454f5.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.ec77374e.js → vendor.f60454f5.js} +1 -1
- package/dist/embedded-app/static/{vendor.ec77374e.js.map → vendor.f60454f5.js.map} +1 -1
- package/package.json +4 -4
- package/dist/embedded-app/static/main.ec77374e.js +0 -492
- package/dist/embedded-app/static/main.ec77374e.js.map +0 -1
|
@@ -1,492 +0,0 @@
|
|
|
1
|
-
(()=>{var nl=Object.defineProperty;var rl=(te,s,e)=>s in te?nl(te,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):te[s]=e;var X=(te,s,e)=>(rl(te,typeof s!="symbol"?s+"":s,e),e),Ao=(te,s,e)=>{if(!s.has(te))throw TypeError("Cannot "+e)};var st=(te,s,e)=>(Ao(te,s,"read from private field"),e?e.call(te):s.get(te)),Mn=(te,s,e)=>{if(s.has(te))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(te):s.set(te,e)},zn=(te,s,e,r)=>(Ao(te,s,"write to private field"),r?r.call(te,e):s.set(te,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(te,s,e){"use strict";e.d(s,{n3:function(){return R},MS:function(){return f}});var r=e(48023),t=e(10179),c=e(96279),i=e.n(c);const R=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class f{constructor(u){X(this,"discoveryApi");X(this,"fetchApi");this.discoveryApi=u.discoveryApi,this.fetchApi=u.fetchApi||{fetch:i()}}async getEntityAncestors(u,m){const{kind:y,namespace:g,name:E}=(0,r.of)(u.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(E)}/ancestry`,m)}async getLocationById(u,m){return await this.requestOptional("GET",`/locations/${encodeURIComponent(u)}`,m)}async getEntities(u,m){const{filter:y=[],fields:g=[],offset:E,limit:S,after:b}=u!=null?u:{},O=[];for(const D of[y].flat()){const x=[];for(const[w,k]of Object.entries(D))for(const re of[k].flat())re===R?x.push(encodeURIComponent(w)):typeof re=="string"&&x.push(`${encodeURIComponent(w)}=${encodeURIComponent(re)}`);x.length&&O.push(`filter=${x.join(",")}`)}g.length&&O.push(`fields=${g.map(encodeURIComponent).join(",")}`),E!==void 0&&O.push(`offset=${E}`),S!==void 0&&O.push(`limit=${S}`),b!==void 0&&O.push(`after=${encodeURIComponent(b)}`);const $=O.length?`?${O.join("&")}`:"",B=await this.requestRequired("GET",`/entities${$}`,m),F=(D,x)=>{var re,le;if(((re=D.metadata)==null?void 0:re.name)===void 0||D.kind===void 0||((le=x.metadata)==null?void 0:le.name)===void 0||x.kind===void 0)return 0;const w=(0,r.eE)(D),k=(0,r.eE)(x);return w<k?-1:w>k?1:0};return{items:B.sort(F)}}async getEntityByRef(u,m){const{kind:y,namespace:g,name:E}=(0,r.of)(u);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(E)}`,m)}async getEntityByName(u,m){const{kind:y,namespace:g="default",name:E}=u;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(E)}`,m)}async refreshEntity(u,m){const y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(m==null?void 0:m.token)&&{Authorization:`Bearer ${m==null?void 0:m.token}`}},method:"POST",body:JSON.stringify({entityRef:u})});if(y.status!==200)throw new Error(await y.text())}async getEntityFacets(u,m){const{filter:y=[],facets:g}=u,E=[];for(const b of[y].flat()){const O=[];for(const[$,B]of Object.entries(b))for(const F of[B].flat())F===R?O.push(encodeURIComponent($)):typeof F=="string"&&O.push(`${encodeURIComponent($)}=${encodeURIComponent(F)}`);O.length&&E.push(`filter=${O.join(",")}`)}for(const b of g)E.push(`facet=${encodeURIComponent(b)}`);const S=E.length?`?${E.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${S}`,m)}async addLocation({type:u="url",target:m,dryRun:y},g){const E=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${y?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(g==null?void 0:g.token)&&{Authorization:`Bearer ${g==null?void 0:g.token}`}},method:"POST",body:JSON.stringify({type:u,target:m})});if(E.status!==201)throw new Error(await E.text());const{location:S,entities:b,exists:O}=await E.json();if(!S)throw new Error(`Location wasn't added: ${m}`);return{location:S,entities:b,exists:O}}async getLocationByRef(u,m){return(await this.requestRequired("GET","/locations",m)).map(g=>g.data).find(g=>u===(0,r.NZ)(g))}async removeLocationById(u,m){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(u)}`,m)}async removeEntityByUid(u,m){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(u)}`,m)}async requestIgnored(u,m,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},S=await this.fetchApi.fetch(g,{method:u,headers:E});if(!S.ok)throw await t.VL.fromResponse(S)}async requestRequired(u,m,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},S=await this.fetchApi.fetch(g,{method:u,headers:E});if(!S.ok)throw await t.VL.fromResponse(S);return await S.json()}async requestOptional(u,m,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},S=await this.fetchApi.fetch(g,{method:u,headers:E});if(!S.ok){if(S.status===404)return;throw await t.VL.fromResponse(S)}return await S.json()}}},48023:function(te,s,e){"use strict";e.d(s,{Tf:function(){return c},P1:function(){return Zt},q1:function(){return mn},M6:function(){return On},l2:function(){return t},zG:function(){return r},w$:function(){return Pe},nP:function(){return fe},aS:function(){return St},S4:function(){return $e},cz:function(){return pt},iB:function(){return Tt},CV:function(){return _e},of:function(){return At},Ou:function(){return kt},eE:function(){return Ie},NZ:function(){return Ut}});const r="default",t="backstage.io/view-url",c="backstage.io/edit-url",i="kubernetes.io/api-server",R="kubernetes.io/api-server-certificate-authority",f="kubernetes.io/auth-provider";var o=e(76635),u=e.n(o);class m{constructor(j=DEFAULT_NAMESPACE){X(this,"namespace");this.namespace=j}async enforce(j){return j.metadata.namespace?j:lodash.merge({metadata:{namespace:this.namespace}},j)}}class y{static isValidPrefixAndOrSuffix(j,ye,Ve,et){if(typeof j!="string")return!1;const it=j.split(ye);return it.length===1?et(it[0]):it.length===2?Ve(it[0])&&et(it[1]):!1}static isJsonSafe(j){try{return u().isEqual(j,JSON.parse(JSON.stringify(j)))}catch{return!1}}static isValidDnsSubdomain(j){return typeof j=="string"&&j.length>=1&&j.length<=253&&j.split(".").every(y.isValidDnsLabel)}static isValidDnsLabel(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(j)}static isValidTag(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(j)}static isValidUrl(j){if(typeof j!="string")return!1;try{return new URL(j),!0}catch{return!1}}static isValidString(j){var ye;return typeof j=="string"&&((ye=j==null?void 0:j.trim())==null?void 0:ye.length)>=1}static isNonEmptyString(j){var ye;return typeof j=="string"&&((ye=j==null?void 0:j.trim())==null?void 0:ye.length)>=1}}var g=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}}}}}'),E=e(48231),S=e.n(E),b=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"}}}`),O=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"type":{"type":"string","description":"An optional value to categorize links into specific groups.","examples":["runbook","documentation","logs","dashboard"],"minLength":1}}}}}}'),$=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","target"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference"},"targetRef":{"type":"string","minLength":1,"description":"The entity ref of the target of this relation."}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const B=new Map,F=[g,b,O,$];function D(ue){if(!(ue!=null&&ue.length))throw new TypeError("Unknown error");const j=ue[0];throw new TypeError(`${j.instancePath||"<root>"} ${j.message}${j.params?` - ${Object.entries(j.params).map(([ye,Ve])=>`${ye}: ${Ve}`).join(", ")}`:""}`)}function x(ue,j={}){var Xt;const ye=(Xt=j==null?void 0:j.disableCache)!=null?Xt:!1,Ve=ye?"":JSON.stringify(ue);if(!ye){const en=B.get(Ve);if(en)return en}const et=w(ue),it=new(S())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});et.length&&it.addSchema(et,void 0,void 0,!0);const Rt=it.compile(ue);return ye||B.set(Ve,Rt),Rt}function w(ue){if(typeof ue!="object")return[];const j=new Set;ue.$id&&j.add(ue.$id);const ye=new Array,Ve=[ue];for(;Ve.length;){const et=Ve.pop();for(const it of k(et))if(!j.has(it)){j.add(it);const Rt=F.find(Xt=>Xt.$id===it);Rt&&(ye.push(Rt),Ve.push(Rt))}}return ye}function*k(ue){const j=[ue];for(;j.length;){const ye=j.pop();if(typeof ye=="object"&&ye)for(const[Ve,et]of Object.entries(ye))Ve==="$ref"&&typeof et=="string"?yield et.split("#")[0]:j.push(et)}}function re(ue){const j=compileAjvSchema(ue||entityEnvelopeSchema);return ye=>{if(j(ye)===!0)return ye;throw throwAjvError(j.errors)}}function le(ue){const j=x(ue);return ye=>{var it;if(j(ye)===!0)return ye;const et=(it=j.errors)==null?void 0:it.filter(Rt=>["/kind","/apiVersion"].includes(Rt.instancePath));if((et==null?void 0:et.length)&&et.every(Rt=>Rt.keyword==="enum"))return!1;throw D(j.errors)}}function Re(ue){const j=compileAjvSchema(ue||entitySchema);return ye=>{if(j(ye)===!0)return ye;throw throwAjvError(j.errors)}}class xe{static isValidApiVersion(j){return y.isValidPrefixAndOrSuffix(j,"/",y.isValidDnsSubdomain,ye=>ye.length>=1&&ye.length<=63&&/^[a-z0-9A-Z]+$/.test(ye))}static isValidKind(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(j)}static isValidObjectName(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(j)}static isValidNamespace(j){return y.isValidDnsLabel(j)}static isValidLabelKey(j){return y.isValidPrefixAndOrSuffix(j,"/",y.isValidDnsSubdomain,xe.isValidObjectName)}static isValidLabelValue(j){return j===""||xe.isValidObjectName(j)}static isValidAnnotationKey(j){return y.isValidPrefixAndOrSuffix(j,"/",y.isValidDnsSubdomain,xe.isValidObjectName)}static isValidAnnotationValue(j){return typeof j=="string"}}const De={isValidApiVersion:xe.isValidApiVersion,isValidKind:xe.isValidKind,isValidEntityName:xe.isValidObjectName,isValidNamespace:xe.isValidNamespace,isValidLabelKey:xe.isValidLabelKey,isValidLabelValue:xe.isValidLabelValue,isValidAnnotationKey:xe.isValidAnnotationKey,isValidAnnotationValue:xe.isValidAnnotationValue,isValidTag:ue=>typeof ue=="string"&&ue.length>=1&&ue.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(ue)};function je(ue={}){return{...De,...ue}}class ve{constructor(j=makeValidator()){X(this,"validators");this.validators=j}async enforce(j){var Rt,Xt,en,tn,En,U,oe;function ye(ne,Ae,Ue){if(Ae==null)throw new Error(`${ne} must have a value`);let ft;try{ft=Ue(Ae)}catch(ze){throw new Error(`${ne} could not be validated, ${ze}`)}if(!ft){let ze;switch(Ue.name){case"isValidLabelValue":case"isValidObjectName":ze="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":ze="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":ze="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":ze="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":ze="a string";break;case"isValidKind":ze="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":ze="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":ze="a non empty string";break;default:ze=void 0;break}const zt=ze?` expected ${ze} but found "${Ae}".`:"";throw new Error(`"${ne}" is not valid;${zt} To learn more about catalog file format, visit: https://github.com/backstage/backstage/blob/master/docs/architecture-decisions/adr002-default-catalog-file-format.md`)}}function Ve(ne,Ae,Ue){return Ae===void 0||ye(ne,Ae,Ue)}ye("apiVersion",j.apiVersion,this.validators.isValidApiVersion),ye("kind",j.kind,this.validators.isValidKind),ye("metadata.name",j.metadata.name,this.validators.isValidEntityName),Ve("metadata.namespace",j.metadata.namespace,this.validators.isValidNamespace);for(const[ne,Ae]of Object.entries((Rt=j.metadata.labels)!=null?Rt:[]))ye(`labels.${ne}`,ne,this.validators.isValidLabelKey),ye(`labels.${ne}`,Ae,this.validators.isValidLabelValue);for(const[ne,Ae]of Object.entries((Xt=j.metadata.annotations)!=null?Xt:[]))ye(`annotations.${ne}`,ne,this.validators.isValidAnnotationKey),ye(`annotations.${ne}`,Ae,this.validators.isValidAnnotationValue);const et=(en=j.metadata.tags)!=null?en:[];for(let ne=0;ne<et.length;++ne)ye(`tags.${ne}`,et[ne],this.validators.isValidTag);const it=(tn=j.metadata.links)!=null?tn:[];for(let ne=0;ne<it.length;++ne)ye(`links.${ne}.url`,(En=it[ne])==null?void 0:En.url,CommonValidatorFunctions.isValidUrl),Ve(`links.${ne}.title`,(U=it[ne])==null?void 0:U.title,CommonValidatorFunctions.isNonEmptyString),Ve(`links.${ne}.icon`,(oe=it[ne])==null?void 0:oe.icon,KubernetesValidatorFunctions.isValidObjectName);return j}}class Je{constructor(){X(this,"validate")}async enforce(j){if(!this.validate){const et=new Ajv({allowUnionTypes:!0});this.validate=et.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(j)===!0)return j;const[Ve]=this.validate.errors||[];throw Ve?new Error(`Malformed envelope, ${Ve.instancePath||"<root>"} ${Ve.message}`):new Error("Malformed envelope, Unknown error")}}function nt(ue){let j=ue.indexOf(":");const ye=ue.indexOf("/");ye!==-1&&ye<j&&(j=-1);const Ve=j===-1?void 0:ue.slice(0,j),et=ye===-1?void 0:ue.slice(j+1,ye),it=ue.slice(Math.max(j+1,ye+1));if(Ve===""||et===""||it==="")throw new TypeError(`Entity reference "${ue}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:Ve,namespace:et,name:it}}function Tt(ue){return{kind:ue.kind,namespace:ue.metadata.namespace||r,name:ue.metadata.name}}function At(ue,j){var Xt,en,tn,En;if(!ue)throw new Error("Entity reference must not be empty");const ye=j==null?void 0:j.defaultKind,Ve=(j==null?void 0:j.defaultNamespace)||r;let et,it,Rt;if(typeof ue=="string"){const U=nt(ue);et=(Xt=U.kind)!=null?Xt:ye,it=(en=U.namespace)!=null?en:Ve,Rt=U.name}else et=(tn=ue.kind)!=null?tn:ye,it=(En=ue.namespace)!=null?En:Ve,Rt=ue.name;if(et)if(it){if(!Rt){const U=JSON.stringify(ue);throw new Error(`Entity reference ${U} had missing or empty name`)}}else{const U=JSON.stringify(ue);throw new Error(`Entity reference ${U} had missing or empty namespace`)}else{const U=JSON.stringify(ue);throw new Error(`Entity reference ${U} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:et,namespace:it,name:Rt}}function Ie(ue){var et,it;let j,ye,Ve;return"metadata"in ue?(j=ue.kind,ye=(et=ue.metadata.namespace)!=null?et:r,Ve=ue.metadata.name):(j=ue.kind,ye=(it=ue.namespace)!=null?it:r,Ve=ue.name),`${j.toLocaleLowerCase("en-US")}:${ye.toLocaleLowerCase("en-US")}/${Ve.toLocaleLowerCase("en-US")}`}class ht{constructor(j){this.policies=j}async enforce(j){let ye=j;for(const Ve of this.policies){const et=await Ve.enforce(ye);if(!et)throw new Error(`Policy ${Ve.constructor.name} did not return a result`);ye=et}return ye}}class gt{constructor(j){this.policies=j}async enforce(j){for(const ye of this.policies){const Ve=await ye.enforce(j);if(Ve)return Ve}throw new Error("The entity did not match any known policy")}}const lt={allOf(ue){return new ht(ue)},oneOf(ue){return new gt(ue)}};var _=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 pe(ue){const j=le(ue);return{async check(ye){return j(ye)===ye}}}const be=pe(_);var We=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ComponentV1alpha1","description":"A Component describes a software component. It is typically intimately linked to the source code that constitutes the component, and should be what a developer may regard a \\"unit of software\\", usually with a distinct deployable or linkable artifact.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Component"]},"spec":{"type":"object","required":["type","lifecycle","owner"],"properties":{"type":{"type":"string","description":"The type of component.","examples":["service","website","library"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the component.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the component belongs to.","minLength":1},"subcomponentOf":{"type":"string","description":"An entity reference to another component of which the component is a part.","minLength":1},"providesApis":{"type":"array","description":"An array of entity references to the APIs that are provided by the component.","items":{"type":"string","minLength":1}},"consumesApis":{"type":"array","description":"An array of entity references to the APIs that are consumed by the component.","items":{"type":"string","minLength":1}},"dependsOn":{"type":"array","description":"An array of references to other entities that the component depends on to function.","items":{"type":"string","minLength":1}}}}}}]}');const tt=pe(We);var at=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 Et=pe(at);var se=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 ae=pe(se);var Ye=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 Ge=pe(Ye),$e="ownedBy",rt="ownerOf",Y="consumesApi",z="apiConsumedBy",q="providesApi",ce="apiProvidedBy",fe="dependsOn",Pe="dependencyOf",Oe="parentOf",Se="childOf",Qe="memberOf",Ke="hasMember",pt="partOf",St="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 Dt=pe(ut);var Ot=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 bt=pe(Ot);var Pt=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 Nt=pe(Pt),Zt="backstage.io/managed-by-location",mn="backstage.io/managed-by-origin-location",On="backstage.io/source-location";function kt(ue){if(typeof ue!="string")throw new TypeError(`Unable to parse location ref '${ue}', unexpected argument ${typeof ue}`);const j=ue.indexOf(":");if(j<0)throw new TypeError(`Unable to parse location ref '${ue}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const ye=ue.substring(0,j).trim(),Ve=ue.substring(j+1).trim();if(!ye||!Ve)throw new TypeError(`Unable to parse location ref '${ue}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(ye==="http"||ye==="https")throw new TypeError(`Invalid location ref '${ue}', please prefix it with 'url:', e.g. 'url:${ue}'`);return{type:ye,target:Ve}}function Ut(ue){const{type:j,target:ye}=ue;if(j){if(!ye)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${j}:${ye}`}function _e(ue){var ye,Ve,et,it,Rt;const j=(Rt=(Ve=(ye=ue.metadata)==null?void 0:ye.annotations)==null?void 0:Ve[On])!=null?Rt:(it=(et=ue.metadata)==null?void 0:et.annotations)==null?void 0:it[Zt];if(!j)throw new Error(`Entity '${Ie(ue)}' is missing location`);return kt(j)}},23235:function(te,s,e){"use strict";e.d(s,{C:function(){return t}});var r=e(98005);class t{constructor(){X(this,"subject",new r.J)}post(i){this.subject.next(i)}alert$(){return this.subject}}},47150:function(te,s,e){"use strict";e.d(s,{g:function(){return r}});class r{captureEvent(c){}}},58652:function(te,s,e){"use strict";e.d(s,{C:function(){return c}});var r=e(98005);const t="theme";class c{constructor(R){X(this,"activeThemeId");X(this,"subject",new r.X(void 0));this.themes=R}static createWithStorage(R){var u;const f=new c(R);if(!window.localStorage)return f;const o=(u=window.localStorage.getItem(t))!=null?u:void 0;return f.setActiveThemeId(o),f.activeThemeId$().subscribe(m=>{m?window.localStorage.setItem(t,m):window.localStorage.removeItem(t)}),window.addEventListener("storage",m=>{var y;if(m.key===t){const g=(y=localStorage.getItem(t))!=null?y:void 0;f.setActiveThemeId(g)}}),f}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(R){this.activeThemeId=R,this.subject.next(R)}}},14721:function(te,s,e){"use strict";e.d(s,{m:function(){return m}});var r=e(9850),t=e.n(r),c=e(12782),i=e.n(c);const R=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function f(y){return typeof y=="object"&&y!==null&&!Array.isArray(y)}function o(y){if(y===null)return"null";if(Array.isArray(y))return"array";const g=typeof y;return g==="number"&&isNaN(y)?"nan":g==="string"&&y===""?"empty-string":g}const u={type(y,g,E,S){return`Invalid type in config for key '${y}' in '${g}', got ${E}, wanted ${S}`},missing(y){return`Missing required config value at '${y}'`},convert(y,g,E){return`Unable to convert config value for key '${y}' in '${g}' to a ${E}`}};class m{constructor(g,E="mock-config",S,b=""){X(this,"filteredKeys");X(this,"notifiedFilteredKeys",new Set);this.data=g,this.context=E,this.fallback=S,this.prefix=b}static fromConfigs(g){return g.length===0?new m(void 0):g.reduce((E,{data:S,context:b,filteredKeys:O,deprecatedKeys:$})=>{const B=new m(S,b,E);if(B.filteredKeys=O,$)for(const{key:F,description:D}of $)console.warn(`The configuration key '${F}' of ${b} is deprecated and may be removed soon. ${D||""}`);return B},void 0)}has(g){var S,b;return this.readValue(g)!==void 0?!0:(b=(S=this.fallback)==null?void 0:S.has(g))!=null?b:!1}keys(){var S,b;const g=this.data?Object.keys(this.data):[],E=(b=(S=this.fallback)==null?void 0:S.keys())!=null?b:[];return[...new Set([...g,...E])]}get(g){const E=this.getOptional(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g!=null?g:"")));return E}getOptional(g){var b;const E=t()(this.readValue(g)),S=(b=this.fallback)==null?void 0:b.getOptional(g);return E===void 0?S:S===void 0?E:i()({},{value:S},{value:E},(O,$)=>!f($)||!f(O)?$:void 0).value}getConfig(g){const E=this.getOptionalConfig(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalConfig(g){var b;const E=this.readValue(g),S=(b=this.fallback)==null?void 0:b.getOptionalConfig(g);if(f(E))return this.copy(E,g,S);if(E!==void 0)throw new TypeError(u.type(this.fullKey(g),this.context,o(E),"object"));return S}getConfigArray(g){const E=this.getOptionalConfigArray(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalConfigArray(g){const E=this.readConfigValue(g,S=>{if(!Array.isArray(S))return{expected:"object-array"};for(const[b,O]of S.entries())if(!f(O))return{expected:"object-array",value:O,key:`${g}[${b}]`};return!0});if(!!E)return E.map((S,b)=>this.copy(S,`${g}[${b}]`))}getNumber(g){const E=this.getOptionalNumber(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalNumber(g){const E=this.readConfigValue(g,b=>typeof b=="number"||typeof b=="string"||{expected:"number"});if(typeof E=="number"||E===void 0)return E;const S=Number(E);if(!Number.isFinite(S))throw new Error(u.convert(this.fullKey(g),this.context,"number"));return S}getBoolean(g){const E=this.getOptionalBoolean(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalBoolean(g){return this.readConfigValue(g,E=>typeof E=="boolean"||{expected:"boolean"})}getString(g){const E=this.getOptionalString(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalString(g){return this.readConfigValue(g,E=>typeof E=="string"&&E!==""||{expected:"string"})}getStringArray(g){const E=this.getOptionalStringArray(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalStringArray(g){return this.readConfigValue(g,E=>{if(!Array.isArray(E))return{expected:"string-array"};for(const[S,b]of E.entries())if(typeof b!="string"||b==="")return{expected:"string-array",value:b,key:`${g}[${S}]`};return!0})}fullKey(g){return`${this.prefix}${this.prefix?".":""}${g}`}copy(g,E,S){const b=new m(g,this.context,S,this.fullKey(E));return b.filteredKeys=this.filteredKeys,b}readConfigValue(g,E){var O;const S=this.readValue(g);if(S===void 0)return(O=this.fallback)==null?void 0:O.readConfigValue(g,E);const b=E(S);if(b!==!0){const{key:$=g,value:B=S,expected:F}=b;throw new TypeError(u.type(this.fullKey($),this.context,o(B),F))}return S}readValue(g){const E=g?g.split("."):[];for(const b of E)if(!R.test(b))throw new TypeError(`Invalid config key '${g}'`);if(this.data===void 0)return;let S=this.data;for(const[b,O]of E.entries())if(f(S))S=S[O];else if(S!==void 0){const $=this.fullKey(E.slice(0,b).join("."));throw new TypeError(u.type($,this.context,o(S),"object"))}return S}}},4333:function(te,s,e){"use strict";e.d(s,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(i){const R=i.split(/\{\{\s*pluginId\s*\}\}/),f=R.join("pluginId");let o;try{o=new URL(f)}catch{throw new Error(`${r} URL '${f}' is invalid`)}if(o.hash)throw new Error(`${r} URL must not have a hash`);if(o.search)throw new Error(`${r} URL must not have a query`);if(f.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(R)}constructor(i){this.parts=i}async getBaseUrl(i){return this.parts.join(i)}}},89536:function(te,s,e){"use strict";e.d(s,{KN:function(){return r},gr:function(){return c},Jv:function(){return i}});class r{constructor(f,o){this.alertApi=f,this.errorApi=o}post(f,o){return o!=null&&o.hidden||this.alertApi.post({message:f.message,severity:"error"}),this.errorApi.post(f,o)}error$(){return this.errorApi.error$()}}var t=e(98005);class c{constructor(){X(this,"subject",new t.J)}post(f,o){this.subject.next({error:f,context:o})}error$(){return this.subject}}class i{static forward(f,o){window.addEventListener("unhandledrejection",u=>{f.post(u.reason,o)})}}},14884:function(te,s,e){"use strict";e.d(s,{b:function(){return c}});var r=e(36964);function t(i){if(i.length<3)throw new Error(`The '${i}' feature flag must have a minimum length of three characters.`);if(i.length>150)throw new Error(`The '${i}' feature flag must not exceed 150 characters.`);if(!i.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${i}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class c{constructor(){X(this,"registeredFeatureFlags",[]);X(this,"flags")}registerFlag(R){t(R.name),this.registeredFeatureFlags.push(R)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(R){return this.flags||(this.flags=this.load()),this.flags.get(R)===r.FeatureFlagState.Active}save(R){this.flags||(this.flags=this.load()),R.merge||this.flags.clear();for(const[o,u]of Object.entries(R.states))this.flags.set(o,u);const f=Array.from(this.flags.entries()).filter(([,o])=>o===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(f)))}load(){try{const R=window.localStorage.getItem("featureFlags");if(!R)return new Map;const f=JSON.parse(R);if(typeof f!="object"||f===null||Array.isArray(f))return new Map;const o=Object.entries(f).filter(([u,m])=>(t(u),m===r.FeatureFlagState.Active));return new Map(o)}catch{return new Map}}}},50160:function(te,s,e){"use strict";e.d(s,{I:function(){return u},j:function(){return r}});function r(m){var E;let y=m.baseImplementation||e.g.fetch;const g=[(E=m.middleware)!=null?E:[]].flat().reverse();for(const S of g)y=S.apply(y);return{fetch:y}}class t{static create(y){var b,O;const g=c(y),E=((b=y.header)==null?void 0:b.name)||"authorization",S=((O=y.header)==null?void 0:O.value)||($=>`Bearer ${$}`);return new t(y.identityApi,g,E,S)}constructor(y,g,E,S){this.identityApi=y,this.allowUrl=g,this.headerName=E,this.headerValue=S}apply(y){return async(g,E)=>{const S=new Request(g,E),{token:b}=await this.identityApi.getCredentials();return S.headers.get(this.headerName)||typeof b!="string"||!b||!this.allowUrl(S.url)?y(g,E):(S.headers.set(this.headerName,this.headerValue(b)),y(S))}}}function c(m){return m.allowUrl?m.allowUrl:m.urlPrefixAllowlist?i(m.urlPrefixAllowlist):m.config?i([m.config.getString("backend.baseUrl")]):()=>!1}function i(m){const y=m.map(g=>g.replace(/\/$/,""));return g=>y.some(E=>g===E||g.startsWith(`${E}/`))}function R(m,y){return!y||y==="/"?m:`${m.replace(/\/$/,"")}/${y.replace(/^\//,"")}`}class f{constructor(y){this.discoveryApi=y}apply(y){return async(g,E)=>{const S=new Request(g,E),b="plugin://";if(!S.url.startsWith(b))return y(g,E);const{hostname:O,pathname:$,search:B,hash:F,username:D,password:x}=new URL(`http://${S.url.substring(b.length)}`);let w=await this.discoveryApi.getBaseUrl(O);if(D||x){const re=new URL(w),le=`${D}${x?`:${x}`:""}@`;w=`${re.protocol}//${le}${re.host}${re.pathname}`}const k=`${R(w,$)}${B}${F}`;return y(k,typeof g=="string"||o(g)?E:g)}}}function o(m){return typeof m=="object"&&(m==null?void 0:m.constructor)===URL}class u{static resolvePluginProtocol(y){return new f(y.discoveryApi)}static injectIdentityAuth(y){return t.create(y)}constructor(){}}},11358:function(te,s,e){"use strict";e.d(s,{Y:function(){return R}});var r=e(98005);function t(f,o){for(const u of o)if(!f.has(u))return!1;return!0}function c(f,...o){const u=new Set(f);for(const m of o)for(const y of m)u.add(y);return u}class i{constructor(){X(this,"requests",[]);X(this,"subject",new r.X(this.getCurrentPending()))}request(o){return new Promise((u,m)=>{this.requests.push({scopes:o,resolve:u,reject:m}),this.subject.next(this.getCurrentPending())})}resolve(o,u){this.requests=this.requests.filter(m=>t(o,m.scopes)?(m.resolve(u),!1):!0),this.subject.next(this.getCurrentPending())}reject(o){this.requests.forEach(u=>u.reject(o)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const o=this.requests.length===0?void 0:this.requests.slice(1).reduce((u,m)=>c(u,m.scopes),this.requests[0].scopes);return{scopes:o,resolve:u=>{o&&this.resolve(o,u)},reject:u=>{o&&this.reject(u)}}}}class R{constructor(){X(this,"subject",new r.X([]));X(this,"currentRequests",[]);X(this,"handlerCount",0)}createAuthRequester(o){const u=new i,m=this.handlerCount;return this.handlerCount++,u.pending().subscribe({next:y=>{const g=this.currentRequests.slice(),E=this.makeAuthRequest(y,o);E?g[m]=E:delete g[m],this.currentRequests=g,this.subject.next(g.filter(Boolean))}}),y=>u.request(y)}makeAuthRequest(o,u){const{scopes:m}=o;if(!!m)return{provider:u.provider,trigger:async()=>{const y=await u.onAuthRequest(m);o.resolve(y)},reject:()=>{const y=new Error("Login failed, rejected by user");y.name="RejectedError",o.reject(y)}}}authRequest$(){return this.subject}}},56054:function(te,s,e){"use strict";e.d(s,{C:function(){return i}});var r=e(82394),t=e.n(r);const c=new Map;class i{constructor(f,o){X(this,"subscribers",new Set);X(this,"observable",new(t())(f=>(this.subscribers.add(f),()=>{this.subscribers.delete(f)})));this.namespace=f,this.errorApi=o}static create(f){var o;return new i((o=f.namespace)!=null?o:"",f.errorApi)}get(f){return this.snapshot(f).value}snapshot(f){let o,u="absent";try{const m=localStorage.getItem(this.getKeyName(f));m&&(o=JSON.parse(m,(y,g)=>(typeof g=="object"&&g!==null&&Object.freeze(g),g)),u="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${f}`))}return{key:f,value:o,presence:u}}forBucket(f){const o=`${this.namespace}/${f}`;return c.has(o)||c.set(o,new i(o,this.errorApi)),c.get(o)}async set(f,o){localStorage.setItem(this.getKeyName(f),JSON.stringify(o)),this.notifyChanges(f)}async remove(f){localStorage.removeItem(this.getKeyName(f)),this.notifyChanges(f)}observe$(f){return this.observable.filter(({key:o})=>o===f)}getKeyName(f){return`${this.namespace}/${encodeURIComponent(f)}`}notifyChanges(f){const o=this.snapshot(f);for(const u of this.subscribers)u.next(o)}}},59589:function(te,s,e){"use strict";e.d(s,{u:function(){return c}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:o="development",provider:u=t,oauthRequestApi:m}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:o})}}},6098:function(te,s,e){"use strict";e.d(s,{Z:function(){return c}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:o="development",provider:u=t,oauthRequestApi:m,defaultScopes:y=["team"]}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:o,defaultScopes:y})}}},44431:function(te,s,e){"use strict";e.d(s,{BitbucketAuth:function(){return c.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var c=e(6098)},19347:function(){},44474:function(te,s,e){"use strict";e.d(s,{T:function(){return c}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:o="development",provider:u=t,oauthRequestApi:m,defaultScopes:y=["read:user"]}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:o,defaultScopes:y})}}},2922:function(te,s,e){"use strict";e.d(s,{a:function(){return c}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:o="development",provider:u=t,oauthRequestApi:m,defaultScopes:y=["read_user"]}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:o,defaultScopes:y})}}},59938:function(te,s,e){"use strict";e.d(s,{e:function(){return i}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},c="https://www.googleapis.com/auth/";class i{static create(f){const{discoveryApi:o,oauthRequestApi:u,environment:m="development",provider:y=t,defaultScopes:g=["openid",`${c}userinfo.email`,`${c}userinfo.profile`]}=f;return r.OAuth2.create({discoveryApi:o,oauthRequestApi:u,provider:y,environment:m,defaultScopes:g,scopeTransform(E){return E.map(S=>S==="openid"?S:S==="profile"||S==="email"?`${c}userinfo.${S}`:S.startsWith(c)?S:`${c}${S}`)}})}}},91668:function(te,s,e){"use strict";e.d(s,{AtlassianAuth:function(){return y.u},BitbucketAuth:function(){return m.BitbucketAuth},GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return c.e},MicrosoftAuth:function(){return o._},OktaAuth:function(){return R.s},OneLoginAuth:function(){return u.$}});var r=e(44474),t=e(2922),c=e(59938),i=e(91205);e.o(i,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return i.AlertApiForwarder}}),e.o(i,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return i.AppThemeSelector}}),e.o(i,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return i.AtlassianAuth}}),e.o(i,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return i.BitbucketAuth}}),e.o(i,"ConfigReader")&&e.d(s,{ConfigReader:function(){return i.ConfigReader}}),e.o(i,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return i.ErrorAlerter}}),e.o(i,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return i.ErrorApiForwarder}}),e.o(i,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return i.FetchMiddlewares}}),e.o(i,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return i.FlatRoutes}}),e.o(i,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return i.LocalStorageFeatureFlags}}),e.o(i,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return i.MicrosoftAuth}}),e.o(i,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return i.NoOpAnalyticsApi}}),e.o(i,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return i.OAuthRequestManager}}),e.o(i,"OktaAuth")&&e.d(s,{OktaAuth:function(){return i.OktaAuth}}),e.o(i,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return i.OneLoginAuth}}),e.o(i,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return i.UnhandledErrorForwarder}}),e.o(i,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return i.UrlPatternDiscovery}}),e.o(i,"WebStorage")&&e.d(s,{WebStorage:function(){return i.WebStorage}}),e.o(i,"createFetchApi")&&e.d(s,{createFetchApi:function(){return i.createFetchApi}}),e.o(i,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return i.createSpecializedApp}}),e.o(i,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return i.defaultConfigLoader}});var R=e(26079),f=e(67604),o=e(38482),u=e(58381),m=e(44431);e.o(m,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return m.AlertApiForwarder}}),e.o(m,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return m.AppThemeSelector}}),e.o(m,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return m.AtlassianAuth}}),e.o(m,"ConfigReader")&&e.d(s,{ConfigReader:function(){return m.ConfigReader}}),e.o(m,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return m.ErrorAlerter}}),e.o(m,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return m.ErrorApiForwarder}}),e.o(m,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return m.FetchMiddlewares}}),e.o(m,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return m.FlatRoutes}}),e.o(m,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return m.LocalStorageFeatureFlags}}),e.o(m,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return m.NoOpAnalyticsApi}}),e.o(m,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return m.OAuthRequestManager}}),e.o(m,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return m.UnhandledErrorForwarder}}),e.o(m,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return m.UrlPatternDiscovery}}),e.o(m,"WebStorage")&&e.d(s,{WebStorage:function(){return m.WebStorage}}),e.o(m,"createFetchApi")&&e.d(s,{createFetchApi:function(){return m.createFetchApi}}),e.o(m,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return m.createSpecializedApp}}),e.o(m,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return m.defaultConfigLoader}});var y=e(59589)},38482:function(te,s,e){"use strict";e.d(s,{_:function(){return c}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class c{static create(R){const{environment:f="development",provider:o=t,oauthRequestApi:u,discoveryApi:m,defaultScopes:y=["openid","offline_access","profile","email","User.Read"]}=R;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:u,provider:o,environment:f,defaultScopes:y})}}},73124:function(te,s,e){"use strict";e.d(s,{Z:function(){return f}});function r(o){return new Promise((u,m)=>{const y=o.width||500,g=o.height||700,E=window.screen.width/2-y/2,S=window.screen.height/2-g/2,b=window.open(o.url,o.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${y},height=${g},top=${S},left=${E}`);let O="";if(!b||typeof b.closed=="undefined"||b.closed){const D=new Error("Failed to open auth popup.");D.name="PopupRejectedError",m(D);return}const $=D=>{if(D.source!==b||D.origin!==o.origin)return;const{data:x}=D;if(x.type==="config_info"){O=x.targetOrigin;return}if(x.type!=="authorization_response")return;const w=x;if("error"in w){const k=new Error(w.error.message);k.name=w.error.name,m(k)}else u(w.response);F()},B=setInterval(()=>{if(b.closed){const D=`Login failed, ${O&&O!==window.location.origin?`Incorrect app origin, expected ${O}`:"popup was closed"}`,x=new Error(D);x.name="PopupClosedError",m(x),F()}},100);function F(){window.removeEventListener("message",$),clearInterval(B)}window.addEventListener("message",$)})}function t(o){return[...o].join(" ")}class c{constructor(u){X(this,"discoveryApi");X(this,"environment");X(this,"provider");X(this,"joinScopesFunc");X(this,"authRequester");X(this,"sessionTransform");const{discoveryApi:m,environment:y,provider:g,joinScopes:E=t,oauthRequestApi:S,sessionTransform:b=O=>O}=u;this.authRequester=S.createAuthRequester({provider:g,onAuthRequest:O=>this.showPopup(O)}),this.discoveryApi=m,this.environment=y,this.provider=g,this.joinScopesFunc=E,this.sessionTransform=b}async createSession(u){return u.instantPopup?this.showPopup(u.scopes):this.authRequester(u.scopes)}async refreshSession(){const u=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(!u.ok){const y=new Error(`Auth refresh request failed, ${u.statusText}`);throw y.status=u.status,y}const m=await u.json();if(m.error){const y=new Error(m.error.message);throw m.error.name&&(y.name=m.error.name),y}return await this.sessionTransform(m)}async removeSession(){const u=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(m=>{throw new Error(`Logout request failed, ${m}`)});if(!u.ok){const m=new Error(`Logout request failed, ${u.statusText}`);throw m.status=u.status,m}}async showPopup(u){const m=this.joinScopesFunc(u),y=await this.buildUrl("/start",{scope:m,origin:location.origin}),g=await r({url:y,name:`${this.provider.title} Login`,origin:new URL(y).origin,width:450,height:730});return await this.sessionTransform(g)}async buildUrl(u,m){const y=await this.discoveryApi.getBaseUrl("auth"),g=this.buildQueryString({...m,env:this.environment});return`${y}/${this.provider.id}${u}${g}`}buildQueryString(u){if(!u)return"";const m=Object.entries(u).map(([y,g])=>{if(typeof g=="string")return`${encodeURIComponent(y)}=${encodeURIComponent(g)}`;if(g)return encodeURIComponent(y)}).filter(Boolean).join("&");return m?`?${m}`:""}}var i=e(57018);const R={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class f{constructor(u){X(this,"sessionManager");X(this,"scopeTransform");this.sessionManager=u.sessionManager,this.scopeTransform=u.scopeTransform}static create(u){const{discoveryApi:m,environment:y="development",provider:g=R,oauthRequestApi:E,defaultScopes:S=[],scopeTransform:b=B=>B}=u,O=new c({discoveryApi:m,environment:y,provider:g,oauthRequestApi:E,sessionTransform(B){return{...B,providerInfo:{idToken:B.providerInfo.idToken,accessToken:B.providerInfo.accessToken,scopes:f.normalizeScopes(b,B.providerInfo.scope),expiresAt:new Date(Date.now()+B.providerInfo.expiresInSeconds*1e3)}}}}),$=new i.RefreshingAuthSessionManager({connector:O,defaultScopes:new Set(S),sessionScopes:B=>B.providerInfo.scopes,sessionShouldRefresh:B=>(B.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new f({sessionManager:$,scopeTransform:b})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(u,m){var E;const y=f.normalizeScopes(this.scopeTransform,u),g=await this.sessionManager.getSession({...m,scopes:y});return(E=g==null?void 0:g.providerInfo.accessToken)!=null?E:""}async getIdToken(u={}){var y;const m=await this.sessionManager.getSession(u);return(y=m==null?void 0:m.providerInfo.idToken)!=null?y:""}async getBackstageIdentity(u={}){const m=await this.sessionManager.getSession(u);return m==null?void 0:m.backstageIdentity}async getProfile(u={}){const m=await this.sessionManager.getSession(u);return m==null?void 0:m.profile}static normalizeScopes(u,m){if(!m)return new Set;const y=Array.isArray(m)?m:m.split(/[\s|,]/).filter(Boolean);return new Set(u(y))}}},91205:function(te,s,e){"use strict";e.d(s,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),c=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(s,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(s,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(s,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(te,s,e){"use strict";e.d(s,{s:function(){return R}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),i="okta.";class R{static create(o){const{discoveryApi:u,environment:m="development",provider:y=t,oauthRequestApi:g,defaultScopes:E=["openid","email","profile","offline_access"]}=o;return r.OAuth2.create({discoveryApi:u,oauthRequestApi:g,provider:y,environment:m,defaultScopes:E,scopeTransform(S){return S.map(b=>c.has(b)||b.startsWith(i)?b:`${i}${b}`)}})}}},58381:function(te,s,e){"use strict";e.d(s,{$:function(){return R}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),i="onelogin.";class R{static create(o){const{discoveryApi:u,environment:m="development",provider:y=t,oauthRequestApi:g}=o;return r.OAuth2.create({discoveryApi:u,oauthRequestApi:g,provider:y,environment:m,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(E){return E.map(S=>c.has(S)||S.startsWith(i)?S:`${i}${S}`)}})}}},67604:function(te,s,e){"use strict";var r=e(57018),t=e(30195);const c=t.z.object({profile:t.z.object({email:t.z.string().optional(),displayName:t.z.string().optional(),picture:t.z.string().optional()}),backstageIdentity:t.z.object({token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),i={id:"saml",title:"SAML",icon:()=>null};class R{static create(o){const{discoveryApi:u,environment:m="development",provider:y=i}=o,g=new DirectAuthConnector({discoveryApi:u,environment:m,provider:y}),E=new StaticAuthSessionManager({connector:g}),S=new AuthSessionStore({manager:E,storageKey:`${y.id}Session`,schema:samlSessionSchema});return new R(S)}sessionState$(){return this.sessionManager.sessionState$()}constructor(o){this.sessionManager=o}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(o={}){const u=await this.sessionManager.getSession(o);return u==null?void 0:u.backstageIdentity}async getProfile(o={}){const u=await this.sessionManager.getSession(o);return u==null?void 0:u.profile}}},91631:function(te,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.C},AppThemeSelector:function(){return i.C},AtlassianAuth:function(){return r.AtlassianAuth},ConfigReader:function(){return R.m},ErrorAlerter:function(){return o.KN},ErrorApiForwarder:function(){return o.gr},FetchMiddlewares:function(){return m.I},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},LocalStorageFeatureFlags:function(){return u.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 o.Jv},UrlPatternDiscovery:function(){return f.p},WebStorage:function(){return g.C},createFetchApi:function(){return m.j}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(23235),c=e(47150),i=e(58652),R=e(14721),f=e(4333),o=e(89536),u=e(14884),m=e(50160),y=e(11358),g=e(56054)},56494:function(te,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder},ApiProvider:function(){return r.ApiProvider},AppThemeSelector:function(){return t.AppThemeSelector},ConfigReader:function(){return t.ConfigReader},ErrorAlerter:function(){return t.ErrorAlerter},ErrorApiForwarder:function(){return t.ErrorApiForwarder},FetchMiddlewares:function(){return t.FetchMiddlewares},LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags},NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi},OAuthRequestManager:function(){return t.OAuthRequestManager},UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return t.UrlPatternDiscovery},WebStorage:function(){return t.WebStorage},createFetchApi:function(){return t.createFetchApi}});var r=e(76105);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(91631);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},80396:function(te,s,e){"use strict";e.d(s,{p:function(){return t}});var r;(function(c){c[c.default=10]="default";const i=50;c[c.app=i]="app",c[c.static=100]="static"})(r||(r={}));class t{constructor(){X(this,"factories",new Map)}register(i,R){const f=r[i],o=this.factories.get(R.api.id);return o&&o.priority>=f?!1:(this.factories.set(R.api.id,{priority:f,factory:R}),!0)}get(i){const R=this.factories.get(i.id);if(!!R)return R.factory}getAllApis(){const i=new Set;for(const{factory:R}of this.factories.values())i.add(R.api);return i}}},14406:function(te,s,e){"use strict";e.d(s,{g:function(){return o}});var r=e(2784),t=e(13980),c=e.n(t);class i{constructor(...m){X(this,"holders");this.holders=m}get(m){for(const y of this.holders){const g=y.get(m);if(g)return g}}}var R=e(76241);const f=(0,R.CT)("api-context"),o=u=>{var S;const{apis:m,children:y}=u,g=(S=(0,r.useContext)(f))==null?void 0:S.atVersion(1),E=g?new i(m,g):m;return r.createElement(f.Provider,{value:(0,R.EI)({1:E}),children:y})};o.propTypes={apis:c().shape({get:c().func.isRequired}).isRequired,children:c().node}},12132:function(te,s,e){"use strict";e.d(s,{M:function(){return r}});class r{constructor(c){X(this,"apis",new Map);this.factories=c}static validateFactories(c,i){for(const R of i){const f=[R],o=new Set;for(;f.length;){const u=f.shift(),m=c.get(u);if(!!m)for(const y of Object.values(m.deps)){if(y.id===R.id)throw new Error(`Circular dependency of api factory for ${R}`);o.has(y)||(o.add(y),f.push(y))}}}}get(c){return this.load(c)}load(c,i=[]){const R=this.apis.get(c.id);if(R)return R;const f=this.factories.get(c);if(!f)return;if(i.includes(f.api))throw new Error(`Circular dependency of api factory for ${f.api}`);const o=this.loadDeps(c,f.deps,[...i,f.api]),u=f.factory(o);return this.apis.set(c.id,u),u}loadDeps(c,i,R){const f={};for(const o in i)if(i.hasOwnProperty(o)){const u=i[o],m=this.load(u,R);if(!m)throw new Error(`No API factory available for dependency ${u} of dependent ${c}`);f[o]=m}return f}}},76105:function(te,s,e){"use strict";e.d(s,{ApiFactoryRegistry:function(){return c.p},ApiProvider:function(){return r.g},ApiResolver:function(){return t.M}});var r=e(14406),t=e(12132),c=e(80396),i=e(82488),R=e.n(i);e.o(i,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return i.AlertApiForwarder}}),e.o(i,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return i.AppThemeSelector}}),e.o(i,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return i.AtlassianAuth}}),e.o(i,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return i.BitbucketAuth}}),e.o(i,"ConfigReader")&&e.d(s,{ConfigReader:function(){return i.ConfigReader}}),e.o(i,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return i.ErrorAlerter}}),e.o(i,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return i.ErrorApiForwarder}}),e.o(i,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return i.FetchMiddlewares}}),e.o(i,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return i.FlatRoutes}}),e.o(i,"GithubAuth")&&e.d(s,{GithubAuth:function(){return i.GithubAuth}}),e.o(i,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return i.GitlabAuth}}),e.o(i,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return i.GoogleAuth}}),e.o(i,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return i.LocalStorageFeatureFlags}}),e.o(i,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return i.MicrosoftAuth}}),e.o(i,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return i.NoOpAnalyticsApi}}),e.o(i,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return i.OAuthRequestManager}}),e.o(i,"OktaAuth")&&e.d(s,{OktaAuth:function(){return i.OktaAuth}}),e.o(i,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return i.OneLoginAuth}}),e.o(i,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return i.UnhandledErrorForwarder}}),e.o(i,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return i.UrlPatternDiscovery}}),e.o(i,"WebStorage")&&e.d(s,{WebStorage:function(){return i.WebStorage}}),e.o(i,"createFetchApi")&&e.d(s,{createFetchApi:function(){return i.createFetchApi}}),e.o(i,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return i.createSpecializedApp}}),e.o(i,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return i.defaultConfigLoader}})},82488:function(){},82370:function(te,s,e){"use strict";e.d(s,{b:function(){return rt}});var r=e(2784),t=e(10289),c=e(64279),i=e(56494),R=e(36964),f=e(76105);function o(Y){const z={};for(const ce in Y.collectors)Y.collectors.hasOwnProperty(ce)&&(z[ce]=Y.collectors[ce]());const q=[{node:r.Children.toArray(Y.root),parent:void 0,contexts:{}}];for(;q.length!==0;){const{node:ce,parent:fe,contexts:Pe}=q.shift();r.Children.forEach(ce,Oe=>{if(!(0,r.isValidElement)(Oe))return;const Se={};for(const Qe in z)if(z.hasOwnProperty(Qe)){const Ke=z[Qe];Se[Qe]=Ke.visit(Ke.accumulator,Oe,fe,Pe[Qe])}for(const Qe of Y.discoverers){const Ke=Qe(Oe);Ke&&q.push({node:Ke,parent:Oe,contexts:Se})}})}return Object.fromEntries(Object.entries(z).map(([ce,fe])=>[ce,fe.accumulator]))}function u(Y,z){return()=>({accumulator:Y(),visit:z})}function m(Y){var z;return(z=Y.props)==null?void 0:z.children}function y(Y){var z,q,ce;if(((z=Y.props)==null?void 0:z.path)&&((q=Y.props)==null?void 0:q.element))return(ce=Y.props)==null?void 0:ce.element}const g=u(()=>new Set,(Y,z)=>{const q=(0,R.getComponentData)(z,"core.plugin");q&&Y.add(q)});var E=e(88934);const S={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},b=u(()=>({paths:new Map,parents:new Map,objects:new Array}),(Y,z,q,ce)=>{var Ot,bt,Pt,Nt,Zt;if((q==null?void 0:q.props.element)===z)return ce;let fe=ce==null?void 0:ce.obj,Pe=ce==null?void 0:ce.routeRef,Oe=ce==null?void 0:ce.sticky;const Se=(Ot=z.props)==null?void 0:Ot.path,Qe=(bt=fe==null?void 0:fe.children)!=null?bt:Y.objects,Ke=Boolean((Pt=z.props)==null?void 0:Pt.caseSensitive);let pt=ce==null?void 0:ce.path;if((0,R.getComponentData)(z,"core.gatherMountPoints")){if(!Se)throw new Error("Mount point gatherer must have a path");pt=Se}const St=(Nt=z.props)==null?void 0:Nt.element;let ut=(0,R.getComponentData)(z,"core.mountPoint");if(!ut&&(0,r.isValidElement)(St)&&(ut=(0,R.getComponentData)(St,"core.mountPoint")),ut){let mn=Se;if(pt&&(mn?pt=void 0:mn=pt),!mn)throw new Error("Mounted routable extension must have a path");Y.paths.set(ut,mn),Pe&&Oe?(Y.parents.set(ut,Pe),Se&&(Pe=ut,Oe=!1)):(Y.parents.set(ut,Pe),Pe=ut),Se?(fe={caseSensitive:Ke,path:Se,element:"mounted",routeRefs:new Set([ut]),children:[S],plugin:(0,R.getComponentData)(z.props.element,"core.plugin")},Qe.push(fe)):fe==null||fe.routeRefs.add(ut)}if((0,R.getComponentData)(z,"core.gatherMountPoints")&&(Oe=!0),(0,R.getComponentData)(z,"core.gatherMountPoints")){if(!Se)throw new Error("Mount point gatherer must have a path");ut||(fe={caseSensitive:Ke,path:Se,element:"gathered",routeRefs:new Set,children:[S],plugin:(Zt=ce==null?void 0:ce.obj)==null?void 0:Zt.plugin},Qe.push(fe))}return{obj:fe,path:pt,routeRef:Pe,sticky:Oe}}),O=u(()=>new Set,(Y,z)=>{if(z.type===E.L){const q=z.props;Y.add("with"in q?q.with:q.without)}});var $=e(76241);const B=(0,$.uW)("route-ref-type",()=>Symbol("route-ref-type"));function F(Y){return Y[B]==="absolute"}function D(Y){return Y[B]==="sub"}function x(Y){return Y[B]==="external"}function w(...Y){const z=Y.join("/").replace(/\/\/+/g,"/");return z!=="/"&&z.endsWith("/")?z.slice(0,-1):z}function k(Y,z,q){let ce,fe="";if(F(Y))ce=Y;else if(D(Y))ce=Y.parent,fe=Y.path;else if(x(Y)){const Se=q.get(Y);if(!Se)return[void 0,""];if(F(Se))ce=Se;else if(D(Se))ce=Se.parent,fe=Se.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${Se}`)}else throw Y[B]?new Error(`Unknown or invalid route ref type, ${Y[B]}`):new Error(`Unknown object passed to useRouteRef, got ${Y}`);if(!ce)return[void 0,""];const Pe=z.get(ce);if(!Pe)return[void 0,""];const Oe=w(Pe,fe);return[ce,Oe]}function re(Y,z,q,ce,fe){var pt;const Pe=(pt=(0,t.fp)(fe,z))!=null?pt:[],Oe=Array();let Se=-1;for(let St=Y;St&&(Se=Pe.findIndex(ut=>ut.route.routeRefs.has(St)),Se===-1);St=ce.get(St))Oe.unshift(St);Oe.length===0&&(Se-=1);const Qe=Se===-1?"":Pe[Se].pathname,Ke=w(...Oe.slice(0,-1).map(St=>{const ut=q.get(St);if(!ut)throw new Error(`No path for ${St}`);if(ut.includes(":"))throw new Error(`Cannot route to ${Y} with parent ${St} as it has parameters`);return ut}));return Qe+Ke}class le{constructor(z,q,ce,fe,Pe){this.routePaths=z,this.routeParents=q,this.routeObjects=ce,this.routeBindings=fe,this.appBasePath=Pe}resolve(z,q){const[ce,fe]=k(z,this.routePaths,this.routeBindings);if(!ce)return;let Pe;typeof q=="string"?Pe=this.trimPath(q):q.pathname?Pe={...q,pathname:this.trimPath(q.pathname)}:Pe=q;const Oe=this.appBasePath+re(ce,Pe,this.routePaths,this.routeParents,this.routeObjects);return(...[Qe])=>Oe+(0,t.Gn)(fe,Qe)}trimPath(z){return z&&(z.startsWith(this.appBasePath)?z.slice(this.appBasePath.length):z)}}const Re=(0,$.CT)("routing-context"),xe=({routePaths:Y,routeParents:z,routeObjects:q,routeBindings:ce,basePath:fe="",children:Pe})=>{const Oe=new le(Y,z,q,ce,fe),Se=(0,$.EI)({1:Oe});return r.createElement(Re.Provider,{value:Se},Pe)},De=(Y,z)=>{var q,ce;try{const fe=(0,t.fp)(z,{pathname:Y}),Pe=(q=fe==null?void 0:fe.filter(Se=>{var Qe;return((Qe=Se==null?void 0:Se.route.routeRefs)==null?void 0:Qe.size)>0}).pop())==null?void 0:q.route;if(!Pe)return{};let Oe;return Pe.routeRefs.size===1&&(Oe=Pe.routeRefs.values().next().value),{extension:"App",pluginId:((ce=Pe.plugin)==null?void 0:ce.getId())||"root",...Oe?{routeRef:Oe.id}:{}}}catch{return{}}},je=({pathname:Y,search:z,hash:q})=>{const ce=(0,R.useAnalytics)();return(0,r.useEffect)(()=>{ce.captureEvent("navigate",`${Y}${z}${q}`)},[ce,Y,z,q]),null},ve=({routeObjects:Y})=>{const{pathname:z,search:q,hash:ce}=(0,t.TH)();return r.createElement(R.AnalyticsContext,{attributes:De(z,Y)},r.createElement(je,{pathname:z,search:q,hash:ce}))};function Je(Y,z){const q=new Set(z.values());q.delete(void 0);for(const ce of z.keys()){if(q.has(ce))continue;let fe=ce,Pe="";for(;fe;){const Se=Y.get(fe);if(!Se)throw new Error(`No path for ${fe}`);Pe=`${Se}${Pe}`,fe=z.get(fe)}const Oe=Pe.match(/:(\w+)/g);if(Oe){for(let Se=0;Se<Oe.length;Se++)for(let Qe=Se+1;Qe<Oe.length;Qe++)if(Oe[Qe]===Oe[Se])throw new Error(`Parameter ${Oe[Qe]} is duplicated in path ${Pe}`)}}}function nt(Y,z){for(const q of z)if(!!q.externalRoutes){for(const[ce,fe]of Object.entries(q.externalRoutes))if(!fe.optional&&!Y.has(fe))throw new Error(`External route '${ce}' of the '${q.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const Tt=(0,$.CT)("app-context"),At=({appContext:Y,children:z})=>{const q=(0,$.EI)({1:Y});return r.createElement(Tt.Provider,{value:q,children:z})};function Ie(Y){return new Error(`Tried to access IdentityApi ${Y} before app was loaded`)}function ht(Y){console.warn(`WARNING: Call to ${Y} is deprecated and will break in the future`)}class gt{constructor(){X(this,"target");X(this,"waitForTarget");X(this,"resolveTarget",()=>{});X(this,"signOutTargetUrl","/");this.waitForTarget=new Promise(z=>{this.resolveTarget=z})}setTarget(z,q){this.target=z,this.signOutTargetUrl=q.signOutTargetUrl,this.resolveTarget(z)}getUserId(){if(!this.target)throw Ie("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return ht("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Ie("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return ht("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(z=>z.getProfileInfo())}async getBackstageIdentity(){const z=await this.waitForTarget.then(q=>q.getBackstageIdentity());return z.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${z.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),z}async getCredentials(){return this.waitForTarget.then(z=>z.getCredentials())}async getIdToken(){return this.waitForTarget.then(z=>{if(!z.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return ht("getIdToken"),z.getIdToken()})}async signOut(){await this.waitForTarget.then(z=>z.signOut()),location.href=this.signOutTargetUrl}}var lt=e(72164);function _(Y,z,q){if(Y!==void 0){const fe=q.find(Pe=>Pe.id===Y);if(fe)return fe}if(z){const fe=q.find(Pe=>Pe.variant==="dark");if(fe)return fe}const ce=q.find(fe=>fe.variant==="light");return ce||q[0]}const pe=()=>{const Y=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[z,q]=(0,r.useState)(Y.matches);return(0,r.useEffect)(()=>{const ce=fe=>{q(fe.matches)};return Y.addListener(ce),()=>{Y.removeListener(ce)}},[Y]),z};function be({children:Y}){const z=(0,R.useApi)(R.appThemeApiRef),q=(0,lt.Z)(z.activeThemeId$(),z.getActiveThemeId()),ce=Boolean(window.matchMedia)?pe():!1,fe=_(q,ce,z.getInstalledThemes());if(!fe)throw new Error("App has no themes");return r.createElement(fe.Provider,{children:Y})}var We=e(46611);class tt{constructor(){X(this,"apis",[])}add(z,q){return this.apis.push([z.id,q]),q}build(){return new at(new Map(this.apis))}}class at{static builder(){return new tt}static from(z){return new at(new Map(z.map(([q,ce])=>[q.id,ce])))}static with(z,q){return new at(new Map([[z.id,q]]))}constructor(z){this.apis=z}with(z,q){return new at(new Map([...this.apis,[z.id,q]]))}get(z){return this.apis.get(z.id)}}function Et(Y){const z=new Map;return Y&&Y({bind:(ce,fe)=>{for(const[Pe,Oe]of Object.entries(fe)){const Se=ce[Pe];if(!Se)throw new Error(`Key ${Pe} is not an existing external route`);if(!Oe&&!Se.optional)throw new Error(`External route ${Pe} is required but was undefined`);Oe&&z.set(Se,Oe)}}}),z}const se=(0,r.createContext)({routeObjects:[]});function ae(Y){var q;let{pathname:z}=new URL((q=Y.getOptionalString("app.baseUrl"))!=null?q:"/","http://dummy.dev");return z=z.replace(/\/*$/,""),z}function Ye(Y,z,q){var Qe;const ce=Boolean(Y),fe=(0,c.default)(Y||(()=>Promise.resolve([])));let Pe;if(ce&&fe.loading){const{Progress:Ke}=z;Pe=r.createElement(Ke,null)}else if(fe.error){const{BootErrorPage:Ke}=z;Pe=r.createElement(Ke,{step:"load-config",error:fe.error})}const{ThemeProvider:Oe=be}=z;return Pe?{node:r.createElement(i.ApiProvider,{apis:at.with(R.appThemeApiRef,q)},r.createElement(Oe,null,Pe))}:{api:i.ConfigReader.fromConfigs((Qe=fe.value)!=null?Qe:[])}}class Ge{constructor(z){this.app=z}getPlugins(){return this.app.getPlugins()}getSystemIcon(z){return this.app.getSystemIcon(z)}getComponents(){return this.app.getComponents()}}class $e{constructor(z){X(this,"apiHolder");X(this,"configApi");X(this,"apis");X(this,"icons");X(this,"plugins");X(this,"components");X(this,"themes");X(this,"configLoader");X(this,"defaultApis");X(this,"bindRoutes");X(this,"appIdentityProxy",new gt);X(this,"apiFactoryRegistry");var q,ce,fe,Pe;this.apis=(q=z.apis)!=null?q:[],this.icons=z.icons,this.plugins=new Set((ce=z.plugins)!=null?ce:[]),this.components=z.components,this.themes=z.themes,this.configLoader=(fe=z.configLoader)!=null?fe:We.t,this.defaultApis=(Pe=z.defaultApis)!=null?Pe:[],this.bindRoutes=z.bindRoutes,this.apiFactoryRegistry=new f.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(z){return this.icons[z]}getComponents(){return this.components}getProvider(){const z=new Ge(this);let q=!1;return({children:fe})=>{const Pe=(0,r.useMemo)(()=>i.AppThemeSelector.createWithStorage(this.themes),[]),{routing:Oe,featureFlags:Se,routeBindings:Qe}=(0,r.useMemo)(()=>{const ut=o({root:fe,discoverers:[m,y],collectors:{routing:b,collectedPlugins:g,featureFlags:O}});return ut.collectedPlugins.forEach(Dt=>this.plugins.add(Dt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...ut,routeBindings:Et(this.bindRoutes)}},[fe]);q||(q=!0,Je(Oe.paths,Oe.parents),nt(Qe,this.plugins));const Ke=Ye(this.configLoader,this.components,Pe),pt="api"in Ke;if(pt){const{api:ut}=Ke;this.configApi=ut}if((0,r.useEffect)(()=>{if(pt){const ut=this.getApiHolder().get(R.featureFlagsApiRef);for(const Dt of this.plugins.values())if("getFeatureFlags"in Dt)for(const Ot of Dt.getFeatureFlags())ut.registerFlag({name:Ot.name,pluginId:Dt.getId()});else for(const Ot of Dt.output())Ot.type==="feature-flag"&&ut.registerFlag({name:Ot.name,pluginId:Dt.getId()});for(const Dt of Se)ut.registerFlag({name:Dt,pluginId:""})}},[pt,Ke,Se]),"node"in Ke)return Ke.node;const{ThemeProvider:St=be}=this.components;return r.createElement(i.ApiProvider,{apis:this.getApiHolder()},r.createElement(At,{appContext:z},r.createElement(St,null,r.createElement(xe,{routePaths:Oe.paths,routeParents:Oe.parents,routeObjects:Oe.objects,routeBindings:Qe,basePath:ae(Ke.api)},r.createElement(se.Provider,{value:{routeObjects:Oe.objects}},fe)))))}}getRouter(){const{Router:z,SignInPage:q}=this.components,ce=({component:Pe,children:Oe})=>{const[Se,Qe]=(0,r.useState)(),Ke=(0,R.useApi)(R.configApiRef),pt=ae(Ke);return Se?(this.appIdentityProxy.setTarget(Se,{signOutTargetUrl:pt||"/"}),Oe):r.createElement(Pe,{onSignInSuccess:Qe})};return({children:Pe})=>{const Oe=(0,R.useApi)(R.configApiRef),Se=ae(Oe),Qe=`${Se}/*`,{routeObjects:Ke}=(0,r.useContext)(se);return q?r.createElement(z,null,r.createElement(ve,{routeObjects:Ke}),r.createElement(ce,{component:q},r.createElement(t.Z5,null,r.createElement(t.AW,{path:Qe,element:r.createElement(r.Fragment,null,Pe)})))):(this.appIdentityProxy.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}},{signOutTargetUrl:Se||"/"}),r.createElement(z,null,r.createElement(ve,{routeObjects:Ke}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:Qe,element:r.createElement(r.Fragment,null,Pe)}))))}}getApiHolder(){if(this.apiHolder){for(const z of this.plugins)for(const q of z.getApis())this.apiFactoryRegistry.get(q.api)||this.apiFactoryRegistry.register("default",q);return f.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:R.appThemeApiRef,deps:{},factory:()=>i.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:R.configApiRef,deps:{},factory:()=>{if(!this.configApi)throw new Error("Tried to access config API before config was loaded");return this.configApi}}),this.apiFactoryRegistry.register("static",{api:R.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:R.featureFlagsApiRef,deps:{},factory:()=>new i.LocalStorageFeatureFlags});for(const z of this.defaultApis)this.apiFactoryRegistry.register("default",z);for(const z of this.plugins)for(const q of z.getApis())if(!this.apiFactoryRegistry.register("default",q))throw new Error(`Plugin ${z.getId()} tried to register duplicate or forbidden API factory for ${q.api}`);for(const z of this.apis)if(!this.apiFactoryRegistry.register("app",z))throw new Error(`Duplicate or forbidden API factory for ${z.api} in app`);return f.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new f.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(z){const q=new Set;for(const ce of z){const fe=ce.getId();if(q.has(fe))throw new Error(`Duplicate plugin found '${fe}'`);q.add(fe)}}}function rt(Y){return new $e(Y)}},46611:function(te,s,e){"use strict";e.d(s,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const c=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!c)throw new Error("No static configuration provided");if(!Array.isArray(c))throw new Error("Static configuration has invalid format");const i=c.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const f=JSON.parse(t);Array.isArray(f)?i.push(...f):i.push({data:f,context:"env"})}catch(f){throw new Error(`Failed to load runtime configuration, ${f}`)}const R=window.__APP_CONFIG__;return R&&i.push({context:"window",data:R}),i}},44056:function(te,s,e){"use strict";e.d(s,{createSpecializedApp:function(){return r.b},defaultConfigLoader:function(){return t.t}});var r=e(82370),t=e(46611),c=e(73495),i=e.n(c);e.o(c,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return c.AtlassianAuth}}),e.o(c,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return c.BitbucketAuth}}),e.o(c,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return c.FlatRoutes}}),e.o(c,"GithubAuth")&&e.d(s,{GithubAuth:function(){return c.GithubAuth}}),e.o(c,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return c.GitlabAuth}}),e.o(c,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return c.GoogleAuth}}),e.o(c,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return c.MicrosoftAuth}}),e.o(c,"OktaAuth")&&e.d(s,{OktaAuth:function(){return c.OktaAuth}}),e.o(c,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return c.OneLoginAuth}})},73495:function(){},49208:function(te,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder},ErrorAlerter:function(){return r.ErrorAlerter},ErrorApiForwarder:function(){return r.ErrorApiForwarder},FetchMiddlewares:function(){return r.FetchMiddlewares},FlatRoutes:function(){return c.w},NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi},OAuthRequestManager:function(){return r.OAuthRequestManager},UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return r.UrlPatternDiscovery},WebStorage:function(){return r.WebStorage},createFetchApi:function(){return r.createFetchApi},createSpecializedApp:function(){return t.createSpecializedApp},defaultConfigLoader:function(){return t.defaultConfigLoader}});var r=e(56494);e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}});var c=e(63938)},57018:function(te,s,e){"use strict";e.d(s,{RefreshingAuthSessionManager:function(){return f}});function r(u,m){for(const y of m)if(!u.has(y))return!1;return!0}class t{constructor(m){this.options=m}sessionExistsAndHasScope(m,y){if(!m)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const g=this.options.sessionScopes(m);return r(g,y)}getExtendedScope(m,y){const g=new Set(this.options.defaultScopes);if(m&&this.options.sessionScopes!==void 0){const E=this.options.sessionScopes(m);for(const S of E)g.add(S)}if(y)for(const E of y)g.add(E);return g}}var c=e(98005),i=e(36964);class R{constructor(){X(this,"subject",new c.X(i.SessionState.SignedOut));X(this,"signedIn",!1)}setIsSignedIn(m){this.signedIn!==m&&(this.signedIn=m,this.subject.next(this.signedIn?i.SessionState.SignedIn:i.SessionState.SignedOut))}sessionState$(){return this.subject}}class f{constructor(m){X(this,"connector");X(this,"helper");X(this,"sessionScopesFunc");X(this,"sessionShouldRefreshFunc");X(this,"stateTracker",new R);X(this,"refreshPromise");X(this,"currentSession");const{connector:y,defaultScopes:g=new Set,sessionScopes:E,sessionShouldRefresh:S}=m;this.connector=y,this.sessionScopesFunc=E,this.sessionShouldRefreshFunc=S,this.helper=new t({sessionScopes:E,defaultScopes:g})}async getSession(m){if(this.helper.sessionExistsAndHasScope(this.currentSession,m.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const g=await this.collapsedSessionRefresh(),E=this.sessionScopesFunc(this.currentSession),S=this.sessionScopesFunc(g);return r(S,E)&&(this.currentSession=g),g}catch(g){if(m.optional)return;throw g}}if(!this.currentSession&&!m.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(m)}catch{}if(!m.optional)return this.currentSession=await this.connector.createSession({...m,scopes:this.helper.getExtendedScope(this.currentSession,m.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 m=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),m}finally{delete this.refreshPromise}}}class o{constructor(m){X(this,"connector");X(this,"helper");X(this,"stateTracker",new SessionStateTracker);X(this,"currentSession");const{connector:y,defaultScopes:g=new Set,sessionScopes:E}=m;this.connector=y,this.helper=new SessionScopeHelper({sessionScopes:E,defaultScopes:g})}setSession(m){this.currentSession=m,this.stateTracker.setIsSignedIn(Boolean(m))}async getSession(m){if(this.helper.sessionExistsAndHasScope(this.currentSession,m.scopes))return this.currentSession;if(!m.optional)return this.currentSession=await this.connector.createSession({...m,scopes:this.helper.getExtendedScope(this.currentSession,m.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(te,s,e){"use strict";e.d(s,{J:function(){return c},X:function(){return i}});var r=e(82394),t=e.n(r);class c{constructor(){X(this,"isClosed",!1);X(this,"terminatingError");X(this,"observable",new(t())(f=>this.isClosed?(this.terminatingError?f.error(this.terminatingError):f.complete(),()=>{}):(this.subscribers.add(f),()=>{this.subscribers.delete(f)})));X(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(f){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(o=>o.next(f))}error(f){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=f,this.subscribers.forEach(o=>o.error(f))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(f=>f.complete())}subscribe(f,o,u){const m=typeof f=="function"?{next:f,error:o,complete:u}:f;return this.observable.subscribe(m)}}class i{constructor(f){X(this,"isClosed");X(this,"currentValue");X(this,"terminatingError");X(this,"observable");X(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=f,this.terminatingError=void 0,this.observable=new(t())(o=>this.isClosed?(this.terminatingError?o.error(this.terminatingError):o.complete(),()=>{}):(o.next(this.currentValue),this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}[Symbol.observable](){return this}get closed(){return this.isClosed}next(f){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=f,this.subscribers.forEach(o=>o.next(f))}error(f){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=f,this.subscribers.forEach(o=>o.error(f))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(f=>f.complete())}subscribe(f,o,u){const m=typeof f=="function"?{next:f,error:o,complete:u}:f;return this.observable.subscribe(m)}}},88934:function(te,s,e){"use strict";e.d(s,{L:function(){return c}});var r=e(36964),t=e(2784);const c=i=>{const{children:R}=i,f=(0,r.useApi)(r.featureFlagsApiRef),o="with"in i?f.isActive(i.with):!f.isActive(i.without);return t.createElement(t.Fragment,null,o?R:null)};(0,r.attachComponentData)(c,"core.featureFlagged",!0)},63938:function(te,s,e){"use strict";e.d(s,{w:function(){return i}});var r=e(2784),t=e(10289),c=e(36964);const i=f=>{const o=(0,c.useApp)(),{NotFoundErrorPage:u}=o.getComponents(),m=(0,c.useElementFilter)(f.children,y=>y.getElements().flatMap(g=>{var S;let E=g.props.path;return E===""?[]:(E=(S=E==null?void 0:E.replace(/\/\*$/,""))!=null?S:"/",[{path:E,element:g,children:g.props.children?[{path:E==="/"?"/":"/*",element:g.props.children}]:void 0}])}).sort((g,E)=>E.path.localeCompare(g.path)).map(g=>(g.path=g.path==="/"?"/":`${g.path}/*`,g)));return m.push({element:r.createElement(u,null),path:"/*"}),(0,t.V$)(m)};var R=e(88934)},82339:function(te,s,e){"use strict";e.d(s,{Button:function(){return le},CodeSnippet:function(){return Ie},Content:function(){return to},ContentHeader:function(){return mi},CreateButton:function(){return lt},DependencyGraph:function(){return mn},DependencyGraphTypes:function(){return r},EmptyState:function(){return Xt},ErrorPage:function(){return Ei},ErrorPanel:function(){return It},Header:function(){return uo},HeaderIconLinkRow:function(){return kn},HeaderLabel:function(){return Li},HeaderTabs:function(){return no},InfoCard:function(){return ur},ItemCardGrid:function(){return wi},ItemCardHeader:function(){return Fi},Link:function(){return k},LogViewer:function(){return xr},MissingAnnotationEmptyState:function(){return En},OverflowTooltip:function(){return Er},Page:function(){return mo},PageWithHeader:function(){return Ni},Progress:function(){return Mr},ResponseErrorPanel:function(){return on},RoutedTabs:function(){return ro},Select:function(){return ot},Sidebar:function(){return ls},SidebarDivider:function(){return Cs},SidebarItem:function(){return _a},SidebarPage:function(){return Jo},SubvalueCell:function(){return $s},SupportButton:function(){return Vo},Table:function(){return ai},WarningPanel:function(){return rn},sidebarConfig:function(){return qn},useSidebarOpenState:function(){return fa},useSidebarPinState:function(){return Hr}});var r={};e.r(r),e.d(r,{Nm:function(){return _},ht:function(){return We},LJ:function(){return be}});var t=e(2784),c=e(36964),i=e(19928);function R(n){const[a,l]=useState([]),d=useApi(alertApiRef),{anchorOrigin:p={vertical:"top",horizontal:"center"}}=n;if(useEffect(()=>{const Z=d.alert$().subscribe(G=>l(H=>H.concat(G)));return()=>{Z.unsubscribe()}},[d]),a.length===0)return null;const[v]=a,P=()=>{l(Z=>Z.filter(G=>G!==v))};return React.createElement(Snackbar,{open:!0,anchorOrigin:p},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:P,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:v.severity},React.createElement("span",null,v.message.toString(),a.length>1&&React.createElement("em",null,` (${a.length-1} older ${pluralize("message",a.length-1)})`))))}var f=e(79692),o=e(12420);const u=(0,f.Z)(n=>(0,o.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function m(n){const{displayName:a,picture:l,customStyles:d}=n,p=u();let v={...d};return l||(v={backgroundColor:stringToColor(a||""),...d}),React.createElement(MaterialAvatar,{alt:a,src:l,className:p.avatar,style:v},a&&extractInitials(a))}var y=e(77277),g=e(72779),E=e.n(g),S=e(86689),b=e(62833),O=e(76635);const $=(0,f.Z)({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"}},{name:"Link"}),B=n=>/^([a-z+.-]+):/.test(n),F=()=>{try{return(0,c.useApi)(c.configApiRef).getOptionalString("app.baseUrl")}catch{return}},D=()=>{var d;const n="http://dummy.dev",a=(d=F())!=null?d:"/",{pathname:l}=new URL(a,n);return(0,O.trimEnd)(l,"/")},x=n=>{let a=String(n);const l=D(),d=B(a),p=a.startsWith(l);return!d&&!p&&(a=l.concat(a)),a},w=n=>{var a;return n instanceof Array?n.map(w).join(" ").trim():typeof n=="object"&&n?w((a=n==null?void 0:n.props)==null?void 0:a.children):["string","number"].includes(typeof n)?String(n):""},k=t.forwardRef(({onClick:n,noTrack:a,...l},d)=>{const p=$(),v=(0,c.useAnalytics)(),P=x(l.to),Z=w(l.children)||P,G=B(P),H=G&&!!/^https?:/.exec(P),ie=ee=>{n==null||n(ee),a||v.captureEvent("click",Z,{attributes:{to:P}})};return G?t.createElement(S.Z,{...H?{target:"_blank",rel:"noopener"}:{},...l,ref:d,href:P,onClick:ie,className:E()(p.externalLink,l.className)},l.children,t.createElement("span",{className:p.visuallyHidden},", Opens in a new window")):t.createElement(S.Z,{...l,ref:d,component:b.rU,to:P,onClick:ie})}),re=t.forwardRef((n,a)=>t.createElement(k,{ref:a,...n,color:"initial"})),le=t.forwardRef((n,a)=>t.createElement(y.Z,{ref:a,component:re,...n}));var Re=e(60364),xe=e(61837),De=e(80030),je=e(19353),ve=e(95074);function Je(n){const{text:a,tooltipDelay:l=1e3,tooltipText:d="Text copied to clipboard","aria-label":p="Copy text"}=n,v=(0,c.useApi)(c.errorApiRef),[P,Z]=(0,t.useState)(!1),[{error:G},H]=(0,ve.Z)();(0,t.useEffect)(()=>{G&&v.post(G)},[G,v]);const ie=ee=>{ee.stopPropagation(),Z(!0),H(a)};return t.createElement(t.Fragment,null,t.createElement(De.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:l,onClose:()=>Z(!1),open:P},t.createElement(xe.Z,{onClick:ie,"aria-label":p},t.createElement(je.Z,null))))}var nt=e(83229),Tt=e(26639),At=e(39595);function Ie(n){const{text:a,language:l,showLineNumbers:d=!1,highlightedNumbers:p,customStyle:v,showCopyCodeButton:P=!1}=n,Z=(0,Re.Z)(),G=Z.palette.type==="dark"?Tt.Z:At.Z,H=Z.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(nt.Z,{customStyle:v,language:l,style:G,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:Z.palette.textVerySubtle},lineProps:ie=>p!=null&&p.includes(ie)?{style:{backgroundColor:H}}:{}},a),P&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(Je,{text:a})))}var ht=e(41156),gt=e(88188);function lt(n){const{title:a,to:l}=n,d=(0,ht.Z)(p=>p.breakpoints.down("xs"));return l?d?t.createElement(xe.Z,{component:b.rU,color:"primary",title:a,size:"small",to:l},t.createElement(gt.Z,null)):t.createElement(y.Z,{component:b.rU,variant:"contained",color:"primary",to:l},a):null}var _;(function(n){const a="TB";n.TOP_BOTTOM=a;const l="BT";n.BOTTOM_TOP=l;const d="LR";n.LEFT_RIGHT=d;const p="RL";n.RIGHT_LEFT=p})(_||(_={}));var pe;(function(n){const a="UL";n.UP_LEFT=a;const l="UR";n.UP_RIGHT=l;const d="DL";n.DOWN_LEFT=d;const p="DR";n.DOWN_RIGHT=p})(pe||(pe={}));var be;(function(n){const a="network-simplex";n.NETWORK_SIMPLEX=a;const l="tight-tree";n.TIGHT_TREE=l;const d="longest-path";n.LONGEST_PATH=d})(be||(be={}));var We;(function(n){const a="l";n.LEFT=a;const l="r";n.RIGHT=l;const d="c";n.CENTER=d})(We||(We={}));var tt=e(84945),at=e(11105),Et=e(97963),se=e(46506),ae=e.n(se),Ye=e(54073),Ge=e.n(Ye),$e=e(10368);const rt=(0,f.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function Y({node:{id:n}}){const a=rt(),[l,d]=t.useState(0),[p,v]=t.useState(0),P=t.useRef(null);t.useLayoutEffect(()=>{if(P.current){let{height:ie,width:ee}=P.current.getBBox();ie=Math.round(ie),ee=Math.round(ee),(ie!==p||ee!==l)&&(d(ee),v(ie))}},[l,p]);const Z=10,G=l+Z*2,H=p+Z*2;return t.createElement("g",null,t.createElement("rect",{className:a.node,width:G,height:H,rx:10}),t.createElement("text",{ref:P,className:a.text,y:H/2,x:G/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const z="arrow-marker",q="node",ce="edge",fe="label",Pe=(0,$e.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),Oe=n=>t.createElement(Y,{...n});function Se({render:n=Oe,setNode:a,node:l}){const{width:d,height:p,x:v=0,y:P=0}=l,Z=l,G=Pe(),H=t.useRef(null);return t.useLayoutEffect(()=>{if(H.current){let{height:ie,width:ee}=H.current.getBBox();ie=Math.round(ie),ee=Math.round(ee),(ie!==p||ee!==d)&&a(l.id,{...l,height:ie,width:ee})}},[l,d,p,a]),t.createElement("g",{ref:H,"data-testid":q,className:G.node,transform:`translate(${v-d/2},${P-p/2})`},n({node:Z}))}var Qe=e(55876),Ke=e(66481),pt=e(19574),St=e.n(pt);const ut=(0,$e.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function Dt({edge:{label:n}}){const a=ut();return t.createElement("text",{className:a.text,textAnchor:"middle"},n)}const Ot=(0,$e.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"}),bt=n=>t.createElement(Dt,{...n}),Pt=Qe.Z().x(n=>n.x).y(n=>n.y).curve(Ke.Z);function Nt({render:n=bt,setEdge:a,id:l,edge:d}){const{x:p=0,y:v=0,width:P,height:Z,points:G}=d,H=d,ie=Ot(),ee=t.useRef(null);t.useLayoutEffect(()=>{if(ee.current){let{height:Te,width:we}=ee.current.getBBox();Te=Math.round(Te),we=Math.round(we),(Te!==Z||we!==P)&&a(l,{...d,height:Te,width:we})}},[d,Z,P,a,l]);let Ee="";if(G){const Te=G.filter(we=>St()(we.x)&&St()(we.y));Ee=Pt(Te)||""}return t.createElement(t.Fragment,null,Ee&&t.createElement("path",{"data-testid":ce,className:ie.path,markerEnd:`url(#${z})`,d:Ee}),H.label?t.createElement("g",{ref:ee,"data-testid":fe,className:ie.label,transform:`translate(${p},${v})`},n({edge:H})):null)}const Zt="workspace";function mn(n){var ir,Lr;const{edges:a,nodes:l,renderNode:d,direction:p=_.TOP_BOTTOM,align:v,nodeMargin:P=50,edgeMargin:Z=10,rankMargin:G=50,paddingX:H=0,paddingY:ie=0,acyclicer:ee,ranker:Ee=be.NETWORK_SIMPLEX,labelPosition:Te=We.RIGHT,labelOffset:we=10,edgeRanks:ct=1,edgeWeight:Mt=1,renderLabel:Kt,defs:_t,zoom:Ht="enabled",...Ct}=n,nn=(0,Et.Z)(),[$t,or]=t.useState(100),[Kn,_n]=t.useState(100),wt=t.useRef(new(ae()).graphlib.Graph),[br,Vr]=t.useState(((ir=wt.current.graph())==null?void 0:ir.width)||0),[Pr,aa]=t.useState(((Lr=wt.current.graph())==null?void 0:Lr.height)||0),[va,oa]=t.useState([]),[sa,Aa]=t.useState([]),dn=Math.max(br,$t),In=Math.max(Pr,Kn),dr=t.useMemo(()=>Ge()(fn=>{if(!fn)return;const An=at.Z(fn),ln=at.Z(fn.getElementById(Zt));function Hn(){An.call(tt.sP().scaleExtent([1,10]).on("zoom",er=>{er.transform.x=Math.min(0,Math.max(er.transform.x,dn-dn*er.transform.k)),er.transform.y=Math.min(0,Math.max(er.transform.y,In-In*er.transform.k)),ln.attr("transform",er.transform)}))}Ht==="enabled"?Hn():Ht==="enable-on-click"&&An.on("click",()=>Hn());const{width:jn,height:ia}=fn.getBoundingClientRect();$t!==jn&&or(jn),Kn!==ia&&_n(ia)},100),[Kn,$t,dn,In,Ht]),sr=t.useCallback(()=>{const fn=wt.current.nodes(),An=wt.current.edges();fn.forEach(ln=>{l.some(jn=>jn.id===ln)||wt.current.removeNode(ln)}),An.forEach(ln=>{a.some(jn=>jn.from===ln.v&&jn.to===ln.w)||wt.current.removeEdge(ln.v,ln.w)}),l.forEach(ln=>{const Hn=wt.current.nodes().find(jn=>ln.id===jn);if(Hn&&wt.current.node(Hn)){const{width:jn,height:ia,x:er,y:tl}=wt.current.node(Hn);wt.current.setNode(Hn,{...ln,width:jn,height:ia,x:er,y:tl})}else wt.current.setNode(ln.id,{...ln,width:0,height:0})}),a.forEach(ln=>{wt.current.setEdge(ln.from,ln.to,{...ln,label:ln.label,width:0,height:0,labelpos:Te,labeloffset:we,weight:Mt,minlen:ct})})},[a,l,Te,we,Mt,ct]),sn=t.useMemo(()=>Ge()(()=>{ae().layout(wt.current);const{height:fn,width:An}=wt.current.graph(),ln=Math.max(0,fn||0),Hn=Math.max(0,An||0);Vr(Hn),aa(ln),oa(wt.current.nodes()),Aa(wt.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(wt.current.setGraph({rankdir:p,align:v,nodesep:P,edgesep:Z,ranksep:G,marginx:H,marginy:ie,acyclicer:ee,ranker:Ee}),sr(),sn(),sn.cancel),[ee,v,p,Z,H,ie,P,G,Ee,sr,sn]);function Ln(fn,An){return wt.current.setNode(fn,An),sn(),wt.current}function Ir(fn,An){return wt.current.setEdge(fn,An),sn(),wt.current}return t.createElement("svg",{ref:dr,...Ct,width:"100%",height:In,viewBox:`0 0 ${dn} ${In}`},t.createElement("defs",null,t.createElement("marker",{id:z,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:nn.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),_t),t.createElement("g",{id:Zt},t.createElement("svg",{width:br,height:Pr,y:In/2-Pr/2,x:dn/2-br/2,viewBox:`0 0 ${br} ${Pr}`},sa.map(fn=>{const An=wt.current.edge(fn);return An?t.createElement(Nt,{key:`${fn.v}-${fn.w}`,id:fn,setEdge:Ir,render:Kt,edge:An}):null}),va.map(fn=>{const An=wt.current.node(fn);return An?t.createElement(Se,{key:fn,setNode:Ln,render:d,node:An}):null}))))}const On=(0,f.Z)(n=>{var a;return{root:{padding:n.spacing(0),marginBottom:n.spacing(0),marginTop:n.spacing(0),display:"flex",flexFlow:"row nowrap"},topPosition:{position:"relative",marginBottom:n.spacing(6),marginTop:-n.spacing(3),zIndex:"unset"},icon:{fontSize:20},content:{width:"100%",maxWidth:"inherit",flexWrap:"nowrap"},message:{display:"flex",alignItems:"center",color:n.palette.banner.text,"& a":{color:n.palette.banner.link}},info:{backgroundColor:n.palette.banner.info},error:{backgroundColor:n.palette.banner.error},warning:{backgroundColor:(a=n.palette.banner.warning)!=null?a:n.palette.banner.error}}},{name:"BackstageDismissableBanner"}),kt=n=>{var Te;const{variant:a,message:l,id:d,fixed:p=!1}=n,v=On(),Z=useApi(storageApiRef).forBucket("notifications"),G=(Te=Z.snapshot("dismissedBanners").value)!=null?Te:[],[H,ie]=useState(new Set(G)),ee=useObservable(Z.observe$("dismissedBanners"));useEffect(()=>{var we;if(ee!=null&&ee.value){const ct=(we=ee==null?void 0:ee.value)!=null?we:[];ie(new Set(ct))}},[ee==null?void 0:ee.value]);const Ee=()=>{Z.set("dismissedBanners",[...H,d])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!H.has(d),classes:{root:classNames(v.root,!p&&v.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(v.content,v[a]),message:v.message},message:l,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Ee},React.createElement(Close,{className:v.icon}))]}))};var Ut=e(60905),_e=e(90436),ue=e.p+"static/missingAnnotation.67f79e98..svg",j=e.p+"static/noInformation.4b426325..svg",ye=e.p+"static/createComponent.975d1e1e..svg",Ve=e.p+"static/noBuild.1715fa71..svg";const et=(0,f.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),it=({missing:n})=>{const a=et();switch(n){case"field":return t.createElement("img",{src:ue,className:a.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:j,alt:"no Information",className:a.generalImg});case"content":return t.createElement("img",{src:ye,alt:"create Component",className:a.generalImg});case"data":return t.createElement("img",{src:Ve,alt:"no Build",className:a.generalImg});default:return null}},Rt=(0,f.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 Xt(n){const{title:a,description:l,missing:d,action:p}=n,v=Rt();return t.createElement(Ut.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:v.root,spacing:2},t.createElement(Ut.Z,{item:!0,xs:12,md:6},t.createElement(Ut.Z,{container:!0,direction:"column"},t.createElement(Ut.Z,{item:!0,xs:!0},t.createElement(_e.Z,{variant:"h5"},a)),t.createElement(Ut.Z,{item:!0,xs:!0},t.createElement(_e.Z,{variant:"body1"},l)),t.createElement(Ut.Z,{item:!0,xs:!0,className:v.action},p))),t.createElement(Ut.Z,{item:!0,xs:12,md:6,className:v.imageContainer},t.createElement(it,{missing:d})))}const en=`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`,tn=(0,f.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function En(n){const{annotation:a,readMoreUrl:l}=n,d=l||"https://backstage.io/docs/features/software-catalog/well-known-annotations",p=tn(),v=t.createElement(t.Fragment,null,"The ",t.createElement("code",null,a)," annotation is missing. You need to add the annotation to your component if you want to enable this tool.");return t.createElement(Xt,{missing:"field",title:"Missing Annotation",description:v,action:t.createElement(t.Fragment,null,t.createElement(_e.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:p.code},t.createElement(Ie,{text:en.replace("ANNOTATION",a),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(y.Z,{color:"primary",component:k,to:d},"Read more"))})}var U=e(11776),oe=e(38402),ne=e(49378),Ae=e(41128),Ue=e(27616),ft=e(8284),ze=e(70660),zt=e(91750),jt=e(38016);const Vt=(n,a)=>(a.palette.type==="light"?Ae._j:Ae.$n)(a.palette[n].light,.6),Ft=(n,a)=>(a.palette.type==="light"?Ae.$n:Ae._j)(a.palette[n].light,.9),yt=(0,f.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:a})=>Vt(a,n)}})),Yt=({severity:n})=>{const a=yt({severity:n});return t.createElement(zt.Z,{classes:a})},hn=({severity:n})=>{const a=yt({severity:n});return t.createElement(jt.Z,{classes:a})},Jt=(0,f.Z)(n=>({panel:{backgroundColor:({severity:a})=>Ft(a,n),color:({severity:a})=>Vt(a,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:a})=>Vt(a,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:a})=>Vt(a,n),backgroundColor:({severity:a})=>Ft(a,n)},details:{width:"100%",display:"block",color:n.palette.textContrast,backgroundColor:n.palette.background.default,border:`1px solid ${n.palette.border}`,padding:n.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),qt=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function rn(n){const{severity:a="warning",title:l,message:d,children:p,defaultExpanded:v}=n,P=Jt({severity:a}),Z=qt(a)+(l?`: ${l}`:"");return t.createElement(Ue.Z,{defaultExpanded:v!=null?v:!1,className:P.panel,role:"alert"},t.createElement(ft.Z,{expandIcon:t.createElement(hn,{severity:a}),className:P.summary},t.createElement(Yt,{severity:a}),t.createElement(_e.Z,{className:P.summaryText,variant:"subtitle1"},Z)),(d||p)&&t.createElement(ze.Z,null,t.createElement(Ut.Z,{container:!0},d&&t.createElement(Ut.Z,{item:!0,xs:12},t.createElement(_e.Z,{className:P.message,variant:"body1"},d)),p&&t.createElement(Ut.Z,{item:!0,xs:12,className:P.details},p))))}const an=(0,f.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),Bt=({error:n,message:a,stack:l,children:d})=>{const p=an();return t.createElement(U.Z,{dense:!0},t.createElement(oe.Z,{alignItems:"flex-start"},t.createElement(ne.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),t.createElement(Je,{text:n})),t.createElement(oe.Z,{alignItems:"flex-start"},t.createElement(ne.Z,{classes:{secondary:p.text},primary:"Message",secondary:a}),t.createElement(Je,{text:a})),l&&t.createElement(oe.Z,{alignItems:"flex-start"},t.createElement(ne.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:l}),t.createElement(Je,{text:l})),d)};function It(n){const{title:a,error:l,defaultExpanded:d,children:p}=n;return t.createElement(rn,{severity:"error",title:a!=null?a:l.message,defaultExpanded:d},t.createElement(Bt,{error:l.name,message:l.message,stack:l.stack,children:p}))}var cn=e(85256);const Sn=(0,f.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function on(n){var we;const{title:a,error:l,defaultExpanded:d}=n,p=Sn();if(l.name!=="ResponseError")return t.createElement(It,{title:a!=null?a:l.message,defaultExpanded:d,error:l});const{body:v,cause:P}=l,{request:Z,response:G}=v,H=`${G.statusCode}: ${P.name}`,ie=Z&&`${Z.method} ${Z.url}`,ee=P.message.replace(/\\n/g,`
|
|
12
|
-
`),Ee=(we=P.stack)==null?void 0:we.replace(/\\n/g,`
|
|
13
|
-
`),Te=JSON.stringify(v,void 0,2);return t.createElement(It,{title:a!=null?a:l.message,defaultExpanded:d,error:{name:H,message:ee,stack:Ee}},ie&&t.createElement(oe.Z,{alignItems:"flex-start"},t.createElement(ne.Z,{classes:{secondary:p.text},primary:"Request",secondary:Z?`${ie}`:void 0}),t.createElement(Je,{text:ie})),t.createElement(t.Fragment,null,t.createElement(cn.Z,{component:"li",className:p.divider}),t.createElement(oe.Z,{alignItems:"flex-start"},t.createElement(ne.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(Ie,{language:"json",text:Te,showCopyCodeButton:!0})))}var Rn=e(47093);function Cn(n){const a=document.createElement("div");return a.setAttribute("id",n),a}function xn(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function wn(n){const a=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),v=p||Cn(n);return p||xn(v),v.appendChild(a.current),function(){a.current.remove(),v.childNodes.length===-1&&v.remove()}},[n]);function l(){return a.current||(a.current=document.createElement("div")),a.current}return l()}var M=null;const h="core.calloutSeen";function C(){const[n,a]=useState(()=>{const d=localStorage.getItem(h);return d?JSON.parse(d):{}}),l=useCallback((d,p)=>{const v=localStorage.getItem(h),Z={...v?JSON.parse(v):{},[d]:p};a(Z),localStorage.setItem(h,JSON.stringify(Z))},[]);return{states:n,setState:l}}function L(n){const{states:a,setState:l}=C(),d=useCallback(()=>{l(n,!0)},[l,n]);return{seen:a[n]===!0,markSeen:d}}function V(n){const{seen:a,markSeen:l}=L(n);return{show:a===!1,hide:l}}const he=(0,f.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 ge(n){const{featureId:a,title:l,description:d,children:p}=n,{show:v,hide:P}=useShowCallout(a),Z=usePortal("core.callout"),G=useRef(null),[H,ie]=useState(),ee=he(),Ee=useCallback(()=>{if(G.current){const Te=G.current.getBoundingClientRect(),we=Math.max(Te.width,Te.height),ct=800,Mt=Te.x-(we-Te.width)/2-ct,Kt=Te.y-(we-Te.height)/2-ct,_t=we+2*ct,Ht=450,Ct=Te.x+Te.width/2-Ht,nn=Te.y-(we-Te.height)/2+we+20;ie({dotLeft:Mt,dotTop:Kt,dotSize:_t,borderWidth:ct,textTop:nn,textLeft:Ct,textWidth:Ht})}},[]);return useEffect(()=>(window.addEventListener("resize",Ee),window.addEventListener("scroll",Ee),()=>{window.removeEventListener("resize",Ee),window.removeEventListener("scroll",Ee)}),[Ee]),useLayoutEffect(Ee,[G.current,Ee]),v?React.createElement(React.Fragment,null,React.createElement("div",{className:ee.featureWrapper,ref:G},p),createPortal(React.createElement("div",{className:ee.backdrop},React.createElement(ClickAwayListener,{onClickAway:P},React.createElement(React.Fragment,null,React.createElement("div",{className:ee.dot,"data-testid":"dot",style:{left:H==null?void 0:H.dotLeft,top:H==null?void 0:H.dotTop,width:H==null?void 0:H.dotSize,height:H==null?void 0:H.dotSize,borderWidth:H==null?void 0:H.borderWidth},onClick:P,onKeyDown:P,role:"button",tabIndex:0},React.createElement("div",{className:ee.pulseCircle})),React.createElement("div",{className:ee.text,"data-testid":"text",style:{left:H==null?void 0:H.textLeft,top:H==null?void 0:H.textTop,width:H==null?void 0:H.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},l),React.createElement(Typography,null,d))))),Z)):React.createElement(React.Fragment,null,p)}var Le=e(35292);const Xe=(0,f.Z)(n=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:n.palette.text.secondary,cursor:"default"},primary:{color:n.palette.primary.main},secondary:{color:n.palette.secondary.main},label:{fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function Wt({color:n="primary",disabled:a=!1,href:l="#",icon:d=t.createElement(Le.Z,null),label:p,onClick:v,title:P}){const Z=Xe();return a?t.createElement(S.Z,{title:P,className:E()(Z.link,Z.disabled),underline:"none"},d,t.createElement("span",{className:Z.label},p)):t.createElement(S.Z,{title:P,className:E()(Z.link,Z[n]),to:l,component:k,onClick:v},d,t.createElement("span",{className:Z.label},p))}const pn=(0,f.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function kn(n){const{links:a}=n,l=pn();return t.createElement("nav",{className:l.links},a.map((d,p)=>t.createElement(Wt,{key:p+1,...d})))}const fr=n=>{const a=n==="dark"?"16%":"97%";return`
|
|
14
|
-
hsl(0, 0%, ${a}) 0%,
|
|
15
|
-
hsla(0, 0%, ${a}, 0.987) 8.1%,
|
|
16
|
-
hsla(0, 0%, ${a}, 0.951) 15.5%,
|
|
17
|
-
hsla(0, 0%, ${a}, 0.896) 22.5%,
|
|
18
|
-
hsla(0, 0%, ${a}, 0.825) 29%,
|
|
19
|
-
hsla(0, 0%, ${a}, 0.741) 35.3%,
|
|
20
|
-
hsla(0, 0%, ${a}, 0.648) 41.2%,
|
|
21
|
-
hsla(0, 0%, ${a}, 0.55) 47.1%,
|
|
22
|
-
hsla(0, 0%, ${a}, 0.45) 52.9%,
|
|
23
|
-
hsla(0, 0%, ${a}, 0.352) 58.8%,
|
|
24
|
-
hsla(0, 0%, ${a}, 0.259) 64.7%,
|
|
25
|
-
hsla(0, 0%, ${a}, 0.175) 71%,
|
|
26
|
-
hsla(0, 0%, ${a}, 0.104) 77.5%,
|
|
27
|
-
hsla(0, 0%, ${a}, 0.049) 84.5%,
|
|
28
|
-
hsla(0, 0%, ${a}, 0.013) 91.9%,
|
|
29
|
-
hsla(0, 0%, ${a}, 0) 100%
|
|
30
|
-
`},mr=100,hr=10,Vn=(0,f.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:mr,height:`calc(100% + ${hr}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-hr,background:`linear-gradient(90deg, ${fr(n.palette.type)})`},fadeRight:{right:-hr,background:`linear-gradient(270deg, ${fr(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function $n(n){const[[a,l],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=n.current;if(!p){d([0,0]);return}const v=()=>{const P=p.scrollLeft,Z=p.scrollWidth-p.offsetWidth-p.scrollLeft;d([P,Z])};return v(),p.addEventListener("scroll",v),window.addEventListener("resize",v),()=>{p.removeEventListener("scroll",v),window.removeEventListener("resize",v)}},[n]),[a,l]}function tr(n,a,l){const[d,p]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const v=performance.now(),P=requestAnimationFrame(Z=>{if(!n.current)return;const G=Z-v,H=Math.abs(d)*G/a,ee=Math.max(l,H)*Math.sign(d);n.current.scrollBy({left:ee});const Ee=d-ee;Math.sign(d)!==Math.sign(Ee)?p(0):p(Ee)});return()=>cancelAnimationFrame(P)},[n,d,a,l]),p}function gr(n){const{scrollStep:a=100,scrollSpeed:l=50,minScrollDistance:d=5,children:p,...v}=n,P=Vn(n),Z=React.useRef(),[G,H]=$n(Z),ie=tr(Z,l,d),ee=Ee=>{!Z.current||ie(Ee?a:-a)};return React.createElement("div",{...v,className:P.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:P.container,ref:Z},p),React.createElement("div",{className:classNames(P.fade,P.fadeLeft,{[P.fadeHidden]:G===0})}),React.createElement("div",{className:classNames(P.fade,P.fadeRight,{[P.fadeHidden]:H===0})}),G>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>ee(!1),className:classNames(P.button,P.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),H>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>ee(!0),className:classNames(P.button,P.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Or=(0,f.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function la(n){const a=Or(n),{shorthand:l,alpha:d}=n;return l?React.createElement("span",{className:a[d?"alpha":"beta"],style:{fontSize:"120%"}},d?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:a[d?"alpha":"beta"]},d?"Alpha":"Beta")}const nr=(0,t.lazy)(()=>Promise.all([e.e(4949),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function xr(n){const{Progress:a}=(0,c.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(a,null)},t.createElement(nr,{...n}))}const Dr=(0,f.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"}),lr={code:({inline:n,className:a,children:l,...d})=>{const p=String(l).replace(/\n+$/,""),v=/language-(\w+)/.exec(a||"");return!n&&v?t.createElement(Ie,{language:v[1],text:p}):t.createElement("code",{className:a,...d},l)}};function Un(n){const{content:a,dialect:l="gfm",linkTarget:d,transformLinkUri:p,transformImageUri:v,className:P}=n,Z=Dr();return React.createElement(ReactMarkdown,{remarkPlugins:l==="gfm"?[gfm]:[],className:`${Z.markdown} ${P}`,children:a,components:lr,linkTarget:d,transformLinkUri:p,transformImageUri:v})}var rr=e(10179);const ar=(0,f.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),Gr=({request:n,busy:a,setBusy:l})=>{const d=ar(),[p,v]=useState(),P=async()=>{l(!0);try{await n.trigger()}catch(G){v(isError(G)?G.message:"An unspecified error occurred")}finally{l(!1)}},Z=n.provider.icon;return React.createElement(ListItem,{disabled:a,classes:{root:d.root}},React.createElement(ListItemAvatar,null,React.createElement(Z,{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:P},"Log in"))};var pr=null;const yr=(0,f.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},titleHeading:{fontSize:n.typography.h6.fontSize},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function Kr(n){const a=yr(),[l,d]=useState(!1),p=useApi(oauthRequestApiRef),v=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),P=()=>{v.forEach(Z=>Z.reject())};return React.createElement(Dialog,{open:Boolean(v.length),fullWidth:!0,maxWidth:"xs",classes:{paper:a.dialog},"aria-labelledby":"oauth-req-dialog-title"},React.createElement("main",null,React.createElement(DialogTitle,{classes:{root:a.title},id:"oauth-req-dialog-title"},React.createElement(Typography,{className:a.titleHeading,variant:"h1"},"Login Required")),React.createElement(DialogContent,{dividers:!0,classes:{root:a.contentList}},React.createElement(List,null,v.map(Z=>React.createElement(LoginRequestListItem,{key:Z.provider.title,request:Z,busy:l,setBusy:d}))))),React.createElement(DialogActions,{classes:{root:a.actionButtons}},React.createElement(Button,{onClick:P},"Reject All")))}var kr=e(15277),cr=e.n(kr),Fr=e(29862);const Yr=(0,f.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Er(n){var P;const[a,l]=(0,t.useState)(!1),d=(0,Fr.t)(),p=Yr(),v=Z=>{d()&&l(Z)};return t.createElement(De.ZP,{title:(P=n.title)!=null?P:n.text||"",placement:n.placement,disableHoverListener:!a},t.createElement(cr(),{text:n.text,line:n.line,onToggled:v,containerClassName:p.container}))}var Br=e(67358);function Mr(n){const[a,l]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>l(!0),250);return()=>clearTimeout(d)},[]),a?t.createElement(Br.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var wr=e(94339),vr=e(14503),$r=e(24579),Ar=e(32552),yn=e(15459),un=e(95544),Yn=e(27597);const Jn=(0,f.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 Ur(n){const{link:a,title:l,onClick:d}=n,p=Jn();return t.createElement("div",null,t.createElement(cn.Z,null),t.createElement(k,{to:a,onClick:d,underline:"none"},t.createElement(un.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(un.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(_e.Z,null,t.createElement("strong",null,l))),t.createElement(Yn.Z,{className:p.arrow}))))}const Rr=n=>{const{slackChannel:a}=n;if(a){if(typeof a=="string")return t.createElement(t.Fragment,null,"Please contact ",a," for help.");if(!a.href)return t.createElement(t.Fragment,null,"Please contact ",a.name," for help.")}else return null;return t.createElement(le,{to:a.href,variant:"contained"},a.name)},Nr=class extends t.Component{constructor(a){super(a),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(a,l){console.error(`ErrorBoundary, error: ${a}, info: ${l}`),this.setState({error:a,errorInfo:l})}render(){const{slackChannel:a,children:l}=this.props,{error:d}=this.state;return d?t.createElement(It,{title:"Something Went Wrong",error:d},t.createElement(Rr,{slackChannel:a})):l}},Sr=(0,f.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"}),Zr=(0,yn.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(vr.Z),Cr={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 ur(n){const{title:a,subheader:l,divider:d=!0,deepLink:p,slackChannel:v,errorBoundaryProps:P,variant:Z,children:G,headerStyle:H,headerProps:ie,icon:ee,action:Ee,actionsClassName:Te,actions:we,cardClassName:ct,actionsTopRight:Mt,className:Kt,noPadding:_t,titleTypographyProps:Ht}=n,Ct=Sr();let nn={},$t={};Z&&Z.split(/[\s]+/g).forEach(wt=>{nn={...nn,...Cr.card[wt]},$t={...$t,...Cr.cardContent[wt]}});const or=()=>t.createElement("div",{className:Ct.headerSubheader},l&&t.createElement("div",{className:Ct.subheader},l),ee),Kn=P||(v?{slackChannel:v}:{});return t.createElement(wr.Z,{style:nn,className:Kt},t.createElement(Nr,{...Kn},a&&t.createElement(Ar.Z,{classes:{root:Ct.header,title:Ct.headerTitle,subheader:Ct.headerSubheader,avatar:Ct.headerAvatar,action:Ct.headerAction,content:Ct.headerContent},title:a,subheader:or(),action:Ee,style:{...H},titleTypographyProps:Ht,...ie}),Mt&&t.createElement(Zr,null,Mt),d&&t.createElement(cn.Z,null),t.createElement($r.Z,{className:E()(ct,{[Ct.noPadding]:_t}),style:$t},G),we&&t.createElement(vr.Z,{className:Te},we),p&&t.createElement(Ur,{...p})))}var Jr=e(39307);const I=(0,f.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"}),K={fractional:!0,inverse:!1,unit:"%",max:100},de=({palette:n,value:a,inverse:l,max:d})=>{if(isNaN(a))return"#ddd";const p=d||K.max,v=l?p-a:a;return v<p/3?n.status.error:v<p*(2/3)?n.status.warning:n.status.ok};function Be(n){const[a,l]=useState(null),{getColor:d=de}=n,p=I(n),{palette:v}=useTheme(),{value:P,fractional:Z,inverse:G,unit:H,max:ie,description:ee}={...K,...n},Ee=Z?Math.round(P*ie):P,Te=ie!==100?Math.round(P):Ee,[we,ct]=useState(!1);return useEffect(()=>{const Mt=a,Kt=()=>ct(!0),_t=()=>ct(!1);return Mt&&ee?(Mt.addEventListener("mouseenter",Kt),Mt.addEventListener("mouseleave",_t),()=>{Mt.removeEventListener("mouseenter",Kt),Mt.removeEventListener("mouseleave",_t)}):()=>{ct(!1)}},[ee,a]),React.createElement("div",{ref:l,className:p.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Ee,strokeWidth:12,trailWidth:12,strokeColor:d({palette:v,value:Te,inverse:G,max:ie}),className:p.circle}),ee&&we?React.createElement("div",{className:p.description},ee):React.createElement("div",{className:p.overlay},isNaN(P)?"N/A":`${Te}${H}`))}const qe=(0,f.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function mt(n){const a=qe(n),{title:l,subheader:d,progress:p,inverse:v,deepLink:P,description:Z,icon:G,variant:H,getColor:ie}=n,ee={inverse:v,description:Z,getColor:ie,value:p};return React.createElement("div",{className:a.root},React.createElement(InfoCard,{title:l,subheader:d,deepLink:P,variant:H,icon:G},React.createElement(Gauge,{...ee})))}function vt(n){const{value:a,getColor:l=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(a))return null;let p=Math.round(a*100*100)/100;p>100&&(p=100);const v=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:v})))}var xt=e(21324),dt=e(7089),Gt=e(1292),A=e(42494),T=e(74603),N=e(56939),W=e(12231),J=e(73698),Q=e(72379);const me=(0,f.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Fe=()=>{const n=me();return t.createElement(Q.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 Me=(0,f.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var Ze=()=>{const n=Me();return t.createElement(Q.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 ke=(0,yn.Z)(n=>(0,o.Z)({root:{"label + &":{marginTop:n.spacing(3)}},input:{borderRadius:4,position:"relative",backgroundColor:n.palette.background.paper,border:"1px solid #ced4da",fontSize:16,padding:"10px 26px 10px 12px",transition:n.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:n.palette.background.paper,borderRadius:4}}}),{name:"BackstageSelectInputBase"})(T.Z),Lt=(0,f.Z)(n=>(0,o.Z)({formControl:{margin:`${n.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:n.typography.fontFamily,color:n.palette.text.primary,"&.Mui-focused":{color:n.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:n.typography.fontFamily,color:n.palette.text.primary,"&.Mui-focused":{color:n.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function ot(n){const{multiple:a,items:l,label:d,placeholder:p,selected:v,onChange:P,triggerReset:Z,native:G=!1,disabled:H=!1,margin:ie}=n,ee=Lt(),[Ee,Te]=(0,t.useState)(v||(a?[]:"")),[we,ct]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Te(a?[]:"")},[Z,a]),(0,t.useEffect)(()=>{v!==void 0&&Te(v)},[v]);const Mt=Ct=>{Te(Ct.target.value),P(Ct.target.value)},Kt=Ct=>{if(H){Ct.preventDefault();return}ct(nn=>a&&!(Ct.target instanceof HTMLElement)?!0:!nn)},_t=()=>{ct(!1)},Ht=Ct=>()=>{const nn=Ee.filter($t=>$t!==Ct);Te(nn),P(nn)};return t.createElement("div",{className:ee.root},t.createElement(Gt.Z,{onClickAway:_t},t.createElement(A.Z,{className:ee.formControl},t.createElement(N.Z,{className:ee.formLabel},d),t.createElement(J.Z,{"aria-label":d,value:Ee,native:G,disabled:H,"data-testid":"select",displayEmpty:!0,multiple:a,margin:ie,onChange:Mt,onClick:Kt,open:we,input:t.createElement(ke,null),label:d,tabIndex:0,renderValue:Ct=>{var nn;return a&&Ee.length!==0?t.createElement("div",{className:ee.chips},Ct.map($t=>{var or,Kn;return t.createElement(dt.Z,{key:(or=l.find(_n=>_n.value===$t))==null?void 0:or.value,label:(Kn=l.find(_n=>_n.value===$t))==null?void 0:Kn.label,clickable:!0,onDelete:Ht($t),className:ee.chip})})):t.createElement(_e.Z,null,Ee.length===0?p||"":(nn=l.find($t=>$t.value===Ct))==null?void 0:nn.label)},IconComponent:()=>we?t.createElement(Ze,null):t.createElement(Fe,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!a&&t.createElement(W.Z,{value:[]},p),G?l&&l.map(Ct=>t.createElement("option",{value:Ct.value,key:Ct.value},Ct.label)):l&&l.map(Ct=>t.createElement(W.Z,{key:Ct.value,value:Ct.value},a&&t.createElement(xt.Z,{color:"primary",checked:Ee.includes(Ct.value)||!1,className:ee.checkbox}),Ct.label))))))}const He=()=>{},Qt=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:He,stepHistory:[],setStepHistory:He,onStepChange:He});function gn(n){const{children:a,elevated:l,onStepChange:d,activeStep:p=0}=n,[v,P]=useState(p),[Z,G]=useState([0]);useEffect(()=>{P(p)},[p]);const H=[];let ie;return Children.forEach(a,ee=>{isValidElement(ee)&&(ee.props.end?ie=ee:H.push(ee))}),React.createElement(React.Fragment,null,React.createElement(Qt.Provider,{value:{stepIndex:v,setStepIndex:P,stepHistory:Z,setStepHistory:G,onStepChange:d,stepperLength:Children.count(a)}},React.createElement(MuiStepper,{activeStep:v,orientation:"vertical",elevation:l?2:0},H)),v>=Children.count(a)-1&&ie)}const Qn=(0,f.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),Dn=({text:n,handleClick:a})=>React.createElement(Button,{onClick:a},n||"Reset"),vn=({text:n,handleClick:a,disabled:l,last:d,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:l,"data-testid":`nextButton-${p}`,onClick:a},n||(d?"Finish":"Next")),Tn=({text:n,handleClick:a,disabled:l,stepIndex:d})=>React.createElement(Button,{onClick:a,"data-testid":`backButton-${d}`,disabled:l},n||"Back"),Nn=({actions:n={},children:a})=>{const l=Qn(),{stepperLength:d,stepIndex:p,setStepIndex:v,stepHistory:P,setStepHistory:Z,onStepChange:G}=useContext(VerticalStepperContext),H=(Te,we)=>{we&&we(),G&&G(p,Te),v(Te)},ie=()=>{const Te=n.nextStep?n.nextStep(p,d-1):p+1;H(Te,n.onNext),Z([...P,Te])},ee=()=>{P.pop(),H(P[P.length-1],n.onBack),Z([...P])},Ee=()=>{H(0,n.onRestart),Z([0])};return React.createElement("div",{className:l.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(Tn,{text:n.backText,handleClick:ee,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(vn,{text:n.nextText,handleClick:ie,disabled:!!d&&p>=d||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(Dn,{text:n.restartText,handleClick:Ee,stepIndex:p}),a)},Tr=(0,f.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function zr(n){const{title:a,children:l,end:d,actions:p,...v}=n,P=Tr();return d?React.createElement("div",{className:P.end},React.createElement(Typography,{variant:"h6"},a),l,React.createElement(SimpleStepperFooter,{actions:{...p||{},showNext:!1}})):React.createElement(MuiStep,{...v},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},a)),React.createElement(StepContent,null,l,React.createElement(SimpleStepperFooter,{actions:p})))}const Xn=(0,f.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 bn(n){const a=Xn(n);return React.createElement("span",{className:classNames(a.status,a.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function Fn(n){const a=Xn(n);return React.createElement("span",{className:classNames(a.status,a.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Wr(n){const a=Xn(n);return React.createElement("span",{className:classNames(a.status,a.error),"aria-label":"Status error","aria-hidden":"true",...n})}function ca(n){const a=Xn(n);return React.createElement("span",{className:classNames(a.status,a.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function al(n){const a=Xn(n);return React.createElement("span",{className:classNames(a.status,a.running),"aria-label":"Status running","aria-hidden":"true",...n})}function ol(n){const a=Xn(n);return React.createElement("span",{className:classNames(a.status,a.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var sl=e(74600),Ra=e(15584);const Ro=n=>(0,o.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),So={root:{border:"0",verticalAlign:"top"}},Co=n=>(0,o.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),To=n=>(0,o.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),bo=(0,yn.Z)(Ro,{name:"BackstageMetadataTableTitleCell"})(Ra.Z),Po=(0,yn.Z)(So,{name:"BackstageMetadataTableCell"})(Ra.Z),il=({dense:n,children:a})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,a)),ll=({title:n,children:a,...l})=>React.createElement(TableRow,null,n&&React.createElement(bo,null,n),React.createElement(Po,{colSpan:n?1:2,...l},a)),Sa=(0,yn.Z)(Co,{name:"BackstageMetadataTableList"})(({classes:n,children:a})=>t.createElement("ul",{className:n.root},a)),cl=(0,yn.Z)(To,{name:"BackstageMetadataTableListItem"})(({classes:n,children:a})=>t.createElement("li",{className:n.root},a)),Ca=(0,o.Z)({root:{margin:"0 0",listStyleType:"none"}}),Io=n=>(0,o.Z)({root:{...Ca.root,paddingLeft:n.spacing(1)}}),Ta=(0,yn.Z)(Ca,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:a})=>t.createElement(Sa,{classes:n},a)),ba=(0,yn.Z)(Io,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:a})=>t.createElement(Sa,{classes:n},a));function Lo(n,a){const l=n.map((d,p)=>React.createElement(MetadataListItem,{key:p},ua(d)));return a?React.createElement(ba,null,l):React.createElement(Ta,null,l)}function Oo(n,a,l){const d=Object.keys(n).map(p=>{const v=ua(n[p],!0),P=l&&l.titleFormat?l.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${P}: `,v)});return a?React.createElement(ba,null,d):React.createElement(Ta,null,d)}function ua(n,a,l){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?Oo(n,a,l):Array.isArray(n)?Lo(n,l):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const xo=({value:n,options:a})=>React.createElement(Fragment,null,ua(n,a)),Do=({title:n,value:a,options:l})=>React.createElement(MetadataTableItem,{title:l&&l.titleFormat?l.titleFormat(n):startCase(n)},React.createElement(xo,{value:a,options:l}));function Fo(n,a){return Object.keys(n).map(l=>React.createElement(Do,{key:l,title:l,value:n[l],options:a}))}function ul(n){const{metadata:a,dense:l=!0,options:d}=n,p=Fo(a,d||{});return React.createElement(MetadataTable,{dense:l},p)}var Bo=e(49429),Mo=e(86136),Pa=e(79784),wo=e(19126),Ia=e.n(wo);function $o(n){return qs.stringify(n,{strictNullHandling:!0})}function La(n){return qs.parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Oa(n,a){return La(n)[a]}function Uo(n,a,l){const d={...La(n),[a]:l};return $o(d)}function dl(n,a=250){const[l,d]=useSearchParams(),p=l.toString(),[v,P]=useState(Oa(p,n));return useEffect(()=>{const Z=Oa(p,n);P(G=>isEqual(Z,G)?G:Z)},[p,P,n]),useDebouncedEffect(()=>{const Z=Uo(p,n,v);p!==Z&&d(Z,{replace:!0})},[d,v,p,n],a),[v,P]}const No={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 xa(){const a=(0,c.useApiHolder)().get(c.configApiRef),l=a==null?void 0:a.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(v=>({url:v.getString("url"),title:v.getString("title")}))}})}:No}var Zo=e(80079);function Wn(n,a){const d=(0,c.useApp)().getSystemIcon(n);return d?t.createElement(d,{...a}):t.createElement(Zo.Z,{...a})}function fl(n){return Wn("brokenImage",n)}function ml(n){return Wn("catalog",n)}function hl(n){return Wn("chat",n)}function gl(n){return Wn("dashboard",n)}function pl(n){return Wn("docs",n)}function yl(n){return Wn("email",n)}function El(n){return Wn("github",n)}function vl(n){return Wn("group",n)}function Qr(n){return Wn("help",n)}function Al(n){return Wn("user",n)}function Rl(n){return Wn("warning",n)}const zo=(0,f.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Wo=({icon:n})=>{var d;const a=(0,c.useApp)(),l=n&&(d=a.getSystemIcon(n))!=null?d:Qr;return t.createElement(l,null)},Ho=({link:n})=>{var a;return t.createElement(k,{to:n.url},(a=n.title)!=null?a:n.url)},jo=({item:n})=>{var a;return t.createElement(oe.Z,null,t.createElement(Mo.Z,null,t.createElement(Wo,{icon:n.icon})),t.createElement(ne.Z,{primary:n.title,secondary:(a=n.links)==null?void 0:a.reduce((l,d,p)=>[...l,p>0&&t.createElement("br",{key:p}),t.createElement(Ho,{link:d,key:d.url})],[])}))};function Vo(n){const{title:a,children:l}=n,{items:d}=xa(),[p,v]=(0,t.useState)(!1),[P,Z]=(0,t.useState)(null),G=zo(),H=(0,ht.Z)(Ee=>Ee.breakpoints.down("sm")),ie=Ee=>{Z(Ee.currentTarget),v(!0)},ee=()=>{v(!1)};return t.createElement(t.Fragment,null,t.createElement(un.Z,{display:"flex",ml:1},H?t.createElement(xe.Z,{color:"primary",size:"small",onClick:ie,"data-testid":"support-button"},t.createElement(Qr,null)):t.createElement(y.Z,{"data-testid":"support-button","aria-label":"support",color:"primary",onClick:ie,startIcon:t.createElement(Qr,null)},"Support")),t.createElement(Pa.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:ee},t.createElement(U.Z,{className:G.popoverList},a&&t.createElement(oe.Z,{alignItems:"flex-start"},t.createElement(_e.Z,{variant:"subtitle1"},a)),t.Children.map(l,(Ee,Te)=>t.createElement(oe.Z,{alignItems:"flex-start",key:`child-${Te}`},Ee)),d&&d.map((Ee,Te)=>t.createElement(jo,{item:Ee,key:`item-${Te}`}))),t.createElement(Bo.Z,null,t.createElement(y.Z,{color:"primary",onClick:ee},"Close"))))}var da=e(18671),Zn=e(10289);const Xr=72,Da=24,Fa=18,qn={drawerWidthClosed:Xr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Xr,iconSize:Xr-Da*2,iconPadding:Da,selectedIndicatorWidth:3,userBadgePadding:Fa,userBadgeDiameter:Xr-Fa*2,mobileSidebarHeight:56},Go=n=>({...qn,...n,iconContainerWidth:qn.drawerWidthClosed,iconSize:qn.drawerWidthClosed-qn.iconPadding*2,userBadgeDiameter:qn.drawerWidthClosed-qn.userBadgePadding*2}),Ba={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:qn.defaultOpenDelayMs+200},Ko=n=>({...Ba,...n}),Sl="@backstage/core/sidebar-intro-dismissed",Gn=(0,t.createContext)({sidebarConfig:qn,submenuConfig:Ba}),Ma=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var qr;(function(n){const a="sidebarPinState";n.SIDEBAR_PIN_STATE=a})(qr||(qr={}));const wa={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(qr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(qr.SIDEBAR_PIN_STATE,JSON.stringify(n))}};var _r=e(76241);const $a={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},Ua=(0,t.createContext)($a),Na=(0,_r.CT)("sidebar-pin-state-context"),ko=({children:n,value:a})=>t.createElement(Ua.Provider,{value:a},t.createElement(Na.Provider,{value:(0,_r.EI)({1:a})},n)),Hr=()=>{const n=(0,t.useContext)(Na),a=(0,t.useContext)(Ua);if(n===void 0)return a||$a;const l=n.atVersion(1);if(l===void 0)throw new Error("No context found for version 1.");return l},Yo=(0,f.Z)(n=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:a=>a.isPinned?a.sidebarConfig.drawerWidthOpen:a.sidebarConfig.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:a=>a.sidebarConfig.mobileSidebarHeight}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),Za=(0,t.createContext)({content:{contentRef:void 0}});function Jo(n){const[a,l]=(0,t.useState)(()=>wa.getSidebarPinState()),{sidebarConfig:d}=(0,t.useContext)(Gn),p=(0,t.useRef)(null),v=(0,t.useMemo)(()=>({content:{contentRef:p}}),[p]);(0,t.useEffect)(()=>{wa.setSidebarPinState(a)},[a]);const P=(0,ht.Z)(H=>H.breakpoints.down("xs"),{noSsr:!0}),Z=()=>l(!a),G=Yo({isPinned:a,sidebarConfig:d});return t.createElement(ko,{value:{isPinned:a,toggleSidebarPinState:Z,isMobile:P}},t.createElement(Za.Provider,{value:v},t.createElement("div",{className:G.root},n.children)))}function za(){const{content:n}=(0,t.useContext)(Za);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}}const Wa={isOpen:!1,setOpen:()=>{}},Ha=(0,t.createContext)(Wa),ja=(0,_r.CT)("sidebar-open-state-context"),Va=({children:n,value:a})=>t.createElement(Ha.Provider,{value:a},t.createElement(ja.Provider,{value:(0,_r.EI)({1:a})},n)),fa=()=>{const n=(0,t.useContext)(ja),a=(0,t.useContext)(Ha);if(n===void 0)return a||Wa;const l=n.atVersion(1);if(l===void 0)throw new Error("No context found for version 1.");return l};var Qo=e(50023),Xo=e(4190),qo=e(87685),_o=e(44882),es=e(57998);const ts=(0,f.Z)(n=>({root:{flexGrow:0,margin:n.spacing(0,2),color:n.palette.navigation.color},selected:a=>({color:`${n.palette.navigation.selectedColor}!important`,borderTop:`solid ${a.sidebarConfig.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),ns=n=>{const{to:a,label:l,icon:d,value:p}=n,{sidebarConfig:v}=(0,t.useContext)(Gn),P=ts({sidebarConfig:v}),Z=(0,Zn.TH)(),{selectedMenuItemIndex:G,setSelectedMenuItemIndex:H}=(0,t.useContext)(ka),ie=(Ee,Te)=>{H(Te===G?-1:Te)},ee=p===G&&G>=0||p!==G&&!(G>=0)&&a===Z.pathname;return t.createElement(es.Z,{label:l,icon:d,component:k,to:a||Z.pathname,onChange:ie,value:p,selected:ee,classes:P})},Ga=n=>{const{children:a,to:l,label:d,icon:p,value:v}=n,{isMobile:P}=Hr();return P?t.createElement(ns,{to:l,label:d,icon:p,value:v}):t.createElement(t.Fragment,null,a)},Ka=(0,f.Z)(n=>({root:{position:"fixed",backgroundColor:n.palette.navigation.background,color:n.palette.navigation.color,bottom:0,left:0,right:0,zIndex:n.zIndex.snackbar,borderTop:"1px solid #383838"},overlay:a=>({background:n.palette.navigation.background,width:"100%",bottom:`${a.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${a.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:n.palette.text.primary,alignItems:"center",justifyContent:"space-between",padding:n.spacing(2,3)},overlayHeaderClose:{color:n.palette.text.primary},marginMobileSidebar:a=>({marginBottom:`${a.sidebarConfig.mobileSidebarHeight}px`})})),rs=n=>(0,O.orderBy)(n,({props:{priority:a}})=>Number.isInteger(a)?a:-1,"desc"),as=t.createElement(Ga).type,os=({children:n,label:a="Menu",open:l,onClose:d})=>{const{sidebarConfig:p}=(0,t.useContext)(Gn),v=Ka({sidebarConfig:p});return t.createElement(Xo.ZP,{anchor:"bottom",open:l,onClose:d,ModalProps:{BackdropProps:{classes:{root:v.marginMobileSidebar}}},classes:{root:v.marginMobileSidebar,paperAnchorBottom:v.overlay}},t.createElement(un.Z,{className:v.overlayHeader},t.createElement(_e.Z,{variant:"h3"},a),t.createElement(xe.Z,{onClick:d,classes:{root:v.overlayHeaderClose}},t.createElement(qo.Z,null))),t.createElement(un.Z,{component:"nav"},n))},ka=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),ss=n=>{const{sidebarConfig:a}=(0,t.useContext)(Gn),{children:l}=n,d=Ka({sidebarConfig:a}),p=(0,Zn.TH)(),[v,P]=(0,t.useState)(-1);(0,t.useEffect)(()=>{P(-1)},[p.pathname]);let Z=(0,c.useElementFilter)(l,H=>H.getElements().filter(ie=>ie.type===as));if(l)Z.length?Z=rs(Z):Z.push(t.createElement(Ga,{key:"default_menu",icon:t.createElement(_o.Z,null)},l));else return null;const G=v>=0&&!Z[v].props.to;return t.createElement(Va,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(ka.Provider,{value:{selectedMenuItemIndex:v,setSelectedMenuItemIndex:P}},t.createElement(os,{label:Z[v]&&Z[v].props.label,open:G,onClose:()=>P(-1)},Z[v]&&Z[v].props.children),t.createElement(Qo.Z,{className:d.root,"data-testid":"mobile-sidebar-root",component:"nav"},Z)))},Ya=(0,f.Z)(n=>({drawer:a=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:n.zIndex.appBar,background:n.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:a.sidebarConfig.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:a=>({width:a.sidebarConfig.drawerWidthOpen,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var 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 is=n=>{const{sidebarConfig:a}=(0,t.useContext)(Gn),{openDelayMs:l=a.defaultOpenDelayMs,closeDelayMs:d=a.defaultCloseDelayMs,disableExpandOnHover:p,children:v}=n,P=Ya({sidebarConfig:a}),Z=(0,ht.Z)(Kt=>Kt.breakpoints.down("md"),{noSsr:!0}),[G,H]=(0,t.useState)(Bn.Closed),ie=(0,t.useRef)(),{isPinned:ee,toggleSidebarPinState:Ee}=Hr(),Te=()=>{ee||p||(ie.current&&(clearTimeout(ie.current),ie.current=void 0),G!==Bn.Open&&!Z&&(ie.current=window.setTimeout(()=>{ie.current=void 0,H(Bn.Open)},l),H(Bn.Idle)))},we=()=>{ee||p||(ie.current&&(clearTimeout(ie.current),ie.current=void 0),G===Bn.Idle?H(Bn.Closed):G===Bn.Open&&(ie.current=window.setTimeout(()=>{ie.current=void 0,H(Bn.Closed)},d)))},ct=G===Bn.Open&&!Z||ee,Mt=Kt=>{Kt?(H(Bn.Open),Ee()):(H(Bn.Closed),Ee())};return t.createElement("nav",{style:{},"aria-label":"sidebar nav"},t.createElement(cs,null),t.createElement(Va,{value:{isOpen:ct,setOpen:Mt}},t.createElement("div",{className:P.root,"data-testid":"sidebar-root",onMouseEnter:p?()=>{}:Te,onFocus:p?()=>{}:Te,onMouseLeave:p?()=>{}:we,onBlur:p?()=>{}:we},t.createElement("div",{className:E()(P.drawer,{[P.drawerOpen]:ct})},v))))},ls=n=>{var G,H;const a=Go((G=n.sidebarOptions)!=null?G:{}),l=Ko((H=n.submenuOptions)!=null?H:{}),{children:d,disableExpandOnHover:p,openDelayMs:v,closeDelayMs:P}=n,{isMobile:Z}=Hr();return Z?t.createElement(ss,null,d):t.createElement(Gn.Provider,{value:{sidebarConfig:a,submenuConfig:l}},t.createElement(is,{openDelayMs:v,closeDelayMs:P,disableExpandOnHover:p},d))};function cs(){const{sidebarConfig:n}=(0,t.useContext)(Gn),{focusContent:a,contentRef:l}=za(),d=Ya({sidebarConfig:n});return l!=null&&l.current?t.createElement(y.Z,{onClick:a,variant:"contained",className:E()(d.visuallyHidden)},"Skip to content"):null}function Ja(n,a){const l=new URLSearchParams(a.search).toString(),d=Ia().parse(l),p=new URLSearchParams(n.search).toString(),v=Ia().parse(p);return(0,O.isEqual)(a.pathname,n.pathname)&&(0,O.isMatch)(v,d)}const us=(0,f.Z)(n=>({item:{height:48,width:"100%","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor},display:"flex",alignItems:"center",color:n.palette.navigation.color,padding:20,cursor:"pointer",position:"relative",background:"none",border:"none"},itemContainer:{width:"100%"},selected:{background:"#6f6f6f",color:"#FFF"},label:{margin:14,marginLeft:7,fontSize:14,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis",lineHeight:1},subtitle:{fontSize:10,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor}},textContent:{color:n.palette.navigation.color,paddingLeft:n.spacing(4),paddingRight:n.spacing(1),fontSize:"14px",whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"}}),{name:"BackstageSidebarSubmenuItem"}),Cl=n=>{const{title:a,subtitle:l,to:d,icon:p,dropdownItems:v}=n,P=us(),{setIsHoveredOn:Z}=useContext(SidebarItemWithSubmenuContext),G=()=>{Z(!1)},H=useResolvedPath(d!=null?d:""),ie=useLocation();let ee=isLocationMatch(ie,H);const[Ee,Te]=useState(!1),we=()=>{Te(!Ee)};return v!==void 0?(v.some(ct=>{const Mt=resolvePath(ct.to);return ee=isLocationMatch(ie,Mt),ee}),React.createElement("div",{className:P.itemContainer},React.createElement(Tooltip,{title:a,enterDelay:500,enterNextDelay:500},React.createElement("button",{onClick:we,onTouchStart:ct=>ct.stopPropagation(),className:classnames(P.item,ee?P.selected:void 0)},p&&React.createElement(p,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:P.label},a,React.createElement("br",null),l&&React.createElement(Typography,{variant:"caption",className:P.subtitle},l)),Ee?React.createElement(ArrowDropUpIcon,{className:P.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:P.dropdownArrow}))),v&&Ee&&React.createElement("div",{className:P.dropdown},v.map((ct,Mt)=>React.createElement(Tooltip,{key:Mt,title:ct.title,enterDelay:500,enterNextDelay:500},React.createElement(Link,{to:ct.to,underline:"none",className:P.dropdownItem,onClick:G,onTouchStart:Kt=>Kt.stopPropagation()},React.createElement(Typography,{className:P.textContent},ct.title))))))):React.createElement("div",{className:P.itemContainer},React.createElement(Tooltip,{title:a,enterDelay:500,enterNextDelay:500},React.createElement(Link,{to:d,underline:"none",className:classnames(P.item,ee?P.selected:void 0),onClick:G,onTouchStart:ct=>ct.stopPropagation()},p&&React.createElement(p,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:P.label},a,React.createElement("br",null),l&&React.createElement(Typography,{variant:"caption",className:P.subtitle},l)))))},ds=(0,f.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:a=>{var l,d;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[n.breakpoints.up("sm")]:{marginLeft:a.left,transition:n.transitions.create("margin-left",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(d=(l=n.palette.navigation.submenu)==null?void 0:l.background)!=null?d:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:a.submenuConfig.drawerWidthClosed,transitionDelay:`${a.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}},drawerOpen:a=>({width:a.submenuConfig.drawerWidthOpen,[n.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:n.spacing(3),left:0,top:0}}),title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[n.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),fs=n=>{const{isOpen:a}=fa(),{sidebarConfig:l,submenuConfig:d}=(0,t.useContext)(Gn),p=a?l.drawerWidthOpen:l.drawerWidthClosed,v=ds({left:p,submenuConfig:d}),{isHoveredOn:P}=(0,t.useContext)(Ma),[Z,G]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{G(P)},[P]),t.createElement("div",{className:E()(v.drawer,{[v.drawerOpen]:Z})},t.createElement(_e.Z,{variant:"h5",className:v.title},n.title),n.children)};var ea=e(76600),ms=e(26739),Qa=e(98989),hs=e(59797),gs=e(83543);const ps=(0,f.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Tl=()=>{const n=ps();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 bl=null;const ys=(0,f.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Pl=()=>{const n=ys();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 Il=null;const Es=n=>(0,f.Z)(a=>{var l,d,p,v;return{root:{color:a.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"100%",margin:0,padding:0,textAlign:"inherit",font:"inherit"},closed:{width:n.drawerWidthClosed,justifyContent:"center"},open:{[a.breakpoints.up("sm")]:{width:n.drawerWidthOpen}},highlightable:{"&:hover":{background:(d=(l=a.palette.navigation.navItem)==null?void 0:l.hoverBackground)!=null?d:"#404040"}},highlighted:{background:(v=(p=a.palette.navigation.navItem)==null?void 0:p.hoverBackground)!=null?v:"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:{boxSizing:"border-box",height:"100%",width:n.iconContainerWidth,marginRight:-a.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:a.typography.fontSize},searchFieldHTMLInput:{padding:a.spacing(2,0,2)},searchContainer:{width:n.drawerWidthOpen-n.iconContainerWidth},secondaryAction:{width:a.spacing(6),textAlign:"center",marginRight:a.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:a.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${n.selectedIndicatorWidth}px ${a.palette.navigation.indicator}`,color:a.palette.navigation.selectedColor},"&$closed":{width:n.drawerWidthClosed},"& $closedItemIcon":{paddingRight:n.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-n.selectedIndicatorWidth}}}},{name:"BackstageSidebarItem"});function ta(n){return(0,t.useMemo)(()=>Es(n),[n])()}const vs=(n,a)=>(0,c.useElementFilter)(n.props.children,l=>{let d=!1;return l.getElements().forEach(({props:{to:p,dropdownItems:v}})=>{if(!d){if(v!=null&&v.length){v.forEach(({to:P})=>d=d||Ja(a,(0,Zn.i3)(P)));return}p&&(d=Ja(a,(0,Zn.i3)(p)))}}),d},[a.pathname]);function Xa(n){return n.to===void 0}const As=t.createElement(fs).type,Rs=t.forwardRef(function({to:a,end:l,style:d,className:p,activeStyle:v,caseSensitive:P,activeClassName:Z="active","aria-current":G="page",...H},ie){let{pathname:ee}=(0,Zn.TH)(),{pathname:Ee}=(0,Zn.WU)(a);P||(ee=ee.toLocaleLowerCase("en-US"),Ee=Ee.toLocaleLowerCase("en-US"));let Te=ee===Ee;!Te&&!l&&(Te=ee.startsWith(`${Ee}/`));const we=Te?G:void 0;return t.createElement(b.rU,{...H,to:a,ref:ie,"aria-current":we,style:{...d,...Te?v:void 0},className:E()([p,Te?Z:void 0])})}),qa=(0,t.forwardRef)((n,a)=>{const{icon:l,text:d,hasNotifications:p=!1,hasSubmenu:v=!1,disableHighlight:P=!1,onClick:Z,children:G,className:H,...ie}=n,{sidebarConfig:ee}=(0,t.useContext)(Gn),Ee=ta(ee),{isOpen:Te}=fa(),we=!Te&&v?{display:"flex",marginLeft:"24px"}:{},ct=t.createElement("div",{style:we},t.createElement(l,{fontSize:"small"}),!Te&&v?t.createElement(Qa.Z,null):t.createElement(t.Fragment,null)),Mt=t.createElement(ms.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:E()({[Ee.closedItemIcon]:!Te})},ct),Kt=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:Ee.iconContainer},Mt),d&&t.createElement(_e.Z,{variant:"subtitle2",className:Ee.label},d),t.createElement("div",{className:Ee.secondaryAction},G)),_t=Te?Kt:Mt,Ht={onClick:Z,className:E()(H,Ee.root,Te?Ee.open:Ee.closed,Xa(n)&&Ee.buttonItem,{[Ee.highlightable]:!P})};return Xa(n)?t.createElement("button",{"aria-label":d,...Ht,ref:a},_t):t.createElement(Rs,{...Ht,activeClassName:Ee.selected,to:n.to?n.to:"",ref:a,"aria-label":d||n.to,...ie},_t)}),Ss=({children:n,...a})=>{const{sidebarConfig:l}=(0,t.useContext)(Gn),d=ta(l),[p,v]=(0,t.useState)(!1),P=(0,Zn.TH)(),Z=vs(n,P),G=(0,ht.Z)(Ee=>Ee.breakpoints.down("sm")),H=()=>{v(!0)},ie=()=>{v(!1)},ee=()=>G?p?t.createElement(hs.Z,{fontSize:"small",className:d.submenuArrow}):t.createElement(gs.Z,{fontSize:"small",className:d.submenuArrow}):!p&&t.createElement(Qa.Z,{fontSize:"small",className:d.submenuArrow});return t.createElement(Ma.Provider,{value:{isHoveredOn:p,setIsHoveredOn:v}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:ie,onTouchStart:p?ie:H,onMouseEnter:H,className:E()(p&&d.highlighted)},t.createElement(qa,{hasSubmenu:!0,className:Z?d.selected:"",...a},ee()),p&&n))},_a=(0,t.forwardRef)((n,a)=>{const[l]=(0,c.useElementFilter)(n.children,d=>d.getElements().filter(p=>p.type===As));return l?t.createElement(Ss,{...n},l):t.createElement(qa,{...n,ref:a})});function Ll(n){const{sidebarConfig:a}=useContext(SidebarConfigContext),[l,d]=useState(""),p=ta(a),v=n.icon?n.icon:SearchIcon,P=()=>{n.onSearch(l),d("")},Z=ee=>{ee.key==="Enter"&&(ee.preventDefault(),P())},G=ee=>{d(ee.target.value)},H=ee=>{ee.preventDefault(),ee.stopPropagation()},ie=ee=>{P(),ee.preventDefault()};return React.createElement("div",{className:p.searchRoot},React.createElement(_a,{icon:v,to:n.to,onClick:ie,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:l,onClick:H,onChange:G,onKeyDown:Z,className:p.searchContainer,InputProps:{disableUnderline:!0,className:p.searchField},inputProps:{className:p.searchFieldHTMLInput}})))}const Ol=(0,ea.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),xl=(0,ea.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),Cs=(0,ea.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),Ts=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),Dl=(0,ea.Z)("div")(({theme:n})=>{const a=Ts(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":a,"&:hover":a}}),Fl=()=>{const{sidebarConfig:n}=useContext(SidebarConfigContext),a=ta(n),{isOpen:l,setOpen:d}=useSidebarOpenState();if(useMediaQuery(P=>P.breakpoints.down("md"),{noSsr:!0}))return null;const v=()=>{d(!l)};return React.createElement("button",{onClick:v,className:a.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:a.arrows},l?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},bs=(0,f.Z)(n=>({introCard:a=>({color:"#b5b5b5",fontSize:12,width:a.sidebarConfig.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:a.sidebarConfig.iconPadding,paddingRight:a.sidebarConfig.iconPadding}),introDismiss:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:12},introDismissLink:{color:"#dddddd",display:"flex",alignItems:"center",marginBottom:4,"&:hover":{color:n.palette.linkHover,transition:n.transitions.create("color",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})}},introDismissText:{fontSize:"0.7rem",fontWeight:"bold",textTransform:"uppercase",letterSpacing:1},introDismissIcon:{width:18,height:18,marginRight:12}}),{name:"BackstageSidebarIntro"});function Ps(n){const{sidebarConfig:a}=useContext(SidebarConfigContext),l=bs({sidebarConfig:a}),{text:d,onClose:p}=n,v=()=>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:v,underline:"none",className:l.introDismissLink},React.createElement(CloseIcon,{className:l.introDismissIcon}),React.createElement(Typography,{component:"span",className:l.introDismissText},"Dismiss"))))}const eo=n=>{const{text:a,onDismiss:l}=n,[d,p]=useState(!1),v=()=>{p(!0)};return React.createElement(Collapse,{in:!d,onExited:l},React.createElement(Ps,{text:a,onClose:v}))},Is=null,Ls="And your recently viewed plugins will pop up here!";function Bl(n){const{isOpen:a}=useSidebarOpenState(),l={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,p]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:v,recentlyViewedItemsDismissed:P}=d!=null?d:{},Z=()=>{p(H=>({...l,...H,starredItemsDismissed:!0}))},G=()=>{p(H=>({...l,...H,recentlyViewedItemsDismissed:!0}))};return a?React.createElement(React.Fragment,null,!v&&React.createElement(React.Fragment,null,React.createElement(eo,{text:Is,onDismiss:Z}),React.createElement(SidebarDivider,null)),!P&&React.createElement(eo,{text:Ls,onDismiss:G})):null}const Os=(0,f.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 to(n){const{className:a,stretch:l,noPadding:d,children:p,...v}=n,{contentRef:P}=za(),Z=Os();return t.createElement("article",{ref:P,tabIndex:-1,...v,className:E()(Z.root,a,{[Z.stretch]:l,[Z.noPadding]:d})},p)}var xs=e(6487),Ds=e(99152);const Fs=(0,f.Z)(n=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:n.palette.background.paper,paddingLeft:n.spacing(3),minWidth:0},defaultTab:{padding:n.spacing(3,3),...n.typography.caption,textTransform:"uppercase",fontWeight:"bold",color:n.palette.text.secondary},selected:{color:n.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:n.palette.background.default,color:n.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function no(n){const{tabs:a,onChange:l,selectedIndex:d}=n,[p,v]=(0,t.useState)(d!=null?d:0),P=Fs(),Z=(0,t.useCallback)((G,H)=>{d===void 0&&v(H),l&&d!==H&&l(H)},[d,l]);return(0,t.useEffect)(()=>{d!==void 0&&v(d)},[d]),t.createElement("div",{className:P.tabsWrapper},t.createElement(Ds.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:Z,value:p},a.map((G,H)=>t.createElement(xs.Z,{...G.tabProps,"data-testid":`header-tab-${H}`,label:G.label,key:G.id,value:H,className:P.defaultTab,classes:{selected:P.selected,root:P.tabRoot}}))))}function Bs(n){var Z,G,H;const a=(0,Zn.UO)(),d=n.map(({path:ie,children:ee})=>({caseSensitive:!1,path:`${ie}/*`,element:ee})).sort((ie,ee)=>ee.path.replace(/\/\*$/,"").localeCompare(ie.path.replace(/\/\*$/,""))),p=(Z=(0,Zn.V$)(d))!=null?Z:n[0].children,[v]=(G=(0,Zn.fp)(d,`/${a["*"]}`))!=null?G:[],P=v?n.findIndex(ie=>`${ie.path}/*`===v.route.path):0;return{index:P===-1?0:P,element:p,route:(H=n[P])!=null?H:n[0]}}function ro(n){const{routes:a}=n,l=(0,Zn.s0)(),{index:d,route:p,element:v}=Bs(a),P=(0,t.useMemo)(()=>a.map(G=>({id:G.path,label:G.title,tabProps:G.tabProps})),[a]),Z=G=>l(a[G].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(no,{tabs:P,selectedIndex:d,onChange:Z}),t.createElement(to,null,t.createElement(da.q,{title:p.title}),v))}const ma=()=>null;(0,c.attachComponentData)(ma,"core.gatherMountPoints",!0);function ao(n){const a=t.createElement(ma,{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 ao(l.props.children);if(l.type!==a)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:p,children:v,tabProps:P}=l.props;return[{path:d,title:p,children:v,tabProps:P}]})}function Ms(n){const a=ao(n.children);return t.createElement(ro,{routes:a})}Ms.Route=ma;const ws=(0,f.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function $s(n){const{value:a,subvalue:l}=n,d=ws();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},a),t.createElement("div",{className:d.subvalue},l))}var Us=e(21070),Ns=e(90324),Zs=e(98281),zs=e(48049),oo=e(51209),so=e(33375),Ws=e(44233),Hs=e(27604),ha=e(36444),js=e(37971),Vs=e(59709),Gs=e(17373),Ks=e(3702),ks=e(93111),na=e(67222);const Ys=(0,f.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"}),Js=n=>{var G;const a=Ys(),{onChangeFilters:l}=n,[d,p]=(0,t.useState)({...n.selectedFilters}),[v,P]=(0,t.useState)(!1),Z=()=>{p({}),P(H=>!H)};return(0,t.useEffect)(()=>{l(d)},[d,l]),t.createElement("div",{className:a.root},t.createElement("div",{className:a.header},t.createElement("div",{className:a.value},"Filters"),t.createElement(y.Z,{color:"primary",onClick:Z},"Clear all")),t.createElement("div",{className:a.filters},((G=n.filters)==null?void 0:G.length)&&n.filters.map(H=>t.createElement(ot,{triggerReset:v,key:H.element.label,...H.element,selected:d[H.element.label],onChange:ie=>p({...d,[H.element.label]:ie})}))))},Qs={Add:(0,t.forwardRef)((n,a)=>t.createElement(Us.Z,{...n,ref:a})),Check:(0,t.forwardRef)((n,a)=>t.createElement(Zs.Z,{...n,ref:a})),Clear:(0,t.forwardRef)((n,a)=>t.createElement(so.Z,{...n,ref:a})),Delete:(0,t.forwardRef)((n,a)=>t.createElement(Ws.Z,{...n,ref:a})),DetailPanel:(0,t.forwardRef)((n,a)=>t.createElement(oo.Z,{...n,ref:a})),Edit:(0,t.forwardRef)((n,a)=>t.createElement(Hs.Z,{...n,ref:a})),Export:(0,t.forwardRef)((n,a)=>t.createElement(Ks.Z,{...n,ref:a})),Filter:(0,t.forwardRef)((n,a)=>t.createElement(ha.Z,{...n,ref:a})),FirstPage:(0,t.forwardRef)((n,a)=>t.createElement(js.Z,{...n,ref:a})),LastPage:(0,t.forwardRef)((n,a)=>t.createElement(Vs.Z,{...n,ref:a})),NextPage:(0,t.forwardRef)((n,a)=>t.createElement(oo.Z,{...n,ref:a})),PreviousPage:(0,t.forwardRef)((n,a)=>t.createElement(zs.Z,{...n,ref:a})),ResetSearch:(0,t.forwardRef)((n,a)=>t.createElement(so.Z,{...n,ref:a})),Search:(0,t.forwardRef)((n,a)=>t.createElement(ha.Z,{...n,ref:a})),SortArrow:(0,t.forwardRef)((n,a)=>t.createElement(Ns.Z,{...n,ref:a})),ThirdStateCheck:(0,t.forwardRef)((n,a)=>t.createElement(Gs.Z,{...n,ref:a})),ViewColumn:(0,t.forwardRef)((n,a)=>t.createElement(ks.Z,{...n,ref:a}))};function io(n,a){const l=a.split(".");let d=n[l[0]];for(let p=1;p<l.length;++p){if(d===void 0)return d;const v=l[p];d=d[v]}return d}const Xs=(0,yn.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"})(na.W$),lo=(0,yn.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(na.UW),_s=(0,f.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),ei=(0,f.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function ti(n,a){return n.map(l=>{const d={};let p=l.cellStyle||{};if(l.highlight)if(d.color=a.palette.textContrast,typeof p=="object")p.fontWeight=a.typography.fontWeightBold;else{const v=p;p=(P,Z,G)=>({...v(P,Z,G),fontWeight:a.typography.fontWeightBold})}return{...l,headerStyle:d,cellStyle:p}})}function ni(n,a){return(0,O.transform)(n,(l,d,p)=>{(0,O.isEqual)(d,a[p])||(l[p]=d)})}const co={search:"",filtersOpen:!1,filters:{}};function ri(n){const{toolbarRef:a,setSearch:l,hasFilters:d,selectedFiltersLength:p,toggleFilters:v}=n,P=_s(),Z=(0,t.useCallback)(G=>{n.onSearchChanged(G),l(G)},[n,l]);return d?t.createElement("div",{className:P.root},t.createElement("div",{className:P.root},t.createElement(xe.Z,{onClick:v,"aria-label":"filter list"},t.createElement(ha.Z,null)),t.createElement(_e.Z,{className:P.title},"Filters (",p,")")),t.createElement(lo,{...n,ref:a,onSearchChanged:Z})):t.createElement(lo,{...n,ref:a,onSearchChanged:Z})}function ai(n){const{data:a,columns:l,options:d,title:p,subtitle:v,filters:P,initialState:Z,emptyContent:G,onStateChange:H,components:ie,...ee}=n,Ee=ei(),Te=(0,Re.Z)(),we={...co,...Z},[ct,Mt]=(0,t.useState)(we.filtersOpen),Kt=(0,t.useCallback)(()=>Mt(dn=>!dn),[Mt]),[_t,Ht]=(0,t.useState)(0),[Ct,nn]=(0,t.useState)(a),[$t,or]=(0,t.useState)(we.filters),Kn=ti(l,Te),[_n,wt]=(0,t.useState)(we.search);(0,t.useEffect)(()=>{if(H){const dn=ni({search:_n,filtersOpen:ct,filters:$t},co);H(dn)}},[_n,ct,$t,H]);const br={headerStyle:{textTransform:"uppercase"}},Vr=(0,t.useCallback)(dn=>{var In;return(In=l.find(dr=>dr.title===dn))==null?void 0:In.field},[l]);(0,t.useEffect)(()=>{if(typeof a=="function")return;if(!$t){nn(a);return}const dn=Object.values($t);if(a&&dn.flat().length){const In=a.filter(dr=>!!Object.entries($t).filter(([,sr])=>!!sr.length).every(([sr,sn])=>{const Ln=io(dr,Vr(sr));return Array.isArray(Ln)&&Array.isArray(sn)?Ln.some(Ir=>sn.includes(Ir)):Array.isArray(Ln)?Ln.includes(sn):Array.isArray(sn)?sn.includes(Ln):Ln===sn}));nn(In)}else nn(a);Ht(dn.flat().length)},[a,$t,Vr]);const Pr=(dn,In)=>{const dr=sn=>{const Ln=new Set,Ir=ir=>{ir!=null&&Ln.add(ir)};return In&&In.forEach(ir=>{const Lr=io(ir,Vr(sn));Array.isArray(Lr)?Lr.forEach(Ir):Ir(Lr)}),Ln},sr=sn=>({placeholder:"All results",label:sn.column,multiple:sn.type==="multiple-select",items:[...dr(sn.column)].sort().map(Ln=>({label:Ln,value:Ln}))});return dn.map(sn=>({type:sn.type,element:sr(sn)}))},aa=!!(P!=null&&P.length),va=(0,t.useCallback)(dn=>t.createElement(ri,{setSearch:wt,hasFilters:aa,selectedFiltersLength:_t,toggleFilters:Kt,...dn}),[Kt,aa,_t,wt]),oa=typeof a!="function"&&a.length===0,sa=l.length,Aa=(0,t.useCallback)(dn=>G&&oa?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:sa},G))):t.createElement(na.os,{...dn}),[oa,G,sa]);return t.createElement("div",{className:Ee.root},ct&&a&&typeof a!="function"&&(P==null?void 0:P.length)&&t.createElement(Js,{filters:Pr(P,a),selectedFilters:$t,onChangeFilters:or}),t.createElement(na.ZP,{components:{Header:Xs,Toolbar:va,Body:Aa,...ie},options:{...br,...d},columns:Kn,icons:Qs,title:t.createElement(t.Fragment,null,t.createElement(_e.Z,{variant:"h5",component:"h2"},p),v&&t.createElement(_e.Z,{color:"textSecondary",variant:"body1"},v)),data:typeof a=="function"?a:Ct,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...ee}))}const Ml=n=>{const{children:a,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},a))},oi=(0,f.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"}),wl=n=>{const a=oi(n),{ariaLabel:l,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:a.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":l},n.children)},si=(n,a)=>a?n?"20px":"0":"40px",ii=(0,f.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:a=>si(a.isFirstNav,a.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}}),{name:"BackstageTab"}),$l=n=>{const a=ii(n),{isFirstNav:l,isFirstIndex:d,...p}=n;return React.createElement(Tab,{classes:a,disableRipple:!0,...p})},li=(0,f.Z)(n=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:n.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Ul=n=>{const a=li(n);return React.createElement(Tabs,{classes:a,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},ci=(0,f.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 Nl(n){const{tabs:a}=n,l=ci(),[d,p]=useState([0,0]),[v,P]=useState(0),[Z,G]=useState(0),[H,ie]=useState([[]]),ee=useRef(),{width:Ee}=useWindowSize(),Te=(_t,Ht)=>{p([v,Ht])},we=()=>{P(v-1)},ct=()=>{P(v+1)},Mt=()=>v+1<H.length;useEffect(()=>{const Ht=v===0?1:2,Ct=ee.current.offsetWidth-20-Ht*30,nn=d[0]*Z+d[1],$t=Math.floor(Ct/170);G($t),ie(chunkArray(a,$t)),p([Math.floor(nn/$t),nn%$t])},[Ee,a]);const Kt=v===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:Te,selectionFollowsFocus:!0},v!==0&&React.createElement(StyledIcon,{onClick:we,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),H[v].map((_t,Ht)=>React.createElement(StyledTab,{value:Ht,isFirstIndex:Ht===0,isFirstNav:v===0,key:Ht,icon:_t.icon||void 0,label:_t.label||void 0})),Mt()&&React.createElement(StyledIcon,{isNext:!0,onClick:ct,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Kt!==!1?H[v].map((_t,Ht)=>React.createElement(TabPanel,{key:Ht,value:Ht,index:Kt},_t.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},H[d[0]][d[1]].content))}var Zl=e(44311);function ui(n,a){const l=n[n.length-1];if(!!l)return l>=.9?a.palette.status.ok:l>=.5?a.palette.status.warning:a.palette.status.error}function zl(n){var l;const a=useTheme();return n.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...n},n.title&&React.createElement("title",null,n.title),React.createElement(SparklinesLine,{color:(l=n.color)!=null?l:ui(n.data,a)})):null}const di=n=>(0,f.Z)(a=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:a.spacing(2),textAlign:n.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:a.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),fi=({title:n="Unknown page",className:a})=>t.createElement(_e.Z,{variant:"h4",component:"h2",className:a,"data-testid":"header-title"},n);function mi(n){const{description:a,title:l,titleComponent:d=void 0,children:p,textAlign:v="left"}=n,P=di({textAlign:v})(),Z=d||t.createElement(fi,{title:l,className:P.title});return t.createElement(t.Fragment,null,t.createElement(da.q,{title:l}),t.createElement("div",{className:P.container},t.createElement("div",{className:P.leftItemsBox},Z,a&&t.createElement(_e.Z,{className:P.description,variant:"body2"},a)),t.createElement("div",{className:P.rightItemsBox},p)))}var hi=e.p+"static/mic-drop.fe3ef4d0..svg";const gi=(0,f.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"}),pi=()=>{const n=gi();return t.createElement("img",{src:hi,className:n.micDrop,alt:"Girl dropping mic from her hands"})},yi=(0,f.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 Ei(n){const{status:a,statusMessage:l,additionalInfo:d,supportUrl:p}=n,v=yi(),P=(0,Zn.s0)(),Z=xa();return t.createElement(Ut.Z,{container:!0,spacing:0,className:v.container},t.createElement(pi,null),t.createElement(Ut.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(_e.Z,{"data-testid":"error",variant:"body1",className:v.subtitle},"ERROR ",a,": ",l),t.createElement(_e.Z,{variant:"body1",className:v.subtitle},d),t.createElement(_e.Z,{variant:"h2",className:v.title},"Looks like someone dropped the mic!"),t.createElement(_e.Z,{variant:"h6"},t.createElement(k,{to:"#","data-testid":"go-back-link",onClick:()=>P(-1)},"Go back"),"... or please"," ",t.createElement(k,{to:p||Z.url},"contact support")," if you think this is a bug.")))}var vi=e(16173);const Ai=(0,yn.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(_e.Z),ga=(0,yn.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(un.Z);function Ri(n){const{children:a,...l}=n,[d,p]=t.useState(null),v=t.Children.toArray(a),[P,Z,...G]=v,H=G.length?G.pop():v[v.length-1],ie=v.length>3,ee=we=>{p(we.currentTarget)},Ee=()=>{p(null)},Te=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(vi.Z,{"aria-label":"breadcrumb",...l},v.length>1&&t.createElement(ga,{clone:!0},P),v.length>2&&t.createElement(ga,{clone:!0},Z),ie&&t.createElement(Ai,{onClick:ee},"..."),t.createElement(un.Z,{style:{fontStyle:"italic"}},H)),t.createElement(Pa.ZP,{open:Te,anchorEl:d,onClose:Ee,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(U.Z,null,G.map((we,ct)=>t.createElement(oe.Z,{key:ct,button:!0},t.createElement(ga,{clone:!0},we))))))}const Si=(0,f.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",alignItems:"center"},title:{color:n.page.fontColor,wordBreak:"break-word",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.page.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.page.fontColor},breadcrumb:{color:n.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-n.spacing(.3),marginBottom:n.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-n.spacing(.3),marginBottom:n.spacing(.3)}}),{name:"BackstageHeader"}),Ci=({type:n,typeLink:a,classes:l,pageTitle:d})=>n?a?t.createElement(Ri,{className:l.breadcrumb},t.createElement(k,{to:a},n),t.createElement(_e.Z,null,d)):t.createElement(_e.Z,{className:l.type},n):null,Ti=({pageTitle:n,classes:a,tooltip:l})=>{const d=t.createElement(_e.Z,{className:a.title,variant:"h1"},n);return l?t.createElement(De.ZP,{title:l,placement:"top-start"},d):d},bi=({classes:n,subtitle:a})=>a?typeof a!="string"?t.createElement(t.Fragment,null,a):t.createElement(_e.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},a):null;function uo(n){const{children:a,pageTitleOverride:l,style:d,subtitle:p,title:v,tooltip:P,type:Z,typeLink:G}=n,H=Si(),ee=(0,c.useApi)(c.configApiRef).getOptionalString("app.title")||"Backstage",Ee=l||v,Te=v||l,we=`${Ee} | %s | ${ee}`,ct=`${Ee} | ${ee}`;return t.createElement(t.Fragment,null,t.createElement(da.q,{titleTemplate:we,defaultTitle:ct}),t.createElement("header",{style:d,className:H.header},t.createElement(un.Z,{className:H.leftItemsBox},t.createElement(Ci,{classes:H,type:Z,typeLink:G,pageTitle:Te}),t.createElement(Ti,{classes:H,pageTitle:Te,tooltip:P}),t.createElement(bi,{classes:H,subtitle:p})),t.createElement(Ut.Z,{container:!0,className:H.rightItemsBox,spacing:4},a)))}const Pi=(0,f.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"}),Ii=({value:n,className:a})=>t.createElement(_e.Z,{className:a},n);function Li(n){const{label:a,value:l,url:d}=n,p=Pi(),v=t.createElement(Ii,{className:p.value,value:l||"<Unknown>"});return t.createElement(Ut.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(_e.Z,{className:p.label},a),d?t.createElement(k,{to:d},v):v))}const Oi={hour:"2-digit",minute:"2-digit"};function fo(n){const a=new Date,l=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const p=n.getConfigArray("homepage.clocks");for(const v of p)if(v.has("label")&&v.has("timezone")){let P=v.getString("label");const Z={timeZone:v.getString("timezone"),...Oi};try{new Date().toLocaleString(l,Z)}catch{console.warn(`The timezone ${Z.timeZone} is invalid. Defaulting to GMT`),Z.timeZone="GMT",P="GMT"}const G=a.toLocaleTimeString(l,Z);d.push({time:G,label:P})}return d}function Wl(n){const a=useApi(configApiRef),l=[],[d,p]=React.useState(l);return React.useEffect(()=>{p(fo(a));const v=setInterval(()=>{p(fo(a))},1e3);return()=>{clearInterval(v)}},[a]),d.length!==0?React.createElement(React.Fragment,null,d.map(v=>React.createElement(HeaderLabel,{label:v.label,value:v.time,key:v.label}))):null}const xi=n=>(0,o.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.getPageTheme({themeId:"card"}).backgroundImage,backgroundPosition:0,backgroundSize:"inherit"}}),Di=(0,f.Z)(xi,{name:"BackstageItemCardHeader"});function Fi(n){const{title:a,subtitle:l,children:d}=n,p=Di(n);return t.createElement("div",{className:p.root},l&&t.createElement(_e.Z,{variant:"subtitle2",component:"h3"},l),a&&t.createElement(_e.Z,{variant:"h6",component:"h4"},a),d)}function Hl(n){const{description:a,tags:l,title:d,type:p,subtitle:v,label:P,onClick:Z,href:G}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:v||p})),React.createElement(CardContent,null,l!=null&&l.length?React.createElement(Box,null,l.map((H,ie)=>React.createElement(Chip,{size:"small",label:H,key:ie}))):null,a),React.createElement(CardActions,null,!G&&React.createElement(Button,{to:"#",onClick:Z,color:"primary"},P),G&&React.createElement(Button,{to:G,color:"primary"},P)))}const Bi=n=>(0,o.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),Mi=(0,f.Z)(Bi,{name:"BackstageItemCardGrid"});function wi(n){const{children:a,...l}=n,d=Mi(l);return t.createElement("div",{className:d.root,...l},a)}var $i=e(41547);const Ui=(0,f.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 mo(n){const{themeId:a,children:l}=n,{isMobile:d}=Hr(),p=Ui({isMobile:d});return t.createElement($i.Z,{theme:v=>({...v,page:v.getPageTheme({themeId:a})})},t.createElement("main",{className:p.root},l))}function Ni(n){const{themeId:a,children:l,...d}=n;return t.createElement(mo,{themeId:a},t.createElement(uo,{...d}),l)}var Pn=e(30195);const jl=Pn.z.object({providerInfo:Pn.z.object({}).catchall(Pn.z.unknown()).optional(),profile:Pn.z.object({email:Pn.z.string().optional(),displayName:Pn.z.string().optional(),picture:Pn.z.string().optional()}),backstageIdentity:Pn.z.object({token:Pn.z.string(),identity:Pn.z.object({type:Pn.z.literal("user"),userEntityRef:Pn.z.string(),ownershipEntityRefs:Pn.z.array(Pn.z.string())})})}),ho={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function Zi(n){const a=new Date(Date.now()+ho.defaultTokenExpiryMillis);if(!n)return a;const[l,d,p]=n.split("."),v=JSON.parse(atob(d));return typeof v.exp!="number"?a:new Date(v.exp*1e3-ho.tokenExpiryMarginMillis)}class Vl{constructor(a){X(this,"options");X(this,"abortController");X(this,"state");this.options=a,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:a}=this.getSessionSync(),l=a.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 a=this.state.type==="active"?this.state.session:void 0,l=this.fetchSession().then(d=>(this.state={type:"active",session:d,expiresAt:Zi(d.backstageIdentity.token)},d),d=>{throw this.state={type:"failed",error:d},d});return this.state={type:"fetching",promise:l,previous:a},l}async fetchSession(){const a=await this.options.discoveryApi.getBaseUrl("auth"),l=await fetch(`${a}/${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 Gl=n=>{const a=useApi(discoveryApiRef),[{status:l,error:d},{execute:p}]=useAsync(async()=>{const v=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:a});await v.start(),n.onSignInSuccess(v)});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},zi=(0,f.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),pa=({children:n})=>{const a=zi();return t.createElement(Ut.Z,{component:"li",item:!0,classes:a},n)};class ya{getUserId(){return"guest"}async getIdToken(){}getProfile(){return{email:"guest@example.com",displayName:"Guest"}}async getProfileInfo(){return{email:"guest@example.com",displayName:"Guest"}}async getBackstageIdentity(){const a="user:default/guest";return{type:"user",userEntityRef:a,ownershipEntityRefs:[a]}}async getCredentials(){return{}}async signOut(){}}function Wi(n){const[a,l,d]=n.split(".");return JSON.parse(atob(l))}class Ea{constructor(a){this.result=a}getUserId(){return this.result.userId}static fromResult(a){return new Ea(a)}async getIdToken(){var a,l;return(l=(a=this.result).getIdToken)==null?void 0:l.call(a)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const a=await this.getIdToken();if(!a){const p=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:p,ownershipEntityRefs:[p]}}const{sub:l,ent:d}=Wi(a);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 a,l;return(l=(a=this.result).signOut)==null?void 0:l.call(a)}}class jr{constructor(a,l,d){X(this,"profilePromise");this.identity=a,this.authApi=l,this.profile=d}static createGuest(){return new ya}static fromLegacy(a){return Ea.fromResult(a)}static create(a){return new jr(a.identity,a.authApi,a.profile)}getUserId(){const a=this.identity.userEntityRef,l=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(a);if(!l)throw new TypeError(`Invalid user entity reference "${a}"`);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(a){throw this.profilePromise=void 0,a}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const Hi={Component:({config:n,onSignInSuccess:a})=>{const{apiRef:l,title:d,message:p}=n,v=(0,c.useApi)(l),P=(0,c.useApi)(c.errorApiRef),Z=async()=>{try{const G=await v.getBackstageIdentity({instantPopup:!0});if(!G)throw new Error(`The ${d} provider is not configured to support sign-in`);const H=await v.getProfile();a(jr.create({identity:G.identity,profile:H,authApi:v}))}catch(G){P.post(new rr.SP("Login failed",G))}};return t.createElement(pa,null,t.createElement(ur,{variant:"fullHeight",title:d,actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:Z},"Sign In")},t.createElement(_e.Z,{variant:"body1"},p)))},loader:async(n,a)=>{const l=n.get(a),d=await l.getBackstageIdentity({optional:!0});if(!d)return;const p=await l.getProfile();return jr.create({identity:d.identity,profile:p,authApi:l})}},ji={Component:({onSignInSuccess:n})=>t.createElement(pa,null,t.createElement(ur,{title:"Guest",variant:"fullHeight",actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:()=>n(new ya)},"Enter")},t.createElement(_e.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 ya};var Vi=e(63955),go=e(86619),po=e(74828),Gi=e(45455),Ki=e.n(Gi);const ki=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Yi=(0,f.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),yo=n=>{const{ref:a,...l}=n;return{inputRef:a,...l}},Ji={Component:({onSignInSuccess:n})=>{const a=Yi(),{register:l,handleSubmit:d,formState:p}=(0,Vi.cI)({mode:"onChange"}),{errors:v}=p,P=({userId:Z})=>{n(jr.fromLegacy({userId:Z,profile:{email:`${Z}@example.com`}}))};return t.createElement(pa,null,t.createElement(ur,{title:"Custom User",variant:"fullHeight"},t.createElement(_e.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:a.form,onSubmit:d(P)},t.createElement(A.Z,null,t.createElement(go.Z,{...yo(l("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(v.userId)}),v.userId&&t.createElement(po.Z,{error:!0},v.userId.message)),t.createElement(A.Z,null,t.createElement(go.Z,{...yo(l("idToken",{required:!1,validate:Z=>!Z||ki.test(Z)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(v.idToken)}),v.idToken&&t.createElement(po.Z,{error:!0},v.idToken.message)),t.createElement(y.Z,{type:"submit",color:"primary",variant:"outlined",className:a.button,disabled:!(p!=null&&p.isDirty)||!Ki()(v)},"Continue"))))},loader:async()=>{}},ra="@backstage/core:SignInPage:provider",Eo={guest:ji,custom:Ji,common:Hi};function vo(n,a){if(n in a)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function ql(n){return n.reduce((l,d)=>{if(typeof d=="string")return vo(d,l),l[d]={components:Eo[d],id:d},l;const{id:p}=d;return vo(p,l),l[p]={components:Eo.common,id:p,config:d},l},{})}const _l=(n,a)=>{const l=useApi(errorApiRef),d=useApiHolder(),[p,v]=useState(!0),P=useCallback(G=>{a(IdentityApiSignOutProxy.from({identityApi:G,signOut:async()=>{var H;localStorage.removeItem(ra),await((H=G.signOut)==null?void 0:H.call(G))}}))},[a]);useLayoutEffect(()=>{var ee;if(!p)return;const G=localStorage.getItem(ra);if(G===null){v(!1);return}const H=n[G];if(!H){v(!1);return}let ie=!1;return H.components.loader(d,(ee=H.config)==null?void 0:ee.apiRef).then(Ee=>{ie||(Ee?P(Ee):v(!1))}).catch(Ee=>{ie||(localStorage.removeItem(ra),l.post(Ee),v(!1))}),()=>{ie=!0}},[p,l,a,d,n,P]);const Z=useMemo(()=>Object.keys(n).map(G=>{const H=n[G],{Component:ie}=H.components,ee=Ee=>{localStorage.setItem(ra,H.id),P(Ee)};return React.createElement(ie,{key:H.id,config:H.config,onSignInSuccess:ee})}),[n,P]);return[p,Z]},Qi=({onSignInSuccess:n,providers:a=[],title:l,align:d="left"})=>{const p=useApi(configApiRef),v=useStyles(),P=getSignInProviders(a),[Z,G]=useSignInProviders(P,n);return Z?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:v},G)))},Xi=({provider:n,auto:a,onSignInSuccess:l})=>{const d=useStyles(),p=useApi(n.apiRef),v=useApi(configApiRef),[P,Z]=useState(),[G,H]=useState(!1),ie=async({checkExisting:ee,showPopup:Ee})=>{try{let Te;if(ee&&(Te=await p.getBackstageIdentity({optional:!0})),!Te&&(Ee||a)&&(H(!0),Te=await p.getBackstageIdentity({instantPopup:!0}),!Te))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Te){H(!0);return}const we=await p.getProfile();l(UserIdentity.create({identity:Te.identity,authApi:p,profile:we}))}catch(Te){Z(Te),H(!0)}};return useMountEffect(()=>ie({checkExisting:!0})),G?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:v.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:()=>{ie({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},n.message),P&&P.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},P.message)))))):React.createElement(Progress,null)};function ec(n){return"provider"in n?React.createElement(Xi,{...n}):React.createElement(Qi,{...n})}const qi=(0,f.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"}),_i=(0,yn.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(Ar.Z);function tc(n){const{slackChannel:a,errorBoundaryProps:l,children:d,title:p,deepLink:v,value:P,onChange:Z}=n,G=qi(),[H,ie]=useState(0),ee=Z||((we,ct)=>ie(ct));let Ee;P?React.Children.map(d,we=>{React.isValidElement(we)&&(we==null?void 0:we.props.value)===P&&(Ee=we==null?void 0:we.props.children)}):React.Children.map(d,(we,ct)=>{React.isValidElement(we)&&ct===H&&(Ee=we==null?void 0:we.props.children)});const Te=l||(a?{slackChannel:a}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Te},p&&React.createElement(_i,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:G,value:P||H,onChange:ee},d),React.createElement(Divider,null),React.createElement(CardContent,null,Ee),v&&React.createElement(BottomLink,{...v})))}const el=(0,f.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 nc(n){const{children:a,...l}=n,d=el();return React.createElement(Tab,{disableRipple:!0,classes:d,...l})}},24877:function(te,s,e){"use strict";e.d(s,{f:function(){return R},z:function(){return y}});var r=e(76241),t=e(2784);const c=(0,r.CT)("analytics-context"),i=()=>{const g=(0,t.useContext)(c);if(g===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const E=g.atVersion(1);if(E===void 0)throw new Error("No context found for version 1.");return E},R=g=>{const{attributes:E,children:S}=g,O={...i(),...E},$=(0,r.EI)({1:O});return t.createElement(c.Provider,{value:$},S)};function f(g,E){const S=b=>React.createElement(R,{attributes:E},React.createElement(g,{...b}));return S.displayName=`WithAnalyticsContext(${g.displayName||g.name||"Component"})`,S}var o=e(27399);class u{constructor(E,S={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=E,this.context=S}setContext(E){this.context=E}captureEvent(E,S,{value:b,attributes:O}={}){try{this.analyticsApi.captureEvent({action:E,subject:S,value:b,attributes:O,context:this.context})}catch($){console.warn("Error during analytics event capture. %o",$)}}}function m(){try{return(0,o.useApi)(o.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function y(){const g=(0,t.useRef)(null),E=i(),S=m();function b(){return g.current===null&&(g.current=new u(S)),g.current}const O=b();return O.setContext(E),O}},39135:function(te,s,e){"use strict";e.d(s,{CL:function(){return B},sM:function(){return t},$v:function(){return g},v_:function(){return E},hg:function(){return S},uB:function(){return y},bq:function(){return m},Ds:function(){return b},NW:function(){return O},VE:function(){return $},W0:function(){return F},gP:function(){return D},F4:function(){return i},ux:function(){return f},Kp:function(){return c},$4:function(){return x},p_:function(){return o},ZM:function(){return w},D:function(){return R},gW:function(){return u},E6:function(){return k}});var r=e(86833),t;(function(re){const le="SignedIn";re.SignedIn=le;const Re="SignedOut";re.SignedOut=Re})(t||(t={}));const c=(0,r.createApiRef)({id:"core.auth.google"}),i=(0,r.createApiRef)({id:"core.auth.github"}),R=(0,r.createApiRef)({id:"core.auth.okta"}),f=(0,r.createApiRef)({id:"core.auth.gitlab"}),o=(0,r.createApiRef)({id:"core.auth.microsoft"}),u=(0,r.createApiRef)({id:"core.auth.onelogin"}),m=(0,r.createApiRef)({id:"core.auth.bitbucket"}),y=(0,r.createApiRef)({id:"core.auth.atlassian"}),g=(0,r.createApiRef)({id:"core.alert"}),E=(0,r.createApiRef)({id:"core.analytics"}),S=(0,r.createApiRef)({id:"core.apptheme"}),b=(0,r.createApiRef)({id:"core.config"}),O=(0,r.createApiRef)({id:"core.discovery"}),$=(0,r.createApiRef)({id:"core.error"});var B;(function(re){re[re.None=0]="None";const Re=1;re[re.Active=Re]="Active"})(B||(B={}));const F=(0,r.createApiRef)({id:"core.featureflags"}),D=(0,r.createApiRef)({id:"core.fetch"}),x=(0,r.createApiRef)({id:"core.identity"}),w=(0,r.createApiRef)({id:"core.oauthrequest"}),k=(0,r.createApiRef)({id:"core.storage"})},27399:function(te,s,e){"use strict";e.d(s,{FeatureFlagState:function(){return t.CL},SessionState:function(){return t.sM},alertApiRef:function(){return t.$v},analyticsApiRef:function(){return t.v_},appThemeApiRef:function(){return t.hg},atlassianAuthApiRef:function(){return t.uB},bitbucketAuthApiRef:function(){return t.bq},configApiRef:function(){return t.Ds},createApiFactory:function(){return r.createApiFactory},createApiRef:function(){return r.createApiRef},discoveryApiRef:function(){return t.NW},errorApiRef:function(){return t.VE},featureFlagsApiRef:function(){return t.W0},fetchApiRef:function(){return t.gP},githubAuthApiRef:function(){return t.F4},gitlabAuthApiRef:function(){return t.ux},googleAuthApiRef:function(){return t.Kp},identityApiRef:function(){return t.$4},microsoftAuthApiRef:function(){return t.p_},oauthRequestApiRef:function(){return t.ZM},oktaAuthApiRef:function(){return t.D},oneloginAuthApiRef:function(){return t.gW},storageApiRef:function(){return t.E6},useApi:function(){return r.useApi},useApiHolder:function(){return r.useApiHolder}});var r=e(86833);e.o(r,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return r.FeatureFlagState}}),e.o(r,"SessionState")&&e.d(s,{SessionState:function(){return r.SessionState}}),e.o(r,"alertApiRef")&&e.d(s,{alertApiRef:function(){return r.alertApiRef}}),e.o(r,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return r.analyticsApiRef}}),e.o(r,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return r.appThemeApiRef}}),e.o(r,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),e.o(r,"attachComponentData")&&e.d(s,{attachComponentData:function(){return r.attachComponentData}}),e.o(r,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),e.o(r,"configApiRef")&&e.d(s,{configApiRef:function(){return r.configApiRef}}),e.o(r,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return r.createComponentExtension}}),e.o(r,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),e.o(r,"createPlugin")&&e.d(s,{createPlugin:function(){return r.createPlugin}}),e.o(r,"createReactExtension")&&e.d(s,{createReactExtension:function(){return r.createReactExtension}}),e.o(r,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return r.createRoutableExtension}}),e.o(r,"createRouteRef")&&e.d(s,{createRouteRef:function(){return r.createRouteRef}}),e.o(r,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return r.discoveryApiRef}}),e.o(r,"errorApiRef")&&e.d(s,{errorApiRef:function(){return r.errorApiRef}}),e.o(r,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),e.o(r,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return r.fetchApiRef}}),e.o(r,"getComponentData")&&e.d(s,{getComponentData:function(){return r.getComponentData}}),e.o(r,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),e.o(r,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),e.o(r,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),e.o(r,"identityApiRef")&&e.d(s,{identityApiRef:function(){return r.identityApiRef}}),e.o(r,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),e.o(r,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),e.o(r,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),e.o(r,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),e.o(r,"storageApiRef")&&e.d(s,{storageApiRef:function(){return r.storageApiRef}}),e.o(r,"useApp")&&e.d(s,{useApp:function(){return r.useApp}}),e.o(r,"useElementFilter")&&e.d(s,{useElementFilter:function(){return r.useElementFilter}}),e.o(r,"usePluginOptions")&&e.d(s,{usePluginOptions:function(){return r.usePluginOptions}}),e.o(r,"useRouteRef")&&e.d(s,{useRouteRef:function(){return r.useRouteRef}}),e.o(r,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return r.useRouteRefParams}});var t=e(39135)},90515:function(te,s,e){"use strict";e.d(s,{T:function(){return t}});class r{constructor(i){if(this.config=i,!i.id.split(".").flatMap(f=>f.split("-")).every(f=>f.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${i.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(te,s,e){"use strict";e.d(s,{n:function(){return r}});function r(t,c){return"id"in t?{api:t,deps:{},factory:()=>c}:t}},86833:function(te,s,e){"use strict";e.d(s,{createApiFactory:function(){return R.n},createApiRef:function(){return t.T},useApi:function(){return r.h_},useApiHolder:function(){return r.I_}});var r=e(5761),t=e(90515),c=e(16362),i=e.n(c);e.o(c,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return c.FeatureFlagState}}),e.o(c,"SessionState")&&e.d(s,{SessionState:function(){return c.SessionState}}),e.o(c,"alertApiRef")&&e.d(s,{alertApiRef:function(){return c.alertApiRef}}),e.o(c,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return c.analyticsApiRef}}),e.o(c,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return c.appThemeApiRef}}),e.o(c,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return c.atlassianAuthApiRef}}),e.o(c,"attachComponentData")&&e.d(s,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return c.bitbucketAuthApiRef}}),e.o(c,"configApiRef")&&e.d(s,{configApiRef:function(){return c.configApiRef}}),e.o(c,"createApiFactory")&&e.d(s,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(s,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createReactExtension")&&e.d(s,{createReactExtension:function(){return c.createReactExtension}}),e.o(c,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(s,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return c.discoveryApiRef}}),e.o(c,"errorApiRef")&&e.d(s,{errorApiRef:function(){return c.errorApiRef}}),e.o(c,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return c.featureFlagsApiRef}}),e.o(c,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return c.fetchApiRef}}),e.o(c,"getComponentData")&&e.d(s,{getComponentData:function(){return c.getComponentData}}),e.o(c,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return c.githubAuthApiRef}}),e.o(c,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return c.gitlabAuthApiRef}}),e.o(c,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return c.googleAuthApiRef}}),e.o(c,"identityApiRef")&&e.d(s,{identityApiRef:function(){return c.identityApiRef}}),e.o(c,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return c.microsoftAuthApiRef}}),e.o(c,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return c.oauthRequestApiRef}}),e.o(c,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return c.oktaAuthApiRef}}),e.o(c,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return c.oneloginAuthApiRef}}),e.o(c,"storageApiRef")&&e.d(s,{storageApiRef:function(){return c.storageApiRef}}),e.o(c,"useApp")&&e.d(s,{useApp:function(){return c.useApp}}),e.o(c,"useElementFilter")&&e.d(s,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"usePluginOptions")&&e.d(s,{usePluginOptions:function(){return c.usePluginOptions}}),e.o(c,"useRouteRef")&&e.d(s,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return c.useRouteRefParams}});var R=e(25182)},16362:function(){},5761:function(te,s,e){"use strict";e.d(s,{I_:function(){return c},h_:function(){return i}});var r=e(2784),t=e(76241);function c(){const f=(0,t.Vt)("api-context");if(!f)throw new Error("API context is not available");const o=f.atVersion(1);if(!o)throw new Error("ApiContext v1 not available");return o}function i(f){const u=c().get(f);if(!u)throw new Error(`No implementation available for ${f}`);return u}function R(f){return function(u){const m=g=>{const E=c(),S={};for(const b in f)if(f.hasOwnProperty(b)){const O=f[b],$=E.get(O);if(!$)throw new Error(`No implementation available for ${O}`);S[b]=$}return React.createElement(u,{...g,...S})},y=u.displayName||u.name||"Component";return m.displayName=`withApis(${y})`,m}}},31311:function(te,s,e){"use strict";e.d(s,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),c=e.n(t);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(s,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(te,s,e){"use strict";e.d(s,{q:function(){return t}});var r=e(76241);const t=()=>{const c=(0,r.Vt)("app-context");if(!c)throw new Error("App context is not available");const i=c.atVersion(1);if(!i)throw new Error("AppContext v1 not available");return i}},74181:function(te,s,e){"use strict";e.d(s,{R5:function(){return i},CO:function(){return S},YO:function(){return b},P4:function(){return E},IY:function(){return R},vJ:function(){return F}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),c="__backstage_data";function i(D,x,w){var le;const k=D;let re=(le=k[c])!=null?le:t.get(D);if(re||(re={map:new Map},Object.defineProperty(k,c,{enumerable:!1,configurable:!0,writable:!1,value:re}),t.set(D,re)),re.map.has(x)){const Re=D.displayName||D.name;throw new Error(`Attempted to attach duplicate data "${x}" to component "${Re}"`)}re.map.set(x,w)}function R(D,x){var re;if(!D)return;const w=D.type;if(!w)return;const k=(re=w[c])!=null?re:t.get(w);if(!!k)return k.map.get(x)}var f=e(2784),o=e(24877),u=e(31311),m=e(82772);class y extends f.Component{constructor(){super(...arguments);X(this,"state",{error:void 0});X(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(w){return{error:w}}render(){const{error:w}=this.state,{app:k,plugin:re}=this.props,{ErrorBoundaryFallback:le}=k.getComponents();return w?f.createElement(le,{error:w,resetError:this.handleErrorReset,plugin:re}):this.props.children}}var g=e(40338);function E(D){const{component:x,mountPoint:w,name:k}=D;return b({component:{lazy:()=>x().then(re=>{const le=xe=>{try{(0,m.tg)(w)}catch(De){if(typeof De=="object"&&De!==null){const{message:je}=De;if(typeof je=="string"&&je.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${w} 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 De}return f.createElement(re,{...xe})},Re=k||re.displayName||re.name||"LazyComponent";return le.displayName=`RoutableExtension(${Re})`,le},re=>Re=>{const xe=(0,u.useApp)(),{BootErrorPage:De}=xe.getComponents();return f.createElement(De,{step:"load-chunk",error:re})})},data:{"core.mountPoint":w},name:k})}function S(D){const{component:x,name:w}=D;return b({component:x,name:w})}function b(D){const{data:x={},name:w}=D;w||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let k;if("lazy"in D.component){const le=D.component.lazy;k=(0,f.lazy)(()=>le().then(Re=>({default:Re})))}else k=D.component.sync;const re=w||k.displayName||k.name||"Component";return{expose(le){const Re=xe=>{const De=(0,u.useApp)(),{Progress:je}=De.getComponents(),ve=x==null?void 0:x["core.mountPoint"];return f.createElement(f.Suspense,{fallback:f.createElement(je,null)},f.createElement(y,{app:De,plugin:le},f.createElement(o.f,{attributes:{pluginId:le.getId(),...w&&{extension:w},...ve&&{routeRef:ve.id}}},f.createElement(g.o,{plugin:le},f.createElement(k,{...xe})))))};i(Re,"core.plugin",le);for(const[xe,De]of Object.entries(x))i(Re,xe,De);return Re.displayName=`Extension(${re})`,Re}}}var O=e(27399);function $(D,x,w,k){return f.Children.toArray(D).flatMap(re=>{if(!(0,f.isValidElement)(re))return[];if(re.type===f.Fragment)return $(re.props.children,x,w,k);if(R(re,"core.featureFlagged")){const le=re.props;return("with"in le?x.isActive(le.with):!x.isActive(le.without))?$(re.props.children,x,w,k):[]}if(w===void 0||w(re))return[re];if(k)throw new Error(k);return $(re.props.children,x,w,k)})}class B{constructor(x,w){this.node=x,this.featureFlagsApi=w}selectByComponentData(x){const w=$(this.node,this.featureFlagsApi,k=>R(k,x.key)!==void 0,x.withStrictError);return new B(w,this.featureFlagsApi)}findComponentData(x){return $(this.node,this.featureFlagsApi,k=>R(k,x.key)!==void 0).map(k=>R(k,x.key)).filter(k=>k!==void 0)}getElements(){return $(this.node,this.featureFlagsApi)}}function F(D,x,w=[]){const k=(0,O.useApi)(O.featureFlagsApiRef),re=new B(D,k);return(0,f.useMemo)(()=>x(re),[D,...w])}},80274:function(){},36964:function(te,s,e){"use strict";e.d(s,{AnalyticsContext:function(){return r.f},FeatureFlagState:function(){return t.FeatureFlagState},SessionState:function(){return t.SessionState},alertApiRef:function(){return t.alertApiRef},analyticsApiRef:function(){return t.analyticsApiRef},appThemeApiRef:function(){return t.appThemeApiRef},atlassianAuthApiRef:function(){return t.atlassianAuthApiRef},attachComponentData:function(){return R.R5},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},createComponentExtension:function(){return R.CO},createExternalRouteRef:function(){return m.x8},createPlugin:function(){return u.r},createReactExtension:function(){return R.YO},createRoutableExtension:function(){return R.P4},createRouteRef:function(){return m.NT},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},getComponentData:function(){return R.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 i.useApp},useElementFilter:function(){return R.vJ},usePluginOptions:function(){return c.y},useRouteRef:function(){return m.tg},useRouteRefParams:function(){return m.Oi}});var r=e(24877),t=e(27399);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(s,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(s,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"usePluginOptions")&&e.d(s,{usePluginOptions:function(){return t.usePluginOptions}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}});var c=e(40338),i=e(31311);e.o(i,"attachComponentData")&&e.d(s,{attachComponentData:function(){return i.attachComponentData}}),e.o(i,"createApiFactory")&&e.d(s,{createApiFactory:function(){return i.createApiFactory}}),e.o(i,"createApiRef")&&e.d(s,{createApiRef:function(){return i.createApiRef}}),e.o(i,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return i.createComponentExtension}}),e.o(i,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return i.createExternalRouteRef}}),e.o(i,"createPlugin")&&e.d(s,{createPlugin:function(){return i.createPlugin}}),e.o(i,"createReactExtension")&&e.d(s,{createReactExtension:function(){return i.createReactExtension}}),e.o(i,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return i.createRoutableExtension}}),e.o(i,"createRouteRef")&&e.d(s,{createRouteRef:function(){return i.createRouteRef}}),e.o(i,"getComponentData")&&e.d(s,{getComponentData:function(){return i.getComponentData}}),e.o(i,"useApi")&&e.d(s,{useApi:function(){return i.useApi}}),e.o(i,"useApiHolder")&&e.d(s,{useApiHolder:function(){return i.useApiHolder}}),e.o(i,"useElementFilter")&&e.d(s,{useElementFilter:function(){return i.useElementFilter}}),e.o(i,"useRouteRef")&&e.d(s,{useRouteRef:function(){return i.useRouteRef}}),e.o(i,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return i.useRouteRefParams}});var R=e(74181),f=e(80274),o=e.n(f);e.o(f,"createApiFactory")&&e.d(s,{createApiFactory:function(){return f.createApiFactory}}),e.o(f,"createApiRef")&&e.d(s,{createApiRef:function(){return f.createApiRef}}),e.o(f,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return f.createExternalRouteRef}}),e.o(f,"createPlugin")&&e.d(s,{createPlugin:function(){return f.createPlugin}}),e.o(f,"createRouteRef")&&e.d(s,{createRouteRef:function(){return f.createRouteRef}}),e.o(f,"useApi")&&e.d(s,{useApi:function(){return f.useApi}}),e.o(f,"useApiHolder")&&e.d(s,{useApiHolder:function(){return f.useApiHolder}}),e.o(f,"useRouteRef")&&e.d(s,{useRouteRef:function(){return f.useRouteRef}}),e.o(f,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return f.useRouteRefParams}});var u=e(96896),m=e(82772)},40338:function(te,s,e){"use strict";e.d(s,{o:function(){return i},y:function(){return R}});var r=e(76241),t=e(2784);const c="plugin-context",i=({children:f,plugin:o})=>{const{Provider:u}=(0,r.CT)(c);return t.createElement(u,{value:(0,r.EI)({1:{plugin:o}})},f)};function R(){const f=(0,r.Vt)(c);if(!f)throw new Error("Plugin Options context is not available");const o=f.atVersion(1);if(!o)throw new Error("Plugin Options v1 is not available");return o.plugin.getPluginOptions()}},96896:function(te,s,e){"use strict";e.d(s,{r:function(){return t}});class r{constructor(i){X(this,"options");this.config=i}getId(){return this.config.id}getApis(){var i;return(i=this.config.apis)!=null?i:[]}getFeatureFlags(){var i,R;return(R=(i=this.config.featureFlags)==null?void 0:i.slice())!=null?R:[]}get routes(){var i;return(i=this.config.routes)!=null?i:{}}get externalRoutes(){var i;return(i=this.config.externalRoutes)!=null?i:{}}provide(i){return i.expose(this)}__experimentalReconfigure(i){this.config.__experimentalConfigure&&(this.options=this.config.__experimentalConfigure(i))}getPluginOptions(){var i;return this.config.__experimentalConfigure&&!this.options&&(this.options=this.config.__experimentalConfigure()),(i=this.options)!=null?i:{}}toString(){return`plugin{${this.config.id}}`}}function t(c){return new r(c)}},82772:function(te,s,e){var b,O,$;"use strict";e.d(s,{x8:function(){return m},NT:function(){return i},tg:function(){return E},Oi:function(){return S}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class c{constructor(F,D){X(this,b,"absolute");this.id=F,this.params=D}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}b=t;function i(B){var F;return new c(B.id,(F=B.params)!=null?F:[])}const R=/^\w+$/;class f{constructor(F,D,x,w){X(this,O,"sub");this.id=F,this.path=D,this.parent=x,this.params=w}toString(){return`routeRef{type=sub,id=${this.id}}`}}O=t;function o(B){const{id:F,path:D,parent:x}=B,w=D.split("/").filter(le=>le.startsWith(":")).map(le=>le.substring(1)),k=[...x.params,...w];if(x.params.some(le=>w.includes(le)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!D.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${D}'`);if(D.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${D}'`);for(const le of w)if(!R.test(le))throw new Error(`SubRouteRef path has invalid param, got '${le}'`);return new f(F,D,x,k)}class u{constructor(F,D,x){X(this,$,"external");this.id=F,this.params=D,this.optional=x}toString(){return`routeRef{type=external,id=${this.id}}`}}$=t;function m(B){var F;return new u(B.id,(F=B.params)!=null?F:[],Boolean(B.optional))}var y=e(2784),g=e(10289);function E(B){const F=(0,g.TH)(),D=(0,r.Vt)("routing-context");if(!D)throw new Error("Routing context is not available");const x=D.atVersion(1),w=(0,y.useMemo)(()=>x&&x.resolve(B,F),[x,B,F]);if(!D)throw new Error("useRouteRef used outside of routing context");if(!x)throw new Error("RoutingContext v1 not available");const k="optional"in B&&B.optional;if(!w&&!k)throw new Error(`No path for ${B}`);return w}function S(B){return(0,g.UO)()}},10179:function(te,s,e){"use strict";e.d(s,{SP:function(){return b},dR:function(){return g},VL:function(){return $},BD:function(){return t}});function r(B){if(typeof B!="object"||B===null||Array.isArray(B))return!1;const F=B;return!(typeof F.name!="string"||F.name===""||typeof F.message!="string")}function t(B){if(typeof B!="object"||B===null||Array.isArray(B))throw new Error(`Encountered invalid error, not an object, got '${B}'`);const F=B;if(typeof F.name!="string"||F.name==="")throw new Error(`Encountered error object without a name, got '${B}'`);if(typeof F.message!="string")throw new Error(`Encountered error object without a message, got '${B}'`)}var c=e(24852);function i(B,F){const D=serializeErrorInternal(B),x={name:"Unknown",message:"<no reason given>",...D};return F!=null&&F.includeStack||delete x.stack,x}function R(B){const F=(0,c.deserializeError)(B);return B.stack||(F.stack=void 0),F}function f(B){if(r(B)){const F=String(B);return F!=="[object Object]"?F:`${B.name}: ${B.message}`}return`unknown error '${B}'`}class o extends Error{constructor(D,x){var k;let w=D;if(x!==void 0){const re=f(x);w?w+=`; caused by ${re}`:w=`caused by ${re}`}super(w);X(this,"cause");(k=Error.captureStackTrace)==null||k.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(x)?x:void 0}}class u extends null{}class m extends null{}class y extends null{}class g extends o{}class E extends null{}class S extends null{}class b extends o{constructor(F,D){super(F,D),this.name=r(D)?D.name:"Error"}}async function O(B){var F;try{const D=await B.text();if(D){if((F=B.headers.get("content-type"))!=null&&F.startsWith("application/json"))try{const x=JSON.parse(D);if(x.error&&x.response)return x}catch{}return{error:{name:"Error",message:`Request failed with status ${B.status} ${B.statusText}, ${D}`},response:{statusCode:B.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${B.status} ${B.statusText}`},response:{statusCode:B.status}}}class $ extends Error{constructor(D){super(D.message);X(this,"response");X(this,"body");X(this,"cause");this.name="ResponseError",this.response=D.response,this.body=D.data,this.cause=D.cause}static async fromResponse(D){const x=await O(D),w=x.response.statusCode||D.status,k=x.error.name||D.statusText,re=`Request failed with ${w} ${k}`,le=R(x.error);return new $({message:re,response:D,data:x,cause:le})}}},36356:function(te,s,e){var g,E,S,b,O;"use strict";e.d(s,{nW:function(){return y},ae:function(){return f},q3:function(){return o}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class c{constructor(F){Mn(this,g,void 0);zn(this,g,F)}async getCredentials(F){const D=new URL(F.url),x=st(this,g).find(w=>w.isUrlSupported(D));if(!x)throw new Error(`No auth provider available for '${F.url}', see https://backstage.io/link?scm-auth`);return x.getCredentials(F)}}g=new WeakMap;const $=class{constructor(F,D,x,w){Mn(this,E,void 0);Mn(this,S,void 0);Mn(this,b,void 0);Mn(this,O,void 0);zn(this,E,D),zn(this,S,x),zn(this,b,w),zn(this,O,F)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:F,gitlab:D,azure:x,bitbucket:w})=>$.merge($.forGithub(F),$.forGitlab(D),$.forAzure(x),$.forBitbucket(w))})}static forAuthApi(F,D){return new $("generic",F,D.host,D.scopeMapping)}static forGithub(F,D){var w;const x=(w=D==null?void 0:D.host)!=null?w:"github.com";return new $("github",F,x,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(F,D){var w;const x=(w=D==null?void 0:D.host)!=null?w:"gitlab.com";return new $("gitlab",F,x,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(F,D){var w;const x=(w=D==null?void 0:D.host)!=null?w:"dev.azure.com";return new $("azure",F,x,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(F,D){var w;const x=(w=D==null?void 0:D.host)!=null?w:"bitbucket.org";return new $("bitbucket",F,x,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...F){return new c(F)}isUrlSupported(F){return F.host===st(this,S)}getAdditionalScopesForProvider(F){var D,x;return!(F!=null&&F.customScopes)||st(this,O)==="generic"?[]:(x=(D=F.customScopes)==null?void 0:D[st(this,O)])!=null?x:[]}async getCredentials(F){const{url:D,additionalScope:x,...w}=F,k=st(this,b).default.slice();x!=null&&x.repoWrite&&k.push(...st(this,b).repoWrite);const re=this.getAdditionalScopesForProvider(x);re.length&&k.push(...re);const le=[...new Set(k)],Re=await st(this,E).getAccessToken(le,w);return{token:Re,headers:{Authorization:`Bearer ${Re}`}}}};let i=$;E=new WeakMap,S=new WeakMap,b=new WeakMap,O=new WeakMap;var R=e(68370);class f{static fromConfig(F){return R.Lx.fromConfig(F)}}const o=(0,r.createApiRef)({id:"integration.scmintegrations"});var u=e(73250),m=e(2784);const y=B=>{var k;const{type:F}=B,D=(0,r.useApp)(),x=u.Z,w=F&&(k=D.getSystemIcon(F))!=null?k:x;return m.createElement(w,null)}},68370:function(te,s,e){var Yt,hn,Jt,qt,rn,an,Bt;"use strict";e.d(s,{Lx:function(){return Ft},Pb:function(){return Xt}});var r=e(82717),t=e.n(r),c=e(76635);function i(M){const h=new URL("http://example.com");return h.host=M,h.host===M}function R(M){try{return new URL(M),!0}catch{return!1}}function f(M,h){return{list(){return M},byUrl(C){try{const L=typeof C=="string"?new URL(C):C;return M.find(V=>h(V)===L.host)}catch{return}},byHost(C){return M.find(L=>h(L)===C)}}}function o(M){const{url:h,base:C,lineNumber:L}=M;try{return new URL(h),h}catch{}let V;if(h.startsWith("/")){const{filepath:he}=t()(C);V=new URL(C);const ge=(0,c.trimEnd)(V.pathname.substring(0,V.pathname.length-he.length),"/");V.pathname=`${ge}${h}`}else V=new URL(h,C);return V.search=new URL(C).search,L&&(V.hash=`L${L}`),V.toString()}const u="amazonaws.com";function m(M){var Wt;const h=M.getOptionalString("endpoint"),C=(Wt=M.getOptionalBoolean("s3ForcePathStyle"))!=null?Wt:!1;let L,V;if(h){try{const pn=new URL(h);L=pn.host,V=pn.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${h}' is not a valid URL`)}if(V!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${h}'`)}else L=u;const he=M.getOptionalString("accessKeyId"),ge=M.getOptionalString("secretAccessKey"),Le=M.getOptionalString("roleArn"),Xe=M.getOptionalString("externalId");return{host:L,endpoint:h,s3ForcePathStyle:C,accessKeyId:he,secretAccessKey:ge,roleArn:Le,externalId:Xe}}function y(M){const h=M.map(m);return h.some(C=>C.host===u)||h.push({host:u}),h}const yt=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(h){this.integrationConfig=h}resolveUrl(h){return o(h)}resolveEditUrl(h){return h}};let g=yt;X(g,"factory",({config:h})=>{var L;const C=y((L=h.getOptionalConfigArray("integrations.awsS3"))!=null?L:[]);return f(C.map(V=>new yt(V)),V=>V.config.host)});const E="GB",It=class{constructor(h,C,L,V,he,ge){Mn(this,Yt,void 0);Mn(this,hn,void 0);Mn(this,Jt,void 0);Mn(this,qt,void 0);Mn(this,rn,void 0);Mn(this,an,void 0);Mn(this,Bt,(...h)=>{const C=new URL(st(this,Yt));return C.pathname=h.map(L=>encodeURIComponent(L)).join("/"),C});zn(this,Yt,h),zn(this,hn,C),zn(this,Jt,L),zn(this,qt,V),zn(this,rn,he),zn(this,an,ge)}static fromRepoUrl(h){var pn;const C=new URL(h);let L,V,he;const ge=C.pathname.split("/").map(kn=>decodeURIComponent(kn));if(ge[2]==="_git"?(L=ge[1],V=he=ge[3]):ge[3]==="_git"?(L=ge[1],V=ge[2],he=ge[4]):ge[4]==="_git"&&(L=`${ge[1]}/${ge[2]}`,V=ge[3],he=ge[5]),!L||!V||!he)throw new Error("Azure URL must point to a git repository");const Le=(pn=C.searchParams.get("path"))!=null?pn:void 0;let Xe;const Wt=C.searchParams.get("version");if(Wt){if(Wt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Xe=Wt.slice(2)}return new It(C.origin,L,V,he,Le,Xe)}toRepoUrl(){let h;return st(this,Jt)===st(this,qt)?h=st(this,Bt).call(this,st(this,hn),"_git",st(this,qt)):h=st(this,Bt).call(this,st(this,hn),st(this,Jt),"_git",st(this,qt)),st(this,rn)&&h.searchParams.set("path",st(this,rn)),st(this,an)&&h.searchParams.set("version",E+st(this,an)),h.toString()}toFileUrl(){if(!st(this,rn))throw new Error("Azure URL must point to a specific path to be able to download a file");const h=st(this,Bt).call(this,st(this,hn),st(this,Jt),"_apis","git","repositories",st(this,qt),"items");return h.searchParams.set("api-version","6.0"),h.searchParams.set("path",st(this,rn)),st(this,an)&&h.searchParams.set("version",st(this,an)),h.toString()}toArchiveUrl(){const h=st(this,Bt).call(this,st(this,hn),st(this,Jt),"_apis","git","repositories",st(this,qt),"items");return h.searchParams.set("recursionLevel","full"),h.searchParams.set("download","true"),h.searchParams.set("api-version","6.0"),st(this,rn)&&h.searchParams.set("scopePath",st(this,rn)),st(this,an)&&h.searchParams.set("version",st(this,an)),h.toString()}toCommitsUrl(){const h=st(this,Bt).call(this,st(this,hn),st(this,Jt),"_apis","git","repositories",st(this,qt),"commits");return h.searchParams.set("api-version","6.0"),st(this,an)&&h.searchParams.set("searchCriteria.itemVersion.version",st(this,an)),h.toString()}getOwner(){return st(this,hn)}getProject(){return st(this,Jt)}getRepo(){return st(this,qt)}getPath(){return st(this,rn)}getRef(){return st(this,an)}};let S=It;Yt=new WeakMap,hn=new WeakMap,Jt=new WeakMap,qt=new WeakMap,rn=new WeakMap,an=new WeakMap,Bt=new WeakMap;const b="dev.azure.com";function O(M){var L;const h=(L=M.getOptionalString("host"))!=null?L:b,C=M.getOptionalString("token");if(!i(h))throw new Error(`Invalid Azure integration config, '${h}' is not a valid host`);return{host:h,token:C}}function $(M){const h=M.map(O);return h.some(C=>C.host===b)||h.push({host:b}),h}const cn=class{constructor(h){this.integrationConfig=h}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){var V;const{url:C,base:L}=h;if(R(C))return C;try{const he=S.fromRepoUrl(L),ge=new URL(L),Le=new URL(`https://a.com${(V=he.getPath())!=null?V:""}`),Xe=new URL(C,Le).pathname;return ge.searchParams.set("path",Xe),h.lineNumber&&(ge.searchParams.set("line",String(h.lineNumber)),ge.searchParams.set("lineEnd",String(h.lineNumber+1)),ge.searchParams.set("lineStartColumn","1"),ge.searchParams.set("lineEndColumn","1")),ge.toString()}catch{return new URL(C,L).toString()}}resolveEditUrl(h){return h}};let B=cn;X(B,"factory",({config:h})=>{var L;const C=$((L=h.getOptionalConfigArray("integrations.azure"))!=null?L:[]);return f(C.map(V=>new cn(V)),V=>V.config.host)});var F=e(48834).lW;function D(M){return AzureUrl.fromRepoUrl(M).toFileUrl()}function x(M){return AzureUrl.fromRepoUrl(M).toArchiveUrl()}function w(M){return AzureUrl.fromRepoUrl(M).toCommitsUrl()}function k(M,h){const C=h?{...h}:{};if(M.token){const L=F.from(`:${M.token}`,"utf8");C.Authorization=`Basic ${L.toString("base64")}`}return{headers:C}}const re="bitbucket.org",le="https://api.bitbucket.org/2.0";function Re(M){var ge;const h=(ge=M.getOptionalString("host"))!=null?ge:re;let C=M.getOptionalString("apiBaseUrl");const L=M.getOptionalString("token"),V=M.getOptionalString("username"),he=M.getOptionalString("appPassword");if(!i(h))throw new Error(`Invalid Bitbucket integration config, '${h}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):h===re?C=le:C=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:C,token:L,username:V,appPassword:he}}function xe(M){const h=M.map(Re);return h.some(C=>C.host===re)||h.push({host:re,apiBaseUrl:le}),h}const Sn=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const C=o(h);if(!h.lineNumber)return C;const L=new URL(C);return this.integrationConfig.host==="bitbucket.org"?L.hash=`lines-${h.lineNumber}`:L.hash=`${h.lineNumber}`,L.toString()}resolveEditUrl(h){const C=t()(h),L=new URL(h);return L.searchParams.set("mode","edit"),L.searchParams.set("spa","0"),L.searchParams.set("at",C.ref),L.toString()}};let De=Sn;X(De,"factory",({config:h})=>{var L,V,he;const C=xe((he=h.getOptionalConfigArray("integrations.bitbucket"))!=null?he:[...(L=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?L:[],...(V=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?V:[]]);return f(C.map(ge=>new Sn(ge)),ge=>ge.config.host)});var je=e(96279),ve=e(48834).lW;async function Je(M,h){const{name:C,owner:L,resource:V}=parseGitUrl(M),he=V==="bitbucket.org";let ge=he?`${h.apiBaseUrl}/repositories/${L}/${C}`:`${h.apiBaseUrl}/projects/${L}/repos/${C}/default-branch`,Le=await fetch(ge,At(h));if(Le.status===404&&!he&&(ge=`${h.apiBaseUrl}/projects/${L}/repos/${C}/branches/default`,Le=await fetch(ge,At(h))),!Le.ok){const Wt=`Failed to retrieve default branch from ${ge}, ${Le.status} ${Le.statusText}`;throw new Error(Wt)}let Xe;if(he)Xe=(await Le.json()).mainbranch.name;else{const{displayId:Wt}=await Le.json();Xe=Wt}if(!Xe)throw new Error(`Failed to read default branch from ${ge}. Response ${Le.status} ${Le.json()}`);return Xe}async function nt(M,h){const{name:C,owner:L,ref:V,protocol:he,resource:ge,filepath:Le}=parseGitUrl(M),Xe=ge==="bitbucket.org";let Wt=V;Wt||(Wt=await Je(M,h));const pn=Le?`&path=${encodeURIComponent(decodeURIComponent(Le))}`:"";return Xe?`${he}://${ge}/${L}/${C}/get/${Wt}.tar.gz`:`${h.apiBaseUrl}/projects/${L}/repos/${C}/archive?format=tgz&at=${Wt}&prefix=${L}-${C}${pn}`}function Tt(M,h){try{const{owner:C,name:L,ref:V,filepathtype:he,filepath:ge}=parseGitUrl(M);if(!C||!L||he!=="browse"&&he!=="raw"&&he!=="src")throw new Error("Invalid Bitbucket URL or file path");const Le=ge.replace(/^\//,"");if(h.host==="bitbucket.org"){if(!V)throw new Error("Invalid Bitbucket URL or file path");return`${h.apiBaseUrl}/repositories/${C}/${L}/src/${V}/${Le}`}return`${h.apiBaseUrl}/projects/${C}/repos/${L}/raw/${Le}?at=${V}`}catch(C){throw new Error(`Incorrect URL: ${M}, ${C}`)}}function At(M){const h={};if(M.token)h.Authorization=`Bearer ${M.token}`;else if(M.username&&M.appPassword){const C=ve.from(`${M.username}:${M.appPassword}`,"utf8");h.Authorization=`Basic ${C.toString("base64")}`}return{headers:h}}const Ie="bitbucket.org",ht="https://api.bitbucket.org/2.0";function gt(M){const h=Ie,C=ht,L=M.getString("username"),V=M.getString("appPassword");return{host:h,apiBaseUrl:C,username:L,appPassword:V}}function lt(M){const h=M.map(gt);return h.length===0&&h.push({host:Ie,apiBaseUrl:ht}),h}const on=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const C=o(h);if(h.lineNumber){const L=new URL(C);return L.hash=`lines-${h.lineNumber}`,L.toString()}return C}resolveEditUrl(h){const C=t()(h),L=new URL(h);return L.searchParams.set("mode","edit"),L.searchParams.set("at",C.ref),L.toString()}};let _=on;X(_,"factory",({config:h})=>{var L;const C=lt((L=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?L:[]);return f(C.map(V=>new on(V)),V=>V.config.host)});var pe=e(48834).lW;async function be(M,h){const{name:C,owner:L}=parseGitUrl(M),V=`${h.apiBaseUrl}/repositories/${L}/${C}`,he=await fetch(V,at(h));if(!he.ok){const Xe=`Failed to retrieve default branch from ${V}, ${he.status} ${he.statusText}`;throw new Error(Xe)}const Le=(await he.json()).mainbranch.name;if(!Le)throw new Error(`Failed to read default branch from ${V}. Response ${he.status} ${he.json()}`);return Le}async function We(M,h){const{name:C,owner:L,ref:V,protocol:he,resource:ge}=parseGitUrl(M);let Le=V;return Le||(Le=await be(M,h)),`${he}://${ge}/${L}/${C}/get/${Le}.tar.gz`}function tt(M,h){try{const{owner:C,name:L,ref:V,filepathtype:he,filepath:ge}=parseGitUrl(M);if(!C||!L||he!=="src"&&he!=="raw")throw new Error("Invalid Bitbucket Cloud URL or file path");const Le=ge.replace(/^\//,"");if(!V)throw new Error("Invalid Bitbucket Cloud URL or file path");return`${h.apiBaseUrl}/repositories/${C}/${L}/src/${V}/${Le}`}catch(C){throw new Error(`Incorrect URL: ${M}, ${C}`)}}function at(M){const h={};if(M.username&&M.appPassword){const C=pe.from(`${M.username}:${M.appPassword}`,"utf8");h.Authorization=`Basic ${C.toString("base64")}`}return{headers:h}}function Et(M){const h=M.getString("host");let C=M.getOptionalString("apiBaseUrl");const L=M.getOptionalString("token"),V=M.getOptionalString("username"),he=M.getOptionalString("password");if(!i(h))throw new Error(`Invalid Bitbucket Server integration config, '${h}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):C=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:C,token:L,username:V,password:he}}function se(M){return M.map(Et)}const Rn=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const C=o(h);if(h.lineNumber){const L=new URL(C);return L.hash=h.lineNumber.toString(),L.toString()}return C}resolveEditUrl(h){return h.includes("?")?h.substring(0,h.indexOf("?")):h}};let ae=Rn;X(ae,"factory",({config:h})=>{var L;const C=se((L=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?L:[]);return f(C.map(V=>new Rn(V)),V=>V.config.host)});var Ye=e(48834).lW;async function Ge(M,h){const{name:C,owner:L}=parseGitUrl(M);let V=`${h.apiBaseUrl}/projects/${L}/repos/${C}/default-branch`,he=await fetch(V,Y(h));if(he.status===404&&(V=`${h.apiBaseUrl}/projects/${L}/repos/${C}/branches/default`,he=await fetch(V,Y(h))),!he.ok){const Xe=`Failed to retrieve default branch from ${V}, ${he.status} ${he.statusText}`;throw new Error(Xe)}const{displayId:ge}=await he.json(),Le=ge;if(!Le)throw new Error(`Failed to read default branch from ${V}. Response ${he.status} ${he.json()}`);return Le}async function $e(M,h){const{name:C,owner:L,ref:V,filepath:he}=parseGitUrl(M);let ge=V;ge||(ge=await Ge(M,h));const Le=he?`&path=${encodeURIComponent(decodeURIComponent(he))}`:"";return`${h.apiBaseUrl}/projects/${L}/repos/${C}/archive?format=tgz&at=${ge}&prefix=${L}-${C}${Le}`}function rt(M,h){try{const{owner:C,name:L,ref:V,filepathtype:he,filepath:ge}=parseGitUrl(M);if(!C||!L||he!=="browse"&&he!=="raw"&&he!=="src")throw new Error("Invalid Bitbucket Server URL or file path");const Le=ge.replace(/^\//,"");return`${h.apiBaseUrl}/projects/${C}/repos/${L}/raw/${Le}?at=${V}`}catch(C){throw new Error(`Incorrect URL: ${M}, ${C}`)}}function Y(M){const h={};if(M.token&&(h.Authorization=`Bearer ${M.token}`),M.username&&M.password){const C=Ye.from(`${M.username}:${M.password}`,"utf8");h.Authorization=`Basic ${C.toString("base64")}`}return{headers:h}}function z(M){const h=M.getString("host");let C=M.getOptionalString("baseUrl"),L=M.getOptionalString("cloneUrl"),V=M.getOptionalString("gitilesBaseUrl");const he=M.getOptionalString("username"),ge=M.getOptionalString("password");if(i(h)){if(C&&!R(C))throw new Error(`Invalid Gerrit integration config, '${C}' is not a valid baseUrl`);if(L&&!R(L))throw new Error(`Invalid Gerrit integration config, '${L}' is not a valid cloneUrl`);if(V&&!R(V))throw new Error(`Invalid Gerrit integration config, '${V}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${h}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):C=`https://${h}`,V?V=(0,c.trimEnd)(V,"/"):V=`https://${h}`,L?L=(0,c.trimEnd)(L,"/"):L=C,{host:h,baseUrl:C,cloneUrl:L,gitilesBaseUrl:V,username:he,password:ge}}function q(M){return M.map(z)}var ce=e(48834).lW;const fe=")]}'";function Pe(M,h){const L=h.replace(M.gitilesBaseUrl,"").split("/").filter(Wt=>!!Wt),V=L.indexOf("+");if(V<=0)throw new Error(`Unable to parse project from url: ${h}`);const he=(0,c.trimStart)(L.slice(0,V).join("/"),"/"),ge=L.indexOf("heads");if(ge<=0)throw new Error(`Unable to parse branch from url: ${h}`);const Le=L[ge+1],Xe=L.slice(ge+2).join("/");return{branch:Le,filePath:Xe===""?"/":Xe,project:he}}function Oe(M,h,C,L){return`${M.gitilesBaseUrl}/${h}/+/refs/heads/${C}/${(0,c.trimStart)(L,"/")}`}function Se(M){return M.password?"/a/":"/"}function Qe(M,h){const{branch:C,project:L}=Pe(M,h);return`${M.baseUrl}${Se(M)}projects/${encodeURIComponent(L)}/branches/${C}`}function Ke(M,h){const{project:C}=Pe(M,h);return`${M.cloneUrl}${Se(M)}${C}`}function pt(M,h){const{branch:C,filePath:L,project:V}=Pe(M,h);return`${M.baseUrl}${Se(M)}projects/${encodeURIComponent(V)}/branches/${C}/files/${encodeURIComponent(L)}/content`}function St(M){return`${M.baseUrl}${Se(M)}projects/`}function ut(M){const h={};if(!M.password)return h;const C=ce.from(`${M.username}:${M.password}`,"utf8");return h.Authorization=`Basic ${C.toString("base64")}`,{headers:h}}async function Dt(M){const h=await M.text();if(h.startsWith(fe))try{return JSON.parse(h.slice(fe.length))}catch(C){throw new Error(`Invalid response from Gerrit: ${h.slice(0,10)} - ${C}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${h.slice(0,10)}`)}const Cn=class{constructor(h){this.integrationConfig=h}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const{url:C,base:L,lineNumber:V}=h;let he;if(C.startsWith("/")){const{branch:ge,project:Le}=Pe(this.config,L);return Oe(this.config,Le,ge,C)}return C?he=new URL(C,L):he=new URL(L),V&&(he.hash=V.toString()),he.toString()}resolveEditUrl(h){return h}};let Ot=Cn;X(Ot,"factory",({config:h})=>{var L;const C=q((L=h.getOptionalConfigArray("integrations.gerrit"))!=null?L:[]);return f(C.map(V=>new Cn(V)),V=>V.config.host)});const bt="github.com",Pt="https://api.github.com",Nt="https://raw.githubusercontent.com";function Zt(M){var ge,Le;const h=(ge=M.getOptionalString("host"))!=null?ge:bt;let C=M.getOptionalString("apiBaseUrl"),L=M.getOptionalString("rawBaseUrl");const V=M.getOptionalString("token"),he=(Le=M.getOptionalConfigArray("apps"))==null?void 0:Le.map(Xe=>({appId:Xe.getNumber("appId"),clientId:Xe.getString("clientId"),clientSecret:Xe.getString("clientSecret"),webhookSecret:Xe.getString("webhookSecret"),privateKey:Xe.getString("privateKey"),allowedInstallationOwners:Xe.getOptionalStringArray("allowedInstallationOwners")}));if(!i(h))throw new Error(`Invalid GitHub integration config, '${h}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):h===bt&&(C=Pt),L?L=(0,c.trimEnd)(L,"/"):h===bt&&(L=Nt),{host:h,apiBaseUrl:C,rawBaseUrl:L,token:V,apps:he}}function mn(M){const h=M.map(Zt);return h.some(C=>C.host===bt)||h.push({host:bt,apiBaseUrl:Pt,rawBaseUrl:Nt}),h}function On(M,h,C){try{const{owner:L,name:V,ref:he,filepathtype:ge,filepath:Le}=parseGitUrl(M);if(!L||!V||!he||ge!=="blob"&&ge!=="raw"&&ge!=="tree")throw new Error("Invalid GitHub URL or file path");const Xe=Le.replace(/^\//,"");return Ut(h,C)==="api"?`${h.apiBaseUrl}/repos/${L}/${V}/contents/${Xe}?ref=${he}`:`${h.rawBaseUrl}/${L}/${V}/${he}/${Xe}`}catch(L){throw new Error(`Incorrect URL: ${M}, ${L}`)}}function kt(M,h){const C={};return Ut(M,h)==="api"&&(C.Accept="application/vnd.github.v3.raw"),h.token&&(C.Authorization=`token ${h.token}`),{headers:C}}function Ut(M,h){return M.apiBaseUrl&&(h.token||!M.rawBaseUrl)?"api":"raw"}var _e=e(55912);class ue{constructor(){X(this,"tokenCache",new Map);X(this,"isNotExpired",h=>h.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(h,C){const L=this.tokenCache.get(h);if(L&&this.isNotExpired(L.expiresAt))return{accessToken:L.token};const V=await C();return this.tokenCache.set(h,V),{accessToken:V.token}}}const j={Accept:"application/vnd.github.machine-man-preview+json"};class ye{constructor(h,C){X(this,"appClient");X(this,"baseUrl");X(this,"baseAuthConfig");X(this,"cache",new ue);X(this,"allowedInstallationOwners");this.allowedInstallationOwners=h.allowedInstallationOwners,this.baseUrl=C,this.baseAuthConfig={appId:h.appId,privateKey:h.privateKey.replace(/\\n/gm,`
|
|
31
|
-
`)},this.appClient=new Octokit({baseUrl:C,headers:j,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(h,C){var ge;const{installationId:L,suspended:V}=await this.getInstallationData(h);if(this.allowedInstallationOwners&&!((ge=this.allowedInstallationOwners)!=null&&ge.includes(h)))return{accessToken:void 0};if(V)throw new Error(`The GitHub application for ${h} is suspended`);const he=C?`${h}/${C}`:h;return this.cache.getOrCreateToken(he,async()=>{var Xe;const Le=await this.appClient.apps.createInstallationAccessToken({installation_id:L,headers:j});if(C&&Le.data.repository_selection==="selected"){const Wt=new Octokit({baseUrl:this.baseUrl,auth:Le.data.token}),pn=await Wt.paginate(Wt.apps.listReposAccessibleToInstallation);if(!((Xe=pn.repositories)!=null?Xe:pn).some(mr=>mr.name===C))throw new Error(`The Backstage GitHub application used in the ${h} organization does not have access to a repository with the name ${C}`)}return{token:Le.data.token,expiresAt:DateTime.fromISO(Le.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(h){const L=(await this.getInstallations()).find(he=>{var ge,Le;return((Le=(ge=he.account)==null?void 0:ge.login)==null?void 0:Le.toLocaleLowerCase("en-US"))===h.toLocaleLowerCase("en-US")});if(L)return{installationId:L.id,suspended:Boolean(L.suspended_by)};const V=new Error(`No app installation found for ${h} in ${this.baseAuthConfig.appId}`);throw V.name="NotFoundError",V}}class Ve{constructor(h){X(this,"apps");var C,L;this.apps=(L=(C=h.apps)==null?void 0:C.map(V=>new ye(V,h.apiBaseUrl)))!=null?L:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(C=>C.getInstallations()))).flat():[]}async getAppToken(h,C){if(this.apps.length===0)return;const L=await Promise.all(this.apps.map(Le=>Le.getInstallationCredentials(h,C).then(Xe=>({credentials:Xe,error:void 0}),Xe=>({credentials:void 0,error:Xe})))),V=L.find(Le=>Le.credentials);if(V)return V.credentials.accessToken;const ge=L.map(Le=>Le.error).find(Le=>Le.name!=="NotFoundError");if(ge)throw ge}}class et{constructor(h,C){this.githubAppCredentialsMux=h,this.token=C}async getCredentials(h){const C=parseGitUrl(h.url),L=C.owner||C.name,V=C.owner?C.name:void 0;let he="app",ge=await this.githubAppCredentialsMux.getAppToken(L,V);return ge||(he="token",ge=this.token),{headers:ge?{Authorization:`Bearer ${ge}`}:void 0,token:ge,type:he}}}X(et,"create",null);class it{static fromIntegrations(h){const C=new Map;return h.github.list().forEach(L=>{const V=SingleInstanceGithubCredentialsProvider.create(L.config);C.set(L.config.host,V)}),new it(C)}constructor(h){this.providers=h}async getCredentials(h){const C=new URL(h.url),L=this.providers.get(C.host);if(!L)throw new Error(`There is no GitHub integration that matches ${h.url}. Please add a configuration for an integration.`);return L.getCredentials(h)}}const xn=class{constructor(h){this.integrationConfig=h}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return Xt(o(h),"tree")}resolveEditUrl(h){return Xt(h,"edit")}};let Rt=xn;X(Rt,"factory",({config:h})=>{var L;const C=mn((L=h.getOptionalConfigArray("integrations.github"))!=null?L:[]);return f(C.map(V=>new xn(V)),V=>V.config.host)});function Xt(M,h){return M.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(C,L,V,he)=>`//${L}/${V}/${he}/${h}/`)}const en="gitlab.com",tn="https://gitlab.com/api/v4";function En(M){const h=M.getString("host");let C=M.getOptionalString("apiBaseUrl");const L=M.getOptionalString("token");let V=M.getOptionalString("baseUrl");if(C?C=(0,c.trimEnd)(C,"/"):h===en&&(C=tn),V?V=(0,c.trimEnd)(V,"/"):V=`https://${h}`,i(h)){if(!C||!R(C))throw new Error(`Invalid GitLab integration config, '${C}' is not a valid apiBaseUrl`);if(!R(V))throw new Error(`Invalid GitLab integration config, '${V}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${h}' is not a valid host`);return{host:h,token:L,apiBaseUrl:C,baseUrl:V}}function U(M){const h=M.map(En);return h.some(C=>C.host===en)||h.push({host:en,apiBaseUrl:tn,baseUrl:`https://${en}`}),h}function oe(M){let h="";return M.host!==en&&(h=new URL(M.baseUrl).pathname),trimEnd(h,"/")}var ne=e(10179);async function Ae(M,h){if(M.includes("/-/blob/")){const C=await zt(M,h);return ze(M,C,h).toString()}return ft(M).toString()}function Ue(M){const{token:h=""}=M;return{headers:{"PRIVATE-TOKEN":h}}}function ft(M){try{const h=new URL(M),C=h.pathname.split("/").filter(Boolean),L=C.indexOf("blob",2);if(L<2||L===C.length-1)throw new InputError("Wrong GitLab URL");const V=C.slice(0,L),he=C.slice(L+1);if(!he.join("/").match(/\.(yaml|yml)$/))throw new InputError("Wrong GitLab URL");return h.pathname=[...V,"raw",...he].join("/"),h}catch(h){throw new InputError(`Incorrect url: ${M}, ${h}`)}}function ze(M,h,C){try{const L=new URL(M),V=L.pathname.split("/-/blob/")[1],[he,...ge]=V.split("/"),Le=getGitLabIntegrationRelativePath(C);return L.pathname=[...Le?[Le]:[],"api/v4/projects",h,"repository/files",encodeURIComponent(decodeURIComponent(ge.join("/"))),"raw"].join("/"),L.search=`?ref=${he}`,L}catch(L){throw new Error(`Incorrect url: ${M}, ${L}`)}}async function zt(M,h){const C=new URL(M);if(!C.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{let L=C.pathname.split("/-/blob/")[0];const V=getGitLabIntegrationRelativePath(h);V&&(L=L.replace(V,""));const he=new URL(`${C.origin}${V}/api/v4/projects/${encodeURIComponent(L.replace(/^\//,""))}`),ge=await fetch(he.toString(),Ue(h)),Le=await ge.json();if(!ge.ok)throw new Error(`GitLab Error '${Le.error}', ${Le.error_description}`);return Number(Le.id)}catch(L){throw new Error(`Could not get GitLab project ID for: ${M}, ${L}`)}}const wn=class{constructor(h){this.integrationConfig=h}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return o(h)}resolveEditUrl(h){return Vt(h,"edit")}};let jt=wn;X(jt,"factory",({config:h})=>{var L;const C=U((L=h.getOptionalConfigArray("integrations.gitlab"))!=null?L:[]);return f(C.map(V=>new wn(V)),V=>V.config.host)});function Vt(M,h){return M.replace(/\/\-\/(blob|tree|edit)\//,`/-/${h}/`)}class Ft{constructor(h){X(this,"byType");this.byType=h}static fromConfig(h){return new Ft({awsS3:g.factory({config:h}),azure:B.factory({config:h}),bitbucket:De.factory({config:h}),bitbucketCloud:_.factory({config:h}),bitbucketServer:ae.factory({config:h}),gerrit:Ot.factory({config:h}),github:Rt.factory({config:h}),gitlab:jt.factory({config:h})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get bitbucketCloud(){return this.byType.bitbucketCloud}get bitbucketServer(){return this.byType.bitbucketServer}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}list(){return Object.values(this.byType).flatMap(h=>h.list())}byUrl(h){let C=Object.values(this.byType).map(L=>L.byUrl(h)).filter(Boolean);if(C.length>1){const L=C.filter(V=>!(V instanceof De));L.length!==0&&(C=L)}return C[0]}byHost(h){return Object.values(this.byType).map(C=>C.byHost(h)).find(Boolean)}resolveUrl(h){const C=this.byUrl(h.base);return C?C.resolveUrl(h):o(h)}resolveEditUrl(h){const C=this.byUrl(h);return C?C.resolveEditUrl(h):h}}},90775:function(te,s,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return R.plugin}});var t=e(2784),c=e(47093),i=e(10289),R=e(82250),f=e(56338),o=e(49208),u=e(36964),m=e(68099);const y=[(0,u.createApiFactory)({api:u.discoveryApiRef,deps:{configApi:u.configApiRef},factory:({configApi:I})=>o.UrlPatternDiscovery.compile(`${I.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,u.createApiFactory)({api:u.alertApiRef,deps:{},factory:()=>new o.AlertApiForwarder}),(0,u.createApiFactory)({api:u.analyticsApiRef,deps:{},factory:()=>new o.NoOpAnalyticsApi}),(0,u.createApiFactory)({api:u.errorApiRef,deps:{alertApi:u.alertApiRef},factory:({alertApi:I})=>{const K=new o.ErrorAlerter(I,new o.ErrorApiForwarder);return o.UnhandledErrorForwarder.forward(K,{hidden:!1}),K}}),(0,u.createApiFactory)({api:u.storageApiRef,deps:{errorApi:u.errorApiRef},factory:({errorApi:I})=>o.WebStorage.create({errorApi:I})}),(0,u.createApiFactory)({api:u.fetchApiRef,deps:{configApi:u.configApiRef,identityApi:u.identityApiRef,discoveryApi:u.discoveryApiRef},factory:({configApi:I,identityApi:K,discoveryApi:de})=>(0,o.createFetchApi)({middleware:[o.FetchMiddlewares.resolvePluginProtocol({discoveryApi:de}),o.FetchMiddlewares.injectIdentityAuth({identityApi:K,config:I})]})}),(0,u.createApiFactory)({api:u.oauthRequestApiRef,deps:{},factory:()=>new o.OAuthRequestManager}),(0,u.createApiFactory)({api:u.googleAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:K,configApi:de})=>o.GoogleAuth.create({discoveryApi:I,oauthRequestApi:K,environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.microsoftAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:K,configApi:de})=>o.MicrosoftAuth.create({discoveryApi:I,oauthRequestApi:K,environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.githubAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:K,configApi:de})=>o.GithubAuth.create({discoveryApi:I,oauthRequestApi:K,defaultScopes:["read:user"],environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oktaAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:K,configApi:de})=>o.OktaAuth.create({discoveryApi:I,oauthRequestApi:K,environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.gitlabAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:K,configApi:de})=>o.GitlabAuth.create({discoveryApi:I,oauthRequestApi:K,environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oneloginAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:K,configApi:de})=>o.OneLoginAuth.create({discoveryApi:I,oauthRequestApi:K,environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.bitbucketAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:K,configApi:de})=>o.BitbucketAuth.create({discoveryApi:I,oauthRequestApi:K,defaultScopes:["team"],environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.atlassianAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:K,configApi:de})=>o.AtlassianAuth.create({discoveryApi:I,oauthRequestApi:K,environment:de.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:m.RV,deps:{discovery:u.discoveryApiRef,identity:u.identityApiRef,config:u.configApiRef},factory:({config:I,discovery:K,identity:de})=>m.iM.create({config:I,discovery:K,identity:de})})];var g=e(77277),E=e(82339),S=e(62833);function b({children:I}){return(0,i.GV)()?t.createElement(t.Fragment,null,I):t.createElement(i.VA,null,I)}const O=()=>t.createElement(E.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),$=({step:I,error:K})=>{let de="";return I==="load-config"?de=`The configuration failed to load, someone should have a look at this error: ${K.message}`:I==="load-chunk"&&(de=`Lazy loaded chunk failed to load, try to reload the page: ${K.message}`),t.createElement(b,null,t.createElement(E.ErrorPage,{status:"501",statusMessage:de}))},B=({error:I,resetError:K,plugin:de})=>t.createElement(E.ErrorPanel,{title:`Error in ${de==null?void 0:de.getId()}`,defaultExpanded:!0,error:I},t.createElement(g.Z,{variant:"outlined",onClick:K},"Retry")),F={Progress:E.Progress,Router:S.VK,NotFoundErrorPage:O,BootErrorPage:$,ErrorBoundaryFallback:B};var D=e(43642),x=e(80079),w=e(90941),k=e(32915),re=e(40562),le=e(21853),Re=e(60744),xe=e(66569),De=e(30254),je=e(13384),ve=e(15933),Je=e(58838),nt=e(86737),Tt=e(4989),At=e(44407),Ie=e(18628),ht=e(84219),gt=e(98685),lt=e(39781);const _={brokenImage:x.Z,catalog:Ie.Z,scaffolder:k.Z,techdocs:re.Z,search:le.Z,chat:Re.Z,dashboard:xe.Z,docs:De.Z,email:je.Z,github:Je.Z,group:ht.Z,help:nt.Z,"kind:api":ve.Z,"kind:component":At.Z,"kind:domain":D.Z,"kind:group":ht.Z,"kind:location":Tt.Z,"kind:system":w.Z,"kind:user":gt.Z,user:gt.Z,warning:lt.Z};var pe=e(73689),be=e(48032);const We={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")`},tt={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"],greens:["#4BB8A5","#187656"]};function at(I){var dt;const{colors:K,shape:de,options:Be}=I,mt=`linear-gradient(90deg, ${(K.length===1?[K[0],K[0]]:K).join(", ")})`,vt=`${de}, ${mt}`,xt=(dt=Be==null?void 0:Be.fontColor)!=null?dt:"#FFFFFF";return{colors:K,shape:de,backgroundImage:vt,fontColor:xt}}const Et={home:at({colors:tt.teal,shape:We.wave}),documentation:at({colors:tt.pinkSea,shape:We.wave2}),tool:at({colors:tt.purpleSky,shape:We.round}),service:at({colors:tt.marineBlue,shape:We.wave}),website:at({colors:tt.veryBlue,shape:We.wave}),library:at({colors:tt.rubyRed,shape:We.wave}),other:at({colors:tt.darkGrey,shape:We.wave}),app:at({colors:tt.toastyOrange,shape:We.wave}),apis:at({colors:tt.teal,shape:We.wave2}),card:at({colors:tt.greens,shape:We.wave})},se=16,ae='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function Ye(I){const{palette:K,htmlFontSize:de=se,fontFamily:Be=ae,defaultPageTheme:qe,pageTheme:mt=Et}=I;if(!mt[qe])throw new Error(`${qe} is not defined in pageTheme.`);return{palette:K,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{htmlFontSize:de,fontFamily:Be,h6:{fontWeight:700,fontSize:20,marginBottom:2},h5:{fontWeight:700,fontSize:24,marginBottom:4},h4:{fontWeight:700,fontSize:28,marginBottom:6},h3:{fontSize:32,fontWeight:700,marginBottom:6},h2:{fontSize:40,fontWeight:700,marginBottom:8},h1:{fontSize:54,fontWeight:700,marginBottom:10}},page:mt[qe],getPageTheme:({themeId:vt})=>{var xt;return(xt=mt[vt])!=null?xt:mt[qe]}}}function Ge(I){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:I.typography.fontFamily},body:{height:"100%",fontFamily:I.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:I.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:I.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:I.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:I.spacing(1.5,2,1.5,2.5)},head:{wordBreak:"break-word",overflow:"hidden",color:"rgb(179, 179, 179)",fontWeight:"normal",lineHeight:"1"}},MuiTabs:{root:{minHeight:24}},MuiTab:{root:{color:I.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,be.darken)(I.palette.link,.3),background:(0,be.lighten)(I.palette.link,.95)},[I.breakpoints.up("md")]:{minWidth:120,fontSize:I.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:I.palette.link}},MuiTableSortLabel:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"}},active:{fontWeight:"bold",color:"inherit"}},MuiListItemText:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},MuiButton:{text:{padding:void 0}},MuiChip:{root:{backgroundColor:"#D9D9D9",marginRight:I.spacing(1),marginBottom:I.spacing(1),color:I.palette.grey[900]},outlined:{color:I.palette.text.primary},label:{lineHeight:`${I.spacing(2.5)}px`,fontWeight:I.typography.fontWeightMedium,fontSize:`${I.spacing(1.75)}px`},labelSmall:{fontSize:`${I.spacing(1.5)}px`},deleteIcon:{color:I.palette.grey[500],width:`${I.spacing(3)}px`,height:`${I.spacing(3)}px`,margin:`0 ${I.spacing(.75)}px 0 -${I.spacing(.75)}px`},deleteIconSmall:{width:`${I.spacing(2)}px`,height:`${I.spacing(2)}px`,margin:`0 ${I.spacing(.5)}px 0 -${I.spacing(.5)}px`}},MuiCard:{root:{display:"flex",flexDirection:"column"}},MuiCardHeader:{root:{paddingBottom:0}},MuiCardContent:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}},MuiCardActions:{root:{justifyContent:"flex-end"}}}}function $e(I){const K=Ye(I),de=(0,pe.Z)(K),Be=Ge(de);return{...de,overrides:Be}}var rt=e(34505);const Y=$e({palette:{type:"light",background:{default:"#F8F8F8"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#2E77D0",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#2E77D0"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#000000",textVerySubtle:"#DDD",textSubtle:"#6E6E6E",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#2196F3",link:"#0A6EBE",gold:rt.Z.A700,navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:Et}),z=$e({palette:{type:"dark",background:{default:"#333333"},status:{ok:"#71CF88",warning:"#FFB84D",error:"#F84C55",running:"#3488E3",pending:"#FEF071",aborted:"#9E9E9E"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#9CC9FF",dark:"#82BAFD"},secondary:{main:"#FF88B2"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#FFFFFF",textVerySubtle:"#727272",textSubtle:"#CCCCCC",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#82BAFD",link:"#9CC9FF",gold:rt.Z.A700,navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:Et});var q=e(98192),ce=e(15222),fe=e(41547),Pe=e(87561);const Oe=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(ce.Z,null),Provider:({children:I})=>t.createElement(fe.Z,{theme:Y},t.createElement(Pe.ZP,null,I))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(q.Z,null),Provider:({children:I})=>t.createElement(fe.Z,{theme:z},t.createElement(Pe.ZP,null,I))}];function Se(I){var K,de,Be;return(0,o.createSpecializedApp)({...I,apis:(K=I==null?void 0:I.apis)!=null?K:[],bindRoutes:I==null?void 0:I.bindRoutes,components:{...F,...I==null?void 0:I.components},configLoader:I==null?void 0:I.configLoader,defaultApis:y,icons:{..._,...I==null?void 0:I.icons},plugins:(de=I==null?void 0:I.plugins)!=null?de:[],themes:(Be=I==null?void 0:I.themes)!=null?Be:Oe})}var Qe=e(82394),Ke=e.n(Qe),pt=e(48023),St=e(76635);async function ut({storageApi:I}){var mt;const K=I.forBucket("settings"),de=I.forBucket("starredEntities"),Be=K.snapshot("starredEntities").value;if(!(0,St.isArray)(Be))return;const qe=new Set((mt=de.snapshot("entityRefs").value)!=null?mt:[]);Be.filter(St.isString).map(vt=>vt.split(":")).filter(vt=>vt.length===4&&vt[0]==="entity").map(([vt,xt,dt,Gt])=>(0,pt.eE)({kind:xt,namespace:dt,name:Gt})).forEach(vt=>qe.add(vt)),await de.set("entityRefs",Array.from(qe)),await K.remove("starredEntities")}class Dt{constructor(K){X(this,"settingsStore");X(this,"starredEntities");X(this,"subscribers",new Set);X(this,"observable",new(Ke())(K=>(K.next(new Set(this.starredEntities)),this.subscribers.add(K),()=>{this.subscribers.delete(K)})));var de;ut(K).then(),this.settingsStore=K.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((de=this.settingsStore.snapshot("entityRefs").value)!=null?de:[]),this.settingsStore.observe$("entityRefs").subscribe({next:Be=>{var qe;this.starredEntities=new Set((qe=Be.value)!=null?qe:[]),this.notifyChanges()}})}async toggleStarred(K){this.starredEntities.has(K)?this.starredEntities.delete(K):this.starredEntities.add(K),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const K of this.subscribers)K.next(new Set(this.starredEntities))}}var Ot=e(39398),bt=e(49782),Pt=e(79692),Nt=e(74450);const Zt=(0,Pt.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function mn(I){var mt,vt;const K=I.result,de=Zt(),Be=useAnalytics(),qe=()=>{Be.captureEvent("discover",K.title,{attributes:{to:K.location},value:I.rank})};return React.createElement(Link,{noTrack:!0,to:K.location,onClick:qe},React.createElement(ListItem,{alignItems:"flex-start"},I.icon&&React.createElement(ListItemIcon,null,I.icon),React.createElement("div",{className:de.flexContainer},React.createElement(ListItemText,{className:de.itemText,primaryTypographyProps:{variant:"h6"},primary:(mt=I.highlight)!=null&&mt.fields.title?React.createElement(HighlightedSearchResultText,{text:I.highlight.fields.title,preTag:I.highlight.preTag,postTag:I.highlight.postTag}):K.title,secondary:(vt=I.highlight)!=null&&vt.fields.text?React.createElement(HighlightedSearchResultText,{text:I.highlight.fields.text,preTag:I.highlight.preTag,postTag:I.highlight.postTag}):K.text}),React.createElement(Box,null,K.kind&&React.createElement(Chip,{label:`Kind: ${K.kind}`,size:"small"}),K.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${K.lifecycle}`,size:"small"})))),React.createElement(Divider,{component:"li"}))}var On=e(30097),kt=e(17429),Ut=e(95544),_e=e(99688),ue=e(12231),j=e(86136),ye=e(49378),Ve=e(85256),et=e(61837),it=e(79784),Rt=e(50758),Xt=e(31654),en=e(43054),tn=e(40749);const En="catalog-entity",U=(0,tn.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:En}),oe=(0,tn.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),ne=(0,tn.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:En}),Ae=(0,tn.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:En}),Ue=(0,tn.J$)({name:"catalog.location.read",attributes:{action:"read"}}),ft=(0,tn.J$)({name:"catalog.location.create",attributes:{action:"create"}}),ze=(0,tn.J$)({name:"catalog.location.delete",attributes:{action:"delete"}});var zt=e(49166);function jt(I){var dt;const{unregisterEntityOptions:K,isUnregisterAllowed:de,onUnregisterEntity:Be,onClose:qe}=I,mt=typeof(K==null?void 0:K.disableUnregister)=="boolean",vt=(dt=!de||(mt?!!(K!=null&&K.disableUnregister):(K==null?void 0:K.disableUnregister)==="disable"))!=null?dt:!1;let xt=t.createElement(t.Fragment,null);return(K==null?void 0:K.disableUnregister)!=="hidden"&&(xt=t.createElement(ue.Z,{onClick:()=>{qe(),Be()},disabled:vt},t.createElement(j.Z,null,t.createElement(zt.Z,{fontSize:"small"})),t.createElement(ye.Z,{primary:"Unregister entity"}))),t.createElement(t.Fragment,null,xt)}const Vt=(0,Pt.Z)(I=>({button:{color:I.page.fontColor}}),{name:"PluginCatalogEntityContextMenu"});function Ft(I){const{UNSTABLE_extraContextMenuItems:K,UNSTABLE_contextMenuOptions:de,onUnregisterEntity:Be,onInspectEntity:qe}=I,[mt,vt]=(0,t.useState)(),xt=Vt(),Gt=(0,kt.useEntityPermission)(ne).allowed,A=W=>{vt(W.currentTarget)},T=()=>{vt(void 0)},N=K&&[...K.map(W=>t.createElement(ue.Z,{key:W.title,onClick:()=>{T(),W.onClick()}},t.createElement(j.Z,null,t.createElement(W.Icon,{fontSize:"small"})),t.createElement(ye.Z,{primary:W.title}))),t.createElement(Ve.Z,{key:"the divider is here!"})];return t.createElement(t.Fragment,null,t.createElement(et.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true","aria-expanded":!!mt,role:"button",onClick:A,"data-testid":"menu-button",className:xt.button,id:"long-menu"},t.createElement(en.Z,null)),t.createElement(it.ZP,{open:Boolean(mt),onClose:T,anchorEl:mt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},"aria-labelledby":"long-menu"},t.createElement(Rt.Z,null,N,t.createElement(jt,{unregisterEntityOptions:de,isUnregisterAllowed:Gt,onUnregisterEntity:Be,onClose:T}),t.createElement(ue.Z,{onClick:()=>{T(),qe()}},t.createElement(j.Z,null,t.createElement(Xt.Z,{fontSize:"small"})),t.createElement(ye.Z,{primary:"Inspect entity"})))))}const yt="plugin.catalog.entityLayoutRoute",Yt=()=>null;(0,u.attachComponentData)(Yt,yt,!0),(0,u.attachComponentData)(Yt,"core.gatherMountPoints",!0);function hn(I){const{entity:K,title:de}=I;return t.createElement(Ut.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(Ut.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},de),K&&t.createElement(kt.FavoriteEntity,{entity:K}))}function Jt(I,K,de,Be){var xt,dt,Gt,A,T;const qe=(xt=I!=null?I:Be==null?void 0:Be.kind)!=null?xt:"",mt=(dt=K!=null?K:Be==null?void 0:Be.metadata.namespace)!=null?dt:"";return{headerTitle:`${(T=(A=(Gt=Be==null?void 0:Be.metadata.title)!=null?Gt:de)!=null?A:Be==null?void 0:Be.metadata.name)!=null?T:""}${mt&&mt!==pt.zG?` in ${mt}`:""}`,headerType:(()=>{let N=qe.toLocaleLowerCase("en-US");return Be&&Be.spec&&"type"in Be.spec&&(N+=" \u2014 ",N+=Be.spec.type.toLocaleLowerCase("en-US")),N})()}}function qt(I){var Be;const{entity:K}=I,de=(0,kt.getEntityRelations)(K,pt.S4);return t.createElement(t.Fragment,null,de.length>0&&t.createElement(E.HeaderLabel,{label:"Owner",value:t.createElement(kt.EntityRefLinks,{entityRefs:de,defaultKind:"Group",color:"inherit"})}),((Be=K.spec)==null?void 0:Be.lifecycle)&&t.createElement(E.HeaderLabel,{label:"Lifecycle",value:K.spec.lifecycle}))}const rn=I=>{var Ze,ke,Lt;const{UNSTABLE_extraContextMenuItems:K,UNSTABLE_contextMenuOptions:de,children:Be,NotFoundComponent:qe}=I,{kind:mt,namespace:vt,name:xt}=(0,u.useRouteRefParams)(kt.entityRouteRef),{entity:dt,loading:Gt,error:A}=(0,kt.useAsyncEntity)(),T=(0,i.TH)(),N=(0,u.useElementFilter)(Be,ot=>ot.selectByComponentData({key:yt,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:He})=>{if(dt){if(He.if&&!He.if(dt))return[]}else return[];return[{path:He.path,title:He.title,children:He.children,tabProps:He.tabProps}]}),[dt]),{headerTitle:W,headerType:J}=Jt(mt,vt,xt,dt),[Q,me]=(0,t.useState)(!1),[Ce,Fe]=(0,t.useState)(!1),Me=(0,i.s0)(),Ne=async()=>{me(!1),Fe(!1),Me("/")};return(0,t.useEffect)(()=>{me(!1),Fe(!1)},[T.pathname]),t.createElement(E.Page,{themeId:(Lt=(ke=(Ze=dt==null?void 0:dt.spec)==null?void 0:Ze.type)==null?void 0:ke.toString())!=null?Lt:"home"},t.createElement(E.Header,{title:t.createElement(hn,{title:W,entity:dt}),pageTitleOverride:W,type:J},dt&&t.createElement(t.Fragment,null,t.createElement(qt,{entity:dt}),t.createElement(Ft,{UNSTABLE_extraContextMenuItems:K,UNSTABLE_contextMenuOptions:de,onUnregisterEntity:()=>me(!0),onInspectEntity:()=>Fe(!0)}))),Gt&&t.createElement(E.Progress,null),dt&&t.createElement(E.RoutedTabs,{routes:N}),A&&t.createElement(E.Content,null,t.createElement(_e.Z,{severity:"error"},A.toString())),!Gt&&!A&&!dt&&t.createElement(E.Content,null,qe||t.createElement(E.WarningPanel,{title:"Entity not found"},"There is no ",mt," with the requested"," ",t.createElement(E.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(kt.UnregisterEntityDialog,{open:Q,entity:dt,onConfirm:Ne,onClose:()=>me(!1)}),t.createElement(kt.InspectEntityDialog,{open:Ce,entity:dt,onClose:()=>Fe(!1)}))};rn.Route=Yt;var an=e(10179);function Bt(I){const{open:K,onClose:de,onConfirm:Be,entity:qe}=I,[mt,vt]=useState(!1),xt=useApi(catalogApiRef),dt=useApi(alertApiRef),Gt=async()=>{vt(!0);try{const A=qe.metadata.uid;await xt.removeEntityByUid(A),Be()}catch(A){assertError(A),dt.post({message:A.message})}finally{vt(!1)}};return React.createElement(Dialog,{open:K,onClose:de},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:mt,onClick:Gt},"Delete"),React.createElement(Button,{onClick:de,color:"primary"},"Cancel")))}var It=e(47851);function cn(I){var K,de;return((de=(K=I==null?void 0:I.metadata)==null?void 0:K.annotations)==null?void 0:de["backstage.io/orphan"])==="true"}function Sn(){const I=useNavigate(),K=useRouteRef(rootRouteRef),[de,Be]=useState(!1),{entity:qe}=useEntity(),mt=async()=>{Be(!1),I(K())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>Be(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:de,entity:qe,onConfirm:mt,onClose:()=>Be(!1)}))}var on=e(30001);const Rn=I=>I.error&&I.level==="error"&&I.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function Cn(I,K){return{items:(await K.getEntityAncestors({entityRef:I})).items.map(qe=>{var xt,dt;return{errors:((dt=(xt=qe.entity.status)==null?void 0:xt.items)!=null?dt:[]).filter(Rn).map(Gt=>Gt.error).filter(Gt=>Boolean(Gt)),entity:qe.entity}}).filter(qe=>qe.errors.length>0)}}async function xn(I,K){const de=K.apis.get(catalogApiRef);if(!de)throw new Error(`No implementation available for ${catalogApiRef}`);return(await Cn(stringifyEntityRef(I),de)).items.length>0}function wn(){const{entity:I}=useEntity(),K=stringifyEntityRef(I),de=useApi(catalogApiRef),{loading:Be,error:qe,value:mt}=useAsync(async()=>Cn(K,de),[K,de]);return qe?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:qe})):Be||!mt?null:React.createElement(React.Fragment,null,mt.items.map((vt,xt)=>React.createElement(Box,{key:xt,mb:1},stringifyEntityRef(I)!==stringifyEntityRef(vt.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:vt.entity})),vt.errors.map((dt,Gt)=>React.createElement(ResponseErrorPanel,{key:Gt,error:dt})))))}var M=e(64279);const h="core.backstage.entitySwitch",C=I=>null;(0,u.attachComponentData)(C,h,!0);const L=I=>{var vt,xt;const{entity:K,loading:de}=(0,kt.useAsyncEntity)(),Be=(0,u.useApiHolder)(),qe=(0,u.useElementFilter)(I.children,dt=>dt.selectByComponentData({key:h,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(Gt=>{var N;if(de)return[];const{if:A,children:T}=Gt.props;return K?[{if:(N=A==null?void 0:A(K,{apis:Be}))!=null?N:!0,children:T}]:[{if:A===void 0,children:T}]}),[Be,K,de]);return qe.some(dt=>typeof dt.if=="object"&&"then"in dt.if)?t.createElement(V,{results:qe}):(xt=(vt=qe.find(dt=>dt.if))==null?void 0:vt.children)!=null?xt:null};function V({results:I}){const{loading:K,value:de}=(0,M.default)(async()=>{var qe;const Be=I.map(async({if:mt,children:vt})=>{try{if(await mt)return vt}catch{}return null});return(qe=(await Promise.all(Be)).find(Boolean))!=null?qe:null},[I]);return K||!de?null:de}L.Case=C;const he=null,ge=kt.CatalogFilterLayout.Filters,Le=kt.CatalogFilterLayout.Content,Xe=(0,u.createPlugin)({id:"catalog",apis:[(0,u.createApiFactory)({api:kt.catalogApiRef,deps:{discoveryApi:u.discoveryApiRef,fetchApi:u.fetchApiRef},factory:({discoveryApi:I,fetchApi:K})=>new on.MS({discoveryApi:I,fetchApi:K})}),(0,u.createApiFactory)({api:kt.starredEntitiesApiRef,deps:{storageApi:u.storageApiRef},factory:({storageApi:I})=>new Dt({storageApi:I})})],routes:{catalogIndex:It._Z,catalogEntity:kt.entityRouteRef},externalRoutes:{createComponent:It.yw,viewTechDoc:It.jU},__experimentalConfigure(I){return{...{createButtonTitle:"Create"},...I}}}),Wt=Xe.provide((0,u.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(5162).then(e.bind(e,74036)).then(I=>I.CatalogPage),mountPoint:It._Z})),pn=Xe.provide((0,u.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(I=>I.CatalogEntityPage),mountPoint:kt.entityRouteRef})),kn=Xe.provide((0,u.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(I=>I.AboutCard)}})),fr=Xe.provide((0,u.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(3555).then(e.bind(e,73555)).then(I=>I.EntityLinksCard)}})),mr=Xe.provide((0,u.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(I=>I.HasSystemsCard)}})),hr=Xe.provide((0,u.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(I=>I.HasComponentsCard)}})),Vn=Xe.provide((0,u.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(I=>I.HasSubcomponentsCard)}})),$n=Xe.provide((0,u.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(I=>I.HasResourcesCard)}})),tr=Xe.provide((0,u.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(I=>I.DependsOnComponentsCard)}})),gr=Xe.provide((0,u.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(I=>I.DependencyOfComponentsCard)}})),Or=Xe.provide((0,u.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(I=>I.DependsOnResourcesCard)}})),la=Xe.provide((0,u.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(I=>I.RelatedEntitiesCard)}}));var nr=e(36356);class xr{constructor({configApi:K,discoveryApi:de,identityApi:Be}){X(this,"configApi");X(this,"discoveryApi");X(this,"identityApi");this.configApi=K,this.discoveryApi=de,this.identityApi=Be}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(K,de){const qe=`${await this.getApiOrigin()}/${de}`,mt=await fetch(`${qe.endsWith("/")?qe:`${qe}/`}index.html`);if(mt.status===404)throw new Error("Page not found");return mt.text()}async syncEntityDocs(K){return"cached"}async getBaseUrl(K,de,Be){const qe=await this.getApiOrigin();return new URL(K,`${qe}/${Be}`).toString()}}class Dr{constructor({configApi:K,discoveryApi:de,identityApi:Be}){X(this,"configApi");X(this,"discoveryApi");X(this,"identityApi");this.configApi=K,this.discoveryApi=de,this.identityApi=Be}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(K){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(K){return{site_name:"Live preview environment",site_description:""}}}const lr=[(0,u.createApiFactory)({api:f.Dl,deps:{configApi:u.configApiRef,discoveryApi:u.discoveryApiRef,identityApi:u.identityApiRef},factory:({configApi:I,discoveryApi:K,identityApi:de})=>new xr({configApi:I,discoveryApi:K,identityApi:de})}),(0,u.createApiFactory)({api:f.gT,deps:{configApi:u.configApiRef,discoveryApi:u.discoveryApiRef,identityApi:u.identityApiRef},factory:({configApi:I,discoveryApi:K,identityApi:de})=>new Dr({configApi:I,discoveryApi:K,identityApi:de})}),(0,u.createApiFactory)({api:nr.q3,deps:{configApi:u.configApiRef},factory:({configApi:I})=>nr.ae.fromConfig(I)})],Un={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},rr={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function ar(){const I=await fetch("/.detect");return I.ok?(await I.text()).trim()==="techdocs-cli-server":!1}async function Gr(){const I=await(0,o.defaultConfigLoader)(),K=await ar();return[...I,{context:"detected",data:K?Un:rr}]}var pr=e(86689),yr=e(58845);const Kr=(0,Pt.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var cr=()=>{const I=Kr();return t.createElement("svg",{className:I.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:I.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"}))};const Fr=(0,Pt.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Er=()=>{const I=Fr();return t.createElement("svg",{className:I.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:I.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"}))};const Br=(0,Pt.Z)({root:{width:E.sidebarConfig.drawerWidthClosed,height:3*E.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:E.sidebarConfig.drawerWidthClosed,marginLeft:24}}),Mr=()=>{const I=Br(),{isOpen:K}=(0,E.useSidebarOpenState)();return t.createElement("div",{className:I.root},t.createElement(pr.Z,{component:S.OL,to:"/docs/default/component/local/",underline:"none",className:I.link},K?t.createElement(cr,null):t.createElement(Er,null)))},wr=({children:I})=>t.createElement(E.SidebarPage,null,t.createElement(E.Sidebar,null,t.createElement(Mr,null),t.createElement(E.SidebarDivider,null),t.createElement(E.SidebarItem,{icon:yr.Z,to:"/docs/default/component/local",text:"Docs Preview"})),I);var vr=e(80030),$r=e(32388),Ar=e(4142);const yn=(0,Pt.Z)(I=>({headerIcon:{color:I.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:I.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var un;(function(I){const K="light";I.LIGHT=K;const de="dark";I.DARK=de})(un||(un={}));const Yn=()=>{const I=(0,u.useApi)(u.appThemeApiRef),K=yn(),[de,Be]=(0,t.useState)(I.getActiveThemeId()||un.LIGHT),qe={[un.LIGHT]:{icon:Ar.Z,title:"Dark theme"},[un.DARK]:{icon:$r.Z,title:"Light theme"}},{title:mt,icon:vt}=qe[de],xt=()=>{Be(dt=>{const Gt=dt===un.LIGHT?un.DARK:un.LIGHT;return I.setActiveThemeId(Gt),Gt})};return t.createElement(Ut.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(vr.ZP,{title:mt,arrow:!0},t.createElement(et.Z,{size:"small",onClick:xt},t.createElement(vt,{className:K.headerIcon}))))},Jn=()=>t.createElement(R.TechDocsReaderPage,null,t.createElement(R.TechDocsReaderPageHeader,null),t.createElement(R.TechDocsReaderPageContent,{withSearch:!1})),Ur=t.createElement(Jn,null),Rr=Se({apis:lr,configLoader:Gr,plugins:Object.values(r)}),Nr=Rr.getProvider(),Sr=Rr.getRouter(),Zr=R.techdocsPlugin.provide((0,f.KY)({name:"ThemeToggleAddon",component:Yn,location:f.oZ.Header})),Cr=t.createElement(o.FlatRoutes,null,t.createElement(i.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(i.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(pn,null)}),t.createElement(i.AW,{path:"/docs",element:t.createElement(R.TechDocsIndexPage,null)},t.createElement(R.DefaultTechDocsHome,null)),t.createElement(i.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(R.TechDocsReaderPage,null)},Ur,t.createElement(f.DR,null,t.createElement(Zr,null))));var Jr=()=>t.createElement(Nr,null,t.createElement(Sr,null,t.createElement(wr,null,Cr)));c.render(t.createElement(Jr,null),document.getElementById("root"))},76241:function(te,s,e){"use strict";e.d(s,{CT:function(){return f},EI:function(){return m},uW:function(){return i},Vt:function(){return o}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),c=y=>`__@backstage/${y}__`;function i(y,g){const E=c(y);let S=t[E];return S||(S=g(),t[E]=S,S)}var R=e(2784);function f(y){return i(y,()=>(0,R.createContext)(void 0))}function o(y){return(0,R.useContext)(f(y))}function u(y){return{set(g){globalThis[`__@backstage/${y}__`]=createContext(createVersionedValueMap(g))},reset(){delete globalThis[`__@backstage/${y}__`]}}}function m(y){return Object.freeze(y),{atVersion(g){return y[g]}}}},17429:function(te,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return w},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return F},EntityKindFilter:function(){return q},EntityLifecyclePicker:function(){return En},EntityListProvider:function(){return pe},EntityOwnerPicker:function(){return Ae},EntityProcessingStatusPicker:function(){return dt},EntityRefLink:function(){return Y},EntityRefLinks:function(){return z},EntityTable:function(){return Ft},EntityTagPicker:function(){return Jt},EntityTypePicker:function(){return an},FavoriteEntity:function(){return Rn},InspectEntityDialog:function(){return Ur},UnregisterEntityDialog:function(){return ur},UserListPicker:function(){return qe},catalogApiRef:function(){return c},entityRouteRef:function(){return ae},getEntityRelations:function(){return ht},getEntitySourceLocation:function(){return gt},humanizeEntityRef:function(){return Ge},starredEntitiesApiRef:function(){return i},useAsyncEntity:function(){return le},useEntity:function(){return re},useEntityList:function(){return be},useEntityOwnership:function(){return mn},useEntityPermission:function(){return kt},useRelatedEntities:function(){return Dt},useStarredEntities:function(){return Pt}});var r=e(30001),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.catalog.service"}),i=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var R=e(82394);class f{constructor(){X(this,"starredEntities",new Set);X(this,"subscribers",new Set);X(this,"observable",new ObservableImpl(T=>(T.next(new Set(this.starredEntities)),this.subscribers.add(T),()=>{this.subscribers.delete(T)})))}async toggleStarred(T){this.starredEntities.delete(T)||this.starredEntities.add(T);for(const N of this.subscribers)N.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var o=e(2784),u=e(41156),m=e(60364),y=e(77277),g=e(4190),E=e(95544),S=e(90436),b=e(60905),O=e(36444);const $=A=>{const T=(0,u.Z)(Q=>Q.breakpoints.down("md")),N=(0,m.Z)(),[W,J]=(0,o.useState)(!1);return T?o.createElement(o.Fragment,null,o.createElement(y.Z,{style:{marginTop:N.spacing(1),marginLeft:N.spacing(1)},onClick:()=>J(!0),startIcon:o.createElement(O.Z,null)},"Filters"),o.createElement(g.ZP,{open:W,onClose:()=>J(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},o.createElement(E.Z,{m:2},o.createElement(S.Z,{variant:"h6",component:"h2",style:{marginBottom:N.spacing(1)}},"Filters"),A.children))):o.createElement(b.Z,{item:!0,lg:2},A.children)},B=A=>o.createElement(b.Z,{item:!0,xs:12,lg:10},A.children),F=A=>o.createElement(b.Z,{container:!0,style:{position:"relative"}},A.children);F.Filters=$,F.Content=B;var D=e(76241);const x=(0,D.CT)("entity-context"),w=({children:A,entity:T,loading:N,error:W,refresh:J})=>{const Q={entity:T,loading:N,error:W,refresh:J};return o.createElement(x.Provider,{value:(0,D.EI)({1:Q})},A)},k=A=>React.createElement(w,{entity:A.entity,loading:!Boolean(A.entity),error:void 0,refresh:void 0,children:A.children});function re(){const A=(0,D.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const T=A.atVersion(1);if(!T)throw new Error("EntityContext v1 not available");if(!T.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:T.entity}}function le(){const A=(0,D.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const T=A.atVersion(1);if(!T)throw new Error("EntityContext v1 not available");const{entity:N,loading:W,error:J,refresh:Q}=T;return{entity:N,loading:W,error:J,refresh:Q}}var Re=e(76635),xe=e(19126),De=e.n(xe),je=e(10289),ve=e(69294),Je=e(48760),nt=e(90736);function Tt(A){return A.reduce((T,N)=>({...T,...N.getCatalogFilters?N.getCatalogFilters():{}}),{})}function At(A){return T=>A.every(N=>!N.filterEntity||N.filterEntity(T))}var Ie=e(48023);function ht(A,T,N){var J;let W=((J=A==null?void 0:A.relations)==null?void 0:J.filter(Q=>Q.type===T).map(Q=>(0,Ie.of)(Q.targetRef)))||[];return N!=null&&N.kind&&(W=W.filter(Q=>Q.kind.toLocaleLowerCase("en-US")===N.kind.toLocaleLowerCase("en-US"))),W}function gt(A,T){var W;const N=(W=A.metadata.annotations)==null?void 0:W[Ie.M6];if(!!N)try{const J=(0,Ie.Ou)(N),Q=T.byUrl(J.target);return{locationTargetUrl:J.target,integrationType:Q==null?void 0:Q.type}}catch{return}}function lt(A,T){const N=new Set([...getEntityRelations(A,RELATION_MEMBER_OF,{kind:"group"}),...A?[getCompoundEntityRef(A)]:[]].map(stringifyEntityRef)),W=getEntityRelations(T,RELATION_OWNED_BY).map(stringifyEntityRef);for(const J of W)if(N.has(J))return!0;return!1}const _=(0,o.createContext)(void 0),pe=({children:A})=>{const T=(0,nt.default)(),N=(0,t.useApi)(c),[W,J]=(0,o.useState)({}),Q=(0,je.TH)(),me=(0,o.useMemo)(()=>{var ot;return(ot=De().parse(Q.search,{ignoreQueryPrefix:!0}).filters)!=null?ot:{}},[Q]),[Ce,Fe]=(0,o.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:Me,error:Ne},Ze]=(0,ve.default)(async()=>{var Dn;const ot=(0,Re.compact)(Object.values(W)),He=At(ot),Qt=Tt(ot),gn=Tt((0,Re.compact)(Object.values(Ce.appliedFilters))),Qn=Object.keys(W).reduce((vn,Tn)=>{const Nn=W[Tn];return Nn!=null&&Nn.toQueryValue&&(vn[Tn]=Nn.toQueryValue()),vn},{});if((0,Re.isEqual)(gn,Qt))Fe({appliedFilters:W,backendEntities:Ce.backendEntities,entities:Ce.backendEntities.filter(He)});else{const vn=await N.getEntities({filter:Qt});Fe({appliedFilters:W,backendEntities:vn.items,entities:vn.items.filter(He)})}if(T()){const vn=De().parse(Q.search,{ignoreQueryPrefix:!0}),Tn=De().stringify({...vn,filters:Qn},{addQueryPrefix:!0,arrayFormat:"repeat"}),Nn=`${window.location.pathname}${Tn}`;(Dn=window.history)==null||Dn.replaceState(null,document.title,Nn)}},[N,me,W,Ce],{loading:!0});(0,Je.Z)(Ze,10,[W]);const ke=(0,o.useCallback)(ot=>{J(He=>{const Qt=typeof ot=="function"?ot(He):ot;return{...He,...Qt}})},[]),Lt=(0,o.useMemo)(()=>({filters:Ce.appliedFilters,entities:Ce.entities,backendEntities:Ce.backendEntities,updateFilters:ke,queryParameters:me,loading:Me,error:Ne}),[Ce,ke,me,Me,Ne]);return o.createElement(_.Provider,{value:Lt},A)};function be(){const A=(0,o.useContext)(_);if(!A)throw new Error("useEntityList must be used within EntityListProvider");return A}var We=e(64279),tt=e(18149),at=e.n(tt),Et=e(829),se=e.n(Et);const ae=(0,D.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function Ye(A){var T,N;return{kind:A.kind.toLocaleLowerCase("en-US"),namespace:(N=(T=A.metadata.namespace)==null?void 0:T.toLocaleLowerCase("en-US"))!=null?N:DEFAULT_NAMESPACE,name:A.metadata.name}}function Ge(A,T){const N=T==null?void 0:T.defaultKind;let W,J,Q;return"metadata"in A?(W=A.kind,J=A.metadata.namespace,Q=A.metadata.name):(W=A.kind,J=A.namespace,Q=A.name),J===Ie.zG&&(J=void 0),W=W.toLocaleLowerCase("en-US"),W=N&&N.toLocaleLowerCase("en-US")===W?void 0:W,`${W?`${W}:`:""}${J?`${J}/`:""}${Q}`}var $e=e(82339),rt=e(80030);const Y=(0,o.forwardRef)((A,T)=>{var ot;const{entityRef:N,defaultKind:W,title:J,children:Q,...me}=A,Ce=(0,t.useRouteRef)(ae);let Fe,Me,Ne;if(typeof N=="string"){const He=(0,Ie.of)(N);Fe=He.kind,Me=He.namespace,Ne=He.name}else"metadata"in N?(Fe=N.kind,Me=N.metadata.namespace,Ne=N.metadata.name):(Fe=N.kind,Me=N.namespace,Ne=N.name);Fe=Fe.toLocaleLowerCase("en-US"),Me=(ot=Me==null?void 0:Me.toLocaleLowerCase("en-US"))!=null?ot:Ie.zG;const Ze={kind:Fe,namespace:Me,name:Ne},ke=Ge({kind:Fe,namespace:Me,name:Ne},{defaultKind:W}),Lt=o.createElement($e.Link,{...me,ref:T,to:Ce(Ze)},Q,!Q&&(J!=null?J:ke));return J?o.createElement(rt.ZP,{title:ke},Lt):Lt});function z(A){const{entityRefs:T,defaultKind:N,...W}=A;return o.createElement(o.Fragment,null,T.map((J,Q)=>o.createElement(o.Fragment,{key:Q},Q>0&&", ",o.createElement(Y,{...W,entityRef:J,defaultKind:N}))))}class q{constructor(T){this.value=T}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class ce{constructor(T){this.value=T}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class fe{constructor(T){this.values=T}filterEntity(T){return this.values.every(N=>{var W;return((W=T.metadata.tags)!=null?W:[]).includes(N)})}toQueryValue(){return this.values}}class Pe{constructor(T){this.value=T}filterEntity(T){var W;const N=this.value.toLocaleUpperCase("en-US");return T.metadata.name.toLocaleUpperCase("en-US").includes(N)||`${T.metadata.title}`.toLocaleUpperCase("en-US").includes(N)||((W=T.metadata.tags)==null?void 0:W.join("").toLocaleUpperCase("en-US").indexOf(N))!==-1}}class Oe{constructor(T){this.values=T}filterEntity(T){return this.values.some(N=>ht(T,Ie.S4).some(W=>Ge(W,{defaultKind:"group"})===N))}toQueryValue(){return this.values}}class Se{constructor(T){this.values=T}filterEntity(T){return this.values.some(N=>{var W;return((W=T.spec)==null?void 0:W.lifecycle)===N})}toQueryValue(){return this.values}}class Qe{constructor(T,N,W){this.value=T,this.isOwnedEntity=N,this.isStarredEntity=W}filterEntity(T){switch(this.value){case"owned":return this.isOwnedEntity(T);case"starred":return this.isStarredEntity(T);default:return!0}}toQueryValue(){return this.value}}class Ke{constructor(T){this.value=T}filterEntity(T){var W;const N=(W=T.metadata.annotations)==null?void 0:W["backstage.io/orphan"];return N!==void 0&&this.value.toString()===N}}class pt{constructor(T){this.value=T}filterEntity(T){var W,J;const N=((J=(W=T==null?void 0:T.status)==null?void 0:W.items)==null?void 0:J.length)>0;return N!==void 0&&this.value===N}}function St(){var He;const A=(0,t.useApi)(c),{filters:{kind:T,type:N},queryParameters:{type:W},updateFilters:J}=be(),Q=(0,o.useMemo)(()=>[W].flat().filter(Boolean),[W]),[me,Ce]=(0,o.useState)(Q.length?Q:(He=N==null?void 0:N.getTypes())!=null?He:[]);(0,o.useEffect)(()=>{Q.length&&Ce(Q)},[Q]);const[Fe,Me]=(0,o.useState)([]),Ne=(0,o.useMemo)(()=>T==null?void 0:T.value,[T]),{error:Ze,loading:ke,value:Lt}=(0,We.default)(async()=>Ne?await A.getEntityFacets({filter:{kind:Ne},facets:["spec.type"]}).then(gn=>gn.facets["spec.type"]||[]):[],[Ne,A]),ot=(0,o.useRef)(Lt);return(0,o.useEffect)(()=>{const Qt=ot.current;if(ot.current=Lt,ke||!Ne||Qt===Lt||!Lt)return;const gn=[...new Set(se()(Lt,Dn=>-Dn.count).map(Dn=>Dn.value.toLocaleLowerCase("en-US")))];Me(gn);const Qn=me.filter(Dn=>gn.includes(Dn));at()(me,Qn)||Ce(Qn)},[ke,Ne,me,Ce,Lt]),(0,o.useEffect)(()=>{J({type:me.length?new ce(me):void 0})},[me,J]),{loading:ke,error:Ze,availableTypes:Fe,selectedTypes:me,setSelectedTypes:Ce}}const ut=20;function Dt(A,T){var Fe,Me;const N=(Fe=T==null?void 0:T.type)==null?void 0:Fe.toLocaleLowerCase("en-US"),W=(Me=T==null?void 0:T.kind)==null?void 0:Me.toLocaleLowerCase("en-US"),J=(0,t.useApi)(c),{loading:Q,value:me,error:Ce}=(0,We.default)(async()=>{var ot;const Ne=(ot=A.relations)==null?void 0:ot.map(He=>({type:He.type,target:(0,Ie.of)(He.targetRef)})).filter(He=>(!N||He.type.toLocaleLowerCase("en-US")===N)&&(!W||He.target.kind===W));if(!Ne)return[];const Ze=Object.values((0,Re.groupBy)(Ne,({target:He})=>`${He.kind}:${He.namespace}`.toLocaleLowerCase("en-US"))),ke=[];for(const He of Ze)ke.push({kind:He[0].target.kind,namespace:He[0].target.namespace,nameBatches:(0,Re.chunk)(He.map(Qt=>Qt.target.name),ut)});return(await Promise.all(ke.flatMap(He=>He.nameBatches.map(Qt=>J.getEntities({filter:{kind:He.kind,"metadata.namespace":He.namespace,"metadata.name":Qt}}))))).flatMap(He=>He.items)},[A,N,W]);return{entities:me,loading:Q,error:Ce}}var Ot=e(72164);function bt(A){return typeof A=="string"?A:(0,Ie.eE)(A)}function Pt(){const A=(0,t.useApi)(i),T=(0,Ot.Z)(A.starredEntitie$(),new Set),N=(0,o.useCallback)(J=>T.has(bt(J)),[T]),W=(0,o.useCallback)(J=>A.toggleStarred(bt(J)).then(),[A]);return{starredEntities:T,toggleStarredEntity:W,isStarredEntity:N}}function Nt(A){return typeof A=="string"?A:(0,Ie.eE)(A)}function Zt(A){const T=(0,t.useApi)(i),[N,W]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{const Q=T.starredEntitie$().subscribe({next(me){W(me.has(Nt(A)))}});return()=>{Q.unsubscribe()}},[A,T]),{toggleStarredEntity:(0,o.useCallback)(()=>T.toggleStarred(Nt(A)).then(),[A,T]),isStarredEntity:N}}function mn(){const A=(0,t.useApi)(t.identityApiRef),{loading:T,value:N}=(0,We.default)(async()=>{const{ownershipEntityRefs:J}=await A.getBackstageIdentity();return J},[]),W=(0,o.useMemo)(()=>{const J=new Set(N!=null?N:[]);return Q=>{const me=ht(Q,Ie.S4).map(Ie.eE);for(const Ce of me)if(J.has(Ce))return!0;return!1}},[N]);return(0,o.useMemo)(()=>({loading:T,isOwnedEntity:W}),[T,W])}var On=e(68099);function kt(A){const{entity:T,loading:N,error:W}=le(),{allowed:J,loading:Q,error:me}=(0,On.gI)({permission:A,resourceRef:T?(0,Ie.eE)(T):void 0});return N||Q?{loading:!0,allowed:!1}:W?{loading:!1,allowed:!1,error:W}:{loading:!1,allowed:J,error:me}}const Ut=A=>{var me;const{initialFilter:T,hidden:N}=A,{updateFilters:W,queryParameters:{kind:J}}=useEntityList(),[Q]=useState((me=[J].flat()[0])!=null?me:T);return useEffect(()=>{W({kind:Q?new EntityKindFilter(Q):void 0})},[Q,W]),N?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var _e=e(79692),ue=e(5806),j=e(21324),ye=e(86619),Ve=e(19996),et=e(25505),it=e(38016),Rt=e(88013);const Xt=(0,_e.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),en=o.createElement(et.Z,{fontSize:"small"}),tn=o.createElement(Ve.Z,{fontSize:"small"}),En=()=>{var Me,Ne;const A=Xt(),{updateFilters:T,backendEntities:N,filters:W,queryParameters:{lifecycles:J}}=be(),Q=(0,o.useMemo)(()=>[J].flat().filter(Boolean),[J]),[me,Ce]=(0,o.useState)(Q.length?Q:(Ne=(Me=W.lifecycles)==null?void 0:Me.values)!=null?Ne:[]);(0,o.useEffect)(()=>{Q.length&&Ce(Q)},[Q]),(0,o.useEffect)(()=>{T({lifecycles:me.length?new Se(me):void 0})},[me,T]);const Fe=(0,o.useMemo)(()=>[...new Set(N.map(Ze=>{var ke;return(ke=Ze.spec)==null?void 0:ke.lifecycle}).filter(Boolean))].sort(),[N]);return Fe.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Lifecycle",o.createElement(Rt.ZP,{multiple:!0,options:Fe,value:me,onChange:(Ze,ke)=>Ce(ke),renderOption:(Ze,{selected:ke})=>o.createElement(ue.Z,{control:o.createElement(j.Z,{icon:en,checkedIcon:tn,checked:ke}),label:Ze}),size:"small",popupIcon:o.createElement(it.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:Ze=>o.createElement(ye.Z,{...Ze,className:A.input,variant:"outlined"})}))):null},U=(0,_e.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),oe=o.createElement(et.Z,{fontSize:"small"}),ne=o.createElement(Ve.Z,{fontSize:"small"}),Ae=()=>{var Me,Ne;const A=U(),{updateFilters:T,backendEntities:N,filters:W,queryParameters:{owners:J}}=be(),Q=(0,o.useMemo)(()=>[J].flat().filter(Boolean),[J]),[me,Ce]=(0,o.useState)(Q.length?Q:(Ne=(Me=W.owners)==null?void 0:Me.values)!=null?Ne:[]);(0,o.useEffect)(()=>{Q.length&&Ce(Q)},[Q]),(0,o.useEffect)(()=>{T({owners:me.length?new Oe(me):void 0})},[me,T]);const Fe=(0,o.useMemo)(()=>[...new Set(N.flatMap(Ze=>ht(Ze,Ie.S4).map(ke=>Ge(ke,{defaultKind:"group"}))).filter(Boolean))].sort(),[N]);return Fe.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Owner",o.createElement(Rt.ZP,{multiple:!0,options:Fe,value:me,onChange:(Ze,ke)=>Ce(ke),renderOption:(Ze,{selected:ke})=>o.createElement(ue.Z,{control:o.createElement(j.Z,{icon:oe,checkedIcon:ne,checked:ke}),label:Ze}),size:"small",popupIcon:o.createElement(it.Z,{"data-testid":"owner-picker-expand"}),renderInput:Ze=>o.createElement(ye.Z,{...Ze,className:A.input,variant:"outlined"})}))):null},Ue=(0,_e.Z)(A=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),ft=()=>{var Q,me;const A=Ue(),{filters:T,updateFilters:N}=useEntityList(),[W,J]=useState((me=(Q=T.text)==null?void 0:Q.value)!=null?me:"");return useDebounce(()=>{N({text:W.length?new EntityTextFilter(W):void 0})},250,[W,N]),React.createElement(Toolbar,{className:A.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:A.input,placeholder:"Search",autoComplete:"off",onChange:Ce=>J(Ce.target.value),value:W,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>J(""),edge:"end",disabled:W.length===0},React.createElement(Clear,null)))})))},ze=Object.freeze({createEntityRefColumn(A){const{defaultKind:T}=A;function N(W){var J;return((J=W.metadata)==null?void 0:J.title)||Ge(W,{defaultKind:T})}return{title:"Name",highlight:!0,customFilterAndSearch(W,J){return N(J).includes(W)},customSort(W,J){return N(W).localeCompare(N(J))},render:W=>{var J;return o.createElement(Y,{entityRef:W,defaultKind:T,title:(J=W.metadata)==null?void 0:J.title})}}},createEntityRelationColumn({title:A,relation:T,defaultKind:N,filter:W}){function J(me){return ht(me,T,W)}function Q(me){return J(me).map(Ce=>Ge(Ce,{defaultKind:N})).join(", ")}return{title:A,customFilterAndSearch(me,Ce){return Q(Ce).includes(me)},customSort(me,Ce){return Q(me).localeCompare(Q(Ce))},render:me=>o.createElement(z,{entityRefs:J(me),defaultKind:N})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:Ie.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:Ie.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:Ie.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:A=>o.createElement($e.OverflowTooltip,{text:A.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),zt=[ze.createEntityRefColumn({defaultKind:"system"}),ze.createDomainColumn(),ze.createOwnerColumn(),ze.createMetadataDescriptionColumn()],jt=[ze.createEntityRefColumn({defaultKind:"component"}),ze.createSystemColumn(),ze.createOwnerColumn(),ze.createSpecTypeColumn(),ze.createSpecLifecycleColumn(),ze.createMetadataDescriptionColumn()],Vt=(0,_e.Z)(A=>({empty:{padding:A.spacing(2),display:"flex",justifyContent:"center"}})),Ft=A=>{const{entities:T,title:N,emptyContent:W,variant:J="gridItem",columns:Q}=A,me=Vt(),Ce={minWidth:"0",width:"100%"};return J==="gridItem"&&(Ce.height="calc(100% - 10px)"),o.createElement($e.Table,{columns:Q,title:N,style:Ce,emptyContent:W&&o.createElement("div",{className:me.empty},W),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense",draggable:!1},data:T})};Ft.columns=ze,Ft.systemEntityColumns=zt,Ft.componentEntityColumns=jt;const yt=(0,_e.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),Yt=o.createElement(et.Z,{fontSize:"small"}),hn=o.createElement(Ve.Z,{fontSize:"small"}),Jt=()=>{var Me,Ne;const A=yt(),{updateFilters:T,filters:N,queryParameters:{tags:W}}=be(),J=(0,t.useApi)(c),{value:Q}=(0,We.default)(async()=>{var Lt;const Ze="metadata.tags",{facets:ke}=await J.getEntityFacets({facets:[Ze],filter:(Lt=N.kind)==null?void 0:Lt.getCatalogFilters()});return ke[Ze].map(({value:ot})=>ot)},[N.kind]),me=(0,o.useMemo)(()=>[W].flat().filter(Boolean),[W]),[Ce,Fe]=(0,o.useState)(me.length?me:(Ne=(Me=N.tags)==null?void 0:Me.values)!=null?Ne:[]);return(0,o.useEffect)(()=>{me.length&&Fe(me)},[me]),(0,o.useEffect)(()=>{T({tags:Ce.length?new fe(Ce):void 0})},[Ce,T]),Q!=null&&Q.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Tags",o.createElement(Rt.ZP,{multiple:!0,options:Q,value:Ce,onChange:(Ze,ke)=>Fe(ke),renderOption:(Ze,{selected:ke})=>o.createElement(ue.Z,{control:o.createElement(j.Z,{icon:Yt,checkedIcon:hn,checked:ke}),label:Ze}),size:"small",popupIcon:o.createElement(it.Z,{"data-testid":"tag-picker-expand"}),renderInput:Ze=>o.createElement(ye.Z,{...Ze,className:A.input,variant:"outlined"})}))):null};var qt=e(82108),rn=e.n(qt);const an=A=>{var Me;const{hidden:T,initialFilter:N}=A,W=(0,t.useApi)(t.alertApiRef),{error:J,availableTypes:Q,selectedTypes:me,setSelectedTypes:Ce}=St();if((0,o.useEffect)(()=>{J&&W.post({message:"Failed to load entity types",severity:"error"}),N&&Ce([N])},[J,W,N,Ce]),Q.length===0||J)return null;const Fe=[{value:"all",label:"All"},...Q.map(Ne=>({value:Ne,label:rn()(Ne)}))];return T?null:o.createElement(E.Z,{pb:1,pt:1},o.createElement($e.Select,{label:"Type",items:Fe,selected:(Me=Fe.length>1?me[0]:void 0)!=null?Me:"all",onChange:Ne=>Ce(Ne==="all"?[]:[String(Ne)])}))};var Bt=e(15459),It=e(61837),cn=e(11640),Sn=e(28347);const on=(0,Bt.Z)({root:{color:"#f3ba37"}})(cn.Z),Rn=A=>{const{toggleStarredEntity:T,isStarredEntity:N}=Zt(A.entity);return o.createElement(It.Z,{"aria-label":"favorite",color:"inherit",...A,onClick:()=>T()},o.createElement(rt.ZP,{title:N?"Remove from favorites":"Add to favorites"},N?o.createElement(on,null):o.createElement(Sn.Z,null)))};var Cn=e(8629),xn=e(79249),wn=e(38724),M=e(99152),h=e(6487),C=e(49429),L=e(55999),V=e(72779),he=e.n(V),ge=e(39412);const Le=ge.Z;function Xe(A,T){if(A)return A.toLocaleLowerCase("en-US");if(T)try{return(0,Ie.of)(T).kind.toLocaleLowerCase("en-US")}catch{return}}function Wt(A,T){const N=(0,t.useApp)(),W=Xe(A,T);return W&&N.getSystemIcon(`kind:${W}`)||Le}function pn(A){const{kind:T,entityRef:N,...W}=A,J=Wt(T,N);return o.createElement(J,{...W})}const kn=(0,_e.Z)(A=>({node:{fill:A.palette.grey[300],stroke:A.palette.grey[300],"&.primary":{fill:A.palette.primary.light,stroke:A.palette.primary.light},"&.secondary":{fill:A.palette.secondary.light,stroke:A.palette.secondary.light}},text:{fill:A.palette.getContrastText(A.palette.grey[300]),"&.primary":{fill:A.palette.primary.contrastText},"&.secondary":{fill:A.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function fr(A){const T=(0,t.useApi)(c),N=(0,Ie.eE)(A),{loading:W,error:J,value:Q}=(0,We.default)(async()=>{const me=await T.getEntityAncestors({entityRef:N}),Ce=new Array,Fe=new Array;for(const Me of me.items){const Ne=(0,Ie.eE)(Me.entity),Ze=Ne===me.rootEntityRef;Ce.push({id:Ne,root:Ze,...Me.entity});for(const ke of Me.parentEntityRefs)Fe.push({from:Ne,to:ke})}return{nodes:Ce,edges:Fe}},[N]);return{loading:W,error:J,nodes:(Q==null?void 0:Q.nodes)||[],edges:(Q==null?void 0:Q.edges)||[]}}function mr({node:A}){const T=kn(),N=(0,je.s0)(),W=(0,t.useRouteRef)(ae),[J,Q]=(0,o.useState)(0),[me,Ce]=(0,o.useState)(0),Fe=(0,o.useRef)(null);(0,o.useLayoutEffect)(()=>{if(Fe.current){let{height:Qt,width:gn}=Fe.current.getBBox();Qt=Math.round(Qt),gn=Math.round(gn),(Qt!==me||gn!==J)&&(Q(gn),Ce(Qt))}},[J,me]);const Me=10,Ne=me,Ze=Ne+Me,ke=Ze+J+Me*2,Lt=me+Me*2,ot=A.metadata.title||(A.kind&&A.metadata.name&&A.metadata.namespace?Ge({kind:A.kind,name:A.metadata.name,namespace:A.metadata.namespace||""}):A.id),He=()=>{N(W({kind:A.kind,namespace:A.metadata.namespace||Ie.zG,name:A.metadata.name}))};return o.createElement("g",{onClick:He,className:T.clickable},o.createElement("rect",{className:he()(T.node,A.root?"secondary":"primary"),width:ke,height:Lt,rx:10}),o.createElement(pn,{kind:A.kind,y:Me,x:Me,width:Ne,height:Ne,className:he()(T.text,A.root?"secondary":"primary")}),o.createElement("text",{ref:Fe,className:he()(T.text,A.root?"secondary":"primary"),y:Lt/2,x:Ze+(J+Me*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},ot))}function hr(A){const{loading:T,error:N,nodes:W,edges:J}=fr(A.entity);return T?o.createElement($e.Progress,null):N?o.createElement($e.ResponseErrorPanel,{error:N}):o.createElement(o.Fragment,null,o.createElement(L.Z,{variant:"h2"},"Ancestry"),o.createElement(L.Z,{gutterBottom:!0},"This is the ancestry of entities above the current one - as in, the chain(s) of entities down to the current one, where"," ",o.createElement($e.Link,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity"},"processors emitted")," ","child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations."),o.createElement(E.Z,{mt:4},o.createElement($e.DependencyGraph,{nodes:W,edges:J,renderNode:mr,direction:$e.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var Vn=e(11776),$n=e(38402),tr=e(86136),gr=e(99688),Or=e(49378),la=e(54506),nr=e(94339),xr=e(24579),Dr=e(27685);const lr=(0,_e.Z)(A=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:A.spacing(2)},helpIcon:{marginLeft:A.spacing(1),color:A.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function Un(A){const T=lr();return o.createElement(Or.Z,{...A,primaryTypographyProps:{className:T.monospace},secondaryTypographyProps:{className:T.monospace}})}function rr(A){const T=lr();return o.createElement(la.Z,{className:T.monospace},A.children)}function ar(A){return o.createElement(E.Z,{mt:2},o.createElement(nr.Z,{variant:"outlined"},o.createElement(xr.Z,null,o.createElement(S.Z,{variant:"h6",gutterBottom:!0},A.title,A.helpLink&&o.createElement(yr,{to:A.helpLink})),A.children)))}function Gr(A){if(A.match(/^url:https?:\/\//))return A.slice(4);if(A.match(/^https?:\/\//))return A}function pr(A){const[T,N]=A.entry,W=Gr(N);return o.createElement($n.Z,null,A.indent&&o.createElement(tr.Z,null),o.createElement(Un,{primary:T,secondary:W?o.createElement($e.Link,{to:W},N):N}))}function yr(A){const T=lr();return o.createElement($e.Link,{to:A.to,className:T.helpIcon},o.createElement(Dr.Z,{fontSize:"inherit"}))}const Kr=(0,_e.Z)({root:{display:"flex",flexDirection:"column"}});function kr(A){var Fe,Me;const T=(0,t.useApi)(c),N=(0,Ie.eE)(A),W=(Fe=A.metadata.annotations)==null?void 0:Fe[Ie.P1],J=(Me=A.metadata.annotations)==null?void 0:Me[Ie.q1],{loading:Q,error:me,value:Ce}=(0,We.default)(async()=>!W&&!J?[]:(await T.getEntities({filter:[...W?[{[`metadata.annotations.${Ie.P1}`]:W}]:[],...J?[{[`metadata.annotations.${Ie.q1}`]:J}]:[]]})).items,[W,J]);return{loading:Q,error:me,location:W,originLocation:J,colocatedEntities:Ce==null?void 0:Ce.filter(Ne=>(0,Ie.eE)(Ne)!==N)}}function cr(A){return o.createElement(Vn.Z,{dense:!0},A.header&&o.createElement(pr,{key:"header",entry:A.header}),A.entities.map(T=>o.createElement($n.Z,{key:(0,Ie.eE)(T)},o.createElement(tr.Z,null,o.createElement(pn,{kind:T.kind})),o.createElement(Un,{primary:o.createElement(Y,{entityRef:T})}))))}function Fr(A){const{entity:T}=A,{loading:N,error:W,location:J,originLocation:Q,colocatedEntities:me}=kr(T);if(N)return o.createElement($e.Progress,null);if(W)return o.createElement($e.ResponseErrorPanel,{error:W});if(!J&&!Q)return o.createElement(gr.Z,{severity:"warning"},"Entity had no location information.");if(!(me!=null&&me.length))return o.createElement(gr.Z,{severity:"info"},"There were no other entities on this location.");if(J===Q)return o.createElement(cr,{entities:me});const Ce=me.filter(Me=>{var Ne;return((Ne=Me.metadata.annotations)==null?void 0:Ne[Ie.P1])===J}),Fe=me.filter(Me=>{var Ne;return((Ne=Me.metadata.annotations)==null?void 0:Ne[Ie.q1])===Q});return o.createElement(o.Fragment,null,Ce.length>0&&o.createElement(cr,{entities:Ce,header:["At the same location",J]}),Fe.length>0&&o.createElement(cr,{entities:Fe,header:["At the same origin",Q]}))}function Yr(A){const T=Kr();return o.createElement(o.Fragment,null,o.createElement(L.Z,{variant:"h2"},"Colocated"),o.createElement(L.Z,null,"These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL)."),o.createElement("div",{className:T.root},o.createElement(Fr,{entity:A.entity})))}function Er(A){return Object.fromEntries([...Object.entries(A)].sort((T,N)=>T[0]<N[0]?-1:1))}function Br(A){return o.createElement(o.Fragment,null,o.createElement(L.Z,{variant:"h2"},"Entity as JSON"),o.createElement(L.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),o.createElement(L.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement($e.CodeSnippet,{text:JSON.stringify(Er(A.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var Mr=e(3440),wr=e.n(Mr);const vr=(0,_e.Z)({root:{display:"flex",flexDirection:"column"}});function $r(A){var Me,Ne;const T=vr(),{apiVersion:N,kind:W,metadata:J,spec:Q,relations:me=[],status:Ce={}}=A.entity,Fe=wr()(se()(me,Ze=>Ze.targetRef),"type");return o.createElement(o.Fragment,null,o.createElement(L.Z,{variant:"h2"},"Overview"),o.createElement("div",{className:T.root},o.createElement(ar,{title:"Identity"},o.createElement(Vn.Z,{dense:!0},o.createElement($n.Z,null,o.createElement(Un,{primary:"apiVersion",secondary:N})),o.createElement($n.Z,null,o.createElement(Un,{primary:"kind",secondary:W})),(Q==null?void 0:Q.type)&&o.createElement($n.Z,null,o.createElement(Un,{primary:"spec.type",secondary:Q.type})),J.uid&&o.createElement($n.Z,null,o.createElement(Un,{primary:"uid",secondary:J.uid})),J.etag&&o.createElement($n.Z,null,o.createElement(Un,{primary:"etag",secondary:J.etag})))),o.createElement(ar,{title:"Metadata"},!!Object.keys(J.annotations||{}).length&&o.createElement(Vn.Z,{dense:!0,subheader:o.createElement(rr,null,"Annotations",o.createElement(yr,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(J.annotations).map(Ze=>o.createElement(pr,{key:Ze[0],indent:!0,entry:Ze}))),!!Object.keys(J.labels||{}).length&&o.createElement(Vn.Z,{dense:!0,subheader:o.createElement(rr,null,"Labels")},Object.entries(J.labels).map(Ze=>o.createElement(pr,{key:Ze[0],indent:!0,entry:Ze}))),!!((Me=J.tags)!=null&&Me.length)&&o.createElement(Vn.Z,{dense:!0,subheader:o.createElement(rr,null,"Tags")},J.tags.map((Ze,ke)=>o.createElement($n.Z,{key:`${Ze}-${ke}`},o.createElement(tr.Z,null),o.createElement(Un,{primary:Ze}))))),!!me.length&&o.createElement(ar,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Fe).map(([Ze,ke],Lt)=>o.createElement("div",{key:Lt},o.createElement(Vn.Z,{dense:!0,subheader:o.createElement(rr,null,Ze)},ke.map(ot=>o.createElement($n.Z,{key:ot.targetRef},o.createElement(tr.Z,null,o.createElement(pn,{entityRef:ot.targetRef})),o.createElement(Un,{primary:o.createElement(Y,{entityRef:ot.targetRef})}))))))),!!((Ne=Ce.items)!=null&&Ne.length)&&o.createElement(ar,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},Ce.items.map((Ze,ke)=>o.createElement("div",{key:ke},o.createElement(S.Z,null,Ze.level,": ",Ze.type),o.createElement(E.Z,{ml:2},Ze.message))))))}var Ar=e(72847);function yn(A){return o.createElement(o.Fragment,null,o.createElement(L.Z,{variant:"h2"},"Entity as YAML"),o.createElement(L.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),o.createElement(L.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement($e.CodeSnippet,{text:Ar.ZP.stringify(Er(A.entity)),language:"yaml",showCopyCodeButton:!0}))))}const un=(0,_e.Z)(A=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:A.palette.background.paper},tabs:{borderRight:`1px solid ${A.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function Yn(A){const{children:T,value:N,index:W,...J}=A,Q=un();return o.createElement("div",{role:"tabpanel",hidden:N!==W,id:`vertical-tabpanel-${W}`,"aria-labelledby":`vertical-tab-${W}`,className:Q.tabContents,...J},N===W&&o.createElement(E.Z,{pl:3,pr:3},T))}function Jn(A){return{id:`vertical-tab-${A}`,"aria-controls":`vertical-tabpanel-${A}`}}function Ur(A){const T=un(),[N,W]=o.useState(0);return(0,o.useEffect)(()=>{W(0)},[A.open]),A.entity?o.createElement(Cn.Z,{fullWidth:!0,maxWidth:"xl",open:A.open,onClose:A.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:T.fullHeightDialog}},o.createElement(xn.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),o.createElement(wn.Z,{dividers:!0},o.createElement("div",{className:T.root},o.createElement(M.Z,{orientation:"vertical",variant:"scrollable",value:N,onChange:(J,Q)=>W(Q),"aria-label":"Inspector options",className:T.tabs},o.createElement(h.Z,{label:"Overview",...Jn(0)}),o.createElement(h.Z,{label:"Ancestry",...Jn(1)}),o.createElement(h.Z,{label:"Colocated",...Jn(2)}),o.createElement(h.Z,{label:"Raw JSON",...Jn(3)}),o.createElement(h.Z,{label:"Raw YAML",...Jn(4)})),o.createElement(Yn,{value:N,index:0},o.createElement($r,{entity:A.entity})),o.createElement(Yn,{value:N,index:1},o.createElement(hr,{entity:A.entity})),o.createElement(Yn,{value:N,index:2},o.createElement(Yr,{entity:A.entity})),o.createElement(Yn,{value:N,index:3},o.createElement(Br,{entity:A.entity})),o.createElement(Yn,{value:N,index:4},o.createElement(yn,{entity:A.entity})))),o.createElement(C.Z,null,o.createElement(y.Z,{onClick:A.onClose,color:"primary"},"Close"))):null}var Rr=e(85256);function Nr(A){var Lt;const T=(0,t.useApi)(c),N=(Lt=A.metadata.annotations)==null?void 0:Lt[Ie.q1],W=A.metadata.uid,J=N==="bootstrap:bootstrap",Q=(0,We.default)(async()=>{const ot=T.getLocationByRef(N);let He;if(!N)He=Promise.resolve([]);else{const Qt=`metadata.annotations.${Ie.q1}`;He=T.getEntities({filter:{[Qt]:N},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(gn=>gn.items)}return Promise.all([ot,He]).then(([Qt,gn])=>({location:Qt,colocatedEntities:gn}))},[T,A]),me=(0,o.useCallback)(async function(){const{location:He}=Q.value;await T.removeLocationById(He.id)},[T,Q]),Ce=(0,o.useCallback)(async function(){await T.removeEntityByUid(W)},[T,W]);if(J)return{type:"bootstrap",location:N,deleteEntity:Ce};const{loading:Fe,error:Me,value:Ne}=Q;if(Fe)return{type:"loading"};if(Me)return{type:"error",error:Me};const{location:Ze,colocatedEntities:ke}=Ne;return Ze?{type:"unregister",location:N,colocatedEntities:ke.map(Ie.iB),unregisterLocation:me,deleteEntity:Ce}:{type:"only-delete",deleteEntity:Ce}}var Sr=e(10179);const Zr=(0,_e.Z)({advancedButton:{fontSize:"0.7em"}}),Cr=({entity:A,onConfirm:T})=>{var Lt;const N=(0,t.useApi)(t.alertApiRef),W=(0,t.useApi)(t.configApiRef),J=Zr(),Q=Nr(A),[me,Ce]=(0,o.useState)(!1),[Fe,Me]=(0,o.useState)(!1),Ne=(Lt=W.getOptionalString("app.title"))!=null?Lt:"Backstage",Ze=(0,o.useCallback)(async function(){if("unregisterLocation"in Q){Me(!0);try{await Q.unregisterLocation(),T()}catch(He){(0,Sr.BD)(He),N.post({message:He.message})}finally{Me(!1)}}},[N,T,Q]),ke=(0,o.useCallback)(async function(){if("deleteEntity"in Q){Me(!0);try{await Q.deleteEntity(),T()}catch(He){(0,Sr.BD)(He),N.post({message:He.message})}finally{Me(!1)}}},[N,T,Q]);return Q.type==="loading"?o.createElement($e.Progress,null):Q.type==="error"?o.createElement($e.ResponseErrorPanel,{error:Q.error}):Q.type==="bootstrap"?o.createElement(o.Fragment,null,o.createElement(gr.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',Q.location,'"). If you believe this is in error, please contact the ',Ne," ","integrator."),o.createElement(E.Z,{marginTop:2},!me&&o.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:J.advancedButton,onClick:()=>Ce(!0)},"Advanced Options"),me&&o.createElement(o.Fragment,null,o.createElement(L.Z,null,"You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."),o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Fe,onClick:ke},"Delete Entity")))):Q.type==="only-delete"?o.createElement(o.Fragment,null,o.createElement(L.Z,null,"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog."),o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Fe,onClick:ke},"Delete Entity")):Q.type==="unregister"?o.createElement(o.Fragment,null,o.createElement(L.Z,null,"This action will unregister the following entities:"),o.createElement(L.Z,{component:"ul"},Q.colocatedEntities.map(ot=>o.createElement("li",{key:`${ot.kind}:${ot.namespace}/${ot.name}`},o.createElement(Y,{entityRef:ot})))),o.createElement(L.Z,null,"Located at the following location:"),o.createElement(L.Z,{component:"ul"},o.createElement("li",null,Q.location)),o.createElement(L.Z,null,"To undo, just re-register the entity in ",Ne,"."),o.createElement(E.Z,{marginTop:2},o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Fe,onClick:Ze},"Unregister Location"),!me&&o.createElement(E.Z,{component:"span",marginLeft:2},o.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:J.advancedButton,onClick:()=>Ce(!0)},"Advanced Options"))),me&&o.createElement(o.Fragment,null,o.createElement(E.Z,{paddingTop:4,paddingBottom:4},o.createElement(Rr.Z,null)),o.createElement(L.Z,null,"You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."),o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Fe,onClick:ke},"Delete Entity"))):o.createElement(gr.Z,{severity:"error"},"Internal error: Unknown state")},ur=A=>{const{open:T,onConfirm:N,onClose:W,entity:J}=A;return o.createElement(Cn.Z,{open:T,onClose:W},o.createElement(xn.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),o.createElement(wn.Z,null,o.createElement(Cr,{entity:J,onConfirm:N})),o.createElement(C.Z,null,o.createElement(y.Z,{onClick:W,color:"primary"},"Cancel")))};var Jr=e(12231),I=e(9520),K=e(47603);const de=(0,_e.Z)(A=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:A.spacing(1,0,1,0)},title:{margin:A.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:A.palette.text.primary},menuItem:{minHeight:A.spacing(6)},groupWrapper:{margin:A.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Be(A){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:K.Z},{id:"starred",label:"Starred",icon:cn.Z}]},{name:A!=null?A:"Company",items:[{id:"all",label:"All"}]}]}const qe=A=>{var Xn;const{initialFilter:T,availableFilters:N}=A,W=de(),Q=(Xn=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?Xn:"Company",{filters:me,updateFilters:Ce,backendEntities:Fe,queryParameters:{kind:Me,user:Ne},loading:Ze}=be(),ke=["starred","all"],Lt=Be(Q).map(bn=>({...bn,items:bn.items.filter(({id:Fn})=>["group","user"].some(Wr=>Wr===Me)?ke.includes(Fn):!N||N.includes(Fn))})).filter(({items:bn})=>!!bn.length),{isStarredEntity:ot}=Pt(),{isOwnedEntity:He,loading:Qt}=mn(),gn=Ze||Qt,Qn=(0,o.useMemo)(()=>new Qe("owned",He,ot),[He,ot]),Dn=(0,o.useMemo)(()=>new Qe("starred",He,ot),[He,ot]),vn=(0,o.useMemo)(()=>[Ne].flat()[0],[Ne]),[Tn,Nn]=(0,o.useState)(vn!=null?vn:T),Tr=(0,o.useMemo)(()=>Fe.filter(At((0,Re.compact)(Object.values({...me,user:void 0})))),[me,Fe]),zr=(0,o.useMemo)(()=>({all:Tr.length,starred:Tr.filter(bn=>Dn.filterEntity(bn)).length,owned:Tr.filter(bn=>Qn.filterEntity(bn)).length}),[Tr,Dn,Qn]);return(0,o.useEffect)(()=>{vn&&Nn(vn)},[vn]),(0,o.useEffect)(()=>{!gn&&!!Tn&&Tn!=="all"&&zr[Tn]===0&&Nn("all")},[gn,zr,Tn,Nn]),(0,o.useEffect)(()=>{Ce({user:Tn?new Qe(Tn,He,ot):void 0})},[Tn,He,ot,Ce]),o.createElement(nr.Z,{className:W.root},Lt.map(bn=>o.createElement(o.Fragment,{key:bn.name},o.createElement(S.Z,{variant:"subtitle2",component:"span",className:W.title},bn.name),o.createElement(nr.Z,{className:W.groupWrapper},o.createElement(Vn.Z,{disablePadding:!0,dense:!0,role:"menu","aria-label":bn.name},bn.items.map(Fn=>{var Wr,ca;return o.createElement(Jr.Z,{role:"none presentation",key:Fn.id,button:!0,divider:!0,onClick:()=>Nn(Fn.id),selected:Fn.id===((Wr=me.user)==null?void 0:Wr.value),className:W.menuItem,disabled:zr[Fn.id]===0,"data-testid":`user-picker-${Fn.id}`,tabIndex:0,ContainerProps:{role:"menuitem"}},Fn.icon&&o.createElement(tr.Z,{className:W.listIcon},o.createElement(Fn.icon,{fontSize:"small"})),o.createElement(Or.Z,null,o.createElement(S.Z,{variant:"body1"},Fn.label," ")),o.createElement(I.Z,null,(ca=zr[Fn.id])!=null?ca:"-"))}))))))},mt=(0,_e.Z)({input:{}},{name:"CatalogReactEntityProcessingStatusPickerPicker"}),vt=o.createElement(et.Z,{fontSize:"small"}),xt=o.createElement(Ve.Z,{fontSize:"small"}),dt=()=>{const A=mt(),{updateFilters:T}=be(),[N,W]=(0,o.useState)([]);function J(Ce){T({orphan:Ce?new Ke(Ce):void 0})}function Q(Ce){T({error:Ce?new pt(Ce):void 0})}const me=["Is Orphan","Has Error"];return o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Processing Status",o.createElement(Rt.ZP,{multiple:!0,options:me,value:N,onChange:(Ce,Fe)=>{W(Fe),J(Fe.includes("Is Orphan")),Q(Fe.includes("Has Error"))},renderOption:(Ce,{selected:Fe})=>o.createElement(ue.Z,{control:o.createElement(j.Z,{icon:vt,checkedIcon:xt,checked:Fe}),label:Ce}),size:"small",popupIcon:o.createElement(it.Z,{"data-testid":"processing-status-picker-expand"}),renderInput:Ce=>o.createElement(ye.Z,{...Ce,className:A.input,variant:"outlined"})})))},Gt=({children:A,value:T})=>{var Ce;const[N,W]=useState((Ce=T==null?void 0:T.filters)!=null?Ce:{}),J=useCallback(Fe=>{W(Me=>{const Ne=typeof Fe=="function"?Fe(Me):Fe;return{...Me,...Ne}})},[]),Q=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),me=useMemo(()=>{var Fe,Me,Ne,Ze,ke;return{entities:(Fe=T==null?void 0:T.entities)!=null?Fe:Q.entities,backendEntities:(Me=T==null?void 0:T.backendEntities)!=null?Me:Q.backendEntities,updateFilters:(Ne=T==null?void 0:T.updateFilters)!=null?Ne:J,filters:N,loading:(Ze=T==null?void 0:T.loading)!=null?Ze:!1,queryParameters:(ke=T==null?void 0:T.queryParameters)!=null?ke:Q.queryParameters,error:T==null?void 0:T.error}},[T,Q,N,J]);return React.createElement(EntityListContext.Provider,{value:me},A)}},39398:function(te,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return De},AboutContent:function(){return Re},AboutField:function(){return w}});var r=e(48023),t=e(82339),c=e(36964),i=e(36356),R=e(17429),f=e(79692),o=e(94339),u=e(32552),m=e(61837),y=e(85256),g=e(24579),E=e(52866),S=e(30254),b=e(27604),O=e(2784),$=e(47851),B=e(60905),F=e(90436),D=e(7089);const x=(0,f.Z)(je=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:je.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function w(je){const{label:ve,value:Je,gridSizes:nt,children:Tt}=je,At=x(),Ie=(0,c.useElementFilter)(Tt,gt=>gt.getElements()),ht=Ie.length>0?Ie:O.createElement(F.Z,{variant:"body2",className:At.value},Je||"unknown");return O.createElement(B.Z,{item:!0,...nt},O.createElement(F.Z,{variant:"h2",className:At.label},ve),ht)}var k=e(45915);const re=(0,f.Z)({description:{wordBreak:"break-word"}});function le(je,ve,Je){if(ve==="url"||je.includes("://"))return je;const nt=Je.type==="file"?`file://${Je.target}`:Je.target;return ve==="file"||Je.type==="file"?new URL(je,nt).href:nt}function Re(je){var at,Et,se,ae,Ye,Ge,$e,rt;const{entity:ve}=je,Je=re(),nt=ve.kind.toLocaleLowerCase("en-US")==="system",Tt=ve.kind.toLocaleLowerCase("en-US")==="resource",At=ve.kind.toLocaleLowerCase("en-US")==="component",Ie=ve.kind.toLocaleLowerCase("en-US")==="api",ht=ve.kind.toLocaleLowerCase("en-US")==="template",gt=ve.kind.toLocaleLowerCase("en-US")==="location",lt=ve.kind.toLocaleLowerCase("en-US")==="group",_=(0,R.getEntityRelations)(ve,r.cz,{kind:"system"}),pe=(0,R.getEntityRelations)(ve,r.cz,{kind:"component"}),be=(0,R.getEntityRelations)(ve,r.cz,{kind:"domain"}),We=(0,R.getEntityRelations)(ve,r.S4);let tt;try{tt=(0,r.CV)(ve)}catch{tt=void 0}return O.createElement(B.Z,{container:!0},O.createElement(w,{label:"Description",gridSizes:{xs:12}},O.createElement(F.Z,{variant:"body2",paragraph:!0,className:Je.description},((at=ve==null?void 0:ve.metadata)==null?void 0:at.description)||"No description")),O.createElement(w,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},We.length>0&&O.createElement(R.EntityRefLinks,{entityRefs:We,defaultKind:"group"})),(nt||be.length>0)&&O.createElement(w,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},be.length>0&&O.createElement(R.EntityRefLinks,{entityRefs:be,defaultKind:"domain"})),(Ie||At||Tt||_.length>0)&&O.createElement(w,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},_.length>0&&O.createElement(R.EntityRefLinks,{entityRefs:_,defaultKind:"system"})),At&&pe.length>0&&O.createElement(w,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},O.createElement(R.EntityRefLinks,{entityRefs:pe,defaultKind:"component"})),(Ie||At||Tt||ht||lt||gt||typeof((Et=ve==null?void 0:ve.spec)==null?void 0:Et.type)=="string")&&O.createElement(w,{label:"Type",value:(se=ve==null?void 0:ve.spec)==null?void 0:se.type,gridSizes:{xs:12,sm:6,lg:4}}),(Ie||At||typeof((ae=ve==null?void 0:ve.spec)==null?void 0:ae.lifecycle)=="string")&&O.createElement(w,{label:"Lifecycle",value:(Ye=ve==null?void 0:ve.spec)==null?void 0:Ye.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),O.createElement(w,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((Ge=ve==null?void 0:ve.metadata)==null?void 0:Ge.tags)||[]).map(Y=>O.createElement(D.Z,{key:Y,size:"small",label:Y}))),gt&&((($e=ve==null?void 0:ve.spec)==null?void 0:$e.targets)||((rt=ve==null?void 0:ve.spec)==null?void 0:rt.target))&&O.createElement(w,{label:"Targets",gridSizes:{xs:12}},O.createElement(k.s,{cols:1,items:(ve.spec.targets||[ve.spec.target]).map(Y=>Y).map(Y=>{var z;return{text:Y,href:le(Y,((z=ve==null?void 0:ve.spec)==null?void 0:z.type)||"unknown",tt)}})})))}const xe=(0,f.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 De(je){var se,ae,Ye;const{variant:ve}=je,Je=xe(),{entity:nt}=(0,R.useEntity)(),Tt=(0,c.useApi)(i.q3),At=(0,c.useApi)(R.catalogApiRef),Ie=(0,c.useApi)(c.alertApiRef),ht=(0,c.useRouteRef)($.jU),gt=(0,R.getEntitySourceLocation)(nt,Tt),lt=(se=nt.metadata.annotations)==null?void 0:se[r.Tf],_={label:"View Source",disabled:!gt,icon:O.createElement(i.nW,{type:gt==null?void 0:gt.integrationType}),href:gt==null?void 0:gt.locationTargetUrl},pe={label:"View TechDocs",disabled:!((ae=nt.metadata.annotations)!=null&&ae["backstage.io/techdocs-ref"])||!ht,icon:O.createElement(S.Z,null),href:ht&&ht({namespace:nt.metadata.namespace||r.zG,kind:nt.kind,name:nt.metadata.name})};let be="";ve==="gridItem"?be=Je.gridItemCard:ve==="fullHeight"&&(be=Je.fullHeightCard);let We="";ve==="gridItem"?We=Je.gridItemCardContent:ve==="fullHeight"&&(We=Je.fullHeightCardContent);const tt=(Ye=nt.metadata.annotations)==null?void 0:Ye[r.P1],at=(tt==null?void 0:tt.startsWith("url:"))||(tt==null?void 0:tt.startsWith("file:")),Et=(0,O.useCallback)(async()=>{await At.refreshEntity((0,r.eE)(nt)),Ie.post({message:"Refresh scheduled",severity:"info"})},[At,Ie,nt]);return O.createElement(o.Z,{className:be},O.createElement(u.Z,{title:"About",action:O.createElement(O.Fragment,null,at&&O.createElement(m.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Et},O.createElement(E.Z,null)),O.createElement(m.Z,{component:t.Link,"aria-label":"Edit",disabled:!lt,title:"Edit Metadata",to:lt!=null?lt:"#"},O.createElement(b.Z,null))),subheader:O.createElement(t.HeaderIconLinkRow,{links:[_,pe]})}),O.createElement(y.Z,null),O.createElement(g.Z,{className:We},O.createElement(Re,{entity:nt})))}},49782:function(te,s,e){"use strict";e.d(s,{K:function(){return E}});var r=e(2784),t=e(79692),c=e(12420),i=e(97580),R=e(73698),f=e(74603),o=e(12231),u=e(17429),m=e(64279),y=e(36964);const g=(0,t.Z)(S=>(0,c.Z)({root:{...S.typography.h4}}));function E(S){var xe;const{initialFilter:b="component",allowedKinds:O}=S,$=g(),B=(0,y.useApi)(u.catalogApiRef),{value:F}=(0,m.default)(async()=>await B.getEntityFacets({facets:["kind"]}).then(De=>{var je;return((je=De.facets.kind)==null?void 0:je.map(ve=>ve.value).sort())||[]})),{updateFilters:D,queryParameters:{kind:x}}=(0,u.useEntityList)(),w=(0,r.useMemo)(()=>{var De;return(De=[x].flat()[0])==null?void 0:De.toLocaleLowerCase("en-US")},[x]),[k,re]=(0,r.useState)(w!=null?w:b);(0,r.useEffect)(()=>{D({kind:k?new u.EntityKindFilter(k):void 0})},[k,D]),(0,r.useEffect)(()=>{w&&re(w)},[w]);const Re=[(0,i.Z)(k)].concat((xe=F==null?void 0:F.filter(De=>O?O.some(je=>je.toLocaleLowerCase("en-US")===De.toLocaleLowerCase("en-US")):!0))!=null?xe:[]).sort().reduce((De,je)=>(De[je.toLocaleLowerCase("en-US")]=je,De),{});return r.createElement(R.Z,{input:r.createElement(f.Z,{value:k}),value:k,onChange:De=>re(De.target.value),classes:$},Object.keys(Re).map(De=>r.createElement(o.Z,{value:De,key:De},`${Re[De]}s`)))}},30097:function(te,s,e){"use strict";e.d(s,{E:function(){return O}});var r=e(48023),t=e(82339),c=e(17429),i=e(90436),R=e(15459),f=e(27604),o=e(2997),u=e(11640),m=e(28347),y=e(76635),g=e(2784),E=e(7089);const S=Object.freeze({createNameColumn($){function B(F){var D;return((D=F.metadata)==null?void 0:D.title)||(0,c.humanizeEntityRef)(F,{defaultKind:$==null?void 0:$.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:F},{entity:D}){return B(F).localeCompare(B(D))},render:({entity:F})=>{var D;return g.createElement(c.EntityRefLink,{entityRef:F,defaultKind:($==null?void 0:$.defaultKind)||"Component",title:(D=F.metadata)==null?void 0:D.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:$})=>g.createElement(c.EntityRefLinks,{entityRefs:$.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:$})=>g.createElement(c.EntityRefLinks,{entityRefs:$.ownedByRelations,defaultKind:"group"})}},createSpecTargetsColumn(){return{title:"Targets",field:"entity.spec.targets",render:({entity:$})=>{var B,F;return g.createElement(g.Fragment,null,(((B=$==null?void 0:$.spec)==null?void 0:B.targets)||((F=$==null?void 0:$.spec)==null?void 0:F.target))&&g.createElement(t.OverflowTooltip,{text:($.spec.targets||[$.spec.target]).join(", "),placement:"bottom-start"}))}}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0,width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:$})=>g.createElement(t.OverflowTooltip,{text:$.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:$})=>g.createElement(g.Fragment,null,$.metadata.tags&&$.metadata.tags.map(B=>g.createElement(E.Z,{key:B,label:B,size:"small",variant:"outlined",style:{marginBottom:"0px"}}))),width:"auto"}},createTitleColumn($){return{title:"Title",field:"entity.metadata.title",hidden:$==null?void 0:$.hidden,searchable:!0}}}),b=(0,R.Z)({root:{color:"#f3ba37"}})(u.Z),O=$=>{var Ie,ht,gt;const{columns:B,actions:F,tableOptions:D,subtitle:x}=$,{isStarredEntity:w,toggleStarredEntity:k}=(0,c.useStarredEntities)(),{loading:re,error:le,entities:Re,filters:xe}=(0,c.useEntityList)(),De=(0,g.useMemo)(()=>{var _;return[S.createTitleColumn({hidden:!0}),S.createNameColumn({defaultKind:(_=xe.kind)==null?void 0:_.value}),...lt(),S.createMetadataDescriptionColumn(),S.createTagsColumn()];function lt(){var pe;switch((pe=xe.kind)==null?void 0:pe.value){case"user":return[];case"domain":case"system":return[S.createOwnerColumn()];case"group":case"template":return[S.createSpecTypeColumn()];case"location":return[S.createSpecTypeColumn(),S.createSpecTargetsColumn()];default:return[S.createSystemColumn(),S.createOwnerColumn(),S.createSpecTypeColumn(),S.createSpecLifecycleColumn()]}}},[(Ie=xe.kind)==null?void 0:Ie.value]),je=xe.type===void 0,ve=(0,y.capitalize)((gt=(ht=xe.user)==null?void 0:ht.value)!=null?gt:"all");if(le)return g.createElement("div",null,g.createElement(t.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},g.createElement(t.CodeSnippet,{language:"text",text:le.toString()})));const Je=[({entity:lt})=>{var be;const _=(be=lt.metadata.annotations)==null?void 0:be[r.l2],pe="View";return{icon:()=>g.createElement(g.Fragment,null,g.createElement(i.Z,{variant:"srOnly"},pe),g.createElement(o.Z,{fontSize:"small"})),tooltip:pe,disabled:!_,onClick:()=>{!_||window.open(_,"_blank")}}},({entity:lt})=>{var be;const _=(be=lt.metadata.annotations)==null?void 0:be[r.Tf],pe="Edit";return{icon:()=>g.createElement(g.Fragment,null,g.createElement(i.Z,{variant:"srOnly"},pe),g.createElement(f.Z,{fontSize:"small"})),tooltip:pe,disabled:!_,onClick:()=>{!_||window.open(_,"_blank")}}},({entity:lt})=>{const _=w(lt),pe=_?"Remove from favorites":"Add to favorites";return{cellStyle:{paddingLeft:"1em"},icon:()=>g.createElement(g.Fragment,null,g.createElement(i.Z,{variant:"srOnly"},pe),_?g.createElement(b,null):g.createElement(m.Z,null)),tooltip:pe,onClick:()=>k(lt)}}],nt=Re.map(lt=>{const _=(0,c.getEntityRelations)(lt,r.cz,{kind:"system"}),pe=(0,c.getEntityRelations)(lt,r.S4);return{entity:lt,resolved:{name:(0,c.humanizeEntityRef)(lt,{defaultKind:"Component"}),ownedByRelationsTitle:pe.map(be=>(0,c.humanizeEntityRef)(be,{defaultKind:"group"})).join(", "),ownedByRelations:pe,partOfSystemRelationTitle:_.map(be=>(0,c.humanizeEntityRef)(be,{defaultKind:"system"})).join(", "),partOfSystemRelations:_}}}),Tt=(B||De).find(lt=>lt.title==="Type");Tt&&(Tt.hidden=!je);const At=nt.length>20;return g.createElement(t.Table,{isLoading:re,columns:B||De,options:{paging:At,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!re,padding:"dense",pageSizeOptions:[20,50,100],...D},title:`${ve} (${Re.length})`,data:nt,actions:F||Je,subtitle:x})};O.columns=S},45915:function(te,s,e){"use strict";e.d(s,{s:function(){return b}});var r=e(90348),t=e(11861),c=e(2784),i=e(79692),R=e(95544),f=e(90436),o=e(52160),u=e(82339);const m=(0,i.Z)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function y(O){const{href:$,text:B,Icon:F}=O,D=m();return c.createElement(R.Z,{display:"flex"},c.createElement(R.Z,{mr:1,className:D.svgIcon},c.createElement(f.Z,{component:"div"},F?c.createElement(F,null):c.createElement(o.Z,null))),c.createElement(R.Z,{flexGrow:"1"},c.createElement(u.Link,{to:$,target:"_blank",rel:"noopener"},B||$)))}var g=e(41156);const E={xs:1,sm:1,md:1,lg:2,xl:3};function S(O){var F,D;const $=[(0,g.Z)(x=>x.breakpoints.up("xl"))?"xl":null,(0,g.Z)(x=>x.breakpoints.up("lg"))?"lg":null,(0,g.Z)(x=>x.breakpoints.up("md"))?"md":null,(0,g.Z)(x=>x.breakpoints.up("sm"))?"sm":null,(0,g.Z)(x=>x.breakpoints.up("xs"))?"xs":null];let B=1;if(typeof O=="number")B=O;else{const x=(F=$.find(w=>w!==null))!=null?F:"xs";B=(D=O==null?void 0:O[x])!=null?D:E[x]}return B}function b(O){const{items:$,cols:B=void 0}=O,F=S(B);return c.createElement(r.Z,{rowHeight:"auto",cols:F},$.map(({text:D,href:x,Icon:w},k)=>c.createElement(t.Z,{key:k},c.createElement(y,{href:x,text:D!=null?D:x,Icon:w}))))}},47851:function(te,s,e){"use strict";e.d(s,{_Z:function(){return i},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"]}),i=(0,r.createRouteRef)({id:"catalog"})},40749:function(te,s,e){"use strict";e.d(s,{rG:function(){return r},Y2:function(){return D},J$:function(){return m},g2:function(){return c}});var r;(function(x){const w="DENY";x.DENY=w;const k="ALLOW";x.ALLOW=k;const re="CONDITIONAL";x.CONDITIONAL=re})(r||(r={}));function t(x,w){return x.name===w.name}function c(x,w){return"resourceType"in x?!w||x.resourceType===w:!1}function i(x){return x.attributes.action==="create"}function R(x){return x.attributes.action==="read"}function f(x){return x.attributes.action==="update"}function o(x){return x.attributes.action==="delete"}function u(x){return{authorize:async(w,k)=>await x.authorize(w,k),authorizeConditional(w,k){const re=w;return x.authorize(re,k)}}}function m({name:x,attributes:w,resourceType:k}){return k?{type:"resource",name:x,attributes:w,resourceType:k}:{type:"basic",name:x,attributes:w}}var y=e(10179),g=e(96279),E=e.n(g),S=e(9571),b=e(30195);const O=b.z.lazy(()=>b.z.object({rule:b.z.string(),resourceType:b.z.string(),params:b.z.array(b.z.unknown())}).or(b.z.object({anyOf:b.z.array(O).nonempty()})).or(b.z.object({allOf:b.z.array(O).nonempty()})).or(b.z.object({not:O}))),$=b.z.object({result:b.z.literal(r.ALLOW).or(b.z.literal(r.DENY))}),B=b.z.union([b.z.object({result:b.z.literal(r.ALLOW).or(b.z.literal(r.DENY))}),b.z.object({result:b.z.literal(r.CONDITIONAL),pluginId:b.z.string(),resourceType:b.z.string(),conditions:O})]),F=(x,w)=>b.z.object({items:b.z.array(b.z.intersection(b.z.object({id:b.z.string()}),x)).refine(k=>k.length===w.size&&k.every(({id:re})=>w.has(re)),{message:"Items in response do not match request"})});class D{constructor(w){X(this,"enabled");X(this,"discovery");var k;this.discovery=w.discovery,this.enabled=(k=w.config.getOptionalBoolean("permission.enabled"))!=null?k:!1}async authorize(w,k){return this.makeRequest(w,$,k)}async authorizeConditional(w,k){return this.makeRequest(w,B,k)}async makeRequest(w,k,re){if(!this.enabled)return w.map(Je=>({result:r.ALLOW}));const le={items:w.map(Je=>({id:S.Z(),...Je}))},Re=await this.discovery.getBaseUrl("permission"),xe=await E()(`${Re}/authorize`,{method:"POST",body:JSON.stringify(le),headers:{...this.getAuthorizationHeader(re==null?void 0:re.token),"content-type":"application/json"}});if(!xe.ok)throw await y.VL.fromResponse(xe);const De=await xe.json(),ve=F(k,new Set(le.items.map(({id:Je})=>Je))).parse(De).items.reduce((Je,nt)=>(Je[nt.id]=nt,Je),{});return le.items.map(Je=>ve[Je.id])}getAuthorizationHeader(w){return w?{Authorization:`Bearer ${w}`}:{}}}},68099:function(te,s,e){"use strict";e.d(s,{iM:function(){return R},RV:function(){return c},gI:function(){return o}});var r=e(2784),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.permission.api"});var i=e(40749);class R{constructor(y,g){this.permissionClient=y,this.identityApi=g}static create(y){const{config:g,discovery:E,identity:S}=y,b=new i.Y2({discovery:E,config:g});return new R(b,S)}async authorize(y){return(await this.permissionClient.authorize([y],await this.identityApi.getCredentials()))[0]}}var f=e(49857);function o(m){const y=(0,t.useApi)(c),{data:g,error:E}=(0,f.ZP)(m,async S=>{if((0,i.g2)(S.permission)&&!S.resourceRef)return i.rG.DENY;const{result:b}=await y.authorize(S);return b});return E?{error:E,loading:!1,allowed:!1}:g===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:g===i.rG.ALLOW}}const u=m=>{const{permission:y,resourceRef:g,errorComponent:E,...S}=m,b=usePermission(isResourcePermission(y)?{permission:y,resourceRef:g}:{permission:y}),O=useApp(),{NotFoundErrorPage:$}=O.getComponents();let B=E===void 0?React.createElement($,null):E;return b.loading?B=null:b.allowed&&(B=m.element),React.createElement(Route,{...S,element:B})}},74450:function(te,s,e){"use strict";e.d(s,{FA:function(){return o},Nd:function(){return k},Rx:function(){return D}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.search.queryservice"});class c{constructor(ae){this.mockedResults=ae}query(){return Promise.resolve(this.mockedResults||{results:[]})}}var i=e(2784),R=e(79692);const f=(0,R.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),o=({text:se,preTag:ae,postTag:Ye})=>{const Ge=f(),$e=(0,i.useMemo)(()=>se.split(new RegExp(`(${ae}.+?${Ye})`)),[Ye,ae,se]);return i.createElement(i.Fragment,null,$e.map((rt,Y)=>rt.includes(ae)?i.createElement("mark",{className:Ge.highlight,key:Y},rt.replace(new RegExp(`${ae}|${Ye}`,"g"),"")):rt))};var u=e(42494),m=e(84899),y=e(5806),g=e(21324),E=e(56939),S=e(73698),b=e(12231),O=e(76241),$=e(64279),B=e(1849);const F=(0,O.CT)("search-context"),D=()=>{const se=(0,i.useContext)(F);if(!se)throw new Error("useSearch must be used within a SearchContextProvider");const ae=se.atVersion(1);if(!ae)throw new Error("No SearchContext v1 found");return ae},x=()=>useContext(F)!==void 0,w={term:"",pageCursor:void 0,filters:{},types:[]},k=se=>{var Ot,bt,Pt,Nt;const{initialState:ae=w,children:Ye}=se,Ge=(0,r.useApi)(t),[$e,rt]=(0,i.useState)(ae.pageCursor),[Y,z]=(0,i.useState)(ae.filters),[q,ce]=(0,i.useState)(ae.term),[fe,Pe]=(0,i.useState)(ae.types),Oe=(0,B.Z)(q),Se=(0,$.default)(()=>Ge.query({term:q,filters:Y,pageCursor:$e,types:fe}),[q,Y,fe,$e]),Qe=!Se.loading&&!Se.error&&((Ot=Se.value)==null?void 0:Ot.nextPageCursor),Ke=!Se.loading&&!Se.error&&((bt=Se.value)==null?void 0:bt.previousPageCursor),pt=(0,i.useCallback)(()=>{var Zt;rt((Zt=Se.value)==null?void 0:Zt.nextPageCursor)},[(Pt=Se.value)==null?void 0:Pt.nextPageCursor]),St=(0,i.useCallback)(()=>{var Zt;rt((Zt=Se.value)==null?void 0:Zt.previousPageCursor)},[(Nt=Se.value)==null?void 0:Nt.previousPageCursor]);(0,i.useEffect)(()=>{Oe!==void 0&&q!==Oe&&rt(void 0)},[q,Oe,rt]);const ut={result:Se,filters:Y,setFilters:z,term:q,setTerm:ce,types:fe,setTypes:Pe,pageCursor:$e,setPageCursor:rt,fetchNextPage:Qe?pt:void 0,fetchPreviousPage:Ke?St:void 0},Dt=(0,O.EI)({1:ut});return i.createElement(r.AnalyticsContext,{attributes:{searchTypes:fe.sort().join(",")}},i.createElement(F.Provider,{value:Dt,children:Ye}))};var re=e(86619),le=e(7089),Re=e(88013),xe=e(69294),De=e(48760);const je=(se,ae,Ye=[],Ge=250)=>{const $e=(0,i.useRef)({}),rt=se||(()=>Promise.resolve([])),[Y,z]=(0,xe.default)(rt,[ae],{loading:!0});if((0,De.Z)(()=>{$e.current[ae]===void 0&&($e.current[ae]=z(ae).then(ce=>($e.current[ae]=ce,ce)))},Ge,[z,ae]),Ye.length)return{loading:!1,value:Ye};const q=$e.current[ae];return Array.isArray(q)?{loading:!1,value:q}:Y},ve=(se,ae)=>{const{setFilters:Ye}=D();(0,i.useEffect)(()=>{ae&&[ae].flat().length>0&&Ye(Ge=>({...Ge,[se]:ae}))},[])},Je=se=>{const{className:ae,defaultValue:Ye,name:Ge,values:$e,valuesDebounceMs:rt,label:Y,filterSelectedOptions:z,limitTags:q,multiple:ce}=se,[fe,Pe]=(0,i.useState)("");ve(Ge,Ye);const Oe=typeof $e=="function"?$e:void 0,Se=typeof $e=="function"?void 0:$e,{value:Qe,loading:Ke}=je(Oe,fe,Se,rt),{filters:pt,setFilters:St}=D(),ut=pt[Ge]||(ce?[]:null),Dt=(Pt,Nt)=>{St(Zt=>{const{[Ge]:mn,...On}=Zt;return Nt?{...On,[Ge]:Nt}:{...On}})},Ot=Pt=>i.createElement(re.Z,{...Pt,name:"search",variant:"outlined",label:Y,fullWidth:!0}),bt=(Pt,Nt)=>Pt.map((Zt,mn)=>i.createElement(le.Z,{label:Zt,color:"primary",...Nt({index:mn})}));return i.createElement(Re.ZP,{filterSelectedOptions:z,limitTags:q,multiple:ce,className:ae,id:`${ce?"multi-":""}select-filter-${Ge}--select`,options:Qe||[],loading:Ke,value:ut,onChange:Dt,onInputChange:(Pt,Nt)=>Pe(Nt),renderInput:Ot,renderTags:bt})},nt=(0,R.Z)({label:{textTransform:"capitalize"}}),Tt=se=>{const{className:ae,defaultValue:Ye,label:Ge,name:$e,values:rt=[],valuesDebounceMs:Y}=se,z=nt(),{filters:q,setFilters:ce}=D();ve($e,Ye);const fe=typeof rt=="function"?rt:void 0,Pe=typeof rt=="function"?void 0:rt,{value:Oe=[],loading:Se}=je(fe,"",Pe,Y),Qe=Ke=>{const{target:{value:pt,checked:St}}=Ke;ce(ut=>{const{[$e]:Dt,...Ot}=ut,bt=(Dt||[]).filter(Nt=>Nt!==pt),Pt=St?[...bt,pt]:bt;return Pt.length?{...Ot,[$e]:Pt}:Ot})};return i.createElement(u.Z,{className:ae,disabled:Se,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},Ge?i.createElement(m.Z,{className:z.label},Ge):null,Oe.map(Ke=>{var pt;return i.createElement(y.Z,{key:Ke,control:i.createElement(g.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":Ke},value:Ke,name:Ke,onChange:Qe,checked:((pt=q[$e])!=null?pt:[]).includes(Ke)}),label:Ke})}))},At=se=>{const{className:ae,defaultValue:Ye,label:Ge,name:$e,values:rt,valuesDebounceMs:Y}=se,z=nt();ve($e,Ye);const q=typeof rt=="function"?rt:void 0,ce=typeof rt=="function"?void 0:rt,{value:fe=[],loading:Pe}=je(q,"",ce,Y),{filters:Oe,setFilters:Se}=D(),Qe=Ke=>{const{target:{value:pt}}=Ke;Se(St=>{const{[$e]:ut,...Dt}=St;return pt?{...Dt,[$e]:pt}:Dt})};return i.createElement(u.Z,{disabled:Pe,className:ae,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},Ge?i.createElement(E.Z,{className:z.label,margin:"dense"},Ge):null,i.createElement(S.Z,{variant:"outlined",value:Oe[$e]||"",onChange:Qe},i.createElement(b.Z,{value:""},i.createElement("em",null,"All")),fe.map(Ke=>i.createElement(b.Z,{key:Ke,value:Ke},Ke))))},Ie=({component:se,...ae})=>i.createElement(se,{...ae});Ie.Checkbox=se=>i.createElement(Ie,{...se,component:Tt}),Ie.Select=se=>i.createElement(Ie,{...se,component:At}),Ie.Autocomplete=se=>i.createElement(Ie,{...se,component:Je});var ht=e(82339);const gt=({children:se})=>{const{result:{loading:ae,error:Ye,value:Ge}}=useSearch();return ae?React.createElement(Progress,null):Ye?React.createElement(ResponseErrorPanel,{title:"Error encountered while fetching search results",error:Ye}):Ge!=null&&Ge.results.length?React.createElement(React.Fragment,null,se({results:Ge.results})):React.createElement(EmptyState,{missing:"data",title:"Sorry, no results were found"})},lt=se=>React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchResult"}},React.createElement(gt,{...se})),_=(0,R.Z)(se=>({root:{display:"flex",justifyContent:"space-between",gap:se.spacing(2),margin:se.spacing(2,0)}})),pe=()=>{const{fetchNextPage:se,fetchPreviousPage:ae}=useSearch(),Ye=_();return!se&&!ae?React.createElement(React.Fragment,null):React.createElement("nav",{"arial-label":"pagination navigation",className:Ye.root},React.createElement(Button,{"aria-label":"previous page",disabled:!ae,onClick:ae,startIcon:React.createElement(ArrowBackIosIcon,null)},"Previous"),React.createElement(Button,{"aria-label":"next page",disabled:!se,onClick:se,endIcon:React.createElement(ArrowForwardIosIcon,null)},"Next"))},be=({children:se})=>{const ae=useAnalytics(),{term:Ye}=useSearch();return useEffect(()=>{Ye&&ae.captureEvent("search",Ye)},[ae,Ye]),React.createElement(React.Fragment,null,se)},We=({onChange:se,onKeyDown:ae,onSubmit:Ye,debounceTime:Ge=200,clearButton:$e=!0,fullWidth:rt=!0,value:Y,inputProps:z={},endAdornment:q,...ce})=>{const fe=useApi(configApiRef),[Pe,Oe]=useState(Y),Se=useSearchContextCheck();useEffect(()=>{Oe(bt=>bt!==Y?Y:bt)},[Y]),useDebounce(()=>se(Pe),Ge,[Pe]);const Qe=useCallback(bt=>{Oe(bt.target.value)},[Oe]),Ke=useCallback(bt=>{ae&&ae(bt),Ye&&bt.key==="Enter"&&Ye()},[ae,Ye]),pt=useCallback(()=>{se("")},[se]),St=`Search in ${fe.getOptionalString("app.title")||"Backstage"}`,ut=React.createElement(InputAdornment,{position:"start"},React.createElement(IconButton,{"aria-label":"Query",disabled:!0},React.createElement(SearchIcon,null))),Dt=React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"Clear",onClick:pt},React.createElement(ClearButton,null))),Ot=React.createElement(TrackSearch,null,React.createElement(InputBase,{"data-testid":"search-bar-next",value:Pe,placeholder:St,startAdornment:ut,endAdornment:$e?Dt:q,inputProps:{"aria-label":"Search",...z},fullWidth:rt,onChange:Qe,onKeyDown:Ke,...ce}));return Se?Ot:React.createElement(SearchContextProvider,null,Ot)},tt=({onChange:se,...ae})=>{const{term:Ye,setTerm:Ge}=useSearch(),$e=useCallback(rt=>{se?se(rt):Ge(rt)},[se,Ge]);return React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchBar"}},React.createElement(We,{value:Ye,onChange:$e,...ae}))},at=({result:se,highlight:ae,rank:Ye,icon:Ge,secondaryAction:$e,lineClamp:rt=5})=>{const Y=useAnalytics(),z=()=>{Y.captureEvent("discover",se.title,{attributes:{to:se.location},value:Ye})};return React.createElement(Link,{noTrack:!0,to:se.location,onClick:z},React.createElement(ListItem,{alignItems:"center"},Ge&&React.createElement(ListItemIcon,null,Ge),React.createElement(ListItemText,{primaryTypographyProps:{variant:"h6"},primary:ae!=null&&ae.fields.title?React.createElement(HighlightedSearchResultText,{text:ae.fields.title,preTag:ae.preTag,postTag:ae.postTag}):se.title,secondary:React.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:rt,overflow:"hidden"}},ae!=null&&ae.fields.text?React.createElement(HighlightedSearchResultText,{text:ae.fields.text,preTag:ae.preTag,postTag:ae.postTag}):se.text)}),$e&&React.createElement(Box,{alignItems:"flex-end"},$e)),React.createElement(Divider,null))},Et=se=>React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"DefaultResultListItem"}},React.createElement(at,{...se}))},56338:function(te,s,e){"use strict";e.d(s,{Ox:function(){return ve},Zz:function(){return R},oZ:function(){return le},DR:function(){return f},ZS:function(){return k},VA:function(){return Tt},KY:function(){return u},gT:function(){return S},Dl:function(){return b},ux:function(){return nt},$L:function(){return E},x1:function(){return re}});var r=e(2784),t=e(10289),c=e(36964);const i="techdocs.addons.addon.v1",R="techdocs.addons.wrapper.v1",f=()=>null;(0,c.attachComponentData)(f,R,!0);const o=_=>`${i}.${_.toLocaleLowerCase("en-US")}`;function u(_){const{name:pe,component:be}=_;return(0,c.createReactExtension)({name:pe,component:{sync:We=>r.createElement(be,{...We})},data:{[i]:_,[o(pe)]:!0}})}const m=(_,pe)=>_.selectByComponentData({key:pe}).getElements()[0],y=_=>_.selectByComponentData({key:R}).selectByComponentData({key:i}),g=_=>_.selectByComponentData({key:R}).findComponentData({key:i}),E=()=>{const _=(0,t.pC)(),pe=(0,c.useElementFilter)(_,y),be=(0,c.useElementFilter)(_,g),We=(0,r.useCallback)(Et=>{var ae;if(!pe||!Et)return null;const se=o(Et.name);return(ae=m(pe,se))!=null?ae:null},[pe]),tt=(0,r.useCallback)(Et=>{const se=be.find(ae=>ae.name===Et);return se?We(se):null},[be,We]),at=(0,r.useCallback)(Et=>{const se=be.filter(ae=>ae.location===Et);return se.length?se.map(We):null},[be,We]);return{renderComponentByName:tt,renderComponentsByLocation:at}},S=(0,c.createApiRef)({id:"plugin.techdocs.service"}),b=(0,c.createApiRef)({id:"plugin.techdocs.storageservice"});var O=e(64279),$=e(48023),B=e(76241);function F(_,pe){return pe.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(_.kind=_.kind.toLocaleLowerCase(),_.name=_.name.toLocaleLowerCase(),_.namespace=_.namespace.toLocaleLowerCase()),_}const D=(_,pe)=>(0,$.eE)(_)===(0,$.eE)(pe),x={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},w=(0,B.CT)("techdocs-reader-page-context"),k=(0,r.memo)(({entityRef:_,children:pe})=>{const be=(0,c.useApi)(S),We=(0,c.useApi)(c.configApiRef),tt=(0,O.default)(async()=>be.getTechDocsMetadata(_),[_]),at=(0,O.default)(async()=>be.getEntityMetadata(_),[_]),[Et,se]=(0,r.useState)(x.title),[ae,Ye]=(0,r.useState)(x.subtitle),[Ge,$e]=(0,r.useState)(x.shadowRoot),rt={metadata:tt,entityRef:F(_,We),entityMetadata:at,shadowRoot:Ge,setShadowRoot:$e,title:Et,setTitle:se,subtitle:ae,setSubtitle:Ye},Y=(0,B.EI)({1:rt});return r.createElement(w.Provider,{value:Y},pe instanceof Function?pe(rt):pe)},(_,pe)=>D(_.entityRef,pe.entityRef)),re=()=>{const _=(0,r.useContext)(w);if(_===void 0)return x;const pe=_.atVersion(1);if(pe===void 0)throw new Error("No context found for version 1.");return pe},le=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"});var Re=e(6553),xe=e(50236),De=e(19219),je=e(82339);const ve="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",Je=_=>{(0,r.useEffect)(()=>{var at;if(!_)return()=>{};const pe=_.querySelectorAll('head > link[rel="stylesheet"]');let be=(at=pe==null?void 0:pe.length)!=null?at:0;const We=new CustomEvent(ve);if(!be)return _.dispatchEvent(We),()=>{};const tt=()=>{--be===0&&_.dispatchEvent(We)};return pe==null||pe.forEach(Et=>{Et.addEventListener("load",tt)}),()=>{pe==null||pe.forEach(Et=>{Et.removeEventListener("load",tt)})}},[_])},nt=_=>{const[pe,be]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!_)return()=>{};be(!0);const We=_.style;We.setProperty("opacity","0");const tt=()=>{be(!1),We.setProperty("opacity","1")};return _.addEventListener(ve,tt),()=>{_.removeEventListener(ve,tt)}},[_]),pe},Tt=({element:_,onAppend:pe,children:be})=>{const[We,tt]=(0,r.useState)((0,Re.Ue)({...(0,xe.Z)(),insertionPoint:void 0}));Je(_);const at=nt(_),Et=(0,r.useCallback)(se=>{if(!_||!se)return;tt((0,Re.Ue)({...(0,xe.Z)(),insertionPoint:_.querySelector("head")||void 0}));let ae=se.shadowRoot;ae||(ae=se.attachShadow({mode:"open"})),ae.replaceChildren(_),typeof pe=="function"&&pe(ae)},[_,pe]);return r.createElement(r.Fragment,null,at&&r.createElement(je.Progress,null),r.createElement(De.ZP,{jss:We,sheetsManager:new Map},r.createElement("div",{ref:Et,"data-testid":"techdocs-native-shadowroot"}),be))};var At=e(54073);const Ie=()=>{const{shadowRoot:_}=useTechDocsReaderPage();return _},ht=_=>{const pe=Ie();return pe?_.map(be=>pe==null?void 0:pe.querySelectorAll(be)).filter(be=>be.length).map(be=>Array.from(be)).flat():[]},gt=_=>_.toString()&&_.rangeCount&&_.getRangeAt(0).getBoundingClientRect().top,lt=(_=0)=>{const pe=Ie(),[be,We]=useState(null),tt=useMemo(()=>debounce(()=>{const at=pe,Et=at.getSelection?at.getSelection():document.getSelection();Et&>(Et)?We(Et):We(null)},_),[pe,We,_]);return useEffect(()=>(window.document.addEventListener("selectionchange",tt),()=>window.document.removeEventListener("selectionchange",tt)),[tt]),be}},94067:function(te,s,e){"use strict";e.r(s),e.d(s,{EmbeddedDocsRouter:function(){return O},Router:function(){return b},isTechDocsAvailable:function(){return S}});var r=e(2784),t=e(10289),c=e(17429),i=e(82339),R=e(48023),f=e(20961),o=e(16172),u=e(63126);const m=({entity:$})=>{const B=(0,R.iB)($);return r.createElement(f.I6,{entityRef:B},r.createElement(o.b,null),r.createElement(u.F,{withSearch:!1}))};var y=e(50021),g=e(26220);const E="backstage.io/techdocs-ref",S=$=>{var B,F;return Boolean((F=(B=$==null?void 0:$.metadata)==null?void 0:B.annotations)==null?void 0:F[E])},b=()=>r.createElement(t.Z5,null,r.createElement(t.AW,{path:"/",element:r.createElement(y.TechDocsIndexPage,null)}),r.createElement(t.AW,{path:"/:namespace/:kind/:name/*",element:r.createElement(g.TechDocsReaderPage,null)})),O=$=>{var w;const{children:B}=$,{entity:F}=(0,c.useEntity)(),D=(0,t.V$)([{path:"/*",element:r.createElement(m,{entity:F}),children:[{path:"/*",element:B}]}]);return((w=F.metadata.annotations)==null?void 0:w[E])?D:r.createElement(i.MissingAnnotationEmptyState,{annotation:E})}},3337:function(te,s,e){"use strict";var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),c=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(te,s,e){"use strict";e.d(s,{k:function(){return R},p:function(){return i}});var r=e(10179),t=e(76372),c=e.n(t);class i{constructor(o){X(this,"configApi");X(this,"discoveryApi");X(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.fetchApi=o.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(o){const{kind:u,namespace:m,name:y}=o,E=`${await this.getApiOrigin()}/metadata/techdocs/${m}/${u}/${y}`,S=await this.fetchApi.fetch(`${E}`);if(!S.ok)throw await r.VL.fromResponse(S);return await S.json()}async getEntityMetadata(o){const{kind:u,namespace:m,name:y}=o,E=`${await this.getApiOrigin()}/metadata/entity/${m}/${u}/${y}`,S=await this.fetchApi.fetch(`${E}`);if(!S.ok)throw await r.VL.fromResponse(S);return await S.json()}}class R{constructor(o){X(this,"configApi");X(this,"discoveryApi");X(this,"identityApi");X(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.identityApi=o.identityApi,this.fetchApi=o.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var o;return(o=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?o:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(o,u){const{kind:m,namespace:y,name:g}=o,S=`${await this.getStorageUrl()}/${y}/${m}/${g}/${u}`,b=await this.fetchApi.fetch(`${S.endsWith("/")?S:`${S}/`}index.html`);let O="";switch(b.status){case 404:throw O="Page not found. ",u||(O+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(O);case 500:throw O="Could not generate documentation or an error in the TechDocs backend. ",new Error(O);default:break}return b.text()}async syncEntityDocs(o,u=()=>{}){const{kind:m,namespace:y,name:g}=o,S=`${await this.getApiOrigin()}/sync/${y}/${m}/${g}`,{token:b}=await this.identityApi.getCredentials();return new Promise((O,$)=>{const B=new t.EventSourcePolyfill(S,{withCredentials:!0,headers:b?{Authorization:`Bearer ${b}`}:{}});B.addEventListener("log",F=>{F.data&&u(JSON.parse(F.data))}),B.addEventListener("finish",F=>{let D=!1;F.data&&({updated:D}=JSON.parse(F.data)),O(D?"updated":"cached")}),B.onerror=F=>{switch(B.close(),F.status){case 404:$(new r.dR(F.message));return;default:$(new Error(F.data));return}}})}async getBaseUrl(o,u,m){const{kind:y,namespace:g,name:E}=u,b=`${await this.getApiOrigin()}/static/docs/${g}/${y}/${E}/${m}`;return new URL(o,b.endsWith("/")?b:`${b}/`).toString()}}},97589:function(te,s,e){"use strict";e.d(s,{D:function(){return r}});function r(t,c){return c.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(te,s,e){"use strict";e.d(s,{u:function(){return o}});var r=e(2784),t=e(82339),c=e(17429),i=e(1114),R=e(70335),f=e(21956);const o=u=>{const{initialFilter:m="owned",columns:y,actions:g}=u;return r.createElement(i.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(R.f,null),r.createElement(c.UserListPicker,{initialFilter:m}),r.createElement(c.EntityOwnerPicker,null),r.createElement(c.EntityTagPicker,null)),r.createElement(c.CatalogFilterLayout.Content,null,r.createElement(f.EntityListDocsTable,{actions:g,columns:y}))))))}},51016:function(te,s,e){"use strict";e.d(s,{f:function(){return y}});var r=e(68725),t=e(97589),c=e(36964),i=e(82339),R=e(94339),f=e(16111),o=e(24579),u=e(14503),m=e(2784);const y=S=>{const{entities:b}=S,O=(0,c.useRouteRef)(r.Fw),$=(0,c.useApi)(c.configApiRef);return b?m.createElement(i.ItemCardGrid,{"data-testid":"docs-explore"},b!=null&&b.length?b.map((B,F)=>{var D,x;return m.createElement(R.Z,{key:F},m.createElement(f.Z,null,m.createElement(i.ItemCardHeader,{title:(D=B.metadata.title)!=null?D:B.metadata.name})),m.createElement(o.Z,null,B.metadata.description),m.createElement(u.Z,null,m.createElement(i.Button,{to:O({namespace:(0,t.D)((x=B.metadata.namespace)!=null?x:"default",$),kind:(0,t.D)(B.kind,$),name:(0,t.D)(B.metadata.name,$)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var g=e(17429);const E=()=>{const{loading:S,error:b,entities:O}=useEntityList();return b?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:b.toString()})):S||!O?React.createElement(Progress,null):(O.sort(($,B)=>{var F,D;return((F=$.metadata.title)!=null?F:$.metadata.name).localeCompare((D=B.metadata.title)!=null?D:B.metadata.name)}),React.createElement(DocsCardGrid,{entities:O}))}},38634:function(te,s,e){"use strict";e.d(s,{H:function(){return g}});var r=e(2784),t=e(95074),c=e(36964),i=e(48023),R=e(17429),f=e(68725),o=e(82339),u=e(98095),m=e(3792),y=e(97589);const g=E=>{const{entities:S,title:b,loading:O,columns:$,actions:B}=E,[,F]=(0,t.Z)(),D=(0,c.useRouteRef)(f.Fw),x=(0,c.useApi)(c.configApiRef);if(!S)return null;const w=S.map(le=>{var xe;const Re=(0,R.getEntityRelations)(le,i.S4);return{entity:le,resolved:{docsUrl:D({namespace:(0,y.D)((xe=le.metadata.namespace)!=null?xe:"default",x),kind:(0,y.D)(le.kind,x),name:(0,y.D)(le.metadata.name,x)}),ownedByRelations:Re,ownedByRelationsTitle:Re.map(De=>(0,R.humanizeEntityRef)(De,{defaultKind:"group"})).join(", ")}}}),k=[m.N.createNameColumn(),m.N.createOwnerColumn(),m.N.createTypeColumn()],re=[u.n.createCopyDocsUrlAction(F)];return r.createElement(r.Fragment,null,O||w&&w.length>0?r.createElement(o.Table,{isLoading:O,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:w,columns:$||k,actions:B||re,title:b?`${b} (${w.length})`:`All (${w.length})`}):r.createElement(o.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:r.createElement(o.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))};g.columns=m.N,g.actions=u.n},12481:function(te,s,e){"use strict";e.d(s,{n:function(){return y}});var r=e(2784),t=e(95074),c=e(76635),i=e.n(c),R=e(82339),f=e(17429),o=e(38634),u=e(98095),m=e(3792);const y=g=>{var re,le;const{columns:E,actions:S}=g,{loading:b,error:O,entities:$,filters:B}=(0,f.useEntityList)(),{isStarredEntity:F,toggleStarredEntity:D}=(0,f.useStarredEntities)(),[,x]=(0,t.Z)(),w=(0,c.capitalize)((le=(re=B.user)==null?void 0:re.value)!=null?le:"all"),k=[u.n.createCopyDocsUrlAction(x),u.n.createStarEntityAction(F,D)];return O?r.createElement(R.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(R.CodeSnippet,{language:"text",text:O.toString()})):r.createElement(o.H,{title:w,entities:$,loading:b,actions:S||k,columns:E})};y.columns=m.N,y.actions=u.n},98095:function(te,s,e){"use strict";e.d(s,{n:function(){return o}});var r=e(2784),t=e(39981),c=e(2337),i=e(11640),R=e(28347);const f=(0,c.Z)({root:{color:"#f3ba37"}})(i.Z),o={createCopyDocsUrlAction(u){return m=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>u(`${window.location.origin}${m.resolved.docsUrl}`)})},createStarEntityAction(u,m){return({entity:y})=>{const g=u(y);return{cellStyle:{paddingLeft:"1em"},icon:()=>g?r.createElement(f,null):r.createElement(R.Z,null),tooltip:g?"Remove from favorites":"Add to favorites",onClick:()=>m(y)}}}}},3792:function(te,s,e){"use strict";e.d(s,{N:function(){return R}});var r=e(2784),t=e(82339),c=e(17429);function i(f){return f.metadata.title||f.metadata.name}const R={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:f=>r.createElement(t.SubvalueCell,{value:r.createElement(t.Link,{to:f.resolved.docsUrl},i(f.entity)),subvalue:f.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:f})=>r.createElement(c.EntityRefLinks,{entityRefs:f.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},21956:function(te,s,e){"use strict";e.d(s,{DocsTable:function(){return t.H},EntityListDocsTable:function(){return r.n}});var r=e(12481),t=e(38634),c=e(72580),i=e.n(c);e.o(c,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return c.DefaultTechDocsHome}})},72580:function(){},50021:function(te,s,e){"use strict";e.r(s),e.d(s,{TechDocsIndexPage:function(){return i}});var r=e(2784),t=e(10289),c=e(2546);const i=R=>(0,t.pC)()||r.createElement(c.u,{...R})},1114:function(te,s,e){"use strict";e.d(s,{j:function(){return i}});var r=e(2784),t=e(82339),c=e(36964);const i=R=>{var m;const{children:f}=R,u=`Documentation available in ${(m=(0,c.useApi)(c.configApiRef).getOptionalString("organization.name"))!=null?m:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:u,themeId:"documentation"},f)}},70335:function(te,s,e){"use strict";e.d(s,{f:function(){return i}});var r=e(2784),t=e(17429);class c{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const i=()=>{const{updateFilters:R}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{R({techdocs:new c})},[R]),null}},19192:function(te,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return c.u}});var r=e(51016),t=e(21956),c=e(2546),i=e(1114),R=e(70335)},82250:function(te,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return o.DefaultTechDocsHome},TechDocsIndexPage:function(){return u.Jl},TechDocsReaderPage:function(){return u.I6},TechDocsReaderPageContent:function(){return R.Fq},TechDocsReaderPageHeader:function(){return R.SE},plugin:function(){return u.s4},techdocsPlugin:function(){return u.s4}});var r=e(98157),t=e.n(r);e.o(r,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return r.DefaultTechDocsHome}}),e.o(r,"TechDocsReaderPageContent")&&e.d(s,{TechDocsReaderPageContent:function(){return r.TechDocsReaderPageContent}}),e.o(r,"TechDocsReaderPageHeader")&&e.d(s,{TechDocsReaderPageHeader:function(){return r.TechDocsReaderPageHeader}});var c=e(3337),i=e(42723),R=e(96393),f=e(47861),o=e(19192),u=e(20961),m=e(94067)},20961:function(te,s,e){"use strict";e.d(s,{I6:function(){return y},Jl:function(){return m},s4:function(){return R}});var r=e(56338),t=e(42723),c=e(68725),i=e(36964);const R=(0,i.createPlugin)({id:"techdocs",apis:[(0,i.createApiFactory)({api:r.Dl,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef,fetchApi:i.fetchApiRef},factory:({configApi:g,discoveryApi:E,identityApi:S,fetchApi:b})=>new t.k({configApi:g,discoveryApi:E,identityApi:S,fetchApi:b})}),(0,i.createApiFactory)({api:r.gT,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,fetchApi:i.fetchApiRef},factory:({configApi:g,discoveryApi:E,fetchApi:S})=>new t.p({configApi:g,discoveryApi:E,fetchApi:S})})],routes:{root:c._Z,docRoot:c.Fw,entityContent:c.pd}}),f=R.provide((0,i.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.Router),mountPoint:c._Z})),o=R.provide((0,i.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.EmbeddedDocsRouter),mountPoint:c.pd})),u=R.provide((0,i.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(g=>g.TechDocsCustomHome),mountPoint:c._Z})),m=R.provide((0,i.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(g=>g.TechDocsIndexPage),mountPoint:c._Z})),y=R.provide((0,i.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,26220)).then(g=>g.TechDocsReaderPage),mountPoint:c.Fw}))},26220:function(te,s,e){"use strict";e.r(s),e.d(s,{TechDocsReaderLayout:function(){return u},TechDocsReaderPage:function(){return m}});var r=e(2784),t=e(10289),c=e(82339),i=e(56338),R=e(63126),f=e(99954),o=e(16172);const u=({withSearch:y,withHeader:g=!0})=>r.createElement(c.Page,{themeId:"documentation"},g&&r.createElement(f.S,null),r.createElement(o.b,null),r.createElement(R.F,{withSearch:y})),m=y=>{const{kind:g,name:E,namespace:S}=(0,t.UO)(),{children:b,entityRef:O={kind:g,name:E,namespace:S}}=y,$=(0,t.pC)();if(!b){const F=($?r.Children.toArray($.props.children):[]).find(D=>{var w,k;const{type:x}=D;return!((k=(w=x==null?void 0:x.__backstage_data)==null?void 0:w.map)!=null&&k.get(i.Zz))});return r.createElement(i.ZS,{entityRef:O},F||r.createElement(u,null))}return r.createElement(i.ZS,{entityRef:O},({metadata:B,entityMetadata:F,onReady:D})=>r.createElement("div",{className:"techdocs-reader-page"},r.createElement(c.Page,{themeId:"documentation"},b instanceof Function?b({entityRef:O,techdocsMetadataValue:B.value,entityMetadataValue:F.value,onReady:D}):b)))}},63126:function(te,s,e){"use strict";e.d(s,{F:function(){return tn}});var r=e(2784),t=e(79692),c=e(60905),i=e(56338),R=e(82339),f=e(47861),o=e(4614),u=e(77277),m=e(99688),y=e(12420),g=e(90436),E=e(61837),S=e(4190),b=e(87685);const O=(0,t.Z)(U=>(0,y.Z)({paper:{width:"100%",[U.breakpoints.up("sm")]:{width:"75%"},[U.breakpoints.up("md")]:{width:"50%"},padding:U.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:U.palette.background.default}})),$=({buildLog:U,onClose:oe})=>{const ne=O(),Ae=U.length===0?"Waiting for logs...":U.join(`
|
|
32
|
-
`);return r.createElement(c.Z,{container:!0,direction:"column",className:ne.root,spacing:0,wrap:"nowrap"},r.createElement(c.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(g.Z,{variant:"h5"},"Build Details"),r.createElement(E.Z,{key:"dismiss",title:"Close the drawer",onClick:oe,color:"inherit"},r.createElement(b.Z,null))),r.createElement(R.LogViewer,{text:Ae,classes:{root:ne.logs}}))},B=({buildLog:U})=>{const oe=O(),[ne,Ae]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(u.Z,{color:"inherit",onClick:()=>Ae(!0)},"Show Build Logs"),r.createElement(S.ZP,{classes:{paper:oe.paper},anchor:"right",open:ne,onClose:()=>Ae(!1)},r.createElement($,{buildLog:U,onClose:()=>Ae(!1)})))};var F=e(36964);const D=({errorMessage:U})=>{const oe=(0,F.useApi)(F.configApiRef).getOptionalString("techdocs.builder");let ne="";return oe!=="local"&&(ne="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),r.createElement(R.ErrorPage,{status:"404",statusMessage:U||"Documentation not found",additionalInfo:ne})};var x=e(2263);const w=(0,t.Z)(U=>({root:{marginBottom:U.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),k=()=>{let U=null;const oe=w(),{state:ne,contentReload:Ae,contentErrorMessage:Ue,syncErrorMessage:ft,buildLog:ze}=(0,x.DK)();return ne==="INITIAL_BUILD"&&(U=r.createElement(m.Z,{classes:{root:oe.root},variant:"outlined",severity:"info",icon:r.createElement(o.Z,{size:"24px"}),action:r.createElement(B,{buildLog:ze})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),ne==="CONTENT_STALE_REFRESHING"&&(U=r.createElement(m.Z,{variant:"outlined",severity:"info",icon:r.createElement(o.Z,{size:"24px"}),action:r.createElement(B,{buildLog:ze}),classes:{root:oe.root}},"A newer version of this documentation is being prepared and will be available shortly.")),ne==="CONTENT_STALE_READY"&&(U=r.createElement(m.Z,{variant:"outlined",severity:"success",action:r.createElement(u.Z,{color:"inherit",onClick:()=>Ae()},"Refresh"),classes:{root:oe.root}},"A newer version of this documentation is now available, please refresh to view.")),ne==="CONTENT_STALE_ERROR"&&(U=r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(B,{buildLog:ze}),classes:{root:oe.root,message:oe.message}},"Building a newer version of this documentation failed."," ",ft)),ne==="CONTENT_NOT_FOUND"&&(U=r.createElement(r.Fragment,null,ft&&r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(B,{buildLog:ze}),classes:{root:oe.root,message:oe.message}},"Building a newer version of this documentation failed."," ",ft),r.createElement(D,{errorMessage:Ue}))),U};var re=e(10289),le=e(60364),Re=e(41156),xe=e(36356),De=e(35368),je=e.n(De);const ve=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Je=/^https:\/\/fonts\.googleapis\.com/,nt=/^https:\/\/fonts\.gstatic\.com/,Tt=U=>U.nodeName==="LINK",At=U=>{const oe=(U==null?void 0:U.getAttribute("href"))||"",ne=oe.match(ve),Ae=oe.match(Je),Ue=oe.match(nt);return ne||Ae||Ue},Ie=U=>(Tt(U)&&!At(U)&&U.remove(),U),ht=U=>U.nodeName==="IFRAME",gt=(U,oe)=>{const ne=U.getAttribute("src")||"";try{const{host:Ae}=new URL(ne);return oe.includes(Ae)}catch{return!1}},lt=U=>oe=>(ht(oe)&&!gt(oe,U)&&oe.remove(),oe),_=()=>{const U=(0,F.useApi)(F.configApiRef);return(0,r.useMemo)(()=>U.getOptionalConfig("techdocs.sanitizer"),[U])},pe=()=>{const U=_();return(0,r.useCallback)(async oe=>{const ne=U==null?void 0:U.getOptionalStringArray("allowedIframeHosts");je().addHook("beforeSanitizeElements",Ie);const Ae=["link"];return ne&&(Ae.push("iframe"),je().addHook("beforeSanitizeElements",lt(ne))),je().sanitize(oe.innerHTML,{ADD_TAGS:Ae,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[U])};var be=e(41128),We=({theme:U})=>`
|
|
33
|
-
/*================== Variables ==================*/
|
|
34
|
-
/*
|
|
35
|
-
As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.
|
|
36
|
-
As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
:host {
|
|
40
|
-
/* FONT */
|
|
41
|
-
--md-default-fg-color: ${U.palette.text.primary};
|
|
42
|
-
--md-default-fg-color--light: ${U.palette.text.secondary};
|
|
43
|
-
--md-default-fg-color--lighter: ${(0,be.$n)(U.palette.text.secondary,.7)};
|
|
44
|
-
--md-default-fg-color--lightest: ${(0,be.$n)(U.palette.text.secondary,.3)};
|
|
45
|
-
|
|
46
|
-
/* BACKGROUND */
|
|
47
|
-
--md-default-bg-color:${U.palette.background.default};
|
|
48
|
-
--md-default-bg-color--light: ${U.palette.background.paper};
|
|
49
|
-
--md-default-bg-color--lighter: ${(0,be.$n)(U.palette.background.paper,.7)};
|
|
50
|
-
--md-default-bg-color--lightest: ${(0,be.$n)(U.palette.background.paper,.3)};
|
|
51
|
-
|
|
52
|
-
/* PRIMARY */
|
|
53
|
-
--md-primary-fg-color: ${U.palette.primary.main};
|
|
54
|
-
--md-primary-fg-color--light: ${U.palette.primary.light};
|
|
55
|
-
--md-primary-fg-color--dark: ${U.palette.primary.dark};
|
|
56
|
-
--md-primary-bg-color: ${U.palette.primary.contrastText};
|
|
57
|
-
--md-primary-bg-color--light: ${(0,be.$n)(U.palette.primary.contrastText,.7)};
|
|
58
|
-
|
|
59
|
-
/* ACCENT */
|
|
60
|
-
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
61
|
-
|
|
62
|
-
/* SHADOW */
|
|
63
|
-
--md-shadow-z1: ${U.shadows[1]};
|
|
64
|
-
--md-shadow-z2: ${U.shadows[2]};
|
|
65
|
-
--md-shadow-z3: ${U.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: ${U.palette.text.primary};
|
|
102
|
-
--md-code-bg-color: ${U.palette.background.paper};
|
|
103
|
-
--md-code-hl-color: ${(0,be.Fq)(U.palette.warning.main,.5)};
|
|
104
|
-
--md-code-hl-keyword-color: ${U.palette.type==="dark"?U.palette.primary.light:U.palette.primary.dark};
|
|
105
|
-
--md-code-hl-function-color: ${U.palette.type==="dark"?U.palette.secondary.light:U.palette.secondary.dark};
|
|
106
|
-
--md-code-hl-string-color: ${U.palette.type==="dark"?U.palette.success.light:U.palette.success.dark};
|
|
107
|
-
--md-code-hl-number-color: ${U.palette.type==="dark"?U.palette.error.light:U.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: ${U.palette.text.primary};
|
|
122
|
-
--md-typeset-del-color: ${U.palette.type==="dark"?(0,be.Fq)(U.palette.error.dark,.5):(0,be.Fq)(U.palette.error.light,.5)};
|
|
123
|
-
--md-typeset-ins-color: ${U.palette.type==="dark"?(0,be.Fq)(U.palette.success.dark,.5):(0,be.Fq)(U.palette.success.light,.5)};
|
|
124
|
-
--md-typeset-mark-color: ${U.palette.type==="dark"?(0,be.Fq)(U.palette.warning.dark,.5):(0,be.Fq)(U.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
|
-
`,tt=({theme:U})=>`
|
|
141
|
-
/*================== Reset ==================*/
|
|
142
|
-
|
|
143
|
-
body {
|
|
144
|
-
--md-text-color: var(--md-default-fg-color);
|
|
145
|
-
--md-text-link-color: var(--md-accent-fg-color);
|
|
146
|
-
--md-text-font-family: ${U.typography.fontFamily};
|
|
147
|
-
font-family: var(--md-text-font-family);
|
|
148
|
-
background-color: unset;
|
|
149
|
-
}
|
|
150
|
-
`;const at="224px";var Et=({theme:U,sidebar:oe})=>`
|
|
151
|
-
/*================== Layout ==================*/
|
|
152
|
-
|
|
153
|
-
.md-grid {
|
|
154
|
-
max-width: 100%;
|
|
155
|
-
margin: 0;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.md-nav {
|
|
159
|
-
font-size: calc(var(--md-typeset-font-size) * 0.9);
|
|
160
|
-
}
|
|
161
|
-
.md-nav__link {
|
|
162
|
-
display: flex;
|
|
163
|
-
align-items: center;
|
|
164
|
-
justify-content: space-between;
|
|
165
|
-
}
|
|
166
|
-
.md-nav__icon {
|
|
167
|
-
height: 20px !important;
|
|
168
|
-
width: 20px !important;
|
|
169
|
-
margin-left:${U.spacing(1)}px;
|
|
170
|
-
}
|
|
171
|
-
.md-nav__icon svg {
|
|
172
|
-
margin: 0;
|
|
173
|
-
width: 20px !important;
|
|
174
|
-
height: 20px !important;
|
|
175
|
-
}
|
|
176
|
-
.md-nav__icon:after {
|
|
177
|
-
width: 20px !important;
|
|
178
|
-
height: 20px !important;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.md-nav__item--active > .md-nav__link, a.md-nav__link--active {
|
|
182
|
-
text-decoration: underline;
|
|
183
|
-
color: var(--md-typeset-a-color);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.md-main__inner {
|
|
187
|
-
margin-top: 0;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.md-sidebar {
|
|
191
|
-
bottom: 75px;
|
|
192
|
-
position: fixed;
|
|
193
|
-
width: 16rem;
|
|
194
|
-
overflow-y: auto;
|
|
195
|
-
overflow-x: hidden;
|
|
196
|
-
scrollbar-color: rgb(193, 193, 193) #eee;
|
|
197
|
-
scrollbar-width: thin;
|
|
198
|
-
}
|
|
199
|
-
.md-sidebar .md-sidebar__scrollwrap {
|
|
200
|
-
width: calc(12.1rem);
|
|
201
|
-
}
|
|
202
|
-
.md-sidebar--secondary {
|
|
203
|
-
right: ${U.spacing(3)}px;
|
|
204
|
-
}
|
|
205
|
-
.md-sidebar::-webkit-scrollbar {
|
|
206
|
-
width: 5px;
|
|
207
|
-
}
|
|
208
|
-
.md-sidebar::-webkit-scrollbar-button {
|
|
209
|
-
width: 5px;
|
|
210
|
-
height: 5px;
|
|
211
|
-
}
|
|
212
|
-
.md-sidebar::-webkit-scrollbar-track {
|
|
213
|
-
background: #eee;
|
|
214
|
-
border: 1 px solid rgb(250, 250, 250);
|
|
215
|
-
box-shadow: 0px 0px 3px #dfdfdf inset;
|
|
216
|
-
border-radius: 3px;
|
|
217
|
-
}
|
|
218
|
-
.md-sidebar::-webkit-scrollbar-thumb {
|
|
219
|
-
width: 5px;
|
|
220
|
-
background: rgb(193, 193, 193);
|
|
221
|
-
border: transparent;
|
|
222
|
-
border-radius: 3px;
|
|
223
|
-
}
|
|
224
|
-
.md-sidebar::-webkit-scrollbar-thumb:hover {
|
|
225
|
-
background: rgb(125, 125, 125);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.md-content {
|
|
229
|
-
max-width: calc(100% - 16rem * 2);
|
|
230
|
-
margin-left: 16rem;
|
|
231
|
-
margin-bottom: 50px;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.md-footer {
|
|
235
|
-
position: fixed;
|
|
236
|
-
bottom: 0px;
|
|
237
|
-
}
|
|
238
|
-
.md-footer__title {
|
|
239
|
-
background-color: unset;
|
|
240
|
-
}
|
|
241
|
-
.md-footer-nav__link {
|
|
242
|
-
width: 16rem;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.md-dialog {
|
|
246
|
-
background-color: unset;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
@media screen and (min-width: 76.25em) {
|
|
250
|
-
.md-sidebar {
|
|
251
|
-
height: auto;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
@media screen and (max-width: 76.1875em) {
|
|
256
|
-
.md-nav {
|
|
257
|
-
transition: none !important;
|
|
258
|
-
background-color: var(--md-default-bg-color)
|
|
259
|
-
}
|
|
260
|
-
.md-nav--primary .md-nav__title {
|
|
261
|
-
cursor: auto;
|
|
262
|
-
color: var(--md-default-fg-color);
|
|
263
|
-
font-weight: 700;
|
|
264
|
-
white-space: normal;
|
|
265
|
-
line-height: 1rem;
|
|
266
|
-
height: auto;
|
|
267
|
-
display: flex;
|
|
268
|
-
flex-flow: column;
|
|
269
|
-
row-gap: 1.6rem;
|
|
270
|
-
padding: 1.2rem .8rem .8rem;
|
|
271
|
-
background-color: var(--md-default-bg-color);
|
|
272
|
-
}
|
|
273
|
-
.md-nav--primary .md-nav__title~.md-nav__list {
|
|
274
|
-
box-shadow: none;
|
|
275
|
-
}
|
|
276
|
-
.md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
|
|
277
|
-
border-top: none;
|
|
278
|
-
}
|
|
279
|
-
.md-nav--primary .md-nav__title .md-nav__button {
|
|
280
|
-
display: none;
|
|
281
|
-
}
|
|
282
|
-
.md-nav--primary .md-nav__title .md-nav__icon {
|
|
283
|
-
color: var(--md-default-fg-color);
|
|
284
|
-
position: static;
|
|
285
|
-
height: auto;
|
|
286
|
-
margin: 0 0 0 -0.2rem;
|
|
287
|
-
}
|
|
288
|
-
.md-nav--primary > .md-nav__title [for="none"] {
|
|
289
|
-
padding-top: 0;
|
|
290
|
-
}
|
|
291
|
-
.md-nav--primary .md-nav__item {
|
|
292
|
-
border-top: none;
|
|
293
|
-
}
|
|
294
|
-
.md-nav--primary :is(.md-nav__title,.md-nav__item) {
|
|
295
|
-
font-size : var(--md-typeset-font-size);
|
|
296
|
-
}
|
|
297
|
-
.md-nav .md-source {
|
|
298
|
-
display: none;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.md-sidebar {
|
|
302
|
-
height: 100%;
|
|
303
|
-
}
|
|
304
|
-
.md-sidebar--primary {
|
|
305
|
-
width: 12.1rem !important;
|
|
306
|
-
z-index: 200;
|
|
307
|
-
left: ${oe.isPinned?`calc(-12.1rem + ${at})`:"calc(-12.1rem + 72px)"} !important;
|
|
308
|
-
}
|
|
309
|
-
.md-sidebar--secondary:not([hidden]) {
|
|
310
|
-
display: none;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.md-content {
|
|
314
|
-
max-width: 100%;
|
|
315
|
-
margin-left: 0;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.md-header__button {
|
|
319
|
-
margin: 0.4rem 0;
|
|
320
|
-
margin-left: 0.4rem;
|
|
321
|
-
padding: 0;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.md-overlay {
|
|
325
|
-
left: 0;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.md-footer {
|
|
329
|
-
position: static;
|
|
330
|
-
padding-left: 0;
|
|
331
|
-
}
|
|
332
|
-
.md-footer-nav__link {
|
|
333
|
-
/* footer links begin to overlap at small sizes without setting width */
|
|
334
|
-
width: 50%;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
@media screen and (max-width: 600px) {
|
|
339
|
-
.md-sidebar--primary {
|
|
340
|
-
left: -12.1rem !important;
|
|
341
|
-
width: 12.1rem;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
`;const se=["h1","h2","h3","h4","h5","h6"];var ae=({theme:U})=>`
|
|
345
|
-
/*================== Typeset ==================*/
|
|
346
|
-
|
|
347
|
-
.md-typeset {
|
|
348
|
-
font-size: var(--md-typeset-font-size);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
${se.reduce((oe,ne)=>{var Ft;const Ae=(Ft=U.typography.htmlFontSize)!=null?Ft:16,Ue=U.typography[ne],{lineHeight:ft,fontFamily:ze,fontWeight:zt,fontSize:jt}=Ue,Vt=yt=>{let Yt=1;return typeof yt=="number"&&(Yt=yt/Ae),typeof yt=="string"&&(Yt=yt.replace("rem","")),`calc(${Yt} * var(--md-typeset-font-size))`};return oe.concat(`
|
|
352
|
-
.md-typeset ${ne} {
|
|
353
|
-
color: var(--md-default-fg-color);
|
|
354
|
-
line-height: ${ft};
|
|
355
|
-
font-family: ${ze};
|
|
356
|
-
font-weight: ${zt};
|
|
357
|
-
font-size: ${Vt(jt)};
|
|
358
|
-
}
|
|
359
|
-
`)},"")}
|
|
360
|
-
|
|
361
|
-
.md-typeset .md-content__button {
|
|
362
|
-
color: var(--md-default-fg-color);
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
.md-typeset hr {
|
|
366
|
-
border-bottom: 0.05rem dotted ${U.palette.divider};
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.md-typeset details {
|
|
370
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
371
|
-
}
|
|
372
|
-
.md-typeset details summary {
|
|
373
|
-
padding-left: 2.5rem !important;
|
|
374
|
-
}
|
|
375
|
-
.md-typeset details summary:before,
|
|
376
|
-
.md-typeset details summary:after {
|
|
377
|
-
top: 50% !important;
|
|
378
|
-
width: 20px !important;
|
|
379
|
-
height: 20px !important;
|
|
380
|
-
transform: rotate(0deg) translateY(-50%) !important;
|
|
381
|
-
}
|
|
382
|
-
.md-typeset details[open] > summary:after {
|
|
383
|
-
transform: rotate(90deg) translateX(-50%) !important;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.md-typeset blockquote {
|
|
387
|
-
color: var(--md-default-fg-color--light);
|
|
388
|
-
border-left: 0.2rem solid var(--md-default-fg-color--light);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.md-typeset table:not([class]) {
|
|
392
|
-
font-size: var(--md-typeset-font-size);
|
|
393
|
-
border: 1px solid var(--md-default-fg-color);
|
|
394
|
-
border-bottom: none;
|
|
395
|
-
border-collapse: collapse;
|
|
396
|
-
}
|
|
397
|
-
.md-typeset table:not([class]) th {
|
|
398
|
-
font-weight: bold;
|
|
399
|
-
}
|
|
400
|
-
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
|
|
401
|
-
border-bottom: 1px solid var(--md-default-fg-color);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb {
|
|
405
|
-
background-color: hsla(0, 0%, 0%, 0.32);
|
|
406
|
-
}
|
|
407
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
408
|
-
background-color: hsla(0, 0%, 0%, 0.87);
|
|
409
|
-
}
|
|
410
|
-
`,Ye=()=>`
|
|
411
|
-
/*================== Animations ==================*/
|
|
412
|
-
/*
|
|
413
|
-
Disable CSS animations on link colors as they lead to issues in dark mode.
|
|
414
|
-
The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
|
|
415
|
-
*/
|
|
416
|
-
.md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
417
|
-
transition: none;
|
|
418
|
-
}
|
|
419
|
-
`,Ge=({theme:U})=>`
|
|
420
|
-
/*================== Extensions ==================*/
|
|
421
|
-
|
|
422
|
-
/* HIGHLIGHT */
|
|
423
|
-
.highlight .md-clipboard:after {
|
|
424
|
-
content: unset;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
.highlight .nx {
|
|
428
|
-
color: ${U.palette.type==="dark"?"#ff53a3":"#ec407a"};
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
/* CODE HILITE */
|
|
432
|
-
.codehilite .gd {
|
|
433
|
-
background-color: ${U.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
.codehilite .gi {
|
|
437
|
-
background-color: ${U.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
/* TABBED */
|
|
441
|
-
.tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
|
|
442
|
-
.tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
|
|
443
|
-
.tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
|
|
444
|
-
.tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
|
|
445
|
-
.tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
|
|
446
|
-
.tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
|
|
447
|
-
.tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
|
|
448
|
-
.tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
|
|
449
|
-
.tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
|
|
450
|
-
.tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
|
|
451
|
-
.tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
|
|
452
|
-
.tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
|
|
453
|
-
.tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
|
|
454
|
-
.tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
|
|
455
|
-
.tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
|
|
456
|
-
.tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
|
|
457
|
-
.tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
|
|
458
|
-
.tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
|
|
459
|
-
.tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
|
|
460
|
-
.tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
|
|
461
|
-
color: var(--md-accent-fg-color);
|
|
462
|
-
border-color: var(--md-accent-fg-color);
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
/* TASK-LIST */
|
|
466
|
-
.task-list-control .task-list-indicator::before {
|
|
467
|
-
background-color: ${U.palette.action.disabledBackground};
|
|
468
|
-
}
|
|
469
|
-
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
470
|
-
background-color: ${U.palette.success.main};
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/* ADMONITION */
|
|
474
|
-
.admonition {
|
|
475
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
476
|
-
}
|
|
477
|
-
.admonition .admonition-title {
|
|
478
|
-
padding-left: 2.5rem !important;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
.admonition .admonition-title:before {
|
|
482
|
-
top: 50% !important;
|
|
483
|
-
width: 20px !important;
|
|
484
|
-
height: 20px !important;
|
|
485
|
-
transform: translateY(-50%) !important;
|
|
486
|
-
}
|
|
487
|
-
`;const $e=[We,tt,Et,ae,Ye,Ge],rt=()=>(0,R.useSidebarPinState)(),Y=()=>{const U=rt(),oe=(0,le.Z)();return(0,r.useMemo)(()=>{const ne={theme:oe,sidebar:U};return $e.reduce((Ae,Ue)=>Ae+Ue(ne),"")},[oe,U])},z=()=>{const U=Y();return(0,r.useCallback)(oe=>(oe.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${U}</style>`),oe),[U])},q=(U,oe,ne)=>{const Ae=U==="src"&&oe.endsWith(".svg"),Ue=!oe.match(/^([a-z]*:)?\/\//i),ft=oe.startsWith(ne);return Ae&&(Ue||ft)},ce=({techdocsStorageApi:U,entityId:oe,path:ne})=>async Ae=>{const Ue=await U.getApiOrigin(),ft=async(ze,zt)=>{for(const jt of ze)if(jt.hasAttribute(zt)){const Vt=jt.getAttribute(zt);if(!Vt)return;const Ft=await U.getBaseUrl(Vt,oe,ne);if(q(zt,Vt,Ue))try{const Yt=await(await fetch(Ft,{credentials:"include"})).text();jt.setAttribute(zt,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Yt)))}`)}catch{jt.setAttribute("alt",`Error: ${Vt}`)}else jt.setAttribute(zt,Ft)}};return await Promise.all([ft(Ae.querySelectorAll("img"),"src"),ft(Ae.querySelectorAll("script"),"src"),ft(Ae.querySelectorAll("source"),"src"),ft(Ae.querySelectorAll("link"),"href"),ft(Ae.querySelectorAll("a[download]"),"href")]),Ae};var fe=e(68370),Pe=e(67097),Oe=e(47093),Se=e(82717),Qe=e.n(Se);const Ke=U=>oe=>{var Yt;const ne=oe.querySelector('[title="Edit this page"]');if(!ne||!ne.href)return oe;const Ae=new URL(ne.href),Ue=U.byUrl(Ae);if((Ue==null?void 0:Ue.type)!=="github"&&(Ue==null?void 0:Ue.type)!=="gitlab")return oe;const ft=((Yt=oe.querySelector("article>h1"))==null?void 0:Yt.childNodes[0].textContent)||"",ze=encodeURIComponent(`Documentation Feedback: ${ft}`),zt=encodeURIComponent(`Page source:
|
|
488
|
-
${ne.href}
|
|
489
|
-
|
|
490
|
-
Feedback:`),jt=(Ue==null?void 0:Ue.type)==="github"?(0,fe.Pb)(Ae.href,"blob"):Ae.href,Vt=Qe()(jt),Ft=`/${Vt.organization}/${Vt.name}`,yt=ne.cloneNode();switch(Ue==null?void 0:Ue.type){case"gitlab":yt.href=`${Ae.origin}${Ft}/issues/new?issue[title]=${ze}&issue[description]=${zt}`;break;case"github":yt.href=`${Ae.origin}${Ft}/issues/new?title=${ze}&body=${zt}`;break;default:return oe}return Oe.render(r.createElement(Pe.Z),yt),yt.style.paddingLeft="5px",yt.title="Leave feedback for this page",yt.id="git-feedback-link",ne==null||ne.insertAdjacentElement("beforebegin",yt),oe};var pt=e(44882);const St=()=>U=>{const oe=U.querySelector('.md-header label[for="__drawer"]'),ne=U.querySelector("article");if(!oe||!ne)return U;const Ae=oe.cloneNode();return Oe.render(r.createElement(pt.Z),Ae),Ae.id="toggle-sidebar",Ae.title="Toggle Sidebar",Ae.classList.add("md-content__button"),Ae.style.setProperty("padding","0 0 0 5px"),Ae.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),ne==null||ne.prepend(Ae),U},ut=()=>U=>(((ne,Ae)=>{Array.from(ne).filter(Ue=>Ue.hasAttribute(Ae)).forEach(Ue=>{const ft=Ue.getAttribute(Ae);if(ft){ft.match(/^https?:\/\//i)&&Ue.setAttribute("target","_blank");try{const ze=Dt(window.location.href);Ue.setAttribute(Ae,new URL(ft,ze).toString())}catch{Ue.replaceWith(Ue.textContent||ft)}}})})(Array.from(U.getElementsByTagName("a")),"href"),U);function Dt(U){const oe=new URL(U);return!oe.pathname.endsWith("/")&&!oe.pathname.endsWith(".html")&&(oe.pathname+="/"),oe.toString()}const Ot=({baseUrl:U,onClick:oe})=>ne=>(Array.from(ne.getElementsByTagName("a")).forEach(Ae=>{Ae.addEventListener("click",Ue=>{const ze=Ae.getAttribute("href");!ze||ze.startsWith(U)&&!Ae.hasAttribute("download")&&(Ue.preventDefault(),oe(Ue,ze))})}),ne);var bt=e(15459),Pt=e(80030),Nt=e(72379),Zt=e(41547);const mn=(0,bt.Z)(U=>({tooltip:{fontSize:"inherit",color:U.palette.text.primary,margin:0,padding:U.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Pt.ZP),On=()=>r.createElement(Nt.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"})),kt=({text:U})=>{const[oe,ne]=(0,r.useState)(!1),Ae=(0,r.useCallback)(()=>{navigator.clipboard.writeText(U),ne(!0)},[U]),Ue=(0,r.useCallback)(()=>{ne(!1)},[ne]);return r.createElement(mn,{title:"Copied to clipboard",placement:"left",open:oe,onClose:Ue,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:Ae},r.createElement(On,null)))},Ut=U=>oe=>{var Ae;const ne=oe.querySelectorAll("pre > code");for(const Ue of ne){const ft=Ue.textContent||"",ze=document.createElement("div");(Ae=Ue==null?void 0:Ue.parentElement)==null||Ae.prepend(ze),Oe.render(r.createElement(Zt.Z,{theme:U},r.createElement(kt,{text:ft})),ze)}return oe},_e=()=>U=>{var oe;return(oe=U.querySelector(".md-header"))==null||oe.remove(),U},ue=()=>U=>{var oe,ne;return(oe=U.querySelector(".md-footer .md-copyright"))==null||oe.remove(),(ne=U.querySelector(".md-footer-copyright"))==null||ne.remove(),U},j=({onLoading:U,onLoaded:oe})=>ne=>(U(),ne.addEventListener(i.Ox,function Ae(){oe(),ne.removeEventListener(i.Ox,Ae)}),ne),ye=()=>U=>(setTimeout(()=>{var oe;if(window.location.hash){const ne=window.location.hash.slice(1);(oe=U==null?void 0:U.querySelector(`[id="${ne}"]`))==null||oe.scrollIntoView()}},200),U),Ve=async(U,oe)=>{let ne;if(typeof U=="string")ne=new DOMParser().parseFromString(U,"text/html").documentElement;else if(U instanceof Element)ne=U;else throw new Error("dom is not a recognized type");for(const Ae of oe)ne=await Ae(ne);return ne},et="screen and (max-width: 76.1875em)",it=U=>{const oe=(0,re.s0)(),ne=(0,le.Z)(),Ae=(0,Re.Z)(et),Ue=pe(),ft=z(),ze=(0,F.useApi)(i.Dl),zt=(0,F.useApi)(xe.q3),{state:jt,path:Vt,content:Ft}=(0,x.DK)(),[yt,Yt]=(0,r.useState)(null),hn=(0,i.ux)(yt),Jt=(0,r.useCallback)(()=>{if(!yt)return;yt.querySelectorAll(".md-sidebar").forEach(It=>{var cn,Sn,on;if(Ae)It.style.top="0px";else{const Rn=document==null?void 0:document.querySelector(".techdocs-reader-page"),Cn=(cn=Rn==null?void 0:Rn.getBoundingClientRect().top)!=null?cn:0;let xn=(Sn=yt.getBoundingClientRect().top)!=null?Sn:0;const wn=yt.querySelector(".md-container > .md-tabs"),M=(on=wn==null?void 0:wn.getBoundingClientRect().height)!=null?on:0;xn<Cn&&(xn=Cn),It.style.top=`${Math.max(xn,0)+M}px`}It.style.setProperty("opacity","1")})},[yt,Ae]);(0,r.useEffect)(()=>(window.addEventListener("resize",Jt),window.addEventListener("scroll",Jt,!0),()=>{window.removeEventListener("resize",Jt),window.removeEventListener("scroll",Jt,!0)}),[yt,Jt]);const qt=(0,r.useCallback)(()=>{if(!yt)return;const Bt=yt.querySelector(".md-footer");Bt&&(Bt.style.width=`${yt.getBoundingClientRect().width}px`)},[yt]);(0,r.useEffect)(()=>(window.addEventListener("resize",qt),()=>{window.removeEventListener("resize",qt)}),[yt,qt]),(0,r.useEffect)(()=>{hn||(qt(),Jt())},[jt,hn,qt,Jt]);const rn=(0,r.useCallback)((Bt,It)=>Ve(Bt,[Ue,ce({techdocsStorageApi:ze,entityId:U,path:It}),ut(),St(),_e(),ue(),Ke(zt),ft]),[U,zt,ze,Ue,ft]),an=(0,r.useCallback)(async Bt=>Ve(Bt,[ye(),Ut(ne),Ot({baseUrl:window.location.origin,onClick:(It,cn)=>{var Rn;const Sn=It.ctrlKey||It.metaKey,on=new URL(cn);on.hash?Sn?window.open(`${on.pathname}${on.hash}`,"_blank"):(oe(`${on.pathname}${on.hash}`),(Rn=Bt==null?void 0:Bt.querySelector(`#${on.hash.slice(1)}`))==null||Rn.scrollIntoView()):Sn?window.open(on.pathname,"_blank"):oe(on.pathname)}}),j({onLoading:()=>{},onLoaded:()=>{var It;(It=Bt.querySelector(".md-nav__title"))==null||It.removeAttribute("for")}}),j({onLoading:()=>{Array.from(Bt.querySelectorAll(".md-sidebar")).forEach(cn=>{cn.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[ne,oe]);return(0,r.useEffect)(()=>{if(!Ft)return()=>{};let Bt=!0;return rn(Ft,Vt).then(async It=>{if(!(It!=null&&It.innerHTML)||!Bt)return;window.scroll({top:0});const cn=await an(It);Yt(cn)}),()=>{Bt=!1}},[Ft,Vt,rn,an]),yt};var Rt=e(8560);const Xt=()=>{const U=(0,i.$L)(),{shadowRoot:oe}=(0,i.x1)(),ne=oe==null?void 0:oe.querySelector('[data-md-component="content"]'),Ae=oe==null?void 0:oe.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let Ue=Ae==null?void 0:Ae.querySelector('[data-techdocs-addons-location="primary sidebar"]');Ue||(Ue=document.createElement("div"),Ue.setAttribute("data-techdocs-addons-location","primary sidebar"),Ae==null||Ae.prepend(Ue));const ft=oe==null?void 0:oe.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let ze=ft==null?void 0:ft.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return ze||(ze=document.createElement("div"),ze.setAttribute("data-techdocs-addons-location","secondary sidebar"),ft==null||ft.prepend(ze)),r.createElement(r.Fragment,null,r.createElement(Rt.Z,{container:Ue},U.renderComponentsByLocation(i.oZ.PrimarySidebar)),r.createElement(Rt.Z,{container:ne},U.renderComponentsByLocation(i.oZ.Content)),r.createElement(Rt.Z,{container:ze},U.renderComponentsByLocation(i.oZ.SecondarySidebar)))},en=(0,t.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),tn=(0,x.m1)(U=>{var Ft;const{withSearch:oe=!0,onReady:ne}=U,Ae=en(),{entityMetadata:{value:Ue,loading:ft},entityRef:ze,setShadowRoot:zt}=(0,i.x1)(),jt=it(ze),Vt=(0,r.useCallback)(yt=>{zt(yt),ne instanceof Function&&ne()},[zt,ne]);return ft===!1&&!Ue?r.createElement(R.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}):jt?r.createElement(R.Content,null,r.createElement(c.Z,{container:!0},r.createElement(c.Z,{xs:12,item:!0},r.createElement(k,null)),oe&&r.createElement(c.Z,{className:Ae.search,xs:"auto",item:!0},r.createElement(f.S,{entityId:ze,entityTitle:(Ft=Ue==null?void 0:Ue.metadata)==null?void 0:Ft.title})),r.createElement(c.Z,{xs:12,item:!0},r.createElement(i.VA,{element:jt,onAppend:Vt},r.createElement(Xt,null))))):r.createElement(R.Content,null,r.createElement(c.Z,{container:!0},r.createElement(c.Z,{xs:12,item:!0},r.createElement(k,null))))}),En=null},99954:function(te,s,e){"use strict";e.d(s,{S:function(){return E}});var r=e(2784),t=e(18671),c=e(98069),i=e(73250),R=e(56338),f=e(17429),o=e(48023),u=e(82339),m=e(36964),y=e(68725);const g=r.createElement(c.Z,{animation:"wave",variant:"text",height:40}),E=S=>{const{children:b}=S,O=(0,R.$L)(),$=(0,m.useApi)(m.configApiRef),{title:B,setTitle:F,subtitle:D,setSubtitle:x,entityRef:w,metadata:{value:k,loading:re},entityMetadata:{value:le,loading:Re}}=(0,R.x1)();(0,r.useEffect)(()=>{!k||(F(gt=>{const{site_name:lt}=k;return gt||lt}),x(gt=>{let{site_description:lt}=k;return(!lt||lt==="None")&&(lt="Home"),gt||lt}))},[k,F,x]);const xe=$.getOptional("app.title")||"Backstage",De=[B,D,xe].filter(Boolean).join(" | "),{locationMetadata:je,spec:ve}=le||{},Je=ve==null?void 0:ve.lifecycle,nt=le?(0,f.getEntityRelations)(le,o.S4):[],Tt=(0,m.useRouteRef)(y._Z)(),At=r.createElement(r.Fragment,null,r.createElement(u.HeaderLabel,{label:"Component",value:r.createElement(f.EntityRefLink,{color:"inherit",entityRef:w,title:le==null?void 0:le.metadata.title,defaultKind:"Component"})}),nt.length>0&&r.createElement(u.HeaderLabel,{label:"Owner",value:r.createElement(f.EntityRefLinks,{color:"inherit",entityRefs:nt,defaultKind:"group"})}),Je?r.createElement(u.HeaderLabel,{label:"Lifecycle",value:Je}):null,je&&je.type!=="dir"&&je.type!=="file"?r.createElement(u.HeaderLabel,{label:"",value:r.createElement("a",{href:je.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(i.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return!Re&&le===void 0||!re&&k===void 0?null:r.createElement(u.Header,{type:"Documentation",typeLink:Tt,title:B||g,subtitle:D||g},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,De)),At,b,O.renderComponentsByLocation(R.oZ.Header))}},16172:function(te,s,e){"use strict";e.d(s,{b:function(){return g}});var r=e(2784),t=e(79692),c=e(15223),i=e(95544),R=e(80030),f=e(61837),o=e(48348),u=e(47603),m=e(56338);const y=(0,t.Z)(E=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:E.spacing(3,3,0)}})),g=({toolbarProps:E})=>{const S=y(),[b,O]=(0,r.useState)(null),$=(0,r.useCallback)(re=>{O(re.currentTarget)},[]),B=(0,r.useCallback)(()=>{O(null)},[]),{entityMetadata:{value:F,loading:D}}=(0,m.x1)(),x=(0,m.$L)(),w=x.renderComponentsByLocation(m.oZ.Subheader),k=x.renderComponentsByLocation(m.oZ.Settings);return!w&&!k||D===!1&&!F?null:r.createElement(c.Z,{classes:S,...E},r.createElement(i.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},w,k?r.createElement(r.Fragment,null,r.createElement(R.ZP,{title:"Settings"},r.createElement(f.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:$},r.createElement(u.Z,null))),r.createElement(o.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:b,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(b),onClose:B,keepMounted:!0},k)):null))}},2263:function(te,s,e){"use strict";e.d(s,{DK:function(){return g},m1:function(){return S}});var r=e(2784),t=e(10289),c=e(56338),i=e(36964),R=e(64279),f=e(77446);function o({contentLoading:b,content:O,activeSyncState:$}){return b||$==="BUILD_READY_RELOAD"||!O&&$==="CHECKING"?"CHECKING":!O&&$==="BUILDING"?"INITIAL_BUILD":O?$==="BUILDING"?"CONTENT_STALE_REFRESHING":$==="BUILD_READY"?"CONTENT_STALE_READY":$==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function u(b,O){const $={...b};switch(O.type){case"sync":O.state==="CHECKING"&&($.buildLog=[]),$.activeSyncState=O.state,$.syncError=O.syncError;break;case"contentLoading":$.contentLoading=!0,$.contentError=void 0;break;case"content":typeof O.path=="string"&&($.path=O.path),$.contentLoading=!1,$.content=O.content,$.contentError=O.contentError;break;case"buildLog":$.buildLog=$.buildLog.concat(O.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes($.activeSyncState)&&["contentLoading","content"].includes(O.type)&&($.activeSyncState="UP_TO_DATE",$.buildLog=[]),$}function m(b,O,$,B){var le,Re;const[F,D]=(0,r.useReducer)(u,{activeSyncState:"CHECKING",path:B,contentLoading:!0,buildLog:[]}),x=(0,i.useApi)(c.Dl),{retry:w}=(0,f.Z)(async()=>{D({type:"contentLoading"});try{const xe=await x.getEntityDocs({kind:b,namespace:O,name:$},B);return D({type:"content",content:xe,path:B}),xe}catch(xe){D({type:"content",contentError:xe,path:B})}},[x,b,O,$,B]),k=(0,r.useRef)({content:void 0,reload:()=>{}});return k.current={content:F.content,reload:w},(0,R.default)(async()=>{D({type:"sync",state:"CHECKING"});const xe=setTimeout(()=>{D({type:"sync",state:"BUILDING"})},1e3);try{switch(await x.syncEntityDocs({kind:b,namespace:O,name:$},je=>{D({type:"buildLog",log:je})})){case"updated":k.current.content?D({type:"sync",state:"BUILD_READY"}):(k.current.reload(),D({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":D({type:"sync",state:"UP_TO_DATE"});break;default:D({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(De){D({type:"sync",state:"ERROR",syncError:De})}finally{clearTimeout(xe)}},[b,$,O,x,D,k]),{state:(0,r.useMemo)(()=>o({activeSyncState:F.activeSyncState,contentLoading:F.contentLoading,content:F.content}),[F.activeSyncState,F.content,F.contentLoading]),contentReload:w,path:F.path,content:F.content,contentErrorMessage:(le=F.contentError)==null?void 0:le.toString(),syncErrorMessage:(Re=F.syncError)==null?void 0:Re.toString(),buildLog:F.buildLog}}const y=(0,r.createContext)({}),g=()=>(0,r.useContext)(y),E=({children:b})=>{const{"*":O=""}=(0,t.UO)(),{entityRef:$}=(0,c.x1)(),{kind:B,namespace:F,name:D}=$,x=m(B,F,D,O);return r.createElement(y.Provider,{value:x},b instanceof Function?b(x):b)},S=b=>O=>r.createElement(E,null,r.createElement(b,{...O}))},96393:function(te,s,e){"use strict";e.d(s,{Fq:function(){return i.F},SE:function(){return c.S}});var r=e(2263),t=e(26220),c=e(99954),i=e(63126),R=e(16172)},68725:function(te,s,e){"use strict";e.d(s,{Fw:function(){return c},_Z:function(){return t},pd:function(){return i}});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"]}),i=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},47861:function(te,s,e){"use strict";e.d(s,{S:function(){return k}});var r=e(2784),t=e(79692),c=e(49378),i=e(38402),R=e(86136),f=e(85256),o=e(82339),u=e(36964),m=e(74450);const y=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),g=re=>{const{result:le,highlight:Re,rank:xe,lineClamp:De=5,asListItem:je=!0,asLink:ve=!0,title:Je,icon:nt}=re,Tt=y(),At=(0,u.useAnalytics)(),Ie=()=>{At.captureEvent("discover",le.title,{attributes:{to:le.location},value:xe})},ht=()=>{const _=Re!=null&&Re.fields.title?r.createElement(m.FA,{text:Re.fields.title,preTag:Re.preTag,postTag:Re.postTag}):le.title,pe=Re!=null&&Re.fields.entityTitle?r.createElement(m.FA,{text:Re.fields.entityTitle,preTag:Re.preTag,postTag:Re.postTag}):le.entityTitle,be=Re!=null&&Re.fields.name?r.createElement(m.FA,{text:Re.fields.name,preTag:Re.preTag,postTag:Re.postTag}):le.name;return r.createElement(c.Z,{className:Tt.itemText,primaryTypographyProps:{variant:"h6"},primary:Je||r.createElement(r.Fragment,null,_," | ",pe!=null?pe:be," docs"),secondary:r.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:De,overflow:"hidden"}},Re!=null&&Re.fields.text?r.createElement(m.FA,{text:Re.fields.text,preTag:Re.preTag,postTag:Re.postTag}):le.text)})},gt=({children:_})=>ve?r.createElement(o.Link,{noTrack:!0,to:le.location,onClick:Ie},_):r.createElement(r.Fragment,null,_),lt=({children:_})=>je?r.createElement(r.Fragment,null,r.createElement(i.Z,{alignItems:"flex-start"},nt&&r.createElement(R.Z,null,nt),r.createElement("div",{className:Tt.flexContainer},_)),r.createElement(f.Z,{component:"li"})):r.createElement(r.Fragment,null,_);return r.createElement(gt,null,r.createElement(lt,null,r.createElement(ht,null)))};var E=e(86619),S=e(50581),b=e(61837),O=e(4614),$=e(21853),B=e(88013),F=e(10289),D=e(48760);const x=(0,t.Z)({root:{width:"100%"}}),w=re=>{const{entityId:le,entityTitle:Re,debounceTime:xe=150}=re,[De,je]=(0,r.useState)(!1),ve=(0,F.s0)(),{term:Je,setTerm:nt,setFilters:Tt,result:{loading:At,value:Ie}}=(0,m.Rx)(),ht=x(),[gt,lt]=(0,r.useState)([]);(0,r.useEffect)(()=>{let se=!0;if(se&&Ie){const ae=Ie.results.slice(0,10);lt(ae)}return()=>{se=!1}},[At,Ie]);const[_,pe]=(0,r.useState)(Je);(0,D.Z)(()=>nt(_),xe,[_]);const{kind:be,name:We,namespace:tt}=le;(0,r.useEffect)(()=>{Tt(se=>({...se,kind:be,namespace:tt,name:We}))},[be,tt,We,Tt]);const at=se=>{De||je(!0),pe(se.target.value)},Et=(se,ae)=>{if(ae!=null&&ae.document){const{location:Ye}=ae.document;ve(Ye)}};return r.createElement(B.ZP,{classes:{root:ht.root},"data-testid":"techdocs-search-bar",size:"small",open:De,getOptionLabel:()=>"",filterOptions:se=>se,onClose:()=>{je(!1)},onFocus:()=>{je(!0)},onChange:Et,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:gt,renderOption:({document:se,highlight:ae})=>r.createElement(g,{result:se,lineClamp:3,asListItem:!1,asLink:!1,title:se.title,highlight:ae}),loading:At,renderInput:se=>r.createElement(E.Z,{...se,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${Re||le.name} docs`,value:_,onChange:at,InputProps:{...se.InputProps,startAdornment:r.createElement(S.Z,{position:"start"},r.createElement(b.Z,{"aria-label":"Query",disabled:!0},r.createElement($.Z,null))),endAdornment:r.createElement(r.Fragment,null,At?r.createElement(O.Z,{color:"inherit",size:20}):null,se.InputProps.endAdornment)}})})},k=re=>{const le={term:"",types:["techdocs"],pageCursor:"",filters:re.entityId};return r.createElement(m.Nd,{initialState:le},r.createElement(w,{...re}))}},98157:function(){},53260:function(){}},function(te){var s=function(r){return te(te.s=r)};te.O(0,[2370,6202,9284,9035,2126,7012,2194,4983,3222,6816,5218,4736],function(){return s(88649),s(90775)});var e=te.O()}]);})();
|
|
491
|
-
|
|
492
|
-
//# sourceMappingURL=main.ec77374e.js.map
|