@techdocs/cli 1.9.4-next.1 → 1.9.4-next.2

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.
@@ -1,11 +1,11 @@
1
- (()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:(H,S,t)=>{"use strict";t.d(S,{c:()=>s});const s=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:(H,S,t)=>{"use strict";t.d(S,{P:()=>x,_P:()=>a,oQ:()=>s});const s="default",a="backstage.io/view-url",x="backstage.io/edit-url",p="kubernetes.io/api-server",b="kubernetes.io/api-server-certificate-authority",h="kubernetes.io/auth-provider"},6820:(H,S,t)=>{"use strict";t.d(S,{KU:()=>p,U2:()=>b,sM:()=>x});var s=t(72348);function a(h){let d=h.indexOf(":");const m=h.indexOf("/");m!==-1&&m<d&&(d=-1);const u=d===-1?void 0:h.slice(0,d),v=m===-1?void 0:h.slice(d+1,m),g=h.slice(Math.max(d+1,m+1));if(u===""||v===""||g==="")throw new TypeError(`Entity reference "${h}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:u,namespace:v,name:g}}function x(h){return{kind:h.kind,namespace:h.metadata.namespace||s.oQ,name:h.metadata.name}}function p(h,d){if(!h)throw new Error("Entity reference must not be empty");const m=d?.defaultKind,u=d?.defaultNamespace||s.oQ;let v,g,C;if(typeof h=="string"){const O=a(h);v=O.kind??m,g=O.namespace??u,C=O.name}else v=h.kind??m,g=h.namespace??u,C=h.name;if(v)if(g){if(!C){const O=JSON.stringify(h);throw new Error(`Entity reference ${O} had missing or empty name`)}}else{const O=JSON.stringify(h);throw new Error(`Entity reference ${O} had missing or empty namespace`)}else{const O=JSON.stringify(h);throw new Error(`Entity reference ${O} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:v,namespace:g,name:C}}function b(h){let d,m,u;return"metadata"in h?(d=h.kind,m=h.metadata.namespace??s.oQ,u=h.metadata.name):(d=h.kind,m=h.namespace??s.oQ,u=h.name),`${d.toLocaleLowerCase("en-US")}:${m.toLocaleLowerCase("en-US")}/${u.toLocaleLowerCase("en-US")}`}},51372:(H,S,t)=>{"use strict";t.d(S,{fT:()=>m,jn:()=>O,nC:()=>d,sA:()=>P,vv:()=>s});const s="ownedBy",a="ownerOf",x="consumesApi",p="apiConsumedBy",b="providesApi",h="apiProvidedBy",d="dependsOn",m="dependencyOf",u="parentOf",v="childOf",g="memberOf",C="hasMember",O="partOf",P="hasPart"},17736:(H,S,t)=>{"use strict";t.d(S,{Eo:()=>s,I4:()=>x});const s="backstage.io/managed-by-location",a="backstage.io/managed-by-origin-location",x="backstage.io/source-location"},78692:(H,S,t)=>{"use strict";t.d(S,{Cr:()=>h,KL:()=>b,aY:()=>p});var s=t(6820),a=t(17736);const x=/^[\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 p(d){if(typeof d!="string")throw new TypeError(`Unable to parse location ref '${d}', unexpected argument ${typeof d}`);const m=d.indexOf(":");if(m<0)throw new TypeError(`Unable to parse location ref '${d}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const u=d.substring(0,m).trim(),v=d.substring(m+1).trim();if(!u||!v)throw new TypeError(`Unable to parse location ref '${d}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(u==="http"||u==="https")throw new TypeError(`Invalid location ref '${d}', please prefix it with 'url:', e.g. 'url:${d}'`);if(x.test(v))throw new TypeError(`Invalid location ref '${d}', target is a javascript: URL`);return{type:u,target:v}}function b(d){const{type:m,target:u}=d;if(m){if(!u)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(x.test(u))throw new TypeError(`Invalid location ref '${m}:${u}', target is a javascript: URL`);return`${m}:${u}`}function h(d){const m=d.metadata?.annotations?.[a.I4]??d.metadata?.annotations?.[a.Eo];if(!m)throw new Error(`Entity '${(0,s.U2)(d)}' is missing location`);return p(m)}},77310:(H,S,t)=>{"use strict";t.d(S,{z:()=>m});var s=t(31085),a=t(10394),x=t(54917),p=t(69578),b=t(40697),h=t(25577),d=t(37916);function m(u){const{text:v,language:g,showLineNumbers:C=!1,highlightedNumbers:O,customStyle:P,showCopyCodeButton:B=!1}=u,L=(0,x.A)(),I=L.palette.type==="dark"?b.A:h.A,M=L.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,s.jsxs)(a.A,{position:"relative",children:[(0,s.jsx)(p.A,{customStyle:P,language:g,style:I,showLineNumbers:C,wrapLines:!0,lineNumberStyle:{color:L.palette.textVerySubtle},lineProps:$=>O?.includes($)?{style:{backgroundColor:M}}:{},children:v}),B&&(0,s.jsx)(a.A,{position:"absolute",top:0,right:0,children:(0,s.jsx)(d.l,{text:v})})]})}},37916:(H,S,t)=>{"use strict";t.d(S,{l:()=>g});var s=t(31085),a=t(72427),x=t(39837),p=t(29365),b=t(71677),h=t(99594),d=t(14041),m=t(36338),u=t(10315),v=t(87849);function g(C){const{t:O}=(0,v.i)(u.O),{text:P,tooltipDelay:B=1e3,tooltipText:L=O("copyTextButton.tooltipText"),"aria-label":I="Copy text"}=C,M=(0,a.gf)(x.m),[$,W]=(0,d.useState)(!1),[{error:X},z]=(0,m.A)();(0,d.useEffect)(()=>{X&&M.post(X)},[X,M]);const Y=K=>{K.stopPropagation(),W(!0),z(P)};return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(b.Ay,{id:"copy-test-tooltip",title:L,placement:"top",leaveDelay:B,onClose:()=>W(!1),open:$,children:(0,s.jsx)(p.A,{onClick:Y,"aria-label":I,children:(0,s.jsx)(h.A,{})})})})}},44186:(H,S,t)=>{"use strict";t.d(S,{p:()=>C});var s=t(31085),a=t(42899),x=t(58837),p=t(72501);const b=t.p+"static/missingAnnotation.67f79e98.svg",h=t.p+"static/noInformation.4b426325.svg",d=t.p+"static/createComponent.975d1e1e.svg",m=t.p+"static/noBuild.1715fa71.svg",u=(0,x.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),v=({missing:O})=>{const P=u();switch(O){case"field":return(0,s.jsx)("img",{src:b,className:P.generalImg,alt:"annotation is missing"});case"info":return(0,s.jsx)("img",{src:h,alt:"no Information",className:P.generalImg});case"content":return(0,s.jsx)("img",{src:d,alt:"create Component",className:P.generalImg});case"data":return(0,s.jsx)("img",{src:m,alt:"no Build",className:P.generalImg});default:return null}},g=(0,x.A)(O=>({root:{backgroundColor:O.palette.background.default,padding:O.spacing(2,0,0,0)},action:{marginTop:O.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function C(O){const{title:P,description:B,missing:L,action:I}=O,M=g();return(0,s.jsxs)(a.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:M.root,spacing:2,children:[(0,s.jsx)(a.A,{item:!0,xs:12,md:6,children:(0,s.jsxs)(a.A,{container:!0,direction:"column",children:[(0,s.jsx)(a.A,{item:!0,xs:!0,children:(0,s.jsx)(p.A,{variant:"h5",children:P})}),(0,s.jsx)(a.A,{item:!0,xs:!0,children:(0,s.jsx)(p.A,{variant:"body1",children:B})}),(0,s.jsx)(a.A,{item:!0,xs:!0,className:M.action,children:I})]})}),(0,s.jsx)(a.A,{item:!0,xs:12,md:6,className:M.imageContainer,children:typeof L=="string"?(0,s.jsx)(v,{missing:L}):L.customImage})]})}},22020:(H,S,t)=>{"use strict";t.d(S,{b:()=>v});var s=t(31085),a=t(58837),x=t(58007),p=t(8109),b=t(5951),h=t(37916),d=t(88640);const m=(0,a.A)(g=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:g.spacing(2)},divider:{margin:g.spacing(2)}}),{name:"BackstageErrorPanel"}),u=({error:g,message:C,stack:O,children:P})=>{const B=m();return(0,s.jsxs)(x.A,{dense:!0,children:[(0,s.jsxs)(p.A,{alignItems:"flex-start",children:[(0,s.jsx)(b.A,{classes:{secondary:B.text},primary:"Error",secondary:g}),(0,s.jsx)(h.l,{text:g})]}),(0,s.jsxs)(p.A,{alignItems:"flex-start",children:[(0,s.jsx)(b.A,{classes:{secondary:B.text},primary:"Message",secondary:C}),(0,s.jsx)(h.l,{text:C})]}),O&&(0,s.jsxs)(p.A,{alignItems:"flex-start",children:[(0,s.jsx)(b.A,{classes:{secondary:B.text},primary:"Stack Trace",secondary:O}),(0,s.jsx)(h.l,{text:O})]}),P]})};function v(g){const{title:C,error:O,defaultExpanded:P,titleFormat:B,children:L}=g;return(0,s.jsx)(d.B,{severity:"error",title:C??O.message,defaultExpanded:P,titleFormat:B,children:(0,s.jsx)(u,{error:O.name,message:O.message,stack:O.stack,children:L})})}},18956:(H,S,t)=>{"use strict";t.d(S,{m:()=>h});var s=t(31085),a=t(72501),x=t(58837),p=t(31129);const b=(0,x.A)(()=>({icon:{color:"#f3ba37",cursor:"pointer",display:"inline-flex"},iconBorder:{color:"inherit",cursor:"pointer",display:"inline-flex"}}),{name:"BackstageFavoriteToggleIcon"});function h(m){const{isFavorite:u}=m,v=b();return(0,s.jsx)(a.A,{component:"span",className:u?v.icon:v.iconBorder,children:u?(0,s.jsx)(p.Gg,{}):(0,s.jsx)(p.KG,{})})}function d(m){const{id:u,title:v,isFavorite:g,onToggle:C,...O}=m;return _jsx(Tooltip,{id:u,title:v,children:_jsx(IconButton,{"aria-label":v,id:u,onClick:()=>C(!g),color:"inherit",...O,children:_jsx(h,{isFavorite:g})})})}},72072:(H,S,t)=>{"use strict";t.d(S,{N_:()=>Q});var s=t(31085),a=t(82266),x=t(72427),p=t(65461),b=t(93368),h=t(49203),d=t(58837),m=t(72501),u=t(53373),v=t.n(u),g=t(45250),C=t.n(g),O=t(14041),P=t(18690),B=t(73657),L=t(39330);function I(){const[J]=(0,P.AV)((0,s.jsx)(P.qh,{index:!0,element:(0,s.jsx)("div",{})}));return!J.index}const M=(0,d.A)(J=>({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:J.spacing(.5)}}),{name:"Link"}),$=()=>{const ct=(0,a.n)().getSystemIcon("externalLink")||L.A,pt=M();return(0,s.jsx)(ct,{className:pt.externalLinkIcon})},W=J=>/^([a-z+.-]+):/.test(J),X=/^[\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,z=window.open;if(z&&!z.__backstage){const J=function(...pt){const yt=String(pt[0]);if(X.test(yt))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return z.apply(this,pt)};J.__backstage=!0,window.open=J}const Y=()=>{try{return(0,x.gf)(p.U).getOptionalString("app.baseUrl")}catch{return}},K=()=>{const J="http://sample.dev",ct=Y()??"/",{pathname:pt}=new URL(ct,J);return(0,g.trimEnd)(pt,"/")},dt=J=>{let ct=String(J);const pt=K(),yt=W(ct),At=ct.startsWith(pt);return!yt&&!At&&(ct=pt.concat(ct)),ct},G=J=>J instanceof Array?J.map(G).join(" ").trim():typeof J=="object"&&J?G(J?.props?.children):["string","number"].includes(typeof J)?String(J):"",Q=(0,O.forwardRef)(({onClick:J,noTrack:ct,externalLinkIcon:pt,...yt},At)=>{const Ot=M(),It=(0,b.s)(),ut=I()?dt(yt.to):yt.to,lt=G(yt.children)||ut,xt=W(ut),gt=xt&&!!/^https?:/.exec(ut);if(X.test(ut))throw new Error("Link component rejected javascript: URL as a security precaution");const bt=Rt=>{J?.(Rt),ct||It.captureEvent("click",lt,{attributes:{to:ut}})};return xt?(0,s.jsxs)(h.A,{...gt?{target:"_blank",rel:"noopener"}:{},...yt,...yt["aria-label"]?{"aria-label":`${yt["aria-label"]}, Opens in a new window`}:{},ref:At,href:ut,onClick:bt,className:v()(Ot.externalLink,yt.className),children:[yt.children,pt&&(0,s.jsx)($,{}),(0,s.jsx)(m.A,{component:"span",className:Ot.visuallyHidden,children:", Opens in a new window"})]}):(0,s.jsx)(h.A,{...yt,ref:At,component:B.N_,to:ut,onClick:bt})})},73896:(H,S,t)=>{"use strict";t.d(S,{z:()=>h});var s=t(31085),a=t(64947),x=t(14041),p=t(72072);const b=(0,x.forwardRef)((m,u)=>(0,s.jsx)(p.N_,{ref:u,...m,color:"initial"})),h=(0,x.forwardRef)((m,u)=>(0,s.jsx)(a.A,{ref:u,component:b,...m})),d=null},4650:(H,S,t)=>{"use strict";t.d(S,{h:()=>g});var s=t(31085),a=t(58837),x=t(45872),p=t(61125),b=t(14041),h=t(77310);const d=(0,a.A)(C=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${C.palette.border}`},"& th, & td":{border:`1px solid ${C.palette.border}`,padding:C.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:C.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:C.palette.background.paper},"& tr":{backgroundColor:C.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:C.palette.background.default},"& a":{color:C.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),m=(C,O)=>O?typeof O=="string"?C+O:b.Children.toArray(O.props.children).reduce(m,C):C,u=({level:C,children:O})=>{const L=b.Children.toArray(O).reduce(m,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return(0,b.createElement)(`h${C}`,{id:L},O)},v={code:({inline:C,className:O,children:P,...B})=>{const L=String(P).replace(/\n+$/,""),I=/language-(\w+)/.exec(O||"");return!C&&I?(0,s.jsx)(h.z,{language:I[1],text:L}):(0,s.jsx)("code",{className:O,...B,children:P})},h1:u,h2:u,h3:u,h4:u,h5:u,h6:u};function g(C){const{content:O,dialect:P="gfm",linkTarget:B,transformLinkUri:L,transformImageUri:I,className:M}=C,$=d();return(0,s.jsx)(x.$,{remarkPlugins:P==="gfm"?[p.A]:[],className:`${$.markdown} ${M??""}`.trim(),children:O,components:v,linkTarget:B,transformLinkUri:L,transformImageUri:I})}},68146:(H,S,t)=>{"use strict";t.d(S,{k:()=>h});var s=t(31085),a=t(10394),x=t(88951),p=t(54917),b=t(14041);function h(d){const m=(0,p.A)(),[u,v]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{const g=setTimeout(()=>v(!0),m.transitions.duration.short);return()=>clearTimeout(g)},[m.transitions.duration.short]),u?(0,s.jsx)(x.A,{...d,"data-testid":"progress"}):(0,s.jsx)(a.A,{display:"none","data-testid":"progress"})}},66917:(H,S,t)=>{"use strict";t.d(S,{w:()=>dt});var s=t(31085),a=t(10394),x=t(69076),p=t(67720),b=t(95061),h=t(41857),d=t(48543),m=t(26343),u=t(81215),v=t(87051),g=t(12398),C=t(58837),O=t(72501),P=t(92399),B=t(14041),L=t(10437);const I=(0,C.A)(G=>(0,g.A)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"}),$=()=>{const G=I();return(0,s.jsx)(L.A,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"currentColor"})})},W=(0,C.A)(G=>(0,g.A)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"}),z=()=>{const G=W();return(0,s.jsx)(L.A,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"currentColor"})})},Y=(0,v.A)(G=>(0,g.A)({root:{"label + &":{marginTop:G.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:G.palette.primary.main}},input:{borderRadius:G.shape.borderRadius,position:"relative",backgroundColor:G.palette.background.paper,border:"1px solid #ced4da",fontSize:G.typography.body1.fontSize,padding:G.spacing(1.25,3.25,1.25,1.5),transition:G.transitions.create(["border-color","box-shadow"]),"&:focus":{background:G.palette.background.paper,borderRadius:G.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(h.A),K=(0,C.A)(G=>(0,g.A)({formControl:{margin:G.spacing(1,0)},label:{transform:"initial",fontWeight:"bold",fontSize:G.typography.body2.fontSize,fontFamily:G.typography.fontFamily,color:G.palette.text.primary,"&.Mui-focused":{color:G.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:G.typography.body2.fontSize,fontFamily:G.typography.fontFamily,color:G.palette.text.primary,"&.Mui-focused":{color:G.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function dt(G){const{multiple:Q,items:J,label:ct,placeholder:pt,selected:yt,onChange:At,triggerReset:Ot,native:It=!1,disabled:ut=!1,margin:lt,"data-testid":xt="select"}=G,gt=K(),[bt,Rt]=(0,B.useState)(yt||(Q?[]:"")),[it,ft]=(0,B.useState)(!1);(0,B.useEffect)(()=>{Rt(Q?[]:"")},[Ot,Q]),(0,B.useEffect)(()=>{Rt(yt||(Q?[]:""))},[yt,Q]);const vt=U=>{Rt(U.target.value),At(U.target.value)},st=U=>{if(ut){U.preventDefault();return}ft(V=>Q&&!(U.target instanceof HTMLElement)?!0:!V)},Et=()=>{ft(!1)},at=U=>()=>{const V=bt.filter(rt=>rt!==U);Rt(V),At(V)};return(0,s.jsx)(a.A,{className:gt.root,children:(0,s.jsxs)(b.A,{className:gt.formControl,children:[(0,s.jsx)(d.A,{className:gt.formLabel,children:ct}),(0,s.jsxs)(u.A,{"aria-label":ct,value:bt,native:It,disabled:ut,"data-testid":xt,displayEmpty:!0,multiple:Q,margin:lt,onChange:vt,open:it,onOpen:st,onClose:Et,input:(0,s.jsx)(Y,{}),label:ct,renderValue:U=>Q&&bt.length!==0?(0,s.jsx)(a.A,{className:gt.chips,children:U.map(V=>{const rt=J.find(Ct=>Ct.value===V);return rt?(0,s.jsx)(p.A,{"data-testid":"chip",label:rt?.label,clickable:!0,deleteIcon:(0,s.jsx)(P.A,{"data-testid":"cancel-icon",onMouseDown:Ct=>Ct.stopPropagation()}),onDelete:at(V),className:gt.chip},rt?.value):!1})}):(0,s.jsx)(O.A,{children:bt.length===0?pt||"":J.find(V=>V.value===U)?.label}),IconComponent:()=>it?(0,s.jsx)(z,{}):(0,s.jsx)($,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[!!pt&&!Q&&(0,s.jsx)(m.A,{value:[],children:pt}),It?J&&J.map(U=>(0,s.jsx)("option",{value:U.value,children:U.label},U.value)):J&&J.map(U=>(0,s.jsxs)(m.A,{value:U.value,children:[Q&&(0,s.jsx)(x.A,{color:"primary",checked:bt.includes(U.value)||!1,className:gt.checkbox}),U.label]},U.value))]})]})})}},27586:(H,S,t)=>{"use strict";t.d(S,{Y:()=>Q});var s=t(31085),a=t(82266),x=t(72427),p=t(65461),b=t(10394),h=t(64947),d=t(93453),m=t(29365),u=t(68804),v=t(5951),g=t(26343),C=t(28233),O=t(55197),P=t(58837),B=t(72501),L=t(5893),I=t(14041),M=t(10795),$=t(31129),W=t(72072),X=t(10315),z=t(87849);const Y=(0,P.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),K=({icon:J})=>{const ct=(0,a.n)(),pt=J?ct.getSystemIcon(J)??$.NT:$.NT;return(0,s.jsx)(pt,{})},dt=({link:J})=>(0,s.jsx)(W.N_,{to:J.url,children:J.title??J.url}),G=({item:J})=>(0,s.jsxs)(g.A,{button:!1,children:[(0,s.jsx)(u.A,{children:(0,s.jsx)(K,{icon:J.icon})}),(0,s.jsx)(v.A,{primary:J.title,secondary:J.links?.reduce((ct,pt,yt)=>[...ct,yt>0&&(0,s.jsx)("br",{},yt),(0,s.jsx)(dt,{link:pt},pt.url)],[])})]});function Q(J){const{t:ct}=(0,z.i)(X.O),{title:pt,items:yt,children:At}=J,{items:Ot}=(0,M.l)(),[It,ut]=(0,I.useState)(!1),[lt,xt]=(0,I.useState)(null),gt=Y(),bt=(0,x.gf)(p.U).getOptionalConfig("app.support"),Rt=(0,L.A)(vt=>vt.breakpoints.down("sm")),it=vt=>{xt(vt.currentTarget),ut(!0)},ft=()=>{ut(!1)};return bt?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b.A,{display:"flex",ml:1,children:Rt?(0,s.jsx)(m.A,{color:"primary",size:"small",onClick:it,"data-testid":"support-button","aria-label":"Support",children:(0,s.jsx)($.NT,{})}):(0,s.jsx)(h.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:it,startIcon:(0,s.jsx)($.NT,{}),children:ct("supportButton.title")})}),(0,s.jsxs)(O.Ay,{"data-testid":"support-button-popover",open:It,anchorEl:lt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:ft,children:[(0,s.jsxs)(C.A,{className:gt.popoverList,autoFocusItem:!!lt,children:[pt&&(0,s.jsx)(g.A,{button:!1,alignItems:"flex-start",className:gt.menuItem,children:(0,s.jsx)(B.A,{variant:"subtitle1",children:pt})}),I.Children.map(At,(vt,st)=>(0,s.jsx)(g.A,{button:!1,alignItems:"flex-start",className:gt.menuItem,children:vt},`child-${st}`)),(yt??Ot).map((vt,st)=>(0,s.jsx)(G,{item:vt},`item-${st}`))]}),(0,s.jsx)(d.A,{children:(0,s.jsx)(h.A,{color:"primary",onClick:ft,"aria-label":"Close",children:ct("supportButton.close")})})]})]}):null}},14209:(H,S,t)=>{"use strict";t.d(S,{X:()=>st});var s=t(31085),a=t(87849),x=t(25301),p=t(10394),b=t(29365),h=t(87051),d=t(58837),m=t(54917),u=t(72501),v=t(83313),g=t(89019),C=t(62461),O=t(68887),P=t(63798),B=t(64704),L=t(6774),I=t(75625),M=t(65859),$=t(45917),W=t(5416),X=t(33494),z=t(80113),Y=t(26229),K=t(46802),dt=t(45250),G=t(14041),Q=t(10315),J=t(64947),ct=t(66917);const pt=(0,d.A)(U=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:U.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:U.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${U.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:U.spacing(2)}}}),{name:"BackstageTableFilters"}),yt=U=>{const V=pt(),{onChangeFilters:rt}=U,{t:Ct}=(0,a.i)(Q.O),[ht,Bt]=(0,G.useState)({...U.selectedFilters}),[Nt,Kt]=(0,G.useState)(!1),Jt=()=>{Bt({}),Kt(kt=>!kt)};return(0,G.useEffect)(()=>{rt(ht)},[ht,rt]),(0,s.jsxs)(p.A,{className:V.root,children:[(0,s.jsxs)(p.A,{className:V.header,children:[(0,s.jsx)(p.A,{className:V.value,children:Ct("table.filter.title")}),(0,s.jsx)(J.A,{color:"primary",onClick:Jt,children:Ct("table.filter.clearAll")})]}),(0,s.jsx)(p.A,{className:V.filters,children:U.filters?.length&&U.filters.map(kt=>(0,s.jsx)(ct.w,{triggerReset:Nt,...kt.element,selected:ht[kt.element.label],onChange:Vt=>Bt({...ht,[kt.element.label]:Vt})},kt.element.label))})]})};var At=t(78467);function Ot(U){return(0,s.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:U.colSpan,children:(0,s.jsx)(p.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,s.jsx)(At.A,{size:"5rem"})})})})})}const It={Add:(0,G.forwardRef)((U,V)=>(0,s.jsx)(v.A,{...U,ref:V})),Check:(0,G.forwardRef)((U,V)=>(0,s.jsx)(C.A,{...U,ref:V})),Clear:(0,G.forwardRef)((U,V)=>(0,s.jsx)(B.A,{...U,ref:V})),Delete:(0,G.forwardRef)((U,V)=>(0,s.jsx)(L.A,{...U,ref:V})),DetailPanel:(0,G.forwardRef)((U,V)=>(0,s.jsx)(P.A,{...U,ref:V})),Edit:(0,G.forwardRef)((U,V)=>(0,s.jsx)(I.A,{...U,ref:V})),Export:(0,G.forwardRef)((U,V)=>(0,s.jsx)(Y.A,{...U,ref:V})),Filter:(0,G.forwardRef)((U,V)=>(0,s.jsx)(M.A,{...U,ref:V})),FirstPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(W.A,{...U,ref:V})),LastPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(X.A,{...U,ref:V})),NextPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(P.A,{...U,ref:V})),PreviousPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(O.A,{...U,ref:V})),ResetSearch:(0,G.forwardRef)((U,V)=>(0,s.jsx)(B.A,{...U,ref:V})),Search:(0,G.forwardRef)((U,V)=>(0,s.jsx)($.A,{...U,ref:V})),SortArrow:(0,G.forwardRef)((U,V)=>(0,s.jsx)(g.A,{...U,ref:V})),ThirdStateCheck:(0,G.forwardRef)((U,V)=>(0,s.jsx)(z.A,{...U,ref:V})),ViewColumn:(0,G.forwardRef)((U,V)=>(0,s.jsx)(K.A,{...U,ref:V}))};function ut(U,V){const rt=V.split(".");let Ct=U[rt[0]];for(let ht=1;ht<rt.length;++ht){if(Ct===void 0)return Ct;const Bt=rt[ht];Ct=Ct[Bt]}return Ct}const lt=(0,h.A)(U=>({header:{padding:U.spacing(1,2,1,2.5),borderTop:`1px solid ${U.palette.grey.A100}`,borderBottom:`1px solid ${U.palette.grey.A100}`,fontWeight:U.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(x.rV),xt=(0,h.A)(U=>({root:{padding:U.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:U.typography.fontWeightBold}},searchField:{paddingRight:U.spacing(2)}}),{name:"BackstageTableToolbar"})(x.Nb),gt=(0,d.A)(U=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:U.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),bt=(0,d.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Rt(U,V){return U.map(rt=>{const Ct=rt.headerStyle??{};let ht=rt.cellStyle||{};if(rt.highlight)if(Ct.color=V.palette.textContrast,typeof ht=="object")ht.fontWeight=V.typography.fontWeightBold;else{const Bt=ht;ht=(Nt,Kt,Jt)=>({...Bt(Nt,Kt,Jt),fontWeight:V.typography.fontWeightBold})}return{...rt,headerStyle:Ct,cellStyle:ht}})}function it(U,V){return(0,dt.transform)(U,(rt,Ct,ht)=>{(0,dt.isEqual)(Ct,V[ht])||(rt[ht]=Ct)})}const ft={search:"",filtersOpen:!1,filters:{}};function vt(U){const{toolbarRef:V,setSearch:rt,hasFilters:Ct,selectedFiltersLength:ht,toggleFilters:Bt}=U,{t:Nt}=(0,a.i)(Q.O),Kt=gt(),Jt=(0,G.useCallback)(kt=>{U.onSearchChanged(kt),rt(kt)},[U,rt]);return Ct?(0,s.jsxs)(p.A,{className:Kt.root,children:[(0,s.jsxs)(p.A,{className:Kt.root,children:[(0,s.jsx)(b.A,{onClick:Bt,"aria-label":"filter list",children:(0,s.jsx)(M.A,{})}),(0,s.jsxs)(u.A,{className:Kt.title,children:[Nt("table.filter.title")," (",ht,")"]})]}),(0,s.jsx)(xt,{...U,ref:V,onSearchChanged:Jt})]}):(0,s.jsx)(xt,{...U,ref:V,onSearchChanged:Jt})}function st(U){const{data:V,columns:rt,emptyContent:Ct,options:ht,title:Bt,subtitle:Nt,localization:Kt,filters:Jt,initialState:kt,onStateChange:Vt,components:jt,isLoading:Gt,style:ie,...ue}=U,{t:zt}=(0,a.i)(Q.O),ne=bt(),ce=(0,m.A)(),Ye={...ft,...kt},[ee,on]=(0,G.useState)(Ye.filtersOpen),We=(0,G.useCallback)(()=>on(be=>!be),[on]),[Re,Ve]=(0,G.useState)(Ye.filters),[se,qe]=(0,G.useState)(Ye.search);(0,G.useEffect)(()=>{if(Vt){const be=it({search:se,filtersOpen:ee,filters:Re},ft);Vt(be)}},[se,ee,Re,Vt]);const tn=(0,G.useCallback)(be=>rt.find(Qe=>Qe.title===be)?.field,[rt]),hn=(0,G.useMemo)(()=>{if(typeof V=="function"||!Re)return V;const be=Object.values(Re);return V&&be.flat().length?V.filter(Ze=>!!Object.entries(Re).filter(([,je])=>!!je.length).every(([je,Ue])=>{const Le=ut(Ze,tn(je));return Array.isArray(Le)&&Array.isArray(Ue)?Le.some(an=>Ue.includes(an)):Array.isArray(Le)?Le.includes(Ue):Array.isArray(Ue)?Ue.includes(Le):Le===Ue})):V},[V,Re,tn]),en=Object.values(Re).flat().length,nn=!!Jt?.length,pn=(0,G.useCallback)(be=>(0,s.jsx)(vt,{setSearch:qe,hasFilters:nn,selectedFiltersLength:en,toggleFilters:We,...be}),[We,nn,en,qe]),Ke=typeof V!="function"&&V.length===0,ze=rt.length,He=(0,G.useMemo)(()=>Et({hasNoRows:Ke,emptyContent:Ct,columnCount:ze,loading:Gt}),[Ke,Ct,ze,Gt]);return(0,s.jsxs)(p.A,{className:ne.root,children:[ee&&V&&typeof V!="function"&&Jt?.length&&(0,s.jsx)(yt,{filters:at(Jt,V,rt,zt),selectedFilters:Re,onChangeFilters:Ve}),(0,s.jsx)(x.Ay,{components:{Header:lt,Body:He,Toolbar:pn,...jt},options:ht,columns:Rt(rt,ce),icons:It,title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.A,{variant:"h5",component:"h2",children:Bt}),Nt&&(0,s.jsx)(u.A,{color:"textSecondary",variant:"body1",children:Nt})]}),data:hn,style:{width:"100%",...ie},localization:{...Kt,body:{emptyDataSourceMessage:zt("table.body.emptyDataSourceMessage"),...Kt?.body},pagination:{firstTooltip:zt("table.pagination.firstTooltip"),labelDisplayedRows:zt("table.pagination.labelDisplayedRows"),labelRowsSelect:zt("table.pagination.labelRowsSelect"),lastTooltip:zt("table.pagination.lastTooltip"),nextTooltip:zt("table.pagination.nextTooltip"),previousTooltip:zt("table.pagination.previousTooltip"),...Kt?.pagination},toolbar:{searchPlaceholder:zt("table.toolbar.search"),searchTooltip:zt("table.toolbar.search"),...Kt?.toolbar}},...ue})]})}st.icons=Object.freeze(It);function Et({columnCount:U,emptyContent:V,hasNoRows:rt,loading:Ct}){return ht=>Ct?(0,s.jsx)(Ot,{colSpan:U}):V&&rt?(0,s.jsx)("tbody",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:U,children:V})})}):(0,s.jsx)(x.C6,{...ht})}function at(U,V,rt,Ct){const ht=Nt=>{const Kt=new Set,Jt=kt=>{kt!=null&&Kt.add(kt)};return V&&V.forEach(kt=>{const Vt=ut(kt,rt.find(jt=>jt.title===Nt)?.field);Array.isArray(Vt)?Vt.forEach(Jt):Jt(Vt)}),Kt},Bt=Nt=>({placeholder:Ct("table.filter.placeholder"),label:Nt.column,multiple:Nt.type==="multiple-select",items:[...ht(Nt.column)].sort().map(Kt=>({label:Kt,value:Kt}))});return U.map(Nt=>({type:Nt.type,element:Bt(Nt)}))}},88640:(H,S,t)=>{"use strict";t.d(S,{B:()=>$});var s=t(31085),a=t(268),x=t(58837),p=t(8973),b=t(29655),h=t(91567),d=t(42899),m=t(72501),u=t(9181),v=t(6924),g=t(4650);const C=(W,X)=>(X.palette.type==="light"?a.e$:a.a)(X.palette[W].light,.6),O=(W,X)=>(X.palette.type==="light"?a.a:a.e$)(X.palette[W].light,.9),P=(0,x.A)(W=>({root:{marginRight:W.spacing(1),fill:({severity:X})=>C(X,W)}})),B=({severity:W})=>{const X=P({severity:W});return(0,s.jsx)(u.A,{classes:X})},L=({severity:W})=>{const X=P({severity:W});return(0,s.jsx)(v.A,{classes:X})},I=(0,x.A)(W=>({panel:{backgroundColor:({severity:X})=>O(X,W),color:({severity:X})=>C(X,W),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:X})=>C(X,W),fontWeight:W.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:X})=>C(X,W),backgroundColor:({severity:X})=>O(X,W)},details:{width:"100%",display:"block",color:W.palette.textContrast,backgroundColor:W.palette.background.default,border:`1px solid ${W.palette.border}`,padding:W.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),M=W=>W.charAt(0).toLocaleUpperCase("en-US")+W.slice(1);function $(W){const{severity:X="warning",title:z,titleFormat:Y,message:K,children:dt,defaultExpanded:G}=W,Q=I({severity:X}),J=M(X)+(z?`: ${z}`:"");return(0,s.jsxs)(p.A,{defaultExpanded:G??!1,className:Q.panel,role:"alert",children:[(0,s.jsxs)(b.A,{expandIcon:(0,s.jsx)(L,{severity:X}),className:Q.summary,children:[(0,s.jsx)(B,{severity:X}),(0,s.jsx)(m.A,{className:Q.summaryText,variant:"subtitle1",children:Y==="markdown"?(0,s.jsx)(g.h,{content:J,className:Q.markdownContent}):J})]}),(K||dt)&&(0,s.jsx)(h.A,{children:(0,s.jsxs)(d.A,{container:!0,children:[K&&(0,s.jsx)(d.A,{item:!0,xs:12,children:(0,s.jsx)(m.A,{className:Q.message,variant:"body1",children:K})}),dt&&(0,s.jsx)(d.A,{item:!0,xs:12,className:Q.details,children:dt})]})})]})}},10795:(H,S,t)=>{"use strict";t.d(S,{l:()=>h});var s=t(72427),a=t(65461),x=t(10315),p=t(87849);const b=()=>{const{t:d}=(0,p.i)(x.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:d("supportConfig.default.title"),icon:"warning",links:[{title:d("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}};function h(){const u=(0,s.Q2)().get(a.U)?.getOptionalConfig("app.support"),v=b();return u?{url:u.getString("url"),items:u.getConfigArray("items").flatMap(g=>({title:g.getString("title"),icon:g.getOptionalString("icon"),links:(g.getOptionalConfigArray("links")??[]).flatMap(C=>({url:C.getString("url"),title:C.getOptionalString("title")??""}))}))}:v}},31129:(H,S,t)=>{"use strict";t.d(S,{Gg:()=>L,KG:()=>I,NT:()=>O,z9:()=>p});var s=t(31085),a=t(82266),x=t(27799);function p(M){const{id:$,Fallback:W=x.A,...X}=M,Y=(0,a.n)().getSystemIcon($)??W;return(0,s.jsx)(Y,{...X})}function b(M){return _jsx(p,{id:"brokenImage",...M})}function h(M){return _jsx(p,{id:"catalog",...M})}function d(M){return _jsx(p,{id:"chat",...M})}function m(M){return _jsx(p,{id:"dashboard",...M})}function u(M){return _jsx(p,{id:"docs",...M})}function v(M){return _jsx(p,{id:"email",...M})}function g(M){return _jsx(p,{id:"github",...M})}function C(M){return _jsx(p,{id:"group",...M})}function O(M){return(0,s.jsx)(p,{id:"help",...M})}function P(M){return _jsx(p,{id:"user",...M})}function B(M){return _jsx(p,{id:"warning",...M})}function L(M){return(0,s.jsx)(p,{id:"star",...M})}function I(M){return(0,s.jsx)(p,{id:"unstarred",...M})}},26280:(H,S,t)=>{"use strict";t.d(S,{U:()=>h});var s=t(31085),a=t(58837),x=t(53373),p=t.n(x);const b=(0,a.A)(d=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:d.spacing(3),paddingBottom:d.spacing(3),paddingLeft:d.spacing(2),paddingRight:d.spacing(2),[d.breakpoints.up("sm")]:{paddingLeft:d.spacing(3),paddingRight:d.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function h(d){const{className:m,stretch:u,noPadding:v,children:g,...C}=d,O=b();return(0,s.jsx)("article",{...C,className:p()(O.root,m,{[O.stretch]:u,[O.noPadding]:v}),children:g})}},59428:(H,S,t)=>{"use strict";t.d(S,{d:()=>u});var s=t(31085),a=t(10394),x=t(58837),p=t(72501),b=t(93285);const h=v=>(0,x.A)(g=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:g.spacing(2),textAlign:v.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:g.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),d=({title:v,className:g})=>(0,s.jsx)(p.A,{variant:"h4",component:"h2",className:g,"data-testid":"header-title",children:v}),m=({description:v,className:g})=>v?(0,s.jsx)(p.A,{variant:"body2",className:g,"data-testid":"header-description",children:v}):null;function u(v){const{description:g,title:C,titleComponent:O=void 0,children:P,descriptionComponent:B=void 0,textAlign:L="left"}=v,I=h({textAlign:L})(),M=O||(0,s.jsx)(d,{title:C,className:I.title}),$=B||(0,s.jsx)(m,{description:g,className:I.description});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b.m,{title:C}),(0,s.jsxs)(a.A,{className:I.container,children:[(0,s.jsxs)(a.A,{className:I.leftItemsBox,children:[M,$]}),(0,s.jsx)(a.A,{className:I.rightItemsBox,children:P})]})]})}},12173:(H,S,t)=>{"use strict";t.d(S,{M:()=>M});var s=t(31085),a=t(42899),x=t(58837),p=t(72501),b=t(18690),h=t(72072),d=t(10795);const m=t.p+"static/mic-drop.fe3ef4d0.svg",u=(0,x.A)($=>({micDrop:{maxWidth:"60%",bottom:$.spacing(2),right:$.spacing(2),[$.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:$.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),v=()=>{const $=u();return(0,s.jsx)("img",{src:m,className:$.micDrop,alt:"Girl dropping mic from her hands"})};var g=t(14041),C=t(77310),O=t(87849),P=t(10315);const B=(0,x.A)($=>({title:{paddingBottom:$.spacing(5),[$.breakpoints.down("xs")]:{paddingBottom:$.spacing(4),fontSize:$.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function L($){const{stack:W}=$,X=B(),{t:z}=(0,O.i)(P.O),[Y,K]=(0,g.useState)(!1);return Y?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{variant:"h6",className:X.title,children:(0,s.jsx)(h.N_,{to:"#",onClick:()=>K(!1),children:z("errorPage.showLessDetails")})}),(0,s.jsx)(C.z,{text:W,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,s.jsx)(p.A,{variant:"h6",className:X.title,children:(0,s.jsx)(h.N_,{to:"#",onClick:()=>K(!0),children:z("errorPage.showMoreDetails")})})}const I=(0,x.A)($=>({container:{padding:$.spacing(8),[$.breakpoints.down("xs")]:{padding:$.spacing(2)}},title:{paddingBottom:$.spacing(5),[$.breakpoints.down("xs")]:{paddingBottom:$.spacing(4),fontSize:$.typography.h3.fontSize}},subtitle:{color:$.palette.textSubtle}}),{name:"BackstageErrorPage"});function M($){const{status:W="",statusMessage:X,additionalInfo:z,supportUrl:Y,stack:K}=$,dt=I(),G=(0,b.Zp)(),Q=(0,d.l)(),{t:J}=(0,O.i)(P.O);return(0,s.jsxs)(a.A,{container:!0,className:dt.container,children:[(0,s.jsxs)(a.A,{item:!0,xs:12,sm:8,md:4,children:[(0,s.jsx)(p.A,{"data-testid":"error",variant:"body1",className:dt.subtitle,children:J("errorPage.subtitle",{status:W,statusMessage:X})}),(0,s.jsx)(p.A,{variant:"body1",className:dt.subtitle,children:z}),(0,s.jsx)(p.A,{variant:"h2",className:dt.title,children:J("errorPage.title")}),(0,s.jsxs)(p.A,{variant:"h6",className:dt.title,children:[(0,s.jsx)(h.N_,{to:"#","data-testid":"go-back-link",onClick:()=>G(-1),children:J("errorPage.goBack")}),"... or please"," ",(0,s.jsx)(h.N_,{to:Y||Q.url,children:"contact support"})," if you think this is a bug."]}),K&&(0,s.jsx)(L,{stack:K})]}),(0,s.jsx)(v,{})]})}},69814:(H,S,t)=>{"use strict";t.d(S,{Y:()=>G});var s=t(31085),a=t(72427),x=t(65461),p=t(10394),b=t(42899),h=t(58837),d=t(71677),m=t(72501),u=t(93285),v=t(72072),g=t(45634),C=t(58007),O=t(8109),P=t(55197),B=t(87051),L=t(14041);const I=(0,B.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(m.A),M=(0,B.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(p.A),$=(0,B.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(p.A);function W(Q){const{children:J,...ct}=Q,[pt,yt]=(0,L.useState)(null),At=L.Children.toArray(J),[Ot,It,...ut]=At,lt=ut.length?ut.pop():At[At.length-1],xt=At.length>3,gt=it=>{yt(it.currentTarget)},bt=()=>{yt(null)},Rt=!!pt;return(0,s.jsxs)(L.Fragment,{children:[(0,s.jsxs)(g.A,{"aria-label":"breadcrumb",...ct,children:[At.length>1&&(0,s.jsx)(M,{clone:!0,children:Ot}),At.length>2&&(0,s.jsx)(M,{clone:!0,children:It}),xt&&(0,s.jsx)(I,{onClick:gt,children:"..."}),(0,s.jsx)($,{children:lt})]}),(0,s.jsx)(P.Ay,{open:Rt,anchorEl:pt,onClose:bt,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,s.jsx)(C.A,{children:ut.map((it,ft)=>(0,s.jsx)(O.A,{button:!0,children:(0,s.jsx)(M,{clone:!0,children:it})},ft))})})]})}var X=t(73524);const z=(0,h.A)(Q=>({header:{gridArea:"pageHeader",padding:Q.spacing(3),width:"100%",boxShadow:Q.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:Q.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[Q.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:Q.page.fontColor,wordBreak:"break-word",fontSize:Q.typography.h3.fontSize,marginBottom:0},subtitle:{color:Q.page.fontColor,opacity:.8,display:"inline-block",marginTop:Q.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:Q.spacing(1),color:Q.page.fontColor},breadcrumb:{color:Q.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-Q.spacing(.3),marginBottom:Q.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-Q.spacing(.3),marginBottom:Q.spacing(.3)}}),{name:"BackstageHeader"}),Y=({type:Q,typeLink:J,classes:ct,pageTitle:pt})=>Q?J?(0,s.jsxs)(W,{className:ct.breadcrumb,children:[(0,s.jsx)(v.N_,{to:J,children:Q}),(0,s.jsx)(m.A,{children:pt})]}):(0,s.jsx)(m.A,{className:ct.type,children:Q}):null,K=({pageTitle:Q,classes:J,tooltip:ct})=>{const{contentRef:pt}=(0,X.H)(),yt=(0,s.jsx)(m.A,{ref:pt,tabIndex:-1,className:J.title,variant:"h1",children:Q});return ct?(0,s.jsx)(d.Ay,{title:ct,placement:"top-start",children:yt}):yt},dt=({classes:Q,subtitle:J})=>J?typeof J!="string"?(0,s.jsx)(s.Fragment,{children:J}):(0,s.jsx)(m.A,{className:Q.subtitle,variant:"subtitle2",component:"span",children:J}):null;function G(Q){const{children:J,pageTitleOverride:ct,style:pt,subtitle:yt,title:At,tooltip:Ot,type:It,typeLink:ut}=Q,lt=z(),gt=(0,a.gf)(x.U).getOptionalString("app.title")||"Backstage",bt=ct||At,Rt=At||ct,it=`${bt} | %s | ${gt}`,ft=`${bt} | ${gt}`;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.m,{titleTemplate:it,defaultTitle:ft}),(0,s.jsxs)("header",{style:pt,className:lt.header,children:[(0,s.jsxs)(p.A,{className:lt.leftItemsBox,children:[(0,s.jsx)(Y,{classes:lt,type:It,typeLink:ut,pageTitle:Rt}),(0,s.jsx)(K,{classes:lt,pageTitle:Rt,tooltip:Ot}),(0,s.jsx)(dt,{classes:lt,subtitle:yt})]}),(0,s.jsx)(b.A,{container:!0,className:lt.rightItemsBox,spacing:4,children:J})]})]})}},24504:(H,S,t)=>{"use strict";t.d(S,{Y:()=>d});var s=t(31085),a=t(58837),x=t(50868),p=t(53373),b=t.n(p);const h=(0,a.A)(m=>({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",[m.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function d(m){const{themeId:u,className:v,children:g}=m,C=h();return(0,s.jsx)(x.A,{theme:O=>({...O,page:O.getPageTheme({themeId:u})}),children:(0,s.jsx)("main",{className:b()(C.root,v),children:g})})}},27155:(H,S,t)=>{"use strict";t.d(S,{d:()=>p});var s=t(31085),a=t(69814),x=t(24504);function p(b){const{themeId:h,children:d,...m}=b;return(0,s.jsxs)(x.Y,{themeId:h,children:[(0,s.jsx)(a.Y,{...m}),d]})}},73524:(H,S,t)=>{"use strict";t.d(S,{G:()=>C,H:()=>O});var s=t(31085),a=t(10394),x=t(58837),p=t(5893),b=t(14041),h=t(72664),d=function(P){return P.SIDEBAR_PIN_STATE="sidebarPinState",P}(d||{});const m={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 u=t(34435);const v=(0,x.A)(P=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[P.breakpoints.up("sm")]:{paddingLeft:B=>B.isPinned?B.sidebarConfig.drawerWidthOpen:B.sidebarConfig.drawerWidthClosed},[P.breakpoints.down("xs")]:{paddingBottom:B=>B.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),g=(0,b.createContext)({content:{contentRef:void 0}});function C(P){const[B,L]=(0,b.useState)(()=>m.getSidebarPinState()),{sidebarConfig:I}=(0,b.useContext)(h.yY),M=(0,b.useRef)(null),$=(0,b.useMemo)(()=>({content:{contentRef:M}}),[M]);(0,b.useEffect)(()=>{m.setSidebarPinState(B)},[B]);const W=(0,p.A)(Y=>Y.breakpoints.down("xs"),{noSsr:!0}),X=()=>L(!B),z=v({isPinned:B,sidebarConfig:I});return(0,s.jsx)(u.qj,{value:{isPinned:B,toggleSidebarPinState:X,isMobile:W},children:(0,s.jsx)(g.Provider,{value:$,children:(0,s.jsx)(a.A,{className:z.root,children:P.children})})})}function O(){const{content:P}=(0,b.useContext)(g);return{focusContent:(0,b.useCallback)(()=>{P?.contentRef?.current?.focus()},[P]),contentRef:P?.contentRef}}},34435:(H,S,t)=>{"use strict";t.d(S,{Ut:()=>u,qj:()=>m});var s=t(31085),a=t(43836),x=t(10602),p=t(14041);const b={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},h=(0,p.createContext)(b),d=(0,a.tK)("sidebar-pin-state-context");function m(v){const{children:g,value:C}=v;return(0,s.jsx)(h.Provider,{value:C,children:(0,s.jsx)(d.Provider,{value:(0,x.B)({1:C}),children:g})})}const u=()=>{const v=(0,p.useContext)(d),g=(0,p.useContext)(h);if(v===void 0)return g||b;const C=v.atVersion(1);if(C===void 0)throw new Error("No context found for version 1.");return C}},72664:(H,S,t)=>{"use strict";t.d(S,{Rv:()=>h,U1:()=>g,hC:()=>b,i8:()=>m,yY:()=>v});var s=t(14041);const a=72,x=24,p=18,b={drawerWidthClosed:a,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:a,iconSize:a-x*2,iconPadding:x,selectedIndicatorWidth:3,userBadgePadding:p,userBadgeDiameter:a-p*2,mobileSidebarHeight:56},h=C=>({...b,...C,iconContainerWidth:b.drawerWidthClosed,iconSize:b.drawerWidthClosed-b.iconPadding*2,userBadgeDiameter:b.drawerWidthClosed-b.userBadgePadding*2}),d={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:b.defaultOpenDelayMs+200},m=C=>({...d,...C}),u="@backstage/core/sidebar-intro-dismissed",v=(0,s.createContext)({sidebarConfig:b,submenuConfig:d}),g=(0,s.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:(H,S,t)=>{"use strict";t.d(S,{O:()=>a});var s=t(93184);const a=(0,s.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,S,t)=>{"use strict";t.d(S,{c:()=>s});const s=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:(H,S,t)=>{"use strict";t.d(S,{P:()=>x,_P:()=>a,oQ:()=>s});const s="default",a="backstage.io/view-url",x="backstage.io/edit-url",p="kubernetes.io/api-server",b="kubernetes.io/api-server-certificate-authority",h="kubernetes.io/auth-provider"},6820:(H,S,t)=>{"use strict";t.d(S,{KU:()=>p,U2:()=>b,sM:()=>x});var s=t(72348);function a(h){let d=h.indexOf(":");const m=h.indexOf("/");m!==-1&&m<d&&(d=-1);const u=d===-1?void 0:h.slice(0,d),v=m===-1?void 0:h.slice(d+1,m),g=h.slice(Math.max(d+1,m+1));if(u===""||v===""||g==="")throw new TypeError(`Entity reference "${h}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:u,namespace:v,name:g}}function x(h){return{kind:h.kind,namespace:h.metadata.namespace||s.oQ,name:h.metadata.name}}function p(h,d){if(!h)throw new Error("Entity reference must not be empty");const m=d?.defaultKind,u=d?.defaultNamespace||s.oQ;let v,g,C;if(typeof h=="string"){const O=a(h);v=O.kind??m,g=O.namespace??u,C=O.name}else v=h.kind??m,g=h.namespace??u,C=h.name;if(v)if(g){if(!C){const O=JSON.stringify(h);throw new Error(`Entity reference ${O} had missing or empty name`)}}else{const O=JSON.stringify(h);throw new Error(`Entity reference ${O} had missing or empty namespace`)}else{const O=JSON.stringify(h);throw new Error(`Entity reference ${O} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:v,namespace:g,name:C}}function b(h){let d,m,u;return"metadata"in h?(d=h.kind,m=h.metadata.namespace??s.oQ,u=h.metadata.name):(d=h.kind,m=h.namespace??s.oQ,u=h.name),`${d.toLocaleLowerCase("en-US")}:${m.toLocaleLowerCase("en-US")}/${u.toLocaleLowerCase("en-US")}`}},51372:(H,S,t)=>{"use strict";t.d(S,{fT:()=>m,jn:()=>O,nC:()=>d,sA:()=>P,vv:()=>s});const s="ownedBy",a="ownerOf",x="consumesApi",p="apiConsumedBy",b="providesApi",h="apiProvidedBy",d="dependsOn",m="dependencyOf",u="parentOf",v="childOf",g="memberOf",C="hasMember",O="partOf",P="hasPart"},17736:(H,S,t)=>{"use strict";t.d(S,{Eo:()=>s,I4:()=>x});const s="backstage.io/managed-by-location",a="backstage.io/managed-by-origin-location",x="backstage.io/source-location"},78692:(H,S,t)=>{"use strict";t.d(S,{Cr:()=>h,KL:()=>b,aY:()=>p});var s=t(6820),a=t(17736);const x=/^[\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 p(d){if(typeof d!="string")throw new TypeError(`Unable to parse location ref '${d}', unexpected argument ${typeof d}`);const m=d.indexOf(":");if(m<0)throw new TypeError(`Unable to parse location ref '${d}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const u=d.substring(0,m).trim(),v=d.substring(m+1).trim();if(!u||!v)throw new TypeError(`Unable to parse location ref '${d}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(u==="http"||u==="https")throw new TypeError(`Invalid location ref '${d}', please prefix it with 'url:', e.g. 'url:${d}'`);if(x.test(v))throw new TypeError(`Invalid location ref '${d}', target is a javascript: URL`);return{type:u,target:v}}function b(d){const{type:m,target:u}=d;if(m){if(!u)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(x.test(u))throw new TypeError(`Invalid location ref '${m}:${u}', target is a javascript: URL`);return`${m}:${u}`}function h(d){const m=d.metadata?.annotations?.[a.I4]??d.metadata?.annotations?.[a.Eo];if(!m)throw new Error(`Entity '${(0,s.U2)(d)}' is missing location`);return p(m)}},77310:(H,S,t)=>{"use strict";t.d(S,{z:()=>m});var s=t(31085),a=t(10394),x=t(54917),p=t(69578),b=t(40697),h=t(25577),d=t(37916);function m(u){const{text:v,language:g,showLineNumbers:C=!1,highlightedNumbers:O,customStyle:P,showCopyCodeButton:B=!1}=u,L=(0,x.A)(),I=L.palette.type==="dark"?b.A:h.A,M=L.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,s.jsxs)(a.A,{position:"relative",children:[(0,s.jsx)(p.A,{customStyle:P,language:g,style:I,showLineNumbers:C,wrapLines:!0,lineNumberStyle:{color:L.palette.textVerySubtle},lineProps:$=>O?.includes($)?{style:{backgroundColor:M}}:{},children:v}),B&&(0,s.jsx)(a.A,{position:"absolute",top:0,right:0,children:(0,s.jsx)(d.l,{text:v})})]})}},37916:(H,S,t)=>{"use strict";t.d(S,{l:()=>g});var s=t(31085),a=t(72427),x=t(39837),p=t(29365),b=t(71677),h=t(99594),d=t(14041),m=t(36338),u=t(10315),v=t(87849);function g(C){const{t:O}=(0,v.i)(u.O),{text:P,tooltipDelay:B=1e3,tooltipText:L=O("copyTextButton.tooltipText"),"aria-label":I="Copy text"}=C,M=(0,a.gf)(x.m),[$,W]=(0,d.useState)(!1),[{error:X},z]=(0,m.A)();(0,d.useEffect)(()=>{X&&M.post(X)},[X,M]);const Y=K=>{K.stopPropagation(),W(!0),z(P)};return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(b.Ay,{id:"copy-test-tooltip",title:L,placement:"top",leaveDelay:B,onClose:()=>W(!1),open:$,children:(0,s.jsx)(p.A,{onClick:Y,"aria-label":I,children:(0,s.jsx)(h.A,{})})})})}},44186:(H,S,t)=>{"use strict";t.d(S,{p:()=>C});var s=t(31085),a=t(42899),x=t(58837),p=t(72501);const b=t.p+"static/missingAnnotation.67f79e98.svg",h=t.p+"static/noInformation.4b426325.svg",d=t.p+"static/createComponent.975d1e1e.svg",m=t.p+"static/noBuild.1715fa71.svg",u=(0,x.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),v=({missing:O})=>{const P=u();switch(O){case"field":return(0,s.jsx)("img",{src:b,className:P.generalImg,alt:"annotation is missing"});case"info":return(0,s.jsx)("img",{src:h,alt:"no Information",className:P.generalImg});case"content":return(0,s.jsx)("img",{src:d,alt:"create Component",className:P.generalImg});case"data":return(0,s.jsx)("img",{src:m,alt:"no Build",className:P.generalImg});default:return null}},g=(0,x.A)(O=>({root:{backgroundColor:O.palette.background.default,padding:O.spacing(2,0,0,0)},action:{marginTop:O.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function C(O){const{title:P,description:B,missing:L,action:I}=O,M=g();return(0,s.jsxs)(a.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:M.root,spacing:2,children:[(0,s.jsx)(a.A,{item:!0,xs:12,md:6,children:(0,s.jsxs)(a.A,{container:!0,direction:"column",children:[(0,s.jsx)(a.A,{item:!0,xs:!0,children:(0,s.jsx)(p.A,{variant:"h5",children:P})}),(0,s.jsx)(a.A,{item:!0,xs:!0,children:(0,s.jsx)(p.A,{variant:"body1",children:B})}),(0,s.jsx)(a.A,{item:!0,xs:!0,className:M.action,children:I})]})}),(0,s.jsx)(a.A,{item:!0,xs:12,md:6,className:M.imageContainer,children:typeof L=="string"?(0,s.jsx)(v,{missing:L}):L.customImage})]})}},22020:(H,S,t)=>{"use strict";t.d(S,{b:()=>v});var s=t(31085),a=t(58837),x=t(58007),p=t(8109),b=t(5951),h=t(37916),d=t(88640);const m=(0,a.A)(g=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:g.spacing(2)},divider:{margin:g.spacing(2)}}),{name:"BackstageErrorPanel"}),u=({error:g,message:C,stack:O,children:P})=>{const B=m();return(0,s.jsxs)(x.A,{dense:!0,children:[(0,s.jsxs)(p.A,{alignItems:"flex-start",children:[(0,s.jsx)(b.A,{classes:{secondary:B.text},primary:"Error",secondary:g}),(0,s.jsx)(h.l,{text:g})]}),(0,s.jsxs)(p.A,{alignItems:"flex-start",children:[(0,s.jsx)(b.A,{classes:{secondary:B.text},primary:"Message",secondary:C}),(0,s.jsx)(h.l,{text:C})]}),O&&(0,s.jsxs)(p.A,{alignItems:"flex-start",children:[(0,s.jsx)(b.A,{classes:{secondary:B.text},primary:"Stack Trace",secondary:O}),(0,s.jsx)(h.l,{text:O})]}),P]})};function v(g){const{title:C,error:O,defaultExpanded:P,titleFormat:B,children:L}=g;return(0,s.jsx)(d.B,{severity:"error",title:C??O.message,defaultExpanded:P,titleFormat:B,children:(0,s.jsx)(u,{error:O.name,message:O.message,stack:O.stack,children:L})})}},18956:(H,S,t)=>{"use strict";t.d(S,{m:()=>h});var s=t(31085),a=t(72501),x=t(58837),p=t(31129);const b=(0,x.A)(()=>({icon:{color:"#f3ba37",cursor:"pointer",display:"inline-flex"},iconBorder:{color:"inherit",cursor:"pointer",display:"inline-flex"}}),{name:"BackstageFavoriteToggleIcon"});function h(m){const{isFavorite:u}=m,v=b();return(0,s.jsx)(a.A,{component:"span",className:u?v.icon:v.iconBorder,children:u?(0,s.jsx)(p.Gg,{}):(0,s.jsx)(p.KG,{})})}function d(m){const{id:u,title:v,isFavorite:g,onToggle:C,...O}=m;return _jsx(Tooltip,{id:u,title:v,children:_jsx(IconButton,{"aria-label":v,id:u,onClick:()=>C(!g),color:"inherit",...O,children:_jsx(h,{isFavorite:g})})})}},72072:(H,S,t)=>{"use strict";t.d(S,{N_:()=>Q});var s=t(31085),a=t(82266),x=t(72427),p=t(65461),b=t(93368),h=t(49203),d=t(58837),m=t(72501),u=t(53373),v=t.n(u),g=t(45250),C=t.n(g),O=t(14041),P=t(18690),B=t(73657),L=t(39330);function I(){const[J]=(0,P.AV)((0,s.jsx)(P.qh,{index:!0,element:(0,s.jsx)("div",{})}));return!J.index}const M=(0,d.A)(J=>({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:J.spacing(.5)}}),{name:"Link"}),$=()=>{const ct=(0,a.n)().getSystemIcon("externalLink")||L.A,pt=M();return(0,s.jsx)(ct,{className:pt.externalLinkIcon})},W=J=>/^([a-z+.-]+):/.test(J),X=/^[\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,z=window.open;if(z&&!z.__backstage){const J=function(...pt){const yt=String(pt[0]);if(X.test(yt))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return z.apply(this,pt)};J.__backstage=!0,window.open=J}const Y=()=>{try{return(0,x.gf)(p.U).getOptionalString("app.baseUrl")}catch{return}},K=()=>{const J="http://sample.dev",ct=Y()??"/",{pathname:pt}=new URL(ct,J);return(0,g.trimEnd)(pt,"/")},dt=J=>{let ct=String(J);const pt=K(),yt=W(ct),At=ct.startsWith(pt);return!yt&&!At&&(ct=pt.concat(ct)),ct},G=J=>J instanceof Array?J.map(G).join(" ").trim():typeof J=="object"&&J?G(J?.props?.children):["string","number"].includes(typeof J)?String(J):"",Q=(0,O.forwardRef)(({onClick:J,noTrack:ct,externalLinkIcon:pt,...yt},At)=>{const Ot=M(),It=(0,b.s)(),ut=I()?dt(yt.to):yt.to,lt=G(yt.children)||ut,xt=W(ut),gt=xt&&!!/^https?:/.exec(ut);if(X.test(ut))throw new Error("Link component rejected javascript: URL as a security precaution");const bt=Rt=>{J?.(Rt),ct||It.captureEvent("click",lt,{attributes:{to:ut}})};return xt?(0,s.jsxs)(h.A,{...gt?{target:"_blank",rel:"noopener"}:{},...yt,...yt["aria-label"]?{"aria-label":`${yt["aria-label"]}, Opens in a new window`}:{},ref:At,href:ut,onClick:bt,className:v()(Ot.externalLink,yt.className),children:[yt.children,pt&&(0,s.jsx)($,{}),(0,s.jsx)(m.A,{component:"span",className:Ot.visuallyHidden,children:", Opens in a new window"})]}):(0,s.jsx)(h.A,{...yt,ref:At,component:B.N_,to:ut,onClick:bt})})},73896:(H,S,t)=>{"use strict";t.d(S,{z:()=>h});var s=t(31085),a=t(64947),x=t(14041),p=t(72072);const b=(0,x.forwardRef)((m,u)=>(0,s.jsx)(p.N_,{ref:u,...m,color:"initial"})),h=(0,x.forwardRef)((m,u)=>(0,s.jsx)(a.A,{ref:u,component:b,...m})),d=null},4650:(H,S,t)=>{"use strict";t.d(S,{h:()=>g});var s=t(31085),a=t(58837),x=t(45872),p=t(61125),b=t(14041),h=t(77310);const d=(0,a.A)(C=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${C.palette.border}`},"& th, & td":{border:`1px solid ${C.palette.border}`,padding:C.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:C.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:C.palette.background.paper},"& tr":{backgroundColor:C.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:C.palette.background.default},"& a":{color:C.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),m=(C,O)=>O?typeof O=="string"?C+O:b.Children.toArray(O.props.children).reduce(m,C):C,u=({level:C,children:O})=>{const L=b.Children.toArray(O).reduce(m,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return(0,b.createElement)(`h${C}`,{id:L},O)},v={code:({inline:C,className:O,children:P,...B})=>{const L=String(P).replace(/\n+$/,""),I=/language-(\w+)/.exec(O||"");return!C&&I?(0,s.jsx)(h.z,{language:I[1],text:L}):(0,s.jsx)("code",{className:O,...B,children:P})},h1:u,h2:u,h3:u,h4:u,h5:u,h6:u};function g(C){const{content:O,dialect:P="gfm",linkTarget:B,transformLinkUri:L,transformImageUri:I,className:M}=C,$=d();return(0,s.jsx)(x.$,{remarkPlugins:P==="gfm"?[p.A]:[],className:`${$.markdown} ${M??""}`.trim(),children:O,components:v,linkTarget:B,transformLinkUri:L,transformImageUri:I})}},68146:(H,S,t)=>{"use strict";t.d(S,{k:()=>h});var s=t(31085),a=t(10394),x=t(88951),p=t(54917),b=t(14041);function h(d){const m=(0,p.A)(),[u,v]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{const g=setTimeout(()=>v(!0),m.transitions.duration.short);return()=>clearTimeout(g)},[m.transitions.duration.short]),u?(0,s.jsx)(x.A,{...d,"data-testid":"progress"}):(0,s.jsx)(a.A,{display:"none","data-testid":"progress"})}},66917:(H,S,t)=>{"use strict";t.d(S,{w:()=>dt});var s=t(31085),a=t(10394),x=t(69076),p=t(67720),b=t(95061),h=t(41857),d=t(48543),m=t(26343),u=t(81215),v=t(87051),g=t(12398),C=t(58837),O=t(72501),P=t(92399),B=t(14041),L=t(10437);const I=(0,C.A)(G=>(0,g.A)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"}),$=()=>{const G=I();return(0,s.jsx)(L.A,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"currentColor"})})},W=(0,C.A)(G=>(0,g.A)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"}),z=()=>{const G=W();return(0,s.jsx)(L.A,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"currentColor"})})},Y=(0,v.A)(G=>(0,g.A)({root:{"label + &":{marginTop:G.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:G.palette.primary.main}},input:{borderRadius:G.shape.borderRadius,position:"relative",backgroundColor:G.palette.background.paper,border:"1px solid #ced4da",fontSize:G.typography.body1.fontSize,padding:G.spacing(1.25,3.25,1.25,1.5),transition:G.transitions.create(["border-color","box-shadow"]),"&:focus":{background:G.palette.background.paper,borderRadius:G.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(h.A),K=(0,C.A)(G=>(0,g.A)({formControl:{margin:G.spacing(1,0)},label:{transform:"initial",fontWeight:"bold",fontSize:G.typography.body2.fontSize,fontFamily:G.typography.fontFamily,color:G.palette.text.primary,"&.Mui-focused":{color:G.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:G.typography.body2.fontSize,fontFamily:G.typography.fontFamily,color:G.palette.text.primary,"&.Mui-focused":{color:G.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function dt(G){const{multiple:Q,items:J,label:ct,placeholder:pt,selected:yt,onChange:At,triggerReset:Ot,native:It=!1,disabled:ut=!1,margin:lt,"data-testid":xt="select"}=G,gt=K(),[bt,Rt]=(0,B.useState)(yt||(Q?[]:"")),[it,ft]=(0,B.useState)(!1);(0,B.useEffect)(()=>{Rt(Q?[]:"")},[Ot,Q]),(0,B.useEffect)(()=>{Rt(yt||(Q?[]:""))},[yt,Q]);const vt=U=>{Rt(U.target.value),At(U.target.value)},st=U=>{if(ut){U.preventDefault();return}ft(V=>Q&&!(U.target instanceof HTMLElement)?!0:!V)},Et=()=>{ft(!1)},at=U=>()=>{const V=bt.filter(rt=>rt!==U);Rt(V),At(V)};return(0,s.jsx)(a.A,{className:gt.root,children:(0,s.jsxs)(b.A,{className:gt.formControl,children:[(0,s.jsx)(d.A,{className:gt.formLabel,children:ct}),(0,s.jsxs)(u.A,{"aria-label":ct,value:bt,native:It,disabled:ut,"data-testid":xt,displayEmpty:!0,multiple:Q,margin:lt,onChange:vt,open:it,onOpen:st,onClose:Et,input:(0,s.jsx)(Y,{}),label:ct,renderValue:U=>Q&&bt.length!==0?(0,s.jsx)(a.A,{className:gt.chips,children:U.map(V=>{const rt=J.find(Ct=>Ct.value===V);return rt?(0,s.jsx)(p.A,{"data-testid":"chip",label:rt?.label,clickable:!0,deleteIcon:(0,s.jsx)(P.A,{"data-testid":"cancel-icon",onMouseDown:Ct=>Ct.stopPropagation()}),onDelete:at(V),className:gt.chip},rt?.value):!1})}):(0,s.jsx)(O.A,{children:bt.length===0?pt||"":J.find(V=>V.value===U)?.label}),IconComponent:()=>it?(0,s.jsx)(z,{}):(0,s.jsx)($,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[!!pt&&!Q&&(0,s.jsx)(m.A,{value:[],children:pt}),It?J&&J.map(U=>(0,s.jsx)("option",{value:U.value,children:U.label},U.value)):J&&J.map(U=>(0,s.jsxs)(m.A,{value:U.value,children:[Q&&(0,s.jsx)(x.A,{color:"primary",checked:bt.includes(U.value)||!1,className:gt.checkbox}),U.label]},U.value))]})]})})}},27586:(H,S,t)=>{"use strict";t.d(S,{Y:()=>Q});var s=t(31085),a=t(82266),x=t(72427),p=t(65461),b=t(10394),h=t(64947),d=t(93453),m=t(29365),u=t(68804),v=t(5951),g=t(26343),C=t(28233),O=t(55197),P=t(58837),B=t(72501),L=t(5893),I=t(14041),M=t(10795),$=t(31129),W=t(72072),X=t(10315),z=t(87849);const Y=(0,P.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),K=({icon:J})=>{const ct=(0,a.n)(),pt=J?ct.getSystemIcon(J)??$.NT:$.NT;return(0,s.jsx)(pt,{})},dt=({link:J})=>(0,s.jsx)(W.N_,{to:J.url,children:J.title??J.url}),G=({item:J})=>(0,s.jsxs)(g.A,{button:!1,children:[(0,s.jsx)(u.A,{children:(0,s.jsx)(K,{icon:J.icon})}),(0,s.jsx)(v.A,{primary:J.title,secondary:J.links?.reduce((ct,pt,yt)=>[...ct,yt>0&&(0,s.jsx)("br",{},yt),(0,s.jsx)(dt,{link:pt},pt.url)],[])})]});function Q(J){const{t:ct}=(0,z.i)(X.O),{title:pt,items:yt,children:At}=J,{items:Ot}=(0,M.l)(),[It,ut]=(0,I.useState)(!1),[lt,xt]=(0,I.useState)(null),gt=Y(),bt=(0,x.gf)(p.U).getOptionalConfig("app.support"),Rt=(0,L.A)(vt=>vt.breakpoints.down("sm")),it=vt=>{xt(vt.currentTarget),ut(!0)},ft=()=>{ut(!1)};return bt?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b.A,{display:"flex",ml:1,children:Rt?(0,s.jsx)(m.A,{color:"primary",size:"small",onClick:it,"data-testid":"support-button","aria-label":"Support",children:(0,s.jsx)($.NT,{})}):(0,s.jsx)(h.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:it,startIcon:(0,s.jsx)($.NT,{}),children:ct("supportButton.title")})}),(0,s.jsxs)(O.Ay,{"data-testid":"support-button-popover",open:It,anchorEl:lt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:ft,children:[(0,s.jsxs)(C.A,{className:gt.popoverList,autoFocusItem:!!lt,children:[pt&&(0,s.jsx)(g.A,{button:!1,alignItems:"flex-start",className:gt.menuItem,children:(0,s.jsx)(B.A,{variant:"subtitle1",children:pt})}),I.Children.map(At,(vt,st)=>(0,s.jsx)(g.A,{button:!1,alignItems:"flex-start",className:gt.menuItem,children:vt},`child-${st}`)),(yt??Ot).map((vt,st)=>(0,s.jsx)(G,{item:vt},`item-${st}`))]}),(0,s.jsx)(d.A,{children:(0,s.jsx)(h.A,{color:"primary",onClick:ft,"aria-label":"Close",children:ct("supportButton.close")})})]})]}):null}},14209:(H,S,t)=>{"use strict";t.d(S,{X:()=>st});var s=t(31085),a=t(87849),x=t(25301),p=t(10394),b=t(29365),h=t(87051),d=t(58837),m=t(54917),u=t(72501),v=t(83313),g=t(89019),C=t(62461),O=t(68887),P=t(63798),B=t(64704),L=t(6774),I=t(75625),M=t(65859),$=t(45917),W=t(5416),X=t(33494),z=t(80113),Y=t(26229),K=t(46802),dt=t(45250),G=t(14041),Q=t(10315),J=t(64947),ct=t(66917);const pt=(0,d.A)(U=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:U.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:U.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${U.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:U.spacing(2)}}}),{name:"BackstageTableFilters"}),yt=U=>{const V=pt(),{onChangeFilters:rt}=U,{t:Ct}=(0,a.i)(Q.O),[ht,Bt]=(0,G.useState)({...U.selectedFilters}),[Nt,kt]=(0,G.useState)(!1),Jt=()=>{Bt({}),kt(Wt=>!Wt)};return(0,G.useEffect)(()=>{rt(ht)},[ht,rt]),(0,s.jsxs)(p.A,{className:V.root,children:[(0,s.jsxs)(p.A,{className:V.header,children:[(0,s.jsx)(p.A,{className:V.value,children:Ct("table.filter.title")}),(0,s.jsx)(J.A,{color:"primary",onClick:Jt,children:Ct("table.filter.clearAll")})]}),(0,s.jsx)(p.A,{className:V.filters,children:U.filters?.length&&U.filters.map(Wt=>(0,s.jsx)(ct.w,{triggerReset:Nt,...Wt.element,selected:ht[Wt.element.label],onChange:Vt=>Bt({...ht,[Wt.element.label]:Vt})},Wt.element.label))})]})};var At=t(78467);function Ot(U){return(0,s.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:U.colSpan,children:(0,s.jsx)(p.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,s.jsx)(At.A,{size:"5rem"})})})})})}const It={Add:(0,G.forwardRef)((U,V)=>(0,s.jsx)(v.A,{...U,ref:V})),Check:(0,G.forwardRef)((U,V)=>(0,s.jsx)(C.A,{...U,ref:V})),Clear:(0,G.forwardRef)((U,V)=>(0,s.jsx)(B.A,{...U,ref:V})),Delete:(0,G.forwardRef)((U,V)=>(0,s.jsx)(L.A,{...U,ref:V})),DetailPanel:(0,G.forwardRef)((U,V)=>(0,s.jsx)(P.A,{...U,ref:V})),Edit:(0,G.forwardRef)((U,V)=>(0,s.jsx)(I.A,{...U,ref:V})),Export:(0,G.forwardRef)((U,V)=>(0,s.jsx)(Y.A,{...U,ref:V})),Filter:(0,G.forwardRef)((U,V)=>(0,s.jsx)(M.A,{...U,ref:V})),FirstPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(W.A,{...U,ref:V})),LastPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(X.A,{...U,ref:V})),NextPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(P.A,{...U,ref:V})),PreviousPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(O.A,{...U,ref:V})),ResetSearch:(0,G.forwardRef)((U,V)=>(0,s.jsx)(B.A,{...U,ref:V})),Search:(0,G.forwardRef)((U,V)=>(0,s.jsx)($.A,{...U,ref:V})),SortArrow:(0,G.forwardRef)((U,V)=>(0,s.jsx)(g.A,{...U,ref:V})),ThirdStateCheck:(0,G.forwardRef)((U,V)=>(0,s.jsx)(z.A,{...U,ref:V})),ViewColumn:(0,G.forwardRef)((U,V)=>(0,s.jsx)(K.A,{...U,ref:V}))};function ut(U,V){const rt=V.split(".");let Ct=U[rt[0]];for(let ht=1;ht<rt.length;++ht){if(Ct===void 0)return Ct;const Bt=rt[ht];Ct=Ct[Bt]}return Ct}const lt=(0,h.A)(U=>({header:{padding:U.spacing(1,2,1,2.5),borderTop:`1px solid ${U.palette.grey.A100}`,borderBottom:`1px solid ${U.palette.grey.A100}`,fontWeight:U.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(x.rV),xt=(0,h.A)(U=>({root:{padding:U.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:U.typography.fontWeightBold}},searchField:{paddingRight:U.spacing(2)}}),{name:"BackstageTableToolbar"})(x.Nb),gt=(0,d.A)(U=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:U.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),bt=(0,d.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Rt(U,V){return U.map(rt=>{const Ct=rt.headerStyle??{};let ht=rt.cellStyle||{};if(rt.highlight)if(Ct.color=V.palette.textContrast,typeof ht=="object")ht.fontWeight=V.typography.fontWeightBold;else{const Bt=ht;ht=(Nt,kt,Jt)=>({...Bt(Nt,kt,Jt),fontWeight:V.typography.fontWeightBold})}return{...rt,headerStyle:Ct,cellStyle:ht}})}function it(U,V){return(0,dt.transform)(U,(rt,Ct,ht)=>{(0,dt.isEqual)(Ct,V[ht])||(rt[ht]=Ct)})}const ft={search:"",filtersOpen:!1,filters:{}};function vt(U){const{toolbarRef:V,setSearch:rt,hasFilters:Ct,selectedFiltersLength:ht,toggleFilters:Bt}=U,{t:Nt}=(0,a.i)(Q.O),kt=gt(),Jt=(0,G.useCallback)(Wt=>{U.onSearchChanged(Wt),rt(Wt)},[U,rt]);return Ct?(0,s.jsxs)(p.A,{className:kt.root,children:[(0,s.jsxs)(p.A,{className:kt.root,children:[(0,s.jsx)(b.A,{onClick:Bt,"aria-label":"filter list",children:(0,s.jsx)(M.A,{})}),(0,s.jsxs)(u.A,{className:kt.title,children:[Nt("table.filter.title")," (",ht,")"]})]}),(0,s.jsx)(xt,{...U,ref:V,onSearchChanged:Jt})]}):(0,s.jsx)(xt,{...U,ref:V,onSearchChanged:Jt})}function st(U){const{data:V,columns:rt,emptyContent:Ct,options:ht,title:Bt,subtitle:Nt,localization:kt,filters:Jt,initialState:Wt,onStateChange:Vt,components:jt,isLoading:Gt,style:ce,...he}=U,{t:Kt}=(0,a.i)(Q.O),ne=bt(),le=(0,m.A)(),Ye={...ft,...Wt},[ee,on]=(0,G.useState)(Ye.filtersOpen),We=(0,G.useCallback)(()=>on(be=>!be),[on]),[Re,Ve]=(0,G.useState)(Ye.filters),[se,qe]=(0,G.useState)(Ye.search);(0,G.useEffect)(()=>{if(Vt){const be=it({search:se,filtersOpen:ee,filters:Re},ft);Vt(be)}},[se,ee,Re,Vt]);const tn=(0,G.useCallback)(be=>rt.find(Qe=>Qe.title===be)?.field,[rt]),hn=(0,G.useMemo)(()=>{if(typeof V=="function"||!Re)return V;const be=Object.values(Re);return V&&be.flat().length?V.filter(Ze=>!!Object.entries(Re).filter(([,je])=>!!je.length).every(([je,Ue])=>{const Le=ut(Ze,tn(je));return Array.isArray(Le)&&Array.isArray(Ue)?Le.some(an=>Ue.includes(an)):Array.isArray(Le)?Le.includes(Ue):Array.isArray(Ue)?Ue.includes(Le):Le===Ue})):V},[V,Re,tn]),en=Object.values(Re).flat().length,nn=!!Jt?.length,pn=(0,G.useCallback)(be=>(0,s.jsx)(vt,{setSearch:qe,hasFilters:nn,selectedFiltersLength:en,toggleFilters:We,...be}),[We,nn,en,qe]),Ke=typeof V!="function"&&V.length===0,ze=rt.length,He=(0,G.useMemo)(()=>Et({hasNoRows:Ke,emptyContent:Ct,columnCount:ze,loading:Gt}),[Ke,Ct,ze,Gt]);return(0,s.jsxs)(p.A,{className:ne.root,children:[ee&&V&&typeof V!="function"&&Jt?.length&&(0,s.jsx)(yt,{filters:at(Jt,V,rt,Kt),selectedFilters:Re,onChangeFilters:Ve}),(0,s.jsx)(x.Ay,{components:{Header:lt,Body:He,Toolbar:pn,...jt},options:ht,columns:Rt(rt,le),icons:It,title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.A,{variant:"h5",component:"h2",children:Bt}),Nt&&(0,s.jsx)(u.A,{color:"textSecondary",variant:"body1",children:Nt})]}),data:hn,style:{width:"100%",...ce},localization:{...kt,body:{emptyDataSourceMessage:Kt("table.body.emptyDataSourceMessage"),...kt?.body},pagination:{firstTooltip:Kt("table.pagination.firstTooltip"),labelDisplayedRows:Kt("table.pagination.labelDisplayedRows"),labelRowsSelect:Kt("table.pagination.labelRowsSelect"),lastTooltip:Kt("table.pagination.lastTooltip"),nextTooltip:Kt("table.pagination.nextTooltip"),previousTooltip:Kt("table.pagination.previousTooltip"),...kt?.pagination},header:{actions:Kt("table.header.actions"),...kt?.header},toolbar:{searchPlaceholder:Kt("table.toolbar.search"),searchTooltip:Kt("table.toolbar.search"),...kt?.toolbar}},...he})]})}st.icons=Object.freeze(It);function Et({columnCount:U,emptyContent:V,hasNoRows:rt,loading:Ct}){return ht=>Ct?(0,s.jsx)(Ot,{colSpan:U}):V&&rt?(0,s.jsx)("tbody",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:U,children:V})})}):(0,s.jsx)(x.C6,{...ht})}function at(U,V,rt,Ct){const ht=Nt=>{const kt=new Set,Jt=Wt=>{Wt!=null&&kt.add(Wt)};return V&&V.forEach(Wt=>{const Vt=ut(Wt,rt.find(jt=>jt.title===Nt)?.field);Array.isArray(Vt)?Vt.forEach(Jt):Jt(Vt)}),kt},Bt=Nt=>({placeholder:Ct("table.filter.placeholder"),label:Nt.column,multiple:Nt.type==="multiple-select",items:[...ht(Nt.column)].sort().map(kt=>({label:kt,value:kt}))});return U.map(Nt=>({type:Nt.type,element:Bt(Nt)}))}},88640:(H,S,t)=>{"use strict";t.d(S,{B:()=>$});var s=t(31085),a=t(268),x=t(58837),p=t(8973),b=t(29655),h=t(91567),d=t(42899),m=t(72501),u=t(9181),v=t(6924),g=t(4650);const C=(W,X)=>(X.palette.type==="light"?a.e$:a.a)(X.palette[W].light,.6),O=(W,X)=>(X.palette.type==="light"?a.a:a.e$)(X.palette[W].light,.9),P=(0,x.A)(W=>({root:{marginRight:W.spacing(1),fill:({severity:X})=>C(X,W)}})),B=({severity:W})=>{const X=P({severity:W});return(0,s.jsx)(u.A,{classes:X})},L=({severity:W})=>{const X=P({severity:W});return(0,s.jsx)(v.A,{classes:X})},I=(0,x.A)(W=>({panel:{backgroundColor:({severity:X})=>O(X,W),color:({severity:X})=>C(X,W),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:X})=>C(X,W),fontWeight:W.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:X})=>C(X,W),backgroundColor:({severity:X})=>O(X,W)},details:{width:"100%",display:"block",color:W.palette.textContrast,backgroundColor:W.palette.background.default,border:`1px solid ${W.palette.border}`,padding:W.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),M=W=>W.charAt(0).toLocaleUpperCase("en-US")+W.slice(1);function $(W){const{severity:X="warning",title:z,titleFormat:Y,message:K,children:dt,defaultExpanded:G}=W,Q=I({severity:X}),J=M(X)+(z?`: ${z}`:"");return(0,s.jsxs)(p.A,{defaultExpanded:G??!1,className:Q.panel,role:"alert",children:[(0,s.jsxs)(b.A,{expandIcon:(0,s.jsx)(L,{severity:X}),className:Q.summary,children:[(0,s.jsx)(B,{severity:X}),(0,s.jsx)(m.A,{className:Q.summaryText,variant:"subtitle1",children:Y==="markdown"?(0,s.jsx)(g.h,{content:J,className:Q.markdownContent}):J})]}),(K||dt)&&(0,s.jsx)(h.A,{children:(0,s.jsxs)(d.A,{container:!0,children:[K&&(0,s.jsx)(d.A,{item:!0,xs:12,children:(0,s.jsx)(m.A,{className:Q.message,variant:"body1",children:K})}),dt&&(0,s.jsx)(d.A,{item:!0,xs:12,className:Q.details,children:dt})]})})]})}},10795:(H,S,t)=>{"use strict";t.d(S,{l:()=>h});var s=t(72427),a=t(65461),x=t(10315),p=t(87849);const b=()=>{const{t:d}=(0,p.i)(x.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:d("supportConfig.default.title"),icon:"warning",links:[{title:d("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}};function h(){const u=(0,s.Q2)().get(a.U)?.getOptionalConfig("app.support"),v=b();return u?{url:u.getString("url"),items:u.getConfigArray("items").flatMap(g=>({title:g.getString("title"),icon:g.getOptionalString("icon"),links:(g.getOptionalConfigArray("links")??[]).flatMap(C=>({url:C.getString("url"),title:C.getOptionalString("title")??""}))}))}:v}},31129:(H,S,t)=>{"use strict";t.d(S,{Gg:()=>L,KG:()=>I,NT:()=>O,z9:()=>p});var s=t(31085),a=t(82266),x=t(27799);function p(M){const{id:$,Fallback:W=x.A,...X}=M,Y=(0,a.n)().getSystemIcon($)??W;return(0,s.jsx)(Y,{...X})}function b(M){return _jsx(p,{id:"brokenImage",...M})}function h(M){return _jsx(p,{id:"catalog",...M})}function d(M){return _jsx(p,{id:"chat",...M})}function m(M){return _jsx(p,{id:"dashboard",...M})}function u(M){return _jsx(p,{id:"docs",...M})}function v(M){return _jsx(p,{id:"email",...M})}function g(M){return _jsx(p,{id:"github",...M})}function C(M){return _jsx(p,{id:"group",...M})}function O(M){return(0,s.jsx)(p,{id:"help",...M})}function P(M){return _jsx(p,{id:"user",...M})}function B(M){return _jsx(p,{id:"warning",...M})}function L(M){return(0,s.jsx)(p,{id:"star",...M})}function I(M){return(0,s.jsx)(p,{id:"unstarred",...M})}},26280:(H,S,t)=>{"use strict";t.d(S,{U:()=>h});var s=t(31085),a=t(58837),x=t(53373),p=t.n(x);const b=(0,a.A)(d=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:d.spacing(3),paddingBottom:d.spacing(3),paddingLeft:d.spacing(2),paddingRight:d.spacing(2),[d.breakpoints.up("sm")]:{paddingLeft:d.spacing(3),paddingRight:d.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function h(d){const{className:m,stretch:u,noPadding:v,children:g,...C}=d,O=b();return(0,s.jsx)("article",{...C,className:p()(O.root,m,{[O.stretch]:u,[O.noPadding]:v}),children:g})}},59428:(H,S,t)=>{"use strict";t.d(S,{d:()=>u});var s=t(31085),a=t(10394),x=t(58837),p=t(72501),b=t(93285);const h=v=>(0,x.A)(g=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:g.spacing(2),textAlign:v.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:g.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),d=({title:v,className:g})=>(0,s.jsx)(p.A,{variant:"h4",component:"h2",className:g,"data-testid":"header-title",children:v}),m=({description:v,className:g})=>v?(0,s.jsx)(p.A,{variant:"body2",className:g,"data-testid":"header-description",children:v}):null;function u(v){const{description:g,title:C,titleComponent:O=void 0,children:P,descriptionComponent:B=void 0,textAlign:L="left"}=v,I=h({textAlign:L})(),M=O||(0,s.jsx)(d,{title:C,className:I.title}),$=B||(0,s.jsx)(m,{description:g,className:I.description});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b.m,{title:C}),(0,s.jsxs)(a.A,{className:I.container,children:[(0,s.jsxs)(a.A,{className:I.leftItemsBox,children:[M,$]}),(0,s.jsx)(a.A,{className:I.rightItemsBox,children:P})]})]})}},12173:(H,S,t)=>{"use strict";t.d(S,{M:()=>M});var s=t(31085),a=t(42899),x=t(58837),p=t(72501),b=t(18690),h=t(72072),d=t(10795);const m=t.p+"static/mic-drop.fe3ef4d0.svg",u=(0,x.A)($=>({micDrop:{maxWidth:"60%",bottom:$.spacing(2),right:$.spacing(2),[$.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:$.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),v=()=>{const $=u();return(0,s.jsx)("img",{src:m,className:$.micDrop,alt:"Girl dropping mic from her hands"})};var g=t(14041),C=t(77310),O=t(87849),P=t(10315);const B=(0,x.A)($=>({title:{paddingBottom:$.spacing(5),[$.breakpoints.down("xs")]:{paddingBottom:$.spacing(4),fontSize:$.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function L($){const{stack:W}=$,X=B(),{t:z}=(0,O.i)(P.O),[Y,K]=(0,g.useState)(!1);return Y?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{variant:"h6",className:X.title,children:(0,s.jsx)(h.N_,{to:"#",onClick:()=>K(!1),children:z("errorPage.showLessDetails")})}),(0,s.jsx)(C.z,{text:W,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,s.jsx)(p.A,{variant:"h6",className:X.title,children:(0,s.jsx)(h.N_,{to:"#",onClick:()=>K(!0),children:z("errorPage.showMoreDetails")})})}const I=(0,x.A)($=>({container:{padding:$.spacing(8),[$.breakpoints.down("xs")]:{padding:$.spacing(2)}},title:{paddingBottom:$.spacing(5),[$.breakpoints.down("xs")]:{paddingBottom:$.spacing(4),fontSize:$.typography.h3.fontSize}},subtitle:{color:$.palette.textSubtle}}),{name:"BackstageErrorPage"});function M($){const{status:W="",statusMessage:X,additionalInfo:z,supportUrl:Y,stack:K}=$,dt=I(),G=(0,b.Zp)(),Q=(0,d.l)(),{t:J}=(0,O.i)(P.O);return(0,s.jsxs)(a.A,{container:!0,className:dt.container,children:[(0,s.jsxs)(a.A,{item:!0,xs:12,sm:8,md:4,children:[(0,s.jsx)(p.A,{"data-testid":"error",variant:"body1",className:dt.subtitle,children:J("errorPage.subtitle",{status:W,statusMessage:X})}),(0,s.jsx)(p.A,{variant:"body1",className:dt.subtitle,children:z}),(0,s.jsx)(p.A,{variant:"h2",className:dt.title,children:J("errorPage.title")}),(0,s.jsxs)(p.A,{variant:"h6",className:dt.title,children:[(0,s.jsx)(h.N_,{to:"#","data-testid":"go-back-link",onClick:()=>G(-1),children:J("errorPage.goBack")}),"... or please"," ",(0,s.jsx)(h.N_,{to:Y||Q.url,children:"contact support"})," if you think this is a bug."]}),K&&(0,s.jsx)(L,{stack:K})]}),(0,s.jsx)(v,{})]})}},69814:(H,S,t)=>{"use strict";t.d(S,{Y:()=>G});var s=t(31085),a=t(72427),x=t(65461),p=t(10394),b=t(42899),h=t(58837),d=t(71677),m=t(72501),u=t(93285),v=t(72072),g=t(45634),C=t(58007),O=t(8109),P=t(55197),B=t(87051),L=t(14041);const I=(0,B.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(m.A),M=(0,B.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(p.A),$=(0,B.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(p.A);function W(Q){const{children:J,...ct}=Q,[pt,yt]=(0,L.useState)(null),At=L.Children.toArray(J),[Ot,It,...ut]=At,lt=ut.length?ut.pop():At[At.length-1],xt=At.length>3,gt=it=>{yt(it.currentTarget)},bt=()=>{yt(null)},Rt=!!pt;return(0,s.jsxs)(L.Fragment,{children:[(0,s.jsxs)(g.A,{"aria-label":"breadcrumb",...ct,children:[At.length>1&&(0,s.jsx)(M,{clone:!0,children:Ot}),At.length>2&&(0,s.jsx)(M,{clone:!0,children:It}),xt&&(0,s.jsx)(I,{onClick:gt,children:"..."}),(0,s.jsx)($,{children:lt})]}),(0,s.jsx)(P.Ay,{open:Rt,anchorEl:pt,onClose:bt,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,s.jsx)(C.A,{children:ut.map((it,ft)=>(0,s.jsx)(O.A,{button:!0,children:(0,s.jsx)(M,{clone:!0,children:it})},ft))})})]})}var X=t(73524);const z=(0,h.A)(Q=>({header:{gridArea:"pageHeader",padding:Q.spacing(3),width:"100%",boxShadow:Q.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:Q.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[Q.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:Q.page.fontColor,wordBreak:"break-word",fontSize:Q.typography.h3.fontSize,marginBottom:0},subtitle:{color:Q.page.fontColor,opacity:.8,display:"inline-block",marginTop:Q.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:Q.spacing(1),color:Q.page.fontColor},breadcrumb:{color:Q.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-Q.spacing(.3),marginBottom:Q.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-Q.spacing(.3),marginBottom:Q.spacing(.3)}}),{name:"BackstageHeader"}),Y=({type:Q,typeLink:J,classes:ct,pageTitle:pt})=>Q?J?(0,s.jsxs)(W,{className:ct.breadcrumb,children:[(0,s.jsx)(v.N_,{to:J,children:Q}),(0,s.jsx)(m.A,{children:pt})]}):(0,s.jsx)(m.A,{className:ct.type,children:Q}):null,K=({pageTitle:Q,classes:J,tooltip:ct})=>{const{contentRef:pt}=(0,X.H)(),yt=(0,s.jsx)(m.A,{ref:pt,tabIndex:-1,className:J.title,variant:"h1",children:Q});return ct?(0,s.jsx)(d.Ay,{title:ct,placement:"top-start",children:yt}):yt},dt=({classes:Q,subtitle:J})=>J?typeof J!="string"?(0,s.jsx)(s.Fragment,{children:J}):(0,s.jsx)(m.A,{className:Q.subtitle,variant:"subtitle2",component:"span",children:J}):null;function G(Q){const{children:J,pageTitleOverride:ct,style:pt,subtitle:yt,title:At,tooltip:Ot,type:It,typeLink:ut}=Q,lt=z(),gt=(0,a.gf)(x.U).getOptionalString("app.title")||"Backstage",bt=ct||At,Rt=At||ct,it=`${bt} | %s | ${gt}`,ft=`${bt} | ${gt}`;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.m,{titleTemplate:it,defaultTitle:ft}),(0,s.jsxs)("header",{style:pt,className:lt.header,children:[(0,s.jsxs)(p.A,{className:lt.leftItemsBox,children:[(0,s.jsx)(Y,{classes:lt,type:It,typeLink:ut,pageTitle:Rt}),(0,s.jsx)(K,{classes:lt,pageTitle:Rt,tooltip:Ot}),(0,s.jsx)(dt,{classes:lt,subtitle:yt})]}),(0,s.jsx)(b.A,{container:!0,className:lt.rightItemsBox,spacing:4,children:J})]})]})}},24504:(H,S,t)=>{"use strict";t.d(S,{Y:()=>d});var s=t(31085),a=t(58837),x=t(50868),p=t(53373),b=t.n(p);const h=(0,a.A)(m=>({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",[m.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function d(m){const{themeId:u,className:v,children:g}=m,C=h();return(0,s.jsx)(x.A,{theme:O=>({...O,page:O.getPageTheme({themeId:u})}),children:(0,s.jsx)("main",{className:b()(C.root,v),children:g})})}},27155:(H,S,t)=>{"use strict";t.d(S,{d:()=>p});var s=t(31085),a=t(69814),x=t(24504);function p(b){const{themeId:h,children:d,...m}=b;return(0,s.jsxs)(x.Y,{themeId:h,children:[(0,s.jsx)(a.Y,{...m}),d]})}},73524:(H,S,t)=>{"use strict";t.d(S,{G:()=>C,H:()=>O});var s=t(31085),a=t(10394),x=t(58837),p=t(5893),b=t(14041),h=t(72664),d=function(P){return P.SIDEBAR_PIN_STATE="sidebarPinState",P}(d||{});const m={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 u=t(34435);const v=(0,x.A)(P=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[P.breakpoints.up("sm")]:{paddingLeft:B=>B.isPinned?B.sidebarConfig.drawerWidthOpen:B.sidebarConfig.drawerWidthClosed},[P.breakpoints.down("xs")]:{paddingBottom:B=>B.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),g=(0,b.createContext)({content:{contentRef:void 0}});function C(P){const[B,L]=(0,b.useState)(()=>m.getSidebarPinState()),{sidebarConfig:I}=(0,b.useContext)(h.yY),M=(0,b.useRef)(null),$=(0,b.useMemo)(()=>({content:{contentRef:M}}),[M]);(0,b.useEffect)(()=>{m.setSidebarPinState(B)},[B]);const W=(0,p.A)(Y=>Y.breakpoints.down("xs"),{noSsr:!0}),X=()=>L(!B),z=v({isPinned:B,sidebarConfig:I});return(0,s.jsx)(u.qj,{value:{isPinned:B,toggleSidebarPinState:X,isMobile:W},children:(0,s.jsx)(g.Provider,{value:$,children:(0,s.jsx)(a.A,{className:z.root,children:P.children})})})}function O(){const{content:P}=(0,b.useContext)(g);return{focusContent:(0,b.useCallback)(()=>{P?.contentRef?.current?.focus()},[P]),contentRef:P?.contentRef}}},34435:(H,S,t)=>{"use strict";t.d(S,{Ut:()=>u,qj:()=>m});var s=t(31085),a=t(43836),x=t(10602),p=t(14041);const b={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},h=(0,p.createContext)(b),d=(0,a.tK)("sidebar-pin-state-context");function m(v){const{children:g,value:C}=v;return(0,s.jsx)(h.Provider,{value:C,children:(0,s.jsx)(d.Provider,{value:(0,x.B)({1:C}),children:g})})}const u=()=>{const v=(0,p.useContext)(d),g=(0,p.useContext)(h);if(v===void 0)return g||b;const C=v.atVersion(1);if(C===void 0)throw new Error("No context found for version 1.");return C}},72664:(H,S,t)=>{"use strict";t.d(S,{Rv:()=>h,U1:()=>g,hC:()=>b,i8:()=>m,yY:()=>v});var s=t(14041);const a=72,x=24,p=18,b={drawerWidthClosed:a,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:a,iconSize:a-x*2,iconPadding:x,selectedIndicatorWidth:3,userBadgePadding:p,userBadgeDiameter:a-p*2,mobileSidebarHeight:56},h=C=>({...b,...C,iconContainerWidth:b.drawerWidthClosed,iconSize:b.drawerWidthClosed-b.iconPadding*2,userBadgeDiameter:b.drawerWidthClosed-b.userBadgePadding*2}),d={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:b.defaultOpenDelayMs+200},m=C=>({...d,...C}),u="@backstage/core/sidebar-intro-dismissed",v=(0,s.createContext)({sidebarConfig:b,submenuConfig:d}),g=(0,s.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:(H,S,t)=>{"use strict";t.d(S,{O:()=>a});var s=t(93184);const a=(0,s.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",placeholder:"All results"},body:{emptyDataSourceMessage:"No records to display"},pagination:{firstTooltip:"First Page",labelDisplayedRows:"{from}-{to} of {count}",labelRowsSelect:"rows",lastTooltip:"Last Page",nextTooltip:"Next Page",previousTooltip:"Previous Page"},toolbar:{search:"Filter"}},alertDisplay:{message_one:"({{ count }} newer message)",message_other:"({{ count }} newer messages)"},autoLogout:{stillTherePrompt:{title:"Logging out due to inactivity",buttonText:"Yes! Don't log me out"}},proxiedSignInPage:{title:"You do not appear to be signed in. Please try reloading the browser page."}}})},25862:(H,S,t)=>{"use strict";t.d(S,{Ig:()=>d,pn:()=>h});var s=t(31085),a=t(43836),x=t(10602),p=t(14041);const b=(0,a.tK)("analytics-context"),h=()=>{const u=(0,p.useContext)(b);if(u===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const v=u.atVersion(1);if(v===void 0)throw new Error("No context found for version 1.");return v},d=u=>{const{attributes:v,children:g}=u,O={...h(),...v},P=(0,x.B)({1:O});return(0,s.jsx)(b.Provider,{value:P,children:g})};function m(u,v){const g=C=>_jsx(d,{attributes:v,children:_jsx(u,{...C})});return g.displayName=`WithAnalyticsContext(${u.displayName||u.name||"Component"})`,g}},67237:(H,S,t)=>{"use strict";t.d(S,{J:()=>p,t:()=>x});var s=t(63544);const a=(0,s.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),x="_ROUTABLE-EXTENSION-RENDERED";class p{analyticsApi;context;constructor(h,d={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=h,this.context=d,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,d,{value:m,attributes:u}={}){const{_routeNodeType:v,...g}=this.context;if(h===x){a.mostRecentGatheredNavigation&&(a.mostRecentRoutableExtensionRender={context:{...g,extension:"App"}});return}if(a.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender})}catch(C){console.warn("Error during analytics event capture. %o",C)}a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0}if(h==="navigate"&&v==="gathered"&&g.pluginId==="root"){a.mostRecentGatheredNavigation={action:h,subject:d,value:m,attributes:u,context:g};return}try{this.analyticsApi.captureEvent({action:h,subject:d,value:m,attributes:u,context:g})}catch(C){console.warn("Error during analytics event capture. %o",C)}}}},93368:(H,S,t)=>{"use strict";t.d(S,{s:()=>d});var s=t(25862),a=t(72427),x=t(99303),p=t(14041),b=t(67237);function h(){try{return(0,a.gf)(x.c)}catch{return{captureEvent:()=>{}}}}function d(){const m=(0,p.useRef)(null),u=(0,s.pn)(),v=h();function g(){return m.current===null&&(m.current=new b.J(v)),m.current}const C=g();return C.setContext(u),C}},36017:(H,S,t)=>{"use strict";t.d(S,{k:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.alert"})},99303:(H,S,t)=>{"use strict";t.d(S,{c:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.analytics"})},65461:(H,S,t)=>{"use strict";t.d(S,{U:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.config"})},57405:(H,S,t)=>{"use strict";t.d(S,{I:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.discovery"})},39837:(H,S,t)=>{"use strict";t.d(S,{m:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.error"})},63636:(H,S,t)=>{"use strict";t.d(S,{B:()=>x,S:()=>a});var s=t(55309),a=function(p){return p[p.None=0]="None",p[p.Active=1]="Active",p}({});const x=(0,s.y)({id:"core.featureflags"})},70795:(H,S,t)=>{"use strict";t.d(S,{a:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.fetch"})},16009:(H,S,t)=>{"use strict";t.d(S,{K:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.identity"})},56038:(H,S,t)=>{"use strict";t.d(S,{J:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.translation"})},55309:(H,S,t)=>{"use strict";t.d(S,{y:()=>a});class s{config;constructor(p){if(this.config=p,!p.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 '${p.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(x){return new s(x)}},12935:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});function s(a,x){return"id"in a?{api:a,deps:{},factory:()=>x}:a}},72427:(H,S,t)=>{"use strict";t.d(S,{Q2:()=>p,gf:()=>b});var s=t(31085),a=t(43836),x=t(97142);function p(){const d=(0,a.qO)("api-context");if(!d)throw new x.EH("API context is not available");const m=d.atVersion(1);if(!m)throw new x.EH("ApiContext v1 not available");return m}function b(d){const u=p().get(d);if(!u)throw new x.EH(`No implementation available for ${d}`);return u}function h(d){return function(u){const v=C=>{const O=p(),P={};for(const B in d)if(d.hasOwnProperty(B)){const L=d[B],I=O.get(L);if(!I)throw new NotImplementedError(`No implementation available for ${L}`);P[B]=I}return _jsx(u,{...C,...P})},g=u.displayName||u.name||"Component";return v.displayName=`withApis(${g})`,v}}},82266:(H,S,t)=>{"use strict";t.d(S,{n:()=>a});var s=t(43836);const a=()=>{const x=(0,s.qO)("app-context");if(!x)throw new Error("App context is not available");const p=x.atVersion(1);if(!p)throw new Error("AppContext v1 not available");return p}},19402:(H,S,t)=>{"use strict";t.d(S,{E:()=>b,h:()=>p});var s=t(63544);const a=(0,s.Q)("component-data-store",()=>new WeakMap),x="__backstage_data";function p(h,d,m){const u=h;let v=u[x]??a.get(h);if(v||(v={map:new Map},Object.defineProperty(u,x,{enumerable:!1,configurable:!0,writable:!1,value:v}),a.set(h,v)),v.map.has(d)){const g=h.displayName||h.name;throw new Error(`Attempted to attach duplicate data "${d}" to component "${g}"`)}v.map.set(d,m)}function b(h,d){if(!h)return;const m=h.type;if(!m)return;const u=m[x]??a.get(m);if(u)return u.map.get(d)}},88758:(H,S,t)=>{"use strict";t.d(S,{NC:()=>C,zZ:()=>O,QJ:()=>g});var s=t(31085),a=t(14041),x=t(93368),p=t(25862),b=t(82266),h=t(9222),d=t(19402);class m extends a.Component{static getDerivedStateFromError(B){return{error:B}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:B}=this.state,{app:L,plugin:I}=this.props,{ErrorBoundaryFallback:M}=L.getComponents();return B?(0,s.jsx)(M,{error:B,resetError:this.handleErrorReset,plugin:I}):this.props.children}}var u=t(67237),v=t(97142);function g(P){const{component:B,mountPoint:L,name:I}=P;return O({component:{lazy:()=>B().then(M=>{const $=X=>{const z=(0,x.s)();try{(0,h.S)(L)}catch(Y){if(typeof Y=="object"&&Y!==null){const{message:K}=Y;if(typeof K=="string"&&K.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${L} 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 Y}return(0,a.useEffect)(()=>{z.captureEvent(u.t,"")},[z]),(0,s.jsx)(M,{...X})},W=I||M.displayName||M.name||"LazyComponent";return $.displayName=`RoutableExtension(${W})`,$})},data:{"core.mountPoint":L},name:I})}function C(P){const{component:B,name:L}=P;return O({component:B,name:L})}function O(P){const{data:B={},name:L}=P;L||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let I;if("lazy"in P.component){const $=P.component.lazy;I=(0,a.lazy)(()=>$().then(W=>({default:W}),W=>{const X=L?` of the ${L} extension`:"";throw new v.HK(`Failed lazy loading${X}, try to reload the page`,W)}))}else I=P.component.sync;const M=L||I.displayName||I.name||"Component";return{expose($){const W=X=>{const z=(0,b.n)(),{Progress:Y}=z.getComponents(),K=B?.["core.mountPoint"];return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)(Y,{}),children:(0,s.jsx)(m,{app:z,plugin:$,children:(0,s.jsx)(p.Ig,{attributes:{pluginId:$.getId(),...L&&{extension:L},...K&&{routeRef:K.id}},children:(0,s.jsx)(I,{...X})})})})};(0,d.h)(W,"core.plugin",$),(0,d.h)(W,"core.extensionName",L);for(const[X,z]of Object.entries(B))(0,d.h)(W,X,z);return W.displayName=`Extension(${M})`,W}}}},82442:(H,S,t)=>{"use strict";t.d(S,{O:()=>d});var s=t(14041),a=t(19402),x=t(72427),p=t(63636);function b(m,u,v,g){return s.Children.toArray(m).flatMap(C=>{if(!(0,s.isValidElement)(C))return[];if(C.type===s.Fragment)return b(C.props.children,u,v,g);if((0,a.E)(C,"core.featureFlagged")){const O=C.props;return("with"in O?u.isActive(O.with):!u.isActive(O.without))?b(C.props.children,u,v,g):[]}if(v===void 0||v(C))return[C];if(g)throw new Error(g);return b(C.props.children,u,v,g)})}class h{node;featureFlagsApi;constructor(u,v){this.node=u,this.featureFlagsApi=v}selectByComponentData(u){const v=b(this.node,this.featureFlagsApi,g=>(0,a.E)(g,u.key)!==void 0,u.withStrictError);return new h(v,this.featureFlagsApi)}findComponentData(u){return b(this.node,this.featureFlagsApi,g=>(0,a.E)(g,u.key)!==void 0).map(g=>(0,a.E)(g,u.key)).filter(g=>g!==void 0)}getElements(){return b(this.node,this.featureFlagsApi)}}function d(m,u,v=[]){const g=(0,x.gf)(p.B),C=new h(m,g);return(0,s.useMemo)(()=>u(C),[m,...v])}},9803:(H,S,t)=>{"use strict";t.d(S,{i:()=>a});class s{config;constructor(p){this.config=p}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(p){return p.expose(this)}toString(){return`plugin{${this.config.id}}`}}function a(x){return new s(x)}},34569:(H,S,t)=>{"use strict";t.d(S,{H:()=>x});var s=t(59598);class a{id;params;[p=s.b];constructor(h,d){this.id=h,this.params=d,this[p]="absolute"}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function x(b){return new a(b.id,b.params??[])}var p},59598:(H,S,t)=>{"use strict";t.d(S,{b:()=>a});var s=t(63544);const a=(0,s.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:(H,S,t)=>{"use strict";t.d(S,{S:()=>p});var s=t(14041),a=t(18690),x=t(43836);function p(b){const{pathname:h}=(0,a.zy)(),d=(0,x.qO)("routing-context");if(!d)throw new Error("Routing context is not available");const m=d.atVersion(1),u=(0,s.useMemo)(()=>m&&m.resolve(b,{pathname:h}),[m,b,h]);if(!d)throw new Error("useRouteRef used outside of routing context");if(!m)throw new Error("RoutingContext v1 not available");const v="optional"in b&&b.optional;if(!u&&!v)throw new Error(`No path for ${b}`);return u}},93184:(H,S,t)=>{"use strict";t.d(S,{h:()=>p,v:()=>b});var s=t(99833);function a(h){const d=new Array;function m(u,v){for(const[g,C]of Object.entries(u))typeof C=="string"?d.push([v+g,C]):m(C,`${v}${g}.`)}return m(h,""),Object.fromEntries(d)}class x{#t;#e;#n;constructor(d){this.#t=d.id,this.#e=a(d.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#t}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#e}setDefaultResource(d){this.#n=d}getDefaultResource(){return this.#n}toString(){return`TranslationRef{id=${this.id}}`}}function p(h){const d=new x(h);return h.translations&&d.setDefaultResource((0,s.o)({ref:d,translations:h.translations})),d}function b(h){const d=h;if(d.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${d.$$type}'`);if(d.version!=="v1")throw new Error(`Invalid translation ref, bad version '${d.version}'`);return d}},99833:(H,S,t)=>{"use strict";t.d(S,{Y:()=>s,o:()=>a});function s(x){const p=x;if(p.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${p.$$type}'`);if(p.version!=="v1")throw new Error(`Invalid translation resource, bad version '${p.version}'`);return p}function a(x){return{$$type:"@backstage/TranslationResource",version:"v1",id:x.ref.id,resources:Object.entries(x.translations).map(([p,b])=>({language:p,loader:()=>b().then(h=>{const d=h.default;return{messages:d?.$$type==="@backstage/TranslationMessages"?d.messages:d}})}))}}},87849:(H,S,t)=>{"use strict";t.d(S,{i:()=>h});var s=t(14041),a=t(72427),x=t(39837),p=t(56038);const b=new WeakSet,h=d=>{const m=(0,a.gf)(x.m),u=(0,a.gf)(p.J),[v,g]=(0,s.useState)(()=>u.getTranslation(d)),C=(0,s.useMemo)(()=>u.translation$(d),[u,d]),O=(0,s.useCallback)(B=>{if(!b.has(d)){const L=`Failed to load translation resource '${d.id}'; caused by ${B}`;console.error(L),m.post(new Error(L)),b.add(d)}},[m,d]);(0,s.useEffect)(()=>{const B=C.subscribe({next(L){L.ready&&g(L)},error(L){O(L)}});return()=>{B.unsubscribe()}},[C,O]);const P=(0,s.useRef)(!0);if((0,s.useEffect)(()=>{P.current?P.current=!1:g(u.getTranslation(d))},[u,d]),!v.ready)throw new Promise(B=>{const L=C.subscribe({next(I){I.ready&&(L.unsubscribe(),B())},error(I){L.unsubscribe(),O(I),B()}})});return{t:v.t}}},70835:(H,S,t)=>{"use strict";t.d(S,{o:()=>x});var s=t(59750);async function a(p){try{const b=await p.text();if(b){if(p.headers.get("content-type")?.startsWith("application/json"))try{const h=JSON.parse(b);if(h.error&&h.response)return h}catch{}return{error:{name:"Error",message:`Request failed with status ${p.status} ${p.statusText}, ${b}`},response:{statusCode:p.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${p.status} ${p.statusText}`},response:{statusCode:p.status}}}class x extends Error{response;body;cause;statusCode;statusText;static async fromResponse(b){const h=await a(b),d=h.response.statusCode||b.status,m=b.statusText,u=`Request failed with ${d} ${m}`,v=(0,s.cy)(h.error);return new x({message:u,response:b,data:h,cause:v,statusCode:d,statusText:m})}constructor(b){super(b.message),this.name="ResponseError",this.response=b.response,this.body=b.data,this.cause=b.cause,this.statusCode=b.statusCode,this.statusText=b.statusText}}},93007:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});function s(x){if(typeof x!="object"||x===null||Array.isArray(x))return!1;const p=x;return!(typeof p.name!="string"||p.name===""||typeof p.message!="string")}function a(x){if(typeof x!="object"||x===null||Array.isArray(x))throw new Error(`Encountered invalid error, not an object, got '${x}'`);const p=x;if(typeof p.name!="string"||p.name==="")throw new Error(`Encountered error object without a name, got '${x}'`);if(typeof p.message!="string")throw new Error(`Encountered error object without a message, got '${x}'`)}},97142:(H,S,t)=>{"use strict";t.d(S,{HK:()=>C,m_:()=>d,EH:()=>v});var s=t(93007),a=t(59750);class x extends Error{cause;constructor(P,B){let L=P;if(B!==void 0){const I=(0,a.M5)(B);L?L+=`; caused by ${I}`:L=`caused by ${I}`}super(L),Error.captureStackTrace?.(this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,s.b)(B)?B:void 0}}class p extends null{name="InputError"}class b extends null{name="AuthenticationError"}class h extends null{name="NotAllowedError"}class d extends x{name="NotFoundError"}class m extends null{name="ConflictError"}class u extends null{name="NotModifiedError"}class v extends x{name="NotImplementedError"}class g extends null{}class C extends x{constructor(P,B){super(P,B),this.name=(0,s.b)(B)?B.name:"Error"}}},59750:(H,S,t)=>{"use strict";t.d(S,{M5:()=>h,cy:()=>b});var s=t(69655),a=t.n(s),x=t(93007);function p(d,m){const v={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(d)};return m?.includeStack||(delete v.stack,v.cause&&typeof v.cause=="object"&&"stack"in v.cause&&delete v.cause.stack),v}function b(d){const m=(0,s.deserializeError)(d);return d.stack||(m.stack=void 0),m}function h(d){if((0,x.b)(d)){const m=String(d);return m!=="[object Object]"?m:`${d.name}: ${d.message}`}return`unknown error '${d}'`}},96726:(H,S,t)=>{"use strict";t.d(S,{L:()=>Le,Y:()=>an});var s=t(59869);const a="amazonaws.com";function x(T){const l=T.getOptionalString("endpoint"),E=T.getOptionalBoolean("s3ForcePathStyle")??!1;let w,Z;if(l){try{const Yt=new URL(l);w=Yt.host,Z=Yt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${l}' is not a valid URL`)}if(Z!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${l}'`)}else w=a;const _=T.getOptionalString("accessKeyId"),ot=T.getOptionalString("secretAccessKey")?.trim(),Mt=T.getOptionalString("roleArn"),Wt=T.getOptionalString("externalId");return{host:w,endpoint:l,s3ForcePathStyle:E,accessKeyId:_,secretAccessKey:ot,roleArn:Mt,externalId:Wt}}function p(T){const l=T.map(x);return l.some(E=>E.host===a)||l.push({host:a}),l}class b{integrationConfig;static factory=({config:l})=>{const E=p(l.getOptionalConfigArray("integrations.awsS3")??[]);return(0,s.oS)(E.map(w=>new b(w)),w=>w.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,s.ku)(l)}resolveEditUrl(l){return l}}const h="console.aws.amazon.com";function d(T){const l=T.getOptionalString("accessKeyId"),E=T.getOptionalString("secretAccessKey")?.trim(),w=T.getOptionalString("roleArn"),Z=T.getOptionalString("externalId"),_=T.getString("region");return{host:T.getOptionalString("host")||`${_}.${h}`,accessKeyId:l,secretAccessKey:E,roleArn:w,externalId:Z,region:_}}function m(T){return T.map(d)}class u{integrationConfig;static factory=({config:l})=>{const E=m(l.getOptionalConfigArray("integrations.awsCodeCommit")??[]);return(0,s.oS)(E.map(w=>new u(w)),w=>w.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,s.ku)(l)}resolveEditUrl(l){const w=new URL(l).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!w)throw new Error("");const[,Z]=w;return v(l,Z,"edit")}}function v(T,l,E){const w=E==="edit"?"files/edit":E;return T.replace(new RegExp(`/codesuite/codecommit/repositories/${l}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${l}/${w}/`)}const g="GB";class C{static fromRepoUrl(l){const E=new URL(l);let w,Z,_;const ot=E.pathname.split("/").map(re=>decodeURIComponent(re));if(ot[2]==="_git"?(w=ot[1],Z=_=ot[3]):ot[3]==="_git"?(w=ot[1],Z=ot[2],_=ot[4]):ot[4]==="_git"&&(w=`${ot[1]}/${ot[2]}`,Z=ot[3],_=ot[5]),!w||!Z||!_)throw new Error("Azure URL must point to a git repository");const Mt=E.searchParams.get("path")??void 0;let Wt;const Yt=E.searchParams.get("version");if(Yt){if(Yt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Wt=Yt.slice(2)}return new C(E.origin,w,Z,_,Mt,Wt)}#t;#e;#n;#s;#o;#r;constructor(l,E,w,Z,_,ot){this.#t=l,this.#e=E,this.#n=w,this.#s=Z,this.#o=_,this.#r=ot}#a=(...l)=>{const E=new URL(this.#t);return E.pathname=l.map(w=>encodeURIComponent(w)).join("/"),E};toRepoUrl(){let l;return this.#n===this.#s?l=this.#a(this.#e,"_git",this.#s):l=this.#a(this.#e,this.#n,"_git",this.#s),this.#o&&l.searchParams.set("path",this.#o),this.#r&&l.searchParams.set("version",g+this.#r),l.toString()}toFileUrl(){if(!this.#o)throw new Error("Azure URL must point to a specific path to be able to download a file");const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("api-version","6.0"),l.searchParams.set("path",this.#o),this.#r&&l.searchParams.set("version",this.#r),l.toString()}toArchiveUrl(){const l=this.#a(this.#e,this.#n,"_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.#o&&l.searchParams.set("scopePath",this.#o),this.#r&&l.searchParams.set("version",this.#r),l.toString()}toCommitsUrl(){const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"commits");return l.searchParams.set("api-version","6.0"),this.#r&&l.searchParams.set("searchCriteria.itemVersion.version",this.#r),l.toString()}getOwner(){return this.#e}getProject(){return this.#n}getRepo(){return this.#s}getPath(){return this.#o}getRef(){return this.#r}}const O="dev.azure.com",P=["clientId","clientSecret","managedIdentityClientId","tenantId","personalAccessToken"],B=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["ManagedIdentityClientAssertion",["clientId","managedIdentityClientId","tenantId"]],["PersonalAccessToken",["personalAccessToken"]]]);function L(T){for(const l of B.entries()){const[E,w]=l,Z=P.filter(_=>!w.includes(_));if(w.every(_=>T[_]!==void 0)&&Z.every(_=>T[_]===void 0))return{kind:E,organizations:T.organizations,...w.reduce((_,ot)=>(_[ot]=T[ot],_),{})}}throw new Error("is not a valid credential")}function I(T){const l=T.getOptionalString("host")??O;let E=T.getOptionalConfigArray("credentials")?.map(_=>({organizations:_.getOptionalStringArray("organizations"),personalAccessToken:_.getOptionalString("personalAccessToken")?.trim(),tenantId:_.getOptionalString("tenantId")?.trim(),clientId:_.getOptionalString("clientId")?.trim(),clientSecret:_.getOptionalString("clientSecret")?.trim(),managedIdentityClientId:_.getOptionalString("managedIdentityClientId")?.trim()}));const w=T.getOptionalString("token")?.trim();if(T.getOptional("credential")!==void 0&&T.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(T.getOptional("token")!==void 0&&T.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(w!==void 0){const _=[{personalAccessToken:w}];E=E?.concat(_)??_}if(T.getOptional("credential")!==void 0){const _=[{organizations:T.getOptionalStringArray("credential.organizations"),token:T.getOptionalString("credential.token")?.trim(),tenantId:T.getOptionalString("credential.tenantId"),clientId:T.getOptionalString("credential.clientId"),clientSecret:T.getOptionalString("credential.clientSecret")?.trim()}];E=E?.concat(_)??_}if(!(0,s.HO)(l))throw new Error(`Invalid Azure integration config, '${l}' is not a valid host`);let Z;if(E!==void 0){const _=E?.reduce((ot,Mt,Wt)=>{let Yt;try{L(Mt)}catch(re){Yt=re.message}return Yt!==void 0&&ot.push(`credential at position ${Wt+1} ${Yt}`),ot},Array.of()).concat(Object.entries(E.filter(ot=>ot.organizations!==void 0&&ot.organizations.length>0).reduce((ot,Mt,Wt)=>(Mt.organizations?.forEach(Yt=>{ot[Yt]||(ot[Yt]=[]),ot[Yt].push(Wt+1)}),ot),{})).filter(([ot,Mt])=>Mt.length>1).reduce((ot,[Mt,Wt])=>(ot.push(`organization ${Mt} is specified multiple times in credentials at positions ${Wt.slice(0,Wt.length-1).join(", ")} and ${Wt[Wt.length-1]}`),ot),Array.of()));if(_?.length>0)throw new Error(`Invalid Azure integration config for ${l}: ${_.join("; ")}`);if(Z=E.map(ot=>L(ot)),Z.some(ot=>ot.kind!=="PersonalAccessToken")&&l!==O)throw new Error(`Invalid Azure integration config for ${l}, only personal access tokens can be used with hosts other than ${O}`);if(Z.filter(ot=>ot.organizations===void 0||ot.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:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}function M(T){const l=T.map(I);return l.some(E=>E.host===O)||l.push({host:O}),l}class ${integrationConfig;static factory=({config:l})=>{const E=M(l.getOptionalConfigArray("integrations.azure")??[]);return(0,s.oS)(E.map(w=>new $(w)),w=>w.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:w}=l;if((0,s.AY)(E))return E;try{const Z=C.fromRepoUrl(w),_=new URL(w),ot=new URL(`https://a.com${Z.getPath()??""}`),Mt=new URL(E,ot).pathname;return _.searchParams.set("path",Mt),l.lineNumber&&(_.searchParams.set("line",String(l.lineNumber)),_.searchParams.set("lineEnd",String(l.lineNumber+1)),_.searchParams.set("lineStartColumn","1"),_.searchParams.set("lineEndColumn","1")),_.toString()}catch{return new URL(E,w).toString()}}resolveEditUrl(l){return l}}var W=t(52536),X=t.n(W);const z="bitbucket.org",Y="https://api.bitbucket.org/2.0";function K(T){const l=z,E=Y,w=T.getString("username"),Z=T.getString("appPassword")?.trim();return{host:l,apiBaseUrl:E,username:w,appPassword:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}function dt(T){const l=T.map(K);return l.length===0&&l.push({host:z,apiBaseUrl:Y}),l}class G{integrationConfig;static factory=({config:l})=>{const E=dt(l.getOptionalConfigArray("integrations.bitbucketCloud")??[]);return(0,s.oS)(E.map(w=>new G(w)),w=>w.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,s.ku)(l);if(l.lineNumber){const w=new URL(E);return w.hash=`lines-${l.lineNumber}`,w.toString()}return E}resolveEditUrl(l){const E=X()(l),w=new URL(l);return w.searchParams.set("mode","edit"),w.searchParams.set("at",E.ref),w.toString()}}var Q=t(45250);const J="bitbucket.org",ct="https://api.bitbucket.org/2.0";function pt(T){const l=T.getOptionalString("host")??J;let E=T.getOptionalString("apiBaseUrl");const w=T.getOptionalString("token")?.trim(),Z=T.getOptionalString("username"),_=T.getOptionalString("appPassword")?.trim();if(!(0,s.HO)(l))throw new Error(`Invalid Bitbucket integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):l===J?E=ct:E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:w,username:Z,appPassword:_,commitSigningKey:T.getOptionalString("commitSigningKey")}}function yt(T){const l=T.map(pt);return l.some(E=>E.host===J)||l.push({host:J,apiBaseUrl:ct}),l}class At{integrationConfig;static factory=({config:l})=>{const E=yt(l.getOptionalConfigArray("integrations.bitbucket")??[...l.getOptionalConfigArray("integrations.bitbucketCloud")??[],...l.getOptionalConfigArray("integrations.bitbucketServer")??[]]);return(0,s.oS)(E.map(w=>new At(w)),w=>w.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,s.ku)(l);if(!l.lineNumber)return E;const w=new URL(E);return this.integrationConfig.host==="bitbucket.org"?w.hash=`lines-${l.lineNumber}`:w.hash=`${l.lineNumber}`,w.toString()}resolveEditUrl(l){const E=X()(l),w=new URL(l);return w.searchParams.set("mode","edit"),w.searchParams.set("spa","0"),w.searchParams.set("at",E.ref),w.toString()}}function Ot(T){const l=T.getString("host");let E=T.getOptionalString("apiBaseUrl");const w=T.getOptionalString("token")?.trim(),Z=T.getOptionalString("username"),_=T.getOptionalString("password");if(!(0,s.HO)(l))throw new Error(`Invalid Bitbucket Server integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:w,username:Z,password:_,commitSigningKey:T.getOptionalString("commitSigningKey")}}function It(T){return T.map(Ot)}class ut{integrationConfig;static factory=({config:l})=>{const E=It(l.getOptionalConfigArray("integrations.bitbucketServer")??[]);return(0,s.oS)(E.map(w=>new ut(w)),w=>w.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,s.ku)(l);if(l.lineNumber){const w=new URL(E);return w.hash=l.lineNumber.toString(),w.toString()}return E}resolveEditUrl(l){return l.includes("?")?l.substring(0,l.indexOf("?")):l}}function lt(T){const l=T.getString("host");let E=T.getOptionalString("baseUrl"),w=T.getOptionalString("cloneUrl");const Z=T.getOptionalBoolean("disableEditUrl");let _=T.getString("gitilesBaseUrl");const ot=T.getOptionalString("username"),Mt=T.getOptionalString("password")?.trim();if((0,s.HO)(l)){if(E&&!(0,s.AY)(E))throw new Error(`Invalid Gerrit integration config, '${E}' is not a valid baseUrl`);if(w&&!(0,s.AY)(w))throw new Error(`Invalid Gerrit integration config, '${w}' is not a valid cloneUrl`);if(!(0,s.AY)(_))throw new Error(`Invalid Gerrit integration config, '${_}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}`,w?w=(0,Q.trimEnd)(w,"/"):w=E,_=(0,Q.trimEnd)(_,"/"),{host:l,baseUrl:E,cloneUrl:w,disableEditUrl:Z,gitilesBaseUrl:_,username:ot,password:Mt,commitSigningKey:T.getOptionalString("commitSigningKey")}}function xt(T){return T.map(lt)}var gt=t(1048).hp;const bt=")]}'";function Rt(T,l){const E=new URL(T.gitilesBaseUrl),w=new URL(l),_=w.pathname.substring(w.pathname.startsWith("/a/")?2:0).replace(E.pathname,"").split("/").filter(Me=>!!Me),ot=_.indexOf("+");if(ot<=0)throw new Error(`Unable to parse project from url: ${l}`);const Mt=trimStart(_.slice(0,ot).join("/"),"/"),Wt=_.indexOf("heads");if(Wt<=0)throw new Error(`Unable to parse branch from url: ${l}`);const Yt=_[Wt+1],re=_.slice(Wt+2).join("/");return{branch:Yt,filePath:re===""?"/":re,project:Mt}}function it(T,l){const E=new URL(T.gitilesBaseUrl),w=new URL(l),_=(0,Q.trimStart)(w.pathname.substring(w.pathname.startsWith("/a/")?2:0).replace(E.pathname,""),"/").split("/").filter(he=>!!he),ot=(0,Q.takeWhile)(_,he=>he!=="+");if(ot.length===0)throw new Error(`Unable to parse gitiles url: ${l}`);const Mt=_.slice(ot.length+1),Wt=(0,Q.join)(ot,"/");if(Mt.length>0&&Mt[0]==="HEAD"){const he=Mt.shift(),qt=(0,Q.join)(Mt,"/");return{project:Wt,ref:he,refType:"head",path:qt||"/",basePath:(0,Q.trimEnd)(l.replace(qt,""),"/")}}if(Mt.length>0&&Mt[0].length===40){const he=Mt.shift(),qt=(0,Q.join)(Mt,"/");return{project:Wt,ref:he,refType:"sha",path:qt||"/",basePath:(0,Q.trimEnd)(l.replace(qt,""),"/")}}const Yt=(0,Q.join)(Mt,"/"),Me=/^refs\/(?<refsReference>heads|tags)\/(?<ref>.*?)(\/|$)/.exec(Yt);if(Me){const he=Me[0];let qt;const{refsReference:te,ref:pe}=Me.groups||{},sn=Yt.replace(he,"");switch(te){case"heads":qt="branch";break;case"tags":qt="tag";break;default:throw new Error(`Unable to parse gitiles url: ${l}`)}return{project:Wt,ref:pe,refType:qt,path:sn||"/",basePath:(0,Q.trimEnd)(l.replace(sn,""),"/")}}throw new Error(`Unable to parse gitiles : ${l}`)}function ft(T,l,E,w){return`${T.gitilesBaseUrl}/${l}/+/refs/heads/${E}/${trimStart(w,"/")}`}function vt(T,l,E,w){return`${T.baseUrl}/admin/repos/edit/repo/${l}/branch/refs/heads/${E}/file/${(0,Q.trimStart)(w,"/")}`}function st(T,l,E,w){const Z=w==="/"||w===""?".tar.gz":`/${w}.tar.gz`;return`${U(T)}/${l}/+archive/refs/heads/${E}${Z}`}function Et(T,l){const{path:E,ref:w,project:Z,refType:_}=it(T,l),ot=E==="/"||E===""?".tar.gz":`/${E}.tar.gz`;if(_==="branch")return`${U(T)}/${Z}/+archive/refs/heads/${w}${ot}`;if(_==="sha")return`${U(T)}/${Z}/+archive/${w}${ot}`;throw new Error(`Unsupported gitiles ref type: ${_}`)}function at(T){return T.password?"/a/":"/"}function U(T){if(!T.baseUrl||!T.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(T.gitilesBaseUrl.startsWith(T.baseUrl))return T.gitilesBaseUrl.replace(T.baseUrl.concat("/"),T.baseUrl.concat(at(T)));if(T.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return T.gitilesBaseUrl}function V(T,l){const{branch:E,project:w}=Rt(T,l);return`${T.baseUrl}${at(T)}projects/${encodeURIComponent(w)}/branches/${E}`}function rt(T,l){const{project:E}=Rt(T,l);return`${T.cloneUrl}${at(T)}${E}`}function Ct(T,l){const{ref:E,refType:w,path:Z,project:_}=it(T,l);if(w==="branch")return`${T.baseUrl}${at(T)}projects/${encodeURIComponent(_)}/branches/${E}/files/${encodeURIComponent(Z)}/content`;if(w==="sha")return`${T.baseUrl}${at(T)}projects/${encodeURIComponent(_)}/commits/${E}/files/${encodeURIComponent(Z)}/content`;throw new Error(`Unsupported gitiles ref type: ${w}`)}function ht(T){return`${T.baseUrl}${at(T)}projects/`}function Bt(T){const l={};if(!T.password)return l;const E=gt.from(`${T.username}:${T.password}`,"utf8");return l.Authorization=`Basic ${E.toString("base64")}`,{headers:l}}async function Nt(T){const l=await T.text();if(l.startsWith(bt))try{return JSON.parse(l.slice(bt.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 Kt{integrationConfig;static factory=({config:l})=>{const E=xt(l.getOptionalConfigArray("integrations.gerrit")??[]);return(0,s.oS)(E.map(w=>new Kt(w)),w=>w.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:w,lineNumber:Z}=l;let _;if(E.startsWith("/")){const{basePath:ot}=it(this.config,w);return ot+E}return E?_=new URL(E,w):_=new URL(w),Z&&(_.hash=Z.toString()),_.toString()}resolveEditUrl(l){if(this.config.disableEditUrl)return l;const E=it(this.config,l);return vt(this.config,E.project,E.ref,E.path)}}var Jt=t(36021);const kt="gitlab.com",Vt="https://gitlab.com/api/v4";function jt(T){const l=T.getString("host");let E=T.getOptionalString("apiBaseUrl");const w=T.getOptionalString("token")?.trim();let Z=T.getOptionalString("baseUrl");if(E?E=(0,Q.trimEnd)(E,"/"):l===kt&&(E=Vt),Z?Z=(0,Q.trimEnd)(Z,"/"):Z=`https://${l}`,(0,s.HO)(l)){if(!E||!(0,s.AY)(E))throw new Error(`Invalid GitLab integration config, '${E}' is not a valid apiBaseUrl`);if(!(0,s.AY)(Z))throw new Error(`Invalid GitLab integration config, '${Z}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${l}' is not a valid host`);return{host:l,token:w,apiBaseUrl:E,baseUrl:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}function Gt(T){const l=T.map(jt);return l.some(E=>E.host===kt)||l.push({host:kt,apiBaseUrl:Vt,baseUrl:`https://${kt}`}),l}function ie(T){let l="";return T.host!==kt&&(l=new URL(T.baseUrl).pathname),trimEnd(l,"/")}class ue{integrationConfig;static factory=({config:l})=>{const E=Gt(l.getOptionalConfigArray("integrations.gitlab")??[]);return(0,s.oS)(E.map(w=>new ue(w)),w=>w.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,s.ku)(l)}resolveEditUrl(l){return zt(l,"edit")}}function zt(T,l){return T.replace(/\/\-\/(blob|tree|edit)\//,`/-/${l}/`)}function ne(T){const l=T.getString("host");let E=T.getOptionalString("baseUrl");const w=T.getOptionalString("username"),Z=T.getOptionalString("password")?.trim();if((0,s.HO)(l)){if(E&&!(0,s.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,Q.trimEnd)(E,"/"):E=`https://${l}`,{host:l,baseUrl:E,username:w,password:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}var ce=t(1048).hp;function Ye(T,l){const E=Ve(T,l);return`${E.url}/${E.owner}/${E.name}/_edit/${E.ref}/${E.path}`}function ee(T,l){const E=Ve(T,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/contents/${E.path}?ref=${E.ref}`}function on(T,l){const E=Ve(T,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/archive/${E.ref}.tar.gz`}function We(T,l){const E=Ve(T,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/git/commits/${E.ref}`}function Re(T){const l={},{username:E,password:w}=T;return w?(E?l.Authorization=`basic ${ce.from(`${E}:${w}`).toString("base64")}`:l.Authorization=`token ${w}`,{headers:l}):l}function Ve(T,l){const E=T.baseUrl??`https://${T.host}`;try{const[w,Z,_,ot,Mt,Wt,...Yt]=l.replace(E,"").split("/"),re=Yt.join("/").replace(/^\//,"");return{url:E,owner:Z,name:_,ref:Wt,path:re}}catch(w){throw new Error(`Incorrect URL: ${l}, ${w}`)}}class se{config;static factory=({config:l})=>{const w=(l.getOptionalConfigArray("integrations.gitea")??[]).map(Z=>ne(Z));return(0,s.oS)(w.map(Z=>new se(Z)),Z=>Z.config.host)};constructor(l){this.config=l}get type(){return"gitea"}get title(){return this.config.host}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return Ye(this.config,l)}}function qe(T){const l=T.getString("host"),E=T.getOptionalString("token"),w=T.getOptionalString("apiKey");if(!(0,s.HO)(l))throw new Error(`Invalid Harness Code integration config, '${l}' is not a valid host`);return{host:l,apiKey:w,token:E}}function tn(T,l){const E=Ke(T,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 hn(T,l){const E=Ke(T,l);let w=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(w+=`/${E.orgName}`),E.projectName&&(w+=`/${E.projectName}`),w+=`/${E.repoName}/+/raw/${E.path}?routingId=${E.accountId}&git_ref=refs/heads/${E.refString}`,w}function en(T,l){const E=Ke(T,l);let w=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(w+=`/${E.orgName}`),E.projectName&&(w+=`/${E.projectName}`),w+=`/${E.repoName}/+/archive/${E.branch}.zip?routingId=${E.accountId}`,w}function nn(T,l){const E=Ke(T,l);let w=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(w+=`/${E.orgName}`),E.projectName&&(w+=`/${E.projectName}`),w+=`/${E.repoName}/+/content?routingId=${E.accountId}&include_commit=true&git_ref=refs/heads/${E.branch}`,w}function pn(T){const l={},{token:E,apiKey:w}=T;return w?l["x-api-key"]=w:E&&(l.Authorization=`Bearer ${E}`),{headers:l}}function Ke(T,l){const E=`https://${T.host}`;try{const w=new URL(l),Z=w.pathname.split("/").filter(le=>le!==""),_=w.pathname.split("/"),ot=Z.findIndex(le=>le==="account")+1,Mt=Z[ot],Wt=Z.findIndex(le=>le==="orgs"),Yt=Wt!==-1?Z[Wt+1]:"",re=Z.findIndex(le=>le==="projects"),Me=re!==-1?Z[re+1]:"",he=Z.findIndex((le,$t)=>le==="repos"&&$t>Math.max(ot,Wt,re))+1,qt=Z[he],te=_.slice(_.findIndex(le=>le==="files"||le==="edit")+1),pe=te.findIndex(le=>le==="~"),sn=te.slice(0,pe).join("/"),gn=pe!==-1?te.slice(pe+1).join("/").replace(/^\//,""):"";return{baseUrl:E,accountId:Mt,orgName:Yt,projectName:Me,refString:sn,path:gn,repoName:qt,refDashStr:te.slice(0,pe).join("-"),branch:pe!==-1?te.slice(0,pe).join("/"):te.join("/")}}catch(w){throw new Error(`Incorrect URL: ${l}, ${w}`)}}class ze{config;static factory=({config:l})=>{const w=(l.getOptionalConfigArray("integrations.harness")??[]).map(Z=>qe(Z));return(0,s.oS)(w.map(Z=>new ze(Z)),Z=>Z.config.host)};constructor(l){this.config=l}get type(){return"harness"}get title(){return this.config.host}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return tn(this.config,l)}}const He="blob.core.windows.net";function be(T){const l=T.getOptionalString("endpoint"),E=T.getString("accountName"),w=T.getOptionalString("accountKey")?.trim(),Z=T.getOptionalString("sasToken")?.trim(),_=T.getOptionalString("connectionString")?.trim(),ot=T.getOptionalString("endpointSuffix")?.trim();let Mt,Wt;if(l){try{const re=new URL(l);Mt=re.host,Wt=re.pathname}catch{throw new Error(`invalid azureBlobStorage integration config, endpoint '${l}' is not a valid URL`)}if(Wt!=="/")throw new Error(`invalid azureBlobStorage integration config, endpoints cannot contain path, got '${l}'`)}else Mt=He;const Yt=T.has("aadCredential")?{clientId:T.getString("aadCredential.clientId"),tenantId:T.getString("aadCredential.tenantId"),clientSecret:T.getString("aadCredential.clientSecret")?.trim()}:void 0;if(w&&Z)throw new Error(`Invalid Azure Blob Storage config for ${E}: Both account key and SAS token cannot be used simultaneously.`);if(Yt&&(w||Z))throw new Error(`Invalid Azure Blob Storage config for ${E}: Cannot use both Azure AD credentials and account keys/SAS tokens for the same account.`);return{host:Mt,endpoint:l,accountName:E,accountKey:w,sasToken:Z,connectionString:_,endpointSuffix:ot,aadCredential:Yt}}function Qe(T){const l=T.map(be);return l.some(E=>E.host===He)||l.push({host:He}),l}class Ze{integrationConfig;static factory=({config:l})=>{const E=Qe(l.getOptionalConfigArray("integrations.azureBlobStorage")??[]);return(0,s.oS)(E.map(w=>new Ze(w)),w=>w.config.host)};get type(){return"azureBlobStorage"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return l}}class je{byType;static fromConfig(l){return new je({awsS3:b.factory({config:l}),awsCodeCommit:u.factory({config:l}),azureBlobStorage:Ze.factory({config:l}),azure:$.factory({config:l}),bitbucket:At.factory({config:l}),bitbucketCloud:G.factory({config:l}),bitbucketServer:ut.factory({config:l}),gerrit:Kt.factory({config:l}),github:Jt.U.factory({config:l}),gitlab:ue.factory({config:l}),gitea:se.factory({config:l}),harness:ze.factory({config:l})})}constructor(l){this.byType=l}get awsS3(){return this.byType.awsS3}get awsCodeCommit(){return this.byType.awsCodeCommit}get azureBlobStorage(){return this.byType.azureBlobStorage}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(w=>w.byUrl(l)).filter(Boolean);if(E.length>1){const w=E.filter(Z=>!(Z instanceof At));w.length!==0&&(E=w)}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,s.ku)(l)}resolveEditUrl(l){const E=this.byUrl(l);return E?E.resolveEditUrl(l):l}}var Ue=t(55309);class Le{static fromConfig(l){return je.fromConfig(l)}}const an=(0,Ue.y)({id:"integration.scmintegrations"})},36021:(H,S,t)=>{"use strict";t.d(S,{U:()=>m,F:()=>u});var s=t(59869),a=t(45250);const x="github.com",p="https://api.github.com",b="https://raw.githubusercontent.com";function h(v){const g=v.getOptionalString("host")??x;let C=v.getOptionalString("apiBaseUrl"),O=v.getOptionalString("rawBaseUrl");const P=v.getOptionalString("token")?.trim(),B=v.getOptionalConfigArray("apps")?.map(L=>({appId:L.getNumber("appId"),clientId:L.getString("clientId"),clientSecret:L.getString("clientSecret"),webhookSecret:L.getOptionalString("webhookSecret"),privateKey:L.getString("privateKey"),allowedInstallationOwners:L.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,s.HO)(g))throw new Error(`Invalid GitHub integration config, '${g}' is not a valid host`);return C?C=(0,a.trimEnd)(C,"/"):g===x&&(C=p),O?O=(0,a.trimEnd)(O,"/"):g===x&&(O=b),{host:g,apiBaseUrl:C,rawBaseUrl:O,token:P,apps:B}}function d(v){const g=v.map(h);return g.some(C=>C.host===x)||g.push({host:x,apiBaseUrl:p,rawBaseUrl:b}),g}class m{integrationConfig;static factory=({config:g})=>{const C=d(g.getOptionalConfigArray("integrations.github")??[]);return(0,s.oS)(C.map(O=>new m(O)),O=>O.config.host)};constructor(g){this.integrationConfig=g}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){return u((0,s.ku)(g),"tree")}resolveEditUrl(g){return u(g,"edit")}parseRateLimitInfo(g){return{isRateLimited:g.status===429||g.status===403&&g.headers.get("x-ratelimit-remaining")==="0"}}}function u(v,g){return v.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(C,O,P,B)=>`//${O}/${P}/${B}/${g}/`)}},59869:(H,S,t)=>{"use strict";t.d(S,{AY:()=>h,HO:()=>b,ku:()=>m,oS:()=>d});var s=t(52536),a=t.n(s),x=t(45250),p=t.n(x);function b(v){const g=new URL("http://example.com");return g.host=v,g.host===v}function h(v){try{return new URL(v),!0}catch{return!1}}function d(v,g){return{list(){return v},byUrl(C){try{const O=typeof C=="string"?new URL(C):C;return v.find(P=>g(P)===O.host)}catch{return}},byHost(C){return v.find(O=>g(O)===C)}}}function m(v){const{url:g,base:C,lineNumber:O}=v;try{return new URL(g),g}catch{}let P;if(g.startsWith("/")){const{href:B,filepath:L}=a()(C);P=new URL(B);const I=(0,x.trimEnd)(P.pathname.substring(0,P.pathname.length-L.length),"/");P.pathname=`${I}${g}`}else P=new URL(g,C);return P.search=new URL(C).search,O&&(P.hash=`L${O}`),P.toString()}function u(v){beforeAll(()=>v.listen({onUnhandledRequest:"error"})),afterAll(()=>v.close()),afterEach(()=>v.resetHandlers())}},71543:(H,S,t)=>{"use strict";var s={};t.r(s),t.d(s,{TechDocsPlugin:()=>b.Ju});var a=t(31085),x=t(25873),p=t(18690),b=t(39278),h=t(8915),d=t(72020),m=t(99730),u=t(64947),v=t(12173),g=t(22020),C=t(68146),O=t(73657);function P({children:r}){return(0,p.Ri)()?(0,a.jsx)(a.Fragment,{children:r}):(0,a.jsx)(p.fS,{children:r})}const B=()=>(0,a.jsx)(v.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),L=({step:r,error:e})=>{let n="";return r==="load-config"?n=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(n=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,a.jsx)(P,{children:(0,a.jsx)(v.M,{statusMessage:n,stack:e.stack})})},I=({error:r,resetError:e,plugin:n})=>(0,a.jsx)(g.b,{title:`Error in ${n?.getId()}`,defaultExpanded:!0,error:r,children:(0,a.jsx)(u.A,{variant:"outlined",onClick:e,children:"Retry"})}),M={Progress:C.k,Router:O.Kd,NotFoundErrorPage:B,BootErrorPage:L,ErrorBoundaryFallback:I},$="Invalid discovery URL pattern,";class W{parts;static compile(e){const n=e.split(/\{\{\s*pluginId\s*\}\}/),o=n.join("pluginId");let i;try{i=new URL(o)}catch{throw new Error(`${$} URL '${o}' is invalid`)}if(i.hash)throw new Error(`${$} URL must not have a hash`);if(i.search)throw new Error(`${$} URL must not have a query`);if(o.endsWith("/"))throw new Error(`${$} URL must not end with a slash`);return new W(n)}constructor(e){this.parts=e}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}}class X{endpoints;defaultEndpoint;static fromConfig(e,n){const o=n?.pathPattern??"/api/{{ pluginId }}",i=e.getString("backend.baseUrl"),c=e.getOptionalConfigArray("discovery.endpoints")?.flatMap(A=>{const y=typeof A.get("target")=="object"?A.getOptionalString("target.external"):A.getString("target");if(!y)return[];const R=W.compile(y);return A.getStringArray("plugins").map(N=>[N,R])});return new X(new Map(c),W.compile(`${i}${o}`))}constructor(e,n){this.endpoints=e,this.defaultEndpoint=n}async getBaseUrl(e){const n=this.endpoints.get(e);return n?n.getBaseUrl(e):this.defaultEndpoint.getBaseUrl(e)}}var z=t(96403),Y=t.n(z);class K{isClosed=!1;terminatingError;observable=new(Y())(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(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,o){const i=typeof e=="function"?{next:e,error:n,complete:o}:e;return this.observable.subscribe(i)}}class dt{isClosed;currentValue;terminatingError;observable;constructor(e){this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(Y())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(n.next(this.currentValue),this.subscribers.add(n),()=>{this.subscribers.delete(n)}))}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(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,o){const i=typeof e=="function"?{next:e,error:n,complete:o}:e;return this.observable.subscribe(i)}}class G{subject=new K;post(e){this.subject.next(e)}alert$(){return this.subject}}class Q{captureEvent(e){}}class J{alertApi;errorApi;constructor(e,n){this.alertApi=e,this.errorApi=n}post(e,n){return n?.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,n)}error$(){return this.errorApi.error$()}}class ct{subject=new K;post(e,n){this.subject.next({error:e,context:n})}error$(){return this.subject}}class pt{static forward(e,n){window.addEventListener("unhandledrejection",o=>{e.post(o.reason,n)})}}const yt=new Map;class At{namespace;errorApi;constructor(e,n){this.namespace=e,this.errorApi=n,this.subscribers=new Set,this.observable=new(Y())(o=>(this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}static hasSubscribed=!1;static create(e){return new At(e.namespace??"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[n,o]of yt.entries())e.key?.startsWith(n)&&o.handleStorageChange(e.key)})}get(e){return this.snapshot(e).value}snapshot(e){let n,o="absent";try{const i=localStorage.getItem(this.getKeyName(e));i&&(n=JSON.parse(i,(c,A)=>(typeof A=="object"&&A!==null&&Object.freeze(A),A)),o="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:n,presence:o}}forBucket(e){const n=`${this.namespace}/${e}`;return yt.has(n)||yt.set(n,new At(n,this.errorApi)),yt.get(n)}async set(e,n){localStorage.setItem(this.getKeyName(e),JSON.stringify(n)),this.notifyChanges(e)}async remove(e){localStorage.removeItem(this.getKeyName(e)),this.notifyChanges(e)}observe$(e){return At.hasSubscribed||(At.addStorageEventListener(),At.hasSubscribed=!0),this.observable.filter(({key:n})=>n===e)}handleStorageChange(e){if(!e?.startsWith(this.namespace))return;const n=e?.slice(`${this.namespace}/`.length);n.includes("/")||this.notifyChanges(decodeURIComponent(n))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const n=this.snapshot(e);for(const o of this.subscribers)o.next(n)}subscribers;observable}function Ot(r){let e=r.baseImplementation||t.g.fetch;const n=[r.middleware??[]].flat().reverse();for(const o of n)e=o.apply(e);return{fetch:e}}class It{identityApi;allowUrl;headerName;headerValue;static create(e){const n=ut(e),o=e.header?.name||"authorization",i=e.header?.value||(c=>`Bearer ${c}`);return new It(e.identityApi,n,o,i)}static getDiscoveryUrlPrefixes(e){return(e.getOptionalConfigArray("discovery.endpoints")||[]).flatMap(o=>{const i=typeof o.get("target")=="object"?o.getString("target.external"):o.getString("target");return o.getStringArray("plugins").map(A=>i.replace(/\{\{\s*pluginId\s*\}\}/g,A))})}constructor(e,n,o,i){this.identityApi=e,this.allowUrl=n,this.headerName=o,this.headerValue=i}apply(e){return async(n,o)=>{const i=new Request(n,o),{token:c}=await this.identityApi.getCredentials();return i.headers.get(this.headerName)||typeof c!="string"||!c||!this.allowUrl(i.url)?e(n,o):(i.headers.set(this.headerName,this.headerValue(c)),e(i))}}}function ut(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?lt(r.urlPrefixAllowlist):r.config?lt([r.config.getString("backend.baseUrl"),...It.getDiscoveryUrlPrefixes(r.config)]):()=>!1}function lt(r){const e=r.map(n=>n.replace(/\/$/,""));return n=>e.some(o=>n===o||n.startsWith(`${o}/`))}function xt(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class gt{discoveryApi;constructor(e){this.discoveryApi=e}apply(e){return async(n,o)=>{const i=new Request(n,o),c="plugin://";if(!i.url.startsWith(c))return e(n,o);const{hostname:A,pathname:y,search:R,hash:N,username:tt,password:mt}=new URL(`http://${i.url.substring(c.length)}`);let St=await this.discoveryApi.getBaseUrl(A);if(tt||mt){const Dt=new URL(St),Zt=`${tt}${mt?`:${mt}`:""}@`;St=`${Dt.protocol}//${Zt}${Dt.host}${Dt.pathname}`}const Tt=`${xt(St,y)}${R}${N}`;return e(Tt,typeof n=="string"||bt(n)?o:n)}}}function bt(r){return typeof r=="object"&&r?.constructor===URL}class Rt{static resolvePluginProtocol(e){return new gt(e.discoveryApi)}static injectIdentityAuth(e){return It.create(e)}constructor(){}}function it(r,e){for(const n of e)if(!r.has(n))return!1;return!0}function ft(r,...e){const n=new Set(r);for(const o of e)for(const i of o)n.add(i);return n}class vt{requests=[];subject=new dt(this.getCurrentPending());request(e){return new Promise((n,o)=>{this.requests.push({scopes:e,resolve:n,reject:o}),this.subject.next(this.getCurrentPending())})}resolve(e,n){this.requests=this.requests.filter(o=>it(e,o.scopes)?(o.resolve(n),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(n=>n.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((n,o)=>ft(n,o.scopes),this.requests[0].scopes);return{scopes:e,resolve:n=>{e&&this.resolve(e,n)},reject:n=>{e&&this.reject(n)}}}}class st{subject=new K;currentRequests=[];handlerCount=0;createAuthRequester(e){const n=new vt,o=this.handlerCount;return this.handlerCount++,n.pending().subscribe({next:i=>{const c=this.currentRequests.slice(),A=this.makeAuthRequest(i,e);A?c[o]=A:delete c[o],this.currentRequests=c,this.subject.next(c.filter(Boolean))}}),i=>n.request(i)}makeAuthRequest(e,n){const{scopes:o}=e;if(o)return{provider:n.provider,trigger:async()=>{const i=await n.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 Et(r){return new Promise((e,n)=>{const o=r.width||500,i=r.height||700,c=window.screen.width/2-o/2,A=window.screen.height/2-i/2,y=new URL(r.url).origin,R=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${o},height=${i},top=${A},left=${c}`);let N="";if(!R||typeof R.closed>"u"||R.closed){const Tt=new Error("Failed to open auth popup.");Tt.name="PopupRejectedError",n(Tt);return}const tt=Tt=>{if(Tt.source!==R||Tt.origin!==y)return;const{data:Dt}=Tt;if(Dt.type==="config_info"){N=Dt.targetOrigin;return}if(Dt.type!=="authorization_response")return;const Zt=Dt;if("error"in Zt){const me=new Error(Zt.error.message);me.name=Zt.error.name,n(me)}else e(Zt.response);St()},mt=setInterval(()=>{if(R.closed){const Tt=`Login failed, ${N&&N!==window.location.origin?`Incorrect app origin, expected ${N}`:"popup was closed"}`,Dt=new Error(Tt);Dt.name="PopupClosedError",n(Dt),St()}},100);function St(){window.removeEventListener("message",tt),clearInterval(mt)}window.addEventListener("message",tt)})}let at=!1;function U(r){return[...r].join(" ")}class V{discoveryApi;environment;provider;joinScopesFunc;authRequester;sessionTransform;enableExperimentalRedirectFlow;popupOptions;constructor(e){const{configApi:n,discoveryApi:o,environment:i,provider:c,joinScopes:A=U,oauthRequestApi:y,sessionTransform:R=tt=>tt,popupOptions:N}=e;!at&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),at=!0),this.enableExperimentalRedirectFlow=n?n.getOptionalBoolean("enableExperimentalRedirectFlow")??!1:!1,this.authRequester=y.createAuthRequester({provider:c,onAuthRequest:async tt=>this.enableExperimentalRedirectFlow?this.executeRedirect(tt):this.showPopup(tt)}),this.discoveryApi=o,this.environment=i,this.provider=c,this.joinScopesFunc=A,this.sessionTransform=R,this.popupOptions=N}async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const n=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e.scopes)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(i=>{throw new Error(`Auth refresh request failed, ${i}`)});if(!n.ok){const i=new Error(`Auth refresh request failed, ${n.statusText}`);throw i.status=n.status,i}const o=await n.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(n=>{throw new Error(`Logout request failed, ${n}`)});if(!e.ok){const n=new Error(`Logout request failed, ${e.statusText}`);throw n.status=e.status,n}}async showPopup(e){const n=this.joinScopesFunc(e),o=await this.buildUrl("/start",{scope:n,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,A=await Et({url:o,name:`${this.provider.title} Login`,width:i,height:c});return await this.sessionTransform(A)}async executeRedirect(e){const n=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:n,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,n){const o=await this.discoveryApi.getBaseUrl("auth"),i=this.buildQueryString({...n,env:this.environment});return`${o}/${this.provider.id}${e}${i}`}buildQueryString(e){if(!e)return"";const n=Object.entries(e).map(([o,i])=>{if(typeof i=="string")return`${encodeURIComponent(o)}=${encodeURIComponent(i)}`;if(i)return encodeURIComponent(o)}).filter(Boolean).join("&");return n?`?${n}`:""}}function rt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}class Ct{options;constructor(e){this.options=e}sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const o=this.options.sessionScopes(e);return rt(o,n)}getExtendedScope(e,n){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(n)for(const i of n)o.add(i);return o}}var ht=t(55309),Bt=function(r){return r.SignedIn="SignedIn",r.SignedOut="SignedOut",r}({});const Nt=(0,ht.y)({id:"core.auth.google"}),Kt=(0,ht.y)({id:"core.auth.github"}),Jt=(0,ht.y)({id:"core.auth.okta"}),kt=(0,ht.y)({id:"core.auth.gitlab"}),Vt=(0,ht.y)({id:"core.auth.microsoft"}),jt=(0,ht.y)({id:"core.auth.onelogin"}),Gt=(0,ht.y)({id:"core.auth.bitbucket"}),ie=(0,ht.y)({id:"core.auth.bitbucket-server"}),ue=(0,ht.y)({id:"core.auth.atlassian"}),zt=(0,ht.y)({id:"core.auth.vmware-cloud"});class ne{subject=new dt(Bt.SignedOut);signedIn=!1;setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Bt.SignedIn:Bt.SignedOut))}sessionState$(){return this.subject}}class ce{connector;helper;sessionScopesFunc;sessionShouldRefreshFunc;stateTracker=new ne;refreshPromise;currentSession;constructor(e){const{connector:n,defaultScopes:o=new Set,sessionScopes:i,sessionShouldRefresh:c}=e;this.connector=n,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 rt(c,i)&&(this.currentSession=o),o}catch(o){if(e.optional)return;throw o}}if(!e.instantPopup)try{const n=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=n,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({scopes:this.helper.getExtendedScope(this.currentSession,e)});try{const n=await this.refreshPromise;if(!this.helper.sessionExistsAndHasScope(n,e))throw new Error("Refreshed session did not receive the required scopes");return this.stateTracker.setIsSignedIn(!0),n}finally{delete this.refreshPromise}}}const Ye={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class ee{static createAuthConnector(e){if("authConnector"in e)return e.authConnector;const{scopeTransform:n=N=>N,configApi:o,discoveryApi:i,environment:c="development",provider:A=Ye,oauthRequestApi:y,popupOptions:R}=e;return new V({configApi:o,discoveryApi:i,environment:c,provider:A,oauthRequestApi:y,sessionTransform({backstageIdentity:N,...tt}){const mt={...tt,providerInfo:{idToken:tt.providerInfo.idToken,accessToken:tt.providerInfo.accessToken,scopes:ee.normalizeScopes(tt.providerInfo.scope,{scopeTransform:n}),expiresAt:tt.providerInfo.expiresInSeconds?new Date(Date.now()+tt.providerInfo.expiresInSeconds*1e3):void 0}};return N&&(mt.backstageIdentity={token:N.token,identity:N.identity,expiresAt:N.expiresInSeconds?new Date(Date.now()+N.expiresInSeconds*1e3):void 0}),mt},popupOptions:R})}static create(e){const{defaultScopes:n=[],scopeTransform:o=A=>A}=e,i=ee.createAuthConnector(e),c=new ce({connector:i,defaultScopes:new Set(n),sessionScopes:A=>A.providerInfo.scopes,sessionShouldRefresh:A=>{let y=1/0;return A.providerInfo?.expiresAt&&(y=Math.min(y,(A.providerInfo.expiresAt.getTime()-Date.now())/1e3)),A.backstageIdentity?.expiresAt&&(y=Math.min(y,(A.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),y<60*3}});return new ee({sessionManager:c,scopeTransform:o})}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,n){const o=ee.normalizeScopes(e,{scopeTransform:this.scopeTransform});return(await this.sessionManager.getSession({...n,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,n){if(!e)return new Set;const o=Array.isArray(e)?e:e.split(/[\s|,]/).filter(Boolean),i=n?n.scopeTransform(o):o;return new Set(i)}}const on={id:"google",title:"Google",icon:()=>null},We="https://www.googleapis.com/auth/";class Re{static create(e){const{configApi:n,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:A=on,defaultScopes:y=["openid",`${We}userinfo.email`,`${We}userinfo.profile`]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:i,provider:A,environment:c,defaultScopes:y,scopeTransform(R){return R.map(N=>N==="openid"?N:N==="profile"||N==="email"?`${We}userinfo.${N}`:N.startsWith(We)?N:`${We}${N}`)}})}}const Ve={id:"microsoft",title:"Microsoft",icon:()=>null};class se{oauth2;configApi;environment;provider;oauthRequestApi;discoveryApi;scopeTransform;static MicrosoftGraphID="00000003-0000-0000-c000-000000000000";static create(e){return new se(e)}constructor(e){const{configApi:n,environment:o="development",provider:i=Ve,oauthRequestApi:c,discoveryApi:A,defaultScopes:y=["openid","offline_access","profile","email","User.Read"],scopeTransform:R=N=>N.concat("offline_access")}=e;this.configApi=n,this.environment=o,this.provider=i,this.oauthRequestApi=c,this.discoveryApi=A,this.scopeTransform=R,this.oauth2={[se.MicrosoftGraphID]:ee.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:y})}}microsoftGraph(){return this.oauth2[se.MicrosoftGraphID]}static resourceForScopes(e){const n=[...new Set(e.split(" ").map(se.resourceForScope).filter(i=>i!=="openid"))];if(n.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${n.join(", ")}. Access tokens can only have a single audience.`));const o=n[0]??se.MicrosoftGraphID;return Promise.resolve(o)}static resourceForScope(e){const n=e.match(/^(?<resourceURI>.*)\/(?<scp>[^\/]*)$/)?.groups;if(n){const{resourceURI:o}=n;return o.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return se.MicrosoftGraphID}}async getAccessToken(e,n){const o=e===void 0?se.MicrosoftGraphID:await se.resourceForScopes(Array.isArray(e)?e.join(" "):e);return o in this.oauth2||(this.oauth2[o]=ee.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[o].getAccessToken(e,n)}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 qe={id:"github",title:"GitHub",icon:()=>null};class tn{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=qe,oauthRequestApi:A,defaultScopes:y=["read:user"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const hn={id:"okta",title:"Okta",icon:()=>null},en=new Set(["openid","profile","email","phone","address","groups","offline_access"]),nn="okta.";class pn{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=hn,oauthRequestApi:A,defaultScopes:y=["openid","email","profile","offline_access"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y,scopeTransform(R){return R.map(N=>en.has(N)||N.startsWith(nn)?N:`${nn}${N}`)}})}}const Ke={id:"gitlab",title:"GitLab",icon:()=>null};class ze{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Ke,oauthRequestApi:A,defaultScopes:y=["read_user"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const He={id:"onelogin",title:"onelogin",icon:()=>null},be=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Qe="onelogin.";class Ze{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=He,oauthRequestApi:A}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(y){return y.map(R=>be.has(R)||R.startsWith(Qe)?R:`${Qe}${R}`)}})}}const je={id:"bitbucket",title:"Bitbucket",icon:()=>null};class Ue{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=je,oauthRequestApi:A,defaultScopes:y=["account"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const Le={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class an{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Le,oauthRequestApi:A,defaultScopes:y=["PROJECT_ADMIN"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const T={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=T,oauthRequestApi:A}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i})}}const E={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class w{static create(e){const{configApi:n,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:A=E,defaultScopes:y=["openid"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:i,provider:A,environment:c,defaultScopes:y})}}var Z=t(12935),_=t(57405),ot=t(65461),Mt=t(36017),Wt=t(99303),Yt=t(39837);const re=(0,ht.y)({id:"core.storage"});var Me=t(70795),he=t(16009);const qt=(0,ht.y)({id:"core.oauthrequest"});var te=t(96824),pe=t(70835),sn=t(10288),gn=t.n(sn),le=t(20938),$t=t(46195),$e=t(54241),Ln=t(13646);const fn=$t.z.lazy(()=>$t.z.object({rule:$t.z.string(),resourceType:$t.z.string(),params:$t.z.record($t.z.any()).optional()}).or($t.z.object({anyOf:$t.z.array(fn).nonempty()})).or($t.z.object({allOf:$t.z.array(fn).nonempty()})).or($t.z.object({not:fn}))),Mn=$t.z.object({result:$t.z.literal($e.b.ALLOW).or($t.z.literal($e.b.DENY))}),as=$t.z.object({result:$t.z.array($t.z.union([$t.z.literal($e.b.ALLOW),$t.z.literal($e.b.DENY)]))}).or(Mn),is=$t.z.union([$t.z.object({result:$t.z.literal($e.b.ALLOW).or($t.z.literal($e.b.DENY))}),$t.z.object({result:$t.z.literal($e.b.CONDITIONAL),pluginId:$t.z.string(),resourceType:$t.z.string(),conditions:fn})]),Hs=(r,e)=>$t.z.object({items:$t.z.array($t.z.intersection($t.z.object({id:$t.z.string()}),r)).refine(n=>n.length===e.size&&n.every(({id:o})=>e.has(o)),{message:"Items in response do not match request"})});class cs{enabled;discovery;enableBatchedRequests;constructor(e){this.discovery=e.discovery,this.enabled=e.config.getOptionalBoolean("permission.enabled")??!1,this.enableBatchedRequests=e.config.getOptionalBoolean("permission.EXPERIMENTAL_enableBatchedRequests")??!1}async authorize(e,n){return this.enabled?this.enableBatchedRequests?this.makeBatchedRequest(e,n):this.makeRequest(e,Mn,n):e.map(o=>({result:$e.b.ALLOW}))}async authorizeConditional(e,n){return this.enabled?this.makeRequest(e,is,n):e.map(o=>({result:$e.b.ALLOW}))}async makeRequest(e,n,o){const i={items:e.map(y=>({id:le.A(),...y}))},A=(await this.makeRawRequest(i,n,o)).items.reduce((y,R)=>(y[R.id]=R,y),{});return i.items.map(y=>A[y.id])}async makeBatchedRequest(e,n){const o={};for(const A of e){const{permission:y,resourceRef:R}=A;(0,Ln.OL)(y)?(o[y.name]||={permission:y,resourceRef:[],id:le.A()},R&&o[y.name].resourceRef?.push(R)):o[y.name]||={permission:y,id:le.A()}}const c=(await this.makeRawRequest({items:Object.values(o)},as,n)).items.reduce((A,y)=>(A[y.id]=y,A),{});return e.map(A=>{const{id:y}=o[A.permission.name],R=c[y];return Array.isArray(R.result)?{result:A.resourceRef?R.result.shift():R.result[0]}:{result:R.result}})}async makeRawRequest(e,n,o){const i=await this.discovery.getBaseUrl("permission"),c=await gn()(`${i}/authorize`,{method:"POST",body:JSON.stringify(e),headers:{...this.getAuthorizationHeader(o?.token),"content-type":"application/json"}});if(!c.ok)throw await pe.o.fromResponse(c);const A=await c.json();return Hs(n,new Set(e.items.map(({id:y})=>y))).parse(A)}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}}class bn{permissionClient;identityApi;constructor(e,n){this.permissionClient=e,this.identityApi=n}static create(e){const{config:n,discovery:o,identity:i}=e,c=new cs({discovery:o,config:n});return new bn(c,i)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}}const ls=[(0,Z.b)({api:_.I,deps:{configApi:ot.U},factory:({configApi:r})=>X.fromConfig(r)}),(0,Z.b)({api:Mt.k,deps:{},factory:()=>new G}),(0,Z.b)({api:Wt.c,deps:{},factory:()=>new Q}),(0,Z.b)({api:Yt.m,deps:{alertApi:Mt.k},factory:({alertApi:r})=>{const e=new J(r,new ct);return pt.forward(e,{hidden:!1}),e}}),(0,Z.b)({api:re,deps:{errorApi:Yt.m},factory:({errorApi:r})=>At.create({errorApi:r})}),(0,Z.b)({api:Me.a,deps:{configApi:ot.U,identityApi:he.K,discoveryApi:_.I},factory:({configApi:r,identityApi:e,discoveryApi:n})=>Ot({middleware:[Rt.resolvePluginProtocol({discoveryApi:n}),Rt.injectIdentityAuth({identityApi:e,config:r})]})}),(0,Z.b)({api:qt,deps:{},factory:()=>new st}),(0,Z.b)({api:Nt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Re.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Vt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>se.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Kt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>tn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Jt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>pn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:kt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ze.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:jt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ze.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Gt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ue.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:ie,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>an.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:ue,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>l.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:zt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>w.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:te.x,deps:{discovery:_.I,identity:he.K,config:ot.U},factory:({config:r,discovery:e,identity:n})=>bn.create({config:r,discovery:e,identity:n})})];var Bn=t(14451),jn=t(27799),Un=t(94389),ds=t(20947),us=t(20473),$n=t(45917),hs=t(39347),Fn=t(63309),mn=t(82451),ps=t(85121),Nn=t(17400),gs=t(42226),fs=t(69550),kn=t(52755),Wn=t(89350),ms=t(8911),Sn=t(33602),On=t(48108),ys=t(77225),Kn=t(55700),zn=t(71865),vs=t(80109),Es=t(15303),As=t(39330);const xs={brokenImage:jn.A,catalog:ms.A,scaffolder:ds.A,techdocs:us.A,search:$n.A,chat:hs.A,dashboard:Fn.A,docs:mn.A,email:ps.A,github:gs.A,group:Sn.A,help:fs.A,"kind:api":Nn.A,"kind:component":Wn.A,"kind:domain":Bn.A,"kind:group":Sn.A,"kind:location":kn.A,"kind:system":Un.A,"kind:user":On.A,"kind:resource":Kn.A,"kind:template":zn.A,user:On.A,warning:ys.A,star:vs.A,unstarred:Es.A,externalLink:As.A};var Cs=t(58733),bs=t(55288),Ss=t(91360),Os=t(50868),Ps=t(12285),Ts=t(87271),Rs=t(64636);Rs.A.configure(r=>`v5-${r}`);const Hn=(0,bs.A)({productionPrefix:"jss4-"});function Vn(r){const{children:e,theme:n,noCssBaseline:o=!1}=r,i=n.getTheme("v4"),c=n.getTheme("v5");let A;o||(A=(0,a.jsx)(Cs.Ay,{}));let y=(0,a.jsxs)(a.Fragment,{children:[A,e]});return i&&(y=(0,a.jsx)(Ss.Ay,{generateClassName:Hn,children:(0,a.jsx)(Os.A,{theme:i,children:y})})),c&&(y=(0,a.jsx)(Ps.A,{injectFirst:!0,children:(0,a.jsx)(Ts.A,{theme:c,children:y})})),y}const Gn={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 ws=t(98392),Is=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")`},Ne={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 we(r){const{colors:e,shape:n,options:o}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,A=`${n}, ${c}`,y=o?.fontColor??"#FFFFFF";return{colors:e,shape:n,backgroundImage:A,fontColor:y}}const Ds={home:we({colors:Ne.teal,shape:Fe.wave}),documentation:we({colors:Ne.pinkSea,shape:Fe.wave2}),tool:we({colors:Ne.purpleSky,shape:Fe.round}),service:we({colors:Ne.marineBlue,shape:Fe.wave}),website:we({colors:Ne.veryBlue,shape:Fe.wave}),library:we({colors:Ne.rubyRed,shape:Fe.wave}),other:we({colors:Ne.darkGrey,shape:Fe.wave}),app:we({colors:Ne.toastyOrange,shape:Fe.wave}),apis:we({colors:Ne.teal,shape:Fe.wave2}),card:we({colors:Ne.greens,shape:Fe.wave})},yn=16,Yn='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',Ls="home",Pn={htmlFontSize:yn,fontFamily:Yn,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 Vs(r){const{palette:e,htmlFontSize:n=yn,fontFamily:o=Yn,defaultPageTheme:i=Ls,pageTheme:c=Ds,typography:A}=r;if(!c[i])throw new Error(`${i} is not defined in pageTheme.`);return Pn.htmlFontSize=n,Pn.fontFamily=o,{palette:e,typography:A??Pn,page:c[i],getPageTheme:({themeId:y})=>c[y]??c[i]}}var f=t(80012);const D={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,f.a)(r.palette.textVerySubtle,.2):(0,f.e$)(r.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.mode==="dark"?(0,f.a)(r.palette.textVerySubtle,.2):(0,f.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,f.e$)(r.palette.link,.3),background:(0,f.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"},"&:focus svg":{opacity:.5},"&.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"}}}},j=r=>(...e)=>{const n=e.length===0?[1]:e,o=(i,c)=>typeof i=="string"?i:c*i;return n.map(i=>{const c=o(i,r);return typeof c=="number"?`${c}px`:c}).join(" ")};function F(r,e){if(!e||typeof e=="string")return;const n=typeof e=="function"?e(r):e;if(n)return{"@global":n}}function k(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const n={...r},o=r.spacing(1);return typeof o=="number"&&(n.spacing=j(o)),Object.fromEntries(Object.entries(e).map(([i,c])=>typeof c=="function"?[i,c({theme:n})]:[i,c]))}return e}}const q=/^&.Mui-([\w-]+)$/;function et(r){let e=r;if(!r||typeof r!="object")return e;for(const n of Object.keys(r)){const o=r[n];if(!(!o||typeof o!="object"))for(const i of Object.keys(o)){const c=i,A=c.match(q);if(A){const[,y]=A,{[c]:R,...N}=o;R&&(e={...e,[n]:N,[y]:R})}}}return e}function Pt(r,e={}){const n={},o={};for(const i of Object.keys(e)){const c=e[i];c&&("styleOverrides"in c&&(i==="MuiCssBaseline"?n[i]=F(r,c.styleOverrides):n[i]=et(k(r,c.styleOverrides))),"defaultProps"in c&&(o[i]=c.defaultProps))}return{overrides:n,props:o}}class wt{#t=new Map;constructor(e,n){this.#t=new Map,e&&this.#t.set("v4",e),n&&this.#t.set("v5",n)}getTheme(e){return this.#t.get(e)}}function Ut(r){const e=Vs(r),n={...D,...r.components},o=(0,Is.A)({...e,components:n}),i=Pt(o,n),c={...(0,ws.A)(e),...i};return new wt(c,o)}function Lt(r){const e=adaptV4Theme(r),n=createTheme(r);return new wt(n,createV5Theme(e))}const Ft={light:Ut({palette:Gn.light}),dark:Ut({palette:Gn.dark})};var Xt=t(75962),ge=t(87145);const de=[{id:"light",title:"Light Theme",variant:"light",icon:(0,a.jsx)(ge.A,{}),Provider:({children:r})=>(0,a.jsx)(Vn,{theme:Ft.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,a.jsx)(Xt.A,{}),Provider:({children:r})=>(0,a.jsx)(Vn,{theme:Ft.dark,children:r})}];var nt=t(14041),Se=t(73466),ye=t(39067),Ht=t.n(ye);class Qt{holders;constructor(...e){this.holders=e}get(e){for(const n of this.holders){const o=n.get(e);if(o)return o}}}var fe=t(43836),ve=t(10602);const oe=(0,fe.tK)("api-context"),ae=r=>{const{apis:e,children:n}=r,o=(0,nt.useContext)(oe)?.atVersion(1),i=o?new Qt(e,o):e;return(0,a.jsx)(oe.Provider,{value:(0,ve.B)({1:i}),children:n})};ae.propTypes={apis:Ht().shape({get:Ht().func.isRequired}).isRequired,children:Ht().node};const Ee=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function ke(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Oe(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Oe):Object.fromEntries(Object.entries(r).map(([e,n])=>[e,Oe(n)]))}function Ge(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:Ge(e);if(typeof r!="object"||Array.isArray(r))return r;const n=ke(e)?e:{},o={};for(const i of new Set([...Object.keys(r),...Object.keys(n)])){const c=Ge(r[i],n[i]);c!==void 0&&(o[i]=c)}return o}function Je(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 _t={type(r,e,n,o){return`Invalid type in config for key '${r}' in '${e}', got ${n}, wanted ${o}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,n){return`Unable to convert config value for key '${r}' in '${e}' to a ${n}`}};class cn{data;context;fallback;prefix;filteredKeys;notifiedFilteredKeys;static fromConfigs(e){return e.length===0?new cn(void 0):e.reduce((n,{data:o,context:i,filteredKeys:c,deprecatedKeys:A})=>{const y=new cn(o,i,n);if(y.filteredKeys=c,A)for(const{key:R,description:N}of A)console.warn(`The configuration key '${R}' of ${i} is deprecated and may be removed soon. ${N||""}`);return y},void 0)}constructor(e,n="mock-config",o,i=""){this.data=e,this.context=n,this.fallback=o,this.prefix=i,this.notifiedFilteredKeys=new Set}has(e){const n=this.readValue(e);return n===null?!1:n!==void 0?!0:this.fallback?.has(e)??!1}keys(){const e=this.data?Object.keys(this.data):[],n=this.fallback?.keys()??[];return[...new Set([...e,...n])].filter(o=>this.data?.[o]!==null)}get(e){const n=this.getOptional(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e??""),this.context));return n}getOptional(e){const n=Oe(this.readValue(e)),o=this.fallback?.getOptional(e);if(n!==null)return n===void 0?Ge(o):o===void 0?Ge(n):Ge(n,o)}getConfig(e){const n=this.getOptionalConfig(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalConfig(e){const n=this.readValue(e),o=this.fallback?.getOptionalConfig(e);if(ke(n))return this.copy(n,e,o);if(n!==null){if(n!==void 0)throw new TypeError(_t.type(this.fullKey(e),this.context,Je(n),"object"));return o}}getConfigArray(e){const n=this.getOptionalConfigArray(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalConfigArray(e){const n=this.readConfigValue(e,o=>{if(!Array.isArray(o))return{expected:"object-array"};for(const[i,c]of o.entries())if(!ke(c))return{expected:"object-array",value:c,key:`${e}[${i}]`};return!0});if(n)return n.map((o,i)=>this.copy(o,`${e}[${i}]`))}getNumber(e){const n=this.getOptionalNumber(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalNumber(e){const n=this.readConfigValue(e,i=>typeof i=="number"||typeof i=="string"||{expected:"number"});if(typeof n=="number"||n===void 0)return n;const o=Number(n);if(!Number.isFinite(o))throw new Error(_t.convert(this.fullKey(e),this.context,"number"));return o}getBoolean(e){const n=this.getOptionalBoolean(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalBoolean(e){const n=this.readConfigValue(e,i=>typeof i=="boolean"||typeof i=="number"||typeof i=="string"||{expected:"boolean"});if(typeof n=="boolean"||n===void 0)return n;const o=String(n).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(_t.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const n=this.getOptionalString(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalString(e){return this.readConfigValue(e,n=>typeof n=="string"&&n!==""||{expected:"string"})}getStringArray(e){const n=this.getOptionalStringArray(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalStringArray(e){return this.readConfigValue(e,n=>{if(!Array.isArray(n))return{expected:"string-array"};for(const[o,i]of n.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,n,o){const i=new cn(e,this.context,o,this.fullKey(n));return i.filteredKeys=this.filteredKeys,i}readConfigValue(e,n){const o=this.readValue(e);if(o===void 0)return this.fallback?.readConfigValue(e,n);if(o===null)return;const i=n(o);if(i!==!0){const{key:c=e,value:A=o,expected:y}=i;throw new TypeError(_t.type(this.fullKey(c),this.context,Je(A),y))}return o}readValue(e){const n=e?e.split("."):[];for(const i of n)if(!Ee.test(i))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let o=this.data;for(const[i,c]of n.entries())if(ke(o))o=o[c];else if(o!=null){const A=this.fullKey(n.slice(0,i).join("."));throw new TypeError(_t.type(A,this.context,Je(o),"object"))}return o}}const ln="theme";class Qn{themes;static createWithStorage(e){const n=new Qn(e);if(!window.localStorage)return n;const o=window.localStorage.getItem(ln)??void 0;return n.setActiveThemeId(o),n.activeThemeId$().subscribe(i=>{i?window.localStorage.setItem(ln,i):window.localStorage.removeItem(ln)}),window.addEventListener("storage",i=>{if(i.key===ln){const c=localStorage.getItem(ln)??void 0;n.setActiveThemeId(c)}}),n}activeThemeId;subject;constructor(e){this.themes=e,this.subject=new dt(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 vn=t(63636);function Gs(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 Wr{registeredFeatureFlags=[];flags;registerFlag(e){Gs(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===vn.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 n=Array.from(this.flags.entries()).filter(([,o])=>o===vn.S.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(n)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const n=JSON.parse(e);if(typeof n!="object"||n===null||Array.isArray(n))return new Map;const o=Object.entries(n).filter(([i,c])=>(Gs(i),c===vn.S.Active));return new Map(o)}catch{return new Map}}}const Zn=(0,ht.y)({id:"core.apptheme"}),Ys=(0,ht.y)({id:"core.applanguage"});var Kr=t(56038),Qs=function(r){return r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static",r}(Qs||{});class zr{factories=new Map;register(e,n){const o=Qs[e],i=this.factories.get(n.api.id);return i&&i.priority>=o?!1:(this.factories.set(n.api.id,{priority:o,factory:n}),!0)}get(e){const n=this.factories.get(e.id);if(n)return n.factory}getAllApis(){const e=new Set;for(const{factory:n}of this.factories.values())e.add(n.api);return e}}class Ms{factories;static validateFactories(e,n){for(const o of n){const i=[o],c=new Set;for(;i.length;){const A=i.shift(),y=e.get(A);if(y)for(const R of Object.values(y.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,n=[]){const o=this.apis.get(e.id);if(o)return o;const i=this.factories.get(e);if(!i)return;if(n.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const c=this.loadDeps(e,i.deps,[...n,i.api]),A=i.factory(c);return this.apis.set(e.id,A),A}loadDeps(e,n,o){const i={};for(const c in n)if(n.hasOwnProperty(c)){const A=n[c],y=this.load(A,o);if(!y)throw new Error(`No API factory available for dependency ${A} of dependent ${e}`);i[c]=y}return i}}function Hr(r){const e={};for(const o in r.collectors)r.collectors.hasOwnProperty(o)&&(e[o]=r.collectors[o]());const n=[{node:nt.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;n.length!==0;){const{node:o,parent:i,contexts:c}=n.shift();nt.Children.forEach(o,A=>{if(!(0,nt.isValidElement)(A))return;const y={};for(const R in e)if(e.hasOwnProperty(R)){const N=e[R];y[R]=N.visit(N.accumulator,A,i,c[R])}for(const R of r.discoverers){const N=R(A);N&&n.push({node:N,parent:A,contexts:y})}})}return Object.fromEntries(Object.entries(e).map(([o,i])=>[o,i.accumulator]))}function Jn(r,e){return()=>({accumulator:r(),visit:e})}function Vr(r){return r.props?.children}function Gr(r){if(r.props?.path&&r.props?.element)return r.props?.element}var Pe=t(19402);const Yr=Jn(()=>new Set,(r,e)=>{const n=(0,Pe.E)(e,"core.plugin");n&&r.add(n)});var Tn=t(72427);const Zs=r=>{const{children:e}=r,n=(0,Tn.gf)(vn.B),o="with"in r?n.isActive(r.with):!n.isActive(r.without);return(0,a.jsx)(a.Fragment,{children:o?e:null})};(0,Pe.h)(Zs,"core.featureFlagged",!0);const Xn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function _n(r){const e=r;return e?.type?e.type.displayName??e.type.name??String(e.type):String(e)}const Js=r=>{const e=new Set;return r&&e.add(r),e};function Xs(r,e=new Array){return nt.Children.forEach(r,n=>{if(!(0,nt.isValidElement)(n))return;const o=(0,Pe.E)(n,"core.mountPoint");if(o){const i=(0,Pe.E)(n,"core.plugin");e.push({routeRef:o,plugin:i})}Xs(n.props.children,e)}),e}const Qr=Jn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,o)=>{if(o?.isElementAncestor)return o;if(n?.props.element===e)return{...o,isElementAncestor:!0};const i=e.props?.path,c=(0,Pe.E)(e,"core.mountPoint");if(c&&i)throw new Error(`Path property may not be set directly on a routable extension "${_n(e)}"`);const A=o?.obj?.children??r.objects;if(i!==void 0){if(typeof i!="string")throw new Error(`Element path must be a string at "${_n(e)}"`);const y=i.startsWith("/")?i.slice(1):i,R=e.props.element;if((0,Pe.E)(e,"core.gatherMountPoints")){if(R)throw new Error(`Mount point gatherers may not have an element prop "${_n(e)}"`);const N={path:y,element:"gathered",routeRefs:new Set,caseSensitive:!!e.props?.caseSensitive,children:[Xn],plugins:new Set};return A.push(N),{obj:N,gatherPath:y,routeRef:o?.routeRef,gatherRouteRef:o?.routeRef}}if(R){const[N,...tt]=Xs(R);if(tt.length>0)throw new Error(`Route element with path "${i}" may not contain multiple routable extensions`);if(!N)return o;const{routeRef:mt,plugin:St}=N,Tt={path:y,element:"mounted",routeRefs:new Set([mt]),caseSensitive:!!e.props?.caseSensitive,children:[Xn],plugins:Js(St)};return A.push(Tt),r.paths.set(mt,y),r.parents.set(mt,o?.routeRef),{obj:Tt,routeRef:mt??o?.routeRef,gatherPath:y,gatherRouteRef:o?.gatherRouteRef}}}if(c){if(o?.gatherPath===void 0)throw new Error(`Routable extension "${_n(e)}" with mount point "${c}" must be assigned a path`);o?.obj?.routeRefs.add(c);const y=(0,Pe.E)(e,"core.plugin");return y&&o?.obj?.plugins.add(y),r.paths.set(c,o.gatherPath),r.parents.set(c,o?.gatherRouteRef),{...o,routeRef:c}}return o}),Zr=Jn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,o)=>{if(n?.props.element===e)return o;let i=o?.obj,c=o?.routeRef,A=o?.sticky;const y=e.props?.path,R=i?.children??r.objects,N=!!e.props?.caseSensitive;let tt=o?.path;if((0,Pe.E)(e,"core.gatherMountPoints")){if(!y)throw new Error("Mount point gatherer must have a path");tt=y}const mt=e.props?.element;let St=(0,Pe.E)(e,"core.mountPoint");if(!St&&(0,nt.isValidElement)(mt)&&(St=(0,Pe.E)(mt,"core.mountPoint")),St){let Dt=y;if(tt&&(Dt?tt=void 0:Dt=tt),!Dt)throw new Error("Mounted routable extension must have a path");r.paths.set(St,Dt),c&&A?(r.parents.set(St,c),y&&(c=St,A=!1)):(r.parents.set(St,c),c=St),y?(i={caseSensitive:N,path:y,element:"mounted",routeRefs:new Set([St]),children:[Xn],plugins:Js((0,Pe.E)(e.props.element,"core.plugin"))},R.push(i)):i?.routeRefs.add(St)}if((0,Pe.E)(e,"core.gatherMountPoints")&&(A=!0),(0,Pe.E)(e,"core.gatherMountPoints")){if(!y)throw new Error("Mount point gatherer must have a path");St||(i={caseSensitive:N,path:y,element:"gathered",routeRefs:new Set,children:[Xn],plugins:o?.obj?.plugins||new Set},R.push(i))}return{obj:i,path:tt,routeRef:c,sticky:A}}),Jr=Jn(()=>new Set,(r,e)=>{if(e.type===Zs){const n=e.props;r.add("with"in n?n.with:n.without)}});var Rn=t(21613),Xr=t(63544);const wn=(0,Xr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function _s(r){return r[wn]==="absolute"}function qs(r){return r[wn]==="sub"}function _r(r){return r[wn]==="external"}function qn(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var qr=t(46155),to=t.n(qr);function eo(r,e,n){let o,i="";if(_s(r))o=r;else if(qs(r))o=r.parent,i=r.path;else if(_r(r)){const y=n.get(r);if(!y)return[void 0,""];if(_s(y))o=y;else if(qs(y))o=y.parent,i=y.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${y}`)}else throw r[wn]?new Error(`Unknown or invalid route ref type, ${r[wn]}`):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 A=qn(c,i);return[o,A]}function no(r,e,n,o,i){const c=(0,Rn.ue)(i,e)??[],A=Array();let y=-1;for(let tt=r;tt&&(y=c.findIndex(mt=>mt.route.routeRefs.has(tt)),y===-1);tt=o.get(tt))A.unshift(tt);A.length===0&&(y-=1);const R=y===-1?"":c[y].pathname,N=A.slice(0,-1).map(tt=>{const mt=n.get(tt);if(mt===void 0)throw new Error(`No path for ${tt}`);if(mt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${tt} as it has parameters`);return mt});return`${qn(R,...N)}/`}class so{routePaths;routeParents;routeObjects;routeBindings;appBasePath;constructor(e,n,o,i,c){this.routePaths=e,this.routeParents=n,this.routeObjects=o,this.routeBindings=i,this.appBasePath=c}resolve(e,n){const[o,i]=eo(e,this.routePaths,this.routeBindings);if(!o)return;let c;typeof n=="string"?c=this.trimPath(n):n.pathname?c={...n,pathname:this.trimPath(n.pathname)}:c=n;const A=this.appBasePath+no(o,c,this.routePaths,this.routeParents,this.routeObjects);return(...[R])=>{const N=R&&to()(R,tt=>typeof tt=="string"?tt.replaceAll(/[&?#;\/]/g,mt=>encodeURIComponent(mt)):tt);return qn(A,(0,Rn.tW)(i,N))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}}const ro=(0,fe.tK)("routing-context"),oo=({routePaths:r,routeParents:e,routeObjects:n,routeBindings:o,basePath:i="",children:c})=>{const A=new so(r,e,n,o,i),y=(0,ve.B)({1:A});return(0,a.jsx)(ro.Provider,{value:y,children:c})};function ao(r,e){const n=new Set(e.values());n.delete(void 0);for(const o of e.keys()){if(n.has(o))continue;let i=o,c="";for(;i;){const y=r.get(i);if(y===void 0)throw new Error(`No path for ${i}`);c=qn(y,c),i=e.get(i)}const A=c.match(/:(\w+)/g);if(A){for(let y=0;y<A.length;y++)for(let R=y+1;R<A.length;R++)if(A[R]===A[y])throw new Error(`Parameter ${A[R]} is duplicated in path ${c}`)}}}function io(r,e){for(const n of e)if(n.externalRoutes){for(const[o,i]of Object.entries(n.externalRoutes))if(!i.optional&&!r.has(i))throw new Error(`External route '${o}' of the '${n.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const co=(0,fe.tK)("app-context"),lo=({appContext:r,children:e})=>{const n=(0,ve.B)({1:r});return(0,a.jsx)(co.Provider,{value:n,children:e})},tr="app",uo=`${tr}-auth-cookie-expires-at`,ho=5*6e4,er=5e3,po=2,go=5*6e4;function fo({discoveryApi:r,fetchApi:e,errorApi:n}){let o=!1,i,c=!0,A=er;const y="BroadcastChannel"in window?new BroadcastChannel(uo):void 0,R=St=>{const Tt=(1+3*Math.random())*6e4;return Math.max(St-Date.now(),ho)-Tt},N=async()=>{try{const Tt=`${await r.getBaseUrl(tr)}/.backstage/auth/v1/cookie`,Dt=await e.fetch(Tt,{credentials:"include"});if(!Dt.ok)throw new Error(`Request failed with status ${Dt.status} ${Dt.statusText}, see request towards ${Tt} for more details`);const Zt=await Dt.json();if(!Zt.expiresAt)throw new Error("No expiration date in response");const me=Date.parse(Zt.expiresAt);if(Number.isNaN(me))throw new Error("Invalid expiration date in response");c=!0,y?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(me).toISOString()}}),mt(R(me))}catch(St){c?(c=!1,A=er):(A=Math.min(go,A*po),console.error("Session cookie refresh failed",St),n.post(new Error("Session refresh failed, see developer console for details"))),mt(A)}},tt=St=>{const{data:Tt}=St;if(!(Tt===null||typeof Tt!="object")&&"action"in Tt&&Tt.action==="COOKIE_REFRESH_SUCCESS"){const Dt=Date.parse(Tt.payload.expiresAt);if(Number.isNaN(Dt)){console.warn("Received invalid expiration from session refresh channel");return}mt(R(Dt))}};function mt(St){o||(i&&clearTimeout(i),i=setTimeout(N,St))}return y?.addEventListener("message",tt),N(),()=>{o=!0,i&&clearTimeout(i),y?.removeEventListener("message",tt),y?.close()}}function nr(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Bs(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class mo{target;waitForTarget;resolveTarget=()=>{};signOutTargetUrl="/";#t;constructor(){this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}setTarget(e,n){this.target=e,this.signOutTargetUrl=n.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw nr("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Bs("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw nr("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Bs("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(e=>e.getProfileInfo())}async getBackstageIdentity(){const e=await this.waitForTarget.then(n=>n.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 Bs("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 n=fo(e);this.#t=async()=>{n();const o=await e.discoveryApi.getBaseUrl("app");try{await fetch(`${o}/.backstage/auth/v1/cookie`,{method:"DELETE",credentials:"include"})}catch{}}}}var yo=t(1394);function vo(r,e,n){if(r!==void 0){const i=n.find(c=>c.id===r);if(i)return i}if(e){const i=n.find(c=>c.variant==="dark");if(i)return i}const o=n.find(i=>i.variant==="light");return o||n[0]}const Eo=()=>{const r=(0,nt.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,n]=(0,nt.useState)(r.matches);return(0,nt.useEffect)(()=>{const o=i=>{n(i.matches)};return r.addListener(o),()=>{r.removeListener(o)}},[r]),e};function sr({children:r}){const e=(0,Tn.gf)(Zn),n=(0,yo.A)(e.activeThemeId$(),e.getActiveThemeId()),o=window.matchMedia?Eo():!1,i=vo(n,o,e.getInstalledThemes());if(!i)throw new Error("App has no themes");return(0,a.jsx)(i.Provider,{children:r})}const rr=async()=>Ao();function Ao(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=new Array,n=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(n){if(!Array.isArray(n))throw new Error("Static configuration has invalid format");e.push(...n)}const o=document.querySelectorAll('script[type="backstage.io/config"]');if(o.length>0)for(const c of o)try{const A=c.textContent;if(!A)throw new Error("tag is empty");let y;try{y=JSON.parse(A)}catch(R){throw new Error(`failed to parse config; ${R}`)}if(!Array.isArray(y))throw new Error("data is not an array");e.push(...y)}catch(A){throw new Error(`Failed to load config from script tag, ${A.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 xo{apis=[];add(e,n){return this.apis.push([e.id,n]),n}build(){return new En(new Map(this.apis))}}class En{apis;static builder(){return new xo}static from(e){return new En(new Map(e.map(([n,o])=>[n.id,o])))}static with(e,n){return new En(new Map([[e.id,n]]))}constructor(e){this.apis=e}with(e,n){return new En(new Map([...this.apis,[e.id,n]]))}get(e){return this.apis.get(e.id)}}function Co(r){const e=new Map,n=new Map;for(const o of r){for(const[i,c]of Object.entries(o.routes??{})){const A=`${o.getId()}.${i}`;if(e.has(A))throw new Error(`Unexpected duplicate route '${A}'`);e.set(A,c)}for(const[i,c]of Object.entries(o.externalRoutes??{})){const A=`${o.getId()}.${i}`;if(n.has(A))throw new Error(`Unexpected duplicate external route '${A}'`);n.set(A,c)}}return{routes:e,externalRoutes:n}}function bo(r,e,n){const o=Co(n),i=new Map,c=new Set;r&&r({bind:(R,N)=>{for(const[tt,mt]of Object.entries(N)){const St=R[tt];if(!St)throw new Error(`Key ${tt} is not an existing external route`);if(!mt&&!St.optional)throw new Error(`External route ${tt} is required but was ${mt===!1?"disabled":"not provided"}`);mt?i.set(St,mt):mt===!1&&c.add(St)}}});const A=e.getOptionalConfig("app.routes.bindings")?.get();if(A)for(const[y,R]of Object.entries(A)){if(!So(R))throw new Error(`Invalid config at app.routes.bindings['${y}'], value must be a non-empty string or false`);const N=o.externalRoutes.get(y);if(!N)throw new Error(`Invalid config at app.routes.bindings, '${y}' is not a valid external route`);if(!(i.has(N)||c.has(N)))if(R===!1)c.add(N);else{const tt=o.routes.get(R);if(!tt)throw new Error(`Invalid config at app.routes.bindings['${y}'], '${R}' is not a valid route`);i.set(N,tt)}}for(const y of o.externalRoutes.values())if(!i.has(y)&&!c.has(y)){const R="getDefaultTarget"in y?y.getDefaultTarget():void 0;if(R){const N=o.routes.get(R);N&&i.set(y,N)}}return i}function So(r){return!!(r===!1||typeof r=="string"&&r)}function In(){const[r]=(0,p.AV)((0,a.jsx)(p.qh,{index:!0,element:(0,a.jsx)("div",{})}));return!r.index}const or=(0,nt.createContext)(void 0);var ar=t(82266),ir=t(93368),Oo=t(25862);const Po=(r,e)=>{try{const o=(0,Rn.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 A;i.plugins.size===1&&(A=i.plugins.values().next().value);const y=Object.entries(o?.params||{}).reduce((R,[N,tt])=>(tt!==void 0&&N!=="*"&&(R[N]=tt),R),{});return{extension:"App",pluginId:A?.getId()||"root",...c?{routeRef:c.id}:{},_routeNodeType:i.element,params:y}}catch{return}},To=({pathname:r,search:e,hash:n,attributes:o})=>{const i=(0,ir.s)();return(0,nt.useEffect)(()=>{i.captureEvent("navigate",`${r}${e}${n}`,{attributes:o})},[i,r,e,n,o]),null},ts=({routeObjects:r})=>{const{pathname:e,search:n,hash:o}=(0,p.zy)(),{params:i,...c}=Po(e,r)||{params:{}};return(0,a.jsx)(Oo.Ig,{attributes:c,children:(0,a.jsx)(To,{pathname:e,search:n,hash:o,attributes:i})})};function Ro(r){return In()?js(r):""}function js(r){let{pathname:e}=new URL(r.getOptionalString("app.baseUrl")??"/","http://sample.dev");return e=e.replace(/\/*$/,""),e}function cr({component:r,appIdentityProxy:e,children:n}){const[o,i]=(0,nt.useState)(),c=(0,Tn.gf)(ot.U),A=js(c);return o?(e.setTarget(o,{signOutTargetUrl:A||"/"}),(0,a.jsx)(a.Fragment,{children:n})):(0,a.jsx)(r,{onSignInSuccess:i})}function lr(r){const{Router:e,SignInPage:n}=(0,ar.n)().getComponents(),o=(0,Tn.gf)(ot.U),i=js(o),c=`${i}/*`,A=(0,nt.useContext)(or);if(!A)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:y,appIdentityProxy:R}=A;return n?In()?(0,a.jsxs)(e,{children:[(0,a.jsx)(ts,{routeObjects:y}),(0,a.jsx)(cr,{component:n,appIdentityProxy:R,children:(0,a.jsx)(p.BV,{children:(0,a.jsx)(p.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(ts,{routeObjects:y}),(0,a.jsx)(cr,{component:n,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||"/"}),In()?(0,a.jsxs)(e,{children:[(0,a.jsx)(ts,{routeObjects:y}),(0,a.jsx)(p.BV,{children:(0,a.jsx)(p.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(ts,{routeObjects:y}),r.children]}))}(0,Pe.h)(lr,"core.type","AppRouter");const Dn="language",Xe="en";class es{static create(e){const n=e?.availableLanguages??[Xe];if(n.length!==new Set(n).size)throw new Error(`Supported languages may not contain duplicates, got '${n.join("', '")}'`);if(!n.includes(Xe))throw new Error(`Supported languages must include '${Xe}'`);const o=e?.defaultLanguage??Xe;if(!n.includes(o))throw new Error(`Initial language must be one of the supported languages, got '${o}'`);return new es(n,o)}static createWithStorage(e){const n=es.create(e);if(!window.localStorage)return n;const o=window.localStorage.getItem(Dn),{languages:i}=n.getAvailableLanguages();return o&&i.includes(o)&&n.setLanguage(o),n.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(Dn)&&window.localStorage.setItem(Dn,c)}),window.addEventListener("storage",c=>{if(c.key===Dn){const A=localStorage.getItem(Dn)??void 0;A&&n.setLanguage(A)}}),n}#t;#e;#n;constructor(e,n){this.#t=e,this.#e=n,this.#n=new dt({language:this.#e})}getAvailableLanguages(){return{languages:this.#t.slice()}}setLanguage(e){const n=e??Xe;if(n!==this.#e){if(n&&!this.#t.includes(n))throw new Error(`Failed to change language to '${n}', available languages are '${this.#t.join("', '")}'`);this.#e=n,this.#n.next({language:n})}}getLanguage(){return{language:this.#e}}language$(){return this.#n}}var wo=t(47304),Io=t(99833),dr=t(93184);function ur(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}class Do{onLoad;#t;#e;#n;constructor(e){this.onLoad=e,this.#t=new Set,this.#e=new Map,this.#n=new Map}addTranslationResource(e){const n=(0,Io.Y)(e);for(const o of n.resources){const i=this.#s(o.language,n.id);this.#n.has(i)||this.#n.set(i,o.loader)}}#s(e,n){return`${e}/${n}`}needsLoading(e,n){const o=this.#s(e,n);return this.#n.get(o)?!this.#t.has(o):!1}async load(e,n){const o=this.#s(e,n),i=this.#n.get(o);if(!i||this.#t.has(o))return;const c=this.#e.get(o);if(c){await c;return}const A=i().then(y=>{this.onLoad({language:e,namespace:n,messages:y.messages}),this.#t.add(o)},y=>{throw this.#t.add(o),y});this.#e.set(o,A),await A}}class Us{#t;#e;#n;static fromI18n(e){const n=e.services.interpolator,o=n.format;let i;return n.format=(c,A,y,R)=>A?o(c,A,y,R):i?.(c,A,y,R)??c,new Us(Math.random().toString(36).substring(2,8),c=>{i=c})}constructor(e,n){this.#t=n,this.#e=e,this.#n=new RegExp(`\\$${e}\\(([^)]+)\\)`)}wrapT(e){return(n,o)=>{let i;this.#t(y=>{if((0,nt.isValidElement)(y)){i||(i=new Map);const R=i.size.toString();return i.set(R,y),`$${this.#e}(${R})`}return y});const c=e(n,o);if(!i)return c;const A=c.split(this.#n);return(0,nt.createElement)(nt.Fragment,null,...A.map((y,R)=>R%2===0?y:i?.get(y)).filter(Boolean))}}}class $s{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),o=(0,wo.Q_)({fallbackLng:Xe,supportedLngs:n,interpolation:{escapeValue:!1,alwaysFormat:!0},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(o.init(),!o.isInitialized)throw new Error("i18next was unexpectedly not initialized");const i=Us.fromI18n(o),{language:c}=e.languageApi.getLanguage();c!==Xe&&o.changeLanguage(c);const A=new Do(N=>{o.addResourceBundle(N.language,N.namespace,ur(N.messages),!1,!0)}),y=e?.resources||[];for(let N=y.length-1;N>=0;N--){const tt=y[N];tt.$$type==="@backstage/TranslationResource"?A.addTranslationResource(tt):tt.$$type==="@backstage/TranslationMessages"&&o.addResourceBundle(Xe,tt.id,ur(tt.messages),!0,!1)}const R=new $s(o,A,e.languageApi.getLanguage().language,i);return e.languageApi.language$().subscribe(({language:N})=>{R.#a(N)}),R}#t;#e;#n;#s;#o=new Set;#r=new Set;constructor(e,n,o,i){this.#t=e,this.#e=n,this.#n=o,this.#s=i}getTranslation(e){const n=(0,dr.v)(e);return this.#c(n),this.#i(n)}translation$(e){const n=(0,dr.v)(e);return this.#c(n),new(Y())(o=>{let i={};const c=()=>{i={};const y=i;this.#e.load(this.#n,n.id).then(()=>{if(y===i){const R=this.#i(n);R.ready&&o.next(R)}},R=>{y===i&&o.error(Array.isArray(R)?R[0]:R)})},A=()=>{const y=this.#i(n);y.ready?o.next(y):c()};return this.#e.needsLoading(this.#n,n.id)&&c(),this.#r.add(A),()=>{this.#r.delete(A)}})}#a(e){this.#n!==e&&(this.#n=e,this.#t.changeLanguage(e),this.#r.forEach(n=>n()))}#i(e){if(this.#e.needsLoading(this.#n,e.id))return{ready:!1};const n=this.#t.getFixedT(null,e.id);return{ready:!0,t:this.#s.wrapT(n)}}#c(e){if(this.#o.has(e.id))return;this.#o.add(e.id);const n=e.getDefaultMessages();this.#t.addResourceBundle(Xe,e.id,n,!0,!1);const o=e.getDefaultResource();o&&this.#e.addTranslationResource(o)}}function hr(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 Lo(r){const e=cn.fromConfigs(r),n=e.getOptionalString("app.baseUrl"),o=e.getOptionalString("backend.baseUrl");let i=r,c,A;if(n&&o){const y=new URL(n).origin,R=new URL(o).origin;if(y===R){const N=hr(o);o!==N&&(c=N)}}if(n){const y=hr(n);n!==y&&(A=y)}return(A||c)&&(i=i.concat({data:{app:A&&{baseUrl:A},backend:c&&{baseUrl:c}},context:"relative-resolver"})),i}function Mo(){return(document.querySelector('meta[name="backstage-app-mode"]')?.getAttribute("content")??"public")==="protected"}function Bo(r,e,n){const o=!!r,i=(0,Se.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:A=sr}=e;return c?{node:(0,a.jsx)(ae,{apis:En.with(Zn,n),children:(0,a.jsx)(A,{children:c})})}:{api:cn.fromConfigs(i.value?.length?Lo(i.value):[])}}class jo{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 Uo{apiHolder;configApi;apis;icons;plugins;featureFlags;components;themes;configLoader;defaultApis;bindRoutes;appLanguageApi;translationResources;appIdentityProxy=new mo;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??rr,this.defaultApis=e.defaultApis??[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new zr,this.appLanguageApi=es.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 n=this.getProvider();return()=>(0,a.jsx)(n,{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 jo(this);let n,o;return({children:c})=>{const A=(0,nt.useRef)(!0),y=(0,nt.useMemo)(()=>Qn.createWithStorage(this.themes),[]),{routing:R,featureFlags:N}=(0,nt.useMemo)(()=>{const Zt=In();Zt&&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",placeholder:"All results"},body:{emptyDataSourceMessage:"No records to display"},pagination:{firstTooltip:"First Page",labelDisplayedRows:"{from}-{to} of {count}",labelRowsSelect:"rows",lastTooltip:"Last Page",nextTooltip:"Next Page",previousTooltip:"Previous Page"},toolbar:{search:"Filter"},header:{actions:"Actions"}},alertDisplay:{message_one:"({{ count }} newer message)",message_other:"({{ count }} newer messages)"},autoLogout:{stillTherePrompt:{title:"Logging out due to inactivity",buttonText:"Yes! Don't log me out"}},proxiedSignInPage:{title:"You do not appear to be signed in. Please try reloading the browser page."}}})},25862:(H,S,t)=>{"use strict";t.d(S,{Ig:()=>d,pn:()=>h});var s=t(31085),a=t(43836),x=t(10602),p=t(14041);const b=(0,a.tK)("analytics-context"),h=()=>{const u=(0,p.useContext)(b);if(u===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const v=u.atVersion(1);if(v===void 0)throw new Error("No context found for version 1.");return v},d=u=>{const{attributes:v,children:g}=u,O={...h(),...v},P=(0,x.B)({1:O});return(0,s.jsx)(b.Provider,{value:P,children:g})};function m(u,v){const g=C=>_jsx(d,{attributes:v,children:_jsx(u,{...C})});return g.displayName=`WithAnalyticsContext(${u.displayName||u.name||"Component"})`,g}},67237:(H,S,t)=>{"use strict";t.d(S,{J:()=>p,t:()=>x});var s=t(63544);const a=(0,s.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),x="_ROUTABLE-EXTENSION-RENDERED";class p{analyticsApi;context;constructor(h,d={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=h,this.context=d,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,d,{value:m,attributes:u}={}){const{_routeNodeType:v,...g}=this.context;if(h===x){a.mostRecentGatheredNavigation&&(a.mostRecentRoutableExtensionRender={context:{...g,extension:"App"}});return}if(a.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender})}catch(C){console.warn("Error during analytics event capture. %o",C)}a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0}if(h==="navigate"&&v==="gathered"&&g.pluginId==="root"){a.mostRecentGatheredNavigation={action:h,subject:d,value:m,attributes:u,context:g};return}try{this.analyticsApi.captureEvent({action:h,subject:d,value:m,attributes:u,context:g})}catch(C){console.warn("Error during analytics event capture. %o",C)}}}},93368:(H,S,t)=>{"use strict";t.d(S,{s:()=>d});var s=t(25862),a=t(72427),x=t(99303),p=t(14041),b=t(67237);function h(){try{return(0,a.gf)(x.c)}catch{return{captureEvent:()=>{}}}}function d(){const m=(0,p.useRef)(null),u=(0,s.pn)(),v=h();function g(){return m.current===null&&(m.current=new b.J(v)),m.current}const C=g();return C.setContext(u),C}},36017:(H,S,t)=>{"use strict";t.d(S,{k:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.alert"})},99303:(H,S,t)=>{"use strict";t.d(S,{c:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.analytics"})},65461:(H,S,t)=>{"use strict";t.d(S,{U:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.config"})},57405:(H,S,t)=>{"use strict";t.d(S,{I:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.discovery"})},39837:(H,S,t)=>{"use strict";t.d(S,{m:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.error"})},63636:(H,S,t)=>{"use strict";t.d(S,{B:()=>x,S:()=>a});var s=t(55309),a=function(p){return p[p.None=0]="None",p[p.Active=1]="Active",p}({});const x=(0,s.y)({id:"core.featureflags"})},70795:(H,S,t)=>{"use strict";t.d(S,{a:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.fetch"})},16009:(H,S,t)=>{"use strict";t.d(S,{K:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.identity"})},56038:(H,S,t)=>{"use strict";t.d(S,{J:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.translation"})},55309:(H,S,t)=>{"use strict";t.d(S,{y:()=>a});class s{config;constructor(p){if(this.config=p,!p.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 '${p.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(x){return new s(x)}},12935:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});function s(a,x){return"id"in a?{api:a,deps:{},factory:()=>x}:a}},72427:(H,S,t)=>{"use strict";t.d(S,{Q2:()=>p,gf:()=>b});var s=t(31085),a=t(43836),x=t(97142);function p(){const d=(0,a.qO)("api-context");if(!d)throw new x.EH("API context is not available");const m=d.atVersion(1);if(!m)throw new x.EH("ApiContext v1 not available");return m}function b(d){const u=p().get(d);if(!u)throw new x.EH(`No implementation available for ${d}`);return u}function h(d){return function(u){const v=C=>{const O=p(),P={};for(const B in d)if(d.hasOwnProperty(B)){const L=d[B],I=O.get(L);if(!I)throw new NotImplementedError(`No implementation available for ${L}`);P[B]=I}return _jsx(u,{...C,...P})},g=u.displayName||u.name||"Component";return v.displayName=`withApis(${g})`,v}}},82266:(H,S,t)=>{"use strict";t.d(S,{n:()=>a});var s=t(43836);const a=()=>{const x=(0,s.qO)("app-context");if(!x)throw new Error("App context is not available");const p=x.atVersion(1);if(!p)throw new Error("AppContext v1 not available");return p}},19402:(H,S,t)=>{"use strict";t.d(S,{E:()=>b,h:()=>p});var s=t(63544);const a=(0,s.Q)("component-data-store",()=>new WeakMap),x="__backstage_data";function p(h,d,m){const u=h;let v=u[x]??a.get(h);if(v||(v={map:new Map},Object.defineProperty(u,x,{enumerable:!1,configurable:!0,writable:!1,value:v}),a.set(h,v)),v.map.has(d)){const g=h.displayName||h.name;throw new Error(`Attempted to attach duplicate data "${d}" to component "${g}"`)}v.map.set(d,m)}function b(h,d){if(!h)return;const m=h.type;if(!m)return;const u=m[x]??a.get(m);if(u)return u.map.get(d)}},88758:(H,S,t)=>{"use strict";t.d(S,{NC:()=>C,zZ:()=>O,QJ:()=>g});var s=t(31085),a=t(14041),x=t(93368),p=t(25862),b=t(82266),h=t(9222),d=t(19402);class m extends a.Component{static getDerivedStateFromError(B){return{error:B}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:B}=this.state,{app:L,plugin:I}=this.props,{ErrorBoundaryFallback:M}=L.getComponents();return B?(0,s.jsx)(M,{error:B,resetError:this.handleErrorReset,plugin:I}):this.props.children}}var u=t(67237),v=t(97142);function g(P){const{component:B,mountPoint:L,name:I}=P;return O({component:{lazy:()=>B().then(M=>{const $=X=>{const z=(0,x.s)();try{(0,h.S)(L)}catch(Y){if(typeof Y=="object"&&Y!==null){const{message:K}=Y;if(typeof K=="string"&&K.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${L} 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 Y}return(0,a.useEffect)(()=>{z.captureEvent(u.t,"")},[z]),(0,s.jsx)(M,{...X})},W=I||M.displayName||M.name||"LazyComponent";return $.displayName=`RoutableExtension(${W})`,$})},data:{"core.mountPoint":L},name:I})}function C(P){const{component:B,name:L}=P;return O({component:B,name:L})}function O(P){const{data:B={},name:L}=P;L||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let I;if("lazy"in P.component){const $=P.component.lazy;I=(0,a.lazy)(()=>$().then(W=>({default:W}),W=>{const X=L?` of the ${L} extension`:"";throw new v.HK(`Failed lazy loading${X}, try to reload the page`,W)}))}else I=P.component.sync;const M=L||I.displayName||I.name||"Component";return{expose($){const W=X=>{const z=(0,b.n)(),{Progress:Y}=z.getComponents(),K=B?.["core.mountPoint"];return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)(Y,{}),children:(0,s.jsx)(m,{app:z,plugin:$,children:(0,s.jsx)(p.Ig,{attributes:{pluginId:$.getId(),...L&&{extension:L},...K&&{routeRef:K.id}},children:(0,s.jsx)(I,{...X})})})})};(0,d.h)(W,"core.plugin",$),(0,d.h)(W,"core.extensionName",L);for(const[X,z]of Object.entries(B))(0,d.h)(W,X,z);return W.displayName=`Extension(${M})`,W}}}},82442:(H,S,t)=>{"use strict";t.d(S,{O:()=>d});var s=t(14041),a=t(19402),x=t(72427),p=t(63636);function b(m,u,v,g){return s.Children.toArray(m).flatMap(C=>{if(!(0,s.isValidElement)(C))return[];if(C.type===s.Fragment)return b(C.props.children,u,v,g);if((0,a.E)(C,"core.featureFlagged")){const O=C.props;return("with"in O?u.isActive(O.with):!u.isActive(O.without))?b(C.props.children,u,v,g):[]}if(v===void 0||v(C))return[C];if(g)throw new Error(g);return b(C.props.children,u,v,g)})}class h{node;featureFlagsApi;constructor(u,v){this.node=u,this.featureFlagsApi=v}selectByComponentData(u){const v=b(this.node,this.featureFlagsApi,g=>(0,a.E)(g,u.key)!==void 0,u.withStrictError);return new h(v,this.featureFlagsApi)}findComponentData(u){return b(this.node,this.featureFlagsApi,g=>(0,a.E)(g,u.key)!==void 0).map(g=>(0,a.E)(g,u.key)).filter(g=>g!==void 0)}getElements(){return b(this.node,this.featureFlagsApi)}}function d(m,u,v=[]){const g=(0,x.gf)(p.B),C=new h(m,g);return(0,s.useMemo)(()=>u(C),[m,...v])}},9803:(H,S,t)=>{"use strict";t.d(S,{i:()=>a});class s{config;constructor(p){this.config=p}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(p){return p.expose(this)}toString(){return`plugin{${this.config.id}}`}}function a(x){return new s(x)}},34569:(H,S,t)=>{"use strict";t.d(S,{H:()=>x});var s=t(59598);class a{id;params;[p=s.b];constructor(h,d){this.id=h,this.params=d,this[p]="absolute"}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function x(b){return new a(b.id,b.params??[])}var p},59598:(H,S,t)=>{"use strict";t.d(S,{b:()=>a});var s=t(63544);const a=(0,s.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:(H,S,t)=>{"use strict";t.d(S,{S:()=>p});var s=t(14041),a=t(18690),x=t(43836);function p(b){const{pathname:h}=(0,a.zy)(),d=(0,x.qO)("routing-context");if(!d)throw new Error("Routing context is not available");const m=d.atVersion(1),u=(0,s.useMemo)(()=>m&&m.resolve(b,{pathname:h}),[m,b,h]);if(!d)throw new Error("useRouteRef used outside of routing context");if(!m)throw new Error("RoutingContext v1 not available");const v="optional"in b&&b.optional;if(!u&&!v)throw new Error(`No path for ${b}`);return u}},93184:(H,S,t)=>{"use strict";t.d(S,{h:()=>p,v:()=>b});var s=t(99833);function a(h){const d=new Array;function m(u,v){for(const[g,C]of Object.entries(u))typeof C=="string"?d.push([v+g,C]):m(C,`${v}${g}.`)}return m(h,""),Object.fromEntries(d)}class x{#t;#e;#n;constructor(d){this.#t=d.id,this.#e=a(d.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#t}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#e}setDefaultResource(d){this.#n=d}getDefaultResource(){return this.#n}toString(){return`TranslationRef{id=${this.id}}`}}function p(h){const d=new x(h);return h.translations&&d.setDefaultResource((0,s.o)({ref:d,translations:h.translations})),d}function b(h){const d=h;if(d.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${d.$$type}'`);if(d.version!=="v1")throw new Error(`Invalid translation ref, bad version '${d.version}'`);return d}},99833:(H,S,t)=>{"use strict";t.d(S,{Y:()=>s,o:()=>a});function s(x){const p=x;if(p.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${p.$$type}'`);if(p.version!=="v1")throw new Error(`Invalid translation resource, bad version '${p.version}'`);return p}function a(x){return{$$type:"@backstage/TranslationResource",version:"v1",id:x.ref.id,resources:Object.entries(x.translations).map(([p,b])=>({language:p,loader:()=>b().then(h=>{const d=h.default;return{messages:d?.$$type==="@backstage/TranslationMessages"?d.messages:d}})}))}}},87849:(H,S,t)=>{"use strict";t.d(S,{i:()=>h});var s=t(14041),a=t(72427),x=t(39837),p=t(56038);const b=new WeakSet,h=d=>{const m=(0,a.gf)(x.m),u=(0,a.gf)(p.J),[v,g]=(0,s.useState)(()=>u.getTranslation(d)),C=(0,s.useMemo)(()=>u.translation$(d),[u,d]),O=(0,s.useCallback)(B=>{if(!b.has(d)){const L=`Failed to load translation resource '${d.id}'; caused by ${B}`;console.error(L),m.post(new Error(L)),b.add(d)}},[m,d]);(0,s.useEffect)(()=>{const B=C.subscribe({next(L){L.ready&&g(L)},error(L){O(L)}});return()=>{B.unsubscribe()}},[C,O]);const P=(0,s.useRef)(!0);if((0,s.useEffect)(()=>{P.current?P.current=!1:g(u.getTranslation(d))},[u,d]),!v.ready)throw new Promise(B=>{const L=C.subscribe({next(I){I.ready&&(L.unsubscribe(),B())},error(I){L.unsubscribe(),O(I),B()}})});return{t:v.t}}},70835:(H,S,t)=>{"use strict";t.d(S,{o:()=>x});var s=t(59750);async function a(p){try{const b=await p.text();if(b){if(p.headers.get("content-type")?.startsWith("application/json"))try{const h=JSON.parse(b);if(h.error&&h.response)return h}catch{}return{error:{name:"Error",message:`Request failed with status ${p.status} ${p.statusText}, ${b}`},response:{statusCode:p.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${p.status} ${p.statusText}`},response:{statusCode:p.status}}}class x extends Error{response;body;cause;statusCode;statusText;static async fromResponse(b){const h=await a(b),d=h.response.statusCode||b.status,m=b.statusText,u=`Request failed with ${d} ${m}`,v=(0,s.cy)(h.error);return new x({message:u,response:b,data:h,cause:v,statusCode:d,statusText:m})}constructor(b){super(b.message),this.name="ResponseError",this.response=b.response,this.body=b.data,this.cause=b.cause,this.statusCode=b.statusCode,this.statusText=b.statusText}}},93007:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});function s(x){if(typeof x!="object"||x===null||Array.isArray(x))return!1;const p=x;return!(typeof p.name!="string"||p.name===""||typeof p.message!="string")}function a(x){if(typeof x!="object"||x===null||Array.isArray(x))throw new Error(`Encountered invalid error, not an object, got '${x}'`);const p=x;if(typeof p.name!="string"||p.name==="")throw new Error(`Encountered error object without a name, got '${x}'`);if(typeof p.message!="string")throw new Error(`Encountered error object without a message, got '${x}'`)}},97142:(H,S,t)=>{"use strict";t.d(S,{HK:()=>C,m_:()=>d,EH:()=>v});var s=t(93007),a=t(59750);class x extends Error{cause;constructor(P,B){let L=P;if(B!==void 0){const I=(0,a.M5)(B);L?L+=`; caused by ${I}`:L=`caused by ${I}`}super(L),Error.captureStackTrace?.(this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,s.b)(B)?B:void 0}}class p extends null{name="InputError"}class b extends null{name="AuthenticationError"}class h extends null{name="NotAllowedError"}class d extends x{name="NotFoundError"}class m extends null{name="ConflictError"}class u extends null{name="NotModifiedError"}class v extends x{name="NotImplementedError"}class g extends null{}class C extends x{constructor(P,B){super(P,B),this.name=(0,s.b)(B)?B.name:"Error"}}},59750:(H,S,t)=>{"use strict";t.d(S,{M5:()=>h,cy:()=>b});var s=t(69655),a=t.n(s),x=t(93007);function p(d,m){const v={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(d)};return m?.includeStack||(delete v.stack,v.cause&&typeof v.cause=="object"&&"stack"in v.cause&&delete v.cause.stack),v}function b(d){const m=(0,s.deserializeError)(d);return d.stack||(m.stack=void 0),m}function h(d){if((0,x.b)(d)){const m=String(d);return m!=="[object Object]"?m:`${d.name}: ${d.message}`}return`unknown error '${d}'`}},96726:(H,S,t)=>{"use strict";t.d(S,{L:()=>Le,Y:()=>an});var s=t(59869);const a="amazonaws.com";function x(T){const l=T.getOptionalString("endpoint"),E=T.getOptionalBoolean("s3ForcePathStyle")??!1;let w,Z;if(l){try{const Yt=new URL(l);w=Yt.host,Z=Yt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${l}' is not a valid URL`)}if(Z!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${l}'`)}else w=a;const _=T.getOptionalString("accessKeyId"),ot=T.getOptionalString("secretAccessKey")?.trim(),Mt=T.getOptionalString("roleArn"),zt=T.getOptionalString("externalId");return{host:w,endpoint:l,s3ForcePathStyle:E,accessKeyId:_,secretAccessKey:ot,roleArn:Mt,externalId:zt}}function p(T){const l=T.map(x);return l.some(E=>E.host===a)||l.push({host:a}),l}class b{integrationConfig;static factory=({config:l})=>{const E=p(l.getOptionalConfigArray("integrations.awsS3")??[]);return(0,s.oS)(E.map(w=>new b(w)),w=>w.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,s.ku)(l)}resolveEditUrl(l){return l}}const h="console.aws.amazon.com";function d(T){const l=T.getOptionalString("accessKeyId"),E=T.getOptionalString("secretAccessKey")?.trim(),w=T.getOptionalString("roleArn"),Z=T.getOptionalString("externalId"),_=T.getString("region");return{host:T.getOptionalString("host")||`${_}.${h}`,accessKeyId:l,secretAccessKey:E,roleArn:w,externalId:Z,region:_}}function m(T){return T.map(d)}class u{integrationConfig;static factory=({config:l})=>{const E=m(l.getOptionalConfigArray("integrations.awsCodeCommit")??[]);return(0,s.oS)(E.map(w=>new u(w)),w=>w.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,s.ku)(l)}resolveEditUrl(l){const w=new URL(l).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!w)throw new Error("");const[,Z]=w;return v(l,Z,"edit")}}function v(T,l,E){const w=E==="edit"?"files/edit":E;return T.replace(new RegExp(`/codesuite/codecommit/repositories/${l}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${l}/${w}/`)}const g="GB";class C{static fromRepoUrl(l){const E=new URL(l);let w,Z,_;const ot=E.pathname.split("/").map(re=>decodeURIComponent(re));if(ot[2]==="_git"?(w=ot[1],Z=_=ot[3]):ot[3]==="_git"?(w=ot[1],Z=ot[2],_=ot[4]):ot[4]==="_git"&&(w=`${ot[1]}/${ot[2]}`,Z=ot[3],_=ot[5]),!w||!Z||!_)throw new Error("Azure URL must point to a git repository");const Mt=E.searchParams.get("path")??void 0;let zt;const Yt=E.searchParams.get("version");if(Yt){if(Yt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");zt=Yt.slice(2)}return new C(E.origin,w,Z,_,Mt,zt)}#t;#e;#n;#s;#o;#r;constructor(l,E,w,Z,_,ot){this.#t=l,this.#e=E,this.#n=w,this.#s=Z,this.#o=_,this.#r=ot}#a=(...l)=>{const E=new URL(this.#t);return E.pathname=l.map(w=>encodeURIComponent(w)).join("/"),E};toRepoUrl(){let l;return this.#n===this.#s?l=this.#a(this.#e,"_git",this.#s):l=this.#a(this.#e,this.#n,"_git",this.#s),this.#o&&l.searchParams.set("path",this.#o),this.#r&&l.searchParams.set("version",g+this.#r),l.toString()}toFileUrl(){if(!this.#o)throw new Error("Azure URL must point to a specific path to be able to download a file");const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("api-version","6.0"),l.searchParams.set("path",this.#o),this.#r&&l.searchParams.set("version",this.#r),l.toString()}toArchiveUrl(){const l=this.#a(this.#e,this.#n,"_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.#o&&l.searchParams.set("scopePath",this.#o),this.#r&&l.searchParams.set("version",this.#r),l.toString()}toCommitsUrl(){const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"commits");return l.searchParams.set("api-version","6.0"),this.#r&&l.searchParams.set("searchCriteria.itemVersion.version",this.#r),l.toString()}getOwner(){return this.#e}getProject(){return this.#n}getRepo(){return this.#s}getPath(){return this.#o}getRef(){return this.#r}}const O="dev.azure.com",P=["clientId","clientSecret","managedIdentityClientId","tenantId","personalAccessToken"],B=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["ManagedIdentityClientAssertion",["clientId","managedIdentityClientId","tenantId"]],["PersonalAccessToken",["personalAccessToken"]]]);function L(T){for(const l of B.entries()){const[E,w]=l,Z=P.filter(_=>!w.includes(_));if(w.every(_=>T[_]!==void 0)&&Z.every(_=>T[_]===void 0))return{kind:E,organizations:T.organizations,...w.reduce((_,ot)=>(_[ot]=T[ot],_),{})}}throw new Error("is not a valid credential")}function I(T){const l=T.getOptionalString("host")??O;let E=T.getOptionalConfigArray("credentials")?.map(_=>({organizations:_.getOptionalStringArray("organizations"),personalAccessToken:_.getOptionalString("personalAccessToken")?.trim(),tenantId:_.getOptionalString("tenantId")?.trim(),clientId:_.getOptionalString("clientId")?.trim(),clientSecret:_.getOptionalString("clientSecret")?.trim(),managedIdentityClientId:_.getOptionalString("managedIdentityClientId")?.trim()}));const w=T.getOptionalString("token")?.trim();if(T.getOptional("credential")!==void 0&&T.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(T.getOptional("token")!==void 0&&T.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(w!==void 0){const _=[{personalAccessToken:w}];E=E?.concat(_)??_}if(T.getOptional("credential")!==void 0){const _=[{organizations:T.getOptionalStringArray("credential.organizations"),token:T.getOptionalString("credential.token")?.trim(),tenantId:T.getOptionalString("credential.tenantId"),clientId:T.getOptionalString("credential.clientId"),clientSecret:T.getOptionalString("credential.clientSecret")?.trim()}];E=E?.concat(_)??_}if(!(0,s.HO)(l))throw new Error(`Invalid Azure integration config, '${l}' is not a valid host`);let Z;if(E!==void 0){const _=E?.reduce((ot,Mt,zt)=>{let Yt;try{L(Mt)}catch(re){Yt=re.message}return Yt!==void 0&&ot.push(`credential at position ${zt+1} ${Yt}`),ot},Array.of()).concat(Object.entries(E.filter(ot=>ot.organizations!==void 0&&ot.organizations.length>0).reduce((ot,Mt,zt)=>(Mt.organizations?.forEach(Yt=>{ot[Yt]||(ot[Yt]=[]),ot[Yt].push(zt+1)}),ot),{})).filter(([ot,Mt])=>Mt.length>1).reduce((ot,[Mt,zt])=>(ot.push(`organization ${Mt} is specified multiple times in credentials at positions ${zt.slice(0,zt.length-1).join(", ")} and ${zt[zt.length-1]}`),ot),Array.of()));if(_?.length>0)throw new Error(`Invalid Azure integration config for ${l}: ${_.join("; ")}`);if(Z=E.map(ot=>L(ot)),Z.some(ot=>ot.kind!=="PersonalAccessToken")&&l!==O)throw new Error(`Invalid Azure integration config for ${l}, only personal access tokens can be used with hosts other than ${O}`);if(Z.filter(ot=>ot.organizations===void 0||ot.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:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}function M(T){const l=T.map(I);return l.some(E=>E.host===O)||l.push({host:O}),l}class ${integrationConfig;static factory=({config:l})=>{const E=M(l.getOptionalConfigArray("integrations.azure")??[]);return(0,s.oS)(E.map(w=>new $(w)),w=>w.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:w}=l;if((0,s.AY)(E))return E;try{const Z=C.fromRepoUrl(w),_=new URL(w),ot=new URL(`https://a.com${Z.getPath()??""}`),Mt=new URL(E,ot).pathname;return _.searchParams.set("path",Mt),l.lineNumber&&(_.searchParams.set("line",String(l.lineNumber)),_.searchParams.set("lineEnd",String(l.lineNumber+1)),_.searchParams.set("lineStartColumn","1"),_.searchParams.set("lineEndColumn","1")),_.toString()}catch{return new URL(E,w).toString()}}resolveEditUrl(l){return l}}var W=t(52536),X=t.n(W);const z="bitbucket.org",Y="https://api.bitbucket.org/2.0";function K(T){const l=z,E=Y,w=T.getString("username"),Z=T.getString("appPassword")?.trim();return{host:l,apiBaseUrl:E,username:w,appPassword:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}function dt(T){const l=T.map(K);return l.length===0&&l.push({host:z,apiBaseUrl:Y}),l}class G{integrationConfig;static factory=({config:l})=>{const E=dt(l.getOptionalConfigArray("integrations.bitbucketCloud")??[]);return(0,s.oS)(E.map(w=>new G(w)),w=>w.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,s.ku)(l);if(l.lineNumber){const w=new URL(E);return w.hash=`lines-${l.lineNumber}`,w.toString()}return E}resolveEditUrl(l){const E=X()(l),w=new URL(l);return w.searchParams.set("mode","edit"),w.searchParams.set("at",E.ref),w.toString()}}var Q=t(45250);const J="bitbucket.org",ct="https://api.bitbucket.org/2.0";function pt(T){const l=T.getOptionalString("host")??J;let E=T.getOptionalString("apiBaseUrl");const w=T.getOptionalString("token")?.trim(),Z=T.getOptionalString("username"),_=T.getOptionalString("appPassword")?.trim();if(!(0,s.HO)(l))throw new Error(`Invalid Bitbucket integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):l===J?E=ct:E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:w,username:Z,appPassword:_,commitSigningKey:T.getOptionalString("commitSigningKey")}}function yt(T){const l=T.map(pt);return l.some(E=>E.host===J)||l.push({host:J,apiBaseUrl:ct}),l}class At{integrationConfig;static factory=({config:l})=>{const E=yt(l.getOptionalConfigArray("integrations.bitbucket")??[...l.getOptionalConfigArray("integrations.bitbucketCloud")??[],...l.getOptionalConfigArray("integrations.bitbucketServer")??[]]);return(0,s.oS)(E.map(w=>new At(w)),w=>w.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,s.ku)(l);if(!l.lineNumber)return E;const w=new URL(E);return this.integrationConfig.host==="bitbucket.org"?w.hash=`lines-${l.lineNumber}`:w.hash=`${l.lineNumber}`,w.toString()}resolveEditUrl(l){const E=X()(l),w=new URL(l);return w.searchParams.set("mode","edit"),w.searchParams.set("spa","0"),w.searchParams.set("at",E.ref),w.toString()}}function Ot(T){const l=T.getString("host");let E=T.getOptionalString("apiBaseUrl");const w=T.getOptionalString("token")?.trim(),Z=T.getOptionalString("username"),_=T.getOptionalString("password");if(!(0,s.HO)(l))throw new Error(`Invalid Bitbucket Server integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:w,username:Z,password:_,commitSigningKey:T.getOptionalString("commitSigningKey")}}function It(T){return T.map(Ot)}class ut{integrationConfig;static factory=({config:l})=>{const E=It(l.getOptionalConfigArray("integrations.bitbucketServer")??[]);return(0,s.oS)(E.map(w=>new ut(w)),w=>w.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,s.ku)(l);if(l.lineNumber){const w=new URL(E);return w.hash=l.lineNumber.toString(),w.toString()}return E}resolveEditUrl(l){return l.includes("?")?l.substring(0,l.indexOf("?")):l}}function lt(T){const l=T.getString("host");let E=T.getOptionalString("baseUrl"),w=T.getOptionalString("cloneUrl");const Z=T.getOptionalBoolean("disableEditUrl");let _=T.getString("gitilesBaseUrl");const ot=T.getOptionalString("username"),Mt=T.getOptionalString("password")?.trim();if((0,s.HO)(l)){if(E&&!(0,s.AY)(E))throw new Error(`Invalid Gerrit integration config, '${E}' is not a valid baseUrl`);if(w&&!(0,s.AY)(w))throw new Error(`Invalid Gerrit integration config, '${w}' is not a valid cloneUrl`);if(!(0,s.AY)(_))throw new Error(`Invalid Gerrit integration config, '${_}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}`,w?w=(0,Q.trimEnd)(w,"/"):w=E,_=(0,Q.trimEnd)(_,"/"),{host:l,baseUrl:E,cloneUrl:w,disableEditUrl:Z,gitilesBaseUrl:_,username:ot,password:Mt,commitSigningKey:T.getOptionalString("commitSigningKey")}}function xt(T){return T.map(lt)}var gt=t(1048).hp;const bt=")]}'";function Rt(T,l){const E=new URL(T.gitilesBaseUrl),w=new URL(l),_=w.pathname.substring(w.pathname.startsWith("/a/")?2:0).replace(E.pathname,"").split("/").filter(Me=>!!Me),ot=_.indexOf("+");if(ot<=0)throw new Error(`Unable to parse project from url: ${l}`);const Mt=trimStart(_.slice(0,ot).join("/"),"/"),zt=_.indexOf("heads");if(zt<=0)throw new Error(`Unable to parse branch from url: ${l}`);const Yt=_[zt+1],re=_.slice(zt+2).join("/");return{branch:Yt,filePath:re===""?"/":re,project:Mt}}function it(T,l){const E=new URL(T.gitilesBaseUrl),w=new URL(l),_=(0,Q.trimStart)(w.pathname.substring(w.pathname.startsWith("/a/")?2:0).replace(E.pathname,""),"/").split("/").filter(pe=>!!pe),ot=(0,Q.takeWhile)(_,pe=>pe!=="+");if(ot.length===0)throw new Error(`Unable to parse gitiles url: ${l}`);const Mt=_.slice(ot.length+1),zt=(0,Q.join)(ot,"/");if(Mt.length>0&&Mt[0]==="HEAD"){const pe=Mt.shift(),qt=(0,Q.join)(Mt,"/");return{project:zt,ref:pe,refType:"head",path:qt||"/",basePath:(0,Q.trimEnd)(l.replace(qt,""),"/")}}if(Mt.length>0&&Mt[0].length===40){const pe=Mt.shift(),qt=(0,Q.join)(Mt,"/");return{project:zt,ref:pe,refType:"sha",path:qt||"/",basePath:(0,Q.trimEnd)(l.replace(qt,""),"/")}}const Yt=(0,Q.join)(Mt,"/"),Me=/^refs\/(?<refsReference>heads|tags)\/(?<ref>.*?)(\/|$)/.exec(Yt);if(Me){const pe=Me[0];let qt;const{refsReference:te,ref:ge}=Me.groups||{},sn=Yt.replace(pe,"");switch(te){case"heads":qt="branch";break;case"tags":qt="tag";break;default:throw new Error(`Unable to parse gitiles url: ${l}`)}return{project:zt,ref:ge,refType:qt,path:sn||"/",basePath:(0,Q.trimEnd)(l.replace(sn,""),"/")}}throw new Error(`Unable to parse gitiles : ${l}`)}function ft(T,l,E,w){return`${T.gitilesBaseUrl}/${l}/+/refs/heads/${E}/${trimStart(w,"/")}`}function vt(T,l,E,w){return`${T.baseUrl}/admin/repos/edit/repo/${l}/branch/refs/heads/${E}/file/${(0,Q.trimStart)(w,"/")}`}function st(T,l,E,w){const Z=w==="/"||w===""?".tar.gz":`/${w}.tar.gz`;return`${U(T)}/${l}/+archive/refs/heads/${E}${Z}`}function Et(T,l){const{path:E,ref:w,project:Z,refType:_}=it(T,l),ot=E==="/"||E===""?".tar.gz":`/${E}.tar.gz`;if(_==="branch")return`${U(T)}/${Z}/+archive/refs/heads/${w}${ot}`;if(_==="sha")return`${U(T)}/${Z}/+archive/${w}${ot}`;throw new Error(`Unsupported gitiles ref type: ${_}`)}function at(T){return T.password?"/a/":"/"}function U(T){if(!T.baseUrl||!T.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(T.gitilesBaseUrl.startsWith(T.baseUrl))return T.gitilesBaseUrl.replace(T.baseUrl.concat("/"),T.baseUrl.concat(at(T)));if(T.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return T.gitilesBaseUrl}function V(T,l){const{branch:E,project:w}=Rt(T,l);return`${T.baseUrl}${at(T)}projects/${encodeURIComponent(w)}/branches/${E}`}function rt(T,l){const{project:E}=Rt(T,l);return`${T.cloneUrl}${at(T)}${E}`}function Ct(T,l){const{ref:E,refType:w,path:Z,project:_}=it(T,l);if(w==="branch")return`${T.baseUrl}${at(T)}projects/${encodeURIComponent(_)}/branches/${E}/files/${encodeURIComponent(Z)}/content`;if(w==="sha")return`${T.baseUrl}${at(T)}projects/${encodeURIComponent(_)}/commits/${E}/files/${encodeURIComponent(Z)}/content`;throw new Error(`Unsupported gitiles ref type: ${w}`)}function ht(T){return`${T.baseUrl}${at(T)}projects/`}function Bt(T){const l={};if(!T.password)return l;const E=gt.from(`${T.username}:${T.password}`,"utf8");return l.Authorization=`Basic ${E.toString("base64")}`,{headers:l}}async function Nt(T){const l=await T.text();if(l.startsWith(bt))try{return JSON.parse(l.slice(bt.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 kt{integrationConfig;static factory=({config:l})=>{const E=xt(l.getOptionalConfigArray("integrations.gerrit")??[]);return(0,s.oS)(E.map(w=>new kt(w)),w=>w.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:w,lineNumber:Z}=l;let _;if(E.startsWith("/")){const{basePath:ot}=it(this.config,w);return ot+E}return E?_=new URL(E,w):_=new URL(w),Z&&(_.hash=Z.toString()),_.toString()}resolveEditUrl(l){if(this.config.disableEditUrl)return l;const E=it(this.config,l);return vt(this.config,E.project,E.ref,E.path)}}var Jt=t(36021);const Wt="gitlab.com",Vt="https://gitlab.com/api/v4";function jt(T){const l=T.getString("host");let E=T.getOptionalString("apiBaseUrl");const w=T.getOptionalString("token")?.trim();let Z=T.getOptionalString("baseUrl");if(E?E=(0,Q.trimEnd)(E,"/"):l===Wt&&(E=Vt),Z?Z=(0,Q.trimEnd)(Z,"/"):Z=`https://${l}`,(0,s.HO)(l)){if(!E||!(0,s.AY)(E))throw new Error(`Invalid GitLab integration config, '${E}' is not a valid apiBaseUrl`);if(!(0,s.AY)(Z))throw new Error(`Invalid GitLab integration config, '${Z}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${l}' is not a valid host`);return{host:l,token:w,apiBaseUrl:E,baseUrl:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}function Gt(T){const l=T.map(jt);return l.some(E=>E.host===Wt)||l.push({host:Wt,apiBaseUrl:Vt,baseUrl:`https://${Wt}`}),l}function ce(T){let l="";return T.host!==Wt&&(l=new URL(T.baseUrl).pathname),trimEnd(l,"/")}class he{integrationConfig;static factory=({config:l})=>{const E=Gt(l.getOptionalConfigArray("integrations.gitlab")??[]);return(0,s.oS)(E.map(w=>new he(w)),w=>w.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,s.ku)(l)}resolveEditUrl(l){return Kt(l,"edit")}}function Kt(T,l){return T.replace(/\/\-\/(blob|tree|edit)\//,`/-/${l}/`)}function ne(T){const l=T.getString("host");let E=T.getOptionalString("baseUrl");const w=T.getOptionalString("username"),Z=T.getOptionalString("password")?.trim();if((0,s.HO)(l)){if(E&&!(0,s.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,Q.trimEnd)(E,"/"):E=`https://${l}`,{host:l,baseUrl:E,username:w,password:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}var le=t(1048).hp;function Ye(T,l){const E=Ve(T,l);return`${E.url}/${E.owner}/${E.name}/_edit/${E.ref}/${E.path}`}function ee(T,l){const E=Ve(T,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/contents/${E.path}?ref=${E.ref}`}function on(T,l){const E=Ve(T,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/archive/${E.ref}.tar.gz`}function We(T,l){const E=Ve(T,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/git/commits/${E.ref}`}function Re(T){const l={},{username:E,password:w}=T;return w?(E?l.Authorization=`basic ${le.from(`${E}:${w}`).toString("base64")}`:l.Authorization=`token ${w}`,{headers:l}):l}function Ve(T,l){const E=T.baseUrl??`https://${T.host}`;try{const[w,Z,_,ot,Mt,zt,...Yt]=l.replace(E,"").split("/"),re=Yt.join("/").replace(/^\//,"");return{url:E,owner:Z,name:_,ref:zt,path:re}}catch(w){throw new Error(`Incorrect URL: ${l}, ${w}`)}}class se{config;static factory=({config:l})=>{const w=(l.getOptionalConfigArray("integrations.gitea")??[]).map(Z=>ne(Z));return(0,s.oS)(w.map(Z=>new se(Z)),Z=>Z.config.host)};constructor(l){this.config=l}get type(){return"gitea"}get title(){return this.config.host}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return Ye(this.config,l)}}function qe(T){const l=T.getString("host"),E=T.getOptionalString("token"),w=T.getOptionalString("apiKey");if(!(0,s.HO)(l))throw new Error(`Invalid Harness Code integration config, '${l}' is not a valid host`);return{host:l,apiKey:w,token:E}}function tn(T,l){const E=Ke(T,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 hn(T,l){const E=Ke(T,l);let w=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(w+=`/${E.orgName}`),E.projectName&&(w+=`/${E.projectName}`),w+=`/${E.repoName}/+/raw/${E.path}?routingId=${E.accountId}&git_ref=refs/heads/${E.refString}`,w}function en(T,l){const E=Ke(T,l);let w=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(w+=`/${E.orgName}`),E.projectName&&(w+=`/${E.projectName}`),w+=`/${E.repoName}/+/archive/${E.branch}.zip?routingId=${E.accountId}`,w}function nn(T,l){const E=Ke(T,l);let w=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(w+=`/${E.orgName}`),E.projectName&&(w+=`/${E.projectName}`),w+=`/${E.repoName}/+/content?routingId=${E.accountId}&include_commit=true&git_ref=refs/heads/${E.branch}`,w}function pn(T){const l={},{token:E,apiKey:w}=T;return w?l["x-api-key"]=w:E&&(l.Authorization=`Bearer ${E}`),{headers:l}}function Ke(T,l){const E=`https://${T.host}`;try{const w=new URL(l),Z=w.pathname.split("/").filter(de=>de!==""),_=w.pathname.split("/"),ot=Z.findIndex(de=>de==="account")+1,Mt=Z[ot],zt=Z.findIndex(de=>de==="orgs"),Yt=zt!==-1?Z[zt+1]:"",re=Z.findIndex(de=>de==="projects"),Me=re!==-1?Z[re+1]:"",pe=Z.findIndex((de,$t)=>de==="repos"&&$t>Math.max(ot,zt,re))+1,qt=Z[pe],te=_.slice(_.findIndex(de=>de==="files"||de==="edit")+1),ge=te.findIndex(de=>de==="~"),sn=te.slice(0,ge).join("/"),gn=ge!==-1?te.slice(ge+1).join("/").replace(/^\//,""):"";return{baseUrl:E,accountId:Mt,orgName:Yt,projectName:Me,refString:sn,path:gn,repoName:qt,refDashStr:te.slice(0,ge).join("-"),branch:ge!==-1?te.slice(0,ge).join("/"):te.join("/")}}catch(w){throw new Error(`Incorrect URL: ${l}, ${w}`)}}class ze{config;static factory=({config:l})=>{const w=(l.getOptionalConfigArray("integrations.harness")??[]).map(Z=>qe(Z));return(0,s.oS)(w.map(Z=>new ze(Z)),Z=>Z.config.host)};constructor(l){this.config=l}get type(){return"harness"}get title(){return this.config.host}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return tn(this.config,l)}}const He="blob.core.windows.net";function be(T){const l=T.getOptionalString("endpoint"),E=T.getString("accountName"),w=T.getOptionalString("accountKey")?.trim(),Z=T.getOptionalString("sasToken")?.trim(),_=T.getOptionalString("connectionString")?.trim(),ot=T.getOptionalString("endpointSuffix")?.trim();let Mt,zt;if(l){try{const re=new URL(l);Mt=re.host,zt=re.pathname}catch{throw new Error(`invalid azureBlobStorage integration config, endpoint '${l}' is not a valid URL`)}if(zt!=="/")throw new Error(`invalid azureBlobStorage integration config, endpoints cannot contain path, got '${l}'`)}else Mt=He;const Yt=T.has("aadCredential")?{clientId:T.getString("aadCredential.clientId"),tenantId:T.getString("aadCredential.tenantId"),clientSecret:T.getString("aadCredential.clientSecret")?.trim()}:void 0;if(w&&Z)throw new Error(`Invalid Azure Blob Storage config for ${E}: Both account key and SAS token cannot be used simultaneously.`);if(Yt&&(w||Z))throw new Error(`Invalid Azure Blob Storage config for ${E}: Cannot use both Azure AD credentials and account keys/SAS tokens for the same account.`);return{host:Mt,endpoint:l,accountName:E,accountKey:w,sasToken:Z,connectionString:_,endpointSuffix:ot,aadCredential:Yt}}function Qe(T){const l=T.map(be);return l.some(E=>E.host===He)||l.push({host:He}),l}class Ze{integrationConfig;static factory=({config:l})=>{const E=Qe(l.getOptionalConfigArray("integrations.azureBlobStorage")??[]);return(0,s.oS)(E.map(w=>new Ze(w)),w=>w.config.host)};get type(){return"azureBlobStorage"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return l}}class je{byType;static fromConfig(l){return new je({awsS3:b.factory({config:l}),awsCodeCommit:u.factory({config:l}),azureBlobStorage:Ze.factory({config:l}),azure:$.factory({config:l}),bitbucket:At.factory({config:l}),bitbucketCloud:G.factory({config:l}),bitbucketServer:ut.factory({config:l}),gerrit:kt.factory({config:l}),github:Jt.U.factory({config:l}),gitlab:he.factory({config:l}),gitea:se.factory({config:l}),harness:ze.factory({config:l})})}constructor(l){this.byType=l}get awsS3(){return this.byType.awsS3}get awsCodeCommit(){return this.byType.awsCodeCommit}get azureBlobStorage(){return this.byType.azureBlobStorage}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(w=>w.byUrl(l)).filter(Boolean);if(E.length>1){const w=E.filter(Z=>!(Z instanceof At));w.length!==0&&(E=w)}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,s.ku)(l)}resolveEditUrl(l){const E=this.byUrl(l);return E?E.resolveEditUrl(l):l}}var Ue=t(55309);class Le{static fromConfig(l){return je.fromConfig(l)}}const an=(0,Ue.y)({id:"integration.scmintegrations"})},36021:(H,S,t)=>{"use strict";t.d(S,{U:()=>m,F:()=>u});var s=t(59869),a=t(45250);const x="github.com",p="https://api.github.com",b="https://raw.githubusercontent.com";function h(v){const g=v.getOptionalString("host")??x;let C=v.getOptionalString("apiBaseUrl"),O=v.getOptionalString("rawBaseUrl");const P=v.getOptionalString("token")?.trim(),B=v.getOptionalConfigArray("apps")?.map(L=>({appId:L.getNumber("appId"),clientId:L.getString("clientId"),clientSecret:L.getString("clientSecret"),webhookSecret:L.getOptionalString("webhookSecret"),privateKey:L.getString("privateKey"),allowedInstallationOwners:L.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,s.HO)(g))throw new Error(`Invalid GitHub integration config, '${g}' is not a valid host`);return C?C=(0,a.trimEnd)(C,"/"):g===x&&(C=p),O?O=(0,a.trimEnd)(O,"/"):g===x&&(O=b),{host:g,apiBaseUrl:C,rawBaseUrl:O,token:P,apps:B}}function d(v){const g=v.map(h);return g.some(C=>C.host===x)||g.push({host:x,apiBaseUrl:p,rawBaseUrl:b}),g}class m{integrationConfig;static factory=({config:g})=>{const C=d(g.getOptionalConfigArray("integrations.github")??[]);return(0,s.oS)(C.map(O=>new m(O)),O=>O.config.host)};constructor(g){this.integrationConfig=g}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){return u((0,s.ku)(g),"tree")}resolveEditUrl(g){return u(g,"edit")}parseRateLimitInfo(g){return{isRateLimited:g.status===429||g.status===403&&g.headers.get("x-ratelimit-remaining")==="0"}}}function u(v,g){return v.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(C,O,P,B)=>`//${O}/${P}/${B}/${g}/`)}},59869:(H,S,t)=>{"use strict";t.d(S,{AY:()=>h,HO:()=>b,ku:()=>m,oS:()=>d});var s=t(52536),a=t.n(s),x=t(45250),p=t.n(x);function b(v){const g=new URL("http://example.com");return g.host=v,g.host===v}function h(v){try{return new URL(v),!0}catch{return!1}}function d(v,g){return{list(){return v},byUrl(C){try{const O=typeof C=="string"?new URL(C):C;return v.find(P=>g(P)===O.host)}catch{return}},byHost(C){return v.find(O=>g(O)===C)}}}function m(v){const{url:g,base:C,lineNumber:O}=v;try{return new URL(g),g}catch{}let P;if(g.startsWith("/")){const{href:B,filepath:L}=a()(C);P=new URL(B);const I=(0,x.trimEnd)(P.pathname.substring(0,P.pathname.length-L.length),"/");P.pathname=`${I}${g}`}else P=new URL(g,C);return P.search=new URL(C).search,O&&(P.hash=`L${O}`),P.toString()}function u(v){beforeAll(()=>v.listen({onUnhandledRequest:"error"})),afterAll(()=>v.close()),afterEach(()=>v.resetHandlers())}},71543:(H,S,t)=>{"use strict";var s={};t.r(s),t.d(s,{TechDocsPlugin:()=>b.Ju});var a=t(31085),x=t(25873),p=t(18690),b=t(39278),h=t(8915),d=t(72020),m=t(99730),u=t(64947),v=t(12173),g=t(22020),C=t(68146),O=t(73657);function P({children:r}){return(0,p.Ri)()?(0,a.jsx)(a.Fragment,{children:r}):(0,a.jsx)(p.fS,{children:r})}const B=()=>(0,a.jsx)(v.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),L=({step:r,error:e})=>{let n="";return r==="load-config"?n=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(n=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,a.jsx)(P,{children:(0,a.jsx)(v.M,{statusMessage:n,stack:e.stack})})},I=({error:r,resetError:e,plugin:n})=>(0,a.jsx)(g.b,{title:`Error in ${n?.getId()}`,defaultExpanded:!0,error:r,children:(0,a.jsx)(u.A,{variant:"outlined",onClick:e,children:"Retry"})}),M={Progress:C.k,Router:O.Kd,NotFoundErrorPage:B,BootErrorPage:L,ErrorBoundaryFallback:I},$="Invalid discovery URL pattern,";class W{parts;static compile(e){const n=e.split(/\{\{\s*pluginId\s*\}\}/),o=n.join("pluginId");let i;try{i=new URL(o)}catch{throw new Error(`${$} URL '${o}' is invalid`)}if(i.hash)throw new Error(`${$} URL must not have a hash`);if(i.search)throw new Error(`${$} URL must not have a query`);if(o.endsWith("/"))throw new Error(`${$} URL must not end with a slash`);return new W(n)}constructor(e){this.parts=e}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}}class X{endpoints;defaultEndpoint;static fromConfig(e,n){const o=n?.pathPattern??"/api/{{ pluginId }}",i=e.getString("backend.baseUrl"),c=e.getOptionalConfigArray("discovery.endpoints")?.flatMap(A=>{const y=typeof A.get("target")=="object"?A.getOptionalString("target.external"):A.getString("target");if(!y)return[];const R=W.compile(y);return A.getStringArray("plugins").map(N=>[N,R])});return new X(new Map(c),W.compile(`${i}${o}`))}constructor(e,n){this.endpoints=e,this.defaultEndpoint=n}async getBaseUrl(e){const n=this.endpoints.get(e);return n?n.getBaseUrl(e):this.defaultEndpoint.getBaseUrl(e)}}var z=t(96403),Y=t.n(z);class K{isClosed=!1;terminatingError;observable=new(Y())(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(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,o){const i=typeof e=="function"?{next:e,error:n,complete:o}:e;return this.observable.subscribe(i)}}class dt{isClosed;currentValue;terminatingError;observable;constructor(e){this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(Y())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(n.next(this.currentValue),this.subscribers.add(n),()=>{this.subscribers.delete(n)}))}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(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,o){const i=typeof e=="function"?{next:e,error:n,complete:o}:e;return this.observable.subscribe(i)}}class G{subject=new K;post(e){this.subject.next(e)}alert$(){return this.subject}}class Q{captureEvent(e){}}class J{alertApi;errorApi;constructor(e,n){this.alertApi=e,this.errorApi=n}post(e,n){return n?.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,n)}error$(){return this.errorApi.error$()}}class ct{subject=new K;post(e,n){this.subject.next({error:e,context:n})}error$(){return this.subject}}class pt{static forward(e,n){window.addEventListener("unhandledrejection",o=>{e.post(o.reason,n)})}}const yt=new Map;class At{namespace;errorApi;constructor(e,n){this.namespace=e,this.errorApi=n,this.subscribers=new Set,this.observable=new(Y())(o=>(this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}static hasSubscribed=!1;static create(e){return new At(e.namespace??"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[n,o]of yt.entries())e.key?.startsWith(n)&&o.handleStorageChange(e.key)})}get(e){return this.snapshot(e).value}snapshot(e){let n,o="absent";try{const i=localStorage.getItem(this.getKeyName(e));i&&(n=JSON.parse(i,(c,A)=>(typeof A=="object"&&A!==null&&Object.freeze(A),A)),o="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:n,presence:o}}forBucket(e){const n=`${this.namespace}/${e}`;return yt.has(n)||yt.set(n,new At(n,this.errorApi)),yt.get(n)}async set(e,n){localStorage.setItem(this.getKeyName(e),JSON.stringify(n)),this.notifyChanges(e)}async remove(e){localStorage.removeItem(this.getKeyName(e)),this.notifyChanges(e)}observe$(e){return At.hasSubscribed||(At.addStorageEventListener(),At.hasSubscribed=!0),this.observable.filter(({key:n})=>n===e)}handleStorageChange(e){if(!e?.startsWith(this.namespace))return;const n=e?.slice(`${this.namespace}/`.length);n.includes("/")||this.notifyChanges(decodeURIComponent(n))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const n=this.snapshot(e);for(const o of this.subscribers)o.next(n)}subscribers;observable}function Ot(r){let e=r.baseImplementation||t.g.fetch;const n=[r.middleware??[]].flat().reverse();for(const o of n)e=o.apply(e);return{fetch:e}}class It{identityApi;allowUrl;headerName;headerValue;static create(e){const n=ut(e),o=e.header?.name||"authorization",i=e.header?.value||(c=>`Bearer ${c}`);return new It(e.identityApi,n,o,i)}static getDiscoveryUrlPrefixes(e){return(e.getOptionalConfigArray("discovery.endpoints")||[]).flatMap(o=>{const i=typeof o.get("target")=="object"?o.getString("target.external"):o.getString("target");return o.getStringArray("plugins").map(A=>i.replace(/\{\{\s*pluginId\s*\}\}/g,A))})}constructor(e,n,o,i){this.identityApi=e,this.allowUrl=n,this.headerName=o,this.headerValue=i}apply(e){return async(n,o)=>{const i=new Request(n,o),{token:c}=await this.identityApi.getCredentials();return i.headers.get(this.headerName)||typeof c!="string"||!c||!this.allowUrl(i.url)?e(n,o):(i.headers.set(this.headerName,this.headerValue(c)),e(i))}}}function ut(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?lt(r.urlPrefixAllowlist):r.config?lt([r.config.getString("backend.baseUrl"),...It.getDiscoveryUrlPrefixes(r.config)]):()=>!1}function lt(r){const e=r.map(n=>n.replace(/\/$/,""));return n=>e.some(o=>n===o||n.startsWith(`${o}/`))}function xt(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class gt{discoveryApi;constructor(e){this.discoveryApi=e}apply(e){return async(n,o)=>{const i=new Request(n,o),c="plugin://";if(!i.url.startsWith(c))return e(n,o);const{hostname:A,pathname:y,search:R,hash:N,username:tt,password:mt}=new URL(`http://${i.url.substring(c.length)}`);let St=await this.discoveryApi.getBaseUrl(A);if(tt||mt){const Dt=new URL(St),Zt=`${tt}${mt?`:${mt}`:""}@`;St=`${Dt.protocol}//${Zt}${Dt.host}${Dt.pathname}`}const Tt=`${xt(St,y)}${R}${N}`;return e(Tt,typeof n=="string"||bt(n)?o:n)}}}function bt(r){return typeof r=="object"&&r?.constructor===URL}class Rt{static resolvePluginProtocol(e){return new gt(e.discoveryApi)}static injectIdentityAuth(e){return It.create(e)}constructor(){}}function it(r,e){for(const n of e)if(!r.has(n))return!1;return!0}function ft(r,...e){const n=new Set(r);for(const o of e)for(const i of o)n.add(i);return n}class vt{requests=[];subject=new dt(this.getCurrentPending());request(e){return new Promise((n,o)=>{this.requests.push({scopes:e,resolve:n,reject:o}),this.subject.next(this.getCurrentPending())})}resolve(e,n){this.requests=this.requests.filter(o=>it(e,o.scopes)?(o.resolve(n),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(n=>n.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((n,o)=>ft(n,o.scopes),this.requests[0].scopes);return{scopes:e,resolve:n=>{e&&this.resolve(e,n)},reject:n=>{e&&this.reject(n)}}}}class st{subject=new K;currentRequests=[];handlerCount=0;createAuthRequester(e){const n=new vt,o=this.handlerCount;return this.handlerCount++,n.pending().subscribe({next:i=>{const c=this.currentRequests.slice(),A=this.makeAuthRequest(i,e);A?c[o]=A:delete c[o],this.currentRequests=c,this.subject.next(c.filter(Boolean))}}),i=>n.request(i)}makeAuthRequest(e,n){const{scopes:o}=e;if(o)return{provider:n.provider,trigger:async()=>{const i=await n.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 Et(r){return new Promise((e,n)=>{const o=r.width||500,i=r.height||700,c=window.screen.width/2-o/2,A=window.screen.height/2-i/2,y=new URL(r.url).origin,R=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${o},height=${i},top=${A},left=${c}`);let N="";if(!R||typeof R.closed>"u"||R.closed){const Tt=new Error("Failed to open auth popup.");Tt.name="PopupRejectedError",n(Tt);return}const tt=Tt=>{if(Tt.source!==R||Tt.origin!==y)return;const{data:Dt}=Tt;if(Dt.type==="config_info"){N=Dt.targetOrigin;return}if(Dt.type!=="authorization_response")return;const Zt=Dt;if("error"in Zt){const me=new Error(Zt.error.message);me.name=Zt.error.name,n(me)}else e(Zt.response);St()},mt=setInterval(()=>{if(R.closed){const Tt=`Login failed, ${N&&N!==window.location.origin?`Incorrect app origin, expected ${N}`:"popup was closed"}`,Dt=new Error(Tt);Dt.name="PopupClosedError",n(Dt),St()}},100);function St(){window.removeEventListener("message",tt),clearInterval(mt)}window.addEventListener("message",tt)})}let at=!1;function U(r){return[...r].join(" ")}class V{discoveryApi;environment;provider;joinScopesFunc;authRequester;sessionTransform;enableExperimentalRedirectFlow;popupOptions;constructor(e){const{configApi:n,discoveryApi:o,environment:i,provider:c,joinScopes:A=U,oauthRequestApi:y,sessionTransform:R=tt=>tt,popupOptions:N}=e;!at&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),at=!0),this.enableExperimentalRedirectFlow=n?n.getOptionalBoolean("enableExperimentalRedirectFlow")??!1:!1,this.authRequester=y.createAuthRequester({provider:c,onAuthRequest:async tt=>this.enableExperimentalRedirectFlow?this.executeRedirect(tt):this.showPopup(tt)}),this.discoveryApi=o,this.environment=i,this.provider=c,this.joinScopesFunc=A,this.sessionTransform=R,this.popupOptions=N}async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const n=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e.scopes)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(i=>{throw new Error(`Auth refresh request failed, ${i}`)});if(!n.ok){const i=new Error(`Auth refresh request failed, ${n.statusText}`);throw i.status=n.status,i}const o=await n.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(n=>{throw new Error(`Logout request failed, ${n}`)});if(!e.ok){const n=new Error(`Logout request failed, ${e.statusText}`);throw n.status=e.status,n}}async showPopup(e){const n=this.joinScopesFunc(e),o=await this.buildUrl("/start",{scope:n,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,A=await Et({url:o,name:`${this.provider.title} Login`,width:i,height:c});return await this.sessionTransform(A)}async executeRedirect(e){const n=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:n,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,n){const o=await this.discoveryApi.getBaseUrl("auth"),i=this.buildQueryString({...n,env:this.environment});return`${o}/${this.provider.id}${e}${i}`}buildQueryString(e){if(!e)return"";const n=Object.entries(e).map(([o,i])=>{if(typeof i=="string")return`${encodeURIComponent(o)}=${encodeURIComponent(i)}`;if(i)return encodeURIComponent(o)}).filter(Boolean).join("&");return n?`?${n}`:""}}function rt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}class Ct{options;constructor(e){this.options=e}sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const o=this.options.sessionScopes(e);return rt(o,n)}getExtendedScope(e,n){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(n)for(const i of n)o.add(i);return o}}var ht=t(55309),Bt=function(r){return r.SignedIn="SignedIn",r.SignedOut="SignedOut",r}({});const Nt=(0,ht.y)({id:"core.auth.google"}),kt=(0,ht.y)({id:"core.auth.github"}),Jt=(0,ht.y)({id:"core.auth.okta"}),Wt=(0,ht.y)({id:"core.auth.gitlab"}),Vt=(0,ht.y)({id:"core.auth.microsoft"}),jt=(0,ht.y)({id:"core.auth.onelogin"}),Gt=(0,ht.y)({id:"core.auth.bitbucket"}),ce=(0,ht.y)({id:"core.auth.bitbucket-server"}),he=(0,ht.y)({id:"core.auth.atlassian"}),Kt=(0,ht.y)({id:"core.auth.vmware-cloud"});class ne{subject=new dt(Bt.SignedOut);signedIn=!1;setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Bt.SignedIn:Bt.SignedOut))}sessionState$(){return this.subject}}class le{connector;helper;sessionScopesFunc;sessionShouldRefreshFunc;stateTracker=new ne;refreshPromise;currentSession;constructor(e){const{connector:n,defaultScopes:o=new Set,sessionScopes:i,sessionShouldRefresh:c}=e;this.connector=n,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 rt(c,i)&&(this.currentSession=o),o}catch(o){if(e.optional)return;throw o}}if(!e.instantPopup)try{const n=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=n,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({scopes:this.helper.getExtendedScope(this.currentSession,e)});try{const n=await this.refreshPromise;if(!this.helper.sessionExistsAndHasScope(n,e))throw new Error("Refreshed session did not receive the required scopes");return this.stateTracker.setIsSignedIn(!0),n}finally{delete this.refreshPromise}}}const Ye={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class ee{static createAuthConnector(e){if("authConnector"in e)return e.authConnector;const{scopeTransform:n=N=>N,configApi:o,discoveryApi:i,environment:c="development",provider:A=Ye,oauthRequestApi:y,popupOptions:R}=e;return new V({configApi:o,discoveryApi:i,environment:c,provider:A,oauthRequestApi:y,sessionTransform({backstageIdentity:N,...tt}){const mt={...tt,providerInfo:{idToken:tt.providerInfo.idToken,accessToken:tt.providerInfo.accessToken,scopes:ee.normalizeScopes(tt.providerInfo.scope,{scopeTransform:n}),expiresAt:tt.providerInfo.expiresInSeconds?new Date(Date.now()+tt.providerInfo.expiresInSeconds*1e3):void 0}};return N&&(mt.backstageIdentity={token:N.token,identity:N.identity,expiresAt:N.expiresInSeconds?new Date(Date.now()+N.expiresInSeconds*1e3):void 0}),mt},popupOptions:R})}static create(e){const{defaultScopes:n=[],scopeTransform:o=A=>A}=e,i=ee.createAuthConnector(e),c=new le({connector:i,defaultScopes:new Set(n),sessionScopes:A=>A.providerInfo.scopes,sessionShouldRefresh:A=>{let y=1/0;return A.providerInfo?.expiresAt&&(y=Math.min(y,(A.providerInfo.expiresAt.getTime()-Date.now())/1e3)),A.backstageIdentity?.expiresAt&&(y=Math.min(y,(A.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),y<60*3}});return new ee({sessionManager:c,scopeTransform:o})}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,n){const o=ee.normalizeScopes(e,{scopeTransform:this.scopeTransform});return(await this.sessionManager.getSession({...n,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,n){if(!e)return new Set;const o=Array.isArray(e)?e:e.split(/[\s|,]/).filter(Boolean),i=n?n.scopeTransform(o):o;return new Set(i)}}const on={id:"google",title:"Google",icon:()=>null},We="https://www.googleapis.com/auth/";class Re{static create(e){const{configApi:n,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:A=on,defaultScopes:y=["openid",`${We}userinfo.email`,`${We}userinfo.profile`]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:i,provider:A,environment:c,defaultScopes:y,scopeTransform(R){return R.map(N=>N==="openid"?N:N==="profile"||N==="email"?`${We}userinfo.${N}`:N.startsWith(We)?N:`${We}${N}`)}})}}const Ve={id:"microsoft",title:"Microsoft",icon:()=>null};class se{oauth2;configApi;environment;provider;oauthRequestApi;discoveryApi;scopeTransform;static MicrosoftGraphID="00000003-0000-0000-c000-000000000000";static create(e){return new se(e)}constructor(e){const{configApi:n,environment:o="development",provider:i=Ve,oauthRequestApi:c,discoveryApi:A,defaultScopes:y=["openid","offline_access","profile","email","User.Read"],scopeTransform:R=N=>N.concat("offline_access")}=e;this.configApi=n,this.environment=o,this.provider=i,this.oauthRequestApi=c,this.discoveryApi=A,this.scopeTransform=R,this.oauth2={[se.MicrosoftGraphID]:ee.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:y})}}microsoftGraph(){return this.oauth2[se.MicrosoftGraphID]}static resourceForScopes(e){const n=[...new Set(e.split(" ").map(se.resourceForScope).filter(i=>i!=="openid"))];if(n.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${n.join(", ")}. Access tokens can only have a single audience.`));const o=n[0]??se.MicrosoftGraphID;return Promise.resolve(o)}static resourceForScope(e){const n=e.match(/^(?<resourceURI>.*)\/(?<scp>[^\/]*)$/)?.groups;if(n){const{resourceURI:o}=n;return o.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return se.MicrosoftGraphID}}async getAccessToken(e,n){const o=e===void 0?se.MicrosoftGraphID:await se.resourceForScopes(Array.isArray(e)?e.join(" "):e);return o in this.oauth2||(this.oauth2[o]=ee.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[o].getAccessToken(e,n)}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 qe={id:"github",title:"GitHub",icon:()=>null};class tn{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=qe,oauthRequestApi:A,defaultScopes:y=["read:user"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const hn={id:"okta",title:"Okta",icon:()=>null},en=new Set(["openid","profile","email","phone","address","groups","offline_access"]),nn="okta.";class pn{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=hn,oauthRequestApi:A,defaultScopes:y=["openid","email","profile","offline_access"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y,scopeTransform(R){return R.map(N=>en.has(N)||N.startsWith(nn)?N:`${nn}${N}`)}})}}const Ke={id:"gitlab",title:"GitLab",icon:()=>null};class ze{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Ke,oauthRequestApi:A,defaultScopes:y=["read_user"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const He={id:"onelogin",title:"onelogin",icon:()=>null},be=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Qe="onelogin.";class Ze{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=He,oauthRequestApi:A}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(y){return y.map(R=>be.has(R)||R.startsWith(Qe)?R:`${Qe}${R}`)}})}}const je={id:"bitbucket",title:"Bitbucket",icon:()=>null};class Ue{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=je,oauthRequestApi:A,defaultScopes:y=["account"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const Le={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class an{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Le,oauthRequestApi:A,defaultScopes:y=["PROJECT_ADMIN"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const T={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=T,oauthRequestApi:A}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i})}}const E={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class w{static create(e){const{configApi:n,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:A=E,defaultScopes:y=["openid"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:i,provider:A,environment:c,defaultScopes:y})}}var Z=t(12935),_=t(57405),ot=t(65461),Mt=t(36017),zt=t(99303),Yt=t(39837);const re=(0,ht.y)({id:"core.storage"});var Me=t(70795),pe=t(16009);const qt=(0,ht.y)({id:"core.oauthrequest"});var te=t(96824),ge=t(70835),sn=t(10288),gn=t.n(sn),de=t(20938),$t=t(46195),$e=t(54241),Ln=t(13646);const fn=$t.z.lazy(()=>$t.z.object({rule:$t.z.string(),resourceType:$t.z.string(),params:$t.z.record($t.z.any()).optional()}).or($t.z.object({anyOf:$t.z.array(fn).nonempty()})).or($t.z.object({allOf:$t.z.array(fn).nonempty()})).or($t.z.object({not:fn}))),Mn=$t.z.object({result:$t.z.literal($e.b.ALLOW).or($t.z.literal($e.b.DENY))}),as=$t.z.object({result:$t.z.array($t.z.union([$t.z.literal($e.b.ALLOW),$t.z.literal($e.b.DENY)]))}).or(Mn),is=$t.z.union([$t.z.object({result:$t.z.literal($e.b.ALLOW).or($t.z.literal($e.b.DENY))}),$t.z.object({result:$t.z.literal($e.b.CONDITIONAL),pluginId:$t.z.string(),resourceType:$t.z.string(),conditions:fn})]),Hs=(r,e)=>$t.z.object({items:$t.z.array($t.z.intersection($t.z.object({id:$t.z.string()}),r)).refine(n=>n.length===e.size&&n.every(({id:o})=>e.has(o)),{message:"Items in response do not match request"})});class cs{enabled;discovery;enableBatchedRequests;constructor(e){this.discovery=e.discovery,this.enabled=e.config.getOptionalBoolean("permission.enabled")??!1,this.enableBatchedRequests=e.config.getOptionalBoolean("permission.EXPERIMENTAL_enableBatchedRequests")??!1}async authorize(e,n){return this.enabled?this.enableBatchedRequests?this.makeBatchedRequest(e,n):this.makeRequest(e,Mn,n):e.map(o=>({result:$e.b.ALLOW}))}async authorizeConditional(e,n){return this.enabled?this.makeRequest(e,is,n):e.map(o=>({result:$e.b.ALLOW}))}async makeRequest(e,n,o){const i={items:e.map(y=>({id:de.A(),...y}))},A=(await this.makeRawRequest(i,n,o)).items.reduce((y,R)=>(y[R.id]=R,y),{});return i.items.map(y=>A[y.id])}async makeBatchedRequest(e,n){const o={};for(const A of e){const{permission:y,resourceRef:R}=A;(0,Ln.OL)(y)?(o[y.name]||={permission:y,resourceRef:[],id:de.A()},R&&o[y.name].resourceRef?.push(R)):o[y.name]||={permission:y,id:de.A()}}const c=(await this.makeRawRequest({items:Object.values(o)},as,n)).items.reduce((A,y)=>(A[y.id]=y,A),{});return e.map(A=>{const{id:y}=o[A.permission.name],R=c[y];return Array.isArray(R.result)?{result:A.resourceRef?R.result.shift():R.result[0]}:{result:R.result}})}async makeRawRequest(e,n,o){const i=await this.discovery.getBaseUrl("permission"),c=await gn()(`${i}/authorize`,{method:"POST",body:JSON.stringify(e),headers:{...this.getAuthorizationHeader(o?.token),"content-type":"application/json"}});if(!c.ok)throw await ge.o.fromResponse(c);const A=await c.json();return Hs(n,new Set(e.items.map(({id:y})=>y))).parse(A)}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}}class bn{permissionClient;identityApi;constructor(e,n){this.permissionClient=e,this.identityApi=n}static create(e){const{config:n,discovery:o,identity:i}=e,c=new cs({discovery:o,config:n});return new bn(c,i)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}}const ls=[(0,Z.b)({api:_.I,deps:{configApi:ot.U},factory:({configApi:r})=>X.fromConfig(r)}),(0,Z.b)({api:Mt.k,deps:{},factory:()=>new G}),(0,Z.b)({api:zt.c,deps:{},factory:()=>new Q}),(0,Z.b)({api:Yt.m,deps:{alertApi:Mt.k},factory:({alertApi:r})=>{const e=new J(r,new ct);return pt.forward(e,{hidden:!1}),e}}),(0,Z.b)({api:re,deps:{errorApi:Yt.m},factory:({errorApi:r})=>At.create({errorApi:r})}),(0,Z.b)({api:Me.a,deps:{configApi:ot.U,identityApi:pe.K,discoveryApi:_.I},factory:({configApi:r,identityApi:e,discoveryApi:n})=>Ot({middleware:[Rt.resolvePluginProtocol({discoveryApi:n}),Rt.injectIdentityAuth({identityApi:e,config:r})]})}),(0,Z.b)({api:qt,deps:{},factory:()=>new st}),(0,Z.b)({api:Nt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Re.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Vt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>se.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:kt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>tn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Jt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>pn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Wt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ze.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:jt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ze.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Gt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ue.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:ce,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>an.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:he,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>l.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Kt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>w.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:te.x,deps:{discovery:_.I,identity:pe.K,config:ot.U},factory:({config:r,discovery:e,identity:n})=>bn.create({config:r,discovery:e,identity:n})})];var Bn=t(14451),jn=t(27799),Un=t(94389),ds=t(20947),us=t(20473),$n=t(45917),hs=t(39347),Fn=t(63309),mn=t(82451),ps=t(85121),Nn=t(17400),gs=t(42226),fs=t(69550),kn=t(52755),Wn=t(89350),ms=t(8911),Sn=t(33602),On=t(48108),ys=t(77225),Kn=t(55700),zn=t(71865),vs=t(80109),Es=t(15303),As=t(39330);const xs={brokenImage:jn.A,catalog:ms.A,scaffolder:ds.A,techdocs:us.A,search:$n.A,chat:hs.A,dashboard:Fn.A,docs:mn.A,email:ps.A,github:gs.A,group:Sn.A,help:fs.A,"kind:api":Nn.A,"kind:component":Wn.A,"kind:domain":Bn.A,"kind:group":Sn.A,"kind:location":kn.A,"kind:system":Un.A,"kind:user":On.A,"kind:resource":Kn.A,"kind:template":zn.A,user:On.A,warning:ys.A,star:vs.A,unstarred:Es.A,externalLink:As.A};var Cs=t(58733),bs=t(55288),Ss=t(91360),Os=t(50868),Ps=t(12285),Ts=t(87271),Rs=t(64636);Rs.A.configure(r=>`v5-${r}`);const Hn=(0,bs.A)({productionPrefix:"jss4-"});function Vn(r){const{children:e,theme:n,noCssBaseline:o=!1}=r,i=n.getTheme("v4"),c=n.getTheme("v5");let A;o||(A=(0,a.jsx)(Cs.Ay,{}));let y=(0,a.jsxs)(a.Fragment,{children:[A,e]});return i&&(y=(0,a.jsx)(Ss.Ay,{generateClassName:Hn,children:(0,a.jsx)(Os.A,{theme:i,children:y})})),c&&(y=(0,a.jsx)(Ps.A,{injectFirst:!0,children:(0,a.jsx)(Ts.A,{theme:c,children:y})})),y}const Gn={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 ws=t(98392),Is=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")`},Ne={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 we(r){const{colors:e,shape:n,options:o}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,A=`${n}, ${c}`,y=o?.fontColor??"#FFFFFF";return{colors:e,shape:n,backgroundImage:A,fontColor:y}}const Ds={home:we({colors:Ne.teal,shape:Fe.wave}),documentation:we({colors:Ne.pinkSea,shape:Fe.wave2}),tool:we({colors:Ne.purpleSky,shape:Fe.round}),service:we({colors:Ne.marineBlue,shape:Fe.wave}),website:we({colors:Ne.veryBlue,shape:Fe.wave}),library:we({colors:Ne.rubyRed,shape:Fe.wave}),other:we({colors:Ne.darkGrey,shape:Fe.wave}),app:we({colors:Ne.toastyOrange,shape:Fe.wave}),apis:we({colors:Ne.teal,shape:Fe.wave2}),card:we({colors:Ne.greens,shape:Fe.wave})},yn=16,Yn='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',Ls="home",Pn={htmlFontSize:yn,fontFamily:Yn,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 Vs(r){const{palette:e,htmlFontSize:n=yn,fontFamily:o=Yn,defaultPageTheme:i=Ls,pageTheme:c=Ds,typography:A}=r;if(!c[i])throw new Error(`${i} is not defined in pageTheme.`);return Pn.htmlFontSize=n,Pn.fontFamily=o,{palette:e,typography:A??Pn,page:c[i],getPageTheme:({themeId:y})=>c[y]??c[i]}}var f=t(80012);const D={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,f.a)(r.palette.textVerySubtle,.2):(0,f.e$)(r.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.mode==="dark"?(0,f.a)(r.palette.textVerySubtle,.2):(0,f.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,f.e$)(r.palette.link,.3),background:(0,f.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"},"&:focus svg":{opacity:.5},"&.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"}}}},j=r=>(...e)=>{const n=e.length===0?[1]:e,o=(i,c)=>typeof i=="string"?i:c*i;return n.map(i=>{const c=o(i,r);return typeof c=="number"?`${c}px`:c}).join(" ")};function F(r,e){if(!e||typeof e=="string")return;const n=typeof e=="function"?e(r):e;if(n)return{"@global":n}}function k(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const n={...r},o=r.spacing(1);return typeof o=="number"&&(n.spacing=j(o)),Object.fromEntries(Object.entries(e).map(([i,c])=>typeof c=="function"?[i,c({theme:n})]:[i,c]))}return e}}const q=/^&.Mui-([\w-]+)$/;function et(r){let e=r;if(!r||typeof r!="object")return e;for(const n of Object.keys(r)){const o=r[n];if(!(!o||typeof o!="object"))for(const i of Object.keys(o)){const c=i,A=c.match(q);if(A){const[,y]=A,{[c]:R,...N}=o;R&&(e={...e,[n]:N,[y]:R})}}}return e}function Pt(r,e={}){const n={},o={};for(const i of Object.keys(e)){const c=e[i];c&&("styleOverrides"in c&&(i==="MuiCssBaseline"?n[i]=F(r,c.styleOverrides):n[i]=et(k(r,c.styleOverrides))),"defaultProps"in c&&(o[i]=c.defaultProps))}return{overrides:n,props:o}}class wt{#t=new Map;constructor(e,n){this.#t=new Map,e&&this.#t.set("v4",e),n&&this.#t.set("v5",n)}getTheme(e){return this.#t.get(e)}}function Ut(r){const e=Vs(r),n={...D,...r.components},o=(0,Is.A)({...e,components:n}),i=Pt(o,n),c={...(0,ws.A)(e),...i};return new wt(c,o)}function Lt(r){const e=adaptV4Theme(r),n=createTheme(r);return new wt(n,createV5Theme(e))}const Ft={light:Ut({palette:Gn.light}),dark:Ut({palette:Gn.dark})};var Xt=t(75962),fe=t(87145);const ue=[{id:"light",title:"Light Theme",variant:"light",icon:(0,a.jsx)(fe.A,{}),Provider:({children:r})=>(0,a.jsx)(Vn,{theme:Ft.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,a.jsx)(Xt.A,{}),Provider:({children:r})=>(0,a.jsx)(Vn,{theme:Ft.dark,children:r})}];var nt=t(14041),Se=t(73466),ye=t(39067),Ht=t.n(ye);class Qt{holders;constructor(...e){this.holders=e}get(e){for(const n of this.holders){const o=n.get(e);if(o)return o}}}var ie=t(43836),ve=t(10602);const oe=(0,ie.tK)("api-context"),ae=r=>{const{apis:e,children:n}=r,o=(0,nt.useContext)(oe)?.atVersion(1),i=o?new Qt(e,o):e;return(0,a.jsx)(oe.Provider,{value:(0,ve.B)({1:i}),children:n})};ae.propTypes={apis:Ht().shape({get:Ht().func.isRequired}).isRequired,children:Ht().node};const Ee=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function ke(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Oe(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Oe):Object.fromEntries(Object.entries(r).map(([e,n])=>[e,Oe(n)]))}function Ge(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:Ge(e);if(typeof r!="object"||Array.isArray(r))return r;const n=ke(e)?e:{},o={};for(const i of new Set([...Object.keys(r),...Object.keys(n)])){const c=Ge(r[i],n[i]);c!==void 0&&(o[i]=c)}return o}function Je(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 _t={type(r,e,n,o){return`Invalid type in config for key '${r}' in '${e}', got ${n}, wanted ${o}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,n){return`Unable to convert config value for key '${r}' in '${e}' to a ${n}`}};class cn{data;context;fallback;prefix;filteredKeys;notifiedFilteredKeys;static fromConfigs(e){return e.length===0?new cn(void 0):e.reduce((n,{data:o,context:i,filteredKeys:c,deprecatedKeys:A})=>{const y=new cn(o,i,n);if(y.filteredKeys=c,A)for(const{key:R,description:N}of A)console.warn(`The configuration key '${R}' of ${i} is deprecated and may be removed soon. ${N||""}`);return y},void 0)}constructor(e,n="mock-config",o,i=""){this.data=e,this.context=n,this.fallback=o,this.prefix=i,this.notifiedFilteredKeys=new Set}has(e){const n=this.readValue(e);return n===null?!1:n!==void 0?!0:this.fallback?.has(e)??!1}keys(){const e=this.data?Object.keys(this.data):[],n=this.fallback?.keys()??[];return[...new Set([...e,...n])].filter(o=>this.data?.[o]!==null)}get(e){const n=this.getOptional(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e??""),this.context));return n}getOptional(e){const n=Oe(this.readValue(e)),o=this.fallback?.getOptional(e);if(n!==null)return n===void 0?Ge(o):o===void 0?Ge(n):Ge(n,o)}getConfig(e){const n=this.getOptionalConfig(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalConfig(e){const n=this.readValue(e),o=this.fallback?.getOptionalConfig(e);if(ke(n))return this.copy(n,e,o);if(n!==null){if(n!==void 0)throw new TypeError(_t.type(this.fullKey(e),this.context,Je(n),"object"));return o}}getConfigArray(e){const n=this.getOptionalConfigArray(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalConfigArray(e){const n=this.readConfigValue(e,o=>{if(!Array.isArray(o))return{expected:"object-array"};for(const[i,c]of o.entries())if(!ke(c))return{expected:"object-array",value:c,key:`${e}[${i}]`};return!0});if(n)return n.map((o,i)=>this.copy(o,`${e}[${i}]`))}getNumber(e){const n=this.getOptionalNumber(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalNumber(e){const n=this.readConfigValue(e,i=>typeof i=="number"||typeof i=="string"||{expected:"number"});if(typeof n=="number"||n===void 0)return n;const o=Number(n);if(!Number.isFinite(o))throw new Error(_t.convert(this.fullKey(e),this.context,"number"));return o}getBoolean(e){const n=this.getOptionalBoolean(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalBoolean(e){const n=this.readConfigValue(e,i=>typeof i=="boolean"||typeof i=="number"||typeof i=="string"||{expected:"boolean"});if(typeof n=="boolean"||n===void 0)return n;const o=String(n).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(_t.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const n=this.getOptionalString(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalString(e){return this.readConfigValue(e,n=>typeof n=="string"&&n!==""||{expected:"string"})}getStringArray(e){const n=this.getOptionalStringArray(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalStringArray(e){return this.readConfigValue(e,n=>{if(!Array.isArray(n))return{expected:"string-array"};for(const[o,i]of n.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,n,o){const i=new cn(e,this.context,o,this.fullKey(n));return i.filteredKeys=this.filteredKeys,i}readConfigValue(e,n){const o=this.readValue(e);if(o===void 0)return this.fallback?.readConfigValue(e,n);if(o===null)return;const i=n(o);if(i!==!0){const{key:c=e,value:A=o,expected:y}=i;throw new TypeError(_t.type(this.fullKey(c),this.context,Je(A),y))}return o}readValue(e){const n=e?e.split("."):[];for(const i of n)if(!Ee.test(i))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let o=this.data;for(const[i,c]of n.entries())if(ke(o))o=o[c];else if(o!=null){const A=this.fullKey(n.slice(0,i).join("."));throw new TypeError(_t.type(A,this.context,Je(o),"object"))}return o}}const ln="theme";class Qn{themes;static createWithStorage(e){const n=new Qn(e);if(!window.localStorage)return n;const o=window.localStorage.getItem(ln)??void 0;return n.setActiveThemeId(o),n.activeThemeId$().subscribe(i=>{i?window.localStorage.setItem(ln,i):window.localStorage.removeItem(ln)}),window.addEventListener("storage",i=>{if(i.key===ln){const c=localStorage.getItem(ln)??void 0;n.setActiveThemeId(c)}}),n}activeThemeId;subject;constructor(e){this.themes=e,this.subject=new dt(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 vn=t(63636);function Gs(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 Wr{registeredFeatureFlags=[];flags;registerFlag(e){Gs(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===vn.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 n=Array.from(this.flags.entries()).filter(([,o])=>o===vn.S.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(n)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const n=JSON.parse(e);if(typeof n!="object"||n===null||Array.isArray(n))return new Map;const o=Object.entries(n).filter(([i,c])=>(Gs(i),c===vn.S.Active));return new Map(o)}catch{return new Map}}}const Zn=(0,ht.y)({id:"core.apptheme"}),Ys=(0,ht.y)({id:"core.applanguage"});var Kr=t(56038),Qs=function(r){return r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static",r}(Qs||{});class zr{factories=new Map;register(e,n){const o=Qs[e],i=this.factories.get(n.api.id);return i&&i.priority>=o?!1:(this.factories.set(n.api.id,{priority:o,factory:n}),!0)}get(e){const n=this.factories.get(e.id);if(n)return n.factory}getAllApis(){const e=new Set;for(const{factory:n}of this.factories.values())e.add(n.api);return e}}class Ms{factories;static validateFactories(e,n){for(const o of n){const i=[o],c=new Set;for(;i.length;){const A=i.shift(),y=e.get(A);if(y)for(const R of Object.values(y.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,n=[]){const o=this.apis.get(e.id);if(o)return o;const i=this.factories.get(e);if(!i)return;if(n.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const c=this.loadDeps(e,i.deps,[...n,i.api]),A=i.factory(c);return this.apis.set(e.id,A),A}loadDeps(e,n,o){const i={};for(const c in n)if(n.hasOwnProperty(c)){const A=n[c],y=this.load(A,o);if(!y)throw new Error(`No API factory available for dependency ${A} of dependent ${e}`);i[c]=y}return i}}function Hr(r){const e={};for(const o in r.collectors)r.collectors.hasOwnProperty(o)&&(e[o]=r.collectors[o]());const n=[{node:nt.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;n.length!==0;){const{node:o,parent:i,contexts:c}=n.shift();nt.Children.forEach(o,A=>{if(!(0,nt.isValidElement)(A))return;const y={};for(const R in e)if(e.hasOwnProperty(R)){const N=e[R];y[R]=N.visit(N.accumulator,A,i,c[R])}for(const R of r.discoverers){const N=R(A);N&&n.push({node:N,parent:A,contexts:y})}})}return Object.fromEntries(Object.entries(e).map(([o,i])=>[o,i.accumulator]))}function Jn(r,e){return()=>({accumulator:r(),visit:e})}function Vr(r){return r.props?.children}function Gr(r){if(r.props?.path&&r.props?.element)return r.props?.element}var Pe=t(19402);const Yr=Jn(()=>new Set,(r,e)=>{const n=(0,Pe.E)(e,"core.plugin");n&&r.add(n)});var Tn=t(72427);const Zs=r=>{const{children:e}=r,n=(0,Tn.gf)(vn.B),o="with"in r?n.isActive(r.with):!n.isActive(r.without);return(0,a.jsx)(a.Fragment,{children:o?e:null})};(0,Pe.h)(Zs,"core.featureFlagged",!0);const Xn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function _n(r){const e=r;return e?.type?e.type.displayName??e.type.name??String(e.type):String(e)}const Js=r=>{const e=new Set;return r&&e.add(r),e};function Xs(r,e=new Array){return nt.Children.forEach(r,n=>{if(!(0,nt.isValidElement)(n))return;const o=(0,Pe.E)(n,"core.mountPoint");if(o){const i=(0,Pe.E)(n,"core.plugin");e.push({routeRef:o,plugin:i})}Xs(n.props.children,e)}),e}const Qr=Jn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,o)=>{if(o?.isElementAncestor)return o;if(n?.props.element===e)return{...o,isElementAncestor:!0};const i=e.props?.path,c=(0,Pe.E)(e,"core.mountPoint");if(c&&i)throw new Error(`Path property may not be set directly on a routable extension "${_n(e)}"`);const A=o?.obj?.children??r.objects;if(i!==void 0){if(typeof i!="string")throw new Error(`Element path must be a string at "${_n(e)}"`);const y=i.startsWith("/")?i.slice(1):i,R=e.props.element;if((0,Pe.E)(e,"core.gatherMountPoints")){if(R)throw new Error(`Mount point gatherers may not have an element prop "${_n(e)}"`);const N={path:y,element:"gathered",routeRefs:new Set,caseSensitive:!!e.props?.caseSensitive,children:[Xn],plugins:new Set};return A.push(N),{obj:N,gatherPath:y,routeRef:o?.routeRef,gatherRouteRef:o?.routeRef}}if(R){const[N,...tt]=Xs(R);if(tt.length>0)throw new Error(`Route element with path "${i}" may not contain multiple routable extensions`);if(!N)return o;const{routeRef:mt,plugin:St}=N,Tt={path:y,element:"mounted",routeRefs:new Set([mt]),caseSensitive:!!e.props?.caseSensitive,children:[Xn],plugins:Js(St)};return A.push(Tt),r.paths.set(mt,y),r.parents.set(mt,o?.routeRef),{obj:Tt,routeRef:mt??o?.routeRef,gatherPath:y,gatherRouteRef:o?.gatherRouteRef}}}if(c){if(o?.gatherPath===void 0)throw new Error(`Routable extension "${_n(e)}" with mount point "${c}" must be assigned a path`);o?.obj?.routeRefs.add(c);const y=(0,Pe.E)(e,"core.plugin");return y&&o?.obj?.plugins.add(y),r.paths.set(c,o.gatherPath),r.parents.set(c,o?.gatherRouteRef),{...o,routeRef:c}}return o}),Zr=Jn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,o)=>{if(n?.props.element===e)return o;let i=o?.obj,c=o?.routeRef,A=o?.sticky;const y=e.props?.path,R=i?.children??r.objects,N=!!e.props?.caseSensitive;let tt=o?.path;if((0,Pe.E)(e,"core.gatherMountPoints")){if(!y)throw new Error("Mount point gatherer must have a path");tt=y}const mt=e.props?.element;let St=(0,Pe.E)(e,"core.mountPoint");if(!St&&(0,nt.isValidElement)(mt)&&(St=(0,Pe.E)(mt,"core.mountPoint")),St){let Dt=y;if(tt&&(Dt?tt=void 0:Dt=tt),!Dt)throw new Error("Mounted routable extension must have a path");r.paths.set(St,Dt),c&&A?(r.parents.set(St,c),y&&(c=St,A=!1)):(r.parents.set(St,c),c=St),y?(i={caseSensitive:N,path:y,element:"mounted",routeRefs:new Set([St]),children:[Xn],plugins:Js((0,Pe.E)(e.props.element,"core.plugin"))},R.push(i)):i?.routeRefs.add(St)}if((0,Pe.E)(e,"core.gatherMountPoints")&&(A=!0),(0,Pe.E)(e,"core.gatherMountPoints")){if(!y)throw new Error("Mount point gatherer must have a path");St||(i={caseSensitive:N,path:y,element:"gathered",routeRefs:new Set,children:[Xn],plugins:o?.obj?.plugins||new Set},R.push(i))}return{obj:i,path:tt,routeRef:c,sticky:A}}),Jr=Jn(()=>new Set,(r,e)=>{if(e.type===Zs){const n=e.props;r.add("with"in n?n.with:n.without)}});var Rn=t(21613),Xr=t(63544);const wn=(0,Xr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function _s(r){return r[wn]==="absolute"}function qs(r){return r[wn]==="sub"}function _r(r){return r[wn]==="external"}function qn(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var qr=t(46155),to=t.n(qr);function eo(r,e,n){let o,i="";if(_s(r))o=r;else if(qs(r))o=r.parent,i=r.path;else if(_r(r)){const y=n.get(r);if(!y)return[void 0,""];if(_s(y))o=y;else if(qs(y))o=y.parent,i=y.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${y}`)}else throw r[wn]?new Error(`Unknown or invalid route ref type, ${r[wn]}`):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 A=qn(c,i);return[o,A]}function no(r,e,n,o,i){const c=(0,Rn.ue)(i,e)??[],A=Array();let y=-1;for(let tt=r;tt&&(y=c.findIndex(mt=>mt.route.routeRefs.has(tt)),y===-1);tt=o.get(tt))A.unshift(tt);A.length===0&&(y-=1);const R=y===-1?"":c[y].pathname,N=A.slice(0,-1).map(tt=>{const mt=n.get(tt);if(mt===void 0)throw new Error(`No path for ${tt}`);if(mt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${tt} as it has parameters`);return mt});return`${qn(R,...N)}/`}class so{routePaths;routeParents;routeObjects;routeBindings;appBasePath;constructor(e,n,o,i,c){this.routePaths=e,this.routeParents=n,this.routeObjects=o,this.routeBindings=i,this.appBasePath=c}resolve(e,n){const[o,i]=eo(e,this.routePaths,this.routeBindings);if(!o)return;let c;typeof n=="string"?c=this.trimPath(n):n.pathname?c={...n,pathname:this.trimPath(n.pathname)}:c=n;const A=this.appBasePath+no(o,c,this.routePaths,this.routeParents,this.routeObjects);return(...[R])=>{const N=R&&to()(R,tt=>typeof tt=="string"?tt.replaceAll(/[&?#;\/]/g,mt=>encodeURIComponent(mt)):tt);return qn(A,(0,Rn.tW)(i,N))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}}const ro=(0,ie.tK)("routing-context"),oo=({routePaths:r,routeParents:e,routeObjects:n,routeBindings:o,basePath:i="",children:c})=>{const A=new so(r,e,n,o,i),y=(0,ve.B)({1:A});return(0,a.jsx)(ro.Provider,{value:y,children:c})};function ao(r,e){const n=new Set(e.values());n.delete(void 0);for(const o of e.keys()){if(n.has(o))continue;let i=o,c="";for(;i;){const y=r.get(i);if(y===void 0)throw new Error(`No path for ${i}`);c=qn(y,c),i=e.get(i)}const A=c.match(/:(\w+)/g);if(A){for(let y=0;y<A.length;y++)for(let R=y+1;R<A.length;R++)if(A[R]===A[y])throw new Error(`Parameter ${A[R]} is duplicated in path ${c}`)}}}function io(r,e){for(const n of e)if(n.externalRoutes){for(const[o,i]of Object.entries(n.externalRoutes))if(!i.optional&&!r.has(i))throw new Error(`External route '${o}' of the '${n.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const co=(0,ie.tK)("app-context"),lo=({appContext:r,children:e})=>{const n=(0,ve.B)({1:r});return(0,a.jsx)(co.Provider,{value:n,children:e})},tr="app",uo=`${tr}-auth-cookie-expires-at`,ho=5*6e4,er=5e3,po=2,go=5*6e4;function fo({discoveryApi:r,fetchApi:e,errorApi:n}){let o=!1,i,c=!0,A=er;const y="BroadcastChannel"in window?new BroadcastChannel(uo):void 0,R=St=>{const Tt=(1+3*Math.random())*6e4;return Math.max(St-Date.now(),ho)-Tt},N=async()=>{try{const Tt=`${await r.getBaseUrl(tr)}/.backstage/auth/v1/cookie`,Dt=await e.fetch(Tt,{credentials:"include"});if(!Dt.ok)throw new Error(`Request failed with status ${Dt.status} ${Dt.statusText}, see request towards ${Tt} for more details`);const Zt=await Dt.json();if(!Zt.expiresAt)throw new Error("No expiration date in response");const me=Date.parse(Zt.expiresAt);if(Number.isNaN(me))throw new Error("Invalid expiration date in response");c=!0,y?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(me).toISOString()}}),mt(R(me))}catch(St){c?(c=!1,A=er):(A=Math.min(go,A*po),console.error("Session cookie refresh failed",St),n.post(new Error("Session refresh failed, see developer console for details"))),mt(A)}},tt=St=>{const{data:Tt}=St;if(!(Tt===null||typeof Tt!="object")&&"action"in Tt&&Tt.action==="COOKIE_REFRESH_SUCCESS"){const Dt=Date.parse(Tt.payload.expiresAt);if(Number.isNaN(Dt)){console.warn("Received invalid expiration from session refresh channel");return}mt(R(Dt))}};function mt(St){o||(i&&clearTimeout(i),i=setTimeout(N,St))}return y?.addEventListener("message",tt),N(),()=>{o=!0,i&&clearTimeout(i),y?.removeEventListener("message",tt),y?.close()}}function nr(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Bs(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class mo{target;waitForTarget;resolveTarget=()=>{};signOutTargetUrl="/";#t;constructor(){this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}setTarget(e,n){this.target=e,this.signOutTargetUrl=n.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw nr("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Bs("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw nr("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Bs("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(e=>e.getProfileInfo())}async getBackstageIdentity(){const e=await this.waitForTarget.then(n=>n.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 Bs("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 n=fo(e);this.#t=async()=>{n();const o=await e.discoveryApi.getBaseUrl("app");try{await fetch(`${o}/.backstage/auth/v1/cookie`,{method:"DELETE",credentials:"include"})}catch{}}}}var yo=t(1394);function vo(r,e,n){if(r!==void 0){const i=n.find(c=>c.id===r);if(i)return i}if(e){const i=n.find(c=>c.variant==="dark");if(i)return i}const o=n.find(i=>i.variant==="light");return o||n[0]}const Eo=()=>{const r=(0,nt.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,n]=(0,nt.useState)(r.matches);return(0,nt.useEffect)(()=>{const o=i=>{n(i.matches)};return r.addListener(o),()=>{r.removeListener(o)}},[r]),e};function sr({children:r}){const e=(0,Tn.gf)(Zn),n=(0,yo.A)(e.activeThemeId$(),e.getActiveThemeId()),o=window.matchMedia?Eo():!1,i=vo(n,o,e.getInstalledThemes());if(!i)throw new Error("App has no themes");return(0,a.jsx)(i.Provider,{children:r})}const rr=async()=>Ao();function Ao(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=new Array,n=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(n){if(!Array.isArray(n))throw new Error("Static configuration has invalid format");e.push(...n)}const o=document.querySelectorAll('script[type="backstage.io/config"]');if(o.length>0)for(const c of o)try{const A=c.textContent;if(!A)throw new Error("tag is empty");let y;try{y=JSON.parse(A)}catch(R){throw new Error(`failed to parse config; ${R}`)}if(!Array.isArray(y))throw new Error("data is not an array");e.push(...y)}catch(A){throw new Error(`Failed to load config from script tag, ${A.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 xo{apis=[];add(e,n){return this.apis.push([e.id,n]),n}build(){return new En(new Map(this.apis))}}class En{apis;static builder(){return new xo}static from(e){return new En(new Map(e.map(([n,o])=>[n.id,o])))}static with(e,n){return new En(new Map([[e.id,n]]))}constructor(e){this.apis=e}with(e,n){return new En(new Map([...this.apis,[e.id,n]]))}get(e){return this.apis.get(e.id)}}function Co(r){const e=new Map,n=new Map;for(const o of r){for(const[i,c]of Object.entries(o.routes??{})){const A=`${o.getId()}.${i}`;if(e.has(A))throw new Error(`Unexpected duplicate route '${A}'`);e.set(A,c)}for(const[i,c]of Object.entries(o.externalRoutes??{})){const A=`${o.getId()}.${i}`;if(n.has(A))throw new Error(`Unexpected duplicate external route '${A}'`);n.set(A,c)}}return{routes:e,externalRoutes:n}}function bo(r,e,n){const o=Co(n),i=new Map,c=new Set;r&&r({bind:(R,N)=>{for(const[tt,mt]of Object.entries(N)){const St=R[tt];if(!St)throw new Error(`Key ${tt} is not an existing external route`);if(!mt&&!St.optional)throw new Error(`External route ${tt} is required but was ${mt===!1?"disabled":"not provided"}`);mt?i.set(St,mt):mt===!1&&c.add(St)}}});const A=e.getOptionalConfig("app.routes.bindings")?.get();if(A)for(const[y,R]of Object.entries(A)){if(!So(R))throw new Error(`Invalid config at app.routes.bindings['${y}'], value must be a non-empty string or false`);const N=o.externalRoutes.get(y);if(!N)throw new Error(`Invalid config at app.routes.bindings, '${y}' is not a valid external route`);if(!(i.has(N)||c.has(N)))if(R===!1)c.add(N);else{const tt=o.routes.get(R);if(!tt)throw new Error(`Invalid config at app.routes.bindings['${y}'], '${R}' is not a valid route`);i.set(N,tt)}}for(const y of o.externalRoutes.values())if(!i.has(y)&&!c.has(y)){const R="getDefaultTarget"in y?y.getDefaultTarget():void 0;if(R){const N=o.routes.get(R);N&&i.set(y,N)}}return i}function So(r){return!!(r===!1||typeof r=="string"&&r)}function In(){const[r]=(0,p.AV)((0,a.jsx)(p.qh,{index:!0,element:(0,a.jsx)("div",{})}));return!r.index}const or=(0,nt.createContext)(void 0);var ar=t(82266),ir=t(93368),Oo=t(25862);const Po=(r,e)=>{try{const o=(0,Rn.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 A;i.plugins.size===1&&(A=i.plugins.values().next().value);const y=Object.entries(o?.params||{}).reduce((R,[N,tt])=>(tt!==void 0&&N!=="*"&&(R[N]=tt),R),{});return{extension:"App",pluginId:A?.getId()||"root",...c?{routeRef:c.id}:{},_routeNodeType:i.element,params:y}}catch{return}},To=({pathname:r,search:e,hash:n,attributes:o})=>{const i=(0,ir.s)();return(0,nt.useEffect)(()=>{i.captureEvent("navigate",`${r}${e}${n}`,{attributes:o})},[i,r,e,n,o]),null},ts=({routeObjects:r})=>{const{pathname:e,search:n,hash:o}=(0,p.zy)(),{params:i,...c}=Po(e,r)||{params:{}};return(0,a.jsx)(Oo.Ig,{attributes:c,children:(0,a.jsx)(To,{pathname:e,search:n,hash:o,attributes:i})})};function Ro(r){return In()?js(r):""}function js(r){let{pathname:e}=new URL(r.getOptionalString("app.baseUrl")??"/","http://sample.dev");return e=e.replace(/\/*$/,""),e}function cr({component:r,appIdentityProxy:e,children:n}){const[o,i]=(0,nt.useState)(),c=(0,Tn.gf)(ot.U),A=js(c);return o?(e.setTarget(o,{signOutTargetUrl:A||"/"}),(0,a.jsx)(a.Fragment,{children:n})):(0,a.jsx)(r,{onSignInSuccess:i})}function lr(r){const{Router:e,SignInPage:n}=(0,ar.n)().getComponents(),o=(0,Tn.gf)(ot.U),i=js(o),c=`${i}/*`,A=(0,nt.useContext)(or);if(!A)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:y,appIdentityProxy:R}=A;return n?In()?(0,a.jsxs)(e,{children:[(0,a.jsx)(ts,{routeObjects:y}),(0,a.jsx)(cr,{component:n,appIdentityProxy:R,children:(0,a.jsx)(p.BV,{children:(0,a.jsx)(p.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(ts,{routeObjects:y}),(0,a.jsx)(cr,{component:n,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||"/"}),In()?(0,a.jsxs)(e,{children:[(0,a.jsx)(ts,{routeObjects:y}),(0,a.jsx)(p.BV,{children:(0,a.jsx)(p.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(ts,{routeObjects:y}),r.children]}))}(0,Pe.h)(lr,"core.type","AppRouter");const Dn="language",Xe="en";class es{static create(e){const n=e?.availableLanguages??[Xe];if(n.length!==new Set(n).size)throw new Error(`Supported languages may not contain duplicates, got '${n.join("', '")}'`);if(!n.includes(Xe))throw new Error(`Supported languages must include '${Xe}'`);const o=e?.defaultLanguage??Xe;if(!n.includes(o))throw new Error(`Initial language must be one of the supported languages, got '${o}'`);return new es(n,o)}static createWithStorage(e){const n=es.create(e);if(!window.localStorage)return n;const o=window.localStorage.getItem(Dn),{languages:i}=n.getAvailableLanguages();return o&&i.includes(o)&&n.setLanguage(o),n.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(Dn)&&window.localStorage.setItem(Dn,c)}),window.addEventListener("storage",c=>{if(c.key===Dn){const A=localStorage.getItem(Dn)??void 0;A&&n.setLanguage(A)}}),n}#t;#e;#n;constructor(e,n){this.#t=e,this.#e=n,this.#n=new dt({language:this.#e})}getAvailableLanguages(){return{languages:this.#t.slice()}}setLanguage(e){const n=e??Xe;if(n!==this.#e){if(n&&!this.#t.includes(n))throw new Error(`Failed to change language to '${n}', available languages are '${this.#t.join("', '")}'`);this.#e=n,this.#n.next({language:n})}}getLanguage(){return{language:this.#e}}language$(){return this.#n}}var wo=t(47304),Io=t(99833),dr=t(93184);function ur(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}class Do{onLoad;#t;#e;#n;constructor(e){this.onLoad=e,this.#t=new Set,this.#e=new Map,this.#n=new Map}addTranslationResource(e){const n=(0,Io.Y)(e);for(const o of n.resources){const i=this.#s(o.language,n.id);this.#n.has(i)||this.#n.set(i,o.loader)}}#s(e,n){return`${e}/${n}`}needsLoading(e,n){const o=this.#s(e,n);return this.#n.get(o)?!this.#t.has(o):!1}async load(e,n){const o=this.#s(e,n),i=this.#n.get(o);if(!i||this.#t.has(o))return;const c=this.#e.get(o);if(c){await c;return}const A=i().then(y=>{this.onLoad({language:e,namespace:n,messages:y.messages}),this.#t.add(o)},y=>{throw this.#t.add(o),y});this.#e.set(o,A),await A}}class Us{#t;#e;#n;static fromI18n(e){const n=e.services.interpolator,o=n.format;let i;return n.format=(c,A,y,R)=>A?o(c,A,y,R):i?.(c,A,y,R)??c,new Us(Math.random().toString(36).substring(2,8),c=>{i=c})}constructor(e,n){this.#t=n,this.#e=e,this.#n=new RegExp(`\\$${e}\\(([^)]+)\\)`)}wrapT(e){return(n,o)=>{let i;this.#t(y=>{if((0,nt.isValidElement)(y)){i||(i=new Map);const R=i.size.toString();return i.set(R,y),`$${this.#e}(${R})`}return y});const c=e(n,o);if(!i)return c;const A=c.split(this.#n);return(0,nt.createElement)(nt.Fragment,null,...A.map((y,R)=>R%2===0?y:i?.get(y)).filter(Boolean))}}}class $s{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),o=(0,wo.Q_)({fallbackLng:Xe,supportedLngs:n,interpolation:{escapeValue:!1,alwaysFormat:!0},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(o.init(),!o.isInitialized)throw new Error("i18next was unexpectedly not initialized");const i=Us.fromI18n(o),{language:c}=e.languageApi.getLanguage();c!==Xe&&o.changeLanguage(c);const A=new Do(N=>{o.addResourceBundle(N.language,N.namespace,ur(N.messages),!1,!0)}),y=e?.resources||[];for(let N=y.length-1;N>=0;N--){const tt=y[N];tt.$$type==="@backstage/TranslationResource"?A.addTranslationResource(tt):tt.$$type==="@backstage/TranslationMessages"&&o.addResourceBundle(Xe,tt.id,ur(tt.messages),!0,!1)}const R=new $s(o,A,e.languageApi.getLanguage().language,i);return e.languageApi.language$().subscribe(({language:N})=>{R.#a(N)}),R}#t;#e;#n;#s;#o=new Set;#r=new Set;constructor(e,n,o,i){this.#t=e,this.#e=n,this.#n=o,this.#s=i}getTranslation(e){const n=(0,dr.v)(e);return this.#c(n),this.#i(n)}translation$(e){const n=(0,dr.v)(e);return this.#c(n),new(Y())(o=>{let i={};const c=()=>{i={};const y=i;this.#e.load(this.#n,n.id).then(()=>{if(y===i){const R=this.#i(n);R.ready&&o.next(R)}},R=>{y===i&&o.error(Array.isArray(R)?R[0]:R)})},A=()=>{const y=this.#i(n);y.ready?o.next(y):c()};return this.#e.needsLoading(this.#n,n.id)&&c(),this.#r.add(A),()=>{this.#r.delete(A)}})}#a(e){this.#n!==e&&(this.#n=e,this.#t.changeLanguage(e),this.#r.forEach(n=>n()))}#i(e){if(this.#e.needsLoading(this.#n,e.id))return{ready:!1};const n=this.#t.getFixedT(null,e.id);return{ready:!0,t:this.#s.wrapT(n)}}#c(e){if(this.#o.has(e.id))return;this.#o.add(e.id);const n=e.getDefaultMessages();this.#t.addResourceBundle(Xe,e.id,n,!0,!1);const o=e.getDefaultResource();o&&this.#e.addTranslationResource(o)}}function hr(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 Lo(r){const e=cn.fromConfigs(r),n=e.getOptionalString("app.baseUrl"),o=e.getOptionalString("backend.baseUrl");let i=r,c,A;if(n&&o){const y=new URL(n).origin,R=new URL(o).origin;if(y===R){const N=hr(o);o!==N&&(c=N)}}if(n){const y=hr(n);n!==y&&(A=y)}return(A||c)&&(i=i.concat({data:{app:A&&{baseUrl:A},backend:c&&{baseUrl:c}},context:"relative-resolver"})),i}function Mo(){return(document.querySelector('meta[name="backstage-app-mode"]')?.getAttribute("content")??"public")==="protected"}function Bo(r,e,n){const o=!!r,i=(0,Se.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:A=sr}=e;return c?{node:(0,a.jsx)(ae,{apis:En.with(Zn,n),children:(0,a.jsx)(A,{children:c})})}:{api:cn.fromConfigs(i.value?.length?Lo(i.value):[])}}class jo{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 Uo{apiHolder;configApi;apis;icons;plugins;featureFlags;components;themes;configLoader;defaultApis;bindRoutes;appLanguageApi;translationResources;appIdentityProxy=new mo;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??rr,this.defaultApis=e.defaultApis??[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new zr,this.appLanguageApi=es.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 n=this.getProvider();return()=>(0,a.jsx)(n,{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 jo(this);let n,o;return({children:c})=>{const A=(0,nt.useRef)(!0),y=(0,nt.useMemo)(()=>Qn.createWithStorage(this.themes),[]),{routing:R,featureFlags:N}=(0,nt.useMemo)(()=>{const Zt=In();Zt&&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 me=Hr({root:c,discoverers:[Vr,Gr],collectors:{routing:Zt?Zr:Qr,collectedPlugins:Yr,featureFlags:Jr}});return me.collectedPlugins.forEach(Be=>this.plugins.add(Be)),this.verifyPlugins(this.plugins),this.getApiHolder(),me},[c]),tt=Bo(this.configLoader,this.components,y),mt="api"in tt;if(mt){const{api:Zt}=tt;this.configApi=Zt}if("node"in tt)return tt.node;if(o)throw o;if(!n)try{n=bo(this.bindRoutes,tt.api,this.plugins),ao(R.paths,R.parents),io(n,this.plugins)}catch(Zt){throw o=Zt,Zt}if(mt&&A.current){A.current=!1;const Zt=this.getApiHolder().get(vn.B);if(Zt){for(const De of this.featureFlags)Zt.registerFlag({...De,pluginId:""});for(const De of this.plugins.values())if("getFeatureFlags"in De)for(const un of De.getFeatureFlags())Zt.registerFlag({name:un.name,pluginId:De.getId()});else for(const un of De.output())un.type==="feature-flag"&&Zt.registerFlag({name:un.name,pluginId:De.getId()});const me=Zt.getRegisteredFlags(),Be=new Set(me.map(De=>De.name));for(const De of N)Be.has(De)||Zt.registerFlag({name:De,pluginId:""})}}const{ThemeProvider:St=sr,Progress:Tt}=this.components,Dt=this.getApiHolder();if(Mo()){const Zt=Dt.get(Yt.m),me=Dt.get(Me.a),Be=Dt.get(_.I);if(!Zt||!me||!Be)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Zt,fetchApi:me,discoveryApi:Be})}return(0,a.jsx)(ae,{apis:Dt,children:(0,a.jsx)(lo,{appContext:e,children:(0,a.jsx)(St,{children:(0,a.jsx)(oo,{routePaths:R.paths,routeParents:R.parents,routeObjects:R.objects,routeBindings:n,basePath:Ro(tt.api),children:(0,a.jsx)(or.Provider,{value:{routeObjects:R.objects,appIdentityProxy:this.appIdentityProxy},children:(0,a.jsx)(nt.Suspense,{fallback:(0,a.jsx)(Tt,{}),children:c})})})})})})}}getRouter(){return lr}getApiHolder(){if(this.apiHolder){for(const e of this.plugins)for(const n of e.getApis())this.apiFactoryRegistry.get(n.api)||this.apiFactoryRegistry.register("default",n);return Ms.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:Zn,deps:{},factory:()=>Qn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:ot.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:he.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:Ys,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:Kr.J,deps:{languageApi:Ys},factory:({languageApi:e})=>$s.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:vn.B,deps:{},factory:()=>new Wr});for(const e of this.defaultApis)this.apiFactoryRegistry.register("default",e);for(const e of this.plugins)for(const n of e.getApis())if(!this.apiFactoryRegistry.register("default",n))throw new Error(`Plugin ${e.getId()} tried to register duplicate or forbidden API factory for ${n.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 Ms.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new Ms(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const n=new Set;for(const o of e){const i=o.getId();if(n.has(i))throw new Error(`Duplicate plugin found '${i}'`);n.add(i)}}}function $o(r){return new Uo(r)}function Fo(r){return $o({...r,apis:r?.apis??[],bindRoutes:r?.bindRoutes,components:{...M,...r?.components},configLoader:r?.configLoader,defaultApis:ls,icons:{...xs,...r?.icons},plugins:r?.plugins??[],featureFlags:r?.featureFlags??[],themes:r?.themes??de})}var ns=t(82442);let pr=!1;const gr=r=>{const e=(0,ar.n)(),{NotFoundErrorPage:n}=e.getComponents(),o=(0,nt.useMemo)(()=>In(),[]),c=[...(0,ns.O)(r.children,A=>A.getElements().flatMap(y=>{let R=y.props.path;if(R==="")return[];R=R?.replace(/\/\*$/,"")??"/";let N=o?y:y.props.element;return!o&&!N&&(N=y,pr||(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] />} />."),pr=!0)),[{path:R,element:N,children:y.props.children?[{path:R==="/"?"/":"*",element:y.props.children}]:void 0}]}).sort((y,R)=>R.path.localeCompare(y.path)).map(y=>({...y,path:y.path==="/"?"/":`${y.path}/*`}))),{path:"*",element:(0,a.jsx)(n,{})}];return(0,p.Ye)(c)};(0,Pe.h)(gr,"core.type","FlatRoutes");var An=t(6820),No=t(78692),ko=t(86519);function Wo(r){return!r.cursor}function Ko(r,e){if(!r.length)return[];const{maxCountPerChunk:n=1e3,maxStringLengthPerChunk:o=90*2**10,extraStringLengthPerRef:i=3}=e??{},c=[];let A=0,y=0,R=0;for(let N=0;N<r.length;++N){const tt=r[N].length+i;R>0&&(y+tt>o||R+1>n)&&(c.push(r.slice(A,N)),A=N,y=0,R=0),y+=tt,R+=1}return c.push(r.slice(A,r.length)),c}const Ae="catalog";var xe=t(94214);class zo{discoveryApi;fetchApi;constructor(e){this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:gn()}}async deleteEntityByUid(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"DELETE"})}async getEntities(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities{?fields,limit,filter*,offset,after,order*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntitiesByQuery(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntitiesByRefs(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-refs{?filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async getEntityAncestryByName(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntityByName(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntityByUid(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntityFacets(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entity-facets{?facet*,filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async refreshEntity(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/refresh").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async validateEntity(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/validate-entity").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async analyzeLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/analyze-location").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async createLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/locations{?dryRun}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async deleteLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"DELETE"})}async getLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getLocationByEntity(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getLocations(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/locations").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}}class Ho{apiClient;constructor(e){this.apiClient=new zo(e)}async getEntityAncestors(e,n){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,An.KU)(e.entityRef)},n))}async getLocations(e,n){return{items:(await this.requestRequired(await this.apiClient.getLocations(e??{},n))).map(i=>i.data)}}async getLocationById(e,n){return await this.requestOptional(await this.apiClient.getLocation({path:{id:e}},n))}async getLocationByEntity(e,n){return await this.requestOptional(await this.apiClient.getLocationByEntity({path:(0,An.KU)(e)},n))}async getEntities(e,n){const{filter:o=[],fields:i=[],order:c,offset:A,limit:y,after:R}=e??{},N=[];if(c)for(const mt of[c].flat())mt&&N.push(`${mt.order}:${mt.field}`);return{items:await this.requestRequired(await this.apiClient.getEntities({query:{fields:i,limit:y,filter:this.getFilterValue(o),offset:A,after:R,order:c?N:void 0}},n))}}async getEntitiesByRefs(e,n){const o=async c=>{const A=await this.apiClient.getEntitiesByRefs({body:{entityRefs:c,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},n);if(!A.ok)throw await pe.o.fromResponse(A);return(await A.json()).items.map(R=>R??void 0)};let i;for(const c of Ko(e.entityRefs)){const A=await o(c);i?i.push(...A):i=A}return{items:i??[]}}async queryEntities(e={},n){const o={};if(Wo(e)){const{fields:i=[],filter:c,limit:A,offset:y,orderFields:R,fullTextFilter:N}=e;o.filter=this.getFilterValue(c),A!==void 0&&(o.limit=A),y!==void 0&&(o.offset=y),R!==void 0&&(o.orderField=(Array.isArray(R)?R:[R]).map(({field:mt,order:St})=>`${mt},${St}`)),i.length&&(o.fields=i);const tt=N?.term?.trim();tt&&(o.fullTextFilterTerm=tt),N?.fields?.length&&(o.fullTextFilterFields=N.fields)}else{const{fields:i=[],limit:c,cursor:A}=e;o.cursor=A,c!==void 0&&(o.limit=c),i.length&&(o.fields=i)}return this.requestRequired(await this.apiClient.getEntitiesByQuery({query:o},n))}async getEntityByRef(e,n){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,An.KU)(e)},n))}async getEntityByName(e,n){const{kind:o,namespace:i="default",name:c}=e;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:o,namespace:i,name:c}},n))}async refreshEntity(e,n){const o=await this.apiClient.refreshEntity({body:{entityRef:e}},n);if(o.status!==200)throw await pe.o.fromResponse(o)}async getEntityFacets(e,n){const{filter:o=[],facets:i}=e;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:i,filter:this.getFilterValue(o)}},n))}async addLocation(e,n){const{type:o="url",target:i,dryRun:c}=e,A=await this.apiClient.createLocation({body:{type:o,target:i},query:{dryRun:c?"true":void 0}},n);if(A.status!==201)throw await pe.o.fromResponse(A);const{location:y,entities:R,exists:N}=await A.json();if(!y)throw new Error(`Location wasn't added: ${i}`);return{location:y,entities:R,exists:N}}async getLocationByRef(e,n){return(await this.requestRequired(await this.apiClient.getLocations({},n))).map(i=>i.data).find(i=>e===(0,No.KL)(i))}async removeLocationById(e,n){await this.requestIgnored(await this.apiClient.deleteLocation({path:{id:e}},n))}async removeEntityByUid(e,n){await this.requestIgnored(await this.apiClient.deleteEntityByUid({path:{uid:e}},n))}async validateEntity(e,n,o){const i=await this.apiClient.validateEntity({body:{entity:e,location:n}},o);if(i.ok)return{valid:!0};if(i.status!==400)throw await pe.o.fromResponse(i);const{errors:c=[]}=await i.json();return{valid:!1,errors:c}}async requestIgnored(e){if(!e.ok)throw await pe.o.fromResponse(e)}async requestRequired(e){if(!e.ok)throw await pe.o.fromResponse(e);return e.json()}async requestOptional(e){if(!e.ok){if(e.status===404)return;throw await pe.o.fromResponse(e)}return await e.json()}getFilterValue(e=[]){const n=[];for(const o of[e].flat()){const i=[];for(const[c,A]of Object.entries(o))for(const y of[A].flat())y===ko.c?i.push(c):typeof y=="string"&&i.push(`${c}=${y}`);i.length&&n.push(i.join(","))}return n}}var fr=t(7341),Vo=t(18),Go=t(82292),mr=t(29207),xn=t(95203),Yo=t(9803),Ie=t(88758),Qo=t(54560),Cn=t(45250);async function Zo({storageApi:r}){const e=r.forBucket("settings"),n=r.forBucket("starredEntities"),o=e.snapshot("starredEntities").value;if(!(0,Cn.isArray)(o))return;const i=new Set(n.snapshot("entityRefs").value??[]);o.filter(Cn.isString).map(c=>c.split(":")).filter(c=>c.length===4&&c[0]==="entity").map(([c,A,y,R])=>(0,An.U2)({kind:A,namespace:y,name:R})).forEach(c=>i.add(c)),await n.set("entityRefs",Array.from(i)),await e.remove("starredEntities")}class Jo{settingsStore;starredEntities;constructor(e){Zo(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities"),this.starredEntities=new Set(this.settingsStore.snapshot("entityRefs").value??[]),this.settingsStore.observe$("entityRefs").subscribe({next:n=>{this.starredEntities=new Set(n.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(Y())(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 Fs(r){const{years:e=0,months:n=0,weeks:o=0,days:i=0,hours:c=0,minutes:A=0,seconds:y=0,milliseconds:R=0}=r;return((((e*365+n*30+o*7+i)*24+c)*60+A)*60+y)*1e3+R}var Xo=t(25033),_o=t.n(Xo),qo=t(88083);const ta={seconds:10},ea={milliseconds:50},na={api:Nn.A,component:Wn.A,system:Un.A,resource:Kn.A,domain:Bn.A,location:kn.A,user:On.A,group:Sn.A,template:zn.A};function yr(r){return{async:r.async,render:({entityRef:e,entity:n,context:o})=>({snapshot:(0,qo.T)(n||e,o),loadEntity:r.async})}}class sa extends Map{#t;#e=new Map;constructor(e){super(),this.#t=e}set(e,n){const o=super.set(e,n);return this.#e.set(e,Date.now()),o}get(e){if(!this.has(e))return;const n=this.#e.get(e);if(Date.now()-n>this.#t){this.delete(e);return}return super.get(e)}delete(e){return this.#e.delete(e),super.delete(e)}clear(){return this.#e.clear(),super.clear()}}class ss{static createLocal(){return new ss({renderer:yr({async:!1})})}static create(e){return new ss(e)}#t;#e;#n;#s;#o;constructor(e){const n=e.cacheTtl??ta,o=e.batchDelay??ea,i=e.renderer??yr({async:!0}),c={};if(Object.entries(na).forEach(([A,y])=>{c[A.toLocaleLowerCase("en-US")]=y}),Object.entries(e.kindIcons??{}).forEach(([A,y])=>{c[A.toLocaleLowerCase("en-US")]=y}),i.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");this.#n=this.#a({cacheTtl:n,batchDelay:o,renderer:i,catalogApi:e.catalogApi})}this.#e=Fs(n),this.#t=new Map,this.#s=c,this.#o=i}forEntity(e,n){const{entityRef:o,kind:i,entity:c,needsLoad:A}=this.#r(e),y=St=>{const{snapshot:Tt}=this.#o.render({entityRef:o,loading:St.loading,entity:St.entity,context:n||{}});return{...Tt,entityRef:o,Icon:this.#i(Tt.Icon,i)}};let R;try{R=y({loading:A,entity:c})}catch{R={primaryTitle:o,entityRef:o}}if(!A)return{snapshot:R,promise:Promise.resolve(R)};const N=Promise.resolve().then(()=>this.#n?.load(o)).then(St=>y({loading:!1,entity:St??c})).catch(()=>{}),tt=new(Y())(St=>{let Tt=!1;return N.then(Dt=>{Dt&&St.next(Dt)}).finally(()=>{Tt||St.complete()}),()=>{Tt=!0}}),mt=N.then(St=>St??R);return{snapshot:R,update$:tt,promise:mt}}#r(e){if(typeof e!="string")return{entity:e,kind:e.kind,entityRef:(0,An.U2)(e),needsLoad:!1};const n=this.#t.get(e),o=n?.entity,c=(!n||Date.now()-n.updatedAt>this.#e)&&this.#o.async!==!1&&this.#n!==void 0;return{entity:o,kind:(0,An.KU)(e).kind,entityRef:e,needsLoad:c}}#a(e){const n=Fs(e.cacheTtl),o=Fs(e.batchDelay);return new(_o())(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"]}),A=Date.now();return i.forEach((y,R)=>{this.#t.set(y,{updatedAt:A,entity:c[R]})}),c},{name:"DefaultEntityPresentationApi",cacheMap:new sa(n),maxBatchSize:100,batchScheduleFn:o?i=>setTimeout(i,o):void 0})}#i(e,n){return e||(e===!1?!1:this.#s[n.toLocaleLowerCase("en-US")])}}const Te=(0,Yo.i)({id:"catalog",apis:[(0,Z.b)({api:fr.v,deps:{discoveryApi:_.I,fetchApi:Me.a},factory:({discoveryApi:r,fetchApi:e})=>new Ho({discoveryApi:r,fetchApi:e})}),(0,Z.b)({api:Vo.a,deps:{storageApi:re},factory:({storageApi:r})=>new Jo({storageApi:r})}),(0,Z.b)({api:Go.n,deps:{catalogApi:fr.v},factory:({catalogApi:r})=>ss.create({catalogApi:r})})],routes:{catalogIndex:xn.rQ,catalogEntity:mr.s},externalRoutes:{createComponent:xn.qP,viewTechDoc:xn.UJ,createFromTemplate:xn.Zg,unregisterRedirect:xn.pS}}),mi=Te.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:xn.rQ})),ra=Te.provide((0,Ie.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(r=>r.CatalogEntityPage),mountPoint:mr.s})),yi=Te.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)}})),vi=Te.provide((0,Ie.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),Ei=Te.provide((0,Ie.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),Ai=Te.provide((0,Ie.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),xi=Te.provide((0,Ie.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),Ci=Te.provide((0,Ie.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),bi=Te.provide((0,Ie.NC)({name:"EntityHasSubdomainsCard",component:{lazy:()=>t.e(6415).then(t.bind(t,46415)).then(r=>r.HasSubdomainsCard)}})),Si=Te.provide((0,Ie.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),Oi=Te.provide((0,Ie.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),Pi=Te.provide((0,Ie.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),Ti=Te.provide((0,Ie.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),Ri=Te.provide((0,Ie.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),wi=Te.provide((0,Qo.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var vr=t(96726),Er=t(26679);class oa{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:n,identityApi:o}){this.configApi=e,this.discoveryApi=n,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,n){const i=`${await this.getApiOrigin()}/${n}`,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,n,o){const i=await this.getApiOrigin();return new URL(e,`${i}/${o}`).toString()}}class aa{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:n,identityApi:o}){this.configApi=e,this.discoveryApi=n,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 ia=[(0,Z.b)({api:Er.s,deps:{configApi:ot.U,discoveryApi:_.I,identityApi:he.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new oa({configApi:r,discoveryApi:e,identityApi:n})}),(0,Z.b)({api:Er.l,deps:{configApi:ot.U,discoveryApi:_.I,identityApi:he.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new aa({configApi:r,discoveryApi:e,identityApi:n})}),(0,Z.b)({api:vr.Y,deps:{configApi:ot.U},factory:({configApi:r})=>vr.L.fromConfig(r)})],ca={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},la={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function da(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function ua(){const r=await rr(),e=await da();return[...r,{context:"detected",data:e?ca:la}]}var _e=t(58837),ha=t(3210);const pa=(0,_e.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}}),ga=()=>{const r=pa();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"})})},fa=(0,_e.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}}),ma=()=>{const r=fa();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 Ce=t(72664);const Ar={isOpen:!1,setOpen:()=>{}},xr=(0,nt.createContext)(Ar),Cr=(0,fe.tK)("sidebar-open-state-context");function br(r){const{children:e,value:n}=r;return(0,a.jsx)(xr.Provider,{value:n,children:(0,a.jsx)(Cr.Provider,{value:(0,ve.B)({1:n}),children:e})})}const Ns=()=>{const r=(0,nt.useContext)(Cr),e=(0,nt.useContext)(xr);if(r===void 0)return e||Ar;const n=r.atVersion(1);if(n===void 0)throw new Error("No context found for version 1.");return n};var Sr=t(72072),Or=t(73524),rn=t(10394),Pr=t(5893),ya=t(53373),dn=t.n(ya),va=t(1125),Tr=t(29365),Ea=t(73845),ks=t(72501),Aa=t(32881),xa=t(27326),Ca=t(13085);const Rr=(0,nt.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var Ws=t(34435);const ba=(0,_e.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"}})),Sa=r=>{const{to:e,label:n,icon:o,value:i}=r,{sidebarConfig:c}=(0,nt.useContext)(Ce.yY),A=ba({sidebarConfig:c}),y=(0,p.zy)(),{selectedMenuItemIndex:R,setSelectedMenuItemIndex:N}=(0,nt.useContext)(Rr),tt=(St,Tt)=>{N(Tt===R?-1:Tt)},mt=i===R&&R>=0||i!==R&&!(R>=0)&&e===y.pathname;return(0,a.jsx)(Ca.A,{"aria-label":n,label:n,icon:o,component:Sr.N_,to:e||y.pathname,onChange:tt,value:i,selected:mt,classes:A})},wr=r=>{const{children:e,to:n,label:o,icon:i,value:c}=r,{isMobile:A}=(0,Ws.Ut)();return A?(0,a.jsx)(Sa,{to:n,label:o,icon:i,value:c}):(0,a.jsx)(a.Fragment,{children:e})},Ir=(0,_e.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`})})),Oa=r=>(0,Cn.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),Pa=(0,nt.createElement)(wr).type,Ta=({children:r,label:e="Menu",open:n,onClose:o})=>{const{sidebarConfig:i}=(0,nt.useContext)(Ce.yY),c=Ir({sidebarConfig:i});return(0,a.jsxs)(Ea.Ay,{anchor:"bottom",open:n,onClose:o,ModalProps:{BackdropProps:{classes:{root:c.marginMobileSidebar}}},classes:{root:c.marginMobileSidebar,paperAnchorBottom:c.overlay},children:[(0,a.jsxs)(rn.A,{className:c.overlayHeader,children:[(0,a.jsx)(ks.A,{variant:"h3",children:e}),(0,a.jsx)(Tr.A,{onClick:o,classes:{root:c.overlayHeaderClose},children:(0,a.jsx)(Aa.A,{})})]}),(0,a.jsx)(rn.A,{component:"nav",children:r})]})},Ra=r=>{const{sidebarConfig:e}=(0,nt.useContext)(Ce.yY),{children:n}=r,o=Ir({sidebarConfig:e}),i=(0,p.zy)(),[c,A]=(0,nt.useState)(-1);(0,nt.useEffect)(()=>{A(-1)},[i.pathname]);let y=(0,ns.O)(n,N=>N.getElements().filter(tt=>tt.type===Pa));if(n)y.length?y=Oa(y):y.push((0,a.jsx)(wr,{icon:(0,a.jsx)(xa.A,{}),children:n},"default_menu"));else return null;const R=c>=0&&!y[c].props.to;return(0,a.jsx)(br,{value:{isOpen:!0,setOpen:()=>{}},children:(0,a.jsxs)(Rr.Provider,{value:{selectedMenuItemIndex:c,setSelectedMenuItemIndex:A},children:[(0,a.jsx)(Ta,{label:y[c]&&y[c].props.label,open:R,onClose:()=>A(-1),children:y[c]&&y[c].props.children}),(0,a.jsx)(va.A,{className:o.root,"data-testid":"mobile-sidebar-root",component:"nav",children:y})]})})};var wa=t(87849),Ia=t(10315);const Dr=(0,_e.A)(r=>({root:{left:0,top:0,bottom:0,zIndex:r.zIndex.appBar,position:"fixed"},drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",left:0,top:0,bottom:0,position:"absolute",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 Da=function(r){return r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open",r}(Da||{});const La=r=>{const{sidebarConfig:e}=(0,nt.useContext)(Ce.yY),{openDelayMs:n=e.defaultOpenDelayMs,closeDelayMs:o=e.defaultCloseDelayMs,disableExpandOnHover:i,children:c}=r,A=Dr({sidebarConfig:e}),y=(0,Pr.A)(Be=>Be.breakpoints.down("md"),{noSsr:!0}),[R,N]=(0,nt.useState)(0),tt=(0,nt.useRef)(),{isPinned:mt,toggleSidebarPinState:St}=(0,Ws.Ut)(),Tt=()=>{mt||i||(tt.current&&(clearTimeout(tt.current),tt.current=void 0),R!==2&&!y&&(tt.current=window.setTimeout(()=>{tt.current=void 0,N(2)},n),N(1)))},Dt=()=>{mt||i||(tt.current&&(clearTimeout(tt.current),tt.current=void 0),R===1?N(0):R===2&&(tt.current=window.setTimeout(()=>{tt.current=void 0,N(0)},o)))},Zt=R===2&&!y||mt,me=Be=>{Be?(N(2),St()):(N(0),St())};return(0,a.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,a.jsx)(Ba,{}),(0,a.jsx)(br,{value:{isOpen:Zt,setOpen:me},children:(0,a.jsx)(rn.A,{className:A.root,"data-testid":"sidebar-root",onMouseEnter:i?()=>{}:Tt,onFocus:i?()=>{}:Tt,onMouseLeave:i?()=>{}:Dt,onBlur:i?()=>{}:Dt,children:(0,a.jsx)(rn.A,{className:dn()(A.drawer,A.drawerWidth,{[A.drawerOpen]:Zt}),children:c})})})]})},Ma=r=>{const e=(0,Ce.Rv)(r.sidebarOptions??{}),n=(0,Ce.i8)(r.submenuOptions??{}),{children:o,disableExpandOnHover:i,openDelayMs:c,closeDelayMs:A}=r,{isMobile:y}=(0,Ws.Ut)();return y?(0,a.jsx)(Ra,{children:o}):(0,a.jsx)(Ce.yY.Provider,{value:{sidebarConfig:e,submenuConfig:n},children:(0,a.jsx)(La,{openDelayMs:c,closeDelayMs:A,disableExpandOnHover:i,children:o})})};function Ba(){const{sidebarConfig:r}=(0,nt.useContext)(Ce.yY),{focusContent:e,contentRef:n}=(0,Or.H)(),o=Dr({sidebarConfig:r}),{t:i}=(0,wa.i)(Ia.O);return n?.current?(0,a.jsx)(u.A,{onClick:e,variant:"contained",className:dn()(o.visuallyHidden),children:i("skipToContent")}):null}var ja=t(94509),rs=t(58502),Ua=t(79065),$a=t(55704),Lr=t(62248);const Fa=(0,_e.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"}),Na=r=>{const{isOpen:e}=Ns(),{sidebarConfig:n,submenuConfig:o}=(0,nt.useContext)(Ce.yY),i=e?n.drawerWidthOpen:n.drawerWidthClosed,c=Fa({left:i,submenuConfig:o}),{isHoveredOn:A}=(0,nt.useContext)(Ce.U1),[y,R]=(0,nt.useState)(!1);return(0,nt.useEffect)(()=>{R(A)},[A]),(0,a.jsxs)(rn.A,{className:dn()(c.drawer,{[c.drawerOpen]:y}),children:[(0,a.jsx)(ks.A,{variant:"h5",component:"span",className:c.title,children:r.title}),r.children]})};var ka=t(45810),Mr=t.n(ka);function Br(r,e,n=!1){const o=new URLSearchParams(e.search).toString(),i=Mr().parse(o),c=new URLSearchParams(r.search).toString(),A=Mr().parse(c),y=n?Cn.isEqual:Cn.isMatch;return(0,Cn.isEqual)(e.pathname,r.pathname)&&y(A,i)}const Wa=r=>(0,_e.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 os(r){return(0,nt.useMemo)(()=>Wa(r),[r])()}const Ka=(r,e)=>(0,ns.O)(r.props.children,n=>{let o=!1;return n.getElements().forEach(({props:{to:i,dropdownItems:c}})=>{if(!o){if(c?.length){c.forEach(({to:A})=>o=o||Br(e,(0,Rn.o1)(A)));return}i&&(o=Br(e,(0,Rn.o1)(i)))}}),o},[e.pathname]);function Ks(r){return r.to===void 0}const za=(0,nt.createElement)(Na).type,Ha=(0,nt.forwardRef)(function({to:e,end:n,style:o,className:i,activeStyle:c,caseSensitive:A,activeClassName:y="active","aria-current":R="page",...N},tt){let{pathname:mt}=(0,p.zy)(),{pathname:St}=(0,p.x$)(e);A||(mt=mt.toLocaleLowerCase("en-US"),St=St.toLocaleLowerCase("en-US"));let Tt=mt===St;!Tt&&!n&&(Tt=mt.startsWith(`${St}/`));const Dt=Tt?R:void 0;return(0,a.jsx)(O.N_,{...N,to:e,ref:tt,"aria-current":Dt,style:{...o,...Tt?c:void 0},className:dn()([typeof i!="function"?i:void 0,Tt?y:void 0])})}),jr=(0,nt.forwardRef)((r,e)=>{const{icon:n,text:o,hasNotifications:i=!1,hasSubmenu:c=!1,disableHighlight:A=!1,onClick:y,noTrack:R,children:N,className:tt,...mt}=r,{sidebarConfig:St}=(0,nt.useContext)(Ce.yY),Tt=os(St),{isOpen:Dt}=Ns(),Zt=!Dt&&c?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},me=(0,a.jsxs)(rn.A,{style:Zt,children:[(0,a.jsx)(n,{fontSize:"small"}),!Dt&&c?(0,a.jsx)(Lr.A,{fontSize:"small"}):(0,a.jsx)(a.Fragment,{})]}),Be=(0,a.jsx)(ja.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!i,className:dn()({[Tt.closedItemIcon]:!Dt}),children:me}),De=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(rn.A,{"data-testid":"login-button",className:Tt.iconContainer,children:Be}),o&&(0,a.jsx)(ks.A,{variant:"subtitle2",component:"span",className:Tt.label,children:o}),(0,a.jsx)("div",{className:Tt.secondaryAction,children:N})]}),un=Dt?De:Be,Fr={onClick:y,className:dn()(tt,Tt.root,Dt?Tt.open:Tt.closed,Ks(r)&&Tt.buttonItem,{[Tt.highlightable]:!A})},Nr=(0,ir.s)(),{pathname:zs}=(0,p.x$)(!Ks(r)&&r.to?r.to:""),kr=(0,nt.useCallback)(hi=>{if(!R){const pi="click",gi=o??"Sidebar Item",fi=zs?{attributes:{to:zs}}:void 0;Nr.captureEvent(pi,gi,fi)}y?.(hi)},[Nr,o,zs,R,y]);return Ks(r)?(0,a.jsx)(u.A,{role:"button","aria-label":o,...Fr,ref:e,onClick:kr,children:un}):(0,a.jsx)(Ha,{...Fr,activeClassName:Tt.selected,to:r.to?r.to:"",ref:e,"aria-label":o||r.to,...mt,onClick:kr,children:un})}),Va=({children:r,...e})=>{const{sidebarConfig:n}=(0,nt.useContext)(Ce.yY),o=os(n),[i,c]=(0,nt.useState)(!1),A=(0,p.zy)(),y=Ka(r,A),R=(0,Pr.A)(St=>St.breakpoints.down("sm")),N=()=>{c(!0)},tt=()=>{c(!1)},mt=()=>R?i?(0,a.jsx)($a.A,{fontSize:"small",className:o.submenuArrow}):(0,a.jsx)(Ua.A,{fontSize:"small",className:o.submenuArrow}):!i&&(0,a.jsx)(Lr.A,{fontSize:"small",className:o.submenuArrow});return(0,a.jsx)(Ce.U1.Provider,{value:{isHoveredOn:i,setIsHoveredOn:c},children:(0,a.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:tt,onTouchStart:i?tt:N,onMouseEnter:N,className:dn()(i&&o.highlighted),children:[(0,a.jsx)(jr,{hasSubmenu:!0,className:y?o.selected:"",...e,children:mt()}),i&&r]})})},Ur=(0,nt.forwardRef)((r,e)=>{const[n]=(0,ns.O)(r.children,o=>o.getElements().filter(i=>i.type===za));return n?(0,a.jsx)(Va,{...r,children:n}):(0,a.jsx)(jr,{...r,ref:e})});function Li(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[n,o]=useState(""),i=os(e),c=r.icon?r.icon:SearchIcon,A=()=>{r.onSearch(n),o("")},y=mt=>{mt.key==="Enter"&&(mt.preventDefault(),A())},R=mt=>{o(mt.target.value)},N=mt=>{mt.preventDefault(),mt.stopPropagation()},tt=mt=>{A(),mt.preventDefault()};return _jsx(Box,{className:i.searchRoot,children:_jsx(Ur,{icon:c,to:r.to,onClick:tt,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:n,onClick:N,onChange:R,onKeyDown:y,className:i.searchContainer,InputProps:{disableUnderline:!0,className:i.searchField},inputProps:{className:i.searchFieldHTMLInput}})})})}const Mi=(0,rs.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),Bi=(0,rs.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),Ga=(0,rs.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Ya=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),ji=(0,rs.A)("div")(({theme:r})=>{const e=Ya(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),Ui=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=os(r),{isOpen:n,setOpen:o}=useSidebarOpenState();if(useMediaQuery(A=>A.breakpoints.down("md"),{noSsr:!0}))return null;const c=()=>{o(!n)};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:n?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},Qa=(0,_e.A)({root:{width:Ce.hC.drawerWidthClosed,height:3*Ce.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:Ce.hC.drawerWidthClosed,marginLeft:24}}),Za=()=>{const r=Qa(),{isOpen:e}=Ns();return(0,a.jsx)("div",{className:r.root,children:(0,a.jsx)(Sr.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,a.jsx)(ga,{}):(0,a.jsx)(ma,{})})})},Ja=({children:r})=>(0,a.jsxs)(Or.G,{children:[(0,a.jsxs)(Ma,{children:[(0,a.jsx)(Za,{}),(0,a.jsx)(Ga,{}),(0,a.jsx)(Ur,{icon:ha.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Xa=t(71677),_a=t(62437),qa=t(55484),ti=t(45061),ei=t(13976);const ni=(0,_e.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 si=function(r){return r.LIGHT="light",r.DARK="dark",r}(si||{});const ri=()=>{const r=(0,Tn.gf)(Zn),e=ni(),[n,o]=(0,nt.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),i={light:{icon:qa.A,title:"Dark theme"},dark:{icon:_a.A,title:"Light theme"}},{title:c,icon:A}=i[n],y=()=>{o(R=>{const N=R==="light"?"dark":"light";return r.setActiveThemeId(N),N})};return(0,a.jsx)(rn.A,{display:"flex",alignItems:"center",mr:2,children:(0,a.jsx)(Xa.Ay,{title:c,arrow:!0,children:(0,a.jsx)(Tr.A,{size:"small",onClick:y,children:(0,a.jsx)(A,{className:e.headerIcon})})})})},oi=()=>(0,a.jsxs)(b.Wj,{children:[(0,a.jsx)(ti.T,{}),(0,a.jsx)(ei.p,{withSearch:!1})]}),ai=(0,a.jsx)(oi,{}),$r=Fo({apis:ia,configLoader:ua,plugins:Object.values(s)}),ii=$r.getProvider(),ci=$r.getRouter(),li=b.Ju.provide((0,d.Hr)({name:"ThemeToggleAddon",component:ri,location:m.e.Header})),di=(0,a.jsxs)(gr,{children:[(0,a.jsx)(p.C5,{to:"/docs/default/component/local/"},"/"),(0,a.jsx)(p.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,a.jsx)(ra,{})}),(0,a.jsx)(p.qh,{path:"/docs",element:(0,a.jsx)(b.$j,{}),children:(0,a.jsx)(h.K,{})}),(0,a.jsxs)(p.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,a.jsx)(b.Wj,{}),children:[ai,(0,a.jsx)(d.po,{children:(0,a.jsx)(li,{})})]})]}),ui=()=>(0,a.jsx)(ii,{children:(0,a.jsx)(ci,{children:(0,a.jsx)(Ja,{children:di})})});x.createRoot(document.getElementById("root")).render((0,a.jsx)(ui,{}))},43836:(H,S,t)=>{"use strict";t.d(S,{qO:()=>p,tK:()=>x});var s=t(14041),a=t(63544);function x(h){return(0,a.Q)(h,()=>(0,s.createContext)(void 0))}function p(h){return(0,s.useContext)(x(h))}function b(h){return{set(d){globalThis[`__@backstage/${h}__`]=createContext(createVersionedValueMap(d))},reset(){delete globalThis[`__@backstage/${h}__`]}}}},10602:(H,S,t)=>{"use strict";t.d(S,{B:()=>s});function s(a){Object.freeze(a);const x={atVersion(p){return a[p]}};return Object.defineProperty(x,"$map",{configurable:!0,enumerable:!0,get(){return a}}),x}},63544:(H,S,t)=>{"use strict";t.d(S,{Q:()=>p});function s(){return typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")()}const a=s(),x=b=>`__@backstage/${b}__`;function p(b,h){const d=x(b);let m=a[d];return m||(m=h(),a[d]=m,m)}},7341:(H,S,t)=>{"use strict";t.d(S,{v:()=>a});var s=t(55309);const a=(0,s.y)({id:"plugin.catalog.service"})},82292:(H,S,t)=>{"use strict";t.d(S,{n:()=>a});var s=t(55309);const a=(0,s.y)({id:"plugin.catalog.entity-presentation"})},88083:(H,S,t)=>{"use strict";t.d(S,{T:()=>b});var s=t(6820),a=t(72348),x=t(46123),p=t.n(x);function b(u,v){const{kind:g,namespace:C,name:O,title:P,description:B,displayName:L,type:I}=d(u),M=(0,s.U2)({kind:g||"unknown",namespace:C||a.oQ,name:O||"unknown"}),$=m({kind:g,namespace:C,name:O,context:v}),W=[L,P,$].find(z=>z&&typeof z=="string"),X=[W!==M?M:void 0,I,B].filter(z=>z&&typeof z=="string").join(" | ");return{entityRef:M,primaryTitle:W,secondaryTitle:X||void 0,Icon:void 0}}const h=u=>!!u&&typeof u=="string";function d(u){if(typeof u=="string"){let v=u.indexOf(":");const g=u.indexOf("/");g!==-1&&g<v&&(v=-1);const C=v===-1?void 0:u.slice(0,v),O=g===-1?void 0:u.slice(v+1,g),P=u.slice(Math.max(v+1,g+1));return{kind:C,namespace:O,name:P}}if(typeof u=="object"&&u!==null){const v=[p()(u,"kind")].find(h),g=[p()(u,"metadata.namespace"),p()(u,"namespace")].find(h),C=[p()(u,"metadata.name"),p()(u,"name")].find(h),O=[p()(u,"metadata.title")].find(h),P=[p()(u,"metadata.description")].find(h),B=[p()(u,"spec.profile.displayName")].find(h),L=[p()(u,"spec.type")].find(h);return{kind:v,namespace:g,name:C,title:O,description:P,displayName:B,type:L}}return{}}function m(u){const v=u.kind?.toLocaleLowerCase("en-US")||"unknown",g=u.namespace||a.oQ,C=u.name||"unknown",O=u.context?.defaultKind?.toLocaleLowerCase("en-US"),P=u.context?.defaultNamespace?.toLocaleLowerCase("en-US");let B=C;return(P&&g.toLocaleLowerCase("en-US")!==P||g!==a.oQ)&&(B=`${g}/${B}`),O&&v.toLocaleLowerCase("en-US")!==O&&(B=`${v}:${B}`),B}},3169:(H,S,t)=>{"use strict";t.d(S,{f:()=>d});var s=t(6820),a=t(72427),x=t(14041),p=t(82292),b=t(88083);function h(m,u,v){const[g,C]=(0,x.useState)(m);return(0,x.useEffect)(()=>{C(m);const O=u?.subscribe({next:P=>{C(P)},complete:()=>{O?.unsubscribe()}});return()=>{O?.unsubscribe()}},v),g}function d(m,u){const g=(0,a.Q2)().get(p.n),C=[g,JSON.stringify(m),JSON.stringify(u||null)],O=(0,x.useMemo)(()=>{if(!g){const P=(0,b.T)(m,u);return{snapshot:P,promise:Promise.resolve(P)}}return g.forEntity(typeof m=="string"||"metadata"in m?m:(0,s.U2)(m),u)},C);return h(O.snapshot,O.update$,[O])}},18:(H,S,t)=>{"use strict";t.d(S,{a:()=>a});var s=t(55309);const a=(0,s.y)({id:"catalog-react.starred-entities"})},22995:(H,S,t)=>{"use strict";t.d(S,{Q:()=>z});var s=t(31085),a=t(10394),x=t(72501),p=t(4321),b=t(87263),h=t(16249),d=t(33145),m=t(58837),u=t(87051),v=t(12398),g=t(6924),C=t(20577),O=t(14041),P=t(45250),B=t.n(P),L=t(53373),I=t.n(L);const M=(0,m.A)(Y=>({root:{margin:Y.spacing(1,0)},label:{position:"relative",fontWeight:"bold",fontSize:Y.typography.body2.fontSize,fontFamily:Y.typography.fontFamily,color:Y.palette.text.primary,"& > span":{top:0,left:0,position:"absolute"}}}),{name:"BackstageAutocomplete"}),$=(0,u.A)(Y=>(0,v.A)({root:{},paper:{margin:0},hasClearIcon:{},hasPopupIcon:{},focused:{},inputRoot:{marginTop:24,backgroundColor:Y.palette.background.paper,"$root$hasClearIcon$hasPopupIcon &":{paddingBlock:Y.spacing(.75),paddingInlineStart:Y.spacing(.75)},"$root$focused &":{outline:"none"},"$root &:hover > fieldset":{borderColor:"#ced4da"},"$root$focused & > fieldset":{borderWidth:1,borderColor:Y.palette.primary.main}},popupIndicator:{padding:0,margin:0,color:"#616161","&:hover":{backgroundColor:"unset"},'& [class*="MuiTouchRipple-root"]':{display:"none"}},endAdornment:{"$root$hasClearIcon$hasPopupIcon &":{right:4}},input:{"$root$hasClearIcon$hasPopupIcon &":{fontSize:Y.typography.body1.fontSize,paddingBlock:Y.spacing(.8125)}}}),{name:"BackstageAutocompleteBase"})(C.Ay),W=Y=>(0,s.jsx)(b.A,{...Y,transition:!0,placement:"bottom-start",children:({TransitionProps:K})=>(0,s.jsx)(d.A,{...K,style:{transformOrigin:"0 0 0"},children:(0,s.jsx)(a.A,{children:Y.children})})}),X=Y=>(0,s.jsx)(p.A,{...Y,elevation:8});function z(Y){const{label:K,name:dt,LabelProps:G,TextFieldProps:Q,...J}=Y,ct=M(),pt=(0,O.useCallback)(At=>(0,s.jsx)(h.A,{...(0,P.merge)(At,Q),variant:"outlined"}),[Q]),yt=(0,s.jsx)($,{size:"small",...J,renderInput:J.renderInput??pt,popupIcon:(0,s.jsx)(g.A,{"data-testid":`${dt}-expand`}),PaperComponent:X,PopperComponent:W});return(0,s.jsx)(a.A,{className:ct.root,children:K?(0,s.jsxs)(x.A,{...G,className:I()(ct.label,G?.className),component:"label",children:[(0,s.jsx)(a.A,{component:"span",children:K}),yt]}):yt})}},54203:(H,S,t)=>{"use strict";t.d(S,{GI:()=>B});var s=t(31085),a=t(14041),x=t(10394),p=t(64947),b=t(73845),h=t(42899),d=t(72501),m=t(5893),u=t(54917),v=t(65859),g=t(64630),C=t(87849);const O=L=>{const I=(0,m.A)(z=>z.breakpoints.down(L.options?.drawerBreakpoint??"md"),{noSsr:!0}),M=(0,u.A)(),[$,W]=(0,a.useState)(!1),{t:X}=(0,C.i)(g.j);return I?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{style:{marginTop:M.spacing(1),marginLeft:M.spacing(1)},onClick:()=>W(!0),startIcon:(0,s.jsx)(v.A,{}),children:X("catalogFilter.buttonTitle")}),(0,s.jsx)(b.Ay,{open:$,onClose:()=>W(!1),anchor:L.options?.drawerAnchor??"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,s.jsxs)(x.A,{m:2,children:[(0,s.jsx)(d.A,{variant:"h6",component:"h2",style:{marginBottom:M.spacing(1)},children:X("catalogFilter.title")}),L.children]})})]}):(0,s.jsx)(h.A,{item:!0,lg:2,children:L.children})},P=L=>(0,s.jsx)(h.A,{item:!0,xs:12,lg:10,children:L.children}),B=L=>(0,s.jsx)(h.A,{container:!0,style:{position:"relative"},children:L.children});B.Filters=O,B.Content=P},47144:(H,S,t)=>{"use strict";t.d(S,{y:()=>X});var s=t(31085),a=t(10394),x=t(58837),p=t(14041),b=t(72427),h=t(73466),d=t(7341),m=t(69076),u=t(86901),v=t(44148),g=t(41260);const C=(0,s.jsx)(g.A,{fontSize:"small"}),O=(0,s.jsx)(v.A,{fontSize:"small"});function P({selected:z}){return(0,s.jsx)(m.A,{icon:C,checkedIcon:O,checked:z})}const B=(0,p.memo)(z=>{const{selected:Y,value:K,availableOptions:dt,showCounts:G}=z,Q=G?`${K} (${dt?.[K]})`:K;return(0,s.jsx)(u.A,{control:(0,s.jsx)(P,{selected:Y}),label:Q,onClick:J=>J.preventDefault()})});var L=t(21405),I=t(26796),M=t(22995),$=t(45250);const W=(0,x.A)({root:{},label:{textTransform:"none",fontWeight:"bold"}},{name:"CatalogReactEntityAutocompletePicker"});function X(z){const{label:Y,name:K,path:dt,showCounts:G,Filter:Q,InputProps:J,initialSelectedOptions:ct=[],filtersForAvailableValues:pt=["kind"],hidden:yt}=z,At=W(),{updateFilters:Ot,filters:It,queryParameters:{[K]:ut}}=(0,L.nK)(),lt=(0,b.gf)(d.v),xt=pt.map(at=>It[at]),{value:gt}=(0,h.A)(async()=>{const at=dt,{facets:U}=await lt.getEntityFacets({facets:[at],filter:(0,I.Rr)(xt.filter(Boolean))});return Object.fromEntries(U[at].map(({value:V,count:rt})=>[V,rt]))},[...xt]),bt=(0,p.useMemo)(()=>[ut].flat().filter(Boolean),[ut]),Rt=It[K]?.values,[it,ft]=(0,p.useState)(bt.length?bt:Rt??ct);(0,p.useEffect)(()=>{bt.length&&ft(bt)},[bt]);const vt=Object.keys(gt??{}),st=it.length&&vt.length;(0,p.useEffect)(()=>{Ot({[K]:st?new Q(it):void 0})},[K,st,it,Q,Ot]),(0,p.useEffect)(()=>{if(!st)return;const at=Rt??[];(0,$.isEqual)(at,it)||ft(at)},[Rt]);const Et=It[K];return Et&&typeof Et=="object"&&!("values"in Et)||!vt.length||yt?null:(0,s.jsx)(a.A,{className:At.root,pb:1,pt:1,children:(0,s.jsx)(M.Q,{multiple:!0,disableCloseOnSelect:!0,label:Y,name:`${String(K)}-picker`,options:vt,value:it,TextFieldProps:J,onChange:(at,U)=>ft(U),renderOption:(at,{selected:U})=>(0,s.jsx)(B,{selected:U,value:at,availableOptions:gt,showCounts:!!G})})})}},72987:(H,S,t)=>{"use strict";t.d(S,{t:()=>Rt});var s=t(31085),a=t(6820),x=t(10394),p=t(69076),b=t(86901),h=t(72501),d=t(71677),m=t(58837),u=t(44148),v=t(41260),g=t(14041),C=t(21405),O=t(92822),P=t(92367),B=t(48108),L=t(47966),I=t(90184),M=t(72427),$=t(87290),W=t(7341);function X({enabled:it}){const ft=(0,M.gf)(W.v),[vt]=(0,g.useState)(async()=>{if(!it)return[];const st="relations.ownedBy";return ft.getEntityFacets({facets:[st]}).then(Et=>Et.facets[st].map(at=>at.value).map(at=>{const{kind:U,name:V,namespace:rt}=(0,a.KU)(at);return{apiVersion:"backstage.io/v1beta1",kind:U,metadata:{name:V,namespace:rt}}}).sort((at,U)=>at.kind.localeCompare(U.kind,"en-US")||at.metadata.namespace.localeCompare(U.metadata.namespace,"en-US")||at.metadata.name.localeCompare(U.metadata.name,"en-US"))).catch(()=>[])});return(0,$.A)(async(st,Et)=>{const at=await vt;if(!at)return{items:[]};const U=Et?.limit??20,{text:V,start:rt}=z(st),Ct=at.filter(Bt=>dt(V,Bt)),ht=rt+U;return{items:Ct.slice(0,ht),...K({entities:Ct,limit:ht,payload:{text:V,start:ht}})}},[vt],{loading:!0,value:{items:[]}})}function z(it){return Y(it)&&it.cursor?JSON.parse(atob(it.cursor)):{text:it.text||"",start:0}}function Y(it){return!!it.cursor}function K({entities:it,limit:ft,payload:vt}){return it.length>ft?{cursor:btoa(JSON.stringify(vt))}:{}}function dt(it,ft){const vt=it.trim();return ft.kind.includes(vt)||ft.metadata.namespace?.includes(vt)||ft.metadata.name.includes(vt)}function G(){const it=(0,M.gf)(W.v);return(0,$.A)(async(ft,vt)=>{const st=ft,Et=ft,at=vt?.limit??20;if(Et.cursor){const V=await it.queryEntities({cursor:Et.cursor,limit:at});return{cursor:V.pageInfo.nextCursor,items:[...Et.items,...V.items]}}const U=await it.queryEntities({fullTextFilter:{term:st.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:at});return{cursor:U.pageInfo.nextCursor,items:U.items}},[],{loading:!0})}var Q=t(76842);function J({mode:it,initialSelectedOwnersRefs:ft}){const vt=it==="owners-only",st=G(),Et=X({enabled:vt}),[at,U]=vt?Et:st;return[at,U,ct({enabled:!vt,initialSelectedOwnersRefs:ft})]}function ct({enabled:it,initialSelectedOwnersRefs:ft}){const vt=(0,g.useRef)({}),st=(0,M.gf)(W.v),[,Et]=(0,$.A)(async()=>{(await st.getEntitiesByRefs({entityRefs:ft})).items.forEach(U=>{U&&(vt.current[(0,a.U2)(U)]=U)})},[]);return(0,Q.u)(()=>{it&&ft.length>0&&Et()}),{getEntity:at=>vt.current[at],setEntity:at=>{vt.current[(0,a.U2)(at)]=at}}}var pt=t(87051),yt=t(3169),At=t(64630),Ot=t(87849),It=t(22995);const ut=(0,m.A)({root:{},label:{},input:{},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}},{name:"CatalogReactEntityOwnerPicker"}),lt=(0,pt.A)(it=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(b.A),xt=(0,s.jsx)(v.A,{fontSize:"small"}),gt=(0,s.jsx)(u.A,{fontSize:"small"});function bt(it){const ft=ut(),vt=it.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:st}=(0,yt.f)(it.entity);return(0,s.jsx)(x.A,{className:ft.fullWidth,children:(0,s.jsx)(lt,{className:ft.fullWidth,control:(0,s.jsx)(p.A,{icon:xt,checkedIcon:gt,checked:it.isSelected}),onClick:Et=>Et.preventDefault(),label:(0,s.jsx)(d.Ay,{title:st,children:(0,s.jsxs)(x.A,{display:"flex",alignItems:"center",children:[vt?(0,s.jsx)(L.A,{fontSize:"small"}):(0,s.jsx)(B.A,{fontSize:"small"}),"\xA0",(0,s.jsx)(x.A,{className:ft.boxLabel,children:(0,s.jsx)(h.A,{noWrap:!0,children:st})})]})})})})}const Rt=it=>{const ft=ut(),{mode:vt="owners-only"}=it||{},{updateFilters:st,filters:Et,queryParameters:{owners:at}}=(0,C.nK)(),[U,V]=(0,g.useState)(""),{t:rt}=(0,Ot.i)(At.j),Ct=(0,g.useMemo)(()=>[at].flat().filter(Boolean),[at]),[ht,Bt]=(0,g.useState)(Ct.length?Ct:Et.owners?.values??[]),[{value:Nt,loading:Kt},Jt,kt]=J({mode:vt,initialSelectedOwnersRefs:ht});(0,P.s)(()=>Jt({text:U}),[U,Jt],250);const Vt=Nt?.items||[];return(0,g.useEffect)(()=>{if(Ct.length){const jt=new O.N9(Ct);Bt(jt.values)}},[Ct]),(0,g.useEffect)(()=>{st({owners:ht.length?new O.N9(ht):void 0})},[ht,st]),["user","group"].includes(Et.kind?.value.toLocaleLowerCase("en-US")||"")?null:(0,s.jsx)(x.A,{className:ft.root,pb:1,pt:1,children:(0,s.jsx)(It.Q,{label:rt("entityOwnerPicker.title"),multiple:!0,disableCloseOnSelect:!0,loading:Kt,options:Vt,value:ht,getOptionSelected:(jt,Gt)=>typeof Gt=="string"?(0,a.U2)(jt)===Gt:jt===Gt,getOptionLabel:jt=>{const Gt=typeof jt=="string"?kt.getEntity(jt)||(0,a.KU)(jt,{defaultKind:"group",defaultNamespace:"default"}):jt;return(0,I.Z)(Gt,(0,I.S)(Gt))},onChange:(jt,Gt)=>{V(""),Bt(Gt.map(ie=>{const ue=typeof ie=="string"?ie:(0,a.U2)(ie);return typeof ie!="string"&&kt.setEntity(ie),ue}))},filterOptions:jt=>jt,renderOption:(jt,{selected:Gt})=>(0,s.jsx)(bt,{entity:jt,isSelected:Gt}),name:"owner-picker",onInputChange:(jt,Gt)=>{V(Gt)},ListboxProps:{onScroll:jt=>{const Gt=jt.currentTarget;Math.abs(Gt.scrollHeight-Gt.clientHeight-Gt.scrollTop)<1&&Nt?.cursor&&Jt({items:Nt.items,cursor:Nt.cursor})},"data-testid":"owner-picker-listbox"},LabelProps:{className:ft.label},TextFieldProps:{className:ft.input}})})}},8859:(H,S,t)=>{"use strict";t.d(S,{z:()=>C});var s=t(31085),a=t(72072),x=t(9222),p=t(14041),b=t(29207),h=t(10394),d=t(71677),m=t(58837),u=t(3169);const v=(0,m.A)(P=>({root:{display:"inline-flex",alignItems:"center",textDecoration:"inherit"},icon:{marginRight:P.spacing(.5),color:P.palette.text.secondary,"& svg":{verticalAlign:"middle"}}}),{name:"CatalogReactEntityDisplayName"}),g=P=>{const{entityRef:B,hideIcon:L,disableTooltip:I,defaultKind:M,defaultNamespace:$}=P,W=v(),{primaryTitle:X,secondaryTitle:z,Icon:Y}=(0,u.f)(B,{defaultKind:M,defaultNamespace:$});let K=(0,s.jsx)(s.Fragment,{children:X});return K=(0,s.jsxs)(h.A,{component:"span",className:W.root,children:[Y&&!L?(0,s.jsx)(h.A,{component:"span",className:W.icon,children:(0,s.jsx)(Y,{fontSize:"inherit"})}):null,K]}),z&&!I&&(K=(0,s.jsx)(d.Ay,{enterDelay:1500,title:z,children:K})),K},C=(0,p.forwardRef)((P,B)=>{const{entityRef:L,defaultKind:I,defaultNamespace:M,title:$,children:W,hideIcon:X,disableTooltip:z,...Y}=P,K=O(P.entityRef),dt=W??$??(0,s.jsx)(g,{entityRef:L,defaultKind:I,defaultNamespace:M,hideIcon:X,disableTooltip:z});return(0,s.jsx)(a.N_,{...Y,ref:B,to:K,children:dt})});function O(P){const B=(0,x.S)(b.s),L=(0,b.$)(P,{encodeParams:!0});return B(L)}},34428:(H,S,t)=>{"use strict";t.d(S,{i:()=>b});var s=t(31085),a=t(6820),x=t(14041),p=t(8859);function b(h){const{entityRefs:d,hideIcons:m,...u}=h;return(0,s.jsx)(s.Fragment,{children:d.map((v,g)=>{const C=typeof v=="string"?v:(0,a.U2)(v);return(0,s.jsxs)(x.Fragment,{children:[g>0&&", ",(0,s.jsx)(p.z,{...u,entityRef:v,hideIcon:m})]},`${g}.${C}`)})})}},90184:(H,S,t)=>{"use strict";t.d(S,{S:()=>p,Z:()=>b});var s=t(72348),a=t(46123),x=t.n(a);function p(h,d){const m=d?.defaultKind;let u,v,g;return"metadata"in h?(u=h.kind,v=h.metadata.namespace,g=h.metadata.name):(u=h.kind,v=h.namespace,g=h.name),(v===void 0||v==="")&&(v=s.oQ),d?.defaultNamespace!==void 0?d?.defaultNamespace===v&&(v=void 0):v===s.oQ&&(v=void 0),u=u.toLocaleLowerCase("en-US"),u=m&&m.toLocaleLowerCase("en-US")===u?void 0:u,`${u?`${u}:`:""}${v?`${v}/`:""}${g}`}function b(h,d){for(const m of["spec.profile.displayName","metadata.title"]){const u=x()(h,m);if(u&&typeof u=="string")return u}return d}},91035:(H,S,t)=>{"use strict";t.d(S,{m:()=>m});var s=t(31085),a=t(58837),x=t(92822),p=t(47144),b=t(64630),h=t(87849);const d=(0,a.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),m=u=>{const v=d(),{t:g}=(0,h.i)(b.j);return(0,s.jsx)(p.y,{label:g("entityTagPicker.title"),name:"tags",path:"metadata.tags",Filter:x.q_,showCounts:u.showCounts,InputProps:{className:v.input},initialSelectedOptions:u.initialFilter?u.initialFilter:[],hidden:u.hidden})}},67626:(H,S,t)=>{"use strict";t.d(S,{y:()=>It});var s=t(31085),a=t(72427),x=t(65461),p=t(40703),b=t(58007),h=t(68804),d=t(65569),m=t(5951),u=t(26343),v=t(72501),g=t(58837),C=t(9684),O=t(31129),P=t(14041),B=t(92822),L=t(21405),I=t(16009),M=t(45250),$=t(73466),W=t(7341),X=t(26796),z=t(87290),Y=t(48899);function K(){const ut=(0,a.gf)(I.K),lt=(0,a.gf)(W.v),{filters:xt}=(0,L.nK)(),{value:gt,loading:bt}=(0,$.A)(async()=>(await ut.getBackstageIdentity()).ownershipEntityRefs,[]),{user:Rt,owners:it,...ft}=xt,{orderFields:vt,...st}=(0,X.$3)((0,M.compact)(Object.values(ft))),[{value:Et,loading:at},U]=(0,z.A)(async rt=>{const Ct=dt(rt.owners,rt.ownershipEntityRefs);if(Ct===void 0)return 0;const{["metadata.name"]:ht,...Bt}=rt.filter.filter,{totalItems:Nt}=await lt.queryEntities({...rt.filter,filter:{...Bt,"relations.ownedBy":Ct},limit:0});return Nt},[],{loading:!0});return(0,Y.A)(()=>{Object.keys(st.filter).length!==0&&gt!==void 0&&U({ownershipEntityRefs:gt,owners:it,filter:st})},[gt,it,st]),{count:Et,loading:bt||at,filter:(0,P.useMemo)(()=>B.tN.owned(gt??[]),[gt]),ownershipEntityRefs:gt}}function dt(ut,lt){if(lt===void 0)return;const xt=ut?.values??[];if(xt.length){const gt=(0,M.intersection)(xt,lt);return gt.length===0?void 0:gt}return lt}function G(){const ut=(0,a.gf)(W.v),{filters:lt}=(0,L.nK)(),xt=(0,P.useRef)(),gt=(0,P.useMemo)(()=>{const{user:it,...ft}=lt,vt=(0,M.compact)(Object.values(ft)),{orderFields:st,...Et}=(0,X.$3)(vt),at={...Et,limit:0};return Object.keys(Et.filter).length===0?(xt.current=void 0,xt.current):(0,M.isEqual)(at,xt.current)?xt.current:(xt.current=at,at)},[lt]),{value:bt,loading:Rt}=(0,$.A)(async()=>{if(gt===void 0)return 0;const{totalItems:it}=await ut.queryEntities(gt);return it},[gt]);return{count:bt,loading:Rt}}var Q=t(6820),J=t(56889);function ct(){const ut=(0,a.gf)(W.v),{filters:lt}=(0,L.nK)(),{starredEntities:xt}=(0,J.I)(),gt=(0,P.useRef)(),bt=(0,P.useMemo)(()=>{const{user:vt,...st}=lt,Et=(0,M.compact)(Object.values(st)),{orderFields:at,...U}=(0,X.$3)(Et),rt={...U,filter:{...U.filter,["metadata.name"]:Array.from(xt).map(Ct=>(0,Q.KU)(Ct).name)},limit:1e3};return(0,M.isEqual)(rt,gt.current)?gt.current:(gt.current=rt,rt)},[lt,xt]),{value:Rt,loading:it}=(0,$.A)(async()=>xt.size?(await ut.queryEntities(bt)).items.map(st=>(0,Q.U2)({kind:st.kind,namespace:st.metadata.namespace,name:st.metadata.name})).filter(st=>xt.has(st)).length:0,[bt,xt]),ft=(0,P.useMemo)(()=>B.tN.starred(Array.from(xt)),[xt]);return{count:Rt,loading:it,filter:ft}}var pt=t(87849),yt=t(64630);const At=(0,g.A)(ut=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:ut.spacing(1,0,1,0)},title:{margin:ut.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:ut.palette.text.primary},menuItem:{minHeight:ut.spacing(6)},groupWrapper:{margin:ut.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Ot(ut,lt){return[{name:lt("userListPicker.personalFilter.title"),items:[{id:"owned",label:lt("userListPicker.personalFilter.ownedLabel"),icon:C.A},{id:"starred",label:lt("userListPicker.personalFilter.starredLabel"),icon:O.Gg}]},{name:ut,items:[{id:"all",label:lt("userListPicker.orgFilterAllLabel")}]}]}const It=ut=>{const{initialFilter:lt,availableFilters:xt,hidden:gt,alwaysKeepFilters:bt}=ut,Rt=At(),it=(0,a.gf)(x.U),{t:ft}=(0,pt.i)(yt.j),vt=it.getOptionalString("organization.name")??ft("userListPicker.defaultOrgName"),{filters:st,updateFilters:Et,queryParameters:{kind:at,user:U}}=(0,L.nK)(),V=["starred","all"],rt=Ot(vt,ft).map(zt=>({...zt,items:zt.items.filter(({id:ne})=>["group","user"].some(ce=>ce===at)?V.includes(ne):!xt||xt.includes(ne))})).filter(({items:zt})=>!!zt.length),{count:Ct,loading:ht,filter:Bt}=K(),{count:Nt}=G(),{count:Kt,filter:Jt,loading:kt}=ct(),Vt=(0,P.useMemo)(()=>[U].flat()[0],[U]),[jt,Gt]=(0,P.useState)(Vt??lt),ie=(0,P.useMemo)(()=>({all:Nt,starred:Kt,owned:Ct}),[Kt,Ct,Nt]);(0,P.useEffect)(()=>{Vt&&Gt(Vt)},[Vt]);const ue=ht||kt;return(0,P.useEffect)(()=>{!ue&&jt&&jt!=="all"&&ie[jt]===0&&!bt&&Gt("all")},[ue,ie,jt,Gt,bt]),(0,P.useEffect)(()=>{if(!jt||ue)return;Et({user:jt==="owned"?Bt:jt==="starred"?Jt:B.tN.all()})},[jt,Jt,Bt,Et,ue]),gt?null:(0,s.jsx)(p.A,{className:Rt.root,children:rt.map(zt=>(0,s.jsxs)(P.Fragment,{children:[(0,s.jsx)(v.A,{variant:"subtitle2",component:"span",className:Rt.title,children:zt.name}),(0,s.jsx)(p.A,{className:Rt.groupWrapper,children:(0,s.jsx)(b.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":zt.name,children:zt.items.map((ne,ce)=>(0,s.jsxs)(u.A,{role:"none presentation",divider:ce!==zt.items.length-1,onClick:()=>Gt(ne.id),selected:ne.id===st.user?.value,className:Rt.menuItem,disabled:ie[ne.id]===0,"data-testid":`user-picker-${ne.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[ne.icon&&(0,s.jsx)(h.A,{className:Rt.listIcon,children:(0,s.jsx)(ne.icon,{fontSize:"small"})}),(0,s.jsx)(m.A,{children:(0,s.jsxs)(v.A,{variant:"body1",children:[ne.label," "]})}),(0,s.jsx)(d.A,{children:ie[ne.id]??"-"})]},ne.id))})})]},zt.name))})}},92822:(H,S,t)=>{"use strict";t.d(S,{I5:()=>u,Kf:()=>O,N9:()=>m,V3:()=>d,gM:()=>p,gZ:()=>C,mT:()=>P,qA:()=>b,q_:()=>h,tN:()=>g,z:()=>v});var s=t(6820),a=t(51372),x=t(67871);class p{value;label;constructor(I,M){this.value=I,this.label=M}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class b{value;constructor(I){this.value=I}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class h{values;constructor(I){this.values=I}filterEntity(I){return this.values.every(M=>(I.metadata.tags??[]).includes(M))}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}}class d{value;constructor(I){this.value=I}filterEntity(I){const M=this.toUpperArray(this.value.split(/\s/)),$=this.toUpperArray([I.metadata.tags]),W=this.toUpperArray([I.metadata.name,I.metadata.title,I.spec?.profile?.displayName]);for(const X of M)if($.every(z=>z!==X)&&W.every(z=>!z.includes(X)))return!1;return!0}getFullTextFilters(){return{term:this.value,fields:["metadata.name","metadata.title","spec.profile.displayName"]}}toQueryValue(){return this.value}toUpperArray(I){return I.flat().filter(M=>!!M).map(M=>M.toLocaleUpperCase("en-US"))}}class m{values;constructor(I){this.values=I.reduce((M,$)=>{try{return M.push((0,s.U2)((0,s.KU)($,{defaultKind:"Group"}))),M}catch{return M}},[])}getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(I){return this.values.some(M=>(0,x.t)(I,a.vv).some($=>(0,s.U2)($)===M))}toQueryValue(){return this.values}}class u{values;constructor(I){this.values=I}getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(I){return this.values.some(M=>I.spec?.lifecycle===M)}toQueryValue(){return this.values}}class v{values;constructor(I){this.values=I}getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(I){return this.values.some(M=>I.metadata.namespace===M)}toQueryValue(){return this.values}}class g{value;refs;constructor(I,M){this.value=I,this.refs=M}static owned(I){return new g("owned",I)}static all(){return new g("all")}static starred(I){return new g("starred",I)}getCatalogFilters(){return this.value==="owned"?{"relations.ownedBy":this.refs??[]}:this.value==="starred"?{"metadata.name":this.refs?.map(I=>(0,s.KU)(I).name)??[]}:{}}filterEntity(I){if(this.value==="starred")return this.refs?.includes((0,s.U2)(I))??!0;if(this.value==="owned"){const M=(0,x.t)(I,a.vv);return this.refs?.some($=>M.some(W=>(0,s.U2)(W)===$))??!1}return!0}toQueryValue(){return this.value}}class C{value;isOwnedEntity;isStarredEntity;constructor(I,M,$){this.value=I,this.isOwnedEntity=M,this.isStarredEntity=$}filterEntity(I){switch(this.value){case"owned":return this.isOwnedEntity(I);case"starred":return this.isStarredEntity(I);default:return!0}}toQueryValue(){return this.value}}class O{value;constructor(I){this.value=I}getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(I){const M=I.metadata.annotations?.["backstage.io/orphan"];return M!==void 0&&this.value.toString()===M}}class P{value;constructor(I){this.value=I}filterEntity(I){const M=I?.status?.items?.length>0;return M!==void 0&&this.value===M}}class B{values;constructor(I){this.values=I}getOrderFilters(){return this.values.map(([I,M])=>({field:I,order:M}))}toQueryValue(){return this.values.flat()}}},21405:(H,S,t)=>{"use strict";t.d(S,{B9:()=>B,nK:()=>L});var s=t(31085),a=t(45250),x=t.n(a),p=t(45810),b=t.n(p),h=t(14041),d=t(18690),m=t(87290),u=t(22771),v=t(71581),g=t(7341),C=t(26796),O=t(72427);const P=(0,h.createContext)(void 0),B=I=>{const M=(0,v.A)(),$=(0,O.gf)(g.v),[W,X]=(0,h.useState)({}),z=(0,d.zy)(),K=I.pagination===!0?"cursor":typeof I.pagination=="object"?I.pagination.mode??"cursor":"none",dt=typeof I.pagination=="object"?I.pagination.limit??20:20,{queryParameters:G,cursor:Q,offset:J,limit:ct}=(0,h.useMemo)(()=>{const st=b().parse(z.search,{ignoreQueryPrefix:!0});let Et=dt;if(typeof st.limit=="string"){const U=Number.parseInt(st.limit,10);isNaN(U)||(Et=U)}const at=typeof st.offset=="string"&&K==="offset"?Number.parseInt(st.offset,10):void 0;return{queryParameters:st.filters??{},cursor:typeof st.cursor=="string"&&K==="cursor"?st.cursor:void 0,offset:K==="offset"&&at&&!isNaN(at)?at:void 0,limit:Et}},[K,z.search,dt]),[pt,yt]=(0,h.useState)(Q),[At,Ot]=(0,h.useState)(J),[It,ut]=(0,h.useState)(ct),[lt,xt]=(0,h.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:{},offset:At,limit:It})),[{loading:gt,error:bt},Rt]=(0,m.A)(async()=>{const st=W.kind?.value?.toLocaleLowerCase("en-US"),Et=st==="user"||st==="group"?{...W,owners:void 0}:W,at=(0,a.compact)(Object.values(Et)),U=Object.keys(W).reduce((V,rt)=>{const Ct=W[rt];return Ct?.toQueryValue&&(V[rt]=Ct.toQueryValue()),V},{});if(K!=="none")if(pt){if(pt!==lt.appliedCursor){const V=(0,C.be)(at),rt=await $.queryEntities({cursor:pt,limit:It});xt({appliedFilters:W,appliedCursor:pt,backendEntities:rt.items,entities:rt.items.filter(V),pageInfo:rt.pageInfo,totalItems:rt.totalItems})}}else{const V=(0,C.be)(at),rt=(0,C.$3)(at),Ct=(0,C.$3)((0,a.compact)(Object.values(lt.appliedFilters)));if(K==="offset"&&(lt.limit!==It||lt.offset!==At)||!(0,a.isEqual)(Ct,rt)){const ht=await $.queryEntities({...rt,limit:It,offset:At});xt({appliedFilters:W,backendEntities:ht.items,entities:ht.items.filter(V),pageInfo:ht.pageInfo,totalItems:ht.totalItems,limit:It,offset:At})}}else{const V=(0,C.be)(at),rt=(0,C.Rr)(at),Ct=(0,C.Rr)((0,a.compact)(Object.values(lt.appliedFilters)));if((0,a.isEqual)(Ct,rt)){const ht=lt.backendEntities.filter(V);xt({appliedFilters:W,backendEntities:lt.backendEntities,entities:ht,totalItems:ht.length})}else{const ht=await $.getEntities({filter:rt}),Bt=ht.items.filter(V);xt({appliedFilters:W,backendEntities:ht.items,entities:Bt,totalItems:Bt.length})}}if(M()){const V=b().parse(z.search,{ignoreQueryPrefix:!0}),rt=b().stringify({...V,filters:U,cursor:pt,offset:At,limit:It},{addQueryPrefix:!0,arrayFormat:"repeat"}),Ct=`${window.location.pathname}${rt}`;window.history?.replaceState(null,document.title,Ct)}},[$,G,W,lt,pt,K,It,At],{loading:!0});(0,u.A)(Rt,10,[W,pt,It,At]);const it=(0,h.useCallback)(st=>{K==="cursor"?yt(void 0):K==="offset"&&Ot(0),X(Et=>{const at=typeof st=="function"?st(Et):st;return{...Et,...at}})},[K]),ft=(0,h.useMemo)(()=>{if(K!=="cursor")return;const st=lt.pageInfo?.prevCursor,Et=lt.pageInfo?.nextCursor;return{prev:st?()=>yt(st):void 0,next:Et?()=>yt(Et):void 0}},[K,lt.pageInfo]),vt=(0,h.useMemo)(()=>({filters:lt.appliedFilters,entities:lt.entities,backendEntities:lt.backendEntities,updateFilters:it,queryParameters:G,loading:gt,error:bt,pageInfo:ft,totalItems:lt.totalItems,limit:It,offset:At,setLimit:ut,setOffset:Ot,paginationMode:K}),[lt,it,G,gt,bt,ft,It,At,K,ut,Ot]);return(0,s.jsx)(P.Provider,{value:vt,children:I.children})};function L(){const I=(0,h.useContext)(P);if(!I)throw new Error("useEntityList must be used within EntityListProvider");return I}},56889:(H,S,t)=>{"use strict";t.d(S,{I:()=>d});var s=t(6820),a=t(72427),x=t(14041),p=t(1394),b=t(18);function h(m){return typeof m=="string"?m:(0,s.U2)(m)}function d(){const m=(0,a.gf)(b.a),u=(0,p.A)((0,x.useMemo)(()=>m.starredEntitie$(),[m]),new Set),v=(0,x.useCallback)(C=>u.has(h(C)),[u]),g=(0,x.useCallback)(C=>m.toggleStarred(h(C)).then(),[m]);return{starredEntities:u,toggleStarredEntity:g,isStarredEntity:v}}},29207:(H,S,t)=>{"use strict";t.d(S,{$:()=>h,s:()=>b});var s=t(6820),a=t(72348),x=t(34569),p=t(63544);const b=(0,p.Q)("catalog:entity-route-ref",()=>(0,x.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function h(d,m){let u,v,g;if(typeof d=="string"){const O=(0,s.KU)(d);u=O.kind,v=O.namespace,g=O.name}else"metadata"in d?(u=d.kind,v=d.metadata.namespace,g=d.metadata.name):(u=d.kind,v=d.namespace,g=d.name);u=u.toLocaleLowerCase("en-US"),v=v?.toLocaleLowerCase("en-US")??a.oQ;const{encodeParams:C=!1}=m||{};return C&&(u=encodeURIComponent(u),v=encodeURIComponent(v),g=encodeURIComponent(g)),{kind:u,namespace:v,name:g}}},64630:(H,S,t)=>{"use strict";t.d(S,{j:()=>a});var s=t(93184);const a=(0,s.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,S,t)=>{"use strict";t.d(S,{$3:()=>p,Rr:()=>b,be:()=>h});var s=t(92822);function a(d){return!!d.getFullTextFilters}function x(d){return!!d.getOrderFilters}function p(d){const m=d.reduce((g,C)=>({...g,...C.getCatalogFilters?C.getCatalogFilters():{}}),{}),u=d.find(a)?.getFullTextFilters(),v=d.find(x)?.getOrderFilters()||[{field:"metadata.name",order:"asc"}];return{filter:m,fullTextFilter:u,orderFields:v}}function b(d){const m={};return d.forEach(u=>{u instanceof s.q_||u instanceof s.N9||u instanceof s.I5||u instanceof s.z||u instanceof s.tN||u instanceof s.Kf||u instanceof s.V3||u instanceof s.gZ||Object.assign(m,u.getCatalogFilters?.()||{})}),m}function h(d){return m=>d.every(u=>!u.filterEntity||u.filterEntity(m))}},67871:(H,S,t)=>{"use strict";t.d(S,{t:()=>a});var s=t(6820);function a(x,p,b){let h=x?.relations?.filter(d=>d.type===p).map(d=>(0,s.KU)(d.targetRef))||[];return b?.kind&&(h=h.filter(d=>d.kind.toLocaleLowerCase("en-US")===b.kind.toLocaleLowerCase("en-US"))),h}},95203:(H,S,t)=>{"use strict";t.d(S,{qP:()=>h,Zg:()=>m,rQ:()=>v,pS:()=>u,UJ:()=>d});var s=t(59598);class a{id;params;optional;defaultTarget;[p=s.b];constructor(C,O,P,B){this.id=C,this.params=O,this.optional=P,this.defaultTarget=B,this[p]="external"}toString(){return`routeRef{type=external,id=${this.id}}`}getDefaultTarget(){return this.defaultTarget}}function x(g){return new a(g.id,g.params??[],!!g.optional,g?.defaultTarget)}var p,b=t(34569);const h=x({id:"create-component",optional:!0,defaultTarget:"scaffolder.createComponent"}),d=x({id:"view-techdoc",optional:!0,params:["namespace","kind","name"],defaultTarget:"techdocs.docRoot"}),m=x({id:"create-from-template",optional:!0,params:["namespace","templateName"],defaultTarget:"scaffolder.selectedTemplate"}),u=x({id:"catalog:unregister-redirect",optional:!0}),v=(0,b.H)({id:"catalog"})},13646:(H,S,t)=>{"use strict";t.d(S,{OL:()=>a});function s(m,u){return m.name===u.name}function a(m,u){return"resourceType"in m?!u||m.resourceType===u:!1}function x(m){return m.attributes.action==="create"}function p(m){return m.attributes.action==="read"}function b(m){return m.attributes.action==="update"}function h(m){return m.attributes.action==="delete"}function d(m){return{authorize:async(u,v)=>await m.authorize(u,v),authorizeConditional(u,v){const g=u;return m.authorize(g,v)}}}},54241:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});var s=function(a){return a.DENY="DENY",a.ALLOW="ALLOW",a.CONDITIONAL="CONDITIONAL",a}({})},96824:(H,S,t)=>{"use strict";t.d(S,{x:()=>a});var s=t(55309);const a=(0,s.y)({id:"plugin.permission.api"})},70734:(H,S,t)=>{"use strict";t.d(S,{e:()=>b});var s=t(31085),a=t(14041),x=t(58837);const p=(0,x.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),b=h=>{const{text:d,preTag:m,postTag:u}=h,v=p(),g=(0,a.useMemo)(()=>d.split(new RegExp(`(${m}.+?${u})`)),[u,m,d]);return(0,s.jsx)(s.Fragment,{children:g.map((C,O)=>C.includes(m)?(0,s.jsx)("mark",{className:v.highlight,children:C.replace(new RegExp(`${m}|${u}`,"g"),"")},O):C)})}},54560:(H,S,t)=>{"use strict";t.d(S,{ec:()=>u});var s=t(31085),a=t(14041),x=t(93368),p=t(88758),b=t(8109);const h="search.results.list.items.extensions.v1",d=(C,O)=>{for(const P of C)if(!(!isValidElement(P)||!getComponentData(P,h)?.(O)))return cloneElement(P,{rank:O.rank,highlight:O.highlight,result:O.document,...P.props});return null},m=C=>{const{rank:O,result:P,noTrack:B,children:L,alignItems:I="flex-start",...M}=C,$=(0,x.s)(),W=(0,a.useCallback)(()=>{B||P&&$.captureEvent("discover",P.title,{attributes:{to:P.location},value:O})},[O,P,B,$]);return(0,s.jsx)(b.A,{divider:!0,alignItems:I,onClickCapture:W,...M,children:L})},u=C=>{const{name:O,component:P,predicate:B=()=>!0}=C;return(0,p.zZ)({name:O,component:{lazy:()=>P().then(L=>I=>(0,s.jsx)(m,{rank:I.rank,result:I.result,noTrack:I.noTrack,children:(0,a.createElement)(L,I)}))},data:{[h]:B}})},v=C=>{const O=useElementFilter(C,P=>P.selectByComponentData({key:h}).getElements(),[C]);return useCallback((P,B)=>{const L=d(O,P);return _jsx(Fragment,{children:L??_jsx(m,{rank:P.rank,result:P.document,children:_jsx(DefaultResultListItem,{rank:P.rank,highlight:P.highlight,result:P.document})})},B)},[O])},g=C=>{const{results:O,children:P,...B}=C,L=v(P);return _jsx(List,{...B,children:O.map(L)})}},86202:(H,S,t)=>{"use strict";t.d(S,{As:()=>s,GO:()=>a,qH:()=>x});const s="backstage.io/techdocs-ref",a="backstage.io/techdocs-entity",x="backstage.io/techdocs-entity-path"},72020:(H,S,t)=>{"use strict";t.d(S,{AF:()=>m,Hr:()=>g,Wm:()=>d,YR:()=>B,po:()=>u});var s=t(31085),a=t(14041),x=t(18690),p=t(19402),b=t(88758),h=t(82442);const d="techdocs.addons.addon.v1",m="techdocs.addons.wrapper.v1",u=()=>null;(0,p.h)(u,m,!0);const v=L=>`${d}.${L.toLocaleLowerCase("en-US")}`;function g(L){const{name:I,component:M}=L;return(0,b.zZ)({name:I,component:{sync:$=>(0,s.jsx)(M,{...$})},data:{[d]:L,[v(I)]:!0}})}const C=(L,I)=>L.selectByComponentData({key:I}).getElements()[0],O=L=>L.selectByComponentData({key:m}).selectByComponentData({key:d}),P=L=>L.selectByComponentData({key:m}).findComponentData({key:d}),B=()=>{const L=(0,x.P1)(),I=(0,h.O)(L,O),M=(0,h.O)(L,P),$=(0,a.useCallback)(z=>{if(!I||!z)return null;const Y=v(z.name);return C(I,Y)??null},[I]),W=(0,a.useCallback)(z=>{const Y=M.find(K=>K.name===z);return Y?$(Y):null},[M,$]),X=(0,a.useCallback)(z=>{const Y=M.filter(K=>K.location===z);return Y.length?Y.map($):null},[M,$]);return{renderComponentByName:W,renderComponentsByLocation:X}}},26679:(H,S,t)=>{"use strict";t.d(S,{l:()=>a,s:()=>x});var s=t(55309);const a=(0,s.y)({id:"plugin.techdocs.service"}),x=(0,s.y)({id:"plugin.techdocs.storageservice"})},88572:(H,S,t)=>{"use strict";t.d(S,{R:()=>L,V:()=>I});var s=t(31085),a=t(14041),x=t(73466),p=t(28966),b=t(6820),h=t(43836),d=t(10602),m=t(72427),u=t(65461),v=t(25862),g=t(26679),C=t(65614);const O=(M,$)=>(0,b.U2)(M)===(0,b.U2)($),P={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},B=(0,h.tK)("techdocs-reader-page-context"),L=(0,a.memo)(M=>{const{entityRef:$,children:W}=M,X=(0,m.gf)(g.l),z=(0,m.gf)(u.U),Y=(0,x.A)(async()=>X.getEntityMetadata($),[$]),K=(0,p.A)(async()=>X.getTechDocsMetadata($),[$]),[dt,G]=(0,a.useState)(P.title),[Q,J]=(0,a.useState)(P.subtitle),[ct,pt]=(0,a.useState)(P.shadowRoot);(0,a.useEffect)(()=>{ct&&!K.value&&!K.loading&&K.retry()},[K.value,K.loading,ct,K.retry,K]);const yt={metadata:K,entityRef:(0,C.Lf)($,z),entityMetadata:Y,shadowRoot:ct,setShadowRoot:pt,title:dt,setTitle:G,subtitle:Q,setSubtitle:J},At=(0,d.B)({1:yt});return(0,s.jsx)(v.Ig,{attributes:{entityRef:(0,b.U2)($)},children:(0,s.jsx)(B.Provider,{value:At,children:W instanceof Function?W(yt):W})})},(M,$)=>O(M.entityRef,$.entityRef)),I=()=>{const M=(0,a.useContext)(B);if(M===void 0)return P;const $=M.atVersion(1);if($===void 0)throw new Error("No context found for version 1.");return $}},65614:(H,S,t)=>{"use strict";t.d(S,{Lf:()=>x,b1:()=>b,oN:()=>p});var s=t(6820),a=t(86202);function x(h,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(h.kind=h.kind.toLocaleLowerCase(),h.name=h.name.toLocaleLowerCase(),h.namespace=h.namespace.toLocaleLowerCase()),h}function p(h){let d=h.metadata.annotations?.[a.qH];return d?(d.startsWith("/")||(d=`/${d}`),d):""}const b=(h,d)=>{if(!d)return;let{namespace:m,kind:u,name:v}=(0,s.sM)(h);if(h.metadata.annotations?.[a.GO])try{const O=(0,s.KU)(h.metadata.annotations?.[a.GO]);m=O.namespace,u=O.kind,v=O.name}catch{}const g=d({namespace:m,kind:u,name:v}),C=p(h);return`${g}${C}`}},99730:(H,S,t)=>{"use strict";t.d(S,{e:()=>s});const s=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},95768:(H,S,t)=>{"use strict";t.d(S,{V:()=>s});function s(a,x){return x.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?a:a.toLocaleLowerCase("en-US")}},8915:(H,S,t)=>{"use strict";t.d(S,{K:()=>It});var s=t(31085),a=t(59428),x=t(27586),p=t(26280),b=t(21405),h=t(54203),d=t(67626),m=t(72987),u=t(91035),v=t(81859),g=t(14041),C=t(86519),O=t(86202);class P{getCatalogFilters(){return{[`metadata.annotations.${O.As}`]:C.c}}}const B=()=>{const{updateFilters:ut}=(0,b.nK)();return(0,g.useEffect)(()=>{ut({techdocs:new P})},[ut]),null};var L=t(36338),I=t(45250),M=t(88640),$=t(77310),W=t(9222),X=t(72427),z=t(65461),Y=t(56889),K=t(27125),dt=t(14209),G=t(92822);function Q(ut){const{actions:lt,columns:xt,data:gt,isLoading:bt,options:Rt}=ut,{updateFilters:it,setLimit:ft,setOffset:vt,limit:st,totalItems:Et,offset:at}=(0,b.nK)(),[U,V]=(0,g.useState)(at&&st?Math.floor(at/st):0);return(0,g.useEffect)(()=>{Et&&U*st>=Et?vt(Math.max(0,Et-st)):vt(Math.max(0,U*st))},[vt,U,st,Et]),(0,s.jsx)(dt.X,{columns:xt,data:gt,options:{paginationPosition:"both",pageSizeOptions:[5,10,20,50,100],pageSize:st,emptyRowsWhenPaging:!1,actionsColumnIndex:-1,...Rt},actions:lt,onSearchChange:rt=>it({text:rt?new G.V3(rt):void 0}),page:U,onPageChange:rt=>{V(rt)},onRowsPerPageChange:rt=>{ft(rt)},totalCount:Et,localization:{pagination:{labelDisplayedRows:""}},isLoading:bt})}function J(ut){const{actions:lt,columns:xt,data:gt,next:bt,prev:Rt,title:it,isLoading:ft,options:vt,...st}=ut;return(0,s.jsx)(dt.X,{title:ft?"":it,columns:xt,data:gt,options:{paginationPosition:"both",...vt,pageSizeOptions:[],showFirstLastPageButtons:!1,pageSize:Number.MAX_SAFE_INTEGER,emptyRowsWhenPaging:!1,actionsColumnIndex:-1},onPageChange:Et=>{Et>0?bt?.():Rt?.()},page:Rt?1:0,totalCount:bt?Number.MAX_VALUE:Number.MAX_SAFE_INTEGER,localization:{pagination:{labelDisplayedRows:""}},isLoading:ft,...st})}var ct=t(84295),pt=t(42717),yt=t(82779),At=t(23747);const Ot=ut=>{const{columns:lt,actions:xt,options:gt}=ut,{loading:bt,error:Rt,entities:it,filters:ft,paginationMode:vt,pageInfo:st}=(0,b.nK)(),{isStarredEntity:Et,toggleStarredEntity:at}=(0,Y.I)(),[,U]=(0,L.A)(),V=(0,W.S)(yt.Oc),rt=(0,X.gf)(z.U),Ct=(0,I.capitalize)(ft.user?.value??"all"),ht=[ct.f.createCopyDocsUrlAction(U),ct.f.createStarEntityAction(Et,at)],Bt=(0,At.H)(it,V,rt);return vt==="cursor"?(0,s.jsx)(J,{columns:lt||pt.F,isLoading:bt,title:Ct,actions:xt||ht,options:gt,data:Bt,next:st?.next,prev:st?.prev}):vt==="offset"?(0,s.jsx)(Q,{columns:lt||pt.F,isLoading:bt,title:Ct,actions:xt||ht,options:gt,data:Bt}):Rt?(0,s.jsx)(M.B,{severity:"error",title:"Could not load available documentation.",children:(0,s.jsx)($.z,{language:"text",text:Rt.toString()})}):(0,s.jsx)(K.o,{title:Ct,entities:it,loading:bt,actions:xt||ht,columns:lt,options:gt})};Ot.columns=pt.B,Ot.actions=ct.f;const It=ut=>{const{initialFilter:lt="owned",columns:xt,actions:gt,ownerPickerMode:bt,pagination:Rt,options:it,PageWrapper:ft,CustomHeader:vt}=ut,st=ft||v.S,Et=vt||(()=>(0,s.jsx)(a.d,{title:"",children:(0,s.jsx)(x.Y,{children:"Discover documentation in your ecosystem."})}));return(0,s.jsx)(st,{children:(0,s.jsxs)(p.U,{children:[(0,s.jsx)(Et,{}),(0,s.jsx)(b.B9,{pagination:Rt,children:(0,s.jsxs)(h.GI,{children:[(0,s.jsxs)(h.GI.Filters,{children:[(0,s.jsx)(B,{}),(0,s.jsx)(d.y,{initialFilter:lt}),(0,s.jsx)(m.t,{mode:bt}),(0,s.jsx)(u.m,{})]}),(0,s.jsx)(h.GI.Content,{children:(0,s.jsx)(Ot,{actions:gt,columns:xt,options:it})})]})})]})})}},27125:(H,S,t)=>{"use strict";t.d(S,{o:()=>O});var s=t(31085),a=t(36338),x=t(9222),p=t(72427),b=t(65461),h=t(82779),d=t(14209),m=t(44186),u=t(73896),v=t(84295),g=t(42717),C=t(23747);const O=P=>{const{entities:B,title:L,loading:I,columns:M,actions:$,options:W}=P,[,X]=(0,a.A)(),z=(0,x.S)(h.Oc),Y=(0,p.gf)(b.U);if(!B)return null;const K=(0,C.H)(B,z,Y),dt=[v.f.createCopyDocsUrlAction(X)],G=20,Q=K&&K.length>G;return(0,s.jsx)(s.Fragment,{children:I||K&&K.length>0?(0,s.jsx)(d.X,{isLoading:I,options:{paging:Q,pageSize:G,search:!0,actionsColumnIndex:-1,...W},data:K,columns:M||g.F,actions:$||dt,title:L?`${L} (${K.length})`:`All (${K.length})`}):(0,s.jsx)(m.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,s.jsx)(u.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};O.columns=g.B,O.actions=v.f},84295:(H,S,t)=>{"use strict";t.d(S,{f:()=>p});var s=t(31085),a=t(55290),x=t(18956);const p={createCopyDocsUrlAction(b){return h=>({icon:()=>(0,s.jsx)(a.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>b(`${window.location.origin}${h.resolved.docsUrl}`)})},createStarEntityAction(b,h){return d=>{const m=d.entity,u=b(m);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,s.jsx)(x.m,{isFavorite:u}),tooltip:u?"Remove from favorites":"Add to favorites",onClick:()=>h(m)}}}}},42717:(H,S,t)=>{"use strict";t.d(S,{B:()=>u,F:()=>v});var s=t(31085),a=t(10394),x=t(58837);const p=(0,x.A)(g=>({value:{marginBottom:g.spacing(.75)},subvalue:{color:g.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function b(g){const{value:C,subvalue:O}=g,P=p();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.A,{className:P.value,children:C}),(0,s.jsx)(a.A,{className:P.subvalue,children:O})]})}var h=t(72072),d=t(34428);function m(g){return g.metadata.title||g.metadata.name}const u={createTitleColumn(g){return{...u.createNameColumn(),field:"entity.metadata.title",hidden:g?.hidden}},createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,searchable:!0,defaultSort:"asc",customSort:(g,C)=>{const O=m(g.entity).toLocaleLowerCase(),P=m(C.entity).toLocaleLowerCase();return O.localeCompare(P)},render:g=>(0,s.jsx)(b,{value:(0,s.jsx)(h.N_,{to:g.resolved.docsUrl,children:m(g.entity)}),subvalue:g.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:g})=>(0,s.jsx)(d.i,{entityRefs:g.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}},v=[u.createTitleColumn({hidden:!0}),u.createNameColumn(),u.createOwnerColumn(),u.createKindColumn(),u.createTypeColumn()]},23747:(H,S,t)=>{"use strict";t.d(S,{H:()=>b});var s=t(51372),a=t(67871),x=t(90184),p=t(95768);function b(h,d,m){return h.map(u=>{const v=(0,a.t)(u,s.vv);return{entity:u,resolved:{docsUrl:d({namespace:(0,p.V)(u.metadata.namespace??"default",m),kind:(0,p.V)(u.kind,m),name:(0,p.V)(u.metadata.name,m)}),ownedByRelations:v,ownedByRelationsTitle:v.map(g=>(0,x.S)(g,{defaultKind:"group"})).join(", ")}}})}},81859:(H,S,t)=>{"use strict";t.d(S,{S:()=>b});var s=t(31085),a=t(27155),x=t(72427),p=t(65461);const b=h=>{const{children:d,CustomPageWrapper:m}=h,v=`Documentation available in ${(0,x.gf)(p.U).getOptionalString("organization.name")??"Backstage"}`;return(0,s.jsx)(s.Fragment,{children:m?(0,s.jsx)(m,{children:d}):(0,s.jsx)(a.d,{title:"Documentation",subtitle:v,themeId:"documentation",children:d})})}},39278:(H,S,t)=>{"use strict";t.d(S,{$j:()=>$,Wj:()=>W,Ju:()=>B});var s=t(26679),a=t(70835),x=t(97142),p=t(92110);class b{configApi;discoveryApi;fetchApi;constructor(Y){this.configApi=Y.configApi,this.discoveryApi=Y.discoveryApi,this.fetchApi=Y.fetchApi}async getCookie(){const K=`${await this.getApiOrigin()}/cookie`,dt=await this.fetchApi.fetch(`${K}`,{credentials:"include"});if(!dt.ok)throw await a.o.fromResponse(dt);return await dt.json()}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(Y){const{kind:K,namespace:dt,name:G}=Y,J=`${await this.getApiOrigin()}/metadata/techdocs/${dt}/${K}/${G}`,ct=await this.fetchApi.fetch(`${J}`);if(!ct.ok)throw await a.o.fromResponse(ct);return await ct.json()}async getEntityMetadata(Y){const{kind:K,namespace:dt,name:G}=Y,J=`${await this.getApiOrigin()}/metadata/entity/${dt}/${K}/${G}`,ct=await this.fetchApi.fetch(`${J}`);if(!ct.ok)throw await a.o.fromResponse(ct);return await ct.json()}}class h{configApi;discoveryApi;fetchApi;constructor(Y){this.configApi=Y.configApi,this.discoveryApi=Y.discoveryApi,this.fetchApi=Y.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(Y,K){const{kind:dt,namespace:G,name:Q}=Y,ct=`${await this.getStorageUrl()}/${G}/${dt}/${Q}/${K}`,pt=await this.fetchApi.fetch(`${ct.endsWith("/")?ct:`${ct}/`}index.html`);let yt="";switch(pt.status){case 404:throw yt="Page not found. ",K||(yt+="This could be because there is no index.md file in the root of the docs directory of this repository."),new x.m_(yt);case 500:throw yt="Could not generate documentation or an error in the TechDocs backend. ",new Error(yt);default:break}return pt.text()}async syncEntityDocs(Y,K=()=>{}){const{kind:dt,namespace:G,name:Q}=Y,ct=`${await this.getApiOrigin()}/sync/${G}/${dt}/${Q}`;return new Promise((pt,yt)=>{const At=new AbortController;(0,p.y)(ct,{fetch:this.fetchApi.fetch,signal:At.signal,onmessage(Ot){if(Ot.event==="log")Ot.data&&K(JSON.parse(Ot.data));else if(Ot.event==="finish"){let It=!1;Ot.data&&({updated:It}=JSON.parse(Ot.data)),pt(It?"updated":"cached")}else Ot.event==="error"&&yt(new Error(Ot.data))},onerror(Ot){throw At.abort(),yt(Ot),Ot}})})}async getBaseUrl(Y,K,dt){const{kind:G,namespace:Q,name:J}=K,pt=`${await this.getApiOrigin()}/static/docs/${Q}/${G}/${J}/${dt}`;return new URL(Y,pt.endsWith("/")?pt:`${pt}/`).toString()}}var d=t(82779),m=t(9803),u=t(12935),v=t(65461),g=t(57405),C=t(70795),O=t(88758),P=t(54560);const B=(0,m.i)({id:"techdocs",apis:[(0,u.b)({api:s.s,deps:{configApi:v.U,discoveryApi:g.I,fetchApi:C.a},factory:({configApi:z,discoveryApi:Y,fetchApi:K})=>new h({configApi:z,discoveryApi:Y,fetchApi:K})}),(0,u.b)({api:s.l,deps:{configApi:v.U,discoveryApi:g.I,fetchApi:C.a},factory:({configApi:z,discoveryApi:Y,fetchApi:K})=>new b({configApi:z,discoveryApi:Y,fetchApi:K})})],routes:{root:d.rQ,docRoot:d.Oc,entityContent:d.Ri}}),L=B.provide((0,O.QJ)({name:"TechdocsPage",component:()=>t.e(8803).then(t.bind(t,38803)).then(z=>z.Router),mountPoint:d.rQ})),I=B.provide((0,O.QJ)({name:"EntityTechdocsContent",component:()=>t.e(8803).then(t.bind(t,38803)).then(z=>z.LegacyEmbeddedDocsRouter),mountPoint:d.Ri})),M=B.provide((0,O.QJ)({name:"TechDocsCustomHome",component:()=>t.e(5470).then(t.bind(t,25470)).then(z=>z.TechDocsCustomHome),mountPoint:d.rQ})),$=B.provide((0,O.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(z=>z.TechDocsIndexPage),mountPoint:d.rQ})),W=B.provide((0,O.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(z=>z.TechDocsReaderPage),mountPoint:d.Oc})),X=B.provide((0,P.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(z=>z.TechDocsSearchResultListItem),predicate:z=>z.type==="techdocs"}))},13976:(H,S,t)=>{"use strict";t.d(S,{p:()=>Pn});var s=t(31085),a=t(14041),x=t(42899),p=t(58837),b=t(88572),h=t(9394),d=t(91360),m=t(22856);const u="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",v=f=>{(0,a.useEffect)(()=>{if(!f)return()=>{};const D=f.querySelectorAll('head > link[rel="stylesheet"]');let j=D?.length??0;const F=new CustomEvent(u);if(!j)return f.dispatchEvent(F),()=>{};const k=()=>{--j===0&&f.dispatchEvent(F)};return D?.forEach(q=>{q.addEventListener("load",k)}),()=>{D?.forEach(q=>{q.removeEventListener("load",k)})}},[f])},g=f=>{const[D,j]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!f)return()=>{};j(!0);const F=f.style;F.setProperty("opacity","0");const k=()=>{j(!1),F.setProperty("opacity","1")};return f.addEventListener(u,k),()=>{f.removeEventListener(u,k)}},[f]),D},C=f=>{const{element:D,onAppend:j,children:F}=f,[k,q]=(0,a.useState)((0,h.vt)({...(0,m.A)(),insertionPoint:void 0}));v(D);const et=(0,a.useCallback)(Pt=>{if(!D||!Pt)return;q((0,h.vt)({...(0,m.A)(),insertionPoint:D.querySelector("head")||void 0}));let wt=Pt.shadowRoot;wt||(wt=Pt.attachShadow({mode:"open"})),wt.replaceChildren(D),typeof j=="function"&&j(wt)},[D,j]);return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(d.Ay,{jss:k,sheetsManager:new Map,children:[(0,s.jsx)("div",{ref:et,"data-testid":"techdocs-native-shadowroot"}),F]})})};var O=t(12784);const P=()=>{const{shadowRoot:f}=(0,b.V)();return f},B=f=>{const D=P(),[j,F]=(0,a.useState)(D?.firstChild);return(0,a.useEffect)(()=>{let k;return D&&(k=new MutationObserver(()=>{F(D?.firstChild)}),k.observe(D,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),()=>k?.disconnect()},[D]),!j||!(j instanceof HTMLElement)?[]:f.map(k=>j.querySelectorAll(k)).filter(k=>k.length).map(k=>Array.from(k)).flat()},L=f=>f.toString()&&f.rangeCount&&f.getRangeAt(0).getBoundingClientRect().top,I=(f=0)=>{const D=P(),[j,F]=useState(null),k=useMemo(()=>debounce(()=>{const q=D,et=q.getSelection?q.getSelection():document.getSelection();et&&L(et)?F(et):F(null)},f),[D,F,f]);return useEffect(()=>(window.document.addEventListener("selectionchange",k),()=>{k.cancel(),window.document.removeEventListener("selectionchange",k)}),[k]),j};var M=t(26280),$=t(68146),W=t(45250),X=t(73466),z=t(5877),Y=t(43836),K=t(10602),dt=t(72427),G=t(93368),Q=t(25862),J=t(65461),ct=t(55309);const pt=(0,ct.y)({id:"plugin.search.queryservice"});class yt{mockedResults;constructor(D){this.mockedResults=D}query(){return Promise.resolve(this.mockedResults||{results:[]})}}const At=(0,Y.tK)("search-context"),Ot=()=>{const f=(0,a.useContext)(At);if(!f)throw new Error("useSearch must be used within a SearchContextProvider");const D=f.atVersion(1);if(!D)throw new Error("No SearchContext v1 found");return D},It=()=>(0,a.useContext)(At)!==void 0,ut={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},lt=(f=ut)=>{const D=(0,dt.gf)(pt),j=(0,G.s)(),[F,k]=(0,a.useState)(f.term),[q,et]=(0,a.useState)(f.types),[Pt,wt]=(0,a.useState)(f.filters),[Ut,Lt]=(0,a.useState)(f.pageLimit),[Ft,Xt]=(0,a.useState)(f.pageCursor),ge=(0,z.A)(F),de=(0,z.A)(Pt),nt=(0,X.A)(async()=>{const ve=await D.query({term:F,types:q,filters:Pt,pageLimit:Ut,pageCursor:Ft});return F&&j.captureEvent("search",F,{value:ve.numberOfResults}),ve},[F,q,Pt,Ut,Ft]),Se=!nt.loading&&!nt.error&&nt.value?.nextPageCursor,ye=!nt.loading&&!nt.error&&nt.value?.previousPageCursor,Ht=(0,a.useCallback)(()=>{Xt(nt.value?.nextPageCursor)},[nt.value?.nextPageCursor]),Qt=(0,a.useCallback)(()=>{Xt(nt.value?.previousPageCursor)},[nt.value?.previousPageCursor]);return(0,a.useEffect)(()=>{ge!==void 0&&F!==ge&&Xt(void 0)},[F,ge,Xt]),(0,a.useEffect)(()=>{de!==void 0&&!(0,W.isEqual)(Pt,de)&&Xt(void 0)},[Pt,de,Xt]),{result:nt,term:F,setTerm:k,types:q,setTypes:et,filters:Pt,setFilters:wt,pageLimit:Ut,setPageLimit:Lt,pageCursor:Ft,setPageCursor:Xt,fetchNextPage:Se?Ht:void 0,fetchPreviousPage:ye?Qt:void 0}},xt=f=>{const{initialState:D,children:j}=f,F=lt(D);return(0,s.jsx)(Q.Ig,{attributes:{searchTypes:F.types.sort().join(",")},children:(0,s.jsx)(At.Provider,{value:(0,K.B)({1:F}),children:j})})},gt=f=>{const{initialState:D,inheritParentContextIfAvailable:j,children:F}=f,k=It(),q=(0,dt.gf)(J.U),et=D??{},Pt=q.has("search.query.pageLimit")?{pageLimit:q.getNumber("search.query.pageLimit")}:{},wt={...ut,...et,...Pt};return k&&j?(0,s.jsx)(s.Fragment,{children:F}):(0,s.jsx)(xt,{initialState:wt,children:F})};var bt=t(78467),Rt=t(20577),it=t(82266),ft=t(29365),vt=t(34839),st=t(16249),Et=t(64947),at=t(45917),U=t(22771),V=t(87849),rt=t(93184);const Ct=(0,rt.h)({id:"search-react",messages:{searchBar:{title:"Search",placeholder:"Search in {{org}}"},searchFilter:{allOptionTitle:"All"},searchPagination:{limitLabel:"Results per page:",limitText:"of {{num}}"},noResultsDescription:"Sorry, no results were found",searchResultGroup:{linkTitle:"See All",addFilterButtonTitle:"Add filter"},searchResultPager:{previous:"Previous",next:"Next"}}}),ht=(0,a.forwardRef)((f,D)=>{const{onChange:j,onKeyDown:F=()=>{},onClear:k=()=>{},onSubmit:q=()=>{},debounceTime:et=200,clearButton:Pt=!0,fullWidth:wt=!0,value:Ut,label:Lt,placeholder:Ft,inputProps:Xt={},InputProps:ge={},endAdornment:de,...nt}=f,Se=(0,dt.gf)(J.U),[ye,Ht]=(0,a.useState)(""),Qt=(0,a.useRef)(""),{t:fe}=(0,V.i)(Ct);(0,a.useEffect)(()=>{Ht(_t=>_t===Qt.current?String(Ut):_t)},[Ut,Qt]),(0,U.A)(()=>{Qt.current=ye,j(ye)},et,[ye]);const ve=(0,a.useCallback)(_t=>{Ht(_t.target.value)},[Ht]),oe=(0,a.useCallback)(_t=>{F&&F(_t),q&&_t.key==="Enter"&&q()},[F,q]),ae=(0,a.useCallback)(()=>{Qt.current="",j(""),Ht(""),k&&k()},[j,k]),Ee=Lt?void 0:fe("searchBar.title"),ke=Ft??fe("searchBar.placeholder",{org:Se.getOptionalString("app.title")||"Backstage"}),Oe=(0,it.n)().getSystemIcon("search")||at.A,Ge=(0,s.jsx)(vt.A,{position:"start",children:(0,s.jsx)(ft.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,s.jsx)(Oe,{})})}),Je=(0,s.jsx)(vt.A,{position:"end",children:(0,s.jsx)(Et.A,{"aria-label":"Clear",size:"small",onClick:ae,onKeyDown:_t=>{_t.key==="Enter"&&_t.stopPropagation()},children:"Clear"})});return(0,s.jsx)(gt,{inheritParentContextIfAvailable:!0,children:(0,s.jsx)(st.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:D,value:ye,label:Lt,placeholder:ke,InputProps:{startAdornment:Ge,endAdornment:Pt?Je:de,...ge},inputProps:{"aria-label":Ee,...Xt},fullWidth:wt,onChange:ve,onKeyDown:oe,...nt})})}),Bt=(0,a.forwardRef)((f,D)=>{const{value:j="",onChange:F,...k}=f,{term:q,setTerm:et}=Ot();(0,a.useEffect)(()=>{j&&et(String(j))},[j,et]);const Pt=(0,a.useCallback)(wt=>{F?F(wt):et(wt)},[F,et]);return(0,s.jsx)(gt,{inheritParentContextIfAvailable:!0,children:(0,s.jsx)(Q.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,s.jsx)(ht,{...k,ref:D,value:q,onChange:Pt})})})}),Nt=(0,p.A)(f=>({loading:{right:f.spacing(1),position:"absolute"}})),Kt=f=>D=>(0,s.jsx)(gt,{inheritParentContextIfAvailable:!0,children:(0,s.jsx)(f,{...D})}),Jt=()=>{const f=Nt();return(0,s.jsx)(bt.A,{className:f.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},kt=Kt(function(D){const{loading:j,value:F,onChange:k=()=>{},options:q=[],getOptionLabel:et=Qt=>String(Qt),inputPlaceholder:Pt,inputDebounceTime:wt,freeSolo:Ut=!0,fullWidth:Lt=!0,clearOnBlur:Ft=!1,"data-testid":Xt="search-autocomplete",...ge}=D,{setTerm:de}=Ot(),nt=(0,a.useCallback)(Qt=>Qt?typeof Qt=="string"?Qt:et(Qt):"",[et]),Se=(0,a.useMemo)(()=>nt(F),[F,nt]),ye=(0,a.useCallback)((Qt,fe,ve,oe)=>{de(nt(fe)),k(Qt,fe,ve,oe)},[nt,de,k]),Ht=(0,a.useCallback)(({InputProps:{ref:Qt,className:fe,endAdornment:ve},InputLabelProps:oe,...ae})=>(0,s.jsx)(Bt,{...ae,ref:Qt,clearButton:!1,value:Se,placeholder:Pt,debounceTime:wt,endAdornment:j?(0,s.jsx)(Jt,{}):ve,InputProps:{className:fe}}),[j,Se,Pt,wt]);return(0,s.jsx)(Rt.Ay,{...ge,"data-testid":Xt,value:F,onChange:ye,options:q,getOptionLabel:et,renderInput:Ht,freeSolo:Ut,fullWidth:Lt,clearOnBlur:Ft})});var Vt=t(18690),jt=t(27698);const Gt=f=>f?.document,ie=f=>{const{entityId:D,entityTitle:j,debounceTime:F=150,searchResultUrlMapper:k}=f,[q,et]=(0,a.useState)(!1),Pt=(0,Vt.Zp)(),{setFilters:wt,term:Ut,result:{loading:Lt,value:Ft}}=Ot(),[Xt,ge]=(0,a.useState)([]);(0,a.useEffect)(()=>{let Ht=!0;if(Ht&&Ft){const Qt=Ft.results.slice(0,10);ge(Qt)}return()=>{Ht=!1}},[Lt,Ft]);const{kind:de,name:nt,namespace:Se}=D;(0,a.useEffect)(()=>{wt(Ht=>({...Ht,kind:de,namespace:Se,name:nt}))},[de,Se,nt,wt]);const ye=(Ht,Qt)=>{if(Gt(Qt)){const{location:fe}=Qt.document;Pt(k?k(fe):fe)}};return(0,s.jsx)(kt,{"data-testid":"techdocs-search-bar",size:"small",open:q&&!!Ut,getOptionLabel:()=>"",filterOptions:Ht=>Ht,onClose:()=>{et(!1)},onOpen:()=>{et(!0)},onChange:ye,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Xt,renderOption:({document:Ht,highlight:Qt})=>(0,s.jsx)(jt.TechDocsSearchResultListItem,{result:Ht,lineClamp:3,asListItem:!1,asLink:!1,title:Ht.title,highlight:Qt}),loading:Lt,inputDebounceTime:F,inputPlaceholder:`Search ${j||D.name} docs`,freeSolo:!1})},ue=f=>{const D={term:"",types:["techdocs"],pageCursor:"",filters:f.entityId};return(0,s.jsx)(gt,{initialState:D,children:(0,s.jsx)(ie,{...f})})};var zt=t(74219);const ne=(0,a.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(f=>({default:f.RealLogViewer})));function ce(f){const{Progress:D}=(0,it.n)().getComponents();return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)(D,{}),children:(0,s.jsx)(ne,{...f})})}var Ye=t(73845),ee=t(72501),on=t(12398),We=t(32881);const Re=(0,p.A)(f=>(0,on.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}})),Ve=({buildLog:f,onClose:D})=>{const j=Re(),F=f.length===0?"Waiting for logs...":f.join(`
8
- `);return(0,s.jsxs)(x.A,{container:!0,direction:"column",className:j.root,spacing:0,wrap:"nowrap",children:[(0,s.jsxs)(x.A,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,s.jsx)(ee.A,{variant:"h5",children:"Build Details"}),(0,s.jsx)(ft.A,{title:"Close the drawer",onClick:D,color:"inherit",children:(0,s.jsx)(We.A,{})},"dismiss")]}),(0,s.jsx)(x.A,{item:!0,xs:!0,children:(0,s.jsx)(ce,{text:F,classes:{root:j.logs}})})]})},se=({buildLog:f})=>{const D=Re(),[j,F]=(0,a.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Et.A,{color:"inherit",onClick:()=>F(!0),children:"Show Build Logs"}),(0,s.jsx)(Ye.Ay,{classes:{paper:D.paper},anchor:"right",open:j,onClose:()=>F(!1),children:(0,s.jsx)(Ve,{buildLog:f,onClose:()=>F(!1)})})]})};var qe=t(12173);const tn=({errorMessage:f})=>{const D=(0,dt.gf)(J.U).getOptionalString("techdocs.builder"),j=(0,G.s)(),{entityRef:F}=(0,b.V)(),k=(0,Vt.zy)();(0,a.useEffect)(()=>{const{pathname:et,search:Pt,hash:wt}=k;j.captureEvent("not-found",`${et}${Pt}${wt}`,{attributes:F})},[j,F,k]);let q="";return[void 0,"local"].includes(D)||(q="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,s.jsx)(qe.M,{status:"404",statusMessage:f||"Documentation not found",additionalInfo:q})};var hn=t(28966),en=t(26679);function nn({contentLoading:f,content:D,activeSyncState:j}){return f||j==="BUILD_READY_RELOAD"||!D&&j==="CHECKING"?"CHECKING":!D&&j==="BUILDING"?"INITIAL_BUILD":D?j==="BUILDING"?"CONTENT_STALE_REFRESHING":j==="BUILD_READY"?"CONTENT_STALE_READY":j==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function pn(f,D){const j={...f};switch(D.type){case"sync":D.state==="CHECKING"&&(j.buildLog=[]),j.activeSyncState=D.state,j.syncError=D.syncError;break;case"contentLoading":j.contentLoading=!0,j.contentError=void 0;break;case"content":typeof D.path=="string"&&(j.path=D.path),j.contentLoading=!1,j.content=D.content,j.contentError=D.contentError;break;case"buildLog":j.buildLog=j.buildLog.concat(D.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(j.activeSyncState)&&["contentLoading","content"].includes(D.type)&&(j.activeSyncState="UP_TO_DATE",j.buildLog=[]),j}function Ke(f,D,j,F){const[k,q]=(0,a.useReducer)(pn,{activeSyncState:"CHECKING",path:F,contentLoading:!0,buildLog:[]}),et=(0,dt.gf)(en.s),{retry:Pt}=(0,hn.A)(async()=>{q({type:"contentLoading"});try{const Lt=await et.getEntityDocs({kind:f,namespace:D,name:j},F);return q({type:"content",content:Lt,path:F}),Lt}catch(Lt){q({type:"content",contentError:Lt,path:F})}},[et,f,D,j,F]),wt=(0,a.useRef)({content:void 0,reload:()=>{}});wt.current={content:k.content,reload:Pt},(0,X.A)(async()=>{q({type:"sync",state:"CHECKING"});const Lt=setTimeout(()=>{q({type:"sync",state:"BUILDING"})},1e3);try{switch(await et.syncEntityDocs({kind:f,namespace:D,name:j},Xt=>{q({type:"buildLog",log:Xt})})){case"updated":wt.current.content?q({type:"sync",state:"BUILD_READY"}):(wt.current.reload(),q({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":q({type:"sync",state:"UP_TO_DATE"});break;default:q({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(Ft){q({type:"sync",state:"ERROR",syncError:Ft})}finally{clearTimeout(Lt)}},[f,j,D,et,q,wt]);const Ut=(0,a.useMemo)(()=>nn({activeSyncState:k.activeSyncState,contentLoading:k.contentLoading,content:k.content}),[k.activeSyncState,k.content,k.contentLoading]);return(0,a.useMemo)(()=>({state:Ut,contentReload:Pt,path:k.path,content:k.content,contentErrorMessage:k.contentError?.toString(),syncErrorMessage:k.syncError?.toString(),buildLog:k.buildLog}),[Ut,Pt,k.path,k.content,k.contentError,k.syncError,k.buildLog])}const ze=(0,a.createContext)({}),He=()=>(0,a.useContext)(ze),be=f=>{const{children:D}=f,{"*":j=""}=(0,Vt.g)(),{entityRef:F}=(0,b.V)(),{kind:k,namespace:q,name:et}=F,Pt=Ke(k,q,et,j);return(0,s.jsx)(ze.Provider,{value:Pt,children:D instanceof Function?D(Pt):D})},Qe=f=>D=>(0,s.jsx)(be,{children:(0,s.jsx)(f,{...D})}),Ze=(0,p.A)(f=>({root:{marginBottom:f.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),je=()=>{let f=null;const D=Ze(),{state:j,contentReload:F,contentErrorMessage:k,syncErrorMessage:q,buildLog:et}=He();return j==="INITIAL_BUILD"&&(f=(0,s.jsx)(zt.A,{classes:{root:D.root},variant:"outlined",severity:"info",icon:(0,s.jsx)(bt.A,{size:"24px"}),action:(0,s.jsx)(se,{buildLog:et}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),j==="CONTENT_STALE_REFRESHING"&&(f=(0,s.jsx)(zt.A,{variant:"outlined",severity:"info",icon:(0,s.jsx)(bt.A,{size:"24px"}),action:(0,s.jsx)(se,{buildLog:et}),classes:{root:D.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),j==="CONTENT_STALE_READY"&&(f=(0,s.jsx)(zt.A,{variant:"outlined",severity:"success",action:(0,s.jsx)(Et.A,{color:"inherit",onClick:()=>F(),children:"Refresh"}),classes:{root:D.root},children:"A newer version of this documentation is now available, please refresh to view."})),j==="CONTENT_STALE_ERROR"&&(f=(0,s.jsxs)(zt.A,{variant:"outlined",severity:"error",action:(0,s.jsx)(se,{buildLog:et}),classes:{root:D.root,message:D.message},children:["Building a newer version of this documentation failed."," ",q]})),j==="CONTENT_NOT_FOUND"&&(f=(0,s.jsxs)(s.Fragment,{children:[q&&(0,s.jsxs)(zt.A,{variant:"outlined",severity:"error",action:(0,s.jsx)(se,{buildLog:et}),classes:{root:D.root,message:D.message},children:["Building a newer version of this documentation failed."," ",q]}),(0,s.jsx)(tn,{errorMessage:k})]})),f};var Ue=t(5893),Le=t(54917),an=t(96726),T=t(71651),l=t.n(T);const E=/main\.[A-Fa-f0-9]{8}\.min\.css$/,w=/^https:\/\/fonts\.googleapis\.com/,Z=/^https:\/\/fonts\.gstatic\.com/,_=f=>f.nodeName==="LINK",ot=f=>{const D=f?.getAttribute("href")||"",j=D.match(E),F=D.match(w),k=D.match(Z);return j||F||k},Mt=f=>(_(f)&&!ot(f)&&f.remove(),f),Wt=f=>f.nodeName==="IFRAME",Yt=(f,D)=>{const j=f.getAttribute("src")||"";try{const{host:F}=new URL(j);return D.includes(F)}catch{return!1}},re=f=>D=>(Wt(D)&&!Yt(D,f)&&D.remove(),D),Me=()=>{const f=(0,dt.gf)(J.U);return(0,a.useMemo)(()=>f.getOptionalConfig("techdocs.sanitizer"),[f])},he=()=>{const f=Me();return(0,a.useCallback)(async D=>{const j=f?.getOptionalStringArray("allowedIframeHosts");l().addHook("beforeSanitizeElements",Mt);const F=["link","meta"];j&&(F.push("iframe"),l().addHook("beforeSanitizeElements",re(j))),l().addHook("uponSanitizeElement",(et,Pt)=>{Pt.tagName==="meta"&&(et.getAttribute("http-equiv")==="refresh"&&et.getAttribute("content")?.includes("url=")||et.parentNode?.removeChild(et))}),l().addHook("uponSanitizeAttribute",(et,Pt)=>{et.tagName!=="meta"&&(Pt.attrName==="http-equiv"||Pt.attrName==="content")&&et.removeAttribute(Pt.attrName)});const k=f?.getOptionalString("allowedCustomElementTagNameRegExp"),q=f?.getOptionalString("allowedCustomElementAttributeNameRegExp");return l().sanitize(D.outerHTML,{ADD_TAGS:F,FORBID_TAGS:["style"],ADD_ATTR:["http-equiv","content","dominant-baseline"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0,CUSTOM_ELEMENT_HANDLING:{tagNameCheck:k?new RegExp(k):void 0,attributeNameCheck:q?new RegExp(q):void 0}})},[f])};var qt=t(34435),te=t(268);const pe=({theme:f})=>`
7
+ `);const me=Hr({root:c,discoverers:[Vr,Gr],collectors:{routing:Zt?Zr:Qr,collectedPlugins:Yr,featureFlags:Jr}});return me.collectedPlugins.forEach(Be=>this.plugins.add(Be)),this.verifyPlugins(this.plugins),this.getApiHolder(),me},[c]),tt=Bo(this.configLoader,this.components,y),mt="api"in tt;if(mt){const{api:Zt}=tt;this.configApi=Zt}if("node"in tt)return tt.node;if(o)throw o;if(!n)try{n=bo(this.bindRoutes,tt.api,this.plugins),ao(R.paths,R.parents),io(n,this.plugins)}catch(Zt){throw o=Zt,Zt}if(mt&&A.current){A.current=!1;const Zt=this.getApiHolder().get(vn.B);if(Zt){for(const De of this.featureFlags)Zt.registerFlag({...De,pluginId:""});for(const De of this.plugins.values())if("getFeatureFlags"in De)for(const un of De.getFeatureFlags())Zt.registerFlag({name:un.name,pluginId:De.getId()});else for(const un of De.output())un.type==="feature-flag"&&Zt.registerFlag({name:un.name,pluginId:De.getId()});const me=Zt.getRegisteredFlags(),Be=new Set(me.map(De=>De.name));for(const De of N)Be.has(De)||Zt.registerFlag({name:De,pluginId:""})}}const{ThemeProvider:St=sr,Progress:Tt}=this.components,Dt=this.getApiHolder();if(Mo()){const Zt=Dt.get(Yt.m),me=Dt.get(Me.a),Be=Dt.get(_.I);if(!Zt||!me||!Be)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Zt,fetchApi:me,discoveryApi:Be})}return(0,a.jsx)(ae,{apis:Dt,children:(0,a.jsx)(lo,{appContext:e,children:(0,a.jsx)(St,{children:(0,a.jsx)(oo,{routePaths:R.paths,routeParents:R.parents,routeObjects:R.objects,routeBindings:n,basePath:Ro(tt.api),children:(0,a.jsx)(or.Provider,{value:{routeObjects:R.objects,appIdentityProxy:this.appIdentityProxy},children:(0,a.jsx)(nt.Suspense,{fallback:(0,a.jsx)(Tt,{}),children:c})})})})})})}}getRouter(){return lr}getApiHolder(){if(this.apiHolder){for(const e of this.plugins)for(const n of e.getApis())this.apiFactoryRegistry.get(n.api)||this.apiFactoryRegistry.register("default",n);return Ms.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:Zn,deps:{},factory:()=>Qn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:ot.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:pe.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:Ys,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:Kr.J,deps:{languageApi:Ys},factory:({languageApi:e})=>$s.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:vn.B,deps:{},factory:()=>new Wr});for(const e of this.defaultApis)this.apiFactoryRegistry.register("default",e);for(const e of this.plugins)for(const n of e.getApis())if(!this.apiFactoryRegistry.register("default",n))throw new Error(`Plugin ${e.getId()} tried to register duplicate or forbidden API factory for ${n.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 Ms.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new Ms(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const n=new Set;for(const o of e){const i=o.getId();if(n.has(i))throw new Error(`Duplicate plugin found '${i}'`);n.add(i)}}}function $o(r){return new Uo(r)}function Fo(r){return $o({...r,apis:r?.apis??[],bindRoutes:r?.bindRoutes,components:{...M,...r?.components},configLoader:r?.configLoader,defaultApis:ls,icons:{...xs,...r?.icons},plugins:r?.plugins??[],featureFlags:r?.featureFlags??[],themes:r?.themes??ue})}var ns=t(82442);let pr=!1;const gr=r=>{const e=(0,ar.n)(),{NotFoundErrorPage:n}=e.getComponents(),o=(0,nt.useMemo)(()=>In(),[]),c=[...(0,ns.O)(r.children,A=>A.getElements().flatMap(y=>{let R=y.props.path;if(R==="")return[];R=R?.replace(/\/\*$/,"")??"/";let N=o?y:y.props.element;return!o&&!N&&(N=y,pr||(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] />} />."),pr=!0)),[{path:R,element:N,children:y.props.children?[{path:R==="/"?"/":"*",element:y.props.children}]:void 0}]}).sort((y,R)=>R.path.localeCompare(y.path)).map(y=>({...y,path:y.path==="/"?"/":`${y.path}/*`}))),{path:"*",element:(0,a.jsx)(n,{})}];return(0,p.Ye)(c)};(0,Pe.h)(gr,"core.type","FlatRoutes");var An=t(6820),No=t(78692),ko=t(86519);function Wo(r){return!r.cursor}function Ko(r,e){if(!r.length)return[];const{maxCountPerChunk:n=1e3,maxStringLengthPerChunk:o=90*2**10,extraStringLengthPerRef:i=3}=e??{},c=[];let A=0,y=0,R=0;for(let N=0;N<r.length;++N){const tt=r[N].length+i;R>0&&(y+tt>o||R+1>n)&&(c.push(r.slice(A,N)),A=N,y=0,R=0),y+=tt,R+=1}return c.push(r.slice(A,r.length)),c}const Ae="catalog";var xe=t(94214);class zo{discoveryApi;fetchApi;constructor(e){this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:gn()}}async deleteEntityByUid(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"DELETE"})}async getEntities(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities{?fields,limit,filter*,offset,after,order*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntitiesByQuery(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntitiesByRefs(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-refs{?filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async getEntityAncestryByName(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntityByName(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntityByUid(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntityFacets(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entity-facets{?facet*,filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async refreshEntity(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/refresh").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async validateEntity(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/validate-entity").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async analyzeLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/analyze-location").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async createLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/locations{?dryRun}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async deleteLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"DELETE"})}async getLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getLocationByEntity(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getLocations(e,n){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/locations").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}}class Ho{apiClient;constructor(e){this.apiClient=new zo(e)}async getEntityAncestors(e,n){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,An.KU)(e.entityRef)},n))}async getLocations(e,n){return{items:(await this.requestRequired(await this.apiClient.getLocations(e??{},n))).map(i=>i.data)}}async getLocationById(e,n){return await this.requestOptional(await this.apiClient.getLocation({path:{id:e}},n))}async getLocationByEntity(e,n){return await this.requestOptional(await this.apiClient.getLocationByEntity({path:(0,An.KU)(e)},n))}async getEntities(e,n){const{filter:o=[],fields:i=[],order:c,offset:A,limit:y,after:R}=e??{},N=[];if(c)for(const mt of[c].flat())mt&&N.push(`${mt.order}:${mt.field}`);return{items:await this.requestRequired(await this.apiClient.getEntities({query:{fields:i,limit:y,filter:this.getFilterValue(o),offset:A,after:R,order:c?N:void 0}},n))}}async getEntitiesByRefs(e,n){const o=async c=>{const A=await this.apiClient.getEntitiesByRefs({body:{entityRefs:c,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},n);if(!A.ok)throw await ge.o.fromResponse(A);return(await A.json()).items.map(R=>R??void 0)};let i;for(const c of Ko(e.entityRefs)){const A=await o(c);i?i.push(...A):i=A}return{items:i??[]}}async queryEntities(e={},n){const o={};if(Wo(e)){const{fields:i=[],filter:c,limit:A,offset:y,orderFields:R,fullTextFilter:N}=e;o.filter=this.getFilterValue(c),A!==void 0&&(o.limit=A),y!==void 0&&(o.offset=y),R!==void 0&&(o.orderField=(Array.isArray(R)?R:[R]).map(({field:mt,order:St})=>`${mt},${St}`)),i.length&&(o.fields=i);const tt=N?.term?.trim();tt&&(o.fullTextFilterTerm=tt),N?.fields?.length&&(o.fullTextFilterFields=N.fields)}else{const{fields:i=[],limit:c,cursor:A}=e;o.cursor=A,c!==void 0&&(o.limit=c),i.length&&(o.fields=i)}return this.requestRequired(await this.apiClient.getEntitiesByQuery({query:o},n))}async getEntityByRef(e,n){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,An.KU)(e)},n))}async getEntityByName(e,n){const{kind:o,namespace:i="default",name:c}=e;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:o,namespace:i,name:c}},n))}async refreshEntity(e,n){const o=await this.apiClient.refreshEntity({body:{entityRef:e}},n);if(o.status!==200)throw await ge.o.fromResponse(o)}async getEntityFacets(e,n){const{filter:o=[],facets:i}=e;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:i,filter:this.getFilterValue(o)}},n))}async addLocation(e,n){const{type:o="url",target:i,dryRun:c}=e,A=await this.apiClient.createLocation({body:{type:o,target:i},query:{dryRun:c?"true":void 0}},n);if(A.status!==201)throw await ge.o.fromResponse(A);const{location:y,entities:R,exists:N}=await A.json();if(!y)throw new Error(`Location wasn't added: ${i}`);return{location:y,entities:R,exists:N}}async getLocationByRef(e,n){return(await this.requestRequired(await this.apiClient.getLocations({},n))).map(i=>i.data).find(i=>e===(0,No.KL)(i))}async removeLocationById(e,n){await this.requestIgnored(await this.apiClient.deleteLocation({path:{id:e}},n))}async removeEntityByUid(e,n){await this.requestIgnored(await this.apiClient.deleteEntityByUid({path:{uid:e}},n))}async validateEntity(e,n,o){const i=await this.apiClient.validateEntity({body:{entity:e,location:n}},o);if(i.ok)return{valid:!0};if(i.status!==400)throw await ge.o.fromResponse(i);const{errors:c=[]}=await i.json();return{valid:!1,errors:c}}async requestIgnored(e){if(!e.ok)throw await ge.o.fromResponse(e)}async requestRequired(e){if(!e.ok)throw await ge.o.fromResponse(e);return e.json()}async requestOptional(e){if(!e.ok){if(e.status===404)return;throw await ge.o.fromResponse(e)}return await e.json()}getFilterValue(e=[]){const n=[];for(const o of[e].flat()){const i=[];for(const[c,A]of Object.entries(o))for(const y of[A].flat())y===ko.c?i.push(c):typeof y=="string"&&i.push(`${c}=${y}`);i.length&&n.push(i.join(","))}return n}}var fr=t(7341),Vo=t(18),Go=t(82292),mr=t(29207),xn=t(95203),Yo=t(9803),Ie=t(88758),Qo=t(54560),Cn=t(45250);async function Zo({storageApi:r}){const e=r.forBucket("settings"),n=r.forBucket("starredEntities"),o=e.snapshot("starredEntities").value;if(!(0,Cn.isArray)(o))return;const i=new Set(n.snapshot("entityRefs").value??[]);o.filter(Cn.isString).map(c=>c.split(":")).filter(c=>c.length===4&&c[0]==="entity").map(([c,A,y,R])=>(0,An.U2)({kind:A,namespace:y,name:R})).forEach(c=>i.add(c)),await n.set("entityRefs",Array.from(i)),await e.remove("starredEntities")}class Jo{settingsStore;starredEntities;constructor(e){Zo(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities"),this.starredEntities=new Set(this.settingsStore.snapshot("entityRefs").value??[]),this.settingsStore.observe$("entityRefs").subscribe({next:n=>{this.starredEntities=new Set(n.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(Y())(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 Fs(r){const{years:e=0,months:n=0,weeks:o=0,days:i=0,hours:c=0,minutes:A=0,seconds:y=0,milliseconds:R=0}=r;return((((e*365+n*30+o*7+i)*24+c)*60+A)*60+y)*1e3+R}var Xo=t(25033),_o=t.n(Xo),qo=t(88083);const ta={seconds:10},ea={milliseconds:50},na={api:Nn.A,component:Wn.A,system:Un.A,resource:Kn.A,domain:Bn.A,location:kn.A,user:On.A,group:Sn.A,template:zn.A};function yr(r){return{async:r.async,render:({entityRef:e,entity:n,context:o})=>({snapshot:(0,qo.T)(n||e,o),loadEntity:r.async})}}class sa extends Map{#t;#e=new Map;constructor(e){super(),this.#t=e}set(e,n){const o=super.set(e,n);return this.#e.set(e,Date.now()),o}get(e){if(!this.has(e))return;const n=this.#e.get(e);if(Date.now()-n>this.#t){this.delete(e);return}return super.get(e)}delete(e){return this.#e.delete(e),super.delete(e)}clear(){return this.#e.clear(),super.clear()}}class ss{static createLocal(){return new ss({renderer:yr({async:!1})})}static create(e){return new ss(e)}#t;#e;#n;#s;#o;constructor(e){const n=e.cacheTtl??ta,o=e.batchDelay??ea,i=e.renderer??yr({async:!0}),c={};if(Object.entries(na).forEach(([A,y])=>{c[A.toLocaleLowerCase("en-US")]=y}),Object.entries(e.kindIcons??{}).forEach(([A,y])=>{c[A.toLocaleLowerCase("en-US")]=y}),i.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");this.#n=this.#a({cacheTtl:n,batchDelay:o,renderer:i,catalogApi:e.catalogApi})}this.#e=Fs(n),this.#t=new Map,this.#s=c,this.#o=i}forEntity(e,n){const{entityRef:o,kind:i,entity:c,needsLoad:A}=this.#r(e),y=St=>{const{snapshot:Tt}=this.#o.render({entityRef:o,loading:St.loading,entity:St.entity,context:n||{}});return{...Tt,entityRef:o,Icon:this.#i(Tt.Icon,i)}};let R;try{R=y({loading:A,entity:c})}catch{R={primaryTitle:o,entityRef:o}}if(!A)return{snapshot:R,promise:Promise.resolve(R)};const N=Promise.resolve().then(()=>this.#n?.load(o)).then(St=>y({loading:!1,entity:St??c})).catch(()=>{}),tt=new(Y())(St=>{let Tt=!1;return N.then(Dt=>{Dt&&St.next(Dt)}).finally(()=>{Tt||St.complete()}),()=>{Tt=!0}}),mt=N.then(St=>St??R);return{snapshot:R,update$:tt,promise:mt}}#r(e){if(typeof e!="string")return{entity:e,kind:e.kind,entityRef:(0,An.U2)(e),needsLoad:!1};const n=this.#t.get(e),o=n?.entity,c=(!n||Date.now()-n.updatedAt>this.#e)&&this.#o.async!==!1&&this.#n!==void 0;return{entity:o,kind:(0,An.KU)(e).kind,entityRef:e,needsLoad:c}}#a(e){const n=Fs(e.cacheTtl),o=Fs(e.batchDelay);return new(_o())(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"]}),A=Date.now();return i.forEach((y,R)=>{this.#t.set(y,{updatedAt:A,entity:c[R]})}),c},{name:"DefaultEntityPresentationApi",cacheMap:new sa(n),maxBatchSize:100,batchScheduleFn:o?i=>setTimeout(i,o):void 0})}#i(e,n){return e||(e===!1?!1:this.#s[n.toLocaleLowerCase("en-US")])}}const Te=(0,Yo.i)({id:"catalog",apis:[(0,Z.b)({api:fr.v,deps:{discoveryApi:_.I,fetchApi:Me.a},factory:({discoveryApi:r,fetchApi:e})=>new Ho({discoveryApi:r,fetchApi:e})}),(0,Z.b)({api:Vo.a,deps:{storageApi:re},factory:({storageApi:r})=>new Jo({storageApi:r})}),(0,Z.b)({api:Go.n,deps:{catalogApi:fr.v},factory:({catalogApi:r})=>ss.create({catalogApi:r})})],routes:{catalogIndex:xn.rQ,catalogEntity:mr.s},externalRoutes:{createComponent:xn.qP,viewTechDoc:xn.UJ,createFromTemplate:xn.Zg,unregisterRedirect:xn.pS}}),mi=Te.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:xn.rQ})),ra=Te.provide((0,Ie.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(r=>r.CatalogEntityPage),mountPoint:mr.s})),yi=Te.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)}})),vi=Te.provide((0,Ie.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),Ei=Te.provide((0,Ie.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),Ai=Te.provide((0,Ie.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),xi=Te.provide((0,Ie.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),Ci=Te.provide((0,Ie.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),bi=Te.provide((0,Ie.NC)({name:"EntityHasSubdomainsCard",component:{lazy:()=>t.e(6415).then(t.bind(t,46415)).then(r=>r.HasSubdomainsCard)}})),Si=Te.provide((0,Ie.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),Oi=Te.provide((0,Ie.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),Pi=Te.provide((0,Ie.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),Ti=Te.provide((0,Ie.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),Ri=Te.provide((0,Ie.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),wi=Te.provide((0,Qo.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var vr=t(96726),Er=t(26679);class oa{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:n,identityApi:o}){this.configApi=e,this.discoveryApi=n,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,n){const i=`${await this.getApiOrigin()}/${n}`,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,n,o){const i=await this.getApiOrigin();return new URL(e,`${i}/${o}`).toString()}}class aa{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:n,identityApi:o}){this.configApi=e,this.discoveryApi=n,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 ia=[(0,Z.b)({api:Er.s,deps:{configApi:ot.U,discoveryApi:_.I,identityApi:pe.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new oa({configApi:r,discoveryApi:e,identityApi:n})}),(0,Z.b)({api:Er.l,deps:{configApi:ot.U,discoveryApi:_.I,identityApi:pe.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new aa({configApi:r,discoveryApi:e,identityApi:n})}),(0,Z.b)({api:vr.Y,deps:{configApi:ot.U},factory:({configApi:r})=>vr.L.fromConfig(r)})],ca={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},la={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function da(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function ua(){const r=await rr(),e=await da();return[...r,{context:"detected",data:e?ca:la}]}var _e=t(58837),ha=t(3210);const pa=(0,_e.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}}),ga=()=>{const r=pa();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"})})},fa=(0,_e.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}}),ma=()=>{const r=fa();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 Ce=t(72664);const Ar={isOpen:!1,setOpen:()=>{}},xr=(0,nt.createContext)(Ar),Cr=(0,ie.tK)("sidebar-open-state-context");function br(r){const{children:e,value:n}=r;return(0,a.jsx)(xr.Provider,{value:n,children:(0,a.jsx)(Cr.Provider,{value:(0,ve.B)({1:n}),children:e})})}const Ns=()=>{const r=(0,nt.useContext)(Cr),e=(0,nt.useContext)(xr);if(r===void 0)return e||Ar;const n=r.atVersion(1);if(n===void 0)throw new Error("No context found for version 1.");return n};var Sr=t(72072),Or=t(73524),rn=t(10394),Pr=t(5893),ya=t(53373),dn=t.n(ya),va=t(1125),Tr=t(29365),Ea=t(73845),ks=t(72501),Aa=t(32881),xa=t(27326),Ca=t(13085);const Rr=(0,nt.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var Ws=t(34435);const ba=(0,_e.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"}})),Sa=r=>{const{to:e,label:n,icon:o,value:i}=r,{sidebarConfig:c}=(0,nt.useContext)(Ce.yY),A=ba({sidebarConfig:c}),y=(0,p.zy)(),{selectedMenuItemIndex:R,setSelectedMenuItemIndex:N}=(0,nt.useContext)(Rr),tt=(St,Tt)=>{N(Tt===R?-1:Tt)},mt=i===R&&R>=0||i!==R&&!(R>=0)&&e===y.pathname;return(0,a.jsx)(Ca.A,{"aria-label":n,label:n,icon:o,component:Sr.N_,to:e||y.pathname,onChange:tt,value:i,selected:mt,classes:A})},wr=r=>{const{children:e,to:n,label:o,icon:i,value:c}=r,{isMobile:A}=(0,Ws.Ut)();return A?(0,a.jsx)(Sa,{to:n,label:o,icon:i,value:c}):(0,a.jsx)(a.Fragment,{children:e})},Ir=(0,_e.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`})})),Oa=r=>(0,Cn.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),Pa=(0,nt.createElement)(wr).type,Ta=({children:r,label:e="Menu",open:n,onClose:o})=>{const{sidebarConfig:i}=(0,nt.useContext)(Ce.yY),c=Ir({sidebarConfig:i});return(0,a.jsxs)(Ea.Ay,{anchor:"bottom",open:n,onClose:o,ModalProps:{BackdropProps:{classes:{root:c.marginMobileSidebar}}},classes:{root:c.marginMobileSidebar,paperAnchorBottom:c.overlay},children:[(0,a.jsxs)(rn.A,{className:c.overlayHeader,children:[(0,a.jsx)(ks.A,{variant:"h3",children:e}),(0,a.jsx)(Tr.A,{onClick:o,classes:{root:c.overlayHeaderClose},children:(0,a.jsx)(Aa.A,{})})]}),(0,a.jsx)(rn.A,{component:"nav",children:r})]})},Ra=r=>{const{sidebarConfig:e}=(0,nt.useContext)(Ce.yY),{children:n}=r,o=Ir({sidebarConfig:e}),i=(0,p.zy)(),[c,A]=(0,nt.useState)(-1);(0,nt.useEffect)(()=>{A(-1)},[i.pathname]);let y=(0,ns.O)(n,N=>N.getElements().filter(tt=>tt.type===Pa));if(n)y.length?y=Oa(y):y.push((0,a.jsx)(wr,{icon:(0,a.jsx)(xa.A,{}),children:n},"default_menu"));else return null;const R=c>=0&&!y[c].props.to;return(0,a.jsx)(br,{value:{isOpen:!0,setOpen:()=>{}},children:(0,a.jsxs)(Rr.Provider,{value:{selectedMenuItemIndex:c,setSelectedMenuItemIndex:A},children:[(0,a.jsx)(Ta,{label:y[c]&&y[c].props.label,open:R,onClose:()=>A(-1),children:y[c]&&y[c].props.children}),(0,a.jsx)(va.A,{className:o.root,"data-testid":"mobile-sidebar-root",component:"nav",children:y})]})})};var wa=t(87849),Ia=t(10315);const Dr=(0,_e.A)(r=>({root:{left:0,top:0,bottom:0,zIndex:r.zIndex.appBar,position:"fixed"},drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",left:0,top:0,bottom:0,position:"absolute",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 Da=function(r){return r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open",r}(Da||{});const La=r=>{const{sidebarConfig:e}=(0,nt.useContext)(Ce.yY),{openDelayMs:n=e.defaultOpenDelayMs,closeDelayMs:o=e.defaultCloseDelayMs,disableExpandOnHover:i,children:c}=r,A=Dr({sidebarConfig:e}),y=(0,Pr.A)(Be=>Be.breakpoints.down("md"),{noSsr:!0}),[R,N]=(0,nt.useState)(0),tt=(0,nt.useRef)(),{isPinned:mt,toggleSidebarPinState:St}=(0,Ws.Ut)(),Tt=()=>{mt||i||(tt.current&&(clearTimeout(tt.current),tt.current=void 0),R!==2&&!y&&(tt.current=window.setTimeout(()=>{tt.current=void 0,N(2)},n),N(1)))},Dt=()=>{mt||i||(tt.current&&(clearTimeout(tt.current),tt.current=void 0),R===1?N(0):R===2&&(tt.current=window.setTimeout(()=>{tt.current=void 0,N(0)},o)))},Zt=R===2&&!y||mt,me=Be=>{Be?(N(2),St()):(N(0),St())};return(0,a.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,a.jsx)(Ba,{}),(0,a.jsx)(br,{value:{isOpen:Zt,setOpen:me},children:(0,a.jsx)(rn.A,{className:A.root,"data-testid":"sidebar-root",onMouseEnter:i?()=>{}:Tt,onFocus:i?()=>{}:Tt,onMouseLeave:i?()=>{}:Dt,onBlur:i?()=>{}:Dt,children:(0,a.jsx)(rn.A,{className:dn()(A.drawer,A.drawerWidth,{[A.drawerOpen]:Zt}),children:c})})})]})},Ma=r=>{const e=(0,Ce.Rv)(r.sidebarOptions??{}),n=(0,Ce.i8)(r.submenuOptions??{}),{children:o,disableExpandOnHover:i,openDelayMs:c,closeDelayMs:A}=r,{isMobile:y}=(0,Ws.Ut)();return y?(0,a.jsx)(Ra,{children:o}):(0,a.jsx)(Ce.yY.Provider,{value:{sidebarConfig:e,submenuConfig:n},children:(0,a.jsx)(La,{openDelayMs:c,closeDelayMs:A,disableExpandOnHover:i,children:o})})};function Ba(){const{sidebarConfig:r}=(0,nt.useContext)(Ce.yY),{focusContent:e,contentRef:n}=(0,Or.H)(),o=Dr({sidebarConfig:r}),{t:i}=(0,wa.i)(Ia.O);return n?.current?(0,a.jsx)(u.A,{onClick:e,variant:"contained",className:dn()(o.visuallyHidden),children:i("skipToContent")}):null}var ja=t(94509),rs=t(58502),Ua=t(79065),$a=t(55704),Lr=t(62248);const Fa=(0,_e.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"}),Na=r=>{const{isOpen:e}=Ns(),{sidebarConfig:n,submenuConfig:o}=(0,nt.useContext)(Ce.yY),i=e?n.drawerWidthOpen:n.drawerWidthClosed,c=Fa({left:i,submenuConfig:o}),{isHoveredOn:A}=(0,nt.useContext)(Ce.U1),[y,R]=(0,nt.useState)(!1);return(0,nt.useEffect)(()=>{R(A)},[A]),(0,a.jsxs)(rn.A,{className:dn()(c.drawer,{[c.drawerOpen]:y}),children:[(0,a.jsx)(ks.A,{variant:"h5",component:"span",className:c.title,children:r.title}),r.children]})};var ka=t(45810),Mr=t.n(ka);function Br(r,e,n=!1){const o=new URLSearchParams(e.search).toString(),i=Mr().parse(o),c=new URLSearchParams(r.search).toString(),A=Mr().parse(c),y=n?Cn.isEqual:Cn.isMatch;return(0,Cn.isEqual)(e.pathname,r.pathname)&&y(A,i)}const Wa=r=>(0,_e.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 os(r){return(0,nt.useMemo)(()=>Wa(r),[r])()}const Ka=(r,e)=>(0,ns.O)(r.props.children,n=>{let o=!1;return n.getElements().forEach(({props:{to:i,dropdownItems:c}})=>{if(!o){if(c?.length){c.forEach(({to:A})=>o=o||Br(e,(0,Rn.o1)(A)));return}i&&(o=Br(e,(0,Rn.o1)(i)))}}),o},[e.pathname]);function Ks(r){return r.to===void 0}const za=(0,nt.createElement)(Na).type,Ha=(0,nt.forwardRef)(function({to:e,end:n,style:o,className:i,activeStyle:c,caseSensitive:A,activeClassName:y="active","aria-current":R="page",...N},tt){let{pathname:mt}=(0,p.zy)(),{pathname:St}=(0,p.x$)(e);A||(mt=mt.toLocaleLowerCase("en-US"),St=St.toLocaleLowerCase("en-US"));let Tt=mt===St;!Tt&&!n&&(Tt=mt.startsWith(`${St}/`));const Dt=Tt?R:void 0;return(0,a.jsx)(O.N_,{...N,to:e,ref:tt,"aria-current":Dt,style:{...o,...Tt?c:void 0},className:dn()([typeof i!="function"?i:void 0,Tt?y:void 0])})}),jr=(0,nt.forwardRef)((r,e)=>{const{icon:n,text:o,hasNotifications:i=!1,hasSubmenu:c=!1,disableHighlight:A=!1,onClick:y,noTrack:R,children:N,className:tt,...mt}=r,{sidebarConfig:St}=(0,nt.useContext)(Ce.yY),Tt=os(St),{isOpen:Dt}=Ns(),Zt=!Dt&&c?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},me=(0,a.jsxs)(rn.A,{style:Zt,children:[(0,a.jsx)(n,{fontSize:"small"}),!Dt&&c?(0,a.jsx)(Lr.A,{fontSize:"small"}):(0,a.jsx)(a.Fragment,{})]}),Be=(0,a.jsx)(ja.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!i,className:dn()({[Tt.closedItemIcon]:!Dt}),children:me}),De=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(rn.A,{"data-testid":"login-button",className:Tt.iconContainer,children:Be}),o&&(0,a.jsx)(ks.A,{variant:"subtitle2",component:"span",className:Tt.label,children:o}),(0,a.jsx)("div",{className:Tt.secondaryAction,children:N})]}),un=Dt?De:Be,Fr={onClick:y,className:dn()(tt,Tt.root,Dt?Tt.open:Tt.closed,Ks(r)&&Tt.buttonItem,{[Tt.highlightable]:!A})},Nr=(0,ir.s)(),{pathname:zs}=(0,p.x$)(!Ks(r)&&r.to?r.to:""),kr=(0,nt.useCallback)(hi=>{if(!R){const pi="click",gi=o??"Sidebar Item",fi=zs?{attributes:{to:zs}}:void 0;Nr.captureEvent(pi,gi,fi)}y?.(hi)},[Nr,o,zs,R,y]);return Ks(r)?(0,a.jsx)(u.A,{role:"button","aria-label":o,...Fr,ref:e,onClick:kr,children:un}):(0,a.jsx)(Ha,{...Fr,activeClassName:Tt.selected,to:r.to?r.to:"",ref:e,"aria-label":o||r.to,...mt,onClick:kr,children:un})}),Va=({children:r,...e})=>{const{sidebarConfig:n}=(0,nt.useContext)(Ce.yY),o=os(n),[i,c]=(0,nt.useState)(!1),A=(0,p.zy)(),y=Ka(r,A),R=(0,Pr.A)(St=>St.breakpoints.down("sm")),N=()=>{c(!0)},tt=()=>{c(!1)},mt=()=>R?i?(0,a.jsx)($a.A,{fontSize:"small",className:o.submenuArrow}):(0,a.jsx)(Ua.A,{fontSize:"small",className:o.submenuArrow}):!i&&(0,a.jsx)(Lr.A,{fontSize:"small",className:o.submenuArrow});return(0,a.jsx)(Ce.U1.Provider,{value:{isHoveredOn:i,setIsHoveredOn:c},children:(0,a.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:tt,onTouchStart:i?tt:N,onMouseEnter:N,className:dn()(i&&o.highlighted),children:[(0,a.jsx)(jr,{hasSubmenu:!0,className:y?o.selected:"",...e,children:mt()}),i&&r]})})},Ur=(0,nt.forwardRef)((r,e)=>{const[n]=(0,ns.O)(r.children,o=>o.getElements().filter(i=>i.type===za));return n?(0,a.jsx)(Va,{...r,children:n}):(0,a.jsx)(jr,{...r,ref:e})});function Li(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[n,o]=useState(""),i=os(e),c=r.icon?r.icon:SearchIcon,A=()=>{r.onSearch(n),o("")},y=mt=>{mt.key==="Enter"&&(mt.preventDefault(),A())},R=mt=>{o(mt.target.value)},N=mt=>{mt.preventDefault(),mt.stopPropagation()},tt=mt=>{A(),mt.preventDefault()};return _jsx(Box,{className:i.searchRoot,children:_jsx(Ur,{icon:c,to:r.to,onClick:tt,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:n,onClick:N,onChange:R,onKeyDown:y,className:i.searchContainer,InputProps:{disableUnderline:!0,className:i.searchField},inputProps:{className:i.searchFieldHTMLInput}})})})}const Mi=(0,rs.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),Bi=(0,rs.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),Ga=(0,rs.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Ya=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),ji=(0,rs.A)("div")(({theme:r})=>{const e=Ya(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),Ui=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=os(r),{isOpen:n,setOpen:o}=useSidebarOpenState();if(useMediaQuery(A=>A.breakpoints.down("md"),{noSsr:!0}))return null;const c=()=>{o(!n)};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:n?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},Qa=(0,_e.A)({root:{width:Ce.hC.drawerWidthClosed,height:3*Ce.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:Ce.hC.drawerWidthClosed,marginLeft:24}}),Za=()=>{const r=Qa(),{isOpen:e}=Ns();return(0,a.jsx)("div",{className:r.root,children:(0,a.jsx)(Sr.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,a.jsx)(ga,{}):(0,a.jsx)(ma,{})})})},Ja=({children:r})=>(0,a.jsxs)(Or.G,{children:[(0,a.jsxs)(Ma,{children:[(0,a.jsx)(Za,{}),(0,a.jsx)(Ga,{}),(0,a.jsx)(Ur,{icon:ha.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Xa=t(71677),_a=t(62437),qa=t(55484),ti=t(45061),ei=t(13976);const ni=(0,_e.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 si=function(r){return r.LIGHT="light",r.DARK="dark",r}(si||{});const ri=()=>{const r=(0,Tn.gf)(Zn),e=ni(),[n,o]=(0,nt.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),i={light:{icon:qa.A,title:"Dark theme"},dark:{icon:_a.A,title:"Light theme"}},{title:c,icon:A}=i[n],y=()=>{o(R=>{const N=R==="light"?"dark":"light";return r.setActiveThemeId(N),N})};return(0,a.jsx)(rn.A,{display:"flex",alignItems:"center",mr:2,children:(0,a.jsx)(Xa.Ay,{title:c,arrow:!0,children:(0,a.jsx)(Tr.A,{size:"small",onClick:y,children:(0,a.jsx)(A,{className:e.headerIcon})})})})},oi=()=>(0,a.jsxs)(b.Wj,{children:[(0,a.jsx)(ti.T,{}),(0,a.jsx)(ei.p,{withSearch:!1})]}),ai=(0,a.jsx)(oi,{}),$r=Fo({apis:ia,configLoader:ua,plugins:Object.values(s)}),ii=$r.getProvider(),ci=$r.getRouter(),li=b.Ju.provide((0,d.Hr)({name:"ThemeToggleAddon",component:ri,location:m.e.Header})),di=(0,a.jsxs)(gr,{children:[(0,a.jsx)(p.C5,{to:"/docs/default/component/local/"},"/"),(0,a.jsx)(p.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,a.jsx)(ra,{})}),(0,a.jsx)(p.qh,{path:"/docs",element:(0,a.jsx)(b.$j,{}),children:(0,a.jsx)(h.K,{})}),(0,a.jsxs)(p.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,a.jsx)(b.Wj,{}),children:[ai,(0,a.jsx)(d.po,{children:(0,a.jsx)(li,{})})]})]}),ui=()=>(0,a.jsx)(ii,{children:(0,a.jsx)(ci,{children:(0,a.jsx)(Ja,{children:di})})});x.createRoot(document.getElementById("root")).render((0,a.jsx)(ui,{}))},43836:(H,S,t)=>{"use strict";t.d(S,{qO:()=>p,tK:()=>x});var s=t(14041),a=t(63544);function x(h){return(0,a.Q)(h,()=>(0,s.createContext)(void 0))}function p(h){return(0,s.useContext)(x(h))}function b(h){return{set(d){globalThis[`__@backstage/${h}__`]=createContext(createVersionedValueMap(d))},reset(){delete globalThis[`__@backstage/${h}__`]}}}},10602:(H,S,t)=>{"use strict";t.d(S,{B:()=>s});function s(a){Object.freeze(a);const x={atVersion(p){return a[p]}};return Object.defineProperty(x,"$map",{configurable:!0,enumerable:!0,get(){return a}}),x}},63544:(H,S,t)=>{"use strict";t.d(S,{Q:()=>p});function s(){return typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")()}const a=s(),x=b=>`__@backstage/${b}__`;function p(b,h){const d=x(b);let m=a[d];return m||(m=h(),a[d]=m,m)}},7341:(H,S,t)=>{"use strict";t.d(S,{v:()=>a});var s=t(55309);const a=(0,s.y)({id:"plugin.catalog.service"})},82292:(H,S,t)=>{"use strict";t.d(S,{n:()=>a});var s=t(55309);const a=(0,s.y)({id:"plugin.catalog.entity-presentation"})},88083:(H,S,t)=>{"use strict";t.d(S,{T:()=>b});var s=t(6820),a=t(72348),x=t(46123),p=t.n(x);function b(u,v){const{kind:g,namespace:C,name:O,title:P,description:B,displayName:L,type:I}=d(u),M=(0,s.U2)({kind:g||"unknown",namespace:C||a.oQ,name:O||"unknown"}),$=m({kind:g,namespace:C,name:O,context:v}),W=[L,P,$].find(z=>z&&typeof z=="string"),X=[W!==M?M:void 0,I,B].filter(z=>z&&typeof z=="string").join(" | ");return{entityRef:M,primaryTitle:W,secondaryTitle:X||void 0,Icon:void 0}}const h=u=>!!u&&typeof u=="string";function d(u){if(typeof u=="string"){let v=u.indexOf(":");const g=u.indexOf("/");g!==-1&&g<v&&(v=-1);const C=v===-1?void 0:u.slice(0,v),O=g===-1?void 0:u.slice(v+1,g),P=u.slice(Math.max(v+1,g+1));return{kind:C,namespace:O,name:P}}if(typeof u=="object"&&u!==null){const v=[p()(u,"kind")].find(h),g=[p()(u,"metadata.namespace"),p()(u,"namespace")].find(h),C=[p()(u,"metadata.name"),p()(u,"name")].find(h),O=[p()(u,"metadata.title")].find(h),P=[p()(u,"metadata.description")].find(h),B=[p()(u,"spec.profile.displayName")].find(h),L=[p()(u,"spec.type")].find(h);return{kind:v,namespace:g,name:C,title:O,description:P,displayName:B,type:L}}return{}}function m(u){const v=u.kind?.toLocaleLowerCase("en-US")||"unknown",g=u.namespace||a.oQ,C=u.name||"unknown",O=u.context?.defaultKind?.toLocaleLowerCase("en-US"),P=u.context?.defaultNamespace?.toLocaleLowerCase("en-US");let B=C;return(P&&g.toLocaleLowerCase("en-US")!==P||g!==a.oQ)&&(B=`${g}/${B}`),O&&v.toLocaleLowerCase("en-US")!==O&&(B=`${v}:${B}`),B}},3169:(H,S,t)=>{"use strict";t.d(S,{f:()=>d});var s=t(6820),a=t(72427),x=t(14041),p=t(82292),b=t(88083);function h(m,u,v){const[g,C]=(0,x.useState)(m);return(0,x.useEffect)(()=>{C(m);const O=u?.subscribe({next:P=>{C(P)},complete:()=>{O?.unsubscribe()}});return()=>{O?.unsubscribe()}},v),g}function d(m,u){const g=(0,a.Q2)().get(p.n),C=[g,JSON.stringify(m),JSON.stringify(u||null)],O=(0,x.useMemo)(()=>{if(!g){const P=(0,b.T)(m,u);return{snapshot:P,promise:Promise.resolve(P)}}return g.forEntity(typeof m=="string"||"metadata"in m?m:(0,s.U2)(m),u)},C);return h(O.snapshot,O.update$,[O])}},18:(H,S,t)=>{"use strict";t.d(S,{a:()=>a});var s=t(55309);const a=(0,s.y)({id:"catalog-react.starred-entities"})},22995:(H,S,t)=>{"use strict";t.d(S,{Q:()=>z});var s=t(31085),a=t(10394),x=t(72501),p=t(4321),b=t(87263),h=t(16249),d=t(33145),m=t(58837),u=t(87051),v=t(12398),g=t(6924),C=t(20577),O=t(14041),P=t(45250),B=t.n(P),L=t(53373),I=t.n(L);const M=(0,m.A)(Y=>({root:{margin:Y.spacing(1,0)},label:{position:"relative",fontWeight:"bold",fontSize:Y.typography.body2.fontSize,fontFamily:Y.typography.fontFamily,color:Y.palette.text.primary,"& > span":{top:0,left:0,position:"absolute"}}}),{name:"BackstageAutocomplete"}),$=(0,u.A)(Y=>(0,v.A)({root:{},paper:{margin:0},hasClearIcon:{},hasPopupIcon:{},focused:{},inputRoot:{marginTop:24,backgroundColor:Y.palette.background.paper,"$root$hasClearIcon$hasPopupIcon &":{paddingBlock:Y.spacing(.75),paddingInlineStart:Y.spacing(.75)},"$root$focused &":{outline:"none"},"$root &:hover > fieldset":{borderColor:"#ced4da"},"$root$focused & > fieldset":{borderWidth:1,borderColor:Y.palette.primary.main}},popupIndicator:{padding:0,margin:0,color:"#616161","&:hover":{backgroundColor:"unset"},'& [class*="MuiTouchRipple-root"]':{display:"none"}},endAdornment:{"$root$hasClearIcon$hasPopupIcon &":{right:4}},input:{"$root$hasClearIcon$hasPopupIcon &":{fontSize:Y.typography.body1.fontSize,paddingBlock:Y.spacing(.8125)}}}),{name:"BackstageAutocompleteBase"})(C.Ay),W=Y=>(0,s.jsx)(b.A,{...Y,transition:!0,placement:"bottom-start",children:({TransitionProps:K})=>(0,s.jsx)(d.A,{...K,style:{transformOrigin:"0 0 0"},children:(0,s.jsx)(a.A,{children:Y.children})})}),X=Y=>(0,s.jsx)(p.A,{...Y,elevation:8});function z(Y){const{label:K,name:dt,LabelProps:G,TextFieldProps:Q,...J}=Y,ct=M(),pt=(0,O.useCallback)(At=>(0,s.jsx)(h.A,{...(0,P.merge)(At,Q),variant:"outlined"}),[Q]),yt=(0,s.jsx)($,{size:"small",...J,renderInput:J.renderInput??pt,popupIcon:(0,s.jsx)(g.A,{"data-testid":`${dt}-expand`}),PaperComponent:X,PopperComponent:W});return(0,s.jsx)(a.A,{className:ct.root,children:K?(0,s.jsxs)(x.A,{...G,className:I()(ct.label,G?.className),component:"label",children:[(0,s.jsx)(a.A,{component:"span",children:K}),yt]}):yt})}},54203:(H,S,t)=>{"use strict";t.d(S,{GI:()=>B});var s=t(31085),a=t(14041),x=t(10394),p=t(64947),b=t(73845),h=t(42899),d=t(72501),m=t(5893),u=t(54917),v=t(65859),g=t(64630),C=t(87849);const O=L=>{const I=(0,m.A)(z=>z.breakpoints.down(L.options?.drawerBreakpoint??"md"),{noSsr:!0}),M=(0,u.A)(),[$,W]=(0,a.useState)(!1),{t:X}=(0,C.i)(g.j);return I?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{style:{marginTop:M.spacing(1),marginLeft:M.spacing(1)},onClick:()=>W(!0),startIcon:(0,s.jsx)(v.A,{}),children:X("catalogFilter.buttonTitle")}),(0,s.jsx)(b.Ay,{open:$,onClose:()=>W(!1),anchor:L.options?.drawerAnchor??"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,s.jsxs)(x.A,{m:2,children:[(0,s.jsx)(d.A,{variant:"h6",component:"h2",style:{marginBottom:M.spacing(1)},children:X("catalogFilter.title")}),L.children]})})]}):(0,s.jsx)(h.A,{item:!0,lg:2,children:L.children})},P=L=>(0,s.jsx)(h.A,{item:!0,xs:12,lg:10,children:L.children}),B=L=>(0,s.jsx)(h.A,{container:!0,style:{position:"relative"},children:L.children});B.Filters=O,B.Content=P},47144:(H,S,t)=>{"use strict";t.d(S,{y:()=>X});var s=t(31085),a=t(10394),x=t(58837),p=t(14041),b=t(72427),h=t(73466),d=t(7341),m=t(69076),u=t(86901),v=t(44148),g=t(41260);const C=(0,s.jsx)(g.A,{fontSize:"small"}),O=(0,s.jsx)(v.A,{fontSize:"small"});function P({selected:z}){return(0,s.jsx)(m.A,{icon:C,checkedIcon:O,checked:z})}const B=(0,p.memo)(z=>{const{selected:Y,value:K,availableOptions:dt,showCounts:G}=z,Q=G?`${K} (${dt?.[K]})`:K;return(0,s.jsx)(u.A,{control:(0,s.jsx)(P,{selected:Y}),label:Q,onClick:J=>J.preventDefault()})});var L=t(21405),I=t(26796),M=t(22995),$=t(45250);const W=(0,x.A)({root:{},label:{textTransform:"none",fontWeight:"bold"}},{name:"CatalogReactEntityAutocompletePicker"});function X(z){const{label:Y,name:K,path:dt,showCounts:G,Filter:Q,InputProps:J,initialSelectedOptions:ct=[],filtersForAvailableValues:pt=["kind"],hidden:yt}=z,At=W(),{updateFilters:Ot,filters:It,queryParameters:{[K]:ut}}=(0,L.nK)(),lt=(0,b.gf)(d.v),xt=pt.map(at=>It[at]),{value:gt}=(0,h.A)(async()=>{const at=dt,{facets:U}=await lt.getEntityFacets({facets:[at],filter:(0,I.Rr)(xt.filter(Boolean))});return Object.fromEntries(U[at].map(({value:V,count:rt})=>[V,rt]))},[...xt]),bt=(0,p.useMemo)(()=>[ut].flat().filter(Boolean),[ut]),Rt=It[K]?.values,[it,ft]=(0,p.useState)(bt.length?bt:Rt??ct);(0,p.useEffect)(()=>{bt.length&&ft(bt)},[bt]);const vt=Object.keys(gt??{}),st=it.length&&vt.length;(0,p.useEffect)(()=>{Ot({[K]:st?new Q(it):void 0})},[K,st,it,Q,Ot]),(0,p.useEffect)(()=>{if(!st)return;const at=Rt??[];(0,$.isEqual)(at,it)||ft(at)},[Rt]);const Et=It[K];return Et&&typeof Et=="object"&&!("values"in Et)||!vt.length||yt?null:(0,s.jsx)(a.A,{className:At.root,pb:1,pt:1,children:(0,s.jsx)(M.Q,{multiple:!0,disableCloseOnSelect:!0,label:Y,name:`${String(K)}-picker`,options:vt,value:it,TextFieldProps:J,onChange:(at,U)=>ft(U),renderOption:(at,{selected:U})=>(0,s.jsx)(B,{selected:U,value:at,availableOptions:gt,showCounts:!!G})})})}},72987:(H,S,t)=>{"use strict";t.d(S,{t:()=>Rt});var s=t(31085),a=t(6820),x=t(10394),p=t(69076),b=t(86901),h=t(72501),d=t(71677),m=t(58837),u=t(44148),v=t(41260),g=t(14041),C=t(21405),O=t(92822),P=t(92367),B=t(48108),L=t(47966),I=t(90184),M=t(72427),$=t(87290),W=t(7341);function X({enabled:it}){const ft=(0,M.gf)(W.v),[vt]=(0,g.useState)(async()=>{if(!it)return[];const st="relations.ownedBy";return ft.getEntityFacets({facets:[st]}).then(Et=>Et.facets[st].map(at=>at.value).map(at=>{const{kind:U,name:V,namespace:rt}=(0,a.KU)(at);return{apiVersion:"backstage.io/v1beta1",kind:U,metadata:{name:V,namespace:rt}}}).sort((at,U)=>at.kind.localeCompare(U.kind,"en-US")||at.metadata.namespace.localeCompare(U.metadata.namespace,"en-US")||at.metadata.name.localeCompare(U.metadata.name,"en-US"))).catch(()=>[])});return(0,$.A)(async(st,Et)=>{const at=await vt;if(!at)return{items:[]};const U=Et?.limit??20,{text:V,start:rt}=z(st),Ct=at.filter(Bt=>dt(V,Bt)),ht=rt+U;return{items:Ct.slice(0,ht),...K({entities:Ct,limit:ht,payload:{text:V,start:ht}})}},[vt],{loading:!0,value:{items:[]}})}function z(it){return Y(it)&&it.cursor?JSON.parse(atob(it.cursor)):{text:it.text||"",start:0}}function Y(it){return!!it.cursor}function K({entities:it,limit:ft,payload:vt}){return it.length>ft?{cursor:btoa(JSON.stringify(vt))}:{}}function dt(it,ft){const vt=it.trim();return ft.kind.includes(vt)||ft.metadata.namespace?.includes(vt)||ft.metadata.name.includes(vt)}function G(){const it=(0,M.gf)(W.v);return(0,$.A)(async(ft,vt)=>{const st=ft,Et=ft,at=vt?.limit??20;if(Et.cursor){const V=await it.queryEntities({cursor:Et.cursor,limit:at});return{cursor:V.pageInfo.nextCursor,items:[...Et.items,...V.items]}}const U=await it.queryEntities({fullTextFilter:{term:st.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:at});return{cursor:U.pageInfo.nextCursor,items:U.items}},[],{loading:!0})}var Q=t(76842);function J({mode:it,initialSelectedOwnersRefs:ft}){const vt=it==="owners-only",st=G(),Et=X({enabled:vt}),[at,U]=vt?Et:st;return[at,U,ct({enabled:!vt,initialSelectedOwnersRefs:ft})]}function ct({enabled:it,initialSelectedOwnersRefs:ft}){const vt=(0,g.useRef)({}),st=(0,M.gf)(W.v),[,Et]=(0,$.A)(async()=>{(await st.getEntitiesByRefs({entityRefs:ft})).items.forEach(U=>{U&&(vt.current[(0,a.U2)(U)]=U)})},[]);return(0,Q.u)(()=>{it&&ft.length>0&&Et()}),{getEntity:at=>vt.current[at],setEntity:at=>{vt.current[(0,a.U2)(at)]=at}}}var pt=t(87051),yt=t(3169),At=t(64630),Ot=t(87849),It=t(22995);const ut=(0,m.A)({root:{},label:{},input:{},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}},{name:"CatalogReactEntityOwnerPicker"}),lt=(0,pt.A)(it=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(b.A),xt=(0,s.jsx)(v.A,{fontSize:"small"}),gt=(0,s.jsx)(u.A,{fontSize:"small"});function bt(it){const ft=ut(),vt=it.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:st}=(0,yt.f)(it.entity);return(0,s.jsx)(x.A,{className:ft.fullWidth,children:(0,s.jsx)(lt,{className:ft.fullWidth,control:(0,s.jsx)(p.A,{icon:xt,checkedIcon:gt,checked:it.isSelected}),onClick:Et=>Et.preventDefault(),label:(0,s.jsx)(d.Ay,{title:st,children:(0,s.jsxs)(x.A,{display:"flex",alignItems:"center",children:[vt?(0,s.jsx)(L.A,{fontSize:"small"}):(0,s.jsx)(B.A,{fontSize:"small"}),"\xA0",(0,s.jsx)(x.A,{className:ft.boxLabel,children:(0,s.jsx)(h.A,{noWrap:!0,children:st})})]})})})})}const Rt=it=>{const ft=ut(),{mode:vt="owners-only"}=it||{},{updateFilters:st,filters:Et,queryParameters:{owners:at}}=(0,C.nK)(),[U,V]=(0,g.useState)(""),{t:rt}=(0,Ot.i)(At.j),Ct=(0,g.useMemo)(()=>[at].flat().filter(Boolean),[at]),[ht,Bt]=(0,g.useState)(Ct.length?Ct:Et.owners?.values??[]),[{value:Nt,loading:kt},Jt,Wt]=J({mode:vt,initialSelectedOwnersRefs:ht});(0,P.s)(()=>Jt({text:U}),[U,Jt],250);const Vt=Nt?.items||[];return(0,g.useEffect)(()=>{if(Ct.length){const jt=new O.N9(Ct);Bt(jt.values)}},[Ct]),(0,g.useEffect)(()=>{st({owners:ht.length?new O.N9(ht):void 0})},[ht,st]),["user","group"].includes(Et.kind?.value.toLocaleLowerCase("en-US")||"")?null:(0,s.jsx)(x.A,{className:ft.root,pb:1,pt:1,children:(0,s.jsx)(It.Q,{label:rt("entityOwnerPicker.title"),multiple:!0,disableCloseOnSelect:!0,loading:kt,options:Vt,value:ht,getOptionSelected:(jt,Gt)=>typeof Gt=="string"?(0,a.U2)(jt)===Gt:jt===Gt,getOptionLabel:jt=>{const Gt=typeof jt=="string"?Wt.getEntity(jt)||(0,a.KU)(jt,{defaultKind:"group",defaultNamespace:"default"}):jt;return(0,I.Z)(Gt,(0,I.S)(Gt))},onChange:(jt,Gt)=>{V(""),Bt(Gt.map(ce=>{const he=typeof ce=="string"?ce:(0,a.U2)(ce);return typeof ce!="string"&&Wt.setEntity(ce),he}))},filterOptions:jt=>jt,renderOption:(jt,{selected:Gt})=>(0,s.jsx)(bt,{entity:jt,isSelected:Gt}),name:"owner-picker",onInputChange:(jt,Gt)=>{V(Gt)},ListboxProps:{onScroll:jt=>{const Gt=jt.currentTarget;Math.abs(Gt.scrollHeight-Gt.clientHeight-Gt.scrollTop)<1&&Nt?.cursor&&Jt({items:Nt.items,cursor:Nt.cursor})},"data-testid":"owner-picker-listbox"},LabelProps:{className:ft.label},TextFieldProps:{className:ft.input}})})}},8859:(H,S,t)=>{"use strict";t.d(S,{z:()=>C});var s=t(31085),a=t(72072),x=t(9222),p=t(14041),b=t(29207),h=t(10394),d=t(71677),m=t(58837),u=t(3169);const v=(0,m.A)(P=>({root:{display:"inline-flex",alignItems:"center",textDecoration:"inherit"},icon:{marginRight:P.spacing(.5),color:P.palette.text.secondary,"& svg":{verticalAlign:"middle"}}}),{name:"CatalogReactEntityDisplayName"}),g=P=>{const{entityRef:B,hideIcon:L,disableTooltip:I,defaultKind:M,defaultNamespace:$}=P,W=v(),{primaryTitle:X,secondaryTitle:z,Icon:Y}=(0,u.f)(B,{defaultKind:M,defaultNamespace:$});let K=(0,s.jsx)(s.Fragment,{children:X});return K=(0,s.jsxs)(h.A,{component:"span",className:W.root,children:[Y&&!L?(0,s.jsx)(h.A,{component:"span",className:W.icon,children:(0,s.jsx)(Y,{fontSize:"inherit"})}):null,K]}),z&&!I&&(K=(0,s.jsx)(d.Ay,{enterDelay:1500,title:z,children:K})),K},C=(0,p.forwardRef)((P,B)=>{const{entityRef:L,defaultKind:I,defaultNamespace:M,title:$,children:W,hideIcon:X,disableTooltip:z,...Y}=P,K=O(P.entityRef),dt=W??$??(0,s.jsx)(g,{entityRef:L,defaultKind:I,defaultNamespace:M,hideIcon:X,disableTooltip:z});return(0,s.jsx)(a.N_,{...Y,ref:B,to:K,children:dt})});function O(P){const B=(0,x.S)(b.s),L=(0,b.$)(P,{encodeParams:!0});return B(L)}},34428:(H,S,t)=>{"use strict";t.d(S,{i:()=>b});var s=t(31085),a=t(6820),x=t(14041),p=t(8859);function b(h){const{entityRefs:d,hideIcons:m,...u}=h;return(0,s.jsx)(s.Fragment,{children:d.map((v,g)=>{const C=typeof v=="string"?v:(0,a.U2)(v);return(0,s.jsxs)(x.Fragment,{children:[g>0&&", ",(0,s.jsx)(p.z,{...u,entityRef:v,hideIcon:m})]},`${g}.${C}`)})})}},90184:(H,S,t)=>{"use strict";t.d(S,{S:()=>p,Z:()=>b});var s=t(72348),a=t(46123),x=t.n(a);function p(h,d){const m=d?.defaultKind;let u,v,g;return"metadata"in h?(u=h.kind,v=h.metadata.namespace,g=h.metadata.name):(u=h.kind,v=h.namespace,g=h.name),(v===void 0||v==="")&&(v=s.oQ),d?.defaultNamespace!==void 0?d?.defaultNamespace===v&&(v=void 0):v===s.oQ&&(v=void 0),u=u.toLocaleLowerCase("en-US"),u=m&&m.toLocaleLowerCase("en-US")===u?void 0:u,`${u?`${u}:`:""}${v?`${v}/`:""}${g}`}function b(h,d){for(const m of["spec.profile.displayName","metadata.title"]){const u=x()(h,m);if(u&&typeof u=="string")return u}return d}},91035:(H,S,t)=>{"use strict";t.d(S,{m:()=>m});var s=t(31085),a=t(58837),x=t(92822),p=t(47144),b=t(64630),h=t(87849);const d=(0,a.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),m=u=>{const v=d(),{t:g}=(0,h.i)(b.j);return(0,s.jsx)(p.y,{label:g("entityTagPicker.title"),name:"tags",path:"metadata.tags",Filter:x.q_,showCounts:u.showCounts,InputProps:{className:v.input},initialSelectedOptions:u.initialFilter?u.initialFilter:[],hidden:u.hidden})}},67626:(H,S,t)=>{"use strict";t.d(S,{y:()=>It});var s=t(31085),a=t(72427),x=t(65461),p=t(40703),b=t(58007),h=t(68804),d=t(65569),m=t(5951),u=t(26343),v=t(72501),g=t(58837),C=t(9684),O=t(31129),P=t(14041),B=t(92822),L=t(21405),I=t(16009),M=t(45250),$=t(73466),W=t(7341),X=t(26796),z=t(87290),Y=t(48899);function K(){const ut=(0,a.gf)(I.K),lt=(0,a.gf)(W.v),{filters:xt}=(0,L.nK)(),{value:gt,loading:bt}=(0,$.A)(async()=>(await ut.getBackstageIdentity()).ownershipEntityRefs,[]),{user:Rt,owners:it,...ft}=xt,{orderFields:vt,...st}=(0,X.$3)((0,M.compact)(Object.values(ft))),[{value:Et,loading:at},U]=(0,z.A)(async rt=>{const Ct=dt(rt.owners,rt.ownershipEntityRefs);if(Ct===void 0)return 0;const{["metadata.name"]:ht,...Bt}=rt.filter.filter,{totalItems:Nt}=await lt.queryEntities({...rt.filter,filter:{...Bt,"relations.ownedBy":Ct},limit:0});return Nt},[],{loading:!0});return(0,Y.A)(()=>{Object.keys(st.filter).length!==0&&gt!==void 0&&U({ownershipEntityRefs:gt,owners:it,filter:st})},[gt,it,st]),{count:Et,loading:bt||at,filter:(0,P.useMemo)(()=>B.tN.owned(gt??[]),[gt]),ownershipEntityRefs:gt}}function dt(ut,lt){if(lt===void 0)return;const xt=ut?.values??[];if(xt.length){const gt=(0,M.intersection)(xt,lt);return gt.length===0?void 0:gt}return lt}function G(){const ut=(0,a.gf)(W.v),{filters:lt}=(0,L.nK)(),xt=(0,P.useRef)(),gt=(0,P.useMemo)(()=>{const{user:it,...ft}=lt,vt=(0,M.compact)(Object.values(ft)),{orderFields:st,...Et}=(0,X.$3)(vt),at={...Et,limit:0};return Object.keys(Et.filter).length===0?(xt.current=void 0,xt.current):(0,M.isEqual)(at,xt.current)?xt.current:(xt.current=at,at)},[lt]),{value:bt,loading:Rt}=(0,$.A)(async()=>{if(gt===void 0)return 0;const{totalItems:it}=await ut.queryEntities(gt);return it},[gt]);return{count:bt,loading:Rt}}var Q=t(6820),J=t(56889);function ct(){const ut=(0,a.gf)(W.v),{filters:lt}=(0,L.nK)(),{starredEntities:xt}=(0,J.I)(),gt=(0,P.useRef)(),bt=(0,P.useMemo)(()=>{const{user:vt,...st}=lt,Et=(0,M.compact)(Object.values(st)),{orderFields:at,...U}=(0,X.$3)(Et),rt={...U,filter:{...U.filter,["metadata.name"]:Array.from(xt).map(Ct=>(0,Q.KU)(Ct).name)},limit:1e3};return(0,M.isEqual)(rt,gt.current)?gt.current:(gt.current=rt,rt)},[lt,xt]),{value:Rt,loading:it}=(0,$.A)(async()=>xt.size?(await ut.queryEntities(bt)).items.map(st=>(0,Q.U2)({kind:st.kind,namespace:st.metadata.namespace,name:st.metadata.name})).filter(st=>xt.has(st)).length:0,[bt,xt]),ft=(0,P.useMemo)(()=>B.tN.starred(Array.from(xt)),[xt]);return{count:Rt,loading:it,filter:ft}}var pt=t(87849),yt=t(64630);const At=(0,g.A)(ut=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:ut.spacing(1,0,1,0)},title:{margin:ut.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:ut.palette.text.primary},menuItem:{minHeight:ut.spacing(6)},groupWrapper:{margin:ut.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Ot(ut,lt){return[{name:lt("userListPicker.personalFilter.title"),items:[{id:"owned",label:lt("userListPicker.personalFilter.ownedLabel"),icon:C.A},{id:"starred",label:lt("userListPicker.personalFilter.starredLabel"),icon:O.Gg}]},{name:ut,items:[{id:"all",label:lt("userListPicker.orgFilterAllLabel")}]}]}const It=ut=>{const{initialFilter:lt,availableFilters:xt,hidden:gt,alwaysKeepFilters:bt}=ut,Rt=At(),it=(0,a.gf)(x.U),{t:ft}=(0,pt.i)(yt.j),vt=it.getOptionalString("organization.name")??ft("userListPicker.defaultOrgName"),{filters:st,updateFilters:Et,queryParameters:{kind:at,user:U}}=(0,L.nK)(),V=["starred","all"],rt=Ot(vt,ft).map(Kt=>({...Kt,items:Kt.items.filter(({id:ne})=>["group","user"].some(le=>le===at)?V.includes(ne):!xt||xt.includes(ne))})).filter(({items:Kt})=>!!Kt.length),{count:Ct,loading:ht,filter:Bt}=K(),{count:Nt}=G(),{count:kt,filter:Jt,loading:Wt}=ct(),Vt=(0,P.useMemo)(()=>[U].flat()[0],[U]),[jt,Gt]=(0,P.useState)(Vt??lt),ce=(0,P.useMemo)(()=>({all:Nt,starred:kt,owned:Ct}),[kt,Ct,Nt]);(0,P.useEffect)(()=>{Vt&&Gt(Vt)},[Vt]);const he=ht||Wt;return(0,P.useEffect)(()=>{!he&&jt&&jt!=="all"&&ce[jt]===0&&!bt&&Gt("all")},[he,ce,jt,Gt,bt]),(0,P.useEffect)(()=>{if(!jt||he)return;Et({user:jt==="owned"?Bt:jt==="starred"?Jt:B.tN.all()})},[jt,Jt,Bt,Et,he]),gt?null:(0,s.jsx)(p.A,{className:Rt.root,children:rt.map(Kt=>(0,s.jsxs)(P.Fragment,{children:[(0,s.jsx)(v.A,{variant:"subtitle2",component:"span",className:Rt.title,children:Kt.name}),(0,s.jsx)(p.A,{className:Rt.groupWrapper,children:(0,s.jsx)(b.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":Kt.name,children:Kt.items.map((ne,le)=>(0,s.jsxs)(u.A,{role:"none presentation",divider:le!==Kt.items.length-1,onClick:()=>Gt(ne.id),selected:ne.id===st.user?.value,className:Rt.menuItem,disabled:ce[ne.id]===0,"data-testid":`user-picker-${ne.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[ne.icon&&(0,s.jsx)(h.A,{className:Rt.listIcon,children:(0,s.jsx)(ne.icon,{fontSize:"small"})}),(0,s.jsx)(m.A,{children:(0,s.jsxs)(v.A,{variant:"body1",children:[ne.label," "]})}),(0,s.jsx)(d.A,{children:ce[ne.id]??"-"})]},ne.id))})})]},Kt.name))})}},92822:(H,S,t)=>{"use strict";t.d(S,{I5:()=>u,Kf:()=>O,N9:()=>m,V3:()=>d,gM:()=>p,gZ:()=>C,mT:()=>P,qA:()=>b,q_:()=>h,tN:()=>g,z:()=>v});var s=t(6820),a=t(51372),x=t(67871);class p{value;label;constructor(I,M){this.value=I,this.label=M}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class b{value;constructor(I){this.value=I}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class h{values;constructor(I){this.values=I}filterEntity(I){return this.values.every(M=>(I.metadata.tags??[]).includes(M))}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}}class d{value;constructor(I){this.value=I}filterEntity(I){const M=this.toUpperArray(this.value.split(/\s/)),$=this.toUpperArray([I.metadata.tags]),W=this.toUpperArray([I.metadata.name,I.metadata.title,I.spec?.profile?.displayName]);for(const X of M)if($.every(z=>z!==X)&&W.every(z=>!z.includes(X)))return!1;return!0}getFullTextFilters(){return{term:this.value,fields:["metadata.name","metadata.title","spec.profile.displayName"]}}toQueryValue(){return this.value}toUpperArray(I){return I.flat().filter(M=>!!M).map(M=>M.toLocaleUpperCase("en-US"))}}class m{values;constructor(I){this.values=I.reduce((M,$)=>{try{return M.push((0,s.U2)((0,s.KU)($,{defaultKind:"Group"}))),M}catch{return M}},[])}getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(I){return this.values.some(M=>(0,x.t)(I,a.vv).some($=>(0,s.U2)($)===M))}toQueryValue(){return this.values}}class u{values;constructor(I){this.values=I}getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(I){return this.values.some(M=>I.spec?.lifecycle===M)}toQueryValue(){return this.values}}class v{values;constructor(I){this.values=I}getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(I){return this.values.some(M=>I.metadata.namespace===M)}toQueryValue(){return this.values}}class g{value;refs;constructor(I,M){this.value=I,this.refs=M}static owned(I){return new g("owned",I)}static all(){return new g("all")}static starred(I){return new g("starred",I)}getCatalogFilters(){return this.value==="owned"?{"relations.ownedBy":this.refs??[]}:this.value==="starred"?{"metadata.name":this.refs?.map(I=>(0,s.KU)(I).name)??[]}:{}}filterEntity(I){if(this.value==="starred")return this.refs?.includes((0,s.U2)(I))??!0;if(this.value==="owned"){const M=(0,x.t)(I,a.vv);return this.refs?.some($=>M.some(W=>(0,s.U2)(W)===$))??!1}return!0}toQueryValue(){return this.value}}class C{value;isOwnedEntity;isStarredEntity;constructor(I,M,$){this.value=I,this.isOwnedEntity=M,this.isStarredEntity=$}filterEntity(I){switch(this.value){case"owned":return this.isOwnedEntity(I);case"starred":return this.isStarredEntity(I);default:return!0}}toQueryValue(){return this.value}}class O{value;constructor(I){this.value=I}getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(I){const M=I.metadata.annotations?.["backstage.io/orphan"];return M!==void 0&&this.value.toString()===M}}class P{value;constructor(I){this.value=I}filterEntity(I){const M=I?.status?.items?.length>0;return M!==void 0&&this.value===M}}class B{values;constructor(I){this.values=I}getOrderFilters(){return this.values.map(([I,M])=>({field:I,order:M}))}toQueryValue(){return this.values.flat()}}},21405:(H,S,t)=>{"use strict";t.d(S,{B9:()=>B,nK:()=>L});var s=t(31085),a=t(45250),x=t.n(a),p=t(45810),b=t.n(p),h=t(14041),d=t(18690),m=t(87290),u=t(22771),v=t(71581),g=t(7341),C=t(26796),O=t(72427);const P=(0,h.createContext)(void 0),B=I=>{const M=(0,v.A)(),$=(0,O.gf)(g.v),[W,X]=(0,h.useState)({}),z=(0,d.zy)(),K=I.pagination===!0?"cursor":typeof I.pagination=="object"?I.pagination.mode??"cursor":"none",dt=typeof I.pagination=="object"?I.pagination.limit??20:20,{queryParameters:G,cursor:Q,offset:J,limit:ct}=(0,h.useMemo)(()=>{const st=b().parse(z.search,{ignoreQueryPrefix:!0});let Et=dt;if(typeof st.limit=="string"){const U=Number.parseInt(st.limit,10);isNaN(U)||(Et=U)}const at=typeof st.offset=="string"&&K==="offset"?Number.parseInt(st.offset,10):void 0;return{queryParameters:st.filters??{},cursor:typeof st.cursor=="string"&&K==="cursor"?st.cursor:void 0,offset:K==="offset"&&at&&!isNaN(at)?at:void 0,limit:Et}},[K,z.search,dt]),[pt,yt]=(0,h.useState)(Q),[At,Ot]=(0,h.useState)(J),[It,ut]=(0,h.useState)(ct),[lt,xt]=(0,h.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:{},offset:At,limit:It})),[{loading:gt,error:bt},Rt]=(0,m.A)(async()=>{const st=W.kind?.value?.toLocaleLowerCase("en-US"),Et=st==="user"||st==="group"?{...W,owners:void 0}:W,at=(0,a.compact)(Object.values(Et)),U=Object.keys(W).reduce((V,rt)=>{const Ct=W[rt];return Ct?.toQueryValue&&(V[rt]=Ct.toQueryValue()),V},{});if(K!=="none")if(pt){if(pt!==lt.appliedCursor){const V=(0,C.be)(at),rt=await $.queryEntities({cursor:pt,limit:It});xt({appliedFilters:W,appliedCursor:pt,backendEntities:rt.items,entities:rt.items.filter(V),pageInfo:rt.pageInfo,totalItems:rt.totalItems})}}else{const V=(0,C.be)(at),rt=(0,C.$3)(at),Ct=(0,C.$3)((0,a.compact)(Object.values(lt.appliedFilters)));if(K==="offset"&&(lt.limit!==It||lt.offset!==At)||!(0,a.isEqual)(Ct,rt)){const ht=await $.queryEntities({...rt,limit:It,offset:At});xt({appliedFilters:W,backendEntities:ht.items,entities:ht.items.filter(V),pageInfo:ht.pageInfo,totalItems:ht.totalItems,limit:It,offset:At})}}else{const V=(0,C.be)(at),rt=(0,C.Rr)(at),Ct=(0,C.Rr)((0,a.compact)(Object.values(lt.appliedFilters)));if((0,a.isEqual)(Ct,rt)){const ht=lt.backendEntities.filter(V);xt({appliedFilters:W,backendEntities:lt.backendEntities,entities:ht,totalItems:ht.length})}else{const ht=await $.getEntities({filter:rt}),Bt=ht.items.filter(V);xt({appliedFilters:W,backendEntities:ht.items,entities:Bt,totalItems:Bt.length})}}if(M()){const V=b().parse(z.search,{ignoreQueryPrefix:!0}),rt=b().stringify({...V,filters:U,cursor:pt,offset:At,limit:It},{addQueryPrefix:!0,arrayFormat:"repeat"}),Ct=`${window.location.pathname}${rt}`;window.history?.replaceState(null,document.title,Ct)}},[$,G,W,lt,pt,K,It,At],{loading:!0});(0,u.A)(Rt,10,[W,pt,It,At]);const it=(0,h.useCallback)(st=>{K==="cursor"?yt(void 0):K==="offset"&&Ot(0),X(Et=>{const at=typeof st=="function"?st(Et):st;return{...Et,...at}})},[K]),ft=(0,h.useMemo)(()=>{if(K!=="cursor")return;const st=lt.pageInfo?.prevCursor,Et=lt.pageInfo?.nextCursor;return{prev:st?()=>yt(st):void 0,next:Et?()=>yt(Et):void 0}},[K,lt.pageInfo]),vt=(0,h.useMemo)(()=>({filters:lt.appliedFilters,entities:lt.entities,backendEntities:lt.backendEntities,updateFilters:it,queryParameters:G,loading:gt,error:bt,pageInfo:ft,totalItems:lt.totalItems,limit:It,offset:At,setLimit:ut,setOffset:Ot,paginationMode:K}),[lt,it,G,gt,bt,ft,It,At,K,ut,Ot]);return(0,s.jsx)(P.Provider,{value:vt,children:I.children})};function L(){const I=(0,h.useContext)(P);if(!I)throw new Error("useEntityList must be used within EntityListProvider");return I}},56889:(H,S,t)=>{"use strict";t.d(S,{I:()=>d});var s=t(6820),a=t(72427),x=t(14041),p=t(1394),b=t(18);function h(m){return typeof m=="string"?m:(0,s.U2)(m)}function d(){const m=(0,a.gf)(b.a),u=(0,p.A)((0,x.useMemo)(()=>m.starredEntitie$(),[m]),new Set),v=(0,x.useCallback)(C=>u.has(h(C)),[u]),g=(0,x.useCallback)(C=>m.toggleStarred(h(C)).then(),[m]);return{starredEntities:u,toggleStarredEntity:g,isStarredEntity:v}}},29207:(H,S,t)=>{"use strict";t.d(S,{$:()=>h,s:()=>b});var s=t(6820),a=t(72348),x=t(34569),p=t(63544);const b=(0,p.Q)("catalog:entity-route-ref",()=>(0,x.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function h(d,m){let u,v,g;if(typeof d=="string"){const O=(0,s.KU)(d);u=O.kind,v=O.namespace,g=O.name}else"metadata"in d?(u=d.kind,v=d.metadata.namespace,g=d.metadata.name):(u=d.kind,v=d.namespace,g=d.name);u=u.toLocaleLowerCase("en-US"),v=v?.toLocaleLowerCase("en-US")??a.oQ;const{encodeParams:C=!1}=m||{};return C&&(u=encodeURIComponent(u),v=encodeURIComponent(v),g=encodeURIComponent(g)),{kind:u,namespace:v,name:g}}},64630:(H,S,t)=>{"use strict";t.d(S,{j:()=>a});var s=t(93184);const a=(0,s.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,S,t)=>{"use strict";t.d(S,{$3:()=>p,Rr:()=>b,be:()=>h});var s=t(92822);function a(d){return!!d.getFullTextFilters}function x(d){return!!d.getOrderFilters}function p(d){const m=d.reduce((g,C)=>({...g,...C.getCatalogFilters?C.getCatalogFilters():{}}),{}),u=d.find(a)?.getFullTextFilters(),v=d.find(x)?.getOrderFilters()||[{field:"metadata.name",order:"asc"}];return{filter:m,fullTextFilter:u,orderFields:v}}function b(d){const m={};return d.forEach(u=>{u instanceof s.q_||u instanceof s.N9||u instanceof s.I5||u instanceof s.z||u instanceof s.tN||u instanceof s.Kf||u instanceof s.V3||u instanceof s.gZ||Object.assign(m,u.getCatalogFilters?.()||{})}),m}function h(d){return m=>d.every(u=>!u.filterEntity||u.filterEntity(m))}},67871:(H,S,t)=>{"use strict";t.d(S,{t:()=>a});var s=t(6820);function a(x,p,b){let h=x?.relations?.filter(d=>d.type===p).map(d=>(0,s.KU)(d.targetRef))||[];return b?.kind&&(h=h.filter(d=>d.kind.toLocaleLowerCase("en-US")===b.kind.toLocaleLowerCase("en-US"))),h}},95203:(H,S,t)=>{"use strict";t.d(S,{qP:()=>h,Zg:()=>m,rQ:()=>v,pS:()=>u,UJ:()=>d});var s=t(59598);class a{id;params;optional;defaultTarget;[p=s.b];constructor(C,O,P,B){this.id=C,this.params=O,this.optional=P,this.defaultTarget=B,this[p]="external"}toString(){return`routeRef{type=external,id=${this.id}}`}getDefaultTarget(){return this.defaultTarget}}function x(g){return new a(g.id,g.params??[],!!g.optional,g?.defaultTarget)}var p,b=t(34569);const h=x({id:"create-component",optional:!0,defaultTarget:"scaffolder.createComponent"}),d=x({id:"view-techdoc",optional:!0,params:["namespace","kind","name"],defaultTarget:"techdocs.docRoot"}),m=x({id:"create-from-template",optional:!0,params:["namespace","templateName"],defaultTarget:"scaffolder.selectedTemplate"}),u=x({id:"catalog:unregister-redirect",optional:!0}),v=(0,b.H)({id:"catalog"})},13646:(H,S,t)=>{"use strict";t.d(S,{OL:()=>a});function s(m,u){return m.name===u.name}function a(m,u){return"resourceType"in m?!u||m.resourceType===u:!1}function x(m){return m.attributes.action==="create"}function p(m){return m.attributes.action==="read"}function b(m){return m.attributes.action==="update"}function h(m){return m.attributes.action==="delete"}function d(m){return{authorize:async(u,v)=>await m.authorize(u,v),authorizeConditional(u,v){const g=u;return m.authorize(g,v)}}}},54241:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});var s=function(a){return a.DENY="DENY",a.ALLOW="ALLOW",a.CONDITIONAL="CONDITIONAL",a}({})},96824:(H,S,t)=>{"use strict";t.d(S,{x:()=>a});var s=t(55309);const a=(0,s.y)({id:"plugin.permission.api"})},70734:(H,S,t)=>{"use strict";t.d(S,{e:()=>b});var s=t(31085),a=t(14041),x=t(58837);const p=(0,x.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),b=h=>{const{text:d,preTag:m,postTag:u}=h,v=p(),g=(0,a.useMemo)(()=>d.split(new RegExp(`(${m}.+?${u})`)),[u,m,d]);return(0,s.jsx)(s.Fragment,{children:g.map((C,O)=>C.includes(m)?(0,s.jsx)("mark",{className:v.highlight,children:C.replace(new RegExp(`${m}|${u}`,"g"),"")},O):C)})}},54560:(H,S,t)=>{"use strict";t.d(S,{ec:()=>u});var s=t(31085),a=t(14041),x=t(93368),p=t(88758),b=t(8109);const h="search.results.list.items.extensions.v1",d=(C,O)=>{for(const P of C)if(!(!isValidElement(P)||!getComponentData(P,h)?.(O)))return cloneElement(P,{rank:O.rank,highlight:O.highlight,result:O.document,...P.props});return null},m=C=>{const{rank:O,result:P,noTrack:B,children:L,alignItems:I="flex-start",...M}=C,$=(0,x.s)(),W=(0,a.useCallback)(()=>{B||P&&$.captureEvent("discover",P.title,{attributes:{to:P.location},value:O})},[O,P,B,$]);return(0,s.jsx)(b.A,{divider:!0,alignItems:I,onClickCapture:W,...M,children:L})},u=C=>{const{name:O,component:P,predicate:B=()=>!0}=C;return(0,p.zZ)({name:O,component:{lazy:()=>P().then(L=>I=>(0,s.jsx)(m,{rank:I.rank,result:I.result,noTrack:I.noTrack,children:(0,a.createElement)(L,I)}))},data:{[h]:B}})},v=C=>{const O=useElementFilter(C,P=>P.selectByComponentData({key:h}).getElements(),[C]);return useCallback((P,B)=>{const L=d(O,P);return _jsx(Fragment,{children:L??_jsx(m,{rank:P.rank,result:P.document,children:_jsx(DefaultResultListItem,{rank:P.rank,highlight:P.highlight,result:P.document})})},B)},[O])},g=C=>{const{results:O,children:P,...B}=C,L=v(P);return _jsx(List,{...B,children:O.map(L)})}},86202:(H,S,t)=>{"use strict";t.d(S,{As:()=>s,GO:()=>a,qH:()=>x});const s="backstage.io/techdocs-ref",a="backstage.io/techdocs-entity",x="backstage.io/techdocs-entity-path"},72020:(H,S,t)=>{"use strict";t.d(S,{AF:()=>m,Hr:()=>g,Wm:()=>d,YR:()=>B,po:()=>u});var s=t(31085),a=t(14041),x=t(18690),p=t(19402),b=t(88758),h=t(82442);const d="techdocs.addons.addon.v1",m="techdocs.addons.wrapper.v1",u=()=>null;(0,p.h)(u,m,!0);const v=L=>`${d}.${L.toLocaleLowerCase("en-US")}`;function g(L){const{name:I,component:M}=L;return(0,b.zZ)({name:I,component:{sync:$=>(0,s.jsx)(M,{...$})},data:{[d]:L,[v(I)]:!0}})}const C=(L,I)=>L.selectByComponentData({key:I}).getElements()[0],O=L=>L.selectByComponentData({key:m}).selectByComponentData({key:d}),P=L=>L.selectByComponentData({key:m}).findComponentData({key:d}),B=()=>{const L=(0,x.P1)(),I=(0,h.O)(L,O),M=(0,h.O)(L,P),$=(0,a.useCallback)(z=>{if(!I||!z)return null;const Y=v(z.name);return C(I,Y)??null},[I]),W=(0,a.useCallback)(z=>{const Y=M.find(K=>K.name===z);return Y?$(Y):null},[M,$]),X=(0,a.useCallback)(z=>{const Y=M.filter(K=>K.location===z);return Y.length?Y.map($):null},[M,$]);return{renderComponentByName:W,renderComponentsByLocation:X}}},26679:(H,S,t)=>{"use strict";t.d(S,{l:()=>a,s:()=>x});var s=t(55309);const a=(0,s.y)({id:"plugin.techdocs.service"}),x=(0,s.y)({id:"plugin.techdocs.storageservice"})},88572:(H,S,t)=>{"use strict";t.d(S,{R:()=>L,V:()=>I});var s=t(31085),a=t(14041),x=t(73466),p=t(28966),b=t(6820),h=t(43836),d=t(10602),m=t(72427),u=t(65461),v=t(25862),g=t(26679),C=t(65614);const O=(M,$)=>(0,b.U2)(M)===(0,b.U2)($),P={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},B=(0,h.tK)("techdocs-reader-page-context"),L=(0,a.memo)(M=>{const{entityRef:$,children:W}=M,X=(0,m.gf)(g.l),z=(0,m.gf)(u.U),Y=(0,x.A)(async()=>X.getEntityMetadata($),[$]),K=(0,p.A)(async()=>X.getTechDocsMetadata($),[$]),[dt,G]=(0,a.useState)(P.title),[Q,J]=(0,a.useState)(P.subtitle),[ct,pt]=(0,a.useState)(P.shadowRoot);(0,a.useEffect)(()=>{ct&&!K.value&&!K.loading&&K.retry()},[K.value,K.loading,ct,K.retry,K]);const yt={metadata:K,entityRef:(0,C.Lf)($,z),entityMetadata:Y,shadowRoot:ct,setShadowRoot:pt,title:dt,setTitle:G,subtitle:Q,setSubtitle:J},At=(0,d.B)({1:yt});return(0,s.jsx)(v.Ig,{attributes:{entityRef:(0,b.U2)($)},children:(0,s.jsx)(B.Provider,{value:At,children:W instanceof Function?W(yt):W})})},(M,$)=>O(M.entityRef,$.entityRef)),I=()=>{const M=(0,a.useContext)(B);if(M===void 0)return P;const $=M.atVersion(1);if($===void 0)throw new Error("No context found for version 1.");return $}},65614:(H,S,t)=>{"use strict";t.d(S,{Lf:()=>x,b1:()=>b,oN:()=>p});var s=t(6820),a=t(86202);function x(h,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(h.kind=h.kind.toLocaleLowerCase(),h.name=h.name.toLocaleLowerCase(),h.namespace=h.namespace.toLocaleLowerCase()),h}function p(h){let d=h.metadata.annotations?.[a.qH];return d?(d.startsWith("/")||(d=`/${d}`),d):""}const b=(h,d)=>{if(!d)return;let{namespace:m,kind:u,name:v}=(0,s.sM)(h);if(h.metadata.annotations?.[a.GO])try{const O=(0,s.KU)(h.metadata.annotations?.[a.GO]);m=O.namespace,u=O.kind,v=O.name}catch{}const g=d({namespace:m,kind:u,name:v}),C=p(h);return`${g}${C}`}},99730:(H,S,t)=>{"use strict";t.d(S,{e:()=>s});const s=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},95768:(H,S,t)=>{"use strict";t.d(S,{V:()=>s});function s(a,x){return x.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?a:a.toLocaleLowerCase("en-US")}},8915:(H,S,t)=>{"use strict";t.d(S,{K:()=>It});var s=t(31085),a=t(59428),x=t(27586),p=t(26280),b=t(21405),h=t(54203),d=t(67626),m=t(72987),u=t(91035),v=t(81859),g=t(14041),C=t(86519),O=t(86202);class P{getCatalogFilters(){return{[`metadata.annotations.${O.As}`]:C.c}}}const B=()=>{const{updateFilters:ut}=(0,b.nK)();return(0,g.useEffect)(()=>{ut({techdocs:new P})},[ut]),null};var L=t(36338),I=t(45250),M=t(88640),$=t(77310),W=t(9222),X=t(72427),z=t(65461),Y=t(56889),K=t(27125),dt=t(14209),G=t(92822);function Q(ut){const{actions:lt,columns:xt,data:gt,isLoading:bt,options:Rt}=ut,{updateFilters:it,setLimit:ft,setOffset:vt,limit:st,totalItems:Et,offset:at}=(0,b.nK)(),[U,V]=(0,g.useState)(at&&st?Math.floor(at/st):0);return(0,g.useEffect)(()=>{Et&&U*st>=Et?vt(Math.max(0,Et-st)):vt(Math.max(0,U*st))},[vt,U,st,Et]),(0,s.jsx)(dt.X,{columns:xt,data:gt,options:{paginationPosition:"both",pageSizeOptions:[5,10,20,50,100],pageSize:st,emptyRowsWhenPaging:!1,actionsColumnIndex:-1,...Rt},actions:lt,onSearchChange:rt=>it({text:rt?new G.V3(rt):void 0}),page:U,onPageChange:rt=>{V(rt)},onRowsPerPageChange:rt=>{ft(rt)},totalCount:Et,localization:{pagination:{labelDisplayedRows:""}},isLoading:bt})}function J(ut){const{actions:lt,columns:xt,data:gt,next:bt,prev:Rt,title:it,isLoading:ft,options:vt,...st}=ut;return(0,s.jsx)(dt.X,{title:ft?"":it,columns:xt,data:gt,options:{paginationPosition:"both",...vt,pageSizeOptions:[],showFirstLastPageButtons:!1,pageSize:Number.MAX_SAFE_INTEGER,emptyRowsWhenPaging:!1,actionsColumnIndex:-1},onPageChange:Et=>{Et>0?bt?.():Rt?.()},page:Rt?1:0,totalCount:bt?Number.MAX_VALUE:Number.MAX_SAFE_INTEGER,localization:{pagination:{labelDisplayedRows:""}},isLoading:ft,...st})}var ct=t(84295),pt=t(42717),yt=t(82779),At=t(23747);const Ot=ut=>{const{columns:lt,actions:xt,options:gt}=ut,{loading:bt,error:Rt,entities:it,filters:ft,paginationMode:vt,pageInfo:st}=(0,b.nK)(),{isStarredEntity:Et,toggleStarredEntity:at}=(0,Y.I)(),[,U]=(0,L.A)(),V=(0,W.S)(yt.Oc),rt=(0,X.gf)(z.U),Ct=(0,I.capitalize)(ft.user?.value??"all"),ht=[ct.f.createCopyDocsUrlAction(U),ct.f.createStarEntityAction(Et,at)],Bt=(0,At.H)(it,V,rt);return vt==="cursor"?(0,s.jsx)(J,{columns:lt||pt.F,isLoading:bt,title:Ct,actions:xt||ht,options:gt,data:Bt,next:st?.next,prev:st?.prev}):vt==="offset"?(0,s.jsx)(Q,{columns:lt||pt.F,isLoading:bt,title:Ct,actions:xt||ht,options:gt,data:Bt}):Rt?(0,s.jsx)(M.B,{severity:"error",title:"Could not load available documentation.",children:(0,s.jsx)($.z,{language:"text",text:Rt.toString()})}):(0,s.jsx)(K.o,{title:Ct,entities:it,loading:bt,actions:xt||ht,columns:lt,options:gt})};Ot.columns=pt.B,Ot.actions=ct.f;const It=ut=>{const{initialFilter:lt="owned",columns:xt,actions:gt,ownerPickerMode:bt,pagination:Rt,options:it,PageWrapper:ft,CustomHeader:vt}=ut,st=ft||v.S,Et=vt||(()=>(0,s.jsx)(a.d,{title:"",children:(0,s.jsx)(x.Y,{children:"Discover documentation in your ecosystem."})}));return(0,s.jsx)(st,{children:(0,s.jsxs)(p.U,{children:[(0,s.jsx)(Et,{}),(0,s.jsx)(b.B9,{pagination:Rt,children:(0,s.jsxs)(h.GI,{children:[(0,s.jsxs)(h.GI.Filters,{children:[(0,s.jsx)(B,{}),(0,s.jsx)(d.y,{initialFilter:lt}),(0,s.jsx)(m.t,{mode:bt}),(0,s.jsx)(u.m,{})]}),(0,s.jsx)(h.GI.Content,{children:(0,s.jsx)(Ot,{actions:gt,columns:xt,options:it})})]})})]})})}},27125:(H,S,t)=>{"use strict";t.d(S,{o:()=>O});var s=t(31085),a=t(36338),x=t(9222),p=t(72427),b=t(65461),h=t(82779),d=t(14209),m=t(44186),u=t(73896),v=t(84295),g=t(42717),C=t(23747);const O=P=>{const{entities:B,title:L,loading:I,columns:M,actions:$,options:W}=P,[,X]=(0,a.A)(),z=(0,x.S)(h.Oc),Y=(0,p.gf)(b.U);if(!B)return null;const K=(0,C.H)(B,z,Y),dt=[v.f.createCopyDocsUrlAction(X)],G=20,Q=K&&K.length>G;return(0,s.jsx)(s.Fragment,{children:I||K&&K.length>0?(0,s.jsx)(d.X,{isLoading:I,options:{paging:Q,pageSize:G,search:!0,actionsColumnIndex:-1,...W},data:K,columns:M||g.F,actions:$||dt,title:L?`${L} (${K.length})`:`All (${K.length})`}):(0,s.jsx)(m.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,s.jsx)(u.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};O.columns=g.B,O.actions=v.f},84295:(H,S,t)=>{"use strict";t.d(S,{f:()=>p});var s=t(31085),a=t(55290),x=t(18956);const p={createCopyDocsUrlAction(b){return h=>({icon:()=>(0,s.jsx)(a.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>b(`${window.location.origin}${h.resolved.docsUrl}`)})},createStarEntityAction(b,h){return d=>{const m=d.entity,u=b(m);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,s.jsx)(x.m,{isFavorite:u}),tooltip:u?"Remove from favorites":"Add to favorites",onClick:()=>h(m)}}}}},42717:(H,S,t)=>{"use strict";t.d(S,{B:()=>u,F:()=>v});var s=t(31085),a=t(10394),x=t(58837);const p=(0,x.A)(g=>({value:{marginBottom:g.spacing(.75)},subvalue:{color:g.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function b(g){const{value:C,subvalue:O}=g,P=p();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.A,{className:P.value,children:C}),(0,s.jsx)(a.A,{className:P.subvalue,children:O})]})}var h=t(72072),d=t(34428);function m(g){return g.metadata.title||g.metadata.name}const u={createTitleColumn(g){return{...u.createNameColumn(),field:"entity.metadata.title",hidden:g?.hidden}},createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,searchable:!0,defaultSort:"asc",customSort:(g,C)=>{const O=m(g.entity).toLocaleLowerCase(),P=m(C.entity).toLocaleLowerCase();return O.localeCompare(P)},render:g=>(0,s.jsx)(b,{value:(0,s.jsx)(h.N_,{to:g.resolved.docsUrl,children:m(g.entity)}),subvalue:g.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:g})=>(0,s.jsx)(d.i,{entityRefs:g.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}},v=[u.createTitleColumn({hidden:!0}),u.createNameColumn(),u.createOwnerColumn(),u.createKindColumn(),u.createTypeColumn()]},23747:(H,S,t)=>{"use strict";t.d(S,{H:()=>b});var s=t(51372),a=t(67871),x=t(90184),p=t(95768);function b(h,d,m){return h.map(u=>{const v=(0,a.t)(u,s.vv);return{entity:u,resolved:{docsUrl:d({namespace:(0,p.V)(u.metadata.namespace??"default",m),kind:(0,p.V)(u.kind,m),name:(0,p.V)(u.metadata.name,m)}),ownedByRelations:v,ownedByRelationsTitle:v.map(g=>(0,x.S)(g,{defaultKind:"group"})).join(", ")}}})}},81859:(H,S,t)=>{"use strict";t.d(S,{S:()=>b});var s=t(31085),a=t(27155),x=t(72427),p=t(65461);const b=h=>{const{children:d,CustomPageWrapper:m}=h,v=`Documentation available in ${(0,x.gf)(p.U).getOptionalString("organization.name")??"Backstage"}`;return(0,s.jsx)(s.Fragment,{children:m?(0,s.jsx)(m,{children:d}):(0,s.jsx)(a.d,{title:"Documentation",subtitle:v,themeId:"documentation",children:d})})}},39278:(H,S,t)=>{"use strict";t.d(S,{$j:()=>$,Wj:()=>W,Ju:()=>B});var s=t(26679),a=t(70835),x=t(97142),p=t(92110);class b{configApi;discoveryApi;fetchApi;constructor(Y){this.configApi=Y.configApi,this.discoveryApi=Y.discoveryApi,this.fetchApi=Y.fetchApi}async getCookie(){const K=`${await this.getApiOrigin()}/cookie`,dt=await this.fetchApi.fetch(`${K}`,{credentials:"include"});if(!dt.ok)throw await a.o.fromResponse(dt);return await dt.json()}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(Y){const{kind:K,namespace:dt,name:G}=Y,J=`${await this.getApiOrigin()}/metadata/techdocs/${dt}/${K}/${G}`,ct=await this.fetchApi.fetch(`${J}`);if(!ct.ok)throw await a.o.fromResponse(ct);return await ct.json()}async getEntityMetadata(Y){const{kind:K,namespace:dt,name:G}=Y,J=`${await this.getApiOrigin()}/metadata/entity/${dt}/${K}/${G}`,ct=await this.fetchApi.fetch(`${J}`);if(!ct.ok)throw await a.o.fromResponse(ct);return await ct.json()}}class h{configApi;discoveryApi;fetchApi;constructor(Y){this.configApi=Y.configApi,this.discoveryApi=Y.discoveryApi,this.fetchApi=Y.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(Y,K){const{kind:dt,namespace:G,name:Q}=Y,ct=`${await this.getStorageUrl()}/${G}/${dt}/${Q}/${K}`,pt=await this.fetchApi.fetch(`${ct.endsWith("/")?ct:`${ct}/`}index.html`);let yt="";switch(pt.status){case 404:throw yt="Page not found. ",K||(yt+="This could be because there is no index.md file in the root of the docs directory of this repository."),new x.m_(yt);case 500:throw yt="Could not generate documentation or an error in the TechDocs backend. ",new Error(yt);default:break}return pt.text()}async syncEntityDocs(Y,K=()=>{}){const{kind:dt,namespace:G,name:Q}=Y,ct=`${await this.getApiOrigin()}/sync/${G}/${dt}/${Q}`;return new Promise((pt,yt)=>{const At=new AbortController;(0,p.y)(ct,{fetch:this.fetchApi.fetch,signal:At.signal,onmessage(Ot){if(Ot.event==="log")Ot.data&&K(JSON.parse(Ot.data));else if(Ot.event==="finish"){let It=!1;Ot.data&&({updated:It}=JSON.parse(Ot.data)),pt(It?"updated":"cached")}else Ot.event==="error"&&yt(new Error(Ot.data))},onerror(Ot){throw At.abort(),yt(Ot),Ot}})})}async getBaseUrl(Y,K,dt){const{kind:G,namespace:Q,name:J}=K,pt=`${await this.getApiOrigin()}/static/docs/${Q}/${G}/${J}/${dt}`;return new URL(Y,pt.endsWith("/")?pt:`${pt}/`).toString()}}var d=t(82779),m=t(9803),u=t(12935),v=t(65461),g=t(57405),C=t(70795),O=t(88758),P=t(54560);const B=(0,m.i)({id:"techdocs",apis:[(0,u.b)({api:s.s,deps:{configApi:v.U,discoveryApi:g.I,fetchApi:C.a},factory:({configApi:z,discoveryApi:Y,fetchApi:K})=>new h({configApi:z,discoveryApi:Y,fetchApi:K})}),(0,u.b)({api:s.l,deps:{configApi:v.U,discoveryApi:g.I,fetchApi:C.a},factory:({configApi:z,discoveryApi:Y,fetchApi:K})=>new b({configApi:z,discoveryApi:Y,fetchApi:K})})],routes:{root:d.rQ,docRoot:d.Oc,entityContent:d.Ri}}),L=B.provide((0,O.QJ)({name:"TechdocsPage",component:()=>t.e(8803).then(t.bind(t,38803)).then(z=>z.Router),mountPoint:d.rQ})),I=B.provide((0,O.QJ)({name:"EntityTechdocsContent",component:()=>t.e(8803).then(t.bind(t,38803)).then(z=>z.LegacyEmbeddedDocsRouter),mountPoint:d.Ri})),M=B.provide((0,O.QJ)({name:"TechDocsCustomHome",component:()=>t.e(5470).then(t.bind(t,25470)).then(z=>z.TechDocsCustomHome),mountPoint:d.rQ})),$=B.provide((0,O.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(z=>z.TechDocsIndexPage),mountPoint:d.rQ})),W=B.provide((0,O.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(z=>z.TechDocsReaderPage),mountPoint:d.Oc})),X=B.provide((0,P.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(z=>z.TechDocsSearchResultListItem),predicate:z=>z.type==="techdocs"}))},13976:(H,S,t)=>{"use strict";t.d(S,{p:()=>Pn});var s=t(31085),a=t(14041),x=t(42899),p=t(58837),b=t(88572),h=t(9394),d=t(91360),m=t(22856);const u="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",v=f=>{(0,a.useEffect)(()=>{if(!f)return()=>{};const D=f.querySelectorAll('head > link[rel="stylesheet"]');let j=D?.length??0;const F=new CustomEvent(u);if(!j)return f.dispatchEvent(F),()=>{};const k=()=>{--j===0&&f.dispatchEvent(F)};return D?.forEach(q=>{q.addEventListener("load",k)}),()=>{D?.forEach(q=>{q.removeEventListener("load",k)})}},[f])},g=f=>{const[D,j]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!f)return()=>{};j(!0);const F=f.style;F.setProperty("opacity","0");const k=()=>{j(!1),F.setProperty("opacity","1")};return f.addEventListener(u,k),()=>{f.removeEventListener(u,k)}},[f]),D},C=f=>{const{element:D,onAppend:j,children:F}=f,[k,q]=(0,a.useState)((0,h.vt)({...(0,m.A)(),insertionPoint:void 0}));v(D);const et=(0,a.useCallback)(Pt=>{if(!D||!Pt)return;q((0,h.vt)({...(0,m.A)(),insertionPoint:D.querySelector("head")||void 0}));let wt=Pt.shadowRoot;wt||(wt=Pt.attachShadow({mode:"open"})),wt.replaceChildren(D),typeof j=="function"&&j(wt)},[D,j]);return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(d.Ay,{jss:k,sheetsManager:new Map,children:[(0,s.jsx)("div",{ref:et,"data-testid":"techdocs-native-shadowroot"}),F]})})};var O=t(12784);const P=()=>{const{shadowRoot:f}=(0,b.V)();return f},B=f=>{const D=P(),[j,F]=(0,a.useState)(D?.firstChild);return(0,a.useEffect)(()=>{let k;return D&&(k=new MutationObserver(()=>{F(D?.firstChild)}),k.observe(D,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),()=>k?.disconnect()},[D]),!j||!(j instanceof HTMLElement)?[]:f.map(k=>j.querySelectorAll(k)).filter(k=>k.length).map(k=>Array.from(k)).flat()},L=f=>f.toString()&&f.rangeCount&&f.getRangeAt(0).getBoundingClientRect().top,I=(f=0)=>{const D=P(),[j,F]=useState(null),k=useMemo(()=>debounce(()=>{const q=D,et=q.getSelection?q.getSelection():document.getSelection();et&&L(et)?F(et):F(null)},f),[D,F,f]);return useEffect(()=>(window.document.addEventListener("selectionchange",k),()=>{k.cancel(),window.document.removeEventListener("selectionchange",k)}),[k]),j};var M=t(26280),$=t(68146),W=t(45250),X=t(73466),z=t(5877),Y=t(43836),K=t(10602),dt=t(72427),G=t(93368),Q=t(25862),J=t(65461),ct=t(55309);const pt=(0,ct.y)({id:"plugin.search.queryservice"});class yt{mockedResults;constructor(D){this.mockedResults=D}query(){return Promise.resolve(this.mockedResults||{results:[]})}}const At=(0,Y.tK)("search-context"),Ot=()=>{const f=(0,a.useContext)(At);if(!f)throw new Error("useSearch must be used within a SearchContextProvider");const D=f.atVersion(1);if(!D)throw new Error("No SearchContext v1 found");return D},It=()=>(0,a.useContext)(At)!==void 0,ut={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},lt=(f=ut)=>{const D=(0,dt.gf)(pt),j=(0,G.s)(),[F,k]=(0,a.useState)(f.term),[q,et]=(0,a.useState)(f.types),[Pt,wt]=(0,a.useState)(f.filters),[Ut,Lt]=(0,a.useState)(f.pageLimit),[Ft,Xt]=(0,a.useState)(f.pageCursor),fe=(0,z.A)(F),ue=(0,z.A)(Pt),nt=(0,X.A)(async()=>{const ve=await D.query({term:F,types:q,filters:Pt,pageLimit:Ut,pageCursor:Ft});return F&&j.captureEvent("search",F,{value:ve.numberOfResults}),ve},[F,q,Pt,Ut,Ft]),Se=!nt.loading&&!nt.error&&nt.value?.nextPageCursor,ye=!nt.loading&&!nt.error&&nt.value?.previousPageCursor,Ht=(0,a.useCallback)(()=>{Xt(nt.value?.nextPageCursor)},[nt.value?.nextPageCursor]),Qt=(0,a.useCallback)(()=>{Xt(nt.value?.previousPageCursor)},[nt.value?.previousPageCursor]);return(0,a.useEffect)(()=>{fe!==void 0&&F!==fe&&Xt(void 0)},[F,fe,Xt]),(0,a.useEffect)(()=>{ue!==void 0&&!(0,W.isEqual)(Pt,ue)&&Xt(void 0)},[Pt,ue,Xt]),{result:nt,term:F,setTerm:k,types:q,setTypes:et,filters:Pt,setFilters:wt,pageLimit:Ut,setPageLimit:Lt,pageCursor:Ft,setPageCursor:Xt,fetchNextPage:Se?Ht:void 0,fetchPreviousPage:ye?Qt:void 0}},xt=f=>{const{initialState:D,children:j}=f,F=lt(D);return(0,s.jsx)(Q.Ig,{attributes:{searchTypes:F.types.sort().join(",")},children:(0,s.jsx)(At.Provider,{value:(0,K.B)({1:F}),children:j})})},gt=f=>{const{initialState:D,inheritParentContextIfAvailable:j,children:F}=f,k=It(),q=(0,dt.gf)(J.U),et=D??{},Pt=q.has("search.query.pageLimit")?{pageLimit:q.getNumber("search.query.pageLimit")}:{},wt={...ut,...et,...Pt};return k&&j?(0,s.jsx)(s.Fragment,{children:F}):(0,s.jsx)(xt,{initialState:wt,children:F})};var bt=t(78467),Rt=t(20577),it=t(82266),ft=t(29365),vt=t(34839),st=t(16249),Et=t(64947),at=t(45917),U=t(22771),V=t(87849),rt=t(93184);const Ct=(0,rt.h)({id:"search-react",messages:{searchBar:{title:"Search",placeholder:"Search in {{org}}",clearButtonTitle:"Clear"},searchFilter:{allOptionTitle:"All"},searchPagination:{limitLabel:"Results per page:",limitText:"of {{num}}"},noResultsDescription:"Sorry, no results were found",searchResultGroup:{linkTitle:"See All",addFilterButtonTitle:"Add filter"},searchResultPager:{previous:"Previous",next:"Next"}}}),ht=(0,a.forwardRef)((f,D)=>{const{onChange:j,onKeyDown:F=()=>{},onClear:k=()=>{},onSubmit:q=()=>{},debounceTime:et=200,clearButton:Pt=!0,fullWidth:wt=!0,value:Ut,label:Lt,placeholder:Ft,inputProps:Xt={},InputProps:fe={},endAdornment:ue,...nt}=f,Se=(0,dt.gf)(J.U),[ye,Ht]=(0,a.useState)(""),Qt=(0,a.useRef)(""),{t:ie}=(0,V.i)(Ct);(0,a.useEffect)(()=>{Ht(_t=>_t===Qt.current?String(Ut):_t)},[Ut,Qt]),(0,U.A)(()=>{Qt.current=ye,j(ye)},et,[ye]);const ve=(0,a.useCallback)(_t=>{Ht(_t.target.value)},[Ht]),oe=(0,a.useCallback)(_t=>{F&&F(_t),q&&_t.key==="Enter"&&q()},[F,q]),ae=(0,a.useCallback)(()=>{Qt.current="",j(""),Ht(""),k&&k()},[j,k]),Ee=Lt?void 0:ie("searchBar.title"),ke=Ft??ie("searchBar.placeholder",{org:Se.getOptionalString("app.title")||"Backstage"}),Oe=(0,it.n)().getSystemIcon("search")||at.A,Ge=(0,s.jsx)(vt.A,{position:"start",children:(0,s.jsx)(ft.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,s.jsx)(Oe,{})})}),Je=(0,s.jsx)(vt.A,{position:"end",children:(0,s.jsx)(Et.A,{"aria-label":ie("searchBar.clearButtonTitle"),size:"small",onClick:ae,onKeyDown:_t=>{_t.key==="Enter"&&_t.stopPropagation()},children:ie("searchBar.clearButtonTitle")})});return(0,s.jsx)(gt,{inheritParentContextIfAvailable:!0,children:(0,s.jsx)(st.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:D,value:ye,label:Lt,placeholder:ke,InputProps:{startAdornment:Ge,endAdornment:Pt?Je:ue,...fe},inputProps:{"aria-label":Ee,...Xt},fullWidth:wt,onChange:ve,onKeyDown:oe,...nt})})}),Bt=(0,a.forwardRef)((f,D)=>{const{value:j="",onChange:F,...k}=f,{term:q,setTerm:et}=Ot();(0,a.useEffect)(()=>{j&&et(String(j))},[j,et]);const Pt=(0,a.useCallback)(wt=>{F?F(wt):et(wt)},[F,et]);return(0,s.jsx)(gt,{inheritParentContextIfAvailable:!0,children:(0,s.jsx)(Q.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,s.jsx)(ht,{...k,ref:D,value:q,onChange:Pt})})})}),Nt=(0,p.A)(f=>({loading:{right:f.spacing(1),position:"absolute"}})),kt=f=>D=>(0,s.jsx)(gt,{inheritParentContextIfAvailable:!0,children:(0,s.jsx)(f,{...D})}),Jt=()=>{const f=Nt();return(0,s.jsx)(bt.A,{className:f.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},Wt=kt(function(D){const{loading:j,value:F,onChange:k=()=>{},options:q=[],getOptionLabel:et=Qt=>String(Qt),inputPlaceholder:Pt,inputDebounceTime:wt,freeSolo:Ut=!0,fullWidth:Lt=!0,clearOnBlur:Ft=!1,"data-testid":Xt="search-autocomplete",...fe}=D,{setTerm:ue}=Ot(),nt=(0,a.useCallback)(Qt=>Qt?typeof Qt=="string"?Qt:et(Qt):"",[et]),Se=(0,a.useMemo)(()=>nt(F),[F,nt]),ye=(0,a.useCallback)((Qt,ie,ve,oe)=>{ue(nt(ie)),k(Qt,ie,ve,oe)},[nt,ue,k]),Ht=(0,a.useCallback)(({InputProps:{ref:Qt,className:ie,endAdornment:ve},InputLabelProps:oe,...ae})=>(0,s.jsx)(Bt,{...ae,ref:Qt,clearButton:!1,value:Se,placeholder:Pt,debounceTime:wt,endAdornment:j?(0,s.jsx)(Jt,{}):ve,InputProps:{className:ie}}),[j,Se,Pt,wt]);return(0,s.jsx)(Rt.Ay,{...fe,"data-testid":Xt,value:F,onChange:ye,options:q,getOptionLabel:et,renderInput:Ht,freeSolo:Ut,fullWidth:Lt,clearOnBlur:Ft})});var Vt=t(18690),jt=t(27698);const Gt=f=>f?.document,ce=f=>{const{entityId:D,entityTitle:j,debounceTime:F=150,searchResultUrlMapper:k}=f,[q,et]=(0,a.useState)(!1),Pt=(0,Vt.Zp)(),{setFilters:wt,term:Ut,result:{loading:Lt,value:Ft}}=Ot(),[Xt,fe]=(0,a.useState)([]);(0,a.useEffect)(()=>{let Ht=!0;if(Ht&&Ft){const Qt=Ft.results.slice(0,10);fe(Qt)}return()=>{Ht=!1}},[Lt,Ft]);const{kind:ue,name:nt,namespace:Se}=D;(0,a.useEffect)(()=>{wt(Ht=>({...Ht,kind:ue,namespace:Se,name:nt}))},[ue,Se,nt,wt]);const ye=(Ht,Qt)=>{if(Gt(Qt)){const{location:ie}=Qt.document;Pt(k?k(ie):ie)}};return(0,s.jsx)(Wt,{"data-testid":"techdocs-search-bar",size:"small",open:q&&!!Ut,getOptionLabel:()=>"",filterOptions:Ht=>Ht,onClose:()=>{et(!1)},onOpen:()=>{et(!0)},onChange:ye,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Xt,renderOption:({document:Ht,highlight:Qt})=>(0,s.jsx)(jt.TechDocsSearchResultListItem,{result:Ht,lineClamp:3,asListItem:!1,asLink:!1,title:Ht.title,highlight:Qt}),loading:Lt,inputDebounceTime:F,inputPlaceholder:`Search ${j||D.name} docs`,freeSolo:!1})},he=f=>{const D={term:"",types:["techdocs"],pageCursor:"",filters:f.entityId};return(0,s.jsx)(gt,{initialState:D,children:(0,s.jsx)(ce,{...f})})};var Kt=t(74219);const ne=(0,a.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(f=>({default:f.RealLogViewer})));function le(f){const{Progress:D}=(0,it.n)().getComponents();return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)(D,{}),children:(0,s.jsx)(ne,{...f})})}var Ye=t(73845),ee=t(72501),on=t(12398),We=t(32881);const Re=(0,p.A)(f=>(0,on.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}})),Ve=({buildLog:f,onClose:D})=>{const j=Re(),F=f.length===0?"Waiting for logs...":f.join(`
8
+ `);return(0,s.jsxs)(x.A,{container:!0,direction:"column",className:j.root,spacing:0,wrap:"nowrap",children:[(0,s.jsxs)(x.A,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,s.jsx)(ee.A,{variant:"h5",children:"Build Details"}),(0,s.jsx)(ft.A,{title:"Close the drawer",onClick:D,color:"inherit",children:(0,s.jsx)(We.A,{})},"dismiss")]}),(0,s.jsx)(x.A,{item:!0,xs:!0,children:(0,s.jsx)(le,{text:F,classes:{root:j.logs}})})]})},se=({buildLog:f})=>{const D=Re(),[j,F]=(0,a.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Et.A,{color:"inherit",onClick:()=>F(!0),children:"Show Build Logs"}),(0,s.jsx)(Ye.Ay,{classes:{paper:D.paper},anchor:"right",open:j,onClose:()=>F(!1),children:(0,s.jsx)(Ve,{buildLog:f,onClose:()=>F(!1)})})]})};var qe=t(12173);const tn=({errorMessage:f})=>{const D=(0,dt.gf)(J.U).getOptionalString("techdocs.builder"),j=(0,G.s)(),{entityRef:F}=(0,b.V)(),k=(0,Vt.zy)();(0,a.useEffect)(()=>{const{pathname:et,search:Pt,hash:wt}=k;j.captureEvent("not-found",`${et}${Pt}${wt}`,{attributes:F})},[j,F,k]);let q="";return[void 0,"local"].includes(D)||(q="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,s.jsx)(qe.M,{status:"404",statusMessage:f||"Documentation not found",additionalInfo:q})};var hn=t(28966),en=t(26679);function nn({contentLoading:f,content:D,activeSyncState:j}){return f||j==="BUILD_READY_RELOAD"||!D&&j==="CHECKING"?"CHECKING":!D&&j==="BUILDING"?"INITIAL_BUILD":D?j==="BUILDING"?"CONTENT_STALE_REFRESHING":j==="BUILD_READY"?"CONTENT_STALE_READY":j==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function pn(f,D){const j={...f};switch(D.type){case"sync":D.state==="CHECKING"&&(j.buildLog=[]),j.activeSyncState=D.state,j.syncError=D.syncError;break;case"contentLoading":j.contentLoading=!0,j.contentError=void 0;break;case"content":typeof D.path=="string"&&(j.path=D.path),j.contentLoading=!1,j.content=D.content,j.contentError=D.contentError;break;case"buildLog":j.buildLog=j.buildLog.concat(D.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(j.activeSyncState)&&["contentLoading","content"].includes(D.type)&&(j.activeSyncState="UP_TO_DATE",j.buildLog=[]),j}function Ke(f,D,j,F){const[k,q]=(0,a.useReducer)(pn,{activeSyncState:"CHECKING",path:F,contentLoading:!0,buildLog:[]}),et=(0,dt.gf)(en.s),{retry:Pt}=(0,hn.A)(async()=>{q({type:"contentLoading"});try{const Lt=await et.getEntityDocs({kind:f,namespace:D,name:j},F);return q({type:"content",content:Lt,path:F}),Lt}catch(Lt){q({type:"content",contentError:Lt,path:F})}},[et,f,D,j,F]),wt=(0,a.useRef)({content:void 0,reload:()=>{}});wt.current={content:k.content,reload:Pt},(0,X.A)(async()=>{q({type:"sync",state:"CHECKING"});const Lt=setTimeout(()=>{q({type:"sync",state:"BUILDING"})},1e3);try{switch(await et.syncEntityDocs({kind:f,namespace:D,name:j},Xt=>{q({type:"buildLog",log:Xt})})){case"updated":wt.current.content?q({type:"sync",state:"BUILD_READY"}):(wt.current.reload(),q({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":q({type:"sync",state:"UP_TO_DATE"});break;default:q({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(Ft){q({type:"sync",state:"ERROR",syncError:Ft})}finally{clearTimeout(Lt)}},[f,j,D,et,q,wt]);const Ut=(0,a.useMemo)(()=>nn({activeSyncState:k.activeSyncState,contentLoading:k.contentLoading,content:k.content}),[k.activeSyncState,k.content,k.contentLoading]);return(0,a.useMemo)(()=>({state:Ut,contentReload:Pt,path:k.path,content:k.content,contentErrorMessage:k.contentError?.toString(),syncErrorMessage:k.syncError?.toString(),buildLog:k.buildLog}),[Ut,Pt,k.path,k.content,k.contentError,k.syncError,k.buildLog])}const ze=(0,a.createContext)({}),He=()=>(0,a.useContext)(ze),be=f=>{const{children:D}=f,{"*":j=""}=(0,Vt.g)(),{entityRef:F}=(0,b.V)(),{kind:k,namespace:q,name:et}=F,Pt=Ke(k,q,et,j);return(0,s.jsx)(ze.Provider,{value:Pt,children:D instanceof Function?D(Pt):D})},Qe=f=>D=>(0,s.jsx)(be,{children:(0,s.jsx)(f,{...D})}),Ze=(0,p.A)(f=>({root:{marginBottom:f.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),je=()=>{let f=null;const D=Ze(),{state:j,contentReload:F,contentErrorMessage:k,syncErrorMessage:q,buildLog:et}=He();return j==="INITIAL_BUILD"&&(f=(0,s.jsx)(Kt.A,{classes:{root:D.root},variant:"outlined",severity:"info",icon:(0,s.jsx)(bt.A,{size:"24px"}),action:(0,s.jsx)(se,{buildLog:et}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),j==="CONTENT_STALE_REFRESHING"&&(f=(0,s.jsx)(Kt.A,{variant:"outlined",severity:"info",icon:(0,s.jsx)(bt.A,{size:"24px"}),action:(0,s.jsx)(se,{buildLog:et}),classes:{root:D.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),j==="CONTENT_STALE_READY"&&(f=(0,s.jsx)(Kt.A,{variant:"outlined",severity:"success",action:(0,s.jsx)(Et.A,{color:"inherit",onClick:()=>F(),children:"Refresh"}),classes:{root:D.root},children:"A newer version of this documentation is now available, please refresh to view."})),j==="CONTENT_STALE_ERROR"&&(f=(0,s.jsxs)(Kt.A,{variant:"outlined",severity:"error",action:(0,s.jsx)(se,{buildLog:et}),classes:{root:D.root,message:D.message},children:["Building a newer version of this documentation failed."," ",q]})),j==="CONTENT_NOT_FOUND"&&(f=(0,s.jsxs)(s.Fragment,{children:[q&&(0,s.jsxs)(Kt.A,{variant:"outlined",severity:"error",action:(0,s.jsx)(se,{buildLog:et}),classes:{root:D.root,message:D.message},children:["Building a newer version of this documentation failed."," ",q]}),(0,s.jsx)(tn,{errorMessage:k})]})),f};var Ue=t(5893),Le=t(54917),an=t(96726),T=t(71651),l=t.n(T);const E=/main\.[A-Fa-f0-9]{8}\.min\.css$/,w=/^https:\/\/fonts\.googleapis\.com/,Z=/^https:\/\/fonts\.gstatic\.com/,_=f=>f.nodeName==="LINK",ot=f=>{const D=f?.getAttribute("href")||"",j=D.match(E),F=D.match(w),k=D.match(Z);return j||F||k},Mt=f=>(_(f)&&!ot(f)&&f.remove(),f),zt=f=>f.nodeName==="IFRAME",Yt=(f,D)=>{const j=f.getAttribute("src")||"";try{const{host:F}=new URL(j);return D.includes(F)}catch{return!1}},re=f=>D=>(zt(D)&&!Yt(D,f)&&D.remove(),D),Me=()=>{const f=(0,dt.gf)(J.U);return(0,a.useMemo)(()=>f.getOptionalConfig("techdocs.sanitizer"),[f])},pe=()=>{const f=Me();return(0,a.useCallback)(async D=>{const j=f?.getOptionalStringArray("allowedIframeHosts");l().addHook("beforeSanitizeElements",Mt);const F=["link","meta"];j&&(F.push("iframe"),l().addHook("beforeSanitizeElements",re(j))),l().addHook("uponSanitizeElement",(et,Pt)=>{Pt.tagName==="meta"&&(et.getAttribute("http-equiv")==="refresh"&&et.getAttribute("content")?.includes("url=")||et.parentNode?.removeChild(et))}),l().addHook("uponSanitizeAttribute",(et,Pt)=>{et.tagName!=="meta"&&(Pt.attrName==="http-equiv"||Pt.attrName==="content")&&et.removeAttribute(Pt.attrName)});const k=f?.getOptionalString("allowedCustomElementTagNameRegExp"),q=f?.getOptionalString("allowedCustomElementAttributeNameRegExp");return l().sanitize(D.outerHTML,{ADD_TAGS:F,FORBID_TAGS:["style"],ADD_ATTR:["http-equiv","content","dominant-baseline"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0,CUSTOM_ELEMENT_HANDLING:{tagNameCheck:k?new RegExp(k):void 0,attributeNameCheck:q?new RegExp(q):void 0}})},[f])};var qt=t(34435),te=t(268);const ge=({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.
@@ -140,7 +140,7 @@ body {
140
140
  font-family: var(--md-text-font-family);
141
141
  background-color: unset;
142
142
  }
143
- `,gn="224px",le=({theme:f,sidebar:D})=>`
143
+ `,gn="224px",de=({theme:f,sidebar:D})=>`
144
144
  /*================== Layout ==================*/
145
145
 
146
146
  /* mkdocs material v9 compat */
@@ -534,7 +534,7 @@ ${$t.reduce((D,j)=>{const F=f.typography.htmlFontSize??16,k=f.typography[j],{lin
534
534
  height: 20px !important;
535
535
  transform: translateY(-50%) !important;
536
536
  }
537
- `,is={dark:["#only-light","#gh-light-mode-only"],light:["#only-dark","#gh-dark-mode-only"]},cs=[pe,sn,le,fn,Mn,as,({theme:f})=>`
537
+ `,is={dark:["#only-light","#gh-light-mode-only"],light:["#only-dark","#gh-dark-mode-only"]},cs=[ge,sn,de,fn,Mn,as,({theme:f})=>`
538
538
  /*================== Palette ==================*/
539
539
  /*
540
540
  When color palette toggle is enabled in material theme for Mkdocs, there is a possibility to show conditionally
@@ -548,6 +548,6 @@ ${is[f.palette.type].map(D=>`img[src$="${D}"]`).join(", ")} {
548
548
  `],bn=()=>(0,qt.Ut)(),ls=()=>{const f=bn(),D=(0,Le.A)();return(0,a.useMemo)(()=>{const j={theme:D,sidebar:f};return cs.reduce((F,k)=>F+k(j),"")},[D,f])},Bn=()=>{const f=ls();return(0,a.useCallback)(D=>(D.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${f}</style>`),D),[f])},jn=async(f,D)=>{let j;if(typeof f=="string")j=new DOMParser().parseFromString(f,"text/html").documentElement;else if(f instanceof Element)j=f;else throw new Error("dom is not a recognized type");for(const F of D)j=await F(j);return j},Un=(f,D,j)=>{const F=new URL(D,"https://ignored.com").pathname,k=f==="src"&&F.endsWith(".svg"),q=!D.match(/^([a-z]*:)?\/\//i),et=D.startsWith(j);return k&&(q||et)},ds=({techdocsStorageApi:f,entityId:D,path:j})=>async F=>{const k=await f.getApiOrigin(),q=async(et,Pt)=>{for(const wt of et)if(wt.hasAttribute(Pt)){const Ut=wt.getAttribute(Pt);if(!Ut)return;const Lt=await f.getBaseUrl(Ut,D,j);if(Un(Pt,Ut,k))try{const Xt=await(await fetch(Lt,{credentials:"include"})).text();wt.setAttribute(Pt,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Xt)))}`)}catch{wt.setAttribute("alt",`Error: ${Ut}`)}else wt.setAttribute(Pt,Lt)}};return await Promise.all([q(F.querySelectorAll("img"),"src"),q(F.querySelectorAll("script"),"src"),q(F.querySelectorAll("source"),"src"),q(F.querySelectorAll("link"),"href"),q(F.querySelectorAll("a[download]"),"href")]),F},us=()=>f=>(((j,F)=>{Array.from(j).filter(k=>k.hasAttribute(F)).forEach(k=>{const q=k.getAttribute(F);if(q){q.match(/^https?:\/\//i)&&k.setAttribute("target","_blank");try{const et=$n(window.location.href);k.setAttribute(F,new URL(q,et).toString())}catch{k.replaceWith(k.textContent||q)}}})})(Array.from(f.getElementsByTagName("a")),"href"),f);function $n(f){const D=new URL(f);return!D.pathname.endsWith("/")&&!D.pathname.endsWith(".html")&&(D.pathname+="/"),D.toString()}var hs=t(27326);let Fn;Fn=Promise.resolve().then(t.t.bind(t,25873,19));function mn(f,D){Fn.then(j=>{"createRoot"in j?j.createRoot(D).render(f):j.render(f,D)})}const ps=()=>f=>{const D=f.querySelector('.md-header label[for="__drawer"]'),j=f.querySelector("article");if(!D||!j)return f;const F=D.cloneNode();return mn((0,a.createElement)(hs.A),F),F.id="toggle-sidebar",F.title="Toggle Sidebar",F.classList.add("md-content__button"),F.style.setProperty("padding","0 0 0 5px"),F.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),j?.prepend(F),f},Nn=()=>f=>(f.querySelector(".md-header")?.remove(),f),gs=()=>f=>(f.querySelector(".md-footer .md-copyright")?.remove(),f.querySelector(".md-footer-copyright")?.remove(),f);var fs=t(36021),kn=t(90292),Wn=t(52536),ms=t.n(Wn);const Sn=f=>D=>{const j=D.querySelector('[title="Edit this page"]');if(!j||!j.href)return D;const F=new URL(j.href),k=f.byUrl(F);if(k?.type!=="github"&&k?.type!=="gitlab")return D;const q=D.querySelector("article>h1")?.childNodes[0].textContent||"",et=encodeURIComponent(`Documentation Feedback: ${q}`),Pt=encodeURIComponent(`Page source:
549
549
  ${j.href}
550
550
 
551
- Feedback:`),wt=k?.type==="github"?(0,fs.F)(F.href,"blob"):F.href,Ut=ms()(wt),Lt=`/${Ut.organization}/${Ut.name}`,Ft=j.cloneNode();switch(k?.type){case"gitlab":Ft.href=`${F.origin}${Lt}/issues/new?issue[title]=${et}&issue[description]=${Pt}`;break;case"github":Ft.href=`${F.origin}${Lt}/issues/new?title=${et}&body=${Pt}`;break;default:return D}return mn((0,a.createElement)(kn.A),Ft),Ft.style.paddingLeft="5px",Ft.title="Leave feedback for this page",Ft.id="git-feedback-link",j?.insertAdjacentElement("beforebegin",Ft),D};var On=t(38097);const ys=(0,p.A)(f=>({button:{color:f.palette.primary.light,textDecoration:"underline"}})),Kn=({message:f,handleButtonClick:D,autoHideDuration:j})=>{const F=ys(),[k,q]=(0,a.useState)(!0),et=()=>q(!1);return(0,s.jsx)(On.A,{open:k,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:j,color:"primary",onClose:et,message:f,action:(0,s.jsx)(Et.A,{classes:{root:F.button},size:"small",onClick:()=>{et(),D()},children:"Redirect now"})})},zn=(f,D)=>{const F=k=>{const q=$n(window.location.href),et=new URL(k,q);if(et.hostname!==window.location.hostname){const wt=window.location.pathname,Ut=wt.indexOf(D),Lt=wt.slice(0,Ut+D.length);return new URL(Lt,q).href}return et.href};return k=>{for(const q of Array.from(k.querySelectorAll("meta")))if(q.getAttribute("http-equiv")==="refresh"){const et=q.getAttribute("content")?.split("url=");if(!et||et.length<2)return k;const Pt=et[1],wt=F(Pt);if(window.location.href===wt)return k;const Ut=document.createElement("div");return mn((0,s.jsx)(Kn,{message:"This TechDocs page is no longer maintained. Will automatically redirect to the designated replacement.",handleButtonClick:()=>f(wt),autoHideDuration:3e3}),Ut),document.body.appendChild(Ut),setTimeout(()=>{f(wt)},3e3),k}return k}},vs=()=>f=>(setTimeout(()=>{const D=f?.querySelectorAll("li.md-nav__item--active");D.length!==0&&(D.forEach(F=>{const k=F?.querySelector("input");k?.checked||k?.click()}),D[D.length-1].scrollIntoView())},200),f);var Es=t(50868),As=t(10437),xs=t(71677),Cs=t(87051),bs=t(36338);const Ss=(0,Cs.A)(f=>({tooltip:{fontSize:"inherit",color:f.palette.text.primary,margin:0,padding:f.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(xs.Ay),Os=()=>(0,s.jsx)(As.A,{children:(0,s.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"})}),Ps=({text:f})=>{const[D,j]=(0,a.useState)(!1),[,F]=(0,bs.A)(),k=(0,a.useCallback)(()=>{F(f),j(!0)},[f,F]),q=(0,a.useCallback)(()=>{j(!1)},[j]);return(0,s.jsx)(Ss,{title:"Copied to clipboard",placement:"left",open:D,onClose:q,leaveDelay:1e3,children:(0,s.jsx)(ft.A,{style:{position:"absolute"},className:"md-clipboard md-icon",onClick:k,"aria-label":"Copy to clipboard",children:(0,s.jsx)(Os,{})})})},Ts=f=>D=>{const j=D.querySelectorAll("pre > code");for(const F of j){const k=F.textContent||"",q=document.createElement("div");F?.parentElement?.prepend(q),mn((0,s.jsx)(Es.A,{theme:f,children:(0,s.jsx)(Ps,{text:k})}),q)}return D},Rs=({baseUrl:f,onClick:D})=>j=>(Array.from(j.getElementsByTagName("a")).forEach(F=>{F.addEventListener("click",k=>{const et=F.getAttribute("href");et&&et.startsWith(f)&&!F.hasAttribute("download")&&(k.preventDefault(),D(k,et))})}),j),Hn=({onLoading:f,onLoaded:D})=>j=>(f(),j.addEventListener(u,function F(){D(),j.removeEventListener(u,F)}),j);function Vn(){return f=>(f.querySelectorAll("label.md-nav__link[for]").forEach(j=>{j.setAttribute("tabIndex","0"),j.addEventListener("keydown",F=>{const k=F;if(k.key==="Enter"||k.key===" "){const q=j.getAttribute("for");if(!q)return;const et=f.querySelector(`#${q}`);et&&et.type==="checkbox"&&(et.checked=!et.checked,et.dispatchEvent(new Event("change",{bubbles:!0})),F.preventDefault(),F.stopPropagation())}})}),f)}function Gn(f,D){const j=new URL(D),F=`${j.origin}${j.pathname.replace(/\/$/,"")}`,k=f.replace(F,"").replace(/^\/+/,""),q=new URL(`http://localhost/${k}`);return`${q.pathname}${q.search}${q.hash}`}function ws(){const f=(0,a.useRef)((0,Vt.Zp)()),j=(0,dt.gf)(J.U).getOptionalString("app.baseUrl");return(0,a.useCallback)(k=>{let q=k;if(j)try{q=Gn(k,j)}catch{}f.current(q)},[j])}const Is="screen and (max-width: 76.1875em)",Fe=f=>{const D=(0,Vt.zy)(),j=(0,Vt.Zp)(),{"*":F=""}=(0,Vt.g)();(0,a.useLayoutEffect)(()=>{F===""&&f!==""&&j(`${D.pathname}${f}`,{replace:!0})},[])},Ne=(f,D)=>{const j=ws(),F=(0,Le.A)(),k=(0,Ue.A)(Is),q=he(),et=Bn(),Pt=(0,G.s)(),wt=(0,dt.gf)(en.s),Ut=(0,dt.gf)(an.Y),Lt=(0,dt.gf)(J.U),{state:Ft,path:Xt,content:ge}=He(),{"*":de=""}=(0,Vt.g)(),[nt,Se]=(0,a.useState)(null),ye=g(nt);Fe(D);const Ht=(0,a.useCallback)(()=>{if(!nt)return;nt.querySelectorAll(".md-sidebar").forEach(ae=>{if(k)ae.style.top="0px";else{const ke=document?.querySelector(".techdocs-reader-page")?.getBoundingClientRect().top??0;let Oe=nt.getBoundingClientRect().top??0;const Je=nt.querySelector(".md-container > .md-tabs")?.getBoundingClientRect().height??0;Oe<ke&&(Oe=ke);const _t=Math.max(Oe,0)+Je;ae.style.top=`${_t}px`;const ln=nt.querySelector(".md-container > .md-footer")?.getBoundingClientRect().top??window.innerHeight;ae.style.height=`${ln-_t}px`}ae.style.setProperty("opacity","1")})},[nt,k]);(0,a.useEffect)(()=>(window.addEventListener("resize",Ht),window.addEventListener("scroll",Ht,!0),()=>{window.removeEventListener("resize",Ht),window.removeEventListener("scroll",Ht,!0)}),[nt,Ht]);const Qt=(0,a.useCallback)(()=>{if(!nt)return;const oe=nt.querySelector(".md-footer");oe&&(oe.style.width=`${nt.getBoundingClientRect().width}px`)},[nt]);(0,a.useEffect)(()=>(window.addEventListener("resize",Qt),()=>{window.removeEventListener("resize",Qt)}),[nt,Qt]),(0,a.useEffect)(()=>{ye||(Qt(),Ht())},[Ft,ye,Qt,Ht]);const fe=(0,a.useCallback)((oe,ae)=>jn(oe,[q,ds({techdocsStorageApi:wt,entityId:f,path:ae}),us(),ps(),Nn(),gs(),Sn(Ut),et]),[f,Ut,wt,q,et]),ve=(0,a.useCallback)(async oe=>jn(oe,[zn(j,f.name),vs(),Ts(F),Rs({baseUrl:Lt.getOptionalString("app.baseUrl")||window.location.origin,onClick:(ae,Ee)=>{const ke=ae.ctrlKey||ae.metaKey,Oe=new URL(Ee),Ge=ae.target?.innerText||Ee,Je=Ee.replace(window.location.origin,"");Pt.captureEvent("click",Ge,{attributes:{to:Je}}),Oe.hash?ke?window.open(Ee,"_blank"):(window.location.pathname!==Oe.pathname?j(Ee):window.history.pushState(null,document.title,Oe.hash),oe?.querySelector(`[id="${Oe.hash.slice(1)}"]`)?.scrollIntoView(),oe?.querySelector(`[id="${Oe.hash.slice(1)}"]`)?.querySelector("a, button, [tabindex]")?.focus()):ke?window.open(Ee,"_blank"):j(Ee)}}),Hn({onLoading:()=>{},onLoaded:()=>{oe.querySelector(".md-nav__title")?.removeAttribute("for")}}),Hn({onLoading:()=>{Array.from(oe.querySelectorAll(".md-sidebar")).forEach(Ee=>{Ee.style.setProperty("opacity","0")})},onLoaded:()=>{}}),Vn()]),[F,j,Pt,f.name,Lt]);return(0,a.useEffect)(()=>{if(!ge)return()=>{};let oe=!0;return fe(ge,Xt).then(async ae=>{if(!ae?.innerHTML||!oe||de!==Xt)return;window.scroll({top:0});const Ee=await ve(ae);Se(Ee)}),()=>{oe=!1}},[ge,de,Xt,fe,ve]),nt};var we=t(41883),Ds=t(72020),yn=t(99730);const Yn=()=>{const f=(0,Ds.YR)(),{shadowRoot:D}=(0,b.V)(),j=D?.querySelector('[data-md-component="content"]'),F=D?.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let k=F?.querySelector('[data-techdocs-addons-location="primary sidebar"]');k||(k=document.createElement("div"),k.setAttribute("data-techdocs-addons-location","primary sidebar"),F?.prepend(k));const q=D?.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let et=q?.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return et||(et=document.createElement("div"),et.setAttribute("data-techdocs-addons-location","secondary sidebar"),q?.prepend(et)),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(we.A,{container:k,children:f.renderComponentsByLocation(yn.e.PrimarySidebar)}),(0,s.jsx)(we.A,{container:j,children:f.renderComponentsByLocation(yn.e.Content)}),(0,s.jsx)(we.A,{container:et,children:f.renderComponentsByLocation(yn.e.SecondarySidebar)})]})},Ls=(0,p.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Pn=Qe(f=>{const{withSearch:D=!0,searchResultUrlMapper:j,onReady:F}=f,k=Ls(),{entityMetadata:{value:q,loading:et},entityRef:Pt,setShadowRoot:wt}=(0,b.V)(),{state:Ut}=He(),Lt=Ne(Pt,f.defaultPath),Ft=window.location.pathname,Xt=window.location.hash,ge=g(Lt),[de]=B([`[id="${Xt.slice(1)}"]`]),nt=(0,it.n)(),{NotFoundErrorPage:Se}=nt.getComponents();(0,a.useEffect)(()=>{ge||(Xt?de&&de.scrollIntoView():document?.querySelector("header")?.scrollIntoView())},[Ft,Xt,de,ge]);const ye=(0,a.useCallback)(Ht=>{wt(Ht),F instanceof Function&&F()},[wt,F]);return et===!1&&!q?(0,s.jsx)(Se,{}):Lt?(0,s.jsx)(M.U,{children:(0,s.jsxs)(x.A,{container:!0,children:[(0,s.jsx)(x.A,{xs:12,item:!0,children:(0,s.jsx)(je,{})}),D&&(0,s.jsx)(x.A,{className:k.search,xs:"auto",item:!0,children:(0,s.jsx)(ue,{entityId:Pt,entityTitle:q?.metadata?.title,searchResultUrlMapper:j})}),(0,s.jsxs)(x.A,{xs:12,item:!0,children:[(Ut==="CHECKING"||ge)&&(0,s.jsx)($.k,{}),(0,s.jsx)(C,{element:Lt,onAppend:ye,children:(0,s.jsx)(Yn,{})})]})]})}):(0,s.jsx)(M.U,{children:(0,s.jsx)(x.A,{container:!0,children:(0,s.jsx)(x.A,{xs:12,item:!0,children:(0,s.jsx)(je,{})})})})}),Vs=null},45061:(H,S,t)=>{"use strict";t.d(S,{T:()=>At});var s=t(31085),a=t(14041),x=t(93285),p=t(42899),b=t(4387),h=t(13660),d=t(72020),m=t(88572),u=t(99730),v=t(82292),g=t(67871),C=t(8859),O=t(34428),P=t(51372),B=t(6820),L=t(58837),I=t(268),M=t(72501),$=t(72072);const W=(0,L.A)(Ot=>({root:{textAlign:"left"},label:{color:Ot.page.fontColor,fontWeight:Ot.typography.fontWeightBold,letterSpacing:0,fontSize:Ot.typography.fontSize,marginBottom:Ot.spacing(1)/2,lineHeight:1},value:{color:(0,I.X4)(Ot.page.fontColor,.8),fontSize:Ot.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),X=({value:Ot,className:It,typographyRootComponent:ut})=>(0,s.jsx)(M.A,{component:ut??(typeof Ot=="string"?"p":"span"),className:It,children:Ot});function z(Ot){const{label:It,value:ut,url:lt,contentTypograpyRootComponent:xt}=Ot,gt=W(),bt=(0,s.jsx)(X,{className:gt.value,value:ut||"<Unknown>",typographyRootComponent:xt});return(0,s.jsx)(p.A,{item:!0,children:(0,s.jsxs)(M.A,{component:"span",className:gt.root,children:[(0,s.jsx)(M.A,{className:gt.label,children:It}),lt?(0,s.jsx)($.N_,{to:lt,children:bt}):bt]})})}var Y=t(69814),K=t(72427),dt=t(65461),G=t(9222),Q=t(56005),J=t.n(Q),ct=t(82779),pt=t(18690);const yt=(0,s.jsx)(b.A,{animation:"wave",variant:"text",height:40}),At=Ot=>{const{children:It}=Ot,ut=(0,d.YR)(),lt=(0,K.gf)(dt.U),xt=(0,K.gf)(v.n),{"*":gt=""}=(0,pt.g)(),{title:bt,setTitle:Rt,subtitle:it,setSubtitle:ft,entityRef:vt,metadata:{value:st,loading:Et},entityMetadata:{value:at,loading:U}}=(0,m.V)();(0,a.useEffect)(()=>{st&&(Rt(st.site_name),ft(()=>{let{site_description:ce}=st;return(!ce||ce==="None")&&(ce=""),ce}))},[st,Rt,ft]);const V=lt.getOptional("app.title")||"Backstage",{locationMetadata:rt,spec:Ct}=at||{},ht=Ct?.lifecycle,Bt=at?(0,g.t)(at,P.vv):[],Nt=(0,G.S)(ct.rQ)(),Kt=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(z,{label:J()(at?.kind||"entity"),value:(0,s.jsx)(C.z,{color:"inherit",entityRef:vt,title:at?.metadata.title,defaultKind:"Component"})}),Bt.length>0&&(0,s.jsx)(z,{label:"Owner",value:(0,s.jsx)(O.i,{color:"inherit",entityRefs:Bt,defaultKind:"group"})}),ht?(0,s.jsx)(z,{label:"Lifecycle",value:String(ht)}):null,rt&&rt.type!=="dir"&&rt.type!=="file"?(0,s.jsx)(z,{label:"",value:(0,s.jsxs)(p.A,{container:!0,direction:"column",alignItems:"center",children:[(0,s.jsx)(p.A,{style:{padding:0},item:!0,children:(0,s.jsx)(h.A,{style:{marginTop:"-25px"}})}),(0,s.jsx)(p.A,{style:{padding:0},item:!0,children:"Source"})]}),url:rt.target}):null]});if(!U&&at===void 0||!Et&&st===void 0)return null;const Vt=(0,B.U2)(vt),jt=xt.forEntity(Vt).snapshot.primaryTitle,Gt=ce=>ce.replace(/\/$/,""),ie=ce=>ce.replace(/-/g," ").split(" ").map(J()).join(" ");let ue=[];gt!==""&&(ue=Gt(gt).split("/").slice(0,3).map(ie));const ne=[V,jt,...ue].join(" | ");return(0,s.jsxs)(Y.Y,{type:"Documentation",typeLink:Nt,title:bt||yt,subtitle:it===""?void 0:it||yt,children:[(0,s.jsx)(x.A,{titleTemplate:"%s",children:(0,s.jsx)("title",{children:ne})}),Kt,It,ut.renderComponentsByLocation(u.e.Header)]})}},82779:(H,S,t)=>{"use strict";t.d(S,{Oc:()=>x,Ri:()=>p,rQ:()=>a});var s=t(34569);const a=(0,s.H)({id:"techdocs:index-page"}),x=(0,s.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),p=(0,s.H)({id:"techdocs:catalog-reader-view"})},27698:(H,S,t)=>{"use strict";t.r(S),t.d(S,{TechDocsSearchResultListItem:()=>u});var s=t(31085),a=t(68804),x=t(5951),p=t(58837),b=t(72501),h=t(72072),d=t(70734);const m=(0,p.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),u=v=>{const{result:g,highlight:C,lineClamp:O=5,asListItem:P=!0,asLink:B=!0,title:L,icon:I}=v,M=m(),$=({children:z})=>B?(0,s.jsx)(h.N_,{noTrack:!0,to:g.location,children:z}):(0,s.jsx)(s.Fragment,{children:z}),W=()=>{const z=C?.fields.title?(0,s.jsx)(d.e,{text:C.fields.title,preTag:C.preTag,postTag:C.postTag}):g.title,Y=C?.fields.entityTitle?(0,s.jsx)(d.e,{text:C.fields.entityTitle,preTag:C.preTag,postTag:C.postTag}):g.entityTitle,K=C?.fields.name?(0,s.jsx)(d.e,{text:C.fields.name,preTag:C.preTag,postTag:C.postTag}):g.name;return g?(0,s.jsx)(x.A,{className:M.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,s.jsx)($,{children:L||(0,s.jsxs)(s.Fragment,{children:[z," | ",Y??K," docs"]})}),secondary:(0,s.jsx)(b.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:O,overflow:"hidden"},color:"textSecondary",variant:"body2",children:C?.fields.text?(0,s.jsx)(d.e,{text:C.fields.text,preTag:C.preTag,postTag:C.postTag}):g.text})}):null},X=({children:z})=>P?(0,s.jsxs)(s.Fragment,{children:[I&&(0,s.jsx)(a.A,{children:typeof I=="function"?I(g):I}),(0,s.jsx)("div",{className:M.flexContainer,children:z})]}):(0,s.jsx)(s.Fragment,{children:z});return(0,s.jsx)(X,{children:(0,s.jsx)(W,{})})}},97184:(H,S,t)=>{const a=document.querySelector('meta[name="backstage-public-path"]')?.getAttribute("content");a&&(t.p=a)},86973:()=>{}},H=>{var S=s=>H(H.s=s);H.O(0,[1751,1888,5067,1678,235,6587,5042,7400,1975,4538,4121],()=>(S(97184),S(71543)));var t=H.O()}]);})();
551
+ Feedback:`),wt=k?.type==="github"?(0,fs.F)(F.href,"blob"):F.href,Ut=ms()(wt),Lt=`/${Ut.organization}/${Ut.name}`,Ft=j.cloneNode();switch(k?.type){case"gitlab":Ft.href=`${F.origin}${Lt}/issues/new?issue[title]=${et}&issue[description]=${Pt}`;break;case"github":Ft.href=`${F.origin}${Lt}/issues/new?title=${et}&body=${Pt}`;break;default:return D}return mn((0,a.createElement)(kn.A),Ft),Ft.style.paddingLeft="5px",Ft.title="Leave feedback for this page",Ft.id="git-feedback-link",j?.insertAdjacentElement("beforebegin",Ft),D};var On=t(38097);const ys=(0,p.A)(f=>({button:{color:f.palette.primary.light,textDecoration:"underline"}})),Kn=({message:f,handleButtonClick:D,autoHideDuration:j})=>{const F=ys(),[k,q]=(0,a.useState)(!0),et=()=>q(!1);return(0,s.jsx)(On.A,{open:k,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:j,color:"primary",onClose:et,message:f,action:(0,s.jsx)(Et.A,{classes:{root:F.button},size:"small",onClick:()=>{et(),D()},children:"Redirect now"})})},zn=(f,D)=>{const F=k=>{const q=$n(window.location.href),et=new URL(k,q);if(et.hostname!==window.location.hostname){const wt=window.location.pathname,Ut=wt.indexOf(D),Lt=wt.slice(0,Ut+D.length);return new URL(Lt,q).href}return et.href};return k=>{for(const q of Array.from(k.querySelectorAll("meta")))if(q.getAttribute("http-equiv")==="refresh"){const et=q.getAttribute("content")?.split("url=");if(!et||et.length<2)return k;const Pt=et[1],wt=F(Pt);if(window.location.href===wt)return k;const Ut=document.createElement("div");return mn((0,s.jsx)(Kn,{message:"This TechDocs page is no longer maintained. Will automatically redirect to the designated replacement.",handleButtonClick:()=>f(wt),autoHideDuration:3e3}),Ut),document.body.appendChild(Ut),setTimeout(()=>{f(wt)},3e3),k}return k}},vs=()=>f=>(setTimeout(()=>{const D=f?.querySelectorAll("li.md-nav__item--active");D.length!==0&&(D.forEach(F=>{const k=F?.querySelector("input");k?.checked||k?.click()}),D[D.length-1].scrollIntoView())},200),f);var Es=t(50868),As=t(10437),xs=t(71677),Cs=t(87051),bs=t(36338);const Ss=(0,Cs.A)(f=>({tooltip:{fontSize:"inherit",color:f.palette.text.primary,margin:0,padding:f.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(xs.Ay),Os=()=>(0,s.jsx)(As.A,{children:(0,s.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"})}),Ps=({text:f})=>{const[D,j]=(0,a.useState)(!1),[,F]=(0,bs.A)(),k=(0,a.useCallback)(()=>{F(f),j(!0)},[f,F]),q=(0,a.useCallback)(()=>{j(!1)},[j]);return(0,s.jsx)(Ss,{title:"Copied to clipboard",placement:"left",open:D,onClose:q,leaveDelay:1e3,children:(0,s.jsx)(ft.A,{style:{position:"absolute"},className:"md-clipboard md-icon",onClick:k,"aria-label":"Copy to clipboard",children:(0,s.jsx)(Os,{})})})},Ts=f=>D=>{const j=D.querySelectorAll("pre > code");for(const F of j){const k=F.textContent||"",q=document.createElement("div");F?.parentElement?.prepend(q),mn((0,s.jsx)(Es.A,{theme:f,children:(0,s.jsx)(Ps,{text:k})}),q)}return D},Rs=({baseUrl:f,onClick:D})=>j=>(Array.from(j.getElementsByTagName("a")).forEach(F=>{F.addEventListener("click",k=>{const et=F.getAttribute("href");et&&et.startsWith(f)&&!F.hasAttribute("download")&&(k.preventDefault(),D(k,et))})}),j),Hn=({onLoading:f,onLoaded:D})=>j=>(f(),j.addEventListener(u,function F(){D(),j.removeEventListener(u,F)}),j);function Vn(){return f=>(f.querySelectorAll("label.md-nav__link[for]").forEach(j=>{j.setAttribute("tabIndex","0"),j.addEventListener("keydown",F=>{const k=F;if(k.key==="Enter"||k.key===" "){const q=j.getAttribute("for");if(!q)return;const et=f.querySelector(`#${q}`);et&&et.type==="checkbox"&&(et.checked=!et.checked,et.dispatchEvent(new Event("change",{bubbles:!0})),F.preventDefault(),F.stopPropagation())}})}),f)}function Gn(f,D){const j=new URL(D),F=`${j.origin}${j.pathname.replace(/\/$/,"")}`,k=f.replace(F,"").replace(/^\/+/,""),q=new URL(`http://localhost/${k}`);return`${q.pathname}${q.search}${q.hash}`}function ws(){const f=(0,a.useRef)((0,Vt.Zp)()),j=(0,dt.gf)(J.U).getOptionalString("app.baseUrl");return(0,a.useCallback)(k=>{let q=k;if(j)try{q=Gn(k,j)}catch{}f.current(q)},[j])}const Is="screen and (max-width: 76.1875em)",Fe=f=>{const D=(0,Vt.zy)(),j=(0,Vt.Zp)(),{"*":F=""}=(0,Vt.g)();(0,a.useLayoutEffect)(()=>{F===""&&f!==""&&j(`${D.pathname}${f}`,{replace:!0})},[])},Ne=(f,D)=>{const j=ws(),F=(0,Le.A)(),k=(0,Ue.A)(Is),q=pe(),et=Bn(),Pt=(0,G.s)(),wt=(0,dt.gf)(en.s),Ut=(0,dt.gf)(an.Y),Lt=(0,dt.gf)(J.U),{state:Ft,path:Xt,content:fe}=He(),{"*":ue=""}=(0,Vt.g)(),[nt,Se]=(0,a.useState)(null),ye=g(nt);Fe(D);const Ht=(0,a.useCallback)(()=>{if(!nt)return;nt.querySelectorAll(".md-sidebar").forEach(ae=>{if(k)ae.style.top="0px";else{const ke=document?.querySelector(".techdocs-reader-page")?.getBoundingClientRect().top??0;let Oe=nt.getBoundingClientRect().top??0;const Je=nt.querySelector(".md-container > .md-tabs")?.getBoundingClientRect().height??0;Oe<ke&&(Oe=ke);const _t=Math.max(Oe,0)+Je;ae.style.top=`${_t}px`;const ln=nt.querySelector(".md-container > .md-footer")?.getBoundingClientRect().top??window.innerHeight;ae.style.height=`${ln-_t}px`}ae.style.setProperty("opacity","1")})},[nt,k]);(0,a.useEffect)(()=>(window.addEventListener("resize",Ht),window.addEventListener("scroll",Ht,!0),()=>{window.removeEventListener("resize",Ht),window.removeEventListener("scroll",Ht,!0)}),[nt,Ht]);const Qt=(0,a.useCallback)(()=>{if(!nt)return;const oe=nt.querySelector(".md-footer");oe&&(oe.style.width=`${nt.getBoundingClientRect().width}px`)},[nt]);(0,a.useEffect)(()=>(window.addEventListener("resize",Qt),()=>{window.removeEventListener("resize",Qt)}),[nt,Qt]),(0,a.useEffect)(()=>{ye||(Qt(),Ht())},[Ft,ye,Qt,Ht]);const ie=(0,a.useCallback)((oe,ae)=>jn(oe,[q,ds({techdocsStorageApi:wt,entityId:f,path:ae}),us(),ps(),Nn(),gs(),Sn(Ut),et]),[f,Ut,wt,q,et]),ve=(0,a.useCallback)(async oe=>jn(oe,[zn(j,f.name),vs(),Ts(F),Rs({baseUrl:Lt.getOptionalString("app.baseUrl")||window.location.origin,onClick:(ae,Ee)=>{const ke=ae.ctrlKey||ae.metaKey,Oe=new URL(Ee),Ge=ae.target?.innerText||Ee,Je=Ee.replace(window.location.origin,"");Pt.captureEvent("click",Ge,{attributes:{to:Je}}),Oe.hash?ke?window.open(Ee,"_blank"):(window.location.pathname!==Oe.pathname?j(Ee):window.history.pushState(null,document.title,Oe.hash),oe?.querySelector(`[id="${Oe.hash.slice(1)}"]`)?.scrollIntoView(),oe?.querySelector(`[id="${Oe.hash.slice(1)}"]`)?.querySelector("a, button, [tabindex]")?.focus()):ke?window.open(Ee,"_blank"):j(Ee)}}),Hn({onLoading:()=>{},onLoaded:()=>{oe.querySelector(".md-nav__title")?.removeAttribute("for")}}),Hn({onLoading:()=>{Array.from(oe.querySelectorAll(".md-sidebar")).forEach(Ee=>{Ee.style.setProperty("opacity","0")})},onLoaded:()=>{}}),Vn()]),[F,j,Pt,f.name,Lt]);return(0,a.useEffect)(()=>{if(!fe)return()=>{};let oe=!0;return ie(fe,Xt).then(async ae=>{if(!ae?.innerHTML||!oe||ue!==Xt)return;window.scroll({top:0});const Ee=await ve(ae);Se(Ee)}),()=>{oe=!1}},[fe,ue,Xt,ie,ve]),nt};var we=t(41883),Ds=t(72020),yn=t(99730);const Yn=()=>{const f=(0,Ds.YR)(),{shadowRoot:D}=(0,b.V)(),j=D?.querySelector('[data-md-component="content"]'),F=D?.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let k=F?.querySelector('[data-techdocs-addons-location="primary sidebar"]');k||(k=document.createElement("div"),k.setAttribute("data-techdocs-addons-location","primary sidebar"),F?.prepend(k));const q=D?.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let et=q?.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return et||(et=document.createElement("div"),et.setAttribute("data-techdocs-addons-location","secondary sidebar"),q?.prepend(et)),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(we.A,{container:k,children:f.renderComponentsByLocation(yn.e.PrimarySidebar)}),(0,s.jsx)(we.A,{container:j,children:f.renderComponentsByLocation(yn.e.Content)}),(0,s.jsx)(we.A,{container:et,children:f.renderComponentsByLocation(yn.e.SecondarySidebar)})]})},Ls=(0,p.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Pn=Qe(f=>{const{withSearch:D=!0,searchResultUrlMapper:j,onReady:F}=f,k=Ls(),{entityMetadata:{value:q,loading:et},entityRef:Pt,setShadowRoot:wt}=(0,b.V)(),{state:Ut}=He(),Lt=Ne(Pt,f.defaultPath),Ft=window.location.pathname,Xt=window.location.hash,fe=g(Lt),[ue]=B([`[id="${Xt.slice(1)}"]`]),nt=(0,it.n)(),{NotFoundErrorPage:Se}=nt.getComponents();(0,a.useEffect)(()=>{fe||(Xt?ue&&ue.scrollIntoView():document?.querySelector("header")?.scrollIntoView())},[Ft,Xt,ue,fe]);const ye=(0,a.useCallback)(Ht=>{wt(Ht),F instanceof Function&&F()},[wt,F]);return et===!1&&!q?(0,s.jsx)(Se,{}):Lt?(0,s.jsx)(M.U,{children:(0,s.jsxs)(x.A,{container:!0,children:[(0,s.jsx)(x.A,{xs:12,item:!0,children:(0,s.jsx)(je,{})}),D&&(0,s.jsx)(x.A,{className:k.search,xs:"auto",item:!0,children:(0,s.jsx)(he,{entityId:Pt,entityTitle:q?.metadata?.title,searchResultUrlMapper:j})}),(0,s.jsxs)(x.A,{xs:12,item:!0,children:[(Ut==="CHECKING"||fe)&&(0,s.jsx)($.k,{}),(0,s.jsx)(C,{element:Lt,onAppend:ye,children:(0,s.jsx)(Yn,{})})]})]})}):(0,s.jsx)(M.U,{children:(0,s.jsx)(x.A,{container:!0,children:(0,s.jsx)(x.A,{xs:12,item:!0,children:(0,s.jsx)(je,{})})})})}),Vs=null},45061:(H,S,t)=>{"use strict";t.d(S,{T:()=>At});var s=t(31085),a=t(14041),x=t(93285),p=t(42899),b=t(4387),h=t(13660),d=t(72020),m=t(88572),u=t(99730),v=t(82292),g=t(67871),C=t(8859),O=t(34428),P=t(51372),B=t(6820),L=t(58837),I=t(268),M=t(72501),$=t(72072);const W=(0,L.A)(Ot=>({root:{textAlign:"left"},label:{color:Ot.page.fontColor,fontWeight:Ot.typography.fontWeightBold,letterSpacing:0,fontSize:Ot.typography.fontSize,marginBottom:Ot.spacing(1)/2,lineHeight:1},value:{color:(0,I.X4)(Ot.page.fontColor,.8),fontSize:Ot.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),X=({value:Ot,className:It,typographyRootComponent:ut})=>(0,s.jsx)(M.A,{component:ut??(typeof Ot=="string"?"p":"span"),className:It,children:Ot});function z(Ot){const{label:It,value:ut,url:lt,contentTypograpyRootComponent:xt}=Ot,gt=W(),bt=(0,s.jsx)(X,{className:gt.value,value:ut||"<Unknown>",typographyRootComponent:xt});return(0,s.jsx)(p.A,{item:!0,children:(0,s.jsxs)(M.A,{component:"span",className:gt.root,children:[(0,s.jsx)(M.A,{className:gt.label,children:It}),lt?(0,s.jsx)($.N_,{to:lt,children:bt}):bt]})})}var Y=t(69814),K=t(72427),dt=t(65461),G=t(9222),Q=t(56005),J=t.n(Q),ct=t(82779),pt=t(18690);const yt=(0,s.jsx)(b.A,{animation:"wave",variant:"text",height:40}),At=Ot=>{const{children:It}=Ot,ut=(0,d.YR)(),lt=(0,K.gf)(dt.U),xt=(0,K.gf)(v.n),{"*":gt=""}=(0,pt.g)(),{title:bt,setTitle:Rt,subtitle:it,setSubtitle:ft,entityRef:vt,metadata:{value:st,loading:Et},entityMetadata:{value:at,loading:U}}=(0,m.V)();(0,a.useEffect)(()=>{st&&(Rt(st.site_name),ft(()=>{let{site_description:le}=st;return(!le||le==="None")&&(le=""),le}))},[st,Rt,ft]);const V=lt.getOptional("app.title")||"Backstage",{locationMetadata:rt,spec:Ct}=at||{},ht=Ct?.lifecycle,Bt=at?(0,g.t)(at,P.vv):[],Nt=(0,G.S)(ct.rQ)(),kt=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(z,{label:J()(at?.kind||"entity"),value:(0,s.jsx)(C.z,{color:"inherit",entityRef:vt,title:at?.metadata.title,defaultKind:"Component"})}),Bt.length>0&&(0,s.jsx)(z,{label:"Owner",value:(0,s.jsx)(O.i,{color:"inherit",entityRefs:Bt,defaultKind:"group"})}),ht?(0,s.jsx)(z,{label:"Lifecycle",value:String(ht)}):null,rt&&rt.type!=="dir"&&rt.type!=="file"?(0,s.jsx)(z,{label:"",value:(0,s.jsxs)(p.A,{container:!0,direction:"column",alignItems:"center",children:[(0,s.jsx)(p.A,{style:{padding:0},item:!0,children:(0,s.jsx)(h.A,{style:{marginTop:"-25px"}})}),(0,s.jsx)(p.A,{style:{padding:0},item:!0,children:"Source"})]}),url:rt.target}):null]});if(!U&&at===void 0||!Et&&st===void 0)return null;const Vt=(0,B.U2)(vt),jt=xt.forEntity(Vt).snapshot.primaryTitle,Gt=le=>le.replace(/\/$/,""),ce=le=>le.replace(/-/g," ").split(" ").map(J()).join(" ");let he=[];gt!==""&&(he=Gt(gt).split("/").slice(0,3).map(ce));const ne=[V,jt,...he].join(" | ");return(0,s.jsxs)(Y.Y,{type:"Documentation",typeLink:Nt,title:bt||yt,subtitle:it===""?void 0:it||yt,children:[(0,s.jsx)(x.A,{titleTemplate:"%s",children:(0,s.jsx)("title",{children:ne})}),kt,It,ut.renderComponentsByLocation(u.e.Header)]})}},82779:(H,S,t)=>{"use strict";t.d(S,{Oc:()=>x,Ri:()=>p,rQ:()=>a});var s=t(34569);const a=(0,s.H)({id:"techdocs:index-page"}),x=(0,s.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),p=(0,s.H)({id:"techdocs:catalog-reader-view"})},27698:(H,S,t)=>{"use strict";t.r(S),t.d(S,{TechDocsSearchResultListItem:()=>u});var s=t(31085),a=t(68804),x=t(5951),p=t(58837),b=t(72501),h=t(72072),d=t(70734);const m=(0,p.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),u=v=>{const{result:g,highlight:C,lineClamp:O=5,asListItem:P=!0,asLink:B=!0,title:L,icon:I}=v,M=m(),$=({children:z})=>B?(0,s.jsx)(h.N_,{noTrack:!0,to:g.location,children:z}):(0,s.jsx)(s.Fragment,{children:z}),W=()=>{const z=C?.fields.title?(0,s.jsx)(d.e,{text:C.fields.title,preTag:C.preTag,postTag:C.postTag}):g.title,Y=C?.fields.entityTitle?(0,s.jsx)(d.e,{text:C.fields.entityTitle,preTag:C.preTag,postTag:C.postTag}):g.entityTitle,K=C?.fields.name?(0,s.jsx)(d.e,{text:C.fields.name,preTag:C.preTag,postTag:C.postTag}):g.name;return g?(0,s.jsx)(x.A,{className:M.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,s.jsx)($,{children:L||(0,s.jsxs)(s.Fragment,{children:[z," | ",Y??K," docs"]})}),secondary:(0,s.jsx)(b.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:O,overflow:"hidden"},color:"textSecondary",variant:"body2",children:C?.fields.text?(0,s.jsx)(d.e,{text:C.fields.text,preTag:C.preTag,postTag:C.postTag}):g.text})}):null},X=({children:z})=>P?(0,s.jsxs)(s.Fragment,{children:[I&&(0,s.jsx)(a.A,{children:typeof I=="function"?I(g):I}),(0,s.jsx)("div",{className:M.flexContainer,children:z})]}):(0,s.jsx)(s.Fragment,{children:z});return(0,s.jsx)(X,{children:(0,s.jsx)(W,{})})}},97184:(H,S,t)=>{const a=document.querySelector('meta[name="backstage-public-path"]')?.getAttribute("content");a&&(t.p=a)},86973:()=>{}},H=>{var S=s=>H(H.s=s);H.O(0,[1751,1888,5067,1678,235,6587,5042,7400,1975,4538,4121],()=>(S(97184),S(71543)));var t=H.O()}]);})();
552
552
 
553
- //# sourceMappingURL=main.dcd8a2f6.js.map
553
+ //# sourceMappingURL=main.a83e2ff3.js.map