1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[65,1875],{12413:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/signin",function(){return n(10576)}])},94481:function(e,r,n){"use strict";var t=n(85893),o=n(25675),i=n.n(o),c=n(67294),a=n(61875),s=n(22920);r.Z=e=>{let{socialLogin:r,setCredential:n,setShowMob:o}=e;const[u,d]=(0,c.useState)();(0,c.useEffect)((()=>{d(window.location.origin)}),[]);const{linkedInLogin:l}=(0,a.HL)({clientId:"86b4qk3ibf9z8c",redirectUri:"".concat(u,"/auth/signin"),scope:"email profile w_member_social openid",state:"86b4qk3ibf9z8c",onSuccess:async e=>{const r=await h(e);if(r){let e=await async function(e){let r="".concat(u,"/api/auth/get_user");try{const n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({accessToken:e})});if(!n.ok){const e=await n.json();console.error("Error fetching access Authorization:",e),s.Am.error(e.error_description)}const t=await n.json();return"Success"==t.status?t.data:void s.Am.error(t.error)}catch(n){throw console.error("Error in Authorization:",n),n}}(r);w(e)}},onError:e=>{}}),w=e=>{e&&e.email?(e.linkedin=!0,n(e),r(e)):s.Am.error("Register your email with the linkedin...!")},h=async e=>{let r="".concat(u,"/api/auth/signin");try{const n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({code:e,redirect_uri:"".concat(u,"/auth/signin")})});if(!n.ok){const e=await n.json();throw console.error("Error fetching access Authorization:",e),new Error("Failed to fetch access Authorization: ".concat(e.error_description))}const t=await n.json();return"Success"==t.status?t.access_token:void s.Am.error(t.error)}catch(n){throw console.error("Error in Authorization:",n),n}};return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(i(),{height:20,onClick:l,className:"h-[25px] w-[25px] object-contain cursor-pointer",width:20,alt:"linkedin",src:"/login/linkedin.webp"})})}},10576:function(e,r,n){"use strict";n.r(r);var t=n(85893),o=(n(94481),n(67294),n(61875));r.default=()=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(o.h1,{})})},61875:function(e,r,n){"use strict";n.d(r,{HL:function(){return i},h1:function(){return c}});var t=n(67294),o=n(85893);function i(e){var r=e.redirectUri,n=e.clientId,o=e.onSuccess,i=e.onError,c=e.scope,a=void 0===c?"r_emailaddress":c,s=e.state,u=void 0===s?"":s,d=e.closePopupMessage,l=void 0===d?"User closed the popup":d,w=(0,t.useRef)(null),h=(0,t.useRef)(null),f=(0,t.useCallback)((function(e){var r=localStorage.getItem("linkedin_oauth2_state");if(e.origin===window.location.origin)if(e.data.errorMessage&&"Linked In"===e.data.from){if(e.data.state!==r)return void(w.current&&w.current.close());i&&i(e.data),w.current&&w.current.close()}else if(e.data.code&&"Linked In"===e.data.from){if(e.data.state!==r)return void(w.current&&w.current.close());o&&o(e.data.code),w.current&&w.current.close()}}),[i,o]);(0,t.useEffect)((function(){return function(){window.removeEventListener("message",f,!1),w.current&&(w.current.close(),w.current=null),h.current&&(window.clearInterval(h.current),h.current=null)}}),[f]),(0,t.useEffect)((function(){return window.addEventListener("message",f,!1),function(){window.removeEventListener("message",f,!1)}}),[f]);return{linkedInLogin:function(){var e;null===(e=w.current)||void 0===e||e.close(),w.current=window.open(function(){var e="&scope="+encodeURI(a),t=u||function(e){void 0===e&&(e=20);for(var r="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=n.length,o=0;o<e;o++)r+=n.charAt(Math.floor(Math.random()*t));return r}();return localStorage.setItem("linkedin_oauth2_state",t),"https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id="+n+"&redirect_uri="+r+e+"&state="+t}(),"_blank",function(e){var r=e.width,n=void 0===r?600:r,t=e.height,o=void 0===t?600:t;return"left="+(screen.width/2-n/2)+",top="+(screen.height/2-o/2)+",width="+n+",height="+o}({width:600,height:600})),h.current&&(window.clearInterval(h.current),h.current=null),h.current=window.setInterval((function(){try{w.current&&w.current.closed&&(window.clearInterval(h.current),h.current=null,i&&i({error:"user_closed_popup",errorMessage:l}))}catch(e){window.clearInterval(h.current),h.current=null}}),1e3)}}}function c(){var e=(0,t.useState)(""),r=e[0],n=e[1];return(0,t.useEffect)((function(){var e=function(e){for(var r=window.location.search.substring(1).split("&"),n={},t=0;t<r.length;t++){var o=r[t].split("=");o.length>1&&(n[decodeURIComponent(o[0])]=decodeURIComponent(o[1]))}return n}();if(e.state!==localStorage.getItem("linkedin_oauth2_state"))n("State does not match");else if(e.error){var r=e.error_description||"Login failed. Please try again.";window.opener&&window.opener.postMessage({error:e.error,state:e.state,errorMessage:r,from:"Linked In"},window.location.origin),"user_cancelled_login"===e.error&&window.close()}e.code&&window.opener&&window.opener.postMessage({code:e.code,state:e.state,from:"Linked In"},window.location.origin)}),[]),(0,o.jsx)("div",{children:r},void 0)}}},function(e){e.O(0,[9774,2888,179],(function(){return r=12413,e(e.s=r);var r}));var r=e.O();_N_E=r}]);
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.