1import{a as u,j as e,u as _,d as F,m as j,e as M}from"./framer-motion-DOS-A58P.js";import{c as D,z as m,ap as R,aq as C,h as E,K as T,u as U,d as Y,H as A,S as N,a as v,L as B,B as k}from"./index-CVR3Ue8o.js";import{u as I,P as $}from"./useResolvedMediaUrls-CttkaVbH.js";import{f as z,i as V}from"./portfolioLinks-DmyAe_ox.js";import"./jspdf-IYcg0VA1.js";import"./posthog-Btqu3Q_9.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const O=D("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]),P={figma:{bg:"bg-[#1e1e1e]",text:"text-[#a259ff]",label:"Figma"},mural:{bg:"bg-[#0d2840]",text:"text-[#ff4d4d]",label:"Mural"},miro:{bg:"bg-[#050038]",text:"text-[#ffd02f]",label:"Miro"},notion:{bg:"bg-stone-200",text:"text-stone-700",label:"Notion"},loom:{bg:"bg-[#625df5]",text:"text-white",label:"Loom"},dovetail:{bg:"bg-indigo-950",text:"text-indigo-300",label:"Research"},link:{bg:"bg-stone-100",text:"text-stone-600",label:"Link"}};function S(s){return/\.(mp4|webm|mov)(\?|$)/i.test(s)}function L({mediaUrls:s,links:a,className:o}){const[t,r]=u.useState(null),[l,i]=u.useState(()=>new Set),{resolvedUrls:x}=I(s),h=u.useMemo(()=>(x.length>0?x:s).filter(n=>!l.has(n)),[x,s,l]),p=u.useMemo(()=>{const n=h.map((d,f)=>({kind:"image",url:d,index:f}));for(const d of a)n.push({kind:"link",link:d});return n},[h,a]);if(p.length===0)return null;const c=p.slice(0,4),b=p.length-c.length,g=n=>{i(d=>{if(d.has(n))return d;const f=new Set(d);return f.add(n),f})};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:m("flex gap-2 overflow-x-auto pb-0.5 md:grid md:w-[8.5rem] md:grid-cols-2 md:overflow-visible md:pb-0",o),children:c.map((n,d)=>{const f=b>0&&d===c.length-1;if(n.kind==="image")return e.jsxs("button",{type:"button",onClick:()=>r(n.index),className:"relative h-[4.5rem] w-[4.5rem] shrink-0 overflow-hidden rounded-xl border border-stone-200/80 bg-stone-100 shadow-sm transition hover:border-brand/40 hover:shadow md:h-[4rem] md:w-full",children:[S(n.url)?e.jsxs(e.Fragment,{children:[e.jsx("video",{src:n.url,className:"h-full w-full object-cover",muted:!0,preload:"metadata"}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/25",children:e.jsx($,{className:"h-5 w-5 text-white",fill:"white"})})]}):e.jsx("img",{src:n.url,alt:"",className:"h-full w-full object-cover",loading:"lazy",onError:()=>g(n.url)}),f&&e.jsxs("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 text-sm font-semibold text-white",children:["+",b]})]},n.url);const y=P[n.link.platform]??P.link,w=n.link.platform!=="notion"&&n.link.platform!=="link";return e.jsxs("a",{href:n.link.url,target:"_blank",rel:"noopener noreferrer",className:m("relative flex h-[4.5rem] w-[4.5rem] shrink-0 flex-col justify-between rounded-xl border border-stone-200/80 p-2 shadow-sm transition hover:border-brand/40 hover:shadow md:h-[4rem] md:w-full",y.bg),children:[e.jsx("span",{className:m("text-[9px] font-bold uppercase tracking-wide",y.text),children:y.label}),e.jsx("span",{className:m("line-clamp-2 text-[10px] font-medium leading-tight",w?"text-white/90":"text-stone-700"),children:n.link.label}),e.jsx(O,{className:m("absolute right-1.5 top-1.5 h-3 w-3",w?"text-white/60":"text-stone-400")}),f&&e.jsxs("span",{className:"absolute inset-0 flex items-center justify-center rounded-xl bg-black/50 text-sm font-semibold text-white",children:["+",b]})]},n.link.url)})}),e.jsx(W,{images:h,selectedIndex:t,onClose:()=>r(null),onSelect:r})]})}function W({images:s,selectedIndex:a,onClose:o,onSelect:t}){return s.length===0?null:e.jsx(R,{open:a!==null,onOpenChange:()=>o(),children:e.jsxs(C,{className:"max-w-4xl w-full border-none bg-black/95 p-0",children:[e.jsx("div",{className:"flex min-h-[50vh] items-center justify-center p-4",children:a!==null&&(S(s[a])?e.jsx("video",{src:s[a],className:"max-h-[80vh] max-w-full rounded-lg",controls:!0,autoPlay:!0}):e.jsx("img",{src:s[a],alt:"",className:"max-h-[80vh] max-w-full rounded-lg object-contain"}))}),s.length>1&&a!==null&&e.jsx("div",{className:"flex justify-center gap-2 border-t border-white/10 px-4 py-3",children:s.map((r,l)=>e.jsx("button",{type:"button",onClick:()=>t(l),className:m("h-12 w-12 overflow-hidden rounded-lg border-2 transition",l===a?"border-brand":"border-transparent opacity-60 hover:opacity-100"),children:e.jsx("img",{src:r,alt:"",className:"h-full w-full object-cover"})},r))})]})})}function X({win:s,featured:a,timeline:o}){const[t,r]=u.useState(!1),l=a?360:280,i=s.body.length>l&&!t?`${s.body.slice(0,l).trim()}â¦`:s.body,h=[s.date?new Date(s.date).toLocaleDateString(void 0,{month:"short",year:"numeric"}
6):null,s.project_name].filter(Boolean).join(" · "),p=s.links??[],c=s.media_urls.length>0||p.length>0,b=e.jsxs(e.Fragment,{children:[h&&e.jsx("p",{className:"text-xs font-medium uppercase tracking-widest text-brand",children:h}),e.jsx("h2",{className:m("mt-2 font-display font-semibold tracking-tight text-navy",a?"text-xl md:text-2xl":"text-lg md:text-xl"),children:s.title}),s.body&&e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{className:"whitespace-pre-wrap text-sm leading-relaxed text-stone-600",children:i}),s.body.length>l&&e.jsx("button",{type:"button",onClick:()=>r(g=>!g),className:"mt-2 text-sm font-medium text-brand hover:underline",children:t?"Show less":"Read more"})]}),s.tags.length>0&&e.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:s.tags.map(g=>e.jsx("span",{className:"rounded-full border border-stone-200 bg-stone-50 px-2 py-0.5 text-[11px] text-stone-600",children:g},g))})]});return o?e.jsx("article",{className:m("rounded-2xl border border-stone-200/80 bg-white p-5 shadow-sm transition-shadow hover:shadow-md md:p-6",a&&"ring-1 ring-brand/15"),children:e.jsxs("div",{className:m("flex flex-col gap-5",c&&"md:flex-row md:items-start md:justify-between md:gap-8"),children:[e.jsx("div",{className:"min-w-0 flex-1",children:b}),c&&e.jsx(L,{mediaUrls:s.media_urls,links:p,className:"md:pt-1"})]})}):e.jsx("article",{className:m("overflow-hidden rounded-2xl border border-stone-200/80 bg-white",a&&"ring-1 ring-stone-300/60"),children:e.jsxs("div",{className:m("p-6 md:p-8",c&&"md:flex md:items-start md:gap-8"),children:[e.jsx("div",{className:"min-w-0 flex-1",children:b}),c&&e.jsx(L,{mediaUrls:s.media_urls,links:p,className:"mt-5 md:mt-0"})]})})}function H({win:s,index:a,isLast:o,showYear:t}){const r=u.useRef(null),l=M(r,{once:!0,margin:"-80px"}),i=s.date?new Date(s.date).getFullYear():null;return e.jsxs(j.li,{ref:r,className:m("relative list-none",!o&&"pb-14 md:pb-20"),children:[t&&i&&e.jsx(j.div,{initial:{opacity:0,y:8},animate:l?{opacity:1,y:0}:{},transition:{duration:.4},className:"absolute -left-2 top-0 z-20 md:-left-4",children:e.jsx("span",{className:"rounded-full bg-navy px-2.5 py-0.5 text-[10px] font-bold uppercase tracking-widest text-white shadow-sm",children:i})}),e.jsxs(j.div,{initial:{scale:0,opacity:0},animate:l?{scale:1,opacity:1}:{},transition:{type:"spring",stiffness:420,damping:22,delay:.05},className:"absolute left-0 top-1.5 z-10 flex h-[18px] w-[18px] items-center justify-center md:top-2",children:[e.jsx("span",{className:"absolute h-full w-full rounded-full bg-brand/20"}),e.jsx("span",{className:"relative h-2.5 w-2.5 rounded-full bg-brand ring-4 ring-white"})]}),e.jsx(j.div,{initial:{scaleX:0,opacity:0},animate:l?{scaleX:1,opacity:1}:{},transition:{duration:.45,delay:.12,ease:[.22,1,.36,1]},style:{originX:0},className:"absolute left-[9px] top-[18px] hidden h-px w-8 bg-brand/30 md:block md:top-[22px]"}),e.jsx(j.div,{initial:{opacity:0,x:48,y:12},animate:l?{opacity:1,x:0,y:0}:{},transition:{duration:.65,delay:.08,ease:[.22,1,.36,1]},className:"ml-8 md:ml-14",children:e.jsx(X,{win:s,index:a,featured:a===0,timeline:!0})})]})}function q({wins:s}){const a=u.useRef(null),{scrollYProgress:o}=_({target:a,offset:["start 0.9","end 0.2"]}),t=F(o,{stiffness:90,damping:24,restDelta:.001});let r=null;return e.jsxs("div",{ref:a,className:"relative",children:[e.jsx("div",{"aria-hidden":!0,className:"absolute bottom-0 left-[8px] top-0 w-0.5 bg-stone-200 md:left-[8px]"}),e.jsx(j.div,{"aria-hidden":!0,className:"absolute bottom-0 left-[8px] top-0 w-0.5 origin-top bg-brand",style:{scaleY:t}}),e.jsx("ol",{className:"relative",children:s.map((l,i)=>{const x=l.date?new Date(l.date).getFullYear():null,h=x!=null&&x!==r;return h&&x!=null&&(r=x),e.jsx(H,{win:l,index:i,isLast:i===s.length-1,showYear:h},l.id)})}),e.jsxs(j.div,{initial:{opacity:0}
6,whileInView:{opacity:1},viewport:{once:!0},transition:{delay:.2},className:"ml-8 flex items-center gap-3 pt-6 text-stone-400 md:ml-14",children:[e.jsx("div",{className:"h-px flex-1 bg-stone-200"}),e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest",children:"End of timeline"})]})]})}function te(){var d,f;const{slug:s}=E(),[a]=T(),o=a.get("preview")==="1",[t,r]=u.useState(null),[l,i]=u.useState(!0),[x,h]=u.useState(!1);u.useEffect(()=>{if(!s)return;let y=!1;return i(!0),z(s,{preview:o}).then(w=>{y||(w?r(w):h(!0),i(!1))}),()=>{y=!0}},[s,o]),U(!l&&!!t&&!o);const p=s?`${N}/p/${s}`:N,c=(t==null?void 0:t.og.title)??"Portfolio | AccomplishMint",b=(t==null?void 0:t.og.description)??"Professional accomplishment portfolio on AccomplishMint",g=(t==null?void 0:t.og.image)??Y,n=(d=t==null?void 0:t.date_span)!=null&&d.earliest&&((f=t==null?void 0:t.date_span)!=null&&f.latest)?`${new Date(t.date_span.earliest).getFullYear()}â${new Date(t.date_span.latest).getFullYear()}`:null;return e.jsxs("div",{className:"min-h-screen bg-stone-50",children:[e.jsxs(A,{children:[e.jsx("title",{children:c}),e.jsx("meta",{name:"description",content:b}),e.jsx("link",{rel:"canonical",href:p}),e.jsx("meta",{property:"og:type",content:"profile"}),e.jsx("meta",{property:"og:title",content:c}),e.jsx("meta",{property:"og:description",content:b}),e.jsx("meta",{property:"og:image",content:g}),e.jsx("meta",{property:"og:url",content:p}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:c}),e.jsx("meta",{name:"twitter:description",content:b}),e.jsx("meta",{name:"twitter:image",content:g})]}),((t==null?void 0:t.is_preview)||o&&t)&&e.jsx("div",{className:"border-b border-amber-200 bg-amber-50 px-4 py-2 text-center text-sm text-amber-900",children:"Preview â not visible to others until you publish."}),e.jsx("header",{className:"border-b border-stone-200/80 bg-white/80 backdrop-blur-sm",children:e.jsxs("div",{className:"mx-auto flex max-w-3xl items-center justify-between px-6 py-4",children:[e.jsx("span",{className:"font-display text-sm font-semibold text-navy",children:(t==null?void 0:t.full_name)??"Portfolio"}),e.jsx(v,{to:"/",className:"text-xs text-stone-400 transition-colors hover:text-brand",children:"Built with AccomplishMint"})]})}),e.jsx("main",{className:"mx-auto max-w-5xl px-6 py-12 md:py-16",children:l?e.jsxs("div",{className:"flex items-center justify-center py-24 text-stone-500",children:[e.jsx(B,{className:"mr-2 h-6 w-6 animate-spin"}),"Loading portfolioâ¦"]}):x||!t?e.jsxs("div",{className:"py-24 text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-bold text-navy",children:"Portfolio not found"}),e.jsx("p",{className:"mt-2 text-stone-500",children:"This page isn't published or doesn't exist."}),e.jsx(k,{asChild:!0,className:"mt-6",children:e.jsx(v,{to:"/",children:"Go home"})})]}):e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"mb-14 md:mb-16",children:e.jsxs("div",{className:"flex items-start gap-5",children:[e.jsx("div",{className:"flex h-16 w-16 shrink-0 items-center justify-center rounded-full bg-navy text-lg font-semibold text-white",children:V(t.full_name)}),e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-3xl font-bold tracking-tight text-navy md:text-4xl",children:t.full_name}),e.jsx("p",{className:"mt-2 text-lg text-stone-600",children:t.headline}),t.company&&e.jsx("p",{className:"mt-1 text-sm text-stone-500",children:t.company}),t.bio&&e.jsx("p",{className:"mt-4 max-w-xl text-sm leading-relaxed text-stone-600 md:text-base",children:t.bio}),e.jsxs("div",{className:"mt-4 flex flex-wrap gap-3 text-xs text-stone-400",children:[e.jsxs("span",{children:[t.win_count," highlighted wins"]}),n&&e.jsx("span",{children:n})]})]})]})}),e.jsxs("section",{children:[e.jsx("p",{className:"mb-8 text-xs font-medium uppercase tracking-widest text-brand",children:"Selected work"}),e.jsx(q,{wins:t.wins})]}),e.jsxs("footer",{className:"mt-16 border-t border-stone-200 pt-10 text-center",children:[e.jsx("p",{className:"text-sm text-stone-500",children:"Document wins as you work, share them when it matters."}),e.jsx(k,{asChild:!0,className:"mt-4 bg-brand text-brand-foreground hover:bg-brand/90",children:e.jsx(v,{to:"/auth",children:"Start your portfolio"})})]})]})})]})}export{te as default};
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.