@techdocs/cli 1.9.2 → 1.9.3-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/embedded-app/.config-schema.json +1924 -2652
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/2177.d7152699.chunk.js +4 -0
- package/dist/embedded-app/static/2177.d7152699.chunk.js.map +1 -0
- package/dist/embedded-app/static/3308.61cd83f7.chunk.js +7 -0
- package/dist/embedded-app/static/3308.61cd83f7.chunk.js.map +1 -0
- package/dist/embedded-app/static/{4036.255f68ab.chunk.js → 4036.4a93e66b.chunk.js} +1 -1
- package/dist/embedded-app/static/4036.4a93e66b.chunk.js.map +1 -0
- package/dist/embedded-app/static/{5470.f80a9c12.chunk.js → 5470.1de8dd3a.chunk.js} +1 -1
- package/dist/embedded-app/static/5470.1de8dd3a.chunk.js.map +1 -0
- package/dist/embedded-app/static/{5724.6bdfca76.chunk.js → 5724.80feefdb.chunk.js} +3 -3
- package/dist/embedded-app/static/5724.80feefdb.chunk.js.map +1 -0
- package/dist/embedded-app/static/{8803.34dd38ce.chunk.js → 8803.fa94a950.chunk.js} +1 -1
- package/dist/embedded-app/static/{8803.34dd38ce.chunk.js.map → 8803.fa94a950.chunk.js.map} +1 -1
- package/dist/embedded-app/static/9234.a1d6ef55.chunk.js +4 -0
- package/dist/embedded-app/static/9234.a1d6ef55.chunk.js.map +1 -0
- package/dist/embedded-app/static/main.14805d05.js +553 -0
- package/dist/embedded-app/static/main.14805d05.js.map +1 -0
- package/dist/embedded-app/static/{runtime.9fff8ae5.js → runtime.14805d05.js} +2 -2
- package/dist/embedded-app/static/{runtime.9fff8ae5.js.map → runtime.14805d05.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.9fff8ae5.js → vendor.14805d05.js} +1 -1
- package/dist/embedded-app/static/{vendor.9fff8ae5.js.map → vendor.14805d05.js.map} +1 -1
- package/dist/package.json.cjs.js +1 -1
- package/package.json +7 -7
- package/dist/embedded-app/static/2177.84bbb70f.chunk.js +0 -4
- package/dist/embedded-app/static/2177.84bbb70f.chunk.js.map +0 -1
- package/dist/embedded-app/static/3308.13263a7d.chunk.js +0 -7
- package/dist/embedded-app/static/3308.13263a7d.chunk.js.map +0 -1
- package/dist/embedded-app/static/4036.255f68ab.chunk.js.map +0 -1
- package/dist/embedded-app/static/5470.f80a9c12.chunk.js.map +0 -1
- package/dist/embedded-app/static/5724.6bdfca76.chunk.js.map +0 -1
- package/dist/embedded-app/static/9234.812d5df8.chunk.js +0 -4
- package/dist/embedded-app/static/9234.812d5df8.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.9fff8ae5.js +0 -553
- package/dist/embedded-app/static/main.9fff8ae5.js.map +0 -1
|
@@ -0,0 +1,553 @@
|
|
|
1
|
+
(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:(H,S,t)=>{"use strict";t.d(S,{c:()=>n});const n=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:(H,S,t)=>{"use strict";t.d(S,{P:()=>A,_P:()=>a,oQ:()=>n});const n="default",a="backstage.io/view-url",A="backstage.io/edit-url",p="kubernetes.io/api-server",b="kubernetes.io/api-server-certificate-authority",g="kubernetes.io/auth-provider"},6820:(H,S,t)=>{"use strict";t.d(S,{KU:()=>p,U2:()=>b,sM:()=>A});var n=t(72348);function a(g){let u=g.indexOf(":");const f=g.indexOf("/");f!==-1&&f<u&&(u=-1);const d=u===-1?void 0:g.slice(0,u),y=f===-1?void 0:g.slice(u+1,f),h=g.slice(Math.max(u+1,f+1));if(d===""||y===""||h==="")throw new TypeError(`Entity reference "${g}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:d,namespace:y,name:h}}function A(g){return{kind:g.kind,namespace:g.metadata.namespace||n.oQ,name:g.metadata.name}}function p(g,u){if(!g)throw new Error("Entity reference must not be empty");const f=u?.defaultKind,d=u?.defaultNamespace||n.oQ;let y,h,x;if(typeof g=="string"){const O=a(g);y=O.kind??f,h=O.namespace??d,x=O.name}else y=g.kind??f,h=g.namespace??d,x=g.name;if(y)if(h){if(!x){const O=JSON.stringify(g);throw new Error(`Entity reference ${O} had missing or empty name`)}}else{const O=JSON.stringify(g);throw new Error(`Entity reference ${O} had missing or empty namespace`)}else{const O=JSON.stringify(g);throw new Error(`Entity reference ${O} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:y,namespace:h,name:x}}function b(g){let u,f,d;return"metadata"in g?(u=g.kind,f=g.metadata.namespace??n.oQ,d=g.metadata.name):(u=g.kind,f=g.namespace??n.oQ,d=g.name),`${u.toLocaleLowerCase("en-US")}:${f.toLocaleLowerCase("en-US")}/${d.toLocaleLowerCase("en-US")}`}},51372:(H,S,t)=>{"use strict";t.d(S,{fT:()=>f,jn:()=>O,nC:()=>u,sA:()=>P,vv:()=>n});const n="ownedBy",a="ownerOf",A="consumesApi",p="apiConsumedBy",b="providesApi",g="apiProvidedBy",u="dependsOn",f="dependencyOf",d="parentOf",y="childOf",h="memberOf",x="hasMember",O="partOf",P="hasPart"},17736:(H,S,t)=>{"use strict";t.d(S,{Eo:()=>n,I4:()=>A});const n="backstage.io/managed-by-location",a="backstage.io/managed-by-origin-location",A="backstage.io/source-location"},78692:(H,S,t)=>{"use strict";t.d(S,{Cr:()=>g,KL:()=>b,aY:()=>p});var n=t(6820),a=t(17736);const A=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;function p(u){if(typeof u!="string")throw new TypeError(`Unable to parse location ref '${u}', unexpected argument ${typeof u}`);const f=u.indexOf(":");if(f<0)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const d=u.substring(0,f).trim(),y=u.substring(f+1).trim();if(!d||!y)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(d==="http"||d==="https")throw new TypeError(`Invalid location ref '${u}', please prefix it with 'url:', e.g. 'url:${u}'`);if(A.test(y))throw new TypeError(`Invalid location ref '${u}', target is a javascript: URL`);return{type:d,target:y}}function b(u){const{type:f,target:d}=u;if(f){if(!d)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(A.test(d))throw new TypeError(`Invalid location ref '${f}:${d}', target is a javascript: URL`);return`${f}:${d}`}function g(u){const f=u.metadata?.annotations?.[a.I4]??u.metadata?.annotations?.[a.Eo];if(!f)throw new Error(`Entity '${(0,n.U2)(u)}' is missing location`);return p(f)}},77310:(H,S,t)=>{"use strict";t.d(S,{z:()=>f});var n=t(31085),a=t(10394),A=t(54917),p=t(69578),b=t(40697),g=t(25577),u=t(37916);function f(d){const{text:y,language:h,showLineNumbers:x=!1,highlightedNumbers:O,customStyle:P,showCopyCodeButton:B=!1}=d,M=(0,A.A)(),R=M.palette.type==="dark"?b.A:g.A,D=M.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,n.jsxs)(a.A,{position:"relative",children:[(0,n.jsx)(p.A,{customStyle:P,language:h,style:R,showLineNumbers:x,wrapLines:!0,lineNumberStyle:{color:M.palette.textVerySubtle},lineProps:$=>O?.includes($)?{style:{backgroundColor:D}}:{},children:y}),B&&(0,n.jsx)(a.A,{position:"absolute",top:0,right:0,children:(0,n.jsx)(u.l,{text:y})})]})}},37916:(H,S,t)=>{"use strict";t.d(S,{l:()=>h});var n=t(31085),a=t(72427),A=t(39837),p=t(29365),b=t(71677),g=t(99594),u=t(14041),f=t(36338),d=t(10315),y=t(87849);function h(x){const{t:O}=(0,y.i)(d.O),{text:P,tooltipDelay:B=1e3,tooltipText:M=O("copyTextButton.tooltipText"),"aria-label":R="Copy text"}=x,D=(0,a.gf)(A.m),[$,N]=(0,u.useState)(!1),[{error:J},z]=(0,f.A)();(0,u.useEffect)(()=>{J&&D.post(J)},[J,D]);const Y=K=>{K.stopPropagation(),N(!0),z(P)};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(b.Ay,{id:"copy-test-tooltip",title:M,placement:"top",leaveDelay:B,onClose:()=>N(!1),open:$,children:(0,n.jsx)(p.A,{onClick:Y,"aria-label":R,children:(0,n.jsx)(g.A,{})})})})}},44186:(H,S,t)=>{"use strict";t.d(S,{p:()=>x});var n=t(31085),a=t(42899),A=t(58837),p=t(72501);const b=t.p+"static/missingAnnotation.67f79e98.svg",g=t.p+"static/noInformation.4b426325.svg",u=t.p+"static/createComponent.975d1e1e.svg",f=t.p+"static/noBuild.1715fa71.svg",d=(0,A.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),y=({missing:O})=>{const P=d();switch(O){case"field":return(0,n.jsx)("img",{src:b,className:P.generalImg,alt:"annotation is missing"});case"info":return(0,n.jsx)("img",{src:g,alt:"no Information",className:P.generalImg});case"content":return(0,n.jsx)("img",{src:u,alt:"create Component",className:P.generalImg});case"data":return(0,n.jsx)("img",{src:f,alt:"no Build",className:P.generalImg});default:return null}},h=(0,A.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 x(O){const{title:P,description:B,missing:M,action:R}=O,D=h();return(0,n.jsxs)(a.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:D.root,spacing:2,children:[(0,n.jsx)(a.A,{item:!0,xs:12,md:6,children:(0,n.jsxs)(a.A,{container:!0,direction:"column",children:[(0,n.jsx)(a.A,{item:!0,xs:!0,children:(0,n.jsx)(p.A,{variant:"h5",children:P})}),(0,n.jsx)(a.A,{item:!0,xs:!0,children:(0,n.jsx)(p.A,{variant:"body1",children:B})}),(0,n.jsx)(a.A,{item:!0,xs:!0,className:D.action,children:R})]})}),(0,n.jsx)(a.A,{item:!0,xs:12,md:6,className:D.imageContainer,children:typeof M=="string"?(0,n.jsx)(y,{missing:M}):M.customImage})]})}},22020:(H,S,t)=>{"use strict";t.d(S,{b:()=>y});var n=t(31085),a=t(58837),A=t(58007),p=t(8109),b=t(5951),g=t(37916),u=t(88640);const f=(0,a.A)(h=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:h.spacing(2)},divider:{margin:h.spacing(2)}}),{name:"BackstageErrorPanel"}),d=({error:h,message:x,stack:O,children:P})=>{const B=f();return(0,n.jsxs)(A.A,{dense:!0,children:[(0,n.jsxs)(p.A,{alignItems:"flex-start",children:[(0,n.jsx)(b.A,{classes:{secondary:B.text},primary:"Error",secondary:h}),(0,n.jsx)(g.l,{text:h})]}),(0,n.jsxs)(p.A,{alignItems:"flex-start",children:[(0,n.jsx)(b.A,{classes:{secondary:B.text},primary:"Message",secondary:x}),(0,n.jsx)(g.l,{text:x})]}),O&&(0,n.jsxs)(p.A,{alignItems:"flex-start",children:[(0,n.jsx)(b.A,{classes:{secondary:B.text},primary:"Stack Trace",secondary:O}),(0,n.jsx)(g.l,{text:O})]}),P]})};function y(h){const{title:x,error:O,defaultExpanded:P,titleFormat:B,children:M}=h;return(0,n.jsx)(u.B,{severity:"error",title:x??O.message,defaultExpanded:P,titleFormat:B,children:(0,n.jsx)(d,{error:O.name,message:O.message,stack:O.stack,children:M})})}},18956:(H,S,t)=>{"use strict";t.d(S,{m:()=>g});var n=t(31085),a=t(72501),A=t(58837),p=t(31129);const b=(0,A.A)(()=>({icon:{color:"#f3ba37",cursor:"pointer",display:"inline-flex"},iconBorder:{color:"inherit",cursor:"pointer",display:"inline-flex"}}),{name:"BackstageFavoriteToggleIcon"});function g(f){const{isFavorite:d}=f,y=b();return(0,n.jsx)(a.A,{component:"span",className:d?y.icon:y.iconBorder,children:d?(0,n.jsx)(p.Gg,{}):(0,n.jsx)(p.KG,{})})}function u(f){const{id:d,title:y,isFavorite:h,onToggle:x,...O}=f;return _jsx(Tooltip,{id:d,title:y,children:_jsx(IconButton,{"aria-label":y,id:d,onClick:()=>x(!h),color:"inherit",...O,children:_jsx(g,{isFavorite:h})})})}},72072:(H,S,t)=>{"use strict";t.d(S,{N_:()=>Q});var n=t(31085),a=t(82266),A=t(72427),p=t(65461),b=t(93368),g=t(49203),u=t(58837),f=t(72501),d=t(53373),y=t.n(d),h=t(45250),x=t.n(h),O=t(14041),P=t(18690),B=t(73657),M=t(39330);function R(){const[Z]=(0,P.AV)((0,n.jsx)(P.qh,{index:!0,element:(0,n.jsx)("div",{})}));return!Z.index}const D=(0,u.A)(Z=>({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:Z.spacing(.5)}}),{name:"Link"}),$=()=>{const ct=(0,a.n)().getSystemIcon("externalLink")||M.A,pt=D();return(0,n.jsx)(ct,{className:pt.externalLinkIcon})},N=Z=>/^([a-z+.-]+):/.test(Z),J=/^[\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 Z=function(...pt){const vt=String(pt[0]);if(J.test(vt))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return z.apply(this,pt)};Z.__backstage=!0,window.open=Z}const Y=()=>{try{return(0,A.gf)(p.U).getOptionalString("app.baseUrl")}catch{return}},K=()=>{const Z="http://sample.dev",ct=Y()??"/",{pathname:pt}=new URL(ct,Z);return(0,h.trimEnd)(pt,"/")},dt=Z=>{let ct=String(Z);const pt=K(),vt=N(ct),xt=ct.startsWith(pt);return!vt&&!xt&&(ct=pt.concat(ct)),ct},G=Z=>Z instanceof Array?Z.map(G).join(" ").trim():typeof Z=="object"&&Z?G(Z?.props?.children):["string","number"].includes(typeof Z)?String(Z):"",Q=(0,O.forwardRef)(({onClick:Z,noTrack:ct,externalLinkIcon:pt,...vt},xt)=>{const Pt=D(),It=(0,b.s)(),ut=R()?dt(vt.to):vt.to,lt=G(vt.children)||ut,Ct=N(ut),gt=Ct&&!!/^https?:/.exec(ut);if(J.test(ut))throw new Error("Link component rejected javascript: URL as a security precaution");const St=Tt=>{Z?.(Tt),ct||It.captureEvent("click",lt,{attributes:{to:ut}})};return Ct?(0,n.jsxs)(g.A,{...gt?{target:"_blank",rel:"noopener"}:{},...vt,...vt["aria-label"]?{"aria-label":`${vt["aria-label"]}, Opens in a new window`}:{},ref:xt,href:ut,onClick:St,className:y()(Pt.externalLink,vt.className),children:[vt.children,pt&&(0,n.jsx)($,{}),(0,n.jsx)(f.A,{component:"span",className:Pt.visuallyHidden,children:", Opens in a new window"})]}):(0,n.jsx)(g.A,{...vt,ref:xt,component:B.N_,to:ut,onClick:St})})},73896:(H,S,t)=>{"use strict";t.d(S,{z:()=>g});var n=t(31085),a=t(64947),A=t(14041),p=t(72072);const b=(0,A.forwardRef)((f,d)=>(0,n.jsx)(p.N_,{ref:d,...f,color:"initial"})),g=(0,A.forwardRef)((f,d)=>(0,n.jsx)(a.A,{ref:d,component:b,...f})),u=null},4650:(H,S,t)=>{"use strict";t.d(S,{h:()=>h});var n=t(31085),a=t(58837),A=t(45872),p=t(61125),b=t(14041),g=t(77310);const u=(0,a.A)(x=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${x.palette.border}`},"& th, & td":{border:`1px solid ${x.palette.border}`,padding:x.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:x.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:x.palette.background.paper},"& tr":{backgroundColor:x.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:x.palette.background.default},"& a":{color:x.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),f=(x,O)=>O?typeof O=="string"?x+O:b.Children.toArray(O.props.children).reduce(f,x):x,d=({level:x,children:O})=>{const M=b.Children.toArray(O).reduce(f,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return(0,b.createElement)(`h${x}`,{id:M},O)},y={code:({inline:x,className:O,children:P,...B})=>{const M=String(P).replace(/\n+$/,""),R=/language-(\w+)/.exec(O||"");return!x&&R?(0,n.jsx)(g.z,{language:R[1],text:M}):(0,n.jsx)("code",{className:O,...B,children:P})},h1:d,h2:d,h3:d,h4:d,h5:d,h6:d};function h(x){const{content:O,dialect:P="gfm",linkTarget:B,transformLinkUri:M,transformImageUri:R,className:D}=x,$=u();return(0,n.jsx)(A.$,{remarkPlugins:P==="gfm"?[p.A]:[],className:`${$.markdown} ${D??""}`.trim(),children:O,components:y,linkTarget:B,transformLinkUri:M,transformImageUri:R})}},68146:(H,S,t)=>{"use strict";t.d(S,{k:()=>g});var n=t(31085),a=t(10394),A=t(88951),p=t(54917),b=t(14041);function g(u){const f=(0,p.A)(),[d,y]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{const h=setTimeout(()=>y(!0),f.transitions.duration.short);return()=>clearTimeout(h)},[f.transitions.duration.short]),d?(0,n.jsx)(A.A,{...u,"data-testid":"progress"}):(0,n.jsx)(a.A,{display:"none","data-testid":"progress"})}},66917:(H,S,t)=>{"use strict";t.d(S,{w:()=>dt});var n=t(31085),a=t(10394),A=t(69076),p=t(67720),b=t(95061),g=t(41857),u=t(48543),f=t(26343),d=t(81215),y=t(87051),h=t(12398),x=t(58837),O=t(72501),P=t(92399),B=t(14041),M=t(10437);const R=(0,x.A)(G=>(0,h.A)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"}),$=()=>{const G=R();return(0,n.jsx)(M.A,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"currentColor"})})},N=(0,x.A)(G=>(0,h.A)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"}),z=()=>{const G=N();return(0,n.jsx)(M.A,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"currentColor"})})},Y=(0,y.A)(G=>(0,h.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"})(g.A),K=(0,x.A)(G=>(0,h.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:Z,label:ct,placeholder:pt,selected:vt,onChange:xt,triggerReset:Pt,native:It=!1,disabled:ut=!1,margin:lt,"data-testid":Ct="select"}=G,gt=K(),[St,Tt]=(0,B.useState)(vt||(Q?[]:"")),[at,mt]=(0,B.useState)(!1);(0,B.useEffect)(()=>{Tt(Q?[]:"")},[Pt,Q]),(0,B.useEffect)(()=>{Tt(vt||(Q?[]:""))},[vt,Q]);const At=U=>{Tt(U.target.value),xt(U.target.value)},tt=U=>{if(ut){U.preventDefault();return}mt(V=>Q&&!(U.target instanceof HTMLElement)?!0:!V)},ft=()=>{mt(!1)},it=U=>()=>{const V=St.filter(et=>et!==U);Tt(V),xt(V)};return(0,n.jsx)(a.A,{className:gt.root,children:(0,n.jsxs)(b.A,{className:gt.formControl,children:[(0,n.jsx)(u.A,{className:gt.formLabel,children:ct}),(0,n.jsxs)(d.A,{"aria-label":ct,value:St,native:It,disabled:ut,"data-testid":Ct,displayEmpty:!0,multiple:Q,margin:lt,onChange:At,open:at,onOpen:tt,onClose:ft,input:(0,n.jsx)(Y,{}),label:ct,renderValue:U=>Q&&St.length!==0?(0,n.jsx)(a.A,{className:gt.chips,children:U.map(V=>{const et=Z.find(bt=>bt.value===V);return et?(0,n.jsx)(p.A,{"data-testid":"chip",label:et?.label,clickable:!0,deleteIcon:(0,n.jsx)(P.A,{"data-testid":"cancel-icon",onMouseDown:bt=>bt.stopPropagation()}),onDelete:it(V),className:gt.chip},et?.value):!1})}):(0,n.jsx)(O.A,{children:St.length===0?pt||"":Z.find(V=>V.value===U)?.label}),IconComponent:()=>at?(0,n.jsx)(z,{}):(0,n.jsx)($,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[!!pt&&!Q&&(0,n.jsx)(f.A,{value:[],children:pt}),It?Z&&Z.map(U=>(0,n.jsx)("option",{value:U.value,children:U.label},U.value)):Z&&Z.map(U=>(0,n.jsxs)(f.A,{value:U.value,children:[Q&&(0,n.jsx)(A.A,{color:"primary",checked:St.includes(U.value)||!1,className:gt.checkbox}),U.label]},U.value))]})]})})}},27586:(H,S,t)=>{"use strict";t.d(S,{Y:()=>Q});var n=t(31085),a=t(82266),A=t(72427),p=t(65461),b=t(10394),g=t(64947),u=t(93453),f=t(29365),d=t(68804),y=t(5951),h=t(26343),x=t(28233),O=t(55197),P=t(58837),B=t(72501),M=t(5893),R=t(14041),D=t(10795),$=t(31129),N=t(72072),J=t(10315),z=t(87849);const Y=(0,P.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),K=({icon:Z})=>{const ct=(0,a.n)(),pt=Z?ct.getSystemIcon(Z)??$.NT:$.NT;return(0,n.jsx)(pt,{})},dt=({link:Z})=>(0,n.jsx)(N.N_,{to:Z.url,children:Z.title??Z.url}),G=({item:Z})=>(0,n.jsxs)(h.A,{button:!1,children:[(0,n.jsx)(d.A,{children:(0,n.jsx)(K,{icon:Z.icon})}),(0,n.jsx)(y.A,{primary:Z.title,secondary:Z.links?.reduce((ct,pt,vt)=>[...ct,vt>0&&(0,n.jsx)("br",{},vt),(0,n.jsx)(dt,{link:pt},pt.url)],[])})]});function Q(Z){const{t:ct}=(0,z.i)(J.O),{title:pt,items:vt,children:xt}=Z,{items:Pt}=(0,D.l)(),[It,ut]=(0,R.useState)(!1),[lt,Ct]=(0,R.useState)(null),gt=Y(),St=(0,A.gf)(p.U).getOptionalConfig("app.support"),Tt=(0,M.A)(At=>At.breakpoints.down("sm")),at=At=>{Ct(At.currentTarget),ut(!0)},mt=()=>{ut(!1)};return St?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(b.A,{display:"flex",ml:1,children:Tt?(0,n.jsx)(f.A,{color:"primary",size:"small",onClick:at,"data-testid":"support-button","aria-label":"Support",children:(0,n.jsx)($.NT,{})}):(0,n.jsx)(g.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:at,startIcon:(0,n.jsx)($.NT,{}),children:ct("supportButton.title")})}),(0,n.jsxs)(O.Ay,{"data-testid":"support-button-popover",open:It,anchorEl:lt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:mt,children:[(0,n.jsxs)(x.A,{className:gt.popoverList,autoFocusItem:!!lt,children:[pt&&(0,n.jsx)(h.A,{button:!1,alignItems:"flex-start",className:gt.menuItem,children:(0,n.jsx)(B.A,{variant:"subtitle1",children:pt})}),R.Children.map(xt,(At,tt)=>(0,n.jsx)(h.A,{button:!1,alignItems:"flex-start",className:gt.menuItem,children:At},`child-${tt}`)),(vt??Pt).map((At,tt)=>(0,n.jsx)(G,{item:At},`item-${tt}`))]}),(0,n.jsx)(u.A,{children:(0,n.jsx)(g.A,{color:"primary",onClick:mt,"aria-label":"Close",children:ct("supportButton.close")})})]})]}):null}},14209:(H,S,t)=>{"use strict";t.d(S,{X:()=>tt});var n=t(31085),a=t(87849),A=t(25301),p=t(10394),b=t(29365),g=t(87051),u=t(58837),f=t(54917),d=t(72501),y=t(83313),h=t(89019),x=t(62461),O=t(68887),P=t(63798),B=t(64704),M=t(6774),R=t(75625),D=t(65859),$=t(45917),N=t(5416),J=t(33494),z=t(80113),Y=t(26229),K=t(46802),dt=t(45250),G=t(14041),Q=t(10315),Z=t(64947),ct=t(66917);const pt=(0,u.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"}),vt=U=>{const V=pt(),{onChangeFilters:et}=U,{t:bt}=(0,a.i)(Q.O),[ht,Bt]=(0,G.useState)({...U.selectedFilters}),[Ut,Nt]=(0,G.useState)(!1),Ht=()=>{Bt({}),Nt(Vt=>!Vt)};return(0,G.useEffect)(()=>{et(ht)},[ht,et]),(0,n.jsxs)(p.A,{className:V.root,children:[(0,n.jsxs)(p.A,{className:V.header,children:[(0,n.jsx)(p.A,{className:V.value,children:bt("table.filter.title")}),(0,n.jsx)(Z.A,{color:"primary",onClick:Ht,children:bt("table.filter.clearAll")})]}),(0,n.jsx)(p.A,{className:V.filters,children:U.filters?.length&&U.filters.map(Vt=>(0,n.jsx)(ct.w,{triggerReset:Ut,...Vt.element,selected:ht[Vt.element.label],onChange:te=>Bt({...ht,[Vt.element.label]:te})},Vt.element.label))})]})};var xt=t(78467);function Pt(U){return(0,n.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:U.colSpan,children:(0,n.jsx)(p.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,n.jsx)(xt.A,{size:"5rem"})})})})})}const It={Add:(0,G.forwardRef)((U,V)=>(0,n.jsx)(y.A,{...U,ref:V})),Check:(0,G.forwardRef)((U,V)=>(0,n.jsx)(x.A,{...U,ref:V})),Clear:(0,G.forwardRef)((U,V)=>(0,n.jsx)(B.A,{...U,ref:V})),Delete:(0,G.forwardRef)((U,V)=>(0,n.jsx)(M.A,{...U,ref:V})),DetailPanel:(0,G.forwardRef)((U,V)=>(0,n.jsx)(P.A,{...U,ref:V})),Edit:(0,G.forwardRef)((U,V)=>(0,n.jsx)(R.A,{...U,ref:V})),Export:(0,G.forwardRef)((U,V)=>(0,n.jsx)(Y.A,{...U,ref:V})),Filter:(0,G.forwardRef)((U,V)=>(0,n.jsx)(D.A,{...U,ref:V})),FirstPage:(0,G.forwardRef)((U,V)=>(0,n.jsx)(N.A,{...U,ref:V})),LastPage:(0,G.forwardRef)((U,V)=>(0,n.jsx)(J.A,{...U,ref:V})),NextPage:(0,G.forwardRef)((U,V)=>(0,n.jsx)(P.A,{...U,ref:V})),PreviousPage:(0,G.forwardRef)((U,V)=>(0,n.jsx)(O.A,{...U,ref:V})),ResetSearch:(0,G.forwardRef)((U,V)=>(0,n.jsx)(B.A,{...U,ref:V})),Search:(0,G.forwardRef)((U,V)=>(0,n.jsx)($.A,{...U,ref:V})),SortArrow:(0,G.forwardRef)((U,V)=>(0,n.jsx)(h.A,{...U,ref:V})),ThirdStateCheck:(0,G.forwardRef)((U,V)=>(0,n.jsx)(z.A,{...U,ref:V})),ViewColumn:(0,G.forwardRef)((U,V)=>(0,n.jsx)(K.A,{...U,ref:V}))};function ut(U,V){const et=V.split(".");let bt=U[et[0]];for(let ht=1;ht<et.length;++ht){if(bt===void 0)return bt;const Bt=et[ht];bt=bt[Bt]}return bt}const lt=(0,g.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"})(A.rV),Ct=(0,g.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"})(A.Nb),gt=(0,u.A)(U=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:U.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),St=(0,u.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Tt(U,V){return U.map(et=>{const bt=et.headerStyle??{};let ht=et.cellStyle||{};if(et.highlight)if(bt.color=V.palette.textContrast,typeof ht=="object")ht.fontWeight=V.typography.fontWeightBold;else{const Bt=ht;ht=(Ut,Nt,Ht)=>({...Bt(Ut,Nt,Ht),fontWeight:V.typography.fontWeightBold})}return{...et,headerStyle:bt,cellStyle:ht}})}function at(U,V){return(0,dt.transform)(U,(et,bt,ht)=>{(0,dt.isEqual)(bt,V[ht])||(et[ht]=bt)})}const mt={search:"",filtersOpen:!1,filters:{}};function At(U){const{toolbarRef:V,setSearch:et,hasFilters:bt,selectedFiltersLength:ht,toggleFilters:Bt}=U,{t:Ut}=(0,a.i)(Q.O),Nt=gt(),Ht=(0,G.useCallback)(Vt=>{U.onSearchChanged(Vt),et(Vt)},[U,et]);return bt?(0,n.jsxs)(p.A,{className:Nt.root,children:[(0,n.jsxs)(p.A,{className:Nt.root,children:[(0,n.jsx)(b.A,{onClick:Bt,"aria-label":"filter list",children:(0,n.jsx)(D.A,{})}),(0,n.jsxs)(d.A,{className:Nt.title,children:[Ut("table.filter.title")," (",ht,")"]})]}),(0,n.jsx)(Ct,{...U,ref:V,onSearchChanged:Ht})]}):(0,n.jsx)(Ct,{...U,ref:V,onSearchChanged:Ht})}function tt(U){const{data:V,columns:et,emptyContent:bt,options:ht,title:Bt,subtitle:Ut,localization:Nt,filters:Ht,initialState:Vt,onStateChange:te,components:jt,isLoading:kt,style:ne,...ge}=U,{t:Zt}=(0,a.i)(Q.O),oe=St(),le=(0,f.A)(),tn={...mt,...Vt},[se,rn]=(0,G.useState)(tn.filtersOpen),Te=(0,G.useCallback)(()=>rn(Ee=>!Ee),[rn]),[fe,Ge]=(0,G.useState)(tn.filters),[me,Ye]=(0,G.useState)(tn.search);(0,G.useEffect)(()=>{if(te){const Ee=at({search:me,filtersOpen:se,filters:fe},mt);te(Ee)}},[me,se,fe,te]);const on=(0,G.useCallback)(Ee=>et.find(We=>We.title===Ee)?.field,[et]),un=(0,G.useMemo)(()=>{if(typeof V=="function"||!fe)return V;const Ee=Object.values(fe);return V&&Ee.flat().length?V.filter(Ve=>!!Object.entries(fe).filter(([,Ze])=>!!Ze.length).every(([Ze,Be])=>{const Ae=ut(Ve,on(Ze));return Array.isArray(Ae)&&Array.isArray(Be)?Ae.some(w=>Be.includes(w)):Array.isArray(Ae)?Ae.includes(Be):Array.isArray(Be)?Be.includes(Ae):Ae===Be})):V},[V,fe,on]),an=Object.values(fe).flat().length,Qe=!!Ht?.length,Me=(0,G.useCallback)(Ee=>(0,n.jsx)(At,{setSearch:Ye,hasFilters:Qe,selectedFiltersLength:an,toggleFilters:Te,...Ee}),[Te,Qe,an,Ye]),ze=typeof V!="function"&&V.length===0,He=et.length,cn=(0,G.useMemo)(()=>ft({hasNoRows:ze,emptyContent:bt,columnCount:He,loading:kt}),[ze,bt,He,kt]);return(0,n.jsxs)(p.A,{className:oe.root,children:[se&&V&&typeof V!="function"&&Ht?.length&&(0,n.jsx)(vt,{filters:it(Ht,V,et,Zt),selectedFilters:fe,onChangeFilters:Ge}),(0,n.jsx)(A.Ay,{components:{Header:lt,Body:cn,Toolbar:Me,...jt},options:ht,columns:Tt(et,le),icons:It,title:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.A,{variant:"h5",component:"h2",children:Bt}),Ut&&(0,n.jsx)(d.A,{color:"textSecondary",variant:"body1",children:Ut})]}),data:un,style:{width:"100%",...ne},localization:{...Nt,body:{emptyDataSourceMessage:Zt("table.body.emptyDataSourceMessage"),...Nt?.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"),...Nt?.pagination},toolbar:{searchPlaceholder:Zt("table.toolbar.search"),searchTooltip:Zt("table.toolbar.search"),...Nt?.toolbar}},...ge})]})}tt.icons=Object.freeze(It);function ft({columnCount:U,emptyContent:V,hasNoRows:et,loading:bt}){return ht=>bt?(0,n.jsx)(Pt,{colSpan:U}):V&&et?(0,n.jsx)("tbody",{children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:U,children:V})})}):(0,n.jsx)(A.C6,{...ht})}function it(U,V,et,bt){const ht=Ut=>{const Nt=new Set,Ht=Vt=>{Vt!=null&&Nt.add(Vt)};return V&&V.forEach(Vt=>{const te=ut(Vt,et.find(jt=>jt.title===Ut)?.field);Array.isArray(te)?te.forEach(Ht):Ht(te)}),Nt},Bt=Ut=>({placeholder:bt("table.filter.placeholder"),label:Ut.column,multiple:Ut.type==="multiple-select",items:[...ht(Ut.column)].sort().map(Nt=>({label:Nt,value:Nt}))});return U.map(Ut=>({type:Ut.type,element:Bt(Ut)}))}},88640:(H,S,t)=>{"use strict";t.d(S,{B:()=>$});var n=t(31085),a=t(268),A=t(58837),p=t(8973),b=t(29655),g=t(91567),u=t(42899),f=t(72501),d=t(9181),y=t(6924),h=t(4650);const x=(N,J)=>(J.palette.type==="light"?a.e$:a.a)(J.palette[N].light,.6),O=(N,J)=>(J.palette.type==="light"?a.a:a.e$)(J.palette[N].light,.9),P=(0,A.A)(N=>({root:{marginRight:N.spacing(1),fill:({severity:J})=>x(J,N)}})),B=({severity:N})=>{const J=P({severity:N});return(0,n.jsx)(d.A,{classes:J})},M=({severity:N})=>{const J=P({severity:N});return(0,n.jsx)(y.A,{classes:J})},R=(0,A.A)(N=>({panel:{backgroundColor:({severity:J})=>O(J,N),color:({severity:J})=>x(J,N),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:J})=>x(J,N),fontWeight:N.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:J})=>x(J,N),backgroundColor:({severity:J})=>O(J,N)},details:{width:"100%",display:"block",color:N.palette.textContrast,backgroundColor:N.palette.background.default,border:`1px solid ${N.palette.border}`,padding:N.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),D=N=>N.charAt(0).toLocaleUpperCase("en-US")+N.slice(1);function $(N){const{severity:J="warning",title:z,titleFormat:Y,message:K,children:dt,defaultExpanded:G}=N,Q=R({severity:J}),Z=D(J)+(z?`: ${z}`:"");return(0,n.jsxs)(p.A,{defaultExpanded:G??!1,className:Q.panel,role:"alert",children:[(0,n.jsxs)(b.A,{expandIcon:(0,n.jsx)(M,{severity:J}),className:Q.summary,children:[(0,n.jsx)(B,{severity:J}),(0,n.jsx)(f.A,{className:Q.summaryText,variant:"subtitle1",children:Y==="markdown"?(0,n.jsx)(h.h,{content:Z,className:Q.markdownContent}):Z})]}),(K||dt)&&(0,n.jsx)(g.A,{children:(0,n.jsxs)(u.A,{container:!0,children:[K&&(0,n.jsx)(u.A,{item:!0,xs:12,children:(0,n.jsx)(f.A,{className:Q.message,variant:"body1",children:K})}),dt&&(0,n.jsx)(u.A,{item:!0,xs:12,className:Q.details,children:dt})]})})]})}},10795:(H,S,t)=>{"use strict";t.d(S,{l:()=>g});var n=t(72427),a=t(65461),A=t(10315),p=t(87849);const b=()=>{const{t:u}=(0,p.i)(A.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:u("supportConfig.default.title"),icon:"warning",links:[{title:u("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}};function g(){const d=(0,n.Q2)().get(a.U)?.getOptionalConfig("app.support"),y=b();return d?{url:d.getString("url"),items:d.getConfigArray("items").flatMap(h=>({title:h.getString("title"),icon:h.getOptionalString("icon"),links:(h.getOptionalConfigArray("links")??[]).flatMap(x=>({url:x.getString("url"),title:x.getOptionalString("title")??""}))}))}:y}},31129:(H,S,t)=>{"use strict";t.d(S,{Gg:()=>M,KG:()=>R,NT:()=>O,z9:()=>p});var n=t(31085),a=t(82266),A=t(27799);function p(D){const{id:$,Fallback:N=A.A,...J}=D,Y=(0,a.n)().getSystemIcon($)??N;return(0,n.jsx)(Y,{...J})}function b(D){return _jsx(p,{id:"brokenImage",...D})}function g(D){return _jsx(p,{id:"catalog",...D})}function u(D){return _jsx(p,{id:"chat",...D})}function f(D){return _jsx(p,{id:"dashboard",...D})}function d(D){return _jsx(p,{id:"docs",...D})}function y(D){return _jsx(p,{id:"email",...D})}function h(D){return _jsx(p,{id:"github",...D})}function x(D){return _jsx(p,{id:"group",...D})}function O(D){return(0,n.jsx)(p,{id:"help",...D})}function P(D){return _jsx(p,{id:"user",...D})}function B(D){return _jsx(p,{id:"warning",...D})}function M(D){return(0,n.jsx)(p,{id:"star",...D})}function R(D){return(0,n.jsx)(p,{id:"unstarred",...D})}},26280:(H,S,t)=>{"use strict";t.d(S,{U:()=>g});var n=t(31085),a=t(58837),A=t(53373),p=t.n(A);const b=(0,a.A)(u=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:u.spacing(3),paddingBottom:u.spacing(3),paddingLeft:u.spacing(2),paddingRight:u.spacing(2),[u.breakpoints.up("sm")]:{paddingLeft:u.spacing(3),paddingRight:u.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function g(u){const{className:f,stretch:d,noPadding:y,children:h,...x}=u,O=b();return(0,n.jsx)("article",{...x,className:p()(O.root,f,{[O.stretch]:d,[O.noPadding]:y}),children:h})}},59428:(H,S,t)=>{"use strict";t.d(S,{d:()=>d});var n=t(31085),a=t(10394),A=t(58837),p=t(72501),b=t(93285);const g=y=>(0,A.A)(h=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:h.spacing(2),textAlign:y.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:h.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),u=({title:y,className:h})=>(0,n.jsx)(p.A,{variant:"h4",component:"h2",className:h,"data-testid":"header-title",children:y}),f=({description:y,className:h})=>y?(0,n.jsx)(p.A,{variant:"body2",className:h,"data-testid":"header-description",children:y}):null;function d(y){const{description:h,title:x,titleComponent:O=void 0,children:P,descriptionComponent:B=void 0,textAlign:M="left"}=y,R=g({textAlign:M})(),D=O||(0,n.jsx)(u,{title:x,className:R.title}),$=B||(0,n.jsx)(f,{description:h,className:R.description});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(b.m,{title:x}),(0,n.jsxs)(a.A,{className:R.container,children:[(0,n.jsxs)(a.A,{className:R.leftItemsBox,children:[D,$]}),(0,n.jsx)(a.A,{className:R.rightItemsBox,children:P})]})]})}},12173:(H,S,t)=>{"use strict";t.d(S,{M:()=>D});var n=t(31085),a=t(42899),A=t(58837),p=t(72501),b=t(18690),g=t(72072),u=t(10795);const f=t.p+"static/mic-drop.fe3ef4d0.svg",d=(0,A.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"}),y=()=>{const $=d();return(0,n.jsx)("img",{src:f,className:$.micDrop,alt:"Girl dropping mic from her hands"})};var h=t(14041),x=t(77310),O=t(87849),P=t(10315);const B=(0,A.A)($=>({title:{paddingBottom:$.spacing(5),[$.breakpoints.down("xs")]:{paddingBottom:$.spacing(4),fontSize:$.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function M($){const{stack:N}=$,J=B(),{t:z}=(0,O.i)(P.O),[Y,K]=(0,h.useState)(!1);return Y?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.A,{variant:"h6",className:J.title,children:(0,n.jsx)(g.N_,{to:"#",onClick:()=>K(!1),children:z("errorPage.showLessDetails")})}),(0,n.jsx)(x.z,{text:N,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,n.jsx)(p.A,{variant:"h6",className:J.title,children:(0,n.jsx)(g.N_,{to:"#",onClick:()=>K(!0),children:z("errorPage.showMoreDetails")})})}const R=(0,A.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 D($){const{status:N="",statusMessage:J,additionalInfo:z,supportUrl:Y,stack:K}=$,dt=R(),G=(0,b.Zp)(),Q=(0,u.l)(),{t:Z}=(0,O.i)(P.O);return(0,n.jsxs)(a.A,{container:!0,className:dt.container,children:[(0,n.jsxs)(a.A,{item:!0,xs:12,sm:8,md:4,children:[(0,n.jsx)(p.A,{"data-testid":"error",variant:"body1",className:dt.subtitle,children:Z("errorPage.subtitle",{status:N,statusMessage:J})}),(0,n.jsx)(p.A,{variant:"body1",className:dt.subtitle,children:z}),(0,n.jsx)(p.A,{variant:"h2",className:dt.title,children:Z("errorPage.title")}),(0,n.jsxs)(p.A,{variant:"h6",className:dt.title,children:[(0,n.jsx)(g.N_,{to:"#","data-testid":"go-back-link",onClick:()=>G(-1),children:Z("errorPage.goBack")}),"... or please"," ",(0,n.jsx)(g.N_,{to:Y||Q.url,children:"contact support"})," if you think this is a bug."]}),K&&(0,n.jsx)(M,{stack:K})]}),(0,n.jsx)(y,{})]})}},69814:(H,S,t)=>{"use strict";t.d(S,{Y:()=>G});var n=t(31085),a=t(72427),A=t(65461),p=t(10394),b=t(42899),g=t(58837),u=t(71677),f=t(72501),d=t(93285),y=t(72072),h=t(45634),x=t(58007),O=t(8109),P=t(55197),B=t(87051),M=t(14041);const R=(0,B.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(f.A),D=(0,B.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(p.A),$=(0,B.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(p.A);function N(Q){const{children:Z,...ct}=Q,[pt,vt]=(0,M.useState)(null),xt=M.Children.toArray(Z),[Pt,It,...ut]=xt,lt=ut.length?ut.pop():xt[xt.length-1],Ct=xt.length>3,gt=at=>{vt(at.currentTarget)},St=()=>{vt(null)},Tt=!!pt;return(0,n.jsxs)(M.Fragment,{children:[(0,n.jsxs)(h.A,{"aria-label":"breadcrumb",...ct,children:[xt.length>1&&(0,n.jsx)(D,{clone:!0,children:Pt}),xt.length>2&&(0,n.jsx)(D,{clone:!0,children:It}),Ct&&(0,n.jsx)(R,{onClick:gt,children:"..."}),(0,n.jsx)($,{children:lt})]}),(0,n.jsx)(P.Ay,{open:Tt,anchorEl:pt,onClose:St,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,n.jsx)(x.A,{children:ut.map((at,mt)=>(0,n.jsx)(O.A,{button:!0,children:(0,n.jsx)(D,{clone:!0,children:at})},mt))})})]})}var J=t(73524);const z=(0,g.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:Z,classes:ct,pageTitle:pt})=>Q?Z?(0,n.jsxs)(N,{className:ct.breadcrumb,children:[(0,n.jsx)(y.N_,{to:Z,children:Q}),(0,n.jsx)(f.A,{children:pt})]}):(0,n.jsx)(f.A,{className:ct.type,children:Q}):null,K=({pageTitle:Q,classes:Z,tooltip:ct})=>{const{contentRef:pt}=(0,J.H)(),vt=(0,n.jsx)(f.A,{ref:pt,tabIndex:-1,className:Z.title,variant:"h1",children:Q});return ct?(0,n.jsx)(u.Ay,{title:ct,placement:"top-start",children:vt}):vt},dt=({classes:Q,subtitle:Z})=>Z?typeof Z!="string"?(0,n.jsx)(n.Fragment,{children:Z}):(0,n.jsx)(f.A,{className:Q.subtitle,variant:"subtitle2",component:"span",children:Z}):null;function G(Q){const{children:Z,pageTitleOverride:ct,style:pt,subtitle:vt,title:xt,tooltip:Pt,type:It,typeLink:ut}=Q,lt=z(),gt=(0,a.gf)(A.U).getOptionalString("app.title")||"Backstage",St=ct||xt,Tt=xt||ct,at=`${St} | %s | ${gt}`,mt=`${St} | ${gt}`;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.m,{titleTemplate:at,defaultTitle:mt}),(0,n.jsxs)("header",{style:pt,className:lt.header,children:[(0,n.jsxs)(p.A,{className:lt.leftItemsBox,children:[(0,n.jsx)(Y,{classes:lt,type:It,typeLink:ut,pageTitle:Tt}),(0,n.jsx)(K,{classes:lt,pageTitle:Tt,tooltip:Pt}),(0,n.jsx)(dt,{classes:lt,subtitle:vt})]}),(0,n.jsx)(b.A,{container:!0,className:lt.rightItemsBox,spacing:4,children:Z})]})]})}},24504:(H,S,t)=>{"use strict";t.d(S,{Y:()=>u});var n=t(31085),a=t(58837),A=t(50868),p=t(53373),b=t.n(p);const g=(0,a.A)(f=>({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",[f.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function u(f){const{themeId:d,className:y,children:h}=f,x=g();return(0,n.jsx)(A.A,{theme:O=>({...O,page:O.getPageTheme({themeId:d})}),children:(0,n.jsx)("main",{className:b()(x.root,y),children:h})})}},27155:(H,S,t)=>{"use strict";t.d(S,{d:()=>p});var n=t(31085),a=t(69814),A=t(24504);function p(b){const{themeId:g,children:u,...f}=b;return(0,n.jsxs)(A.Y,{themeId:g,children:[(0,n.jsx)(a.Y,{...f}),u]})}},73524:(H,S,t)=>{"use strict";t.d(S,{G:()=>x,H:()=>O});var n=t(31085),a=t(10394),A=t(58837),p=t(5893),b=t(14041),g=t(72664),u=function(P){return P.SIDEBAR_PIN_STATE="sidebarPinState",P}(u||{});const f={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 d=t(34435);const y=(0,A.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"}),h=(0,b.createContext)({content:{contentRef:void 0}});function x(P){const[B,M]=(0,b.useState)(()=>f.getSidebarPinState()),{sidebarConfig:R}=(0,b.useContext)(g.yY),D=(0,b.useRef)(null),$=(0,b.useMemo)(()=>({content:{contentRef:D}}),[D]);(0,b.useEffect)(()=>{f.setSidebarPinState(B)},[B]);const N=(0,p.A)(Y=>Y.breakpoints.down("xs"),{noSsr:!0}),J=()=>M(!B),z=y({isPinned:B,sidebarConfig:R});return(0,n.jsx)(d.qj,{value:{isPinned:B,toggleSidebarPinState:J,isMobile:N},children:(0,n.jsx)(h.Provider,{value:$,children:(0,n.jsx)(a.A,{className:z.root,children:P.children})})})}function O(){const{content:P}=(0,b.useContext)(h);return{focusContent:(0,b.useCallback)(()=>{P?.contentRef?.current?.focus()},[P]),contentRef:P?.contentRef}}},34435:(H,S,t)=>{"use strict";t.d(S,{Ut:()=>d,qj:()=>f});var n=t(31085),a=t(43836),A=t(10602),p=t(14041);const b={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},g=(0,p.createContext)(b),u=(0,a.tK)("sidebar-pin-state-context");function f(y){const{children:h,value:x}=y;return(0,n.jsx)(g.Provider,{value:x,children:(0,n.jsx)(u.Provider,{value:(0,A.B)({1:x}),children:h})})}const d=()=>{const y=(0,p.useContext)(u),h=(0,p.useContext)(g);if(y===void 0)return h||b;const x=y.atVersion(1);if(x===void 0)throw new Error("No context found for version 1.");return x}},72664:(H,S,t)=>{"use strict";t.d(S,{Rv:()=>g,U1:()=>h,hC:()=>b,i8:()=>f,yY:()=>y});var n=t(14041);const a=72,A=24,p=18,b={drawerWidthClosed:a,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:a,iconSize:a-A*2,iconPadding:A,selectedIndicatorWidth:3,userBadgePadding:p,userBadgeDiameter:a-p*2,mobileSidebarHeight:56},g=x=>({...b,...x,iconContainerWidth:b.drawerWidthClosed,iconSize:b.drawerWidthClosed-b.iconPadding*2,userBadgeDiameter:b.drawerWidthClosed-b.userBadgePadding*2}),u={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:b.defaultOpenDelayMs+200},f=x=>({...u,...x}),d="@backstage/core/sidebar-intro-dismissed",y=(0,n.createContext)({sidebarConfig:b,submenuConfig:u}),h=(0,n.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:(H,S,t)=>{"use strict";t.d(S,{O:()=>a});var n=t(93184);const a=(0,n.h)({id:"core-components",messages:{signIn:{title:"Sign In",loginFailed:"Login failed",customProvider:{title:"Custom User",subtitle:`Enter your own User ID and credentials.
|
|
2
|
+
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:()=>u,pn:()=>g});var n=t(31085),a=t(43836),A=t(10602),p=t(14041);const b=(0,a.tK)("analytics-context"),g=()=>{const d=(0,p.useContext)(b);if(d===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const y=d.atVersion(1);if(y===void 0)throw new Error("No context found for version 1.");return y},u=d=>{const{attributes:y,children:h}=d,O={...g(),...y},P=(0,A.B)({1:O});return(0,n.jsx)(b.Provider,{value:P,children:h})};function f(d,y){const h=x=>_jsx(u,{attributes:y,children:_jsx(d,{...x})});return h.displayName=`WithAnalyticsContext(${d.displayName||d.name||"Component"})`,h}},67237:(H,S,t)=>{"use strict";t.d(S,{J:()=>p,t:()=>A});var n=t(63544);const a=(0,n.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),A="_ROUTABLE-EXTENSION-RENDERED";class p{analyticsApi;context;constructor(g,u={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=g,this.context=u,a.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{a.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender}),a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),a.beforeUnloadRegistered=!0)}setContext(g){this.context=g}captureEvent(g,u,{value:f,attributes:d}={}){const{_routeNodeType:y,...h}=this.context;if(g===A){a.mostRecentGatheredNavigation&&(a.mostRecentRoutableExtensionRender={context:{...h,extension:"App"}});return}if(a.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender})}catch(x){console.warn("Error during analytics event capture. %o",x)}a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0}if(g==="navigate"&&y==="gathered"&&h.pluginId==="root"){a.mostRecentGatheredNavigation={action:g,subject:u,value:f,attributes:d,context:h};return}try{this.analyticsApi.captureEvent({action:g,subject:u,value:f,attributes:d,context:h})}catch(x){console.warn("Error during analytics event capture. %o",x)}}}},93368:(H,S,t)=>{"use strict";t.d(S,{s:()=>u});var n=t(25862),a=t(72427),A=t(99303),p=t(14041),b=t(67237);function g(){try{return(0,a.gf)(A.c)}catch{return{captureEvent:()=>{}}}}function u(){const f=(0,p.useRef)(null),d=(0,n.pn)(),y=g();function h(){return f.current===null&&(f.current=new b.J(y)),f.current}const x=h();return x.setContext(d),x}},36017:(H,S,t)=>{"use strict";t.d(S,{k:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.alert"})},99303:(H,S,t)=>{"use strict";t.d(S,{c:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.analytics"})},65461:(H,S,t)=>{"use strict";t.d(S,{U:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.config"})},57405:(H,S,t)=>{"use strict";t.d(S,{I:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.discovery"})},39837:(H,S,t)=>{"use strict";t.d(S,{m:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.error"})},63636:(H,S,t)=>{"use strict";t.d(S,{B:()=>A,S:()=>a});var n=t(55309),a=function(p){return p[p.None=0]="None",p[p.Active=1]="Active",p}({});const A=(0,n.y)({id:"core.featureflags"})},70795:(H,S,t)=>{"use strict";t.d(S,{a:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.fetch"})},16009:(H,S,t)=>{"use strict";t.d(S,{K:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.identity"})},56038:(H,S,t)=>{"use strict";t.d(S,{J:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.translation"})},55309:(H,S,t)=>{"use strict";t.d(S,{y:()=>a});class n{config;constructor(p){if(this.config=p,!p.id.split(".").flatMap(g=>g.split("-")).every(g=>g.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(A){return new n(A)}},12935:(H,S,t)=>{"use strict";t.d(S,{b:()=>n});function n(a,A){return"id"in a?{api:a,deps:{},factory:()=>A}:a}},72427:(H,S,t)=>{"use strict";t.d(S,{Q2:()=>p,gf:()=>b});var n=t(31085),a=t(43836),A=t(97142);function p(){const u=(0,a.qO)("api-context");if(!u)throw new A.EH("API context is not available");const f=u.atVersion(1);if(!f)throw new A.EH("ApiContext v1 not available");return f}function b(u){const d=p().get(u);if(!d)throw new A.EH(`No implementation available for ${u}`);return d}function g(u){return function(d){const y=x=>{const O=p(),P={};for(const B in u)if(u.hasOwnProperty(B)){const M=u[B],R=O.get(M);if(!R)throw new NotImplementedError(`No implementation available for ${M}`);P[B]=R}return _jsx(d,{...x,...P})},h=d.displayName||d.name||"Component";return y.displayName=`withApis(${h})`,y}}},82266:(H,S,t)=>{"use strict";t.d(S,{n:()=>a});var n=t(43836);const a=()=>{const A=(0,n.qO)("app-context");if(!A)throw new Error("App context is not available");const p=A.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 n=t(63544);const a=(0,n.Q)("component-data-store",()=>new WeakMap),A="__backstage_data";function p(g,u,f){const d=g;let y=d[A]??a.get(g);if(y||(y={map:new Map},Object.defineProperty(d,A,{enumerable:!1,configurable:!0,writable:!1,value:y}),a.set(g,y)),y.map.has(u)){const h=g.displayName||g.name;throw new Error(`Attempted to attach duplicate data "${u}" to component "${h}"`)}y.map.set(u,f)}function b(g,u){if(!g)return;const f=g.type;if(!f)return;const d=f[A]??a.get(f);if(d)return d.map.get(u)}},88758:(H,S,t)=>{"use strict";t.d(S,{NC:()=>x,zZ:()=>O,QJ:()=>h});var n=t(31085),a=t(14041),A=t(93368),p=t(25862),b=t(82266),g=t(9222),u=t(19402);class f 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:M,plugin:R}=this.props,{ErrorBoundaryFallback:D}=M.getComponents();return B?(0,n.jsx)(D,{error:B,resetError:this.handleErrorReset,plugin:R}):this.props.children}}var d=t(67237),y=t(97142);function h(P){const{component:B,mountPoint:M,name:R}=P;return O({component:{lazy:()=>B().then(D=>{const $=J=>{const z=(0,A.s)();try{(0,g.S)(M)}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 ${M} 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(d.t,"")},[z]),(0,n.jsx)(D,{...J})},N=R||D.displayName||D.name||"LazyComponent";return $.displayName=`RoutableExtension(${N})`,$})},data:{"core.mountPoint":M},name:R})}function x(P){const{component:B,name:M}=P;return O({component:B,name:M})}function O(P){const{data:B={},name:M}=P;M||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let R;if("lazy"in P.component){const $=P.component.lazy;R=(0,a.lazy)(()=>$().then(N=>({default:N}),N=>{const J=M?` of the ${M} extension`:"";throw new y.HK(`Failed lazy loading${J}, try to reload the page`,N)}))}else R=P.component.sync;const D=M||R.displayName||R.name||"Component";return{expose($){const N=J=>{const z=(0,b.n)(),{Progress:Y}=z.getComponents(),K=B?.["core.mountPoint"];return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(Y,{}),children:(0,n.jsx)(f,{app:z,plugin:$,children:(0,n.jsx)(p.Ig,{attributes:{pluginId:$.getId(),...M&&{extension:M},...K&&{routeRef:K.id}},children:(0,n.jsx)(R,{...J})})})})};(0,u.h)(N,"core.plugin",$),(0,u.h)(N,"core.extensionName",M);for(const[J,z]of Object.entries(B))(0,u.h)(N,J,z);return N.displayName=`Extension(${D})`,N}}}},82442:(H,S,t)=>{"use strict";t.d(S,{O:()=>u});var n=t(14041),a=t(19402),A=t(72427),p=t(63636);function b(f,d,y,h){return n.Children.toArray(f).flatMap(x=>{if(!(0,n.isValidElement)(x))return[];if(x.type===n.Fragment)return b(x.props.children,d,y,h);if((0,a.E)(x,"core.featureFlagged")){const O=x.props;return("with"in O?d.isActive(O.with):!d.isActive(O.without))?b(x.props.children,d,y,h):[]}if(y===void 0||y(x))return[x];if(h)throw new Error(h);return b(x.props.children,d,y,h)})}class g{node;featureFlagsApi;constructor(d,y){this.node=d,this.featureFlagsApi=y}selectByComponentData(d){const y=b(this.node,this.featureFlagsApi,h=>(0,a.E)(h,d.key)!==void 0,d.withStrictError);return new g(y,this.featureFlagsApi)}findComponentData(d){return b(this.node,this.featureFlagsApi,h=>(0,a.E)(h,d.key)!==void 0).map(h=>(0,a.E)(h,d.key)).filter(h=>h!==void 0)}getElements(){return b(this.node,this.featureFlagsApi)}}function u(f,d,y=[]){const h=(0,A.gf)(p.B),x=new g(f,h);return(0,n.useMemo)(()=>d(x),[f,...y])}},9803:(H,S,t)=>{"use strict";t.d(S,{i:()=>a});class n{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(A){return new n(A)}},34569:(H,S,t)=>{"use strict";t.d(S,{H:()=>A});var n=t(59598);class a{id;params;[p=n.b];constructor(g,u){this.id=g,this.params=u,this[p]="absolute"}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function A(b){return new a(b.id,b.params??[])}var p},59598:(H,S,t)=>{"use strict";t.d(S,{b:()=>a});var n=t(63544);const a=(0,n.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:(H,S,t)=>{"use strict";t.d(S,{S:()=>p});var n=t(14041),a=t(18690),A=t(43836);function p(b){const{pathname:g}=(0,a.zy)(),u=(0,A.qO)("routing-context");if(!u)throw new Error("Routing context is not available");const f=u.atVersion(1),d=(0,n.useMemo)(()=>f&&f.resolve(b,{pathname:g}),[f,b,g]);if(!u)throw new Error("useRouteRef used outside of routing context");if(!f)throw new Error("RoutingContext v1 not available");const y="optional"in b&&b.optional;if(!d&&!y)throw new Error(`No path for ${b}`);return d}},93184:(H,S,t)=>{"use strict";t.d(S,{h:()=>p,v:()=>b});var n=t(99833);function a(g){const u=new Array;function f(d,y){for(const[h,x]of Object.entries(d))typeof x=="string"?u.push([y+h,x]):f(x,`${y}${h}.`)}return f(g,""),Object.fromEntries(u)}class A{#t;#e;#n;constructor(u){this.#t=u.id,this.#e=a(u.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#t}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#e}setDefaultResource(u){this.#n=u}getDefaultResource(){return this.#n}toString(){return`TranslationRef{id=${this.id}}`}}function p(g){const u=new A(g);return g.translations&&u.setDefaultResource((0,n.o)({ref:u,translations:g.translations})),u}function b(g){const u=g;if(u.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${u.$$type}'`);if(u.version!=="v1")throw new Error(`Invalid translation ref, bad version '${u.version}'`);return u}},99833:(H,S,t)=>{"use strict";t.d(S,{Y:()=>n,o:()=>a});function n(A){const p=A;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(A){return{$$type:"@backstage/TranslationResource",version:"v1",id:A.ref.id,resources:Object.entries(A.translations).map(([p,b])=>({language:p,loader:()=>b().then(g=>{const u=g.default;return{messages:u?.$$type==="@backstage/TranslationMessages"?u.messages:u}})}))}}},87849:(H,S,t)=>{"use strict";t.d(S,{i:()=>g});var n=t(14041),a=t(72427),A=t(39837),p=t(56038);const b=new WeakSet,g=u=>{const f=(0,a.gf)(A.m),d=(0,a.gf)(p.J),[y,h]=(0,n.useState)(()=>d.getTranslation(u)),x=(0,n.useMemo)(()=>d.translation$(u),[d,u]),O=(0,n.useCallback)(B=>{if(!b.has(u)){const M=`Failed to load translation resource '${u.id}'; caused by ${B}`;console.error(M),f.post(new Error(M)),b.add(u)}},[f,u]);(0,n.useEffect)(()=>{const B=x.subscribe({next(M){M.ready&&h(M)},error(M){O(M)}});return()=>{B.unsubscribe()}},[x,O]);const P=(0,n.useRef)(!0);if((0,n.useEffect)(()=>{P.current?P.current=!1:h(d.getTranslation(u))},[d,u]),!y.ready)throw new Promise(B=>{const M=x.subscribe({next(R){R.ready&&(M.unsubscribe(),B())},error(R){M.unsubscribe(),O(R),B()}})});return{t:y.t}}},70835:(H,S,t)=>{"use strict";t.d(S,{o:()=>A});var n=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 g=JSON.parse(b);if(g.error&&g.response)return g}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 A extends Error{response;body;cause;statusCode;statusText;static async fromResponse(b){const g=await a(b),u=g.response.statusCode||b.status,f=b.statusText,d=`Request failed with ${u} ${f}`,y=(0,n.cy)(g.error);return new A({message:d,response:b,data:g,cause:y,statusCode:u,statusText:f})}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:()=>n});function n(A){if(typeof A!="object"||A===null||Array.isArray(A))return!1;const p=A;return!(typeof p.name!="string"||p.name===""||typeof p.message!="string")}function a(A){if(typeof A!="object"||A===null||Array.isArray(A))throw new Error(`Encountered invalid error, not an object, got '${A}'`);const p=A;if(typeof p.name!="string"||p.name==="")throw new Error(`Encountered error object without a name, got '${A}'`);if(typeof p.message!="string")throw new Error(`Encountered error object without a message, got '${A}'`)}},97142:(H,S,t)=>{"use strict";t.d(S,{HK:()=>x,m_:()=>u,EH:()=>y});var n=t(93007),a=t(59750);class A extends Error{cause;constructor(P,B){let M=P;if(B!==void 0){const R=(0,a.M5)(B);M?M+=`; caused by ${R}`:M=`caused by ${R}`}super(M),Error.captureStackTrace?.(this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,n.b)(B)?B:void 0}}class p extends null{name="InputError"}class b extends null{name="AuthenticationError"}class g extends null{name="NotAllowedError"}class u extends A{name="NotFoundError"}class f extends null{name="ConflictError"}class d extends null{name="NotModifiedError"}class y extends A{name="NotImplementedError"}class h extends null{}class x extends A{constructor(P,B){super(P,B),this.name=(0,n.b)(B)?B.name:"Error"}}},59750:(H,S,t)=>{"use strict";t.d(S,{M5:()=>g,cy:()=>b});var n=t(69655),a=t.n(n),A=t(93007);function p(u,f){const y={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(u)};return f?.includeStack||(delete y.stack,y.cause&&typeof y.cause=="object"&&"stack"in y.cause&&delete y.cause.stack),y}function b(u){const f=(0,n.deserializeError)(u);return u.stack||(f.stack=void 0),f}function g(u){if((0,A.b)(u)){const f=String(u);return f!=="[object Object]"?f:`${u.name}: ${u.message}`}return`unknown error '${u}'`}},96726:(H,S,t)=>{"use strict";t.d(S,{L:()=>Be,Y:()=>Ae});var n=t(59869);const a="amazonaws.com";function A(w){const l=w.getOptionalString("endpoint"),E=w.getOptionalBoolean("s3ForcePathStyle")??!1;let I,q;if(l){try{const Gt=new URL(l);I=Gt.host,q=Gt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${l}' is not a valid URL`)}if(q!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${l}'`)}else I=a;const X=w.getOptionalString("accessKeyId"),st=w.getOptionalString("secretAccessKey")?.trim(),Rt=w.getOptionalString("roleArn"),Wt=w.getOptionalString("externalId");return{host:I,endpoint:l,s3ForcePathStyle:E,accessKeyId:X,secretAccessKey:st,roleArn:Rt,externalId:Wt}}function p(w){const l=w.map(A);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,n.oS)(E.map(I=>new b(I)),I=>I.config.host)};get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return l}}const g="console.aws.amazon.com";function u(w){const l=w.getOptionalString("accessKeyId"),E=w.getOptionalString("secretAccessKey")?.trim(),I=w.getOptionalString("roleArn"),q=w.getOptionalString("externalId"),X=w.getString("region");return{host:w.getOptionalString("host")||`${X}.${g}`,accessKeyId:l,secretAccessKey:E,roleArn:I,externalId:q,region:X}}function f(w){return w.map(u)}class d{integrationConfig;static factory=({config:l})=>{const E=f(l.getOptionalConfigArray("integrations.awsCodeCommit")??[]);return(0,n.oS)(E.map(I=>new d(I)),I=>I.config.host)};get type(){return"awsCodeCommit"}get config(){return this.integrationConfig}get title(){return this.integrationConfig.host}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){const I=new URL(l).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!I)throw new Error("");const[,q]=I;return y(l,q,"edit")}}function y(w,l,E){const I=E==="edit"?"files/edit":E;return w.replace(new RegExp(`/codesuite/codecommit/repositories/${l}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${l}/${I}/`)}const h="GB";class x{static fromRepoUrl(l){const E=new URL(l);let I,q,X;const st=E.pathname.split("/").map(re=>decodeURIComponent(re));if(st[2]==="_git"?(I=st[1],q=X=st[3]):st[3]==="_git"?(I=st[1],q=st[2],X=st[4]):st[4]==="_git"&&(I=`${st[1]}/${st[2]}`,q=st[3],X=st[5]),!I||!q||!X)throw new Error("Azure URL must point to a git repository");const Rt=E.searchParams.get("path")??void 0;let Wt;const Gt=E.searchParams.get("version");if(Gt){if(Gt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Wt=Gt.slice(2)}return new x(E.origin,I,q,X,Rt,Wt)}#t;#e;#n;#s;#r;#o;constructor(l,E,I,q,X,st){this.#t=l,this.#e=E,this.#n=I,this.#s=q,this.#r=X,this.#o=st}#a=(...l)=>{const E=new URL(this.#t);return E.pathname=l.map(I=>encodeURIComponent(I)).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.#r&&l.searchParams.set("path",this.#r),this.#o&&l.searchParams.set("version",h+this.#o),l.toString()}toFileUrl(){if(!this.#r)throw new Error("Azure URL must point to a specific path to be able to download a file");const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("api-version","6.0"),l.searchParams.set("path",this.#r),this.#o&&l.searchParams.set("version",this.#o),l.toString()}toArchiveUrl(){const l=this.#a(this.#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.#r&&l.searchParams.set("scopePath",this.#r),this.#o&&l.searchParams.set("version",this.#o),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.#o&&l.searchParams.set("searchCriteria.itemVersion.version",this.#o),l.toString()}getOwner(){return this.#e}getProject(){return this.#n}getRepo(){return this.#s}getPath(){return this.#r}getRef(){return this.#o}}const O="dev.azure.com",P=["clientId","clientSecret","tenantId","personalAccessToken"],B=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function M(w){for(const l of B.entries()){const[E,I]=l,q=P.filter(X=>!I.includes(X));if(I.every(X=>w[X]!==void 0)&&q.every(X=>w[X]===void 0))return{kind:E,organizations:w.organizations,...I.reduce((X,st)=>(X[st]=w[st],X),{})}}throw new Error("is not a valid credential")}function R(w){const l=w.getOptionalString("host")??O;let E=w.getOptionalConfigArray("credentials")?.map(X=>({organizations:X.getOptionalStringArray("organizations"),personalAccessToken:X.getOptionalString("personalAccessToken")?.trim(),tenantId:X.getOptionalString("tenantId"),clientId:X.getOptionalString("clientId"),clientSecret:X.getOptionalString("clientSecret")?.trim()}));const I=w.getOptionalString("token")?.trim();if(w.getOptional("credential")!==void 0&&w.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(w.getOptional("token")!==void 0&&w.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(I!==void 0){const X=[{personalAccessToken:I}];E=E?.concat(X)??X}if(w.getOptional("credential")!==void 0){const X=[{organizations:w.getOptionalStringArray("credential.organizations"),token:w.getOptionalString("credential.token")?.trim(),tenantId:w.getOptionalString("credential.tenantId"),clientId:w.getOptionalString("credential.clientId"),clientSecret:w.getOptionalString("credential.clientSecret")?.trim()}];E=E?.concat(X)??X}if(!(0,n.HO)(l))throw new Error(`Invalid Azure integration config, '${l}' is not a valid host`);let q;if(E!==void 0){const X=E?.reduce((st,Rt,Wt)=>{let Gt;try{M(Rt)}catch(re){Gt=re.message}return Gt!==void 0&&st.push(`credential at position ${Wt+1} ${Gt}`),st},Array.of()).concat(Object.entries(E.filter(st=>st.organizations!==void 0&&st.organizations.length>0).reduce((st,Rt,Wt)=>(Rt.organizations?.forEach(Gt=>{st[Gt]||(st[Gt]=[]),st[Gt].push(Wt+1)}),st),{})).filter(([st,Rt])=>Rt.length>1).reduce((st,[Rt,Wt])=>(st.push(`organization ${Rt} is specified multiple times in credentials at positions ${Wt.slice(0,Wt.length-1).join(", ")} and ${Wt[Wt.length-1]}`),st),Array.of()));if(X?.length>0)throw new Error(`Invalid Azure integration config for ${l}: ${X.join("; ")}`);if(q=E.map(st=>M(st)),q.some(st=>st.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(q.filter(st=>st.organizations===void 0||st.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:q,commitSigningKey:w.getOptionalString("commitSigningKey")}}function D(w){const l=w.map(R);return l.some(E=>E.host===O)||l.push({host:O}),l}class ${integrationConfig;static factory=({config:l})=>{const E=D(l.getOptionalConfigArray("integrations.azure")??[]);return(0,n.oS)(E.map(I=>new $(I)),I=>I.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:I}=l;if((0,n.AY)(E))return E;try{const q=x.fromRepoUrl(I),X=new URL(I),st=new URL(`https://a.com${q.getPath()??""}`),Rt=new URL(E,st).pathname;return X.searchParams.set("path",Rt),l.lineNumber&&(X.searchParams.set("line",String(l.lineNumber)),X.searchParams.set("lineEnd",String(l.lineNumber+1)),X.searchParams.set("lineStartColumn","1"),X.searchParams.set("lineEndColumn","1")),X.toString()}catch{return new URL(E,I).toString()}}resolveEditUrl(l){return l}}var N=t(52536),J=t.n(N);const z="bitbucket.org",Y="https://api.bitbucket.org/2.0";function K(w){const l=z,E=Y,I=w.getString("username"),q=w.getString("appPassword")?.trim();return{host:l,apiBaseUrl:E,username:I,appPassword:q,commitSigningKey:w.getOptionalString("commitSigningKey")}}function dt(w){const l=w.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,n.oS)(E.map(I=>new G(I)),I=>I.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,n.ku)(l);if(l.lineNumber){const I=new URL(E);return I.hash=`lines-${l.lineNumber}`,I.toString()}return E}resolveEditUrl(l){const E=J()(l),I=new URL(l);return I.searchParams.set("mode","edit"),I.searchParams.set("at",E.ref),I.toString()}}var Q=t(45250);const Z="bitbucket.org",ct="https://api.bitbucket.org/2.0";function pt(w){const l=w.getOptionalString("host")??Z;let E=w.getOptionalString("apiBaseUrl");const I=w.getOptionalString("token")?.trim(),q=w.getOptionalString("username"),X=w.getOptionalString("appPassword")?.trim();if(!(0,n.HO)(l))throw new Error(`Invalid Bitbucket integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):l===Z?E=ct:E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:I,username:q,appPassword:X,commitSigningKey:w.getOptionalString("commitSigningKey")}}function vt(w){const l=w.map(pt);return l.some(E=>E.host===Z)||l.push({host:Z,apiBaseUrl:ct}),l}class xt{integrationConfig;static factory=({config:l})=>{const E=vt(l.getOptionalConfigArray("integrations.bitbucket")??[...l.getOptionalConfigArray("integrations.bitbucketCloud")??[],...l.getOptionalConfigArray("integrations.bitbucketServer")??[]]);return(0,n.oS)(E.map(I=>new xt(I)),I=>I.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,n.ku)(l);if(!l.lineNumber)return E;const I=new URL(E);return this.integrationConfig.host==="bitbucket.org"?I.hash=`lines-${l.lineNumber}`:I.hash=`${l.lineNumber}`,I.toString()}resolveEditUrl(l){const E=J()(l),I=new URL(l);return I.searchParams.set("mode","edit"),I.searchParams.set("spa","0"),I.searchParams.set("at",E.ref),I.toString()}}function Pt(w){const l=w.getString("host");let E=w.getOptionalString("apiBaseUrl");const I=w.getOptionalString("token")?.trim(),q=w.getOptionalString("username"),X=w.getOptionalString("password");if(!(0,n.HO)(l))throw new Error(`Invalid Bitbucket Server integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:I,username:q,password:X,commitSigningKey:w.getOptionalString("commitSigningKey")}}function It(w){return w.map(Pt)}class ut{integrationConfig;static factory=({config:l})=>{const E=It(l.getOptionalConfigArray("integrations.bitbucketServer")??[]);return(0,n.oS)(E.map(I=>new ut(I)),I=>I.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,n.ku)(l);if(l.lineNumber){const I=new URL(E);return I.hash=l.lineNumber.toString(),I.toString()}return E}resolveEditUrl(l){return l.includes("?")?l.substring(0,l.indexOf("?")):l}}function lt(w){const l=w.getString("host");let E=w.getOptionalString("baseUrl"),I=w.getOptionalString("cloneUrl"),q=w.getString("gitilesBaseUrl");const X=w.getOptionalString("username"),st=w.getOptionalString("password")?.trim();if((0,n.HO)(l)){if(E&&!(0,n.AY)(E))throw new Error(`Invalid Gerrit integration config, '${E}' is not a valid baseUrl`);if(I&&!(0,n.AY)(I))throw new Error(`Invalid Gerrit integration config, '${I}' is not a valid cloneUrl`);if(!(0,n.AY)(q))throw new Error(`Invalid Gerrit integration config, '${q}' 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}`,q?q=(0,Q.trimEnd)(q,"/"):q=`https://${l}`,I?I=(0,Q.trimEnd)(I,"/"):I=E,{host:l,baseUrl:E,cloneUrl:I,gitilesBaseUrl:q,username:X,password:st,commitSigningKey:w.getOptionalString("commitSigningKey")}}function Ct(w){return w.map(lt)}var gt=t(1048).hp;const St=")]}'";function Tt(w,l){const E=new URL(w.gitilesBaseUrl),I=new URL(l),X=I.pathname.substring(I.pathname.startsWith("/a/")?2:0).replace(E.pathname,"").split("/").filter(je=>!!je),st=X.indexOf("+");if(st<=0)throw new Error(`Unable to parse project from url: ${l}`);const Rt=trimStart(X.slice(0,st).join("/"),"/"),Wt=X.indexOf("heads");if(Wt<=0)throw new Error(`Unable to parse branch from url: ${l}`);const Gt=X[Wt+1],re=X.slice(Wt+2).join("/");return{branch:Gt,filePath:re===""?"/":re,project:Rt}}function at(w,l){const E=new URL(w.gitilesBaseUrl),I=new URL(l),X=(0,Q.trimStart)(I.pathname.substring(I.pathname.startsWith("/a/")?2:0).replace(E.pathname,""),"/").split("/").filter(Yt=>!!Yt),st=(0,Q.takeWhile)(X,Yt=>Yt!=="+");if(st.length===0)throw new Error(`Unable to parse gitiles url: ${l}`);const Rt=X.slice(st.length+1),Wt=(0,Q.join)(st,"/");if(Rt.length>0&&Rt[0]==="HEAD"){const Yt=Rt.shift(),he=(0,Q.join)(Rt,"/");return{project:Wt,ref:Yt,refType:"head",path:he||"/",basePath:(0,Q.trimEnd)(l.replace(he,""),"/")}}if(Rt.length>0&&Rt[0].length===40){const Yt=Rt.shift(),he=(0,Q.join)(Rt,"/");return{project:Wt,ref:Yt,refType:"sha",path:he||"/",basePath:(0,Q.trimEnd)(l.replace(he,""),"/")}}const Gt=(0,Q.join)(Rt,"/"),je=/^refs\/(?<refsReference>heads|tags)\/(?<ref>.*?)(\/|$)/.exec(Gt);if(je){const Yt=je[0];let he;const{refsReference:ae,ref:Ue}=je.groups||{},De=Gt.replace(Yt,"");switch(ae){case"heads":he="branch";break;case"tags":he="tag";break;default:throw new Error(`Unable to parse gitiles url: ${l}`)}return{project:Wt,ref:Ue,refType:he,path:De||"/",basePath:(0,Q.trimEnd)(l.replace(De,""),"/")}}throw new Error(`Unable to parse gitiles : ${l}`)}function mt(w,l,E,I){return`${w.gitilesBaseUrl}/${l}/+/refs/heads/${E}/${trimStart(I,"/")}`}function At(w,l,E,I){const q=I==="/"||I===""?".tar.gz":`/${I}.tar.gz`;return`${it(w)}/${l}/+archive/refs/heads/${E}${q}`}function tt(w,l){const{path:E,ref:I,project:q,refType:X}=at(w,l),st=E==="/"||E===""?".tar.gz":`/${E}.tar.gz`;if(X==="branch")return`${it(w)}/${q}/+archive/refs/heads/${I}${st}`;if(X==="sha")return`${it(w)}/${q}/+archive/${I}${st}`;throw new Error(`Unsupported gitiles ref type: ${X}`)}function ft(w){return w.password?"/a/":"/"}function it(w){if(!w.baseUrl||!w.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(w.gitilesBaseUrl.startsWith(w.baseUrl))return w.gitilesBaseUrl.replace(w.baseUrl.concat("/"),w.baseUrl.concat(ft(w)));if(w.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return w.gitilesBaseUrl}function U(w,l){const{branch:E,project:I}=Tt(w,l);return`${w.baseUrl}${ft(w)}projects/${encodeURIComponent(I)}/branches/${E}`}function V(w,l){const{project:E}=Tt(w,l);return`${w.cloneUrl}${ft(w)}${E}`}function et(w,l){const{ref:E,refType:I,path:q,project:X}=at(w,l);if(I==="branch")return`${w.baseUrl}${ft(w)}projects/${encodeURIComponent(X)}/branches/${E}/files/${encodeURIComponent(q)}/content`;if(I==="sha")return`${w.baseUrl}${ft(w)}projects/${encodeURIComponent(X)}/commits/${E}/files/${encodeURIComponent(q)}/content`;throw new Error(`Unsupported gitiles ref type: ${I}`)}function bt(w){return`${w.baseUrl}${ft(w)}projects/`}function ht(w){const l={};if(!w.password)return l;const E=gt.from(`${w.username}:${w.password}`,"utf8");return l.Authorization=`Basic ${E.toString("base64")}`,{headers:l}}async function Bt(w){const l=await w.text();if(l.startsWith(St))try{return JSON.parse(l.slice(St.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 Ut{integrationConfig;static factory=({config:l})=>{const E=Ct(l.getOptionalConfigArray("integrations.gerrit")??[]);return(0,n.oS)(E.map(I=>new Ut(I)),I=>I.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:I,lineNumber:q}=l;let X;if(E.startsWith("/")){const{basePath:st}=at(this.config,I);return st+E}return E?X=new URL(E,I):X=new URL(I),q&&(X.hash=q.toString()),X.toString()}resolveEditUrl(l){return l}}var Nt=t(36021);const Ht="gitlab.com",Vt="https://gitlab.com/api/v4";function te(w){const l=w.getString("host");let E=w.getOptionalString("apiBaseUrl");const I=w.getOptionalString("token")?.trim();let q=w.getOptionalString("baseUrl");if(E?E=(0,Q.trimEnd)(E,"/"):l===Ht&&(E=Vt),q?q=(0,Q.trimEnd)(q,"/"):q=`https://${l}`,(0,n.HO)(l)){if(!E||!(0,n.AY)(E))throw new Error(`Invalid GitLab integration config, '${E}' is not a valid apiBaseUrl`);if(!(0,n.AY)(q))throw new Error(`Invalid GitLab integration config, '${q}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${l}' is not a valid host`);return{host:l,token:I,apiBaseUrl:E,baseUrl:q,commitSigningKey:w.getOptionalString("commitSigningKey")}}function jt(w){const l=w.map(te);return l.some(E=>E.host===Ht)||l.push({host:Ht,apiBaseUrl:Vt,baseUrl:`https://${Ht}`}),l}function kt(w){let l="";return w.host!==Ht&&(l=new URL(w.baseUrl).pathname),trimEnd(l,"/")}class ne{integrationConfig;static factory=({config:l})=>{const E=jt(l.getOptionalConfigArray("integrations.gitlab")??[]);return(0,n.oS)(E.map(I=>new ne(I)),I=>I.config.host)};constructor(l){this.integrationConfig=l}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return ge(l,"edit")}}function ge(w,l){return w.replace(/\/\-\/(blob|tree|edit)\//,`/-/${l}/`)}function Zt(w){const l=w.getString("host");let E=w.getOptionalString("baseUrl");const I=w.getOptionalString("username"),q=w.getOptionalString("password")?.trim();if((0,n.HO)(l)){if(E&&!(0,n.AY)(E))throw new Error(`Invalid Gitea integration config, '${E}' is not a valid baseUrl`)}else throw new Error(`Invalid Gitea integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}`,{host:l,baseUrl:E,username:I,password:q,commitSigningKey:w.getOptionalString("commitSigningKey")}}var oe=t(1048).hp;function le(w,l){const E=fe(w,l);return`${E.url}/${E.owner}/${E.name}/_edit/${E.ref}/${E.path}`}function tn(w,l){const E=fe(w,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/contents/${E.path}?ref=${E.ref}`}function se(w,l){const E=fe(w,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/archive/${E.ref}.tar.gz`}function rn(w,l){const E=fe(w,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/git/commits/${E.ref}`}function Te(w){const l={},{username:E,password:I}=w;return I?(E?l.Authorization=`basic ${oe.from(`${E}:${I}`).toString("base64")}`:l.Authorization=`token ${I}`,{headers:l}):l}function fe(w,l){const E=w.baseUrl??`https://${w.host}`;try{const[I,q,X,st,Rt,Wt,...Gt]=l.replace(E,"").split("/"),re=Gt.join("/").replace(/^\//,"");return{url:E,owner:q,name:X,ref:Wt,path:re}}catch(I){throw new Error(`Incorrect URL: ${l}, ${I}`)}}class Ge{config;static factory=({config:l})=>{const I=(l.getOptionalConfigArray("integrations.gitea")??[]).map(q=>Zt(q));return(0,n.oS)(I.map(q=>new Ge(q)),q=>q.config.host)};constructor(l){this.config=l}get type(){return"gitea"}get title(){return this.config.host}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return le(this.config,l)}}function me(w){const l=w.getString("host"),E=w.getOptionalString("token"),I=w.getOptionalString("apiKey");if(!(0,n.HO)(l))throw new Error(`Invalid Harness Code integration config, '${l}' is not a valid host`);return{host:l,apiKey:I,token:E}}function Ye(w,l){const E=Me(w,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 on(w,l){const E=Me(w,l);let I=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(I+=`/${E.orgName}`),E.projectName&&(I+=`/${E.projectName}`),I+=`/${E.repoName}/+/raw/${E.path}?routingId=${E.accountId}&git_ref=refs/heads/${E.refString}`,I}function un(w,l){const E=Me(w,l);let I=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(I+=`/${E.orgName}`),E.projectName&&(I+=`/${E.projectName}`),I+=`/${E.repoName}/+/archive/${E.branch}.zip?routingId=${E.accountId}`,I}function an(w,l){const E=Me(w,l);let I=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(I+=`/${E.orgName}`),E.projectName&&(I+=`/${E.projectName}`),I+=`/${E.repoName}/+/content?routingId=${E.accountId}&include_commit=true&git_ref=refs/heads/${E.branch}`,I}function Qe(w){const l={},{token:E,apiKey:I}=w;return I?l["x-api-key"]=I:E&&(l.Authorization=`Bearer ${E}`),{headers:l}}function Me(w,l){const E=`https://${w.host}`;try{const I=new URL(l),q=I.pathname.split("/").filter(de=>de!==""),X=I.pathname.split("/"),st=q.findIndex(de=>de==="account")+1,Rt=q[st],Wt=q.findIndex(de=>de==="orgs"),Gt=Wt!==-1?q[Wt+1]:"",re=q.findIndex(de=>de==="projects"),je=re!==-1?q[re+1]:"",Yt=q.findIndex((de,en)=>de==="repos"&&en>Math.max(st,Wt,re))+1,he=q[Yt],ae=X.slice(X.findIndex(de=>de==="files"||de==="edit")+1),Ue=ae.findIndex(de=>de==="~"),De=ae.slice(0,Ue).join("/"),bn=Ue!==-1?ae.slice(Ue+1).join("/").replace(/^\//,""):"";return{baseUrl:E,accountId:Rt,orgName:Gt,projectName:je,refString:De,path:bn,repoName:he,refDashStr:ae.slice(0,Ue).join("-"),branch:Ue!==-1?ae.slice(0,Ue).join("/"):ae.join("/")}}catch(I){throw new Error(`Incorrect URL: ${l}, ${I}`)}}class ze{config;static factory=({config:l})=>{const I=(l.getOptionalConfigArray("integrations.harness")??[]).map(q=>me(q));return(0,n.oS)(I.map(q=>new ze(q)),q=>q.config.host)};constructor(l){this.config=l}get type(){return"harness"}get title(){return this.config.host}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return Ye(this.config,l)}}const He="blob.core.windows.net";function cn(w){const l=w.getOptionalString("endpoint"),E=w.getString("accountName"),I=w.getOptionalString("accountKey")?.trim(),q=w.getOptionalString("sasToken")?.trim(),X=w.getOptionalString("connectionString")?.trim(),st=w.getOptionalString("endpointSuffix")?.trim();let Rt,Wt;if(l){try{const re=new URL(l);Rt=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 Rt=He;const Gt=w.has("aadCredential")?{clientId:w.getString("aadCredential.clientId"),tenantId:w.getString("aadCredential.tenantId"),clientSecret:w.getString("aadCredential.clientSecret")?.trim()}:void 0;if(I&&q)throw new Error(`Invalid Azure Blob Storage config for ${E}: Both account key and SAS token cannot be used simultaneously.`);if(Gt&&(I||q))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:Rt,endpoint:l,accountName:E,accountKey:I,sasToken:q,connectionString:X,endpointSuffix:st,aadCredential:Gt}}function Ee(w){const l=w.map(cn);return l.some(E=>E.host===He)||l.push({host:He}),l}class We{integrationConfig;static factory=({config:l})=>{const E=Ee(l.getOptionalConfigArray("integrations.azureBlobStorage")??[]);return(0,n.oS)(E.map(I=>new We(I)),I=>I.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,n.ku)(l)}resolveEditUrl(l){return l}}class Ve{byType;static fromConfig(l){return new Ve({awsS3:b.factory({config:l}),awsCodeCommit:d.factory({config:l}),azureBlobStorage:We.factory({config:l}),azure:$.factory({config:l}),bitbucket:xt.factory({config:l}),bitbucketCloud:G.factory({config:l}),bitbucketServer:ut.factory({config:l}),gerrit:Ut.factory({config:l}),github:Nt.U.factory({config:l}),gitlab:ne.factory({config:l}),gitea:Ge.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(I=>I.byUrl(l)).filter(Boolean);if(E.length>1){const I=E.filter(q=>!(q instanceof xt));I.length!==0&&(E=I)}return E[0]}byHost(l){return Object.values(this.byType).map(E=>E.byHost(l)).find(Boolean)}resolveUrl(l){const E=this.byUrl(l.base);return E?E.resolveUrl(l):(0,n.ku)(l)}resolveEditUrl(l){const E=this.byUrl(l);return E?E.resolveEditUrl(l):l}}var Ze=t(55309);class Be{static fromConfig(l){return Ve.fromConfig(l)}}const Ae=(0,Ze.y)({id:"integration.scmintegrations"})},36021:(H,S,t)=>{"use strict";t.d(S,{U:()=>f,F:()=>d});var n=t(59869),a=t(45250);const A="github.com",p="https://api.github.com",b="https://raw.githubusercontent.com";function g(y){const h=y.getOptionalString("host")??A;let x=y.getOptionalString("apiBaseUrl"),O=y.getOptionalString("rawBaseUrl");const P=y.getOptionalString("token")?.trim(),B=y.getOptionalConfigArray("apps")?.map(M=>({appId:M.getNumber("appId"),clientId:M.getString("clientId"),clientSecret:M.getString("clientSecret"),webhookSecret:M.getOptionalString("webhookSecret"),privateKey:M.getString("privateKey"),allowedInstallationOwners:M.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,n.HO)(h))throw new Error(`Invalid GitHub integration config, '${h}' is not a valid host`);return x?x=(0,a.trimEnd)(x,"/"):h===A&&(x=p),O?O=(0,a.trimEnd)(O,"/"):h===A&&(O=b),{host:h,apiBaseUrl:x,rawBaseUrl:O,token:P,apps:B}}function u(y){const h=y.map(g);return h.some(x=>x.host===A)||h.push({host:A,apiBaseUrl:p,rawBaseUrl:b}),h}class f{integrationConfig;static factory=({config:h})=>{const x=u(h.getOptionalConfigArray("integrations.github")??[]);return(0,n.oS)(x.map(O=>new f(O)),O=>O.config.host)};constructor(h){this.integrationConfig=h}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return d((0,n.ku)(h),"tree")}resolveEditUrl(h){return d(h,"edit")}parseRateLimitInfo(h){return{isRateLimited:h.status===429||h.status===403&&h.headers.get("x-ratelimit-remaining")==="0"}}}function d(y,h){return y.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(x,O,P,B)=>`//${O}/${P}/${B}/${h}/`)}},59869:(H,S,t)=>{"use strict";t.d(S,{AY:()=>g,HO:()=>b,ku:()=>f,oS:()=>u});var n=t(52536),a=t.n(n),A=t(45250),p=t.n(A);function b(y){const h=new URL("http://example.com");return h.host=y,h.host===y}function g(y){try{return new URL(y),!0}catch{return!1}}function u(y,h){return{list(){return y},byUrl(x){try{const O=typeof x=="string"?new URL(x):x;return y.find(P=>h(P)===O.host)}catch{return}},byHost(x){return y.find(O=>h(O)===x)}}}function f(y){const{url:h,base:x,lineNumber:O}=y;try{return new URL(h),h}catch{}let P;if(h.startsWith("/")){const{href:B,filepath:M}=a()(x);P=new URL(B);const R=(0,A.trimEnd)(P.pathname.substring(0,P.pathname.length-M.length),"/");P.pathname=`${R}${h}`}else P=new URL(h,x);return P.search=new URL(x).search,O&&(P.hash=`L${O}`),P.toString()}function d(y){beforeAll(()=>y.listen({onUnhandledRequest:"error"})),afterAll(()=>y.close()),afterEach(()=>y.resetHandlers())}},71543:(H,S,t)=>{"use strict";var n={};t.r(n),t.d(n,{TechDocsPlugin:()=>b.Ju});var a=t(31085),A=t(25873),p=t(18690),b=t(39278),g=t(8915),u=t(72020),f=t(99730),d=t(64947),y=t(12173),h=t(22020),x=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)(y.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),M=({step:r,error:e})=>{let s="";return r==="load-config"?s=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(s=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,a.jsx)(P,{children:(0,a.jsx)(y.M,{statusMessage:s,stack:e.stack})})},R=({error:r,resetError:e,plugin:s})=>(0,a.jsx)(h.b,{title:`Error in ${s?.getId()}`,defaultExpanded:!0,error:r,children:(0,a.jsx)(d.A,{variant:"outlined",onClick:e,children:"Retry"})}),D={Progress:x.k,Router:O.Kd,NotFoundErrorPage:B,BootErrorPage:M,ErrorBoundaryFallback:R},$="Invalid discovery URL pattern,";class N{parts;static compile(e){const s=e.split(/\{\{\s*pluginId\s*\}\}/),o=s.join("pluginId");let i;try{i=new URL(o)}catch{throw new Error(`${$} 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 N(s)}constructor(e){this.parts=e}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}}class J{endpoints;defaultEndpoint;static fromConfig(e,s){const o=s?.pathPattern??"/api/{{ pluginId }}",i=e.getString("backend.baseUrl"),c=e.getOptionalConfigArray("discovery.endpoints")?.flatMap(C=>{const v=typeof C.get("target")=="object"?C.getOptionalString("target.external"):C.getString("target");if(!v)return[];const T=N.compile(v);return C.getStringArray("plugins").map(W=>[W,T])});return new J(new Map(c),N.compile(`${i}${o}`))}constructor(e,s){this.endpoints=e,this.defaultEndpoint=s}async getBaseUrl(e){const s=this.endpoints.get(e);return s?s.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(s=>s.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(s=>s.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,s,o){const i=typeof e=="function"?{next:e,error:s,complete:o}:e;return this.observable.subscribe(i)}}class dt{isClosed;currentValue;terminatingError;observable;constructor(e){this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(Y())(s=>this.isClosed?(this.terminatingError?s.error(this.terminatingError):s.complete(),()=>{}):(s.next(this.currentValue),this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=e,this.subscribers.forEach(s=>s.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(s=>s.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,s,o){const i=typeof e=="function"?{next:e,error:s,complete:o}:e;return this.observable.subscribe(i)}}class G{subject=new K;post(e){this.subject.next(e)}alert$(){return this.subject}}class Q{captureEvent(e){}}class Z{alertApi;errorApi;constructor(e,s){this.alertApi=e,this.errorApi=s}post(e,s){return s?.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,s)}error$(){return this.errorApi.error$()}}class ct{subject=new K;post(e,s){this.subject.next({error:e,context:s})}error$(){return this.subject}}class pt{static forward(e,s){window.addEventListener("unhandledrejection",o=>{e.post(o.reason,s)})}}const vt=new Map;class xt{namespace;errorApi;constructor(e,s){this.namespace=e,this.errorApi=s,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 xt(e.namespace??"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[s,o]of vt.entries())e.key?.startsWith(s)&&o.handleStorageChange(e.key)})}get(e){return this.snapshot(e).value}snapshot(e){let s,o="absent";try{const i=localStorage.getItem(this.getKeyName(e));i&&(s=JSON.parse(i,(c,C)=>(typeof C=="object"&&C!==null&&Object.freeze(C),C)),o="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:s,presence:o}}forBucket(e){const s=`${this.namespace}/${e}`;return vt.has(s)||vt.set(s,new xt(s,this.errorApi)),vt.get(s)}async set(e,s){localStorage.setItem(this.getKeyName(e),JSON.stringify(s)),this.notifyChanges(e)}async remove(e){localStorage.removeItem(this.getKeyName(e)),this.notifyChanges(e)}observe$(e){return xt.hasSubscribed||(xt.addStorageEventListener(),xt.hasSubscribed=!0),this.observable.filter(({key:s})=>s===e)}handleStorageChange(e){if(!e?.startsWith(this.namespace))return;const s=e?.slice(`${this.namespace}/`.length);s.includes("/")||this.notifyChanges(decodeURIComponent(s))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const s=this.snapshot(e);for(const o of this.subscribers)o.next(s)}subscribers;observable}function Pt(r){let e=r.baseImplementation||t.g.fetch;const s=[r.middleware??[]].flat().reverse();for(const o of s)e=o.apply(e);return{fetch:e}}class It{identityApi;allowUrl;headerName;headerValue;static create(e){const s=ut(e),o=e.header?.name||"authorization",i=e.header?.value||(c=>`Bearer ${c}`);return new It(e.identityApi,s,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(C=>i.replace(/\{\{\s*pluginId\s*\}\}/g,C))})}constructor(e,s,o,i){this.identityApi=e,this.allowUrl=s,this.headerName=o,this.headerValue=i}apply(e){return async(s,o)=>{const i=new Request(s,o),{token:c}=await this.identityApi.getCredentials();return i.headers.get(this.headerName)||typeof c!="string"||!c||!this.allowUrl(i.url)?e(s,o):(i.headers.set(this.headerName,this.headerValue(c)),e(i))}}}function 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(s=>s.replace(/\/$/,""));return s=>e.some(o=>s===o||s.startsWith(`${o}/`))}function Ct(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class gt{discoveryApi;constructor(e){this.discoveryApi=e}apply(e){return async(s,o)=>{const i=new Request(s,o),c="plugin://";if(!i.url.startsWith(c))return e(s,o);const{hostname:C,pathname:v,search:T,hash:W,username:nt,password:yt}=new URL(`http://${i.url.substring(c.length)}`);let ot=await this.discoveryApi.getBaseUrl(C);if(nt||yt){const Lt=new URL(ot),Qt=`${nt}${yt?`:${yt}`:""}@`;ot=`${Lt.protocol}//${Qt}${Lt.host}${Lt.pathname}`}const Et=`${Ct(ot,v)}${T}${W}`;return e(Et,typeof s=="string"||St(s)?o:s)}}}function St(r){return typeof r=="object"&&r?.constructor===URL}class Tt{static resolvePluginProtocol(e){return new gt(e.discoveryApi)}static injectIdentityAuth(e){return It.create(e)}constructor(){}}function at(r,e){for(const s of e)if(!r.has(s))return!1;return!0}function mt(r,...e){const s=new Set(r);for(const o of e)for(const i of o)s.add(i);return s}class At{requests=[];subject=new dt(this.getCurrentPending());request(e){return new Promise((s,o)=>{this.requests.push({scopes:e,resolve:s,reject:o}),this.subject.next(this.getCurrentPending())})}resolve(e,s){this.requests=this.requests.filter(o=>at(e,o.scopes)?(o.resolve(s),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(s=>s.reject(e)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const e=this.requests.length===0?void 0:this.requests.slice(1).reduce((s,o)=>mt(s,o.scopes),this.requests[0].scopes);return{scopes:e,resolve:s=>{e&&this.resolve(e,s)},reject:s=>{e&&this.reject(s)}}}}class tt{subject=new dt([]);currentRequests=[];handlerCount=0;createAuthRequester(e){const s=new At,o=this.handlerCount;return this.handlerCount++,s.pending().subscribe({next:i=>{const c=this.currentRequests.slice(),C=this.makeAuthRequest(i,e);C?c[o]=C:delete c[o],this.currentRequests=c,this.subject.next(c.filter(Boolean))}}),i=>s.request(i)}makeAuthRequest(e,s){const{scopes:o}=e;if(o)return{provider:s.provider,trigger:async()=>{const i=await s.onAuthRequest(o);e.resolve(i)},reject:()=>{const i=new Error("Login failed, rejected by user");i.name="RejectedError",e.reject(i)}}}authRequest$(){return this.subject}}function ft(r){return new Promise((e,s)=>{const o=r.width||500,i=r.height||700,c=window.screen.width/2-o/2,C=window.screen.height/2-i/2,v=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${o},height=${i},top=${C},left=${c}`);let T="";if(!v||typeof v.closed>"u"||v.closed){const ot=new Error("Failed to open auth popup.");ot.name="PopupRejectedError",s(ot);return}const W=ot=>{if(ot.source!==v||ot.origin!==r.origin)return;const{data:Et}=ot;if(Et.type==="config_info"){T=Et.targetOrigin;return}if(Et.type!=="authorization_response")return;const Lt=Et;if("error"in Lt){const Qt=new Error(Lt.error.message);Qt.name=Lt.error.name,s(Qt)}else e(Lt.response);yt()},nt=setInterval(()=>{if(v.closed){const ot=`Login failed, ${T&&T!==window.location.origin?`Incorrect app origin, expected ${T}`:"popup was closed"}`,Et=new Error(ot);Et.name="PopupClosedError",s(Et),yt()}},100);function yt(){window.removeEventListener("message",W),clearInterval(nt)}window.addEventListener("message",W)})}let it=!1;function U(r){return[...r].join(" ")}class V{discoveryApi;environment;provider;joinScopesFunc;authRequester;sessionTransform;enableExperimentalRedirectFlow;popupOptions;constructor(e){const{configApi:s,discoveryApi:o,environment:i,provider:c,joinScopes:C=U,oauthRequestApi:v,sessionTransform:T=nt=>nt,popupOptions:W}=e;!it&&!s&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),it=!0),this.enableExperimentalRedirectFlow=s?s.getOptionalBoolean("enableExperimentalRedirectFlow")??!1:!1,this.authRequester=v.createAuthRequester({provider:c,onAuthRequest:async nt=>this.enableExperimentalRedirectFlow?this.executeRedirect(nt):this.showPopup(nt)}),this.discoveryApi=o,this.environment=i,this.provider=c,this.joinScopesFunc=C,this.sessionTransform=T,this.popupOptions=W}async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const s=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(i=>{throw new Error(`Auth refresh request failed, ${i}`)});if(!s.ok){const i=new Error(`Auth refresh request failed, ${s.statusText}`);throw i.status=s.status,i}const o=await s.json();if(o.error){const i=new Error(o.error.message);throw o.error.name&&(i.name=o.error.name),i}return await this.sessionTransform(o)}async removeSession(){const e=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(s=>{throw new Error(`Logout request failed, ${s}`)});if(!e.ok){const s=new Error(`Logout request failed, ${e.statusText}`);throw s.status=e.status,s}}async showPopup(e){const s=this.joinScopesFunc(e),o=await this.buildUrl("/start",{scope:s,origin:window.location.origin,flow:"popup"}),i=this.popupOptions?.size?.fullscreen?window.screen.width:this.popupOptions?.size?.width||450,c=this.popupOptions?.size?.fullscreen?window.screen.height:this.popupOptions?.size?.height||730,C=await ft({url:o,name:`${this.provider.title} Login`,origin:new URL(o).origin,width:i,height:c});return await this.sessionTransform(C)}async executeRedirect(e){const s=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:s,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,s){const o=await this.discoveryApi.getBaseUrl("auth"),i=this.buildQueryString({...s,env:this.environment});return`${o}/${this.provider.id}${e}${i}`}buildQueryString(e){if(!e)return"";const s=Object.entries(e).map(([o,i])=>{if(typeof i=="string")return`${encodeURIComponent(o)}=${encodeURIComponent(i)}`;if(i)return encodeURIComponent(o)}).filter(Boolean).join("&");return s?`?${s}`:""}}function et(r,e){for(const s of e)if(!r.has(s))return!1;return!0}class bt{options;constructor(e){this.options=e}sessionExistsAndHasScope(e,s){if(!e)return!1;if(!s||this.options.sessionScopes===void 0)return!0;const o=this.options.sessionScopes(e);return et(o,s)}getExtendedScope(e,s){const o=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const i=this.options.sessionScopes(e);for(const c of i)o.add(c)}if(s)for(const i of s)o.add(i);return o}}var ht=t(55309),Bt=function(r){return r.SignedIn="SignedIn",r.SignedOut="SignedOut",r}({});const Ut=(0,ht.y)({id:"core.auth.google"}),Nt=(0,ht.y)({id:"core.auth.github"}),Ht=(0,ht.y)({id:"core.auth.okta"}),Vt=(0,ht.y)({id:"core.auth.gitlab"}),te=(0,ht.y)({id:"core.auth.microsoft"}),jt=(0,ht.y)({id:"core.auth.onelogin"}),kt=(0,ht.y)({id:"core.auth.bitbucket"}),ne=(0,ht.y)({id:"core.auth.bitbucket-server"}),ge=(0,ht.y)({id:"core.auth.atlassian"}),Zt=(0,ht.y)({id:"core.auth.vmware-cloud"});class oe{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 oe;refreshPromise;currentSession;constructor(e){const{connector:s,defaultScopes:o=new Set,sessionScopes:i,sessionShouldRefresh:c}=e;this.connector=s,this.sessionScopesFunc=i,this.sessionShouldRefreshFunc=c,this.helper=new bt({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 et(c,i)&&(this.currentSession=o),o}catch(o){if(e.optional)return;throw o}}if(!e.instantPopup)try{const s=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=s,this.getSession(e)}catch{}if(!e.optional)return this.currentSession=await this.connector.createSession({...e,scopes:this.helper.getExtendedScope(this.currentSession,e.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(e){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession(this.helper.getExtendedScope(this.currentSession,e));try{const s=await this.refreshPromise;if(!this.helper.sessionExistsAndHasScope(s,e))throw new Error("Refreshed session did not receive the required scopes");return this.stateTracker.setIsSignedIn(!0),s}finally{delete this.refreshPromise}}}const tn={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class se{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=tn,oauthRequestApi:C,defaultScopes:v=[],scopeTransform:T=ot=>ot,popupOptions:W}=e,nt=new V({configApi:s,discoveryApi:o,environment:i,provider:c,oauthRequestApi:C,sessionTransform({backstageIdentity:ot,...Et}){const Lt={...Et,providerInfo:{idToken:Et.providerInfo.idToken,accessToken:Et.providerInfo.accessToken,scopes:se.normalizeScopes(T,Et.providerInfo.scope),expiresAt:Et.providerInfo.expiresInSeconds?new Date(Date.now()+Et.providerInfo.expiresInSeconds*1e3):void 0}};return ot&&(Lt.backstageIdentity={token:ot.token,identity:ot.identity,expiresAt:ot.expiresInSeconds?new Date(Date.now()+ot.expiresInSeconds*1e3):void 0}),Lt},popupOptions:W}),yt=new le({connector:nt,defaultScopes:new Set(v),sessionScopes:ot=>ot.providerInfo.scopes,sessionShouldRefresh:ot=>{let Et=1/0;return ot.providerInfo?.expiresAt&&(Et=Math.min(Et,(ot.providerInfo.expiresAt.getTime()-Date.now())/1e3)),ot.backstageIdentity?.expiresAt&&(Et=Math.min(Et,(ot.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),Et<60*3}});return new se({sessionManager:yt,scopeTransform:T})}sessionManager;scopeTransform;constructor(e){this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,s){const o=se.normalizeScopes(this.scopeTransform,e);return(await this.sessionManager.getSession({...s,scopes:o}))?.providerInfo.accessToken??""}async getIdToken(e={}){return(await this.sessionManager.getSession({...e,scopes:new Set(["openid"])}))?.providerInfo.idToken??""}async getBackstageIdentity(e={}){return(await this.sessionManager.getSession(e))?.backstageIdentity}async getProfile(e={}){return(await this.sessionManager.getSession(e))?.profile}static normalizeScopes(e,s){if(!s)return new Set;const o=Array.isArray(s)?s:s.split(/[\s|,]/).filter(Boolean);return new Set(e(o))}}const rn={id:"google",title:"Google",icon:()=>null},Te="https://www.googleapis.com/auth/";class fe{static create(e){const{configApi:s,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:C=rn,defaultScopes:v=["openid",`${Te}userinfo.email`,`${Te}userinfo.profile`]}=e;return se.create({configApi:s,discoveryApi:o,oauthRequestApi:i,provider:C,environment:c,defaultScopes:v,scopeTransform(T){return T.map(W=>W==="openid"?W:W==="profile"||W==="email"?`${Te}userinfo.${W}`:W.startsWith(Te)?W:`${Te}${W}`)}})}}const Ge={id:"microsoft",title:"Microsoft",icon:()=>null};class me{oauth2;configApi;environment;provider;oauthRequestApi;discoveryApi;scopeTransform;static MicrosoftGraphID="00000003-0000-0000-c000-000000000000";static create(e){return new me(e)}constructor(e){const{configApi:s,environment:o="development",provider:i=Ge,oauthRequestApi:c,discoveryApi:C,defaultScopes:v=["openid","offline_access","profile","email","User.Read"],scopeTransform:T=W=>W.concat("offline_access")}=e;this.configApi=s,this.environment=o,this.provider=i,this.oauthRequestApi=c,this.discoveryApi=C,this.scopeTransform=T,this.oauth2={[me.MicrosoftGraphID]:se.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:v})}}microsoftGraph(){return this.oauth2[me.MicrosoftGraphID]}static resourceForScopes(e){const s=[...new Set(e.split(" ").map(me.resourceForScope).filter(i=>i!=="openid"))];if(s.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${s.join(", ")}. Access tokens can only have a single audience.`));const o=s[0]??me.MicrosoftGraphID;return Promise.resolve(o)}static resourceForScope(e){const s=e.match(/^(?<resourceURI>.*)\/(?<scp>[^\/]*)$/)?.groups;if(s){const{resourceURI:o}=s;return o.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return me.MicrosoftGraphID}}async getAccessToken(e,s){const o=e===void 0?me.MicrosoftGraphID:await me.resourceForScopes(Array.isArray(e)?e.join(" "):e);return o in this.oauth2||(this.oauth2[o]=se.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[o].getAccessToken(e,s)}getIdToken(e){return this.microsoftGraph().getIdToken(e)}getProfile(e){return this.microsoftGraph().getProfile(e)}getBackstageIdentity(e){return this.microsoftGraph().getBackstageIdentity(e)}signIn(){return this.microsoftGraph().signIn()}signOut(){return this.microsoftGraph().signOut()}sessionState$(){return this.microsoftGraph().sessionState$()}}const Ye={id:"github",title:"GitHub",icon:()=>null};class on{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=Ye,oauthRequestApi:C,defaultScopes:v=["read:user"]}=e;return se.create({configApi:s,discoveryApi:o,oauthRequestApi:C,provider:c,environment:i,defaultScopes:v})}}const un={id:"okta",title:"Okta",icon:()=>null},an=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Qe="okta.";class Me{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=un,oauthRequestApi:C,defaultScopes:v=["openid","email","profile","offline_access"]}=e;return se.create({configApi:s,discoveryApi:o,oauthRequestApi:C,provider:c,environment:i,defaultScopes:v,scopeTransform(T){return T.map(W=>an.has(W)||W.startsWith(Qe)?W:`${Qe}${W}`)}})}}const ze={id:"gitlab",title:"GitLab",icon:()=>null};class He{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=ze,oauthRequestApi:C,defaultScopes:v=["read_user"]}=e;return se.create({configApi:s,discoveryApi:o,oauthRequestApi:C,provider:c,environment:i,defaultScopes:v})}}const cn={id:"onelogin",title:"onelogin",icon:()=>null},Ee=new Set(["openid","profile","email","phone","address","groups","offline_access"]),We="onelogin.";class Ve{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=cn,oauthRequestApi:C}=e;return se.create({configApi:s,discoveryApi:o,oauthRequestApi:C,provider:c,environment:i,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(v){return v.map(T=>Ee.has(T)||T.startsWith(We)?T:`${We}${T}`)}})}}const Ze={id:"bitbucket",title:"Bitbucket",icon:()=>null};class Be{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=Ze,oauthRequestApi:C,defaultScopes:v=["account"]}=e;return se.create({configApi:s,discoveryApi:o,oauthRequestApi:C,provider:c,environment:i,defaultScopes:v})}}const Ae={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class w{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=Ae,oauthRequestApi:C,defaultScopes:v=["PROJECT_ADMIN"]}=e;return se.create({configApi:s,discoveryApi:o,oauthRequestApi:C,provider:c,environment:i,defaultScopes:v})}}const l={id:"atlassian",title:"Atlassian",icon:()=>null};class E{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=l,oauthRequestApi:C}=e;return se.create({configApi:s,discoveryApi:o,oauthRequestApi:C,provider:c,environment:i})}}const I={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class q{static create(e){const{configApi:s,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:C=I,defaultScopes:v=["openid"]}=e;return se.create({configApi:s,discoveryApi:o,oauthRequestApi:i,provider:C,environment:c,defaultScopes:v})}}var X=t(12935),st=t(57405),Rt=t(65461),Wt=t(36017),Gt=t(99303),re=t(39837);const je=(0,ht.y)({id:"core.storage"});var Yt=t(70795),he=t(16009);const ae=(0,ht.y)({id:"core.oauthrequest"});var Ue=t(96824),De=t(70835),bn=t(10288),de=t.n(bn),en=t(20938),Kt=t(46195),Ke=t(54241),ns=t(13646);const hn=Kt.z.lazy(()=>Kt.z.object({rule:Kt.z.string(),resourceType:Kt.z.string(),params:Kt.z.record(Kt.z.any()).optional()}).or(Kt.z.object({anyOf:Kt.z.array(hn).nonempty()})).or(Kt.z.object({allOf:Kt.z.array(hn).nonempty()})).or(Kt.z.object({not:hn}))),Ks=Kt.z.object({result:Kt.z.literal(Ke.b.ALLOW).or(Kt.z.literal(Ke.b.DENY))}),ss=Kt.z.object({result:Kt.z.array(Kt.z.union([Kt.z.literal(Ke.b.ALLOW),Kt.z.literal(Ke.b.DENY)]))}),rs=Kt.z.union([Kt.z.object({result:Kt.z.literal(Ke.b.ALLOW).or(Kt.z.literal(Ke.b.DENY))}),Kt.z.object({result:Kt.z.literal(Ke.b.CONDITIONAL),pluginId:Kt.z.string(),resourceType:Kt.z.string(),conditions:hn})]),os=(r,e)=>Kt.z.object({items:Kt.z.array(Kt.z.intersection(Kt.z.object({id:Kt.z.string()}),r)).refine(s=>s.length===e.size&&s.every(({id:o})=>e.has(o)),{message:"Items in response do not match request"})});class as{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,s){return this.enabled?this.enableBatchedRequests?this.makeBatchedRequest(e,s):this.makeRequest(e,Ks,s):e.map(o=>({result:Ke.b.ALLOW}))}async authorizeConditional(e,s){return this.enabled?this.makeRequest(e,rs,s):e.map(o=>({result:Ke.b.ALLOW}))}async makeRequest(e,s,o){const i={items:e.map(v=>({id:en.A(),...v}))},C=(await this.makeRawRequest(i,s,o)).items.reduce((v,T)=>(v[T.id]=T,v),{});return i.items.map(v=>C[v.id])}async makeBatchedRequest(e,s){const o={};for(const C of e){const{permission:v,resourceRef:T}=C;(0,ns.OL)(v)?(o[v.name]||={permission:v,resourceRef:[],id:en.A()},T&&o[v.name].resourceRef?.push(T)):o[v.name]||={permission:v,id:en.A()}}const c=(await this.makeRawRequest({items:Object.values(o)},ss,s)).items.reduce((C,v)=>(C[v.id]=v,C),{});return e.map(C=>{const{id:v}=o[C.permission.name],T=c[v];return{result:C.resourceRef?T.result.shift():T.result[0]}})}async makeRawRequest(e,s,o){const i=await this.discovery.getBaseUrl("permission"),c=await de()(`${i}/authorize`,{method:"POST",body:JSON.stringify(e),headers:{...this.getAuthorizationHeader(o?.token),"content-type":"application/json"}});if(!c.ok)throw await De.o.fromResponse(c);const C=await c.json();return os(s,new Set(e.items.map(({id:v})=>v))).parse(C)}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}}class pn{permissionClient;identityApi;constructor(e,s){this.permissionClient=e,this.identityApi=s}static create(e){const{config:s,discovery:o,identity:i}=e,c=new as({discovery:o,config:s});return new pn(c,i)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}}const is=[(0,X.b)({api:st.I,deps:{configApi:Rt.U},factory:({configApi:r})=>J.fromConfig(r)}),(0,X.b)({api:Wt.k,deps:{},factory:()=>new G}),(0,X.b)({api:Gt.c,deps:{},factory:()=>new Q}),(0,X.b)({api:re.m,deps:{alertApi:Wt.k},factory:({alertApi:r})=>{const e=new Z(r,new ct);return pt.forward(e,{hidden:!1}),e}}),(0,X.b)({api:je,deps:{errorApi:re.m},factory:({errorApi:r})=>xt.create({errorApi:r})}),(0,X.b)({api:Yt.a,deps:{configApi:Rt.U,identityApi:he.K,discoveryApi:st.I},factory:({configApi:r,identityApi:e,discoveryApi:s})=>Pt({middleware:[Tt.resolvePluginProtocol({discoveryApi:s}),Tt.injectIdentityAuth({identityApi:e,config:r})]})}),(0,X.b)({api:ae,deps:{},factory:()=>new tt}),(0,X.b)({api:Ut,deps:{discoveryApi:st.I,oauthRequestApi:ae,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>fe.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,X.b)({api:te,deps:{discoveryApi:st.I,oauthRequestApi:ae,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>me.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,X.b)({api:Nt,deps:{discoveryApi:st.I,oauthRequestApi:ae,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>on.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:s.getOptionalString("auth.environment")})}),(0,X.b)({api:Ht,deps:{discoveryApi:st.I,oauthRequestApi:ae,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Me.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,X.b)({api:Vt,deps:{discoveryApi:st.I,oauthRequestApi:ae,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>He.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,X.b)({api:jt,deps:{discoveryApi:st.I,oauthRequestApi:ae,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Ve.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,X.b)({api:kt,deps:{discoveryApi:st.I,oauthRequestApi:ae,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Be.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:s.getOptionalString("auth.environment")})}),(0,X.b)({api:ne,deps:{discoveryApi:st.I,oauthRequestApi:ae,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>w.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"],environment:s.getOptionalString("auth.environment")})}),(0,X.b)({api:ge,deps:{discoveryApi:st.I,oauthRequestApi:ae,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>E.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,X.b)({api:Zt,deps:{discoveryApi:st.I,oauthRequestApi:ae,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>q.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,X.b)({api:Ue.x,deps:{discovery:st.I,identity:he.K,config:Rt.U},factory:({config:r,discovery:e,identity:s})=>pn.create({config:r,discovery:e,identity:s})})];var jn=t(14451),cs=t(27799),Sn=t(94389),ls=t(20947),Un=t(20473),gn=t(45917),ds=t(39347),us=t(63309),hs=t(82451),ps=t(85121),$n=t(17400),gs=t(42226),fs=t(69550),Fn=t(52755),Nn=t(89350),ms=t(8911),On=t(33602),Pn=t(48108),ys=t(77225),kn=t(55700),Wn=t(71865),vs=t(80109),Es=t(15303),As=t(39330);const xs={brokenImage:cs.A,catalog:ms.A,scaffolder:ls.A,techdocs:Un.A,search:gn.A,chat:ds.A,dashboard:us.A,docs:hs.A,email:ps.A,github:gs.A,group:On.A,help:fs.A,"kind:api":$n.A,"kind:component":Nn.A,"kind:domain":jn.A,"kind:group":On.A,"kind:location":Fn.A,"kind:system":Sn.A,"kind:user":Pn.A,"kind:resource":kn.A,"kind:template":Wn.A,user:Pn.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),Kn=t(12285),Ps=t(87271),ws=t(64636);ws.A.configure(r=>`v5-${r}`);const Ts=(0,bs.A)({productionPrefix:"jss4-"});function zn(r){const{children:e,theme:s,noCssBaseline:o=!1}=r,i=s.getTheme("v4"),c=s.getTheme("v5");let C;o||(C=(0,a.jsx)(Cs.Ay,{}));let v=(0,a.jsxs)(a.Fragment,{children:[C,e]});return i&&(v=(0,a.jsx)(Ss.Ay,{generateClassName:Ts,children:(0,a.jsx)(Os.A,{theme:i,children:v})})),c&&(v=(0,a.jsx)(Kn.A,{injectFirst:!0,children:(0,a.jsx)(Ps.A,{theme:c,children:v})})),v}const fn={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 Rs=t(98392),wn=t(17161);const $e={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")`},Fe={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"],greens:["#4BB8A5","#187656"]};function Ne(r){const{colors:e,shape:s,options:o}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,C=`${s}, ${c}`,v=o?.fontColor??"#FFFFFF";return{colors:e,shape:s,backgroundImage:C,fontColor:v}}const zs={home:Ne({colors:Fe.teal,shape:$e.wave}),documentation:Ne({colors:Fe.pinkSea,shape:$e.wave2}),tool:Ne({colors:Fe.purpleSky,shape:$e.round}),service:Ne({colors:Fe.marineBlue,shape:$e.wave}),website:Ne({colors:Fe.veryBlue,shape:$e.wave}),library:Ne({colors:Fe.rubyRed,shape:$e.wave}),other:Ne({colors:Fe.darkGrey,shape:$e.wave}),app:Ne({colors:Fe.toastyOrange,shape:$e.wave}),apis:Ne({colors:Fe.teal,shape:$e.wave2}),card:Ne({colors:Fe.greens,shape:$e.wave})},m=16,L='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',j="home",F={htmlFontSize:m,fontFamily:L,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 k(r){const{palette:e,htmlFontSize:s=m,fontFamily:o=L,defaultPageTheme:i=j,pageTheme:c=zs,typography:C}=r;if(!c[i])throw new Error(`${i} is not defined in pageTheme.`);return F.htmlFontSize=s,F.fontFamily=o,{palette:e,typography:C??F,page:c[i],getPageTheme:({themeId:v})=>c[v]??c[i]}}var _=t(80012);const rt={MuiCssBaseline:{styleOverrides:r=>({html:{height:"100%",fontFamily:r.typography.fontFamily},body:{height:"100%",fontFamily:r.typography.fontFamily,overscrollBehaviorY:"none",fontSize:"0.875rem",lineHeight:1.43,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:r.palette.background.paper,width:"1em"},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:r.palette.textVerySubtle,border:`3px solid ${r.palette.background.paper}`},"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active":{backgroundColor:r.palette.mode==="dark"?(0,_.a)(r.palette.textVerySubtle,.2):(0,_.e$)(r.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.mode==="dark"?(0,_.a)(r.palette.textVerySubtle,.2):(0,_.e$)(r.palette.textVerySubtle,.2)}},a:{color:"inherit",textDecoration:"none"}})},MuiGrid:{defaultProps:{spacing:2}},MuiSwitch:{defaultProps:{color:"primary"}},MuiTableRow:{styleOverrides:{root:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.default}}),hover:{"&:hover":{cursor:"pointer"}},head:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.paper}})}},MuiTableCell:{styleOverrides:{root:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:r.spacing(3,2,3,2.5),borderBottom:0}),sizeSmall:({theme:r})=>({padding:r.spacing(1.5,2,1.5,2.5)}),head:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",color:r.palette.textSubtle,fontWeight:"normal",lineHeight:"1"})}},MuiTabs:{styleOverrides:{root:{minHeight:24}}},MuiTab:{styleOverrides:{root:({theme:r})=>({color:r.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,_.e$)(r.palette.link,.3),background:(0,_.a)(r.palette.link,.95)},[r.breakpoints.up("md")]:{minWidth:120,fontSize:r.typography.pxToRem(14),fontWeight:500}}),textColorPrimary:({theme:r})=>({color:r.palette.link})}},MuiTableSortLabel:{styleOverrides:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"},"&: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"}}}},wt=r=>(...e)=>{const s=e.length===0?[1]:e,o=(i,c)=>typeof i=="string"?i:c*i;return s.map(i=>{const c=o(i,r);return typeof c=="number"?`${c}px`:c}).join(" ")};function Dt(r,e){if(!e||typeof e=="string")return;const s=typeof e=="function"?e(r):e;if(s)return{"@global":s}}function $t(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const s={...r},o=r.spacing(1);return typeof o=="number"&&(s.spacing=wt(o)),Object.fromEntries(Object.entries(e).map(([i,c])=>typeof c=="function"?[i,c({theme:s})]:[i,c]))}return e}}const Mt=/^&.Mui-([\w-]+)$/;function Ft(r){let e=r;if(!r||typeof r!="object")return e;for(const s of Object.keys(r)){const o=r[s];if(!(!o||typeof o!="object"))for(const i of Object.keys(o)){const c=i,C=c.match(Mt);if(C){const[,v]=C,{[c]:T,...W}=o;T&&(e={...e,[s]:W,[v]:T})}}}return e}function _t(r,e={}){const s={},o={};for(const i of Object.keys(e)){const c=e[i];c&&("styleOverrides"in c&&(i==="MuiCssBaseline"?s[i]=Dt(r,c.styleOverrides):s[i]=Ft($t(r,c.styleOverrides))),"defaultProps"in c&&(o[i]=c.defaultProps))}return{overrides:s,props:o}}class pe{#t=new Map;constructor(e,s){this.#t=new Map,e&&this.#t.set("v4",e),s&&this.#t.set("v5",s)}getTheme(e){return this.#t.get(e)}}function zt(r){const e=k(r),s={...rt,...r.components},o=(0,wn.A)({...e,components:s}),i=_t(o,s),c={...(0,Rs.A)(e),...i};return new pe(c,o)}function qt(r){const e=adaptV4Theme(r),s=createTheme(r);return new pe(s,createV5Theme(e))}const ye={light:zt({palette:fn.light}),dark:zt({palette:fn.dark})};var ie=t(75962),Jt=t(87145);const Xt=[{id:"light",title:"Light Theme",variant:"light",icon:(0,a.jsx)(Jt.A,{}),Provider:({children:r})=>(0,a.jsx)(zn,{theme:ye.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,a.jsx)(ie.A,{}),Provider:({children:r})=>(0,a.jsx)(zn,{theme:ye.dark,children:r})}];var Ot=t(14041),ee=t(73466),ce=t(39067),ue=t.n(ce);class Je{holders;constructor(...e){this.holders=e}get(e){for(const s of this.holders){const o=s.get(e);if(o)return o}}}var Se=t(43836),Xe=t(10602);const nn=(0,Se.tK)("api-context"),ve=r=>{const{apis:e,children:s}=r,o=(0,Ot.useContext)(nn)?.atVersion(1),i=o?new Je(e,o):e;return(0,a.jsx)(nn.Provider,{value:(0,Xe.B)({1:i}),children:s})};ve.propTypes={apis:ue().shape({get:ue().func.isRequired}).isRequired,children:ue().node};const Hs=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function mn(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Is(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Is):Object.fromEntries(Object.entries(r).map(([e,s])=>[e,Is(s)]))}function Tn(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:Tn(e);if(typeof r!="object"||Array.isArray(r))return r;const s=mn(e)?e:{},o={};for(const i of new Set([...Object.keys(r),...Object.keys(s)])){const c=Tn(r[i],s[i]);c!==void 0&&(o[i]=c)}return o}function Ds(r){if(r===null)return"null";if(Array.isArray(r))return"array";const e=typeof r;return e==="number"&&isNaN(r)?"nan":e==="string"&&r===""?"empty-string":e}const ke={type(r,e,s,o){return`Invalid type in config for key '${r}' in '${e}', got ${s}, wanted ${o}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,s){return`Unable to convert config value for key '${r}' in '${e}' to a ${s}`}};class yn{data;context;fallback;prefix;filteredKeys;notifiedFilteredKeys;static fromConfigs(e){return e.length===0?new yn(void 0):e.reduce((s,{data:o,context:i,filteredKeys:c,deprecatedKeys:C})=>{const v=new yn(o,i,s);if(v.filteredKeys=c,C)for(const{key:T,description:W}of C)console.warn(`The configuration key '${T}' of ${i} is deprecated and may be removed soon. ${W||""}`);return v},void 0)}constructor(e,s="mock-config",o,i=""){this.data=e,this.context=s,this.fallback=o,this.prefix=i,this.notifiedFilteredKeys=new Set}has(e){const s=this.readValue(e);return s===null?!1:s!==void 0?!0:this.fallback?.has(e)??!1}keys(){const e=this.data?Object.keys(this.data):[],s=this.fallback?.keys()??[];return[...new Set([...e,...s])].filter(o=>this.data?.[o]!==null)}get(e){const s=this.getOptional(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e??""),this.context));return s}getOptional(e){const s=Is(this.readValue(e)),o=this.fallback?.getOptional(e);if(s!==null)return s===void 0?Tn(o):o===void 0?Tn(s):Tn(s,o)}getConfig(e){const s=this.getOptionalConfig(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalConfig(e){const s=this.readValue(e),o=this.fallback?.getOptionalConfig(e);if(mn(s))return this.copy(s,e,o);if(s!==null){if(s!==void 0)throw new TypeError(ke.type(this.fullKey(e),this.context,Ds(s),"object"));return o}}getConfigArray(e){const s=this.getOptionalConfigArray(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalConfigArray(e){const s=this.readConfigValue(e,o=>{if(!Array.isArray(o))return{expected:"object-array"};for(const[i,c]of o.entries())if(!mn(c))return{expected:"object-array",value:c,key:`${e}[${i}]`};return!0});if(s)return s.map((o,i)=>this.copy(o,`${e}[${i}]`))}getNumber(e){const s=this.getOptionalNumber(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalNumber(e){const s=this.readConfigValue(e,i=>typeof i=="number"||typeof i=="string"||{expected:"number"});if(typeof s=="number"||s===void 0)return s;const o=Number(s);if(!Number.isFinite(o))throw new Error(ke.convert(this.fullKey(e),this.context,"number"));return o}getBoolean(e){const s=this.getOptionalBoolean(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalBoolean(e){const s=this.readConfigValue(e,i=>typeof i=="boolean"||typeof i=="number"||typeof i=="string"||{expected:"boolean"});if(typeof s=="boolean"||s===void 0)return s;const o=String(s).trim();if(/^(?:y|yes|true|1|on)$/i.test(o))return!0;if(/^(?:n|no|false|0|off)$/i.test(o))return!1;throw new Error(ke.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const s=this.getOptionalString(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalString(e){return this.readConfigValue(e,s=>typeof s=="string"&&s!==""||{expected:"string"})}getStringArray(e){const s=this.getOptionalStringArray(e);if(s===void 0)throw new Error(ke.missing(this.fullKey(e),this.context));return s}getOptionalStringArray(e){return this.readConfigValue(e,s=>{if(!Array.isArray(s))return{expected:"string-array"};for(const[o,i]of s.entries())if(typeof i!="string"||i==="")return{expected:"string-array",value:i,key:`${e}[${o}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,s,o){const i=new yn(e,this.context,o,this.fullKey(s));return i.filteredKeys=this.filteredKeys,i}readConfigValue(e,s){const o=this.readValue(e);if(o===void 0)return this.fallback?.readConfigValue(e,s);if(o===null)return;const i=s(o);if(i!==!0){const{key:c=e,value:C=o,expected:v}=i;throw new TypeError(ke.type(this.fullKey(c),this.context,Ds(C),v))}return o}readValue(e){const s=e?e.split("."):[];for(const i of s)if(!Hs.test(i))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let o=this.data;for(const[i,c]of s.entries())if(mn(o))o=o[c];else if(o!=null){const C=this.fullKey(s.slice(0,i).join("."));throw new TypeError(ke.type(C,this.context,Ds(o),"object"))}return o}}const Rn="theme";class Hn{themes;static createWithStorage(e){const s=new Hn(e);if(!window.localStorage)return s;const o=window.localStorage.getItem(Rn)??void 0;return s.setActiveThemeId(o),s.activeThemeId$().subscribe(i=>{i?window.localStorage.setItem(Rn,i):window.localStorage.removeItem(Rn)}),window.addEventListener("storage",i=>{if(i.key===Rn){const c=localStorage.getItem(Rn)??void 0;s.setActiveThemeId(c)}}),s}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 Vs(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 kr{registeredFeatureFlags=[];flags;registerFlag(e){Vs(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 s=Array.from(this.flags.entries()).filter(([,o])=>o===vn.S.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(s)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const s=JSON.parse(e);if(typeof s!="object"||s===null||Array.isArray(s))return new Map;const o=Object.entries(s).filter(([i,c])=>(Vs(i),c===vn.S.Active));return new Map(o)}catch{return new Map}}}const Vn=(0,ht.y)({id:"core.apptheme"}),Gs=(0,ht.y)({id:"core.applanguage"});var Wr=t(56038),Ys=function(r){return r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static",r}(Ys||{});class Kr{factories=new Map;register(e,s){const o=Ys[e],i=this.factories.get(s.api.id);return i&&i.priority>=o?!1:(this.factories.set(s.api.id,{priority:o,factory:s}),!0)}get(e){const s=this.factories.get(e.id);if(s)return s.factory}getAllApis(){const e=new Set;for(const{factory:s}of this.factories.values())e.add(s.api);return e}}class Ls{factories;static validateFactories(e,s){for(const o of s){const i=[o],c=new Set;for(;i.length;){const C=i.shift(),v=e.get(C);if(v)for(const T of Object.values(v.deps)){if(T.id===o.id)throw new Error(`Circular dependency of api factory for ${o}`);c.has(T)||(c.add(T),i.push(T))}}}}apis;constructor(e){this.factories=e,this.apis=new Map}get(e){return this.load(e)}load(e,s=[]){const o=this.apis.get(e.id);if(o)return o;const i=this.factories.get(e);if(!i)return;if(s.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const c=this.loadDeps(e,i.deps,[...s,i.api]),C=i.factory(c);return this.apis.set(e.id,C),C}loadDeps(e,s,o){const i={};for(const c in s)if(s.hasOwnProperty(c)){const C=s[c],v=this.load(C,o);if(!v)throw new Error(`No API factory available for dependency ${C} of dependent ${e}`);i[c]=v}return i}}function zr(r){const e={};for(const o in r.collectors)r.collectors.hasOwnProperty(o)&&(e[o]=r.collectors[o]());const s=[{node:Ot.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;s.length!==0;){const{node:o,parent:i,contexts:c}=s.shift();Ot.Children.forEach(o,C=>{if(!(0,Ot.isValidElement)(C))return;const v={};for(const T in e)if(e.hasOwnProperty(T)){const W=e[T];v[T]=W.visit(W.accumulator,C,i,c[T])}for(const T of r.discoverers){const W=T(C);W&&s.push({node:W,parent:C,contexts:v})}})}return Object.fromEntries(Object.entries(e).map(([o,i])=>[o,i.accumulator]))}function Gn(r,e){return()=>({accumulator:r(),visit:e})}function Hr(r){return r.props?.children}function Vr(r){if(r.props?.path&&r.props?.element)return r.props?.element}var Oe=t(19402);const Gr=Gn(()=>new Set,(r,e)=>{const s=(0,Oe.E)(e,"core.plugin");s&&r.add(s)});var In=t(72427);const Qs=r=>{const{children:e}=r,s=(0,In.gf)(vn.B),o="with"in r?s.isActive(r.with):!s.isActive(r.without);return(0,a.jsx)(a.Fragment,{children:o?e:null})};(0,Oe.h)(Qs,"core.featureFlagged",!0);const Yn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function Qn(r){const e=r;return e?.type?e.type.displayName??e.type.name??String(e.type):String(e)}const Zs=r=>{const e=new Set;return r&&e.add(r),e};function Js(r,e=new Array){return Ot.Children.forEach(r,s=>{if(!(0,Ot.isValidElement)(s))return;const o=(0,Oe.E)(s,"core.mountPoint");if(o){const i=(0,Oe.E)(s,"core.plugin");e.push({routeRef:o,plugin:i})}Js(s.props.children,e)}),e}const Yr=Gn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,s,o)=>{if(o?.isElementAncestor)return o;if(s?.props.element===e)return{...o,isElementAncestor:!0};const i=e.props?.path,c=(0,Oe.E)(e,"core.mountPoint");if(c&&i)throw new Error(`Path property may not be set directly on a routable extension "${Qn(e)}"`);const C=o?.obj?.children??r.objects;if(i!==void 0){if(typeof i!="string")throw new Error(`Element path must be a string at "${Qn(e)}"`);const v=i.startsWith("/")?i.slice(1):i,T=e.props.element;if((0,Oe.E)(e,"core.gatherMountPoints")){if(T)throw new Error(`Mount point gatherers may not have an element prop "${Qn(e)}"`);const W={path:v,element:"gathered",routeRefs:new Set,caseSensitive:!!e.props?.caseSensitive,children:[Yn],plugins:new Set};return C.push(W),{obj:W,gatherPath:v,routeRef:o?.routeRef,gatherRouteRef:o?.routeRef}}if(T){const[W,...nt]=Js(T);if(nt.length>0)throw new Error(`Route element with path "${i}" may not contain multiple routable extensions`);if(!W)return o;const{routeRef:yt,plugin:ot}=W,Et={path:v,element:"mounted",routeRefs:new Set([yt]),caseSensitive:!!e.props?.caseSensitive,children:[Yn],plugins:Zs(ot)};return C.push(Et),r.paths.set(yt,v),r.parents.set(yt,o?.routeRef),{obj:Et,routeRef:yt??o?.routeRef,gatherPath:v,gatherRouteRef:o?.gatherRouteRef}}}if(c){if(o?.gatherPath===void 0)throw new Error(`Routable extension "${Qn(e)}" with mount point "${c}" must be assigned a path`);o?.obj?.routeRefs.add(c);const v=(0,Oe.E)(e,"core.plugin");return v&&o?.obj?.plugins.add(v),r.paths.set(c,o.gatherPath),r.parents.set(c,o?.gatherRouteRef),{...o,routeRef:c}}return o}),Qr=Gn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,s,o)=>{if(s?.props.element===e)return o;let i=o?.obj,c=o?.routeRef,C=o?.sticky;const v=e.props?.path,T=i?.children??r.objects,W=!!e.props?.caseSensitive;let nt=o?.path;if((0,Oe.E)(e,"core.gatherMountPoints")){if(!v)throw new Error("Mount point gatherer must have a path");nt=v}const yt=e.props?.element;let ot=(0,Oe.E)(e,"core.mountPoint");if(!ot&&(0,Ot.isValidElement)(yt)&&(ot=(0,Oe.E)(yt,"core.mountPoint")),ot){let Lt=v;if(nt&&(Lt?nt=void 0:Lt=nt),!Lt)throw new Error("Mounted routable extension must have a path");r.paths.set(ot,Lt),c&&C?(r.parents.set(ot,c),v&&(c=ot,C=!1)):(r.parents.set(ot,c),c=ot),v?(i={caseSensitive:W,path:v,element:"mounted",routeRefs:new Set([ot]),children:[Yn],plugins:Zs((0,Oe.E)(e.props.element,"core.plugin"))},T.push(i)):i?.routeRefs.add(ot)}if((0,Oe.E)(e,"core.gatherMountPoints")&&(C=!0),(0,Oe.E)(e,"core.gatherMountPoints")){if(!v)throw new Error("Mount point gatherer must have a path");ot||(i={caseSensitive:W,path:v,element:"gathered",routeRefs:new Set,children:[Yn],plugins:o?.obj?.plugins||new Set},T.push(i))}return{obj:i,path:nt,routeRef:c,sticky:C}}),Zr=Gn(()=>new Set,(r,e)=>{if(e.type===Qs){const s=e.props;r.add("with"in s?s.with:s.without)}});var Dn=t(21613),Jr=t(63544);const Ln=(0,Jr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function Xs(r){return r[Ln]==="absolute"}function _s(r){return r[Ln]==="sub"}function Xr(r){return r[Ln]==="external"}function Zn(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var _r=t(46155),qr=t.n(_r);function to(r,e,s){let o,i="";if(Xs(r))o=r;else if(_s(r))o=r.parent,i=r.path;else if(Xr(r)){const v=s.get(r);if(!v)return[void 0,""];if(Xs(v))o=v;else if(_s(v))o=v.parent,i=v.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${v}`)}else throw r[Ln]?new Error(`Unknown or invalid route ref type, ${r[Ln]}`):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 C=Zn(c,i);return[o,C]}function eo(r,e,s,o,i){const c=(0,Dn.ue)(i,e)??[],C=Array();let v=-1;for(let nt=r;nt&&(v=c.findIndex(yt=>yt.route.routeRefs.has(nt)),v===-1);nt=o.get(nt))C.unshift(nt);C.length===0&&(v-=1);const T=v===-1?"":c[v].pathname,W=C.slice(0,-1).map(nt=>{const yt=s.get(nt);if(yt===void 0)throw new Error(`No path for ${nt}`);if(yt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${nt} as it has parameters`);return yt});return`${Zn(T,...W)}/`}class no{routePaths;routeParents;routeObjects;routeBindings;appBasePath;constructor(e,s,o,i,c){this.routePaths=e,this.routeParents=s,this.routeObjects=o,this.routeBindings=i,this.appBasePath=c}resolve(e,s){const[o,i]=to(e,this.routePaths,this.routeBindings);if(!o)return;let c;typeof s=="string"?c=this.trimPath(s):s.pathname?c={...s,pathname:this.trimPath(s.pathname)}:c=s;const C=this.appBasePath+eo(o,c,this.routePaths,this.routeParents,this.routeObjects);return(...[T])=>{const W=T&&qr()(T,nt=>typeof nt=="string"?nt.replaceAll(/[&?#;\/]/g,yt=>encodeURIComponent(yt)):nt);return Zn(C,(0,Dn.tW)(i,W))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}}const so=(0,Se.tK)("routing-context"),ro=({routePaths:r,routeParents:e,routeObjects:s,routeBindings:o,basePath:i="",children:c})=>{const C=new no(r,e,s,o,i),v=(0,Xe.B)({1:C});return(0,a.jsx)(so.Provider,{value:v,children:c})};function oo(r,e){const s=new Set(e.values());s.delete(void 0);for(const o of e.keys()){if(s.has(o))continue;let i=o,c="";for(;i;){const v=r.get(i);if(v===void 0)throw new Error(`No path for ${i}`);c=Zn(v,c),i=e.get(i)}const C=c.match(/:(\w+)/g);if(C){for(let v=0;v<C.length;v++)for(let T=v+1;T<C.length;T++)if(C[T]===C[v])throw new Error(`Parameter ${C[T]} is duplicated in path ${c}`)}}}function ao(r,e){for(const s of e)if(s.externalRoutes){for(const[o,i]of Object.entries(s.externalRoutes))if(!i.optional&&!r.has(i))throw new Error(`External route '${o}' of the '${s.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const io=(0,Se.tK)("app-context"),co=({appContext:r,children:e})=>{const s=(0,Xe.B)({1:r});return(0,a.jsx)(io.Provider,{value:s,children:e})},qs="app",lo=`${qs}-auth-cookie-expires-at`,uo=5*6e4,tr=5e3,ho=2,po=5*6e4;function go({discoveryApi:r,fetchApi:e,errorApi:s}){let o=!1,i,c=!0,C=tr;const v="BroadcastChannel"in window?new BroadcastChannel(lo):void 0,T=ot=>{const Et=(1+3*Math.random())*6e4;return Math.max(ot-Date.now(),uo)-Et},W=async()=>{try{const Et=`${await r.getBaseUrl(qs)}/.backstage/auth/v1/cookie`,Lt=await e.fetch(Et,{credentials:"include"});if(!Lt.ok)throw new Error(`Request failed with status ${Lt.status} ${Lt.statusText}, see request towards ${Et} for more details`);const Qt=await Lt.json();if(!Qt.expiresAt)throw new Error("No expiration date in response");const we=Date.parse(Qt.expiresAt);if(Number.isNaN(we))throw new Error("Invalid expiration date in response");c=!0,v?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(we).toISOString()}}),yt(T(we))}catch(ot){c?(c=!1,C=tr):(C=Math.min(po,C*ho),console.error("Session cookie refresh failed",ot),s.post(new Error("Session refresh failed, see developer console for details"))),yt(C)}},nt=ot=>{const{data:Et}=ot;if(!(Et===null||typeof Et!="object")&&"action"in Et&&Et.action==="COOKIE_REFRESH_SUCCESS"){const Lt=Date.parse(Et.payload.expiresAt);if(Number.isNaN(Lt)){console.warn("Received invalid expiration from session refresh channel");return}yt(T(Lt))}};function yt(ot){o||(i&&clearTimeout(i),i=setTimeout(W,ot))}return v?.addEventListener("message",nt),W(),()=>{o=!0,i&&clearTimeout(i),v?.removeEventListener("message",nt),v?.close()}}function er(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Ms(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class fo{target;waitForTarget;resolveTarget=()=>{};signOutTargetUrl="/";#t;constructor(){this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}setTarget(e,s){this.target=e,this.signOutTargetUrl=s.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw er("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ms("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw er("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Ms("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(e=>e.getProfileInfo())}async getBackstageIdentity(){const e=await this.waitForTarget.then(s=>s.getBackstageIdentity());return e.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${e.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),e}async getCredentials(){return this.waitForTarget.then(e=>e.getCredentials())}async getIdToken(){return this.waitForTarget.then(e=>{if(!e.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Ms("getIdToken"),e.getIdToken()})}async signOut(){await this.waitForTarget.then(e=>e.signOut()),await this.#t?.(),window.location.href=this.signOutTargetUrl}enableCookieAuth(e){if(this.#t)return;const s=go(e);this.#t=async()=>{s();const o=await e.discoveryApi.getBaseUrl("app");try{await fetch(`${o}/.backstage/auth/v1/cookie`,{method:"DELETE",credentials:"include"})}catch{}}}}var mo=t(1394);function yo(r,e,s){if(r!==void 0){const i=s.find(c=>c.id===r);if(i)return i}if(e){const i=s.find(c=>c.variant==="dark");if(i)return i}const o=s.find(i=>i.variant==="light");return o||s[0]}const vo=()=>{const r=(0,Ot.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,s]=(0,Ot.useState)(r.matches);return(0,Ot.useEffect)(()=>{const o=i=>{s(i.matches)};return r.addListener(o),()=>{r.removeListener(o)}},[r]),e};function nr({children:r}){const e=(0,In.gf)(Vn),s=(0,mo.A)(e.activeThemeId$(),e.getActiveThemeId()),o=window.matchMedia?vo():!1,i=yo(s,o,e.getInstalledThemes());if(!i)throw new Error("App has no themes");return(0,a.jsx)(i.Provider,{children:r})}const sr=async()=>Eo();function Eo(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=new Array,s=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(s){if(!Array.isArray(s))throw new Error("Static configuration has invalid format");e.push(...s)}const o=document.querySelectorAll('script[type="backstage.io/config"]');if(o.length>0)for(const c of o)try{const C=c.textContent;if(!C)throw new Error("tag is empty");let v;try{v=JSON.parse(C)}catch(T){throw new Error(`failed to parse config; ${T}`)}if(!Array.isArray(v))throw new Error("data is not an array");e.push(...v)}catch(C){throw new Error(`Failed to load config from script tag, ${C.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 Ao{apis=[];add(e,s){return this.apis.push([e.id,s]),s}build(){return new En(new Map(this.apis))}}class En{apis;static builder(){return new Ao}static from(e){return new En(new Map(e.map(([s,o])=>[s.id,o])))}static with(e,s){return new En(new Map([[e.id,s]]))}constructor(e){this.apis=e}with(e,s){return new En(new Map([...this.apis,[e.id,s]]))}get(e){return this.apis.get(e.id)}}function xo(r){const e=new Map,s=new Map;for(const o of r){for(const[i,c]of Object.entries(o.routes??{})){const C=`${o.getId()}.${i}`;if(e.has(C))throw new Error(`Unexpected duplicate route '${C}'`);e.set(C,c)}for(const[i,c]of Object.entries(o.externalRoutes??{})){const C=`${o.getId()}.${i}`;if(s.has(C))throw new Error(`Unexpected duplicate external route '${C}'`);s.set(C,c)}}return{routes:e,externalRoutes:s}}function Co(r,e,s){const o=xo(s),i=new Map,c=new Set;r&&r({bind:(T,W)=>{for(const[nt,yt]of Object.entries(W)){const ot=T[nt];if(!ot)throw new Error(`Key ${nt} is not an existing external route`);if(!yt&&!ot.optional)throw new Error(`External route ${nt} is required but was ${yt===!1?"disabled":"not provided"}`);yt?i.set(ot,yt):yt===!1&&c.add(ot)}}});const C=e.getOptionalConfig("app.routes.bindings")?.get();if(C)for(const[v,T]of Object.entries(C)){if(!bo(T))throw new Error(`Invalid config at app.routes.bindings['${v}'], value must be a non-empty string or false`);const W=o.externalRoutes.get(v);if(!W)throw new Error(`Invalid config at app.routes.bindings, '${v}' is not a valid external route`);if(!(i.has(W)||c.has(W)))if(T===!1)c.add(W);else{const nt=o.routes.get(T);if(!nt)throw new Error(`Invalid config at app.routes.bindings['${v}'], '${T}' is not a valid route`);i.set(W,nt)}}for(const v of o.externalRoutes.values())if(!i.has(v)&&!c.has(v)){const T="getDefaultTarget"in v?v.getDefaultTarget():void 0;if(T){const W=o.routes.get(T);W&&i.set(v,W)}}return i}function bo(r){return!!(r===!1||typeof r=="string"&&r)}function Mn(){const[r]=(0,p.AV)((0,a.jsx)(p.qh,{index:!0,element:(0,a.jsx)("div",{})}));return!r.index}const rr=(0,Ot.createContext)(void 0);var or=t(82266),ar=t(93368),So=t(25862);const Oo=(r,e)=>{try{const o=(0,Dn.ue)(e,{pathname:r})?.filter(T=>T?.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 C;i.plugins.size===1&&(C=i.plugins.values().next().value);const v=Object.entries(o?.params||{}).reduce((T,[W,nt])=>(nt!==void 0&&W!=="*"&&(T[W]=nt),T),{});return{extension:"App",pluginId:C?.getId()||"root",...c?{routeRef:c.id}:{},_routeNodeType:i.element,params:v}}catch{return}},Po=({pathname:r,search:e,hash:s,attributes:o})=>{const i=(0,ar.s)();return(0,Ot.useEffect)(()=>{i.captureEvent("navigate",`${r}${e}${s}`,{attributes:o})},[i,r,e,s,o]),null},Jn=({routeObjects:r})=>{const{pathname:e,search:s,hash:o}=(0,p.zy)(),{params:i,...c}=Oo(e,r)||{params:{}};return(0,a.jsx)(So.Ig,{attributes:c,children:(0,a.jsx)(Po,{pathname:e,search:s,hash:o,attributes:i})})};function wo(r){return Mn()?Bs(r):""}function Bs(r){let{pathname:e}=new URL(r.getOptionalString("app.baseUrl")??"/","http://sample.dev");return e=e.replace(/\/*$/,""),e}function ir({component:r,appIdentityProxy:e,children:s}){const[o,i]=(0,Ot.useState)(),c=(0,In.gf)(Rt.U),C=Bs(c);return o?(e.setTarget(o,{signOutTargetUrl:C||"/"}),(0,a.jsx)(a.Fragment,{children:s})):(0,a.jsx)(r,{onSignInSuccess:i})}function cr(r){const{Router:e,SignInPage:s}=(0,or.n)().getComponents(),o=(0,In.gf)(Rt.U),i=Bs(o),c=`${i}/*`,C=(0,Ot.useContext)(rr);if(!C)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:v,appIdentityProxy:T}=C;return s?Mn()?(0,a.jsxs)(e,{children:[(0,a.jsx)(Jn,{routeObjects:v}),(0,a.jsx)(ir,{component:s,appIdentityProxy:T,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)(Jn,{routeObjects:v}),(0,a.jsx)(ir,{component:s,appIdentityProxy:T,children:r.children})]}):(T.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||"/"}),Mn()?(0,a.jsxs)(e,{children:[(0,a.jsx)(Jn,{routeObjects:v}),(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)(Jn,{routeObjects:v}),r.children]}))}(0,Oe.h)(cr,"core.type","AppRouter");const Bn="language",_e="en";class Xn{static create(e){const s=e?.availableLanguages??[_e];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(_e))throw new Error(`Supported languages must include '${_e}'`);const o=e?.defaultLanguage??_e;if(!s.includes(o))throw new Error(`Initial language must be one of the supported languages, got '${o}'`);return new Xn(s,o)}static createWithStorage(e){const s=Xn.create(e);if(!window.localStorage)return s;const o=window.localStorage.getItem(Bn),{languages:i}=s.getAvailableLanguages();return o&&i.includes(o)&&s.setLanguage(o),s.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(Bn)&&window.localStorage.setItem(Bn,c)}),window.addEventListener("storage",c=>{if(c.key===Bn){const C=localStorage.getItem(Bn)??void 0;C&&s.setLanguage(C)}}),s}#t;#e;#n;constructor(e,s){this.#t=e,this.#e=s,this.#n=new dt({language:this.#e})}getAvailableLanguages(){return{languages:this.#t.slice()}}setLanguage(e){const s=e??_e;if(s!==this.#e){if(s&&!this.#t.includes(s))throw new Error(`Failed to change language to '${s}', available languages are '${this.#t.join("', '")}'`);this.#e=s,this.#n.next({language:s})}}getLanguage(){return{language:this.#e}}language$(){return this.#n}}var To=t(47304),Ro=t(99833),lr=t(93184);function dr(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}class Io{onLoad;#t;#e;#n;constructor(e){this.onLoad=e,this.#t=new Set,this.#e=new Map,this.#n=new Map}addTranslationResource(e){const s=(0,Ro.Y)(e);for(const o of s.resources){const i=this.#s(o.language,s.id);this.#n.has(i)||this.#n.set(i,o.loader)}}#s(e,s){return`${e}/${s}`}needsLoading(e,s){const o=this.#s(e,s);return this.#n.get(o)?!this.#t.has(o):!1}async load(e,s){const o=this.#s(e,s),i=this.#n.get(o);if(!i||this.#t.has(o))return;const c=this.#e.get(o);if(c){await c;return}const C=i().then(v=>{this.onLoad({language:e,namespace:s,messages:v.messages}),this.#t.add(o)},v=>{throw this.#t.add(o),v});this.#e.set(o,C),await C}}class js{static create(e){const{languages:s}=e.languageApi.getAvailableLanguages(),o=(0,To.Q_)({fallbackLng:_e,supportedLngs:s,interpolation:{escapeValue:!1},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(o.init(),!o.isInitialized)throw new Error("i18next was unexpectedly not initialized");const{language:i}=e.languageApi.getLanguage();i!==_e&&o.changeLanguage(i);const c=new Io(T=>{o.addResourceBundle(T.language,T.namespace,dr(T.messages),!1,!0)}),C=e?.resources||[];for(let T=C.length-1;T>=0;T--){const W=C[T];W.$$type==="@backstage/TranslationResource"?c.addTranslationResource(W):W.$$type==="@backstage/TranslationMessages"&&o.addResourceBundle(_e,W.id,dr(W.messages),!0,!1)}const v=new js(o,c,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:T})=>{v.#o(T)}),v}#t;#e;#n;#s=new Set;#r=new Set;constructor(e,s,o){this.#t=e,this.#e=s,this.#n=o}getTranslation(e){const s=(0,lr.v)(e);return this.#i(s),this.#a(s)}translation$(e){const s=(0,lr.v)(e);return this.#i(s),new(Y())(o=>{let i={};const c=()=>{i={};const v=i;this.#e.load(this.#n,s.id).then(()=>{if(v===i){const T=this.#a(s);T.ready&&o.next(T)}},T=>{v===i&&o.error(Array.isArray(T)?T[0]:T)})},C=()=>{const v=this.#a(s);v.ready?o.next(v):c()};return this.#e.needsLoading(this.#n,s.id)&&c(),this.#r.add(C),()=>{this.#r.delete(C)}})}#o(e){this.#n!==e&&(this.#n=e,this.#t.changeLanguage(e),this.#r.forEach(s=>s()))}#a(e){return this.#e.needsLoading(this.#n,e.id)?{ready:!1}:{ready:!0,t:this.#t.getFixedT(null,e.id)}}#i(e){if(this.#s.has(e.id))return;this.#s.add(e.id);const s=e.getDefaultMessages();this.#t.addResourceBundle(_e,e.id,s,!0,!1);const o=e.getDefaultResource();o&&this.#e.addTranslationResource(o)}}function ur(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 Do(r){const e=yn.fromConfigs(r),s=e.getOptionalString("app.baseUrl"),o=e.getOptionalString("backend.baseUrl");let i=r,c,C;if(s&&o){const v=new URL(s).origin,T=new URL(o).origin;if(v===T){const W=ur(o);o!==W&&(c=W)}}if(s){const v=ur(s);s!==v&&(C=v)}return(C||c)&&(i=i.concat({data:{app:C&&{baseUrl:C},backend:c&&{baseUrl:c}},context:"relative-resolver"})),i}function Lo(){return(document.querySelector('meta[name="backstage-app-mode"]')?.getAttribute("content")??"public")==="protected"}function Mo(r,e,s){const o=!!r,i=(0,ee.A)(r||(()=>Promise.resolve([])));let c;if(o&&i.loading){const{Progress:T}=e;c=(0,a.jsx)(T,{})}else if(i.error){const{BootErrorPage:T}=e;c=(0,a.jsx)(T,{step:"load-config",error:i.error})}const{ThemeProvider:C=nr}=e;return c?{node:(0,a.jsx)(ve,{apis:En.with(Vn,s),children:(0,a.jsx)(C,{children:c})})}:{api:yn.fromConfigs(i.value?.length?Do(i.value):[])}}class Bo{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 jo{apiHolder;configApi;apis;icons;plugins;featureFlags;components;themes;configLoader;defaultApis;bindRoutes;appLanguageApi;translationResources;appIdentityProxy=new fo;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??sr,this.defaultApis=e.defaultApis??[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new Kr,this.appLanguageApi=Xn.createWithStorage({defaultLanguage:e.__experimentalTranslations?.defaultLanguage,availableLanguages:e.__experimentalTranslations?.availableLanguages}),this.translationResources=e.__experimentalTranslations?.resources??[]}getPlugins(){return Array.from(this.plugins)}getSystemIcon(e){return this.icons[e]}getSystemIcons(){return this.icons}getComponents(){return this.components}createRoot(e){const s=this.getProvider();return()=>(0,a.jsx)(s,{children:e})}#t=!1;getProvider(){if(this.#t)throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");this.#t=!0;const e=new Bo(this);let s,o;return({children:c})=>{const C=(0,Ot.useRef)(!0),v=(0,Ot.useMemo)(()=>Hn.createWithStorage(this.themes),[]),{routing:T,featureFlags:W}=(0,Ot.useMemo)(()=>{const Qt=Mn();Qt&&console.warn(`
|
|
4
|
+
DEPRECATION WARNING: React Router Beta is deprecated and support for it will be removed in a future release.
|
|
5
|
+
Please migrate to use React Router v6 stable.
|
|
6
|
+
See https://backstage.io/docs/tutorials/react-router-stable-migration
|
|
7
|
+
`);const we=zr({root:c,discoverers:[Hr,Vr],collectors:{routing:Qt?Qr:Yr,collectedPlugins:Gr,featureFlags:Zr}});return we.collectedPlugins.forEach(Le=>this.plugins.add(Le)),this.verifyPlugins(this.plugins),this.getApiHolder(),we},[c]),nt=Mo(this.configLoader,this.components,v),yt="api"in nt;if(yt){const{api:Qt}=nt;this.configApi=Qt}if("node"in nt)return nt.node;if(o)throw o;if(!s)try{s=Co(this.bindRoutes,nt.api,this.plugins),oo(T.paths,T.parents),ao(s,this.plugins)}catch(Qt){throw o=Qt,Qt}if(yt&&C.current){C.current=!1;const Qt=this.getApiHolder().get(vn.B);if(Qt){for(const Ie of this.featureFlags)Qt.registerFlag({...Ie,pluginId:""});for(const Ie of this.plugins.values())if("getFeatureFlags"in Ie)for(const dn of Ie.getFeatureFlags())Qt.registerFlag({name:dn.name,pluginId:Ie.getId()});else for(const dn of Ie.output())dn.type==="feature-flag"&&Qt.registerFlag({name:dn.name,pluginId:Ie.getId()});const we=Qt.getRegisteredFlags(),Le=new Set(we.map(Ie=>Ie.name));for(const Ie of W)Le.has(Ie)||Qt.registerFlag({name:Ie,pluginId:""})}}const{ThemeProvider:ot=nr,Progress:Et}=this.components,Lt=this.getApiHolder();if(Lo()){const Qt=Lt.get(re.m),we=Lt.get(Yt.a),Le=Lt.get(st.I);if(!Qt||!we||!Le)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Qt,fetchApi:we,discoveryApi:Le})}return(0,a.jsx)(ve,{apis:Lt,children:(0,a.jsx)(co,{appContext:e,children:(0,a.jsx)(ot,{children:(0,a.jsx)(ro,{routePaths:T.paths,routeParents:T.parents,routeObjects:T.objects,routeBindings:s,basePath:wo(nt.api),children:(0,a.jsx)(rr.Provider,{value:{routeObjects:T.objects,appIdentityProxy:this.appIdentityProxy},children:(0,a.jsx)(Ot.Suspense,{fallback:(0,a.jsx)(Et,{}),children:c})})})})})})}}getRouter(){return cr}getApiHolder(){if(this.apiHolder){for(const e of this.plugins)for(const s of e.getApis())this.apiFactoryRegistry.get(s.api)||this.apiFactoryRegistry.register("default",s);return Ls.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:Vn,deps:{},factory:()=>Hn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:Rt.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:Gs,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:Wr.J,deps:{languageApi:Gs},factory:({languageApi:e})=>js.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:vn.B,deps:{},factory:()=>new kr});for(const e of this.defaultApis)this.apiFactoryRegistry.register("default",e);for(const e of this.plugins)for(const s of e.getApis())if(!this.apiFactoryRegistry.register("default",s))throw new Error(`Plugin ${e.getId()} tried to register duplicate or forbidden API factory for ${s.api}`);for(const e of this.apis)if(!this.apiFactoryRegistry.register("app",e))throw new Error(`Duplicate or forbidden API factory for ${e.api} in app`);return Ls.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new Ls(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const s=new Set;for(const o of e){const i=o.getId();if(s.has(i))throw new Error(`Duplicate plugin found '${i}'`);s.add(i)}}}function Uo(r){return new jo(r)}function $o(r){return Uo({...r,apis:r?.apis??[],bindRoutes:r?.bindRoutes,components:{...D,...r?.components},configLoader:r?.configLoader,defaultApis:is,icons:{...xs,...r?.icons},plugins:r?.plugins??[],featureFlags:r?.featureFlags??[],themes:r?.themes??Xt})}var _n=t(82442);let hr=!1;const pr=r=>{const e=(0,or.n)(),{NotFoundErrorPage:s}=e.getComponents(),o=(0,Ot.useMemo)(()=>Mn(),[]),c=[...(0,_n.O)(r.children,C=>C.getElements().flatMap(v=>{let T=v.props.path;if(T==="")return[];T=T?.replace(/\/\*$/,"")??"/";let W=o?v:v.props.element;return!o&&!W&&(W=v,hr||(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] />} />."),hr=!0)),[{path:T,element:W,children:v.props.children?[{path:T==="/"?"/":"*",element:v.props.children}]:void 0}]}).sort((v,T)=>T.path.localeCompare(v.path)).map(v=>({...v,path:v.path==="/"?"/":`${v.path}/*`}))),{path:"*",element:(0,a.jsx)(s,{})}];return(0,p.Ye)(c)};(0,Oe.h)(pr,"core.type","FlatRoutes");var An=t(6820),Fo=t(78692),No=t(86519);function ko(r){return!r.cursor}function Wo(r,e){if(!r.length)return[];const{maxCountPerChunk:s=1e3,maxStringLengthPerChunk:o=90*2**10,extraStringLengthPerRef:i=3}=e??{},c=[];let C=0,v=0,T=0;for(let W=0;W<r.length;++W){const nt=r[W].length+i;T>0&&(v+nt>o||T+1>s)&&(c.push(r.slice(C,W)),C=W,v=0,T=0),v+=nt,T+=1}return c.push(r.slice(C,r.length)),c}const xe="catalog";var Ce=t(94214);class Ko{discoveryApi;fetchApi;constructor(e){this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:de()}}async deleteEntityByUid(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"DELETE"})}async getEntities(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities{?fields,limit,filter*,offset,after,order*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntitiesByQuery(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-query{?fields,limit,offset,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntitiesByRefs(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-refs{?filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async getEntityAncestryByName(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-name/{kind}/{namespace}/{name}/ancestry").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityByName(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-name/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityByUid(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityFacets(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entity-facets{?facet*,filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async refreshEntity(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/refresh").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async validateEntity(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/validate-entity").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async analyzeLocation(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/analyze-location").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async createLocation(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/locations{?dryRun}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async deleteLocation(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"DELETE"})}async getLocation(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocationByEntity(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/locations/by-entity/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocations(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/locations").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}}class zo{apiClient;constructor(e){this.apiClient=new Ko(e)}async getEntityAncestors(e,s){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,An.KU)(e.entityRef)},s))}async getLocations(e,s){return{items:(await this.requestRequired(await this.apiClient.getLocations(e??{},s))).map(i=>i.data)}}async getLocationById(e,s){return await this.requestOptional(await this.apiClient.getLocation({path:{id:e}},s))}async getLocationByEntity(e,s){return await this.requestOptional(await this.apiClient.getLocationByEntity({path:(0,An.KU)(e)},s))}async getEntities(e,s){const{filter:o=[],fields:i=[],order:c,offset:C,limit:v,after:T}=e??{},W=[];if(c)for(const yt of[c].flat())yt&&W.push(`${yt.order}:${yt.field}`);return{items:await this.requestRequired(await this.apiClient.getEntities({query:{fields:i,limit:v,filter:this.getFilterValue(o),offset:C,after:T,order:c?W:void 0}},s))}}async getEntitiesByRefs(e,s){const o=async c=>{const C=await this.apiClient.getEntitiesByRefs({body:{entityRefs:c,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},s);if(!C.ok)throw await De.o.fromResponse(C);return(await C.json()).items.map(T=>T??void 0)};let i;for(const c of Wo(e.entityRefs)){const C=await o(c);i?i.push(...C):i=C}return{items:i??[]}}async queryEntities(e={},s){const o={};if(ko(e)){const{fields:i=[],filter:c,limit:C,offset:v,orderFields:T,fullTextFilter:W}=e;o.filter=this.getFilterValue(c),C!==void 0&&(o.limit=C),v!==void 0&&(o.offset=v),T!==void 0&&(o.orderField=(Array.isArray(T)?T:[T]).map(({field:yt,order:ot})=>`${yt},${ot}`)),i.length&&(o.fields=i);const nt=W?.term?.trim();nt&&(o.fullTextFilterTerm=nt),W?.fields?.length&&(o.fullTextFilterFields=W.fields)}else{const{fields:i=[],limit:c,cursor:C}=e;o.cursor=C,c!==void 0&&(o.limit=c),i.length&&(o.fields=i)}return this.requestRequired(await this.apiClient.getEntitiesByQuery({query:o},s))}async getEntityByRef(e,s){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,An.KU)(e)},s))}async getEntityByName(e,s){const{kind:o,namespace:i="default",name:c}=e;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:o,namespace:i,name:c}},s))}async refreshEntity(e,s){const o=await this.apiClient.refreshEntity({body:{entityRef:e}},s);if(o.status!==200)throw new Error(await o.text())}async getEntityFacets(e,s){const{filter:o=[],facets:i}=e;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:i,filter:this.getFilterValue(o)}},s))}async addLocation(e,s){const{type:o="url",target:i,dryRun:c}=e,C=await this.apiClient.createLocation({body:{type:o,target:i},query:{dryRun:c?"true":void 0}},s);if(C.status!==201)throw new Error(await C.text());const{location:v,entities:T,exists:W}=await C.json();if(!v)throw new Error(`Location wasn't added: ${i}`);return{location:v,entities:T,exists:W}}async getLocationByRef(e,s){return(await this.requestRequired(await this.apiClient.getLocations({},s))).map(i=>i.data).find(i=>e===(0,Fo.KL)(i))}async removeLocationById(e,s){await this.requestIgnored(await this.apiClient.deleteLocation({path:{id:e}},s))}async removeEntityByUid(e,s){await this.requestIgnored(await this.apiClient.deleteEntityByUid({path:{uid:e}},s))}async validateEntity(e,s,o){const i=await this.apiClient.validateEntity({body:{entity:e,location:s}},o);if(i.ok)return{valid:!0};if(i.status!==400)throw await De.o.fromResponse(i);const{errors:c=[]}=await i.json();return{valid:!1,errors:c}}async requestIgnored(e){if(!e.ok)throw await De.o.fromResponse(e)}async requestRequired(e){if(!e.ok)throw await De.o.fromResponse(e);return e.json()}async requestOptional(e){if(!e.ok){if(e.status===404)return;throw await De.o.fromResponse(e)}return await e.json()}getFilterValue(e=[]){const s=[];for(const o of[e].flat()){const i=[];for(const[c,C]of Object.entries(o))for(const v of[C].flat())v===No.c?i.push(c):typeof v=="string"&&i.push(`${c}=${v}`);i.length&&s.push(i.join(","))}return s}}var gr=t(7341),Ho=t(18),Vo=t(82292),fr=t(29207),xn=t(95203),Go=t(9803),Re=t(88758),Yo=t(54560),Cn=t(45250);async function Qo({storageApi:r}){const e=r.forBucket("settings"),s=r.forBucket("starredEntities"),o=e.snapshot("starredEntities").value;if(!(0,Cn.isArray)(o))return;const i=new Set(s.snapshot("entityRefs").value??[]);o.filter(Cn.isString).map(c=>c.split(":")).filter(c=>c.length===4&&c[0]==="entity").map(([c,C,v,T])=>(0,An.U2)({kind:C,namespace:v,name:T})).forEach(c=>i.add(c)),await s.set("entityRefs",Array.from(i)),await e.remove("starredEntities")}class Zo{settingsStore;starredEntities;constructor(e){Qo(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities"),this.starredEntities=new Set(this.settingsStore.snapshot("entityRefs").value??[]),this.settingsStore.observe$("entityRefs").subscribe({next:s=>{this.starredEntities=new Set(s.value??[]),this.notifyChanges()}})}async toggleStarred(e){this.starredEntities.has(e)?this.starredEntities.delete(e):this.starredEntities.add(e),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}subscribers=new Set;observable=new(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 Us(r){const{years:e=0,months:s=0,weeks:o=0,days:i=0,hours:c=0,minutes:C=0,seconds:v=0,milliseconds:T=0}=r;return((((e*365+s*30+o*7+i)*24+c)*60+C)*60+v)*1e3+T}var Jo=t(25033),Xo=t.n(Jo),_o=t(88083);const qo={seconds:10},ta={milliseconds:50},ea={api:$n.A,component:Nn.A,system:Sn.A,resource:kn.A,domain:jn.A,location:Fn.A,user:Pn.A,group:On.A,template:Wn.A};function mr(r){return{async:r.async,render:({entityRef:e,entity:s,context:o})=>({snapshot:(0,_o.T)(s||e,o),loadEntity:r.async})}}class na extends Map{#t;#e=new Map;constructor(e){super(),this.#t=e}set(e,s){const o=super.set(e,s);return this.#e.set(e,Date.now()),o}get(e){if(!this.has(e))return;const s=this.#e.get(e);if(Date.now()-s>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 qn{static createLocal(){return new qn({renderer:mr({async:!1})})}static create(e){return new qn(e)}#t;#e;#n;#s;#r;constructor(e){const s=e.cacheTtl??qo,o=e.batchDelay??ta,i=e.renderer??mr({async:!0}),c={};if(Object.entries(ea).forEach(([C,v])=>{c[C.toLocaleLowerCase("en-US")]=v}),Object.entries(e.kindIcons??{}).forEach(([C,v])=>{c[C.toLocaleLowerCase("en-US")]=v}),i.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");this.#n=this.#a({cacheTtl:s,batchDelay:o,renderer:i,catalogApi:e.catalogApi})}this.#e=Us(s),this.#t=new Map,this.#s=c,this.#r=i}forEntity(e,s){const{entityRef:o,kind:i,entity:c,needsLoad:C}=this.#o(e),v=ot=>{const{snapshot:Et}=this.#r.render({entityRef:o,loading:ot.loading,entity:ot.entity,context:s||{}});return{...Et,entityRef:o,Icon:this.#i(Et.Icon,i)}};let T;try{T=v({loading:C,entity:c})}catch{T={primaryTitle:o,entityRef:o}}if(!C)return{snapshot:T,promise:Promise.resolve(T)};const W=Promise.resolve().then(()=>this.#n?.load(o)).then(ot=>v({loading:!1,entity:ot??c})).catch(()=>{}),nt=new(Y())(ot=>{let Et=!1;return W.then(Lt=>{Lt&&ot.next(Lt)}).finally(()=>{Et||ot.complete()}),()=>{Et=!0}}),yt=W.then(ot=>ot??T);return{snapshot:T,update$:nt,promise:yt}}#o(e){if(typeof e!="string")return{entity:e,kind:e.kind,entityRef:(0,An.U2)(e),needsLoad:!1};const s=this.#t.get(e),o=s?.entity,c=(!s||Date.now()-s.updatedAt>this.#e)&&this.#r.async!==!1&&this.#n!==void 0;return{entity:o,kind:(0,An.KU)(e).kind,entityRef:e,needsLoad:c}}#a(e){const s=Us(e.cacheTtl),o=Us(e.batchDelay);return new(Xo())(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"]}),C=Date.now();return i.forEach((v,T)=>{this.#t.set(v,{updatedAt:C,entity:c[T]})}),c},{name:"DefaultEntityPresentationApi",cacheMap:new na(s),maxBatchSize:100,batchScheduleFn:o?i=>setTimeout(i,o):void 0})}#i(e,s){return e||(e===!1?!1:this.#s[s.toLocaleLowerCase("en-US")])}}const Pe=(0,Go.i)({id:"catalog",apis:[(0,X.b)({api:gr.v,deps:{discoveryApi:st.I,fetchApi:Yt.a},factory:({discoveryApi:r,fetchApi:e})=>new zo({discoveryApi:r,fetchApi:e})}),(0,X.b)({api:Ho.a,deps:{storageApi:je},factory:({storageApi:r})=>new Zo({storageApi:r})}),(0,X.b)({api:Vo.n,deps:{catalogApi:gr.v},factory:({catalogApi:r})=>qn.create({catalogApi:r})})],routes:{catalogIndex:xn.rQ,catalogEntity:fr.s},externalRoutes:{createComponent:xn.qP,viewTechDoc:xn.UJ,createFromTemplate:xn.Zg,unregisterRedirect:xn.pS}}),fi=Pe.provide((0,Re.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})),sa=Pe.provide((0,Re.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(r=>r.CatalogEntityPage),mountPoint:fr.s})),mi=Pe.provide((0,Re.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)}})),yi=Pe.provide((0,Re.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),vi=Pe.provide((0,Re.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),Ei=Pe.provide((0,Re.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),Ai=Pe.provide((0,Re.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),xi=Pe.provide((0,Re.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),Ci=Pe.provide((0,Re.NC)({name:"EntityHasSubdomainsCard",component:{lazy:()=>t.e(6415).then(t.bind(t,46415)).then(r=>r.HasSubdomainsCard)}})),bi=Pe.provide((0,Re.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),Si=Pe.provide((0,Re.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),Oi=Pe.provide((0,Re.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),Pi=Pe.provide((0,Re.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),wi=Pe.provide((0,Re.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),Ti=Pe.provide((0,Yo.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var yr=t(96726),vr=t(26679);class ra{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:o}){this.configApi=e,this.discoveryApi=s,this.identityApi=o}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(e,s){const i=`${await this.getApiOrigin()}/${s}`,c=await fetch(`${i.endsWith("/")?i:`${i}/`}index.html`);if(c.status===404)throw new Error("Page not found");return c.text()}async syncEntityDocs(e){return"cached"}async getBaseUrl(e,s,o){const i=await this.getApiOrigin();return new URL(e,`${i}/${o}`).toString()}}class oa{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:o}){this.configApi=e,this.discoveryApi=s,this.identityApi=o}async getCookie(){return{expiresAt:new Date(Date.now()+6e5).toISOString()}}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(e){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(e){return{site_name:"Live preview environment",site_description:""}}}const aa=[(0,X.b)({api:vr.s,deps:{configApi:Rt.U,discoveryApi:st.I,identityApi:he.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new ra({configApi:r,discoveryApi:e,identityApi:s})}),(0,X.b)({api:vr.l,deps:{configApi:Rt.U,discoveryApi:st.I,identityApi:he.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new oa({configApi:r,discoveryApi:e,identityApi:s})}),(0,X.b)({api:yr.Y,deps:{configApi:Rt.U},factory:({configApi:r})=>yr.L.fromConfig(r)})],ia={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},ca={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function la(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function da(){const r=await sr(),e=await la();return[...r,{context:"detected",data:e?ia:ca}]}var qe=t(58837),ua=t(3210);const ha=(0,qe.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}}),pa=()=>{const r=ha();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"})})},ga=(0,qe.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}}),fa=()=>{const r=ga();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 be=t(72664);const Er={isOpen:!1,setOpen:()=>{}},Ar=(0,Ot.createContext)(Er),xr=(0,Se.tK)("sidebar-open-state-context");function Cr(r){const{children:e,value:s}=r;return(0,a.jsx)(Ar.Provider,{value:s,children:(0,a.jsx)(xr.Provider,{value:(0,Xe.B)({1:s}),children:e})})}const $s=()=>{const r=(0,Ot.useContext)(xr),e=(0,Ot.useContext)(Ar);if(r===void 0)return e||Er;const s=r.atVersion(1);if(s===void 0)throw new Error("No context found for version 1.");return s};var br=t(72072),Sr=t(73524),sn=t(10394),Or=t(5893),ma=t(53373),ln=t.n(ma),ya=t(1125),Pr=t(29365),va=t(73845),Fs=t(72501),Ea=t(32881),Aa=t(27326),xa=t(13085);const wr=(0,Ot.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var Ns=t(34435);const Ca=(0,qe.A)(r=>({root:{flexGrow:0,margin:r.spacing(0,2),color:r.palette.navigation.color},selected:e=>({color:`${r.palette.navigation.selectedColor}!important`,borderTop:`solid ${e.sidebarConfig.selectedIndicatorWidth}px ${r.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),ba=r=>{const{to:e,label:s,icon:o,value:i}=r,{sidebarConfig:c}=(0,Ot.useContext)(be.yY),C=Ca({sidebarConfig:c}),v=(0,p.zy)(),{selectedMenuItemIndex:T,setSelectedMenuItemIndex:W}=(0,Ot.useContext)(wr),nt=(ot,Et)=>{W(Et===T?-1:Et)},yt=i===T&&T>=0||i!==T&&!(T>=0)&&e===v.pathname;return(0,a.jsx)(xa.A,{"aria-label":s,label:s,icon:o,component:br.N_,to:e||v.pathname,onChange:nt,value:i,selected:yt,classes:C})},Tr=r=>{const{children:e,to:s,label:o,icon:i,value:c}=r,{isMobile:C}=(0,Ns.Ut)();return C?(0,a.jsx)(ba,{to:s,label:o,icon:i,value:c}):(0,a.jsx)(a.Fragment,{children:e})},Rr=(0,qe.A)(r=>({root:{position:"fixed",backgroundColor:r.palette.navigation.background,color:r.palette.navigation.color,bottom:0,left:0,right:0,zIndex:r.zIndex.snackbar,borderTop:"1px solid #383838","@media print":{display:"none"}},overlay:e=>({background:r.palette.navigation.background,width:"100%",bottom:`${e.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${e.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:r.palette.navigation.color,alignItems:"center",justifyContent:"space-between",padding:r.spacing(2,3)},overlayHeaderClose:{color:r.palette.navigation.color},marginMobileSidebar:e=>({marginBottom:`${e.sidebarConfig.mobileSidebarHeight}px`})})),Sa=r=>(0,Cn.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),Oa=(0,Ot.createElement)(Tr).type,Pa=({children:r,label:e="Menu",open:s,onClose:o})=>{const{sidebarConfig:i}=(0,Ot.useContext)(be.yY),c=Rr({sidebarConfig:i});return(0,a.jsxs)(va.Ay,{anchor:"bottom",open:s,onClose:o,ModalProps:{BackdropProps:{classes:{root:c.marginMobileSidebar}}},classes:{root:c.marginMobileSidebar,paperAnchorBottom:c.overlay},children:[(0,a.jsxs)(sn.A,{className:c.overlayHeader,children:[(0,a.jsx)(Fs.A,{variant:"h3",children:e}),(0,a.jsx)(Pr.A,{onClick:o,classes:{root:c.overlayHeaderClose},children:(0,a.jsx)(Ea.A,{})})]}),(0,a.jsx)(sn.A,{component:"nav",children:r})]})},wa=r=>{const{sidebarConfig:e}=(0,Ot.useContext)(be.yY),{children:s}=r,o=Rr({sidebarConfig:e}),i=(0,p.zy)(),[c,C]=(0,Ot.useState)(-1);(0,Ot.useEffect)(()=>{C(-1)},[i.pathname]);let v=(0,_n.O)(s,W=>W.getElements().filter(nt=>nt.type===Oa));if(s)v.length?v=Sa(v):v.push((0,a.jsx)(Tr,{icon:(0,a.jsx)(Aa.A,{}),children:s},"default_menu"));else return null;const T=c>=0&&!v[c].props.to;return(0,a.jsx)(Cr,{value:{isOpen:!0,setOpen:()=>{}},children:(0,a.jsxs)(wr.Provider,{value:{selectedMenuItemIndex:c,setSelectedMenuItemIndex:C},children:[(0,a.jsx)(Pa,{label:v[c]&&v[c].props.label,open:T,onClose:()=>C(-1),children:v[c]&&v[c].props.children}),(0,a.jsx)(ya.A,{className:o.root,"data-testid":"mobile-sidebar-root",component:"nav",children:v})]})})};var Ta=t(87849),Ra=t(10315);const Ir=(0,qe.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 Ia=function(r){return r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open",r}(Ia||{});const Da=r=>{const{sidebarConfig:e}=(0,Ot.useContext)(be.yY),{openDelayMs:s=e.defaultOpenDelayMs,closeDelayMs:o=e.defaultCloseDelayMs,disableExpandOnHover:i,children:c}=r,C=Ir({sidebarConfig:e}),v=(0,Or.A)(Le=>Le.breakpoints.down("md"),{noSsr:!0}),[T,W]=(0,Ot.useState)(0),nt=(0,Ot.useRef)(),{isPinned:yt,toggleSidebarPinState:ot}=(0,Ns.Ut)(),Et=()=>{yt||i||(nt.current&&(clearTimeout(nt.current),nt.current=void 0),T!==2&&!v&&(nt.current=window.setTimeout(()=>{nt.current=void 0,W(2)},s),W(1)))},Lt=()=>{yt||i||(nt.current&&(clearTimeout(nt.current),nt.current=void 0),T===1?W(0):T===2&&(nt.current=window.setTimeout(()=>{nt.current=void 0,W(0)},o)))},Qt=T===2&&!v||yt,we=Le=>{Le?(W(2),ot()):(W(0),ot())};return(0,a.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,a.jsx)(Ma,{}),(0,a.jsx)(Cr,{value:{isOpen:Qt,setOpen:we},children:(0,a.jsx)(sn.A,{className:C.root,"data-testid":"sidebar-root",onMouseEnter:i?()=>{}:Et,onFocus:i?()=>{}:Et,onMouseLeave:i?()=>{}:Lt,onBlur:i?()=>{}:Lt,children:(0,a.jsx)(sn.A,{className:ln()(C.drawer,C.drawerWidth,{[C.drawerOpen]:Qt}),children:c})})})]})},La=r=>{const e=(0,be.Rv)(r.sidebarOptions??{}),s=(0,be.i8)(r.submenuOptions??{}),{children:o,disableExpandOnHover:i,openDelayMs:c,closeDelayMs:C}=r,{isMobile:v}=(0,Ns.Ut)();return v?(0,a.jsx)(wa,{children:o}):(0,a.jsx)(be.yY.Provider,{value:{sidebarConfig:e,submenuConfig:s},children:(0,a.jsx)(Da,{openDelayMs:c,closeDelayMs:C,disableExpandOnHover:i,children:o})})};function Ma(){const{sidebarConfig:r}=(0,Ot.useContext)(be.yY),{focusContent:e,contentRef:s}=(0,Sr.H)(),o=Ir({sidebarConfig:r}),{t:i}=(0,Ta.i)(Ra.O);return s?.current?(0,a.jsx)(d.A,{onClick:e,variant:"contained",className:ln()(o.visuallyHidden),children:i("skipToContent")}):null}var Ba=t(94509),ts=t(58502),ja=t(79065),Ua=t(55704),Dr=t(62248);const $a=(0,qe.A)(r=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:r.spacing(7)+1},drawer:e=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",opacity:0,[r.breakpoints.up("sm")]:{marginLeft:e.left,transition:r.transitions.create(["margin-left","opacity"],{easing:r.transitions.easing.sharp,duration:e.submenuConfig.defaultOpenDelayMs})},top:0,bottom:0,padding:0,background:r.palette.navigation.submenu?.background??"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:e.submenuConfig.drawerWidthClosed,transitionDelay:`${e.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:e=>({marginLeft:e.left,opacity:1,width:e.submenuConfig.drawerWidthOpen,[r.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:r.spacing(3),left:0,top:0}}),title:{fontSize:r.typography.h5.fontSize,fontWeight:r.typography.fontWeightMedium,color:r.palette.navigation.color,padding:r.spacing(2.5),[r.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),Fa=r=>{const{isOpen:e}=$s(),{sidebarConfig:s,submenuConfig:o}=(0,Ot.useContext)(be.yY),i=e?s.drawerWidthOpen:s.drawerWidthClosed,c=$a({left:i,submenuConfig:o}),{isHoveredOn:C}=(0,Ot.useContext)(be.U1),[v,T]=(0,Ot.useState)(!1);return(0,Ot.useEffect)(()=>{T(C)},[C]),(0,a.jsxs)(sn.A,{className:ln()(c.drawer,{[c.drawerOpen]:v}),children:[(0,a.jsx)(Fs.A,{variant:"h5",component:"span",className:c.title,children:r.title}),r.children]})};var Na=t(45810),Lr=t.n(Na);function Mr(r,e,s=!1){const o=new URLSearchParams(e.search).toString(),i=Lr().parse(o),c=new URLSearchParams(r.search).toString(),C=Lr().parse(c),v=s?Cn.isEqual:Cn.isMatch;return(0,Cn.isEqual)(e.pathname,r.pathname)&&v(C,i)}const ka=r=>(0,qe.A)(e=>({root:{color:e.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"100%",margin:0,padding:0,textAlign:"inherit",font:"inherit",textTransform:"none"},closed:{width:r.drawerWidthClosed,justifyContent:"center"},open:{[e.breakpoints.up("sm")]:{width:r.drawerWidthOpen}},highlightable:{"&:hover":{background:e.palette.navigation.navItem?.hoverBackground??"#404040"}},highlighted:{background:e.palette.navigation.navItem?.hoverBackground??"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:{boxSizing:"border-box",height:"100%",width:r.iconContainerWidth,marginRight:-e.spacing(2),display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"0"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:e.typography.fontWeightBold,fontSize:e.typography.fontSize},searchFieldHTMLInput:{padding:e.spacing(2,0,2)},searchContainer:{width:r.drawerWidthOpen-r.iconContainerWidth},secondaryAction:{width:e.spacing(6),textAlign:"center",marginRight:e.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:e.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${r.selectedIndicatorWidth}px ${e.palette.navigation.indicator}`,color:e.palette.navigation.selectedColor},"&$closed":{width:r.drawerWidthClosed},"& $closedItemIcon":{paddingRight:r.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-r.selectedIndicatorWidth}}}),{name:"BackstageSidebarItem"});function es(r){return(0,Ot.useMemo)(()=>ka(r),[r])()}const Wa=(r,e)=>(0,_n.O)(r.props.children,s=>{let o=!1;return s.getElements().forEach(({props:{to:i,dropdownItems:c}})=>{if(!o){if(c?.length){c.forEach(({to:C})=>o=o||Mr(e,(0,Dn.o1)(C)));return}i&&(o=Mr(e,(0,Dn.o1)(i)))}}),o},[e.pathname]);function ks(r){return r.to===void 0}const Ka=(0,Ot.createElement)(Fa).type,za=(0,Ot.forwardRef)(function({to:e,end:s,style:o,className:i,activeStyle:c,caseSensitive:C,activeClassName:v="active","aria-current":T="page",...W},nt){let{pathname:yt}=(0,p.zy)(),{pathname:ot}=(0,p.x$)(e);C||(yt=yt.toLocaleLowerCase("en-US"),ot=ot.toLocaleLowerCase("en-US"));let Et=yt===ot;!Et&&!s&&(Et=yt.startsWith(`${ot}/`));const Lt=Et?T:void 0;return(0,a.jsx)(O.N_,{...W,to:e,ref:nt,"aria-current":Lt,style:{...o,...Et?c:void 0},className:ln()([typeof i!="function"?i:void 0,Et?v:void 0])})}),Br=(0,Ot.forwardRef)((r,e)=>{const{icon:s,text:o,hasNotifications:i=!1,hasSubmenu:c=!1,disableHighlight:C=!1,onClick:v,noTrack:T,children:W,className:nt,...yt}=r,{sidebarConfig:ot}=(0,Ot.useContext)(be.yY),Et=es(ot),{isOpen:Lt}=$s(),Qt=!Lt&&c?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},we=(0,a.jsxs)(sn.A,{style:Qt,children:[(0,a.jsx)(s,{fontSize:"small"}),!Lt&&c?(0,a.jsx)(Dr.A,{fontSize:"small"}):(0,a.jsx)(a.Fragment,{})]}),Le=(0,a.jsx)(Ba.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!i,className:ln()({[Et.closedItemIcon]:!Lt}),children:we}),Ie=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(sn.A,{"data-testid":"login-button",className:Et.iconContainer,children:Le}),o&&(0,a.jsx)(Fs.A,{variant:"subtitle2",component:"span",className:Et.label,children:o}),(0,a.jsx)("div",{className:Et.secondaryAction,children:W})]}),dn=Lt?Ie:Le,$r={onClick:v,className:ln()(nt,Et.root,Lt?Et.open:Et.closed,ks(r)&&Et.buttonItem,{[Et.highlightable]:!C})},Fr=(0,ar.s)(),{pathname:Ws}=(0,p.x$)(!ks(r)&&r.to?r.to:""),Nr=(0,Ot.useCallback)(ui=>{if(!T){const hi="click",pi=o??"Sidebar Item",gi=Ws?{attributes:{to:Ws}}:void 0;Fr.captureEvent(hi,pi,gi)}v?.(ui)},[Fr,o,Ws,T,v]);return ks(r)?(0,a.jsx)(d.A,{role:"button","aria-label":o,...$r,ref:e,onClick:Nr,children:dn}):(0,a.jsx)(za,{...$r,activeClassName:Et.selected,to:r.to?r.to:"",ref:e,"aria-label":o||r.to,...yt,onClick:Nr,children:dn})}),Ha=({children:r,...e})=>{const{sidebarConfig:s}=(0,Ot.useContext)(be.yY),o=es(s),[i,c]=(0,Ot.useState)(!1),C=(0,p.zy)(),v=Wa(r,C),T=(0,Or.A)(ot=>ot.breakpoints.down("sm")),W=()=>{c(!0)},nt=()=>{c(!1)},yt=()=>T?i?(0,a.jsx)(Ua.A,{fontSize:"small",className:o.submenuArrow}):(0,a.jsx)(ja.A,{fontSize:"small",className:o.submenuArrow}):!i&&(0,a.jsx)(Dr.A,{fontSize:"small",className:o.submenuArrow});return(0,a.jsx)(be.U1.Provider,{value:{isHoveredOn:i,setIsHoveredOn:c},children:(0,a.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:nt,onTouchStart:i?nt:W,onMouseEnter:W,className:ln()(i&&o.highlighted),children:[(0,a.jsx)(Br,{hasSubmenu:!0,className:v?o.selected:"",...e,children:yt()}),i&&r]})})},jr=(0,Ot.forwardRef)((r,e)=>{const[s]=(0,_n.O)(r.children,o=>o.getElements().filter(i=>i.type===Ka));return s?(0,a.jsx)(Ha,{...r,children:s}):(0,a.jsx)(Br,{...r,ref:e})});function Di(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[s,o]=useState(""),i=es(e),c=r.icon?r.icon:SearchIcon,C=()=>{r.onSearch(s),o("")},v=yt=>{yt.key==="Enter"&&(yt.preventDefault(),C())},T=yt=>{o(yt.target.value)},W=yt=>{yt.preventDefault(),yt.stopPropagation()},nt=yt=>{C(),yt.preventDefault()};return _jsx(Box,{className:i.searchRoot,children:_jsx(jr,{icon:c,to:r.to,onClick:nt,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:s,onClick:W,onChange:T,onKeyDown:v,className:i.searchContainer,InputProps:{disableUnderline:!0,className:i.searchField},inputProps:{className:i.searchFieldHTMLInput}})})})}const Li=(0,ts.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),Mi=(0,ts.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),Va=(0,ts.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Ga=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),Bi=(0,ts.A)("div")(({theme:r})=>{const e=Ga(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),ji=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=es(r),{isOpen:s,setOpen:o}=useSidebarOpenState();if(useMediaQuery(C=>C.breakpoints.down("md"),{noSsr:!0}))return null;const c=()=>{o(!s)};return _jsx(Button,{role:"button",onClick:c,className:e.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:e.arrows,children:s?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},Ya=(0,qe.A)({root:{width:be.hC.drawerWidthClosed,height:3*be.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:be.hC.drawerWidthClosed,marginLeft:24}}),Qa=()=>{const r=Ya(),{isOpen:e}=$s();return(0,a.jsx)("div",{className:r.root,children:(0,a.jsx)(br.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,a.jsx)(pa,{}):(0,a.jsx)(fa,{})})})},Za=({children:r})=>(0,a.jsxs)(Sr.G,{children:[(0,a.jsxs)(La,{children:[(0,a.jsx)(Qa,{}),(0,a.jsx)(Va,{}),(0,a.jsx)(jr,{icon:ua.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Ja=t(71677),Xa=t(62437),_a=t(55484),qa=t(45061),ti=t(67289);const ei=(0,qe.A)(r=>({headerIcon:{color:r.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:r.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var ni=function(r){return r.LIGHT="light",r.DARK="dark",r}(ni||{});const si=()=>{const r=(0,In.gf)(Vn),e=ei(),[s,o]=(0,Ot.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),i={light:{icon:_a.A,title:"Dark theme"},dark:{icon:Xa.A,title:"Light theme"}},{title:c,icon:C}=i[s],v=()=>{o(T=>{const W=T==="light"?"dark":"light";return r.setActiveThemeId(W),W})};return(0,a.jsx)(sn.A,{display:"flex",alignItems:"center",mr:2,children:(0,a.jsx)(Ja.Ay,{title:c,arrow:!0,children:(0,a.jsx)(Pr.A,{size:"small",onClick:v,children:(0,a.jsx)(C,{className:e.headerIcon})})})})},ri=()=>(0,a.jsxs)(b.Wj,{children:[(0,a.jsx)(qa.T,{}),(0,a.jsx)(ti.p,{withSearch:!1})]}),oi=(0,a.jsx)(ri,{}),Ur=$o({apis:aa,configLoader:da,plugins:Object.values(n)}),ai=Ur.getProvider(),ii=Ur.getRouter(),ci=b.Ju.provide((0,u.Hr)({name:"ThemeToggleAddon",component:si,location:f.e.Header})),li=(0,a.jsxs)(pr,{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)(sa,{})}),(0,a.jsx)(p.qh,{path:"/docs",element:(0,a.jsx)(b.$j,{}),children:(0,a.jsx)(g.K,{})}),(0,a.jsxs)(p.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,a.jsx)(b.Wj,{}),children:[oi,(0,a.jsx)(u.po,{children:(0,a.jsx)(ci,{})})]})]}),di=()=>(0,a.jsx)(ai,{children:(0,a.jsx)(ii,{children:(0,a.jsx)(Za,{children:li})})});A.createRoot(document.getElementById("root")).render((0,a.jsx)(di,{}))},43836:(H,S,t)=>{"use strict";t.d(S,{qO:()=>p,tK:()=>A});var n=t(14041),a=t(63544);function A(g){return(0,a.Q)(g,()=>(0,n.createContext)(void 0))}function p(g){return(0,n.useContext)(A(g))}function b(g){return{set(u){globalThis[`__@backstage/${g}__`]=createContext(createVersionedValueMap(u))},reset(){delete globalThis[`__@backstage/${g}__`]}}}},10602:(H,S,t)=>{"use strict";t.d(S,{B:()=>n});function n(a){Object.freeze(a);const A={atVersion(p){return a[p]}};return Object.defineProperty(A,"$map",{configurable:!0,enumerable:!0,get(){return a}}),A}},63544:(H,S,t)=>{"use strict";t.d(S,{Q:()=>p});function n(){return typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")()}const a=n(),A=b=>`__@backstage/${b}__`;function p(b,g){const u=A(b);let f=a[u];return f||(f=g(),a[u]=f,f)}},7341:(H,S,t)=>{"use strict";t.d(S,{v:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.catalog.service"})},82292:(H,S,t)=>{"use strict";t.d(S,{n:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.catalog.entity-presentation"})},88083:(H,S,t)=>{"use strict";t.d(S,{T:()=>b});var n=t(6820),a=t(72348),A=t(46123),p=t.n(A);function b(d,y){const{kind:h,namespace:x,name:O,title:P,description:B,displayName:M,type:R}=u(d),D=(0,n.U2)({kind:h||"unknown",namespace:x||a.oQ,name:O||"unknown"}),$=f({kind:h,namespace:x,name:O,context:y}),N=[M,P,$].find(z=>z&&typeof z=="string"),J=[N!==D?D:void 0,R,B].filter(z=>z&&typeof z=="string").join(" | ");return{entityRef:D,primaryTitle:N,secondaryTitle:J||void 0,Icon:void 0}}const g=d=>!!d&&typeof d=="string";function u(d){if(typeof d=="string"){let y=d.indexOf(":");const h=d.indexOf("/");h!==-1&&h<y&&(y=-1);const x=y===-1?void 0:d.slice(0,y),O=h===-1?void 0:d.slice(y+1,h),P=d.slice(Math.max(y+1,h+1));return{kind:x,namespace:O,name:P}}if(typeof d=="object"&&d!==null){const y=[p()(d,"kind")].find(g),h=[p()(d,"metadata.namespace"),p()(d,"namespace")].find(g),x=[p()(d,"metadata.name"),p()(d,"name")].find(g),O=[p()(d,"metadata.title")].find(g),P=[p()(d,"metadata.description")].find(g),B=[p()(d,"spec.profile.displayName")].find(g),M=[p()(d,"spec.type")].find(g);return{kind:y,namespace:h,name:x,title:O,description:P,displayName:B,type:M}}return{}}function f(d){const y=d.kind?.toLocaleLowerCase("en-US")||"unknown",h=d.namespace||a.oQ,x=d.name||"unknown",O=d.context?.defaultKind?.toLocaleLowerCase("en-US"),P=d.context?.defaultNamespace?.toLocaleLowerCase("en-US");let B=x;return(P&&h.toLocaleLowerCase("en-US")!==P||h!==a.oQ)&&(B=`${h}/${B}`),O&&y.toLocaleLowerCase("en-US")!==O&&(B=`${y}:${B}`),B}},3169:(H,S,t)=>{"use strict";t.d(S,{f:()=>u});var n=t(6820),a=t(72427),A=t(14041),p=t(82292),b=t(88083);function g(f,d,y){const[h,x]=(0,A.useState)(f);return(0,A.useEffect)(()=>{x(f);const O=d?.subscribe({next:P=>{x(P)},complete:()=>{O?.unsubscribe()}});return()=>{O?.unsubscribe()}},y),h}function u(f,d){const h=(0,a.Q2)().get(p.n),x=[h,JSON.stringify(f),JSON.stringify(d||null)],O=(0,A.useMemo)(()=>{if(!h){const P=(0,b.T)(f,d);return{snapshot:P,promise:Promise.resolve(P)}}return h.forEntity(typeof f=="string"||"metadata"in f?f:(0,n.U2)(f),d)},x);return g(O.snapshot,O.update$,[O])}},18:(H,S,t)=>{"use strict";t.d(S,{a:()=>a});var n=t(55309);const a=(0,n.y)({id:"catalog-react.starred-entities"})},22995:(H,S,t)=>{"use strict";t.d(S,{Q:()=>z});var n=t(31085),a=t(10394),A=t(72501),p=t(4321),b=t(87263),g=t(16249),u=t(33145),f=t(58837),d=t(87051),y=t(12398),h=t(6924),x=t(20577),O=t(14041),P=t(45250),B=t.n(P),M=t(53373),R=t.n(M);const D=(0,f.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,d.A)(Y=>(0,y.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"})(x.Ay),N=Y=>(0,n.jsx)(b.A,{...Y,transition:!0,placement:"bottom-start",children:({TransitionProps:K})=>(0,n.jsx)(u.A,{...K,style:{transformOrigin:"0 0 0"},children:(0,n.jsx)(a.A,{children:Y.children})})}),J=Y=>(0,n.jsx)(p.A,{...Y,elevation:8});function z(Y){const{label:K,name:dt,LabelProps:G,TextFieldProps:Q,...Z}=Y,ct=D(),pt=(0,O.useCallback)(xt=>(0,n.jsx)(g.A,{...(0,P.merge)(xt,Q),variant:"outlined"}),[Q]),vt=(0,n.jsx)($,{size:"small",...Z,renderInput:Z.renderInput??pt,popupIcon:(0,n.jsx)(h.A,{"data-testid":`${dt}-expand`}),PaperComponent:J,PopperComponent:N});return(0,n.jsx)(a.A,{className:ct.root,children:K?(0,n.jsxs)(A.A,{...G,className:R()(ct.label,G?.className),component:"label",children:[(0,n.jsx)(a.A,{component:"span",children:K}),vt]}):vt})}},54203:(H,S,t)=>{"use strict";t.d(S,{GI:()=>B});var n=t(31085),a=t(14041),A=t(10394),p=t(64947),b=t(73845),g=t(42899),u=t(72501),f=t(5893),d=t(54917),y=t(65859),h=t(64630),x=t(87849);const O=M=>{const R=(0,f.A)(z=>z.breakpoints.down(M.options?.drawerBreakpoint??"md"),{noSsr:!0}),D=(0,d.A)(),[$,N]=(0,a.useState)(!1),{t:J}=(0,x.i)(h.j);return R?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.A,{style:{marginTop:D.spacing(1),marginLeft:D.spacing(1)},onClick:()=>N(!0),startIcon:(0,n.jsx)(y.A,{}),children:J("catalogFilter.buttonTitle")}),(0,n.jsx)(b.Ay,{open:$,onClose:()=>N(!1),anchor:M.options?.drawerAnchor??"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,n.jsxs)(A.A,{m:2,children:[(0,n.jsx)(u.A,{variant:"h6",component:"h2",style:{marginBottom:D.spacing(1)},children:J("catalogFilter.title")}),M.children]})})]}):(0,n.jsx)(g.A,{item:!0,lg:2,children:M.children})},P=M=>(0,n.jsx)(g.A,{item:!0,xs:12,lg:10,children:M.children}),B=M=>(0,n.jsx)(g.A,{container:!0,style:{position:"relative"},children:M.children});B.Filters=O,B.Content=P},47144:(H,S,t)=>{"use strict";t.d(S,{y:()=>J});var n=t(31085),a=t(10394),A=t(58837),p=t(14041),b=t(72427),g=t(73466),u=t(7341),f=t(69076),d=t(86901),y=t(44148),h=t(41260);const x=(0,n.jsx)(h.A,{fontSize:"small"}),O=(0,n.jsx)(y.A,{fontSize:"small"});function P({selected:z}){return(0,n.jsx)(f.A,{icon:x,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,n.jsx)(d.A,{control:(0,n.jsx)(P,{selected:Y}),label:Q,onClick:Z=>Z.preventDefault()})});var M=t(21405),R=t(26796),D=t(22995),$=t(45250);const N=(0,A.A)({root:{},label:{textTransform:"none",fontWeight:"bold"}},{name:"CatalogReactEntityAutocompletePicker"});function J(z){const{label:Y,name:K,path:dt,showCounts:G,Filter:Q,InputProps:Z,initialSelectedOptions:ct=[],filtersForAvailableValues:pt=["kind"],hidden:vt}=z,xt=N(),{updateFilters:Pt,filters:It,queryParameters:{[K]:ut}}=(0,M.nK)(),lt=(0,b.gf)(u.v),Ct=pt.map(it=>It[it]),{value:gt}=(0,g.A)(async()=>{const it=dt,{facets:U}=await lt.getEntityFacets({facets:[it],filter:(0,R.Rr)(Ct.filter(Boolean))});return Object.fromEntries(U[it].map(({value:V,count:et})=>[V,et]))},[...Ct]),St=(0,p.useMemo)(()=>[ut].flat().filter(Boolean),[ut]),Tt=It[K]?.values,[at,mt]=(0,p.useState)(St.length?St:Tt??ct);(0,p.useEffect)(()=>{St.length&&mt(St)},[St]);const At=Object.keys(gt??{}),tt=at.length&&At.length;(0,p.useEffect)(()=>{Pt({[K]:tt?new Q(at):void 0})},[K,tt,at,Q,Pt]),(0,p.useEffect)(()=>{if(!tt)return;const it=Tt??[];(0,$.isEqual)(it,at)||mt(it)},[Tt]);const ft=It[K];return ft&&typeof ft=="object"&&!("values"in ft)||!At.length||vt?null:(0,n.jsx)(a.A,{className:xt.root,pb:1,pt:1,children:(0,n.jsx)(D.Q,{multiple:!0,disableCloseOnSelect:!0,label:Y,name:`${String(K)}-picker`,options:At,value:at,TextFieldProps:Z,onChange:(it,U)=>mt(U),renderOption:(it,{selected:U})=>(0,n.jsx)(B,{selected:U,value:it,availableOptions:gt,showCounts:!!G})})})}},72987:(H,S,t)=>{"use strict";t.d(S,{t:()=>Tt});var n=t(31085),a=t(6820),A=t(10394),p=t(69076),b=t(86901),g=t(72501),u=t(71677),f=t(58837),d=t(44148),y=t(41260),h=t(14041),x=t(21405),O=t(92822),P=t(92367),B=t(48108),M=t(47966),R=t(90184),D=t(72427),$=t(87290),N=t(7341);function J({enabled:at}){const mt=(0,D.gf)(N.v),[At]=(0,h.useState)(async()=>{if(!at)return[];const tt="relations.ownedBy";return mt.getEntityFacets({facets:[tt]}).then(ft=>ft.facets[tt].map(it=>it.value).map(it=>{const{kind:U,name:V,namespace:et}=(0,a.KU)(it);return{apiVersion:"backstage.io/v1beta1",kind:U,metadata:{name:V,namespace:et}}}).sort((it,U)=>it.kind.localeCompare(U.kind,"en-US")||it.metadata.namespace.localeCompare(U.metadata.namespace,"en-US")||it.metadata.name.localeCompare(U.metadata.name,"en-US"))).catch(()=>[])});return(0,$.A)(async(tt,ft)=>{const it=await At;if(!it)return{items:[]};const U=ft?.limit??20,{text:V,start:et}=z(tt),bt=it.filter(Bt=>dt(V,Bt)),ht=et+U;return{items:bt.slice(0,ht),...K({entities:bt,limit:ht,payload:{text:V,start:ht}})}},[At],{loading:!0,value:{items:[]}})}function z(at){return Y(at)&&at.cursor?JSON.parse(atob(at.cursor)):{text:at.text||"",start:0}}function Y(at){return!!at.cursor}function K({entities:at,limit:mt,payload:At}){return at.length>mt?{cursor:btoa(JSON.stringify(At))}:{}}function dt(at,mt){const At=at.trim();return mt.kind.includes(At)||mt.metadata.namespace?.includes(At)||mt.metadata.name.includes(At)}function G(){const at=(0,D.gf)(N.v);return(0,$.A)(async(mt,At)=>{const tt=mt,ft=mt,it=At?.limit??20;if(ft.cursor){const V=await at.queryEntities({cursor:ft.cursor,limit:it});return{cursor:V.pageInfo.nextCursor,items:[...ft.items,...V.items]}}const U=await at.queryEntities({fullTextFilter:{term:tt.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:it});return{cursor:U.pageInfo.nextCursor,items:U.items}},[],{loading:!0})}var Q=t(76842);function Z({mode:at,initialSelectedOwnersRefs:mt}){const At=at==="owners-only",tt=G(),ft=J({enabled:At}),[it,U]=At?ft:tt;return[it,U,ct({enabled:!At,initialSelectedOwnersRefs:mt})]}function ct({enabled:at,initialSelectedOwnersRefs:mt}){const At=(0,h.useRef)({}),tt=(0,D.gf)(N.v),[,ft]=(0,$.A)(async()=>{(await tt.getEntitiesByRefs({entityRefs:mt})).items.forEach(U=>{U&&(At.current[(0,a.U2)(U)]=U)})},[]);return(0,Q.u)(()=>{at&&mt.length>0&&ft()}),{getEntity:it=>At.current[it],setEntity:it=>{At.current[(0,a.U2)(it)]=it}}}var pt=t(87051),vt=t(3169),xt=t(64630),Pt=t(87849),It=t(22995);const ut=(0,f.A)({root:{},label:{},input:{},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}},{name:"CatalogReactEntityOwnerPicker"}),lt=(0,pt.A)(at=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(b.A),Ct=(0,n.jsx)(y.A,{fontSize:"small"}),gt=(0,n.jsx)(d.A,{fontSize:"small"});function St(at){const mt=ut(),At=at.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:tt}=(0,vt.f)(at.entity);return(0,n.jsx)(A.A,{className:mt.fullWidth,children:(0,n.jsx)(lt,{className:mt.fullWidth,control:(0,n.jsx)(p.A,{icon:Ct,checkedIcon:gt,checked:at.isSelected}),onClick:ft=>ft.preventDefault(),label:(0,n.jsx)(u.Ay,{title:tt,children:(0,n.jsxs)(A.A,{display:"flex",alignItems:"center",children:[At?(0,n.jsx)(M.A,{fontSize:"small"}):(0,n.jsx)(B.A,{fontSize:"small"}),"\xA0",(0,n.jsx)(A.A,{className:mt.boxLabel,children:(0,n.jsx)(g.A,{noWrap:!0,children:tt})})]})})})})}const Tt=at=>{const mt=ut(),{mode:At="owners-only"}=at||{},{updateFilters:tt,filters:ft,queryParameters:{owners:it}}=(0,x.nK)(),[U,V]=(0,h.useState)(""),{t:et}=(0,Pt.i)(xt.j),bt=(0,h.useMemo)(()=>[it].flat().filter(Boolean),[it]),[ht,Bt]=(0,h.useState)(bt.length?bt:ft.owners?.values??[]),[{value:Ut,loading:Nt},Ht,Vt]=Z({mode:At,initialSelectedOwnersRefs:ht});(0,P.s)(()=>Ht({text:U}),[U,Ht],250);const te=Ut?.items||[];return(0,h.useEffect)(()=>{if(bt.length){const jt=new O.N9(bt);Bt(jt.values)}},[bt]),(0,h.useEffect)(()=>{tt({owners:ht.length?new O.N9(ht):void 0})},[ht,tt]),["user","group"].includes(ft.kind?.value.toLocaleLowerCase("en-US")||"")?null:(0,n.jsx)(A.A,{className:mt.root,pb:1,pt:1,children:(0,n.jsx)(It.Q,{label:et("entityOwnerPicker.title"),multiple:!0,disableCloseOnSelect:!0,loading:Nt,options:te,value:ht,getOptionSelected:(jt,kt)=>typeof kt=="string"?(0,a.U2)(jt)===kt:jt===kt,getOptionLabel:jt=>{const kt=typeof jt=="string"?Vt.getEntity(jt)||(0,a.KU)(jt,{defaultKind:"group",defaultNamespace:"default"}):jt;return(0,R.Z)(kt,(0,R.S)(kt))},onChange:(jt,kt)=>{V(""),Bt(kt.map(ne=>{const ge=typeof ne=="string"?ne:(0,a.U2)(ne);return typeof ne!="string"&&Vt.setEntity(ne),ge}))},filterOptions:jt=>jt,renderOption:(jt,{selected:kt})=>(0,n.jsx)(St,{entity:jt,isSelected:kt}),name:"owner-picker",onInputChange:(jt,kt)=>{V(kt)},ListboxProps:{onScroll:jt=>{const kt=jt.currentTarget;Math.abs(kt.scrollHeight-kt.clientHeight-kt.scrollTop)<1&&Ut?.cursor&&Ht({items:Ut.items,cursor:Ut.cursor})},"data-testid":"owner-picker-listbox"},LabelProps:{className:mt.label},TextFieldProps:{className:mt.input}})})}},8859:(H,S,t)=>{"use strict";t.d(S,{z:()=>x});var n=t(31085),a=t(72072),A=t(9222),p=t(14041),b=t(29207),g=t(10394),u=t(71677),f=t(58837),d=t(3169);const y=(0,f.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"}),h=P=>{const{entityRef:B,hideIcon:M,disableTooltip:R,defaultKind:D,defaultNamespace:$}=P,N=y(),{primaryTitle:J,secondaryTitle:z,Icon:Y}=(0,d.f)(B,{defaultKind:D,defaultNamespace:$});let K=(0,n.jsx)(n.Fragment,{children:J});return K=(0,n.jsxs)(g.A,{component:"span",className:N.root,children:[Y&&!M?(0,n.jsx)(g.A,{component:"span",className:N.icon,children:(0,n.jsx)(Y,{fontSize:"inherit"})}):null,K]}),z&&!R&&(K=(0,n.jsx)(u.Ay,{enterDelay:1500,title:z,children:K})),K},x=(0,p.forwardRef)((P,B)=>{const{entityRef:M,defaultKind:R,defaultNamespace:D,title:$,children:N,hideIcon:J,disableTooltip:z,...Y}=P,K=O(P.entityRef),dt=N??$??(0,n.jsx)(h,{entityRef:M,defaultKind:R,defaultNamespace:D,hideIcon:J,disableTooltip:z});return(0,n.jsx)(a.N_,{...Y,ref:B,to:K,children:dt})});function O(P){const B=(0,A.S)(b.s),M=(0,b.$)(P,{encodeParams:!0});return B(M)}},34428:(H,S,t)=>{"use strict";t.d(S,{i:()=>b});var n=t(31085),a=t(6820),A=t(14041),p=t(8859);function b(g){const{entityRefs:u,hideIcons:f,...d}=g;return(0,n.jsx)(n.Fragment,{children:u.map((y,h)=>{const x=typeof y=="string"?y:(0,a.U2)(y);return(0,n.jsxs)(A.Fragment,{children:[h>0&&", ",(0,n.jsx)(p.z,{...d,entityRef:y,hideIcon:f})]},`${h}.${x}`)})})}},90184:(H,S,t)=>{"use strict";t.d(S,{S:()=>p,Z:()=>b});var n=t(72348),a=t(46123),A=t.n(a);function p(g,u){const f=u?.defaultKind;let d,y,h;return"metadata"in g?(d=g.kind,y=g.metadata.namespace,h=g.metadata.name):(d=g.kind,y=g.namespace,h=g.name),(y===void 0||y==="")&&(y=n.oQ),u?.defaultNamespace!==void 0?u?.defaultNamespace===y&&(y=void 0):y===n.oQ&&(y=void 0),d=d.toLocaleLowerCase("en-US"),d=f&&f.toLocaleLowerCase("en-US")===d?void 0:d,`${d?`${d}:`:""}${y?`${y}/`:""}${h}`}function b(g,u){for(const f of["spec.profile.displayName","metadata.title"]){const d=A()(g,f);if(d&&typeof d=="string")return d}return u}},91035:(H,S,t)=>{"use strict";t.d(S,{m:()=>f});var n=t(31085),a=t(58837),A=t(92822),p=t(47144),b=t(64630),g=t(87849);const u=(0,a.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),f=d=>{const y=u(),{t:h}=(0,g.i)(b.j);return(0,n.jsx)(p.y,{label:h("entityTagPicker.title"),name:"tags",path:"metadata.tags",Filter:A.q_,showCounts:d.showCounts,InputProps:{className:y.input},initialSelectedOptions:d.initialFilter?d.initialFilter:[],hidden:d.hidden})}},67626:(H,S,t)=>{"use strict";t.d(S,{y:()=>It});var n=t(31085),a=t(72427),A=t(65461),p=t(40703),b=t(58007),g=t(68804),u=t(65569),f=t(5951),d=t(26343),y=t(72501),h=t(58837),x=t(9684),O=t(31129),P=t(14041),B=t(92822),M=t(21405),R=t(16009),D=t(45250),$=t(73466),N=t(7341),J=t(26796),z=t(87290),Y=t(48899);function K(){const ut=(0,a.gf)(R.K),lt=(0,a.gf)(N.v),{filters:Ct}=(0,M.nK)(),{value:gt,loading:St}=(0,$.A)(async()=>(await ut.getBackstageIdentity()).ownershipEntityRefs,[]),{user:Tt,owners:at,...mt}=Ct,{orderFields:At,...tt}=(0,J.$3)((0,D.compact)(Object.values(mt))),[{value:ft,loading:it},U]=(0,z.A)(async et=>{const bt=dt(et.owners,et.ownershipEntityRefs);if(bt===void 0)return 0;const{["metadata.name"]:ht,...Bt}=et.filter.filter,{totalItems:Ut}=await lt.queryEntities({...et.filter,filter:{...Bt,"relations.ownedBy":bt},limit:0});return Ut},[],{loading:!0});return(0,Y.A)(()=>{Object.keys(tt.filter).length!==0&>!==void 0&&U({ownershipEntityRefs:gt,owners:at,filter:tt})},[gt,at,tt]),{count:ft,loading:St||it,filter:(0,P.useMemo)(()=>B.tN.owned(gt??[]),[gt]),ownershipEntityRefs:gt}}function dt(ut,lt){if(lt===void 0)return;const Ct=ut?.values??[];if(Ct.length){const gt=(0,D.intersection)(Ct,lt);return gt.length===0?void 0:gt}return lt}function G(){const ut=(0,a.gf)(N.v),{filters:lt}=(0,M.nK)(),Ct=(0,P.useRef)(),gt=(0,P.useMemo)(()=>{const{user:at,...mt}=lt,At=(0,D.compact)(Object.values(mt)),{orderFields:tt,...ft}=(0,J.$3)(At),it={...ft,limit:0};return Object.keys(ft.filter).length===0?(Ct.current=void 0,Ct.current):(0,D.isEqual)(it,Ct.current)?Ct.current:(Ct.current=it,it)},[lt]),{value:St,loading:Tt}=(0,$.A)(async()=>{if(gt===void 0)return 0;const{totalItems:at}=await ut.queryEntities(gt);return at},[gt]);return{count:St,loading:Tt}}var Q=t(6820),Z=t(56889);function ct(){const ut=(0,a.gf)(N.v),{filters:lt}=(0,M.nK)(),{starredEntities:Ct}=(0,Z.I)(),gt=(0,P.useRef)(),St=(0,P.useMemo)(()=>{const{user:At,...tt}=lt,ft=(0,D.compact)(Object.values(tt)),{orderFields:it,...U}=(0,J.$3)(ft),et={...U,filter:{...U.filter,["metadata.name"]:Array.from(Ct).map(bt=>(0,Q.KU)(bt).name)},limit:1e3};return(0,D.isEqual)(et,gt.current)?gt.current:(gt.current=et,et)},[lt,Ct]),{value:Tt,loading:at}=(0,$.A)(async()=>Ct.size?(await ut.queryEntities(St)).items.map(tt=>(0,Q.U2)({kind:tt.kind,namespace:tt.metadata.namespace,name:tt.metadata.name})).filter(tt=>Ct.has(tt)).length:0,[St,Ct]),mt=(0,P.useMemo)(()=>B.tN.starred(Array.from(Ct)),[Ct]);return{count:Tt,loading:at,filter:mt}}var pt=t(87849),vt=t(64630);const xt=(0,h.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 Pt(ut,lt){return[{name:lt("userListPicker.personalFilter.title"),items:[{id:"owned",label:lt("userListPicker.personalFilter.ownedLabel"),icon:x.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:Ct,hidden:gt,alwaysKeepFilters:St}=ut,Tt=xt(),at=(0,a.gf)(A.U),{t:mt}=(0,pt.i)(vt.j),At=at.getOptionalString("organization.name")??mt("userListPicker.defaultOrgName"),{filters:tt,updateFilters:ft,queryParameters:{kind:it,user:U}}=(0,M.nK)(),V=["starred","all"],et=Pt(At,mt).map(Zt=>({...Zt,items:Zt.items.filter(({id:oe})=>["group","user"].some(le=>le===it)?V.includes(oe):!Ct||Ct.includes(oe))})).filter(({items:Zt})=>!!Zt.length),{count:bt,loading:ht,filter:Bt}=K(),{count:Ut}=G(),{count:Nt,filter:Ht,loading:Vt}=ct(),te=(0,P.useMemo)(()=>[U].flat()[0],[U]),[jt,kt]=(0,P.useState)(te??lt),ne=(0,P.useMemo)(()=>({all:Ut,starred:Nt,owned:bt}),[Nt,bt,Ut]);(0,P.useEffect)(()=>{te&&kt(te)},[te]);const ge=ht||Vt;return(0,P.useEffect)(()=>{!ge&&jt&&jt!=="all"&&ne[jt]===0&&!St&&kt("all")},[ge,ne,jt,kt,St]),(0,P.useEffect)(()=>{if(!jt||ge)return;ft({user:jt==="owned"?Bt:jt==="starred"?Ht:B.tN.all()})},[jt,Ht,Bt,ft,ge]),gt?null:(0,n.jsx)(p.A,{className:Tt.root,children:et.map(Zt=>(0,n.jsxs)(P.Fragment,{children:[(0,n.jsx)(y.A,{variant:"subtitle2",component:"span",className:Tt.title,children:Zt.name}),(0,n.jsx)(p.A,{className:Tt.groupWrapper,children:(0,n.jsx)(b.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":Zt.name,children:Zt.items.map((oe,le)=>(0,n.jsxs)(d.A,{role:"none presentation",divider:le!==Zt.items.length-1,onClick:()=>kt(oe.id),selected:oe.id===tt.user?.value,className:Tt.menuItem,disabled:ne[oe.id]===0,"data-testid":`user-picker-${oe.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[oe.icon&&(0,n.jsx)(g.A,{className:Tt.listIcon,children:(0,n.jsx)(oe.icon,{fontSize:"small"})}),(0,n.jsx)(f.A,{children:(0,n.jsxs)(y.A,{variant:"body1",children:[oe.label," "]})}),(0,n.jsx)(u.A,{children:ne[oe.id]??"-"})]},oe.id))})})]},Zt.name))})}},92822:(H,S,t)=>{"use strict";t.d(S,{I5:()=>d,Kf:()=>O,N9:()=>f,V3:()=>u,gM:()=>p,gZ:()=>x,mT:()=>P,qA:()=>b,q_:()=>g,tN:()=>h,z:()=>y});var n=t(6820),a=t(51372),A=t(67871);class p{value;label;constructor(R,D){this.value=R,this.label=D}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class b{value;constructor(R){this.value=R}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class g{values;constructor(R){this.values=R}filterEntity(R){return this.values.every(D=>(R.metadata.tags??[]).includes(D))}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}}class u{value;constructor(R){this.value=R}filterEntity(R){const D=this.toUpperArray(this.value.split(/\s/)),$=this.toUpperArray([R.metadata.tags]),N=this.toUpperArray([R.metadata.name,R.metadata.title,R.spec?.profile?.displayName]);for(const J of D)if($.every(z=>z!==J)&&N.every(z=>!z.includes(J)))return!1;return!0}getFullTextFilters(){return{term:this.value,fields:["metadata.name","metadata.title","spec.profile.displayName"]}}toQueryValue(){return this.value}toUpperArray(R){return R.flat().filter(D=>!!D).map(D=>D.toLocaleUpperCase("en-US"))}}class f{values;constructor(R){this.values=R.reduce((D,$)=>{try{return D.push((0,n.U2)((0,n.KU)($,{defaultKind:"Group"}))),D}catch{return D}},[])}getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(R){return this.values.some(D=>(0,A.t)(R,a.vv).some($=>(0,n.U2)($)===D))}toQueryValue(){return this.values}}class d{values;constructor(R){this.values=R}getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(R){return this.values.some(D=>R.spec?.lifecycle===D)}toQueryValue(){return this.values}}class y{values;constructor(R){this.values=R}getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(R){return this.values.some(D=>R.metadata.namespace===D)}toQueryValue(){return this.values}}class h{value;refs;constructor(R,D){this.value=R,this.refs=D}static owned(R){return new h("owned",R)}static all(){return new h("all")}static starred(R){return new h("starred",R)}getCatalogFilters(){return this.value==="owned"?{"relations.ownedBy":this.refs??[]}:this.value==="starred"?{"metadata.name":this.refs?.map(R=>(0,n.KU)(R).name)??[]}:{}}filterEntity(R){if(this.value==="starred")return this.refs?.includes((0,n.U2)(R))??!0;if(this.value==="owned"){const D=(0,A.t)(R,a.vv);return this.refs?.some($=>D.some(N=>(0,n.U2)(N)===$))??!1}return!0}toQueryValue(){return this.value}}class x{value;isOwnedEntity;isStarredEntity;constructor(R,D,$){this.value=R,this.isOwnedEntity=D,this.isStarredEntity=$}filterEntity(R){switch(this.value){case"owned":return this.isOwnedEntity(R);case"starred":return this.isStarredEntity(R);default:return!0}}toQueryValue(){return this.value}}class O{value;constructor(R){this.value=R}getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(R){const D=R.metadata.annotations?.["backstage.io/orphan"];return D!==void 0&&this.value.toString()===D}}class P{value;constructor(R){this.value=R}filterEntity(R){const D=R?.status?.items?.length>0;return D!==void 0&&this.value===D}}class B{values;constructor(R){this.values=R}getOrderFilters(){return this.values.map(([R,D])=>({field:R,order:D}))}toQueryValue(){return this.values.flat()}}},21405:(H,S,t)=>{"use strict";t.d(S,{B9:()=>B,nK:()=>M});var n=t(31085),a=t(45250),A=t.n(a),p=t(45810),b=t.n(p),g=t(14041),u=t(18690),f=t(87290),d=t(22771),y=t(71581),h=t(7341),x=t(26796),O=t(72427);const P=(0,g.createContext)(void 0),B=R=>{const D=(0,y.A)(),$=(0,O.gf)(h.v),[N,J]=(0,g.useState)({}),z=(0,u.zy)(),K=R.pagination===!0?"cursor":typeof R.pagination=="object"?R.pagination.mode??"cursor":"none",dt=typeof R.pagination=="object"?R.pagination.limit??20:20,{queryParameters:G,cursor:Q,offset:Z,limit:ct}=(0,g.useMemo)(()=>{const tt=b().parse(z.search,{ignoreQueryPrefix:!0});let ft=dt;if(typeof tt.limit=="string"){const U=Number.parseInt(tt.limit,10);isNaN(U)||(ft=U)}const it=typeof tt.offset=="string"&&K==="offset"?Number.parseInt(tt.offset,10):void 0;return{queryParameters:tt.filters??{},cursor:typeof tt.cursor=="string"&&K==="cursor"?tt.cursor:void 0,offset:K==="offset"&&it&&!isNaN(it)?it:void 0,limit:ft}},[K,z.search,dt]),[pt,vt]=(0,g.useState)(Q),[xt,Pt]=(0,g.useState)(Z),[It,ut]=(0,g.useState)(ct),[lt,Ct]=(0,g.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:{},offset:xt,limit:It})),[{loading:gt,error:St},Tt]=(0,f.A)(async()=>{const tt=N.kind?.value?.toLocaleLowerCase("en-US"),ft=tt==="user"||tt==="group"?{...N,owners:void 0}:N,it=(0,a.compact)(Object.values(ft)),U=Object.keys(N).reduce((V,et)=>{const bt=N[et];return bt?.toQueryValue&&(V[et]=bt.toQueryValue()),V},{});if(K!=="none")if(pt){if(pt!==lt.appliedCursor){const V=(0,x.be)(it),et=await $.queryEntities({cursor:pt,limit:It});Ct({appliedFilters:N,appliedCursor:pt,backendEntities:et.items,entities:et.items.filter(V),pageInfo:et.pageInfo,totalItems:et.totalItems})}}else{const V=(0,x.be)(it),et=(0,x.$3)(it),bt=(0,x.$3)((0,a.compact)(Object.values(lt.appliedFilters)));if(K==="offset"&&(lt.limit!==It||lt.offset!==xt)||!(0,a.isEqual)(bt,et)){const ht=await $.queryEntities({...et,limit:It,offset:xt});Ct({appliedFilters:N,backendEntities:ht.items,entities:ht.items.filter(V),pageInfo:ht.pageInfo,totalItems:ht.totalItems,limit:It,offset:xt})}}else{const V=(0,x.be)(it),et=(0,x.Rr)(it),bt=(0,x.Rr)((0,a.compact)(Object.values(lt.appliedFilters)));if((0,a.isEqual)(bt,et)){const ht=lt.backendEntities.filter(V);Ct({appliedFilters:N,backendEntities:lt.backendEntities,entities:ht,totalItems:ht.length})}else{const ht=await $.getEntities({filter:et}),Bt=ht.items.filter(V);Ct({appliedFilters:N,backendEntities:ht.items,entities:Bt,totalItems:Bt.length})}}if(D()){const V=b().parse(z.search,{ignoreQueryPrefix:!0}),et=b().stringify({...V,filters:U,cursor:pt,offset:xt,limit:It},{addQueryPrefix:!0,arrayFormat:"repeat"}),bt=`${window.location.pathname}${et}`;window.history?.replaceState(null,document.title,bt)}},[$,G,N,lt,pt,K,It,xt],{loading:!0});(0,d.A)(Tt,10,[N,pt,It,xt]);const at=(0,g.useCallback)(tt=>{K==="cursor"?vt(void 0):K==="offset"&&Pt(0),J(ft=>{const it=typeof tt=="function"?tt(ft):tt;return{...ft,...it}})},[K]),mt=(0,g.useMemo)(()=>{if(K!=="cursor")return;const tt=lt.pageInfo?.prevCursor,ft=lt.pageInfo?.nextCursor;return{prev:tt?()=>vt(tt):void 0,next:ft?()=>vt(ft):void 0}},[K,lt.pageInfo]),At=(0,g.useMemo)(()=>({filters:lt.appliedFilters,entities:lt.entities,backendEntities:lt.backendEntities,updateFilters:at,queryParameters:G,loading:gt,error:St,pageInfo:mt,totalItems:lt.totalItems,limit:It,offset:xt,setLimit:ut,setOffset:Pt,paginationMode:K}),[lt,at,G,gt,St,mt,It,xt,K,ut,Pt]);return(0,n.jsx)(P.Provider,{value:At,children:R.children})};function M(){const R=(0,g.useContext)(P);if(!R)throw new Error("useEntityList must be used within EntityListProvider");return R}},56889:(H,S,t)=>{"use strict";t.d(S,{I:()=>u});var n=t(6820),a=t(72427),A=t(14041),p=t(1394),b=t(18);function g(f){return typeof f=="string"?f:(0,n.U2)(f)}function u(){const f=(0,a.gf)(b.a),d=(0,p.A)((0,A.useMemo)(()=>f.starredEntitie$(),[f]),new Set),y=(0,A.useCallback)(x=>d.has(g(x)),[d]),h=(0,A.useCallback)(x=>f.toggleStarred(g(x)).then(),[f]);return{starredEntities:d,toggleStarredEntity:h,isStarredEntity:y}}},29207:(H,S,t)=>{"use strict";t.d(S,{$:()=>g,s:()=>b});var n=t(6820),a=t(72348),A=t(34569),p=t(63544);const b=(0,p.Q)("catalog:entity-route-ref",()=>(0,A.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function g(u,f){let d,y,h;if(typeof u=="string"){const O=(0,n.KU)(u);d=O.kind,y=O.namespace,h=O.name}else"metadata"in u?(d=u.kind,y=u.metadata.namespace,h=u.metadata.name):(d=u.kind,y=u.namespace,h=u.name);d=d.toLocaleLowerCase("en-US"),y=y?.toLocaleLowerCase("en-US")??a.oQ;const{encodeParams:x=!1}=f||{};return x&&(d=encodeURIComponent(d),y=encodeURIComponent(y),h=encodeURIComponent(h)),{kind:d,namespace:y,name:h}}},64630:(H,S,t)=>{"use strict";t.d(S,{j:()=>a});var n=t(93184);const a=(0,n.h)({id:"catalog-react",messages:{catalogFilter:{title:"Filters",buttonTitle:"Filters"},entityKindPicker:{title:"Kind",errorMessage:"Failed to load entity kinds"},entityLifecyclePicker:{title:"Lifecycle"},entityNamespacePicker:{title:"Namespace"},entityOwnerPicker:{title:"Owner"},entityProcessingStatusPicker:{title:"Processing Status"},entityTagPicker:{title:"Tags"},entityPeekAheadPopover:{title:"Drill into the entity to see all of the tags.",emailCardAction:{title:"Email {{email}}",subTitle:"mailto {{email}}"},entityCardActionsTitle:"Show details"},entitySearchBar:{placeholder:"Search"},entityTypePicker:{title:"Type",errorMessage:"Failed to load entity types",optionAllTitle:"all"},favoriteEntity:{addToFavorites:"Add to favorites",removeFromFavorites:"Remove from favorites"},inspectEntityDialog:{title:"Entity Inspector",closeButtonTitle:"Close",ancestryPage:{title:"Ancestry"},colocatedPage:{title:"Colocated",description:"These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL).",alertNoLocation:"Entity had no location information.",alertNoEntity:"There were no other entities on this location."},jsonPage:{title:"Entity as JSON",description:"This is the raw entity data as received from the catalog, on JSON form."},overviewPage:{title:"Overview"},yamlPage:{title:"Entity as YAML",description:"This is the raw entity data as received from the catalog, on YAML form."}},unregisterEntityDialog:{title:"Are you sure you want to unregister this entity?",cancelButtonTitle:"Cancel",deleteButtonTitle:"Delete Entity",deleteEntitySuccessMessage:"Removed entity {{entityName}}",bootstrapState:{title:'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "{{location}}"). If you believe this is in error, please contact the {{appTitle}} integrator.',advancedDescription:"You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.",advancedOptions:"Advanced Options"},onlyDeleteStateTitle:"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog.",unregisterState:{title:"This action will unregister the following entities:",subTitle:"Located at the following location:",description:"To undo, just re-register the entity in {{appTitle}}.",unregisterButtonTitle:"Unregister Location",advancedOptions:"Advanced Options",advancedDescription:"You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."},errorStateTitle:"Internal error: Unknown state"},userListPicker:{defaultOrgName:"Company",personalFilter:{title:"Personal",ownedLabel:"Owned",starredLabel:"Starred"},orgFilterAllLabel:"All"}}})},26796:(H,S,t)=>{"use strict";t.d(S,{$3:()=>p,Rr:()=>b,be:()=>g});var n=t(92822);function a(u){return!!u.getFullTextFilters}function A(u){return!!u.getOrderFilters}function p(u){const f=u.reduce((h,x)=>({...h,...x.getCatalogFilters?x.getCatalogFilters():{}}),{}),d=u.find(a)?.getFullTextFilters(),y=u.find(A)?.getOrderFilters()||[{field:"metadata.name",order:"asc"}];return{filter:f,fullTextFilter:d,orderFields:y}}function b(u){const f={};return u.forEach(d=>{d instanceof n.q_||d instanceof n.N9||d instanceof n.I5||d instanceof n.z||d instanceof n.tN||d instanceof n.Kf||d instanceof n.V3||d instanceof n.gZ||Object.assign(f,d.getCatalogFilters?.()||{})}),f}function g(u){return f=>u.every(d=>!d.filterEntity||d.filterEntity(f))}},67871:(H,S,t)=>{"use strict";t.d(S,{t:()=>a});var n=t(6820);function a(A,p,b){let g=A?.relations?.filter(u=>u.type===p).map(u=>(0,n.KU)(u.targetRef))||[];return b?.kind&&(g=g.filter(u=>u.kind.toLocaleLowerCase("en-US")===b.kind.toLocaleLowerCase("en-US"))),g}},95203:(H,S,t)=>{"use strict";t.d(S,{qP:()=>g,Zg:()=>f,rQ:()=>y,pS:()=>d,UJ:()=>u});var n=t(59598);class a{id;params;optional;defaultTarget;[p=n.b];constructor(x,O,P,B){this.id=x,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 A(h){return new a(h.id,h.params??[],!!h.optional,h?.defaultTarget)}var p,b=t(34569);const g=A({id:"create-component",optional:!0,defaultTarget:"scaffolder.createComponent"}),u=A({id:"view-techdoc",optional:!0,params:["namespace","kind","name"],defaultTarget:"techdocs.docRoot"}),f=A({id:"create-from-template",optional:!0,params:["namespace","templateName"],defaultTarget:"scaffolder.selectedTemplate"}),d=A({id:"catalog:unregister-redirect",optional:!0}),y=(0,b.H)({id:"catalog"})},13646:(H,S,t)=>{"use strict";t.d(S,{OL:()=>a});function n(f,d){return f.name===d.name}function a(f,d){return"resourceType"in f?!d||f.resourceType===d:!1}function A(f){return f.attributes.action==="create"}function p(f){return f.attributes.action==="read"}function b(f){return f.attributes.action==="update"}function g(f){return f.attributes.action==="delete"}function u(f){return{authorize:async(d,y)=>await f.authorize(d,y),authorizeConditional(d,y){const h=d;return f.authorize(h,y)}}}},54241:(H,S,t)=>{"use strict";t.d(S,{b:()=>n});var n=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 n=t(55309);const a=(0,n.y)({id:"plugin.permission.api"})},70734:(H,S,t)=>{"use strict";t.d(S,{e:()=>b});var n=t(31085),a=t(14041),A=t(58837);const p=(0,A.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),b=g=>{const{text:u,preTag:f,postTag:d}=g,y=p(),h=(0,a.useMemo)(()=>u.split(new RegExp(`(${f}.+?${d})`)),[d,f,u]);return(0,n.jsx)(n.Fragment,{children:h.map((x,O)=>x.includes(f)?(0,n.jsx)("mark",{className:y.highlight,children:x.replace(new RegExp(`${f}|${d}`,"g"),"")},O):x)})}},54560:(H,S,t)=>{"use strict";t.d(S,{ec:()=>d});var n=t(31085),a=t(14041),A=t(93368),p=t(88758),b=t(8109);const g="search.results.list.items.extensions.v1",u=(x,O)=>{for(const P of x)if(!(!isValidElement(P)||!getComponentData(P,g)?.(O)))return cloneElement(P,{rank:O.rank,highlight:O.highlight,result:O.document,...P.props});return null},f=x=>{const{rank:O,result:P,noTrack:B,children:M,alignItems:R="flex-start",...D}=x,$=(0,A.s)(),N=(0,a.useCallback)(()=>{B||P&&$.captureEvent("discover",P.title,{attributes:{to:P.location},value:O})},[O,P,B,$]);return(0,n.jsx)(b.A,{divider:!0,alignItems:R,onClickCapture:N,...D,children:M})},d=x=>{const{name:O,component:P,predicate:B=()=>!0}=x;return(0,p.zZ)({name:O,component:{lazy:()=>P().then(M=>R=>(0,n.jsx)(f,{rank:R.rank,result:R.result,noTrack:R.noTrack,children:(0,a.createElement)(M,R)}))},data:{[g]:B}})},y=x=>{const O=useElementFilter(x,P=>P.selectByComponentData({key:g}).getElements(),[x]);return useCallback((P,B)=>{const M=u(O,P);return _jsx(Fragment,{children:M??_jsx(f,{rank:P.rank,result:P.document,children:_jsx(DefaultResultListItem,{rank:P.rank,highlight:P.highlight,result:P.document})})},B)},[O])},h=x=>{const{results:O,children:P,...B}=x,M=y(P);return _jsx(List,{...B,children:O.map(M)})}},86202:(H,S,t)=>{"use strict";t.d(S,{A:()=>n,G:()=>a});const n="backstage.io/techdocs-ref",a="backstage.io/techdocs-entity"},72020:(H,S,t)=>{"use strict";t.d(S,{AF:()=>f,Hr:()=>h,Wm:()=>u,YR:()=>B,po:()=>d});var n=t(31085),a=t(14041),A=t(18690),p=t(19402),b=t(88758),g=t(82442);const u="techdocs.addons.addon.v1",f="techdocs.addons.wrapper.v1",d=()=>null;(0,p.h)(d,f,!0);const y=M=>`${u}.${M.toLocaleLowerCase("en-US")}`;function h(M){const{name:R,component:D}=M;return(0,b.zZ)({name:R,component:{sync:$=>(0,n.jsx)(D,{...$})},data:{[u]:M,[y(R)]:!0}})}const x=(M,R)=>M.selectByComponentData({key:R}).getElements()[0],O=M=>M.selectByComponentData({key:f}).selectByComponentData({key:u}),P=M=>M.selectByComponentData({key:f}).findComponentData({key:u}),B=()=>{const M=(0,A.P1)(),R=(0,g.O)(M,O),D=(0,g.O)(M,P),$=(0,a.useCallback)(z=>{if(!R||!z)return null;const Y=y(z.name);return x(R,Y)??null},[R]),N=(0,a.useCallback)(z=>{const Y=D.find(K=>K.name===z);return Y?$(Y):null},[D,$]),J=(0,a.useCallback)(z=>{const Y=D.filter(K=>K.location===z);return Y.length?Y.map($):null},[D,$]);return{renderComponentByName:N,renderComponentsByLocation:J}}},26679:(H,S,t)=>{"use strict";t.d(S,{l:()=>a,s:()=>A});var n=t(55309);const a=(0,n.y)({id:"plugin.techdocs.service"}),A=(0,n.y)({id:"plugin.techdocs.storageservice"})},86892:(H,S,t)=>{"use strict";t.d(S,{R:()=>M,V:()=>R});var n=t(31085),a=t(14041),A=t(73466),p=t(28966),b=t(6820),g=t(43836),u=t(10602),f=t(72427),d=t(65461),y=t(25862),h=t(26679);function x(D,$){return $.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(D.kind=D.kind.toLocaleLowerCase(),D.name=D.name.toLocaleLowerCase(),D.namespace=D.namespace.toLocaleLowerCase()),D}const O=(D,$)=>(0,b.U2)(D)===(0,b.U2)($),P={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},B=(0,g.tK)("techdocs-reader-page-context"),M=(0,a.memo)(D=>{const{entityRef:$,children:N}=D,J=(0,f.gf)(h.l),z=(0,f.gf)(d.U),Y=(0,A.A)(async()=>J.getEntityMetadata($),[$]),K=(0,p.A)(async()=>J.getTechDocsMetadata($),[$]),[dt,G]=(0,a.useState)(P.title),[Q,Z]=(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 vt={metadata:K,entityRef:x($,z),entityMetadata:Y,shadowRoot:ct,setShadowRoot:pt,title:dt,setTitle:G,subtitle:Q,setSubtitle:Z},xt=(0,u.B)({1:vt});return(0,n.jsx)(y.Ig,{attributes:{entityRef:(0,b.U2)($)},children:(0,n.jsx)(B.Provider,{value:xt,children:N instanceof Function?N(vt):N})})},(D,$)=>O(D.entityRef,$.entityRef)),R=()=>{const D=(0,a.useContext)(B);if(D===void 0)return P;const $=D.atVersion(1);if($===void 0)throw new Error("No context found for version 1.");return $}},99730:(H,S,t)=>{"use strict";t.d(S,{e:()=>n});const n=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},95768:(H,S,t)=>{"use strict";t.d(S,{V:()=>n});function n(a,A){return A.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?a:a.toLocaleLowerCase("en-US")}},8915:(H,S,t)=>{"use strict";t.d(S,{K:()=>It});var n=t(31085),a=t(59428),A=t(27586),p=t(26280),b=t(21405),g=t(54203),u=t(67626),f=t(72987),d=t(91035),y=t(81859),h=t(14041),x=t(86519),O=t(86202);class P{getCatalogFilters(){return{[`metadata.annotations.${O.A}`]:x.c}}}const B=()=>{const{updateFilters:ut}=(0,b.nK)();return(0,h.useEffect)(()=>{ut({techdocs:new P})},[ut]),null};var M=t(36338),R=t(45250),D=t(88640),$=t(77310),N=t(9222),J=t(72427),z=t(65461),Y=t(56889),K=t(27125),dt=t(14209),G=t(92822);function Q(ut){const{actions:lt,columns:Ct,data:gt,isLoading:St,options:Tt}=ut,{updateFilters:at,setLimit:mt,setOffset:At,limit:tt,totalItems:ft,offset:it}=(0,b.nK)(),[U,V]=(0,h.useState)(it&&tt?Math.floor(it/tt):0);return(0,h.useEffect)(()=>{ft&&U*tt>=ft?At(Math.max(0,ft-tt)):At(Math.max(0,U*tt))},[At,U,tt,ft]),(0,n.jsx)(dt.X,{columns:Ct,data:gt,options:{paginationPosition:"both",pageSizeOptions:[5,10,20,50,100],pageSize:tt,emptyRowsWhenPaging:!1,actionsColumnIndex:-1,...Tt},actions:lt,onSearchChange:et=>at({text:et?new G.V3(et):void 0}),page:U,onPageChange:et=>{V(et)},onRowsPerPageChange:et=>{mt(et)},totalCount:ft,localization:{pagination:{labelDisplayedRows:""}},isLoading:St})}function Z(ut){const{actions:lt,columns:Ct,data:gt,next:St,prev:Tt,title:at,isLoading:mt,options:At,...tt}=ut;return(0,n.jsx)(dt.X,{title:mt?"":at,columns:Ct,data:gt,options:{paginationPosition:"both",...At,pageSizeOptions:[],showFirstLastPageButtons:!1,pageSize:Number.MAX_SAFE_INTEGER,emptyRowsWhenPaging:!1,actionsColumnIndex:-1},onPageChange:ft=>{ft>0?St?.():Tt?.()},page:Tt?1:0,totalCount:St?Number.MAX_VALUE:Number.MAX_SAFE_INTEGER,localization:{pagination:{labelDisplayedRows:""}},isLoading:mt,...tt})}var ct=t(84295),pt=t(42717),vt=t(82779),xt=t(23747);const Pt=ut=>{const{columns:lt,actions:Ct,options:gt}=ut,{loading:St,error:Tt,entities:at,filters:mt,paginationMode:At,pageInfo:tt}=(0,b.nK)(),{isStarredEntity:ft,toggleStarredEntity:it}=(0,Y.I)(),[,U]=(0,M.A)(),V=(0,N.S)(vt.Oc),et=(0,J.gf)(z.U),bt=(0,R.capitalize)(mt.user?.value??"all"),ht=[ct.f.createCopyDocsUrlAction(U),ct.f.createStarEntityAction(ft,it)],Bt=(0,xt.H)(at,V,et);return At==="cursor"?(0,n.jsx)(Z,{columns:lt||pt.F,isLoading:St,title:bt,actions:Ct||ht,options:gt,data:Bt,next:tt?.next,prev:tt?.prev}):At==="offset"?(0,n.jsx)(Q,{columns:lt||pt.F,isLoading:St,title:bt,actions:Ct||ht,options:gt,data:Bt}):Tt?(0,n.jsx)(D.B,{severity:"error",title:"Could not load available documentation.",children:(0,n.jsx)($.z,{language:"text",text:Tt.toString()})}):(0,n.jsx)(K.o,{title:bt,entities:at,loading:St,actions:Ct||ht,columns:lt,options:gt})};Pt.columns=pt.B,Pt.actions=ct.f;const It=ut=>{const{initialFilter:lt="owned",columns:Ct,actions:gt,ownerPickerMode:St,pagination:Tt,options:at,PageWrapper:mt,CustomHeader:At}=ut,tt=mt||y.S,ft=At||(()=>(0,n.jsx)(a.d,{title:"",children:(0,n.jsx)(A.Y,{children:"Discover documentation in your ecosystem."})}));return(0,n.jsx)(tt,{children:(0,n.jsxs)(p.U,{children:[(0,n.jsx)(ft,{}),(0,n.jsx)(b.B9,{pagination:Tt,children:(0,n.jsxs)(g.GI,{children:[(0,n.jsxs)(g.GI.Filters,{children:[(0,n.jsx)(B,{}),(0,n.jsx)(u.y,{initialFilter:lt}),(0,n.jsx)(f.t,{mode:St}),(0,n.jsx)(d.m,{})]}),(0,n.jsx)(g.GI.Content,{children:(0,n.jsx)(Pt,{actions:gt,columns:Ct,options:at})})]})})]})})}},27125:(H,S,t)=>{"use strict";t.d(S,{o:()=>O});var n=t(31085),a=t(36338),A=t(9222),p=t(72427),b=t(65461),g=t(82779),u=t(14209),f=t(44186),d=t(73896),y=t(84295),h=t(42717),x=t(23747);const O=P=>{const{entities:B,title:M,loading:R,columns:D,actions:$,options:N}=P,[,J]=(0,a.A)(),z=(0,A.S)(g.Oc),Y=(0,p.gf)(b.U);if(!B)return null;const K=(0,x.H)(B,z,Y),dt=[y.f.createCopyDocsUrlAction(J)],G=20,Q=K&&K.length>G;return(0,n.jsx)(n.Fragment,{children:R||K&&K.length>0?(0,n.jsx)(u.X,{isLoading:R,options:{paging:Q,pageSize:G,search:!0,actionsColumnIndex:-1,...N},data:K,columns:D||h.F,actions:$||dt,title:M?`${M} (${K.length})`:`All (${K.length})`}):(0,n.jsx)(f.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,n.jsx)(d.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};O.columns=h.B,O.actions=y.f},84295:(H,S,t)=>{"use strict";t.d(S,{f:()=>p});var n=t(31085),a=t(55290),A=t(18956);const p={createCopyDocsUrlAction(b){return g=>({icon:()=>(0,n.jsx)(a.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>b(`${window.location.origin}${g.resolved.docsUrl}`)})},createStarEntityAction(b,g){return u=>{const f=u.entity,d=b(f);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,n.jsx)(A.m,{isFavorite:d}),tooltip:d?"Remove from favorites":"Add to favorites",onClick:()=>g(f)}}}}},42717:(H,S,t)=>{"use strict";t.d(S,{B:()=>d,F:()=>y});var n=t(31085),a=t(10394),A=t(58837);const p=(0,A.A)(h=>({value:{marginBottom:h.spacing(.75)},subvalue:{color:h.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function b(h){const{value:x,subvalue:O}=h,P=p();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.A,{className:P.value,children:x}),(0,n.jsx)(a.A,{className:P.subvalue,children:O})]})}var g=t(72072),u=t(34428);function f(h){return h.metadata.title||h.metadata.name}const d={createTitleColumn(h){return{...d.createNameColumn(),field:"entity.metadata.title",hidden:h?.hidden}},createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,searchable:!0,defaultSort:"asc",customSort:(h,x)=>{const O=f(h.entity).toLocaleLowerCase(),P=f(x.entity).toLocaleLowerCase();return O.localeCompare(P)},render:h=>(0,n.jsx)(b,{value:(0,n.jsx)(g.N_,{to:h.resolved.docsUrl,children:f(h.entity)}),subvalue:h.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:h})=>(0,n.jsx)(u.i,{entityRefs:h.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}},y=[d.createTitleColumn({hidden:!0}),d.createNameColumn(),d.createOwnerColumn(),d.createKindColumn(),d.createTypeColumn()]},23747:(H,S,t)=>{"use strict";t.d(S,{H:()=>b});var n=t(51372),a=t(67871),A=t(90184),p=t(95768);function b(g,u,f){return g.map(d=>{const y=(0,a.t)(d,n.vv);return{entity:d,resolved:{docsUrl:u({namespace:(0,p.V)(d.metadata.namespace??"default",f),kind:(0,p.V)(d.kind,f),name:(0,p.V)(d.metadata.name,f)}),ownedByRelations:y,ownedByRelationsTitle:y.map(h=>(0,A.S)(h,{defaultKind:"group"})).join(", ")}}})}},81859:(H,S,t)=>{"use strict";t.d(S,{S:()=>b});var n=t(31085),a=t(27155),A=t(72427),p=t(65461);const b=g=>{const{children:u,CustomPageWrapper:f}=g,y=`Documentation available in ${(0,A.gf)(p.U).getOptionalString("organization.name")??"Backstage"}`;return(0,n.jsx)(n.Fragment,{children:f?(0,n.jsx)(f,{children:u}):(0,n.jsx)(a.d,{title:"Documentation",subtitle:y,themeId:"documentation",children:u})})}},39278:(H,S,t)=>{"use strict";t.d(S,{$j:()=>$,Wj:()=>N,Ju:()=>B});var n=t(26679),a=t(70835),A=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,Z=`${await this.getApiOrigin()}/metadata/techdocs/${dt}/${K}/${G}`,ct=await this.fetchApi.fetch(`${Z}`);if(!ct.ok)throw await a.o.fromResponse(ct);return await ct.json()}async getEntityMetadata(Y){const{kind:K,namespace:dt,name:G}=Y,Z=`${await this.getApiOrigin()}/metadata/entity/${dt}/${K}/${G}`,ct=await this.fetchApi.fetch(`${Z}`);if(!ct.ok)throw await a.o.fromResponse(ct);return await ct.json()}}class g{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 vt="";switch(pt.status){case 404:throw vt="Page not found. ",K||(vt+="This could be because there is no index.md file in the root of the docs directory of this repository."),new A.m_(vt);case 500:throw vt="Could not generate documentation or an error in the TechDocs backend. ",new Error(vt);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,vt)=>{const xt=new AbortController;(0,p.y)(ct,{fetch:this.fetchApi.fetch,signal:xt.signal,onmessage(Pt){if(Pt.event==="log")Pt.data&&K(JSON.parse(Pt.data));else if(Pt.event==="finish"){let It=!1;Pt.data&&({updated:It}=JSON.parse(Pt.data)),pt(It?"updated":"cached")}else Pt.event==="error"&&vt(new Error(Pt.data))},onerror(Pt){throw xt.abort(),vt(Pt),Pt}})})}async getBaseUrl(Y,K,dt){const{kind:G,namespace:Q,name:Z}=K,pt=`${await this.getApiOrigin()}/static/docs/${Q}/${G}/${Z}/${dt}`;return new URL(Y,pt.endsWith("/")?pt:`${pt}/`).toString()}}var u=t(82779),f=t(9803),d=t(12935),y=t(65461),h=t(57405),x=t(70795),O=t(88758),P=t(54560);const B=(0,f.i)({id:"techdocs",apis:[(0,d.b)({api:n.s,deps:{configApi:y.U,discoveryApi:h.I,fetchApi:x.a},factory:({configApi:z,discoveryApi:Y,fetchApi:K})=>new g({configApi:z,discoveryApi:Y,fetchApi:K})}),(0,d.b)({api:n.l,deps:{configApi:y.U,discoveryApi:h.I,fetchApi:x.a},factory:({configApi:z,discoveryApi:Y,fetchApi:K})=>new b({configApi:z,discoveryApi:Y,fetchApi:K})})],routes:{root:u.rQ,docRoot:u.Oc,entityContent:u.Ri}}),M=B.provide((0,O.QJ)({name:"TechdocsPage",component:()=>t.e(8803).then(t.bind(t,38803)).then(z=>z.Router),mountPoint:u.rQ})),R=B.provide((0,O.QJ)({name:"EntityTechdocsContent",component:()=>t.e(8803).then(t.bind(t,38803)).then(z=>z.LegacyEmbeddedDocsRouter),mountPoint:u.Ri})),D=B.provide((0,O.QJ)({name:"TechDocsCustomHome",component:()=>t.e(5470).then(t.bind(t,25470)).then(z=>z.TechDocsCustomHome),mountPoint:u.rQ})),$=B.provide((0,O.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(z=>z.TechDocsIndexPage),mountPoint:u.rQ})),N=B.provide((0,O.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(z=>z.TechDocsReaderPage),mountPoint:u.Oc})),J=B.provide((0,P.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(z=>z.TechDocsSearchResultListItem),predicate:z=>z.type==="techdocs"}))},67289:(H,S,t)=>{"use strict";t.d(S,{p:()=>Ne});var n=t(31085),a=t(14041),A=t(42899),p=t(58837),b=t(86892),g=t(9394),u=t(91360),f=t(22856);const d="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",y=m=>{(0,a.useEffect)(()=>{if(!m)return()=>{};const L=m.querySelectorAll('head > link[rel="stylesheet"]');let j=L?.length??0;const F=new CustomEvent(d);if(!j)return m.dispatchEvent(F),()=>{};const k=()=>{--j===0&&m.dispatchEvent(F)};return L?.forEach(_=>{_.addEventListener("load",k)}),()=>{L?.forEach(_=>{_.removeEventListener("load",k)})}},[m])},h=m=>{const[L,j]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!m)return()=>{};j(!0);const F=m.style;F.setProperty("opacity","0");const k=()=>{j(!1),F.setProperty("opacity","1")};return m.addEventListener(d,k),()=>{m.removeEventListener(d,k)}},[m]),L},x=m=>{const{element:L,onAppend:j,children:F}=m,[k,_]=(0,a.useState)((0,g.vt)({...(0,f.A)(),insertionPoint:void 0}));y(L);const rt=(0,a.useCallback)(wt=>{if(!L||!wt)return;_((0,g.vt)({...(0,f.A)(),insertionPoint:L.querySelector("head")||void 0}));let Dt=wt.shadowRoot;Dt||(Dt=wt.attachShadow({mode:"open"})),Dt.replaceChildren(L),typeof j=="function"&&j(Dt)},[L,j]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(u.Ay,{jss:k,sheetsManager:new Map,children:[(0,n.jsx)("div",{ref:rt,"data-testid":"techdocs-native-shadowroot"}),F]})})};var O=t(12784);const P=()=>{const{shadowRoot:m}=(0,b.V)();return m},B=m=>{const L=P(),[j,F]=(0,a.useState)(L?.firstChild);return(0,a.useEffect)(()=>{let k;return L&&(k=new MutationObserver(()=>{F(L?.firstChild)}),k.observe(L,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),()=>k?.disconnect()},[L]),!j||!(j instanceof HTMLElement)?[]:m.map(k=>j.querySelectorAll(k)).filter(k=>k.length).map(k=>Array.from(k)).flat()},M=m=>m.toString()&&m.rangeCount&&m.getRangeAt(0).getBoundingClientRect().top,R=(m=0)=>{const L=P(),[j,F]=useState(null),k=useMemo(()=>debounce(()=>{const _=L,rt=_.getSelection?_.getSelection():document.getSelection();rt&&M(rt)?F(rt):F(null)},m),[L,F,m]);return useEffect(()=>(window.document.addEventListener("selectionchange",k),()=>{k.cancel(),window.document.removeEventListener("selectionchange",k)}),[k]),j};var D=t(26280),$=t(68146),N=t(45250),J=t(73466),z=t(5877),Y=t(43836),K=t(10602),dt=t(72427),G=t(93368),Q=t(25862),Z=t(65461),ct=t(55309);const pt=(0,ct.y)({id:"plugin.search.queryservice"});class vt{mockedResults;constructor(L){this.mockedResults=L}query(){return Promise.resolve(this.mockedResults||{results:[]})}}const xt=(0,Y.tK)("search-context"),Pt=()=>{const m=(0,a.useContext)(xt);if(!m)throw new Error("useSearch must be used within a SearchContextProvider");const L=m.atVersion(1);if(!L)throw new Error("No SearchContext v1 found");return L},It=()=>(0,a.useContext)(xt)!==void 0,ut={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},lt=(m=ut)=>{const L=(0,dt.gf)(pt),j=(0,G.s)(),[F,k]=(0,a.useState)(m.term),[_,rt]=(0,a.useState)(m.types),[wt,Dt]=(0,a.useState)(m.filters),[$t,Mt]=(0,a.useState)(m.pageLimit),[Ft,_t]=(0,a.useState)(m.pageCursor),pe=(0,z.A)(F),zt=(0,z.A)(wt),qt=(0,J.A)(async()=>{const ee=await L.query({term:F,types:_,filters:wt,pageLimit:$t,pageCursor:Ft});return F&&j.captureEvent("search",F,{value:ee.numberOfResults}),ee},[F,_,wt,$t,Ft]),ye=!qt.loading&&!qt.error&&qt.value?.nextPageCursor,ie=!qt.loading&&!qt.error&&qt.value?.previousPageCursor,Jt=(0,a.useCallback)(()=>{_t(qt.value?.nextPageCursor)},[qt.value?.nextPageCursor]),Xt=(0,a.useCallback)(()=>{_t(qt.value?.previousPageCursor)},[qt.value?.previousPageCursor]);return(0,a.useEffect)(()=>{pe!==void 0&&F!==pe&&_t(void 0)},[F,pe,_t]),(0,a.useEffect)(()=>{zt!==void 0&&!(0,N.isEqual)(wt,zt)&&_t(void 0)},[wt,zt,_t]),{result:qt,term:F,setTerm:k,types:_,setTypes:rt,filters:wt,setFilters:Dt,pageLimit:$t,setPageLimit:Mt,pageCursor:Ft,setPageCursor:_t,fetchNextPage:ye?Jt:void 0,fetchPreviousPage:ie?Xt:void 0}},Ct=m=>{const{initialState:L,children:j}=m,F=lt(L);return(0,n.jsx)(Q.Ig,{attributes:{searchTypes:F.types.sort().join(",")},children:(0,n.jsx)(xt.Provider,{value:(0,K.B)({1:F}),children:j})})},gt=m=>{const{initialState:L,inheritParentContextIfAvailable:j,children:F}=m,k=It(),_=(0,dt.gf)(Z.U),rt=L??{},wt=_.has("search.query.pageLimit")?{pageLimit:_.getNumber("search.query.pageLimit")}:{},Dt={...ut,...rt,...wt};return k&&j?(0,n.jsx)(n.Fragment,{children:F}):(0,n.jsx)(Ct,{initialState:Dt,children:F})};var St=t(78467),Tt=t(20577),at=t(82266),mt=t(29365),At=t(34839),tt=t(16249),ft=t(64947),it=t(45917),U=t(22771);const V=(0,a.forwardRef)((m,L)=>{const{onChange:j,onKeyDown:F=()=>{},onClear:k=()=>{},onSubmit:_=()=>{},debounceTime:rt=200,clearButton:wt=!0,fullWidth:Dt=!0,value:$t,label:Mt,placeholder:Ft,inputProps:_t={},InputProps:pe={},endAdornment:zt,...qt}=m,ye=(0,dt.gf)(Z.U),[ie,Jt]=(0,a.useState)(""),Xt=(0,a.useRef)("");(0,a.useEffect)(()=>{Jt(ve=>ve===Xt.current?String($t):ve)},[$t,Xt]),(0,U.A)(()=>{Xt.current=ie,j(ie)},rt,[ie]);const Ot=(0,a.useCallback)(ve=>{Jt(ve.target.value)},[Jt]),ee=(0,a.useCallback)(ve=>{F&&F(ve),_&&ve.key==="Enter"&&_()},[F,_]),ce=(0,a.useCallback)(()=>{Xt.current="",j(""),Jt(""),k&&k()},[j,k]),ue=Mt?void 0:"Search",Je=Ft??`Search in ${ye.getOptionalString("app.title")||"Backstage"}`,Se=(0,at.n)().getSystemIcon("search")||it.A,Xe=(0,n.jsx)(At.A,{position:"start",children:(0,n.jsx)(mt.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,n.jsx)(Se,{})})}),nn=(0,n.jsx)(At.A,{position:"end",children:(0,n.jsx)(ft.A,{"aria-label":"Clear",size:"small",onClick:ce,onKeyDown:ve=>{ve.key==="Enter"&&ve.stopPropagation()},children:"Clear"})});return(0,n.jsx)(gt,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(tt.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:L,value:ie,label:Mt,placeholder:Je,InputProps:{startAdornment:Xe,endAdornment:wt?nn:zt,...pe},inputProps:{"aria-label":ue,..._t},fullWidth:Dt,onChange:Ot,onKeyDown:ee,...qt})})}),et=(0,a.forwardRef)((m,L)=>{const{value:j="",onChange:F,...k}=m,{term:_,setTerm:rt}=Pt();(0,a.useEffect)(()=>{j&&rt(String(j))},[j,rt]);const wt=(0,a.useCallback)(Dt=>{F?F(Dt):rt(Dt)},[F,rt]);return(0,n.jsx)(gt,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(Q.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,n.jsx)(V,{...k,ref:L,value:_,onChange:wt})})})}),bt=(0,p.A)(m=>({loading:{right:m.spacing(1),position:"absolute"}})),ht=m=>L=>(0,n.jsx)(gt,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(m,{...L})}),Bt=()=>{const m=bt();return(0,n.jsx)(St.A,{className:m.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},Ut=ht(function(L){const{loading:j,value:F,onChange:k=()=>{},options:_=[],getOptionLabel:rt=Xt=>String(Xt),inputPlaceholder:wt,inputDebounceTime:Dt,freeSolo:$t=!0,fullWidth:Mt=!0,clearOnBlur:Ft=!1,"data-testid":_t="search-autocomplete",...pe}=L,{setTerm:zt}=Pt(),qt=(0,a.useCallback)(Xt=>Xt?typeof Xt=="string"?Xt:rt(Xt):"",[rt]),ye=(0,a.useMemo)(()=>qt(F),[F,qt]),ie=(0,a.useCallback)((Xt,Ot,ee,ce)=>{zt(qt(Ot)),k(Xt,Ot,ee,ce)},[qt,zt,k]),Jt=(0,a.useCallback)(({InputProps:{ref:Xt,className:Ot,endAdornment:ee},InputLabelProps:ce,...ue})=>(0,n.jsx)(et,{...ue,ref:Xt,clearButton:!1,value:ye,placeholder:wt,debounceTime:Dt,endAdornment:j?(0,n.jsx)(Bt,{}):ee,InputProps:{className:Ot}}),[j,ye,wt,Dt]);return(0,n.jsx)(Tt.Ay,{...pe,"data-testid":_t,value:F,onChange:ie,options:_,getOptionLabel:rt,renderInput:Jt,freeSolo:$t,fullWidth:Mt,clearOnBlur:Ft})});var Nt=t(18690),Ht=t(27698);const Vt=m=>m?.document,te=m=>{const{entityId:L,entityTitle:j,debounceTime:F=150,searchResultUrlMapper:k}=m,[_,rt]=(0,a.useState)(!1),wt=(0,Nt.Zp)(),{setFilters:Dt,term:$t,result:{loading:Mt,value:Ft}}=Pt(),[_t,pe]=(0,a.useState)([]);(0,a.useEffect)(()=>{let Jt=!0;if(Jt&&Ft){const Xt=Ft.results.slice(0,10);pe(Xt)}return()=>{Jt=!1}},[Mt,Ft]);const{kind:zt,name:qt,namespace:ye}=L;(0,a.useEffect)(()=>{Dt(Jt=>({...Jt,kind:zt,namespace:ye,name:qt}))},[zt,ye,qt,Dt]);const ie=(Jt,Xt)=>{if(Vt(Xt)){const{location:Ot}=Xt.document;wt(k?k(Ot):Ot)}};return(0,n.jsx)(Ut,{"data-testid":"techdocs-search-bar",size:"small",open:_&&!!$t,getOptionLabel:()=>"",filterOptions:Jt=>Jt,onClose:()=>{rt(!1)},onOpen:()=>{rt(!0)},onChange:ie,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:_t,renderOption:({document:Jt,highlight:Xt})=>(0,n.jsx)(Ht.TechDocsSearchResultListItem,{result:Jt,lineClamp:3,asListItem:!1,asLink:!1,title:Jt.title,highlight:Xt}),loading:Mt,inputDebounceTime:F,inputPlaceholder:`Search ${j||L.name} docs`,freeSolo:!1})},jt=m=>{const L={term:"",types:["techdocs"],pageCursor:"",filters:m.entityId};return(0,n.jsx)(gt,{initialState:L,children:(0,n.jsx)(te,{...m})})};var kt=t(74219);const ne=(0,a.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(m=>({default:m.RealLogViewer})));function ge(m){const{Progress:L}=(0,at.n)().getComponents();return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(L,{}),children:(0,n.jsx)(ne,{...m})})}var Zt=t(73845),oe=t(72501),le=t(12398),tn=t(32881);const se=(0,p.A)(m=>(0,le.A)({paper:{width:"100%",[m.breakpoints.up("sm")]:{width:"75%"},[m.breakpoints.up("md")]:{width:"50%"},padding:m.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:m.palette.background.default}})),rn=({buildLog:m,onClose:L})=>{const j=se(),F=m.length===0?"Waiting for logs...":m.join(`
|
|
8
|
+
`);return(0,n.jsxs)(A.A,{container:!0,direction:"column",className:j.root,spacing:0,wrap:"nowrap",children:[(0,n.jsxs)(A.A,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,n.jsx)(oe.A,{variant:"h5",children:"Build Details"}),(0,n.jsx)(mt.A,{title:"Close the drawer",onClick:L,color:"inherit",children:(0,n.jsx)(tn.A,{})},"dismiss")]}),(0,n.jsx)(A.A,{item:!0,xs:!0,children:(0,n.jsx)(ge,{text:F,classes:{root:j.logs}})})]})},Te=({buildLog:m})=>{const L=se(),[j,F]=(0,a.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ft.A,{color:"inherit",onClick:()=>F(!0),children:"Show Build Logs"}),(0,n.jsx)(Zt.Ay,{classes:{paper:L.paper},anchor:"right",open:j,onClose:()=>F(!1),children:(0,n.jsx)(rn,{buildLog:m,onClose:()=>F(!1)})})]})};var fe=t(12173);const Ge=({errorMessage:m})=>{const L=(0,dt.gf)(Z.U).getOptionalString("techdocs.builder"),j=(0,G.s)(),{entityRef:F}=(0,b.V)(),k=(0,Nt.zy)();(0,a.useEffect)(()=>{const{pathname:rt,search:wt,hash:Dt}=k;j.captureEvent("not-found",`${rt}${wt}${Dt}`,{attributes:F})},[j,F,k]);let _="";return[void 0,"local"].includes(L)||(_="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),(0,n.jsx)(fe.M,{status:"404",statusMessage:m||"Documentation not found",additionalInfo:_})};var me=t(28966),Ye=t(26679);function on({contentLoading:m,content:L,activeSyncState:j}){return m||j==="BUILD_READY_RELOAD"||!L&&j==="CHECKING"?"CHECKING":!L&&j==="BUILDING"?"INITIAL_BUILD":L?j==="BUILDING"?"CONTENT_STALE_REFRESHING":j==="BUILD_READY"?"CONTENT_STALE_READY":j==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function un(m,L){const j={...m};switch(L.type){case"sync":L.state==="CHECKING"&&(j.buildLog=[]),j.activeSyncState=L.state,j.syncError=L.syncError;break;case"contentLoading":j.contentLoading=!0,j.contentError=void 0;break;case"content":typeof L.path=="string"&&(j.path=L.path),j.contentLoading=!1,j.content=L.content,j.contentError=L.contentError;break;case"buildLog":j.buildLog=j.buildLog.concat(L.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(j.activeSyncState)&&["contentLoading","content"].includes(L.type)&&(j.activeSyncState="UP_TO_DATE",j.buildLog=[]),j}function an(m,L,j,F){const[k,_]=(0,a.useReducer)(un,{activeSyncState:"CHECKING",path:F,contentLoading:!0,buildLog:[]}),rt=(0,dt.gf)(Ye.s),{retry:wt}=(0,me.A)(async()=>{_({type:"contentLoading"});try{const Mt=await rt.getEntityDocs({kind:m,namespace:L,name:j},F);return _({type:"content",content:Mt,path:F}),Mt}catch(Mt){_({type:"content",contentError:Mt,path:F})}},[rt,m,L,j,F]),Dt=(0,a.useRef)({content:void 0,reload:()=>{}});Dt.current={content:k.content,reload:wt},(0,J.A)(async()=>{_({type:"sync",state:"CHECKING"});const Mt=setTimeout(()=>{_({type:"sync",state:"BUILDING"})},1e3);try{switch(await rt.syncEntityDocs({kind:m,namespace:L,name:j},_t=>{_({type:"buildLog",log:_t})})){case"updated":Dt.current.content?_({type:"sync",state:"BUILD_READY"}):(Dt.current.reload(),_({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":_({type:"sync",state:"UP_TO_DATE"});break;default:_({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(Ft){_({type:"sync",state:"ERROR",syncError:Ft})}finally{clearTimeout(Mt)}},[m,j,L,rt,_,Dt]);const $t=(0,a.useMemo)(()=>on({activeSyncState:k.activeSyncState,contentLoading:k.contentLoading,content:k.content}),[k.activeSyncState,k.content,k.contentLoading]);return(0,a.useMemo)(()=>({state:$t,contentReload:wt,path:k.path,content:k.content,contentErrorMessage:k.contentError?.toString(),syncErrorMessage:k.syncError?.toString(),buildLog:k.buildLog}),[$t,wt,k.path,k.content,k.contentError,k.syncError,k.buildLog])}const Qe=(0,a.createContext)({}),Me=()=>(0,a.useContext)(Qe),ze=m=>{const{children:L}=m,{"*":j=""}=(0,Nt.g)(),{entityRef:F}=(0,b.V)(),{kind:k,namespace:_,name:rt}=F,wt=an(k,_,rt,j);return(0,n.jsx)(Qe.Provider,{value:wt,children:L instanceof Function?L(wt):L})},He=m=>L=>(0,n.jsx)(ze,{children:(0,n.jsx)(m,{...L})}),cn=(0,p.A)(m=>({root:{marginBottom:m.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),Ee=()=>{let m=null;const L=cn(),{state:j,contentReload:F,contentErrorMessage:k,syncErrorMessage:_,buildLog:rt}=Me();return j==="INITIAL_BUILD"&&(m=(0,n.jsx)(kt.A,{classes:{root:L.root},variant:"outlined",severity:"info",icon:(0,n.jsx)(St.A,{size:"24px"}),action:(0,n.jsx)(Te,{buildLog:rt}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),j==="CONTENT_STALE_REFRESHING"&&(m=(0,n.jsx)(kt.A,{variant:"outlined",severity:"info",icon:(0,n.jsx)(St.A,{size:"24px"}),action:(0,n.jsx)(Te,{buildLog:rt}),classes:{root:L.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),j==="CONTENT_STALE_READY"&&(m=(0,n.jsx)(kt.A,{variant:"outlined",severity:"success",action:(0,n.jsx)(ft.A,{color:"inherit",onClick:()=>F(),children:"Refresh"}),classes:{root:L.root},children:"A newer version of this documentation is now available, please refresh to view."})),j==="CONTENT_STALE_ERROR"&&(m=(0,n.jsxs)(kt.A,{variant:"outlined",severity:"error",action:(0,n.jsx)(Te,{buildLog:rt}),classes:{root:L.root,message:L.message},children:["Building a newer version of this documentation failed."," ",_]})),j==="CONTENT_NOT_FOUND"&&(m=(0,n.jsxs)(n.Fragment,{children:[_&&(0,n.jsxs)(kt.A,{variant:"outlined",severity:"error",action:(0,n.jsx)(Te,{buildLog:rt}),classes:{root:L.root,message:L.message},children:["Building a newer version of this documentation failed."," ",_]}),(0,n.jsx)(Ge,{errorMessage:k})]})),m};var We=t(5893),Ve=t(54917),Ze=t(96726),Be=t(71651),Ae=t.n(Be);const w=/main\.[A-Fa-f0-9]{8}\.min\.css$/,l=/^https:\/\/fonts\.googleapis\.com/,E=/^https:\/\/fonts\.gstatic\.com/,I=m=>m.nodeName==="LINK",q=m=>{const L=m?.getAttribute("href")||"",j=L.match(w),F=L.match(l),k=L.match(E);return j||F||k},X=m=>(I(m)&&!q(m)&&m.remove(),m),st=m=>m.nodeName==="IFRAME",Rt=(m,L)=>{const j=m.getAttribute("src")||"";try{const{host:F}=new URL(j);return L.includes(F)}catch{return!1}},Wt=m=>L=>(st(L)&&!Rt(L,m)&&L.remove(),L),Gt=()=>{const m=(0,dt.gf)(Z.U);return(0,a.useMemo)(()=>m.getOptionalConfig("techdocs.sanitizer"),[m])},re=()=>{const m=Gt();return(0,a.useCallback)(async L=>{const j=m?.getOptionalStringArray("allowedIframeHosts");Ae().addHook("beforeSanitizeElements",X);const F=["link","meta"];j&&(F.push("iframe"),Ae().addHook("beforeSanitizeElements",Wt(j))),Ae().addHook("uponSanitizeElement",(rt,wt)=>{wt.tagName==="meta"&&(rt.getAttribute("http-equiv")==="refresh"&&rt.getAttribute("content")?.includes("url=")||rt.parentNode?.removeChild(rt))}),Ae().addHook("uponSanitizeAttribute",(rt,wt)=>{rt.tagName!=="meta"&&(wt.attrName==="http-equiv"||wt.attrName==="content")&&rt.removeAttribute(wt.attrName)});const k=m?.getOptionalString("allowedCustomElementTagNameRegExp"),_=m?.getOptionalString("allowedCustomElementAttributeNameRegExp");return Ae().sanitize(L.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:_?new RegExp(_):void 0}})},[m])};var je=t(34435),Yt=t(268);const he=({theme:m})=>`
|
|
9
|
+
/*================== Variables ==================*/
|
|
10
|
+
/*
|
|
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.
|
|
12
|
+
As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
:host {
|
|
16
|
+
/* FONT */
|
|
17
|
+
--md-default-fg-color: ${m.palette.text.primary};
|
|
18
|
+
--md-default-fg-color--light: ${m.palette.text.secondary};
|
|
19
|
+
--md-default-fg-color--lighter: ${(0,Yt.a)(m.palette.text.secondary,.7)};
|
|
20
|
+
--md-default-fg-color--lightest: ${(0,Yt.a)(m.palette.text.secondary,.3)};
|
|
21
|
+
|
|
22
|
+
/* BACKGROUND */
|
|
23
|
+
--md-default-bg-color:${m.palette.background.default};
|
|
24
|
+
--md-default-bg-color--light: ${m.palette.background.paper};
|
|
25
|
+
--md-default-bg-color--lighter: ${(0,Yt.a)(m.palette.background.paper,.7)};
|
|
26
|
+
--md-default-bg-color--lightest: ${(0,Yt.a)(m.palette.background.paper,.3)};
|
|
27
|
+
|
|
28
|
+
/* PRIMARY */
|
|
29
|
+
--md-primary-fg-color: ${m.palette.primary.main};
|
|
30
|
+
--md-primary-fg-color--light: ${m.palette.primary.light};
|
|
31
|
+
--md-primary-fg-color--dark: ${m.palette.primary.dark};
|
|
32
|
+
--md-primary-bg-color: ${m.palette.primary.contrastText};
|
|
33
|
+
--md-primary-bg-color--light: ${(0,Yt.a)(m.palette.primary.contrastText,.7)};
|
|
34
|
+
|
|
35
|
+
/* ACCENT */
|
|
36
|
+
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
37
|
+
--md-accent-fg-color--transparent: ${(0,Yt.X4)(m.palette.primary.main,.1)};
|
|
38
|
+
--md-accent-bg-color: var(--md-primary-bg-color);
|
|
39
|
+
--md-accent-bg-color--light: var(--md-primary-bg-color--light);
|
|
40
|
+
|
|
41
|
+
/* SHADOW */
|
|
42
|
+
--md-shadow-z1: ${m.shadows[1]};
|
|
43
|
+
--md-shadow-z2: ${m.shadows[2]};
|
|
44
|
+
--md-shadow-z3: ${m.shadows[3]};
|
|
45
|
+
|
|
46
|
+
/* EXTENSIONS */
|
|
47
|
+
--md-admonition-fg-color: var(--md-default-fg-color);
|
|
48
|
+
--md-admonition-bg-color: var(--md-default-bg-color);
|
|
49
|
+
/* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
|
|
50
|
+
--md-admonition-icon--note: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>');
|
|
51
|
+
--md-admonition-icon--abstract: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 5h16v2H4V5m0 4h16v2H4V9m0 4h16v2H4v-2m0 4h10v2H4v-2z"/></svg>');
|
|
52
|
+
--md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10A10 10 0 0012 2z"/></svg>');
|
|
53
|
+
--md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.55 11.2c-.23-.3-.5-.56-.76-.82-.65-.6-1.4-1.03-2.03-1.66C13.3 7.26 13 4.85 13.91 3c-.91.23-1.75.75-2.45 1.32-2.54 2.08-3.54 5.75-2.34 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.22.1-.46.04-.64-.12a.83.83 0 01-.15-.17c-1.1-1.43-1.28-3.48-.53-5.12C5.89 10 5 12.3 5.14 14.47c.04.5.1 1 .27 1.5.14.6.4 1.2.72 1.73 1.04 1.73 2.87 2.97 4.84 3.22 2.1.27 4.35-.12 5.96-1.6 1.8-1.66 2.45-4.32 1.5-6.6l-.13-.26c-.2-.46-.47-.87-.8-1.25l.05-.01m-3.1 6.3c-.28.24-.73.5-1.08.6-1.1.4-2.2-.16-2.87-.82 1.19-.28 1.89-1.16 2.09-2.05.17-.8-.14-1.46-.27-2.23-.12-.74-.1-1.37.18-2.06.17.38.37.76.6 1.06.76 1 1.95 1.44 2.2 2.8.04.14.06.28.06.43.03.82-.32 1.72-.92 2.27h.01z"/></svg>');
|
|
54
|
+
--md-admonition-icon--success: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
55
|
+
--md-admonition-icon--question: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.07 11.25l-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 00-2-2 2 2 0 00-2 2H8a4 4 0 014-4 4 4 0 014 4 3.2 3.2 0 01-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10c0-5.53-4.5-10-10-10z"/></svg>');
|
|
56
|
+
--md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z"/></svg>');
|
|
57
|
+
--md-admonition-icon--failure: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12 6.47 2 12 2m3.59 5L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41 15.59 7z"/></svg>');
|
|
58
|
+
--md-admonition-icon--danger: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.5 20l4.86-9.73H13V4l-5 9.73h3.5V20M12 2c2.75 0 5.1 1 7.05 2.95C21 6.9 22 9.25 22 12s-1 5.1-2.95 7.05C17.1 21 14.75 22 12 22s-5.1-1-7.05-2.95C3 17.1 2 14.75 2 12s1-5.1 2.95-7.05C6.9 3 9.25 2 12 2z"/></svg>');
|
|
59
|
+
--md-admonition-icon--bug: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 00-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 00-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z"/></svg>');
|
|
60
|
+
--md-admonition-icon--example: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 01.75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z"/></svg>');
|
|
61
|
+
--md-admonition-icon--quote: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z"/></svg>');
|
|
62
|
+
--md-footnotes-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.42L5.83 13H21V7h-2z"/></svg>');
|
|
63
|
+
--md-details-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
64
|
+
--md-tasklist-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>');
|
|
65
|
+
--md-tasklist-icon--checked: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
66
|
+
--md-nav-icon--prev: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>');
|
|
67
|
+
--md-nav-icon--next: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
68
|
+
--md-toc-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>');
|
|
69
|
+
--md-clipboard-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1z"/></svg>');
|
|
70
|
+
--md-search-result-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7c-.41-.25-.8-.56-1.14-.9-.33-.33-.61-.7-.86-1.1H6V4h7v5h5v1.18c.71.16 1.39.43 2 .82V8l-6-6m6.31 16.9c1.33-2.11.69-4.9-1.4-6.22-2.11-1.33-4.91-.68-6.22 1.4-1.34 2.11-.69 4.89 1.4 6.22 1.46.93 3.32.93 4.79.02L22 23.39 23.39 22l-3.08-3.1m-3.81.1a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5z"/></svg>');
|
|
71
|
+
--md-source-forks-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 2.122a2.25 2.25 0 1 0-1.5 0v.878A2.25 2.25 0 0 0 5.75 8.5h1.5v2.128a2.251 2.251 0 1 0 1.5 0V8.5h1.5a2.25 2.25 0 0 0 2.25-2.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75h-4.5A.75.75 0 0 1 5 6.25v-.878zm3.75 7.378a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm3-8.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z"/></svg>');
|
|
72
|
+
--md-source-repositories-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 1 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 0 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 0 1 1-1h8zM5 12.25v3.25a.25.25 0 0 0 .4.2l1.45-1.087a.25.25 0 0 1 .3 0L8.6 15.7a.25.25 0 0 0 .4-.2v-3.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25z"/></svg>');
|
|
73
|
+
--md-source-stars-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694v.001z"/></svg>');
|
|
74
|
+
--md-source-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 0 1 .25-.25h5.025a.25.25 0 0 1 .177.073l6.25 6.25a.25.25 0 0 1 0 .354l-5.025 5.025a.25.25 0 0 1-.354 0l-6.25-6.25a.25.25 0 0 1-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775zM6 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>');
|
|
75
|
+
--md-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="m310.6 246.6-127.1 128c-7.1 6.3-15.3 9.4-23.5 9.4s-16.38-3.125-22.63-9.375l-127.1-128C.224 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75s3.12 25.75-6.08 34.85z"/></svg>');
|
|
76
|
+
|
|
77
|
+
--md-status--updated: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>cellphone-arrow-down</title><path d="M17,1H7A2,2 0 0,0 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3A2,2 0 0,0 17,1M17,19H7V5H17V19M16,13H13V8H11V13H8L12,17L16,13Z" /></svg>');
|
|
78
|
+
--md-status: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 9h2V7h-2m1 13c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m-1 15h2v-6h-2v6Z"/></svg>');
|
|
79
|
+
--md-status--new: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m23 12-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12m-10 5h-2v-2h2v2m0-4h-2V7h2v6Z"/></svg>');
|
|
80
|
+
--md-status--deprecated: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3H9m0 5h2v9H9V8m4 0h2v9h-2V8Z"/></svg>');
|
|
81
|
+
--md-status--encrypted: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4m0 6c1.4 0 2.8 1.1 2.8 2.5V11c.6 0 1.2.6 1.2 1.3v3.5c0 .6-.6 1.2-1.3 1.2H9.2c-.6 0-1.2-.6-1.2-1.3v-3.5c0-.6.6-1.2 1.2-1.2V9.5C9.2 8.1 10.6 7 12 7m0 1.2c-.8 0-1.5.5-1.5 1.3V11h3V9.5c0-.8-.7-1.3-1.5-1.3Z"/></svg>');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:host > * {
|
|
85
|
+
/* CODE */
|
|
86
|
+
--md-code-fg-color: ${m.palette.text.primary};
|
|
87
|
+
--md-code-bg-color: ${m.palette.code?.background??m.palette.background.paper};
|
|
88
|
+
--md-code-hl-color: ${(0,Yt.X4)(m.palette.warning.main,.5)};
|
|
89
|
+
--md-code-hl-color--light: var(--md-code-hl-color);
|
|
90
|
+
--md-code-hl-keyword-color: ${m.palette.type==="dark"?m.palette.primary.light:m.palette.primary.dark};
|
|
91
|
+
--md-code-hl-function-color: ${m.palette.type==="dark"?m.palette.secondary.light:m.palette.secondary.dark};
|
|
92
|
+
--md-code-hl-string-color: ${m.palette.type==="dark"?m.palette.success.light:m.palette.success.dark};
|
|
93
|
+
--md-code-hl-number-color: ${m.palette.type==="dark"?m.palette.error.light:m.palette.error.dark};
|
|
94
|
+
--md-code-hl-constant-color: var(--md-code-hl-function-color);
|
|
95
|
+
--md-code-hl-special-color: var(--md-code-hl-function-color);
|
|
96
|
+
--md-code-hl-name-color: var(--md-code-fg-color);
|
|
97
|
+
--md-code-hl-comment-color: var(--md-default-fg-color--light);
|
|
98
|
+
--md-code-hl-generic-color: var(--md-default-fg-color--light);
|
|
99
|
+
--md-code-hl-variable-color: var(--md-default-fg-color--light);
|
|
100
|
+
--md-code-hl-operator-color: var(--md-default-fg-color--light);
|
|
101
|
+
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
|
|
102
|
+
|
|
103
|
+
/* TYPESET */
|
|
104
|
+
--md-typeset-font-size: 1rem;
|
|
105
|
+
--md-typeset-color: var(--md-default-fg-color);
|
|
106
|
+
--md-typeset-a-color: ${m.palette.link};
|
|
107
|
+
--md-typeset-table-color: ${m.palette.text.primary};
|
|
108
|
+
--md-typeset-table-color--light: ${(0,Yt.X4)(m.palette.text.primary,.05)};
|
|
109
|
+
--md-typeset-del-color: ${m.palette.type==="dark"?(0,Yt.X4)(m.palette.error.dark,.5):(0,Yt.X4)(m.palette.error.light,.5)};
|
|
110
|
+
--md-typeset-ins-color: ${m.palette.type==="dark"?(0,Yt.X4)(m.palette.success.dark,.5):(0,Yt.X4)(m.palette.success.light,.5)};
|
|
111
|
+
--md-typeset-mark-color: ${m.palette.type==="dark"?(0,Yt.X4)(m.palette.warning.dark,.5):(0,Yt.X4)(m.palette.warning.light,.5)};
|
|
112
|
+
--md-typeset-kbd-color: var(--md-code-bg-color);
|
|
113
|
+
--md-typeset-kbd-accent-color var(--md-code-bg-color);
|
|
114
|
+
--md-typeset-kbd-border-color: var(--md-default-fg-color--light);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@media screen and (max-width: 76.1875em) {
|
|
118
|
+
:host > * {
|
|
119
|
+
/* TYPESET */
|
|
120
|
+
--md-typeset-font-size: .9rem;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@media screen and (max-width: 600px) {
|
|
125
|
+
:host > * {
|
|
126
|
+
/* TYPESET */
|
|
127
|
+
--md-typeset-font-size: .7rem;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
--md-footer-bg-color: var(--md-default-bg-color);
|
|
132
|
+
--md-footer-bg-color--dark: var(--md-default-bg-color);
|
|
133
|
+
`,ae=({theme:m})=>`
|
|
134
|
+
/*================== Reset ==================*/
|
|
135
|
+
|
|
136
|
+
body {
|
|
137
|
+
--md-text-color: var(--md-default-fg-color);
|
|
138
|
+
--md-text-link-color: var(--md-accent-fg-color);
|
|
139
|
+
--md-text-font-family: ${m.typography.fontFamily};
|
|
140
|
+
font-family: var(--md-text-font-family);
|
|
141
|
+
background-color: unset;
|
|
142
|
+
}
|
|
143
|
+
`,Ue="224px",De=({theme:m,sidebar:L})=>`
|
|
144
|
+
/*================== Layout ==================*/
|
|
145
|
+
|
|
146
|
+
/* mkdocs material v9 compat */
|
|
147
|
+
.md-nav__title {
|
|
148
|
+
color: var(--md-default-fg-color);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.md-grid {
|
|
152
|
+
max-width: 100%;
|
|
153
|
+
margin: 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.md-nav {
|
|
157
|
+
font-size: calc(var(--md-typeset-font-size) * 0.9);
|
|
158
|
+
}
|
|
159
|
+
.md-nav__link:not(:has(svg)) {
|
|
160
|
+
display: flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
justify-content: space-between;
|
|
163
|
+
}
|
|
164
|
+
.md-nav__link:has(svg) > .md-ellipsis {
|
|
165
|
+
flex-grow: 1;
|
|
166
|
+
}
|
|
167
|
+
.md-nav__icon {
|
|
168
|
+
height: 20px !important;
|
|
169
|
+
width: 20px !important;
|
|
170
|
+
margin-left:${m.spacing(1)}px;
|
|
171
|
+
}
|
|
172
|
+
.md-nav__icon svg {
|
|
173
|
+
margin: 0;
|
|
174
|
+
width: 20px !important;
|
|
175
|
+
height: 20px !important;
|
|
176
|
+
}
|
|
177
|
+
.md-nav__icon:after {
|
|
178
|
+
width: 20px !important;
|
|
179
|
+
height: 20px !important;
|
|
180
|
+
}
|
|
181
|
+
.md-status--updated::after {
|
|
182
|
+
-webkit-mask-image: var(--md-status--updated);
|
|
183
|
+
mask-image: var(--md-status--updated);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.md-nav__item--active > .md-nav__link, a.md-nav__link--active {
|
|
187
|
+
text-decoration: underline;
|
|
188
|
+
color: var(--md-typeset-a-color);
|
|
189
|
+
}
|
|
190
|
+
.md-nav__link--active > .md-status:after {
|
|
191
|
+
background-color: var(--md-typeset-a-color);
|
|
192
|
+
}
|
|
193
|
+
.md-nav__link[href]:hover > .md-status:after {
|
|
194
|
+
background-color: var(--md-accent-fg-color);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.md-main__inner {
|
|
198
|
+
margin-top: 0;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.md-sidebar {
|
|
202
|
+
bottom: 75px;
|
|
203
|
+
position: fixed;
|
|
204
|
+
width: 16rem;
|
|
205
|
+
overflow-y: auto;
|
|
206
|
+
overflow-x: hidden;
|
|
207
|
+
scrollbar-color: rgb(193, 193, 193) #eee;
|
|
208
|
+
scrollbar-width: thin;
|
|
209
|
+
}
|
|
210
|
+
.md-sidebar .md-sidebar__scrollwrap {
|
|
211
|
+
width: calc(16rem);
|
|
212
|
+
overflow-y: hidden;
|
|
213
|
+
}
|
|
214
|
+
@supports selector(::-webkit-scrollbar) {
|
|
215
|
+
[dir=ltr] .md-sidebar__inner {
|
|
216
|
+
padding-right: calc(100% - 15.1rem);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
.md-sidebar--secondary {
|
|
220
|
+
right: ${m.spacing(3)}px;
|
|
221
|
+
}
|
|
222
|
+
.md-sidebar::-webkit-scrollbar {
|
|
223
|
+
width: 5px;
|
|
224
|
+
}
|
|
225
|
+
.md-sidebar::-webkit-scrollbar-button {
|
|
226
|
+
width: 5px;
|
|
227
|
+
height: 5px;
|
|
228
|
+
}
|
|
229
|
+
.md-sidebar::-webkit-scrollbar-track {
|
|
230
|
+
background: #eee;
|
|
231
|
+
border: 1 px solid rgb(250, 250, 250);
|
|
232
|
+
box-shadow: 0px 0px 3px #dfdfdf inset;
|
|
233
|
+
border-radius: 3px;
|
|
234
|
+
}
|
|
235
|
+
.md-sidebar::-webkit-scrollbar-thumb {
|
|
236
|
+
width: 5px;
|
|
237
|
+
background: rgb(193, 193, 193);
|
|
238
|
+
border: transparent;
|
|
239
|
+
border-radius: 3px;
|
|
240
|
+
}
|
|
241
|
+
.md-sidebar::-webkit-scrollbar-thumb:hover {
|
|
242
|
+
background: rgb(125, 125, 125);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.md-content {
|
|
246
|
+
max-width: calc(100% - 16rem * 2);
|
|
247
|
+
margin-left: 16rem;
|
|
248
|
+
margin-bottom: 50px;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.md-content > .md-sidebar {
|
|
252
|
+
left: 16rem;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.md-footer {
|
|
256
|
+
position: fixed;
|
|
257
|
+
bottom: 0px;
|
|
258
|
+
pointer-events: none;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.md-footer-nav__link, .md-footer__link {
|
|
262
|
+
pointer-events: all;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.md-footer__title {
|
|
266
|
+
background-color: unset;
|
|
267
|
+
}
|
|
268
|
+
.md-footer-nav__link, .md-footer__link {
|
|
269
|
+
width: 16rem;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.md-dialog {
|
|
273
|
+
background-color: unset;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
@media screen and (min-width: 76.25em) {
|
|
277
|
+
.md-sidebar {
|
|
278
|
+
height: auto;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
@media screen and (max-width: 76.1875em) {
|
|
283
|
+
.md-nav {
|
|
284
|
+
transition: none !important;
|
|
285
|
+
background-color: var(--md-default-bg-color)
|
|
286
|
+
}
|
|
287
|
+
.md-nav--primary .md-nav__title {
|
|
288
|
+
cursor: auto;
|
|
289
|
+
color: var(--md-default-fg-color);
|
|
290
|
+
font-weight: 700;
|
|
291
|
+
white-space: normal;
|
|
292
|
+
line-height: 1rem;
|
|
293
|
+
height: auto;
|
|
294
|
+
display: flex;
|
|
295
|
+
flex-flow: column;
|
|
296
|
+
row-gap: 1.6rem;
|
|
297
|
+
padding: 1.2rem .8rem .8rem;
|
|
298
|
+
background-color: var(--md-default-bg-color);
|
|
299
|
+
}
|
|
300
|
+
.md-nav--primary .md-nav__title~.md-nav__list {
|
|
301
|
+
box-shadow: none;
|
|
302
|
+
}
|
|
303
|
+
.md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
|
|
304
|
+
border-top: none;
|
|
305
|
+
}
|
|
306
|
+
.md-nav--primary .md-nav__title .md-nav__button {
|
|
307
|
+
display: none;
|
|
308
|
+
}
|
|
309
|
+
.md-nav--primary .md-nav__title .md-nav__icon {
|
|
310
|
+
color: var(--md-default-fg-color);
|
|
311
|
+
position: static;
|
|
312
|
+
height: auto;
|
|
313
|
+
margin: 0 0 0 -0.2rem;
|
|
314
|
+
}
|
|
315
|
+
.md-nav--primary > .md-nav__title [for="none"] {
|
|
316
|
+
padding-top: 0;
|
|
317
|
+
}
|
|
318
|
+
.md-nav--primary .md-nav__item {
|
|
319
|
+
border-top: none;
|
|
320
|
+
}
|
|
321
|
+
.md-nav--primary :is(.md-nav__title,.md-nav__item) {
|
|
322
|
+
font-size : var(--md-typeset-font-size);
|
|
323
|
+
}
|
|
324
|
+
.md-nav .md-source {
|
|
325
|
+
display: none;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.md-sidebar {
|
|
329
|
+
height: 100%;
|
|
330
|
+
}
|
|
331
|
+
.md-sidebar--primary {
|
|
332
|
+
width: 16rem !important;
|
|
333
|
+
z-index: 200;
|
|
334
|
+
left: ${L.isPinned?`calc(-16rem + ${Ue})`:"calc(-16rem + 72px)"} !important;
|
|
335
|
+
}
|
|
336
|
+
.md-sidebar--secondary:not([hidden]) {
|
|
337
|
+
display: none;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
[data-md-toggle=drawer]:checked~.md-container .md-sidebar--primary {
|
|
341
|
+
transform: translateX(16rem);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.md-content {
|
|
345
|
+
max-width: 100%;
|
|
346
|
+
margin-left: 0;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.md-header__button {
|
|
350
|
+
margin: 0.4rem 0;
|
|
351
|
+
margin-left: 0.4rem;
|
|
352
|
+
padding: 0;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.md-overlay {
|
|
356
|
+
left: 0;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.md-footer {
|
|
360
|
+
position: static;
|
|
361
|
+
padding-left: 0;
|
|
362
|
+
}
|
|
363
|
+
.md-footer-nav__link {
|
|
364
|
+
/* footer links begin to overlap at small sizes without setting width */
|
|
365
|
+
width: 50%;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
@media screen and (max-width: 600px) {
|
|
370
|
+
.md-sidebar--primary {
|
|
371
|
+
left: -16rem !important;
|
|
372
|
+
width: 16rem;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
@media print {
|
|
378
|
+
.md-sidebar,
|
|
379
|
+
#toggle-sidebar {
|
|
380
|
+
display: none;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.md-content {
|
|
384
|
+
margin: 0;
|
|
385
|
+
width: 100%;
|
|
386
|
+
max-width: 100%;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
`,bn=["h1","h2","h3","h4","h5","h6"],de=/(em)|(rem)/gi,en=/var\(|\)/gi,Kt=({theme:m})=>`
|
|
390
|
+
/*================== Typeset ==================*/
|
|
391
|
+
|
|
392
|
+
.md-typeset {
|
|
393
|
+
font-size: var(--md-typeset-font-size);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
${bn.reduce((L,j)=>{const F=m.typography.htmlFontSize??16,k=m.typography[j],{lineHeight:_,fontFamily:rt,fontWeight:wt,fontSize:Dt}=k,$t=Mt=>{if(typeof Mt=="number")return $t(`${Mt/F*.6}rem`);if(typeof Mt=="string"){if(Mt.match(en)){const Ft=window.getComputedStyle(document.body).getPropertyValue(Mt.replaceAll(en,""));if(Ft!=="")return $t(Ft)}else if(Mt.match(de))return`calc(${Mt.replace(de,"")} * var(--md-typeset-font-size))`}return Mt};return L.concat(`
|
|
397
|
+
.md-typeset ${j} {
|
|
398
|
+
color: var(--md-default-fg-color);
|
|
399
|
+
line-height: ${_};
|
|
400
|
+
font-family: ${rt};
|
|
401
|
+
font-weight: ${wt};
|
|
402
|
+
font-size: ${$t(Dt)};
|
|
403
|
+
}
|
|
404
|
+
`)},"")}
|
|
405
|
+
|
|
406
|
+
.md-typeset .md-content__button {
|
|
407
|
+
color: var(--md-default-fg-color);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.md-typeset hr {
|
|
411
|
+
border-bottom: 0.05rem dotted ${m.palette.divider};
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.md-typeset details {
|
|
415
|
+
font-size: var(--md-typeset-font-size) !important;
|
|
416
|
+
}
|
|
417
|
+
.md-typeset details summary {
|
|
418
|
+
padding-left: 2.5rem !important;
|
|
419
|
+
}
|
|
420
|
+
.md-typeset details summary:before,
|
|
421
|
+
.md-typeset details summary:after {
|
|
422
|
+
top: 50% !important;
|
|
423
|
+
width: 20px !important;
|
|
424
|
+
height: 20px !important;
|
|
425
|
+
transform: rotate(0deg) translateY(-50%) !important;
|
|
426
|
+
}
|
|
427
|
+
.md-typeset details[open] > summary:after {
|
|
428
|
+
transform: rotate(90deg) translateX(-50%) !important;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.md-typeset blockquote {
|
|
432
|
+
color: var(--md-default-fg-color--light);
|
|
433
|
+
border-left: 0.2rem solid var(--md-default-fg-color--light);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.md-typeset table:not([class]) {
|
|
437
|
+
font-size: var(--md-typeset-font-size);
|
|
438
|
+
border: 1px solid var(--md-default-fg-color);
|
|
439
|
+
border-bottom: none;
|
|
440
|
+
border-collapse: collapse;
|
|
441
|
+
border-radius: ${m.shape.borderRadius}px;
|
|
442
|
+
}
|
|
443
|
+
.md-typeset table:not([class]) th {
|
|
444
|
+
font-weight: bold;
|
|
445
|
+
}
|
|
446
|
+
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
|
|
447
|
+
border-bottom: 1px solid var(--md-default-fg-color);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.md-typeset pre > code::-webkit-scrollbar-thumb {
|
|
451
|
+
background-color: hsla(0, 0%, 0%, 0.32);
|
|
452
|
+
}
|
|
453
|
+
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
454
|
+
background-color: hsla(0, 0%, 0%, 0.87);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.md-typeset code {
|
|
458
|
+
word-break: keep-all;
|
|
459
|
+
}
|
|
460
|
+
`,Ke=()=>`
|
|
461
|
+
/*================== Animations ==================*/
|
|
462
|
+
/*
|
|
463
|
+
Disable CSS animations on link colors as they lead to issues in dark mode.
|
|
464
|
+
The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
|
|
465
|
+
*/
|
|
466
|
+
.md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
467
|
+
transition: none;
|
|
468
|
+
}
|
|
469
|
+
`,ns=({theme:m})=>`
|
|
470
|
+
/*================== Extensions ==================*/
|
|
471
|
+
|
|
472
|
+
/* HIGHLIGHT */
|
|
473
|
+
.highlight .md-clipboard:after {
|
|
474
|
+
content: unset;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.highlight .nx {
|
|
478
|
+
color: ${m.palette.type==="dark"?"#ff53a3":"#ec407a"};
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/* CODE HILITE */
|
|
482
|
+
.codehilite .gd {
|
|
483
|
+
background-color: ${m.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.codehilite .gi {
|
|
487
|
+
background-color: ${m.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/* TABBED */
|
|
491
|
+
.tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
|
|
492
|
+
.tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
|
|
493
|
+
.tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
|
|
494
|
+
.tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
|
|
495
|
+
.tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
|
|
496
|
+
.tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
|
|
497
|
+
.tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
|
|
498
|
+
.tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
|
|
499
|
+
.tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
|
|
500
|
+
.tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
|
|
501
|
+
.tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
|
|
502
|
+
.tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
|
|
503
|
+
.tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
|
|
504
|
+
.tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
|
|
505
|
+
.tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
|
|
506
|
+
.tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
|
|
507
|
+
.tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
|
|
508
|
+
.tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
|
|
509
|
+
.tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
|
|
510
|
+
.tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
|
|
511
|
+
color: var(--md-accent-fg-color);
|
|
512
|
+
border-color: var(--md-accent-fg-color);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/* TASK-LIST */
|
|
516
|
+
.task-list-control .task-list-indicator::before {
|
|
517
|
+
background-color: ${m.palette.action.disabledBackground};
|
|
518
|
+
}
|
|
519
|
+
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
520
|
+
background-color: ${m.palette.success.main};
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/* ADMONITION */
|
|
524
|
+
.admonition {
|
|
525
|
+
font-size: var(--md-typeset-font-size) !important;
|
|
526
|
+
}
|
|
527
|
+
.admonition .admonition-title {
|
|
528
|
+
padding-left: 2.5rem !important;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.admonition .admonition-title:before {
|
|
532
|
+
top: 50% !important;
|
|
533
|
+
width: 20px !important;
|
|
534
|
+
height: 20px !important;
|
|
535
|
+
transform: translateY(-50%) !important;
|
|
536
|
+
}
|
|
537
|
+
`,hn={dark:["#only-light","#gh-light-mode-only"],light:["#only-dark","#gh-dark-mode-only"]},ss=[he,ae,De,Kt,Ke,ns,({theme:m})=>`
|
|
538
|
+
/*================== Palette ==================*/
|
|
539
|
+
/*
|
|
540
|
+
When color palette toggle is enabled in material theme for Mkdocs, there is a possibility to show conditionally
|
|
541
|
+
images by adding #only-dark or #only-light to resource hash. Backstage doesn't use mkdocs color palette mechanism,
|
|
542
|
+
so there is a need to add css rules from palette*.css manually.
|
|
543
|
+
*/
|
|
544
|
+
|
|
545
|
+
${hn[m.palette.type].map(L=>`img[src$="${L}"]`).join(", ")} {
|
|
546
|
+
display: none;
|
|
547
|
+
}
|
|
548
|
+
`],rs=()=>(0,je.Ut)(),os=()=>{const m=rs(),L=(0,Ve.A)();return(0,a.useMemo)(()=>{const j={theme:L,sidebar:m};return ss.reduce((F,k)=>F+k(j),"")},[L,m])},as=()=>{const m=os();return(0,a.useCallback)(L=>(L.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${m}</style>`),L),[m])},pn=async(m,L)=>{let j;if(typeof m=="string")j=new DOMParser().parseFromString(m,"text/html").documentElement;else if(m instanceof Element)j=m;else throw new Error("dom is not a recognized type");for(const F of L)j=await F(j);return j},is=(m,L,j)=>{const F=new URL(L,"https://ignored.com").pathname,k=m==="src"&&F.endsWith(".svg"),_=!L.match(/^([a-z]*:)?\/\//i),rt=L.startsWith(j);return k&&(_||rt)},jn=({techdocsStorageApi:m,entityId:L,path:j})=>async F=>{const k=await m.getApiOrigin(),_=async(rt,wt)=>{for(const Dt of rt)if(Dt.hasAttribute(wt)){const $t=Dt.getAttribute(wt);if(!$t)return;const Mt=await m.getBaseUrl($t,L,j);if(is(wt,$t,k))try{const _t=await(await fetch(Mt,{credentials:"include"})).text();Dt.setAttribute(wt,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(_t)))}`)}catch{Dt.setAttribute("alt",`Error: ${$t}`)}else Dt.setAttribute(wt,Mt)}};return await Promise.all([_(F.querySelectorAll("img"),"src"),_(F.querySelectorAll("script"),"src"),_(F.querySelectorAll("source"),"src"),_(F.querySelectorAll("link"),"href"),_(F.querySelectorAll("a[download]"),"href")]),F},cs=()=>m=>(((j,F)=>{Array.from(j).filter(k=>k.hasAttribute(F)).forEach(k=>{const _=k.getAttribute(F);if(_){_.match(/^https?:\/\//i)&&k.setAttribute("target","_blank");try{const rt=Sn(window.location.href);k.setAttribute(F,new URL(_,rt).toString())}catch{k.replaceWith(k.textContent||_)}}})})(Array.from(m.getElementsByTagName("a")),"href"),m);function Sn(m){const L=new URL(m);return!L.pathname.endsWith("/")&&!L.pathname.endsWith(".html")&&(L.pathname+="/"),L.toString()}var ls=t(27326);let Un;Un=Promise.resolve().then(t.t.bind(t,25873,19));function gn(m,L){Un.then(j=>{"createRoot"in j?j.createRoot(L).render(m):j.render(m,L)})}const ds=()=>m=>{const L=m.querySelector('.md-header label[for="__drawer"]'),j=m.querySelector("article");if(!L||!j)return m;const F=L.cloneNode();return gn((0,a.createElement)(ls.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),m},us=()=>m=>(m.querySelector(".md-header")?.remove(),m),hs=()=>m=>(m.querySelector(".md-footer .md-copyright")?.remove(),m.querySelector(".md-footer-copyright")?.remove(),m);var ps=t(36021),$n=t(90292),gs=t(52536),fs=t.n(gs);const Fn=m=>L=>{const j=L.querySelector('[title="Edit this page"]');if(!j||!j.href)return L;const F=new URL(j.href),k=m.byUrl(F);if(k?.type!=="github"&&k?.type!=="gitlab")return L;const _=L.querySelector("article>h1")?.childNodes[0].textContent||"",rt=encodeURIComponent(`Documentation Feedback: ${_}`),wt=encodeURIComponent(`Page source:
|
|
549
|
+
${j.href}
|
|
550
|
+
|
|
551
|
+
Feedback:`),Dt=k?.type==="github"?(0,ps.F)(F.href,"blob"):F.href,$t=fs()(Dt),Mt=`/${$t.organization}/${$t.name}`,Ft=j.cloneNode();switch(k?.type){case"gitlab":Ft.href=`${F.origin}${Mt}/issues/new?issue[title]=${rt}&issue[description]=${wt}`;break;case"github":Ft.href=`${F.origin}${Mt}/issues/new?title=${rt}&body=${wt}`;break;default:return L}return gn((0,a.createElement)($n.A),Ft),Ft.style.paddingLeft="5px",Ft.title="Leave feedback for this page",Ft.id="git-feedback-link",j?.insertAdjacentElement("beforebegin",Ft),L};var Nn=t(38097);const ms=(0,p.A)(m=>({button:{color:m.palette.primary.light,textDecoration:"underline"}})),On=({message:m,handleButtonClick:L,autoHideDuration:j})=>{const F=ms(),[k,_]=(0,a.useState)(!0),rt=()=>_(!1);return(0,n.jsx)(Nn.A,{open:k,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:j,color:"primary",onClose:rt,message:m,action:(0,n.jsx)(ft.A,{classes:{root:F.button},size:"small",onClick:()=>{rt(),L()},children:"Redirect now"})})},Pn=(m,L)=>{const F=k=>{const _=Sn(window.location.href),rt=new URL(k,_);if(rt.hostname!==window.location.hostname){const Dt=window.location.pathname,$t=Dt.indexOf(L),Mt=Dt.slice(0,$t+L.length);return new URL(Mt,_).href}return rt.href};return k=>{for(const _ of Array.from(k.querySelectorAll("meta")))if(_.getAttribute("http-equiv")==="refresh"){const rt=_.getAttribute("content")?.split("url=");if(!rt||rt.length<2)return k;const wt=rt[1],Dt=F(wt);if(window.location.href===Dt)return k;const $t=document.createElement("div");return gn((0,n.jsx)(On,{message:"This TechDocs page is no longer maintained. Will automatically redirect to the designated replacement.",handleButtonClick:()=>m(Dt),autoHideDuration:3e3}),$t),document.body.appendChild($t),setTimeout(()=>{m(Dt)},3e3),k}return k}},ys=()=>m=>(setTimeout(()=>{const L=m?.querySelectorAll("li.md-nav__item--active");L.length!==0&&(L.forEach(F=>{const k=F?.querySelector("input");k?.checked||k?.click()}),L[L.length-1].scrollIntoView())},200),m);var kn=t(50868),Wn=t(10437),vs=t(71677),Es=t(87051),As=t(36338);const xs=(0,Es.A)(m=>({tooltip:{fontSize:"inherit",color:m.palette.text.primary,margin:0,padding:m.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(vs.Ay),Cs=()=>(0,n.jsx)(Wn.A,{children:(0,n.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),bs=({text:m})=>{const[L,j]=(0,a.useState)(!1),[,F]=(0,As.A)(),k=(0,a.useCallback)(()=>{F(m),j(!0)},[m,F]),_=(0,a.useCallback)(()=>{j(!1)},[j]);return(0,n.jsx)(xs,{title:"Copied to clipboard",placement:"left",open:L,onClose:_,leaveDelay:1e3,children:(0,n.jsx)(mt.A,{style:{color:"inherit",position:"absolute"},className:"md-clipboard md-icon",onClick:k,children:(0,n.jsx)(Cs,{})})})},Ss=m=>L=>{const j=L.querySelectorAll("pre > code");for(const F of j){const k=F.textContent||"",_=document.createElement("div");F?.parentElement?.prepend(_),gn((0,n.jsx)(kn.A,{theme:m,children:(0,n.jsx)(bs,{text:k})}),_)}return L},Os=({baseUrl:m,onClick:L})=>j=>(Array.from(j.getElementsByTagName("a")).forEach(F=>{F.addEventListener("click",k=>{const rt=F.getAttribute("href");rt&&rt.startsWith(m)&&!F.hasAttribute("download")&&(k.preventDefault(),L(k,rt))})}),j),Kn=({onLoading:m,onLoaded:L})=>j=>(m(),j.addEventListener(d,function F(){L(),j.removeEventListener(d,F)}),j);function Ps(m,L){const j=new URL(L),F=`${j.origin}${j.pathname.replace(/\/$/,"")}`,k=m.replace(F,"").replace(/^\/+/,""),_=new URL(`http://localhost/${k}`);return`${_.pathname}${_.search}${_.hash}`}function ws(){const m=(0,a.useRef)((0,Nt.Zp)()),j=(0,dt.gf)(Z.U).getOptionalString("app.baseUrl");return(0,a.useCallback)(k=>{let _=k;if(j)try{_=Ps(k,j)}catch{}m.current(_)},[j])}const Ts="screen and (max-width: 76.1875em)",zn=m=>{const L=ws(),j=(0,Ve.A)(),F=(0,We.A)(Ts),k=re(),_=as(),rt=(0,G.s)(),wt=(0,dt.gf)(Ye.s),Dt=(0,dt.gf)(Ze.Y),$t=(0,dt.gf)(Z.U),{state:Mt,path:Ft,content:_t}=Me(),{"*":pe=""}=(0,Nt.g)(),[zt,qt]=(0,a.useState)(null),ye=h(zt),ie=(0,a.useCallback)(()=>{if(!zt)return;zt.querySelectorAll(".md-sidebar").forEach(ce=>{if(F)ce.style.top="0px";else{const Je=document?.querySelector(".techdocs-reader-page")?.getBoundingClientRect().top??0;let Se=zt.getBoundingClientRect().top??0;const nn=zt.querySelector(".md-container > .md-tabs")?.getBoundingClientRect().height??0;Se<Je&&(Se=Je);const ve=Math.max(Se,0)+nn;ce.style.top=`${ve}px`;const mn=zt.querySelector(".md-container > .md-footer")?.getBoundingClientRect().top??window.innerHeight;ce.style.height=`${mn-ve}px`}ce.style.setProperty("opacity","1")})},[zt,F]);(0,a.useEffect)(()=>(window.addEventListener("resize",ie),window.addEventListener("scroll",ie,!0),()=>{window.removeEventListener("resize",ie),window.removeEventListener("scroll",ie,!0)}),[zt,ie]);const Jt=(0,a.useCallback)(()=>{if(!zt)return;const ee=zt.querySelector(".md-footer");ee&&(ee.style.width=`${zt.getBoundingClientRect().width}px`)},[zt]);(0,a.useEffect)(()=>(window.addEventListener("resize",Jt),()=>{window.removeEventListener("resize",Jt)}),[zt,Jt]),(0,a.useEffect)(()=>{ye||(Jt(),ie())},[Mt,ye,Jt,ie]);const Xt=(0,a.useCallback)((ee,ce)=>pn(ee,[k,jn({techdocsStorageApi:wt,entityId:m,path:ce}),cs(),ds(),us(),hs(),Fn(Dt),_]),[m,Dt,wt,k,_]),Ot=(0,a.useCallback)(async ee=>pn(ee,[Pn(L,m.name),ys(),Ss(j),Os({baseUrl:$t.getOptionalString("app.baseUrl")||window.location.origin,onClick:(ce,ue)=>{const Je=ce.ctrlKey||ce.metaKey,Se=new URL(ue),Xe=ce.target?.innerText||ue,nn=ue.replace(window.location.origin,"");rt.captureEvent("click",Xe,{attributes:{to:nn}}),Se.hash?Je?window.open(ue,"_blank"):(window.location.pathname!==Se.pathname?L(ue):window.history.pushState(null,document.title,Se.hash),ee?.querySelector(`[id="${Se.hash.slice(1)}"]`)?.scrollIntoView()):Je?window.open(ue,"_blank"):L(ue)}}),Kn({onLoading:()=>{},onLoaded:()=>{ee.querySelector(".md-nav__title")?.removeAttribute("for")}}),Kn({onLoading:()=>{Array.from(ee.querySelectorAll(".md-sidebar")).forEach(ue=>{ue.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[j,L,rt,m.name,$t]);return(0,a.useEffect)(()=>{if(!_t)return()=>{};let ee=!0;return Xt(_t,Ft).then(async ce=>{if(!ce?.innerHTML||!ee||pe!==Ft)return;window.scroll({top:0});const ue=await Ot(ce);qt(ue)}),()=>{ee=!1}},[_t,pe,Ft,Xt,Ot]),zt};var fn=t(41883),Rs=t(72020),wn=t(99730);const $e=()=>{const m=(0,Rs.YR)(),{shadowRoot:L}=(0,b.V)(),j=L?.querySelector('[data-md-component="content"]'),F=L?.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 _=L?.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let rt=_?.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return rt||(rt=document.createElement("div"),rt.setAttribute("data-techdocs-addons-location","secondary sidebar"),_?.prepend(rt)),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(fn.A,{container:k,children:m.renderComponentsByLocation(wn.e.PrimarySidebar)}),(0,n.jsx)(fn.A,{container:j,children:m.renderComponentsByLocation(wn.e.Content)}),(0,n.jsx)(fn.A,{container:rt,children:m.renderComponentsByLocation(wn.e.SecondarySidebar)})]})},Fe=(0,p.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Ne=He(m=>{const{withSearch:L=!0,searchResultUrlMapper:j,onReady:F}=m,k=Fe(),{entityMetadata:{value:_,loading:rt},entityRef:wt,setShadowRoot:Dt}=(0,b.V)(),{state:$t}=Me(),Mt=zn(wt),Ft=window.location.pathname,_t=window.location.hash,pe=h(Mt),[zt]=B([`[id="${_t.slice(1)}"]`]),qt=(0,at.n)(),{NotFoundErrorPage:ye}=qt.getComponents();(0,a.useEffect)(()=>{pe||(_t?zt&&zt.scrollIntoView():document?.querySelector("header")?.scrollIntoView())},[Ft,_t,zt,pe]);const ie=(0,a.useCallback)(Jt=>{Dt(Jt),F instanceof Function&&F()},[Dt,F]);return rt===!1&&!_?(0,n.jsx)(ye,{}):Mt?(0,n.jsx)(D.U,{children:(0,n.jsxs)(A.A,{container:!0,children:[(0,n.jsx)(A.A,{xs:12,item:!0,children:(0,n.jsx)(Ee,{})}),L&&(0,n.jsx)(A.A,{className:k.search,xs:"auto",item:!0,children:(0,n.jsx)(jt,{entityId:wt,entityTitle:_?.metadata?.title,searchResultUrlMapper:j})}),(0,n.jsxs)(A.A,{xs:12,item:!0,children:[($t==="CHECKING"||pe)&&(0,n.jsx)($.k,{}),(0,n.jsx)(x,{element:Mt,onAppend:ie,children:(0,n.jsx)($e,{})})]})]})}):(0,n.jsx)(D.U,{children:(0,n.jsx)(A.A,{container:!0,children:(0,n.jsx)(A.A,{xs:12,item:!0,children:(0,n.jsx)(Ee,{})})})})}),zs=null},45061:(H,S,t)=>{"use strict";t.d(S,{T:()=>xt});var n=t(31085),a=t(14041),A=t(93285),p=t(42899),b=t(4387),g=t(13660),u=t(72020),f=t(86892),d=t(99730),y=t(82292),h=t(67871),x=t(8859),O=t(34428),P=t(51372),B=t(6820),M=t(58837),R=t(268),D=t(72501),$=t(72072);const N=(0,M.A)(Pt=>({root:{textAlign:"left"},label:{color:Pt.page.fontColor,fontWeight:Pt.typography.fontWeightBold,letterSpacing:0,fontSize:Pt.typography.fontSize,marginBottom:Pt.spacing(1)/2,lineHeight:1},value:{color:(0,R.X4)(Pt.page.fontColor,.8),fontSize:Pt.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),J=({value:Pt,className:It,typographyRootComponent:ut})=>(0,n.jsx)(D.A,{component:ut??(typeof Pt=="string"?"p":"span"),className:It,children:Pt});function z(Pt){const{label:It,value:ut,url:lt,contentTypograpyRootComponent:Ct}=Pt,gt=N(),St=(0,n.jsx)(J,{className:gt.value,value:ut||"<Unknown>",typographyRootComponent:Ct});return(0,n.jsx)(p.A,{item:!0,children:(0,n.jsxs)(D.A,{component:"span",className:gt.root,children:[(0,n.jsx)(D.A,{className:gt.label,children:It}),lt?(0,n.jsx)($.N_,{to:lt,children:St}):St]})})}var Y=t(69814),K=t(72427),dt=t(65461),G=t(9222),Q=t(56005),Z=t.n(Q),ct=t(82779),pt=t(18690);const vt=(0,n.jsx)(b.A,{animation:"wave",variant:"text",height:40}),xt=Pt=>{const{children:It}=Pt,ut=(0,u.YR)(),lt=(0,K.gf)(dt.U),Ct=(0,K.gf)(y.n),{"*":gt=""}=(0,pt.g)(),{title:St,setTitle:Tt,subtitle:at,setSubtitle:mt,entityRef:At,metadata:{value:tt,loading:ft},entityMetadata:{value:it,loading:U}}=(0,f.V)();(0,a.useEffect)(()=>{tt&&(Tt(tt.site_name),mt(()=>{let{site_description:le}=tt;return(!le||le==="None")&&(le=""),le}))},[tt,Tt,mt]);const V=lt.getOptional("app.title")||"Backstage",{locationMetadata:et,spec:bt}=it||{},ht=bt?.lifecycle,Bt=it?(0,h.t)(it,P.vv):[],Ut=(0,G.S)(ct.rQ)(),Nt=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(z,{label:Z()(it?.kind||"entity"),value:(0,n.jsx)(x.z,{color:"inherit",entityRef:At,title:it?.metadata.title,defaultKind:"Component"})}),Bt.length>0&&(0,n.jsx)(z,{label:"Owner",value:(0,n.jsx)(O.i,{color:"inherit",entityRefs:Bt,defaultKind:"group"})}),ht?(0,n.jsx)(z,{label:"Lifecycle",value:String(ht)}):null,et&&et.type!=="dir"&&et.type!=="file"?(0,n.jsx)(z,{label:"",value:(0,n.jsxs)(p.A,{container:!0,direction:"column",alignItems:"center",children:[(0,n.jsx)(p.A,{style:{padding:0},item:!0,children:(0,n.jsx)(g.A,{style:{marginTop:"-25px"}})}),(0,n.jsx)(p.A,{style:{padding:0},item:!0,children:"Source"})]}),url:et.target}):null]});if(!U&&it===void 0||!ft&&tt===void 0)return null;const te=(0,B.U2)(At),jt=Ct.forEntity(te).snapshot.primaryTitle,kt=le=>le.replace(/\/$/,""),ne=le=>le.replace(/-/g," ").split(" ").map(Z()).join(" ");let ge=[];gt!==""&&(ge=kt(gt).split("/").slice(0,3).map(ne));const oe=[V,jt,...ge].join(" | ");return(0,n.jsxs)(Y.Y,{type:"Documentation",typeLink:Ut,title:St||vt,subtitle:at===""?void 0:at||vt,children:[(0,n.jsx)(A.A,{titleTemplate:"%s",children:(0,n.jsx)("title",{children:oe})}),Nt,It,ut.renderComponentsByLocation(d.e.Header)]})}},82779:(H,S,t)=>{"use strict";t.d(S,{Oc:()=>A,Ri:()=>p,rQ:()=>a});var n=t(34569);const a=(0,n.H)({id:"techdocs:index-page"}),A=(0,n.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),p=(0,n.H)({id:"techdocs:catalog-reader-view"})},27698:(H,S,t)=>{"use strict";t.r(S),t.d(S,{TechDocsSearchResultListItem:()=>d});var n=t(31085),a=t(68804),A=t(5951),p=t(58837),b=t(72501),g=t(72072),u=t(70734);const f=(0,p.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),d=y=>{const{result:h,highlight:x,lineClamp:O=5,asListItem:P=!0,asLink:B=!0,title:M,icon:R}=y,D=f(),$=({children:z})=>B?(0,n.jsx)(g.N_,{noTrack:!0,to:h.location,children:z}):(0,n.jsx)(n.Fragment,{children:z}),N=()=>{const z=x?.fields.title?(0,n.jsx)(u.e,{text:x.fields.title,preTag:x.preTag,postTag:x.postTag}):h.title,Y=x?.fields.entityTitle?(0,n.jsx)(u.e,{text:x.fields.entityTitle,preTag:x.preTag,postTag:x.postTag}):h.entityTitle,K=x?.fields.name?(0,n.jsx)(u.e,{text:x.fields.name,preTag:x.preTag,postTag:x.postTag}):h.name;return h?(0,n.jsx)(A.A,{className:D.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,n.jsx)($,{children:M||(0,n.jsxs)(n.Fragment,{children:[z," | ",Y??K," docs"]})}),secondary:(0,n.jsx)(b.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:O,overflow:"hidden"},color:"textSecondary",variant:"body2",children:x?.fields.text?(0,n.jsx)(u.e,{text:x.fields.text,preTag:x.preTag,postTag:x.postTag}):h.text})}):null},J=({children:z})=>P?(0,n.jsxs)(n.Fragment,{children:[R&&(0,n.jsx)(a.A,{children:typeof R=="function"?R(h):R}),(0,n.jsx)("div",{className:D.flexContainer,children:z})]}):(0,n.jsx)(n.Fragment,{children:z});return(0,n.jsx)(J,{children:(0,n.jsx)(N,{})})}},97184:(H,S,t)=>{const a=document.querySelector('meta[name="backstage-public-path"]')?.getAttribute("content");a&&(t.p=a)},86973:()=>{}},H=>{var S=n=>H(H.s=n);H.O(0,[1751,1888,5067,1678,235,6587,5042,7400,1975,4538,4121],()=>(S(97184),S(71543)));var t=H.O()}]);})();
|
|
552
|
+
|
|
553
|
+
//# sourceMappingURL=main.14805d05.js.map
|