1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9038],{12115:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/team",function(){return r(13079)}])},31111:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var a=r(85893);r(67294);var n=r(49240);let s={idle:{cx:258,cy:120,r:6,hx:259.5,hy:118.5,hr:2,shape:"circle"},happy:{cx:258,cy:120,r:5.5,hx:259.5,hy:119,hr:1.5,shape:"squint"},thinking:{cx:260,cy:118,r:6,hx:262,hy:116.5,hr:2,shape:"circle"},searching:{cx:256,cy:120,r:6.5,hx:254,hy:118.5,hr:2,shape:"wide"},celebrating:{cx:258,cy:120,r:5,hx:259,hy:119,hr:1.5,shape:"squint"},sad:{cx:258,cy:121,r:5.5,hx:259,hy:120,hr:1.5,shape:"circle"},sleeping:{cx:258,cy:120,r:5,hx:259,hy:119,hr:0,shape:"closed"},proud:{cx:258,cy:119,r:6.5,hx:260,hy:117,hr:2.5,shape:"circle"},waving:{cx:258,cy:120,r:6,hx:259.5,hy:118.5,hr:2,shape:"circle"},coding:{cx:258,cy:120,r:5,hx:259.5,hy:119,hr:1.5,shape:"squint"},love:{cx:258,cy:120,r:6,hx:259,hy:118,hr:0,shape:"heart"}},i={idle:"",happy:"rotate(-3deg)",thinking:"rotate(4deg) translateY(-2px)",searching:"rotate(-2deg) translateX(-3px)",celebrating:"rotate(-6deg) translateY(-4px)",sad:"rotate(5deg) translateY(3px)",sleeping:"rotate(8deg) translateY(4px)",proud:"rotate(-4deg) translateY(-3px) scale(1.02)",waving:"rotate(-5deg)",coding:"rotate(2deg) translateY(-1px)",love:"rotate(-3deg) scale(1.03)"},o={idle:!1,happy:!0,thinking:!1,searching:!1,celebrating:!0,sad:!1,sleeping:!1,proud:!1,waving:!0,coding:!1,love:!0},l={idle:"crane-idle",happy:"crane-happy",thinking:"crane-thinking",searching:"crane-searching",celebrating:"crane-celebrating",sad:"crane-sad",sleeping:"crane-sleeping",proud:"crane-proud",waving:"crane-waving",coding:"crane-thinking",love:"crane-happy"},c={sm:{wrapper:"w-16 h-16",caption:"text-xs mt-1"},md:{wrapper:"w-24 h-24",caption:"text-sm mt-2"},lg:{wrapper:"w-32 h-32",caption:"text-sm mt-2"},xl:{wrapper:"w-40 h-40",caption:"text-base mt-3"}};function d(e){let{mood:t="idle",className:r="",fill:d="#FF4500",caption:m,captionClass:x="",size:u="md",showBg:h=!1}=e,p=s[t],g=i[t],f=o[t],b=l[t],y=c[u],v="#1C1C1C";return(0,a.jsxs)("div",{className:"flex flex-col items-center ".concat(r),children:[(0,a.jsxs)("div",{className:"".concat(y.wrapper," ").concat(b," relative"),children:[h&&(0,a.jsx)("div",{className:"absolute inset-0 rounded-full bg-[#EDEFF1] dark:bg-[#343536]"}),(0,a.jsxs)("svg",{viewBox:"23 95 330 345",className:"w-full h-full relative z-10",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{transform:g,transition:"transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)"},children:[(0,a.jsx)("path",{d:n.y,transform:"translate(266,117)",fill:d}),(0,a.jsx)("svg",{x:"255",y:"102",width:"92",height:"47",viewBox:"255 102 92 47",children:(0,a.jsx)("path",{d:n.y,transform:"translate(266,117)",fill:"#CC3700"})}),"closed"===p.shape?(0,a.jsx)("line",{x1:p.cx-5,y1:p.cy,x2:p.cx+5,y2:p.cy,stroke:v,strokeWidth:"2.5",strokeLinecap:"round"}):"squint"===p.shape?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{d:"M".concat(p.cx-5," ").concat(p.cy+1," Q").concat(p.cx," ").concat(p.cy-5," ").concat(p.cx+5," ").concat(p.cy+1),stroke:v,strokeWidth:"2.5",strokeLinecap:"round",fill:"none"}),p.hr>0&&(0,a.jsx)("circle",{cx:p.hx,cy:p.hy,r:.8*p.hr,fill:"white",opacity:"0.7"})]}):"heart"===p.shape?(0,a.jsx)("g",{transform:"translate(".concat(p.cx-5,", ").concat(p.cy-5,")"),children:(0,a.jsx)("path",{d:"M5 9 C5 9 0 5 0 3 C0 1 1.5 0 2.5 0 C3.5 0 5 1.5 5 3 C5 1.5 6.5 0 7.5 0 C8.5 0 10 1 10 3 C10 5 5 9 5 9Z",fill:"#EA0027"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("circle",{cx:p.cx,cy:p.cy,r:p.r,fill:v}),p.hr>0&&(0,a.jsx)("circle",{cx:p.hx,cy:p.hy,r:p.hr,fill:"white"})]}),f&&(0,a.jsx)("circle",{cx:242,cy:135,r:8,fill:"#FF4500",opacity:"0.12"}),"thinking"===t&&(0,a.jsx)("line",{x1:254,y1:112,x2:264,y2:110,stroke:v,strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.4"}),"sad"===t&&(0,a.jsx)("line",{x1:253,y1:114,x2:263,y2:112,stroke:v,strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.35"}),"proud"===t&&(0,a.jsx)("line",{x1:253,y1:111,x2:263,y2:111,stroke:v,strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.3"}),"coding"===t&&(0,a.jsxs)("g",{opacity:"0.25",stroke:v,strokeWidth:"1",fill:"none",children:[(0,a.jsx)("circle",{cx:255,cy:120,r:7}),(0,a.jsx)("line",{x1:262,y1:120,x2:265,y2:120})]}),"sleeping"===t&&(0,a.jsxs)("g",{opacity:"0.4",fill:v,children:[(0,a.jsx)("text",{x:"270",y:"108",fontSize:"12",fontWeight:"bold",fontFamily:"sans-serif",children:"z"}),(0,a.jsx)("text",{x:"280",y:"100",fontSize:"9",fontWeight:"bold",fontFamily:"sans-serif",children:"z"}),(0,a.jsx)("text",{x:"287",y:"94",fontSize:"7",fontWeight:"bold",fontFamily:"sans-serif",children:"z"})]}),"love"===t&&(0,a.jsxs)("g",{opacity:"0.4",children:[(0,a.jsx)("text",{x:"270",y:"105",fontSize:"10",fontFamily:"sans-serif",children:"â¤"}),(0,a.jsx)("text",{x:"282",y:"98",fontSize:"7",fontFamily:"sans-serif",children:"â¤"})]})]})]}),m&&(0,a.jsx)("p",{className:"text-center font-medium ".concat(y.caption," ").concat(x),children:m})]})}},67162:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var a=r(85893),n=r(9008),s=r.n(n);function i(e){let{title:t="TrueResume - AI Resume Builder | ATS-Optimized Resumes in Seconds",description:n="Create professional, ATS-optimized resumes tailored to any job description using advanced AI. Free resume builder with 90%+ ATS match scores. Get 3x more interviews.",canonical:i="https://trueresume.ai",ogImage:o="https://trueresume.ai/og-image.png",ogType:l="website",twitterCard:c="summary_large_image",keywords:d="AI resume builder, ATS resume, resume generator, professional resume, job application, resume maker, free resume, CV builder, career tools",structuredData:m,siteWide:x=!0,noindex:u=!1,lang:h="en",alternate:p=[],preconnect:g=["https://fonts.gstatic.
1com","https://www.google-analytics.com"]}=e,f=e=>null==e?"":String(e),b=()=>{try{let e=r(78311),a=[];return a.push(e.organizationSchema()),a.push(e.webSiteSchema()),a.push(e.webPageSchema({url:String(i),name:String(t),description:String(n)})),a}catch(e){return console.warn("SEO: failed to load site schema helper",e),null}},y=(e=>{if(!e)return null;try{return Array.isArray(e)?e.map(e=>JSON.stringify(e)):JSON.stringify(e)}catch(e){return console.warn("SEO: failed to stringify structuredData",e),null}})((()=>{if(!x)return m||null;let e=b();return e||m?m?Array.isArray(m)?[...e,...m]:[...e,m]:e:null})());return(0,a.jsxs)(s(),{children:[g.map(e=>(0,a.jsx)("link",{rel:"preconnect",href:e,crossOrigin:"anonymous"},e)),(0,a.jsx)("title",{children:f(t)}),(0,a.jsx)("meta",{name:"title",content:f(t)}),(0,a.jsx)("meta",{name:"description",content:f(n)}),d&&(0,a.jsx)("meta",{name:"keywords",content:d}),(0,a.jsx)("link",{rel:"canonical",href:i}),u?(0,a.jsx)("meta",{name:"robots",content:"noindex, nofollow"}):(0,a.jsx)("meta",{name:"robots",content:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1"}),(0,a.jsx)("meta",{property:"og:type",content:f(l)}),(0,a.jsx)("meta",{property:"og:url",content:f(i)}),(0,a.jsx)("meta",{property:"og:title",content:f(t)}),(0,a.jsx)("meta",{property:"og:description",content:f(n)}),(0,a.jsx)("meta",{property:"og:image",content:f(o)}),(0,a.jsx)("meta",{property:"og:image:width",content:"1200"}),(0,a.jsx)("meta",{property:"og:image:height",content:"630"}),(0,a.jsx)("meta",{property:"og:site_name",content:"TrueResume"}),(0,a.jsx)("meta",{name:"twitter:card",content:f(c)}),(0,a.jsx)("meta",{name:"twitter:url",content:f(i)}),(0,a.jsx)("meta",{name:"twitter:title",content:f(t)}),(0,a.jsx)("meta",{name:"twitter:description",content:f(n)}),(0,a.jsx)("meta",{name:"twitter:image",content:f(o)}),(0,a.jsx)("meta",{name:"twitter:creator",content:"@TrueResume"}),y&&(Array.isArray(y)?y.map((e,t)=>(0,a.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:e}},t)):(0,a.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:y}})),p.map(e=>(0,a.jsx)("link",{rel:"alternate",hrefLang:e.hrefLang,href:e.href},e.hrefLang))]})}},42949:function(e,t,r){"use strict";r.d(t,{q:function(){return s}});var a=r(85893);r(67294);var n=r(54271);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:26;return(0,a.jsx)(n.ZP,{variant:e,size:t,density:"full",animated:!0})}},26709:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var a=r(85893);r(67294);var n=r(92761),s=r(79298),i=r(11163),o=r(67694);function l(e){let{title:t,subtitle:r,onPrimary:l,primaryLabel:c,showBack:d=!0}=e,m=(0,i.useRouter)(),{theme:x}=(0,o.F)();return(0,a.jsx)("div",{className:"md:hidden sticky top-12 z-40 px-3 py-2.5 transition-colors ".concat("dark"===x?"bg-[#1A1A1B] border-b border-[#343536]":"bg-white border-b border-[#EDEFF1]"),children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[d?(0,a.jsx)(s.hU,{onClick:()=>m.back(),icon:n.Z,"aria-label":"Back",variant:"ghost",size:"sm"}):(0,a.jsx)("div",{className:"w-9 h-9","aria-hidden":!0}),(0,a.jsxs)("div",{className:"flex-1 text-center min-w-0",children:[t&&(0,a.jsx)("div",{className:"font-semibold text-sm truncate ".concat("dark"===x?"text-white":"text-gray-900"),children:t}),r&&(0,a.jsx)("div",{className:"text-xs truncate ".concat("dark"===x?"text-[#818384]":"text-gray-500"),children:r})]}),(0,a.jsx)("div",{className:"flex-shrink-0 flex items-center justify-end",children:l?(0,a.jsx)(s.zx,{onClick:l,size:"sm",variant:"primary",className:"text-xs px-2.5 py-1.5 whitespace-nowrap",children:c||"Done"}):(0,a.jsx)("div",{className:"w-9 h-9","aria-hidden":!0})})]})})}},78311:function(e,t,r){"use strict";function a(){let{name:e="TrueResume",url:t="https://trueresume.ai",logo:r="https://trueresume.ai/favicon-512x512.png",sameAs:a=["https://twitter.com/TrueResume","https://www.linkedin.com/company/trueresume","https://github.com/TrueResume"],alternateNames:n=["TruResume","truresume","True Resume","Tru Resume","Trueresume"]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{"@context":"https://schema.org","@type":"Organization",name:e,url:t,logo:r,sameAs:a,alternateName:n}}function n(){let{name:e="TrueResume",url:t="https://trueresume.ai",searchPath:r="/search?q={search_term_string}"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{"@context":"https://schema.org","@type":"WebSite",name:e,url:t,potentialAction:{"@type":"SearchAction",target:"".concat(t.replace(/\/$/,"")).concat(r),"query-input":"required name=search_term_string"}}}function s(){let{url:e="https://trueresume.ai",name:t="TrueResume",description:r="AI resume builder and ATS-optimized resume generator",pageType:a="WebPage"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{"@context":"https://schema.org","@type":a,url:e,name:t,description:r}}function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:e.map(e=>({"@type":"ListItem",position:e.position,name:e.name,item:e.item}))}}r.r(t),r.d(t,{breadcrumbList:function(){return i},organizationSchema:function(){return a},webPageSchema:function(){return s},webSiteSchema:function(){return n}}),t.default={organizationSchema:a,webSiteSchema:n,webPageSchema:s,breadcrumbList:i}},13079:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return N},default:function(){return F}});var a=r(85893),n=r(67294),s=r(33299),i=r(11163),o=r(85412),l=r(26709),c=r(86501),d=r(42949),m=r(67694),x=r(7117),u=r(7145),h=r(11429),p=r(29711);let g=n.forwardRef(function(e,t){let{title:r,titleId:a,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},s),r?n.createElement("title",{id:a},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5"}))}),f=n.forwardRef(function(e,t){let{title:r,titleId:a,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},s),r?n.createElement("title",{id:a},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.7
15"}))}),b=n.forwardRef(function(e,t){let{title:r,titleId:a,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},s),r?n.createElement("title",{id:a},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75"}))}),y=n.forwardRef(function(e,t){let{title:r,titleId:a,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},s),r?n.createElement("title",{id:a},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}),v=n.forwardRef(function(e,t){let{title:r,titleId:a,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},s),r?n.createElement("title",{id:a},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))});var w=r(31111);function j(){var e,t,r,s,i,o;let{theme:l}=(0,m.F)(),[j,k]=(0,n.useState)(null),[N,F]=(0,n.useState)(!0),[E,S]=(0,n.useState)(""),[C,L]=(0,n.useState)(!1),[T,R]=(0,n.useState)(null),[A,Z]=(0,n.useState)(null),[M,W]=(0,n.useState)(!1),[_,O]=(0,n.useState)("free"),[I,D]=(0,n.useState)(0),[z,P]=(0,n.useState)(3),[B,U]=(0,n.useState)(!1),q=(0,n.useCallback)(async e=>{if(window.confirm("Are you sure you want to revoke the invitation for ".concat(e,"?"))){R(null);try{let t=await fetch("/api/team/revoke-invite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e})}),r=await t.json();t.ok?(c.default.success(r.message||"Invitation for ".concat(e," revoked."),{duration:3e3,icon:(0,d.q)("check"),style:{maxWidth:"400px"}}),setTimeout(()=>Y(),500)):c.default.error(r.message||r.error||"Failed to revoke invitation",{duration:4e3,style:{maxWidth:"400px"}})}catch(e){console.error("Revoke invite error:",e),c.default.error("Network error. Please try again.",{duration:4e3,style:{maxWidth:"400px"}})}}},[]);(0,n.useEffect)(()=>{Y()},[]),(0,n.useEffect)(()=>{if((null==T?void 0:T.type)==="success"){let e=setTimeout(()=>{R(null),Z(null)},8e3);return()=>clearTimeout(e)}},[T]);let Y=async()=>{try{let e=await fetch("/api/team"),t=await e.json();e.ok&&k(t)}catch(e){console.error("Failed to fetch team data:",e)}finally{F(!1)}},H=async e=>{if(e.preventDefault(),!E.trim()){R({type:"error",text:"Please enter an email address"});return}if(!E.includes("@")||!E.includes(".")){R({type:"error",text:"Please enter a valid email address (e.g., [email protected])"});return}L(!0),R(null);try{let e=await fetch("/api/team/invite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:E.trim().toLowerCase()})}),t=await e.json();if(e.ok){if(R({type:"success",text:"Invitation sent to ".concat(E,"!")}),t.inviteUrl){Z(t.inviteUrl);try{await navigator.clipboard.writeText(t.inviteUrl),U(!0),setTimeout(()=>U(!1),3e3)}catch(e){console.log("Could not copy to clipboard:",e)}}S(""),setTimeout(()=>Y(),500)}else R({type:"error",text:t.message||t.error||"Failed to send invitation"})}catch(e){console.error("Invite error:",e),R({type:"error",text:"Network error. Please check your connection and try again."})}finally{L(!1)}},V=async(e,t)=>{if(confirm("Are you sure you want to remove ".concat(t," from your team?\n\nThey will immediately lose access to Team features."))){R(null);try{let r=await fetch("/api/team/remove-member?memberId=".concat(e),{method:"DELETE"}),a=await r.json();r.ok?(R({type:"success",text:a.message||"â
".concat(t," has been removed from the team")}),c.default.success(a.message||"â
".concat(t," has been removed from the team"),{duration:3e3,style:{maxWidth:"400px"}}),setTimeout(()=>Y(),500)):(R({type:"error",text:a.message||a.error||"Failed to remove member"}),c.default.error(a.message||a.error||"Failed to remove member",{duration:4e3,style:{maxWidth:"400px"}}))}catch(e){console.error("Remove member error:",e),R({type:"error",text:"Network error. Please check your connection and try again."}),c.default.error("Network error. Please check your connection and try again.",{duration:4e3,style:{maxWidth:"400px"}})}}},J=async()=>
1{if(A)try{await navigator.clipboard.writeText(A),U(!0),setTimeout(()=>U(!1),2e3)}catch(e){console.error("Failed to copy:",e)}};if(N)return(0,a.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,a.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})});if(!j)return(0,a.jsxs)("div",{className:"rounded-xl border p-8 text-center ".concat("dark"===l?"bg-[#272729] border-[#343536]":"bg-white border-[#EDEFF1]"),children:[(0,a.jsx)(u.Z,{className:"w-14 h-14 sm:w-16 sm:h-16 mx-auto mb-4 text-gray-400"}),(0,a.jsx)("h3",{className:"text-xl font-semibold mb-2 ".concat("dark"===l?"text-white":"text-gray-900"),children:"No Team Plan"}),(0,a.jsx)("p",{className:"mb-4 ".concat("dark"===l?"text-[#818384]":"text-gray-600"),children:"Upgrade to a Team plan to collaborate with team members"}),(0,a.jsx)("button",{onClick:async()=>{try{var e,t,r,a,n,s,i,o,l,c;let d=await fetch("/api/subscription/status"),m=await d.json();O((null===(e=m.subscription)||void 0===e?void 0:e.plan)||(null===(t=m.usage)||void 0===t?void 0:t.plan)||"free"),D(null!==(o=null!==(i=null===(r=m.subscription)||void 0===r?void 0:r.resumesGenerated)&&void 0!==i?i:null===(a=m.usage)||void 0===a?void 0:a.resumesUsed)&&void 0!==o?o:0),P(null!==(c=null!==(l=null===(n=m.subscription)||void 0===n?void 0:n.resumeLimit)&&void 0!==l?l:null===(s=m.usage)||void 0===s?void 0:s.limit)&&void 0!==c?c:3)}catch(e){console.error("Failed to load subscription status for team modal",e)}W(!0)},className:"bg-gradient-to-r from-[#FF4500] to-[#CC3700] text-white px-6 py-2 rounded-full font-semibold hover:shadow-lg transition-all",children:"Upgrade to Team"}),(0,a.jsx)(x.Z,{isOpen:M,onClose:()=>W(!1),currentPlan:_,resumesUsed:I,resumesLimit:z})]});let X=1+((null==j?void 0:null===(e=j.members)||void 0===e?void 0:e.length)||0)+((null==j?void 0:null===(t=j.pendingInvitations)||void 0===t?void 0:t.length)||0),G=(null==j?void 0:null===(r=j.subscription)||void 0===r?void 0:r.teamMemberLimit)||1,Q=Math.min(100,Math.round(X/G*100));return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"rounded-xl border p-6 ".concat("dark"===l?"bg-[#272729] border-[#343536]":"bg-white border-[#EDEFF1]"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)(u.Z,{className:"w-8 h-8 text-blue-600"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-2xl font-bold ".concat("dark"===l?"text-white":"text-gray-900"),children:"Team Management"}),(0,a.jsx)("p",{className:"text-sm ".concat("dark"===l?"text-[#818384]":"text-gray-600"),children:"owner"===j.role?"You are the team owner":"Member of ".concat(j.owner.name,"'s team")})]})]}),j.subscription.teamMemberLimit&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsxs)("div",{className:"px-4 py-2 rounded-lg ".concat("dark"===l?"bg-[#343536]":"bg-gray-100"),children:[(0,a.jsx)("p",{className:"text-sm ".concat("dark"===l?"text-[#818384]":"text-gray-600"),children:"Team Slots Used"}),(0,a.jsxs)("p",{className:"text-2xl font-bold ".concat("dark"===l?"text-white":"text-gray-900"),children:[X," / ",G]})]}),(0,a.jsxs)("div",{className:"px-4 py-2 rounded-lg ".concat("dark"===l?"bg-[#343536]":"bg-gray-100"),children:[(0,a.jsx)("p",{className:"text-sm ".concat("dark"===l?"text-[#818384]":"text-gray-600"),children:"Plan"}),(0,a.jsx)("p",{className:"text-xl font-bold capitalize ".concat("dark"===l?"text-white":"text-gray-900"),children:j.subscription.plan})]})]}),(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("div",{className:"flex justify-between mb-1",children:[(0,a.jsx)("span",{className:"text-xs font-medium ".concat("dark"===l?"text-[#818384]":"text-gray-600"),children:"Slots used"}),(0,a.jsxs)("span",{className:"text-xs font-medium ".concat("dark"===l?"text-[#818384]":"text-gray-600"),children:[Q,"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 dark:bg-[#343536] rounded-full h-2.5",children:(0,a.jsx)("div",{className:"h-2.5 rounded-full ".concat(100===Q?"bg-red-500":"bg-blue-500"),style:{width:"".concat(Q,"%")}})}),(0,a.jsx)("div",{className:"mt-1 text-xs ".concat(100===Q?"text-red-500":"text-gray-500 dark:text-[#818384]"),children:100===Q?"You have used all your team slots (including pending invites). Remove a member or revoke an invite to free up space.":"You have used ".concat(X," out of ").concat(G," slots (including pending invites).")})]})]})]}),T&&(0,a.jsx)("div",{className:"rounded-xl p-5 shadow-lg border-2 animate-in slide-in-from-top duration-300 ".concat("success"===T.type?"bg-green-50 border-green-500 dark:bg-green-900/20":"bg-red-50 border-red-500 dark:bg-red-900/20"),children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"flex-shrink-0",children:"success"===T.type?(0,a.jsx)(h.Z,{className:"w-6 h-6 text-green-600 dark:text-green-400"}):(0,a.jsx)(p.Z,{className:"w-6 h-6 text-red-600 dark:text-red-400"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"font-semibold text-lg mb-1 ".concat("success"===T.type?"text-green-800 dark:text-green-200":"text-red-800 dark:text-red-200"),children:T.text}),A&&"success"===T.type&&(0,a.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,a.jsxs)("p",{className:"text-sm text-green-700 dark:text-green-300 flex items-center gap-2",children:[(0,a.jsx)(g,{className:"w-4 h-4"}),B?"â
Link copied to clipboard!":"Share this link with your team member:"]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 p-3 rounded-lg ".concat("dark"===l?"bg-[#272729]":"bg-white border border-green-200/50"),children:[(0,a.jsx)("input",{type:"text",value:A,readOnly:!0,className:"flex-1 bg-transparent text-sm font-mono ".concat("dark"===l?"text-[#D7DADC]":"text-gray-700"," outline-none"),onClick:e=>e.target.select()}),(0,a.jsxs)("button",{onClick:J,className:"px-3 py-1.5 rounded-full font-medium text-sm transition-all flex items-center gap-1.5 ".concat(B?"bg-green-600 text-white":"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 hover:bg-green-200 dark:hover:bg-green-900/50"),children:[(0,a.jsx)(f,{className:"w-4 h-4"}),B?"Copied!":"Copy"]})]}),(0,a.jsxs)("div",{className:"p-3 rounded-lg ".concat("dark"===l?"bg-blue-900/20 border border-blue-700/30":"bg-blue-50 border border-blue-200"),children:[(0,a.jsx)("p",{className:"text-xs text-blue-700 dark:text-blue-300 font-medium mb-1",children:"\uD83D\uDCE7 How to share this invitation:"}
1),(0,a.jsx)("p",{className:"text-xs text-blue-600 dark:text-blue-400",children:"Copy the link above and send it via WhatsApp, email, or any messaging app. The link expires in 7 days."})]})]})]}),(0,a.jsx)("button",{onClick:()=>{R(null),Z(null)},className:"flex-shrink-0 p-1 rounded-lg transition-colors ".concat("success"===T.type?"hover:bg-green-200 dark:hover:bg-green-800":"hover:bg-red-200 dark:hover:bg-red-800"),children:(0,a.jsx)(p.Z,{className:"w-5 h-5 ".concat("success"===T.type?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400")})})]})}),"owner"===j.role&&(0,a.jsxs)("div",{className:"rounded-xl border p-6 ".concat("dark"===l?"bg-[#272729] border-[#343536]":"bg-white border-[#EDEFF1]"),children:[(0,a.jsx)("h3",{className:"text-lg font-semibold mb-4 ".concat("dark"===l?"text-white":"text-gray-900"),children:"Invite Team Member"}),!j.canInvite&&(0,a.jsx)("div",{className:"mb-4 p-3 rounded-lg bg-[#FF4500]/10 border border-[#FF4500]/20",children:(0,a.jsxs)("p",{className:"text-sm text-[#FF4500] dark:text-[#FF4500]",children:["â ï¸ Team is full (",j.subscription.currentMembers,"/",j.subscription.teamMemberLimit,"). Remove a member to invite someone new."]})}),(0,a.jsxs)("form",{onSubmit:H,className:"flex gap-3",children:[(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)("input",{type:"email",value:E,onChange:e=>S(e.target.value),placeholder:"[email protected]",className:"w-full px-4 py-2 rounded-lg border ".concat("dark"===l?"bg-[#343536] border-[#343536] text-white placeholder-[#818384]":"bg-white border-gray-300/50 text-gray-900 placeholder-gray-400"),disabled:C||!j.canInvite})}),(0,a.jsxs)("button",{type:"submit",disabled:C||!E||!j.canInvite,className:"bg-gradient-to-r from-[#FF4500] to-[#CC3700] text-white px-6 py-2 rounded-full font-semibold hover:shadow-lg transition-all disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:[(0,a.jsx)(b,{className:"w-5 h-5"}),C?"Sending...":"Send Invite"]})]})]}),"owner"===j.role&&j.pendingInvitations&&j.pendingInvitations.length>0&&(0,a.jsxs)("div",{className:"rounded-xl border ".concat("dark"===l?"bg-[#272729] border-[#343536]":"bg-white border-[#EDEFF1]"),children:[(0,a.jsx)("div",{className:"p-6 border-b border-[#343536]",children:(0,a.jsx)("h3",{className:"text-lg font-semibold ".concat("dark"===l?"text-white":"text-gray-900"),children:"Pending Invitations"})}),(0,a.jsx)("div",{className:"divide-y divide-[#343536]",children:j.pendingInvitations.map((e,t)=>(0,a.jsxs)("div",{className:"p-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-full flex items-center justify-center ".concat("dark"===l?"bg-[#FF4500]/20":"bg-[#FFE5DB]"),children:(0,a.jsx)(y,{className:"w-6 h-6 text-[#FF4500]"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium ".concat("dark"===l?"text-white":"text-gray-900"),children:e.email}),(0,a.jsxs)("p",{className:"text-sm ".concat("dark"===l?"text-[#818384]":"text-gray-600"),children:["Expires ",new Date(e.expiresAt).toLocaleDateString()]})]})]}),(0,a.jsx)("span",{className:"px-3 py-1 rounded-full bg-[#FF4500]/10 text-[#FF4500] text-sm font-medium",children:"Pending"}),(0,a.jsx)("button",{onClick:()=>q(e.email),className:"ml-4 p-2 rounded-lg hover:bg-red-500/10 text-red-500 transition-colors",title:"Revoke invitation",children:(0,a.jsx)(v,{className:"w-5 h-5"})})]},t))})]}),"owner"===j.role&&(0,a.jsxs)("div",{className:"rounded-xl border ".concat("dark"===l?"bg-[#272729] border-[#343536]":"bg-white border-[#EDEFF1]"),children:[(0,a.jsx)("div",{className:"p-6 border-b border-[#343536]",children:(0,a.jsx)("h3",{className:"text-lg font-semibold ".concat("dark"===l?"text-white":"text-gray-900"),children:"Team Members"})}),(0,a.jsxs)("div",{className:"divide-y divide-[#343536]",children:[(0,a.jsxs)("div",{className:"p-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-full bg-gradient-to-r from-[#FF4500] to-[#CC3700] flex items-center justify-center text-white font-semibold",children:(null===(s=j.owner.name)||void 0===s?void 0:s[0])||j.owner.email[0].toUpperCase()}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium ".concat("dark"===l?"text-white":"text-gray-900"),children:j.owner.name||j.owner.email}),(0,a.jsx)("p",{className:"text-sm ".concat("dark"===l?"text-[#818384]":"text-gray-600"),children:j.owner.email})]})]}),(0,a.jsx)("span",{className:"px-3 py-1 rounded-full bg-blue-500/10 text-blue-500 text-sm font-medium",children:"Owner"})]}),null===(i=j.members)||void 0===i?void 0:i.map(e=>{var t;return(0,a.jsxs)("div",{className:"p-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-full flex items-center justify-center font-semibold ".concat("dark"===l?"bg-[#343536] text-white":"bg-gray-200 text-gray-900"),children:(null===(t=e.name)||void 0===t?void 0:t[0])||e.email[0].toUpperCase()}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium ".concat("dark"===l?"text-white":"text-gray-900"),children:e.name||e.email}),(0,a.jsx)("p",{className:"text-sm ".concat("dark"===l?"text-[#818384]":"text-gray-600"),children:e.email})]})]}),(0,a.jsx)("button",{onClick:()=>V(e.id,e.email),className:"p-2 rounded-lg hover:bg-red-500/10 text-red-500 transition-colors",title:"Remove member",children:(0,a.jsx)(v,{className:"w-5 h-5"})})]},e.id)}),(!j.members||0===j.members.length)&&(0,a.jsxs)("div",{className:"p-8 text-center",children:[(0,a.jsx)(w.Z,{mood:"waving",size:"md",fill:"dark"===l?"#94a3b8":"#9ca3af",className:"mx-auto mb-2"}),(0,a.jsx)("p",{className:"dark"===l?"text-[#818384]":"text-gray-600",children:"No team members yet. Invite someone to get started!"})]})]})]}),"member"===j.role&&(0,a.jsxs)("div",{className:"rounded-xl border p-6 ".concat("dark"===l?"bg-[#272729] border-[#343536]":"bg-white border-[#
1EDEFF1]"),children:[(0,a.jsx)("h3",{className:"text-lg font-semibold mb-4 ".concat("dark"===l?"text-white":"text-gray-900"),children:"Team Owner"}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full bg-gradient-to-r from-[#FF4500] to-[#CC3700] flex items-center justify-center text-white font-semibold text-lg",children:(null===(o=j.owner.name)||void 0===o?void 0:o[0])||j.owner.email[0].toUpperCase()}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium ".concat("dark"===l?"text-white":"text-gray-900"),children:j.owner.name||j.owner.email}),(0,a.jsx)("p",{className:"text-sm ".concat("dark"===l?"text-[#818384]":"text-gray-600"),children:j.owner.email})]})]})]})]})}var k=r(67162),N=!0;function F(){let{data:e,status:t}=(0,s.useSession)(),c=(0,i.useRouter)(),{theme:x}=(0,m.F)(),[u,h]=(0,n.useState)(!1);return((0,n.useEffect)(()=>{h(!0),"unauthenticated"===t&&c.push("/login?callbackUrl=/team")},[t,c]),(0,n.useEffect)(()=>{let{canceled:e}=c.query;if("true"===e&&u){let e="last_cancel_shown",t=sessionStorage.getItem(e);(t?Date.now()-parseInt(t):1/0)>5e3&&(sessionStorage.setItem(e,Date.now().toString()),Promise.resolve().then(r.bind(r,86501)).then(e=>{let{default:t}=e;t.error("Subscription cancelled. No charges were made.",{duration:4e3,icon:(0,d.q)("wave")})})),c.replace("/team",void 0,{shallow:!0})}},[c.query,c,u]),u&&"loading"!==t)?"unauthenticated"===t?null:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(k.Z,{title:"Team Management - TrueResume",description:"Manage your team members and collaborate on resumes",noindex:!0}),(0,a.jsxs)("div",{className:"min-h-screen pt-12 sm:pt-16 ".concat("dark"===x?"bg-[#030303]":"bg-transparent"),children:[(0,a.jsx)(o.Z,{}),(0,a.jsx)(l.Z,{title:"Team",subtitle:"Manage invites & members"}),(0,a.jsx)("div",{className:"container mx-auto px-4 py-8 pb-28 md:pb-12 safe-area-bottom",children:(0,a.jsxs)("div",{className:"px-0 sm:px-2",children:[(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsx)("h1",{className:"text-3xl sm:text-4xl font-bold mb-2 ".concat("dark"===x?"text-white":"text-gray-900"),style:{fontFamily:"Rajdhani, sans-serif"},children:"Team Management"}),(0,a.jsx)("p",{className:"text-lg ".concat("dark"===x?"text-[#818384]":"text-gray-600"),children:"Invite team members and manage your collaboration"})]}),(0,a.jsx)(j,{})]})})]})]}):(0,a.jsx)("div",{className:"flex items-center justify-center min-h-screen bg-transparent",children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3 p-8 rounded-2xl bg-white border border-[#EDEFF1] shadow-lg dark:bg-[#1A1A1B] dark:border-[#343536]",children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-[#FF4500] dark:border-[#FF4500]"}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-600 dark:text-[#818384]",children:"Loading team..."})]})})}},11429:function(e,t,r){"use strict";var a=r(67294);let n=a.forwardRef(function(e,t){let{title:r,titleId:n,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},s),r?a.createElement("title",{id:n},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))});t.Z=n},25086:function(e,t,r){"use strict";var a=r(67294);let n=a.forwardRef(function(e,t){let{title:r,titleId:n,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},s),r?a.createElement("title",{id:n},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))});t.Z=n},80172:function(e,t,r){"use strict";var a=r(67294);let n=a.forwardRef(function(e,t){let{title:r,titleId:n,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},s),r?a.createElement("title",{id:n},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09
1L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"}))});t.Z=n},7145:function(e,t,r){"use strict";var a=r(67294);let n=a.forwardRef(function(e,t){let{title:r,titleId:n,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},s),r?a.createElement("title",{id:n},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z"}))});t.Z=n},29711:function(e,t,r){"use strict";var a=r(67294);let n=a.forwardRef(function(e,t){let{title:r,titleId:n,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},s),r?a.createElement("title",{id:n},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))});t.Z=n}},function(e){e.O(0,[4968,1296,8993,5412,7117,2888,9774,179],function(){return e(e.s=12115)}),_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.