@techdocs/cli 1.8.22-next.3 → 1.8.22
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 +12 -0
- package/dist/embedded-app/.config-schema.json +1215 -1454
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/2177.b7e2fc73.chunk.js +4 -0
- package/dist/embedded-app/static/2177.b7e2fc73.chunk.js.map +1 -0
- package/dist/embedded-app/static/5724.058de6d8.chunk.js +4 -0
- package/dist/embedded-app/static/5724.058de6d8.chunk.js.map +1 -0
- package/dist/embedded-app/static/{main.90679abd.js → main.b66c4152.js} +10 -10
- package/dist/embedded-app/static/main.b66c4152.js.map +1 -0
- package/dist/embedded-app/static/{runtime.90679abd.js → runtime.b66c4152.js} +2 -2
- package/dist/embedded-app/static/{runtime.90679abd.js.map → runtime.b66c4152.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.90679abd.js → vendor.b66c4152.js} +3 -3
- package/dist/embedded-app/static/vendor.b66c4152.js.map +1 -0
- package/dist/package.json.cjs.js +1 -1
- package/package.json +7 -7
- package/dist/embedded-app/static/2177.05828035.chunk.js +0 -4
- package/dist/embedded-app/static/2177.05828035.chunk.js.map +0 -1
- package/dist/embedded-app/static/5724.3139e3f1.chunk.js +0 -4
- package/dist/embedded-app/static/5724.3139e3f1.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.90679abd.js.map +0 -1
- package/dist/embedded-app/static/vendor.90679abd.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:(H,b,t)=>{"use strict";t.d(b,{c:()=>n});const n=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:(H,b,t)=>{"use strict";t.d(b,{P:()=>d,_P:()=>a,oQ:()=>n});const n="default",a="backstage.io/view-url",d="backstage.io/edit-url",x="kubernetes.io/api-server",m="kubernetes.io/api-server-certificate-authority",h="kubernetes.io/auth-provider"},6820:(H,b,t)=>{"use strict";t.d(b,{KU:()=>x,U2:()=>m,sM:()=>d});var n=t(72348);function a(h){let u=h.indexOf(":");const g=h.indexOf("/");g!==-1&&g<u&&(u=-1);const p=u===-1?void 0:h.slice(0,u),y=g===-1?void 0:h.slice(u+1,g),v=h.slice(Math.max(u+1,g+1));if(p===""||y===""||v==="")throw new TypeError(`Entity reference "${h}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:p,namespace:y,name:v}}function d(h){return{kind:h.kind,namespace:h.metadata.namespace||n.oQ,name:h.metadata.name}}function x(h,u){if(!h)throw new Error("Entity reference must not be empty");const g=u?.defaultKind,p=u?.defaultNamespace||n.oQ;let y,v,A;if(typeof h=="string"){const T=a(h);y=T.kind??g,v=T.namespace??p,A=T.name}else y=h.kind??g,v=h.namespace??p,A=h.name;if(y)if(v){if(!A){const T=JSON.stringify(h);throw new Error(`Entity reference ${T} had missing or empty name`)}}else{const T=JSON.stringify(h);throw new Error(`Entity reference ${T} had missing or empty namespace`)}else{const T=JSON.stringify(h);throw new Error(`Entity reference ${T} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:y,namespace:v,name:A}}function m(h){let u,g,p;return"metadata"in h?(u=h.kind,g=h.metadata.namespace??n.oQ,p=h.metadata.name):(u=h.kind,g=h.namespace??n.oQ,p=h.name),`${u.toLocaleLowerCase("en-US")}:${g.toLocaleLowerCase("en-US")}/${p.toLocaleLowerCase("en-US")}`}},51372:(H,b,t)=>{"use strict";t.d(b,{fT:()=>g,jn:()=>T,nC:()=>u,sA:()=>P,vv:()=>n});const n="ownedBy",a="ownerOf",d="consumesApi",x="apiConsumedBy",m="providesApi",h="apiProvidedBy",u="dependsOn",g="dependencyOf",p="parentOf",y="childOf",v="memberOf",A="hasMember",T="partOf",P="hasPart"},17736:(H,b,t)=>{"use strict";t.d(b,{Eo:()=>n,I4:()=>d});const n="backstage.io/managed-by-location",a="backstage.io/managed-by-origin-location",d="backstage.io/source-location"},78692:(H,b,t)=>{"use strict";t.d(b,{Cr:()=>h,KL:()=>m,aY:()=>x});var n=t(6820),a=t(17736);const d=/^[\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 x(u){if(typeof u!="string")throw new TypeError(`Unable to parse location ref '${u}', unexpected argument ${typeof u}`);const g=u.indexOf(":");if(g<0)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const p=u.substring(0,g).trim(),y=u.substring(g+1).trim();if(!p||!y)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(p==="http"||p==="https")throw new TypeError(`Invalid location ref '${u}', please prefix it with 'url:', e.g. 'url:${u}'`);if(d.test(y))throw new TypeError(`Invalid location ref '${u}', target is a javascript: URL`);return{type:p,target:y}}function m(u){const{type:g,target:p}=u;if(g){if(!p)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(d.test(p))throw new TypeError(`Invalid location ref '${g}:${p}', target is a javascript: URL`);return`${g}:${p}`}function h(u){const g=u.metadata?.annotations?.[a.I4]??u.metadata?.annotations?.[a.Eo];if(!g)throw new Error(`Entity '${(0,n.U2)(u)}' is missing location`);return x(g)}},77310:(H,b,t)=>{"use strict";t.d(b,{z:()=>p});var n=t(31085),a=t(10394),d=t(54917),x=t(14041),m=t(69578),h=t(40697),u=t(25577),g=t(37916);function p(y){const{text:v,language:A,showLineNumbers:T=!1,highlightedNumbers:P,customStyle:w,showCopyCodeButton:O=!1}=y,j=(0,d.A)(),F=j.palette.type==="dark"?h.A:u.A,L=j.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,n.jsxs)(a.A,{position:"relative",children:[(0,n.jsx)(m.A,{customStyle:w,language:A,style:F,showLineNumbers:T,wrapLines:!0,lineNumberStyle:{color:j.palette.textVerySubtle},lineProps:Z=>P?.includes(Z)?{style:{backgroundColor:L}}:{},children:v}),O&&(0,n.jsx)(a.A,{position:"absolute",top:0,right:0,children:(0,n.jsx)(g.l,{text:v})})]})}},37916:(H,b,t)=>{"use strict";t.d(b,{l:()=>v});var n=t(31085),a=t(72427),d=t(39837),x=t(29365),m=t(71677),h=t(99594),u=t(14041),g=t(36338),p=t(10315),y=t(87849);function v(A){const{t:T}=(0,y.i)(p.O),{text:P,tooltipDelay:w=1e3,tooltipText:O=T("copyTextButton.tooltipText"),"aria-label":j="Copy text"}=A,F=(0,a.gf)(d.m),[L,Z]=(0,u.useState)(!1),[{error:G},N]=(0,g.A)();(0,u.useEffect)(()=>{G&&F.post(G)},[G,F]);const Q=q=>{q.stopPropagation(),Z(!0),N(P)};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(m.Ay,{id:"copy-test-tooltip",title:O,placement:"top",leaveDelay:w,onClose:()=>Z(!1),open:L,children:(0,n.jsx)(x.A,{onClick:Q,"aria-label":j,children:(0,n.jsx)(h.A,{})})})})}},44186:(H,b,t)=>{"use strict";t.d(b,{p:()=>T});var n=t(31085),a=t(42899),d=t(58837),x=t(72501),m=t(14041);const h=t.p+"static/missingAnnotation.67f79e98..svg",u=t.p+"static/noInformation.4b426325..svg",g=t.p+"static/createComponent.975d1e1e..svg",p=t.p+"static/noBuild.1715fa71..svg",y=(0,d.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),v=({missing:P})=>{const w=y();switch(P){case"field":return(0,n.jsx)("img",{src:h,className:w.generalImg,alt:"annotation is missing"});case"info":return(0,n.jsx)("img",{src:u,alt:"no Information",className:w.generalImg});case"content":return(0,n.jsx)("img",{src:g,alt:"create Component",className:w.generalImg});case"data":return(0,n.jsx)("img",{src:p,alt:"no Build",className:w.generalImg});default:return null}},A=(0,d.A)(P=>({root:{backgroundColor:P.palette.background.default,padding:P.spacing(2,0,0,0)},action:{marginTop:P.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function T(P){const{title:w,description:O,missing:j,action:F}=P,L=A();return(0,n.jsxs)(a.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:L.root,spacing:2,children:[(0,n.jsx)(a.A,{item:!0,xs:12,md:6,children:(0,n.jsxs)(a.A,{container:!0,direction:"column",children:[(0,n.jsx)(a.A,{item:!0,xs:!0,children:(0,n.jsx)(x.A,{variant:"h5",children:w})}),(0,n.jsx)(a.A,{item:!0,xs:!0,children:(0,n.jsx)(x.A,{variant:"body1",children:O})}),(0,n.jsx)(a.A,{item:!0,xs:!0,className:L.action,children:F})]})}),(0,n.jsx)(a.A,{item:!0,xs:12,md:6,className:L.imageContainer,children:typeof j=="string"?(0,n.jsx)(v,{missing:j}):j.customImage})]})}},22020:(H,b,t)=>{"use strict";t.d(b,{b:()=>v});var n=t(31085),a=t(58837),d=t(58007),x=t(8109),m=t(5951),h=t(14041),u=t(37916),g=t(88640);const p=(0,a.A)(A=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:A.spacing(2)},divider:{margin:A.spacing(2)}}),{name:"BackstageErrorPanel"}),y=({error:A,message:T,stack:P,children:w})=>{const O=p();return(0,n.jsxs)(d.A,{dense:!0,children:[(0,n.jsxs)(x.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:O.text},primary:"Error",secondary:A}),(0,n.jsx)(u.l,{text:A})]}),(0,n.jsxs)(x.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:O.text},primary:"Message",secondary:T}),(0,n.jsx)(u.l,{text:T})]}),P&&(0,n.jsxs)(x.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:O.text},primary:"Stack Trace",secondary:P}),(0,n.jsx)(u.l,{text:P})]}),w]})};function v(A){const{title:T,error:P,defaultExpanded:w,titleFormat:O,children:j}=A;return(0,n.jsx)(g.B,{severity:"error",title:T??P.message,defaultExpanded:w,titleFormat:O,children:(0,n.jsx)(y,{error:P.name,message:P.message,stack:P.stack,children:j})})}},18956:(H,b,t)=>{"use strict";t.d(b,{m:()=>u});var n=t(31085),a=t(14041),d=t(72501),x=t(58837),m=t(31129);const h=(0,x.A)(()=>({icon:{color:"#f3ba37",cursor:"pointer",display:"inline-flex"},iconBorder:{color:"inherit",cursor:"pointer",display:"inline-flex"}}),{name:"BackstageFavoriteToggleIcon"});function u(p){const{isFavorite:y}=p,v=h();return(0,n.jsx)(d.A,{component:"span",className:y?v.icon:v.iconBorder,children:y?(0,n.jsx)(m.Gg,{}):(0,n.jsx)(m.KG,{})})}function g(p){const{id:y,title:v,isFavorite:A,onToggle:T,...P}=p;return _jsx(Tooltip,{id:y,title:v,children:_jsx(IconButton,{"aria-label":v,id:y,onClick:()=>T(!A),color:"inherit",...P,children:_jsx(u,{isFavorite:A})})})}},72072:(H,b,t)=>{"use strict";t.d(b,{N_:()=>J});var n=t(31085),a=t(72427),d=t(65461),x=t(93368),m=t(49203),h=t(58837),u=t(72501),g=t(53373),p=t.n(g),y=t(45250),v=t.n(y),A=t(14041),T=t(18690),P=t(73657),w=t(39330),O=t(82266);function j(){const[Y]=(0,T.AV)((0,n.jsx)(T.qh,{index:!0,element:(0,n.jsx)("div",{})}));return!Y.index}const F=(0,h.A)(Y=>({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:Y.spacing(.5)}}),{name:"Link"}),L=()=>{const V=(0,O.n)().getSystemIcon("externalLink")||w.A,at=F();return(0,n.jsx)(V,{className:at.externalLinkIcon})},Z=Y=>/^([a-z+.-]+):/.test(Y),G=/^[\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,N=window.open;if(N&&!N.__backstage){const Y=function(...at){const nt=String(at[0]);if(G.test(nt))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return N.apply(this,at)};Y.__backstage=!0,window.open=Y}const Q=()=>{try{return(0,a.gf)(d.U).getOptionalString("app.baseUrl")}catch{return}},q=()=>{const Y="http://sample.dev",V=Q()??"/",{pathname:at}=new URL(V,Y);return(0,y.trimEnd)(at,"/")},K=Y=>{let V=String(Y);const at=q(),nt=Z(V),gt=V.startsWith(at);return!nt&&!gt&&(V=at.concat(V)),V},et=Y=>Y instanceof Array?Y.map(et).join(" ").trim():typeof Y=="object"&&Y?et(Y?.props?.children):["string","number"].includes(typeof Y)?String(Y):"",J=A.forwardRef(({onClick:Y,noTrack:V,externalLinkIcon:at,...nt},gt)=>{const bt=F(),xt=(0,x.s)(),ht=j()?K(nt.to):nt.to,ut=et(nt.children)||ht,Et=Z(ht),mt=Et&&!!/^https?:/.exec(ht);if(G.test(ht))throw new Error("Link component rejected javascript: URL as a security precaution");const Pt=Ot=>{Y?.(Ot),V||xt.captureEvent("click",ut,{attributes:{to:ht}})};return Et?(0,n.jsxs)(m.A,{...mt?{target:"_blank",rel:"noopener"}:{},...nt,...nt["aria-label"]?{"aria-label":`${nt["aria-label"]}, Opens in a new window`}:{},ref:gt,href:ht,onClick:Pt,className:p()(bt.externalLink,nt.className),children:[nt.children,at&&(0,n.jsx)(L,{}),(0,n.jsx)(u.A,{component:"span",className:bt.visuallyHidden,children:", Opens in a new window"})]}):(0,n.jsx)(m.A,{...nt,ref:gt,component:P.N_,to:ht,onClick:Pt})})},73896:(H,b,t)=>{"use strict";t.d(b,{z:()=>h});var n=t(31085),a=t(64947),d=t(14041),x=t(72072);const m=d.forwardRef((g,p)=>(0,n.jsx)(x.N_,{ref:p,...g,color:"initial"})),h=d.forwardRef((g,p)=>(0,n.jsx)(a.A,{ref:p,component:m,...g})),u=null},4650:(H,b,t)=>{"use strict";t.d(b,{h:()=>v});var n=t(31085),a=t(58837),d=t(45872),x=t(61125),m=t(14041),h=t(77310);const u=(0,a.A)(A=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${A.palette.border}`},"& th, & td":{border:`1px solid ${A.palette.border}`,padding:A.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:A.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:A.palette.background.paper},"& tr":{backgroundColor:A.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:A.palette.background.default},"& a":{color:A.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),g=(A,T)=>T?typeof T=="string"?A+T:m.Children.toArray(T.props.children).reduce(g,A):A,p=({level:A,children:T})=>{const O=m.Children.toArray(T).reduce(g,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return m.createElement(`h${A}`,{id:O},T)},y={code:({inline:A,className:T,children:P,...w})=>{const O=String(P).replace(/\n+$/,""),j=/language-(\w+)/.exec(T||"");return!A&&j?(0,n.jsx)(h.z,{language:j[1],text:O}):(0,n.jsx)("code",{className:T,...w,children:P})},h1:p,h2:p,h3:p,h4:p,h5:p,h6:p};function v(A){const{content:T,dialect:P="gfm",linkTarget:w,transformLinkUri:O,transformImageUri:j,className:F}=A,L=u();return(0,n.jsx)(d.$,{remarkPlugins:P==="gfm"?[x.A]:[],className:`${L.markdown} ${F??""}`.trim(),children:T,components:y,linkTarget:w,transformLinkUri:O,transformImageUri:j})}},68146:(H,b,t)=>{"use strict";t.d(b,{k:()=>h});var n=t(31085),a=t(10394),d=t(88951),x=t(54917),m=t(14041);function h(u){const g=(0,x.A)(),[p,y]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{const v=setTimeout(()=>y(!0),g.transitions.duration.short);return()=>clearTimeout(v)},[g.transitions.duration.short]),p?(0,n.jsx)(d.A,{...u,"data-testid":"progress"}):(0,n.jsx)(a.A,{display:"none"})}},66917:(H,b,t)=>{"use strict";t.d(b,{w:()=>q});var n=t(31085),a=t(10394),d=t(69076),x=t(67720),m=t(95061),h=t(41857),u=t(48543),g=t(26343),p=t(81215),y=t(87051),v=t(12398),A=t(58837),T=t(72501),P=t(14041),w=t(10437);const O=(0,A.A)(K=>(0,v.A)({icon:{position:"absolute",right:K.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"}),F=()=>{const K=O();return(0,n.jsx)(w.A,{className:K.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"currentColor"})})},L=(0,A.A)(K=>(0,v.A)({icon:{position:"absolute",right:K.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"}),G=()=>{const K=L();return(0,n.jsx)(w.A,{className:K.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"currentColor"})})},N=(0,y.A)(K=>(0,v.A)({root:{"label + &":{marginTop:K.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:K.palette.primary.main}},input:{borderRadius:K.shape.borderRadius,position:"relative",backgroundColor:K.palette.background.paper,border:"1px solid #ced4da",fontSize:K.typography.body1.fontSize,padding:K.spacing(1.25,3.25,1.25,1.5),transition:K.transitions.create(["border-color","box-shadow"]),"&:focus":{background:K.palette.background.paper,borderRadius:K.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(h.A),Q=(0,A.A)(K=>(0,v.A)({formControl:{margin:K.spacing(1,0)},label:{transform:"initial",fontWeight:"bold",fontSize:K.typography.body2.fontSize,fontFamily:K.typography.fontFamily,color:K.palette.text.primary,"&.Mui-focused":{color:K.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:K.typography.body2.fontSize,fontFamily:K.typography.fontFamily,color:K.palette.text.primary,"&.Mui-focused":{color:K.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function q(K){const{multiple:et,items:J,label:Y,placeholder:V,selected:at,onChange:nt,triggerReset:gt,native:bt=!1,disabled:xt=!1,margin:ht,"data-testid":ut="select"}=K,Et=Q(),[mt,Pt]=(0,P.useState)(at||(et?[]:"")),[Ot,jt]=(0,P.useState)(!1);(0,P.useEffect)(()=>{Pt(et?[]:"")},[gt,et]),(0,P.useEffect)(()=>{Pt(at||(et?[]:""))},[at,et]);const Nt=ft=>{Pt(ft.target.value),nt(ft.target.value)},Bt=ft=>{if(xt){ft.preventDefault();return}jt(B=>et&&!(ft.target instanceof HTMLElement)?!0:!B)},pt=()=>{jt(!1)},Lt=ft=>()=>{const B=mt.filter(k=>k!==ft);Pt(B),nt(B)};return(0,n.jsx)(a.A,{className:Et.root,children:(0,n.jsxs)(m.A,{className:Et.formControl,children:[(0,n.jsx)(u.A,{className:Et.formLabel,children:Y}),(0,n.jsxs)(p.A,{"aria-label":Y,value:mt,native:bt,disabled:xt,"data-testid":ut,displayEmpty:!0,multiple:et,margin:ht,onChange:Nt,open:Ot,onOpen:Bt,onClose:pt,input:(0,n.jsx)(N,{}),label:Y,renderValue:ft=>et&&mt.length!==0?(0,n.jsx)(a.A,{className:Et.chips,children:ft.map(B=>{const k=J.find(ot=>ot.value===B);return k?(0,n.jsx)(x.A,{label:k?.label,clickable:!0,onDelete:Lt(B),className:Et.chip},k?.value):!1})}):(0,n.jsx)(T.A,{children:mt.length===0?V||"":J.find(B=>B.value===ft)?.label}),IconComponent:()=>Ot?(0,n.jsx)(G,{}):(0,n.jsx)(F,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[!!V&&!et&&(0,n.jsx)(g.A,{value:[],children:V}),bt?J&&J.map(ft=>(0,n.jsx)("option",{value:ft.value,children:ft.label},ft.value)):J&&J.map(ft=>(0,n.jsxs)(g.A,{value:ft.value,children:[et&&(0,n.jsx)(d.A,{color:"primary",checked:mt.includes(ft.value)||!1,className:Et.checkbox}),ft.label]},ft.value))]})]})})}},27586:(H,b,t)=>{"use strict";t.d(b,{Y:()=>J});var n=t(31085),a=t(82266),d=t(72427),x=t(65461),m=t(10394),h=t(64947),u=t(93453),g=t(29365),p=t(46423),y=t(5951),v=t(26343),A=t(28233),T=t(55197),P=t(58837),w=t(72501),O=t(5893),j=t(14041),F=t(10795),L=t(31129),Z=t(72072),G=t(10315),N=t(87849);const Q=(0,P.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),q=({icon:Y})=>{const V=(0,a.n)(),at=Y?V.getSystemIcon(Y)??L.NT:L.NT;return(0,n.jsx)(at,{})},K=({link:Y})=>(0,n.jsx)(Z.N_,{to:Y.url,children:Y.title??Y.url}),et=({item:Y})=>(0,n.jsxs)(v.A,{button:!1,children:[(0,n.jsx)(p.A,{children:(0,n.jsx)(q,{icon:Y.icon})}),(0,n.jsx)(y.A,{primary:Y.title,secondary:Y.links?.reduce((V,at,nt)=>[...V,nt>0&&(0,n.jsx)("br",{},nt),(0,n.jsx)(K,{link:at},at.url)],[])})]});function J(Y){const{t:V}=(0,N.i)(G.O),{title:at,items:nt,children:gt}=Y,{items:bt}=(0,F.l)(),[xt,ht]=(0,j.useState)(!1),[ut,Et]=(0,j.useState)(null),mt=Q(),Pt=(0,d.gf)(x.U).getOptionalConfig("app.support"),Ot=(0,O.A)(Bt=>Bt.breakpoints.down("sm")),jt=Bt=>{Et(Bt.currentTarget),ht(!0)},Nt=()=>{ht(!1)};return Pt?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.A,{display:"flex",ml:1,children:Ot?(0,n.jsx)(g.A,{color:"primary",size:"small",onClick:jt,"data-testid":"support-button","aria-label":"Support",children:(0,n.jsx)(L.NT,{})}):(0,n.jsx)(h.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:jt,startIcon:(0,n.jsx)(L.NT,{}),children:V("supportButton.title")})}),(0,n.jsxs)(T.Ay,{"data-testid":"support-button-popover",open:xt,anchorEl:ut,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:Nt,children:[(0,n.jsxs)(A.A,{className:mt.popoverList,autoFocusItem:!!ut,children:[at&&(0,n.jsx)(v.A,{button:!1,alignItems:"flex-start",className:mt.menuItem,children:(0,n.jsx)(w.A,{variant:"subtitle1",children:at})}),j.Children.map(gt,(Bt,pt)=>(0,n.jsx)(v.A,{button:!1,alignItems:"flex-start",className:mt.menuItem,children:Bt},`child-${pt}`)),(nt??bt).map((Bt,pt)=>(0,n.jsx)(et,{item:Bt},`item-${pt}`))]}),(0,n.jsx)(u.A,{children:(0,n.jsx)(h.A,{color:"primary",onClick:Nt,"aria-label":"Close",children:V("supportButton.close")})})]})]}):null}},14209:(H,b,t)=>{"use strict";t.d(b,{X:()=>pt});var n=t(31085),a=t(25301),d=t(10394),x=t(29365),m=t(87051),h=t(58837),u=t(54917),g=t(72501),p=t(83313),y=t(89019),v=t(62461),A=t(68887),T=t(63798),P=t(64704),w=t(6774),O=t(75625),j=t(65859),F=t(45917),L=t(5416),Z=t(33494),G=t(80113),N=t(26229),Q=t(46802),q=t(45250),K=t(14041),et=t(64947),J=t(66917),Y=t(10315),V=t(87849);const at=(0,h.A)(B=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:B.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:B.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${B.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:B.spacing(2)}}}),{name:"BackstageTableFilters"}),nt=B=>{const k=at(),{onChangeFilters:ot}=B,{t:Ct}=(0,V.i)(Y.O),[it,vt]=(0,K.useState)({...B.selectedFilters}),[Tt,wt]=(0,K.useState)(!1),It=()=>{vt({}),wt(Ut=>!Ut)};return(0,K.useEffect)(()=>{ot(it)},[it,ot]),(0,n.jsxs)(d.A,{className:k.root,children:[(0,n.jsxs)(d.A,{className:k.header,children:[(0,n.jsx)(d.A,{className:k.value,children:Ct("table.filter.title")}),(0,n.jsx)(et.A,{color:"primary",onClick:It,children:Ct("table.filter.clearAll")})]}),(0,n.jsx)(d.A,{className:k.filters,children:B.filters?.length&&B.filters.map(Ut=>(0,n.jsx)(J.w,{triggerReset:Tt,...Ut.element,selected:it[Ut.element.label],onChange:Qt=>vt({...it,[Ut.element.label]:Qt})},Ut.element.label))})]})};var gt=t(78467);function bt(B){return(0,n.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:B.colSpan,children:(0,n.jsx)(d.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,n.jsx)(gt.A,{size:"5rem"})})})})})}const xt={Add:(0,K.forwardRef)((B,k)=>(0,n.jsx)(p.A,{...B,ref:k})),Check:(0,K.forwardRef)((B,k)=>(0,n.jsx)(v.A,{...B,ref:k})),Clear:(0,K.forwardRef)((B,k)=>(0,n.jsx)(P.A,{...B,ref:k})),Delete:(0,K.forwardRef)((B,k)=>(0,n.jsx)(w.A,{...B,ref:k})),DetailPanel:(0,K.forwardRef)((B,k)=>(0,n.jsx)(T.A,{...B,ref:k})),Edit:(0,K.forwardRef)((B,k)=>(0,n.jsx)(O.A,{...B,ref:k})),Export:(0,K.forwardRef)((B,k)=>(0,n.jsx)(N.A,{...B,ref:k})),Filter:(0,K.forwardRef)((B,k)=>(0,n.jsx)(j.A,{...B,ref:k})),FirstPage:(0,K.forwardRef)((B,k)=>(0,n.jsx)(L.A,{...B,ref:k})),LastPage:(0,K.forwardRef)((B,k)=>(0,n.jsx)(Z.A,{...B,ref:k})),NextPage:(0,K.forwardRef)((B,k)=>(0,n.jsx)(T.A,{...B,ref:k})),PreviousPage:(0,K.forwardRef)((B,k)=>(0,n.jsx)(A.A,{...B,ref:k})),ResetSearch:(0,K.forwardRef)((B,k)=>(0,n.jsx)(P.A,{...B,ref:k})),Search:(0,K.forwardRef)((B,k)=>(0,n.jsx)(F.A,{...B,ref:k})),SortArrow:(0,K.forwardRef)((B,k)=>(0,n.jsx)(y.A,{...B,ref:k})),ThirdStateCheck:(0,K.forwardRef)((B,k)=>(0,n.jsx)(G.A,{...B,ref:k})),ViewColumn:(0,K.forwardRef)((B,k)=>(0,n.jsx)(Q.A,{...B,ref:k}))};function ht(B,k){const ot=k.split(".");let Ct=B[ot[0]];for(let it=1;it<ot.length;++it){if(Ct===void 0)return Ct;const vt=ot[it];Ct=Ct[vt]}return Ct}const ut=(0,m.A)(B=>({header:{padding:B.spacing(1,2,1,2.5),borderTop:`1px solid ${B.palette.grey.A100}`,borderBottom:`1px solid ${B.palette.grey.A100}`,fontWeight:B.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(a.rV),Et=(0,m.A)(B=>({root:{padding:B.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:B.typography.fontWeightBold}},searchField:{paddingRight:B.spacing(2)}}),{name:"BackstageTableToolbar"})(a.Nb),mt=(0,h.A)(B=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:B.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Pt=(0,h.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Ot(B,k){return B.map(ot=>{const Ct=ot.headerStyle??{};let it=ot.cellStyle||{};if(ot.highlight)if(Ct.color=k.palette.textContrast,typeof it=="object")it.fontWeight=k.typography.fontWeightBold;else{const vt=it;it=(Tt,wt,It)=>({...vt(Tt,wt,It),fontWeight:k.typography.fontWeightBold})}return{...ot,headerStyle:Ct,cellStyle:it}})}function jt(B,k){return(0,q.transform)(B,(ot,Ct,it)=>{(0,q.isEqual)(Ct,k[it])||(ot[it]=Ct)})}const Nt={search:"",filtersOpen:!1,filters:{}};function Bt(B){const{toolbarRef:k,setSearch:ot,hasFilters:Ct,selectedFiltersLength:it,toggleFilters:vt}=B,Tt=mt(),wt=(0,K.useCallback)(It=>{B.onSearchChanged(It),ot(It)},[B,ot]);return Ct?(0,n.jsxs)(d.A,{className:Tt.root,children:[(0,n.jsxs)(d.A,{className:Tt.root,children:[(0,n.jsx)(x.A,{onClick:vt,"aria-label":"filter list",children:(0,n.jsx)(j.A,{})}),(0,n.jsxs)(g.A,{className:Tt.title,children:["Filters (",it,")"]})]}),(0,n.jsx)(Et,{...B,ref:k,onSearchChanged:wt})]}):(0,n.jsx)(Et,{...B,ref:k,onSearchChanged:wt})}function pt(B){const{data:k,columns:ot,emptyContent:Ct,options:it,title:vt,subtitle:Tt,localization:wt,filters:It,initialState:Ut,onStateChange:Qt,components:fe,isLoading:le,style:te,...se}=B,Te=Pt(),ze=(0,u.A)(),zt={...Nt,...Ut},[ee,Zt]=(0,K.useState)(zt.filtersOpen),We=(0,K.useCallback)(()=>Zt(Ae=>!Ae),[Zt]),[ce,je]=(0,K.useState)(zt.filters),[Ze,pe]=(0,K.useState)(zt.search);(0,K.useEffect)(()=>{if(Qt){const Ae=jt({search:Ze,filtersOpen:ee,filters:ce},Nt);Qt(Ae)}},[Ze,ee,ce,Qt]);const Je=(0,K.useCallback)(Ae=>ot.find(He=>He.title===Ae)?.field,[ot]),ln=(0,K.useMemo)(()=>{if(typeof k=="function"||!ce)return k;const Ae=Object.values(ce);return k&&Ae.flat().length?k.filter(M=>!!Object.entries(ce).filter(([,l])=>!!l.length).every(([l,E])=>{const D=ht(M,Je(l));return Array.isArray(D)&&Array.isArray(E)?D.some(tt=>E.includes(tt)):Array.isArray(D)?D.includes(E):Array.isArray(E)?E.includes(D):D===E})):k},[k,ce,Je]),en=Object.values(ce).flat().length,nn=!!It?.length,Be=(0,K.useCallback)(Ae=>(0,n.jsx)(Bt,{setSearch:pe,hasFilters:nn,selectedFiltersLength:en,toggleFilters:We,...Ae}),[We,nn,en,pe]),Ue=typeof k!="function"&&k.length===0,Ke=ot.length,sn=(0,K.useMemo)(()=>Lt({hasNoRows:Ue,emptyContent:Ct,columnCount:Ke,loading:le}),[Ue,Ct,Ke,le]);return(0,n.jsxs)(d.A,{className:Te.root,children:[ee&&k&&typeof k!="function"&&It?.length&&(0,n.jsx)(nt,{filters:ft(It,k,ot),selectedFilters:ce,onChangeFilters:je}),(0,n.jsx)(a.Ay,{components:{Header:ut,Body:sn,Toolbar:Be,...fe},options:it,columns:Ot(ot,ze),icons:xt,title:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g.A,{variant:"h5",component:"h2",children:vt}),Tt&&(0,n.jsx)(g.A,{color:"textSecondary",variant:"body1",children:Tt})]}),data:ln,style:{width:"100%",...te},localization:{toolbar:{searchPlaceholder:"Search",searchTooltip:"Search"},...wt},...se})]})}pt.icons=Object.freeze(xt);function Lt({columnCount:B,emptyContent:k,hasNoRows:ot,loading:Ct}){return it=>Ct?(0,n.jsx)(bt,{colSpan:B}):k&&ot?(0,n.jsx)("tbody",{children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:B,children:k})})}):(0,n.jsx)(a.C6,{...it})}function ft(B,k,ot){const Ct=vt=>{const Tt=new Set,wt=It=>{It!=null&&Tt.add(It)};return k&&k.forEach(It=>{const Ut=ht(It,ot.find(Qt=>Qt.title===vt)?.field);Array.isArray(Ut)?Ut.forEach(wt):wt(Ut)}),Tt},it=vt=>({placeholder:"All results",label:vt.column,multiple:vt.type==="multiple-select",items:[...Ct(vt.column)].sort().map(Tt=>({label:Tt,value:Tt}))});return B.map(vt=>({type:vt.type,element:it(vt)}))}},88640:(H,b,t)=>{"use strict";t.d(b,{B:()=>Z});var n=t(31085),a=t(268),d=t(58837),x=t(8973),m=t(29655),h=t(91567),u=t(42899),g=t(72501),p=t(9181),y=t(6924),v=t(14041),A=t(4650);const T=(G,N)=>(N.palette.type==="light"?a.e$:a.a)(N.palette[G].light,.6),P=(G,N)=>(N.palette.type==="light"?a.a:a.e$)(N.palette[G].light,.9),w=(0,d.A)(G=>({root:{marginRight:G.spacing(1),fill:({severity:N})=>T(N,G)}})),O=({severity:G})=>{const N=w({severity:G});return(0,n.jsx)(p.A,{classes:N})},j=({severity:G})=>{const N=w({severity:G});return(0,n.jsx)(y.A,{classes:N})},F=(0,d.A)(G=>({panel:{backgroundColor:({severity:N})=>P(N,G),color:({severity:N})=>T(N,G),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:N})=>T(N,G),fontWeight:G.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:N})=>T(N,G),backgroundColor:({severity:N})=>P(N,G)},details:{width:"100%",display:"block",color:G.palette.textContrast,backgroundColor:G.palette.background.default,border:`1px solid ${G.palette.border}`,padding:G.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),L=G=>G.charAt(0).toLocaleUpperCase("en-US")+G.slice(1);function Z(G){const{severity:N="warning",title:Q,titleFormat:q,message:K,children:et,defaultExpanded:J}=G,Y=F({severity:N}),V=L(N)+(Q?`: ${Q}`:"");return(0,n.jsxs)(x.A,{defaultExpanded:J??!1,className:Y.panel,role:"alert",children:[(0,n.jsxs)(m.A,{expandIcon:(0,n.jsx)(j,{severity:N}),className:Y.summary,children:[(0,n.jsx)(O,{severity:N}),(0,n.jsx)(g.A,{className:Y.summaryText,variant:"subtitle1",children:q==="markdown"?(0,n.jsx)(A.h,{content:V,className:Y.markdownContent}):V})]}),(K||et)&&(0,n.jsx)(h.A,{children:(0,n.jsxs)(u.A,{container:!0,children:[K&&(0,n.jsx)(u.A,{item:!0,xs:12,children:(0,n.jsx)(g.A,{className:Y.message,variant:"body1",children:K})}),et&&(0,n.jsx)(u.A,{item:!0,xs:12,className:Y.details,children:et})]})})]})}},10795:(H,b,t)=>{"use strict";t.d(b,{l:()=>h});var n=t(72427),a=t(65461),d=t(10315),x=t(87849);const m=()=>{const{t:u}=(0,x.i)(d.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:u("supportConfig.default.title"),icon:"warning",links:[{title:u("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}};function h(){const p=(0,n.Q2)().get(a.U)?.getOptionalConfig("app.support"),y=m();return p?{url:p.getString("url"),items:p.getConfigArray("items").flatMap(v=>({title:v.getString("title"),icon:v.getOptionalString("icon"),links:(v.getOptionalConfigArray("links")??[]).flatMap(A=>({url:A.getString("url"),title:A.getOptionalString("title")??""}))}))}:y}},31129:(H,b,t)=>{"use strict";t.d(b,{Gg:()=>j,KG:()=>F,NT:()=>P,z9:()=>m});var n=t(31085),a=t(82266),d=t(27799),x=t(14041);function m(L){const{id:Z,Fallback:G=d.A,...N}=L,q=(0,a.n)().getSystemIcon(Z)??G;return(0,n.jsx)(q,{...N})}function h(L){return _jsx(m,{id:"brokenImage",...L})}function u(L){return _jsx(m,{id:"catalog",...L})}function g(L){return _jsx(m,{id:"chat",...L})}function p(L){return _jsx(m,{id:"dashboard",...L})}function y(L){return _jsx(m,{id:"docs",...L})}function v(L){return _jsx(m,{id:"email",...L})}function A(L){return _jsx(m,{id:"github",...L})}function T(L){return _jsx(m,{id:"group",...L})}function P(L){return(0,n.jsx)(m,{id:"help",...L})}function w(L){return _jsx(m,{id:"user",...L})}function O(L){return _jsx(m,{id:"warning",...L})}function j(L){return(0,n.jsx)(m,{id:"star",...L})}function F(L){return(0,n.jsx)(m,{id:"unstarred",...L})}},26280:(H,b,t)=>{"use strict";t.d(b,{U:()=>u});var n=t(31085),a=t(58837),d=t(53373),x=t.n(d),m=t(14041);const h=(0,a.A)(g=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:g.spacing(3),paddingBottom:g.spacing(3),paddingLeft:g.spacing(2),paddingRight:g.spacing(2),[g.breakpoints.up("sm")]:{paddingLeft:g.spacing(3),paddingRight:g.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function u(g){const{className:p,stretch:y,noPadding:v,children:A,...T}=g,P=h();return(0,n.jsx)("article",{...T,className:x()(P.root,p,{[P.stretch]:y,[P.noPadding]:v}),children:A})}},59428:(H,b,t)=>{"use strict";t.d(b,{d:()=>p});var n=t(31085),a=t(10394),d=t(58837),x=t(72501),m=t(14041),h=t(93285);const u=y=>(0,d.A)(v=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:v.spacing(2),textAlign:y.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:v.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),g=({title:y,className:v})=>(0,n.jsx)(x.A,{variant:"h4",component:"h2",className:v,"data-testid":"header-title",children:y});function p(y){const{description:v,title:A,titleComponent:T=void 0,children:P,textAlign:w="left"}=y,O=u({textAlign:w})(),j=T||(0,n.jsx)(g,{title:A,className:O.title});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.m,{title:A}),(0,n.jsxs)(a.A,{className:O.container,children:[(0,n.jsxs)(a.A,{className:O.leftItemsBox,children:[j,v&&(0,n.jsx)(x.A,{className:O.description,variant:"body2",children:v})]}),(0,n.jsx)(a.A,{className:O.rightItemsBox,children:P})]})]})}},12173:(H,b,t)=>{"use strict";t.d(b,{M:()=>F});var n=t(31085),a=t(42899),d=t(58837),x=t(72501),m=t(14041),h=t(18690),u=t(72072),g=t(10795);const p=t.p+"static/mic-drop.fe3ef4d0..svg",y=(0,d.A)(L=>({micDrop:{maxWidth:"60%",bottom:L.spacing(2),right:L.spacing(2),[L.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:L.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),v=()=>{const L=y();return(0,n.jsx)("img",{src:p,className:L.micDrop,alt:"Girl dropping mic from her hands"})};var A=t(77310),T=t(87849),P=t(10315);const w=(0,d.A)(L=>({title:{paddingBottom:L.spacing(5),[L.breakpoints.down("xs")]:{paddingBottom:L.spacing(4),fontSize:L.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function O(L){const{stack:Z}=L,G=w(),{t:N}=(0,T.i)(P.O),[Q,q]=(0,m.useState)(!1);return Q?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.A,{variant:"h6",className:G.title,children:(0,n.jsx)(u.N_,{to:"#",onClick:()=>q(!1),children:N("errorPage.showLessDetails")})}),(0,n.jsx)(A.z,{text:Z,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,n.jsx)(x.A,{variant:"h6",className:G.title,children:(0,n.jsx)(u.N_,{to:"#",onClick:()=>q(!0),children:N("errorPage.showMoreDetails")})})}const j=(0,d.A)(L=>({container:{padding:L.spacing(8),[L.breakpoints.down("xs")]:{padding:L.spacing(2)}},title:{paddingBottom:L.spacing(5),[L.breakpoints.down("xs")]:{paddingBottom:L.spacing(4),fontSize:L.typography.h3.fontSize}},subtitle:{color:L.palette.textSubtle}}),{name:"BackstageErrorPage"});function F(L){const{status:Z="",statusMessage:G,additionalInfo:N,supportUrl:Q,stack:q}=L,K=j(),et=(0,h.Zp)(),J=(0,g.l)(),{t:Y}=(0,T.i)(P.O);return(0,n.jsxs)(a.A,{container:!0,className:K.container,children:[(0,n.jsxs)(a.A,{item:!0,xs:12,sm:8,md:4,children:[(0,n.jsx)(x.A,{"data-testid":"error",variant:"body1",className:K.subtitle,children:Y("errorPage.subtitle",{status:Z,statusMessage:G})}),(0,n.jsx)(x.A,{variant:"body1",className:K.subtitle,children:N}),(0,n.jsx)(x.A,{variant:"h2",className:K.title,children:Y("errorPage.title")}),(0,n.jsxs)(x.A,{variant:"h6",className:K.title,children:[(0,n.jsx)(u.N_,{to:"#","data-testid":"go-back-link",onClick:()=>et(-1),children:Y("errorPage.goBack")}),"... or please"," ",(0,n.jsx)(u.N_,{to:Q||J.url,children:"contact support"})," if you think this is a bug."]}),q&&(0,n.jsx)(O,{stack:q})]}),(0,n.jsx)(v,{})]})}},69814:(H,b,t)=>{"use strict";t.d(b,{Y:()=>et});var n=t(31085),a=t(72427),d=t(65461),x=t(10394),m=t(42899),h=t(58837),u=t(71677),g=t(72501),p=t(14041),y=t(93285),v=t(72072),A=t(45634),T=t(58007),P=t(8109),w=t(55197),O=t(87051);const j=(0,O.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(g.A),F=(0,O.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(x.A),L=(0,O.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(x.A);function Z(J){const{children:Y,...V}=J,[at,nt]=p.useState(null),gt=p.Children.toArray(Y),[bt,xt,...ht]=gt,ut=ht.length?ht.pop():gt[gt.length-1],Et=gt.length>3,mt=jt=>{nt(jt.currentTarget)},Pt=()=>{nt(null)},Ot=!!at;return(0,n.jsxs)(p.Fragment,{children:[(0,n.jsxs)(A.A,{"aria-label":"breadcrumb",...V,children:[gt.length>1&&(0,n.jsx)(F,{clone:!0,children:bt}),gt.length>2&&(0,n.jsx)(F,{clone:!0,children:xt}),Et&&(0,n.jsx)(j,{onClick:mt,children:"..."}),(0,n.jsx)(L,{children:ut})]}),(0,n.jsx)(w.Ay,{open:Ot,anchorEl:at,onClose:Pt,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,n.jsx)(T.A,{children:ht.map((jt,Nt)=>(0,n.jsx)(P.A,{button:!0,children:(0,n.jsx)(F,{clone:!0,children:jt})},Nt))})})]})}var G=t(73524);const N=(0,h.A)(J=>({header:{gridArea:"pageHeader",padding:J.spacing(3),width:"100%",boxShadow:J.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:J.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[J.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:J.page.fontColor,wordBreak:"break-word",fontSize:J.typography.h3.fontSize,marginBottom:0},subtitle:{color:J.page.fontColor,opacity:.8,display:"inline-block",marginTop:J.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:J.spacing(1),color:J.page.fontColor},breadcrumb:{color:J.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-J.spacing(.3),marginBottom:J.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-J.spacing(.3),marginBottom:J.spacing(.3)}}),{name:"BackstageHeader"}),Q=({type:J,typeLink:Y,classes:V,pageTitle:at})=>J?Y?(0,n.jsxs)(Z,{className:V.breadcrumb,children:[(0,n.jsx)(v.N_,{to:Y,children:J}),(0,n.jsx)(g.A,{children:at})]}):(0,n.jsx)(g.A,{className:V.type,children:J}):null,q=({pageTitle:J,classes:Y,tooltip:V})=>{const{contentRef:at}=(0,G.H)(),nt=(0,n.jsx)(g.A,{ref:at,tabIndex:-1,className:Y.title,variant:"h1",children:J});return V?(0,n.jsx)(u.Ay,{title:V,placement:"top-start",children:nt}):nt},K=({classes:J,subtitle:Y})=>Y?typeof Y!="string"?(0,n.jsx)(n.Fragment,{children:Y}):(0,n.jsx)(g.A,{className:J.subtitle,variant:"subtitle2",component:"span",children:Y}):null;function et(J){const{children:Y,pageTitleOverride:V,style:at,subtitle:nt,title:gt,tooltip:bt,type:xt,typeLink:ht}=J,ut=N(),mt=(0,a.gf)(d.U).getOptionalString("app.title")||"Backstage",Pt=V||gt,Ot=gt||V,jt=`${Pt} | %s | ${mt}`,Nt=`${Pt} | ${mt}`;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.m,{titleTemplate:jt,defaultTitle:Nt}),(0,n.jsxs)("header",{style:at,className:ut.header,children:[(0,n.jsxs)(x.A,{className:ut.leftItemsBox,children:[(0,n.jsx)(Q,{classes:ut,type:xt,typeLink:ht,pageTitle:Ot}),(0,n.jsx)(q,{classes:ut,pageTitle:Ot,tooltip:bt}),(0,n.jsx)(K,{classes:ut,subtitle:nt})]}),(0,n.jsx)(m.A,{container:!0,className:ut.rightItemsBox,spacing:4,children:Y})]})]})}},24504:(H,b,t)=>{"use strict";t.d(b,{Y:()=>h});var n=t(31085),a=t(14041),d=t(58837),x=t(50868);const m=(0,d.A)(u=>({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",[u.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function h(u){const{themeId:g,children:p}=u,y=m();return(0,n.jsx)(x.A,{theme:v=>({...v,page:v.getPageTheme({themeId:g})}),children:(0,n.jsx)("main",{className:y.root,children:p})})}},27155:(H,b,t)=>{"use strict";t.d(b,{d:()=>m});var n=t(31085),a=t(14041),d=t(69814),x=t(24504);function m(h){const{themeId:u,children:g,...p}=h;return(0,n.jsxs)(x.Y,{themeId:u,children:[(0,n.jsx)(d.Y,{...p}),g]})}},73524:(H,b,t)=>{"use strict";t.d(b,{G:()=>A,H:()=>T});var n=t(31085),a=t(10394),d=t(58837),x=t(5893),m=t(14041),h=t(72664),u=function(P){return P.SIDEBAR_PIN_STATE="sidebarPinState",P}(u||{});const g={getSidebarPinState(){let P;try{P=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!P},setSidebarPinState(P){return window.localStorage.setItem("sidebarPinState",JSON.stringify(P))}};var p=t(34435);const y=(0,d.A)(P=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[P.breakpoints.up("sm")]:{paddingLeft:w=>w.isPinned?w.sidebarConfig.drawerWidthOpen:w.sidebarConfig.drawerWidthClosed},[P.breakpoints.down("xs")]:{paddingBottom:w=>w.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),v=(0,m.createContext)({content:{contentRef:void 0}});function A(P){const[w,O]=(0,m.useState)(()=>g.getSidebarPinState()),{sidebarConfig:j}=(0,m.useContext)(h.yY),F=(0,m.useRef)(null),L=(0,m.useMemo)(()=>({content:{contentRef:F}}),[F]);(0,m.useEffect)(()=>{g.setSidebarPinState(w)},[w]);const Z=(0,x.A)(Q=>Q.breakpoints.down("xs"),{noSsr:!0}),G=()=>O(!w),N=y({isPinned:w,sidebarConfig:j});return(0,n.jsx)(p.qj,{value:{isPinned:w,toggleSidebarPinState:G,isMobile:Z},children:(0,n.jsx)(v.Provider,{value:L,children:(0,n.jsx)(a.A,{className:N.root,children:P.children})})})}function T(){const{content:P}=(0,m.useContext)(v);return{focusContent:(0,m.useCallback)(()=>{P?.contentRef?.current?.focus()},[P]),contentRef:P?.contentRef}}},34435:(H,b,t)=>{"use strict";t.d(b,{Ut:()=>p,qj:()=>g});var n=t(31085),a=t(43836),d=t(10602),x=t(14041);const m={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},h=(0,x.createContext)(m),u=(0,a.tK)("sidebar-pin-state-context");function g(y){const{children:v,value:A}=y;return(0,n.jsx)(h.Provider,{value:A,children:(0,n.jsx)(u.Provider,{value:(0,d.B)({1:A}),children:v})})}const p=()=>{const y=(0,x.useContext)(u),v=(0,x.useContext)(h);if(y===void 0)return v||m;const A=y.atVersion(1);if(A===void 0)throw new Error("No context found for version 1.");return A}},72664:(H,b,t)=>{"use strict";t.d(b,{Rv:()=>h,U1:()=>v,hC:()=>m,i8:()=>g,yY:()=>y});var n=t(14041);const a=72,d=24,x=18,m={drawerWidthClosed:a,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:a,iconSize:a-d*2,iconPadding:d,selectedIndicatorWidth:3,userBadgePadding:x,userBadgeDiameter:a-x*2,mobileSidebarHeight:56},h=A=>({...m,...A,iconContainerWidth:m.drawerWidthClosed,iconSize:m.drawerWidthClosed-m.iconPadding*2,userBadgeDiameter:m.drawerWidthClosed-m.userBadgePadding*2}),u={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:m.defaultOpenDelayMs+200},g=A=>({...u,...A}),p="@backstage/core/sidebar-intro-dismissed",y=(0,n.createContext)({sidebarConfig:m,submenuConfig:u}),v=(0,n.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:(H,b,t)=>{"use strict";t.d(b,{O:()=>a});var n=t(93184);const a=(0,n.h)({id:"core-components",messages:{signIn:{title:"Sign In",loginFailed:"Login failed",customProvider:{title:"Custom User",subtitle:`Enter your own User ID and credentials.
|
|
1
|
+
(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:(H,b,t)=>{"use strict";t.d(b,{c:()=>n});const n=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:(H,b,t)=>{"use strict";t.d(b,{P:()=>d,_P:()=>a,oQ:()=>n});const n="default",a="backstage.io/view-url",d="backstage.io/edit-url",x="kubernetes.io/api-server",m="kubernetes.io/api-server-certificate-authority",h="kubernetes.io/auth-provider"},6820:(H,b,t)=>{"use strict";t.d(b,{KU:()=>x,U2:()=>m,sM:()=>d});var n=t(72348);function a(h){let u=h.indexOf(":");const g=h.indexOf("/");g!==-1&&g<u&&(u=-1);const p=u===-1?void 0:h.slice(0,u),y=g===-1?void 0:h.slice(u+1,g),v=h.slice(Math.max(u+1,g+1));if(p===""||y===""||v==="")throw new TypeError(`Entity reference "${h}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:p,namespace:y,name:v}}function d(h){return{kind:h.kind,namespace:h.metadata.namespace||n.oQ,name:h.metadata.name}}function x(h,u){if(!h)throw new Error("Entity reference must not be empty");const g=u?.defaultKind,p=u?.defaultNamespace||n.oQ;let y,v,A;if(typeof h=="string"){const T=a(h);y=T.kind??g,v=T.namespace??p,A=T.name}else y=h.kind??g,v=h.namespace??p,A=h.name;if(y)if(v){if(!A){const T=JSON.stringify(h);throw new Error(`Entity reference ${T} had missing or empty name`)}}else{const T=JSON.stringify(h);throw new Error(`Entity reference ${T} had missing or empty namespace`)}else{const T=JSON.stringify(h);throw new Error(`Entity reference ${T} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:y,namespace:v,name:A}}function m(h){let u,g,p;return"metadata"in h?(u=h.kind,g=h.metadata.namespace??n.oQ,p=h.metadata.name):(u=h.kind,g=h.namespace??n.oQ,p=h.name),`${u.toLocaleLowerCase("en-US")}:${g.toLocaleLowerCase("en-US")}/${p.toLocaleLowerCase("en-US")}`}},51372:(H,b,t)=>{"use strict";t.d(b,{fT:()=>g,jn:()=>T,nC:()=>u,sA:()=>P,vv:()=>n});const n="ownedBy",a="ownerOf",d="consumesApi",x="apiConsumedBy",m="providesApi",h="apiProvidedBy",u="dependsOn",g="dependencyOf",p="parentOf",y="childOf",v="memberOf",A="hasMember",T="partOf",P="hasPart"},17736:(H,b,t)=>{"use strict";t.d(b,{Eo:()=>n,I4:()=>d});const n="backstage.io/managed-by-location",a="backstage.io/managed-by-origin-location",d="backstage.io/source-location"},78692:(H,b,t)=>{"use strict";t.d(b,{Cr:()=>h,KL:()=>m,aY:()=>x});var n=t(6820),a=t(17736);const d=/^[\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 x(u){if(typeof u!="string")throw new TypeError(`Unable to parse location ref '${u}', unexpected argument ${typeof u}`);const g=u.indexOf(":");if(g<0)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const p=u.substring(0,g).trim(),y=u.substring(g+1).trim();if(!p||!y)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(p==="http"||p==="https")throw new TypeError(`Invalid location ref '${u}', please prefix it with 'url:', e.g. 'url:${u}'`);if(d.test(y))throw new TypeError(`Invalid location ref '${u}', target is a javascript: URL`);return{type:p,target:y}}function m(u){const{type:g,target:p}=u;if(g){if(!p)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(d.test(p))throw new TypeError(`Invalid location ref '${g}:${p}', target is a javascript: URL`);return`${g}:${p}`}function h(u){const g=u.metadata?.annotations?.[a.I4]??u.metadata?.annotations?.[a.Eo];if(!g)throw new Error(`Entity '${(0,n.U2)(u)}' is missing location`);return x(g)}},77310:(H,b,t)=>{"use strict";t.d(b,{z:()=>p});var n=t(31085),a=t(10394),d=t(54917),x=t(14041),m=t(69578),h=t(40697),u=t(25577),g=t(37916);function p(y){const{text:v,language:A,showLineNumbers:T=!1,highlightedNumbers:P,customStyle:w,showCopyCodeButton:O=!1}=y,j=(0,d.A)(),F=j.palette.type==="dark"?h.A:u.A,L=j.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,n.jsxs)(a.A,{position:"relative",children:[(0,n.jsx)(m.A,{customStyle:w,language:A,style:F,showLineNumbers:T,wrapLines:!0,lineNumberStyle:{color:j.palette.textVerySubtle},lineProps:Z=>P?.includes(Z)?{style:{backgroundColor:L}}:{},children:v}),O&&(0,n.jsx)(a.A,{position:"absolute",top:0,right:0,children:(0,n.jsx)(g.l,{text:v})})]})}},37916:(H,b,t)=>{"use strict";t.d(b,{l:()=>v});var n=t(31085),a=t(72427),d=t(39837),x=t(29365),m=t(71677),h=t(99594),u=t(14041),g=t(36338),p=t(10315),y=t(87849);function v(A){const{t:T}=(0,y.i)(p.O),{text:P,tooltipDelay:w=1e3,tooltipText:O=T("copyTextButton.tooltipText"),"aria-label":j="Copy text"}=A,F=(0,a.gf)(d.m),[L,Z]=(0,u.useState)(!1),[{error:G},N]=(0,g.A)();(0,u.useEffect)(()=>{G&&F.post(G)},[G,F]);const Q=q=>{q.stopPropagation(),Z(!0),N(P)};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(m.Ay,{id:"copy-test-tooltip",title:O,placement:"top",leaveDelay:w,onClose:()=>Z(!1),open:L,children:(0,n.jsx)(x.A,{onClick:Q,"aria-label":j,children:(0,n.jsx)(h.A,{})})})})}},44186:(H,b,t)=>{"use strict";t.d(b,{p:()=>T});var n=t(31085),a=t(42899),d=t(58837),x=t(72501),m=t(14041);const h=t.p+"static/missingAnnotation.67f79e98..svg",u=t.p+"static/noInformation.4b426325..svg",g=t.p+"static/createComponent.975d1e1e..svg",p=t.p+"static/noBuild.1715fa71..svg",y=(0,d.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),v=({missing:P})=>{const w=y();switch(P){case"field":return(0,n.jsx)("img",{src:h,className:w.generalImg,alt:"annotation is missing"});case"info":return(0,n.jsx)("img",{src:u,alt:"no Information",className:w.generalImg});case"content":return(0,n.jsx)("img",{src:g,alt:"create Component",className:w.generalImg});case"data":return(0,n.jsx)("img",{src:p,alt:"no Build",className:w.generalImg});default:return null}},A=(0,d.A)(P=>({root:{backgroundColor:P.palette.background.default,padding:P.spacing(2,0,0,0)},action:{marginTop:P.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function T(P){const{title:w,description:O,missing:j,action:F}=P,L=A();return(0,n.jsxs)(a.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:L.root,spacing:2,children:[(0,n.jsx)(a.A,{item:!0,xs:12,md:6,children:(0,n.jsxs)(a.A,{container:!0,direction:"column",children:[(0,n.jsx)(a.A,{item:!0,xs:!0,children:(0,n.jsx)(x.A,{variant:"h5",children:w})}),(0,n.jsx)(a.A,{item:!0,xs:!0,children:(0,n.jsx)(x.A,{variant:"body1",children:O})}),(0,n.jsx)(a.A,{item:!0,xs:!0,className:L.action,children:F})]})}),(0,n.jsx)(a.A,{item:!0,xs:12,md:6,className:L.imageContainer,children:typeof j=="string"?(0,n.jsx)(v,{missing:j}):j.customImage})]})}},22020:(H,b,t)=>{"use strict";t.d(b,{b:()=>v});var n=t(31085),a=t(58837),d=t(58007),x=t(8109),m=t(5951),h=t(14041),u=t(37916),g=t(88640);const p=(0,a.A)(A=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:A.spacing(2)},divider:{margin:A.spacing(2)}}),{name:"BackstageErrorPanel"}),y=({error:A,message:T,stack:P,children:w})=>{const O=p();return(0,n.jsxs)(d.A,{dense:!0,children:[(0,n.jsxs)(x.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:O.text},primary:"Error",secondary:A}),(0,n.jsx)(u.l,{text:A})]}),(0,n.jsxs)(x.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:O.text},primary:"Message",secondary:T}),(0,n.jsx)(u.l,{text:T})]}),P&&(0,n.jsxs)(x.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:O.text},primary:"Stack Trace",secondary:P}),(0,n.jsx)(u.l,{text:P})]}),w]})};function v(A){const{title:T,error:P,defaultExpanded:w,titleFormat:O,children:j}=A;return(0,n.jsx)(g.B,{severity:"error",title:T??P.message,defaultExpanded:w,titleFormat:O,children:(0,n.jsx)(y,{error:P.name,message:P.message,stack:P.stack,children:j})})}},18956:(H,b,t)=>{"use strict";t.d(b,{m:()=>u});var n=t(31085),a=t(14041),d=t(72501),x=t(58837),m=t(31129);const h=(0,x.A)(()=>({icon:{color:"#f3ba37",cursor:"pointer",display:"inline-flex"},iconBorder:{color:"inherit",cursor:"pointer",display:"inline-flex"}}),{name:"BackstageFavoriteToggleIcon"});function u(p){const{isFavorite:y}=p,v=h();return(0,n.jsx)(d.A,{component:"span",className:y?v.icon:v.iconBorder,children:y?(0,n.jsx)(m.Gg,{}):(0,n.jsx)(m.KG,{})})}function g(p){const{id:y,title:v,isFavorite:A,onToggle:T,...P}=p;return _jsx(Tooltip,{id:y,title:v,children:_jsx(IconButton,{"aria-label":v,id:y,onClick:()=>T(!A),color:"inherit",...P,children:_jsx(u,{isFavorite:A})})})}},72072:(H,b,t)=>{"use strict";t.d(b,{N_:()=>J});var n=t(31085),a=t(72427),d=t(65461),x=t(93368),m=t(49203),h=t(58837),u=t(72501),g=t(53373),p=t.n(g),y=t(45250),v=t.n(y),A=t(14041),T=t(18690),P=t(73657),w=t(39330),O=t(82266);function j(){const[Y]=(0,T.AV)((0,n.jsx)(T.qh,{index:!0,element:(0,n.jsx)("div",{})}));return!Y.index}const F=(0,h.A)(Y=>({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:Y.spacing(.5)}}),{name:"Link"}),L=()=>{const V=(0,O.n)().getSystemIcon("externalLink")||w.A,at=F();return(0,n.jsx)(V,{className:at.externalLinkIcon})},Z=Y=>/^([a-z+.-]+):/.test(Y),G=/^[\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,N=window.open;if(N&&!N.__backstage){const Y=function(...at){const nt=String(at[0]);if(G.test(nt))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return N.apply(this,at)};Y.__backstage=!0,window.open=Y}const Q=()=>{try{return(0,a.gf)(d.U).getOptionalString("app.baseUrl")}catch{return}},q=()=>{const Y="http://sample.dev",V=Q()??"/",{pathname:at}=new URL(V,Y);return(0,y.trimEnd)(at,"/")},z=Y=>{let V=String(Y);const at=q(),nt=Z(V),gt=V.startsWith(at);return!nt&&!gt&&(V=at.concat(V)),V},et=Y=>Y instanceof Array?Y.map(et).join(" ").trim():typeof Y=="object"&&Y?et(Y?.props?.children):["string","number"].includes(typeof Y)?String(Y):"",J=A.forwardRef(({onClick:Y,noTrack:V,externalLinkIcon:at,...nt},gt)=>{const bt=F(),xt=(0,x.s)(),ht=j()?z(nt.to):nt.to,ut=et(nt.children)||ht,At=Z(ht),mt=At&&!!/^https?:/.exec(ht);if(G.test(ht))throw new Error("Link component rejected javascript: URL as a security precaution");const Pt=Ot=>{Y?.(Ot),V||xt.captureEvent("click",ut,{attributes:{to:ht}})};return At?(0,n.jsxs)(m.A,{...mt?{target:"_blank",rel:"noopener"}:{},...nt,...nt["aria-label"]?{"aria-label":`${nt["aria-label"]}, Opens in a new window`}:{},ref:gt,href:ht,onClick:Pt,className:p()(bt.externalLink,nt.className),children:[nt.children,at&&(0,n.jsx)(L,{}),(0,n.jsx)(u.A,{component:"span",className:bt.visuallyHidden,children:", Opens in a new window"})]}):(0,n.jsx)(m.A,{...nt,ref:gt,component:P.N_,to:ht,onClick:Pt})})},73896:(H,b,t)=>{"use strict";t.d(b,{z:()=>h});var n=t(31085),a=t(64947),d=t(14041),x=t(72072);const m=d.forwardRef((g,p)=>(0,n.jsx)(x.N_,{ref:p,...g,color:"initial"})),h=d.forwardRef((g,p)=>(0,n.jsx)(a.A,{ref:p,component:m,...g})),u=null},4650:(H,b,t)=>{"use strict";t.d(b,{h:()=>v});var n=t(31085),a=t(58837),d=t(45872),x=t(61125),m=t(14041),h=t(77310);const u=(0,a.A)(A=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${A.palette.border}`},"& th, & td":{border:`1px solid ${A.palette.border}`,padding:A.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:A.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:A.palette.background.paper},"& tr":{backgroundColor:A.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:A.palette.background.default},"& a":{color:A.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),g=(A,T)=>T?typeof T=="string"?A+T:m.Children.toArray(T.props.children).reduce(g,A):A,p=({level:A,children:T})=>{const O=m.Children.toArray(T).reduce(g,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return m.createElement(`h${A}`,{id:O},T)},y={code:({inline:A,className:T,children:P,...w})=>{const O=String(P).replace(/\n+$/,""),j=/language-(\w+)/.exec(T||"");return!A&&j?(0,n.jsx)(h.z,{language:j[1],text:O}):(0,n.jsx)("code",{className:T,...w,children:P})},h1:p,h2:p,h3:p,h4:p,h5:p,h6:p};function v(A){const{content:T,dialect:P="gfm",linkTarget:w,transformLinkUri:O,transformImageUri:j,className:F}=A,L=u();return(0,n.jsx)(d.$,{remarkPlugins:P==="gfm"?[x.A]:[],className:`${L.markdown} ${F??""}`.trim(),children:T,components:y,linkTarget:w,transformLinkUri:O,transformImageUri:j})}},68146:(H,b,t)=>{"use strict";t.d(b,{k:()=>h});var n=t(31085),a=t(10394),d=t(88951),x=t(54917),m=t(14041);function h(u){const g=(0,x.A)(),[p,y]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{const v=setTimeout(()=>y(!0),g.transitions.duration.short);return()=>clearTimeout(v)},[g.transitions.duration.short]),p?(0,n.jsx)(d.A,{...u,"data-testid":"progress"}):(0,n.jsx)(a.A,{display:"none"})}},66917:(H,b,t)=>{"use strict";t.d(b,{w:()=>q});var n=t(31085),a=t(10394),d=t(69076),x=t(67720),m=t(95061),h=t(41857),u=t(48543),g=t(26343),p=t(81215),y=t(87051),v=t(12398),A=t(58837),T=t(72501),P=t(14041),w=t(10437);const O=(0,A.A)(z=>(0,v.A)({icon:{position:"absolute",right:z.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"}),F=()=>{const z=O();return(0,n.jsx)(w.A,{className:z.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"currentColor"})})},L=(0,A.A)(z=>(0,v.A)({icon:{position:"absolute",right:z.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"}),G=()=>{const z=L();return(0,n.jsx)(w.A,{className:z.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"currentColor"})})},N=(0,y.A)(z=>(0,v.A)({root:{"label + &":{marginTop:z.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:z.palette.primary.main}},input:{borderRadius:z.shape.borderRadius,position:"relative",backgroundColor:z.palette.background.paper,border:"1px solid #ced4da",fontSize:z.typography.body1.fontSize,padding:z.spacing(1.25,3.25,1.25,1.5),transition:z.transitions.create(["border-color","box-shadow"]),"&:focus":{background:z.palette.background.paper,borderRadius:z.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(h.A),Q=(0,A.A)(z=>(0,v.A)({formControl:{margin:z.spacing(1,0)},label:{transform:"initial",fontWeight:"bold",fontSize:z.typography.body2.fontSize,fontFamily:z.typography.fontFamily,color:z.palette.text.primary,"&.Mui-focused":{color:z.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:z.typography.body2.fontSize,fontFamily:z.typography.fontFamily,color:z.palette.text.primary,"&.Mui-focused":{color:z.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function q(z){const{multiple:et,items:J,label:Y,placeholder:V,selected:at,onChange:nt,triggerReset:gt,native:bt=!1,disabled:xt=!1,margin:ht,"data-testid":ut="select"}=z,At=Q(),[mt,Pt]=(0,P.useState)(at||(et?[]:"")),[Ot,jt]=(0,P.useState)(!1);(0,P.useEffect)(()=>{Pt(et?[]:"")},[gt,et]),(0,P.useEffect)(()=>{Pt(at||(et?[]:""))},[at,et]);const Nt=ft=>{Pt(ft.target.value),nt(ft.target.value)},Ut=ft=>{if(xt){ft.preventDefault();return}jt(B=>et&&!(ft.target instanceof HTMLElement)?!0:!B)},pt=()=>{jt(!1)},Lt=ft=>()=>{const B=mt.filter(k=>k!==ft);Pt(B),nt(B)};return(0,n.jsx)(a.A,{className:At.root,children:(0,n.jsxs)(m.A,{className:At.formControl,children:[(0,n.jsx)(u.A,{className:At.formLabel,children:Y}),(0,n.jsxs)(p.A,{"aria-label":Y,value:mt,native:bt,disabled:xt,"data-testid":ut,displayEmpty:!0,multiple:et,margin:ht,onChange:Nt,open:Ot,onOpen:Ut,onClose:pt,input:(0,n.jsx)(N,{}),label:Y,renderValue:ft=>et&&mt.length!==0?(0,n.jsx)(a.A,{className:At.chips,children:ft.map(B=>{const k=J.find(ot=>ot.value===B);return k?(0,n.jsx)(x.A,{label:k?.label,clickable:!0,onDelete:Lt(B),className:At.chip},k?.value):!1})}):(0,n.jsx)(T.A,{children:mt.length===0?V||"":J.find(B=>B.value===ft)?.label}),IconComponent:()=>Ot?(0,n.jsx)(G,{}):(0,n.jsx)(F,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[!!V&&!et&&(0,n.jsx)(g.A,{value:[],children:V}),bt?J&&J.map(ft=>(0,n.jsx)("option",{value:ft.value,children:ft.label},ft.value)):J&&J.map(ft=>(0,n.jsxs)(g.A,{value:ft.value,children:[et&&(0,n.jsx)(d.A,{color:"primary",checked:mt.includes(ft.value)||!1,className:At.checkbox}),ft.label]},ft.value))]})]})})}},27586:(H,b,t)=>{"use strict";t.d(b,{Y:()=>J});var n=t(31085),a=t(82266),d=t(72427),x=t(65461),m=t(10394),h=t(64947),u=t(93453),g=t(29365),p=t(46423),y=t(5951),v=t(26343),A=t(28233),T=t(55197),P=t(58837),w=t(72501),O=t(5893),j=t(14041),F=t(10795),L=t(31129),Z=t(72072),G=t(10315),N=t(87849);const Q=(0,P.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),q=({icon:Y})=>{const V=(0,a.n)(),at=Y?V.getSystemIcon(Y)??L.NT:L.NT;return(0,n.jsx)(at,{})},z=({link:Y})=>(0,n.jsx)(Z.N_,{to:Y.url,children:Y.title??Y.url}),et=({item:Y})=>(0,n.jsxs)(v.A,{button:!1,children:[(0,n.jsx)(p.A,{children:(0,n.jsx)(q,{icon:Y.icon})}),(0,n.jsx)(y.A,{primary:Y.title,secondary:Y.links?.reduce((V,at,nt)=>[...V,nt>0&&(0,n.jsx)("br",{},nt),(0,n.jsx)(z,{link:at},at.url)],[])})]});function J(Y){const{t:V}=(0,N.i)(G.O),{title:at,items:nt,children:gt}=Y,{items:bt}=(0,F.l)(),[xt,ht]=(0,j.useState)(!1),[ut,At]=(0,j.useState)(null),mt=Q(),Pt=(0,d.gf)(x.U).getOptionalConfig("app.support"),Ot=(0,O.A)(Ut=>Ut.breakpoints.down("sm")),jt=Ut=>{At(Ut.currentTarget),ht(!0)},Nt=()=>{ht(!1)};return Pt?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.A,{display:"flex",ml:1,children:Ot?(0,n.jsx)(g.A,{color:"primary",size:"small",onClick:jt,"data-testid":"support-button","aria-label":"Support",children:(0,n.jsx)(L.NT,{})}):(0,n.jsx)(h.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:jt,startIcon:(0,n.jsx)(L.NT,{}),children:V("supportButton.title")})}),(0,n.jsxs)(T.Ay,{"data-testid":"support-button-popover",open:xt,anchorEl:ut,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:Nt,children:[(0,n.jsxs)(A.A,{className:mt.popoverList,autoFocusItem:!!ut,children:[at&&(0,n.jsx)(v.A,{button:!1,alignItems:"flex-start",className:mt.menuItem,children:(0,n.jsx)(w.A,{variant:"subtitle1",children:at})}),j.Children.map(gt,(Ut,pt)=>(0,n.jsx)(v.A,{button:!1,alignItems:"flex-start",className:mt.menuItem,children:Ut},`child-${pt}`)),(nt??bt).map((Ut,pt)=>(0,n.jsx)(et,{item:Ut},`item-${pt}`))]}),(0,n.jsx)(u.A,{children:(0,n.jsx)(h.A,{color:"primary",onClick:Nt,"aria-label":"Close",children:V("supportButton.close")})})]})]}):null}},14209:(H,b,t)=>{"use strict";t.d(b,{X:()=>pt});var n=t(31085),a=t(25301),d=t(10394),x=t(29365),m=t(87051),h=t(58837),u=t(54917),g=t(72501),p=t(83313),y=t(89019),v=t(62461),A=t(68887),T=t(63798),P=t(64704),w=t(6774),O=t(75625),j=t(65859),F=t(45917),L=t(5416),Z=t(33494),G=t(80113),N=t(26229),Q=t(46802),q=t(45250),z=t(14041),et=t(64947),J=t(66917),Y=t(10315),V=t(87849);const at=(0,h.A)(B=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:B.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:B.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${B.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:B.spacing(2)}}}),{name:"BackstageTableFilters"}),nt=B=>{const k=at(),{onChangeFilters:ot}=B,{t:Ct}=(0,V.i)(Y.O),[it,vt]=(0,z.useState)({...B.selectedFilters}),[Tt,wt]=(0,z.useState)(!1),It=()=>{vt({}),wt($t=>!$t)};return(0,z.useEffect)(()=>{ot(it)},[it,ot]),(0,n.jsxs)(d.A,{className:k.root,children:[(0,n.jsxs)(d.A,{className:k.header,children:[(0,n.jsx)(d.A,{className:k.value,children:Ct("table.filter.title")}),(0,n.jsx)(et.A,{color:"primary",onClick:It,children:Ct("table.filter.clearAll")})]}),(0,n.jsx)(d.A,{className:k.filters,children:B.filters?.length&&B.filters.map($t=>(0,n.jsx)(J.w,{triggerReset:Tt,...$t.element,selected:it[$t.element.label],onChange:Qt=>vt({...it,[$t.element.label]:Qt})},$t.element.label))})]})};var gt=t(78467);function bt(B){return(0,n.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:B.colSpan,children:(0,n.jsx)(d.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,n.jsx)(gt.A,{size:"5rem"})})})})})}const xt={Add:(0,z.forwardRef)((B,k)=>(0,n.jsx)(p.A,{...B,ref:k})),Check:(0,z.forwardRef)((B,k)=>(0,n.jsx)(v.A,{...B,ref:k})),Clear:(0,z.forwardRef)((B,k)=>(0,n.jsx)(P.A,{...B,ref:k})),Delete:(0,z.forwardRef)((B,k)=>(0,n.jsx)(w.A,{...B,ref:k})),DetailPanel:(0,z.forwardRef)((B,k)=>(0,n.jsx)(T.A,{...B,ref:k})),Edit:(0,z.forwardRef)((B,k)=>(0,n.jsx)(O.A,{...B,ref:k})),Export:(0,z.forwardRef)((B,k)=>(0,n.jsx)(N.A,{...B,ref:k})),Filter:(0,z.forwardRef)((B,k)=>(0,n.jsx)(j.A,{...B,ref:k})),FirstPage:(0,z.forwardRef)((B,k)=>(0,n.jsx)(L.A,{...B,ref:k})),LastPage:(0,z.forwardRef)((B,k)=>(0,n.jsx)(Z.A,{...B,ref:k})),NextPage:(0,z.forwardRef)((B,k)=>(0,n.jsx)(T.A,{...B,ref:k})),PreviousPage:(0,z.forwardRef)((B,k)=>(0,n.jsx)(A.A,{...B,ref:k})),ResetSearch:(0,z.forwardRef)((B,k)=>(0,n.jsx)(P.A,{...B,ref:k})),Search:(0,z.forwardRef)((B,k)=>(0,n.jsx)(F.A,{...B,ref:k})),SortArrow:(0,z.forwardRef)((B,k)=>(0,n.jsx)(y.A,{...B,ref:k})),ThirdStateCheck:(0,z.forwardRef)((B,k)=>(0,n.jsx)(G.A,{...B,ref:k})),ViewColumn:(0,z.forwardRef)((B,k)=>(0,n.jsx)(Q.A,{...B,ref:k}))};function ht(B,k){const ot=k.split(".");let Ct=B[ot[0]];for(let it=1;it<ot.length;++it){if(Ct===void 0)return Ct;const vt=ot[it];Ct=Ct[vt]}return Ct}const ut=(0,m.A)(B=>({header:{padding:B.spacing(1,2,1,2.5),borderTop:`1px solid ${B.palette.grey.A100}`,borderBottom:`1px solid ${B.palette.grey.A100}`,fontWeight:B.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(a.rV),At=(0,m.A)(B=>({root:{padding:B.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:B.typography.fontWeightBold}},searchField:{paddingRight:B.spacing(2)}}),{name:"BackstageTableToolbar"})(a.Nb),mt=(0,h.A)(B=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:B.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Pt=(0,h.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Ot(B,k){return B.map(ot=>{const Ct=ot.headerStyle??{};let it=ot.cellStyle||{};if(ot.highlight)if(Ct.color=k.palette.textContrast,typeof it=="object")it.fontWeight=k.typography.fontWeightBold;else{const vt=it;it=(Tt,wt,It)=>({...vt(Tt,wt,It),fontWeight:k.typography.fontWeightBold})}return{...ot,headerStyle:Ct,cellStyle:it}})}function jt(B,k){return(0,q.transform)(B,(ot,Ct,it)=>{(0,q.isEqual)(Ct,k[it])||(ot[it]=Ct)})}const Nt={search:"",filtersOpen:!1,filters:{}};function Ut(B){const{toolbarRef:k,setSearch:ot,hasFilters:Ct,selectedFiltersLength:it,toggleFilters:vt}=B,Tt=mt(),wt=(0,z.useCallback)(It=>{B.onSearchChanged(It),ot(It)},[B,ot]);return Ct?(0,n.jsxs)(d.A,{className:Tt.root,children:[(0,n.jsxs)(d.A,{className:Tt.root,children:[(0,n.jsx)(x.A,{onClick:vt,"aria-label":"filter list",children:(0,n.jsx)(j.A,{})}),(0,n.jsxs)(g.A,{className:Tt.title,children:["Filters (",it,")"]})]}),(0,n.jsx)(At,{...B,ref:k,onSearchChanged:wt})]}):(0,n.jsx)(At,{...B,ref:k,onSearchChanged:wt})}function pt(B){const{data:k,columns:ot,emptyContent:Ct,options:it,title:vt,subtitle:Tt,localization:wt,filters:It,initialState:$t,onStateChange:Qt,components:fe,isLoading:le,style:te,...se}=B,Te=Pt(),ze=(0,u.A)(),zt={...Nt,...$t},[ee,Zt]=(0,z.useState)(zt.filtersOpen),We=(0,z.useCallback)(()=>Zt(Ae=>!Ae),[Zt]),[ce,je]=(0,z.useState)(zt.filters),[Ze,pe]=(0,z.useState)(zt.search);(0,z.useEffect)(()=>{if(Qt){const Ae=jt({search:Ze,filtersOpen:ee,filters:ce},Nt);Qt(Ae)}},[Ze,ee,ce,Qt]);const Je=(0,z.useCallback)(Ae=>ot.find(He=>He.title===Ae)?.field,[ot]),ln=(0,z.useMemo)(()=>{if(typeof k=="function"||!ce)return k;const Ae=Object.values(ce);return k&&Ae.flat().length?k.filter(M=>!!Object.entries(ce).filter(([,l])=>!!l.length).every(([l,E])=>{const D=ht(M,Je(l));return Array.isArray(D)&&Array.isArray(E)?D.some(tt=>E.includes(tt)):Array.isArray(D)?D.includes(E):Array.isArray(E)?E.includes(D):D===E})):k},[k,ce,Je]),en=Object.values(ce).flat().length,nn=!!It?.length,Be=(0,z.useCallback)(Ae=>(0,n.jsx)(Ut,{setSearch:pe,hasFilters:nn,selectedFiltersLength:en,toggleFilters:We,...Ae}),[We,nn,en,pe]),Ue=typeof k!="function"&&k.length===0,Ke=ot.length,sn=(0,z.useMemo)(()=>Lt({hasNoRows:Ue,emptyContent:Ct,columnCount:Ke,loading:le}),[Ue,Ct,Ke,le]);return(0,n.jsxs)(d.A,{className:Te.root,children:[ee&&k&&typeof k!="function"&&It?.length&&(0,n.jsx)(nt,{filters:ft(It,k,ot),selectedFilters:ce,onChangeFilters:je}),(0,n.jsx)(a.Ay,{components:{Header:ut,Body:sn,Toolbar:Be,...fe},options:it,columns:Ot(ot,ze),icons:xt,title:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g.A,{variant:"h5",component:"h2",children:vt}),Tt&&(0,n.jsx)(g.A,{color:"textSecondary",variant:"body1",children:Tt})]}),data:ln,style:{width:"100%",...te},localization:{toolbar:{searchPlaceholder:"Search",searchTooltip:"Search"},...wt},...se})]})}pt.icons=Object.freeze(xt);function Lt({columnCount:B,emptyContent:k,hasNoRows:ot,loading:Ct}){return it=>Ct?(0,n.jsx)(bt,{colSpan:B}):k&&ot?(0,n.jsx)("tbody",{children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:B,children:k})})}):(0,n.jsx)(a.C6,{...it})}function ft(B,k,ot){const Ct=vt=>{const Tt=new Set,wt=It=>{It!=null&&Tt.add(It)};return k&&k.forEach(It=>{const $t=ht(It,ot.find(Qt=>Qt.title===vt)?.field);Array.isArray($t)?$t.forEach(wt):wt($t)}),Tt},it=vt=>({placeholder:"All results",label:vt.column,multiple:vt.type==="multiple-select",items:[...Ct(vt.column)].sort().map(Tt=>({label:Tt,value:Tt}))});return B.map(vt=>({type:vt.type,element:it(vt)}))}},88640:(H,b,t)=>{"use strict";t.d(b,{B:()=>Z});var n=t(31085),a=t(268),d=t(58837),x=t(8973),m=t(29655),h=t(91567),u=t(42899),g=t(72501),p=t(9181),y=t(6924),v=t(14041),A=t(4650);const T=(G,N)=>(N.palette.type==="light"?a.e$:a.a)(N.palette[G].light,.6),P=(G,N)=>(N.palette.type==="light"?a.a:a.e$)(N.palette[G].light,.9),w=(0,d.A)(G=>({root:{marginRight:G.spacing(1),fill:({severity:N})=>T(N,G)}})),O=({severity:G})=>{const N=w({severity:G});return(0,n.jsx)(p.A,{classes:N})},j=({severity:G})=>{const N=w({severity:G});return(0,n.jsx)(y.A,{classes:N})},F=(0,d.A)(G=>({panel:{backgroundColor:({severity:N})=>P(N,G),color:({severity:N})=>T(N,G),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:N})=>T(N,G),fontWeight:G.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:N})=>T(N,G),backgroundColor:({severity:N})=>P(N,G)},details:{width:"100%",display:"block",color:G.palette.textContrast,backgroundColor:G.palette.background.default,border:`1px solid ${G.palette.border}`,padding:G.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),L=G=>G.charAt(0).toLocaleUpperCase("en-US")+G.slice(1);function Z(G){const{severity:N="warning",title:Q,titleFormat:q,message:z,children:et,defaultExpanded:J}=G,Y=F({severity:N}),V=L(N)+(Q?`: ${Q}`:"");return(0,n.jsxs)(x.A,{defaultExpanded:J??!1,className:Y.panel,role:"alert",children:[(0,n.jsxs)(m.A,{expandIcon:(0,n.jsx)(j,{severity:N}),className:Y.summary,children:[(0,n.jsx)(O,{severity:N}),(0,n.jsx)(g.A,{className:Y.summaryText,variant:"subtitle1",children:q==="markdown"?(0,n.jsx)(A.h,{content:V,className:Y.markdownContent}):V})]}),(z||et)&&(0,n.jsx)(h.A,{children:(0,n.jsxs)(u.A,{container:!0,children:[z&&(0,n.jsx)(u.A,{item:!0,xs:12,children:(0,n.jsx)(g.A,{className:Y.message,variant:"body1",children:z})}),et&&(0,n.jsx)(u.A,{item:!0,xs:12,className:Y.details,children:et})]})})]})}},10795:(H,b,t)=>{"use strict";t.d(b,{l:()=>h});var n=t(72427),a=t(65461),d=t(10315),x=t(87849);const m=()=>{const{t:u}=(0,x.i)(d.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:u("supportConfig.default.title"),icon:"warning",links:[{title:u("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}};function h(){const p=(0,n.Q2)().get(a.U)?.getOptionalConfig("app.support"),y=m();return p?{url:p.getString("url"),items:p.getConfigArray("items").flatMap(v=>({title:v.getString("title"),icon:v.getOptionalString("icon"),links:(v.getOptionalConfigArray("links")??[]).flatMap(A=>({url:A.getString("url"),title:A.getOptionalString("title")??""}))}))}:y}},31129:(H,b,t)=>{"use strict";t.d(b,{Gg:()=>j,KG:()=>F,NT:()=>P,z9:()=>m});var n=t(31085),a=t(82266),d=t(27799),x=t(14041);function m(L){const{id:Z,Fallback:G=d.A,...N}=L,q=(0,a.n)().getSystemIcon(Z)??G;return(0,n.jsx)(q,{...N})}function h(L){return _jsx(m,{id:"brokenImage",...L})}function u(L){return _jsx(m,{id:"catalog",...L})}function g(L){return _jsx(m,{id:"chat",...L})}function p(L){return _jsx(m,{id:"dashboard",...L})}function y(L){return _jsx(m,{id:"docs",...L})}function v(L){return _jsx(m,{id:"email",...L})}function A(L){return _jsx(m,{id:"github",...L})}function T(L){return _jsx(m,{id:"group",...L})}function P(L){return(0,n.jsx)(m,{id:"help",...L})}function w(L){return _jsx(m,{id:"user",...L})}function O(L){return _jsx(m,{id:"warning",...L})}function j(L){return(0,n.jsx)(m,{id:"star",...L})}function F(L){return(0,n.jsx)(m,{id:"unstarred",...L})}},26280:(H,b,t)=>{"use strict";t.d(b,{U:()=>u});var n=t(31085),a=t(58837),d=t(53373),x=t.n(d),m=t(14041);const h=(0,a.A)(g=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:g.spacing(3),paddingBottom:g.spacing(3),paddingLeft:g.spacing(2),paddingRight:g.spacing(2),[g.breakpoints.up("sm")]:{paddingLeft:g.spacing(3),paddingRight:g.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function u(g){const{className:p,stretch:y,noPadding:v,children:A,...T}=g,P=h();return(0,n.jsx)("article",{...T,className:x()(P.root,p,{[P.stretch]:y,[P.noPadding]:v}),children:A})}},59428:(H,b,t)=>{"use strict";t.d(b,{d:()=>p});var n=t(31085),a=t(10394),d=t(58837),x=t(72501),m=t(14041),h=t(93285);const u=y=>(0,d.A)(v=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:v.spacing(2),textAlign:y.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:v.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),g=({title:y,className:v})=>(0,n.jsx)(x.A,{variant:"h4",component:"h2",className:v,"data-testid":"header-title",children:y});function p(y){const{description:v,title:A,titleComponent:T=void 0,children:P,textAlign:w="left"}=y,O=u({textAlign:w})(),j=T||(0,n.jsx)(g,{title:A,className:O.title});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.m,{title:A}),(0,n.jsxs)(a.A,{className:O.container,children:[(0,n.jsxs)(a.A,{className:O.leftItemsBox,children:[j,v&&(0,n.jsx)(x.A,{className:O.description,variant:"body2",children:v})]}),(0,n.jsx)(a.A,{className:O.rightItemsBox,children:P})]})]})}},12173:(H,b,t)=>{"use strict";t.d(b,{M:()=>F});var n=t(31085),a=t(42899),d=t(58837),x=t(72501),m=t(14041),h=t(18690),u=t(72072),g=t(10795);const p=t.p+"static/mic-drop.fe3ef4d0..svg",y=(0,d.A)(L=>({micDrop:{maxWidth:"60%",bottom:L.spacing(2),right:L.spacing(2),[L.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:L.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),v=()=>{const L=y();return(0,n.jsx)("img",{src:p,className:L.micDrop,alt:"Girl dropping mic from her hands"})};var A=t(77310),T=t(87849),P=t(10315);const w=(0,d.A)(L=>({title:{paddingBottom:L.spacing(5),[L.breakpoints.down("xs")]:{paddingBottom:L.spacing(4),fontSize:L.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function O(L){const{stack:Z}=L,G=w(),{t:N}=(0,T.i)(P.O),[Q,q]=(0,m.useState)(!1);return Q?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.A,{variant:"h6",className:G.title,children:(0,n.jsx)(u.N_,{to:"#",onClick:()=>q(!1),children:N("errorPage.showLessDetails")})}),(0,n.jsx)(A.z,{text:Z,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,n.jsx)(x.A,{variant:"h6",className:G.title,children:(0,n.jsx)(u.N_,{to:"#",onClick:()=>q(!0),children:N("errorPage.showMoreDetails")})})}const j=(0,d.A)(L=>({container:{padding:L.spacing(8),[L.breakpoints.down("xs")]:{padding:L.spacing(2)}},title:{paddingBottom:L.spacing(5),[L.breakpoints.down("xs")]:{paddingBottom:L.spacing(4),fontSize:L.typography.h3.fontSize}},subtitle:{color:L.palette.textSubtle}}),{name:"BackstageErrorPage"});function F(L){const{status:Z="",statusMessage:G,additionalInfo:N,supportUrl:Q,stack:q}=L,z=j(),et=(0,h.Zp)(),J=(0,g.l)(),{t:Y}=(0,T.i)(P.O);return(0,n.jsxs)(a.A,{container:!0,className:z.container,children:[(0,n.jsxs)(a.A,{item:!0,xs:12,sm:8,md:4,children:[(0,n.jsx)(x.A,{"data-testid":"error",variant:"body1",className:z.subtitle,children:Y("errorPage.subtitle",{status:Z,statusMessage:G})}),(0,n.jsx)(x.A,{variant:"body1",className:z.subtitle,children:N}),(0,n.jsx)(x.A,{variant:"h2",className:z.title,children:Y("errorPage.title")}),(0,n.jsxs)(x.A,{variant:"h6",className:z.title,children:[(0,n.jsx)(u.N_,{to:"#","data-testid":"go-back-link",onClick:()=>et(-1),children:Y("errorPage.goBack")}),"... or please"," ",(0,n.jsx)(u.N_,{to:Q||J.url,children:"contact support"})," if you think this is a bug."]}),q&&(0,n.jsx)(O,{stack:q})]}),(0,n.jsx)(v,{})]})}},69814:(H,b,t)=>{"use strict";t.d(b,{Y:()=>et});var n=t(31085),a=t(72427),d=t(65461),x=t(10394),m=t(42899),h=t(58837),u=t(71677),g=t(72501),p=t(14041),y=t(93285),v=t(72072),A=t(45634),T=t(58007),P=t(8109),w=t(55197),O=t(87051);const j=(0,O.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(g.A),F=(0,O.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(x.A),L=(0,O.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(x.A);function Z(J){const{children:Y,...V}=J,[at,nt]=p.useState(null),gt=p.Children.toArray(Y),[bt,xt,...ht]=gt,ut=ht.length?ht.pop():gt[gt.length-1],At=gt.length>3,mt=jt=>{nt(jt.currentTarget)},Pt=()=>{nt(null)},Ot=!!at;return(0,n.jsxs)(p.Fragment,{children:[(0,n.jsxs)(A.A,{"aria-label":"breadcrumb",...V,children:[gt.length>1&&(0,n.jsx)(F,{clone:!0,children:bt}),gt.length>2&&(0,n.jsx)(F,{clone:!0,children:xt}),At&&(0,n.jsx)(j,{onClick:mt,children:"..."}),(0,n.jsx)(L,{children:ut})]}),(0,n.jsx)(w.Ay,{open:Ot,anchorEl:at,onClose:Pt,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,n.jsx)(T.A,{children:ht.map((jt,Nt)=>(0,n.jsx)(P.A,{button:!0,children:(0,n.jsx)(F,{clone:!0,children:jt})},Nt))})})]})}var G=t(73524);const N=(0,h.A)(J=>({header:{gridArea:"pageHeader",padding:J.spacing(3),width:"100%",boxShadow:J.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:J.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[J.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:J.page.fontColor,wordBreak:"break-word",fontSize:J.typography.h3.fontSize,marginBottom:0},subtitle:{color:J.page.fontColor,opacity:.8,display:"inline-block",marginTop:J.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:J.spacing(1),color:J.page.fontColor},breadcrumb:{color:J.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-J.spacing(.3),marginBottom:J.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-J.spacing(.3),marginBottom:J.spacing(.3)}}),{name:"BackstageHeader"}),Q=({type:J,typeLink:Y,classes:V,pageTitle:at})=>J?Y?(0,n.jsxs)(Z,{className:V.breadcrumb,children:[(0,n.jsx)(v.N_,{to:Y,children:J}),(0,n.jsx)(g.A,{children:at})]}):(0,n.jsx)(g.A,{className:V.type,children:J}):null,q=({pageTitle:J,classes:Y,tooltip:V})=>{const{contentRef:at}=(0,G.H)(),nt=(0,n.jsx)(g.A,{ref:at,tabIndex:-1,className:Y.title,variant:"h1",children:J});return V?(0,n.jsx)(u.Ay,{title:V,placement:"top-start",children:nt}):nt},z=({classes:J,subtitle:Y})=>Y?typeof Y!="string"?(0,n.jsx)(n.Fragment,{children:Y}):(0,n.jsx)(g.A,{className:J.subtitle,variant:"subtitle2",component:"span",children:Y}):null;function et(J){const{children:Y,pageTitleOverride:V,style:at,subtitle:nt,title:gt,tooltip:bt,type:xt,typeLink:ht}=J,ut=N(),mt=(0,a.gf)(d.U).getOptionalString("app.title")||"Backstage",Pt=V||gt,Ot=gt||V,jt=`${Pt} | %s | ${mt}`,Nt=`${Pt} | ${mt}`;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.m,{titleTemplate:jt,defaultTitle:Nt}),(0,n.jsxs)("header",{style:at,className:ut.header,children:[(0,n.jsxs)(x.A,{className:ut.leftItemsBox,children:[(0,n.jsx)(Q,{classes:ut,type:xt,typeLink:ht,pageTitle:Ot}),(0,n.jsx)(q,{classes:ut,pageTitle:Ot,tooltip:bt}),(0,n.jsx)(z,{classes:ut,subtitle:nt})]}),(0,n.jsx)(m.A,{container:!0,className:ut.rightItemsBox,spacing:4,children:Y})]})]})}},24504:(H,b,t)=>{"use strict";t.d(b,{Y:()=>h});var n=t(31085),a=t(14041),d=t(58837),x=t(50868);const m=(0,d.A)(u=>({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",[u.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function h(u){const{themeId:g,children:p}=u,y=m();return(0,n.jsx)(x.A,{theme:v=>({...v,page:v.getPageTheme({themeId:g})}),children:(0,n.jsx)("main",{className:y.root,children:p})})}},27155:(H,b,t)=>{"use strict";t.d(b,{d:()=>m});var n=t(31085),a=t(14041),d=t(69814),x=t(24504);function m(h){const{themeId:u,children:g,...p}=h;return(0,n.jsxs)(x.Y,{themeId:u,children:[(0,n.jsx)(d.Y,{...p}),g]})}},73524:(H,b,t)=>{"use strict";t.d(b,{G:()=>A,H:()=>T});var n=t(31085),a=t(10394),d=t(58837),x=t(5893),m=t(14041),h=t(72664),u=function(P){return P.SIDEBAR_PIN_STATE="sidebarPinState",P}(u||{});const g={getSidebarPinState(){let P;try{P=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!P},setSidebarPinState(P){return window.localStorage.setItem("sidebarPinState",JSON.stringify(P))}};var p=t(34435);const y=(0,d.A)(P=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[P.breakpoints.up("sm")]:{paddingLeft:w=>w.isPinned?w.sidebarConfig.drawerWidthOpen:w.sidebarConfig.drawerWidthClosed},[P.breakpoints.down("xs")]:{paddingBottom:w=>w.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),v=(0,m.createContext)({content:{contentRef:void 0}});function A(P){const[w,O]=(0,m.useState)(()=>g.getSidebarPinState()),{sidebarConfig:j}=(0,m.useContext)(h.yY),F=(0,m.useRef)(null),L=(0,m.useMemo)(()=>({content:{contentRef:F}}),[F]);(0,m.useEffect)(()=>{g.setSidebarPinState(w)},[w]);const Z=(0,x.A)(Q=>Q.breakpoints.down("xs"),{noSsr:!0}),G=()=>O(!w),N=y({isPinned:w,sidebarConfig:j});return(0,n.jsx)(p.qj,{value:{isPinned:w,toggleSidebarPinState:G,isMobile:Z},children:(0,n.jsx)(v.Provider,{value:L,children:(0,n.jsx)(a.A,{className:N.root,children:P.children})})})}function T(){const{content:P}=(0,m.useContext)(v);return{focusContent:(0,m.useCallback)(()=>{P?.contentRef?.current?.focus()},[P]),contentRef:P?.contentRef}}},34435:(H,b,t)=>{"use strict";t.d(b,{Ut:()=>p,qj:()=>g});var n=t(31085),a=t(43836),d=t(10602),x=t(14041);const m={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},h=(0,x.createContext)(m),u=(0,a.tK)("sidebar-pin-state-context");function g(y){const{children:v,value:A}=y;return(0,n.jsx)(h.Provider,{value:A,children:(0,n.jsx)(u.Provider,{value:(0,d.B)({1:A}),children:v})})}const p=()=>{const y=(0,x.useContext)(u),v=(0,x.useContext)(h);if(y===void 0)return v||m;const A=y.atVersion(1);if(A===void 0)throw new Error("No context found for version 1.");return A}},72664:(H,b,t)=>{"use strict";t.d(b,{Rv:()=>h,U1:()=>v,hC:()=>m,i8:()=>g,yY:()=>y});var n=t(14041);const a=72,d=24,x=18,m={drawerWidthClosed:a,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:a,iconSize:a-d*2,iconPadding:d,selectedIndicatorWidth:3,userBadgePadding:x,userBadgeDiameter:a-x*2,mobileSidebarHeight:56},h=A=>({...m,...A,iconContainerWidth:m.drawerWidthClosed,iconSize:m.drawerWidthClosed-m.iconPadding*2,userBadgeDiameter:m.drawerWidthClosed-m.userBadgePadding*2}),u={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:m.defaultOpenDelayMs+200},g=A=>({...u,...A}),p="@backstage/core/sidebar-intro-dismissed",y=(0,n.createContext)({sidebarConfig:m,submenuConfig:u}),v=(0,n.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:(H,b,t)=>{"use strict";t.d(b,{O:()=>a});var n=t(93184);const a=(0,n.h)({id:"core-components",messages:{signIn:{title:"Sign In",loginFailed:"Login failed",customProvider:{title:"Custom User",subtitle:`Enter your own User ID and credentials.
|
|
2
2
|
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.
|
|
3
|
-
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"},supportButton:{title:"Support",close:"Close"},table:{filter:{title:"Filters",clearAll:"Clear all"}},alertDisplay:{message_one:"({{ count }} older message)",message_other:"({{ count }} older messages)"},autoLogout:{stillTherePrompt:{title:"Logging out due to inactivity",buttonText:"Yes! Don't log me out"}},proxiedSignInPage:{title:"You do not appear to be signed in. Please try reloading the browser page."}}})},25862:(H,b,t)=>{"use strict";t.d(b,{Ig:()=>u,pn:()=>h});var n=t(31085),a=t(43836),d=t(10602),x=t(14041);const m=(0,a.tK)("analytics-context"),h=()=>{const p=(0,x.useContext)(m);if(p===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const y=p.atVersion(1);if(y===void 0)throw new Error("No context found for version 1.");return y},u=p=>{const{attributes:y,children:v}=p,T={...h(),...y},P=(0,d.B)({1:T});return(0,n.jsx)(m.Provider,{value:P,children:v})};function g(p,y){const v=A=>_jsx(u,{attributes:y,children:_jsx(p,{...A})});return v.displayName=`WithAnalyticsContext(${p.displayName||p.name||"Component"})`,v}},67237:(H,b,t)=>{"use strict";t.d(b,{J:()=>x,t:()=>d});var n=t(63544);const a=(0,n.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),d="_ROUTABLE-EXTENSION-RENDERED";class x{analyticsApi;context;constructor(h,u={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=h,this.context=u,a.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{a.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender}),a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),a.beforeUnloadRegistered=!0)}setContext(h){this.context=h}captureEvent(h,u,{value:g,attributes:p}={}){const{_routeNodeType:y,...v}=this.context;if(h===d){a.mostRecentGatheredNavigation&&(a.mostRecentRoutableExtensionRender={context:{...v,extension:"App"}});return}if(a.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender})}catch(A){console.warn("Error during analytics event capture. %o",A)}a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0}if(h==="navigate"&&y==="gathered"&&v.pluginId==="root"){a.mostRecentGatheredNavigation={action:h,subject:u,value:g,attributes:p,context:v};return}try{this.analyticsApi.captureEvent({action:h,subject:u,value:g,attributes:p,context:v})}catch(A){console.warn("Error during analytics event capture. %o",A)}}}},93368:(H,b,t)=>{"use strict";t.d(b,{s:()=>u});var n=t(25862),a=t(72427),d=t(99303),x=t(14041),m=t(67237);function h(){try{return(0,a.gf)(d.c)}catch{return{captureEvent:()=>{}}}}function u(){const g=(0,x.useRef)(null),p=(0,n.pn)(),y=h();function v(){return g.current===null&&(g.current=new m.J(y)),g.current}const A=v();return A.setContext(p),A}},36017:(H,b,t)=>{"use strict";t.d(b,{k:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.alert"})},99303:(H,b,t)=>{"use strict";t.d(b,{c:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.analytics"})},65461:(H,b,t)=>{"use strict";t.d(b,{U:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.config"})},57405:(H,b,t)=>{"use strict";t.d(b,{I:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.discovery"})},39837:(H,b,t)=>{"use strict";t.d(b,{m:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.error"})},63636:(H,b,t)=>{"use strict";t.d(b,{B:()=>d,S:()=>a});var n=t(55309),a=function(x){return x[x.None=0]="None",x[x.Active=1]="Active",x}({});const d=(0,n.y)({id:"core.featureflags"})},70795:(H,b,t)=>{"use strict";t.d(b,{a:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.fetch"})},16009:(H,b,t)=>{"use strict";t.d(b,{K:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.identity"})},56038:(H,b,t)=>{"use strict";t.d(b,{J:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.translation"})},55309:(H,b,t)=>{"use strict";t.d(b,{y:()=>a});class n{config;constructor(x){if(this.config=x,!x.id.split(".").flatMap(h=>h.split("-")).every(h=>h.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${x.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 a(d){return new n(d)}},12935:(H,b,t)=>{"use strict";t.d(b,{b:()=>n});function n(a,d){return"id"in a?{api:a,deps:{},factory:()=>d}:a}},72427:(H,b,t)=>{"use strict";t.d(b,{Q2:()=>m,gf:()=>h});var n=t(31085),a=t(14041),d=t(43836),x=t(97142);function m(){const g=(0,d.qO)("api-context");if(!g)throw new x.EH("API context is not available");const p=g.atVersion(1);if(!p)throw new x.EH("ApiContext v1 not available");return p}function h(g){const y=m().get(g);if(!y)throw new x.EH(`No implementation available for ${g}`);return y}function u(g){return function(y){const v=T=>{const P=m(),w={};for(const O in g)if(g.hasOwnProperty(O)){const j=g[O],F=P.get(j);if(!F)throw new NotImplementedError(`No implementation available for ${j}`);w[O]=F}return _jsx(y,{...T,...w})},A=y.displayName||y.name||"Component";return v.displayName=`withApis(${A})`,v}}},82266:(H,b,t)=>{"use strict";t.d(b,{n:()=>a});var n=t(43836);const a=()=>{const d=(0,n.qO)("app-context");if(!d)throw new Error("App context is not available");const x=d.atVersion(1);if(!x)throw new Error("AppContext v1 not available");return x}},19402:(H,b,t)=>{"use strict";t.d(b,{E:()=>m,h:()=>x});var n=t(63544);const a=(0,n.Q)("component-data-store",()=>new WeakMap),d="__backstage_data";function x(h,u,g){const p=h;let y=p[d]??a.get(h);if(y||(y={map:new Map},Object.defineProperty(p,d,{enumerable:!1,configurable:!0,writable:!1,value:y}),a.set(h,y)),y.map.has(u)){const v=h.displayName||h.name;throw new Error(`Attempted to attach duplicate data "${u}" to component "${v}"`)}y.map.set(u,g)}function m(h,u){if(!h)return;const g=h.type;if(!g)return;const p=g[d]??a.get(g);if(p)return p.map.get(u)}},88758:(H,b,t)=>{"use strict";t.d(b,{NC:()=>v,zZ:()=>A,QJ:()=>y});var n=t(31085),a=t(14041),d=t(93368),x=t(25862),m=t(82266),h=t(9222),u=t(19402);class g extends a.Component{static getDerivedStateFromError(P){return{error:P}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:P}=this.state,{app:w,plugin:O}=this.props,{ErrorBoundaryFallback:j}=w.getComponents();return P?(0,n.jsx)(j,{error:P,resetError:this.handleErrorReset,plugin:O}):this.props.children}}var p=t(67237);function y(T){const{component:P,mountPoint:w,name:O}=T;return A({component:{lazy:()=>P().then(j=>{const F=Z=>{const G=(0,d.s)();try{(0,h.S)(w)}catch(N){if(typeof N=="object"&&N!==null){const{message:Q}=N;if(typeof Q=="string"&&Q.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 N}return(0,a.useEffect)(()=>{G.captureEvent(p.t,"")},[G]),(0,n.jsx)(j,{...Z})},L=O||j.displayName||j.name||"LazyComponent";return F.displayName=`RoutableExtension(${L})`,F},j=>L=>{const Z=(0,m.n)(),{BootErrorPage:G}=Z.getComponents();return(0,n.jsx)(G,{step:"load-chunk",error:j})})},data:{"core.mountPoint":w},name:O})}function v(T){const{component:P,name:w}=T;return A({component:P,name:w})}function A(T){const{data:P={},name:w}=T;w||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let O;if("lazy"in T.component){const F=T.component.lazy;O=(0,a.lazy)(()=>F().then(L=>({default:L})))}else O=T.component.sync;const j=w||O.displayName||O.name||"Component";return{expose(F){const L=Z=>{const G=(0,m.n)(),{Progress:N}=G.getComponents(),Q=P?.["core.mountPoint"];return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(N,{}),children:(0,n.jsx)(g,{app:G,plugin:F,children:(0,n.jsx)(x.Ig,{attributes:{pluginId:F.getId(),...w&&{extension:w},...Q&&{routeRef:Q.id}},children:(0,n.jsx)(O,{...Z})})})})};(0,u.h)(L,"core.plugin",F),(0,u.h)(L,"core.extensionName",w);for(const[Z,G]of Object.entries(P))(0,u.h)(L,Z,G);return L.displayName=`Extension(${j})`,L}}}},82442:(H,b,t)=>{"use strict";t.d(b,{O:()=>u});var n=t(14041),a=t(19402),d=t(72427),x=t(63636);function m(g,p,y,v){return n.Children.toArray(g).flatMap(A=>{if(!(0,n.isValidElement)(A))return[];if(A.type===n.Fragment)return m(A.props.children,p,y,v);if((0,a.E)(A,"core.featureFlagged")){const T=A.props;return("with"in T?p.isActive(T.with):!p.isActive(T.without))?m(A.props.children,p,y,v):[]}if(y===void 0||y(A))return[A];if(v)throw new Error(v);return m(A.props.children,p,y,v)})}class h{node;featureFlagsApi;constructor(p,y){this.node=p,this.featureFlagsApi=y}selectByComponentData(p){const y=m(this.node,this.featureFlagsApi,v=>(0,a.E)(v,p.key)!==void 0,p.withStrictError);return new h(y,this.featureFlagsApi)}findComponentData(p){return m(this.node,this.featureFlagsApi,v=>(0,a.E)(v,p.key)!==void 0).map(v=>(0,a.E)(v,p.key)).filter(v=>v!==void 0)}getElements(){return m(this.node,this.featureFlagsApi)}}function u(g,p,y=[]){const v=(0,d.gf)(x.B),A=new h(g,v);return(0,n.useMemo)(()=>p(A),[g,...y])}},9803:(H,b,t)=>{"use strict";t.d(b,{i:()=>a});class n{config;constructor(x){this.config=x}getId(){return this.config.id}getApis(){return this.config.apis??[]}getFeatureFlags(){return this.config.featureFlags?.slice()??[]}get routes(){return this.config.routes??{}}get externalRoutes(){return this.config.externalRoutes??{}}provide(x){return x.expose(this)}toString(){return`plugin{${this.config.id}}`}}function a(d){return new n(d)}},34569:(H,b,t)=>{"use strict";t.d(b,{H:()=>d});var n=t(59598);class a{id;params;[x=n.b];constructor(h,u){this.id=h,this.params=u,this[x]="absolute"}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function d(m){return new a(m.id,m.params??[])}var x},59598:(H,b,t)=>{"use strict";t.d(b,{b:()=>a});var n=t(63544);const a=(0,n.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:(H,b,t)=>{"use strict";t.d(b,{S:()=>x});var n=t(14041),a=t(18690),d=t(43836);function x(m){const{pathname:h}=(0,a.zy)(),u=(0,d.qO)("routing-context");if(!u)throw new Error("Routing context is not available");const g=u.atVersion(1),p=(0,n.useMemo)(()=>g&&g.resolve(m,{pathname:h}),[g,m,h]);if(!u)throw new Error("useRouteRef used outside of routing context");if(!g)throw new Error("RoutingContext v1 not available");const y="optional"in m&&m.optional;if(!p&&!y)throw new Error(`No path for ${m}`);return p}},93184:(H,b,t)=>{"use strict";t.d(b,{h:()=>x,v:()=>m});var n=t(99833);function a(h){const u=new Array;function g(p,y){for(const[v,A]of Object.entries(p))typeof A=="string"?u.push([y+v,A]):g(A,`${y}${v}.`)}return g(h,""),Object.fromEntries(u)}class d{#t;#n;#e;constructor(u){this.#t=u.id,this.#n=a(u.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#t}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#n}setDefaultResource(u){this.#e=u}getDefaultResource(){return this.#e}toString(){return`TranslationRef{id=${this.id}}`}}function x(h){const u=new d(h);return h.translations&&u.setDefaultResource((0,n.o)({ref:u,translations:h.translations})),u}function m(h){const u=h;if(u.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${u.$$type}'`);if(u.version!=="v1")throw new Error(`Invalid translation ref, bad version '${u.version}'`);return u}},99833:(H,b,t)=>{"use strict";t.d(b,{Y:()=>n,o:()=>a});function n(d){const x=d;if(x.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${x.$$type}'`);if(x.version!=="v1")throw new Error(`Invalid translation resource, bad version '${x.version}'`);return x}function a(d){return{$$type:"@backstage/TranslationResource",version:"v1",id:d.ref.id,resources:Object.entries(d.translations).map(([x,m])=>({language:x,loader:()=>m().then(h=>{const u=h.default;return{messages:u?.$$type==="@backstage/TranslationMessages"?u.messages:u}})}))}}},87849:(H,b,t)=>{"use strict";t.d(b,{i:()=>h});var n=t(14041),a=t(72427),d=t(39837),x=t(56038);const m=new WeakSet,h=u=>{const g=(0,a.gf)(d.m),p=(0,a.gf)(x.J),[y,v]=(0,n.useState)(()=>p.getTranslation(u)),A=(0,n.useMemo)(()=>p.translation$(u),[p,u]),T=(0,n.useCallback)(w=>{if(!m.has(u)){const O=`Failed to load translation resource '${u.id}'; caused by ${w}`;console.error(O),g.post(new Error(O)),m.add(u)}},[g,u]);(0,n.useEffect)(()=>{const w=A.subscribe({next(O){O.ready&&v(O)},error(O){T(O)}});return()=>{w.unsubscribe()}},[A,T]);const P=(0,n.useRef)(!0);if((0,n.useEffect)(()=>{P.current?P.current=!1:v(p.getTranslation(u))},[p,u]),!y.ready)throw new Promise(w=>{const O=A.subscribe({next(j){j.ready&&(O.unsubscribe(),w())},error(j){O.unsubscribe(),T(j),w()}})});return{t:y.t}}},70835:(H,b,t)=>{"use strict";t.d(b,{o:()=>d});var n=t(59750);async function a(x){try{const m=await x.text();if(m){if(x.headers.get("content-type")?.startsWith("application/json"))try{const h=JSON.parse(m);if(h.error&&h.response)return h}catch{}return{error:{name:"Error",message:`Request failed with status ${x.status} ${x.statusText}, ${m}`},response:{statusCode:x.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${x.status} ${x.statusText}`},response:{statusCode:x.status}}}class d extends Error{response;body;cause;statusCode;statusText;static async fromResponse(m){const h=await a(m),u=h.response.statusCode||m.status,g=m.statusText,p=`Request failed with ${u} ${g}`,y=(0,n.cy)(h.error);return new d({message:p,response:m,data:h,cause:y,statusCode:u,statusText:g})}constructor(m){super(m.message),this.name="ResponseError",this.response=m.response,this.body=m.data,this.cause=m.cause,this.statusCode=m.statusCode,this.statusText=m.statusText}}},93007:(H,b,t)=>{"use strict";t.d(b,{b:()=>n});function n(d){if(typeof d!="object"||d===null||Array.isArray(d))return!1;const x=d;return!(typeof x.name!="string"||x.name===""||typeof x.message!="string")}function a(d){if(typeof d!="object"||d===null||Array.isArray(d))throw new Error(`Encountered invalid error, not an object, got '${d}'`);const x=d;if(typeof x.name!="string"||x.name==="")throw new Error(`Encountered error object without a name, got '${d}'`);if(typeof x.message!="string")throw new Error(`Encountered error object without a message, got '${d}'`)}},97142:(H,b,t)=>{"use strict";t.d(b,{m_:()=>u,EH:()=>y});var n=t(93007),a=t(59750);class d extends Error{cause;constructor(P,w){let O=P;if(w!==void 0){const j=(0,a.M5)(w);O?O+=`; caused by ${j}`:O=`caused by ${j}`}super(O),Error.captureStackTrace?.(this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,n.b)(w)?w:void 0}}class x extends null{name="InputError"}class m extends null{name="AuthenticationError"}class h extends null{name="NotAllowedError"}class u extends d{name="NotFoundError"}class g extends null{name="ConflictError"}class p extends null{name="NotModifiedError"}class y extends d{name="NotImplementedError"}class v extends null{}class A extends d{constructor(P,w){super(P,w),this.name=(0,n.b)(w)?w.name:"Error"}}},59750:(H,b,t)=>{"use strict";t.d(b,{M5:()=>h,cy:()=>m});var n=t(69655),a=t.n(n),d=t(93007);function x(u,g){const y={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(u)};return g?.includeStack||delete y.stack,y}function m(u){const g=(0,n.deserializeError)(u);return u.stack||(g.stack=void 0),g}function h(u){if((0,d.b)(u)){const g=String(u);return g!=="[object Object]"?g:`${u.name}: ${u.message}`}return`unknown error '${u}'`}},3347:(H,b,t)=>{"use strict";t.d(b,{L:()=>Ae,Y:()=>He});var n=t(59869);const a="amazonaws.com";function d(M){const l=M.getOptionalString("endpoint"),E=M.getOptionalBoolean("s3ForcePathStyle")??!1;let D,tt;if(l){try{const Jt=new URL(l);D=Jt.host,tt=Jt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${l}' is not a valid URL`)}if(tt!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${l}'`)}else D=a;const lt=M.getOptionalString("accessKeyId"),yt=M.getOptionalString("secretAccessKey")?.trim(),Wt=M.getOptionalString("roleArn"),Kt=M.getOptionalString("externalId");return{host:D,endpoint:l,s3ForcePathStyle:E,accessKeyId:lt,secretAccessKey:yt,roleArn:Wt,externalId:Kt}}function x(M){const l=M.map(d);return l.some(E=>E.host===a)||l.push({host:a}),l}class m{integrationConfig;static factory=({config:l})=>{const E=x(l.getOptionalConfigArray("integrations.awsS3")??[]);return(0,n.oS)(E.map(D=>new m(D)),D=>D.config.host)};get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return l}}const h="console.aws.amazon.com";function u(M){const l=M.getOptionalString("accessKeyId"),E=M.getOptionalString("secretAccessKey")?.trim(),D=M.getOptionalString("roleArn"),tt=M.getOptionalString("externalId"),lt=M.getString("region");return{host:M.getOptionalString("host")||`${lt}.${h}`,accessKeyId:l,secretAccessKey:E,roleArn:D,externalId:tt,region:lt}}function g(M){return M.map(u)}class p{integrationConfig;static factory=({config:l})=>{const E=g(l.getOptionalConfigArray("integrations.awsCodeCommit")??[]);return(0,n.oS)(E.map(D=>new p(D)),D=>D.config.host)};get type(){return"awsCodeCommit"}get config(){return this.integrationConfig}get title(){return this.integrationConfig.host}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){const D=new URL(l).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!D)throw new Error("");const[,tt]=D;return y(l,tt,"edit")}}function y(M,l,E){const D=E==="edit"?"files/edit":E;return M.replace(new RegExp(`/codesuite/codecommit/repositories/${l}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${l}/${D}/`)}const v="GB";class A{static fromRepoUrl(l){const E=new URL(l);let D,tt,lt;const yt=E.pathname.split("/").map(Mt=>decodeURIComponent(Mt));if(yt[2]==="_git"?(D=yt[1],tt=lt=yt[3]):yt[3]==="_git"?(D=yt[1],tt=yt[2],lt=yt[4]):yt[4]==="_git"&&(D=`${yt[1]}/${yt[2]}`,tt=yt[3],lt=yt[5]),!D||!tt||!lt)throw new Error("Azure URL must point to a git repository");const Wt=E.searchParams.get("path")??void 0;let Kt;const Jt=E.searchParams.get("version");if(Jt){if(Jt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Kt=Jt.slice(2)}return new A(E.origin,D,tt,lt,Wt,Kt)}#t;#n;#e;#s;#r;#o;constructor(l,E,D,tt,lt,yt){this.#t=l,this.#n=E,this.#e=D,this.#s=tt,this.#r=lt,this.#o=yt}#a=(...l)=>{const E=new URL(this.#t);return E.pathname=l.map(D=>encodeURIComponent(D)).join("/"),E};toRepoUrl(){let l;return this.#e===this.#s?l=this.#a(this.#n,"_git",this.#s):l=this.#a(this.#n,this.#e,"_git",this.#s),this.#r&&l.searchParams.set("path",this.#r),this.#o&&l.searchParams.set("version",v+this.#o),l.toString()}toFileUrl(){if(!this.#r)throw new Error("Azure URL must point to a specific path to be able to download a file");const l=this.#a(this.#n,this.#e,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("api-version","6.0"),l.searchParams.set("path",this.#r),this.#o&&l.searchParams.set("version",this.#o),l.toString()}toArchiveUrl(){const l=this.#a(this.#n,this.#e,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("recursionLevel","full"),l.searchParams.set("download","true"),l.searchParams.set("api-version","6.0"),this.#r&&l.searchParams.set("scopePath",this.#r),this.#o&&l.searchParams.set("version",this.#o),l.toString()}toCommitsUrl(){const l=this.#a(this.#n,this.#e,"_apis","git","repositories",this.#s,"commits");return l.searchParams.set("api-version","6.0"),this.#o&&l.searchParams.set("searchCriteria.itemVersion.version",this.#o),l.toString()}getOwner(){return this.#n}getProject(){return this.#e}getRepo(){return this.#s}getPath(){return this.#r}getRef(){return this.#o}}const T="dev.azure.com",P=["clientId","clientSecret","tenantId","personalAccessToken"],w=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function O(M){for(const l of w.entries()){const[E,D]=l,tt=P.filter(lt=>!D.includes(lt));if(D.every(lt=>M[lt]!==void 0)&&tt.every(lt=>M[lt]===void 0))return{kind:E,organizations:M.organizations,...D.reduce((lt,yt)=>(lt[yt]=M[yt],lt),{})}}throw new Error("is not a valid credential")}function j(M){const l=M.getOptionalString("host")??T;let E=M.getOptionalConfigArray("credentials")?.map(lt=>({organizations:lt.getOptionalStringArray("organizations"),personalAccessToken:lt.getOptionalString("personalAccessToken")?.trim(),tenantId:lt.getOptionalString("tenantId"),clientId:lt.getOptionalString("clientId"),clientSecret:lt.getOptionalString("clientSecret")?.trim()}));const D=M.getOptionalString("token")?.trim();if(M.getOptional("credential")!==void 0&&M.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(M.getOptional("token")!==void 0&&M.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(D!==void 0){const lt=[{personalAccessToken:D}];E=E?.concat(lt)??lt}if(M.getOptional("credential")!==void 0){const lt=[{organizations:M.getOptionalStringArray("credential.organizations"),token:M.getOptionalString("credential.token")?.trim(),tenantId:M.getOptionalString("credential.tenantId"),clientId:M.getOptionalString("credential.clientId"),clientSecret:M.getOptionalString("credential.clientSecret")?.trim()}];E=E?.concat(lt)??lt}if(!(0,n.HO)(l))throw new Error(`Invalid Azure integration config, '${l}' is not a valid host`);let tt;if(E!==void 0){const lt=E?.reduce((yt,Wt,Kt)=>{let Jt;try{O(Wt)}catch(Mt){Jt=Mt.message}return Jt!==void 0&&yt.push(`credential at position ${Kt+1} ${Jt}`),yt},Array.of()).concat(Object.entries(E.filter(yt=>yt.organizations!==void 0&&yt.organizations.length>0).reduce((yt,Wt,Kt)=>(Wt.organizations?.forEach(Jt=>{yt[Jt]||(yt[Jt]=[]),yt[Jt].push(Kt+1)}),yt),{})).filter(([yt,Wt])=>Wt.length>1).reduce((yt,[Wt,Kt])=>(yt.push(`organization ${Wt} is specified multiple times in credentials at positions ${Kt.slice(0,Kt.length-1).join(", ")} and ${Kt[Kt.length-1]}`),yt),Array.of()));if(lt?.length>0)throw new Error(`Invalid Azure integration config for ${l}: ${lt.join("; ")}`);if(tt=E.map(yt=>O(yt)),tt.some(yt=>yt.kind!=="PersonalAccessToken")&&l!==T)throw new Error(`Invalid Azure integration config for ${l}, only personal access tokens can be used with hosts other than ${T}`);if(tt.filter(yt=>yt.organizations===void 0||yt.organizations.length===0).length>1)throw new Error(`Invalid Azure integration config for ${l}, you cannot specify multiple credentials without organizations`)}return{host:l,credentials:tt}}function F(M){const l=M.map(j);return l.some(E=>E.host===T)||l.push({host:T}),l}class L{integrationConfig;static factory=({config:l})=>{const E=F(l.getOptionalConfigArray("integrations.azure")??[]);return(0,n.oS)(E.map(D=>new L(D)),D=>D.config.host)};constructor(l){this.integrationConfig=l}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const{url:E,base:D}=l;if((0,n.AY)(E))return E;try{const tt=A.fromRepoUrl(D),lt=new URL(D),yt=new URL(`https://a.com${tt.getPath()??""}`),Wt=new URL(E,yt).pathname;return lt.searchParams.set("path",Wt),l.lineNumber&&(lt.searchParams.set("line",String(l.lineNumber)),lt.searchParams.set("lineEnd",String(l.lineNumber+1)),lt.searchParams.set("lineStartColumn","1"),lt.searchParams.set("lineEndColumn","1")),lt.toString()}catch{return new URL(E,D).toString()}}resolveEditUrl(l){return l}}var Z=t(52536),G=t.n(Z);const N="bitbucket.org",Q="https://api.bitbucket.org/2.0";function q(M){const l=N,E=Q,D=M.getString("username"),tt=M.getString("appPassword")?.trim();return{host:l,apiBaseUrl:E,username:D,appPassword:tt}}function K(M){const l=M.map(q);return l.length===0&&l.push({host:N,apiBaseUrl:Q}),l}class et{integrationConfig;static factory=({config:l})=>{const E=K(l.getOptionalConfigArray("integrations.bitbucketCloud")??[]);return(0,n.oS)(E.map(D=>new et(D)),D=>D.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,n.ku)(l);if(l.lineNumber){const D=new URL(E);return D.hash=`lines-${l.lineNumber}`,D.toString()}return E}resolveEditUrl(l){const E=G()(l),D=new URL(l);return D.searchParams.set("mode","edit"),D.searchParams.set("at",E.ref),D.toString()}}var J=t(45250);const Y="bitbucket.org",V="https://api.bitbucket.org/2.0";function at(M){const l=M.getOptionalString("host")??Y;let E=M.getOptionalString("apiBaseUrl");const D=M.getOptionalString("token")?.trim(),tt=M.getOptionalString("username"),lt=M.getOptionalString("appPassword")?.trim();if(!(0,n.HO)(l))throw new Error(`Invalid Bitbucket integration config, '${l}' is not a valid host`);return E?E=(0,J.trimEnd)(E,"/"):l===Y?E=V:E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:D,username:tt,appPassword:lt}}function nt(M){const l=M.map(at);return l.some(E=>E.host===Y)||l.push({host:Y,apiBaseUrl:V}),l}class gt{integrationConfig;static factory=({config:l})=>{const E=nt(l.getOptionalConfigArray("integrations.bitbucket")??[...l.getOptionalConfigArray("integrations.bitbucketCloud")??[],...l.getOptionalConfigArray("integrations.bitbucketServer")??[]]);return(0,n.oS)(E.map(D=>new gt(D)),D=>D.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,n.ku)(l);if(!l.lineNumber)return E;const D=new URL(E);return this.integrationConfig.host==="bitbucket.org"?D.hash=`lines-${l.lineNumber}`:D.hash=`${l.lineNumber}`,D.toString()}resolveEditUrl(l){const E=G()(l),D=new URL(l);return D.searchParams.set("mode","edit"),D.searchParams.set("spa","0"),D.searchParams.set("at",E.ref),D.toString()}}function bt(M){const l=M.getString("host");let E=M.getOptionalString("apiBaseUrl");const D=M.getOptionalString("token")?.trim(),tt=M.getOptionalString("username"),lt=M.getOptionalString("password");if(!(0,n.HO)(l))throw new Error(`Invalid Bitbucket Server integration config, '${l}' is not a valid host`);return E?E=(0,J.trimEnd)(E,"/"):E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:D,username:tt,password:lt}}function xt(M){return M.map(bt)}class ht{integrationConfig;static factory=({config:l})=>{const E=xt(l.getOptionalConfigArray("integrations.bitbucketServer")??[]);return(0,n.oS)(E.map(D=>new ht(D)),D=>D.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,n.ku)(l);if(l.lineNumber){const D=new URL(E);return D.hash=l.lineNumber.toString(),D.toString()}return E}resolveEditUrl(l){return l.includes("?")?l.substring(0,l.indexOf("?")):l}}function ut(M){const l=M.getString("host");let E=M.getOptionalString("baseUrl"),D=M.getOptionalString("cloneUrl"),tt=M.getString("gitilesBaseUrl");const lt=M.getOptionalString("username"),yt=M.getOptionalString("password")?.trim();if((0,n.HO)(l)){if(E&&!(0,n.AY)(E))throw new Error(`Invalid Gerrit integration config, '${E}' is not a valid baseUrl`);if(D&&!(0,n.AY)(D))throw new Error(`Invalid Gerrit integration config, '${D}' is not a valid cloneUrl`);if(!(0,n.AY)(tt))throw new Error(`Invalid Gerrit integration config, '${tt}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${l}' is not a valid host`);return E?E=(0,J.trimEnd)(E,"/"):E=`https://${l}`,tt?tt=(0,J.trimEnd)(tt,"/"):tt=`https://${l}`,D?D=(0,J.trimEnd)(D,"/"):D=E,{host:l,baseUrl:E,cloneUrl:D,gitilesBaseUrl:tt,username:lt,password:yt}}function Et(M){return M.map(ut)}var mt=t(1048).hp;const Pt=")]}'";function Ot(M,l){const E=new URL(M.gitilesBaseUrl),D=new URL(l),lt=D.pathname.substring(D.pathname.startsWith("/a/")?2:0).replace(E.pathname,"").split("/").filter(Xt=>!!Xt),yt=lt.indexOf("+");if(yt<=0)throw new Error(`Unable to parse project from url: ${l}`);const Wt=trimStart(lt.slice(0,yt).join("/"),"/"),Kt=lt.indexOf("heads");if(Kt<=0)throw new Error(`Unable to parse branch from url: ${l}`);const Jt=lt[Kt+1],Mt=lt.slice(Kt+2).join("/");return{branch:Jt,filePath:Mt===""?"/":Mt,project:Wt}}function jt(M,l){const E=new URL(M.gitilesBaseUrl),D=new URL(l),lt=(0,J.trimStart)(D.pathname.substring(D.pathname.startsWith("/a/")?2:0).replace(E.pathname,""),"/").split("/").filter(kt=>!!kt),yt=(0,J.takeWhile)(lt,kt=>kt!=="+");if(yt.length===0)throw new Error(`Unable to parse gitiles url: ${l}`);const Wt=lt.slice(yt.length+1),Kt=(0,J.join)(yt,"/");if(Wt.length>0&&Wt[0]==="HEAD"){const kt=Wt.shift(),me=(0,J.join)(Wt,"/");return{project:Kt,ref:kt,refType:"head",path:me||"/",basePath:(0,J.trimEnd)(l.replace(me,""),"/")}}if(Wt.length>0&&Wt[0].length===40){const kt=Wt.shift(),me=(0,J.join)(Wt,"/");return{project:Kt,ref:kt,refType:"sha",path:me||"/",basePath:(0,J.trimEnd)(l.replace(me,""),"/")}}const Jt=(0,J.join)(Wt,"/"),Xt=/^refs\/(?<refsReference>heads|tags)\/(?<ref>.*?)(\/|$)/.exec(Jt);if(Xt){const kt=Xt[0];let me;const{refsReference:$e,ref:Pe}=Xt.groups||{},Ve=Jt.replace(kt,"");switch($e){case"heads":me="branch";break;case"tags":me="tag";break;default:throw new Error(`Unable to parse gitiles url: ${l}`)}return{project:Kt,ref:Pe,refType:me,path:Ve||"/",basePath:(0,J.trimEnd)(l.replace(Ve,""),"/")}}throw new Error(`Unable to parse gitiles : ${l}`)}function Nt(M,l,E,D){return`${M.gitilesBaseUrl}/${l}/+/refs/heads/${E}/${trimStart(D,"/")}`}function Bt(M,l,E,D){const tt=D==="/"||D===""?".tar.gz":`/${D}.tar.gz`;return`${Lt(M)}/${l}/+archive/refs/heads/${E}${tt}`}function pt(M){return M.password?"/a/":"/"}function Lt(M){if(!M.baseUrl||!M.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(M.gitilesBaseUrl.startsWith(M.baseUrl))return M.gitilesBaseUrl.replace(M.baseUrl.concat("/"),M.baseUrl.concat(pt(M)));if(M.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return M.gitilesBaseUrl}function ft(M,l){const{branch:E,project:D}=Ot(M,l);return`${M.baseUrl}${pt(M)}projects/${encodeURIComponent(D)}/branches/${E}`}function B(M,l){const{project:E}=Ot(M,l);return`${M.cloneUrl}${pt(M)}${E}`}function k(M,l){const{branch:E,filePath:D,project:tt}=Ot(M,l);return`${M.baseUrl}${pt(M)}projects/${encodeURIComponent(tt)}/branches/${E}/files/${encodeURIComponent(D)}/content`}function ot(M){return`${M.baseUrl}${pt(M)}projects/`}function Ct(M){const l={};if(!M.password)return l;const E=mt.from(`${M.username}:${M.password}`,"utf8");return l.Authorization=`Basic ${E.toString("base64")}`,{headers:l}}async function it(M){const l=await M.text();if(l.startsWith(Pt))try{return JSON.parse(l.slice(Pt.length))}catch(E){throw new Error(`Invalid response from Gerrit: ${l.slice(0,10)} - ${E}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${l.slice(0,10)}`)}class vt{integrationConfig;static factory=({config:l})=>{const E=Et(l.getOptionalConfigArray("integrations.gerrit")??[]);return(0,n.oS)(E.map(D=>new vt(D)),D=>D.config.host)};constructor(l){this.integrationConfig=l}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const{url:E,base:D,lineNumber:tt}=l;let lt;if(E.startsWith("/")){const{basePath:yt}=jt(this.config,D);return yt+E}return E?lt=new URL(E,D):lt=new URL(D),tt&&(lt.hash=tt.toString()),lt.toString()}resolveEditUrl(l){return l}}var Tt=t(36021);const wt="gitlab.com",It="https://gitlab.com/api/v4";function Ut(M){const l=M.getString("host");let E=M.getOptionalString("apiBaseUrl");const D=M.getOptionalString("token")?.trim();let tt=M.getOptionalString("baseUrl");if(E?E=(0,J.trimEnd)(E,"/"):l===wt&&(E=It),tt?tt=(0,J.trimEnd)(tt,"/"):tt=`https://${l}`,(0,n.HO)(l)){if(!E||!(0,n.AY)(E))throw new Error(`Invalid GitLab integration config, '${E}' is not a valid apiBaseUrl`);if(!(0,n.AY)(tt))throw new Error(`Invalid GitLab integration config, '${tt}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${l}' is not a valid host`);return{host:l,token:D,apiBaseUrl:E,baseUrl:tt}}function Qt(M){const l=M.map(Ut);return l.some(E=>E.host===wt)||l.push({host:wt,apiBaseUrl:It,baseUrl:`https://${wt}`}),l}function fe(M){let l="";return M.host!==wt&&(l=new URL(M.baseUrl).pathname),trimEnd(l,"/")}class le{integrationConfig;static factory=({config:l})=>{const E=Qt(l.getOptionalConfigArray("integrations.gitlab")??[]);return(0,n.oS)(E.map(D=>new le(D)),D=>D.config.host)};constructor(l){this.integrationConfig=l}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return te(l,"edit")}}function te(M,l){return M.replace(/\/\-\/(blob|tree|edit)\//,`/-/${l}/`)}function se(M){const l=M.getString("host");let E=M.getOptionalString("baseUrl");const D=M.getOptionalString("username"),tt=M.getOptionalString("password")?.trim();if((0,n.HO)(l)){if(E&&!(0,n.AY)(E))throw new Error(`Invalid Gitea integration config, '${E}' is not a valid baseUrl`)}else throw new Error(`Invalid Gitea integration config, '${l}' is not a valid host`);return E?E=(0,J.trimEnd)(E,"/"):E=`https://${l}`,{host:l,baseUrl:E,username:D,password:tt}}var Te=t(1048).hp;function ze(M,l){const E=ce(M,l);return`${E.url}/${E.owner}/${E.name}/_edit/${E.ref}/${E.path}`}function zt(M,l){const E=ce(M,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/contents/${E.path}?ref=${E.ref}`}function ee(M,l){const E=ce(M,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/archive/${E.ref}.tar.gz`}function Zt(M,l){const E=ce(M,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/git/commits/${E.ref}`}function We(M){const l={},{username:E,password:D}=M;return D?(E?l.Authorization=`basic ${Te.from(`${E}:${D}`).toString("base64")}`:l.Authorization=`token ${D}`,{headers:l}):l}function ce(M,l){const E=M.baseUrl??`https://${M.host}`;try{const[D,tt,lt,yt,Wt,Kt,...Jt]=l.replace(E,"").split("/"),Mt=Jt.join("/").replace(/^\//,"");return{url:E,owner:tt,name:lt,ref:Kt,path:Mt}}catch(D){throw new Error(`Incorrect URL: ${l}, ${D}`)}}class je{config;static factory=({config:l})=>{const D=(l.getOptionalConfigArray("integrations.gitea")??[]).map(tt=>se(tt));return(0,n.oS)(D.map(tt=>new je(tt)),tt=>tt.config.host)};constructor(l){this.config=l}get type(){return"gitea"}get title(){return this.config.host}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return ze(this.config,l)}}function Ze(M){const l=M.getString("host"),E=M.getOptionalString("token"),D=M.getOptionalString("apiKey");if(!(0,n.HO)(l))throw new Error(`Invalid Harness Code integration config, '${l}' is not a valid host`);return{host:l,apiKey:D,token:E}}function pe(M,l){const E=Be(M,l);return`${E.baseUrl}/ng/account/${E.accountId}/module/code${E.orgName!==""?`/orgs/${E.orgName}`:""}${E.projectName!==""?`/projects/${E.projectName}`:""}/repos/${E.repoName}/files/${E.branch}/~/${E.path}`}function Je(M,l){const E=Be(M,l);let D=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(D+=`/${E.orgName}`),E.projectName&&(D+=`/${E.projectName}`),D+=`/${E.repoName}/+/raw/${E.path}?routingId=${E.accountId}&git_ref=refs/heads/${E.refString}`,D}function ln(M,l){const E=Be(M,l);let D=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(D+=`/${E.orgName}`),E.projectName&&(D+=`/${E.projectName}`),D+=`/${E.repoName}/+/archive/${E.branch}.zip?routingId=${E.accountId}`,D}function en(M,l){const E=Be(M,l);let D=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(D+=`/${E.orgName}`),E.projectName&&(D+=`/${E.projectName}`),D+=`/${E.repoName}/+/content?routingId=${E.accountId}&include_commit=true&git_ref=refs/heads/${E.branch}`,D}function nn(M){const l={},{token:E,apiKey:D}=M;return D?l["x-api-key"]=D:E&&(l.Authorization=`Bearer ${E}`),{headers:l}}function Be(M,l){const E=`https://${M.host}`;try{const D=new URL(l),tt=D.pathname.split("/").filter(ae=>ae!==""),lt=D.pathname.split("/"),yt=tt.findIndex(ae=>ae==="account")+1,Wt=tt[yt],Kt=tt.findIndex(ae=>ae==="orgs"),Jt=Kt!==-1?tt[Kt+1]:"",Mt=tt.findIndex(ae=>ae==="projects"),Xt=Mt!==-1?tt[Mt+1]:"",kt=tt.findIndex((ae,xe)=>ae==="repos"&&xe>Math.max(yt,Kt,Mt))+1,me=tt[kt],$e=lt.slice(lt.findIndex(ae=>ae==="files"||ae==="edit")+1),Pe=$e.findIndex(ae=>ae==="~"),Ve=$e.slice(0,Pe).join("/"),de=Pe!==-1?$e.slice(Pe+1).join("/").replace(/^\//,""):"";return{baseUrl:E,accountId:Wt,orgName:Jt,projectName:Xt,refString:Ve,path:de,repoName:me,refDashStr:$e.slice(0,Pe).join("-"),branch:Pe!==-1?$e.slice(0,Pe).join("/"):$e.join("/")}}catch(D){throw new Error(`Incorrect URL: ${l}, ${D}`)}}class Ue{config;static factory=({config:l})=>{const D=(l.getOptionalConfigArray("integrations.harness")??[]).map(tt=>Ze(tt));return(0,n.oS)(D.map(tt=>new Ue(tt)),tt=>tt.config.host)};constructor(l){this.config=l}get type(){return"harness"}get title(){return this.config.host}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return pe(this.config,l)}}class Ke{byType;static fromConfig(l){return new Ke({awsS3:m.factory({config:l}),awsCodeCommit:p.factory({config:l}),azure:L.factory({config:l}),bitbucket:gt.factory({config:l}),bitbucketCloud:et.factory({config:l}),bitbucketServer:ht.factory({config:l}),gerrit:vt.factory({config:l}),github:Tt.U.factory({config:l}),gitlab:le.factory({config:l}),gitea:je.factory({config:l}),harness:Ue.factory({config:l})})}constructor(l){this.byType=l}get awsS3(){return this.byType.awsS3}get awsCodeCommit(){return this.byType.awsCodeCommit}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}get gitea(){return this.byType.gitea}get harness(){return this.byType.harness}list(){return Object.values(this.byType).flatMap(l=>l.list())}byUrl(l){let E=Object.values(this.byType).map(D=>D.byUrl(l)).filter(Boolean);if(E.length>1){const D=E.filter(tt=>!(tt instanceof gt));D.length!==0&&(E=D)}return E[0]}byHost(l){return Object.values(this.byType).map(E=>E.byHost(l)).find(Boolean)}resolveUrl(l){const E=this.byUrl(l.base);return E?E.resolveUrl(l):(0,n.ku)(l)}resolveEditUrl(l){const E=this.byUrl(l);return E?E.resolveEditUrl(l):l}}var sn=t(55309);class Ae{static fromConfig(l){return Ke.fromConfig(l)}}const He=(0,sn.y)({id:"integration.scmintegrations"})},36021:(H,b,t)=>{"use strict";t.d(b,{U:()=>g,F:()=>p});var n=t(59869),a=t(45250);const d="github.com",x="https://api.github.com",m="https://raw.githubusercontent.com";function h(y){const v=y.getOptionalString("host")??d;let A=y.getOptionalString("apiBaseUrl"),T=y.getOptionalString("rawBaseUrl");const P=y.getOptionalString("token")?.trim(),w=y.getOptionalConfigArray("apps")?.map(O=>({appId:O.getNumber("appId"),clientId:O.getString("clientId"),clientSecret:O.getString("clientSecret"),webhookSecret:O.getString("webhookSecret"),privateKey:O.getString("privateKey"),allowedInstallationOwners:O.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,n.HO)(v))throw new Error(`Invalid GitHub integration config, '${v}' is not a valid host`);return A?A=(0,a.trimEnd)(A,"/"):v===d&&(A=x),T?T=(0,a.trimEnd)(T,"/"):v===d&&(T=m),{host:v,apiBaseUrl:A,rawBaseUrl:T,token:P,apps:w}}function u(y){const v=y.map(h);return v.some(A=>A.host===d)||v.push({host:d,apiBaseUrl:x,rawBaseUrl:m}),v}class g{integrationConfig;static factory=({config:v})=>{const A=u(v.getOptionalConfigArray("integrations.github")??[]);return(0,n.oS)(A.map(T=>new g(T)),T=>T.config.host)};constructor(v){this.integrationConfig=v}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(v){return p((0,n.ku)(v),"tree")}resolveEditUrl(v){return p(v,"edit")}parseRateLimitInfo(v){return{isRateLimited:v.status===429||v.status===403&&v.headers.get("x-ratelimit-remaining")==="0"}}}function p(y,v){return y.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(A,T,P,w)=>`//${T}/${P}/${w}/${v}/`)}},59869:(H,b,t)=>{"use strict";t.d(b,{AY:()=>h,HO:()=>m,ku:()=>g,oS:()=>u});var n=t(52536),a=t.n(n),d=t(45250),x=t.n(d);function m(y){const v=new URL("http://example.com");return v.host=y,v.host===y}function h(y){try{return new URL(y),!0}catch{return!1}}function u(y,v){return{list(){return y},byUrl(A){try{const T=typeof A=="string"?new URL(A):A;return y.find(P=>v(P)===T.host)}catch{return}},byHost(A){return y.find(T=>v(T)===A)}}}function g(y){const{url:v,base:A,lineNumber:T}=y;try{return new URL(v),v}catch{}let P;if(v.startsWith("/")){const{href:w,filepath:O}=a()(A);P=new URL(w);const j=(0,d.trimEnd)(P.pathname.substring(0,P.pathname.length-O.length),"/");P.pathname=`${j}${v}`}else P=new URL(v,A);return P.search=new URL(A).search,T&&(P.hash=`L${T}`),P.toString()}function p(y){beforeAll(()=>y.listen({onUnhandledRequest:"error"})),afterAll(()=>y.close()),afterEach(()=>y.resetHandlers())}},9245:(H,b,t)=>{"use strict";var n={};t.r(n),t.d(n,{TechDocsPlugin:()=>h.Ju});var a=t(31085),d=t(14041),x=t(25873),m=t(18690),h=t(39278),u=t(85920),g=t(72020),p=t(99730),y=t(64947),v=t(12173),A=t(22020),T=t(68146),P=t(73657);function w({children:r}){return(0,m.Ri)()?(0,a.jsx)(a.Fragment,{children:r}):(0,a.jsx)(m.fS,{children:r})}const O=()=>(0,a.jsx)(v.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),j=({step:r,error:e})=>{let s="";return r==="load-config"?s=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(s=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,a.jsx)(w,{children:(0,a.jsx)(v.M,{statusMessage:s,stack:e.stack})})},F=({error:r,resetError:e,plugin:s})=>(0,a.jsx)(A.b,{title:`Error in ${s?.getId()}`,defaultExpanded:!0,error:r,children:(0,a.jsx)(y.A,{variant:"outlined",onClick:e,children:"Retry"})}),L={Progress:T.k,Router:P.Kd,NotFoundErrorPage:O,BootErrorPage:j,ErrorBoundaryFallback:F},Z="Invalid discovery URL pattern,";class G{parts;static compile(e){const s=e.split(/\{\{\s*pluginId\s*\}\}/),o=s.join("pluginId");let i;try{i=new URL(o)}catch{throw new Error(`${Z} URL '${o}' is invalid`)}if(i.hash)throw new Error(`${Z} URL must not have a hash`);if(i.search)throw new Error(`${Z} URL must not have a query`);if(o.endsWith("/"))throw new Error(`${Z} URL must not end with a slash`);return new G(s)}constructor(e){this.parts=e}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}}var N=t(96403),Q=t.n(N);class q{isClosed=!1;terminatingError;observable=new(Q())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}));subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(s=>s.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(s=>s.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,s,o){const i=typeof e=="function"?{next:e,error:s,complete:o}:e;return this.observable.subscribe(i)}}class K{isClosed;currentValue;terminatingError;observable;constructor(e){this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(Q())(s=>this.isClosed?(this.terminatingError?s.error(this.terminatingError):s.complete(),()=>{}):(s.next(this.currentValue),this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=e,this.subscribers.forEach(s=>s.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(s=>s.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,s,o){const i=typeof e=="function"?{next:e,error:s,complete:o}:e;return this.observable.subscribe(i)}}class et{subject=new q;post(e){this.subject.next(e)}alert$(){return this.subject}}class J{captureEvent(e){}}class Y{alertApi;errorApi;constructor(e,s){this.alertApi=e,this.errorApi=s}post(e,s){return s?.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,s)}error$(){return this.errorApi.error$()}}class V{subject=new q;post(e,s){this.subject.next({error:e,context:s})}error$(){return this.subject}}class at{static forward(e,s){window.addEventListener("unhandledrejection",o=>{e.post(o.reason,s)})}}const nt=new Map;class gt{namespace;errorApi;constructor(e,s){this.namespace=e,this.errorApi=s,this.subscribers=new Set,this.observable=new(Q())(o=>(this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}static hasSubscribed=!1;static create(e){return new gt(e.namespace??"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[s,o]of nt.entries())e.key?.startsWith(s)&&o.handleStorageChange(e.key)})}get(e){return this.snapshot(e).value}snapshot(e){let s,o="absent";try{const i=localStorage.getItem(this.getKeyName(e));i&&(s=JSON.parse(i,(c,S)=>(typeof S=="object"&&S!==null&&Object.freeze(S),S)),o="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:s,presence:o}}forBucket(e){const s=`${this.namespace}/${e}`;return nt.has(s)||nt.set(s,new gt(s,this.errorApi)),nt.get(s)}async set(e,s){localStorage.setItem(this.getKeyName(e),JSON.stringify(s)),this.notifyChanges(e)}async remove(e){localStorage.removeItem(this.getKeyName(e)),this.notifyChanges(e)}observe$(e){return gt.hasSubscribed||(gt.addStorageEventListener(),gt.hasSubscribed=!0),this.observable.filter(({key:s})=>s===e)}handleStorageChange(e){if(!e?.startsWith(this.namespace))return;const s=e?.slice(`${this.namespace}/`.length);s.includes("/")||this.notifyChanges(decodeURIComponent(s))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const s=this.snapshot(e);for(const o of this.subscribers)o.next(s)}subscribers;observable}function bt(r){let e=r.baseImplementation||t.g.fetch;const s=[r.middleware??[]].flat().reverse();for(const o of s)e=o.apply(e);return{fetch:e}}class xt{identityApi;allowUrl;headerName;headerValue;static create(e){const s=ht(e),o=e.header?.name||"authorization",i=e.header?.value||(c=>`Bearer ${c}`);return new xt(e.identityApi,s,o,i)}constructor(e,s,o,i){this.identityApi=e,this.allowUrl=s,this.headerName=o,this.headerValue=i}apply(e){return async(s,o)=>{const i=new Request(s,o),{token:c}=await this.identityApi.getCredentials();return i.headers.get(this.headerName)||typeof c!="string"||!c||!this.allowUrl(i.url)?e(s,o):(i.headers.set(this.headerName,this.headerValue(c)),e(i))}}}function ht(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?ut(r.urlPrefixAllowlist):r.config?ut([r.config.getString("backend.baseUrl")]):()=>!1}function ut(r){const e=r.map(s=>s.replace(/\/$/,""));return s=>e.some(o=>s===o||s.startsWith(`${o}/`))}function Et(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class mt{discoveryApi;constructor(e){this.discoveryApi=e}apply(e){return async(s,o)=>{const i=new Request(s,o),c="plugin://";if(!i.url.startsWith(c))return e(s,o);const{hostname:S,pathname:C,search:R,hash:W,username:_,password:ct}=new URL(`http://${i.url.substring(c.length)}`);let rt=await this.discoveryApi.getBaseUrl(S);if(_||ct){const Rt=new URL(rt),Vt=`${_}${ct?`:${ct}`:""}@`;rt=`${Rt.protocol}//${Vt}${Rt.host}${Rt.pathname}`}const dt=`${Et(rt,C)}${R}${W}`;return e(dt,typeof s=="string"||Pt(s)?o:s)}}}function Pt(r){return typeof r=="object"&&r?.constructor===URL}class Ot{static resolvePluginProtocol(e){return new mt(e.discoveryApi)}static injectIdentityAuth(e){return xt.create(e)}constructor(){}}function jt(r,e){for(const s of e)if(!r.has(s))return!1;return!0}function Nt(r,...e){const s=new Set(r);for(const o of e)for(const i of o)s.add(i);return s}class Bt{requests=[];subject=new K(this.getCurrentPending());request(e){return new Promise((s,o)=>{this.requests.push({scopes:e,resolve:s,reject:o}),this.subject.next(this.getCurrentPending())})}resolve(e,s){this.requests=this.requests.filter(o=>jt(e,o.scopes)?(o.resolve(s),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(s=>s.reject(e)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const e=this.requests.length===0?void 0:this.requests.slice(1).reduce((s,o)=>Nt(s,o.scopes),this.requests[0].scopes);return{scopes:e,resolve:s=>{e&&this.resolve(e,s)},reject:s=>{e&&this.reject(s)}}}}class pt{subject=new K([]);currentRequests=[];handlerCount=0;createAuthRequester(e){const s=new Bt,o=this.handlerCount;return this.handlerCount++,s.pending().subscribe({next:i=>{const c=this.currentRequests.slice(),S=this.makeAuthRequest(i,e);S?c[o]=S:delete c[o],this.currentRequests=c,this.subject.next(c.filter(Boolean))}}),i=>s.request(i)}makeAuthRequest(e,s){const{scopes:o}=e;if(o)return{provider:s.provider,trigger:async()=>{const i=await s.onAuthRequest(o);e.resolve(i)},reject:()=>{const i=new Error("Login failed, rejected by user");i.name="RejectedError",e.reject(i)}}}authRequest$(){return this.subject}}function Lt(r){return new Promise((e,s)=>{const o=r.width||500,i=r.height||700,c=window.screen.width/2-o/2,S=window.screen.height/2-i/2,C=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${o},height=${i},top=${S},left=${c}`);let R="";if(!C||typeof C.closed>"u"||C.closed){const rt=new Error("Failed to open auth popup.");rt.name="PopupRejectedError",s(rt);return}const W=rt=>{if(rt.source!==C||rt.origin!==r.origin)return;const{data:dt}=rt;if(dt.type==="config_info"){R=dt.targetOrigin;return}if(dt.type!=="authorization_response")return;const Rt=dt;if("error"in Rt){const Vt=new Error(Rt.error.message);Vt.name=Rt.error.name,s(Vt)}else e(Rt.response);ct()},_=setInterval(()=>{if(C.closed){const rt=`Login failed, ${R&&R!==window.location.origin?`Incorrect app origin, expected ${R}`:"popup was closed"}`,dt=new Error(rt);dt.name="PopupClosedError",s(dt),ct()}},100);function ct(){window.removeEventListener("message",W),clearInterval(_)}window.addEventListener("message",W)})}let ft=!1;function B(r){return[...r].join(" ")}class k{discoveryApi;environment;provider;joinScopesFunc;authRequester;sessionTransform;enableExperimentalRedirectFlow;popupOptions;constructor(e){const{configApi:s,discoveryApi:o,environment:i,provider:c,joinScopes:S=B,oauthRequestApi:C,sessionTransform:R=_=>_,popupOptions:W}=e;!ft&&!s&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),ft=!0),this.enableExperimentalRedirectFlow=s?s.getOptionalBoolean("enableExperimentalRedirectFlow")??!1:!1,this.authRequester=C.createAuthRequester({provider:c,onAuthRequest:async _=>this.enableExperimentalRedirectFlow?this.executeRedirect(_):this.showPopup(_)}),this.discoveryApi=o,this.environment=i,this.provider=c,this.joinScopesFunc=S,this.sessionTransform=R,this.popupOptions=W}async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const s=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(i=>{throw new Error(`Auth refresh request failed, ${i}`)});if(!s.ok){const i=new Error(`Auth refresh request failed, ${s.statusText}`);throw i.status=s.status,i}const o=await s.json();if(o.error){const i=new Error(o.error.message);throw o.error.name&&(i.name=o.error.name),i}return await this.sessionTransform(o)}async removeSession(){const e=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(s=>{throw new Error(`Logout request failed, ${s}`)});if(!e.ok){const s=new Error(`Logout request failed, ${e.statusText}`);throw s.status=e.status,s}}async showPopup(e){const s=this.joinScopesFunc(e),o=await this.buildUrl("/start",{scope:s,origin:window.location.origin,flow:"popup"}),i=this.popupOptions?.size?.fullscreen?window.screen.width:this.popupOptions?.size?.width||450,c=this.popupOptions?.size?.fullscreen?window.screen.height:this.popupOptions?.size?.height||730,S=await Lt({url:o,name:`${this.provider.title} Login`,origin:new URL(o).origin,width:i,height:c});return await this.sessionTransform(S)}async executeRedirect(e){const s=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:s,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,s){const o=await this.discoveryApi.getBaseUrl("auth"),i=this.buildQueryString({...s,env:this.environment});return`${o}/${this.provider.id}${e}${i}`}buildQueryString(e){if(!e)return"";const s=Object.entries(e).map(([o,i])=>{if(typeof i=="string")return`${encodeURIComponent(o)}=${encodeURIComponent(i)}`;if(i)return encodeURIComponent(o)}).filter(Boolean).join("&");return s?`?${s}`:""}}function ot(r,e){for(const s of e)if(!r.has(s))return!1;return!0}class Ct{options;constructor(e){this.options=e}sessionExistsAndHasScope(e,s){if(!e)return!1;if(!s||this.options.sessionScopes===void 0)return!0;const o=this.options.sessionScopes(e);return ot(o,s)}getExtendedScope(e,s){const o=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const i=this.options.sessionScopes(e);for(const c of i)o.add(c)}if(s)for(const i of s)o.add(i);return o}}var it=t(55309),vt=function(r){return r.SignedIn="SignedIn",r.SignedOut="SignedOut",r}({});const Tt=(0,it.y)({id:"core.auth.google"}),wt=(0,it.y)({id:"core.auth.github"}),It=(0,it.y)({id:"core.auth.okta"}),Ut=(0,it.y)({id:"core.auth.gitlab"}),Qt=(0,it.y)({id:"core.auth.microsoft"}),fe=(0,it.y)({id:"core.auth.onelogin"}),le=(0,it.y)({id:"core.auth.bitbucket"}),te=(0,it.y)({id:"core.auth.bitbucket-server"}),se=(0,it.y)({id:"core.auth.atlassian"}),Te=(0,it.y)({id:"core.auth.vmware-cloud"});class ze{subject=new K(vt.SignedOut);signedIn=!1;setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?vt.SignedIn:vt.SignedOut))}sessionState$(){return this.subject}}class zt{connector;helper;sessionScopesFunc;sessionShouldRefreshFunc;stateTracker=new ze;refreshPromise;currentSession;constructor(e){const{connector:s,defaultScopes:o=new Set,sessionScopes:i,sessionShouldRefresh:c}=e;this.connector=s,this.sessionScopesFunc=i,this.sessionShouldRefreshFunc=c,this.helper=new Ct({sessionScopes:i,defaultScopes:o})}async getSession(e){if(this.helper.sessionExistsAndHasScope(this.currentSession,e.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const o=await this.collapsedSessionRefresh(e.scopes),i=this.sessionScopesFunc(this.currentSession),c=this.sessionScopesFunc(o);return ot(c,i)&&(this.currentSession=o),o}catch(o){if(e.optional)return;throw o}}if(!this.currentSession&&!e.instantPopup)try{const s=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=s,this.getSession(e)}catch{}if(!e.optional)return this.currentSession=await this.connector.createSession({...e,scopes:this.helper.getExtendedScope(this.currentSession,e.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(e){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession(this.helper.getExtendedScope(this.currentSession,e));try{const s=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),s}finally{delete this.refreshPromise}}}const ee={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class Zt{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=ee,oauthRequestApi:S,defaultScopes:C=[],scopeTransform:R=rt=>rt,popupOptions:W}=e,_=new k({configApi:s,discoveryApi:o,environment:i,provider:c,oauthRequestApi:S,sessionTransform({backstageIdentity:rt,...dt}){const Rt={...dt,providerInfo:{idToken:dt.providerInfo.idToken,accessToken:dt.providerInfo.accessToken,scopes:Zt.normalizeScopes(R,dt.providerInfo.scope),expiresAt:dt.providerInfo.expiresInSeconds?new Date(Date.now()+dt.providerInfo.expiresInSeconds*1e3):void 0}};return rt&&(Rt.backstageIdentity={token:rt.token,identity:rt.identity,expiresAt:rt.expiresInSeconds?new Date(Date.now()+rt.expiresInSeconds*1e3):void 0}),Rt},popupOptions:W}),ct=new zt({connector:_,defaultScopes:new Set(C),sessionScopes:rt=>rt.providerInfo.scopes,sessionShouldRefresh:rt=>{let dt=1/0;return rt.providerInfo?.expiresAt&&(dt=Math.min(dt,(rt.providerInfo.expiresAt.getTime()-Date.now())/1e3)),rt.backstageIdentity?.expiresAt&&(dt=Math.min(dt,(rt.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),dt<60*5}});return new Zt({sessionManager:ct,scopeTransform:R})}sessionManager;scopeTransform;constructor(e){this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,s){const o=Zt.normalizeScopes(this.scopeTransform,e);return(await this.sessionManager.getSession({...s,scopes:o}))?.providerInfo.accessToken??""}async getIdToken(e={}){return(await this.sessionManager.getSession({...e,scopes:new Set(["openid"])}))?.providerInfo.idToken??""}async getBackstageIdentity(e={}){return(await this.sessionManager.getSession(e))?.backstageIdentity}async getProfile(e={}){return(await this.sessionManager.getSession(e))?.profile}static normalizeScopes(e,s){if(!s)return new Set;const o=Array.isArray(s)?s:s.split(/[\s|,]/).filter(Boolean);return new Set(e(o))}}const We={id:"google",title:"Google",icon:()=>null},ce="https://www.googleapis.com/auth/";class je{static create(e){const{configApi:s,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:S=We,defaultScopes:C=["openid",`${ce}userinfo.email`,`${ce}userinfo.profile`]}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:i,provider:S,environment:c,defaultScopes:C,scopeTransform(R){return R.map(W=>W==="openid"?W:W==="profile"||W==="email"?`${ce}userinfo.${W}`:W.startsWith(ce)?W:`${ce}${W}`)}})}}const Ze={id:"microsoft",title:"Microsoft",icon:()=>null};class pe{oauth2;configApi;environment;provider;oauthRequestApi;discoveryApi;scopeTransform;static MicrosoftGraphID="00000003-0000-0000-c000-000000000000";static create(e){return new pe(e)}constructor(e){const{configApi:s,environment:o="development",provider:i=Ze,oauthRequestApi:c,discoveryApi:S,defaultScopes:C=["openid","offline_access","profile","email","User.Read"],scopeTransform:R=W=>W.concat("offline_access")}=e;this.configApi=s,this.environment=o,this.provider=i,this.oauthRequestApi=c,this.discoveryApi=S,this.scopeTransform=R,this.oauth2={[pe.MicrosoftGraphID]:Zt.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:C})}}microsoftGraph(){return this.oauth2[pe.MicrosoftGraphID]}static resourceForScopes(e){const s=[...new Set(e.split(" ").map(pe.resourceForScope).filter(i=>i!=="openid"))];if(s.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${s.join(", ")}. Access tokens can only have a single audience.`));const o=s[0]??pe.MicrosoftGraphID;return Promise.resolve(o)}static resourceForScope(e){const s=e.match(/^(?<resourceURI>.*)\/(?<scp>[^\/]*)$/)?.groups;if(s){const{resourceURI:o}=s;return o.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return pe.MicrosoftGraphID}}async getAccessToken(e,s){const o=e===void 0?pe.MicrosoftGraphID:await pe.resourceForScopes(Array.isArray(e)?e.join(" "):e);return o in this.oauth2||(this.oauth2[o]=Zt.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[o].getAccessToken(e,s)}getIdToken(e){return this.microsoftGraph().getIdToken(e)}getProfile(e){return this.microsoftGraph().getProfile(e)}getBackstageIdentity(e){return this.microsoftGraph().getBackstageIdentity(e)}signIn(){return this.microsoftGraph().signIn()}signOut(){return this.microsoftGraph().signOut()}sessionState$(){return this.microsoftGraph().sessionState$()}}const Je={id:"github",title:"GitHub",icon:()=>null};class ln{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=Je,oauthRequestApi:S,defaultScopes:C=["read:user"]}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:S,provider:c,environment:i,defaultScopes:C})}}const en={id:"okta",title:"Okta",icon:()=>null},nn=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Be="okta.";class Ue{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=en,oauthRequestApi:S,defaultScopes:C=["openid","email","profile","offline_access"]}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:S,provider:c,environment:i,defaultScopes:C,scopeTransform(R){return R.map(W=>nn.has(W)||W.startsWith(Be)?W:`${Be}${W}`)}})}}const Ke={id:"gitlab",title:"GitLab",icon:()=>null};class sn{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=Ke,oauthRequestApi:S,defaultScopes:C=["read_user"]}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:S,provider:c,environment:i,defaultScopes:C})}}const Ae={id:"onelogin",title:"onelogin",icon:()=>null},He=new Set(["openid","profile","email","phone","address","groups","offline_access"]),M="onelogin.";class l{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=Ae,oauthRequestApi:S}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:S,provider:c,environment:i,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(C){return C.map(R=>He.has(R)||R.startsWith(M)?R:`${M}${R}`)}})}}const E={id:"bitbucket",title:"Bitbucket",icon:()=>null};class D{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=E,oauthRequestApi:S,defaultScopes:C=["account"]}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:S,provider:c,environment:i,defaultScopes:C})}}const tt={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class lt{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=tt,oauthRequestApi:S,defaultScopes:C=["PROJECT_ADMIN"]}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:S,provider:c,environment:i,defaultScopes:C})}}const yt={id:"atlassian",title:"Atlassian",icon:()=>null};class Wt{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=yt,oauthRequestApi:S}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:S,provider:c,environment:i})}}const Kt={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class Jt{static create(e){const{configApi:s,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:S=Kt,defaultScopes:C=["openid"]}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:i,provider:S,environment:c,defaultScopes:C})}}var Mt=t(12935),Xt=t(57405),kt=t(65461),me=t(36017),$e=t(99303),Pe=t(39837);const Ve=(0,it.y)({id:"core.storage"});var de=t(70795),ae=t(16009);const xe=(0,it.y)({id:"core.oauthrequest"});var es=t(96824),Xe=t(70835),ns=t(10288),yn=t.n(ns),In=t(52964),Gt=t(46195),_e=t(54241);const dn=Gt.z.lazy(()=>Gt.z.object({rule:Gt.z.string(),resourceType:Gt.z.string(),params:Gt.z.record(Gt.z.any()).optional()}).or(Gt.z.object({anyOf:Gt.z.array(dn).nonempty()})).or(Gt.z.object({allOf:Gt.z.array(dn).nonempty()})).or(Gt.z.object({not:dn}))),ss=Gt.z.object({result:Gt.z.literal(_e.b.ALLOW).or(Gt.z.literal(_e.b.DENY))}),Ws=Gt.z.union([Gt.z.object({result:Gt.z.literal(_e.b.ALLOW).or(Gt.z.literal(_e.b.DENY))}),Gt.z.object({result:Gt.z.literal(_e.b.CONDITIONAL),pluginId:Gt.z.string(),resourceType:Gt.z.string(),conditions:dn})]),rs=(r,e)=>Gt.z.object({items:Gt.z.array(Gt.z.intersection(Gt.z.object({id:Gt.z.string()}),r)).refine(s=>s.length===e.size&&s.every(({id:o})=>e.has(o)),{message:"Items in response do not match request"})});class os{enabled;discovery;constructor(e){this.discovery=e.discovery,this.enabled=e.config.getOptionalBoolean("permission.enabled")??!1}async authorize(e,s){return this.makeRequest(e,ss,s)}async authorizeConditional(e,s){return this.makeRequest(e,Ws,s)}async makeRequest(e,s,o){if(!this.enabled)return e.map(_=>({result:_e.b.ALLOW}));const i={items:e.map(_=>({id:In.A(),..._}))},c=await this.discovery.getBaseUrl("permission"),S=await yn()(`${c}/authorize`,{method:"POST",body:JSON.stringify(i),headers:{...this.getAuthorizationHeader(o?.token),"content-type":"application/json"}});if(!S.ok)throw await Xe.o.fromResponse(S);const C=await S.json(),W=rs(s,new Set(i.items.map(({id:_})=>_))).parse(C).items.reduce((_,ct)=>(_[ct.id]=ct,_),{});return i.items.map(_=>W[_.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}}class En{permissionClient;identityApi;constructor(e,s){this.permissionClient=e,this.identityApi=s}static create(e){const{config:s,discovery:o,identity:i}=e,c=new os({discovery:o,config:s});return new En(c,i)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}}const as=[(0,Mt.b)({api:Xt.I,deps:{configApi:kt.U},factory:({configApi:r})=>G.compile(`${r.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,Mt.b)({api:me.k,deps:{},factory:()=>new et}),(0,Mt.b)({api:$e.c,deps:{},factory:()=>new J}),(0,Mt.b)({api:Pe.m,deps:{alertApi:me.k},factory:({alertApi:r})=>{const e=new Y(r,new V);return at.forward(e,{hidden:!1}),e}}),(0,Mt.b)({api:Ve,deps:{errorApi:Pe.m},factory:({errorApi:r})=>gt.create({errorApi:r})}),(0,Mt.b)({api:de.a,deps:{configApi:kt.U,identityApi:ae.K,discoveryApi:Xt.I},factory:({configApi:r,identityApi:e,discoveryApi:s})=>bt({middleware:[Ot.resolvePluginProtocol({discoveryApi:s}),Ot.injectIdentityAuth({identityApi:e,config:r})]})}),(0,Mt.b)({api:xe,deps:{},factory:()=>new pt}),(0,Mt.b)({api:Tt,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>je.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:Qt,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>pe.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:wt,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>ln.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:It,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Ue.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:Ut,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>sn.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:fe,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>l.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:le,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>D.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:te,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>lt.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"],environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:se,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Wt.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:Te,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Jt.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:es.x,deps:{discovery:Xt.I,identity:ae.K,config:kt.U},factory:({config:r,discovery:e,identity:s})=>En.create({config:r,discovery:e,identity:s})})];var An=t(14451),is=t(27799),Dn=t(94389),cs=t(20947),Ln=t(20473),ls=t(45917),Mn=t(39347),un=t(63309),ds=t(82451),us=t(85121),jn=t(17400),hs=t(42226),gs=t(69550),Bn=t(52755),Un=t(89350),ps=t(8911),xn=t(33602),Cn=t(48108),fs=t(77225),$n=t(55700),Fn=t(71865),ms=t(80109),vs=t(15303),ys=t(39330);const Es={brokenImage:is.A,catalog:ps.A,scaffolder:cs.A,techdocs:Ln.A,search:ls.A,chat:Mn.A,dashboard:un.A,docs:ds.A,email:us.A,github:hs.A,group:xn.A,help:gs.A,"kind:api":jn.A,"kind:component":Un.A,"kind:domain":An.A,"kind:group":xn.A,"kind:location":Bn.A,"kind:system":Dn.A,"kind:user":Cn.A,"kind:resource":$n.A,"kind:template":Fn.A,user:Cn.A,warning:fs.A,star:ms.A,unstarred:vs.A,externalLink:ys.A};var As=t(58733),xs=t(55288),Cs=t(91360),bs=t(50868),Ss=t(12285),Os=t(87271),Nn=t(64636);Nn.A.configure(r=>`v5-${r}`);const Ts=(0,xs.A)({productionPrefix:"jss4-"});function kn(r){const{children:e,theme:s,noCssBaseline:o=!1}=r,i=s.getTheme("v4"),c=s.getTheme("v5");let S;o||(S=(0,a.jsx)(As.Ay,{}));let C=(0,a.jsxs)(a.Fragment,{children:[S,e]});return i&&(C=(0,a.jsx)(Cs.Ay,{generateClassName:Ts,children:(0,a.jsx)(bs.A,{theme:i,children:C})})),c&&(C=(0,a.jsx)(Ss.A,{injectFirst:!0,children:(0,a.jsx)(Os.A,{theme:c,children:C})})),C}const Wn={light:{type:"light",mode:"light",background:{default:"#F8F8F8",paper:"#FFFFFF"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#1F5493",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#1F5493"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",closeButtonColor:"#FFFFFF",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:"#FFD600",navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},dark:{type:"dark",mode:"dark",background:{default:"#333333",paper:"#424242"},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",closeButtonColor:"#FFFFFF",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:"#FFD600",navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}}};var Ps=t(98392),bn=t(17161);const Fe={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")`},we={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 Ne(r){const{colors:e,shape:s,options:o}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,S=`${s}, ${c}`,C=o?.fontColor??"#FFFFFF";return{colors:e,shape:s,backgroundImage:S,fontColor:C}}const ws={home:Ne({colors:we.teal,shape:Fe.wave}),documentation:Ne({colors:we.pinkSea,shape:Fe.wave2}),tool:Ne({colors:we.purpleSky,shape:Fe.round}),service:Ne({colors:we.marineBlue,shape:Fe.wave}),website:Ne({colors:we.veryBlue,shape:Fe.wave}),library:Ne({colors:we.rubyRed,shape:Fe.wave}),other:Ne({colors:we.darkGrey,shape:Fe.wave}),app:Ne({colors:we.toastyOrange,shape:Fe.wave}),apis:Ne({colors:we.teal,shape:Fe.wave2}),card:Ne({colors:we.greens,shape:Fe.wave})},Kn=16,Rs='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',f="home",I={htmlFontSize:Kn,fontFamily:Rs,h1:{fontSize:54,fontWeight:700,marginBottom:10},h2:{fontSize:40,fontWeight:700,marginBottom:8},h3:{fontSize:32,fontWeight:700,marginBottom:6},h4:{fontWeight:700,fontSize:28,marginBottom:6},h5:{fontWeight:700,fontSize:24,marginBottom:4},h6:{fontWeight:700,fontSize:20,marginBottom:2}};function U(r){const{palette:e,htmlFontSize:s=Kn,fontFamily:o=Rs,defaultPageTheme:i=f,pageTheme:c=ws,typography:S}=r;if(!c[i])throw new Error(`${i} is not defined in pageTheme.`);return I.htmlFontSize=s,I.fontFamily=o,{palette:e,typography:S??I,page:c[i],getPageTheme:({themeId:C})=>c[C]??c[i]}}var $=t(80012);const z={MuiCssBaseline:{styleOverrides:r=>({html:{height:"100%",fontFamily:r.typography.fontFamily},body:{height:"100%",fontFamily:r.typography.fontFamily,overscrollBehaviorY:"none",fontSize:"0.875rem",lineHeight:1.43,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:r.palette.background.paper,width:"1em"},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:r.palette.textVerySubtle,border:`3px solid ${r.palette.background.paper}`},"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active":{backgroundColor:r.palette.mode==="dark"?(0,$.a)(r.palette.textVerySubtle,.2):(0,$.e$)(r.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.mode==="dark"?(0,$.a)(r.palette.textVerySubtle,.2):(0,$.e$)(r.palette.textVerySubtle,.2)}},a:{color:"inherit",textDecoration:"none"}})},MuiGrid:{defaultProps:{spacing:2}},MuiSwitch:{defaultProps:{color:"primary"}},MuiTableRow:{styleOverrides:{root:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.default}}),hover:{"&:hover":{cursor:"pointer"}},head:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.paper}})}},MuiTableCell:{styleOverrides:{root:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:r.spacing(3,2,3,2.5),borderBottom:0}),sizeSmall:({theme:r})=>({padding:r.spacing(1.5,2,1.5,2.5)}),head:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",color:r.palette.textSubtle,fontWeight:"normal",lineHeight:"1"})}},MuiTabs:{styleOverrides:{root:{minHeight:24}}},MuiTab:{styleOverrides:{root:({theme:r})=>({color:r.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,$.e$)(r.palette.link,.3),background:(0,$.a)(r.palette.link,.95)},[r.breakpoints.up("md")]:{minWidth:120,fontSize:r.typography.pxToRem(14),fontWeight:500}}),textColorPrimary:({theme:r})=>({color:r.palette.link})}},MuiTableSortLabel:{styleOverrides:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"},"&.Mui-active":{fontWeight:"bold",color:"inherit"}}}},MuiListItemText:{styleOverrides:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}},MuiButton:{styleOverrides:{text:{padding:void 0}}},MuiChip:{styleOverrides:{root:({theme:r})=>({marginRight:r.spacing(1),marginBottom:r.spacing(1)}),label:({theme:r})=>({lineHeight:r.spacing(2.5),fontWeight:r.typography.fontWeightMedium,fontSize:r.spacing(1.75)}),labelSmall:({theme:r})=>({fontSize:r.spacing(1.5)}),deleteIcon:({theme:r})=>({width:r.spacing(3),height:r.spacing(3),margin:r.spacing(0,.75,0,-.75)}),deleteIconSmall:({theme:r})=>({width:r.spacing(2),height:r.spacing(2),margin:r.spacing(0,.5,0,-.5)})}},MuiCard:{styleOverrides:{root:{display:"flex",flexDirection:"column"}}},MuiCardHeader:{styleOverrides:{root:{paddingBottom:0}}},MuiCardContent:{styleOverrides:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}}},MuiCardActions:{styleOverrides:{root:{justifyContent:"flex-end"}}},MuiLink:{defaultProps:{underline:"hover"}},MuiPaper:{styleOverrides:{root:{backgroundImage:"unset"}}}},X=r=>(...e)=>{const s=e.length===0?[1]:e,o=(i,c)=>typeof i=="string"?i:c*i;return s.map(i=>{const c=o(i,r);return typeof c=="number"?`${c}px`:c}).join(" ")};function st(r,e){if(!e||typeof e=="string")return;const s=typeof e=="function"?e(r):e;if(s)return{"@global":s}}function At(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const s={...r},o=r.spacing(1);return typeof o=="number"&&(s.spacing=X(o)),Object.fromEntries(Object.entries(e).map(([i,c])=>typeof c=="function"?[i,c({theme:s})]:[i,c]))}return e}}const St=/^&.Mui-([\w-]+)$/;function $t(r){let e=r;if(!r||typeof r!="object")return e;for(const s of Object.keys(r)){const o=r[s];if(!(!o||typeof o!="object"))for(const i of Object.keys(o)){const c=i,S=c.match(St);if(S){const[,C]=S,{[c]:R,...W}=o;R&&(e={...e,[s]:W,[C]:R})}}}return e}function Dt(r,e={}){const s={},o={};for(const i of Object.keys(e)){const c=e[i];c&&("styleOverrides"in c&&(i==="MuiCssBaseline"?s[i]=st(r,c.styleOverrides):s[i]=$t(At(r,c.styleOverrides))),"defaultProps"in c&&(o[i]=c.defaultProps))}return{overrides:s,props:o}}class Ft{#t=new Map;constructor(e,s){this.#t=new Map,e&&this.#t.set("v4",e),s&&this.#t.set("v5",s)}getTheme(e){return this.#t.get(e)}}function _t(r){const e=U(r),s={...z,...r.components},o=(0,bn.A)({...e,components:s}),i=Dt(o,s),c={...(0,Ps.A)(e),...i};return new Ft(c,o)}function Ht(r){const e=adaptV4Theme(r),s=createTheme(r);return new Ft(s,createV5Theme(e))}const he={light:_t({palette:Wn.light}),dark:_t({palette:Wn.dark})};var Yt=t(75962),ge=t(87145);const qt=[{id:"light",title:"Light Theme",variant:"light",icon:(0,a.jsx)(ge.A,{}),Provider:({children:r})=>(0,a.jsx)(kn,{theme:he.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,a.jsx)(Yt.A,{}),Provider:({children:r})=>(0,a.jsx)(kn,{theme:he.dark,children:r})}];var ue=t(73466),re=t(39067),ne=t.n(re);class oe{holders;constructor(...e){this.holders=e}get(e){for(const s of this.holders){const o=s.get(e);if(o)return o}}}var ie=t(43836),Re=t(10602);const Le=(0,ie.tK)("api-context"),qe=r=>{const{apis:e,children:s}=r,o=(0,d.useContext)(Le)?.atVersion(1),i=o?new oe(e,o):e;return(0,a.jsx)(Le.Provider,{value:(0,Re.B)({1:i}),children:s})};qe.propTypes={apis:ne().shape({get:ne().func.isRequired}).isRequired,children:ne().node};const rn=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function Ge(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Ce(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Ce):Object.fromEntries(Object.entries(r).map(([e,s])=>[e,Ce(s)]))}function on(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:on(e);if(typeof r!="object"||Array.isArray(r))return r;const s=Ge(e)?e:{},o={};for(const i of new Set([...Object.keys(r),...Object.keys(s)])){const c=on(r[i],s[i]);c!==void 0&&(o[i]=c)}return o}function Is(r){if(r===null)return"null";if(Array.isArray(r))return"array";const e=typeof r;return e==="number"&&isNaN(r)?"nan":e==="string"&&r===""?"empty-string":e}const ke={type(r,e,s,o){return`Invalid type in config for key '${r}' in '${e}', got ${s}, wanted ${o}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,s){return`Unable to convert config value for key '${r}' in '${e}' to a ${s}`}};class hn{data;context;fallback;prefix;filteredKeys;notifiedFilteredKeys;static fromConfigs(e){return e.length===0?new hn(void 0):e.reduce((s,{data:o,context:i,filteredKeys:c,deprecatedKeys:S})=>{const C=new hn(o,i,s);if(C.filteredKeys=c,S)for(const{key:R,description:W}of S)console.warn(`The configuration key '${R}' of ${i} is deprecated and may be removed soon. ${W||""}`);return C},void 0)}constructor(e,s="mock-config",o,i=""){this.data=e,this.context=s,this.fallback=o,this.prefix=i,this.notifiedFilteredKeys=new Set}has(e){const s=this.readValue(e);return s===null?!1:s!==void 0?!0:this.fallback?.has(e)??!1}keys(){const e=this.data?Object.keys(this.data):[],s=this.fallback?.keys()??[];return[...new Set([...e,...s])].filter(o=>this.data?.[o]!==null)}get(e){const s=this.getOptional(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e??""),this.context));return s}getOptional(e){const s=Ce(this.readValue(e)),o=this.fallback?.getOptional(e);if(s!==null)return s===void 0?on(o):o===void 0?on(s):on(s,o)}getConfig(e){const s=this.getOptionalConfig(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalConfig(e){const s=this.readValue(e),o=this.fallback?.getOptionalConfig(e);if(Ge(s))return this.copy(s,e,o);if(s!==null){if(s!==void 0)throw new TypeError(ke.type(this.fullKey(e),this.context,Is(s),"object"));return o}}getConfigArray(e){const s=this.getOptionalConfigArray(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalConfigArray(e){const s=this.readConfigValue(e,o=>{if(!Array.isArray(o))return{expected:"object-array"};for(const[i,c]of o.entries())if(!Ge(c))return{expected:"object-array",value:c,key:`${e}[${i}]`};return!0});if(s)return s.map((o,i)=>this.copy(o,`${e}[${i}]`))}getNumber(e){const s=this.getOptionalNumber(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalNumber(e){const s=this.readConfigValue(e,i=>typeof i=="number"||typeof i=="string"||{expected:"number"});if(typeof s=="number"||s===void 0)return s;const o=Number(s);if(!Number.isFinite(o))throw new Error(ke.convert(this.fullKey(e),this.context,"number"));return o}getBoolean(e){const s=this.getOptionalBoolean(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalBoolean(e){const s=this.readConfigValue(e,i=>typeof i=="boolean"||typeof i=="number"||typeof i=="string"||{expected:"boolean"});if(typeof s=="boolean"||s===void 0)return s;const o=String(s).trim();if(/^(?:y|yes|true|1|on)$/i.test(o))return!0;if(/^(?:n|no|false|0|off)$/i.test(o))return!1;throw new Error(ke.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const s=this.getOptionalString(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalString(e){return this.readConfigValue(e,s=>typeof s=="string"&&s!==""||{expected:"string"})}getStringArray(e){const s=this.getOptionalStringArray(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalStringArray(e){return this.readConfigValue(e,s=>{if(!Array.isArray(s))return{expected:"string-array"};for(const[o,i]of s.entries())if(typeof i!="string"||i==="")return{expected:"string-array",value:i,key:`${e}[${o}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,s,o){const i=new hn(e,this.context,o,this.fullKey(s));return i.filteredKeys=this.filteredKeys,i}readConfigValue(e,s){const o=this.readValue(e);if(o===void 0)return this.fallback?.readConfigValue(e,s);if(o===null)return;const i=s(o);if(i!==!0){const{key:c=e,value:S=o,expected:C}=i;throw new TypeError(ke.type(this.fullKey(c),this.context,Is(S),C))}return o}readValue(e){const s=e?e.split("."):[];for(const i of s)if(!rn.test(i))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let o=this.data;for(const[i,c]of s.entries())if(Ge(o))o=o[c];else if(o!=null){const S=this.fullKey(s.slice(0,i).join("."));throw new TypeError(ke.type(S,this.context,Is(o),"object"))}return o}}const Sn="theme";class zn{themes;static createWithStorage(e){const s=new zn(e);if(!window.localStorage)return s;const o=window.localStorage.getItem(Sn)??void 0;return s.setActiveThemeId(o),s.activeThemeId$().subscribe(i=>{i?window.localStorage.setItem(Sn,i):window.localStorage.removeItem(Sn)}),window.addEventListener("storage",i=>{if(i.key===Sn){const c=localStorage.getItem(Sn)??void 0;s.setActiveThemeId(c)}}),s}activeThemeId;subject;constructor(e){this.themes=e,this.subject=new K(void 0)}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(e){this.activeThemeId=e,this.subject.next(e)}}var gn=t(63636);function Ks(r){if(r.length<3)throw new Error(`The '${r}' feature flag must have a minimum length of three characters.`);if(r.length>150)throw new Error(`The '${r}' feature flag must not exceed 150 characters.`);if(!r.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${r}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class $r{registeredFeatureFlags=[];flags;registerFlag(e){Ks(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===gn.S.Active}save(e){this.flags||(this.flags=this.load()),e.merge||this.flags.clear();for(const[o,i]of Object.entries(e.states))this.flags.set(o,i);const s=Array.from(this.flags.entries()).filter(([,o])=>o===gn.S.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(s)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const s=JSON.parse(e);if(typeof s!="object"||s===null||Array.isArray(s))return new Map;const o=Object.entries(s).filter(([i,c])=>(Ks(i),c===gn.S.Active));return new Map(o)}catch{return new Map}}}const Hn=(0,it.y)({id:"core.apptheme"}),zs=(0,it.y)({id:"core.applanguage"});var Fr=t(56038),Hs=function(r){return r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static",r}(Hs||{});class Nr{factories=new Map;register(e,s){const o=Hs[e],i=this.factories.get(s.api.id);return i&&i.priority>=o?!1:(this.factories.set(s.api.id,{priority:o,factory:s}),!0)}get(e){const s=this.factories.get(e.id);if(s)return s.factory}getAllApis(){const e=new Set;for(const{factory:s}of this.factories.values())e.add(s.api);return e}}class Ds{factories;static validateFactories(e,s){for(const o of s){const i=[o],c=new Set;for(;i.length;){const S=i.shift(),C=e.get(S);if(C)for(const R of Object.values(C.deps)){if(R.id===o.id)throw new Error(`Circular dependency of api factory for ${o}`);c.has(R)||(c.add(R),i.push(R))}}}}apis;constructor(e){this.factories=e,this.apis=new Map}get(e){return this.load(e)}load(e,s=[]){const o=this.apis.get(e.id);if(o)return o;const i=this.factories.get(e);if(!i)return;if(s.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const c=this.loadDeps(e,i.deps,[...s,i.api]),S=i.factory(c);return this.apis.set(e.id,S),S}loadDeps(e,s,o){const i={};for(const c in s)if(s.hasOwnProperty(c)){const S=s[c],C=this.load(S,o);if(!C)throw new Error(`No API factory available for dependency ${S} of dependent ${e}`);i[c]=C}return i}}function kr(r){const e={};for(const o in r.collectors)r.collectors.hasOwnProperty(o)&&(e[o]=r.collectors[o]());const s=[{node:d.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;s.length!==0;){const{node:o,parent:i,contexts:c}=s.shift();d.Children.forEach(o,S=>{if(!(0,d.isValidElement)(S))return;const C={};for(const R in e)if(e.hasOwnProperty(R)){const W=e[R];C[R]=W.visit(W.accumulator,S,i,c[R])}for(const R of r.discoverers){const W=R(S);W&&s.push({node:W,parent:S,contexts:C})}})}return Object.fromEntries(Object.entries(e).map(([o,i])=>[o,i.accumulator]))}function Vn(r,e){return()=>({accumulator:r(),visit:e})}function Wr(r){return r.props?.children}function Kr(r){if(r.props?.path&&r.props?.element)return r.props?.element}var be=t(19402);const zr=Vn(()=>new Set,(r,e)=>{const s=(0,be.E)(e,"core.plugin");s&&r.add(s)});var On=t(72427);const Vs=r=>{const{children:e}=r,s=(0,On.gf)(gn.B),o="with"in r?s.isActive(r.with):!s.isActive(r.without);return(0,a.jsx)(a.Fragment,{children:o?e:null})};(0,be.h)(Vs,"core.featureFlagged",!0);const Gn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function Yn(r){const e=r;return e?.type?e.type.displayName??e.type.name??String(e.type):String(e)}const Gs=r=>{const e=new Set;return r&&e.add(r),e};function Ys(r,e=new Array){return d.Children.forEach(r,s=>{if(!(0,d.isValidElement)(s))return;const o=(0,be.E)(s,"core.mountPoint");if(o){const i=(0,be.E)(s,"core.plugin");e.push({routeRef:o,plugin:i})}Ys(s.props.children,e)}),e}const Hr=Vn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,s,o)=>{if(o?.isElementAncestor)return o;if(s?.props.element===e)return{...o,isElementAncestor:!0};const i=e.props?.path,c=(0,be.E)(e,"core.mountPoint");if(c&&i)throw new Error(`Path property may not be set directly on a routable extension "${Yn(e)}"`);const S=o?.obj?.children??r.objects;if(i!==void 0){if(typeof i!="string")throw new Error(`Element path must be a string at "${Yn(e)}"`);const C=i.startsWith("/")?i.slice(1):i,R=e.props.element;if((0,be.E)(e,"core.gatherMountPoints")){if(R)throw new Error(`Mount point gatherers may not have an element prop "${Yn(e)}"`);const W={path:C,element:"gathered",routeRefs:new Set,caseSensitive:!!e.props?.caseSensitive,children:[Gn],plugins:new Set};return S.push(W),{obj:W,gatherPath:C,routeRef:o?.routeRef,gatherRouteRef:o?.routeRef}}if(R){const[W,..._]=Ys(R);if(_.length>0)throw new Error(`Route element with path "${i}" may not contain multiple routable extensions`);if(!W)return o;const{routeRef:ct,plugin:rt}=W,dt={path:C,element:"mounted",routeRefs:new Set([ct]),caseSensitive:!!e.props?.caseSensitive,children:[Gn],plugins:Gs(rt)};return S.push(dt),r.paths.set(ct,C),r.parents.set(ct,o?.routeRef),{obj:dt,routeRef:ct??o?.routeRef,gatherPath:C,gatherRouteRef:o?.gatherRouteRef}}}if(c){if(o?.gatherPath===void 0)throw new Error(`Routable extension "${Yn(e)}" with mount point "${c}" must be assigned a path`);o?.obj?.routeRefs.add(c);const C=(0,be.E)(e,"core.plugin");return C&&o?.obj?.plugins.add(C),r.paths.set(c,o.gatherPath),r.parents.set(c,o?.gatherRouteRef),{...o,routeRef:c}}return o}),Vr=Vn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,s,o)=>{if(s?.props.element===e)return o;let i=o?.obj,c=o?.routeRef,S=o?.sticky;const C=e.props?.path,R=i?.children??r.objects,W=!!e.props?.caseSensitive;let _=o?.path;if((0,be.E)(e,"core.gatherMountPoints")){if(!C)throw new Error("Mount point gatherer must have a path");_=C}const ct=e.props?.element;let rt=(0,be.E)(e,"core.mountPoint");if(!rt&&(0,d.isValidElement)(ct)&&(rt=(0,be.E)(ct,"core.mountPoint")),rt){let Rt=C;if(_&&(Rt?_=void 0:Rt=_),!Rt)throw new Error("Mounted routable extension must have a path");r.paths.set(rt,Rt),c&&S?(r.parents.set(rt,c),C&&(c=rt,S=!1)):(r.parents.set(rt,c),c=rt),C?(i={caseSensitive:W,path:C,element:"mounted",routeRefs:new Set([rt]),children:[Gn],plugins:Gs((0,be.E)(e.props.element,"core.plugin"))},R.push(i)):i?.routeRefs.add(rt)}if((0,be.E)(e,"core.gatherMountPoints")&&(S=!0),(0,be.E)(e,"core.gatherMountPoints")){if(!C)throw new Error("Mount point gatherer must have a path");rt||(i={caseSensitive:W,path:C,element:"gathered",routeRefs:new Set,children:[Gn],plugins:o?.obj?.plugins||new Set},R.push(i))}return{obj:i,path:_,routeRef:c,sticky:S}}),Gr=Vn(()=>new Set,(r,e)=>{if(e.type===Vs){const s=e.props;r.add("with"in s?s.with:s.without)}});var Tn=t(21613),Yr=t(63544);const Pn=(0,Yr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function Qs(r){return r[Pn]==="absolute"}function Zs(r){return r[Pn]==="sub"}function Qr(r){return r[Pn]==="external"}function Qn(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var Zr=t(46155),Jr=t.n(Zr);function Xr(r,e,s){let o,i="";if(Qs(r))o=r;else if(Zs(r))o=r.parent,i=r.path;else if(Qr(r)){const C=s.get(r);if(!C)return[void 0,""];if(Qs(C))o=C;else if(Zs(C))o=C.parent,i=C.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${C}`)}else throw r[Pn]?new Error(`Unknown or invalid route ref type, ${r[Pn]}`):new Error(`Unknown object passed to useRouteRef, got ${r}`);if(!o)return[void 0,""];const c=e.get(o);if(c===void 0)return[void 0,""];const S=Qn(c,i);return[o,S]}function _r(r,e,s,o,i){const c=(0,Tn.ue)(i,e)??[],S=Array();let C=-1;for(let _=r;_&&(C=c.findIndex(ct=>ct.route.routeRefs.has(_)),C===-1);_=o.get(_))S.unshift(_);S.length===0&&(C-=1);const R=C===-1?"":c[C].pathname,W=S.slice(0,-1).map(_=>{const ct=s.get(_);if(ct===void 0)throw new Error(`No path for ${_}`);if(ct.includes(":"))throw new Error(`Cannot route to ${r} with parent ${_} as it has parameters`);return ct});return`${Qn(R,...W)}/`}class qr{routePaths;routeParents;routeObjects;routeBindings;appBasePath;constructor(e,s,o,i,c){this.routePaths=e,this.routeParents=s,this.routeObjects=o,this.routeBindings=i,this.appBasePath=c}resolve(e,s){const[o,i]=Xr(e,this.routePaths,this.routeBindings);if(!o)return;let c;typeof s=="string"?c=this.trimPath(s):s.pathname?c={...s,pathname:this.trimPath(s.pathname)}:c=s;const S=this.appBasePath+_r(o,c,this.routePaths,this.routeParents,this.routeObjects);return(...[R])=>{const W=R&&Jr()(R,_=>typeof _=="string"?_.replaceAll(/[&?#;\/]/g,ct=>encodeURIComponent(ct)):_);return Qn(S,(0,Tn.tW)(i,W))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}}const to=(0,ie.tK)("routing-context"),eo=({routePaths:r,routeParents:e,routeObjects:s,routeBindings:o,basePath:i="",children:c})=>{const S=new qr(r,e,s,o,i),C=(0,Re.B)({1:S});return(0,a.jsx)(to.Provider,{value:C,children:c})};function no(r,e){const s=new Set(e.values());s.delete(void 0);for(const o of e.keys()){if(s.has(o))continue;let i=o,c="";for(;i;){const C=r.get(i);if(C===void 0)throw new Error(`No path for ${i}`);c=Qn(C,c),i=e.get(i)}const S=c.match(/:(\w+)/g);if(S){for(let C=0;C<S.length;C++)for(let R=C+1;R<S.length;R++)if(S[R]===S[C])throw new Error(`Parameter ${S[R]} is duplicated in path ${c}`)}}}function so(r,e){for(const s of e)if(s.externalRoutes){for(const[o,i]of Object.entries(s.externalRoutes))if(!i.optional&&!r.has(i))throw new Error(`External route '${o}' of the '${s.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const ro=(0,ie.tK)("app-context"),oo=({appContext:r,children:e})=>{const s=(0,Re.B)({1:r});return(0,a.jsx)(ro.Provider,{value:s,children:e})},Js="app",ao=`${Js}-auth-cookie-expires-at`,io=5*6e4,Xs=5e3,co=2,lo=5*6e4;function uo({discoveryApi:r,fetchApi:e,errorApi:s}){let o=!1,i,c=!0,S=Xs;const C="BroadcastChannel"in window?new BroadcastChannel(ao):void 0,R=rt=>{const dt=(1+3*Math.random())*6e4;return Math.max(rt-Date.now(),io)-dt},W=async()=>{try{const dt=`${await r.getBaseUrl(Js)}/.backstage/auth/v1/cookie`,Rt=await e.fetch(dt,{credentials:"include"});if(!Rt.ok)throw new Error(`Request failed with status ${Rt.status} ${Rt.statusText}, see request towards ${dt} for more details`);const Vt=await Rt.json();if(!Vt.expiresAt)throw new Error("No expiration date in response");const Oe=Date.parse(Vt.expiresAt);if(Number.isNaN(Oe))throw new Error("Invalid expiration date in response");c=!0,C?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(Oe).toISOString()}}),ct(R(Oe))}catch(rt){c?(c=!1,S=Xs):(S=Math.min(lo,S*co),console.error("Session cookie refresh failed",rt),s.post(new Error("Session refresh failed, see developer console for details"))),ct(S)}},_=rt=>{const{data:dt}=rt;if(!(dt===null||typeof dt!="object")&&"action"in dt&&dt.action==="COOKIE_REFRESH_SUCCESS"){const Rt=Date.parse(dt.payload.expiresAt);if(Number.isNaN(Rt)){console.warn("Received invalid expiration from session refresh channel");return}ct(R(Rt))}};function ct(rt){o||(i&&clearTimeout(i),i=setTimeout(W,rt))}return C?.addEventListener("message",_),W(),()=>{o=!0,i&&clearTimeout(i),C?.removeEventListener("message",_),C?.close()}}function _s(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Ls(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class ho{target;waitForTarget;resolveTarget=()=>{};signOutTargetUrl="/";#t;constructor(){this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}setTarget(e,s){this.target=e,this.signOutTargetUrl=s.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw _s("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ls("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw _s("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Ls("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(e=>e.getProfileInfo())}async getBackstageIdentity(){const e=await this.waitForTarget.then(s=>s.getBackstageIdentity());return e.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${e.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),e}async getCredentials(){return this.waitForTarget.then(e=>e.getCredentials())}async getIdToken(){return this.waitForTarget.then(e=>{if(!e.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Ls("getIdToken"),e.getIdToken()})}async signOut(){await this.waitForTarget.then(e=>e.signOut()),await this.#t?.(),window.location.href=this.signOutTargetUrl}enableCookieAuth(e){if(this.#t)return;const s=uo(e);this.#t=async()=>{s();const o=await e.discoveryApi.getBaseUrl("app");try{await fetch(`${o}/.backstage/auth/v1/cookie`,{method:"DELETE",credentials:"include"})}catch{}}}}var go=t(1394);function po(r,e,s){if(r!==void 0){const i=s.find(c=>c.id===r);if(i)return i}if(e){const i=s.find(c=>c.variant==="dark");if(i)return i}const o=s.find(i=>i.variant==="light");return o||s[0]}const fo=()=>{const r=(0,d.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,s]=(0,d.useState)(r.matches);return(0,d.useEffect)(()=>{const o=i=>{s(i.matches)};return r.addListener(o),()=>{r.removeListener(o)}},[r]),e};function qs({children:r}){const e=(0,On.gf)(Hn),s=(0,go.A)(e.activeThemeId$(),e.getActiveThemeId()),o=window.matchMedia?fo():!1,i=po(s,o,e.getInstalledThemes());if(!i)throw new Error("App has no themes");return(0,a.jsx)(i.Provider,{children:r})}const tr=async()=>mo();function mo(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!e)throw new Error("No static configuration provided");if(!Array.isArray(e))throw new Error("Static configuration has invalid format");const s=e.slice(),o=document.querySelectorAll('script[type="backstage.io/config"]');if(o.length>0)for(const c of o)try{const S=c.textContent;if(!S)throw new Error("tag is empty");let C;try{C=JSON.parse(S)}catch(R){throw new Error(`failed to parse config; ${R}`)}if(!Array.isArray(C))throw new Error("data is not an array");s.push(...C)}catch(S){throw new Error(`Failed to load config from script tag, ${S.message}`)}else if(r!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const c=JSON.parse(r);Array.isArray(c)?s.push(...c):s.push({data:c,context:"env"})}catch(c){throw new Error(`Failed to load runtime configuration, ${c}`)}const i=window.__APP_CONFIG__;return i&&s.push({context:"window",data:i}),s}class vo{apis=[];add(e,s){return this.apis.push([e.id,s]),s}build(){return new pn(new Map(this.apis))}}class pn{apis;static builder(){return new vo}static from(e){return new pn(new Map(e.map(([s,o])=>[s.id,o])))}static with(e,s){return new pn(new Map([[e.id,s]]))}constructor(e){this.apis=e}with(e,s){return new pn(new Map([...this.apis,[e.id,s]]))}get(e){return this.apis.get(e.id)}}function yo(r){const e=new Map,s=new Map;for(const o of r){for(const[i,c]of Object.entries(o.routes??{})){const S=`${o.getId()}.${i}`;if(e.has(S))throw new Error(`Unexpected duplicate route '${S}'`);e.set(S,c)}for(const[i,c]of Object.entries(o.externalRoutes??{})){const S=`${o.getId()}.${i}`;if(s.has(S))throw new Error(`Unexpected duplicate external route '${S}'`);s.set(S,c)}}return{routes:e,externalRoutes:s}}function Eo(r,e,s){const o=yo(s),i=new Map,c=new Set;r&&r({bind:(R,W)=>{for(const[_,ct]of Object.entries(W)){const rt=R[_];if(!rt)throw new Error(`Key ${_} is not an existing external route`);if(!ct&&!rt.optional)throw new Error(`External route ${_} is required but was ${ct===!1?"disabled":"not provided"}`);ct?i.set(rt,ct):ct===!1&&c.add(rt)}}});const S=e.getOptionalConfig("app.routes.bindings")?.get();if(S)for(const[C,R]of Object.entries(S)){if(!Ao(R))throw new Error(`Invalid config at app.routes.bindings['${C}'], value must be a non-empty string or false`);const W=o.externalRoutes.get(C);if(!W)throw new Error(`Invalid config at app.routes.bindings, '${C}' is not a valid external route`);if(!(i.has(W)||c.has(W)))if(R===!1)c.add(W);else{const _=o.routes.get(R);if(!_)throw new Error(`Invalid config at app.routes.bindings['${C}'], '${R}' is not a valid route`);i.set(W,_)}}for(const C of o.externalRoutes.values())if(!i.has(C)&&!c.has(C)){const R="getDefaultTarget"in C?C.getDefaultTarget():void 0;if(R){const W=o.routes.get(R);W&&i.set(C,W)}}return i}function Ao(r){return!!(r===!1||typeof r=="string"&&r)}function wn(){const[r]=(0,m.AV)((0,a.jsx)(m.qh,{index:!0,element:(0,a.jsx)("div",{})}));return!r.index}const er=(0,d.createContext)(void 0);var nr=t(82266),sr=t(93368),xo=t(25862);const Co=(r,e)=>{try{const o=(0,Tn.ue)(e,{pathname:r})?.filter(R=>R?.route.routeRefs?.size>0).pop(),i=o?.route;if(!i||i.path===""&&r!=="/")return;let c;i.routeRefs.size===1&&(c=i.routeRefs.values().next().value);let S;i.plugins.size===1&&(S=i.plugins.values().next().value);const C=Object.entries(o?.params||{}).reduce((R,[W,_])=>(_!==void 0&&W!=="*"&&(R[W]=_),R),{});return{extension:"App",pluginId:S?.getId()||"root",...c?{routeRef:c.id}:{},_routeNodeType:i.element,params:C}}catch{return}},bo=({pathname:r,search:e,hash:s,attributes:o})=>{const i=(0,sr.s)();return(0,d.useEffect)(()=>{i.captureEvent("navigate",`${r}${e}${s}`,{attributes:o})},[i,r,e,s,o]),null},Zn=({routeObjects:r})=>{const{pathname:e,search:s,hash:o}=(0,m.zy)(),{params:i,...c}=Co(e,r)||{params:{}};return(0,a.jsx)(xo.Ig,{attributes:c,children:(0,a.jsx)(bo,{pathname:e,search:s,hash:o,attributes:i})})};function So(r){return wn()?Ms(r):""}function Ms(r){let{pathname:e}=new URL(r.getOptionalString("app.baseUrl")??"/","http://sample.dev");return e=e.replace(/\/*$/,""),e}function rr({component:r,appIdentityProxy:e,children:s}){const[o,i]=(0,d.useState)(),c=(0,On.gf)(kt.U),S=Ms(c);return o?(e.setTarget(o,{signOutTargetUrl:S||"/"}),(0,a.jsx)(a.Fragment,{children:s})):(0,a.jsx)(r,{onSignInSuccess:i})}function or(r){const{Router:e,SignInPage:s}=(0,nr.n)().getComponents(),o=(0,On.gf)(kt.U),i=Ms(o),c=`${i}/*`,S=(0,d.useContext)(er);if(!S)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:C,appIdentityProxy:R}=S;return s?wn()?(0,a.jsxs)(e,{children:[(0,a.jsx)(Zn,{routeObjects:C}),(0,a.jsx)(rr,{component:s,appIdentityProxy:R,children:(0,a.jsx)(m.BV,{children:(0,a.jsx)(m.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(Zn,{routeObjects:C}),(0,a.jsx)(rr,{component:s,appIdentityProxy:R,children:r.children})]}):(R.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:i||"/"}),wn()?(0,a.jsxs)(e,{children:[(0,a.jsx)(Zn,{routeObjects:C}),(0,a.jsx)(m.BV,{children:(0,a.jsx)(m.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(Zn,{routeObjects:C}),r.children]}))}(0,be.h)(or,"core.type","AppRouter");const Rn="language",Ye="en";class Jn{static create(e){const s=e?.availableLanguages??[Ye];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(Ye))throw new Error(`Supported languages must include '${Ye}'`);const o=e?.defaultLanguage??Ye;if(!s.includes(o))throw new Error(`Initial language must be one of the supported languages, got '${o}'`);return new Jn(s,o)}static createWithStorage(e){const s=Jn.create(e);if(!window.localStorage)return s;const o=window.localStorage.getItem(Rn),{languages:i}=s.getAvailableLanguages();return o&&i.includes(o)&&s.setLanguage(o),s.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(Rn)&&window.localStorage.setItem(Rn,c)}),window.addEventListener("storage",c=>{if(c.key===Rn){const S=localStorage.getItem(Rn)??void 0;S&&s.setLanguage(S)}}),s}#t;#n;#e;constructor(e,s){this.#t=e,this.#n=s,this.#e=new K({language:this.#n})}getAvailableLanguages(){return{languages:this.#t.slice()}}setLanguage(e){const s=e??Ye;if(s!==this.#n){if(s&&!this.#t.includes(s))throw new Error(`Failed to change language to '${s}', available languages are '${this.#t.join("', '")}'`);this.#n=s,this.#e.next({language:s})}}getLanguage(){return{language:this.#n}}language$(){return this.#e}}var Oo=t(47304),To=t(99833),ar=t(93184);function ir(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}class Po{onLoad;#t;#n;#e;constructor(e){this.onLoad=e,this.#t=new Set,this.#n=new Map,this.#e=new Map}addTranslationResource(e){const s=(0,To.Y)(e);for(const o of s.resources){const i=this.#s(o.language,s.id);this.#e.has(i)||this.#e.set(i,o.loader)}}#s(e,s){return`${e}/${s}`}needsLoading(e,s){const o=this.#s(e,s);return this.#e.get(o)?!this.#t.has(o):!1}async load(e,s){const o=this.#s(e,s),i=this.#e.get(o);if(!i||this.#t.has(o))return;const c=this.#n.get(o);if(c){await c;return}const S=i().then(C=>{this.onLoad({language:e,namespace:s,messages:C.messages}),this.#t.add(o)},C=>{throw this.#t.add(o),C});this.#n.set(o,S),await S}}class js{static create(e){const{languages:s}=e.languageApi.getAvailableLanguages(),o=(0,Oo.Q_)({fallbackLng:Ye,supportedLngs:s,interpolation:{escapeValue:!1},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(o.init(),!o.isInitialized)throw new Error("i18next was unexpectedly not initialized");const{language:i}=e.languageApi.getLanguage();i!==Ye&&o.changeLanguage(i);const c=new Po(R=>{o.addResourceBundle(R.language,R.namespace,ir(R.messages),!1,!0)}),S=e?.resources||[];for(let R=S.length-1;R>=0;R--){const W=S[R];W.$$type==="@backstage/TranslationResource"?c.addTranslationResource(W):W.$$type==="@backstage/TranslationMessages"&&o.addResourceBundle(Ye,W.id,ir(W.messages),!0,!1)}const C=new js(o,c,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:R})=>{C.#o(R)}),C}#t;#n;#e;#s=new Set;#r=new Set;constructor(e,s,o){this.#t=e,this.#n=s,this.#e=o}getTranslation(e){const s=(0,ar.v)(e);return this.#i(s),this.#a(s)}translation$(e){const s=(0,ar.v)(e);return this.#i(s),new(Q())(o=>{let i={};const c=()=>{i={};const C=i;this.#n.load(this.#e,s.id).then(()=>{if(C===i){const R=this.#a(s);R.ready&&o.next(R)}},R=>{C===i&&o.error(Array.isArray(R)?R[0]:R)})},S=()=>{const C=this.#a(s);C.ready?o.next(C):c()};return this.#n.needsLoading(this.#e,s.id)&&c(),this.#r.add(S),()=>{this.#r.delete(S)}})}#o(e){this.#e!==e&&(this.#e=e,this.#t.changeLanguage(e),this.#r.forEach(s=>s()))}#a(e){return this.#n.needsLoading(this.#e,e.id)?{ready:!1}:{ready:!0,t:this.#t.getFixedT(null,e.id)}}#i(e){if(this.#s.has(e.id))return;this.#s.add(e.id);const s=e.getDefaultMessages();this.#t.addResourceBundle(Ye,e.id,s,!0,!1);const o=e.getDefaultResource();o&&this.#n.addTranslationResource(o)}}function cr(r){const e=new URL(r);return e.protocol=document.location.protocol,e.hostname=document.location.hostname,e.port=document.location.port,e.toString().replace(/\/$/,"")}function wo(r){const e=hn.fromConfigs(r),s=e.getOptionalString("app.baseUrl"),o=e.getOptionalString("backend.baseUrl");let i=r,c,S;if(s&&o){const C=new URL(s).origin,R=new URL(o).origin;if(C===R){const W=cr(o);o!==W&&(c=W)}}if(s){const C=cr(s);s!==C&&(S=C)}return(S||c)&&(i=i.concat({data:{app:S&&{baseUrl:S},backend:c&&{baseUrl:c}},context:"relative-resolver"})),i}function Ro(){return(document.querySelector('meta[name="backstage-app-mode"]')?.getAttribute("content")??"public")==="protected"}function Io(r,e,s){const o=!!r,i=(0,ue.A)(r||(()=>Promise.resolve([])));let c;if(o&&i.loading){const{Progress:R}=e;c=(0,a.jsx)(R,{})}else if(i.error){const{BootErrorPage:R}=e;c=(0,a.jsx)(R,{step:"load-config",error:i.error})}const{ThemeProvider:S=qs}=e;return c?{node:(0,a.jsx)(qe,{apis:pn.with(Hn,s),children:(0,a.jsx)(S,{children:c})})}:{api:hn.fromConfigs(i.value?.length?wo(i.value):[])}}class Do{app;constructor(e){this.app=e}getPlugins(){return this.app.getPlugins()}getSystemIcon(e){return this.app.getSystemIcon(e)}getSystemIcons(){return this.app.getSystemIcons()}getComponents(){return this.app.getComponents()}}class Lo{apiHolder;configApi;apis;icons;plugins;featureFlags;components;themes;configLoader;defaultApis;bindRoutes;appLanguageApi;translationResources;appIdentityProxy=new ho;apiFactoryRegistry;constructor(e){this.apis=e.apis??[],this.icons=e.icons,this.plugins=new Set(e.plugins??[]),this.featureFlags=e.featureFlags??[],this.components=e.components,this.themes=e.themes,this.configLoader=e.configLoader??tr,this.defaultApis=e.defaultApis??[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new Nr,this.appLanguageApi=Jn.createWithStorage({defaultLanguage:e.__experimentalTranslations?.defaultLanguage,availableLanguages:e.__experimentalTranslations?.availableLanguages}),this.translationResources=e.__experimentalTranslations?.resources??[]}getPlugins(){return Array.from(this.plugins)}getSystemIcon(e){return this.icons[e]}getSystemIcons(){return this.icons}getComponents(){return this.components}createRoot(e){const s=this.getProvider();return()=>(0,a.jsx)(s,{children:e})}#t=!1;getProvider(){if(this.#t)throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");this.#t=!0;const e=new Do(this);let s,o;return({children:c})=>{const S=(0,d.useRef)(!0),C=(0,d.useMemo)(()=>zn.createWithStorage(this.themes),[]),{routing:R,featureFlags:W}=(0,d.useMemo)(()=>{const Vt=wn();Vt&&console.warn(`
|
|
3
|
+
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"},supportButton:{title:"Support",close:"Close"},table:{filter:{title:"Filters",clearAll:"Clear all"}},alertDisplay:{message_one:"({{ count }} older message)",message_other:"({{ count }} older messages)"},autoLogout:{stillTherePrompt:{title:"Logging out due to inactivity",buttonText:"Yes! Don't log me out"}},proxiedSignInPage:{title:"You do not appear to be signed in. Please try reloading the browser page."}}})},25862:(H,b,t)=>{"use strict";t.d(b,{Ig:()=>u,pn:()=>h});var n=t(31085),a=t(43836),d=t(10602),x=t(14041);const m=(0,a.tK)("analytics-context"),h=()=>{const p=(0,x.useContext)(m);if(p===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const y=p.atVersion(1);if(y===void 0)throw new Error("No context found for version 1.");return y},u=p=>{const{attributes:y,children:v}=p,T={...h(),...y},P=(0,d.B)({1:T});return(0,n.jsx)(m.Provider,{value:P,children:v})};function g(p,y){const v=A=>_jsx(u,{attributes:y,children:_jsx(p,{...A})});return v.displayName=`WithAnalyticsContext(${p.displayName||p.name||"Component"})`,v}},67237:(H,b,t)=>{"use strict";t.d(b,{J:()=>x,t:()=>d});var n=t(63544);const a=(0,n.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),d="_ROUTABLE-EXTENSION-RENDERED";class x{analyticsApi;context;constructor(h,u={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=h,this.context=u,a.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{a.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender}),a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),a.beforeUnloadRegistered=!0)}setContext(h){this.context=h}captureEvent(h,u,{value:g,attributes:p}={}){const{_routeNodeType:y,...v}=this.context;if(h===d){a.mostRecentGatheredNavigation&&(a.mostRecentRoutableExtensionRender={context:{...v,extension:"App"}});return}if(a.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender})}catch(A){console.warn("Error during analytics event capture. %o",A)}a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0}if(h==="navigate"&&y==="gathered"&&v.pluginId==="root"){a.mostRecentGatheredNavigation={action:h,subject:u,value:g,attributes:p,context:v};return}try{this.analyticsApi.captureEvent({action:h,subject:u,value:g,attributes:p,context:v})}catch(A){console.warn("Error during analytics event capture. %o",A)}}}},93368:(H,b,t)=>{"use strict";t.d(b,{s:()=>u});var n=t(25862),a=t(72427),d=t(99303),x=t(14041),m=t(67237);function h(){try{return(0,a.gf)(d.c)}catch{return{captureEvent:()=>{}}}}function u(){const g=(0,x.useRef)(null),p=(0,n.pn)(),y=h();function v(){return g.current===null&&(g.current=new m.J(y)),g.current}const A=v();return A.setContext(p),A}},36017:(H,b,t)=>{"use strict";t.d(b,{k:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.alert"})},99303:(H,b,t)=>{"use strict";t.d(b,{c:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.analytics"})},65461:(H,b,t)=>{"use strict";t.d(b,{U:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.config"})},57405:(H,b,t)=>{"use strict";t.d(b,{I:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.discovery"})},39837:(H,b,t)=>{"use strict";t.d(b,{m:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.error"})},63636:(H,b,t)=>{"use strict";t.d(b,{B:()=>d,S:()=>a});var n=t(55309),a=function(x){return x[x.None=0]="None",x[x.Active=1]="Active",x}({});const d=(0,n.y)({id:"core.featureflags"})},70795:(H,b,t)=>{"use strict";t.d(b,{a:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.fetch"})},16009:(H,b,t)=>{"use strict";t.d(b,{K:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.identity"})},56038:(H,b,t)=>{"use strict";t.d(b,{J:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.translation"})},55309:(H,b,t)=>{"use strict";t.d(b,{y:()=>a});class n{config;constructor(x){if(this.config=x,!x.id.split(".").flatMap(h=>h.split("-")).every(h=>h.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${x.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 a(d){return new n(d)}},12935:(H,b,t)=>{"use strict";t.d(b,{b:()=>n});function n(a,d){return"id"in a?{api:a,deps:{},factory:()=>d}:a}},72427:(H,b,t)=>{"use strict";t.d(b,{Q2:()=>m,gf:()=>h});var n=t(31085),a=t(14041),d=t(43836),x=t(97142);function m(){const g=(0,d.qO)("api-context");if(!g)throw new x.EH("API context is not available");const p=g.atVersion(1);if(!p)throw new x.EH("ApiContext v1 not available");return p}function h(g){const y=m().get(g);if(!y)throw new x.EH(`No implementation available for ${g}`);return y}function u(g){return function(y){const v=T=>{const P=m(),w={};for(const O in g)if(g.hasOwnProperty(O)){const j=g[O],F=P.get(j);if(!F)throw new NotImplementedError(`No implementation available for ${j}`);w[O]=F}return _jsx(y,{...T,...w})},A=y.displayName||y.name||"Component";return v.displayName=`withApis(${A})`,v}}},82266:(H,b,t)=>{"use strict";t.d(b,{n:()=>a});var n=t(43836);const a=()=>{const d=(0,n.qO)("app-context");if(!d)throw new Error("App context is not available");const x=d.atVersion(1);if(!x)throw new Error("AppContext v1 not available");return x}},19402:(H,b,t)=>{"use strict";t.d(b,{E:()=>m,h:()=>x});var n=t(63544);const a=(0,n.Q)("component-data-store",()=>new WeakMap),d="__backstage_data";function x(h,u,g){const p=h;let y=p[d]??a.get(h);if(y||(y={map:new Map},Object.defineProperty(p,d,{enumerable:!1,configurable:!0,writable:!1,value:y}),a.set(h,y)),y.map.has(u)){const v=h.displayName||h.name;throw new Error(`Attempted to attach duplicate data "${u}" to component "${v}"`)}y.map.set(u,g)}function m(h,u){if(!h)return;const g=h.type;if(!g)return;const p=g[d]??a.get(g);if(p)return p.map.get(u)}},88758:(H,b,t)=>{"use strict";t.d(b,{NC:()=>v,zZ:()=>A,QJ:()=>y});var n=t(31085),a=t(14041),d=t(93368),x=t(25862),m=t(82266),h=t(9222),u=t(19402);class g extends a.Component{static getDerivedStateFromError(P){return{error:P}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:P}=this.state,{app:w,plugin:O}=this.props,{ErrorBoundaryFallback:j}=w.getComponents();return P?(0,n.jsx)(j,{error:P,resetError:this.handleErrorReset,plugin:O}):this.props.children}}var p=t(67237);function y(T){const{component:P,mountPoint:w,name:O}=T;return A({component:{lazy:()=>P().then(j=>{const F=Z=>{const G=(0,d.s)();try{(0,h.S)(w)}catch(N){if(typeof N=="object"&&N!==null){const{message:Q}=N;if(typeof Q=="string"&&Q.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 N}return(0,a.useEffect)(()=>{G.captureEvent(p.t,"")},[G]),(0,n.jsx)(j,{...Z})},L=O||j.displayName||j.name||"LazyComponent";return F.displayName=`RoutableExtension(${L})`,F},j=>L=>{const Z=(0,m.n)(),{BootErrorPage:G}=Z.getComponents();return(0,n.jsx)(G,{step:"load-chunk",error:j})})},data:{"core.mountPoint":w},name:O})}function v(T){const{component:P,name:w}=T;return A({component:P,name:w})}function A(T){const{data:P={},name:w}=T;w||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let O;if("lazy"in T.component){const F=T.component.lazy;O=(0,a.lazy)(()=>F().then(L=>({default:L})))}else O=T.component.sync;const j=w||O.displayName||O.name||"Component";return{expose(F){const L=Z=>{const G=(0,m.n)(),{Progress:N}=G.getComponents(),Q=P?.["core.mountPoint"];return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(N,{}),children:(0,n.jsx)(g,{app:G,plugin:F,children:(0,n.jsx)(x.Ig,{attributes:{pluginId:F.getId(),...w&&{extension:w},...Q&&{routeRef:Q.id}},children:(0,n.jsx)(O,{...Z})})})})};(0,u.h)(L,"core.plugin",F),(0,u.h)(L,"core.extensionName",w);for(const[Z,G]of Object.entries(P))(0,u.h)(L,Z,G);return L.displayName=`Extension(${j})`,L}}}},82442:(H,b,t)=>{"use strict";t.d(b,{O:()=>u});var n=t(14041),a=t(19402),d=t(72427),x=t(63636);function m(g,p,y,v){return n.Children.toArray(g).flatMap(A=>{if(!(0,n.isValidElement)(A))return[];if(A.type===n.Fragment)return m(A.props.children,p,y,v);if((0,a.E)(A,"core.featureFlagged")){const T=A.props;return("with"in T?p.isActive(T.with):!p.isActive(T.without))?m(A.props.children,p,y,v):[]}if(y===void 0||y(A))return[A];if(v)throw new Error(v);return m(A.props.children,p,y,v)})}class h{node;featureFlagsApi;constructor(p,y){this.node=p,this.featureFlagsApi=y}selectByComponentData(p){const y=m(this.node,this.featureFlagsApi,v=>(0,a.E)(v,p.key)!==void 0,p.withStrictError);return new h(y,this.featureFlagsApi)}findComponentData(p){return m(this.node,this.featureFlagsApi,v=>(0,a.E)(v,p.key)!==void 0).map(v=>(0,a.E)(v,p.key)).filter(v=>v!==void 0)}getElements(){return m(this.node,this.featureFlagsApi)}}function u(g,p,y=[]){const v=(0,d.gf)(x.B),A=new h(g,v);return(0,n.useMemo)(()=>p(A),[g,...y])}},9803:(H,b,t)=>{"use strict";t.d(b,{i:()=>a});class n{config;constructor(x){this.config=x}getId(){return this.config.id}getApis(){return this.config.apis??[]}getFeatureFlags(){return this.config.featureFlags?.slice()??[]}get routes(){return this.config.routes??{}}get externalRoutes(){return this.config.externalRoutes??{}}provide(x){return x.expose(this)}toString(){return`plugin{${this.config.id}}`}}function a(d){return new n(d)}},34569:(H,b,t)=>{"use strict";t.d(b,{H:()=>d});var n=t(59598);class a{id;params;[x=n.b];constructor(h,u){this.id=h,this.params=u,this[x]="absolute"}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function d(m){return new a(m.id,m.params??[])}var x},59598:(H,b,t)=>{"use strict";t.d(b,{b:()=>a});var n=t(63544);const a=(0,n.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:(H,b,t)=>{"use strict";t.d(b,{S:()=>x});var n=t(14041),a=t(18690),d=t(43836);function x(m){const{pathname:h}=(0,a.zy)(),u=(0,d.qO)("routing-context");if(!u)throw new Error("Routing context is not available");const g=u.atVersion(1),p=(0,n.useMemo)(()=>g&&g.resolve(m,{pathname:h}),[g,m,h]);if(!u)throw new Error("useRouteRef used outside of routing context");if(!g)throw new Error("RoutingContext v1 not available");const y="optional"in m&&m.optional;if(!p&&!y)throw new Error(`No path for ${m}`);return p}},93184:(H,b,t)=>{"use strict";t.d(b,{h:()=>x,v:()=>m});var n=t(99833);function a(h){const u=new Array;function g(p,y){for(const[v,A]of Object.entries(p))typeof A=="string"?u.push([y+v,A]):g(A,`${y}${v}.`)}return g(h,""),Object.fromEntries(u)}class d{#t;#n;#e;constructor(u){this.#t=u.id,this.#n=a(u.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#t}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#n}setDefaultResource(u){this.#e=u}getDefaultResource(){return this.#e}toString(){return`TranslationRef{id=${this.id}}`}}function x(h){const u=new d(h);return h.translations&&u.setDefaultResource((0,n.o)({ref:u,translations:h.translations})),u}function m(h){const u=h;if(u.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${u.$$type}'`);if(u.version!=="v1")throw new Error(`Invalid translation ref, bad version '${u.version}'`);return u}},99833:(H,b,t)=>{"use strict";t.d(b,{Y:()=>n,o:()=>a});function n(d){const x=d;if(x.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${x.$$type}'`);if(x.version!=="v1")throw new Error(`Invalid translation resource, bad version '${x.version}'`);return x}function a(d){return{$$type:"@backstage/TranslationResource",version:"v1",id:d.ref.id,resources:Object.entries(d.translations).map(([x,m])=>({language:x,loader:()=>m().then(h=>{const u=h.default;return{messages:u?.$$type==="@backstage/TranslationMessages"?u.messages:u}})}))}}},87849:(H,b,t)=>{"use strict";t.d(b,{i:()=>h});var n=t(14041),a=t(72427),d=t(39837),x=t(56038);const m=new WeakSet,h=u=>{const g=(0,a.gf)(d.m),p=(0,a.gf)(x.J),[y,v]=(0,n.useState)(()=>p.getTranslation(u)),A=(0,n.useMemo)(()=>p.translation$(u),[p,u]),T=(0,n.useCallback)(w=>{if(!m.has(u)){const O=`Failed to load translation resource '${u.id}'; caused by ${w}`;console.error(O),g.post(new Error(O)),m.add(u)}},[g,u]);(0,n.useEffect)(()=>{const w=A.subscribe({next(O){O.ready&&v(O)},error(O){T(O)}});return()=>{w.unsubscribe()}},[A,T]);const P=(0,n.useRef)(!0);if((0,n.useEffect)(()=>{P.current?P.current=!1:v(p.getTranslation(u))},[p,u]),!y.ready)throw new Promise(w=>{const O=A.subscribe({next(j){j.ready&&(O.unsubscribe(),w())},error(j){O.unsubscribe(),T(j),w()}})});return{t:y.t}}},70835:(H,b,t)=>{"use strict";t.d(b,{o:()=>d});var n=t(59750);async function a(x){try{const m=await x.text();if(m){if(x.headers.get("content-type")?.startsWith("application/json"))try{const h=JSON.parse(m);if(h.error&&h.response)return h}catch{}return{error:{name:"Error",message:`Request failed with status ${x.status} ${x.statusText}, ${m}`},response:{statusCode:x.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${x.status} ${x.statusText}`},response:{statusCode:x.status}}}class d extends Error{response;body;cause;statusCode;statusText;static async fromResponse(m){const h=await a(m),u=h.response.statusCode||m.status,g=m.statusText,p=`Request failed with ${u} ${g}`,y=(0,n.cy)(h.error);return new d({message:p,response:m,data:h,cause:y,statusCode:u,statusText:g})}constructor(m){super(m.message),this.name="ResponseError",this.response=m.response,this.body=m.data,this.cause=m.cause,this.statusCode=m.statusCode,this.statusText=m.statusText}}},93007:(H,b,t)=>{"use strict";t.d(b,{b:()=>n});function n(d){if(typeof d!="object"||d===null||Array.isArray(d))return!1;const x=d;return!(typeof x.name!="string"||x.name===""||typeof x.message!="string")}function a(d){if(typeof d!="object"||d===null||Array.isArray(d))throw new Error(`Encountered invalid error, not an object, got '${d}'`);const x=d;if(typeof x.name!="string"||x.name==="")throw new Error(`Encountered error object without a name, got '${d}'`);if(typeof x.message!="string")throw new Error(`Encountered error object without a message, got '${d}'`)}},97142:(H,b,t)=>{"use strict";t.d(b,{m_:()=>u,EH:()=>y});var n=t(93007),a=t(59750);class d extends Error{cause;constructor(P,w){let O=P;if(w!==void 0){const j=(0,a.M5)(w);O?O+=`; caused by ${j}`:O=`caused by ${j}`}super(O),Error.captureStackTrace?.(this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,n.b)(w)?w:void 0}}class x extends null{name="InputError"}class m extends null{name="AuthenticationError"}class h extends null{name="NotAllowedError"}class u extends d{name="NotFoundError"}class g extends null{name="ConflictError"}class p extends null{name="NotModifiedError"}class y extends d{name="NotImplementedError"}class v extends null{}class A extends d{constructor(P,w){super(P,w),this.name=(0,n.b)(w)?w.name:"Error"}}},59750:(H,b,t)=>{"use strict";t.d(b,{M5:()=>h,cy:()=>m});var n=t(69655),a=t.n(n),d=t(93007);function x(u,g){const y={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(u)};return g?.includeStack||delete y.stack,y}function m(u){const g=(0,n.deserializeError)(u);return u.stack||(g.stack=void 0),g}function h(u){if((0,d.b)(u)){const g=String(u);return g!=="[object Object]"?g:`${u.name}: ${u.message}`}return`unknown error '${u}'`}},3347:(H,b,t)=>{"use strict";t.d(b,{L:()=>Ae,Y:()=>He});var n=t(59869);const a="amazonaws.com";function d(M){const l=M.getOptionalString("endpoint"),E=M.getOptionalBoolean("s3ForcePathStyle")??!1;let D,tt;if(l){try{const Jt=new URL(l);D=Jt.host,tt=Jt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${l}' is not a valid URL`)}if(tt!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${l}'`)}else D=a;const lt=M.getOptionalString("accessKeyId"),yt=M.getOptionalString("secretAccessKey")?.trim(),Wt=M.getOptionalString("roleArn"),Kt=M.getOptionalString("externalId");return{host:D,endpoint:l,s3ForcePathStyle:E,accessKeyId:lt,secretAccessKey:yt,roleArn:Wt,externalId:Kt}}function x(M){const l=M.map(d);return l.some(E=>E.host===a)||l.push({host:a}),l}class m{integrationConfig;static factory=({config:l})=>{const E=x(l.getOptionalConfigArray("integrations.awsS3")??[]);return(0,n.oS)(E.map(D=>new m(D)),D=>D.config.host)};get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return l}}const h="console.aws.amazon.com";function u(M){const l=M.getOptionalString("accessKeyId"),E=M.getOptionalString("secretAccessKey")?.trim(),D=M.getOptionalString("roleArn"),tt=M.getOptionalString("externalId"),lt=M.getString("region");return{host:M.getOptionalString("host")||`${lt}.${h}`,accessKeyId:l,secretAccessKey:E,roleArn:D,externalId:tt,region:lt}}function g(M){return M.map(u)}class p{integrationConfig;static factory=({config:l})=>{const E=g(l.getOptionalConfigArray("integrations.awsCodeCommit")??[]);return(0,n.oS)(E.map(D=>new p(D)),D=>D.config.host)};get type(){return"awsCodeCommit"}get config(){return this.integrationConfig}get title(){return this.integrationConfig.host}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){const D=new URL(l).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!D)throw new Error("");const[,tt]=D;return y(l,tt,"edit")}}function y(M,l,E){const D=E==="edit"?"files/edit":E;return M.replace(new RegExp(`/codesuite/codecommit/repositories/${l}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${l}/${D}/`)}const v="GB";class A{static fromRepoUrl(l){const E=new URL(l);let D,tt,lt;const yt=E.pathname.split("/").map(Mt=>decodeURIComponent(Mt));if(yt[2]==="_git"?(D=yt[1],tt=lt=yt[3]):yt[3]==="_git"?(D=yt[1],tt=yt[2],lt=yt[4]):yt[4]==="_git"&&(D=`${yt[1]}/${yt[2]}`,tt=yt[3],lt=yt[5]),!D||!tt||!lt)throw new Error("Azure URL must point to a git repository");const Wt=E.searchParams.get("path")??void 0;let Kt;const Jt=E.searchParams.get("version");if(Jt){if(Jt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Kt=Jt.slice(2)}return new A(E.origin,D,tt,lt,Wt,Kt)}#t;#n;#e;#s;#r;#o;constructor(l,E,D,tt,lt,yt){this.#t=l,this.#n=E,this.#e=D,this.#s=tt,this.#r=lt,this.#o=yt}#a=(...l)=>{const E=new URL(this.#t);return E.pathname=l.map(D=>encodeURIComponent(D)).join("/"),E};toRepoUrl(){let l;return this.#e===this.#s?l=this.#a(this.#n,"_git",this.#s):l=this.#a(this.#n,this.#e,"_git",this.#s),this.#r&&l.searchParams.set("path",this.#r),this.#o&&l.searchParams.set("version",v+this.#o),l.toString()}toFileUrl(){if(!this.#r)throw new Error("Azure URL must point to a specific path to be able to download a file");const l=this.#a(this.#n,this.#e,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("api-version","6.0"),l.searchParams.set("path",this.#r),this.#o&&l.searchParams.set("version",this.#o),l.toString()}toArchiveUrl(){const l=this.#a(this.#n,this.#e,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("recursionLevel","full"),l.searchParams.set("download","true"),l.searchParams.set("api-version","6.0"),this.#r&&l.searchParams.set("scopePath",this.#r),this.#o&&l.searchParams.set("version",this.#o),l.toString()}toCommitsUrl(){const l=this.#a(this.#n,this.#e,"_apis","git","repositories",this.#s,"commits");return l.searchParams.set("api-version","6.0"),this.#o&&l.searchParams.set("searchCriteria.itemVersion.version",this.#o),l.toString()}getOwner(){return this.#n}getProject(){return this.#e}getRepo(){return this.#s}getPath(){return this.#r}getRef(){return this.#o}}const T="dev.azure.com",P=["clientId","clientSecret","tenantId","personalAccessToken"],w=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function O(M){for(const l of w.entries()){const[E,D]=l,tt=P.filter(lt=>!D.includes(lt));if(D.every(lt=>M[lt]!==void 0)&&tt.every(lt=>M[lt]===void 0))return{kind:E,organizations:M.organizations,...D.reduce((lt,yt)=>(lt[yt]=M[yt],lt),{})}}throw new Error("is not a valid credential")}function j(M){const l=M.getOptionalString("host")??T;let E=M.getOptionalConfigArray("credentials")?.map(lt=>({organizations:lt.getOptionalStringArray("organizations"),personalAccessToken:lt.getOptionalString("personalAccessToken")?.trim(),tenantId:lt.getOptionalString("tenantId"),clientId:lt.getOptionalString("clientId"),clientSecret:lt.getOptionalString("clientSecret")?.trim()}));const D=M.getOptionalString("token")?.trim();if(M.getOptional("credential")!==void 0&&M.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(M.getOptional("token")!==void 0&&M.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(D!==void 0){const lt=[{personalAccessToken:D}];E=E?.concat(lt)??lt}if(M.getOptional("credential")!==void 0){const lt=[{organizations:M.getOptionalStringArray("credential.organizations"),token:M.getOptionalString("credential.token")?.trim(),tenantId:M.getOptionalString("credential.tenantId"),clientId:M.getOptionalString("credential.clientId"),clientSecret:M.getOptionalString("credential.clientSecret")?.trim()}];E=E?.concat(lt)??lt}if(!(0,n.HO)(l))throw new Error(`Invalid Azure integration config, '${l}' is not a valid host`);let tt;if(E!==void 0){const lt=E?.reduce((yt,Wt,Kt)=>{let Jt;try{O(Wt)}catch(Mt){Jt=Mt.message}return Jt!==void 0&&yt.push(`credential at position ${Kt+1} ${Jt}`),yt},Array.of()).concat(Object.entries(E.filter(yt=>yt.organizations!==void 0&&yt.organizations.length>0).reduce((yt,Wt,Kt)=>(Wt.organizations?.forEach(Jt=>{yt[Jt]||(yt[Jt]=[]),yt[Jt].push(Kt+1)}),yt),{})).filter(([yt,Wt])=>Wt.length>1).reduce((yt,[Wt,Kt])=>(yt.push(`organization ${Wt} is specified multiple times in credentials at positions ${Kt.slice(0,Kt.length-1).join(", ")} and ${Kt[Kt.length-1]}`),yt),Array.of()));if(lt?.length>0)throw new Error(`Invalid Azure integration config for ${l}: ${lt.join("; ")}`);if(tt=E.map(yt=>O(yt)),tt.some(yt=>yt.kind!=="PersonalAccessToken")&&l!==T)throw new Error(`Invalid Azure integration config for ${l}, only personal access tokens can be used with hosts other than ${T}`);if(tt.filter(yt=>yt.organizations===void 0||yt.organizations.length===0).length>1)throw new Error(`Invalid Azure integration config for ${l}, you cannot specify multiple credentials without organizations`)}return{host:l,credentials:tt}}function F(M){const l=M.map(j);return l.some(E=>E.host===T)||l.push({host:T}),l}class L{integrationConfig;static factory=({config:l})=>{const E=F(l.getOptionalConfigArray("integrations.azure")??[]);return(0,n.oS)(E.map(D=>new L(D)),D=>D.config.host)};constructor(l){this.integrationConfig=l}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const{url:E,base:D}=l;if((0,n.AY)(E))return E;try{const tt=A.fromRepoUrl(D),lt=new URL(D),yt=new URL(`https://a.com${tt.getPath()??""}`),Wt=new URL(E,yt).pathname;return lt.searchParams.set("path",Wt),l.lineNumber&&(lt.searchParams.set("line",String(l.lineNumber)),lt.searchParams.set("lineEnd",String(l.lineNumber+1)),lt.searchParams.set("lineStartColumn","1"),lt.searchParams.set("lineEndColumn","1")),lt.toString()}catch{return new URL(E,D).toString()}}resolveEditUrl(l){return l}}var Z=t(52536),G=t.n(Z);const N="bitbucket.org",Q="https://api.bitbucket.org/2.0";function q(M){const l=N,E=Q,D=M.getString("username"),tt=M.getString("appPassword")?.trim();return{host:l,apiBaseUrl:E,username:D,appPassword:tt}}function z(M){const l=M.map(q);return l.length===0&&l.push({host:N,apiBaseUrl:Q}),l}class et{integrationConfig;static factory=({config:l})=>{const E=z(l.getOptionalConfigArray("integrations.bitbucketCloud")??[]);return(0,n.oS)(E.map(D=>new et(D)),D=>D.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,n.ku)(l);if(l.lineNumber){const D=new URL(E);return D.hash=`lines-${l.lineNumber}`,D.toString()}return E}resolveEditUrl(l){const E=G()(l),D=new URL(l);return D.searchParams.set("mode","edit"),D.searchParams.set("at",E.ref),D.toString()}}var J=t(45250);const Y="bitbucket.org",V="https://api.bitbucket.org/2.0";function at(M){const l=M.getOptionalString("host")??Y;let E=M.getOptionalString("apiBaseUrl");const D=M.getOptionalString("token")?.trim(),tt=M.getOptionalString("username"),lt=M.getOptionalString("appPassword")?.trim();if(!(0,n.HO)(l))throw new Error(`Invalid Bitbucket integration config, '${l}' is not a valid host`);return E?E=(0,J.trimEnd)(E,"/"):l===Y?E=V:E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:D,username:tt,appPassword:lt}}function nt(M){const l=M.map(at);return l.some(E=>E.host===Y)||l.push({host:Y,apiBaseUrl:V}),l}class gt{integrationConfig;static factory=({config:l})=>{const E=nt(l.getOptionalConfigArray("integrations.bitbucket")??[...l.getOptionalConfigArray("integrations.bitbucketCloud")??[],...l.getOptionalConfigArray("integrations.bitbucketServer")??[]]);return(0,n.oS)(E.map(D=>new gt(D)),D=>D.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,n.ku)(l);if(!l.lineNumber)return E;const D=new URL(E);return this.integrationConfig.host==="bitbucket.org"?D.hash=`lines-${l.lineNumber}`:D.hash=`${l.lineNumber}`,D.toString()}resolveEditUrl(l){const E=G()(l),D=new URL(l);return D.searchParams.set("mode","edit"),D.searchParams.set("spa","0"),D.searchParams.set("at",E.ref),D.toString()}}function bt(M){const l=M.getString("host");let E=M.getOptionalString("apiBaseUrl");const D=M.getOptionalString("token")?.trim(),tt=M.getOptionalString("username"),lt=M.getOptionalString("password");if(!(0,n.HO)(l))throw new Error(`Invalid Bitbucket Server integration config, '${l}' is not a valid host`);return E?E=(0,J.trimEnd)(E,"/"):E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:D,username:tt,password:lt}}function xt(M){return M.map(bt)}class ht{integrationConfig;static factory=({config:l})=>{const E=xt(l.getOptionalConfigArray("integrations.bitbucketServer")??[]);return(0,n.oS)(E.map(D=>new ht(D)),D=>D.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,n.ku)(l);if(l.lineNumber){const D=new URL(E);return D.hash=l.lineNumber.toString(),D.toString()}return E}resolveEditUrl(l){return l.includes("?")?l.substring(0,l.indexOf("?")):l}}function ut(M){const l=M.getString("host");let E=M.getOptionalString("baseUrl"),D=M.getOptionalString("cloneUrl"),tt=M.getString("gitilesBaseUrl");const lt=M.getOptionalString("username"),yt=M.getOptionalString("password")?.trim();if((0,n.HO)(l)){if(E&&!(0,n.AY)(E))throw new Error(`Invalid Gerrit integration config, '${E}' is not a valid baseUrl`);if(D&&!(0,n.AY)(D))throw new Error(`Invalid Gerrit integration config, '${D}' is not a valid cloneUrl`);if(!(0,n.AY)(tt))throw new Error(`Invalid Gerrit integration config, '${tt}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${l}' is not a valid host`);return E?E=(0,J.trimEnd)(E,"/"):E=`https://${l}`,tt?tt=(0,J.trimEnd)(tt,"/"):tt=`https://${l}`,D?D=(0,J.trimEnd)(D,"/"):D=E,{host:l,baseUrl:E,cloneUrl:D,gitilesBaseUrl:tt,username:lt,password:yt}}function At(M){return M.map(ut)}var mt=t(1048).hp;const Pt=")]}'";function Ot(M,l){const E=new URL(M.gitilesBaseUrl),D=new URL(l),lt=D.pathname.substring(D.pathname.startsWith("/a/")?2:0).replace(E.pathname,"").split("/").filter(Xt=>!!Xt),yt=lt.indexOf("+");if(yt<=0)throw new Error(`Unable to parse project from url: ${l}`);const Wt=trimStart(lt.slice(0,yt).join("/"),"/"),Kt=lt.indexOf("heads");if(Kt<=0)throw new Error(`Unable to parse branch from url: ${l}`);const Jt=lt[Kt+1],Mt=lt.slice(Kt+2).join("/");return{branch:Jt,filePath:Mt===""?"/":Mt,project:Wt}}function jt(M,l){const E=new URL(M.gitilesBaseUrl),D=new URL(l),lt=(0,J.trimStart)(D.pathname.substring(D.pathname.startsWith("/a/")?2:0).replace(E.pathname,""),"/").split("/").filter(kt=>!!kt),yt=(0,J.takeWhile)(lt,kt=>kt!=="+");if(yt.length===0)throw new Error(`Unable to parse gitiles url: ${l}`);const Wt=lt.slice(yt.length+1),Kt=(0,J.join)(yt,"/");if(Wt.length>0&&Wt[0]==="HEAD"){const kt=Wt.shift(),me=(0,J.join)(Wt,"/");return{project:Kt,ref:kt,refType:"head",path:me||"/",basePath:(0,J.trimEnd)(l.replace(me,""),"/")}}if(Wt.length>0&&Wt[0].length===40){const kt=Wt.shift(),me=(0,J.join)(Wt,"/");return{project:Kt,ref:kt,refType:"sha",path:me||"/",basePath:(0,J.trimEnd)(l.replace(me,""),"/")}}const Jt=(0,J.join)(Wt,"/"),Xt=/^refs\/(?<refsReference>heads|tags)\/(?<ref>.*?)(\/|$)/.exec(Jt);if(Xt){const kt=Xt[0];let me;const{refsReference:$e,ref:Pe}=Xt.groups||{},Ve=Jt.replace(kt,"");switch($e){case"heads":me="branch";break;case"tags":me="tag";break;default:throw new Error(`Unable to parse gitiles url: ${l}`)}return{project:Kt,ref:Pe,refType:me,path:Ve||"/",basePath:(0,J.trimEnd)(l.replace(Ve,""),"/")}}throw new Error(`Unable to parse gitiles : ${l}`)}function Nt(M,l,E,D){return`${M.gitilesBaseUrl}/${l}/+/refs/heads/${E}/${trimStart(D,"/")}`}function Ut(M,l,E,D){const tt=D==="/"||D===""?".tar.gz":`/${D}.tar.gz`;return`${Lt(M)}/${l}/+archive/refs/heads/${E}${tt}`}function pt(M){return M.password?"/a/":"/"}function Lt(M){if(!M.baseUrl||!M.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(M.gitilesBaseUrl.startsWith(M.baseUrl))return M.gitilesBaseUrl.replace(M.baseUrl.concat("/"),M.baseUrl.concat(pt(M)));if(M.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return M.gitilesBaseUrl}function ft(M,l){const{branch:E,project:D}=Ot(M,l);return`${M.baseUrl}${pt(M)}projects/${encodeURIComponent(D)}/branches/${E}`}function B(M,l){const{project:E}=Ot(M,l);return`${M.cloneUrl}${pt(M)}${E}`}function k(M,l){const{branch:E,filePath:D,project:tt}=Ot(M,l);return`${M.baseUrl}${pt(M)}projects/${encodeURIComponent(tt)}/branches/${E}/files/${encodeURIComponent(D)}/content`}function ot(M){return`${M.baseUrl}${pt(M)}projects/`}function Ct(M){const l={};if(!M.password)return l;const E=mt.from(`${M.username}:${M.password}`,"utf8");return l.Authorization=`Basic ${E.toString("base64")}`,{headers:l}}async function it(M){const l=await M.text();if(l.startsWith(Pt))try{return JSON.parse(l.slice(Pt.length))}catch(E){throw new Error(`Invalid response from Gerrit: ${l.slice(0,10)} - ${E}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${l.slice(0,10)}`)}class vt{integrationConfig;static factory=({config:l})=>{const E=At(l.getOptionalConfigArray("integrations.gerrit")??[]);return(0,n.oS)(E.map(D=>new vt(D)),D=>D.config.host)};constructor(l){this.integrationConfig=l}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const{url:E,base:D,lineNumber:tt}=l;let lt;if(E.startsWith("/")){const{basePath:yt}=jt(this.config,D);return yt+E}return E?lt=new URL(E,D):lt=new URL(D),tt&&(lt.hash=tt.toString()),lt.toString()}resolveEditUrl(l){return l}}var Tt=t(36021);const wt="gitlab.com",It="https://gitlab.com/api/v4";function $t(M){const l=M.getString("host");let E=M.getOptionalString("apiBaseUrl");const D=M.getOptionalString("token")?.trim();let tt=M.getOptionalString("baseUrl");if(E?E=(0,J.trimEnd)(E,"/"):l===wt&&(E=It),tt?tt=(0,J.trimEnd)(tt,"/"):tt=`https://${l}`,(0,n.HO)(l)){if(!E||!(0,n.AY)(E))throw new Error(`Invalid GitLab integration config, '${E}' is not a valid apiBaseUrl`);if(!(0,n.AY)(tt))throw new Error(`Invalid GitLab integration config, '${tt}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${l}' is not a valid host`);return{host:l,token:D,apiBaseUrl:E,baseUrl:tt}}function Qt(M){const l=M.map($t);return l.some(E=>E.host===wt)||l.push({host:wt,apiBaseUrl:It,baseUrl:`https://${wt}`}),l}function fe(M){let l="";return M.host!==wt&&(l=new URL(M.baseUrl).pathname),trimEnd(l,"/")}class le{integrationConfig;static factory=({config:l})=>{const E=Qt(l.getOptionalConfigArray("integrations.gitlab")??[]);return(0,n.oS)(E.map(D=>new le(D)),D=>D.config.host)};constructor(l){this.integrationConfig=l}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return te(l,"edit")}}function te(M,l){return M.replace(/\/\-\/(blob|tree|edit)\//,`/-/${l}/`)}function se(M){const l=M.getString("host");let E=M.getOptionalString("baseUrl");const D=M.getOptionalString("username"),tt=M.getOptionalString("password")?.trim();if((0,n.HO)(l)){if(E&&!(0,n.AY)(E))throw new Error(`Invalid Gitea integration config, '${E}' is not a valid baseUrl`)}else throw new Error(`Invalid Gitea integration config, '${l}' is not a valid host`);return E?E=(0,J.trimEnd)(E,"/"):E=`https://${l}`,{host:l,baseUrl:E,username:D,password:tt}}var Te=t(1048).hp;function ze(M,l){const E=ce(M,l);return`${E.url}/${E.owner}/${E.name}/_edit/${E.ref}/${E.path}`}function zt(M,l){const E=ce(M,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/contents/${E.path}?ref=${E.ref}`}function ee(M,l){const E=ce(M,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/archive/${E.ref}.tar.gz`}function Zt(M,l){const E=ce(M,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/git/commits/${E.ref}`}function We(M){const l={},{username:E,password:D}=M;return D?(E?l.Authorization=`basic ${Te.from(`${E}:${D}`).toString("base64")}`:l.Authorization=`token ${D}`,{headers:l}):l}function ce(M,l){const E=M.baseUrl??`https://${M.host}`;try{const[D,tt,lt,yt,Wt,Kt,...Jt]=l.replace(E,"").split("/"),Mt=Jt.join("/").replace(/^\//,"");return{url:E,owner:tt,name:lt,ref:Kt,path:Mt}}catch(D){throw new Error(`Incorrect URL: ${l}, ${D}`)}}class je{config;static factory=({config:l})=>{const D=(l.getOptionalConfigArray("integrations.gitea")??[]).map(tt=>se(tt));return(0,n.oS)(D.map(tt=>new je(tt)),tt=>tt.config.host)};constructor(l){this.config=l}get type(){return"gitea"}get title(){return this.config.host}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return ze(this.config,l)}}function Ze(M){const l=M.getString("host"),E=M.getOptionalString("token"),D=M.getOptionalString("apiKey");if(!(0,n.HO)(l))throw new Error(`Invalid Harness Code integration config, '${l}' is not a valid host`);return{host:l,apiKey:D,token:E}}function pe(M,l){const E=Be(M,l);return`${E.baseUrl}/ng/account/${E.accountId}/module/code${E.orgName!==""?`/orgs/${E.orgName}`:""}${E.projectName!==""?`/projects/${E.projectName}`:""}/repos/${E.repoName}/files/${E.branch}/~/${E.path}`}function Je(M,l){const E=Be(M,l);let D=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(D+=`/${E.orgName}`),E.projectName&&(D+=`/${E.projectName}`),D+=`/${E.repoName}/+/raw/${E.path}?routingId=${E.accountId}&git_ref=refs/heads/${E.refString}`,D}function ln(M,l){const E=Be(M,l);let D=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(D+=`/${E.orgName}`),E.projectName&&(D+=`/${E.projectName}`),D+=`/${E.repoName}/+/archive/${E.branch}.zip?routingId=${E.accountId}`,D}function en(M,l){const E=Be(M,l);let D=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(D+=`/${E.orgName}`),E.projectName&&(D+=`/${E.projectName}`),D+=`/${E.repoName}/+/content?routingId=${E.accountId}&include_commit=true&git_ref=refs/heads/${E.branch}`,D}function nn(M){const l={},{token:E,apiKey:D}=M;return D?l["x-api-key"]=D:E&&(l.Authorization=`Bearer ${E}`),{headers:l}}function Be(M,l){const E=`https://${M.host}`;try{const D=new URL(l),tt=D.pathname.split("/").filter(ae=>ae!==""),lt=D.pathname.split("/"),yt=tt.findIndex(ae=>ae==="account")+1,Wt=tt[yt],Kt=tt.findIndex(ae=>ae==="orgs"),Jt=Kt!==-1?tt[Kt+1]:"",Mt=tt.findIndex(ae=>ae==="projects"),Xt=Mt!==-1?tt[Mt+1]:"",kt=tt.findIndex((ae,xe)=>ae==="repos"&&xe>Math.max(yt,Kt,Mt))+1,me=tt[kt],$e=lt.slice(lt.findIndex(ae=>ae==="files"||ae==="edit")+1),Pe=$e.findIndex(ae=>ae==="~"),Ve=$e.slice(0,Pe).join("/"),de=Pe!==-1?$e.slice(Pe+1).join("/").replace(/^\//,""):"";return{baseUrl:E,accountId:Wt,orgName:Jt,projectName:Xt,refString:Ve,path:de,repoName:me,refDashStr:$e.slice(0,Pe).join("-"),branch:Pe!==-1?$e.slice(0,Pe).join("/"):$e.join("/")}}catch(D){throw new Error(`Incorrect URL: ${l}, ${D}`)}}class Ue{config;static factory=({config:l})=>{const D=(l.getOptionalConfigArray("integrations.harness")??[]).map(tt=>Ze(tt));return(0,n.oS)(D.map(tt=>new Ue(tt)),tt=>tt.config.host)};constructor(l){this.config=l}get type(){return"harness"}get title(){return this.config.host}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return pe(this.config,l)}}class Ke{byType;static fromConfig(l){return new Ke({awsS3:m.factory({config:l}),awsCodeCommit:p.factory({config:l}),azure:L.factory({config:l}),bitbucket:gt.factory({config:l}),bitbucketCloud:et.factory({config:l}),bitbucketServer:ht.factory({config:l}),gerrit:vt.factory({config:l}),github:Tt.U.factory({config:l}),gitlab:le.factory({config:l}),gitea:je.factory({config:l}),harness:Ue.factory({config:l})})}constructor(l){this.byType=l}get awsS3(){return this.byType.awsS3}get awsCodeCommit(){return this.byType.awsCodeCommit}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}get gitea(){return this.byType.gitea}get harness(){return this.byType.harness}list(){return Object.values(this.byType).flatMap(l=>l.list())}byUrl(l){let E=Object.values(this.byType).map(D=>D.byUrl(l)).filter(Boolean);if(E.length>1){const D=E.filter(tt=>!(tt instanceof gt));D.length!==0&&(E=D)}return E[0]}byHost(l){return Object.values(this.byType).map(E=>E.byHost(l)).find(Boolean)}resolveUrl(l){const E=this.byUrl(l.base);return E?E.resolveUrl(l):(0,n.ku)(l)}resolveEditUrl(l){const E=this.byUrl(l);return E?E.resolveEditUrl(l):l}}var sn=t(55309);class Ae{static fromConfig(l){return Ke.fromConfig(l)}}const He=(0,sn.y)({id:"integration.scmintegrations"})},36021:(H,b,t)=>{"use strict";t.d(b,{U:()=>g,F:()=>p});var n=t(59869),a=t(45250);const d="github.com",x="https://api.github.com",m="https://raw.githubusercontent.com";function h(y){const v=y.getOptionalString("host")??d;let A=y.getOptionalString("apiBaseUrl"),T=y.getOptionalString("rawBaseUrl");const P=y.getOptionalString("token")?.trim(),w=y.getOptionalConfigArray("apps")?.map(O=>({appId:O.getNumber("appId"),clientId:O.getString("clientId"),clientSecret:O.getString("clientSecret"),webhookSecret:O.getString("webhookSecret"),privateKey:O.getString("privateKey"),allowedInstallationOwners:O.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,n.HO)(v))throw new Error(`Invalid GitHub integration config, '${v}' is not a valid host`);return A?A=(0,a.trimEnd)(A,"/"):v===d&&(A=x),T?T=(0,a.trimEnd)(T,"/"):v===d&&(T=m),{host:v,apiBaseUrl:A,rawBaseUrl:T,token:P,apps:w}}function u(y){const v=y.map(h);return v.some(A=>A.host===d)||v.push({host:d,apiBaseUrl:x,rawBaseUrl:m}),v}class g{integrationConfig;static factory=({config:v})=>{const A=u(v.getOptionalConfigArray("integrations.github")??[]);return(0,n.oS)(A.map(T=>new g(T)),T=>T.config.host)};constructor(v){this.integrationConfig=v}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(v){return p((0,n.ku)(v),"tree")}resolveEditUrl(v){return p(v,"edit")}parseRateLimitInfo(v){return{isRateLimited:v.status===429||v.status===403&&v.headers.get("x-ratelimit-remaining")==="0"}}}function p(y,v){return y.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(A,T,P,w)=>`//${T}/${P}/${w}/${v}/`)}},59869:(H,b,t)=>{"use strict";t.d(b,{AY:()=>h,HO:()=>m,ku:()=>g,oS:()=>u});var n=t(52536),a=t.n(n),d=t(45250),x=t.n(d);function m(y){const v=new URL("http://example.com");return v.host=y,v.host===y}function h(y){try{return new URL(y),!0}catch{return!1}}function u(y,v){return{list(){return y},byUrl(A){try{const T=typeof A=="string"?new URL(A):A;return y.find(P=>v(P)===T.host)}catch{return}},byHost(A){return y.find(T=>v(T)===A)}}}function g(y){const{url:v,base:A,lineNumber:T}=y;try{return new URL(v),v}catch{}let P;if(v.startsWith("/")){const{href:w,filepath:O}=a()(A);P=new URL(w);const j=(0,d.trimEnd)(P.pathname.substring(0,P.pathname.length-O.length),"/");P.pathname=`${j}${v}`}else P=new URL(v,A);return P.search=new URL(A).search,T&&(P.hash=`L${T}`),P.toString()}function p(y){beforeAll(()=>y.listen({onUnhandledRequest:"error"})),afterAll(()=>y.close()),afterEach(()=>y.resetHandlers())}},9245:(H,b,t)=>{"use strict";var n={};t.r(n),t.d(n,{TechDocsPlugin:()=>h.Ju});var a=t(31085),d=t(14041),x=t(25873),m=t(18690),h=t(39278),u=t(85920),g=t(72020),p=t(99730),y=t(64947),v=t(12173),A=t(22020),T=t(68146),P=t(73657);function w({children:r}){return(0,m.Ri)()?(0,a.jsx)(a.Fragment,{children:r}):(0,a.jsx)(m.fS,{children:r})}const O=()=>(0,a.jsx)(v.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),j=({step:r,error:e})=>{let s="";return r==="load-config"?s=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(s=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,a.jsx)(w,{children:(0,a.jsx)(v.M,{statusMessage:s,stack:e.stack})})},F=({error:r,resetError:e,plugin:s})=>(0,a.jsx)(A.b,{title:`Error in ${s?.getId()}`,defaultExpanded:!0,error:r,children:(0,a.jsx)(y.A,{variant:"outlined",onClick:e,children:"Retry"})}),L={Progress:T.k,Router:P.Kd,NotFoundErrorPage:O,BootErrorPage:j,ErrorBoundaryFallback:F},Z="Invalid discovery URL pattern,";class G{parts;static compile(e){const s=e.split(/\{\{\s*pluginId\s*\}\}/),o=s.join("pluginId");let i;try{i=new URL(o)}catch{throw new Error(`${Z} URL '${o}' is invalid`)}if(i.hash)throw new Error(`${Z} URL must not have a hash`);if(i.search)throw new Error(`${Z} URL must not have a query`);if(o.endsWith("/"))throw new Error(`${Z} URL must not end with a slash`);return new G(s)}constructor(e){this.parts=e}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}}var N=t(96403),Q=t.n(N);class q{isClosed=!1;terminatingError;observable=new(Q())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}));subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(s=>s.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(s=>s.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,s,o){const i=typeof e=="function"?{next:e,error:s,complete:o}:e;return this.observable.subscribe(i)}}class z{isClosed;currentValue;terminatingError;observable;constructor(e){this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(Q())(s=>this.isClosed?(this.terminatingError?s.error(this.terminatingError):s.complete(),()=>{}):(s.next(this.currentValue),this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=e,this.subscribers.forEach(s=>s.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(s=>s.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,s,o){const i=typeof e=="function"?{next:e,error:s,complete:o}:e;return this.observable.subscribe(i)}}class et{subject=new q;post(e){this.subject.next(e)}alert$(){return this.subject}}class J{captureEvent(e){}}class Y{alertApi;errorApi;constructor(e,s){this.alertApi=e,this.errorApi=s}post(e,s){return s?.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,s)}error$(){return this.errorApi.error$()}}class V{subject=new q;post(e,s){this.subject.next({error:e,context:s})}error$(){return this.subject}}class at{static forward(e,s){window.addEventListener("unhandledrejection",o=>{e.post(o.reason,s)})}}const nt=new Map;class gt{namespace;errorApi;constructor(e,s){this.namespace=e,this.errorApi=s,this.subscribers=new Set,this.observable=new(Q())(o=>(this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}static hasSubscribed=!1;static create(e){return new gt(e.namespace??"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[s,o]of nt.entries())e.key?.startsWith(s)&&o.handleStorageChange(e.key)})}get(e){return this.snapshot(e).value}snapshot(e){let s,o="absent";try{const i=localStorage.getItem(this.getKeyName(e));i&&(s=JSON.parse(i,(c,S)=>(typeof S=="object"&&S!==null&&Object.freeze(S),S)),o="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:s,presence:o}}forBucket(e){const s=`${this.namespace}/${e}`;return nt.has(s)||nt.set(s,new gt(s,this.errorApi)),nt.get(s)}async set(e,s){localStorage.setItem(this.getKeyName(e),JSON.stringify(s)),this.notifyChanges(e)}async remove(e){localStorage.removeItem(this.getKeyName(e)),this.notifyChanges(e)}observe$(e){return gt.hasSubscribed||(gt.addStorageEventListener(),gt.hasSubscribed=!0),this.observable.filter(({key:s})=>s===e)}handleStorageChange(e){if(!e?.startsWith(this.namespace))return;const s=e?.slice(`${this.namespace}/`.length);s.includes("/")||this.notifyChanges(decodeURIComponent(s))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const s=this.snapshot(e);for(const o of this.subscribers)o.next(s)}subscribers;observable}function bt(r){let e=r.baseImplementation||t.g.fetch;const s=[r.middleware??[]].flat().reverse();for(const o of s)e=o.apply(e);return{fetch:e}}class xt{identityApi;allowUrl;headerName;headerValue;static create(e){const s=ht(e),o=e.header?.name||"authorization",i=e.header?.value||(c=>`Bearer ${c}`);return new xt(e.identityApi,s,o,i)}constructor(e,s,o,i){this.identityApi=e,this.allowUrl=s,this.headerName=o,this.headerValue=i}apply(e){return async(s,o)=>{const i=new Request(s,o),{token:c}=await this.identityApi.getCredentials();return i.headers.get(this.headerName)||typeof c!="string"||!c||!this.allowUrl(i.url)?e(s,o):(i.headers.set(this.headerName,this.headerValue(c)),e(i))}}}function ht(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?ut(r.urlPrefixAllowlist):r.config?ut([r.config.getString("backend.baseUrl")]):()=>!1}function ut(r){const e=r.map(s=>s.replace(/\/$/,""));return s=>e.some(o=>s===o||s.startsWith(`${o}/`))}function At(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class mt{discoveryApi;constructor(e){this.discoveryApi=e}apply(e){return async(s,o)=>{const i=new Request(s,o),c="plugin://";if(!i.url.startsWith(c))return e(s,o);const{hostname:S,pathname:C,search:R,hash:K,username:_,password:ct}=new URL(`http://${i.url.substring(c.length)}`);let rt=await this.discoveryApi.getBaseUrl(S);if(_||ct){const Rt=new URL(rt),Vt=`${_}${ct?`:${ct}`:""}@`;rt=`${Rt.protocol}//${Vt}${Rt.host}${Rt.pathname}`}const dt=`${At(rt,C)}${R}${K}`;return e(dt,typeof s=="string"||Pt(s)?o:s)}}}function Pt(r){return typeof r=="object"&&r?.constructor===URL}class Ot{static resolvePluginProtocol(e){return new mt(e.discoveryApi)}static injectIdentityAuth(e){return xt.create(e)}constructor(){}}function jt(r,e){for(const s of e)if(!r.has(s))return!1;return!0}function Nt(r,...e){const s=new Set(r);for(const o of e)for(const i of o)s.add(i);return s}class Ut{requests=[];subject=new z(this.getCurrentPending());request(e){return new Promise((s,o)=>{this.requests.push({scopes:e,resolve:s,reject:o}),this.subject.next(this.getCurrentPending())})}resolve(e,s){this.requests=this.requests.filter(o=>jt(e,o.scopes)?(o.resolve(s),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(s=>s.reject(e)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const e=this.requests.length===0?void 0:this.requests.slice(1).reduce((s,o)=>Nt(s,o.scopes),this.requests[0].scopes);return{scopes:e,resolve:s=>{e&&this.resolve(e,s)},reject:s=>{e&&this.reject(s)}}}}class pt{subject=new z([]);currentRequests=[];handlerCount=0;createAuthRequester(e){const s=new Ut,o=this.handlerCount;return this.handlerCount++,s.pending().subscribe({next:i=>{const c=this.currentRequests.slice(),S=this.makeAuthRequest(i,e);S?c[o]=S:delete c[o],this.currentRequests=c,this.subject.next(c.filter(Boolean))}}),i=>s.request(i)}makeAuthRequest(e,s){const{scopes:o}=e;if(o)return{provider:s.provider,trigger:async()=>{const i=await s.onAuthRequest(o);e.resolve(i)},reject:()=>{const i=new Error("Login failed, rejected by user");i.name="RejectedError",e.reject(i)}}}authRequest$(){return this.subject}}function Lt(r){return new Promise((e,s)=>{const o=r.width||500,i=r.height||700,c=window.screen.width/2-o/2,S=window.screen.height/2-i/2,C=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${o},height=${i},top=${S},left=${c}`);let R="";if(!C||typeof C.closed>"u"||C.closed){const rt=new Error("Failed to open auth popup.");rt.name="PopupRejectedError",s(rt);return}const K=rt=>{if(rt.source!==C||rt.origin!==r.origin)return;const{data:dt}=rt;if(dt.type==="config_info"){R=dt.targetOrigin;return}if(dt.type!=="authorization_response")return;const Rt=dt;if("error"in Rt){const Vt=new Error(Rt.error.message);Vt.name=Rt.error.name,s(Vt)}else e(Rt.response);ct()},_=setInterval(()=>{if(C.closed){const rt=`Login failed, ${R&&R!==window.location.origin?`Incorrect app origin, expected ${R}`:"popup was closed"}`,dt=new Error(rt);dt.name="PopupClosedError",s(dt),ct()}},100);function ct(){window.removeEventListener("message",K),clearInterval(_)}window.addEventListener("message",K)})}let ft=!1;function B(r){return[...r].join(" ")}class k{discoveryApi;environment;provider;joinScopesFunc;authRequester;sessionTransform;enableExperimentalRedirectFlow;popupOptions;constructor(e){const{configApi:s,discoveryApi:o,environment:i,provider:c,joinScopes:S=B,oauthRequestApi:C,sessionTransform:R=_=>_,popupOptions:K}=e;!ft&&!s&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),ft=!0),this.enableExperimentalRedirectFlow=s?s.getOptionalBoolean("enableExperimentalRedirectFlow")??!1:!1,this.authRequester=C.createAuthRequester({provider:c,onAuthRequest:async _=>this.enableExperimentalRedirectFlow?this.executeRedirect(_):this.showPopup(_)}),this.discoveryApi=o,this.environment=i,this.provider=c,this.joinScopesFunc=S,this.sessionTransform=R,this.popupOptions=K}async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const s=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(i=>{throw new Error(`Auth refresh request failed, ${i}`)});if(!s.ok){const i=new Error(`Auth refresh request failed, ${s.statusText}`);throw i.status=s.status,i}const o=await s.json();if(o.error){const i=new Error(o.error.message);throw o.error.name&&(i.name=o.error.name),i}return await this.sessionTransform(o)}async removeSession(){const e=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(s=>{throw new Error(`Logout request failed, ${s}`)});if(!e.ok){const s=new Error(`Logout request failed, ${e.statusText}`);throw s.status=e.status,s}}async showPopup(e){const s=this.joinScopesFunc(e),o=await this.buildUrl("/start",{scope:s,origin:window.location.origin,flow:"popup"}),i=this.popupOptions?.size?.fullscreen?window.screen.width:this.popupOptions?.size?.width||450,c=this.popupOptions?.size?.fullscreen?window.screen.height:this.popupOptions?.size?.height||730,S=await Lt({url:o,name:`${this.provider.title} Login`,origin:new URL(o).origin,width:i,height:c});return await this.sessionTransform(S)}async executeRedirect(e){const s=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:s,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,s){const o=await this.discoveryApi.getBaseUrl("auth"),i=this.buildQueryString({...s,env:this.environment});return`${o}/${this.provider.id}${e}${i}`}buildQueryString(e){if(!e)return"";const s=Object.entries(e).map(([o,i])=>{if(typeof i=="string")return`${encodeURIComponent(o)}=${encodeURIComponent(i)}`;if(i)return encodeURIComponent(o)}).filter(Boolean).join("&");return s?`?${s}`:""}}function ot(r,e){for(const s of e)if(!r.has(s))return!1;return!0}class Ct{options;constructor(e){this.options=e}sessionExistsAndHasScope(e,s){if(!e)return!1;if(!s||this.options.sessionScopes===void 0)return!0;const o=this.options.sessionScopes(e);return ot(o,s)}getExtendedScope(e,s){const o=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const i=this.options.sessionScopes(e);for(const c of i)o.add(c)}if(s)for(const i of s)o.add(i);return o}}var it=t(55309),vt=function(r){return r.SignedIn="SignedIn",r.SignedOut="SignedOut",r}({});const Tt=(0,it.y)({id:"core.auth.google"}),wt=(0,it.y)({id:"core.auth.github"}),It=(0,it.y)({id:"core.auth.okta"}),$t=(0,it.y)({id:"core.auth.gitlab"}),Qt=(0,it.y)({id:"core.auth.microsoft"}),fe=(0,it.y)({id:"core.auth.onelogin"}),le=(0,it.y)({id:"core.auth.bitbucket"}),te=(0,it.y)({id:"core.auth.bitbucket-server"}),se=(0,it.y)({id:"core.auth.atlassian"}),Te=(0,it.y)({id:"core.auth.vmware-cloud"});class ze{subject=new z(vt.SignedOut);signedIn=!1;setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?vt.SignedIn:vt.SignedOut))}sessionState$(){return this.subject}}class zt{connector;helper;sessionScopesFunc;sessionShouldRefreshFunc;stateTracker=new ze;refreshPromise;currentSession;constructor(e){const{connector:s,defaultScopes:o=new Set,sessionScopes:i,sessionShouldRefresh:c}=e;this.connector=s,this.sessionScopesFunc=i,this.sessionShouldRefreshFunc=c,this.helper=new Ct({sessionScopes:i,defaultScopes:o})}async getSession(e){if(this.helper.sessionExistsAndHasScope(this.currentSession,e.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const o=await this.collapsedSessionRefresh(e.scopes),i=this.sessionScopesFunc(this.currentSession),c=this.sessionScopesFunc(o);return ot(c,i)&&(this.currentSession=o),o}catch(o){if(e.optional)return;throw o}}if(!this.currentSession&&!e.instantPopup)try{const s=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=s,this.getSession(e)}catch{}if(!e.optional)return this.currentSession=await this.connector.createSession({...e,scopes:this.helper.getExtendedScope(this.currentSession,e.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(e){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession(this.helper.getExtendedScope(this.currentSession,e));try{const s=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),s}finally{delete this.refreshPromise}}}const ee={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class Zt{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=ee,oauthRequestApi:S,defaultScopes:C=[],scopeTransform:R=rt=>rt,popupOptions:K}=e,_=new k({configApi:s,discoveryApi:o,environment:i,provider:c,oauthRequestApi:S,sessionTransform({backstageIdentity:rt,...dt}){const Rt={...dt,providerInfo:{idToken:dt.providerInfo.idToken,accessToken:dt.providerInfo.accessToken,scopes:Zt.normalizeScopes(R,dt.providerInfo.scope),expiresAt:dt.providerInfo.expiresInSeconds?new Date(Date.now()+dt.providerInfo.expiresInSeconds*1e3):void 0}};return rt&&(Rt.backstageIdentity={token:rt.token,identity:rt.identity,expiresAt:rt.expiresInSeconds?new Date(Date.now()+rt.expiresInSeconds*1e3):void 0}),Rt},popupOptions:K}),ct=new zt({connector:_,defaultScopes:new Set(C),sessionScopes:rt=>rt.providerInfo.scopes,sessionShouldRefresh:rt=>{let dt=1/0;return rt.providerInfo?.expiresAt&&(dt=Math.min(dt,(rt.providerInfo.expiresAt.getTime()-Date.now())/1e3)),rt.backstageIdentity?.expiresAt&&(dt=Math.min(dt,(rt.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),dt<60*5}});return new Zt({sessionManager:ct,scopeTransform:R})}sessionManager;scopeTransform;constructor(e){this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,s){const o=Zt.normalizeScopes(this.scopeTransform,e);return(await this.sessionManager.getSession({...s,scopes:o}))?.providerInfo.accessToken??""}async getIdToken(e={}){return(await this.sessionManager.getSession({...e,scopes:new Set(["openid"])}))?.providerInfo.idToken??""}async getBackstageIdentity(e={}){return(await this.sessionManager.getSession(e))?.backstageIdentity}async getProfile(e={}){return(await this.sessionManager.getSession(e))?.profile}static normalizeScopes(e,s){if(!s)return new Set;const o=Array.isArray(s)?s:s.split(/[\s|,]/).filter(Boolean);return new Set(e(o))}}const We={id:"google",title:"Google",icon:()=>null},ce="https://www.googleapis.com/auth/";class je{static create(e){const{configApi:s,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:S=We,defaultScopes:C=["openid",`${ce}userinfo.email`,`${ce}userinfo.profile`]}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:i,provider:S,environment:c,defaultScopes:C,scopeTransform(R){return R.map(K=>K==="openid"?K:K==="profile"||K==="email"?`${ce}userinfo.${K}`:K.startsWith(ce)?K:`${ce}${K}`)}})}}const Ze={id:"microsoft",title:"Microsoft",icon:()=>null};class pe{oauth2;configApi;environment;provider;oauthRequestApi;discoveryApi;scopeTransform;static MicrosoftGraphID="00000003-0000-0000-c000-000000000000";static create(e){return new pe(e)}constructor(e){const{configApi:s,environment:o="development",provider:i=Ze,oauthRequestApi:c,discoveryApi:S,defaultScopes:C=["openid","offline_access","profile","email","User.Read"],scopeTransform:R=K=>K.concat("offline_access")}=e;this.configApi=s,this.environment=o,this.provider=i,this.oauthRequestApi=c,this.discoveryApi=S,this.scopeTransform=R,this.oauth2={[pe.MicrosoftGraphID]:Zt.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:C})}}microsoftGraph(){return this.oauth2[pe.MicrosoftGraphID]}static resourceForScopes(e){const s=[...new Set(e.split(" ").map(pe.resourceForScope).filter(i=>i!=="openid"))];if(s.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${s.join(", ")}. Access tokens can only have a single audience.`));const o=s[0]??pe.MicrosoftGraphID;return Promise.resolve(o)}static resourceForScope(e){const s=e.match(/^(?<resourceURI>.*)\/(?<scp>[^\/]*)$/)?.groups;if(s){const{resourceURI:o}=s;return o.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return pe.MicrosoftGraphID}}async getAccessToken(e,s){const o=e===void 0?pe.MicrosoftGraphID:await pe.resourceForScopes(Array.isArray(e)?e.join(" "):e);return o in this.oauth2||(this.oauth2[o]=Zt.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[o].getAccessToken(e,s)}getIdToken(e){return this.microsoftGraph().getIdToken(e)}getProfile(e){return this.microsoftGraph().getProfile(e)}getBackstageIdentity(e){return this.microsoftGraph().getBackstageIdentity(e)}signIn(){return this.microsoftGraph().signIn()}signOut(){return this.microsoftGraph().signOut()}sessionState$(){return this.microsoftGraph().sessionState$()}}const Je={id:"github",title:"GitHub",icon:()=>null};class ln{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=Je,oauthRequestApi:S,defaultScopes:C=["read:user"]}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:S,provider:c,environment:i,defaultScopes:C})}}const en={id:"okta",title:"Okta",icon:()=>null},nn=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Be="okta.";class Ue{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=en,oauthRequestApi:S,defaultScopes:C=["openid","email","profile","offline_access"]}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:S,provider:c,environment:i,defaultScopes:C,scopeTransform(R){return R.map(K=>nn.has(K)||K.startsWith(Be)?K:`${Be}${K}`)}})}}const Ke={id:"gitlab",title:"GitLab",icon:()=>null};class sn{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=Ke,oauthRequestApi:S,defaultScopes:C=["read_user"]}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:S,provider:c,environment:i,defaultScopes:C})}}const Ae={id:"onelogin",title:"onelogin",icon:()=>null},He=new Set(["openid","profile","email","phone","address","groups","offline_access"]),M="onelogin.";class l{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=Ae,oauthRequestApi:S}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:S,provider:c,environment:i,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(C){return C.map(R=>He.has(R)||R.startsWith(M)?R:`${M}${R}`)}})}}const E={id:"bitbucket",title:"Bitbucket",icon:()=>null};class D{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=E,oauthRequestApi:S,defaultScopes:C=["account"]}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:S,provider:c,environment:i,defaultScopes:C})}}const tt={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class lt{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=tt,oauthRequestApi:S,defaultScopes:C=["PROJECT_ADMIN"]}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:S,provider:c,environment:i,defaultScopes:C})}}const yt={id:"atlassian",title:"Atlassian",icon:()=>null};class Wt{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=yt,oauthRequestApi:S}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:S,provider:c,environment:i})}}const Kt={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class Jt{static create(e){const{configApi:s,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:S=Kt,defaultScopes:C=["openid"]}=e;return Zt.create({configApi:s,discoveryApi:o,oauthRequestApi:i,provider:S,environment:c,defaultScopes:C})}}var Mt=t(12935),Xt=t(57405),kt=t(65461),me=t(36017),$e=t(99303),Pe=t(39837);const Ve=(0,it.y)({id:"core.storage"});var de=t(70795),ae=t(16009);const xe=(0,it.y)({id:"core.oauthrequest"});var es=t(96824),Xe=t(70835),ns=t(10288),yn=t.n(ns),In=t(20938),Gt=t(46195),_e=t(54241);const dn=Gt.z.lazy(()=>Gt.z.object({rule:Gt.z.string(),resourceType:Gt.z.string(),params:Gt.z.record(Gt.z.any()).optional()}).or(Gt.z.object({anyOf:Gt.z.array(dn).nonempty()})).or(Gt.z.object({allOf:Gt.z.array(dn).nonempty()})).or(Gt.z.object({not:dn}))),ss=Gt.z.object({result:Gt.z.literal(_e.b.ALLOW).or(Gt.z.literal(_e.b.DENY))}),Ws=Gt.z.union([Gt.z.object({result:Gt.z.literal(_e.b.ALLOW).or(Gt.z.literal(_e.b.DENY))}),Gt.z.object({result:Gt.z.literal(_e.b.CONDITIONAL),pluginId:Gt.z.string(),resourceType:Gt.z.string(),conditions:dn})]),rs=(r,e)=>Gt.z.object({items:Gt.z.array(Gt.z.intersection(Gt.z.object({id:Gt.z.string()}),r)).refine(s=>s.length===e.size&&s.every(({id:o})=>e.has(o)),{message:"Items in response do not match request"})});class os{enabled;discovery;constructor(e){this.discovery=e.discovery,this.enabled=e.config.getOptionalBoolean("permission.enabled")??!1}async authorize(e,s){return this.makeRequest(e,ss,s)}async authorizeConditional(e,s){return this.makeRequest(e,Ws,s)}async makeRequest(e,s,o){if(!this.enabled)return e.map(_=>({result:_e.b.ALLOW}));const i={items:e.map(_=>({id:In.A(),..._}))},c=await this.discovery.getBaseUrl("permission"),S=await yn()(`${c}/authorize`,{method:"POST",body:JSON.stringify(i),headers:{...this.getAuthorizationHeader(o?.token),"content-type":"application/json"}});if(!S.ok)throw await Xe.o.fromResponse(S);const C=await S.json(),K=rs(s,new Set(i.items.map(({id:_})=>_))).parse(C).items.reduce((_,ct)=>(_[ct.id]=ct,_),{});return i.items.map(_=>K[_.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}}class En{permissionClient;identityApi;constructor(e,s){this.permissionClient=e,this.identityApi=s}static create(e){const{config:s,discovery:o,identity:i}=e,c=new os({discovery:o,config:s});return new En(c,i)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}}const as=[(0,Mt.b)({api:Xt.I,deps:{configApi:kt.U},factory:({configApi:r})=>G.compile(`${r.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,Mt.b)({api:me.k,deps:{},factory:()=>new et}),(0,Mt.b)({api:$e.c,deps:{},factory:()=>new J}),(0,Mt.b)({api:Pe.m,deps:{alertApi:me.k},factory:({alertApi:r})=>{const e=new Y(r,new V);return at.forward(e,{hidden:!1}),e}}),(0,Mt.b)({api:Ve,deps:{errorApi:Pe.m},factory:({errorApi:r})=>gt.create({errorApi:r})}),(0,Mt.b)({api:de.a,deps:{configApi:kt.U,identityApi:ae.K,discoveryApi:Xt.I},factory:({configApi:r,identityApi:e,discoveryApi:s})=>bt({middleware:[Ot.resolvePluginProtocol({discoveryApi:s}),Ot.injectIdentityAuth({identityApi:e,config:r})]})}),(0,Mt.b)({api:xe,deps:{},factory:()=>new pt}),(0,Mt.b)({api:Tt,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>je.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:Qt,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>pe.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:wt,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>ln.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:It,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Ue.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:$t,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>sn.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:fe,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>l.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:le,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>D.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:te,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>lt.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"],environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:se,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Wt.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:Te,deps:{discoveryApi:Xt.I,oauthRequestApi:xe,configApi:kt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Jt.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,Mt.b)({api:es.x,deps:{discovery:Xt.I,identity:ae.K,config:kt.U},factory:({config:r,discovery:e,identity:s})=>En.create({config:r,discovery:e,identity:s})})];var An=t(14451),is=t(27799),Dn=t(94389),cs=t(20947),Ln=t(20473),ls=t(45917),Mn=t(39347),un=t(63309),ds=t(82451),us=t(85121),jn=t(17400),hs=t(42226),gs=t(69550),Bn=t(52755),Un=t(89350),ps=t(8911),xn=t(33602),Cn=t(48108),fs=t(77225),$n=t(55700),Fn=t(71865),ms=t(80109),vs=t(15303),ys=t(39330);const Es={brokenImage:is.A,catalog:ps.A,scaffolder:cs.A,techdocs:Ln.A,search:ls.A,chat:Mn.A,dashboard:un.A,docs:ds.A,email:us.A,github:hs.A,group:xn.A,help:gs.A,"kind:api":jn.A,"kind:component":Un.A,"kind:domain":An.A,"kind:group":xn.A,"kind:location":Bn.A,"kind:system":Dn.A,"kind:user":Cn.A,"kind:resource":$n.A,"kind:template":Fn.A,user:Cn.A,warning:fs.A,star:ms.A,unstarred:vs.A,externalLink:ys.A};var As=t(58733),xs=t(55288),Cs=t(91360),bs=t(50868),Ss=t(12285),Os=t(87271),Nn=t(64636);Nn.A.configure(r=>`v5-${r}`);const Ts=(0,xs.A)({productionPrefix:"jss4-"});function kn(r){const{children:e,theme:s,noCssBaseline:o=!1}=r,i=s.getTheme("v4"),c=s.getTheme("v5");let S;o||(S=(0,a.jsx)(As.Ay,{}));let C=(0,a.jsxs)(a.Fragment,{children:[S,e]});return i&&(C=(0,a.jsx)(Cs.Ay,{generateClassName:Ts,children:(0,a.jsx)(bs.A,{theme:i,children:C})})),c&&(C=(0,a.jsx)(Ss.A,{injectFirst:!0,children:(0,a.jsx)(Os.A,{theme:c,children:C})})),C}const Wn={light:{type:"light",mode:"light",background:{default:"#F8F8F8",paper:"#FFFFFF"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#1F5493",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#1F5493"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",closeButtonColor:"#FFFFFF",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:"#FFD600",navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},dark:{type:"dark",mode:"dark",background:{default:"#333333",paper:"#424242"},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",closeButtonColor:"#FFFFFF",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:"#FFD600",navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}}};var Ps=t(98392),bn=t(17161);const Fe={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")`},we={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 Ne(r){const{colors:e,shape:s,options:o}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,S=`${s}, ${c}`,C=o?.fontColor??"#FFFFFF";return{colors:e,shape:s,backgroundImage:S,fontColor:C}}const ws={home:Ne({colors:we.teal,shape:Fe.wave}),documentation:Ne({colors:we.pinkSea,shape:Fe.wave2}),tool:Ne({colors:we.purpleSky,shape:Fe.round}),service:Ne({colors:we.marineBlue,shape:Fe.wave}),website:Ne({colors:we.veryBlue,shape:Fe.wave}),library:Ne({colors:we.rubyRed,shape:Fe.wave}),other:Ne({colors:we.darkGrey,shape:Fe.wave}),app:Ne({colors:we.toastyOrange,shape:Fe.wave}),apis:Ne({colors:we.teal,shape:Fe.wave2}),card:Ne({colors:we.greens,shape:Fe.wave})},Kn=16,Rs='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',f="home",I={htmlFontSize:Kn,fontFamily:Rs,h1:{fontSize:54,fontWeight:700,marginBottom:10},h2:{fontSize:40,fontWeight:700,marginBottom:8},h3:{fontSize:32,fontWeight:700,marginBottom:6},h4:{fontWeight:700,fontSize:28,marginBottom:6},h5:{fontWeight:700,fontSize:24,marginBottom:4},h6:{fontWeight:700,fontSize:20,marginBottom:2}};function U(r){const{palette:e,htmlFontSize:s=Kn,fontFamily:o=Rs,defaultPageTheme:i=f,pageTheme:c=ws,typography:S}=r;if(!c[i])throw new Error(`${i} is not defined in pageTheme.`);return I.htmlFontSize=s,I.fontFamily=o,{palette:e,typography:S??I,page:c[i],getPageTheme:({themeId:C})=>c[C]??c[i]}}var $=t(80012);const W={MuiCssBaseline:{styleOverrides:r=>({html:{height:"100%",fontFamily:r.typography.fontFamily},body:{height:"100%",fontFamily:r.typography.fontFamily,overscrollBehaviorY:"none",fontSize:"0.875rem",lineHeight:1.43,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:r.palette.background.paper,width:"1em"},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:r.palette.textVerySubtle,border:`3px solid ${r.palette.background.paper}`},"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active":{backgroundColor:r.palette.mode==="dark"?(0,$.a)(r.palette.textVerySubtle,.2):(0,$.e$)(r.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.mode==="dark"?(0,$.a)(r.palette.textVerySubtle,.2):(0,$.e$)(r.palette.textVerySubtle,.2)}},a:{color:"inherit",textDecoration:"none"}})},MuiGrid:{defaultProps:{spacing:2}},MuiSwitch:{defaultProps:{color:"primary"}},MuiTableRow:{styleOverrides:{root:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.default}}),hover:{"&:hover":{cursor:"pointer"}},head:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.paper}})}},MuiTableCell:{styleOverrides:{root:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:r.spacing(3,2,3,2.5),borderBottom:0}),sizeSmall:({theme:r})=>({padding:r.spacing(1.5,2,1.5,2.5)}),head:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",color:r.palette.textSubtle,fontWeight:"normal",lineHeight:"1"})}},MuiTabs:{styleOverrides:{root:{minHeight:24}}},MuiTab:{styleOverrides:{root:({theme:r})=>({color:r.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,$.e$)(r.palette.link,.3),background:(0,$.a)(r.palette.link,.95)},[r.breakpoints.up("md")]:{minWidth:120,fontSize:r.typography.pxToRem(14),fontWeight:500}}),textColorPrimary:({theme:r})=>({color:r.palette.link})}},MuiTableSortLabel:{styleOverrides:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"},"&.Mui-active":{fontWeight:"bold",color:"inherit"}}}},MuiListItemText:{styleOverrides:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}},MuiButton:{styleOverrides:{text:{padding:void 0}}},MuiChip:{styleOverrides:{root:({theme:r})=>({marginRight:r.spacing(1),marginBottom:r.spacing(1)}),label:({theme:r})=>({lineHeight:r.spacing(2.5),fontWeight:r.typography.fontWeightMedium,fontSize:r.spacing(1.75)}),labelSmall:({theme:r})=>({fontSize:r.spacing(1.5)}),deleteIcon:({theme:r})=>({width:r.spacing(3),height:r.spacing(3),margin:r.spacing(0,.75,0,-.75)}),deleteIconSmall:({theme:r})=>({width:r.spacing(2),height:r.spacing(2),margin:r.spacing(0,.5,0,-.5)})}},MuiCard:{styleOverrides:{root:{display:"flex",flexDirection:"column"}}},MuiCardHeader:{styleOverrides:{root:{paddingBottom:0}}},MuiCardContent:{styleOverrides:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}}},MuiCardActions:{styleOverrides:{root:{justifyContent:"flex-end"}}},MuiLink:{defaultProps:{underline:"hover"}},MuiPaper:{styleOverrides:{root:{backgroundImage:"unset"}}}},X=r=>(...e)=>{const s=e.length===0?[1]:e,o=(i,c)=>typeof i=="string"?i:c*i;return s.map(i=>{const c=o(i,r);return typeof c=="number"?`${c}px`:c}).join(" ")};function st(r,e){if(!e||typeof e=="string")return;const s=typeof e=="function"?e(r):e;if(s)return{"@global":s}}function Et(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const s={...r},o=r.spacing(1);return typeof o=="number"&&(s.spacing=X(o)),Object.fromEntries(Object.entries(e).map(([i,c])=>typeof c=="function"?[i,c({theme:s})]:[i,c]))}return e}}const St=/^&.Mui-([\w-]+)$/;function Bt(r){let e=r;if(!r||typeof r!="object")return e;for(const s of Object.keys(r)){const o=r[s];if(!(!o||typeof o!="object"))for(const i of Object.keys(o)){const c=i,S=c.match(St);if(S){const[,C]=S,{[c]:R,...K}=o;R&&(e={...e,[s]:K,[C]:R})}}}return e}function Dt(r,e={}){const s={},o={};for(const i of Object.keys(e)){const c=e[i];c&&("styleOverrides"in c&&(i==="MuiCssBaseline"?s[i]=st(r,c.styleOverrides):s[i]=Bt(Et(r,c.styleOverrides))),"defaultProps"in c&&(o[i]=c.defaultProps))}return{overrides:s,props:o}}class Ft{#t=new Map;constructor(e,s){this.#t=new Map,e&&this.#t.set("v4",e),s&&this.#t.set("v5",s)}getTheme(e){return this.#t.get(e)}}function _t(r){const e=U(r),s={...W,...r.components},o=(0,bn.A)({...e,components:s}),i=Dt(o,s),c={...(0,Ps.A)(e),...i};return new Ft(c,o)}function Ht(r){const e=adaptV4Theme(r),s=createTheme(r);return new Ft(s,createV5Theme(e))}const he={light:_t({palette:Wn.light}),dark:_t({palette:Wn.dark})};var Yt=t(75962),ge=t(87145);const qt=[{id:"light",title:"Light Theme",variant:"light",icon:(0,a.jsx)(ge.A,{}),Provider:({children:r})=>(0,a.jsx)(kn,{theme:he.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,a.jsx)(Yt.A,{}),Provider:({children:r})=>(0,a.jsx)(kn,{theme:he.dark,children:r})}];var ue=t(73466),re=t(39067),ne=t.n(re);class oe{holders;constructor(...e){this.holders=e}get(e){for(const s of this.holders){const o=s.get(e);if(o)return o}}}var ie=t(43836),Re=t(10602);const Le=(0,ie.tK)("api-context"),qe=r=>{const{apis:e,children:s}=r,o=(0,d.useContext)(Le)?.atVersion(1),i=o?new oe(e,o):e;return(0,a.jsx)(Le.Provider,{value:(0,Re.B)({1:i}),children:s})};qe.propTypes={apis:ne().shape({get:ne().func.isRequired}).isRequired,children:ne().node};const rn=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function Ge(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Ce(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Ce):Object.fromEntries(Object.entries(r).map(([e,s])=>[e,Ce(s)]))}function on(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:on(e);if(typeof r!="object"||Array.isArray(r))return r;const s=Ge(e)?e:{},o={};for(const i of new Set([...Object.keys(r),...Object.keys(s)])){const c=on(r[i],s[i]);c!==void 0&&(o[i]=c)}return o}function Is(r){if(r===null)return"null";if(Array.isArray(r))return"array";const e=typeof r;return e==="number"&&isNaN(r)?"nan":e==="string"&&r===""?"empty-string":e}const ke={type(r,e,s,o){return`Invalid type in config for key '${r}' in '${e}', got ${s}, wanted ${o}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,s){return`Unable to convert config value for key '${r}' in '${e}' to a ${s}`}};class hn{data;context;fallback;prefix;filteredKeys;notifiedFilteredKeys;static fromConfigs(e){return e.length===0?new hn(void 0):e.reduce((s,{data:o,context:i,filteredKeys:c,deprecatedKeys:S})=>{const C=new hn(o,i,s);if(C.filteredKeys=c,S)for(const{key:R,description:K}of S)console.warn(`The configuration key '${R}' of ${i} is deprecated and may be removed soon. ${K||""}`);return C},void 0)}constructor(e,s="mock-config",o,i=""){this.data=e,this.context=s,this.fallback=o,this.prefix=i,this.notifiedFilteredKeys=new Set}has(e){const s=this.readValue(e);return s===null?!1:s!==void 0?!0:this.fallback?.has(e)??!1}keys(){const e=this.data?Object.keys(this.data):[],s=this.fallback?.keys()??[];return[...new Set([...e,...s])].filter(o=>this.data?.[o]!==null)}get(e){const s=this.getOptional(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e??""),this.context));return s}getOptional(e){const s=Ce(this.readValue(e)),o=this.fallback?.getOptional(e);if(s!==null)return s===void 0?on(o):o===void 0?on(s):on(s,o)}getConfig(e){const s=this.getOptionalConfig(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalConfig(e){const s=this.readValue(e),o=this.fallback?.getOptionalConfig(e);if(Ge(s))return this.copy(s,e,o);if(s!==null){if(s!==void 0)throw new TypeError(ke.type(this.fullKey(e),this.context,Is(s),"object"));return o}}getConfigArray(e){const s=this.getOptionalConfigArray(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalConfigArray(e){const s=this.readConfigValue(e,o=>{if(!Array.isArray(o))return{expected:"object-array"};for(const[i,c]of o.entries())if(!Ge(c))return{expected:"object-array",value:c,key:`${e}[${i}]`};return!0});if(s)return s.map((o,i)=>this.copy(o,`${e}[${i}]`))}getNumber(e){const s=this.getOptionalNumber(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalNumber(e){const s=this.readConfigValue(e,i=>typeof i=="number"||typeof i=="string"||{expected:"number"});if(typeof s=="number"||s===void 0)return s;const o=Number(s);if(!Number.isFinite(o))throw new Error(ke.convert(this.fullKey(e),this.context,"number"));return o}getBoolean(e){const s=this.getOptionalBoolean(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalBoolean(e){const s=this.readConfigValue(e,i=>typeof i=="boolean"||typeof i=="number"||typeof i=="string"||{expected:"boolean"});if(typeof s=="boolean"||s===void 0)return s;const o=String(s).trim();if(/^(?:y|yes|true|1|on)$/i.test(o))return!0;if(/^(?:n|no|false|0|off)$/i.test(o))return!1;throw new Error(ke.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const s=this.getOptionalString(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalString(e){return this.readConfigValue(e,s=>typeof s=="string"&&s!==""||{expected:"string"})}getStringArray(e){const s=this.getOptionalStringArray(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalStringArray(e){return this.readConfigValue(e,s=>{if(!Array.isArray(s))return{expected:"string-array"};for(const[o,i]of s.entries())if(typeof i!="string"||i==="")return{expected:"string-array",value:i,key:`${e}[${o}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,s,o){const i=new hn(e,this.context,o,this.fullKey(s));return i.filteredKeys=this.filteredKeys,i}readConfigValue(e,s){const o=this.readValue(e);if(o===void 0)return this.fallback?.readConfigValue(e,s);if(o===null)return;const i=s(o);if(i!==!0){const{key:c=e,value:S=o,expected:C}=i;throw new TypeError(ke.type(this.fullKey(c),this.context,Is(S),C))}return o}readValue(e){const s=e?e.split("."):[];for(const i of s)if(!rn.test(i))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let o=this.data;for(const[i,c]of s.entries())if(Ge(o))o=o[c];else if(o!=null){const S=this.fullKey(s.slice(0,i).join("."));throw new TypeError(ke.type(S,this.context,Is(o),"object"))}return o}}const Sn="theme";class zn{themes;static createWithStorage(e){const s=new zn(e);if(!window.localStorage)return s;const o=window.localStorage.getItem(Sn)??void 0;return s.setActiveThemeId(o),s.activeThemeId$().subscribe(i=>{i?window.localStorage.setItem(Sn,i):window.localStorage.removeItem(Sn)}),window.addEventListener("storage",i=>{if(i.key===Sn){const c=localStorage.getItem(Sn)??void 0;s.setActiveThemeId(c)}}),s}activeThemeId;subject;constructor(e){this.themes=e,this.subject=new z(void 0)}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(e){this.activeThemeId=e,this.subject.next(e)}}var gn=t(63636);function Ks(r){if(r.length<3)throw new Error(`The '${r}' feature flag must have a minimum length of three characters.`);if(r.length>150)throw new Error(`The '${r}' feature flag must not exceed 150 characters.`);if(!r.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${r}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class $r{registeredFeatureFlags=[];flags;registerFlag(e){Ks(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===gn.S.Active}save(e){this.flags||(this.flags=this.load()),e.merge||this.flags.clear();for(const[o,i]of Object.entries(e.states))this.flags.set(o,i);const s=Array.from(this.flags.entries()).filter(([,o])=>o===gn.S.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(s)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const s=JSON.parse(e);if(typeof s!="object"||s===null||Array.isArray(s))return new Map;const o=Object.entries(s).filter(([i,c])=>(Ks(i),c===gn.S.Active));return new Map(o)}catch{return new Map}}}const Hn=(0,it.y)({id:"core.apptheme"}),zs=(0,it.y)({id:"core.applanguage"});var Fr=t(56038),Hs=function(r){return r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static",r}(Hs||{});class Nr{factories=new Map;register(e,s){const o=Hs[e],i=this.factories.get(s.api.id);return i&&i.priority>=o?!1:(this.factories.set(s.api.id,{priority:o,factory:s}),!0)}get(e){const s=this.factories.get(e.id);if(s)return s.factory}getAllApis(){const e=new Set;for(const{factory:s}of this.factories.values())e.add(s.api);return e}}class Ds{factories;static validateFactories(e,s){for(const o of s){const i=[o],c=new Set;for(;i.length;){const S=i.shift(),C=e.get(S);if(C)for(const R of Object.values(C.deps)){if(R.id===o.id)throw new Error(`Circular dependency of api factory for ${o}`);c.has(R)||(c.add(R),i.push(R))}}}}apis;constructor(e){this.factories=e,this.apis=new Map}get(e){return this.load(e)}load(e,s=[]){const o=this.apis.get(e.id);if(o)return o;const i=this.factories.get(e);if(!i)return;if(s.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const c=this.loadDeps(e,i.deps,[...s,i.api]),S=i.factory(c);return this.apis.set(e.id,S),S}loadDeps(e,s,o){const i={};for(const c in s)if(s.hasOwnProperty(c)){const S=s[c],C=this.load(S,o);if(!C)throw new Error(`No API factory available for dependency ${S} of dependent ${e}`);i[c]=C}return i}}function kr(r){const e={};for(const o in r.collectors)r.collectors.hasOwnProperty(o)&&(e[o]=r.collectors[o]());const s=[{node:d.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;s.length!==0;){const{node:o,parent:i,contexts:c}=s.shift();d.Children.forEach(o,S=>{if(!(0,d.isValidElement)(S))return;const C={};for(const R in e)if(e.hasOwnProperty(R)){const K=e[R];C[R]=K.visit(K.accumulator,S,i,c[R])}for(const R of r.discoverers){const K=R(S);K&&s.push({node:K,parent:S,contexts:C})}})}return Object.fromEntries(Object.entries(e).map(([o,i])=>[o,i.accumulator]))}function Vn(r,e){return()=>({accumulator:r(),visit:e})}function Wr(r){return r.props?.children}function Kr(r){if(r.props?.path&&r.props?.element)return r.props?.element}var be=t(19402);const zr=Vn(()=>new Set,(r,e)=>{const s=(0,be.E)(e,"core.plugin");s&&r.add(s)});var On=t(72427);const Vs=r=>{const{children:e}=r,s=(0,On.gf)(gn.B),o="with"in r?s.isActive(r.with):!s.isActive(r.without);return(0,a.jsx)(a.Fragment,{children:o?e:null})};(0,be.h)(Vs,"core.featureFlagged",!0);const Gn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function Yn(r){const e=r;return e?.type?e.type.displayName??e.type.name??String(e.type):String(e)}const Gs=r=>{const e=new Set;return r&&e.add(r),e};function Ys(r,e=new Array){return d.Children.forEach(r,s=>{if(!(0,d.isValidElement)(s))return;const o=(0,be.E)(s,"core.mountPoint");if(o){const i=(0,be.E)(s,"core.plugin");e.push({routeRef:o,plugin:i})}Ys(s.props.children,e)}),e}const Hr=Vn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,s,o)=>{if(o?.isElementAncestor)return o;if(s?.props.element===e)return{...o,isElementAncestor:!0};const i=e.props?.path,c=(0,be.E)(e,"core.mountPoint");if(c&&i)throw new Error(`Path property may not be set directly on a routable extension "${Yn(e)}"`);const S=o?.obj?.children??r.objects;if(i!==void 0){if(typeof i!="string")throw new Error(`Element path must be a string at "${Yn(e)}"`);const C=i.startsWith("/")?i.slice(1):i,R=e.props.element;if((0,be.E)(e,"core.gatherMountPoints")){if(R)throw new Error(`Mount point gatherers may not have an element prop "${Yn(e)}"`);const K={path:C,element:"gathered",routeRefs:new Set,caseSensitive:!!e.props?.caseSensitive,children:[Gn],plugins:new Set};return S.push(K),{obj:K,gatherPath:C,routeRef:o?.routeRef,gatherRouteRef:o?.routeRef}}if(R){const[K,..._]=Ys(R);if(_.length>0)throw new Error(`Route element with path "${i}" may not contain multiple routable extensions`);if(!K)return o;const{routeRef:ct,plugin:rt}=K,dt={path:C,element:"mounted",routeRefs:new Set([ct]),caseSensitive:!!e.props?.caseSensitive,children:[Gn],plugins:Gs(rt)};return S.push(dt),r.paths.set(ct,C),r.parents.set(ct,o?.routeRef),{obj:dt,routeRef:ct??o?.routeRef,gatherPath:C,gatherRouteRef:o?.gatherRouteRef}}}if(c){if(o?.gatherPath===void 0)throw new Error(`Routable extension "${Yn(e)}" with mount point "${c}" must be assigned a path`);o?.obj?.routeRefs.add(c);const C=(0,be.E)(e,"core.plugin");return C&&o?.obj?.plugins.add(C),r.paths.set(c,o.gatherPath),r.parents.set(c,o?.gatherRouteRef),{...o,routeRef:c}}return o}),Vr=Vn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,s,o)=>{if(s?.props.element===e)return o;let i=o?.obj,c=o?.routeRef,S=o?.sticky;const C=e.props?.path,R=i?.children??r.objects,K=!!e.props?.caseSensitive;let _=o?.path;if((0,be.E)(e,"core.gatherMountPoints")){if(!C)throw new Error("Mount point gatherer must have a path");_=C}const ct=e.props?.element;let rt=(0,be.E)(e,"core.mountPoint");if(!rt&&(0,d.isValidElement)(ct)&&(rt=(0,be.E)(ct,"core.mountPoint")),rt){let Rt=C;if(_&&(Rt?_=void 0:Rt=_),!Rt)throw new Error("Mounted routable extension must have a path");r.paths.set(rt,Rt),c&&S?(r.parents.set(rt,c),C&&(c=rt,S=!1)):(r.parents.set(rt,c),c=rt),C?(i={caseSensitive:K,path:C,element:"mounted",routeRefs:new Set([rt]),children:[Gn],plugins:Gs((0,be.E)(e.props.element,"core.plugin"))},R.push(i)):i?.routeRefs.add(rt)}if((0,be.E)(e,"core.gatherMountPoints")&&(S=!0),(0,be.E)(e,"core.gatherMountPoints")){if(!C)throw new Error("Mount point gatherer must have a path");rt||(i={caseSensitive:K,path:C,element:"gathered",routeRefs:new Set,children:[Gn],plugins:o?.obj?.plugins||new Set},R.push(i))}return{obj:i,path:_,routeRef:c,sticky:S}}),Gr=Vn(()=>new Set,(r,e)=>{if(e.type===Vs){const s=e.props;r.add("with"in s?s.with:s.without)}});var Tn=t(21613),Yr=t(63544);const Pn=(0,Yr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function Qs(r){return r[Pn]==="absolute"}function Zs(r){return r[Pn]==="sub"}function Qr(r){return r[Pn]==="external"}function Qn(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var Zr=t(46155),Jr=t.n(Zr);function Xr(r,e,s){let o,i="";if(Qs(r))o=r;else if(Zs(r))o=r.parent,i=r.path;else if(Qr(r)){const C=s.get(r);if(!C)return[void 0,""];if(Qs(C))o=C;else if(Zs(C))o=C.parent,i=C.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${C}`)}else throw r[Pn]?new Error(`Unknown or invalid route ref type, ${r[Pn]}`):new Error(`Unknown object passed to useRouteRef, got ${r}`);if(!o)return[void 0,""];const c=e.get(o);if(c===void 0)return[void 0,""];const S=Qn(c,i);return[o,S]}function _r(r,e,s,o,i){const c=(0,Tn.ue)(i,e)??[],S=Array();let C=-1;for(let _=r;_&&(C=c.findIndex(ct=>ct.route.routeRefs.has(_)),C===-1);_=o.get(_))S.unshift(_);S.length===0&&(C-=1);const R=C===-1?"":c[C].pathname,K=S.slice(0,-1).map(_=>{const ct=s.get(_);if(ct===void 0)throw new Error(`No path for ${_}`);if(ct.includes(":"))throw new Error(`Cannot route to ${r} with parent ${_} as it has parameters`);return ct});return`${Qn(R,...K)}/`}class qr{routePaths;routeParents;routeObjects;routeBindings;appBasePath;constructor(e,s,o,i,c){this.routePaths=e,this.routeParents=s,this.routeObjects=o,this.routeBindings=i,this.appBasePath=c}resolve(e,s){const[o,i]=Xr(e,this.routePaths,this.routeBindings);if(!o)return;let c;typeof s=="string"?c=this.trimPath(s):s.pathname?c={...s,pathname:this.trimPath(s.pathname)}:c=s;const S=this.appBasePath+_r(o,c,this.routePaths,this.routeParents,this.routeObjects);return(...[R])=>{const K=R&&Jr()(R,_=>typeof _=="string"?_.replaceAll(/[&?#;\/]/g,ct=>encodeURIComponent(ct)):_);return Qn(S,(0,Tn.tW)(i,K))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}}const to=(0,ie.tK)("routing-context"),eo=({routePaths:r,routeParents:e,routeObjects:s,routeBindings:o,basePath:i="",children:c})=>{const S=new qr(r,e,s,o,i),C=(0,Re.B)({1:S});return(0,a.jsx)(to.Provider,{value:C,children:c})};function no(r,e){const s=new Set(e.values());s.delete(void 0);for(const o of e.keys()){if(s.has(o))continue;let i=o,c="";for(;i;){const C=r.get(i);if(C===void 0)throw new Error(`No path for ${i}`);c=Qn(C,c),i=e.get(i)}const S=c.match(/:(\w+)/g);if(S){for(let C=0;C<S.length;C++)for(let R=C+1;R<S.length;R++)if(S[R]===S[C])throw new Error(`Parameter ${S[R]} is duplicated in path ${c}`)}}}function so(r,e){for(const s of e)if(s.externalRoutes){for(const[o,i]of Object.entries(s.externalRoutes))if(!i.optional&&!r.has(i))throw new Error(`External route '${o}' of the '${s.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const ro=(0,ie.tK)("app-context"),oo=({appContext:r,children:e})=>{const s=(0,Re.B)({1:r});return(0,a.jsx)(ro.Provider,{value:s,children:e})},Js="app",ao=`${Js}-auth-cookie-expires-at`,io=5*6e4,Xs=5e3,co=2,lo=5*6e4;function uo({discoveryApi:r,fetchApi:e,errorApi:s}){let o=!1,i,c=!0,S=Xs;const C="BroadcastChannel"in window?new BroadcastChannel(ao):void 0,R=rt=>{const dt=(1+3*Math.random())*6e4;return Math.max(rt-Date.now(),io)-dt},K=async()=>{try{const dt=`${await r.getBaseUrl(Js)}/.backstage/auth/v1/cookie`,Rt=await e.fetch(dt,{credentials:"include"});if(!Rt.ok)throw new Error(`Request failed with status ${Rt.status} ${Rt.statusText}, see request towards ${dt} for more details`);const Vt=await Rt.json();if(!Vt.expiresAt)throw new Error("No expiration date in response");const Oe=Date.parse(Vt.expiresAt);if(Number.isNaN(Oe))throw new Error("Invalid expiration date in response");c=!0,C?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(Oe).toISOString()}}),ct(R(Oe))}catch(rt){c?(c=!1,S=Xs):(S=Math.min(lo,S*co),console.error("Session cookie refresh failed",rt),s.post(new Error("Session refresh failed, see developer console for details"))),ct(S)}},_=rt=>{const{data:dt}=rt;if(!(dt===null||typeof dt!="object")&&"action"in dt&&dt.action==="COOKIE_REFRESH_SUCCESS"){const Rt=Date.parse(dt.payload.expiresAt);if(Number.isNaN(Rt)){console.warn("Received invalid expiration from session refresh channel");return}ct(R(Rt))}};function ct(rt){o||(i&&clearTimeout(i),i=setTimeout(K,rt))}return C?.addEventListener("message",_),K(),()=>{o=!0,i&&clearTimeout(i),C?.removeEventListener("message",_),C?.close()}}function _s(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Ls(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class ho{target;waitForTarget;resolveTarget=()=>{};signOutTargetUrl="/";#t;constructor(){this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}setTarget(e,s){this.target=e,this.signOutTargetUrl=s.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw _s("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ls("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw _s("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Ls("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(e=>e.getProfileInfo())}async getBackstageIdentity(){const e=await this.waitForTarget.then(s=>s.getBackstageIdentity());return e.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${e.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),e}async getCredentials(){return this.waitForTarget.then(e=>e.getCredentials())}async getIdToken(){return this.waitForTarget.then(e=>{if(!e.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Ls("getIdToken"),e.getIdToken()})}async signOut(){await this.waitForTarget.then(e=>e.signOut()),await this.#t?.(),window.location.href=this.signOutTargetUrl}enableCookieAuth(e){if(this.#t)return;const s=uo(e);this.#t=async()=>{s();const o=await e.discoveryApi.getBaseUrl("app");try{await fetch(`${o}/.backstage/auth/v1/cookie`,{method:"DELETE",credentials:"include"})}catch{}}}}var go=t(1394);function po(r,e,s){if(r!==void 0){const i=s.find(c=>c.id===r);if(i)return i}if(e){const i=s.find(c=>c.variant==="dark");if(i)return i}const o=s.find(i=>i.variant==="light");return o||s[0]}const fo=()=>{const r=(0,d.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,s]=(0,d.useState)(r.matches);return(0,d.useEffect)(()=>{const o=i=>{s(i.matches)};return r.addListener(o),()=>{r.removeListener(o)}},[r]),e};function qs({children:r}){const e=(0,On.gf)(Hn),s=(0,go.A)(e.activeThemeId$(),e.getActiveThemeId()),o=window.matchMedia?fo():!1,i=po(s,o,e.getInstalledThemes());if(!i)throw new Error("App has no themes");return(0,a.jsx)(i.Provider,{children:r})}const tr=async()=>mo();function mo(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=new Array,s=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(s){if(!Array.isArray(s))throw new Error("Static configuration has invalid format");e.push(...s)}const o=document.querySelectorAll('script[type="backstage.io/config"]');if(o.length>0)for(const c of o)try{const S=c.textContent;if(!S)throw new Error("tag is empty");let C;try{C=JSON.parse(S)}catch(R){throw new Error(`failed to parse config; ${R}`)}if(!Array.isArray(C))throw new Error("data is not an array");e.push(...C)}catch(S){throw new Error(`Failed to load config from script tag, ${S.message}`)}else if(r!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const c=JSON.parse(r);Array.isArray(c)?e.push(...c):e.push({data:c,context:"env"})}catch(c){throw new Error(`Failed to load runtime configuration, ${c}`)}const i=window.__APP_CONFIG__;return i&&e.push({context:"window",data:i}),e}class vo{apis=[];add(e,s){return this.apis.push([e.id,s]),s}build(){return new pn(new Map(this.apis))}}class pn{apis;static builder(){return new vo}static from(e){return new pn(new Map(e.map(([s,o])=>[s.id,o])))}static with(e,s){return new pn(new Map([[e.id,s]]))}constructor(e){this.apis=e}with(e,s){return new pn(new Map([...this.apis,[e.id,s]]))}get(e){return this.apis.get(e.id)}}function yo(r){const e=new Map,s=new Map;for(const o of r){for(const[i,c]of Object.entries(o.routes??{})){const S=`${o.getId()}.${i}`;if(e.has(S))throw new Error(`Unexpected duplicate route '${S}'`);e.set(S,c)}for(const[i,c]of Object.entries(o.externalRoutes??{})){const S=`${o.getId()}.${i}`;if(s.has(S))throw new Error(`Unexpected duplicate external route '${S}'`);s.set(S,c)}}return{routes:e,externalRoutes:s}}function Eo(r,e,s){const o=yo(s),i=new Map,c=new Set;r&&r({bind:(R,K)=>{for(const[_,ct]of Object.entries(K)){const rt=R[_];if(!rt)throw new Error(`Key ${_} is not an existing external route`);if(!ct&&!rt.optional)throw new Error(`External route ${_} is required but was ${ct===!1?"disabled":"not provided"}`);ct?i.set(rt,ct):ct===!1&&c.add(rt)}}});const S=e.getOptionalConfig("app.routes.bindings")?.get();if(S)for(const[C,R]of Object.entries(S)){if(!Ao(R))throw new Error(`Invalid config at app.routes.bindings['${C}'], value must be a non-empty string or false`);const K=o.externalRoutes.get(C);if(!K)throw new Error(`Invalid config at app.routes.bindings, '${C}' is not a valid external route`);if(!(i.has(K)||c.has(K)))if(R===!1)c.add(K);else{const _=o.routes.get(R);if(!_)throw new Error(`Invalid config at app.routes.bindings['${C}'], '${R}' is not a valid route`);i.set(K,_)}}for(const C of o.externalRoutes.values())if(!i.has(C)&&!c.has(C)){const R="getDefaultTarget"in C?C.getDefaultTarget():void 0;if(R){const K=o.routes.get(R);K&&i.set(C,K)}}return i}function Ao(r){return!!(r===!1||typeof r=="string"&&r)}function wn(){const[r]=(0,m.AV)((0,a.jsx)(m.qh,{index:!0,element:(0,a.jsx)("div",{})}));return!r.index}const er=(0,d.createContext)(void 0);var nr=t(82266),sr=t(93368),xo=t(25862);const Co=(r,e)=>{try{const o=(0,Tn.ue)(e,{pathname:r})?.filter(R=>R?.route.routeRefs?.size>0).pop(),i=o?.route;if(!i||i.path===""&&r!=="/")return;let c;i.routeRefs.size===1&&(c=i.routeRefs.values().next().value);let S;i.plugins.size===1&&(S=i.plugins.values().next().value);const C=Object.entries(o?.params||{}).reduce((R,[K,_])=>(_!==void 0&&K!=="*"&&(R[K]=_),R),{});return{extension:"App",pluginId:S?.getId()||"root",...c?{routeRef:c.id}:{},_routeNodeType:i.element,params:C}}catch{return}},bo=({pathname:r,search:e,hash:s,attributes:o})=>{const i=(0,sr.s)();return(0,d.useEffect)(()=>{i.captureEvent("navigate",`${r}${e}${s}`,{attributes:o})},[i,r,e,s,o]),null},Zn=({routeObjects:r})=>{const{pathname:e,search:s,hash:o}=(0,m.zy)(),{params:i,...c}=Co(e,r)||{params:{}};return(0,a.jsx)(xo.Ig,{attributes:c,children:(0,a.jsx)(bo,{pathname:e,search:s,hash:o,attributes:i})})};function So(r){return wn()?Ms(r):""}function Ms(r){let{pathname:e}=new URL(r.getOptionalString("app.baseUrl")??"/","http://sample.dev");return e=e.replace(/\/*$/,""),e}function rr({component:r,appIdentityProxy:e,children:s}){const[o,i]=(0,d.useState)(),c=(0,On.gf)(kt.U),S=Ms(c);return o?(e.setTarget(o,{signOutTargetUrl:S||"/"}),(0,a.jsx)(a.Fragment,{children:s})):(0,a.jsx)(r,{onSignInSuccess:i})}function or(r){const{Router:e,SignInPage:s}=(0,nr.n)().getComponents(),o=(0,On.gf)(kt.U),i=Ms(o),c=`${i}/*`,S=(0,d.useContext)(er);if(!S)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:C,appIdentityProxy:R}=S;return s?wn()?(0,a.jsxs)(e,{children:[(0,a.jsx)(Zn,{routeObjects:C}),(0,a.jsx)(rr,{component:s,appIdentityProxy:R,children:(0,a.jsx)(m.BV,{children:(0,a.jsx)(m.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(Zn,{routeObjects:C}),(0,a.jsx)(rr,{component:s,appIdentityProxy:R,children:r.children})]}):(R.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:i||"/"}),wn()?(0,a.jsxs)(e,{children:[(0,a.jsx)(Zn,{routeObjects:C}),(0,a.jsx)(m.BV,{children:(0,a.jsx)(m.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(Zn,{routeObjects:C}),r.children]}))}(0,be.h)(or,"core.type","AppRouter");const Rn="language",Ye="en";class Jn{static create(e){const s=e?.availableLanguages??[Ye];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(Ye))throw new Error(`Supported languages must include '${Ye}'`);const o=e?.defaultLanguage??Ye;if(!s.includes(o))throw new Error(`Initial language must be one of the supported languages, got '${o}'`);return new Jn(s,o)}static createWithStorage(e){const s=Jn.create(e);if(!window.localStorage)return s;const o=window.localStorage.getItem(Rn),{languages:i}=s.getAvailableLanguages();return o&&i.includes(o)&&s.setLanguage(o),s.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(Rn)&&window.localStorage.setItem(Rn,c)}),window.addEventListener("storage",c=>{if(c.key===Rn){const S=localStorage.getItem(Rn)??void 0;S&&s.setLanguage(S)}}),s}#t;#n;#e;constructor(e,s){this.#t=e,this.#n=s,this.#e=new z({language:this.#n})}getAvailableLanguages(){return{languages:this.#t.slice()}}setLanguage(e){const s=e??Ye;if(s!==this.#n){if(s&&!this.#t.includes(s))throw new Error(`Failed to change language to '${s}', available languages are '${this.#t.join("', '")}'`);this.#n=s,this.#e.next({language:s})}}getLanguage(){return{language:this.#n}}language$(){return this.#e}}var Oo=t(47304),To=t(99833),ar=t(93184);function ir(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}class Po{onLoad;#t;#n;#e;constructor(e){this.onLoad=e,this.#t=new Set,this.#n=new Map,this.#e=new Map}addTranslationResource(e){const s=(0,To.Y)(e);for(const o of s.resources){const i=this.#s(o.language,s.id);this.#e.has(i)||this.#e.set(i,o.loader)}}#s(e,s){return`${e}/${s}`}needsLoading(e,s){const o=this.#s(e,s);return this.#e.get(o)?!this.#t.has(o):!1}async load(e,s){const o=this.#s(e,s),i=this.#e.get(o);if(!i||this.#t.has(o))return;const c=this.#n.get(o);if(c){await c;return}const S=i().then(C=>{this.onLoad({language:e,namespace:s,messages:C.messages}),this.#t.add(o)},C=>{throw this.#t.add(o),C});this.#n.set(o,S),await S}}class js{static create(e){const{languages:s}=e.languageApi.getAvailableLanguages(),o=(0,Oo.Q_)({fallbackLng:Ye,supportedLngs:s,interpolation:{escapeValue:!1},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(o.init(),!o.isInitialized)throw new Error("i18next was unexpectedly not initialized");const{language:i}=e.languageApi.getLanguage();i!==Ye&&o.changeLanguage(i);const c=new Po(R=>{o.addResourceBundle(R.language,R.namespace,ir(R.messages),!1,!0)}),S=e?.resources||[];for(let R=S.length-1;R>=0;R--){const K=S[R];K.$$type==="@backstage/TranslationResource"?c.addTranslationResource(K):K.$$type==="@backstage/TranslationMessages"&&o.addResourceBundle(Ye,K.id,ir(K.messages),!0,!1)}const C=new js(o,c,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:R})=>{C.#o(R)}),C}#t;#n;#e;#s=new Set;#r=new Set;constructor(e,s,o){this.#t=e,this.#n=s,this.#e=o}getTranslation(e){const s=(0,ar.v)(e);return this.#i(s),this.#a(s)}translation$(e){const s=(0,ar.v)(e);return this.#i(s),new(Q())(o=>{let i={};const c=()=>{i={};const C=i;this.#n.load(this.#e,s.id).then(()=>{if(C===i){const R=this.#a(s);R.ready&&o.next(R)}},R=>{C===i&&o.error(Array.isArray(R)?R[0]:R)})},S=()=>{const C=this.#a(s);C.ready?o.next(C):c()};return this.#n.needsLoading(this.#e,s.id)&&c(),this.#r.add(S),()=>{this.#r.delete(S)}})}#o(e){this.#e!==e&&(this.#e=e,this.#t.changeLanguage(e),this.#r.forEach(s=>s()))}#a(e){return this.#n.needsLoading(this.#e,e.id)?{ready:!1}:{ready:!0,t:this.#t.getFixedT(null,e.id)}}#i(e){if(this.#s.has(e.id))return;this.#s.add(e.id);const s=e.getDefaultMessages();this.#t.addResourceBundle(Ye,e.id,s,!0,!1);const o=e.getDefaultResource();o&&this.#n.addTranslationResource(o)}}function cr(r){const e=new URL(r);return e.protocol=document.location.protocol,e.hostname=document.location.hostname,e.port=document.location.port,e.toString().replace(/\/$/,"")}function wo(r){const e=hn.fromConfigs(r),s=e.getOptionalString("app.baseUrl"),o=e.getOptionalString("backend.baseUrl");let i=r,c,S;if(s&&o){const C=new URL(s).origin,R=new URL(o).origin;if(C===R){const K=cr(o);o!==K&&(c=K)}}if(s){const C=cr(s);s!==C&&(S=C)}return(S||c)&&(i=i.concat({data:{app:S&&{baseUrl:S},backend:c&&{baseUrl:c}},context:"relative-resolver"})),i}function Ro(){return(document.querySelector('meta[name="backstage-app-mode"]')?.getAttribute("content")??"public")==="protected"}function Io(r,e,s){const o=!!r,i=(0,ue.A)(r||(()=>Promise.resolve([])));let c;if(o&&i.loading){const{Progress:R}=e;c=(0,a.jsx)(R,{})}else if(i.error){const{BootErrorPage:R}=e;c=(0,a.jsx)(R,{step:"load-config",error:i.error})}const{ThemeProvider:S=qs}=e;return c?{node:(0,a.jsx)(qe,{apis:pn.with(Hn,s),children:(0,a.jsx)(S,{children:c})})}:{api:hn.fromConfigs(i.value?.length?wo(i.value):[])}}class Do{app;constructor(e){this.app=e}getPlugins(){return this.app.getPlugins()}getSystemIcon(e){return this.app.getSystemIcon(e)}getSystemIcons(){return this.app.getSystemIcons()}getComponents(){return this.app.getComponents()}}class Lo{apiHolder;configApi;apis;icons;plugins;featureFlags;components;themes;configLoader;defaultApis;bindRoutes;appLanguageApi;translationResources;appIdentityProxy=new ho;apiFactoryRegistry;constructor(e){this.apis=e.apis??[],this.icons=e.icons,this.plugins=new Set(e.plugins??[]),this.featureFlags=e.featureFlags??[],this.components=e.components,this.themes=e.themes,this.configLoader=e.configLoader??tr,this.defaultApis=e.defaultApis??[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new Nr,this.appLanguageApi=Jn.createWithStorage({defaultLanguage:e.__experimentalTranslations?.defaultLanguage,availableLanguages:e.__experimentalTranslations?.availableLanguages}),this.translationResources=e.__experimentalTranslations?.resources??[]}getPlugins(){return Array.from(this.plugins)}getSystemIcon(e){return this.icons[e]}getSystemIcons(){return this.icons}getComponents(){return this.components}createRoot(e){const s=this.getProvider();return()=>(0,a.jsx)(s,{children:e})}#t=!1;getProvider(){if(this.#t)throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");this.#t=!0;const e=new Do(this);let s,o;return({children:c})=>{const S=(0,d.useRef)(!0),C=(0,d.useMemo)(()=>zn.createWithStorage(this.themes),[]),{routing:R,featureFlags:K}=(0,d.useMemo)(()=>{const Vt=wn();Vt&&console.warn(`
|
|
4
4
|
DEPRECATION WARNING: React Router Beta is deprecated and support for it will be removed in a future release.
|
|
5
5
|
Please migrate to use React Router v6 stable.
|
|
6
6
|
See https://backstage.io/docs/tutorials/react-router-stable-migration
|
|
7
|
-
`);const Oe=kr({root:c,discoverers:[Wr,Kr],collectors:{routing:Vt?Vr:Hr,collectedPlugins:zr,featureFlags:Gr}});return Oe.collectedPlugins.forEach(Me=>this.plugins.add(Me)),this.verifyPlugins(this.plugins),this.getApiHolder(),Oe},[c]),_=Io(this.configLoader,this.components,C),ct="api"in _;if(ct){const{api:Vt}=_;this.configApi=Vt}if("node"in _)return _.node;if(o)throw o;if(!s)try{s=Eo(this.bindRoutes,_.api,this.plugins),no(R.paths,R.parents),so(s,this.plugins)}catch(Vt){throw o=Vt,Vt}if(ct&&S.current){S.current=!1;const Vt=this.getApiHolder().get(gn.B);if(Vt){for(const De of this.featureFlags)Vt.registerFlag({...De,pluginId:""});for(const De of this.plugins.values())if("getFeatureFlags"in De)for(const cn of De.getFeatureFlags())Vt.registerFlag({name:cn.name,pluginId:De.getId()});else for(const cn of De.output())cn.type==="feature-flag"&&Vt.registerFlag({name:cn.name,pluginId:De.getId()});const Oe=Vt.getRegisteredFlags(),Me=new Set(Oe.map(De=>De.name));for(const De of W)Me.has(De)||Vt.registerFlag({name:De,pluginId:""})}}const{ThemeProvider:rt=qs,Progress:dt}=this.components,Rt=this.getApiHolder();if(Ro()){const Vt=Rt.get(Pe.m),Oe=Rt.get(de.a),Me=Rt.get(Xt.I);if(!Vt||!Oe||!Me)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Vt,fetchApi:Oe,discoveryApi:Me})}return(0,a.jsx)(qe,{apis:Rt,children:(0,a.jsx)(oo,{appContext:e,children:(0,a.jsx)(rt,{children:(0,a.jsx)(eo,{routePaths:R.paths,routeParents:R.parents,routeObjects:R.objects,routeBindings:s,basePath:So(_.api),children:(0,a.jsx)(er.Provider,{value:{routeObjects:R.objects,appIdentityProxy:this.appIdentityProxy},children:(0,a.jsx)(d.Suspense,{fallback:(0,a.jsx)(dt,{}),children:c})})})})})})}}getRouter(){return or}getApiHolder(){if(this.apiHolder){for(const e of this.plugins)for(const s of e.getApis())this.apiFactoryRegistry.get(s.api)||this.apiFactoryRegistry.register("default",s);return Ds.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:Hn,deps:{},factory:()=>zn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:kt.U,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:ae.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:zs,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:Fr.J,deps:{languageApi:zs},factory:({languageApi:e})=>js.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:gn.B,deps:{},factory:()=>new $r});for(const e of this.defaultApis)this.apiFactoryRegistry.register("default",e);for(const e of this.plugins)for(const s of e.getApis())if(!this.apiFactoryRegistry.register("default",s))throw new Error(`Plugin ${e.getId()} tried to register duplicate or forbidden API factory for ${s.api}`);for(const e of this.apis)if(!this.apiFactoryRegistry.register("app",e))throw new Error(`Duplicate or forbidden API factory for ${e.api} in app`);return Ds.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new Ds(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const s=new Set;for(const o of e){const i=o.getId();if(s.has(i))throw new Error(`Duplicate plugin found '${i}'`);s.add(i)}}}function Mo(r){return new Lo(r)}function jo(r){return Mo({...r,apis:r?.apis??[],bindRoutes:r?.bindRoutes,components:{...L,...r?.components},configLoader:r?.configLoader,defaultApis:as,icons:{...Es,...r?.icons},plugins:r?.plugins??[],featureFlags:r?.featureFlags??[],themes:r?.themes??qt})}var Xn=t(82442);let lr=!1;const dr=r=>{const e=(0,nr.n)(),{NotFoundErrorPage:s}=e.getComponents(),o=(0,d.useMemo)(()=>wn(),[]),c=[...(0,Xn.O)(r.children,S=>S.getElements().flatMap(C=>{let R=C.props.path;if(R==="")return[];R=R?.replace(/\/\*$/,"")??"/";let W=o?C:C.props.element;return!o&&!W&&(W=C,lr||(console.warn("DEPRECATION WARNING: All elements within <FlatRoutes> must be of type <Route> with an element prop. Existing usages of <Navigate key=[path] to=[to] /> should be replaced with <Route path=[path] element={<Navigate to=[to] />} />."),lr=!0)),[{path:R,element:W,children:C.props.children?[{path:R==="/"?"/":"*",element:C.props.children}]:void 0}]}).sort((C,R)=>R.path.localeCompare(C.path)).map(C=>({...C,path:C.path==="/"?"/":`${C.path}/*`}))),{path:"*",element:(0,a.jsx)(s,{})}];return(0,m.Ye)(c)};(0,be.h)(dr,"core.type","FlatRoutes");var fn=t(6820),Bo=t(78692),Uo=t(86519);function $o(r){return!r.cursor}function Fo(r,e){if(!r.length)return[];const{maxCountPerChunk:s=1e3,maxStringLengthPerChunk:o=90*2**10,extraStringLengthPerRef:i=3}=e??{},c=[];let S=0,C=0,R=0;for(let W=0;W<r.length;++W){const _=r[W].length+i;R>0&&(C+_>o||R+1>s)&&(c.push(r.slice(S,W)),S=W,C=0,R=0),C+=_,R+=1}return c.push(r.slice(S,r.length)),c}const ve="catalog";var ye=t(94214);class No{discoveryApi;fetchApi;constructor(e){this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:yn()}}async analyzeLocation(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/analyze-location").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async createLocation(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/locations{?dryRun}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async deleteEntityByUid(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"DELETE"})}async deleteLocation(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"DELETE"})}async getEntities(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entities{?fields,limit,filter*,offset,after,order*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntitiesByQuery(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entities/by-query{?fields,limit,offset,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntitiesByRefs(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entities/by-refs{?filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async getEntityAncestryByName(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entities/by-name/{kind}/{namespace}/{name}/ancestry").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityByName(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entities/by-name/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityByUid(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityFacets(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entity-facets{?facet*,filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocation(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocationByEntity(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/locations/by-entity/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocations(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/locations").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async refreshEntity(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/refresh").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async validateEntity(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/validate-entity").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}}class ko{apiClient;constructor(e){this.apiClient=new No(e)}async getEntityAncestors(e,s){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,fn.KU)(e.entityRef)},s))}async getLocationById(e,s){return await this.requestOptional(await this.apiClient.getLocation({path:{id:e}},s))}async getLocationByEntity(e,s){return await this.requestOptional(await this.apiClient.getLocationByEntity({path:(0,fn.KU)(e)},s))}async getEntities(e,s){const{filter:o=[],fields:i=[],order:c,offset:S,limit:C,after:R}=e??{},W=[];if(c)for(const ct of[c].flat())ct&&W.push(`${ct.order}:${ct.field}`);return{items:await this.requestRequired(await this.apiClient.getEntities({query:{fields:i,limit:C,filter:this.getFilterValue(o),offset:S,after:R,order:c?W:void 0}},s))}}async getEntitiesByRefs(e,s){const o=async c=>{const S=await this.apiClient.getEntitiesByRefs({body:{entityRefs:c,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},s);if(!S.ok)throw await Xe.o.fromResponse(S);return(await S.json()).items.map(R=>R??void 0)};let i;for(const c of Fo(e.entityRefs)){const S=await o(c);i?i.push(...S):i=S}return{items:i??[]}}async queryEntities(e={},s){const o={};if($o(e)){const{fields:i=[],filter:c,limit:S,offset:C,orderFields:R,fullTextFilter:W}=e;o.filter=this.getFilterValue(c),S!==void 0&&(o.limit=S),C!==void 0&&(o.offset=C),R!==void 0&&(o.orderField=(Array.isArray(R)?R:[R]).map(({field:ct,order:rt})=>`${ct},${rt}`)),i.length&&(o.fields=i);const _=W?.term?.trim();_&&(o.fullTextFilterTerm=_),W?.fields?.length&&(o.fullTextFilterFields=W.fields)}else{const{fields:i=[],limit:c,cursor:S}=e;o.cursor=S,c!==void 0&&(o.limit=c),i.length&&(o.fields=i)}return this.apiClient.getEntitiesByQuery({query:o},s).then(i=>i.json())}async getEntityByRef(e,s){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,fn.KU)(e)},s))}async getEntityByName(e,s){const{kind:o,namespace:i="default",name:c}=e;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:o,namespace:i,name:c}},s))}async refreshEntity(e,s){const o=await this.apiClient.refreshEntity({body:{entityRef:e}},s);if(o.status!==200)throw new Error(await o.text())}async getEntityFacets(e,s){const{filter:o=[],facets:i}=e;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:i,filter:this.getFilterValue(o)}},s))}async addLocation(e,s){const{type:o="url",target:i,dryRun:c}=e,S=await this.apiClient.createLocation({body:{type:o,target:i},query:{dryRun:c?"true":void 0}},s);if(S.status!==201)throw new Error(await S.text());const{location:C,entities:R,exists:W}=await S.json();if(!C)throw new Error(`Location wasn't added: ${i}`);return{location:C,entities:R,exists:W}}async getLocationByRef(e,s){return(await this.requestRequired(await this.apiClient.getLocations({},s))).map(i=>i.data).find(i=>e===(0,Bo.KL)(i))}async removeLocationById(e,s){await this.requestIgnored(await this.apiClient.deleteLocation({path:{id:e}},s))}async removeEntityByUid(e,s){await this.requestIgnored(await this.apiClient.deleteEntityByUid({path:{uid:e}},s))}async validateEntity(e,s,o){const i=await this.apiClient.validateEntity({body:{entity:e,location:s}},o);if(i.ok)return{valid:!0};if(i.status!==400)throw await Xe.o.fromResponse(i);const{errors:c=[]}=await i.json();return{valid:!1,errors:c}}async requestIgnored(e){if(!e.ok)throw await Xe.o.fromResponse(e)}async requestRequired(e){if(!e.ok)throw await Xe.o.fromResponse(e);return e.json()}async requestOptional(e){if(!e.ok){if(e.status===404)return;throw await Xe.o.fromResponse(e)}return await e.json()}getFilterValue(e=[]){const s=[];for(const o of[e].flat()){const i=[];for(const[c,S]of Object.entries(o))for(const C of[S].flat())C===Uo.c?i.push(c):typeof C=="string"&&i.push(`${c}=${C}`);i.length&&s.push(i.join(","))}return s}}var ur=t(7341),Wo=t(18),Ko=t(82292),hr=t(29207),mn=t(95203),zo=t(9803),Ie=t(88758),Ho=t(54560),vn=t(45250);async function Vo({storageApi:r}){const e=r.forBucket("settings"),s=r.forBucket("starredEntities"),o=e.snapshot("starredEntities").value;if(!(0,vn.isArray)(o))return;const i=new Set(s.snapshot("entityRefs").value??[]);o.filter(vn.isString).map(c=>c.split(":")).filter(c=>c.length===4&&c[0]==="entity").map(([c,S,C,R])=>(0,fn.U2)({kind:S,namespace:C,name:R})).forEach(c=>i.add(c)),await s.set("entityRefs",Array.from(i)),await e.remove("starredEntities")}class Go{settingsStore;starredEntities;constructor(e){Vo(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities"),this.starredEntities=new Set(this.settingsStore.snapshot("entityRefs").value??[]),this.settingsStore.observe$("entityRefs").subscribe({next:s=>{this.starredEntities=new Set(s.value??[]),this.notifyChanges()}})}async toggleStarred(e){this.starredEntities.has(e)?this.starredEntities.delete(e):this.starredEntities.add(e),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}subscribers=new Set;observable=new(Q())(e=>(e.next(new Set(this.starredEntities)),this.subscribers.add(e),()=>{this.subscribers.delete(e)}));notifyChanges(){for(const e of this.subscribers)e.next(new Set(this.starredEntities))}}function Bs(r){const{years:e=0,months:s=0,weeks:o=0,days:i=0,hours:c=0,minutes:S=0,seconds:C=0,milliseconds:R=0}=r;return((((e*365+s*30+o*7+i)*24+c)*60+S)*60+C)*1e3+R}var Yo=t(25033),Qo=t.n(Yo),Zo=t(25295),Jo=t.n(Zo),Xo=t(88083);const _o={seconds:10},qo={milliseconds:50},ta={api:jn.A,component:Un.A,system:Dn.A,resource:$n.A,domain:An.A,location:Bn.A,user:Cn.A,group:xn.A,template:Fn.A};function gr(r){return{async:r.async,render:({entityRef:e,entity:s,context:o})=>({snapshot:(0,Xo.T)(s||e,o),loadEntity:r.async})}}class _n{static createLocal(){return new _n({renderer:gr({async:!1})})}static create(e){return new _n(e)}#t;#n;#e;#s;#r;constructor(e){const s=e.cacheTtl??_o,o=e.batchDelay??qo,i=e.renderer??gr({async:!0}),c={};if(Object.entries(ta).forEach(([S,C])=>{c[S.toLocaleLowerCase("en-US")]=C}),Object.entries(e.kindIcons??{}).forEach(([S,C])=>{c[S.toLocaleLowerCase("en-US")]=C}),i.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");this.#e=this.#a({cacheTtl:s,batchDelay:o,renderer:i,catalogApi:e.catalogApi})}this.#n=Bs(s),this.#t=new Map,this.#s=c,this.#r=i}forEntity(e,s){const{entityRef:o,kind:i,entity:c,needsLoad:S}=this.#o(e),C=rt=>{const{snapshot:dt}=this.#r.render({entityRef:o,loading:rt.loading,entity:rt.entity,context:s||{}});return{...dt,entityRef:o,Icon:this.#i(dt.Icon,i)}};let R;try{R=C({loading:S,entity:c})}catch{R={primaryTitle:o,entityRef:o}}if(!S)return{snapshot:R,promise:Promise.resolve(R)};const W=Promise.resolve().then(()=>this.#e?.load(o)).then(rt=>C({loading:!1,entity:rt??c})).catch(()=>{}),_=new(Q())(rt=>{let dt=!1;return W.then(Rt=>{Rt&&rt.next(Rt)}).finally(()=>{dt||rt.complete()}),()=>{dt=!0}}),ct=W.then(rt=>rt??R);return{snapshot:R,update$:_,promise:ct}}#o(e){if(typeof e!="string")return{entity:e,kind:e.kind,entityRef:(0,fn.U2)(e),needsLoad:!1};const s=this.#t.get(e),o=s?.entity,c=(!s||Date.now()-s.updatedAt>this.#n)&&this.#r.async!==!1&&this.#e!==void 0;return{entity:o,kind:(0,fn.KU)(e).kind,entityRef:e,needsLoad:c}}#a(e){const s=Bs(e.cacheTtl),o=Bs(e.batchDelay);return new(Qo())(async i=>{const{items:c}=await e.catalogApi.getEntitiesByRefs({entityRefs:i,fields:["kind","metadata.name","metadata.namespace","metadata.title","metadata.description","spec.profile.displayName","spec.type"]}),S=Date.now();return i.forEach((C,R)=>{this.#t.set(C,{updatedAt:S,entity:c[R]})}),c},{name:"DefaultEntityPresentationApi",cacheMap:new(Jo())(s),maxBatchSize:100,batchScheduleFn:o?i=>setTimeout(i,o):void 0})}#i(e,s){return e||(e===!1?!1:this.#s[s.toLocaleLowerCase("en-US")])}}const Se=(0,zo.i)({id:"catalog",apis:[(0,Mt.b)({api:ur.v,deps:{discoveryApi:Xt.I,fetchApi:de.a},factory:({discoveryApi:r,fetchApi:e})=>new ko({discoveryApi:r,fetchApi:e})}),(0,Mt.b)({api:Wo.a,deps:{storageApi:Ve},factory:({storageApi:r})=>new Go({storageApi:r})}),(0,Mt.b)({api:Ko.n,deps:{catalogApi:ur.v},factory:({catalogApi:r})=>_n.create({catalogApi:r})})],routes:{catalogIndex:mn.rQ,catalogEntity:hr.s},externalRoutes:{createComponent:mn.qP,viewTechDoc:mn.UJ,createFromTemplate:mn.Zg,unregisterRedirect:mn.pS}}),gi=Se.provide((0,Ie.QJ)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(3720),t.e(5184),t.e(2177)]).then(t.bind(t,62177)).then(r=>r.CatalogPage),mountPoint:mn.rQ})),ea=Se.provide((0,Ie.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(r=>r.CatalogEntityPage),mountPoint:hr.s})),pi=Se.provide((0,Ie.NC)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(3720),t.e(1902),t.e(5724)]).then(t.bind(t,65724)).then(r=>r.AboutCard)}})),fi=Se.provide((0,Ie.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),mi=Se.provide((0,Ie.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),vi=Se.provide((0,Ie.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),yi=Se.provide((0,Ie.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),Ei=Se.provide((0,Ie.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),Ai=Se.provide((0,Ie.NC)({name:"EntityHasSubdomainsCard",component:{lazy:()=>t.e(6415).then(t.bind(t,46415)).then(r=>r.HasSubdomainsCard)}})),xi=Se.provide((0,Ie.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),Ci=Se.provide((0,Ie.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),bi=Se.provide((0,Ie.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),Si=Se.provide((0,Ie.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),Oi=Se.provide((0,Ie.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),Ti=Se.provide((0,Ho.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var pr=t(3347),fr=t(26679);class na{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:o}){this.configApi=e,this.discoveryApi=s,this.identityApi=o}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(e,s){const i=`${await this.getApiOrigin()}/${s}`,c=await fetch(`${i.endsWith("/")?i:`${i}/`}index.html`);if(c.status===404)throw new Error("Page not found");return c.text()}async syncEntityDocs(e){return"cached"}async getBaseUrl(e,s,o){const i=await this.getApiOrigin();return new URL(e,`${i}/${o}`).toString()}}class sa{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:o}){this.configApi=e,this.discoveryApi=s,this.identityApi=o}async getCookie(){return{expiresAt:new Date(Date.now()+6e5).toISOString()}}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(e){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(e){return{site_name:"Live preview environment",site_description:""}}}const ra=[(0,Mt.b)({api:fr.s,deps:{configApi:kt.U,discoveryApi:Xt.I,identityApi:ae.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new na({configApi:r,discoveryApi:e,identityApi:s})}),(0,Mt.b)({api:fr.l,deps:{configApi:kt.U,discoveryApi:Xt.I,identityApi:ae.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new sa({configApi:r,discoveryApi:e,identityApi:s})}),(0,Mt.b)({api:pr.Y,deps:{configApi:kt.U},factory:({configApi:r})=>pr.L.fromConfig(r)})],oa={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},aa={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function ia(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function ca(){const r=await tr(),e=await ia();return[...r,{context:"detected",data:e?oa:aa}]}var Qe=t(58837),la=t(3210);const da=(0,Qe.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}}),ua=()=>{const r=da();return(0,a.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,a.jsx)("path",{className:r.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"})})},ha=(0,Qe.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}}),ga=()=>{const r=ha();return(0,a.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,a.jsx)("path",{className:r.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"})})};var Ee=t(72664);const mr={isOpen:!1,setOpen:()=>{}},vr=(0,d.createContext)(mr),yr=(0,ie.tK)("sidebar-open-state-context");function Er(r){const{children:e,value:s}=r;return(0,a.jsx)(vr.Provider,{value:s,children:(0,a.jsx)(yr.Provider,{value:(0,Re.B)({1:s}),children:e})})}const Us=()=>{const r=(0,d.useContext)(yr),e=(0,d.useContext)(vr);if(r===void 0)return e||mr;const s=r.atVersion(1);if(s===void 0)throw new Error("No context found for version 1.");return s};var Ar=t(72072),xr=t(73524),tn=t(10394),Cr=t(5893),pa=t(53373),an=t.n(pa),fa=t(1125),br=t(29365),ma=t(73845),$s=t(72501),va=t(32881),ya=t(27326),Ea=t(13085);const Sr=(0,d.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var Fs=t(34435);const Aa=(0,Qe.A)(r=>({root:{flexGrow:0,margin:r.spacing(0,2),color:r.palette.navigation.color},selected:e=>({color:`${r.palette.navigation.selectedColor}!important`,borderTop:`solid ${e.sidebarConfig.selectedIndicatorWidth}px ${r.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),xa=r=>{const{to:e,label:s,icon:o,value:i}=r,{sidebarConfig:c}=(0,d.useContext)(Ee.yY),S=Aa({sidebarConfig:c}),C=(0,m.zy)(),{selectedMenuItemIndex:R,setSelectedMenuItemIndex:W}=(0,d.useContext)(Sr),_=(rt,dt)=>{W(dt===R?-1:dt)},ct=i===R&&R>=0||i!==R&&!(R>=0)&&e===C.pathname;return(0,a.jsx)(Ea.A,{"aria-label":s,label:s,icon:o,component:Ar.N_,to:e||C.pathname,onChange:_,value:i,selected:ct,classes:S})},Or=r=>{const{children:e,to:s,label:o,icon:i,value:c}=r,{isMobile:S}=(0,Fs.Ut)();return S?(0,a.jsx)(xa,{to:s,label:o,icon:i,value:c}):(0,a.jsx)(a.Fragment,{children:e})},Tr=(0,Qe.A)(r=>({root:{position:"fixed",backgroundColor:r.palette.navigation.background,color:r.palette.navigation.color,bottom:0,left:0,right:0,zIndex:r.zIndex.snackbar,borderTop:"1px solid #383838","@media print":{display:"none"}},overlay:e=>({background:r.palette.navigation.background,width:"100%",bottom:`${e.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${e.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:r.palette.navigation.color,alignItems:"center",justifyContent:"space-between",padding:r.spacing(2,3)},overlayHeaderClose:{color:r.palette.navigation.color},marginMobileSidebar:e=>({marginBottom:`${e.sidebarConfig.mobileSidebarHeight}px`})})),Ca=r=>(0,vn.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),ba=d.createElement(Or).type,Sa=({children:r,label:e="Menu",open:s,onClose:o})=>{const{sidebarConfig:i}=(0,d.useContext)(Ee.yY),c=Tr({sidebarConfig:i});return(0,a.jsxs)(ma.Ay,{anchor:"bottom",open:s,onClose:o,ModalProps:{BackdropProps:{classes:{root:c.marginMobileSidebar}}},classes:{root:c.marginMobileSidebar,paperAnchorBottom:c.overlay},children:[(0,a.jsxs)(tn.A,{className:c.overlayHeader,children:[(0,a.jsx)($s.A,{variant:"h3",children:e}),(0,a.jsx)(br.A,{onClick:o,classes:{root:c.overlayHeaderClose},children:(0,a.jsx)(va.A,{})})]}),(0,a.jsx)(tn.A,{component:"nav",children:r})]})},Oa=r=>{const{sidebarConfig:e}=(0,d.useContext)(Ee.yY),{children:s}=r,o=Tr({sidebarConfig:e}),i=(0,m.zy)(),[c,S]=(0,d.useState)(-1);(0,d.useEffect)(()=>{S(-1)},[i.pathname]);let C=(0,Xn.O)(s,W=>W.getElements().filter(_=>_.type===ba));if(s)C.length?C=Ca(C):C.push((0,a.jsx)(Or,{icon:(0,a.jsx)(ya.A,{}),children:s},"default_menu"));else return null;const R=c>=0&&!C[c].props.to;return(0,a.jsx)(Er,{value:{isOpen:!0,setOpen:()=>{}},children:(0,a.jsxs)(Sr.Provider,{value:{selectedMenuItemIndex:c,setSelectedMenuItemIndex:S},children:[(0,a.jsx)(Sa,{label:C[c]&&C[c].props.label,open:R,onClose:()=>S(-1),children:C[c]&&C[c].props.children}),(0,a.jsx)(fa.A,{className:o.root,"data-testid":"mobile-sidebar-root",component:"nav",children:C})]})})};var Ta=t(87849),Pa=t(10315);const Pr=(0,Qe.A)(r=>({drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:r.zIndex.appBar,background:r.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"},"@media print":{display:"none"}},drawerWidth:e=>({width:e.sidebarConfig.drawerWidthClosed}),drawerOpen:e=>({width:e.sidebarConfig.drawerWidthOpen,transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var wa=function(r){return r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open",r}(wa||{});const Ra=r=>{const{sidebarConfig:e}=(0,d.useContext)(Ee.yY),{openDelayMs:s=e.defaultOpenDelayMs,closeDelayMs:o=e.defaultCloseDelayMs,disableExpandOnHover:i,children:c}=r,S=Pr({sidebarConfig:e}),C=(0,Cr.A)(Me=>Me.breakpoints.down("md"),{noSsr:!0}),[R,W]=(0,d.useState)(0),_=(0,d.useRef)(),{isPinned:ct,toggleSidebarPinState:rt}=(0,Fs.Ut)(),dt=()=>{ct||i||(_.current&&(clearTimeout(_.current),_.current=void 0),R!==2&&!C&&(_.current=window.setTimeout(()=>{_.current=void 0,W(2)},s),W(1)))},Rt=()=>{ct||i||(_.current&&(clearTimeout(_.current),_.current=void 0),R===1?W(0):R===2&&(_.current=window.setTimeout(()=>{_.current=void 0,W(0)},o)))},Vt=R===2&&!C||ct,Oe=Me=>{Me?(W(2),rt()):(W(0),rt())};return(0,a.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,a.jsx)(Da,{}),(0,a.jsx)(Er,{value:{isOpen:Vt,setOpen:Oe},children:(0,a.jsx)(tn.A,{className:S.root,"data-testid":"sidebar-root",onMouseEnter:i?()=>{}:dt,onFocus:i?()=>{}:dt,onMouseLeave:i?()=>{}:Rt,onBlur:i?()=>{}:Rt,children:(0,a.jsx)(tn.A,{className:an()(S.drawer,S.drawerWidth,{[S.drawerOpen]:Vt}),children:c})})})]})},Ia=r=>{const e=(0,Ee.Rv)(r.sidebarOptions??{}),s=(0,Ee.i8)(r.submenuOptions??{}),{children:o,disableExpandOnHover:i,openDelayMs:c,closeDelayMs:S}=r,{isMobile:C}=(0,Fs.Ut)();return C?(0,a.jsx)(Oa,{children:o}):(0,a.jsx)(Ee.yY.Provider,{value:{sidebarConfig:e,submenuConfig:s},children:(0,a.jsx)(Ra,{openDelayMs:c,closeDelayMs:S,disableExpandOnHover:i,children:o})})};function Da(){const{sidebarConfig:r}=(0,d.useContext)(Ee.yY),{focusContent:e,contentRef:s}=(0,xr.H)(),o=Pr({sidebarConfig:r}),{t:i}=(0,Ta.i)(Pa.O);return s?.current?(0,a.jsx)(y.A,{onClick:e,variant:"contained",className:an()(o.visuallyHidden),children:i("skipToContent")}):null}var La=t(94509),qn=t(44209),Ma=t(79065),ja=t(55704),wr=t(62248);const Ba=(0,Qe.A)(r=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:r.spacing(7)+1},drawer:e=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",opacity:0,[r.breakpoints.up("sm")]:{marginLeft:e.left,transition:r.transitions.create(["margin-left","opacity"],{easing:r.transitions.easing.sharp,duration:e.submenuConfig.defaultOpenDelayMs})},top:0,bottom:0,padding:0,background:r.palette.navigation.submenu?.background??"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:e.submenuConfig.drawerWidthClosed,transitionDelay:`${e.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:e=>({marginLeft:e.left,opacity:1,width:e.submenuConfig.drawerWidthOpen,[r.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:r.spacing(3),left:0,top:0}}),title:{fontSize:r.typography.h5.fontSize,fontWeight:r.typography.fontWeightMedium,color:r.palette.navigation.color,padding:r.spacing(2.5),[r.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),Ua=r=>{const{isOpen:e}=Us(),{sidebarConfig:s,submenuConfig:o}=(0,d.useContext)(Ee.yY),i=e?s.drawerWidthOpen:s.drawerWidthClosed,c=Ba({left:i,submenuConfig:o}),{isHoveredOn:S}=(0,d.useContext)(Ee.U1),[C,R]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{R(S)},[S]),(0,a.jsxs)(tn.A,{className:an()(c.drawer,{[c.drawerOpen]:C}),children:[(0,a.jsx)($s.A,{variant:"h5",component:"span",className:c.title,children:r.title}),r.children]})};var $a=t(45810),Rr=t.n($a);function Ir(r,e,s=!1){const o=new URLSearchParams(e.search).toString(),i=Rr().parse(o),c=new URLSearchParams(r.search).toString(),S=Rr().parse(c),C=s?vn.isEqual:vn.isMatch;return(0,vn.isEqual)(e.pathname,r.pathname)&&C(S,i)}const Fa=r=>(0,Qe.A)(e=>({root:{color:e.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",textTransform:"none"},closed:{width:r.drawerWidthClosed,justifyContent:"center"},open:{[e.breakpoints.up("sm")]:{width:r.drawerWidthOpen}},highlightable:{"&:hover":{background:e.palette.navigation.navItem?.hoverBackground??"#404040"}},highlighted:{background:e.palette.navigation.navItem?.hoverBackground??"#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:r.iconContainerWidth,marginRight:-e.spacing(2),display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"0"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:e.typography.fontWeightBold,fontSize:e.typography.fontSize},searchFieldHTMLInput:{padding:e.spacing(2,0,2)},searchContainer:{width:r.drawerWidthOpen-r.iconContainerWidth},secondaryAction:{width:e.spacing(6),textAlign:"center",marginRight:e.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:e.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${r.selectedIndicatorWidth}px ${e.palette.navigation.indicator}`,color:e.palette.navigation.selectedColor},"&$closed":{width:r.drawerWidthClosed},"& $closedItemIcon":{paddingRight:r.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-r.selectedIndicatorWidth}}}),{name:"BackstageSidebarItem"});function ts(r){return(0,d.useMemo)(()=>Fa(r),[r])()}const Na=(r,e)=>(0,Xn.O)(r.props.children,s=>{let o=!1;return s.getElements().forEach(({props:{to:i,dropdownItems:c}})=>{if(!o){if(c?.length){c.forEach(({to:S})=>o=o||Ir(e,(0,Tn.o1)(S)));return}i&&(o=Ir(e,(0,Tn.o1)(i)))}}),o},[e.pathname]);function Ns(r){return r.to===void 0}const ka=d.createElement(Ua).type,Wa=d.forwardRef(function({to:e,end:s,style:o,className:i,activeStyle:c,caseSensitive:S,activeClassName:C="active","aria-current":R="page",...W},_){let{pathname:ct}=(0,m.zy)(),{pathname:rt}=(0,m.x$)(e);S||(ct=ct.toLocaleLowerCase("en-US"),rt=rt.toLocaleLowerCase("en-US"));let dt=ct===rt;!dt&&!s&&(dt=ct.startsWith(`${rt}/`));const Rt=dt?R:void 0;return(0,a.jsx)(P.N_,{...W,to:e,ref:_,"aria-current":Rt,style:{...o,...dt?c:void 0},className:an()([typeof i!="function"?i:void 0,dt?C:void 0])})}),Dr=(0,d.forwardRef)((r,e)=>{const{icon:s,text:o,hasNotifications:i=!1,hasSubmenu:c=!1,disableHighlight:S=!1,onClick:C,noTrack:R,children:W,className:_,...ct}=r,{sidebarConfig:rt}=(0,d.useContext)(Ee.yY),dt=ts(rt),{isOpen:Rt}=Us(),Vt=!Rt&&c?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},Oe=(0,a.jsxs)(tn.A,{style:Vt,children:[(0,a.jsx)(s,{fontSize:"small"}),!Rt&&c?(0,a.jsx)(wr.A,{fontSize:"small"}):(0,a.jsx)(a.Fragment,{})]}),Me=(0,a.jsx)(La.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!i,className:an()({[dt.closedItemIcon]:!Rt}),children:Oe}),De=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(tn.A,{"data-testid":"login-button",className:dt.iconContainer,children:Me}),o&&(0,a.jsx)($s.A,{variant:"subtitle2",component:"span",className:dt.label,children:o}),(0,a.jsx)("div",{className:dt.secondaryAction,children:W})]}),cn=Rt?De:Me,jr={onClick:C,className:an()(_,dt.root,Rt?dt.open:dt.closed,Ns(r)&&dt.buttonItem,{[dt.highlightable]:!S})},Br=(0,sr.s)(),{pathname:ks}=(0,m.x$)(!Ns(r)&&r.to?r.to:""),Ur=(0,d.useCallback)(li=>{if(!R){const di="click",ui=o??"Sidebar Item",hi=ks?{attributes:{to:ks}}:void 0;Br.captureEvent(di,ui,hi)}C?.(li)},[Br,o,ks,R,C]);return Ns(r)?(0,a.jsx)(y.A,{role:"button","aria-label":o,...jr,ref:e,onClick:Ur,children:cn}):(0,a.jsx)(Wa,{...jr,activeClassName:dt.selected,to:r.to?r.to:"",ref:e,"aria-label":o||r.to,...ct,onClick:Ur,children:cn})}),Ka=({children:r,...e})=>{const{sidebarConfig:s}=(0,d.useContext)(Ee.yY),o=ts(s),[i,c]=(0,d.useState)(!1),S=(0,m.zy)(),C=Na(r,S),R=(0,Cr.A)(rt=>rt.breakpoints.down("sm")),W=()=>{c(!0)},_=()=>{c(!1)},ct=()=>R?i?(0,a.jsx)(ja.A,{fontSize:"small",className:o.submenuArrow}):(0,a.jsx)(Ma.A,{fontSize:"small",className:o.submenuArrow}):!i&&(0,a.jsx)(wr.A,{fontSize:"small",className:o.submenuArrow});return(0,a.jsx)(Ee.U1.Provider,{value:{isHoveredOn:i,setIsHoveredOn:c},children:(0,a.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:_,onTouchStart:i?_:W,onMouseEnter:W,className:an()(i&&o.highlighted),children:[(0,a.jsx)(Dr,{hasSubmenu:!0,className:C?o.selected:"",...e,children:ct()}),i&&r]})})},Lr=(0,d.forwardRef)((r,e)=>{const[s]=(0,Xn.O)(r.children,o=>o.getElements().filter(i=>i.type===ka));return s?(0,a.jsx)(Ka,{...r,children:s}):(0,a.jsx)(Dr,{...r,ref:e})});function Ri(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[s,o]=useState(""),i=ts(e),c=r.icon?r.icon:SearchIcon,S=()=>{r.onSearch(s),o("")},C=ct=>{ct.key==="Enter"&&(ct.preventDefault(),S())},R=ct=>{o(ct.target.value)},W=ct=>{ct.preventDefault(),ct.stopPropagation()},_=ct=>{S(),ct.preventDefault()};return _jsx(Box,{className:i.searchRoot,children:_jsx(Lr,{icon:c,to:r.to,onClick:_,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:s,onClick:W,onChange:R,onKeyDown:C,className:i.searchContainer,InputProps:{disableUnderline:!0,className:i.searchField},inputProps:{className:i.searchFieldHTMLInput}})})})}const Ii=(0,qn.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),Di=(0,qn.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),za=(0,qn.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Ha=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),Li=(0,qn.A)("div")(({theme:r})=>{const e=Ha(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),Mi=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=ts(r),{isOpen:s,setOpen:o}=useSidebarOpenState();if(useMediaQuery(S=>S.breakpoints.down("md"),{noSsr:!0}))return null;const c=()=>{o(!s)};return _jsx(Button,{role:"button",onClick:c,className:e.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:e.arrows,children:s?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},Va=(0,Qe.A)({root:{width:Ee.hC.drawerWidthClosed,height:3*Ee.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:Ee.hC.drawerWidthClosed,marginLeft:24}}),Ga=()=>{const r=Va(),{isOpen:e}=Us();return(0,a.jsx)("div",{className:r.root,children:(0,a.jsx)(Ar.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,a.jsx)(ua,{}):(0,a.jsx)(ga,{})})})},Ya=({children:r})=>(0,a.jsxs)(xr.G,{children:[(0,a.jsxs)(Ia,{children:[(0,a.jsx)(Ga,{}),(0,a.jsx)(za,{}),(0,a.jsx)(Lr,{icon:la.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Qa=t(71677),Za=t(62437),Ja=t(55484),Xa=t(45061),_a=t(67289);const qa=(0,Qe.A)(r=>({headerIcon:{color:r.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:r.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var ti=function(r){return r.LIGHT="light",r.DARK="dark",r}(ti||{});const ei=()=>{const r=(0,On.gf)(Hn),e=qa(),[s,o]=(0,d.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),i={light:{icon:Ja.A,title:"Dark theme"},dark:{icon:Za.A,title:"Light theme"}},{title:c,icon:S}=i[s],C=()=>{o(R=>{const W=R==="light"?"dark":"light";return r.setActiveThemeId(W),W})};return(0,a.jsx)(tn.A,{display:"flex",alignItems:"center",mr:2,children:(0,a.jsx)(Qa.Ay,{title:c,arrow:!0,children:(0,a.jsx)(br.A,{size:"small",onClick:C,children:(0,a.jsx)(S,{className:e.headerIcon})})})})},ni=()=>(0,a.jsxs)(h.Wj,{children:[(0,a.jsx)(Xa.T,{}),(0,a.jsx)(_a.p,{withSearch:!1})]}),si=(0,a.jsx)(ni,{}),Mr=jo({apis:ra,configLoader:ca,plugins:Object.values(n)}),ri=Mr.getProvider(),oi=Mr.getRouter(),ai=h.Ju.provide((0,g.Hr)({name:"ThemeToggleAddon",component:ei,location:p.e.Header})),ii=(0,a.jsxs)(dr,{children:[(0,a.jsx)(m.C5,{to:"/docs/default/component/local/"},"/"),(0,a.jsx)(m.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,a.jsx)(ea,{})}),(0,a.jsx)(m.qh,{path:"/docs",element:(0,a.jsx)(h.$j,{}),children:(0,a.jsx)(u.K,{})}),(0,a.jsxs)(m.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,a.jsx)(h.Wj,{}),children:[si,(0,a.jsx)(g.po,{children:(0,a.jsx)(ai,{})})]})]}),ci=()=>(0,a.jsx)(ri,{children:(0,a.jsx)(oi,{children:(0,a.jsx)(Ya,{children:ii})})});x.createRoot(document.getElementById("root")).render((0,a.jsx)(ci,{}))},43836:(H,b,t)=>{"use strict";t.d(b,{qO:()=>x,tK:()=>d});var n=t(14041),a=t(63544);function d(h){return(0,a.Q)(h,()=>(0,n.createContext)(void 0))}function x(h){return(0,n.useContext)(d(h))}function m(h){return{set(u){globalThis[`__@backstage/${h}__`]=createContext(createVersionedValueMap(u))},reset(){delete globalThis[`__@backstage/${h}__`]}}}},10602:(H,b,t)=>{"use strict";t.d(b,{B:()=>n});function n(a){Object.freeze(a);const d={atVersion(x){return a[x]}};return Object.defineProperty(d,"$map",{configurable:!0,enumerable:!0,get(){return a}}),d}},63544:(H,b,t)=>{"use strict";t.d(b,{Q:()=>x});function n(){return typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")()}const a=n(),d=m=>`__@backstage/${m}__`;function x(m,h){const u=d(m);let g=a[u];return g||(g=h(),a[u]=g,g)}},7341:(H,b,t)=>{"use strict";t.d(b,{v:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.catalog.service"})},82292:(H,b,t)=>{"use strict";t.d(b,{n:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.catalog.entity-presentation"})},88083:(H,b,t)=>{"use strict";t.d(b,{T:()=>m});var n=t(6820),a=t(72348),d=t(46123),x=t.n(d);function m(p,y){const{kind:v,namespace:A,name:T,title:P,description:w,displayName:O,type:j}=u(p),F=(0,n.U2)({kind:v||"unknown",namespace:A||a.oQ,name:T||"unknown"}),L=g({kind:v,namespace:A,name:T,context:y}),Z=[O,P,L].find(N=>N&&typeof N=="string"),G=[Z!==F?F:void 0,j,w].filter(N=>N&&typeof N=="string").join(" | ");return{entityRef:F,primaryTitle:Z,secondaryTitle:G||void 0,Icon:void 0}}const h=p=>!!p&&typeof p=="string";function u(p){if(typeof p=="string"){let y=p.indexOf(":");const v=p.indexOf("/");v!==-1&&v<y&&(y=-1);const A=y===-1?void 0:p.slice(0,y),T=v===-1?void 0:p.slice(y+1,v),P=p.slice(Math.max(y+1,v+1));return{kind:A,namespace:T,name:P}}if(typeof p=="object"&&p!==null){const y=[x()(p,"kind")].find(h),v=[x()(p,"metadata.namespace"),x()(p,"namespace")].find(h),A=[x()(p,"metadata.name"),x()(p,"name")].find(h),T=[x()(p,"metadata.title")].find(h),P=[x()(p,"metadata.description")].find(h),w=[x()(p,"spec.profile.displayName")].find(h),O=[x()(p,"spec.type")].find(h);return{kind:y,namespace:v,name:A,title:T,description:P,displayName:w,type:O}}return{}}function g(p){const y=p.kind?.toLocaleLowerCase("en-US")||"unknown",v=p.namespace||a.oQ,A=p.name||"unknown",T=p.context?.defaultKind?.toLocaleLowerCase("en-US"),P=p.context?.defaultNamespace?.toLocaleLowerCase("en-US");let w=A;return(P&&v.toLocaleLowerCase("en-US")!==P||v!==a.oQ)&&(w=`${v}/${w}`),T&&y.toLocaleLowerCase("en-US")!==T&&(w=`${y}:${w}`),w}},3169:(H,b,t)=>{"use strict";t.d(b,{f:()=>u});var n=t(6820),a=t(72427),d=t(14041),x=t(82292),m=t(88083);function h(g,p,y){const[v,A]=(0,d.useState)(g);return(0,d.useEffect)(()=>{A(g);const T=p?.subscribe({next:P=>{A(P)},complete:()=>{T?.unsubscribe()}});return()=>{T?.unsubscribe()}},y),v}function u(g,p){const v=(0,a.Q2)().get(x.n),A=[v,JSON.stringify(g),JSON.stringify(p||null)],T=(0,d.useMemo)(()=>{if(!v){const P=(0,m.T)(g,p);return{snapshot:P,promise:Promise.resolve(P)}}return v.forEntity(typeof g=="string"||"metadata"in g?g:(0,n.U2)(g),p)},A);return h(T.snapshot,T.update$,[T])}},18:(H,b,t)=>{"use strict";t.d(b,{a:()=>a});var n=t(55309);const a=(0,n.y)({id:"catalog-react.starred-entities"})},54203:(H,b,t)=>{"use strict";t.d(b,{GI:()=>w});var n=t(31085),a=t(14041),d=t(10394),x=t(64947),m=t(73845),h=t(42899),u=t(72501),g=t(5893),p=t(54917),y=t(65859),v=t(64630),A=t(87849);const T=O=>{const j=(0,g.A)(N=>N.breakpoints.down(O.options?.drawerBreakpoint??"md")),F=(0,p.A)(),[L,Z]=(0,a.useState)(!1),{t:G}=(0,A.i)(v.j);return j?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.A,{style:{marginTop:F.spacing(1),marginLeft:F.spacing(1)},onClick:()=>Z(!0),startIcon:(0,n.jsx)(y.A,{}),children:G("catalogFilter.buttonTitle")}),(0,n.jsx)(m.Ay,{open:L,onClose:()=>Z(!1),anchor:O.options?.drawerAnchor??"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,n.jsxs)(d.A,{m:2,children:[(0,n.jsx)(u.A,{variant:"h6",component:"h2",style:{marginBottom:F.spacing(1)},children:G("catalogFilter.title")}),O.children]})})]}):(0,n.jsx)(h.A,{item:!0,lg:2,children:O.children})},P=O=>(0,n.jsx)(h.A,{item:!0,xs:12,lg:10,children:O.children}),w=O=>(0,n.jsx)(h.A,{container:!0,style:{position:"relative"},children:O.children});w.Filters=T,w.Content=P},50207:(H,b,t)=>{"use strict";t.d(b,{y:()=>Y});var n=t(31085),a=t(10394),d=t(72501),x=t(58837),m=t(6924),h=t(20577),u=t(14041),g=t(72427),p=t(73466),y=t(7341),v=t(69076),A=t(86901),T=t(44148),P=t(41260);const w=(0,n.jsx)(P.A,{fontSize:"small"}),O=(0,n.jsx)(T.A,{fontSize:"small"});function j({selected:V}){return(0,n.jsx)(v.A,{icon:w,checkedIcon:O,checked:V})}const F=(0,u.memo)(V=>{const{selected:at,value:nt,availableOptions:gt,showCounts:bt}=V,xt=bt?`${nt} (${gt?.[nt]})`:nt;return(0,n.jsx)(A.A,{control:(0,n.jsx)(j,{selected:at}),label:xt,onClick:ht=>ht.preventDefault()})});var L=t(16249),Z=t(12398),G=t(53373),N=t.n(G);const Q=(0,x.A)(V=>(0,Z.A)({input:{backgroundColor:V.palette.background.paper}}),{name:"CatalogReactEntityAutocompletePickerInput"});function q(V){const at=Q();return(0,n.jsx)(L.A,{variant:"outlined",...V,className:N()(at.input,V.className)})}var K=t(21405),et=t(26796);const J=(0,x.A)({root:{},label:{textTransform:"none",fontWeight:"bold"}},{name:"CatalogReactEntityAutocompletePicker"});function Y(V){const{label:at,name:nt,path:gt,showCounts:bt,Filter:xt,InputProps:ht,initialSelectedOptions:ut=[],filtersForAvailableValues:Et=["kind"]}=V,mt=J(),{updateFilters:Pt,filters:Ot,queryParameters:{[nt]:jt}}=(0,K.nK)(),Nt=(0,g.gf)(y.v),Bt=Et.map(it=>Ot[it]),{value:pt}=(0,p.A)(async()=>{const it=gt,{facets:vt}=await Nt.getEntityFacets({facets:[it],filter:(0,et.Rr)(Bt.filter(Boolean))});return Object.fromEntries(vt[it].map(({value:Tt,count:wt})=>[Tt,wt]))},[...Bt]),Lt=(0,u.useMemo)(()=>[jt].flat().filter(Boolean),[jt]),[ft,B]=(0,u.useState)(Lt.length?Lt:Ot[nt]?.values??ut);(0,u.useEffect)(()=>{Lt.length&&B(Lt)},[Lt]);const k=Object.keys(pt??{}),ot=ft.length&&k.length;(0,u.useEffect)(()=>{Pt({[nt]:ot?new xt(ft):void 0})},[nt,ot,ft,xt,Pt]);const Ct=Ot[nt];return Ct&&typeof Ct=="object"&&!("values"in Ct)||!k.length?null:(0,n.jsx)(a.A,{className:mt.root,pb:1,pt:1,children:(0,n.jsxs)(d.A,{className:mt.label,variant:"button",component:"label",children:[at,(0,n.jsx)(h.Ay,{PopperComponent:it=>(0,n.jsx)("div",{...it,children:it.children}),multiple:!0,disableCloseOnSelect:!0,options:k,value:ft,onChange:(it,vt)=>B(vt),renderOption:(it,{selected:vt})=>(0,n.jsx)(F,{selected:vt,value:it,availableOptions:pt,showCounts:!!bt}),size:"small",popupIcon:(0,n.jsx)(m.A,{"data-testid":`${String(nt)}-picker-expand`}),renderInput:it=>(0,n.jsx)(q,{...it,...ht})})]})})}},72987:(H,b,t)=>{"use strict";t.d(b,{t:()=>ft});var n=t(31085),a=t(6820),d=t(10394),x=t(69076),m=t(86901),h=t(16249),u=t(72501),g=t(71677),p=t(58837),y=t(12398),v=t(44148),A=t(41260),T=t(6924),P=t(20577),w=t(14041),O=t(21405),j=t(92822),F=t(92367),L=t(48108),Z=t(47966),G=t(90184),N=t(72427),Q=t(87290),q=t(7341),K=t(46123),et=t.n(K);const J=B=>typeof B=="string"?B:void 0;function Y({enabled:B}){const k=(0,N.gf)(q.v),[ot]=(0,w.useState)(async()=>{if(!B)return[];const Ct="relations.ownedBy",vt=(await k.getEntityFacets({facets:[Ct]})).facets[Ct]?.map(Tt=>Tt.value)??[];return k.getEntitiesByRefs({entityRefs:vt}).then(Tt=>Tt.items.filter(wt=>wt!==void 0).map(wt=>wt).sort((wt,It)=>(wt.metadata.namespace||"").localeCompare(It.metadata.namespace||"","en-US")||(J(et()(wt,"spec.profile.displayName"))||wt.metadata.title||wt.metadata.name).localeCompare(J(et()(It,"spec.profile.displayName"))||It.metadata.title||It.metadata.name,"en-US")||wt.kind.localeCompare(It.kind,"en-US"))).then(Tt=>Tt).catch(()=>[])});return(0,Q.A)(async(Ct,it)=>{const vt=await ot;if(!vt)return{items:[]};const Tt=it?.limit??20,{text:wt,start:It}=V(Ct),Ut=vt.filter(fe=>gt(wt,fe)),Qt=It+Tt;return{items:Ut.slice(0,Qt),...nt({entities:Ut,limit:Qt,payload:{text:wt,start:Qt}})}},[ot],{loading:!0,value:{items:[]}})}function V(B){return at(B)&&B.cursor?JSON.parse(atob(B.cursor)):{text:B.text||"",start:0}}function at(B){return!!B.cursor}function nt({entities:B,limit:k,payload:ot}){return B.length>k?{cursor:btoa(JSON.stringify(ot))}:{}}function gt(B,k){const ot=B.trim();return k.kind.includes(ot)||k.metadata.namespace?.includes(ot)||k.metadata.name.includes(ot)||k.metadata.title?.includes(ot)||et()(k,"spec.profile.displayName")?.includes(ot)}function bt(){const B=(0,N.gf)(q.v);return(0,Q.A)(async(k,ot)=>{const Ct=k,it=k,vt=ot?.limit??20;if(it.cursor){const wt=await B.queryEntities({cursor:it.cursor,limit:vt});return{cursor:wt.pageInfo.nextCursor,items:[...it.items,...wt.items]}}const Tt=await B.queryEntities({fullTextFilter:{term:Ct.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:vt});return{cursor:Tt.pageInfo.nextCursor,items:Tt.items}},[],{loading:!0})}var xt=t(76842);function ht({mode:B,initialSelectedOwnersRefs:k}){const ot=B==="owners-only",Ct=bt(),it=Y({enabled:ot}),[vt,Tt]=ot?it:Ct;return[vt,Tt,ut({enabled:!ot,initialSelectedOwnersRefs:k})]}function ut({enabled:B,initialSelectedOwnersRefs:k}){const ot=(0,w.useRef)({}),Ct=(0,N.gf)(q.v),[,it]=(0,Q.A)(async()=>{(await Ct.getEntitiesByRefs({entityRefs:k})).items.forEach(Tt=>{Tt&&(ot.current[(0,a.U2)(Tt)]=Tt)})},[]);return(0,xt.u)(()=>{B&&k.length>0&&it()}),{getEntity:vt=>ot.current[vt],setEntity:vt=>{ot.current[(0,a.U2)(vt)]=vt}}}var Et=t(87051),mt=t(3169),Pt=t(64630),Ot=t(87849);const jt=(0,p.A)(B=>(0,y.A)({root:{},label:{textTransform:"none",fontWeight:"bold"},input:{backgroundColor:B.palette.background.paper},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}}),{name:"CatalogReactEntityOwnerPicker"}),Nt=(0,Et.A)(B=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(m.A),Bt=(0,n.jsx)(A.A,{fontSize:"small"}),pt=(0,n.jsx)(v.A,{fontSize:"small"});function Lt(B){const k=jt(),ot=B.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:Ct}=(0,mt.f)(B.entity);return(0,n.jsx)(d.A,{className:k.fullWidth,children:(0,n.jsx)(Nt,{className:k.fullWidth,control:(0,n.jsx)(x.A,{icon:Bt,checkedIcon:pt,checked:B.isSelected}),onClick:it=>it.preventDefault(),label:(0,n.jsx)(g.Ay,{title:Ct,children:(0,n.jsxs)(d.A,{display:"flex",alignItems:"center",children:[ot?(0,n.jsx)(Z.A,{fontSize:"small"}):(0,n.jsx)(L.A,{fontSize:"small"}),"\xA0",(0,n.jsx)(d.A,{className:k.boxLabel,children:(0,n.jsx)(u.A,{noWrap:!0,children:Ct})})]})})})})}const ft=B=>{const k=jt(),{mode:ot="owners-only"}=B||{},{updateFilters:Ct,filters:it,queryParameters:{owners:vt}}=(0,O.nK)(),[Tt,wt]=(0,w.useState)(""),{t:It}=(0,Ot.i)(Pt.j),Ut=(0,w.useMemo)(()=>[vt].flat().filter(Boolean),[vt]),[Qt,fe]=(0,w.useState)(Ut.length?Ut:it.owners?.values??[]),[{value:le,loading:te},se,Te]=ht({mode:ot,initialSelectedOwnersRefs:Qt});(0,F.s)(()=>se({text:Tt}),[Tt,se],250);const ze=le?.items||[];return(0,w.useEffect)(()=>{if(Ut.length){const zt=new j.N9(Ut);fe(zt.values)}},[Ut]),(0,w.useEffect)(()=>{Ct({owners:Qt.length?new j.N9(Qt):void 0})},[Qt,Ct]),["user","group"].includes(it.kind?.value.toLocaleLowerCase("en-US")||"")?null:(0,n.jsx)(d.A,{className:k.root,pb:1,pt:1,children:(0,n.jsxs)(u.A,{className:k.label,variant:"button",component:"label",children:[It("entityOwnerPicker.title"),(0,n.jsx)(P.Ay,{PopperComponent:zt=>(0,n.jsx)("div",{...zt,children:zt.children}),multiple:!0,disableCloseOnSelect:!0,loading:te,options:ze,value:Qt,getOptionSelected:(zt,ee)=>typeof ee=="string"?(0,a.U2)(zt)===ee:zt===ee,getOptionLabel:zt=>{const ee=typeof zt=="string"?Te.getEntity(zt)||(0,a.KU)(zt,{defaultKind:"group",defaultNamespace:"default"}):zt;return(0,G.Z)(ee,(0,G.S)(ee))},onChange:(zt,ee)=>{wt(""),fe(ee.map(Zt=>{const We=typeof Zt=="string"?Zt:(0,a.U2)(Zt);return typeof Zt!="string"&&Te.setEntity(Zt),We}))},filterOptions:zt=>zt,renderOption:(zt,{selected:ee})=>(0,n.jsx)(Lt,{entity:zt,isSelected:ee}),size:"small",popupIcon:(0,n.jsx)(T.A,{"data-testid":"owner-picker-expand"}),renderInput:zt=>(0,n.jsx)(h.A,{...zt,className:k.input,onChange:ee=>{wt(ee.currentTarget.value)},variant:"outlined"}),ListboxProps:{onScroll:zt=>{const ee=zt.currentTarget;Math.abs(ee.scrollHeight-ee.clientHeight-ee.scrollTop)<1&&le?.cursor&&se({items:le.items,cursor:le.cursor})},"data-testid":"owner-picker-listbox"}})]})})}},8859:(H,b,t)=>{"use strict";t.d(b,{z:()=>P});var n=t(31085),a=t(6820),d=t(72348),x=t(72072),m=t(9222),h=t(14041),u=t(29207),g=t(10394),p=t(71677),y=t(58837),v=t(3169);const A=(0,y.A)(O=>({root:{display:"inline-flex",alignItems:"center",textDecoration:"inherit"},icon:{marginRight:O.spacing(.5),color:O.palette.text.secondary,"& svg":{verticalAlign:"middle"}}}),{name:"CatalogReactEntityDisplayName"}),T=O=>{const{entityRef:j,hideIcon:F,disableTooltip:L,defaultKind:Z,defaultNamespace:G}=O,N=A(),{primaryTitle:Q,secondaryTitle:q,Icon:K}=(0,v.f)(j,{defaultKind:Z,defaultNamespace:G});let et=(0,n.jsx)(n.Fragment,{children:Q});return et=(0,n.jsxs)(g.A,{component:"span",className:N.root,children:[K&&!F?(0,n.jsx)(g.A,{component:"span",className:N.icon,children:(0,n.jsx)(K,{fontSize:"inherit"})}):null,et]}),q&&!L&&(et=(0,n.jsx)(p.Ay,{enterDelay:1500,title:q,children:et})),et},P=(0,h.forwardRef)((O,j)=>{const{entityRef:F,defaultKind:L,defaultNamespace:Z,title:G,children:N,hideIcon:Q,disableTooltip:q,...K}=O,et=w(O.entityRef),J=N??G??(0,n.jsx)(T,{entityRef:F,defaultKind:L,defaultNamespace:Z,hideIcon:Q,disableTooltip:q});return(0,n.jsx)(x.N_,{...K,ref:j,to:et,children:J})});function w(O){const j=(0,m.S)(u.s);let F,L,Z;if(typeof O=="string"){const N=(0,a.KU)(O);F=N.kind,L=N.namespace,Z=N.name}else"metadata"in O?(F=O.kind,L=O.metadata.namespace,Z=O.metadata.name):(F=O.kind,L=O.namespace,Z=O.name);F=F.toLocaleLowerCase("en-US"),L=L?.toLocaleLowerCase("en-US")??d.oQ;const G={kind:encodeURIComponent(F),namespace:encodeURIComponent(L),name:encodeURIComponent(Z)};return j(G)}},34428:(H,b,t)=>{"use strict";t.d(b,{i:()=>m});var n=t(31085),a=t(6820),d=t(14041),x=t(8859);function m(h){const{entityRefs:u,hideIcons:g,...p}=h;return(0,n.jsx)(n.Fragment,{children:u.map((y,v)=>{const A=typeof y=="string"?y:(0,a.U2)(y);return(0,n.jsxs)(d.Fragment,{children:[v>0&&", ",(0,n.jsx)(x.z,{...p,entityRef:y,hideIcon:g})]},`${v}.${A}`)})})}},90184:(H,b,t)=>{"use strict";t.d(b,{S:()=>x,Z:()=>m});var n=t(72348),a=t(46123),d=t.n(a);function x(h,u){const g=u?.defaultKind;let p,y,v;return"metadata"in h?(p=h.kind,y=h.metadata.namespace,v=h.metadata.name):(p=h.kind,y=h.namespace,v=h.name),(y===void 0||y==="")&&(y=n.oQ),u?.defaultNamespace!==void 0?u?.defaultNamespace===y&&(y=void 0):y===n.oQ&&(y=void 0),p=p.toLocaleLowerCase("en-US"),p=g&&g.toLocaleLowerCase("en-US")===p?void 0:p,`${p?`${p}:`:""}${y?`${y}/`:""}${v}`}function m(h,u){for(const g of["spec.profile.displayName","metadata.title"]){const p=d()(h,g);if(p&&typeof p=="string")return p}return u}},91035:(H,b,t)=>{"use strict";t.d(b,{m:()=>p});var n=t(31085),a=t(58837),d=t(14041),x=t(92822),m=t(50207),h=t(64630),u=t(87849);const g=(0,a.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),p=y=>{const v=g(),{t:A}=(0,u.i)(h.j);return(0,n.jsx)(m.y,{label:A("entityTagPicker.title"),name:"tags",path:"metadata.tags",Filter:x.q_,showCounts:y.showCounts,InputProps:{className:v.input}})}},67626:(H,b,t)=>{"use strict";t.d(b,{y:()=>xt});var n=t(31085),a=t(72427),d=t(65461),x=t(40703),m=t(58007),h=t(46423),u=t(65569),g=t(5951),p=t(26343),y=t(72501),v=t(58837),A=t(9684),T=t(31129),P=t(14041),w=t(92822),O=t(21405),j=t(16009),F=t(45250),L=t(73466),Z=t(7341),G=t(26796),N=t(87290),Q=t(48899);function q(){const ht=(0,a.gf)(j.K),ut=(0,a.gf)(Z.v),{filters:Et}=(0,O.nK)(),{value:mt,loading:Pt}=(0,L.A)(async()=>(await ht.getBackstageIdentity()).ownershipEntityRefs,[]),{user:Ot,owners:jt,...Nt}=Et,Bt=(0,G.$3)((0,F.compact)(Object.values(Nt))),[{value:pt,loading:Lt},ft]=(0,N.A)(async k=>{const ot=K(k.owners,k.ownershipEntityRefs);if(ot===void 0)return 0;const{["metadata.name"]:Ct,...it}=k.filter.filter,{totalItems:vt}=await ut.queryEntities({...k.filter,filter:{...it,"relations.ownedBy":ot},limit:0});return vt},[],{loading:!0});return(0,Q.A)(()=>{Object.keys(Bt.filter).length!==0&&mt!==void 0&&ft({ownershipEntityRefs:mt,owners:jt,filter:Bt})},[mt,jt,Bt]),{count:pt,loading:Pt||Lt,filter:(0,P.useMemo)(()=>w.tN.owned(mt??[]),[mt]),ownershipEntityRefs:mt}}function K(ht,ut){if(ut===void 0)return;const Et=ht?.values??[];if(Et.length){const mt=(0,F.intersection)(Et,ut);return mt.length===0?void 0:mt}return ut}function et(){const ht=(0,a.gf)(Z.v),{filters:ut}=(0,O.nK)(),Et=(0,P.useRef)(),mt=(0,P.useMemo)(()=>{const{user:jt,...Nt}=ut,Bt=(0,F.compact)(Object.values(Nt)),pt=(0,G.$3)(Bt),Lt={...pt,limit:0};return Object.keys(pt.filter).length===0?(Et.current=void 0,Et.current):(0,F.isEqual)(Lt,Et.current)?Et.current:(Et.current=Lt,Lt)},[ut]),{value:Pt,loading:Ot}=(0,L.A)(async()=>{if(mt===void 0)return 0;const{totalItems:jt}=await ht.queryEntities(mt);return jt},[mt]);return{count:Pt,loading:Ot}}var J=t(6820),Y=t(56889);function V(){const ht=(0,a.gf)(Z.v),{filters:ut}=(0,O.nK)(),{starredEntities:Et}=(0,Y.I)(),mt=(0,P.useRef)(),Pt=(0,P.useMemo)(()=>{const{user:Bt,...pt}=ut,Lt=(0,F.compact)(Object.values(pt)),ft=(0,G.$3)(Lt),k={...ft,filter:{...ft.filter,["metadata.name"]:Array.from(Et).map(ot=>(0,J.KU)(ot).name)},limit:1e3};return(0,F.isEqual)(k,mt.current)?mt.current:(mt.current=k,k)},[ut,Et]),{value:Ot,loading:jt}=(0,L.A)(async()=>Et.size?(await ht.queryEntities(Pt)).items.map(pt=>(0,J.U2)({kind:pt.kind,namespace:pt.metadata.namespace,name:pt.metadata.name})).filter(pt=>Et.has(pt)).length:0,[Pt,Et]),Nt=(0,P.useMemo)(()=>w.tN.starred(Array.from(Et)),[Et]);return{count:Ot,loading:jt,filter:Nt}}var at=t(87849),nt=t(64630);const gt=(0,v.A)(ht=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:ht.spacing(1,0,1,0)},title:{margin:ht.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:ht.palette.text.primary},menuItem:{minHeight:ht.spacing(6)},groupWrapper:{margin:ht.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function bt(ht,ut){return[{name:ut("userListPicker.personalFilter.title"),items:[{id:"owned",label:ut("userListPicker.personalFilter.ownedLabel"),icon:A.A},{id:"starred",label:ut("userListPicker.personalFilter.starredLabel"),icon:T.Gg}]},{name:ht,items:[{id:"all",label:ut("userListPicker.orgFilterAllLabel")}]}]}const xt=ht=>{const{initialFilter:ut,availableFilters:Et}=ht,mt=gt(),Pt=(0,a.gf)(d.U),{t:Ot}=(0,at.i)(nt.j),jt=Pt.getOptionalString("organization.name")??Ot("userListPicker.defaultOrgName"),{filters:Nt,updateFilters:Bt,queryParameters:{kind:pt,user:Lt}}=(0,O.nK)(),ft=["starred","all"],B=bt(jt,Ot).map(te=>({...te,items:te.items.filter(({id:se})=>["group","user"].some(Te=>Te===pt)?ft.includes(se):!Et||Et.includes(se))})).filter(({items:te})=>!!te.length),{count:k,loading:ot,filter:Ct}=q(),{count:it}=et(),{count:vt,filter:Tt,loading:wt}=V(),It=(0,P.useMemo)(()=>[Lt].flat()[0],[Lt]),[Ut,Qt]=(0,P.useState)(It??ut),fe=(0,P.useMemo)(()=>({all:it,starred:vt,owned:k}),[vt,k,it]);(0,P.useEffect)(()=>{It&&Qt(It)},[It]);const le=ot||wt;return(0,P.useEffect)(()=>{!le&&Ut&&Ut!=="all"&&fe[Ut]===0&&Qt("all")},[le,fe,Ut,Qt]),(0,P.useEffect)(()=>{if(!Ut||le)return;Bt({user:Ut==="owned"?Ct:Ut==="starred"?Tt:w.tN.all()})},[Ut,Tt,Ct,Bt,le]),(0,n.jsx)(x.A,{className:mt.root,children:B.map(te=>(0,n.jsxs)(P.Fragment,{children:[(0,n.jsx)(y.A,{variant:"subtitle2",component:"span",className:mt.title,children:te.name}),(0,n.jsx)(x.A,{className:mt.groupWrapper,children:(0,n.jsx)(m.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":te.name,children:te.items.map((se,Te)=>(0,n.jsxs)(p.A,{role:"none presentation",divider:Te!==te.items.length-1,onClick:()=>Qt(se.id),selected:se.id===Nt.user?.value,className:mt.menuItem,disabled:fe[se.id]===0,"data-testid":`user-picker-${se.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[se.icon&&(0,n.jsx)(h.A,{className:mt.listIcon,children:(0,n.jsx)(se.icon,{fontSize:"small"})}),(0,n.jsx)(g.A,{children:(0,n.jsxs)(y.A,{variant:"body1",children:[se.label," "]})}),(0,n.jsx)(u.A,{children:fe[se.id]??"-"})]},se.id))})})]},te.name))})}},92822:(H,b,t)=>{"use strict";t.d(b,{I5:()=>p,Kf:()=>T,N9:()=>g,V3:()=>u,gM:()=>x,gZ:()=>A,mT:()=>P,qA:()=>m,q_:()=>h,tN:()=>v,z:()=>y});var n=t(6820),a=t(51372),d=t(67871);class x{value;constructor(O){this.value=O}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class m{value;constructor(O){this.value=O}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class h{values;constructor(O){this.values=O}filterEntity(O){return this.values.every(j=>(O.metadata.tags??[]).includes(j))}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}}class u{value;constructor(O){this.value=O}filterEntity(O){const j=this.toUpperArray(this.value.split(/\s/)),F=this.toUpperArray([O.metadata.tags]),L=this.toUpperArray([O.metadata.name,O.metadata.title]);for(const Z of j)if(F.every(G=>G!==Z)&&L.every(G=>!G.includes(Z)))return!1;return!0}getFullTextFilters(){return{term:this.value,fields:["metadata.name","metadata.title","spec.profile.displayName"]}}toQueryValue(){return this.value}toUpperArray(O){return O.flat().filter(j=>!!j).map(j=>j.toLocaleUpperCase("en-US"))}}class g{values;constructor(O){this.values=O.reduce((j,F)=>{try{return j.push((0,n.U2)((0,n.KU)(F,{defaultKind:"Group"}))),j}catch{return j}},[])}getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(O){return this.values.some(j=>(0,d.t)(O,a.vv).some(F=>(0,n.U2)(F)===j))}toQueryValue(){return this.values}}class p{values;constructor(O){this.values=O}getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(O){return this.values.some(j=>O.spec?.lifecycle===j)}toQueryValue(){return this.values}}class y{values;constructor(O){this.values=O}getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(O){return this.values.some(j=>O.metadata.namespace===j)}toQueryValue(){return this.values}}class v{value;refs;constructor(O,j){this.value=O,this.refs=j}static owned(O){return new v("owned",O)}static all(){return new v("all")}static starred(O){return new v("starred",O)}getCatalogFilters(){return this.value==="owned"?{"relations.ownedBy":this.refs??[]}:this.value==="starred"?{"metadata.name":this.refs?.map(O=>(0,n.KU)(O).name)??[]}:{}}filterEntity(O){if(this.value==="starred")return this.refs?.includes((0,n.U2)(O))??!0;if(this.value==="owned"){const j=(0,d.t)(O,a.vv);return this.refs?.some(F=>j.some(L=>(0,n.U2)(L)===F))??!1}return!0}toQueryValue(){return this.value}}class A{value;isOwnedEntity;isStarredEntity;constructor(O,j,F){this.value=O,this.isOwnedEntity=j,this.isStarredEntity=F}filterEntity(O){switch(this.value){case"owned":return this.isOwnedEntity(O);case"starred":return this.isStarredEntity(O);default:return!0}}toQueryValue(){return this.value}}class T{value;constructor(O){this.value=O}getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(O){const j=O.metadata.annotations?.["backstage.io/orphan"];return j!==void 0&&this.value.toString()===j}}class P{value;constructor(O){this.value=O}filterEntity(O){const j=O?.status?.items?.length>0;return j!==void 0&&this.value===j}}},21405:(H,b,t)=>{"use strict";t.d(b,{B9:()=>w,nK:()=>O});var n=t(31085),a=t(45250),d=t.n(a),x=t(45810),m=t.n(x),h=t(14041),u=t(18690),g=t(87290),p=t(22771),y=t(71581),v=t(7341),A=t(26796),T=t(72427);const P=(0,h.createContext)(void 0),w=j=>{const F=(0,y.A)(),L=(0,T.gf)(v.v),[Z,G]=(0,h.useState)({}),N=(0,u.zy)(),q=j.pagination===!0?"cursor":typeof j.pagination=="object"?j.pagination.mode??"cursor":"none",K=typeof j.pagination=="object"?j.pagination.limit??20:20,{queryParameters:et,cursor:J,offset:Y,limit:V}=(0,h.useMemo)(()=>{const pt=m().parse(N.search,{ignoreQueryPrefix:!0});let Lt=K;if(typeof pt.limit=="string"){const B=Number.parseInt(pt.limit,10);isNaN(B)||(Lt=B)}const ft=typeof pt.offset=="string"&&q==="offset"?Number.parseInt(pt.offset,10):void 0;return{queryParameters:pt.filters??{},cursor:typeof pt.cursor=="string"&&q==="cursor"?pt.cursor:void 0,offset:q==="offset"&&ft&&!isNaN(ft)?ft:void 0,limit:Lt}},[q,N.search,K]),[at,nt]=(0,h.useState)(J),[gt,bt]=(0,h.useState)(Y),[xt,ht]=(0,h.useState)(V),[ut,Et]=(0,h.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:q==="cursor"?{}:void 0,offset:gt,limit:xt})),[{loading:mt,error:Pt},Ot]=(0,g.A)(async()=>{const pt=(0,a.compact)(Object.values(Z)),Lt=Object.keys(Z).reduce((ft,B)=>{const k=Z[B];return k?.toQueryValue&&(ft[B]=k.toQueryValue()),ft},{});if(q!=="none")if(at){if(at!==ut.appliedCursor){const ft=(0,A.be)(pt),B=await L.queryEntities({cursor:at,limit:xt});Et({appliedFilters:Z,appliedCursor:at,backendEntities:B.items,entities:B.items.filter(ft),pageInfo:B.pageInfo,totalItems:B.totalItems})}}else{const ft=(0,A.be)(pt),B=(0,A.$3)(pt),k=(0,A.$3)((0,a.compact)(Object.values(ut.appliedFilters)));if(q==="offset"||!(0,a.isEqual)(k,B)){const ot=await L.queryEntities({...B,limit:xt,offset:gt,orderFields:[{field:"metadata.name",order:"asc"}]});Et({appliedFilters:Z,backendEntities:ot.items,entities:ot.items.filter(ft),pageInfo:ot.pageInfo,totalItems:ot.totalItems,limit:xt,offset:gt})}}else{const ft=(0,A.be)(pt),B=(0,A.Rr)(pt),k=(0,A.Rr)((0,a.compact)(Object.values(ut.appliedFilters)));if((0,a.isEqual)(k,B)){const ot=ut.backendEntities.filter(ft);Et({appliedFilters:Z,backendEntities:ut.backendEntities,entities:ot,totalItems:ot.length})}else{const ot=await L.getEntities({filter:B}),Ct=ot.items.filter(ft);Et({appliedFilters:Z,backendEntities:ot.items,entities:Ct,totalItems:Ct.length})}}if(F()){const ft=m().parse(N.search,{ignoreQueryPrefix:!0}),B=m().stringify({...ft,filters:Lt,cursor:at,offset:gt,limit:xt},{addQueryPrefix:!0,arrayFormat:"repeat"}),k=`${window.location.pathname}${B}`;window.history?.replaceState(null,document.title,k)}},[L,et,Z,ut,at,q,xt,gt],{loading:!0});(0,p.A)(Ot,10,[Z,at,xt,gt]);const jt=(0,h.useCallback)(pt=>{nt(void 0),G(Lt=>{const ft=typeof pt=="function"?pt(Lt):pt;return{...Lt,...ft}})},[]),Nt=(0,h.useMemo)(()=>{if(q!=="cursor")return;const pt=ut.pageInfo?.prevCursor,Lt=ut.pageInfo?.nextCursor;return{prev:pt?()=>nt(pt):void 0,next:Lt?()=>nt(Lt):void 0}},[q,ut.pageInfo]),Bt=(0,h.useMemo)(()=>({filters:ut.appliedFilters,entities:ut.entities,backendEntities:ut.backendEntities,updateFilters:jt,queryParameters:et,loading:mt,error:Pt,pageInfo:Nt,totalItems:ut.totalItems,limit:xt,offset:gt,setLimit:ht,setOffset:bt,paginationMode:q}),[ut,jt,et,mt,Pt,Nt,xt,gt,q,ht,bt]);return(0,n.jsx)(P.Provider,{value:Bt,children:j.children})};function O(){const j=(0,h.useContext)(P);if(!j)throw new Error("useEntityList must be used within EntityListProvider");return j}},56889:(H,b,t)=>{"use strict";t.d(b,{I:()=>u});var n=t(6820),a=t(72427),d=t(14041),x=t(1394),m=t(18);function h(g){return typeof g=="string"?g:(0,n.U2)(g)}function u(){const g=(0,a.gf)(m.a),p=(0,x.A)((0,d.useMemo)(()=>g.starredEntitie$(),[g]),new Set),y=(0,d.useCallback)(A=>p.has(h(A)),[p]),v=(0,d.useCallback)(A=>g.toggleStarred(h(A)).then(),[g]);return{starredEntities:p,toggleStarredEntity:v,isStarredEntity:y}}},29207:(H,b,t)=>{"use strict";t.d(b,{s:()=>d});var n=t(34569),a=t(63544);const d=(0,a.Q)("catalog:entity-route-ref",()=>(0,n.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function x(m){return{kind:m.kind.toLocaleLowerCase("en-US"),namespace:m.metadata.namespace?.toLocaleLowerCase("en-US")??DEFAULT_NAMESPACE,name:m.metadata.name}}},64630:(H,b,t)=>{"use strict";t.d(b,{j:()=>a});var n=t(93184);const a=(0,n.h)({id:"catalog-react",messages:{catalogFilter:{title:"Filters",buttonTitle:"Filters"},entityKindPicker:{title:"Kind",errorMessage:"Failed to load entity kinds"},entityLifecyclePicker:{title:"Lifecycle"},entityNamespacePicker:{title:"Namespace"},entityOwnerPicker:{title:"Owner"},entityProcessingStatusPicker:{title:"Processing Status"},entityTagPicker:{title:"Tags"},entityPeekAheadPopover:{title:"Drill into the entity to see all of the tags.",emailCardAction:{title:"Email {{email}}",subTitle:"mailto {{email}}"},entityCardActionsTitle:"Show details"},entitySearchBar:{placeholder:"Search"},entityTypePicker:{title:"Type",errorMessage:"Failed to load entity types",optionAllTitle:"all"},favoriteEntity:{addToFavorites:"Add to favorites",removeFromFavorites:"Remove from favorites"},inspectEntityDialog:{title:"Entity Inspector",closeButtonTitle:"Close",ancestryPage:{title:"Ancestry"},colocatedPage:{title:"Colocated",description:"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).",alertNoLocation:"Entity had no location information.",alertNoEntity:"There were no other entities on this location."},jsonPage:{title:"Entity as JSON",description:"This is the raw entity data as received from the catalog, on JSON form."},overviewPage:{title:"Overview"},yamlPage:{title:"Entity as YAML",description:"This is the raw entity data as received from the catalog, on YAML form."}},unregisterEntityDialog:{title:"Are you sure you want to unregister this entity?",cancelButtonTitle:"Cancel",deleteButtonTitle:"Delete Entity",deleteEntitySuccessMessage:"Removed entity {{entityName}}",bootstrapState:{title:'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "{{location}}"). If you believe this is in error, please contact the {{appTitle}} integrator.',advancedDescription:"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.",advancedOptions:"Advanced Options"},onlyDeleteStateTitle:"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog.",unregisterState:{title:"This action will unregister the following entities:",subTitle:"Located at the following location:",description:"To undo, just re-register the entity in {{appTitle}}.",unregisterButtonTitle:"Unregister Location",advancedOptions:"Advanced Options",advancedDescription:"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."},errorStateTitle:"Internal error: Unknown state"},userListPicker:{defaultOrgName:"Company",personalFilter:{title:"Personal",ownedLabel:"Owned",starredLabel:"Starred"},orgFilterAllLabel:"All"}}})},26796:(H,b,t)=>{"use strict";t.d(b,{$3:()=>d,Rr:()=>x,be:()=>m});var n=t(92822);function a(h){return!!h.getFullTextFilters}function d(h){const u=h.reduce((p,y)=>({...p,...y.getCatalogFilters?y.getCatalogFilters():{}}),{}),g=h.find(a)?.getFullTextFilters();return{filter:u,fullTextFilter:g}}function x(h){const u={};return h.forEach(g=>{g instanceof n.q_||g instanceof n.N9||g instanceof n.I5||g instanceof n.z||g instanceof n.tN||g instanceof n.Kf||g instanceof n.V3||g instanceof n.gZ||Object.assign(u,g.getCatalogFilters?.()||{})}),u}function m(h){return u=>h.every(g=>!g.filterEntity||g.filterEntity(u))}},67871:(H,b,t)=>{"use strict";t.d(b,{t:()=>a});var n=t(6820);function a(d,x,m){let h=d?.relations?.filter(u=>u.type===x).map(u=>(0,n.KU)(u.targetRef))||[];return m?.kind&&(h=h.filter(u=>u.kind.toLocaleLowerCase("en-US")===m.kind.toLocaleLowerCase("en-US"))),h}},95203:(H,b,t)=>{"use strict";t.d(b,{qP:()=>h,Zg:()=>g,rQ:()=>y,pS:()=>p,UJ:()=>u});var n=t(59598);class a{id;params;optional;defaultTarget;[x=n.b];constructor(A,T,P,w){this.id=A,this.params=T,this.optional=P,this.defaultTarget=w,this[x]="external"}toString(){return`routeRef{type=external,id=${this.id}}`}getDefaultTarget(){return this.defaultTarget}}function d(v){return new a(v.id,v.params??[],!!v.optional,v?.defaultTarget)}var x,m=t(34569);const h=d({id:"create-component",optional:!0,defaultTarget:"scaffolder.createComponent"}),u=d({id:"view-techdoc",optional:!0,params:["namespace","kind","name"],defaultTarget:"techdocs.docRoot"}),g=d({id:"create-from-template",optional:!0,params:["namespace","templateName"],defaultTarget:"scaffolder.selectedTemplate"}),p=d({id:"catalog:unregister-redirect",optional:!0}),y=(0,m.H)({id:"catalog"})},54241:(H,b,t)=>{"use strict";t.d(b,{b:()=>n});var n=function(a){return a.DENY="DENY",a.ALLOW="ALLOW",a.CONDITIONAL="CONDITIONAL",a}({})},96824:(H,b,t)=>{"use strict";t.d(b,{x:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.permission.api"})},70734:(H,b,t)=>{"use strict";t.d(b,{e:()=>m});var n=t(31085),a=t(14041),d=t(58837);const x=(0,d.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),m=h=>{const{text:u,preTag:g,postTag:p}=h,y=x(),v=(0,a.useMemo)(()=>u.split(new RegExp(`(${g}.+?${p})`)),[p,g,u]);return(0,n.jsx)(n.Fragment,{children:v.map((A,T)=>A.includes(g)?(0,n.jsx)("mark",{className:y.highlight,children:A.replace(new RegExp(`${g}|${p}`,"g"),"")},T):A)})}},54560:(H,b,t)=>{"use strict";t.d(b,{ec:()=>p});var n=t(31085),a=t(14041),d=t(93368),x=t(88758),m=t(8109);const h="search.results.list.items.extensions.v1",u=(A,T)=>{for(const P of A)if(!(!isValidElement(P)||!getComponentData(P,h)?.(T)))return cloneElement(P,{rank:T.rank,highlight:T.highlight,result:T.document,...P.props});return null},g=A=>{const{rank:T,result:P,noTrack:w,children:O,alignItems:j="flex-start",...F}=A,L=(0,d.s)(),Z=(0,a.useCallback)(()=>{w||P&&L.captureEvent("discover",P.title,{attributes:{to:P.location},value:T})},[T,P,w,L]);return(0,n.jsx)(m.A,{divider:!0,alignItems:j,onClickCapture:Z,...F,children:O})},p=A=>{const{name:T,component:P,predicate:w=()=>!0}=A;return(0,x.zZ)({name:T,component:{lazy:()=>P().then(O=>j=>(0,n.jsx)(g,{rank:j.rank,result:j.result,noTrack:j.noTrack,children:(0,a.createElement)(O,j)}))},data:{[h]:w}})},y=A=>{const T=useElementFilter(A,P=>P.selectByComponentData({key:h}).getElements(),[A]);return useCallback((P,w)=>{const O=u(T,P);return _jsx(Fragment,{children:O??_jsx(g,{rank:P.rank,result:P.document,children:_jsx(DefaultResultListItem,{rank:P.rank,highlight:P.highlight,result:P.document})})},w)},[T])},v=A=>{const{results:T,children:P,...w}=A,O=y(P);return _jsx(List,{...w,children:T.map(O)})}},86202:(H,b,t)=>{"use strict";t.d(b,{A:()=>n,G:()=>a});const n="backstage.io/techdocs-ref",a="backstage.io/techdocs-entity"},72020:(H,b,t)=>{"use strict";t.d(b,{AF:()=>g,Hr:()=>v,Wm:()=>u,YR:()=>w,po:()=>p});var n=t(31085),a=t(14041),d=t(18690),x=t(19402),m=t(88758),h=t(82442);const u="techdocs.addons.addon.v1",g="techdocs.addons.wrapper.v1",p=()=>null;(0,x.h)(p,g,!0);const y=O=>`${u}.${O.toLocaleLowerCase("en-US")}`;function v(O){const{name:j,component:F}=O;return(0,m.zZ)({name:j,component:{sync:L=>(0,n.jsx)(F,{...L})},data:{[u]:O,[y(j)]:!0}})}const A=(O,j)=>O.selectByComponentData({key:j}).getElements()[0],T=O=>O.selectByComponentData({key:g}).selectByComponentData({key:u}),P=O=>O.selectByComponentData({key:g}).findComponentData({key:u}),w=()=>{const O=(0,d.P1)(),j=(0,h.O)(O,T),F=(0,h.O)(O,P),L=(0,a.useCallback)(N=>{if(!j||!N)return null;const Q=y(N.name);return A(j,Q)??null},[j]),Z=(0,a.useCallback)(N=>{const Q=F.find(q=>q.name===N);return Q?L(Q):null},[F,L]),G=(0,a.useCallback)(N=>{const Q=F.filter(q=>q.location===N);return Q.length?Q.map(L):null},[F,L]);return{renderComponentByName:Z,renderComponentsByLocation:G}}},26679:(H,b,t)=>{"use strict";t.d(b,{l:()=>a,s:()=>d});var n=t(55309);const a=(0,n.y)({id:"plugin.techdocs.service"}),d=(0,n.y)({id:"plugin.techdocs.storageservice"})},86892:(H,b,t)=>{"use strict";t.d(b,{R:()=>O,V:()=>j});var n=t(31085),a=t(14041),d=t(73466),x=t(28966),m=t(6820),h=t(43836),u=t(10602),g=t(72427),p=t(65461),y=t(25862),v=t(26679);function A(F,L){return L.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(F.kind=F.kind.toLocaleLowerCase(),F.name=F.name.toLocaleLowerCase(),F.namespace=F.namespace.toLocaleLowerCase()),F}const T=(F,L)=>(0,m.U2)(F)===(0,m.U2)(L),P={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},w=(0,h.tK)("techdocs-reader-page-context"),O=(0,a.memo)(F=>{const{entityRef:L,children:Z}=F,G=(0,g.gf)(v.l),N=(0,g.gf)(p.U),Q=(0,d.A)(async()=>G.getEntityMetadata(L),[L]),q=(0,x.A)(async()=>G.getTechDocsMetadata(L),[L]),[K,et]=(0,a.useState)(P.title),[J,Y]=(0,a.useState)(P.subtitle),[V,at]=(0,a.useState)(P.shadowRoot);(0,a.useEffect)(()=>{V&&!q.value&&!q.loading&&q.retry()},[q.value,q.loading,V,q.retry,q]);const nt={metadata:q,entityRef:A(L,N),entityMetadata:Q,shadowRoot:V,setShadowRoot:at,title:K,setTitle:et,subtitle:J,setSubtitle:Y},gt=(0,u.B)({1:nt});return(0,n.jsx)(y.Ig,{attributes:{entityRef:(0,m.U2)(L)},children:(0,n.jsx)(w.Provider,{value:gt,children:Z instanceof Function?Z(nt):Z})})},(F,L)=>T(F.entityRef,L.entityRef)),j=()=>{const F=(0,a.useContext)(w);if(F===void 0)return P;const L=F.atVersion(1);if(L===void 0)throw new Error("No context found for version 1.");return L}},99730:(H,b,t)=>{"use strict";t.d(b,{e:()=>n});const n=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},95768:(H,b,t)=>{"use strict";t.d(b,{V:()=>n});function n(a,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?a:a.toLocaleLowerCase("en-US")}},85920:(H,b,t)=>{"use strict";t.d(b,{K:()=>K});var n=t(31085),a=t(14041),d=t(26280),x=t(59428),m=t(27586),h=t(21405),u=t(54203),g=t(67626),p=t(72987),y=t(91035),v=t(81859),A=t(86519),T=t(86202);class P{getCatalogFilters(){return{[`metadata.annotations.${T.A}`]:A.c}}}const w=()=>{const{updateFilters:et}=(0,h.nK)();return(0,a.useEffect)(()=>{et({techdocs:new P})},[et]),null};var O=t(36338),j=t(45250),F=t(88640),L=t(77310),Z=t(56889),G=t(27125),N=t(84295),Q=t(42717);const q=et=>{const{columns:J,actions:Y,options:V}=et,{loading:at,error:nt,entities:gt,filters:bt}=(0,h.nK)(),{isStarredEntity:xt,toggleStarredEntity:ht}=(0,Z.I)(),[,ut]=(0,O.A)(),Et=(0,j.capitalize)(bt.user?.value??"all"),mt=[N.f.createCopyDocsUrlAction(ut),N.f.createStarEntityAction(xt,ht)];return nt?(0,n.jsx)(F.B,{severity:"error",title:"Could not load available documentation.",children:(0,n.jsx)(L.z,{language:"text",text:nt.toString()})}):(0,n.jsx)(G.o,{title:Et,entities:gt,loading:at,actions:Y||mt,columns:J,options:V})};q.columns=Q.B,q.actions=N.f;const K=et=>{const{initialFilter:J="owned",columns:Y,actions:V,ownerPickerMode:at}=et;return(0,n.jsx)(v.S,{children:(0,n.jsxs)(d.U,{children:[(0,n.jsx)(x.d,{title:"",children:(0,n.jsx)(m.Y,{children:"Discover documentation in your ecosystem."})}),(0,n.jsx)(h.B9,{children:(0,n.jsxs)(u.GI,{children:[(0,n.jsxs)(u.GI.Filters,{children:[(0,n.jsx)(w,{}),(0,n.jsx)(g.y,{initialFilter:J}),(0,n.jsx)(p.t,{mode:at}),(0,n.jsx)(y.m,{})]}),(0,n.jsx)(u.GI.Content,{children:(0,n.jsx)(q,{actions:V,columns:Y})})]})})]})})}},27125:(H,b,t)=>{"use strict";t.d(b,{o:()=>F});var n=t(31085),a=t(14041),d=t(36338),x=t(9222),m=t(72427),h=t(65461),u=t(51372),g=t(67871),p=t(90184),y=t(82779),v=t(14209),A=t(44186),T=t(73896),P=t(84295),w=t(42717),O=t(95768);const j=[w.B.createTitleColumn({hidden:!0}),w.B.createNameColumn(),w.B.createOwnerColumn(),w.B.createKindColumn(),w.B.createTypeColumn()],F=L=>{const{entities:Z,title:G,loading:N,columns:Q,actions:q,options:K}=L,[,et]=(0,d.A)(),J=(0,x.S)(y.Oc),Y=(0,m.gf)(h.U);if(!Z)return null;const V=Z.map(bt=>{const xt=(0,g.t)(bt,u.vv);return{entity:bt,resolved:{docsUrl:J({namespace:(0,O.V)(bt.metadata.namespace??"default",Y),kind:(0,O.V)(bt.kind,Y),name:(0,O.V)(bt.metadata.name,Y)}),ownedByRelations:xt,ownedByRelationsTitle:xt.map(ht=>(0,p.S)(ht,{defaultKind:"group"})).join(", ")}}}),at=[P.f.createCopyDocsUrlAction(et)],nt=20,gt=V&&V.length>nt;return(0,n.jsx)(n.Fragment,{children:N||V&&V.length>0?(0,n.jsx)(v.X,{isLoading:N,options:{paging:gt,pageSize:nt,search:!0,actionsColumnIndex:-1,...K},data:V,columns:Q||j,actions:q||at,title:G?`${G} (${V.length})`:`All (${V.length})`}):(0,n.jsx)(A.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,n.jsx)(T.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};F.columns=w.B,F.actions=P.f},84295:(H,b,t)=>{"use strict";t.d(b,{f:()=>m});var n=t(31085),a=t(14041),d=t(55290),x=t(18956);const m={createCopyDocsUrlAction(h){return u=>({icon:()=>(0,n.jsx)(d.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>h(`${window.location.origin}${u.resolved.docsUrl}`)})},createStarEntityAction(h,u){return g=>{const p=g.entity,y=h(p);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,n.jsx)(x.m,{isFavorite:y}),tooltip:y?"Remove from favorites":"Add to favorites",onClick:()=>u(p)}}}}},42717:(H,b,t)=>{"use strict";t.d(b,{B:()=>y});var n=t(31085),a=t(14041),d=t(10394),x=t(58837);const m=(0,x.A)(v=>({value:{marginBottom:v.spacing(.75)},subvalue:{color:v.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function h(v){const{value:A,subvalue:T}=v,P=m();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.A,{className:P.value,children:A}),(0,n.jsx)(d.A,{className:P.subvalue,children:T})]})}var u=t(72072),g=t(34428);function p(v){return v.metadata.title||v.metadata.name}const y={createTitleColumn(v){return{...y.createNameColumn(),field:"entity.metadata.title",hidden:v?.hidden}},createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,searchable:!0,defaultSort:"asc",customSort:(v,A)=>{const T=p(v.entity).toLocaleLowerCase(),P=p(A.entity).toLocaleLowerCase();return T.localeCompare(P)},render:v=>(0,n.jsx)(h,{value:(0,n.jsx)(u.N_,{to:v.resolved.docsUrl,children:p(v.entity)}),subvalue:v.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:v})=>(0,n.jsx)(g.i,{entityRefs:v.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},81859:(H,b,t)=>{"use strict";t.d(b,{S:()=>h});var n=t(31085),a=t(14041),d=t(27155),x=t(72427),m=t(65461);const h=u=>{const{children:g}=u,y=`Documentation available in ${(0,x.gf)(m.U).getOptionalString("organization.name")??"Backstage"}`;return(0,n.jsx)(d.d,{title:"Documentation",subtitle:y,themeId:"documentation",children:g})}},39278:(H,b,t)=>{"use strict";t.d(b,{$j:()=>L,Wj:()=>Z,Ju:()=>w});var n=t(26679),a=t(70835),d=t(97142),x=t(92110);class m{configApi;discoveryApi;fetchApi;constructor(Q){this.configApi=Q.configApi,this.discoveryApi=Q.discoveryApi,this.fetchApi=Q.fetchApi}async getCookie(){const q=`${await this.getApiOrigin()}/cookie`,K=await this.fetchApi.fetch(`${q}`,{credentials:"include"});if(!K.ok)throw await a.o.fromResponse(K);return await K.json()}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(Q){const{kind:q,namespace:K,name:et}=Q,Y=`${await this.getApiOrigin()}/metadata/techdocs/${K}/${q}/${et}`,V=await this.fetchApi.fetch(`${Y}`);if(!V.ok)throw await a.o.fromResponse(V);return await V.json()}async getEntityMetadata(Q){const{kind:q,namespace:K,name:et}=Q,Y=`${await this.getApiOrigin()}/metadata/entity/${K}/${q}/${et}`,V=await this.fetchApi.fetch(`${Y}`);if(!V.ok)throw await a.o.fromResponse(V);return await V.json()}}class h{configApi;discoveryApi;fetchApi;constructor(Q){this.configApi=Q.configApi,this.discoveryApi=Q.discoveryApi,this.fetchApi=Q.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return this.configApi.getOptionalString("techdocs.storageUrl")??`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(Q,q){const{kind:K,namespace:et,name:J}=Q,V=`${await this.getStorageUrl()}/${et}/${K}/${J}/${q}`,at=await this.fetchApi.fetch(`${V.endsWith("/")?V:`${V}/`}index.html`);let nt="";switch(at.status){case 404:throw nt="Page not found. ",q||(nt+="This could be because there is no index.md file in the root of the docs directory of this repository."),new d.m_(nt);case 500:throw nt="Could not generate documentation or an error in the TechDocs backend. ",new Error(nt);default:break}return at.text()}async syncEntityDocs(Q,q=()=>{}){const{kind:K,namespace:et,name:J}=Q,V=`${await this.getApiOrigin()}/sync/${et}/${K}/${J}`;return new Promise((at,nt)=>{const gt=new AbortController;(0,x.y)(V,{fetch:this.fetchApi.fetch,signal:gt.signal,onmessage(bt){if(bt.event==="log")bt.data&&q(JSON.parse(bt.data));else if(bt.event==="finish"){let xt=!1;bt.data&&({updated:xt}=JSON.parse(bt.data)),at(xt?"updated":"cached")}else bt.event==="error"&&nt(new Error(bt.data))},onerror(bt){gt.abort(),nt(bt)}})})}async getBaseUrl(Q,q,K){const{kind:et,namespace:J,name:Y}=q,at=`${await this.getApiOrigin()}/static/docs/${J}/${et}/${Y}/${K}`;return new URL(Q,at.endsWith("/")?at:`${at}/`).toString()}}var u=t(82779),g=t(9803),p=t(12935),y=t(65461),v=t(57405),A=t(70795),T=t(88758),P=t(54560);const w=(0,g.i)({id:"techdocs",apis:[(0,p.b)({api:n.s,deps:{configApi:y.U,discoveryApi:v.I,fetchApi:A.a},factory:({configApi:N,discoveryApi:Q,fetchApi:q})=>new h({configApi:N,discoveryApi:Q,fetchApi:q})}),(0,p.b)({api:n.l,deps:{configApi:y.U,discoveryApi:v.I,fetchApi:A.a},factory:({configApi:N,discoveryApi:Q,fetchApi:q})=>new m({configApi:N,discoveryApi:Q,fetchApi:q})})],routes:{root:u.rQ,docRoot:u.Oc,entityContent:u.Ri}}),O=w.provide((0,T.QJ)({name:"TechdocsPage",component:()=>t.e(9605).then(t.bind(t,29605)).then(N=>N.Router),mountPoint:u.rQ})),j=w.provide((0,T.QJ)({name:"EntityTechdocsContent",component:()=>t.e(9605).then(t.bind(t,29605)).then(N=>N.LegacyEmbeddedDocsRouter),mountPoint:u.Ri})),F=w.provide((0,T.QJ)({name:"TechDocsCustomHome",component:()=>t.e(4487).then(t.bind(t,94487)).then(N=>N.TechDocsCustomHome),mountPoint:u.rQ})),L=w.provide((0,T.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(N=>N.TechDocsIndexPage),mountPoint:u.rQ})),Z=w.provide((0,T.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(N=>N.TechDocsReaderPage),mountPoint:u.Oc})),G=w.provide((0,P.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(N=>N.TechDocsSearchResultListItem),predicate:N=>N.type==="techdocs"}))},67289:(H,b,t)=>{"use strict";t.d(b,{p:()=>Kn});var n=t(31085),a=t(14041),d=t(42899),x=t(58837),m=t(86892),h=t(9394),u=t(91360),g=t(22856);const p="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",y=f=>{(0,a.useEffect)(()=>{if(!f)return()=>{};const I=f.querySelectorAll('head > link[rel="stylesheet"]');let U=I?.length??0;const $=new CustomEvent(p);if(!U)return f.dispatchEvent($),()=>{};const z=()=>{--U===0&&f.dispatchEvent($)};return I?.forEach(X=>{X.addEventListener("load",z)}),()=>{I?.forEach(X=>{X.removeEventListener("load",z)})}},[f])},v=f=>{const[I,U]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!f)return()=>{};U(!0);const $=f.style;$.setProperty("opacity","0");const z=()=>{U(!1),$.setProperty("opacity","1")};return f.addEventListener(p,z),()=>{f.removeEventListener(p,z)}},[f]),I},A=f=>{const{element:I,onAppend:U,children:$}=f,[z,X]=(0,a.useState)((0,h.vt)({...(0,g.A)(),insertionPoint:void 0}));y(I);const st=(0,a.useCallback)(At=>{if(!I||!At)return;X((0,h.vt)({...(0,g.A)(),insertionPoint:I.querySelector("head")||void 0}));let St=At.shadowRoot;St||(St=At.attachShadow({mode:"open"})),St.replaceChildren(I),typeof U=="function"&&U(St)},[I,U]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(u.Ay,{jss:z,sheetsManager:new Map,children:[(0,n.jsx)("div",{ref:st,"data-testid":"techdocs-native-shadowroot"}),$]})})};var T=t(12784);const P=()=>{const{shadowRoot:f}=(0,m.V)();return f},w=f=>{const I=P(),[U,$]=(0,a.useState)(I?.firstChild);return(0,a.useEffect)(()=>{let z;return I&&(z=new MutationObserver(()=>{$(I?.firstChild)}),z.observe(I,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),()=>z?.disconnect()},[I]),!U||!(U instanceof HTMLElement)?[]:f.map(z=>U.querySelectorAll(z)).filter(z=>z.length).map(z=>Array.from(z)).flat()},O=f=>f.toString()&&f.rangeCount&&f.getRangeAt(0).getBoundingClientRect().top,j=(f=0)=>{const I=P(),[U,$]=useState(null),z=useMemo(()=>debounce(()=>{const X=I,st=X.getSelection?X.getSelection():document.getSelection();st&&O(st)?$(st):$(null)},f),[I,$,f]);return useEffect(()=>(window.document.addEventListener("selectionchange",z),()=>{z.cancel(),window.document.removeEventListener("selectionchange",z)}),[z]),U};var F=t(12173),L=t(26280),Z=t(68146),G=t(45250),N=t(73466),Q=t(5877),q=t(43836),K=t(10602),et=t(72427),J=t(93368),Y=t(25862),V=t(65461),at=t(55309);const nt=(0,at.y)({id:"plugin.search.queryservice"});class gt{mockedResults;constructor(I){this.mockedResults=I}query(){return Promise.resolve(this.mockedResults||{results:[]})}}const bt=(0,q.tK)("search-context"),xt=()=>{const f=(0,a.useContext)(bt);if(!f)throw new Error("useSearch must be used within a SearchContextProvider");const I=f.atVersion(1);if(!I)throw new Error("No SearchContext v1 found");return I},ht=()=>(0,a.useContext)(bt)!==void 0,ut={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},Et=(f=ut)=>{const I=(0,et.gf)(nt),U=(0,J.s)(),[$,z]=(0,a.useState)(f.term),[X,st]=(0,a.useState)(f.types),[At,St]=(0,a.useState)(f.filters),[$t,Dt]=(0,a.useState)(f.pageLimit),[Ft,_t]=(0,a.useState)(f.pageCursor),Ht=(0,Q.A)($),he=(0,Q.A)(At),Yt=(0,N.A)(async()=>{const oe=await I.query({term:$,types:X,filters:At,pageLimit:$t,pageCursor:Ft});return $&&U.captureEvent("search",$,{value:Yt.value?.numberOfResults??void 0}),oe},[$,X,At,$t,Ft]),ge=!Yt.loading&&!Yt.error&&Yt.value?.nextPageCursor,qt=!Yt.loading&&!Yt.error&&Yt.value?.previousPageCursor,ue=(0,a.useCallback)(()=>{_t(Yt.value?.nextPageCursor)},[Yt.value?.nextPageCursor]),re=(0,a.useCallback)(()=>{_t(Yt.value?.previousPageCursor)},[Yt.value?.previousPageCursor]);return(0,a.useEffect)(()=>{Ht!==void 0&&$!==Ht&&_t(void 0)},[$,Ht,_t]),(0,a.useEffect)(()=>{he!==void 0&&!(0,G.isEqual)(At,he)&&_t(void 0)},[At,he,_t]),{result:Yt,term:$,setTerm:z,types:X,setTypes:st,filters:At,setFilters:St,pageLimit:$t,setPageLimit:Dt,pageCursor:Ft,setPageCursor:_t,fetchNextPage:ge?ue:void 0,fetchPreviousPage:qt?re:void 0}},mt=f=>{const{initialState:I,children:U}=f,$=Et(I);return(0,n.jsx)(Y.Ig,{attributes:{searchTypes:$.types.sort().join(",")},children:(0,n.jsx)(bt.Provider,{value:(0,K.B)({1:$}),children:U})})},Pt=f=>{const{initialState:I,inheritParentContextIfAvailable:U,children:$}=f,z=ht(),X=(0,et.gf)(V.U),st=I??{},At=X.has("search.query.pageLimit")?{pageLimit:X.getNumber("search.query.pageLimit")}:{},St={...ut,...st,...At};return z&&U?(0,n.jsx)(n.Fragment,{children:$}):(0,n.jsx)(mt,{initialState:St,children:$})};var Ot=t(78467),jt=t(20577),Nt=t(82266),Bt=t(29365),pt=t(34839),Lt=t(16249),ft=t(64947),B=t(45917),k=t(22771);const ot=(0,a.forwardRef)((f,I)=>{const{onChange:U,onKeyDown:$=()=>{},onClear:z=()=>{},onSubmit:X=()=>{},debounceTime:st=200,clearButton:At=!0,fullWidth:St=!0,value:$t,label:Dt,placeholder:Ft,inputProps:_t={},InputProps:Ht={},endAdornment:he,...Yt}=f,ge=(0,et.gf)(V.U),[qt,ue]=(0,a.useState)(""),re=(0,a.useRef)("");(0,a.useEffect)(()=>{ue(Ce=>Ce===re.current?String($t):Ce)},[$t,re]),(0,k.A)(()=>{re.current=qt,U(qt)},st,[qt]);const ne=(0,a.useCallback)(Ce=>{ue(Ce.target.value)},[ue]),oe=(0,a.useCallback)(Ce=>{$&&$(Ce),X&&Ce.key==="Enter"&&X()},[$,X]),ie=(0,a.useCallback)(()=>{re.current="",U(""),ue(""),z&&z()},[U,z]),Re=Dt?void 0:"Search",Le=Ft??`Search in ${ge.getOptionalString("app.title")||"Backstage"}`,qe=(0,Nt.n)().getSystemIcon("search")||B.A,rn=(0,n.jsx)(pt.A,{position:"start",children:(0,n.jsx)(Bt.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,n.jsx)(qe,{})})}),Ge=(0,n.jsx)(pt.A,{position:"end",children:(0,n.jsx)(ft.A,{"aria-label":"Clear",size:"small",onClick:ie,onKeyDown:Ce=>{Ce.key==="Enter"&&Ce.stopPropagation()},children:"Clear"})});return(0,n.jsx)(Pt,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(Lt.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:I,value:qt,label:Dt,placeholder:Le,InputProps:{startAdornment:rn,endAdornment:At?Ge:he,...Ht},inputProps:{"aria-label":Re,..._t},fullWidth:St,onChange:ne,onKeyDown:oe,...Yt})})}),Ct=(0,a.forwardRef)((f,I)=>{const{value:U="",onChange:$,...z}=f,{term:X,setTerm:st}=xt();(0,a.useEffect)(()=>{U&&st(String(U))},[U,st]);const At=(0,a.useCallback)(St=>{$?$(St):st(St)},[$,st]);return(0,n.jsx)(Pt,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(Y.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,n.jsx)(ot,{...z,ref:I,value:X,onChange:At})})})}),it=(0,x.A)(f=>({loading:{right:f.spacing(1),position:"absolute"}})),vt=f=>I=>(0,n.jsx)(Pt,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(f,{...I})}),Tt=()=>{const f=it();return(0,n.jsx)(Ot.A,{className:f.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},wt=vt(function(I){const{loading:U,value:$,onChange:z=()=>{},options:X=[],getOptionLabel:st=re=>String(re),inputPlaceholder:At,inputDebounceTime:St,freeSolo:$t=!0,fullWidth:Dt=!0,clearOnBlur:Ft=!1,"data-testid":_t="search-autocomplete",...Ht}=I,{setTerm:he}=xt(),Yt=(0,a.useCallback)(re=>re?typeof re=="string"?re:st(re):"",[st]),ge=(0,a.useMemo)(()=>Yt($),[$,Yt]),qt=(0,a.useCallback)((re,ne,oe,ie)=>{he(Yt(ne)),z(re,ne,oe,ie)},[Yt,he,z]),ue=(0,a.useCallback)(({InputProps:{ref:re,className:ne,endAdornment:oe},InputLabelProps:ie,...Re})=>(0,n.jsx)(Ct,{...Re,ref:re,clearButton:!1,value:ge,placeholder:At,debounceTime:St,endAdornment:U?(0,n.jsx)(Tt,{}):oe,InputProps:{className:ne}}),[U,ge,At,St]);return(0,n.jsx)(jt.Ay,{...Ht,"data-testid":_t,value:$,onChange:qt,options:X,getOptionLabel:st,renderInput:ue,freeSolo:$t,fullWidth:Dt,clearOnBlur:Ft})});var It=t(18690),Ut=t(27698);const Qt=f=>f?.document,fe=f=>{const{entityId:I,entityTitle:U,debounceTime:$=150}=f,[z,X]=(0,a.useState)(!1),st=(0,It.Zp)(),{setFilters:At,term:St,result:{loading:$t,value:Dt}}=xt(),[Ft,_t]=(0,a.useState)([]);(0,a.useEffect)(()=>{let qt=!0;if(qt&&Dt){const ue=Dt.results.slice(0,10);_t(ue)}return()=>{qt=!1}},[$t,Dt]);const{kind:Ht,name:he,namespace:Yt}=I;(0,a.useEffect)(()=>{At(qt=>({...qt,kind:Ht,namespace:Yt,name:he}))},[Ht,Yt,he,At]);const ge=(qt,ue)=>{if(Qt(ue)){const{location:re}=ue.document;st(re)}};return(0,n.jsx)(wt,{"data-testid":"techdocs-search-bar",size:"small",open:z&&!!St,getOptionLabel:()=>"",filterOptions:qt=>qt,onClose:()=>{X(!1)},onOpen:()=>{X(!0)},onChange:ge,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Ft,renderOption:({document:qt,highlight:ue})=>(0,n.jsx)(Ut.TechDocsSearchResultListItem,{result:qt,lineClamp:3,asListItem:!1,asLink:!1,title:qt.title,highlight:ue}),loading:$t,inputDebounceTime:$,inputPlaceholder:`Search ${U||I.name} docs`,freeSolo:!1})},le=f=>{const I={term:"",types:["techdocs"],pageCursor:"",filters:f.entityId};return(0,n.jsx)(Pt,{initialState:I,children:(0,n.jsx)(fe,{...f})})};var te=t(74219);const se=(0,a.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(f=>({default:f.RealLogViewer})));function Te(f){const{Progress:I}=(0,Nt.n)().getComponents();return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(I,{}),children:(0,n.jsx)(se,{...f})})}var ze=t(73845),zt=t(72501),ee=t(12398),Zt=t(32881);const We=(0,x.A)(f=>(0,ee.A)({paper:{width:"100%",[f.breakpoints.up("sm")]:{width:"75%"},[f.breakpoints.up("md")]:{width:"50%"},padding:f.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:f.palette.background.default}})),ce=({buildLog:f,onClose:I})=>{const U=We(),$=f.length===0?"Waiting for logs...":f.join(`
|
|
8
|
-
`);return(0,n.jsxs)(d.A,{container:!0,direction:"column",className:U.root,spacing:0,wrap:"nowrap",children:[(0,n.jsxs)(d.A,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,n.jsx)(zt.A,{variant:"h5",children:"Build Details"}),(0,n.jsx)(
|
|
7
|
+
`);const Oe=kr({root:c,discoverers:[Wr,Kr],collectors:{routing:Vt?Vr:Hr,collectedPlugins:zr,featureFlags:Gr}});return Oe.collectedPlugins.forEach(Me=>this.plugins.add(Me)),this.verifyPlugins(this.plugins),this.getApiHolder(),Oe},[c]),_=Io(this.configLoader,this.components,C),ct="api"in _;if(ct){const{api:Vt}=_;this.configApi=Vt}if("node"in _)return _.node;if(o)throw o;if(!s)try{s=Eo(this.bindRoutes,_.api,this.plugins),no(R.paths,R.parents),so(s,this.plugins)}catch(Vt){throw o=Vt,Vt}if(ct&&S.current){S.current=!1;const Vt=this.getApiHolder().get(gn.B);if(Vt){for(const De of this.featureFlags)Vt.registerFlag({...De,pluginId:""});for(const De of this.plugins.values())if("getFeatureFlags"in De)for(const cn of De.getFeatureFlags())Vt.registerFlag({name:cn.name,pluginId:De.getId()});else for(const cn of De.output())cn.type==="feature-flag"&&Vt.registerFlag({name:cn.name,pluginId:De.getId()});const Oe=Vt.getRegisteredFlags(),Me=new Set(Oe.map(De=>De.name));for(const De of K)Me.has(De)||Vt.registerFlag({name:De,pluginId:""})}}const{ThemeProvider:rt=qs,Progress:dt}=this.components,Rt=this.getApiHolder();if(Ro()){const Vt=Rt.get(Pe.m),Oe=Rt.get(de.a),Me=Rt.get(Xt.I);if(!Vt||!Oe||!Me)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Vt,fetchApi:Oe,discoveryApi:Me})}return(0,a.jsx)(qe,{apis:Rt,children:(0,a.jsx)(oo,{appContext:e,children:(0,a.jsx)(rt,{children:(0,a.jsx)(eo,{routePaths:R.paths,routeParents:R.parents,routeObjects:R.objects,routeBindings:s,basePath:So(_.api),children:(0,a.jsx)(er.Provider,{value:{routeObjects:R.objects,appIdentityProxy:this.appIdentityProxy},children:(0,a.jsx)(d.Suspense,{fallback:(0,a.jsx)(dt,{}),children:c})})})})})})}}getRouter(){return or}getApiHolder(){if(this.apiHolder){for(const e of this.plugins)for(const s of e.getApis())this.apiFactoryRegistry.get(s.api)||this.apiFactoryRegistry.register("default",s);return Ds.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:Hn,deps:{},factory:()=>zn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:kt.U,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:ae.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:zs,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:Fr.J,deps:{languageApi:zs},factory:({languageApi:e})=>js.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:gn.B,deps:{},factory:()=>new $r});for(const e of this.defaultApis)this.apiFactoryRegistry.register("default",e);for(const e of this.plugins)for(const s of e.getApis())if(!this.apiFactoryRegistry.register("default",s))throw new Error(`Plugin ${e.getId()} tried to register duplicate or forbidden API factory for ${s.api}`);for(const e of this.apis)if(!this.apiFactoryRegistry.register("app",e))throw new Error(`Duplicate or forbidden API factory for ${e.api} in app`);return Ds.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new Ds(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const s=new Set;for(const o of e){const i=o.getId();if(s.has(i))throw new Error(`Duplicate plugin found '${i}'`);s.add(i)}}}function Mo(r){return new Lo(r)}function jo(r){return Mo({...r,apis:r?.apis??[],bindRoutes:r?.bindRoutes,components:{...L,...r?.components},configLoader:r?.configLoader,defaultApis:as,icons:{...Es,...r?.icons},plugins:r?.plugins??[],featureFlags:r?.featureFlags??[],themes:r?.themes??qt})}var Xn=t(82442);let lr=!1;const dr=r=>{const e=(0,nr.n)(),{NotFoundErrorPage:s}=e.getComponents(),o=(0,d.useMemo)(()=>wn(),[]),c=[...(0,Xn.O)(r.children,S=>S.getElements().flatMap(C=>{let R=C.props.path;if(R==="")return[];R=R?.replace(/\/\*$/,"")??"/";let K=o?C:C.props.element;return!o&&!K&&(K=C,lr||(console.warn("DEPRECATION WARNING: All elements within <FlatRoutes> must be of type <Route> with an element prop. Existing usages of <Navigate key=[path] to=[to] /> should be replaced with <Route path=[path] element={<Navigate to=[to] />} />."),lr=!0)),[{path:R,element:K,children:C.props.children?[{path:R==="/"?"/":"*",element:C.props.children}]:void 0}]}).sort((C,R)=>R.path.localeCompare(C.path)).map(C=>({...C,path:C.path==="/"?"/":`${C.path}/*`}))),{path:"*",element:(0,a.jsx)(s,{})}];return(0,m.Ye)(c)};(0,be.h)(dr,"core.type","FlatRoutes");var fn=t(6820),Bo=t(78692),Uo=t(86519);function $o(r){return!r.cursor}function Fo(r,e){if(!r.length)return[];const{maxCountPerChunk:s=1e3,maxStringLengthPerChunk:o=90*2**10,extraStringLengthPerRef:i=3}=e??{},c=[];let S=0,C=0,R=0;for(let K=0;K<r.length;++K){const _=r[K].length+i;R>0&&(C+_>o||R+1>s)&&(c.push(r.slice(S,K)),S=K,C=0,R=0),C+=_,R+=1}return c.push(r.slice(S,r.length)),c}const ve="catalog";var ye=t(94214);class No{discoveryApi;fetchApi;constructor(e){this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:yn()}}async analyzeLocation(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/analyze-location").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async createLocation(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/locations{?dryRun}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async deleteEntityByUid(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"DELETE"})}async deleteLocation(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"DELETE"})}async getEntities(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entities{?fields,limit,filter*,offset,after,order*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntitiesByQuery(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entities/by-query{?fields,limit,offset,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntitiesByRefs(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entities/by-refs{?filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async getEntityAncestryByName(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entities/by-name/{kind}/{namespace}/{name}/ancestry").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityByName(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entities/by-name/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityByUid(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityFacets(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/entity-facets{?facet*,filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocation(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocationByEntity(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/locations/by-entity/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocations(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/locations").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async refreshEntity(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/refresh").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async validateEntity(e,s){const o=await this.discoveryApi.getBaseUrl(ve),c=ye.parse("/validate-entity").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}}class ko{apiClient;constructor(e){this.apiClient=new No(e)}async getEntityAncestors(e,s){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,fn.KU)(e.entityRef)},s))}async getLocationById(e,s){return await this.requestOptional(await this.apiClient.getLocation({path:{id:e}},s))}async getLocationByEntity(e,s){return await this.requestOptional(await this.apiClient.getLocationByEntity({path:(0,fn.KU)(e)},s))}async getEntities(e,s){const{filter:o=[],fields:i=[],order:c,offset:S,limit:C,after:R}=e??{},K=[];if(c)for(const ct of[c].flat())ct&&K.push(`${ct.order}:${ct.field}`);return{items:await this.requestRequired(await this.apiClient.getEntities({query:{fields:i,limit:C,filter:this.getFilterValue(o),offset:S,after:R,order:c?K:void 0}},s))}}async getEntitiesByRefs(e,s){const o=async c=>{const S=await this.apiClient.getEntitiesByRefs({body:{entityRefs:c,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},s);if(!S.ok)throw await Xe.o.fromResponse(S);return(await S.json()).items.map(R=>R??void 0)};let i;for(const c of Fo(e.entityRefs)){const S=await o(c);i?i.push(...S):i=S}return{items:i??[]}}async queryEntities(e={},s){const o={};if($o(e)){const{fields:i=[],filter:c,limit:S,offset:C,orderFields:R,fullTextFilter:K}=e;o.filter=this.getFilterValue(c),S!==void 0&&(o.limit=S),C!==void 0&&(o.offset=C),R!==void 0&&(o.orderField=(Array.isArray(R)?R:[R]).map(({field:ct,order:rt})=>`${ct},${rt}`)),i.length&&(o.fields=i);const _=K?.term?.trim();_&&(o.fullTextFilterTerm=_),K?.fields?.length&&(o.fullTextFilterFields=K.fields)}else{const{fields:i=[],limit:c,cursor:S}=e;o.cursor=S,c!==void 0&&(o.limit=c),i.length&&(o.fields=i)}return this.apiClient.getEntitiesByQuery({query:o},s).then(i=>i.json())}async getEntityByRef(e,s){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,fn.KU)(e)},s))}async getEntityByName(e,s){const{kind:o,namespace:i="default",name:c}=e;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:o,namespace:i,name:c}},s))}async refreshEntity(e,s){const o=await this.apiClient.refreshEntity({body:{entityRef:e}},s);if(o.status!==200)throw new Error(await o.text())}async getEntityFacets(e,s){const{filter:o=[],facets:i}=e;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:i,filter:this.getFilterValue(o)}},s))}async addLocation(e,s){const{type:o="url",target:i,dryRun:c}=e,S=await this.apiClient.createLocation({body:{type:o,target:i},query:{dryRun:c?"true":void 0}},s);if(S.status!==201)throw new Error(await S.text());const{location:C,entities:R,exists:K}=await S.json();if(!C)throw new Error(`Location wasn't added: ${i}`);return{location:C,entities:R,exists:K}}async getLocationByRef(e,s){return(await this.requestRequired(await this.apiClient.getLocations({},s))).map(i=>i.data).find(i=>e===(0,Bo.KL)(i))}async removeLocationById(e,s){await this.requestIgnored(await this.apiClient.deleteLocation({path:{id:e}},s))}async removeEntityByUid(e,s){await this.requestIgnored(await this.apiClient.deleteEntityByUid({path:{uid:e}},s))}async validateEntity(e,s,o){const i=await this.apiClient.validateEntity({body:{entity:e,location:s}},o);if(i.ok)return{valid:!0};if(i.status!==400)throw await Xe.o.fromResponse(i);const{errors:c=[]}=await i.json();return{valid:!1,errors:c}}async requestIgnored(e){if(!e.ok)throw await Xe.o.fromResponse(e)}async requestRequired(e){if(!e.ok)throw await Xe.o.fromResponse(e);return e.json()}async requestOptional(e){if(!e.ok){if(e.status===404)return;throw await Xe.o.fromResponse(e)}return await e.json()}getFilterValue(e=[]){const s=[];for(const o of[e].flat()){const i=[];for(const[c,S]of Object.entries(o))for(const C of[S].flat())C===Uo.c?i.push(c):typeof C=="string"&&i.push(`${c}=${C}`);i.length&&s.push(i.join(","))}return s}}var ur=t(7341),Wo=t(18),Ko=t(82292),hr=t(29207),mn=t(95203),zo=t(9803),Ie=t(88758),Ho=t(54560),vn=t(45250);async function Vo({storageApi:r}){const e=r.forBucket("settings"),s=r.forBucket("starredEntities"),o=e.snapshot("starredEntities").value;if(!(0,vn.isArray)(o))return;const i=new Set(s.snapshot("entityRefs").value??[]);o.filter(vn.isString).map(c=>c.split(":")).filter(c=>c.length===4&&c[0]==="entity").map(([c,S,C,R])=>(0,fn.U2)({kind:S,namespace:C,name:R})).forEach(c=>i.add(c)),await s.set("entityRefs",Array.from(i)),await e.remove("starredEntities")}class Go{settingsStore;starredEntities;constructor(e){Vo(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities"),this.starredEntities=new Set(this.settingsStore.snapshot("entityRefs").value??[]),this.settingsStore.observe$("entityRefs").subscribe({next:s=>{this.starredEntities=new Set(s.value??[]),this.notifyChanges()}})}async toggleStarred(e){this.starredEntities.has(e)?this.starredEntities.delete(e):this.starredEntities.add(e),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}subscribers=new Set;observable=new(Q())(e=>(e.next(new Set(this.starredEntities)),this.subscribers.add(e),()=>{this.subscribers.delete(e)}));notifyChanges(){for(const e of this.subscribers)e.next(new Set(this.starredEntities))}}function Bs(r){const{years:e=0,months:s=0,weeks:o=0,days:i=0,hours:c=0,minutes:S=0,seconds:C=0,milliseconds:R=0}=r;return((((e*365+s*30+o*7+i)*24+c)*60+S)*60+C)*1e3+R}var Yo=t(25033),Qo=t.n(Yo),Zo=t(25295),Jo=t.n(Zo),Xo=t(88083);const _o={seconds:10},qo={milliseconds:50},ta={api:jn.A,component:Un.A,system:Dn.A,resource:$n.A,domain:An.A,location:Bn.A,user:Cn.A,group:xn.A,template:Fn.A};function gr(r){return{async:r.async,render:({entityRef:e,entity:s,context:o})=>({snapshot:(0,Xo.T)(s||e,o),loadEntity:r.async})}}class _n{static createLocal(){return new _n({renderer:gr({async:!1})})}static create(e){return new _n(e)}#t;#n;#e;#s;#r;constructor(e){const s=e.cacheTtl??_o,o=e.batchDelay??qo,i=e.renderer??gr({async:!0}),c={};if(Object.entries(ta).forEach(([S,C])=>{c[S.toLocaleLowerCase("en-US")]=C}),Object.entries(e.kindIcons??{}).forEach(([S,C])=>{c[S.toLocaleLowerCase("en-US")]=C}),i.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");this.#e=this.#a({cacheTtl:s,batchDelay:o,renderer:i,catalogApi:e.catalogApi})}this.#n=Bs(s),this.#t=new Map,this.#s=c,this.#r=i}forEntity(e,s){const{entityRef:o,kind:i,entity:c,needsLoad:S}=this.#o(e),C=rt=>{const{snapshot:dt}=this.#r.render({entityRef:o,loading:rt.loading,entity:rt.entity,context:s||{}});return{...dt,entityRef:o,Icon:this.#i(dt.Icon,i)}};let R;try{R=C({loading:S,entity:c})}catch{R={primaryTitle:o,entityRef:o}}if(!S)return{snapshot:R,promise:Promise.resolve(R)};const K=Promise.resolve().then(()=>this.#e?.load(o)).then(rt=>C({loading:!1,entity:rt??c})).catch(()=>{}),_=new(Q())(rt=>{let dt=!1;return K.then(Rt=>{Rt&&rt.next(Rt)}).finally(()=>{dt||rt.complete()}),()=>{dt=!0}}),ct=K.then(rt=>rt??R);return{snapshot:R,update$:_,promise:ct}}#o(e){if(typeof e!="string")return{entity:e,kind:e.kind,entityRef:(0,fn.U2)(e),needsLoad:!1};const s=this.#t.get(e),o=s?.entity,c=(!s||Date.now()-s.updatedAt>this.#n)&&this.#r.async!==!1&&this.#e!==void 0;return{entity:o,kind:(0,fn.KU)(e).kind,entityRef:e,needsLoad:c}}#a(e){const s=Bs(e.cacheTtl),o=Bs(e.batchDelay);return new(Qo())(async i=>{const{items:c}=await e.catalogApi.getEntitiesByRefs({entityRefs:i,fields:["kind","metadata.name","metadata.namespace","metadata.title","metadata.description","spec.profile.displayName","spec.type"]}),S=Date.now();return i.forEach((C,R)=>{this.#t.set(C,{updatedAt:S,entity:c[R]})}),c},{name:"DefaultEntityPresentationApi",cacheMap:new(Jo())(s),maxBatchSize:100,batchScheduleFn:o?i=>setTimeout(i,o):void 0})}#i(e,s){return e||(e===!1?!1:this.#s[s.toLocaleLowerCase("en-US")])}}const Se=(0,zo.i)({id:"catalog",apis:[(0,Mt.b)({api:ur.v,deps:{discoveryApi:Xt.I,fetchApi:de.a},factory:({discoveryApi:r,fetchApi:e})=>new ko({discoveryApi:r,fetchApi:e})}),(0,Mt.b)({api:Wo.a,deps:{storageApi:Ve},factory:({storageApi:r})=>new Go({storageApi:r})}),(0,Mt.b)({api:Ko.n,deps:{catalogApi:ur.v},factory:({catalogApi:r})=>_n.create({catalogApi:r})})],routes:{catalogIndex:mn.rQ,catalogEntity:hr.s},externalRoutes:{createComponent:mn.qP,viewTechDoc:mn.UJ,createFromTemplate:mn.Zg,unregisterRedirect:mn.pS}}),gi=Se.provide((0,Ie.QJ)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(3720),t.e(5184),t.e(2177)]).then(t.bind(t,62177)).then(r=>r.CatalogPage),mountPoint:mn.rQ})),ea=Se.provide((0,Ie.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(r=>r.CatalogEntityPage),mountPoint:hr.s})),pi=Se.provide((0,Ie.NC)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(3720),t.e(1902),t.e(5724)]).then(t.bind(t,65724)).then(r=>r.AboutCard)}})),fi=Se.provide((0,Ie.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),mi=Se.provide((0,Ie.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),vi=Se.provide((0,Ie.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),yi=Se.provide((0,Ie.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),Ei=Se.provide((0,Ie.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),Ai=Se.provide((0,Ie.NC)({name:"EntityHasSubdomainsCard",component:{lazy:()=>t.e(6415).then(t.bind(t,46415)).then(r=>r.HasSubdomainsCard)}})),xi=Se.provide((0,Ie.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),Ci=Se.provide((0,Ie.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),bi=Se.provide((0,Ie.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),Si=Se.provide((0,Ie.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),Oi=Se.provide((0,Ie.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),Ti=Se.provide((0,Ho.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var pr=t(3347),fr=t(26679);class na{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:o}){this.configApi=e,this.discoveryApi=s,this.identityApi=o}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(e,s){const i=`${await this.getApiOrigin()}/${s}`,c=await fetch(`${i.endsWith("/")?i:`${i}/`}index.html`);if(c.status===404)throw new Error("Page not found");return c.text()}async syncEntityDocs(e){return"cached"}async getBaseUrl(e,s,o){const i=await this.getApiOrigin();return new URL(e,`${i}/${o}`).toString()}}class sa{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:o}){this.configApi=e,this.discoveryApi=s,this.identityApi=o}async getCookie(){return{expiresAt:new Date(Date.now()+6e5).toISOString()}}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(e){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(e){return{site_name:"Live preview environment",site_description:""}}}const ra=[(0,Mt.b)({api:fr.s,deps:{configApi:kt.U,discoveryApi:Xt.I,identityApi:ae.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new na({configApi:r,discoveryApi:e,identityApi:s})}),(0,Mt.b)({api:fr.l,deps:{configApi:kt.U,discoveryApi:Xt.I,identityApi:ae.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new sa({configApi:r,discoveryApi:e,identityApi:s})}),(0,Mt.b)({api:pr.Y,deps:{configApi:kt.U},factory:({configApi:r})=>pr.L.fromConfig(r)})],oa={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},aa={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function ia(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function ca(){const r=await tr(),e=await ia();return[...r,{context:"detected",data:e?oa:aa}]}var Qe=t(58837),la=t(3210);const da=(0,Qe.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}}),ua=()=>{const r=da();return(0,a.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,a.jsx)("path",{className:r.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"})})},ha=(0,Qe.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}}),ga=()=>{const r=ha();return(0,a.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,a.jsx)("path",{className:r.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"})})};var Ee=t(72664);const mr={isOpen:!1,setOpen:()=>{}},vr=(0,d.createContext)(mr),yr=(0,ie.tK)("sidebar-open-state-context");function Er(r){const{children:e,value:s}=r;return(0,a.jsx)(vr.Provider,{value:s,children:(0,a.jsx)(yr.Provider,{value:(0,Re.B)({1:s}),children:e})})}const Us=()=>{const r=(0,d.useContext)(yr),e=(0,d.useContext)(vr);if(r===void 0)return e||mr;const s=r.atVersion(1);if(s===void 0)throw new Error("No context found for version 1.");return s};var Ar=t(72072),xr=t(73524),tn=t(10394),Cr=t(5893),pa=t(53373),an=t.n(pa),fa=t(1125),br=t(29365),ma=t(73845),$s=t(72501),va=t(32881),ya=t(27326),Ea=t(13085);const Sr=(0,d.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var Fs=t(34435);const Aa=(0,Qe.A)(r=>({root:{flexGrow:0,margin:r.spacing(0,2),color:r.palette.navigation.color},selected:e=>({color:`${r.palette.navigation.selectedColor}!important`,borderTop:`solid ${e.sidebarConfig.selectedIndicatorWidth}px ${r.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),xa=r=>{const{to:e,label:s,icon:o,value:i}=r,{sidebarConfig:c}=(0,d.useContext)(Ee.yY),S=Aa({sidebarConfig:c}),C=(0,m.zy)(),{selectedMenuItemIndex:R,setSelectedMenuItemIndex:K}=(0,d.useContext)(Sr),_=(rt,dt)=>{K(dt===R?-1:dt)},ct=i===R&&R>=0||i!==R&&!(R>=0)&&e===C.pathname;return(0,a.jsx)(Ea.A,{"aria-label":s,label:s,icon:o,component:Ar.N_,to:e||C.pathname,onChange:_,value:i,selected:ct,classes:S})},Or=r=>{const{children:e,to:s,label:o,icon:i,value:c}=r,{isMobile:S}=(0,Fs.Ut)();return S?(0,a.jsx)(xa,{to:s,label:o,icon:i,value:c}):(0,a.jsx)(a.Fragment,{children:e})},Tr=(0,Qe.A)(r=>({root:{position:"fixed",backgroundColor:r.palette.navigation.background,color:r.palette.navigation.color,bottom:0,left:0,right:0,zIndex:r.zIndex.snackbar,borderTop:"1px solid #383838","@media print":{display:"none"}},overlay:e=>({background:r.palette.navigation.background,width:"100%",bottom:`${e.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${e.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:r.palette.navigation.color,alignItems:"center",justifyContent:"space-between",padding:r.spacing(2,3)},overlayHeaderClose:{color:r.palette.navigation.color},marginMobileSidebar:e=>({marginBottom:`${e.sidebarConfig.mobileSidebarHeight}px`})})),Ca=r=>(0,vn.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),ba=d.createElement(Or).type,Sa=({children:r,label:e="Menu",open:s,onClose:o})=>{const{sidebarConfig:i}=(0,d.useContext)(Ee.yY),c=Tr({sidebarConfig:i});return(0,a.jsxs)(ma.Ay,{anchor:"bottom",open:s,onClose:o,ModalProps:{BackdropProps:{classes:{root:c.marginMobileSidebar}}},classes:{root:c.marginMobileSidebar,paperAnchorBottom:c.overlay},children:[(0,a.jsxs)(tn.A,{className:c.overlayHeader,children:[(0,a.jsx)($s.A,{variant:"h3",children:e}),(0,a.jsx)(br.A,{onClick:o,classes:{root:c.overlayHeaderClose},children:(0,a.jsx)(va.A,{})})]}),(0,a.jsx)(tn.A,{component:"nav",children:r})]})},Oa=r=>{const{sidebarConfig:e}=(0,d.useContext)(Ee.yY),{children:s}=r,o=Tr({sidebarConfig:e}),i=(0,m.zy)(),[c,S]=(0,d.useState)(-1);(0,d.useEffect)(()=>{S(-1)},[i.pathname]);let C=(0,Xn.O)(s,K=>K.getElements().filter(_=>_.type===ba));if(s)C.length?C=Ca(C):C.push((0,a.jsx)(Or,{icon:(0,a.jsx)(ya.A,{}),children:s},"default_menu"));else return null;const R=c>=0&&!C[c].props.to;return(0,a.jsx)(Er,{value:{isOpen:!0,setOpen:()=>{}},children:(0,a.jsxs)(Sr.Provider,{value:{selectedMenuItemIndex:c,setSelectedMenuItemIndex:S},children:[(0,a.jsx)(Sa,{label:C[c]&&C[c].props.label,open:R,onClose:()=>S(-1),children:C[c]&&C[c].props.children}),(0,a.jsx)(fa.A,{className:o.root,"data-testid":"mobile-sidebar-root",component:"nav",children:C})]})})};var Ta=t(87849),Pa=t(10315);const Pr=(0,Qe.A)(r=>({drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:r.zIndex.appBar,background:r.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"},"@media print":{display:"none"}},drawerWidth:e=>({width:e.sidebarConfig.drawerWidthClosed}),drawerOpen:e=>({width:e.sidebarConfig.drawerWidthOpen,transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var wa=function(r){return r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open",r}(wa||{});const Ra=r=>{const{sidebarConfig:e}=(0,d.useContext)(Ee.yY),{openDelayMs:s=e.defaultOpenDelayMs,closeDelayMs:o=e.defaultCloseDelayMs,disableExpandOnHover:i,children:c}=r,S=Pr({sidebarConfig:e}),C=(0,Cr.A)(Me=>Me.breakpoints.down("md"),{noSsr:!0}),[R,K]=(0,d.useState)(0),_=(0,d.useRef)(),{isPinned:ct,toggleSidebarPinState:rt}=(0,Fs.Ut)(),dt=()=>{ct||i||(_.current&&(clearTimeout(_.current),_.current=void 0),R!==2&&!C&&(_.current=window.setTimeout(()=>{_.current=void 0,K(2)},s),K(1)))},Rt=()=>{ct||i||(_.current&&(clearTimeout(_.current),_.current=void 0),R===1?K(0):R===2&&(_.current=window.setTimeout(()=>{_.current=void 0,K(0)},o)))},Vt=R===2&&!C||ct,Oe=Me=>{Me?(K(2),rt()):(K(0),rt())};return(0,a.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,a.jsx)(Da,{}),(0,a.jsx)(Er,{value:{isOpen:Vt,setOpen:Oe},children:(0,a.jsx)(tn.A,{className:S.root,"data-testid":"sidebar-root",onMouseEnter:i?()=>{}:dt,onFocus:i?()=>{}:dt,onMouseLeave:i?()=>{}:Rt,onBlur:i?()=>{}:Rt,children:(0,a.jsx)(tn.A,{className:an()(S.drawer,S.drawerWidth,{[S.drawerOpen]:Vt}),children:c})})})]})},Ia=r=>{const e=(0,Ee.Rv)(r.sidebarOptions??{}),s=(0,Ee.i8)(r.submenuOptions??{}),{children:o,disableExpandOnHover:i,openDelayMs:c,closeDelayMs:S}=r,{isMobile:C}=(0,Fs.Ut)();return C?(0,a.jsx)(Oa,{children:o}):(0,a.jsx)(Ee.yY.Provider,{value:{sidebarConfig:e,submenuConfig:s},children:(0,a.jsx)(Ra,{openDelayMs:c,closeDelayMs:S,disableExpandOnHover:i,children:o})})};function Da(){const{sidebarConfig:r}=(0,d.useContext)(Ee.yY),{focusContent:e,contentRef:s}=(0,xr.H)(),o=Pr({sidebarConfig:r}),{t:i}=(0,Ta.i)(Pa.O);return s?.current?(0,a.jsx)(y.A,{onClick:e,variant:"contained",className:an()(o.visuallyHidden),children:i("skipToContent")}):null}var La=t(94509),qn=t(44209),Ma=t(79065),ja=t(55704),wr=t(62248);const Ba=(0,Qe.A)(r=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:r.spacing(7)+1},drawer:e=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",opacity:0,[r.breakpoints.up("sm")]:{marginLeft:e.left,transition:r.transitions.create(["margin-left","opacity"],{easing:r.transitions.easing.sharp,duration:e.submenuConfig.defaultOpenDelayMs})},top:0,bottom:0,padding:0,background:r.palette.navigation.submenu?.background??"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:e.submenuConfig.drawerWidthClosed,transitionDelay:`${e.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:e=>({marginLeft:e.left,opacity:1,width:e.submenuConfig.drawerWidthOpen,[r.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:r.spacing(3),left:0,top:0}}),title:{fontSize:r.typography.h5.fontSize,fontWeight:r.typography.fontWeightMedium,color:r.palette.navigation.color,padding:r.spacing(2.5),[r.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),Ua=r=>{const{isOpen:e}=Us(),{sidebarConfig:s,submenuConfig:o}=(0,d.useContext)(Ee.yY),i=e?s.drawerWidthOpen:s.drawerWidthClosed,c=Ba({left:i,submenuConfig:o}),{isHoveredOn:S}=(0,d.useContext)(Ee.U1),[C,R]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{R(S)},[S]),(0,a.jsxs)(tn.A,{className:an()(c.drawer,{[c.drawerOpen]:C}),children:[(0,a.jsx)($s.A,{variant:"h5",component:"span",className:c.title,children:r.title}),r.children]})};var $a=t(45810),Rr=t.n($a);function Ir(r,e,s=!1){const o=new URLSearchParams(e.search).toString(),i=Rr().parse(o),c=new URLSearchParams(r.search).toString(),S=Rr().parse(c),C=s?vn.isEqual:vn.isMatch;return(0,vn.isEqual)(e.pathname,r.pathname)&&C(S,i)}const Fa=r=>(0,Qe.A)(e=>({root:{color:e.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",textTransform:"none"},closed:{width:r.drawerWidthClosed,justifyContent:"center"},open:{[e.breakpoints.up("sm")]:{width:r.drawerWidthOpen}},highlightable:{"&:hover":{background:e.palette.navigation.navItem?.hoverBackground??"#404040"}},highlighted:{background:e.palette.navigation.navItem?.hoverBackground??"#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:r.iconContainerWidth,marginRight:-e.spacing(2),display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"0"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:e.typography.fontWeightBold,fontSize:e.typography.fontSize},searchFieldHTMLInput:{padding:e.spacing(2,0,2)},searchContainer:{width:r.drawerWidthOpen-r.iconContainerWidth},secondaryAction:{width:e.spacing(6),textAlign:"center",marginRight:e.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:e.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${r.selectedIndicatorWidth}px ${e.palette.navigation.indicator}`,color:e.palette.navigation.selectedColor},"&$closed":{width:r.drawerWidthClosed},"& $closedItemIcon":{paddingRight:r.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-r.selectedIndicatorWidth}}}),{name:"BackstageSidebarItem"});function ts(r){return(0,d.useMemo)(()=>Fa(r),[r])()}const Na=(r,e)=>(0,Xn.O)(r.props.children,s=>{let o=!1;return s.getElements().forEach(({props:{to:i,dropdownItems:c}})=>{if(!o){if(c?.length){c.forEach(({to:S})=>o=o||Ir(e,(0,Tn.o1)(S)));return}i&&(o=Ir(e,(0,Tn.o1)(i)))}}),o},[e.pathname]);function Ns(r){return r.to===void 0}const ka=d.createElement(Ua).type,Wa=d.forwardRef(function({to:e,end:s,style:o,className:i,activeStyle:c,caseSensitive:S,activeClassName:C="active","aria-current":R="page",...K},_){let{pathname:ct}=(0,m.zy)(),{pathname:rt}=(0,m.x$)(e);S||(ct=ct.toLocaleLowerCase("en-US"),rt=rt.toLocaleLowerCase("en-US"));let dt=ct===rt;!dt&&!s&&(dt=ct.startsWith(`${rt}/`));const Rt=dt?R:void 0;return(0,a.jsx)(P.N_,{...K,to:e,ref:_,"aria-current":Rt,style:{...o,...dt?c:void 0},className:an()([typeof i!="function"?i:void 0,dt?C:void 0])})}),Dr=(0,d.forwardRef)((r,e)=>{const{icon:s,text:o,hasNotifications:i=!1,hasSubmenu:c=!1,disableHighlight:S=!1,onClick:C,noTrack:R,children:K,className:_,...ct}=r,{sidebarConfig:rt}=(0,d.useContext)(Ee.yY),dt=ts(rt),{isOpen:Rt}=Us(),Vt=!Rt&&c?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},Oe=(0,a.jsxs)(tn.A,{style:Vt,children:[(0,a.jsx)(s,{fontSize:"small"}),!Rt&&c?(0,a.jsx)(wr.A,{fontSize:"small"}):(0,a.jsx)(a.Fragment,{})]}),Me=(0,a.jsx)(La.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!i,className:an()({[dt.closedItemIcon]:!Rt}),children:Oe}),De=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(tn.A,{"data-testid":"login-button",className:dt.iconContainer,children:Me}),o&&(0,a.jsx)($s.A,{variant:"subtitle2",component:"span",className:dt.label,children:o}),(0,a.jsx)("div",{className:dt.secondaryAction,children:K})]}),cn=Rt?De:Me,jr={onClick:C,className:an()(_,dt.root,Rt?dt.open:dt.closed,Ns(r)&&dt.buttonItem,{[dt.highlightable]:!S})},Br=(0,sr.s)(),{pathname:ks}=(0,m.x$)(!Ns(r)&&r.to?r.to:""),Ur=(0,d.useCallback)(li=>{if(!R){const di="click",ui=o??"Sidebar Item",hi=ks?{attributes:{to:ks}}:void 0;Br.captureEvent(di,ui,hi)}C?.(li)},[Br,o,ks,R,C]);return Ns(r)?(0,a.jsx)(y.A,{role:"button","aria-label":o,...jr,ref:e,onClick:Ur,children:cn}):(0,a.jsx)(Wa,{...jr,activeClassName:dt.selected,to:r.to?r.to:"",ref:e,"aria-label":o||r.to,...ct,onClick:Ur,children:cn})}),Ka=({children:r,...e})=>{const{sidebarConfig:s}=(0,d.useContext)(Ee.yY),o=ts(s),[i,c]=(0,d.useState)(!1),S=(0,m.zy)(),C=Na(r,S),R=(0,Cr.A)(rt=>rt.breakpoints.down("sm")),K=()=>{c(!0)},_=()=>{c(!1)},ct=()=>R?i?(0,a.jsx)(ja.A,{fontSize:"small",className:o.submenuArrow}):(0,a.jsx)(Ma.A,{fontSize:"small",className:o.submenuArrow}):!i&&(0,a.jsx)(wr.A,{fontSize:"small",className:o.submenuArrow});return(0,a.jsx)(Ee.U1.Provider,{value:{isHoveredOn:i,setIsHoveredOn:c},children:(0,a.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:_,onTouchStart:i?_:K,onMouseEnter:K,className:an()(i&&o.highlighted),children:[(0,a.jsx)(Dr,{hasSubmenu:!0,className:C?o.selected:"",...e,children:ct()}),i&&r]})})},Lr=(0,d.forwardRef)((r,e)=>{const[s]=(0,Xn.O)(r.children,o=>o.getElements().filter(i=>i.type===ka));return s?(0,a.jsx)(Ka,{...r,children:s}):(0,a.jsx)(Dr,{...r,ref:e})});function Ri(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[s,o]=useState(""),i=ts(e),c=r.icon?r.icon:SearchIcon,S=()=>{r.onSearch(s),o("")},C=ct=>{ct.key==="Enter"&&(ct.preventDefault(),S())},R=ct=>{o(ct.target.value)},K=ct=>{ct.preventDefault(),ct.stopPropagation()},_=ct=>{S(),ct.preventDefault()};return _jsx(Box,{className:i.searchRoot,children:_jsx(Lr,{icon:c,to:r.to,onClick:_,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:s,onClick:K,onChange:R,onKeyDown:C,className:i.searchContainer,InputProps:{disableUnderline:!0,className:i.searchField},inputProps:{className:i.searchFieldHTMLInput}})})})}const Ii=(0,qn.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),Di=(0,qn.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),za=(0,qn.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Ha=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),Li=(0,qn.A)("div")(({theme:r})=>{const e=Ha(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),Mi=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=ts(r),{isOpen:s,setOpen:o}=useSidebarOpenState();if(useMediaQuery(S=>S.breakpoints.down("md"),{noSsr:!0}))return null;const c=()=>{o(!s)};return _jsx(Button,{role:"button",onClick:c,className:e.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:e.arrows,children:s?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},Va=(0,Qe.A)({root:{width:Ee.hC.drawerWidthClosed,height:3*Ee.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:Ee.hC.drawerWidthClosed,marginLeft:24}}),Ga=()=>{const r=Va(),{isOpen:e}=Us();return(0,a.jsx)("div",{className:r.root,children:(0,a.jsx)(Ar.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,a.jsx)(ua,{}):(0,a.jsx)(ga,{})})})},Ya=({children:r})=>(0,a.jsxs)(xr.G,{children:[(0,a.jsxs)(Ia,{children:[(0,a.jsx)(Ga,{}),(0,a.jsx)(za,{}),(0,a.jsx)(Lr,{icon:la.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Qa=t(71677),Za=t(62437),Ja=t(55484),Xa=t(45061),_a=t(67289);const qa=(0,Qe.A)(r=>({headerIcon:{color:r.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:r.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var ti=function(r){return r.LIGHT="light",r.DARK="dark",r}(ti||{});const ei=()=>{const r=(0,On.gf)(Hn),e=qa(),[s,o]=(0,d.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),i={light:{icon:Ja.A,title:"Dark theme"},dark:{icon:Za.A,title:"Light theme"}},{title:c,icon:S}=i[s],C=()=>{o(R=>{const K=R==="light"?"dark":"light";return r.setActiveThemeId(K),K})};return(0,a.jsx)(tn.A,{display:"flex",alignItems:"center",mr:2,children:(0,a.jsx)(Qa.Ay,{title:c,arrow:!0,children:(0,a.jsx)(br.A,{size:"small",onClick:C,children:(0,a.jsx)(S,{className:e.headerIcon})})})})},ni=()=>(0,a.jsxs)(h.Wj,{children:[(0,a.jsx)(Xa.T,{}),(0,a.jsx)(_a.p,{withSearch:!1})]}),si=(0,a.jsx)(ni,{}),Mr=jo({apis:ra,configLoader:ca,plugins:Object.values(n)}),ri=Mr.getProvider(),oi=Mr.getRouter(),ai=h.Ju.provide((0,g.Hr)({name:"ThemeToggleAddon",component:ei,location:p.e.Header})),ii=(0,a.jsxs)(dr,{children:[(0,a.jsx)(m.C5,{to:"/docs/default/component/local/"},"/"),(0,a.jsx)(m.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,a.jsx)(ea,{})}),(0,a.jsx)(m.qh,{path:"/docs",element:(0,a.jsx)(h.$j,{}),children:(0,a.jsx)(u.K,{})}),(0,a.jsxs)(m.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,a.jsx)(h.Wj,{}),children:[si,(0,a.jsx)(g.po,{children:(0,a.jsx)(ai,{})})]})]}),ci=()=>(0,a.jsx)(ri,{children:(0,a.jsx)(oi,{children:(0,a.jsx)(Ya,{children:ii})})});x.createRoot(document.getElementById("root")).render((0,a.jsx)(ci,{}))},43836:(H,b,t)=>{"use strict";t.d(b,{qO:()=>x,tK:()=>d});var n=t(14041),a=t(63544);function d(h){return(0,a.Q)(h,()=>(0,n.createContext)(void 0))}function x(h){return(0,n.useContext)(d(h))}function m(h){return{set(u){globalThis[`__@backstage/${h}__`]=createContext(createVersionedValueMap(u))},reset(){delete globalThis[`__@backstage/${h}__`]}}}},10602:(H,b,t)=>{"use strict";t.d(b,{B:()=>n});function n(a){Object.freeze(a);const d={atVersion(x){return a[x]}};return Object.defineProperty(d,"$map",{configurable:!0,enumerable:!0,get(){return a}}),d}},63544:(H,b,t)=>{"use strict";t.d(b,{Q:()=>x});function n(){return typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")()}const a=n(),d=m=>`__@backstage/${m}__`;function x(m,h){const u=d(m);let g=a[u];return g||(g=h(),a[u]=g,g)}},7341:(H,b,t)=>{"use strict";t.d(b,{v:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.catalog.service"})},82292:(H,b,t)=>{"use strict";t.d(b,{n:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.catalog.entity-presentation"})},88083:(H,b,t)=>{"use strict";t.d(b,{T:()=>m});var n=t(6820),a=t(72348),d=t(46123),x=t.n(d);function m(p,y){const{kind:v,namespace:A,name:T,title:P,description:w,displayName:O,type:j}=u(p),F=(0,n.U2)({kind:v||"unknown",namespace:A||a.oQ,name:T||"unknown"}),L=g({kind:v,namespace:A,name:T,context:y}),Z=[O,P,L].find(N=>N&&typeof N=="string"),G=[Z!==F?F:void 0,j,w].filter(N=>N&&typeof N=="string").join(" | ");return{entityRef:F,primaryTitle:Z,secondaryTitle:G||void 0,Icon:void 0}}const h=p=>!!p&&typeof p=="string";function u(p){if(typeof p=="string"){let y=p.indexOf(":");const v=p.indexOf("/");v!==-1&&v<y&&(y=-1);const A=y===-1?void 0:p.slice(0,y),T=v===-1?void 0:p.slice(y+1,v),P=p.slice(Math.max(y+1,v+1));return{kind:A,namespace:T,name:P}}if(typeof p=="object"&&p!==null){const y=[x()(p,"kind")].find(h),v=[x()(p,"metadata.namespace"),x()(p,"namespace")].find(h),A=[x()(p,"metadata.name"),x()(p,"name")].find(h),T=[x()(p,"metadata.title")].find(h),P=[x()(p,"metadata.description")].find(h),w=[x()(p,"spec.profile.displayName")].find(h),O=[x()(p,"spec.type")].find(h);return{kind:y,namespace:v,name:A,title:T,description:P,displayName:w,type:O}}return{}}function g(p){const y=p.kind?.toLocaleLowerCase("en-US")||"unknown",v=p.namespace||a.oQ,A=p.name||"unknown",T=p.context?.defaultKind?.toLocaleLowerCase("en-US"),P=p.context?.defaultNamespace?.toLocaleLowerCase("en-US");let w=A;return(P&&v.toLocaleLowerCase("en-US")!==P||v!==a.oQ)&&(w=`${v}/${w}`),T&&y.toLocaleLowerCase("en-US")!==T&&(w=`${y}:${w}`),w}},3169:(H,b,t)=>{"use strict";t.d(b,{f:()=>u});var n=t(6820),a=t(72427),d=t(14041),x=t(82292),m=t(88083);function h(g,p,y){const[v,A]=(0,d.useState)(g);return(0,d.useEffect)(()=>{A(g);const T=p?.subscribe({next:P=>{A(P)},complete:()=>{T?.unsubscribe()}});return()=>{T?.unsubscribe()}},y),v}function u(g,p){const v=(0,a.Q2)().get(x.n),A=[v,JSON.stringify(g),JSON.stringify(p||null)],T=(0,d.useMemo)(()=>{if(!v){const P=(0,m.T)(g,p);return{snapshot:P,promise:Promise.resolve(P)}}return v.forEntity(typeof g=="string"||"metadata"in g?g:(0,n.U2)(g),p)},A);return h(T.snapshot,T.update$,[T])}},18:(H,b,t)=>{"use strict";t.d(b,{a:()=>a});var n=t(55309);const a=(0,n.y)({id:"catalog-react.starred-entities"})},54203:(H,b,t)=>{"use strict";t.d(b,{GI:()=>w});var n=t(31085),a=t(14041),d=t(10394),x=t(64947),m=t(73845),h=t(42899),u=t(72501),g=t(5893),p=t(54917),y=t(65859),v=t(64630),A=t(87849);const T=O=>{const j=(0,g.A)(N=>N.breakpoints.down(O.options?.drawerBreakpoint??"md")),F=(0,p.A)(),[L,Z]=(0,a.useState)(!1),{t:G}=(0,A.i)(v.j);return j?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.A,{style:{marginTop:F.spacing(1),marginLeft:F.spacing(1)},onClick:()=>Z(!0),startIcon:(0,n.jsx)(y.A,{}),children:G("catalogFilter.buttonTitle")}),(0,n.jsx)(m.Ay,{open:L,onClose:()=>Z(!1),anchor:O.options?.drawerAnchor??"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,n.jsxs)(d.A,{m:2,children:[(0,n.jsx)(u.A,{variant:"h6",component:"h2",style:{marginBottom:F.spacing(1)},children:G("catalogFilter.title")}),O.children]})})]}):(0,n.jsx)(h.A,{item:!0,lg:2,children:O.children})},P=O=>(0,n.jsx)(h.A,{item:!0,xs:12,lg:10,children:O.children}),w=O=>(0,n.jsx)(h.A,{container:!0,style:{position:"relative"},children:O.children});w.Filters=T,w.Content=P},50207:(H,b,t)=>{"use strict";t.d(b,{y:()=>Y});var n=t(31085),a=t(10394),d=t(72501),x=t(58837),m=t(6924),h=t(20577),u=t(14041),g=t(72427),p=t(73466),y=t(7341),v=t(69076),A=t(86901),T=t(44148),P=t(41260);const w=(0,n.jsx)(P.A,{fontSize:"small"}),O=(0,n.jsx)(T.A,{fontSize:"small"});function j({selected:V}){return(0,n.jsx)(v.A,{icon:w,checkedIcon:O,checked:V})}const F=(0,u.memo)(V=>{const{selected:at,value:nt,availableOptions:gt,showCounts:bt}=V,xt=bt?`${nt} (${gt?.[nt]})`:nt;return(0,n.jsx)(A.A,{control:(0,n.jsx)(j,{selected:at}),label:xt,onClick:ht=>ht.preventDefault()})});var L=t(16249),Z=t(12398),G=t(53373),N=t.n(G);const Q=(0,x.A)(V=>(0,Z.A)({input:{backgroundColor:V.palette.background.paper}}),{name:"CatalogReactEntityAutocompletePickerInput"});function q(V){const at=Q();return(0,n.jsx)(L.A,{variant:"outlined",...V,className:N()(at.input,V.className)})}var z=t(21405),et=t(26796);const J=(0,x.A)({root:{},label:{textTransform:"none",fontWeight:"bold"}},{name:"CatalogReactEntityAutocompletePicker"});function Y(V){const{label:at,name:nt,path:gt,showCounts:bt,Filter:xt,InputProps:ht,initialSelectedOptions:ut=[],filtersForAvailableValues:At=["kind"]}=V,mt=J(),{updateFilters:Pt,filters:Ot,queryParameters:{[nt]:jt}}=(0,z.nK)(),Nt=(0,g.gf)(y.v),Ut=At.map(it=>Ot[it]),{value:pt}=(0,p.A)(async()=>{const it=gt,{facets:vt}=await Nt.getEntityFacets({facets:[it],filter:(0,et.Rr)(Ut.filter(Boolean))});return Object.fromEntries(vt[it].map(({value:Tt,count:wt})=>[Tt,wt]))},[...Ut]),Lt=(0,u.useMemo)(()=>[jt].flat().filter(Boolean),[jt]),[ft,B]=(0,u.useState)(Lt.length?Lt:Ot[nt]?.values??ut);(0,u.useEffect)(()=>{Lt.length&&B(Lt)},[Lt]);const k=Object.keys(pt??{}),ot=ft.length&&k.length;(0,u.useEffect)(()=>{Pt({[nt]:ot?new xt(ft):void 0})},[nt,ot,ft,xt,Pt]);const Ct=Ot[nt];return Ct&&typeof Ct=="object"&&!("values"in Ct)||!k.length?null:(0,n.jsx)(a.A,{className:mt.root,pb:1,pt:1,children:(0,n.jsxs)(d.A,{className:mt.label,variant:"button",component:"label",children:[at,(0,n.jsx)(h.Ay,{PopperComponent:it=>(0,n.jsx)("div",{...it,children:it.children}),multiple:!0,disableCloseOnSelect:!0,options:k,value:ft,onChange:(it,vt)=>B(vt),renderOption:(it,{selected:vt})=>(0,n.jsx)(F,{selected:vt,value:it,availableOptions:pt,showCounts:!!bt}),size:"small",popupIcon:(0,n.jsx)(m.A,{"data-testid":`${String(nt)}-picker-expand`}),renderInput:it=>(0,n.jsx)(q,{...it,...ht})})]})})}},72987:(H,b,t)=>{"use strict";t.d(b,{t:()=>ft});var n=t(31085),a=t(6820),d=t(10394),x=t(69076),m=t(86901),h=t(16249),u=t(72501),g=t(71677),p=t(58837),y=t(12398),v=t(44148),A=t(41260),T=t(6924),P=t(20577),w=t(14041),O=t(21405),j=t(92822),F=t(92367),L=t(48108),Z=t(47966),G=t(90184),N=t(72427),Q=t(87290),q=t(7341),z=t(46123),et=t.n(z);const J=B=>typeof B=="string"?B:void 0;function Y({enabled:B}){const k=(0,N.gf)(q.v),[ot]=(0,w.useState)(async()=>{if(!B)return[];const Ct="relations.ownedBy",vt=(await k.getEntityFacets({facets:[Ct]})).facets[Ct]?.map(Tt=>Tt.value)??[];return k.getEntitiesByRefs({entityRefs:vt}).then(Tt=>Tt.items.filter(wt=>wt!==void 0).map(wt=>wt).sort((wt,It)=>(wt.metadata.namespace||"").localeCompare(It.metadata.namespace||"","en-US")||(J(et()(wt,"spec.profile.displayName"))||wt.metadata.title||wt.metadata.name).localeCompare(J(et()(It,"spec.profile.displayName"))||It.metadata.title||It.metadata.name,"en-US")||wt.kind.localeCompare(It.kind,"en-US"))).then(Tt=>Tt).catch(()=>[])});return(0,Q.A)(async(Ct,it)=>{const vt=await ot;if(!vt)return{items:[]};const Tt=it?.limit??20,{text:wt,start:It}=V(Ct),$t=vt.filter(fe=>gt(wt,fe)),Qt=It+Tt;return{items:$t.slice(0,Qt),...nt({entities:$t,limit:Qt,payload:{text:wt,start:Qt}})}},[ot],{loading:!0,value:{items:[]}})}function V(B){return at(B)&&B.cursor?JSON.parse(atob(B.cursor)):{text:B.text||"",start:0}}function at(B){return!!B.cursor}function nt({entities:B,limit:k,payload:ot}){return B.length>k?{cursor:btoa(JSON.stringify(ot))}:{}}function gt(B,k){const ot=B.trim();return k.kind.includes(ot)||k.metadata.namespace?.includes(ot)||k.metadata.name.includes(ot)||k.metadata.title?.includes(ot)||et()(k,"spec.profile.displayName")?.includes(ot)}function bt(){const B=(0,N.gf)(q.v);return(0,Q.A)(async(k,ot)=>{const Ct=k,it=k,vt=ot?.limit??20;if(it.cursor){const wt=await B.queryEntities({cursor:it.cursor,limit:vt});return{cursor:wt.pageInfo.nextCursor,items:[...it.items,...wt.items]}}const Tt=await B.queryEntities({fullTextFilter:{term:Ct.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:vt});return{cursor:Tt.pageInfo.nextCursor,items:Tt.items}},[],{loading:!0})}var xt=t(76842);function ht({mode:B,initialSelectedOwnersRefs:k}){const ot=B==="owners-only",Ct=bt(),it=Y({enabled:ot}),[vt,Tt]=ot?it:Ct;return[vt,Tt,ut({enabled:!ot,initialSelectedOwnersRefs:k})]}function ut({enabled:B,initialSelectedOwnersRefs:k}){const ot=(0,w.useRef)({}),Ct=(0,N.gf)(q.v),[,it]=(0,Q.A)(async()=>{(await Ct.getEntitiesByRefs({entityRefs:k})).items.forEach(Tt=>{Tt&&(ot.current[(0,a.U2)(Tt)]=Tt)})},[]);return(0,xt.u)(()=>{B&&k.length>0&&it()}),{getEntity:vt=>ot.current[vt],setEntity:vt=>{ot.current[(0,a.U2)(vt)]=vt}}}var At=t(87051),mt=t(3169),Pt=t(64630),Ot=t(87849);const jt=(0,p.A)(B=>(0,y.A)({root:{},label:{textTransform:"none",fontWeight:"bold"},input:{backgroundColor:B.palette.background.paper},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}}),{name:"CatalogReactEntityOwnerPicker"}),Nt=(0,At.A)(B=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(m.A),Ut=(0,n.jsx)(A.A,{fontSize:"small"}),pt=(0,n.jsx)(v.A,{fontSize:"small"});function Lt(B){const k=jt(),ot=B.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:Ct}=(0,mt.f)(B.entity);return(0,n.jsx)(d.A,{className:k.fullWidth,children:(0,n.jsx)(Nt,{className:k.fullWidth,control:(0,n.jsx)(x.A,{icon:Ut,checkedIcon:pt,checked:B.isSelected}),onClick:it=>it.preventDefault(),label:(0,n.jsx)(g.Ay,{title:Ct,children:(0,n.jsxs)(d.A,{display:"flex",alignItems:"center",children:[ot?(0,n.jsx)(Z.A,{fontSize:"small"}):(0,n.jsx)(L.A,{fontSize:"small"}),"\xA0",(0,n.jsx)(d.A,{className:k.boxLabel,children:(0,n.jsx)(u.A,{noWrap:!0,children:Ct})})]})})})})}const ft=B=>{const k=jt(),{mode:ot="owners-only"}=B||{},{updateFilters:Ct,filters:it,queryParameters:{owners:vt}}=(0,O.nK)(),[Tt,wt]=(0,w.useState)(""),{t:It}=(0,Ot.i)(Pt.j),$t=(0,w.useMemo)(()=>[vt].flat().filter(Boolean),[vt]),[Qt,fe]=(0,w.useState)($t.length?$t:it.owners?.values??[]),[{value:le,loading:te},se,Te]=ht({mode:ot,initialSelectedOwnersRefs:Qt});(0,F.s)(()=>se({text:Tt}),[Tt,se],250);const ze=le?.items||[];return(0,w.useEffect)(()=>{if($t.length){const zt=new j.N9($t);fe(zt.values)}},[$t]),(0,w.useEffect)(()=>{Ct({owners:Qt.length?new j.N9(Qt):void 0})},[Qt,Ct]),["user","group"].includes(it.kind?.value.toLocaleLowerCase("en-US")||"")?null:(0,n.jsx)(d.A,{className:k.root,pb:1,pt:1,children:(0,n.jsxs)(u.A,{className:k.label,variant:"button",component:"label",children:[It("entityOwnerPicker.title"),(0,n.jsx)(P.Ay,{PopperComponent:zt=>(0,n.jsx)("div",{...zt,children:zt.children}),multiple:!0,disableCloseOnSelect:!0,loading:te,options:ze,value:Qt,getOptionSelected:(zt,ee)=>typeof ee=="string"?(0,a.U2)(zt)===ee:zt===ee,getOptionLabel:zt=>{const ee=typeof zt=="string"?Te.getEntity(zt)||(0,a.KU)(zt,{defaultKind:"group",defaultNamespace:"default"}):zt;return(0,G.Z)(ee,(0,G.S)(ee))},onChange:(zt,ee)=>{wt(""),fe(ee.map(Zt=>{const We=typeof Zt=="string"?Zt:(0,a.U2)(Zt);return typeof Zt!="string"&&Te.setEntity(Zt),We}))},filterOptions:zt=>zt,renderOption:(zt,{selected:ee})=>(0,n.jsx)(Lt,{entity:zt,isSelected:ee}),size:"small",popupIcon:(0,n.jsx)(T.A,{"data-testid":"owner-picker-expand"}),renderInput:zt=>(0,n.jsx)(h.A,{...zt,className:k.input,onChange:ee=>{wt(ee.currentTarget.value)},variant:"outlined"}),ListboxProps:{onScroll:zt=>{const ee=zt.currentTarget;Math.abs(ee.scrollHeight-ee.clientHeight-ee.scrollTop)<1&&le?.cursor&&se({items:le.items,cursor:le.cursor})},"data-testid":"owner-picker-listbox"}})]})})}},8859:(H,b,t)=>{"use strict";t.d(b,{z:()=>P});var n=t(31085),a=t(6820),d=t(72348),x=t(72072),m=t(9222),h=t(14041),u=t(29207),g=t(10394),p=t(71677),y=t(58837),v=t(3169);const A=(0,y.A)(O=>({root:{display:"inline-flex",alignItems:"center",textDecoration:"inherit"},icon:{marginRight:O.spacing(.5),color:O.palette.text.secondary,"& svg":{verticalAlign:"middle"}}}),{name:"CatalogReactEntityDisplayName"}),T=O=>{const{entityRef:j,hideIcon:F,disableTooltip:L,defaultKind:Z,defaultNamespace:G}=O,N=A(),{primaryTitle:Q,secondaryTitle:q,Icon:z}=(0,v.f)(j,{defaultKind:Z,defaultNamespace:G});let et=(0,n.jsx)(n.Fragment,{children:Q});return et=(0,n.jsxs)(g.A,{component:"span",className:N.root,children:[z&&!F?(0,n.jsx)(g.A,{component:"span",className:N.icon,children:(0,n.jsx)(z,{fontSize:"inherit"})}):null,et]}),q&&!L&&(et=(0,n.jsx)(p.Ay,{enterDelay:1500,title:q,children:et})),et},P=(0,h.forwardRef)((O,j)=>{const{entityRef:F,defaultKind:L,defaultNamespace:Z,title:G,children:N,hideIcon:Q,disableTooltip:q,...z}=O,et=w(O.entityRef),J=N??G??(0,n.jsx)(T,{entityRef:F,defaultKind:L,defaultNamespace:Z,hideIcon:Q,disableTooltip:q});return(0,n.jsx)(x.N_,{...z,ref:j,to:et,children:J})});function w(O){const j=(0,m.S)(u.s);let F,L,Z;if(typeof O=="string"){const N=(0,a.KU)(O);F=N.kind,L=N.namespace,Z=N.name}else"metadata"in O?(F=O.kind,L=O.metadata.namespace,Z=O.metadata.name):(F=O.kind,L=O.namespace,Z=O.name);F=F.toLocaleLowerCase("en-US"),L=L?.toLocaleLowerCase("en-US")??d.oQ;const G={kind:encodeURIComponent(F),namespace:encodeURIComponent(L),name:encodeURIComponent(Z)};return j(G)}},34428:(H,b,t)=>{"use strict";t.d(b,{i:()=>m});var n=t(31085),a=t(6820),d=t(14041),x=t(8859);function m(h){const{entityRefs:u,hideIcons:g,...p}=h;return(0,n.jsx)(n.Fragment,{children:u.map((y,v)=>{const A=typeof y=="string"?y:(0,a.U2)(y);return(0,n.jsxs)(d.Fragment,{children:[v>0&&", ",(0,n.jsx)(x.z,{...p,entityRef:y,hideIcon:g})]},`${v}.${A}`)})})}},90184:(H,b,t)=>{"use strict";t.d(b,{S:()=>x,Z:()=>m});var n=t(72348),a=t(46123),d=t.n(a);function x(h,u){const g=u?.defaultKind;let p,y,v;return"metadata"in h?(p=h.kind,y=h.metadata.namespace,v=h.metadata.name):(p=h.kind,y=h.namespace,v=h.name),(y===void 0||y==="")&&(y=n.oQ),u?.defaultNamespace!==void 0?u?.defaultNamespace===y&&(y=void 0):y===n.oQ&&(y=void 0),p=p.toLocaleLowerCase("en-US"),p=g&&g.toLocaleLowerCase("en-US")===p?void 0:p,`${p?`${p}:`:""}${y?`${y}/`:""}${v}`}function m(h,u){for(const g of["spec.profile.displayName","metadata.title"]){const p=d()(h,g);if(p&&typeof p=="string")return p}return u}},91035:(H,b,t)=>{"use strict";t.d(b,{m:()=>p});var n=t(31085),a=t(58837),d=t(14041),x=t(92822),m=t(50207),h=t(64630),u=t(87849);const g=(0,a.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),p=y=>{const v=g(),{t:A}=(0,u.i)(h.j);return(0,n.jsx)(m.y,{label:A("entityTagPicker.title"),name:"tags",path:"metadata.tags",Filter:x.q_,showCounts:y.showCounts,InputProps:{className:v.input}})}},67626:(H,b,t)=>{"use strict";t.d(b,{y:()=>xt});var n=t(31085),a=t(72427),d=t(65461),x=t(40703),m=t(58007),h=t(46423),u=t(65569),g=t(5951),p=t(26343),y=t(72501),v=t(58837),A=t(9684),T=t(31129),P=t(14041),w=t(92822),O=t(21405),j=t(16009),F=t(45250),L=t(73466),Z=t(7341),G=t(26796),N=t(87290),Q=t(48899);function q(){const ht=(0,a.gf)(j.K),ut=(0,a.gf)(Z.v),{filters:At}=(0,O.nK)(),{value:mt,loading:Pt}=(0,L.A)(async()=>(await ht.getBackstageIdentity()).ownershipEntityRefs,[]),{user:Ot,owners:jt,...Nt}=At,Ut=(0,G.$3)((0,F.compact)(Object.values(Nt))),[{value:pt,loading:Lt},ft]=(0,N.A)(async k=>{const ot=z(k.owners,k.ownershipEntityRefs);if(ot===void 0)return 0;const{["metadata.name"]:Ct,...it}=k.filter.filter,{totalItems:vt}=await ut.queryEntities({...k.filter,filter:{...it,"relations.ownedBy":ot},limit:0});return vt},[],{loading:!0});return(0,Q.A)(()=>{Object.keys(Ut.filter).length!==0&&mt!==void 0&&ft({ownershipEntityRefs:mt,owners:jt,filter:Ut})},[mt,jt,Ut]),{count:pt,loading:Pt||Lt,filter:(0,P.useMemo)(()=>w.tN.owned(mt??[]),[mt]),ownershipEntityRefs:mt}}function z(ht,ut){if(ut===void 0)return;const At=ht?.values??[];if(At.length){const mt=(0,F.intersection)(At,ut);return mt.length===0?void 0:mt}return ut}function et(){const ht=(0,a.gf)(Z.v),{filters:ut}=(0,O.nK)(),At=(0,P.useRef)(),mt=(0,P.useMemo)(()=>{const{user:jt,...Nt}=ut,Ut=(0,F.compact)(Object.values(Nt)),pt=(0,G.$3)(Ut),Lt={...pt,limit:0};return Object.keys(pt.filter).length===0?(At.current=void 0,At.current):(0,F.isEqual)(Lt,At.current)?At.current:(At.current=Lt,Lt)},[ut]),{value:Pt,loading:Ot}=(0,L.A)(async()=>{if(mt===void 0)return 0;const{totalItems:jt}=await ht.queryEntities(mt);return jt},[mt]);return{count:Pt,loading:Ot}}var J=t(6820),Y=t(56889);function V(){const ht=(0,a.gf)(Z.v),{filters:ut}=(0,O.nK)(),{starredEntities:At}=(0,Y.I)(),mt=(0,P.useRef)(),Pt=(0,P.useMemo)(()=>{const{user:Ut,...pt}=ut,Lt=(0,F.compact)(Object.values(pt)),ft=(0,G.$3)(Lt),k={...ft,filter:{...ft.filter,["metadata.name"]:Array.from(At).map(ot=>(0,J.KU)(ot).name)},limit:1e3};return(0,F.isEqual)(k,mt.current)?mt.current:(mt.current=k,k)},[ut,At]),{value:Ot,loading:jt}=(0,L.A)(async()=>At.size?(await ht.queryEntities(Pt)).items.map(pt=>(0,J.U2)({kind:pt.kind,namespace:pt.metadata.namespace,name:pt.metadata.name})).filter(pt=>At.has(pt)).length:0,[Pt,At]),Nt=(0,P.useMemo)(()=>w.tN.starred(Array.from(At)),[At]);return{count:Ot,loading:jt,filter:Nt}}var at=t(87849),nt=t(64630);const gt=(0,v.A)(ht=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:ht.spacing(1,0,1,0)},title:{margin:ht.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:ht.palette.text.primary},menuItem:{minHeight:ht.spacing(6)},groupWrapper:{margin:ht.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function bt(ht,ut){return[{name:ut("userListPicker.personalFilter.title"),items:[{id:"owned",label:ut("userListPicker.personalFilter.ownedLabel"),icon:A.A},{id:"starred",label:ut("userListPicker.personalFilter.starredLabel"),icon:T.Gg}]},{name:ht,items:[{id:"all",label:ut("userListPicker.orgFilterAllLabel")}]}]}const xt=ht=>{const{initialFilter:ut,availableFilters:At}=ht,mt=gt(),Pt=(0,a.gf)(d.U),{t:Ot}=(0,at.i)(nt.j),jt=Pt.getOptionalString("organization.name")??Ot("userListPicker.defaultOrgName"),{filters:Nt,updateFilters:Ut,queryParameters:{kind:pt,user:Lt}}=(0,O.nK)(),ft=["starred","all"],B=bt(jt,Ot).map(te=>({...te,items:te.items.filter(({id:se})=>["group","user"].some(Te=>Te===pt)?ft.includes(se):!At||At.includes(se))})).filter(({items:te})=>!!te.length),{count:k,loading:ot,filter:Ct}=q(),{count:it}=et(),{count:vt,filter:Tt,loading:wt}=V(),It=(0,P.useMemo)(()=>[Lt].flat()[0],[Lt]),[$t,Qt]=(0,P.useState)(It??ut),fe=(0,P.useMemo)(()=>({all:it,starred:vt,owned:k}),[vt,k,it]);(0,P.useEffect)(()=>{It&&Qt(It)},[It]);const le=ot||wt;return(0,P.useEffect)(()=>{!le&&$t&&$t!=="all"&&fe[$t]===0&&Qt("all")},[le,fe,$t,Qt]),(0,P.useEffect)(()=>{if(!$t||le)return;Ut({user:$t==="owned"?Ct:$t==="starred"?Tt:w.tN.all()})},[$t,Tt,Ct,Ut,le]),(0,n.jsx)(x.A,{className:mt.root,children:B.map(te=>(0,n.jsxs)(P.Fragment,{children:[(0,n.jsx)(y.A,{variant:"subtitle2",component:"span",className:mt.title,children:te.name}),(0,n.jsx)(x.A,{className:mt.groupWrapper,children:(0,n.jsx)(m.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":te.name,children:te.items.map((se,Te)=>(0,n.jsxs)(p.A,{role:"none presentation",divider:Te!==te.items.length-1,onClick:()=>Qt(se.id),selected:se.id===Nt.user?.value,className:mt.menuItem,disabled:fe[se.id]===0,"data-testid":`user-picker-${se.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[se.icon&&(0,n.jsx)(h.A,{className:mt.listIcon,children:(0,n.jsx)(se.icon,{fontSize:"small"})}),(0,n.jsx)(g.A,{children:(0,n.jsxs)(y.A,{variant:"body1",children:[se.label," "]})}),(0,n.jsx)(u.A,{children:fe[se.id]??"-"})]},se.id))})})]},te.name))})}},92822:(H,b,t)=>{"use strict";t.d(b,{I5:()=>p,Kf:()=>T,N9:()=>g,V3:()=>u,gM:()=>x,gZ:()=>A,mT:()=>P,qA:()=>m,q_:()=>h,tN:()=>v,z:()=>y});var n=t(6820),a=t(51372),d=t(67871);class x{value;constructor(O){this.value=O}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class m{value;constructor(O){this.value=O}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class h{values;constructor(O){this.values=O}filterEntity(O){return this.values.every(j=>(O.metadata.tags??[]).includes(j))}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}}class u{value;constructor(O){this.value=O}filterEntity(O){const j=this.toUpperArray(this.value.split(/\s/)),F=this.toUpperArray([O.metadata.tags]),L=this.toUpperArray([O.metadata.name,O.metadata.title]);for(const Z of j)if(F.every(G=>G!==Z)&&L.every(G=>!G.includes(Z)))return!1;return!0}getFullTextFilters(){return{term:this.value,fields:["metadata.name","metadata.title","spec.profile.displayName"]}}toQueryValue(){return this.value}toUpperArray(O){return O.flat().filter(j=>!!j).map(j=>j.toLocaleUpperCase("en-US"))}}class g{values;constructor(O){this.values=O.reduce((j,F)=>{try{return j.push((0,n.U2)((0,n.KU)(F,{defaultKind:"Group"}))),j}catch{return j}},[])}getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(O){return this.values.some(j=>(0,d.t)(O,a.vv).some(F=>(0,n.U2)(F)===j))}toQueryValue(){return this.values}}class p{values;constructor(O){this.values=O}getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(O){return this.values.some(j=>O.spec?.lifecycle===j)}toQueryValue(){return this.values}}class y{values;constructor(O){this.values=O}getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(O){return this.values.some(j=>O.metadata.namespace===j)}toQueryValue(){return this.values}}class v{value;refs;constructor(O,j){this.value=O,this.refs=j}static owned(O){return new v("owned",O)}static all(){return new v("all")}static starred(O){return new v("starred",O)}getCatalogFilters(){return this.value==="owned"?{"relations.ownedBy":this.refs??[]}:this.value==="starred"?{"metadata.name":this.refs?.map(O=>(0,n.KU)(O).name)??[]}:{}}filterEntity(O){if(this.value==="starred")return this.refs?.includes((0,n.U2)(O))??!0;if(this.value==="owned"){const j=(0,d.t)(O,a.vv);return this.refs?.some(F=>j.some(L=>(0,n.U2)(L)===F))??!1}return!0}toQueryValue(){return this.value}}class A{value;isOwnedEntity;isStarredEntity;constructor(O,j,F){this.value=O,this.isOwnedEntity=j,this.isStarredEntity=F}filterEntity(O){switch(this.value){case"owned":return this.isOwnedEntity(O);case"starred":return this.isStarredEntity(O);default:return!0}}toQueryValue(){return this.value}}class T{value;constructor(O){this.value=O}getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(O){const j=O.metadata.annotations?.["backstage.io/orphan"];return j!==void 0&&this.value.toString()===j}}class P{value;constructor(O){this.value=O}filterEntity(O){const j=O?.status?.items?.length>0;return j!==void 0&&this.value===j}}},21405:(H,b,t)=>{"use strict";t.d(b,{B9:()=>w,nK:()=>O});var n=t(31085),a=t(45250),d=t.n(a),x=t(45810),m=t.n(x),h=t(14041),u=t(18690),g=t(87290),p=t(22771),y=t(71581),v=t(7341),A=t(26796),T=t(72427);const P=(0,h.createContext)(void 0),w=j=>{const F=(0,y.A)(),L=(0,T.gf)(v.v),[Z,G]=(0,h.useState)({}),N=(0,u.zy)(),q=j.pagination===!0?"cursor":typeof j.pagination=="object"?j.pagination.mode??"cursor":"none",z=typeof j.pagination=="object"?j.pagination.limit??20:20,{queryParameters:et,cursor:J,offset:Y,limit:V}=(0,h.useMemo)(()=>{const pt=m().parse(N.search,{ignoreQueryPrefix:!0});let Lt=z;if(typeof pt.limit=="string"){const B=Number.parseInt(pt.limit,10);isNaN(B)||(Lt=B)}const ft=typeof pt.offset=="string"&&q==="offset"?Number.parseInt(pt.offset,10):void 0;return{queryParameters:pt.filters??{},cursor:typeof pt.cursor=="string"&&q==="cursor"?pt.cursor:void 0,offset:q==="offset"&&ft&&!isNaN(ft)?ft:void 0,limit:Lt}},[q,N.search,z]),[at,nt]=(0,h.useState)(J),[gt,bt]=(0,h.useState)(Y),[xt,ht]=(0,h.useState)(V),[ut,At]=(0,h.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:q==="cursor"?{}:void 0,offset:gt,limit:xt})),[{loading:mt,error:Pt},Ot]=(0,g.A)(async()=>{const pt=(0,a.compact)(Object.values(Z)),Lt=Object.keys(Z).reduce((ft,B)=>{const k=Z[B];return k?.toQueryValue&&(ft[B]=k.toQueryValue()),ft},{});if(q!=="none")if(at){if(at!==ut.appliedCursor){const ft=(0,A.be)(pt),B=await L.queryEntities({cursor:at,limit:xt});At({appliedFilters:Z,appliedCursor:at,backendEntities:B.items,entities:B.items.filter(ft),pageInfo:B.pageInfo,totalItems:B.totalItems})}}else{const ft=(0,A.be)(pt),B=(0,A.$3)(pt),k=(0,A.$3)((0,a.compact)(Object.values(ut.appliedFilters)));if(q==="offset"||!(0,a.isEqual)(k,B)){const ot=await L.queryEntities({...B,limit:xt,offset:gt,orderFields:[{field:"metadata.name",order:"asc"}]});At({appliedFilters:Z,backendEntities:ot.items,entities:ot.items.filter(ft),pageInfo:ot.pageInfo,totalItems:ot.totalItems,limit:xt,offset:gt})}}else{const ft=(0,A.be)(pt),B=(0,A.Rr)(pt),k=(0,A.Rr)((0,a.compact)(Object.values(ut.appliedFilters)));if((0,a.isEqual)(k,B)){const ot=ut.backendEntities.filter(ft);At({appliedFilters:Z,backendEntities:ut.backendEntities,entities:ot,totalItems:ot.length})}else{const ot=await L.getEntities({filter:B}),Ct=ot.items.filter(ft);At({appliedFilters:Z,backendEntities:ot.items,entities:Ct,totalItems:Ct.length})}}if(F()){const ft=m().parse(N.search,{ignoreQueryPrefix:!0}),B=m().stringify({...ft,filters:Lt,cursor:at,offset:gt,limit:xt},{addQueryPrefix:!0,arrayFormat:"repeat"}),k=`${window.location.pathname}${B}`;window.history?.replaceState(null,document.title,k)}},[L,et,Z,ut,at,q,xt,gt],{loading:!0});(0,p.A)(Ot,10,[Z,at,xt,gt]);const jt=(0,h.useCallback)(pt=>{nt(void 0),G(Lt=>{const ft=typeof pt=="function"?pt(Lt):pt;return{...Lt,...ft}})},[]),Nt=(0,h.useMemo)(()=>{if(q!=="cursor")return;const pt=ut.pageInfo?.prevCursor,Lt=ut.pageInfo?.nextCursor;return{prev:pt?()=>nt(pt):void 0,next:Lt?()=>nt(Lt):void 0}},[q,ut.pageInfo]),Ut=(0,h.useMemo)(()=>({filters:ut.appliedFilters,entities:ut.entities,backendEntities:ut.backendEntities,updateFilters:jt,queryParameters:et,loading:mt,error:Pt,pageInfo:Nt,totalItems:ut.totalItems,limit:xt,offset:gt,setLimit:ht,setOffset:bt,paginationMode:q}),[ut,jt,et,mt,Pt,Nt,xt,gt,q,ht,bt]);return(0,n.jsx)(P.Provider,{value:Ut,children:j.children})};function O(){const j=(0,h.useContext)(P);if(!j)throw new Error("useEntityList must be used within EntityListProvider");return j}},56889:(H,b,t)=>{"use strict";t.d(b,{I:()=>u});var n=t(6820),a=t(72427),d=t(14041),x=t(1394),m=t(18);function h(g){return typeof g=="string"?g:(0,n.U2)(g)}function u(){const g=(0,a.gf)(m.a),p=(0,x.A)((0,d.useMemo)(()=>g.starredEntitie$(),[g]),new Set),y=(0,d.useCallback)(A=>p.has(h(A)),[p]),v=(0,d.useCallback)(A=>g.toggleStarred(h(A)).then(),[g]);return{starredEntities:p,toggleStarredEntity:v,isStarredEntity:y}}},29207:(H,b,t)=>{"use strict";t.d(b,{s:()=>d});var n=t(34569),a=t(63544);const d=(0,a.Q)("catalog:entity-route-ref",()=>(0,n.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function x(m){return{kind:m.kind.toLocaleLowerCase("en-US"),namespace:m.metadata.namespace?.toLocaleLowerCase("en-US")??DEFAULT_NAMESPACE,name:m.metadata.name}}},64630:(H,b,t)=>{"use strict";t.d(b,{j:()=>a});var n=t(93184);const a=(0,n.h)({id:"catalog-react",messages:{catalogFilter:{title:"Filters",buttonTitle:"Filters"},entityKindPicker:{title:"Kind",errorMessage:"Failed to load entity kinds"},entityLifecyclePicker:{title:"Lifecycle"},entityNamespacePicker:{title:"Namespace"},entityOwnerPicker:{title:"Owner"},entityProcessingStatusPicker:{title:"Processing Status"},entityTagPicker:{title:"Tags"},entityPeekAheadPopover:{title:"Drill into the entity to see all of the tags.",emailCardAction:{title:"Email {{email}}",subTitle:"mailto {{email}}"},entityCardActionsTitle:"Show details"},entitySearchBar:{placeholder:"Search"},entityTypePicker:{title:"Type",errorMessage:"Failed to load entity types",optionAllTitle:"all"},favoriteEntity:{addToFavorites:"Add to favorites",removeFromFavorites:"Remove from favorites"},inspectEntityDialog:{title:"Entity Inspector",closeButtonTitle:"Close",ancestryPage:{title:"Ancestry"},colocatedPage:{title:"Colocated",description:"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).",alertNoLocation:"Entity had no location information.",alertNoEntity:"There were no other entities on this location."},jsonPage:{title:"Entity as JSON",description:"This is the raw entity data as received from the catalog, on JSON form."},overviewPage:{title:"Overview"},yamlPage:{title:"Entity as YAML",description:"This is the raw entity data as received from the catalog, on YAML form."}},unregisterEntityDialog:{title:"Are you sure you want to unregister this entity?",cancelButtonTitle:"Cancel",deleteButtonTitle:"Delete Entity",deleteEntitySuccessMessage:"Removed entity {{entityName}}",bootstrapState:{title:'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "{{location}}"). If you believe this is in error, please contact the {{appTitle}} integrator.',advancedDescription:"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.",advancedOptions:"Advanced Options"},onlyDeleteStateTitle:"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog.",unregisterState:{title:"This action will unregister the following entities:",subTitle:"Located at the following location:",description:"To undo, just re-register the entity in {{appTitle}}.",unregisterButtonTitle:"Unregister Location",advancedOptions:"Advanced Options",advancedDescription:"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."},errorStateTitle:"Internal error: Unknown state"},userListPicker:{defaultOrgName:"Company",personalFilter:{title:"Personal",ownedLabel:"Owned",starredLabel:"Starred"},orgFilterAllLabel:"All"}}})},26796:(H,b,t)=>{"use strict";t.d(b,{$3:()=>d,Rr:()=>x,be:()=>m});var n=t(92822);function a(h){return!!h.getFullTextFilters}function d(h){const u=h.reduce((p,y)=>({...p,...y.getCatalogFilters?y.getCatalogFilters():{}}),{}),g=h.find(a)?.getFullTextFilters();return{filter:u,fullTextFilter:g}}function x(h){const u={};return h.forEach(g=>{g instanceof n.q_||g instanceof n.N9||g instanceof n.I5||g instanceof n.z||g instanceof n.tN||g instanceof n.Kf||g instanceof n.V3||g instanceof n.gZ||Object.assign(u,g.getCatalogFilters?.()||{})}),u}function m(h){return u=>h.every(g=>!g.filterEntity||g.filterEntity(u))}},67871:(H,b,t)=>{"use strict";t.d(b,{t:()=>a});var n=t(6820);function a(d,x,m){let h=d?.relations?.filter(u=>u.type===x).map(u=>(0,n.KU)(u.targetRef))||[];return m?.kind&&(h=h.filter(u=>u.kind.toLocaleLowerCase("en-US")===m.kind.toLocaleLowerCase("en-US"))),h}},95203:(H,b,t)=>{"use strict";t.d(b,{qP:()=>h,Zg:()=>g,rQ:()=>y,pS:()=>p,UJ:()=>u});var n=t(59598);class a{id;params;optional;defaultTarget;[x=n.b];constructor(A,T,P,w){this.id=A,this.params=T,this.optional=P,this.defaultTarget=w,this[x]="external"}toString(){return`routeRef{type=external,id=${this.id}}`}getDefaultTarget(){return this.defaultTarget}}function d(v){return new a(v.id,v.params??[],!!v.optional,v?.defaultTarget)}var x,m=t(34569);const h=d({id:"create-component",optional:!0,defaultTarget:"scaffolder.createComponent"}),u=d({id:"view-techdoc",optional:!0,params:["namespace","kind","name"],defaultTarget:"techdocs.docRoot"}),g=d({id:"create-from-template",optional:!0,params:["namespace","templateName"],defaultTarget:"scaffolder.selectedTemplate"}),p=d({id:"catalog:unregister-redirect",optional:!0}),y=(0,m.H)({id:"catalog"})},54241:(H,b,t)=>{"use strict";t.d(b,{b:()=>n});var n=function(a){return a.DENY="DENY",a.ALLOW="ALLOW",a.CONDITIONAL="CONDITIONAL",a}({})},96824:(H,b,t)=>{"use strict";t.d(b,{x:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.permission.api"})},70734:(H,b,t)=>{"use strict";t.d(b,{e:()=>m});var n=t(31085),a=t(14041),d=t(58837);const x=(0,d.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),m=h=>{const{text:u,preTag:g,postTag:p}=h,y=x(),v=(0,a.useMemo)(()=>u.split(new RegExp(`(${g}.+?${p})`)),[p,g,u]);return(0,n.jsx)(n.Fragment,{children:v.map((A,T)=>A.includes(g)?(0,n.jsx)("mark",{className:y.highlight,children:A.replace(new RegExp(`${g}|${p}`,"g"),"")},T):A)})}},54560:(H,b,t)=>{"use strict";t.d(b,{ec:()=>p});var n=t(31085),a=t(14041),d=t(93368),x=t(88758),m=t(8109);const h="search.results.list.items.extensions.v1",u=(A,T)=>{for(const P of A)if(!(!isValidElement(P)||!getComponentData(P,h)?.(T)))return cloneElement(P,{rank:T.rank,highlight:T.highlight,result:T.document,...P.props});return null},g=A=>{const{rank:T,result:P,noTrack:w,children:O,alignItems:j="flex-start",...F}=A,L=(0,d.s)(),Z=(0,a.useCallback)(()=>{w||P&&L.captureEvent("discover",P.title,{attributes:{to:P.location},value:T})},[T,P,w,L]);return(0,n.jsx)(m.A,{divider:!0,alignItems:j,onClickCapture:Z,...F,children:O})},p=A=>{const{name:T,component:P,predicate:w=()=>!0}=A;return(0,x.zZ)({name:T,component:{lazy:()=>P().then(O=>j=>(0,n.jsx)(g,{rank:j.rank,result:j.result,noTrack:j.noTrack,children:(0,a.createElement)(O,j)}))},data:{[h]:w}})},y=A=>{const T=useElementFilter(A,P=>P.selectByComponentData({key:h}).getElements(),[A]);return useCallback((P,w)=>{const O=u(T,P);return _jsx(Fragment,{children:O??_jsx(g,{rank:P.rank,result:P.document,children:_jsx(DefaultResultListItem,{rank:P.rank,highlight:P.highlight,result:P.document})})},w)},[T])},v=A=>{const{results:T,children:P,...w}=A,O=y(P);return _jsx(List,{...w,children:T.map(O)})}},86202:(H,b,t)=>{"use strict";t.d(b,{A:()=>n,G:()=>a});const n="backstage.io/techdocs-ref",a="backstage.io/techdocs-entity"},72020:(H,b,t)=>{"use strict";t.d(b,{AF:()=>g,Hr:()=>v,Wm:()=>u,YR:()=>w,po:()=>p});var n=t(31085),a=t(14041),d=t(18690),x=t(19402),m=t(88758),h=t(82442);const u="techdocs.addons.addon.v1",g="techdocs.addons.wrapper.v1",p=()=>null;(0,x.h)(p,g,!0);const y=O=>`${u}.${O.toLocaleLowerCase("en-US")}`;function v(O){const{name:j,component:F}=O;return(0,m.zZ)({name:j,component:{sync:L=>(0,n.jsx)(F,{...L})},data:{[u]:O,[y(j)]:!0}})}const A=(O,j)=>O.selectByComponentData({key:j}).getElements()[0],T=O=>O.selectByComponentData({key:g}).selectByComponentData({key:u}),P=O=>O.selectByComponentData({key:g}).findComponentData({key:u}),w=()=>{const O=(0,d.P1)(),j=(0,h.O)(O,T),F=(0,h.O)(O,P),L=(0,a.useCallback)(N=>{if(!j||!N)return null;const Q=y(N.name);return A(j,Q)??null},[j]),Z=(0,a.useCallback)(N=>{const Q=F.find(q=>q.name===N);return Q?L(Q):null},[F,L]),G=(0,a.useCallback)(N=>{const Q=F.filter(q=>q.location===N);return Q.length?Q.map(L):null},[F,L]);return{renderComponentByName:Z,renderComponentsByLocation:G}}},26679:(H,b,t)=>{"use strict";t.d(b,{l:()=>a,s:()=>d});var n=t(55309);const a=(0,n.y)({id:"plugin.techdocs.service"}),d=(0,n.y)({id:"plugin.techdocs.storageservice"})},86892:(H,b,t)=>{"use strict";t.d(b,{R:()=>O,V:()=>j});var n=t(31085),a=t(14041),d=t(73466),x=t(28966),m=t(6820),h=t(43836),u=t(10602),g=t(72427),p=t(65461),y=t(25862),v=t(26679);function A(F,L){return L.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(F.kind=F.kind.toLocaleLowerCase(),F.name=F.name.toLocaleLowerCase(),F.namespace=F.namespace.toLocaleLowerCase()),F}const T=(F,L)=>(0,m.U2)(F)===(0,m.U2)(L),P={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},w=(0,h.tK)("techdocs-reader-page-context"),O=(0,a.memo)(F=>{const{entityRef:L,children:Z}=F,G=(0,g.gf)(v.l),N=(0,g.gf)(p.U),Q=(0,d.A)(async()=>G.getEntityMetadata(L),[L]),q=(0,x.A)(async()=>G.getTechDocsMetadata(L),[L]),[z,et]=(0,a.useState)(P.title),[J,Y]=(0,a.useState)(P.subtitle),[V,at]=(0,a.useState)(P.shadowRoot);(0,a.useEffect)(()=>{V&&!q.value&&!q.loading&&q.retry()},[q.value,q.loading,V,q.retry,q]);const nt={metadata:q,entityRef:A(L,N),entityMetadata:Q,shadowRoot:V,setShadowRoot:at,title:z,setTitle:et,subtitle:J,setSubtitle:Y},gt=(0,u.B)({1:nt});return(0,n.jsx)(y.Ig,{attributes:{entityRef:(0,m.U2)(L)},children:(0,n.jsx)(w.Provider,{value:gt,children:Z instanceof Function?Z(nt):Z})})},(F,L)=>T(F.entityRef,L.entityRef)),j=()=>{const F=(0,a.useContext)(w);if(F===void 0)return P;const L=F.atVersion(1);if(L===void 0)throw new Error("No context found for version 1.");return L}},99730:(H,b,t)=>{"use strict";t.d(b,{e:()=>n});const n=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},95768:(H,b,t)=>{"use strict";t.d(b,{V:()=>n});function n(a,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?a:a.toLocaleLowerCase("en-US")}},85920:(H,b,t)=>{"use strict";t.d(b,{K:()=>z});var n=t(31085),a=t(14041),d=t(26280),x=t(59428),m=t(27586),h=t(21405),u=t(54203),g=t(67626),p=t(72987),y=t(91035),v=t(81859),A=t(86519),T=t(86202);class P{getCatalogFilters(){return{[`metadata.annotations.${T.A}`]:A.c}}}const w=()=>{const{updateFilters:et}=(0,h.nK)();return(0,a.useEffect)(()=>{et({techdocs:new P})},[et]),null};var O=t(36338),j=t(45250),F=t(88640),L=t(77310),Z=t(56889),G=t(27125),N=t(84295),Q=t(42717);const q=et=>{const{columns:J,actions:Y,options:V}=et,{loading:at,error:nt,entities:gt,filters:bt}=(0,h.nK)(),{isStarredEntity:xt,toggleStarredEntity:ht}=(0,Z.I)(),[,ut]=(0,O.A)(),At=(0,j.capitalize)(bt.user?.value??"all"),mt=[N.f.createCopyDocsUrlAction(ut),N.f.createStarEntityAction(xt,ht)];return nt?(0,n.jsx)(F.B,{severity:"error",title:"Could not load available documentation.",children:(0,n.jsx)(L.z,{language:"text",text:nt.toString()})}):(0,n.jsx)(G.o,{title:At,entities:gt,loading:at,actions:Y||mt,columns:J,options:V})};q.columns=Q.B,q.actions=N.f;const z=et=>{const{initialFilter:J="owned",columns:Y,actions:V,ownerPickerMode:at}=et;return(0,n.jsx)(v.S,{children:(0,n.jsxs)(d.U,{children:[(0,n.jsx)(x.d,{title:"",children:(0,n.jsx)(m.Y,{children:"Discover documentation in your ecosystem."})}),(0,n.jsx)(h.B9,{children:(0,n.jsxs)(u.GI,{children:[(0,n.jsxs)(u.GI.Filters,{children:[(0,n.jsx)(w,{}),(0,n.jsx)(g.y,{initialFilter:J}),(0,n.jsx)(p.t,{mode:at}),(0,n.jsx)(y.m,{})]}),(0,n.jsx)(u.GI.Content,{children:(0,n.jsx)(q,{actions:V,columns:Y})})]})})]})})}},27125:(H,b,t)=>{"use strict";t.d(b,{o:()=>F});var n=t(31085),a=t(14041),d=t(36338),x=t(9222),m=t(72427),h=t(65461),u=t(51372),g=t(67871),p=t(90184),y=t(82779),v=t(14209),A=t(44186),T=t(73896),P=t(84295),w=t(42717),O=t(95768);const j=[w.B.createTitleColumn({hidden:!0}),w.B.createNameColumn(),w.B.createOwnerColumn(),w.B.createKindColumn(),w.B.createTypeColumn()],F=L=>{const{entities:Z,title:G,loading:N,columns:Q,actions:q,options:z}=L,[,et]=(0,d.A)(),J=(0,x.S)(y.Oc),Y=(0,m.gf)(h.U);if(!Z)return null;const V=Z.map(bt=>{const xt=(0,g.t)(bt,u.vv);return{entity:bt,resolved:{docsUrl:J({namespace:(0,O.V)(bt.metadata.namespace??"default",Y),kind:(0,O.V)(bt.kind,Y),name:(0,O.V)(bt.metadata.name,Y)}),ownedByRelations:xt,ownedByRelationsTitle:xt.map(ht=>(0,p.S)(ht,{defaultKind:"group"})).join(", ")}}}),at=[P.f.createCopyDocsUrlAction(et)],nt=20,gt=V&&V.length>nt;return(0,n.jsx)(n.Fragment,{children:N||V&&V.length>0?(0,n.jsx)(v.X,{isLoading:N,options:{paging:gt,pageSize:nt,search:!0,actionsColumnIndex:-1,...z},data:V,columns:Q||j,actions:q||at,title:G?`${G} (${V.length})`:`All (${V.length})`}):(0,n.jsx)(A.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,n.jsx)(T.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};F.columns=w.B,F.actions=P.f},84295:(H,b,t)=>{"use strict";t.d(b,{f:()=>m});var n=t(31085),a=t(14041),d=t(55290),x=t(18956);const m={createCopyDocsUrlAction(h){return u=>({icon:()=>(0,n.jsx)(d.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>h(`${window.location.origin}${u.resolved.docsUrl}`)})},createStarEntityAction(h,u){return g=>{const p=g.entity,y=h(p);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,n.jsx)(x.m,{isFavorite:y}),tooltip:y?"Remove from favorites":"Add to favorites",onClick:()=>u(p)}}}}},42717:(H,b,t)=>{"use strict";t.d(b,{B:()=>y});var n=t(31085),a=t(14041),d=t(10394),x=t(58837);const m=(0,x.A)(v=>({value:{marginBottom:v.spacing(.75)},subvalue:{color:v.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function h(v){const{value:A,subvalue:T}=v,P=m();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.A,{className:P.value,children:A}),(0,n.jsx)(d.A,{className:P.subvalue,children:T})]})}var u=t(72072),g=t(34428);function p(v){return v.metadata.title||v.metadata.name}const y={createTitleColumn(v){return{...y.createNameColumn(),field:"entity.metadata.title",hidden:v?.hidden}},createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,searchable:!0,defaultSort:"asc",customSort:(v,A)=>{const T=p(v.entity).toLocaleLowerCase(),P=p(A.entity).toLocaleLowerCase();return T.localeCompare(P)},render:v=>(0,n.jsx)(h,{value:(0,n.jsx)(u.N_,{to:v.resolved.docsUrl,children:p(v.entity)}),subvalue:v.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:v})=>(0,n.jsx)(g.i,{entityRefs:v.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},81859:(H,b,t)=>{"use strict";t.d(b,{S:()=>h});var n=t(31085),a=t(14041),d=t(27155),x=t(72427),m=t(65461);const h=u=>{const{children:g}=u,y=`Documentation available in ${(0,x.gf)(m.U).getOptionalString("organization.name")??"Backstage"}`;return(0,n.jsx)(d.d,{title:"Documentation",subtitle:y,themeId:"documentation",children:g})}},39278:(H,b,t)=>{"use strict";t.d(b,{$j:()=>L,Wj:()=>Z,Ju:()=>w});var n=t(26679),a=t(70835),d=t(97142),x=t(92110);class m{configApi;discoveryApi;fetchApi;constructor(Q){this.configApi=Q.configApi,this.discoveryApi=Q.discoveryApi,this.fetchApi=Q.fetchApi}async getCookie(){const q=`${await this.getApiOrigin()}/cookie`,z=await this.fetchApi.fetch(`${q}`,{credentials:"include"});if(!z.ok)throw await a.o.fromResponse(z);return await z.json()}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(Q){const{kind:q,namespace:z,name:et}=Q,Y=`${await this.getApiOrigin()}/metadata/techdocs/${z}/${q}/${et}`,V=await this.fetchApi.fetch(`${Y}`);if(!V.ok)throw await a.o.fromResponse(V);return await V.json()}async getEntityMetadata(Q){const{kind:q,namespace:z,name:et}=Q,Y=`${await this.getApiOrigin()}/metadata/entity/${z}/${q}/${et}`,V=await this.fetchApi.fetch(`${Y}`);if(!V.ok)throw await a.o.fromResponse(V);return await V.json()}}class h{configApi;discoveryApi;fetchApi;constructor(Q){this.configApi=Q.configApi,this.discoveryApi=Q.discoveryApi,this.fetchApi=Q.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return this.configApi.getOptionalString("techdocs.storageUrl")??`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(Q,q){const{kind:z,namespace:et,name:J}=Q,V=`${await this.getStorageUrl()}/${et}/${z}/${J}/${q}`,at=await this.fetchApi.fetch(`${V.endsWith("/")?V:`${V}/`}index.html`);let nt="";switch(at.status){case 404:throw nt="Page not found. ",q||(nt+="This could be because there is no index.md file in the root of the docs directory of this repository."),new d.m_(nt);case 500:throw nt="Could not generate documentation or an error in the TechDocs backend. ",new Error(nt);default:break}return at.text()}async syncEntityDocs(Q,q=()=>{}){const{kind:z,namespace:et,name:J}=Q,V=`${await this.getApiOrigin()}/sync/${et}/${z}/${J}`;return new Promise((at,nt)=>{const gt=new AbortController;(0,x.y)(V,{fetch:this.fetchApi.fetch,signal:gt.signal,onmessage(bt){if(bt.event==="log")bt.data&&q(JSON.parse(bt.data));else if(bt.event==="finish"){let xt=!1;bt.data&&({updated:xt}=JSON.parse(bt.data)),at(xt?"updated":"cached")}else bt.event==="error"&&nt(new Error(bt.data))},onerror(bt){gt.abort(),nt(bt)}})})}async getBaseUrl(Q,q,z){const{kind:et,namespace:J,name:Y}=q,at=`${await this.getApiOrigin()}/static/docs/${J}/${et}/${Y}/${z}`;return new URL(Q,at.endsWith("/")?at:`${at}/`).toString()}}var u=t(82779),g=t(9803),p=t(12935),y=t(65461),v=t(57405),A=t(70795),T=t(88758),P=t(54560);const w=(0,g.i)({id:"techdocs",apis:[(0,p.b)({api:n.s,deps:{configApi:y.U,discoveryApi:v.I,fetchApi:A.a},factory:({configApi:N,discoveryApi:Q,fetchApi:q})=>new h({configApi:N,discoveryApi:Q,fetchApi:q})}),(0,p.b)({api:n.l,deps:{configApi:y.U,discoveryApi:v.I,fetchApi:A.a},factory:({configApi:N,discoveryApi:Q,fetchApi:q})=>new m({configApi:N,discoveryApi:Q,fetchApi:q})})],routes:{root:u.rQ,docRoot:u.Oc,entityContent:u.Ri}}),O=w.provide((0,T.QJ)({name:"TechdocsPage",component:()=>t.e(9605).then(t.bind(t,29605)).then(N=>N.Router),mountPoint:u.rQ})),j=w.provide((0,T.QJ)({name:"EntityTechdocsContent",component:()=>t.e(9605).then(t.bind(t,29605)).then(N=>N.LegacyEmbeddedDocsRouter),mountPoint:u.Ri})),F=w.provide((0,T.QJ)({name:"TechDocsCustomHome",component:()=>t.e(4487).then(t.bind(t,94487)).then(N=>N.TechDocsCustomHome),mountPoint:u.rQ})),L=w.provide((0,T.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(N=>N.TechDocsIndexPage),mountPoint:u.rQ})),Z=w.provide((0,T.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(N=>N.TechDocsReaderPage),mountPoint:u.Oc})),G=w.provide((0,P.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(N=>N.TechDocsSearchResultListItem),predicate:N=>N.type==="techdocs"}))},67289:(H,b,t)=>{"use strict";t.d(b,{p:()=>Kn});var n=t(31085),a=t(14041),d=t(42899),x=t(58837),m=t(86892),h=t(9394),u=t(91360),g=t(22856);const p="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",y=f=>{(0,a.useEffect)(()=>{if(!f)return()=>{};const I=f.querySelectorAll('head > link[rel="stylesheet"]');let U=I?.length??0;const $=new CustomEvent(p);if(!U)return f.dispatchEvent($),()=>{};const W=()=>{--U===0&&f.dispatchEvent($)};return I?.forEach(X=>{X.addEventListener("load",W)}),()=>{I?.forEach(X=>{X.removeEventListener("load",W)})}},[f])},v=f=>{const[I,U]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!f)return()=>{};U(!0);const $=f.style;$.setProperty("opacity","0");const W=()=>{U(!1),$.setProperty("opacity","1")};return f.addEventListener(p,W),()=>{f.removeEventListener(p,W)}},[f]),I},A=f=>{const{element:I,onAppend:U,children:$}=f,[W,X]=(0,a.useState)((0,h.vt)({...(0,g.A)(),insertionPoint:void 0}));y(I);const st=(0,a.useCallback)(Et=>{if(!I||!Et)return;X((0,h.vt)({...(0,g.A)(),insertionPoint:I.querySelector("head")||void 0}));let St=Et.shadowRoot;St||(St=Et.attachShadow({mode:"open"})),St.replaceChildren(I),typeof U=="function"&&U(St)},[I,U]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(u.Ay,{jss:W,sheetsManager:new Map,children:[(0,n.jsx)("div",{ref:st,"data-testid":"techdocs-native-shadowroot"}),$]})})};var T=t(12784);const P=()=>{const{shadowRoot:f}=(0,m.V)();return f},w=f=>{const I=P(),[U,$]=(0,a.useState)(I?.firstChild);return(0,a.useEffect)(()=>{let W;return I&&(W=new MutationObserver(()=>{$(I?.firstChild)}),W.observe(I,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),()=>W?.disconnect()},[I]),!U||!(U instanceof HTMLElement)?[]:f.map(W=>U.querySelectorAll(W)).filter(W=>W.length).map(W=>Array.from(W)).flat()},O=f=>f.toString()&&f.rangeCount&&f.getRangeAt(0).getBoundingClientRect().top,j=(f=0)=>{const I=P(),[U,$]=useState(null),W=useMemo(()=>debounce(()=>{const X=I,st=X.getSelection?X.getSelection():document.getSelection();st&&O(st)?$(st):$(null)},f),[I,$,f]);return useEffect(()=>(window.document.addEventListener("selectionchange",W),()=>{W.cancel(),window.document.removeEventListener("selectionchange",W)}),[W]),U};var F=t(12173),L=t(26280),Z=t(68146),G=t(45250),N=t(73466),Q=t(5877),q=t(43836),z=t(10602),et=t(72427),J=t(93368),Y=t(25862),V=t(65461),at=t(55309);const nt=(0,at.y)({id:"plugin.search.queryservice"});class gt{mockedResults;constructor(I){this.mockedResults=I}query(){return Promise.resolve(this.mockedResults||{results:[]})}}const bt=(0,q.tK)("search-context"),xt=()=>{const f=(0,a.useContext)(bt);if(!f)throw new Error("useSearch must be used within a SearchContextProvider");const I=f.atVersion(1);if(!I)throw new Error("No SearchContext v1 found");return I},ht=()=>(0,a.useContext)(bt)!==void 0,ut={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},At=(f=ut)=>{const I=(0,et.gf)(nt),U=(0,J.s)(),[$,W]=(0,a.useState)(f.term),[X,st]=(0,a.useState)(f.types),[Et,St]=(0,a.useState)(f.filters),[Bt,Dt]=(0,a.useState)(f.pageLimit),[Ft,_t]=(0,a.useState)(f.pageCursor),Ht=(0,Q.A)($),he=(0,Q.A)(Et),Yt=(0,N.A)(async()=>{const oe=await I.query({term:$,types:X,filters:Et,pageLimit:Bt,pageCursor:Ft});return $&&U.captureEvent("search",$,{value:Yt.value?.numberOfResults??void 0}),oe},[$,X,Et,Bt,Ft]),ge=!Yt.loading&&!Yt.error&&Yt.value?.nextPageCursor,qt=!Yt.loading&&!Yt.error&&Yt.value?.previousPageCursor,ue=(0,a.useCallback)(()=>{_t(Yt.value?.nextPageCursor)},[Yt.value?.nextPageCursor]),re=(0,a.useCallback)(()=>{_t(Yt.value?.previousPageCursor)},[Yt.value?.previousPageCursor]);return(0,a.useEffect)(()=>{Ht!==void 0&&$!==Ht&&_t(void 0)},[$,Ht,_t]),(0,a.useEffect)(()=>{he!==void 0&&!(0,G.isEqual)(Et,he)&&_t(void 0)},[Et,he,_t]),{result:Yt,term:$,setTerm:W,types:X,setTypes:st,filters:Et,setFilters:St,pageLimit:Bt,setPageLimit:Dt,pageCursor:Ft,setPageCursor:_t,fetchNextPage:ge?ue:void 0,fetchPreviousPage:qt?re:void 0}},mt=f=>{const{initialState:I,children:U}=f,$=At(I);return(0,n.jsx)(Y.Ig,{attributes:{searchTypes:$.types.sort().join(",")},children:(0,n.jsx)(bt.Provider,{value:(0,z.B)({1:$}),children:U})})},Pt=f=>{const{initialState:I,inheritParentContextIfAvailable:U,children:$}=f,W=ht(),X=(0,et.gf)(V.U),st=I??{},Et=X.has("search.query.pageLimit")?{pageLimit:X.getNumber("search.query.pageLimit")}:{},St={...ut,...st,...Et};return W&&U?(0,n.jsx)(n.Fragment,{children:$}):(0,n.jsx)(mt,{initialState:St,children:$})};var Ot=t(78467),jt=t(20577),Nt=t(82266),Ut=t(29365),pt=t(34839),Lt=t(16249),ft=t(64947),B=t(45917),k=t(22771);const ot=(0,a.forwardRef)((f,I)=>{const{onChange:U,onKeyDown:$=()=>{},onClear:W=()=>{},onSubmit:X=()=>{},debounceTime:st=200,clearButton:Et=!0,fullWidth:St=!0,value:Bt,label:Dt,placeholder:Ft,inputProps:_t={},InputProps:Ht={},endAdornment:he,...Yt}=f,ge=(0,et.gf)(V.U),[qt,ue]=(0,a.useState)(""),re=(0,a.useRef)("");(0,a.useEffect)(()=>{ue(Ce=>Ce===re.current?String(Bt):Ce)},[Bt,re]),(0,k.A)(()=>{re.current=qt,U(qt)},st,[qt]);const ne=(0,a.useCallback)(Ce=>{ue(Ce.target.value)},[ue]),oe=(0,a.useCallback)(Ce=>{$&&$(Ce),X&&Ce.key==="Enter"&&X()},[$,X]),ie=(0,a.useCallback)(()=>{re.current="",U(""),ue(""),W&&W()},[U,W]),Re=Dt?void 0:"Search",Le=Ft??`Search in ${ge.getOptionalString("app.title")||"Backstage"}`,qe=(0,Nt.n)().getSystemIcon("search")||B.A,rn=(0,n.jsx)(pt.A,{position:"start",children:(0,n.jsx)(Ut.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,n.jsx)(qe,{})})}),Ge=(0,n.jsx)(pt.A,{position:"end",children:(0,n.jsx)(ft.A,{"aria-label":"Clear",size:"small",onClick:ie,onKeyDown:Ce=>{Ce.key==="Enter"&&Ce.stopPropagation()},children:"Clear"})});return(0,n.jsx)(Pt,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(Lt.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:I,value:qt,label:Dt,placeholder:Le,InputProps:{startAdornment:rn,endAdornment:Et?Ge:he,...Ht},inputProps:{"aria-label":Re,..._t},fullWidth:St,onChange:ne,onKeyDown:oe,...Yt})})}),Ct=(0,a.forwardRef)((f,I)=>{const{value:U="",onChange:$,...W}=f,{term:X,setTerm:st}=xt();(0,a.useEffect)(()=>{U&&st(String(U))},[U,st]);const Et=(0,a.useCallback)(St=>{$?$(St):st(St)},[$,st]);return(0,n.jsx)(Pt,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(Y.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,n.jsx)(ot,{...W,ref:I,value:X,onChange:Et})})})}),it=(0,x.A)(f=>({loading:{right:f.spacing(1),position:"absolute"}})),vt=f=>I=>(0,n.jsx)(Pt,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(f,{...I})}),Tt=()=>{const f=it();return(0,n.jsx)(Ot.A,{className:f.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},wt=vt(function(I){const{loading:U,value:$,onChange:W=()=>{},options:X=[],getOptionLabel:st=re=>String(re),inputPlaceholder:Et,inputDebounceTime:St,freeSolo:Bt=!0,fullWidth:Dt=!0,clearOnBlur:Ft=!1,"data-testid":_t="search-autocomplete",...Ht}=I,{setTerm:he}=xt(),Yt=(0,a.useCallback)(re=>re?typeof re=="string"?re:st(re):"",[st]),ge=(0,a.useMemo)(()=>Yt($),[$,Yt]),qt=(0,a.useCallback)((re,ne,oe,ie)=>{he(Yt(ne)),W(re,ne,oe,ie)},[Yt,he,W]),ue=(0,a.useCallback)(({InputProps:{ref:re,className:ne,endAdornment:oe},InputLabelProps:ie,...Re})=>(0,n.jsx)(Ct,{...Re,ref:re,clearButton:!1,value:ge,placeholder:Et,debounceTime:St,endAdornment:U?(0,n.jsx)(Tt,{}):oe,InputProps:{className:ne}}),[U,ge,Et,St]);return(0,n.jsx)(jt.Ay,{...Ht,"data-testid":_t,value:$,onChange:qt,options:X,getOptionLabel:st,renderInput:ue,freeSolo:Bt,fullWidth:Dt,clearOnBlur:Ft})});var It=t(18690),$t=t(27698);const Qt=f=>f?.document,fe=f=>{const{entityId:I,entityTitle:U,debounceTime:$=150}=f,[W,X]=(0,a.useState)(!1),st=(0,It.Zp)(),{setFilters:Et,term:St,result:{loading:Bt,value:Dt}}=xt(),[Ft,_t]=(0,a.useState)([]);(0,a.useEffect)(()=>{let qt=!0;if(qt&&Dt){const ue=Dt.results.slice(0,10);_t(ue)}return()=>{qt=!1}},[Bt,Dt]);const{kind:Ht,name:he,namespace:Yt}=I;(0,a.useEffect)(()=>{Et(qt=>({...qt,kind:Ht,namespace:Yt,name:he}))},[Ht,Yt,he,Et]);const ge=(qt,ue)=>{if(Qt(ue)){const{location:re}=ue.document;st(re)}};return(0,n.jsx)(wt,{"data-testid":"techdocs-search-bar",size:"small",open:W&&!!St,getOptionLabel:()=>"",filterOptions:qt=>qt,onClose:()=>{X(!1)},onOpen:()=>{X(!0)},onChange:ge,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Ft,renderOption:({document:qt,highlight:ue})=>(0,n.jsx)($t.TechDocsSearchResultListItem,{result:qt,lineClamp:3,asListItem:!1,asLink:!1,title:qt.title,highlight:ue}),loading:Bt,inputDebounceTime:$,inputPlaceholder:`Search ${U||I.name} docs`,freeSolo:!1})},le=f=>{const I={term:"",types:["techdocs"],pageCursor:"",filters:f.entityId};return(0,n.jsx)(Pt,{initialState:I,children:(0,n.jsx)(fe,{...f})})};var te=t(74219);const se=(0,a.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(f=>({default:f.RealLogViewer})));function Te(f){const{Progress:I}=(0,Nt.n)().getComponents();return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(I,{}),children:(0,n.jsx)(se,{...f})})}var ze=t(73845),zt=t(72501),ee=t(12398),Zt=t(32881);const We=(0,x.A)(f=>(0,ee.A)({paper:{width:"100%",[f.breakpoints.up("sm")]:{width:"75%"},[f.breakpoints.up("md")]:{width:"50%"},padding:f.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:f.palette.background.default}})),ce=({buildLog:f,onClose:I})=>{const U=We(),$=f.length===0?"Waiting for logs...":f.join(`
|
|
8
|
+
`);return(0,n.jsxs)(d.A,{container:!0,direction:"column",className:U.root,spacing:0,wrap:"nowrap",children:[(0,n.jsxs)(d.A,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,n.jsx)(zt.A,{variant:"h5",children:"Build Details"}),(0,n.jsx)(Ut.A,{title:"Close the drawer",onClick:I,color:"inherit",children:(0,n.jsx)(Zt.A,{})},"dismiss")]}),(0,n.jsx)(d.A,{item:!0,xs:!0,children:(0,n.jsx)(Te,{text:$,classes:{root:U.logs}})})]})},je=({buildLog:f})=>{const I=We(),[U,$]=(0,a.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ft.A,{color:"inherit",onClick:()=>$(!0),children:"Show Build Logs"}),(0,n.jsx)(ze.Ay,{classes:{paper:I.paper},anchor:"right",open:U,onClose:()=>$(!1),children:(0,n.jsx)(ce,{buildLog:f,onClose:()=>$(!1)})})]})},Ze=({errorMessage:f})=>{const I=(0,et.gf)(V.U).getOptionalString("techdocs.builder"),U=(0,J.s)(),{entityRef:$}=(0,m.V)(),W=(0,It.zy)();(0,a.useEffect)(()=>{const{pathname:st,search:Et,hash:St}=W;U.captureEvent("not-found",`${st}${Et}${St}`,{attributes:$})},[U,$,W]);let X="";return[void 0,"local"].includes(I)||(X="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."),(0,n.jsx)(F.M,{status:"404",statusMessage:f||"Documentation not found",additionalInfo:X})};var pe=t(28966),Je=t(26679);function ln({contentLoading:f,content:I,activeSyncState:U}){return f||U==="BUILD_READY_RELOAD"||!I&&U==="CHECKING"?"CHECKING":!I&&U==="BUILDING"?"INITIAL_BUILD":I?U==="BUILDING"?"CONTENT_STALE_REFRESHING":U==="BUILD_READY"?"CONTENT_STALE_READY":U==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function en(f,I){const U={...f};switch(I.type){case"sync":I.state==="CHECKING"&&(U.buildLog=[]),U.activeSyncState=I.state,U.syncError=I.syncError;break;case"contentLoading":U.contentLoading=!0,U.contentError=void 0;break;case"content":typeof I.path=="string"&&(U.path=I.path),U.contentLoading=!1,U.content=I.content,U.contentError=I.contentError;break;case"buildLog":U.buildLog=U.buildLog.concat(I.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(U.activeSyncState)&&["contentLoading","content"].includes(I.type)&&(U.activeSyncState="UP_TO_DATE",U.buildLog=[]),U}function nn(f,I,U,$){const[W,X]=(0,a.useReducer)(en,{activeSyncState:"CHECKING",path:$,contentLoading:!0,buildLog:[]}),st=(0,et.gf)(Je.s),{retry:Et}=(0,pe.A)(async()=>{X({type:"contentLoading"});try{const Dt=await st.getEntityDocs({kind:f,namespace:I,name:U},$);return X({type:"content",content:Dt,path:$}),Dt}catch(Dt){X({type:"content",contentError:Dt,path:$})}},[st,f,I,U,$]),St=(0,a.useRef)({content:void 0,reload:()=>{}});St.current={content:W.content,reload:Et},(0,N.A)(async()=>{X({type:"sync",state:"CHECKING"});const Dt=setTimeout(()=>{X({type:"sync",state:"BUILDING"})},1e3);try{switch(await st.syncEntityDocs({kind:f,namespace:I,name:U},_t=>{X({type:"buildLog",log:_t})})){case"updated":St.current.content?X({type:"sync",state:"BUILD_READY"}):(St.current.reload(),X({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":X({type:"sync",state:"UP_TO_DATE"});break;default:X({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(Ft){X({type:"sync",state:"ERROR",syncError:Ft})}finally{clearTimeout(Dt)}},[f,U,I,st,X,St]);const Bt=(0,a.useMemo)(()=>ln({activeSyncState:W.activeSyncState,contentLoading:W.contentLoading,content:W.content}),[W.activeSyncState,W.content,W.contentLoading]);return(0,a.useMemo)(()=>({state:Bt,contentReload:Et,path:W.path,content:W.content,contentErrorMessage:W.contentError?.toString(),syncErrorMessage:W.syncError?.toString(),buildLog:W.buildLog}),[Bt,Et,W.path,W.content,W.contentError,W.syncError,W.buildLog])}const Be=(0,a.createContext)({}),Ue=()=>(0,a.useContext)(Be),Ke=f=>{const{children:I}=f,{"*":U=""}=(0,It.g)(),{entityRef:$}=(0,m.V)(),{kind:W,namespace:X,name:st}=$,Et=nn(W,X,st,U);return(0,n.jsx)(Be.Provider,{value:Et,children:I instanceof Function?I(Et):I})},sn=f=>I=>(0,n.jsx)(Ke,{children:(0,n.jsx)(f,{...I})}),Ae=(0,x.A)(f=>({root:{marginBottom:f.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),He=()=>{let f=null;const I=Ae(),{state:U,contentReload:$,contentErrorMessage:W,syncErrorMessage:X,buildLog:st}=Ue();return U==="INITIAL_BUILD"&&(f=(0,n.jsx)(te.A,{classes:{root:I.root},variant:"outlined",severity:"info",icon:(0,n.jsx)(Ot.A,{size:"24px"}),action:(0,n.jsx)(je,{buildLog:st}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),U==="CONTENT_STALE_REFRESHING"&&(f=(0,n.jsx)(te.A,{variant:"outlined",severity:"info",icon:(0,n.jsx)(Ot.A,{size:"24px"}),action:(0,n.jsx)(je,{buildLog:st}),classes:{root:I.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),U==="CONTENT_STALE_READY"&&(f=(0,n.jsx)(te.A,{variant:"outlined",severity:"success",action:(0,n.jsx)(ft.A,{color:"inherit",onClick:()=>$(),children:"Refresh"}),classes:{root:I.root},children:"A newer version of this documentation is now available, please refresh to view."})),U==="CONTENT_STALE_ERROR"&&(f=(0,n.jsxs)(te.A,{variant:"outlined",severity:"error",action:(0,n.jsx)(je,{buildLog:st}),classes:{root:I.root,message:I.message},children:["Building a newer version of this documentation failed."," ",X]})),U==="CONTENT_NOT_FOUND"&&(f=(0,n.jsxs)(n.Fragment,{children:[X&&(0,n.jsxs)(te.A,{variant:"outlined",severity:"error",action:(0,n.jsx)(je,{buildLog:st}),classes:{root:I.root,message:I.message},children:["Building a newer version of this documentation failed."," ",X]}),(0,n.jsx)(Ze,{errorMessage:W})]})),f};var M=t(5893),l=t(54917),E=t(3347),D=t(71651),tt=t.n(D);const lt=/main\.[A-Fa-f0-9]{8}\.min\.css$/,yt=/^https:\/\/fonts\.googleapis\.com/,Wt=/^https:\/\/fonts\.gstatic\.com/,Kt=f=>f.nodeName==="LINK",Jt=f=>{const I=f?.getAttribute("href")||"",U=I.match(lt),$=I.match(yt),W=I.match(Wt);return U||$||W},Mt=f=>(Kt(f)&&!Jt(f)&&f.remove(),f),Xt=f=>f.nodeName==="IFRAME",kt=(f,I)=>{const U=f.getAttribute("src")||"";try{const{host:$}=new URL(U);return I.includes($)}catch{return!1}},me=f=>I=>(Xt(I)&&!kt(I,f)&&I.remove(),I),$e=()=>{const f=(0,et.gf)(V.U);return(0,a.useMemo)(()=>f.getOptionalConfig("techdocs.sanitizer"),[f])},Pe=()=>{const f=$e();return(0,a.useCallback)(async I=>{const U=f?.getOptionalStringArray("allowedIframeHosts");tt().addHook("beforeSanitizeElements",Mt);const $=["link","meta"];U&&($.push("iframe"),tt().addHook("beforeSanitizeElements",me(U))),tt().addHook("uponSanitizeElement",(st,Et)=>{Et.tagName==="meta"&&(st.getAttribute("http-equiv")==="refresh"&&st.getAttribute("content")?.includes("url=")||st.parentNode?.removeChild(st))}),tt().addHook("uponSanitizeAttribute",(st,Et)=>{st.tagName!=="meta"&&(Et.attrName==="http-equiv"||Et.attrName==="content")&&st.removeAttribute(Et.attrName)});const W=f?.getOptionalString("allowedCustomElementTagNameRegExp"),X=f?.getOptionalString("allowedCustomElementAttributeNameRegExp");return tt().sanitize(I.outerHTML,{ADD_TAGS:$,FORBID_TAGS:["style"],ADD_ATTR:["http-equiv","content"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0,CUSTOM_ELEMENT_HANDLING:{tagNameCheck:W?new RegExp(W):void 0,attributeNameCheck:X?new RegExp(X):void 0}})},[f])};var Ve=t(34435),de=t(268);const ae=({theme:f})=>`
|
|
9
9
|
/*================== Variables ==================*/
|
|
10
10
|
/*
|
|
11
11
|
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.
|
|
@@ -393,13 +393,13 @@ body {
|
|
|
393
393
|
font-size: var(--md-typeset-font-size);
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
${ns.reduce((I,U)=>{const $=f.typography.htmlFontSize??16,
|
|
396
|
+
${ns.reduce((I,U)=>{const $=f.typography.htmlFontSize??16,W=f.typography[U],{lineHeight:X,fontFamily:st,fontWeight:Et,fontSize:St}=W,Bt=Dt=>{if(typeof Dt=="number")return Bt(`${Dt/$*.6}rem`);if(typeof Dt=="string"){if(Dt.match(In)){const Ft=window.getComputedStyle(document.body).getPropertyValue(Dt.replaceAll(In,""));if(Ft!=="")return Bt(Ft)}else if(Dt.match(yn))return`calc(${Dt.replace(yn,"")} * var(--md-typeset-font-size))`}return Dt};return I.concat(`
|
|
397
397
|
.md-typeset ${U} {
|
|
398
398
|
color: var(--md-default-fg-color);
|
|
399
399
|
line-height: ${X};
|
|
400
400
|
font-family: ${st};
|
|
401
|
-
font-weight: ${
|
|
402
|
-
font-size: ${
|
|
401
|
+
font-weight: ${Et};
|
|
402
|
+
font-size: ${Bt(St)};
|
|
403
403
|
}
|
|
404
404
|
`)},"")}
|
|
405
405
|
|
|
@@ -545,9 +545,9 @@ ${ns.reduce((I,U)=>{const $=f.typography.htmlFontSize??16,z=f.typography[U],{lin
|
|
|
545
545
|
${ss[f.palette.type].map(I=>`img[src$="${I}"]`).join(", ")} {
|
|
546
546
|
display: none;
|
|
547
547
|
}
|
|
548
|
-
`],os=()=>(0,Ve.Ut)(),En=()=>{const f=os(),I=(0,l.A)();return(0,a.useMemo)(()=>{const U={theme:I,sidebar:f};return rs.reduce(($,
|
|
548
|
+
`],os=()=>(0,Ve.Ut)(),En=()=>{const f=os(),I=(0,l.A)();return(0,a.useMemo)(()=>{const U={theme:I,sidebar:f};return rs.reduce(($,W)=>$+W(U),"")},[I,f])},as=()=>{const f=En();return(0,a.useCallback)(I=>(I.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${f}</style>`),I),[f])},An=async(f,I)=>{let U;if(typeof f=="string")U=new DOMParser().parseFromString(f,"text/html").documentElement;else if(f instanceof Element)U=f;else throw new Error("dom is not a recognized type");for(const $ of I)U=await $(U);return U},is=(f,I,U)=>{const $=f==="src"&&I.endsWith(".svg"),W=!I.match(/^([a-z]*:)?\/\//i),X=I.startsWith(U);return $&&(W||X)},Dn=({techdocsStorageApi:f,entityId:I,path:U})=>async $=>{const W=await f.getApiOrigin(),X=async(st,Et)=>{for(const St of st)if(St.hasAttribute(Et)){const Bt=St.getAttribute(Et);if(!Bt)return;const Dt=await f.getBaseUrl(Bt,I,U);if(is(Et,Bt,W))try{const _t=await(await fetch(Dt,{credentials:"include"})).text();St.setAttribute(Et,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(_t)))}`)}catch{St.setAttribute("alt",`Error: ${Bt}`)}else St.setAttribute(Et,Dt)}};return await Promise.all([X($.querySelectorAll("img"),"src"),X($.querySelectorAll("script"),"src"),X($.querySelectorAll("source"),"src"),X($.querySelectorAll("link"),"href"),X($.querySelectorAll("a[download]"),"href")]),$},cs=()=>f=>(((U,$)=>{Array.from(U).filter(W=>W.hasAttribute($)).forEach(W=>{const X=W.getAttribute($);if(X){X.match(/^https?:\/\//i)&&W.setAttribute("target","_blank");try{const st=Ln(window.location.href);W.setAttribute($,new URL(X,st).toString())}catch{W.replaceWith(W.textContent||X)}}})})(Array.from(f.getElementsByTagName("a")),"href"),f);function Ln(f){const I=new URL(f);return!I.pathname.endsWith("/")&&!I.pathname.endsWith(".html")&&(I.pathname+="/"),I.toString()}var ls=t(27326);let Mn;Mn=Promise.resolve().then(t.t.bind(t,25873,19));function un(f,I){Mn.then(U=>{"createRoot"in U?U.createRoot(I).render(f):U.render(f,I)})}const ds=()=>f=>{const I=f.querySelector('.md-header label[for="__drawer"]'),U=f.querySelector("article");if(!I||!U)return f;const $=I.cloneNode();return un(a.createElement(ls.A),$),$.id="toggle-sidebar",$.title="Toggle Sidebar",$.classList.add("md-content__button"),$.style.setProperty("padding","0 0 0 5px"),$.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),U?.prepend($),f},us=()=>f=>(f.querySelector(".md-header")?.remove(),f),jn=()=>f=>(f.querySelector(".md-footer .md-copyright")?.remove(),f.querySelector(".md-footer-copyright")?.remove(),f);var hs=t(36021),gs=t(90292),Bn=t(52536),Un=t.n(Bn);const ps=f=>I=>{const U=I.querySelector('[title="Edit this page"]');if(!U||!U.href)return I;const $=new URL(U.href),W=f.byUrl($);if(W?.type!=="github"&&W?.type!=="gitlab")return I;const X=I.querySelector("article>h1")?.childNodes[0].textContent||"",st=encodeURIComponent(`Documentation Feedback: ${X}`),Et=encodeURIComponent(`Page source:
|
|
549
549
|
${U.href}
|
|
550
550
|
|
|
551
|
-
Feedback:`),St=z?.type==="github"?(0,hs.F)($.href,"blob"):$.href,$t=Un()(St),Dt=`/${$t.organization}/${$t.name}`,Ft=U.cloneNode();switch(z?.type){case"gitlab":Ft.href=`${$.origin}${Dt}/issues/new?issue[title]=${st}&issue[description]=${At}`;break;case"github":Ft.href=`${$.origin}${Dt}/issues/new?title=${st}&body=${At}`;break;default:return I}return un(a.createElement(gs.A),Ft),Ft.style.paddingLeft="5px",Ft.title="Leave feedback for this page",Ft.id="git-feedback-link",U?.insertAdjacentElement("beforebegin",Ft),I};var xn=t(38097);const Cn=(0,x.A)(f=>({button:{color:f.palette.primary.light,textDecoration:"underline"}})),fs=({message:f,handleButtonClick:I,autoHideDuration:U})=>{const $=Cn(),[z,X]=(0,a.useState)(!0),st=()=>X(!1);return(0,n.jsx)(xn.A,{open:z,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:U,color:"primary",onClose:st,message:f,action:(0,n.jsx)(ft.A,{classes:{root:$.button},size:"small",onClick:()=>{st(),I()},children:"Redirect now"})})},$n=(f,I)=>{const $=z=>{const X=Ln(window.location.href),st=new URL(z,X);if(st.hostname!==window.location.hostname){const St=window.location.pathname,$t=St.indexOf(I),Dt=St.slice(0,$t+I.length);return new URL(Dt,X).href}return st.href};return z=>{for(const X of Array.from(z.querySelectorAll("meta")))if(X.getAttribute("http-equiv")==="refresh"){const st=X.getAttribute("content")?.split("url=");if(!st||st.length<2)return z;const At=st[1],St=$(At);if(window.location.href===St)return z;const $t=document.createElement("div");return un((0,n.jsx)(fs,{message:"This TechDocs page is no longer maintained. Will automatically redirect to the designated replacement.",handleButtonClick:()=>f(St),autoHideDuration:3e3}),$t),document.body.appendChild($t),setTimeout(()=>{f(St)},3e3),z}return z}},Fn=()=>f=>(setTimeout(()=>{const I=f?.querySelectorAll("li.md-nav__item--active");I.length!==0&&(I.forEach($=>{const z=$?.querySelector("input");z?.checked||z?.click()}),I[I.length-1].scrollIntoView())},200),f);var ms=t(50868),vs=t(10437),ys=t(71677),Es=t(87051),As=t(36338);const xs=(0,Es.A)(f=>({tooltip:{fontSize:"inherit",color:f.palette.text.primary,margin:0,padding:f.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(ys.Ay),Cs=()=>(0,n.jsx)(vs.A,{children:(0,n.jsx)("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"})}),bs=({text:f})=>{const[I,U]=(0,a.useState)(!1),[,$]=(0,As.A)(),z=(0,a.useCallback)(()=>{$(f),U(!0)},[f,$]),X=(0,a.useCallback)(()=>{U(!1)},[U]);return(0,n.jsx)(xs,{title:"Copied to clipboard",placement:"left",open:I,onClose:X,leaveDelay:1e3,children:(0,n.jsx)(Bt.A,{style:{color:"inherit",position:"absolute"},className:"md-clipboard md-icon",onClick:z,children:(0,n.jsx)(Cs,{})})})},Ss=f=>I=>{const U=I.querySelectorAll("pre > code");for(const $ of U){const z=$.textContent||"",X=document.createElement("div");$?.parentElement?.prepend(X),un((0,n.jsx)(ms.A,{theme:f,children:(0,n.jsx)(bs,{text:z})}),X)}return I},Os=({baseUrl:f,onClick:I})=>U=>(Array.from(U.getElementsByTagName("a")).forEach($=>{$.addEventListener("click",z=>{const st=$.getAttribute("href");st&&st.startsWith(f)&&!$.hasAttribute("download")&&(z.preventDefault(),I(z,st))})}),U),Nn=({onLoading:f,onLoaded:I})=>U=>(f(),U.addEventListener(p,function $(){I(),U.removeEventListener(p,$)}),U);function Ts(f,I){const U=new URL(I),$=`${U.origin}${U.pathname.replace(/\/$/,"")}`,z=f.replace($,"").replace(/^\/+/,""),X=new URL(`http://localhost/${z}`);return`${X.pathname}${X.search}${X.hash}`}function kn(){const f=(0,a.useRef)((0,It.Zp)()),U=(0,et.gf)(V.U).getOptionalString("app.baseUrl");return(0,a.useCallback)(z=>{let X=z;if(U)try{X=Ts(z,U)}catch{}f.current(X)},[U])}const Wn="screen and (max-width: 76.1875em)",Ps=f=>{const I=kn(),U=(0,l.A)(),$=(0,M.A)(Wn),z=Pe(),X=as(),st=(0,J.s)(),At=(0,et.gf)(Je.s),St=(0,et.gf)(E.Y),{state:$t,path:Dt,content:Ft}=Ue(),{"*":_t=""}=(0,It.g)(),[Ht,he]=(0,a.useState)(null),Yt=v(Ht),ge=(0,a.useCallback)(()=>{if(!Ht)return;Ht.querySelectorAll(".md-sidebar").forEach(oe=>{if($)oe.style.top="0px";else{const Re=document?.querySelector(".techdocs-reader-page")?.getBoundingClientRect().top??0;let Le=Ht.getBoundingClientRect().top??0;const rn=Ht.querySelector(".md-container > .md-tabs")?.getBoundingClientRect().height??0;Le<Re&&(Le=Re);const Ge=Math.max(Le,0)+rn;oe.style.top=`${Ge}px`;const on=Ht.querySelector(".md-container > .md-footer")?.getBoundingClientRect().top??window.innerHeight;oe.style.height=`${on-Ge}px`}oe.style.setProperty("opacity","1")})},[Ht,$]);(0,a.useEffect)(()=>(window.addEventListener("resize",ge),window.addEventListener("scroll",ge,!0),()=>{window.removeEventListener("resize",ge),window.removeEventListener("scroll",ge,!0)}),[Ht,ge]);const qt=(0,a.useCallback)(()=>{if(!Ht)return;const ne=Ht.querySelector(".md-footer");ne&&(ne.style.width=`${Ht.getBoundingClientRect().width}px`)},[Ht]);(0,a.useEffect)(()=>(window.addEventListener("resize",qt),()=>{window.removeEventListener("resize",qt)}),[Ht,qt]),(0,a.useEffect)(()=>{Yt||(qt(),ge())},[$t,Yt,qt,ge]);const ue=(0,a.useCallback)((ne,oe)=>An(ne,[z,Dn({techdocsStorageApi:At,entityId:f,path:oe}),cs(),ds(),us(),jn(),ps(St),X]),[f,St,At,z,X]),re=(0,a.useCallback)(async ne=>An(ne,[$n(I,f.name),Fn(),Ss(U),Os({baseUrl:window.location.origin,onClick:(oe,ie)=>{const Re=oe.ctrlKey||oe.metaKey,Le=new URL(ie),qe=oe.target?.innerText||ie,rn=ie.replace(window.location.origin,"");st.captureEvent("click",qe,{attributes:{to:rn}}),Le.hash?Re?window.open(ie,"_blank"):(window.location.pathname!==Le.pathname?I(ie):window.history.pushState(null,document.title,Le.hash),ne?.querySelector(`[id="${Le.hash.slice(1)}"]`)?.scrollIntoView()):Re?window.open(ie,"_blank"):I(ie)}}),Nn({onLoading:()=>{},onLoaded:()=>{ne.querySelector(".md-nav__title")?.removeAttribute("for")}}),Nn({onLoading:()=>{Array.from(ne.querySelectorAll(".md-sidebar")).forEach(ie=>{ie.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[U,I,st,f.name]);return(0,a.useEffect)(()=>{if(!Ft)return()=>{};let ne=!0;return ue(Ft,Dt).then(async oe=>{if(!oe?.innerHTML||!ne||_t!==Dt)return;window.scroll({top:0});const ie=await re(oe);he(ie)}),()=>{ne=!1}},[Ft,_t,Dt,ue,re]),Ht};var bn=t(41883),Fe=t(72020),we=t(99730);const Ne=()=>{const f=(0,Fe.YR)(),{shadowRoot:I}=(0,m.V)(),U=I?.querySelector('[data-md-component="content"]'),$=I?.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let z=$?.querySelector('[data-techdocs-addons-location="primary sidebar"]');z||(z=document.createElement("div"),z.setAttribute("data-techdocs-addons-location","primary sidebar"),$?.prepend(z));const X=I?.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let st=X?.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return st||(st=document.createElement("div"),st.setAttribute("data-techdocs-addons-location","secondary sidebar"),X?.prepend(st)),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(bn.A,{container:z,children:f.renderComponentsByLocation(we.e.PrimarySidebar)}),(0,n.jsx)(bn.A,{container:U,children:f.renderComponentsByLocation(we.e.Content)}),(0,n.jsx)(bn.A,{container:st,children:f.renderComponentsByLocation(we.e.SecondarySidebar)})]})},ws=(0,x.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Kn=sn(f=>{const{withSearch:I=!0,onReady:U}=f,$=ws(),{entityMetadata:{value:z,loading:X},entityRef:st,setShadowRoot:At}=(0,m.V)(),{state:St}=Ue(),$t=Ps(st),Dt=window.location.pathname,Ft=window.location.hash,_t=v($t),[Ht]=w([`[id="${Ft.slice(1)}"]`]);(0,a.useEffect)(()=>{_t||(Ft?Ht&&Ht.scrollIntoView():document?.querySelector("header")?.scrollIntoView())},[Dt,Ft,Ht,_t]);const he=(0,a.useCallback)(Yt=>{At(Yt),U instanceof Function&&U()},[At,U]);return X===!1&&!z?(0,n.jsx)(F.M,{status:"404",statusMessage:"PAGE NOT FOUND"}):$t?(0,n.jsx)(L.U,{children:(0,n.jsxs)(d.A,{container:!0,children:[(0,n.jsx)(d.A,{xs:12,item:!0,children:(0,n.jsx)(He,{})}),I&&(0,n.jsx)(d.A,{className:$.search,xs:"auto",item:!0,children:(0,n.jsx)(le,{entityId:st,entityTitle:z?.metadata?.title})}),(0,n.jsxs)(d.A,{xs:12,item:!0,children:[(St==="CHECKING"||_t)&&(0,n.jsx)(Z.k,{}),(0,n.jsx)(A,{element:$t,onAppend:he,children:(0,n.jsx)(Ne,{})})]})]})}):(0,n.jsx)(L.U,{children:(0,n.jsx)(d.A,{container:!0,children:(0,n.jsx)(d.A,{xs:12,item:!0,children:(0,n.jsx)(He,{})})})})}),Rs=null},45061:(H,b,t)=>{"use strict";t.d(b,{T:()=>Y});var n=t(31085),a=t(14041),d=t(93285),x=t(42899),m=t(4387),h=t(13660),u=t(72020),g=t(86892),p=t(99730),y=t(67871),v=t(8859),A=t(34428),T=t(51372),P=t(58837),w=t(268),O=t(72501),j=t(72072);const F=(0,P.A)(V=>({root:{textAlign:"left"},label:{color:V.page.fontColor,fontWeight:V.typography.fontWeightBold,letterSpacing:0,fontSize:V.typography.fontSize,marginBottom:V.spacing(1)/2,lineHeight:1},value:{color:(0,w.X4)(V.page.fontColor,.8),fontSize:V.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),L=({value:V,className:at,typographyRootComponent:nt})=>(0,n.jsx)(O.A,{component:nt??(typeof V=="string"?"p":"span"),className:at,children:V});function Z(V){const{label:at,value:nt,url:gt,contentTypograpyRootComponent:bt}=V,xt=F(),ht=(0,n.jsx)(L,{className:xt.value,value:nt||"<Unknown>",typographyRootComponent:bt});return(0,n.jsx)(x.A,{item:!0,children:(0,n.jsxs)(O.A,{component:"span",className:xt.root,children:[(0,n.jsx)(O.A,{className:xt.label,children:at}),gt?(0,n.jsx)(j.N_,{to:gt,children:ht}):ht]})})}var G=t(69814),N=t(72427),Q=t(65461),q=t(9222),K=t(45250),et=t(82779);const J=(0,n.jsx)(m.A,{animation:"wave",variant:"text",height:40}),Y=V=>{const{children:at}=V,nt=(0,u.YR)(),gt=(0,N.gf)(Q.U),{title:bt,setTitle:xt,subtitle:ht,setSubtitle:ut,entityRef:Et,metadata:{value:mt,loading:Pt},entityMetadata:{value:Ot,loading:jt}}=(0,g.V)();(0,a.useEffect)(()=>{mt&&(xt(mt.site_name),ut(()=>{let{site_description:vt}=mt;return(!vt||vt==="None")&&(vt=""),vt}))},[mt,xt,ut]);const Nt=gt.getOptional("app.title")||"Backstage",Bt=[bt,ht,Nt].filter(Boolean).join(" | "),{locationMetadata:pt,spec:Lt}=Ot||{},ft=Lt?.lifecycle,B=Ot?(0,y.t)(Ot,T.vv):[],k=(0,q.S)(et.rQ)(),ot=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Z,{label:(0,K.capitalize)(Ot?.kind||"entity"),value:(0,n.jsx)(v.z,{color:"inherit",entityRef:Et,title:Ot?.metadata.title,defaultKind:"Component"})}),B.length>0&&(0,n.jsx)(Z,{label:"Owner",value:(0,n.jsx)(A.i,{color:"inherit",entityRefs:B,defaultKind:"group"})}),ft?(0,n.jsx)(Z,{label:"Lifecycle",value:String(ft)}):null,pt&&pt.type!=="dir"&&pt.type!=="file"?(0,n.jsx)(Z,{label:"",value:(0,n.jsxs)(x.A,{container:!0,direction:"column",alignItems:"center",children:[(0,n.jsx)(x.A,{style:{padding:0},item:!0,children:(0,n.jsx)(h.A,{style:{marginTop:"-25px"}})}),(0,n.jsx)(x.A,{style:{padding:0},item:!0,children:"Source"})]}),url:pt.target}):null]});return!jt&&Ot===void 0||!Pt&&mt===void 0?null:(0,n.jsxs)(G.Y,{type:"Documentation",typeLink:k,title:bt||J,subtitle:ht===""?void 0:ht||J,children:[(0,n.jsx)(d.A,{titleTemplate:"%s",children:(0,n.jsx)("title",{children:Bt})}),ot,at,nt.renderComponentsByLocation(p.e.Header)]})}},82779:(H,b,t)=>{"use strict";t.d(b,{Oc:()=>d,Ri:()=>x,rQ:()=>a});var n=t(34569);const a=(0,n.H)({id:"techdocs:index-page"}),d=(0,n.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),x=(0,n.H)({id:"techdocs:catalog-reader-view"})},27698:(H,b,t)=>{"use strict";t.r(b),t.d(b,{TechDocsSearchResultListItem:()=>y});var n=t(31085),a=t(14041),d=t(46423),x=t(5951),m=t(58837),h=t(72501),u=t(72072),g=t(70734);const p=(0,m.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),y=v=>{const{result:A,highlight:T,lineClamp:P=5,asListItem:w=!0,asLink:O=!0,title:j,icon:F}=v,L=p(),Z=({children:Q})=>O?(0,n.jsx)(u.N_,{noTrack:!0,to:A.location,children:Q}):(0,n.jsx)(n.Fragment,{children:Q}),G=()=>{const Q=T?.fields.title?(0,n.jsx)(g.e,{text:T.fields.title,preTag:T.preTag,postTag:T.postTag}):A.title,q=T?.fields.entityTitle?(0,n.jsx)(g.e,{text:T.fields.entityTitle,preTag:T.preTag,postTag:T.postTag}):A.entityTitle,K=T?.fields.name?(0,n.jsx)(g.e,{text:T.fields.name,preTag:T.preTag,postTag:T.postTag}):A.name;return A?(0,n.jsx)(x.A,{className:L.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,n.jsx)(Z,{children:j||(0,n.jsxs)(n.Fragment,{children:[Q," | ",q??K," docs"]})}),secondary:(0,n.jsx)(h.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:P,overflow:"hidden"},color:"textSecondary",variant:"body2",children:T?.fields.text?(0,n.jsx)(g.e,{text:T.fields.text,preTag:T.preTag,postTag:T.postTag}):A.text})}):null},N=({children:Q})=>w?(0,n.jsxs)(n.Fragment,{children:[F&&(0,n.jsx)(d.A,{children:typeof F=="function"?F(A):F}),(0,n.jsx)("div",{className:L.flexContainer,children:Q})]}):(0,n.jsx)(n.Fragment,{children:Q});return(0,n.jsx)(N,{children:(0,n.jsx)(G,{})})}},97184:(H,b,t)=>{const a=document.querySelector('meta[name="backstage-public-path"]')?.getAttribute("content");a&&(t.p=a)},86973:()=>{}},H=>{var b=n=>H(H.s=n);H.O(0,[1751,1888,5067,1678,235,6587,1975,5042,7400,4538,4121],()=>(b(97184),b(9245)));var t=H.O()}]);})();
|
|
551
|
+
Feedback:`),St=W?.type==="github"?(0,hs.F)($.href,"blob"):$.href,Bt=Un()(St),Dt=`/${Bt.organization}/${Bt.name}`,Ft=U.cloneNode();switch(W?.type){case"gitlab":Ft.href=`${$.origin}${Dt}/issues/new?issue[title]=${st}&issue[description]=${Et}`;break;case"github":Ft.href=`${$.origin}${Dt}/issues/new?title=${st}&body=${Et}`;break;default:return I}return un(a.createElement(gs.A),Ft),Ft.style.paddingLeft="5px",Ft.title="Leave feedback for this page",Ft.id="git-feedback-link",U?.insertAdjacentElement("beforebegin",Ft),I};var xn=t(38097);const Cn=(0,x.A)(f=>({button:{color:f.palette.primary.light,textDecoration:"underline"}})),fs=({message:f,handleButtonClick:I,autoHideDuration:U})=>{const $=Cn(),[W,X]=(0,a.useState)(!0),st=()=>X(!1);return(0,n.jsx)(xn.A,{open:W,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:U,color:"primary",onClose:st,message:f,action:(0,n.jsx)(ft.A,{classes:{root:$.button},size:"small",onClick:()=>{st(),I()},children:"Redirect now"})})},$n=(f,I)=>{const $=W=>{const X=Ln(window.location.href),st=new URL(W,X);if(st.hostname!==window.location.hostname){const St=window.location.pathname,Bt=St.indexOf(I),Dt=St.slice(0,Bt+I.length);return new URL(Dt,X).href}return st.href};return W=>{for(const X of Array.from(W.querySelectorAll("meta")))if(X.getAttribute("http-equiv")==="refresh"){const st=X.getAttribute("content")?.split("url=");if(!st||st.length<2)return W;const Et=st[1],St=$(Et);if(window.location.href===St)return W;const Bt=document.createElement("div");return un((0,n.jsx)(fs,{message:"This TechDocs page is no longer maintained. Will automatically redirect to the designated replacement.",handleButtonClick:()=>f(St),autoHideDuration:3e3}),Bt),document.body.appendChild(Bt),setTimeout(()=>{f(St)},3e3),W}return W}},Fn=()=>f=>(setTimeout(()=>{const I=f?.querySelectorAll("li.md-nav__item--active");I.length!==0&&(I.forEach($=>{const W=$?.querySelector("input");W?.checked||W?.click()}),I[I.length-1].scrollIntoView())},200),f);var ms=t(50868),vs=t(10437),ys=t(71677),Es=t(87051),As=t(36338);const xs=(0,Es.A)(f=>({tooltip:{fontSize:"inherit",color:f.palette.text.primary,margin:0,padding:f.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(ys.Ay),Cs=()=>(0,n.jsx)(vs.A,{children:(0,n.jsx)("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"})}),bs=({text:f})=>{const[I,U]=(0,a.useState)(!1),[,$]=(0,As.A)(),W=(0,a.useCallback)(()=>{$(f),U(!0)},[f,$]),X=(0,a.useCallback)(()=>{U(!1)},[U]);return(0,n.jsx)(xs,{title:"Copied to clipboard",placement:"left",open:I,onClose:X,leaveDelay:1e3,children:(0,n.jsx)(Ut.A,{style:{color:"inherit",position:"absolute"},className:"md-clipboard md-icon",onClick:W,children:(0,n.jsx)(Cs,{})})})},Ss=f=>I=>{const U=I.querySelectorAll("pre > code");for(const $ of U){const W=$.textContent||"",X=document.createElement("div");$?.parentElement?.prepend(X),un((0,n.jsx)(ms.A,{theme:f,children:(0,n.jsx)(bs,{text:W})}),X)}return I},Os=({baseUrl:f,onClick:I})=>U=>(Array.from(U.getElementsByTagName("a")).forEach($=>{$.addEventListener("click",W=>{const st=$.getAttribute("href");st&&st.startsWith(f)&&!$.hasAttribute("download")&&(W.preventDefault(),I(W,st))})}),U),Nn=({onLoading:f,onLoaded:I})=>U=>(f(),U.addEventListener(p,function $(){I(),U.removeEventListener(p,$)}),U);function Ts(f,I){const U=new URL(I),$=`${U.origin}${U.pathname.replace(/\/$/,"")}`,W=f.replace($,"").replace(/^\/+/,""),X=new URL(`http://localhost/${W}`);return`${X.pathname}${X.search}${X.hash}`}function kn(){const f=(0,a.useRef)((0,It.Zp)()),U=(0,et.gf)(V.U).getOptionalString("app.baseUrl");return(0,a.useCallback)(W=>{let X=W;if(U)try{X=Ts(W,U)}catch{}f.current(X)},[U])}const Wn="screen and (max-width: 76.1875em)",Ps=f=>{const I=kn(),U=(0,l.A)(),$=(0,M.A)(Wn),W=Pe(),X=as(),st=(0,J.s)(),Et=(0,et.gf)(Je.s),St=(0,et.gf)(E.Y),{state:Bt,path:Dt,content:Ft}=Ue(),{"*":_t=""}=(0,It.g)(),[Ht,he]=(0,a.useState)(null),Yt=v(Ht),ge=(0,a.useCallback)(()=>{if(!Ht)return;Ht.querySelectorAll(".md-sidebar").forEach(oe=>{if($)oe.style.top="0px";else{const Re=document?.querySelector(".techdocs-reader-page")?.getBoundingClientRect().top??0;let Le=Ht.getBoundingClientRect().top??0;const rn=Ht.querySelector(".md-container > .md-tabs")?.getBoundingClientRect().height??0;Le<Re&&(Le=Re);const Ge=Math.max(Le,0)+rn;oe.style.top=`${Ge}px`;const on=Ht.querySelector(".md-container > .md-footer")?.getBoundingClientRect().top??window.innerHeight;oe.style.height=`${on-Ge}px`}oe.style.setProperty("opacity","1")})},[Ht,$]);(0,a.useEffect)(()=>(window.addEventListener("resize",ge),window.addEventListener("scroll",ge,!0),()=>{window.removeEventListener("resize",ge),window.removeEventListener("scroll",ge,!0)}),[Ht,ge]);const qt=(0,a.useCallback)(()=>{if(!Ht)return;const ne=Ht.querySelector(".md-footer");ne&&(ne.style.width=`${Ht.getBoundingClientRect().width}px`)},[Ht]);(0,a.useEffect)(()=>(window.addEventListener("resize",qt),()=>{window.removeEventListener("resize",qt)}),[Ht,qt]),(0,a.useEffect)(()=>{Yt||(qt(),ge())},[Bt,Yt,qt,ge]);const ue=(0,a.useCallback)((ne,oe)=>An(ne,[W,Dn({techdocsStorageApi:Et,entityId:f,path:oe}),cs(),ds(),us(),jn(),ps(St),X]),[f,St,Et,W,X]),re=(0,a.useCallback)(async ne=>An(ne,[$n(I,f.name),Fn(),Ss(U),Os({baseUrl:window.location.origin,onClick:(oe,ie)=>{const Re=oe.ctrlKey||oe.metaKey,Le=new URL(ie),qe=oe.target?.innerText||ie,rn=ie.replace(window.location.origin,"");st.captureEvent("click",qe,{attributes:{to:rn}}),Le.hash?Re?window.open(ie,"_blank"):(window.location.pathname!==Le.pathname?I(ie):window.history.pushState(null,document.title,Le.hash),ne?.querySelector(`[id="${Le.hash.slice(1)}"]`)?.scrollIntoView()):Re?window.open(ie,"_blank"):I(ie)}}),Nn({onLoading:()=>{},onLoaded:()=>{ne.querySelector(".md-nav__title")?.removeAttribute("for")}}),Nn({onLoading:()=>{Array.from(ne.querySelectorAll(".md-sidebar")).forEach(ie=>{ie.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[U,I,st,f.name]);return(0,a.useEffect)(()=>{if(!Ft)return()=>{};let ne=!0;return ue(Ft,Dt).then(async oe=>{if(!oe?.innerHTML||!ne||_t!==Dt)return;window.scroll({top:0});const ie=await re(oe);he(ie)}),()=>{ne=!1}},[Ft,_t,Dt,ue,re]),Ht};var bn=t(41883),Fe=t(72020),we=t(99730);const Ne=()=>{const f=(0,Fe.YR)(),{shadowRoot:I}=(0,m.V)(),U=I?.querySelector('[data-md-component="content"]'),$=I?.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let W=$?.querySelector('[data-techdocs-addons-location="primary sidebar"]');W||(W=document.createElement("div"),W.setAttribute("data-techdocs-addons-location","primary sidebar"),$?.prepend(W));const X=I?.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let st=X?.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return st||(st=document.createElement("div"),st.setAttribute("data-techdocs-addons-location","secondary sidebar"),X?.prepend(st)),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(bn.A,{container:W,children:f.renderComponentsByLocation(we.e.PrimarySidebar)}),(0,n.jsx)(bn.A,{container:U,children:f.renderComponentsByLocation(we.e.Content)}),(0,n.jsx)(bn.A,{container:st,children:f.renderComponentsByLocation(we.e.SecondarySidebar)})]})},ws=(0,x.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Kn=sn(f=>{const{withSearch:I=!0,onReady:U}=f,$=ws(),{entityMetadata:{value:W,loading:X},entityRef:st,setShadowRoot:Et}=(0,m.V)(),{state:St}=Ue(),Bt=Ps(st),Dt=window.location.pathname,Ft=window.location.hash,_t=v(Bt),[Ht]=w([`[id="${Ft.slice(1)}"]`]);(0,a.useEffect)(()=>{_t||(Ft?Ht&&Ht.scrollIntoView():document?.querySelector("header")?.scrollIntoView())},[Dt,Ft,Ht,_t]);const he=(0,a.useCallback)(Yt=>{Et(Yt),U instanceof Function&&U()},[Et,U]);return X===!1&&!W?(0,n.jsx)(F.M,{status:"404",statusMessage:"PAGE NOT FOUND"}):Bt?(0,n.jsx)(L.U,{children:(0,n.jsxs)(d.A,{container:!0,children:[(0,n.jsx)(d.A,{xs:12,item:!0,children:(0,n.jsx)(He,{})}),I&&(0,n.jsx)(d.A,{className:$.search,xs:"auto",item:!0,children:(0,n.jsx)(le,{entityId:st,entityTitle:W?.metadata?.title})}),(0,n.jsxs)(d.A,{xs:12,item:!0,children:[(St==="CHECKING"||_t)&&(0,n.jsx)(Z.k,{}),(0,n.jsx)(A,{element:Bt,onAppend:he,children:(0,n.jsx)(Ne,{})})]})]})}):(0,n.jsx)(L.U,{children:(0,n.jsx)(d.A,{container:!0,children:(0,n.jsx)(d.A,{xs:12,item:!0,children:(0,n.jsx)(He,{})})})})}),Rs=null},45061:(H,b,t)=>{"use strict";t.d(b,{T:()=>Y});var n=t(31085),a=t(14041),d=t(93285),x=t(42899),m=t(4387),h=t(13660),u=t(72020),g=t(86892),p=t(99730),y=t(67871),v=t(8859),A=t(34428),T=t(51372),P=t(58837),w=t(268),O=t(72501),j=t(72072);const F=(0,P.A)(V=>({root:{textAlign:"left"},label:{color:V.page.fontColor,fontWeight:V.typography.fontWeightBold,letterSpacing:0,fontSize:V.typography.fontSize,marginBottom:V.spacing(1)/2,lineHeight:1},value:{color:(0,w.X4)(V.page.fontColor,.8),fontSize:V.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),L=({value:V,className:at,typographyRootComponent:nt})=>(0,n.jsx)(O.A,{component:nt??(typeof V=="string"?"p":"span"),className:at,children:V});function Z(V){const{label:at,value:nt,url:gt,contentTypograpyRootComponent:bt}=V,xt=F(),ht=(0,n.jsx)(L,{className:xt.value,value:nt||"<Unknown>",typographyRootComponent:bt});return(0,n.jsx)(x.A,{item:!0,children:(0,n.jsxs)(O.A,{component:"span",className:xt.root,children:[(0,n.jsx)(O.A,{className:xt.label,children:at}),gt?(0,n.jsx)(j.N_,{to:gt,children:ht}):ht]})})}var G=t(69814),N=t(72427),Q=t(65461),q=t(9222),z=t(45250),et=t(82779);const J=(0,n.jsx)(m.A,{animation:"wave",variant:"text",height:40}),Y=V=>{const{children:at}=V,nt=(0,u.YR)(),gt=(0,N.gf)(Q.U),{title:bt,setTitle:xt,subtitle:ht,setSubtitle:ut,entityRef:At,metadata:{value:mt,loading:Pt},entityMetadata:{value:Ot,loading:jt}}=(0,g.V)();(0,a.useEffect)(()=>{mt&&(xt(mt.site_name),ut(()=>{let{site_description:vt}=mt;return(!vt||vt==="None")&&(vt=""),vt}))},[mt,xt,ut]);const Nt=gt.getOptional("app.title")||"Backstage",Ut=[bt,ht,Nt].filter(Boolean).join(" | "),{locationMetadata:pt,spec:Lt}=Ot||{},ft=Lt?.lifecycle,B=Ot?(0,y.t)(Ot,T.vv):[],k=(0,q.S)(et.rQ)(),ot=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Z,{label:(0,z.capitalize)(Ot?.kind||"entity"),value:(0,n.jsx)(v.z,{color:"inherit",entityRef:At,title:Ot?.metadata.title,defaultKind:"Component"})}),B.length>0&&(0,n.jsx)(Z,{label:"Owner",value:(0,n.jsx)(A.i,{color:"inherit",entityRefs:B,defaultKind:"group"})}),ft?(0,n.jsx)(Z,{label:"Lifecycle",value:String(ft)}):null,pt&&pt.type!=="dir"&&pt.type!=="file"?(0,n.jsx)(Z,{label:"",value:(0,n.jsxs)(x.A,{container:!0,direction:"column",alignItems:"center",children:[(0,n.jsx)(x.A,{style:{padding:0},item:!0,children:(0,n.jsx)(h.A,{style:{marginTop:"-25px"}})}),(0,n.jsx)(x.A,{style:{padding:0},item:!0,children:"Source"})]}),url:pt.target}):null]});return!jt&&Ot===void 0||!Pt&&mt===void 0?null:(0,n.jsxs)(G.Y,{type:"Documentation",typeLink:k,title:bt||J,subtitle:ht===""?void 0:ht||J,children:[(0,n.jsx)(d.A,{titleTemplate:"%s",children:(0,n.jsx)("title",{children:Ut})}),ot,at,nt.renderComponentsByLocation(p.e.Header)]})}},82779:(H,b,t)=>{"use strict";t.d(b,{Oc:()=>d,Ri:()=>x,rQ:()=>a});var n=t(34569);const a=(0,n.H)({id:"techdocs:index-page"}),d=(0,n.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),x=(0,n.H)({id:"techdocs:catalog-reader-view"})},27698:(H,b,t)=>{"use strict";t.r(b),t.d(b,{TechDocsSearchResultListItem:()=>y});var n=t(31085),a=t(14041),d=t(46423),x=t(5951),m=t(58837),h=t(72501),u=t(72072),g=t(70734);const p=(0,m.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),y=v=>{const{result:A,highlight:T,lineClamp:P=5,asListItem:w=!0,asLink:O=!0,title:j,icon:F}=v,L=p(),Z=({children:Q})=>O?(0,n.jsx)(u.N_,{noTrack:!0,to:A.location,children:Q}):(0,n.jsx)(n.Fragment,{children:Q}),G=()=>{const Q=T?.fields.title?(0,n.jsx)(g.e,{text:T.fields.title,preTag:T.preTag,postTag:T.postTag}):A.title,q=T?.fields.entityTitle?(0,n.jsx)(g.e,{text:T.fields.entityTitle,preTag:T.preTag,postTag:T.postTag}):A.entityTitle,z=T?.fields.name?(0,n.jsx)(g.e,{text:T.fields.name,preTag:T.preTag,postTag:T.postTag}):A.name;return A?(0,n.jsx)(x.A,{className:L.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,n.jsx)(Z,{children:j||(0,n.jsxs)(n.Fragment,{children:[Q," | ",q??z," docs"]})}),secondary:(0,n.jsx)(h.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:P,overflow:"hidden"},color:"textSecondary",variant:"body2",children:T?.fields.text?(0,n.jsx)(g.e,{text:T.fields.text,preTag:T.preTag,postTag:T.postTag}):A.text})}):null},N=({children:Q})=>w?(0,n.jsxs)(n.Fragment,{children:[F&&(0,n.jsx)(d.A,{children:typeof F=="function"?F(A):F}),(0,n.jsx)("div",{className:L.flexContainer,children:Q})]}):(0,n.jsx)(n.Fragment,{children:Q});return(0,n.jsx)(N,{children:(0,n.jsx)(G,{})})}},97184:(H,b,t)=>{const a=document.querySelector('meta[name="backstage-public-path"]')?.getAttribute("content");a&&(t.p=a)},86973:()=>{}},H=>{var b=n=>H(H.s=n);H.O(0,[1751,1888,5067,1678,235,6587,1975,5042,7400,4538,4121],()=>(b(97184),b(9245)));var t=H.O()}]);})();
|
|
552
552
|
|
|
553
|
-
//# sourceMappingURL=main.
|
|
553
|
+
//# sourceMappingURL=main.b66c4152.js.map
|