PageSourceSearch

https://irfaqraza.com/_next/static/chunks/3801-5a0fd060c38c1747.js

js irfaqraza.com collected 2026-09-25 22:41:52 UTC 74,222 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3801],{23638:(e,t,l)=>{l.d(t,{A:()=>h});var a=l(37876),s=l(14232),n=l(95062),r=l.n(n),o=l(38333);function i(e,t){let l=new Date(e);return l.setDate(l.getDate()+t),l}function d(e){return e instanceof Date?e:new Date(e)}function u(e){let t=[];for(let l=0;l<e;l+=1)t.push(l);return t}let c="react-calendar-heatmap-";class m extends s.Component{getDateDifferenceInDays(){let{startDate:e,numDays:t}=this.props;return t?(console.warn("numDays is a deprecated prop. It will be removed in the next release. Consider using the startDate prop instead."),t):Math.ceil((this.getEndDate()-d(e))/864e5)}getSquareSizeWithGutter(){return 10+this.props.gutterSize}getMonthLabelSize(){return this.props.showMonthLabels?this.props.horizontal?14:28:0}getWeekdayLabelSize(){return!this.props.showWeekdayLabels||this.props.horizontal?0:10}getStartDate(){return i(this.getEndDate(),-this.getDateDifferenceInDays()+1)}getEndDate(){var e;return new Date((e=d(this.props.endDate)).getFullYear(),e.getMonth(),e.getDate())}getStartDateWithEmptyDays(){return i(this.getStartDate(),-this.getNumEmptyDaysAtStart())}getNumEmptyDaysAtStart(){return this.getStartDate().getDay()}getNumEmptyDaysAtEnd(){return 6-this.getEndDate().getDay()}getWeekCount(){return Math.ceil((this.getDateDifferenceInDays()+this.getNumEmptyDaysAtStart()+this.getNumEmptyDaysAtEnd())/7)}getWeekWidth(){return 7*this.getSquareSizeWithGutter()}getWidth(){return this.getWeekCount()*this.getSquareSizeWithGutter()-(this.props.gutterSize-this.getWeekdayLabelSize())}getHeight(){return this.getWeekWidth()+(this.getMonthLabelSize()-this.props.gutterSize)+this.getWeekdayLabelSize()}getValueForIndex(e){return this.valueCache[e]?this.valueCache[e].value:null}getClassNameForIndex(e){return this.valueCache[e]?this.valueCache[e].className:this.props.classForValue(null)}getTooltipDataAttrsForIndex(e){return this.valueCache[e]?this.valueCache[e].tooltipDataAttrs:this.getTooltipDataAttrsForValue({date:null,count:null})}getTooltipDataAttrsForValue(e){let{tooltipDataAttrs:t}=this.props;return"function"==typeof t?t(e):t}getTransformForWeek(e){return this.props.horizontal?"translate(".concat(e*this.getSquareSizeWithGutter(),", 0)"):"translate(0, ".concat(e*this.getSquareSizeWithGutter(),")")}getTransformForWeekdayLabels(){return this.props.horizontal?"translate(".concat(10,", ").concat(this.getMonthLabelSize(),")"):null}getTransformForMonthLabels(){return this.props.horizontal?"translate(".concat(1.7*this.getWeekdayLabelSize(),", 0)"):"translate(".concat(this.getWeekWidth()+4,", ").concat(this.getWeekdayLabelSize(),")")}getTransformForAllWeeks(){return this.props.horizontal?"translate(".concat(this.getWeekdayLabelSize(),", ").concat(this.getMonthLabelSize(),")"):"translate(0, ".concat(this.getWeekdayLabelSize(),")")}getViewBox(){return this.props.horizontal?"0 0 ".concat(this.getWidth()," ").concat(this.getHeight()):"0 0 ".concat(this.getHeight()," ").concat(this.getWidth())}getSquareCoordinates(e){return this.props.horizontal?[0,e*this.getSquareSizeWithGutter()]:[e*this.getSquareSizeWithGutter(),0]}getWeekdayLabelCoordinates(e){return this.props.horizontal?[0,(e+1)*10+e*this.props.gutterSize]:[10*e+e*this.props.gutterSize,10]}getMonthLabelCoordinates(e){return this.props.horizontal?[e*this.getSquareSizeWithGutter(),this.getMonthLabelSize()-4]:[0,(e+1)*this.getSquareSizeWithGutter()+-2]}handleClick(e){this.props.onClick&&this.props.onClick(e)}handleMouseOver(e,t){this.props.onMouseOver&&this.props.onMouseOver(e,t)}handleMouseLeave(e,t){this.props.onMouseLeave&&this.props.onMouseLeave(e,t)}renderSquare(e,t){if((t<this.getNumEmptyDaysAtStart()||t>=this.getNumEmptyDaysAtStart()+this.getDateDifferenceInDays())&&!this.props.showOutOfRangeDays)return null;let[l,s]=this.getSquareCoordinates(e),n=this.getValueForIndex(t),r=(0,a.jsx)("rect",{width:10,height:10,x:l,y:s,rx:2,className:this.getClassNameForIndex(t),onClick:()=>this.handleClick(n),onMouseOver:e=>this.handleMouseOver(e,n),onMouseLeave:e=>this.handleMouseLeave(e,n),...this.getTooltipDataAttrsForIndex(t)},t),{transformDayElement:o}=this.props;return o?o(r,n,t):r}renderWeek(e){return(0,a.jsx)("g",{transform:this.getTransformForWeek(e),className:"".concat(c,"week"),children:u(7).map(t=>this.renderSquare(t,7*e+t))},e)}renderAllWeeks(){return u(this.getWeekCount()).map(e=>this.renderWeek(e))}renderMonthLabels(){return this.props.showMonthLabels?u(this.getWeekCount()-1).map(e=>{let t=i(this.getStartDateWithEmptyDays(),7*e),[l,s]=this.getMonthLabelCoordinates(e);return t.getDate()>=1&&7>=t.getDate()?(0,a.jsx)("text",{x:l,y:s,className:"".concat(c,"month-label"),children:this.props.monthLabels[t.getMonth()]},e):null}):null}renderWeekdayLabels(){return this.props.showWeekdayLabels?this.props.weekdayLabels.map((e,t)=>{let[l,s]=this.getWeekdayLabelCoordinates(t),n="".concat(this.props.horizontal?"":"".concat(c,"small-text")," ").concat(c,"weekday-label");return 1&t?(0,a.jsx)("text",{x:l,y:s,className:n,children:e},"".concat(l).concat(s)):null}):null}render(){return this.valueCache=this.getValueCache(this.props),(0,a.jsxs)("svg",{className:"react-calendar-heatmap",viewBox:this.getViewBox(),children:[(0,a.jsx)("g",{transform:this.getTransformForMonthLabels(),className:"".concat(c,"month-labels"),children:this.renderMonthLabels()}),(0,a.jsx)("g",{transform:this.getTransformForAllWeeks(),className:"".concat(c,"all-weeks"),children:this.renderAllWeeks()})]})}constructor(...e){super(...e),this.getValueCache=(0,o.A)(e=>e.values.reduce((e,t)=>
1(e[Math.floor((d(t.date)-this.getStartDateWithEmptyDays())/864e5)]={value:t,className:this.props.classForValue(t),title:this.props.titleForValue?this.props.titleForValue(t):null,tooltipDataAttrs:this.getTooltipDataAttrsForValue(t)},e),{}))}}m.propTypes={values:r().arrayOf(r().shape({date:r().oneOfType([r().string,r().number,r().instanceOf(Date)]).isRequired}).isRequired).isRequired,numDays:r().number,startDate:r().oneOfType([r().string,r().number,r().instanceOf(Date)]),endDate:r().oneOfType([r().string,r().number,r().instanceOf(Date)]),gutterSize:r().number,horizontal:r().bool,showMonthLabels:r().bool,showWeekdayLabels:r().bool,showOutOfRangeDays:r().bool,tooltipDataAttrs:r().oneOfType([r().object,r().func]),titleForValue:r().func,classForValue:r().func,monthLabels:r().arrayOf(r().string),weekdayLabels:r().arrayOf(r().string),onClick:r().func,onMouseOver:r().func,onMouseLeave:r().func,transformDayElement:r().func},m.defaultProps={numDays:null,startDate:i(new Date,-200),endDate:new Date,gutterSize:1,horizontal:!0,showMonthLabels:!0,showWeekdayLabels:!1,showOutOfRangeDays:!1,tooltipDataAttrs:null,titleForValue:null,classForValue:e=>e?"color-filled":"color-empty",monthLabels:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdayLabels:["","Mon","","Wed","","Fri",""],onClick:null,onMouseOver:null,onMouseLeave:null,transformDayElement:null};let h=m},63801:(e,t,l)=>{l.d(t,{A:()=>eM});var a=l(37876),s=l(14232),n=l(2171),r=l(20328),o=l(21639),i=l(60383),d=l(70673),u=l(89311),c=l(34321),m=l(68827),h=l(34217),x=l(16495),g=l(75870),p=l(54587),f=l.n(p),v=l(48230),j=l.n(v),N=l(63819),b=l(58385),y=l(83872);let I={github:(0,a.jsx)(b.A.GithubSmall,{size:24}),dribbble:(0,a.jsx)(b.A.DribbbleSmall,{size:24}),medium:(0,a.jsx)(b.A.MediumSmall,{size:24}),substack:(0,a.jsx)(b.A.SubstackSmall,{size:24}),devto:(0,a.jsx)(b.A.Devto,{size:24}),youtube:(0,a.jsx)(b.A.YoutubeSmall,{size:24}),gumroad:(0,a.jsx)(b.A.GumroadSmall,{size:24}),productHunt:(0,a.jsx)(b.A.ProductHuntSmallP,{size:24}),projects:(0,a.jsx)(b.A.ProjectsLogo,{size:18}),rss:(0,a.jsx)(b.A.RSS,{size:24}),codeforces:(0,a.jsx)(b.A.CodeForcesColored,{size:24}),adplist:(0,a.jsx)(b.A.ADPList,{size:24}),leetcode:(0,a.jsx)(b.A.Leetcode,{size:24})},w={Logo:e=>{let{dbname:t,type:l,integrationURL:s="",customLogo:n=null}=e,r=n||I[t];return(0,a.jsx)("a",{href:(0,N.urlFormatter)(s,{addRef:!0}),target:"_blank",rel:"nofollow noreferrer",className:"outline-none focus:ring-[1px] focus:ring-green-100 rounded",tabIndex:"0",children:(0,a.jsxs)("div",{className:"flex items-center mr-4",children:[(0,a.jsx)("div",{className:"mr-2 h-auto relative",children:r}),(0,a.jsx)(u.default.SemiBoldText,{children:l})]})})},DeleteIntegration:e=>{let{setShowRemove:t}=e;return(0,a.jsx)(o.Ay.CarbonOutline,{small:!0,circular:!0,onClick:t,tabIndex:"0",className:"focus:border-green-100",children:(0,a.jsx)(y.TrashIcon,{size:16})})},RefreshIntegration:e=>{let{userid:t,integrationName:l,fetchIntegrationData:n}=e,[r,i]=(0,s.useState)(!1),d=async()=>{try{i(!0),await c.wv.refreshIntegration({userid:t,integrationName:l}),n()}catch(e){}finally{i(!1)}};return(0,a.jsx)(o.Ay.CarbonOutline,{small:!0,circular:!0,tabIndex:"0",onClick:d,className:"focus:border-green-100",loading:r,disabled:r,children:(0,a.jsx)(y.ReloadIcon,{size:12})})},IntegrationControls:e=>{let{userid:t,integrationName:l,setShowRemove:s,fetchIntegrationData:n=()=>{}}=e;return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(w.RefreshIntegration,{userid:t,integrationName:l,fetchIntegrationData:n}),(0,a.jsx)(w.DeleteIntegration,{setShowRemove:s})]})},CardWrapper:e=>{let{children:t,className:l="",primaryUser:s,integrationName:n,username:r,href:o="",padding:i="p-4",openInNewTab:d=!0,noFollowLink:u=!0,...c}=e;return(0,a.jsx)("article",{className:"".concat("flex flex-col justify-between flex-1 group border border-primaryBorder hover:shadow-focus rounded-xl overflow-hidden outline-none focus-within:border-green-100 transition-shadow"),role:"none",...c,children:o?(0,a.jsx)("a",{href:d?(0,N.urlFormatter)(o,{addRef:!0}):"".concat(o),target:d?"_blank":"_self",rel:u?"noreferrer nofollow ugc":"noreferrer",className:"outline-none ".concat(l," ").concat(i),children:t}):(0,a.jsx)("div",{className:l,children:t})})},ArticleContent:e=>{let{title:t,description:l="",image:s=""}=e;return(0,a.jsxs)("div",{className:"flex items-start justify-between",children:[(0,a.jsxs)("div",{className:"flex-1 mr-1 sm:mr-2",children:[(0,a.jsx)(u.default.SemiBoldText,{sm:!0,className:"mb-0.5 paragraph-clamp",children:t}),l&&(0,a.jsx)(u.default.NormalText,{xs:!0,className:"text-gray paragraph-clamp break-words",children:l})]}),s&&(0,a.jsx)("div",{id:s,className:"relative w-full max-w-[150px] h-20",children:(0,a.jsx)(f(),{src:s,fill:!0,alt:t,sizes:"(min-width: 380) 100v
1w",style:{objectFit:"cover"},className:"rounded border border-primaryBorder overflow-hidden",onError:e=>{e.target.style.display="none",(e=>{let t=document.getElementById(e);t.className="",t.style.display="none"})(s)}})}),(null==e?void 0:e.render)?null==e?void 0:e.render():null]})},CardFooter:e=>{let{publishedAt:t,isLoggedIn:l,handleShare:s}=e;return(0,a.jsxs)("div",{className:"w-full flex items-center justify-between mt-2",children:[(0,a.jsx)("div",{children:t&&(0,a.jsx)("p",{className:"text-gray-500 text-[10px]",children:(0,g.A)(new Date(t),"MMM dd, yyyy")})}),l&&(0,a.jsx)(o.Ay.CarbonOutline,{small:!0,circular:!0,onClick:e=>{e.preventDefault(),s()},className:"text-gray-500 focus:border-green-100",tabIndex:"0",children:(0,a.jsx)(y.ShareIcon,{size:14,stroke:2})})]})},Subscribe:e=>{let{subscribeLink:t="",onClick:l}=e;return(0,a.jsx)(j(),{href:(0,N.urlFormatter)(t,{addRef:!0}),target:"_blank",className:"outline-none focus-within:border focus:border-green-100 rounded",onClick:l,children:(0,a.jsx)(o.Ay.Carbon,{as:"span",small:!0,children:"Subscribe"})})},CardContent:e=>{let{image:t,title:l,children:n,integrationName:r}=e,o=r===x.default.INTEGRATION_TYPE_NAMES.DRIBBBLE?"h-[216px]":"h-[150px]",[i,d]=(0,s.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"relative ".concat(o," w-full overflow-hidden"),children:i?(0,a.jsx)(f(),{fill:!0,src:x.CDNImage.emptyPortfolio,alt:l,sizes:"(min-width: 380px): 100vw",style:{objectFit:"cover"}}):(0,a.jsx)(f(),{fill:!0,src:t||x.CDNImage.emptyPortfolio,alt:l,sizes:"(min-width: 380px): 100vw",style:{objectFit:"cover"},onError:()=>d(!0)})}),(0,a.jsxs)("div",{className:"p-4 flex-1 flex flex-col justify-between h-full",children:[(0,a.jsx)(u.default.SemiBoldText,{sm:!0,className:"paragraph-clamp",children:l}),n]})]})}};var S=l(6827),A=l(92503),D=l(71297),T=l(69198);let C=e=>{let[t,l]=(0,s.useState)(""),a=(0,n.useDispatch)(),{primaryUserData:r}
1=(0,n.useSelector)(e=>e.PrimaryUserData);return{deleteError:t,handleDeleteIntegration:async()=>{try{await c.Eo.deleteIntegration({userid:r.id,integrationName:e});let t={...r.integrations};delete t[e];let l=(null==r?void 0:r.integrationsOrder)?r.integrationsOrder.filter(t=>t.name!==e):void 0;a(S.Yt.updatePrimaryUserData({integrations:t,integrationsOrder:l})),a(A.iw.deleteIntegration(e)),D.A.DeleteToast(T.A.INTEGRATION.delete)}catch(e){var t,s,n;l((null==e||null==(n=e.response)||null==(s=n.data)||null==(t=s.error)?void 0:t.message)||m.A.GLOBAL.wrong)}}}};var M=l(82669);let k=x.default.INTEGRATION_NAMES_DB.devto,L=x.default.INTEGRATION_NAMES_DB.dribbble;var R=l(77410),O=l(18847),_=l.n(O),E=l(70041),F=l(11023),B=l(23638),G=l(38234);let U=_()(()=>l.e(8262).then(l.bind(l,58262)),{loadableGenerated:{webpack:()=>[58262]},ssr:!1}),W=[{label:"All Repositories",value:"repositories"},{label:"Pinned Repositories",value:"pinnedItems"}],z=x.default.INTEGRATION_NAMES_DB.github,P=s.memo(e=>{var t,l,r,d,g,p,f,v;let{data:j,createShareWork:I,username:S,userid:D,isLoggedIn:T,isPrimaryUser:k}=e,L=(0,n.useDispatch)(),{integrationData:R}=(0,n.useSelector)(e=>e.SecondaryUserData),{deleteError:O,handleDeleteIntegration:_}=C(z),P=x.default.INTEGRATION_SHARING_INFO[z],{addIntegration:H}=(0,E.A)({userId:j.id}),[V,q]=(0,s.useState)(!1),[Y,X]=(0,s.useState)(!1),[J,Q]=(0,s.useState)(),[K,Z]=(0,s.use
1State)(x.CARD_COUNT.MIN_LIMIT),[$,ee]=(0,s.useState)(W[0]),et=async()=>{var e,t,l,a,s;if(D)try{X(!0);let l=await c.wv.getGithub(D),a=N.default.getHeatmapColorCodes(l.data.data.contributions.map(e=>e.contributions));(null==(t=l.data.data)||null==(e=t.pinnedItems)?void 0:e.length)>0&&ee(W[1]),L(A.iw.updateIntegrationData({github:{userid:D,...l.data.data,colorCodeRef:a,user:S}}))}catch(e){Q((null==e||null==(s=e.response)||null==(a=s.data)||null==(l=a.error)?void 0:l.message)||m.A.GLOBAL.wrong),A.iw.updateIntegrationData({github:{userid:D,user:S}})}finally{X(!1)}},el=async()=>{X(!0),await _(),O&&Q(O),X(!1)},ea=j.integrations.github.verified||!1;return(0,s.useEffect)(()=>{var e,t;return(null==R||null==(e=R.github)?void 0:e.userid)&&D===(null==R||null==(t=R.github)?void 0:t.userid)||et(),()=>{X(),Q(),q(!1),Z(4),ee(W[0])}},[D]),J&&!(k||(null==j?void 0:j.me))?null:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.Suspense,{children:(0,a.jsxs)("section",{id:P.name,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(w.Logo,{dbname:P.dbname,type:P.name,isAuthenticated:ea,integrationURL:"https://github.com/".concat(S),customLogo:(0,a.jsx)("span",{className:"dark:invert",children:(0,a.jsx)(b.A.GithubSmall,{size:24})})}),!ea&&j.me&&!Y&&(0,a.jsx)("button",{type:"button",onClick:()=>H(x.default.INTEGRATION_NAMES_DB.github),children:(0,a.jsx)("span",{className:"text-xs font-semibold px-2 py-0.5 rounded-xl text-red transition-colors duration-200 bg-red-00 hover:text-green-400 hover:bg-green-00",children:"Get Verified"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[Y?(0,a.jsx)(M.A,{}):null,!Y&&j.me?(0,a.jsx)(w.IntegrationControls,{userid:null==j?void 0:j.id,integrationName:z,setShowRemove:()=>q(!0),fetchIntegrationData:()=>et()}):null]})]}),!Y&&R.github&&(0,a.jsxs)("div",{className:"mt-6",children:[(0,a.jsxs)("p",{className:"text-xs text-gray-1k font-normal mb-4",children:[(0,a.jsx)("span",{className:"font-semibold",children:null==(t=R.github)?void 0:t.totalContribution})," ","Contributions in the last year"]}),(0,a.jsxs)("div",{className:"".concat(Y?"opacity-50":"opacity-100"),children:[!Y&&(null==(l=R.github)?void 0:l.contributions)&&(0,a.jsx)("div",{className:"overflow-x-auto w-full h-full mb-4",children:(0,a.jsx)(B.A,{startDate:new Date(new Date().setFullYear(new Date().getFullYear()-1)),endDate:new Date().toISOString().slice(0,10),showWeekdayLabels:!0,showOutOfRangeDays:!0,tooltipDataAttrs:e=>{let t=G.A.getFormattedDateAndMonth(new Date(e.date));return e.count?{"data-tip":"".concat(e.count," Contributions on ").concat(t)}:{"data-tip":"No Contributions"}},classForValue:e=>{var t,l,a,s,n,r,o,i;return e&&0!==e.count?e.count>(null==(l=R.github)||null==(t=l.colorCodeRef)?void 0:t.darkest)?"color-github-4":e.count>(null==(s=R.github)||null==(a=s.colorCodeRef)?void 0:a.dark)?"color-github-3":e.count>(null==(r=R.github)||null==(n=r.colorCodeRef)?void 0:n.light)?"color-github-2":(e.count>(null==(i=R.github)||null==(o=i.colorCodeRef)||o.lightest),"color-github-1"):"color-empty"},values:null==(r=R.github)?void 0:r.contributions.map(e=>({date:e.contributionDate,count:e.contributions}))})}),(0,a.jsx)(U,{})]}),J&&k&&(0,a.jsx)(u.ErrorText,{className:"mt-4",children:J}),(null==R||null==(d=R.github)?void 0:d.totalRepositories)===0&&(0,a.jsx)(h.A.NoData,{text:"".concat(j.firstName," doesn't have any public repositories.")}),(null==R||null==(g=R.github)?void 0:g.totalRepositories)>0&&(0,a.jsxs)("div",{className:"flex items-center justify-between ".concat(Y?"opacity-50":"opacity-100"),children:[(0,a.jsxs)("p",{className:"text-xs",children:["Total"," ",(0,a.jsxs)("span",{className:"font-semibold",children:[null==(p=R.github)?void 0:p.totalRepositories," "]}),"repositories"]}),(0,a.jsx)(F.A,{position:"right",dropdownButton:(0,a.jsx)(o.Ay.CarbonOutline,{small:!0,tabIndex:"0",iconRight:(0,a.jsx)(y.ChevronDownIcon,{size:16}),children:$.label}),children:W.map(e=>{var t,l;if("pinnedItems"!==e.value||(null==(l=R.github)||null==(t=l.pinnedItems)?void 0:t.length)!==0)return(0,a.jsx)(F.e.Item,{selectedOption:e.value===$.value,onClick:()=>R.github[e.value]&&ee(e),children:e.label},"".concat(e.value))})})]}),(null==(f=R.github)?void 0:f.repositories)&&(0,a.jsx)("div",{className:"grid md:grid-cols-2 gap-4 mt-4",children:R.github[$.value].map((e,t)=>{if(t<K){let t=(null==e?void 0:e.owner)?(0,a.jsxs)("span",{className:"text-sm font-semibold",children:[(0,a.jsxs)("span",{className:"font-normal",children:[e.owner,"/"]}),e.name]}):e.name;return(0,a.jsxs)(w.CardWrapper,{integrationName:z,primaryUser:j.me,username:j.profileHandle,href:e.url,className:"flex flex-col justify-between h-full",children:[(0,a.jsx)(w.ArticleContent,{title:t,description:null==e?void 0:e.description}),(0,a.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(null==e?void 0:e.primaryLanguage)&&(0,a.jsxs)(a.Fragment,{children:[(0,N.getSkillImage)(e.primaryLanguage)?(0,a.jsx)("img",{src:(0,N.getSkillImage)(e.primaryLanguage),alt:"".concat(e.primaryLanguage," icon"),className:"w-4 h-4 object-cover mr-1",onError:e=>{e.target.style.display="hidden",e.target.className="-ml-1 w-0 h-0"}}):null,(0,a.jsx)(u.default.MutedText,{className:"mr-2 text-xxs",children:null==e?void 0:e.primaryLanguage})]}),(null==e?void 0:e.totalStars)>0&&(0,a.jsxs)(u.default.MutedText,{className:"flex items-center font-semibold mr-1 text-xxs",children:[(0,a.jsx)("span",{className:"mr-1",children:(0,a.jsx)(y.StarIcon,{size:14})}),null==e?void 0:e.totalStars]}),(null==e?void 0:e.forks)>0&&(0,a.jsxs)(u.default.MutedText,{className:"flex items-center font-semibold text-xxs",children:[(0,a.jsx)("span",{className:"mr-1",children:(0,a.jsx)(y.GitBranchIcon,{size:14})}),null==e?void 0:e.forks]})]}),T&&(0,a.jsx)(o.Ay.CarbonOutline,{small:!0,circular:!0,className:"text-gray-500 focus:border-green-100",tabIndex:"0",onClick:t=>{t.preventDefault(),((e,t)=>{let l=e.name,a={title:l,link:e.url,description:null==e?void 0:e.description,image:(e=>{let{githubUsername:t,repoName:l}=e;return"https://opengraph.githubassets.com/1/".concat(t,"/").concat(l)})({githubUsername:t,repoName:l})};k||(a.originalPoster=j.id),I(a)})(e,S)},children:(0,a.jsx)(y.ShareIcon,{size:16})})]})]},"".concat(e.name,"-github-repo"))}return null})}),(null==(v=R.github)?void 0:v[$.value])&&R.github[$.value].length>x.CARD_COUNT.MIN_LIMIT&&(0,a.jsx)(o.Ay.ShowMoreLargeBtn,{onClick:()=>(0,N.showMoreHandlerForIntegration)(K,Z),showMore:K!==x.CARD_COUNT.MAX_LIMIT}),J&&(0,a.jsxs)("div",{className:"text-center font-light mt-10",children:[(0,a.jsx)("p",{className:"text-4xl",children:"\uD83D\uDC40"}),(0,a.jsx)("p",{className:"mt-2 mb-1 text-base text-gray-1k",children:"Cannot fetch any details at the moment."})]})]})]})}),V&&(0,a.jsx)(i.A,{showModal:V,setShowModal:q,deleteText:"Are you sure you want to remove this section from portfolio?",confirm:()=>el()})]})});var H=l(5357);let V=x.default.INTEGRATION_NAMES_DB.gumroad,q=x.default.INTEGRATION_NAMES_DB.medium;var Y=l(89099),X=l(5641),J=l(94296);let Q=x.default.INTEGRATION_NAMES_DB.projects,K=x.default.INTEGRATION_NAMES_DB.substack,Z=e=>{let{substackNewsletter:t=null}=e;return t?(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(f(),{src:t.imageUrl,width:40,height:40,className:"w-10 h-10 rounded-full group-hover:shadow-focus transition-all object-cover",alt:"".concat(null==t?void 0:t.t
1itle," logo")}),(0,a.jsx)("span",{className:"absolute bottom-0 right-0 w-4 h-4 bg-gray-00 border-2 border-gray-00 ary flex items-center justify-center rounded-full shadow",children:(0,a.jsx)(b.A.SubstackSmall,{size:8})})]})}):(0,a.jsx)(b.A.SubstackSmall,{size:32})};var $=l(34870);let ee=x.default.INTEGRATION_NAMES_DB.youtube,et=x.default.INTEGRATION_NAMES_DB.productHunt,el=x.default.INTEGRATION_NAMES_DB.rss;var ea=l(34007),es=l(45907),en=l(18189),er=l(25493),eo=l(4069),ei=l(67362),ed=l(36571),eu=l(54955);let ec=x.default.INTEGRATION_NAMES_DB.codeforces,em=e=>{let{ratingsData:t,maxRating:l}=e,s=[{minRating:0,maxRating:1199,color:"#C1C1C1"},{minRating:1200,maxRating:1399,color:"#75FF5C"},{minRating:1400,maxRating:1599,color:"#6FD8AC"},{minRating:1600,maxRating:1899,color:"#9898FF"},{minRating:1900,maxRating:2099,color:"#F76DFF"},{minRating:2100,maxRating:2299,color:"#FCC072"},{minRating:2300,maxRating:2399,color:"#FBAC3D"},{minRating:2400,maxRating:2599,color:"#F75E63"},{minRating:2600,maxRating:2999,color:"#F61426"},{minRating:3e3,maxRating:4e3,color:"#940000"}],n=4e3;s.forEach((e,t)=>{l>=e.minRating&&l<=e.maxRating&&l<2400&&(n=s[t+2].maxRating)});let r=t.map(e=>({...e,parsedDate:(0,g.A)(new Date(1e3*e.ratingUpdateTimeSeconds),"MMM yyyy")}));return(0,a.jsx)(ea.u,{width:"100%",height:236,children:(0,a.jsxs)(es.b,{data:r,margin:{top:20,right:30,left:20,bottom:5},children:[(0,a.jsx)(en.W,{dataKey:"parsedDate",interval:"equidistantPreserveStart"}),(0,a.jsx)(er.h,{domain:[800,n],ticks:s.map(e=>n>e.minRating?e.minRating:null).filter(e=>e)}),(0,a.jsx)(eo.d,{stroke:"none"}),(0,a.jsx)(ei.m,{content:(0,a.jsx)(eh,{}),wrapperStyle:{outline:"none"}}),s.map(e=>(0,a.jsx)(ed.T,{y1:e.minRating,y2:e.maxRating,fill:e.color,fillOpacity:.7,stroke:"#F6F8FA",strokeWidth:.25,ifOverflow:"hidden"},e.color)),(0,a.jsx)(eu.N,{type:"monotone",dataKey:"newRating",stroke:"#edc23f",strokeWidth:2.5,dot:{r:3,fill:"white"}})]})})},eh=e=>{let{active:t,payload:l}=e;return t&&l&&l.length?(0,a.jsxs)("div",{className:"bg-gray-00 border border-gray-300 shadow-xl p-4 rounded-xl text-xs",children:[(0,a.jsx)("p",{className:"label",children:"= ".concat(l[0].payload.newRating," +(").concat(l[0].payload.newRating-l[0].payload.oldRating,")")}),(0,a.jsx)("p",{className:"font-semibold",children:l[0].payload.contestName}),(0,a.jsx)("p",{className:"font-semibold",children:"Rank: ".concat(l[0].payload.rank)}),(0,a.jsx)("p",{className:"font-semibold",children:"Date: ".concat((0,g.A)(new Date(1e3*l[0].payload.ratingUpdateTimeSeconds),"dd/MM/yyyy"))})]}):null};var ex=l(78004),eg=l.n(ex),ep=l(70657);let ef=x.default.INTEGRATION_NAMES_DB.adplist,ev=e=>"https://adplist.org/mentors/".concat(e,"?utm_source=peerlist&ref=peerlist"),ej=e=>{let{icon:t,title:l,subTitle:s,iconBgColor:n=""}=e;return(0,a.jsxs)("div",{className:"flex items-center gap-x-2 flex-1",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-10 h-10 rounded-2xl ".concat(n),children:t}),(0,a.jsxs)("div",{children:[(0,a.jsx)(u.default.SemiBoldText,{sm:!0,children:l}),(0,a.jsx)(u.default.NormalText,{xs:!0,textColor:"text-gray-700",children:s})]})]})},eN=_()(()=>l.e(8262).then(l.bind(l,58262)),{loadableGenerated:{webpack:()=>[58262]},ssr:!1}),eb=x.default.INTEGRATION_NAMES_DB.leetcode,ey=["Easy","Medium","Hard"],eI=e=>{var t,l,s;let{stats:n}=e,r=(null!=(t=null==n?void 0:n.easy.percentage)?t:0)/100*44||0,o=(null!=(l=null==n?void 0:n.medium.percentage)?l:0)/100*95||0,i=(null!=(s=null==n?void 0:n.hard.percentage)?s:0)/100*42||0;return(0,a.jsx)("div",{className:"hidden md:flex items-center justify-center",children:(0,a.jsxs)("div",{className:"relative w-23 h-23 overflow-hidden",children:[(0,a.jsxs)("svg",{viewBox:"0 0 100 100",className:"absolute -ml-1 fill-transparent",width:102,height:102,children:[(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"bar-mask",children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.3622 21.3622C5.54592 37.1784 5.54592 62.8216 21.3622 78.6378C21.9479 79.2236 21.9479 80.1734 21.3622 80.7591C20.7764 81.3449 19.8266 81.3449 19.2408 80.7591C2.25303 63.7713 2.25303 36.2287 19.2408 19.2409C36.2286 2.25305 63.7713 2.25305 80.7591 19.2409C97.7469 36.2287 97.7469 63.7713 80.7591 80.7591C80.1733 81.3449 79.2236 81.3449 78.6378 80.7591C78.052 80.1734 78.052 79.2236 78.6378 78.6378C94.454 62.8216 94.454 37.1784 78.6378 21.3622C62.8216 5.54594 37.1784 5.54594 21.3622 21.3622Z"})})}),(0,a.jsxs)("g",{children:[(0,a.jsxs)("g",{style:{transform:"rotate(225deg)",transformOrigin:"center"},children:[(0,a.jsx)("circle",{cx:"50",cy:"50",r:"42",className:"fill-transparent stroke-blue-300 opacity-20",style:{strokeWidth:5,strokeLinecap:"round",strokeDasharray:"".concat(44,", ").concat(220),strokeDashoffset:66}}),(0,a.jsx)("circle",{cx:"50",cy:"50",r:"42",className:"fill-transparent stroke-blue-300 ",style:{strokeWidth:5,strokeLinecap:"round",strokeDasharray:"".concat(r,", ").concat(264-r),strokeDashoffset:66}})]}),(0,a.jsxs)("g",{style:{transform:"rotate(295.8deg)",transformOrigin:"center"},children:[(0,a.jsx)("circle",{cx:"50",cy:"50",r:"42",className:"fill-transparent stroke-orange-400 opacity-20",style:{strokeWidth:5,strokeLinecap:"round",strokeDasharray:"".concat(95,", ").concat(169),strokeDashoffset:66}}),(0,a.jsx)("circle",{cx:"50",cy:"50",r:"42",className:"fill-transparent stroke-orange-400",style:{strokeWidth:5,strokeLinecap:"round",strokeDasharray:"".concat(o,", ").concat(264-o),strokeDashoffset:66}})]}),(0,a.jsxs)("g",{style:{transform:"rotate(435.6deg)",transformOrigin:"center"},children:[(0,a.jsx)("circle",{cx:"50",cy:"50",r:"42",className:"fill-transparent stroke-red-300 opacity-20",style:{strokeWidth:5,strokeLinecap:"round",strokeDasharray:"".concat(42,", ").concat(222),strokeDashoffset:66}}),(0,a.jsx)("circle",{cx:"50",cy:"50",r:"42",className:"fill-transparent stroke-red-300 ",style:{strokeWidth:5,strokeLinecap:"round",strokeDasharray:"".concat(i,", ").concat(264-i),strokeDashoffset:66}})]})]})]}),(0,a.jsxs)("div",{className:"absolute inset-0 flex w-[102px]  -ml-1 h-[102px] flex-col items-center justify-center",children:[(0,a.jsxs)("div",{className:"flex items-baseline",children:[(0,a.jsxs)(u.default.SemiBoldText,{xs:!0,children:[null==n?void 0:n.solved,"/"]}),(0,a.jsx)(u.default.NormalText,{xxs:!0,children:null==n?void 0:n.total})]}),(0,a.jsx)(u.default.NormalText,{xxs:!0,textColor:"text-gray-700",children:"Solved"})]})]})})},ew={Devto:e=>{var t,l,r,d,g,p,f,v;let{data:j,username:b,userid:y,isPrimaryUser:I}=e,S=(0,n.useDispatch)(),{integrationData:D}
1=(0,n.useSelector)(e=>e.SecondaryUserData),{deleteError:T,handleDeleteIntegration:L}=C(k),R=x.default.INTEGRATION_SHARING_INFO[k],[O,_]=(0,s.useState)(!1),[E,F]=(0,s.useState)(x.CARD_COUNT.MIN_LIMIT),[B,G]=(0,s.useState)(),[U,W]=(0,s.useState)(),z=async()=>{if(y)try{G(!0);let e=await c.wv.getDevto(y),t={posts:(0,N.sortData)(e.data.data.posts,"publishedAt")};S(A.iw.updateIntegrationData({devto:{userid:y,...t,user:b}}))}catch(a){var e,t,l;W((null==a||null==(l=a.response)||null==(t=l.data)||null==(e=t.error)?void 0:e.message)||m.A.GLOBAL.wrong),S(A.iw.updateIntegrationData({devto:{userid:y,user:b}}))}finally{G(!1)}},P=async()=>{G(!0),await L(),T&&W(T),G(!1)};return(0,s.useEffect)(()=>{var e,t;return(null==D||null==(e=D.devto)?void 0:e.userid)&&y===(null==D||null==(t=D.devto)?void 0:t.userid)||z(),()=>{G(),W(),_(!1),F(4)}},[y]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{id:R.name,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(w.Logo,{integrationURL:"https://dev.to/".concat(b),dbname:R.dbname,type:R.name}),(0,a.jsxs)("div",{className:"flex items-center",children:[B&&(0,a.jsx)(M.A,{}),!B&&j.me&&(0,a.jsx)(w.DeleteIntegration,{setShowRemove:()=>_(!0)})]})]}),U&&I&&(0,a.jsx)(u.ErrorText,{className:"mt-1",children:U}),!B&&(null==(l=D.devto)||null==(t=l.posts)?void 0:t.length)===0&&(0,a.jsx)(h.A.NoData,{text:"".concat(j.firstName," hasn't published any articles yet.")}),!B&&(null==D||null==(d=D.devto)||null==(r=d.posts)?void 0:r.length)>0&&(0,a.jsx)("div",{className:"grid md:grid-cols-2 gap-4 mt-6",children:null==D||null==(p=D.devto)||null==(g=p.posts)?void 0:g.map((e,t)=>t<E?(0,a.jsx)(w.CardWrapper,{primaryUser:j.me,integrationName:k,username:j.profileHandle,href:null==e?void 0:e.url,className:"flex flex-col justify-between h-full",padding:"",children:(0,a.jsx)(w.CardContent,{title:null==e?void 0:e.title,image:null==e?void 0:e.coverImage})},"".concat(e.title,"-devto-article")):null)}),!B&&(null==D||null==(v=D.devto)||null==(f=v.posts)?void 0:f.length)>x.CARD_COUNT.MIN_LIMIT&&(0,a.jsx)(o.Ay.ShowMoreLargeBtn,{onClick:()=>(0,N.showMoreHandlerForIntegration)(E,F),showMore:E!==x.CARD_COUNT.MAX_LIMIT})]}),O&&(0,a.jsx)(i.A,{showModal:O,setShowModal:_,deleteText:"Are you sure you want to remove this section from portfolio?",confirm:()=>P()})]})},Dribbble:e=>{var t,l,r,d,g,p,f,v;let{data:j,username:b,userid:y,isPrimaryUser:I}=e,S=(0,n.useDispatch)(),{integrationData:D}=(0,n.useSelector)(e=>e.SecondaryUserData),{deleteError:T,handleDeleteIntegration:k}=C(L),R=x.default.INTEGRATION_SHARING_INFO[L],[O,_]=(0,s.useState)(),[E,F]=(0,s.use
1State)(),[B,G]=(0,s.useState)(!1),[U,W]=(0,s.useState)(x.CARD_COUNT.MIN_LIMIT),z=async()=>{var e,t,l,a;if(y)try{F(!0);let t=await c.wv.getDribbble(y);S(A.iw.updateIntegrationData({dribbble:{userid:y,data:null==t||null==(e=t.data)?void 0:e.data,user:b}}))}catch(e){_((null==e||null==(a=e.response)||null==(l=a.data)||null==(t=l.error)?void 0:t.message)||m.A.GLOBAL.wrong),A.iw.updateIntegrationData({dribbble:{userid:y,user:b}})}finally{F(!1)}},P=async()=>{F(!0),await k(),T&&_(T),F(!1)};return(0,s.useEffect)(()=>{var e,t;return(null==D||null==(e=D.dribbble)?void 0:e.userid)&&y===(null==D||null==(t=D.dribbble)?void 0:t.userid)||z(),()=>{F(),_(),G(!1),W(x.CARD_COUNT.MIN_LIMIT)}},[y]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{id:R.name,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(w.Logo,{dbname:R.dbname,type:R.name,isAuthenticated:!0,integrationURL:"https://dribbble.com/".concat(b)}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[E?(0,a.jsx)(M.A,{}):null,!E&&j.me?(0,a.jsx)(w.IntegrationControls,{userid:null==j?void 0:j.id,integrationName:L,setShowRemove:()=>G(!0),fetchIntegrationData:()=>z()}):null]})]}),O&&I&&(0,a.jsx)(u.ErrorText,{className:"mt-1",children:O}),!E&&(null==(l=D.dribbble)||null==(t=l.data)?void 0:t.length)===0&&(0,a.jsx)(h.A.NoData,{text:"".concat(j.firstName," hasn't added any shots yet.")}),!E&&(null==D||null==(d=D.dribbble)||null==(r=d.data)?void 0:r.length)>0&&(0,a.jsx)("div",{className:"grid md:grid-cols-2 gap-4 mt-6",children:null==D||null==(p=D.dribbble)||null==(g=p.data)?void 0:g.map((e,t)=>t<U?(0,a.jsx)(w.CardWrapper,{primaryUser:j.me,integrationName:L,username:j.profileHandle,href:e.htmlUrl,className:"flex flex-col h-full w-full outline-none",padding:"",children:(0,a.jsx)(w.CardContent,{image:null==e?void 0:e.imageUrl,title:null==e?void 0:e.title,integrationName:R.name})},"".concat(e.title,"-dribbble")):null)}),!E&&(null==D||null==(v=D.dribbble)||null==(f=v.data)?void 0:f.length)>x.CARD_COUNT.MIN_LIMIT&&(0,a.jsx)(o.Ay.ShowMoreLargeBtn,{onClick:()=>(0,N.showMoreHandlerForIntegration)(U,W),showMore:U!==x.CARD_COUNT.MAX_LIMIT})]}),B&&(0,a.jsx)(i.A,{showModal:B,setShowModal:G,deleteText:"Are you sure you want to remove this section from portfolio?",confirm:()=>P()})]})},EmptySections:R.A,Github:P,Gumroad:e=>{var t,l,r,d,g,p,f,v,j,b,y,I;let{data:S,createShareWork:D,username:T,userid:k,isLoggedIn:L,isPrimaryUser:R}=e,O=(0,n.useDispatch)(),{integrationData:_}=(0,n.useSelector)(e=>e.SecondaryUserData),{deleteError:E,handleDeleteIntegration:F}=C(V),B=x.default.INTEGRATION_SHARING_INFO[V],[G,U]=(0,s.useState)(!1),[W,z]=(0,s.useState)(x.CARD_COUNT.MIN_LIMIT),[P,q]=(0,s.useState)(),[Y,X]=(0,s.useState)(),J=async()=>{var e,t,l,a;if(k)try{q(!0);let t=await c.wv.getGumroad(k);O(A.iw.updateIntegrationData({gumroad:{userid:k,data:null==t||null==(e=t.data)?void 0:e.data,user:T}}))}catch(e){X((null==e||null==(a=e.response)||null==(l=a.data)||null==(t=l.error)?void 0:t.message)||m.A.GLOBAL.wrong),O(A.iw.updateIntegrationData({gumroad:{userid:k,user:T}}))}finally{q(!1)}},Q=async()=>{q(!0),await F(),E&&X(E),q(!1)};return(0,s.useEffect)(()=>{var e,t;return(null==_||null==(e=_.gumroad)?void 0:e.userid)&&k===(null==_||null==(t=_.gumroad)?void 0:t.userid)||J(),()=>{q(),X(),U(!1),z(x.CARD_COUNT.MIN_LIMIT)}},[k]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{id:B.name,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(w.Logo,{type:B.name,dbname:B.dbname,isAuthenticated:!0,IntegrationURL:"https://".concat(T,".gumroad.com")}),(0,a.jsxs)("div",{className:"flex items-center",children:[P&&(0,a.jsx)(M.A,{}),!P&&S.me&&(0,a.jsx)(w.DeleteIntegration,{setShowRemove:()=>U(!0)})]})]}),Y&&R&&(0,a.jsx)(u.ErrorText,{className:"mt-1",children:Y}),!P&&(null==(r=_.gumroad)||null==(l=r.data)||null==(t=l.products)?void 0:t.length)===0&&(0,a.jsx)(h.A.NoData,{text:"".concat(S.firstName," hasn't added any product yet.")}),!P&&(null==_||null==(p=_.gumroad)||null==(g=p.data)||null==(d=g.products)?void 0:d.length)>0&&(0,a.jsx)("div",{className:"grid md:grid-cols-2 gap-4 mt-6",children:null==_||null==(j=_.gumroad)||null==(v=j.data)||null==(f=v.products)?void 0:f.map((e,t)=>t<W?(0,a.jsxs)(w.CardWrapper,{integrationName:V,primaryUser:S.me,username:S.profileHandle,href:e.url,children:[(0,a.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,a.jsxs)("div",{className:"flex-1 mr-1",children:[(0,a.jsx)("h4",{className:"text-gray-900 text-sm font-semibold paragraph-clamp",children:null==e?void 0:e.name}),(null==e?void 0:e.price)&&(0,a.jsx)(H.A.Gray,{children:null==e?void 0:e.price})]}),(null==e?void 0:e.image)&&(0,a.jsx)("img",{src:null==e?void 0:e.image,alt:"",className:"flex-1 w-full max-w-[150px] h-20 overflow-hidden object-cover rounded-md border border-primaryBorder"})]}),(0,a.jsx)(w.CardFooter,{publishedAt:null,article:e,isLoggedIn:L,handleShare:()=>(e=>{let t=(0,N.removeHTMLFromString)(null==e?void 0:e.description),l={link:null==e?void 0:e.url,title:null==e?void 0:e.name,image:null==e?void 0:e.image,description:t};R||(l.originalPoster=S.id),D(l)})(e)})]},"".concat(e.name,"-gumroad-product")):null)}),!P&&(null==_||null==(I=_.gumroad)||null==(y=I.data)||null==(b=y.products)?void 0:b.length)>x.CARD_COUNT.MIN_LIMIT&&(0,a.jsx)(o.Ay.ShowMoreLargeBtn,{onClick:()=>(0,N.showMoreHandlerForIntegration)(W,z),showMore:W!==x.CARD_COUNT.MAX_LIMIT})]}),G&&(0,a.jsx)(i.A,{showModal:G,setShowModal:U,deleteText:"Are you sure you want to remove this section from portfolio?",confirm:()=>Q()})]})},Medium:e=>{var t,l,r,d,g,p,f,v;let{data:j,username:b,userid:y,isPrimaryUser:I}=e,S=(0,n.useDispatch)(),{integrationData:D}
1=(0,n.useSelector)(e=>e.SecondaryUserData),{deleteError:T,handleDeleteIntegration:k}=C(q),L=x.default.INTEGRATION_SHARING_INFO[q],[R,O]=(0,s.useState)(!1),[_,E]=(0,s.useState)(4),[F,B]=(0,s.useState)(),[G,U]=(0,s.useState)(),W=async()=>{if(y)try{B(!0);let e=await c.wv.getMedium(y),t=(0,N.sortData)(e.data.data,"publicationDate");S(A.iw.updateIntegrationData({medium:{userid:y,data:t,user:b}}))}catch(a){var e,t,l;U((null==a||null==(l=a.response)||null==(t=l.data)||null==(e=t.error)?void 0:e.message)||m.A.GLOBAL.wrong),S(A.iw.updateIntegrationData({medium:{userid:y,user:b}}))}finally{B(!1)}},z=async()=>{B(!0),await k(),T&&U(T),B(!1)};return(0,s.useEffect)(()=>{var e,t;return(null==D||null==(e=D.medium)?void 0:e.userid)&&y===(null==D||null==(t=D.medium)?void 0:t.userid)||W(),()=>{B(),U(),O(!1),E(4)}},[y]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{id:L.name,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(w.Logo,{dbname:L.dbname,type:L.name,integrationURL:"https://medium.com/@".concat(b)}),(0,a.jsxs)("div",{className:"flex items-center",children:[F&&(0,a.jsx)(M.A,{}),!F&&j.me&&(0,a.jsx)(w.DeleteIntegration,{setShowRemove:()=>O(!0)})]})]}),G&&I&&(0,a.jsx)(u.ErrorText,{className:"mt-4",children:G}),!F&&((null==(l=D.medium)||null==(t=l.data)?void 0:t.length)===0||G)&&(0,a.jsx)(h.A.NoData,{text:"".concat(j.firstName," hasn't published any articles yet.")}),!F&&(null==D||null==(d=D.medium)||null==(r=d.data)?void 0:r.length)>0&&(0,a.jsx)("div",{className:"grid md:grid-cols-2 gap-4 mt-6",children:null==D||null==(p=D.medium)||null==(g=p.data)?void 0:g.map((e,t)=>t<_?(0,a.jsx)(w.CardWrapper,{primaryUser:j.me,integrationName:q,username:j.profileHandle,href:e.link,className:"flex flex-col justify-between h-full",padding:"",children:(0,a.jsx)(w.CardContent,{title:null==e?void 0:e.title,image:null==e?void 0:e.imageLink})},"".concat(e.title,"-medium-article")):null)}),(null==D||null==(v=D.medium)||null==(f=v.data)?void 0:f.length)>4&&(0,a.jsx)(o.Ay.ShowMoreLargeBtn,{onClick:()=>(0,N.showMoreHandlerForIntegration)(_,E),showMore:8!==_})]}),R&&(0,a.jsx)(i.A,{showModal:R,setShowModal:O,deleteText:"Are you sure you want to remove this section from portfolio?",confirm:()=>z()})]})},Projects:function(e){let{data:t,projectData:l,isReadOnly:n=!1}=e,r=(0,Y.useRouter)(),[i,c]=(0,s.useState)(x.CARD_COUNT.MIN_LIMIT),[m,h]=(0,s.useState)(!1),g=N.default.getProjectsOrder(t.projectsOrder,l);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{id:Q,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(y.ProjectsIcon,{}),(0,a.jsx)(u.default.SemiBoldText,{className:"ml-2",children:"My Projects"})]}),t.me&&(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(o.Ay.CarbonOutline,{circular:!0,small:!0,className:"mr-4 focus:border-green-100",onClick:()=>h(!0),children:(0,a.jsx)(y.SettingsIcon,{size:18})}),(0,a.jsx)(o.Ay.Carbon,{small:!0,onClick:()=>r.push(x.APP_PATHS.addProject()),"aria-label":"Add more project",className:" focus:border-green-100",iconLeft:(0,a.jsx)(y.PlusIcon,{size:16}),children:"New Project"})]})]}),(0,a.jsxs)("div",{className:"mt-6",children:[(0,a.jsx)("div",{className:"grid md:grid-cols-1 mt-6 -mx-6",children:g&&g.map((e,t)=>t<i?(0,a.jsx)(X.A.ProjectCard,{analyticsEventSource:J.oi.USER_PROFILE,project:e,withBorder:!1,isReadOnly:n},null==e?void 0:e.id):null)}),l&&g.length>x.CARD_COUNT.MIN_LIMIT?(0,a.jsx)(o.Ay.ShowMoreLargeBtn,{onClick:()=>(0,N.handleShowAllSectionDetails)(l,i,c,x.CARD_COUNT.MIN_LIMIT),moreText:"Show All",showMore:(null==l?void 0:l.length)>i}):null]})]}),m&&(0,a.jsx)(d.A.ManageProjects,{showModal:m,setShowModal:h})]})},Substack:e=>{var t,l,r,d,g,p,f,v,j,b,y,I,S;let{data:D,username:T,userid:k,isPrimaryUser:L}=e,R=(0,n.useDispatch)(),{integrationData:O}
1=(0,n.useSelector)(e=>e.SecondaryUserData),{deleteError:_,handleDeleteIntegration:E}=C(K),F=x.default.INTEGRATION_SHARING_INFO[K],[B,G]=(0,s.useState)(!1),[U,W]=(0,s.useState)(x.CARD_COUNT.MIN_LIMIT),[z,P]=(0,s.useState)(),[H,V]=(0,s.useState)(),q=async()=>{var e,t,l,a,s,n,r;if(k)try{P(!0);let s=await c.wv.getSubstack(k),n=(0,N.sortData)(null==s||null==(t=s.data)||null==(e=t.data)?void 0:e.posts,"publicationDate"),r={substackNewsletter:null==s||null==(a=s.data)||null==(l=a.data)?void 0:l.substackNewsletter,posts:n};R(A.iw.updateIntegrationData({substack:{userid:k,...r,user:T}}))}catch(e){V((null==e||null==(r=e.response)||null==(n=r.data)||null==(s=n.error)?void 0:s.message)||m.A.GLOBAL.wrong),R(A.iw.updateIntegrationData({substack:{userid:k,user:T}}))}finally{P(!1)}},Y=async()=>{P(!0),await E(),_&&V(_),P(!1)};return(0,s.useEffect)(()=>{var e,t;return(null==O||null==(e=O.substack)?void 0:e.userid)&&k===(null==O||null==(t=O.substack)?void 0:t.userid)||q(),()=>{P(),V(),G(!1),W(4)}},[k]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{id:F.name,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("div",{className:"group",children:(0,a.jsx)(w.Logo,{dbname:F.dbname,type:(null==O||null==(l=O.substack)||null==(t=l.substackNewsletter)?void 0:t.title)||F.name,integrationURL:"https://".concat(T,".substack.com"),customLogo:(0,a.jsx)(Z,{substackNewsletter:null==O||null==(r=O.substack)?void 0:r.substackNewsletter})})}),(0,a.jsxs)("div",{className:"flex items-center",children:[z&&(0,a.jsx)(M.A,{}),(0,a.jsxs)("div",{className:"flex items-center",children:[!z&&!D.me&&(null==O||null==(d=O.substack)?void 0:d.posts)&&(0,a.jsx)(w.Subscribe,{subscribeLink:"https://".concat(T,".substack.com/subscribe")}),D.me&&(0,a.jsx)(w.DeleteIntegration,{setShowRemove:()=>G(!0)})]})]})]}),H&&L&&(0,a.jsx)(u.ErrorText,{className:"mt-1",children:H}),!z&&((null==(p=O.substack)||null==(g=p.posts)?void 0:g.length)===0||!(null==(f=O.substack)?void 0:f.posts))&&(0,a.jsx)(h.A.NoData,{text:"".concat(D.firstName," hasn't published any articles yet.")}),!z&&(null==O||null==(j=O.substack)||null==(v=j.posts)?void 0:v.length)>0&&(0,a.jsx)("div",{className:"grid md:grid-cols-2 gap-4 mt-6",children:null==O||null==(y=O.substack)||null==(b=y.posts)?void 0:b.map((e,t)=>t<U?(0,a.jsx)(w.CardWrapper,{integrationName:K,primaryUser:D.me,username:D.profileHandle,href:e.link,padding:"",children:(0,a.jsx)(w.CardContent,{image:null==e?void 0:e.imageLink,title:null==e?void 0:e.title})},"".concat(e.title,"-substack-article")):null)}),!z&&(null==O||null==(S=O.substack)||null==(I=S.posts)?void 0:I.length)>x.CARD_COUNT.MIN_LIMIT&&(0,a.jsx)(o.Ay.ShowMoreLargeBtn,{onClick:()=>(0,N.showMoreHandlerForIntegration)(U,W),showMore:U!==x.CARD_COUNT.MAX_LIMIT})]}),B&&(0,a.jsx)(i.A,{showModal:B,setShowModal:G,deleteText:"Are you sure you want to remove this section from portfolio?",confirm:()=>Y()})]})},YouTube:e=>{var t,l,r,d,g,p,f,v,j,b,y,I;let{data:S,createShareWork:D,username:T,userid:k,isLoggedIn:L,isPrimaryUser:R}=e,O=(0,n.useDispatch)(),{integrationData:_}=(0,n.useSelector)(e=>e.SecondaryUserData),{deleteError:E,handleDeleteIntegration:F}=C(ee),B=x.default.INTEGRATION_SHARING_INFO[ee],[G,U]=(0,s.useState)(!1),[W,z]=(0,s.useState)(x.CARD_COUNT.MIN_LIMIT),[P,H]=(0,s.useState)(),[V,q]=(0,s.useState)(),Y=async()=>{var e,t,l,a,s;if(k)try{H(!0);let l=await c.wv.getYouTube(k),a=null==l||null==(t=l.data)||null==(e=t.data)?void 0:e.youtubeData;O(A.iw.updateIntegrationData({youtube:{userid:k,user:T,...a}}))}catch(e){q((null==e||null==(s=e.response)||null==(a=s.data)||null==(l=a.error)?void 0:l.message)||m.A.GLOBAL.wrong),O(A.iw.updateIntegrationData({youtube:{userid:k,user:T}}))}finally{H(!1)}},X=async()=>{H(!0),await F(),E&&q(E),H(!1)};return(0,s.useEffect)(()=>{var e,t;return(null==_||null==(e=_.youtube)?void 0:e.userid)&&k===(null==_||null==(t=_.youtube)?void 0:t.userid)||Y(),()=>{H(),q(),U(!1),z(4)}},[k]),V&&!(R||(null==S?void 0:S.me))?null:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{id:B.name,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(w.Logo,{dbname:B.dbname,type:(null==_||null==(t=_.youtube)?void 0:t.author)||B.name,integrationURL:null==_||null==(l=_.youtube)?void 0:l.channelLink}),(0,a.jsxs)("div",{className:"flex items-center",children:[P&&(0,a.jsx)(M.A,{}),!P&&!S.me&&(null==_||null==(r=_.youtube)?void 0:r.userid)&&(0,a.jsx)(w.Subscribe,{subscribeLink:(null==_||null==(d=_.youtube)?void 0:d.channelLink)?"".concat(null==(g=_.youtube)?void 0:g.channelLink,"?sub_confirmation=1"):""}),S.me&&(0,a.jsx)(w.DeleteIntegration,{setShowRemove:()=>U(!0)})]})]}),V&&R&&(0,a.jsx)(u.default.ErrorText,{className:"mt-1",children:V}),!P&&((null==(f=_.youtube)||null==(p=f.videos)?void 0:p.length)===0||!(null==(v=_.youtube)?void 0:v.videos))&&(0,a.jsx)(h.A.NoData,{text:"".concat(S.firstName," hasn't added any video yet.")}),(0,a.jsx)("div",{className:"grid md:grid-cols-2 gap-4 mt-6",children:null==_||null==(b=_.youtube)||null==(j=b.videos)?void 0:j.map((e,t)=>{if(t<W){let t={...e},l=$.A.getYoutubeEmbedLink(t.link);if(!(null==l?void 0:l.videoId))return null;let s=$.A.youTubeEmbedPlaceholder({videoId:l.videoId});return t.imageLink=$.A.getYoutubeVideoThumbnail(l.videoId),(0,a.jsx)(w.CardWrapper,{integrationName:ee,primaryUser:S.me,username:S.profileHandle,className:"h-full",children:(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"w-full flex-1 h-40",children:(0,a.jsx)("iframe",{src:null==t?void 0:t.link,title:null==t?void 0:t.t
1itle,width:"100%",height:"100%",allowFullScreen:!0,srcDoc:s})})}),(0,a.jsxs)("div",{className:"p-4 h-full flex flex-col justify-between",children:[(0,a.jsx)("h4",{className:"text-gray-900 text-sm font-semibold mb-2 paragraph-clamp",children:null==t?void 0:t.title}),(0,a.jsx)(w.CardFooter,{publishedAt:(null==t?void 0:t.publicationDate)||"",article:t,handleShare:()=>(e=>{let t={link:null==e?void 0:e.link,title:null==e?void 0:e.title,description:(null==e?void 0:e.description)||"",image:null==e?void 0:e.imageLink,publicationDate:e.publicationDate};R||(t.originalPoster=S.id),D(t)})(t),isLoggedIn:L})]})]})},t.link)}return null})}),!P&&(null==_||null==(I=_.youtube)||null==(y=I.videos)?void 0:y.length)>x.CARD_COUNT.MIN_LIMIT&&(0,a.jsx)(o.Ay.ShowMoreLargeBtn,{onClick:()=>(0,N.showMoreHandlerForIntegration)(W,z),showMore:W!==x.CARD_COUNT.MAX_LIMIT})]}),G&&(0,a.jsx)(i.A,{showModal:G,setShowModal:U,deleteText:"Are you sure you want to remove this section from portfolio?",confirm:()=>X()})]})},ProductHunt:e=>{var t,l,r,d,g,p,f,v,j,b,y,I;let{data:S,username:D,userid:T,isPrimaryUser:k}=e,L=(0,n.useDispatch)(),{integrationData:R}=(0,n.useSelector)(e=>e.SecondaryUserData),{deleteError:O,handleDeleteIntegration:_}=C(et),E=x.default.INTEGRATION_SHARING_INFO[et],[F,B]=(0,s.useState)(!1),[G,U]=(0,s.useState)(x.CARD_COUNT.MIN_LIMIT),[W,z]=(0,s.useState)(),[P,H]=(0,s.useState)(),V=async()=>{if(T)try{z(!0);let e=await c.wv.getProductHunt(T);L(A.iw.updateIntegrationData({productHunt:{userid:T,data:null==e?void 0:e.data.data,user:D}}))}catch(a){var e,t,l;H((null==a||null==(l=a.response)||null==(t=l.data)||null==(e=t.error)?void 0:e.message)||m.A.GLOBAL.wrong),L(A.iw.updateIntegrationData({productHunt:{userid:T,user:D}}))}finally{z(!1)}},q=async()=>{z(!0),await _(),O&&H(O),z(!1)};return(0,s.useEffect)(()=>{var e,t;return(null==R||null==(e=R.productHunt)?void 0:e.userid)&&T===(null==R||null==(t=R.productHunt)?void 0:t.userid)||V(),()=>{z(),H(),B(!1),U(x.CARD_COUNT.MIN_LIMIT)}},[T]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{id:E.name,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(w.Logo,{dbname:E.dbname,type:"Product Hunt",isAuthenticated:!0,integrationURL:"https://www.producthunt.com/@".concat(D)}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[W?(0,a.jsx)(M.A,{}):null,!W&&S.me?(0,a.jsx)(w.IntegrationControls,{userid:null==S?void 0:S.id,integrationName:et,setShowRemove:()=>B(!0),fetchIntegrationData:()=>V()}):null]})]}),P&&k&&(0,a.jsx)(u.ErrorText,{className:"mt-1",children:P}),!W&&(null==R||null==(r=R.productHunt)||null==(l=r.data)||null==(t=l.products)?void 0:t.length)===0&&(0,a.jsx)(h.A.NoData,{text:"".concat(null==S?void 0:S.firstName," hasn't added any product yet.")}),!W&&(null==R||null==(p=R.productHunt)||null==(g=p.data)||null==(d=g.products)?void 0:d.length)>0&&(0,a.jsx)("div",{className:"grid md:grid-cols-2 gap-4 mt-6",children:null==R||null==(j=R.productHunt)||null==(v=j.data)||null==(f=v.products)?void 0:f.map((e,t)=>t<G?(0,a.jsx)(w.CardWrapper,{integrationName:et,primaryUser:S.me,username:S.profileHandle,href:(0,N.urlFormatter)(e.url,{addRef:!0}),className:"flex flex-col h-full w-full outline-none",padding:"",children:(0,a.jsx)("article",{className:"p-2",children:(0,a.jsxs)("div",{className:"flex items-center justify-start",children:[(0,a.jsx)("img",{src:(null==e?void 0:e.thumbnail)||x.CDNImage.emptyPortfolio,alt:null==e?void 0:e.name,className:"h-16 w-16 rounded bg-cover bg-center"}),(0,a.jsxs)("div",{className:"pl-2 flex flex-col w-full",children:[(0,a.jsx)(u.default.SemiBoldText,{sm:!0,className:"paragraph-clamp1",children:null==e?void 0:e.name}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mb-2 w-full paragraph-clamp1",children:null==e?void 0:e.tagline}),(0,a.jsxs)("div",{className:"w-fit h-5 flex items-center",children:[(0,a.jsx)("span",{className:"text-orange",children:"▲"}),(0,a.jsx)("span",{className:"ml-1 text-xxs",children:null==e?void 0:e.votes})]})]})]})})},"".concat(null==e?void 0:e.name,"-").concat(null==e?void 0:e.id)):null)}),!W&&(null==R||null==(I=R.productHunt)||null==(y=I.data)||null==(b=y.products)?void 0:b.length)>x.CARD_COUNT.MIN_LIMIT&&(0,a.jsx)(o.Ay.ShowMoreLargeBtn,{onClick:()=>(0,N.showMoreHandlerForIntegration)(G,U),showMore:G!==x.CARD_COUNT.MAX_LIMIT})]}),F&&(0,a.jsx)(i.A,{showModal:F,setShowModal:B,deleteText:"Are you sure you want to remove this section from portfolio?",confirm:()=>q()})]})},RSS:e=>{var t,l,r,d,g,p,f,v;let{data:j,username:b,userid:y,isPrimaryUser:I}=e,S=(0,n.useDispatch)(),{integrationData:D}
1=(0,n.useSelector)(e=>e.SecondaryUserData),{deleteError:T,handleDeleteIntegration:k}=C(el),L=x.default.INTEGRATION_SHARING_INFO[el],[R,O]=(0,s.useState)(!1),[_,E]=(0,s.useState)(x.CARD_COUNT.MIN_LIMIT),[F,B]=(0,s.useState)(),[G,U]=(0,s.useState)(),W=async()=>{if(y)try{B(!0);let e=await c.wv.getRSS(y),t=(0,N.sortData)(e.data.data,"publicationDate");S(A.iw.updateIntegrationData({rss:{userid:y,data:t,user:b}}))}catch(a){var e,t,l;U((null==a||null==(l=a.response)||null==(t=l.data)||null==(e=t.error)?void 0:e.message)||m.A.GLOBAL.wrong),S(A.iw.updateIntegrationData({rss:{userid:y,user:b}}))}finally{B(!1)}},z=async()=>{B(!0),await k(),T&&U(T),B(!1)};return(0,s.useEffect)(()=>{var e,t;return(null==D||null==(e=D.rss)?void 0:e.userid)&&y===(null==D||null==(t=D.rss)?void 0:t.userid)||W(),()=>{B(),U(),O(!1),E(4)}},[y]),G&&!(I||(null==j?void 0:j.me))?null:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{id:L.name,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(w.Logo,{dbname:L.dbname,type:L.name,integrationURL:(null==b?void 0:b.includes("rss"))?b.replace("rss",""):b}),(0,a.jsxs)("div",{className:"flex items-center",children:[F&&(0,a.jsx)(M.A,{}),!F&&j.me&&(0,a.jsx)(w.DeleteIntegration,{setShowRemove:()=>O(!0)})]})]}),G&&I&&(0,a.jsx)(u.ErrorText,{className:"mt-4",children:G}),!F&&(null==(l=D.rss)||null==(t=l.data)?void 0:t.length)===0&&(0,a.jsx)(h.A.NoData,{text:"".concat(j.firstName," hasn't published any articles yet.")}),!F&&(null==D||null==(d=D.rss)||null==(r=d.data)?void 0:r.length)>0&&(0,a.jsx)("div",{className:"grid md:grid-cols-2 gap-4 mt-6",children:null==D||null==(p=D.rss)||null==(g=p.data)?void 0:g.map((e,t)=>t<_?(0,a.jsx)(w.CardWrapper,{integrationName:el,username:j.profileHandle,primaryUser:j.me,href:e.link,className:"h-full flex flex-col justify-between",padding:"",children:(0,a.jsx)(w.CardContent,{image:null==e?void 0:e.imageLink,title:null==e?void 0:e.title})},"".concat(e.title,"-rss-article")):null)}),(null==D||null==(v=D.rss)||null==(f=v.data)?void 0:f.length)>x.CARD_COUNT.MIN_LIMIT&&(0,a.jsx)(o.Ay.ShowMoreLargeBtn,{onClick:()=>(0,N.showMoreHandlerForIntegration)(_,E),showMore:_!==x.CARD_COUNT.MAX_LIMIT})]}),R&&(0,a.jsx)(i.A,{showModal:R,setShowModal:O,deleteText:"Are you sure you want to remove this section from portfolio?",confirm:()=>z()})]})},CodeForces:e=>{var t,l,r,o,d,g,p,f,v;let{data:j,username:N,userid:b,isPrimaryUser:y}=e,{integrationData:I}=(0,n.useSelector)(e=>e.SecondaryUserData),{deleteError:S,handleDeleteIntegration:A}=C(ec),D=x.default.INTEGRATION_SHARING_INFO[ec],[T,k]=(0,s.useState)(),[L,R]=(0,s.useState)(!1),[O,_]=(0,s.useState)(),[E,F]=(0,s.use
1State)(),B=async()=>{if(b)try{_(!0);let e=await c.wv.getCodeForcesRatings(b);k(e.data.data)}catch(a){var e,t,l;F((null==a||null==(l=a.response)||null==(t=l.data)||null==(e=t.error)?void 0:e.message)||m.A.GLOBAL.wrong)}finally{_(!1)}},G=async()=>{_(!0),await A(),S&&F(S),_(!1)};return(0,s.useEffect)(()=>{var e,t;return(null==I||null==(e=I.codeforces)?void 0:e.userid)&&b===(null==I||null==(t=I.codeforces)?void 0:t.userid)||B(),()=>{_(),F(),R(!1)}},[b]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{id:D.name,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(w.Logo,{integrationURL:"https://codeforces.com/profile/".concat(N),dbname:D.dbname,type:(null==T||null==(t=T.profile)?void 0:t.handle)||D.name}),(0,a.jsxs)("div",{className:"flex items-center",children:[O&&(0,a.jsx)(M.A,{}),!O&&j.me&&(0,a.jsx)(w.DeleteIntegration,{setShowRemove:()=>R(!0)})]})]}),(null==T||null==(l=T.profile)?void 0:l.handle)&&(null==T||null==(r=T.profile)?void 0:r.rating)?(0,a.jsx)("div",{className:"my-6",children:(0,a.jsxs)(u.default.NormalText,{xs:!0,children:["Latest Contest Rating:"," ",(0,a.jsx)("span",{className:"font-semibold",children:null==T||null==(o=T.profile)?void 0:o.rating})," ","(max."," ",(0,a.jsxs)("span",{className:"font-semibold",children:[null==T||null==(d=T.profile)?void 0:d.maxRank,", ",null==T||null==(g=T.profile)?void 0:g.maxRating]}),")"]})}):null,E&&y&&(0,a.jsx)(u.ErrorText,{className:"mt-1",children:E}),!O&&(null==T||null==(p=T.ratings)?void 0:p.length)===0&&(0,a.jsx)(h.A.NoData,{text:"Could not fetch ratings data from CodeForces"}),!O&&(null==T||null==(f=T.ratings)?void 0:f.length)>0&&(0,a.jsx)("div",{className:"flex mt-6 -ml-10",children:(0,a.jsx)(em,{ratingsData:null==T?void 0:T.ratings,maxRating:null==T||null==(v=T.profile)?void 0:v.maxRating})})]}),L&&(0,a.jsx)(i.A,{showModal:L,setShowModal:R,deleteText:"Are you sure you want to remove this section from portfolio?",confirm:()=>G()})]})},ADPList:e=>{var t,l,r,d,g,p,f,v,j,N;let{data:b,username:I,userId:S,isPrimayUser:D}=e,T=x.default.INTEGRATION_SHARING_INFO[ef],k=(0,n.useDispatch)(),{integrationData:L}=(0,n.useSelector)(e=>e.SecondaryUserData),{deleteError:R,handleDeleteIntegration:O}=C(ef),[_,E]=(0,s.useState)(!1),[F,B]=(0,s.useState)(!1),[G,U]=(0,s.useState)(!1),W=async()=>{B(!0),await O(),R&&U(R),B(!1)},z=async()=>{var e,t,l,a;if(S)try{B(!0);let t=await c.wv.getADPList(S);k(A.iw.updateIntegrationData({adplist:{userId:S,...null==t||null==(e=t.data)?void 0:e.data,user:I}}))}catch(e){U((null==e||null==(a=e.response)||null==(l=a.data)||null==(t=l.error)?void 0:t.message)||m.A.GLOBAL.wrong),k(A.iw.updateIntegrationData({adplist:{userId:S,user:I}}))}finally{B(!1)}};return(0,s.useEffect)(()=>{var e,t;return(null==L||null==(e=L.adplist)?void 0:e.userId)&&(null==L||null==(t=L.adplist)?void 0:t.userId)===S||z(),()=>{B(!1),U(),E(!1)}},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{id:T.name,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,a.jsx)(w.Logo,{integrationURL:ev(I),dbname:T.dbname,type:T.name}),(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[F&&(0,a.jsx)(M.A,{}),!F&&I?(0,a.jsx)(o.Ay.Carbon,{as:"a",small:!0,target:"_blank",rel:"noopener noreferrer",href:ev(I),onClick:()=>ep.A.capture(J.Ay.ADPLIST_BOOK_SESSION),className:"group",iconRight:(0,a.jsx)("span",{className:"rotate-45 block -mr-1 group-hover:-translate-y-0.5 group-hover:translate-x-0.5 transition-all ease-in-out",children:(0,a.jsx)(y.ArrowUpIcon,{size:14})}),children:"Book Session"}):null,!F&&b.me&&(0,a.jsx)(w.DeleteIntegration,{setShowRemove:()=>E(!0)})]})]}),G&&D?(0,a.jsx)(u.default.ErrorText,{className:"mt-1",children:G}):null,F||(null==L?void 0:L.adplist)?null:(0,a.jsx)(h.A.NoData,{text:"Could not fetch ADPList profile."}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center  flex-wrap gap-6 mb-6",children:[(null==L||null==(t=L.adplist)?void 0:t.meetingsMinutes)?(0,a.jsx)(ej,{title:"".concat(null==L||null==(l=L.adplist)?void 0:l.meetings
1Minutes," mins"),subTitle:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"hidden sm:inline",children:"Total"})," Mentoring Time"]}),icon:(0,a.jsx)(y.Rocket2Icon,{color:eg().blue.dark}),iconBgColor:"bg-blue-00"}):null,(null==L||null==(r=L.adplist)?void 0:r.meetingsCompleted)?(0,a.jsx)(ej,{title:"".concat(null==L||null==(d=L.adplist)?void 0:d.meetingsCompleted),subTitle:"Sessions Completed",iconBgColor:"bg-red-00",icon:(0,a.jsx)("span",{className:"text-red",children:(0,a.jsx)(y.SparksIcon,{})})}):null,(null==L||null==(g=L.adplist)?void 0:g.averageAttendance)?(0,a.jsx)(ej,{title:"".concat(null==L||null==(p=L.adplist)?void 0:p.averageAttendance,"%"),subTitle:"Avg Attendence",iconBgColor:"bg-orange-50",icon:(0,a.jsx)(y.CalendarIcon,{color:eg().orange.DEFAULT})}):null]}),(null==L||null==(v=L.adplist)||null==(f=v.mostDiscussedTopics)?void 0:f.length)>0?(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(u.default.NormalText,{xs:!0,textColor:"text-gray-700",children:"Topics discussed during sessions"})}),(0,a.jsx)("div",{className:"flex items-center flex-wrap gap-2",children:null==L||null==(N=L.adplist)||null==(j=N.mostDiscussedTopics)?void 0:j.map((e,t)=>{let l=e.length>=33?"".concat(e.slice(0,30),"..."):e;return(0,a.jsx)("div",{className:"border rounded-lg px-2 py-1 bg-gray-00 border-primaryBorder cursor-default",children:(0,a.jsx)(u.default.NormalText,{xs:!0,textColor:"text-gray-1k",children:l})},"".concat(e,"-").concat(t+2))})})]}):null]})]}),_&&(0,a.jsx)(i.A,{showModal:_,setShowModal:E,deleteText:"Are you sure you want to remove this section from portfolio?",confirm:()=>W()})]})},LeetCode:e=>{var t,l,r,o,d,g,p,f,v,j,b,y,I,S,D,T,k,L,R,O,_,E,F,U,W,z,P,H,V,q,Y,X,J,Q,K,Z,$,ee,et,el,ea,es,en,er,eo,ei,ed;let{username:eu="",userId:ec,data:em}=e,eh=x.default.INTEGRATION_SHARING_INFO[eb],ex=(0,n.useDispatch)(),{deleteError:eg,handleDeleteIntegration:ep}=C(eb),{integrationData:ef}=(0,n.useSelector)(e=>e.SecondaryUserData),[ev,ej]=(0,s.useState)(),[ew,eS]=(0,s.useState)(!1),[eA,eD]=(0,s.useState)(),eT=async()=>{ej(!0),await ep(),eg&&eD(eg),ej(!1)},eC=async()=>{var e,t,l,a,s,n,r,o,i,d,u,h,x,g,p,f,v,j,b,y,I,w;if(ec)try{ej(!0);let m=await c.wv.getLeetCode(ec),y=JSON.parse((null==m||null==(t=m.data)||null==(e=t.data)?void 0:e.submissionCalendar)||{}),I=Object.entries(y).map(e=>{let[t,l]=e;return{contributionDate:new Date(1e3*Number(t)).toISOString().split("T")[0],contributions:l}}),w=N.default.getHeatmapColorCodes(I.map(e=>e.contributions)),S=(null==m||null==(a=m.data)||null==(l=a.data)?void 0:l.allQuestionsCount)?Object.fromEntries(null==m||null==(n=m.data)||null==(s=n.data)?void 0:s.allQuestionsCount.map(e=>[e.difficulty.toLowerCase(),e.count])):{},D=(null==m||null==(i=m.data)||null==(o=i.data)||null==(r=o.submitStats)?void 0:r.acSubmissionNum)?Object.fromEntries(null==m||null==(u=m.data)||null==(d=u.data)?void 0:d.submitStats.acSubmissionNum.map(e=>[e.difficulty.toLowerCase(),e.count])):{},T=(null==m||null==(g=m.data)||null==(x=g.data)||null==(h=x.userProfileUserQuestionProgressV2)?void 0:h.userSessionBeatsPercentage)?Object.fromEntries(null==m||null==(v=m.data)||null==(f=v.data)||null==(p=f.userProfileUserQuestionProgressV2)?void 0:p.userSessionBeatsPercentage.map(e=>[e.difficulty.toLowerCase(),e.percentage])):{},C={solved:null!=(j=D.all)?j:0,total:null!=(b=S.all)?b:0};
1ey.forEach(e=>{var t,l,a;let s=e.toLowerCase(),n=null!=(t=D[s])?t:0,r=null!=(l=S[s])?l:0,o=r>0?parseFloat((n/r*100).toFixed(2)):0;C[s]={solved:n,total:r,BeatsPercentage:null!=(a=T[s])?a:0,percentage:o}}),ex(A.iw.updateIntegrationData({leetcode:{userId:ec,...m.data.data,colorCodeRef:w,user:eu,contributions:I,stats:C}}))}catch(e){eD((null==e||null==(w=e.response)||null==(I=w.data)||null==(y=I.error)?void 0:y.message)||m.A.GLOBAL.wrong),ex(A.iw.updateIntegrationData({leetcode:{userId:ec,user:eu}}))}finally{ej(!1)}};(0,s.useEffect)(()=>{eC()},[]);let eM=(null==ef||null==(t=ef.leetcode)?void 0:t.contributions)?null==ef||null==(l=ef.leetcode)?void 0:l.contributions.reduce((e,t)=>e+t.contributions,0):0;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{id:eh.name,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(w.Logo,{dbname:eh.dbname,type:"".concat(eu),integrationURL:"".concat((0,N.urlFormatter)(x.socialLinkPrefix.leetcode)+eu)}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[ev?(0,a.jsx)(M.A,{}):null,!ev&&em.me?(0,a.jsx)(w.IntegrationControls,{userid:null==em?void 0:em.id,integrationName:eb,setShowRemove:()=>eS(!0),fetchIntegrationData:()=>eC()}):null]})]}),!ev&&(null==(r=ef.leetcode)?void 0:r.contributions)&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mt-4 flex flex-col lg:flex-row gap-3 ",children:[(0,a.jsxs)("div",{className:"flex lg:flex-col justify-between w-full lg:w-fit gap-3",children:[(0,a.jsxs)("div",{className:"flex gap-1 border rounded-xl w-full py-4 px-4 justify-center items-center",children:[(0,a.jsx)(u.default.MutedText,{children:"Rank"}),(0,a.jsx)(u.default.SemiBoldText,{xs:!0,children:null==(d=ef.leetcode)||null==(o=d.ranking)?void 0:o.toLocaleString()})]}),(0,a.jsxs)("div",{className:"flex  gap-1 border rounded-xl w-full py-4 px-4 justify-center items-center",children:[(0,a.jsx)(u.default.MutedText,{children:"Top"}),(0,a.jsxs)(u.default.SemiBoldText,{xs:!0,children:[null!=(eo=null==(g=ef.leetcode)?void 0:g.topPercentage)?eo:0,"%"]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row border  rounded-xl  w-full  gap-3 py-2 md:pl-3  px-2",children:[(0,a.jsx)(eI,{stats:null==(p=ef.leetcode)?void 0:p.stats}),(0,a.jsxs)("div",{className:"flex flex-col item-center md:flex-row gap-4  md:gap-1 w-full md:justify-between md:items-center rounded-[10px] bg-gray-25 md:px-4 md:py-4 px-3 py-3",children:[(0,a.jsxs)("div",{className:"flex md:hidden item-center  ",children:[(0,a.jsxs)("span",{className:"flex items-center justify-center",children:[(0,a.jsxs)(u.default.SemiBoldText,{sm:!0,children:[null!=(ei=null==(f=ef.leetcode)?void 0:f.stats.solved)?ei:0,"/"]}),(0,a.jsx)(u.default.NormalText,{xs:!0,children:null!=(ed=null==(v=ef.leetcode)?void 0:v.stats.total)?ed:0})]}),(0,a.jsx)(u.default.NormalText,{sm:!0,textColor:"text-gray-700",className:"ml-1",children:"Solved"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,a.jsxs)("div",{className:"flex flex-1 flex-col ",children:[(0,a.jsx)(u.default.SemiBoldText,{textColor:"text-blue-300",xs:!0,children:"Easy"}),(0,a.jsxs)(u.default.SemiBoldText,{className:"mt-1.5",xs:!0,children:[(null==(y=ef.leetcode)||null==(b=y.stats)||null==(j=b.easy)?void 0:j.solved)||0,"/",(null==(D=ef.leetcode)||null==(S=D.stats)||null==(I=S.easy)?void 0:I.total)||0]}),(0,a.jsxs)(u.default.NormalText,{textColor:"text-gray-700",xs:!0,children:["Beats"," ",(null==(L=ef.leetcode)||null==(k=L.stats)||null==(T=k.easy)?void 0:T.BeatsPercentage)||0,"%"]})]}),(0,a.jsxs)("div",{className:"flex flex-1  flex-col ",children:[(0,a.jsx)(u.default.SemiBoldText,{textColor:"text-orange-500",xs:!0,children:"Med"}),(0,a.jsxs)(u.default.SemiBoldText,{className:"mt-1.5",xs:!0,children:[(null==(_=ef.leetcode)||null==(O=_.stats)||null==(R=O.medium)?void 0:R.solved)||0,"/",(null==(U=ef.leetcode)||null==(F=U.stats)||null==(E=F.medium)?void 0:E.total)||0]}),(0,a.jsxs)(u.default.NormalText,{textColor:"text-gray-700",xs:!0,children:["Beats"," ",(null==(P=ef.leetcode)||null==(z=P.stats)||null==(W=z.medium)?void 0:W.BeatsPercentage)||0,"%"]})]}),(0,a.jsxs)("div",{className:"flex  flex-1 flex-col ",children:[(0,a.jsx)(u.default.SemiBoldText,{textColor:"text-red-300",xs:!0,children:"Hard"}),(0,a.jsxs)(u.default.SemiBoldText,{className:"mt-1.5",xs:!0,children:[(null==(q=ef.leetcode)||null==(V=q.stats)||null==(H=V.hard)?void 0:H.solved)||0,"/",(null==(J=ef.leetcode)||null==(X=J.stats)||null==(Y=X.hard)?void 0:Y.total)||0]}),(0,a.jsxs)(u.default.NormalText,{textColor:"text-gray-700",xs:!0,children:["Beats"," ",(null==(Z=ef.leetcode)||null==(K=Z.stats)||null==(Q=K.hard)?void 0:Q.BeatsPercentage)||0,"%"]})]})]})]})]})]}),(0,a.jsxs)("div",{className:"mt-6",children:[(0,a.jsxs)("div",{className:"flex justify-between mb-4",children:[(0,a.jsxs)("p",{className:"text-xs text-gray-1k font-normal ",children:[(0,a.jsx)("span",{className:"font-semibold",children:eM})," ","Submissions in the last year"]}),(0,a.jsxs)("div",{className:"flex justify-between gap-6",children:[(0,a.jsxs)("p",{className:"text-xs text-gray-1k font-normal hidden lg:block ",children:["Total Active Days:"," ",(0,a.jsx)("span",{className:"font-semibold",children:(null==ef||null==(ee=ef.leetcode)||null==($=ee.contributions)?void 0:$.length)||(null==(el=ef.leetcode)||null==(et=el.userCalendar)?void 0:et.totalActiveDays)||0})]}),(0,a.jsxs)("p",{className:"text-xs text-gray-1k font-normal ",children:["Max Streak:"," ",(0,a.jsx)("span",{className:"font-semibold",children:(null==(es=ef.leetcode)||null==(ea=e
1s.userCalendar)?void 0:ea.streak)||0})]})]})]}),(0,a.jsxs)("div",{className:"".concat(ev?"opacity-50":"opacity-100"),children:[!ev&&ef.leetcode&&(0,a.jsx)("div",{className:"overflow-x-auto w-full h-full mb-4",children:(0,a.jsx)(B.A,{startDate:new Date(new Date().setFullYear(new Date().getFullYear()-1)),endDate:new Date().toISOString().slice(0,10),showWeekdayLabels:!0,showOutOfRangeDays:!0,tooltipDataAttrs:e=>{let t=G.A.getFormattedDateAndMonth(new Date(e.date));return e.count?{"data-tip":"".concat(e.count," Submissions on ").concat(t)}:{"data-tip":"No Submissions"}},classForValue:e=>{var t,l,a,s,n,r,o,i;return e&&0!==e.count?e.count>(null==(l=ef.leetcode)||null==(t=l.colorCodeRef)?void 0:t.darkest)?"color-github-4":e.count>(null==(s=ef.leetcode)||null==(a=s.colorCodeRef)?void 0:a.dark)?"color-github-3":e.count>(null==(r=ef.leetcode)||null==(n=r.colorCodeRef)?void 0:n.light)?"color-github-2":(e.count>(null==(i=ef.leetcode)||null==(o=i.colorCodeRef)||o.lightest),"color-github-1"):"color-empty"},values:null==ef||null==(er=ef.leetcode)||null==(en=er.contributions)?void 0:en.map(e=>({date:e.contributionDate,count:e.contributions}))})}),(0,a.jsx)(eN,{})]})]})]})]}),eA&&(0,a.jsx)(u.default.ErrorText,{className:"mt-4",children:eA}),ev||(null==ef?void 0:ef.leetcode)?null:(0,a.jsx)(h.A.NoData,{text:"Could not fetch LeetCode profile."}),ew&&(0,a.jsx)(i.A,{showModal:ew,setShowModal:eS,deleteText:"Are you sure you want to remove this section from portfolio?",confirm:()=>eT()})]})}};var eS=l(14291),eA=l(4282),eD=l(4960);let eT=e=>{let{projectLaunchedThisWeek:t,isReadOnly:l=!1}=e,[n,r]=(0,s.useState)(!1);return(null==t?void 0:t.id)?(0,a.jsxs)("div",{style:{background:"linear-gradient(180deg, rgb(var(--gray-200)) -27.51%, rgba(255, 255, 255, 0.00) 100%)"},onMouseEnter:()=>{r(!0)},onMouseLeave:()=>{r(!1)},className:"flex flex-col gap-2 mb-8 pt-3 rounded-2xl lg:hover:shadow-10 lg:focus-within:shadow-10 transition-shadow duration-150",children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-1 px-4",children:[(0,a.jsx)(eD.a,{autoplay:n,loop:!0,src:x.CDNLOTTIES.rocketLottie,style:{height:"16px",width:"16px"}},"lottie-rocket-".concat(n)),(0,a.jsx)(u.default.SemiBoldText,{xs:!0,children:"Launched this week"})]}),(0,a.jsx)("div",{className:"bg-gray-00 rounded-2xl",children:(0,a.jsx)(X.A.ProjectCard,{analyticsEventSource:J.oi.USER_PROFILE,project:t,hoverShadow:!1,isReadOnly:l})})]}):null},eC=e=>{let{children:t}=e;return(0,a.jsx)("div",{className:"mb-20",children:t})},eM=function(e){var t,l,u;let{data:c,openProjectInNewTab:m=!1,isReadOnly:h=!1}=e,g=(0,n.useDispatch)(),p=N.default.isUserLoggedIn(),{primaryUserData:f}=(0,n.useSelector)(e=>e.PrimaryUserData),{youtubeError:v}=(0,n.useSelector)(e=>e.CommonAppData),[j,b]=(0,s.useState)(!1),[I,w]=(0,s.useState)(),[S,A]=(0,s.useState)(!1),D=e=>{b(!0),w(e),f.published||g(r.commonAppDataAction.toggleShowPublishProfileModal(!0))};(0,s.useEffect)(()=>()=>{b(!1),w(),A(!1)},[JSON.stringify(c)]);let T=c.me&&Object.keys(f).length>0?f:c,C=T.integrations?Object.keys(T.integrations).length:0,M=(C=(null==T||null==(t=T.projects)?void 0:t.length)>0?C+1:C)>0||(null==T||null==(l=T.projects)?void 0:l.length)>0?function(e){let t={};if(null==e?void 0:e.integrationsOrder){let l=Object.keys(e.integrations);e.projects&&(null==e?void 0:e.projects.length)>0&&l.push("projects");let a=e.integrationsOrder.map(e=>e.name),s=l.filter(e=>!a.find(t=>e===t));[...a,...s].forEach(l=>{if(l===x.default.INTEGRATION_NAMES_DB.projects){t[l]=!0;return}e.integrations[l]&&(t[l]=e.integrations[l])})}else t=e.integrations,e.projects&&(null==e?void 0:e.projects.length)>0&&(t={...t,[x.default.INTEGRATION_NAMES_DB.projects]:!0});return t}(T):{},k=c.me&&C>1,L=Object.keys(x.default.INTEGRATION_NAMES_DB).sort((e,t)=>{var l,a;return((null==(l=x.default.INTEGRATION_SHARING_INFO[e])?void 0:l.order)||999)-((null==(a=x.default.INTEGRATION_SHARING_INFO[t])?void 0:a.order)||999)}).filter(e=>{var t;return(e!==x.default.INTEGRATION_NAMES_DB.projects||T.projects&&(null==T||null==(t=T.projects)?void 0:t.length)!==0)&&(M[e]||e===x.default.INTEGRATION_NAMES_DB.projects)?null:e}),R=(null==f?void 0:f.id)===c.id,O=null==T||null==(u=T.projects)?void 0:u.find(e=>(0,eA.pE)(e));return(0,a.jsxs)("div",{children:[O?(0,a.jsx)(eT,{projectLaunchedThisWeek:O,isReadOnly:h}):null,c.me&&(0,a.jsx)(ew.EmptySections,{userId:c.id,emptyIntegrations:L,data:T}),k&&(0,a.jsx)("div",{className:"mb-8 flex justify-end",children:(0,a.jsx)(o.Ay.CarbonOutline,{small:!0,onClick:()=>A(!0),iconLeft:(0,a.jsx)(y.MenuAltIcon,{size:16}),children:"Reorder Work"})}),(0,a.jsx)("div",{className:"".concat(c.me?"mt-8":"mt-0"),children:Object.keys(M).map(e=>{var t,l,s,n,r,o,i;switch(e){case x.default.INTEGRATION_NAMES_DB.github:return(0,a.jsx)(eC,{children:(0,a.jsx)(ew.Github,{username:T.integrations.github.username,userid:c.id,data:T,createShareWork:D,isLoggedIn:p,isPrimaryUser:R})},"".concat(e,"-section"));case x.default.INTEGRATION_NAMES_DB.medium:return(0,a.jsx)(eC,{children:(0,a.jsx)(ew.Medium,{username:T.integrations.medium.username,userid:c.id,data:T,createShareWork:D,isLoggedIn:p,isPrimaryUser:R})},"".concat(e,"-section"));case x.default.INTEGRATION_NAMES_DB.dribbble:return(0,a.jsx)(eC,{children:(0,a.jsx)(ew.Dribbble,{username:T.integrations.dribbble.username,userid:c.id,data:T,createShareWork:D,isLoggedIn:p,isPrimaryUser:R})},"".concat(e,"-section"));case x.default.INTEGRATION_NAMES_DB.codeforces:return(0,a.jsx)(eC,{children:(0,a.jsx)(ew.CodeForces,{username:T.integrations.codeforces.username,userid:c.id,data:T,createShareWork:D,isLoggedIn:p,isPrimaryUser:R})},"".concat(e,"-section"));case x.default.INTEGRATION_NAMES_DB.devto:return(0,a.jsx)(eC,{children:(0,a.jsx)(ew.Devto,{username:T.integrations.devto.username,userid:c.id,data:T,createShareWork:D,isLoggedIn:p,isPrimaryUser:R})},"".concat(e,"-section"));case x.default.INTEGRATION_NAMES_DB.substack:return(0,a.jsx)(eC,{children:(0,a.jsx)(ew.Substack,{username:T.integrations.substack.username,userid:c.id,data:T,createShareWork:D,isLoggedIn:p,isPrimaryUser:R})},"".concat(e,"-section"));case x.default.INTEGRATION_NAMES_DB.youtube:return(0,a.jsx)(eC,{children:(0,a.jsx)(ew.YouTube,{username:T.integrations.youtube.username,userid:c.id,data:T,createShareWork:D,isLoggedIn:p,isPrimaryUser:R})},"".concat(e,"-section"));case x.default.INTEGRATION_NAMES_DB.gumroad:return(0,a.jsx)(eC,{children:(0,a.jsx)(ew.Gumroad,{username:T.integrations.gumroad.username,userid:c.id,data:T,createShareWork:D,isLoggedIn:p,isPrimaryUser:R})},"".concat(e,"-section"));case x.default.INTEGRATION_NAMES_DB.productHunt:return(0,a.jsx)(eC,{children:(0,a.jsx)(ew.ProductHunt,{username:T.integrations.productHunt.username,userid:c.id,data:T,createShareWork:D,isLoggedIn:p,isPrimaryUser:R})},"".concat(e,"-section"));case x.default.INTEGRATION_NAMES_DB.rss:return(0,a.jsx)(eC,{children:(0,a.jsx)(ew.RSS,{username:T.integrations.rss.username,userid:c.id,data:T,createShareWork:D,isLoggedIn:p,isPrimaryUser:R})},"".concat(e,"-section"));case x.default.INTEGRATION_NAMES_DB.projects:return(0,a.jsx)("div",{children:(null==c||null==(t=c.projects)?void 0:t.length)>0&&(0,a.jsx)(eC,{children:(0,a.jsx)(ew.Projects,{username:T.username,userid:T.id,data:T,createShareWork:D,projectData:null==T?void 0:T.projects,isLoggedIn:p,openInNewTab:m,isReadOnly:h})})},"projects-section");case x.default.INTEGRATION_NAMES_DB.adplist:return(0,a.jsx)(eC,{children:(0,a.jsx)(ew.ADPList,{username:(null==T||null==(s=T.integrations)||null==(l=s.adplist)?void 0:l.username)||(null==T||null==(n=T.integrations)?void 0:n.adplist),userId:null==c?void 0:c.id,data:T,createShareWork:D,isLoggedIn:p,isPrimaryUser:R})},"adplist-section");case x.default.INTEGRATION_NAMES_DB.leetcode:return(0,a.jsx)(eC,{children:(0,a.jsx)(ew.LeetCode,{username:(null==T||null==(o=T.integrations)||null==(r=o.leetcode)?void 0:r.username)||(null==T||null==(i=T.integrations)?void 0:i.leetcode),userId:null==c?void 0:c.id,data:T})},"leetcode-section")}return null})}),j&&f.published&&(0,a.jsx)(eS.A.CreatePostWithContext,{showModal:j,setShowModal:b,shareData:I,fromShareModal:!0}),S&&(0,a.jsx)(d.A.ReorderSections,{setReorder:A,integrations:M}),v&&(0,a.jsx)(i.W,{showModal:v,infoText:"Cannot integrate YouTube, either channel or videos are not available.",setShowModal:()=>g(r.commonAppDataAction.toggleYoutubError(!1)),onBtnClick:()=>g(r.commonAppDataAction.toggleYoutubError(!1))})]})}}}]);

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.