@veecode-platform/plugin-veecode-homepage-dynamic 0.1.4 → 0.1.5
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/dist-scalprum/plugin-manifest.json +3 -3
- package/dist-scalprum/static/{5689.44adcfd6.chunk.js → 5689.ba470bd3.chunk.js} +1 -1
- package/dist-scalprum/static/{5689.44adcfd6.chunk.js.map → 5689.ba470bd3.chunk.js.map} +1 -1
- package/dist-scalprum/static/7499.53d03b96.chunk.js +2 -0
- package/dist-scalprum/static/7499.53d03b96.chunk.js.map +1 -0
- package/dist-scalprum/static/{8505.9dd864c9.chunk.js → 8505.bd5ab33a.chunk.js} +1 -1
- package/dist-scalprum/static/{8505.9dd864c9.chunk.js.map → 8505.bd5ab33a.chunk.js.map} +1 -1
- package/dist-scalprum/static/{9286.e13da971.chunk.js → 9286.0bf88601.chunk.js} +2 -2
- package/dist-scalprum/static/{9286.e13da971.chunk.js.map → 9286.0bf88601.chunk.js.map} +1 -1
- package/dist-scalprum/static/avatar.e87ac168..svg +1 -0
- package/dist-scalprum/static/exposed-PluginRoot.7c0308e7.chunk.js +2 -0
- package/dist-scalprum/static/{exposed-PluginRoot.995e7d70.chunk.js.map → exposed-PluginRoot.7c0308e7.chunk.js.map} +1 -1
- package/dist-scalprum/{veecode-platform.plugin-veecode-homepage.75421414c269ea7d1780.js → veecode-platform.plugin-veecode-homepage.f5e3396deb211e8548f4.js} +2 -2
- package/dist-scalprum/{veecode-platform.plugin-veecode-homepage.75421414c269ea7d1780.js.map → veecode-platform.plugin-veecode-homepage.f5e3396deb211e8548f4.js.map} +1 -1
- package/package.json +1 -1
- package/dist-scalprum/static/4576.e773bb92.chunk.js +0 -2
- package/dist-scalprum/static/4576.e773bb92.chunk.js.map +0 -1
- package/dist-scalprum/static/exposed-PluginRoot.995e7d70.chunk.js +0 -2
- /package/dist-scalprum/static/{9286.e13da971.chunk.js.LICENSE.txt → 9286.0bf88601.chunk.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
|
|
1
|
+
"use strict";(self.webpackChunkveecode_platform_plugin_veecode_homepage=self.webpackChunkveecode_platform_plugin_veecode_homepage||[]).push([[7499],{63561:(e,t,n)=>{n.r(t),n.d(t,{VeeCodeHomePage:()=>Oe});var i=n(31085),l=n(58837),r=n(95478),s=n(81031),o=n(46702),a=n(1659),d=n(6530),c=n(46121),h=n(13295),u=n(22097),x=n(30330),p=n(74892),g=n(42469);const v=({title:e,label:t,color:n,handleClick:l,link:r,children:s})=>{const o=(0,i.jsx)(x.A,{size:"small","aria-label":t,color:n,"aria-controls":`${t}-menu`,"aria-haspopup":"true",sx:{width:"42px",height:"42px",borderRadius:"50%"},onClick:l,children:s});return(0,i.jsx)(p.A,{title:e,children:r?(0,i.jsx)(g.Link,{to:r,children:o}):o})},m=()=>{const e=(0,u.useApi)(u.appThemeApiRef),t="dark"===(0,d.A)().palette.mode,n=t?"Select theme Light Theme":"Select theme Dark Theme",l=e.getInstalledThemes();return(0,i.jsx)(v,{title:n,handleClick:n=>{const i=t?"light":"dark";n.preventDefault(),n.stopPropagation(),l.some((e=>e.id===i))?e.setActiveThemeId(i):e.setActiveThemeId(void 0)},color:"inherit",label:"Toggle-theme",children:t?(0,i.jsx)(c.A,{}):(0,i.jsx)(h.A,{})})};var j=n(531),f=n(21085),y=n(75638),A=n(13674);const b=(e,t)=>{if(!t)return(0,i.jsx)(i.Fragment,{children:e});const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=new RegExp(`(${n})`,"i"),r=e.split(l);return(0,i.jsx)(i.Fragment,{children:r.map(((e,t)=>l.test(e)?(0,i.jsx)(A.A,{component:"span",sx:{fontWeight:"normal"},children:e},`${e}-${t}`):(0,i.jsx)(A.A,{component:"span",sx:{fontWeight:"bold"},children:e},`${e}-${t}`)))})};var w=n(53855),C=n(35648),k=n(55330);const S=({params:e,error:t,helperText:n})=>(0,i.jsx)(w.A,{...e,placeholder:"Search...",variant:"standard",error:t,helperText:n,InputProps:{...e.InputProps,disableUnderline:!0,startAdornment:(0,i.jsx)(C.A,{position:"start",children:(0,i.jsx)(k.A,{style:{color:"#ffffff"}})})},sx:{input:{color:"#CDCDCD"},button:{color:"inherit"},"& fieldset":{border:"none"}}});var z=n(71543),I=n(75202),T=n(89789),F=n(50232);const R=({option:e,query:t,result:n,renderProps:l})=>{const r="No results found"===e,s=(0,u.useAnalytics)();var a;return(0,i.jsx)(o.A,{component:r?"div":I.N_,to:null==n?void 0:n.document.location,underline:"none",sx:{width:"100%",...r?{}:{cursor:"pointer"}},children:(0,i.jsx)(T.Ay,{...l,sx:{py:1},onClick:e=>{var t,i,r;s.captureEvent("discover",null!==(i=null==n?void 0:n.document.title)&&void 0!==i?i:"",{attributes:{to:null!==(r=null==n?void 0:n.document.location)&&void 0!==r?r:"#"},value:null==n?void 0:n.rank}),null==l||null===(t=l.onClick)||void 0===t||t.call(l,e)},children:(0,i.jsx)(A.A,{sx:{color:"text.primary",flexGrow:1},children:r?e:b(e,null!==(a=null==t?void 0:t.term)&&void 0!==a?a:"")})})})},M=({option:e,index:t,options:n,query:l,results:r,renderProps:s,searchLink:a})=>{if(e===(null==l?void 0:l.term)&&t===n.length-1)return(0,i.jsxs)(o.A,{id:"all-results",children:[(0,i.jsx)(z.A,{sx:{my:.5}}),(0,i.jsx)(I.N_,{to:a,underline:"none",children:(0,i.jsx)(T.Ay,{...s,sx:{my:0},className:"allResultsOption",children:(0,i.jsxs)(o.A,{sx:{display:"flex",alignItems:"center"},children:[(0,i.jsx)(A.A,{sx:{flexGrow:1},children:"All results"}),(0,i.jsx)(F.A,{fontSize:"small"})]})})})]},"all-results");const d=r.find((t=>t.document.title===e));return(0,i.jsx)(R,{option:e,query:l,result:d,renderProps:s},t)},$=e=>{const{query:t,setSearchTerm:n}=e,l=(0,g.useNavigate)(),[s,o]=(0,r.useState)(-1),a=(0,r.useRef)(s),{setTerm:c}=(0,j.SQ)(),h=(0,d.A)(),u=(e=>{const t=(0,r.useRef)(null);return(0,r.useEffect)((()=>()=>{t.current&&clearTimeout(t.current)}),[]),(0,r.useCallback)(((...n)=>{t.current&&clearTimeout(t.current),t.current=setTimeout((()=>{e(...n)}),300)}),[e,300])})(((e,t)=>{n(t),c(t)}));return(0,r.useEffect)((()=>{a.current=s}),[s]),(0,i.jsx)(f.z1,{...e,children:({loading:e,error:n,value:r})=>{var d;const c=(null==t?void 0:t.term)&&null!==(d=null==r?void 0:r.results)&&void 0!==d?d:[];let x=[];var p;(null==t?void 0:t.term)&&0===c.length&&(x=["No results found"]),c.length>0&&(x=[...c.map((e=>e.document.title)),`${null==t?void 0:t.term}`]);const g=(v=null!==(p=null==t?void 0:t.term)&&void 0!==p?p:"",`/search?query=${encodeURIComponent(v)}`);var v,m;return(0,i.jsx)(y.A,{freeSolo:!0,options:x,loading:e,value:null!==(m=null==t?void 0:t.term)&&void 0!==m?m:"",getOptionLabel:e=>null!=e?e:"",onInputChange:u,onHighlightChange:(e,t)=>o(x.indexOf(null!=t?t:"")),componentsProps:{paper:{sx:{borderRadius:"4px",outline:"unset"}}},sx:{width:"100%",background:"dark"===h.palette.mode?"#FFFFFF10":"#CDCDCD10",'& [class*="MuiAutocomplete-clearIndicator"]':{visibility:(null==t?void 0:t.term)?"visible":"hidden"},padding:".2rem",borderRadius:"8px","&:hover":{background:"dark"===h.palette.mode?"#FFFFFF25":"#CDCDCD25"}},filterOptions:e=>e,onKeyDown:e=>{const n=a.current;if("Enter"===e.key){if(e.preventDefault(),-1===n&&(null==t?void 0:t.term))l(g);else if(-1!==n){var i,r,d;l(null!==(d=null===(r=c[s])||void 0===r||null===(i=r.document)||void 0===i?void 0:i.location)&&void 0!==d?d:g)}o(-1)}},renderInput:e=>(0,i.jsx)(S,{params:e,error:!!n,helperText:n?"Error fetching results":""}),renderOption:(e,n,{index:l})=>(0,i.jsx)(M,{option:n,index:l,options:x,query:t,results:c,renderProps:e,searchLink:g}),ListboxProps:{sx:{maxHeight:"60vh"}}})}})};var D=n(10394);const E=()=>{const[e,t]=(0,r.useState)("");return(0,i.jsx)(j.Lt,{children:(0,i.jsx)(D.A,{component:"div",sx:{width:"100%",maxWidth:"50vw"},children:(0,i.jsx)($,{query:{term:e},setSearchTerm:t})})})};var L=n(49915),O=n(94087),P=n(19277),N=n(85770),H=n(26343),W=n(37197),_=n(46423),B=n(55626),U=n(22854);const V=n.p+"static/avatar.e87ac168..svg",q=({width:e,height:t})=>{const{profile:n,loading:l}=(0,N.s)();var r;return(0,i.jsx)(i.Fragment,{children:l?(0,i.jsx)(U.A,{variant:"circular",sx:{width:e,height:t}}):(0,i.jsx)(B.A,{src:null!==(r=n.picture)&&void 0!==r?r:V,sx:{width:e,height:t,objectFit:"cover"},alt:"Profile picture"})})};var G=n(84692),J=n(27018),K=n(57368);const Q=()=>{const e=(0,u.useApi)(u.identityApiRef);return(0,i.jsxs)(o.A,{component:"div",onClick:async()=>{await e.signOut()},sx:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:[(0,i.jsx)(J.A,{children:(0,i.jsx)(K.A,{fontSize:"small"})}),"Log out"]})};var X=n(113);const Y=({handleClose:e,link:t,children:n})=>(0,i.jsx)(H.A,{onClick:e,children:(0,i.jsx)(g.Link,{to:t,children:(0,i.jsx)(o.A,{component:"div",sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",padding:".1rem 0"},children:n})})}),Z=({anchorEl:e,menuId:t,isOpen:n,handleClose:l})=>{var s,a;const c=(0,d.A)(),{displayName:h,backstageIdentity:x}=(0,N.s)(),p=(0,u.useApi)(G.v);var g;const v=null!==(g=null===(a=(0,u.useApi)(u.configApiRef).app)||void 0===a||null===(s=a.support)||void 0===s?void 0:s.url)&&void 0!==g?g:"https://github.com/orgs/veecode-platform/discussions";return(0,r.useEffect)((()=>{(async()=>{let e;try{return(null==x?void 0:x.userEntityRef)&&(e=await p.getEntityByRef(x.userEntityRef)),e}catch(e){return null}})()}),[x,p]),(0,i.jsxs)(P.A,{anchorEl:e,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},id:t,keepMounted:!0,open:n,onClose:l,slotProps:{paper:{sx:{width:250,borderRadius:2,mt:.8,mr:-.5,boxShadow:3,background:`${c.palette.background.default} !important`,border:`1px solid ${c.palette.grey[600]}`}}},children:[(0,i.jsxs)(o.A,{sx:{px:2,py:1.5,display:"flex",alignItems:"center",gap:1.5},children:[(0,i.jsx)(q,{}),(0,i.jsxs)(o.A,{children:[(0,i.jsx)(A.A,{variant:"subtitle1",children:(()=>{const e=h;return/^[^:/]+:[^/]+\/[^/]+$/.test(e)?e.charAt(e.indexOf("/")+1).toLocaleUpperCase("en-US").concat(e.substring(e.indexOf("/")+2)):e})()}),(0,i.jsx)(X.A,{size:"small",variant:"outlined",label:null==x?void 0:x.ownershipEntityRefs[0].split("/")[1]})]})]}),(0,i.jsx)(W.A,{}),(0,i.jsx)(Y,{handleClose:l,link:v,children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(_.A,{children:(0,i.jsx)(L.A,{fontSize:"small"})}),"Help"]})}),(0,i.jsx)(Y,{handleClose:l,link:"/settings",children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(_.A,{children:(0,i.jsx)(O.A,{fontSize:"small"})}),"Settings"]})}),(0,i.jsx)(W.A,{}),(0,i.jsx)(H.A,{children:(0,i.jsx)(Q,{})})]})};var ee=n(33265),te=n(52452),ne=n(47566),ie=n(87094),le=n(16294),re=n(97331),se=n.n(re);const oe=()=>{var e;const[t]=(0,r.useState)(!0),[n]=(0,r.useState)(void 0),[l]=(0,r.useState)("low"),[s]=(0,r.useState)(),{lastSignal:o}=(0,le.U)("notifications"),{error:a,value:d,retry:c,loading:h}=(0,ie.s)((e=>{const i={minimumSeverity:l};return void 0!==t&&(i.read=!t),void 0!==n&&(i.saved=n),void 0!==s&&(i.topic=s),Promise.all([e.getNotifications(i),e.getStatus(),e.getTopics(i)])}),[t,l,n,s]),u=(0,r.useMemo)((()=>se()((()=>c()),2e3)),[]);var x;const p=null!==(x=null==d||null===(e=d[1])||void 0===e?void 0:e.unread)&&void 0!==x?x:0;return(0,r.useEffect)((()=>{(null==o?void 0:o.action)&&u()}),[o,u]),(0,i.jsx)(v,{title:"Notifications",label:`Mostrar ${p} notificações não lidas`,color:"inherit",link:"/notifications",children:(0,i.jsx)(ee.A,{badgeContent:p,color:"error",invisible:h||!!a||0===p,children:h?(0,i.jsx)(ne.A,{size:20,color:"inherit"}):(0,i.jsx)(te.A,{})})})},ae=({handleOpenMenu:e})=>(0,i.jsx)(v,{title:"",label:"profile-menu",handleClick:e,color:"inherit",children:(0,i.jsx)(q,{width:"42px",height:"42px"})}),de=()=>{const e=(0,d.A)(),[t,n]=r.useState(null),l=Boolean(t);return(0,i.jsxs)(o.A,{sx:{flexGrow:1,position:"relative"},children:[(0,i.jsx)(s.A,{position:"sticky",component:"nav",style:{zIndex:e.zIndex.appBar-1},children:(0,i.jsxs)(a.A,{children:[(0,i.jsx)(E,{}),(0,i.jsx)(o.A,{sx:{flexGrow:1}}),(0,i.jsxs)(o.A,{sx:{display:{xs:"none",md:"flex",alignItems:"center",gap:".5rem"}},children:[(0,i.jsx)(oe,{}),(0,i.jsx)(m,{}),(0,i.jsx)(ae,{handleOpenMenu:e=>{n(e.currentTarget)}})]})]})}),(0,i.jsx)(Z,{anchorEl:t,menuId:"profile-menu",isOpen:l,handleClose:()=>{n(null)}})]})},ce=n.p+"static/waves.6d6cf859..svg",he=()=>{var e,t,n,l,s,a,c,h,x,p,g,v,m,j,f,y;const[b,w]=(0,r.useState)(!1),{displayName:C}=(0,N.s)(),k=(0,d.A)(),S="dark"===k.palette.mode,z=(0,u.useApi)(u.configApiRef);var I;const T=null!==(I=S?null===(l=z.app)||void 0===l||null===(n=l.branding)||void 0===n||null===(t=n.theme)||void 0===t||null===(e=t.dark)||void 0===e?void 0:e.headerColor1:null===(h=z.app)||void 0===h||null===(c=h.branding)||void 0===c||null===(a=c.theme)||void 0===a||null===(s=a.light)||void 0===s?void 0:s.headerColor1)&&void 0!==I?I:"#45556D";var F;const R=null!==(F=S?null===(v=z.app)||void 0===v||null===(g=v.branding)||void 0===g||null===(p=g.theme)||void 0===p||null===(x=p.dark)||void 0===x?void 0:x.headerColor2:null===(y=z.app)||void 0===y||null===(f=y.branding)||void 0===f||null===(j=f.theme)||void 0===j||null===(m=j.light)||void 0===m?void 0:m.headerColor2)&&void 0!==F?F:"#86F4CE";return(0,r.useEffect)((()=>{w(!0),setTimeout((()=>w(!1)),1e3)}),[]),(0,i.jsxs)(o.A,{sx:{background:`linear-gradient(90deg, ${T} 0%, ${R} 100%)`,width:"100%",minHeight:"210px",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",overflow:"hidden",[k.breakpoints.only("xs")]:{height:"auto"}},children:[(0,i.jsxs)(o.A,{sx:{width:"90%",margin:"auto",display:"flex",alignItems:"center",gap:"2rem",[k.breakpoints.only("xs")]:{flexDirection:"column",padding:"1rem 0"}},children:[(0,i.jsx)(o.A,{children:(0,i.jsx)(q,{width:"120px",height:"120px"})}),(0,i.jsxs)(o.A,{color:k.palette.grey[100],children:[(0,i.jsxs)(A.A,{variant:"h3",children:["Welcome back",b?(0,i.jsx)(U.A,{variant:"rectangular",width:130,height:60,style:{display:"inline"}}):(0,i.jsxs)(i.Fragment,{children:[", ",(()=>{const e=C;return/^[^:/]+:[^/]+\/[^/]+$/.test(e)?e.charAt(e.indexOf("/")+1).toLocaleUpperCase("en-US").concat(e.substring(e.indexOf("/")+2)):e})()," 👋"]})," "]}),(0,i.jsx)(A.A,{variant:"h6",children:"Let's get started."})]})]}),(0,i.jsx)("img",{src:ce,alt:"",style:{width:"100%",height:"250px",objectFit:"cover",position:"absolute",top:"-20%",left:"0",opacity:"0.7"}})]})};var ue=n(39240),xe=n(19996),pe=n(16454);const ge=()=>{const e=(0,d.A)();return(0,i.jsx)("svg",{height:"45px",width:"45px",version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 502.648 502.648",xmlSpace:"preserve",style:{cursor:"pointer "},children:(0,i.jsxs)("g",{children:[(0,i.jsx)("g",{children:(0,i.jsxs)("g",{children:[(0,i.jsx)("circle",{style:{fill:e.palette.grey[600]},cx:"250.399",cy:"91.549",r:"58.694"}),(0,i.jsx)("path",{style:{fill:e.palette.grey[600]},d:"M455.861,253.028l-54.703-11.411c-18.637-3.904-37.037,4.638-46.765,19.824 c-9.448-4.853-19.608-9.038-30.415-12.511v-32.529c0.022-24.612-20.126-44.738-44.651-44.738h-55.933 c-24.655,0-44.716,20.126-44.716,44.738v32.701c-10.699,3.408-20.751,7.593-30.264,12.468 c-9.728-15.251-28.15-23.857-46.809-19.953l-54.747,11.411c-24.03,5.026-39.626,28.862-34.6,52.978l13.741,65.64 c4.983,24.051,28.84,39.647,52.892,34.621l17.321-3.624c8.671,12.813,20.665,24.569,36.023,34.621 c31.989,20.967,74.247,32.529,119.092,32.529c68.617,0,127.721-27.589,154.943-67.215l17.602,3.689 c24.03,5.004,47.887-10.57,52.87-34.621l13.762-65.64C495.508,281.89,479.912,258.054,455.861,253.028z M251.305,447.381 c-40.51,0-78.475-10.203-106.797-28.862c-9.707-6.342-17.753-13.395-24.202-20.945l13.266-2.783 c24.073-5.004,39.669-28.84,34.643-52.913l-12.317-59.018c7.183-3.861,14.733-7.248,22.757-10.138v10.764 c0,24.569,20.104,44.695,44.716,44.695h55.933c24.548,0,44.652-20.147,44.652-44.695v-11.325 c8.175,2.912,15.854,6.256,22.973,10.052L334.439,341.9c-4.983,24.073,10.591,47.909,34.664,52.913l13.395,2.804 C357.52,427.191,308.101,447.381,251.305,447.381z"}),(0,i.jsx)("circle",{style:{fill:e.palette.grey[600]},cx:"443.954",cy:"168.708",r:"58.694"}),(0,i.jsx)("path",{style:{fill:e.palette.grey[600]},d:"M70.736,226.172c31.752-6.644,52.029-37.77,45.471-69.501 c-6.687-31.709-37.749-52.072-69.523-45.428c-31.709,6.622-52.072,37.727-45.428,69.458 C7.879,212.453,38.984,232.795,70.736,226.172z"})]})}),(0,i.jsx)("g",{}),(0,i.jsx)("g",{}),(0,i.jsx)("g",{}),(0,i.jsx)("g",{}),(0,i.jsx)("g",{}),(0,i.jsx)("g",{}),(0,i.jsx)("g",{}),(0,i.jsx)("g",{}),(0,i.jsx)("g",{}),(0,i.jsx)("g",{}),(0,i.jsx)("g",{}),(0,i.jsx)("g",{}),(0,i.jsx)("g",{}),(0,i.jsx)("g",{}),(0,i.jsx)("g",{})]})})},ve=()=>{const e=(0,d.A)();return(0,i.jsx)("svg",{width:"45px",height:"45px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",style:{cursor:"pointer "},children:(0,i.jsx)("path",{fill:e.palette.grey[600],"fill-rule":"evenodd",d:"M4.25 1A2.25 2.25 0 002 3.25v9.5A2.25 2.25 0 004.25 15h8.5c.69 0 1.25-.56 1.25-1.25V2.25C14 1.56 13.44 1 12.75 1h-8.5zM3.5 12.75c0 .414.336.75.75.75h8.25v-2H4.25a.75.75 0 00-.75.75v.5zm0-2.622c.235-.083.487-.128.75-.128h8.25V2.5H4.25a.75.75 0 00-.75.75v6.878z","clip-rule":"evenodd"})})},me=()=>{const e=(0,d.A)();return(0,i.jsxs)("svg",{width:"45px",height:"45px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",style:{cursor:"pointer "},children:[(0,i.jsx)("rect",{x:"0",fill:"none",width:"20",height:"20"}),(0,i.jsx)("g",{fill:e.palette.grey[600],children:(0,i.jsx)("path",{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm7.5 6.48c-.274.896-.908 1.64-1.75 2.05-.45-1.69-1.658-3.074-3.27-3.75.13-.444.41-.83.79-1.09-.43-.28-1-.42-1.34.07-.53.69 0 1.61.21 2v.14c-.555-.337-.99-.84-1.24-1.44-.966-.03-1.922.208-2.76.69-.087-.565-.032-1.142.16-1.68.733.07 1.453-.23 1.92-.8.46-.52-.13-1.18-.59-1.58h.36c1.36-.01 2.702.335 3.89 1 1.36 1.005 2.194 2.57 2.27 4.26.24 0 .7-.55.91-.92.172.34.32.69.44 1.05zM9 16.84c-2.05-2.08.25-3.75-1-5.24-.92-.85-2.29-.26-3.11-1.23-.282-1.473.267-2.982 1.43-3.93.52-.44 4-1 5.42.22.83.715 1.415 1.674 1.67 2.74.46.035.918-.066 1.32-.29.41 2.98-3.15 6.74-5.73 7.73zM5.15 2.09c.786-.3 1.676-.028 2.16.66-.42.38-.94.63-1.5.72.02-.294.085-.584.19-.86l-.85-.52z"})})]})},je=()=>{const e=(0,d.A)();return(0,i.jsxs)("svg",{width:"45px",height:"45px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",style:{cursor:"pointer "},children:[(0,i.jsx)("title",{children:"support"}),(0,i.jsx)("rect",{width:"24",height:"24",fill:"none"}),(0,i.jsx)("path",{fill:e.palette.grey[600],d:"M12,2a8,8,0,0,0-8,8v1.9A2.92,2.92,0,0,0,3,14a2.88,2.88,0,0,0,1.94,2.61C6.24,19.72,8.85,22,12,22h3V20H12c-2.26,0-4.31-1.7-5.34-4.39l-.21-.55L5.86,15A1,1,0,0,1,5,14a1,1,0,0,1,.5-.86l.5-.29V11a1,1,0,0,1,1-1H17a1,1,0,0,1,1,1v5H13.91a1.5,1.5,0,1,0-1.52,2H20a2,2,0,0,0,2-2V14a2,2,0,0,0-2-2V10A8,8,0,0,0,12,2Z"})]})},fe=n.p+"static/backstage.b1940be1..png";var ye=n(78838),Ae=n(92742),be=n(59193),we=n(12302),Ce=n(80731),ke=n(97134),Se=n(16481),ze=n(45685),Ie=n(98590),Te=n(35015);var Fe=n(61690);const Re=(0,be.Ay)("text",{shouldForwardProp:e=>"variant"!==e})((({theme:e})=>({textAnchor:"middle",dominantBaseline:"central",fill:e.palette.text.secondary,variants:[{props:{variant:"primary"},style:{fontSize:e.typography.h5.fontSize}},{props:({variant:e})=>"primary"!==e,style:{fontSize:e.typography.body2.fontSize}},{props:{variant:"primary"},style:{fontWeight:e.typography.h5.fontWeight}},{props:({variant:e})=>"primary"!==e,style:{fontWeight:e.typography.body2.fontWeight}}]})));function Me({primaryText:e,secondaryText:t}){const{width:n,height:l,left:s,top:o}=(0,Ae.N)(),a=o+l/2-10,d=a+24;return(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(Re,{variant:"primary",x:s+n/2,y:a,children:e}),(0,i.jsx)(Re,{variant:"secondary",x:s+n/2,y:d,children:t})]})}function $e(){var e,t,n,l,r,s,a,c;const{total:h,items:x,visits:p}=(()=>{const e=(0,u.useApi)(Ie.y),{value:t,loading:n,error:i}=(0,Te.A)((async()=>{const t=await e.list();return{total:t.reduce(((e,t)=>e+t.hits),0),items:t.map((e=>({label:e.name,value:e.hits}))),visits:t.map((e=>({id:e.id,name:e.name,path:e.pathname,hits:e.hits})))}}),[]);var l,r,s;return{loading:n,error:i,total:null!==(l=null==t?void 0:t.total)&&void 0!==l?l:0,items:null!==(r=null==t?void 0:t.items)&&void 0!==r?r:[],visits:null!==(s=null==t?void 0:t.visits)&&void 0!==s?s:[]}})(),g=(0,d.A)(),v="dark"===g.palette.mode,m=(0,u.useApi)(u.configApiRef);var j;const f=function(e="royalblue",t,n=70,i=30){const{h:l,s:r}=function(e){const t=document.createElement("canvas").getContext("2d");if(!t)throw new Error("Canvas not supported");t.fillStyle=e;const n=t.fillStyle.replace(/^#/,""),i=3===n.length?n.split("").map((e=>e+e)).join(""):n,l=parseInt(i,16);return function(e,t,n){const i=e/255,l=t/255,r=n/255,s=Math.max(i,l,r),o=Math.min(i,l,r),a=(s+o)/2;let d=0,c=0;if(s!==o){const e=s-o;c=a>.5?e/(2-s-o):e/(s+o),d=s===i?(l-r)/e+(l<r?6:0):s===l?(r-i)/e+2:(i-l)/e+4,d*=60}return{h:Math.round(d),s:Math.round(100*c),l:Math.round(100*a)}}(l>>16&255,l>>8&255,255&l)}(e),s=(n-i)/Math.max(t-1,1);return Array.from({length:t},((e,t)=>`hsl(${l}, ${r}%, ${n-t*s}%)`))}(null!==(j=v?null===(l=m.app)||void 0===l||null===(n=l.branding)||void 0===n||null===(t=n.theme)||void 0===t||null===(e=t.dark)||void 0===e?void 0:e.headerColor1:null===(c=m.app)||void 0===c||null===(a=c.branding)||void 0===a||null===(s=a.theme)||void 0===s||null===(r=s.light)||void 0===r?void 0:r.headerColor1)&&void 0!==j?j:"#45556D",x.length),y=e=>Number((e/(h/100)).toFixed(2));return(0,i.jsxs)(we.A,{variant:"outlined",sx:{display:"flex",flexDirection:"column",gap:"8px",flexGrow:1},children:[(0,i.jsx)(ze.A,{title:"Top Visited"}),(0,i.jsx)(W.A,{}),(0,i.jsx)(Ce.A,{children:(0,i.jsx)(o.A,{sx:{display:"flex",alignItems:"center"},children:(0,i.jsx)(ye.r,{colors:f,margin:{left:80,right:80,top:80,bottom:80},series:[{data:x,innerRadius:75,outerRadius:100,paddingAngle:0,highlightScope:{fade:"global",highlight:"item"}}],height:260,width:260,hideLegend:!0,children:(0,i.jsx)(Me,{primaryText:`${h}`,secondaryText:"Total"})})})}),(0,i.jsx)(o.A,{sx:{padding:"2rem",background:g.palette.background.default},children:p.map((e=>(0,i.jsxs)(ke.A,{direction:"row",sx:{alignItems:"center",gap:2,pb:2},children:[(0,i.jsx)(Fe.A,{}),(0,i.jsxs)(ke.A,{sx:{gap:1,flexGrow:1},children:[(0,i.jsxs)(ke.A,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center",gap:2},children:[(0,i.jsx)(A.A,{variant:"body2",sx:{fontWeight:"500"},children:e.name}),(0,i.jsxs)(A.A,{variant:"body2",sx:{color:"text.secondary"},children:[y(e.hits),"%"]})]}),(0,i.jsx)(Se.A,{variant:"determinate","aria-label":"Number of users by country",value:y(e.hits)})]})]},e.id)))})]})}const De=()=>{const e=[{url:"https://docs.platform.vee.codes/",label:"Docs",icon:(0,i.jsx)(ve,{})},{url:"https://github.com/orgs/veecode-platform/discussions",label:"Community",icon:(0,i.jsx)(ge,{})},{url:"https://platform.vee.codes/",label:"Website",icon:(0,i.jsx)(me,{})},{url:"https://veecode-suporte.freshdesk.com/support/login",label:"Support",icon:(0,i.jsx)(je,{})}];return(0,i.jsx)(j.Lt,{children:(0,i.jsx)(pe.U,{stretch:!0,children:(0,i.jsxs)(xe.Ay,{container:!0,spacing:2,justifyContent:"center",children:[(0,i.jsx)(xe.Ay,{item:!0,xs:12,children:(0,i.jsxs)(xe.Ay,{container:!0,spacing:2,children:[(0,i.jsx)(xe.Ay,{item:!0,xs:12,md:6,lg:8,children:(0,i.jsxs)(xe.Ay,{container:!0,spacing:2,justifyContent:"center",children:[(0,i.jsx)(xe.Ay,{item:!0,xs:12,md:12,lg:12,children:(0,i.jsx)(ue.bv,{})}),(0,i.jsx)(xe.Ay,{item:!0,xs:12,md:12,lg:12,children:(0,i.jsx)(ue.vA,{})}),(0,i.jsx)(xe.Ay,{item:!0,xs:12,md:12,lg:12,children:(0,i.jsx)(ue.zJ,{tools:e})})]})}),(0,i.jsx)(xe.Ay,{item:!0,xs:12,md:6,lg:4,children:(0,i.jsx)($e,{})})]})}),(0,i.jsx)(xe.Ay,{item:!0,xs:12,sx:{marginTop:"7rem"},children:(0,i.jsxs)(o.A,{sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.3em",gap:"10px"},children:[(0,i.jsx)(A.A,{sx:{fontSize:"1.2em",fontWeight:"bold"},children:"Powered by"}),(0,i.jsx)("img",{src:fe,alt:"backstage logo",style:{width:"7.5em",height:"1.5em"}})]})})]})})})};var Ee=n(82326);const Le=(0,l.A)((e=>({pageRoot:{display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default}}))),Oe=()=>{const{pageRoot:e}=Le();return(0,i.jsxs)(Ee.Y,{themeId:"home",className:e,children:[(0,i.jsx)(de,{}),(0,i.jsx)(he,{}),(0,i.jsx)(De,{})]})}}}]);
|
2
|
+
//# sourceMappingURL=7499.53d03b96.chunk.js.map
|
@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AACE,GAAAA,GAAuBA,CAAAA,MAE1B,SAACL,GAAAA,GAAIA,CAACtE,MAAI,EAACrE,GAAI,GAAIC,GAAI,GAAI6I,GAAI,G,UAC7B,SAACG,GAAAA,GAAeA,CAACd,MAAOA,YAI9B,SAACQ,GAAAA,GAAIA,CAACtE,MAAI,EAACrE,GAAI,GAAIC,GAAI,EAAG6I,GAAI,E,UAC5B,SAACI,GAAYA,CAAAA,WAKnB,SAACP,GAAAA,GAAIA,CAACtE,MAAI,EAACrE,GAAI,GAAIhQ,GAAI,CAAEmZ,UAAW,Q,UAClC,UAAC9U,EAAAA,EAAGA,CACFrE,GAAI,CACF0F,QAAS,OACTC,WAAY,SACZ0E,eAAgB,SAChBxE,SAAU,QACVgH,IAAK,Q,WAGP,SAAClK,EAAAA,EAAUA,CACT3C,GAAI,CACF6F,SAAU,QACVhD,WAAY,Q,SAEf,gBAGD,SAACsO,MAAAA,CACCxH,IAAKyP,GACLrP,IAAI,iBACJpG,MAAO,CAAE1D,MAAO,QAASC,OAAQ,sB,kBCnFjD,MAAMmZ,IAA2BC,EAAAA,EAAAA,IAAW1S,IAAU,CACpD2S,SAAU,CACR7T,QAAS,OACTwL,cAAe,SACfsI,gBAAiB5S,EAAM9F,QAAQuH,WAAWqE,aAIjC+M,GAAkB,KAC7B,MAAM,SAAEF,GAAaF,KACrB,OACE,UAACK,GAAAA,EAAIA,CAACC,QAAQ,OAAOlU,UAAW8T,E,WAC9B,SAACjK,GAAeA,CAAAA,IAChB,SAACa,GAAYA,CAAAA,IACb,SAAC+H,GAAWA,CAAAA,K","sources":["webpack://veecode-platform.plugin-veecode-homepage/./src/components/headerComponent/iconButtonComponent/IconButtonComponent.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/components/headerComponent/toggleTheme/ToggleTheme.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/utils/stringUtils.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/components/headerComponent/searchComponent/SearchInput.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/components/headerComponent/searchComponent/SearchResultItem.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/components/headerComponent/searchComponent/SearchOption.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/components/headerComponent/searchComponent/SearchBar.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/hooks/useDebouncedCallback.ts","webpack://veecode-platform.plugin-veecode-homepage/./src/components/headerComponent/searchComponent/SearchComponent.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/components/userAvatar/UserAvatar.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/components/headerComponent/logout/Logout.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/components/headerComponent/menuItems/MenuItems.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/components/headerComponent/notifications/Notifications.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/components/headerComponent/profile/Profle.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/components/headerComponent/HeaderComponent.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/components/homeGretting/HomeGretting.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/assets/Community.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/assets/Docs.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/assets/Website.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/assets/Support.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/components/homeContent/VisitedCharts.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/hooks/useVisited.ts","webpack://veecode-platform.plugin-veecode-homepage/./src/utils/generateColor.ts","webpack://veecode-platform.plugin-veecode-homepage/./src/components/homeContent/HomeContent.tsx","webpack://veecode-platform.plugin-veecode-homepage/./src/components/VeeCodeHomePage.tsx"],"sourcesContent":["import IconButton from '@mui/material/IconButton';\nimport Tooltip from '@mui/material/Tooltip';\nimport { Link } from 'react-router-dom';\nimport { ReactElement, MouseEvent } from 'react';\n\ninterface IconButtonProps {\n title: string;\n label: string;\n color: 'warning' | 'error' | 'inherit';\n handleClick?: (e: MouseEvent<HTMLButtonElement>) => void;\n link?: string;\n children: ReactElement;\n}\n\nexport const IconButtonComponent: React.FC<IconButtonProps> = ({\n title,\n label,\n color,\n handleClick,\n link,\n children,\n}) => {\n const button = (\n <IconButton\n size=\"small\"\n aria-label={label}\n color={color}\n aria-controls={`${label}-menu`}\n aria-haspopup=\"true\"\n sx={{\n width: '42px',\n height: '42px',\n borderRadius: '50%',\n }}\n onClick={handleClick}\n >\n {children}\n </IconButton>\n );\n\n return (\n <Tooltip title={title}>\n {link ? <Link to={link}>{button}</Link> : button}\n </Tooltip>\n );\n};\n","import { useTheme } from '@mui/material/styles';\nimport LightModeOutlinedIcon from '@mui/icons-material/LightModeOutlined';\nimport DarkModeOutlinedIcon from '@mui/icons-material/DarkModeOutlined';\nimport { appThemeApiRef, useApi } from '@backstage/core-plugin-api';\nimport { IconButtonComponent } from '../iconButtonComponent/IconButtonComponent';\n\nexport const ToogleTheme = () => {\n const appThemeApi = useApi(appThemeApiRef);\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n const tooltipTitle = isDarkMode\n ? 'Select theme Light Theme'\n : 'Select theme Dark Theme';\n const themeIds = appThemeApi.getInstalledThemes();\n\n const handleSetTheme = (\n e: React.MouseEvent<HTMLButtonElement, MouseEvent>,\n ) => {\n const newThemeId = isDarkMode ? 'light' : 'dark';\n e.preventDefault();\n e.stopPropagation();\n if (themeIds.some(it => it.id === newThemeId)) {\n appThemeApi.setActiveThemeId(newThemeId);\n } else {\n appThemeApi.setActiveThemeId(undefined);\n }\n };\n\n return (\n <IconButtonComponent\n title={tooltipTitle}\n handleClick={handleSetTheme}\n color=\"inherit\"\n label=\"Toggle-theme\"\n >\n {isDarkMode ? <LightModeOutlinedIcon /> : <DarkModeOutlinedIcon />}\n </IconButtonComponent>\n );\n};\n","/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Typography from '@mui/material/Typography';\n\n/**\n * Highlights the substring that matches the query term.\n * @param text The full text to render.\n * @param query The query term to highlight.\n * @returns JSX.Element with highlighted matching substring.\n */\nexport const highlightMatch = (text: string, query: string) => {\n if (!query) return <>{text}</>;\n\n const escapeRegex = (input: string) =>\n input.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n const escapedQuery = escapeRegex(query);\n\n const regex = new RegExp(`(${escapedQuery})`, 'i');\n const parts = text.split(regex);\n\n return (\n <>\n {parts.map((part, index) =>\n regex.test(part) ? (\n <Typography\n key={`${part}-${index}`}\n component=\"span\"\n sx={{ fontWeight: 'normal' }}\n >\n {part}\n </Typography>\n ) : (\n <Typography\n key={`${part}-${index}`}\n component=\"span\"\n sx={{ fontWeight: 'bold' }}\n >\n {part}\n </Typography>\n ),\n )}\n </>\n );\n};\n\nexport const createSearchLink = (searchTerm: string) => {\n return `/search?query=${encodeURIComponent(searchTerm)}`;\n};\n","/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport TextField from '@mui/material/TextField';\nimport InputAdornment from '@mui/material/InputAdornment';\nimport SearchIcon from '@mui/icons-material/Search';\n\ninterface SearchInputProps {\n params: any;\n error: boolean;\n helperText: string;\n}\n\nexport const SearchInput = ({\n params,\n error,\n helperText,\n}: SearchInputProps) => (\n <TextField\n {...params}\n placeholder=\"Search...\"\n variant=\"standard\"\n error={error}\n helperText={helperText}\n InputProps={{\n ...params.InputProps,\n disableUnderline: true,\n startAdornment: (\n <InputAdornment position=\"start\">\n <SearchIcon style={{ color: '#ffffff' }} />\n </InputAdornment>\n ),\n }}\n sx={{\n input: { color: '#CDCDCD' },\n button: { color: 'inherit' },\n '& fieldset': { border: 'none' },\n }}\n />\n);\n","/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Link } from '@backstage/core-components';\nimport ListItem from '@mui/material/ListItem';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport { highlightMatch } from '../../../utils/stringUtils';\nimport { SearchResultProps } from '@backstage/plugin-search-react';\nimport { Result, SearchDocument } from '@backstage/plugin-search-common';\nimport { useAnalytics } from '@backstage/core-plugin-api';\n\ninterface SearchResultItemProps {\n option: string;\n query: SearchResultProps['query'];\n result: Result<SearchDocument> | undefined;\n renderProps: any;\n}\n\nexport const SearchResultItem = ({\n option,\n query,\n result,\n renderProps,\n}: SearchResultItemProps) => {\n const isNoResultsFound = option === 'No results found';\n const analytics = useAnalytics();\n\n return (\n <Box\n component={isNoResultsFound ? 'div' : Link}\n to={result?.document.location}\n underline=\"none\"\n sx={{ width: '100%', ...(isNoResultsFound ? {} : { cursor: 'pointer' }) }}\n >\n <ListItem\n {...renderProps}\n sx={{ py: 1 }}\n onClick={(e: any) => {\n analytics.captureEvent('discover', result?.document.title ?? '', {\n attributes: { to: result?.document.location ?? '#' },\n value: result?.rank,\n });\n renderProps?.onClick?.(e);\n }}\n >\n <Typography sx={{ color: 'text.primary', flexGrow: 1 }}>\n {isNoResultsFound\n ? option\n : highlightMatch(option, query?.term ?? '')}\n </Typography>\n </ListItem>\n </Box>\n );\n};\n","/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@mui/material/Box';\nimport Divider from '@mui/material/Divider';\nimport { Link } from '@backstage/core-components';\nimport ListItem from '@mui/material/ListItem';\nimport Typography from '@mui/material/Typography';\nimport ArrowForwardIcon from '@mui/icons-material/ArrowForward';\nimport { SearchResultItem } from './SearchResultItem';\nimport { Result, SearchDocument } from '@backstage/plugin-search-common';\nimport { SearchResultProps } from '@backstage/plugin-search-react';\n\ninterface SearchOptionProps {\n option: string;\n index: number;\n options: string[];\n query: SearchResultProps['query'];\n results: Result<SearchDocument>[];\n renderProps: any;\n searchLink: string;\n}\n\nexport const SearchOption = ({\n option,\n index,\n options,\n query,\n results,\n renderProps,\n searchLink,\n}: SearchOptionProps) => {\n if (option === query?.term && index === options.length - 1) {\n return (\n <Box key=\"all-results\" id=\"all-results\">\n <Divider sx={{ my: 0.5 }} />\n <Link to={searchLink} underline=\"none\">\n <ListItem\n {...renderProps}\n sx={{ my: 0 }}\n className=\"allResultsOption\"\n >\n <Box sx={{ display: 'flex', alignItems: 'center' }}>\n <Typography sx={{ flexGrow: 1 }}>All results</Typography>\n <ArrowForwardIcon fontSize=\"small\" />\n </Box>\n </ListItem>\n </Link>\n </Box>\n );\n }\n\n const result = results.find(r => r.document.title === option);\n return (\n <SearchResultItem\n key={index}\n option={option}\n query={query}\n result={result}\n renderProps={renderProps}\n />\n );\n};\n","/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEffect, useRef, useState } from 'react';\nimport {\n SearchResultState,\n SearchResultProps,\n useSearch,\n} from '@backstage/plugin-search-react';\nimport Autocomplete from '@mui/material/Autocomplete';\nimport { createSearchLink } from '../../../utils/stringUtils';\nimport { useNavigate } from 'react-router-dom';\nimport { SearchInput } from './SearchInput';\nimport { SearchOption } from './SearchOption';\nimport { useDebouncedCallback } from '../../../hooks/useDebouncedCallback';\nimport { useTheme } from '@mui/material/styles';\n\ninterface SearchBarProps {\n query: SearchResultProps['query'];\n setSearchTerm: (term: string) => void;\n}\nexport const SearchBar = (props: SearchBarProps) => {\n const { query, setSearchTerm } = props;\n const navigate = useNavigate();\n const [highlightedIndex, setHighlightedIndex] = useState(-1);\n const highlightedIndexRef = useRef(highlightedIndex);\n const { setTerm } = useSearch();\n const theme = useTheme();\n\n const onInputChange = useDebouncedCallback((_, inputValue) => {\n setSearchTerm(inputValue);\n setTerm(inputValue);\n }, 300);\n\n useEffect(() => {\n highlightedIndexRef.current = highlightedIndex;\n }, [highlightedIndex]);\n\n return (\n <SearchResultState {...props}>\n {({ loading, error, value }) => {\n const results = query?.term ? value?.results ?? [] : [];\n let options: string[] = [];\n if (query?.term && results.length === 0) {\n options = ['No results found'];\n }\n if (results.length > 0) {\n options = [\n ...results.map(result => result.document.title),\n `${query?.term}`,\n ];\n }\n const searchLink = createSearchLink(query?.term ?? '');\n\n return (\n <Autocomplete\n freeSolo\n options={options}\n loading={loading}\n value={query?.term ?? ''}\n getOptionLabel={option => option ?? ''}\n onInputChange={onInputChange}\n onHighlightChange={(_, option) =>\n setHighlightedIndex(options.indexOf(option ?? ''))\n }\n componentsProps={{\n paper: {\n sx: {\n borderRadius: '4px',\n outline: 'unset',\n },\n },\n }}\n sx={{\n width: '100%',\n background:\n theme.palette.mode === 'dark' ? '#FFFFFF10' : '#CDCDCD10',\n '& [class*=\"MuiAutocomplete-clearIndicator\"]': {\n visibility: query?.term ? 'visible' : 'hidden',\n },\n padding: '.2rem',\n borderRadius: '8px',\n '&:hover': {\n background:\n theme.palette.mode === 'dark' ? '#FFFFFF25' : '#CDCDCD25',\n },\n }}\n filterOptions={x => x}\n onKeyDown={event => {\n const currentHighlight = highlightedIndexRef.current;\n if (event.key === 'Enter') {\n event.preventDefault();\n if (currentHighlight === -1 && query?.term) {\n navigate(searchLink);\n } else if (currentHighlight !== -1) {\n navigate(\n results[highlightedIndex]?.document?.location ?? searchLink,\n );\n }\n setHighlightedIndex(-1);\n }\n }}\n renderInput={params => (\n <SearchInput\n params={params}\n error={!!error}\n helperText={error ? 'Error fetching results' : ''}\n />\n )}\n renderOption={(renderProps, option, { index }) => (\n <SearchOption\n option={option}\n index={index}\n options={options}\n query={query}\n results={results}\n renderProps={renderProps}\n searchLink={searchLink}\n />\n )}\n ListboxProps={{\n sx: { maxHeight: '60vh' },\n }}\n />\n );\n }}\n </SearchResultState>\n );\n};\n","/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useRef, useEffect, useCallback } from 'react';\n\nexport const useDebouncedCallback = <T extends (...args: any[]) => void>(\n callback: T,\n delay: number,\n) => {\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n };\n }, []);\n\n return useCallback(\n (...args: Parameters<T>) => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n timeoutRef.current = setTimeout(() => {\n callback(...args);\n }, delay);\n },\n [callback, delay],\n );\n};\n","/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SearchContextProvider } from '@backstage/plugin-search-react';\nimport { useState } from 'react';\nimport { SearchBar } from './SearchBar';\nimport { Box } from '@material-ui/core';\n\nexport const SearchComponent = () => {\n const [searchTerm, setSearchTerm] = useState<string>('');\n\n return (\n <SearchContextProvider>\n <Box component=\"div\" sx={{ width: '100%', maxWidth: '50vw' }}>\n <SearchBar query={{ term: searchTerm }} setSearchTerm={setSearchTerm} />\n </Box>\n </SearchContextProvider>\n );\n};\n","/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useUserProfile } from '@backstage/plugin-user-settings';\nimport Avatar from '@mui/material/Avatar';\nimport Skeleton from '@mui/material/Skeleton';\nimport AvatarImg from '../../assets/avatar.svg';\n\ninterface UserAvatarProps {\n width?: string;\n height?: string;\n}\n\nexport const UserAvatar: React.FC<UserAvatarProps> = ({ width, height }) => {\n const { profile, loading: profileLoading } = useUserProfile();\n\n return (\n <>\n {profileLoading ? (\n <Skeleton variant=\"circular\" sx={{ width, height }} />\n ) : (\n <Avatar\n src={profile.picture ?? AvatarImg}\n sx={{ width, height, objectFit: 'cover' }}\n alt=\"Profile picture\"\n />\n )}\n </>\n );\n};\n","import { identityApiRef, useApi } from '@backstage/core-plugin-api';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport LogoutIcon from '@mui/icons-material/Logout';\nimport Box from '@mui/material/Box';\n\nexport const Logout = () => {\n const identityApi = useApi(identityApiRef);\n\n return (\n <Box\n component=\"div\"\n onClick={async () => {\n await identityApi.signOut();\n }}\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n }}\n >\n <ListItemIcon>\n <LogoutIcon fontSize=\"small\" />\n </ListItemIcon>\n Log out\n </Box>\n );\n};\n","import { ReactElement, useEffect } from 'react';\nimport HelpOutlineIcon from '@mui/icons-material/HelpOutline';\nimport SettingsIcon from '@mui/icons-material/Settings';\nimport Menu from '@mui/material/Menu';\nimport Box from '@mui/material/Box';\nimport { useUserProfile } from '@backstage/plugin-user-settings';\nimport Typography from '@mui/material/Typography';\nimport { Divider, ListItemIcon, MenuItem } from '@material-ui/core';\nimport { UserAvatar } from '../../userAvatar/UserAvatar';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport { configApiRef } from '@backstage/core-plugin-api';\nimport { UserEntity } from '@backstage/catalog-model';\nimport { Link } from 'react-router-dom';\nimport { Logout } from '../logout/Logout';\nimport Chip from '@mui/material/Chip';\nimport { useTheme } from '@mui/material/styles';\n\ninterface MenuItemsProps {\n anchorEl: HTMLElement | null;\n menuId: string;\n isOpen: boolean;\n handleClose: () => void;\n}\n\ninterface MenuItemProps {\n handleClose: () => void;\n link: string;\n children: ReactElement;\n}\n\nconst MenuItemComponent: React.FC<MenuItemProps> = ({\n handleClose,\n link,\n children,\n}) => {\n return (\n <MenuItem onClick={handleClose}>\n <Link to={link}>\n <Box\n component=\"div\"\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n padding: '.1rem 0',\n }}\n >\n {children}\n </Box>\n </Link>\n </MenuItem>\n );\n};\n\nexport const MenuItems: React.FC<MenuItemsProps> = ({\n anchorEl,\n menuId,\n isOpen,\n handleClose,\n}) => {\n const theme = useTheme();\n const { displayName, backstageIdentity } = useUserProfile();\n const catalogApi = useApi(catalogApiRef);\n const config = useApi(configApiRef);\n const supportUrl =\n config.app?.support?.url ??\n // config.getOptionalString('app.support.url') ??\n 'https://github.com/orgs/veecode-platform/discussions';\n\n useEffect(() => {\n const fetchUserEntity = async () => {\n let userProfile;\n try {\n if (backstageIdentity?.userEntityRef) {\n userProfile = (await catalogApi.getEntityByRef(\n backstageIdentity.userEntityRef,\n )) as unknown as UserEntity;\n }\n return userProfile;\n } catch (_err) {\n return null;\n }\n };\n\n fetchUserEntity();\n }, [backstageIdentity, catalogApi]);\n\n const profileDisplayName = () => {\n const name = displayName;\n const regex = /^[^:/]+:[^/]+\\/[^/]+$/;\n if (regex.test(name)) {\n return name\n .charAt(name.indexOf('/') + 1)\n .toLocaleUpperCase('en-US')\n .concat(name.substring(name.indexOf('/') + 2));\n }\n return name;\n };\n\n return (\n <Menu\n anchorEl={anchorEl}\n anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}\n transformOrigin={{ vertical: 'top', horizontal: 'right' }}\n id={menuId}\n keepMounted\n open={isOpen}\n onClose={handleClose}\n slotProps={{\n paper: {\n sx: {\n width: 250,\n borderRadius: 2,\n mt: 0.8,\n mr: -0.5,\n boxShadow: 3,\n background: `${theme.palette.background.default} !important`,\n border: `1px solid ${theme.palette.grey[600]}`,\n },\n },\n }}\n >\n {/* Profile */}\n <Box\n sx={{ px: 2, py: 1.5, display: 'flex', alignItems: 'center', gap: 1.5 }}\n >\n <UserAvatar />\n <Box>\n <Typography variant=\"subtitle1\">{profileDisplayName()}</Typography>\n <Chip\n size=\"small\"\n variant=\"outlined\"\n label={backstageIdentity?.ownershipEntityRefs[0].split('/')[1]}\n />\n </Box>\n </Box>\n\n <Divider />\n\n {/* Support */}\n <MenuItemComponent handleClose={handleClose} link={supportUrl}>\n <>\n <ListItemIcon>\n <HelpOutlineIcon fontSize=\"small\" />\n </ListItemIcon>\n Help\n </>\n </MenuItemComponent>\n {/* Settings */}\n <MenuItemComponent handleClose={handleClose} link=\"/settings\">\n <>\n <ListItemIcon>\n <SettingsIcon fontSize=\"small\" />\n </ListItemIcon>\n Settings\n </>\n </MenuItemComponent>\n <Divider />\n\n {/* Logout */}\n <MenuItem>\n <Logout />\n </MenuItem>\n </Menu>\n );\n};\n","/* eslint-disable no-restricted-syntax */\nimport { useState, useEffect, useMemo } from 'react';\nimport Badge from '@mui/material/Badge';\nimport NotificationsIcon from '@mui/icons-material/Notifications';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport {\n GetNotificationsOptions,\n GetNotificationsResponse,\n GetTopicsResponse,\n useNotificationsApi,\n} from '@backstage/plugin-notifications';\nimport {\n NotificationSeverity,\n NotificationStatus,\n} from '@backstage/plugin-notifications-common';\nimport { useSignal } from '@backstage/plugin-signals-react';\nimport throttle from 'lodash/throttle';\nimport { IconButtonComponent } from '../iconButtonComponent/IconButtonComponent';\n\nconst ThrottleDelayMs = 2000;\n\nexport const Notifications = () => {\n const [unreadOnly] = useState<boolean | undefined>(true);\n const [saved] = useState<boolean | undefined>(undefined);\n const [severity] = useState<NotificationSeverity>('low');\n const [topic] = useState<string>();\n\n const { lastSignal } = useSignal('notifications');\n\n const { error, value, retry, loading } = useNotificationsApi<\n [GetNotificationsResponse, NotificationStatus, GetTopicsResponse]\n >(\n api => {\n const options: GetNotificationsOptions = {\n minimumSeverity: severity,\n };\n\n if (unreadOnly !== undefined) {\n options.read = !unreadOnly;\n }\n if (saved !== undefined) {\n options.saved = saved;\n }\n if (topic !== undefined) {\n options.topic = topic;\n }\n\n return Promise.all([\n api.getNotifications(options),\n api.getStatus(),\n api.getTopics(options),\n ]);\n },\n [unreadOnly, severity, saved, topic],\n );\n\n const throttledRetry = useMemo(\n () => throttle(() => retry(), ThrottleDelayMs),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n const totalCount = value?.[1]?.unread ?? 0;\n\n useEffect(() => {\n if (lastSignal?.action) {\n throttledRetry();\n }\n }, [lastSignal, throttledRetry]);\n\n return (\n <IconButtonComponent\n title=\"Notifications\"\n label={`Mostrar ${totalCount} notificações não lidas`}\n color=\"inherit\"\n link=\"/notifications\"\n >\n <Badge\n badgeContent={totalCount}\n color=\"error\"\n invisible={loading || !!error || totalCount === 0}\n >\n {loading ? (\n <CircularProgress size={20} color=\"inherit\" />\n ) : (\n <NotificationsIcon />\n )}\n </Badge>\n </IconButtonComponent>\n );\n};\n","import { IconButtonComponent } from '../iconButtonComponent/IconButtonComponent';\nimport { UserAvatar } from '../../userAvatar/UserAvatar';\n\ninterface ProfileProps {\n handleOpenMenu: (event: React.MouseEvent<HTMLElement>) => void;\n}\n\nexport const Profile: React.FC<ProfileProps> = ({ handleOpenMenu }) => {\n return (\n <IconButtonComponent\n title=\"\"\n label=\"profile-menu\"\n handleClick={handleOpenMenu}\n color=\"inherit\"\n >\n <UserAvatar width=\"42px\" height=\"42px\" />\n </IconButtonComponent>\n );\n};\n","// eslint-disable-next-line no-restricted-syntax\nimport * as React from 'react';\nimport AppBar from '@mui/material/AppBar';\nimport Box from '@mui/material/Box';\nimport Toolbar from '@mui/material/Toolbar';\nimport { ToogleTheme } from './toggleTheme/ToggleTheme';\nimport { SearchComponent } from './searchComponent/SearchComponent';\nimport { MenuItems } from './menuItems/MenuItems';\nimport { Notifications } from './notifications/Notifications';\nimport { Profile } from './profile/Profle';\nimport { useTheme } from '@mui/material/styles';\n\nexport const HeaderComponent = () => {\n const theme = useTheme();\n const [profileAnchorEl, setProfileAnchorEl] =\n React.useState<null | HTMLElement>(null);\n\n const isProfileMenuOpen = Boolean(profileAnchorEl);\n\n const handleProfileMenuOpen = (event: React.MouseEvent<HTMLElement>) => {\n setProfileAnchorEl(event.currentTarget);\n };\n\n const handleProfileMenuClose = () => {\n setProfileAnchorEl(null);\n };\n\n return (\n <Box sx={{ flexGrow: 1, position: 'relative' }}>\n <AppBar\n position=\"sticky\"\n component=\"nav\"\n style={{ zIndex: theme.zIndex.appBar - 1 }}\n >\n <Toolbar>\n <SearchComponent />\n <Box sx={{ flexGrow: 1 }} />\n <Box\n sx={{\n display: {\n xs: 'none',\n md: 'flex',\n alignItems: 'center',\n gap: '.5rem',\n },\n }}\n >\n <Notifications />\n <ToogleTheme />\n <Profile handleOpenMenu={handleProfileMenuOpen} />\n </Box>\n </Toolbar>\n </AppBar>\n\n {/* Profile options */}\n <MenuItems\n anchorEl={profileAnchorEl}\n menuId=\"profile-menu\"\n isOpen={isProfileMenuOpen}\n handleClose={handleProfileMenuClose}\n />\n </Box>\n );\n};\n","import Box from '@mui/material/Box';\nimport { useTheme } from '@mui/material/styles';\nimport { UserAvatar } from '../userAvatar/UserAvatar';\nimport Typography from '@mui/material/Typography';\nimport { useApi, configApiRef } from '@backstage/core-plugin-api';\nimport { useUserProfile } from '@backstage/plugin-user-settings';\nimport Skeleton from '@mui/material/Skeleton';\nimport { useEffect, useState } from 'react';\nimport WavesImg from '../../assets/waves.svg';\n\nexport const HomeGreeting = () => {\n const [loading, setLoading] = useState<boolean>(false);\n const { displayName } = useUserProfile();\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n const configApi = useApi(configApiRef);\n const color1 =\n (isDarkMode\n ? configApi.app?.branding?.theme?.dark?.headerColor1\n : // ? configApi.getOptionalString('app.branding.theme.dark.headerColo1')\n // : configApi.getOptionalString('app.branding.theme.light.headerColo1')) ??\n configApi.app?.branding?.theme?.light?.headerColor1) ?? '#45556D';\n const color2 =\n (isDarkMode\n ? configApi.app?.branding?.theme?.dark?.headerColor2\n : // ? configApi.getOptionalString('app.branding.theme.dark.headerColo2')\n // : configApi.getOptionalString('app.branding.theme.light.headerColo2')) ??\n configApi.app?.branding?.theme?.light?.headerColor2) ?? '#86F4CE';\n\n const profileDisplayName = () => {\n const name = displayName;\n const regex = /^[^:/]+:[^/]+\\/[^/]+$/;\n if (regex.test(name)) {\n return name\n .charAt(name.indexOf('/') + 1)\n .toLocaleUpperCase('en-US')\n .concat(name.substring(name.indexOf('/') + 2));\n }\n return name;\n };\n\n useEffect(() => {\n setLoading(true);\n setTimeout(() => setLoading(false), 1000);\n }, []);\n\n return (\n <Box\n sx={{\n background: `linear-gradient(90deg, ${color1} 0%, ${color2} 100%)`,\n width: '100%',\n minHeight: '210px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n overflow: 'hidden',\n [theme.breakpoints.only('xs')]: {\n height: 'auto',\n },\n }}\n >\n <Box\n sx={{\n width: '90%',\n margin: 'auto',\n display: 'flex',\n alignItems: 'center',\n gap: '2rem',\n [theme.breakpoints.only('xs')]: {\n flexDirection: 'column',\n padding: '1rem 0',\n },\n }}\n >\n <Box>\n <UserAvatar width=\"120px\" height=\"120px\" />\n </Box>\n <Box color={theme.palette.grey[100]}>\n <Typography variant=\"h3\">\n Welcome back\n {loading ? (\n <Skeleton\n variant=\"rectangular\"\n width={130}\n height={60}\n style={{ display: 'inline' }}\n />\n ) : (\n <>, {profileDisplayName()} 👋</>\n )}{' '}\n </Typography>\n <Typography variant=\"h6\">Let's get started.</Typography>\n </Box>\n </Box>\n <img\n src={WavesImg}\n alt=\"\"\n style={{\n width: '100%',\n height: '250px',\n objectFit: 'cover',\n position: 'absolute',\n top: '-20%',\n left: '0',\n opacity: '0.7',\n }}\n />\n </Box>\n );\n};\n","import { useTheme } from '@mui/material/styles';\n\nconst Communitylogo = () => {\n const theme = useTheme();\n return (\n <svg\n height=\"45px\"\n width=\"45px\"\n version=\"1.1\"\n id=\"Capa_1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 0 502.648 502.648\"\n xmlSpace=\"preserve\"\n style={{ cursor: 'pointer ' }}\n >\n <g>\n <g>\n <g>\n <circle\n style={{ fill: theme.palette.grey[600] }}\n cx=\"250.399\"\n cy=\"91.549\"\n r=\"58.694\"\n />\n <path\n style={{ fill: theme.palette.grey[600] }}\n d=\"M455.861,253.028l-54.703-11.411c-18.637-3.904-37.037,4.638-46.765,19.824\n\t\t\t\tc-9.448-4.853-19.608-9.038-30.415-12.511v-32.529c0.022-24.612-20.126-44.738-44.651-44.738h-55.933\n\t\t\t\tc-24.655,0-44.716,20.126-44.716,44.738v32.701c-10.699,3.408-20.751,7.593-30.264,12.468\n\t\t\t\tc-9.728-15.251-28.15-23.857-46.809-19.953l-54.747,11.411c-24.03,5.026-39.626,28.862-34.6,52.978l13.741,65.64\n\t\t\t\tc4.983,24.051,28.84,39.647,52.892,34.621l17.321-3.624c8.671,12.813,20.665,24.569,36.023,34.621\n\t\t\t\tc31.989,20.967,74.247,32.529,119.092,32.529c68.617,0,127.721-27.589,154.943-67.215l17.602,3.689\n\t\t\t\tc24.03,5.004,47.887-10.57,52.87-34.621l13.762-65.64C495.508,281.89,479.912,258.054,455.861,253.028z M251.305,447.381\n\t\t\t\tc-40.51,0-78.475-10.203-106.797-28.862c-9.707-6.342-17.753-13.395-24.202-20.945l13.266-2.783\n\t\t\t\tc24.073-5.004,39.669-28.84,34.643-52.913l-12.317-59.018c7.183-3.861,14.733-7.248,22.757-10.138v10.764\n\t\t\t\tc0,24.569,20.104,44.695,44.716,44.695h55.933c24.548,0,44.652-20.147,44.652-44.695v-11.325\n\t\t\t\tc8.175,2.912,15.854,6.256,22.973,10.052L334.439,341.9c-4.983,24.073,10.591,47.909,34.664,52.913l13.395,2.804\n\t\t\t\tC357.52,427.191,308.101,447.381,251.305,447.381z\"\n />\n <circle\n style={{ fill: theme.palette.grey[600] }}\n cx=\"443.954\"\n cy=\"168.708\"\n r=\"58.694\"\n />\n <path\n style={{ fill: theme.palette.grey[600] }}\n d=\"M70.736,226.172c31.752-6.644,52.029-37.77,45.471-69.501\n\t\t\t\tc-6.687-31.709-37.749-52.072-69.523-45.428c-31.709,6.622-52.072,37.727-45.428,69.458\n\t\t\t\tC7.879,212.453,38.984,232.795,70.736,226.172z\"\n />\n </g>\n </g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n </g>\n </svg>\n );\n};\n\nexport default Communitylogo;\n","import { useTheme } from '@mui/material/styles';\n\nconst DocsLogo = () => {\n const theme = useTheme();\n return (\n <svg\n width=\"45px\"\n height=\"45px\"\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n style={{ cursor: 'pointer ' }}\n >\n <path\n fill={theme.palette.grey[600]}\n fill-rule=\"evenodd\"\n d=\"M4.25 1A2.25 2.25 0 002 3.25v9.5A2.25 2.25 0 004.25 15h8.5c.69 0 1.25-.56 1.25-1.25V2.25C14 1.56 13.44 1 12.75 1h-8.5zM3.5 12.75c0 .414.336.75.75.75h8.25v-2H4.25a.75.75 0 00-.75.75v.5zm0-2.622c.235-.083.487-.128.75-.128h8.25V2.5H4.25a.75.75 0 00-.75.75v6.878z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n );\n};\n\nexport default DocsLogo;\n","import { useTheme } from '@mui/material/styles';\n\nconst WebsiteLogo = () => {\n const theme = useTheme();\n return (\n <svg\n width=\"45px\"\n height=\"45px\"\n viewBox=\"0 0 20 20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ cursor: 'pointer ' }}\n >\n <rect x=\"0\" fill=\"none\" width=\"20\" height=\"20\" />\n\n <g fill={theme.palette.grey[600]}>\n <path d=\"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm7.5 6.48c-.274.896-.908 1.64-1.75 2.05-.45-1.69-1.658-3.074-3.27-3.75.13-.444.41-.83.79-1.09-.43-.28-1-.42-1.34.07-.53.69 0 1.61.21 2v.14c-.555-.337-.99-.84-1.24-1.44-.966-.03-1.922.208-2.76.69-.087-.565-.032-1.142.16-1.68.733.07 1.453-.23 1.92-.8.46-.52-.13-1.18-.59-1.58h.36c1.36-.01 2.702.335 3.89 1 1.36 1.005 2.194 2.57 2.27 4.26.24 0 .7-.55.91-.92.172.34.32.69.44 1.05zM9 16.84c-2.05-2.08.25-3.75-1-5.24-.92-.85-2.29-.26-3.11-1.23-.282-1.473.267-2.982 1.43-3.93.52-.44 4-1 5.42.22.83.715 1.415 1.674 1.67 2.74.46.035.918-.066 1.32-.29.41 2.98-3.15 6.74-5.73 7.73zM5.15 2.09c.786-.3 1.676-.028 2.16.66-.42.38-.94.63-1.5.72.02-.294.085-.584.19-.86l-.85-.52z\" />\n </g>\n </svg>\n );\n};\n\nexport default WebsiteLogo;\n","import { useTheme } from '@mui/material/styles';\n\nconst SupportLogo = () => {\n const theme = useTheme();\n return (\n <svg\n width=\"45px\"\n height=\"45px\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ cursor: 'pointer ' }}\n >\n <title>support</title>\n <rect width=\"24\" height=\"24\" fill=\"none\" />\n <path\n fill={theme.palette.grey[600]}\n d=\"M12,2a8,8,0,0,0-8,8v1.9A2.92,2.92,0,0,0,3,14a2.88,2.88,0,0,0,1.94,2.61C6.24,19.72,8.85,22,12,22h3V20H12c-2.26,0-4.31-1.7-5.34-4.39l-.21-.55L5.86,15A1,1,0,0,1,5,14a1,1,0,0,1,.5-.86l.5-.29V11a1,1,0,0,1,1-1H17a1,1,0,0,1,1,1v5H13.91a1.5,1.5,0,1,0-1.52,2H20a2,2,0,0,0,2-2V14a2,2,0,0,0-2-2V10A8,8,0,0,0,12,2Z\"\n />\n </svg>\n );\n};\n\nexport default SupportLogo;\n","// eslint-disable-next-line no-restricted-syntax\nimport * as React from 'react';\nimport { PieChart } from '@mui/x-charts/PieChart';\nimport { useDrawingArea } from '@mui/x-charts/hooks';\nimport { styled, useTheme } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport Card from '@mui/material/Card';\nimport CardContent from '@mui/material/CardContent';\nimport Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\nimport LinearProgress from '@mui/material/LinearProgress';\nimport { CardHeader, Divider } from '@material-ui/core';\nimport { useApi, configApiRef } from '@backstage/core-plugin-api';\nimport { useVisited } from '../../hooks/useVisited';\nimport { generateColorVariants } from '../../utils/generateColor';\nimport TurnedInNotIcon from '@mui/icons-material/TurnedInNot';\n\ninterface StyledTextProps {\n variant: 'primary' | 'secondary';\n}\n\nconst StyledText = styled('text', {\n shouldForwardProp: prop => prop !== 'variant',\n})<StyledTextProps>(({ theme }) => ({\n textAnchor: 'middle',\n dominantBaseline: 'central',\n fill: theme.palette.text.secondary,\n variants: [\n {\n props: {\n variant: 'primary',\n },\n style: {\n fontSize: theme.typography.h5.fontSize,\n },\n },\n {\n props: ({ variant }) => variant !== 'primary',\n style: {\n fontSize: theme.typography.body2.fontSize,\n },\n },\n {\n props: {\n variant: 'primary',\n },\n style: {\n fontWeight: theme.typography.h5.fontWeight,\n },\n },\n {\n props: ({ variant }) => variant !== 'primary',\n style: {\n fontWeight: theme.typography.body2.fontWeight,\n },\n },\n ],\n}));\n\ninterface PieCenterLabelProps {\n primaryText: string;\n secondaryText: string;\n}\n\nfunction PieCenterLabel({ primaryText, secondaryText }: PieCenterLabelProps) {\n const { width, height, left, top } = useDrawingArea();\n const primaryY = top + height / 2 - 10;\n const secondaryY = primaryY + 24;\n\n return (\n <React.Fragment>\n <StyledText variant=\"primary\" x={left + width / 2} y={primaryY}>\n {primaryText}\n </StyledText>\n <StyledText variant=\"secondary\" x={left + width / 2} y={secondaryY}>\n {secondaryText}\n </StyledText>\n </React.Fragment>\n );\n}\n\nexport default function VisitedCharts() {\n const { total, items, visits } = useVisited();\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n const configApi = useApi(configApiRef);\n const color =\n (isDarkMode\n ? configApi.app?.branding?.theme?.dark?.headerColor1\n : // ? configApi.getOptionalString('app.branding.theme.dark.headerColo1')\n // : configApi.getOptionalString('app.branding.theme.light.headerColo1')) ??\n configApi.app?.branding?.theme?.light?.headerColor1) ?? '#45556D';\n const colors = generateColorVariants(color, items.length);\n const calculatePercent = (value: number) => {\n const percent = value / (total / 100);\n return Number(percent.toFixed(2));\n };\n\n return (\n <Card\n variant=\"outlined\"\n sx={{ display: 'flex', flexDirection: 'column', gap: '8px', flexGrow: 1 }}\n >\n <CardHeader title=\"Top Visited\" />\n <Divider />\n <CardContent>\n <Box sx={{ display: 'flex', alignItems: 'center' }}>\n <PieChart\n colors={colors}\n margin={{\n left: 80,\n right: 80,\n top: 80,\n bottom: 80,\n }}\n series={[\n {\n data: items,\n innerRadius: 75,\n outerRadius: 100,\n paddingAngle: 0,\n highlightScope: { fade: 'global', highlight: 'item' },\n },\n ]}\n height={260}\n width={260}\n hideLegend\n >\n <PieCenterLabel primaryText={`${total}`} secondaryText=\"Total\" />\n </PieChart>\n </Box>\n </CardContent>\n <Box\n sx={{ padding: '2rem', background: theme.palette.background.default }}\n >\n {visits.map(visit => (\n <Stack\n key={visit.id}\n direction=\"row\"\n sx={{ alignItems: 'center', gap: 2, pb: 2 }}\n >\n <TurnedInNotIcon />\n <Stack sx={{ gap: 1, flexGrow: 1 }}>\n <Stack\n direction=\"row\"\n sx={{\n justifyContent: 'space-between',\n alignItems: 'center',\n gap: 2,\n }}\n >\n <Typography variant=\"body2\" sx={{ fontWeight: '500' }}>\n {visit.name}\n </Typography>\n <Typography variant=\"body2\" sx={{ color: 'text.secondary' }}>\n {calculatePercent(visit.hits)}%\n </Typography>\n </Stack>\n <LinearProgress\n variant=\"determinate\"\n aria-label=\"Number of users by country\"\n value={calculatePercent(visit.hits)}\n />\n </Stack>\n </Stack>\n ))}\n </Box>\n </Card>\n );\n}\n","import { useApi } from '@backstage/core-plugin-api';\nimport { Visit, visitsApiRef } from '@backstage/plugin-home';\nimport useAsync from 'react-use/esm/useAsync';\n\ntype VisitItem = {\n label: string;\n value: number;\n};\n\ntype VisitData = {\n id: string;\n name: string;\n path: string;\n hits: number;\n};\n\ninterface VisitType {\n total: number;\n items: VisitItem[];\n visits: VisitData[];\n}\n\nexport const useVisited = () => {\n const useVisitedApi = useApi(visitsApiRef);\n\n const { value, loading, error } = useAsync(async (): Promise<VisitType> => {\n const data = (await useVisitedApi.list()) as Visit[];\n const total = data.reduce((acc, item) => acc + item.hits, 0);\n const items = data.map(visit => ({\n label: visit.name,\n value: visit.hits,\n }));\n const visits = data.map(visit => ({\n id: visit.id,\n name: visit.name,\n path: visit.pathname,\n hits: visit.hits,\n }));\n return {\n total,\n items,\n visits,\n };\n }, []);\n\n return {\n loading,\n error,\n total: value?.total ?? 0,\n items: value?.items ?? [],\n visits: value?.visits ?? [],\n };\n};\n","function rgbToHsl(\n rInput: number,\n gInput: number,\n bInput: number,\n): { h: number; s: number; l: number } {\n const r = rInput / 255;\n const g = gInput / 255;\n const b = bInput / 255;\n\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const l = (max + min) / 2;\n let h = 0;\n let s = 0;\n\n if (max !== min) {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n if (max === r) {\n h = (g - b) / d + (g < b ? 6 : 0);\n } else if (max === g) {\n h = (b - r) / d + 2;\n } else {\n h = (r - g) / d + 4;\n }\n\n h *= 60;\n }\n\n return {\n h: Math.round(h),\n s: Math.round(s * 100),\n l: Math.round(l * 100),\n };\n}\n\nexport function parseToHSL(color: string): { h: number; s: number; l: number } {\n const ctx = document.createElement('canvas').getContext('2d');\n if (!ctx) throw new Error('Canvas not supported');\n\n // forces the browser to resolve the color\n ctx.fillStyle = color;\n const resolved = ctx.fillStyle; // will be a hex color like \"#rrggbb\"\n\n const hex = resolved.replace(/^#/, '');\n const normalizedHex =\n hex.length === 3\n ? hex\n .split('')\n .map(c => c + c)\n .join('')\n : hex;\n\n const bigint = parseInt(normalizedHex, 16);\n const r = (bigint >> 16) & 255;\n const g = (bigint >> 8) & 255;\n const b = bigint & 255;\n\n return rgbToHsl(r, g, b);\n}\n\nexport function generateColorVariants(\n inputColor: string = 'royalblue',\n count: number,\n startLightness = 70,\n endLightness = 30,\n): string[] {\n const { h, s } = parseToHSL(inputColor);\n const step = (startLightness - endLightness) / Math.max(count - 1, 1);\n\n return Array.from({ length: count }, (_, i) => {\n const l = startLightness - i * step;\n return `hsl(${h}, ${s}%, ${l}%)`;\n });\n}\n","/* eslint-disable no-restricted-syntax */\nimport {\n HomePageStarredEntities,\n HomePageToolkit,\n HomePageRecentlyVisited,\n} from '@backstage/plugin-home';\nimport Grid from '@mui/material/Grid';\nimport { SearchContextProvider } from '@backstage/plugin-search-react';\nimport { Content } from '@backstage/core-components';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport Communitylogo from '../../assets/Community';\nimport DocsLogo from '../../assets/Docs';\nimport WebsiteLogo from '../../assets/Website';\nimport SupportLogo from '../../assets/Support';\nimport BackstageLogo from '../../assets/backstage.png';\nimport PieAnimation from './VisitedCharts';\n\nexport const HomeContent = () => {\n const tools = [\n {\n url: 'https://docs.platform.vee.codes/',\n label: 'Docs',\n icon: <DocsLogo />,\n },\n {\n url: 'https://github.com/orgs/veecode-platform/discussions',\n label: 'Community',\n icon: <Communitylogo />,\n },\n {\n url: 'https://platform.vee.codes/',\n label: 'Website',\n icon: <WebsiteLogo />,\n },\n {\n url: 'https://veecode-suporte.freshdesk.com/support/login',\n label: 'Support',\n icon: <SupportLogo />,\n },\n ];\n\n return (\n <SearchContextProvider>\n <Content stretch>\n <Grid container spacing={2} justifyContent=\"center\">\n {/* Top & Recently Visited */}\n <Grid item xs={12}>\n <Grid container spacing={2}>\n <Grid item xs={12} md={6} lg={8}>\n <Grid container spacing={2} justifyContent=\"center\">\n <Grid item xs={12} md={12} lg={12}>\n <HomePageRecentlyVisited />\n </Grid>\n <Grid item xs={12} md={12} lg={12}>\n <HomePageStarredEntities />\n </Grid>\n <Grid item xs={12} md={12} lg={12}>\n <HomePageToolkit tools={tools} />\n </Grid>\n </Grid>\n </Grid>\n <Grid item xs={12} md={6} lg={4}>\n <PieAnimation />\n </Grid>\n </Grid>\n </Grid>\n {/* Footer */}\n <Grid item xs={12} sx={{ marginTop: '7rem' }}>\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n fontSize: '1.3em',\n gap: '10px',\n }}\n >\n <Typography\n sx={{\n fontSize: '1.2em',\n fontWeight: 'bold',\n }}\n >\n Powered by\n </Typography>\n <img\n src={BackstageLogo}\n alt=\"backstage logo\"\n style={{ width: '7.5em', height: '1.5em' }}\n />\n </Box>\n </Grid>\n </Grid>\n </Content>\n </SearchContextProvider>\n );\n};\n","import { makeStyles } from '@material-ui/core';\nimport { HeaderComponent } from './headerComponent/HeaderComponent';\nimport { HomeGreeting } from './homeGretting/HomeGretting';\nimport { HomeContent } from './homeContent/HomeContent';\nimport { Page } from '@backstage/core-components';\n\nconst useVeeCodeHomePageStyles = makeStyles(theme => ({\n pageRoot: {\n display: 'flex',\n flexDirection: 'column',\n backgroundColor: theme.palette.background.default,\n },\n}));\n\nexport const VeeCodeHomePage = () => {\n const { pageRoot } = useVeeCodeHomePageStyles();\n return (\n <Page themeId=\"home\" className={pageRoot}>\n <HeaderComponent />\n <HomeGreeting />\n <HomeContent />\n </Page>\n );\n};\n"],"names":["IconButtonComponent","title","label","color","handleClick","link","children","button","IconButton","size","aria-label","aria-controls","aria-haspopup","sx","width","height","borderRadius","onClick","Tooltip","Link","to","ToogleTheme","appThemeApi","useApi","appThemeApiRef","isDarkMode","useTheme","palette","mode","tooltipTitle","themeIds","getInstalledThemes","e","newThemeId","preventDefault","stopPropagation","some","it","id","setActiveThemeId","undefined","LightModeOutlinedIcon","DarkModeOutlinedIcon","highlightMatch","text","query","escapedQuery","replace","regex","RegExp","parts","split","map","part","index","test","Typography","component","fontWeight","SearchInput","params","error","helperText","TextField","placeholder","variant","InputProps","disableUnderline","startAdornment","InputAdornment","position","SearchIcon","style","input","border","SearchResultItem","option","result","renderProps","isNoResultsFound","analytics","useAnalytics","Box","document","location","underline","cursor","ListItem","py","captureEvent","attributes","value","rank","flexGrow","term","SearchOption","options","results","searchLink","length","Divider","my","className","display","alignItems","ArrowForwardIcon","fontSize","find","r","SearchBar","props","setSearchTerm","navigate","useNavigate","highlightedIndex","setHighlightedIndex","useState","highlightedIndexRef","useRef","setTerm","useSearch","theme","onInputChange","callback","timeoutRef","useEffect","current","clearTimeout","useCallback","args","setTimeout","useDebouncedCallback","_","inputValue","SearchResultState","loading","searchTerm","encodeURIComponent","Autocomplete","freeSolo","getOptionLabel","onHighlightChange","indexOf","componentsProps","paper","outline","background","visibility","padding","filterOptions","x","onKeyDown","event","currentHighlight","key","renderInput","renderOption","ListboxProps","maxHeight","SearchComponent","SearchContextProvider","maxWidth","UserAvatar","profile","profileLoading","useUserProfile","Skeleton","Avatar","src","picture","AvatarImg","objectFit","alt","Logout","identityApi","identityApiRef","async","signOut","justifyContent","ListItemIcon","LogoutIcon","MenuItemComponent","handleClose","MenuItem","MenuItems","anchorEl","menuId","isOpen","config","displayName","backstageIdentity","catalogApi","catalogApiRef","supportUrl","configApiRef","app","support","url","userProfile","userEntityRef","getEntityByRef","_err","fetchUserEntity","Menu","anchorOrigin","vertical","horizontal","transformOrigin","keepMounted","open","onClose","slotProps","mt","mr","boxShadow","default","grey","px","gap","name","charAt","toLocaleUpperCase","concat","substring","profileDisplayName","Chip","ownershipEntityRefs","HelpOutlineIcon","SettingsIcon","Notifications","unreadOnly","saved","severity","topic","lastSignal","useSignal","retry","useNotificationsApi","api","minimumSeverity","read","Promise","all","getNotifications","getStatus","getTopics","throttledRetry","useMemo","throttle","totalCount","unread","action","Badge","badgeContent","invisible","CircularProgress","NotificationsIcon","Profile","handleOpenMenu","HeaderComponent","profileAnchorEl","setProfileAnchorEl","React","isProfileMenuOpen","Boolean","AppBar","zIndex","appBar","Toolbar","xs","md","currentTarget","HomeGreeting","configApi","setLoading","color1","branding","dark","headerColor1","light","color2","headerColor2","minHeight","overflow","breakpoints","only","margin","flexDirection","img","WavesImg","top","left","opacity","svg","version","xmlns","xmlnsXlink","viewBox","xmlSpace","g","circle","fill","cx","cy","path","d","fill-rule","clip-rule","rect","StyledText","styled","shouldForwardProp","prop","textAnchor","dominantBaseline","secondary","variants","typography","h5","body2","PieCenterLabel","primaryText","secondaryText","useDrawingArea","primaryY","secondaryY","y","VisitedCharts","total","items","visits","useVisitedApi","visitsApiRef","useAsync","data","list","reduce","acc","item","hits","visit","pathname","useVisited","colors","inputColor","count","startLightness","endLightness","h","s","ctx","createElement","getContext","Error","fillStyle","hex","normalizedHex","c","join","bigint","parseInt","rInput","gInput","bInput","b","max","Math","min","l","round","rgbToHsl","parseToHSL","step","Array","from","i","generateColorVariants","calculatePercent","Number","toFixed","Card","CardHeader","CardContent","PieChart","right","bottom","series","innerRadius","outerRadius","paddingAngle","highlightScope","fade","highlight","hideLegend","Stack","direction","pb","TurnedInNotIcon","LinearProgress","HomeContent","tools","icon","DocsLogo","Communitylogo","WebsiteLogo","SupportLogo","Content","stretch","Grid","container","spacing","lg","HomePageRecentlyVisited","HomePageStarredEntities","HomePageToolkit","PieAnimation","marginTop","BackstageLogo","useVeeCodeHomePageStyles","makeStyles","pageRoot","backgroundColor","VeeCodeHomePage","Page","themeId"],"sourceRoot":""}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
"use strict";(self.webpackChunkveecode_platform_plugin_veecode_homepage=self.webpackChunkveecode_platform_plugin_veecode_homepage||[]).push([[8505],{50884:(e,t,n)=>{n.d(t,{m:()=>r}),n(31085),n(64218);const r=(0,n(89940).y)({id:"core.error"})},58505:(e,t,n)=>{n.r(t),n.d(t,{AnalyticsContext:()=>c,ApiBlueprint:()=>de,AppRootElementBlueprint:()=>fe,AppRootWrapperBlueprint:()=>ge,ExtensionBoundary:()=>_e,IconBundleBlueprint:()=>ye,NavItemBlueprint:()=>be,NavLogoBlueprint:()=>ke,PageBlueprint:()=>Oe,RouterBlueprint:()=>Ie,SessionState:()=>u.SessionState,SignInPageBlueprint:()=>Ne,ThemeBlueprint:()=>ze,TranslationBlueprint:()=>Ce,alertApiRef:()=>u.alertApiRef,analyticsApiRef:()=>p,appThemeApiRef:()=>u.appThemeApiRef,appTreeApiRef:()=>m,atlassianAuthApiRef:()=>u.atlassianAuthApiRef,bitbucketAuthApiRef:()=>u.bitbucketAuthApiRef,bitbucketServerAuthApiRef:()=>u.bitbucketServerAuthApiRef,componentsApiRef:()=>g,configApiRef:()=>u.configApiRef,coreComponentRefs:()=>xe,coreExtensionData:()=>le,createApiFactory:()=>u.createApiFactory,createApiRef:()=>u.createApiRef,createComponentExtension:()=>De,createComponentRef:()=>we,createExtension:()=>ce,createExtensionBlueprint:()=>ue,createExtensionDataRef:()=>te,createExtensionInput:()=>pt,createExternalRouteRef:()=>Xe,createFrontendFeatureLoader:()=>gt,createFrontendModule:()=>mt,createFrontendPlugin:()=>ft,createRouteRef:()=>Ge,createSubRouteRef:()=>He,createTranslationMessages:()=>tt,createTranslationRef:()=>at,createTranslationResource:()=>nt,dialogApiRef:()=>v,discoveryApiRef:()=>u.discoveryApiRef,errorApiRef:()=>u.errorApiRef,featureFlagsApiRef:()=>u.featureFlagsApiRef,fetchApiRef:()=>u.fetchApiRef,githubAuthApiRef:()=>u.githubAuthApiRef,gitlabAuthApiRef:()=>u.gitlabAuthApiRef,googleAuthApiRef:()=>u.googleAuthApiRef,iconsApiRef:()=>y,identityApiRef:()=>u.identityApiRef,microsoftAuthApiRef:()=>u.microsoftAuthApiRef,oauthRequestApiRef:()=>u.oauthRequestApiRef,oktaAuthApiRef:()=>u.oktaAuthApiRef,oneloginAuthApiRef:()=>u.oneloginAuthApiRef,routeResolutionApiRef:()=>b,storageApiRef:()=>u.storageApiRef,useAnalytics:()=>f,useApi:()=>u.useApi,useApiHolder:()=>u.useApiHolder,useAppNode:()=>Se,useComponentRef:()=>h,useRouteRef:()=>Qe,useRouteRefParams:()=>et,useTranslationRef:()=>ut,vmwareCloudAuthApiRef:()=>u.vmwareCloudAuthApiRef,withApis:()=>u.withApis});var r=n(31085),a=n(64218),i=n(95478);const o=(0,a.createVersionedContext)("analytics-context"),s=()=>{const e=(0,i.useContext)(o);if(void 0===e)return{pluginId:"app",extensionId:"app"};const t=e.atVersion(1);if(void 0===t)throw new Error("No context found for version 1.");return t},c=e=>{const{attributes:t,children:n}=e,i={...s(),...t},c=(0,a.createVersionedValueMap)({1:i});return(0,r.jsx)(o.Provider,{value:c,children:n})};var u=n(22097);const p=(0,u.createApiRef)({id:"core.analytics"}),d=(0,a.getOrCreateGlobalSingleton)("core-plugin-api:analytics-tracker-events",(()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})));class l{constructor(e,t={pluginId:"root",extensionId:"App"}){this.analyticsApi=e,this.context=t,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)}setContext(e){this.context=e}captureEvent(e,t,{value:n,attributes:r}={}){const a=this.context;if("_ROUTABLE-EXTENSION-RENDERED"!==e){if(d.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...d.mostRecentGatheredNavigation,...d.mostRecentRoutableExtensionRender})}catch(e){console.warn("Error during analytics event capture. %o",e)}d.mostRecentGatheredNavigation=void 0,d.mostRecentRoutableExtensionRender=void 0}if("navigate"!==e||"root"!==a.pluginId)try{this.analyticsApi.captureEvent({action:e,subject:t,value:n,attributes:r,context:a})}catch(e){console.warn("Error during analytics event capture. %o",e)}else d.mostRecentGatheredNavigation={action:e,subject:t,value:n,attributes:r,context:a}}else d.mostRecentGatheredNavigation&&(d.mostRecentRoutableExtensionRender={context:{...a,extensionId:"App"}})}}function f(){const e=(0,i.useRef)(null),t=s(),n=function(){try{return(0,u.useApi)(p)}catch(e){if("NotImplementedError"===e.name)return{captureEvent:()=>{}};throw e}}(),r=(null===e.current&&(e.current=new l(n)),e.current);return r.setContext(t),r}const m=(0,u.createApiRef)({id:"core.app-tree"}),g=(0,u.createApiRef)({id:"core.components"});function h(e){return(0,u.useApi)(g).getComponent(e)}const y=(0,u.createApiRef)({id:"core.icons"}),v=(0,u.createApiRef)({id:"core.dialog"}),b=(0,u.createApiRef)({id:"core.route-resolution"});var A=n(44867);const k=Symbol("Let zodToJsonSchema decide on which parser to use"),R={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"};function w(e,t,n,r){r?.errorMessages&&n&&(e.errorMessage={...e.errorMessage,[t]:n})}function x(e,t,n,r,a){e[t]=n,w(e,t,r,a)}function $(e,t){return J(e.type._def,t)}function E(e,t,n){const r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(((n,r)=>E(e,t,n)))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return P(e,t)}}const P=(e,t)=>{const n={type:"integer",format:"unix-time"};if("openApi3"===t.target)return n;for(const r of e.checks)switch(r.kind){case"min":x(n,"minimum",r.value,r.message,t);break;case"max":x(n,"maximum",r.value,r.message,t)}return n};let S;const T=/^[cC][^\s-]{8,}$/,_=/^[0-9a-z]+$/,j=/^[0-9A-HJKMNP-TV-Z]{26}$/,O=/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,Z=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,I=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,M=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,N=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,F=/^[a-zA-Z0-9_-]{21}$/,z=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;function Y(e,t){const n={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":x(n,"minLength","number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value,r.message,t);break;case"max":x(n,"maxLength","number"==typeof n.maxLength?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case"email":switch(t.emailStrategy){case"format:email":L(n,"email",r.message,t);break;case"format:idn-email":L(n,"idn-email",r.message,t);break;case"pattern:zod":B(n,O,r.message,t)}break;case"url":L(n,"uri",r.message,t);break;case"uuid":L(n,"uuid",r.message,t);break;case"regex":B(n,r.regex,r.message,t);break;case"cuid":B(n,T,r.message,t);break;case"cuid2":B(n,_,r.message,t);break;case"startsWith":B(n,RegExp(`^${C(r.value,t)}`),r.message,t);break;case"endsWith":B(n,RegExp(`${C(r.value,t)}$`),r.message,t);break;case"datetime":L(n,"date-time",r.message,t);break;case"date":L(n,"date",r.message,t);break;case"time":L(n,"time",r.message,t);break;case"duration":L(n,"duration",r.message,t);break;case"length":x(n,"minLength","number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value,r.message,t),x(n,"maxLength","number"==typeof n.maxLength?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case"includes":B(n,RegExp(C(r.value,t)),r.message,t);break;case"ip":"v6"!==r.version&&L(n,"ipv4",r.message,t),"v4"!==r.version&&L(n,"ipv6",r.message,t);break;case"base64url":B(n,N,r.message,t);break;case"jwt":B(n,z,r.message,t);break;case"cidr":"v6"!==r.version&&B(n,Z,r.message,t),"v4"!==r.version&&B(n,I,r.message,t);break;case"emoji":B(n,(void 0===S&&(S=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),S),r.message,t);break;case"ulid":B(n,j,r.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":L(n,"binary",r.message,t);break;case"contentEncoding:base64":x(n,"contentEncoding","base64",r.message,t);break;case"pattern:zod":B(n,M,r.message,t)}break;case"nanoid":B(n,F,r.message,t)}return n}function C(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let n=0;n<e.length;n++)D.has(e[n])||(t+="\\"),t+=e[n];return t}(e):e}const D=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function L(e,t,n,r){e.format||e.anyOf?.some((e=>e.format))?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&r.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):x(e,"format",t,n,r)}function B(e,t,n,r){e.pattern||e.allOf?.some((e=>e.pattern))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&r.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.allOf.push({pattern:V(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):x(e,"pattern",V(t,r),n,r)}function V(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;const n=e.flags.includes("i"),r=e.flags.includes("m"),a=e.flags.includes("s"),i=n?e.source.toLowerCase():e.source;let o="",s=!1,c=!1,u=!1;for(let e=0;e<i.length;e++)if(s)o+=i[e],s=!1;else{if(n)if(c){if(i[e].match(/[a-z]/)){u?(o+=i[e],o+=`${i[e-2]}-${i[e]}`.toUpperCase(),u=!1):"-"===i[e+1]&&i[e+2]?.match(/[a-z]/)?(o+=i[e],u=!0):o+=`${i[e]}${i[e].toUpperCase()}`;continue}}else if(i[e].match(/[a-z]/)){o+=`[${i[e]}${i[e].toUpperCase()}]`;continue}if(r){if("^"===i[e]){o+="(^|(?<=[\r\n]))";continue}if("$"===i[e]){o+="($|(?=[\r\n]))";continue}}a&&"."===i[e]?o+=c?`${i[e]}\r\n`:`[${i[e]}\r\n]`:(o+=i[e],"\\"===i[e]?s=!0:c&&"]"===i[e]?c=!1:c||"["!==i[e]||(c=!0))}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return o}function U(e,t){if("openAi"===t.target&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),"openApi3"===t.target&&e.keyType?._def.typeName===A.kY.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce(((n,r)=>({...n,[r]:J(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",r]})??{}})),{}),additionalProperties:t.rejectedAdditionalProperties};const n={type:"object",additionalProperties:J(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if("openApi3"===t.target)return n;if(e.keyType?._def.typeName===A.kY.ZodString&&e.keyType._def.checks?.length){const{type:r,...a}=Y(e.keyType._def,t);return{...n,propertyNames:a}}if(e.keyType?._def.typeName===A.kY.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===A.kY.ZodBranded&&e.keyType._def.type._def.typeName===A.kY.ZodString&&e.keyType._def.type._def.checks?.length){const{type:r,...a}=$(e.keyType._def,t);return{...n,propertyNames:a}}return n}const G={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"},q=(e,t)=>{const n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map(((e,n)=>J(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]}))).filter((e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0)));return n.length?{anyOf:n}:void 0};function W(e){try{return e.isOptional()}catch{return!0}}const H=(e,t,n)=>{switch(t){case A.kY.ZodString:return Y(e,n);case A.kY.ZodNumber:return function(e,t){const n={type:"number"};if(!e.checks)return n;for(const r of e.checks)switch(r.kind){case"int":n.type="integer",w(n,"type",r.message,t);break;case"min":"jsonSchema7"===t.target?r.inclusive?x(n,"minimum",r.value,r.message,t):x(n,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(n.exclusiveMinimum=!0),x(n,"minimum",r.value,r.message,t));break;case"max":"jsonSchema7"===t.target?r.inclusive?x(n,"maximum",r.value,r.message,t):x(n,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(n.exclusiveMaximum=!0),x(n,"maximum",r.value,r.message,t));break;case"multipleOf":x(n,"multipleOf",r.value,r.message,t)}return n}(e,n);case A.kY.ZodObject:return function(e,t){const n="openAi"===t.target,r={type:"object",properties:{}},a=[],i=e.shape();for(const e in i){let o=i[e];if(void 0===o||void 0===o._def)continue;let s=W(o);s&&n&&(o instanceof A.Ii&&(o=o._def.innerType),o.isNullable()||(o=o.nullable()),s=!1);const c=J(o._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==c&&(r.properties[e]=c,s||a.push(e))}a.length&&(r.required=a);const o=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return J(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==o&&(r.additionalProperties=o),r}(e,n);case A.kY.ZodBigInt:return function(e,t){const n={type:"integer",format:"int64"};if(!e.checks)return n;for(const r of e.checks)switch(r.kind){case"min":"jsonSchema7"===t.target?r.inclusive?x(n,"minimum",r.value,r.message,t):x(n,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(n.exclusiveMinimum=!0),x(n,"minimum",r.value,r.message,t));break;case"max":"jsonSchema7"===t.target?r.inclusive?x(n,"maximum",r.value,r.message,t):x(n,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(n.exclusiveMaximum=!0),x(n,"maximum",r.value,r.message,t));break;case"multipleOf":x(n,"multipleOf",r.value,r.message,t)}return n}(e,n);case A.kY.ZodBoolean:return{type:"boolean"};case A.kY.ZodDate:return E(e,n);case A.kY.ZodUndefined:return{not:{}};case A.kY.ZodNull:return function(e){return"openApi3"===e.target?{enum:["null"],nullable:!0}:{type:"null"}}(n);case A.kY.ZodArray:return function(e,t){const n={type:"array"};return e.type?._def&&e.type?._def?.typeName!==A.kY.ZodAny&&(n.items=J(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&x(n,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&x(n,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(x(n,"minItems",e.exactLength.value,e.exactLength.message,t),x(n,"maxItems",e.exactLength.value,e.exactLength.message,t)),n}(e,n);case A.kY.ZodUnion:case A.kY.ZodDiscriminatedUnion:return function(e,t){if("openApi3"===t.target)return q(e,t);const n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every((e=>e._def.typeName in G&&(!e._def.checks||!e._def.checks.length)))){const e=n.reduce(((e,t)=>{const n=G[t._def.typeName];return n&&!e.includes(n)?[...e,n]:e}),[]);return{type:e.length>1?e:e[0]}}if(n.every((e=>"ZodLiteral"===e._def.typeName&&!e.description))){const e=n.reduce(((e,t)=>{const n=typeof t._def.value;switch(n){case"string":case"number":case"boolean":return[...e,n];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}}),[]);if(e.length===n.length){const t=e.filter(((e,t,n)=>n.indexOf(e)===t));return{type:t.length>1?t:t[0],enum:n.reduce(((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value]),[])}}}else if(n.every((e=>"ZodEnum"===e._def.typeName)))return{type:"string",enum:n.reduce(((e,t)=>[...e,...t._def.values.filter((t=>!e.includes(t)))]),[])};return q(e,t)}(e,n);case A.kY.ZodIntersection:return function(e,t){const n=[J(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),J(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter((e=>!!e));let r="jsonSchema2019-09"===t.target?{unevaluatedProperties:!1}:void 0;const a=[];return n.forEach((e=>{if("type"in(t=e)&&"string"===t.type||!("allOf"in t)){let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){const{additionalProperties:n,...r}=e;t=r}else r=void 0;a.push(t)}else a.push(...e.allOf),void 0===e.unevaluatedProperties&&(r=void 0);var t})),a.length?{allOf:a,...r}:void 0}(e,n);case A.kY.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map(((e,n)=>J(e._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[]),additionalItems:J(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map(((e,n)=>J(e._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[])}}(e,n);case A.kY.ZodRecord:return U(e,n);case A.kY.ZodLiteral:return function(e,t){const n=typeof e.value;return"bigint"!==n&&"number"!==n&&"boolean"!==n&&"string"!==n?{type:Array.isArray(e.value)?"array":"object"}:"openApi3"===t.target?{type:"bigint"===n?"integer":n,enum:[e.value]}:{type:"bigint"===n?"integer":n,const:e.value}}(e,n);case A.kY.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case A.kY.ZodNativeEnum:return function(e){const t=e.values,n=Object.keys(e.values).filter((e=>"number"!=typeof t[t[e]])).map((e=>t[e])),r=Array.from(new Set(n.map((e=>typeof e))));return{type:1===r.length?"string"===r[0]?"string":"number":["string","number"],enum:n}}(e);case A.kY.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return"openApi3"===t.target?{type:G[e.innerType._def.typeName],nullable:!0}:{type:[G[e.innerType._def.typeName],"null"]};if("openApi3"===t.target){const n=J(e.innerType._def,{...t,currentPath:[...t.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}const n=J(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}(e,n);case A.kY.ZodOptional:return((e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return J(e.innerType._def,t);const n=J(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:{}},n]}:{}})(e,n);case A.kY.ZodMap:return function(e,t){return"record"===t.mapStrategy?U(e,t):{type:"array",maxItems:125,items:{type:"array",items:[J(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||{},J(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||{}],minItems:2,maxItems:2}}}(e,n);case A.kY.ZodSet:return function(e,t){const n={type:"array",uniqueItems:!0,items:J(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&x(n,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&x(n,"maxItems",e.maxSize.value,e.maxSize.message,t),n}(e,n);case A.kY.ZodLazy:return()=>e.getter()._def;case A.kY.ZodPromise:return function(e,t){return J(e.type._def,t)}(e,n);case A.kY.ZodNaN:case A.kY.ZodNever:return{not:{}};case A.kY.ZodEffects:return function(e,t){return"input"===t.effectStrategy?J(e.schema._def,t):{}}(e,n);case A.kY.ZodAny:case A.kY.ZodUnknown:return{};case A.kY.ZodDefault:return function(e,t){return{...J(e.innerType._def,t),default:e.defaultValue()}}(e,n);case A.kY.ZodBranded:return $(e,n);case A.kY.ZodReadonly:case A.kY.ZodCatch:return((e,t)=>J(e.innerType._def,t))(e,n);case A.kY.ZodPipeline:return((e,t)=>{if("input"===t.pipeStrategy)return J(e.in._def,t);if("output"===t.pipeStrategy)return J(e.out._def,t);const n=J(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]});return{allOf:[n,J(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]})].filter((e=>void 0!==e))}})(e,n);case A.kY.ZodFunction:case A.kY.ZodVoid:case A.kY.ZodSymbol:default:return}};function J(e,t,n=!1){const r=t.seen.get(e);if(t.override){const a=t.override?.(e,t,r,n);if(a!==k)return a}if(r&&!n){const e=X(r,t);if(void 0!==e)return e}const a={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,a);const i=H(e,e.typeName,t),o="function"==typeof i?J(i(),t):i;if(o&&Q(e,t,o),t.postProcess){const n=t.postProcess(o,e,t);return a.jsonSchema=o,n}return a.jsonSchema=o,o}const X=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:K(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every(((e,n)=>t.currentPath[n]===e))?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):"seen"===t.$refStrategy?{}:void 0}},K=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")},Q=(e,t,n)=>(e.description&&(n.description=e.description,t.markdownDescription&&(n.markdownDescription=e.description)),n),ee=(e,t)=>{const n=(e=>{const t=(e=>"string"==typeof e?{...R,name:e}:{...R,...e})(e),n=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map((([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}])))}})(t),r="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce(((e,[t,r])=>({...e,[t]:J(r._def,{...n,currentPath:[...n.basePath,n.definitionPath,t]},!0)??{}})),{}):void 0,a="string"==typeof t?t:"title"===t?.nameStrategy?void 0:t?.name,i=J(e._def,void 0===a?n:{...n,currentPath:[...n.basePath,n.definitionPath,a]},!1)??{},o="object"==typeof t&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==o&&(i.title=o);const s=void 0===a?r?{...i,[n.definitionPath]:r}:i:{$ref:[..."relative"===n.$refStrategy?[]:n.basePath,n.definitionPath,a].join("/"),[n.definitionPath]:{...r,[a]:i}};return"jsonSchema7"===n.target?s.$schema="http://json-schema.org/draft-07/schema#":"jsonSchema2019-09"!==n.target&&"openAi"!==n.target||(s.$schema="https://json-schema.org/draft/2019-09/schema#"),"openAi"===n.target&&("anyOf"in s||"oneOf"in s||"allOf"in s||"type"in s&&Array.isArray(s.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),s};function te(){const e=e=>Object.assign((t=>({$$type:"@backstage/ExtensionDataValue",id:e,value:t})),{id:e,$$type:"@backstage/ExtensionDataRef",config:{},optional(){return{...this,config:{...this.config,optional:!0}}},toString(){const t=Boolean(this.config.optional);return`ExtensionDataRef{id=${e},optional=${t}}`}});return{with:t=>e(t.id)}}function ne(e,t){const n=new Map,r=t&&new Map(t.map((e=>[e.id,e])));for(const t of e){if(r&&!r.delete(t.id))throw new Error(`extension data '${t.id}' was provided but not declared`);n.set(t.id,t)}const a=r&&Array.from(r.values()).filter((e=>!e.config.optional));if(a&&a.length>0)throw new Error(`missing required extension data value(s) '${a.map((e=>e.id)).join(", ")}'`);return{get:e=>n.get(e.id)?.value,[Symbol.iterator]:()=>n.values()}}function re(e,t,n){if(!e||!t||!n)return t;const r={};for(const a in e){if(!Object.hasOwn(e,a))continue;const i=e[a],o=n[a];if(i.config.singleton){const e=t[a];if(o){const t=ne(o,i.extensionData);if(!e)throw new Error(`attempted to override data of input '${a}' but it is not present in the original inputs`);r[a]=Object.assign(t,{node:e.node})}}else{const e=t[a];if(!Array.isArray(o))throw new Error(`override data provided for input '${a}' must be an array`);if(0===o.length)r[a]=[];else{const t=o.filter((e=>"node"in e)).length;if(0===t){if(e.length!==o.length)throw new Error(`override data provided for input '${a}' must match the length of the original inputs`);r[a]=o.map(((t,n)=>{const r=ne(t,i.extensionData);return Object.assign(r,{node:e[n].node})}))}else{if(t!==o.length)throw new Error(`override data for input '${a}' may not mix forwarded inputs with data overrides`);r[a]=o}}}}return r}function ae(e){if("invalid_union"===e.code)return ae(e.unionErrors[0].issues[0]);let t=e.message;return"Required"===t&&(t="Missing required value"),e.path.length&&(t+=` at '${e.path.join(".")}'`),t}class ie{static create(e){return new ie(e.type,new Set(e.versions))}#e;#t;constructor(e,t){this.#e=e,this.#t=t}TPublic=void 0;TInternal=void 0;isType=e=>this.#n(e);toInternal=e=>{if(!this.#n(e))throw new TypeError(`Invalid opaque type, expected '${this.#e}', but got '${this.#r(e)}'`);if(!this.#t.has(e.version)){const t=Array.from(this.#t).map(this.#a);t.length>1&&(t[t.length-1]=`or ${t[t.length-1]}`);const n=t.length>2?t.join(", "):t.join(" ");throw new TypeError(`Invalid opaque type instance, got version ${this.#a(e.version)}, expected ${n}`)}return e};createInstance(e,t){return Object.assign(t,{$$type:this.#e,...e&&{version:e}})}#n(e){return null!==e&&"object"==typeof e&&e.$$type===this.#e}#r(e){return"object"!=typeof e?`<${typeof e}>`:null===e?"<null>":String("$$type"in e?e.$$type:e)}#a=e=>e?`'${e}'`:"undefined"}const oe=ie.create({type:"@backstage/ExtensionDefinition",versions:["v1","v2"]}),se=Symbol("params");function ce(e){const t=e.config?.schema,n=t&&function(){const e=(n=A.z).object(Object.fromEntries(Object.entries(t).map((([e,t])=>[e,t(n)]))));var n;return{parse:t=>{const n=e.safeParse(t);if(n.success)return n.data;throw new Error(n.error.issues.map(ae).join("; "))},schema:ee(e)}}();return oe.createInstance("v2",{T:void 0,kind:e.kind,name:e.name,attachTo:e.attachTo,disabled:e.disabled??!1,inputs:e.inputs??{},output:e.output,configSchema:n,factory:e.factory,toString(){const t=[];return e.kind&&t.push(`kind=${e.kind}`),e.name&&t.push(`name=${e.name}`),t.push(`attachTo=${[e.attachTo].flat().map((e=>`${e.id}@${e.input}`)).join("+")}`),`ExtensionDefinition{${t.join(",")}}`},override(t){if(!Array.isArray(e.output))throw new Error("Cannot override an extension that is not declared using the new format with outputs as an array");if(t.output&&!t.factory)throw new Error("Refused to override output without also overriding factory");if(t.params&&t.factory)throw new Error("Refused to override params and factory at the same time");return ce({kind:e.kind,name:e.name,attachTo:t.attachTo??e.attachTo,disabled:t.disabled??e.disabled,inputs:{...t.inputs,...e.inputs},output:t.output??e.output,config:e.config||t.config?{schema:{...e.config?.schema,...t.config?.schema}}:void 0,factory:({node:n,apis:r,config:a,inputs:i})=>{if(!t.factory)return e.factory({node:n,apis:r,config:a,inputs:i,[se]:t.params});const o=t.factory((t=>ne(e.factory({node:n,apis:r,config:t?.config??a,inputs:re(e.inputs,i,t?.inputs),[se]:t?.params}),e.output)),{node:n,apis:r,config:a,inputs:i}),s=new Map;for(const e of o)s.set(e.id,e);return s.values()}})}})}function ue(e){return{dataRefs:e.dataRefs,make:t=>ce({kind:e.kind,name:t.name??e.name,attachTo:t.attachTo??e.attachTo,disabled:t.disabled??e.disabled,inputs:e.inputs,output:e.output,config:e.config,factory:n=>e.factory({...t.params,...n[se]},n)}),makeWithOverrides:t=>ce({kind:e.kind,name:t.name??e.name,attachTo:t.attachTo??e.attachTo,disabled:t.disabled??e.disabled,inputs:{...t.inputs,...e.inputs},output:t.output??e.output,config:e.config||t.config?{schema:{...e.config?.schema,...t.config?.schema}}:void 0,factory:n=>{const{node:r,config:a,inputs:i,apis:o}=n;return t.factory(((t,s)=>ne(e.factory({...t,...n[se]},{apis:o,node:r,config:s?.config??a,inputs:re(e.inputs,i,s?.inputs)}),e.output)),{apis:o,node:r,config:a,inputs:i})}})}}const pe=te().with({id:"core.api.factory"}),de=ue({kind:"api",attachTo:{id:"root",input:"apis"},output:[pe],dataRefs:{factory:pe},*factory(e){yield pe(e.factory)}}),le={reactElement:te().with({id:"core.reactElement"}),routePath:te().with({id:"core.routing.path"}),routeRef:te().with({id:"core.routing.ref"})},fe=ue({kind:"app-root-element",attachTo:{id:"app/root",input:"elements"},output:[le.reactElement],*factory(e){yield le.reactElement("function"==typeof e.element?e.element():e.element)}}),me=te().with({id:"app.root.wrapper"}),ge=ue({kind:"app-root-wrapper",attachTo:{id:"app/root",input:"wrappers"},output:[me],dataRefs:{component:me},*factory(e){yield me((t=>(0,r.jsx)(e.Component,{children:t.children})))}}),he=te().with({id:"core.icons"}),ye=ue({kind:"icon-bundle",attachTo:{id:"api:app/icons",input:"icons"},output:[he],factory:e=>[he(e.icons)],dataRefs:{icons:he}}),ve=te().with({id:"core.nav-item.target"}),be=ue({kind:"nav-item",attachTo:{id:"app/nav",input:"items"},output:[ve],dataRefs:{target:ve},factory:({icon:e,routeRef:t,title:n},{config:r})=>[ve({title:r.title??n,icon:e,routeRef:t})],config:{schema:{title:e=>e.string().optional()}}}),Ae=te().with({id:"core.nav-logo.logo-elements"}),ke=ue({kind:"nav-logo",attachTo:{id:"app/nav",input:"logos"},output:[Ae],dataRefs:{logoElements:Ae},*factory({logoIcon:e,logoFull:t}){yield Ae({logoIcon:e,logoFull:t})}});class Re extends i.Component{static getDerivedStateFromError(e){return{error:e}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:e}=this.state,{plugin:t,children:n,Fallback:a}=this.props;return e?(0,r.jsx)(a,{plugin:t,error:e,resetError:this.handleErrorReset}):n}}function we(e){const{id:t}=e;return{id:t,toString:()=>`ComponentRef{id=${t}}`}}(0,a.getOrCreateGlobalSingleton)("core-plugin-api:analytics-tracker-events",(()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})));const xe={progress:we({id:"core.components.progress"}),notFoundErrorPage:we({id:"core.components.notFoundErrorPage"}),errorBoundaryFallback:we({id:"core.components.errorBoundaryFallback"})},$e="app-node-context",Ee=(0,a.createVersionedContext)($e);function Pe({node:e,children:t}){const n=(0,a.createVersionedValueMap)({1:{node:e}});return(0,r.jsx)(Ee.Provider,{value:n,children:t})}function Se(){const e=(0,a.useVersionedContext)($e);if(!e)return;const t=e.atVersion(1);if(!t)throw new Error("AppNodeContext v1 not available");return t.node}const Te=e=>{const{disableTracking:t,children:n}=e,a=(0,u.useAnalytics)();return(0,i.useEffect)((()=>{t||a.captureEvent("_ROUTABLE-EXTENSION-RENDERED","")}),[a,t]),(0,r.jsx)(r.Fragment,{children:n})};function _e(e){const{node:t,routable:n,children:a}=e,o=Boolean(t.instance?.getData(le.routePath)),s=t.spec.plugin,c=h(xe.progress),p=h(xe.errorBoundaryFallback),d={extensionId:t.spec.id,pluginId:t.spec.plugin?.id??"app"};return(0,r.jsx)(Pe,{node:t,children:(0,r.jsx)(i.Suspense,{fallback:(0,r.jsx)(c,{}),children:(0,r.jsx)(Re,{plugin:s,Fallback:p,children:(0,r.jsx)(u.AnalyticsContext,{attributes:d,children:(0,r.jsx)(Te,{disableTracking:!(n??o),children:a})})})})})}var je;(je=_e||(_e={})).lazy=function(e,t){const n=(0,i.lazy)((()=>t().then((e=>({default:()=>e})))));return(0,r.jsx)(je,{node:e,children:(0,r.jsx)(n,{})})},je.lazyComponent=function(e,t){const n=(0,i.lazy)((()=>t().then((e=>({default:e})))));return t=>(0,r.jsx)(je,{node:e,children:(0,r.jsx)(n,{...t})})};const Oe=ue({kind:"page",attachTo:{id:"app/routes",input:"routes"},output:[le.routePath,le.reactElement,le.routeRef.optional()],config:{schema:{path:e=>e.string().optional()}},*factory({defaultPath:e,loader:t,routeRef:n},{config:r,node:a}){yield le.routePath(r.path??e),yield le.reactElement(_e.lazy(a,t)),n&&(yield le.routeRef(n))}}),Ze=te().with({id:"app.router.wrapper"}),Ie=ue({kind:"app-router-component",attachTo:{id:"app/root",input:"router"},output:[Ze],dataRefs:{component:Ze},*factory({Component:e}){yield Ze(e)}}),Me=te().with({id:"core.sign-in-page.component"}),Ne=ue({kind:"sign-in-page",attachTo:{id:"app/root",input:"signInPage"},output:[Me],dataRefs:{component:Me},*factory({loader:e},{node:t}){const n=(0,i.lazy)((()=>e().then((e=>({default:e})))));yield Me((e=>(0,r.jsx)(_e,{node:t,routable:!0,children:(0,r.jsx)(n,{...e})})))}}),Fe=te().with({id:"core.theme.theme"}),ze=ue({kind:"theme",attachTo:{id:"api:app/app-theme",input:"themes"},output:[Fe],dataRefs:{theme:Fe},factory:({theme:e})=>[Fe(e)]}),Ye=te().with({id:"core.translation.translation"}),Ce=ue({kind:"translation",attachTo:{id:"api:app/translations",input:"translations"},output:[Ye],dataRefs:{translation:Ye},factory:({resource:e})=>[Ye(e)]});function De(e){return ce({kind:"component",name:e.name??e.ref.id,attachTo:{id:"api:app/components",input:"components"},disabled:e.disabled,output:[De.componentDataRef],factory(){if("sync"in e.loader)return[De.componentDataRef({ref:e.ref,impl:e.loader.sync()})];const t=e.loader.lazy,n=(0,i.lazy)((()=>t().then((e=>({default:e})))));return[De.componentDataRef({ref:e.ref,impl:n})]}})}(De||(De={})).componentDataRef=te().with({id:"core.component.component"});const Le="eHgtF5hmbrXyiEvo";function Be(e=Error){const{stack:t}=new e(Le);if(!t)return"<unknown>";const n=t.includes(Le)?t.indexOf("\n")+1:0,r=t.indexOf("\n",t.indexOf("\n",n)+1)+1,a=t.indexOf("\n",r),i=t.substring(r,a).trim();return i?i.includes("(")?i.substring(i.indexOf("(")+1,i.indexOf(")")):i.includes("@")?i.substring(i.indexOf("@")+1):i:"unknown"}function Ve(e){const t=e;if("@backstage/RouteRef"!==t.$$type)throw new Error(`Invalid RouteRef, bad type '${t.$$type}'`);return t}class Ue{constructor(e=[],t){this.params=e,this.#i=e,this.#o=t}$$type="@backstage/RouteRef";version="v1";#s;#i;#o;getParams(){return this.#i}getDescription(){return this.#s?this.#s:`created at '${this.#o}'`}get#c(){return this.$$type.slice(11)}setId(e){if(!e)throw new Error(`${this.#c} id must be a non-empty string`);if(this.#s&&this.#s!==e)throw new Error(`${this.#c} was referenced twice as both '${this.#s}' and '${e}'`);this.#s=e}toString(){return`${this.#c}{${this.getDescription()}}`}}function Ge(e){return new Ue(e?.params,Be())}const qe=/^\w+$/;class We{constructor(e,t,n){this.path=e,this.#i=t,this.#u=n}$$type="@backstage/SubRouteRef";version="v1";#i;#u;getParams(){return this.#i}getParent(){return this.#u}getDescription(){const e=Ve(this.#u);return`at ${this.path} with parent ${e.getDescription()}`}toString(){return`SubRouteRef{${this.getDescription()}}`}}function He(e){const{path:t,parent:n}=e,r=Ve(n).getParams(),a=t.split("/").filter((e=>e.startsWith(":"))).map((e=>e.substring(1))),i=[...r,...a];if(r.some((e=>a.includes(e))))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!t.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${t}'`);if(t.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${t}'`);for(const e of a)if(!qe.test(e))throw new Error(`SubRouteRef path has invalid param, got '${e}'`);return new We(t,i,n)}class Je extends Ue{constructor(e=[],t,n){super(e,n),this.params=e,this.defaultTarget=t}$$type="@backstage/ExternalRouteRef";getDefaultTarget(){return this.defaultTarget}}function Xe(e){return new Je(e?.params,e?.defaultTarget,Be())}var Ke=n(42469);function Qe(e){const{pathname:t}=(0,Ke.useLocation)(),n=(0,u.useApi)(b);return(0,i.useMemo)((()=>n.resolve(e,{sourcePath:t})),[n,e,t])}function et(e){return(0,Ke.useParams)()}function tt(e){return{$$type:"@backstage/TranslationMessages",id:e.ref.id,full:Boolean(e.full),messages:e.messages}}function nt(e){return{$$type:"@backstage/TranslationResource",version:"v1",id:e.ref.id,resources:Object.entries(e.translations).map((([e,t])=>({language:e,loader:()=>t().then((e=>{const t=e.default;return{messages:"@backstage/TranslationMessages"===t?.$$type?t.messages:t}}))})))}}class rt{#s;#p;#d;constructor(e){this.#s=e.id,this.#p=function(e){const t=new Array;return function e(n,r){for(const[a,i]of Object.entries(n))"string"==typeof i?t.push([r+a,i]):e(i,`${r}${a}.`)}(e,""),Object.fromEntries(t)}(e.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#s}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#p}setDefaultResource(e){this.#d=e}getDefaultResource(){return this.#d}toString(){return`TranslationRef{id=${this.id}}`}}function at(e){const t=new rt(e);return e.translations&&t.setDefaultResource(nt({ref:t,translations:e.translations})),t}var it=n(87092),ot=n(50884),st=n(48347);const ct=new WeakSet,ut=e=>{const t=(0,it.gf)(ot.m),n=(0,it.gf)(st.J),[r,a]=(0,i.useState)((()=>n.getTranslation(e))),o=(0,i.useMemo)((()=>n.translation$(e)),[n,e]),s=(0,i.useCallback)((n=>{if(!ct.has(e)){const r=`Failed to load translation resource '${e.id}'; caused by ${n}`;console.error(r),t.post(new Error(r)),ct.add(e)}}),[t,e]);(0,i.useEffect)((()=>{const e=o.subscribe({next(e){e.ready&&a(e)},error(e){s(e)}});return()=>{e.unsubscribe()}}),[o,s]);const c=(0,i.useRef)(!0);if((0,i.useEffect)((()=>{c.current?c.current=!1:a(n.getTranslation(e))}),[n,e]),!r.ready)throw new Promise((e=>{const t=o.subscribe({next(n){n.ready&&(t.unsubscribe(),e())},error(n){t.unsubscribe(),s(n),e()}})}));return{t:r.t}};function pt(e,t){return{$$type:"@backstage/ExtensionInput",extensionData:e,config:{singleton:Boolean(t?.singleton),optional:Boolean(t?.optional)},replaces:t?.replaces}}function dt(e,t){const n=oe.toInternal(e),{name:r,kind:a,namespace:i,override:o,...s}=n,c=n.namespace??t?.namespace,u=r&&c?`${c}/${r}`:c||r;if(!u)throw new Error(`Extension must declare an explicit namespace or name as it could not be resolved from context, kind=${a} namespace=${c} name=${r}`);const p=a?`${a}:${u}`:u;return{...s,$$type:"@backstage/Extension",version:n.version,id:p,toString:()=>`Extension{id=${p}}`}}const lt=ie.create({type:"@backstage/FrontendPlugin",versions:["v1"]});function ft(e){const t="pluginId"in e?e.pluginId:e.id;if(!t)throw new Error("Either 'id' or 'pluginId' must be provided to createFrontendPlugin");const n=new Array,r=new Map;for(const a of e.extensions??[]){const e=oe.toInternal(a),i=dt(a,{namespace:t});n.push(i),r.set(i.id,{...e,namespace:t})}if(n.length!==r.size){const e=n.map((e=>e.id)),r=Array.from(new Set(e.filter(((t,n)=>e.indexOf(t)!==n))));throw new Error(`Plugin '${t}' provided duplicate extensions: ${r.join(", ")}`)}return lt.createInstance("v1",{id:t,routes:e.routes??{},externalRoutes:e.externalRoutes??{},featureFlags:e.featureFlags??[],extensions:n,infoOptions:e.info,async info(){throw new Error(`Attempted to load plugin info for plugin '${t}', but the plugin instance is not installed in an app`)},getExtension(e){const n=r.get(e);if(!n)throw new Error(`Attempted to get non-existent extension '${e}' from plugin '${t}'`);return n},toString:()=>`Plugin{id=${t}}`,withOverrides(n){const r=new Set(n.extensions.map((e=>dt(e,{namespace:t}).id))),a=(e.extensions??[]).filter((e=>!r.has(dt(e,{namespace:t}).id)));return ft({...e,pluginId:t,extensions:[...a,...n.extensions],info:{...e.info,...n.info}})}})}function mt(e){const{pluginId:t}=e,n=new Array,r=new Map;for(const a of e.extensions??[]){const e=oe.toInternal(a),i=dt(a,{namespace:t});n.push(i),r.set(i.id,{...e,namespace:t})}if(n.length!==r.size){const e=n.map((e=>e.id)),r=Array.from(new Set(e.filter(((t,n)=>e.indexOf(t)!==n))));throw new Error(`Plugin '${t}' provided duplicate extensions: ${r.join(", ")}`)}return{$$type:"@backstage/FrontendModule",version:"v1",pluginId:t,featureFlags:e.featureFlags??[],extensions:n,toString:()=>`Module{pluginId=${t}}`}}function gt(e){const t=`created at '${Be()}'`;return{$$type:"@backstage/FrontendFeatureLoader",version:"v1",description:t,toString:()=>`FeatureLoader{description=${t}}`,async loader(t){const n=await e.loader(t),r=new Array;for await(const e of n)if(null===(a=e)||"object"!=typeof a||!("$$type"in a)||"@backstage/FrontendPlugin"!==a.$$type&&"@backstage/FrontendModule"!==a.$$type&&"@backstage/FrontendFeatureLoader"!==a.$$type){if(!("default"in e))throw new Error(`Invalid item "${e}"`);r.push(e.default)}else r.push(e);var a;return r}}}},87092:(e,t,n)=>{n.d(t,{Q2:()=>o,gf:()=>s,wV:()=>c});var r=n(31085),a=n(64218),i=n(57556);function o(){const e=(0,a.useVersionedContext)("api-context");if(!e)throw new i.EH("API context is not available");const t=e.atVersion(1);if(!t)throw new i.EH("ApiContext v1 not available");return t}function s(e){const t=o().get(e);if(!t)throw new i.EH(`No implementation available for ${e}`);return t}function c(e){return function(t){const n=n=>{const a=o(),s={};for(const t in e)if(e.hasOwnProperty(t)){const n=e[t],r=a.get(n);if(!r)throw new i.EH(`No implementation available for ${n}`);s[t]=r}return(0,r.jsx)(t,{...n,...s})},a=t.displayName||t.name||"Component";return n.displayName=`withApis(${a})`,n}}},89940:(e,t,n)=>{n.d(t,{y:()=>a});class r{constructor(e){if(this.config=e,!e.id.split(".").flatMap((e=>e.split("-"))).every((e=>e.match(/^[a-z][a-z0-9]*$/))))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${e.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function a(e){return new r(e)}}}]);
|
2
|
-
//# sourceMappingURL=8505.
|
2
|
+
//# sourceMappingURL=8505.bd5ab33a.chunk.js.map
|