PageSourceSearch

https://trueresume.ai/_next/static/chunks/pages/jobs/import-0fa3f1eb5bb539f5.js

js trueresume.ai collected 2026-10-02 01:13:23 UTC 7,455 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[363],{40218:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/jobs/import",function(){return i(54664)}])},43765:function(e,t,i){"use strict";i.d(t,{Z:function(){return r}});let r=(0,i(63759).Z)("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},60641:function(e,t,i){"use strict";i.d(t,{Z:function(){return r}});let r=(0,i(63759).Z)("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},79613:function(e,t,i){"use strict";i.d(t,{Z:function(){return r}});let r=(0,i(63759).Z)("Wand2",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72Z",key:"1bcowg"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]])},54664:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return h}});var r=i(85893),o=i(67294),n=i(11163),a=i(33299),l=i(9008),s=i.n(l),d=i(86501),c=i(60641),p=i(43765),u=i(79613),f=i(71707);function h(){let e=(0,n.useRouter)(),{data:t,status:i}=(0,a.useSession)(),[l,h]=(0,o.useState)(!0),[y,g]=(0,o.useState)(null),[m,x]=(0,o.useState)(null),[b,j]=(0,o.useState)(!1),k="string"==typeof e.query.url?e.query.url:"",w="string"==typeof e.query.title?e.query.title:"",v="bookmarklet"===e.query.from,[S,T]=(0,o.useState)(null);(0,o.useEffect)(()=>{if(!v)return;let e=e=>{if(e.origin!==window.location.origin)return;let t=e.data;t&&"TR_BOOKMARKLET_PAYLOAD"===t.type&&t.payload&&T(t.payload)};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[v]),(0,o.useEffect)(()=>{if("loading"!==i){if("unauthenticated"===i){(0,a.signIn)(void 0,{callbackUrl:e.asPath});return}if(v){if(S){let e={title:S.title||w||"Imported Job",company:S.company||"",description:S.jd||S.description||"",applyUrl:S.url||k,source:"bookmarklet",confidence:S.jd&&S.jd.length>400?.9:.55};!e.description||e.description.length<80?x("Could not read the job description from that page. Try opening the JD detail view, then click the bookmarklet again."):g(e),h(!1);return}let e=setTimeout(()=>{!S&&k?t():S||(x("No data received from the bookmarklet. Reload the job page and try again."),h(!1))},3e3);return()=>clearTimeout(e)}if(!k){x("No URL provided."),h(!1);return}t()}async function t(){try{let e=await fetch("/api/auto-apply/scrape-page",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:k})}),t=await e.json();if(!e.ok)throw Error((null==t?void 0:t.error)||"Scrape failed");if((null==t?void 0:t.job)&&!(t.job.confidence<.4)&&t.job.description){let e={...t.job,title:t.job.title||w||"Imported Job",applyUrl:k};g(e)}else x("We could not confidently extract a job posting from that page. Open Trueresume and paste the JD manually.")}catch(e){x((null==e?void 0:e.message)||"Unexpected error")}finally{h(!1)}}},[i,k,w,e.asPath,v,S]);let E=async()=>{if(y){j(!0);try{let e=await fetch("/api/ai/generate-resume-from-jd",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({jobDescription:y.description,forceNewGeneration:!1})}),t=await e.json();if(!e.ok||!(null==t?void 0:t.success)){if(402===e.status)throw Error("Resume limit reached — upgrade or wait for reset.");throw Error((null==t?void 0:t.error)||(null==t?void 0:t.userMessage)||"Tailoring failed")}try{sessionStorage.setItem("tr_autoapply_handoff",JSON.stringify({jobDescription:y.description,resume:t.resume,matchScore:t.matchScore,generatedAt:new Date().toISOString()}))}catch(e){}window.location.href="/create-resume"}catch(e){d.default.error((null==e?void 0:e.message)||"Tailoring failed",{duration:6e3}),j(!1)}}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s(),{children:(0,r.jsx)("title",{children:"Import Job \xb7 Trueresume"})}),(0,r.jsx)("div",{style:{minHeight:"100vh",backgroundColor:"#F9FAFB",padding:"24px 16px",fontFamily:"system-ui, -apple-system, Segoe UI, Roboto, sans-serif"},children:(0,r.jsxs)("div",{style:{maxWidth:520,margin:"0 auto",backgroundColor:"#fff",border:"1px solid #E5E7EB",borderRadius:12,padding:20,boxSh
1adow:"0 10px 25px rgba(0,0,0,0.06)"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:[(0,r.jsx)("div",{style:{width:32,height:32,borderRadius:16,background:"linear-gradient(135deg,#FF4500,#CC3700)",display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:900},children:"TR"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{style:{fontSize:14,fontWeight:800,color:"#111827"},children:"Trueresume Quick Apply"}),(0,r.jsxs)("div",{style:{fontSize:11,color:"#6B7280"},children:["Importing job from: ",k?new URL(k).hostname:"—"]})]})]}),l&&(0,r.jsxs)("div",{style:{padding:24,textAlign:"center",color:"#6B7280"},children:[(0,r.jsx)(c.Z,{className:"w-5 h-5 animate-spin",style:{margin:"0 auto 8px"}}),(0,r.jsx)("div",{style:{fontSize:12},children:"Scraping job posting…"})]}),!l&&m&&(0,r.jsxs)("div",{style:{padding:16,borderRadius:8,backgroundColor:"#FEF2F2",border:"1px solid #FECACA",color:"#991B1B",display:"flex",gap:8,alignItems:"flex-start"},children:[(0,r.jsx)(p.Z,{className:"w-4 h-4",style:{marginTop:2,flexShrink:0}}),(0,r.jsx)("div",{style:{fontSize:13},children:m})]}),!l&&y&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{style:{marginTop:12,padding:12,backgroundColor:"#F9FAFB",border:"1px solid #E5E7EB",borderRadius:8},children:[(0,r.jsx)("div",{style:{fontSize:14,fontWeight:700,color:"#111827"},children:y.title}),y.company&&(0,r.jsxs)("div",{style:{fontSize:12,color:"#374151",marginTop:2},children:[y.company,y.location?" \xb7 ".concat(y.location):""]}),(0,r.jsxs)("div",{style:{fontSize:11,color:"#6B7280",marginTop:6,maxHeight:120,overflow:"hidden",display:"-webkit-box",WebkitLineClamp:6,WebkitBoxOrient:"vertical"},children:[y.description.slice(0,500),y.description.length>500?"…":""]}),(0,r.jsxs)("div",{style:{fontSize:10,color:"#9CA3AF",marginTop:6},children:["Source: ",y.source," \xb7 confidence ",Math.round(100*y.confidence),"%"]})]}),(0,r.jsxs)("div",{style:{marginTop:14,display:"flex",gap:8},children:[(0,r.jsxs)("button",{onClick:E,disabled:b,style:{flex:1,padding:"10px 14px",borderRadius:8,border:"none",cursor:b?"wait":"pointer",backgroundColor:"#FF4500",color:"#fff",fontWeight:700,fontSize:13,display:"flex",alignItems:"center",justifyContent:"center",gap:6},children:[b?(0,r.jsx)(c.Z,{className:"w-4 h-4 animate-spin"}):(0,r.jsx)(u.Z,{className:"w-4 h-4"}),b?"Tailoring…":"Tailor Resume"]}),y.applyUrl&&(0,r.jsxs)("a",{href:y.applyUrl,target:"_blank",rel:"noreferrer",style:{padding:"10px 12px",borderRadius:8,border:"1px solid #E5E7EB",color:"#111827",fontWeight:600,fontSize:12,textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:[(0,r.jsx)(f.Z,{className:"w-4 h-4"})," Apply Page"]})]}),(0,r.jsx)("p",{style:{fontSize:11,color:"#6B7280",marginTop:10},children:"After tailoring, we'll drop you straight into the resume editor — no wizard, no restart."})]})]})})]})}h.noLayout=!0}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=40218)}),_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.