1"use strict";(self.webpackChunknyp_membership=self.webpackChunknyp_membership||[]).push([[3957],{1924:function(e,n,o){var i=o(1085),s=(o(4041),o(9067)),t=o.n(s);const c=({headingTag:e="",title:n,children:o=null,titleClasses:s=""})=>{if(!n)return null;const t=e||"h4";return(0,i.jsxs)("header",{className:"member-section__header",children:[(0,i.jsx)(t,{className:s,children:n}),o&&(0,i.jsx)("div",{className:"member-section__description",children:o})]})};c.propTypes={children:t().node,headingTag:t().string,title:t().string.isRequired,titleClasses:t().string},n.A=c},3957:function(e,n,o){o.r(n),o.d(n,{LinkedAccountsSection:function(){return g}});var i=o(1085),s=o(4041),t=o(7309),c=o(1924),r=o(6508),l=o(3065),a=o(4120),d=o(2071),u=o(7093),h=o(7661),p=o(4574),f=function(e,n,o,i){return new(o||(o=Promise))(function(s,t){function c(e){try{l(i.next(e))}catch(e){t(e)}}function r(e){try{l(i.throw(e))}catch(e){t(e)}}function l(e){var n;e.done?s(e.value):(n=e.value,n instanceof o?n:new o(function(e){e(n)})).then(c,r)}l((i=i.apply(e,n||[])).next())})};const g=()=>{const[e,n]=(0,s.useState)(!1),[o,g]=(0,s.useState)(!1),{dispatch:m,state:v}=(0,a.rR)(),{user:{profile:_=!1}={}}=v;(0,s.useEffect)(()=>{f(void 0,void 0,void 0,function*(){_||(0,u.E$)().then(e=>m((0,h.vu)(e))).catch(()=>console.error("Failed to load profile."))})},[]);const{isSSO:x=!1,hasAppleAuth:y=!1,hasFacebookAuth:b=!1,hasGoogleAuth:k=!1}=_||{},j=o=>()=>f(void 0,void 0,void 0,function*(){e||(g(!1),n(o),(0,d.l0)(o,e=>f(void 0,[e],void 0,function*({status:e}){e?((0,u.E$)().then(e=>m((0,h.vu)(e))).catch(e=>console.error("Failed to refresh profile.",e)),(0,u.sU)().then(e=>m((0,h.V8)(e))).catch(e=>console.error("Failed to refresh account.",e)),f(void 0,void 0,void 0,function*(){return m((0,h.WJ)(yield(0,u.Cg)(!0)))})):g((0,t.__)("There was an error linking your account.","nypost")),n(!1)}),!1),setTimeout(()=>n(!1),5e3))});return(0,i.jsx)(r.wn,{children:(0,i.jsxs)("section",{className:"member-profile__section member-profile__section--linked-profiles",children:[(0,i.jsx)(c.A,{headingTag:"h4",title:(0,t.__)("Linked Accounts","nypost"),titleClasses:"member-profile__heading sub-heading sub-heading--semi",children:(0,i.jsx)("div",{className:"member-profile__details",children:(0,i.jsxs)("div",{className:"",children:[!1===x&&(0,i.jsx)("span",{className:"profile-helper-text",children:(0,t.__)("You are currently logged in through your email.","nypost")}),!0===x&&(0,i.jsx)("span",{className:"profile-helper-text",children:(0,t.__)("You are currently logged in through your linked accounts.","nypost")}),!1!==o&&(0,i.jsx)(p.f,{message:o})]})})}),(0,i.jsxs)("div",{className:"social-action-buttons social-login",children:[(0,i.jsx)(l.yP,{connecting:"google"===e,connected:k,onClick:j("google"),service:"Google"}),(0,i.jsx)(l.yP,{connecting:"facebook"===e,connected:b,onClick:j("facebook"),service:"Facebook"}),(0,i.jsx)(l.yP,{connecting:"apple"===e,connected:y,onClick:j("apple"),service:"Apple"})]})]})})}}}]); 2//# sourceMappingURL=3957.4dae0dbc99eec40a1f63.bundle.min.js.map
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.