UNPKG

@techdocs/cli

Version:

Utility CLI for managing TechDocs sites in Backstage.

1 lines • 521 kB
(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["1889"],{74854(e,t,r){"use strict";r.d(t,{c:()=>i});let i=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},11773(e,t,r){"use strict";r.d(t,{P:()=>a,_P:()=>n,oQ:()=>i});let i="default",n="backstage.io/view-url",a="backstage.io/edit-url"},58077(e,t,r){"use strict";r.d(t,{KU:()=>a,U2:()=>o,sM:()=>n});var i=r(11773);function n(e){return{kind:e.kind,namespace:e.metadata.namespace||i.oQ,name:e.metadata.name}}function a(e,t){let r,n,a;if(!e)throw Error("Entity reference must not be empty");let o=t?.defaultKind,s=t?.defaultNamespace||i.oQ;if("string"==typeof e){let t=function(e){let t=e.indexOf(":"),r=e.indexOf("/");-1!==r&&r<t&&(t=-1);let i=-1===t?void 0:e.slice(0,t),n=-1===r?void 0:e.slice(t+1,r),a=e.slice(Math.max(t+1,r+1));if(""===i||""===n||""===a)throw TypeError(`Entity reference "${e}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:i,namespace:n,name:a}}(e);r=t.kind??o,n=t.namespace??s,a=t.name}else r=e.kind??o,n=e.namespace??s,a=e.name;if(r)if(n){if(!a){let t=JSON.stringify(e);throw Error(`Entity reference ${t} had missing or empty name`)}}else{let t=JSON.stringify(e);throw Error(`Entity reference ${t} had missing or empty namespace`)}else{let t=JSON.stringify(e);throw Error(`Entity reference ${t} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:r,namespace:n,name:a}}function o(e){let t,r,n;return"metadata"in e?(t=e.kind,r=e.metadata.namespace??i.oQ,n=e.metadata.name):(t=e.kind,r=e.namespace??i.oQ,n=e.name),`${t.toLocaleLowerCase("en-US")}:${r.toLocaleLowerCase("en-US")}/${n.toLocaleLowerCase("en-US")}`}},49185(e,t,r){"use strict";let i,n;r.d(t,{sA:()=>G,jn:()=>K,vv:()=>W,nC:()=>V});var a,o=r(55963);function s(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function l(e){if(!s(e))return!1;let t=new Set;return Object.values(e).every(e=>(function e(t,r){return null===t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t||!("object"!=typeof t||r.has(t))&&((r.add(t),Array.isArray(t))?t.every(t=>e(t,r)):!!s(t)&&Object.values(t).every(t=>e(t,r)))})(e,t))}var c=r(11601),d=r.n(c),u=r(67156),p=r.n(u);function h(e){if(!s(e)||"function"==typeof e.then)throw new o.dz("Invalid JSON schema: must be an object");let t=(i||(i=new(d())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0}),p()(i)),i);try{let r=t.validateSchema(e);if("boolean"!=typeof r)throw new o.dz("Expected synchronous validation result")}catch(e){throw new o.dz(`Invalid JSON schema: ${e}`)}let r=t.errors?.[0];if(r){let e=r.message;throw Array.isArray(r?.params?.allowedValues)&&(e+=`, expected one of: ${r.params.allowedValues.join(", ")}`),new o.dz(`Invalid JSON schema, error at path ${r.instancePath}: ${e}`)}return!0}var g=r(71291),f=r(51700),m=r(22654);g.g1(g.Yj(),g.L5()).refine(e=>l(e),{message:"Invalid JSON schema"});let y=g.g1(g.Yj(),g.L5()).superRefine((e,t)=>{try{return h(e)}catch(e){return t.addIssue({code:m.eq.custom,message:(0,f.bJ)(e)?e.message:"Invalid JSON schema"}),!1}}),b=g.re({op:g.eu("declareAnnotation.v1"),name:g.Yj(),properties:g.re({title:g.Yj().optional(),description:g.Yj(),schema:g.re({jsonSchema:y}).optional()})}),v=g.re({op:g.eu("declareKind.v1"),kind:g.Yj(),group:g.Yj(),properties:g.re({singular:g.Yj(),plural:g.Yj(),description:g.Yj()})}),w=g.Ik({allOf:g.PV([g.Ik({$ref:g.eu("Entity")}),g.Ik({type:g.eu("object"),properties:g.Ik({apiVersion:g.g1(g.Yj(),g.L5()).optional(),kind:g.g1(g.Yj(),g.L5()).optional()}).passthrough()}).passthrough()])}).passthrough();function x(e){let t=w.safeParse(e);if(!t.success)return e;let{allOf:r,...i}=t.data,{type:n,properties:a,...o}=r[1],{apiVersion:s,kind:l,...c}=a;return{...i,type:n,...o,properties:c}}let A=["kind","apiVersion","metadata","$ref"],k=["allOf","oneOf","anyOf","if","else","then","not","$ref"],j=g.re({selector:g.re({path:g.Yj()}),relation:g.Yj(),defaultKind:g.Yj().optional(),defaultNamespace:g.k5(["default","inherit"]).optional(),allowedKinds:g.YO(g.Yj()).optional()}),S=g.re({op:g.eu("declareKindVersion.v1"),kind:g.Yj(),name:g.Yj(),specType:g.Yj().optional(),properties:g.re({description:g.Yj().optional(),relationFields:g.YO(j).optional(),schema:g.re({jsonSchema:y})})});function E(e){let t=[];for(let i of e.versions){let n=x(i.schema.jsonSchema);for(let a of(h(n),!function(e){if(!l(e))throw new o.dz("Schema must be an object");for(let t of k)if(t in e)throw new o.dz(`Schema must not use "${t}" keyword in the root`);let t=e.properties;if(!s(t))throw new o.dz('Schema must have a "properties" field that is an object');for(let e of A)if(e in t)throw new o.dz(`Schema must not try to declare the reserved root field "${e}"`);for(let[e,r]of Object.entries(t)){if(!s(r))throw new o.dz(`Schema for root field "${e}" must be an object`);for(let t of k)if(t in r)throw new o.dz(`Schema for root field "${e}" must not use "${t}" keyword`)}}(n),Array.isArray(i.name)?i.name:[i.name]))for(let o of i.specType?[i.specType].flat():[void 0]){var r;t.push((r={kind:e.kind,name:a,specType:o,properties:{description:i.description,relationFields:i.relationFields,schema:{jsonSchema:n}}},S.parse({...r,op:"declareKindVersion.v1"})))}}return t}let I=g.re({op:g.eu("declareLabel.v1"),name:g.Yj(),properties:g.re({title:g.Yj().optional(),description:g.Yj(),schema:g.re({jsonSchema:y}).optional()})}),T=g.re({op:g.eu("declareRelation.v1"),fromKind:g.Yj(),type:g.Yj(),toKind:g.Yj(),properties:g.re({reverseType:g.Yj(),title:g.Yj(),description:g.Yj()})});function C(e){return T.parse({...e,op:"declareRelation.v1"})}let R=g.re({op:g.eu("removeAnnotation.v1"),name:g.Yj()}),$=g.re({op:g.eu("removeKind.v1"),kind:g.Yj()}),N=g.re({op:g.eu("removeLabel.v1"),name:g.Yj()}),O=g.re({op:g.eu("removeTag.v1"),name:g.Yj()}),L=g.re({op:g.eu("declareTag.v1"),name:g.Yj(),properties:g.re({title:g.Yj().optional(),description:g.Yj()})}),P=g.re({op:g.eu("updateAnnotation.v1"),name:g.Yj(),properties:g.re({title:g.Yj().optional(),description:g.Yj().optional(),schema:g.re({jsonSchema:y}).optional()})}),B=g.re({op:g.eu("updateKind.v1"),kind:g.Yj(),properties:g.re({singular:g.Yj().optional(),plural:g.Yj().optional(),description:g.Yj().optional()})}),U=g.re({selector:g.re({path:g.Yj()}),relation:g.Yj(),defaultKind:g.Yj().optional(),defaultNamespace:g.k5(["default","inherit"]).optional(),allowedKinds:g.YO(g.Yj()).optional()}),z=g.re({op:g.eu("updateKindVersion.v1"),kind:g.Yj(),name:g.Yj(),specType:g.Yj().optional(),properties:g.re({description:g.Yj().optional(),relationFields:g.YO(U).optional(),schema:g.re({jsonSchema:y}).optional()})}),M=g.re({op:g.eu("updateLabel.v1"),name:g.Yj(),properties:g.re({title:g.Yj().optional(),description:g.Yj().optional(),schema:g.re({jsonSchema:y}).optional()})}),F=g.re({op:g.eu("updateRelation.v1"),fromKind:g.Yj(),type:g.Yj(),toKind:g.Yj(),properties:g.re({reverseType:g.Yj().optional(),title:g.Yj().optional(),description:g.Yj().optional()})});function D(e){return F.parse({...e,op:"updateRelation.v1"})}let _=g.re({op:g.eu("updateTag.v1"),name:g.Yj(),properties:g.re({title:g.Yj().optional(),description:g.Yj().optional()})}),q=r(59855).Y.create({type:"@backstage/CatalogModelLayer",versions:["v1"]});class H{#e;#t;constructor(e){this.#e=e.layerId,this.#t=[]}addKind(e){var t;let r,i=((r=[]).push((t={kind:e.names.kind,group:e.group,properties:{singular:e.names.singular,plural:e.names.plural,description:e.description}},v.parse({...t,op:"declareKind.v1"}))),r.push(...E({kind:e.names.kind,versions:e.versions??[]})),r);this.#t.push(...i)}addKindVersion(e){let t=E(e);this.#t.push(...t)}updateKind(e){let t=function(e){var t,r;let i=[];for(let n of((e.names.singular||e.names.plural||e.description)&&i.push((t={kind:e.names.kind,properties:{singular:e.names.singular,plural:e.names.plural,description:e.description}},B.parse({...t,op:"updateKind.v1"}))),e.versions??[])){let t=n.schema?x(n.schema.jsonSchema):void 0;for(let a of(t&&h(t),Array.isArray(n.name)?n.name:[n.name]))for(let o of n.specType?.length?[n.specType].flat():[void 0])i.push((r={kind:e.names.kind,name:a,specType:o,properties:{description:n.description,relationFields:n.relationFields,schema:t?{jsonSchema:t}:void 0}},z.parse({...r,op:"updateKindVersion.v1"})))}return i}(e);this.#t.push(...t)}removeKind(e){var t;let r=[(t={kind:e.kind},$.parse({...t,op:"removeKind.v1"}))];this.#t.push(...r)}addRelationPair(e){let t=function(e){let t=[];for(let r of[e.fromKind].flat())for(let i of[e.toKind].flat())t.push(C({fromKind:r,type:e.forward.type,toKind:i,properties:{reverseType:e.reverse.type,title:e.forward.title,description:e.description}})),t.push(C({fromKind:i,type:e.reverse.type,toKind:r,properties:{reverseType:e.forward.type,title:e.reverse.title,description:e.description}}));return t}(e);this.#t.push(...t)}updateRelationPair(e){let t=function(e){let t=[];for(let r of[e.fromKind].flat())for(let i of[e.toKind].flat())t.push(D({fromKind:r,type:e.forward.type,toKind:i,properties:{reverseType:e.reverse.type,title:e.forward.title,description:e.description}})),e.reverse.type&&t.push(D({fromKind:i,type:e.reverse.type,toKind:r,properties:{reverseType:e.forward.type,title:e.reverse.title,description:e.description}}));return t}(e);this.#t.push(...t)}addAnnotation(e){let t=function(e){var t;if(e.schema?.jsonSchema&&(h(e.schema.jsonSchema),"string"!==e.schema.jsonSchema.type))throw new o.dz(`Annotation "${e.name}" schema must have "type": "string" at the root, only string values are supported`);return[(t={name:e.name,properties:{title:e.title,description:e.description,schema:e.schema}},b.parse({...t,op:"declareAnnotation.v1"}))]}(e);this.#t.push(...t)}updateAnnotation(e){let t=function(e){var t;if(e.schema&&(h(e.schema.jsonSchema),"string"!==e.schema.jsonSchema.type))throw new o.dz(`Annotation "${e.name}" schema must have "type": "string" at the root, only string values are supported`);return[(t={name:e.name,properties:{title:e.title,description:e.description,schema:e.schema}},P.parse({...t,op:"updateAnnotation.v1"}))]}(e);this.#t.push(...t)}removeAnnotation(e){var t;let r=[(t={name:e.name},R.parse({...t,op:"removeAnnotation.v1"}))];this.#t.push(...r)}addLabel(e){let t=function(e){var t;if(e.schema?.jsonSchema&&(h(e.schema.jsonSchema),"string"!==e.schema.jsonSchema.type))throw new o.dz(`Label "${e.name}" schema must have "type": "string" at the root, only string values are supported`);return[(t={name:e.name,properties:{title:e.title,description:e.description,schema:e.schema}},I.parse({...t,op:"declareLabel.v1"}))]}(e);this.#t.push(...t)}updateLabel(e){let t=function(e){var t;if(e.schema&&(h(e.schema.jsonSchema),"string"!==e.schema.jsonSchema.type))throw new o.dz(`Label "${e.name}" schema must have "type": "string" at the root, only string values are supported`);return[(t={name:e.name,properties:{title:e.title,description:e.description,schema:e.schema}},M.parse({...t,op:"updateLabel.v1"}))]}(e);this.#t.push(...t)}removeLabel(e){var t;let r=[(t={name:e.name},N.parse({...t,op:"removeLabel.v1"}))];this.#t.push(...r)}addTag(e){var t;let r=[(t={name:e.name,properties:{title:e.title,description:e.description}},L.parse({...t,op:"declareTag.v1"}))];this.#t.push(...r)}updateTag(e){var t;let r=[(t={name:e.name,properties:{title:e.title,description:e.description}},_.parse({...t,op:"updateTag.v1"}))];this.#t.push(...r)}removeTag(e){var t;let r=[(t={name:e.name},O.parse({...t,op:"removeTag.v1"}))];this.#t.push(...r)}import(e){let t=q.toInternal(e);this.#t.push(...t.ops)}build(){return q.createInstance("v1",{layerId:this.#e,ops:this.#t.slice()})}}let W="ownedBy",V="dependsOn",K="partOf",G="hasPart";n=new H({layerId:(a={layerId:"catalog.backstage.io/well-known-relations",builder:e=>{e.addRelationPair({fromKind:["API","Component","Domain","Group","Location","Resource","System","User"],toKind:["Group","User"],description:"An ownership relation where the owner is usually an organizational entity (user or group), and the other entity can be anything.",forward:{type:"ownedBy",title:"owned by"},reverse:{type:"ownerOf",title:"owner of"}}),e.addRelationPair({fromKind:"Component",toKind:"API",description:"A relation from a component to an API it provides for consumption by others.",forward:{type:"providesApi",title:"provides API"},reverse:{type:"apiProvidedBy",title:"API provided by"}}),e.addRelationPair({fromKind:"Component",toKind:"API",description:"A relation from a component to an API it consumes.",forward:{type:"consumesApi",title:"consumes API"},reverse:{type:"apiConsumedBy",title:"API consumed by"}}),e.addRelationPair({fromKind:["Component","Resource"],toKind:["Component","Resource"],description:"A dependency relation expressing that an entity needs another entity to function.",forward:{type:"dependsOn",title:"depends on"},reverse:{type:"dependencyOf",title:"dependency of"}}),e.addRelationPair({fromKind:"Group",toKind:"Group",description:"A parent/child relation to build up a tree, used for example to describe the organizational structure between groups.",forward:{type:"parentOf",title:"parent of"},reverse:{type:"childOf",title:"child of"}}),e.addRelationPair({fromKind:"User",toKind:"Group",description:"A membership relation, typically for users in a group.",forward:{type:"memberOf",title:"member of"},reverse:{type:"hasMember",title:"has member"}}),e.addRelationPair({fromKind:["Component","API","Resource"],toKind:["Component","System"],description:"A part/whole relation where a component, API, or resource belongs to a system or a component is a subcomponent of another.",forward:{type:"partOf",title:"part of"},reverse:{type:"hasPart",title:"has part"}}),e.addRelationPair({fromKind:"System",toKind:"Domain",description:"A part/whole relation where a system belongs to a domain.",forward:{type:"partOf",title:"part of"},reverse:{type:"hasPart",title:"has part"}}),e.addRelationPair({fromKind:"Domain",toKind:"Domain",description:"A part/whole relation where a domain is a subdomain of another domain.",forward:{type:"partOf",title:"part of"},reverse:{type:"hasPart",title:"has part"}})}}).layerId}),a.builder(n),n.build()},16263(e,t,r){"use strict";r.d(t,{Eo:()=>i,I4:()=>a,r2:()=>n});let i="backstage.io/managed-by-location",n="backstage.io/managed-by-origin-location",a="backstage.io/source-location"},37121(e,t,r){"use strict";r.d(t,{Cr:()=>l,KL:()=>s,aY:()=>o});var i=r(58077),n=r(16263);let a=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;function o(e){if("string"!=typeof e)throw TypeError(`Unable to parse location ref '${e}', unexpected argument ${typeof e}`);let t=e.indexOf(":");if(t<0)throw TypeError(`Unable to parse location ref '${e}', expected '<type>:<target>', e.g. 'url:https://host/path'`);let r=e.substring(0,t).trim(),i=e.substring(t+1).trim();if(!r||!i)throw TypeError(`Unable to parse location ref '${e}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if("http"===r||"https"===r)throw TypeError(`Invalid location ref '${e}', please prefix it with 'url:', e.g. 'url:${e}'`);if(a.test(i))throw TypeError(`Invalid location ref '${e}', target is a javascript: URL`);return{type:r,target:i}}function s(e){let{type:t,target:r}=e;if(t){if(!r)throw TypeError("Unable to stringify location ref, empty target")}else throw TypeError("Unable to stringify location ref, empty type");if(a.test(r))throw TypeError(`Invalid location ref '${t}:${r}', target is a javascript: URL`);return`${t}:${r}`}function l(e){let t=e.metadata?.annotations?.[n.I4]??e.metadata?.annotations?.[n.Eo];if(!t)throw Error(`Entity '${(0,i.U2)(e)}' is missing location`);return o(t)}},4809(e,t,r){"use strict";r.d(t,{z:()=>o});var i=r(31085),n=r(14041);let a=(0,n.lazy)(()=>Promise.all([r.e("8292"),r.e("5635")]).then(r.bind(r,81662)).then(e=>({default:e.CodeSnippet})));function o(e){return(0,i.jsx)(n.Suspense,{fallback:(0,i.jsx)("div",{}),children:(0,i.jsx)(a,{...e})})}},55555(e,t,r){"use strict";r.d(t,{l:()=>h});var i=r(31085),n=r(50509),a=r(151),o=r(28237),s=r(32725),l=r(99594),c=r(14041),d=r(11688),u=r(89332),p=r(89595);function h(e){let{t}=(0,p.i)(u.O),{text:r,tooltipDelay:h=1e3,tooltipText:g=t("copyTextButton.tooltipText"),"aria-label":f="Copy text"}=e,m=(0,n.gf)(a.m),[y,b]=(0,c.useState)(!1),[{error:v},w]=(0,d.A)(),x=(0,c.useRef)(null);return(0,c.useEffect)(()=>{v&&m.post(v)},[v,m]),(0,c.useEffect)(()=>()=>{x.current&&clearTimeout(x.current)},[]),(0,i.jsxs)(o.k,{isOpen:y,onOpenChange:b,children:[(0,i.jsx)(s.a,{icon:(0,i.jsx)(l.default,{}),onPress:()=>{x.current&&clearTimeout(x.current),b(!0),w(r),x.current=setTimeout(()=>{b(!1)},h)},"aria-label":f}),(0,i.jsx)(o.m,{children:g})]})}},60691(e,t,r){"use strict";r.d(t,{b:()=>p});var i=r(31085),n=r(58837),a=r(58007),o=r(8109),s=r(5951),l=r(55555),c=r(87187);let d=(0,n.A)(e=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:e.spacing(2)},divider:{margin:e.spacing(2)}}),{name:"BackstageErrorPanel"}),u=({error:e,message:t,stack:r,children:n})=>{let c=d();return(0,i.jsxs)(a.A,{dense:!0,children:[(0,i.jsxs)(o.A,{alignItems:"flex-start",children:[(0,i.jsx)(s.A,{classes:{secondary:c.text},primary:"Error",secondary:e}),(0,i.jsx)(l.l,{text:e})]}),(0,i.jsxs)(o.A,{alignItems:"flex-start",children:[(0,i.jsx)(s.A,{classes:{secondary:c.text},primary:"Message",secondary:t}),(0,i.jsx)(l.l,{text:t})]}),r&&(0,i.jsxs)(o.A,{alignItems:"flex-start",children:[(0,i.jsx)(s.A,{classes:{secondary:c.text},primary:"Stack Trace",secondary:r}),(0,i.jsx)(l.l,{text:r})]}),n]})};function p(e){let{title:t,error:r,defaultExpanded:n,titleFormat:a,children:o}=e;return(0,i.jsx)(c.B,{severity:"error",title:t??r.message,defaultExpanded:n,titleFormat:a,children:(0,i.jsx)(u,{error:r.name,message:r.message,stack:r.stack,children:o})})}},58476(e,t,r){"use strict";r.d(t,{P:()=>g});var i=r(31085),n=r(58837),a=r(53373),o=r.n(a),s=r(86613),l=r(60603),c=r(77125),d=r(72501);let u=(0,n.A)(e=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:e.palette.text.secondary,cursor:"default"},primary:{color:e.palette.primary.main},secondary:{color:e.palette.secondary.main},label:{textTransform:"uppercase",fontWeight:e.typography.fontWeightBold,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function p({color:e="primary",disabled:t=!1,href:r="#",icon:n=(0,i.jsx)(s.default,{}),label:a,onClick:h,title:g}){let f=u();return t?(0,i.jsxs)(c.A,{title:g,className:o()(f.link,f.disabled),children:[n,(0,i.jsx)(d.A,{variant:"caption",component:"span",className:f.label,children:a})]}):(0,i.jsxs)(l.N_,{title:g,className:o()(f.link,f[e]),to:r,onClick:h,children:[n,(0,i.jsx)(d.A,{variant:"caption",component:"span",className:f.label,children:a})]})}let h=(0,n.A)(e=>({links:{margin:e.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:e.spacing(3),wordBreak:"keep-all"}}),{name:"BackstageHeaderIconLinkRow"});function g(e){let{links:t}=e,r=h();return(0,i.jsx)("nav",{className:r.links,children:t.map((e,t)=>(0,i.jsx)(p,{...e},t+1))})}},60603(e,t,r){"use strict";r.d(t,{$h:()=>k,N_:()=>j});var i=r(31085),n=r(91189),a=r(50509),o=r(19735),s=r(53996),l=r(49203),c=r(58837),d=r(72501),u=r(53373),p=r.n(u),h=r(45250),g=r(14041),f=r(18690),m=r(73657),y=r(39330);let b=(0,c.A)(e=>({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",userSelect:"none",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"},externalLinkIcon:{verticalAlign:"bottom",marginLeft:e.spacing(.5)}}),{name:"Link"}),v=()=>{let e=(0,n.n)().getSystemIcon("externalLink")||y.default,t=b();return(0,i.jsx)(e,{className:t.externalLinkIcon})},w=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,x=window.open;if(x&&!x.__backstage){let e=function(...e){let t=String(e[0]);if(w.test(t))throw Error("Rejected window.open() with a javascript: URL as a security precaution");return x.apply(this,e)};e.__backstage=!0,window.open=e}let A=e=>e instanceof Array?e.map(A).join(" ").trim():"object"==typeof e&&e?A(e?.props?.children):["string","number"].includes(typeof e)?String(e):"",k=(0,g.forwardRef)(({onClick:e,noTrack:t,externalLinkIcon:r,...n},l)=>{let c,u,g,y,x,k=b(),j=(0,s.s)(),S=!function(){let[e]=(0,f.createRoutesFromChildren)((0,i.jsx)(f.Route,{index:!0,element:(0,i.jsx)("div",{})}));return!e.index}()?n.to:(c=String(n.to),u=(()=>{let{pathname:e}=new URL((()=>{try{return(0,a.gf)(o.U).getOptionalString("app.baseUrl")}catch{return}})()??"/","http://sample.dev");return(0,h.trimEnd)(e,"/")})(),g=c,y=/^([a-z+.-]+):/.test(g),x=c.startsWith(u),y||x||(c=u.concat(c)),c),E=A(n.children)||S,I=/^([a-z+.-]+):/.test(S),T=I&&!!/^https?:/.exec(S);if(w.test(S))throw Error("Link component rejected javascript: URL as a security precaution");let C=r=>{e?.(r),t||j.captureEvent("click",E,{attributes:{to:S}})};return I?(0,i.jsxs)("a",{...T?{target:"_blank",rel:"noopener"}:{},...n,...n["aria-label"]?{"aria-label":`${n["aria-label"]}, Opens in a new window`}:{},ref:l,href:S,onClick:C,className:p()(k.externalLink,n.className),children:[n.children,r&&(0,i.jsx)(v,{}),(0,i.jsx)(d.A,{component:"span",className:k.visuallyHidden,children:", Opens in a new window"})]}):(0,i.jsx)(m.Link,{...n,ref:l,to:S,onClick:C})}),j=(0,g.forwardRef)((e,t)=>(0,i.jsx)(l.A,{...e,ref:t,component:k}))},45463(e,t,r){"use strict";r.d(t,{z:()=>l});var i=r(31085),n=r(64947),a=r(14041),o=r(60603);let s=(0,a.forwardRef)((e,t)=>(0,i.jsx)(o.$h,{ref:t,...e,color:"initial"})),l=(0,a.forwardRef)((e,t)=>(0,i.jsx)(n.A,{ref:t,component:s,...e}))},11629(e,t,r){"use strict";r.d(t,{h:()=>b});var i=r(31085),n=r(58837),a=r(71373),o=r(81411),s=r(14041),l=r(4809),c=r(72482),d=r(1074),u=r(4812),p=r(60603);let h=(0,n.A)(e=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${e.palette.border}`},"& th, & td":{border:`1px solid ${e.palette.border}`,padding:e.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:e.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:e.palette.background.paper},"& tr":{backgroundColor:e.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:e.palette.background.default},"& a":{color:e.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),g=(e,t)=>t?"string"==typeof t?e+t:s.Children.toArray(t.props.children).reduce(g,e):e,f=({level:e,children:t})=>{let r=s.Children.toArray(t).reduce(g,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return(0,s.createElement)(`h${e}`,{id:r},t)},m={code:({inline:e,className:t,children:r,...n})=>{let a=String(r).replace(/\n+$/,""),o=/language-(\w+)/.exec(t||"");return!e&&o?(0,i.jsx)(l.z,{language:o[1],text:a}):(0,i.jsx)("code",{className:t,...n,children:r})},h1:f,h2:f,h3:f,h4:f,h5:f,h6:f,a:({href:e,children:t,title:r,target:n,rel:a})=>e?(0,i.jsx)(p.N_,{to:e,title:r,...n?{target:n}:{},...a?{rel:a}:{},children:t}):(0,i.jsx)(i.Fragment,{children:t})},y=[[c.A,{tagfilter:!0}],[d.A,{...u.j,attributes:{...u.j.attributes,code:[...u.j.attributes?.code??[],["className"]]}}]];function b(e){let{content:t,dialect:r="gfm",linkTarget:n,transformLinkUri:s,transformImageUri:l,className:c}=e,d=h();return(0,i.jsx)(a.$,{remarkPlugins:"gfm"===r?[o.A]:[],rehypePlugins:"gfm"===r?y:[],className:`${d.markdown} ${c??""}`.trim(),children:t,components:m,linkTarget:n,transformLinkUri:s,transformImageUri:l})}},55489(e,t,r){"use strict";r.d(t,{k:()=>l});var i=r(31085),n=r(77125),a=r(88951),o=r(54917),s=r(14041);function l(e){let{"aria-label":t,...r}=e,l=(0,o.A)(),[c,d]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let e=setTimeout(()=>d(!0),l.transitions.duration.short);return()=>clearTimeout(e)},[l.transitions.duration.short]),c?(0,i.jsx)(a.A,{...r,"aria-label":t??"Loading","data-testid":"progress"}):(0,i.jsx)(n.A,{display:"none","data-testid":"progress"})}},97673(e,t,r){"use strict";r.d(t,{_:()=>p});var i=r(31085),n=r(58837),a=r(37197),o=r(8109),s=r(5951),l=r(4809),c=r(55555),d=r(60691);let u=(0,n.A)(e=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:e.spacing(2)},divider:{margin:e.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function p(e){let{title:t,error:r,defaultExpanded:n}=e,p=u();if("ResponseError"!==r.name)return(0,i.jsx)(d.b,{title:t??r.message,defaultExpanded:n,error:r});let{body:h,cause:g}=r,{request:f,response:m}=h,y=`${m.statusCode}: ${g.name}`,b=f&&`${f.method} ${f.url}`,v=g.message.replace(/\\n/g,"\n"),w=g.stack?.replace(/\\n/g,"\n"),x=JSON.stringify(h,void 0,2);return(0,i.jsxs)(d.b,{title:t??r.message,defaultExpanded:n,error:{name:y,message:v,stack:w},children:[b&&(0,i.jsxs)(o.A,{alignItems:"flex-start",children:[(0,i.jsx)(s.A,{classes:{secondary:p.text},primary:"Request",secondary:f?`${b}`:void 0}),(0,i.jsx)(c.l,{text:b})]}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.A,{component:"li",className:p.divider}),(0,i.jsx)(o.A,{alignItems:"flex-start",children:(0,i.jsx)(s.A,{classes:{secondary:p.text},primary:"Full Error as JSON"})}),(0,i.jsx)(l.z,{language:"json",text:x,showCopyCodeButton:!0})]})]})}},45794(e,t,r){"use strict";r.d(t,{Y:()=>C});var i=r(31085),n=r(91189),a=r(50509),o=r(19735),s=r(77125),l=r(64947),c=r(93453),d=r(29365),u=r(46423),p=r(5951),h=r(26343),g=r(28233),f=r(55197),m=r(58837),y=r(72501),b=r(5893),v=r(14041),w=r(23838),x=r(55940),A=r(60603),k=r(89332),j=r(89595);let S=(0,m.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),E=({icon:e})=>{let t=(0,n.n)(),r=e?t.getSystemIcon(e)??x.NT:x.NT;return(0,i.jsx)(r,{})},I=({link:e})=>(0,i.jsx)(A.N_,{to:e.url,children:e.title??e.url}),T=({item:e})=>(0,i.jsxs)(h.A,{button:!1,children:[(0,i.jsx)(u.A,{children:(0,i.jsx)(E,{icon:e.icon})}),(0,i.jsx)(p.A,{primary:e.title,secondary:e.links?.reduce((e,t,r)=>[...e,r>0&&(0,i.jsx)("br",{},r),(0,i.jsx)(I,{link:t},t.url)],[])})]});function C(e){let{t}=(0,j.i)(k.O),{title:r,items:n,children:u}=e,{items:p}=(0,w.l)(),[m,A]=(0,v.useState)(!1),[E,I]=(0,v.useState)(null),C=S(),R=(0,a.gf)(o.U).getOptionalConfig("app.support"),$=(0,b.A)(e=>e.breakpoints.down("sm")),N=e=>{I(e.currentTarget),A(!0)},O=()=>{A(!1)};return R?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.A,{display:"flex",ml:1,children:$?(0,i.jsx)(d.A,{color:"primary",size:"small",onClick:N,"data-testid":"support-button","aria-label":"Support",children:(0,i.jsx)(x.NT,{})}):(0,i.jsx)(l.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:N,startIcon:(0,i.jsx)(x.NT,{}),children:t("supportButton.title")})}),(0,i.jsxs)(f.Ay,{"data-testid":"support-button-popover",open:m,anchorEl:E,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:O,children:[(0,i.jsxs)(g.A,{className:C.popoverList,autoFocusItem:!!E,children:[r&&(0,i.jsx)(h.A,{button:!1,alignItems:"flex-start",className:C.menuItem,children:(0,i.jsx)(y.A,{variant:"subtitle1",children:r})}),v.Children.map(u,(e,t)=>(0,i.jsx)(h.A,{button:!1,alignItems:"flex-start",className:C.menuItem,children:e},`child-${t}`)),(n??p).map((e,t)=>(0,i.jsx)(T,{item:e},`item-${t}`))]}),(0,i.jsx)(c.A,{children:(0,i.jsx)(l.A,{color:"primary",onClick:O,"aria-label":"Close",children:t("supportButton.close")})})]})]}):null}},87187(e,t,r){"use strict";r.d(t,{B:()=>w});var i=r(31085),n=r(268),a=r(58837),o=r(8973),s=r(29655),l=r(91567),c=r(42899),d=r(72501),u=r(9181),p=r(6924),h=r(11629);let g=(e,t)=>("light"===t.palette.type?n.e$:n.a)(t.palette[e].light,.6),f=(e,t)=>("light"===t.palette.type?n.a:n.e$)(t.palette[e].light,.9),m=(0,a.A)(e=>({root:{marginRight:e.spacing(1),fill:({severity:t})=>g(t,e)}})),y=({severity:e})=>{let t=m({severity:e});return(0,i.jsx)(u.default,{classes:t})},b=({severity:e})=>{let t=m({severity:e});return(0,i.jsx)(p.default,{classes:t})},v=(0,a.A)(e=>({panel:{backgroundColor:({severity:t})=>f(t,e),color:({severity:t})=>g(t,e),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:t})=>g(t,e),fontWeight:e.typography.fontWeightBold},markdownContent:{wordBreak:"break-word","& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:t})=>g(t,e),backgroundColor:({severity:t})=>f(t,e)},details:{width:"100%",display:"block",color:e.palette.textContrast,backgroundColor:e.palette.background.default,border:`1px solid ${e.palette.border}`,padding:e.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"});function w(e){let{severity:t="warning",title:r,titleFormat:n,message:a,children:u,defaultExpanded:p}=e,g=v({severity:t}),f=t.charAt(0).toLocaleUpperCase("en-US")+t.slice(1)+(r?`: ${r}`:"");return(0,i.jsxs)(o.A,{defaultExpanded:p??!1,className:g.panel,role:"alert",children:[(0,i.jsxs)(s.A,{expandIcon:(0,i.jsx)(b,{severity:t}),className:g.summary,children:[(0,i.jsx)(y,{severity:t}),(0,i.jsx)(d.A,{className:g.summaryText,variant:"subtitle1",children:"markdown"===n?(0,i.jsx)(h.h,{content:f,className:g.markdownContent}):f})]}),(a||u)&&(0,i.jsx)(l.A,{children:(0,i.jsxs)(c.A,{container:!0,children:[a&&(0,i.jsx)(c.A,{item:!0,xs:12,children:(0,i.jsx)(d.A,{className:g.message,variant:"body1",children:a})}),u&&(0,i.jsx)(c.A,{item:!0,xs:12,className:g.details,children:u})]})})]})}},23838(e,t,r){"use strict";r.d(t,{l:()=>s});var i=r(50509),n=r(19735),a=r(89332),o=r(89595);function s(){let e=(0,i.Q2)().get(n.U),t=e?.getOptionalConfig("app.support"),r=(()=>{let{t:e}=(0,o.i)(a.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:e("supportConfig.default.title"),icon:"warning",links:[{title:e("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}})();return t?{url:t.getString("url"),items:t.getConfigArray("items").flatMap(e=>({title:e.getString("title"),icon:e.getOptionalString("icon"),links:(e.getOptionalConfigArray("links")??[]).flatMap(e=>({url:e.getString("url"),title:e.getOptionalString("title")??""}))}))}:r}},55940(e,t,r){"use strict";r.d(t,{Gg:()=>d,KG:()=>u,NT:()=>c,Vf:()=>l,fX:()=>s,z9:()=>o});var i=r(31085),n=r(91189),a=r(27799);function o(e){let{id:t,Fallback:r=a.default,...o}=e,s=(0,n.n)().getSystemIcon(t)??r;return(0,i.jsx)(s,{...o})}function s(e){return(0,i.jsx)(o,{id:"catalog",...e})}function l(e){return(0,i.jsx)(o,{id:"docs",...e})}function c(e){return(0,i.jsx)(o,{id:"help",...e})}function d(e){return(0,i.jsx)(o,{id:"star",...e})}function u(e){return(0,i.jsx)(o,{id:"unstarred",...e})}},4103(e,t,r){"use strict";r.d(t,{B:()=>f});var i=r(31085),n=r(77125),a=r(38311),o=r(58007),s=r(8109),l=r(55197),c=r(7031),d=r(72501),u=r(14041);let p=(0,c.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(d.A),h=(0,c.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(n.A),g=(0,c.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(n.A);function f(e){let{children:t,...r}=e,[n,c]=(0,u.useState)(null),d=u.Children.toArray(t),[f,m,...y]=d,b=y.length?y.pop():d[d.length-1],v=d.length>3;return(0,i.jsxs)(u.Fragment,{children:[(0,i.jsxs)(a.A,{"aria-label":"breadcrumb",...r,children:[d.length>1&&(0,i.jsx)(h,{clone:!0,children:f}),d.length>2&&(0,i.jsx)(h,{clone:!0,children:m}),v&&(0,i.jsx)(p,{onClick:e=>{c(e.currentTarget)},children:"..."}),(0,i.jsx)(g,{children:b})]}),(0,i.jsx)(l.Ay,{open:!!n,anchorEl:n,onClose:()=>{c(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,i.jsx)(o.A,{children:y.map((e,t)=>(0,i.jsx)(s.A,{button:!0,children:(0,i.jsx)(h,{clone:!0,children:e})},t))})})]})}},84391(e,t,r){"use strict";r.d(t,{U:()=>l});var i=r(31085),n=r(58837),a=r(53373),o=r.n(a);let s=(0,n.A)(e=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:e.spacing(3),paddingBottom:e.spacing(3),paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function l(e){let{className:t,stretch:r,noPadding:n,children:a,...l}=e,c=s();return(0,i.jsx)("article",{...l,className:o()(c.root,t,{[c.stretch]:r,[c.noPadding]:n}),children:a})}},15179(e,t,r){"use strict";r.d(t,{d:()=>d});var i=r(31085),n=r(77125),a=r(58837),o=r(72501),s=r(93285);let l=({title:e,className:t})=>(0,i.jsx)(o.A,{variant:"h4",component:"h2",className:t,"data-testid":"header-title",children:e}),c=({description:e,className:t})=>e?(0,i.jsx)(o.A,{variant:"body2",className:t,"data-testid":"header-description",children:e}):null;function d(e){let t,{description:r,title:o,titleComponent:d,children:u,descriptionComponent:p,textAlign:h="left"}=e,g=(t={textAlign:h},(0,a.A)(e=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:e.spacing(2),textAlign:t.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:e.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}))(),f=d||(0,i.jsx)(l,{title:o,className:g.title}),m=p||(0,i.jsx)(c,{description:r,className:g.description});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.m,{title:o}),(0,i.jsxs)(n.A,{className:g.container,children:[(0,i.jsxs)(n.A,{className:g.leftItemsBox,children:[f,m]}),(0,i.jsx)(n.A,{className:g.rightItemsBox,children:u})]})]})}},73462(e,t,r){"use strict";r.d(t,{M:()=>w});var i=r(31085),n=r(42899),a=r(58837),o=r(72501),s=r(18690),l=r(60603),c=r(23838);let d=r.p+"static/mic-drop.f832115f2e81.svg",u=(0,a.A)(e=>({micDrop:{maxWidth:"60%",bottom:e.spacing(2),right:e.spacing(2),[e.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:e.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),p=()=>{let e=u();return(0,i.jsx)("img",{src:d,className:e.micDrop,alt:"Girl dropping mic from her hands"})};var h=r(14041),g=r(4809),f=r(89595),m=r(89332);let y=(0,a.A)(e=>({title:{paddingBottom:e.spacing(5),[e.breakpoints.down("xs")]:{paddingBottom:e.spacing(4),fontSize:e.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function b(e){let{stack:t}=e,r=y(),{t:n}=(0,f.i)(m.O),[a,s]=(0,h.useState)(!1);return a?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.A,{variant:"h6",className:r.title,children:(0,i.jsx)(l.N_,{to:"#",onClick:()=>s(!1),children:n("errorPage.showLessDetails")})}),(0,i.jsx)(g.z,{text:t,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,i.jsx)(o.A,{variant:"h6",className:r.title,children:(0,i.jsx)(l.N_,{to:"#",onClick:()=>s(!0),children:n("errorPage.showMoreDetails")})})}let v=(0,a.A)(e=>({container:{padding:e.spacing(8),[e.breakpoints.down("xs")]:{padding:e.spacing(2)}},title:{paddingBottom:e.spacing(5),[e.breakpoints.down("xs")]:{paddingBottom:e.spacing(4),fontSize:e.typography.h3.fontSize}},subtitle:{color:e.palette.textSubtle}}),{name:"BackstageErrorPage"});function w(e){let{status:t="",statusMessage:r,additionalInfo:a,supportUrl:d,stack:u}=e,h=v(),g=(0,s.useNavigate)(),y=(0,c.l)(),{t:w}=(0,f.i)(m.O);return(0,i.jsxs)(n.A,{container:!0,className:h.container,children:[(0,i.jsxs)(n.A,{item:!0,xs:12,sm:8,md:4,children:[(0,i.jsx)(o.A,{"data-testid":"error",variant:"body1",className:h.subtitle,children:w("errorPage.subtitle",{status:t,statusMessage:r})}),(0,i.jsx)(o.A,{variant:"body1",className:h.subtitle,children:a}),(0,i.jsx)(o.A,{variant:"h2",className:h.title,children:w("errorPage.title")}),(0,i.jsxs)(o.A,{variant:"h6",className:h.title,children:[(0,i.jsx)(l.N_,{to:"#","data-testid":"go-back-link",onClick:()=>g(-1),children:w("errorPage.goBack")}),"... or please"," ",(0,i.jsx)(l.N_,{to:d||y.url,children:"contact support"})," if you think this is a bug."]}),u&&(0,i.jsx)(b,{stack:u})]}),(0,i.jsx)(p,{})]})}},70111(e,t,r){"use strict";r.d(t,{Y:()=>v});var i=r(31085),n=r(50509),a=r(19735),o=r(77125),s=r(42899),l=r(58837),c=r(71677),d=r(72501),u=r(93285),p=r(60603),h=r(4103),g=r(96919);let f=(0,l.A)(e=>({header:{gridArea:"pageHeader",padding:e.spacing(3),width:"100%",boxShadow:e.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:e.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[e.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:e.page.fontColor,wordBreak:"break-word",fontSize:e.typography.h3.fontSize,marginBottom:0},subtitle:{color:e.page.fontColor,opacity:.8,display:"inline-block",marginTop:e.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:e.spacing(1),color:e.page.fontColor},breadcrumb:{color:e.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-e.spacing(.3),marginBottom:e.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-e.spacing(.3),marginBottom:e.spacing(.3)}}),{name:"BackstageHeader"}),m=({type:e,typeLink:t,classes:r,pageTitle:n})=>e?t?(0,i.jsxs)(h.B,{className:r.breadcrumb,children:[(0,i.jsx)(p.N_,{to:t,children:e}),(0,i.jsx)(d.A,{children:n})]}):(0,i.jsx)(d.A,{className:r.type,children:e}):null,y=({pageTitle:e,classes:t,tooltip:r})=>{let{contentRef:n}=(0,g.H)(),a=(0,i.jsx)(d.A,{ref:n,tabIndex:-1,className:t.title,variant:"h1",children:e});return r?(0,i.jsx)(c.Ay,{title:r,placement:"top-start",children:a}):a},b=({classes:e,subtitle:t})=>t?"string"!=typeof t?(0,i.jsx)(i.Fragment,{children:t}):(0,i.jsx)(d.A,{className:e.subtitle,variant:"subtitle2",component:"span",children:t}):null;function v(e){let{children:t,pageTitleOverride:r,style:l,subtitle:c,title:d,tooltip:p,type:h,typeLink:g}=e,v=f(),w=(0,n.gf)(a.U).getOptionalString("app.title")||"Backstage",x=r||d,A=d||r,k=`${x} | %s | ${w}`,j=`${x} | ${w}`;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.m,{titleTemplate:k,defaultTitle:j}),(0,i.jsxs)("header",{style:l,className:v.header,"data-backstage-core-header":"",children:[(0,i.jsxs)(o.A,{className:v.leftItemsBox,children:[(0,i.jsx)(m,{classes:v,type:h,typeLink:g,pageTitle:A}),(0,i.jsx)(y,{classes:v,pageTitle:A,tooltip:p}),(0,i.jsx)(b,{classes:v,subtitle:c})]}),(0,i.jsx)(s.A,{container:!0,className:v.rightItemsBox,spacing:4,children:t})]})]})}},89439(e,t,r){"use strict";r.d(t,{n:()=>R});var i=r(31085),n=r(40703),a=r(59469),o=r(48653),s=r(45685),l=r(37197),c=r(58837),d=r(7031),u=r(53373),p=r.n(u),h=r(77125),g=r(72501),f=r(52235),m=r(60603);let y=(0,c.A)(e=>({root:{maxWidth:"fit-content",padding:e.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:e.palette.textSubtle},arrow:{color:e.palette.textSubtle}}),{name:"BackstageBottomLink"});function b(e){let{link:t,title:r,onClick:n}=e,a=y();return(0,i.jsxs)(h.A,{children:[(0,i.jsx)(l.A,{}),(0,i.jsx)(m.N_,{to:t,onClick:n,underline:"none",children:(0,i.jsxs)(h.A,{display:"flex",alignItems:"center",className:a.root,children:[(0,i.jsx)(h.A,{className:a.boxTitle,fontWeight:"fontWeightBold",m:1,children:(0,i.jsx)(g.A,{children:(0,i.jsx)("strong",{children:r})})}),(0,i.jsx)(f.default,{className:a.arrow})]})})]})}var v=r(14041),w=r(45463),x=r(60691),A=r(89332),k=r(89595);let j=e=>{let{slackChannel:t}=e,{t:r}=(0,k.i)(A.O);return t?"string"==typeof t?(0,i.jsx)(g.A,{children:r("errorBoundary.title",{slackChannel:t})}):t.href?(0,i.jsx)(w.z,{to:t.href,variant:"contained",children:t.name}):(0,i.jsx)(g.A,{children:r("errorBoundary.title",{slackChannel:t.name})}):null},S=class extends v.Component{constructor(e){super(e),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(e,t){console.error(`ErrorBoundary, error: ${e}`,{error:e,errorInfo:t}),this.setState({error:e,errorInfo:t})}render(){let{slackChannel:e,children:t}=this.props,{error:r}=this.state;return r?(0,i.jsx)(x.b,{title:"Something Went Wrong",error:r,children:(0,i.jsx)(j,{slackChannel:e})}):t}},E=(0,c.A)(e=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},contentAlignBottom:{display:"flex",alignItems:"self-end"},header:{padding:e.spacing(2,2,2,2.5)},headerTitle:{fontWeight:e.typography.fontWeightBold},headerSubheader:{paddingTop:e.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),I=(0,d.A)(e=>({root:{display:"inline-block",padding:e.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(a.A),T={flex:{display:"flex",flexDirection:"column"},fullHeight:{display:"flex",flexDirection:"column",height:"100%"},gridItem:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px",breakInside:"avoid-page","@media print":{height:"auto"}}},C={fullHeight:{flex:1},gridItem:{flex:1}};function R(e){let{title:t,subheader:r,divider:c=!0,deepLink:d,slackChannel:u,errorBoundaryProps:h,variant:g,alignContent:f="normal",children:m,headerStyle:y,headerProps:v,icon:w,action:x,actionsClassName:A,actions:k,cardClassName:j,actionsTopRight:R,className:$,noPadding:N,titleTypographyProps:O,subheaderTypographyProps:L}=e,P=E(),B={},U={};return g&&g.split(/[\s]+/g).forEach(e=>{B={...B,...T[e]},U={...U,...C[e]}}),(0,i.jsx)(n.A,{style:B,className:$,children:(0,i.jsxs)(S,{...h||(u?{slackChannel:u}:{}),children:[t&&(0,i.jsx)(s.A,{classes:{root:p()(P.header),title:P.headerTitle,subheader:P.headerSubheader,avatar:P.headerAvatar,action:P.headerAction,content:P.headerContent},title:t,subheader:r||w?(0,i.jsxs)("div",{"data-testid":"info-card-subheader",children:[r&&(0,i.jsx)("div",{className:P.subheader,children:r}),w]}):null,action:x,style:{...y},titleTypographyProps:O,subheaderTypographyProps:L,...v}),R&&(0,i.jsx)(I,{children:R}),c&&(0,i.jsx)(l.A,{}),(0,i.jsx)(o.A,{className:p()(j,{[P.noPadding]:N,[P.contentAlignBottom]:"bottom"===f}),style:U,children:m}),k&&(0,i.jsx)(a.A,{className:A,children:k}),d&&(0,i.jsx)(b,{...d})]})})}},12439(e,t,r){"use strict";r.d(t,{Y:()=>c});var i=r(31085),n=r(58837),a=r(50868),o=r(53373),s=r.n(o);let l=(0,n.A)(e=>({root:{display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",overflowY:"auto",height:"100vh",[e.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function c(e){let{themeId:t,className:r,children:n}=e,o=l();return(0,i.jsx)(a.A,{theme:e=>({...e,page:e.getPageTheme({themeId:t})}),children:(0,i.jsx)("main",{className:s()(o.root,r),"data-backstage-core-page":"",children:n})})}},96919(e,t,r){"use strict";r.d(t,{G:()=>g,H:()=>f});var i=r(31085),n=r(77125),a=r(58837),o=r(5893),s=r(14041),l=r(28987);let c="sidebarPinState",d={getSidebarPinState(){let e;try{e=JSON.parse(window.localStorage.getItem(c)||"true")}catch{return!0}return!!e},setSidebarPinState:e=>window.localStorage.setItem(c,JSON.stringify(e))};var u=r(72214);let p=(0,a.A)(e=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[e.breakpoints.up("sm")]:{paddingLeft:e=>e.isPinned?e.sidebarConfig.drawerWidthOpen:e.sidebarConfig.drawerWidthClosed},[e.breakpoints.down("xs")]:{paddingBottom:e=>e.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),h=(0,s.createContext)({content:{contentRef:void 0}});function g(e){let[t,r]=(0,s.useState)(()=>d.getSidebarPinState()),{sidebarConfig:a}=(0,s.useContext)(l.yY),c=(0,s.useRef)(null),g=(0,s.useMemo)(()=>({content:{contentRef:c}}),[c]);(0,s.useEffect)(()=>{d.setSidebarPinState(t)},[t]);let f=(0,o.A)(e=>e.breakpoints.down("xs"),{noSsr:!0}),m=p({isPinned:t,sidebarConfig:a});return(0,i.jsx)(u.qj,{value:{isPinned:t,toggleSidebarPinState:()=>r(!t),isMobile:f},children:(0,i.jsx)(h.Provider,{value:g,children:(0,i.jsx)(n.A,{className:m.root,children:e.children})})})}function f(){let{content:e}=(0,s.useContext)(h);return{focusContent:(0,s.useCallback)(()=>{e?.contentRef?.current?.focus()},[e]),contentRef:e?.contentRef}}},72214(e,t,r){"use strict";r.d(t,{Ut:()=>u,qj:()=>d});var i=r(31085),n=r(9135),a=r(20549),o=r(14041);let s={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},l=(0,o.createContext)(s),c=(0,n.tK)("sidebar-pin-state-context");function d(e){let{children:t,value:r}=e;return(0,i.jsx)(l.Provider,{value:r,children:(0,i.jsx)(c.Provider,{value:(0,a.B)({1:r}),children:t})})}let u=()=>{let e=(0,o.useContext)(c),t=(0,o.useContext)(l);if(void 0===e)return t||s;let r=e.atVersion(1);if(void 0===r)throw Error("No context found for version 1.");return r}},28987(e,t,r){"use strict";r.d(t,{Rv:()=>a,U1:()=>c,hC:()=>n,i8:()=>s,yY:()=>l});var i=r(14041);let n={drawerWidthClosed:72,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:72,iconSize:24,iconPadding:24,selectedIndicatorWidth:3,userBadgePadding:18,userBadgeDiameter:36,mobileSidebarHeight:56},a=e=>({...n,...e,iconContainerWidth:n.drawerWidthClosed,iconSize:n.drawerWidthClosed-2*n.iconPadding,userBadgeDiameter:n.drawerWidthClosed-2*n.userBadgePadding}),o={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:n.defaultOpenDelayMs+200},s=e=>({...o,...e}),l=(0,i.createContext)({sidebarConfig:n,submenuConfig:o}),c=(0,i.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},89332(e,t,r){"use strict";r.d(t,{O:()=>i});let i=(0,r(97386).h)({id:"core-components",messages:{signIn:{title:"Sign In",loginFailed:"Login failed",customProvider:{title:"Custom User",subtitle:"Enter your own User ID and credentials.\n This selection will not be stored.",userId:"User ID",tokenInvalid:"Token is not a valid OpenID Connect JWT Token",continue:"Continue",idToken:"ID Token (optional)"},guestProvider:{title:"Guest",subtitle:"Enter as a Guest User.\n You will not have a verified identity, meaning some features might be unavailable.",enter:"Enter"}},skipToContent:"Skip to content",copyTextButton:{tooltipText:"Text copied to clipboard"},simpleStepper:{reset:"Reset",finish:"Finish",next:"Next",skip:"Skip",back:"Back"},errorPage:{subtitle:"ERROR {{status}}: {{statusMessage}}",title:"Looks like someone dropped the mic!",goBack:"Go back",showMoreDetails:"Show more details",showLessDetails:"Show less details"},emptyState:{missingAnnotation:{title:"Missing Annotation",actionTitle:"Add the annotation to your component YAML as shown in the highlighted example below:",readMore:"Read more"}},supportConfig:{default:{title:"Support Not Configured",linkTitle:"Add `app.support` config key"}},errorBoundary:{title:"Please contact {{slackChannel}} for help."},oauthRequestDialog:{title:"Login Required",authRedirectTitle:"This will trigger a http redirect to OAuth Login.",login:"Log in",rejectAll:"Reject All",message:"Sign-in to allow {{appTitle}} access to {{provider}} APIs and identities."},supportButton:{title:"Support",close:"Close"},table:{filter:{title:"Filters",clearAll:"Clear all",placeholder:"All results"},body:{emptyDataSourceMessage:"No records to display"},pagination:{firstTooltip:"First Page",labelDisplayedRows:"{from}-{to} of {count}",labelRowsSelect:"rows",lastTooltip:"Last Page",nextTooltip:"Next Page",previousTooltip:"Previous Page"},toolbar:{search:"Filter"},header:{actions:"Actions"}},alertDisplay:{message_one:"({{ count }} newer message)",message_other:"({{ count }} newer messages)"},autoLogout:{stillTherePrompt:{title:"Logging out due to inactivity",buttonText:"Yes! Don't log me out"}},dependencyGraph:{fullscreenTooltip:"Toggle fullscreen"},proxiedSignInPage:{title:"You do not appear to be signed in. Please try reloading the browser page."},logViewer:{downloadBtn:{tooltip:"Download logs"},searchField:{placeholder:"Search"}}}})},92829(e,t,r){"use strict";r.d(t,{Ig:()=>c,pn:()=>l});var i=r(31085),n=r(9135),a=r(20549),o=r(14041);let s=(0,n.tK)("analytics-context"),l=()=>{let e=(0,o.useContext)(s);if(void 0===e)return{routeRef:"unknown",pluginId:"root",extension:"App"};let t=e.atVersion(1);if(void 0===t)throw Error("No context found for version 1.");return t},c=e=>{let{attributes:t,children:r}=e,n={...l(),...t},o=(0,a.B)({1:n});return(0,i.jsx)(s.Provider,{value:o,children:r})}},62934(e,t,r){"use strict";r.d(t,{J:()=>a,t:()=>n});let i=(0,r(93147).Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),n="_ROUTABLE-EXTENSION-RENDERED";class a{analyticsApi;context;constructor(e,t={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=e,this.context=t,i.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{i.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...i.mostRecentGatheredNavigation,...i.mostRecentRoutableExtensionRender}),i.mostRecentGatheredNavigation=void 0,i.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),i.beforeUnloadRegistered=!0)}setContext(e){this.context=e}captureEvent(e,t,{value:r,attributes:a}={}){let{_routeNodeType:o,...s}=this.context;if(e===n){i.mostRecentGatheredNavigation&&(i.mostRecentRoutableExtensionRender={context:{...s,extension:"App"}});return}if(i.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...i.mostRecentGatheredNavigation,...i.mostRecentRoutableExtensionRender})}catch(e){console.warn("Error during analytics event capture. %o",e)}i.mostRecentGatheredNavigation=void 0,i.mostRecentRoutableExtensionRender=void 0}if("navigate"===e&&"gathered"===o&&"root"===s.pluginId){i.mostRecentGatheredNavigation={action:e,subject:t,value:r,attributes:a,context:s};return}try{this.analyticsApi.captureEvent({action:e,subject:t,value:r,attributes:a,context:s})}catch(e){console.warn("Error during analytics event capture. %o",e)}}}},53996(e,t,r){"use strict";r.d(t,{s:()=>l});var i=r(92829);let n=(0,r(55604).y)({id:"core.analytics"});var a=r(50509),o=r(14041),s=r(62934);function l(){l