PageSourceSearch

https://www.codedex.io/_next/static/chunks/pages/community/project-showcase/create-d2dbed56bd7190a8.js

js codedex.io collected 2026-09-25 14:55:59 UTC 28,767 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8195],{74209:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/community/project-showcase/create",function(){return t(83020)}])},31935:function(e,n,t){"use strict";t.d(n,{Z:function(){return community_VideoUploadTracker}});var o=t(82729),r=t(85893),i=t(19521),a=t(609),l=t(9473),s=t(67294),c=t(39828),functions_useUploadProgress=function(e){let[n,t]=(0,s.useState)({videoProgress:0,thumbNailProgress:0}),o=(0,c.ad)();return(0,s.useEffect)(()=>{let n=(0,c.JU)(o,"uploadProgress",e),r=(0,c.cf)(n,e=>{let n=e.data();if(n){let{video:e,thumbnail:o}=n,r=Math.round(e),i=Math.round(o);t({videoProgress:r,thumbNailProgress:i})}});return()=>r()},[e,o]),n},d=t(47010);function _templateObject(){let e=(0,o._)(['\n  padding: 16px 16px;\n  border-radius: 7px;\n  font-family: "Mulish", sans-serif;\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n\n  p {\n    color: ',';\n  }\n\n  .uploading {\n    display: flex;\n    flex-direction: column;\n\n    .progress {\n      font-weight: 700;\n      font-size: 20px;\n      text-align: end;\n      font-family: "Mulish", sans-serif;\n    }\n\n    .progress-bar {\n      height: 5px;\n      border-radius: 5px;\n      transition: background 0.1s ease;\n    }\n  }\n\n  .video-label {\n    font-weight: 600;\n    /* margin-top: 8px; */\n  }\n\n  .status-text {\n    font-size: 14px;\n    color: ',";\n  }\n\n  .redirected {\n    display: flex;\n    flex-direction: column;\n    /* align-items: center; */\n    /* margin-top: 1rem; */\n    /* text-align: center; */\n    gap: 1rem;\n    color: ",";\n  }\n"]);return _templateObject=function(){return e},e}let u=i.default.div.withConfig({componentId:"sc-e022437c-0"})(_templateObject(),e=>{let{theme:n}=e;return"dark"==n.mode?n.colors.palette.grey["300"]:n.colors.palette.grey["600"]},e=>{let{theme:n}=e;return"dark"==n.mode?n.colors.palette.grey["400"]:n.colors.palette.grey["600"]},e=>{let{theme:n}=e;return"dark"==n.mode?n.colors.palette.grey["300"]:n.colors.palette.grey["600"]});var community_VideoUploadTracker=function(e){let{textContent:n,uid:t,showTracker:o}=e,i=(0,l.v9)(a.o4)||"dark",c="dark"===i,[p,m]=(0,s.useState)(0),h=functions_useUploadProgress(t);(0,s.useEffect)(()=>{0!=h.videoProgress&&m(h.videoProgress)},[h]);let g={pending:{border:c?"#854D0E":"#FEF08A",background:c?"#422006":"#FEFCE8",textAccent:c?"#FEF08A":"#854D0E"},complete:{border:c?"#3F6212":"#D9F99D",background:c?"#1A2E05":"#F7FEE7",textAccent:c?"#D9F99D":"#3F6212"},incomplete:{border:c?"#64748B":"#CBD5E1",background:c?"#0F172A":"#F8FAFC",textAccent:c?"#D9F99D":"#64748B"}}[100===p?"complete":"incomplete"];if(o)return(0,r.jsxs)(u,{style:{border:"2px solid ".concat(g.border),backgroundColor:g.background},children:[(0,r.jsxs)("div",{className:"uploading",children:[(0,r.jsxs)("p",{className:"progress",style:{color:100===p?"#A3E635":"#14ADFF"},children:[p,"%"]}),(0,r.jsx)("p",{className:"progress-bar",style:{background:"linear-gradient(to right, ".concat(100===p?"#A3E635":"#14ADFF"," ").concat(p,"%, ").concat(c?"#1E293B":"#F1F5F9"," ").concat(p,"%)")}})]}),(0,r.jsx)("p",{className:"video-label",children:100===p?"Video uploaded":"Video uploading"}),100!=p&&(0,r.jsx)("p",{className:"status-text",children:"It will take a while to upload long videos. Make sure to keep your browser tab open to avoid upload interruptions."}),100===p&&(0,r.jsxs)("p",{className:"status-text redirected",children:["You will be taken to your posts shortely (๑˃ᴗ˂)ﻭ",(0,r.jsx)(d.Z,{color:"#A3E635"})]})]})}},85712:function(e,n,t){"use strict";var o=t(85893);n.Z=function(e){let{color:n="#64748B",...t}=e;return(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",...t,children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 2.5H4H20H22V18.5H20H17V20.5H15V18.5H9V20.5H7V18.5H4H2V2.5ZM7 20.5V22.5H5V20.5H7ZM17 20.5V22.5H19V20.5H17ZM20 4.5H4V16.5H20V4.5ZM12 8.5H14V10.5H12V8.5ZM10 12.5V10.5H12V12.5H10ZM10 12.5V14.5H8V12.5H10ZM16 12.5H14V10.5H16V12.5ZM16 12.5H18V14.5H16V12.5ZM8 6.5H6V8.5H8V6.5Z",fill:"#64748B"})})}},74796:function(e,n,t){"use strict";var o=t(82729),r=t(85893),i=t(19521);
1function _templateObject(){let e=(0,o._)(["\n  background-color: ",';\n  font-family: "Mulish", sans-serif;\n  padding-top: 3.9rem;\n\n  p {\n    margin: 0px;\n  }\n  display: flex;\n\n  '," {\n    .desktop-community-nav {\n      display: none;\n    }\n  }\n\n  "," {\n    .desktop-community-nav {\n      display: none;\n    }\n  }\n\n  "," {\n    .desktop-community-nav {\n      display: none;\n    }\n  }\n\n  "," {\n    .desktop-community-nav {\n      display: flex;\n    }\n  }\n"]);return _templateObject=function(){return e},e}let a=i.default.div.withConfig({componentId:"sc-f4a70080-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>{let{theme:n}=e;return n.breakpoints.xs},e=>{let{theme:n}=e;return n.breakpoints.sm},e=>{let{theme:n}=e;return n.breakpoints.md},e=>{let{theme:n}=e;return n.breakpoints.lg});n.Z=function(e){let{children:n}=e;return(0,r.jsx)(a,{children:n})}},52861:function(e,n,t){"use strict";var o=t(82729),r=t(85893),i=t(19521);function _templateObject(){let e=(0,o._)(["\n  flex: 1;\n  display: flex;\n  justify-content: center;\n  gap: 24px;\n  min-height: 100vh;\n  max-width: 100%;\n\n  "," {\n    padding: 24px 0px 0px 0px;\n\n    &.single-post-feed {\n      padding: 20px 16px;\n    }\n\n    .sidebar {\n      display: none;\n    }\n\n    .community-channel-banner {\n      display: none;\n    }\n\n    .mobile-community-nav {\n      display: flex;\n    }\n  }\n\n  "," {\n    padding: 24px;\n\n    &.single-post-feed {\n      padding: 24px 40px 0px 40px;\n      gap: 40px;\n    }\n\n    .sidebar {\n      display: flex;\n    }\n\n    .community-channel-banner {\n      display: flex;\n    }\n\n    .mobile-community-nav {\n      display: none;\n    }\n  }\n\n  "," {\n  }\n\n  "," {\n  }\n"]);return _templateObject=function(){return e},e}let a=i.default.div.withConfig({componentId:"sc-57e440b1-0"})(_templateObject(),e=>{let{theme:n}=e;return n.breakpoints.xs},e=>{let{theme:n}=e;return n.breakpoints.sm},e=>{let{theme:n}=e;return n.breakpoints.md},e=>{let{theme:n}=e;return n.breakpoints.lg});n.Z=function(e){let{children:n,...t}=e;return(0,r.jsx)(a,{...t,children:n})}},72264:function(e,n,t){"use strict";var o=t(82729),r=t(85893),i=t(19521),a=t(41664),l=t.n(a),s=t(11163),c=t(67294),d=t(609),u=t(9473);function _templateObject(){let e=(0,o._)(["\n  padding: 10px;\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  border-radius: 8px;\n  /* background: ",";\n  border: 2px solid #14adff; */\n  border: 2px solid transparent;\n\n  &.current {\n    /* border: 2px solid #14adff; */\n    background: ",";\n\n    p {\n      color: ",";\n    }\n\n    svg {\n      path {\n        fill: ",";\n      }\n    }\n  }\n\n  :hover {\n    transition-duration: 0.2s;\n    background: ",";\n\n    p {\n      color: ",";\n    }\n\n    svg {\n      path {\n        fill: ",";\n      }\n    }\n  }\n\n  p {\n    margin: 0px;\n    color: ",";\n    font-size: 16px;\n    font-style: normal;\n    font-weight: 600;\n    line-height: 150%;\n  }\n\n  svg {\n    path {\n      fill: ",";\n    }\n  }\n\n  .new-post-indicator {\n    width: 8px;\n    height: 8px;\n    background-color: ",";\n    border-radius: 50%;\n    position: absolute;\n    left: -4px;\n  }\n"]);return _templateObject=function(){return e},e}let p=i.default.div.withConfig({componentId:"sc-dc660846-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.background.blue.primary},e=>{let{theme:n}=e;return n.colors.background.blue.primary},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.background.blue.primary},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.text.tertiary},e=>{let{theme:n}=e;return n.colors.text.primary});n.Z=function(e){let{channel:n}=e,t=(0,s.useRouter)(),o=(0,u.v9)(d.f8),i=t.asPath.includes("community/".concat(null==n?void 0:n.internalName)),a=(0,c.useMemo)(()=>JSON.parse(sessionStorage.getItem("newPostToSee-".concat(null==n?void 0:n.internalName)))||!1,[null==n?void 0:n.internalName]),[m,h]=(0,c.useState)(a);return(0,c.useEffect)(()=>{async function channelReadStatus(){let e=await fetch("/api/community/getChannelReadStatus?communityName=".concat(null==n?void 0:n.internalName,"&uid=").concat(o)),t=await e.json(),r=t.read;h(!r)}
1o&&channelReadStatus()},[null==n?void 0:n.internalName,o]),(0,c.useEffect)(()=>{sessionStorage.setItem("newPostToSee-".concat(null==n?void 0:n.internalName),JSON.stringify(m))},[m,null==n?void 0:n.internalName]),(0,c.useEffect)(()=>{let e=t.query.channel===(null==n?void 0:n.internalName);m&&e&&h(!1)},[t.query.channel,m,null==n?void 0:n.internalName]),(0,r.jsx)(l(),{href:"/community/".concat(n.internalName),style:{textDecoration:"none"},children:(0,r.jsxs)(p,{className:"nes-pointer ".concat(i&&"current"),children:[m&&o&&(0,r.jsx)("div",{className:"new-post-indicator"}),(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 4H8V8L4 8V10H8V14H4V16H8V20H10V16L14 16V20H16V16H20V14H16V10H20V8L16 8V4H14V8L10 8V4ZM10 10V14L14 14V10L10 10Z",fill:"#020617"})}),(0,r.jsx)("p",{children:n.displayName})]})})}},82077:function(e,n,t){"use strict";var o=t(82729),r=t(85893),i=t(19521),a=t(37719),l=t(78777),s=t(85712),c=t(61716),d=t(72264);function _templateObject(){let e=(0,o._)(["\n  flex-shrink: 0;\n  width: 260px;\n  position: sticky;\n  top: 3.9rem;\n  height: calc(100vh - 3.9rem);\n  padding: 12px 12px;\n  overflow: auto;\n\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  border-right: 2px solid ",";\n  \n  .regular-channels {\n    display: flex;\n    flex-direction: column;\n    gap: 8px;\n\n    .channel-label {\n      padding: 0px 12px;\n      color: ",";\n      font-size: 12px;\n      font-weight: 600;\n      line-height: 150%;\n      letter-spacing: 1.68px;\n      text-transform: uppercase;\n    }\n  }\n"]);return _templateObject=function(){return e},e}let u=i.default.div.withConfig({componentId:"sc-250a310a-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.border.grey.light},e=>{let{theme:n}=e;return n.colors.text.tertiary});n.Z=function(){let e=[{name:"Home",icon:(0,r.jsx)(l.Z,{}),link:"/community",internalName:"home"},{name:"Leaderboards",icon:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 5H13H15V7V19V21H13H11H9V19V7V5H11ZM13 19V7H11V19H13ZM6 11H4H2V13V19V21H4H6H8V19V13V11H6ZM6 13H4V19H6V13ZM18 15H20H22V17V19V21H20H18H16V19V17V15H18ZM20 19V17H18V19H20Z",fill:"#64748B"})}),link:"/community/leaderboards",internalName:"leaderboards"},{name:"Project Showcase",icon:(0,r.jsx)(s.Z,{}),link:"/community/project-showcase",internalName:"project-showcase"},{name:"Monthly Challenge",icon:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0001 2H7.99988H5.99988V4L4 4H2V6V12H3.99988V14L5.99988 14H7.99988V6H8V4L16.0001 4V6V14L18 14L18.0001 14L20 14V12H21.9999V6H22.0001V4H21.9999H19.9999H18.0001V2H17.9999H16.0001ZM19.9999 6V12H18.0001V6H19.9999ZM5.99988 12H4V6H5.99988V12ZM15.9999 14H7.99988V16H15.9999V14ZM10.9999 16.0001H12.9999V20H15.9999V22H7.99988V20H10.9999V16.0001Z",fill:"#64748B"})}),link:"/community/monthly-challenge",internalName:"monthly-challenge"},{name:"#30NitesOfCode",icon:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.5 1H15.5V3H11.5V5V7H7.5V9H5.5V5H7.5V3H9.5V1ZM17.5 21V23H7.5V21H5.5V19H3.5V9H5.5V15H9.5V17H11.5V21H17.5ZM17.5 19V21H19.5V19H20.5H21.5V9H19.5V5H17.5V3H15.5V5H17.5V9H19.5V16H17.5V19ZM16.5 10H12.5V14H16.5V10Z",fill:"#64748B"})}),link:"/community/30-nites-of-code",internalName:"30-nites-of-code"}],n=(0,a.cg)();return(0,r.jsxs)(u,{className:"desktop-community-nav",children:[(0,r.jsx)("div",{className:"priority-channels",children:e.map(e=>(0,r.jsx)(c.Z,{channel:e},e.name))}),(0,r.jsxs)("div",{className:"regular-channels",children:[(0,r.jsx)("p",{className:"channel-label",children:"Channels"}),(0,r.jsx)("div",{className:"channels",children:n.map(e=>(0,r.jsx)(d.Z,{channel:e},e.internalName))})]})]})}},61716:function(e,n,t){"use strict";var o=t(82729),r=t(85893),i=t(41664),a=t.n(i),l=t(11163),s=t(19521);
1function _templateObject(){let e=(0,o._)(["\n  padding: 10px;\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  border-radius: 8px;\n  /* background: ",";\n  border: 2px solid #14adff; */\n  border: 2px solid transparent;\n\n  &.current {\n    /* border: 2px solid #14adff; */\n    background: ",";\n    color: ",";\n\n    p {\n      color: ",";\n    }\n\n    svg {\n      path {\n        fill: ",";\n      }\n    }\n  }\n\n  :hover {\n    transition-duration: 0.2s;\n    background: ",";\n\n    p {\n      color: ",";\n    }\n\n    svg {\n      path {\n        fill: ",";\n      }\n    }\n  }\n\n  p {\n    margin: 0px;\n    color: ",";\n    font-size: 16px;\n    font-style: normal;\n    font-weight: 600;\n    line-height: 150%;\n  }\n"]);return _templateObject=function(){return e},e}let c=s.default.div.withConfig({componentId:"sc-357e5de7-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.background.blue.primary},e=>{let{theme:n}=e;return n.colors.background.blue.primary},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.background.blue.primary},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.text.secondary});n.Z=function(e){let{channel:n}=e,t=(0,l.useRouter)(),o=t.asPath.includes(null==n?void 0:n.internalName),i="/community"===t.asPath&&"Home"===n.name;return(0,r.jsx)(a(),{href:n.link,style:{textDecoration:"none"},children:(0,r.jsxs)(c,{className:"nes-pointer ".concat((o||i)&&"current"),children:[n.icon,(0,r.jsx)("p",{children:n.name})]})})}},37719:function(e,n,t){"use strict";t.d(n,{A3:function(){return getChannelMetaInfo},Dz:function(){return canMoveCommunityPost},Lm:function(){return getMovableChannels},cg:function(){return getFilteredChannels}});let o=[{displayName:"Cod\xe9dex Community",internalName:"home",description:"Let's make magic together ⋆˙⟡",imgSrc:"/images/community/bouncer.gif",longDescription:"Your home base for the Cod\xe9dex community. Catch up on announcements, see what everyone's building, and jump into the conversation."},{displayName:"Leaderboards",internalName:"leaderboards",description:"Compete with other users and rise to the top ٩(。•́‿•̀。)۶",imgSrc:"/images/community/trophy.gif",longDescription:"See how you stack up against other learners. Earn XP, climb the ranks, and cheer on the coders at the top."},{displayName:"Project Showcase",internalName:"project-showcase",description:"Showcase something that you built (੭˃ᴗ˂)੭",imgSrc:"/images/community/rocket.gif",longDescription:"Built something you're proud of? Share it here for feedback, inspiration, and a little bit of applause from the community."},{displayName:"Monthly Challenge",internalName:"monthly-challenge",description:"Let's make magic together ⋆˙⟡",imgSrc:"/images/community/bouncer.gif",longDescription:"A fresh coding challenge every month to keep your skills sharp. Take part, compare notes with others, and level up together."},{displayName:"General",internalName:"main",description:"Community-wide conversations ◡̈",imgSrc:"/images/community/bouncer.gif",longDescription:"The place for everything and anything. Chat with fellow learners about whatever's on your mind."},{displayName:"Question of the Week",internalName:"question-of-the-week",description:"Join a new conversation every week",imgSrc:"https://gifdb.com/images/high/pixel-art-8bit-subaru-duck-kfvqxp9q2x0l5m30.gif",imageBackground:"#AEFFFF",longDescription:"A new question drops every week to spark discussion. Share your take and see how others answered."},{displayName:"Introductions",internalName:"introduction",description:"Say hi to the community *_*",imgSrc:"/images/community/wave.png",longDescription:"Welcome to the community! Get yourself started by introducing yourself to fellow learners. This is short copy meant to give context on purpose of the channel."},{displayName:"Python",internalName:"python",description:"Everything Python including Python libraries!",imgSrc:"/images/editor/python-logo.png",imageBackgroun
1d:"#AEFFFF",longDescription:"Talk all things Python here, from syntax questions to your favorite libraries and frameworks."},{displayName:"Web Development",internalName:"web-dev",description:"All things web: HTML, CSS, JavaScript, and more!",imgSrc:"https://hwencc.gallerycdn.vsassets.io/extensions/hwencc/html-tag-wrapper/0.2.3/1505878793186/Microsoft.VisualStudio.Services.Icons.Default",imageBackground:"#E4BE03",longDescription:"Dive into HTML, CSS, JavaScript, and everything else that makes the web work. Ask questions, share resources, and swap tips."},{displayName:"Tech News",internalName:"tech-news",description:"Stay updated with the latest industry news",imgSrc:"/images/community/news.png",longDescription:"Keep up with what's happening in tech. Share interesting articles, product launches, and industry updates worth talking about."},{displayName:"Career",internalName:"career",description:"A place to share career advice, opportunities, or related things.",imgSrc:"/images/community/career-suitcase.avif",longDescription:"Trade career advice, job opportunities, resume tips, and interview stories with fellow coders navigating the industry."},{displayName:"Memes",internalName:"meme",description:"Slacking off at work t(-.-t)",imgSrc:"https://gifdb.com/images/high/comedian-el-risitas-warp-face-kekw-meme-0bf8c28fx7xo9a1x.gif",longDescription:"Need a laugh? Post and enjoy the best coding memes the community has to offer."},{displayName:"Pets",internalName:"pets",description:"Share cute animal pics \uD83D\uDC36 \uD83D\uDC31 \uD83D\uDC39 \uD83D\uDC30 \uD83D\uDC38",imgSrc:"/images/community/mochi_avatar.png",longDescription:"A cozy corner for cute animal pics. Show off your furry, feathered, or scaly friends."},{displayName:"#30NitesOfCode",internalName:"30-nites-of-code",description:"Join our community-wide challenge of learning and building for 30-days. Start today!",imgSrc:"/images/code-nights/dragon.gif",imageBackground:"#CEA8EB",longDescription:"30 nights, one goal: build the coding habit. Check in daily, share your progress, and keep each other motivated."},{displayName:"Bug Reports",internalName:"bug-report",description:"Found a bug? \uD83D\uDC1B Report it here.",imgSrc:"/images/community/bug-reports (1).png",imageBackground:"#CEA8EB",hideTopPosts:!0,longDescription:"Spotted something broken on Cod\xe9dex? Let us know here so we can track it down and squash it."}],r=["home","leaderboards","monthly-challenge","project-showcase","30-nites-of-code","question-of-the-week"];function canMoveCommunityPost(e){return!r.includes(e)}function getMovableChannels(){return o.filter(e=>!r.includes(e.internalName))}function getChannelMetaInfo(e){let{channel:n}=e;return o.find(e=>e.internalName===n)}function getFilteredChannels(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["home","monthly-challenge","project-showcase","leaderboards","30-nites-of-code"];return o.filter(n=>!e.includes(n.internalName))}},54180:function(e,n,t){"use strict";t.d(n,{$:function(){return createProject}});var o=t(39828),r=t(92369),i=t(73664),a=t(16689);async function createProject(e){let{communityName:n,uid:t,title:l,imageFile:s,thumbNail:c,content:d,projectLink:u,projectTags:p,codeLink:m,buildId:h,buildComponent:g,tagLine:f}=e,{firestore:x}=(0,r.UM)(),y=(0,o.qs)(x);if(!n||!t||!l||void 0===d)throw Error("which community, uid, title, and description are required fields.");let b=(0,i.x)({uid:t});try{let e=(0,o.hJ)(x,"community",n,"posts"),r=(0,o.JU)(e),i={ownerUid:t,title:l,content:d,createdAt:(0,o.Bt)(),parent:null,postId:r.id,communityName:n,images:[],cardImage:"",userComments:0,userLikes:0,userDislikes:0,userReports:0,viewCount:0,reports:[],projectLink:u||"",codeLink:m||"",projectTags:p||[],pinnedByOwner:!1,buildComponent:g||{},buildId:h||null,tagLine:f};if(s)try{let e=(0,a.cF)(),t=(0,a.iH)(e,"community/".concat(n,"/post/").concat(r.id,"/").concat(s.name));await (0,a.KV)(t,s);let o=await (0,a.Jt)(t);i.images.push({url:o})}catch(e){return console.error("Error uploading image:",e),{status:500,post:null}}if(c)try{let e=(0,a.cF)(),t=(0,a.iH)(e,"community/".concat(n,"/post/").concat(r.id,"/").concat(c.name));await (0,a.KV)(t,c);let o=await (0,a.Jt)(t);i.cardImage=o}catch(e){return console.error("Error uploading image:",e),{status:500,post:null}}y.set(r,i),y.set(b,{postIds:(0,o.vr)(r.id)},{merge:!0}),await y.commit();let w=await (0,o.QT)(r),v=w.data();return{status:200,post:v}}catch(e){return console.error(e),{status:500,post:null}}}},83020:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSG:function(){return F},default:function(){return create}});var o=t(85893),r=t(99428),i=t(82077),a=t(74796),l=t(52861),s=t(82729),c=t(19521),d=t(67294),u=t
1(9473),p=t(609),m=t(11163),h=t(47010),g=t(54180),f=t(85673),x=t(73845),y=t(33363);function _templateObject(){let e=(0,s._)(["\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n\n  .label {\n    p {\n      color: ",";\n\n      font-size: 16px;\n      font-weight: 700;\n      line-height: 150%;\n    }\n  }\n\n  .tags-list {\n    display: flex;\n    align-items: center;\n    flex-wrap: wrap;\n    gap: 20px;\n\n    .tag {\n      display: flex;\n      align-items: center;\n      gap: 8px;\n\n      .checkbox {\n        display: flex;\n        justify-content: center;\n        align-items: center;\n        line-height: 1;\n        width: 24px;\n        height: 24px;\n        border-radius: 2px;\n        border: 2px solid ",";\n      }\n\n      .tag-name {\n        color: ",";\n\n        font-size: 16px;\n\n        font-weight: 500;\n        line-height: 150%;\n      }\n\n      .selected {\n        background-color: #14adff;\n        border: 2px solid #14adff;\n      }\n    }\n  }\n"]);return _templateObject=function(){return e},e}let b=c.default.div.withConfig({componentId:"sc-f04a2784-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.border.grey.medium},e=>{let{theme:n}=e;return n.colors.text.primary}),w=(0,o.jsx)("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M14.6875 1.3125C15.0938 1.6875 15.0938 2.34375 14.6875 2.71875L6.6875 10.7188C6.3125 11.125 5.65625 11.125 5.28125 10.7188L1.28125 6.71875C0.875 6.34375 0.875 5.6875 1.28125 5.3125C1.65625 4.90625 2.3125 4.90625 2.6875 5.3125L5.96875 8.59375L13.2812 1.3125C13.6562 0.90625 14.3125 0.90625 14.6875 1.3125Z",fill:"white"})}),v=[{internalName:"python",displayName:"Python"},{internalName:"javascript",displayName:"JavaScript"},{internalName:"html/css",displayName:"HTML/CSS"},{internalName:"portfolio",displayName:"Portfolio"},{internalName:"mongo",displayName:"Mongo"},{internalName:"game",displayName:"Game"},{internalName:"react",displayName:"React"},{internalName:"sql",displayName:"SQL"},{internalName:"design",displayName:"Design"},{internalName:"command-line",displayName:"Command Line"},{internalName:"c++",displayName:"C++"}];var project_showcase_ProjectTagsSelector=function(e){let{setSelectedTags:n,selectedTags:t}=e;return(0,o.jsxs)(b,{children:[(0,o.jsx)("div",{className:"label",children:(0,o.jsx)("p",{children:"Tags"})}),(0,o.jsx)("div",{className:"tags-list",children:v.map(e=>(0,o.jsxs)("div",{className:"tag nes-pointer ".concat(t.includes(e.internalName)&&"selected"),onClick:()=>{var o;return o=e.internalName,void(t.includes(o)?n(t.filter(e=>e!==o)):n([...t,o]))},children:[(0,o.jsx)("div",{className:"checkbox nes-pointer ".concat(t.includes(e.internalName)&&"selected"),children:t.includes(e.internalName)&&(0,o.jsx)(o.Fragment,{children:w})}),(0,o.jsx)("p",{className:"tag-name",children:e.displayName})]},e.internalName))})]})},j=t(73857),V=t(31935),N=t(74990),H=t(74448),k=t(79705),S=t(65884),C=t(86051),_=t(48159),D=t(81776);function ProjectPostForm_templateObject(){let e=(0,s._)(["\n  padding: 0px 16px;\n  margin-bottom: 5rem;\n  margin-top: 24px;\n  width: 100%;\n  max-width: 700px;\n\n  display: flex;\n  flex-direction: column;\n  gap: 24px;\n\n  .upload-btn {\n    display: flex;\n    justify-content: flex-end;\n\n    button {\n      width: 170px;\n    }\n  }\n\n  .postform-title {\n    display: flex;\n    flex-direction: column;\n    gap: 12px;\n\n    .title-description {\n      display: none;\n    }\n  }\n"]);return ProjectPostForm_templateObject=function(){return e},e}let Z=c.default.div.withConfig({componentId:"sc-625567b6-0"})(ProjectPostForm_templateObject());var project_showcase_ProjectPostForm=function(){var e,n;let t=(0,m.useRouter)(),r=null==t?void 0:null===(e=t.query)||void 0===e?void 0:e.build,i=(0,u.v9)((0,D.hx)()),a=(0,u.v9)(p.f8),[l,s]=(0,d.useState)([]),[c,b]=(0,d.useState)([]),[w,v]=(0,d.useState)(""),[F,M]=(0,d.useState)(""),[P,E]=(0,d.useState)(""),[L,T]=(0,d.useState)(""),[O,B]=(0,d.useState)(""),[A,I]=(0,d.useState)([]),[R,q]=(0,d.useState)({previewType:null,buildType:i.type}),[J,z]=(0,d.useState)(!1),U=(0,u.v9)(p.nU),G=U>=100,W=(0,x.T)();async function handleSubmit(e){if(e.preventDefault(),!G){W((0,f.fz)({message:"100 XP required to post."}));return}z(!0);try{let e=await (0,g.$)({communityName:"project-showcase",uid:a,title:w,imageFile:l[0],thumbNail:c[0],content:F,codeLink:L,projectLink:P,projectTags:A,buildId:null==i?void 0:i.id,buildComponent:R,tagLine:O});200===e.status&&(sessionStorage.clear(),t.push("/community/project-showcase/".concat(e.post.postId)))}catch(e){console.error(e)}}
1let X=r&&"html-css-js"===i.type;return(0,o.jsxs)(Z,{children:[(0,o.jsx)(N.Z,{text:"Post a Project"}),r&&(0,o.jsx)(C.Z,{}),(0,o.jsx)(H.Z,{title:w,setTitle:v,placeholder:"Project Name"}),(0,o.jsx)(k.Z,{setPostMainContent:M,value:F,title:"Description",placeholder:"Summary about your wonderful project!"}),(0,o.jsx)(y.Z,{value:O,setValue:B,label:"Tag Line",labelDescription:"One sentence that sums up what your project does",placeholder:"e.g. A weather app that only says probably"}),!r&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(y.Z,{value:P,setValue:E,label:"Link to live demo",labelDescription:"e.g. on Vercel, GitHub Pages, or Cod\xe9dex Builds",placeholder:"e.g.  https://project-name.vercel.app"}),(0,o.jsx)(y.Z,{value:L,setValue:T,label:"Code repository (GitHub Repo)",placeholder:"e.g. https://github.com/user/repo-name"})]}),(0,o.jsx)(project_showcase_ProjectTagsSelector,{setSelectedTags:I,selectedTags:A}),X&&(0,o.jsx)(_.Z,{setBuildComponent:q,buildComponent:R,setDroppedFiles:s,droppedFiles:l}),!X&&(0,o.jsx)(S.Z,{setDroppedFiles:s,droppedFiles:l,label:"Cover image",required:!0,description:"Add a thumbnail image for your project. This will appear when your project is displayed in the Project Showcase page and other areas of the site.",disableVideo:!0,detectNSFW:!0}),(0,o.jsx)(S.Z,{setDroppedFiles:b,droppedFiles:c,label:"Additional image",required:!0,description:"Add another image, such as a screenshot of your project. This will be displayed on your project details page.",disableVideo:!0,detectNSFW:!0}),J&&(null===(n=l[0])||void 0===n?void 0:n.type.includes("video"))&&(0,o.jsx)(V.Z,{textContent:"This is a test",uid:a,showTracker:J}),J?(0,o.jsx)("div",{className:"upload-btn",children:(0,o.jsx)(j.Z,{children:(0,o.jsx)(h.Z,{})})}):(0,o.jsx)("div",{className:"upload-btn",children:(0,o.jsx)(j.Z,{onClick:e=>handleSubmit(e),disabled:0===O.length||0===w.length||0===F.length||0===c.length||0===A.length||"images"==R.previewType&&0===l.length,children:"Post"})})]})},F=!0,create=function(){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.Z,{learningEnv:"community"}),(0,o.jsxs)(a.Z,{children:[(0,o.jsx)(i.Z,{}),(0,o.jsx)(l.Z,{children:(0,o.jsx)(project_showcase_ProjectPostForm,{})})]})]})}}},function(e){e.O(0,[1272,8700,4153,1622,9280,2512,9428,5884,5388,3109,9774,2888,179],function(){return e(e.s=74209)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.