@veecode-platform/plugin-veecode-homepage-dynamic 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist-scalprum/plugin-manifest.json +3 -3
  2. package/dist-scalprum/static/4327.1a031031.chunk.js +2 -0
  3. package/dist-scalprum/static/4327.1a031031.chunk.js.map +1 -0
  4. package/dist-scalprum/static/{5689.ba470bd3.chunk.js → 5689.44adcfd6.chunk.js} +1 -1
  5. package/dist-scalprum/static/{5689.ba470bd3.chunk.js.map → 5689.44adcfd6.chunk.js.map} +1 -1
  6. package/dist-scalprum/static/8391.7b3a3f25.chunk.js +206 -0
  7. package/dist-scalprum/static/8391.7b3a3f25.chunk.js.map +1 -0
  8. package/dist-scalprum/static/{8505.bd5ab33a.chunk.js → 8505.9dd864c9.chunk.js} +1 -1
  9. package/dist-scalprum/static/{8505.bd5ab33a.chunk.js.map → 8505.9dd864c9.chunk.js.map} +1 -1
  10. package/dist-scalprum/static/{9286.0bf88601.chunk.js → 9286.e13da971.chunk.js} +2 -2
  11. package/dist-scalprum/static/{9286.0bf88601.chunk.js.map → 9286.e13da971.chunk.js.map} +1 -1
  12. package/dist-scalprum/static/avatar.82d1e940..svg +1 -0
  13. package/dist-scalprum/static/{exposed-PluginRoot.7c0308e7.chunk.js → exposed-PluginRoot.bbe04ca6.chunk.js} +2 -2
  14. package/dist-scalprum/static/{exposed-PluginRoot.7c0308e7.chunk.js.map → exposed-PluginRoot.bbe04ca6.chunk.js.map} +1 -1
  15. package/dist-scalprum/{veecode-platform.plugin-veecode-homepage.f5e3396deb211e8548f4.js → veecode-platform.plugin-veecode-homepage.0adabea53a5aa82d663c.js} +2 -2
  16. package/dist-scalprum/{veecode-platform.plugin-veecode-homepage.f5e3396deb211e8548f4.js.map → veecode-platform.plugin-veecode-homepage.0adabea53a5aa82d663c.js.map} +1 -1
  17. package/package.json +1 -1
  18. package/dist-scalprum/static/2235.1e9c55f2.chunk.js +0 -206
  19. package/dist-scalprum/static/2235.1e9c55f2.chunk.js.map +0 -1
  20. package/dist-scalprum/static/7499.53d03b96.chunk.js +0 -2
  21. package/dist-scalprum/static/7499.53d03b96.chunk.js.map +0 -1
  22. package/dist-scalprum/static/avatar.e87ac168..svg +0 -1
  23. /package/dist-scalprum/static/{2235.1e9c55f2.chunk.js.LICENSE.txt → 8391.7b3a3f25.chunk.js.LICENSE.txt} +0 -0
  24. /package/dist-scalprum/static/{9286.0bf88601.chunk.js.LICENSE.txt → 9286.e13da971.chunk.js.LICENSE.txt} +0 -0
@@ -1,2 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"static/7499.53d03b96.chunk.js","mappings":"6VAcO,MAAMA,EAAiD,EAC5DC,QACAC,QACAC,QACAC,cACAC,OACAC,eAEA,MAAMC,GACJ,SAACC,EAAAA,EAAUA,CACTC,KAAK,QACLC,aAAYR,EACZC,MAAOA,EACPQ,gBAAe,GAAGT,SAClBU,gBAAc,OACdC,GAAI,CACFC,MAAO,OACPC,OAAQ,OACRC,aAAc,OAEhBC,QAASb,E,SAERE,IAIL,OACE,SAACY,EAAAA,EAAOA,CAACjB,MAAOA,E,SACbI,GAAO,SAACc,EAAAA,KAAIA,CAACC,GAAIf,E,SAAOE,IAAiBA,G,ECpCnCc,EAAc,KACzB,MAAMC,GAAcC,EAAAA,EAAAA,QAAOC,EAAAA,gBAErBC,EAAoC,UAD5BC,EAAAA,EAAAA,KACWC,QAAQC,KAC3BC,EAAeJ,EACjB,2BACA,0BACEK,EAAWR,EAAYS,qBAe7B,OACE,SAAC/B,EAAmBA,CAClBC,MAAO4B,EACPzB,YAfF4B,IAEA,MAAMC,EAAaR,EAAa,QAAU,OAC1CO,EAAEE,iBACFF,EAAEG,kBACEL,EAASM,MAAKC,GAAMA,EAAGC,KAAOL,IAChCX,EAAYiB,iBAAiBN,GAE7BX,EAAYiB,sBAAiBC,EAC/B,EAOErC,MAAM,UACND,MAAM,e,SAELuB,GAAa,SAACgB,EAAAA,EAAqBA,CAAAA,IAAM,SAAC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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 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" zoomAndPan="magnify" viewBox="0 0 375 374.999991" height="500" preserveAspectRatio="xMidYMid meet" version="1.2"><defs><clipPath id="5d425ea37f"><path d="M 10.148438 10.148438 L 364.898438 10.148438 L 364.898438 364.898438 L 10.148438 364.898438 Z M 10.148438 10.148438 "/></clipPath><clipPath id="08dc72ec2d"><path d="M 55 217 L 320 217 L 320 364.898438 L 55 364.898438 Z M 55 217 "/></clipPath></defs><g id="8ecc475199"><g clip-rule="nonzero" clip-path="url(#5d425ea37f)"><path style=" stroke:none;fill-rule:nonzero;fill:#b3b3b3;fill-opacity:1;" d="M 364.914062 187.53125 C 364.914062 232.910156 347.886719 274.300781 319.84375 305.667969 C 287.371094 342.03125 240.128906 364.910156 187.535156 364.910156 C 134.941406 364.910156 87.683594 342.03125 55.222656 305.667969 C 27.183594 274.300781 10.15625 232.910156 10.15625 187.53125 C 10.15625 89.574219 89.5625 10.152344 187.535156 10.152344 C 285.492188 10.152344 364.914062 89.574219 364.914062 187.53125 "/></g><path style=" stroke:none;fill-rule:nonzero;fill:#f2f2f2;fill-opacity:1;" d="M 187.535156 220.207031 C 219.683594 220.207031 248.964844 183.832031 248.964844 143.894531 C 248.964844 106.160156 241.667969 68.847656 187.535156 68.847656 C 133.394531 68.847656 126.09375 106.160156 126.09375 143.894531 C 126.09375 183.832031 155.378906 220.207031 187.535156 220.207031 "/><g clip-rule="nonzero" clip-path="url(#08dc72ec2d)"><path style=" stroke:none;fill-rule:nonzero;fill:#f2f2f2;fill-opacity:1;" d="M 319.84375 305.667969 C 287.371094 342.03125 240.128906 364.910156 187.535156 364.910156 C 134.941406 364.910156 87.683594 342.03125 55.222656 305.667969 C 54.664062 283.761719 69.25 233 143.664062 217.375 C 156.390625 230.367188 172.058594 237.714844 187.535156 237.714844 C 203.011719 237.714844 218.664062 230.367188 231.390625 217.375 C 305.816406 233 320.394531 283.761719 319.84375 305.667969 "/></g></g></svg>