https://matchupwise.com/_next/static/chunks/app/(en)/auth/linkedin/callback/page-1a4c96fe8e9649b0.js
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[34],{70821:function(e,t,r){Promise.resolve().then(r.bind(r,37040))},79205:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(2265);let i=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&r.indexOf(e)===t).join(" ")};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let u=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:i=24,strokeWidth:u=2,absoluteStrokeWidth:l,className:c="",children:s,iconNode:d,...m}=e;return(0,n.createElement)("svg",{ref:t,...o,width:i,height:i,stroke:r,strokeWidth:l?24*Number(u)/Number(i):u,className:a("lucide",c),...m},[...d.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(s)?s:[s]])}),l=(e,t)=>{let r=(0,n.forwardRef)((r,o)=>{let{className:l,...c}=r;return(0,n.createElement)(u,{ref:o,iconNode:t,className:a("lucide-".concat(i(e)),l),...c})});return r.displayName="".concat(e),r}},51817:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},99376:function(e,t,r){"use strict";var n=r(35475);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},37040:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return g}});var n=r(57437),i=r(2265),a=r(99376),o=r(69064),u=r(51817),l=r(71837),c=r(94371),s=r(38225),d=r(68667);let m=new Set;function f(){let e=(0,a.useRouter)(),t=(0,a.useSearchParams)();return(0,i.useEffect)(()=>{let r=t.get("code"),n=t.get("state");if(t.get("error")||!r||!n){o.ZP.error("LinkedIn login was cancelled or failed."),e.replace("/login");return}m.has(r)||(m.add(r),l.h.post("/auth/linkedin/callback",{code:r,state:n}).then(t=>{if(t.data.native_handoff){window.location.replace("/auth/native/done?ott=".concat(encodeURIComponent(t.data.native_handoff)));return}let r=t.data.access_token;r&&localStorage.setItem("mw_oauth_token",r),t.data.is_new_user&&((0,s.C8)(),(0,c.Rp)((0,s.TJ)(),{method:"linkedin"})),e.replace("/dashboard")}).catch(t=>{o.ZP.error((0,d.t)(t,"LinkedIn login failed")),e.replace("/login")}))},[e,t]),(0,n.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-slate-50",children:(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4 text-slate-500",children:[(0,n.jsx)(u.Z,{size:32,className:"animate-spin text-primary"}),(0,n.jsx)("p",{className:"text-sm font-medium",children:"Completing LinkedIn sign-in..."}),(0,n.jsx)("p",{className:"text-xs text-slate-400",children:"You will be redirected automatically."})]})})}function g(){return(0,n.jsx)(i.Suspense,{fallback:(0,n.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-slate-50",children:(0,n.jsx)(u.Z,{size:32,className:"animate-spin text-primary"})}),children:(0,n.jsx)(f,{})})}},94371:function(e,t,r){"use strict";r.d(t,{D$:function(){return l},Jm:function(){return d},Kq:function(){return m},Rp:function(){return c},_s:function(){return f},lG:function(){return s},yV:function(){return u}});var n=r(46214),i=r(38225),a=r(13512);function o(e){if(n.ZP.__loaded)try{e()}catch(e){}}function u(e){o(()=>{let t=(0,i.TJ)();n.ZP.identify(e.id,{email:e.email,plan:e.plan,acquisition_channel:(0,i.Iw)(t),utm_source:null==t?void 0:t.utm_source,utm_campaign:null==t?void 0:t.utm_campaign,landing_page:null==t?void 0:t.landing_page})})}function l(){o(()=>n.ZP.reset())}function c(e,t){o(()=>n.ZP.capture("signup_completed",{acquisition_channel:(0,i.Iw)(e),utm_source:null==e?void 0:e.utm_source,utm_medium:null==e?void 0:e.utm_medium,utm_campaign:null==e?void 0:e.utm_campaign,landing_page:null==e?void 0:e.landing_page,referrer:null==e?void 0:e.referrer,...t}))}function s(e,t){o(()=>n.ZP.capture("cta_clicked",{location:e,...t}))}function d(e,t,r){o(()=>n.ZP.capture("checkout_started",{plan:e,period:t,source:r}))}function m(e,t,r){o(()=>{let a=(0,i.TJ)();n.ZP.capture("subscription_created",{plan:e,period:t,source:r,acquisition_channel:(0,i.Iw)(a),utm_source:null==a?void 0:a.utm_source,utm_campaign:null==a?void 0:a.utm_campaign})})}function f(e,t){o(()=>n.ZP.capture("feature_used",{feature:e,...t})),(0,a.R)()}},71837:function(e,t,r){"use strict";r.d(t,{h:function(){return a}});var n=r(83464),i=r(40257);let a=n.Z.create({baseURL:"/api/v1",headers:{"Content-Type":"application/json"},withCredentials:!0});a.interceptors.request.use(e=>{"true"===i.env.NEXT_PUBLIC_MOBILE?e.baseURL="https://matchupwise.com/api/v1":e.baseURL="/api/v1";{let t=localStorage.getItem("mw_oauth_token");t&&(e.headers.Authorization="Bearer ".concat(t));let r=localStorage.getItem("mw_locale");r&&(e.headers["X-UI-Language"]=r)}return e});let o=null,u=["/agents/cv-tailor","/agents/career-path","/agents/mock-interview/start","/ats/scan","/cv-builder/tailor","/interview/start","/linkedin-optimizer/optimize","/personas/gap-analysis","/profile/optimize-cv","/profile/improve-summary","/salary-coach/job-estimate","/salary-coach/chat"],l=null;a.interceptors.response.use(e=>{var t,n;return(null===(n=e.config)||void 0===n?void 0:null===(t=n.method)||void 0===t?void 0:t.toLowerCase())==="post"&&u.some(t=>{var r;return null===(r=e.config.url)||void 0===r?void 0:r.startsWith(t)})&&(l&&clearTimeout(l),l=setTimeout(()=>{l=null,Promise.all([r.e(5878),r.e(4517),r.e(6602)]).then(r.bind(r,96602)).then(e=>e.useAuthStore.getState().fetchMe()).catch(()=>{})},400)),e},async e=>{var t,r,i,u,l;let c=e.config,s=(null==c?void 0:null===(t=c.url)||void 0===t?void 0:t.includes("/auth/login"))||(null==c?void 0:null===(r=c.url)||void 0===r?void 0:r.includes("/auth/register"))||(null==c?void 0:null===(i=c.url)||void 0===i?void 0:i.includes("/auth/refresh"))||(null==c?void 0:null===(u=c.url)||void 0===u?void 0:u.includes("/auth/logout"));if((null===(l=e.response)||void 0===l?void 0:l.status)!==401||c._retry||s)return Promise.reject(e);c._retry=!0,o||(o=n.Z.post("".concat("","/api/v1/auth/refresh"),{},{withCredentials:!0}).then(()=>{}).finally(()=>{o=null}));try{return await o,a(c)}catch(t){return window.location.href="/login",Promise.reject(e)}})},13512:function(e,t,r){"use strict";r.d(t,{R:function(){return o}});var n=r(56689),i=r(34517);let a="mw_review_v1";function o(){if("ios"===n.dV.getPlatform())try{var e;let t=JSON.parse(localStorage.getItem(a)||"{}"),r=(null!==(e=t.uses)&&void 0!==e?e:0)+1,n=Date.now(),o=r>=3&&(!t.askedAt||n-t.askedAt>10368e6);localStorage.setItem(a,JSON.stringify({uses:r,askedAt:o?n:t.askedAt})),o&&setTimeout(()=>void i.O.requestReview().catch(()=>{}),1500)}catch(e){}}},38225:function(e,t,r){"use strict";r.d(t,{C8:function(){return f},Iw:function(){return g},TJ:function(){return d},nI:function(){return m},u1:function(){return s}});var n=r(56689),i=r(71837);let a="mw_attr_v1",o={utm_source:120,utm_medium:120,utm_campaign:200,utm_term:200,utm_content:200,gclid:255,fbclid:255,referrer:500,landing_page:500,signup_locale:10,signup_platform:10};function u(e,t){if(!t)return;let r=t.trim();if(r)return r.slice(0,o[e])}function l(e){return!!(e.utm_source||e.gclid||e.fbclid||e.referrer)}function c(){try{let e=localStorage.getItem(a);return e?JSON.parse(e):null}catch(e){return null}}function s(){try{let e=c();if(e&&l(e))return;let t=function(){let e=new URLSearchParams(window.location.search),t=null;try{if(document.referrer){let e=new URL(document.referrer).hostname;e&&e!==window.location.hostname&&(t=document.referrer)}}catch(e){}return{utm_source:u("utm_source",e.get("utm_source")),utm_medium:u("utm_medium",e.get("utm_medium")),utm_campaign:u("utm_campaign",e.get("utm_campaign")),utm_term:u("utm_term",e.get("utm_term")),utm_c
1ontent:u("utm_content",e.get("utm_content")),gclid:u("gclid",e.get("gclid")),fbclid:u("fbclid",e.get("fbclid")),referrer:u("referrer",t),landing_page:u("landing_page",window.location.pathname)}}();if(e&&!l(t))return;localStorage.setItem(a,JSON.stringify(t))}catch(e){}}function d(e){var t;let r={...null!==(t=c())&&void 0!==t?t:{}};e&&(r.signup_locale=u("signup_locale",e));let i=n.dV.getPlatform();return r.signup_platform="ios"===i||"android"===i?i:"web",Object.values(r).some(Boolean)?r:void 0}function m(){try{return localStorage.getItem("mw_locale")||void 0}catch(e){return}}function f(){let e=d(m());e&&i.h.post("/auth/attribution",e).catch(()=>{})}function g(e){if(!e)return"direct";if(e.gclid)return"google_ads";if(e.fbclid)return"meta_ads";if(e.utm_source)return"".concat(e.utm_source).concat(e.utm_medium?"/".concat(e.utm_medium):"");if(e.referrer)try{return"referral/".concat(new URL(e.referrer).hostname)}catch(e){return"referral"}return"direct"}},68667:function(e,t,r){"use strict";r.d(t,{Q:function(){return o},t:function(){return u}});let n={"Email already registered":"errors.emailTaken","Invalid credentials":"errors.invalidCredentials","Account is disabled":"errors.accountDisabled","Current password is incorrect":"errors.wrongPassword","Incorrect password":"errors.wrongPassword","Password is required to delete account":"errors.passwordRequired","Invalid or expired reset token.":"errors.resetTokenInvalid","Invalid or expired code":"errors.codeInvalid","Email is already verified":"errors.alreadyVerified","Invalid or expired OAuth state. Please try logging in again.":"errors.oauthRetry","We could not read any text from this file. If it is a scan or a photo, please upload the original PDF or Word document instead.":"errors.cvUnreadable",ai_unavailable:"errors.aiUnavailable",contact_failed:"contact.errorGeneral"},i="planGate.trialsExhausted",a=null;function o(e){a=e}function u(e,t){var r,o;let u=null==e?void 0:null===(o=e.response)||void 0===o?void 0:null===(r=o.data)||void 0===r?void 0:r.detail;if(!u)return t;if("string"==typeof u){if(u.startsWith("trial_exhausted:")){let e=null==a?void 0:a(i);return e&&e!==i?e:t}let e=n[u];if(e&&a){let t=a(e);if(t!==e)return t}return u}if(Array.isArray(u)){let e=u[0];if(null==e?void 0:e.msg)return e.msg}return t}}},function(e){e.O(0,[5878,3464,9064,4517,2971,2117,1744],function(){return e(e.s=70821)}),_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.