@techdocs/cli 0.0.0-nightly-20231120021609 → 0.0.0-nightly-20231121021721
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -3
- package/dist/cjs/{generate-5fb2bc8c.cjs.js → generate-f9a039d6.cjs.js} +3 -2
- package/dist/cjs/{generate-5fb2bc8c.cjs.js.map → generate-f9a039d6.cjs.js.map} +1 -1
- package/dist/embedded-app/.config-schema.json +22 -22
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/1600.a5f04dd3.chunk.js +3 -0
- package/dist/embedded-app/static/1600.a5f04dd3.chunk.js.map +1 -0
- package/dist/embedded-app/static/{3510.6d8cb98c.chunk.js → 3510.3082d0d9.chunk.js} +1 -1
- package/dist/embedded-app/static/{3510.6d8cb98c.chunk.js.map → 3510.3082d0d9.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{main.aca7118f.js → main.1c79ec84.js} +7 -7
- package/dist/embedded-app/static/main.1c79ec84.js.map +1 -0
- package/dist/embedded-app/static/{module-material-ui.263ce9b5.js → module-material-ui.0420d68d.js} +2 -2
- package/dist/embedded-app/static/{module-material-ui.263ce9b5.js.map → module-material-ui.0420d68d.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.aca7118f.js → runtime.1c79ec84.js} +2 -2
- package/dist/embedded-app/static/{runtime.aca7118f.js.map → runtime.1c79ec84.js.map} +1 -1
- package/dist/embedded-app/static/vendor.1c79ec84.js +159 -0
- package/dist/embedded-app/static/vendor.1c79ec84.js.map +1 -0
- package/dist/index.cjs.js +5 -1
- package/dist/index.cjs.js.map +1 -1
- package/package.json +4 -4
- package/dist/embedded-app/static/1600.951887bd.chunk.js +0 -3
- package/dist/embedded-app/static/1600.951887bd.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.aca7118f.js.map +0 -1
- package/dist/embedded-app/static/vendor.aca7118f.js +0 -207
- package/dist/embedded-app/static/vendor.aca7118f.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{88797:function(_,P,t){"use strict";t.d(P,{n:function(){return o}});const o=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},34106:function(_,P,t){"use strict";t.d(P,{Tf:function(){return d},l2:function(){return i},zG:function(){return o}});const o="default",i="backstage.io/view-url",d="backstage.io/edit-url",b="kubernetes.io/api-server",m="kubernetes.io/api-server-certificate-authority",f="kubernetes.io/auth-provider"},74314:function(_,P,t){"use strict";t.d(P,{eE:function(){return m},iB:function(){return d},of:function(){return b}});var o=t(34106);function i(f){let l=f.indexOf(":");const p=f.indexOf("/");p!==-1&&p<l&&(l=-1);const S=l===-1?void 0:f.slice(0,l),A=p===-1?void 0:f.slice(l+1,p),R=f.slice(Math.max(l+1,p+1));if(S===""||A===""||R==="")throw new TypeError(`Entity reference "${f}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:S,namespace:A,name:R}}function d(f){return{kind:f.kind,namespace:f.metadata.namespace||o.zG,name:f.metadata.name}}function b(f,l){if(!f)throw new Error("Entity reference must not be empty");const p=l==null?void 0:l.defaultKind,S=(l==null?void 0:l.defaultNamespace)||o.zG;let A,R,E;if(typeof f=="string"){const w=i(f);var C;A=(C=w.kind)!==null&&C!==void 0?C:p;var x;R=(x=w.namespace)!==null&&x!==void 0?x:S,E=w.name}else{var B;A=(B=f.kind)!==null&&B!==void 0?B:p;var U;R=(U=f.namespace)!==null&&U!==void 0?U:S,E=f.name}if(A)if(R){if(!E){const w=JSON.stringify(f);throw new Error(`Entity reference ${w} had missing or empty name`)}}else{const w=JSON.stringify(f);throw new Error(`Entity reference ${w} had missing or empty namespace`)}else{const w=JSON.stringify(f);throw new Error(`Entity reference ${w} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:A,namespace:R,name:E}}function m(f){let l,p,S;if("metadata"in f){l=f.kind;var A;p=(A=f.metadata.namespace)!==null&&A!==void 0?A:o.zG,S=f.metadata.name}else{l=f.kind;var R;p=(R=f.namespace)!==null&&R!==void 0?R:o.zG,S=f.name}return`${l.toLocaleLowerCase("en-US")}:${p.toLocaleLowerCase("en-US")}/${S.toLocaleLowerCase("en-US")}`}},8709:function(_,P,t){"use strict";t.d(P,{S4:function(){return o},aS:function(){return x},cz:function(){return C},nP:function(){return l},w$:function(){return p}});const o="ownedBy",i="ownerOf",d="consumesApi",b="apiConsumedBy",m="providesApi",f="apiProvidedBy",l="dependsOn",p="dependencyOf",S="parentOf",A="childOf",R="memberOf",E="hasMember",C="partOf",x="hasPart"},90663:function(_,P,t){"use strict";t.d(P,{M6:function(){return d},P1:function(){return o}});const o="backstage.io/managed-by-location",i="backstage.io/managed-by-origin-location",d="backstage.io/source-location"},51547:function(_,P,t){"use strict";t.d(P,{CV:function(){return f},NZ:function(){return m},Ou:function(){return b}});var o=t(74314),i=t(90663);const d=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;function b(l){if(typeof l!="string")throw new TypeError(`Unable to parse location ref '${l}', unexpected argument ${typeof l}`);const p=l.indexOf(":");if(p<0)throw new TypeError(`Unable to parse location ref '${l}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const S=l.substring(0,p).trim(),A=l.substring(p+1).trim();if(!S||!A)throw new TypeError(`Unable to parse location ref '${l}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(S==="http"||S==="https")throw new TypeError(`Invalid location ref '${l}', please prefix it with 'url:', e.g. 'url:${l}'`);if(d.test(A))throw new TypeError(`Invalid location ref '${l}', target is a javascript: URL`);return{type:S,target:A}}function m(l){const{type:p,target:S}=l;if(p){if(!S)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(d.test(S))throw new TypeError(`Invalid location ref '${p}:${S}', target is a javascript: URL`);return`${p}:${S}`}function f(l){var p,S,A,R,E;const C=(E=(S=l.metadata)===null||S===void 0||(p=S.annotations)===null||p===void 0?void 0:p[i.M6])!==null&&E!==void 0?E:(R=l.metadata)===null||R===void 0||(A=R.annotations)===null||A===void 0?void 0:A[i.P1];if(!C)throw new Error(`Entity '${(0,o.eE)(l)}' is missing location`);return b(C)}},9791:function(_,P,t){"use strict";t.d(P,{O:function(){return S}});var o=t(52322),i=t(62774),d=t(60364),b=t(2784),m=t(83229),f=t(26639),l=t(39595),p=t(58033);function S(A){const{text:R,language:E,showLineNumbers:C=!1,highlightedNumbers:x,customStyle:B,showCopyCodeButton:U=!1}=A,w=(0,d.Z)(),$=w.palette.type==="dark"?f.Z:l.Z,I=w.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,o.jsxs)(i.Z,{position:"relative",children:[(0,o.jsx)(m.Z,{customStyle:B,language:E,style:$,showLineNumbers:C,wrapLines:!0,lineNumberStyle:{color:w.palette.textVerySubtle},lineProps:g=>x!=null&&x.includes(g)?{style:{backgroundColor:I}}:{},children:R}),U&&(0,o.jsx)(i.Z,{position:"absolute",top:0,right:0,children:(0,o.jsx)(p.b,{text:R})})]})}},58033:function(_,P,t){"use strict";t.d(P,{b:function(){return S}});var o=t(52322),i=t(44394),d=t(58513),b=t(61837),m=t(80030),f=t(19353),l=t(2784),p=t(95074);function S(A){const{text:R,tooltipDelay:E=1e3,tooltipText:C="Text copied to clipboard","aria-label":x="Copy text"}=A,B=(0,i.h_)(d.V),[U,w]=(0,l.useState)(!1),[{error:$},I]=(0,p.Z)();(0,l.useEffect)(()=>{$&&B.post($)},[$,B]);const g=K=>{K.stopPropagation(),w(!0),I(R)};return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(m.ZP,{id:"copy-test-tooltip",title:C,placement:"top",leaveDelay:E,onClose:()=>w(!1),open:U,children:(0,o.jsx)(b.Z,{onClick:g,"aria-label":x,children:(0,o.jsx)(f.Z,{})})})})}},70249:function(_,P,t){"use strict";t.d(P,{u:function(){return C}});var o=t(52322),i=t(60905),d=t(79692),b=t(90436),m=t(2784),f=t.p+"static/missingAnnotation.67f79e98..svg",l=t.p+"static/noInformation.4b426325..svg",p=t.p+"static/createComponent.975d1e1e..svg",S=t.p+"static/noBuild.1715fa71..svg";const A=(0,d.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),R=({missing:x})=>{const B=A();switch(x){case"field":return(0,o.jsx)("img",{src:f,className:B.generalImg,alt:"annotation is missing"});case"info":return(0,o.jsx)("img",{src:l,alt:"no Information",className:B.generalImg});case"content":return(0,o.jsx)("img",{src:p,alt:"create Component",className:B.generalImg});case"data":return(0,o.jsx)("img",{src:S,alt:"no Build",className:B.generalImg});default:return null}},E=(0,d.Z)(x=>({root:{backgroundColor:x.palette.background.default,padding:x.spacing(2,0,0,0)},action:{marginTop:x.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function C(x){const{title:B,description:U,missing:w,action:$}=x,I=E();return(0,o.jsxs)(i.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:I.root,spacing:2,children:[(0,o.jsx)(i.Z,{item:!0,xs:12,md:6,children:(0,o.jsxs)(i.Z,{container:!0,direction:"column",children:[(0,o.jsx)(i.Z,{item:!0,xs:!0,children:(0,o.jsx)(b.Z,{variant:"h5",children:B})}),(0,o.jsx)(i.Z,{item:!0,xs:!0,children:(0,o.jsx)(b.Z,{variant:"body1",children:U})}),(0,o.jsx)(i.Z,{item:!0,xs:!0,className:I.action,children:$})]})}),(0,o.jsx)(i.Z,{item:!0,xs:12,md:6,className:I.imageContainer,children:typeof w=="string"?(0,o.jsx)(R,{missing:w}):w.customImage})]})}},74359:function(_,P,t){"use strict";t.d(P,{y:function(){return R}});var o=t(52322),i=t(79692),d=t(11776),b=t(38402),m=t(49378),f=t(2784),l=t(58033),p=t(538);const S=(0,i.Z)(E=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:E.spacing(2)},divider:{margin:E.spacing(2)}}),{name:"BackstageErrorPanel"}),A=({error:E,message:C,stack:x,children:B})=>{const U=S();return(0,o.jsxs)(d.Z,{dense:!0,children:[(0,o.jsxs)(b.Z,{alignItems:"flex-start",children:[(0,o.jsx)(m.Z,{classes:{secondary:U.text},primary:"Error",secondary:E}),(0,o.jsx)(l.b,{text:E})]}),(0,o.jsxs)(b.Z,{alignItems:"flex-start",children:[(0,o.jsx)(m.Z,{classes:{secondary:U.text},primary:"Message",secondary:C}),(0,o.jsx)(l.b,{text:C})]}),x&&(0,o.jsxs)(b.Z,{alignItems:"flex-start",children:[(0,o.jsx)(m.Z,{classes:{secondary:U.text},primary:"Stack Trace",secondary:x}),(0,o.jsx)(l.b,{text:x})]}),B]})};function R(E){const{title:C,error:x,defaultExpanded:B,titleFormat:U,children:w}=E;return(0,o.jsx)(p.G,{severity:"error",title:C!=null?C:x.message,defaultExpanded:B,titleFormat:U,children:(0,o.jsx)(A,{error:x.name,message:x.message,stack:x.stack,children:w})})}},98864:function(_,P,t){"use strict";t.d(P,{rU:function(){return H}});var o=t(52322),i=t(44394),d=t(6542),b=t(62369),m=t(86689),f=t(79692),l=t(90436),p=t(72779),S=t.n(p),A=t(76635),R=t.n(A),E=t(2784),C=t(73557),x=t(71597);function B(){const[G]=(0,C.is)((0,o.jsx)(C.AW,{index:!0,element:(0,o.jsx)("div",{})}));return!G.index}const U=(0,f.Z)({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"}},{name:"Link"}),w=G=>/^([a-z+.-]+):/.test(G),$=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,I=window.open;if(I&&!I.__backstage){const G=function(...Y){const ot=String(Y[0]);if($.test(ot))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return I.apply(this,Y)};G.__backstage=!0,window.open=G}const g=()=>{try{return(0,i.h_)(d.D).getOptionalString("app.baseUrl")}catch{return}},K=()=>{const G="http://sample.dev";var z;const Y=(z=g())!==null&&z!==void 0?z:"/",{pathname:ot}=new URL(Y,G);return(0,A.trimEnd)(ot,"/")},V=G=>{let z=String(G);const Y=K(),ot=w(z),ct=z.startsWith(Y);return!ot&&!ct&&(z=Y.concat(z)),z},J=G=>{if(G instanceof Array)return G.map(J).join(" ").trim();if(typeof G=="object"&&G){var z;return J(G==null||(z=G.props)===null||z===void 0?void 0:z.children)}return["string","number"].includes(typeof G)?String(G):""},H=E.forwardRef(({onClick:G,noTrack:z,...Y},ot)=>{const ct=U(),dt=(0,b.z)(),ft=B()?V(Y.to):Y.to,Ot=J(Y.children)||ft,at=w(ft),At=at&&!!/^https?:/.exec(ft);if($.test(ft))throw new Error("Link component rejected javascript: URL as a security precaution");const X=L=>{G==null||G(L),z||dt.captureEvent("click",Ot,{attributes:{to:ft}})};return at?(0,o.jsxs)(m.Z,{...At?{target:"_blank",rel:"noopener"}:{},...Y,...Y["aria-label"]?{"aria-label":`${Y["aria-label"]}, Opens in a new window`}:{},ref:ot,href:ft,onClick:X,className:S()(ct.externalLink,Y.className),children:[Y.children,(0,o.jsx)(l.Z,{component:"span",className:ct.visuallyHidden,children:", Opens in a new window"})]}):(0,o.jsx)(m.Z,{...Y,ref:ot,component:x.rU,to:ft,onClick:X})})},15929:function(_,P,t){"use strict";t.d(P,{Q:function(){return f}});var o=t(52322),i=t(77277),d=t(2784),b=t(98864);const m=d.forwardRef((p,S)=>(0,o.jsx)(b.rU,{ref:S,...p,color:"initial"})),f=d.forwardRef((p,S)=>(0,o.jsx)(i.Z,{ref:S,component:m,...p})),l=null},78527:function(_,P,t){"use strict";t.d(P,{S:function(){return R}});var o=t(52322),i=t(79692),d=t(28865),b=t(60251),m=t(2784),f=t(9791);const l=(0,i.Z)(E=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${E.palette.border}`},"& th, & td":{border:`1px solid ${E.palette.border}`,padding:E.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:E.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:E.palette.background.paper},"& tr":{backgroundColor:E.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:E.palette.background.default},"& a":{color:E.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),p=(E,C)=>C?typeof C=="string"?E+C:m.Children.toArray(C.props.children).reduce(p,E):E,S=({level:E,children:C})=>{const U=m.Children.toArray(C).reduce(p,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return m.createElement(`h${E}`,{id:U},C)},A={code:({inline:E,className:C,children:x,...B})=>{const U=String(x).replace(/\n+$/,""),w=/language-(\w+)/.exec(C||"");return!E&&w?(0,o.jsx)(f.O,{language:w[1],text:U}):(0,o.jsx)("code",{className:C,...B,children:x})},h1:S,h2:S,h3:S,h4:S,h5:S,h6:S};function R(E){const{content:C,dialect:x="gfm",linkTarget:B,transformLinkUri:U,transformImageUri:w,className:$}=E,I=l();return(0,o.jsx)(d.D,{remarkPlugins:x==="gfm"?[b.Z]:[],className:`${I.markdown} ${$}`,children:C,components:A,linkTarget:B,transformLinkUri:U,transformImageUri:w})}},55015:function(_,P,t){"use strict";t.d(P,{E:function(){return f}});var o=t(52322),i=t(62774),d=t(67358),b=t(60364),m=t(2784);function f(l){const p=(0,b.Z)(),[S,A]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{const R=setTimeout(()=>A(!0),p.transitions.duration.short);return()=>clearTimeout(R)},[p.transitions.duration.short]),S?(0,o.jsx)(d.Z,{...l,"data-testid":"progress"}):(0,o.jsx)(i.Z,{display:"none"})}},35879:function(_,P,t){"use strict";t.d(P,{H:function(){return H}});var o=t(52322),i=t(62774),d=t(21324),b=t(7089),m=t(30192),f=t(74603),l=t(56939),p=t(12231),S=t(73698),A=t(15459),R=t(42494),E=t(79692),C=t(90436),x=t(2784),B=t(72379);const U=(0,E.Z)(G=>(0,R.Z)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var $=()=>{const G=U();return(0,o.jsx)(B.Z,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"})})};const I=(0,E.Z)(G=>(0,R.Z)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var K=()=>{const G=I();return(0,o.jsx)(B.Z,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"})})};const V=(0,A.Z)(G=>(0,R.Z)({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"]),fontFamily:"Helvetica Neue","&:focus":{background:G.palette.background.paper,borderRadius:G.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(f.Z),J=(0,E.Z)(G=>(0,R.Z)({formControl:{margin:G.spacing(1,0),maxWidth:300},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 H(G){const{multiple:z,items:Y,label:ot,placeholder:ct,selected:dt,onChange:ft,triggerReset:Ot,native:at=!1,disabled:At=!1,margin:X}=G,L=J(),[Q,et]=(0,x.useState)(dt||(z?[]:"")),[it,ut]=(0,x.useState)(!1);(0,x.useEffect)(()=>{et(z?[]:"")},[Ot,z]),(0,x.useEffect)(()=>{et(dt||(z?[]:""))},[dt,z]);const Z=vt=>{et(vt.target.value),ft(vt.target.value)},F=vt=>{if(At){vt.preventDefault();return}ut(yt=>z&&!(vt.target instanceof HTMLElement)?!0:!yt)},ht=()=>{ut(!1)},xt=vt=>()=>{const yt=Q.filter(pt=>pt!==vt);et(yt),ft(yt)};return(0,o.jsx)(i.Z,{className:L.root,children:(0,o.jsxs)(m.Z,{className:L.formControl,children:[(0,o.jsx)(l.Z,{className:L.formLabel,children:ot}),(0,o.jsxs)(S.Z,{"aria-label":ot,value:Q,native:at,disabled:At,"data-testid":"select",displayEmpty:!0,multiple:z,margin:X,onChange:Z,open:it,onOpen:F,onClose:ht,input:(0,o.jsx)(V,{}),label:ot,renderValue:vt=>{var yt;return z&&Q.length!==0?(0,o.jsx)(i.Z,{className:L.chips,children:vt.map(pt=>{const bt=Y.find(It=>It.value===pt);return bt?(0,o.jsx)(b.Z,{label:bt==null?void 0:bt.label,clickable:!0,onDelete:xt(pt),className:L.chip},bt==null?void 0:bt.value):!1})}):(0,o.jsx)(C.Z,{children:Q.length===0?ct||"":(yt=Y.find(pt=>pt.value===vt))===null||yt===void 0?void 0:yt.label})},IconComponent:()=>it?(0,o.jsx)(K,{}):(0,o.jsx)($,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[ct&&!z&&(0,o.jsx)(p.Z,{value:[],children:ct}),at?Y&&Y.map(vt=>(0,o.jsx)("option",{value:vt.value,children:vt.label},vt.value)):Y&&Y.map(vt=>(0,o.jsxs)(p.Z,{value:vt.value,children:[z&&(0,o.jsx)(d.Z,{color:"primary",checked:Q.includes(vt.value)||!1,className:L.checkbox}),vt.label]},vt.value))]})]})})}},13788:function(_,P,t){"use strict";t.d(P,{q:function(){return X}});var o=t(52322),i=t(80851),d=t(62774),b=t(77277),m=t(49429),f=t(61837),l=t(86136),p=t(49378),S=t(12231),A=t(50758),R=t(79784),E=t(79692),C=t(90436),x=t(41156),B=t(2784),U=t(77770),w=t(80079);function $(L,Q){const it=(0,i.q)().getSystemIcon(L);return it?(0,o.jsx)(it,{...Q}):(0,o.jsx)(w.Z,{...Q})}function I(L){return $("brokenImage",L)}function g(L){return $("catalog",L)}function K(L){return $("chat",L)}function V(L){return $("dashboard",L)}function J(L){return $("docs",L)}function H(L){return $("email",L)}function G(L){return $("github",L)}function z(L){return $("group",L)}function Y(L){return $("help",L)}function ot(L){return $("user",L)}function ct(L){return $("warning",L)}var dt=t(98864);const ft=(0,E.Z)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),Ot=({icon:L})=>{const Q=(0,i.q)();var et;const it=L&&(et=Q.getSystemIcon(L))!==null&&et!==void 0?et:Y;return(0,o.jsx)(it,{})},at=({link:L})=>{var Q;return(0,o.jsx)(dt.rU,{to:L.url,children:(Q=L.title)!==null&&Q!==void 0?Q:L.url})},At=({item:L})=>{var Q;return(0,o.jsxs)(S.Z,{children:[(0,o.jsx)(l.Z,{children:(0,o.jsx)(Ot,{icon:L.icon})}),(0,o.jsx)(p.Z,{primary:L.title,secondary:(Q=L.links)===null||Q===void 0?void 0:Q.reduce((et,it,ut)=>[...et,ut>0&&(0,o.jsx)("br",{},ut),(0,o.jsx)(at,{link:it},it.url)],[])})]})};function X(L){const{title:Q,items:et,children:it}=L,{items:ut}=(0,U.v)(),[Z,F]=(0,B.useState)(!1),[ht,xt]=(0,B.useState)(null),vt=ft(),yt=(0,x.Z)(It=>It.breakpoints.down("sm")),pt=It=>{xt(It.currentTarget),F(!0)},bt=()=>{F(!1)};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Z,{display:"flex",ml:1,children:yt?(0,o.jsx)(f.Z,{color:"primary",size:"small",onClick:pt,"data-testid":"support-button","aria-label":"Support",children:(0,o.jsx)(Y,{})}):(0,o.jsx)(b.Z,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:pt,startIcon:(0,o.jsx)(Y,{}),children:"Support"})}),(0,o.jsxs)(R.ZP,{"data-testid":"support-button-popover",open:Z,anchorEl:ht,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:bt,children:[(0,o.jsxs)(A.Z,{className:vt.popoverList,autoFocusItem:Boolean(ht),children:[Q&&(0,o.jsx)(S.Z,{alignItems:"flex-start",className:vt.menuItem,children:(0,o.jsx)(C.Z,{variant:"subtitle1",children:Q})}),B.Children.map(it,(It,jt)=>(0,o.jsx)(S.Z,{alignItems:"flex-start",className:vt.menuItem,children:It},`child-${jt}`)),(et!=null?et:ut).map((It,jt)=>(0,o.jsx)(At,{item:It},`item-${jt}`))]}),(0,o.jsx)(m.Z,{children:(0,o.jsx)(b.Z,{color:"primary",onClick:bt,"aria-label":"Close",children:"Close"})})]})]})}},84462:function(_,P,t){"use strict";t.d(P,{i:function(){return ut}});var o=t(52322),i=t(67222),d=t(62774),b=t(61837),m=t(15459),f=t(79692),l=t(60364),p=t(90436),S=t(21070),A=t(90324),R=t(98281),E=t(48049),C=t(51209),x=t(33375),B=t(44233),U=t(27604),w=t(36444),$=t(37971),I=t(59709),g=t(17373),K=t(3702),V=t(93111),J=t(76635),H=t(2784),G=t(77277),z=t(35879);const Y=(0,f.Z)(Z=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:Z.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:Z.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${Z.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:Z.spacing(2)}}}),{name:"BackstageTableFilters"}),ot=Z=>{var F;const ht=Y(),{onChangeFilters:xt}=Z,[vt,yt]=(0,H.useState)({...Z.selectedFilters}),[pt,bt]=(0,H.useState)(!1),It=()=>{yt({}),bt(jt=>!jt)};return(0,H.useEffect)(()=>{xt(vt)},[vt,xt]),(0,o.jsxs)(d.Z,{className:ht.root,children:[(0,o.jsxs)(d.Z,{className:ht.header,children:[(0,o.jsx)(d.Z,{className:ht.value,children:"Filters"}),(0,o.jsx)(G.Z,{color:"primary",onClick:It,children:"Clear all"})]}),(0,o.jsx)(d.Z,{className:ht.filters,children:((F=Z.filters)===null||F===void 0?void 0:F.length)&&Z.filters.map(jt=>(0,o.jsx)(z.H,{triggerReset:pt,...jt.element,selected:vt[jt.element.label],onChange:pe=>yt({...vt,[jt.element.label]:pe})},jt.element.label))})]})};var ct=t(4614);const dt={Add:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(S.Z,{...Z,ref:F})),Check:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(R.Z,{...Z,ref:F})),Clear:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(x.Z,{...Z,ref:F})),Delete:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(B.Z,{...Z,ref:F})),DetailPanel:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(C.Z,{...Z,ref:F})),Edit:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(U.Z,{...Z,ref:F})),Export:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(K.Z,{...Z,ref:F})),Filter:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(w.Z,{...Z,ref:F})),FirstPage:(0,H.forwardRef)((Z,F)=>(0,o.jsx)($.Z,{...Z,ref:F})),LastPage:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(I.Z,{...Z,ref:F})),NextPage:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(C.Z,{...Z,ref:F})),PreviousPage:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(E.Z,{...Z,ref:F})),ResetSearch:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(x.Z,{...Z,ref:F})),Search:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(w.Z,{...Z,ref:F})),SortArrow:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(A.Z,{...Z,ref:F})),ThirdStateCheck:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(g.Z,{...Z,ref:F})),ViewColumn:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(V.Z,{...Z,ref:F}))};function ft(Z,F){const ht=F.split(".");let xt=Z[ht[0]];for(let vt=1;vt<ht.length;++vt){if(xt===void 0)return xt;const yt=ht[vt];xt=xt[yt]}return xt}const Ot=(0,m.Z)(Z=>({header:{padding:Z.spacing(1,2,1,2.5),borderTop:`1px solid ${Z.palette.grey.A100}`,borderBottom:`1px solid ${Z.palette.grey.A100}`,fontWeight:Z.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(i.W$),at=(0,m.Z)(Z=>({root:{padding:Z.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:Z.typography.fontWeightBold}},searchField:{paddingRight:Z.spacing(2)}}),{name:"BackstageTableToolbar"})(i.UW),At=(0,f.Z)(Z=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:Z.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),X=(0,f.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function L(Z,F){return Z.map(ht=>{var xt;const vt=(xt=ht.headerStyle)!==null&&xt!==void 0?xt:{};let yt=ht.cellStyle||{};if(ht.highlight)if(vt.color=F.palette.textContrast,typeof yt=="object")yt.fontWeight=F.typography.fontWeightBold;else{const pt=yt;yt=(bt,It,jt)=>({...pt(bt,It,jt),fontWeight:F.typography.fontWeightBold})}return{...ht,headerStyle:vt,cellStyle:yt}})}function Q(Z,F){return(0,J.transform)(Z,(ht,xt,vt)=>{(0,J.isEqual)(xt,F[vt])||(ht[vt]=xt)})}const et={search:"",filtersOpen:!1,filters:{}};function it(Z){const{toolbarRef:F,setSearch:ht,hasFilters:xt,selectedFiltersLength:vt,toggleFilters:yt}=Z,pt=At(),bt=(0,H.useCallback)(It=>{Z.onSearchChanged(It),ht(It)},[Z,ht]);return xt?(0,o.jsxs)(d.Z,{className:pt.root,children:[(0,o.jsxs)(d.Z,{className:pt.root,children:[(0,o.jsx)(b.Z,{onClick:yt,"aria-label":"filter list",children:(0,o.jsx)(w.Z,{})}),(0,o.jsxs)(p.Z,{className:pt.title,children:["Filters (",vt,")"]})]}),(0,o.jsx)(at,{...Z,ref:F,onSearchChanged:bt})]}):(0,o.jsx)(at,{...Z,ref:F,onSearchChanged:bt})}function ut(Z){const{data:F,columns:ht,options:xt,title:vt,subtitle:yt,filters:pt,initialState:bt,emptyContent:It,onStateChange:jt,components:pe,isLoading:Se,...Ee}=Z,$t=X(),Lt=(0,l.Z)(),Kt={...et,...bt},[Yt,qt]=(0,H.useState)(Kt.filtersOpen),Qt=(0,H.useCallback)(()=>qt(se=>!se),[qt]),[fe,je]=(0,H.useState)(0),[Ye,Ke]=(0,H.useState)(F),[be,Qe]=(0,H.useState)(Kt.filters),Je=L(ht,Lt),[ze,ne]=(0,H.useState)(Kt.search);(0,H.useEffect)(()=>{if(jt){const se=Q({search:ze,filtersOpen:Yt,filters:be},et);jt(se)}},[ze,Yt,be,jt]);const on={headerStyle:{textTransform:"uppercase"}},Oe=(0,H.useCallback)(se=>{var xe;return(xe=ht.find(M=>M.title===se))===null||xe===void 0?void 0:xe.field},[ht]);(0,H.useEffect)(()=>{if(typeof F=="function")return;if(!be){Ke(F);return}const se=Object.values(be);if(F&&se.flat().length){const xe=F.filter(M=>!!Object.entries(be).filter(([,u])=>!!u.length).every(([u,T])=>{const W=ft(M,Oe(u));return Array.isArray(W)&&Array.isArray(T)?W.some(rt=>T.includes(rt)):Array.isArray(W)?W.includes(T):Array.isArray(T)?T.includes(W):W===T}));Ke(xe)}else Ke(F);je(se.flat().length)},[F,be,Oe]);const rn=(se,xe)=>{const M=T=>{const W=new Set,rt=St=>{St!=null&&W.add(St)};return xe&&xe.forEach(St=>{const Rt=ft(St,Oe(T));Array.isArray(Rt)?Rt.forEach(rt):rt(Rt)}),W},u=T=>({placeholder:"All results",label:T.column,multiple:T.type==="multiple-select",items:[...M(T.column)].sort().map(W=>({label:W,value:W}))});return se.map(T=>({type:T.type,element:u(T)}))},Xe=!!(pt!=null&&pt.length),re=(0,H.useCallback)(se=>(0,o.jsx)(it,{setSearch:ne,hasFilters:Xe,selectedFiltersLength:fe,toggleFilters:Qt,...se}),[Qt,Xe,fe,ne]),$e=typeof F!="function"&&F.length===0,Be=ht.length,_e=(0,H.useCallback)(se=>Se?(0,o.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:Be,children:(0,o.jsx)(d.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,o.jsx)(ct.Z,{size:"5rem"})})})})}):It&&$e?(0,o.jsx)("tbody",{children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:Be,children:It})})}):(0,o.jsx)(i.os,{...se}),[$e,It,Be,Se]);return(0,o.jsxs)(d.Z,{className:$t.root,children:[Yt&&F&&typeof F!="function"&&(pt==null?void 0:pt.length)&&(0,o.jsx)(ot,{filters:rn(pt,F),selectedFilters:be,onChangeFilters:Qe}),(0,o.jsx)(i.ZP,{components:{Header:Ot,Toolbar:re,Body:_e,...pe},options:{...on,...xt},columns:Je,icons:dt,title:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p.Z,{variant:"h5",component:"h2",children:vt}),yt&&(0,o.jsx)(p.Z,{color:"textSecondary",variant:"body1",children:yt})]}),data:typeof F=="function"?F:Ye,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter",searchTooltip:"Filter"}},...Ee})]})}ut.icons=Object.freeze(dt)},538:function(_,P,t){"use strict";t.d(P,{G:function(){return g}});var o=t(52322),i=t(41128),d=t(79692),b=t(27616),m=t(8284),f=t(70660),l=t(60905),p=t(90436),S=t(91750),A=t(38016),R=t(2784),E=t(78527);const C=(K,V)=>(V.palette.type==="light"?i._j:i.$n)(V.palette[K].light,.6),x=(K,V)=>(V.palette.type==="light"?i.$n:i._j)(V.palette[K].light,.9),B=(0,d.Z)(K=>({root:{marginRight:K.spacing(1),fill:({severity:V})=>C(V,K)}})),U=({severity:K})=>{const V=B({severity:K});return(0,o.jsx)(S.Z,{classes:V})},w=({severity:K})=>{const V=B({severity:K});return(0,o.jsx)(A.Z,{classes:V})},$=(0,d.Z)(K=>({panel:{backgroundColor:({severity:V})=>x(V,K),color:({severity:V})=>C(V,K),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:V})=>C(V,K),fontWeight:K.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:V})=>C(V,K),backgroundColor:({severity:V})=>x(V,K)},details:{width:"100%",display:"block",color:K.palette.textContrast,backgroundColor:K.palette.background.default,border:`1px solid ${K.palette.border}`,padding:K.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),I=K=>K.charAt(0).toLocaleUpperCase("en-US")+K.slice(1);function g(K){const{severity:V="warning",title:J,titleFormat:H,message:G,children:z,defaultExpanded:Y}=K,ot=$({severity:V}),ct=I(V)+(J?`: ${J}`:"");return(0,o.jsxs)(b.Z,{defaultExpanded:Y!=null?Y:!1,className:ot.panel,role:"alert",children:[(0,o.jsxs)(m.Z,{expandIcon:(0,o.jsx)(w,{severity:V}),className:ot.summary,children:[(0,o.jsx)(U,{severity:V}),(0,o.jsx)(p.Z,{className:ot.summaryText,variant:"subtitle1",children:H==="markdown"?(0,o.jsx)(E.S,{content:ct,className:ot.markdownContent}):ct})]}),(G||z)&&(0,o.jsx)(f.Z,{children:(0,o.jsxs)(l.Z,{container:!0,children:[G&&(0,o.jsx)(l.Z,{item:!0,xs:12,children:(0,o.jsx)(p.Z,{className:ot.message,variant:"body1",children:G})}),z&&(0,o.jsx)(l.Z,{item:!0,xs:12,className:ot.details,children:z})]})})]})}},77770:function(_,P,t){"use strict";t.d(P,{v:function(){return b}});var o=t(44394),i=t(6542);const d={url:"https://github.com/backstage/backstage/issues",items:[{title:"Support Not Configured",icon:"warning",links:[{title:"Add `app.support` config key",url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]};function b(){const f=(0,o.I_)().get(i.D),l=f==null?void 0:f.getOptionalConfig("app.support");return l?{url:l.getString("url"),items:l.getConfigArray("items").flatMap(p=>{var S;return{title:p.getString("title"),icon:p.getOptionalString("icon"),links:((S=p.getOptionalConfigArray("links"))!==null&&S!==void 0?S:[]).flatMap(A=>({url:A.getString("url"),title:A.getString("title")}))}})}:d}},42398:function(_,P,t){"use strict";t.d(P,{V:function(){return l}});var o=t(52322),i=t(79692),d=t(72779),b=t.n(d),m=t(2784);const f=(0,i.Z)(p=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:p.spacing(3),paddingBottom:p.spacing(3),paddingLeft:p.spacing(2),paddingRight:p.spacing(2),[p.breakpoints.up("sm")]:{paddingLeft:p.spacing(3),paddingRight:p.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function l(p){const{className:S,stretch:A,noPadding:R,children:E,...C}=p,x=f();return(0,o.jsx)("article",{...C,className:b()(x.root,S,{[x.stretch]:A,[x.noPadding]:R}),children:E})}},30706:function(_,P,t){"use strict";t.d(P,{y:function(){return S}});var o=t(52322),i=t(62774),d=t(79692),b=t(90436),m=t(2784),f=t(18671);const l=A=>(0,d.Z)(R=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:R.spacing(2),textAlign:A.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:R.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),p=({title:A="Unknown page",className:R})=>(0,o.jsx)(b.Z,{variant:"h4",component:"h2",className:R,"data-testid":"header-title",children:A});function S(A){const{description:R,title:E,titleComponent:C=void 0,children:x,textAlign:B="left"}=A,U=l({textAlign:B})(),w=C||(0,o.jsx)(p,{title:E,className:U.title});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(f.q,{title:E}),(0,o.jsxs)(i.Z,{className:U.container,children:[(0,o.jsxs)(i.Z,{className:U.leftItemsBox,children:[w,R&&(0,o.jsx)(b.Z,{className:U.description,variant:"body2",children:R})]}),(0,o.jsx)(i.Z,{className:U.rightItemsBox,children:x})]})]})}},87435:function(_,P,t){"use strict";t.d(P,{m:function(){return C}});var o=t(52322),i=t(60905),d=t(79692),b=t(90436),m=t(2784),f=t(73557),l=t(98864),p=t(77770),S=t.p+"static/mic-drop.fe3ef4d0..svg";const A=(0,d.Z)(x=>({micDrop:{maxWidth:"60%",bottom:x.spacing(2),right:x.spacing(2),[x.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:x.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),R=()=>{const x=A();return(0,o.jsx)("img",{src:S,className:x.micDrop,alt:"Girl dropping mic from her hands"})},E=(0,d.Z)(x=>({container:{padding:x.spacing(8),[x.breakpoints.down("xs")]:{padding:x.spacing(2)}},title:{paddingBottom:x.spacing(5),[x.breakpoints.down("xs")]:{paddingBottom:x.spacing(4),fontSize:x.typography.h3.fontSize}},subtitle:{color:x.palette.textSubtle}}),{name:"BackstageErrorPage"});function C(x){const{status:B,statusMessage:U,additionalInfo:w,supportUrl:$}=x,I=E(),g=(0,f.s0)(),K=(0,p.v)();return(0,o.jsxs)(i.Z,{container:!0,spacing:0,className:I.container,children:[(0,o.jsxs)(i.Z,{item:!0,xs:12,sm:8,md:4,children:[(0,o.jsxs)(b.Z,{"data-testid":"error",variant:"body1",className:I.subtitle,children:["ERROR ",B,": ",U]}),(0,o.jsx)(b.Z,{variant:"body1",className:I.subtitle,children:w}),(0,o.jsx)(b.Z,{variant:"h2",className:I.title,children:"Looks like someone dropped the mic!"}),(0,o.jsxs)(b.Z,{variant:"h6",children:[(0,o.jsx)(l.rU,{to:"#","data-testid":"go-back-link",onClick:()=>g(-1),children:"Go back"}),"... or please"," ",(0,o.jsx)(l.rU,{to:$||K.url,children:"contact support"})," if you think this is a bug."]})]}),(0,o.jsx)(R,{})]})}},48037:function(_,P,t){"use strict";t.d(P,{h:function(){return G}});var o=t(52322),i=t(44394),d=t(6542),b=t(62774),m=t(60905),f=t(79692),l=t(80030),p=t(90436),S=t(2784),A=t(18671),R=t(98864),E=t(16173),C=t(11776),x=t(38402),B=t(79784),U=t(15459);const w=(0,U.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(p.Z),$=(0,U.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(b.Z);function I(z){const{children:Y,...ot}=z,[ct,dt]=S.useState(null),ft=S.Children.toArray(Y),[Ot,at,...At]=ft,X=At.length?At.pop():ft[ft.length-1],L=ft.length>3,Q=ut=>{dt(ut.currentTarget)},et=()=>{dt(null)},it=Boolean(ct);return(0,o.jsxs)(S.Fragment,{children:[(0,o.jsxs)(E.Z,{"aria-label":"breadcrumb",...ot,children:[ft.length>1&&(0,o.jsx)($,{clone:!0,children:Ot}),ft.length>2&&(0,o.jsx)($,{clone:!0,children:at}),L&&(0,o.jsx)(w,{onClick:Q,children:"..."}),(0,o.jsx)(b.Z,{style:{fontStyle:"italic"},children:X})]}),(0,o.jsx)(B.ZP,{open:it,anchorEl:ct,onClose:et,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,o.jsx)(C.Z,{children:At.map((ut,Z)=>(0,o.jsx)(x.Z,{button:!0,children:(0,o.jsx)($,{clone:!0,children:ut})},Z))})})]})}var g=t(44409);const K=(0,f.Z)(z=>({header:{gridArea:"pageHeader",padding:z.spacing(3),width:"100%",boxShadow:z.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:z.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[z.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:z.page.fontColor,wordBreak:"break-word",fontSize:z.typography.h3.fontSize,marginBottom:0},subtitle:{color:z.page.fontColor,opacity:.8,display:"inline-block",marginTop:z.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:z.spacing(1),color:z.page.fontColor},breadcrumb:{color:z.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-z.spacing(.3),marginBottom:z.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-z.spacing(.3),marginBottom:z.spacing(.3)}}),{name:"BackstageHeader"}),V=({type:z,typeLink:Y,classes:ot,pageTitle:ct})=>z?Y?(0,o.jsxs)(I,{className:ot.breadcrumb,children:[(0,o.jsx)(R.rU,{to:Y,children:z}),(0,o.jsx)(p.Z,{children:ct})]}):(0,o.jsx)(p.Z,{className:ot.type,children:z}):null,J=({pageTitle:z,classes:Y,tooltip:ot})=>{const{contentRef:ct}=(0,g.r)(),dt=(0,o.jsx)(p.Z,{ref:ct,tabIndex:-1,className:Y.title,variant:"h1",children:z});return ot?(0,o.jsx)(l.ZP,{title:ot,placement:"top-start",children:dt}):dt},H=({classes:z,subtitle:Y})=>Y?typeof Y!="string"?(0,o.jsx)(o.Fragment,{children:Y}):(0,o.jsx)(p.Z,{className:z.subtitle,variant:"subtitle2",component:"span",children:Y}):null;function G(z){const{children:Y,pageTitleOverride:ot,style:ct,subtitle:dt,title:ft,tooltip:Ot,type:at,typeLink:At}=z,X=K(),Q=(0,i.h_)(d.D).getOptionalString("app.title")||"Backstage",et=ot||ft,it=ft||ot,ut=`${et} | %s | ${Q}`,Z=`${et} | ${Q}`;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(A.q,{titleTemplate:ut,defaultTitle:Z}),(0,o.jsxs)("header",{style:ct,className:X.header,children:[(0,o.jsxs)(b.Z,{className:X.leftItemsBox,children:[(0,o.jsx)(V,{classes:X,type:at,typeLink:At,pageTitle:it}),(0,o.jsx)(J,{classes:X,pageTitle:it,tooltip:Ot}),(0,o.jsx)(H,{classes:X,subtitle:dt})]}),(0,o.jsx)(m.Z,{container:!0,className:X.rightItemsBox,spacing:4,children:Y})]})]})}},67880:function(_,P,t){"use strict";t.d(P,{T:function(){return f}});var o=t(52322),i=t(2784),d=t(79692),b=t(41547);const m=(0,d.Z)(l=>({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",[l.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function f(l){const{themeId:p,children:S}=l,A=m();return(0,o.jsx)(b.Z,{theme:R=>({...R,page:R.getPageTheme({themeId:p})}),children:(0,o.jsx)("main",{className:A.root,children:S})})}},32166:function(_,P,t){"use strict";t.d(P,{g:function(){return m}});var o=t(52322),i=t(2784),d=t(48037),b=t(67880);function m(f){const{themeId:l,children:p,...S}=f;return(0,o.jsxs)(b.T,{themeId:l,children:[(0,o.jsx)(d.h,{...S}),p]})}},44409:function(_,P,t){"use strict";t.d(P,{t:function(){return E},r:function(){return C}});var o=t(52322),i=t(62774),d=t(79692),b=t(41156),m=t(2784),f=t(76921),l;(function(x){x.SIDEBAR_PIN_STATE="sidebarPinState"})(l||(l={}));const p={getSidebarPinState(){let x;try{x=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!x},setSidebarPinState(x){return window.localStorage.setItem("sidebarPinState",JSON.stringify(x))}};var S=t(93539);const A=(0,d.Z)(x=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[x.breakpoints.up("sm")]:{paddingLeft:B=>B.isPinned?B.sidebarConfig.drawerWidthOpen:B.sidebarConfig.drawerWidthClosed},[x.breakpoints.down("xs")]:{paddingBottom:B=>B.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),R=(0,m.createContext)({content:{contentRef:void 0}});function E(x){const[B,U]=(0,m.useState)(()=>p.getSidebarPinState()),{sidebarConfig:w}=(0,m.useContext)(f.kG),$=(0,m.useRef)(null),I=(0,m.useMemo)(()=>({content:{contentRef:$}}),[$]);(0,m.useEffect)(()=>{p.setSidebarPinState(B)},[B]);const g=(0,b.Z)(J=>J.breakpoints.down("xs"),{noSsr:!0}),K=()=>U(!B),V=A({isPinned:B,sidebarConfig:w});return(0,o.jsx)(S.lE,{value:{isPinned:B,toggleSidebarPinState:K,isMobile:g},children:(0,o.jsx)(R.Provider,{value:I,children:(0,o.jsx)(i.Z,{className:V.root,children:x.children})})})}function C(){const{content:x}=(0,m.useContext)(R);return{focusContent:(0,m.useCallback)(()=>{var U,w;x==null||(w=x.contentRef)===null||w===void 0||(U=w.current)===null||U===void 0||U.focus()},[x]),contentRef:x==null?void 0:x.contentRef}}},93539:function(_,P,t){"use strict";t.d(P,{Pf:function(){return S},lE:function(){return p}});var o=t(52322),i=t(29651),d=t(68993),b=t(2784);const m={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},f=(0,b.createContext)(m),l=(0,i.CT)("sidebar-pin-state-context");function p(A){const{children:R,value:E}=A;return(0,o.jsx)(f.Provider,{value:E,children:(0,o.jsx)(l.Provider,{value:(0,d.E)({1:E}),children:R})})}const S=()=>{const A=(0,b.useContext)(l),R=(0,b.useContext)(f);if(A===void 0)return R||m;const E=A.atVersion(1);if(E===void 0)throw new Error("No context found for version 1.");return E}},76921:function(_,P,t){"use strict";t.d(P,{$E:function(){return f},Ag:function(){return R},kG:function(){return A},po:function(){return m},rW:function(){return p}});var o=t(2784);const i=72,d=24,b=18,m={drawerWidthClosed:i,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:i,iconSize:i-d*2,iconPadding:d,selectedIndicatorWidth:3,userBadgePadding:b,userBadgeDiameter:i-b*2,mobileSidebarHeight:56},f=E=>({...m,...E,iconContainerWidth:m.drawerWidthClosed,iconSize:m.drawerWidthClosed-m.iconPadding*2,userBadgeDiameter:m.drawerWidthClosed-m.userBadgePadding*2}),l={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:m.defaultOpenDelayMs+200},p=E=>({...l,...E}),S="@backstage/core/sidebar-intro-dismissed",A=(0,o.createContext)({sidebarConfig:m,submenuConfig:l}),R=(0,o.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},72388:function(_,P,t){"use strict";t.d(P,{Os:function(){return f},fC:function(){return l}});var o=t(52322),i=t(29651),d=t(68993),b=t(2784);const m=(0,i.CT)("analytics-context"),f=()=>{const S=(0,b.useContext)(m);if(S===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const A=S.atVersion(1);if(A===void 0)throw new Error("No context found for version 1.");return A},l=S=>{const{attributes:A,children:R}=S,C={...f(),...A},x=(0,d.E)({1:C});return(0,o.jsx)(m.Provider,{value:x,children:R})};function p(S,A){const R=E=>_jsx(l,{attributes:A,children:_jsx(S,{...E})});return R.displayName=`WithAnalyticsContext(${S.displayName||S.name||"Component"})`,R}},7355:function(_,P,t){"use strict";t.d(P,{f:function(){return m},h:function(){return b}});var o=t(87612),i=t(96087);const d=(0,i.u)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),b="_ROUTABLE-EXTENSION-RENDERED";class m{setContext(l){this.context=l}captureEvent(l,p,{value:S,attributes:A}={}){const{_routeNodeType:R,...E}=this.context;if(l===b){d.mostRecentGatheredNavigation&&(d.mostRecentRoutableExtensionRender={context:{...E,extension:"App"}});return}if(d.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...d.mostRecentGatheredNavigation,...d.mostRecentRoutableExtensionRender})}catch(C){console.warn("Error during analytics event capture. %o",C)}d.mostRecentGatheredNavigation=void 0,d.mostRecentRoutableExtensionRender=void 0}if(l==="navigate"&&R==="gathered"&&E.pluginId==="root"){d.mostRecentGatheredNavigation={action:l,subject:p,value:S,attributes:A,context:E};return}try{this.analyticsApi.captureEvent({action:l,subject:p,value:S,attributes:A,context:E})}catch(C){console.warn("Error during analytics event capture. %o",C)}}constructor(l,p={routeRef:"unknown",pluginId:"root",extension:"App"}){(0,o._)(this,"analyticsApi",void 0),(0,o._)(this,"context",void 0),this.analyticsApi=l,this.context=p,d.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{d.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...d.mostRecentGatheredNavigation,...d.mostRecentRoutableExtensionRender}),d.mostRecentGatheredNavigation=void 0,d.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),d.beforeUnloadRegistered=!0)}}},62369:function(_,P,t){"use strict";t.d(P,{z:function(){return l}});var o=t(72388),i=t(44394),d=t(86386),b=t(2784),m=t(7355);function f(){try{return(0,i.h_)(d.v)}catch{return{captureEvent:()=>{}}}}function l(){const p=(0,b.useRef)(null),S=(0,o.Os)(),A=f();function R(){return p.current===null&&(p.current=new m.f(A)),p.current}const E=R();return E.setContext(S),E}},78847:function(_,P,t){"use strict";t.d(P,{$:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.alert"})},86386:function(_,P,t){"use strict";t.d(P,{v:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.analytics"})},6542:function(_,P,t){"use strict";t.d(P,{D:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.config"})},96727:function(_,P,t){"use strict";t.d(P,{N:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.discovery"})},58513:function(_,P,t){"use strict";t.d(P,{V:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.error"})},82723:function(_,P,t){"use strict";t.d(P,{C:function(){return i},W:function(){return d}});var o=t(95965),i;(function(b){b[b.None=0]="None",b[b.Active=1]="Active"})(i||(i={}));const d=(0,o.T)({id:"core.featureflags"})},85094:function(_,P,t){"use strict";t.d(P,{g:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.fetch"})},77186:function(_,P,t){"use strict";t.d(P,{$:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.identity"})},96253:function(_,P,t){"use strict";t.d(P,{o:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.translation"})},95965:function(_,P,t){"use strict";t.d(P,{T:function(){return d}});var o=t(87612);class i{get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}constructor(m){if((0,o._)(this,"config",void 0),this.config=m,!m.id.split(".").flatMap(l=>l.split("-")).every(l=>l.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${m.id}'`)}}function d(b){return new i(b)}},42380:function(_,P,t){"use strict";t.d(P,{n:function(){return o}});function o(i,d){return"id"in i?{api:i,deps:{},factory:()=>d}:i}},44394:function(_,P,t){"use strict";t.d(P,{I_:function(){return b},h_:function(){return m}});var o=t(52322),i=t(2784),d=t(29651);function b(){const l=(0,d.Vt)("api-context");if(!l)throw new Error("API context is not available");const p=l.atVersion(1);if(!p)throw new Error("ApiContext v1 not available");return p}function m(l){const S=b().get(l);if(!S)throw new Error(`No implementation available for ${l}`);return S}function f(l){return function(S){const A=E=>{const C=b(),x={};for(const B in l)if(l.hasOwnProperty(B)){const U=l[B],w=C.get(U);if(!w)throw new Error(`No implementation available for ${U}`);x[B]=w}return _jsx(S,{...E,...x})},R=S.displayName||S.name||"Component";return A.displayName=`withApis(${R})`,A}}},80851:function(_,P,t){"use strict";t.d(P,{q:function(){return i}});var o=t(29651);const i=()=>{const d=(0,o.Vt)("app-context");if(!d)throw new Error("App context is not available");const b=d.atVersion(1);if(!b)throw new Error("AppContext v1 not available");return b}},62584:function(_,P,t){"use strict";t.d(P,{I:function(){return m},R:function(){return b}});var o=t(96087);const i=(0,o.u)("component-data-store",()=>new WeakMap),d="__backstage_data";function b(f,l,p){const S=f;var A;let R=(A=S[d])!==null&&A!==void 0?A:i.get(f);if(R||(R={map:new Map},Object.defineProperty(S,d,{enumerable:!1,configurable:!0,writable:!1,value:R}),i.set(f,R)),R.map.has(l)){const E=f.displayName||f.name;throw new Error(`Attempted to attach duplicate data "${l}" to component "${E}"`)}R.map.set(l,p)}function m(f,l){if(!f)return;const p=f.type;if(!p)return;var S;const A=(S=p[d])!==null&&S!==void 0?S:i.get(p);if(A)return A.map.get(l)}},82963:function(_,P,t){"use strict";t.d(P,{CO:function(){return E},YO:function(){return C},P4:function(){return R}});var o=t(52322),i=t(2784),d=t(62369),b=t(72388),m=t(80851),f=t(37321),l=t(62584),p=t(87612);class S extends i.Component{static getDerivedStateFromError(B){return{error:B}}render(){const{error:B}=this.state,{app:U,plugin:w}=this.props,{ErrorBoundaryFallback:$}=U.getComponents();return B?(0,o.jsx)($,{error:B,resetError:this.handleErrorReset,plugin:w}):this.props.children}constructor(...B){super(...B),(0,p._)(this,"state",{error:void 0}),(0,p._)(this,"handleErrorReset",()=>{this.setState({error:void 0})})}}var A=t(7355);function R(x){const{component:B,mountPoint:U,name:w}=x;return C({component:{lazy:()=>B().then($=>{const I=K=>{const V=(0,d.z)();try{(0,f.t)(U)}catch(J){if(typeof J=="object"&&J!==null){const{message:H}=J;if(typeof H=="string"&&H.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${U} 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 J}return(0,i.useEffect)(()=>{V.captureEvent(A.h,"")},[V]),(0,o.jsx)($,{...K})},g=w||$.displayName||$.name||"LazyComponent";return I.displayName=`RoutableExtension(${g})`,I},$=>g=>{const K=(0,m.q)(),{BootErrorPage:V}=K.getComponents();return(0,o.jsx)(V,{step:"load-chunk",error:$})})},data:{"core.mountPoint":U},name:w})}function E(x){const{component:B,name:U}=x;return C({component:B,name:U})}function C(x){const{data:B={},name:U}=x;U||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let w;if("lazy"in x.component){const I=x.component.lazy;w=(0,i.lazy)(()=>I().then(g=>({default:g})))}else w=x.component.sync;const $=U||w.displayName||w.name||"Component";return{expose(I){const g=K=>{const V=(0,m.q)(),{Progress:J}=V.getComponents(),H=B==null?void 0:B["core.mountPoint"];return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(J,{}),children:(0,o.jsx)(S,{app:V,plugin:I,children:(0,o.jsx)(b.fC,{attributes:{pluginId:I.getId(),...U&&{extension:U},...H&&{routeRef:H.id}},children:(0,o.jsx)(w,{...K})})})})};(0,l.R)(g,"core.plugin",I),(0,l.R)(g,"core.extensionName",U);for(const[K,V]of Object.entries(B))(0,l.R)(g,K,V);return g.displayName=`Extension(${$})`,g}}}},2532:function(_,P,t){"use strict";t.d(P,{v:function(){return p}});var o=t(87612),i=t(2784),d=t(62584),b=t(44394),m=t(82723);function f(S,A,R,E){return i.Children.toArray(S).flatMap(C=>{if(!(0,i.isValidElement)(C))return[];if(C.type===i.Fragment)return f(C.props.children,A,R,E);if((0,d.I)(C,"core.featureFlagged")){const x=C.props;return("with"in x?A.isActive(x.with):!A.isActive(x.without))?f(C.props.children,A,R,E):[]}if(R===void 0||R(C))return[C];if(E)throw new Error(E);return f(C.props.children,A,R,E)})}class l{selectByComponentData(A){const R=f(this.node,this.featureFlagsApi,E=>(0,d.I)(E,A.key)!==void 0,A.withStrictError);return new l(R,this.featureFlagsApi)}findComponentData(A){return f(this.node,this.featureFlagsApi,E=>(0,d.I)(E,A.key)!==void 0).map(E=>(0,d.I)(E,A.key)).filter(E=>E!==void 0)}getElements(){return f(this.node,this.featureFlagsApi)}constructor(A,R){(0,o._)(this,"node",void 0),(0,o._)(this,"featureFlagsApi",void 0),this.node=A,this.featureFlagsApi=R}}function p(S,A,R=[]){const E=(0,b.h_)(m.W),C=new l(S,E);return(0,i.useMemo)(()=>A(C),[S,...R])}},15006:function(_,P,t){"use strict";t.d(P,{r:function(){return d}});var o=t(87612);class i{getId(){return this.config.id}getApis(){var m;return(m=this.config.apis)!==null&&m!==void 0?m:[]}getFeatureFlags(){var m,f;return(f=(m=this.config.featureFlags)===null||m===void 0?void 0:m.slice())!==null&&f!==void 0?f:[]}get routes(){var m;return(m=this.config.routes)!==null&&m!==void 0?m:{}}get externalRoutes(){var m;return(m=this.config.externalRoutes)!==null&&m!==void 0?m:{}}provide(m){return m.expose(this)}toString(){return`plugin{${this.config.id}}`}constructor(m){(0,o._)(this,"config",void 0),this.config=m}}function d(b){return new i(b)}},30283:function(_,P,t){"use strict";t.d(P,{N:function(){return f}});var o=t(87612),i=t(92918);let d=i.K,b=d;class m{get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}constructor(p,S){(0,o._)(this,"id",void 0),(0,o._)(this,"params",void 0),(0,o._)(this,b,void 0),this.id=p,this.params=S,this[d]="absolute"}}function f(l){var p;return new m(l.id,(p=l.params)!==null&&p!==void 0?p:[])}},92918:function(_,P,t){"use strict";t.d(P,{K:function(){return i}});var o=t(96087);const i=(0,o.u)("route-ref-type",()=>Symbol("route-ref-type"))},37321:function(_,P,t){"use strict";t.d(P,{t:function(){return b}});var o=t(2784),i=t(73557),d=t(29651);function b(m){const{pathname:f}=(0,i.TH)(),l=(0,d.Vt)("routing-context");if(!l)throw new Error("Routing context is not available");const p=l.atVersion(1),S=(0,o.useMemo)(()=>p&&p.resolve(m,{pathname:f}),[p,m,f]);if(!l)throw new Error("useRouteRef used outside of routing context");if(!p)throw new Error("RoutingContext v1 not available");const A="optional"in m&&m.optional;if(!S&&!A)throw new Error(`No path for ${m}`);return S}},35304:function(_,P,t){"use strict";t.d(P,{F:function(){return A},y:function(){return R}});var o=t(88412),i=t(52475),d=t(80956),b=t(87612),m=t(18015),f=new WeakMap,l=new WeakMap,p=new WeakMap;class S{get id(){return(0,o._)(this,f)}get T(){throw new Error("Not implemented")}getDefaultMessages(){return(0,o._)(this,l)}setDefaultResource(C){(0,d._)(this,p,C)}getDefaultResource(){return(0,o._)(this,p)}toString(){return`TranslationRef{id=${this.id}}`}constructor(C){(0,i._)(this,f,{writable:!0,value:void 0}),(0,i._)(this,l,{writable:!0,value:void 0}),(0,i._)(this,p,{writable:!0,value:void 0}),(0,b._)(this,"$$type","@backstage/TranslationRef"),(0,b._)(this,"version","v1"),(0,d._)(this,f,C.id),(0,d._)(this,l,C.messages)}}function A(E){const C=new S(E);return E.translations&&C.setDefaultResource((0,m.N)({ref:C,translations:E.translations})),C}function R(E){const C=E;if(C.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${C.$$type}'`);if(C.version!=="v1")throw new Error(`Invalid translation ref, bad version '${C.version}'`);return C}},18015:function(_,P,t){"use strict";t.d(P,{N:function(){return i},W:function(){return o}});function o(d){const b=d;if(b.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${b.$$type}'`);if(b.version!=="v1")throw new Error(`Invalid translation resource, bad version '${b.version}'`);return b}function i(d){return{$$type:"@backstage/TranslationResource",version:"v1",id:d.ref.id,resources:Object.entries(d.translations).map(([b,m])=>({language:b,loader:()=>m().then(f=>{const l=f.default;return{messages:(l==null?void 0:l.$$type)==="@backstage/TranslationMessages"?l.messages:l}})}))}}},41385:function(_,P,t){"use strict";t.d(P,{V:function(){return b}});var o=t(87612),i=t(48998);async function d(m){try{const l=await m.text();if(l){var f;if(!((f=m.headers.get("content-type"))===null||f===void 0)&&f.startsWith("application/json"))try{const p=JSON.parse(l);if(p.error&&p.response)return p}catch{}return{error:{name:"Error",message:`Request failed with status ${m.status} ${m.statusText}, ${l}`},response:{statusCode:m.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${m.status} ${m.statusText}`},response:{statusCode:m.status}}}class b extends Error{static async fromResponse(f){const l=await d(f),p=l.response.statusCode||f.status,S=l.error.name||f.statusText,A=`Request failed with ${p} ${S}`,R=(0,i.Fq)(l.error);return new b({message:A,response:f,data:l,cause:R})}constructor(f){super(f.message),(0,o._)(this,"response",void 0),(0,o._)(this,"body",void 0),(0,o._)(this,"cause",void 0),this.name="ResponseError",this.response=f.response,this.body=f.data,this.cause=f.cause}}},30474:function(_,P,t){"use strict";t.d(P,{V:function(){return o}});function o(d){if(typeof d!="object"||d===null||Array.isArray(d))return!1;const b=d;return!(typeof b.name!="string"||b.name===""||typeof b.message!="string")}function i(d){if(typeof d!="object"||d===null||Array.isArray(d))throw new Error(`Encountered invalid error, not an object, got '${d}'`);const b=d;if(typeof b.name!="string"||b.name==="")throw new Error(`Encountered error object without a name, got '${d}'`);if(typeof b.message!="string")throw new Error(`Encountered error object without a message, got '${d}'`)}},48998:function(_,P,t){"use strict";t.d(P,{Fq:function(){return m},n:function(){return f}});var o=t(24852),i=t.n(o),d=t(30474);function b(l,p){const A={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(l)};return p!=null&&p.includeStack||delete A.stack,A}function m(l){const p=(0,o.deserializeError)(l);return l.stack||(p.stack=void 0),p}function f(l){if((0,d.V)(l)){const p=String(l);return p!=="[object Object]"?p:`${l.name}: ${l.message}`}return`unknown error '${l}'`}},91657:function(_,P,t){"use strict";t.d(P,{a:function(){return se},q:function(){return xe}});var o=t(87612),i=t(38264);const d="amazonaws.com";function b(M){const u=M.getOptionalString("endpoint");var T;const W=(T=M.getOptionalBoolean("s3ForcePathStyle"))!==null&&T!==void 0?T:!1;let rt,St;if(u){try{const Bt=new URL(u);rt=Bt.host,St=Bt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${u}' is not a valid URL`)}if(St!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${u}'`)}else rt=d;const Rt=M.getOptionalString("accessKeyId"),oe=M.getOptionalString("secretAccessKey"),_t=M.getOptionalString("roleArn"),Zt=M.getOptionalString("externalId");return{host:rt,endpoint:u,s3ForcePathStyle:W,accessKeyId:Rt,secretAccessKey:oe,roleArn:_t,externalId:Zt}}function m(M){const u=M.map(b);return u.some(T=>T.host===d)||u.push({host:d}),u}class f{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){return(0,i.FI)(u)}resolveEditUrl(u){return u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(f,"factory",({config:M})=>{var u;const T=m((u=M.getOptionalConfigArray("integrations.awsS3"))!==null&&u!==void 0?u:[]);return(0,i.gz)(T.map(W=>new f(W)),W=>W.config.host)});var l=t(88412),p=t(52475),S=t(80956);const A="GB";var R=new WeakMap,E=new WeakMap,C=new WeakMap,x=new WeakMap,B=new WeakMap,U=new WeakMap,w=new WeakMap;class ${static fromRepoUrl(u){const T=new URL(u);let W,rt,St;const Rt=T.pathname.split("/").map(ge=>decodeURIComponent(ge));if(Rt[2]==="_git"?(W=Rt[1],rt=St=Rt[3]):Rt[3]==="_git"?(W=Rt[1],rt=Rt[2],St=Rt[4]):Rt[4]==="_git"&&(W=`${Rt[1]}/${Rt[2]}`,rt=Rt[3],St=Rt[5]),!W||!rt||!St)throw new Error("Azure URL must point to a git repository");var oe;const _t=(oe=T.searchParams.get("path"))!==null&&oe!==void 0?oe:void 0;let Zt;const Bt=T.searchParams.get("version");if(Bt){if(Bt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Zt=Bt.slice(2)}return new $(T.origin,W,rt,St,_t,Zt)}toRepoUrl(){let u;return(0,l._)(this,C)===(0,l._)(this,x)?u=(0,l._)(this,w).call(this,(0,l._)(this,E),"_git",(0,l._)(this,x)):u=(0,l._)(this,w).call(this,(0,l._)(this,E),(0,l._)(this,C),"_git",(0,l._)(this,x)),(0,l._)(this,B)&&u.searchParams.set("path",(0,l._)(this,B)),(0,l._)(this,U)&&u.searchParams.set("version",A+(0,l._)(this,U)),u.toString()}toFileUrl(){if(!(0,l._)(this,B))throw new Error("Azure URL must point to a specific path to be able to download a file");const u=(0,l._)(this,w).call(this,(0,l._)(this,E),(0,l._)(this,C),"_apis","git","repositories",(0,l._)(this,x),"items");return u.searchParams.set("api-version","6.0"),u.searchParams.set("path",(0,l._)(this,B)),(0,l._)(this,U)&&u.searchParams.set("version",(0,l._)(this,U)),u.toString()}toArchiveUrl(){const u=(0,l._)(this,w).call(this,(0,l._)(this,E),(0,l._)(this,C),"_apis","git","repositories",(0,l._)(this,x),"items");return u.searchParams.set("recursionLevel","full"),u.searchParams.set("download","true"),u.searchParams.set("api-version","6.0"),(0,l._)(this,B)&&u.searchParams.set("scopePath",(0,l._)(this,B)),(0,l._)(this,U)&&u.searchParams.set("version",(0,l._)(this,U)),u.toString()}toCommitsUrl(){const u=(0,l._)(this,w).call(this,(0,l._)(this,E),(0,l._)(this,C),"_apis","git","repositories",(0,l._)(this,x),"commits");return u.searchParams.set("api-version","6.0"),(0,l._)(this,U)&&u.searchParams.set("searchCriteria.itemVersion.version",(0,l._)(this,U)),u.toString()}getOwner(){return(0,l._)(this,E)}getProject(){return(0,l._)(this,C)}getRepo(){return(0,l._)(this,x)}getPath(){return(0,l._)(this,B)}getRef(){return(0,l._)(this,U)}constructor(u,T,W,rt,St,Rt){(0,p._)(this,R,{writable:!0,value:void 0}),(0,p._)(this,E,{writable:!0,value:void 0}),(0,p._)(this,C,{writable:!0,value:void 0}),(0,p._)(this,x,{writable:!0,value:void 0}),(0,p._)(this,B,{writable:!0,value:void 0}),(0,p._)(this,U,{writable:!0,value:void 0}),(0,p._)(this,w,{writable:!0,value:(...oe)=>{const _t=new URL((0,l._)(this,R));return _t.pathname=oe.map(Zt=>encodeURIComponent(Zt)).join("/"),_t}}),(0,S._)(this,R,u),(0,S._)(this,E,T),(0,S._)(this,C,W),(0,S._)(this,x,rt),(0,S._)(this,B,St),(0,S._)(this,U,Rt)}}const I="dev.azure.com",g=["clientId","clientSecret","tenantId","personalAccessToken"],K=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function V(M){for(const u of K.entries()){const[T,W]=u,rt=g.filter(St=>!W.includes(St));if(W.every(St=>M[St]!==void 0)&&rt.every(St=>M[St]===void 0))return{kind:T,organizations:M.organizations,...W.reduce((St,Rt)=>(St[Rt]=M[Rt],St),{})}}throw new Error("is not a valid credential")}function J(M){var u,T;const W=(T=M.getOptionalString("host"))!==null&&T!==void 0?T:I;let rt=(u=M.getOptionalConfigArray("credentials"))===null||u===void 0?void 0:u.map(Zt=>({organizations:Zt.getOptionalStringArray("organizations"),personalAccessToken:Zt.getOptionalString("personalAccessToken"),tenantId:Zt.getOptionalString("tenantId"),clientId:Zt.getOptionalString("clientId"),clientSecret:Zt.getOptionalString("clientSecret")}));const St=M.getOptionalString("token");if(M.getOptional("credential")!==void 0&&M.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(M.getOptional("token")!==void 0&&M.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(St!==void 0){const Zt=[{personalAccessToken:St}];var Rt;rt=(Rt=rt==null?void 0:rt.concat(Zt))!==null&&Rt!==void 0?Rt:Zt}if(M.getOptional("credential")!==void 0){const Zt=[{organizations:M.getOptionalStringArray("credential.organizations"),token:M.getOptionalString("credential.token"),tenantId:M.getOptionalString("credential.tenantId"),clientId:M.getOptionalString("credential.clientId"),clientSecret:M.getOptionalString("credential.clientSecret")}];var oe;rt=(oe=rt==null?void 0:rt.concat(Zt))!==null&&oe!==void 0?oe:Zt}if(!(0,i.bK)(W))throw new Error(`Invalid Azure integration config, '${W}' is not a valid host`);let _t;if(rt!==void 0){const Zt=rt==null?void 0:rt.reduce((Bt,ge,Ie)=>{let Nt;try{V(ge)}catch(te){Nt=te.message}return Nt!==void 0&&Bt.push(`credential at position ${Ie+1} ${Nt}`),Bt},Array.of()).concat(Object.entries(rt.filter(Bt=>Bt.organizations!==void 0&&Bt.organizations.length>0).reduce((Bt,ge,Ie)=>{var Nt;return(Nt=ge.organizations)===null||Nt===void 0||Nt.forEach(te=>{Bt[te]||(Bt[te]=[]),Bt[te].push(Ie+1)}),Bt},{})).filter(([Bt,ge])=>ge.length>1).reduce((Bt,[ge,Ie])=>(Bt.push(`organization ${ge} is specified multiple times in credentials at positions ${Ie.slice(0,Ie.length-1).join(", ")} and ${Ie[Ie.length-1]}`),Bt),Array.of()));if((Zt==null?void 0:Zt.length)>0)throw new Error(`Invalid Azure integration config for ${W}: ${Zt.join("; ")}`);if(_t=rt.map(Bt=>V(Bt)),_t.some(Bt=>Bt.kind!=="PersonalAccessToken")&&W!==I)throw new Error(`Invalid Azure integration config for ${W}, only personal access tokens can be used with hosts other than ${I}`);if(_t.filter(Bt=>Bt.organizations===void 0||Bt.organizations.length===0).length>1)throw new Error(`Invalid Azure integration config for ${W}, you cannot specify multiple credentials without organizations`)}return{host:W,credentials:_t}}function H(M){const u=M.map(J);return u.some(T=>T.host===I)||u.push({host:I}),u}class G{get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const{url:T,base:W}=u;if((0,i.jv)(T))return T;try{const St=$.fromRepoUrl(W),Rt=new URL(W);var rt;const oe=new URL(`https://a.com${(rt=St.getPath())!==null&&rt!==void 0?rt:""}`),_t=new URL(T,oe).pathname;return Rt.searchParams.set("path",_t),u.lineNumber&&(Rt.searchParams.set("line",String(u.lineNumber)),Rt.searchParams.set("lineEnd",String(u.lineNumber+1)),Rt.searchParams.set("lineStartColumn","1"),Rt.searchParams.set("lineEndColumn","1")),Rt.toString()}catch{return new URL(T,W).toString()}}resolveEditUrl(u){return u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(G,"factory",({config:M})=>{var u;const T=H((u=M.getOptionalConfigArray("integrations.azure"))!==null&&u!==void 0?u:[]);return(0,i.gz)(T.map(W=>new G(W)),W=>W.config.host)});var z=t(82717),Y=t.n(z);const ot="bitbucket.org",ct="https://api.bitbucket.org/2.0";function dt(M){const u=ot,T=ct,W=M.getString("username"),rt=M.getString("appPassword");return{host:u,apiBaseUrl:T,username:W,appPassword:rt}}function ft(M){const u=M.map(dt);return u.length===0&&u.push({host:ot,apiBaseUrl:ct}),u}class Ot{get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const T=(0,i.FI)(u);if(u.lineNumber){const W=new URL(T);return W.hash=`lines-${u.lineNumber}`,W.toString()}return T}resolveEditUrl(u){const T=Y()(u),W=new URL(u);return W.searchParams.set("mode","edit"),W.searchParams.set("at",T.ref),W.toString()}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(Ot,"factory",({config:M})=>{var u;const T=ft((u=M.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&u!==void 0?u:[]);return(0,i.gz)(T.map(W=>new Ot(W)),W=>W.config.host)});var at=t(76635);const At="bitbucket.org",X="https://api.bitbucket.org/2.0";function L(M){var u;const T=(u=M.getOptionalString("host"))!==null&&u!==void 0?u:At;let W=M.getOptionalString("apiBaseUrl");const rt=M.getOptionalString("token"),St=M.getOptionalString("username"),Rt=M.getOptionalString("appPassword");if(!(0,i.bK)(T))throw new Error(`Invalid Bitbucket integration config, '${T}' is not a valid host`);return W?W=(0,at.trimEnd)(W,"/"):T===At?W=X:W=`https://${T}/rest/api/1.0`,{host:T,apiBaseUrl:W,token:rt,username:St,appPassword:Rt}}function Q(M){const u=M.map(L);return u.some(T=>T.host===At)||u.push({host:At,apiBaseUrl:X}),u}class et{get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const T=(0,i.FI)(u);if(!u.lineNumber)return T;const W=new URL(T);return this.integrationConfig.host==="bitbucket.org"?W.hash=`lines-${u.lineNumber}`:W.hash=`${u.lineNumber}`,W.toString()}resolveEditUrl(u){const T=Y()(u),W=new URL(u);return W.searchParams.set("mode","edit"),W.searchParams.set("spa","0"),W.searchParams.set("at",T.ref),W.toString()}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(et,"factory",({config:M})=>{var u,T,W;const rt=Q((W=M.getOptionalConfigArray("integrations.bitbucket"))!==null&&W!==void 0?W:[...(u=M.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&u!==void 0?u:[],...(T=M.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&T!==void 0?T:[]]);return(0,i.gz)(rt.map(St=>new et(St)),St=>St.config.host)});function it(M){const u=M.getString("host");let T=M.getOptionalString("apiBaseUrl");const W=M.getOptionalString("token"),rt=M.getOptionalString("username"),St=M.getOptionalString("password");if(!(0,i.bK)(u))throw new Error(`Invalid Bitbucket Server integration config, '${u}' is not a valid host`);return T?T=(0,at.trimEnd)(T,"/"):T=`https://${u}/rest/api/1.0`,{host:u,apiBaseUrl:T,token:W,username:rt,password:St}}function ut(M){return M.map(it)}class Z{get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const T=(0,i.FI)(u);if(u.lineNumber){const W=new URL(T);return W.hash=u.lineNumber.toString(),W.toString()}return T}resolveEditUrl(u){return u.includes("?")?u.substring(0,u.indexOf("?")):u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(Z,"factory",({config:M})=>{var u;const T=ut((u=M.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&u!==void 0?u:[]);return(0,i.gz)(T.map(W=>new Z(W)),W=>W.config.host)});function F(M){const u=M.getString("host");let T=M.getOptionalString("baseUrl"),W=M.getOptionalString("cloneUrl"),rt=M.getOptionalString("gitilesBaseUrl");const St=M.getOptionalString("username"),Rt=M.getOptionalString("password");if((0,i.bK)(u)){if(T&&!(0,i.jv)(T))throw new Error(`Invalid Gerrit integration config, '${T}' is not a valid baseUrl`);if(W&&!(0,i.jv)(W))throw new Error(`Invalid Gerrit integration config, '${W}' is not a valid cloneUrl`);if(rt&&!(0,i.jv)(rt))throw new Error(`Invalid Gerrit integration config, '${rt}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${u}' is not a valid host`);return T?T=(0,at.trimEnd)(T,"/"):T=`https://${u}`,rt?rt=(0,at.trimEnd)(rt,"/"):rt=`https://${u}`,W?W=(0,at.trimEnd)(W,"/"):W=T,{host:u,baseUrl:T,cloneUrl:W,gitilesBaseUrl:rt,username:St,password:Rt}}function ht(M){return M.map(F)}var xt=t(48834).lW;const vt=")]}'";function yt(M,u){const T=new URL(M.gitilesBaseUrl),W=new URL(u),St=W.pathname.substring(W.pathname.startsWith("/a/")?2:0).replace(T.pathname,"").split("/").filter(ge=>!!ge),Rt=St.indexOf("+");if(Rt<=0)throw new Error(`Unable to parse project from url: ${u}`);const oe=(0,at.trimStart)(St.slice(0,Rt).join("/"),"/"),_t=St.indexOf("heads");if(_t<=0)throw new Error(`Unable to parse branch from url: ${u}`);const Zt=St[_t+1],Bt=St.slice(_t+2).join("/");return{branch:Zt,filePath:Bt===""?"/":Bt,project:oe}}function pt(M,u,T,W){return`${M.gitilesBaseUrl}/${u}/+/refs/heads/${T}/${(0,at.trimStart)(W,"/")}`}function bt(M,u,T,W){const rt=W==="/"||W===""?".tar.gz":`/${W}.tar.gz`;return`${jt(M)}/${u}/+archive/refs/heads/${T}${rt}`}function It(M){return M.password?"/a/":"/"}function jt(M){if(!M.baseUrl||!M.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(M.gitilesBaseUrl.startsWith(M.baseUrl))return M.gitilesBaseUrl.replace(M.baseUrl.concat("/"),M.baseUrl.concat(It(M)));if(M.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return M.gitilesBaseUrl}function pe(M,u){const{branch:T,project:W}=yt(M,u);return`${M.baseUrl}${It(M)}projects/${encodeURIComponent(W)}/branches/${T}`}function Se(M,u){const{project:T}=yt(M,u);return`${M.cloneUrl}${It(M)}${T}`}function Ee(M,u){const{branch:T,filePath:W,project:rt}=yt(M,u);return`${M.baseUrl}${It(M)}projects/${encodeURIComponent(rt)}/branches/${T}/files/${encodeURIComponent(W)}/content`}function $t(M){return`${M.baseUrl}${It(M)}projects/`}function Lt(M){const u={};if(!M.password)return u;const T=xt.from(`${M.username}:${M.password}`,"utf8");return u.Authorization=`Basic ${T.toString("base64")}`,{headers:u}}async function Kt(M){const u=await M.text();if(u.startsWith(vt))try{return JSON.parse(u.slice(vt.length))}catch(T){throw new Error(`Invalid response from Gerrit: ${u.slice(0,10)} - ${T}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${u.slice(0,10)}`)}class Yt{get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const{url:T,base:W,lineNumber:rt}=u;let St;if(T.startsWith("/")){const{branch:Rt,project:oe}=yt(this.config,W);return pt(this.config,oe,Rt,T)}return T?St=new URL(T,W):St=new URL(W),rt&&(St.hash=rt.toString()),St.toString()}resolveEditUrl(u){return u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(Yt,"factory",({config:M})=>{var u;const T=ht((u=M.getOptionalConfigArray("integrations.gerrit"))!==null&&u!==void 0?u:[]);return(0,i.gz)(T.map(W=>new Yt(W)),W=>W.config.host)});var qt=t(61800);const Qt="gitlab.com",fe="https://gitlab.com/api/v4";function je(M){const u=M.getString("host");let T=M.getOptionalString("apiBaseUrl");const W=M.getOptionalString("token");let rt=M.getOptionalString("baseUrl");if(T?T=(0,at.trimEnd)(T,"/"):u===Qt&&(T=fe),rt?rt=(0,at.trimEnd)(rt,"/"):rt=`https://${u}`,(0,i.bK)(u)){if(!T||!(0,i.jv)(T))throw new Error(`Invalid GitLab integration config, '${T}' is not a valid apiBaseUrl`);if(!(0,i.jv)(rt))throw new Error(`Invalid GitLab integration config, '${rt}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${u}' is not a valid host`);return{host:u,token:W,apiBaseUrl:T,baseUrl:rt}}function Ye(M){const u=M.map(je);return u.some(T=>T.host===Qt)||u.push({host:Qt,apiBaseUrl:fe,baseUrl:`https://${Qt}`}),u}function Ke(M){let u="";return M.host!==Qt&&(u=new URL(M.baseUrl).pathname),trimEnd(u,"/")}class be{get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){return(0,i.FI)(u)}resolveEditUrl(u){return Qe(u,"edit")}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(be,"factory",({config:M})=>{var u;const T=Ye((u=M.getOptionalConfigArray("integrations.gitlab"))!==null&&u!==void 0?u:[]);return(0,i.gz)(T.map(W=>new be(W)),W=>W.config.host)});function Qe(M,u){return M.replace(/\/\-\/(blob|tree|edit)\//,`/-/${u}/`)}function Je(M){const u=M.getString("host");let T=M.getOptionalString("baseUrl");const W=M.getOptionalString("username"),rt=M.getOptionalString("password");if(!(0,i.bK)(u))throw new Error(`Invalid Gitea integration config, '${u}' is not a valid host`);return T?T=(0,at.trimEnd)(T,"/"):T=`https://${u}`,{host:u,baseUrl:T,username:W,password:rt}}var ze=t(48834).lW;function ne(M,u){const T=re(M,u);return`${T.url}/${T.owner}/${T.name}/_edit/${T.ref}/${T.path}`}function on(M,u){const T=re(M,u);return`${T.url}/api/v1/repos/${T.owner}/${T.name}/contents/${T.path}?ref=${T.ref}`}function Oe(M,u){const T=re(M,u);return`${T.url}/api/v1/repos/${T.owner}/${T.name}/archive/${T.ref}.tar.gz`}function rn(M,u){const T=re(M,u);return`${T.url}/api/v1/repos/${T.owner}/${T.name}/git/commits/${T.ref}`}function Xe(M){const u={},{username:T,password:W}=M;return W?(T?u.Authorization=`basic ${ze.from(`${T}:${W}`).toString("base64")}`:u.Authorization=`token ${W}`,{headers:u}):u}function re(M,u){var T;const W=(T=M.baseUrl)!==null&&T!==void 0?T:`https://${M.host}`;try{const[rt,St,Rt,oe,_t,Zt,...Bt]=u.replace(W,"").split("/"),ge=Bt.join("/").replace(/^\//,"");return{url:W,owner:St,name:Rt,ref:Zt,path:ge}}catch(rt){throw new Error(`Incorrect URL: ${u}, ${rt}`)}}class $e{get type(){return"gitea"}get title(){return this.config.host}resolveUrl(u){return(0,i.FI)(u)}resolveEditUrl(u){return ne(this.config,u)}constructor(u){(0,o._)(this,"config",void 0),this.config=u}}(0,o._)($e,"factory",({config:M})=>{var u;const W=((u=M.getOptionalConfigArray("integrations.gitea"))!==null&&u!==void 0?u:[]).map(rt=>Je(rt));return(0,i.gz)(W.map(rt=>new $e(rt)),rt=>rt.config.host)});class Be{static fromConfig(u){return new Be({awsS3:f.factory({config:u}),azure:G.factory({config:u}),bitbucket:et.factory({config:u}),bitbucketCloud:Ot.factory({config:u}),bitbucketServer:Z.factory({config:u}),gerrit:Yt.factory({config:u}),github:qt.X.factory({config:u}),gitlab:be.factory({config:u}),gitea:$e.factory({config:u})})}get awsS3(){return this.byType.awsS3}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}list(){return Object.values(this.byType).flatMap(u=>u.list())}byUrl(u){let T=Object.values(this.byType).map(W=>W.byUrl(u)).filter(Boolean);if(T.length>1){const W=T.filter(rt=>!(rt instanceof et));W.length!==0&&(T=W)}return T[0]}byHost(u){return Object.values(this.byType).map(T=>T.byHost(u)).find(Boolean)}resolveUrl(u){const T=this.byUrl(u.base);return T?T.resolveUrl(u):(0,i.FI)(u)}resolveEditUrl(u){const T=this.byUrl(u);return T?T.resolveEditUrl(u):u}constructor(u){(0,o._)(this,"byType",void 0),this.byType=u}}var _e=t(95965);class se{static fromConfig(u){return Be.fromConfig(u)}}const xe=(0,_e.T)({id:"integration.scmintegrations"})},61800:function(_,P,t){"use strict";t.d(P,{X:function(){return S},B:function(){return A}});var o=t(87612),i=t(38264),d=t(76635);const b="github.com",m="https://api.github.com",f="https://raw.githubusercontent.com";function l(R){var E,C;const x=(C=R.getOptionalString("host"))!==null&&C!==void 0?C:b;let B=R.getOptionalString("apiBaseUrl"),U=R.getOptionalString("rawBaseUrl");const w=R.getOptionalString("token"),$=(E=R.getOptionalConfigArray("apps"))===null||E===void 0?void 0:E.map(I=>({appId:I.getNumber("appId"),clientId:I.getString("clientId"),clientSecret:I.getString("clientSecret"),webhookSecret:I.getString("webhookSecret"),privateKey:I.getString("privateKey"),allowedInstallationOwners:I.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,i.bK)(x))throw new Error(`Invalid GitHub integration config, '${x}' is not a valid host`);return B?B=(0,d.trimEnd)(B,"/"):x===b&&(B=m),U?U=(0,d.trimEnd)(U,"/"):x===b&&(U=f),{host:x,apiBaseUrl:B,rawBaseUrl:U,token:w,apps:$}}function p(R){const E=R.map(l);return E.some(C=>C.host===b)||E.push({host:b,apiBaseUrl:m,rawBaseUrl:f}),E}class S{get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(E){return A((0,i.FI)(E),"tree")}resolveEditUrl(E){return A(E,"edit")}constructor(E){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=E}}(0,o._)(S,"factory",({config:R})=>{var E;const C=p((E=R.getOptionalConfigArray("integrations.github"))!==null&&E!==void 0?E:[]);return(0,i.gz)(C.map(x=>new S(x)),x=>x.config.host)});function A(R,E){return R.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(C,x,B,U)=>`//${x}/${B}/${U}/${E}/`)}},38264:function(_,P,t){"use strict";t.d(P,{FI:function(){return p},bK:function(){return m},gz:function(){return l},jv:function(){return f}});var o=t(82717),i=t.n(o),d=t(76635),b=t.n(d);function m(A){const R=new URL("http://example.com");return R.host=A,R.host===A}function f(A){try{return new URL(A),!0}catch{return!1}}function l(A,R){return{list(){return A},byUrl(E){try{const C=typeof E=="string"?new URL(E):E;return A.find(x=>R(x)===C.host)}catch{return}},byHost(E){return A.find(C=>R(C)===E)}}}function p(A){const{url:R,base:E,lineNumber:C}=A;try{return new URL(R),R}catch{}let x;if(R.startsWith("/")){const{filepath:B}=i()(E);x=new URL(E);const U=(0,d.trimEnd)(x.pathname.substring(0,x.pathname.length-B.length),"/");x.pathname=`${U}${R}`}else x=new URL(R,E);return x.search=new URL(E).search,C&&(x.hash=`L${C}`),x.toString()}function S(A){beforeAll(()=>A.listen({onUnhandledRequest:"error"})),afterAll(()=>A.close()),afterEach(()=>A.resetHandlers())}},99329:function(_,P,t){"use strict";var o={};t.r(o),t.d(o,{TechDocsPlugin:function(){return f.s4}});var i=t(52322),d=t(2784),b=t(17029),m=t(73557),f=t(4577),l=t(29895),p=t(2296),S=t(57058),A=t(77277),R=t(87435),E=t(74359),C=t(55015),x=t(71597);function B({children:r}){return(0,m.GV)()?(0,i.jsx)(i.Fragment,{children:r}):(0,i.jsx)(m.VA,{children:r})}const U=()=>(0,i.jsx)(R.m,{status:"404",statusMessage:"PAGE NOT FOUND"}),w=({step:r,error:e})=>{let n="";return r==="load-config"?n=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(n=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,i.jsx)(B,{children:(0,i.jsx)(R.m,{status:"501",statusMessage:n})})},$=({error:r,resetError:e,plugin:n})=>(0,i.jsx)(E.y,{title:`Error in ${n==null?void 0:n.getId()}`,defaultExpanded:!0,error:r,children:(0,i.jsx)(A.Z,{variant:"outlined",onClick:e,children:"Retry"})}),I={Progress:C.E,Router:x.VK,NotFoundErrorPage:U,BootErrorPage:w,ErrorBoundaryFallback:$};var g=t(87612);const K="Invalid discovery URL pattern,";class V{static compile(e){const n=e.split(/\{\{\s*pluginId\s*\}\}/),s=n.join("pluginId");let a;try{a=new URL(s)}catch{throw new Error(`${K} URL '${s}' is invalid`)}if(a.hash)throw new Error(`${K} URL must not have a hash`);if(a.search)throw new Error(`${K} URL must not have a query`);if(s.endsWith("/"))throw new Error(`${K} URL must not end with a slash`);return new V(n)}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}constructor(e){(0,g._)(this,"parts",void 0),this.parts=e}}var J=t(82394),H=t.n(J);let G=Symbol.observable;class z{[G](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,s){const a=typeof e=="function"?{next:e,error:n,complete:s}:e;return this.observable.subscribe(a)}constructor(){(0,g._)(this,"isClosed",!1),(0,g._)(this,"terminatingError",void 0),(0,g._)(this,"observable",new(H())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}))),(0,g._)(this,"subscribers",new Set)}}let Y=Symbol.observable;class ot{[Y](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=e,this.subscribers.forEach(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,s){const a=typeof e=="function"?{next:e,error:n,complete:s}:e;return this.observable.subscribe(a)}constructor(e){(0,g._)(this,"isClosed",void 0),(0,g._)(this,"currentValue",void 0),(0,g._)(this,"terminatingError",void 0),(0,g._)(this,"observable",void 0),(0,g._)(this,"subscribers",new Set),this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(H())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(n.next(this.currentValue),this.subscribers.add(n),()=>{this.subscribers.delete(n)}))}}class ct{post(e){this.subject.next(e)}alert$(){return this.subject}constructor(){(0,g._)(this,"subject",new z)}}class dt{captureEvent(e){}}class ft{post(e,n){return n!=null&&n.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,n)}error$(){return this.errorApi.error$()}constructor(e,n){(0,g._)(this,"alertApi",void 0),(0,g._)(this,"errorApi",void 0),this.alertApi=e,this.errorApi=n}}class Ot{post(e,n){this.subject.next({error:e,context:n})}error$(){return this.subject}constructor(){(0,g._)(this,"subject",new z)}}class at{static forward(e,n){window.addEventListener("unhandledrejection",s=>{e.post(s.reason,n)})}}const At=new Map;class X{static create(e){var n;return new X((n=e.namespace)!==null&&n!==void 0?n:"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[s,a]of At.entries()){var n;!((n=e.key)===null||n===void 0)&&n.startsWith(s)&&a.handleStorageChange(e.key)}})}get(e){return this.snapshot(e).value}snapshot(e){let n,s="absent";try{const a=localStorage.getItem(this.getKeyName(e));a&&(n=JSON.parse(a,(c,y)=>(typeof y=="object"&&y!==null&&Object.freeze(y),y)),s="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:n,presence:s}}forBucket(e){const n=`${this.namespace}/${e}`;return At.has(n)||At.set(n,new X(n,this.errorApi)),At.get(n)}async set(e,n){localStorage.setItem(this.getKeyName(e),JSON.stringify(n)),this.notifyChanges(e)}async remove(e){localStorage.removeItem(this.getKeyName(e)),this.notifyChanges(e)}observe$(e){return X.hasSubscribed||(X.addStorageEventListener(),X.hasSubscribed=!0),this.observable.filter(({key:n})=>n===e)}handleStorageChange(e){if(!(e!=null&&e.startsWith(this.namespace)))return;const n=e==null?void 0:e.slice(`${this.namespace}/`.length);n.includes("/")||this.notifyChanges(decodeURIComponent(n))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const n=this.snapshot(e);for(const s of this.subscribers)s.next(n)}constructor(e,n){(0,g._)(this,"namespace",void 0),(0,g._)(this,"errorApi",void 0),(0,g._)(this,"subscribers",void 0),(0,g._)(this,"observable",void 0),this.namespace=e,this.errorApi=n,this.subscribers=new Set,this.observable=new(H())(s=>(this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}}(0,g._)(X,"hasSubscribed",!1);function L(r){let e=r.baseImplementation||t.g.fetch;var n;const s=[(n=r.middleware)!==null&&n!==void 0?n:[]].flat().reverse();for(const a of s)e=a.apply(e);return{fetch:e}}class Q{static create(e){var n,s;const a=et(e),c=((n=e.header)===null||n===void 0?void 0:n.name)||"authorization",y=((s=e.header)===null||s===void 0?void 0:s.value)||(v=>`Bearer ${v}`);return new Q(e.identityApi,a,c,y)}apply(e){return async(n,s)=>{const a=new Request(n,s),{token:c}=await this.identityApi.getCredentials();return a.headers.get(this.headerName)||typeof c!="string"||!c||!this.allowUrl(a.url)?e(n,s):(a.headers.set(this.headerName,this.headerValue(c)),e(a))}}constructor(e,n,s,a){(0,g._)(this,"identityApi",void 0),(0,g._)(this,"allowUrl",void 0),(0,g._)(this,"headerName",void 0),(0,g._)(this,"headerValue",void 0),this.identityApi=e,this.allowUrl=n,this.headerName=s,this.headerValue=a}}function et(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?it(r.urlPrefixAllowlist):r.config?it([r.config.getString("backend.baseUrl")]):()=>!1}function it(r){const e=r.map(n=>n.replace(/\/$/,""));return n=>e.some(s=>n===s||n.startsWith(`${s}/`))}function ut(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class Z{apply(e){return async(n,s)=>{const a=new Request(n,s),c="plugin://";if(!a.url.startsWith(c))return e(n,s);const{hostname:y,pathname:v,search:D,hash:N,username:tt,password:st}=new URL(`http://${a.url.substring(c.length)}`);let gt=await this.discoveryApi.getBaseUrl(y);if(tt||st){const Et=new URL(gt),Wt=`${tt}${st?`:${st}`:""}@`;gt=`${Et.protocol}//${Wt}${Et.host}${Et.pathname}`}const mt=`${ut(gt,v)}${D}${N}`;return e(mt,typeof n=="string"||F(n)?s:n)}}constructor(e){(0,g._)(this,"discoveryApi",void 0),this.discoveryApi=e}}function F(r){return typeof r=="object"&&(r==null?void 0:r.constructor)===URL}class ht{static resolvePluginProtocol(e){return new Z(e.discoveryApi)}static injectIdentityAuth(e){return Q.create(e)}constructor(){}}function xt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}function vt(r,...e){const n=new Set(r);for(const s of e)for(const a of s)n.add(a);return n}class yt{request(e){return new Promise((n,s)=>{this.requests.push({scopes:e,resolve:n,reject:s}),this.subject.next(this.getCurrentPending())})}resolve(e,n){this.requests=this.requests.filter(s=>xt(e,s.scopes)?(s.resolve(n),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(n=>n.reject(e)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const e=this.requests.length===0?void 0:this.requests.slice(1).reduce((n,s)=>vt(n,s.scopes),this.requests[0].scopes);return{scopes:e,resolve:n=>{e&&this.resolve(e,n)},reject:n=>{e&&this.reject(n)}}}constructor(){(0,g._)(this,"requests",[]),(0,g._)(this,"subject",new ot(this.getCurrentPending()))}}class pt{createAuthRequester(e){const n=new yt,s=this.handlerCount;return this.handlerCount++,n.pending().subscribe({next:a=>{const c=this.currentRequests.slice(),y=this.makeAuthRequest(a,e);y?c[s]=y:delete c[s],this.currentRequests=c,this.subject.next(c.filter(Boolean))}}),a=>n.request(a)}makeAuthRequest(e,n){const{scopes:s}=e;if(s)return{provider:n.provider,trigger:async()=>{const a=await n.onAuthRequest(s);e.resolve(a)},reject:()=>{const a=new Error("Login failed, rejected by user");a.name="RejectedError",e.reject(a)}}}authRequest$(){return this.subject}constructor(){(0,g._)(this,"subject",new ot([])),(0,g._)(this,"currentRequests",[]),(0,g._)(this,"handlerCount",0)}}function bt(r){return new Promise((e,n)=>{const s=r.width||500,a=r.height||700,c=window.screen.width/2-s/2,y=window.screen.height/2-a/2,v=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${s},height=${a},top=${y},left=${c}`);let D="";if(!v||typeof v.closed=="undefined"||v.closed){const gt=new Error("Failed to open auth popup.");gt.name="PopupRejectedError",n(gt);return}const N=gt=>{if(gt.source!==v||gt.origin!==r.origin)return;const{data:mt}=gt;if(mt.type==="config_info"){D=mt.targetOrigin;return}if(mt.type!=="authorization_response")return;const Et=mt;if("error"in Et){const Wt=new Error(Et.error.message);Wt.name=Et.error.name,n(Wt)}else e(Et.response);st()},tt=setInterval(()=>{if(v.closed){const gt=`Login failed, ${D&&D!==window.location.origin?`Incorrect app origin, expected ${D}`:"popup was closed"}`,mt=new Error(gt);mt.name="PopupClosedError",n(mt),st()}},100);function st(){window.removeEventListener("message",N),clearInterval(tt)}window.addEventListener("message",N)})}let It=!1;function jt(r){return[...r].join(" ")}class pe{async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const n=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(a=>{throw new Error(`Auth refresh request failed, ${a}`)});if(!n.ok){const a=new Error(`Auth refresh request failed, ${n.statusText}`);throw a.status=n.status,a}const s=await n.json();if(s.error){const a=new Error(s.error.message);throw s.error.name&&(a.name=s.error.name),a}return await this.sessionTransform(s)}async removeSession(){const e=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(n=>{throw new Error(`Logout request failed, ${n}`)});if(!e.ok){const n=new Error(`Logout request failed, ${e.statusText}`);throw n.status=e.status,n}}async showPopup(e){var n,s,a,c,y,v,D,N;const tt=this.joinScopesFunc(e),st=await this.buildUrl("/start",{scope:tt,origin:window.location.origin,flow:"popup"}),gt=!((s=this.popupOptions)===null||s===void 0||(n=s.size)===null||n===void 0)&&n.fullscreen?window.screen.width:((c=this.popupOptions)===null||c===void 0||(a=c.size)===null||a===void 0?void 0:a.width)||450,mt=!((v=this.popupOptions)===null||v===void 0||(y=v.size)===null||y===void 0)&&y.fullscreen?window.screen.height:((N=this.popupOptions)===null||N===void 0||(D=N.size)===null||D===void 0?void 0:D.height)||730,Et=await bt({url:st,name:`${this.provider.title} Login`,origin:new URL(st).origin,width:gt,height:mt});return await this.sessionTransform(Et)}async executeRedirect(e){const n=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:n,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,n){const s=await this.discoveryApi.getBaseUrl("auth"),a=this.buildQueryString({...n,env:this.environment});return`${s}/${this.provider.id}${e}${a}`}buildQueryString(e){if(!e)return"";const n=Object.entries(e).map(([s,a])=>{if(typeof a=="string")return`${encodeURIComponent(s)}=${encodeURIComponent(a)}`;if(a)return encodeURIComponent(s)}).filter(Boolean).join("&");return n?`?${n}`:""}constructor(e){(0,g._)(this,"discoveryApi",void 0),(0,g._)(this,"environment",void 0),(0,g._)(this,"provider",void 0),(0,g._)(this,"joinScopesFunc",void 0),(0,g._)(this,"authRequester",void 0),(0,g._)(this,"sessionTransform",void 0),(0,g._)(this,"enableExperimentalRedirectFlow",void 0),(0,g._)(this,"popupOptions",void 0);const{configApi:n,discoveryApi:s,environment:a,provider:c,joinScopes:y=jt,oauthRequestApi:v,sessionTransform:D=st=>st,popupOptions:N}=e;!It&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),It=!0);var tt;this.enableExperimentalRedirectFlow=n&&(tt=n.getOptionalBoolean("enableExperimentalRedirectFlow"))!==null&&tt!==void 0?tt:!1,this.authRequester=v.createAuthRequester({provider:c,onAuthRequest:async st=>this.enableExperimentalRedirectFlow?this.executeRedirect(st):this.showPopup(st)}),this.discoveryApi=s,this.environment=a,this.provider=c,this.joinScopesFunc=y,this.sessionTransform=D,this.popupOptions=N}}function Se(r,e){for(const n of e)if(!r.has(n))return!1;return!0}class Ee{sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const s=this.options.sessionScopes(e);return Se(s,n)}getExtendedScope(e,n){const s=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const a=this.options.sessionScopes(e);for(const c of a)s.add(c)}if(n)for(const a of n)s.add(a);return s}constructor(e){(0,g._)(this,"options",void 0),this.options=e}}var $t=t(95965),Lt;(function(r){r.SignedIn="SignedIn",r.SignedOut="SignedOut"})(Lt||(Lt={}));const Kt=(0,$t.T)({id:"core.auth.google"}),Yt=(0,$t.T)({id:"core.auth.github"}),qt=(0,$t.T)({id:"core.auth.okta"}),Qt=(0,$t.T)({id:"core.auth.gitlab"}),fe=(0,$t.T)({id:"core.auth.microsoft"}),je=(0,$t.T)({id:"core.auth.onelogin"}),Ye=(0,$t.T)({id:"core.auth.bitbucket"}),Ke=(0,$t.T)({id:"core.auth.bitbucket-server"}),be=(0,$t.T)({id:"core.auth.atlassian"});class Qe{setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Lt.SignedIn:Lt.SignedOut))}sessionState$(){return this.subject}constructor(){(0,g._)(this,"subject",new ot(Lt.SignedOut)),(0,g._)(this,"signedIn",!1)}}class Je{async getSession(e){if(this.helper.sessionExistsAndHasScope(this.currentSession,e.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const s=await this.collapsedSessionRefresh(e.scopes),a=this.sessionScopesFunc(this.currentSession),c=this.sessionScopesFunc(s);return Se(c,a)&&(this.currentSession=s),s}catch(s){if(e.optional)return;throw s}}if(!this.currentSession&&!e.instantPopup)try{const n=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=n,this.getSession(e)}catch{}if(!e.optional)return this.currentSession=await this.connector.createSession({...e,scopes:this.helper.getExtendedScope(this.currentSession,e.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(e){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession(this.helper.getExtendedScope(this.currentSession,e));try{const n=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),n}finally{delete this.refreshPromise}}constructor(e){(0,g._)(this,"connector",void 0),(0,g._)(this,"helper",void 0),(0,g._)(this,"sessionScopesFunc",void 0),(0,g._)(this,"sessionShouldRefreshFunc",void 0),(0,g._)(this,"stateTracker",new Qe),(0,g._)(this,"refreshPromise",void 0),(0,g._)(this,"currentSession",void 0);const{connector:n,defaultScopes:s=new Set,sessionScopes:a,sessionShouldRefresh:c}=e;this.connector=n,this.sessionScopesFunc=a,this.sessionShouldRefreshFunc=c,this.helper=new Ee({sessionScopes:a,defaultScopes:s})}}const ze={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class ne{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=ze,oauthRequestApi:y,defaultScopes:v=[],scopeTransform:D=gt=>gt,popupOptions:N}=e,tt=new pe({configApi:n,discoveryApi:s,environment:a,provider:c,oauthRequestApi:y,sessionTransform({backstageIdentity:gt,...mt}){const Et={...mt,providerInfo:{idToken:mt.providerInfo.idToken,accessToken:mt.providerInfo.accessToken,scopes:ne.normalizeScopes(D,mt.providerInfo.scope),expiresAt:mt.providerInfo.expiresInSeconds?new Date(Date.now()+mt.providerInfo.expiresInSeconds*1e3):void 0}};if(gt){var Wt;const zt=(Wt=gt.expiresInSeconds)!==null&&Wt!==void 0?Wt:mt.providerInfo.expiresInSeconds;Et.backstageIdentity={token:gt.token,identity:gt.identity,expiresAt:zt?new Date(Date.now()+zt*1e3):void 0}}return Et},popupOptions:N}),st=new Je({connector:tt,defaultScopes:new Set(v),sessionScopes:gt=>gt.providerInfo.scopes,sessionShouldRefresh:gt=>{var mt,Et;let Wt=1/0;return!((mt=gt.providerInfo)===null||mt===void 0)&&mt.expiresAt&&(Wt=Math.min(Wt,(gt.providerInfo.expiresAt.getTime()-Date.now())/1e3)),!((Et=gt.backstageIdentity)===null||Et===void 0)&&Et.expiresAt&&(Wt=Math.min(Wt,(gt.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),Wt<60*5}});return new ne({sessionManager:st,scopeTransform:D})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,n){const s=ne.normalizeScopes(this.scopeTransform,e),a=await this.sessionManager.getSession({...n,scopes:s});var c;return(c=a==null?void 0:a.providerInfo.accessToken)!==null&&c!==void 0?c:""}async getIdToken(e={}){const n=await this.sessionManager.getSession({...e,scopes:new Set(["openid"])});var s;return(s=n==null?void 0:n.providerInfo.idToken)!==null&&s!==void 0?s:""}async getBackstageIdentity(e={}){const n=await this.sessionManager.getSession(e);return n==null?void 0:n.backstageIdentity}async getProfile(e={}){const n=await this.sessionManager.getSession(e);return n==null?void 0:n.profile}static normalizeScopes(e,n){if(!n)return new Set;const s=Array.isArray(n)?n:n.split(/[\s|,]/).filter(Boolean);return new Set(e(s))}constructor(e){(0,g._)(this,"sessionManager",void 0),(0,g._)(this,"scopeTransform",void 0),this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}}const on={id:"google",title:"Google",icon:()=>null},Oe="https://www.googleapis.com/auth/";class rn{static create(e){const{configApi:n,discoveryApi:s,oauthRequestApi:a,environment:c="development",provider:y=on,defaultScopes:v=["openid",`${Oe}userinfo.email`,`${Oe}userinfo.profile`]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:a,provider:y,environment:c,defaultScopes:v,scopeTransform(D){return D.map(N=>N==="openid"?N:N==="profile"||N==="email"?`${Oe}userinfo.${N}`:N.startsWith(Oe)?N:`${Oe}${N}`)}})}}const Xe={id:"microsoft",title:"Microsoft",icon:()=>null};class re{static create(e){return new re(e)}microsoftGraph(){return this.oauth2[re.MicrosoftGraphID]}static resourceForScopes(e){const n=[...new Set(e.split(" ").map(re.resourceForScope).filter(c=>c!=="openid"))];if(n.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${n.join(", ")}. Access tokens can only have a single audience.`));var s;const a=(s=n[0])!==null&&s!==void 0?s:re.MicrosoftGraphID;return Promise.resolve(a)}static resourceForScope(e){var n;const s=(n=e.match(RegExp("^(?<resourceURI>.*)\\/(?<scp>[^\\/]*)$")))===null||n===void 0?void 0:n.groups;if(s){const{resourceURI:a}=s;return a.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return re.MicrosoftGraphID}}async getAccessToken(e,n){const s=e===void 0?re.MicrosoftGraphID:await re.resourceForScopes(Array.isArray(e)?e.join(" "):e);return s in this.oauth2||(this.oauth2[s]=ne.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[s].getAccessToken(e,n)}getIdToken(e){return this.microsoftGraph().getIdToken(e)}getProfile(e){return this.microsoftGraph().getProfile(e)}getBackstageIdentity(e){return this.microsoftGraph().getBackstageIdentity(e)}signIn(){return this.microsoftGraph().signIn()}signOut(){return this.microsoftGraph().signOut()}sessionState$(){return this.microsoftGraph().sessionState$()}constructor(e){(0,g._)(this,"oauth2",void 0),(0,g._)(this,"configApi",void 0),(0,g._)(this,"environment",void 0),(0,g._)(this,"provider",void 0),(0,g._)(this,"oauthRequestApi",void 0),(0,g._)(this,"discoveryApi",void 0),(0,g._)(this,"scopeTransform",void 0);const{configApi:n,environment:s="development",provider:a=Xe,oauthRequestApi:c,discoveryApi:y,defaultScopes:v=["openid","offline_access","profile","email","User.Read"],scopeTransform:D=N=>N.concat("offline_access")}=e;this.configApi=n,this.environment=s,this.provider=a,this.oauthRequestApi=c,this.discoveryApi=y,this.scopeTransform=D,this.oauth2={[re.MicrosoftGraphID]:ne.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:v})}}}(0,g._)(re,"MicrosoftGraphID","00000003-0000-0000-c000-000000000000");const $e={id:"github",title:"GitHub",icon:()=>null};class Be{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=$e,oauthRequestApi:y,defaultScopes:v=["read:user"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:y,provider:c,environment:a,defaultScopes:v})}}const _e={id:"okta",title:"Okta",icon:()=>null},se=new Set(["openid","profile","email","phone","address","groups","offline_access"]),xe="okta.";class M{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=_e,oauthRequestApi:y,defaultScopes:v=["openid","email","profile","offline_access"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:y,provider:c,environment:a,defaultScopes:v,scopeTransform(D){return D.map(N=>se.has(N)||N.startsWith(xe)?N:`${xe}${N}`)}})}}const u={id:"gitlab",title:"GitLab",icon:()=>null};class T{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=u,oauthRequestApi:y,defaultScopes:v=["read_user"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:y,provider:c,environment:a,defaultScopes:v})}}const W={id:"onelogin",title:"onelogin",icon:()=>null},rt=new Set(["openid","profile","email","phone","address","groups","offline_access"]),St="onelogin.";class Rt{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=W,oauthRequestApi:y}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:y,provider:c,environment:a,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(v){return v.map(D=>rt.has(D)||D.startsWith(St)?D:`${St}${D}`)}})}}const oe={id:"bitbucket",title:"Bitbucket",icon:()=>null};class _t{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=oe,oauthRequestApi:y,defaultScopes:v=["team"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:y,provider:c,environment:a,defaultScopes:v})}}const Zt={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class Bt{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=Zt,oauthRequestApi:y,defaultScopes:v=["PROJECT_ADMIN"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:y,provider:c,environment:a,defaultScopes:v})}}const ge={id:"atlassian",title:"Atlassian",icon:()=>null};class Ie{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=ge,oauthRequestApi:y}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:y,provider:c,environment:a})}}var Nt=t(42380),te=t(96727),le=t(6542),Ln=t(78847),ho=t(86386),Mn=t(58513);const jn=(0,$t.T)({id:"core.storage"});var Bn=t(85094),ve=t(77186);const De=(0,$t.T)({id:"core.oauthrequest"}),fo=(0,$t.T)({id:"plugin.permission.api"});var He=t(41385),po=t(96279),Un=t.n(po),go=t(9571),Ht=t(30195),Fe;(function(r){r.DENY="DENY",r.ALLOW="ALLOW",r.CONDITIONAL="CONDITIONAL"})(Fe||(Fe={}));const sn=Ht.z.lazy(()=>Ht.z.object({rule:Ht.z.string(),resourceType:Ht.z.string(),params:Ht.z.record(Ht.z.any()).optional()}).or(Ht.z.object({anyOf:Ht.z.array(sn).nonempty()})).or(Ht.z.object({allOf:Ht.z.array(sn).nonempty()})).or(Ht.z.object({not:sn}))),vo=Ht.z.object({result:Ht.z.literal(Fe.ALLOW).or(Ht.z.literal(Fe.DENY))}),mo=Ht.z.union([Ht.z.object({result:Ht.z.literal(Fe.ALLOW).or(Ht.z.literal(Fe.DENY))}),Ht.z.object({result:Ht.z.literal(Fe.CONDITIONAL),pluginId:Ht.z.string(),resourceType:Ht.z.string(),conditions:sn})]),yo=(r,e)=>Ht.z.object({items:Ht.z.array(Ht.z.intersection(Ht.z.object({id:Ht.z.string()}),r)).refine(n=>n.length===e.size&&n.every(({id:s})=>e.has(s)),{message:"Items in response do not match request"})});class $n{async authorize(e,n){return this.makeRequest(e,vo,n)}async authorizeConditional(e,n){return this.makeRequest(e,mo,n)}async makeRequest(e,n,s){if(!this.enabled)return e.map(tt=>({result:Fe.ALLOW}));const a={items:e.map(tt=>({id:go.Z(),...tt}))},c=await this.discovery.getBaseUrl("permission"),y=await Un()(`${c}/authorize`,{method:"POST",body:JSON.stringify(a),headers:{...this.getAuthorizationHeader(s==null?void 0:s.token),"content-type":"application/json"}});if(!y.ok)throw await He.V.fromResponse(y);const v=await y.json(),N=yo(n,new Set(a.items.map(({id:tt})=>tt))).parse(v).items.reduce((tt,st)=>(tt[st.id]=st,tt),{});return a.items.map(tt=>N[tt.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}constructor(e){(0,g._)(this,"enabled",void 0),(0,g._)(this,"discovery",void 0),this.discovery=e.discovery;var n;this.enabled=(n=e.config.getOptionalBoolean("permission.enabled"))!==null&&n!==void 0?n:!1}}class mn{static create(e){const{config:n,discovery:s,identity:a}=e,c=new $n({discovery:s,config:n});return new mn(c,a)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}constructor(e,n){(0,g._)(this,"permissionClient",void 0),(0,g._)(this,"identityApi",void 0),this.permissionClient=e,this.identityApi=n}}const Eo=[(0,Nt.n)({api:te.N,deps:{configApi:le.D},factory:({configApi:r})=>V.compile(`${r.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,Nt.n)({api:Ln.$,deps:{},factory:()=>new ct}),(0,Nt.n)({api:ho.v,deps:{},factory:()=>new dt}),(0,Nt.n)({api:Mn.V,deps:{alertApi:Ln.$},factory:({alertApi:r})=>{const e=new ft(r,new Ot);return at.forward(e,{hidden:!1}),e}}),(0,Nt.n)({api:jn,deps:{errorApi:Mn.V},factory:({errorApi:r})=>X.create({errorApi:r})}),(0,Nt.n)({api:Bn.g,deps:{configApi:le.D,identityApi:ve.$,discoveryApi:te.N},factory:({configApi:r,identityApi:e,discoveryApi:n})=>L({middleware:[ht.resolvePluginProtocol({discoveryApi:n}),ht.injectIdentityAuth({identityApi:e,config:r})]})}),(0,Nt.n)({api:De,deps:{},factory:()=>new pt}),(0,Nt.n)({api:Kt,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>rn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:fe,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>re.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:Yt,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Be.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:qt,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>M.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:Qt,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>T.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:je,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Rt.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:Ye,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>_t.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["team"],environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:Ke,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Bt.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"]})}),(0,Nt.n)({api:be,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ie.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:fo,deps:{discovery:te.N,identity:ve.$,config:le.D},factory:({config:r,discovery:e,identity:n})=>mn.create({config:r,discovery:e,identity:n})})];var Fn=t(43642),xo=t(80079),Co=t(90941),Wn=t(32915),yn=t(40562),Ao=t(21853),So=t(60744),bo=t(66569),Oo=t(30254),Po=t(13384),Nn=t(15933),Ro=t(58838),wo=t(86737),Zn=t(4989),kn=t(44407),To=t(18628),En=t(84219),xn=t(98685),Io=t(39781),Do=t(39412),Lo=t(78258);const Mo={brokenImage:xo.Z,catalog:To.Z,scaffolder:Wn.Z,techdocs:yn.Z,search:Ao.Z,chat:So.Z,dashboard:bo.Z,docs:Oo.Z,email:Po.Z,github:Ro.Z,group:En.Z,help:wo.Z,"kind:api":Nn.Z,"kind:component":kn.Z,"kind:domain":Fn.Z,"kind:group":En.Z,"kind:location":Zn.Z,"kind:system":Co.Z,"kind:user":xn.Z,"kind:resource":Do.Z,"kind:template":Lo.Z,user:xn.Z,warning:Io.Z};var jo=t(87561),Bo=t(12536),Kn=t(19219),Uo=t(41547),$o=t(3493),Fo=t(81887);const Wo=(0,Bo.Z)({productionPrefix:"jss4-"});function an(r){const{children:e,theme:n,noCssBaseline:s=!1}=r,a=n.getTheme("v4"),c=n.getTheme("v5");let y;s||(y=(0,i.jsx)(jo.ZP,{}));let v=(0,i.jsxs)(i.Fragment,{children:[y,e]});return a&&(v=(0,i.jsx)(Kn.ZP,{generateClassName:Wo,children:(0,i.jsx)(Uo.Z,{theme:a,children:v})})),c&&(v=(0,i.jsx)($o.Z,{injectFirst:!0,children:(0,i.jsx)(Fo.Z,{theme:c,children:v})})),v}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 Pt=t(88412),ce=t(52475),de=t(80956),No=t(73689),ar=t(93606);const h={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")`},O={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 j(r){const{colors:e,shape:n,options:s}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,y=`${n}, ${c}`;var v;const D=(v=s==null?void 0:s.fontColor)!==null&&v!==void 0?v:"#FFFFFF";return{colors:e,shape:n,backgroundImage:y,fontColor:D}}const k={home:j({colors:O.teal,shape:h.wave}),documentation:j({colors:O.pinkSea,shape:h.wave2}),tool:j({colors:O.purpleSky,shape:h.round}),service:j({colors:O.marineBlue,shape:h.wave}),website:j({colors:O.veryBlue,shape:h.wave}),library:j({colors:O.rubyRed,shape:h.wave}),other:j({colors:O.darkGrey,shape:h.wave}),app:j({colors:O.toastyOrange,shape:h.wave}),apis:j({colors:O.teal,shape:h.wave2}),card:j({colors:O.greens,shape:h.wave})},q=16,nt='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',lt="home";function Ct(r){const{palette:e,htmlFontSize:n=q,fontFamily:s=nt,defaultPageTheme:a=lt,pageTheme:c=k,typography:y}=r;if(!c[a])throw new Error(`${a} is not defined in pageTheme.`);const v={htmlFontSize:n,fontFamily:s,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}};return{palette:e,typography:y!=null?y:v,page:c[a],getPageTheme:({themeId:D})=>{var N;return(N=c[D])!==null&&N!==void 0?N:c[a]}}}var Tt=t(47591);const Ut={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},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,Tt._j)(r.palette.link,.3),background:(0,Tt.$n)(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"}}},Gt=r=>(...e)=>{const n=e.length===0?[1]:e,s=(a,c)=>typeof a=="string"?a:c*a;return n.map(a=>{const c=s(a,r);return typeof c=="number"?`${c}px`:c}).join(" ")};function Ft(r,e){if(!e||typeof e=="string")return;const n=typeof e=="function"?e(r):e;if(n)return{"@global":n}}function wt(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const n={...r},s=r.spacing(1);return typeof s=="number"&&(n.spacing=Gt(s)),Object.fromEntries(Object.entries(e).map(([a,c])=>typeof c=="function"?[a,c({theme:n})]:[a,c]))}return e}}const ie=/^&.Mui-([\w-]+)$/;function me(r){let e=r;if(!r||typeof r!="object")return e;for(const n of Object.keys(r)){const s=r[n];if(!(!s||typeof s!="object"))for(const a of Object.keys(s)){const c=a,y=c.match(ie);if(y){const[,v]=y,{[c]:D,...N}=s;D&&(e={...e,[n]:N,[v]:D})}}}return e}function Vt(r,e={}){const n={},s={};for(const a of Object.keys(e)){const c=e[a];c&&("styleOverrides"in c&&(a==="MuiCssBaseline"?n[a]=Ft(r,c.styleOverrides):n[a]=me(wt(r,c.styleOverrides))),"defaultProps"in c&&(s[a]=c.defaultProps))}return{overrides:n,props:s}}var Mt=new WeakMap;class ee{getTheme(e){return(0,Pt._)(this,Mt).get(e)}constructor(e,n){(0,ce._)(this,Mt,{writable:!0,value:new Map}),(0,de._)(this,Mt,new Map),e&&(0,Pt._)(this,Mt).set("v4",e),n&&(0,Pt._)(this,Mt).set("v5",n)}}function ye(r){const e=Ct(r),n={...Ut,...r.components},s=(0,ar.Z)({...e,components:n}),a=Vt(s,n),c={...(0,No.Z)(e),...a};return new ee(c,s)}function Dt(r){const e=adaptV4Theme(r),n=createTheme(r);return new ee(n,e)}const kt={light:ye({palette:zn.light}),dark:ye({palette:zn.dark})};var Jt=t(98192),Ce=t(15222);const Re=[{id:"light",title:"Light Theme",variant:"light",icon:(0,i.jsx)(Ce.Z,{}),Provider:({children:r})=>(0,i.jsx)(an,{theme:kt.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,i.jsx)(Jt.Z,{}),Provider:({children:r})=>(0,i.jsx)(an,{theme:kt.dark,children:r})}];var Ue=t(64279),ae=t(13980),We=t.n(ae);class ue{get(e){for(const n of this.holders){const s=n.get(e);if(s)return s}}constructor(...e){(0,g._)(this,"holders",void 0),this.holders=e}}var Ge=t(29651),ln=t(68993);const lr=(0,Ge.CT)("api-context"),Zo=r=>{var e;const{apis:n,children:s}=r,a=(e=(0,d.useContext)(lr))===null||e===void 0?void 0:e.atVersion(1),c=a?new ue(n,a):n;return(0,i.jsx)(lr.Provider,{value:(0,ln.E)({1:c}),children:s})};Zo.propTypes={apis:We().shape({get:We().func.isRequired}).isRequired,children:We().node};var ls=t(9850),cs=t.n(ls),ds=t(12782),us=t.n(ds);const hs=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function Cn(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function ko(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 Le={type(r,e,n,s){return`Invalid type in config for key '${r}' in '${e}', got ${n}, wanted ${s}`},missing(r){return`Missing required config value at '${r}'`},convert(r,e,n){return`Unable to convert config value for key '${r}' in '${e}' to a ${n}`}};class cn{static fromConfigs(e){return e.length===0?new cn(void 0):e.reduce((n,{data:s,context:a,filteredKeys:c,deprecatedKeys:y})=>{const v=new cn(s,a,n);if(v.filteredKeys=c,y)for(const{key:D,description:N}of y)console.warn(`The configuration key '${D}' of ${a} is deprecated and may be removed soon. ${N||""}`);return v},void 0)}has(e){var n;if(this.readValue(e)!==void 0)return!0;var a;return(a=(n=this.fallback)===null||n===void 0?void 0:n.has(e))!==null&&a!==void 0?a:!1}keys(){var e;const n=this.data?Object.keys(this.data):[];var s;const a=(s=(e=this.fallback)===null||e===void 0?void 0:e.keys())!==null&&s!==void 0?s:[];return[...new Set([...n,...a])]}get(e){const n=this.getOptional(e);if(n===void 0)throw new Error(Le.missing(this.fullKey(e!=null?e:"")));return n}getOptional(e){var n;const s=cs()(this.readValue(e)),a=(n=this.fallback)===null||n===void 0?void 0:n.getOptional(e);if(s===void 0){if(!1)var c;return a}else if(a===void 0)return s;return us()({},{value:a},{value:s},(y,v)=>!Cn(v)||!Cn(y)?v:void 0).value}getConfig(e){const n=this.getOptionalConfig(e);if(n===void 0)throw new Error(Le.missing(this.fullKey(e)));return n}getOptionalConfig(e){var n;const s=this.readValue(e),a=(n=this.fallback)===null||n===void 0?void 0:n.getOptionalConfig(e);if(Cn(s))return this.copy(s,e,a);if(s!==void 0)throw new TypeError(Le.type(this.fullKey(e),this.context,ko(s),"object"));return a}getConfigArray(e){const n=this.getOptionalConfigArray(e);if(n===void 0)throw new Error(Le.missing(this.fullKey(e)));return n}getOptionalConfigArray(e){const n=this.readConfigValue(e,a=>{if(!Array.isArray(a))return{expected:"object-array"};for(const[c,y]of a.entries())if(!Cn(y))return{expected:"object-array",value:y,key:`${e}[${c}]`};return!0});if(!n){if(!1)var s;return}return n.map((a,c)=>this.copy(a,`${e}[${c}]`))}getNumber(e){const n=this.getOptionalNumber(e);if(n===void 0)throw new Error(Le.missing(this.fullKey(e)));return n}getOptionalNumber(e){const n=this.readConfigValue(e,a=>typeof a=="number"||typeof a=="string"||{expected:"number"});if(typeof n=="number"||n===void 0)return n;const s=Number(n);if(!Number.isFinite(s))throw new Error(Le.convert(this.fullKey(e),this.context,"number"));return s}getBoolean(e){const n=this.getOptionalBoolean(e);if(n===void 0)throw new Error(Le.missing(this.fullKey(e)));return n}getOptionalBoolean(e){const n=this.readConfigValue(e,a=>typeof a=="boolean"||typeof a=="number"||typeof a=="string"||{expected:"boolean"});if(typeof n=="boolean"||n===void 0)return n;const s=String(n).trim();if(/^(?:y|yes|true|1|on)$/i.test(s))return!0;if(/^(?:n|no|false|0|off)$/i.test(s))return!1;throw new Error(Le.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const n=this.getOptionalString(e);if(n===void 0)throw new Error(Le.missing(this.fullKey(e)));return n}getOptionalString(e){return this.readConfigValue(e,n=>typeof n=="string"&&n!==""||{expected:"string"})}getStringArray(e){const n=this.getOptionalStringArray(e);if(n===void 0)throw new Error(Le.missing(this.fullKey(e)));return n}getOptionalStringArray(e){return this.readConfigValue(e,n=>{if(!Array.isArray(n))return{expected:"string-array"};for(const[s,a]of n.entries())if(typeof a!="string"||a==="")return{expected:"string-array",value:a,key:`${e}[${s}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,n,s){const a=new cn(e,this.context,s,this.fullKey(n));return a.filteredKeys=this.filteredKeys,a}readConfigValue(e,n){const s=this.readValue(e);if(s===void 0){var a;if(!1)var c;return(a=this.fallback)===null||a===void 0?void 0:a.readConfigValue(e,n)}const y=n(s);if(y!==!0){const{key:v=e,value:D=s,expected:N}=y;throw new TypeError(Le.type(this.fullKey(v),this.context,ko(D),N))}return s}readValue(e){const n=e?e.split("."):[];for(const a of n)if(!hs.test(a))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let s=this.data;for(const[a,c]of n.entries())if(Cn(s))s=s[c];else if(s!==void 0){const y=this.fullKey(n.slice(0,a).join("."));throw new TypeError(Le.type(y,this.context,ko(s),"object"))}return s}constructor(e,n="mock-config",s,a=""){(0,g._)(this,"data",void 0),(0,g._)(this,"context",void 0),(0,g._)(this,"fallback",void 0),(0,g._)(this,"prefix",void 0),(0,g._)(this,"filteredKeys",void 0),(0,g._)(this,"notifiedFilteredKeys",void 0),this.data=e,this.context=n,this.fallback=s,this.prefix=a,this.notifiedFilteredKeys=new Set}}const An="theme";class Hn{static createWithStorage(e){const n=new Hn(e);if(!window.localStorage)return n;var s;const a=(s=window.localStorage.getItem(An))!==null&&s!==void 0?s:void 0;return n.setActiveThemeId(a),n.activeThemeId$().subscribe(c=>{c?window.localStorage.setItem(An,c):window.localStorage.removeItem(An)}),window.addEventListener("storage",c=>{if(c.key===An){var y;const v=(y=localStorage.getItem(An))!==null&&y!==void 0?y:void 0;n.setActiveThemeId(v)}}),n}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(e){this.activeThemeId=e,this.subject.next(e)}constructor(e){(0,g._)(this,"themes",void 0),(0,g._)(this,"activeThemeId",void 0),(0,g._)(this,"subject",void 0),this.themes=e,this.subject=new ot(void 0)}}var dn=t(82723);function cr(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 fs{registerFlag(e){cr(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===dn.C.Active}save(e){this.flags||(this.flags=this.load()),e.merge||this.flags.clear();for(const[s,a]of Object.entries(e.states))this.flags.set(s,a);const n=Array.from(this.flags.entries()).filter(([,s])=>s===dn.C.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(n)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const n=JSON.parse(e);if(typeof n!="object"||n===null||Array.isArray(n))return new Map;const s=Object.entries(n).filter(([a,c])=>(cr(a),c===dn.C.Active));return new Map(s)}catch{return new Map}}constructor(){(0,g._)(this,"registeredFeatureFlags",[]),(0,g._)(this,"flags",void 0)}}const Gn=(0,$t.T)({id:"core.apptheme"}),dr=(0,$t.T)({id:"core.applanguage"});var ps=t(96253);class Ko{static validateFactories(e,n){for(const s of n){const a=[s],c=new Set;for(;a.length;){const y=a.shift(),v=e.get(y);if(v)for(const D of Object.values(v.deps)){if(D.id===s.id)throw new Error(`Circular dependency of api factory for ${s}`);c.has(D)||(c.add(D),a.push(D))}}}}get(e){return this.load(e)}load(e,n=[]){const s=this.apis.get(e.id);if(s)return s;const a=this.factories.get(e);if(!a)return;if(n.includes(a.api))throw new Error(`Circular dependency of api factory for ${a.api}`);const c=this.loadDeps(e,a.deps,[...n,a.api]),y=a.factory(c);return this.apis.set(e.id,y),y}loadDeps(e,n,s){const a={};for(const c in n)if(n.hasOwnProperty(c)){const y=n[c],v=this.load(y,s);if(!v)throw new Error(`No API factory available for dependency ${y} of dependent ${e}`);a[c]=v}return a}constructor(e){(0,g._)(this,"factories",void 0),(0,g._)(this,"apis",void 0),this.factories=e,this.apis=new Map}}var zo;(function(r){r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static"})(zo||(zo={}));class gs{register(e,n){const s=zo[e],a=this.factories.get(n.api.id);return a&&a.priority>=s?!1:(this.factories.set(n.api.id,{priority:s,factory:n}),!0)}get(e){const n=this.factories.get(e.id);if(n)return n.factory}getAllApis(){const e=new Set;for(const{factory:n}of this.factories.values())e.add(n.api);return e}constructor(){(0,g._)(this,"factories",new Map)}}function vs(r){const e={};for(const s in r.collectors)r.collectors.hasOwnProperty(s)&&(e[s]=r.collectors[s]());const n=[{node:d.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;n.length!==0;){const{node:s,parent:a,contexts:c}=n.shift();d.Children.forEach(s,y=>{if(!(0,d.isValidElement)(y))return;const v={};for(const D in e)if(e.hasOwnProperty(D)){const N=e[D];v[D]=N.visit(N.accumulator,y,a,c[D])}for(const D of r.discoverers){const N=D(y);N&&n.push({node:N,parent:y,contexts:v})}})}return Object.fromEntries(Object.entries(e).map(([s,a])=>[s,a.accumulator]))}function Vn(r,e){return()=>({accumulator:r(),visit:e})}function ms(r){var e;return(e=r.props)===null||e===void 0?void 0:e.children}function ys(r){var e,n;if(!((e=r.props)===null||e===void 0)&&e.path&&(!((n=r.props)===null||n===void 0)&&n.element)){var s;return(s=r.props)===null||s===void 0?void 0:s.element}}var Pe=t(62584);const Es=Vn(()=>new Set,(r,e)=>{const n=(0,Pe.I)(e,"core.plugin");n&&r.add(n)});var Sn=t(44394);const ur=r=>{const{children:e}=r,n=(0,Sn.h_)(dn.W),s="with"in r?n.isActive(r.with):!n.isActive(r.without);return(0,i.jsx)(i.Fragment,{children:s?e:null})};(0,Pe.R)(ur,"core.featureFlagged",!0);const Yn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function Qn(r){const e=r;if(e!=null&&e.type){var n,s;return(s=(n=e.type.displayName)!==null&&n!==void 0?n:e.type.name)!==null&&s!==void 0?s:String(e.type)}return String(e)}const hr=r=>{const e=new Set;return r&&e.add(r),e};function fr(r,e=new Array){return d.Children.forEach(r,n=>{if(!(0,d.isValidElement)(n))return;const s=(0,Pe.I)(n,"core.mountPoint");if(s){const a=(0,Pe.I)(n,"core.plugin");e.push({routeRef:s,plugin:a})}fr(n.props.children,e)}),e}const xs=Vn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,s)=>{var a,c;if(s!=null&&s.isElementAncestor)return s;if((n==null?void 0:n.props.element)===e)return{...s,isElementAncestor:!0};const y=(a=e.props)===null||a===void 0?void 0:a.path,v=(0,Pe.I)(e,"core.mountPoint");if(v&&y)throw new Error(`Path property may not be set directly on a routable extension "${Qn(e)}"`);var D;const N=(D=s==null||(c=s.obj)===null||c===void 0?void 0:c.children)!==null&&D!==void 0?D:r.objects;if(y!==void 0){if(typeof y!="string")throw new Error(`Element path must be a string at "${Qn(e)}"`);const Et=y.startsWith("/")?y.slice(1):y,Wt=e.props.element;if((0,Pe.I)(e,"core.gatherMountPoints")){var tt;if(Wt)throw new Error(`Mount point gatherers may not have an element prop "${Qn(e)}"`);const zt={path:Et,element:"gathered",routeRefs:new Set,caseSensitive:Boolean((tt=e.props)===null||tt===void 0?void 0:tt.caseSensitive),children:[Yn],plugins:new Set};return N.push(zt),{obj:zt,gatherPath:Et,routeRef:s==null?void 0:s.routeRef,gatherRouteRef:s==null?void 0:s.routeRef}}if(Wt){var st;const[zt,...Xt]=fr(Wt);if(Xt.length>0)throw new Error(`Route element with path "${y}" may not contain multiple routable extensions`);if(!zt)return s;const{routeRef:he,plugin:ke}=zt,Dn={path:Et,element:"mounted",routeRefs:new Set([he]),caseSensitive:Boolean((st=e.props)===null||st===void 0?void 0:st.caseSensitive),children:[Yn],plugins:hr(ke)};return N.push(Dn),r.paths.set(he,Et),r.parents.set(he,s==null?void 0:s.routeRef),{obj:Dn,routeRef:he!=null?he:s==null?void 0:s.routeRef,gatherPath:Et,gatherRouteRef:s==null?void 0:s.gatherRouteRef}}}if(v){var gt;if((s==null?void 0:s.gatherPath)===void 0)throw new Error(`Routable extension "${Qn(e)}" with mount point "${v}" must be assigned a path`);s==null||(gt=s.obj)===null||gt===void 0||gt.routeRefs.add(v);const Et=(0,Pe.I)(e,"core.plugin");if(Et){var mt;s==null||(mt=s.obj)===null||mt===void 0||mt.plugins.add(Et)}return r.paths.set(v,s.gatherPath),r.parents.set(v,s==null?void 0:s.gatherRouteRef),{...s,routeRef:v}}return s}),Cs=Vn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,s)=>{var a,c,y;if((n==null?void 0:n.props.element)===e)return s;let v=s==null?void 0:s.obj,D=s==null?void 0:s.routeRef,N=s==null?void 0:s.sticky;const tt=(a=e.props)===null||a===void 0?void 0:a.path;var st;const gt=(st=v==null?void 0:v.children)!==null&&st!==void 0?st:r.objects,mt=Boolean((c=e.props)===null||c===void 0?void 0:c.caseSensitive);let Et=s==null?void 0:s.path;if((0,Pe.I)(e,"core.gatherMountPoints")){if(!tt)throw new Error("Mount point gatherer must have a path");Et=tt}const Wt=(y=e.props)===null||y===void 0?void 0:y.element;let zt=(0,Pe.I)(e,"core.mountPoint");if(!zt&&(0,d.isValidElement)(Wt)&&(zt=(0,Pe.I)(Wt,"core.mountPoint")),zt){let ke=tt;if(Et&&(ke?Et=void 0:ke=Et),!ke)throw new Error("Mounted routable extension must have a path");r.paths.set(zt,ke),D&&N?(r.parents.set(zt,D),tt&&(D=zt,N=!1)):(r.parents.set(zt,D),D=zt),tt?(v={caseSensitive:mt,path:tt,element:"mounted",routeRefs:new Set([zt]),children:[Yn],plugins:hr((0,Pe.I)(e.props.element,"core.plugin"))},gt.push(v)):v==null||v.routeRefs.add(zt)}if((0,Pe.I)(e,"core.gatherMountPoints")&&(N=!0),(0,Pe.I)(e,"core.gatherMountPoints")){if(!tt)throw new Error("Mount point gatherer must have a path");if(!zt){var he;v={caseSensitive:mt,path:tt,element:"gathered",routeRefs:new Set,children:[Yn],plugins:(s==null||(he=s.obj)===null||he===void 0?void 0:he.plugins)||new Set},gt.push(v)}}return{obj:v,path:Et,routeRef:D,sticky:N}}),As=Vn(()=>new Set,(r,e)=>{if(e.type===ur){const n=e.props;r.add("with"in n?n.with:n.without)}});var bn=t(84800),Ss=t(96087);const On=(0,Ss.u)("route-ref-type",()=>Symbol("route-ref-type"));function pr(r){return r[On]==="absolute"}function gr(r){return r[On]==="sub"}function bs(r){return r[On]==="external"}function Jn(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var Os=t(34519),Ps=t.n(Os);function Rs(r,e,n){let s,a="";if(pr(r))s=r;else if(gr(r))s=r.parent,a=r.path;else if(bs(r)){const v=n.get(r);if(!v)return[void 0,""];if(pr(v))s=v;else if(gr(v))s=v.parent,a=v.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${v}`)}else throw r[On]?new Error(`Unknown or invalid route ref type, ${r[On]}`):new Error(`Unknown object passed to useRouteRef, got ${r}`);if(!s)return[void 0,""];const c=e.get(s);if(c===void 0)return[void 0,""];const y=Jn(c,a);return[s,y]}function ws(r,e,n,s,a){var c;const y=(c=(0,bn.fp)(a,e))!==null&&c!==void 0?c:[],v=Array();let D=-1;for(let st=r;st&&(D=y.findIndex(gt=>gt.route.routeRefs.has(st)),D===-1);st=s.get(st))v.unshift(st);v.length===0&&(D-=1);const N=D===-1?"":y[D].pathname,tt=v.slice(0,-1).map(st=>{const gt=n.get(st);if(gt===void 0)throw new Error(`No path for ${st}`);if(gt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${st} as it has parameters`);return gt});return`${Jn(N,...tt)}/`}class Ts{resolve(e,n){const[s,a]=Rs(e,this.routePaths,this.routeBindings);if(!s)return;let c;typeof n=="string"?c=this.trimPath(n):n.pathname?c={...n,pathname:this.trimPath(n.pathname)}:c=n;const y=this.appBasePath+ws(s,c,this.routePaths,this.routeParents,this.routeObjects);return(...[D])=>{const N=D&&Ps()(D,tt=>typeof tt=="string"?tt.replaceAll(/[&?#;\/]/g,st=>encodeURIComponent(st)):tt);return Jn(y,(0,bn.Gn)(a,N))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}constructor(e,n,s,a,c){(0,g._)(this,"routePaths",void 0),(0,g._)(this,"routeParents",void 0),(0,g._)(this,"routeObjects",void 0),(0,g._)(this,"routeBindings",void 0),(0,g._)(this,"appBasePath",void 0),this.routePaths=e,this.routeParents=n,this.routeObjects=s,this.routeBindings=a,this.appBasePath=c}}const Is=(0,Ge.CT)("routing-context"),Ds=({routePaths:r,routeParents:e,routeObjects:n,routeBindings:s,basePath:a="",children:c})=>{const y=new Ts(r,e,n,s,a),v=(0,ln.E)({1:y});return(0,i.jsx)(Is.Provider,{value:v,children:c})};function Ls(r,e){const n=new Set(e.values());n.delete(void 0);for(const s of e.keys()){if(n.has(s))continue;let a=s,c="";for(;a;){const v=r.get(a);if(v===void 0)throw new Error(`No path for ${a}`);c=Jn(v,c),a=e.get(a)}const y=c.match(/:(\w+)/g);if(y){for(let v=0;v<y.length;v++)for(let D=v+1;D<y.length;D++)if(y[D]===y[v])throw new Error(`Parameter ${y[D]} is duplicated in path ${c}`)}}}function Ms(r,e){for(const n of e)if(n.externalRoutes){for(const[s,a]of Object.entries(n.externalRoutes))if(!a.optional&&!r.has(a))throw new Error(`External route '${s}' of the '${n.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const js=(0,Ge.CT)("app-context"),Bs=({appContext:r,children:e})=>{const n=(0,ln.E)({1:r});return(0,i.jsx)(js.Provider,{value:n,children:e})};function vr(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Ho(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class Us{setTarget(e,n){this.target=e,this.signOutTargetUrl=n.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw vr("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ho("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw vr("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Ho("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(e=>e.getProfileInfo())}async getBackstageIdentity(){const e=await this.waitForTarget.then(n=>n.getBackstageIdentity());return e.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${e.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),e}async getCredentials(){return this.waitForTarget.then(e=>e.getCredentials())}async getIdToken(){return this.waitForTarget.then(e=>{if(!e.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Ho("getIdToken"),e.getIdToken()})}async signOut(){await this.waitForTarget.then(e=>e.signOut()),window.location.href=this.signOutTargetUrl}constructor(){(0,g._)(this,"target",void 0),(0,g._)(this,"waitForTarget",void 0),(0,g._)(this,"resolveTarget",()=>{}),(0,g._)(this,"signOutTargetUrl","/"),this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}}var $s=t(72164);function Fs(r,e,n){if(r!==void 0){const a=n.find(c=>c.id===r);if(a)return a}if(e){const a=n.find(c=>c.variant==="dark");if(a)return a}const s=n.find(a=>a.variant==="light");return s||n[0]}const Ws=()=>{const r=(0,d.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,n]=(0,d.useState)(r.matches);return(0,d.useEffect)(()=>{const s=a=>{n(a.matches)};return r.addListener(s),()=>{r.removeListener(s)}},[r]),e};function mr({children:r}){const e=(0,Sn.h_)(Gn),n=(0,$s.Z)(e.activeThemeId$(),e.getActiveThemeId()),s=Boolean(window.matchMedia)?Ws():!1,a=Fs(n,s,e.getInstalledThemes());if(!a)throw new Error("App has no themes");return(0,i.jsx)(a.Provider,{children:r})}const yr=async()=>Ns();function Ns(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!e)throw new Error("No static configuration provided");if(!Array.isArray(e))throw new Error("Static configuration has invalid format");const n=e.slice();if(r!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const a=JSON.parse(r);Array.isArray(a)?n.push(...a):n.push({data:a,context:"env"})}catch(a){throw new Error(`Failed to load runtime configuration, ${a}`)}const s=window.__APP_CONFIG__;return s&&n.push({context:"window",data:s}),n}class Zs{add(e,n){return this.apis.push([e.id,n]),n}build(){return new un(new Map(this.apis))}constructor(){(0,g._)(this,"apis",[])}}class un{static builder(){return new Zs}static from(e){return new un(new Map(e.map(([n,s])=>[n.id,s])))}static with(e,n){return new un(new Map([[e.id,n]]))}with(e,n){return new un(new Map([...this.apis,[e.id,n]]))}get(e){return this.apis.get(e.id)}constructor(e){(0,g._)(this,"apis",void 0),this.apis=e}}function ks(r){const e=new Map;return r&&r({bind:(s,a)=>{for(const[c,y]of Object.entries(a)){const v=s[c];if(!v)throw new Error(`Key ${c} is not an existing external route`);if(!y&&!v.optional)throw new Error(`External route ${c} is required but was undefined`);y&&e.set(v,y)}}}),e}function Pn(){const[r]=(0,m.is)((0,i.jsx)(m.AW,{index:!0,element:(0,i.jsx)("div",{})}));return!r.index}const Er=(0,d.createContext)(void 0);var xr=t(80851),Cr=t(62369),Ks=t(72388);const zs=(r,e)=>{try{const n=(0,bn.fp)(e,{pathname:r}),s=n==null?void 0:n.filter(D=>{var N;return(D==null||(N=D.route.routeRefs)===null||N===void 0?void 0:N.size)>0}).pop(),a=s==null?void 0:s.route;if(!a||a.path===""&&r!=="/")return;let c;a.routeRefs.size===1&&(c=a.routeRefs.values().next().value);let y;a.plugins.size===1&&(y=a.plugins.values().next().value);const v=Object.entries((s==null?void 0:s.params)||{}).reduce((D,[N,tt])=>(tt!==void 0&&N!=="*"&&(D[N]=tt),D),{});return{extension:"App",pluginId:(y==null?void 0:y.getId())||"root",...c?{routeRef:c.id}:{},_routeNodeType:a.element,params:v}}catch{return}},Hs=({pathname:r,search:e,hash:n,attributes:s})=>{const a=(0,Cr.z)();return(0,d.useEffect)(()=>{a.captureEvent("navigate",`${r}${e}${n}`,{attributes:s})},[a,r,e,n,s]),null},Xn=({routeObjects:r})=>{const{pathname:e,search:n,hash:s}=(0,m.TH)(),{params:a,...c}=zs(e,r)||{params:{}};return(0,i.jsx)(Ks.fC,{attributes:c,children:(0,i.jsx)(Hs,{pathname:e,search:n,hash:s,attributes:a})})};function Gs(r){return Pn()?Go(r):""}function Go(r){var e;let{pathname:n}=new URL((e=r.getOptionalString("app.baseUrl"))!==null&&e!==void 0?e:"/","http://sample.dev");return n=n.replace(/\/*$/,""),n}function Ar({component:r,appIdentityProxy:e,children:n}){const[s,a]=(0,d.useState)(),c=(0,Sn.h_)(le.D),y=Go(c);return s?(e.setTarget(s,{signOutTargetUrl:y||"/"}),(0,i.jsx)(i.Fragment,{children:n})):(0,i.jsx)(r,{onSignInSuccess:a})}function Sr(r){const{Router:e,SignInPage:n}=(0,xr.q)().getComponents(),s=(0,Sn.h_)(le.D),a=Go(s),c=`${a}/*`,y=(0,d.useContext)(Er);if(!y)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:v,appIdentityProxy:D}=y;return n?Pn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(Xn,{routeObjects:v}),(0,i.jsx)(Ar,{component:n,appIdentityProxy:D,children:(0,i.jsx)(m.Z5,{children:(0,i.jsx)(m.AW,{path:c,element:(0,i.jsx)(i.Fragment,{children:r.children})})})})]}):(0,i.jsxs)(e,{basename:a,children:[(0,i.jsx)(Xn,{routeObjects:v}),(0,i.jsx)(Ar,{component:n,appIdentityProxy:D,children:r.children})]}):(D.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:a||"/"}),Pn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(Xn,{routeObjects:v}),(0,i.jsx)(m.Z5,{children:(0,i.jsx)(m.AW,{path:c,element:(0,i.jsx)(i.Fragment,{children:r.children})})})]}):(0,i.jsxs)(e,{basename:a,children:[(0,i.jsx)(Xn,{routeObjects:v}),r.children]}))}(0,Pe.R)(Sr,"core.type","AppRouter");const Rn="language",Ne="en";var wn=new WeakMap,hn=new WeakMap,_n=new WeakMap;class qn{static create(e){var n;const s=(n=e==null?void 0:e.availableLanguages)!==null&&n!==void 0?n:[Ne];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(Ne))throw new Error(`Supported languages must include '${Ne}'`);var a;const c=(a=e==null?void 0:e.defaultLanguage)!==null&&a!==void 0?a:Ne;if(!s.includes(c))throw new Error(`Initial language must be one of the supported languages, got '${c}'`);return new qn(s,c)}static createWithStorage(e){const n=qn.create(e);if(!window.localStorage)return n;const s=window.localStorage.getItem(Rn),{languages:a}=n.getAvailableLanguages();return s&&a.includes(s)&&n.setLanguage(s),n.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(Rn)&&window.localStorage.setItem(Rn,c)}),window.addEventListener("storage",c=>{if(c.key===Rn){var y;const v=(y=localStorage.getItem(Rn))!==null&&y!==void 0?y:void 0;v&&n.setLanguage(v)}}),n}getAvailableLanguages(){return{languages:(0,Pt._)(this,wn).slice()}}setLanguage(e){const n=e!=null?e:Ne;if(n!==(0,Pt._)(this,hn)){if(n&&!(0,Pt._)(this,wn).includes(n))throw new Error(`Failed to change language to '${n}', available languages are '${(0,Pt._)(this,wn).join("', '")}'`);(0,de._)(this,hn,n),(0,Pt._)(this,_n).next({language:n})}}getLanguage(){return{language:(0,Pt._)(this,hn)}}language$(){return(0,Pt._)(this,_n)}constructor(e,n){(0,ce._)(this,wn,{writable:!0,value:void 0}),(0,ce._)(this,hn,{writable:!0,value:void 0}),(0,ce._)(this,_n,{writable:!0,value:void 0}),(0,de._)(this,wn,e),(0,de._)(this,hn,n),(0,de._)(this,_n,new ot({language:(0,Pt._)(this,hn)}))}}var Me=t(29190),qe=t(15356),Vs=t(24991),Ys=t(18015),br=t(35304);function Or(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}var fn=new WeakMap,to=new WeakMap,pn=new WeakMap,eo=new WeakSet;class Qs{addTranslationResource(e){const n=(0,Ys.W)(e);for(const s of n.resources){const a=(0,Me._)(this,eo,Vo).call(this,s.language,n.id);(0,Pt._)(this,pn).has(a)||(0,Pt._)(this,pn).set(a,s.loader)}}needsLoading(e,n){const s=(0,Me._)(this,eo,Vo).call(this,e,n);return(0,Pt._)(this,pn).get(s)?!(0,Pt._)(this,fn).has(s):!1}async load(e,n){const s=(0,Me._)(this,eo,Vo).call(this,e,n),a=(0,Pt._)(this,pn).get(s);if(!a||(0,Pt._)(this,fn).has(s))return;const c=(0,Pt._)(this,to).get(s);if(c){await c;return}const y=a().then(v=>{this.onLoad({language:e,namespace:n,messages:v.messages}),(0,Pt._)(this,fn).add(s)},v=>{throw(0,Pt._)(this,fn).add(s),v});(0,Pt._)(this,to).set(s,y),await y}constructor(e){(0,qe._)(this,eo),(0,g._)(this,"onLoad",void 0),(0,ce._)(this,fn,{writable:!0,value:void 0}),(0,ce._)(this,to,{writable:!0,value:void 0}),(0,ce._)(this,pn,{writable:!0,value:void 0}),this.onLoad=e,(0,de._)(this,fn,new Set),(0,de._)(this,to,new Map),(0,de._)(this,pn,new Map)}}function Vo(r,e){return`${r}/${e}`}var Tn=new WeakMap,gn=new WeakMap,tn=new WeakMap,Yo=new WeakMap,no=new WeakMap,Pr=new WeakSet,oo=new WeakSet,Qo=new WeakSet;class Jo{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),s=(0,Vs.Fs)({fallbackLng:Ne,supportedLngs:n,interpolation:{escapeValue:!1},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(s.init(),!s.isInitialized)throw new Error("i18next was unexpectedly not initialized");const{language:a}=e.languageApi.getLanguage();a!==Ne&&s.changeLanguage(a);const c=new Qs(D=>{s.addResourceBundle(D.language,D.namespace,Or(D.messages),!1,!0)}),y=(e==null?void 0:e.resources)||[];for(let D=y.length-1;D>=0;D--){const N=y[D];N.$$type==="@backstage/TranslationResource"?c.addTranslationResource(N):N.$$type==="@backstage/TranslationMessages"&&s.addResourceBundle(Ne,N.id,Or(N.messages),!0,!1)}const v=new Jo(s,c,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:D})=>{(0,Me._)(v,Pr,Js).call(v,D)}),v}getTranslation(e){const n=(0,br.y)(e);return(0,Me._)(this,Qo,Rr).call(this,n),(0,Me._)(this,oo,Xo).call(this,n)}translation$(e){const n=(0,br.y)(e);return(0,Me._)(this,Qo,Rr).call(this,n),new(H())(s=>{let a={};const c=()=>{a={};const v=a;(0,Pt._)(this,gn).load((0,Pt._)(this,tn),n.id).then(()=>{if(v===a){const D=(0,Me._)(this,oo,Xo).call(this,n);D.ready&&s.next(D)}},D=>{v===a&&s.error(Array.isArray(D)?D[0]:D)})},y=()=>{const v=(0,Me._)(this,oo,Xo).call(this,n);v.ready?s.next(v):c()};return(0,Pt._)(this,gn).needsLoading((0,Pt._)(this,tn),n.id)&&c(),(0,Pt._)(this,no).add(y),()=>{(0,Pt._)(this,no).delete(y)}})}constructor(e,n,s){(0,qe._)(this,Pr),(0,qe._)(this,oo),(0,qe._)(this,Qo),(0,ce._)(this,Tn,{writable:!0,value:void 0}),(0,ce._)(this,gn,{writable:!0,value:void 0}),(0,ce._)(this,tn,{writable:!0,value:void 0}),(0,ce._)(this,Yo,{writable:!0,value:new Set}),(0,ce._)(this,no,{writable:!0,value:new Set}),(0,de._)(this,Tn,e),(0,de._)(this,gn,n),(0,de._)(this,tn,s)}}function Js(r){(0,Pt._)(this,tn)!==r&&((0,de._)(this,tn,r),(0,Pt._)(this,Tn).changeLanguage(r),(0,Pt._)(this,no).forEach(e=>e()))}function Xo(r){return(0,Pt._)(this,gn).needsLoading((0,Pt._)(this,tn),r.id)?{ready:!1}:{ready:!0,t:(0,Pt._)(this,Tn).getFixedT(null,r.id)}}function Rr(r){if((0,Pt._)(this,Yo).has(r.id))return;(0,Pt._)(this,Yo).add(r.id);const e=r.getDefaultMessages();(0,Pt._)(this,Tn).addResourceBundle(Ne,r.id,e,!0,!1);const n=r.getDefaultResource();n&&(0,Pt._)(this,gn).addTranslationResource(n)}function wr(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 Xs(r){const e=cn.fromConfigs(r),n=e.getOptionalString("app.baseUrl"),s=e.getOptionalString("backend.baseUrl");let a=r,c,y;if(n&&s){const v=new URL(n).origin,D=new URL(s).origin;if(v===D){const N=wr(s);s!==N&&(c=N)}}if(n){const v=wr(n);n!==v&&(y=v)}return(y||c)&&(a=a.concat({data:{app:y&&{baseUrl:y},backend:c&&{baseUrl:c}},context:"relative-resolver"})),a}function _s(r,e,n){var s;const a=Boolean(r),c=(0,Ue.default)(r||(()=>Promise.resolve([])));let y;if(a&&c.loading){const{Progress:N}=e;y=(0,i.jsx)(N,{})}else if(c.error){const{BootErrorPage:N}=e;y=(0,i.jsx)(N,{step:"load-config",error:c.error})}const{ThemeProvider:v=mr}=e;return y?{node:(0,i.jsx)(Zo,{apis:un.with(Gn,n),children:(0,i.jsx)(v,{children:y})})}:{api:cn.fromConfigs(!((s=c.value)===null||s===void 0)&&s.length?Xs(c.value):[])}}class qs{getPlugins(){return this.app.getPlugins()}getSystemIcon(e){return this.app.getSystemIcon(e)}getSystemIcons(){return this.app.getSystemIcons()}getComponents(){return this.app.getComponents()}constructor(e){(0,g._)(this,"app",void 0),this.app=e}}var _o=new WeakMap;class ti{getPlugins(){return Array.from(this.plugins)}getSystemIcon(e){return this.icons[e]}getSystemIcons(){return this.icons}getComponents(){return this.components}createRoot(e){const n=this.getProvider();return()=>(0,i.jsx)(n,{children:e})}getProvider(){if((0,Pt._)(this,_o))throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");(0,de._)(this,_o,!0);const e=new qs(this);let n=!1;return({children:a})=>{const c=(0,d.useRef)(!0),y=(0,d.useMemo)(()=>Hn.createWithStorage(this.themes),[]),{routing:v,featureFlags:D,routeBindings:N}=(0,d.useMemo)(()=>{const Et=vs({root:a,discoverers:[ms,ys],collectors:{routing:Pn()?Cs:xs,collectedPlugins:Es,featureFlags:As}});return Et.collectedPlugins.forEach(Wt=>this.plugins.add(Wt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...Et,routeBindings:ks(this.bindRoutes)}},[a]);n||(n=!0,Ls(v.paths,v.parents),Ms(N,this.plugins));const tt=_s(this.configLoader,this.components,y),st="api"in tt;if(st){const{api:Et}=tt;this.configApi=Et}if("node"in tt)return tt.node;if(st&&c.current){c.current=!1;const Et=this.getApiHolder().get(dn.W);if(Et){for(const Xt of this.featureFlags)Et.registerFlag({...Xt,pluginId:""});for(const Xt of this.plugins.values())if("getFeatureFlags"in Xt)for(const he of Xt.getFeatureFlags())Et.registerFlag({name:he.name,pluginId:Xt.getId()});else for(const he of Xt.output())he.type==="feature-flag"&&Et.registerFlag({name:he.name,pluginId:Xt.getId()});const Wt=Et.getRegisteredFlags(),zt=new Set(Wt.map(Xt=>Xt.name));for(const Xt of D)zt.has(Xt)||Et.registerFlag({name:Xt,pluginId:""})}}const{ThemeProvider:gt=mr,Progress:mt}=this.components;return(0,i.jsx)(Zo,{apis:this.getApiHolder(),children:(0,i.jsx)(Bs,{appContext:e,children:(0,i.jsx)(gt,{children:(0,i.jsx)(Ds,{routePaths:v.paths,routeParents:v.parents,routeObjects:v.objects,routeBindings:N,basePath:Gs(tt.api),children:(0,i.jsx)(Er.Provider,{value:{routeObjects:v.objects,appIdentityProxy:this.appIdentityProxy},children:(0,i.jsx)(d.Suspense,{fallback:(0,i.jsx)(mt,{}),children:a})})})})})})}}getRouter(){return Sr}getApiHolder(){if(this.apiHolder){for(const e of this.plugins)for(const n of e.getApis())this.apiFactoryRegistry.get(n.api)||this.apiFactoryRegistry.register("default",n);return Ko.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:Gn,deps:{},factory:()=>Hn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:le.D,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:ve.$,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:dr,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:ps.o,deps:{languageApi:dr},factory:({languageApi:e})=>Jo.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:dn.W,deps:{},factory:()=>new fs});for(const e of this.defaultApis)this.apiFactoryRegistry.register("default",e);for(const e of this.plugins)for(const n of e.getApis())if(!this.apiFactoryRegistry.register("default",n))throw new Error(`Plugin ${e.getId()} tried to register duplicate or forbidden API factory for ${n.api}`);for(const e of this.apis)if(!this.apiFactoryRegistry.register("app",e))throw new Error(`Duplicate or forbidden API factory for ${e.api} in app`);return Ko.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new Ko(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const n=new Set;for(const s of e){const a=s.getId();if(n.has(a))throw new Error(`Duplicate plugin found '${a}'`);n.add(a)}}constructor(e){var n,s,a;(0,g._)(this,"apiHolder",void 0),(0,g._)(this,"configApi",void 0),(0,g._)(this,"apis",void 0),(0,g._)(this,"icons",void 0),(0,g._)(this,"plugins",void 0),(0,g._)(this,"featureFlags",void 0),(0,g._)(this,"components",void 0),(0,g._)(this,"themes",void 0),(0,g._)(this,"configLoader",void 0),(0,g._)(this,"defaultApis",void 0),(0,g._)(this,"bindRoutes",void 0),(0,g._)(this,"appLanguageApi",void 0),(0,g._)(this,"translationResources",void 0),(0,g._)(this,"appIdentityProxy",new Us),(0,g._)(this,"apiFactoryRegistry",void 0),(0,ce._)(this,_o,{writable:!0,value:!1});var c;this.apis=(c=e.apis)!==null&&c!==void 0?c:[],this.icons=e.icons;var y;this.plugins=new Set((y=e.plugins)!==null&&y!==void 0?y:[]);var v;this.featureFlags=(v=e.featureFlags)!==null&&v!==void 0?v:[],this.components=e.components,this.themes=e.themes;var D;this.configLoader=(D=e.configLoader)!==null&&D!==void 0?D:yr;var N;this.defaultApis=(N=e.defaultApis)!==null&&N!==void 0?N:[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new gs,this.appLanguageApi=qn.createWithStorage({defaultLanguage:(n=e.__experimentalTranslations)===null||n===void 0?void 0:n.defaultLanguage,availableLanguages:(s=e.__experimentalTranslations)===null||s===void 0?void 0:s.availableLanguages});var tt;this.translationResources=(tt=(a=e.__experimentalTranslations)===null||a===void 0?void 0:a.resources)!==null&&tt!==void 0?tt:[]}}function ei(r){return new ti(r)}function ni(r){var e,n,s,a;return ei({...r,apis:(e=r==null?void 0:r.apis)!==null&&e!==void 0?e:[],bindRoutes:r==null?void 0:r.bindRoutes,components:{...I,...r==null?void 0:r.components},configLoader:r==null?void 0:r.configLoader,defaultApis:Eo,icons:{...Mo,...r==null?void 0:r.icons},plugins:(n=r==null?void 0:r.plugins)!==null&&n!==void 0?n:[],featureFlags:(s=r==null?void 0:r.featureFlags)!==null&&s!==void 0?s:[],themes:(a=r==null?void 0:r.themes)!==null&&a!==void 0?a:Re})}var ro=t(2532);let Tr=!1;const Ir=r=>{const e=(0,xr.q)(),{NotFoundErrorPage:n}=e.getComponents(),s=(0,d.useMemo)(()=>Pn(),[]),c=[...(0,ro.v)(r.children,y=>y.getElements().flatMap(v=>{let D=v.props.path;if(D==="")return[];var N;D=(N=D==null?void 0:D.replace(/\/\*$/,""))!==null&&N!==void 0?N:"/";let tt=s?v:v.props.element;return!s&&!tt&&(tt=v,Tr||(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] />} />."),Tr=!0)),[{path:D,element:tt,children:v.props.children?[{path:D==="/"?"/":"*",element:v.props.children}]:void 0}]}).sort((v,D)=>D.path.localeCompare(v.path)).map(v=>({...v,path:v.path==="/"?"/":`${v.path}/*`}))),{path:"*",element:(0,i.jsx)(n,{})}];return(0,m.V$)(c)};(0,Pe.R)(Ir,"core.type","FlatRoutes");var en=t(74314),oi=t(51547),ri=t(88797);function Dr(r){return!r.cursor}function Ma(r){return!Dr(r)}class si{async getEntityAncestors(e,n){const{kind:s,namespace:a,name:c}=(0,en.of)(e.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(s)}/${encodeURIComponent(a)}/${encodeURIComponent(c)}/ancestry`,n)}async getLocationById(e,n){return await this.requestOptional("GET",`/locations/${encodeURIComponent(e)}`,n)}async getEntities(e,n){const{filter:s=[],fields:a=[],order:c,offset:y,limit:v,after:D}=e!=null?e:{},N=this.getParams(s);if(a.length&&N.push(`fields=${a.map(encodeURIComponent).join(",")}`),c)for(const mt of[c].flat())mt&&N.push(`order=${encodeURIComponent(mt.order)}:${encodeURIComponent(mt.field)}`);y!==void 0&&N.push(`offset=${y}`),v!==void 0&&N.push(`limit=${v}`),D!==void 0&&N.push(`after=${encodeURIComponent(D)}`);const tt=N.length?`?${N.join("&")}`:"",st=await this.requestRequired("GET",`/entities${tt}`,n),gt=(mt,Et)=>{var Wt,zt;if(((Wt=mt.metadata)===null||Wt===void 0?void 0:Wt.name)===void 0||mt.kind===void 0||((zt=Et.metadata)===null||zt===void 0?void 0:zt.name)===void 0||Et.kind===void 0)return 0;const Xt=(0,en.eE)(mt),he=(0,en.eE)(Et);return Xt<he?-1:Xt>he?1:0};return{items:st.sort(gt)}}async getEntitiesByRefs(e,n){var s;const a={entityRefs:e.entityRefs};!((s=e.fields)===null||s===void 0)&&s.length&&(a.fields=e.fields);const y=`${await this.discoveryApi.getBaseUrl("catalog")}/entities/by-refs`,v=await this.fetchApi.fetch(y,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(a)});if(!v.ok)throw await He.V.fromResponse(v);const{items:D}=await v.json();return{items:D.map(N=>N!=null?N:void 0)}}async queryEntities(e={},n){const s=[];if(Dr(e)){var a,c;const{fields:v=[],filter:D,limit:N,orderFields:tt,fullTextFilter:st}=e;s.push(...this.getParams(D)),N!==void 0&&s.push(`limit=${N}`),tt!==void 0&&(Array.isArray(tt)?tt:[tt]).forEach(({field:mt,order:Et})=>s.push(`orderField=${mt},${Et}`)),v.length&&s.push(`fields=${v.map(encodeURIComponent).join(",")}`);const gt=st==null||(a=st.term)===null||a===void 0?void 0:a.trim();gt&&s.push(`fullTextFilterTerm=${gt}`),!(st==null||(c=st.fields)===null||c===void 0)&&c.length&&s.push(`fullTextFilterFields=${st.fields.join(",")}`)}else{const{fields:v=[],limit:D,cursor:N}=e;s.push(`cursor=${N}`),D!==void 0&&s.push(`limit=${D}`),v.length&&s.push(`fields=${v.map(encodeURIComponent).join(",")}`)}const y=s.length?`?${s.join("&")}`:"";return this.requestRequired("GET",`/entities/by-query${y}`,n)}async getEntityByRef(e,n){const{kind:s,namespace:a,name:c}=(0,en.of)(e);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(s)}/${encodeURIComponent(a)}/${encodeURIComponent(c)}`,n)}async getEntityByName(e,n){const{kind:s,namespace:a="default",name:c}=e;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(s)}/${encodeURIComponent(a)}/${encodeURIComponent(c)}`,n)}async refreshEntity(e,n){const s=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify({entityRef:e})});if(s.status!==200)throw new Error(await s.text())}async getEntityFacets(e,n){const{filter:s=[],facets:a}=e,c=this.getParams(s);for(const v of a)c.push(`facet=${encodeURIComponent(v)}`);const y=c.length?`?${c.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${y}`,n)}async addLocation(e,n){const{type:s="url",target:a,dryRun:c}=e,y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${c?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify({type:s,target:a})});if(y.status!==201)throw new Error(await y.text());const{location:v,entities:D,exists:N}=await y.json();if(!v)throw new Error(`Location wasn't added: ${a}`);return{location:v,entities:D,exists:N}}async getLocationByRef(e,n){return(await this.requestRequired("GET","/locations",n)).map(a=>a.data).find(a=>e===(0,oi.NZ)(a))}async removeLocationById(e,n){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(e)}`,n)}async removeEntityByUid(e,n){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(e)}`,n)}async validateEntity(e,n,s){const a=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/validate-entity`,{headers:{"Content-Type":"application/json",...(s==null?void 0:s.token)&&{Authorization:`Bearer ${s==null?void 0:s.token}`}},method:"POST",body:JSON.stringify({entity:e,location:n})});if(a.ok)return{valid:!0};if(a.status!==400)throw await He.V.fromResponse(a);const{errors:c=[]}=await a.json();return{valid:!1,errors:c}}async requestIgnored(e,n,s){const a=`${await this.discoveryApi.getBaseUrl("catalog")}${n}`,c=s!=null&&s.token?{Authorization:`Bearer ${s.token}`}:{},y=await this.fetchApi.fetch(a,{method:e,headers:c});if(!y.ok)throw await He.V.fromResponse(y)}async requestRequired(e,n,s){const a=`${await this.discoveryApi.getBaseUrl("catalog")}${n}`,c=s!=null&&s.token?{Authorization:`Bearer ${s.token}`}:{},y=await this.fetchApi.fetch(a,{method:e,headers:c});if(!y.ok)throw await He.V.fromResponse(y);return y.json()}async requestOptional(e,n,s){const a=`${await this.discoveryApi.getBaseUrl("catalog")}${n}`,c=s!=null&&s.token?{Authorization:`Bearer ${s.token}`}:{},y=await this.fetchApi.fetch(a,{method:e,headers:c});if(!y.ok){if(y.status===404)return;throw await He.V.fromResponse(y)}return await y.json()}getParams(e=[]){const n=[];for(const s of[e].flat()){const a=[];for(const[c,y]of Object.entries(s))for(const v of[y].flat())v===ri.n?a.push(encodeURIComponent(c)):typeof v=="string"&&a.push(`${encodeURIComponent(c)}=${encodeURIComponent(v)}`);a.length&&n.push(`filter=${a.join(",")}`)}return n}constructor(e){(0,g._)(this,"discoveryApi",void 0),(0,g._)(this,"fetchApi",void 0),this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:Un()}}}var Lr=t(88624),ii=t(36802),ai=t(51271),Mr=t(36434),In=t(65524),li=t(15006),Te=t(82963),ci=t(53945),vn=t(76635);async function di({storageApi:r}){const e=r.forBucket("settings"),n=r.forBucket("starredEntities"),s=e.snapshot("starredEntities").value;if(!(0,vn.isArray)(s))return;var a;const c=new Set((a=n.snapshot("entityRefs").value)!==null&&a!==void 0?a:[]);s.filter(vn.isString).map(y=>y.split(":")).filter(y=>y.length===4&&y[0]==="entity").map(([y,v,D,N])=>(0,en.eE)({kind:v,namespace:D,name:N})).forEach(y=>c.add(y)),await n.set("entityRefs",Array.from(c)),await e.remove("starredEntities")}class ui{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}notifyChanges(){for(const e of this.subscribers)e.next(new Set(this.starredEntities))}constructor(e){(0,g._)(this,"settingsStore",void 0),(0,g._)(this,"starredEntities",void 0),(0,g._)(this,"subscribers",new Set),(0,g._)(this,"observable",new(H())(s=>(s.next(new Set(this.starredEntities)),this.subscribers.add(s),()=>{this.subscribers.delete(s)}))),di(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities");var n;this.starredEntities=new Set((n=this.settingsStore.snapshot("entityRefs").value)!==null&&n!==void 0?n:[]),this.settingsStore.observe$("entityRefs").subscribe({next:s=>{var a;this.starredEntities=new Set((a=s.value)!==null&&a!==void 0?a:[]),this.notifyChanges()}})}}function qo(r){const{years:e=0,months:n=0,weeks:s=0,days:a=0,hours:c=0,minutes:y=0,seconds:v=0,milliseconds:D=0}=r;return((((e*365+n*30+s*7+a)*24+c)*60+y)*60+v)*1e3+D}var hi=t(99798),fi=t.n(hi),pi=t(12830),gi=t.n(pi),vi=t(68203),mi=t(77224),yi=t(78898);const Ei={seconds:10},xi={milliseconds:50},ja=null,Ci={api:Nn.Z,component:kn.Z,system:mi.Z,domain:Fn.Z,location:Zn.Z,user:xn.Z,group:En.Z,template:yi.Z};function jr(r){return{async:r.async,render:({entityRef:e,entity:n,context:s})=>({snapshot:(0,vi.n)(n||e,s),loadEntity:r.async})}}var so=new WeakMap,tr=new WeakMap,io=new WeakMap,er=new WeakMap,ao=new WeakMap,Br=new WeakSet,Ur=new WeakSet,$r=new WeakSet;class lo{static createLocal(){return new lo({renderer:jr({async:!1})})}static create(e){return new lo(e)}forEntity(e,n){const{entityRef:s,kind:a,entity:c,needsLoad:y}=(0,Me._)(this,Br,Ai).call(this,e),v=tt=>{const{snapshot:st}=(0,Pt._)(this,ao).render({entityRef:s,loading:tt.loading,entity:tt.entity,context:n||{}});return{...st,entityRef:s,Icon:(0,Me._)(this,$r,bi).call(this,st.Icon,a)}};let D;try{D=v({loading:y,entity:c})}catch{D={primaryTitle:s,entityRef:s}}const N=y?new(H())(tt=>{let st=!1;return Promise.resolve().then(()=>{var gt;return(gt=(0,Pt._)(this,io))===null||gt===void 0?void 0:gt.load(s)}).then(gt=>{if(!st&>&>.metadata.etag!==(c==null?void 0:c.metadata.etag)){const mt=v({loading:!1,entity:gt});tt.next(mt)}}).catch(()=>{}).finally(()=>{st||tt.complete()}),()=>{st=!0}}):void 0;return{snapshot:D,update$:N}}constructor(e){(0,qe._)(this,Br),(0,qe._)(this,Ur),(0,qe._)(this,$r),(0,ce._)(this,so,{writable:!0,value:void 0}),(0,ce._)(this,tr,{writable:!0,value:void 0}),(0,ce._)(this,io,{writable:!0,value:void 0}),(0,ce._)(this,er,{writable:!0,value:void 0}),(0,ce._)(this,ao,{writable:!0,value:void 0});var n;const s=(n=e.cacheTtl)!==null&&n!==void 0?n:Ei;var a;const c=(a=e.batchDelay)!==null&&a!==void 0?a:xi;var y;const v=(y=e.renderer)!==null&&y!==void 0?y:jr({async:!0}),D={};var N;if(Object.entries((N=e.kindIcons)!==null&&N!==void 0?N:Ci).forEach(([tt,st])=>{D[tt.toLocaleLowerCase("en-US")]=st}),v.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");(0,de._)(this,io,(0,Me._)(this,Ur,Si).call(this,{cacheTtl:s,batchDelay:c,renderer:v,catalogApi:e.catalogApi}))}(0,de._)(this,tr,qo(s)),(0,de._)(this,so,new Map),(0,de._)(this,er,D),(0,de._)(this,ao,v)}}function Ai(r){if(typeof r!="string")return{entity:r,kind:r.kind,entityRef:(0,en.eE)(r),needsLoad:!1};const e=(0,Pt._)(this,so).get(r),n=e==null?void 0:e.entity,a=(!e||Date.now()-e.updatedAt>(0,Pt._)(this,tr))&&(0,Pt._)(this,ao).async!==!1&&(0,Pt._)(this,io)!==void 0;return{entity:n,kind:(0,en.of)(r).kind,entityRef:r,needsLoad:a}}function Si(r){const e=qo(r.cacheTtl),n=qo(r.batchDelay);return new(fi())(async s=>{const{items:a}=await r.catalogApi.getEntitiesByRefs({entityRefs:s}),c=Date.now();return s.forEach((y,v)=>{(0,Pt._)(this,so).set(y,{updatedAt:c,entity:a[v]})}),a},{name:"DefaultEntityPresentationApi",cacheMap:new(gi())(e),maxBatchSize:100,batchScheduleFn:n?s=>setTimeout(s,n):void 0})}function bi(r,e){return r||(r===!1?!1:(0,Pt._)(this,er)[e.toLocaleLowerCase("en-US")])}const we=(0,li.r)({id:"catalog",apis:[(0,Nt.n)({api:Lr.A,deps:{discoveryApi:te.N,fetchApi:Bn.g},factory:({discoveryApi:r,fetchApi:e})=>new si({discoveryApi:r,fetchApi:e})}),(0,Nt.n)({api:ii.p,deps:{storageApi:jn},factory:({storageApi:r})=>new ui({storageApi:r})}),(0,Nt.n)({api:ai.X,deps:{catalogApi:Lr.A},factory:({catalogApi:r})=>lo.create({catalogApi:r})})],routes:{catalogIndex:In._Z,catalogEntity:Mr.w},externalRoutes:{createComponent:In.yw,viewTechDoc:In.jU,createFromTemplate:In.ql}}),Ba=we.provide((0,Te.P4)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(7241),t.e(1600)]).then(t.bind(t,51600)).then(r=>r.CatalogPage),mountPoint:In._Z})),Oi=we.provide((0,Te.P4)({name:"CatalogEntityPage",component:()=>t.e(8951).then(t.bind(t,78951)).then(r=>r.CatalogEntityPage),mountPoint:Mr.w})),Ua=we.provide((0,Te.CO)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(1059),t.e(3510)]).then(t.bind(t,43510)).then(r=>r.AboutCard)}})),$a=we.provide((0,Te.CO)({name:"EntityLinksCard",component:{lazy:()=>t.e(7750).then(t.bind(t,17750)).then(r=>r.EntityLinksCard)}})),Fa=we.provide((0,Te.CO)({name:"EntityLabelsCard",component:{lazy:()=>t.e(5877).then(t.bind(t,85877)).then(r=>r.EntityLabelsCard)}})),Wa=we.provide((0,Te.CO)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(5458).then(t.bind(t,5458)).then(r=>r.HasSystemsCard)}})),Na=we.provide((0,Te.CO)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(1105).then(t.bind(t,1105)).then(r=>r.HasComponentsCard)}})),Za=we.provide((0,Te.CO)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(2440).then(t.bind(t,82440)).then(r=>r.HasSubcomponentsCard)}})),ka=we.provide((0,Te.CO)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(9770).then(t.bind(t,79770)).then(r=>r.HasResourcesCard)}})),Ka=we.provide((0,Te.CO)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(9545).then(t.bind(t,19545)).then(r=>r.DependsOnComponentsCard)}})),za=we.provide((0,Te.CO)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(184).then(t.bind(t,40184)).then(r=>r.DependencyOfComponentsCard)}})),Ha=we.provide((0,Te.CO)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(1032).then(t.bind(t,81032)).then(r=>r.DependsOnResourcesCard)}})),Ga=we.provide((0,Te.CO)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(3487).then(t.bind(t,33487)).then(r=>r.RelatedEntitiesCard)}})),Va=we.provide((0,ci.E5)({name:"CatalogSearchResultListItem",component:()=>t.e(7670).then(t.bind(t,27670)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var Fr=t(91657),Wr=t(58496);class Pi{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(e,n){const a=`${await this.getApiOrigin()}/${n}`,c=await fetch(`${a.endsWith("/")?a:`${a}/`}index.html`);if(c.status===404)throw new Error("Page not found");return c.text()}async syncEntityDocs(e){return"cached"}async getBaseUrl(e,n,s){const a=await this.getApiOrigin();return new URL(e,`${a}/${s}`).toString()}constructor({configApi:e,discoveryApi:n,identityApi:s}){(0,g._)(this,"configApi",void 0),(0,g._)(this,"discoveryApi",void 0),(0,g._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}class Ri{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:""}}constructor({configApi:e,discoveryApi:n,identityApi:s}){(0,g._)(this,"configApi",void 0),(0,g._)(this,"discoveryApi",void 0),(0,g._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}const wi=[(0,Nt.n)({api:Wr.D,deps:{configApi:le.D,discoveryApi:te.N,identityApi:ve.$},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new Pi({configApi:r,discoveryApi:e,identityApi:n})}),(0,Nt.n)({api:Wr.g,deps:{configApi:le.D,discoveryApi:te.N,identityApi:ve.$},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new Ri({configApi:r,discoveryApi:e,identityApi:n})}),(0,Nt.n)({api:Fr.q,deps:{configApi:le.D},factory:({configApi:r})=>Fr.a.fromConfig(r)})],Ti={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Ii={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Di(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function Li(){const r=await yr(),e=await Di();return[...r,{context:"detected",data:e?Ti:Ii}]}var Ze=t(79692),Mi=t(58845);const ji=(0,Ze.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Bi=()=>{const r=ji();return(0,i.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,i.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"})})};const Ui=(0,Ze.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var $i=()=>{const r=Ui();return(0,i.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,i.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"})})},Ae=t(76921);const Nr={isOpen:!1,setOpen:()=>{}},Zr=(0,d.createContext)(Nr),kr=(0,Ge.CT)("sidebar-open-state-context");function Kr(r){const{children:e,value:n}=r;return(0,i.jsx)(Zr.Provider,{value:n,children:(0,i.jsx)(kr.Provider,{value:(0,ln.E)({1:n}),children:e})})}const nr=()=>{const r=(0,d.useContext)(kr),e=(0,d.useContext)(Zr);if(r===void 0)return e||Nr;const n=r.atVersion(1);if(n===void 0)throw new Error("No context found for version 1.");return n};var zr=t(98864),Hr=t(44409),Ve=t(62774),Gr=t(41156),Fi=t(72779),nn=t.n(Fi),Wi=t(50023),Vr=t(61837),Ni=t(4190),or=t(90436),Zi=t(87685),ki=t(44882),Ki=t(57998);const Yr=(0,d.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var rr=t(93539);const zi=(0,Ze.Z)(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"}})),Hi=r=>{const{to:e,label:n,icon:s,value:a}=r,{sidebarConfig:c}=(0,d.useContext)(Ae.kG),y=zi({sidebarConfig:c}),v=(0,m.TH)(),{selectedMenuItemIndex:D,setSelectedMenuItemIndex:N}=(0,d.useContext)(Yr),tt=(gt,mt)=>{N(mt===D?-1:mt)},st=a===D&&D>=0||a!==D&&!(D>=0)&&e===v.pathname;return(0,i.jsx)(Ki.Z,{"aria-label":n,label:n,icon:s,component:zr.rU,to:e||v.pathname,onChange:tt,value:a,selected:st,classes:y})},Qr=r=>{const{children:e,to:n,label:s,icon:a,value:c}=r,{isMobile:y}=(0,rr.Pf)();return y?(0,i.jsx)(Hi,{to:n,label:s,icon:a,value:c}):(0,i.jsx)(i.Fragment,{children:e})},Jr=(0,Ze.Z)(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`})})),Gi=r=>(0,vn.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),Vi=d.createElement(Qr).type,Yi=({children:r,label:e="Menu",open:n,onClose:s})=>{const{sidebarConfig:a}=(0,d.useContext)(Ae.kG),c=Jr({sidebarConfig:a});return(0,i.jsxs)(Ni.ZP,{anchor:"bottom",open:n,onClose:s,ModalProps:{BackdropProps:{classes:{root:c.marginMobileSidebar}}},classes:{root:c.marginMobileSidebar,paperAnchorBottom:c.overlay},children:[(0,i.jsxs)(Ve.Z,{className:c.overlayHeader,children:[(0,i.jsx)(or.Z,{variant:"h3",children:e}),(0,i.jsx)(Vr.Z,{onClick:s,classes:{root:c.overlayHeaderClose},children:(0,i.jsx)(Zi.Z,{})})]}),(0,i.jsx)(Ve.Z,{component:"nav",children:r})]})},Qi=r=>{const{sidebarConfig:e}=(0,d.useContext)(Ae.kG),{children:n}=r,s=Jr({sidebarConfig:e}),a=(0,m.TH)(),[c,y]=(0,d.useState)(-1);(0,d.useEffect)(()=>{y(-1)},[a.pathname]);let v=(0,ro.v)(n,N=>N.getElements().filter(tt=>tt.type===Vi));if(n)v.length?v=Gi(v):v.push((0,i.jsx)(Qr,{icon:(0,i.jsx)(ki.Z,{}),children:n},"default_menu"));else return null;const D=c>=0&&!v[c].props.to;return(0,i.jsx)(Kr,{value:{isOpen:!0,setOpen:()=>{}},children:(0,i.jsxs)(Yr.Provider,{value:{selectedMenuItemIndex:c,setSelectedMenuItemIndex:y},children:[(0,i.jsx)(Yi,{label:v[c]&&v[c].props.label,open:D,onClose:()=>y(-1),children:v[c]&&v[c].props.children}),(0,i.jsx)(Wi.Z,{className:s.root,"data-testid":"mobile-sidebar-root",component:"nav",children:v})]})})},Xr=(0,Ze.Z)(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 _r;(function(r){r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open"})(_r||(_r={}));const Ji=r=>{const{sidebarConfig:e}=(0,d.useContext)(Ae.kG),{openDelayMs:n=e.defaultOpenDelayMs,closeDelayMs:s=e.defaultCloseDelayMs,disableExpandOnHover:a,children:c}=r,y=Xr({sidebarConfig:e}),v=(0,Gr.Z)(Xt=>Xt.breakpoints.down("md"),{noSsr:!0}),[D,N]=(0,d.useState)(0),tt=(0,d.useRef)(),{isPinned:st,toggleSidebarPinState:gt}=(0,rr.Pf)(),mt=()=>{st||a||(tt.current&&(clearTimeout(tt.current),tt.current=void 0),D!==2&&!v&&(tt.current=window.setTimeout(()=>{tt.current=void 0,N(2)},n),N(1)))},Et=()=>{st||a||(tt.current&&(clearTimeout(tt.current),tt.current=void 0),D===1?N(0):D===2&&(tt.current=window.setTimeout(()=>{tt.current=void 0,N(0)},s)))},Wt=D===2&&!v||st,zt=Xt=>{Xt?(N(2),gt()):(N(0),gt())};return(0,i.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,i.jsx)(_i,{}),(0,i.jsx)(Kr,{value:{isOpen:Wt,setOpen:zt},children:(0,i.jsx)(Ve.Z,{className:y.root,"data-testid":"sidebar-root",onMouseEnter:a?()=>{}:mt,onFocus:a?()=>{}:mt,onMouseLeave:a?()=>{}:Et,onBlur:a?()=>{}:Et,children:(0,i.jsx)(Ve.Z,{className:nn()(y.drawer,y.drawerWidth,{[y.drawerOpen]:Wt}),children:c})})})]})},Xi=r=>{var e;const n=(0,Ae.$E)((e=r.sidebarOptions)!==null&&e!==void 0?e:{});var s;const a=(0,Ae.rW)((s=r.submenuOptions)!==null&&s!==void 0?s:{}),{children:c,disableExpandOnHover:y,openDelayMs:v,closeDelayMs:D}=r,{isMobile:N}=(0,rr.Pf)();return N?(0,i.jsx)(Qi,{children:c}):(0,i.jsx)(Ae.kG.Provider,{value:{sidebarConfig:n,submenuConfig:a},children:(0,i.jsx)(Ji,{openDelayMs:v,closeDelayMs:D,disableExpandOnHover:y,children:c})})};function _i(){const{sidebarConfig:r}=(0,d.useContext)(Ae.kG),{focusContent:e,contentRef:n}=(0,Hr.r)(),s=Xr({sidebarConfig:r});return n!=null&&n.current?(0,i.jsx)(A.Z,{onClick:e,variant:"contained",className:nn()(s.visuallyHidden),children:"Skip to content"}):null}var qi=t(26739),co=t(1667),ta=t(83543),ea=t(59797),qr=t(98989);const na=(0,Ze.Z)(r=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:r.spacing(7)+1},drawer:e=>{var n,s;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[r.breakpoints.up("sm")]:{marginLeft:e.left,transition:r.transitions.create("margin-left",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(s=(n=r.palette.navigation.submenu)===null||n===void 0?void 0:n.background)!==null&&s!==void 0?s:"#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=>({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.common.white,padding:r.spacing(2.5),[r.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),oa=r=>{const{isOpen:e}=nr(),{sidebarConfig:n,submenuConfig:s}=(0,d.useContext)(Ae.kG),a=e?n.drawerWidthOpen:n.drawerWidthClosed,c=na({left:a,submenuConfig:s}),{isHoveredOn:y}=(0,d.useContext)(Ae.Ag),[v,D]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{D(y)},[y]),(0,i.jsxs)(Ve.Z,{className:nn()(c.drawer,{[c.drawerOpen]:v}),children:[(0,i.jsx)(or.Z,{variant:"h5",component:"span",className:c.title,children:r.title}),r.children]})};var ra=t(19126),ts=t.n(ra);function es(r,e,n=!1){const s=new URLSearchParams(e.search).toString(),a=ts().parse(s),c=new URLSearchParams(r.search).toString(),y=ts().parse(c),v=n?vn.isEqual:vn.isMatch;return(0,vn.isEqual)(e.pathname,r.pathname)&&v(y,a)}const sa=r=>(0,Ze.Z)(e=>{var n,s,a,c;return{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:(a=(n=e.palette.navigation.navItem)===null||n===void 0?void 0:n.hoverBackground)!==null&&a!==void 0?a:"#404040"}},highlighted:{background:(c=(s=e.palette.navigation.navItem)===null||s===void 0?void 0:s.hoverBackground)!==null&&c!==void 0?c:"#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 uo(r){return(0,d.useMemo)(()=>sa(r),[r])()}const ia=(r,e)=>(0,ro.v)(r.props.children,n=>{let s=!1;return n.getElements().forEach(({props:{to:a,dropdownItems:c}})=>{if(!s){if(c!=null&&c.length){c.forEach(({to:y})=>s=s||es(e,(0,bn.i3)(y)));return}a&&(s=es(e,(0,bn.i3)(a)))}}),s},[e.pathname]);function sr(r){return r.to===void 0}const aa=d.createElement(oa).type,la=d.forwardRef(function({to:e,end:n,style:s,className:a,activeStyle:c,caseSensitive:y,activeClassName:v="active","aria-current":D="page",...N},tt){let{pathname:st}=(0,m.TH)(),{pathname:gt}=(0,m.WU)(e);y||(st=st.toLocaleLowerCase("en-US"),gt=gt.toLocaleLowerCase("en-US"));let mt=st===gt;!mt&&!n&&(mt=st.startsWith(`${gt}/`));const Et=mt?D:void 0;return(0,i.jsx)(x.rU,{...N,to:e,ref:tt,"aria-current":Et,style:{...s,...mt?c:void 0},className:nn()([typeof a!="function"?a:void 0,mt?v:void 0])})}),ns=(0,d.forwardRef)((r,e)=>{const{icon:n,text:s,hasNotifications:a=!1,hasSubmenu:c=!1,disableHighlight:y=!1,onClick:v,noTrack:D,children:N,className:tt,...st}=r,{sidebarConfig:gt}=(0,d.useContext)(Ae.kG),mt=uo(gt),{isOpen:Et}=nr(),Wt=!Et&&c?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},zt=(0,i.jsxs)(Ve.Z,{style:Wt,children:[(0,i.jsx)(n,{fontSize:"small"}),!Et&&c?(0,i.jsx)(qr.Z,{fontSize:"small"}):(0,i.jsx)(i.Fragment,{})]}),Xt=(0,i.jsx)(qi.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!a,className:nn()({[mt.closedItemIcon]:!Et}),children:zt}),he=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ve.Z,{"data-testid":"login-button",className:mt.iconContainer,children:Xt}),s&&(0,i.jsx)(or.Z,{variant:"subtitle2",component:"span",className:mt.label,children:s}),(0,i.jsx)("div",{className:mt.secondaryAction,children:N})]}),ke=Et?he:Xt,Dn={onClick:v,className:nn()(tt,mt.root,Et?mt.open:mt.closed,sr(r)&&mt.buttonItem,{[mt.highlightable]:!y})},is=(0,Cr.z)(),{pathname:ir}=(0,m.WU)(!sr(r)&&r.to?r.to:""),as=(0,d.useCallback)(Ta=>{if(!D){const Ia="click",Da=s!=null?s:"Sidebar Item",La=ir?{attributes:{to:ir}}:void 0;is.captureEvent(Ia,Da,La)}v==null||v(Ta)},[is,s,ir,D,v]);return sr(r)?(0,i.jsx)(A.Z,{role:"button","aria-label":s,...Dn,ref:e,onClick:as,children:ke}):(0,i.jsx)(la,{...Dn,activeClassName:mt.selected,to:r.to?r.to:"",ref:e,"aria-label":s||r.to,...st,onClick:as,children:ke})}),ca=({children:r,...e})=>{const{sidebarConfig:n}=(0,d.useContext)(Ae.kG),s=uo(n),[a,c]=(0,d.useState)(!1),y=(0,m.TH)(),v=ia(r,y),D=(0,Gr.Z)(gt=>gt.breakpoints.down("sm")),N=()=>{c(!0)},tt=()=>{c(!1)},st=()=>D?a?(0,i.jsx)(ea.Z,{fontSize:"small",className:s.submenuArrow}):(0,i.jsx)(ta.Z,{fontSize:"small",className:s.submenuArrow}):!a&&(0,i.jsx)(qr.Z,{fontSize:"small",className:s.submenuArrow});return(0,i.jsx)(Ae.Ag.Provider,{value:{isHoveredOn:a,setIsHoveredOn:c},children:(0,i.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:tt,onTouchStart:a?tt:N,onMouseEnter:N,className:nn()(a&&s.highlighted),children:[(0,i.jsx)(ns,{hasSubmenu:!0,className:v?s.selected:"",...e,children:st()}),a&&r]})})},os=(0,d.forwardRef)((r,e)=>{const[n]=(0,ro.v)(r.children,s=>s.getElements().filter(a=>a.type===aa));return n?(0,i.jsx)(ca,{...r,children:n}):(0,i.jsx)(ns,{...r,ref:e})});function Ja(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[n,s]=useState(""),a=uo(e),c=r.icon?r.icon:SearchIcon,y=()=>{r.onSearch(n),s("")},v=st=>{st.key==="Enter"&&(st.preventDefault(),y())},D=st=>{s(st.target.value)},N=st=>{st.preventDefault(),st.stopPropagation()},tt=st=>{y(),st.preventDefault()};return _jsx(Box,{className:a.searchRoot,children:_jsx(os,{icon:c,to:r.to,onClick:tt,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:n,onClick:N,onChange:D,onKeyDown:v,className:a.searchContainer,InputProps:{disableUnderline:!0,className:a.searchField},inputProps:{className:a.searchFieldHTMLInput}})})})}const Xa=(0,co.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),_a=(0,co.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),da=(0,co.Z)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),ua=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),qa=(0,co.Z)("div")(({theme:r})=>{const e=ua(r);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),tl=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=uo(r),{isOpen:n,setOpen:s}=useSidebarOpenState();if(useMediaQuery(y=>y.breakpoints.down("md"),{noSsr:!0}))return null;const c=()=>{s(!n)};return _jsx(Button,{role:"button",onClick:c,className:e.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:e.arrows,children:n?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},ha=(0,Ze.Z)({root:{width:Ae.po.drawerWidthClosed,height:3*Ae.po.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:Ae.po.drawerWidthClosed,marginLeft:24}}),fa=()=>{const r=ha(),{isOpen:e}=nr();return(0,i.jsx)("div",{className:r.root,children:(0,i.jsx)(zr.rU,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,i.jsx)(Bi,{}):(0,i.jsx)($i,{})})})},pa=({children:r})=>(0,i.jsxs)(Hr.t,{children:[(0,i.jsxs)(Xi,{children:[(0,i.jsx)(fa,{}),(0,i.jsx)(da,{}),(0,i.jsx)(os,{icon:Mi.Z,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var ga=t(80030),va=t(32388),ma=t(4142),ya=t(65386),Ea=t(14540);const xa=(0,Ze.Z)(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 rs;(function(r){r.LIGHT="light",r.DARK="dark"})(rs||(rs={}));const Ca=()=>{const r=(0,Sn.h_)(Gn),e=xa(),[n,s]=(0,d.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),a={light:{icon:ma.Z,title:"Dark theme"},dark:{icon:va.Z,title:"Light theme"}},{title:c,icon:y}=a[n],v=()=>{s(D=>{const N=D==="light"?"dark":"light";return r.setActiveThemeId(N),N})};return(0,i.jsx)(Ve.Z,{display:"flex",alignItems:"center",mr:2,children:(0,i.jsx)(ga.ZP,{title:c,arrow:!0,children:(0,i.jsx)(Vr.Z,{size:"small",onClick:v,children:(0,i.jsx)(y,{className:e.headerIcon})})})})},Aa=()=>(0,i.jsxs)(f.I6,{children:[(0,i.jsx)(ya.S,{}),(0,i.jsx)(Ea.F,{withSearch:!1})]}),Sa=(0,i.jsx)(Aa,{}),ss=ni({apis:wi,configLoader:Li,plugins:Object.values(o)}),ba=ss.getProvider(),Oa=ss.getRouter(),Pa=f.s4.provide((0,p.KY)({name:"ThemeToggleAddon",component:Ca,location:S.o.Header})),Ra=(0,i.jsxs)(Ir,{children:[(0,i.jsx)(m.Fg,{to:"/docs/default/component/local/"},"/"),(0,i.jsx)(m.AW,{path:"/catalog/:namespace/:kind/:name",element:(0,i.jsx)(Oi,{})}),(0,i.jsx)(m.AW,{path:"/docs",element:(0,i.jsx)(f.Jl,{}),children:(0,i.jsx)(l.u,{})}),(0,i.jsxs)(m.AW,{path:"/docs/:namespace/:kind/:name/*",element:(0,i.jsx)(f.I6,{}),children:[Sa,(0,i.jsx)(p.DR,{children:(0,i.jsx)(Pa,{})})]})]});var wa=()=>(0,i.jsx)(ba,{children:(0,i.jsx)(Oa,{children:(0,i.jsx)(pa,{children:Ra})})});b.createRoot(document.getElementById("root")).render((0,i.jsx)(wa,{}))},29651:function(_,P,t){"use strict";t.d(P,{CT:function(){return d},Vt:function(){return b}});var o=t(2784),i=t(96087);function d(f){return(0,i.u)(f,()=>(0,o.createContext)(void 0))}function b(f){return(0,o.useContext)(d(f))}function m(f){return{set(l){globalThis[`__@backstage/${f}__`]=createContext(createVersionedValueMap(l))},reset(){delete globalThis[`__@backstage/${f}__`]}}}},68993:function(_,P,t){"use strict";t.d(P,{E:function(){return o}});function o(i){Object.freeze(i);const d={atVersion(b){return i[b]}};return Object.defineProperty(d,"$map",{configurable:!0,enumerable:!0,get(){return i}}),d}},96087:function(_,P,t){"use strict";t.d(P,{u:function(){return b}});function o(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const i=o(),d=m=>`__@backstage/${m}__`;function b(m,f){const l=d(m);let p=i[l];return p||(p=f(),i[l]=p,p)}},88624:function(_,P,t){"use strict";t.d(P,{A:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"plugin.catalog.service"})},51271:function(_,P,t){"use strict";t.d(P,{X:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"plugin.catalog.entity-presentation"})},68203:function(_,P,t){"use strict";t.d(P,{n:function(){return U}});var o=t(74314),i=t(34106),d=t(43642),b=t(77224),m=t(15933),f=t(86737),l=t(78898),p=t(4989),S=t(44407),A=t(84219),R=t(98685),E=t(72579),C=t.n(E);const x=f.Z,B={api:m.Z,component:S.Z,system:b.Z,domain:d.Z,location:p.Z,user:R.Z,group:A.Z,template:l.Z};function U(I,g){const{kind:K,namespace:V,name:J,title:H,description:G,displayName:z,type:Y}=w(I),ot=K&&B[K.toLocaleLowerCase("en-US")]||x,ct=(0,o.eE)({kind:K||"unknown",namespace:V||i.zG,name:J||"unknown"}),dt=$({kind:K,namespace:V,name:J,context:g}),ft=[z,H,dt].find(at=>at&&typeof at=="string"),Ot=[ft!==ct?ct:void 0,Y,G].filter(at=>at&&typeof at=="string").join(" | ");return{entityRef:ct,primaryTitle:ft,secondaryTitle:Ot||void 0,Icon:ot}}function w(I){if(typeof I=="string"){let g=I.indexOf(":");const K=I.indexOf("/");K!==-1&&K<g&&(g=-1);const V=g===-1?void 0:I.slice(0,g),J=K===-1?void 0:I.slice(g+1,K),H=I.slice(Math.max(g+1,K+1));return{kind:V,namespace:J,name:H}}if(typeof I=="object"&&I!==null){const g=[C()(I,"kind")].find(Y=>Y&&typeof Y=="string"),K=[C()(I,"metadata.namespace"),C()(I,"namespace")].find(Y=>Y&&typeof Y=="string"),V=[C()(I,"metadata.name"),C()(I,"name")].find(Y=>Y&&typeof Y=="string"),J=[C()(I,"metadata.title")].find(Y=>Y&&typeof Y=="string"),H=[C()(I,"metadata.description")].find(Y=>Y&&typeof Y=="string"),G=[C()(I,"spec.profile.displayName")].find(Y=>Y&&typeof Y=="string"),z=[C()(I,"spec.type")].find(Y=>Y&&typeof Y=="string");return{kind:g,namespace:K,name:V,title:J,description:H,displayName:G,type:z}}return{}}function $(I){var g,K,V,J,H;const G=((g=I.kind)===null||g===void 0?void 0:g.toLocaleLowerCase("en-US"))||"unknown",z=I.namespace||i.zG,Y=I.name||"unknown",ot=(V=I.context)===null||V===void 0||(K=V.defaultKind)===null||K===void 0?void 0:K.toLocaleLowerCase("en-US"),ct=(H=I.context)===null||H===void 0||(J=H.defaultNamespace)===null||J===void 0?void 0:J.toLocaleLowerCase("en-US");let dt=Y;return(ct&&z.toLocaleLowerCase("en-US")!==ct||z!==i.zG)&&(dt=`${z}/${dt}`),ot&&G.toLocaleLowerCase("en-US")!==ot&&(dt=`${G}:${dt}`),dt}},36802:function(_,P,t){"use strict";t.d(P,{p:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"catalog-react.starred-entities"})},30389:function(_,P,t){"use strict";t.d(P,{_i:function(){return C}});var o=t(52322),i=t(2784),d=t(41156),b=t(60364),m=t(77277),f=t(4190),l=t(62774),p=t(90436),S=t(60905),A=t(36444);const R=x=>{var B;const U=(0,d.Z)(K=>{var V,J;return K.breakpoints.down((J=(V=x.options)===null||V===void 0?void 0:V.drawerBreakpoint)!==null&&J!==void 0?J:"md")}),w=(0,b.Z)(),[$,I]=(0,i.useState)(!1);var g;return U?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(m.Z,{style:{marginTop:w.spacing(1),marginLeft:w.spacing(1)},onClick:()=>I(!0),startIcon:(0,o.jsx)(A.Z,{}),children:"Filters"}),(0,o.jsx)(f.ZP,{open:$,onClose:()=>I(!1),anchor:(g=(B=x.options)===null||B===void 0?void 0:B.drawerAnchor)!==null&&g!==void 0?g:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,o.jsxs)(l.Z,{m:2,children:[(0,o.jsx)(p.Z,{variant:"h6",component:"h2",style:{marginBottom:w.spacing(1)},children:"Filters"}),x.children]})})]}):(0,o.jsx)(S.Z,{item:!0,lg:2,children:x.children})},E=x=>(0,o.jsx)(S.Z,{item:!0,xs:12,lg:10,children:x.children}),C=x=>(0,o.jsx)(S.Z,{container:!0,style:{position:"relative"},children:x.children});C.Filters=R,C.Content=E},77605:function(_,P,t){"use strict";t.d(P,{K:function(){return G}});var o=t(52322),i=t(62774),d=t(90436),b=t(38016),m=t(88013),f=t(2784),l=t(44394),p=t(64279),S=t(88624),A=t(21324),R=t(5806),E=t(19996),C=t(25505);const x=(0,o.jsx)(C.Z,{fontSize:"small"}),B=(0,o.jsx)(E.Z,{fontSize:"small"});function U({selected:z}){return(0,o.jsx)(A.Z,{icon:x,checkedIcon:B,checked:z})}const w=(0,f.memo)(z=>{const{selected:Y,value:ot,availableOptions:ct,showCounts:dt}=z,ft=dt?`${ot} (${ct==null?void 0:ct[ot]})`:ot;return(0,o.jsx)(R.Z,{control:(0,o.jsx)(U,{selected:Y}),label:ft,onClick:Ot=>Ot.preventDefault()})});var $=t(79692),I=t(86619),g=t(72779),K=t.n(g);const V=(0,$.Z)({input:{}},{name:"CatalogReactEntityAutocompletePickerInput"});function J(z){const Y=V();return(0,o.jsx)(I.Z,{variant:"outlined",...z,className:K()(Y.input,z.className)})}var H=t(25942);function G(z){var Y;const{label:ot,name:ct,path:dt,showCounts:ft,Filter:Ot,InputProps:at,initialSelectedOptions:At=[]}=z,{updateFilters:X,filters:L,queryParameters:{[ct]:Q}}=(0,H.wp)(),et=(0,l.h_)(S.A),{value:it}=(0,p.default)(async()=>{var pt;const bt=dt,{facets:It}=await et.getEntityFacets({facets:[bt],filter:(pt=L.kind)===null||pt===void 0?void 0:pt.getCatalogFilters()});return Object.fromEntries(It[bt].map(({value:jt,count:pe})=>[jt,pe]))},[L.kind]),ut=(0,f.useMemo)(()=>[Q].flat().filter(Boolean),[Q]);var Z;const[F,ht]=(0,f.useState)(ut.length?ut:(Z=(Y=L[ct])===null||Y===void 0?void 0:Y.values)!==null&&Z!==void 0?Z:At);(0,f.useEffect)(()=>{ut.length&&ht(ut)},[ut]);const xt=Object.keys(it!=null?it:{}),vt=F.length&&xt.length;(0,f.useEffect)(()=>{X({[ct]:vt?new Ot(F):void 0})},[ct,vt,F,Ot,X]);const yt=L[ct];return yt&&typeof yt=="object"&&!("values"in yt)||!xt.length||xt.length<=1?null:(0,o.jsx)(i.Z,{pb:1,pt:1,children:(0,o.jsxs)(d.Z,{variant:"button",component:"label",children:[ot,(0,o.jsx)(m.ZP,{multiple:!0,disableCloseOnSelect:!0,options:xt,value:F,onChange:(pt,bt)=>ht(bt),renderOption:(pt,{selected:bt})=>(0,o.jsx)(w,{selected:bt,value:pt,availableOptions:it,showCounts:!!ft}),size:"small",popupIcon:(0,o.jsx)(b.Z,{"data-testid":`${String(ct)}-picker-expand`}),renderInput:pt=>(0,o.jsx)(J,{...pt,...at})})]})})}},63833:function(_,P,t){"use strict";t.d(P,{d:function(){return X}});var o=t(52322),i=t(74314),d=t(79692),b=t(62774),m=t(90436),f=t(5806),l=t(21324),p=t(86619),S=t(19996),A=t(25505),R=t(38016),E=t(88013),C=t(2784),x=t(25942),B=t(4967),U=t(6232),w=t(98685),$=t(62367),I=t(86540),g=t(44394),K=t(69294),V=t(88624);function J({enabled:L}){const Q=(0,g.h_)(V.A),[et]=(0,C.useState)(async()=>{if(!L)return[];const it="relations.ownedBy";return Q.getEntityFacets({facets:[it]}).then(ut=>ut.facets[it].map(Z=>Z.value).map(Z=>{const{kind:F,name:ht,namespace:xt}=(0,i.of)(Z);return{apiVersion:"backstage.io/v1beta1",kind:F,metadata:{name:ht,namespace:xt}}}).sort((Z,F)=>(Z.metadata.namespace||"").localeCompare(F.metadata.namespace||"","en-US")||Z.metadata.name.localeCompare(F.metadata.name,"en-US")||Z.kind.localeCompare(F.kind,"en-US"))).catch(()=>[])});return(0,K.default)(async(it,ut)=>{const Z=await et;if(!Z)return{items:[]};var F;const ht=(F=ut==null?void 0:ut.limit)!==null&&F!==void 0?F:20,{text:xt,start:vt}=H(it),yt=Z.filter(bt=>Y(xt,bt)),pt=vt+ht;return{items:yt.slice(0,pt),...z({entities:yt,limit:pt,payload:{text:xt,start:pt}})}},[et],{loading:!0,value:{items:[]}})}function H(L){return G(L)&&L.cursor?JSON.parse(atob(L.cursor)):{text:L.text||"",start:0}}function G(L){return!!L.cursor}function z({entities:L,limit:Q,payload:et}){return L.length>Q?{cursor:btoa(JSON.stringify(et))}:{}}function Y(L,Q){var et;const it=L.trim();return Q.kind.includes(it)||((et=Q.metadata.namespace)===null||et===void 0?void 0:et.includes(it))||Q.metadata.name.includes(it)}function ot(){const L=(0,g.h_)(V.A);return(0,K.default)(async(Q,et)=>{const it=Q,ut=Q;var Z;const F=(Z=et==null?void 0:et.limit)!==null&&Z!==void 0?Z:20;if(ut.cursor){const xt=await L.queryEntities({cursor:ut.cursor,limit:F});return{cursor:xt.pageInfo.nextCursor,items:[...ut.items,...xt.items]}}const ht=await L.queryEntities({fullTextFilter:{term:it.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:F});return{cursor:ht.pageInfo.nextCursor,items:ht.items}},[],{loading:!0})}var ct=t(21638);function dt({mode:L,initialSelectedOwnersRefs:Q}){const et=L==="owners-only",it=ot(),ut=J({enabled:et}),[Z,F]=et?ut:it;return[Z,F,ft({enabled:!et,initialSelectedOwnersRefs:Q})]}function ft({enabled:L,initialSelectedOwnersRefs:Q}){const et=(0,C.useRef)({}),it=(0,g.h_)(V.A),[,ut]=(0,K.default)(async()=>{(await it.getEntitiesByRefs({entityRefs:Q})).items.forEach(F=>{F&&(et.current[(0,i.eE)(F)]=F)})},[]);return(0,ct.n)(()=>{L&&Q.length>0&&ut()}),{getEntity:Z=>et.current[Z],setEntity:Z=>{et.current[(0,i.eE)(Z)]=Z}}}const Ot=(0,d.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),at=(0,o.jsx)(A.Z,{fontSize:"small"}),At=(0,o.jsx)(S.Z,{fontSize:"small"}),X=L=>{var Q,et;const it=Ot(),{mode:ut="owners-only"}=L||{},{updateFilters:Z,filters:F,queryParameters:{owners:ht}}=(0,x.wp)(),[xt,vt]=(0,C.useState)(""),yt=(0,C.useMemo)(()=>[ht].flat().filter(Boolean),[ht]);var pt;const[bt,It]=(0,C.useState)(yt.length?yt:(pt=(Q=F.owners)===null||Q===void 0?void 0:Q.values)!==null&&pt!==void 0?pt:[]),[{value:jt,loading:pe},Se,Ee]=dt({mode:ut,initialSelectedOwnersRefs:bt});(0,U.b)(()=>Se({text:xt}),[xt,Se],250);const $t=(jt==null?void 0:jt.items)||[];return(0,C.useEffect)(()=>{if(yt.length){const Lt=new B.rf(yt);It(Lt.values)}},[yt]),(0,C.useEffect)(()=>{Z({owners:bt.length?new B.rf(bt):void 0})},[bt,Z]),["user","group"].includes(((et=F.kind)===null||et===void 0?void 0:et.value.toLocaleLowerCase("en-US"))||"")?null:(0,o.jsx)(b.Z,{pb:1,pt:1,children:(0,o.jsxs)(m.Z,{variant:"button",component:"label",children:["Owner",(0,o.jsx)(E.ZP,{multiple:!0,disableCloseOnSelect:!0,loading:pe,options:$t,value:bt,getOptionSelected:(Lt,Kt)=>typeof Kt=="string"?(0,i.eE)(Lt)===Kt:Lt===Kt,getOptionLabel:Lt=>{const Kt=typeof Lt=="string"?Ee.getEntity(Lt)||(0,i.of)(Lt,{defaultKind:"group",defaultNamespace:"default"}):Lt;return(0,I.w)(Kt,(0,I.$)(Kt))},onChange:(Lt,Kt)=>{vt(""),It(Kt.map(Yt=>{const qt=typeof Yt=="string"?Yt:(0,i.eE)(Yt);return typeof Yt!="string"&&Ee.setEntity(Yt),qt}))},filterOptions:Lt=>Lt,renderOption:(Lt,{selected:Kt})=>{const Yt=Lt.kind.toLocaleLowerCase("en-US")==="group";return(0,o.jsx)(f.Z,{control:(0,o.jsx)(l.Z,{icon:at,checkedIcon:At,checked:Kt}),onClick:qt=>qt.preventDefault(),label:(0,o.jsxs)(b.Z,{display:"flex",flexWrap:"wrap",alignItems:"center",children:[Yt?(0,o.jsx)($.Z,{fontSize:"small"}):(0,o.jsx)(w.Z,{fontSize:"small"}),"\xA0",(0,I.w)(Lt,(0,I.$)(Lt,{defaultKind:Lt.kind}))]})})},size:"small",popupIcon:(0,o.jsx)(R.Z,{"data-testid":"owner-picker-expand"}),renderInput:Lt=>(0,o.jsx)(p.Z,{...Lt,className:it.input,onChange:Kt=>{vt(Kt.currentTarget.value)},variant:"outlined"}),ListboxProps:{onScroll:Lt=>{const Kt=Lt.currentTarget;Math.abs(Kt.scrollHeight-Kt.clientHeight-Kt.scrollTop)<1&&(jt!=null&&jt.cursor)&&Se({items:jt.items,cursor:jt.cursor})},"data-testid":"owner-picker-listbox"}})]})})}},84719:function(_,P,t){"use strict";t.d(P,{d:function(){return $}});var o=t(52322),i=t(74314),d=t(34106),b=t(98864),m=t(37321),f=t(2784),l=t(36434),p=t(79692),S=t(62774),A=t(80030),R=t(44394),E=t(51271),C=t(68203);function x(g,K,V){const[J,H]=(0,f.useState)(g);return(0,f.useEffect)(()=>{H(g);const G=K==null?void 0:K.subscribe({next:z=>{H(z)},complete:()=>{G==null||G.unsubscribe()}});return()=>{G==null||G.unsubscribe()}},V),J}function B(g,K){const J=(0,R.I_)().get(E.X),H=[J,JSON.stringify(g),JSON.stringify(K||null)],G=(0,f.useMemo)(()=>J?J.forEntity(typeof g=="string"||"metadata"in g?g:(0,i.eE)(g),K):{snapshot:(0,C.n)(g,K)},H);return x(G.snapshot,G.update$,[G])}const U=(0,p.Z)(g=>({root:{display:"inline-flex",alignItems:"center"},icon:{marginRight:g.spacing(.5),color:g.palette.text.secondary,lineHeight:0}}),{name:"CatalogReactEntityDisplayName"}),w=g=>{const{entityRef:K,hideIcon:V,disableTooltip:J,defaultKind:H,defaultNamespace:G}=g,z=U(),{primaryTitle:Y,secondaryTitle:ot,Icon:ct}=B(K,{defaultKind:H,defaultNamespace:G});let dt=(0,o.jsx)(o.Fragment,{children:Y});return dt=(0,o.jsxs)(S.Z,{component:"span",className:z.root,children:[ct&&!V?(0,o.jsx)(S.Z,{component:"span",className:z.icon,children:(0,o.jsx)(ct,{fontSize:"inherit"})}):null,dt]}),ot&&!J&&(dt=(0,o.jsx)(A.ZP,{enterDelay:1500,title:ot,children:dt})),dt},$=(0,f.forwardRef)((g,K)=>{const{entityRef:V,defaultKind:J,defaultNamespace:H,title:G,children:z,hideIcon:Y,...ot}=g,ct=I(g.entityRef);var dt;const ft=(dt=z!=null?z:G)!==null&&dt!==void 0?dt:(0,o.jsx)(w,{entityRef:V,defaultKind:J,defaultNamespace:H,hideIcon:Y});return(0,o.jsx)(b.rU,{...ot,ref:K,to:ct,children:ft})});function I(g){const K=(0,m.t)(l.w);let V,J,H;if(typeof g=="string"){const Y=(0,i.of)(g);V=Y.kind,J=Y.namespace,H=Y.name}else"metadata"in g?(V=g.kind,J=g.metadata.namespace,H=g.metadata.name):(V=g.kind,J=g.namespace,H=g.name);V=V.toLocaleLowerCase("en-US");var G;J=(G=J==null?void 0:J.toLocaleLowerCase("en-US"))!==null&&G!==void 0?G:d.zG;const z={kind:encodeURIComponent(V),namespace:encodeURIComponent(J),name:encodeURIComponent(H)};return K(z)}},51194:function(_,P,t){"use strict";t.d(P,{r:function(){return m}});var o=t(52322),i=t(74314),d=t(2784),b=t(84719);function m(f){const{entityRefs:l,hideIcons:p,...S}=f;return(0,o.jsx)(o.Fragment,{children:l.map((A,R)=>{const E=typeof A=="string"?A:(0,i.eE)(A);return(0,o.jsxs)(d.Fragment,{children:[R>0&&", ",(0,o.jsx)(b.d,{...S,entityRef:A,hideIcon:p})]},`${R}.${E}`)})})}},86540:function(_,P,t){"use strict";t.d(P,{$:function(){return b},w:function(){return m}});var o=t(34106),i=t(72579),d=t.n(i);function b(f,l){const p=l==null?void 0:l.defaultKind;let S,A,R;return"metadata"in f?(S=f.kind,A=f.metadata.namespace,R=f.metadata.name):(S=f.kind,A=f.namespace,R=f.name),(A===void 0||A==="")&&(A=o.zG),(l==null?void 0:l.defaultNamespace)!==void 0?(l==null?void 0:l.defaultNamespace)===A&&(A=void 0):A===o.zG&&(A=void 0),S=S.toLocaleLowerCase("en-US"),S=p&&p.toLocaleLowerCase("en-US")===S?void 0:S,`${S?`${S}:`:""}${A?`${A}/`:""}${R}`}function m(f,l){for(const p of["spec.profile.displayName","metadata.title"]){const S=d()(f,p);if(S&&typeof S=="string")return S}return l}},97894:function(_,P,t){"use strict";t.d(P,{x:function(){return l}});var o=t(52322),i=t(79692),d=t(2784),b=t(4967),m=t(77605);const f=(0,i.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),l=p=>{const S=f();return(0,o.jsx)(m.K,{label:"Tags",name:"tags",path:"metadata.tags",Filter:b.Cu,showCounts:p.showCounts,InputProps:{className:S.input}})}},32494:function(_,P,t){"use strict";t.d(P,{E:function(){return Ot}});var o=t(52322),i=t(44394),d=t(6542),b=t(79692),m=t(94339),f=t(90436),l=t(11776),p=t(12231),S=t(86136),A=t(49378),R=t(9520),E=t(47603),C=t(11640),x=t(2784),B=t(4967),U=t(25942),w=t(77186),$=t(76635),I=t(64279),g=t(88624),K=t(64039),V=t(69294),J=t(38408);function H(){const at=(0,i.h_)(w.$),At=(0,i.h_)(g.A),{filters:X}=(0,U.wp)(),{value:L,loading:Q}=(0,I.default)(async()=>(await at.getBackstageIdentity()).ownershipEntityRefs,[]),{user:et,owners:it,...ut}=X,{["metadata.name"]:Z,...F}=(0,K.wq)((0,$.compact)(Object.values(ut))),[{value:ht,loading:xt},vt]=(0,V.default)(async pt=>{const bt=G(pt.owners,pt.ownershipEntityRefs);if(bt===void 0)return 0;const{totalItems:It}=await At.queryEntities({filter:{...pt.filter,"relations.ownedBy":bt},limit:0});return It},[],{loading:!0});return(0,J.Z)(()=>{Object.keys(F).length!==0&&L!==void 0&&vt({ownershipEntityRefs:L,owners:it,filter:F})},[L,it,F]),{count:ht,loading:Q||xt,filter:(0,x.useMemo)(()=>B.t$.owned(L!=null?L:[]),[L]),ownershipEntityRefs:L}}function G(at,At){if(At===void 0)return;var X;const L=(X=at==null?void 0:at.values)!==null&&X!==void 0?X:[];if(L.length){const Q=(0,$.intersection)(L,At);return Q.length===0?void 0:Q}return At}function z(){const at=(0,i.h_)(g.A),{filters:At}=(0,U.wp)(),X=(0,x.useRef)(),L=(0,x.useMemo)(()=>{const{user:it,...ut}=At,Z=(0,$.compact)(Object.values(ut)),F=(0,K.wq)(Z),ht={filter:F,limit:0};return Object.keys(F).length===0?(X.current=void 0,X.current):(0,$.isEqual)(ht,X.current)?X.current:(X.current=ht,ht)},[At]),{value:Q,loading:et}=(0,I.default)(async()=>{if(L===void 0)return 0;const{totalItems:it}=await at.queryEntities(L);return it},[L]);return{count:Q,loading:et}}var Y=t(74314),ot=t(42870);function ct(){const at=(0,i.h_)(g.A),{filters:At}=(0,U.wp)(),{starredEntities:X}=(0,ot.C)(),L=(0,x.useRef)(),Q=(0,x.useMemo)(()=>{const{user:Z,...F}=At,ht=(0,$.compact)(Object.values(F)),yt={filter:{...(0,K.wq)(ht),["metadata.name"]:Array.from(X).map(pt=>(0,Y.of)(pt).name)},limit:1e3};return(0,$.isEqual)(yt,L.current)?L.current:(L.current=yt,yt)},[At,X]),{value:et,loading:it}=(0,I.default)(async()=>X.size?(await at.queryEntities(Q)).items.map(F=>(0,Y.eE)({kind:F.kind,namespace:F.metadata.namespace,name:F.metadata.name})).filter(F=>X.has(F)).length:0,[Q,X]),ut=(0,x.useMemo)(()=>B.t$.starred(Array.from(X)),[X]);return{count:et,loading:it,filter:ut}}const dt=(0,b.Z)(at=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:at.spacing(1,0,1,0)},title:{margin:at.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:at.palette.text.primary},menuItem:{minHeight:at.spacing(6)},groupWrapper:{margin:at.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function ft(at){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:E.Z},{id:"starred",label:"Starred",icon:C.Z}]},{name:at!=null?at:"Company",items:[{id:"all",label:"All"}]}]}const Ot=at=>{const{initialFilter:At,availableFilters:X}=at,L=dt(),Q=(0,i.h_)(d.D);var et;const it=(et=Q.getOptionalString("organization.name"))!==null&&et!==void 0?et:"Company",{filters:ut,updateFilters:Z,queryParameters:{kind:F,user:ht}}=(0,U.wp)(),xt=["starred","all"],vt=ft(it).map(qt=>({...qt,items:qt.items.filter(({id:Qt})=>["group","user"].some(fe=>fe===F)?xt.includes(Qt):!X||X.includes(Qt))})).filter(({items:qt})=>!!qt.length),{count:yt,loading:pt,filter:bt}=H(),{count:It}=z(),{count:jt,filter:pe,loading:Se}=ct(),Ee=(0,x.useMemo)(()=>[ht].flat()[0],[ht]),[$t,Lt]=(0,x.useState)(Ee!=null?Ee:At),Kt=(0,x.useMemo)(()=>({all:It,starred:jt,owned:yt}),[jt,yt,It]);(0,x.useEffect)(()=>{Ee&&Lt(Ee)},[Ee]);const Yt=pt||Se;return(0,x.useEffect)(()=>{!Yt&&$t&&$t!=="all"&&Kt[$t]===0&&Lt("all")},[Yt,Kt,$t,Lt]),(0,x.useEffect)(()=>{if(!$t||Yt)return;Z({user:(()=>$t==="owned"?bt:$t==="starred"?pe:B.t$.all())()})},[$t,pe,bt,Z,Yt]),(0,o.jsx)(m.Z,{className:L.root,children:vt.map(qt=>(0,o.jsxs)(x.Fragment,{children:[(0,o.jsx)(f.Z,{variant:"subtitle2",component:"span",className:L.title,children:qt.name}),(0,o.jsx)(m.Z,{className:L.groupWrapper,children:(0,o.jsx)(l.Z,{disablePadding:!0,dense:!0,role:"menu","aria-label":qt.name,children:qt.items.map(Qt=>{var fe,je;return(0,o.jsxs)(p.Z,{role:"none presentation",divider:!0,onClick:()=>Lt(Qt.id),selected:Qt.id===((fe=ut.user)===null||fe===void 0?void 0:fe.value),className:L.menuItem,disabled:Kt[Qt.id]===0,"data-testid":`user-picker-${Qt.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[Qt.icon&&(0,o.jsx)(S.Z,{className:L.listIcon,children:(0,o.jsx)(Qt.icon,{fontSize:"small"})}),(0,o.jsx)(A.Z,{children:(0,o.jsxs)(f.Z,{variant:"body1",children:[Qt.label," "]})}),(0,o.jsx)(R.Z,{children:(je=Kt[Qt.id])!==null&&je!==void 0?je:"-"})]},Qt.id)})})})]},qt.name))})}},4967:function(_,P,t){"use strict";t.d(P,{A5:function(){return B},Bf:function(){return f},Cu:function(){return l},IZ:function(){return C},Qe:function(){return R},SZ:function(){return p},mM:function(){return x},rf:function(){return S},t$:function(){return E},zH:function(){return A},zo:function(){return m}});var o=t(87612),i=t(8709),d=t(74314),b=t(75435);class m{getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}constructor(w){(0,o._)(this,"value",void 0),this.value=w}}class f{getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}constructor(w){(0,o._)(this,"value",void 0),this.value=w}}class l{filterEntity(w){return this.values.every($=>{var I;return((I=w.metadata.tags)!==null&&I!==void 0?I:[]).includes($)})}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}constructor(w){(0,o._)(this,"values",void 0),this.values=w}}class p{filterEntity(w){const $=this.toUpperArray(this.value.split(/\s/)),I=this.toUpperArray([w.metadata.tags]),g=this.toUpperArray([w.metadata.name,w.metadata.title]);for(const K of $)if(I.every(V=>V!==K)&&g.every(V=>!V.includes(K)))return!1;return!0}toUpperArray(w){return w.flat().filter($=>Boolean($)).map($=>$.toLocaleUpperCase("en-US"))}constructor(w){(0,o._)(this,"value",void 0),this.value=w}}class S{getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(w){return this.values.some($=>(0,b.h)(w,i.S4).some(I=>(0,d.eE)(I)===$))}toQueryValue(){return this.values}constructor(w){(0,o._)(this,"values",void 0),this.values=w.reduce(($,I)=>{try{return $.push((0,d.eE)((0,d.of)(I,{defaultKind:"Group"}))),$}catch{return $}},[])}}class A{getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(w){return this.values.some($=>{var I;return((I=w.spec)===null||I===void 0?void 0:I.lifecycle)===$})}toQueryValue(){return this.values}constructor(w){(0,o._)(this,"values",void 0),this.values=w}}class R{getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(w){return this.values.some($=>w.metadata.namespace===$)}toQueryValue(){return this.values}constructor(w){(0,o._)(this,"values",void 0),this.values=w}}class E{static owned(w){return new E("owned",w)}static all(){return new E("all")}static starred(w){return new E("starred",w)}getCatalogFilters(){if(this.value==="owned"){var w;return{"relations.ownedBy":(w=this.refs)!==null&&w!==void 0?w:[]}}if(this.value==="starred"){var $,I;return{"metadata.name":(I=($=this.refs)===null||$===void 0?void 0:$.map(g=>(0,d.of)(g).name))!==null&&I!==void 0?I:[]}}return{}}filterEntity(w){if(this.value==="starred"){var $,I;return(I=($=this.refs)===null||$===void 0?void 0:$.includes((0,d.eE)(w)))!==null&&I!==void 0?I:!0}if(this.value==="owned"){var g;const V=(0,b.h)(w,i.S4);var K;return(K=(g=this.refs)===null||g===void 0?void 0:g.some(J=>V.some(H=>(0,d.eE)(H)===J)))!==null&&K!==void 0?K:!1}return!0}toQueryValue(){return this.value}constructor(w,$){(0,o._)(this,"value",void 0),(0,o._)(this,"refs",void 0),this.value=w,this.refs=$}}class C{filterEntity(w){switch(this.value){case"owned":return this.isOwnedEntity(w);case"starred":return this.isStarredEntity(w);default:return!0}}toQueryValue(){return this.value}constructor(w,$,I){(0,o._)(this,"value",void 0),(0,o._)(this,"isOwnedEntity",void 0),(0,o._)(this,"isStarredEntity",void 0),this.value=w,this.isOwnedEntity=$,this.isStarredEntity=I}}class x{getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(w){var $;const I=($=w.metadata.annotations)===null||$===void 0?void 0:$["backstage.io/orphan"];return I!==void 0&&this.value.toString()===I}constructor(w){(0,o._)(this,"value",void 0),this.value=w}}class B{filterEntity(w){var $,I;const g=(w==null||(I=w.status)===null||I===void 0||($=I.items)===null||$===void 0?void 0:$.length)>0;return g!==void 0&&this.value===g}constructor(w){(0,o._)(this,"value",void 0),this.value=w}}},25942:function(_,P,t){"use strict";t.d(P,{UO:function(){return B},wp:function(){return U}});var o=t(52322),i=t(76635),d=t.n(i),b=t(19126),m=t.n(b),f=t(2784),l=t(73557),p=t(69294),S=t(48760),A=t(90736),R=t(88624),E=t(64039),C=t(44394);const x=(0,f.createContext)(void 0),B=w=>{const $=(0,A.default)(),I=(0,C.h_)(R.A),[g,K]=(0,f.useState)({}),V=(0,l.TH)(),J=(0,f.useMemo)(()=>{var ft;return(ft=m().parse(V.search,{ignoreQueryPrefix:!0}).filters)!==null&&ft!==void 0?ft:{}},[V]),[H,G]=(0,f.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:z,error:Y},ot]=(0,p.default)(async()=>{const ft=(0,i.compact)(Object.values(g)),Ot=(0,E.Gz)(ft),at=(0,E.Oq)(ft),At=(0,E.Oq)((0,i.compact)(Object.values(H.appliedFilters))),X=Object.keys(g).reduce((Q,et)=>{const it=g[et];return it!=null&&it.toQueryValue&&(Q[et]=it.toQueryValue()),Q},{});if((0,i.isEqual)(At,at))G({appliedFilters:g,backendEntities:H.backendEntities,entities:H.backendEntities.filter(Ot)});else{const Q=await I.getEntities({filter:at});G({appliedFilters:g,backendEntities:Q.items,entities:Q.items.filter(Ot)})}if($()){var L;const Q=m().parse(V.search,{ignoreQueryPrefix:!0}),et=m().stringify({...Q,filters:X},{addQueryPrefix:!0,arrayFormat:"repeat"}),it=`${window.location.pathname}${et}`;(L=window.history)===null||L===void 0||L.replaceState(null,document.title,it)}},[I,J,g,H],{loading:!0});(0,S.Z)(ot,10,[g]);const ct=(0,f.useCallback)(ft=>{K(Ot=>{const at=typeof ft=="function"?ft(Ot):ft;return{...Ot,...at}})},[]),dt=(0,f.useMemo)(()=>({filters:H.appliedFilters,entities:H.entities,backendEntities:H.backendEntities,updateFilters:ct,queryParameters:J,loading:z,error:Y}),[H,ct,J,z,Y]);return(0,o.jsx)(x.Provider,{value:dt,children:w.children})};function U(){const w=(0,f.useContext)(x);if(!w)throw new Error("useEntityList must be used within EntityListProvider");return w}},42870:function(_,P,t){"use strict";t.d(P,{C:function(){return l}});var o=t(74314),i=t(44394),d=t(2784),b=t(72164),m=t(36802);function f(p){return typeof p=="string"?p:(0,o.eE)(p)}function l(){const p=(0,i.h_)(m.p),S=(0,b.Z)((0,d.useMemo)(()=>p.starredEntitie$(),[p]),new Set),A=(0,d.useCallback)(E=>S.has(f(E)),[S]),R=(0,d.useCallback)(E=>p.toggleStarred(f(E)).then(),[p]);return{starredEntities:S,toggleStarredEntity:R,isStarredEntity:A}}},36434:function(_,P,t){"use strict";t.d(P,{w:function(){return d}});var o=t(30283),i=t(96087);const d=(0,i.u)("catalog:entity-route-ref",()=>(0,o.N)({id:"catalog:entity",params:["namespace","kind","name"]}));function b(m){var f,l;return{kind:m.kind.toLocaleLowerCase("en-US"),namespace:(l=(f=m.metadata.namespace)===null||f===void 0?void 0:f.toLocaleLowerCase("en-US"))!==null&&l!==void 0?l:DEFAULT_NAMESPACE,name:m.metadata.name}}},64039:function(_,P,t){"use strict";t.d(P,{Gz:function(){return b},Oq:function(){return d},wq:function(){return i}});var o=t(4967);function i(m){return m.reduce((f,l)=>({...f,...l.getCatalogFilters?l.getCatalogFilters():{}}),{})}function d(m){const f={};return m.forEach(l=>{var p;l instanceof o.Cu||l instanceof o.rf||l instanceof o.zH||l instanceof o.Qe||l instanceof o.t$||l instanceof o.mM||l instanceof o.SZ||l instanceof o.IZ||Object.assign(f,((p=l.getCatalogFilters)===null||p===void 0?void 0:p.call(l))||{})}),f}function b(m){return f=>m.every(l=>!l.filterEntity||l.filterEntity(f))}},75435:function(_,P,t){"use strict";t.d(P,{h:function(){return i}});var o=t(74314);function i(d,b,m){var f;let l=(d==null||(f=d.relations)===null||f===void 0?void 0:f.filter(p=>p.type===b).map(p=>(0,o.of)(p.targetRef)))||[];return m!=null&&m.kind&&(l=l.filter(p=>p.kind.toLocaleLowerCase("en-US")===m.kind.toLocaleLowerCase("en-US"))),l}},65524:function(_,P,t){"use strict";t.d(P,{yw:function(){return p},ql:function(){return A},_Z:function(){return R},jU:function(){return S}});var o=t(87612),i=t(92918);let d=i.K,b=d;class m{toString(){return`routeRef{type=external,id=${this.id}}`}constructor(C,x,B){(0,o._)(this,"id",void 0),(0,o._)(this,"params",void 0),(0,o._)(this,"optional",void 0),(0,o._)(this,b,void 0),this.id=C,this.params=x,this.optional=B,this[d]="external"}}function f(E){var C;return new m(E.id,(C=E.params)!==null&&C!==void 0?C:[],Boolean(E.optional))}var l=t(30283);const p=f({id:"create-component",optional:!0}),S=f({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),A=f({id:"create-from-template",optional:!0,params:["namespace","templateName"]}),R=(0,l.N)({id:"catalog"})},76079:function(_,P,t){"use strict";t.d(P,{F:function(){return m}});var o=t(52322),i=t(2784),d=t(79692);const b=(0,d.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),m=f=>{const{text:l,preTag:p,postTag:S}=f,A=b(),R=(0,i.useMemo)(()=>l.split(new RegExp(`(${p}.+?${S})`)),[S,p,l]);return(0,o.jsx)(o.Fragment,{children:R.map((E,C)=>E.includes(p)?(0,o.jsx)("mark",{className:A.highlight,children:E.replace(new RegExp(`${p}|${S}`,"g"),"")},C):E)})}},53945:function(_,P,t){"use strict";t.d(P,{E5:function(){return S}});var o=t(52322),i=t(2784),d=t(62369),b=t(82963),m=t(38402);const f="search.results.list.items.extensions.v1",l=(E,C)=>{for(const x of E){if(!isValidElement(x))continue;const B=getComponentData(x,f);if(B!=null&&B(C))return cloneElement(x,{rank:C.rank,highlight:C.highlight,result:C.document,...x.props})}return null},p=E=>{const{rank:C,result:x,noTrack:B,children:U,alignItems:w="flex-start",...$}=E,I=(0,d.z)(),g=(0,i.useCallback)(()=>{B||x&&I.captureEvent("discover",x.title,{attributes:{to:x.location},value:C})},[C,x,B,I]);return(0,o.jsx)(m.Z,{divider:!0,alignItems:w,onClickCapture:g,...$,children:U})},S=E=>{const{name:C,component:x,predicate:B=()=>!0}=E;return(0,b.YO)({name:C,component:{lazy:()=>x().then(U=>w=>(0,o.jsx)(p,{rank:w.rank,result:w.result,noTrack:w.noTrack,children:(0,i.createElement)(U,w)}))},data:{[f]:B}})},A=E=>{const C=useElementFilter(E,x=>x.selectByComponentData({key:f}).getElements(),[E]);return useCallback((x,B)=>{const U=l(C,x);return _jsx(Fragment,{children:U!=null?U:_jsx(p,{rank:x.rank,result:x.document,children:_jsx(DefaultResultListItem,{rank:x.rank,highlight:x.highlight,result:x.document})})},B)},[C])},R=E=>{const{results:C,children:x,...B}=E,U=A(x);return _jsx(List,{...B,children:C.map(U)})}},2296:function(_,P,t){"use strict";t.d(P,{$L:function(){return B},DR:function(){return S},KY:function(){return R},Zz:function(){return p},jM:function(){return l}});var o=t(52322),i=t(2784),d=t(73557),b=t(62584),m=t(82963),f=t(2532);const l="techdocs.addons.addon.v1",p="techdocs.addons.wrapper.v1",S=()=>null;(0,b.R)(S,p,!0);const A=U=>`${l}.${U.toLocaleLowerCase("en-US")}`;function R(U){const{name:w,component:$}=U;return(0,m.YO)({name:w,component:{sync:I=>(0,o.jsx)($,{...I})},data:{[l]:U,[A(w)]:!0}})}const E=(U,w)=>U.selectByComponentData({key:w}).getElements()[0],C=U=>U.selectByComponentData({key:p}).selectByComponentData({key:l}),x=U=>U.selectByComponentData({key:p}).findComponentData({key:l}),B=()=>{const U=(0,d.pC)(),w=(0,f.v)(U,C),$=(0,f.v)(U,x),I=(0,i.useCallback)(V=>{if(!w||!V)return null;const J=A(V.name);var H;return(H=E(w,J))!==null&&H!==void 0?H:null},[w]),g=(0,i.useCallback)(V=>{const J=$.find(H=>H.name===V);return J?I(J):null},[$,I]),K=(0,i.useCallback)(V=>{const J=$.filter(H=>H.location===V);return J.length?J.map(I):null},[$,I]);return{renderComponentByName:g,renderComponentsByLocation:K}}},58496:function(_,P,t){"use strict";t.d(P,{D:function(){return d},g:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"plugin.techdocs.service"}),d=(0,o.T)({id:"plugin.techdocs.storageservice"})},68979:function(_,P,t){"use strict";t.d(P,{Z:function(){return U},x:function(){return w}});var o=t(52322),i=t(2784),d=t(64279),b=t(77446),m=t(74314),f=t(29651),l=t(68993),p=t(44394),S=t(6542),A=t(72388),R=t(58496);function E($,I){return I.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||($.kind=$.kind.toLocaleLowerCase(),$.name=$.name.toLocaleLowerCase(),$.namespace=$.namespace.toLocaleLowerCase()),$}const C=($,I)=>(0,m.eE)($)===(0,m.eE)(I),x={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},B=(0,f.CT)("techdocs-reader-page-context"),U=(0,i.memo)($=>{const{entityRef:I,children:g}=$,K=(0,p.h_)(R.g),V=(0,p.h_)(S.D),J=(0,d.default)(async()=>K.getEntityMetadata(I),[I]),H=(0,b.Z)(async()=>K.getTechDocsMetadata(I),[I]),[G,z]=(0,i.useState)(x.title),[Y,ot]=(0,i.useState)(x.subtitle),[ct,dt]=(0,i.useState)(x.shadowRoot);(0,i.useEffect)(()=>{ct&&!H.value&&!H.loading&&H.retry()},[H.value,H.loading,ct,H.retry,H]);const ft={metadata:H,entityRef:E(I,V),entityMetadata:J,shadowRoot:ct,setShadowRoot:dt,title:G,setTitle:z,subtitle:Y,setSubtitle:ot},Ot=(0,l.E)({1:ft});return(0,o.jsx)(A.fC,{attributes:{entityRef:(0,m.eE)(I)},children:(0,o.jsx)(B.Provider,{value:Ot,children:g instanceof Function?g(ft):g})})},($,I)=>C($.entityRef,I.entityRef)),w=()=>{const $=(0,i.useContext)(B);if($===void 0)return x;const I=$.atVersion(1);if(I===void 0)throw new Error("No context found for version 1.");return I}},57058:function(_,P,t){"use strict";t.d(P,{o:function(){return o}});const o=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},51953:function(_,P,t){"use strict";t.d(P,{D:function(){return o}});function o(i,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?i:i.toLocaleLowerCase("en-US")}},29895:function(_,P,t){"use strict";t.d(P,{u:function(){return H}});var o=t(52322),i=t(2784),d=t(42398),b=t(30706),m=t(13788),f=t(25942),l=t(30389),p=t(32494),S=t(63833),A=t(97894),R=t(42081),E=t(88797);class C{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":E.n}}}const x=()=>{const{updateFilters:G}=(0,f.wp)();return(0,i.useEffect)(()=>{G({techdocs:new C})},[G]),null};var B=t(95074),U=t(76635),w=t(538),$=t(9791),I=t(42870),g=t(16787),K=t(45342),V=t(49079);const J=G=>{var z;const{columns:Y,actions:ot,options:ct}=G,{loading:dt,error:ft,entities:Ot,filters:at}=(0,f.wp)(),{isStarredEntity:At,toggleStarredEntity:X}=(0,I.C)(),[,L]=(0,B.Z)();var Q;const et=(0,U.capitalize)((Q=(z=at.user)===null||z===void 0?void 0:z.value)!==null&&Q!==void 0?Q:"all"),it=[K.n.createCopyDocsUrlAction(L),K.n.createStarEntityAction(At,X)];return ft?(0,o.jsx)(w.G,{severity:"error",title:"Could not load available documentation.",children:(0,o.jsx)($.O,{language:"text",text:ft.toString()})}):(0,o.jsx)(g.H,{title:et,entities:Ot,loading:dt,actions:ot||it,columns:Y,options:ct})};J.columns=V.N,J.actions=K.n;const H=G=>{const{initialFilter:z="owned",columns:Y,actions:ot}=G;return(0,o.jsx)(R.j,{children:(0,o.jsxs)(d.V,{children:[(0,o.jsx)(b.y,{title:"",children:(0,o.jsx)(m.q,{children:"Discover documentation in your ecosystem."})}),(0,o.jsx)(f.UO,{children:(0,o.jsxs)(l._i,{children:[(0,o.jsxs)(l._i.Filters,{children:[(0,o.jsx)(x,{}),(0,o.jsx)(p.E,{initialFilter:z}),(0,o.jsx)(S.d,{}),(0,o.jsx)(A.x,{})]}),(0,o.jsx)(l._i.Content,{children:(0,o.jsx)(J,{actions:ot,columns:Y})})]})})]})})}},16787:function(_,P,t){"use strict";t.d(P,{H:function(){return w}});var o=t(52322),i=t(2784),d=t(95074),b=t(37321),m=t(44394),f=t(6542),l=t(8709),p=t(75435),S=t(86540),A=t(95573),R=t(84462),E=t(70249),C=t(15929),x=t(45342),B=t(49079),U=t(51953);const w=$=>{const{entities:I,title:g,loading:K,columns:V,actions:J,options:H}=$,[,G]=(0,d.Z)(),z=(0,b.t)(A.Fw),Y=(0,m.h_)(f.D);if(!I)return null;const ot=I.map(at=>{const At=(0,p.h)(at,l.S4);var X;return{entity:at,resolved:{docsUrl:z({namespace:(0,U.D)((X=at.metadata.namespace)!==null&&X!==void 0?X:"default",Y),kind:(0,U.D)(at.kind,Y),name:(0,U.D)(at.metadata.name,Y)}),ownedByRelations:At,ownedByRelationsTitle:At.map(L=>(0,S.$)(L,{defaultKind:"group"})).join(", ")}}}),ct=[B.N.createNameColumn(),B.N.createOwnerColumn(),B.N.createKindColumn(),B.N.createTypeColumn()],dt=[x.n.createCopyDocsUrlAction(G)],ft=20,Ot=ot&&ot.length>ft;return(0,o.jsx)(o.Fragment,{children:K||ot&&ot.length>0?(0,o.jsx)(R.i,{isLoading:K,options:{paging:Ot,pageSize:ft,search:!0,actionsColumnIndex:-1,...H},data:ot,columns:V||ct,actions:J||dt,title:g?`${g} (${ot.length})`:`All (${ot.length})`}):(0,o.jsx)(E.u,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,o.jsx)(C.Q,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};w.columns=B.N,w.actions=x.n},45342:function(_,P,t){"use strict";t.d(P,{n:function(){return p}});var o=t(52322),i=t(2784),d=t(39981),b=t(2337),m=t(11640),f=t(28347);const l=(0,b.Z)({root:{color:"#f3ba37"}})(m.Z),p={createCopyDocsUrlAction(S){return A=>({icon:()=>(0,o.jsx)(d.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>S(`${window.location.origin}${A.resolved.docsUrl}`)})},createStarEntityAction(S,A){return R=>{const E=R.entity,C=S(E);return{cellStyle:{paddingLeft:"1em"},icon:()=>C?(0,o.jsx)(l,{}):(0,o.jsx)(f.Z,{}),tooltip:C?"Remove from favorites":"Add to favorites",onClick:()=>A(E)}}}}},49079:function(_,P,t){"use strict";t.d(P,{N:function(){return A}});var o=t(52322),i=t(2784),d=t(62774),b=t(79692);const m=(0,b.Z)(R=>({value:{marginBottom:R.spacing(.75)},subvalue:{color:R.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function f(R){const{value:E,subvalue:C}=R,x=m();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Z,{className:x.value,children:E}),(0,o.jsx)(d.Z,{className:x.subvalue,children:C})]})}var l=t(98864),p=t(51194);function S(R){return R.metadata.title||R.metadata.name}const A={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:R=>(0,o.jsx)(f,{value:(0,o.jsx)(l.rU,{to:R.resolved.docsUrl,children:S(R.entity)}),subvalue:R.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:R})=>(0,o.jsx)(p.r,{entityRefs:R.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},42081:function(_,P,t){"use strict";t.d(P,{j:function(){return f}});var o=t(52322),i=t(2784),d=t(32166),b=t(44394),m=t(6542);const f=l=>{const{children:p}=l,S=(0,b.h_)(m.D);var A;const R=`Documentation available in ${(A=S.getOptionalString("organization.name"))!==null&&A!==void 0?A:"Backstage"}`;return(0,o.jsx)(d.g,{title:"Documentation",subtitle:R,themeId:"documentation",children:p})}},4577:function(_,P,t){"use strict";t.d(P,{Jl:function(){return Ot},I6:function(){return at},s4:function(){return ot}});var o=t(58496),i=t(87612),d=t(41385),b=t(48998),m=t(30474);class f extends Error{constructor(L,Q){var et,it;let ut=L;if(Q!==void 0){const Z=(0,b.n)(Q);ut?ut+=`; caused by ${Z}`:ut=`caused by ${Z}`}super(ut),(0,i._)(this,"cause",void 0),(et=(it=Error).captureStackTrace)===null||et===void 0||et.call(it,this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,m.V)(Q)?Q:void 0}}class l extends null{constructor(...L){super(...L),_define_property(this,"name","InputError")}}class p extends null{constructor(...L){super(...L),_define_property(this,"name","AuthenticationError")}}class S extends null{constructor(...L){super(...L),_define_property(this,"name","NotAllowedError")}}class A extends f{constructor(...L){super(...L),(0,i._)(this,"name","NotFoundError")}}class R extends null{constructor(...L){super(...L),_define_property(this,"name","ConflictError")}}class E extends null{constructor(...L){super(...L),_define_property(this,"name","NotModifiedError")}}class C extends null{constructor(...L){super(...L),_define_property(this,"name","NotImplementedError")}}class x extends null{}class B extends null{constructor(L,Q){super(L,Q),this.name=isError(Q)?Q.name:"Error"}}var U=t(54847);class w{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(L){const{kind:Q,namespace:et,name:it}=L,Z=`${await this.getApiOrigin()}/metadata/techdocs/${et}/${Q}/${it}`,F=await this.fetchApi.fetch(`${Z}`);if(!F.ok)throw await d.V.fromResponse(F);return await F.json()}async getEntityMetadata(L){const{kind:Q,namespace:et,name:it}=L,Z=`${await this.getApiOrigin()}/metadata/entity/${et}/${Q}/${it}`,F=await this.fetchApi.fetch(`${Z}`);if(!F.ok)throw await d.V.fromResponse(F);return await F.json()}constructor(L){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=L.configApi,this.discoveryApi=L.discoveryApi,this.fetchApi=L.fetchApi}}class ${async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var L;return(L=this.configApi.getOptionalString("techdocs.storageUrl"))!==null&&L!==void 0?L:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(L,Q){const{kind:et,namespace:it,name:ut}=L,F=`${await this.getStorageUrl()}/${it}/${et}/${ut}/${Q}`,ht=await this.fetchApi.fetch(`${F.endsWith("/")?F:`${F}/`}index.html`);let xt="";switch(ht.status){case 404:throw xt="Page not found. ",Q||(xt+="This could be because there is no index.md file in the root of the docs directory of this repository."),new A(xt);case 500:throw xt="Could not generate documentation or an error in the TechDocs backend. ",new Error(xt);default:break}return ht.text()}async syncEntityDocs(L,Q=()=>{}){const{kind:et,namespace:it,name:ut}=L,F=`${await this.getApiOrigin()}/sync/${it}/${et}/${ut}`,{token:ht}=await this.identityApi.getCredentials();return new Promise((xt,vt)=>{const yt=new U.EventSourcePolyfill(F,{withCredentials:!0,headers:ht?{Authorization:`Bearer ${ht}`}:{}});yt.addEventListener("log",pt=>{pt.data&&Q(JSON.parse(pt.data))}),yt.addEventListener("finish",pt=>{let bt=!1;pt.data&&({updated:bt}=JSON.parse(pt.data)),xt(bt?"updated":"cached")}),yt.onerror=pt=>{switch(yt.close(),pt.status){case 404:vt(new A(pt.message));return;default:vt(new Error(pt.data));return}}})}async getBaseUrl(L,Q,et){const{kind:it,namespace:ut,name:Z}=Q,ht=`${await this.getApiOrigin()}/static/docs/${ut}/${it}/${Z}/${et}`;return new URL(L,ht.endsWith("/")?ht:`${ht}/`).toString()}constructor(L){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"identityApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=L.configApi,this.discoveryApi=L.discoveryApi,this.identityApi=L.identityApi,this.fetchApi=L.fetchApi}}var I=t(95573),g=t(15006),K=t(42380),V=t(6542),J=t(96727),H=t(77186),G=t(85094),z=t(82963),Y=t(53945);const ot=(0,g.r)({id:"techdocs",apis:[(0,K.n)({api:o.D,deps:{configApi:V.D,discoveryApi:J.N,identityApi:H.$,fetchApi:G.g},factory:({configApi:X,discoveryApi:L,identityApi:Q,fetchApi:et})=>new $({configApi:X,discoveryApi:L,identityApi:Q,fetchApi:et})}),(0,K.n)({api:o.g,deps:{configApi:V.D,discoveryApi:J.N,fetchApi:G.g},factory:({configApi:X,discoveryApi:L,fetchApi:Q})=>new w({configApi:X,discoveryApi:L,fetchApi:Q})})],routes:{root:I._Z,docRoot:I.Fw,entityContent:I.pd}}),ct=ot.provide((0,z.P4)({name:"TechdocsPage",component:()=>t.e(8096).then(t.bind(t,8096)).then(X=>X.Router),mountPoint:I._Z})),dt=ot.provide((0,z.P4)({name:"EntityTechdocsContent",component:()=>t.e(8096).then(t.bind(t,8096)).then(X=>X.EmbeddedDocsRouter),mountPoint:I.pd})),ft=ot.provide((0,z.P4)({name:"TechDocsCustomHome",component:()=>t.e(4109).then(t.bind(t,44109)).then(X=>X.TechDocsCustomHome),mountPoint:I._Z})),Ot=ot.provide((0,z.P4)({name:"TechDocsIndexPage",component:()=>t.e(8662).then(t.bind(t,18662)).then(X=>X.TechDocsIndexPage),mountPoint:I._Z})),at=ot.provide((0,z.P4)({name:"TechDocsReaderPage",component:()=>t.e(5914).then(t.bind(t,35914)).then(X=>X.TechDocsReaderPage),mountPoint:I.Fw})),At=ot.provide((0,Y.E5)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,55511)).then(X=>X.TechDocsSearchResultListItem),predicate:X=>X.type==="techdocs"}))},14540:function(_,P,t){"use strict";t.d(P,{F:function(){return No}});var o=t(52322),i=t(2784),d=t(79692),b=t(60905),m=t(68979),f=t(70882),l=t(50236),p=t(19219),S=t(55015);const A="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",R=h=>{(0,i.useEffect)(()=>{if(!h)return()=>{};const O=h.querySelectorAll('head > link[rel="stylesheet"]');var j;let k=(j=O==null?void 0:O.length)!==null&&j!==void 0?j:0;const q=new CustomEvent(A);if(!k)return h.dispatchEvent(q),()=>{};const nt=()=>{--k===0&&h.dispatchEvent(q)};return O==null||O.forEach(lt=>{lt.addEventListener("load",nt)}),()=>{O==null||O.forEach(lt=>{lt.removeEventListener("load",nt)})}},[h])},E=h=>{const[O,j]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(!h)return()=>{};j(!0);const k=h.style;k.setProperty("opacity","0");const q=()=>{j(!1),k.setProperty("opacity","1")};return h.addEventListener(A,q),()=>{h.removeEventListener(A,q)}},[h]),O},C=h=>{const{element:O,onAppend:j,children:k}=h,[q,nt]=(0,i.useState)((0,f.Ue)({...(0,l.Z)(),insertionPoint:void 0}));R(O);const lt=E(O),Ct=(0,i.useCallback)(Tt=>{if(!O||!Tt)return;nt((0,f.Ue)({...(0,l.Z)(),insertionPoint:O.querySelector("head")||void 0}));let Ut=Tt.shadowRoot;Ut||(Ut=Tt.attachShadow({mode:"open"})),Ut.replaceChildren(O),typeof j=="function"&&j(Ut)},[O,j]);return(0,o.jsxs)(o.Fragment,{children:[lt&&(0,o.jsx)(S.E,{}),(0,o.jsxs)(p.ZP,{jss:q,sheetsManager:new Map,children:[(0,o.jsx)("div",{ref:Ct,"data-testid":"techdocs-native-shadowroot"}),k]})]})};var x=t(54073);const B=()=>{const{shadowRoot:h}=(0,m.x)();return h},U=h=>{const O=B();return O?h.map(j=>O==null?void 0:O.querySelectorAll(j)).filter(j=>j.length).map(j=>Array.from(j)).flat():[]},w=h=>h.toString()&&h.rangeCount&&h.getRangeAt(0).getBoundingClientRect().top,$=(h=0)=>{const O=B(),[j,k]=useState(null),q=useMemo(()=>debounce(()=>{const nt=O,lt=nt.getSelection?nt.getSelection():document.getSelection();lt&&w(lt)?k(lt):k(null)},h),[O,k,h]);return useEffect(()=>(window.document.addEventListener("selectionchange",q),()=>{q.cancel(),window.document.removeEventListener("selectionchange",q)}),[q]),j};var I=t(87435),g=t(42398),K=t(76635),V=t(64279),J=t(1849),H=t(29651),G=t(68993),z=t(44394),Y=t(62369),ot=t(72388),ct=t(6542),dt=t(95965);const ft=(0,dt.T)({id:"plugin.search.queryservice"});class Ot{query(){return Promise.resolve(this.mockedResults||{results:[]})}constructor(O){_define_property(this,"mockedResults",void 0),this.mockedResults=O}}const at=(0,H.CT)("search-context"),At=()=>{const h=(0,i.useContext)(at);if(!h)throw new Error("useSearch must be used within a SearchContextProvider");const O=h.atVersion(1);if(!O)throw new Error("No SearchContext v1 found");return O},X=()=>(0,i.useContext)(at)!==void 0,L={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},Q=(h=L)=>{var O,j,k,q;const nt=(0,z.h_)(ft),lt=(0,Y.z)(),[Ct,Tt]=(0,i.useState)(h.term),[Ut,Gt]=(0,i.useState)(h.types),[Ft,wt]=(0,i.useState)(h.filters),[ie,me]=(0,i.useState)(h.pageLimit),[Vt,Mt]=(0,i.useState)(h.pageCursor),ee=(0,J.Z)(Ct),ye=(0,J.Z)(Ft),Dt=(0,V.default)(async()=>{const ae=await nt.query({term:Ct,types:Ut,filters:Ft,pageLimit:ie,pageCursor:Vt});return Ct&&ae.numberOfResults!==void 0&<.captureEvent("search",Ct,{value:ae.numberOfResults}),ae},[Ct,Ut,Ft,ie,Vt]),kt=!Dt.loading&&!Dt.error&&((O=Dt.value)===null||O===void 0?void 0:O.nextPageCursor),Jt=!Dt.loading&&!Dt.error&&((j=Dt.value)===null||j===void 0?void 0:j.previousPageCursor),Ce=(0,i.useCallback)(()=>{var ae;Mt((ae=Dt.value)===null||ae===void 0?void 0:ae.nextPageCursor)},[(k=Dt.value)===null||k===void 0?void 0:k.nextPageCursor]),Re=(0,i.useCallback)(()=>{var ae;Mt((ae=Dt.value)===null||ae===void 0?void 0:ae.previousPageCursor)},[(q=Dt.value)===null||q===void 0?void 0:q.previousPageCursor]);return(0,i.useEffect)(()=>{ee!==void 0&&Ct!==ee&&Mt(void 0)},[Ct,ee,Mt]),(0,i.useEffect)(()=>{ye!==void 0&&!(0,K.isEqual)(Ft,ye)&&Mt(void 0)},[Ft,ye,Mt]),{result:Dt,term:Ct,setTerm:Tt,types:Ut,setTypes:Gt,filters:Ft,setFilters:wt,pageLimit:ie,setPageLimit:me,pageCursor:Vt,setPageCursor:Mt,fetchNextPage:kt?Ce:void 0,fetchPreviousPage:Jt?Re:void 0}},et=h=>{const{initialState:O,children:j}=h,k=Q(O);return(0,o.jsx)(ot.fC,{attributes:{searchTypes:k.types.sort().join(",")},children:(0,o.jsx)(at.Provider,{value:(0,G.E)({1:k}),children:j})})},it=h=>{const{initialState:O,inheritParentContextIfAvailable:j,children:k}=h,q=X(),nt=(0,z.h_)(ct.D),lt=O!=null?O:{},Ct=nt.has("search.query.pageLimit")?{pageLimit:nt.getNumber("search.query.pageLimit")}:{},Tt={...L,...lt,...Ct};return q&&j?(0,o.jsx)(o.Fragment,{children:k}):(0,o.jsx)(et,{initialState:Tt,children:k})};var ut=t(4614),Z=t(88013),F=t(50581),ht=t(61837),xt=t(86619),vt=t(77277),yt=t(21853),pt=t(48760);function bt(h){return(0,i.forwardRef)((O,j)=>(0,o.jsx)(it,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(h,{...O,ref:j})}))}const It=bt((0,i.forwardRef)((h,O)=>{const{onChange:j,onKeyDown:k=()=>{},onClear:q=()=>{},onSubmit:nt=()=>{},debounceTime:lt=200,clearButton:Ct=!0,fullWidth:Tt=!0,value:Ut,label:Gt,placeholder:Ft,inputProps:wt={},InputProps:ie={},endAdornment:me,...Vt}=h,Mt=(0,z.h_)(ct.D),[ee,ye]=(0,i.useState)(""),Dt=(0,i.useRef)("");(0,i.useEffect)(()=>{ye(ue=>ue===Dt.current?String(Ut):ue)},[Ut,Dt]),(0,pt.Z)(()=>{Dt.current=ee,j(ee)},lt,[ee]);const kt=(0,i.useCallback)(ue=>{ye(ue.target.value)},[ye]),Jt=(0,i.useCallback)(ue=>{k&&k(ue),nt&&ue.key==="Enter"&&nt()},[k,nt]),Ce=(0,i.useCallback)(()=>{Dt.current="",j(""),ye(""),q&&q()},[j,q]),Re=Gt?void 0:"Search",Ue=Ft!=null?Ft:`Search in ${Mt.getOptionalString("app.title")||"Backstage"}`,ae=(0,o.jsx)(F.Z,{position:"start",children:(0,o.jsx)(ht.Z,{"aria-label":"Query",size:"small",disabled:!0,children:(0,o.jsx)(yt.Z,{})})}),We=(0,o.jsx)(F.Z,{position:"end",children:(0,o.jsx)(vt.Z,{"aria-label":"Clear",size:"small",onClick:Ce,onKeyDown:ue=>{ue.key==="Enter"&&ue.stopPropagation()},children:"Clear"})});return(0,o.jsx)(xt.Z,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:O,value:ee,label:Gt,placeholder:Ue,InputProps:{startAdornment:ae,endAdornment:Ct?We:me,...ie},inputProps:{"aria-label":Re,...wt},fullWidth:Tt,onChange:kt,onKeyDown:Jt,...Vt})})),jt=bt((0,i.forwardRef)((h,O)=>{const{value:j="",onChange:k,...q}=h,{term:nt,setTerm:lt}=At();(0,i.useEffect)(()=>{j&<(String(j))},[j,lt]);const Ct=(0,i.useCallback)(Tt=>{k?k(Tt):lt(Tt)},[k,lt]);return(0,o.jsx)(ot.fC,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,o.jsx)(It,{...q,ref:O,value:nt,onChange:Ct})})})),pe=(0,d.Z)(h=>({loading:{right:h.spacing(1),position:"absolute"}})),Se=h=>O=>(0,o.jsx)(it,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(h,{...O})}),Ee=()=>{const h=pe();return(0,o.jsx)(ut.Z,{className:h.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},$t=Se(function(O){const{loading:j,value:k,onChange:q=()=>{},options:nt=[],getOptionLabel:lt=Dt=>String(Dt),inputPlaceholder:Ct,inputDebounceTime:Tt,freeSolo:Ut=!0,fullWidth:Gt=!0,clearOnBlur:Ft=!1,"data-testid":wt="search-autocomplete",...ie}=O,{setTerm:me}=At(),Vt=(0,i.useCallback)(Dt=>Dt?typeof Dt=="string"?Dt:lt(Dt):"",[lt]),Mt=(0,i.useMemo)(()=>Vt(k),[k,Vt]),ee=(0,i.useCallback)((Dt,kt,Jt,Ce)=>{me(Vt(kt)),q(Dt,kt,Jt,Ce)},[Vt,me,q]),ye=(0,i.useCallback)(({InputProps:{ref:Dt,className:kt,endAdornment:Jt},InputLabelProps:Ce,...Re})=>(0,o.jsx)(jt,{...Re,ref:Dt,clearButton:!1,value:Mt,placeholder:Ct,debounceTime:Tt,endAdornment:j?(0,o.jsx)(Ee,{}):Jt,InputProps:{className:kt}}),[j,Mt,Ct,Tt]);return(0,o.jsx)(Z.ZP,{...ie,"data-testid":wt,value:k,onChange:ee,options:nt,getOptionLabel:lt,renderInput:ye,freeSolo:Ut,fullWidth:Gt,clearOnBlur:Ft})});var Lt=t(73557),Kt=t(55511);const Yt=h=>h==null?void 0:h.document,qt=h=>{const{entityId:O,entityTitle:j,debounceTime:k=150}=h,[q,nt]=(0,i.useState)(!1),lt=(0,Lt.s0)(),{setFilters:Ct,result:{loading:Tt,value:Ut}}=At(),[Gt,Ft]=(0,i.useState)([]);(0,i.useEffect)(()=>{let Mt=!0;if(Mt&&Ut){const ee=Ut.results.slice(0,10);Ft(ee)}return()=>{Mt=!1}},[Tt,Ut]);const{kind:wt,name:ie,namespace:me}=O;(0,i.useEffect)(()=>{Ct(Mt=>({...Mt,kind:wt,namespace:me,name:ie}))},[wt,me,ie,Ct]);const Vt=(Mt,ee)=>{if(Yt(ee)){const{location:ye}=ee.document;lt(ye)}};return(0,o.jsx)($t,{"data-testid":"techdocs-search-bar",size:"small",open:q,getOptionLabel:()=>"",filterOptions:Mt=>Mt,onClose:()=>{nt(!1)},onFocus:()=>{nt(!0)},onChange:Vt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Gt,renderOption:({document:Mt,highlight:ee})=>(0,o.jsx)(Kt.TechDocsSearchResultListItem,{result:Mt,lineClamp:3,asListItem:!1,asLink:!1,title:Mt.title,highlight:ee}),loading:Tt,inputDebounceTime:k,inputPlaceholder:`Search ${j||O.name} docs`,freeSolo:!1})},Qt=h=>{const O={term:"",types:["techdocs"],pageCursor:"",filters:h.entityId};return(0,o.jsx)(it,{initialState:O,children:(0,o.jsx)(qt,{...h})})};var fe=t(99688),je=t(80851);const Ye=(0,i.lazy)(()=>Promise.all([t.e(8629),t.e(6051)]).then(t.bind(t,76051)).then(h=>({default:h.RealLogViewer})));function Ke(h){const{Progress:O}=(0,je.q)().getComponents();return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(O,{}),children:(0,o.jsx)(Ye,{...h})})}var be=t(42494),Qe=t(90436),Je=t(4190),ze=t(87685);const ne=(0,d.Z)(h=>(0,be.Z)({paper:{width:"100%",[h.breakpoints.up("sm")]:{width:"75%"},[h.breakpoints.up("md")]:{width:"50%"},padding:h.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:h.palette.background.default}})),on=({buildLog:h,onClose:O})=>{const j=ne(),k=h.length===0?"Waiting for logs...":h.join(`
|
|
2
|
-
`);return(0,o.jsxs)(b.Z,{container:!0,direction:"column",className:j.root,spacing:0,wrap:"nowrap",children:[(0,o.jsxs)(b.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,o.jsx)(Qe.Z,{variant:"h5",children:"Build Details"}),(0,o.jsx)(ht.Z,{title:"Close the drawer",onClick:O,color:"inherit",children:(0,o.jsx)(ze.Z,{})},"dismiss")]}),(0,o.jsx)(b.Z,{item:!0,xs:!0,children:(0,o.jsx)(Ke,{text:k,classes:{root:j.logs}})})]})},Oe=({buildLog:h})=>{const O=ne(),[j,k]=(0,i.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(vt.Z,{color:"inherit",onClick:()=>k(!0),children:"Show Build Logs"}),(0,o.jsx)(Je.ZP,{classes:{paper:O.paper},anchor:"right",open:j,onClose:()=>k(!1),children:(0,o.jsx)(on,{buildLog:h,onClose:()=>k(!1)})})]})},rn=({errorMessage:h})=>{const O=(0,z.h_)(ct.D).getOptionalString("techdocs.builder"),j=(0,Y.z)(),{entityRef:k}=(0,m.x)(),q=(0,Lt.TH)();(0,i.useEffect)(()=>{const{pathname:lt,search:Ct,hash:Tt}=q;j.captureEvent("not-found",`${lt}${Ct}${Tt}`,{attributes:k})},[j,k,q]);let nt="";return O!=="local"&&(nt="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,o.jsx)(I.m,{status:"404",statusMessage:h||"Documentation not found",additionalInfo:nt})};var Xe=t(77446),re=t(58496);function $e({contentLoading:h,content:O,activeSyncState:j}){return h||j==="BUILD_READY_RELOAD"||!O&&j==="CHECKING"?"CHECKING":!O&&j==="BUILDING"?"INITIAL_BUILD":O?j==="BUILDING"?"CONTENT_STALE_REFRESHING":j==="BUILD_READY"?"CONTENT_STALE_READY":j==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function Be(h,O){const j={...h};switch(O.type){case"sync":O.state==="CHECKING"&&(j.buildLog=[]),j.activeSyncState=O.state,j.syncError=O.syncError;break;case"contentLoading":j.contentLoading=!0,j.contentError=void 0;break;case"content":typeof O.path=="string"&&(j.path=O.path),j.contentLoading=!1,j.content=O.content,j.contentError=O.contentError;break;case"buildLog":j.buildLog=j.buildLog.concat(O.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(j.activeSyncState)&&["contentLoading","content"].includes(O.type)&&(j.activeSyncState="UP_TO_DATE",j.buildLog=[]),j}function _e(h,O,j,k){var q,nt;const[lt,Ct]=(0,i.useReducer)(Be,{activeSyncState:"CHECKING",path:k,contentLoading:!0,buildLog:[]}),Tt=(0,z.h_)(re.D),{retry:Ut}=(0,Xe.Z)(async()=>{Ct({type:"contentLoading"});try{const wt=await Tt.getEntityDocs({kind:h,namespace:O,name:j},k);return Ct({type:"content",content:wt,path:k}),wt}catch(wt){Ct({type:"content",contentError:wt,path:k})}},[Tt,h,O,j,k]),Gt=(0,i.useRef)({content:void 0,reload:()=>{}});return Gt.current={content:lt.content,reload:Ut},(0,V.default)(async()=>{Ct({type:"sync",state:"CHECKING"});const wt=setTimeout(()=>{Ct({type:"sync",state:"BUILDING"})},1e3);try{switch(await Tt.syncEntityDocs({kind:h,namespace:O,name:j},me=>{Ct({type:"buildLog",log:me})})){case"updated":Gt.current.content?Ct({type:"sync",state:"BUILD_READY"}):(Gt.current.reload(),Ct({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":Ct({type:"sync",state:"UP_TO_DATE"});break;default:Ct({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(ie){Ct({type:"sync",state:"ERROR",syncError:ie})}finally{clearTimeout(wt)}},[h,j,O,Tt,Ct,Gt]),{state:(0,i.useMemo)(()=>$e({activeSyncState:lt.activeSyncState,contentLoading:lt.contentLoading,content:lt.content}),[lt.activeSyncState,lt.content,lt.contentLoading]),contentReload:Ut,path:lt.path,content:lt.content,contentErrorMessage:(q=lt.contentError)===null||q===void 0?void 0:q.toString(),syncErrorMessage:(nt=lt.syncError)===null||nt===void 0?void 0:nt.toString(),buildLog:lt.buildLog}}const se=(0,i.createContext)({}),xe=()=>(0,i.useContext)(se),M=h=>{const{children:O}=h,{"*":j=""}=(0,Lt.UO)(),{entityRef:k}=(0,m.x)(),{kind:q,namespace:nt,name:lt}=k,Ct=_e(q,nt,lt,j);return(0,o.jsx)(se.Provider,{value:Ct,children:O instanceof Function?O(Ct):O})},u=h=>O=>(0,o.jsx)(M,{children:(0,o.jsx)(h,{...O})}),T=(0,d.Z)(h=>({root:{marginBottom:h.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),W=()=>{let h=null;const O=T(),{state:j,contentReload:k,contentErrorMessage:q,syncErrorMessage:nt,buildLog:lt}=xe();return j==="INITIAL_BUILD"&&(h=(0,o.jsx)(fe.Z,{classes:{root:O.root},variant:"outlined",severity:"info",icon:(0,o.jsx)(ut.Z,{size:"24px"}),action:(0,o.jsx)(Oe,{buildLog:lt}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),j==="CONTENT_STALE_REFRESHING"&&(h=(0,o.jsx)(fe.Z,{variant:"outlined",severity:"info",icon:(0,o.jsx)(ut.Z,{size:"24px"}),action:(0,o.jsx)(Oe,{buildLog:lt}),classes:{root:O.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),j==="CONTENT_STALE_READY"&&(h=(0,o.jsx)(fe.Z,{variant:"outlined",severity:"success",action:(0,o.jsx)(vt.Z,{color:"inherit",onClick:()=>k(),children:"Refresh"}),classes:{root:O.root},children:"A newer version of this documentation is now available, please refresh to view."})),j==="CONTENT_STALE_ERROR"&&(h=(0,o.jsxs)(fe.Z,{variant:"outlined",severity:"error",action:(0,o.jsx)(Oe,{buildLog:lt}),classes:{root:O.root,message:O.message},children:["Building a newer version of this documentation failed."," ",nt]})),j==="CONTENT_NOT_FOUND"&&(h=(0,o.jsxs)(o.Fragment,{children:[nt&&(0,o.jsxs)(fe.Z,{variant:"outlined",severity:"error",action:(0,o.jsx)(Oe,{buildLog:lt}),classes:{root:O.root,message:O.message},children:["Building a newer version of this documentation failed."," ",nt]}),(0,o.jsx)(rn,{errorMessage:q})]})),h};var rt=t(60364),St=t(41156),Rt=t(91657),oe=t(35368),_t=t.n(oe);const Zt=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Bt=/^https:\/\/fonts\.googleapis\.com/,
|
|
1
|
+
(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{88797:function(_,P,t){"use strict";t.d(P,{n:function(){return o}});const o=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},34106:function(_,P,t){"use strict";t.d(P,{Tf:function(){return d},l2:function(){return i},zG:function(){return o}});const o="default",i="backstage.io/view-url",d="backstage.io/edit-url",b="kubernetes.io/api-server",m="kubernetes.io/api-server-certificate-authority",f="kubernetes.io/auth-provider"},74314:function(_,P,t){"use strict";t.d(P,{eE:function(){return m},iB:function(){return d},of:function(){return b}});var o=t(34106);function i(f){let l=f.indexOf(":");const g=f.indexOf("/");g!==-1&&g<l&&(l=-1);const S=l===-1?void 0:f.slice(0,l),A=g===-1?void 0:f.slice(l+1,g),R=f.slice(Math.max(l+1,g+1));if(S===""||A===""||R==="")throw new TypeError(`Entity reference "${f}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:S,namespace:A,name:R}}function d(f){return{kind:f.kind,namespace:f.metadata.namespace||o.zG,name:f.metadata.name}}function b(f,l){if(!f)throw new Error("Entity reference must not be empty");const g=l==null?void 0:l.defaultKind,S=(l==null?void 0:l.defaultNamespace)||o.zG;let A,R,x;if(typeof f=="string"){const w=i(f);var C;A=(C=w.kind)!==null&&C!==void 0?C:g;var E;R=(E=w.namespace)!==null&&E!==void 0?E:S,x=w.name}else{var U;A=(U=f.kind)!==null&&U!==void 0?U:g;var B;R=(B=f.namespace)!==null&&B!==void 0?B:S,x=f.name}if(A)if(R){if(!x){const w=JSON.stringify(f);throw new Error(`Entity reference ${w} had missing or empty name`)}}else{const w=JSON.stringify(f);throw new Error(`Entity reference ${w} had missing or empty namespace`)}else{const w=JSON.stringify(f);throw new Error(`Entity reference ${w} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:A,namespace:R,name:x}}function m(f){let l,g,S;if("metadata"in f){l=f.kind;var A;g=(A=f.metadata.namespace)!==null&&A!==void 0?A:o.zG,S=f.metadata.name}else{l=f.kind;var R;g=(R=f.namespace)!==null&&R!==void 0?R:o.zG,S=f.name}return`${l.toLocaleLowerCase("en-US")}:${g.toLocaleLowerCase("en-US")}/${S.toLocaleLowerCase("en-US")}`}},8709:function(_,P,t){"use strict";t.d(P,{S4:function(){return o},aS:function(){return E},cz:function(){return C},nP:function(){return l},w$:function(){return g}});const o="ownedBy",i="ownerOf",d="consumesApi",b="apiConsumedBy",m="providesApi",f="apiProvidedBy",l="dependsOn",g="dependencyOf",S="parentOf",A="childOf",R="memberOf",x="hasMember",C="partOf",E="hasPart"},90663:function(_,P,t){"use strict";t.d(P,{M6:function(){return d},P1:function(){return o}});const o="backstage.io/managed-by-location",i="backstage.io/managed-by-origin-location",d="backstage.io/source-location"},51547:function(_,P,t){"use strict";t.d(P,{CV:function(){return f},NZ:function(){return m},Ou:function(){return b}});var o=t(74314),i=t(90663);const d=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;function b(l){if(typeof l!="string")throw new TypeError(`Unable to parse location ref '${l}', unexpected argument ${typeof l}`);const g=l.indexOf(":");if(g<0)throw new TypeError(`Unable to parse location ref '${l}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const S=l.substring(0,g).trim(),A=l.substring(g+1).trim();if(!S||!A)throw new TypeError(`Unable to parse location ref '${l}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(S==="http"||S==="https")throw new TypeError(`Invalid location ref '${l}', please prefix it with 'url:', e.g. 'url:${l}'`);if(d.test(A))throw new TypeError(`Invalid location ref '${l}', target is a javascript: URL`);return{type:S,target:A}}function m(l){const{type:g,target:S}=l;if(g){if(!S)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(d.test(S))throw new TypeError(`Invalid location ref '${g}:${S}', target is a javascript: URL`);return`${g}:${S}`}function f(l){var g,S,A,R,x;const C=(x=(S=l.metadata)===null||S===void 0||(g=S.annotations)===null||g===void 0?void 0:g[i.M6])!==null&&x!==void 0?x:(R=l.metadata)===null||R===void 0||(A=R.annotations)===null||A===void 0?void 0:A[i.P1];if(!C)throw new Error(`Entity '${(0,o.eE)(l)}' is missing location`);return b(C)}},9791:function(_,P,t){"use strict";t.d(P,{O:function(){return S}});var o=t(52322),i=t(62774),d=t(60364),b=t(2784),m=t(83229),f=t(26639),l=t(39595),g=t(58033);function S(A){const{text:R,language:x,showLineNumbers:C=!1,highlightedNumbers:E,customStyle:U,showCopyCodeButton:B=!1}=A,w=(0,d.Z)(),$=w.palette.type==="dark"?f.Z:l.Z,I=w.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,o.jsxs)(i.Z,{position:"relative",children:[(0,o.jsx)(m.Z,{customStyle:U,language:x,style:$,showLineNumbers:C,wrapLines:!0,lineNumberStyle:{color:w.palette.textVerySubtle},lineProps:p=>E!=null&&E.includes(p)?{style:{backgroundColor:I}}:{},children:R}),B&&(0,o.jsx)(i.Z,{position:"absolute",top:0,right:0,children:(0,o.jsx)(g.b,{text:R})})]})}},58033:function(_,P,t){"use strict";t.d(P,{b:function(){return S}});var o=t(52322),i=t(44394),d=t(58513),b=t(61837),m=t(80030),f=t(19353),l=t(2784),g=t(95074);function S(A){const{text:R,tooltipDelay:x=1e3,tooltipText:C="Text copied to clipboard","aria-label":E="Copy text"}=A,U=(0,i.h_)(d.V),[B,w]=(0,l.useState)(!1),[{error:$},I]=(0,g.Z)();(0,l.useEffect)(()=>{$&&U.post($)},[$,U]);const p=K=>{K.stopPropagation(),w(!0),I(R)};return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(m.ZP,{id:"copy-test-tooltip",title:C,placement:"top",leaveDelay:x,onClose:()=>w(!1),open:B,children:(0,o.jsx)(b.Z,{onClick:p,"aria-label":E,children:(0,o.jsx)(f.Z,{})})})})}},70249:function(_,P,t){"use strict";t.d(P,{u:function(){return C}});var o=t(52322),i=t(60905),d=t(79692),b=t(90436),m=t(2784),f=t.p+"static/missingAnnotation.67f79e98..svg",l=t.p+"static/noInformation.4b426325..svg",g=t.p+"static/createComponent.975d1e1e..svg",S=t.p+"static/noBuild.1715fa71..svg";const A=(0,d.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),R=({missing:E})=>{const U=A();switch(E){case"field":return(0,o.jsx)("img",{src:f,className:U.generalImg,alt:"annotation is missing"});case"info":return(0,o.jsx)("img",{src:l,alt:"no Information",className:U.generalImg});case"content":return(0,o.jsx)("img",{src:g,alt:"create Component",className:U.generalImg});case"data":return(0,o.jsx)("img",{src:S,alt:"no Build",className:U.generalImg});default:return null}},x=(0,d.Z)(E=>({root:{backgroundColor:E.palette.background.default,padding:E.spacing(2,0,0,0)},action:{marginTop:E.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function C(E){const{title:U,description:B,missing:w,action:$}=E,I=x();return(0,o.jsxs)(i.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:I.root,spacing:2,children:[(0,o.jsx)(i.Z,{item:!0,xs:12,md:6,children:(0,o.jsxs)(i.Z,{container:!0,direction:"column",children:[(0,o.jsx)(i.Z,{item:!0,xs:!0,children:(0,o.jsx)(b.Z,{variant:"h5",children:U})}),(0,o.jsx)(i.Z,{item:!0,xs:!0,children:(0,o.jsx)(b.Z,{variant:"body1",children:B})}),(0,o.jsx)(i.Z,{item:!0,xs:!0,className:I.action,children:$})]})}),(0,o.jsx)(i.Z,{item:!0,xs:12,md:6,className:I.imageContainer,children:typeof w=="string"?(0,o.jsx)(R,{missing:w}):w.customImage})]})}},74359:function(_,P,t){"use strict";t.d(P,{y:function(){return R}});var o=t(52322),i=t(79692),d=t(11776),b=t(38402),m=t(49378),f=t(2784),l=t(58033),g=t(538);const S=(0,i.Z)(x=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:x.spacing(2)},divider:{margin:x.spacing(2)}}),{name:"BackstageErrorPanel"}),A=({error:x,message:C,stack:E,children:U})=>{const B=S();return(0,o.jsxs)(d.Z,{dense:!0,children:[(0,o.jsxs)(b.Z,{alignItems:"flex-start",children:[(0,o.jsx)(m.Z,{classes:{secondary:B.text},primary:"Error",secondary:x}),(0,o.jsx)(l.b,{text:x})]}),(0,o.jsxs)(b.Z,{alignItems:"flex-start",children:[(0,o.jsx)(m.Z,{classes:{secondary:B.text},primary:"Message",secondary:C}),(0,o.jsx)(l.b,{text:C})]}),E&&(0,o.jsxs)(b.Z,{alignItems:"flex-start",children:[(0,o.jsx)(m.Z,{classes:{secondary:B.text},primary:"Stack Trace",secondary:E}),(0,o.jsx)(l.b,{text:E})]}),U]})};function R(x){const{title:C,error:E,defaultExpanded:U,titleFormat:B,children:w}=x;return(0,o.jsx)(g.G,{severity:"error",title:C!=null?C:E.message,defaultExpanded:U,titleFormat:B,children:(0,o.jsx)(A,{error:E.name,message:E.message,stack:E.stack,children:w})})}},98864:function(_,P,t){"use strict";t.d(P,{rU:function(){return H}});var o=t(52322),i=t(44394),d=t(6542),b=t(62369),m=t(86689),f=t(79692),l=t(90436),g=t(72779),S=t.n(g),A=t(76635),R=t.n(A),x=t(2784),C=t(73557),E=t(71597);function U(){const[G]=(0,C.is)((0,o.jsx)(C.AW,{index:!0,element:(0,o.jsx)("div",{})}));return!G.index}const B=(0,f.Z)({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"}},{name:"Link"}),w=G=>/^([a-z+.-]+):/.test(G),$=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,I=window.open;if(I&&!I.__backstage){const G=function(...Y){const ot=String(Y[0]);if($.test(ot))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return I.apply(this,Y)};G.__backstage=!0,window.open=G}const p=()=>{try{return(0,i.h_)(d.D).getOptionalString("app.baseUrl")}catch{return}},K=()=>{const G="http://sample.dev";var z;const Y=(z=p())!==null&&z!==void 0?z:"/",{pathname:ot}=new URL(Y,G);return(0,A.trimEnd)(ot,"/")},V=G=>{let z=String(G);const Y=K(),ot=w(z),ct=z.startsWith(Y);return!ot&&!ct&&(z=Y.concat(z)),z},J=G=>{if(G instanceof Array)return G.map(J).join(" ").trim();if(typeof G=="object"&&G){var z;return J(G==null||(z=G.props)===null||z===void 0?void 0:z.children)}return["string","number"].includes(typeof G)?String(G):""},H=x.forwardRef(({onClick:G,noTrack:z,...Y},ot)=>{const ct=B(),dt=(0,b.z)(),ft=U()?V(Y.to):Y.to,Ot=J(Y.children)||ft,at=w(ft),At=at&&!!/^https?:/.exec(ft);if($.test(ft))throw new Error("Link component rejected javascript: URL as a security precaution");const X=L=>{G==null||G(L),z||dt.captureEvent("click",Ot,{attributes:{to:ft}})};return at?(0,o.jsxs)(m.Z,{...At?{target:"_blank",rel:"noopener"}:{},...Y,...Y["aria-label"]?{"aria-label":`${Y["aria-label"]}, Opens in a new window`}:{},ref:ot,href:ft,onClick:X,className:S()(ct.externalLink,Y.className),children:[Y.children,(0,o.jsx)(l.Z,{component:"span",className:ct.visuallyHidden,children:", Opens in a new window"})]}):(0,o.jsx)(m.Z,{...Y,ref:ot,component:E.rU,to:ft,onClick:X})})},15929:function(_,P,t){"use strict";t.d(P,{Q:function(){return f}});var o=t(52322),i=t(77277),d=t(2784),b=t(98864);const m=d.forwardRef((g,S)=>(0,o.jsx)(b.rU,{ref:S,...g,color:"initial"})),f=d.forwardRef((g,S)=>(0,o.jsx)(i.Z,{ref:S,component:m,...g})),l=null},78527:function(_,P,t){"use strict";t.d(P,{S:function(){return R}});var o=t(52322),i=t(79692),d=t(28865),b=t(60251),m=t(2784),f=t(9791);const l=(0,i.Z)(x=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${x.palette.border}`},"& th, & td":{border:`1px solid ${x.palette.border}`,padding:x.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:x.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:x.palette.background.paper},"& tr":{backgroundColor:x.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:x.palette.background.default},"& a":{color:x.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),g=(x,C)=>C?typeof C=="string"?x+C:m.Children.toArray(C.props.children).reduce(g,x):x,S=({level:x,children:C})=>{const B=m.Children.toArray(C).reduce(g,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return m.createElement(`h${x}`,{id:B},C)},A={code:({inline:x,className:C,children:E,...U})=>{const B=String(E).replace(/\n+$/,""),w=/language-(\w+)/.exec(C||"");return!x&&w?(0,o.jsx)(f.O,{language:w[1],text:B}):(0,o.jsx)("code",{className:C,...U,children:E})},h1:S,h2:S,h3:S,h4:S,h5:S,h6:S};function R(x){const{content:C,dialect:E="gfm",linkTarget:U,transformLinkUri:B,transformImageUri:w,className:$}=x,I=l();return(0,o.jsx)(d.D,{remarkPlugins:E==="gfm"?[b.Z]:[],className:`${I.markdown} ${$}`,children:C,components:A,linkTarget:U,transformLinkUri:B,transformImageUri:w})}},55015:function(_,P,t){"use strict";t.d(P,{E:function(){return f}});var o=t(52322),i=t(62774),d=t(67358),b=t(60364),m=t(2784);function f(l){const g=(0,b.Z)(),[S,A]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{const R=setTimeout(()=>A(!0),g.transitions.duration.short);return()=>clearTimeout(R)},[g.transitions.duration.short]),S?(0,o.jsx)(d.Z,{...l,"data-testid":"progress"}):(0,o.jsx)(i.Z,{display:"none"})}},35879:function(_,P,t){"use strict";t.d(P,{H:function(){return H}});var o=t(52322),i=t(62774),d=t(21324),b=t(7089),m=t(30192),f=t(74603),l=t(56939),g=t(12231),S=t(73698),A=t(15459),R=t(42494),x=t(79692),C=t(90436),E=t(2784),U=t(72379);const B=(0,x.Z)(G=>(0,R.Z)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var $=()=>{const G=B();return(0,o.jsx)(U.Z,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"})})};const I=(0,x.Z)(G=>(0,R.Z)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var K=()=>{const G=I();return(0,o.jsx)(U.Z,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"})})};const V=(0,A.Z)(G=>(0,R.Z)({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"]),fontFamily:"Helvetica Neue","&:focus":{background:G.palette.background.paper,borderRadius:G.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(f.Z),J=(0,x.Z)(G=>(0,R.Z)({formControl:{margin:G.spacing(1,0),maxWidth:300},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 H(G){const{multiple:z,items:Y,label:ot,placeholder:ct,selected:dt,onChange:ft,triggerReset:Ot,native:at=!1,disabled:At=!1,margin:X}=G,L=J(),[Q,et]=(0,E.useState)(dt||(z?[]:"")),[it,ut]=(0,E.useState)(!1);(0,E.useEffect)(()=>{et(z?[]:"")},[Ot,z]),(0,E.useEffect)(()=>{et(dt||(z?[]:""))},[dt,z]);const Z=vt=>{et(vt.target.value),ft(vt.target.value)},F=vt=>{if(At){vt.preventDefault();return}ut(yt=>z&&!(vt.target instanceof HTMLElement)?!0:!yt)},ht=()=>{ut(!1)},xt=vt=>()=>{const yt=Q.filter(gt=>gt!==vt);et(yt),ft(yt)};return(0,o.jsx)(i.Z,{className:L.root,children:(0,o.jsxs)(m.Z,{className:L.formControl,children:[(0,o.jsx)(l.Z,{className:L.formLabel,children:ot}),(0,o.jsxs)(S.Z,{"aria-label":ot,value:Q,native:at,disabled:At,"data-testid":"select",displayEmpty:!0,multiple:z,margin:X,onChange:Z,open:it,onOpen:F,onClose:ht,input:(0,o.jsx)(V,{}),label:ot,renderValue:vt=>{var yt;return z&&Q.length!==0?(0,o.jsx)(i.Z,{className:L.chips,children:vt.map(gt=>{const bt=Y.find(It=>It.value===gt);return bt?(0,o.jsx)(b.Z,{label:bt==null?void 0:bt.label,clickable:!0,onDelete:xt(gt),className:L.chip},bt==null?void 0:bt.value):!1})}):(0,o.jsx)(C.Z,{children:Q.length===0?ct||"":(yt=Y.find(gt=>gt.value===vt))===null||yt===void 0?void 0:yt.label})},IconComponent:()=>it?(0,o.jsx)(K,{}):(0,o.jsx)($,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[ct&&!z&&(0,o.jsx)(g.Z,{value:[],children:ct}),at?Y&&Y.map(vt=>(0,o.jsx)("option",{value:vt.value,children:vt.label},vt.value)):Y&&Y.map(vt=>(0,o.jsxs)(g.Z,{value:vt.value,children:[z&&(0,o.jsx)(d.Z,{color:"primary",checked:Q.includes(vt.value)||!1,className:L.checkbox}),vt.label]},vt.value))]})]})})}},13788:function(_,P,t){"use strict";t.d(P,{q:function(){return X}});var o=t(52322),i=t(80851),d=t(62774),b=t(77277),m=t(49429),f=t(61837),l=t(86136),g=t(49378),S=t(12231),A=t(50758),R=t(79784),x=t(79692),C=t(90436),E=t(41156),U=t(2784),B=t(77770),w=t(80079);function $(L,Q){const it=(0,i.q)().getSystemIcon(L);return it?(0,o.jsx)(it,{...Q}):(0,o.jsx)(w.Z,{...Q})}function I(L){return $("brokenImage",L)}function p(L){return $("catalog",L)}function K(L){return $("chat",L)}function V(L){return $("dashboard",L)}function J(L){return $("docs",L)}function H(L){return $("email",L)}function G(L){return $("github",L)}function z(L){return $("group",L)}function Y(L){return $("help",L)}function ot(L){return $("user",L)}function ct(L){return $("warning",L)}var dt=t(98864);const ft=(0,x.Z)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),Ot=({icon:L})=>{const Q=(0,i.q)();var et;const it=L&&(et=Q.getSystemIcon(L))!==null&&et!==void 0?et:Y;return(0,o.jsx)(it,{})},at=({link:L})=>{var Q;return(0,o.jsx)(dt.rU,{to:L.url,children:(Q=L.title)!==null&&Q!==void 0?Q:L.url})},At=({item:L})=>{var Q;return(0,o.jsxs)(S.Z,{children:[(0,o.jsx)(l.Z,{children:(0,o.jsx)(Ot,{icon:L.icon})}),(0,o.jsx)(g.Z,{primary:L.title,secondary:(Q=L.links)===null||Q===void 0?void 0:Q.reduce((et,it,ut)=>[...et,ut>0&&(0,o.jsx)("br",{},ut),(0,o.jsx)(at,{link:it},it.url)],[])})]})};function X(L){const{title:Q,items:et,children:it}=L,{items:ut}=(0,B.v)(),[Z,F]=(0,U.useState)(!1),[ht,xt]=(0,U.useState)(null),vt=ft(),yt=(0,E.Z)(It=>It.breakpoints.down("sm")),gt=It=>{xt(It.currentTarget),F(!0)},bt=()=>{F(!1)};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Z,{display:"flex",ml:1,children:yt?(0,o.jsx)(f.Z,{color:"primary",size:"small",onClick:gt,"data-testid":"support-button","aria-label":"Support",children:(0,o.jsx)(Y,{})}):(0,o.jsx)(b.Z,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:gt,startIcon:(0,o.jsx)(Y,{}),children:"Support"})}),(0,o.jsxs)(R.ZP,{"data-testid":"support-button-popover",open:Z,anchorEl:ht,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:bt,children:[(0,o.jsxs)(A.Z,{className:vt.popoverList,autoFocusItem:Boolean(ht),children:[Q&&(0,o.jsx)(S.Z,{alignItems:"flex-start",className:vt.menuItem,children:(0,o.jsx)(C.Z,{variant:"subtitle1",children:Q})}),U.Children.map(it,(It,jt)=>(0,o.jsx)(S.Z,{alignItems:"flex-start",className:vt.menuItem,children:It},`child-${jt}`)),(et!=null?et:ut).map((It,jt)=>(0,o.jsx)(At,{item:It},`item-${jt}`))]}),(0,o.jsx)(m.Z,{children:(0,o.jsx)(b.Z,{color:"primary",onClick:bt,"aria-label":"Close",children:"Close"})})]})]})}},84462:function(_,P,t){"use strict";t.d(P,{i:function(){return ut}});var o=t(52322),i=t(67222),d=t(62774),b=t(61837),m=t(15459),f=t(79692),l=t(60364),g=t(90436),S=t(21070),A=t(90324),R=t(98281),x=t(48049),C=t(51209),E=t(33375),U=t(44233),B=t(27604),w=t(36444),$=t(37971),I=t(59709),p=t(17373),K=t(3702),V=t(93111),J=t(76635),H=t(2784),G=t(77277),z=t(35879);const Y=(0,f.Z)(Z=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:Z.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:Z.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${Z.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:Z.spacing(2)}}}),{name:"BackstageTableFilters"}),ot=Z=>{var F;const ht=Y(),{onChangeFilters:xt}=Z,[vt,yt]=(0,H.useState)({...Z.selectedFilters}),[gt,bt]=(0,H.useState)(!1),It=()=>{yt({}),bt(jt=>!jt)};return(0,H.useEffect)(()=>{xt(vt)},[vt,xt]),(0,o.jsxs)(d.Z,{className:ht.root,children:[(0,o.jsxs)(d.Z,{className:ht.header,children:[(0,o.jsx)(d.Z,{className:ht.value,children:"Filters"}),(0,o.jsx)(G.Z,{color:"primary",onClick:It,children:"Clear all"})]}),(0,o.jsx)(d.Z,{className:ht.filters,children:((F=Z.filters)===null||F===void 0?void 0:F.length)&&Z.filters.map(jt=>(0,o.jsx)(z.H,{triggerReset:gt,...jt.element,selected:vt[jt.element.label],onChange:ge=>yt({...vt,[jt.element.label]:ge})},jt.element.label))})]})};var ct=t(4614);const dt={Add:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(S.Z,{...Z,ref:F})),Check:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(R.Z,{...Z,ref:F})),Clear:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(E.Z,{...Z,ref:F})),Delete:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(U.Z,{...Z,ref:F})),DetailPanel:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(C.Z,{...Z,ref:F})),Edit:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(B.Z,{...Z,ref:F})),Export:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(K.Z,{...Z,ref:F})),Filter:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(w.Z,{...Z,ref:F})),FirstPage:(0,H.forwardRef)((Z,F)=>(0,o.jsx)($.Z,{...Z,ref:F})),LastPage:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(I.Z,{...Z,ref:F})),NextPage:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(C.Z,{...Z,ref:F})),PreviousPage:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(x.Z,{...Z,ref:F})),ResetSearch:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(E.Z,{...Z,ref:F})),Search:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(w.Z,{...Z,ref:F})),SortArrow:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(A.Z,{...Z,ref:F})),ThirdStateCheck:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(p.Z,{...Z,ref:F})),ViewColumn:(0,H.forwardRef)((Z,F)=>(0,o.jsx)(V.Z,{...Z,ref:F}))};function ft(Z,F){const ht=F.split(".");let xt=Z[ht[0]];for(let vt=1;vt<ht.length;++vt){if(xt===void 0)return xt;const yt=ht[vt];xt=xt[yt]}return xt}const Ot=(0,m.Z)(Z=>({header:{padding:Z.spacing(1,2,1,2.5),borderTop:`1px solid ${Z.palette.grey.A100}`,borderBottom:`1px solid ${Z.palette.grey.A100}`,fontWeight:Z.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(i.W$),at=(0,m.Z)(Z=>({root:{padding:Z.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:Z.typography.fontWeightBold}},searchField:{paddingRight:Z.spacing(2)}}),{name:"BackstageTableToolbar"})(i.UW),At=(0,f.Z)(Z=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:Z.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),X=(0,f.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function L(Z,F){return Z.map(ht=>{var xt;const vt=(xt=ht.headerStyle)!==null&&xt!==void 0?xt:{};let yt=ht.cellStyle||{};if(ht.highlight)if(vt.color=F.palette.textContrast,typeof yt=="object")yt.fontWeight=F.typography.fontWeightBold;else{const gt=yt;yt=(bt,It,jt)=>({...gt(bt,It,jt),fontWeight:F.typography.fontWeightBold})}return{...ht,headerStyle:vt,cellStyle:yt}})}function Q(Z,F){return(0,J.transform)(Z,(ht,xt,vt)=>{(0,J.isEqual)(xt,F[vt])||(ht[vt]=xt)})}const et={search:"",filtersOpen:!1,filters:{}};function it(Z){const{toolbarRef:F,setSearch:ht,hasFilters:xt,selectedFiltersLength:vt,toggleFilters:yt}=Z,gt=At(),bt=(0,H.useCallback)(It=>{Z.onSearchChanged(It),ht(It)},[Z,ht]);return xt?(0,o.jsxs)(d.Z,{className:gt.root,children:[(0,o.jsxs)(d.Z,{className:gt.root,children:[(0,o.jsx)(b.Z,{onClick:yt,"aria-label":"filter list",children:(0,o.jsx)(w.Z,{})}),(0,o.jsxs)(g.Z,{className:gt.title,children:["Filters (",vt,")"]})]}),(0,o.jsx)(at,{...Z,ref:F,onSearchChanged:bt})]}):(0,o.jsx)(at,{...Z,ref:F,onSearchChanged:bt})}function ut(Z){const{data:F,columns:ht,options:xt,title:vt,subtitle:yt,filters:gt,initialState:bt,emptyContent:It,onStateChange:jt,components:ge,isLoading:Se,...Ee}=Z,$t=X(),Lt=(0,l.Z)(),Kt={...et,...bt},[Yt,qt]=(0,H.useState)(Kt.filtersOpen),Qt=(0,H.useCallback)(()=>qt(se=>!se),[qt]),[fe,je]=(0,H.useState)(0),[Ye,Ke]=(0,H.useState)(F),[be,Qe]=(0,H.useState)(Kt.filters),Je=L(ht,Lt),[ze,ne]=(0,H.useState)(Kt.search);(0,H.useEffect)(()=>{if(jt){const se=Q({search:ze,filtersOpen:Yt,filters:be},et);jt(se)}},[ze,Yt,be,jt]);const on={headerStyle:{textTransform:"uppercase"}},Oe=(0,H.useCallback)(se=>{var xe;return(xe=ht.find(M=>M.title===se))===null||xe===void 0?void 0:xe.field},[ht]);(0,H.useEffect)(()=>{if(typeof F=="function")return;if(!be){Ke(F);return}const se=Object.values(be);if(F&&se.flat().length){const xe=F.filter(M=>!!Object.entries(be).filter(([,u])=>!!u.length).every(([u,T])=>{const W=ft(M,Oe(u));return Array.isArray(W)&&Array.isArray(T)?W.some(rt=>T.includes(rt)):Array.isArray(W)?W.includes(T):Array.isArray(T)?T.includes(W):W===T}));Ke(xe)}else Ke(F);je(se.flat().length)},[F,be,Oe]);const rn=(se,xe)=>{const M=T=>{const W=new Set,rt=St=>{St!=null&&W.add(St)};return xe&&xe.forEach(St=>{const Rt=ft(St,Oe(T));Array.isArray(Rt)?Rt.forEach(rt):rt(Rt)}),W},u=T=>({placeholder:"All results",label:T.column,multiple:T.type==="multiple-select",items:[...M(T.column)].sort().map(W=>({label:W,value:W}))});return se.map(T=>({type:T.type,element:u(T)}))},Xe=!!(gt!=null&>.length),re=(0,H.useCallback)(se=>(0,o.jsx)(it,{setSearch:ne,hasFilters:Xe,selectedFiltersLength:fe,toggleFilters:Qt,...se}),[Qt,Xe,fe,ne]),$e=typeof F!="function"&&F.length===0,Be=ht.length,_e=(0,H.useCallback)(se=>Se?(0,o.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:Be,children:(0,o.jsx)(d.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,o.jsx)(ct.Z,{size:"5rem"})})})})}):It&&$e?(0,o.jsx)("tbody",{children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:Be,children:It})})}):(0,o.jsx)(i.os,{...se}),[$e,It,Be,Se]);return(0,o.jsxs)(d.Z,{className:$t.root,children:[Yt&&F&&typeof F!="function"&&(gt==null?void 0:gt.length)&&(0,o.jsx)(ot,{filters:rn(gt,F),selectedFilters:be,onChangeFilters:Qe}),(0,o.jsx)(i.ZP,{components:{Header:Ot,Toolbar:re,Body:_e,...ge},options:{...on,...xt},columns:Je,icons:dt,title:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g.Z,{variant:"h5",component:"h2",children:vt}),yt&&(0,o.jsx)(g.Z,{color:"textSecondary",variant:"body1",children:yt})]}),data:typeof F=="function"?F:Ye,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter",searchTooltip:"Filter"}},...Ee})]})}ut.icons=Object.freeze(dt)},538:function(_,P,t){"use strict";t.d(P,{G:function(){return p}});var o=t(52322),i=t(41128),d=t(79692),b=t(27616),m=t(8284),f=t(70660),l=t(60905),g=t(90436),S=t(91750),A=t(38016),R=t(2784),x=t(78527);const C=(K,V)=>(V.palette.type==="light"?i._j:i.$n)(V.palette[K].light,.6),E=(K,V)=>(V.palette.type==="light"?i.$n:i._j)(V.palette[K].light,.9),U=(0,d.Z)(K=>({root:{marginRight:K.spacing(1),fill:({severity:V})=>C(V,K)}})),B=({severity:K})=>{const V=U({severity:K});return(0,o.jsx)(S.Z,{classes:V})},w=({severity:K})=>{const V=U({severity:K});return(0,o.jsx)(A.Z,{classes:V})},$=(0,d.Z)(K=>({panel:{backgroundColor:({severity:V})=>E(V,K),color:({severity:V})=>C(V,K),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:V})=>C(V,K),fontWeight:K.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:V})=>C(V,K),backgroundColor:({severity:V})=>E(V,K)},details:{width:"100%",display:"block",color:K.palette.textContrast,backgroundColor:K.palette.background.default,border:`1px solid ${K.palette.border}`,padding:K.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),I=K=>K.charAt(0).toLocaleUpperCase("en-US")+K.slice(1);function p(K){const{severity:V="warning",title:J,titleFormat:H,message:G,children:z,defaultExpanded:Y}=K,ot=$({severity:V}),ct=I(V)+(J?`: ${J}`:"");return(0,o.jsxs)(b.Z,{defaultExpanded:Y!=null?Y:!1,className:ot.panel,role:"alert",children:[(0,o.jsxs)(m.Z,{expandIcon:(0,o.jsx)(w,{severity:V}),className:ot.summary,children:[(0,o.jsx)(B,{severity:V}),(0,o.jsx)(g.Z,{className:ot.summaryText,variant:"subtitle1",children:H==="markdown"?(0,o.jsx)(x.S,{content:ct,className:ot.markdownContent}):ct})]}),(G||z)&&(0,o.jsx)(f.Z,{children:(0,o.jsxs)(l.Z,{container:!0,children:[G&&(0,o.jsx)(l.Z,{item:!0,xs:12,children:(0,o.jsx)(g.Z,{className:ot.message,variant:"body1",children:G})}),z&&(0,o.jsx)(l.Z,{item:!0,xs:12,className:ot.details,children:z})]})})]})}},77770:function(_,P,t){"use strict";t.d(P,{v:function(){return b}});var o=t(44394),i=t(6542);const d={url:"https://github.com/backstage/backstage/issues",items:[{title:"Support Not Configured",icon:"warning",links:[{title:"Add `app.support` config key",url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]};function b(){const f=(0,o.I_)().get(i.D),l=f==null?void 0:f.getOptionalConfig("app.support");return l?{url:l.getString("url"),items:l.getConfigArray("items").flatMap(g=>{var S;return{title:g.getString("title"),icon:g.getOptionalString("icon"),links:((S=g.getOptionalConfigArray("links"))!==null&&S!==void 0?S:[]).flatMap(A=>({url:A.getString("url"),title:A.getString("title")}))}})}:d}},42398:function(_,P,t){"use strict";t.d(P,{V:function(){return l}});var o=t(52322),i=t(79692),d=t(72779),b=t.n(d),m=t(2784);const f=(0,i.Z)(g=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:g.spacing(3),paddingBottom:g.spacing(3),paddingLeft:g.spacing(2),paddingRight:g.spacing(2),[g.breakpoints.up("sm")]:{paddingLeft:g.spacing(3),paddingRight:g.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function l(g){const{className:S,stretch:A,noPadding:R,children:x,...C}=g,E=f();return(0,o.jsx)("article",{...C,className:b()(E.root,S,{[E.stretch]:A,[E.noPadding]:R}),children:x})}},30706:function(_,P,t){"use strict";t.d(P,{y:function(){return S}});var o=t(52322),i=t(62774),d=t(79692),b=t(90436),m=t(2784),f=t(18671);const l=A=>(0,d.Z)(R=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:R.spacing(2),textAlign:A.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:R.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),g=({title:A="Unknown page",className:R})=>(0,o.jsx)(b.Z,{variant:"h4",component:"h2",className:R,"data-testid":"header-title",children:A});function S(A){const{description:R,title:x,titleComponent:C=void 0,children:E,textAlign:U="left"}=A,B=l({textAlign:U})(),w=C||(0,o.jsx)(g,{title:x,className:B.title});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(f.q,{title:x}),(0,o.jsxs)(i.Z,{className:B.container,children:[(0,o.jsxs)(i.Z,{className:B.leftItemsBox,children:[w,R&&(0,o.jsx)(b.Z,{className:B.description,variant:"body2",children:R})]}),(0,o.jsx)(i.Z,{className:B.rightItemsBox,children:E})]})]})}},87435:function(_,P,t){"use strict";t.d(P,{m:function(){return C}});var o=t(52322),i=t(60905),d=t(79692),b=t(90436),m=t(2784),f=t(73557),l=t(98864),g=t(77770),S=t.p+"static/mic-drop.fe3ef4d0..svg";const A=(0,d.Z)(E=>({micDrop:{maxWidth:"60%",bottom:E.spacing(2),right:E.spacing(2),[E.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:E.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),R=()=>{const E=A();return(0,o.jsx)("img",{src:S,className:E.micDrop,alt:"Girl dropping mic from her hands"})},x=(0,d.Z)(E=>({container:{padding:E.spacing(8),[E.breakpoints.down("xs")]:{padding:E.spacing(2)}},title:{paddingBottom:E.spacing(5),[E.breakpoints.down("xs")]:{paddingBottom:E.spacing(4),fontSize:E.typography.h3.fontSize}},subtitle:{color:E.palette.textSubtle}}),{name:"BackstageErrorPage"});function C(E){const{status:U,statusMessage:B,additionalInfo:w,supportUrl:$}=E,I=x(),p=(0,f.s0)(),K=(0,g.v)();return(0,o.jsxs)(i.Z,{container:!0,spacing:0,className:I.container,children:[(0,o.jsxs)(i.Z,{item:!0,xs:12,sm:8,md:4,children:[(0,o.jsxs)(b.Z,{"data-testid":"error",variant:"body1",className:I.subtitle,children:["ERROR ",U,": ",B]}),(0,o.jsx)(b.Z,{variant:"body1",className:I.subtitle,children:w}),(0,o.jsx)(b.Z,{variant:"h2",className:I.title,children:"Looks like someone dropped the mic!"}),(0,o.jsxs)(b.Z,{variant:"h6",children:[(0,o.jsx)(l.rU,{to:"#","data-testid":"go-back-link",onClick:()=>p(-1),children:"Go back"}),"... or please"," ",(0,o.jsx)(l.rU,{to:$||K.url,children:"contact support"})," if you think this is a bug."]})]}),(0,o.jsx)(R,{})]})}},48037:function(_,P,t){"use strict";t.d(P,{h:function(){return G}});var o=t(52322),i=t(44394),d=t(6542),b=t(62774),m=t(60905),f=t(79692),l=t(80030),g=t(90436),S=t(2784),A=t(18671),R=t(98864),x=t(16173),C=t(11776),E=t(38402),U=t(79784),B=t(15459);const w=(0,B.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(g.Z),$=(0,B.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(b.Z);function I(z){const{children:Y,...ot}=z,[ct,dt]=S.useState(null),ft=S.Children.toArray(Y),[Ot,at,...At]=ft,X=At.length?At.pop():ft[ft.length-1],L=ft.length>3,Q=ut=>{dt(ut.currentTarget)},et=()=>{dt(null)},it=Boolean(ct);return(0,o.jsxs)(S.Fragment,{children:[(0,o.jsxs)(x.Z,{"aria-label":"breadcrumb",...ot,children:[ft.length>1&&(0,o.jsx)($,{clone:!0,children:Ot}),ft.length>2&&(0,o.jsx)($,{clone:!0,children:at}),L&&(0,o.jsx)(w,{onClick:Q,children:"..."}),(0,o.jsx)(b.Z,{style:{fontStyle:"italic"},children:X})]}),(0,o.jsx)(U.ZP,{open:it,anchorEl:ct,onClose:et,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,o.jsx)(C.Z,{children:At.map((ut,Z)=>(0,o.jsx)(E.Z,{button:!0,children:(0,o.jsx)($,{clone:!0,children:ut})},Z))})})]})}var p=t(44409);const K=(0,f.Z)(z=>({header:{gridArea:"pageHeader",padding:z.spacing(3),width:"100%",boxShadow:z.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:z.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[z.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:z.page.fontColor,wordBreak:"break-word",fontSize:z.typography.h3.fontSize,marginBottom:0},subtitle:{color:z.page.fontColor,opacity:.8,display:"inline-block",marginTop:z.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:z.spacing(1),color:z.page.fontColor},breadcrumb:{color:z.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-z.spacing(.3),marginBottom:z.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-z.spacing(.3),marginBottom:z.spacing(.3)}}),{name:"BackstageHeader"}),V=({type:z,typeLink:Y,classes:ot,pageTitle:ct})=>z?Y?(0,o.jsxs)(I,{className:ot.breadcrumb,children:[(0,o.jsx)(R.rU,{to:Y,children:z}),(0,o.jsx)(g.Z,{children:ct})]}):(0,o.jsx)(g.Z,{className:ot.type,children:z}):null,J=({pageTitle:z,classes:Y,tooltip:ot})=>{const{contentRef:ct}=(0,p.r)(),dt=(0,o.jsx)(g.Z,{ref:ct,tabIndex:-1,className:Y.title,variant:"h1",children:z});return ot?(0,o.jsx)(l.ZP,{title:ot,placement:"top-start",children:dt}):dt},H=({classes:z,subtitle:Y})=>Y?typeof Y!="string"?(0,o.jsx)(o.Fragment,{children:Y}):(0,o.jsx)(g.Z,{className:z.subtitle,variant:"subtitle2",component:"span",children:Y}):null;function G(z){const{children:Y,pageTitleOverride:ot,style:ct,subtitle:dt,title:ft,tooltip:Ot,type:at,typeLink:At}=z,X=K(),Q=(0,i.h_)(d.D).getOptionalString("app.title")||"Backstage",et=ot||ft,it=ft||ot,ut=`${et} | %s | ${Q}`,Z=`${et} | ${Q}`;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(A.q,{titleTemplate:ut,defaultTitle:Z}),(0,o.jsxs)("header",{style:ct,className:X.header,children:[(0,o.jsxs)(b.Z,{className:X.leftItemsBox,children:[(0,o.jsx)(V,{classes:X,type:at,typeLink:At,pageTitle:it}),(0,o.jsx)(J,{classes:X,pageTitle:it,tooltip:Ot}),(0,o.jsx)(H,{classes:X,subtitle:dt})]}),(0,o.jsx)(m.Z,{container:!0,className:X.rightItemsBox,spacing:4,children:Y})]})]})}},67880:function(_,P,t){"use strict";t.d(P,{T:function(){return f}});var o=t(52322),i=t(2784),d=t(79692),b=t(41547);const m=(0,d.Z)(l=>({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",[l.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function f(l){const{themeId:g,children:S}=l,A=m();return(0,o.jsx)(b.Z,{theme:R=>({...R,page:R.getPageTheme({themeId:g})}),children:(0,o.jsx)("main",{className:A.root,children:S})})}},32166:function(_,P,t){"use strict";t.d(P,{g:function(){return m}});var o=t(52322),i=t(2784),d=t(48037),b=t(67880);function m(f){const{themeId:l,children:g,...S}=f;return(0,o.jsxs)(b.T,{themeId:l,children:[(0,o.jsx)(d.h,{...S}),g]})}},44409:function(_,P,t){"use strict";t.d(P,{t:function(){return x},r:function(){return C}});var o=t(52322),i=t(62774),d=t(79692),b=t(41156),m=t(2784),f=t(76921),l;(function(E){E.SIDEBAR_PIN_STATE="sidebarPinState"})(l||(l={}));const g={getSidebarPinState(){let E;try{E=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!E},setSidebarPinState(E){return window.localStorage.setItem("sidebarPinState",JSON.stringify(E))}};var S=t(93539);const A=(0,d.Z)(E=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[E.breakpoints.up("sm")]:{paddingLeft:U=>U.isPinned?U.sidebarConfig.drawerWidthOpen:U.sidebarConfig.drawerWidthClosed},[E.breakpoints.down("xs")]:{paddingBottom:U=>U.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),R=(0,m.createContext)({content:{contentRef:void 0}});function x(E){const[U,B]=(0,m.useState)(()=>g.getSidebarPinState()),{sidebarConfig:w}=(0,m.useContext)(f.kG),$=(0,m.useRef)(null),I=(0,m.useMemo)(()=>({content:{contentRef:$}}),[$]);(0,m.useEffect)(()=>{g.setSidebarPinState(U)},[U]);const p=(0,b.Z)(J=>J.breakpoints.down("xs"),{noSsr:!0}),K=()=>B(!U),V=A({isPinned:U,sidebarConfig:w});return(0,o.jsx)(S.lE,{value:{isPinned:U,toggleSidebarPinState:K,isMobile:p},children:(0,o.jsx)(R.Provider,{value:I,children:(0,o.jsx)(i.Z,{className:V.root,children:E.children})})})}function C(){const{content:E}=(0,m.useContext)(R);return{focusContent:(0,m.useCallback)(()=>{var B,w;E==null||(w=E.contentRef)===null||w===void 0||(B=w.current)===null||B===void 0||B.focus()},[E]),contentRef:E==null?void 0:E.contentRef}}},93539:function(_,P,t){"use strict";t.d(P,{Pf:function(){return S},lE:function(){return g}});var o=t(52322),i=t(29651),d=t(68993),b=t(2784);const m={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},f=(0,b.createContext)(m),l=(0,i.CT)("sidebar-pin-state-context");function g(A){const{children:R,value:x}=A;return(0,o.jsx)(f.Provider,{value:x,children:(0,o.jsx)(l.Provider,{value:(0,d.E)({1:x}),children:R})})}const S=()=>{const A=(0,b.useContext)(l),R=(0,b.useContext)(f);if(A===void 0)return R||m;const x=A.atVersion(1);if(x===void 0)throw new Error("No context found for version 1.");return x}},76921:function(_,P,t){"use strict";t.d(P,{$E:function(){return f},Ag:function(){return R},kG:function(){return A},po:function(){return m},rW:function(){return g}});var o=t(2784);const i=72,d=24,b=18,m={drawerWidthClosed:i,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:i,iconSize:i-d*2,iconPadding:d,selectedIndicatorWidth:3,userBadgePadding:b,userBadgeDiameter:i-b*2,mobileSidebarHeight:56},f=x=>({...m,...x,iconContainerWidth:m.drawerWidthClosed,iconSize:m.drawerWidthClosed-m.iconPadding*2,userBadgeDiameter:m.drawerWidthClosed-m.userBadgePadding*2}),l={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:m.defaultOpenDelayMs+200},g=x=>({...l,...x}),S="@backstage/core/sidebar-intro-dismissed",A=(0,o.createContext)({sidebarConfig:m,submenuConfig:l}),R=(0,o.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},72388:function(_,P,t){"use strict";t.d(P,{Os:function(){return f},fC:function(){return l}});var o=t(52322),i=t(29651),d=t(68993),b=t(2784);const m=(0,i.CT)("analytics-context"),f=()=>{const S=(0,b.useContext)(m);if(S===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const A=S.atVersion(1);if(A===void 0)throw new Error("No context found for version 1.");return A},l=S=>{const{attributes:A,children:R}=S,C={...f(),...A},E=(0,d.E)({1:C});return(0,o.jsx)(m.Provider,{value:E,children:R})};function g(S,A){const R=x=>_jsx(l,{attributes:A,children:_jsx(S,{...x})});return R.displayName=`WithAnalyticsContext(${S.displayName||S.name||"Component"})`,R}},7355:function(_,P,t){"use strict";t.d(P,{f:function(){return m},h:function(){return b}});var o=t(87612),i=t(96087);const d=(0,i.u)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),b="_ROUTABLE-EXTENSION-RENDERED";class m{setContext(l){this.context=l}captureEvent(l,g,{value:S,attributes:A}={}){const{_routeNodeType:R,...x}=this.context;if(l===b){d.mostRecentGatheredNavigation&&(d.mostRecentRoutableExtensionRender={context:{...x,extension:"App"}});return}if(d.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...d.mostRecentGatheredNavigation,...d.mostRecentRoutableExtensionRender})}catch(C){console.warn("Error during analytics event capture. %o",C)}d.mostRecentGatheredNavigation=void 0,d.mostRecentRoutableExtensionRender=void 0}if(l==="navigate"&&R==="gathered"&&x.pluginId==="root"){d.mostRecentGatheredNavigation={action:l,subject:g,value:S,attributes:A,context:x};return}try{this.analyticsApi.captureEvent({action:l,subject:g,value:S,attributes:A,context:x})}catch(C){console.warn("Error during analytics event capture. %o",C)}}constructor(l,g={routeRef:"unknown",pluginId:"root",extension:"App"}){(0,o._)(this,"analyticsApi",void 0),(0,o._)(this,"context",void 0),this.analyticsApi=l,this.context=g,d.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{d.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...d.mostRecentGatheredNavigation,...d.mostRecentRoutableExtensionRender}),d.mostRecentGatheredNavigation=void 0,d.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),d.beforeUnloadRegistered=!0)}}},62369:function(_,P,t){"use strict";t.d(P,{z:function(){return l}});var o=t(72388),i=t(44394),d=t(86386),b=t(2784),m=t(7355);function f(){try{return(0,i.h_)(d.v)}catch{return{captureEvent:()=>{}}}}function l(){const g=(0,b.useRef)(null),S=(0,o.Os)(),A=f();function R(){return g.current===null&&(g.current=new m.f(A)),g.current}const x=R();return x.setContext(S),x}},78847:function(_,P,t){"use strict";t.d(P,{$:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.alert"})},86386:function(_,P,t){"use strict";t.d(P,{v:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.analytics"})},6542:function(_,P,t){"use strict";t.d(P,{D:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.config"})},96727:function(_,P,t){"use strict";t.d(P,{N:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.discovery"})},58513:function(_,P,t){"use strict";t.d(P,{V:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.error"})},82723:function(_,P,t){"use strict";t.d(P,{C:function(){return i},W:function(){return d}});var o=t(95965),i;(function(b){b[b.None=0]="None",b[b.Active=1]="Active"})(i||(i={}));const d=(0,o.T)({id:"core.featureflags"})},85094:function(_,P,t){"use strict";t.d(P,{g:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.fetch"})},77186:function(_,P,t){"use strict";t.d(P,{$:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.identity"})},96253:function(_,P,t){"use strict";t.d(P,{o:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"core.translation"})},95965:function(_,P,t){"use strict";t.d(P,{T:function(){return d}});var o=t(87612);class i{get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}constructor(m){if((0,o._)(this,"config",void 0),this.config=m,!m.id.split(".").flatMap(l=>l.split("-")).every(l=>l.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${m.id}'`)}}function d(b){return new i(b)}},42380:function(_,P,t){"use strict";t.d(P,{n:function(){return o}});function o(i,d){return"id"in i?{api:i,deps:{},factory:()=>d}:i}},44394:function(_,P,t){"use strict";t.d(P,{I_:function(){return b},h_:function(){return m}});var o=t(52322),i=t(2784),d=t(29651);function b(){const l=(0,d.Vt)("api-context");if(!l)throw new Error("API context is not available");const g=l.atVersion(1);if(!g)throw new Error("ApiContext v1 not available");return g}function m(l){const S=b().get(l);if(!S)throw new Error(`No implementation available for ${l}`);return S}function f(l){return function(S){const A=x=>{const C=b(),E={};for(const U in l)if(l.hasOwnProperty(U)){const B=l[U],w=C.get(B);if(!w)throw new Error(`No implementation available for ${B}`);E[U]=w}return _jsx(S,{...x,...E})},R=S.displayName||S.name||"Component";return A.displayName=`withApis(${R})`,A}}},80851:function(_,P,t){"use strict";t.d(P,{q:function(){return i}});var o=t(29651);const i=()=>{const d=(0,o.Vt)("app-context");if(!d)throw new Error("App context is not available");const b=d.atVersion(1);if(!b)throw new Error("AppContext v1 not available");return b}},62584:function(_,P,t){"use strict";t.d(P,{I:function(){return m},R:function(){return b}});var o=t(96087);const i=(0,o.u)("component-data-store",()=>new WeakMap),d="__backstage_data";function b(f,l,g){const S=f;var A;let R=(A=S[d])!==null&&A!==void 0?A:i.get(f);if(R||(R={map:new Map},Object.defineProperty(S,d,{enumerable:!1,configurable:!0,writable:!1,value:R}),i.set(f,R)),R.map.has(l)){const x=f.displayName||f.name;throw new Error(`Attempted to attach duplicate data "${l}" to component "${x}"`)}R.map.set(l,g)}function m(f,l){if(!f)return;const g=f.type;if(!g)return;var S;const A=(S=g[d])!==null&&S!==void 0?S:i.get(g);if(A)return A.map.get(l)}},82963:function(_,P,t){"use strict";t.d(P,{CO:function(){return x},YO:function(){return C},P4:function(){return R}});var o=t(52322),i=t(2784),d=t(62369),b=t(72388),m=t(80851),f=t(37321),l=t(62584),g=t(87612);class S extends i.Component{static getDerivedStateFromError(U){return{error:U}}render(){const{error:U}=this.state,{app:B,plugin:w}=this.props,{ErrorBoundaryFallback:$}=B.getComponents();return U?(0,o.jsx)($,{error:U,resetError:this.handleErrorReset,plugin:w}):this.props.children}constructor(...U){super(...U),(0,g._)(this,"state",{error:void 0}),(0,g._)(this,"handleErrorReset",()=>{this.setState({error:void 0})})}}var A=t(7355);function R(E){const{component:U,mountPoint:B,name:w}=E;return C({component:{lazy:()=>U().then($=>{const I=K=>{const V=(0,d.z)();try{(0,f.t)(B)}catch(J){if(typeof J=="object"&&J!==null){const{message:H}=J;if(typeof H=="string"&&H.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${B} 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 J}return(0,i.useEffect)(()=>{V.captureEvent(A.h,"")},[V]),(0,o.jsx)($,{...K})},p=w||$.displayName||$.name||"LazyComponent";return I.displayName=`RoutableExtension(${p})`,I},$=>p=>{const K=(0,m.q)(),{BootErrorPage:V}=K.getComponents();return(0,o.jsx)(V,{step:"load-chunk",error:$})})},data:{"core.mountPoint":B},name:w})}function x(E){const{component:U,name:B}=E;return C({component:U,name:B})}function C(E){const{data:U={},name:B}=E;B||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let w;if("lazy"in E.component){const I=E.component.lazy;w=(0,i.lazy)(()=>I().then(p=>({default:p})))}else w=E.component.sync;const $=B||w.displayName||w.name||"Component";return{expose(I){const p=K=>{const V=(0,m.q)(),{Progress:J}=V.getComponents(),H=U==null?void 0:U["core.mountPoint"];return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(J,{}),children:(0,o.jsx)(S,{app:V,plugin:I,children:(0,o.jsx)(b.fC,{attributes:{pluginId:I.getId(),...B&&{extension:B},...H&&{routeRef:H.id}},children:(0,o.jsx)(w,{...K})})})})};(0,l.R)(p,"core.plugin",I),(0,l.R)(p,"core.extensionName",B);for(const[K,V]of Object.entries(U))(0,l.R)(p,K,V);return p.displayName=`Extension(${$})`,p}}}},2532:function(_,P,t){"use strict";t.d(P,{v:function(){return g}});var o=t(87612),i=t(2784),d=t(62584),b=t(44394),m=t(82723);function f(S,A,R,x){return i.Children.toArray(S).flatMap(C=>{if(!(0,i.isValidElement)(C))return[];if(C.type===i.Fragment)return f(C.props.children,A,R,x);if((0,d.I)(C,"core.featureFlagged")){const E=C.props;return("with"in E?A.isActive(E.with):!A.isActive(E.without))?f(C.props.children,A,R,x):[]}if(R===void 0||R(C))return[C];if(x)throw new Error(x);return f(C.props.children,A,R,x)})}class l{selectByComponentData(A){const R=f(this.node,this.featureFlagsApi,x=>(0,d.I)(x,A.key)!==void 0,A.withStrictError);return new l(R,this.featureFlagsApi)}findComponentData(A){return f(this.node,this.featureFlagsApi,x=>(0,d.I)(x,A.key)!==void 0).map(x=>(0,d.I)(x,A.key)).filter(x=>x!==void 0)}getElements(){return f(this.node,this.featureFlagsApi)}constructor(A,R){(0,o._)(this,"node",void 0),(0,o._)(this,"featureFlagsApi",void 0),this.node=A,this.featureFlagsApi=R}}function g(S,A,R=[]){const x=(0,b.h_)(m.W),C=new l(S,x);return(0,i.useMemo)(()=>A(C),[S,...R])}},15006:function(_,P,t){"use strict";t.d(P,{r:function(){return d}});var o=t(87612);class i{getId(){return this.config.id}getApis(){var m;return(m=this.config.apis)!==null&&m!==void 0?m:[]}getFeatureFlags(){var m,f;return(f=(m=this.config.featureFlags)===null||m===void 0?void 0:m.slice())!==null&&f!==void 0?f:[]}get routes(){var m;return(m=this.config.routes)!==null&&m!==void 0?m:{}}get externalRoutes(){var m;return(m=this.config.externalRoutes)!==null&&m!==void 0?m:{}}provide(m){return m.expose(this)}toString(){return`plugin{${this.config.id}}`}constructor(m){(0,o._)(this,"config",void 0),this.config=m}}function d(b){return new i(b)}},30283:function(_,P,t){"use strict";t.d(P,{N:function(){return f}});var o=t(87612),i=t(92918);let d=i.K,b=d;class m{get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}constructor(g,S){(0,o._)(this,"id",void 0),(0,o._)(this,"params",void 0),(0,o._)(this,b,void 0),this.id=g,this.params=S,this[d]="absolute"}}function f(l){var g;return new m(l.id,(g=l.params)!==null&&g!==void 0?g:[])}},92918:function(_,P,t){"use strict";t.d(P,{K:function(){return i}});var o=t(96087);const i=(0,o.u)("route-ref-type",()=>Symbol("route-ref-type"))},37321:function(_,P,t){"use strict";t.d(P,{t:function(){return b}});var o=t(2784),i=t(73557),d=t(29651);function b(m){const{pathname:f}=(0,i.TH)(),l=(0,d.Vt)("routing-context");if(!l)throw new Error("Routing context is not available");const g=l.atVersion(1),S=(0,o.useMemo)(()=>g&&g.resolve(m,{pathname:f}),[g,m,f]);if(!l)throw new Error("useRouteRef used outside of routing context");if(!g)throw new Error("RoutingContext v1 not available");const A="optional"in m&&m.optional;if(!S&&!A)throw new Error(`No path for ${m}`);return S}},35304:function(_,P,t){"use strict";t.d(P,{F:function(){return A},y:function(){return R}});var o=t(88412),i=t(52475),d=t(80956),b=t(87612),m=t(18015),f=new WeakMap,l=new WeakMap,g=new WeakMap;class S{get id(){return(0,o._)(this,f)}get T(){throw new Error("Not implemented")}getDefaultMessages(){return(0,o._)(this,l)}setDefaultResource(C){(0,d._)(this,g,C)}getDefaultResource(){return(0,o._)(this,g)}toString(){return`TranslationRef{id=${this.id}}`}constructor(C){(0,i._)(this,f,{writable:!0,value:void 0}),(0,i._)(this,l,{writable:!0,value:void 0}),(0,i._)(this,g,{writable:!0,value:void 0}),(0,b._)(this,"$$type","@backstage/TranslationRef"),(0,b._)(this,"version","v1"),(0,d._)(this,f,C.id),(0,d._)(this,l,C.messages)}}function A(x){const C=new S(x);return x.translations&&C.setDefaultResource((0,m.N)({ref:C,translations:x.translations})),C}function R(x){const C=x;if(C.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${C.$$type}'`);if(C.version!=="v1")throw new Error(`Invalid translation ref, bad version '${C.version}'`);return C}},18015:function(_,P,t){"use strict";t.d(P,{N:function(){return i},W:function(){return o}});function o(d){const b=d;if(b.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${b.$$type}'`);if(b.version!=="v1")throw new Error(`Invalid translation resource, bad version '${b.version}'`);return b}function i(d){return{$$type:"@backstage/TranslationResource",version:"v1",id:d.ref.id,resources:Object.entries(d.translations).map(([b,m])=>({language:b,loader:()=>m().then(f=>{const l=f.default;return{messages:(l==null?void 0:l.$$type)==="@backstage/TranslationMessages"?l.messages:l}})}))}}},41385:function(_,P,t){"use strict";t.d(P,{V:function(){return b}});var o=t(87612),i=t(48998);async function d(m){try{const l=await m.text();if(l){var f;if(!((f=m.headers.get("content-type"))===null||f===void 0)&&f.startsWith("application/json"))try{const g=JSON.parse(l);if(g.error&&g.response)return g}catch{}return{error:{name:"Error",message:`Request failed with status ${m.status} ${m.statusText}, ${l}`},response:{statusCode:m.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${m.status} ${m.statusText}`},response:{statusCode:m.status}}}class b extends Error{static async fromResponse(f){const l=await d(f),g=l.response.statusCode||f.status,S=l.error.name||f.statusText,A=`Request failed with ${g} ${S}`,R=(0,i.Fq)(l.error);return new b({message:A,response:f,data:l,cause:R})}constructor(f){super(f.message),(0,o._)(this,"response",void 0),(0,o._)(this,"body",void 0),(0,o._)(this,"cause",void 0),this.name="ResponseError",this.response=f.response,this.body=f.data,this.cause=f.cause}}},30474:function(_,P,t){"use strict";t.d(P,{V:function(){return o}});function o(d){if(typeof d!="object"||d===null||Array.isArray(d))return!1;const b=d;return!(typeof b.name!="string"||b.name===""||typeof b.message!="string")}function i(d){if(typeof d!="object"||d===null||Array.isArray(d))throw new Error(`Encountered invalid error, not an object, got '${d}'`);const b=d;if(typeof b.name!="string"||b.name==="")throw new Error(`Encountered error object without a name, got '${d}'`);if(typeof b.message!="string")throw new Error(`Encountered error object without a message, got '${d}'`)}},48998:function(_,P,t){"use strict";t.d(P,{Fq:function(){return m},n:function(){return f}});var o=t(24852),i=t.n(o),d=t(30474);function b(l,g){const A={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(l)};return g!=null&&g.includeStack||delete A.stack,A}function m(l){const g=(0,o.deserializeError)(l);return l.stack||(g.stack=void 0),g}function f(l){if((0,d.V)(l)){const g=String(l);return g!=="[object Object]"?g:`${l.name}: ${l.message}`}return`unknown error '${l}'`}},91657:function(_,P,t){"use strict";t.d(P,{a:function(){return se},q:function(){return xe}});var o=t(87612),i=t(38264);const d="amazonaws.com";function b(M){const u=M.getOptionalString("endpoint");var T;const W=(T=M.getOptionalBoolean("s3ForcePathStyle"))!==null&&T!==void 0?T:!1;let rt,St;if(u){try{const Bt=new URL(u);rt=Bt.host,St=Bt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${u}' is not a valid URL`)}if(St!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${u}'`)}else rt=d;const Rt=M.getOptionalString("accessKeyId"),oe=M.getOptionalString("secretAccessKey"),_t=M.getOptionalString("roleArn"),Zt=M.getOptionalString("externalId");return{host:rt,endpoint:u,s3ForcePathStyle:W,accessKeyId:Rt,secretAccessKey:oe,roleArn:_t,externalId:Zt}}function m(M){const u=M.map(b);return u.some(T=>T.host===d)||u.push({host:d}),u}class f{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){return(0,i.FI)(u)}resolveEditUrl(u){return u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(f,"factory",({config:M})=>{var u;const T=m((u=M.getOptionalConfigArray("integrations.awsS3"))!==null&&u!==void 0?u:[]);return(0,i.gz)(T.map(W=>new f(W)),W=>W.config.host)});var l=t(88412),g=t(52475),S=t(80956);const A="GB";var R=new WeakMap,x=new WeakMap,C=new WeakMap,E=new WeakMap,U=new WeakMap,B=new WeakMap,w=new WeakMap;class ${static fromRepoUrl(u){const T=new URL(u);let W,rt,St;const Rt=T.pathname.split("/").map(pe=>decodeURIComponent(pe));if(Rt[2]==="_git"?(W=Rt[1],rt=St=Rt[3]):Rt[3]==="_git"?(W=Rt[1],rt=Rt[2],St=Rt[4]):Rt[4]==="_git"&&(W=`${Rt[1]}/${Rt[2]}`,rt=Rt[3],St=Rt[5]),!W||!rt||!St)throw new Error("Azure URL must point to a git repository");var oe;const _t=(oe=T.searchParams.get("path"))!==null&&oe!==void 0?oe:void 0;let Zt;const Bt=T.searchParams.get("version");if(Bt){if(Bt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Zt=Bt.slice(2)}return new $(T.origin,W,rt,St,_t,Zt)}toRepoUrl(){let u;return(0,l._)(this,C)===(0,l._)(this,E)?u=(0,l._)(this,w).call(this,(0,l._)(this,x),"_git",(0,l._)(this,E)):u=(0,l._)(this,w).call(this,(0,l._)(this,x),(0,l._)(this,C),"_git",(0,l._)(this,E)),(0,l._)(this,U)&&u.searchParams.set("path",(0,l._)(this,U)),(0,l._)(this,B)&&u.searchParams.set("version",A+(0,l._)(this,B)),u.toString()}toFileUrl(){if(!(0,l._)(this,U))throw new Error("Azure URL must point to a specific path to be able to download a file");const u=(0,l._)(this,w).call(this,(0,l._)(this,x),(0,l._)(this,C),"_apis","git","repositories",(0,l._)(this,E),"items");return u.searchParams.set("api-version","6.0"),u.searchParams.set("path",(0,l._)(this,U)),(0,l._)(this,B)&&u.searchParams.set("version",(0,l._)(this,B)),u.toString()}toArchiveUrl(){const u=(0,l._)(this,w).call(this,(0,l._)(this,x),(0,l._)(this,C),"_apis","git","repositories",(0,l._)(this,E),"items");return u.searchParams.set("recursionLevel","full"),u.searchParams.set("download","true"),u.searchParams.set("api-version","6.0"),(0,l._)(this,U)&&u.searchParams.set("scopePath",(0,l._)(this,U)),(0,l._)(this,B)&&u.searchParams.set("version",(0,l._)(this,B)),u.toString()}toCommitsUrl(){const u=(0,l._)(this,w).call(this,(0,l._)(this,x),(0,l._)(this,C),"_apis","git","repositories",(0,l._)(this,E),"commits");return u.searchParams.set("api-version","6.0"),(0,l._)(this,B)&&u.searchParams.set("searchCriteria.itemVersion.version",(0,l._)(this,B)),u.toString()}getOwner(){return(0,l._)(this,x)}getProject(){return(0,l._)(this,C)}getRepo(){return(0,l._)(this,E)}getPath(){return(0,l._)(this,U)}getRef(){return(0,l._)(this,B)}constructor(u,T,W,rt,St,Rt){(0,g._)(this,R,{writable:!0,value:void 0}),(0,g._)(this,x,{writable:!0,value:void 0}),(0,g._)(this,C,{writable:!0,value:void 0}),(0,g._)(this,E,{writable:!0,value:void 0}),(0,g._)(this,U,{writable:!0,value:void 0}),(0,g._)(this,B,{writable:!0,value:void 0}),(0,g._)(this,w,{writable:!0,value:(...oe)=>{const _t=new URL((0,l._)(this,R));return _t.pathname=oe.map(Zt=>encodeURIComponent(Zt)).join("/"),_t}}),(0,S._)(this,R,u),(0,S._)(this,x,T),(0,S._)(this,C,W),(0,S._)(this,E,rt),(0,S._)(this,U,St),(0,S._)(this,B,Rt)}}const I="dev.azure.com",p=["clientId","clientSecret","tenantId","personalAccessToken"],K=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function V(M){for(const u of K.entries()){const[T,W]=u,rt=p.filter(St=>!W.includes(St));if(W.every(St=>M[St]!==void 0)&&rt.every(St=>M[St]===void 0))return{kind:T,organizations:M.organizations,...W.reduce((St,Rt)=>(St[Rt]=M[Rt],St),{})}}throw new Error("is not a valid credential")}function J(M){var u,T;const W=(T=M.getOptionalString("host"))!==null&&T!==void 0?T:I;let rt=(u=M.getOptionalConfigArray("credentials"))===null||u===void 0?void 0:u.map(Zt=>({organizations:Zt.getOptionalStringArray("organizations"),personalAccessToken:Zt.getOptionalString("personalAccessToken"),tenantId:Zt.getOptionalString("tenantId"),clientId:Zt.getOptionalString("clientId"),clientSecret:Zt.getOptionalString("clientSecret")}));const St=M.getOptionalString("token");if(M.getOptional("credential")!==void 0&&M.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(M.getOptional("token")!==void 0&&M.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(St!==void 0){const Zt=[{personalAccessToken:St}];var Rt;rt=(Rt=rt==null?void 0:rt.concat(Zt))!==null&&Rt!==void 0?Rt:Zt}if(M.getOptional("credential")!==void 0){const Zt=[{organizations:M.getOptionalStringArray("credential.organizations"),token:M.getOptionalString("credential.token"),tenantId:M.getOptionalString("credential.tenantId"),clientId:M.getOptionalString("credential.clientId"),clientSecret:M.getOptionalString("credential.clientSecret")}];var oe;rt=(oe=rt==null?void 0:rt.concat(Zt))!==null&&oe!==void 0?oe:Zt}if(!(0,i.bK)(W))throw new Error(`Invalid Azure integration config, '${W}' is not a valid host`);let _t;if(rt!==void 0){const Zt=rt==null?void 0:rt.reduce((Bt,pe,Ie)=>{let Nt;try{V(pe)}catch(te){Nt=te.message}return Nt!==void 0&&Bt.push(`credential at position ${Ie+1} ${Nt}`),Bt},Array.of()).concat(Object.entries(rt.filter(Bt=>Bt.organizations!==void 0&&Bt.organizations.length>0).reduce((Bt,pe,Ie)=>{var Nt;return(Nt=pe.organizations)===null||Nt===void 0||Nt.forEach(te=>{Bt[te]||(Bt[te]=[]),Bt[te].push(Ie+1)}),Bt},{})).filter(([Bt,pe])=>pe.length>1).reduce((Bt,[pe,Ie])=>(Bt.push(`organization ${pe} is specified multiple times in credentials at positions ${Ie.slice(0,Ie.length-1).join(", ")} and ${Ie[Ie.length-1]}`),Bt),Array.of()));if((Zt==null?void 0:Zt.length)>0)throw new Error(`Invalid Azure integration config for ${W}: ${Zt.join("; ")}`);if(_t=rt.map(Bt=>V(Bt)),_t.some(Bt=>Bt.kind!=="PersonalAccessToken")&&W!==I)throw new Error(`Invalid Azure integration config for ${W}, only personal access tokens can be used with hosts other than ${I}`);if(_t.filter(Bt=>Bt.organizations===void 0||Bt.organizations.length===0).length>1)throw new Error(`Invalid Azure integration config for ${W}, you cannot specify multiple credentials without organizations`)}return{host:W,credentials:_t}}function H(M){const u=M.map(J);return u.some(T=>T.host===I)||u.push({host:I}),u}class G{get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const{url:T,base:W}=u;if((0,i.jv)(T))return T;try{const St=$.fromRepoUrl(W),Rt=new URL(W);var rt;const oe=new URL(`https://a.com${(rt=St.getPath())!==null&&rt!==void 0?rt:""}`),_t=new URL(T,oe).pathname;return Rt.searchParams.set("path",_t),u.lineNumber&&(Rt.searchParams.set("line",String(u.lineNumber)),Rt.searchParams.set("lineEnd",String(u.lineNumber+1)),Rt.searchParams.set("lineStartColumn","1"),Rt.searchParams.set("lineEndColumn","1")),Rt.toString()}catch{return new URL(T,W).toString()}}resolveEditUrl(u){return u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(G,"factory",({config:M})=>{var u;const T=H((u=M.getOptionalConfigArray("integrations.azure"))!==null&&u!==void 0?u:[]);return(0,i.gz)(T.map(W=>new G(W)),W=>W.config.host)});var z=t(82717),Y=t.n(z);const ot="bitbucket.org",ct="https://api.bitbucket.org/2.0";function dt(M){const u=ot,T=ct,W=M.getString("username"),rt=M.getString("appPassword");return{host:u,apiBaseUrl:T,username:W,appPassword:rt}}function ft(M){const u=M.map(dt);return u.length===0&&u.push({host:ot,apiBaseUrl:ct}),u}class Ot{get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const T=(0,i.FI)(u);if(u.lineNumber){const W=new URL(T);return W.hash=`lines-${u.lineNumber}`,W.toString()}return T}resolveEditUrl(u){const T=Y()(u),W=new URL(u);return W.searchParams.set("mode","edit"),W.searchParams.set("at",T.ref),W.toString()}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(Ot,"factory",({config:M})=>{var u;const T=ft((u=M.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&u!==void 0?u:[]);return(0,i.gz)(T.map(W=>new Ot(W)),W=>W.config.host)});var at=t(76635);const At="bitbucket.org",X="https://api.bitbucket.org/2.0";function L(M){var u;const T=(u=M.getOptionalString("host"))!==null&&u!==void 0?u:At;let W=M.getOptionalString("apiBaseUrl");const rt=M.getOptionalString("token"),St=M.getOptionalString("username"),Rt=M.getOptionalString("appPassword");if(!(0,i.bK)(T))throw new Error(`Invalid Bitbucket integration config, '${T}' is not a valid host`);return W?W=(0,at.trimEnd)(W,"/"):T===At?W=X:W=`https://${T}/rest/api/1.0`,{host:T,apiBaseUrl:W,token:rt,username:St,appPassword:Rt}}function Q(M){const u=M.map(L);return u.some(T=>T.host===At)||u.push({host:At,apiBaseUrl:X}),u}class et{get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const T=(0,i.FI)(u);if(!u.lineNumber)return T;const W=new URL(T);return this.integrationConfig.host==="bitbucket.org"?W.hash=`lines-${u.lineNumber}`:W.hash=`${u.lineNumber}`,W.toString()}resolveEditUrl(u){const T=Y()(u),W=new URL(u);return W.searchParams.set("mode","edit"),W.searchParams.set("spa","0"),W.searchParams.set("at",T.ref),W.toString()}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(et,"factory",({config:M})=>{var u,T,W;const rt=Q((W=M.getOptionalConfigArray("integrations.bitbucket"))!==null&&W!==void 0?W:[...(u=M.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&u!==void 0?u:[],...(T=M.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&T!==void 0?T:[]]);return(0,i.gz)(rt.map(St=>new et(St)),St=>St.config.host)});function it(M){const u=M.getString("host");let T=M.getOptionalString("apiBaseUrl");const W=M.getOptionalString("token"),rt=M.getOptionalString("username"),St=M.getOptionalString("password");if(!(0,i.bK)(u))throw new Error(`Invalid Bitbucket Server integration config, '${u}' is not a valid host`);return T?T=(0,at.trimEnd)(T,"/"):T=`https://${u}/rest/api/1.0`,{host:u,apiBaseUrl:T,token:W,username:rt,password:St}}function ut(M){return M.map(it)}class Z{get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const T=(0,i.FI)(u);if(u.lineNumber){const W=new URL(T);return W.hash=u.lineNumber.toString(),W.toString()}return T}resolveEditUrl(u){return u.includes("?")?u.substring(0,u.indexOf("?")):u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(Z,"factory",({config:M})=>{var u;const T=ut((u=M.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&u!==void 0?u:[]);return(0,i.gz)(T.map(W=>new Z(W)),W=>W.config.host)});function F(M){const u=M.getString("host");let T=M.getOptionalString("baseUrl"),W=M.getOptionalString("cloneUrl"),rt=M.getOptionalString("gitilesBaseUrl");const St=M.getOptionalString("username"),Rt=M.getOptionalString("password");if((0,i.bK)(u)){if(T&&!(0,i.jv)(T))throw new Error(`Invalid Gerrit integration config, '${T}' is not a valid baseUrl`);if(W&&!(0,i.jv)(W))throw new Error(`Invalid Gerrit integration config, '${W}' is not a valid cloneUrl`);if(rt&&!(0,i.jv)(rt))throw new Error(`Invalid Gerrit integration config, '${rt}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${u}' is not a valid host`);return T?T=(0,at.trimEnd)(T,"/"):T=`https://${u}`,rt?rt=(0,at.trimEnd)(rt,"/"):rt=`https://${u}`,W?W=(0,at.trimEnd)(W,"/"):W=T,{host:u,baseUrl:T,cloneUrl:W,gitilesBaseUrl:rt,username:St,password:Rt}}function ht(M){return M.map(F)}var xt=t(48834).lW;const vt=")]}'";function yt(M,u){const T=new URL(M.gitilesBaseUrl),W=new URL(u),St=W.pathname.substring(W.pathname.startsWith("/a/")?2:0).replace(T.pathname,"").split("/").filter(pe=>!!pe),Rt=St.indexOf("+");if(Rt<=0)throw new Error(`Unable to parse project from url: ${u}`);const oe=(0,at.trimStart)(St.slice(0,Rt).join("/"),"/"),_t=St.indexOf("heads");if(_t<=0)throw new Error(`Unable to parse branch from url: ${u}`);const Zt=St[_t+1],Bt=St.slice(_t+2).join("/");return{branch:Zt,filePath:Bt===""?"/":Bt,project:oe}}function gt(M,u,T,W){return`${M.gitilesBaseUrl}/${u}/+/refs/heads/${T}/${(0,at.trimStart)(W,"/")}`}function bt(M,u,T,W){const rt=W==="/"||W===""?".tar.gz":`/${W}.tar.gz`;return`${jt(M)}/${u}/+archive/refs/heads/${T}${rt}`}function It(M){return M.password?"/a/":"/"}function jt(M){if(!M.baseUrl||!M.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(M.gitilesBaseUrl.startsWith(M.baseUrl))return M.gitilesBaseUrl.replace(M.baseUrl.concat("/"),M.baseUrl.concat(It(M)));if(M.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return M.gitilesBaseUrl}function ge(M,u){const{branch:T,project:W}=yt(M,u);return`${M.baseUrl}${It(M)}projects/${encodeURIComponent(W)}/branches/${T}`}function Se(M,u){const{project:T}=yt(M,u);return`${M.cloneUrl}${It(M)}${T}`}function Ee(M,u){const{branch:T,filePath:W,project:rt}=yt(M,u);return`${M.baseUrl}${It(M)}projects/${encodeURIComponent(rt)}/branches/${T}/files/${encodeURIComponent(W)}/content`}function $t(M){return`${M.baseUrl}${It(M)}projects/`}function Lt(M){const u={};if(!M.password)return u;const T=xt.from(`${M.username}:${M.password}`,"utf8");return u.Authorization=`Basic ${T.toString("base64")}`,{headers:u}}async function Kt(M){const u=await M.text();if(u.startsWith(vt))try{return JSON.parse(u.slice(vt.length))}catch(T){throw new Error(`Invalid response from Gerrit: ${u.slice(0,10)} - ${T}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${u.slice(0,10)}`)}class Yt{get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const{url:T,base:W,lineNumber:rt}=u;let St;if(T.startsWith("/")){const{branch:Rt,project:oe}=yt(this.config,W);return gt(this.config,oe,Rt,T)}return T?St=new URL(T,W):St=new URL(W),rt&&(St.hash=rt.toString()),St.toString()}resolveEditUrl(u){return u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(Yt,"factory",({config:M})=>{var u;const T=ht((u=M.getOptionalConfigArray("integrations.gerrit"))!==null&&u!==void 0?u:[]);return(0,i.gz)(T.map(W=>new Yt(W)),W=>W.config.host)});var qt=t(61800);const Qt="gitlab.com",fe="https://gitlab.com/api/v4";function je(M){const u=M.getString("host");let T=M.getOptionalString("apiBaseUrl");const W=M.getOptionalString("token");let rt=M.getOptionalString("baseUrl");if(T?T=(0,at.trimEnd)(T,"/"):u===Qt&&(T=fe),rt?rt=(0,at.trimEnd)(rt,"/"):rt=`https://${u}`,(0,i.bK)(u)){if(!T||!(0,i.jv)(T))throw new Error(`Invalid GitLab integration config, '${T}' is not a valid apiBaseUrl`);if(!(0,i.jv)(rt))throw new Error(`Invalid GitLab integration config, '${rt}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${u}' is not a valid host`);return{host:u,token:W,apiBaseUrl:T,baseUrl:rt}}function Ye(M){const u=M.map(je);return u.some(T=>T.host===Qt)||u.push({host:Qt,apiBaseUrl:fe,baseUrl:`https://${Qt}`}),u}function Ke(M){let u="";return M.host!==Qt&&(u=new URL(M.baseUrl).pathname),trimEnd(u,"/")}class be{get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){return(0,i.FI)(u)}resolveEditUrl(u){return Qe(u,"edit")}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(be,"factory",({config:M})=>{var u;const T=Ye((u=M.getOptionalConfigArray("integrations.gitlab"))!==null&&u!==void 0?u:[]);return(0,i.gz)(T.map(W=>new be(W)),W=>W.config.host)});function Qe(M,u){return M.replace(/\/\-\/(blob|tree|edit)\//,`/-/${u}/`)}function Je(M){const u=M.getString("host");let T=M.getOptionalString("baseUrl");const W=M.getOptionalString("username"),rt=M.getOptionalString("password");if(!(0,i.bK)(u))throw new Error(`Invalid Gitea integration config, '${u}' is not a valid host`);return T?T=(0,at.trimEnd)(T,"/"):T=`https://${u}`,{host:u,baseUrl:T,username:W,password:rt}}var ze=t(48834).lW;function ne(M,u){const T=re(M,u);return`${T.url}/${T.owner}/${T.name}/_edit/${T.ref}/${T.path}`}function on(M,u){const T=re(M,u);return`${T.url}/api/v1/repos/${T.owner}/${T.name}/contents/${T.path}?ref=${T.ref}`}function Oe(M,u){const T=re(M,u);return`${T.url}/api/v1/repos/${T.owner}/${T.name}/archive/${T.ref}.tar.gz`}function rn(M,u){const T=re(M,u);return`${T.url}/api/v1/repos/${T.owner}/${T.name}/git/commits/${T.ref}`}function Xe(M){const u={},{username:T,password:W}=M;return W?(T?u.Authorization=`basic ${ze.from(`${T}:${W}`).toString("base64")}`:u.Authorization=`token ${W}`,{headers:u}):u}function re(M,u){var T;const W=(T=M.baseUrl)!==null&&T!==void 0?T:`https://${M.host}`;try{const[rt,St,Rt,oe,_t,Zt,...Bt]=u.replace(W,"").split("/"),pe=Bt.join("/").replace(/^\//,"");return{url:W,owner:St,name:Rt,ref:Zt,path:pe}}catch(rt){throw new Error(`Incorrect URL: ${u}, ${rt}`)}}class $e{get type(){return"gitea"}get title(){return this.config.host}resolveUrl(u){return(0,i.FI)(u)}resolveEditUrl(u){return ne(this.config,u)}constructor(u){(0,o._)(this,"config",void 0),this.config=u}}(0,o._)($e,"factory",({config:M})=>{var u;const W=((u=M.getOptionalConfigArray("integrations.gitea"))!==null&&u!==void 0?u:[]).map(rt=>Je(rt));return(0,i.gz)(W.map(rt=>new $e(rt)),rt=>rt.config.host)});class Be{static fromConfig(u){return new Be({awsS3:f.factory({config:u}),azure:G.factory({config:u}),bitbucket:et.factory({config:u}),bitbucketCloud:Ot.factory({config:u}),bitbucketServer:Z.factory({config:u}),gerrit:Yt.factory({config:u}),github:qt.X.factory({config:u}),gitlab:be.factory({config:u}),gitea:$e.factory({config:u})})}get awsS3(){return this.byType.awsS3}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}list(){return Object.values(this.byType).flatMap(u=>u.list())}byUrl(u){let T=Object.values(this.byType).map(W=>W.byUrl(u)).filter(Boolean);if(T.length>1){const W=T.filter(rt=>!(rt instanceof et));W.length!==0&&(T=W)}return T[0]}byHost(u){return Object.values(this.byType).map(T=>T.byHost(u)).find(Boolean)}resolveUrl(u){const T=this.byUrl(u.base);return T?T.resolveUrl(u):(0,i.FI)(u)}resolveEditUrl(u){const T=this.byUrl(u);return T?T.resolveEditUrl(u):u}constructor(u){(0,o._)(this,"byType",void 0),this.byType=u}}var _e=t(95965);class se{static fromConfig(u){return Be.fromConfig(u)}}const xe=(0,_e.T)({id:"integration.scmintegrations"})},61800:function(_,P,t){"use strict";t.d(P,{X:function(){return S},B:function(){return A}});var o=t(87612),i=t(38264),d=t(76635);const b="github.com",m="https://api.github.com",f="https://raw.githubusercontent.com";function l(R){var x,C;const E=(C=R.getOptionalString("host"))!==null&&C!==void 0?C:b;let U=R.getOptionalString("apiBaseUrl"),B=R.getOptionalString("rawBaseUrl");const w=R.getOptionalString("token"),$=(x=R.getOptionalConfigArray("apps"))===null||x===void 0?void 0:x.map(I=>({appId:I.getNumber("appId"),clientId:I.getString("clientId"),clientSecret:I.getString("clientSecret"),webhookSecret:I.getString("webhookSecret"),privateKey:I.getString("privateKey"),allowedInstallationOwners:I.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,i.bK)(E))throw new Error(`Invalid GitHub integration config, '${E}' is not a valid host`);return U?U=(0,d.trimEnd)(U,"/"):E===b&&(U=m),B?B=(0,d.trimEnd)(B,"/"):E===b&&(B=f),{host:E,apiBaseUrl:U,rawBaseUrl:B,token:w,apps:$}}function g(R){const x=R.map(l);return x.some(C=>C.host===b)||x.push({host:b,apiBaseUrl:m,rawBaseUrl:f}),x}class S{get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(x){return A((0,i.FI)(x),"tree")}resolveEditUrl(x){return A(x,"edit")}constructor(x){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=x}}(0,o._)(S,"factory",({config:R})=>{var x;const C=g((x=R.getOptionalConfigArray("integrations.github"))!==null&&x!==void 0?x:[]);return(0,i.gz)(C.map(E=>new S(E)),E=>E.config.host)});function A(R,x){return R.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(C,E,U,B)=>`//${E}/${U}/${B}/${x}/`)}},38264:function(_,P,t){"use strict";t.d(P,{FI:function(){return g},bK:function(){return m},gz:function(){return l},jv:function(){return f}});var o=t(82717),i=t.n(o),d=t(76635),b=t.n(d);function m(A){const R=new URL("http://example.com");return R.host=A,R.host===A}function f(A){try{return new URL(A),!0}catch{return!1}}function l(A,R){return{list(){return A},byUrl(x){try{const C=typeof x=="string"?new URL(x):x;return A.find(E=>R(E)===C.host)}catch{return}},byHost(x){return A.find(C=>R(C)===x)}}}function g(A){const{url:R,base:x,lineNumber:C}=A;try{return new URL(R),R}catch{}let E;if(R.startsWith("/")){const{filepath:U}=i()(x);E=new URL(x);const B=(0,d.trimEnd)(E.pathname.substring(0,E.pathname.length-U.length),"/");E.pathname=`${B}${R}`}else E=new URL(R,x);return E.search=new URL(x).search,C&&(E.hash=`L${C}`),E.toString()}function S(A){beforeAll(()=>A.listen({onUnhandledRequest:"error"})),afterAll(()=>A.close()),afterEach(()=>A.resetHandlers())}},99329:function(_,P,t){"use strict";var o={};t.r(o),t.d(o,{TechDocsPlugin:function(){return f.s4}});var i=t(52322),d=t(2784),b=t(17029),m=t(73557),f=t(4577),l=t(29895),g=t(2296),S=t(57058),A=t(77277),R=t(87435),x=t(74359),C=t(55015),E=t(71597);function U({children:r}){return(0,m.GV)()?(0,i.jsx)(i.Fragment,{children:r}):(0,i.jsx)(m.VA,{children:r})}const B=()=>(0,i.jsx)(R.m,{status:"404",statusMessage:"PAGE NOT FOUND"}),w=({step:r,error:e})=>{let n="";return r==="load-config"?n=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(n=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,i.jsx)(U,{children:(0,i.jsx)(R.m,{status:"501",statusMessage:n})})},$=({error:r,resetError:e,plugin:n})=>(0,i.jsx)(x.y,{title:`Error in ${n==null?void 0:n.getId()}`,defaultExpanded:!0,error:r,children:(0,i.jsx)(A.Z,{variant:"outlined",onClick:e,children:"Retry"})}),I={Progress:C.E,Router:E.VK,NotFoundErrorPage:B,BootErrorPage:w,ErrorBoundaryFallback:$};var p=t(87612);const K="Invalid discovery URL pattern,";class V{static compile(e){const n=e.split(/\{\{\s*pluginId\s*\}\}/),s=n.join("pluginId");let a;try{a=new URL(s)}catch{throw new Error(`${K} URL '${s}' is invalid`)}if(a.hash)throw new Error(`${K} URL must not have a hash`);if(a.search)throw new Error(`${K} URL must not have a query`);if(s.endsWith("/"))throw new Error(`${K} URL must not end with a slash`);return new V(n)}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}constructor(e){(0,p._)(this,"parts",void 0),this.parts=e}}var J=t(82394),H=t.n(J);let G=Symbol.observable;class z{[G](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,s){const a=typeof e=="function"?{next:e,error:n,complete:s}:e;return this.observable.subscribe(a)}constructor(){(0,p._)(this,"isClosed",!1),(0,p._)(this,"terminatingError",void 0),(0,p._)(this,"observable",new(H())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}))),(0,p._)(this,"subscribers",new Set)}}let Y=Symbol.observable;class ot{[Y](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=e,this.subscribers.forEach(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,s){const a=typeof e=="function"?{next:e,error:n,complete:s}:e;return this.observable.subscribe(a)}constructor(e){(0,p._)(this,"isClosed",void 0),(0,p._)(this,"currentValue",void 0),(0,p._)(this,"terminatingError",void 0),(0,p._)(this,"observable",void 0),(0,p._)(this,"subscribers",new Set),this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(H())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(n.next(this.currentValue),this.subscribers.add(n),()=>{this.subscribers.delete(n)}))}}class ct{post(e){this.subject.next(e)}alert$(){return this.subject}constructor(){(0,p._)(this,"subject",new z)}}class dt{captureEvent(e){}}class ft{post(e,n){return n!=null&&n.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,n)}error$(){return this.errorApi.error$()}constructor(e,n){(0,p._)(this,"alertApi",void 0),(0,p._)(this,"errorApi",void 0),this.alertApi=e,this.errorApi=n}}class Ot{post(e,n){this.subject.next({error:e,context:n})}error$(){return this.subject}constructor(){(0,p._)(this,"subject",new z)}}class at{static forward(e,n){window.addEventListener("unhandledrejection",s=>{e.post(s.reason,n)})}}const At=new Map;class X{static create(e){var n;return new X((n=e.namespace)!==null&&n!==void 0?n:"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[s,a]of At.entries()){var n;!((n=e.key)===null||n===void 0)&&n.startsWith(s)&&a.handleStorageChange(e.key)}})}get(e){return this.snapshot(e).value}snapshot(e){let n,s="absent";try{const a=localStorage.getItem(this.getKeyName(e));a&&(n=JSON.parse(a,(c,y)=>(typeof y=="object"&&y!==null&&Object.freeze(y),y)),s="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:n,presence:s}}forBucket(e){const n=`${this.namespace}/${e}`;return At.has(n)||At.set(n,new X(n,this.errorApi)),At.get(n)}async set(e,n){localStorage.setItem(this.getKeyName(e),JSON.stringify(n)),this.notifyChanges(e)}async remove(e){localStorage.removeItem(this.getKeyName(e)),this.notifyChanges(e)}observe$(e){return X.hasSubscribed||(X.addStorageEventListener(),X.hasSubscribed=!0),this.observable.filter(({key:n})=>n===e)}handleStorageChange(e){if(!(e!=null&&e.startsWith(this.namespace)))return;const n=e==null?void 0:e.slice(`${this.namespace}/`.length);n.includes("/")||this.notifyChanges(decodeURIComponent(n))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const n=this.snapshot(e);for(const s of this.subscribers)s.next(n)}constructor(e,n){(0,p._)(this,"namespace",void 0),(0,p._)(this,"errorApi",void 0),(0,p._)(this,"subscribers",void 0),(0,p._)(this,"observable",void 0),this.namespace=e,this.errorApi=n,this.subscribers=new Set,this.observable=new(H())(s=>(this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}}(0,p._)(X,"hasSubscribed",!1);function L(r){let e=r.baseImplementation||t.g.fetch;var n;const s=[(n=r.middleware)!==null&&n!==void 0?n:[]].flat().reverse();for(const a of s)e=a.apply(e);return{fetch:e}}class Q{static create(e){var n,s;const a=et(e),c=((n=e.header)===null||n===void 0?void 0:n.name)||"authorization",y=((s=e.header)===null||s===void 0?void 0:s.value)||(v=>`Bearer ${v}`);return new Q(e.identityApi,a,c,y)}apply(e){return async(n,s)=>{const a=new Request(n,s),{token:c}=await this.identityApi.getCredentials();return a.headers.get(this.headerName)||typeof c!="string"||!c||!this.allowUrl(a.url)?e(n,s):(a.headers.set(this.headerName,this.headerValue(c)),e(a))}}constructor(e,n,s,a){(0,p._)(this,"identityApi",void 0),(0,p._)(this,"allowUrl",void 0),(0,p._)(this,"headerName",void 0),(0,p._)(this,"headerValue",void 0),this.identityApi=e,this.allowUrl=n,this.headerName=s,this.headerValue=a}}function et(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?it(r.urlPrefixAllowlist):r.config?it([r.config.getString("backend.baseUrl")]):()=>!1}function it(r){const e=r.map(n=>n.replace(/\/$/,""));return n=>e.some(s=>n===s||n.startsWith(`${s}/`))}function ut(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class Z{apply(e){return async(n,s)=>{const a=new Request(n,s),c="plugin://";if(!a.url.startsWith(c))return e(n,s);const{hostname:y,pathname:v,search:D,hash:N,username:tt,password:st}=new URL(`http://${a.url.substring(c.length)}`);let pt=await this.discoveryApi.getBaseUrl(y);if(tt||st){const Et=new URL(pt),Wt=`${tt}${st?`:${st}`:""}@`;pt=`${Et.protocol}//${Wt}${Et.host}${Et.pathname}`}const mt=`${ut(pt,v)}${D}${N}`;return e(mt,typeof n=="string"||F(n)?s:n)}}constructor(e){(0,p._)(this,"discoveryApi",void 0),this.discoveryApi=e}}function F(r){return typeof r=="object"&&(r==null?void 0:r.constructor)===URL}class ht{static resolvePluginProtocol(e){return new Z(e.discoveryApi)}static injectIdentityAuth(e){return Q.create(e)}constructor(){}}function xt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}function vt(r,...e){const n=new Set(r);for(const s of e)for(const a of s)n.add(a);return n}class yt{request(e){return new Promise((n,s)=>{this.requests.push({scopes:e,resolve:n,reject:s}),this.subject.next(this.getCurrentPending())})}resolve(e,n){this.requests=this.requests.filter(s=>xt(e,s.scopes)?(s.resolve(n),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(n=>n.reject(e)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const e=this.requests.length===0?void 0:this.requests.slice(1).reduce((n,s)=>vt(n,s.scopes),this.requests[0].scopes);return{scopes:e,resolve:n=>{e&&this.resolve(e,n)},reject:n=>{e&&this.reject(n)}}}constructor(){(0,p._)(this,"requests",[]),(0,p._)(this,"subject",new ot(this.getCurrentPending()))}}class gt{createAuthRequester(e){const n=new yt,s=this.handlerCount;return this.handlerCount++,n.pending().subscribe({next:a=>{const c=this.currentRequests.slice(),y=this.makeAuthRequest(a,e);y?c[s]=y:delete c[s],this.currentRequests=c,this.subject.next(c.filter(Boolean))}}),a=>n.request(a)}makeAuthRequest(e,n){const{scopes:s}=e;if(s)return{provider:n.provider,trigger:async()=>{const a=await n.onAuthRequest(s);e.resolve(a)},reject:()=>{const a=new Error("Login failed, rejected by user");a.name="RejectedError",e.reject(a)}}}authRequest$(){return this.subject}constructor(){(0,p._)(this,"subject",new ot([])),(0,p._)(this,"currentRequests",[]),(0,p._)(this,"handlerCount",0)}}function bt(r){return new Promise((e,n)=>{const s=r.width||500,a=r.height||700,c=window.screen.width/2-s/2,y=window.screen.height/2-a/2,v=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${s},height=${a},top=${y},left=${c}`);let D="";if(!v||typeof v.closed=="undefined"||v.closed){const pt=new Error("Failed to open auth popup.");pt.name="PopupRejectedError",n(pt);return}const N=pt=>{if(pt.source!==v||pt.origin!==r.origin)return;const{data:mt}=pt;if(mt.type==="config_info"){D=mt.targetOrigin;return}if(mt.type!=="authorization_response")return;const Et=mt;if("error"in Et){const Wt=new Error(Et.error.message);Wt.name=Et.error.name,n(Wt)}else e(Et.response);st()},tt=setInterval(()=>{if(v.closed){const pt=`Login failed, ${D&&D!==window.location.origin?`Incorrect app origin, expected ${D}`:"popup was closed"}`,mt=new Error(pt);mt.name="PopupClosedError",n(mt),st()}},100);function st(){window.removeEventListener("message",N),clearInterval(tt)}window.addEventListener("message",N)})}let It=!1;function jt(r){return[...r].join(" ")}class ge{async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const n=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(a=>{throw new Error(`Auth refresh request failed, ${a}`)});if(!n.ok){const a=new Error(`Auth refresh request failed, ${n.statusText}`);throw a.status=n.status,a}const s=await n.json();if(s.error){const a=new Error(s.error.message);throw s.error.name&&(a.name=s.error.name),a}return await this.sessionTransform(s)}async removeSession(){const e=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(n=>{throw new Error(`Logout request failed, ${n}`)});if(!e.ok){const n=new Error(`Logout request failed, ${e.statusText}`);throw n.status=e.status,n}}async showPopup(e){var n,s,a,c,y,v,D,N;const tt=this.joinScopesFunc(e),st=await this.buildUrl("/start",{scope:tt,origin:window.location.origin,flow:"popup"}),pt=!((s=this.popupOptions)===null||s===void 0||(n=s.size)===null||n===void 0)&&n.fullscreen?window.screen.width:((c=this.popupOptions)===null||c===void 0||(a=c.size)===null||a===void 0?void 0:a.width)||450,mt=!((v=this.popupOptions)===null||v===void 0||(y=v.size)===null||y===void 0)&&y.fullscreen?window.screen.height:((N=this.popupOptions)===null||N===void 0||(D=N.size)===null||D===void 0?void 0:D.height)||730,Et=await bt({url:st,name:`${this.provider.title} Login`,origin:new URL(st).origin,width:pt,height:mt});return await this.sessionTransform(Et)}async executeRedirect(e){const n=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:n,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,n){const s=await this.discoveryApi.getBaseUrl("auth"),a=this.buildQueryString({...n,env:this.environment});return`${s}/${this.provider.id}${e}${a}`}buildQueryString(e){if(!e)return"";const n=Object.entries(e).map(([s,a])=>{if(typeof a=="string")return`${encodeURIComponent(s)}=${encodeURIComponent(a)}`;if(a)return encodeURIComponent(s)}).filter(Boolean).join("&");return n?`?${n}`:""}constructor(e){(0,p._)(this,"discoveryApi",void 0),(0,p._)(this,"environment",void 0),(0,p._)(this,"provider",void 0),(0,p._)(this,"joinScopesFunc",void 0),(0,p._)(this,"authRequester",void 0),(0,p._)(this,"sessionTransform",void 0),(0,p._)(this,"enableExperimentalRedirectFlow",void 0),(0,p._)(this,"popupOptions",void 0);const{configApi:n,discoveryApi:s,environment:a,provider:c,joinScopes:y=jt,oauthRequestApi:v,sessionTransform:D=st=>st,popupOptions:N}=e;!It&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),It=!0);var tt;this.enableExperimentalRedirectFlow=n&&(tt=n.getOptionalBoolean("enableExperimentalRedirectFlow"))!==null&&tt!==void 0?tt:!1,this.authRequester=v.createAuthRequester({provider:c,onAuthRequest:async st=>this.enableExperimentalRedirectFlow?this.executeRedirect(st):this.showPopup(st)}),this.discoveryApi=s,this.environment=a,this.provider=c,this.joinScopesFunc=y,this.sessionTransform=D,this.popupOptions=N}}function Se(r,e){for(const n of e)if(!r.has(n))return!1;return!0}class Ee{sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const s=this.options.sessionScopes(e);return Se(s,n)}getExtendedScope(e,n){const s=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const a=this.options.sessionScopes(e);for(const c of a)s.add(c)}if(n)for(const a of n)s.add(a);return s}constructor(e){(0,p._)(this,"options",void 0),this.options=e}}var $t=t(95965),Lt;(function(r){r.SignedIn="SignedIn",r.SignedOut="SignedOut"})(Lt||(Lt={}));const Kt=(0,$t.T)({id:"core.auth.google"}),Yt=(0,$t.T)({id:"core.auth.github"}),qt=(0,$t.T)({id:"core.auth.okta"}),Qt=(0,$t.T)({id:"core.auth.gitlab"}),fe=(0,$t.T)({id:"core.auth.microsoft"}),je=(0,$t.T)({id:"core.auth.onelogin"}),Ye=(0,$t.T)({id:"core.auth.bitbucket"}),Ke=(0,$t.T)({id:"core.auth.bitbucket-server"}),be=(0,$t.T)({id:"core.auth.atlassian"});class Qe{setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Lt.SignedIn:Lt.SignedOut))}sessionState$(){return this.subject}constructor(){(0,p._)(this,"subject",new ot(Lt.SignedOut)),(0,p._)(this,"signedIn",!1)}}class Je{async getSession(e){if(this.helper.sessionExistsAndHasScope(this.currentSession,e.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const s=await this.collapsedSessionRefresh(e.scopes),a=this.sessionScopesFunc(this.currentSession),c=this.sessionScopesFunc(s);return Se(c,a)&&(this.currentSession=s),s}catch(s){if(e.optional)return;throw s}}if(!this.currentSession&&!e.instantPopup)try{const n=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=n,this.getSession(e)}catch{}if(!e.optional)return this.currentSession=await this.connector.createSession({...e,scopes:this.helper.getExtendedScope(this.currentSession,e.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(e){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession(this.helper.getExtendedScope(this.currentSession,e));try{const n=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),n}finally{delete this.refreshPromise}}constructor(e){(0,p._)(this,"connector",void 0),(0,p._)(this,"helper",void 0),(0,p._)(this,"sessionScopesFunc",void 0),(0,p._)(this,"sessionShouldRefreshFunc",void 0),(0,p._)(this,"stateTracker",new Qe),(0,p._)(this,"refreshPromise",void 0),(0,p._)(this,"currentSession",void 0);const{connector:n,defaultScopes:s=new Set,sessionScopes:a,sessionShouldRefresh:c}=e;this.connector=n,this.sessionScopesFunc=a,this.sessionShouldRefreshFunc=c,this.helper=new Ee({sessionScopes:a,defaultScopes:s})}}const ze={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class ne{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=ze,oauthRequestApi:y,defaultScopes:v=[],scopeTransform:D=pt=>pt,popupOptions:N}=e,tt=new ge({configApi:n,discoveryApi:s,environment:a,provider:c,oauthRequestApi:y,sessionTransform({backstageIdentity:pt,...mt}){const Et={...mt,providerInfo:{idToken:mt.providerInfo.idToken,accessToken:mt.providerInfo.accessToken,scopes:ne.normalizeScopes(D,mt.providerInfo.scope),expiresAt:mt.providerInfo.expiresInSeconds?new Date(Date.now()+mt.providerInfo.expiresInSeconds*1e3):void 0}};if(pt){var Wt;const zt=(Wt=pt.expiresInSeconds)!==null&&Wt!==void 0?Wt:mt.providerInfo.expiresInSeconds;Et.backstageIdentity={token:pt.token,identity:pt.identity,expiresAt:zt?new Date(Date.now()+zt*1e3):void 0}}return Et},popupOptions:N}),st=new Je({connector:tt,defaultScopes:new Set(v),sessionScopes:pt=>pt.providerInfo.scopes,sessionShouldRefresh:pt=>{var mt,Et;let Wt=1/0;return!((mt=pt.providerInfo)===null||mt===void 0)&&mt.expiresAt&&(Wt=Math.min(Wt,(pt.providerInfo.expiresAt.getTime()-Date.now())/1e3)),!((Et=pt.backstageIdentity)===null||Et===void 0)&&Et.expiresAt&&(Wt=Math.min(Wt,(pt.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),Wt<60*5}});return new ne({sessionManager:st,scopeTransform:D})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,n){const s=ne.normalizeScopes(this.scopeTransform,e),a=await this.sessionManager.getSession({...n,scopes:s});var c;return(c=a==null?void 0:a.providerInfo.accessToken)!==null&&c!==void 0?c:""}async getIdToken(e={}){const n=await this.sessionManager.getSession({...e,scopes:new Set(["openid"])});var s;return(s=n==null?void 0:n.providerInfo.idToken)!==null&&s!==void 0?s:""}async getBackstageIdentity(e={}){const n=await this.sessionManager.getSession(e);return n==null?void 0:n.backstageIdentity}async getProfile(e={}){const n=await this.sessionManager.getSession(e);return n==null?void 0:n.profile}static normalizeScopes(e,n){if(!n)return new Set;const s=Array.isArray(n)?n:n.split(/[\s|,]/).filter(Boolean);return new Set(e(s))}constructor(e){(0,p._)(this,"sessionManager",void 0),(0,p._)(this,"scopeTransform",void 0),this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}}const on={id:"google",title:"Google",icon:()=>null},Oe="https://www.googleapis.com/auth/";class rn{static create(e){const{configApi:n,discoveryApi:s,oauthRequestApi:a,environment:c="development",provider:y=on,defaultScopes:v=["openid",`${Oe}userinfo.email`,`${Oe}userinfo.profile`]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:a,provider:y,environment:c,defaultScopes:v,scopeTransform(D){return D.map(N=>N==="openid"?N:N==="profile"||N==="email"?`${Oe}userinfo.${N}`:N.startsWith(Oe)?N:`${Oe}${N}`)}})}}const Xe={id:"microsoft",title:"Microsoft",icon:()=>null};class re{static create(e){return new re(e)}microsoftGraph(){return this.oauth2[re.MicrosoftGraphID]}static resourceForScopes(e){const n=[...new Set(e.split(" ").map(re.resourceForScope).filter(c=>c!=="openid"))];if(n.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${n.join(", ")}. Access tokens can only have a single audience.`));var s;const a=(s=n[0])!==null&&s!==void 0?s:re.MicrosoftGraphID;return Promise.resolve(a)}static resourceForScope(e){var n;const s=(n=e.match(RegExp("^(?<resourceURI>.*)\\/(?<scp>[^\\/]*)$")))===null||n===void 0?void 0:n.groups;if(s){const{resourceURI:a}=s;return a.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return re.MicrosoftGraphID}}async getAccessToken(e,n){const s=e===void 0?re.MicrosoftGraphID:await re.resourceForScopes(Array.isArray(e)?e.join(" "):e);return s in this.oauth2||(this.oauth2[s]=ne.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[s].getAccessToken(e,n)}getIdToken(e){return this.microsoftGraph().getIdToken(e)}getProfile(e){return this.microsoftGraph().getProfile(e)}getBackstageIdentity(e){return this.microsoftGraph().getBackstageIdentity(e)}signIn(){return this.microsoftGraph().signIn()}signOut(){return this.microsoftGraph().signOut()}sessionState$(){return this.microsoftGraph().sessionState$()}constructor(e){(0,p._)(this,"oauth2",void 0),(0,p._)(this,"configApi",void 0),(0,p._)(this,"environment",void 0),(0,p._)(this,"provider",void 0),(0,p._)(this,"oauthRequestApi",void 0),(0,p._)(this,"discoveryApi",void 0),(0,p._)(this,"scopeTransform",void 0);const{configApi:n,environment:s="development",provider:a=Xe,oauthRequestApi:c,discoveryApi:y,defaultScopes:v=["openid","offline_access","profile","email","User.Read"],scopeTransform:D=N=>N.concat("offline_access")}=e;this.configApi=n,this.environment=s,this.provider=a,this.oauthRequestApi=c,this.discoveryApi=y,this.scopeTransform=D,this.oauth2={[re.MicrosoftGraphID]:ne.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:v})}}}(0,p._)(re,"MicrosoftGraphID","00000003-0000-0000-c000-000000000000");const $e={id:"github",title:"GitHub",icon:()=>null};class Be{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=$e,oauthRequestApi:y,defaultScopes:v=["read:user"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:y,provider:c,environment:a,defaultScopes:v})}}const _e={id:"okta",title:"Okta",icon:()=>null},se=new Set(["openid","profile","email","phone","address","groups","offline_access"]),xe="okta.";class M{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=_e,oauthRequestApi:y,defaultScopes:v=["openid","email","profile","offline_access"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:y,provider:c,environment:a,defaultScopes:v,scopeTransform(D){return D.map(N=>se.has(N)||N.startsWith(xe)?N:`${xe}${N}`)}})}}const u={id:"gitlab",title:"GitLab",icon:()=>null};class T{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=u,oauthRequestApi:y,defaultScopes:v=["read_user"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:y,provider:c,environment:a,defaultScopes:v})}}const W={id:"onelogin",title:"onelogin",icon:()=>null},rt=new Set(["openid","profile","email","phone","address","groups","offline_access"]),St="onelogin.";class Rt{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=W,oauthRequestApi:y}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:y,provider:c,environment:a,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(v){return v.map(D=>rt.has(D)||D.startsWith(St)?D:`${St}${D}`)}})}}const oe={id:"bitbucket",title:"Bitbucket",icon:()=>null};class _t{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=oe,oauthRequestApi:y,defaultScopes:v=["team"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:y,provider:c,environment:a,defaultScopes:v})}}const Zt={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class Bt{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=Zt,oauthRequestApi:y,defaultScopes:v=["PROJECT_ADMIN"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:y,provider:c,environment:a,defaultScopes:v})}}const pe={id:"atlassian",title:"Atlassian",icon:()=>null};class Ie{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:c=pe,oauthRequestApi:y}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:y,provider:c,environment:a})}}var Nt=t(42380),te=t(96727),le=t(6542),Ln=t(78847),ho=t(86386),Mn=t(58513);const jn=(0,$t.T)({id:"core.storage"});var Bn=t(85094),ve=t(77186);const De=(0,$t.T)({id:"core.oauthrequest"}),fo=(0,$t.T)({id:"plugin.permission.api"});var He=t(41385),go=t(96279),Un=t.n(go),po=t(9571),Ht=t(30195),Fe;(function(r){r.DENY="DENY",r.ALLOW="ALLOW",r.CONDITIONAL="CONDITIONAL"})(Fe||(Fe={}));const sn=Ht.z.lazy(()=>Ht.z.object({rule:Ht.z.string(),resourceType:Ht.z.string(),params:Ht.z.record(Ht.z.any()).optional()}).or(Ht.z.object({anyOf:Ht.z.array(sn).nonempty()})).or(Ht.z.object({allOf:Ht.z.array(sn).nonempty()})).or(Ht.z.object({not:sn}))),vo=Ht.z.object({result:Ht.z.literal(Fe.ALLOW).or(Ht.z.literal(Fe.DENY))}),mo=Ht.z.union([Ht.z.object({result:Ht.z.literal(Fe.ALLOW).or(Ht.z.literal(Fe.DENY))}),Ht.z.object({result:Ht.z.literal(Fe.CONDITIONAL),pluginId:Ht.z.string(),resourceType:Ht.z.string(),conditions:sn})]),yo=(r,e)=>Ht.z.object({items:Ht.z.array(Ht.z.intersection(Ht.z.object({id:Ht.z.string()}),r)).refine(n=>n.length===e.size&&n.every(({id:s})=>e.has(s)),{message:"Items in response do not match request"})});class $n{async authorize(e,n){return this.makeRequest(e,vo,n)}async authorizeConditional(e,n){return this.makeRequest(e,mo,n)}async makeRequest(e,n,s){if(!this.enabled)return e.map(tt=>({result:Fe.ALLOW}));const a={items:e.map(tt=>({id:po.Z(),...tt}))},c=await this.discovery.getBaseUrl("permission"),y=await Un()(`${c}/authorize`,{method:"POST",body:JSON.stringify(a),headers:{...this.getAuthorizationHeader(s==null?void 0:s.token),"content-type":"application/json"}});if(!y.ok)throw await He.V.fromResponse(y);const v=await y.json(),N=yo(n,new Set(a.items.map(({id:tt})=>tt))).parse(v).items.reduce((tt,st)=>(tt[st.id]=st,tt),{});return a.items.map(tt=>N[tt.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}constructor(e){(0,p._)(this,"enabled",void 0),(0,p._)(this,"discovery",void 0),this.discovery=e.discovery;var n;this.enabled=(n=e.config.getOptionalBoolean("permission.enabled"))!==null&&n!==void 0?n:!1}}class yn{static create(e){const{config:n,discovery:s,identity:a}=e,c=new $n({discovery:s,config:n});return new yn(c,a)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}constructor(e,n){(0,p._)(this,"permissionClient",void 0),(0,p._)(this,"identityApi",void 0),this.permissionClient=e,this.identityApi=n}}const Eo=[(0,Nt.n)({api:te.N,deps:{configApi:le.D},factory:({configApi:r})=>V.compile(`${r.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,Nt.n)({api:Ln.$,deps:{},factory:()=>new ct}),(0,Nt.n)({api:ho.v,deps:{},factory:()=>new dt}),(0,Nt.n)({api:Mn.V,deps:{alertApi:Ln.$},factory:({alertApi:r})=>{const e=new ft(r,new Ot);return at.forward(e,{hidden:!1}),e}}),(0,Nt.n)({api:jn,deps:{errorApi:Mn.V},factory:({errorApi:r})=>X.create({errorApi:r})}),(0,Nt.n)({api:Bn.g,deps:{configApi:le.D,identityApi:ve.$,discoveryApi:te.N},factory:({configApi:r,identityApi:e,discoveryApi:n})=>L({middleware:[ht.resolvePluginProtocol({discoveryApi:n}),ht.injectIdentityAuth({identityApi:e,config:r})]})}),(0,Nt.n)({api:De,deps:{},factory:()=>new gt}),(0,Nt.n)({api:Kt,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>rn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:fe,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>re.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:Yt,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Be.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:qt,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>M.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:Qt,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>T.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:je,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Rt.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:Ye,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>_t.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["team"],environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:Ke,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Bt.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"]})}),(0,Nt.n)({api:be,deps:{discoveryApi:te.N,oauthRequestApi:De,configApi:le.D},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ie.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Nt.n)({api:fo,deps:{discovery:te.N,identity:ve.$,config:le.D},factory:({config:r,discovery:e,identity:n})=>yn.create({config:r,discovery:e,identity:n})})];var Fn=t(43642),xo=t(80079),Co=t(90941),Wn=t(32915),En=t(40562),Ao=t(21853),So=t(60744),bo=t(66569),Oo=t(30254),Po=t(13384),Nn=t(15933),Ro=t(58838),wo=t(86737),Zn=t(4989),kn=t(44407),To=t(18628),xn=t(84219),Cn=t(98685),Io=t(39781),Do=t(39412),Lo=t(78258);const Mo={brokenImage:xo.Z,catalog:To.Z,scaffolder:Wn.Z,techdocs:En.Z,search:Ao.Z,chat:So.Z,dashboard:bo.Z,docs:Oo.Z,email:Po.Z,github:Ro.Z,group:xn.Z,help:wo.Z,"kind:api":Nn.Z,"kind:component":kn.Z,"kind:domain":Fn.Z,"kind:group":xn.Z,"kind:location":Zn.Z,"kind:system":Co.Z,"kind:user":Cn.Z,"kind:resource":Do.Z,"kind:template":Lo.Z,user:Cn.Z,warning:Io.Z};var jo=t(87561),Bo=t(12536),Kn=t(19219),Uo=t(41547),$o=t(3493),Fo=t(81887);const Wo=(0,Bo.Z)({productionPrefix:"jss4-"});function an(r){const{children:e,theme:n,noCssBaseline:s=!1}=r,a=n.getTheme("v4"),c=n.getTheme("v5");let y;s||(y=(0,i.jsx)(jo.ZP,{}));let v=(0,i.jsxs)(i.Fragment,{children:[y,e]});return a&&(v=(0,i.jsx)(Kn.ZP,{generateClassName:Wo,children:(0,i.jsx)(Uo.Z,{theme:a,children:v})})),c&&(v=(0,i.jsx)($o.Z,{injectFirst:!0,children:(0,i.jsx)(Fo.Z,{theme:c,children:v})})),v}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 Pt=t(88412),ce=t(52475),de=t(80956),No=t(73689),ar=t(93606);const h={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")`},O={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 j(r){const{colors:e,shape:n,options:s}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,y=`${n}, ${c}`;var v;const D=(v=s==null?void 0:s.fontColor)!==null&&v!==void 0?v:"#FFFFFF";return{colors:e,shape:n,backgroundImage:y,fontColor:D}}const k={home:j({colors:O.teal,shape:h.wave}),documentation:j({colors:O.pinkSea,shape:h.wave2}),tool:j({colors:O.purpleSky,shape:h.round}),service:j({colors:O.marineBlue,shape:h.wave}),website:j({colors:O.veryBlue,shape:h.wave}),library:j({colors:O.rubyRed,shape:h.wave}),other:j({colors:O.darkGrey,shape:h.wave}),app:j({colors:O.toastyOrange,shape:h.wave}),apis:j({colors:O.teal,shape:h.wave2}),card:j({colors:O.greens,shape:h.wave})},q=16,nt='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',lt="home";function Ct(r){const{palette:e,htmlFontSize:n=q,fontFamily:s=nt,defaultPageTheme:a=lt,pageTheme:c=k,typography:y}=r;if(!c[a])throw new Error(`${a} is not defined in pageTheme.`);const v={htmlFontSize:n,fontFamily:s,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}};return{palette:e,typography:y!=null?y:v,page:c[a],getPageTheme:({themeId:D})=>{var N;return(N=c[D])!==null&&N!==void 0?N:c[a]}}}var Tt=t(47591);const Ut={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},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,Tt._j)(r.palette.link,.3),background:(0,Tt.$n)(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"}}},Gt=r=>(...e)=>{const n=e.length===0?[1]:e,s=(a,c)=>typeof a=="string"?a:c*a;return n.map(a=>{const c=s(a,r);return typeof c=="number"?`${c}px`:c}).join(" ")};function Ft(r,e){if(!e||typeof e=="string")return;const n=typeof e=="function"?e(r):e;if(n)return{"@global":n}}function wt(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const n={...r},s=r.spacing(1);return typeof s=="number"&&(n.spacing=Gt(s)),Object.fromEntries(Object.entries(e).map(([a,c])=>typeof c=="function"?[a,c({theme:n})]:[a,c]))}return e}}const ie=/^&.Mui-([\w-]+)$/;function me(r){let e=r;if(!r||typeof r!="object")return e;for(const n of Object.keys(r)){const s=r[n];if(!(!s||typeof s!="object"))for(const a of Object.keys(s)){const c=a,y=c.match(ie);if(y){const[,v]=y,{[c]:D,...N}=s;D&&(e={...e,[n]:N,[v]:D})}}}return e}function Vt(r,e={}){const n={},s={};for(const a of Object.keys(e)){const c=e[a];c&&("styleOverrides"in c&&(a==="MuiCssBaseline"?n[a]=Ft(r,c.styleOverrides):n[a]=me(wt(r,c.styleOverrides))),"defaultProps"in c&&(s[a]=c.defaultProps))}return{overrides:n,props:s}}var Mt=new WeakMap;class ee{getTheme(e){return(0,Pt._)(this,Mt).get(e)}constructor(e,n){(0,ce._)(this,Mt,{writable:!0,value:new Map}),(0,de._)(this,Mt,new Map),e&&(0,Pt._)(this,Mt).set("v4",e),n&&(0,Pt._)(this,Mt).set("v5",n)}}function ye(r){const e=Ct(r),n={...Ut,...r.components},s=(0,ar.Z)({...e,components:n}),a=Vt(s,n),c={...(0,No.Z)(e),...a};return new ee(c,s)}function Dt(r){const e=adaptV4Theme(r),n=createTheme(r);return new ee(n,e)}const kt={light:ye({palette:zn.light}),dark:ye({palette:zn.dark})};var Jt=t(98192),Ce=t(15222);const Re=[{id:"light",title:"Light Theme",variant:"light",icon:(0,i.jsx)(Ce.Z,{}),Provider:({children:r})=>(0,i.jsx)(an,{theme:kt.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,i.jsx)(Jt.Z,{}),Provider:({children:r})=>(0,i.jsx)(an,{theme:kt.dark,children:r})}];var Ue=t(64279),ae=t(13980),We=t.n(ae);class ue{get(e){for(const n of this.holders){const s=n.get(e);if(s)return s}}constructor(...e){(0,p._)(this,"holders",void 0),this.holders=e}}var Ge=t(29651),ln=t(68993);const lr=(0,Ge.CT)("api-context"),Zo=r=>{var e;const{apis:n,children:s}=r,a=(e=(0,d.useContext)(lr))===null||e===void 0?void 0:e.atVersion(1),c=a?new ue(n,a):n;return(0,i.jsx)(lr.Provider,{value:(0,ln.E)({1:c}),children:s})};Zo.propTypes={apis:We().shape({get:We().func.isRequired}).isRequired,children:We().node};var ls=t(9850),cs=t.n(ls),ds=t(12782),us=t.n(ds);const hs=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function An(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function ko(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 Le={type(r,e,n,s){return`Invalid type in config for key '${r}' in '${e}', got ${n}, wanted ${s}`},missing(r){return`Missing required config value at '${r}'`},convert(r,e,n){return`Unable to convert config value for key '${r}' in '${e}' to a ${n}`}};class cn{static fromConfigs(e){return e.length===0?new cn(void 0):e.reduce((n,{data:s,context:a,filteredKeys:c,deprecatedKeys:y})=>{const v=new cn(s,a,n);if(v.filteredKeys=c,y)for(const{key:D,description:N}of y)console.warn(`The configuration key '${D}' of ${a} is deprecated and may be removed soon. ${N||""}`);return v},void 0)}has(e){var n;if(this.readValue(e)!==void 0)return!0;var a;return(a=(n=this.fallback)===null||n===void 0?void 0:n.has(e))!==null&&a!==void 0?a:!1}keys(){var e;const n=this.data?Object.keys(this.data):[];var s;const a=(s=(e=this.fallback)===null||e===void 0?void 0:e.keys())!==null&&s!==void 0?s:[];return[...new Set([...n,...a])]}get(e){const n=this.getOptional(e);if(n===void 0)throw new Error(Le.missing(this.fullKey(e!=null?e:"")));return n}getOptional(e){var n;const s=cs()(this.readValue(e)),a=(n=this.fallback)===null||n===void 0?void 0:n.getOptional(e);if(s===void 0){if(!1)var c;return a}else if(a===void 0)return s;return us()({},{value:a},{value:s},(y,v)=>!An(v)||!An(y)?v:void 0).value}getConfig(e){const n=this.getOptionalConfig(e);if(n===void 0)throw new Error(Le.missing(this.fullKey(e)));return n}getOptionalConfig(e){var n;const s=this.readValue(e),a=(n=this.fallback)===null||n===void 0?void 0:n.getOptionalConfig(e);if(An(s))return this.copy(s,e,a);if(s!==void 0)throw new TypeError(Le.type(this.fullKey(e),this.context,ko(s),"object"));return a}getConfigArray(e){const n=this.getOptionalConfigArray(e);if(n===void 0)throw new Error(Le.missing(this.fullKey(e)));return n}getOptionalConfigArray(e){const n=this.readConfigValue(e,a=>{if(!Array.isArray(a))return{expected:"object-array"};for(const[c,y]of a.entries())if(!An(y))return{expected:"object-array",value:y,key:`${e}[${c}]`};return!0});if(!n){if(!1)var s;return}return n.map((a,c)=>this.copy(a,`${e}[${c}]`))}getNumber(e){const n=this.getOptionalNumber(e);if(n===void 0)throw new Error(Le.missing(this.fullKey(e)));return n}getOptionalNumber(e){const n=this.readConfigValue(e,a=>typeof a=="number"||typeof a=="string"||{expected:"number"});if(typeof n=="number"||n===void 0)return n;const s=Number(n);if(!Number.isFinite(s))throw new Error(Le.convert(this.fullKey(e),this.context,"number"));return s}getBoolean(e){const n=this.getOptionalBoolean(e);if(n===void 0)throw new Error(Le.missing(this.fullKey(e)));return n}getOptionalBoolean(e){const n=this.readConfigValue(e,a=>typeof a=="boolean"||typeof a=="number"||typeof a=="string"||{expected:"boolean"});if(typeof n=="boolean"||n===void 0)return n;const s=String(n).trim();if(/^(?:y|yes|true|1|on)$/i.test(s))return!0;if(/^(?:n|no|false|0|off)$/i.test(s))return!1;throw new Error(Le.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const n=this.getOptionalString(e);if(n===void 0)throw new Error(Le.missing(this.fullKey(e)));return n}getOptionalString(e){return this.readConfigValue(e,n=>typeof n=="string"&&n!==""||{expected:"string"})}getStringArray(e){const n=this.getOptionalStringArray(e);if(n===void 0)throw new Error(Le.missing(this.fullKey(e)));return n}getOptionalStringArray(e){return this.readConfigValue(e,n=>{if(!Array.isArray(n))return{expected:"string-array"};for(const[s,a]of n.entries())if(typeof a!="string"||a==="")return{expected:"string-array",value:a,key:`${e}[${s}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,n,s){const a=new cn(e,this.context,s,this.fullKey(n));return a.filteredKeys=this.filteredKeys,a}readConfigValue(e,n){const s=this.readValue(e);if(s===void 0){var a;if(!1)var c;return(a=this.fallback)===null||a===void 0?void 0:a.readConfigValue(e,n)}const y=n(s);if(y!==!0){const{key:v=e,value:D=s,expected:N}=y;throw new TypeError(Le.type(this.fullKey(v),this.context,ko(D),N))}return s}readValue(e){const n=e?e.split("."):[];for(const a of n)if(!hs.test(a))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let s=this.data;for(const[a,c]of n.entries())if(An(s))s=s[c];else if(s!==void 0){const y=this.fullKey(n.slice(0,a).join("."));throw new TypeError(Le.type(y,this.context,ko(s),"object"))}return s}constructor(e,n="mock-config",s,a=""){(0,p._)(this,"data",void 0),(0,p._)(this,"context",void 0),(0,p._)(this,"fallback",void 0),(0,p._)(this,"prefix",void 0),(0,p._)(this,"filteredKeys",void 0),(0,p._)(this,"notifiedFilteredKeys",void 0),this.data=e,this.context=n,this.fallback=s,this.prefix=a,this.notifiedFilteredKeys=new Set}}const Sn="theme";class Hn{static createWithStorage(e){const n=new Hn(e);if(!window.localStorage)return n;var s;const a=(s=window.localStorage.getItem(Sn))!==null&&s!==void 0?s:void 0;return n.setActiveThemeId(a),n.activeThemeId$().subscribe(c=>{c?window.localStorage.setItem(Sn,c):window.localStorage.removeItem(Sn)}),window.addEventListener("storage",c=>{if(c.key===Sn){var y;const v=(y=localStorage.getItem(Sn))!==null&&y!==void 0?y:void 0;n.setActiveThemeId(v)}}),n}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(e){this.activeThemeId=e,this.subject.next(e)}constructor(e){(0,p._)(this,"themes",void 0),(0,p._)(this,"activeThemeId",void 0),(0,p._)(this,"subject",void 0),this.themes=e,this.subject=new ot(void 0)}}var dn=t(82723);function cr(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 fs{registerFlag(e){cr(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===dn.C.Active}save(e){this.flags||(this.flags=this.load()),e.merge||this.flags.clear();for(const[s,a]of Object.entries(e.states))this.flags.set(s,a);const n=Array.from(this.flags.entries()).filter(([,s])=>s===dn.C.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(n)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const n=JSON.parse(e);if(typeof n!="object"||n===null||Array.isArray(n))return new Map;const s=Object.entries(n).filter(([a,c])=>(cr(a),c===dn.C.Active));return new Map(s)}catch{return new Map}}constructor(){(0,p._)(this,"registeredFeatureFlags",[]),(0,p._)(this,"flags",void 0)}}const Gn=(0,$t.T)({id:"core.apptheme"}),dr=(0,$t.T)({id:"core.applanguage"});var gs=t(96253);class Ko{static validateFactories(e,n){for(const s of n){const a=[s],c=new Set;for(;a.length;){const y=a.shift(),v=e.get(y);if(v)for(const D of Object.values(v.deps)){if(D.id===s.id)throw new Error(`Circular dependency of api factory for ${s}`);c.has(D)||(c.add(D),a.push(D))}}}}get(e){return this.load(e)}load(e,n=[]){const s=this.apis.get(e.id);if(s)return s;const a=this.factories.get(e);if(!a)return;if(n.includes(a.api))throw new Error(`Circular dependency of api factory for ${a.api}`);const c=this.loadDeps(e,a.deps,[...n,a.api]),y=a.factory(c);return this.apis.set(e.id,y),y}loadDeps(e,n,s){const a={};for(const c in n)if(n.hasOwnProperty(c)){const y=n[c],v=this.load(y,s);if(!v)throw new Error(`No API factory available for dependency ${y} of dependent ${e}`);a[c]=v}return a}constructor(e){(0,p._)(this,"factories",void 0),(0,p._)(this,"apis",void 0),this.factories=e,this.apis=new Map}}var zo;(function(r){r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static"})(zo||(zo={}));class ps{register(e,n){const s=zo[e],a=this.factories.get(n.api.id);return a&&a.priority>=s?!1:(this.factories.set(n.api.id,{priority:s,factory:n}),!0)}get(e){const n=this.factories.get(e.id);if(n)return n.factory}getAllApis(){const e=new Set;for(const{factory:n}of this.factories.values())e.add(n.api);return e}constructor(){(0,p._)(this,"factories",new Map)}}function vs(r){const e={};for(const s in r.collectors)r.collectors.hasOwnProperty(s)&&(e[s]=r.collectors[s]());const n=[{node:d.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;n.length!==0;){const{node:s,parent:a,contexts:c}=n.shift();d.Children.forEach(s,y=>{if(!(0,d.isValidElement)(y))return;const v={};for(const D in e)if(e.hasOwnProperty(D)){const N=e[D];v[D]=N.visit(N.accumulator,y,a,c[D])}for(const D of r.discoverers){const N=D(y);N&&n.push({node:N,parent:y,contexts:v})}})}return Object.fromEntries(Object.entries(e).map(([s,a])=>[s,a.accumulator]))}function Vn(r,e){return()=>({accumulator:r(),visit:e})}function ms(r){var e;return(e=r.props)===null||e===void 0?void 0:e.children}function ys(r){var e,n;if(!((e=r.props)===null||e===void 0)&&e.path&&(!((n=r.props)===null||n===void 0)&&n.element)){var s;return(s=r.props)===null||s===void 0?void 0:s.element}}var Pe=t(62584);const Es=Vn(()=>new Set,(r,e)=>{const n=(0,Pe.I)(e,"core.plugin");n&&r.add(n)});var bn=t(44394);const ur=r=>{const{children:e}=r,n=(0,bn.h_)(dn.W),s="with"in r?n.isActive(r.with):!n.isActive(r.without);return(0,i.jsx)(i.Fragment,{children:s?e:null})};(0,Pe.R)(ur,"core.featureFlagged",!0);const Yn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function Qn(r){const e=r;if(e!=null&&e.type){var n,s;return(s=(n=e.type.displayName)!==null&&n!==void 0?n:e.type.name)!==null&&s!==void 0?s:String(e.type)}return String(e)}const hr=r=>{const e=new Set;return r&&e.add(r),e};function fr(r,e=new Array){return d.Children.forEach(r,n=>{if(!(0,d.isValidElement)(n))return;const s=(0,Pe.I)(n,"core.mountPoint");if(s){const a=(0,Pe.I)(n,"core.plugin");e.push({routeRef:s,plugin:a})}fr(n.props.children,e)}),e}const xs=Vn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,s)=>{var a,c;if(s!=null&&s.isElementAncestor)return s;if((n==null?void 0:n.props.element)===e)return{...s,isElementAncestor:!0};const y=(a=e.props)===null||a===void 0?void 0:a.path,v=(0,Pe.I)(e,"core.mountPoint");if(v&&y)throw new Error(`Path property may not be set directly on a routable extension "${Qn(e)}"`);var D;const N=(D=s==null||(c=s.obj)===null||c===void 0?void 0:c.children)!==null&&D!==void 0?D:r.objects;if(y!==void 0){if(typeof y!="string")throw new Error(`Element path must be a string at "${Qn(e)}"`);const Et=y.startsWith("/")?y.slice(1):y,Wt=e.props.element;if((0,Pe.I)(e,"core.gatherMountPoints")){var tt;if(Wt)throw new Error(`Mount point gatherers may not have an element prop "${Qn(e)}"`);const zt={path:Et,element:"gathered",routeRefs:new Set,caseSensitive:Boolean((tt=e.props)===null||tt===void 0?void 0:tt.caseSensitive),children:[Yn],plugins:new Set};return N.push(zt),{obj:zt,gatherPath:Et,routeRef:s==null?void 0:s.routeRef,gatherRouteRef:s==null?void 0:s.routeRef}}if(Wt){var st;const[zt,...Xt]=fr(Wt);if(Xt.length>0)throw new Error(`Route element with path "${y}" may not contain multiple routable extensions`);if(!zt)return s;const{routeRef:he,plugin:ke}=zt,Dn={path:Et,element:"mounted",routeRefs:new Set([he]),caseSensitive:Boolean((st=e.props)===null||st===void 0?void 0:st.caseSensitive),children:[Yn],plugins:hr(ke)};return N.push(Dn),r.paths.set(he,Et),r.parents.set(he,s==null?void 0:s.routeRef),{obj:Dn,routeRef:he!=null?he:s==null?void 0:s.routeRef,gatherPath:Et,gatherRouteRef:s==null?void 0:s.gatherRouteRef}}}if(v){var pt;if((s==null?void 0:s.gatherPath)===void 0)throw new Error(`Routable extension "${Qn(e)}" with mount point "${v}" must be assigned a path`);s==null||(pt=s.obj)===null||pt===void 0||pt.routeRefs.add(v);const Et=(0,Pe.I)(e,"core.plugin");if(Et){var mt;s==null||(mt=s.obj)===null||mt===void 0||mt.plugins.add(Et)}return r.paths.set(v,s.gatherPath),r.parents.set(v,s==null?void 0:s.gatherRouteRef),{...s,routeRef:v}}return s}),Cs=Vn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,s)=>{var a,c,y;if((n==null?void 0:n.props.element)===e)return s;let v=s==null?void 0:s.obj,D=s==null?void 0:s.routeRef,N=s==null?void 0:s.sticky;const tt=(a=e.props)===null||a===void 0?void 0:a.path;var st;const pt=(st=v==null?void 0:v.children)!==null&&st!==void 0?st:r.objects,mt=Boolean((c=e.props)===null||c===void 0?void 0:c.caseSensitive);let Et=s==null?void 0:s.path;if((0,Pe.I)(e,"core.gatherMountPoints")){if(!tt)throw new Error("Mount point gatherer must have a path");Et=tt}const Wt=(y=e.props)===null||y===void 0?void 0:y.element;let zt=(0,Pe.I)(e,"core.mountPoint");if(!zt&&(0,d.isValidElement)(Wt)&&(zt=(0,Pe.I)(Wt,"core.mountPoint")),zt){let ke=tt;if(Et&&(ke?Et=void 0:ke=Et),!ke)throw new Error("Mounted routable extension must have a path");r.paths.set(zt,ke),D&&N?(r.parents.set(zt,D),tt&&(D=zt,N=!1)):(r.parents.set(zt,D),D=zt),tt?(v={caseSensitive:mt,path:tt,element:"mounted",routeRefs:new Set([zt]),children:[Yn],plugins:hr((0,Pe.I)(e.props.element,"core.plugin"))},pt.push(v)):v==null||v.routeRefs.add(zt)}if((0,Pe.I)(e,"core.gatherMountPoints")&&(N=!0),(0,Pe.I)(e,"core.gatherMountPoints")){if(!tt)throw new Error("Mount point gatherer must have a path");if(!zt){var he;v={caseSensitive:mt,path:tt,element:"gathered",routeRefs:new Set,children:[Yn],plugins:(s==null||(he=s.obj)===null||he===void 0?void 0:he.plugins)||new Set},pt.push(v)}}return{obj:v,path:Et,routeRef:D,sticky:N}}),As=Vn(()=>new Set,(r,e)=>{if(e.type===ur){const n=e.props;r.add("with"in n?n.with:n.without)}});var On=t(84800),Ss=t(96087);const Pn=(0,Ss.u)("route-ref-type",()=>Symbol("route-ref-type"));function gr(r){return r[Pn]==="absolute"}function pr(r){return r[Pn]==="sub"}function bs(r){return r[Pn]==="external"}function Jn(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var Os=t(34519),Ps=t.n(Os);function Rs(r,e,n){let s,a="";if(gr(r))s=r;else if(pr(r))s=r.parent,a=r.path;else if(bs(r)){const v=n.get(r);if(!v)return[void 0,""];if(gr(v))s=v;else if(pr(v))s=v.parent,a=v.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${v}`)}else throw r[Pn]?new Error(`Unknown or invalid route ref type, ${r[Pn]}`):new Error(`Unknown object passed to useRouteRef, got ${r}`);if(!s)return[void 0,""];const c=e.get(s);if(c===void 0)return[void 0,""];const y=Jn(c,a);return[s,y]}function ws(r,e,n,s,a){var c;const y=(c=(0,On.fp)(a,e))!==null&&c!==void 0?c:[],v=Array();let D=-1;for(let st=r;st&&(D=y.findIndex(pt=>pt.route.routeRefs.has(st)),D===-1);st=s.get(st))v.unshift(st);v.length===0&&(D-=1);const N=D===-1?"":y[D].pathname,tt=v.slice(0,-1).map(st=>{const pt=n.get(st);if(pt===void 0)throw new Error(`No path for ${st}`);if(pt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${st} as it has parameters`);return pt});return`${Jn(N,...tt)}/`}class Ts{resolve(e,n){const[s,a]=Rs(e,this.routePaths,this.routeBindings);if(!s)return;let c;typeof n=="string"?c=this.trimPath(n):n.pathname?c={...n,pathname:this.trimPath(n.pathname)}:c=n;const y=this.appBasePath+ws(s,c,this.routePaths,this.routeParents,this.routeObjects);return(...[D])=>{const N=D&&Ps()(D,tt=>typeof tt=="string"?tt.replaceAll(/[&?#;\/]/g,st=>encodeURIComponent(st)):tt);return Jn(y,(0,On.Gn)(a,N))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}constructor(e,n,s,a,c){(0,p._)(this,"routePaths",void 0),(0,p._)(this,"routeParents",void 0),(0,p._)(this,"routeObjects",void 0),(0,p._)(this,"routeBindings",void 0),(0,p._)(this,"appBasePath",void 0),this.routePaths=e,this.routeParents=n,this.routeObjects=s,this.routeBindings=a,this.appBasePath=c}}const Is=(0,Ge.CT)("routing-context"),Ds=({routePaths:r,routeParents:e,routeObjects:n,routeBindings:s,basePath:a="",children:c})=>{const y=new Ts(r,e,n,s,a),v=(0,ln.E)({1:y});return(0,i.jsx)(Is.Provider,{value:v,children:c})};function Ls(r,e){const n=new Set(e.values());n.delete(void 0);for(const s of e.keys()){if(n.has(s))continue;let a=s,c="";for(;a;){const v=r.get(a);if(v===void 0)throw new Error(`No path for ${a}`);c=Jn(v,c),a=e.get(a)}const y=c.match(/:(\w+)/g);if(y){for(let v=0;v<y.length;v++)for(let D=v+1;D<y.length;D++)if(y[D]===y[v])throw new Error(`Parameter ${y[D]} is duplicated in path ${c}`)}}}function Ms(r,e){for(const n of e)if(n.externalRoutes){for(const[s,a]of Object.entries(n.externalRoutes))if(!a.optional&&!r.has(a))throw new Error(`External route '${s}' of the '${n.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const js=(0,Ge.CT)("app-context"),Bs=({appContext:r,children:e})=>{const n=(0,ln.E)({1:r});return(0,i.jsx)(js.Provider,{value:n,children:e})};function vr(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Ho(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class Us{setTarget(e,n){this.target=e,this.signOutTargetUrl=n.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw vr("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ho("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw vr("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Ho("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(e=>e.getProfileInfo())}async getBackstageIdentity(){const e=await this.waitForTarget.then(n=>n.getBackstageIdentity());return e.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${e.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),e}async getCredentials(){return this.waitForTarget.then(e=>e.getCredentials())}async getIdToken(){return this.waitForTarget.then(e=>{if(!e.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Ho("getIdToken"),e.getIdToken()})}async signOut(){await this.waitForTarget.then(e=>e.signOut()),window.location.href=this.signOutTargetUrl}constructor(){(0,p._)(this,"target",void 0),(0,p._)(this,"waitForTarget",void 0),(0,p._)(this,"resolveTarget",()=>{}),(0,p._)(this,"signOutTargetUrl","/"),this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}}var $s=t(72164);function Fs(r,e,n){if(r!==void 0){const a=n.find(c=>c.id===r);if(a)return a}if(e){const a=n.find(c=>c.variant==="dark");if(a)return a}const s=n.find(a=>a.variant==="light");return s||n[0]}const Ws=()=>{const r=(0,d.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,n]=(0,d.useState)(r.matches);return(0,d.useEffect)(()=>{const s=a=>{n(a.matches)};return r.addListener(s),()=>{r.removeListener(s)}},[r]),e};function mr({children:r}){const e=(0,bn.h_)(Gn),n=(0,$s.Z)(e.activeThemeId$(),e.getActiveThemeId()),s=Boolean(window.matchMedia)?Ws():!1,a=Fs(n,s,e.getInstalledThemes());if(!a)throw new Error("App has no themes");return(0,i.jsx)(a.Provider,{children:r})}const yr=async()=>Ns();function Ns(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!e)throw new Error("No static configuration provided");if(!Array.isArray(e))throw new Error("Static configuration has invalid format");const n=e.slice();if(r!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const a=JSON.parse(r);Array.isArray(a)?n.push(...a):n.push({data:a,context:"env"})}catch(a){throw new Error(`Failed to load runtime configuration, ${a}`)}const s=window.__APP_CONFIG__;return s&&n.push({context:"window",data:s}),n}class Zs{add(e,n){return this.apis.push([e.id,n]),n}build(){return new un(new Map(this.apis))}constructor(){(0,p._)(this,"apis",[])}}class un{static builder(){return new Zs}static from(e){return new un(new Map(e.map(([n,s])=>[n.id,s])))}static with(e,n){return new un(new Map([[e.id,n]]))}with(e,n){return new un(new Map([...this.apis,[e.id,n]]))}get(e){return this.apis.get(e.id)}constructor(e){(0,p._)(this,"apis",void 0),this.apis=e}}function ks(r){const e=new Map;return r&&r({bind:(s,a)=>{for(const[c,y]of Object.entries(a)){const v=s[c];if(!v)throw new Error(`Key ${c} is not an existing external route`);if(!y&&!v.optional)throw new Error(`External route ${c} is required but was undefined`);y&&e.set(v,y)}}}),e}function Rn(){const[r]=(0,m.is)((0,i.jsx)(m.AW,{index:!0,element:(0,i.jsx)("div",{})}));return!r.index}const Er=(0,d.createContext)(void 0);var xr=t(80851),Cr=t(62369),Ks=t(72388);const zs=(r,e)=>{try{const n=(0,On.fp)(e,{pathname:r}),s=n==null?void 0:n.filter(D=>{var N;return(D==null||(N=D.route.routeRefs)===null||N===void 0?void 0:N.size)>0}).pop(),a=s==null?void 0:s.route;if(!a||a.path===""&&r!=="/")return;let c;a.routeRefs.size===1&&(c=a.routeRefs.values().next().value);let y;a.plugins.size===1&&(y=a.plugins.values().next().value);const v=Object.entries((s==null?void 0:s.params)||{}).reduce((D,[N,tt])=>(tt!==void 0&&N!=="*"&&(D[N]=tt),D),{});return{extension:"App",pluginId:(y==null?void 0:y.getId())||"root",...c?{routeRef:c.id}:{},_routeNodeType:a.element,params:v}}catch{return}},Hs=({pathname:r,search:e,hash:n,attributes:s})=>{const a=(0,Cr.z)();return(0,d.useEffect)(()=>{a.captureEvent("navigate",`${r}${e}${n}`,{attributes:s})},[a,r,e,n,s]),null},Xn=({routeObjects:r})=>{const{pathname:e,search:n,hash:s}=(0,m.TH)(),{params:a,...c}=zs(e,r)||{params:{}};return(0,i.jsx)(Ks.fC,{attributes:c,children:(0,i.jsx)(Hs,{pathname:e,search:n,hash:s,attributes:a})})};function Gs(r){return Rn()?Go(r):""}function Go(r){var e;let{pathname:n}=new URL((e=r.getOptionalString("app.baseUrl"))!==null&&e!==void 0?e:"/","http://sample.dev");return n=n.replace(/\/*$/,""),n}function Ar({component:r,appIdentityProxy:e,children:n}){const[s,a]=(0,d.useState)(),c=(0,bn.h_)(le.D),y=Go(c);return s?(e.setTarget(s,{signOutTargetUrl:y||"/"}),(0,i.jsx)(i.Fragment,{children:n})):(0,i.jsx)(r,{onSignInSuccess:a})}function Sr(r){const{Router:e,SignInPage:n}=(0,xr.q)().getComponents(),s=(0,bn.h_)(le.D),a=Go(s),c=`${a}/*`,y=(0,d.useContext)(Er);if(!y)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:v,appIdentityProxy:D}=y;return n?Rn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(Xn,{routeObjects:v}),(0,i.jsx)(Ar,{component:n,appIdentityProxy:D,children:(0,i.jsx)(m.Z5,{children:(0,i.jsx)(m.AW,{path:c,element:(0,i.jsx)(i.Fragment,{children:r.children})})})})]}):(0,i.jsxs)(e,{basename:a,children:[(0,i.jsx)(Xn,{routeObjects:v}),(0,i.jsx)(Ar,{component:n,appIdentityProxy:D,children:r.children})]}):(D.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:a||"/"}),Rn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(Xn,{routeObjects:v}),(0,i.jsx)(m.Z5,{children:(0,i.jsx)(m.AW,{path:c,element:(0,i.jsx)(i.Fragment,{children:r.children})})})]}):(0,i.jsxs)(e,{basename:a,children:[(0,i.jsx)(Xn,{routeObjects:v}),r.children]}))}(0,Pe.R)(Sr,"core.type","AppRouter");const wn="language",Ne="en";var Tn=new WeakMap,hn=new WeakMap,_n=new WeakMap;class qn{static create(e){var n;const s=(n=e==null?void 0:e.availableLanguages)!==null&&n!==void 0?n:[Ne];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(Ne))throw new Error(`Supported languages must include '${Ne}'`);var a;const c=(a=e==null?void 0:e.defaultLanguage)!==null&&a!==void 0?a:Ne;if(!s.includes(c))throw new Error(`Initial language must be one of the supported languages, got '${c}'`);return new qn(s,c)}static createWithStorage(e){const n=qn.create(e);if(!window.localStorage)return n;const s=window.localStorage.getItem(wn),{languages:a}=n.getAvailableLanguages();return s&&a.includes(s)&&n.setLanguage(s),n.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(wn)&&window.localStorage.setItem(wn,c)}),window.addEventListener("storage",c=>{if(c.key===wn){var y;const v=(y=localStorage.getItem(wn))!==null&&y!==void 0?y:void 0;v&&n.setLanguage(v)}}),n}getAvailableLanguages(){return{languages:(0,Pt._)(this,Tn).slice()}}setLanguage(e){const n=e!=null?e:Ne;if(n!==(0,Pt._)(this,hn)){if(n&&!(0,Pt._)(this,Tn).includes(n))throw new Error(`Failed to change language to '${n}', available languages are '${(0,Pt._)(this,Tn).join("', '")}'`);(0,de._)(this,hn,n),(0,Pt._)(this,_n).next({language:n})}}getLanguage(){return{language:(0,Pt._)(this,hn)}}language$(){return(0,Pt._)(this,_n)}constructor(e,n){(0,ce._)(this,Tn,{writable:!0,value:void 0}),(0,ce._)(this,hn,{writable:!0,value:void 0}),(0,ce._)(this,_n,{writable:!0,value:void 0}),(0,de._)(this,Tn,e),(0,de._)(this,hn,n),(0,de._)(this,_n,new ot({language:(0,Pt._)(this,hn)}))}}var Me=t(29190),qe=t(15356),Vs=t(24991),Ys=t(18015),br=t(35304);function Or(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}var fn=new WeakMap,to=new WeakMap,gn=new WeakMap,eo=new WeakSet;class Qs{addTranslationResource(e){const n=(0,Ys.W)(e);for(const s of n.resources){const a=(0,Me._)(this,eo,Vo).call(this,s.language,n.id);(0,Pt._)(this,gn).has(a)||(0,Pt._)(this,gn).set(a,s.loader)}}needsLoading(e,n){const s=(0,Me._)(this,eo,Vo).call(this,e,n);return(0,Pt._)(this,gn).get(s)?!(0,Pt._)(this,fn).has(s):!1}async load(e,n){const s=(0,Me._)(this,eo,Vo).call(this,e,n),a=(0,Pt._)(this,gn).get(s);if(!a||(0,Pt._)(this,fn).has(s))return;const c=(0,Pt._)(this,to).get(s);if(c){await c;return}const y=a().then(v=>{this.onLoad({language:e,namespace:n,messages:v.messages}),(0,Pt._)(this,fn).add(s)},v=>{throw(0,Pt._)(this,fn).add(s),v});(0,Pt._)(this,to).set(s,y),await y}constructor(e){(0,qe._)(this,eo),(0,p._)(this,"onLoad",void 0),(0,ce._)(this,fn,{writable:!0,value:void 0}),(0,ce._)(this,to,{writable:!0,value:void 0}),(0,ce._)(this,gn,{writable:!0,value:void 0}),this.onLoad=e,(0,de._)(this,fn,new Set),(0,de._)(this,to,new Map),(0,de._)(this,gn,new Map)}}function Vo(r,e){return`${r}/${e}`}var In=new WeakMap,pn=new WeakMap,tn=new WeakMap,Yo=new WeakMap,no=new WeakMap,Pr=new WeakSet,oo=new WeakSet,Qo=new WeakSet;class Jo{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),s=(0,Vs.Fs)({fallbackLng:Ne,supportedLngs:n,interpolation:{escapeValue:!1},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(s.init(),!s.isInitialized)throw new Error("i18next was unexpectedly not initialized");const{language:a}=e.languageApi.getLanguage();a!==Ne&&s.changeLanguage(a);const c=new Qs(D=>{s.addResourceBundle(D.language,D.namespace,Or(D.messages),!1,!0)}),y=(e==null?void 0:e.resources)||[];for(let D=y.length-1;D>=0;D--){const N=y[D];N.$$type==="@backstage/TranslationResource"?c.addTranslationResource(N):N.$$type==="@backstage/TranslationMessages"&&s.addResourceBundle(Ne,N.id,Or(N.messages),!0,!1)}const v=new Jo(s,c,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:D})=>{(0,Me._)(v,Pr,Js).call(v,D)}),v}getTranslation(e){const n=(0,br.y)(e);return(0,Me._)(this,Qo,Rr).call(this,n),(0,Me._)(this,oo,Xo).call(this,n)}translation$(e){const n=(0,br.y)(e);return(0,Me._)(this,Qo,Rr).call(this,n),new(H())(s=>{let a={};const c=()=>{a={};const v=a;(0,Pt._)(this,pn).load((0,Pt._)(this,tn),n.id).then(()=>{if(v===a){const D=(0,Me._)(this,oo,Xo).call(this,n);D.ready&&s.next(D)}},D=>{v===a&&s.error(Array.isArray(D)?D[0]:D)})},y=()=>{const v=(0,Me._)(this,oo,Xo).call(this,n);v.ready?s.next(v):c()};return(0,Pt._)(this,pn).needsLoading((0,Pt._)(this,tn),n.id)&&c(),(0,Pt._)(this,no).add(y),()=>{(0,Pt._)(this,no).delete(y)}})}constructor(e,n,s){(0,qe._)(this,Pr),(0,qe._)(this,oo),(0,qe._)(this,Qo),(0,ce._)(this,In,{writable:!0,value:void 0}),(0,ce._)(this,pn,{writable:!0,value:void 0}),(0,ce._)(this,tn,{writable:!0,value:void 0}),(0,ce._)(this,Yo,{writable:!0,value:new Set}),(0,ce._)(this,no,{writable:!0,value:new Set}),(0,de._)(this,In,e),(0,de._)(this,pn,n),(0,de._)(this,tn,s)}}function Js(r){(0,Pt._)(this,tn)!==r&&((0,de._)(this,tn,r),(0,Pt._)(this,In).changeLanguage(r),(0,Pt._)(this,no).forEach(e=>e()))}function Xo(r){return(0,Pt._)(this,pn).needsLoading((0,Pt._)(this,tn),r.id)?{ready:!1}:{ready:!0,t:(0,Pt._)(this,In).getFixedT(null,r.id)}}function Rr(r){if((0,Pt._)(this,Yo).has(r.id))return;(0,Pt._)(this,Yo).add(r.id);const e=r.getDefaultMessages();(0,Pt._)(this,In).addResourceBundle(Ne,r.id,e,!0,!1);const n=r.getDefaultResource();n&&(0,Pt._)(this,pn).addTranslationResource(n)}function wr(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 Xs(r){const e=cn.fromConfigs(r),n=e.getOptionalString("app.baseUrl"),s=e.getOptionalString("backend.baseUrl");let a=r,c,y;if(n&&s){const v=new URL(n).origin,D=new URL(s).origin;if(v===D){const N=wr(s);s!==N&&(c=N)}}if(n){const v=wr(n);n!==v&&(y=v)}return(y||c)&&(a=a.concat({data:{app:y&&{baseUrl:y},backend:c&&{baseUrl:c}},context:"relative-resolver"})),a}function _s(r,e,n){var s;const a=Boolean(r),c=(0,Ue.default)(r||(()=>Promise.resolve([])));let y;if(a&&c.loading){const{Progress:N}=e;y=(0,i.jsx)(N,{})}else if(c.error){const{BootErrorPage:N}=e;y=(0,i.jsx)(N,{step:"load-config",error:c.error})}const{ThemeProvider:v=mr}=e;return y?{node:(0,i.jsx)(Zo,{apis:un.with(Gn,n),children:(0,i.jsx)(v,{children:y})})}:{api:cn.fromConfigs(!((s=c.value)===null||s===void 0)&&s.length?Xs(c.value):[])}}class qs{getPlugins(){return this.app.getPlugins()}getSystemIcon(e){return this.app.getSystemIcon(e)}getSystemIcons(){return this.app.getSystemIcons()}getComponents(){return this.app.getComponents()}constructor(e){(0,p._)(this,"app",void 0),this.app=e}}var _o=new WeakMap;class ti{getPlugins(){return Array.from(this.plugins)}getSystemIcon(e){return this.icons[e]}getSystemIcons(){return this.icons}getComponents(){return this.components}createRoot(e){const n=this.getProvider();return()=>(0,i.jsx)(n,{children:e})}getProvider(){if((0,Pt._)(this,_o))throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");(0,de._)(this,_o,!0);const e=new qs(this);let n=!1;return({children:a})=>{const c=(0,d.useRef)(!0),y=(0,d.useMemo)(()=>Hn.createWithStorage(this.themes),[]),{routing:v,featureFlags:D,routeBindings:N}=(0,d.useMemo)(()=>{const Et=vs({root:a,discoverers:[ms,ys],collectors:{routing:Rn()?Cs:xs,collectedPlugins:Es,featureFlags:As}});return Et.collectedPlugins.forEach(Wt=>this.plugins.add(Wt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...Et,routeBindings:ks(this.bindRoutes)}},[a]);n||(n=!0,Ls(v.paths,v.parents),Ms(N,this.plugins));const tt=_s(this.configLoader,this.components,y),st="api"in tt;if(st){const{api:Et}=tt;this.configApi=Et}if("node"in tt)return tt.node;if(st&&c.current){c.current=!1;const Et=this.getApiHolder().get(dn.W);if(Et){for(const Xt of this.featureFlags)Et.registerFlag({...Xt,pluginId:""});for(const Xt of this.plugins.values())if("getFeatureFlags"in Xt)for(const he of Xt.getFeatureFlags())Et.registerFlag({name:he.name,pluginId:Xt.getId()});else for(const he of Xt.output())he.type==="feature-flag"&&Et.registerFlag({name:he.name,pluginId:Xt.getId()});const Wt=Et.getRegisteredFlags(),zt=new Set(Wt.map(Xt=>Xt.name));for(const Xt of D)zt.has(Xt)||Et.registerFlag({name:Xt,pluginId:""})}}const{ThemeProvider:pt=mr,Progress:mt}=this.components;return(0,i.jsx)(Zo,{apis:this.getApiHolder(),children:(0,i.jsx)(Bs,{appContext:e,children:(0,i.jsx)(pt,{children:(0,i.jsx)(Ds,{routePaths:v.paths,routeParents:v.parents,routeObjects:v.objects,routeBindings:N,basePath:Gs(tt.api),children:(0,i.jsx)(Er.Provider,{value:{routeObjects:v.objects,appIdentityProxy:this.appIdentityProxy},children:(0,i.jsx)(d.Suspense,{fallback:(0,i.jsx)(mt,{}),children:a})})})})})})}}getRouter(){return Sr}getApiHolder(){if(this.apiHolder){for(const e of this.plugins)for(const n of e.getApis())this.apiFactoryRegistry.get(n.api)||this.apiFactoryRegistry.register("default",n);return Ko.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:Gn,deps:{},factory:()=>Hn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:le.D,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:ve.$,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:dr,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:gs.o,deps:{languageApi:dr},factory:({languageApi:e})=>Jo.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:dn.W,deps:{},factory:()=>new fs});for(const e of this.defaultApis)this.apiFactoryRegistry.register("default",e);for(const e of this.plugins)for(const n of e.getApis())if(!this.apiFactoryRegistry.register("default",n))throw new Error(`Plugin ${e.getId()} tried to register duplicate or forbidden API factory for ${n.api}`);for(const e of this.apis)if(!this.apiFactoryRegistry.register("app",e))throw new Error(`Duplicate or forbidden API factory for ${e.api} in app`);return Ko.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new Ko(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const n=new Set;for(const s of e){const a=s.getId();if(n.has(a))throw new Error(`Duplicate plugin found '${a}'`);n.add(a)}}constructor(e){var n,s,a;(0,p._)(this,"apiHolder",void 0),(0,p._)(this,"configApi",void 0),(0,p._)(this,"apis",void 0),(0,p._)(this,"icons",void 0),(0,p._)(this,"plugins",void 0),(0,p._)(this,"featureFlags",void 0),(0,p._)(this,"components",void 0),(0,p._)(this,"themes",void 0),(0,p._)(this,"configLoader",void 0),(0,p._)(this,"defaultApis",void 0),(0,p._)(this,"bindRoutes",void 0),(0,p._)(this,"appLanguageApi",void 0),(0,p._)(this,"translationResources",void 0),(0,p._)(this,"appIdentityProxy",new Us),(0,p._)(this,"apiFactoryRegistry",void 0),(0,ce._)(this,_o,{writable:!0,value:!1});var c;this.apis=(c=e.apis)!==null&&c!==void 0?c:[],this.icons=e.icons;var y;this.plugins=new Set((y=e.plugins)!==null&&y!==void 0?y:[]);var v;this.featureFlags=(v=e.featureFlags)!==null&&v!==void 0?v:[],this.components=e.components,this.themes=e.themes;var D;this.configLoader=(D=e.configLoader)!==null&&D!==void 0?D:yr;var N;this.defaultApis=(N=e.defaultApis)!==null&&N!==void 0?N:[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new ps,this.appLanguageApi=qn.createWithStorage({defaultLanguage:(n=e.__experimentalTranslations)===null||n===void 0?void 0:n.defaultLanguage,availableLanguages:(s=e.__experimentalTranslations)===null||s===void 0?void 0:s.availableLanguages});var tt;this.translationResources=(tt=(a=e.__experimentalTranslations)===null||a===void 0?void 0:a.resources)!==null&&tt!==void 0?tt:[]}}function ei(r){return new ti(r)}function ni(r){var e,n,s,a;return ei({...r,apis:(e=r==null?void 0:r.apis)!==null&&e!==void 0?e:[],bindRoutes:r==null?void 0:r.bindRoutes,components:{...I,...r==null?void 0:r.components},configLoader:r==null?void 0:r.configLoader,defaultApis:Eo,icons:{...Mo,...r==null?void 0:r.icons},plugins:(n=r==null?void 0:r.plugins)!==null&&n!==void 0?n:[],featureFlags:(s=r==null?void 0:r.featureFlags)!==null&&s!==void 0?s:[],themes:(a=r==null?void 0:r.themes)!==null&&a!==void 0?a:Re})}var ro=t(2532);let Tr=!1;const Ir=r=>{const e=(0,xr.q)(),{NotFoundErrorPage:n}=e.getComponents(),s=(0,d.useMemo)(()=>Rn(),[]),c=[...(0,ro.v)(r.children,y=>y.getElements().flatMap(v=>{let D=v.props.path;if(D==="")return[];var N;D=(N=D==null?void 0:D.replace(/\/\*$/,""))!==null&&N!==void 0?N:"/";let tt=s?v:v.props.element;return!s&&!tt&&(tt=v,Tr||(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] />} />."),Tr=!0)),[{path:D,element:tt,children:v.props.children?[{path:D==="/"?"/":"*",element:v.props.children}]:void 0}]}).sort((v,D)=>D.path.localeCompare(v.path)).map(v=>({...v,path:v.path==="/"?"/":`${v.path}/*`}))),{path:"*",element:(0,i.jsx)(n,{})}];return(0,m.V$)(c)};(0,Pe.R)(Ir,"core.type","FlatRoutes");var en=t(74314),oi=t(51547),ri=t(88797);function Dr(r){return!r.cursor}function Ma(r){return!Dr(r)}class si{async getEntityAncestors(e,n){const{kind:s,namespace:a,name:c}=(0,en.of)(e.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(s)}/${encodeURIComponent(a)}/${encodeURIComponent(c)}/ancestry`,n)}async getLocationById(e,n){return await this.requestOptional("GET",`/locations/${encodeURIComponent(e)}`,n)}async getEntities(e,n){const{filter:s=[],fields:a=[],order:c,offset:y,limit:v,after:D}=e!=null?e:{},N=this.getParams(s);if(a.length&&N.push(`fields=${a.map(encodeURIComponent).join(",")}`),c)for(const mt of[c].flat())mt&&N.push(`order=${encodeURIComponent(mt.order)}:${encodeURIComponent(mt.field)}`);y!==void 0&&N.push(`offset=${y}`),v!==void 0&&N.push(`limit=${v}`),D!==void 0&&N.push(`after=${encodeURIComponent(D)}`);const tt=N.length?`?${N.join("&")}`:"",st=await this.requestRequired("GET",`/entities${tt}`,n),pt=(mt,Et)=>{var Wt,zt;if(((Wt=mt.metadata)===null||Wt===void 0?void 0:Wt.name)===void 0||mt.kind===void 0||((zt=Et.metadata)===null||zt===void 0?void 0:zt.name)===void 0||Et.kind===void 0)return 0;const Xt=(0,en.eE)(mt),he=(0,en.eE)(Et);return Xt<he?-1:Xt>he?1:0};return{items:st.sort(pt)}}async getEntitiesByRefs(e,n){var s;const a={entityRefs:e.entityRefs};!((s=e.fields)===null||s===void 0)&&s.length&&(a.fields=e.fields);const y=`${await this.discoveryApi.getBaseUrl("catalog")}/entities/by-refs`,v=await this.fetchApi.fetch(y,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(a)});if(!v.ok)throw await He.V.fromResponse(v);const{items:D}=await v.json();return{items:D.map(N=>N!=null?N:void 0)}}async queryEntities(e={},n){const s=[];if(Dr(e)){var a,c;const{fields:v=[],filter:D,limit:N,orderFields:tt,fullTextFilter:st}=e;s.push(...this.getParams(D)),N!==void 0&&s.push(`limit=${N}`),tt!==void 0&&(Array.isArray(tt)?tt:[tt]).forEach(({field:mt,order:Et})=>s.push(`orderField=${mt},${Et}`)),v.length&&s.push(`fields=${v.map(encodeURIComponent).join(",")}`);const pt=st==null||(a=st.term)===null||a===void 0?void 0:a.trim();pt&&s.push(`fullTextFilterTerm=${pt}`),!(st==null||(c=st.fields)===null||c===void 0)&&c.length&&s.push(`fullTextFilterFields=${st.fields.join(",")}`)}else{const{fields:v=[],limit:D,cursor:N}=e;s.push(`cursor=${N}`),D!==void 0&&s.push(`limit=${D}`),v.length&&s.push(`fields=${v.map(encodeURIComponent).join(",")}`)}const y=s.length?`?${s.join("&")}`:"";return this.requestRequired("GET",`/entities/by-query${y}`,n)}async getEntityByRef(e,n){const{kind:s,namespace:a,name:c}=(0,en.of)(e);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(s)}/${encodeURIComponent(a)}/${encodeURIComponent(c)}`,n)}async getEntityByName(e,n){const{kind:s,namespace:a="default",name:c}=e;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(s)}/${encodeURIComponent(a)}/${encodeURIComponent(c)}`,n)}async refreshEntity(e,n){const s=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify({entityRef:e})});if(s.status!==200)throw new Error(await s.text())}async getEntityFacets(e,n){const{filter:s=[],facets:a}=e,c=this.getParams(s);for(const v of a)c.push(`facet=${encodeURIComponent(v)}`);const y=c.length?`?${c.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${y}`,n)}async addLocation(e,n){const{type:s="url",target:a,dryRun:c}=e,y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${c?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify({type:s,target:a})});if(y.status!==201)throw new Error(await y.text());const{location:v,entities:D,exists:N}=await y.json();if(!v)throw new Error(`Location wasn't added: ${a}`);return{location:v,entities:D,exists:N}}async getLocationByRef(e,n){return(await this.requestRequired("GET","/locations",n)).map(a=>a.data).find(a=>e===(0,oi.NZ)(a))}async removeLocationById(e,n){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(e)}`,n)}async removeEntityByUid(e,n){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(e)}`,n)}async validateEntity(e,n,s){const a=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/validate-entity`,{headers:{"Content-Type":"application/json",...(s==null?void 0:s.token)&&{Authorization:`Bearer ${s==null?void 0:s.token}`}},method:"POST",body:JSON.stringify({entity:e,location:n})});if(a.ok)return{valid:!0};if(a.status!==400)throw await He.V.fromResponse(a);const{errors:c=[]}=await a.json();return{valid:!1,errors:c}}async requestIgnored(e,n,s){const a=`${await this.discoveryApi.getBaseUrl("catalog")}${n}`,c=s!=null&&s.token?{Authorization:`Bearer ${s.token}`}:{},y=await this.fetchApi.fetch(a,{method:e,headers:c});if(!y.ok)throw await He.V.fromResponse(y)}async requestRequired(e,n,s){const a=`${await this.discoveryApi.getBaseUrl("catalog")}${n}`,c=s!=null&&s.token?{Authorization:`Bearer ${s.token}`}:{},y=await this.fetchApi.fetch(a,{method:e,headers:c});if(!y.ok)throw await He.V.fromResponse(y);return y.json()}async requestOptional(e,n,s){const a=`${await this.discoveryApi.getBaseUrl("catalog")}${n}`,c=s!=null&&s.token?{Authorization:`Bearer ${s.token}`}:{},y=await this.fetchApi.fetch(a,{method:e,headers:c});if(!y.ok){if(y.status===404)return;throw await He.V.fromResponse(y)}return await y.json()}getParams(e=[]){const n=[];for(const s of[e].flat()){const a=[];for(const[c,y]of Object.entries(s))for(const v of[y].flat())v===ri.n?a.push(encodeURIComponent(c)):typeof v=="string"&&a.push(`${encodeURIComponent(c)}=${encodeURIComponent(v)}`);a.length&&n.push(`filter=${a.join(",")}`)}return n}constructor(e){(0,p._)(this,"discoveryApi",void 0),(0,p._)(this,"fetchApi",void 0),this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:Un()}}}var Lr=t(88624),ii=t(36802),ai=t(51271),Mr=t(36434),vn=t(65524),li=t(15006),Te=t(82963),ci=t(53945),mn=t(76635);async function di({storageApi:r}){const e=r.forBucket("settings"),n=r.forBucket("starredEntities"),s=e.snapshot("starredEntities").value;if(!(0,mn.isArray)(s))return;var a;const c=new Set((a=n.snapshot("entityRefs").value)!==null&&a!==void 0?a:[]);s.filter(mn.isString).map(y=>y.split(":")).filter(y=>y.length===4&&y[0]==="entity").map(([y,v,D,N])=>(0,en.eE)({kind:v,namespace:D,name:N})).forEach(y=>c.add(y)),await n.set("entityRefs",Array.from(c)),await e.remove("starredEntities")}class ui{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}notifyChanges(){for(const e of this.subscribers)e.next(new Set(this.starredEntities))}constructor(e){(0,p._)(this,"settingsStore",void 0),(0,p._)(this,"starredEntities",void 0),(0,p._)(this,"subscribers",new Set),(0,p._)(this,"observable",new(H())(s=>(s.next(new Set(this.starredEntities)),this.subscribers.add(s),()=>{this.subscribers.delete(s)}))),di(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities");var n;this.starredEntities=new Set((n=this.settingsStore.snapshot("entityRefs").value)!==null&&n!==void 0?n:[]),this.settingsStore.observe$("entityRefs").subscribe({next:s=>{var a;this.starredEntities=new Set((a=s.value)!==null&&a!==void 0?a:[]),this.notifyChanges()}})}}function qo(r){const{years:e=0,months:n=0,weeks:s=0,days:a=0,hours:c=0,minutes:y=0,seconds:v=0,milliseconds:D=0}=r;return((((e*365+n*30+s*7+a)*24+c)*60+y)*60+v)*1e3+D}var hi=t(99798),fi=t.n(hi),gi=t(12830),pi=t.n(gi),vi=t(68203),mi=t(77224),yi=t(78898);const Ei={seconds:10},xi={milliseconds:50},ja=null,Ci={api:Nn.Z,component:kn.Z,system:mi.Z,domain:Fn.Z,location:Zn.Z,user:Cn.Z,group:xn.Z,template:yi.Z};function jr(r){return{async:r.async,render:({entityRef:e,entity:n,context:s})=>({snapshot:(0,vi.n)(n||e,s),loadEntity:r.async})}}var so=new WeakMap,tr=new WeakMap,io=new WeakMap,er=new WeakMap,ao=new WeakMap,Br=new WeakSet,Ur=new WeakSet,$r=new WeakSet;class lo{static createLocal(){return new lo({renderer:jr({async:!1})})}static create(e){return new lo(e)}forEntity(e,n){const{entityRef:s,kind:a,entity:c,needsLoad:y}=(0,Me._)(this,Br,Ai).call(this,e),v=tt=>{const{snapshot:st}=(0,Pt._)(this,ao).render({entityRef:s,loading:tt.loading,entity:tt.entity,context:n||{}});return{...st,entityRef:s,Icon:(0,Me._)(this,$r,bi).call(this,st.Icon,a)}};let D;try{D=v({loading:y,entity:c})}catch{D={primaryTitle:s,entityRef:s}}const N=y?new(H())(tt=>{let st=!1;return Promise.resolve().then(()=>{var pt;return(pt=(0,Pt._)(this,io))===null||pt===void 0?void 0:pt.load(s)}).then(pt=>{if(!st&&pt&&pt.metadata.etag!==(c==null?void 0:c.metadata.etag)){const mt=v({loading:!1,entity:pt});tt.next(mt)}}).catch(()=>{}).finally(()=>{st||tt.complete()}),()=>{st=!0}}):void 0;return{snapshot:D,update$:N}}constructor(e){(0,qe._)(this,Br),(0,qe._)(this,Ur),(0,qe._)(this,$r),(0,ce._)(this,so,{writable:!0,value:void 0}),(0,ce._)(this,tr,{writable:!0,value:void 0}),(0,ce._)(this,io,{writable:!0,value:void 0}),(0,ce._)(this,er,{writable:!0,value:void 0}),(0,ce._)(this,ao,{writable:!0,value:void 0});var n;const s=(n=e.cacheTtl)!==null&&n!==void 0?n:Ei;var a;const c=(a=e.batchDelay)!==null&&a!==void 0?a:xi;var y;const v=(y=e.renderer)!==null&&y!==void 0?y:jr({async:!0}),D={};var N;if(Object.entries((N=e.kindIcons)!==null&&N!==void 0?N:Ci).forEach(([tt,st])=>{D[tt.toLocaleLowerCase("en-US")]=st}),v.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");(0,de._)(this,io,(0,Me._)(this,Ur,Si).call(this,{cacheTtl:s,batchDelay:c,renderer:v,catalogApi:e.catalogApi}))}(0,de._)(this,tr,qo(s)),(0,de._)(this,so,new Map),(0,de._)(this,er,D),(0,de._)(this,ao,v)}}function Ai(r){if(typeof r!="string")return{entity:r,kind:r.kind,entityRef:(0,en.eE)(r),needsLoad:!1};const e=(0,Pt._)(this,so).get(r),n=e==null?void 0:e.entity,a=(!e||Date.now()-e.updatedAt>(0,Pt._)(this,tr))&&(0,Pt._)(this,ao).async!==!1&&(0,Pt._)(this,io)!==void 0;return{entity:n,kind:(0,en.of)(r).kind,entityRef:r,needsLoad:a}}function Si(r){const e=qo(r.cacheTtl),n=qo(r.batchDelay);return new(fi())(async s=>{const{items:a}=await r.catalogApi.getEntitiesByRefs({entityRefs:s}),c=Date.now();return s.forEach((y,v)=>{(0,Pt._)(this,so).set(y,{updatedAt:c,entity:a[v]})}),a},{name:"DefaultEntityPresentationApi",cacheMap:new(pi())(e),maxBatchSize:100,batchScheduleFn:n?s=>setTimeout(s,n):void 0})}function bi(r,e){return r||(r===!1?!1:(0,Pt._)(this,er)[e.toLocaleLowerCase("en-US")])}const we=(0,li.r)({id:"catalog",apis:[(0,Nt.n)({api:Lr.A,deps:{discoveryApi:te.N,fetchApi:Bn.g},factory:({discoveryApi:r,fetchApi:e})=>new si({discoveryApi:r,fetchApi:e})}),(0,Nt.n)({api:ii.p,deps:{storageApi:jn},factory:({storageApi:r})=>new ui({storageApi:r})}),(0,Nt.n)({api:ai.X,deps:{catalogApi:Lr.A},factory:({catalogApi:r})=>lo.create({catalogApi:r})})],routes:{catalogIndex:vn._Z,catalogEntity:Mr.w},externalRoutes:{createComponent:vn.yw,viewTechDoc:vn.jU,createFromTemplate:vn.ql,unregisterRedirect:vn.kR}}),Ba=we.provide((0,Te.P4)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(7241),t.e(1600)]).then(t.bind(t,51600)).then(r=>r.CatalogPage),mountPoint:vn._Z})),Oi=we.provide((0,Te.P4)({name:"CatalogEntityPage",component:()=>t.e(8951).then(t.bind(t,78951)).then(r=>r.CatalogEntityPage),mountPoint:Mr.w})),Ua=we.provide((0,Te.CO)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(1059),t.e(3510)]).then(t.bind(t,43510)).then(r=>r.AboutCard)}})),$a=we.provide((0,Te.CO)({name:"EntityLinksCard",component:{lazy:()=>t.e(7750).then(t.bind(t,17750)).then(r=>r.EntityLinksCard)}})),Fa=we.provide((0,Te.CO)({name:"EntityLabelsCard",component:{lazy:()=>t.e(5877).then(t.bind(t,85877)).then(r=>r.EntityLabelsCard)}})),Wa=we.provide((0,Te.CO)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(5458).then(t.bind(t,5458)).then(r=>r.HasSystemsCard)}})),Na=we.provide((0,Te.CO)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(1105).then(t.bind(t,1105)).then(r=>r.HasComponentsCard)}})),Za=we.provide((0,Te.CO)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(2440).then(t.bind(t,82440)).then(r=>r.HasSubcomponentsCard)}})),ka=we.provide((0,Te.CO)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(9770).then(t.bind(t,79770)).then(r=>r.HasResourcesCard)}})),Ka=we.provide((0,Te.CO)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(9545).then(t.bind(t,19545)).then(r=>r.DependsOnComponentsCard)}})),za=we.provide((0,Te.CO)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(184).then(t.bind(t,40184)).then(r=>r.DependencyOfComponentsCard)}})),Ha=we.provide((0,Te.CO)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(1032).then(t.bind(t,81032)).then(r=>r.DependsOnResourcesCard)}})),Ga=we.provide((0,Te.CO)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(3487).then(t.bind(t,33487)).then(r=>r.RelatedEntitiesCard)}})),Va=we.provide((0,ci.E5)({name:"CatalogSearchResultListItem",component:()=>t.e(7670).then(t.bind(t,27670)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var Fr=t(91657),Wr=t(58496);class Pi{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(e,n){const a=`${await this.getApiOrigin()}/${n}`,c=await fetch(`${a.endsWith("/")?a:`${a}/`}index.html`);if(c.status===404)throw new Error("Page not found");return c.text()}async syncEntityDocs(e){return"cached"}async getBaseUrl(e,n,s){const a=await this.getApiOrigin();return new URL(e,`${a}/${s}`).toString()}constructor({configApi:e,discoveryApi:n,identityApi:s}){(0,p._)(this,"configApi",void 0),(0,p._)(this,"discoveryApi",void 0),(0,p._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}class Ri{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:""}}constructor({configApi:e,discoveryApi:n,identityApi:s}){(0,p._)(this,"configApi",void 0),(0,p._)(this,"discoveryApi",void 0),(0,p._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}const wi=[(0,Nt.n)({api:Wr.D,deps:{configApi:le.D,discoveryApi:te.N,identityApi:ve.$},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new Pi({configApi:r,discoveryApi:e,identityApi:n})}),(0,Nt.n)({api:Wr.g,deps:{configApi:le.D,discoveryApi:te.N,identityApi:ve.$},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new Ri({configApi:r,discoveryApi:e,identityApi:n})}),(0,Nt.n)({api:Fr.q,deps:{configApi:le.D},factory:({configApi:r})=>Fr.a.fromConfig(r)})],Ti={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Ii={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Di(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function Li(){const r=await yr(),e=await Di();return[...r,{context:"detected",data:e?Ti:Ii}]}var Ze=t(79692),Mi=t(58845);const ji=(0,Ze.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Bi=()=>{const r=ji();return(0,i.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,i.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"})})};const Ui=(0,Ze.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var $i=()=>{const r=Ui();return(0,i.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,i.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"})})},Ae=t(76921);const Nr={isOpen:!1,setOpen:()=>{}},Zr=(0,d.createContext)(Nr),kr=(0,Ge.CT)("sidebar-open-state-context");function Kr(r){const{children:e,value:n}=r;return(0,i.jsx)(Zr.Provider,{value:n,children:(0,i.jsx)(kr.Provider,{value:(0,ln.E)({1:n}),children:e})})}const nr=()=>{const r=(0,d.useContext)(kr),e=(0,d.useContext)(Zr);if(r===void 0)return e||Nr;const n=r.atVersion(1);if(n===void 0)throw new Error("No context found for version 1.");return n};var zr=t(98864),Hr=t(44409),Ve=t(62774),Gr=t(41156),Fi=t(72779),nn=t.n(Fi),Wi=t(50023),Vr=t(61837),Ni=t(4190),or=t(90436),Zi=t(87685),ki=t(44882),Ki=t(57998);const Yr=(0,d.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var rr=t(93539);const zi=(0,Ze.Z)(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"}})),Hi=r=>{const{to:e,label:n,icon:s,value:a}=r,{sidebarConfig:c}=(0,d.useContext)(Ae.kG),y=zi({sidebarConfig:c}),v=(0,m.TH)(),{selectedMenuItemIndex:D,setSelectedMenuItemIndex:N}=(0,d.useContext)(Yr),tt=(pt,mt)=>{N(mt===D?-1:mt)},st=a===D&&D>=0||a!==D&&!(D>=0)&&e===v.pathname;return(0,i.jsx)(Ki.Z,{"aria-label":n,label:n,icon:s,component:zr.rU,to:e||v.pathname,onChange:tt,value:a,selected:st,classes:y})},Qr=r=>{const{children:e,to:n,label:s,icon:a,value:c}=r,{isMobile:y}=(0,rr.Pf)();return y?(0,i.jsx)(Hi,{to:n,label:s,icon:a,value:c}):(0,i.jsx)(i.Fragment,{children:e})},Jr=(0,Ze.Z)(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`})})),Gi=r=>(0,mn.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),Vi=d.createElement(Qr).type,Yi=({children:r,label:e="Menu",open:n,onClose:s})=>{const{sidebarConfig:a}=(0,d.useContext)(Ae.kG),c=Jr({sidebarConfig:a});return(0,i.jsxs)(Ni.ZP,{anchor:"bottom",open:n,onClose:s,ModalProps:{BackdropProps:{classes:{root:c.marginMobileSidebar}}},classes:{root:c.marginMobileSidebar,paperAnchorBottom:c.overlay},children:[(0,i.jsxs)(Ve.Z,{className:c.overlayHeader,children:[(0,i.jsx)(or.Z,{variant:"h3",children:e}),(0,i.jsx)(Vr.Z,{onClick:s,classes:{root:c.overlayHeaderClose},children:(0,i.jsx)(Zi.Z,{})})]}),(0,i.jsx)(Ve.Z,{component:"nav",children:r})]})},Qi=r=>{const{sidebarConfig:e}=(0,d.useContext)(Ae.kG),{children:n}=r,s=Jr({sidebarConfig:e}),a=(0,m.TH)(),[c,y]=(0,d.useState)(-1);(0,d.useEffect)(()=>{y(-1)},[a.pathname]);let v=(0,ro.v)(n,N=>N.getElements().filter(tt=>tt.type===Vi));if(n)v.length?v=Gi(v):v.push((0,i.jsx)(Qr,{icon:(0,i.jsx)(ki.Z,{}),children:n},"default_menu"));else return null;const D=c>=0&&!v[c].props.to;return(0,i.jsx)(Kr,{value:{isOpen:!0,setOpen:()=>{}},children:(0,i.jsxs)(Yr.Provider,{value:{selectedMenuItemIndex:c,setSelectedMenuItemIndex:y},children:[(0,i.jsx)(Yi,{label:v[c]&&v[c].props.label,open:D,onClose:()=>y(-1),children:v[c]&&v[c].props.children}),(0,i.jsx)(Wi.Z,{className:s.root,"data-testid":"mobile-sidebar-root",component:"nav",children:v})]})})},Xr=(0,Ze.Z)(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 _r;(function(r){r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open"})(_r||(_r={}));const Ji=r=>{const{sidebarConfig:e}=(0,d.useContext)(Ae.kG),{openDelayMs:n=e.defaultOpenDelayMs,closeDelayMs:s=e.defaultCloseDelayMs,disableExpandOnHover:a,children:c}=r,y=Xr({sidebarConfig:e}),v=(0,Gr.Z)(Xt=>Xt.breakpoints.down("md"),{noSsr:!0}),[D,N]=(0,d.useState)(0),tt=(0,d.useRef)(),{isPinned:st,toggleSidebarPinState:pt}=(0,rr.Pf)(),mt=()=>{st||a||(tt.current&&(clearTimeout(tt.current),tt.current=void 0),D!==2&&!v&&(tt.current=window.setTimeout(()=>{tt.current=void 0,N(2)},n),N(1)))},Et=()=>{st||a||(tt.current&&(clearTimeout(tt.current),tt.current=void 0),D===1?N(0):D===2&&(tt.current=window.setTimeout(()=>{tt.current=void 0,N(0)},s)))},Wt=D===2&&!v||st,zt=Xt=>{Xt?(N(2),pt()):(N(0),pt())};return(0,i.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,i.jsx)(_i,{}),(0,i.jsx)(Kr,{value:{isOpen:Wt,setOpen:zt},children:(0,i.jsx)(Ve.Z,{className:y.root,"data-testid":"sidebar-root",onMouseEnter:a?()=>{}:mt,onFocus:a?()=>{}:mt,onMouseLeave:a?()=>{}:Et,onBlur:a?()=>{}:Et,children:(0,i.jsx)(Ve.Z,{className:nn()(y.drawer,y.drawerWidth,{[y.drawerOpen]:Wt}),children:c})})})]})},Xi=r=>{var e;const n=(0,Ae.$E)((e=r.sidebarOptions)!==null&&e!==void 0?e:{});var s;const a=(0,Ae.rW)((s=r.submenuOptions)!==null&&s!==void 0?s:{}),{children:c,disableExpandOnHover:y,openDelayMs:v,closeDelayMs:D}=r,{isMobile:N}=(0,rr.Pf)();return N?(0,i.jsx)(Qi,{children:c}):(0,i.jsx)(Ae.kG.Provider,{value:{sidebarConfig:n,submenuConfig:a},children:(0,i.jsx)(Ji,{openDelayMs:v,closeDelayMs:D,disableExpandOnHover:y,children:c})})};function _i(){const{sidebarConfig:r}=(0,d.useContext)(Ae.kG),{focusContent:e,contentRef:n}=(0,Hr.r)(),s=Xr({sidebarConfig:r});return n!=null&&n.current?(0,i.jsx)(A.Z,{onClick:e,variant:"contained",className:nn()(s.visuallyHidden),children:"Skip to content"}):null}var qi=t(26739),co=t(1667),ta=t(83543),ea=t(59797),qr=t(98989);const na=(0,Ze.Z)(r=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:r.spacing(7)+1},drawer:e=>{var n,s;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[r.breakpoints.up("sm")]:{marginLeft:e.left,transition:r.transitions.create("margin-left",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(s=(n=r.palette.navigation.submenu)===null||n===void 0?void 0:n.background)!==null&&s!==void 0?s:"#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=>({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.common.white,padding:r.spacing(2.5),[r.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),oa=r=>{const{isOpen:e}=nr(),{sidebarConfig:n,submenuConfig:s}=(0,d.useContext)(Ae.kG),a=e?n.drawerWidthOpen:n.drawerWidthClosed,c=na({left:a,submenuConfig:s}),{isHoveredOn:y}=(0,d.useContext)(Ae.Ag),[v,D]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{D(y)},[y]),(0,i.jsxs)(Ve.Z,{className:nn()(c.drawer,{[c.drawerOpen]:v}),children:[(0,i.jsx)(or.Z,{variant:"h5",component:"span",className:c.title,children:r.title}),r.children]})};var ra=t(19126),ts=t.n(ra);function es(r,e,n=!1){const s=new URLSearchParams(e.search).toString(),a=ts().parse(s),c=new URLSearchParams(r.search).toString(),y=ts().parse(c),v=n?mn.isEqual:mn.isMatch;return(0,mn.isEqual)(e.pathname,r.pathname)&&v(y,a)}const sa=r=>(0,Ze.Z)(e=>{var n,s,a,c;return{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:(a=(n=e.palette.navigation.navItem)===null||n===void 0?void 0:n.hoverBackground)!==null&&a!==void 0?a:"#404040"}},highlighted:{background:(c=(s=e.palette.navigation.navItem)===null||s===void 0?void 0:s.hoverBackground)!==null&&c!==void 0?c:"#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 uo(r){return(0,d.useMemo)(()=>sa(r),[r])()}const ia=(r,e)=>(0,ro.v)(r.props.children,n=>{let s=!1;return n.getElements().forEach(({props:{to:a,dropdownItems:c}})=>{if(!s){if(c!=null&&c.length){c.forEach(({to:y})=>s=s||es(e,(0,On.i3)(y)));return}a&&(s=es(e,(0,On.i3)(a)))}}),s},[e.pathname]);function sr(r){return r.to===void 0}const aa=d.createElement(oa).type,la=d.forwardRef(function({to:e,end:n,style:s,className:a,activeStyle:c,caseSensitive:y,activeClassName:v="active","aria-current":D="page",...N},tt){let{pathname:st}=(0,m.TH)(),{pathname:pt}=(0,m.WU)(e);y||(st=st.toLocaleLowerCase("en-US"),pt=pt.toLocaleLowerCase("en-US"));let mt=st===pt;!mt&&!n&&(mt=st.startsWith(`${pt}/`));const Et=mt?D:void 0;return(0,i.jsx)(E.rU,{...N,to:e,ref:tt,"aria-current":Et,style:{...s,...mt?c:void 0},className:nn()([typeof a!="function"?a:void 0,mt?v:void 0])})}),ns=(0,d.forwardRef)((r,e)=>{const{icon:n,text:s,hasNotifications:a=!1,hasSubmenu:c=!1,disableHighlight:y=!1,onClick:v,noTrack:D,children:N,className:tt,...st}=r,{sidebarConfig:pt}=(0,d.useContext)(Ae.kG),mt=uo(pt),{isOpen:Et}=nr(),Wt=!Et&&c?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},zt=(0,i.jsxs)(Ve.Z,{style:Wt,children:[(0,i.jsx)(n,{fontSize:"small"}),!Et&&c?(0,i.jsx)(qr.Z,{fontSize:"small"}):(0,i.jsx)(i.Fragment,{})]}),Xt=(0,i.jsx)(qi.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!a,className:nn()({[mt.closedItemIcon]:!Et}),children:zt}),he=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ve.Z,{"data-testid":"login-button",className:mt.iconContainer,children:Xt}),s&&(0,i.jsx)(or.Z,{variant:"subtitle2",component:"span",className:mt.label,children:s}),(0,i.jsx)("div",{className:mt.secondaryAction,children:N})]}),ke=Et?he:Xt,Dn={onClick:v,className:nn()(tt,mt.root,Et?mt.open:mt.closed,sr(r)&&mt.buttonItem,{[mt.highlightable]:!y})},is=(0,Cr.z)(),{pathname:ir}=(0,m.WU)(!sr(r)&&r.to?r.to:""),as=(0,d.useCallback)(Ta=>{if(!D){const Ia="click",Da=s!=null?s:"Sidebar Item",La=ir?{attributes:{to:ir}}:void 0;is.captureEvent(Ia,Da,La)}v==null||v(Ta)},[is,s,ir,D,v]);return sr(r)?(0,i.jsx)(A.Z,{role:"button","aria-label":s,...Dn,ref:e,onClick:as,children:ke}):(0,i.jsx)(la,{...Dn,activeClassName:mt.selected,to:r.to?r.to:"",ref:e,"aria-label":s||r.to,...st,onClick:as,children:ke})}),ca=({children:r,...e})=>{const{sidebarConfig:n}=(0,d.useContext)(Ae.kG),s=uo(n),[a,c]=(0,d.useState)(!1),y=(0,m.TH)(),v=ia(r,y),D=(0,Gr.Z)(pt=>pt.breakpoints.down("sm")),N=()=>{c(!0)},tt=()=>{c(!1)},st=()=>D?a?(0,i.jsx)(ea.Z,{fontSize:"small",className:s.submenuArrow}):(0,i.jsx)(ta.Z,{fontSize:"small",className:s.submenuArrow}):!a&&(0,i.jsx)(qr.Z,{fontSize:"small",className:s.submenuArrow});return(0,i.jsx)(Ae.Ag.Provider,{value:{isHoveredOn:a,setIsHoveredOn:c},children:(0,i.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:tt,onTouchStart:a?tt:N,onMouseEnter:N,className:nn()(a&&s.highlighted),children:[(0,i.jsx)(ns,{hasSubmenu:!0,className:v?s.selected:"",...e,children:st()}),a&&r]})})},os=(0,d.forwardRef)((r,e)=>{const[n]=(0,ro.v)(r.children,s=>s.getElements().filter(a=>a.type===aa));return n?(0,i.jsx)(ca,{...r,children:n}):(0,i.jsx)(ns,{...r,ref:e})});function Ja(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[n,s]=useState(""),a=uo(e),c=r.icon?r.icon:SearchIcon,y=()=>{r.onSearch(n),s("")},v=st=>{st.key==="Enter"&&(st.preventDefault(),y())},D=st=>{s(st.target.value)},N=st=>{st.preventDefault(),st.stopPropagation()},tt=st=>{y(),st.preventDefault()};return _jsx(Box,{className:a.searchRoot,children:_jsx(os,{icon:c,to:r.to,onClick:tt,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:n,onClick:N,onChange:D,onKeyDown:v,className:a.searchContainer,InputProps:{disableUnderline:!0,className:a.searchField},inputProps:{className:a.searchFieldHTMLInput}})})})}const Xa=(0,co.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),_a=(0,co.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),da=(0,co.Z)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),ua=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),qa=(0,co.Z)("div")(({theme:r})=>{const e=ua(r);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),tl=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=uo(r),{isOpen:n,setOpen:s}=useSidebarOpenState();if(useMediaQuery(y=>y.breakpoints.down("md"),{noSsr:!0}))return null;const c=()=>{s(!n)};return _jsx(Button,{role:"button",onClick:c,className:e.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:e.arrows,children:n?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},ha=(0,Ze.Z)({root:{width:Ae.po.drawerWidthClosed,height:3*Ae.po.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:Ae.po.drawerWidthClosed,marginLeft:24}}),fa=()=>{const r=ha(),{isOpen:e}=nr();return(0,i.jsx)("div",{className:r.root,children:(0,i.jsx)(zr.rU,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,i.jsx)(Bi,{}):(0,i.jsx)($i,{})})})},ga=({children:r})=>(0,i.jsxs)(Hr.t,{children:[(0,i.jsxs)(Xi,{children:[(0,i.jsx)(fa,{}),(0,i.jsx)(da,{}),(0,i.jsx)(os,{icon:Mi.Z,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var pa=t(80030),va=t(32388),ma=t(4142),ya=t(65386),Ea=t(14540);const xa=(0,Ze.Z)(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 rs;(function(r){r.LIGHT="light",r.DARK="dark"})(rs||(rs={}));const Ca=()=>{const r=(0,bn.h_)(Gn),e=xa(),[n,s]=(0,d.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),a={light:{icon:ma.Z,title:"Dark theme"},dark:{icon:va.Z,title:"Light theme"}},{title:c,icon:y}=a[n],v=()=>{s(D=>{const N=D==="light"?"dark":"light";return r.setActiveThemeId(N),N})};return(0,i.jsx)(Ve.Z,{display:"flex",alignItems:"center",mr:2,children:(0,i.jsx)(pa.ZP,{title:c,arrow:!0,children:(0,i.jsx)(Vr.Z,{size:"small",onClick:v,children:(0,i.jsx)(y,{className:e.headerIcon})})})})},Aa=()=>(0,i.jsxs)(f.I6,{children:[(0,i.jsx)(ya.S,{}),(0,i.jsx)(Ea.F,{withSearch:!1})]}),Sa=(0,i.jsx)(Aa,{}),ss=ni({apis:wi,configLoader:Li,plugins:Object.values(o)}),ba=ss.getProvider(),Oa=ss.getRouter(),Pa=f.s4.provide((0,g.KY)({name:"ThemeToggleAddon",component:Ca,location:S.o.Header})),Ra=(0,i.jsxs)(Ir,{children:[(0,i.jsx)(m.Fg,{to:"/docs/default/component/local/"},"/"),(0,i.jsx)(m.AW,{path:"/catalog/:namespace/:kind/:name",element:(0,i.jsx)(Oi,{})}),(0,i.jsx)(m.AW,{path:"/docs",element:(0,i.jsx)(f.Jl,{}),children:(0,i.jsx)(l.u,{})}),(0,i.jsxs)(m.AW,{path:"/docs/:namespace/:kind/:name/*",element:(0,i.jsx)(f.I6,{}),children:[Sa,(0,i.jsx)(g.DR,{children:(0,i.jsx)(Pa,{})})]})]});var wa=()=>(0,i.jsx)(ba,{children:(0,i.jsx)(Oa,{children:(0,i.jsx)(ga,{children:Ra})})});b.createRoot(document.getElementById("root")).render((0,i.jsx)(wa,{}))},29651:function(_,P,t){"use strict";t.d(P,{CT:function(){return d},Vt:function(){return b}});var o=t(2784),i=t(96087);function d(f){return(0,i.u)(f,()=>(0,o.createContext)(void 0))}function b(f){return(0,o.useContext)(d(f))}function m(f){return{set(l){globalThis[`__@backstage/${f}__`]=createContext(createVersionedValueMap(l))},reset(){delete globalThis[`__@backstage/${f}__`]}}}},68993:function(_,P,t){"use strict";t.d(P,{E:function(){return o}});function o(i){Object.freeze(i);const d={atVersion(b){return i[b]}};return Object.defineProperty(d,"$map",{configurable:!0,enumerable:!0,get(){return i}}),d}},96087:function(_,P,t){"use strict";t.d(P,{u:function(){return b}});function o(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const i=o(),d=m=>`__@backstage/${m}__`;function b(m,f){const l=d(m);let g=i[l];return g||(g=f(),i[l]=g,g)}},88624:function(_,P,t){"use strict";t.d(P,{A:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"plugin.catalog.service"})},51271:function(_,P,t){"use strict";t.d(P,{X:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"plugin.catalog.entity-presentation"})},68203:function(_,P,t){"use strict";t.d(P,{n:function(){return B}});var o=t(74314),i=t(34106),d=t(43642),b=t(77224),m=t(15933),f=t(86737),l=t(78898),g=t(4989),S=t(44407),A=t(84219),R=t(98685),x=t(72579),C=t.n(x);const E=f.Z,U={api:m.Z,component:S.Z,system:b.Z,domain:d.Z,location:g.Z,user:R.Z,group:A.Z,template:l.Z};function B(I,p){const{kind:K,namespace:V,name:J,title:H,description:G,displayName:z,type:Y}=w(I),ot=K&&U[K.toLocaleLowerCase("en-US")]||E,ct=(0,o.eE)({kind:K||"unknown",namespace:V||i.zG,name:J||"unknown"}),dt=$({kind:K,namespace:V,name:J,context:p}),ft=[z,H,dt].find(at=>at&&typeof at=="string"),Ot=[ft!==ct?ct:void 0,Y,G].filter(at=>at&&typeof at=="string").join(" | ");return{entityRef:ct,primaryTitle:ft,secondaryTitle:Ot||void 0,Icon:ot}}function w(I){if(typeof I=="string"){let p=I.indexOf(":");const K=I.indexOf("/");K!==-1&&K<p&&(p=-1);const V=p===-1?void 0:I.slice(0,p),J=K===-1?void 0:I.slice(p+1,K),H=I.slice(Math.max(p+1,K+1));return{kind:V,namespace:J,name:H}}if(typeof I=="object"&&I!==null){const p=[C()(I,"kind")].find(Y=>Y&&typeof Y=="string"),K=[C()(I,"metadata.namespace"),C()(I,"namespace")].find(Y=>Y&&typeof Y=="string"),V=[C()(I,"metadata.name"),C()(I,"name")].find(Y=>Y&&typeof Y=="string"),J=[C()(I,"metadata.title")].find(Y=>Y&&typeof Y=="string"),H=[C()(I,"metadata.description")].find(Y=>Y&&typeof Y=="string"),G=[C()(I,"spec.profile.displayName")].find(Y=>Y&&typeof Y=="string"),z=[C()(I,"spec.type")].find(Y=>Y&&typeof Y=="string");return{kind:p,namespace:K,name:V,title:J,description:H,displayName:G,type:z}}return{}}function $(I){var p,K,V,J,H;const G=((p=I.kind)===null||p===void 0?void 0:p.toLocaleLowerCase("en-US"))||"unknown",z=I.namespace||i.zG,Y=I.name||"unknown",ot=(V=I.context)===null||V===void 0||(K=V.defaultKind)===null||K===void 0?void 0:K.toLocaleLowerCase("en-US"),ct=(H=I.context)===null||H===void 0||(J=H.defaultNamespace)===null||J===void 0?void 0:J.toLocaleLowerCase("en-US");let dt=Y;return(ct&&z.toLocaleLowerCase("en-US")!==ct||z!==i.zG)&&(dt=`${z}/${dt}`),ot&&G.toLocaleLowerCase("en-US")!==ot&&(dt=`${G}:${dt}`),dt}},36802:function(_,P,t){"use strict";t.d(P,{p:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"catalog-react.starred-entities"})},30389:function(_,P,t){"use strict";t.d(P,{_i:function(){return C}});var o=t(52322),i=t(2784),d=t(41156),b=t(60364),m=t(77277),f=t(4190),l=t(62774),g=t(90436),S=t(60905),A=t(36444);const R=E=>{var U;const B=(0,d.Z)(K=>{var V,J;return K.breakpoints.down((J=(V=E.options)===null||V===void 0?void 0:V.drawerBreakpoint)!==null&&J!==void 0?J:"md")}),w=(0,b.Z)(),[$,I]=(0,i.useState)(!1);var p;return B?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(m.Z,{style:{marginTop:w.spacing(1),marginLeft:w.spacing(1)},onClick:()=>I(!0),startIcon:(0,o.jsx)(A.Z,{}),children:"Filters"}),(0,o.jsx)(f.ZP,{open:$,onClose:()=>I(!1),anchor:(p=(U=E.options)===null||U===void 0?void 0:U.drawerAnchor)!==null&&p!==void 0?p:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,o.jsxs)(l.Z,{m:2,children:[(0,o.jsx)(g.Z,{variant:"h6",component:"h2",style:{marginBottom:w.spacing(1)},children:"Filters"}),E.children]})})]}):(0,o.jsx)(S.Z,{item:!0,lg:2,children:E.children})},x=E=>(0,o.jsx)(S.Z,{item:!0,xs:12,lg:10,children:E.children}),C=E=>(0,o.jsx)(S.Z,{container:!0,style:{position:"relative"},children:E.children});C.Filters=R,C.Content=x},77605:function(_,P,t){"use strict";t.d(P,{K:function(){return G}});var o=t(52322),i=t(62774),d=t(90436),b=t(38016),m=t(88013),f=t(2784),l=t(44394),g=t(64279),S=t(88624),A=t(21324),R=t(5806),x=t(19996),C=t(25505);const E=(0,o.jsx)(C.Z,{fontSize:"small"}),U=(0,o.jsx)(x.Z,{fontSize:"small"});function B({selected:z}){return(0,o.jsx)(A.Z,{icon:E,checkedIcon:U,checked:z})}const w=(0,f.memo)(z=>{const{selected:Y,value:ot,availableOptions:ct,showCounts:dt}=z,ft=dt?`${ot} (${ct==null?void 0:ct[ot]})`:ot;return(0,o.jsx)(R.Z,{control:(0,o.jsx)(B,{selected:Y}),label:ft,onClick:Ot=>Ot.preventDefault()})});var $=t(79692),I=t(86619),p=t(72779),K=t.n(p);const V=(0,$.Z)({input:{}},{name:"CatalogReactEntityAutocompletePickerInput"});function J(z){const Y=V();return(0,o.jsx)(I.Z,{variant:"outlined",...z,className:K()(Y.input,z.className)})}var H=t(25942);function G(z){var Y;const{label:ot,name:ct,path:dt,showCounts:ft,Filter:Ot,InputProps:at,initialSelectedOptions:At=[]}=z,{updateFilters:X,filters:L,queryParameters:{[ct]:Q}}=(0,H.wp)(),et=(0,l.h_)(S.A),{value:it}=(0,g.default)(async()=>{var gt;const bt=dt,{facets:It}=await et.getEntityFacets({facets:[bt],filter:(gt=L.kind)===null||gt===void 0?void 0:gt.getCatalogFilters()});return Object.fromEntries(It[bt].map(({value:jt,count:ge})=>[jt,ge]))},[L.kind]),ut=(0,f.useMemo)(()=>[Q].flat().filter(Boolean),[Q]);var Z;const[F,ht]=(0,f.useState)(ut.length?ut:(Z=(Y=L[ct])===null||Y===void 0?void 0:Y.values)!==null&&Z!==void 0?Z:At);(0,f.useEffect)(()=>{ut.length&&ht(ut)},[ut]);const xt=Object.keys(it!=null?it:{}),vt=F.length&&xt.length;(0,f.useEffect)(()=>{X({[ct]:vt?new Ot(F):void 0})},[ct,vt,F,Ot,X]);const yt=L[ct];return yt&&typeof yt=="object"&&!("values"in yt)||!xt.length||xt.length<=1?null:(0,o.jsx)(i.Z,{pb:1,pt:1,children:(0,o.jsxs)(d.Z,{variant:"button",component:"label",children:[ot,(0,o.jsx)(m.ZP,{multiple:!0,disableCloseOnSelect:!0,options:xt,value:F,onChange:(gt,bt)=>ht(bt),renderOption:(gt,{selected:bt})=>(0,o.jsx)(w,{selected:bt,value:gt,availableOptions:it,showCounts:!!ft}),size:"small",popupIcon:(0,o.jsx)(b.Z,{"data-testid":`${String(ct)}-picker-expand`}),renderInput:gt=>(0,o.jsx)(J,{...gt,...at})})]})})}},63833:function(_,P,t){"use strict";t.d(P,{d:function(){return X}});var o=t(52322),i=t(74314),d=t(79692),b=t(62774),m=t(90436),f=t(5806),l=t(21324),g=t(86619),S=t(19996),A=t(25505),R=t(38016),x=t(88013),C=t(2784),E=t(25942),U=t(4967),B=t(6232),w=t(98685),$=t(62367),I=t(86540),p=t(44394),K=t(69294),V=t(88624);function J({enabled:L}){const Q=(0,p.h_)(V.A),[et]=(0,C.useState)(async()=>{if(!L)return[];const it="relations.ownedBy";return Q.getEntityFacets({facets:[it]}).then(ut=>ut.facets[it].map(Z=>Z.value).map(Z=>{const{kind:F,name:ht,namespace:xt}=(0,i.of)(Z);return{apiVersion:"backstage.io/v1beta1",kind:F,metadata:{name:ht,namespace:xt}}}).sort((Z,F)=>(Z.metadata.namespace||"").localeCompare(F.metadata.namespace||"","en-US")||Z.metadata.name.localeCompare(F.metadata.name,"en-US")||Z.kind.localeCompare(F.kind,"en-US"))).catch(()=>[])});return(0,K.default)(async(it,ut)=>{const Z=await et;if(!Z)return{items:[]};var F;const ht=(F=ut==null?void 0:ut.limit)!==null&&F!==void 0?F:20,{text:xt,start:vt}=H(it),yt=Z.filter(bt=>Y(xt,bt)),gt=vt+ht;return{items:yt.slice(0,gt),...z({entities:yt,limit:gt,payload:{text:xt,start:gt}})}},[et],{loading:!0,value:{items:[]}})}function H(L){return G(L)&&L.cursor?JSON.parse(atob(L.cursor)):{text:L.text||"",start:0}}function G(L){return!!L.cursor}function z({entities:L,limit:Q,payload:et}){return L.length>Q?{cursor:btoa(JSON.stringify(et))}:{}}function Y(L,Q){var et;const it=L.trim();return Q.kind.includes(it)||((et=Q.metadata.namespace)===null||et===void 0?void 0:et.includes(it))||Q.metadata.name.includes(it)}function ot(){const L=(0,p.h_)(V.A);return(0,K.default)(async(Q,et)=>{const it=Q,ut=Q;var Z;const F=(Z=et==null?void 0:et.limit)!==null&&Z!==void 0?Z:20;if(ut.cursor){const xt=await L.queryEntities({cursor:ut.cursor,limit:F});return{cursor:xt.pageInfo.nextCursor,items:[...ut.items,...xt.items]}}const ht=await L.queryEntities({fullTextFilter:{term:it.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:F});return{cursor:ht.pageInfo.nextCursor,items:ht.items}},[],{loading:!0})}var ct=t(21638);function dt({mode:L,initialSelectedOwnersRefs:Q}){const et=L==="owners-only",it=ot(),ut=J({enabled:et}),[Z,F]=et?ut:it;return[Z,F,ft({enabled:!et,initialSelectedOwnersRefs:Q})]}function ft({enabled:L,initialSelectedOwnersRefs:Q}){const et=(0,C.useRef)({}),it=(0,p.h_)(V.A),[,ut]=(0,K.default)(async()=>{(await it.getEntitiesByRefs({entityRefs:Q})).items.forEach(F=>{F&&(et.current[(0,i.eE)(F)]=F)})},[]);return(0,ct.n)(()=>{L&&Q.length>0&&ut()}),{getEntity:Z=>et.current[Z],setEntity:Z=>{et.current[(0,i.eE)(Z)]=Z}}}const Ot=(0,d.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),at=(0,o.jsx)(A.Z,{fontSize:"small"}),At=(0,o.jsx)(S.Z,{fontSize:"small"}),X=L=>{var Q,et;const it=Ot(),{mode:ut="owners-only"}=L||{},{updateFilters:Z,filters:F,queryParameters:{owners:ht}}=(0,E.wp)(),[xt,vt]=(0,C.useState)(""),yt=(0,C.useMemo)(()=>[ht].flat().filter(Boolean),[ht]);var gt;const[bt,It]=(0,C.useState)(yt.length?yt:(gt=(Q=F.owners)===null||Q===void 0?void 0:Q.values)!==null&>!==void 0?gt:[]),[{value:jt,loading:ge},Se,Ee]=dt({mode:ut,initialSelectedOwnersRefs:bt});(0,B.b)(()=>Se({text:xt}),[xt,Se],250);const $t=(jt==null?void 0:jt.items)||[];return(0,C.useEffect)(()=>{if(yt.length){const Lt=new U.rf(yt);It(Lt.values)}},[yt]),(0,C.useEffect)(()=>{Z({owners:bt.length?new U.rf(bt):void 0})},[bt,Z]),["user","group"].includes(((et=F.kind)===null||et===void 0?void 0:et.value.toLocaleLowerCase("en-US"))||"")?null:(0,o.jsx)(b.Z,{pb:1,pt:1,children:(0,o.jsxs)(m.Z,{variant:"button",component:"label",children:["Owner",(0,o.jsx)(x.ZP,{multiple:!0,disableCloseOnSelect:!0,loading:ge,options:$t,value:bt,getOptionSelected:(Lt,Kt)=>typeof Kt=="string"?(0,i.eE)(Lt)===Kt:Lt===Kt,getOptionLabel:Lt=>{const Kt=typeof Lt=="string"?Ee.getEntity(Lt)||(0,i.of)(Lt,{defaultKind:"group",defaultNamespace:"default"}):Lt;return(0,I.w)(Kt,(0,I.$)(Kt))},onChange:(Lt,Kt)=>{vt(""),It(Kt.map(Yt=>{const qt=typeof Yt=="string"?Yt:(0,i.eE)(Yt);return typeof Yt!="string"&&Ee.setEntity(Yt),qt}))},filterOptions:Lt=>Lt,renderOption:(Lt,{selected:Kt})=>{const Yt=Lt.kind.toLocaleLowerCase("en-US")==="group";return(0,o.jsx)(f.Z,{control:(0,o.jsx)(l.Z,{icon:at,checkedIcon:At,checked:Kt}),onClick:qt=>qt.preventDefault(),label:(0,o.jsxs)(b.Z,{display:"flex",flexWrap:"wrap",alignItems:"center",children:[Yt?(0,o.jsx)($.Z,{fontSize:"small"}):(0,o.jsx)(w.Z,{fontSize:"small"}),"\xA0",(0,I.w)(Lt,(0,I.$)(Lt,{defaultKind:Lt.kind}))]})})},size:"small",popupIcon:(0,o.jsx)(R.Z,{"data-testid":"owner-picker-expand"}),renderInput:Lt=>(0,o.jsx)(g.Z,{...Lt,className:it.input,onChange:Kt=>{vt(Kt.currentTarget.value)},variant:"outlined"}),ListboxProps:{onScroll:Lt=>{const Kt=Lt.currentTarget;Math.abs(Kt.scrollHeight-Kt.clientHeight-Kt.scrollTop)<1&&(jt!=null&&jt.cursor)&&Se({items:jt.items,cursor:jt.cursor})},"data-testid":"owner-picker-listbox"}})]})})}},84719:function(_,P,t){"use strict";t.d(P,{d:function(){return $}});var o=t(52322),i=t(74314),d=t(34106),b=t(98864),m=t(37321),f=t(2784),l=t(36434),g=t(79692),S=t(62774),A=t(80030),R=t(44394),x=t(51271),C=t(68203);function E(p,K,V){const[J,H]=(0,f.useState)(p);return(0,f.useEffect)(()=>{H(p);const G=K==null?void 0:K.subscribe({next:z=>{H(z)},complete:()=>{G==null||G.unsubscribe()}});return()=>{G==null||G.unsubscribe()}},V),J}function U(p,K){const J=(0,R.I_)().get(x.X),H=[J,JSON.stringify(p),JSON.stringify(K||null)],G=(0,f.useMemo)(()=>J?J.forEntity(typeof p=="string"||"metadata"in p?p:(0,i.eE)(p),K):{snapshot:(0,C.n)(p,K)},H);return E(G.snapshot,G.update$,[G])}const B=(0,g.Z)(p=>({root:{display:"inline-flex",alignItems:"center"},icon:{marginRight:p.spacing(.5),color:p.palette.text.secondary,lineHeight:0}}),{name:"CatalogReactEntityDisplayName"}),w=p=>{const{entityRef:K,hideIcon:V,disableTooltip:J,defaultKind:H,defaultNamespace:G}=p,z=B(),{primaryTitle:Y,secondaryTitle:ot,Icon:ct}=U(K,{defaultKind:H,defaultNamespace:G});let dt=(0,o.jsx)(o.Fragment,{children:Y});return dt=(0,o.jsxs)(S.Z,{component:"span",className:z.root,children:[ct&&!V?(0,o.jsx)(S.Z,{component:"span",className:z.icon,children:(0,o.jsx)(ct,{fontSize:"inherit"})}):null,dt]}),ot&&!J&&(dt=(0,o.jsx)(A.ZP,{enterDelay:1500,title:ot,children:dt})),dt},$=(0,f.forwardRef)((p,K)=>{const{entityRef:V,defaultKind:J,defaultNamespace:H,title:G,children:z,hideIcon:Y,...ot}=p,ct=I(p.entityRef);var dt;const ft=(dt=z!=null?z:G)!==null&&dt!==void 0?dt:(0,o.jsx)(w,{entityRef:V,defaultKind:J,defaultNamespace:H,hideIcon:Y});return(0,o.jsx)(b.rU,{...ot,ref:K,to:ct,children:ft})});function I(p){const K=(0,m.t)(l.w);let V,J,H;if(typeof p=="string"){const Y=(0,i.of)(p);V=Y.kind,J=Y.namespace,H=Y.name}else"metadata"in p?(V=p.kind,J=p.metadata.namespace,H=p.metadata.name):(V=p.kind,J=p.namespace,H=p.name);V=V.toLocaleLowerCase("en-US");var G;J=(G=J==null?void 0:J.toLocaleLowerCase("en-US"))!==null&&G!==void 0?G:d.zG;const z={kind:encodeURIComponent(V),namespace:encodeURIComponent(J),name:encodeURIComponent(H)};return K(z)}},51194:function(_,P,t){"use strict";t.d(P,{r:function(){return m}});var o=t(52322),i=t(74314),d=t(2784),b=t(84719);function m(f){const{entityRefs:l,hideIcons:g,...S}=f;return(0,o.jsx)(o.Fragment,{children:l.map((A,R)=>{const x=typeof A=="string"?A:(0,i.eE)(A);return(0,o.jsxs)(d.Fragment,{children:[R>0&&", ",(0,o.jsx)(b.d,{...S,entityRef:A,hideIcon:g})]},`${R}.${x}`)})})}},86540:function(_,P,t){"use strict";t.d(P,{$:function(){return b},w:function(){return m}});var o=t(34106),i=t(72579),d=t.n(i);function b(f,l){const g=l==null?void 0:l.defaultKind;let S,A,R;return"metadata"in f?(S=f.kind,A=f.metadata.namespace,R=f.metadata.name):(S=f.kind,A=f.namespace,R=f.name),(A===void 0||A==="")&&(A=o.zG),(l==null?void 0:l.defaultNamespace)!==void 0?(l==null?void 0:l.defaultNamespace)===A&&(A=void 0):A===o.zG&&(A=void 0),S=S.toLocaleLowerCase("en-US"),S=g&&g.toLocaleLowerCase("en-US")===S?void 0:S,`${S?`${S}:`:""}${A?`${A}/`:""}${R}`}function m(f,l){for(const g of["spec.profile.displayName","metadata.title"]){const S=d()(f,g);if(S&&typeof S=="string")return S}return l}},97894:function(_,P,t){"use strict";t.d(P,{x:function(){return l}});var o=t(52322),i=t(79692),d=t(2784),b=t(4967),m=t(77605);const f=(0,i.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),l=g=>{const S=f();return(0,o.jsx)(m.K,{label:"Tags",name:"tags",path:"metadata.tags",Filter:b.Cu,showCounts:g.showCounts,InputProps:{className:S.input}})}},32494:function(_,P,t){"use strict";t.d(P,{E:function(){return Ot}});var o=t(52322),i=t(44394),d=t(6542),b=t(79692),m=t(94339),f=t(90436),l=t(11776),g=t(12231),S=t(86136),A=t(49378),R=t(9520),x=t(47603),C=t(11640),E=t(2784),U=t(4967),B=t(25942),w=t(77186),$=t(76635),I=t(64279),p=t(88624),K=t(64039),V=t(69294),J=t(38408);function H(){const at=(0,i.h_)(w.$),At=(0,i.h_)(p.A),{filters:X}=(0,B.wp)(),{value:L,loading:Q}=(0,I.default)(async()=>(await at.getBackstageIdentity()).ownershipEntityRefs,[]),{user:et,owners:it,...ut}=X,{["metadata.name"]:Z,...F}=(0,K.wq)((0,$.compact)(Object.values(ut))),[{value:ht,loading:xt},vt]=(0,V.default)(async gt=>{const bt=G(gt.owners,gt.ownershipEntityRefs);if(bt===void 0)return 0;const{totalItems:It}=await At.queryEntities({filter:{...gt.filter,"relations.ownedBy":bt},limit:0});return It},[],{loading:!0});return(0,J.Z)(()=>{Object.keys(F).length!==0&&L!==void 0&&vt({ownershipEntityRefs:L,owners:it,filter:F})},[L,it,F]),{count:ht,loading:Q||xt,filter:(0,E.useMemo)(()=>U.t$.owned(L!=null?L:[]),[L]),ownershipEntityRefs:L}}function G(at,At){if(At===void 0)return;var X;const L=(X=at==null?void 0:at.values)!==null&&X!==void 0?X:[];if(L.length){const Q=(0,$.intersection)(L,At);return Q.length===0?void 0:Q}return At}function z(){const at=(0,i.h_)(p.A),{filters:At}=(0,B.wp)(),X=(0,E.useRef)(),L=(0,E.useMemo)(()=>{const{user:it,...ut}=At,Z=(0,$.compact)(Object.values(ut)),F=(0,K.wq)(Z),ht={filter:F,limit:0};return Object.keys(F).length===0?(X.current=void 0,X.current):(0,$.isEqual)(ht,X.current)?X.current:(X.current=ht,ht)},[At]),{value:Q,loading:et}=(0,I.default)(async()=>{if(L===void 0)return 0;const{totalItems:it}=await at.queryEntities(L);return it},[L]);return{count:Q,loading:et}}var Y=t(74314),ot=t(42870);function ct(){const at=(0,i.h_)(p.A),{filters:At}=(0,B.wp)(),{starredEntities:X}=(0,ot.C)(),L=(0,E.useRef)(),Q=(0,E.useMemo)(()=>{const{user:Z,...F}=At,ht=(0,$.compact)(Object.values(F)),yt={filter:{...(0,K.wq)(ht),["metadata.name"]:Array.from(X).map(gt=>(0,Y.of)(gt).name)},limit:1e3};return(0,$.isEqual)(yt,L.current)?L.current:(L.current=yt,yt)},[At,X]),{value:et,loading:it}=(0,I.default)(async()=>X.size?(await at.queryEntities(Q)).items.map(F=>(0,Y.eE)({kind:F.kind,namespace:F.metadata.namespace,name:F.metadata.name})).filter(F=>X.has(F)).length:0,[Q,X]),ut=(0,E.useMemo)(()=>U.t$.starred(Array.from(X)),[X]);return{count:et,loading:it,filter:ut}}const dt=(0,b.Z)(at=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:at.spacing(1,0,1,0)},title:{margin:at.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:at.palette.text.primary},menuItem:{minHeight:at.spacing(6)},groupWrapper:{margin:at.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function ft(at){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:x.Z},{id:"starred",label:"Starred",icon:C.Z}]},{name:at!=null?at:"Company",items:[{id:"all",label:"All"}]}]}const Ot=at=>{const{initialFilter:At,availableFilters:X}=at,L=dt(),Q=(0,i.h_)(d.D);var et;const it=(et=Q.getOptionalString("organization.name"))!==null&&et!==void 0?et:"Company",{filters:ut,updateFilters:Z,queryParameters:{kind:F,user:ht}}=(0,B.wp)(),xt=["starred","all"],vt=ft(it).map(qt=>({...qt,items:qt.items.filter(({id:Qt})=>["group","user"].some(fe=>fe===F)?xt.includes(Qt):!X||X.includes(Qt))})).filter(({items:qt})=>!!qt.length),{count:yt,loading:gt,filter:bt}=H(),{count:It}=z(),{count:jt,filter:ge,loading:Se}=ct(),Ee=(0,E.useMemo)(()=>[ht].flat()[0],[ht]),[$t,Lt]=(0,E.useState)(Ee!=null?Ee:At),Kt=(0,E.useMemo)(()=>({all:It,starred:jt,owned:yt}),[jt,yt,It]);(0,E.useEffect)(()=>{Ee&&Lt(Ee)},[Ee]);const Yt=gt||Se;return(0,E.useEffect)(()=>{!Yt&&$t&&$t!=="all"&&Kt[$t]===0&&Lt("all")},[Yt,Kt,$t,Lt]),(0,E.useEffect)(()=>{if(!$t||Yt)return;Z({user:(()=>$t==="owned"?bt:$t==="starred"?ge:U.t$.all())()})},[$t,ge,bt,Z,Yt]),(0,o.jsx)(m.Z,{className:L.root,children:vt.map(qt=>(0,o.jsxs)(E.Fragment,{children:[(0,o.jsx)(f.Z,{variant:"subtitle2",component:"span",className:L.title,children:qt.name}),(0,o.jsx)(m.Z,{className:L.groupWrapper,children:(0,o.jsx)(l.Z,{disablePadding:!0,dense:!0,role:"menu","aria-label":qt.name,children:qt.items.map(Qt=>{var fe,je;return(0,o.jsxs)(g.Z,{role:"none presentation",divider:!0,onClick:()=>Lt(Qt.id),selected:Qt.id===((fe=ut.user)===null||fe===void 0?void 0:fe.value),className:L.menuItem,disabled:Kt[Qt.id]===0,"data-testid":`user-picker-${Qt.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[Qt.icon&&(0,o.jsx)(S.Z,{className:L.listIcon,children:(0,o.jsx)(Qt.icon,{fontSize:"small"})}),(0,o.jsx)(A.Z,{children:(0,o.jsxs)(f.Z,{variant:"body1",children:[Qt.label," "]})}),(0,o.jsx)(R.Z,{children:(je=Kt[Qt.id])!==null&&je!==void 0?je:"-"})]},Qt.id)})})})]},qt.name))})}},4967:function(_,P,t){"use strict";t.d(P,{A5:function(){return U},Bf:function(){return f},Cu:function(){return l},IZ:function(){return C},Qe:function(){return R},SZ:function(){return g},mM:function(){return E},rf:function(){return S},t$:function(){return x},zH:function(){return A},zo:function(){return m}});var o=t(87612),i=t(8709),d=t(74314),b=t(75435);class m{getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}constructor(w){(0,o._)(this,"value",void 0),this.value=w}}class f{getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}constructor(w){(0,o._)(this,"value",void 0),this.value=w}}class l{filterEntity(w){return this.values.every($=>{var I;return((I=w.metadata.tags)!==null&&I!==void 0?I:[]).includes($)})}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}constructor(w){(0,o._)(this,"values",void 0),this.values=w}}class g{filterEntity(w){const $=this.toUpperArray(this.value.split(/\s/)),I=this.toUpperArray([w.metadata.tags]),p=this.toUpperArray([w.metadata.name,w.metadata.title]);for(const K of $)if(I.every(V=>V!==K)&&p.every(V=>!V.includes(K)))return!1;return!0}toUpperArray(w){return w.flat().filter($=>Boolean($)).map($=>$.toLocaleUpperCase("en-US"))}constructor(w){(0,o._)(this,"value",void 0),this.value=w}}class S{getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(w){return this.values.some($=>(0,b.h)(w,i.S4).some(I=>(0,d.eE)(I)===$))}toQueryValue(){return this.values}constructor(w){(0,o._)(this,"values",void 0),this.values=w.reduce(($,I)=>{try{return $.push((0,d.eE)((0,d.of)(I,{defaultKind:"Group"}))),$}catch{return $}},[])}}class A{getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(w){return this.values.some($=>{var I;return((I=w.spec)===null||I===void 0?void 0:I.lifecycle)===$})}toQueryValue(){return this.values}constructor(w){(0,o._)(this,"values",void 0),this.values=w}}class R{getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(w){return this.values.some($=>w.metadata.namespace===$)}toQueryValue(){return this.values}constructor(w){(0,o._)(this,"values",void 0),this.values=w}}class x{static owned(w){return new x("owned",w)}static all(){return new x("all")}static starred(w){return new x("starred",w)}getCatalogFilters(){if(this.value==="owned"){var w;return{"relations.ownedBy":(w=this.refs)!==null&&w!==void 0?w:[]}}if(this.value==="starred"){var $,I;return{"metadata.name":(I=($=this.refs)===null||$===void 0?void 0:$.map(p=>(0,d.of)(p).name))!==null&&I!==void 0?I:[]}}return{}}filterEntity(w){if(this.value==="starred"){var $,I;return(I=($=this.refs)===null||$===void 0?void 0:$.includes((0,d.eE)(w)))!==null&&I!==void 0?I:!0}if(this.value==="owned"){var p;const V=(0,b.h)(w,i.S4);var K;return(K=(p=this.refs)===null||p===void 0?void 0:p.some(J=>V.some(H=>(0,d.eE)(H)===J)))!==null&&K!==void 0?K:!1}return!0}toQueryValue(){return this.value}constructor(w,$){(0,o._)(this,"value",void 0),(0,o._)(this,"refs",void 0),this.value=w,this.refs=$}}class C{filterEntity(w){switch(this.value){case"owned":return this.isOwnedEntity(w);case"starred":return this.isStarredEntity(w);default:return!0}}toQueryValue(){return this.value}constructor(w,$,I){(0,o._)(this,"value",void 0),(0,o._)(this,"isOwnedEntity",void 0),(0,o._)(this,"isStarredEntity",void 0),this.value=w,this.isOwnedEntity=$,this.isStarredEntity=I}}class E{getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(w){var $;const I=($=w.metadata.annotations)===null||$===void 0?void 0:$["backstage.io/orphan"];return I!==void 0&&this.value.toString()===I}constructor(w){(0,o._)(this,"value",void 0),this.value=w}}class U{filterEntity(w){var $,I;const p=(w==null||(I=w.status)===null||I===void 0||($=I.items)===null||$===void 0?void 0:$.length)>0;return p!==void 0&&this.value===p}constructor(w){(0,o._)(this,"value",void 0),this.value=w}}},25942:function(_,P,t){"use strict";t.d(P,{UO:function(){return U},wp:function(){return B}});var o=t(52322),i=t(76635),d=t.n(i),b=t(19126),m=t.n(b),f=t(2784),l=t(73557),g=t(69294),S=t(48760),A=t(90736),R=t(88624),x=t(64039),C=t(44394);const E=(0,f.createContext)(void 0),U=w=>{const $=(0,A.default)(),I=(0,C.h_)(R.A),[p,K]=(0,f.useState)({}),V=(0,l.TH)(),J=(0,f.useMemo)(()=>{var ft;return(ft=m().parse(V.search,{ignoreQueryPrefix:!0}).filters)!==null&&ft!==void 0?ft:{}},[V]),[H,G]=(0,f.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:z,error:Y},ot]=(0,g.default)(async()=>{const ft=(0,i.compact)(Object.values(p)),Ot=(0,x.Gz)(ft),at=(0,x.Oq)(ft),At=(0,x.Oq)((0,i.compact)(Object.values(H.appliedFilters))),X=Object.keys(p).reduce((Q,et)=>{const it=p[et];return it!=null&&it.toQueryValue&&(Q[et]=it.toQueryValue()),Q},{});if((0,i.isEqual)(At,at))G({appliedFilters:p,backendEntities:H.backendEntities,entities:H.backendEntities.filter(Ot)});else{const Q=await I.getEntities({filter:at});G({appliedFilters:p,backendEntities:Q.items,entities:Q.items.filter(Ot)})}if($()){var L;const Q=m().parse(V.search,{ignoreQueryPrefix:!0}),et=m().stringify({...Q,filters:X},{addQueryPrefix:!0,arrayFormat:"repeat"}),it=`${window.location.pathname}${et}`;(L=window.history)===null||L===void 0||L.replaceState(null,document.title,it)}},[I,J,p,H],{loading:!0});(0,S.Z)(ot,10,[p]);const ct=(0,f.useCallback)(ft=>{K(Ot=>{const at=typeof ft=="function"?ft(Ot):ft;return{...Ot,...at}})},[]),dt=(0,f.useMemo)(()=>({filters:H.appliedFilters,entities:H.entities,backendEntities:H.backendEntities,updateFilters:ct,queryParameters:J,loading:z,error:Y}),[H,ct,J,z,Y]);return(0,o.jsx)(E.Provider,{value:dt,children:w.children})};function B(){const w=(0,f.useContext)(E);if(!w)throw new Error("useEntityList must be used within EntityListProvider");return w}},42870:function(_,P,t){"use strict";t.d(P,{C:function(){return l}});var o=t(74314),i=t(44394),d=t(2784),b=t(72164),m=t(36802);function f(g){return typeof g=="string"?g:(0,o.eE)(g)}function l(){const g=(0,i.h_)(m.p),S=(0,b.Z)((0,d.useMemo)(()=>g.starredEntitie$(),[g]),new Set),A=(0,d.useCallback)(x=>S.has(f(x)),[S]),R=(0,d.useCallback)(x=>g.toggleStarred(f(x)).then(),[g]);return{starredEntities:S,toggleStarredEntity:R,isStarredEntity:A}}},36434:function(_,P,t){"use strict";t.d(P,{w:function(){return d}});var o=t(30283),i=t(96087);const d=(0,i.u)("catalog:entity-route-ref",()=>(0,o.N)({id:"catalog:entity",params:["namespace","kind","name"]}));function b(m){var f,l;return{kind:m.kind.toLocaleLowerCase("en-US"),namespace:(l=(f=m.metadata.namespace)===null||f===void 0?void 0:f.toLocaleLowerCase("en-US"))!==null&&l!==void 0?l:DEFAULT_NAMESPACE,name:m.metadata.name}}},64039:function(_,P,t){"use strict";t.d(P,{Gz:function(){return b},Oq:function(){return d},wq:function(){return i}});var o=t(4967);function i(m){return m.reduce((f,l)=>({...f,...l.getCatalogFilters?l.getCatalogFilters():{}}),{})}function d(m){const f={};return m.forEach(l=>{var g;l instanceof o.Cu||l instanceof o.rf||l instanceof o.zH||l instanceof o.Qe||l instanceof o.t$||l instanceof o.mM||l instanceof o.SZ||l instanceof o.IZ||Object.assign(f,((g=l.getCatalogFilters)===null||g===void 0?void 0:g.call(l))||{})}),f}function b(m){return f=>m.every(l=>!l.filterEntity||l.filterEntity(f))}},75435:function(_,P,t){"use strict";t.d(P,{h:function(){return i}});var o=t(74314);function i(d,b,m){var f;let l=(d==null||(f=d.relations)===null||f===void 0?void 0:f.filter(g=>g.type===b).map(g=>(0,o.of)(g.targetRef)))||[];return m!=null&&m.kind&&(l=l.filter(g=>g.kind.toLocaleLowerCase("en-US")===m.kind.toLocaleLowerCase("en-US"))),l}},65524:function(_,P,t){"use strict";t.d(P,{yw:function(){return g},ql:function(){return A},_Z:function(){return x},kR:function(){return R},jU:function(){return S}});var o=t(87612),i=t(92918);let d=i.K,b=d;class m{toString(){return`routeRef{type=external,id=${this.id}}`}constructor(E,U,B){(0,o._)(this,"id",void 0),(0,o._)(this,"params",void 0),(0,o._)(this,"optional",void 0),(0,o._)(this,b,void 0),this.id=E,this.params=U,this.optional=B,this[d]="external"}}function f(C){var E;return new m(C.id,(E=C.params)!==null&&E!==void 0?E:[],Boolean(C.optional))}var l=t(30283);const g=f({id:"create-component",optional:!0}),S=f({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),A=f({id:"create-from-template",optional:!0,params:["namespace","templateName"]}),R=f({id:"catalog:unregister-redirect",optional:!0}),x=(0,l.N)({id:"catalog"})},76079:function(_,P,t){"use strict";t.d(P,{F:function(){return m}});var o=t(52322),i=t(2784),d=t(79692);const b=(0,d.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),m=f=>{const{text:l,preTag:g,postTag:S}=f,A=b(),R=(0,i.useMemo)(()=>l.split(new RegExp(`(${g}.+?${S})`)),[S,g,l]);return(0,o.jsx)(o.Fragment,{children:R.map((x,C)=>x.includes(g)?(0,o.jsx)("mark",{className:A.highlight,children:x.replace(new RegExp(`${g}|${S}`,"g"),"")},C):x)})}},53945:function(_,P,t){"use strict";t.d(P,{E5:function(){return S}});var o=t(52322),i=t(2784),d=t(62369),b=t(82963),m=t(38402);const f="search.results.list.items.extensions.v1",l=(x,C)=>{for(const E of x){if(!isValidElement(E))continue;const U=getComponentData(E,f);if(U!=null&&U(C))return cloneElement(E,{rank:C.rank,highlight:C.highlight,result:C.document,...E.props})}return null},g=x=>{const{rank:C,result:E,noTrack:U,children:B,alignItems:w="flex-start",...$}=x,I=(0,d.z)(),p=(0,i.useCallback)(()=>{U||E&&I.captureEvent("discover",E.title,{attributes:{to:E.location},value:C})},[C,E,U,I]);return(0,o.jsx)(m.Z,{divider:!0,alignItems:w,onClickCapture:p,...$,children:B})},S=x=>{const{name:C,component:E,predicate:U=()=>!0}=x;return(0,b.YO)({name:C,component:{lazy:()=>E().then(B=>w=>(0,o.jsx)(g,{rank:w.rank,result:w.result,noTrack:w.noTrack,children:(0,i.createElement)(B,w)}))},data:{[f]:U}})},A=x=>{const C=useElementFilter(x,E=>E.selectByComponentData({key:f}).getElements(),[x]);return useCallback((E,U)=>{const B=l(C,E);return _jsx(Fragment,{children:B!=null?B:_jsx(g,{rank:E.rank,result:E.document,children:_jsx(DefaultResultListItem,{rank:E.rank,highlight:E.highlight,result:E.document})})},U)},[C])},R=x=>{const{results:C,children:E,...U}=x,B=A(E);return _jsx(List,{...U,children:C.map(B)})}},2296:function(_,P,t){"use strict";t.d(P,{$L:function(){return U},DR:function(){return S},KY:function(){return R},Zz:function(){return g},jM:function(){return l}});var o=t(52322),i=t(2784),d=t(73557),b=t(62584),m=t(82963),f=t(2532);const l="techdocs.addons.addon.v1",g="techdocs.addons.wrapper.v1",S=()=>null;(0,b.R)(S,g,!0);const A=B=>`${l}.${B.toLocaleLowerCase("en-US")}`;function R(B){const{name:w,component:$}=B;return(0,m.YO)({name:w,component:{sync:I=>(0,o.jsx)($,{...I})},data:{[l]:B,[A(w)]:!0}})}const x=(B,w)=>B.selectByComponentData({key:w}).getElements()[0],C=B=>B.selectByComponentData({key:g}).selectByComponentData({key:l}),E=B=>B.selectByComponentData({key:g}).findComponentData({key:l}),U=()=>{const B=(0,d.pC)(),w=(0,f.v)(B,C),$=(0,f.v)(B,E),I=(0,i.useCallback)(V=>{if(!w||!V)return null;const J=A(V.name);var H;return(H=x(w,J))!==null&&H!==void 0?H:null},[w]),p=(0,i.useCallback)(V=>{const J=$.find(H=>H.name===V);return J?I(J):null},[$,I]),K=(0,i.useCallback)(V=>{const J=$.filter(H=>H.location===V);return J.length?J.map(I):null},[$,I]);return{renderComponentByName:p,renderComponentsByLocation:K}}},58496:function(_,P,t){"use strict";t.d(P,{D:function(){return d},g:function(){return i}});var o=t(95965);const i=(0,o.T)({id:"plugin.techdocs.service"}),d=(0,o.T)({id:"plugin.techdocs.storageservice"})},68979:function(_,P,t){"use strict";t.d(P,{Z:function(){return B},x:function(){return w}});var o=t(52322),i=t(2784),d=t(64279),b=t(77446),m=t(74314),f=t(29651),l=t(68993),g=t(44394),S=t(6542),A=t(72388),R=t(58496);function x($,I){return I.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||($.kind=$.kind.toLocaleLowerCase(),$.name=$.name.toLocaleLowerCase(),$.namespace=$.namespace.toLocaleLowerCase()),$}const C=($,I)=>(0,m.eE)($)===(0,m.eE)(I),E={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},U=(0,f.CT)("techdocs-reader-page-context"),B=(0,i.memo)($=>{const{entityRef:I,children:p}=$,K=(0,g.h_)(R.g),V=(0,g.h_)(S.D),J=(0,d.default)(async()=>K.getEntityMetadata(I),[I]),H=(0,b.Z)(async()=>K.getTechDocsMetadata(I),[I]),[G,z]=(0,i.useState)(E.title),[Y,ot]=(0,i.useState)(E.subtitle),[ct,dt]=(0,i.useState)(E.shadowRoot);(0,i.useEffect)(()=>{ct&&!H.value&&!H.loading&&H.retry()},[H.value,H.loading,ct,H.retry,H]);const ft={metadata:H,entityRef:x(I,V),entityMetadata:J,shadowRoot:ct,setShadowRoot:dt,title:G,setTitle:z,subtitle:Y,setSubtitle:ot},Ot=(0,l.E)({1:ft});return(0,o.jsx)(A.fC,{attributes:{entityRef:(0,m.eE)(I)},children:(0,o.jsx)(U.Provider,{value:Ot,children:p instanceof Function?p(ft):p})})},($,I)=>C($.entityRef,I.entityRef)),w=()=>{const $=(0,i.useContext)(U);if($===void 0)return E;const I=$.atVersion(1);if(I===void 0)throw new Error("No context found for version 1.");return I}},57058:function(_,P,t){"use strict";t.d(P,{o:function(){return o}});const o=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},51953:function(_,P,t){"use strict";t.d(P,{D:function(){return o}});function o(i,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?i:i.toLocaleLowerCase("en-US")}},29895:function(_,P,t){"use strict";t.d(P,{u:function(){return H}});var o=t(52322),i=t(2784),d=t(42398),b=t(30706),m=t(13788),f=t(25942),l=t(30389),g=t(32494),S=t(63833),A=t(97894),R=t(42081),x=t(88797);class C{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":x.n}}}const E=()=>{const{updateFilters:G}=(0,f.wp)();return(0,i.useEffect)(()=>{G({techdocs:new C})},[G]),null};var U=t(95074),B=t(76635),w=t(538),$=t(9791),I=t(42870),p=t(16787),K=t(45342),V=t(49079);const J=G=>{var z;const{columns:Y,actions:ot,options:ct}=G,{loading:dt,error:ft,entities:Ot,filters:at}=(0,f.wp)(),{isStarredEntity:At,toggleStarredEntity:X}=(0,I.C)(),[,L]=(0,U.Z)();var Q;const et=(0,B.capitalize)((Q=(z=at.user)===null||z===void 0?void 0:z.value)!==null&&Q!==void 0?Q:"all"),it=[K.n.createCopyDocsUrlAction(L),K.n.createStarEntityAction(At,X)];return ft?(0,o.jsx)(w.G,{severity:"error",title:"Could not load available documentation.",children:(0,o.jsx)($.O,{language:"text",text:ft.toString()})}):(0,o.jsx)(p.H,{title:et,entities:Ot,loading:dt,actions:ot||it,columns:Y,options:ct})};J.columns=V.N,J.actions=K.n;const H=G=>{const{initialFilter:z="owned",columns:Y,actions:ot}=G;return(0,o.jsx)(R.j,{children:(0,o.jsxs)(d.V,{children:[(0,o.jsx)(b.y,{title:"",children:(0,o.jsx)(m.q,{children:"Discover documentation in your ecosystem."})}),(0,o.jsx)(f.UO,{children:(0,o.jsxs)(l._i,{children:[(0,o.jsxs)(l._i.Filters,{children:[(0,o.jsx)(E,{}),(0,o.jsx)(g.E,{initialFilter:z}),(0,o.jsx)(S.d,{}),(0,o.jsx)(A.x,{})]}),(0,o.jsx)(l._i.Content,{children:(0,o.jsx)(J,{actions:ot,columns:Y})})]})})]})})}},16787:function(_,P,t){"use strict";t.d(P,{H:function(){return w}});var o=t(52322),i=t(2784),d=t(95074),b=t(37321),m=t(44394),f=t(6542),l=t(8709),g=t(75435),S=t(86540),A=t(95573),R=t(84462),x=t(70249),C=t(15929),E=t(45342),U=t(49079),B=t(51953);const w=$=>{const{entities:I,title:p,loading:K,columns:V,actions:J,options:H}=$,[,G]=(0,d.Z)(),z=(0,b.t)(A.Fw),Y=(0,m.h_)(f.D);if(!I)return null;const ot=I.map(at=>{const At=(0,g.h)(at,l.S4);var X;return{entity:at,resolved:{docsUrl:z({namespace:(0,B.D)((X=at.metadata.namespace)!==null&&X!==void 0?X:"default",Y),kind:(0,B.D)(at.kind,Y),name:(0,B.D)(at.metadata.name,Y)}),ownedByRelations:At,ownedByRelationsTitle:At.map(L=>(0,S.$)(L,{defaultKind:"group"})).join(", ")}}}),ct=[U.N.createNameColumn(),U.N.createOwnerColumn(),U.N.createKindColumn(),U.N.createTypeColumn()],dt=[E.n.createCopyDocsUrlAction(G)],ft=20,Ot=ot&&ot.length>ft;return(0,o.jsx)(o.Fragment,{children:K||ot&&ot.length>0?(0,o.jsx)(R.i,{isLoading:K,options:{paging:Ot,pageSize:ft,search:!0,actionsColumnIndex:-1,...H},data:ot,columns:V||ct,actions:J||dt,title:p?`${p} (${ot.length})`:`All (${ot.length})`}):(0,o.jsx)(x.u,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,o.jsx)(C.Q,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};w.columns=U.N,w.actions=E.n},45342:function(_,P,t){"use strict";t.d(P,{n:function(){return g}});var o=t(52322),i=t(2784),d=t(39981),b=t(2337),m=t(11640),f=t(28347);const l=(0,b.Z)({root:{color:"#f3ba37"}})(m.Z),g={createCopyDocsUrlAction(S){return A=>({icon:()=>(0,o.jsx)(d.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>S(`${window.location.origin}${A.resolved.docsUrl}`)})},createStarEntityAction(S,A){return R=>{const x=R.entity,C=S(x);return{cellStyle:{paddingLeft:"1em"},icon:()=>C?(0,o.jsx)(l,{}):(0,o.jsx)(f.Z,{}),tooltip:C?"Remove from favorites":"Add to favorites",onClick:()=>A(x)}}}}},49079:function(_,P,t){"use strict";t.d(P,{N:function(){return A}});var o=t(52322),i=t(2784),d=t(62774),b=t(79692);const m=(0,b.Z)(R=>({value:{marginBottom:R.spacing(.75)},subvalue:{color:R.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function f(R){const{value:x,subvalue:C}=R,E=m();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Z,{className:E.value,children:x}),(0,o.jsx)(d.Z,{className:E.subvalue,children:C})]})}var l=t(98864),g=t(51194);function S(R){return R.metadata.title||R.metadata.name}const A={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:R=>(0,o.jsx)(f,{value:(0,o.jsx)(l.rU,{to:R.resolved.docsUrl,children:S(R.entity)}),subvalue:R.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:R})=>(0,o.jsx)(g.r,{entityRefs:R.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},42081:function(_,P,t){"use strict";t.d(P,{j:function(){return f}});var o=t(52322),i=t(2784),d=t(32166),b=t(44394),m=t(6542);const f=l=>{const{children:g}=l,S=(0,b.h_)(m.D);var A;const R=`Documentation available in ${(A=S.getOptionalString("organization.name"))!==null&&A!==void 0?A:"Backstage"}`;return(0,o.jsx)(d.g,{title:"Documentation",subtitle:R,themeId:"documentation",children:g})}},4577:function(_,P,t){"use strict";t.d(P,{Jl:function(){return Ot},I6:function(){return at},s4:function(){return ot}});var o=t(58496),i=t(87612),d=t(41385),b=t(48998),m=t(30474);class f extends Error{constructor(L,Q){var et,it;let ut=L;if(Q!==void 0){const Z=(0,b.n)(Q);ut?ut+=`; caused by ${Z}`:ut=`caused by ${Z}`}super(ut),(0,i._)(this,"cause",void 0),(et=(it=Error).captureStackTrace)===null||et===void 0||et.call(it,this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,m.V)(Q)?Q:void 0}}class l extends null{constructor(...L){super(...L),_define_property(this,"name","InputError")}}class g extends null{constructor(...L){super(...L),_define_property(this,"name","AuthenticationError")}}class S extends null{constructor(...L){super(...L),_define_property(this,"name","NotAllowedError")}}class A extends f{constructor(...L){super(...L),(0,i._)(this,"name","NotFoundError")}}class R extends null{constructor(...L){super(...L),_define_property(this,"name","ConflictError")}}class x extends null{constructor(...L){super(...L),_define_property(this,"name","NotModifiedError")}}class C extends null{constructor(...L){super(...L),_define_property(this,"name","NotImplementedError")}}class E extends null{}class U extends null{constructor(L,Q){super(L,Q),this.name=isError(Q)?Q.name:"Error"}}var B=t(54847);class w{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(L){const{kind:Q,namespace:et,name:it}=L,Z=`${await this.getApiOrigin()}/metadata/techdocs/${et}/${Q}/${it}`,F=await this.fetchApi.fetch(`${Z}`);if(!F.ok)throw await d.V.fromResponse(F);return await F.json()}async getEntityMetadata(L){const{kind:Q,namespace:et,name:it}=L,Z=`${await this.getApiOrigin()}/metadata/entity/${et}/${Q}/${it}`,F=await this.fetchApi.fetch(`${Z}`);if(!F.ok)throw await d.V.fromResponse(F);return await F.json()}constructor(L){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=L.configApi,this.discoveryApi=L.discoveryApi,this.fetchApi=L.fetchApi}}class ${async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var L;return(L=this.configApi.getOptionalString("techdocs.storageUrl"))!==null&&L!==void 0?L:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(L,Q){const{kind:et,namespace:it,name:ut}=L,F=`${await this.getStorageUrl()}/${it}/${et}/${ut}/${Q}`,ht=await this.fetchApi.fetch(`${F.endsWith("/")?F:`${F}/`}index.html`);let xt="";switch(ht.status){case 404:throw xt="Page not found. ",Q||(xt+="This could be because there is no index.md file in the root of the docs directory of this repository."),new A(xt);case 500:throw xt="Could not generate documentation or an error in the TechDocs backend. ",new Error(xt);default:break}return ht.text()}async syncEntityDocs(L,Q=()=>{}){const{kind:et,namespace:it,name:ut}=L,F=`${await this.getApiOrigin()}/sync/${it}/${et}/${ut}`,{token:ht}=await this.identityApi.getCredentials();return new Promise((xt,vt)=>{const yt=new B.EventSourcePolyfill(F,{withCredentials:!0,headers:ht?{Authorization:`Bearer ${ht}`}:{}});yt.addEventListener("log",gt=>{gt.data&&Q(JSON.parse(gt.data))}),yt.addEventListener("finish",gt=>{let bt=!1;gt.data&&({updated:bt}=JSON.parse(gt.data)),xt(bt?"updated":"cached")}),yt.onerror=gt=>{switch(yt.close(),gt.status){case 404:vt(new A(gt.message));return;default:vt(new Error(gt.data));return}}})}async getBaseUrl(L,Q,et){const{kind:it,namespace:ut,name:Z}=Q,ht=`${await this.getApiOrigin()}/static/docs/${ut}/${it}/${Z}/${et}`;return new URL(L,ht.endsWith("/")?ht:`${ht}/`).toString()}constructor(L){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"identityApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=L.configApi,this.discoveryApi=L.discoveryApi,this.identityApi=L.identityApi,this.fetchApi=L.fetchApi}}var I=t(95573),p=t(15006),K=t(42380),V=t(6542),J=t(96727),H=t(77186),G=t(85094),z=t(82963),Y=t(53945);const ot=(0,p.r)({id:"techdocs",apis:[(0,K.n)({api:o.D,deps:{configApi:V.D,discoveryApi:J.N,identityApi:H.$,fetchApi:G.g},factory:({configApi:X,discoveryApi:L,identityApi:Q,fetchApi:et})=>new $({configApi:X,discoveryApi:L,identityApi:Q,fetchApi:et})}),(0,K.n)({api:o.g,deps:{configApi:V.D,discoveryApi:J.N,fetchApi:G.g},factory:({configApi:X,discoveryApi:L,fetchApi:Q})=>new w({configApi:X,discoveryApi:L,fetchApi:Q})})],routes:{root:I._Z,docRoot:I.Fw,entityContent:I.pd}}),ct=ot.provide((0,z.P4)({name:"TechdocsPage",component:()=>t.e(8096).then(t.bind(t,8096)).then(X=>X.Router),mountPoint:I._Z})),dt=ot.provide((0,z.P4)({name:"EntityTechdocsContent",component:()=>t.e(8096).then(t.bind(t,8096)).then(X=>X.EmbeddedDocsRouter),mountPoint:I.pd})),ft=ot.provide((0,z.P4)({name:"TechDocsCustomHome",component:()=>t.e(4109).then(t.bind(t,44109)).then(X=>X.TechDocsCustomHome),mountPoint:I._Z})),Ot=ot.provide((0,z.P4)({name:"TechDocsIndexPage",component:()=>t.e(8662).then(t.bind(t,18662)).then(X=>X.TechDocsIndexPage),mountPoint:I._Z})),at=ot.provide((0,z.P4)({name:"TechDocsReaderPage",component:()=>t.e(5914).then(t.bind(t,35914)).then(X=>X.TechDocsReaderPage),mountPoint:I.Fw})),At=ot.provide((0,Y.E5)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,55511)).then(X=>X.TechDocsSearchResultListItem),predicate:X=>X.type==="techdocs"}))},14540:function(_,P,t){"use strict";t.d(P,{F:function(){return No}});var o=t(52322),i=t(2784),d=t(79692),b=t(60905),m=t(68979),f=t(70882),l=t(50236),g=t(19219),S=t(55015);const A="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",R=h=>{(0,i.useEffect)(()=>{if(!h)return()=>{};const O=h.querySelectorAll('head > link[rel="stylesheet"]');var j;let k=(j=O==null?void 0:O.length)!==null&&j!==void 0?j:0;const q=new CustomEvent(A);if(!k)return h.dispatchEvent(q),()=>{};const nt=()=>{--k===0&&h.dispatchEvent(q)};return O==null||O.forEach(lt=>{lt.addEventListener("load",nt)}),()=>{O==null||O.forEach(lt=>{lt.removeEventListener("load",nt)})}},[h])},x=h=>{const[O,j]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(!h)return()=>{};j(!0);const k=h.style;k.setProperty("opacity","0");const q=()=>{j(!1),k.setProperty("opacity","1")};return h.addEventListener(A,q),()=>{h.removeEventListener(A,q)}},[h]),O},C=h=>{const{element:O,onAppend:j,children:k}=h,[q,nt]=(0,i.useState)((0,f.Ue)({...(0,l.Z)(),insertionPoint:void 0}));R(O);const lt=x(O),Ct=(0,i.useCallback)(Tt=>{if(!O||!Tt)return;nt((0,f.Ue)({...(0,l.Z)(),insertionPoint:O.querySelector("head")||void 0}));let Ut=Tt.shadowRoot;Ut||(Ut=Tt.attachShadow({mode:"open"})),Ut.replaceChildren(O),typeof j=="function"&&j(Ut)},[O,j]);return(0,o.jsxs)(o.Fragment,{children:[lt&&(0,o.jsx)(S.E,{}),(0,o.jsxs)(g.ZP,{jss:q,sheetsManager:new Map,children:[(0,o.jsx)("div",{ref:Ct,"data-testid":"techdocs-native-shadowroot"}),k]})]})};var E=t(54073);const U=()=>{const{shadowRoot:h}=(0,m.x)();return h},B=h=>{const O=U();return O?h.map(j=>O==null?void 0:O.querySelectorAll(j)).filter(j=>j.length).map(j=>Array.from(j)).flat():[]},w=h=>h.toString()&&h.rangeCount&&h.getRangeAt(0).getBoundingClientRect().top,$=(h=0)=>{const O=U(),[j,k]=useState(null),q=useMemo(()=>debounce(()=>{const nt=O,lt=nt.getSelection?nt.getSelection():document.getSelection();lt&&w(lt)?k(lt):k(null)},h),[O,k,h]);return useEffect(()=>(window.document.addEventListener("selectionchange",q),()=>{q.cancel(),window.document.removeEventListener("selectionchange",q)}),[q]),j};var I=t(87435),p=t(42398),K=t(76635),V=t(64279),J=t(1849),H=t(29651),G=t(68993),z=t(44394),Y=t(62369),ot=t(72388),ct=t(6542),dt=t(95965);const ft=(0,dt.T)({id:"plugin.search.queryservice"});class Ot{query(){return Promise.resolve(this.mockedResults||{results:[]})}constructor(O){_define_property(this,"mockedResults",void 0),this.mockedResults=O}}const at=(0,H.CT)("search-context"),At=()=>{const h=(0,i.useContext)(at);if(!h)throw new Error("useSearch must be used within a SearchContextProvider");const O=h.atVersion(1);if(!O)throw new Error("No SearchContext v1 found");return O},X=()=>(0,i.useContext)(at)!==void 0,L={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},Q=(h=L)=>{var O,j,k,q;const nt=(0,z.h_)(ft),lt=(0,Y.z)(),[Ct,Tt]=(0,i.useState)(h.term),[Ut,Gt]=(0,i.useState)(h.types),[Ft,wt]=(0,i.useState)(h.filters),[ie,me]=(0,i.useState)(h.pageLimit),[Vt,Mt]=(0,i.useState)(h.pageCursor),ee=(0,J.Z)(Ct),ye=(0,J.Z)(Ft),Dt=(0,V.default)(async()=>{const ae=await nt.query({term:Ct,types:Ut,filters:Ft,pageLimit:ie,pageCursor:Vt});return Ct&&ae.numberOfResults!==void 0&<.captureEvent("search",Ct,{value:ae.numberOfResults}),ae},[Ct,Ut,Ft,ie,Vt]),kt=!Dt.loading&&!Dt.error&&((O=Dt.value)===null||O===void 0?void 0:O.nextPageCursor),Jt=!Dt.loading&&!Dt.error&&((j=Dt.value)===null||j===void 0?void 0:j.previousPageCursor),Ce=(0,i.useCallback)(()=>{var ae;Mt((ae=Dt.value)===null||ae===void 0?void 0:ae.nextPageCursor)},[(k=Dt.value)===null||k===void 0?void 0:k.nextPageCursor]),Re=(0,i.useCallback)(()=>{var ae;Mt((ae=Dt.value)===null||ae===void 0?void 0:ae.previousPageCursor)},[(q=Dt.value)===null||q===void 0?void 0:q.previousPageCursor]);return(0,i.useEffect)(()=>{ee!==void 0&&Ct!==ee&&Mt(void 0)},[Ct,ee,Mt]),(0,i.useEffect)(()=>{ye!==void 0&&!(0,K.isEqual)(Ft,ye)&&Mt(void 0)},[Ft,ye,Mt]),{result:Dt,term:Ct,setTerm:Tt,types:Ut,setTypes:Gt,filters:Ft,setFilters:wt,pageLimit:ie,setPageLimit:me,pageCursor:Vt,setPageCursor:Mt,fetchNextPage:kt?Ce:void 0,fetchPreviousPage:Jt?Re:void 0}},et=h=>{const{initialState:O,children:j}=h,k=Q(O);return(0,o.jsx)(ot.fC,{attributes:{searchTypes:k.types.sort().join(",")},children:(0,o.jsx)(at.Provider,{value:(0,G.E)({1:k}),children:j})})},it=h=>{const{initialState:O,inheritParentContextIfAvailable:j,children:k}=h,q=X(),nt=(0,z.h_)(ct.D),lt=O!=null?O:{},Ct=nt.has("search.query.pageLimit")?{pageLimit:nt.getNumber("search.query.pageLimit")}:{},Tt={...L,...lt,...Ct};return q&&j?(0,o.jsx)(o.Fragment,{children:k}):(0,o.jsx)(et,{initialState:Tt,children:k})};var ut=t(4614),Z=t(88013),F=t(50581),ht=t(61837),xt=t(86619),vt=t(77277),yt=t(21853),gt=t(48760);function bt(h){return(0,i.forwardRef)((O,j)=>(0,o.jsx)(it,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(h,{...O,ref:j})}))}const It=bt((0,i.forwardRef)((h,O)=>{const{onChange:j,onKeyDown:k=()=>{},onClear:q=()=>{},onSubmit:nt=()=>{},debounceTime:lt=200,clearButton:Ct=!0,fullWidth:Tt=!0,value:Ut,label:Gt,placeholder:Ft,inputProps:wt={},InputProps:ie={},endAdornment:me,...Vt}=h,Mt=(0,z.h_)(ct.D),[ee,ye]=(0,i.useState)(""),Dt=(0,i.useRef)("");(0,i.useEffect)(()=>{ye(ue=>ue===Dt.current?String(Ut):ue)},[Ut,Dt]),(0,gt.Z)(()=>{Dt.current=ee,j(ee)},lt,[ee]);const kt=(0,i.useCallback)(ue=>{ye(ue.target.value)},[ye]),Jt=(0,i.useCallback)(ue=>{k&&k(ue),nt&&ue.key==="Enter"&&nt()},[k,nt]),Ce=(0,i.useCallback)(()=>{Dt.current="",j(""),ye(""),q&&q()},[j,q]),Re=Gt?void 0:"Search",Ue=Ft!=null?Ft:`Search in ${Mt.getOptionalString("app.title")||"Backstage"}`,ae=(0,o.jsx)(F.Z,{position:"start",children:(0,o.jsx)(ht.Z,{"aria-label":"Query",size:"small",disabled:!0,children:(0,o.jsx)(yt.Z,{})})}),We=(0,o.jsx)(F.Z,{position:"end",children:(0,o.jsx)(vt.Z,{"aria-label":"Clear",size:"small",onClick:Ce,onKeyDown:ue=>{ue.key==="Enter"&&ue.stopPropagation()},children:"Clear"})});return(0,o.jsx)(xt.Z,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:O,value:ee,label:Gt,placeholder:Ue,InputProps:{startAdornment:ae,endAdornment:Ct?We:me,...ie},inputProps:{"aria-label":Re,...wt},fullWidth:Tt,onChange:kt,onKeyDown:Jt,...Vt})})),jt=bt((0,i.forwardRef)((h,O)=>{const{value:j="",onChange:k,...q}=h,{term:nt,setTerm:lt}=At();(0,i.useEffect)(()=>{j&<(String(j))},[j,lt]);const Ct=(0,i.useCallback)(Tt=>{k?k(Tt):lt(Tt)},[k,lt]);return(0,o.jsx)(ot.fC,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,o.jsx)(It,{...q,ref:O,value:nt,onChange:Ct})})})),ge=(0,d.Z)(h=>({loading:{right:h.spacing(1),position:"absolute"}})),Se=h=>O=>(0,o.jsx)(it,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(h,{...O})}),Ee=()=>{const h=ge();return(0,o.jsx)(ut.Z,{className:h.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},$t=Se(function(O){const{loading:j,value:k,onChange:q=()=>{},options:nt=[],getOptionLabel:lt=Dt=>String(Dt),inputPlaceholder:Ct,inputDebounceTime:Tt,freeSolo:Ut=!0,fullWidth:Gt=!0,clearOnBlur:Ft=!1,"data-testid":wt="search-autocomplete",...ie}=O,{setTerm:me}=At(),Vt=(0,i.useCallback)(Dt=>Dt?typeof Dt=="string"?Dt:lt(Dt):"",[lt]),Mt=(0,i.useMemo)(()=>Vt(k),[k,Vt]),ee=(0,i.useCallback)((Dt,kt,Jt,Ce)=>{me(Vt(kt)),q(Dt,kt,Jt,Ce)},[Vt,me,q]),ye=(0,i.useCallback)(({InputProps:{ref:Dt,className:kt,endAdornment:Jt},InputLabelProps:Ce,...Re})=>(0,o.jsx)(jt,{...Re,ref:Dt,clearButton:!1,value:Mt,placeholder:Ct,debounceTime:Tt,endAdornment:j?(0,o.jsx)(Ee,{}):Jt,InputProps:{className:kt}}),[j,Mt,Ct,Tt]);return(0,o.jsx)(Z.ZP,{...ie,"data-testid":wt,value:k,onChange:ee,options:nt,getOptionLabel:lt,renderInput:ye,freeSolo:Ut,fullWidth:Gt,clearOnBlur:Ft})});var Lt=t(73557),Kt=t(55511);const Yt=h=>h==null?void 0:h.document,qt=h=>{const{entityId:O,entityTitle:j,debounceTime:k=150}=h,[q,nt]=(0,i.useState)(!1),lt=(0,Lt.s0)(),{setFilters:Ct,result:{loading:Tt,value:Ut}}=At(),[Gt,Ft]=(0,i.useState)([]);(0,i.useEffect)(()=>{let Mt=!0;if(Mt&&Ut){const ee=Ut.results.slice(0,10);Ft(ee)}return()=>{Mt=!1}},[Tt,Ut]);const{kind:wt,name:ie,namespace:me}=O;(0,i.useEffect)(()=>{Ct(Mt=>({...Mt,kind:wt,namespace:me,name:ie}))},[wt,me,ie,Ct]);const Vt=(Mt,ee)=>{if(Yt(ee)){const{location:ye}=ee.document;lt(ye)}};return(0,o.jsx)($t,{"data-testid":"techdocs-search-bar",size:"small",open:q,getOptionLabel:()=>"",filterOptions:Mt=>Mt,onClose:()=>{nt(!1)},onFocus:()=>{nt(!0)},onChange:Vt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Gt,renderOption:({document:Mt,highlight:ee})=>(0,o.jsx)(Kt.TechDocsSearchResultListItem,{result:Mt,lineClamp:3,asListItem:!1,asLink:!1,title:Mt.title,highlight:ee}),loading:Tt,inputDebounceTime:k,inputPlaceholder:`Search ${j||O.name} docs`,freeSolo:!1})},Qt=h=>{const O={term:"",types:["techdocs"],pageCursor:"",filters:h.entityId};return(0,o.jsx)(it,{initialState:O,children:(0,o.jsx)(qt,{...h})})};var fe=t(99688),je=t(80851);const Ye=(0,i.lazy)(()=>Promise.all([t.e(8629),t.e(6051)]).then(t.bind(t,76051)).then(h=>({default:h.RealLogViewer})));function Ke(h){const{Progress:O}=(0,je.q)().getComponents();return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(O,{}),children:(0,o.jsx)(Ye,{...h})})}var be=t(42494),Qe=t(90436),Je=t(4190),ze=t(87685);const ne=(0,d.Z)(h=>(0,be.Z)({paper:{width:"100%",[h.breakpoints.up("sm")]:{width:"75%"},[h.breakpoints.up("md")]:{width:"50%"},padding:h.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:h.palette.background.default}})),on=({buildLog:h,onClose:O})=>{const j=ne(),k=h.length===0?"Waiting for logs...":h.join(`
|
|
2
|
+
`);return(0,o.jsxs)(b.Z,{container:!0,direction:"column",className:j.root,spacing:0,wrap:"nowrap",children:[(0,o.jsxs)(b.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,o.jsx)(Qe.Z,{variant:"h5",children:"Build Details"}),(0,o.jsx)(ht.Z,{title:"Close the drawer",onClick:O,color:"inherit",children:(0,o.jsx)(ze.Z,{})},"dismiss")]}),(0,o.jsx)(b.Z,{item:!0,xs:!0,children:(0,o.jsx)(Ke,{text:k,classes:{root:j.logs}})})]})},Oe=({buildLog:h})=>{const O=ne(),[j,k]=(0,i.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(vt.Z,{color:"inherit",onClick:()=>k(!0),children:"Show Build Logs"}),(0,o.jsx)(Je.ZP,{classes:{paper:O.paper},anchor:"right",open:j,onClose:()=>k(!1),children:(0,o.jsx)(on,{buildLog:h,onClose:()=>k(!1)})})]})},rn=({errorMessage:h})=>{const O=(0,z.h_)(ct.D).getOptionalString("techdocs.builder"),j=(0,Y.z)(),{entityRef:k}=(0,m.x)(),q=(0,Lt.TH)();(0,i.useEffect)(()=>{const{pathname:lt,search:Ct,hash:Tt}=q;j.captureEvent("not-found",`${lt}${Ct}${Tt}`,{attributes:k})},[j,k,q]);let nt="";return O!=="local"&&(nt="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,o.jsx)(I.m,{status:"404",statusMessage:h||"Documentation not found",additionalInfo:nt})};var Xe=t(77446),re=t(58496);function $e({contentLoading:h,content:O,activeSyncState:j}){return h||j==="BUILD_READY_RELOAD"||!O&&j==="CHECKING"?"CHECKING":!O&&j==="BUILDING"?"INITIAL_BUILD":O?j==="BUILDING"?"CONTENT_STALE_REFRESHING":j==="BUILD_READY"?"CONTENT_STALE_READY":j==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function Be(h,O){const j={...h};switch(O.type){case"sync":O.state==="CHECKING"&&(j.buildLog=[]),j.activeSyncState=O.state,j.syncError=O.syncError;break;case"contentLoading":j.contentLoading=!0,j.contentError=void 0;break;case"content":typeof O.path=="string"&&(j.path=O.path),j.contentLoading=!1,j.content=O.content,j.contentError=O.contentError;break;case"buildLog":j.buildLog=j.buildLog.concat(O.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(j.activeSyncState)&&["contentLoading","content"].includes(O.type)&&(j.activeSyncState="UP_TO_DATE",j.buildLog=[]),j}function _e(h,O,j,k){var q,nt;const[lt,Ct]=(0,i.useReducer)(Be,{activeSyncState:"CHECKING",path:k,contentLoading:!0,buildLog:[]}),Tt=(0,z.h_)(re.D),{retry:Ut}=(0,Xe.Z)(async()=>{Ct({type:"contentLoading"});try{const wt=await Tt.getEntityDocs({kind:h,namespace:O,name:j},k);return Ct({type:"content",content:wt,path:k}),wt}catch(wt){Ct({type:"content",contentError:wt,path:k})}},[Tt,h,O,j,k]),Gt=(0,i.useRef)({content:void 0,reload:()=>{}});return Gt.current={content:lt.content,reload:Ut},(0,V.default)(async()=>{Ct({type:"sync",state:"CHECKING"});const wt=setTimeout(()=>{Ct({type:"sync",state:"BUILDING"})},1e3);try{switch(await Tt.syncEntityDocs({kind:h,namespace:O,name:j},me=>{Ct({type:"buildLog",log:me})})){case"updated":Gt.current.content?Ct({type:"sync",state:"BUILD_READY"}):(Gt.current.reload(),Ct({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":Ct({type:"sync",state:"UP_TO_DATE"});break;default:Ct({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(ie){Ct({type:"sync",state:"ERROR",syncError:ie})}finally{clearTimeout(wt)}},[h,j,O,Tt,Ct,Gt]),{state:(0,i.useMemo)(()=>$e({activeSyncState:lt.activeSyncState,contentLoading:lt.contentLoading,content:lt.content}),[lt.activeSyncState,lt.content,lt.contentLoading]),contentReload:Ut,path:lt.path,content:lt.content,contentErrorMessage:(q=lt.contentError)===null||q===void 0?void 0:q.toString(),syncErrorMessage:(nt=lt.syncError)===null||nt===void 0?void 0:nt.toString(),buildLog:lt.buildLog}}const se=(0,i.createContext)({}),xe=()=>(0,i.useContext)(se),M=h=>{const{children:O}=h,{"*":j=""}=(0,Lt.UO)(),{entityRef:k}=(0,m.x)(),{kind:q,namespace:nt,name:lt}=k,Ct=_e(q,nt,lt,j);return(0,o.jsx)(se.Provider,{value:Ct,children:O instanceof Function?O(Ct):O})},u=h=>O=>(0,o.jsx)(M,{children:(0,o.jsx)(h,{...O})}),T=(0,d.Z)(h=>({root:{marginBottom:h.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),W=()=>{let h=null;const O=T(),{state:j,contentReload:k,contentErrorMessage:q,syncErrorMessage:nt,buildLog:lt}=xe();return j==="INITIAL_BUILD"&&(h=(0,o.jsx)(fe.Z,{classes:{root:O.root},variant:"outlined",severity:"info",icon:(0,o.jsx)(ut.Z,{size:"24px"}),action:(0,o.jsx)(Oe,{buildLog:lt}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),j==="CONTENT_STALE_REFRESHING"&&(h=(0,o.jsx)(fe.Z,{variant:"outlined",severity:"info",icon:(0,o.jsx)(ut.Z,{size:"24px"}),action:(0,o.jsx)(Oe,{buildLog:lt}),classes:{root:O.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),j==="CONTENT_STALE_READY"&&(h=(0,o.jsx)(fe.Z,{variant:"outlined",severity:"success",action:(0,o.jsx)(vt.Z,{color:"inherit",onClick:()=>k(),children:"Refresh"}),classes:{root:O.root},children:"A newer version of this documentation is now available, please refresh to view."})),j==="CONTENT_STALE_ERROR"&&(h=(0,o.jsxs)(fe.Z,{variant:"outlined",severity:"error",action:(0,o.jsx)(Oe,{buildLog:lt}),classes:{root:O.root,message:O.message},children:["Building a newer version of this documentation failed."," ",nt]})),j==="CONTENT_NOT_FOUND"&&(h=(0,o.jsxs)(o.Fragment,{children:[nt&&(0,o.jsxs)(fe.Z,{variant:"outlined",severity:"error",action:(0,o.jsx)(Oe,{buildLog:lt}),classes:{root:O.root,message:O.message},children:["Building a newer version of this documentation failed."," ",nt]}),(0,o.jsx)(rn,{errorMessage:q})]})),h};var rt=t(60364),St=t(41156),Rt=t(91657),oe=t(35368),_t=t.n(oe);const Zt=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Bt=/^https:\/\/fonts\.googleapis\.com/,pe=/^https:\/\/fonts\.gstatic\.com/,Ie=h=>h.nodeName==="LINK",Nt=h=>{const O=(h==null?void 0:h.getAttribute("href"))||"",j=O.match(Zt),k=O.match(Bt),q=O.match(pe);return j||k||q},te=h=>(Ie(h)&&!Nt(h)&&h.remove(),h),le=h=>h.nodeName==="IFRAME",Ln=(h,O)=>{const j=h.getAttribute("src")||"";try{const{host:k}=new URL(j);return O.includes(k)}catch{return!1}},ho=h=>O=>(le(O)&&!Ln(O,h)&&O.remove(),O),Mn=()=>{const h=(0,z.h_)(ct.D);return(0,i.useMemo)(()=>h.getOptionalConfig("techdocs.sanitizer"),[h])},jn=()=>{const h=Mn();return(0,i.useCallback)(async O=>{const j=h==null?void 0:h.getOptionalStringArray("allowedIframeHosts");_t().addHook("beforeSanitizeElements",te);const k=["link"];return j&&(k.push("iframe"),_t().addHook("beforeSanitizeElements",ho(j))),_t().sanitize(O.outerHTML,{ADD_TAGS:k,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[h])};var Bn=t(93539),ve=t(41128),De=({theme:h})=>`
|
|
3
3
|
/*================== Variables ==================*/
|
|
4
4
|
/*
|
|
5
5
|
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.
|
|
@@ -117,7 +117,7 @@ body {
|
|
|
117
117
|
font-family: var(--md-text-font-family);
|
|
118
118
|
background-color: unset;
|
|
119
119
|
}
|
|
120
|
-
`;const He="224px";var
|
|
120
|
+
`;const He="224px";var go=({theme:h,sidebar:O})=>`
|
|
121
121
|
/*================== Layout ==================*/
|
|
122
122
|
|
|
123
123
|
/* mkdocs material v9 compat */
|
|
@@ -336,7 +336,7 @@ body {
|
|
|
336
336
|
max-width: 100%;
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
`;const Un=["h1","h2","h3","h4","h5","h6"];var
|
|
339
|
+
`;const Un=["h1","h2","h3","h4","h5","h6"];var po=({theme:h})=>`
|
|
340
340
|
/*================== Typeset ==================*/
|
|
341
341
|
|
|
342
342
|
.md-typeset {
|
|
@@ -479,9 +479,9 @@ ${Un.reduce((O,j)=>{var k;const q=(k=h.typography.htmlFontSize)!==null&&k!==void
|
|
|
479
479
|
height: 20px !important;
|
|
480
480
|
transform: translateY(-50%) !important;
|
|
481
481
|
}
|
|
482
|
-
`;const sn=[De,fo,po,
|
|
482
|
+
`;const sn=[De,fo,go,po,Ht,Fe],vo=()=>(0,Bn.Pf)(),mo=()=>{const h=vo(),O=(0,rt.Z)();return(0,i.useMemo)(()=>{const j={theme:O,sidebar:h};return sn.reduce((k,q)=>k+q(j),"")},[O,h])},yo=()=>{const h=mo();return(0,i.useCallback)(O=>(O.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${h}</style>`),O),[h])},$n=async(h,O)=>{let j;if(typeof h=="string")j=new DOMParser().parseFromString(h,"text/html").documentElement;else if(h instanceof Element)j=h;else throw new Error("dom is not a recognized type");for(const k of O)j=await k(j);return j},yn=(h,O,j)=>{const k=h==="src"&&O.endsWith(".svg"),q=!O.match(/^([a-z]*:)?\/\//i),nt=O.startsWith(j);return k&&(q||nt)},Eo=({techdocsStorageApi:h,entityId:O,path:j})=>async k=>{const q=await h.getApiOrigin(),nt=async(lt,Ct)=>{for(const Tt of lt)if(Tt.hasAttribute(Ct)){const Ut=Tt.getAttribute(Ct);if(!Ut)return;const Gt=await h.getBaseUrl(Ut,O,j);if(yn(Ct,Ut,q))try{const wt=await(await fetch(Gt,{credentials:"include"})).text();Tt.setAttribute(Ct,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(wt)))}`)}catch{Tt.setAttribute("alt",`Error: ${Ut}`)}else Tt.setAttribute(Ct,Gt)}};return await Promise.all([nt(k.querySelectorAll("img"),"src"),nt(k.querySelectorAll("script"),"src"),nt(k.querySelectorAll("source"),"src"),nt(k.querySelectorAll("link"),"href"),nt(k.querySelectorAll("a[download]"),"href")]),k},Fn=()=>h=>(((j,k)=>{Array.from(j).filter(q=>q.hasAttribute(k)).forEach(q=>{const nt=q.getAttribute(k);if(nt){nt.match(/^https?:\/\//i)&&q.setAttribute("target","_blank");try{const lt=xo(window.location.href);q.setAttribute(k,new URL(nt,lt).toString())}catch{q.replaceWith(q.textContent||nt)}}})})(Array.from(h.getElementsByTagName("a")),"href"),h);function xo(h){const O=new URL(h);return!O.pathname.endsWith("/")&&!O.pathname.endsWith(".html")&&(O.pathname+="/"),O.toString()}var Co=t(44882);let Wn;Wn=Promise.resolve().then(t.t.bind(t,17029,19));function En(h,O){Wn.then(j=>{"createRoot"in j?j.createRoot(O).render(h):j.render(h,O)})}const Ao=()=>h=>{const O=h.querySelector('.md-header label[for="__drawer"]'),j=h.querySelector("article");if(!O||!j)return h;const k=O.cloneNode();return En(i.createElement(Co.Z),k),k.id="toggle-sidebar",k.title="Toggle Sidebar",k.classList.add("md-content__button"),k.style.setProperty("padding","0 0 0 5px"),k.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),j==null||j.prepend(k),h},So=()=>h=>{var O;return(O=h.querySelector(".md-header"))===null||O===void 0||O.remove(),h},bo=()=>h=>{var O,j;return(O=h.querySelector(".md-footer .md-copyright"))===null||O===void 0||O.remove(),(j=h.querySelector(".md-footer-copyright"))===null||j===void 0||j.remove(),h};var Oo=t(61800),Po=t(67097),Nn=t(82717),Ro=t.n(Nn);const wo=h=>O=>{var j;const k=O.querySelector('[title="Edit this page"]');if(!k||!k.href)return O;const q=new URL(k.href),nt=h.byUrl(q);if((nt==null?void 0:nt.type)!=="github"&&(nt==null?void 0:nt.type)!=="gitlab")return O;const lt=((j=O.querySelector("article>h1"))===null||j===void 0?void 0:j.childNodes[0].textContent)||"",Ct=encodeURIComponent(`Documentation Feedback: ${lt}`),Tt=encodeURIComponent(`Page source:
|
|
483
483
|
${k.href}
|
|
484
484
|
|
|
485
|
-
Feedback:`),Ut=(nt==null?void 0:nt.type)==="github"?(0,Oo.B)(q.href,"blob"):q.href,Gt=Ro()(Ut),Ft=`/${Gt.organization}/${Gt.name}`,wt=k.cloneNode();switch(nt==null?void 0:nt.type){case"gitlab":wt.href=`${q.origin}${Ft}/issues/new?issue[title]=${Ct}&issue[description]=${Tt}`;break;case"github":wt.href=`${q.origin}${Ft}/issues/new?title=${Ct}&body=${Tt}`;break;default:return O}return yn(i.createElement(Po.Z),wt),wt.style.paddingLeft="5px",wt.title="Leave feedback for this page",wt.id="git-feedback-link",k==null||k.insertAdjacentElement("beforebegin",wt),O},Zn=()=>h=>(setTimeout(()=>{const O=h==null?void 0:h.querySelectorAll("li.md-nav__item--active");O.length!==0&&(O.forEach(k=>{const q=k==null?void 0:k.querySelector("input");q!=null&&q.checked||q==null||q.click()}),O[O.length-1].scrollIntoView())},200),h);var kn=t(15459),To=t(80030),En=t(72379),xn=t(41547),Io=t(95074);const Do=(0,kn.Z)(h=>({tooltip:{fontSize:"inherit",color:h.palette.text.primary,margin:0,padding:h.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(To.ZP),Lo=()=>(0,o.jsx)(En.Z,{children:(0,o.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"})}),Mo=({text:h})=>{const[O,j]=(0,i.useState)(!1),[,k]=(0,Io.Z)(),q=(0,i.useCallback)(()=>{k(h),j(!0)},[h,k]),nt=(0,i.useCallback)(()=>{j(!1)},[j]);return(0,o.jsx)(Do,{title:"Copied to clipboard",placement:"left",open:O,onClose:nt,leaveDelay:1e3,children:(0,o.jsx)(ht.Z,{style:{color:"inherit"},className:"md-clipboard md-icon",onClick:q,children:(0,o.jsx)(Lo,{})})})},jo=h=>O=>{const j=O.querySelectorAll("pre > code");for(const q of j){var k;const nt=q.textContent||"",lt=document.createElement("div");q==null||(k=q.parentElement)===null||k===void 0||k.prepend(lt),yn((0,o.jsx)(xn.Z,{theme:h,children:(0,o.jsx)(Mo,{text:nt})}),lt)}return O},Bo=({baseUrl:h,onClick:O})=>j=>(Array.from(j.getElementsByTagName("a")).forEach(k=>{k.addEventListener("click",q=>{const lt=k.getAttribute("href");lt&<.startsWith(h)&&!k.hasAttribute("download")&&(q.preventDefault(),O(q,lt))})}),j),Kn=({onLoading:h,onLoaded:O})=>j=>(h(),j.addEventListener(A,function k(){O(),j.removeEventListener(A,k)}),j);function Uo(h,O){const j=new URL(O),k=`${j.origin}${j.pathname.replace(/\/$/,"")}`,q=h.replace(k,"").replace(/^\/+/,""),nt=new URL(`http://localhost/${q}`);return`${nt.pathname}${nt.search}${nt.hash}`}function $o(){const h=(0,Lt.s0)(),j=(0,z.h_)(ct.D).getOptionalString("app.baseUrl");return(0,i.useCallback)(q=>{let nt=q;if(j)try{nt=Uo(q,j)}catch{}h(nt)},[h,j])}const Fo="screen and (max-width: 76.1875em)",Wo=h=>{const O=$o(),j=(0,rt.Z)(),k=(0,St.Z)(Fo),q=jn(),nt=yo(),lt=(0,Y.z)(),Ct=(0,z.h_)(re.D),Tt=(0,z.h_)(Rt.q),{state:Ut,path:Gt,content:Ft}=xe(),[wt,ie]=(0,i.useState)(null),me=E(wt),Vt=(0,i.useCallback)(()=>{if(!wt)return;wt.querySelectorAll(".md-sidebar").forEach(kt=>{if(k)kt.style.top="0px";else{var Jt;const ae=(Jt=document)===null||Jt===void 0?void 0:Jt.querySelector(".techdocs-reader-page");var Ce;const We=(Ce=ae==null?void 0:ae.getBoundingClientRect().top)!==null&&Ce!==void 0?Ce:0;var Re;let ue=(Re=wt.getBoundingClientRect().top)!==null&&Re!==void 0?Re:0;const Ge=wt.querySelector(".md-container > .md-tabs");var Ue;const ln=(Ue=Ge==null?void 0:Ge.getBoundingClientRect().height)!==null&&Ue!==void 0?Ue:0;ue<We&&(ue=We),kt.style.top=`${Math.max(ue,0)+ln}px`}kt.style.setProperty("opacity","1")})},[wt,k]);(0,i.useEffect)(()=>(window.addEventListener("resize",Vt),window.addEventListener("scroll",Vt,!0),()=>{window.removeEventListener("resize",Vt),window.removeEventListener("scroll",Vt,!0)}),[wt,Vt]);const Mt=(0,i.useCallback)(()=>{if(!wt)return;const Dt=wt.querySelector(".md-footer");Dt&&(Dt.style.width=`${wt.getBoundingClientRect().width}px`)},[wt]);(0,i.useEffect)(()=>(window.addEventListener("resize",Mt),()=>{window.removeEventListener("resize",Mt)}),[wt,Mt]),(0,i.useEffect)(()=>{me||(Mt(),Vt())},[Ut,me,Mt,Vt]);const ee=(0,i.useCallback)((Dt,kt)=>$n(Dt,[q,Eo({techdocsStorageApi:Ct,entityId:h,path:kt}),Fn(),Ao(),So(),bo(),wo(Tt),nt]),[h,Tt,Ct,q,nt]),ye=(0,i.useCallback)(async Dt=>$n(Dt,[Zn(),jo(j),Bo({baseUrl:window.location.origin,onClick:(kt,Jt)=>{var Ce;const Re=kt.ctrlKey||kt.metaKey,Ue=new URL(Jt),ae=((Ce=kt.target)===null||Ce===void 0?void 0:Ce.innerText)||Jt,We=Jt.replace(window.location.origin,"");if(lt.captureEvent("click",ae,{attributes:{to:We}}),Ue.hash)if(Re)window.open(Jt,"_blank");else{var ue;O(Jt),Dt==null||(ue=Dt.querySelector(`[id="${Ue.hash.slice(1)}"]`))===null||ue===void 0||ue.scrollIntoView()}else Re?window.open(Jt,"_blank"):O(Jt)}}),Kn({onLoading:()=>{},onLoaded:()=>{var kt;(kt=Dt.querySelector(".md-nav__title"))===null||kt===void 0||kt.removeAttribute("for")}}),Kn({onLoading:()=>{Array.from(Dt.querySelectorAll(".md-sidebar")).forEach(Jt=>{Jt.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[j,O,lt]);return(0,i.useEffect)(()=>{if(!Ft)return()=>{};let Dt=!0;return ee(Ft,Gt).then(async kt=>{if(!(kt!=null&&kt.innerHTML)||!Dt)return;window.scroll({top:0});const Jt=await ye(kt);ie(Jt)}),()=>{Dt=!1}},[Ft,Gt,ee,ye]),wt};var an=t(8560),zn=t(2296),Pt=t(57058);const ce=()=>{const h=(0,zn.$L)(),{shadowRoot:O}=(0,m.x)(),j=O==null?void 0:O.querySelector('[data-md-component="content"]'),k=O==null?void 0:O.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let q=k==null?void 0:k.querySelector('[data-techdocs-addons-location="primary sidebar"]');q||(q=document.createElement("div"),q.setAttribute("data-techdocs-addons-location","primary sidebar"),k==null||k.prepend(q));const nt=O==null?void 0:O.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let lt=nt==null?void 0:nt.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return lt||(lt=document.createElement("div"),lt.setAttribute("data-techdocs-addons-location","secondary sidebar"),nt==null||nt.prepend(lt)),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(an.Z,{container:q,children:h.renderComponentsByLocation(Pt.o.PrimarySidebar)}),(0,o.jsx)(an.Z,{container:j,children:h.renderComponentsByLocation(Pt.o.Content)}),(0,o.jsx)(an.Z,{container:lt,children:h.renderComponentsByLocation(Pt.o.SecondarySidebar)})]})},de=(0,d.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),No=u(h=>{var O;const{withSearch:j=!0,onReady:k}=h,q=de(),{entityMetadata:{value:nt,loading:lt},entityRef:Ct,setShadowRoot:Tt}=(0,m.x)(),Ut=Wo(Ct),Gt=window.location.pathname,Ft=window.location.hash,wt=E(Ut),[ie]=U([`[id="${Ft.slice(1)}"]`]);(0,i.useEffect)(()=>{if(!wt)if(Ft)ie&&ie.scrollIntoView();else{var Vt,Mt;(Mt=document)===null||Mt===void 0||(Vt=Mt.querySelector("header"))===null||Vt===void 0||Vt.scrollIntoView()}},[Gt,Ft,ie,wt]);const me=(0,i.useCallback)(Vt=>{Tt(Vt),k instanceof Function&&k()},[Tt,k]);return lt===!1&&!nt?(0,o.jsx)(I.m,{status:"404",statusMessage:"PAGE NOT FOUND"}):Ut?(0,o.jsx)(g.V,{children:(0,o.jsxs)(b.Z,{container:!0,children:[(0,o.jsx)(b.Z,{xs:12,item:!0,children:(0,o.jsx)(W,{})}),j&&(0,o.jsx)(b.Z,{className:q.search,xs:"auto",item:!0,children:(0,o.jsx)(Qt,{entityId:Ct,entityTitle:nt==null||(O=nt.metadata)===null||O===void 0?void 0:O.title})}),(0,o.jsx)(b.Z,{xs:12,item:!0,children:(0,o.jsx)(C,{element:Ut,onAppend:me,children:(0,o.jsx)(ce,{})})})]})}):(0,o.jsx)(g.V,{children:(0,o.jsx)(b.Z,{container:!0,children:(0,o.jsx)(b.Z,{xs:12,item:!0,children:(0,o.jsx)(W,{})})})})}),ar=null},65386:function(_,P,t){"use strict";t.d(P,{S:function(){return ct}});var o=t(52322),i=t(2784),d=t(18671),b=t(60905),m=t(98069),f=t(60364),l=t(73250),p=t(2296),S=t(68979),A=t(57058),R=t(75435),E=t(84719),C=t(51194),x=t(8709),B=t(79692),U=t(41128),w=t(90436),$=t(98864);const I=(0,B.Z)(dt=>({root:{textAlign:"left"},label:{color:dt.page.fontColor,fontWeight:dt.typography.fontWeightBold,letterSpacing:0,fontSize:dt.typography.fontSize,marginBottom:dt.spacing(1)/2,lineHeight:1},value:{color:(0,U.Fq)(dt.page.fontColor,.8),fontSize:dt.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),g=({value:dt,className:ft,typographyRootComponent:Ot})=>(0,o.jsx)(w.Z,{component:Ot!=null?Ot:typeof dt=="string"?"p":"span",className:ft,children:dt});function K(dt){const{label:ft,value:Ot,url:at,contentTypograpyRootComponent:At}=dt,X=I(),L=(0,o.jsx)(g,{className:X.value,value:Ot||"<Unknown>",typographyRootComponent:At});return(0,o.jsx)(b.Z,{item:!0,children:(0,o.jsxs)(w.Z,{component:"span",className:X.root,children:[(0,o.jsx)(w.Z,{className:X.label,children:ft}),at?(0,o.jsx)($.rU,{to:at,children:L}):L]})})}var V=t(48037),J=t(44394),H=t(6542),G=t(37321),z=t(76635),Y=t(95573);const ot=(0,o.jsx)(m.Z,{animation:"wave",variant:"text",height:40}),ct=dt=>{const{palette:{common:{white:ft}}}=(0,f.Z)(),{children:Ot}=dt,at=(0,p.$L)(),At=(0,J.h_)(H.D),{title:X,setTitle:L,subtitle:Q,setSubtitle:et,entityRef:it,metadata:{value:ut,loading:Z},entityMetadata:{value:F,loading:ht}}=(0,S.x)();(0,i.useEffect)(()=>{ut&&(L(ut.site_name),et(()=>{let{site_description:$t}=ut;return(!$t||$t==="None")&&($t=""),$t}))},[ut,L,et]);const xt=At.getOptional("app.title")||"Backstage",vt=[X,Q,xt].filter(Boolean).join(" | "),{locationMetadata:yt,spec:pt}=F||{},bt=pt==null?void 0:pt.lifecycle,It=F?(0,R.h)(F,x.S4):[],jt=(0,G.t)(Y._Z)(),pe=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(K,{label:(0,z.capitalize)((F==null?void 0:F.kind)||"entity"),value:(0,o.jsx)(E.d,{color:"inherit",entityRef:it,title:F==null?void 0:F.metadata.title,defaultKind:"Component"})}),It.length>0&&(0,o.jsx)(K,{label:"Owner",value:(0,o.jsx)(C.r,{color:"inherit",entityRefs:It,defaultKind:"group"})}),bt?(0,o.jsx)(K,{label:"Lifecycle",value:String(bt)}):null,yt&&yt.type!=="dir"&&yt.type!=="file"?(0,o.jsx)(K,{label:"",value:(0,o.jsxs)(b.Z,{container:!0,direction:"column",alignItems:"center",style:{color:ft},children:[(0,o.jsx)(b.Z,{style:{padding:0},item:!0,children:(0,o.jsx)(l.Z,{style:{marginTop:"-25px"}})}),(0,o.jsx)(b.Z,{style:{padding:0},item:!0,children:"Source"})]}),url:yt.target}):null]});return!ht&&F===void 0||!Z&&ut===void 0?null:(0,o.jsxs)(V.h,{type:"Documentation",typeLink:jt,title:X||ot,subtitle:Q===""?void 0:Q||ot,children:[(0,o.jsx)(d.Z,{titleTemplate:"%s",children:(0,o.jsx)("title",{children:vt})}),pe,Ot,at.renderComponentsByLocation(A.o.Header)]})}},95573:function(_,P,t){"use strict";t.d(P,{Fw:function(){return d},_Z:function(){return i},pd:function(){return b}});var o=t(30283);const i=(0,o.N)({id:"techdocs:index-page"}),d=(0,o.N)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),b=(0,o.N)({id:"techdocs:catalog-reader-view"})},55511:function(_,P,t){"use strict";t.r(P),t.d(P,{TechDocsSearchResultListItem:function(){return A}});var o=t(52322),i=t(2784),d=t(79692),b=t(49378),m=t(86136),f=t(90436),l=t(98864),p=t(76079);const S=(0,d.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),A=R=>{const{result:E,highlight:C,lineClamp:x=5,asListItem:B=!0,asLink:U=!0,title:w,icon:$}=R,I=S(),g=({children:J})=>U?(0,o.jsx)(l.rU,{noTrack:!0,to:E.location,children:J}):(0,o.jsx)(o.Fragment,{children:J}),K=()=>{const J=C!=null&&C.fields.title?(0,o.jsx)(p.F,{text:C.fields.title,preTag:C.preTag,postTag:C.postTag}):E.title,H=C!=null&&C.fields.entityTitle?(0,o.jsx)(p.F,{text:C.fields.entityTitle,preTag:C.preTag,postTag:C.postTag}):E.entityTitle,G=C!=null&&C.fields.name?(0,o.jsx)(p.F,{text:C.fields.name,preTag:C.preTag,postTag:C.postTag}):E.name;return E?(0,o.jsx)(b.Z,{className:I.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,o.jsx)(g,{children:w||(0,o.jsxs)(o.Fragment,{children:[J," | ",H!=null?H:G," docs"]})}),secondary:(0,o.jsx)(f.Z,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:x,overflow:"hidden"},color:"textSecondary",variant:"body2",children:C!=null&&C.fields.text?(0,o.jsx)(p.F,{text:C.fields.text,preTag:C.preTag,postTag:C.postTag}):E.text})}):null},V=({children:J})=>B?(0,o.jsxs)(o.Fragment,{children:[$&&(0,o.jsx)(m.Z,{children:typeof $=="function"?$(E):$}),(0,o.jsx)("div",{className:I.flexContainer,children:J})]}):(0,o.jsx)(o.Fragment,{children:J});return(0,o.jsx)(V,{children:(0,o.jsx)(K,{})})}},53260:function(){}},function(_){var P=function(o){return _(_.s=o)};_.O(0,[2370,6202,9284,7012,427,242,5109,6816,1213,5218,4736],function(){return P(99329)});var t=_.O()}]);})();
|
|
485
|
+
Feedback:`),Ut=(nt==null?void 0:nt.type)==="github"?(0,Oo.B)(q.href,"blob"):q.href,Gt=Ro()(Ut),Ft=`/${Gt.organization}/${Gt.name}`,wt=k.cloneNode();switch(nt==null?void 0:nt.type){case"gitlab":wt.href=`${q.origin}${Ft}/issues/new?issue[title]=${Ct}&issue[description]=${Tt}`;break;case"github":wt.href=`${q.origin}${Ft}/issues/new?title=${Ct}&body=${Tt}`;break;default:return O}return En(i.createElement(Po.Z),wt),wt.style.paddingLeft="5px",wt.title="Leave feedback for this page",wt.id="git-feedback-link",k==null||k.insertAdjacentElement("beforebegin",wt),O},Zn=()=>h=>(setTimeout(()=>{const O=h==null?void 0:h.querySelectorAll("li.md-nav__item--active");O.length!==0&&(O.forEach(k=>{const q=k==null?void 0:k.querySelector("input");q!=null&&q.checked||q==null||q.click()}),O[O.length-1].scrollIntoView())},200),h);var kn=t(15459),To=t(80030),xn=t(72379),Cn=t(41547),Io=t(95074);const Do=(0,kn.Z)(h=>({tooltip:{fontSize:"inherit",color:h.palette.text.primary,margin:0,padding:h.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(To.ZP),Lo=()=>(0,o.jsx)(xn.Z,{children:(0,o.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"})}),Mo=({text:h})=>{const[O,j]=(0,i.useState)(!1),[,k]=(0,Io.Z)(),q=(0,i.useCallback)(()=>{k(h),j(!0)},[h,k]),nt=(0,i.useCallback)(()=>{j(!1)},[j]);return(0,o.jsx)(Do,{title:"Copied to clipboard",placement:"left",open:O,onClose:nt,leaveDelay:1e3,children:(0,o.jsx)(ht.Z,{style:{color:"inherit"},className:"md-clipboard md-icon",onClick:q,children:(0,o.jsx)(Lo,{})})})},jo=h=>O=>{const j=O.querySelectorAll("pre > code");for(const q of j){var k;const nt=q.textContent||"",lt=document.createElement("div");q==null||(k=q.parentElement)===null||k===void 0||k.prepend(lt),En((0,o.jsx)(Cn.Z,{theme:h,children:(0,o.jsx)(Mo,{text:nt})}),lt)}return O},Bo=({baseUrl:h,onClick:O})=>j=>(Array.from(j.getElementsByTagName("a")).forEach(k=>{k.addEventListener("click",q=>{const lt=k.getAttribute("href");lt&<.startsWith(h)&&!k.hasAttribute("download")&&(q.preventDefault(),O(q,lt))})}),j),Kn=({onLoading:h,onLoaded:O})=>j=>(h(),j.addEventListener(A,function k(){O(),j.removeEventListener(A,k)}),j);function Uo(h,O){const j=new URL(O),k=`${j.origin}${j.pathname.replace(/\/$/,"")}`,q=h.replace(k,"").replace(/^\/+/,""),nt=new URL(`http://localhost/${q}`);return`${nt.pathname}${nt.search}${nt.hash}`}function $o(){const h=(0,Lt.s0)(),j=(0,z.h_)(ct.D).getOptionalString("app.baseUrl");return(0,i.useCallback)(q=>{let nt=q;if(j)try{nt=Uo(q,j)}catch{}h(nt)},[h,j])}const Fo="screen and (max-width: 76.1875em)",Wo=h=>{const O=$o(),j=(0,rt.Z)(),k=(0,St.Z)(Fo),q=jn(),nt=yo(),lt=(0,Y.z)(),Ct=(0,z.h_)(re.D),Tt=(0,z.h_)(Rt.q),{state:Ut,path:Gt,content:Ft}=xe(),[wt,ie]=(0,i.useState)(null),me=x(wt),Vt=(0,i.useCallback)(()=>{if(!wt)return;wt.querySelectorAll(".md-sidebar").forEach(kt=>{if(k)kt.style.top="0px";else{var Jt;const ae=(Jt=document)===null||Jt===void 0?void 0:Jt.querySelector(".techdocs-reader-page");var Ce;const We=(Ce=ae==null?void 0:ae.getBoundingClientRect().top)!==null&&Ce!==void 0?Ce:0;var Re;let ue=(Re=wt.getBoundingClientRect().top)!==null&&Re!==void 0?Re:0;const Ge=wt.querySelector(".md-container > .md-tabs");var Ue;const ln=(Ue=Ge==null?void 0:Ge.getBoundingClientRect().height)!==null&&Ue!==void 0?Ue:0;ue<We&&(ue=We),kt.style.top=`${Math.max(ue,0)+ln}px`}kt.style.setProperty("opacity","1")})},[wt,k]);(0,i.useEffect)(()=>(window.addEventListener("resize",Vt),window.addEventListener("scroll",Vt,!0),()=>{window.removeEventListener("resize",Vt),window.removeEventListener("scroll",Vt,!0)}),[wt,Vt]);const Mt=(0,i.useCallback)(()=>{if(!wt)return;const Dt=wt.querySelector(".md-footer");Dt&&(Dt.style.width=`${wt.getBoundingClientRect().width}px`)},[wt]);(0,i.useEffect)(()=>(window.addEventListener("resize",Mt),()=>{window.removeEventListener("resize",Mt)}),[wt,Mt]),(0,i.useEffect)(()=>{me||(Mt(),Vt())},[Ut,me,Mt,Vt]);const ee=(0,i.useCallback)((Dt,kt)=>$n(Dt,[q,Eo({techdocsStorageApi:Ct,entityId:h,path:kt}),Fn(),Ao(),So(),bo(),wo(Tt),nt]),[h,Tt,Ct,q,nt]),ye=(0,i.useCallback)(async Dt=>$n(Dt,[Zn(),jo(j),Bo({baseUrl:window.location.origin,onClick:(kt,Jt)=>{var Ce;const Re=kt.ctrlKey||kt.metaKey,Ue=new URL(Jt),ae=((Ce=kt.target)===null||Ce===void 0?void 0:Ce.innerText)||Jt,We=Jt.replace(window.location.origin,"");if(lt.captureEvent("click",ae,{attributes:{to:We}}),Ue.hash)if(Re)window.open(Jt,"_blank");else{var ue;O(Jt),Dt==null||(ue=Dt.querySelector(`[id="${Ue.hash.slice(1)}"]`))===null||ue===void 0||ue.scrollIntoView()}else Re?window.open(Jt,"_blank"):O(Jt)}}),Kn({onLoading:()=>{},onLoaded:()=>{var kt;(kt=Dt.querySelector(".md-nav__title"))===null||kt===void 0||kt.removeAttribute("for")}}),Kn({onLoading:()=>{Array.from(Dt.querySelectorAll(".md-sidebar")).forEach(Jt=>{Jt.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[j,O,lt]);return(0,i.useEffect)(()=>{if(!Ft)return()=>{};let Dt=!0;return ee(Ft,Gt).then(async kt=>{if(!(kt!=null&&kt.innerHTML)||!Dt)return;window.scroll({top:0});const Jt=await ye(kt);ie(Jt)}),()=>{Dt=!1}},[Ft,Gt,ee,ye]),wt};var an=t(8560),zn=t(2296),Pt=t(57058);const ce=()=>{const h=(0,zn.$L)(),{shadowRoot:O}=(0,m.x)(),j=O==null?void 0:O.querySelector('[data-md-component="content"]'),k=O==null?void 0:O.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let q=k==null?void 0:k.querySelector('[data-techdocs-addons-location="primary sidebar"]');q||(q=document.createElement("div"),q.setAttribute("data-techdocs-addons-location","primary sidebar"),k==null||k.prepend(q));const nt=O==null?void 0:O.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let lt=nt==null?void 0:nt.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return lt||(lt=document.createElement("div"),lt.setAttribute("data-techdocs-addons-location","secondary sidebar"),nt==null||nt.prepend(lt)),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(an.Z,{container:q,children:h.renderComponentsByLocation(Pt.o.PrimarySidebar)}),(0,o.jsx)(an.Z,{container:j,children:h.renderComponentsByLocation(Pt.o.Content)}),(0,o.jsx)(an.Z,{container:lt,children:h.renderComponentsByLocation(Pt.o.SecondarySidebar)})]})},de=(0,d.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),No=u(h=>{var O;const{withSearch:j=!0,onReady:k}=h,q=de(),{entityMetadata:{value:nt,loading:lt},entityRef:Ct,setShadowRoot:Tt}=(0,m.x)(),Ut=Wo(Ct),Gt=window.location.pathname,Ft=window.location.hash,wt=x(Ut),[ie]=B([`[id="${Ft.slice(1)}"]`]);(0,i.useEffect)(()=>{if(!wt)if(Ft)ie&&ie.scrollIntoView();else{var Vt,Mt;(Mt=document)===null||Mt===void 0||(Vt=Mt.querySelector("header"))===null||Vt===void 0||Vt.scrollIntoView()}},[Gt,Ft,ie,wt]);const me=(0,i.useCallback)(Vt=>{Tt(Vt),k instanceof Function&&k()},[Tt,k]);return lt===!1&&!nt?(0,o.jsx)(I.m,{status:"404",statusMessage:"PAGE NOT FOUND"}):Ut?(0,o.jsx)(p.V,{children:(0,o.jsxs)(b.Z,{container:!0,children:[(0,o.jsx)(b.Z,{xs:12,item:!0,children:(0,o.jsx)(W,{})}),j&&(0,o.jsx)(b.Z,{className:q.search,xs:"auto",item:!0,children:(0,o.jsx)(Qt,{entityId:Ct,entityTitle:nt==null||(O=nt.metadata)===null||O===void 0?void 0:O.title})}),(0,o.jsx)(b.Z,{xs:12,item:!0,children:(0,o.jsx)(C,{element:Ut,onAppend:me,children:(0,o.jsx)(ce,{})})})]})}):(0,o.jsx)(p.V,{children:(0,o.jsx)(b.Z,{container:!0,children:(0,o.jsx)(b.Z,{xs:12,item:!0,children:(0,o.jsx)(W,{})})})})}),ar=null},65386:function(_,P,t){"use strict";t.d(P,{S:function(){return ct}});var o=t(52322),i=t(2784),d=t(18671),b=t(60905),m=t(98069),f=t(60364),l=t(73250),g=t(2296),S=t(68979),A=t(57058),R=t(75435),x=t(84719),C=t(51194),E=t(8709),U=t(79692),B=t(41128),w=t(90436),$=t(98864);const I=(0,U.Z)(dt=>({root:{textAlign:"left"},label:{color:dt.page.fontColor,fontWeight:dt.typography.fontWeightBold,letterSpacing:0,fontSize:dt.typography.fontSize,marginBottom:dt.spacing(1)/2,lineHeight:1},value:{color:(0,B.Fq)(dt.page.fontColor,.8),fontSize:dt.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),p=({value:dt,className:ft,typographyRootComponent:Ot})=>(0,o.jsx)(w.Z,{component:Ot!=null?Ot:typeof dt=="string"?"p":"span",className:ft,children:dt});function K(dt){const{label:ft,value:Ot,url:at,contentTypograpyRootComponent:At}=dt,X=I(),L=(0,o.jsx)(p,{className:X.value,value:Ot||"<Unknown>",typographyRootComponent:At});return(0,o.jsx)(b.Z,{item:!0,children:(0,o.jsxs)(w.Z,{component:"span",className:X.root,children:[(0,o.jsx)(w.Z,{className:X.label,children:ft}),at?(0,o.jsx)($.rU,{to:at,children:L}):L]})})}var V=t(48037),J=t(44394),H=t(6542),G=t(37321),z=t(76635),Y=t(95573);const ot=(0,o.jsx)(m.Z,{animation:"wave",variant:"text",height:40}),ct=dt=>{const{palette:{common:{white:ft}}}=(0,f.Z)(),{children:Ot}=dt,at=(0,g.$L)(),At=(0,J.h_)(H.D),{title:X,setTitle:L,subtitle:Q,setSubtitle:et,entityRef:it,metadata:{value:ut,loading:Z},entityMetadata:{value:F,loading:ht}}=(0,S.x)();(0,i.useEffect)(()=>{ut&&(L(ut.site_name),et(()=>{let{site_description:$t}=ut;return(!$t||$t==="None")&&($t=""),$t}))},[ut,L,et]);const xt=At.getOptional("app.title")||"Backstage",vt=[X,Q,xt].filter(Boolean).join(" | "),{locationMetadata:yt,spec:gt}=F||{},bt=gt==null?void 0:gt.lifecycle,It=F?(0,R.h)(F,E.S4):[],jt=(0,G.t)(Y._Z)(),ge=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(K,{label:(0,z.capitalize)((F==null?void 0:F.kind)||"entity"),value:(0,o.jsx)(x.d,{color:"inherit",entityRef:it,title:F==null?void 0:F.metadata.title,defaultKind:"Component"})}),It.length>0&&(0,o.jsx)(K,{label:"Owner",value:(0,o.jsx)(C.r,{color:"inherit",entityRefs:It,defaultKind:"group"})}),bt?(0,o.jsx)(K,{label:"Lifecycle",value:String(bt)}):null,yt&&yt.type!=="dir"&&yt.type!=="file"?(0,o.jsx)(K,{label:"",value:(0,o.jsxs)(b.Z,{container:!0,direction:"column",alignItems:"center",style:{color:ft},children:[(0,o.jsx)(b.Z,{style:{padding:0},item:!0,children:(0,o.jsx)(l.Z,{style:{marginTop:"-25px"}})}),(0,o.jsx)(b.Z,{style:{padding:0},item:!0,children:"Source"})]}),url:yt.target}):null]});return!ht&&F===void 0||!Z&&ut===void 0?null:(0,o.jsxs)(V.h,{type:"Documentation",typeLink:jt,title:X||ot,subtitle:Q===""?void 0:Q||ot,children:[(0,o.jsx)(d.Z,{titleTemplate:"%s",children:(0,o.jsx)("title",{children:vt})}),ge,Ot,at.renderComponentsByLocation(A.o.Header)]})}},95573:function(_,P,t){"use strict";t.d(P,{Fw:function(){return d},_Z:function(){return i},pd:function(){return b}});var o=t(30283);const i=(0,o.N)({id:"techdocs:index-page"}),d=(0,o.N)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),b=(0,o.N)({id:"techdocs:catalog-reader-view"})},55511:function(_,P,t){"use strict";t.r(P),t.d(P,{TechDocsSearchResultListItem:function(){return A}});var o=t(52322),i=t(2784),d=t(79692),b=t(49378),m=t(86136),f=t(90436),l=t(98864),g=t(76079);const S=(0,d.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),A=R=>{const{result:x,highlight:C,lineClamp:E=5,asListItem:U=!0,asLink:B=!0,title:w,icon:$}=R,I=S(),p=({children:J})=>B?(0,o.jsx)(l.rU,{noTrack:!0,to:x.location,children:J}):(0,o.jsx)(o.Fragment,{children:J}),K=()=>{const J=C!=null&&C.fields.title?(0,o.jsx)(g.F,{text:C.fields.title,preTag:C.preTag,postTag:C.postTag}):x.title,H=C!=null&&C.fields.entityTitle?(0,o.jsx)(g.F,{text:C.fields.entityTitle,preTag:C.preTag,postTag:C.postTag}):x.entityTitle,G=C!=null&&C.fields.name?(0,o.jsx)(g.F,{text:C.fields.name,preTag:C.preTag,postTag:C.postTag}):x.name;return x?(0,o.jsx)(b.Z,{className:I.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,o.jsx)(p,{children:w||(0,o.jsxs)(o.Fragment,{children:[J," | ",H!=null?H:G," docs"]})}),secondary:(0,o.jsx)(f.Z,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:E,overflow:"hidden"},color:"textSecondary",variant:"body2",children:C!=null&&C.fields.text?(0,o.jsx)(g.F,{text:C.fields.text,preTag:C.preTag,postTag:C.postTag}):x.text})}):null},V=({children:J})=>U?(0,o.jsxs)(o.Fragment,{children:[$&&(0,o.jsx)(m.Z,{children:typeof $=="function"?$(x):$}),(0,o.jsx)("div",{className:I.flexContainer,children:J})]}):(0,o.jsx)(o.Fragment,{children:J});return(0,o.jsx)(V,{children:(0,o.jsx)(K,{})})}},53260:function(){}},function(_){var P=function(o){return _(_.s=o)};_.O(0,[2370,6202,9284,7012,427,242,5109,6816,1213,5218,4736],function(){return P(99329)});var t=_.O()}]);})();
|
|
486
486
|
|
|
487
|
-
//# sourceMappingURL=main.
|
|
487
|
+
//# sourceMappingURL=main.1c79ec84.js.map
|