import{a as e,n as t,t as n}from"./jsx-runtime-CutOxEx1.js";import{r,u as i}from"./chunk-6CSD65Y2-BjfinoX-.js";import{r as a}from"./norm-f7iXVy-b.js";import{r as o}from"./cloudWorkspaceShares-DqtAxHNa.js";var s=e(t(),1),c=n(),l={minHeight:`100vh`,overflow:`auto`,background:`radial-gradient(circle at 12% 0%, rgba(59,130,246,0.14), transparent 28%), radial-gradient(circle at 88% 6%, rgba(99,102,241,0.12), transparent 30%), linear-gradient(180deg, #f8fbff 0%, #eef4fb 48%, #f8fafc 100%)`},u={border:`1px solid rgba(148,163,184,0.22)`,borderRadius:22,padding:18,background:`rgba(255,255,255,0.9)`,boxShadow:`0 18px 42px rgba(15,23,42,0.08)`},d={display:`inline-flex`,alignItems:`center`,padding:`0 12px`,height:28,borderRadius:999,border:`1px solid rgba(59,130,246,0.18)`,background:`rgba(239,246,255,0.92)`,color:`#1d4ed8`,fontSize:12,fontWeight:800},f=`
<style id="hireedge-share-resume-polish">
  :root { color-scheme: light; }
  * { box-sizing: border-box; }
  html { background: #f3f6fb; }
  body {
    margin: 0 !important;
    min-height: 100vh;
    background: linear-gradient(180deg, #f7faff 0%, #edf3fb 100%) !important;
    color: #172033;
    font-family: var(--ds-font-sans) !important;
    -webkit-font-smoothing: antialiased;
    line-height: 1.72;
  }
  body > *:first-child:not(style):not(script) {
    margin-top: 0 !important;
  }
  .hireedge-resume-paper {
    max-width: min(920px, calc(100vw - 36px)) !important;
    width: auto !important;
    margin: 28px auto !important;
    background: #ffffff !important;
    border: 1px solid rgba(148,163,184,0.28) !important;
    border-radius: 22px !important;
    box-shadow: 0 24px 70px rgba(15,23,42,0.12) !important;
    padding: 42px 48px !important;
  }
  h1 {
    margin: 0 0 10px !important;
    color: #0f172a !important;
    font-size: 30px !important;
    line-height: 1.18 !important;
    letter-spacing: -0.03em !important;
    font-weight: 900 !important;
  }
  h2 {
    position: relative;
    margin: 30px 0 14px !important;
    padding: 0 0 9px 14px !important;
    border-bottom: 1px solid #dbe4f0 !important;
    color: #0f172a !important;
    font-size: 17px !important;
    line-height: 1.35 !important;
    letter-spacing: 0.02em !important;
    font-weight: 900 !important;
  }
  h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 4px;
    height: 18px;
    border-radius: 99px;
    background: linear-gradient(180deg, #2563eb, #60a5fa);
  }
  h3 {
    margin: 18px 0 8px !important;
    color: #1e293b !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
    font-weight: 850 !important;
  }
  p {
    margin: 7px 0 !important;
    color: #334155 !important;
    font-size: 13.5px !important;
  }
  ul, ol {
    margin: 8px 0 12px 0 !important;
    padding-left: 0 !important;
    list-style: none !important;
  }
  li {
    position: relative;
    margin: 7px 0 !important;
    padding-left: 18px !important;
    color: #334155 !important;
    font-size: 13.5px !important;
    line-height: 1.72 !important;
  }
  li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.78em;
    width: 5px;
    height: 5px;
    border-radius: 99px;
    background: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.09);
  }
  strong, b { color: #0f172a !important; font-weight: 850 !important; }
  hr { border: 0 !important; border-top: 1px solid #dbe4f0 !important; margin: 18px 0 !important; }
  table { width: 100% !important; border-collapse: collapse !important; margin: 10px 0 !important; }
  td, th { border-bottom: 1px solid #e2e8f0 !important; padding: 8px 6px !important; color: #334155 !important; font-size: 13px !important; text-align: left !important; }
  a { color: #1d4ed8 !important; text-decoration: none !important; }
  @media (max-width: 720px) {
    .hireedge-resume-paper {
      max-width: calc(100vw - 20px) !important;
      margin: 10px auto !important;
      border-radius: 18px !important;
      padding: 28px 22px !important;
    }
    h1 { font-size: 25px !important; }
    h2 { font-size: 16px !important; margin-top: 24px !important; }
  }
  @media print {
    html, body { background: #fff !important; }
    .hireedge-resume-paper {
      max-width: none !important;
      width: auto !important;
      margin: 0 !important;
      border: 0 !important;
      box-shadow: none !important;
      border-radius: 0 !important;
      padding: 0 !important;
    }
  }
</style>
`,p=e=>`<main class="hireedge-resume-paper">${e}</main>`,m=e=>/class=["'][^"']*hireedge-resume-paper/i.test(e)?e:e.replace(/<body([^>]*)>([\s\S]*?)<\/body>/i,(e,t,n)=>`<body${t}>${p(String(n||``).trim())}</body>`),h=e=>{let t=String(e||``).trim();return t&&(t.includes(`hireedge-share-resume-polish`)?m(t):/<\/head>/i.test(t)?m(t.replace(/<\/head>/i,`${f}</head>`)):/<html[\s>]/i.test(t)?m(t.replace(/<html([^>]*)>/i,`<html$1><head>${f}</head>`)):`<!DOCTYPE html><html><head><meta charset="UTF-8">${f}</head><body>${p(t)}</body></html>`)};function g(){let e=i(),[t,n]=(0,s.useState)(!0),[f,p]=(0,s.useState)(``),[m,g]=(0,s.useState)(null),[_,v]=(0,s.useState)(()=>{try{return Math.max(0,Number(window.innerWidth||0))}catch{return 0}}),[y,b]=(0,s.useState)(980),x=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=()=>{try{v(Math.max(0,Number(window.innerWidth||0)))}catch{}};e();try{return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)}catch{return}},[]),(0,s.useEffect)(()=>{let t=!0;return(async()=>{try{n(!0),p(``);let r=await o(a(e.id));if(!t)return;if(!r.ok||!r.share||a(r.share.kind)!==`resume_web_page`){p(`网页简历不存在或已失效。`),g(null);return}g(r.share)}catch(e){if(!t)return;p(a(e?.message)||`加载失败`),g(null)}finally{t&&n(!1)}})(),()=>{t=!1}},[e.id]);let S=m?.payload&&typeof m.payload==`object`?m.payload:{},C=a(S?.html),w=(0,s.useMemo)(()=>h(C),[C]),T=a(S?.title)||`匿名候选人简历`,E=_>0&&_<=860,D=(0,s.useMemo)(()=>{let e=Number(S?.createdAt||0)||Date.parse(a(m?.created_at));return Number.isFinite(e)&&e>0?new Date(e).toLocaleString():``},[S?.createdAt,m?.created_at]),O=()=>{try{let e=x.current,t=e?.contentDocument||e?.contentWindow?.document;if(!t)return;let n=t.documentElement,r=t.body,i=Math.max(n?.scrollHeight||0,r?.scrollHeight||0,n?.offsetHeight||0,r?.offsetHeight||0,E?680:920);Number.isFinite(i)&&i>0&&b(i+8)}catch{}};return(0,s.useEffect)(()=>{let e=setTimeout(()=>O(),40);return()=>clearTimeout(e)},[w,E]),(0,c.jsx)(`div`,{className:`w-full`,style:l,children:(0,c.jsxs)(`div`,{style:{maxWidth:1220,margin:`0 auto`,padding:E?`16px 12px 28px`:`26px 18px 46px`},children:[(0,c.jsxs)(`div`,{style:{...u,position:`relative`,overflow:`hidden`,padding:0},children:[(0,c.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(135deg, rgba(37,99,235,0.10) 0%, rgba(255,255,255,0) 48%, rgba(14,165,233,0.10) 100%)`,pointerEvents:`none`}}),(0,c.jsxs)(`div`,{style:{position:`relative`,padding:E?`18px 18px 20px`:`24px 26px`,display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:18,flexWrap:`wrap`},children:[(0,c.jsxs)(`div`,{style:{minWidth:E?0:260,flex:`1 1 520px`},children:[(0,c.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`,marginBottom:12},children:[(0,c.jsx)(`span`,{style:d,children:`网页简历`}),(0,c.jsx)(`span`,{style:{...d,color:`#475569`,borderColor:`rgba(148,163,184,0.24)`,background:`rgba(248,250,252,0.92)`},children:`脱敏公开页`})]}),(0,c.jsx)(`h1`,{style:{margin:0,fontSize:E?24:28,lineHeight:1.18,letterSpacing:`-0.03em`,fontWeight:900,color:`#0f172a`},children:T}),D?(0,c.jsx)(`div`,{style:{marginTop:10,fontSize:13,color:`#64748b`},children:`分享时间：${D}`}):null]}),(0,c.jsx)(r,{to:`/`,className:`btn-secondary`,style:{background:`#fff`,borderColor:`rgba(148,163,184,0.28)`,boxShadow:`0 8px 18px rgba(15,23,42,0.06)`},children:`返回首页`})]})]}),t?(0,c.jsx)(`div`,{style:{...u,marginTop:16},children:`正在加载网页简历…`}):null,!t&&f?(0,c.jsx)(`div`,{style:{...u,marginTop:16,color:`#b91c1c`},children:f}):null,!t&&!f&&w?(0,c.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:E?`minmax(0, 1fr)`:`minmax(220px, 280px) minmax(0, 1fr)`,gap:18,marginTop:18,alignItems:`start`},children:[E?null:(0,c.jsxs)(`aside`,{style:{...u,position:`sticky`,top:18},children:[(0,c.jsx)(`div`,{style:{fontSize:14,fontWeight:900,color:`#0f172a`},children:`分享说明`}),(0,c.jsx)(`div`,{style:{marginTop:10,fontSize:13,color:`#475569`,lineHeight:1.85},children:`本页用于向 HR 或外部访客展示脱敏后的网页简历内容。页面默认禁止搜索引擎收录，公开内容仍建议由用户自行确认后再分享。`}),(0,c.jsx)(`div`,{style:{height:1,background:`linear-gradient(90deg, rgba(37,99,235,0.22), rgba(148,163,184,0.16))`,margin:`16px 0`}}),(0,c.jsxs)(`div`,{style:{display:`grid`,gap:10},children:[(0,c.jsxs)(`div`,{style:{borderRadius:14,background:`#f8fafc`,border:`1px solid rgba(148,163,184,0.20)`,padding:12},children:[(0,c.jsx)(`div`,{style:{fontSize:12,fontWeight:800,color:`#334155`},children:`匿名展示`}),(0,c.jsx)(`div`,{style:{marginTop:5,fontSize:12,color:`#64748b`,lineHeight:1.6},children:`默认隐藏常见敏感信息，更适合外发预览。`})]}),(0,c.jsxs)(`div`,{style:{borderRadius:14,background:`#eff6ff`,border:`1px solid rgba(59,130,246,0.18)`,padding:12},children:[(0,c.jsx)(`div`,{style:{fontSize:12,fontWeight:800,color:`#1d4ed8`},children:`专业版式`}),(0,c.jsx)(`div`,{style:{marginTop:5,fontSize:12,color:`#475569`,lineHeight:1.6},children:`已使用更清晰的层级、间距与阅读背景。`})]})]})]}),(0,c.jsx)(`main`,{style:{...u,order:+!!E,padding:E?8:12,borderRadius:E?20:24,background:`rgba(255,255,255,0.72)`},children:(0,c.jsx)(`div`,{style:{borderRadius:18,overflow:`hidden`,background:`#f3f6fb`,border:`1px solid rgba(148,163,184,0.24)`},children:(0,c.jsx)(`iframe`,{ref:x,title:`resume_web_share_preview`,sandbox:`allow-same-origin`,srcDoc:w,onLoad:()=>{O(),setTimeout(()=>O(),120)},style:{width:`100%`,height:y,minHeight:E?680:980,border:0,background:`#f3f6fb`,display:`block`}})})}),E?(0,c.jsxs)(`aside`,{style:{...u,order:2},children:[(0,c.jsx)(`div`,{style:{fontSize:14,fontWeight:900,color:`#0f172a`},children:`分享说明`}),(0,c.jsx)(`div`,{style:{marginTop:10,fontSize:13,color:`#475569`,lineHeight:1.85},children:`本页用于向 HR 或外部访客展示脱敏后的网页简历内容。页面默认禁止搜索引擎收录，公开内容仍建议由用户自行确认后再分享。`}),(0,c.jsx)(`div`,{style:{height:1,background:`linear-gradient(90deg, rgba(37,99,235,0.22), rgba(148,163,184,0.16))`,margin:`16px 0`}}),(0,c.jsxs)(`div`,{style:{display:`grid`,gap:10},children:[(0,c.jsxs)(`div`,{style:{borderRadius:14,background:`#f8fafc`,border:`1px solid rgba(148,163,184,0.20)`,padding:12},children:[(0,c.jsx)(`div`,{style:{fontSize:12,fontWeight:800,color:`#334155`},children:`匿名展示`}),(0,c.jsx)(`div`,{style:{marginTop:5,fontSize:12,color:`#64748b`,lineHeight:1.6},children:`默认隐藏常见敏感信息，更适合外发预览。`})]}),(0,c.jsxs)(`div`,{style:{borderRadius:14,background:`#eff6ff`,border:`1px solid rgba(59,130,246,0.18)`,padding:12},children:[(0,c.jsx)(`div`,{style:{fontSize:12,fontWeight:800,color:`#1d4ed8`},children:`专业版式`}),(0,c.jsx)(`div`,{style:{marginTop:5,fontSize:12,color:`#475569`,lineHeight:1.6},children:`已使用更清晰的层级、间距与阅读背景。`})]})]})]}):null]}):null]})})}export{g as default};