@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.
Files changed (37) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/embedded-app/.config-schema.json +1924 -2652
  3. package/dist/embedded-app/index.html +1 -1
  4. package/dist/embedded-app/index.html.tmpl +1 -1
  5. package/dist/embedded-app/static/2177.d7152699.chunk.js +4 -0
  6. package/dist/embedded-app/static/2177.d7152699.chunk.js.map +1 -0
  7. package/dist/embedded-app/static/3308.61cd83f7.chunk.js +7 -0
  8. package/dist/embedded-app/static/3308.61cd83f7.chunk.js.map +1 -0
  9. package/dist/embedded-app/static/{4036.255f68ab.chunk.js → 4036.4a93e66b.chunk.js} +1 -1
  10. package/dist/embedded-app/static/4036.4a93e66b.chunk.js.map +1 -0
  11. package/dist/embedded-app/static/{5470.f80a9c12.chunk.js → 5470.1de8dd3a.chunk.js} +1 -1
  12. package/dist/embedded-app/static/5470.1de8dd3a.chunk.js.map +1 -0
  13. package/dist/embedded-app/static/{5724.6bdfca76.chunk.js → 5724.80feefdb.chunk.js} +3 -3
  14. package/dist/embedded-app/static/5724.80feefdb.chunk.js.map +1 -0
  15. package/dist/embedded-app/static/{8803.34dd38ce.chunk.js → 8803.fa94a950.chunk.js} +1 -1
  16. package/dist/embedded-app/static/{8803.34dd38ce.chunk.js.map → 8803.fa94a950.chunk.js.map} +1 -1
  17. package/dist/embedded-app/static/9234.a1d6ef55.chunk.js +4 -0
  18. package/dist/embedded-app/static/9234.a1d6ef55.chunk.js.map +1 -0
  19. package/dist/embedded-app/static/main.14805d05.js +553 -0
  20. package/dist/embedded-app/static/main.14805d05.js.map +1 -0
  21. package/dist/embedded-app/static/{runtime.9fff8ae5.js → runtime.14805d05.js} +2 -2
  22. package/dist/embedded-app/static/{runtime.9fff8ae5.js.map → runtime.14805d05.js.map} +1 -1
  23. package/dist/embedded-app/static/{vendor.9fff8ae5.js → vendor.14805d05.js} +1 -1
  24. package/dist/embedded-app/static/{vendor.9fff8ae5.js.map → vendor.14805d05.js.map} +1 -1
  25. package/dist/package.json.cjs.js +1 -1
  26. package/package.json +7 -7
  27. package/dist/embedded-app/static/2177.84bbb70f.chunk.js +0 -4
  28. package/dist/embedded-app/static/2177.84bbb70f.chunk.js.map +0 -1
  29. package/dist/embedded-app/static/3308.13263a7d.chunk.js +0 -7
  30. package/dist/embedded-app/static/3308.13263a7d.chunk.js.map +0 -1
  31. package/dist/embedded-app/static/4036.255f68ab.chunk.js.map +0 -1
  32. package/dist/embedded-app/static/5470.f80a9c12.chunk.js.map +0 -1
  33. package/dist/embedded-app/static/5724.6bdfca76.chunk.js.map +0 -1
  34. package/dist/embedded-app/static/9234.812d5df8.chunk.js +0 -4
  35. package/dist/embedded-app/static/9234.812d5df8.chunk.js.map +0 -1
  36. package/dist/embedded-app/static/main.9fff8ae5.js +0 -553
  37. package/dist/embedded-app/static/main.9fff8ae5.js.map +0 -1
@@ -1,553 +0,0 @@
1
- (()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:(V,S,t)=>{"use strict";t.d(S,{c:()=>n});const n=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:(V,S,t)=>{"use strict";t.d(S,{P:()=>E,_P:()=>a,oQ:()=>n});const n="default",a="backstage.io/view-url",E="backstage.io/edit-url",h="kubernetes.io/api-server",C="kubernetes.io/api-server-certificate-authority",g="kubernetes.io/auth-provider"},6820:(V,S,t)=>{"use strict";t.d(S,{KU:()=>h,U2:()=>C,sM:()=>E});var n=t(72348);function a(g){let d=g.indexOf(":");const f=g.indexOf("/");f!==-1&&f<d&&(d=-1);const u=d===-1?void 0:g.slice(0,d),y=f===-1?void 0:g.slice(d+1,f),p=g.slice(Math.max(d+1,f+1));if(u===""||y===""||p==="")throw new TypeError(`Entity reference "${g}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:u,namespace:y,name:p}}function E(g){return{kind:g.kind,namespace:g.metadata.namespace||n.oQ,name:g.metadata.name}}function h(g,d){if(!g)throw new Error("Entity reference must not be empty");const f=d?.defaultKind,u=d?.defaultNamespace||n.oQ;let y,p,A;if(typeof g=="string"){const O=a(g);y=O.kind??f,p=O.namespace??u,A=O.name}else y=g.kind??f,p=g.namespace??u,A=g.name;if(y)if(p){if(!A){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:p,name:A}}function C(g){let d,f,u;return"metadata"in g?(d=g.kind,f=g.metadata.namespace??n.oQ,u=g.metadata.name):(d=g.kind,f=g.namespace??n.oQ,u=g.name),`${d.toLocaleLowerCase("en-US")}:${f.toLocaleLowerCase("en-US")}/${u.toLocaleLowerCase("en-US")}`}},51372:(V,S,t)=>{"use strict";t.d(S,{fT:()=>f,jn:()=>O,nC:()=>d,sA:()=>T,vv:()=>n});const n="ownedBy",a="ownerOf",E="consumesApi",h="apiConsumedBy",C="providesApi",g="apiProvidedBy",d="dependsOn",f="dependencyOf",u="parentOf",y="childOf",p="memberOf",A="hasMember",O="partOf",T="hasPart"},17736:(V,S,t)=>{"use strict";t.d(S,{Eo:()=>n,I4:()=>E});const n="backstage.io/managed-by-location",a="backstage.io/managed-by-origin-location",E="backstage.io/source-location"},78692:(V,S,t)=>{"use strict";t.d(S,{Cr:()=>g,KL:()=>C,aY:()=>h});var n=t(6820),a=t(17736);const E=/^[\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 h(d){if(typeof d!="string")throw new TypeError(`Unable to parse location ref '${d}', unexpected argument ${typeof d}`);const f=d.indexOf(":");if(f<0)throw new TypeError(`Unable to parse location ref '${d}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const u=d.substring(0,f).trim(),y=d.substring(f+1).trim();if(!u||!y)throw new TypeError(`Unable to parse location ref '${d}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(u==="http"||u==="https")throw new TypeError(`Invalid location ref '${d}', please prefix it with 'url:', e.g. 'url:${d}'`);if(E.test(y))throw new TypeError(`Invalid location ref '${d}', target is a javascript: URL`);return{type:u,target:y}}function C(d){const{type:f,target:u}=d;if(f){if(!u)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(E.test(u))throw new TypeError(`Invalid location ref '${f}:${u}', target is a javascript: URL`);return`${f}:${u}`}function g(d){const f=d.metadata?.annotations?.[a.I4]??d.metadata?.annotations?.[a.Eo];if(!f)throw new Error(`Entity '${(0,n.U2)(d)}' is missing location`);return h(f)}},77310:(V,S,t)=>{"use strict";t.d(S,{z:()=>f});var n=t(31085),a=t(10394),E=t(54917),h=t(69578),C=t(40697),g=t(25577),d=t(37916);function f(u){const{text:y,language:p,showLineNumbers:A=!1,highlightedNumbers:O,customStyle:T,showCopyCodeButton:L=!1}=u,P=(0,E.A)(),j=P.palette.type==="dark"?C.A:g.A,B=P.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,n.jsxs)(a.A,{position:"relative",children:[(0,n.jsx)(h.A,{customStyle:T,language:p,style:j,showLineNumbers:A,wrapLines:!0,lineNumberStyle:{color:P.palette.textVerySubtle},lineProps:F=>O?.includes(F)?{style:{backgroundColor:B}}:{},children:y}),L&&(0,n.jsx)(a.A,{position:"absolute",top:0,right:0,children:(0,n.jsx)(d.l,{text:y})})]})}},37916:(V,S,t)=>{"use strict";t.d(S,{l:()=>p});var n=t(31085),a=t(72427),E=t(39837),h=t(29365),C=t(71677),g=t(99594),d=t(14041),f=t(36338),u=t(10315),y=t(87849);function p(A){const{t:O}=(0,y.i)(u.O),{text:T,tooltipDelay:L=1e3,tooltipText:P=O("copyTextButton.tooltipText"),"aria-label":j="Copy text"}=A,B=(0,a.gf)(E.m),[F,W]=(0,d.useState)(!1),[{error:J},H]=(0,f.A)();(0,d.useEffect)(()=>{J&&B.post(J)},[J,B]);const Y=K=>{K.stopPropagation(),W(!0),H(T)};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(C.Ay,{id:"copy-test-tooltip",title:P,placement:"top",leaveDelay:L,onClose:()=>W(!1),open:F,children:(0,n.jsx)(h.A,{onClick:Y,"aria-label":j,children:(0,n.jsx)(g.A,{})})})})}},44186:(V,S,t)=>{"use strict";t.d(S,{p:()=>A});var n=t(31085),a=t(42899),E=t(58837),h=t(72501);const C=t.p+"static/missingAnnotation.67f79e98.svg",g=t.p+"static/noInformation.4b426325.svg",d=t.p+"static/createComponent.975d1e1e.svg",f=t.p+"static/noBuild.1715fa71.svg",u=(0,E.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),y=({missing:O})=>{const T=u();switch(O){case"field":return(0,n.jsx)("img",{src:C,className:T.generalImg,alt:"annotation is missing"});case"info":return(0,n.jsx)("img",{src:g,alt:"no Information",className:T.generalImg});case"content":return(0,n.jsx)("img",{src:d,alt:"create Component",className:T.generalImg});case"data":return(0,n.jsx)("img",{src:f,alt:"no Build",className:T.generalImg});default:return null}},p=(0,E.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 A(O){const{title:T,description:L,missing:P,action:j}=O,B=p();return(0,n.jsxs)(a.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:B.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)(h.A,{variant:"h5",children:T})}),(0,n.jsx)(a.A,{item:!0,xs:!0,children:(0,n.jsx)(h.A,{variant:"body1",children:L})}),(0,n.jsx)(a.A,{item:!0,xs:!0,className:B.action,children:j})]})}),(0,n.jsx)(a.A,{item:!0,xs:12,md:6,className:B.imageContainer,children:typeof P=="string"?(0,n.jsx)(y,{missing:P}):P.customImage})]})}},22020:(V,S,t)=>{"use strict";t.d(S,{b:()=>y});var n=t(31085),a=t(58837),E=t(58007),h=t(8109),C=t(5951),g=t(37916),d=t(88640);const f=(0,a.A)(p=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:p.spacing(2)},divider:{margin:p.spacing(2)}}),{name:"BackstageErrorPanel"}),u=({error:p,message:A,stack:O,children:T})=>{const L=f();return(0,n.jsxs)(E.A,{dense:!0,children:[(0,n.jsxs)(h.A,{alignItems:"flex-start",children:[(0,n.jsx)(C.A,{classes:{secondary:L.text},primary:"Error",secondary:p}),(0,n.jsx)(g.l,{text:p})]}),(0,n.jsxs)(h.A,{alignItems:"flex-start",children:[(0,n.jsx)(C.A,{classes:{secondary:L.text},primary:"Message",secondary:A}),(0,n.jsx)(g.l,{text:A})]}),O&&(0,n.jsxs)(h.A,{alignItems:"flex-start",children:[(0,n.jsx)(C.A,{classes:{secondary:L.text},primary:"Stack Trace",secondary:O}),(0,n.jsx)(g.l,{text:O})]}),T]})};function y(p){const{title:A,error:O,defaultExpanded:T,titleFormat:L,children:P}=p;return(0,n.jsx)(d.B,{severity:"error",title:A??O.message,defaultExpanded:T,titleFormat:L,children:(0,n.jsx)(u,{error:O.name,message:O.message,stack:O.stack,children:P})})}},18956:(V,S,t)=>{"use strict";t.d(S,{m:()=>g});var n=t(31085),a=t(72501),E=t(58837),h=t(31129);const C=(0,E.A)(()=>({icon:{color:"#f3ba37",cursor:"pointer",display:"inline-flex"},iconBorder:{color:"inherit",cursor:"pointer",display:"inline-flex"}}),{name:"BackstageFavoriteToggleIcon"});function g(f){const{isFavorite:u}=f,y=C();return(0,n.jsx)(a.A,{component:"span",className:u?y.icon:y.iconBorder,children:u?(0,n.jsx)(h.Gg,{}):(0,n.jsx)(h.KG,{})})}function d(f){const{id:u,title:y,isFavorite:p,onToggle:A,...O}=f;return _jsx(Tooltip,{id:u,title:y,children:_jsx(IconButton,{"aria-label":y,id:u,onClick:()=>A(!p),color:"inherit",...O,children:_jsx(g,{isFavorite:p})})})}},72072:(V,S,t)=>{"use strict";t.d(S,{N_:()=>Q});var n=t(31085),a=t(82266),E=t(72427),h=t(65461),C=t(93368),g=t(49203),d=t(58837),f=t(72501),u=t(53373),y=t.n(u),p=t(45250),A=t.n(p),O=t(14041),T=t(18690),L=t(73657),P=t(39330);function j(){const[Z]=(0,T.AV)((0,n.jsx)(T.qh,{index:!0,element:(0,n.jsx)("div",{})}));return!Z.index}const B=(0,d.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"}),F=()=>{const it=(0,a.n)().getSystemIcon("externalLink")||P.A,ft=B();return(0,n.jsx)(it,{className:ft.externalLinkIcon})},W=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,H=window.open;if(H&&!H.__backstage){const Z=function(...ft){const vt=String(ft[0]);if(J.test(vt))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return H.apply(this,ft)};Z.__backstage=!0,window.open=Z}const Y=()=>{try{return(0,E.gf)(h.U).getOptionalString("app.baseUrl")}catch{return}},K=()=>{const Z="http://sample.dev",it=Y()??"/",{pathname:ft}=new URL(it,Z);return(0,p.trimEnd)(ft,"/")},dt=Z=>{let it=String(Z);const ft=K(),vt=W(it),xt=it.startsWith(ft);return!vt&&!xt&&(it=ft.concat(it)),it},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:it,externalLinkIcon:ft,...vt},xt)=>{const Ot=B(),It=(0,C.s)(),ut=j()?dt(vt.to):vt.to,ct=G(vt.children)||ut,Ct=W(ut),mt=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),it||It.captureEvent("click",ct,{attributes:{to:ut}})};return Ct?(0,n.jsxs)(g.A,{...mt?{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()(Ot.externalLink,vt.className),children:[vt.children,ft&&(0,n.jsx)(F,{}),(0,n.jsx)(f.A,{component:"span",className:Ot.visuallyHidden,children:", Opens in a new window"})]}):(0,n.jsx)(g.A,{...vt,ref:xt,component:L.N_,to:ut,onClick:St})})},73896:(V,S,t)=>{"use strict";t.d(S,{z:()=>g});var n=t(31085),a=t(64947),E=t(14041),h=t(72072);const C=(0,E.forwardRef)((f,u)=>(0,n.jsx)(h.N_,{ref:u,...f,color:"initial"})),g=(0,E.forwardRef)((f,u)=>(0,n.jsx)(a.A,{ref:u,component:C,...f})),d=null},4650:(V,S,t)=>{"use strict";t.d(S,{h:()=>p});var n=t(31085),a=t(58837),E=t(45872),h=t(61125),C=t(14041),g=t(77310);const d=(0,a.A)(A=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${A.palette.border}`},"& th, & td":{border:`1px solid ${A.palette.border}`,padding:A.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:A.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:A.palette.background.paper},"& tr":{backgroundColor:A.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:A.palette.background.default},"& a":{color:A.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),f=(A,O)=>O?typeof O=="string"?A+O:C.Children.toArray(O.props.children).reduce(f,A):A,u=({level:A,children:O})=>{const P=C.Children.toArray(O).reduce(f,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return(0,C.createElement)(`h${A}`,{id:P},O)},y={code:({inline:A,className:O,children:T,...L})=>{const P=String(T).replace(/\n+$/,""),j=/language-(\w+)/.exec(O||"");return!A&&j?(0,n.jsx)(g.z,{language:j[1],text:P}):(0,n.jsx)("code",{className:O,...L,children:T})},h1:u,h2:u,h3:u,h4:u,h5:u,h6:u};function p(A){const{content:O,dialect:T="gfm",linkTarget:L,transformLinkUri:P,transformImageUri:j,className:B}=A,F=d();return(0,n.jsx)(E.$,{remarkPlugins:T==="gfm"?[h.A]:[],className:`${F.markdown} ${B??""}`.trim(),children:O,components:y,linkTarget:L,transformLinkUri:P,transformImageUri:j})}},68146:(V,S,t)=>{"use strict";t.d(S,{k:()=>g});var n=t(31085),a=t(10394),E=t(88951),h=t(54917),C=t(14041);function g(d){const f=(0,h.A)(),[u,y]=(0,C.useState)(!1);return(0,C.useEffect)(()=>{const p=setTimeout(()=>y(!0),f.transitions.duration.short);return()=>clearTimeout(p)},[f.transitions.duration.short]),u?(0,n.jsx)(E.A,{...d,"data-testid":"progress"}):(0,n.jsx)(a.A,{display:"none","data-testid":"progress"})}},66917:(V,S,t)=>{"use strict";t.d(S,{w:()=>dt});var n=t(31085),a=t(10394),E=t(69076),h=t(67720),C=t(95061),g=t(41857),d=t(48543),f=t(26343),u=t(81215),y=t(87051),p=t(12398),A=t(58837),O=t(72501),T=t(92399),L=t(14041),P=t(10437);const j=(0,A.A)(G=>(0,p.A)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"}),F=()=>{const G=j();return(0,n.jsx)(P.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"})})},W=(0,A.A)(G=>(0,p.A)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"}),H=()=>{const G=W();return(0,n.jsx)(P.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,p.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,A.A)(G=>(0,p.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:it,placeholder:ft,selected:vt,onChange:xt,triggerReset:Ot,native:It=!1,disabled:ut=!1,margin:ct,"data-testid":Ct="select"}=G,mt=K(),[St,Tt]=(0,L.useState)(vt||(Q?[]:"")),[at,yt]=(0,L.useState)(!1);(0,L.useEffect)(()=>{Tt(Q?[]:"")},[Ot,Q]),(0,L.useEffect)(()=>{Tt(vt||(Q?[]:""))},[vt,Q]);const Et=M=>{Tt(M.target.value),xt(M.target.value)},et=M=>{if(ut){M.preventDefault();return}yt(z=>Q&&!(M.target instanceof HTMLElement)?!0:!z)},gt=()=>{yt(!1)},nt=M=>()=>{const z=St.filter(lt=>lt!==M);Tt(z),xt(z)};return(0,n.jsx)(a.A,{className:mt.root,children:(0,n.jsxs)(C.A,{className:mt.formControl,children:[(0,n.jsx)(d.A,{className:mt.formLabel,children:it}),(0,n.jsxs)(u.A,{"aria-label":it,value:St,native:It,disabled:ut,"data-testid":Ct,displayEmpty:!0,multiple:Q,margin:ct,onChange:Et,open:at,onOpen:et,onClose:gt,input:(0,n.jsx)(Y,{}),label:it,renderValue:M=>Q&&St.length!==0?(0,n.jsx)(a.A,{className:mt.chips,children:M.map(z=>{const lt=Z.find(wt=>wt.value===z);return lt?(0,n.jsx)(h.A,{"data-testid":"chip",label:lt?.label,clickable:!0,deleteIcon:(0,n.jsx)(T.A,{"data-testid":"cancel-icon",onMouseDown:wt=>wt.stopPropagation()}),onDelete:nt(z),className:mt.chip},lt?.value):!1})}):(0,n.jsx)(O.A,{children:St.length===0?ft||"":Z.find(z=>z.value===M)?.label}),IconComponent:()=>at?(0,n.jsx)(H,{}):(0,n.jsx)(F,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[!!ft&&!Q&&(0,n.jsx)(f.A,{value:[],children:ft}),It?Z&&Z.map(M=>(0,n.jsx)("option",{value:M.value,children:M.label},M.value)):Z&&Z.map(M=>(0,n.jsxs)(f.A,{value:M.value,children:[Q&&(0,n.jsx)(E.A,{color:"primary",checked:St.includes(M.value)||!1,className:mt.checkbox}),M.label]},M.value))]})]})})}},27586:(V,S,t)=>{"use strict";t.d(S,{Y:()=>Q});var n=t(31085),a=t(82266),E=t(72427),h=t(65461),C=t(10394),g=t(64947),d=t(93453),f=t(29365),u=t(68804),y=t(5951),p=t(26343),A=t(28233),O=t(55197),T=t(58837),L=t(72501),P=t(5893),j=t(14041),B=t(10795),F=t(31129),W=t(72072),J=t(10315),H=t(87849);const Y=(0,T.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),K=({icon:Z})=>{const it=(0,a.n)(),ft=Z?it.getSystemIcon(Z)??F.NT:F.NT;return(0,n.jsx)(ft,{})},dt=({link:Z})=>(0,n.jsx)(W.N_,{to:Z.url,children:Z.title??Z.url}),G=({item:Z})=>(0,n.jsxs)(p.A,{button:!1,children:[(0,n.jsx)(u.A,{children:(0,n.jsx)(K,{icon:Z.icon})}),(0,n.jsx)(y.A,{primary:Z.title,secondary:Z.links?.reduce((it,ft,vt)=>[...it,vt>0&&(0,n.jsx)("br",{},vt),(0,n.jsx)(dt,{link:ft},ft.url)],[])})]});function Q(Z){const{t:it}=(0,H.i)(J.O),{title:ft,items:vt,children:xt}=Z,{items:Ot}=(0,B.l)(),[It,ut]=(0,j.useState)(!1),[ct,Ct]=(0,j.useState)(null),mt=Y(),St=(0,E.gf)(h.U).getOptionalConfig("app.support"),Tt=(0,P.A)(Et=>Et.breakpoints.down("sm")),at=Et=>{Ct(Et.currentTarget),ut(!0)},yt=()=>{ut(!1)};return St?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(C.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)(F.NT,{})}):(0,n.jsx)(g.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:at,startIcon:(0,n.jsx)(F.NT,{}),children:it("supportButton.title")})}),(0,n.jsxs)(O.Ay,{"data-testid":"support-button-popover",open:It,anchorEl:ct,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:yt,children:[(0,n.jsxs)(A.A,{className:mt.popoverList,autoFocusItem:!!ct,children:[ft&&(0,n.jsx)(p.A,{button:!1,alignItems:"flex-start",className:mt.menuItem,children:(0,n.jsx)(L.A,{variant:"subtitle1",children:ft})}),j.Children.map(xt,(Et,et)=>(0,n.jsx)(p.A,{button:!1,alignItems:"flex-start",className:mt.menuItem,children:Et},`child-${et}`)),(vt??Ot).map((Et,et)=>(0,n.jsx)(G,{item:Et},`item-${et}`))]}),(0,n.jsx)(d.A,{children:(0,n.jsx)(g.A,{color:"primary",onClick:yt,"aria-label":"Close",children:it("supportButton.close")})})]})]}):null}},14209:(V,S,t)=>{"use strict";t.d(S,{X:()=>et});var n=t(31085),a=t(87849),E=t(25301),h=t(10394),C=t(29365),g=t(87051),d=t(58837),f=t(54917),u=t(72501),y=t(83313),p=t(89019),A=t(62461),O=t(68887),T=t(63798),L=t(64704),P=t(6774),j=t(75625),B=t(65859),F=t(45917),W=t(5416),J=t(33494),H=t(80113),Y=t(26229),K=t(46802),dt=t(45250),G=t(14041),Q=t(10315),Z=t(64947),it=t(66917);const ft=(0,d.A)(M=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:M.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:M.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${M.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:M.spacing(2)}}}),{name:"BackstageTableFilters"}),vt=M=>{const z=ft(),{onChangeFilters:lt}=M,{t:wt}=(0,a.i)(Q.O),[bt,$t]=(0,G.useState)({...M.selectedFilters}),[Ft,Nt]=(0,G.useState)(!1),zt=()=>{$t({}),Nt(Ht=>!Ht)};return(0,G.useEffect)(()=>{lt(bt)},[bt,lt]),(0,n.jsxs)(h.A,{className:z.root,children:[(0,n.jsxs)(h.A,{className:z.header,children:[(0,n.jsx)(h.A,{className:z.value,children:wt("table.filter.title")}),(0,n.jsx)(Z.A,{color:"primary",onClick:zt,children:wt("table.filter.clearAll")})]}),(0,n.jsx)(h.A,{className:z.filters,children:M.filters?.length&&M.filters.map(Ht=>(0,n.jsx)(it.w,{triggerReset:Ft,...Ht.element,selected:bt[Ht.element.label],onChange:te=>$t({...bt,[Ht.element.label]:te})},Ht.element.label))})]})};var xt=t(78467);function Ot(M){return(0,n.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:M.colSpan,children:(0,n.jsx)(h.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)((M,z)=>(0,n.jsx)(y.A,{...M,ref:z})),Check:(0,G.forwardRef)((M,z)=>(0,n.jsx)(A.A,{...M,ref:z})),Clear:(0,G.forwardRef)((M,z)=>(0,n.jsx)(L.A,{...M,ref:z})),Delete:(0,G.forwardRef)((M,z)=>(0,n.jsx)(P.A,{...M,ref:z})),DetailPanel:(0,G.forwardRef)((M,z)=>(0,n.jsx)(T.A,{...M,ref:z})),Edit:(0,G.forwardRef)((M,z)=>(0,n.jsx)(j.A,{...M,ref:z})),Export:(0,G.forwardRef)((M,z)=>(0,n.jsx)(Y.A,{...M,ref:z})),Filter:(0,G.forwardRef)((M,z)=>(0,n.jsx)(B.A,{...M,ref:z})),FirstPage:(0,G.forwardRef)((M,z)=>(0,n.jsx)(W.A,{...M,ref:z})),LastPage:(0,G.forwardRef)((M,z)=>(0,n.jsx)(J.A,{...M,ref:z})),NextPage:(0,G.forwardRef)((M,z)=>(0,n.jsx)(T.A,{...M,ref:z})),PreviousPage:(0,G.forwardRef)((M,z)=>(0,n.jsx)(O.A,{...M,ref:z})),ResetSearch:(0,G.forwardRef)((M,z)=>(0,n.jsx)(L.A,{...M,ref:z})),Search:(0,G.forwardRef)((M,z)=>(0,n.jsx)(F.A,{...M,ref:z})),SortArrow:(0,G.forwardRef)((M,z)=>(0,n.jsx)(p.A,{...M,ref:z})),ThirdStateCheck:(0,G.forwardRef)((M,z)=>(0,n.jsx)(H.A,{...M,ref:z})),ViewColumn:(0,G.forwardRef)((M,z)=>(0,n.jsx)(K.A,{...M,ref:z}))};function ut(M,z){const lt=z.split(".");let wt=M[lt[0]];for(let bt=1;bt<lt.length;++bt){if(wt===void 0)return wt;const $t=lt[bt];wt=wt[$t]}return wt}const ct=(0,g.A)(M=>({header:{padding:M.spacing(1,2,1,2.5),borderTop:`1px solid ${M.palette.grey.A100}`,borderBottom:`1px solid ${M.palette.grey.A100}`,fontWeight:M.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(E.rV),Ct=(0,g.A)(M=>({root:{padding:M.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:M.typography.fontWeightBold}},searchField:{paddingRight:M.spacing(2)}}),{name:"BackstageTableToolbar"})(E.Nb),mt=(0,d.A)(M=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:M.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),St=(0,d.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Tt(M,z){return M.map(lt=>{const wt=lt.headerStyle??{};let bt=lt.cellStyle||{};if(lt.highlight)if(wt.color=z.palette.textContrast,typeof bt=="object")bt.fontWeight=z.typography.fontWeightBold;else{const $t=bt;bt=(Ft,Nt,zt)=>({...$t(Ft,Nt,zt),fontWeight:z.typography.fontWeightBold})}return{...lt,headerStyle:wt,cellStyle:bt}})}function at(M,z){return(0,dt.transform)(M,(lt,wt,bt)=>{(0,dt.isEqual)(wt,z[bt])||(lt[bt]=wt)})}const yt={search:"",filtersOpen:!1,filters:{}};function Et(M){const{toolbarRef:z,setSearch:lt,hasFilters:wt,selectedFiltersLength:bt,toggleFilters:$t}=M,{t:Ft}=(0,a.i)(Q.O),Nt=mt(),zt=(0,G.useCallback)(Ht=>{M.onSearchChanged(Ht),lt(Ht)},[M,lt]);return wt?(0,n.jsxs)(h.A,{className:Nt.root,children:[(0,n.jsxs)(h.A,{className:Nt.root,children:[(0,n.jsx)(C.A,{onClick:$t,"aria-label":"filter list",children:(0,n.jsx)(B.A,{})}),(0,n.jsxs)(u.A,{className:Nt.title,children:[Ft("table.filter.title")," (",bt,")"]})]}),(0,n.jsx)(Ct,{...M,ref:z,onSearchChanged:zt})]}):(0,n.jsx)(Ct,{...M,ref:z,onSearchChanged:zt})}function et(M){const{data:z,columns:lt,emptyContent:wt,options:bt,title:$t,subtitle:Ft,localization:Nt,filters:zt,initialState:Ht,onStateChange:te,components:jt,isLoading:kt,style:ee,...ge}=M,{t:Qt}=(0,a.i)(Q.O),re=St(),le=(0,f.A)(),_e={...yt,...Ht},[ne,nn]=(0,G.useState)(_e.filtersOpen),Te=(0,G.useCallback)(()=>nn(ye=>!ye),[nn]),[pe,Ge]=(0,G.useState)(_e.filters),[fe,Ye]=(0,G.useState)(_e.search);(0,G.useEffect)(()=>{if(te){const ye=at({search:fe,filtersOpen:ne,filters:pe},yt);te(ye)}},[fe,ne,pe,te]);const sn=(0,G.useCallback)(ye=>lt.find(Ke=>Ke.title===ye)?.field,[lt]),un=(0,G.useMemo)(()=>{if(typeof z=="function"||!pe)return z;const ye=Object.values(pe);return z&&ye.flat().length?z.filter(Ve=>!!Object.entries(pe).filter(([,Ze])=>!!Ze.length).every(([Ze,Be])=>{const ve=ut(Ve,sn(Ze));return Array.isArray(ve)&&Array.isArray(Be)?ve.some(w=>Be.includes(w)):Array.isArray(ve)?ve.includes(Be):Array.isArray(Be)?Be.includes(ve):ve===Be})):z},[z,pe,sn]),rn=Object.values(pe).flat().length,Qe=!!zt?.length,je=(0,G.useCallback)(ye=>(0,n.jsx)(Et,{setSearch:Ye,hasFilters:Qe,selectedFiltersLength:rn,toggleFilters:Te,...ye}),[Te,Qe,rn,Ye]),ze=typeof z!="function"&&z.length===0,He=lt.length,on=(0,G.useMemo)(()=>gt({hasNoRows:ze,emptyContent:wt,columnCount:He,loading:kt}),[ze,wt,He,kt]);return(0,n.jsxs)(h.A,{className:re.root,children:[ne&&z&&typeof z!="function"&&zt?.length&&(0,n.jsx)(vt,{filters:nt(zt,z,lt,Qt),selectedFilters:pe,onChangeFilters:Ge}),(0,n.jsx)(E.Ay,{components:{Header:ct,Body:on,Toolbar:je,...jt},options:bt,columns:Tt(lt,le),icons:It,title:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.A,{variant:"h5",component:"h2",children:$t}),Ft&&(0,n.jsx)(u.A,{color:"textSecondary",variant:"body1",children:Ft})]}),data:un,style:{width:"100%",...ee},localization:{...Nt,body:{emptyDataSourceMessage:Qt("table.body.emptyDataSourceMessage"),...Nt?.body},pagination:{firstTooltip:Qt("table.pagination.firstTooltip"),labelDisplayedRows:Qt("table.pagination.labelDisplayedRows"),labelRowsSelect:Qt("table.pagination.labelRowsSelect"),lastTooltip:Qt("table.pagination.lastTooltip"),nextTooltip:Qt("table.pagination.nextTooltip"),previousTooltip:Qt("table.pagination.previousTooltip"),...Nt?.pagination},toolbar:{searchPlaceholder:Qt("table.toolbar.search"),searchTooltip:Qt("table.toolbar.search"),...Nt?.toolbar}},...ge})]})}et.icons=Object.freeze(It);function gt({columnCount:M,emptyContent:z,hasNoRows:lt,loading:wt}){return bt=>wt?(0,n.jsx)(Ot,{colSpan:M}):z&&lt?(0,n.jsx)("tbody",{children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:M,children:z})})}):(0,n.jsx)(E.C6,{...bt})}function nt(M,z,lt,wt){const bt=Ft=>{const Nt=new Set,zt=Ht=>{Ht!=null&&Nt.add(Ht)};return z&&z.forEach(Ht=>{const te=ut(Ht,lt.find(jt=>jt.title===Ft)?.field);Array.isArray(te)?te.forEach(zt):zt(te)}),Nt},$t=Ft=>({placeholder:wt("table.filter.placeholder"),label:Ft.column,multiple:Ft.type==="multiple-select",items:[...bt(Ft.column)].sort().map(Nt=>({label:Nt,value:Nt}))});return M.map(Ft=>({type:Ft.type,element:$t(Ft)}))}},88640:(V,S,t)=>{"use strict";t.d(S,{B:()=>F});var n=t(31085),a=t(268),E=t(58837),h=t(8973),C=t(29655),g=t(91567),d=t(42899),f=t(72501),u=t(9181),y=t(6924),p=t(4650);const A=(W,J)=>(J.palette.type==="light"?a.e$:a.a)(J.palette[W].light,.6),O=(W,J)=>(J.palette.type==="light"?a.a:a.e$)(J.palette[W].light,.9),T=(0,E.A)(W=>({root:{marginRight:W.spacing(1),fill:({severity:J})=>A(J,W)}})),L=({severity:W})=>{const J=T({severity:W});return(0,n.jsx)(u.A,{classes:J})},P=({severity:W})=>{const J=T({severity:W});return(0,n.jsx)(y.A,{classes:J})},j=(0,E.A)(W=>({panel:{backgroundColor:({severity:J})=>O(J,W),color:({severity:J})=>A(J,W),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:J})=>A(J,W),fontWeight:W.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:J})=>A(J,W),backgroundColor:({severity:J})=>O(J,W)},details:{width:"100%",display:"block",color:W.palette.textContrast,backgroundColor:W.palette.background.default,border:`1px solid ${W.palette.border}`,padding:W.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),B=W=>W.charAt(0).toLocaleUpperCase("en-US")+W.slice(1);function F(W){const{severity:J="warning",title:H,titleFormat:Y,message:K,children:dt,defaultExpanded:G}=W,Q=j({severity:J}),Z=B(J)+(H?`: ${H}`:"");return(0,n.jsxs)(h.A,{defaultExpanded:G??!1,className:Q.panel,role:"alert",children:[(0,n.jsxs)(C.A,{expandIcon:(0,n.jsx)(P,{severity:J}),className:Q.summary,children:[(0,n.jsx)(L,{severity:J}),(0,n.jsx)(f.A,{className:Q.summaryText,variant:"subtitle1",children:Y==="markdown"?(0,n.jsx)(p.h,{content:Z,className:Q.markdownContent}):Z})]}),(K||dt)&&(0,n.jsx)(g.A,{children:(0,n.jsxs)(d.A,{container:!0,children:[K&&(0,n.jsx)(d.A,{item:!0,xs:12,children:(0,n.jsx)(f.A,{className:Q.message,variant:"body1",children:K})}),dt&&(0,n.jsx)(d.A,{item:!0,xs:12,className:Q.details,children:dt})]})})]})}},10795:(V,S,t)=>{"use strict";t.d(S,{l:()=>g});var n=t(72427),a=t(65461),E=t(10315),h=t(87849);const C=()=>{const{t:d}=(0,h.i)(E.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:d("supportConfig.default.title"),icon:"warning",links:[{title:d("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}};function g(){const u=(0,n.Q2)().get(a.U)?.getOptionalConfig("app.support"),y=C();return u?{url:u.getString("url"),items:u.getConfigArray("items").flatMap(p=>({title:p.getString("title"),icon:p.getOptionalString("icon"),links:(p.getOptionalConfigArray("links")??[]).flatMap(A=>({url:A.getString("url"),title:A.getOptionalString("title")??""}))}))}:y}},31129:(V,S,t)=>{"use strict";t.d(S,{Gg:()=>P,KG:()=>j,NT:()=>O,z9:()=>h});var n=t(31085),a=t(82266),E=t(27799);function h(B){const{id:F,Fallback:W=E.A,...J}=B,Y=(0,a.n)().getSystemIcon(F)??W;return(0,n.jsx)(Y,{...J})}function C(B){return _jsx(h,{id:"brokenImage",...B})}function g(B){return _jsx(h,{id:"catalog",...B})}function d(B){return _jsx(h,{id:"chat",...B})}function f(B){return _jsx(h,{id:"dashboard",...B})}function u(B){return _jsx(h,{id:"docs",...B})}function y(B){return _jsx(h,{id:"email",...B})}function p(B){return _jsx(h,{id:"github",...B})}function A(B){return _jsx(h,{id:"group",...B})}function O(B){return(0,n.jsx)(h,{id:"help",...B})}function T(B){return _jsx(h,{id:"user",...B})}function L(B){return _jsx(h,{id:"warning",...B})}function P(B){return(0,n.jsx)(h,{id:"star",...B})}function j(B){return(0,n.jsx)(h,{id:"unstarred",...B})}},26280:(V,S,t)=>{"use strict";t.d(S,{U:()=>g});var n=t(31085),a=t(58837),E=t(53373),h=t.n(E);const C=(0,a.A)(d=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:d.spacing(3),paddingBottom:d.spacing(3),paddingLeft:d.spacing(2),paddingRight:d.spacing(2),[d.breakpoints.up("sm")]:{paddingLeft:d.spacing(3),paddingRight:d.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function g(d){const{className:f,stretch:u,noPadding:y,children:p,...A}=d,O=C();return(0,n.jsx)("article",{...A,className:h()(O.root,f,{[O.stretch]:u,[O.noPadding]:y}),children:p})}},59428:(V,S,t)=>{"use strict";t.d(S,{d:()=>u});var n=t(31085),a=t(10394),E=t(58837),h=t(72501),C=t(93285);const g=y=>(0,E.A)(p=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:p.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:p.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),d=({title:y,className:p})=>(0,n.jsx)(h.A,{variant:"h4",component:"h2",className:p,"data-testid":"header-title",children:y}),f=({description:y,className:p})=>y?(0,n.jsx)(h.A,{variant:"body2",className:p,"data-testid":"header-description",children:y}):null;function u(y){const{description:p,title:A,titleComponent:O=void 0,children:T,descriptionComponent:L=void 0,textAlign:P="left"}=y,j=g({textAlign:P})(),B=O||(0,n.jsx)(d,{title:A,className:j.title}),F=L||(0,n.jsx)(f,{description:p,className:j.description});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(C.m,{title:A}),(0,n.jsxs)(a.A,{className:j.container,children:[(0,n.jsxs)(a.A,{className:j.leftItemsBox,children:[B,F]}),(0,n.jsx)(a.A,{className:j.rightItemsBox,children:T})]})]})}},12173:(V,S,t)=>{"use strict";t.d(S,{M:()=>B});var n=t(31085),a=t(42899),E=t(58837),h=t(72501),C=t(18690),g=t(72072),d=t(10795);const f=t.p+"static/mic-drop.fe3ef4d0.svg",u=(0,E.A)(F=>({micDrop:{maxWidth:"60%",bottom:F.spacing(2),right:F.spacing(2),[F.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:F.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),y=()=>{const F=u();return(0,n.jsx)("img",{src:f,className:F.micDrop,alt:"Girl dropping mic from her hands"})};var p=t(14041),A=t(77310),O=t(87849),T=t(10315);const L=(0,E.A)(F=>({title:{paddingBottom:F.spacing(5),[F.breakpoints.down("xs")]:{paddingBottom:F.spacing(4),fontSize:F.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function P(F){const{stack:W}=F,J=L(),{t:H}=(0,O.i)(T.O),[Y,K]=(0,p.useState)(!1);return Y?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.A,{variant:"h6",className:J.title,children:(0,n.jsx)(g.N_,{to:"#",onClick:()=>K(!1),children:H("errorPage.showLessDetails")})}),(0,n.jsx)(A.z,{text:W,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,n.jsx)(h.A,{variant:"h6",className:J.title,children:(0,n.jsx)(g.N_,{to:"#",onClick:()=>K(!0),children:H("errorPage.showMoreDetails")})})}const j=(0,E.A)(F=>({container:{padding:F.spacing(8),[F.breakpoints.down("xs")]:{padding:F.spacing(2)}},title:{paddingBottom:F.spacing(5),[F.breakpoints.down("xs")]:{paddingBottom:F.spacing(4),fontSize:F.typography.h3.fontSize}},subtitle:{color:F.palette.textSubtle}}),{name:"BackstageErrorPage"});function B(F){const{status:W="",statusMessage:J,additionalInfo:H,supportUrl:Y,stack:K}=F,dt=j(),G=(0,C.Zp)(),Q=(0,d.l)(),{t:Z}=(0,O.i)(T.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)(h.A,{"data-testid":"error",variant:"body1",className:dt.subtitle,children:Z("errorPage.subtitle",{status:W,statusMessage:J})}),(0,n.jsx)(h.A,{variant:"body1",className:dt.subtitle,children:H}),(0,n.jsx)(h.A,{variant:"h2",className:dt.title,children:Z("errorPage.title")}),(0,n.jsxs)(h.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)(P,{stack:K})]}),(0,n.jsx)(y,{})]})}},69814:(V,S,t)=>{"use strict";t.d(S,{Y:()=>G});var n=t(31085),a=t(72427),E=t(65461),h=t(10394),C=t(42899),g=t(58837),d=t(71677),f=t(72501),u=t(93285),y=t(72072),p=t(45634),A=t(58007),O=t(8109),T=t(55197),L=t(87051),P=t(14041);const j=(0,L.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(f.A),B=(0,L.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(h.A),F=(0,L.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(h.A);function W(Q){const{children:Z,...it}=Q,[ft,vt]=(0,P.useState)(null),xt=P.Children.toArray(Z),[Ot,It,...ut]=xt,ct=ut.length?ut.pop():xt[xt.length-1],Ct=xt.length>3,mt=at=>{vt(at.currentTarget)},St=()=>{vt(null)},Tt=!!ft;return(0,n.jsxs)(P.Fragment,{children:[(0,n.jsxs)(p.A,{"aria-label":"breadcrumb",...it,children:[xt.length>1&&(0,n.jsx)(B,{clone:!0,children:Ot}),xt.length>2&&(0,n.jsx)(B,{clone:!0,children:It}),Ct&&(0,n.jsx)(j,{onClick:mt,children:"..."}),(0,n.jsx)(F,{children:ct})]}),(0,n.jsx)(T.Ay,{open:Tt,anchorEl:ft,onClose:St,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,n.jsx)(A.A,{children:ut.map((at,yt)=>(0,n.jsx)(O.A,{button:!0,children:(0,n.jsx)(B,{clone:!0,children:at})},yt))})})]})}var J=t(73524);const H=(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:it,pageTitle:ft})=>Q?Z?(0,n.jsxs)(W,{className:it.breadcrumb,children:[(0,n.jsx)(y.N_,{to:Z,children:Q}),(0,n.jsx)(f.A,{children:ft})]}):(0,n.jsx)(f.A,{className:it.type,children:Q}):null,K=({pageTitle:Q,classes:Z,tooltip:it})=>{const{contentRef:ft}=(0,J.H)(),vt=(0,n.jsx)(f.A,{ref:ft,tabIndex:-1,className:Z.title,variant:"h1",children:Q});return it?(0,n.jsx)(d.Ay,{title:it,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:it,style:ft,subtitle:vt,title:xt,tooltip:Ot,type:It,typeLink:ut}=Q,ct=H(),mt=(0,a.gf)(E.U).getOptionalString("app.title")||"Backstage",St=it||xt,Tt=xt||it,at=`${St} | %s | ${mt}`,yt=`${St} | ${mt}`;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.m,{titleTemplate:at,defaultTitle:yt}),(0,n.jsxs)("header",{style:ft,className:ct.header,children:[(0,n.jsxs)(h.A,{className:ct.leftItemsBox,children:[(0,n.jsx)(Y,{classes:ct,type:It,typeLink:ut,pageTitle:Tt}),(0,n.jsx)(K,{classes:ct,pageTitle:Tt,tooltip:Ot}),(0,n.jsx)(dt,{classes:ct,subtitle:vt})]}),(0,n.jsx)(C.A,{container:!0,className:ct.rightItemsBox,spacing:4,children:Z})]})]})}},24504:(V,S,t)=>{"use strict";t.d(S,{Y:()=>d});var n=t(31085),a=t(58837),E=t(50868),h=t(53373),C=t.n(h);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 d(f){const{themeId:u,className:y,children:p}=f,A=g();return(0,n.jsx)(E.A,{theme:O=>({...O,page:O.getPageTheme({themeId:u})}),children:(0,n.jsx)("main",{className:C()(A.root,y),children:p})})}},27155:(V,S,t)=>{"use strict";t.d(S,{d:()=>h});var n=t(31085),a=t(69814),E=t(24504);function h(C){const{themeId:g,children:d,...f}=C;return(0,n.jsxs)(E.Y,{themeId:g,children:[(0,n.jsx)(a.Y,{...f}),d]})}},73524:(V,S,t)=>{"use strict";t.d(S,{G:()=>A,H:()=>O});var n=t(31085),a=t(10394),E=t(58837),h=t(5893),C=t(14041),g=t(72664),d=function(T){return T.SIDEBAR_PIN_STATE="sidebarPinState",T}(d||{});const f={getSidebarPinState(){let T;try{T=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!T},setSidebarPinState(T){return window.localStorage.setItem("sidebarPinState",JSON.stringify(T))}};var u=t(34435);const y=(0,E.A)(T=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[T.breakpoints.up("sm")]:{paddingLeft:L=>L.isPinned?L.sidebarConfig.drawerWidthOpen:L.sidebarConfig.drawerWidthClosed},[T.breakpoints.down("xs")]:{paddingBottom:L=>L.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),p=(0,C.createContext)({content:{contentRef:void 0}});function A(T){const[L,P]=(0,C.useState)(()=>f.getSidebarPinState()),{sidebarConfig:j}=(0,C.useContext)(g.yY),B=(0,C.useRef)(null),F=(0,C.useMemo)(()=>({content:{contentRef:B}}),[B]);(0,C.useEffect)(()=>{f.setSidebarPinState(L)},[L]);const W=(0,h.A)(Y=>Y.breakpoints.down("xs"),{noSsr:!0}),J=()=>P(!L),H=y({isPinned:L,sidebarConfig:j});return(0,n.jsx)(u.qj,{value:{isPinned:L,toggleSidebarPinState:J,isMobile:W},children:(0,n.jsx)(p.Provider,{value:F,children:(0,n.jsx)(a.A,{className:H.root,children:T.children})})})}function O(){const{content:T}=(0,C.useContext)(p);return{focusContent:(0,C.useCallback)(()=>{T?.contentRef?.current?.focus()},[T]),contentRef:T?.contentRef}}},34435:(V,S,t)=>{"use strict";t.d(S,{Ut:()=>u,qj:()=>f});var n=t(31085),a=t(43836),E=t(10602),h=t(14041);const C={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},g=(0,h.createContext)(C),d=(0,a.tK)("sidebar-pin-state-context");function f(y){const{children:p,value:A}=y;return(0,n.jsx)(g.Provider,{value:A,children:(0,n.jsx)(d.Provider,{value:(0,E.B)({1:A}),children:p})})}const u=()=>{const y=(0,h.useContext)(d),p=(0,h.useContext)(g);if(y===void 0)return p||C;const A=y.atVersion(1);if(A===void 0)throw new Error("No context found for version 1.");return A}},72664:(V,S,t)=>{"use strict";t.d(S,{Rv:()=>g,U1:()=>p,hC:()=>C,i8:()=>f,yY:()=>y});var n=t(14041);const a=72,E=24,h=18,C={drawerWidthClosed:a,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:a,iconSize:a-E*2,iconPadding:E,selectedIndicatorWidth:3,userBadgePadding:h,userBadgeDiameter:a-h*2,mobileSidebarHeight:56},g=A=>({...C,...A,iconContainerWidth:C.drawerWidthClosed,iconSize:C.drawerWidthClosed-C.iconPadding*2,userBadgeDiameter:C.drawerWidthClosed-C.userBadgePadding*2}),d={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:C.defaultOpenDelayMs+200},f=A=>({...d,...A}),u="@backstage/core/sidebar-intro-dismissed",y=(0,n.createContext)({sidebarConfig:C,submenuConfig:d}),p=(0,n.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:(V,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:(V,S,t)=>{"use strict";t.d(S,{Ig:()=>d,pn:()=>g});var n=t(31085),a=t(43836),E=t(10602),h=t(14041);const C=(0,a.tK)("analytics-context"),g=()=>{const u=(0,h.useContext)(C);if(u===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const y=u.atVersion(1);if(y===void 0)throw new Error("No context found for version 1.");return y},d=u=>{const{attributes:y,children:p}=u,O={...g(),...y},T=(0,E.B)({1:O});return(0,n.jsx)(C.Provider,{value:T,children:p})};function f(u,y){const p=A=>_jsx(d,{attributes:y,children:_jsx(u,{...A})});return p.displayName=`WithAnalyticsContext(${u.displayName||u.name||"Component"})`,p}},67237:(V,S,t)=>{"use strict";t.d(S,{J:()=>h,t:()=>E});var n=t(63544);const a=(0,n.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),E="_ROUTABLE-EXTENSION-RENDERED";class h{analyticsApi;context;constructor(g,d={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=g,this.context=d,a.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{a.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender}),a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),a.beforeUnloadRegistered=!0)}setContext(g){this.context=g}captureEvent(g,d,{value:f,attributes:u}={}){const{_routeNodeType:y,...p}=this.context;if(g===E){a.mostRecentGatheredNavigation&&(a.mostRecentRoutableExtensionRender={context:{...p,extension:"App"}});return}if(a.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender})}catch(A){console.warn("Error during analytics event capture. %o",A)}a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0}if(g==="navigate"&&y==="gathered"&&p.pluginId==="root"){a.mostRecentGatheredNavigation={action:g,subject:d,value:f,attributes:u,context:p};return}try{this.analyticsApi.captureEvent({action:g,subject:d,value:f,attributes:u,context:p})}catch(A){console.warn("Error during analytics event capture. %o",A)}}}},93368:(V,S,t)=>{"use strict";t.d(S,{s:()=>d});var n=t(25862),a=t(72427),E=t(99303),h=t(14041),C=t(67237);function g(){try{return(0,a.gf)(E.c)}catch{return{captureEvent:()=>{}}}}function d(){const f=(0,h.useRef)(null),u=(0,n.pn)(),y=g();function p(){return f.current===null&&(f.current=new C.J(y)),f.current}const A=p();return A.setContext(u),A}},36017:(V,S,t)=>{"use strict";t.d(S,{k:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.alert"})},99303:(V,S,t)=>{"use strict";t.d(S,{c:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.analytics"})},65461:(V,S,t)=>{"use strict";t.d(S,{U:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.config"})},57405:(V,S,t)=>{"use strict";t.d(S,{I:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.discovery"})},39837:(V,S,t)=>{"use strict";t.d(S,{m:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.error"})},63636:(V,S,t)=>{"use strict";t.d(S,{B:()=>E,S:()=>a});var n=t(55309),a=function(h){return h[h.None=0]="None",h[h.Active=1]="Active",h}({});const E=(0,n.y)({id:"core.featureflags"})},70795:(V,S,t)=>{"use strict";t.d(S,{a:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.fetch"})},16009:(V,S,t)=>{"use strict";t.d(S,{K:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.identity"})},56038:(V,S,t)=>{"use strict";t.d(S,{J:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.translation"})},55309:(V,S,t)=>{"use strict";t.d(S,{y:()=>a});class n{config;constructor(h){if(this.config=h,!h.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 '${h.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(E){return new n(E)}},12935:(V,S,t)=>{"use strict";t.d(S,{b:()=>n});function n(a,E){return"id"in a?{api:a,deps:{},factory:()=>E}:a}},72427:(V,S,t)=>{"use strict";t.d(S,{Q2:()=>h,gf:()=>C});var n=t(31085),a=t(43836),E=t(97142);function h(){const d=(0,a.qO)("api-context");if(!d)throw new E.EH("API context is not available");const f=d.atVersion(1);if(!f)throw new E.EH("ApiContext v1 not available");return f}function C(d){const u=h().get(d);if(!u)throw new E.EH(`No implementation available for ${d}`);return u}function g(d){return function(u){const y=A=>{const O=h(),T={};for(const L in d)if(d.hasOwnProperty(L)){const P=d[L],j=O.get(P);if(!j)throw new NotImplementedError(`No implementation available for ${P}`);T[L]=j}return _jsx(u,{...A,...T})},p=u.displayName||u.name||"Component";return y.displayName=`withApis(${p})`,y}}},82266:(V,S,t)=>{"use strict";t.d(S,{n:()=>a});var n=t(43836);const a=()=>{const E=(0,n.qO)("app-context");if(!E)throw new Error("App context is not available");const h=E.atVersion(1);if(!h)throw new Error("AppContext v1 not available");return h}},19402:(V,S,t)=>{"use strict";t.d(S,{E:()=>C,h:()=>h});var n=t(63544);const a=(0,n.Q)("component-data-store",()=>new WeakMap),E="__backstage_data";function h(g,d,f){const u=g;let y=u[E]??a.get(g);if(y||(y={map:new Map},Object.defineProperty(u,E,{enumerable:!1,configurable:!0,writable:!1,value:y}),a.set(g,y)),y.map.has(d)){const p=g.displayName||g.name;throw new Error(`Attempted to attach duplicate data "${d}" to component "${p}"`)}y.map.set(d,f)}function C(g,d){if(!g)return;const f=g.type;if(!f)return;const u=f[E]??a.get(f);if(u)return u.map.get(d)}},88758:(V,S,t)=>{"use strict";t.d(S,{NC:()=>A,zZ:()=>O,QJ:()=>p});var n=t(31085),a=t(14041),E=t(93368),h=t(25862),C=t(82266),g=t(9222),d=t(19402);class f extends a.Component{static getDerivedStateFromError(L){return{error:L}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:L}=this.state,{app:P,plugin:j}=this.props,{ErrorBoundaryFallback:B}=P.getComponents();return L?(0,n.jsx)(B,{error:L,resetError:this.handleErrorReset,plugin:j}):this.props.children}}var u=t(67237),y=t(97142);function p(T){const{component:L,mountPoint:P,name:j}=T;return O({component:{lazy:()=>L().then(B=>{const F=J=>{const H=(0,E.s)();try{(0,g.S)(P)}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 ${P} 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)(()=>{H.captureEvent(u.t,"")},[H]),(0,n.jsx)(B,{...J})},W=j||B.displayName||B.name||"LazyComponent";return F.displayName=`RoutableExtension(${W})`,F})},data:{"core.mountPoint":P},name:j})}function A(T){const{component:L,name:P}=T;return O({component:L,name:P})}function O(T){const{data:L={},name:P}=T;P||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let j;if("lazy"in T.component){const F=T.component.lazy;j=(0,a.lazy)(()=>F().then(W=>({default:W}),W=>{const J=P?` of the ${P} extension`:"";throw new y.HK(`Failed lazy loading${J}, try to reload the page`,W)}))}else j=T.component.sync;const B=P||j.displayName||j.name||"Component";return{expose(F){const W=J=>{const H=(0,C.n)(),{Progress:Y}=H.getComponents(),K=L?.["core.mountPoint"];return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(Y,{}),children:(0,n.jsx)(f,{app:H,plugin:F,children:(0,n.jsx)(h.Ig,{attributes:{pluginId:F.getId(),...P&&{extension:P},...K&&{routeRef:K.id}},children:(0,n.jsx)(j,{...J})})})})};(0,d.h)(W,"core.plugin",F),(0,d.h)(W,"core.extensionName",P);for(const[J,H]of Object.entries(L))(0,d.h)(W,J,H);return W.displayName=`Extension(${B})`,W}}}},82442:(V,S,t)=>{"use strict";t.d(S,{O:()=>d});var n=t(14041),a=t(19402),E=t(72427),h=t(63636);function C(f,u,y,p){return n.Children.toArray(f).flatMap(A=>{if(!(0,n.isValidElement)(A))return[];if(A.type===n.Fragment)return C(A.props.children,u,y,p);if((0,a.E)(A,"core.featureFlagged")){const O=A.props;return("with"in O?u.isActive(O.with):!u.isActive(O.without))?C(A.props.children,u,y,p):[]}if(y===void 0||y(A))return[A];if(p)throw new Error(p);return C(A.props.children,u,y,p)})}class g{node;featureFlagsApi;constructor(u,y){this.node=u,this.featureFlagsApi=y}selectByComponentData(u){const y=C(this.node,this.featureFlagsApi,p=>(0,a.E)(p,u.key)!==void 0,u.withStrictError);return new g(y,this.featureFlagsApi)}findComponentData(u){return C(this.node,this.featureFlagsApi,p=>(0,a.E)(p,u.key)!==void 0).map(p=>(0,a.E)(p,u.key)).filter(p=>p!==void 0)}getElements(){return C(this.node,this.featureFlagsApi)}}function d(f,u,y=[]){const p=(0,E.gf)(h.B),A=new g(f,p);return(0,n.useMemo)(()=>u(A),[f,...y])}},9803:(V,S,t)=>{"use strict";t.d(S,{i:()=>a});class n{config;constructor(h){this.config=h}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(h){return h.expose(this)}toString(){return`plugin{${this.config.id}}`}}function a(E){return new n(E)}},34569:(V,S,t)=>{"use strict";t.d(S,{H:()=>E});var n=t(59598);class a{id;params;[h=n.b];constructor(g,d){this.id=g,this.params=d,this[h]="absolute"}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function E(C){return new a(C.id,C.params??[])}var h},59598:(V,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:(V,S,t)=>{"use strict";t.d(S,{S:()=>h});var n=t(14041),a=t(18690),E=t(43836);function h(C){const{pathname:g}=(0,a.zy)(),d=(0,E.qO)("routing-context");if(!d)throw new Error("Routing context is not available");const f=d.atVersion(1),u=(0,n.useMemo)(()=>f&&f.resolve(C,{pathname:g}),[f,C,g]);if(!d)throw new Error("useRouteRef used outside of routing context");if(!f)throw new Error("RoutingContext v1 not available");const y="optional"in C&&C.optional;if(!u&&!y)throw new Error(`No path for ${C}`);return u}},93184:(V,S,t)=>{"use strict";t.d(S,{h:()=>h,v:()=>C});var n=t(99833);function a(g){const d=new Array;function f(u,y){for(const[p,A]of Object.entries(u))typeof A=="string"?d.push([y+p,A]):f(A,`${y}${p}.`)}return f(g,""),Object.fromEntries(d)}class E{#t;#e;#n;constructor(d){this.#t=d.id,this.#e=a(d.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#t}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#e}setDefaultResource(d){this.#n=d}getDefaultResource(){return this.#n}toString(){return`TranslationRef{id=${this.id}}`}}function h(g){const d=new E(g);return g.translations&&d.setDefaultResource((0,n.o)({ref:d,translations:g.translations})),d}function C(g){const d=g;if(d.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${d.$$type}'`);if(d.version!=="v1")throw new Error(`Invalid translation ref, bad version '${d.version}'`);return d}},99833:(V,S,t)=>{"use strict";t.d(S,{Y:()=>n,o:()=>a});function n(E){const h=E;if(h.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${h.$$type}'`);if(h.version!=="v1")throw new Error(`Invalid translation resource, bad version '${h.version}'`);return h}function a(E){return{$$type:"@backstage/TranslationResource",version:"v1",id:E.ref.id,resources:Object.entries(E.translations).map(([h,C])=>({language:h,loader:()=>C().then(g=>{const d=g.default;return{messages:d?.$$type==="@backstage/TranslationMessages"?d.messages:d}})}))}}},87849:(V,S,t)=>{"use strict";t.d(S,{i:()=>g});var n=t(14041),a=t(72427),E=t(39837),h=t(56038);const C=new WeakSet,g=d=>{const f=(0,a.gf)(E.m),u=(0,a.gf)(h.J),[y,p]=(0,n.useState)(()=>u.getTranslation(d)),A=(0,n.useMemo)(()=>u.translation$(d),[u,d]),O=(0,n.useCallback)(L=>{if(!C.has(d)){const P=`Failed to load translation resource '${d.id}'; caused by ${L}`;console.error(P),f.post(new Error(P)),C.add(d)}},[f,d]);(0,n.useEffect)(()=>{const L=A.subscribe({next(P){P.ready&&p(P)},error(P){O(P)}});return()=>{L.unsubscribe()}},[A,O]);const T=(0,n.useRef)(!0);if((0,n.useEffect)(()=>{T.current?T.current=!1:p(u.getTranslation(d))},[u,d]),!y.ready)throw new Promise(L=>{const P=A.subscribe({next(j){j.ready&&(P.unsubscribe(),L())},error(j){P.unsubscribe(),O(j),L()}})});return{t:y.t}}},70835:(V,S,t)=>{"use strict";t.d(S,{o:()=>E});var n=t(59750);async function a(h){try{const C=await h.text();if(C){if(h.headers.get("content-type")?.startsWith("application/json"))try{const g=JSON.parse(C);if(g.error&&g.response)return g}catch{}return{error:{name:"Error",message:`Request failed with status ${h.status} ${h.statusText}, ${C}`},response:{statusCode:h.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${h.status} ${h.statusText}`},response:{statusCode:h.status}}}class E extends Error{response;body;cause;statusCode;statusText;static async fromResponse(C){const g=await a(C),d=g.response.statusCode||C.status,f=C.statusText,u=`Request failed with ${d} ${f}`,y=(0,n.cy)(g.error);return new E({message:u,response:C,data:g,cause:y,statusCode:d,statusText:f})}constructor(C){super(C.message),this.name="ResponseError",this.response=C.response,this.body=C.data,this.cause=C.cause,this.statusCode=C.statusCode,this.statusText=C.statusText}}},93007:(V,S,t)=>{"use strict";t.d(S,{b:()=>n});function n(E){if(typeof E!="object"||E===null||Array.isArray(E))return!1;const h=E;return!(typeof h.name!="string"||h.name===""||typeof h.message!="string")}function a(E){if(typeof E!="object"||E===null||Array.isArray(E))throw new Error(`Encountered invalid error, not an object, got '${E}'`);const h=E;if(typeof h.name!="string"||h.name==="")throw new Error(`Encountered error object without a name, got '${E}'`);if(typeof h.message!="string")throw new Error(`Encountered error object without a message, got '${E}'`)}},97142:(V,S,t)=>{"use strict";t.d(S,{HK:()=>A,m_:()=>d,EH:()=>y});var n=t(93007),a=t(59750);class E extends Error{cause;constructor(T,L){let P=T;if(L!==void 0){const j=(0,a.M5)(L);P?P+=`; caused by ${j}`:P=`caused by ${j}`}super(P),Error.captureStackTrace?.(this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,n.b)(L)?L:void 0}}class h extends null{name="InputError"}class C extends null{name="AuthenticationError"}class g extends null{name="NotAllowedError"}class d extends E{name="NotFoundError"}class f extends null{name="ConflictError"}class u extends null{name="NotModifiedError"}class y extends E{name="NotImplementedError"}class p extends null{}class A extends E{constructor(T,L){super(T,L),this.name=(0,n.b)(L)?L.name:"Error"}}},59750:(V,S,t)=>{"use strict";t.d(S,{M5:()=>g,cy:()=>C});var n=t(69655),a=t.n(n),E=t(93007);function h(d,f){const y={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(d)};return f?.includeStack||(delete y.stack,y.cause&&typeof y.cause=="object"&&"stack"in y.cause&&delete y.cause.stack),y}function C(d){const f=(0,n.deserializeError)(d);return d.stack||(f.stack=void 0),f}function g(d){if((0,E.b)(d)){const f=String(d);return f!=="[object Object]"?f:`${d.name}: ${d.message}`}return`unknown error '${d}'`}},96726:(V,S,t)=>{"use strict";t.d(S,{L:()=>Be,Y:()=>ve});var n=t(59869);const a="amazonaws.com";function E(w){const l=w.getOptionalString("endpoint"),v=w.getOptionalBoolean("s3ForcePathStyle")??!1;let R,tt;if(l){try{const Vt=new URL(l);R=Vt.host,tt=Vt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${l}' is not a valid URL`)}if(tt!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${l}'`)}else R=a;const X=w.getOptionalString("accessKeyId"),st=w.getOptionalString("secretAccessKey")?.trim(),Rt=w.getOptionalString("roleArn"),Wt=w.getOptionalString("externalId");return{host:R,endpoint:l,s3ForcePathStyle:v,accessKeyId:X,secretAccessKey:st,roleArn:Rt,externalId:Wt}}function h(w){const l=w.map(E);return l.some(v=>v.host===a)||l.push({host:a}),l}class C{integrationConfig;static factory=({config:l})=>{const v=h(l.getOptionalConfigArray("integrations.awsS3")??[]);return(0,n.oS)(v.map(R=>new C(R)),R=>R.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 d(w){const l=w.getOptionalString("accessKeyId"),v=w.getOptionalString("secretAccessKey")?.trim(),R=w.getOptionalString("roleArn"),tt=w.getOptionalString("externalId"),X=w.getString("region");return{host:w.getOptionalString("host")||`${X}.${g}`,accessKeyId:l,secretAccessKey:v,roleArn:R,externalId:tt,region:X}}function f(w){return w.map(d)}class u{integrationConfig;static factory=({config:l})=>{const v=f(l.getOptionalConfigArray("integrations.awsCodeCommit")??[]);return(0,n.oS)(v.map(R=>new u(R)),R=>R.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 R=new URL(l).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!R)throw new Error("");const[,tt]=R;return y(l,tt,"edit")}}function y(w,l,v){const R=v==="edit"?"files/edit":v;return w.replace(new RegExp(`/codesuite/codecommit/repositories/${l}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${l}/${R}/`)}const p="GB";class A{static fromRepoUrl(l){const v=new URL(l);let R,tt,X;const st=v.pathname.split("/").map(se=>decodeURIComponent(se));if(st[2]==="_git"?(R=st[1],tt=X=st[3]):st[3]==="_git"?(R=st[1],tt=st[2],X=st[4]):st[4]==="_git"&&(R=`${st[1]}/${st[2]}`,tt=st[3],X=st[5]),!R||!tt||!X)throw new Error("Azure URL must point to a git repository");const Rt=v.searchParams.get("path")??void 0;let Wt;const Vt=v.searchParams.get("version");if(Vt){if(Vt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Wt=Vt.slice(2)}return new A(v.origin,R,tt,X,Rt,Wt)}#t;#e;#n;#s;#r;#o;constructor(l,v,R,tt,X,st){this.#t=l,this.#e=v,this.#n=R,this.#s=tt,this.#r=X,this.#o=st}#a=(...l)=>{const v=new URL(this.#t);return v.pathname=l.map(R=>encodeURIComponent(R)).join("/"),v};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",p+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",T=["clientId","clientSecret","tenantId","personalAccessToken"],L=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function P(w){for(const l of L.entries()){const[v,R]=l,tt=T.filter(X=>!R.includes(X));if(R.every(X=>w[X]!==void 0)&&tt.every(X=>w[X]===void 0))return{kind:v,organizations:w.organizations,...R.reduce((X,st)=>(X[st]=w[st],X),{})}}throw new Error("is not a valid credential")}function j(w){const l=w.getOptionalString("host")??O;let v=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 R=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(R!==void 0){const X=[{personalAccessToken:R}];v=v?.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()}];v=v?.concat(X)??X}if(!(0,n.HO)(l))throw new Error(`Invalid Azure integration config, '${l}' is not a valid host`);let tt;if(v!==void 0){const X=v?.reduce((st,Rt,Wt)=>{let Vt;try{P(Rt)}catch(se){Vt=se.message}return Vt!==void 0&&st.push(`credential at position ${Wt+1} ${Vt}`),st},Array.of()).concat(Object.entries(v.filter(st=>st.organizations!==void 0&&st.organizations.length>0).reduce((st,Rt,Wt)=>(Rt.organizations?.forEach(Vt=>{st[Vt]||(st[Vt]=[]),st[Vt].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(tt=v.map(st=>P(st)),tt.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(tt.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:tt,commitSigningKey:w.getOptionalString("commitSigningKey")}}function B(w){const l=w.map(j);return l.some(v=>v.host===O)||l.push({host:O}),l}class F{integrationConfig;static factory=({config:l})=>{const v=B(l.getOptionalConfigArray("integrations.azure")??[]);return(0,n.oS)(v.map(R=>new F(R)),R=>R.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:v,base:R}=l;if((0,n.AY)(v))return v;try{const tt=A.fromRepoUrl(R),X=new URL(R),st=new URL(`https://a.com${tt.getPath()??""}`),Rt=new URL(v,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(v,R).toString()}}resolveEditUrl(l){return l}}var W=t(52536),J=t.n(W);const H="bitbucket.org",Y="https://api.bitbucket.org/2.0";function K(w){const l=H,v=Y,R=w.getString("username"),tt=w.getString("appPassword")?.trim();return{host:l,apiBaseUrl:v,username:R,appPassword:tt,commitSigningKey:w.getOptionalString("commitSigningKey")}}function dt(w){const l=w.map(K);return l.length===0&&l.push({host:H,apiBaseUrl:Y}),l}class G{integrationConfig;static factory=({config:l})=>{const v=dt(l.getOptionalConfigArray("integrations.bitbucketCloud")??[]);return(0,n.oS)(v.map(R=>new G(R)),R=>R.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 v=(0,n.ku)(l);if(l.lineNumber){const R=new URL(v);return R.hash=`lines-${l.lineNumber}`,R.toString()}return v}resolveEditUrl(l){const v=J()(l),R=new URL(l);return R.searchParams.set("mode","edit"),R.searchParams.set("at",v.ref),R.toString()}}var Q=t(45250);const Z="bitbucket.org",it="https://api.bitbucket.org/2.0";function ft(w){const l=w.getOptionalString("host")??Z;let v=w.getOptionalString("apiBaseUrl");const R=w.getOptionalString("token")?.trim(),tt=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 v?v=(0,Q.trimEnd)(v,"/"):l===Z?v=it:v=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:v,token:R,username:tt,appPassword:X,commitSigningKey:w.getOptionalString("commitSigningKey")}}function vt(w){const l=w.map(ft);return l.some(v=>v.host===Z)||l.push({host:Z,apiBaseUrl:it}),l}class xt{integrationConfig;static factory=({config:l})=>{const v=vt(l.getOptionalConfigArray("integrations.bitbucket")??[...l.getOptionalConfigArray("integrations.bitbucketCloud")??[],...l.getOptionalConfigArray("integrations.bitbucketServer")??[]]);return(0,n.oS)(v.map(R=>new xt(R)),R=>R.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 v=(0,n.ku)(l);if(!l.lineNumber)return v;const R=new URL(v);return this.integrationConfig.host==="bitbucket.org"?R.hash=`lines-${l.lineNumber}`:R.hash=`${l.lineNumber}`,R.toString()}resolveEditUrl(l){const v=J()(l),R=new URL(l);return R.searchParams.set("mode","edit"),R.searchParams.set("spa","0"),R.searchParams.set("at",v.ref),R.toString()}}function Ot(w){const l=w.getString("host");let v=w.getOptionalString("apiBaseUrl");const R=w.getOptionalString("token")?.trim(),tt=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 v?v=(0,Q.trimEnd)(v,"/"):v=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:v,token:R,username:tt,password:X,commitSigningKey:w.getOptionalString("commitSigningKey")}}function It(w){return w.map(Ot)}class ut{integrationConfig;static factory=({config:l})=>{const v=It(l.getOptionalConfigArray("integrations.bitbucketServer")??[]);return(0,n.oS)(v.map(R=>new ut(R)),R=>R.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 v=(0,n.ku)(l);if(l.lineNumber){const R=new URL(v);return R.hash=l.lineNumber.toString(),R.toString()}return v}resolveEditUrl(l){return l.includes("?")?l.substring(0,l.indexOf("?")):l}}function ct(w){const l=w.getString("host");let v=w.getOptionalString("baseUrl"),R=w.getOptionalString("cloneUrl"),tt=w.getString("gitilesBaseUrl");const X=w.getOptionalString("username"),st=w.getOptionalString("password")?.trim();if((0,n.HO)(l)){if(v&&!(0,n.AY)(v))throw new Error(`Invalid Gerrit integration config, '${v}' is not a valid baseUrl`);if(R&&!(0,n.AY)(R))throw new Error(`Invalid Gerrit integration config, '${R}' is not a valid cloneUrl`);if(!(0,n.AY)(tt))throw new Error(`Invalid Gerrit integration config, '${tt}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${l}' is not a valid host`);return v?v=(0,Q.trimEnd)(v,"/"):v=`https://${l}`,tt?tt=(0,Q.trimEnd)(tt,"/"):tt=`https://${l}`,R?R=(0,Q.trimEnd)(R,"/"):R=v,{host:l,baseUrl:v,cloneUrl:R,gitilesBaseUrl:tt,username:X,password:st,commitSigningKey:w.getOptionalString("commitSigningKey")}}function Ct(w){return w.map(ct)}var mt=t(1048).hp;const St=")]}'";function Tt(w,l){const v=new URL(w.gitilesBaseUrl),R=new URL(l),X=R.pathname.substring(R.pathname.startsWith("/a/")?2:0).replace(v.pathname,"").split("/").filter(Ue=>!!Ue),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 Vt=X[Wt+1],se=X.slice(Wt+2).join("/");return{branch:Vt,filePath:se===""?"/":se,project:Rt}}function at(w,l){const v=new URL(w.gitilesBaseUrl),R=new URL(l),X=(0,Q.trimStart)(R.pathname.substring(R.pathname.startsWith("/a/")?2:0).replace(v.pathname,""),"/").split("/").filter(Gt=>!!Gt),st=(0,Q.takeWhile)(X,Gt=>Gt!=="+");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 Gt=Rt.shift(),ue=(0,Q.join)(Rt,"/");return{project:Wt,ref:Gt,refType:"head",path:ue||"/",basePath:(0,Q.trimEnd)(l.replace(ue,""),"/")}}if(Rt.length>0&&Rt[0].length===40){const Gt=Rt.shift(),ue=(0,Q.join)(Rt,"/");return{project:Wt,ref:Gt,refType:"sha",path:ue||"/",basePath:(0,Q.trimEnd)(l.replace(ue,""),"/")}}const Vt=(0,Q.join)(Rt,"/"),Ue=/^refs\/(?<refsReference>heads|tags)\/(?<ref>.*?)(\/|$)/.exec(Vt);if(Ue){const Gt=Ue[0];let ue;const{refsReference:oe,ref:$e}=Ue.groups||{},De=Vt.replace(Gt,"");switch(oe){case"heads":ue="branch";break;case"tags":ue="tag";break;default:throw new Error(`Unable to parse gitiles url: ${l}`)}return{project:Wt,ref:$e,refType:ue,path:De||"/",basePath:(0,Q.trimEnd)(l.replace(De,""),"/")}}throw new Error(`Unable to parse gitiles : ${l}`)}function yt(w,l,v,R){return`${w.gitilesBaseUrl}/${l}/+/refs/heads/${v}/${trimStart(R,"/")}`}function Et(w,l,v,R){const tt=R==="/"||R===""?".tar.gz":`/${R}.tar.gz`;return`${nt(w)}/${l}/+archive/refs/heads/${v}${tt}`}function et(w,l){const{path:v,ref:R,project:tt,refType:X}=at(w,l),st=v==="/"||v===""?".tar.gz":`/${v}.tar.gz`;if(X==="branch")return`${nt(w)}/${tt}/+archive/refs/heads/${R}${st}`;if(X==="sha")return`${nt(w)}/${tt}/+archive/${R}${st}`;throw new Error(`Unsupported gitiles ref type: ${X}`)}function gt(w){return w.password?"/a/":"/"}function nt(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(gt(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 M(w,l){const{branch:v,project:R}=Tt(w,l);return`${w.baseUrl}${gt(w)}projects/${encodeURIComponent(R)}/branches/${v}`}function z(w,l){const{project:v}=Tt(w,l);return`${w.cloneUrl}${gt(w)}${v}`}function lt(w,l){const{ref:v,refType:R,path:tt,project:X}=at(w,l);if(R==="branch")return`${w.baseUrl}${gt(w)}projects/${encodeURIComponent(X)}/branches/${v}/files/${encodeURIComponent(tt)}/content`;if(R==="sha")return`${w.baseUrl}${gt(w)}projects/${encodeURIComponent(X)}/commits/${v}/files/${encodeURIComponent(tt)}/content`;throw new Error(`Unsupported gitiles ref type: ${R}`)}function wt(w){return`${w.baseUrl}${gt(w)}projects/`}function bt(w){const l={};if(!w.password)return l;const v=mt.from(`${w.username}:${w.password}`,"utf8");return l.Authorization=`Basic ${v.toString("base64")}`,{headers:l}}async function $t(w){const l=await w.text();if(l.startsWith(St))try{return JSON.parse(l.slice(St.length))}catch(v){throw new Error(`Invalid response from Gerrit: ${l.slice(0,10)} - ${v}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${l.slice(0,10)}`)}class Ft{integrationConfig;static factory=({config:l})=>{const v=Ct(l.getOptionalConfigArray("integrations.gerrit")??[]);return(0,n.oS)(v.map(R=>new Ft(R)),R=>R.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:v,base:R,lineNumber:tt}=l;let X;if(v.startsWith("/")){const{basePath:st}=at(this.config,R);return st+v}return v?X=new URL(v,R):X=new URL(R),tt&&(X.hash=tt.toString()),X.toString()}resolveEditUrl(l){return l}}var Nt=t(36021);const zt="gitlab.com",Ht="https://gitlab.com/api/v4";function te(w){const l=w.getString("host");let v=w.getOptionalString("apiBaseUrl");const R=w.getOptionalString("token")?.trim();let tt=w.getOptionalString("baseUrl");if(v?v=(0,Q.trimEnd)(v,"/"):l===zt&&(v=Ht),tt?tt=(0,Q.trimEnd)(tt,"/"):tt=`https://${l}`,(0,n.HO)(l)){if(!v||!(0,n.AY)(v))throw new Error(`Invalid GitLab integration config, '${v}' is not a valid apiBaseUrl`);if(!(0,n.AY)(tt))throw new Error(`Invalid GitLab integration config, '${tt}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${l}' is not a valid host`);return{host:l,token:R,apiBaseUrl:v,baseUrl:tt,commitSigningKey:w.getOptionalString("commitSigningKey")}}function jt(w){const l=w.map(te);return l.some(v=>v.host===zt)||l.push({host:zt,apiBaseUrl:Ht,baseUrl:`https://${zt}`}),l}function kt(w){let l="";return w.host!==zt&&(l=new URL(w.baseUrl).pathname),trimEnd(l,"/")}class ee{integrationConfig;static factory=({config:l})=>{const v=jt(l.getOptionalConfigArray("integrations.gitlab")??[]);return(0,n.oS)(v.map(R=>new ee(R)),R=>R.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 Qt(w){const l=w.getString("host");let v=w.getOptionalString("baseUrl");const R=w.getOptionalString("username"),tt=w.getOptionalString("password")?.trim();if((0,n.HO)(l)){if(v&&!(0,n.AY)(v))throw new Error(`Invalid Gitea integration config, '${v}' is not a valid baseUrl`)}else throw new Error(`Invalid Gitea integration config, '${l}' is not a valid host`);return v?v=(0,Q.trimEnd)(v,"/"):v=`https://${l}`,{host:l,baseUrl:v,username:R,password:tt,commitSigningKey:w.getOptionalString("commitSigningKey")}}var re=t(1048).hp;function le(w,l){const v=pe(w,l);return`${v.url}/${v.owner}/${v.name}/_edit/${v.ref}/${v.path}`}function _e(w,l){const v=pe(w,l);return`${v.url}/api/v1/repos/${v.owner}/${v.name}/contents/${v.path}?ref=${v.ref}`}function ne(w,l){const v=pe(w,l);return`${v.url}/api/v1/repos/${v.owner}/${v.name}/archive/${v.ref}.tar.gz`}function nn(w,l){const v=pe(w,l);return`${v.url}/api/v1/repos/${v.owner}/${v.name}/git/commits/${v.ref}`}function Te(w){const l={},{username:v,password:R}=w;return R?(v?l.Authorization=`basic ${re.from(`${v}:${R}`).toString("base64")}`:l.Authorization=`token ${R}`,{headers:l}):l}function pe(w,l){const v=w.baseUrl??`https://${w.host}`;try{const[R,tt,X,st,Rt,Wt,...Vt]=l.replace(v,"").split("/"),se=Vt.join("/").replace(/^\//,"");return{url:v,owner:tt,name:X,ref:Wt,path:se}}catch(R){throw new Error(`Incorrect URL: ${l}, ${R}`)}}class Ge{config;static factory=({config:l})=>{const R=(l.getOptionalConfigArray("integrations.gitea")??[]).map(tt=>Qt(tt));return(0,n.oS)(R.map(tt=>new Ge(tt)),tt=>tt.config.host)};constructor(l){this.config=l}get type(){return"gitea"}get title(){return this.config.host}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return le(this.config,l)}}function fe(w){const l=w.getString("host"),v=w.getOptionalString("token"),R=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:R,token:v}}function Ye(w,l){const v=je(w,l);return`${v.baseUrl}/ng/account/${v.accountId}/module/code${v.orgName!==""?`/orgs/${v.orgName}`:""}${v.projectName!==""?`/projects/${v.projectName}`:""}/repos/${v.repoName}/files/${v.branch}/~/${v.path}`}function sn(w,l){const v=je(w,l);let R=`${v.baseUrl}/gateway/code/api/v1/repos/${v.accountId}`;return v.orgName&&(R+=`/${v.orgName}`),v.projectName&&(R+=`/${v.projectName}`),R+=`/${v.repoName}/+/raw/${v.path}?routingId=${v.accountId}&git_ref=refs/heads/${v.refString}`,R}function un(w,l){const v=je(w,l);let R=`${v.baseUrl}/gateway/code/api/v1/repos/${v.accountId}`;return v.orgName&&(R+=`/${v.orgName}`),v.projectName&&(R+=`/${v.projectName}`),R+=`/${v.repoName}/+/archive/${v.branch}.zip?routingId=${v.accountId}`,R}function rn(w,l){const v=je(w,l);let R=`${v.baseUrl}/gateway/code/api/v1/repos/${v.accountId}`;return v.orgName&&(R+=`/${v.orgName}`),v.projectName&&(R+=`/${v.projectName}`),R+=`/${v.repoName}/+/content?routingId=${v.accountId}&include_commit=true&git_ref=refs/heads/${v.branch}`,R}function Qe(w){const l={},{token:v,apiKey:R}=w;return R?l["x-api-key"]=R:v&&(l.Authorization=`Bearer ${v}`),{headers:l}}function je(w,l){const v=`https://${w.host}`;try{const R=new URL(l),tt=R.pathname.split("/").filter(de=>de!==""),X=R.pathname.split("/"),st=tt.findIndex(de=>de==="account")+1,Rt=tt[st],Wt=tt.findIndex(de=>de==="orgs"),Vt=Wt!==-1?tt[Wt+1]:"",se=tt.findIndex(de=>de==="projects"),Ue=se!==-1?tt[se+1]:"",Gt=tt.findIndex((de,hn)=>de==="repos"&&hn>Math.max(st,Wt,se))+1,ue=tt[Gt],oe=X.slice(X.findIndex(de=>de==="files"||de==="edit")+1),$e=oe.findIndex(de=>de==="~"),De=oe.slice(0,$e).join("/"),xn=$e!==-1?oe.slice($e+1).join("/").replace(/^\//,""):"";return{baseUrl:v,accountId:Rt,orgName:Vt,projectName:Ue,refString:De,path:xn,repoName:ue,refDashStr:oe.slice(0,$e).join("-"),branch:$e!==-1?oe.slice(0,$e).join("/"):oe.join("/")}}catch(R){throw new Error(`Incorrect URL: ${l}, ${R}`)}}class ze{config;static factory=({config:l})=>{const R=(l.getOptionalConfigArray("integrations.harness")??[]).map(tt=>fe(tt));return(0,n.oS)(R.map(tt=>new ze(tt)),tt=>tt.config.host)};constructor(l){this.config=l}get type(){return"harness"}get title(){return this.config.host}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return Ye(this.config,l)}}const He="blob.core.windows.net";function on(w){const l=w.getOptionalString("endpoint"),v=w.getString("accountName"),R=w.getOptionalString("accountKey")?.trim(),tt=w.getOptionalString("sasToken")?.trim(),X=w.getOptionalString("connectionString")?.trim(),st=w.getOptionalString("endpointSuffix")?.trim();let Rt,Wt;if(l){try{const se=new URL(l);Rt=se.host,Wt=se.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 Vt=w.has("aadCredential")?{clientId:w.getString("aadCredential.clientId"),tenantId:w.getString("aadCredential.tenantId"),clientSecret:w.getString("aadCredential.clientSecret")?.trim()}:void 0;if(R&&tt)throw new Error(`Invalid Azure Blob Storage config for ${v}: Both account key and SAS token cannot be used simultaneously.`);if(Vt&&(R||tt))throw new Error(`Invalid Azure Blob Storage config for ${v}: Cannot use both Azure AD credentials and account keys/SAS tokens for the same account.`);return{host:Rt,endpoint:l,accountName:v,accountKey:R,sasToken:tt,connectionString:X,endpointSuffix:st,aadCredential:Vt}}function ye(w){const l=w.map(on);return l.some(v=>v.host===He)||l.push({host:He}),l}class Ke{integrationConfig;static factory=({config:l})=>{const v=ye(l.getOptionalConfigArray("integrations.azureBlobStorage")??[]);return(0,n.oS)(v.map(R=>new Ke(R)),R=>R.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:C.factory({config:l}),awsCodeCommit:u.factory({config:l}),azureBlobStorage:Ke.factory({config:l}),azure:F.factory({config:l}),bitbucket:xt.factory({config:l}),bitbucketCloud:G.factory({config:l}),bitbucketServer:ut.factory({config:l}),gerrit:Ft.factory({config:l}),github:Nt.U.factory({config:l}),gitlab:ee.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 v=Object.values(this.byType).map(R=>R.byUrl(l)).filter(Boolean);if(v.length>1){const R=v.filter(tt=>!(tt instanceof xt));R.length!==0&&(v=R)}return v[0]}byHost(l){return Object.values(this.byType).map(v=>v.byHost(l)).find(Boolean)}resolveUrl(l){const v=this.byUrl(l.base);return v?v.resolveUrl(l):(0,n.ku)(l)}resolveEditUrl(l){const v=this.byUrl(l);return v?v.resolveEditUrl(l):l}}var Ze=t(55309);class Be{static fromConfig(l){return Ve.fromConfig(l)}}const ve=(0,Ze.y)({id:"integration.scmintegrations"})},36021:(V,S,t)=>{"use strict";t.d(S,{U:()=>f,F:()=>u});var n=t(59869),a=t(45250);const E="github.com",h="https://api.github.com",C="https://raw.githubusercontent.com";function g(y){const p=y.getOptionalString("host")??E;let A=y.getOptionalString("apiBaseUrl"),O=y.getOptionalString("rawBaseUrl");const T=y.getOptionalString("token")?.trim(),L=y.getOptionalConfigArray("apps")?.map(P=>({appId:P.getNumber("appId"),clientId:P.getString("clientId"),clientSecret:P.getString("clientSecret"),webhookSecret:P.getOptionalString("webhookSecret"),privateKey:P.getString("privateKey"),allowedInstallationOwners:P.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,n.HO)(p))throw new Error(`Invalid GitHub integration config, '${p}' is not a valid host`);return A?A=(0,a.trimEnd)(A,"/"):p===E&&(A=h),O?O=(0,a.trimEnd)(O,"/"):p===E&&(O=C),{host:p,apiBaseUrl:A,rawBaseUrl:O,token:T,apps:L}}function d(y){const p=y.map(g);return p.some(A=>A.host===E)||p.push({host:E,apiBaseUrl:h,rawBaseUrl:C}),p}class f{integrationConfig;static factory=({config:p})=>{const A=d(p.getOptionalConfigArray("integrations.github")??[]);return(0,n.oS)(A.map(O=>new f(O)),O=>O.config.host)};constructor(p){this.integrationConfig=p}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(p){return u((0,n.ku)(p),"tree")}resolveEditUrl(p){return u(p,"edit")}parseRateLimitInfo(p){return{isRateLimited:p.status===429||p.status===403&&p.headers.get("x-ratelimit-remaining")==="0"}}}function u(y,p){return y.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(A,O,T,L)=>`//${O}/${T}/${L}/${p}/`)}},59869:(V,S,t)=>{"use strict";t.d(S,{AY:()=>g,HO:()=>C,ku:()=>f,oS:()=>d});var n=t(52536),a=t.n(n),E=t(45250),h=t.n(E);function C(y){const p=new URL("http://example.com");return p.host=y,p.host===y}function g(y){try{return new URL(y),!0}catch{return!1}}function d(y,p){return{list(){return y},byUrl(A){try{const O=typeof A=="string"?new URL(A):A;return y.find(T=>p(T)===O.host)}catch{return}},byHost(A){return y.find(O=>p(O)===A)}}}function f(y){const{url:p,base:A,lineNumber:O}=y;try{return new URL(p),p}catch{}let T;if(p.startsWith("/")){const{href:L,filepath:P}=a()(A);T=new URL(L);const j=(0,E.trimEnd)(T.pathname.substring(0,T.pathname.length-P.length),"/");T.pathname=`${j}${p}`}else T=new URL(p,A);return T.search=new URL(A).search,O&&(T.hash=`L${O}`),T.toString()}function u(y){beforeAll(()=>y.listen({onUnhandledRequest:"error"})),afterAll(()=>y.close()),afterEach(()=>y.resetHandlers())}},71543:(V,S,t)=>{"use strict";var n={};t.r(n),t.d(n,{TechDocsPlugin:()=>C.Ju});var a=t(31085),E=t(25873),h=t(18690),C=t(39278),g=t(8915),d=t(72020),f=t(99730),u=t(64947),y=t(12173),p=t(22020),A=t(68146),O=t(73657);function T({children:r}){return(0,h.Ri)()?(0,a.jsx)(a.Fragment,{children:r}):(0,a.jsx)(h.fS,{children:r})}const L=()=>(0,a.jsx)(y.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),P=({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)(T,{children:(0,a.jsx)(y.M,{statusMessage:s,stack:e.stack})})},j=({error:r,resetError:e,plugin:s})=>(0,a.jsx)(p.b,{title:`Error in ${s?.getId()}`,defaultExpanded:!0,error:r,children:(0,a.jsx)(u.A,{variant:"outlined",onClick:e,children:"Retry"})}),B={Progress:A.k,Router:O.Kd,NotFoundErrorPage:L,BootErrorPage:P,ErrorBoundaryFallback:j},F="Invalid discovery URL pattern,";class W{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(`${F} URL '${o}' is invalid`)}if(i.hash)throw new Error(`${F} URL must not have a hash`);if(i.search)throw new Error(`${F} URL must not have a query`);if(o.endsWith("/"))throw new Error(`${F} URL must not end with a slash`);return new W(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(b=>{const x=typeof b.get("target")=="object"?b.getOptionalString("target.external"):b.getString("target");if(!x)return[];const I=W.compile(x);return b.getStringArray("plugins").map(k=>[k,I])});return new J(new Map(c),W.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 H=t(96403),Y=t.n(H);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 it{subject=new K;post(e,s){this.subject.next({error:e,context:s})}error$(){return this.subject}}class ft{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,b)=>(typeof b=="object"&&b!==null&&Object.freeze(b),b)),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 Ot(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(b=>i.replace(/\{\{\s*pluginId\s*\}\}/g,b))})}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?ct(r.urlPrefixAllowlist):r.config?ct([r.config.getString("backend.baseUrl"),...It.getDiscoveryUrlPrefixes(r.config)]):()=>!1}function ct(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 mt{discoveryApi;constructor(e){this.discoveryApi=e}apply(e){return async(s,o)=>{const i=new Request(s,o),c="plugin://";if(!i.url.startsWith(c))return e(s,o);const{hostname:b,pathname:x,search:I,hash:k,username:q,password:pt}=new URL(`http://${i.url.substring(c.length)}`);let ot=await this.discoveryApi.getBaseUrl(b);if(q||pt){const Lt=new URL(ot),Yt=`${q}${pt?`:${pt}`:""}@`;ot=`${Lt.protocol}//${Yt}${Lt.host}${Lt.pathname}`}const At=`${Ct(ot,x)}${I}${k}`;return e(At,typeof s=="string"||St(s)?o:s)}}}function St(r){return typeof r=="object"&&r?.constructor===URL}class Tt{static resolvePluginProtocol(e){return new mt(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 yt(r,...e){const s=new Set(r);for(const o of e)for(const i of o)s.add(i);return s}class Et{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)=>yt(s,o.scopes),this.requests[0].scopes);return{scopes:e,resolve:s=>{e&&this.resolve(e,s)},reject:s=>{e&&this.reject(s)}}}}class et{subject=new dt([]);currentRequests=[];handlerCount=0;createAuthRequester(e){const s=new Et,o=this.handlerCount;return this.handlerCount++,s.pending().subscribe({next:i=>{const c=this.currentRequests.slice(),b=this.makeAuthRequest(i,e);b?c[o]=b: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 gt(r){return new Promise((e,s)=>{const o=r.width||500,i=r.height||700,c=window.screen.width/2-o/2,b=window.screen.height/2-i/2,x=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${o},height=${i},top=${b},left=${c}`);let I="";if(!x||typeof x.closed>"u"||x.closed){const ot=new Error("Failed to open auth popup.");ot.name="PopupRejectedError",s(ot);return}const k=ot=>{if(ot.source!==x||ot.origin!==r.origin)return;const{data:At}=ot;if(At.type==="config_info"){I=At.targetOrigin;return}if(At.type!=="authorization_response")return;const Lt=At;if("error"in Lt){const Yt=new Error(Lt.error.message);Yt.name=Lt.error.name,s(Yt)}else e(Lt.response);pt()},q=setInterval(()=>{if(x.closed){const ot=`Login failed, ${I&&I!==window.location.origin?`Incorrect app origin, expected ${I}`:"popup was closed"}`,At=new Error(ot);At.name="PopupClosedError",s(At),pt()}},100);function pt(){window.removeEventListener("message",k),clearInterval(q)}window.addEventListener("message",k)})}let nt=!1;function M(r){return[...r].join(" ")}class z{discoveryApi;environment;provider;joinScopesFunc;authRequester;sessionTransform;enableExperimentalRedirectFlow;popupOptions;constructor(e){const{configApi:s,discoveryApi:o,environment:i,provider:c,joinScopes:b=M,oauthRequestApi:x,sessionTransform:I=q=>q,popupOptions:k}=e;!nt&&!s&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),nt=!0),this.enableExperimentalRedirectFlow=s?s.getOptionalBoolean("enableExperimentalRedirectFlow")??!1:!1,this.authRequester=x.createAuthRequester({provider:c,onAuthRequest:async q=>this.enableExperimentalRedirectFlow?this.executeRedirect(q):this.showPopup(q)}),this.discoveryApi=o,this.environment=i,this.provider=c,this.joinScopesFunc=b,this.sessionTransform=I,this.popupOptions=k}async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const s=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(i=>{throw new Error(`Auth refresh request failed, ${i}`)});if(!s.ok){const i=new Error(`Auth refresh request failed, ${s.statusText}`);throw i.status=s.status,i}const o=await s.json();if(o.error){const i=new Error(o.error.message);throw o.error.name&&(i.name=o.error.name),i}return await this.sessionTransform(o)}async removeSession(){const e=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(s=>{throw new Error(`Logout request failed, ${s}`)});if(!e.ok){const s=new Error(`Logout request failed, ${e.statusText}`);throw s.status=e.status,s}}async showPopup(e){const s=this.joinScopesFunc(e),o=await this.buildUrl("/start",{scope:s,origin:window.location.origin,flow:"popup"}),i=this.popupOptions?.size?.fullscreen?window.screen.width:this.popupOptions?.size?.width||450,c=this.popupOptions?.size?.fullscreen?window.screen.height:this.popupOptions?.size?.height||730,b=await gt({url:o,name:`${this.provider.title} Login`,origin:new URL(o).origin,width:i,height:c});return await this.sessionTransform(b)}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 lt(r,e){for(const s of e)if(!r.has(s))return!1;return!0}class wt{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 lt(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 bt=t(55309),$t=function(r){return r.SignedIn="SignedIn",r.SignedOut="SignedOut",r}({});const Ft=(0,bt.y)({id:"core.auth.google"}),Nt=(0,bt.y)({id:"core.auth.github"}),zt=(0,bt.y)({id:"core.auth.okta"}),Ht=(0,bt.y)({id:"core.auth.gitlab"}),te=(0,bt.y)({id:"core.auth.microsoft"}),jt=(0,bt.y)({id:"core.auth.onelogin"}),kt=(0,bt.y)({id:"core.auth.bitbucket"}),ee=(0,bt.y)({id:"core.auth.bitbucket-server"}),ge=(0,bt.y)({id:"core.auth.atlassian"}),Qt=(0,bt.y)({id:"core.auth.vmware-cloud"});class re{subject=new dt($t.SignedOut);signedIn=!1;setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?$t.SignedIn:$t.SignedOut))}sessionState$(){return this.subject}}class le{connector;helper;sessionScopesFunc;sessionShouldRefreshFunc;stateTracker=new re;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 wt({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 lt(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 _e={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class ne{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=_e,oauthRequestApi:b,defaultScopes:x=[],scopeTransform:I=ot=>ot,popupOptions:k}=e,q=new z({configApi:s,discoveryApi:o,environment:i,provider:c,oauthRequestApi:b,sessionTransform({backstageIdentity:ot,...At}){const Lt={...At,providerInfo:{idToken:At.providerInfo.idToken,accessToken:At.providerInfo.accessToken,scopes:ne.normalizeScopes(I,At.providerInfo.scope),expiresAt:At.providerInfo.expiresInSeconds?new Date(Date.now()+At.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:k}),pt=new le({connector:q,defaultScopes:new Set(x),sessionScopes:ot=>ot.providerInfo.scopes,sessionShouldRefresh:ot=>{let At=1/0;return ot.providerInfo?.expiresAt&&(At=Math.min(At,(ot.providerInfo.expiresAt.getTime()-Date.now())/1e3)),ot.backstageIdentity?.expiresAt&&(At=Math.min(At,(ot.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),At<60*3}});return new ne({sessionManager:pt,scopeTransform:I})}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=ne.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 nn={id:"google",title:"Google",icon:()=>null},Te="https://www.googleapis.com/auth/";class pe{static create(e){const{configApi:s,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:b=nn,defaultScopes:x=["openid",`${Te}userinfo.email`,`${Te}userinfo.profile`]}=e;return ne.create({configApi:s,discoveryApi:o,oauthRequestApi:i,provider:b,environment:c,defaultScopes:x,scopeTransform(I){return I.map(k=>k==="openid"?k:k==="profile"||k==="email"?`${Te}userinfo.${k}`:k.startsWith(Te)?k:`${Te}${k}`)}})}}const Ge={id:"microsoft",title:"Microsoft",icon:()=>null};class fe{oauth2;configApi;environment;provider;oauthRequestApi;discoveryApi;scopeTransform;static MicrosoftGraphID="00000003-0000-0000-c000-000000000000";static create(e){return new fe(e)}constructor(e){const{configApi:s,environment:o="development",provider:i=Ge,oauthRequestApi:c,discoveryApi:b,defaultScopes:x=["openid","offline_access","profile","email","User.Read"],scopeTransform:I=k=>k.concat("offline_access")}=e;this.configApi=s,this.environment=o,this.provider=i,this.oauthRequestApi=c,this.discoveryApi=b,this.scopeTransform=I,this.oauth2={[fe.MicrosoftGraphID]:ne.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:x})}}microsoftGraph(){return this.oauth2[fe.MicrosoftGraphID]}static resourceForScopes(e){const s=[...new Set(e.split(" ").map(fe.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]??fe.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 fe.MicrosoftGraphID}}async getAccessToken(e,s){const o=e===void 0?fe.MicrosoftGraphID:await fe.resourceForScopes(Array.isArray(e)?e.join(" "):e);return o in this.oauth2||(this.oauth2[o]=ne.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 sn{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=Ye,oauthRequestApi:b,defaultScopes:x=["read:user"]}=e;return ne.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:x})}}const un={id:"okta",title:"Okta",icon:()=>null},rn=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Qe="okta.";class je{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=un,oauthRequestApi:b,defaultScopes:x=["openid","email","profile","offline_access"]}=e;return ne.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:x,scopeTransform(I){return I.map(k=>rn.has(k)||k.startsWith(Qe)?k:`${Qe}${k}`)}})}}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:b,defaultScopes:x=["read_user"]}=e;return ne.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:x})}}const on={id:"onelogin",title:"onelogin",icon:()=>null},ye=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Ke="onelogin.";class Ve{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=on,oauthRequestApi:b}=e;return ne.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(x){return x.map(I=>ye.has(I)||I.startsWith(Ke)?I:`${Ke}${I}`)}})}}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:b,defaultScopes:x=["account"]}=e;return ne.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:x})}}const ve={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class w{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=ve,oauthRequestApi:b,defaultScopes:x=["PROJECT_ADMIN"]}=e;return ne.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:x})}}const l={id:"atlassian",title:"Atlassian",icon:()=>null};class v{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=l,oauthRequestApi:b}=e;return ne.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i})}}const R={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class tt{static create(e){const{configApi:s,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:b=R,defaultScopes:x=["openid"]}=e;return ne.create({configApi:s,discoveryApi:o,oauthRequestApi:i,provider:b,environment:c,defaultScopes:x})}}var X=t(12935),st=t(57405),Rt=t(65461),Wt=t(36017),Vt=t(99303),se=t(39837);const Ue=(0,bt.y)({id:"core.storage"});var Gt=t(70795),ue=t(16009);const oe=(0,bt.y)({id:"core.oauthrequest"});var $e=t(96824),De=t(70835),xn=t(10288),de=t.n(xn),hn=t(20938),Zt=t(46195),qe=t(54241);const gn=Zt.z.lazy(()=>Zt.z.object({rule:Zt.z.string(),resourceType:Zt.z.string(),params:Zt.z.record(Zt.z.any()).optional()}).or(Zt.z.object({anyOf:Zt.z.array(gn).nonempty()})).or(Zt.z.object({allOf:Zt.z.array(gn).nonempty()})).or(Zt.z.object({not:gn}))),rs=Zt.z.object({result:Zt.z.literal(qe.b.ALLOW).or(Zt.z.literal(qe.b.DENY))}),Ks=Zt.z.union([Zt.z.object({result:Zt.z.literal(qe.b.ALLOW).or(Zt.z.literal(qe.b.DENY))}),Zt.z.object({result:Zt.z.literal(qe.b.CONDITIONAL),pluginId:Zt.z.string(),resourceType:Zt.z.string(),conditions:gn})]),os=(r,e)=>Zt.z.object({items:Zt.z.array(Zt.z.intersection(Zt.z.object({id:Zt.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;constructor(e){this.discovery=e.discovery,this.enabled=e.config.getOptionalBoolean("permission.enabled")??!1}async authorize(e,s){return this.makeRequest(e,rs,s)}async authorizeConditional(e,s){return this.makeRequest(e,Ks,s)}async makeRequest(e,s,o){if(!this.enabled)return e.map(q=>({result:qe.b.ALLOW}));const i={items:e.map(q=>({id:hn.A(),...q}))},c=await this.discovery.getBaseUrl("permission"),b=await de()(`${c}/authorize`,{method:"POST",body:JSON.stringify(i),headers:{...this.getAuthorizationHeader(o?.token),"content-type":"application/json"}});if(!b.ok)throw await De.o.fromResponse(b);const x=await b.json(),k=os(s,new Set(i.items.map(({id:q})=>q))).parse(x).items.reduce((q,pt)=>(q[pt.id]=pt,q),{});return i.items.map(q=>k[q.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}}class Cn{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 Cn(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:Vt.c,deps:{},factory:()=>new Q}),(0,X.b)({api:se.m,deps:{alertApi:Wt.k},factory:({alertApi:r})=>{const e=new Z(r,new it);return ft.forward(e,{hidden:!1}),e}}),(0,X.b)({api:Ue,deps:{errorApi:se.m},factory:({errorApi:r})=>xt.create({errorApi:r})}),(0,X.b)({api:Gt.a,deps:{configApi:Rt.U,identityApi:ue.K,discoveryApi:st.I},factory:({configApi:r,identityApi:e,discoveryApi:s})=>Ot({middleware:[Tt.resolvePluginProtocol({discoveryApi:s}),Tt.injectIdentityAuth({identityApi:e,config:r})]})}),(0,X.b)({api:oe,deps:{},factory:()=>new et}),(0,X.b)({api:Ft,deps:{discoveryApi:st.I,oauthRequestApi:oe,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>pe.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,X.b)({api:te,deps:{discoveryApi:st.I,oauthRequestApi:oe,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:Nt,deps:{discoveryApi:st.I,oauthRequestApi:oe,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>sn.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:s.getOptionalString("auth.environment")})}),(0,X.b)({api:zt,deps:{discoveryApi:st.I,oauthRequestApi:oe,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>je.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,X.b)({api:Ht,deps:{discoveryApi:st.I,oauthRequestApi:oe,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:oe,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:oe,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:ee,deps:{discoveryApi:st.I,oauthRequestApi:oe,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:oe,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>v.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,X.b)({api:Qt,deps:{discoveryApi:st.I,oauthRequestApi:oe,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>tt.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,X.b)({api:$e.x,deps:{discovery:st.I,identity:ue.K,config:Rt.U},factory:({config:r,discovery:e,identity:s})=>Cn.create({config:r,discovery:e,identity:s})})];var bn=t(14451),cs=t(27799),Mn=t(94389),ls=t(20947),jn=t(20473),ds=t(45917),Bn=t(39347),pn=t(63309),us=t(82451),hs=t(85121),Un=t(17400),gs=t(42226),ps=t(69550),$n=t(52755),Fn=t(89350),fs=t(8911),Sn=t(33602),On=t(48108),ms=t(77225),Nn=t(55700),kn=t(71865),ys=t(80109),vs=t(15303),Es=t(39330);const As={brokenImage:cs.A,catalog:fs.A,scaffolder:ls.A,techdocs:jn.A,search:ds.A,chat:Bn.A,dashboard:pn.A,docs:us.A,email:hs.A,github:gs.A,group:Sn.A,help:ps.A,"kind:api":Un.A,"kind:component":Fn.A,"kind:domain":bn.A,"kind:group":Sn.A,"kind:location":$n.A,"kind:system":Mn.A,"kind:user":On.A,"kind:resource":Nn.A,"kind:template":kn.A,user:On.A,warning:ms.A,star:ys.A,unstarred:vs.A,externalLink:Es.A};var xs=t(58733),Cs=t(55288),bs=t(91360),Ss=t(50868),Os=t(12285),Ps=t(87271),Wn=t(64636);Wn.A.configure(r=>`v5-${r}`);const Ts=(0,Cs.A)({productionPrefix:"jss4-"});function Kn(r){const{children:e,theme:s,noCssBaseline:o=!1}=r,i=s.getTheme("v4"),c=s.getTheme("v5");let b;o||(b=(0,a.jsx)(xs.Ay,{}));let x=(0,a.jsxs)(a.Fragment,{children:[b,e]});return i&&(x=(0,a.jsx)(bs.Ay,{generateClassName:Ts,children:(0,a.jsx)(Ss.A,{theme:i,children:x})})),c&&(x=(0,a.jsx)(Os.A,{injectFirst:!0,children:(0,a.jsx)(Ps.A,{theme:c,children:x})})),x}const zn={light:{type:"light",mode:"light",background:{default:"#F8F8F8",paper:"#FFFFFF"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#1F5493",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#1F5493"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",closeButtonColor:"#FFFFFF",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#000000",textVerySubtle:"#DDD",textSubtle:"#6E6E6E",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#2196F3",link:"#0A6EBE",gold:"#FFD600",navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},dark:{type:"dark",mode:"dark",background:{default:"#333333",paper:"#424242"},status:{ok:"#71CF88",warning:"#FFB84D",error:"#F84C55",running:"#3488E3",pending:"#FEF071",aborted:"#9E9E9E"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#9CC9FF",dark:"#82BAFD"},secondary:{main:"#FF88B2"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",closeButtonColor:"#FFFFFF",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#FFFFFF",textVerySubtle:"#727272",textSubtle:"#CCCCCC",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#82BAFD",link:"#9CC9FF",gold:"#FFD600",navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}}};var ws=t(98392),Pn=t(17161);const Fe={wave:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,wave2:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1764' height='479' x='-229' y='-6' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M0 400h1350C1321 336 525 33 179-2c-345-34-395 236-408 402H0z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1378 177v223H0V217s219 75 327 52C436 246 717-35 965 45s254 144 413 132z'/%3e%3cpath fill='url(%23paint2_linear)' d='M26 400l-78-16c-170 205-44-6-137-30l-4-1 4 1 137 30c37-45 89-110 159-201 399-514-45 238 1176-50 275-65 354-39 91 267H26z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='431' x2='397.3' y1='-599' y2='372.8' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='236.5' x2='446.6' y1='-586' y2='381.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='851.8' x2='640.4' y1='-867.2' y2='363.7' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,round:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='2269' height='1408' x='-610' y='-509' maskUnits='userSpaceOnUse'%3e%3ccircle cx='1212.8' cy='74.8' r='317.5' fill='url(%23paint0_linear)' transform='rotate(-52 1213 75)'/%3e%3ccircle cx='737.8' cy='445.8' r='317.5' fill='url(%23paint1_linear)' transform='rotate(-116 738 446)'/%3e%3ccircle cx='601.8' cy='52.8' r='418.6' fill='url(%23paint2_linear)' transform='rotate(-117 602 53)'/%3e%3ccircle cx='999.8' cy='364' r='389.1' fill='url(%23paint3_linear)' transform='rotate(31 1000 364)'/%3e%3cellipse cx='-109.2' cy='263.5' fill='url(%23paint4_linear)' rx='429.2' ry='465.8' transform='rotate(-85 -109 264)'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='1301.2' x2='161.4' y1='-1879.7' y2='-969.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='826.2' x2='-313.6' y1='-1508.7' y2='-598.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='718.4' x2='-784.3' y1='-2524' y2='-1324.2' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='1108.2' x2='-288.6' y1='-2031.1' y2='-915.9' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear' x1='10.4' x2='-1626.5' y1='-2603.8' y2='-1399.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`},we={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"],greens:["#4BB8A5","#187656"]};function Ne(r){const{colors:e,shape:s,options:o}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,b=`${s}, ${c}`,x=o?.fontColor??"#FFFFFF";return{colors:e,shape:s,backgroundImage:b,fontColor:x}}const Rs={home:Ne({colors:we.teal,shape:Fe.wave}),documentation:Ne({colors:we.pinkSea,shape:Fe.wave2}),tool:Ne({colors:we.purpleSky,shape:Fe.round}),service:Ne({colors:we.marineBlue,shape:Fe.wave}),website:Ne({colors:we.veryBlue,shape:Fe.wave}),library:Ne({colors:we.rubyRed,shape:Fe.wave}),other:Ne({colors:we.darkGrey,shape:Fe.wave}),app:Ne({colors:we.toastyOrange,shape:Fe.wave}),apis:Ne({colors:we.teal,shape:Fe.wave2}),card:Ne({colors:we.greens,shape:Fe.wave})},Hn=16,Is='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',m="home",D={htmlFontSize:Hn,fontFamily:Is,h1:{fontSize:54,fontWeight:700,marginBottom:10},h2:{fontSize:40,fontWeight:700,marginBottom:8},h3:{fontSize:32,fontWeight:700,marginBottom:6},h4:{fontWeight:700,fontSize:28,marginBottom:6},h5:{fontWeight:700,fontSize:24,marginBottom:4},h6:{fontWeight:700,fontSize:20,marginBottom:2}};function U(r){const{palette:e,htmlFontSize:s=Hn,fontFamily:o=Is,defaultPageTheme:i=m,pageTheme:c=Rs,typography:b}=r;if(!c[i])throw new Error(`${i} is not defined in pageTheme.`);return D.htmlFontSize=s,D.fontFamily=o,{palette:e,typography:b??D,page:c[i],getPageTheme:({themeId:x})=>c[x]??c[i]}}var $=t(80012);const N={MuiCssBaseline:{styleOverrides:r=>({html:{height:"100%",fontFamily:r.typography.fontFamily},body:{height:"100%",fontFamily:r.typography.fontFamily,overscrollBehaviorY:"none",fontSize:"0.875rem",lineHeight:1.43,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:r.palette.background.paper,width:"1em"},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:r.palette.textVerySubtle,border:`3px solid ${r.palette.background.paper}`},"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active":{backgroundColor:r.palette.mode==="dark"?(0,$.a)(r.palette.textVerySubtle,.2):(0,$.e$)(r.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.mode==="dark"?(0,$.a)(r.palette.textVerySubtle,.2):(0,$.e$)(r.palette.textVerySubtle,.2)}},a:{color:"inherit",textDecoration:"none"}})},MuiGrid:{defaultProps:{spacing:2}},MuiSwitch:{defaultProps:{color:"primary"}},MuiTableRow:{styleOverrides:{root:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.default}}),hover:{"&:hover":{cursor:"pointer"}},head:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.paper}})}},MuiTableCell:{styleOverrides:{root:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:r.spacing(3,2,3,2.5),borderBottom:0}),sizeSmall:({theme:r})=>({padding:r.spacing(1.5,2,1.5,2.5)}),head:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",color:r.palette.textSubtle,fontWeight:"normal",lineHeight:"1"})}},MuiTabs:{styleOverrides:{root:{minHeight:24}}},MuiTab:{styleOverrides:{root:({theme:r})=>({color:r.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,$.e$)(r.palette.link,.3),background:(0,$.a)(r.palette.link,.95)},[r.breakpoints.up("md")]:{minWidth:120,fontSize:r.typography.pxToRem(14),fontWeight:500}}),textColorPrimary:({theme:r})=>({color:r.palette.link})}},MuiTableSortLabel:{styleOverrides:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"},"&.Mui-active":{fontWeight:"bold",color:"inherit"}}}},MuiListItemText:{styleOverrides:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}},MuiButton:{styleOverrides:{text:{padding:void 0}}},MuiChip:{styleOverrides:{root:({theme:r})=>({marginRight:r.spacing(1),marginBottom:r.spacing(1)}),label:({theme:r})=>({lineHeight:r.spacing(2.5),fontWeight:r.typography.fontWeightMedium,fontSize:r.spacing(1.75)}),labelSmall:({theme:r})=>({fontSize:r.spacing(1.5)}),deleteIcon:({theme:r})=>({width:r.spacing(3),height:r.spacing(3),margin:r.spacing(0,.75,0,-.75)}),deleteIconSmall:({theme:r})=>({width:r.spacing(2),height:r.spacing(2),margin:r.spacing(0,.5,0,-.5)})}},MuiCard:{styleOverrides:{root:{display:"flex",flexDirection:"column"}}},MuiCardHeader:{styleOverrides:{root:{paddingBottom:0}}},MuiCardContent:{styleOverrides:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}}},MuiCardActions:{styleOverrides:{root:{justifyContent:"flex-end"}}},MuiLink:{defaultProps:{underline:"hover"}},MuiPaper:{styleOverrides:{root:{backgroundImage:"unset"}}}},_=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 rt(r,e){if(!e||typeof e=="string")return;const s=typeof e=="function"?e(r):e;if(s)return{"@global":s}}function Pt(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const s={...r},o=r.spacing(1);return typeof o=="number"&&(s.spacing=_(o)),Object.fromEntries(Object.entries(e).map(([i,c])=>typeof c=="function"?[i,c({theme:s})]:[i,c]))}return e}}const Dt=/^&.Mui-([\w-]+)$/;function Bt(r){let e=r;if(!r||typeof r!="object")return e;for(const s of Object.keys(r)){const o=r[s];if(!(!o||typeof o!="object"))for(const i of Object.keys(o)){const c=i,b=c.match(Dt);if(b){const[,x]=b,{[c]:I,...k}=o;I&&(e={...e,[s]:k,[x]:I})}}}return e}function Mt(r,e={}){const s={},o={};for(const i of Object.keys(e)){const c=e[i];c&&("styleOverrides"in c&&(i==="MuiCssBaseline"?s[i]=rt(r,c.styleOverrides):s[i]=Bt(Pt(r,c.styleOverrides))),"defaultProps"in c&&(o[i]=c.defaultProps))}return{overrides:s,props:o}}class Ut{#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 Xt(r){const e=U(r),s={...N,...r.components},o=(0,Pn.A)({...e,components:s}),i=Mt(o,s),c={...(0,ws.A)(e),...i};return new Ut(c,o)}function me(r){const e=adaptV4Theme(r),s=createTheme(r);return new Ut(s,createV5Theme(e))}const Kt={light:Xt({palette:zn.light}),dark:Xt({palette:zn.dark})};var _t=t(75962),Ee=t(87145);const ae=[{id:"light",title:"Light Theme",variant:"light",icon:(0,a.jsx)(Ee.A,{}),Provider:({children:r})=>(0,a.jsx)(Kn,{theme:Kt.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,a.jsx)(_t.A,{}),Provider:({children:r})=>(0,a.jsx)(Kn,{theme:Kt.dark,children:r})}];var ht=t(14041),Jt=t(73466),be=t(39067),qt=t.n(be);class ie{holders;constructor(...e){this.holders=e}get(e){for(const s of this.holders){const o=s.get(e);if(o)return o}}}var ce=t(43836),ke=t(10602);const Le=(0,ce.tK)("api-context"),tn=r=>{const{apis:e,children:s}=r,o=(0,ht.useContext)(Le)?.atVersion(1),i=o?new ie(e,o):e;return(0,a.jsx)(Le.Provider,{value:(0,ke.B)({1:i}),children:s})};tn.propTypes={apis:qt().shape({get:qt().func.isRequired}).isRequired,children:qt().node};const an=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function he(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Vn(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Vn):Object.fromEntries(Object.entries(r).map(([e,s])=>[e,Vn(s)]))}function cn(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:cn(e);if(typeof r!="object"||Array.isArray(r))return r;const s=he(e)?e:{},o={};for(const i of new Set([...Object.keys(r),...Object.keys(s)])){const c=cn(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 We={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 fn{data;context;fallback;prefix;filteredKeys;notifiedFilteredKeys;static fromConfigs(e){return e.length===0?new fn(void 0):e.reduce((s,{data:o,context:i,filteredKeys:c,deprecatedKeys:b})=>{const x=new fn(o,i,s);if(x.filteredKeys=c,b)for(const{key:I,description:k}of b)console.warn(`The configuration key '${I}' of ${i} is deprecated and may be removed soon. ${k||""}`);return x},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(We.missing(this.fullKey(e??""),this.context));return s}getOptional(e){const s=Vn(this.readValue(e)),o=this.fallback?.getOptional(e);if(s!==null)return s===void 0?cn(o):o===void 0?cn(s):cn(s,o)}getConfig(e){const s=this.getOptionalConfig(e);if(s===void 0)throw new Error(We.missing(this.fullKey(e),this.context));return s}getOptionalConfig(e){const s=this.readValue(e),o=this.fallback?.getOptionalConfig(e);if(he(s))return this.copy(s,e,o);if(s!==null){if(s!==void 0)throw new TypeError(We.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(We.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(!he(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(We.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(We.convert(this.fullKey(e),this.context,"number"));return o}getBoolean(e){const s=this.getOptionalBoolean(e);if(s===void 0)throw new Error(We.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(We.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const s=this.getOptionalString(e);if(s===void 0)throw new Error(We.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(We.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 fn(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:b=o,expected:x}=i;throw new TypeError(We.type(this.fullKey(c),this.context,Ds(b),x))}return o}readValue(e){const s=e?e.split("."):[];for(const i of s)if(!an.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(he(o))o=o[c];else if(o!=null){const b=this.fullKey(s.slice(0,i).join("."));throw new TypeError(We.type(b,this.context,Ds(o),"object"))}return o}}const Tn="theme";class Gn{themes;static createWithStorage(e){const s=new Gn(e);if(!window.localStorage)return s;const o=window.localStorage.getItem(Tn)??void 0;return s.setActiveThemeId(o),s.activeThemeId$().subscribe(i=>{i?window.localStorage.setItem(Tn,i):window.localStorage.removeItem(Tn)}),window.addEventListener("storage",i=>{if(i.key===Tn){const c=localStorage.getItem(Tn)??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 mn=t(63636);function zs(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 Fr{registeredFeatureFlags=[];flags;registerFlag(e){zs(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===mn.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===mn.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])=>(zs(i),c===mn.S.Active));return new Map(o)}catch{return new Map}}}const Yn=(0,bt.y)({id:"core.apptheme"}),Hs=(0,bt.y)({id:"core.applanguage"});var Nr=t(56038),Vs=function(r){return r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static",r}(Vs||{});class kr{factories=new Map;register(e,s){const o=Vs[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 b=i.shift(),x=e.get(b);if(x)for(const I of Object.values(x.deps)){if(I.id===o.id)throw new Error(`Circular dependency of api factory for ${o}`);c.has(I)||(c.add(I),i.push(I))}}}}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]),b=i.factory(c);return this.apis.set(e.id,b),b}loadDeps(e,s,o){const i={};for(const c in s)if(s.hasOwnProperty(c)){const b=s[c],x=this.load(b,o);if(!x)throw new Error(`No API factory available for dependency ${b} of dependent ${e}`);i[c]=x}return i}}function Wr(r){const e={};for(const o in r.collectors)r.collectors.hasOwnProperty(o)&&(e[o]=r.collectors[o]());const s=[{node:ht.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;s.length!==0;){const{node:o,parent:i,contexts:c}=s.shift();ht.Children.forEach(o,b=>{if(!(0,ht.isValidElement)(b))return;const x={};for(const I in e)if(e.hasOwnProperty(I)){const k=e[I];x[I]=k.visit(k.accumulator,b,i,c[I])}for(const I of r.discoverers){const k=I(b);k&&s.push({node:k,parent:b,contexts:x})}})}return Object.fromEntries(Object.entries(e).map(([o,i])=>[o,i.accumulator]))}function Qn(r,e){return()=>({accumulator:r(),visit:e})}function Kr(r){return r.props?.children}function zr(r){if(r.props?.path&&r.props?.element)return r.props?.element}var Se=t(19402);const Hr=Qn(()=>new Set,(r,e)=>{const s=(0,Se.E)(e,"core.plugin");s&&r.add(s)});var wn=t(72427);const Gs=r=>{const{children:e}=r,s=(0,wn.gf)(mn.B),o="with"in r?s.isActive(r.with):!s.isActive(r.without);return(0,a.jsx)(a.Fragment,{children:o?e:null})};(0,Se.h)(Gs,"core.featureFlagged",!0);const Zn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function Jn(r){const e=r;return e?.type?e.type.displayName??e.type.name??String(e.type):String(e)}const Ys=r=>{const e=new Set;return r&&e.add(r),e};function Qs(r,e=new Array){return ht.Children.forEach(r,s=>{if(!(0,ht.isValidElement)(s))return;const o=(0,Se.E)(s,"core.mountPoint");if(o){const i=(0,Se.E)(s,"core.plugin");e.push({routeRef:o,plugin:i})}Qs(s.props.children,e)}),e}const Vr=Qn(()=>({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,Se.E)(e,"core.mountPoint");if(c&&i)throw new Error(`Path property may not be set directly on a routable extension "${Jn(e)}"`);const b=o?.obj?.children??r.objects;if(i!==void 0){if(typeof i!="string")throw new Error(`Element path must be a string at "${Jn(e)}"`);const x=i.startsWith("/")?i.slice(1):i,I=e.props.element;if((0,Se.E)(e,"core.gatherMountPoints")){if(I)throw new Error(`Mount point gatherers may not have an element prop "${Jn(e)}"`);const k={path:x,element:"gathered",routeRefs:new Set,caseSensitive:!!e.props?.caseSensitive,children:[Zn],plugins:new Set};return b.push(k),{obj:k,gatherPath:x,routeRef:o?.routeRef,gatherRouteRef:o?.routeRef}}if(I){const[k,...q]=Qs(I);if(q.length>0)throw new Error(`Route element with path "${i}" may not contain multiple routable extensions`);if(!k)return o;const{routeRef:pt,plugin:ot}=k,At={path:x,element:"mounted",routeRefs:new Set([pt]),caseSensitive:!!e.props?.caseSensitive,children:[Zn],plugins:Ys(ot)};return b.push(At),r.paths.set(pt,x),r.parents.set(pt,o?.routeRef),{obj:At,routeRef:pt??o?.routeRef,gatherPath:x,gatherRouteRef:o?.gatherRouteRef}}}if(c){if(o?.gatherPath===void 0)throw new Error(`Routable extension "${Jn(e)}" with mount point "${c}" must be assigned a path`);o?.obj?.routeRefs.add(c);const x=(0,Se.E)(e,"core.plugin");return x&&o?.obj?.plugins.add(x),r.paths.set(c,o.gatherPath),r.parents.set(c,o?.gatherRouteRef),{...o,routeRef:c}}return o}),Gr=Qn(()=>({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,b=o?.sticky;const x=e.props?.path,I=i?.children??r.objects,k=!!e.props?.caseSensitive;let q=o?.path;if((0,Se.E)(e,"core.gatherMountPoints")){if(!x)throw new Error("Mount point gatherer must have a path");q=x}const pt=e.props?.element;let ot=(0,Se.E)(e,"core.mountPoint");if(!ot&&(0,ht.isValidElement)(pt)&&(ot=(0,Se.E)(pt,"core.mountPoint")),ot){let Lt=x;if(q&&(Lt?q=void 0:Lt=q),!Lt)throw new Error("Mounted routable extension must have a path");r.paths.set(ot,Lt),c&&b?(r.parents.set(ot,c),x&&(c=ot,b=!1)):(r.parents.set(ot,c),c=ot),x?(i={caseSensitive:k,path:x,element:"mounted",routeRefs:new Set([ot]),children:[Zn],plugins:Ys((0,Se.E)(e.props.element,"core.plugin"))},I.push(i)):i?.routeRefs.add(ot)}if((0,Se.E)(e,"core.gatherMountPoints")&&(b=!0),(0,Se.E)(e,"core.gatherMountPoints")){if(!x)throw new Error("Mount point gatherer must have a path");ot||(i={caseSensitive:k,path:x,element:"gathered",routeRefs:new Set,children:[Zn],plugins:o?.obj?.plugins||new Set},I.push(i))}return{obj:i,path:q,routeRef:c,sticky:b}}),Yr=Qn(()=>new Set,(r,e)=>{if(e.type===Gs){const s=e.props;r.add("with"in s?s.with:s.without)}});var Rn=t(21613),Qr=t(63544);const In=(0,Qr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function Zs(r){return r[In]==="absolute"}function Js(r){return r[In]==="sub"}function Zr(r){return r[In]==="external"}function Xn(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var Jr=t(46155),Xr=t.n(Jr);function _r(r,e,s){let o,i="";if(Zs(r))o=r;else if(Js(r))o=r.parent,i=r.path;else if(Zr(r)){const x=s.get(r);if(!x)return[void 0,""];if(Zs(x))o=x;else if(Js(x))o=x.parent,i=x.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${x}`)}else throw r[In]?new Error(`Unknown or invalid route ref type, ${r[In]}`):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 b=Xn(c,i);return[o,b]}function qr(r,e,s,o,i){const c=(0,Rn.ue)(i,e)??[],b=Array();let x=-1;for(let q=r;q&&(x=c.findIndex(pt=>pt.route.routeRefs.has(q)),x===-1);q=o.get(q))b.unshift(q);b.length===0&&(x-=1);const I=x===-1?"":c[x].pathname,k=b.slice(0,-1).map(q=>{const pt=s.get(q);if(pt===void 0)throw new Error(`No path for ${q}`);if(pt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${q} as it has parameters`);return pt});return`${Xn(I,...k)}/`}class to{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]=_r(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 b=this.appBasePath+qr(o,c,this.routePaths,this.routeParents,this.routeObjects);return(...[I])=>{const k=I&&Xr()(I,q=>typeof q=="string"?q.replaceAll(/[&?#;\/]/g,pt=>encodeURIComponent(pt)):q);return Xn(b,(0,Rn.tW)(i,k))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}}const eo=(0,ce.tK)("routing-context"),no=({routePaths:r,routeParents:e,routeObjects:s,routeBindings:o,basePath:i="",children:c})=>{const b=new to(r,e,s,o,i),x=(0,ke.B)({1:b});return(0,a.jsx)(eo.Provider,{value:x,children:c})};function so(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 x=r.get(i);if(x===void 0)throw new Error(`No path for ${i}`);c=Xn(x,c),i=e.get(i)}const b=c.match(/:(\w+)/g);if(b){for(let x=0;x<b.length;x++)for(let I=x+1;I<b.length;I++)if(b[I]===b[x])throw new Error(`Parameter ${b[I]} is duplicated in path ${c}`)}}}function ro(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 oo=(0,ce.tK)("app-context"),ao=({appContext:r,children:e})=>{const s=(0,ke.B)({1:r});return(0,a.jsx)(oo.Provider,{value:s,children:e})},Xs="app",io=`${Xs}-auth-cookie-expires-at`,co=5*6e4,_s=5e3,lo=2,uo=5*6e4;function ho({discoveryApi:r,fetchApi:e,errorApi:s}){let o=!1,i,c=!0,b=_s;const x="BroadcastChannel"in window?new BroadcastChannel(io):void 0,I=ot=>{const At=(1+3*Math.random())*6e4;return Math.max(ot-Date.now(),co)-At},k=async()=>{try{const At=`${await r.getBaseUrl(Xs)}/.backstage/auth/v1/cookie`,Lt=await e.fetch(At,{credentials:"include"});if(!Lt.ok)throw new Error(`Request failed with status ${Lt.status} ${Lt.statusText}, see request towards ${At} for more details`);const Yt=await Lt.json();if(!Yt.expiresAt)throw new Error("No expiration date in response");const Pe=Date.parse(Yt.expiresAt);if(Number.isNaN(Pe))throw new Error("Invalid expiration date in response");c=!0,x?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(Pe).toISOString()}}),pt(I(Pe))}catch(ot){c?(c=!1,b=_s):(b=Math.min(uo,b*lo),console.error("Session cookie refresh failed",ot),s.post(new Error("Session refresh failed, see developer console for details"))),pt(b)}},q=ot=>{const{data:At}=ot;if(!(At===null||typeof At!="object")&&"action"in At&&At.action==="COOKIE_REFRESH_SUCCESS"){const Lt=Date.parse(At.payload.expiresAt);if(Number.isNaN(Lt)){console.warn("Received invalid expiration from session refresh channel");return}pt(I(Lt))}};function pt(ot){o||(i&&clearTimeout(i),i=setTimeout(k,ot))}return x?.addEventListener("message",q),k(),()=>{o=!0,i&&clearTimeout(i),x?.removeEventListener("message",q),x?.close()}}function qs(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 go{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 qs("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ms("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw qs("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=ho(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 po=t(1394);function fo(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 mo=()=>{const r=(0,ht.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,s]=(0,ht.useState)(r.matches);return(0,ht.useEffect)(()=>{const o=i=>{s(i.matches)};return r.addListener(o),()=>{r.removeListener(o)}},[r]),e};function tr({children:r}){const e=(0,wn.gf)(Yn),s=(0,po.A)(e.activeThemeId$(),e.getActiveThemeId()),o=window.matchMedia?mo():!1,i=fo(s,o,e.getInstalledThemes());if(!i)throw new Error("App has no themes");return(0,a.jsx)(i.Provider,{children:r})}const er=async()=>yo();function yo(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 b=c.textContent;if(!b)throw new Error("tag is empty");let x;try{x=JSON.parse(b)}catch(I){throw new Error(`failed to parse config; ${I}`)}if(!Array.isArray(x))throw new Error("data is not an array");e.push(...x)}catch(b){throw new Error(`Failed to load config from script tag, ${b.message}`)}else if(r!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const c=JSON.parse(r);Array.isArray(c)?e.push(...c):e.push({data:c,context:"env"})}catch(c){throw new Error(`Failed to load runtime configuration, ${c}`)}const i=window.__APP_CONFIG__;return i&&e.push({context:"window",data:i}),e}class vo{apis=[];add(e,s){return this.apis.push([e.id,s]),s}build(){return new yn(new Map(this.apis))}}class yn{apis;static builder(){return new vo}static from(e){return new yn(new Map(e.map(([s,o])=>[s.id,o])))}static with(e,s){return new yn(new Map([[e.id,s]]))}constructor(e){this.apis=e}with(e,s){return new yn(new Map([...this.apis,[e.id,s]]))}get(e){return this.apis.get(e.id)}}function Eo(r){const e=new Map,s=new Map;for(const o of r){for(const[i,c]of Object.entries(o.routes??{})){const b=`${o.getId()}.${i}`;if(e.has(b))throw new Error(`Unexpected duplicate route '${b}'`);e.set(b,c)}for(const[i,c]of Object.entries(o.externalRoutes??{})){const b=`${o.getId()}.${i}`;if(s.has(b))throw new Error(`Unexpected duplicate external route '${b}'`);s.set(b,c)}}return{routes:e,externalRoutes:s}}function Ao(r,e,s){const o=Eo(s),i=new Map,c=new Set;r&&r({bind:(I,k)=>{for(const[q,pt]of Object.entries(k)){const ot=I[q];if(!ot)throw new Error(`Key ${q} is not an existing external route`);if(!pt&&!ot.optional)throw new Error(`External route ${q} is required but was ${pt===!1?"disabled":"not provided"}`);pt?i.set(ot,pt):pt===!1&&c.add(ot)}}});const b=e.getOptionalConfig("app.routes.bindings")?.get();if(b)for(const[x,I]of Object.entries(b)){if(!xo(I))throw new Error(`Invalid config at app.routes.bindings['${x}'], value must be a non-empty string or false`);const k=o.externalRoutes.get(x);if(!k)throw new Error(`Invalid config at app.routes.bindings, '${x}' is not a valid external route`);if(!(i.has(k)||c.has(k)))if(I===!1)c.add(k);else{const q=o.routes.get(I);if(!q)throw new Error(`Invalid config at app.routes.bindings['${x}'], '${I}' is not a valid route`);i.set(k,q)}}for(const x of o.externalRoutes.values())if(!i.has(x)&&!c.has(x)){const I="getDefaultTarget"in x?x.getDefaultTarget():void 0;if(I){const k=o.routes.get(I);k&&i.set(x,k)}}return i}function xo(r){return!!(r===!1||typeof r=="string"&&r)}function Dn(){const[r]=(0,h.AV)((0,a.jsx)(h.qh,{index:!0,element:(0,a.jsx)("div",{})}));return!r.index}const nr=(0,ht.createContext)(void 0);var sr=t(82266),rr=t(93368),Co=t(25862);const bo=(r,e)=>{try{const o=(0,Rn.ue)(e,{pathname:r})?.filter(I=>I?.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 b;i.plugins.size===1&&(b=i.plugins.values().next().value);const x=Object.entries(o?.params||{}).reduce((I,[k,q])=>(q!==void 0&&k!=="*"&&(I[k]=q),I),{});return{extension:"App",pluginId:b?.getId()||"root",...c?{routeRef:c.id}:{},_routeNodeType:i.element,params:x}}catch{return}},So=({pathname:r,search:e,hash:s,attributes:o})=>{const i=(0,rr.s)();return(0,ht.useEffect)(()=>{i.captureEvent("navigate",`${r}${e}${s}`,{attributes:o})},[i,r,e,s,o]),null},_n=({routeObjects:r})=>{const{pathname:e,search:s,hash:o}=(0,h.zy)(),{params:i,...c}=bo(e,r)||{params:{}};return(0,a.jsx)(Co.Ig,{attributes:c,children:(0,a.jsx)(So,{pathname:e,search:s,hash:o,attributes:i})})};function Oo(r){return Dn()?js(r):""}function js(r){let{pathname:e}=new URL(r.getOptionalString("app.baseUrl")??"/","http://sample.dev");return e=e.replace(/\/*$/,""),e}function or({component:r,appIdentityProxy:e,children:s}){const[o,i]=(0,ht.useState)(),c=(0,wn.gf)(Rt.U),b=js(c);return o?(e.setTarget(o,{signOutTargetUrl:b||"/"}),(0,a.jsx)(a.Fragment,{children:s})):(0,a.jsx)(r,{onSignInSuccess:i})}function ar(r){const{Router:e,SignInPage:s}=(0,sr.n)().getComponents(),o=(0,wn.gf)(Rt.U),i=js(o),c=`${i}/*`,b=(0,ht.useContext)(nr);if(!b)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:x,appIdentityProxy:I}=b;return s?Dn()?(0,a.jsxs)(e,{children:[(0,a.jsx)(_n,{routeObjects:x}),(0,a.jsx)(or,{component:s,appIdentityProxy:I,children:(0,a.jsx)(h.BV,{children:(0,a.jsx)(h.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(_n,{routeObjects:x}),(0,a.jsx)(or,{component:s,appIdentityProxy:I,children:r.children})]}):(I.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||"/"}),Dn()?(0,a.jsxs)(e,{children:[(0,a.jsx)(_n,{routeObjects:x}),(0,a.jsx)(h.BV,{children:(0,a.jsx)(h.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(_n,{routeObjects:x}),r.children]}))}(0,Se.h)(ar,"core.type","AppRouter");const Ln="language",Je="en";class qn{static create(e){const s=e?.availableLanguages??[Je];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(Je))throw new Error(`Supported languages must include '${Je}'`);const o=e?.defaultLanguage??Je;if(!s.includes(o))throw new Error(`Initial language must be one of the supported languages, got '${o}'`);return new qn(s,o)}static createWithStorage(e){const s=qn.create(e);if(!window.localStorage)return s;const o=window.localStorage.getItem(Ln),{languages:i}=s.getAvailableLanguages();return o&&i.includes(o)&&s.setLanguage(o),s.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(Ln)&&window.localStorage.setItem(Ln,c)}),window.addEventListener("storage",c=>{if(c.key===Ln){const b=localStorage.getItem(Ln)??void 0;b&&s.setLanguage(b)}}),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??Je;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 Po=t(47304),To=t(99833),ir=t(93184);function cr(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}class wo{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,To.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 b=i().then(x=>{this.onLoad({language:e,namespace:s,messages:x.messages}),this.#t.add(o)},x=>{throw this.#t.add(o),x});this.#e.set(o,b),await b}}class Bs{static create(e){const{languages:s}=e.languageApi.getAvailableLanguages(),o=(0,Po.Q_)({fallbackLng:Je,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!==Je&&o.changeLanguage(i);const c=new wo(I=>{o.addResourceBundle(I.language,I.namespace,cr(I.messages),!1,!0)}),b=e?.resources||[];for(let I=b.length-1;I>=0;I--){const k=b[I];k.$$type==="@backstage/TranslationResource"?c.addTranslationResource(k):k.$$type==="@backstage/TranslationMessages"&&o.addResourceBundle(Je,k.id,cr(k.messages),!0,!1)}const x=new Bs(o,c,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:I})=>{x.#o(I)}),x}#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,ir.v)(e);return this.#i(s),this.#a(s)}translation$(e){const s=(0,ir.v)(e);return this.#i(s),new(Y())(o=>{let i={};const c=()=>{i={};const x=i;this.#e.load(this.#n,s.id).then(()=>{if(x===i){const I=this.#a(s);I.ready&&o.next(I)}},I=>{x===i&&o.error(Array.isArray(I)?I[0]:I)})},b=()=>{const x=this.#a(s);x.ready?o.next(x):c()};return this.#e.needsLoading(this.#n,s.id)&&c(),this.#r.add(b),()=>{this.#r.delete(b)}})}#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(Je,e.id,s,!0,!1);const o=e.getDefaultResource();o&&this.#e.addTranslationResource(o)}}function lr(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 Ro(r){const e=fn.fromConfigs(r),s=e.getOptionalString("app.baseUrl"),o=e.getOptionalString("backend.baseUrl");let i=r,c,b;if(s&&o){const x=new URL(s).origin,I=new URL(o).origin;if(x===I){const k=lr(o);o!==k&&(c=k)}}if(s){const x=lr(s);s!==x&&(b=x)}return(b||c)&&(i=i.concat({data:{app:b&&{baseUrl:b},backend:c&&{baseUrl:c}},context:"relative-resolver"})),i}function Io(){return(document.querySelector('meta[name="backstage-app-mode"]')?.getAttribute("content")??"public")==="protected"}function Do(r,e,s){const o=!!r,i=(0,Jt.A)(r||(()=>Promise.resolve([])));let c;if(o&&i.loading){const{Progress:I}=e;c=(0,a.jsx)(I,{})}else if(i.error){const{BootErrorPage:I}=e;c=(0,a.jsx)(I,{step:"load-config",error:i.error})}const{ThemeProvider:b=tr}=e;return c?{node:(0,a.jsx)(tn,{apis:yn.with(Yn,s),children:(0,a.jsx)(b,{children:c})})}:{api:fn.fromConfigs(i.value?.length?Ro(i.value):[])}}class Lo{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 Mo{apiHolder;configApi;apis;icons;plugins;featureFlags;components;themes;configLoader;defaultApis;bindRoutes;appLanguageApi;translationResources;appIdentityProxy=new go;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??er,this.defaultApis=e.defaultApis??[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new kr,this.appLanguageApi=qn.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 Lo(this);let s,o;return({children:c})=>{const b=(0,ht.useRef)(!0),x=(0,ht.useMemo)(()=>Gn.createWithStorage(this.themes),[]),{routing:I,featureFlags:k}=(0,ht.useMemo)(()=>{const Yt=Dn();Yt&&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 Pe=Wr({root:c,discoverers:[Kr,zr],collectors:{routing:Yt?Gr:Vr,collectedPlugins:Hr,featureFlags:Yr}});return Pe.collectedPlugins.forEach(Me=>this.plugins.add(Me)),this.verifyPlugins(this.plugins),this.getApiHolder(),Pe},[c]),q=Do(this.configLoader,this.components,x),pt="api"in q;if(pt){const{api:Yt}=q;this.configApi=Yt}if("node"in q)return q.node;if(o)throw o;if(!s)try{s=Ao(this.bindRoutes,q.api,this.plugins),so(I.paths,I.parents),ro(s,this.plugins)}catch(Yt){throw o=Yt,Yt}if(pt&&b.current){b.current=!1;const Yt=this.getApiHolder().get(mn.B);if(Yt){for(const Ie of this.featureFlags)Yt.registerFlag({...Ie,pluginId:""});for(const Ie of this.plugins.values())if("getFeatureFlags"in Ie)for(const dn of Ie.getFeatureFlags())Yt.registerFlag({name:dn.name,pluginId:Ie.getId()});else for(const dn of Ie.output())dn.type==="feature-flag"&&Yt.registerFlag({name:dn.name,pluginId:Ie.getId()});const Pe=Yt.getRegisteredFlags(),Me=new Set(Pe.map(Ie=>Ie.name));for(const Ie of k)Me.has(Ie)||Yt.registerFlag({name:Ie,pluginId:""})}}const{ThemeProvider:ot=tr,Progress:At}=this.components,Lt=this.getApiHolder();if(Io()){const Yt=Lt.get(se.m),Pe=Lt.get(Gt.a),Me=Lt.get(st.I);if(!Yt||!Pe||!Me)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Yt,fetchApi:Pe,discoveryApi:Me})}return(0,a.jsx)(tn,{apis:Lt,children:(0,a.jsx)(ao,{appContext:e,children:(0,a.jsx)(ot,{children:(0,a.jsx)(no,{routePaths:I.paths,routeParents:I.parents,routeObjects:I.objects,routeBindings:s,basePath:Oo(q.api),children:(0,a.jsx)(nr.Provider,{value:{routeObjects:I.objects,appIdentityProxy:this.appIdentityProxy},children:(0,a.jsx)(ht.Suspense,{fallback:(0,a.jsx)(At,{}),children:c})})})})})})}}getRouter(){return ar}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:Yn,deps:{},factory:()=>Gn.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:ue.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:Hs,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:Nr.J,deps:{languageApi:Hs},factory:({languageApi:e})=>Bs.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:mn.B,deps:{},factory:()=>new Fr});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 jo(r){return new Mo(r)}function Bo(r){return jo({...r,apis:r?.apis??[],bindRoutes:r?.bindRoutes,components:{...B,...r?.components},configLoader:r?.configLoader,defaultApis:is,icons:{...As,...r?.icons},plugins:r?.plugins??[],featureFlags:r?.featureFlags??[],themes:r?.themes??ae})}var ts=t(82442);let dr=!1;const ur=r=>{const e=(0,sr.n)(),{NotFoundErrorPage:s}=e.getComponents(),o=(0,ht.useMemo)(()=>Dn(),[]),c=[...(0,ts.O)(r.children,b=>b.getElements().flatMap(x=>{let I=x.props.path;if(I==="")return[];I=I?.replace(/\/\*$/,"")??"/";let k=o?x:x.props.element;return!o&&!k&&(k=x,dr||(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] />} />."),dr=!0)),[{path:I,element:k,children:x.props.children?[{path:I==="/"?"/":"*",element:x.props.children}]:void 0}]}).sort((x,I)=>I.path.localeCompare(x.path)).map(x=>({...x,path:x.path==="/"?"/":`${x.path}/*`}))),{path:"*",element:(0,a.jsx)(s,{})}];return(0,h.Ye)(c)};(0,Se.h)(ur,"core.type","FlatRoutes");var vn=t(6820),Uo=t(78692),$o=t(86519);function Fo(r){return!r.cursor}function No(r,e){if(!r.length)return[];const{maxCountPerChunk:s=1e3,maxStringLengthPerChunk:o=90*2**10,extraStringLengthPerRef:i=3}=e??{},c=[];let b=0,x=0,I=0;for(let k=0;k<r.length;++k){const q=r[k].length+i;I>0&&(x+q>o||I+1>s)&&(c.push(r.slice(b,k)),b=k,x=0,I=0),x+=q,I+=1}return c.push(r.slice(b,r.length)),c}const Ae="catalog";var xe=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(Ae),c=xe.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"DELETE"})}async getEntities(e,s){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities{?fields,limit,filter*,offset,after,order*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntitiesByQuery(e,s){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-query{?fields,limit,offset,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntitiesByRefs(e,s){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-refs{?filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async getEntityAncestryByName(e,s){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-name/{kind}/{namespace}/{name}/ancestry").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityByName(e,s){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-name/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityByUid(e,s){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityFacets(e,s){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/entity-facets{?facet*,filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async refreshEntity(e,s){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.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(Ae),c=xe.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(Ae),c=xe.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(Ae),c=xe.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(Ae),c=xe.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(Ae),c=xe.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(Ae),c=xe.parse("/locations/by-entity/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocations(e,s){const o=await this.discoveryApi.getBaseUrl(Ae),c=xe.parse("/locations").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}}class Wo{apiClient;constructor(e){this.apiClient=new ko(e)}async getEntityAncestors(e,s){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,vn.KU)(e.entityRef)},s))}async getLocationById(e,s){return await this.requestOptional(await this.apiClient.getLocation({path:{id:e}},s))}async getLocationByEntity(e,s){return await this.requestOptional(await this.apiClient.getLocationByEntity({path:(0,vn.KU)(e)},s))}async getEntities(e,s){const{filter:o=[],fields:i=[],order:c,offset:b,limit:x,after:I}=e??{},k=[];if(c)for(const pt of[c].flat())pt&&k.push(`${pt.order}:${pt.field}`);return{items:await this.requestRequired(await this.apiClient.getEntities({query:{fields:i,limit:x,filter:this.getFilterValue(o),offset:b,after:I,order:c?k:void 0}},s))}}async getEntitiesByRefs(e,s){const o=async c=>{const b=await this.apiClient.getEntitiesByRefs({body:{entityRefs:c,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},s);if(!b.ok)throw await De.o.fromResponse(b);return(await b.json()).items.map(I=>I??void 0)};let i;for(const c of No(e.entityRefs)){const b=await o(c);i?i.push(...b):i=b}return{items:i??[]}}async queryEntities(e={},s){const o={};if(Fo(e)){const{fields:i=[],filter:c,limit:b,offset:x,orderFields:I,fullTextFilter:k}=e;o.filter=this.getFilterValue(c),b!==void 0&&(o.limit=b),x!==void 0&&(o.offset=x),I!==void 0&&(o.orderField=(Array.isArray(I)?I:[I]).map(({field:pt,order:ot})=>`${pt},${ot}`)),i.length&&(o.fields=i);const q=k?.term?.trim();q&&(o.fullTextFilterTerm=q),k?.fields?.length&&(o.fullTextFilterFields=k.fields)}else{const{fields:i=[],limit:c,cursor:b}=e;o.cursor=b,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,vn.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,b=await this.apiClient.createLocation({body:{type:o,target:i},query:{dryRun:c?"true":void 0}},s);if(b.status!==201)throw new Error(await b.text());const{location:x,entities:I,exists:k}=await b.json();if(!x)throw new Error(`Location wasn't added: ${i}`);return{location:x,entities:I,exists:k}}async getLocationByRef(e,s){return(await this.requestRequired(await this.apiClient.getLocations({},s))).map(i=>i.data).find(i=>e===(0,Uo.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,b]of Object.entries(o))for(const x of[b].flat())x===$o.c?i.push(c):typeof x=="string"&&i.push(`${c}=${x}`);i.length&&s.push(i.join(","))}return s}}var hr=t(7341),Ko=t(18),zo=t(82292),gr=t(29207),En=t(95203),Ho=t(9803),Re=t(88758),Vo=t(54560),An=t(45250);async function Go({storageApi:r}){const e=r.forBucket("settings"),s=r.forBucket("starredEntities"),o=e.snapshot("starredEntities").value;if(!(0,An.isArray)(o))return;const i=new Set(s.snapshot("entityRefs").value??[]);o.filter(An.isString).map(c=>c.split(":")).filter(c=>c.length===4&&c[0]==="entity").map(([c,b,x,I])=>(0,vn.U2)({kind:b,namespace:x,name:I})).forEach(c=>i.add(c)),await s.set("entityRefs",Array.from(i)),await e.remove("starredEntities")}class Yo{settingsStore;starredEntities;constructor(e){Go(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:b=0,seconds:x=0,milliseconds:I=0}=r;return((((e*365+s*30+o*7+i)*24+c)*60+b)*60+x)*1e3+I}var Qo=t(25033),Zo=t.n(Qo),Jo=t(88083);const Xo={seconds:10},_o={milliseconds:50},qo={api:Un.A,component:Fn.A,system:Mn.A,resource:Nn.A,domain:bn.A,location:$n.A,user:On.A,group:Sn.A,template:kn.A};function pr(r){return{async:r.async,render:({entityRef:e,entity:s,context:o})=>({snapshot:(0,Jo.T)(s||e,o),loadEntity:r.async})}}class ta 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 es{static createLocal(){return new es({renderer:pr({async:!1})})}static create(e){return new es(e)}#t;#e;#n;#s;#r;constructor(e){const s=e.cacheTtl??Xo,o=e.batchDelay??_o,i=e.renderer??pr({async:!0}),c={};if(Object.entries(qo).forEach(([b,x])=>{c[b.toLocaleLowerCase("en-US")]=x}),Object.entries(e.kindIcons??{}).forEach(([b,x])=>{c[b.toLocaleLowerCase("en-US")]=x}),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:b}=this.#o(e),x=ot=>{const{snapshot:At}=this.#r.render({entityRef:o,loading:ot.loading,entity:ot.entity,context:s||{}});return{...At,entityRef:o,Icon:this.#i(At.Icon,i)}};let I;try{I=x({loading:b,entity:c})}catch{I={primaryTitle:o,entityRef:o}}if(!b)return{snapshot:I,promise:Promise.resolve(I)};const k=Promise.resolve().then(()=>this.#n?.load(o)).then(ot=>x({loading:!1,entity:ot??c})).catch(()=>{}),q=new(Y())(ot=>{let At=!1;return k.then(Lt=>{Lt&&ot.next(Lt)}).finally(()=>{At||ot.complete()}),()=>{At=!0}}),pt=k.then(ot=>ot??I);return{snapshot:I,update$:q,promise:pt}}#o(e){if(typeof e!="string")return{entity:e,kind:e.kind,entityRef:(0,vn.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,vn.KU)(e).kind,entityRef:e,needsLoad:c}}#a(e){const s=Us(e.cacheTtl),o=Us(e.batchDelay);return new(Zo())(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"]}),b=Date.now();return i.forEach((x,I)=>{this.#t.set(x,{updatedAt:b,entity:c[I]})}),c},{name:"DefaultEntityPresentationApi",cacheMap:new ta(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 Oe=(0,Ho.i)({id:"catalog",apis:[(0,X.b)({api:hr.v,deps:{discoveryApi:st.I,fetchApi:Gt.a},factory:({discoveryApi:r,fetchApi:e})=>new Wo({discoveryApi:r,fetchApi:e})}),(0,X.b)({api:Ko.a,deps:{storageApi:Ue},factory:({storageApi:r})=>new Yo({storageApi:r})}),(0,X.b)({api:zo.n,deps:{catalogApi:hr.v},factory:({catalogApi:r})=>es.create({catalogApi:r})})],routes:{catalogIndex:En.rQ,catalogEntity:gr.s},externalRoutes:{createComponent:En.qP,viewTechDoc:En.UJ,createFromTemplate:En.Zg,unregisterRedirect:En.pS}}),gi=Oe.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:En.rQ})),ea=Oe.provide((0,Re.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(r=>r.CatalogEntityPage),mountPoint:gr.s})),pi=Oe.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)}})),fi=Oe.provide((0,Re.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),mi=Oe.provide((0,Re.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),yi=Oe.provide((0,Re.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),vi=Oe.provide((0,Re.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),Ei=Oe.provide((0,Re.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),Ai=Oe.provide((0,Re.NC)({name:"EntityHasSubdomainsCard",component:{lazy:()=>t.e(6415).then(t.bind(t,46415)).then(r=>r.HasSubdomainsCard)}})),xi=Oe.provide((0,Re.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),Ci=Oe.provide((0,Re.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),bi=Oe.provide((0,Re.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),Si=Oe.provide((0,Re.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),Oi=Oe.provide((0,Re.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),Pi=Oe.provide((0,Vo.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var fr=t(96726),mr=t(26679);class na{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:o}){this.configApi=e,this.discoveryApi=s,this.identityApi=o}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(e,s){const i=`${await this.getApiOrigin()}/${s}`,c=await fetch(`${i.endsWith("/")?i:`${i}/`}index.html`);if(c.status===404)throw new Error("Page not found");return c.text()}async syncEntityDocs(e){return"cached"}async getBaseUrl(e,s,o){const i=await this.getApiOrigin();return new URL(e,`${i}/${o}`).toString()}}class sa{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:o}){this.configApi=e,this.discoveryApi=s,this.identityApi=o}async getCookie(){return{expiresAt:new Date(Date.now()+6e5).toISOString()}}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(e){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(e){return{site_name:"Live preview environment",site_description:""}}}const ra=[(0,X.b)({api:mr.s,deps:{configApi:Rt.U,discoveryApi:st.I,identityApi:ue.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new na({configApi:r,discoveryApi:e,identityApi:s})}),(0,X.b)({api:mr.l,deps:{configApi:Rt.U,discoveryApi:st.I,identityApi:ue.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new sa({configApi:r,discoveryApi:e,identityApi:s})}),(0,X.b)({api:fr.Y,deps:{configApi:Rt.U},factory:({configApi:r})=>fr.L.fromConfig(r)})],oa={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},aa={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function ia(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function ca(){const r=await er(),e=await ia();return[...r,{context:"detected",data:e?oa:aa}]}var Xe=t(58837),la=t(3210);const da=(0,Xe.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}}),ua=()=>{const r=da();return(0,a.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,a.jsx)("path",{className:r.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"})})},ha=(0,Xe.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}}),ga=()=>{const r=ha();return(0,a.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,a.jsx)("path",{className:r.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"})})};var Ce=t(72664);const yr={isOpen:!1,setOpen:()=>{}},vr=(0,ht.createContext)(yr),Er=(0,ce.tK)("sidebar-open-state-context");function Ar(r){const{children:e,value:s}=r;return(0,a.jsx)(vr.Provider,{value:s,children:(0,a.jsx)(Er.Provider,{value:(0,ke.B)({1:s}),children:e})})}const $s=()=>{const r=(0,ht.useContext)(Er),e=(0,ht.useContext)(vr);if(r===void 0)return e||yr;const s=r.atVersion(1);if(s===void 0)throw new Error("No context found for version 1.");return s};var xr=t(72072),Cr=t(73524),en=t(10394),br=t(5893),pa=t(53373),ln=t.n(pa),fa=t(1125),Sr=t(29365),ma=t(73845),Fs=t(72501),ya=t(32881),va=t(27326),Ea=t(13085);const Or=(0,ht.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var Ns=t(34435);const Aa=(0,Xe.A)(r=>({root:{flexGrow:0,margin:r.spacing(0,2),color:r.palette.navigation.color},selected:e=>({color:`${r.palette.navigation.selectedColor}!important`,borderTop:`solid ${e.sidebarConfig.selectedIndicatorWidth}px ${r.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),xa=r=>{const{to:e,label:s,icon:o,value:i}=r,{sidebarConfig:c}=(0,ht.useContext)(Ce.yY),b=Aa({sidebarConfig:c}),x=(0,h.zy)(),{selectedMenuItemIndex:I,setSelectedMenuItemIndex:k}=(0,ht.useContext)(Or),q=(ot,At)=>{k(At===I?-1:At)},pt=i===I&&I>=0||i!==I&&!(I>=0)&&e===x.pathname;return(0,a.jsx)(Ea.A,{"aria-label":s,label:s,icon:o,component:xr.N_,to:e||x.pathname,onChange:q,value:i,selected:pt,classes:b})},Pr=r=>{const{children:e,to:s,label:o,icon:i,value:c}=r,{isMobile:b}=(0,Ns.Ut)();return b?(0,a.jsx)(xa,{to:s,label:o,icon:i,value:c}):(0,a.jsx)(a.Fragment,{children:e})},Tr=(0,Xe.A)(r=>({root:{position:"fixed",backgroundColor:r.palette.navigation.background,color:r.palette.navigation.color,bottom:0,left:0,right:0,zIndex:r.zIndex.snackbar,borderTop:"1px solid #383838","@media print":{display:"none"}},overlay:e=>({background:r.palette.navigation.background,width:"100%",bottom:`${e.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${e.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:r.palette.navigation.color,alignItems:"center",justifyContent:"space-between",padding:r.spacing(2,3)},overlayHeaderClose:{color:r.palette.navigation.color},marginMobileSidebar:e=>({marginBottom:`${e.sidebarConfig.mobileSidebarHeight}px`})})),Ca=r=>(0,An.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),ba=(0,ht.createElement)(Pr).type,Sa=({children:r,label:e="Menu",open:s,onClose:o})=>{const{sidebarConfig:i}=(0,ht.useContext)(Ce.yY),c=Tr({sidebarConfig:i});return(0,a.jsxs)(ma.Ay,{anchor:"bottom",open:s,onClose:o,ModalProps:{BackdropProps:{classes:{root:c.marginMobileSidebar}}},classes:{root:c.marginMobileSidebar,paperAnchorBottom:c.overlay},children:[(0,a.jsxs)(en.A,{className:c.overlayHeader,children:[(0,a.jsx)(Fs.A,{variant:"h3",children:e}),(0,a.jsx)(Sr.A,{onClick:o,classes:{root:c.overlayHeaderClose},children:(0,a.jsx)(ya.A,{})})]}),(0,a.jsx)(en.A,{component:"nav",children:r})]})},Oa=r=>{const{sidebarConfig:e}=(0,ht.useContext)(Ce.yY),{children:s}=r,o=Tr({sidebarConfig:e}),i=(0,h.zy)(),[c,b]=(0,ht.useState)(-1);(0,ht.useEffect)(()=>{b(-1)},[i.pathname]);let x=(0,ts.O)(s,k=>k.getElements().filter(q=>q.type===ba));if(s)x.length?x=Ca(x):x.push((0,a.jsx)(Pr,{icon:(0,a.jsx)(va.A,{}),children:s},"default_menu"));else return null;const I=c>=0&&!x[c].props.to;return(0,a.jsx)(Ar,{value:{isOpen:!0,setOpen:()=>{}},children:(0,a.jsxs)(Or.Provider,{value:{selectedMenuItemIndex:c,setSelectedMenuItemIndex:b},children:[(0,a.jsx)(Sa,{label:x[c]&&x[c].props.label,open:I,onClose:()=>b(-1),children:x[c]&&x[c].props.children}),(0,a.jsx)(fa.A,{className:o.root,"data-testid":"mobile-sidebar-root",component:"nav",children:x})]})})};var Pa=t(87849),Ta=t(10315);const wr=(0,Xe.A)(r=>({drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:r.zIndex.appBar,background:r.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"},"@media print":{display:"none"}},drawerWidth:e=>({width:e.sidebarConfig.drawerWidthClosed}),drawerOpen:e=>({width:e.sidebarConfig.drawerWidthOpen,transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var wa=function(r){return r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open",r}(wa||{});const Ra=r=>{const{sidebarConfig:e}=(0,ht.useContext)(Ce.yY),{openDelayMs:s=e.defaultOpenDelayMs,closeDelayMs:o=e.defaultCloseDelayMs,disableExpandOnHover:i,children:c}=r,b=wr({sidebarConfig:e}),x=(0,br.A)(Me=>Me.breakpoints.down("md"),{noSsr:!0}),[I,k]=(0,ht.useState)(0),q=(0,ht.useRef)(),{isPinned:pt,toggleSidebarPinState:ot}=(0,Ns.Ut)(),At=()=>{pt||i||(q.current&&(clearTimeout(q.current),q.current=void 0),I!==2&&!x&&(q.current=window.setTimeout(()=>{q.current=void 0,k(2)},s),k(1)))},Lt=()=>{pt||i||(q.current&&(clearTimeout(q.current),q.current=void 0),I===1?k(0):I===2&&(q.current=window.setTimeout(()=>{q.current=void 0,k(0)},o)))},Yt=I===2&&!x||pt,Pe=Me=>{Me?(k(2),ot()):(k(0),ot())};return(0,a.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,a.jsx)(Da,{}),(0,a.jsx)(Ar,{value:{isOpen:Yt,setOpen:Pe},children:(0,a.jsx)(en.A,{className:b.root,"data-testid":"sidebar-root",onMouseEnter:i?()=>{}:At,onFocus:i?()=>{}:At,onMouseLeave:i?()=>{}:Lt,onBlur:i?()=>{}:Lt,children:(0,a.jsx)(en.A,{className:ln()(b.drawer,b.drawerWidth,{[b.drawerOpen]:Yt}),children:c})})})]})},Ia=r=>{const e=(0,Ce.Rv)(r.sidebarOptions??{}),s=(0,Ce.i8)(r.submenuOptions??{}),{children:o,disableExpandOnHover:i,openDelayMs:c,closeDelayMs:b}=r,{isMobile:x}=(0,Ns.Ut)();return x?(0,a.jsx)(Oa,{children:o}):(0,a.jsx)(Ce.yY.Provider,{value:{sidebarConfig:e,submenuConfig:s},children:(0,a.jsx)(Ra,{openDelayMs:c,closeDelayMs:b,disableExpandOnHover:i,children:o})})};function Da(){const{sidebarConfig:r}=(0,ht.useContext)(Ce.yY),{focusContent:e,contentRef:s}=(0,Cr.H)(),o=wr({sidebarConfig:r}),{t:i}=(0,Pa.i)(Ta.O);return s?.current?(0,a.jsx)(u.A,{onClick:e,variant:"contained",className:ln()(o.visuallyHidden),children:i("skipToContent")}):null}var La=t(94509),ns=t(58502),Ma=t(79065),ja=t(55704),Rr=t(62248);const Ba=(0,Xe.A)(r=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:r.spacing(7)+1},drawer:e=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",opacity:0,[r.breakpoints.up("sm")]:{marginLeft:e.left,transition:r.transitions.create(["margin-left","opacity"],{easing:r.transitions.easing.sharp,duration:e.submenuConfig.defaultOpenDelayMs})},top:0,bottom:0,padding:0,background:r.palette.navigation.submenu?.background??"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:e.submenuConfig.drawerWidthClosed,transitionDelay:`${e.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:e=>({marginLeft:e.left,opacity:1,width:e.submenuConfig.drawerWidthOpen,[r.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:r.spacing(3),left:0,top:0}}),title:{fontSize:r.typography.h5.fontSize,fontWeight:r.typography.fontWeightMedium,color:r.palette.navigation.color,padding:r.spacing(2.5),[r.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),Ua=r=>{const{isOpen:e}=$s(),{sidebarConfig:s,submenuConfig:o}=(0,ht.useContext)(Ce.yY),i=e?s.drawerWidthOpen:s.drawerWidthClosed,c=Ba({left:i,submenuConfig:o}),{isHoveredOn:b}=(0,ht.useContext)(Ce.U1),[x,I]=(0,ht.useState)(!1);return(0,ht.useEffect)(()=>{I(b)},[b]),(0,a.jsxs)(en.A,{className:ln()(c.drawer,{[c.drawerOpen]:x}),children:[(0,a.jsx)(Fs.A,{variant:"h5",component:"span",className:c.title,children:r.title}),r.children]})};var $a=t(45810),Ir=t.n($a);function Dr(r,e,s=!1){const o=new URLSearchParams(e.search).toString(),i=Ir().parse(o),c=new URLSearchParams(r.search).toString(),b=Ir().parse(c),x=s?An.isEqual:An.isMatch;return(0,An.isEqual)(e.pathname,r.pathname)&&x(b,i)}const Fa=r=>(0,Xe.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 ss(r){return(0,ht.useMemo)(()=>Fa(r),[r])()}const Na=(r,e)=>(0,ts.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:b})=>o=o||Dr(e,(0,Rn.o1)(b)));return}i&&(o=Dr(e,(0,Rn.o1)(i)))}}),o},[e.pathname]);function ks(r){return r.to===void 0}const ka=(0,ht.createElement)(Ua).type,Wa=(0,ht.forwardRef)(function({to:e,end:s,style:o,className:i,activeStyle:c,caseSensitive:b,activeClassName:x="active","aria-current":I="page",...k},q){let{pathname:pt}=(0,h.zy)(),{pathname:ot}=(0,h.x$)(e);b||(pt=pt.toLocaleLowerCase("en-US"),ot=ot.toLocaleLowerCase("en-US"));let At=pt===ot;!At&&!s&&(At=pt.startsWith(`${ot}/`));const Lt=At?I:void 0;return(0,a.jsx)(O.N_,{...k,to:e,ref:q,"aria-current":Lt,style:{...o,...At?c:void 0},className:ln()([typeof i!="function"?i:void 0,At?x:void 0])})}),Lr=(0,ht.forwardRef)((r,e)=>{const{icon:s,text:o,hasNotifications:i=!1,hasSubmenu:c=!1,disableHighlight:b=!1,onClick:x,noTrack:I,children:k,className:q,...pt}=r,{sidebarConfig:ot}=(0,ht.useContext)(Ce.yY),At=ss(ot),{isOpen:Lt}=$s(),Yt=!Lt&&c?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},Pe=(0,a.jsxs)(en.A,{style:Yt,children:[(0,a.jsx)(s,{fontSize:"small"}),!Lt&&c?(0,a.jsx)(Rr.A,{fontSize:"small"}):(0,a.jsx)(a.Fragment,{})]}),Me=(0,a.jsx)(La.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!i,className:ln()({[At.closedItemIcon]:!Lt}),children:Pe}),Ie=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(en.A,{"data-testid":"login-button",className:At.iconContainer,children:Me}),o&&(0,a.jsx)(Fs.A,{variant:"subtitle2",component:"span",className:At.label,children:o}),(0,a.jsx)("div",{className:At.secondaryAction,children:k})]}),dn=Lt?Ie:Me,Br={onClick:x,className:ln()(q,At.root,Lt?At.open:At.closed,ks(r)&&At.buttonItem,{[At.highlightable]:!b})},Ur=(0,rr.s)(),{pathname:Ws}=(0,h.x$)(!ks(r)&&r.to?r.to:""),$r=(0,ht.useCallback)(li=>{if(!I){const di="click",ui=o??"Sidebar Item",hi=Ws?{attributes:{to:Ws}}:void 0;Ur.captureEvent(di,ui,hi)}x?.(li)},[Ur,o,Ws,I,x]);return ks(r)?(0,a.jsx)(u.A,{role:"button","aria-label":o,...Br,ref:e,onClick:$r,children:dn}):(0,a.jsx)(Wa,{...Br,activeClassName:At.selected,to:r.to?r.to:"",ref:e,"aria-label":o||r.to,...pt,onClick:$r,children:dn})}),Ka=({children:r,...e})=>{const{sidebarConfig:s}=(0,ht.useContext)(Ce.yY),o=ss(s),[i,c]=(0,ht.useState)(!1),b=(0,h.zy)(),x=Na(r,b),I=(0,br.A)(ot=>ot.breakpoints.down("sm")),k=()=>{c(!0)},q=()=>{c(!1)},pt=()=>I?i?(0,a.jsx)(ja.A,{fontSize:"small",className:o.submenuArrow}):(0,a.jsx)(Ma.A,{fontSize:"small",className:o.submenuArrow}):!i&&(0,a.jsx)(Rr.A,{fontSize:"small",className:o.submenuArrow});return(0,a.jsx)(Ce.U1.Provider,{value:{isHoveredOn:i,setIsHoveredOn:c},children:(0,a.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:q,onTouchStart:i?q:k,onMouseEnter:k,className:ln()(i&&o.highlighted),children:[(0,a.jsx)(Lr,{hasSubmenu:!0,className:x?o.selected:"",...e,children:pt()}),i&&r]})})},Mr=(0,ht.forwardRef)((r,e)=>{const[s]=(0,ts.O)(r.children,o=>o.getElements().filter(i=>i.type===ka));return s?(0,a.jsx)(Ka,{...r,children:s}):(0,a.jsx)(Lr,{...r,ref:e})});function Ri(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[s,o]=useState(""),i=ss(e),c=r.icon?r.icon:SearchIcon,b=()=>{r.onSearch(s),o("")},x=pt=>{pt.key==="Enter"&&(pt.preventDefault(),b())},I=pt=>{o(pt.target.value)},k=pt=>{pt.preventDefault(),pt.stopPropagation()},q=pt=>{b(),pt.preventDefault()};return _jsx(Box,{className:i.searchRoot,children:_jsx(Mr,{icon:c,to:r.to,onClick:q,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:s,onClick:k,onChange:I,onKeyDown:x,className:i.searchContainer,InputProps:{disableUnderline:!0,className:i.searchField},inputProps:{className:i.searchFieldHTMLInput}})})})}const Ii=(0,ns.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),Di=(0,ns.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),za=(0,ns.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Ha=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),Li=(0,ns.A)("div")(({theme:r})=>{const e=Ha(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),Mi=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=ss(r),{isOpen:s,setOpen:o}=useSidebarOpenState();if(useMediaQuery(b=>b.breakpoints.down("md"),{noSsr:!0}))return null;const c=()=>{o(!s)};return _jsx(Button,{role:"button",onClick:c,className:e.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:e.arrows,children:s?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},Va=(0,Xe.A)({root:{width:Ce.hC.drawerWidthClosed,height:3*Ce.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:Ce.hC.drawerWidthClosed,marginLeft:24}}),Ga=()=>{const r=Va(),{isOpen:e}=$s();return(0,a.jsx)("div",{className:r.root,children:(0,a.jsx)(xr.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,a.jsx)(ua,{}):(0,a.jsx)(ga,{})})})},Ya=({children:r})=>(0,a.jsxs)(Cr.G,{children:[(0,a.jsxs)(Ia,{children:[(0,a.jsx)(Ga,{}),(0,a.jsx)(za,{}),(0,a.jsx)(Mr,{icon:la.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Qa=t(71677),Za=t(62437),Ja=t(55484),Xa=t(45061),_a=t(67289);const qa=(0,Xe.A)(r=>({headerIcon:{color:r.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:r.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var ti=function(r){return r.LIGHT="light",r.DARK="dark",r}(ti||{});const ei=()=>{const r=(0,wn.gf)(Yn),e=qa(),[s,o]=(0,ht.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),i={light:{icon:Ja.A,title:"Dark theme"},dark:{icon:Za.A,title:"Light theme"}},{title:c,icon:b}=i[s],x=()=>{o(I=>{const k=I==="light"?"dark":"light";return r.setActiveThemeId(k),k})};return(0,a.jsx)(en.A,{display:"flex",alignItems:"center",mr:2,children:(0,a.jsx)(Qa.Ay,{title:c,arrow:!0,children:(0,a.jsx)(Sr.A,{size:"small",onClick:x,children:(0,a.jsx)(b,{className:e.headerIcon})})})})},ni=()=>(0,a.jsxs)(C.Wj,{children:[(0,a.jsx)(Xa.T,{}),(0,a.jsx)(_a.p,{withSearch:!1})]}),si=(0,a.jsx)(ni,{}),jr=Bo({apis:ra,configLoader:ca,plugins:Object.values(n)}),ri=jr.getProvider(),oi=jr.getRouter(),ai=C.Ju.provide((0,d.Hr)({name:"ThemeToggleAddon",component:ei,location:f.e.Header})),ii=(0,a.jsxs)(ur,{children:[(0,a.jsx)(h.C5,{to:"/docs/default/component/local/"},"/"),(0,a.jsx)(h.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,a.jsx)(ea,{})}),(0,a.jsx)(h.qh,{path:"/docs",element:(0,a.jsx)(C.$j,{}),children:(0,a.jsx)(g.K,{})}),(0,a.jsxs)(h.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,a.jsx)(C.Wj,{}),children:[si,(0,a.jsx)(d.po,{children:(0,a.jsx)(ai,{})})]})]}),ci=()=>(0,a.jsx)(ri,{children:(0,a.jsx)(oi,{children:(0,a.jsx)(Ya,{children:ii})})});E.createRoot(document.getElementById("root")).render((0,a.jsx)(ci,{}))},43836:(V,S,t)=>{"use strict";t.d(S,{qO:()=>h,tK:()=>E});var n=t(14041),a=t(63544);function E(g){return(0,a.Q)(g,()=>(0,n.createContext)(void 0))}function h(g){return(0,n.useContext)(E(g))}function C(g){return{set(d){globalThis[`__@backstage/${g}__`]=createContext(createVersionedValueMap(d))},reset(){delete globalThis[`__@backstage/${g}__`]}}}},10602:(V,S,t)=>{"use strict";t.d(S,{B:()=>n});function n(a){Object.freeze(a);const E={atVersion(h){return a[h]}};return Object.defineProperty(E,"$map",{configurable:!0,enumerable:!0,get(){return a}}),E}},63544:(V,S,t)=>{"use strict";t.d(S,{Q:()=>h});function n(){return typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")()}const a=n(),E=C=>`__@backstage/${C}__`;function h(C,g){const d=E(C);let f=a[d];return f||(f=g(),a[d]=f,f)}},7341:(V,S,t)=>{"use strict";t.d(S,{v:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.catalog.service"})},82292:(V,S,t)=>{"use strict";t.d(S,{n:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.catalog.entity-presentation"})},88083:(V,S,t)=>{"use strict";t.d(S,{T:()=>C});var n=t(6820),a=t(72348),E=t(46123),h=t.n(E);function C(u,y){const{kind:p,namespace:A,name:O,title:T,description:L,displayName:P,type:j}=d(u),B=(0,n.U2)({kind:p||"unknown",namespace:A||a.oQ,name:O||"unknown"}),F=f({kind:p,namespace:A,name:O,context:y}),W=[P,T,F].find(H=>H&&typeof H=="string"),J=[W!==B?B:void 0,j,L].filter(H=>H&&typeof H=="string").join(" | ");return{entityRef:B,primaryTitle:W,secondaryTitle:J||void 0,Icon:void 0}}const g=u=>!!u&&typeof u=="string";function d(u){if(typeof u=="string"){let y=u.indexOf(":");const p=u.indexOf("/");p!==-1&&p<y&&(y=-1);const A=y===-1?void 0:u.slice(0,y),O=p===-1?void 0:u.slice(y+1,p),T=u.slice(Math.max(y+1,p+1));return{kind:A,namespace:O,name:T}}if(typeof u=="object"&&u!==null){const y=[h()(u,"kind")].find(g),p=[h()(u,"metadata.namespace"),h()(u,"namespace")].find(g),A=[h()(u,"metadata.name"),h()(u,"name")].find(g),O=[h()(u,"metadata.title")].find(g),T=[h()(u,"metadata.description")].find(g),L=[h()(u,"spec.profile.displayName")].find(g),P=[h()(u,"spec.type")].find(g);return{kind:y,namespace:p,name:A,title:O,description:T,displayName:L,type:P}}return{}}function f(u){const y=u.kind?.toLocaleLowerCase("en-US")||"unknown",p=u.namespace||a.oQ,A=u.name||"unknown",O=u.context?.defaultKind?.toLocaleLowerCase("en-US"),T=u.context?.defaultNamespace?.toLocaleLowerCase("en-US");let L=A;return(T&&p.toLocaleLowerCase("en-US")!==T||p!==a.oQ)&&(L=`${p}/${L}`),O&&y.toLocaleLowerCase("en-US")!==O&&(L=`${y}:${L}`),L}},3169:(V,S,t)=>{"use strict";t.d(S,{f:()=>d});var n=t(6820),a=t(72427),E=t(14041),h=t(82292),C=t(88083);function g(f,u,y){const[p,A]=(0,E.useState)(f);return(0,E.useEffect)(()=>{A(f);const O=u?.subscribe({next:T=>{A(T)},complete:()=>{O?.unsubscribe()}});return()=>{O?.unsubscribe()}},y),p}function d(f,u){const p=(0,a.Q2)().get(h.n),A=[p,JSON.stringify(f),JSON.stringify(u||null)],O=(0,E.useMemo)(()=>{if(!p){const T=(0,C.T)(f,u);return{snapshot:T,promise:Promise.resolve(T)}}return p.forEntity(typeof f=="string"||"metadata"in f?f:(0,n.U2)(f),u)},A);return g(O.snapshot,O.update$,[O])}},18:(V,S,t)=>{"use strict";t.d(S,{a:()=>a});var n=t(55309);const a=(0,n.y)({id:"catalog-react.starred-entities"})},22995:(V,S,t)=>{"use strict";t.d(S,{Q:()=>H});var n=t(31085),a=t(10394),E=t(72501),h=t(4321),C=t(87263),g=t(16249),d=t(33145),f=t(58837),u=t(87051),y=t(12398),p=t(6924),A=t(20577),O=t(14041),T=t(45250),L=t.n(T),P=t(53373),j=t.n(P);const B=(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"}),F=(0,u.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"})(A.Ay),W=Y=>(0,n.jsx)(C.A,{...Y,transition:!0,placement:"bottom-start",children:({TransitionProps:K})=>(0,n.jsx)(d.A,{...K,style:{transformOrigin:"0 0 0"},children:(0,n.jsx)(a.A,{children:Y.children})})}),J=Y=>(0,n.jsx)(h.A,{...Y,elevation:8});function H(Y){const{label:K,name:dt,LabelProps:G,TextFieldProps:Q,...Z}=Y,it=B(),ft=(0,O.useCallback)(xt=>(0,n.jsx)(g.A,{...(0,T.merge)(xt,Q),variant:"outlined"}),[Q]),vt=(0,n.jsx)(F,{size:"small",...Z,renderInput:Z.renderInput??ft,popupIcon:(0,n.jsx)(p.A,{"data-testid":`${dt}-expand`}),PaperComponent:J,PopperComponent:W});return(0,n.jsx)(a.A,{className:it.root,children:K?(0,n.jsxs)(E.A,{...G,className:j()(it.label,G?.className),component:"label",children:[(0,n.jsx)(a.A,{component:"span",children:K}),vt]}):vt})}},54203:(V,S,t)=>{"use strict";t.d(S,{GI:()=>L});var n=t(31085),a=t(14041),E=t(10394),h=t(64947),C=t(73845),g=t(42899),d=t(72501),f=t(5893),u=t(54917),y=t(65859),p=t(64630),A=t(87849);const O=P=>{const j=(0,f.A)(H=>H.breakpoints.down(P.options?.drawerBreakpoint??"md"),{noSsr:!0}),B=(0,u.A)(),[F,W]=(0,a.useState)(!1),{t:J}=(0,A.i)(p.j);return j?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.A,{style:{marginTop:B.spacing(1),marginLeft:B.spacing(1)},onClick:()=>W(!0),startIcon:(0,n.jsx)(y.A,{}),children:J("catalogFilter.buttonTitle")}),(0,n.jsx)(C.Ay,{open:F,onClose:()=>W(!1),anchor:P.options?.drawerAnchor??"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,n.jsxs)(E.A,{m:2,children:[(0,n.jsx)(d.A,{variant:"h6",component:"h2",style:{marginBottom:B.spacing(1)},children:J("catalogFilter.title")}),P.children]})})]}):(0,n.jsx)(g.A,{item:!0,lg:2,children:P.children})},T=P=>(0,n.jsx)(g.A,{item:!0,xs:12,lg:10,children:P.children}),L=P=>(0,n.jsx)(g.A,{container:!0,style:{position:"relative"},children:P.children});L.Filters=O,L.Content=T},47144:(V,S,t)=>{"use strict";t.d(S,{y:()=>J});var n=t(31085),a=t(10394),E=t(58837),h=t(14041),C=t(72427),g=t(73466),d=t(7341),f=t(69076),u=t(86901),y=t(44148),p=t(41260);const A=(0,n.jsx)(p.A,{fontSize:"small"}),O=(0,n.jsx)(y.A,{fontSize:"small"});function T({selected:H}){return(0,n.jsx)(f.A,{icon:A,checkedIcon:O,checked:H})}const L=(0,h.memo)(H=>{const{selected:Y,value:K,availableOptions:dt,showCounts:G}=H,Q=G?`${K} (${dt?.[K]})`:K;return(0,n.jsx)(u.A,{control:(0,n.jsx)(T,{selected:Y}),label:Q,onClick:Z=>Z.preventDefault()})});var P=t(21405),j=t(26796),B=t(22995),F=t(45250);const W=(0,E.A)({root:{},label:{textTransform:"none",fontWeight:"bold"}},{name:"CatalogReactEntityAutocompletePicker"});function J(H){const{label:Y,name:K,path:dt,showCounts:G,Filter:Q,InputProps:Z,initialSelectedOptions:it=[],filtersForAvailableValues:ft=["kind"],hidden:vt}=H,xt=W(),{updateFilters:Ot,filters:It,queryParameters:{[K]:ut}}=(0,P.nK)(),ct=(0,C.gf)(d.v),Ct=ft.map(nt=>It[nt]),{value:mt}=(0,g.A)(async()=>{const nt=dt,{facets:M}=await ct.getEntityFacets({facets:[nt],filter:(0,j.Rr)(Ct.filter(Boolean))});return Object.fromEntries(M[nt].map(({value:z,count:lt})=>[z,lt]))},[...Ct]),St=(0,h.useMemo)(()=>[ut].flat().filter(Boolean),[ut]),Tt=It[K]?.values,[at,yt]=(0,h.useState)(St.length?St:Tt??it);(0,h.useEffect)(()=>{St.length&&yt(St)},[St]);const Et=Object.keys(mt??{}),et=at.length&&Et.length;(0,h.useEffect)(()=>{Ot({[K]:et?new Q(at):void 0})},[K,et,at,Q,Ot]),(0,h.useEffect)(()=>{if(!et)return;const nt=Tt??[];(0,F.isEqual)(nt,at)||yt(nt)},[Tt]);const gt=It[K];return gt&&typeof gt=="object"&&!("values"in gt)||!Et.length||vt?null:(0,n.jsx)(a.A,{className:xt.root,pb:1,pt:1,children:(0,n.jsx)(B.Q,{multiple:!0,disableCloseOnSelect:!0,label:Y,name:`${String(K)}-picker`,options:Et,value:at,TextFieldProps:Z,onChange:(nt,M)=>yt(M),renderOption:(nt,{selected:M})=>(0,n.jsx)(L,{selected:M,value:nt,availableOptions:mt,showCounts:!!G})})})}},72987:(V,S,t)=>{"use strict";t.d(S,{t:()=>Tt});var n=t(31085),a=t(6820),E=t(10394),h=t(69076),C=t(86901),g=t(72501),d=t(71677),f=t(58837),u=t(44148),y=t(41260),p=t(14041),A=t(21405),O=t(92822),T=t(92367),L=t(48108),P=t(47966),j=t(90184),B=t(72427),F=t(87290),W=t(7341);function J({enabled:at}){const yt=(0,B.gf)(W.v),[Et]=(0,p.useState)(async()=>{if(!at)return[];const et="relations.ownedBy";return yt.getEntityFacets({facets:[et]}).then(gt=>gt.facets[et].map(nt=>nt.value).map(nt=>{const{kind:M,name:z,namespace:lt}=(0,a.KU)(nt);return{apiVersion:"backstage.io/v1beta1",kind:M,metadata:{name:z,namespace:lt}}}).sort((nt,M)=>nt.kind.localeCompare(M.kind,"en-US")||nt.metadata.namespace.localeCompare(M.metadata.namespace,"en-US")||nt.metadata.name.localeCompare(M.metadata.name,"en-US"))).catch(()=>[])});return(0,F.A)(async(et,gt)=>{const nt=await Et;if(!nt)return{items:[]};const M=gt?.limit??20,{text:z,start:lt}=H(et),wt=nt.filter($t=>dt(z,$t)),bt=lt+M;return{items:wt.slice(0,bt),...K({entities:wt,limit:bt,payload:{text:z,start:bt}})}},[Et],{loading:!0,value:{items:[]}})}function H(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:yt,payload:Et}){return at.length>yt?{cursor:btoa(JSON.stringify(Et))}:{}}function dt(at,yt){const Et=at.trim();return yt.kind.includes(Et)||yt.metadata.namespace?.includes(Et)||yt.metadata.name.includes(Et)}function G(){const at=(0,B.gf)(W.v);return(0,F.A)(async(yt,Et)=>{const et=yt,gt=yt,nt=Et?.limit??20;if(gt.cursor){const z=await at.queryEntities({cursor:gt.cursor,limit:nt});return{cursor:z.pageInfo.nextCursor,items:[...gt.items,...z.items]}}const M=await at.queryEntities({fullTextFilter:{term:et.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:nt});return{cursor:M.pageInfo.nextCursor,items:M.items}},[],{loading:!0})}var Q=t(76842);function Z({mode:at,initialSelectedOwnersRefs:yt}){const Et=at==="owners-only",et=G(),gt=J({enabled:Et}),[nt,M]=Et?gt:et;return[nt,M,it({enabled:!Et,initialSelectedOwnersRefs:yt})]}function it({enabled:at,initialSelectedOwnersRefs:yt}){const Et=(0,p.useRef)({}),et=(0,B.gf)(W.v),[,gt]=(0,F.A)(async()=>{(await et.getEntitiesByRefs({entityRefs:yt})).items.forEach(M=>{M&&(Et.current[(0,a.U2)(M)]=M)})},[]);return(0,Q.u)(()=>{at&&yt.length>0&&gt()}),{getEntity:nt=>Et.current[nt],setEntity:nt=>{Et.current[(0,a.U2)(nt)]=nt}}}var ft=t(87051),vt=t(3169),xt=t(64630),Ot=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"}),ct=(0,ft.A)(at=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(C.A),Ct=(0,n.jsx)(y.A,{fontSize:"small"}),mt=(0,n.jsx)(u.A,{fontSize:"small"});function St(at){const yt=ut(),Et=at.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:et}=(0,vt.f)(at.entity);return(0,n.jsx)(E.A,{className:yt.fullWidth,children:(0,n.jsx)(ct,{className:yt.fullWidth,control:(0,n.jsx)(h.A,{icon:Ct,checkedIcon:mt,checked:at.isSelected}),onClick:gt=>gt.preventDefault(),label:(0,n.jsx)(d.Ay,{title:et,children:(0,n.jsxs)(E.A,{display:"flex",alignItems:"center",children:[Et?(0,n.jsx)(P.A,{fontSize:"small"}):(0,n.jsx)(L.A,{fontSize:"small"}),"\xA0",(0,n.jsx)(E.A,{className:yt.boxLabel,children:(0,n.jsx)(g.A,{noWrap:!0,children:et})})]})})})})}const Tt=at=>{const yt=ut(),{mode:Et="owners-only"}=at||{},{updateFilters:et,filters:gt,queryParameters:{owners:nt}}=(0,A.nK)(),[M,z]=(0,p.useState)(""),{t:lt}=(0,Ot.i)(xt.j),wt=(0,p.useMemo)(()=>[nt].flat().filter(Boolean),[nt]),[bt,$t]=(0,p.useState)(wt.length?wt:gt.owners?.values??[]),[{value:Ft,loading:Nt},zt,Ht]=Z({mode:Et,initialSelectedOwnersRefs:bt});(0,T.s)(()=>zt({text:M}),[M,zt],250);const te=Ft?.items||[];return(0,p.useEffect)(()=>{if(wt.length){const jt=new O.N9(wt);$t(jt.values)}},[wt]),(0,p.useEffect)(()=>{et({owners:bt.length?new O.N9(bt):void 0})},[bt,et]),["user","group"].includes(gt.kind?.value.toLocaleLowerCase("en-US")||"")?null:(0,n.jsx)(E.A,{className:yt.root,pb:1,pt:1,children:(0,n.jsx)(It.Q,{label:lt("entityOwnerPicker.title"),multiple:!0,disableCloseOnSelect:!0,loading:Nt,options:te,value:bt,getOptionSelected:(jt,kt)=>typeof kt=="string"?(0,a.U2)(jt)===kt:jt===kt,getOptionLabel:jt=>{const kt=typeof jt=="string"?Ht.getEntity(jt)||(0,a.KU)(jt,{defaultKind:"group",defaultNamespace:"default"}):jt;return(0,j.Z)(kt,(0,j.S)(kt))},onChange:(jt,kt)=>{z(""),$t(kt.map(ee=>{const ge=typeof ee=="string"?ee:(0,a.U2)(ee);return typeof ee!="string"&&Ht.setEntity(ee),ge}))},filterOptions:jt=>jt,renderOption:(jt,{selected:kt})=>(0,n.jsx)(St,{entity:jt,isSelected:kt}),name:"owner-picker",onInputChange:(jt,kt)=>{z(kt)},ListboxProps:{onScroll:jt=>{const kt=jt.currentTarget;Math.abs(kt.scrollHeight-kt.clientHeight-kt.scrollTop)<1&&Ft?.cursor&&zt({items:Ft.items,cursor:Ft.cursor})},"data-testid":"owner-picker-listbox"},LabelProps:{className:yt.label},TextFieldProps:{className:yt.input}})})}},8859:(V,S,t)=>{"use strict";t.d(S,{z:()=>A});var n=t(31085),a=t(72072),E=t(9222),h=t(14041),C=t(29207),g=t(10394),d=t(71677),f=t(58837),u=t(3169);const y=(0,f.A)(T=>({root:{display:"inline-flex",alignItems:"center",textDecoration:"inherit"},icon:{marginRight:T.spacing(.5),color:T.palette.text.secondary,"& svg":{verticalAlign:"middle"}}}),{name:"CatalogReactEntityDisplayName"}),p=T=>{const{entityRef:L,hideIcon:P,disableTooltip:j,defaultKind:B,defaultNamespace:F}=T,W=y(),{primaryTitle:J,secondaryTitle:H,Icon:Y}=(0,u.f)(L,{defaultKind:B,defaultNamespace:F});let K=(0,n.jsx)(n.Fragment,{children:J});return K=(0,n.jsxs)(g.A,{component:"span",className:W.root,children:[Y&&!P?(0,n.jsx)(g.A,{component:"span",className:W.icon,children:(0,n.jsx)(Y,{fontSize:"inherit"})}):null,K]}),H&&!j&&(K=(0,n.jsx)(d.Ay,{enterDelay:1500,title:H,children:K})),K},A=(0,h.forwardRef)((T,L)=>{const{entityRef:P,defaultKind:j,defaultNamespace:B,title:F,children:W,hideIcon:J,disableTooltip:H,...Y}=T,K=O(T.entityRef),dt=W??F??(0,n.jsx)(p,{entityRef:P,defaultKind:j,defaultNamespace:B,hideIcon:J,disableTooltip:H});return(0,n.jsx)(a.N_,{...Y,ref:L,to:K,children:dt})});function O(T){const L=(0,E.S)(C.s),P=(0,C.$)(T,{encodeParams:!0});return L(P)}},34428:(V,S,t)=>{"use strict";t.d(S,{i:()=>C});var n=t(31085),a=t(6820),E=t(14041),h=t(8859);function C(g){const{entityRefs:d,hideIcons:f,...u}=g;return(0,n.jsx)(n.Fragment,{children:d.map((y,p)=>{const A=typeof y=="string"?y:(0,a.U2)(y);return(0,n.jsxs)(E.Fragment,{children:[p>0&&", ",(0,n.jsx)(h.z,{...u,entityRef:y,hideIcon:f})]},`${p}.${A}`)})})}},90184:(V,S,t)=>{"use strict";t.d(S,{S:()=>h,Z:()=>C});var n=t(72348),a=t(46123),E=t.n(a);function h(g,d){const f=d?.defaultKind;let u,y,p;return"metadata"in g?(u=g.kind,y=g.metadata.namespace,p=g.metadata.name):(u=g.kind,y=g.namespace,p=g.name),(y===void 0||y==="")&&(y=n.oQ),d?.defaultNamespace!==void 0?d?.defaultNamespace===y&&(y=void 0):y===n.oQ&&(y=void 0),u=u.toLocaleLowerCase("en-US"),u=f&&f.toLocaleLowerCase("en-US")===u?void 0:u,`${u?`${u}:`:""}${y?`${y}/`:""}${p}`}function C(g,d){for(const f of["spec.profile.displayName","metadata.title"]){const u=E()(g,f);if(u&&typeof u=="string")return u}return d}},91035:(V,S,t)=>{"use strict";t.d(S,{m:()=>f});var n=t(31085),a=t(58837),E=t(92822),h=t(47144),C=t(64630),g=t(87849);const d=(0,a.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),f=u=>{const y=d(),{t:p}=(0,g.i)(C.j);return(0,n.jsx)(h.y,{label:p("entityTagPicker.title"),name:"tags",path:"metadata.tags",Filter:E.q_,showCounts:u.showCounts,InputProps:{className:y.input},initialSelectedOptions:u.initialFilter?u.initialFilter:[],hidden:u.hidden})}},67626:(V,S,t)=>{"use strict";t.d(S,{y:()=>It});var n=t(31085),a=t(72427),E=t(65461),h=t(40703),C=t(58007),g=t(68804),d=t(65569),f=t(5951),u=t(26343),y=t(72501),p=t(58837),A=t(9684),O=t(31129),T=t(14041),L=t(92822),P=t(21405),j=t(16009),B=t(45250),F=t(73466),W=t(7341),J=t(26796),H=t(87290),Y=t(48899);function K(){const ut=(0,a.gf)(j.K),ct=(0,a.gf)(W.v),{filters:Ct}=(0,P.nK)(),{value:mt,loading:St}=(0,F.A)(async()=>(await ut.getBackstageIdentity()).ownershipEntityRefs,[]),{user:Tt,owners:at,...yt}=Ct,Et=(0,J.$3)((0,B.compact)(Object.values(yt))),[{value:et,loading:gt},nt]=(0,H.A)(async z=>{const lt=dt(z.owners,z.ownershipEntityRefs);if(lt===void 0)return 0;const{["metadata.name"]:wt,...bt}=z.filter.filter,{totalItems:$t}=await ct.queryEntities({...z.filter,filter:{...bt,"relations.ownedBy":lt},limit:0});return $t},[],{loading:!0});return(0,Y.A)(()=>{Object.keys(Et.filter).length!==0&&mt!==void 0&&nt({ownershipEntityRefs:mt,owners:at,filter:Et})},[mt,at,Et]),{count:et,loading:St||gt,filter:(0,T.useMemo)(()=>L.tN.owned(mt??[]),[mt]),ownershipEntityRefs:mt}}function dt(ut,ct){if(ct===void 0)return;const Ct=ut?.values??[];if(Ct.length){const mt=(0,B.intersection)(Ct,ct);return mt.length===0?void 0:mt}return ct}function G(){const ut=(0,a.gf)(W.v),{filters:ct}=(0,P.nK)(),Ct=(0,T.useRef)(),mt=(0,T.useMemo)(()=>{const{user:at,...yt}=ct,Et=(0,B.compact)(Object.values(yt)),et=(0,J.$3)(Et),gt={...et,limit:0};return Object.keys(et.filter).length===0?(Ct.current=void 0,Ct.current):(0,B.isEqual)(gt,Ct.current)?Ct.current:(Ct.current=gt,gt)},[ct]),{value:St,loading:Tt}=(0,F.A)(async()=>{if(mt===void 0)return 0;const{totalItems:at}=await ut.queryEntities(mt);return at},[mt]);return{count:St,loading:Tt}}var Q=t(6820),Z=t(56889);function it(){const ut=(0,a.gf)(W.v),{filters:ct}=(0,P.nK)(),{starredEntities:Ct}=(0,Z.I)(),mt=(0,T.useRef)(),St=(0,T.useMemo)(()=>{const{user:Et,...et}=ct,gt=(0,B.compact)(Object.values(et)),nt=(0,J.$3)(gt),z={...nt,filter:{...nt.filter,["metadata.name"]:Array.from(Ct).map(lt=>(0,Q.KU)(lt).name)},limit:1e3};return(0,B.isEqual)(z,mt.current)?mt.current:(mt.current=z,z)},[ct,Ct]),{value:Tt,loading:at}=(0,F.A)(async()=>Ct.size?(await ut.queryEntities(St)).items.map(et=>(0,Q.U2)({kind:et.kind,namespace:et.metadata.namespace,name:et.metadata.name})).filter(et=>Ct.has(et)).length:0,[St,Ct]),yt=(0,T.useMemo)(()=>L.tN.starred(Array.from(Ct)),[Ct]);return{count:Tt,loading:at,filter:yt}}var ft=t(87849),vt=t(64630);const xt=(0,p.A)(ut=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:ut.spacing(1,0,1,0)},title:{margin:ut.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:ut.palette.text.primary},menuItem:{minHeight:ut.spacing(6)},groupWrapper:{margin:ut.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Ot(ut,ct){return[{name:ct("userListPicker.personalFilter.title"),items:[{id:"owned",label:ct("userListPicker.personalFilter.ownedLabel"),icon:A.A},{id:"starred",label:ct("userListPicker.personalFilter.starredLabel"),icon:O.Gg}]},{name:ut,items:[{id:"all",label:ct("userListPicker.orgFilterAllLabel")}]}]}const It=ut=>{const{initialFilter:ct,availableFilters:Ct,hidden:mt,alwaysKeepFilters:St}=ut,Tt=xt(),at=(0,a.gf)(E.U),{t:yt}=(0,ft.i)(vt.j),Et=at.getOptionalString("organization.name")??yt("userListPicker.defaultOrgName"),{filters:et,updateFilters:gt,queryParameters:{kind:nt,user:M}}=(0,P.nK)(),z=["starred","all"],lt=Ot(Et,yt).map(Qt=>({...Qt,items:Qt.items.filter(({id:re})=>["group","user"].some(le=>le===nt)?z.includes(re):!Ct||Ct.includes(re))})).filter(({items:Qt})=>!!Qt.length),{count:wt,loading:bt,filter:$t}=K(),{count:Ft}=G(),{count:Nt,filter:zt,loading:Ht}=it(),te=(0,T.useMemo)(()=>[M].flat()[0],[M]),[jt,kt]=(0,T.useState)(te??ct),ee=(0,T.useMemo)(()=>({all:Ft,starred:Nt,owned:wt}),[Nt,wt,Ft]);(0,T.useEffect)(()=>{te&&kt(te)},[te]);const ge=bt||Ht;return(0,T.useEffect)(()=>{!ge&&jt&&jt!=="all"&&ee[jt]===0&&!St&&kt("all")},[ge,ee,jt,kt,St]),(0,T.useEffect)(()=>{if(!jt||ge)return;gt({user:jt==="owned"?$t:jt==="starred"?zt:L.tN.all()})},[jt,zt,$t,gt,ge]),mt?null:(0,n.jsx)(h.A,{className:Tt.root,children:lt.map(Qt=>(0,n.jsxs)(T.Fragment,{children:[(0,n.jsx)(y.A,{variant:"subtitle2",component:"span",className:Tt.title,children:Qt.name}),(0,n.jsx)(h.A,{className:Tt.groupWrapper,children:(0,n.jsx)(C.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":Qt.name,children:Qt.items.map((re,le)=>(0,n.jsxs)(u.A,{role:"none presentation",divider:le!==Qt.items.length-1,onClick:()=>kt(re.id),selected:re.id===et.user?.value,className:Tt.menuItem,disabled:ee[re.id]===0,"data-testid":`user-picker-${re.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[re.icon&&(0,n.jsx)(g.A,{className:Tt.listIcon,children:(0,n.jsx)(re.icon,{fontSize:"small"})}),(0,n.jsx)(f.A,{children:(0,n.jsxs)(y.A,{variant:"body1",children:[re.label," "]})}),(0,n.jsx)(d.A,{children:ee[re.id]??"-"})]},re.id))})})]},Qt.name))})}},92822:(V,S,t)=>{"use strict";t.d(S,{I5:()=>u,Kf:()=>O,N9:()=>f,V3:()=>d,gM:()=>h,gZ:()=>A,mT:()=>T,qA:()=>C,q_:()=>g,tN:()=>p,z:()=>y});var n=t(6820),a=t(51372),E=t(67871);class h{value;label;constructor(P,j){this.value=P,this.label=j}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class C{value;constructor(P){this.value=P}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class g{values;constructor(P){this.values=P}filterEntity(P){return this.values.every(j=>(P.metadata.tags??[]).includes(j))}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}}class d{value;constructor(P){this.value=P}filterEntity(P){const j=this.toUpperArray(this.value.split(/\s/)),B=this.toUpperArray([P.metadata.tags]),F=this.toUpperArray([P.metadata.name,P.metadata.title,P.spec?.profile?.displayName]);for(const W of j)if(B.every(J=>J!==W)&&F.every(J=>!J.includes(W)))return!1;return!0}getFullTextFilters(){return{term:this.value,fields:["metadata.name","metadata.title","spec.profile.displayName"]}}toQueryValue(){return this.value}toUpperArray(P){return P.flat().filter(j=>!!j).map(j=>j.toLocaleUpperCase("en-US"))}}class f{values;constructor(P){this.values=P.reduce((j,B)=>{try{return j.push((0,n.U2)((0,n.KU)(B,{defaultKind:"Group"}))),j}catch{return j}},[])}getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(P){return this.values.some(j=>(0,E.t)(P,a.vv).some(B=>(0,n.U2)(B)===j))}toQueryValue(){return this.values}}class u{values;constructor(P){this.values=P}getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(P){return this.values.some(j=>P.spec?.lifecycle===j)}toQueryValue(){return this.values}}class y{values;constructor(P){this.values=P}getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(P){return this.values.some(j=>P.metadata.namespace===j)}toQueryValue(){return this.values}}class p{value;refs;constructor(P,j){this.value=P,this.refs=j}static owned(P){return new p("owned",P)}static all(){return new p("all")}static starred(P){return new p("starred",P)}getCatalogFilters(){return this.value==="owned"?{"relations.ownedBy":this.refs??[]}:this.value==="starred"?{"metadata.name":this.refs?.map(P=>(0,n.KU)(P).name)??[]}:{}}filterEntity(P){if(this.value==="starred")return this.refs?.includes((0,n.U2)(P))??!0;if(this.value==="owned"){const j=(0,E.t)(P,a.vv);return this.refs?.some(B=>j.some(F=>(0,n.U2)(F)===B))??!1}return!0}toQueryValue(){return this.value}}class A{value;isOwnedEntity;isStarredEntity;constructor(P,j,B){this.value=P,this.isOwnedEntity=j,this.isStarredEntity=B}filterEntity(P){switch(this.value){case"owned":return this.isOwnedEntity(P);case"starred":return this.isStarredEntity(P);default:return!0}}toQueryValue(){return this.value}}class O{value;constructor(P){this.value=P}getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(P){const j=P.metadata.annotations?.["backstage.io/orphan"];return j!==void 0&&this.value.toString()===j}}class T{value;constructor(P){this.value=P}filterEntity(P){const j=P?.status?.items?.length>0;return j!==void 0&&this.value===j}}},21405:(V,S,t)=>{"use strict";t.d(S,{B9:()=>L,nK:()=>P});var n=t(31085),a=t(45250),E=t.n(a),h=t(45810),C=t.n(h),g=t(14041),d=t(18690),f=t(87290),u=t(22771),y=t(71581),p=t(7341),A=t(26796),O=t(72427);const T=(0,g.createContext)(void 0),L=j=>{const B=(0,y.A)(),F=(0,O.gf)(p.v),[W,J]=(0,g.useState)({}),H=(0,d.zy)(),K=j.pagination===!0?"cursor":typeof j.pagination=="object"?j.pagination.mode??"cursor":"none",dt=typeof j.pagination=="object"?j.pagination.limit??20:20,{queryParameters:G,cursor:Q,offset:Z,limit:it}=(0,g.useMemo)(()=>{const et=C().parse(H.search,{ignoreQueryPrefix:!0});let gt=dt;if(typeof et.limit=="string"){const M=Number.parseInt(et.limit,10);isNaN(M)||(gt=M)}const nt=typeof et.offset=="string"&&K==="offset"?Number.parseInt(et.offset,10):void 0;return{queryParameters:et.filters??{},cursor:typeof et.cursor=="string"&&K==="cursor"?et.cursor:void 0,offset:K==="offset"&&nt&&!isNaN(nt)?nt:void 0,limit:gt}},[K,H.search,dt]),[ft,vt]=(0,g.useState)(Q),[xt,Ot]=(0,g.useState)(Z),[It,ut]=(0,g.useState)(it),[ct,Ct]=(0,g.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:{},offset:xt,limit:It})),[{loading:mt,error:St},Tt]=(0,f.A)(async()=>{const et=(0,a.compact)(Object.values(W)),gt=Object.keys(W).reduce((nt,M)=>{const z=W[M];return z?.toQueryValue&&(nt[M]=z.toQueryValue()),nt},{});if(K!=="none")if(ft){if(ft!==ct.appliedCursor){const nt=(0,A.be)(et),M=await F.queryEntities({cursor:ft,limit:It});Ct({appliedFilters:W,appliedCursor:ft,backendEntities:M.items,entities:M.items.filter(nt),pageInfo:M.pageInfo,totalItems:M.totalItems})}}else{const nt=(0,A.be)(et),M=(0,A.$3)(et),z=(0,A.$3)((0,a.compact)(Object.values(ct.appliedFilters)));if(K==="offset"&&(ct.limit!==It||ct.offset!==xt)||!(0,a.isEqual)(z,M)){const lt=await F.queryEntities({...M,limit:It,offset:xt,orderFields:[{field:"metadata.name",order:"asc"}]});Ct({appliedFilters:W,backendEntities:lt.items,entities:lt.items.filter(nt),pageInfo:lt.pageInfo,totalItems:lt.totalItems,limit:It,offset:xt})}}else{const nt=(0,A.be)(et),M=(0,A.Rr)(et),z=(0,A.Rr)((0,a.compact)(Object.values(ct.appliedFilters)));if((0,a.isEqual)(z,M)){const lt=ct.backendEntities.filter(nt);Ct({appliedFilters:W,backendEntities:ct.backendEntities,entities:lt,totalItems:lt.length})}else{const lt=await F.getEntities({filter:M}),wt=lt.items.filter(nt);Ct({appliedFilters:W,backendEntities:lt.items,entities:wt,totalItems:wt.length})}}if(B()){const nt=C().parse(H.search,{ignoreQueryPrefix:!0}),M=C().stringify({...nt,filters:gt,cursor:ft,offset:xt,limit:It},{addQueryPrefix:!0,arrayFormat:"repeat"}),z=`${window.location.pathname}${M}`;window.history?.replaceState(null,document.title,z)}},[F,G,W,ct,ft,K,It,xt],{loading:!0});(0,u.A)(Tt,10,[W,ft,It,xt]);const at=(0,g.useCallback)(et=>{K==="cursor"?vt(void 0):K==="offset"&&Ot(0),J(gt=>{const nt=typeof et=="function"?et(gt):et;return{...gt,...nt}})},[K]),yt=(0,g.useMemo)(()=>{if(K!=="cursor")return;const et=ct.pageInfo?.prevCursor,gt=ct.pageInfo?.nextCursor;return{prev:et?()=>vt(et):void 0,next:gt?()=>vt(gt):void 0}},[K,ct.pageInfo]),Et=(0,g.useMemo)(()=>({filters:ct.appliedFilters,entities:ct.entities,backendEntities:ct.backendEntities,updateFilters:at,queryParameters:G,loading:mt,error:St,pageInfo:yt,totalItems:ct.totalItems,limit:It,offset:xt,setLimit:ut,setOffset:Ot,paginationMode:K}),[ct,at,G,mt,St,yt,It,xt,K,ut,Ot]);return(0,n.jsx)(T.Provider,{value:Et,children:j.children})};function P(){const j=(0,g.useContext)(T);if(!j)throw new Error("useEntityList must be used within EntityListProvider");return j}},56889:(V,S,t)=>{"use strict";t.d(S,{I:()=>d});var n=t(6820),a=t(72427),E=t(14041),h=t(1394),C=t(18);function g(f){return typeof f=="string"?f:(0,n.U2)(f)}function d(){const f=(0,a.gf)(C.a),u=(0,h.A)((0,E.useMemo)(()=>f.starredEntitie$(),[f]),new Set),y=(0,E.useCallback)(A=>u.has(g(A)),[u]),p=(0,E.useCallback)(A=>f.toggleStarred(g(A)).then(),[f]);return{starredEntities:u,toggleStarredEntity:p,isStarredEntity:y}}},29207:(V,S,t)=>{"use strict";t.d(S,{$:()=>g,s:()=>C});var n=t(6820),a=t(72348),E=t(34569),h=t(63544);const C=(0,h.Q)("catalog:entity-route-ref",()=>(0,E.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function g(d,f){let u,y,p;if(typeof d=="string"){const O=(0,n.KU)(d);u=O.kind,y=O.namespace,p=O.name}else"metadata"in d?(u=d.kind,y=d.metadata.namespace,p=d.metadata.name):(u=d.kind,y=d.namespace,p=d.name);u=u.toLocaleLowerCase("en-US"),y=y?.toLocaleLowerCase("en-US")??a.oQ;const{encodeParams:A=!1}=f||{};return A&&(u=encodeURIComponent(u),y=encodeURIComponent(y),p=encodeURIComponent(p)),{kind:u,namespace:y,name:p}}},64630:(V,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:(V,S,t)=>{"use strict";t.d(S,{$3:()=>E,Rr:()=>h,be:()=>C});var n=t(92822);function a(g){return!!g.getFullTextFilters}function E(g){const d=g.reduce((u,y)=>({...u,...y.getCatalogFilters?y.getCatalogFilters():{}}),{}),f=g.find(a)?.getFullTextFilters();return{filter:d,fullTextFilter:f}}function h(g){const d={};return g.forEach(f=>{f instanceof n.q_||f instanceof n.N9||f instanceof n.I5||f instanceof n.z||f instanceof n.tN||f instanceof n.Kf||f instanceof n.V3||f instanceof n.gZ||Object.assign(d,f.getCatalogFilters?.()||{})}),d}function C(g){return d=>g.every(f=>!f.filterEntity||f.filterEntity(d))}},67871:(V,S,t)=>{"use strict";t.d(S,{t:()=>a});var n=t(6820);function a(E,h,C){let g=E?.relations?.filter(d=>d.type===h).map(d=>(0,n.KU)(d.targetRef))||[];return C?.kind&&(g=g.filter(d=>d.kind.toLocaleLowerCase("en-US")===C.kind.toLocaleLowerCase("en-US"))),g}},95203:(V,S,t)=>{"use strict";t.d(S,{qP:()=>g,Zg:()=>f,rQ:()=>y,pS:()=>u,UJ:()=>d});var n=t(59598);class a{id;params;optional;defaultTarget;[h=n.b];constructor(A,O,T,L){this.id=A,this.params=O,this.optional=T,this.defaultTarget=L,this[h]="external"}toString(){return`routeRef{type=external,id=${this.id}}`}getDefaultTarget(){return this.defaultTarget}}function E(p){return new a(p.id,p.params??[],!!p.optional,p?.defaultTarget)}var h,C=t(34569);const g=E({id:"create-component",optional:!0,defaultTarget:"scaffolder.createComponent"}),d=E({id:"view-techdoc",optional:!0,params:["namespace","kind","name"],defaultTarget:"techdocs.docRoot"}),f=E({id:"create-from-template",optional:!0,params:["namespace","templateName"],defaultTarget:"scaffolder.selectedTemplate"}),u=E({id:"catalog:unregister-redirect",optional:!0}),y=(0,C.H)({id:"catalog"})},54241:(V,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:(V,S,t)=>{"use strict";t.d(S,{x:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.permission.api"})},70734:(V,S,t)=>{"use strict";t.d(S,{e:()=>C});var n=t(31085),a=t(14041),E=t(58837);const h=(0,E.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),C=g=>{const{text:d,preTag:f,postTag:u}=g,y=h(),p=(0,a.useMemo)(()=>d.split(new RegExp(`(${f}.+?${u})`)),[u,f,d]);return(0,n.jsx)(n.Fragment,{children:p.map((A,O)=>A.includes(f)?(0,n.jsx)("mark",{className:y.highlight,children:A.replace(new RegExp(`${f}|${u}`,"g"),"")},O):A)})}},54560:(V,S,t)=>{"use strict";t.d(S,{ec:()=>u});var n=t(31085),a=t(14041),E=t(93368),h=t(88758),C=t(8109);const g="search.results.list.items.extensions.v1",d=(A,O)=>{for(const T of A)if(!(!isValidElement(T)||!getComponentData(T,g)?.(O)))return cloneElement(T,{rank:O.rank,highlight:O.highlight,result:O.document,...T.props});return null},f=A=>{const{rank:O,result:T,noTrack:L,children:P,alignItems:j="flex-start",...B}=A,F=(0,E.s)(),W=(0,a.useCallback)(()=>{L||T&&F.captureEvent("discover",T.title,{attributes:{to:T.location},value:O})},[O,T,L,F]);return(0,n.jsx)(C.A,{divider:!0,alignItems:j,onClickCapture:W,...B,children:P})},u=A=>{const{name:O,component:T,predicate:L=()=>!0}=A;return(0,h.zZ)({name:O,component:{lazy:()=>T().then(P=>j=>(0,n.jsx)(f,{rank:j.rank,result:j.result,noTrack:j.noTrack,children:(0,a.createElement)(P,j)}))},data:{[g]:L}})},y=A=>{const O=useElementFilter(A,T=>T.selectByComponentData({key:g}).getElements(),[A]);return useCallback((T,L)=>{const P=d(O,T);return _jsx(Fragment,{children:P??_jsx(f,{rank:T.rank,result:T.document,children:_jsx(DefaultResultListItem,{rank:T.rank,highlight:T.highlight,result:T.document})})},L)},[O])},p=A=>{const{results:O,children:T,...L}=A,P=y(T);return _jsx(List,{...L,children:O.map(P)})}},86202:(V,S,t)=>{"use strict";t.d(S,{A:()=>n,G:()=>a});const n="backstage.io/techdocs-ref",a="backstage.io/techdocs-entity"},72020:(V,S,t)=>{"use strict";t.d(S,{AF:()=>f,Hr:()=>p,Wm:()=>d,YR:()=>L,po:()=>u});var n=t(31085),a=t(14041),E=t(18690),h=t(19402),C=t(88758),g=t(82442);const d="techdocs.addons.addon.v1",f="techdocs.addons.wrapper.v1",u=()=>null;(0,h.h)(u,f,!0);const y=P=>`${d}.${P.toLocaleLowerCase("en-US")}`;function p(P){const{name:j,component:B}=P;return(0,C.zZ)({name:j,component:{sync:F=>(0,n.jsx)(B,{...F})},data:{[d]:P,[y(j)]:!0}})}const A=(P,j)=>P.selectByComponentData({key:j}).getElements()[0],O=P=>P.selectByComponentData({key:f}).selectByComponentData({key:d}),T=P=>P.selectByComponentData({key:f}).findComponentData({key:d}),L=()=>{const P=(0,E.P1)(),j=(0,g.O)(P,O),B=(0,g.O)(P,T),F=(0,a.useCallback)(H=>{if(!j||!H)return null;const Y=y(H.name);return A(j,Y)??null},[j]),W=(0,a.useCallback)(H=>{const Y=B.find(K=>K.name===H);return Y?F(Y):null},[B,F]),J=(0,a.useCallback)(H=>{const Y=B.filter(K=>K.location===H);return Y.length?Y.map(F):null},[B,F]);return{renderComponentByName:W,renderComponentsByLocation:J}}},26679:(V,S,t)=>{"use strict";t.d(S,{l:()=>a,s:()=>E});var n=t(55309);const a=(0,n.y)({id:"plugin.techdocs.service"}),E=(0,n.y)({id:"plugin.techdocs.storageservice"})},86892:(V,S,t)=>{"use strict";t.d(S,{R:()=>P,V:()=>j});var n=t(31085),a=t(14041),E=t(73466),h=t(28966),C=t(6820),g=t(43836),d=t(10602),f=t(72427),u=t(65461),y=t(25862),p=t(26679);function A(B,F){return F.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(B.kind=B.kind.toLocaleLowerCase(),B.name=B.name.toLocaleLowerCase(),B.namespace=B.namespace.toLocaleLowerCase()),B}const O=(B,F)=>(0,C.U2)(B)===(0,C.U2)(F),T={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},L=(0,g.tK)("techdocs-reader-page-context"),P=(0,a.memo)(B=>{const{entityRef:F,children:W}=B,J=(0,f.gf)(p.l),H=(0,f.gf)(u.U),Y=(0,E.A)(async()=>J.getEntityMetadata(F),[F]),K=(0,h.A)(async()=>J.getTechDocsMetadata(F),[F]),[dt,G]=(0,a.useState)(T.title),[Q,Z]=(0,a.useState)(T.subtitle),[it,ft]=(0,a.useState)(T.shadowRoot);(0,a.useEffect)(()=>{it&&!K.value&&!K.loading&&K.retry()},[K.value,K.loading,it,K.retry,K]);const vt={metadata:K,entityRef:A(F,H),entityMetadata:Y,shadowRoot:it,setShadowRoot:ft,title:dt,setTitle:G,subtitle:Q,setSubtitle:Z},xt=(0,d.B)({1:vt});return(0,n.jsx)(y.Ig,{attributes:{entityRef:(0,C.U2)(F)},children:(0,n.jsx)(L.Provider,{value:xt,children:W instanceof Function?W(vt):W})})},(B,F)=>O(B.entityRef,F.entityRef)),j=()=>{const B=(0,a.useContext)(L);if(B===void 0)return T;const F=B.atVersion(1);if(F===void 0)throw new Error("No context found for version 1.");return F}},99730:(V,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:(V,S,t)=>{"use strict";t.d(S,{V:()=>n});function n(a,E){return E.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?a:a.toLocaleLowerCase("en-US")}},8915:(V,S,t)=>{"use strict";t.d(S,{K:()=>It});var n=t(31085),a=t(59428),E=t(27586),h=t(26280),C=t(21405),g=t(54203),d=t(67626),f=t(72987),u=t(91035),y=t(81859),p=t(14041),A=t(86519),O=t(86202);class T{getCatalogFilters(){return{[`metadata.annotations.${O.A}`]:A.c}}}const L=()=>{const{updateFilters:ut}=(0,C.nK)();return(0,p.useEffect)(()=>{ut({techdocs:new T})},[ut]),null};var P=t(36338),j=t(45250),B=t(88640),F=t(77310),W=t(9222),J=t(72427),H=t(65461),Y=t(56889),K=t(27125),dt=t(14209),G=t(92822);function Q(ut){const{actions:ct,columns:Ct,data:mt,isLoading:St,options:Tt}=ut,{updateFilters:at,setLimit:yt,setOffset:Et,limit:et,totalItems:gt,offset:nt}=(0,C.nK)(),[M,z]=(0,p.useState)(nt&&et?Math.floor(nt/et):0);return(0,p.useEffect)(()=>{gt&&M*et>=gt?Et(Math.max(0,gt-et)):Et(Math.max(0,M*et))},[Et,M,et,gt]),(0,n.jsx)(dt.X,{columns:Ct,data:mt,options:{paginationPosition:"both",pageSizeOptions:[5,10,20,50,100],pageSize:et,emptyRowsWhenPaging:!1,actionsColumnIndex:-1,...Tt},actions:ct,onSearchChange:lt=>at({text:lt?new G.V3(lt):void 0}),page:M,onPageChange:lt=>{z(lt)},onRowsPerPageChange:lt=>{yt(lt)},totalCount:gt,localization:{pagination:{labelDisplayedRows:""}},isLoading:St})}function Z(ut){const{actions:ct,columns:Ct,data:mt,next:St,prev:Tt,title:at,isLoading:yt,options:Et,...et}=ut;return(0,n.jsx)(dt.X,{title:yt?"":at,columns:Ct,data:mt,options:{paginationPosition:"both",...Et,pageSizeOptions:[],showFirstLastPageButtons:!1,pageSize:Number.MAX_SAFE_INTEGER,emptyRowsWhenPaging:!1,actionsColumnIndex:-1},onPageChange:gt=>{gt>0?St?.():Tt?.()},page:Tt?1:0,totalCount:St?Number.MAX_VALUE:Number.MAX_SAFE_INTEGER,localization:{pagination:{labelDisplayedRows:""}},isLoading:yt,...et})}var it=t(84295),ft=t(42717),vt=t(82779),xt=t(23747);const Ot=ut=>{const{columns:ct,actions:Ct,options:mt}=ut,{loading:St,error:Tt,entities:at,filters:yt,paginationMode:Et,pageInfo:et}=(0,C.nK)(),{isStarredEntity:gt,toggleStarredEntity:nt}=(0,Y.I)(),[,M]=(0,P.A)(),z=(0,W.S)(vt.Oc),lt=(0,J.gf)(H.U),wt=(0,j.capitalize)(yt.user?.value??"all"),bt=[it.f.createCopyDocsUrlAction(M),it.f.createStarEntityAction(gt,nt)],$t=(0,xt.H)(at,z,lt);return Et==="cursor"?(0,n.jsx)(Z,{columns:ct||ft.F,isLoading:St,title:wt,actions:Ct||bt,options:mt,data:$t,next:et?.next,prev:et?.prev}):Et==="offset"?(0,n.jsx)(Q,{columns:ct||ft.F,isLoading:St,title:wt,actions:Ct||bt,options:mt,data:$t}):Tt?(0,n.jsx)(B.B,{severity:"error",title:"Could not load available documentation.",children:(0,n.jsx)(F.z,{language:"text",text:Tt.toString()})}):(0,n.jsx)(K.o,{title:wt,entities:at,loading:St,actions:Ct||bt,columns:ct,options:mt})};Ot.columns=ft.B,Ot.actions=it.f;const It=ut=>{const{initialFilter:ct="owned",columns:Ct,actions:mt,ownerPickerMode:St,pagination:Tt,options:at,PageWrapper:yt,CustomHeader:Et}=ut,et=yt||y.S,gt=Et||(()=>(0,n.jsx)(a.d,{title:"",children:(0,n.jsx)(E.Y,{children:"Discover documentation in your ecosystem."})}));return(0,n.jsx)(et,{children:(0,n.jsxs)(h.U,{children:[(0,n.jsx)(gt,{}),(0,n.jsx)(C.B9,{pagination:Tt,children:(0,n.jsxs)(g.GI,{children:[(0,n.jsxs)(g.GI.Filters,{children:[(0,n.jsx)(L,{}),(0,n.jsx)(d.y,{initialFilter:ct}),(0,n.jsx)(f.t,{mode:St}),(0,n.jsx)(u.m,{})]}),(0,n.jsx)(g.GI.Content,{children:(0,n.jsx)(Ot,{actions:mt,columns:Ct,options:at})})]})})]})})}},27125:(V,S,t)=>{"use strict";t.d(S,{o:()=>O});var n=t(31085),a=t(36338),E=t(9222),h=t(72427),C=t(65461),g=t(82779),d=t(14209),f=t(44186),u=t(73896),y=t(84295),p=t(42717),A=t(23747);const O=T=>{const{entities:L,title:P,loading:j,columns:B,actions:F,options:W}=T,[,J]=(0,a.A)(),H=(0,E.S)(g.Oc),Y=(0,h.gf)(C.U);if(!L)return null;const K=(0,A.H)(L,H,Y),dt=[y.f.createCopyDocsUrlAction(J)],G=20,Q=K&&K.length>G;return(0,n.jsx)(n.Fragment,{children:j||K&&K.length>0?(0,n.jsx)(d.X,{isLoading:j,options:{paging:Q,pageSize:G,search:!0,actionsColumnIndex:-1,...W},data:K,columns:B||p.F,actions:F||dt,title:P?`${P} (${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)(u.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};O.columns=p.B,O.actions=y.f},84295:(V,S,t)=>{"use strict";t.d(S,{f:()=>h});var n=t(31085),a=t(55290),E=t(18956);const h={createCopyDocsUrlAction(C){return g=>({icon:()=>(0,n.jsx)(a.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>C(`${window.location.origin}${g.resolved.docsUrl}`)})},createStarEntityAction(C,g){return d=>{const f=d.entity,u=C(f);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,n.jsx)(E.m,{isFavorite:u}),tooltip:u?"Remove from favorites":"Add to favorites",onClick:()=>g(f)}}}}},42717:(V,S,t)=>{"use strict";t.d(S,{B:()=>u,F:()=>y});var n=t(31085),a=t(10394),E=t(58837);const h=(0,E.A)(p=>({value:{marginBottom:p.spacing(.75)},subvalue:{color:p.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function C(p){const{value:A,subvalue:O}=p,T=h();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.A,{className:T.value,children:A}),(0,n.jsx)(a.A,{className:T.subvalue,children:O})]})}var g=t(72072),d=t(34428);function f(p){return p.metadata.title||p.metadata.name}const u={createTitleColumn(p){return{...u.createNameColumn(),field:"entity.metadata.title",hidden:p?.hidden}},createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,searchable:!0,defaultSort:"asc",customSort:(p,A)=>{const O=f(p.entity).toLocaleLowerCase(),T=f(A.entity).toLocaleLowerCase();return O.localeCompare(T)},render:p=>(0,n.jsx)(C,{value:(0,n.jsx)(g.N_,{to:p.resolved.docsUrl,children:f(p.entity)}),subvalue:p.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:p})=>(0,n.jsx)(d.i,{entityRefs:p.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}},y=[u.createTitleColumn({hidden:!0}),u.createNameColumn(),u.createOwnerColumn(),u.createKindColumn(),u.createTypeColumn()]},23747:(V,S,t)=>{"use strict";t.d(S,{H:()=>C});var n=t(51372),a=t(67871),E=t(90184),h=t(95768);function C(g,d,f){return g.map(u=>{const y=(0,a.t)(u,n.vv);return{entity:u,resolved:{docsUrl:d({namespace:(0,h.V)(u.metadata.namespace??"default",f),kind:(0,h.V)(u.kind,f),name:(0,h.V)(u.metadata.name,f)}),ownedByRelations:y,ownedByRelationsTitle:y.map(p=>(0,E.S)(p,{defaultKind:"group"})).join(", ")}}})}},81859:(V,S,t)=>{"use strict";t.d(S,{S:()=>C});var n=t(31085),a=t(27155),E=t(72427),h=t(65461);const C=g=>{const{children:d,CustomPageWrapper:f}=g,y=`Documentation available in ${(0,E.gf)(h.U).getOptionalString("organization.name")??"Backstage"}`;return(0,n.jsx)(n.Fragment,{children:f?(0,n.jsx)(f,{children:d}):(0,n.jsx)(a.d,{title:"Documentation",subtitle:y,themeId:"documentation",children:d})})}},39278:(V,S,t)=>{"use strict";t.d(S,{$j:()=>F,Wj:()=>W,Ju:()=>L});var n=t(26679),a=t(70835),E=t(97142),h=t(92110);class C{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}`,it=await this.fetchApi.fetch(`${Z}`);if(!it.ok)throw await a.o.fromResponse(it);return await it.json()}async getEntityMetadata(Y){const{kind:K,namespace:dt,name:G}=Y,Z=`${await this.getApiOrigin()}/metadata/entity/${dt}/${K}/${G}`,it=await this.fetchApi.fetch(`${Z}`);if(!it.ok)throw await a.o.fromResponse(it);return await it.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,it=`${await this.getStorageUrl()}/${G}/${dt}/${Q}/${K}`,ft=await this.fetchApi.fetch(`${it.endsWith("/")?it:`${it}/`}index.html`);let vt="";switch(ft.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 E.m_(vt);case 500:throw vt="Could not generate documentation or an error in the TechDocs backend. ",new Error(vt);default:break}return ft.text()}async syncEntityDocs(Y,K=()=>{}){const{kind:dt,namespace:G,name:Q}=Y,it=`${await this.getApiOrigin()}/sync/${G}/${dt}/${Q}`;return new Promise((ft,vt)=>{const xt=new AbortController;(0,h.y)(it,{fetch:this.fetchApi.fetch,signal:xt.signal,onmessage(Ot){if(Ot.event==="log")Ot.data&&K(JSON.parse(Ot.data));else if(Ot.event==="finish"){let It=!1;Ot.data&&({updated:It}=JSON.parse(Ot.data)),ft(It?"updated":"cached")}else Ot.event==="error"&&vt(new Error(Ot.data))},onerror(Ot){throw xt.abort(),vt(Ot),Ot}})})}async getBaseUrl(Y,K,dt){const{kind:G,namespace:Q,name:Z}=K,ft=`${await this.getApiOrigin()}/static/docs/${Q}/${G}/${Z}/${dt}`;return new URL(Y,ft.endsWith("/")?ft:`${ft}/`).toString()}}var d=t(82779),f=t(9803),u=t(12935),y=t(65461),p=t(57405),A=t(70795),O=t(88758),T=t(54560);const L=(0,f.i)({id:"techdocs",apis:[(0,u.b)({api:n.s,deps:{configApi:y.U,discoveryApi:p.I,fetchApi:A.a},factory:({configApi:H,discoveryApi:Y,fetchApi:K})=>new g({configApi:H,discoveryApi:Y,fetchApi:K})}),(0,u.b)({api:n.l,deps:{configApi:y.U,discoveryApi:p.I,fetchApi:A.a},factory:({configApi:H,discoveryApi:Y,fetchApi:K})=>new C({configApi:H,discoveryApi:Y,fetchApi:K})})],routes:{root:d.rQ,docRoot:d.Oc,entityContent:d.Ri}}),P=L.provide((0,O.QJ)({name:"TechdocsPage",component:()=>t.e(8803).then(t.bind(t,38803)).then(H=>H.Router),mountPoint:d.rQ})),j=L.provide((0,O.QJ)({name:"EntityTechdocsContent",component:()=>t.e(8803).then(t.bind(t,38803)).then(H=>H.LegacyEmbeddedDocsRouter),mountPoint:d.Ri})),B=L.provide((0,O.QJ)({name:"TechDocsCustomHome",component:()=>t.e(5470).then(t.bind(t,25470)).then(H=>H.TechDocsCustomHome),mountPoint:d.rQ})),F=L.provide((0,O.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(H=>H.TechDocsIndexPage),mountPoint:d.rQ})),W=L.provide((0,O.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(H=>H.TechDocsReaderPage),mountPoint:d.Oc})),J=L.provide((0,T.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(H=>H.TechDocsSearchResultListItem),predicate:H=>H.type==="techdocs"}))},67289:(V,S,t)=>{"use strict";t.d(S,{p:()=>Hn});var n=t(31085),a=t(14041),E=t(42899),h=t(58837),C=t(86892),g=t(9394),d=t(91360),f=t(22856);const u="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",y=m=>{(0,a.useEffect)(()=>{if(!m)return()=>{};const D=m.querySelectorAll('head > link[rel="stylesheet"]');let U=D?.length??0;const $=new CustomEvent(u);if(!U)return m.dispatchEvent($),()=>{};const N=()=>{--U===0&&m.dispatchEvent($)};return D?.forEach(_=>{_.addEventListener("load",N)}),()=>{D?.forEach(_=>{_.removeEventListener("load",N)})}},[m])},p=m=>{const[D,U]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!m)return()=>{};U(!0);const $=m.style;$.setProperty("opacity","0");const N=()=>{U(!1),$.setProperty("opacity","1")};return m.addEventListener(u,N),()=>{m.removeEventListener(u,N)}},[m]),D},A=m=>{const{element:D,onAppend:U,children:$}=m,[N,_]=(0,a.useState)((0,g.vt)({...(0,f.A)(),insertionPoint:void 0}));y(D);const rt=(0,a.useCallback)(Pt=>{if(!D||!Pt)return;_((0,g.vt)({...(0,f.A)(),insertionPoint:D.querySelector("head")||void 0}));let Dt=Pt.shadowRoot;Dt||(Dt=Pt.attachShadow({mode:"open"})),Dt.replaceChildren(D),typeof U=="function"&&U(Dt)},[D,U]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(d.Ay,{jss:N,sheetsManager:new Map,children:[(0,n.jsx)("div",{ref:rt,"data-testid":"techdocs-native-shadowroot"}),$]})})};var O=t(12784);const T=()=>{const{shadowRoot:m}=(0,C.V)();return m},L=m=>{const D=T(),[U,$]=(0,a.useState)(D?.firstChild);return(0,a.useEffect)(()=>{let N;return D&&(N=new MutationObserver(()=>{$(D?.firstChild)}),N.observe(D,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),()=>N?.disconnect()},[D]),!U||!(U instanceof HTMLElement)?[]:m.map(N=>U.querySelectorAll(N)).filter(N=>N.length).map(N=>Array.from(N)).flat()},P=m=>m.toString()&&m.rangeCount&&m.getRangeAt(0).getBoundingClientRect().top,j=(m=0)=>{const D=T(),[U,$]=useState(null),N=useMemo(()=>debounce(()=>{const _=D,rt=_.getSelection?_.getSelection():document.getSelection();rt&&P(rt)?$(rt):$(null)},m),[D,$,m]);return useEffect(()=>(window.document.addEventListener("selectionchange",N),()=>{N.cancel(),window.document.removeEventListener("selectionchange",N)}),[N]),U};var B=t(26280),F=t(68146),W=t(45250),J=t(73466),H=t(5877),Y=t(43836),K=t(10602),dt=t(72427),G=t(93368),Q=t(25862),Z=t(65461),it=t(55309);const ft=(0,it.y)({id:"plugin.search.queryservice"});class vt{mockedResults;constructor(D){this.mockedResults=D}query(){return Promise.resolve(this.mockedResults||{results:[]})}}const xt=(0,Y.tK)("search-context"),Ot=()=>{const m=(0,a.useContext)(xt);if(!m)throw new Error("useSearch must be used within a SearchContextProvider");const D=m.atVersion(1);if(!D)throw new Error("No SearchContext v1 found");return D},It=()=>(0,a.useContext)(xt)!==void 0,ut={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},ct=(m=ut)=>{const D=(0,dt.gf)(ft),U=(0,G.s)(),[$,N]=(0,a.useState)(m.term),[_,rt]=(0,a.useState)(m.types),[Pt,Dt]=(0,a.useState)(m.filters),[Bt,Mt]=(0,a.useState)(m.pageLimit),[Ut,Xt]=(0,a.useState)(m.pageCursor),me=(0,H.A)($),Kt=(0,H.A)(Pt),_t=(0,J.A)(async()=>{const qt=await D.query({term:$,types:_,filters:Pt,pageLimit:Bt,pageCursor:Ut});return $&&U.captureEvent("search",$,{value:qt.numberOfResults}),qt},[$,_,Pt,Bt,Ut]),Ee=!_t.loading&&!_t.error&&_t.value?.nextPageCursor,ae=!_t.loading&&!_t.error&&_t.value?.previousPageCursor,ht=(0,a.useCallback)(()=>{Xt(_t.value?.nextPageCursor)},[_t.value?.nextPageCursor]),Jt=(0,a.useCallback)(()=>{Xt(_t.value?.previousPageCursor)},[_t.value?.previousPageCursor]);return(0,a.useEffect)(()=>{me!==void 0&&$!==me&&Xt(void 0)},[$,me,Xt]),(0,a.useEffect)(()=>{Kt!==void 0&&!(0,W.isEqual)(Pt,Kt)&&Xt(void 0)},[Pt,Kt,Xt]),{result:_t,term:$,setTerm:N,types:_,setTypes:rt,filters:Pt,setFilters:Dt,pageLimit:Bt,setPageLimit:Mt,pageCursor:Ut,setPageCursor:Xt,fetchNextPage:Ee?ht:void 0,fetchPreviousPage:ae?Jt:void 0}},Ct=m=>{const{initialState:D,children:U}=m,$=ct(D);return(0,n.jsx)(Q.Ig,{attributes:{searchTypes:$.types.sort().join(",")},children:(0,n.jsx)(xt.Provider,{value:(0,K.B)({1:$}),children:U})})},mt=m=>{const{initialState:D,inheritParentContextIfAvailable:U,children:$}=m,N=It(),_=(0,dt.gf)(Z.U),rt=D??{},Pt=_.has("search.query.pageLimit")?{pageLimit:_.getNumber("search.query.pageLimit")}:{},Dt={...ut,...rt,...Pt};return N&&U?(0,n.jsx)(n.Fragment,{children:$}):(0,n.jsx)(Ct,{initialState:Dt,children:$})};var St=t(78467),Tt=t(20577),at=t(82266),yt=t(29365),Et=t(34839),et=t(16249),gt=t(64947),nt=t(45917),M=t(22771);const z=(0,a.forwardRef)((m,D)=>{const{onChange:U,onKeyDown:$=()=>{},onClear:N=()=>{},onSubmit:_=()=>{},debounceTime:rt=200,clearButton:Pt=!0,fullWidth:Dt=!0,value:Bt,label:Mt,placeholder:Ut,inputProps:Xt={},InputProps:me={},endAdornment:Kt,..._t}=m,Ee=(0,dt.gf)(Z.U),[ae,ht]=(0,a.useState)(""),Jt=(0,a.useRef)("");(0,a.useEffect)(()=>{ht(he=>he===Jt.current?String(Bt):he)},[Bt,Jt]),(0,M.A)(()=>{Jt.current=ae,U(ae)},rt,[ae]);const be=(0,a.useCallback)(he=>{ht(he.target.value)},[ht]),qt=(0,a.useCallback)(he=>{$&&$(he),_&&he.key==="Enter"&&_()},[$,_]),ie=(0,a.useCallback)(()=>{Jt.current="",U(""),ht(""),N&&N()},[U,N]),ce=Mt?void 0:"Search",ke=Ut??`Search in ${Ee.getOptionalString("app.title")||"Backstage"}`,Le=(0,at.n)().getSystemIcon("search")||nt.A,tn=(0,n.jsx)(Et.A,{position:"start",children:(0,n.jsx)(yt.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,n.jsx)(Le,{})})}),an=(0,n.jsx)(Et.A,{position:"end",children:(0,n.jsx)(gt.A,{"aria-label":"Clear",size:"small",onClick:ie,onKeyDown:he=>{he.key==="Enter"&&he.stopPropagation()},children:"Clear"})});return(0,n.jsx)(mt,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(et.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:D,value:ae,label:Mt,placeholder:ke,InputProps:{startAdornment:tn,endAdornment:Pt?an:Kt,...me},inputProps:{"aria-label":ce,...Xt},fullWidth:Dt,onChange:be,onKeyDown:qt,..._t})})}),lt=(0,a.forwardRef)((m,D)=>{const{value:U="",onChange:$,...N}=m,{term:_,setTerm:rt}=Ot();(0,a.useEffect)(()=>{U&&rt(String(U))},[U,rt]);const Pt=(0,a.useCallback)(Dt=>{$?$(Dt):rt(Dt)},[$,rt]);return(0,n.jsx)(mt,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(Q.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,n.jsx)(z,{...N,ref:D,value:_,onChange:Pt})})})}),wt=(0,h.A)(m=>({loading:{right:m.spacing(1),position:"absolute"}})),bt=m=>D=>(0,n.jsx)(mt,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(m,{...D})}),$t=()=>{const m=wt();return(0,n.jsx)(St.A,{className:m.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},Ft=bt(function(D){const{loading:U,value:$,onChange:N=()=>{},options:_=[],getOptionLabel:rt=Jt=>String(Jt),inputPlaceholder:Pt,inputDebounceTime:Dt,freeSolo:Bt=!0,fullWidth:Mt=!0,clearOnBlur:Ut=!1,"data-testid":Xt="search-autocomplete",...me}=D,{setTerm:Kt}=Ot(),_t=(0,a.useCallback)(Jt=>Jt?typeof Jt=="string"?Jt:rt(Jt):"",[rt]),Ee=(0,a.useMemo)(()=>_t($),[$,_t]),ae=(0,a.useCallback)((Jt,be,qt,ie)=>{Kt(_t(be)),N(Jt,be,qt,ie)},[_t,Kt,N]),ht=(0,a.useCallback)(({InputProps:{ref:Jt,className:be,endAdornment:qt},InputLabelProps:ie,...ce})=>(0,n.jsx)(lt,{...ce,ref:Jt,clearButton:!1,value:Ee,placeholder:Pt,debounceTime:Dt,endAdornment:U?(0,n.jsx)($t,{}):qt,InputProps:{className:be}}),[U,Ee,Pt,Dt]);return(0,n.jsx)(Tt.Ay,{...me,"data-testid":Xt,value:$,onChange:ae,options:_,getOptionLabel:rt,renderInput:ht,freeSolo:Bt,fullWidth:Mt,clearOnBlur:Ut})});var Nt=t(18690),zt=t(27698);const Ht=m=>m?.document,te=m=>{const{entityId:D,entityTitle:U,debounceTime:$=150,searchResultUrlMapper:N}=m,[_,rt]=(0,a.useState)(!1),Pt=(0,Nt.Zp)(),{setFilters:Dt,term:Bt,result:{loading:Mt,value:Ut}}=Ot(),[Xt,me]=(0,a.useState)([]);(0,a.useEffect)(()=>{let ht=!0;if(ht&&Ut){const Jt=Ut.results.slice(0,10);me(Jt)}return()=>{ht=!1}},[Mt,Ut]);const{kind:Kt,name:_t,namespace:Ee}=D;(0,a.useEffect)(()=>{Dt(ht=>({...ht,kind:Kt,namespace:Ee,name:_t}))},[Kt,Ee,_t,Dt]);const ae=(ht,Jt)=>{if(Ht(Jt)){const{location:be}=Jt.document;Pt(N?N(be):be)}};return(0,n.jsx)(Ft,{"data-testid":"techdocs-search-bar",size:"small",open:_&&!!Bt,getOptionLabel:()=>"",filterOptions:ht=>ht,onClose:()=>{rt(!1)},onOpen:()=>{rt(!0)},onChange:ae,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Xt,renderOption:({document:ht,highlight:Jt})=>(0,n.jsx)(zt.TechDocsSearchResultListItem,{result:ht,lineClamp:3,asListItem:!1,asLink:!1,title:ht.title,highlight:Jt}),loading:Mt,inputDebounceTime:$,inputPlaceholder:`Search ${U||D.name} docs`,freeSolo:!1})},jt=m=>{const D={term:"",types:["techdocs"],pageCursor:"",filters:m.entityId};return(0,n.jsx)(mt,{initialState:D,children:(0,n.jsx)(te,{...m})})};var kt=t(74219);const ee=(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:D}=(0,at.n)().getComponents();return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(D,{}),children:(0,n.jsx)(ee,{...m})})}var Qt=t(73845),re=t(72501),le=t(12398),_e=t(32881);const ne=(0,h.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}})),nn=({buildLog:m,onClose:D})=>{const U=ne(),$=m.length===0?"Waiting for logs...":m.join(`
8
- `);return(0,n.jsxs)(E.A,{container:!0,direction:"column",className:U.root,spacing:0,wrap:"nowrap",children:[(0,n.jsxs)(E.A,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,n.jsx)(re.A,{variant:"h5",children:"Build Details"}),(0,n.jsx)(yt.A,{title:"Close the drawer",onClick:D,color:"inherit",children:(0,n.jsx)(_e.A,{})},"dismiss")]}),(0,n.jsx)(E.A,{item:!0,xs:!0,children:(0,n.jsx)(ge,{text:$,classes:{root:U.logs}})})]})},Te=({buildLog:m})=>{const D=ne(),[U,$]=(0,a.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(gt.A,{color:"inherit",onClick:()=>$(!0),children:"Show Build Logs"}),(0,n.jsx)(Qt.Ay,{classes:{paper:D.paper},anchor:"right",open:U,onClose:()=>$(!1),children:(0,n.jsx)(nn,{buildLog:m,onClose:()=>$(!1)})})]})};var pe=t(12173);const Ge=({errorMessage:m})=>{const D=(0,dt.gf)(Z.U).getOptionalString("techdocs.builder"),U=(0,G.s)(),{entityRef:$}=(0,C.V)(),N=(0,Nt.zy)();(0,a.useEffect)(()=>{const{pathname:rt,search:Pt,hash:Dt}=N;U.captureEvent("not-found",`${rt}${Pt}${Dt}`,{attributes:$})},[U,$,N]);let _="";return[void 0,"local"].includes(D)||(_="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)(pe.M,{status:"404",statusMessage:m||"Documentation not found",additionalInfo:_})};var fe=t(28966),Ye=t(26679);function sn({contentLoading:m,content:D,activeSyncState:U}){return m||U==="BUILD_READY_RELOAD"||!D&&U==="CHECKING"?"CHECKING":!D&&U==="BUILDING"?"INITIAL_BUILD":D?U==="BUILDING"?"CONTENT_STALE_REFRESHING":U==="BUILD_READY"?"CONTENT_STALE_READY":U==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function un(m,D){const U={...m};switch(D.type){case"sync":D.state==="CHECKING"&&(U.buildLog=[]),U.activeSyncState=D.state,U.syncError=D.syncError;break;case"contentLoading":U.contentLoading=!0,U.contentError=void 0;break;case"content":typeof D.path=="string"&&(U.path=D.path),U.contentLoading=!1,U.content=D.content,U.contentError=D.contentError;break;case"buildLog":U.buildLog=U.buildLog.concat(D.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(U.activeSyncState)&&["contentLoading","content"].includes(D.type)&&(U.activeSyncState="UP_TO_DATE",U.buildLog=[]),U}function rn(m,D,U,$){const[N,_]=(0,a.useReducer)(un,{activeSyncState:"CHECKING",path:$,contentLoading:!0,buildLog:[]}),rt=(0,dt.gf)(Ye.s),{retry:Pt}=(0,fe.A)(async()=>{_({type:"contentLoading"});try{const Mt=await rt.getEntityDocs({kind:m,namespace:D,name:U},$);return _({type:"content",content:Mt,path:$}),Mt}catch(Mt){_({type:"content",contentError:Mt,path:$})}},[rt,m,D,U,$]),Dt=(0,a.useRef)({content:void 0,reload:()=>{}});Dt.current={content:N.content,reload:Pt},(0,J.A)(async()=>{_({type:"sync",state:"CHECKING"});const Mt=setTimeout(()=>{_({type:"sync",state:"BUILDING"})},1e3);try{switch(await rt.syncEntityDocs({kind:m,namespace:D,name:U},Xt=>{_({type:"buildLog",log:Xt})})){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(Ut){_({type:"sync",state:"ERROR",syncError:Ut})}finally{clearTimeout(Mt)}},[m,U,D,rt,_,Dt]);const Bt=(0,a.useMemo)(()=>sn({activeSyncState:N.activeSyncState,contentLoading:N.contentLoading,content:N.content}),[N.activeSyncState,N.content,N.contentLoading]);return(0,a.useMemo)(()=>({state:Bt,contentReload:Pt,path:N.path,content:N.content,contentErrorMessage:N.contentError?.toString(),syncErrorMessage:N.syncError?.toString(),buildLog:N.buildLog}),[Bt,Pt,N.path,N.content,N.contentError,N.syncError,N.buildLog])}const Qe=(0,a.createContext)({}),je=()=>(0,a.useContext)(Qe),ze=m=>{const{children:D}=m,{"*":U=""}=(0,Nt.g)(),{entityRef:$}=(0,C.V)(),{kind:N,namespace:_,name:rt}=$,Pt=rn(N,_,rt,U);return(0,n.jsx)(Qe.Provider,{value:Pt,children:D instanceof Function?D(Pt):D})},He=m=>D=>(0,n.jsx)(ze,{children:(0,n.jsx)(m,{...D})}),on=(0,h.A)(m=>({root:{marginBottom:m.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),ye=()=>{let m=null;const D=on(),{state:U,contentReload:$,contentErrorMessage:N,syncErrorMessage:_,buildLog:rt}=je();return U==="INITIAL_BUILD"&&(m=(0,n.jsx)(kt.A,{classes:{root:D.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."})),U==="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:D.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),U==="CONTENT_STALE_READY"&&(m=(0,n.jsx)(kt.A,{variant:"outlined",severity:"success",action:(0,n.jsx)(gt.A,{color:"inherit",onClick:()=>$(),children:"Refresh"}),classes:{root:D.root},children:"A newer version of this documentation is now available, please refresh to view."})),U==="CONTENT_STALE_ERROR"&&(m=(0,n.jsxs)(kt.A,{variant:"outlined",severity:"error",action:(0,n.jsx)(Te,{buildLog:rt}),classes:{root:D.root,message:D.message},children:["Building a newer version of this documentation failed."," ",_]})),U==="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:D.root,message:D.message},children:["Building a newer version of this documentation failed."," ",_]}),(0,n.jsx)(Ge,{errorMessage:N})]})),m};var Ke=t(5893),Ve=t(54917),Ze=t(96726),Be=t(71651),ve=t.n(Be);const w=/main\.[A-Fa-f0-9]{8}\.min\.css$/,l=/^https:\/\/fonts\.googleapis\.com/,v=/^https:\/\/fonts\.gstatic\.com/,R=m=>m.nodeName==="LINK",tt=m=>{const D=m?.getAttribute("href")||"",U=D.match(w),$=D.match(l),N=D.match(v);return U||$||N},X=m=>(R(m)&&!tt(m)&&m.remove(),m),st=m=>m.nodeName==="IFRAME",Rt=(m,D)=>{const U=m.getAttribute("src")||"";try{const{host:$}=new URL(U);return D.includes($)}catch{return!1}},Wt=m=>D=>(st(D)&&!Rt(D,m)&&D.remove(),D),Vt=()=>{const m=(0,dt.gf)(Z.U);return(0,a.useMemo)(()=>m.getOptionalConfig("techdocs.sanitizer"),[m])},se=()=>{const m=Vt();return(0,a.useCallback)(async D=>{const U=m?.getOptionalStringArray("allowedIframeHosts");ve().addHook("beforeSanitizeElements",X);const $=["link","meta"];U&&($.push("iframe"),ve().addHook("beforeSanitizeElements",Wt(U))),ve().addHook("uponSanitizeElement",(rt,Pt)=>{Pt.tagName==="meta"&&(rt.getAttribute("http-equiv")==="refresh"&&rt.getAttribute("content")?.includes("url=")||rt.parentNode?.removeChild(rt))}),ve().addHook("uponSanitizeAttribute",(rt,Pt)=>{rt.tagName!=="meta"&&(Pt.attrName==="http-equiv"||Pt.attrName==="content")&&rt.removeAttribute(Pt.attrName)});const N=m?.getOptionalString("allowedCustomElementTagNameRegExp"),_=m?.getOptionalString("allowedCustomElementAttributeNameRegExp");return ve().sanitize(D.outerHTML,{ADD_TAGS:$,FORBID_TAGS:["style"],ADD_ATTR:["http-equiv","content","dominant-baseline"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0,CUSTOM_ELEMENT_HANDLING:{tagNameCheck:N?new RegExp(N):void 0,attributeNameCheck:_?new RegExp(_):void 0}})},[m])};var Ue=t(34435),Gt=t(268);const ue=({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,Gt.a)(m.palette.text.secondary,.7)};
20
- --md-default-fg-color--lightest: ${(0,Gt.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,Gt.a)(m.palette.background.paper,.7)};
26
- --md-default-bg-color--lightest: ${(0,Gt.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,Gt.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,Gt.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,Gt.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,Gt.X4)(m.palette.text.primary,.05)};
109
- --md-typeset-del-color: ${m.palette.type==="dark"?(0,Gt.X4)(m.palette.error.dark,.5):(0,Gt.X4)(m.palette.error.light,.5)};
110
- --md-typeset-ins-color: ${m.palette.type==="dark"?(0,Gt.X4)(m.palette.success.dark,.5):(0,Gt.X4)(m.palette.success.light,.5)};
111
- --md-typeset-mark-color: ${m.palette.type==="dark"?(0,Gt.X4)(m.palette.warning.dark,.5):(0,Gt.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
- `,oe=({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
- `,$e="224px",De=({theme:m,sidebar:D})=>`
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: ${D.isPinned?`calc(-16rem + ${$e})`:"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
- `,xn=["h1","h2","h3","h4","h5","h6"],de=/(em)|(rem)/gi,hn=/var\(|\)/gi,Zt=({theme:m})=>`
390
- /*================== Typeset ==================*/
391
-
392
- .md-typeset {
393
- font-size: var(--md-typeset-font-size);
394
- }
395
-
396
- ${xn.reduce((D,U)=>{const $=m.typography.htmlFontSize??16,N=m.typography[U],{lineHeight:_,fontFamily:rt,fontWeight:Pt,fontSize:Dt}=N,Bt=Mt=>{if(typeof Mt=="number")return Bt(`${Mt/$*.6}rem`);if(typeof Mt=="string"){if(Mt.match(hn)){const Ut=window.getComputedStyle(document.body).getPropertyValue(Mt.replaceAll(hn,""));if(Ut!=="")return Bt(Ut)}else if(Mt.match(de))return`calc(${Mt.replace(de,"")} * var(--md-typeset-font-size))`}return Mt};return D.concat(`
397
- .md-typeset ${U} {
398
- color: var(--md-default-fg-color);
399
- line-height: ${_};
400
- font-family: ${rt};
401
- font-weight: ${Pt};
402
- font-size: ${Bt(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
- `,qe=()=>`
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
- `,gn=({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
- `,rs={dark:["#only-light","#gh-light-mode-only"],light:["#only-dark","#gh-dark-mode-only"]},os=[ue,oe,De,Zt,qe,gn,({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
- ${rs[m.palette.type].map(D=>`img[src$="${D}"]`).join(", ")} {
546
- display: none;
547
- }
548
- `],as=()=>(0,Ue.Ut)(),Cn=()=>{const m=as(),D=(0,Ve.A)();return(0,a.useMemo)(()=>{const U={theme:D,sidebar:m};return os.reduce(($,N)=>$+N(U),"")},[D,m])},is=()=>{const m=Cn();return(0,a.useCallback)(D=>(D.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${m}</style>`),D),[m])},bn=async(m,D)=>{let U;if(typeof m=="string")U=new DOMParser().parseFromString(m,"text/html").documentElement;else if(m instanceof Element)U=m;else throw new Error("dom is not a recognized type");for(const $ of D)U=await $(U);return U},cs=(m,D,U)=>{const $=new URL(D,"https://ignored.com").pathname,N=m==="src"&&$.endsWith(".svg"),_=!D.match(/^([a-z]*:)?\/\//i),rt=D.startsWith(U);return N&&(_||rt)},Mn=({techdocsStorageApi:m,entityId:D,path:U})=>async $=>{const N=await m.getApiOrigin(),_=async(rt,Pt)=>{for(const Dt of rt)if(Dt.hasAttribute(Pt)){const Bt=Dt.getAttribute(Pt);if(!Bt)return;const Mt=await m.getBaseUrl(Bt,D,U);if(cs(Pt,Bt,N))try{const Xt=await(await fetch(Mt,{credentials:"include"})).text();Dt.setAttribute(Pt,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Xt)))}`)}catch{Dt.setAttribute("alt",`Error: ${Bt}`)}else Dt.setAttribute(Pt,Mt)}};return await Promise.all([_($.querySelectorAll("img"),"src"),_($.querySelectorAll("script"),"src"),_($.querySelectorAll("source"),"src"),_($.querySelectorAll("link"),"href"),_($.querySelectorAll("a[download]"),"href")]),$},ls=()=>m=>(((U,$)=>{Array.from(U).filter(N=>N.hasAttribute($)).forEach(N=>{const _=N.getAttribute($);if(_){_.match(/^https?:\/\//i)&&N.setAttribute("target","_blank");try{const rt=jn(window.location.href);N.setAttribute($,new URL(_,rt).toString())}catch{N.replaceWith(N.textContent||_)}}})})(Array.from(m.getElementsByTagName("a")),"href"),m);function jn(m){const D=new URL(m);return!D.pathname.endsWith("/")&&!D.pathname.endsWith(".html")&&(D.pathname+="/"),D.toString()}var ds=t(27326);let Bn;Bn=Promise.resolve().then(t.t.bind(t,25873,19));function pn(m,D){Bn.then(U=>{"createRoot"in U?U.createRoot(D).render(m):U.render(m,D)})}const us=()=>m=>{const D=m.querySelector('.md-header label[for="__drawer"]'),U=m.querySelector("article");if(!D||!U)return m;const $=D.cloneNode();return pn((0,a.createElement)(ds.A),$),$.id="toggle-sidebar",$.title="Toggle Sidebar",$.classList.add("md-content__button"),$.style.setProperty("padding","0 0 0 5px"),$.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),U?.prepend($),m},hs=()=>m=>(m.querySelector(".md-header")?.remove(),m),Un=()=>m=>(m.querySelector(".md-footer .md-copyright")?.remove(),m.querySelector(".md-footer-copyright")?.remove(),m);var gs=t(36021),ps=t(90292),$n=t(52536),Fn=t.n($n);const fs=m=>D=>{const U=D.querySelector('[title="Edit this page"]');if(!U||!U.href)return D;const $=new URL(U.href),N=m.byUrl($);if(N?.type!=="github"&&N?.type!=="gitlab")return D;const _=D.querySelector("article>h1")?.childNodes[0].textContent||"",rt=encodeURIComponent(`Documentation Feedback: ${_}`),Pt=encodeURIComponent(`Page source:
549
- ${U.href}
550
-
551
- Feedback:`),Dt=N?.type==="github"?(0,gs.F)($.href,"blob"):$.href,Bt=Fn()(Dt),Mt=`/${Bt.organization}/${Bt.name}`,Ut=U.cloneNode();switch(N?.type){case"gitlab":Ut.href=`${$.origin}${Mt}/issues/new?issue[title]=${rt}&issue[description]=${Pt}`;break;case"github":Ut.href=`${$.origin}${Mt}/issues/new?title=${rt}&body=${Pt}`;break;default:return D}return pn((0,a.createElement)(ps.A),Ut),Ut.style.paddingLeft="5px",Ut.title="Leave feedback for this page",Ut.id="git-feedback-link",U?.insertAdjacentElement("beforebegin",Ut),D};var Sn=t(38097);const On=(0,h.A)(m=>({button:{color:m.palette.primary.light,textDecoration:"underline"}})),ms=({message:m,handleButtonClick:D,autoHideDuration:U})=>{const $=On(),[N,_]=(0,a.useState)(!0),rt=()=>_(!1);return(0,n.jsx)(Sn.A,{open:N,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:U,color:"primary",onClose:rt,message:m,action:(0,n.jsx)(gt.A,{classes:{root:$.button},size:"small",onClick:()=>{rt(),D()},children:"Redirect now"})})},Nn=(m,D)=>{const $=N=>{const _=jn(window.location.href),rt=new URL(N,_);if(rt.hostname!==window.location.hostname){const Dt=window.location.pathname,Bt=Dt.indexOf(D),Mt=Dt.slice(0,Bt+D.length);return new URL(Mt,_).href}return rt.href};return N=>{for(const _ of Array.from(N.querySelectorAll("meta")))if(_.getAttribute("http-equiv")==="refresh"){const rt=_.getAttribute("content")?.split("url=");if(!rt||rt.length<2)return N;const Pt=rt[1],Dt=$(Pt);if(window.location.href===Dt)return N;const Bt=document.createElement("div");return pn((0,n.jsx)(ms,{message:"This TechDocs page is no longer maintained. Will automatically redirect to the designated replacement.",handleButtonClick:()=>m(Dt),autoHideDuration:3e3}),Bt),document.body.appendChild(Bt),setTimeout(()=>{m(Dt)},3e3),N}return N}},kn=()=>m=>(setTimeout(()=>{const D=m?.querySelectorAll("li.md-nav__item--active");D.length!==0&&(D.forEach($=>{const N=$?.querySelector("input");N?.checked||N?.click()}),D[D.length-1].scrollIntoView())},200),m);var ys=t(50868),vs=t(10437),Es=t(71677),As=t(87051),xs=t(36338);const Cs=(0,As.A)(m=>({tooltip:{fontSize:"inherit",color:m.palette.text.primary,margin:0,padding:m.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Es.Ay),bs=()=>(0,n.jsx)(vs.A,{children:(0,n.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),Ss=({text:m})=>{const[D,U]=(0,a.useState)(!1),[,$]=(0,xs.A)(),N=(0,a.useCallback)(()=>{$(m),U(!0)},[m,$]),_=(0,a.useCallback)(()=>{U(!1)},[U]);return(0,n.jsx)(Cs,{title:"Copied to clipboard",placement:"left",open:D,onClose:_,leaveDelay:1e3,children:(0,n.jsx)(yt.A,{style:{color:"inherit",position:"absolute"},className:"md-clipboard md-icon",onClick:N,children:(0,n.jsx)(bs,{})})})},Os=m=>D=>{const U=D.querySelectorAll("pre > code");for(const $ of U){const N=$.textContent||"",_=document.createElement("div");$?.parentElement?.prepend(_),pn((0,n.jsx)(ys.A,{theme:m,children:(0,n.jsx)(Ss,{text:N})}),_)}return D},Ps=({baseUrl:m,onClick:D})=>U=>(Array.from(U.getElementsByTagName("a")).forEach($=>{$.addEventListener("click",N=>{const rt=$.getAttribute("href");rt&&rt.startsWith(m)&&!$.hasAttribute("download")&&(N.preventDefault(),D(N,rt))})}),U),Wn=({onLoading:m,onLoaded:D})=>U=>(m(),U.addEventListener(u,function $(){D(),U.removeEventListener(u,$)}),U);function Ts(m,D){const U=new URL(D),$=`${U.origin}${U.pathname.replace(/\/$/,"")}`,N=m.replace($,"").replace(/^\/+/,""),_=new URL(`http://localhost/${N}`);return`${_.pathname}${_.search}${_.hash}`}function Kn(){const m=(0,a.useRef)((0,Nt.Zp)()),U=(0,dt.gf)(Z.U).getOptionalString("app.baseUrl");return(0,a.useCallback)(N=>{let _=N;if(U)try{_=Ts(N,U)}catch{}m.current(_)},[U])}const zn="screen and (max-width: 76.1875em)",ws=m=>{const D=Kn(),U=(0,Ve.A)(),$=(0,Ke.A)(zn),N=se(),_=is(),rt=(0,G.s)(),Pt=(0,dt.gf)(Ye.s),Dt=(0,dt.gf)(Ze.Y),Bt=(0,dt.gf)(Z.U),{state:Mt,path:Ut,content:Xt}=je(),{"*":me=""}=(0,Nt.g)(),[Kt,_t]=(0,a.useState)(null),Ee=p(Kt),ae=(0,a.useCallback)(()=>{if(!Kt)return;Kt.querySelectorAll(".md-sidebar").forEach(ie=>{if($)ie.style.top="0px";else{const ke=document?.querySelector(".techdocs-reader-page")?.getBoundingClientRect().top??0;let Le=Kt.getBoundingClientRect().top??0;const an=Kt.querySelector(".md-container > .md-tabs")?.getBoundingClientRect().height??0;Le<ke&&(Le=ke);const he=Math.max(Le,0)+an;ie.style.top=`${he}px`;const cn=Kt.querySelector(".md-container > .md-footer")?.getBoundingClientRect().top??window.innerHeight;ie.style.height=`${cn-he}px`}ie.style.setProperty("opacity","1")})},[Kt,$]);(0,a.useEffect)(()=>(window.addEventListener("resize",ae),window.addEventListener("scroll",ae,!0),()=>{window.removeEventListener("resize",ae),window.removeEventListener("scroll",ae,!0)}),[Kt,ae]);const ht=(0,a.useCallback)(()=>{if(!Kt)return;const qt=Kt.querySelector(".md-footer");qt&&(qt.style.width=`${Kt.getBoundingClientRect().width}px`)},[Kt]);(0,a.useEffect)(()=>(window.addEventListener("resize",ht),()=>{window.removeEventListener("resize",ht)}),[Kt,ht]),(0,a.useEffect)(()=>{Ee||(ht(),ae())},[Mt,Ee,ht,ae]);const Jt=(0,a.useCallback)((qt,ie)=>bn(qt,[N,Mn({techdocsStorageApi:Pt,entityId:m,path:ie}),ls(),us(),hs(),Un(),fs(Dt),_]),[m,Dt,Pt,N,_]),be=(0,a.useCallback)(async qt=>bn(qt,[Nn(D,m.name),kn(),Os(U),Ps({baseUrl:Bt.getOptionalString("app.baseUrl")||window.location.origin,onClick:(ie,ce)=>{const ke=ie.ctrlKey||ie.metaKey,Le=new URL(ce),tn=ie.target?.innerText||ce,an=ce.replace(window.location.origin,"");rt.captureEvent("click",tn,{attributes:{to:an}}),Le.hash?ke?window.open(ce,"_blank"):(window.location.pathname!==Le.pathname?D(ce):window.history.pushState(null,document.title,Le.hash),qt?.querySelector(`[id="${Le.hash.slice(1)}"]`)?.scrollIntoView()):ke?window.open(ce,"_blank"):D(ce)}}),Wn({onLoading:()=>{},onLoaded:()=>{qt.querySelector(".md-nav__title")?.removeAttribute("for")}}),Wn({onLoading:()=>{Array.from(qt.querySelectorAll(".md-sidebar")).forEach(ce=>{ce.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[U,D,rt,m.name,Bt]);return(0,a.useEffect)(()=>{if(!Xt)return()=>{};let qt=!0;return Jt(Xt,Ut).then(async ie=>{if(!ie?.innerHTML||!qt||me!==Ut)return;window.scroll({top:0});const ce=await be(ie);_t(ce)}),()=>{qt=!1}},[Xt,me,Ut,Jt,be]),Kt};var Pn=t(41883),Fe=t(72020),we=t(99730);const Ne=()=>{const m=(0,Fe.YR)(),{shadowRoot:D}=(0,C.V)(),U=D?.querySelector('[data-md-component="content"]'),$=D?.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let N=$?.querySelector('[data-techdocs-addons-location="primary sidebar"]');N||(N=document.createElement("div"),N.setAttribute("data-techdocs-addons-location","primary sidebar"),$?.prepend(N));const _=D?.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)(Pn.A,{container:N,children:m.renderComponentsByLocation(we.e.PrimarySidebar)}),(0,n.jsx)(Pn.A,{container:U,children:m.renderComponentsByLocation(we.e.Content)}),(0,n.jsx)(Pn.A,{container:rt,children:m.renderComponentsByLocation(we.e.SecondarySidebar)})]})},Rs=(0,h.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Hn=He(m=>{const{withSearch:D=!0,searchResultUrlMapper:U,onReady:$}=m,N=Rs(),{entityMetadata:{value:_,loading:rt},entityRef:Pt,setShadowRoot:Dt}=(0,C.V)(),{state:Bt}=je(),Mt=ws(Pt),Ut=window.location.pathname,Xt=window.location.hash,me=p(Mt),[Kt]=L([`[id="${Xt.slice(1)}"]`]),_t=(0,at.n)(),{NotFoundErrorPage:Ee}=_t.getComponents();(0,a.useEffect)(()=>{me||(Xt?Kt&&Kt.scrollIntoView():document?.querySelector("header")?.scrollIntoView())},[Ut,Xt,Kt,me]);const ae=(0,a.useCallback)(ht=>{Dt(ht),$ instanceof Function&&$()},[Dt,$]);return rt===!1&&!_?(0,n.jsx)(Ee,{}):Mt?(0,n.jsx)(B.U,{children:(0,n.jsxs)(E.A,{container:!0,children:[(0,n.jsx)(E.A,{xs:12,item:!0,children:(0,n.jsx)(ye,{})}),D&&(0,n.jsx)(E.A,{className:N.search,xs:"auto",item:!0,children:(0,n.jsx)(jt,{entityId:Pt,entityTitle:_?.metadata?.title,searchResultUrlMapper:U})}),(0,n.jsxs)(E.A,{xs:12,item:!0,children:[(Bt==="CHECKING"||me)&&(0,n.jsx)(F.k,{}),(0,n.jsx)(A,{element:Mt,onAppend:ae,children:(0,n.jsx)(Ne,{})})]})]})}):(0,n.jsx)(B.U,{children:(0,n.jsx)(E.A,{container:!0,children:(0,n.jsx)(E.A,{xs:12,item:!0,children:(0,n.jsx)(ye,{})})})})}),Is=null},45061:(V,S,t)=>{"use strict";t.d(S,{T:()=>xt});var n=t(31085),a=t(14041),E=t(93285),h=t(42899),C=t(4387),g=t(13660),d=t(72020),f=t(86892),u=t(99730),y=t(82292),p=t(67871),A=t(8859),O=t(34428),T=t(51372),L=t(6820),P=t(58837),j=t(268),B=t(72501),F=t(72072);const W=(0,P.A)(Ot=>({root:{textAlign:"left"},label:{color:Ot.page.fontColor,fontWeight:Ot.typography.fontWeightBold,letterSpacing:0,fontSize:Ot.typography.fontSize,marginBottom:Ot.spacing(1)/2,lineHeight:1},value:{color:(0,j.X4)(Ot.page.fontColor,.8),fontSize:Ot.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),J=({value:Ot,className:It,typographyRootComponent:ut})=>(0,n.jsx)(B.A,{component:ut??(typeof Ot=="string"?"p":"span"),className:It,children:Ot});function H(Ot){const{label:It,value:ut,url:ct,contentTypograpyRootComponent:Ct}=Ot,mt=W(),St=(0,n.jsx)(J,{className:mt.value,value:ut||"<Unknown>",typographyRootComponent:Ct});return(0,n.jsx)(h.A,{item:!0,children:(0,n.jsxs)(B.A,{component:"span",className:mt.root,children:[(0,n.jsx)(B.A,{className:mt.label,children:It}),ct?(0,n.jsx)(F.N_,{to:ct,children:St}):St]})})}var Y=t(69814),K=t(72427),dt=t(65461),G=t(9222),Q=t(56005),Z=t.n(Q),it=t(82779),ft=t(18690);const vt=(0,n.jsx)(C.A,{animation:"wave",variant:"text",height:40}),xt=Ot=>{const{children:It}=Ot,ut=(0,d.YR)(),ct=(0,K.gf)(dt.U),Ct=(0,K.gf)(y.n),{"*":mt=""}=(0,ft.g)(),{title:St,setTitle:Tt,subtitle:at,setSubtitle:yt,entityRef:Et,metadata:{value:et,loading:gt},entityMetadata:{value:nt,loading:M}}=(0,f.V)();(0,a.useEffect)(()=>{et&&(Tt(et.site_name),yt(()=>{let{site_description:le}=et;return(!le||le==="None")&&(le=""),le}))},[et,Tt,yt]);const z=ct.getOptional("app.title")||"Backstage",{locationMetadata:lt,spec:wt}=nt||{},bt=wt?.lifecycle,$t=nt?(0,p.t)(nt,T.vv):[],Ft=(0,G.S)(it.rQ)(),Nt=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(H,{label:Z()(nt?.kind||"entity"),value:(0,n.jsx)(A.z,{color:"inherit",entityRef:Et,title:nt?.metadata.title,defaultKind:"Component"})}),$t.length>0&&(0,n.jsx)(H,{label:"Owner",value:(0,n.jsx)(O.i,{color:"inherit",entityRefs:$t,defaultKind:"group"})}),bt?(0,n.jsx)(H,{label:"Lifecycle",value:String(bt)}):null,lt&&lt.type!=="dir"&&lt.type!=="file"?(0,n.jsx)(H,{label:"",value:(0,n.jsxs)(h.A,{container:!0,direction:"column",alignItems:"center",children:[(0,n.jsx)(h.A,{style:{padding:0},item:!0,children:(0,n.jsx)(g.A,{style:{marginTop:"-25px"}})}),(0,n.jsx)(h.A,{style:{padding:0},item:!0,children:"Source"})]}),url:lt.target}):null]});if(!M&&nt===void 0||!gt&&et===void 0)return null;const te=(0,L.U2)(Et),jt=Ct.forEntity(te).snapshot.primaryTitle,kt=le=>le.replace(/\/$/,""),ee=le=>le.replace(/-/g," ").split(" ").map(Z()).join(" ");let ge=[];mt!==""&&(ge=kt(mt).split("/").slice(0,3).map(ee));const re=[z,jt,...ge].join(" | ");return(0,n.jsxs)(Y.Y,{type:"Documentation",typeLink:Ft,title:St||vt,subtitle:at===""?void 0:at||vt,children:[(0,n.jsx)(E.A,{titleTemplate:"%s",children:(0,n.jsx)("title",{children:re})}),Nt,It,ut.renderComponentsByLocation(u.e.Header)]})}},82779:(V,S,t)=>{"use strict";t.d(S,{Oc:()=>E,Ri:()=>h,rQ:()=>a});var n=t(34569);const a=(0,n.H)({id:"techdocs:index-page"}),E=(0,n.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),h=(0,n.H)({id:"techdocs:catalog-reader-view"})},27698:(V,S,t)=>{"use strict";t.r(S),t.d(S,{TechDocsSearchResultListItem:()=>u});var n=t(31085),a=t(68804),E=t(5951),h=t(58837),C=t(72501),g=t(72072),d=t(70734);const f=(0,h.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),u=y=>{const{result:p,highlight:A,lineClamp:O=5,asListItem:T=!0,asLink:L=!0,title:P,icon:j}=y,B=f(),F=({children:H})=>L?(0,n.jsx)(g.N_,{noTrack:!0,to:p.location,children:H}):(0,n.jsx)(n.Fragment,{children:H}),W=()=>{const H=A?.fields.title?(0,n.jsx)(d.e,{text:A.fields.title,preTag:A.preTag,postTag:A.postTag}):p.title,Y=A?.fields.entityTitle?(0,n.jsx)(d.e,{text:A.fields.entityTitle,preTag:A.preTag,postTag:A.postTag}):p.entityTitle,K=A?.fields.name?(0,n.jsx)(d.e,{text:A.fields.name,preTag:A.preTag,postTag:A.postTag}):p.name;return p?(0,n.jsx)(E.A,{className:B.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,n.jsx)(F,{children:P||(0,n.jsxs)(n.Fragment,{children:[H," | ",Y??K," docs"]})}),secondary:(0,n.jsx)(C.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:O,overflow:"hidden"},color:"textSecondary",variant:"body2",children:A?.fields.text?(0,n.jsx)(d.e,{text:A.fields.text,preTag:A.preTag,postTag:A.postTag}):p.text})}):null},J=({children:H})=>T?(0,n.jsxs)(n.Fragment,{children:[j&&(0,n.jsx)(a.A,{children:typeof j=="function"?j(p):j}),(0,n.jsx)("div",{className:B.flexContainer,children:H})]}):(0,n.jsx)(n.Fragment,{children:H});return(0,n.jsx)(J,{children:(0,n.jsx)(W,{})})}},97184:(V,S,t)=>{const a=document.querySelector('meta[name="backstage-public-path"]')?.getAttribute("content");a&&(t.p=a)},86973:()=>{}},V=>{var S=n=>V(V.s=n);V.O(0,[1751,1888,5067,1678,235,6587,5042,7400,1975,4538,4121],()=>(S(97184),S(71543)));var t=V.O()}]);})();
552
-
553
- //# sourceMappingURL=main.9fff8ae5.js.map