(window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[]).push([[238,62,69,720],{"+b91":function(e,t,n){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var i=n("1dBE");const{Provider:o,useHook:s}=Object(i.c)("UnauthHeaderContext")},"0K1N":function(e,t,n){t.a=e=>`//connect.facebook.net/${(e=>{const t=e.replace(/-/g,"_");if(t.startsWith("es"))return"es_LA";if(t.startsWith("ar"))return"ar_AR";switch(t){case"de":return"de_DE";case"fr":return"fr_FR";case"it":return"it_IT";case"ja":return"ja_JP";case"nl":return"nl_NL";case"tr":return"tr_TR";case"en_AU":return"en_US";default:return t}})(e)}/sdk.js`},"0WZX":function(e,t,n){n.d(t,"a",(function(){return it}));var i=n("q1tI"),o=n("/MKj"),s=n("gxu6"),a=n("clxp"),r=n("rYoy"),c=n("2NiC"),l=n("hLPq"),d=n("yweb"),u=n("28DW"),h=n("n6mq"),b=n("nKUr");function p({onLoginClick:e,onSignupClick:t}){const n=Object(d.c)();return Object(b.jsxs)(h.f,{alignItems:"center",direction:"column",display:"flex",paddingX:2,paddingY:4,children:[Object(b.jsx)(h.f,{flex:"grow",maxWidth:220,children:(()=>{const e=n._("You are signed out","Heading on the bottom right upsell suggesting user is not signed in","Heading on the bottom right upsell suggesting user is not signed in");return Object(b.jsxs)(h.f,{marginBottom:6,children:[Object(b.jsx)(h.f,{marginBottom:2,children:Object(b.jsx)(h.v,{overflow:"normal",size:"sm",align:"center",children:e})}),Object(b.jsx)(h.cb,{overflow:"normal",align:"center",children:n._("Sign in to get the best experience","Subheader value prop on the bottom right upsell","Subheader value prop on the bottom right upsell")})]})})()}),Object(b.jsxs)(h.u,{alignItems:"stretch",direction:"row",justifyContent:"center",minWidth:"100%",children:[Object(b.jsx)(h.f,{marginEnd:2,children:Object(b.jsx)(h.g,{fullWidth:!0,size:"md",text:n._("Log in","Text on the button on the bottom banner that leads unauthorized users to login.","Text on the button on the bottom banner that leads unauthorized users to login."),onClick:()=>{e(),Object(u.j)("unauth.tablet.conversion_upsell.login.button_click")}})}),Object(b.jsx)(h.f,{children:Object(b.jsx)(h.g,{fullWidth:!0,size:"md",text:n._("Sign up","sign up button on the bottom banner","sign up button on the bottom banner"),color:"red",onClick:()=>{t(),Object(u.j)("unauth.tablet.conversion_upsell.signup.button_click")}})})]})]})}var g=n("isp9"),j=n("eQwl"),m=n("AGnR"),f=n("EC67");var O=()=>{const e=Object(f.i)(),t=Object(g.g)(e),{viewType:n,viewParameter:i}=Object(o.useSelector)(e=>e.currentPage);return({event:o,navigateToDeepLink:s})=>{const a=o;Object(u.k)("mweb_unauth.interstitial_app_upsell.install_tap",{x:a&&a.pageX||-1,y:a&&a.pageY||-1}),Object(j.f)(),Object(u.h)("press_open_app",!0),Object(m.h)({component:13198,element:10308,view_type:n,view_parameter:i}),s&&s(""+(t?"board/":"")+e.pathname.substr(1))}},_=n("pmdw"),w=n("/8nX"),x=n("OadL"),y=n("EfoL"),S=n("QAzJ"),v=n("ntEp");var T=({onDismiss:e})=>{const t=Object(d.c)(),n=O(),{hasScrolledPastMainContent:s}=Object(v.b)()||{},a=Object(o.useSelector)(({session:e})=>e.isTablet),r=Object(f.i)(),j=Object(f.h)(),T=Object(_.a)(),[C,k]=Object(i.useState)(!1),{viewType:E,viewParameter:I}=Object(o.useSelector)(e=>e.currentPage),L=(()=>{const e=Object(f.i)(),t=Object(f.j)();return Object(o.useSelector)(n=>{var i;const o=t.id&&n.pins[t.id],s=Object(x.b)(n)[e.pathname],a=null==s||null===(i=s.cover_pin)||void 0===i?void 0:i.pin_id,r=a&&o&&n.pins[a],c=o||r,l=Object(y.c)(c)||s&&s.image_cover_url||"";return l?{color:(c||{}).dominant_color,src:l}:null})})(),{anyEnabled:A}=Object(S.a)("mweb_floating_app_upsell_right_side_cancel")(),P=Object(S.a)("mweb_unauth_app_banner_in_rp_only"),B=Object(g.L)(r)&&P().anyEnabled;Object(i.useEffect)(()=>{B?k(s):T>200?C||k(!0):a&&C&&k(!1)},[T,a,s]);const D=t._("Download app","unauth.mweb.floating_app_modal","CTA on the app upsell modal"),M=t._("Get the free Pinterest app to see more","unauth.mweb.floating_app_modal.main_text","Top text on the floating app install modal prompting the users to download the app"),R=t._("Loving these ideas?","unauth.mweb.floating_app_modal.main_text","Top text on the floating app install modal prompting the users to download the app"),U=t=>{const n=t;Object(u.k)("mweb_unauth.float_app_upsell.dismiss_tap",{x:n&&n.pageX||-1,y:n&&n.pageY||-1}),Object(u.h)("click_dismiss_float_app_upsell"),Object(m.h)({component:13198,element:75,view_type:E,view_parameter:I}),e()};return Object(b.jsx)(w.a,{viewType:E||202,viewParameter:I,component:13130,children:Object(b.jsxs)(h.f,{"data-test-id":"floating-app-upsell",rounding:a?6:8,paddingY:a?4:2,paddingX:a?4:2,display:"flex",direction:"column",top:!a,bottom:a,left:!a,right:!0,marginStart:a?0:"auto",marginEnd:a?4:"auto",maxWidth:a?250:360,color:"white",opacity:1,zIndex:new h.t(1e4),dangerouslySetInlineStyle:{__style:{boxShadow:"0px 0px 8px rgba(0, 0, 0, 0.1)",transition:"transform 225ms ease-in-out",transform:(()=>{let e=C?0:a?145:120;return e=a?e:-1*e,`translateY(${e}%)`})(),marginBottom:a?84:void 0}},position:"fixed",children:[!a&&!A&&Object(b.jsx)(h.f,{"data-test-id":"cancel-button",children:Object(b.jsx)(l.a,{icon:"cancel",onTouch:U,size:"sm"})}),!a&&A&&Object(b.jsx)(h.f,{"data-test-id":"cancel-button",display:"flex",alignSelf:"end",children:Object(b.jsx)(l.a,{icon:"cancel",padding:1,onTouch:U,size:"sm"})}),a?Object(b.jsx)(p,{onSignupClick:()=>{j.push("/signup",r.state)},onLoginClick:()=>{j.push("/login",r.state)}}):Object(b.jsxs)(h.f,{children:[Object(b.jsxs)(h.f,{"data-test-id":"interest-image",display:"flex",margin:2,children:[L&&Object(b.jsx)(h.f,{minWidth:48,height:64,overflow:"hidden",rounding:2,marginEnd:4,children:Object(b.jsx)(h.y,{src:L.src,fit:"cover",naturalWidth:48,naturalHeight:64,color:L.color||"white",alt:"image"})}),Object(b.jsxs)(h.u,{alignItems:"stretch",justifyContent:"start",direction:"column",children:[Object(b.jsx)(h.f,{children:Object(b.jsx)(h.cb,{weight:"bold",children:R})}),Object(b.jsx)(h.cb,{children:M})]})]}),Object(b.jsx)(h.f,{alignItems:"center",alignSelf:"center","data-test-id":"download-button",display:"flex",direction:"row",justifyContent:"center",marginBottom:3,marginStart:4,marginEnd:4,wrap:!0,children:Object(b.jsx)(c.a,{children:e=>Object(b.jsx)(h.g,{color:"red",onClick:({event:t})=>{n({event:t,navigateToDeepLink:e}),Object(u.j)("unauth.mweb.phone.app_upsell.button_click")},size:"md",text:D})})})]})]})})},C=n("7w6Q"),k=n("pLLR"),E=n("/Rmy"),I=n("vtuW");var L=e=>{const{isBot:t}=Object(k.d)(),n=Object(f.i)();return!t&&!e&&(Object(g.L)(n)||Object(g.g)(n))&&!Object(E.b)()&&!(Object(g.A)()&&(Object(I.a)("ufausfiiab")||(C.a.increment("unauth.floating_app_upsell.suppress_for_instagram_in_app_browser"),Object(I.c)("ufausfiiab","1")),1))};function A({showLiteUpsell:e}){Object(i.useEffect)(()=>{Object(j.g)()},[]);const{viewType:t,viewParameter:n}=Object(o.useSelector)(e=>e.currentPage),[s,a]=Object(i.useState)(!1),r=L(e);return Object(b.jsx)(w.a,{viewType:t||202,viewParameter:n,component:13198,children:Object(b.jsx)(h.f,{children:r&&!s&&Object(b.jsx)(T,{onDismiss:()=>a(!0)})})})}var P=n("MH4Q"),B=n("g6r8"),D=n("+b91");function M({setRef:e,showDesktopSignupModal:t}){const n=Object(d.c)(),i=Object(B.a)(),s=Object(f.h)(),a=Object(f.i)(),r=Object(o.useSelector)(e=>e),{currentPage:l}=r,p=l.viewParameter,g=l.viewType,j=()=>{Object(u.a)("unauth.login_button.click"),Object(u.h)("mweb_press_header_login"),t?t("login"):s.push("/login")},O="desktop"===i,_=O?"signup":"download",w="signup"===_?n._("Sign up","Text on button on the top bar that leads users to signing up.","Text on button on the top bar that leads users to signing up."):n._("Download app","mweb.unauth_header.download_app","CTA on the app interstitial upsell to install the app");return Object(b.jsx)(h.f,{"data-test-id":"unauth-header",position:"relative",top:!0,zIndex:new h.t(9999),width:"100%",children:Object(b.jsx)(c.a,{children:n=>Object(b.jsx)(D.a,{value:{emptySearchSuggestions:[],headerOffsetTop:0,searchBoxType:O?"full":"simple"},children:Object(b.jsx)(P.b,{enableSettingsFlyout:O,isDesktop:O,primaryButtonText:w,onLoginButtonClick:j,onPrimaryButtonClick:e=>{"signup"===_?(Object(u.a)("unauth.signup_button.click"),Object(u.h)("mweb_press_header_signup"),t?t("signup"):s.push("/signup")):((e,t)=>{Object(u.h)("press_open_app",!0),Object(m.h)({component:13198,element:10308,view_type:g,view_parameter:p}),t&&t(a.pathname.substr(1))})(0,n)},ref:e})})})})}var R=n("Lr1Z"),U=n("lsgW"),z=n("1Qfp");var F=({children:e,fallback:t})=>(()=>{const e=Object(o.useSelector)(e=>{var t;return!(null==e||null===(t=e.session)||void 0===t||!t.isSeoBot)}),t=Object(z.a)();return!e&&!t})()?t||null:e,G=n("2JgW"),H=n("eyT9");function N({isShowing:e,setRef:t,showLiteUpsell:n}){const i=Object(d.c)(),s=Object(f.i)(),a=Object(f.h)(),{viewType:r,viewParameter:l}=Object(o.useSelector)(e=>e.currentPage),p=O(),j=L(n),_=Object(S.a)("mweb_creator_access_upsell")().anyEnabled,w=Object(S.a)("mweb_unauth_consistent_header");if(Object(o.useSelector)(({marketingCampaign:e})=>_&&e.params.utm_campaign))return null;const x=Object(g.z)(s)||Object(g.Y)(s),y=i._("Log in","Label for log in button","Label for log in button"),v=i._("Sign up","Text on button on the top bar that leads users to signing up.","Text on button on the top bar that leads users to signing up."),T=i._("Download","mweb.unauth.interstitial_upsell.download_button_text","CTA on the app interstitial upsell to install the app"),C=(n?T.length:(j||Object(g.z)(s)?v:T).length+y.length)>=18;return Object(b.jsx)(h.f,{dangerouslySetInlineStyle:{__style:{boxShadow:"0 1px 0 0 rgba(0, 0, 0, 0.08)",backgroundColor:Object(H.e)()?"#333":"white",transition:"all 225ms cubic-bezier(0.0,0.0,0.2,1) 500ms",transform:e?"translateY(-100vh)":"translateY(0)",zIndex:s.hash==="#"+G.a||w().anyEnabled?void 0:99}},top:!0,left:!0,width:"100vw",position:"relative",paddingX:3,children:Object(b.jsx)(h.f,{ref:t,children:Object(b.jsxs)(h.f,{alignItems:"center",display:"flex",direction:"row",justifyContent:"between","data-test-id":"unauth-header",children:[Object(b.jsx)(h.bb,{accessibilityLabel:i._("Pinterest App","Pinterest icon for app upsell","Pinterest icon for app upsell"),onTap:()=>{Object(u.i)({action:"click",page_location:s,within:"unauth-header",item:"pinterest-logo"})},children:Object(b.jsxs)(h.f,{alignItems:"center",display:"flex",direction:"row",marginEnd:3,children:[Object(b.jsx)(h.f,{alignItems:"center",display:"flex",height:56,justifyContent:"center",rounding:2,"data-test-id":"pinterest-logo-icon",children:Object(b.jsx)(R.a,{pressState:"none",to:"/",children:n?Object(b.jsx)(U.a,{size:24}):Object(b.jsx)(h.w,{color:"red",icon:"pinterest",accessibilityLabel:i._("Pinterest App","Pinterest icon for app upsell","Pinterest icon for app upsell"),size:24})})}),Object(b.jsx)(h.f,{paddingY:2,paddingX:1,"data-test-id":"pinterest-logo-text",children:!C&&Object(b.jsxs)(h.f,{children:[Object(b.jsx)(h.v,{color:"red",size:"sm",overflow:"normal",children:n?i._("Pinterest Lite","Pinterest lite brand for the app upsell","Pinterest lite brand for the app upsell"):i._("Pinterest","Pinterest brand for the app upsell","Pinterest brand for the app upsell")}),n&&Object(b.jsx)(h.f,{dangerouslySetInlineStyle:{__style:{whiteSpace:"pre-wrap"}},children:Object(b.jsx)(h.f,{children:Object(b.jsx)(h.cb,{inline:!0,size:"sm",color:"gray",children:i._("Save space on your device","Unauth app upsell copy that describe Pinterest product core value to users","Unauth app upsell copy that describe Pinterest product core value to users")})})})]})})]})}),Object(b.jsx)(F,{children:Object(b.jsxs)(h.f,{marginEnd:0,flex:"none",alignItems:"center",display:"flex",direction:"row","data-test-id":"UnauthAppUpsellButton",children:[!n&&!Object(g.B)(s)&&Object(b.jsx)(h.f,{"data-test-id":"login-button",children:Object(b.jsx)(h.g,{fullWidth:!0,color:"white",onClick:()=>{Object(u.i)({action:"click",page_location:s,within:"unauth-header",item:"login-button"}),Object(m.h)({component:13198,element:30,view_type:r,view_parameter:l}),a.push("/login",s.state)},size:"md",text:y})}),j||x?Object(b.jsx)(h.f,{"data-test-id":"signup-button",children:Object(b.jsx)(h.g,{fullWidth:!0,color:x?"red":"gray",onClick:()=>{Object(u.i)({action:"click",page_location:s,within:"unauth-header",item:"signup-button"}),Object(m.h)({component:13198,element:31,view_type:r,view_parameter:l}),a.push("/signup",s.state)},size:"md",text:v})}):Object(b.jsx)(h.f,{"data-test-id":"download-button",children:Object(b.jsx)(c.a,{redirectToLite:n,children:e=>Object(b.jsx)(h.g,{fullWidth:!0,color:Object(g.cb)(s)?"gray":"red",onClick:({event:t})=>{Object(u.i)({action:"click",page_location:s,within:"unauth-header",item:"download-button"}),p({event:t,navigateToDeepLink:e})},size:"md",text:T})})})]})})]})})})}var W=n("i2lo"),q=n("0EiH"),$=n("6adH"),Y=n("4kAQ"),K=n("ANjH");function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Q=[501181];class X extends i.PureComponent{constructor(...e){super(...e),J(this,"completeExperience",()=>{const{experience:e,completeExperience:t}=this.props;e&&t&&t(e.placement_id,e.experience_id)}),J(this,"onTouch",()=>{this.completeExperience(),Object(u.a)("mweb_unauth_toast_upsell.tap");const{history:e,location:t}=this.props;t.pathname.startsWith("/search/")?e.push({pathname:"/",state:{from:`${t.pathname}${t.search}`,next:`${t.pathname}${t.search}`}}):e.push({pathname:"/",state:{from:t.pathname,next:t.pathname}})})}componentDidMount(){Object(u.a)("mweb_unauth_toast_upsell.shown"),this.props.experience&&this.props.showToast(({onHide:e})=>{var t,n;return Object(b.jsx)(W.a,{experience:this.props.experience,eligibleIds:Q,children:Object(b.jsx)(q.default,{hideToast:()=>{},toast:{persistent:!0,text:null!==(t=null===(n=this.props.experience)||void 0===n?void 0:n.display_data.toast_text)&&void 0!==t?t:"",icon:"arrow-circle-forward",onTouch:()=>{this.onTouch(),e()}}})})})}render(){return null}}var Z=Object(K.compose)(f.l,Object(o.connect)(null,(e,t)=>({completeExperience:(t,n)=>e(Object(Y.a)(t,n))})),$.a)(X),V=n("FDmi"),ee=n("bcHz"),te=n("fs0a"),ne=n("kmwA"),ie=n("tCfZ"),oe=n("qpbZ");function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ae={visible:{transform:"translateY(0)",transition:"all 225ms cubic-bezier(0.0,0.0,0.2,1)"},hiding:{transform:"translateY(350px)",transition:"all 225ms cubic-bezier(0.0,0.0,0.2,1)"},wash:{backgroundColor:"rgba(0, 0, 0, 0.5)",height:"100%",touchAction:"none",width:"100%",zIndex:10001,position:"fixed",top:0,left:0},mask:{baseStyles:{backgroundColor:"rgba(0,0,0, .5)",height:"100%",touchAction:"none",width:"100%",zIndex:1}}},re=1e3;class ce extends i.PureComponent{constructor(...e){super(...e),se(this,"state",{visible:!1,hiding:!1,showWash:!1}),se(this,"getTitle",()=>{const{invite:e}=this.props,t=e&&e.sender,n=t&&t.first_name;return this.props.i18n._("Join {{ name }} on Pinterest for more ideas","Prompt user to signup to access all Pinterest features","Prompt user to signup to access all Pinterest features").replace("{{ name }}",n||"")}),se(this,"getAvatar",()=>{const{invite:e}=this.props,t=e&&e.sender,n=t&&t.image_medium_url,i=t&&t.full_name;return Object(b.jsx)(V.a,{src:n||"",name:i||"",size:"sm"})}),se(this,"handleHide",()=>{const{onDismiss:e}=this.props;C.a.increment("mweb_facebook_social_upsell.close"),this.setState({hiding:!0,showWash:!1}),this.slideInAnimation=window.requestAnimationFrame(()=>{setTimeout(()=>{e&&e()},re)})}),se(this,"handleHideOutsideTap",()=>{const{onDismiss:e}=this.props;C.a.increment("mweb_facebook_social_upsell.close.outside.modal"),this.setState({hiding:!0,showWash:!1}),this.slideInAnimation=window.requestAnimationFrame(()=>{setTimeout(()=>{e&&e()},re)})}),se(this,"handleFBConnect",e=>{C.a.increment("mweb_facebook_social_upsell.fb_connect_button_click."+e)}),se(this,"handleSignupClick",()=>{C.a.increment("mweb_facebook_social_upsell.signup_button_click"),this.props.history.push({pathname:"/",state:{from:this.props.location.pathname,next:this.props.location.pathname}})}),se(this,"initializeShowAnimation",()=>{C.a.increment("mweb_facebook_social_upsell.shown"),this.slideInAnimation=window.requestAnimationFrame(()=>{setTimeout(()=>{this.setState({visible:!0})},re)})})}componentDidMount(){C.a.increment("mweb_facebook_social_upsell.land");const{invite:e}=this.props,t=e?e.invite_channel:null;t&&C.a.increment("mweb_social_unauth.invite_channel."+t),this.initializeShowAnimation()}componentWillUnmount(){window.cancelAnimationFrame(this.slideInAnimation)}renderDefaultLoginHeader(){return Object(b.jsxs)(h.f,{flex:"grow",display:"flex",alignItems:"center",marginBottom:2,justifyContent:"center",children:[Object(b.jsxs)(h.f,{alignItems:"center",display:"flex",direction:"column",marginBottom:5,children:[Object(b.jsx)(h.f,{children:Object(b.jsx)(h.cb,{align:"start",weight:"bold",children:Object(b.jsx)("span",{className:"deprecatedTextSizeXL",children:this.props.i18n._("Sign up to see more","Title on mobile web signup modal to prompt users to signup for Pinterest.","Title on mobile web signup modal to prompt users to signup for Pinterest.")})})}),Object(b.jsx)(h.f,{marginBottom:1}),Object(b.jsx)(h.u,{alignItems:"center",direction:"column",justifyContent:"start",children:Object(b.jsx)(h.cb,{align:"start",children:this.props.i18n._("Free, unlimited access to ideas","First value prop on mobile web sign up modal","First value prop on mobile web sign up modal")})})]}),Object(b.jsx)(h.q,{})]})}renderInviterHeader(){return Object(b.jsxs)(h.f,{flex:"grow",display:"flex",alignItems:"center",marginBottom:2,children:[Object(b.jsxs)(h.f,{alignItems:"center",direction:"row",display:"flex",paddingY:3,children:[Object(b.jsx)(h.f,{children:Object(b.jsx)(h.cb,{align:"start",weight:"bold",children:Object(b.jsx)("span",{className:"deprecatedTextSizeXL",children:this.getTitle()})})}),Object(b.jsx)(h.f,{dangerouslySetInlineStyle:{__style:{marginLeft:"26%"}},children:this.getAvatar()})]}),Object(b.jsx)(h.q,{})]})}render(){const{location:e,invite:t}=this.props,{visible:n,hiding:i,showWash:o}=this.state,s=ne.a.settings.LOGIN_URL,a=t?t.sender:null,r=n&&!i?ae.visible:ae.hiding;return Object(b.jsxs)(h.f,{dangerouslySetInlineStyle:{__style:o?ae.wash:{}},children:[n&&!i?Object(b.jsx)(ee.a,{onTouch:this.handleHideOutsideTap,pressState:"none",children:Object(b.jsx)(h.f,{position:"fixed",top:!0,left:!0,opacity:1,dangerouslySetInlineStyle:{__style:ae.mask.baseStyles}})}):null,Object(b.jsx)(h.f,{position:"fixed",bottom:!0,color:"white",paddingX:6,width:"100%",dangerouslySetInlineStyle:{__style:{...r,boxShadow:"0 1px 5px 0 rgba(0,0,0,0.25)",paddingBottom:"5%",paddingTop:"2%",touchAction:"none",zIndex:10001}},children:Object(b.jsxs)(h.f,{maxWidth:400,marginStart:"auto",marginEnd:"auto",children:[Object(b.jsx)(h.f,{paddingY:2}),Object(b.jsx)(h.f,{position:"absolute",left:!0,top:!0,marginStart:4,marginTop:2,children:Object(b.jsx)(l.a,{accessibilityLabel:this.props.i18n._("Close modal","Close the modal for facebook upsell","Close the modal for facebook upsell"),icon:"cancel",onTouch:this.handleHide,size:"sm"})}),Object(b.jsx)(h.f,{paddingY:2}),a?this.renderInviterHeader():this.renderDefaultLoginHeader(),Object(b.jsx)(h.f,{marginBottom:1,height:40,children:Object(b.jsx)(te.a,{facebookText:this.props.i18n._("Continue with Facebook","Button to login or signup with FB on Facebook","Button to login or signup with FB on Facebook"),from:e.pathname,next:e.pathname,fbButtonType:"continue",fbUseContinueAs:!0,fbConnectHandler:this.handleFBConnect})}),Object(b.jsx)(h.f,{marginBottom:1,marginTop:2,children:Object(b.jsx)(h.g,{fullWidth:!0,onClick:this.handleSignupClick,color:"gray",text:this.props.i18n._("Sign Up","Button to redirect user to Signup Page on mweb","Button to redirect user to Signup Page on mweb")})}),Object(b.jsx)(h.f,{marginTop:3,children:Object(b.jsx)(h.cb,{color:"gray",align:"center",size:"sm",children:Object(oe.b)(this.props.i18n._("Have an account? {{ logIn }}","Asking users if they already have an account","Asking users if they already have an account"),{logIn:Object(b.jsx)(h.C,{href:s,inline:!0,onClick:({disableOnNavigation:e})=>e(),children:Object(b.jsx)(h.cb,{color:"gray",inline:!0,size:"sm",weight:"bold",children:this.props.i18n._("Log in","Mobile web link to log in page","Mobile web link to log in page")})})})})}),Object(b.jsx)(h.f,{marginTop:3,children:Object(b.jsx)(ie.a,{size:"xs"})})]})})]})}}var le=Object(f.l)((function(e){const t=Object(d.c)();return Object(b.jsx)(ce,{...e,i18n:t})})),de=n("mp1x");const ue={border:Object(H.e)()?void 0:"1px solid #efefef",bottom:0,boxShadow:"0 0 16px rgba(0,0,0, 0.16)",left:0,touchAction:"none",transitionProperty:"transform, opacity",transitionTimingFunction:"ease-out",width:"100vw",zIndex:1};var he=({children:e,isOpen:t,onDismiss:n,type:i})=>Object(b.jsx)(de.a,{allowScrolling:!0,childPaddingX:4,childPaddingY:4,disableMask:!0,hideCloseIcon:!0,isOpen:t,modalStyle:ue,onCloseIconDismiss:n,onDismiss:n,type:i,children:e});class be extends i.PureComponent{constructor(...e){var t,n,i;super(...e),i=({event:e})=>{e&&e.stopPropagation&&e.stopPropagation();const{history:t,socialCollabGroupBoardPath:n}=this.props,i=n||"";C.a.increment("mweb.social.group_board.public.modal.display"),t.push({pathname:"/signup/step1/",state:{next:i,isFromGroupBoardsInvite:!0}})},(n="handleJoinBoardClick")in(t=this)?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i}componentDidMount(){const{inviteObject:e}=this.props,t=e?e.invite_channel:null;C.a.increment("mweb.social.group_board.public.modal.display"),t&&C.a.increment("mweb.social.group_board.public.invite_channel."+t)}render(){const{viewType:e,viewParameter:t,inviteObject:n,board:i}=this.props,o=n?n.sender:null,s=o?o.first_name:"",a=o?o.image_medium_url:"",r=o?o.full_name:"",c=s?this.props.i18n._("{{ name }} invited you to join their board","Mobile Modal prompting users to join a friends({{ name }}) board","Mobile Modal prompting users to join a friends({{ name }}) board").replace("{{ name }}",s):this.props.i18n._("Your friends invited you to join their board","Mobile Modal prompting users to join a friends board","Mobile Modal prompting users to join a friends board"),l=this.props.i18n._("Join board","Join Board Button","Join Board Button");return Object(b.jsx)(w.a,{viewType:e||202,viewParameter:t,component:13196,children:Object(b.jsx)(he,{isOpen:!0,onDismiss:()=>{},type:"groupboard_join",children:i?Object(b.jsxs)(h.f,{padding:3,children:[Object(b.jsxs)(h.f,{children:[Object(b.jsxs)(h.u,{alignItems:"center",direction:"row",justifyContent:"start",children:[Object(b.jsx)(h.f,{dangerouslySetInlineStyle:{__style:{marginRight:"5%"}},width:"48px",children:Object(b.jsx)(V.a,{src:a||"",name:r||""})}),Object(b.jsx)(h.f,{maxWidth:"74%",children:Object(b.jsx)(h.cb,{align:"start",overflow:"normal",weight:"bold",children:c})})]}),Object(b.jsx)(h.f,{marginBottom:4})]}),Object(b.jsx)(h.g,{fullWidth:!0,text:l,color:"red",type:"button",onClick:this.handleJoinBoardClick})]}):Object(b.jsx)(h.f,{padding:3,children:Object(b.jsx)(h.U,{show:!0,accessibilityLabel:this.props.i18n._("Loading Board","Accessiblity label for Spinner searching for board","Accessiblity label for Spinner searching for board")})})})})}}function pe(e){const t=Object(d.c)(),n=Object(f.h)(),{country:i,socialCollabGroupBoardPath:s}=Object(o.useSelector)(({session:e})=>e),{viewType:a,viewParameter:r}=Object(o.useSelector)(({currentPage:e})=>e),c=s&&s.split("?")[0]||"",l=Object(o.useSelector)(e=>Object(x.b)(e)[c]);return Object(b.jsx)(be,{...e,board:l,country:i,history:n,i18n:t,socialCollabGroupBoardPath:s,viewParameter:r,viewType:a})}var ge=n("75Yz"),je=n("fgPB"),me=n("ulr2"),fe=n("yQCU");function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _e=()=>{document.body&&(document.body.style.overflow="visible",document.body.style.touchAction="auto")};class we extends i.Component{constructor(...e){super(...e),Oe(this,"state",{scrollingModalEnabled:!1,isIdleTimerDeactivated:!1}),Oe(this,"inactiveTime",0),Oe(this,"handleIdleInactivity",()=>{const e=this.inactiveTime+500;C.a.increment("mweb_unauth.idle_time."+e),this.inactiveTime=e,e>=6e5&&this.handleIdleDeactivate()}),Oe(this,"handleIdleDeactivate",()=>{const{isIdleTimerDeactivated:e}=this.state;e||(clearInterval(this.idleId),this.setState({isIdleTimerDeactivated:!0}),window.removeEventListener("touchstart",this.handleIdleDeactivate),window.removeEventListener("touchend",this.handleIdleDeactivate),window.removeEventListener("touchcancel",this.handleIdleDeactivate),window.removeEventListener("touchmove",this.handleIdleDeactivate))}),Oe(this,"handleThrottledScrollForSignupModal",Object(je.a)(e=>{const{mobileSignupModalDispatch:t,toggleSignupScrollControllerDisplay:n}=this.props,{scrollingModalEnabled:i}=this.state;!(null==t||!t({type:"UNAUTH_UPDATE_SIGNUP_SCROLL_CONTROLLER_SCROLL_POSITION",scrollPosition:e}))&&(document.body&&(document.body.style.overflow="hidden",document.body.style.touchAction="none"),i||(this.setState({scrollingModalEnabled:!0}),n(!0)))},500)),Oe(this,"handleScroll",()=>{const e=this.getScrollPos();this.handleIdleDeactivate(),this.handleThrottledScrollForSignupModal(e)}),Oe(this,"handleSignupDismiss",()=>{const{hideSignupModal:e,isSignupModalShown:t,toggleSignupScrollControllerDisplay:n,mobileSignupModalDispatch:i}=this.props;t&&e(),null==i||i({type:"DISMISS_MOBILE_SIGNUP_MODAL"}),n&&n(!1),this.setState({scrollingModalEnabled:!1}),_e()})}componentDidMount(){this.idleId=setInterval(this.handleIdleInactivity,500),window.addEventListener("scroll",this.handleScroll),window.addEventListener("touchstart",this.handleIdleDeactivate),window.addEventListener("touchend",this.handleIdleDeactivate),window.addEventListener("touchcancel",this.handleIdleDeactivate),window.addEventListener("touchmove",this.handleIdleDeactivate)}componentWillUnmount(){window.removeEventListener("scroll",this.handleScroll),this.handleIdleDeactivate(),_e()}getScrollPos(){return void 0!==window.scrollY?window.scrollY:document.documentElement&&void 0!==document.documentElement.scrollTop?document.documentElement.scrollTop:0}render(){const{scrollingModalEnabled:e}=this.state,{isSignupModalShown:t,isMobileSignupModalShown:n,invite:i,renderSignupModal:o}=this.props;return Object(b.jsx)(h.f,{children:n||t?o(e?{isScrollingModal:!0,onDismiss:this.handleSignupDismiss,invite:i}:{isScrollingModal:!1}):null})}}var xe=e=>{const t=Object(o.useSelector)(({session:e})=>e.isSignupModalShown),n=Object(o.useDispatch)(),i=!!Object(fe.b)(),s=Object(fe.c)();return Object(b.jsx)(we,{...e,hideSignupModal:()=>n(Object(me.k)()),isMobileSignupModalShown:i,isSignupModalShown:t,mobileSignupModalDispatch:s})},ye=n("snfI");var Se=Object(f.l)(({invite:e,location:t,showLiteUpsell:n=!1})=>{var o;const s=Object(d.c)(),[a,r]=Object(i.useState)(!0);Object(i.useEffect)(()=>{Object(u.a)("mweb_unauth_toast_upsell.shown")},[]);const l=({event:e},n)=>{Object(u.a)("mweb_unauth_toast_upsell.tap"),Object(u.h)("press_upsell");const{pathname:i,search:o}=t;n&&n(i.concat(o).substr(1))},p=(null==e||null===(o=e.sender)||void 0===o?void 0:o.first_name)||"",j=s._("Join {{ name }} on Pinterest for more ideas","Prompt user to signup to access all Pinterest features","Prompt user to signup to access all Pinterest features").replace("{{ name }}",p),{isNavFooterHiddenAfterScroll:m}=Object(ye.b)();return Object(b.jsx)(he,{isOpen:m&&a,onDismiss:()=>{r(!1)},type:"unauth_toast_upsell",children:Object(b.jsxs)(h.f,{padding:2,children:[p&&Object(g.T)(t,!0,!0)&&Object(b.jsx)(h.f,{marginBottom:4,children:Object(b.jsx)(h.cb,{overflow:"normal",weight:"bold",align:"center",children:j})}),Object(b.jsx)(c.a,{redirectToLite:n,children:e=>Object(b.jsx)(h.g,{fullWidth:!0,color:"red",onClick:t=>{l(t,e)},size:"md",text:s._("Open in app","Opens the Pin in the Pinterest app","Opens the Pin in the Pinterest app")})})]})})}),ve=n("RNo4"),Te=n("fsjD"),Ce=n("E/Zv");const ke=[5,18,17,6,19],Ee=Object(i.lazy)(()=>n.e("SignupModal").then(n.bind(null,"BrpJ")));function Ie({appInstallBannerIsEnabled:e,experience:t,fbSocialUpsell:n,shouldShowGoogleOneTap:s,shouldShowLiteUpsell:c,showWashOnly:l,toggleSignupScrollControllerDisplay:d}){const u=Object(f.i)(),p=Object(B.a)(),j=Object(o.useSelector)(e=>e.session.canUseNativeApp&&"android-twa"!==e.session.pwaType),{browserType:m,isSignupModalShown:O,isUnauthToastUpsellDisplayed:_,locale:w,socialCollabGroupBoardPath:x,userAgentPlatform:y}=Object(o.useSelector)(e=>e.session),S=Object(Te.c)(),v=!("android"===y&&(1!==m||Object(g.A)())&&u.pathname.startsWith("/discover/article")),T=Object(fe.b)(),C=Object(fe.c)(),k=u&&u.search?Object(ve.l)(u.search):"",[E,I]=Object(i.useState)(!1),[L,A]=Object(i.useState)(!1),[P,D]=Object(i.useState)(!0),[M,R]=Object(i.useState)(!1),U=Object(Ce.c)({location:u,isSignupModalShown:!1});Object(i.useEffect)(()=>{I(k&&k.invite_code||""),U&&!Object(g.O)(u)&&D(!1)},[]);const z=e=>{var t,n;return Object(b.jsx)(a.a,{name:"SafeSuspense_UnauthPageWrapper_SignupModal",children:Object(b.jsx)(r.a,{fallback:Object(b.jsx)(h.f,{}),children:Object(b.jsx)(Ee,{inviteObject:e.isScrollingModal?e.invite:void 0,isScrollingModal:e.isScrollingModal,isTablet:"tablet"===p,isWashOnly:l,onDismiss:e.isScrollingModal?e.onDismiss:()=>{null==C||C({type:"DISMISS_MOBILE_SIGNUP_MODAL"}),Object(Ce.d)()},toggleSignupScrollControllerDisplay:d,thinnerModal:!["es-419","es-MX","es-US","fr","ms-MY","sk-SK","uk-UA"].includes(w)&&((null===(t=window)||void 0===t||null===(n=t.screen)||void 0===n?void 0:n.width)||0)>=345})})})};let F=null;!U||!j||e||Object(g.O)(u)||Object(g.N)(u)||Object(g.T)(u,L,M)||Object(g.z)(u)||Object(g.bb)(u)||(F=t?Object(b.jsx)(Z,{experience:t}):v&&Object(b.jsx)(Se,{showLiteUpsell:c()}));const G=(O||T)&&Object(Ce.a)(u)?z({isScrollingModal:!1}):null,H=S||E;return H?Object(b.jsx)(ge.default,{invite_code:H,children:e=>{var t;const i=null!==(t=null==e?void 0:e.sender)&&void 0!==t?t:null,o=Object(g.g)(u)&&Object(g.T)(u,!0)&&4===(null==i?void 0:i.invite_category);o&&!x&&Object(me.x)({socialCollabGroupBoardPath:u.pathname+u.search});const c=Object(g.r)(u)&&x,l=o||c;i&&(!L&&Object(g.g)(u)&&Object(g.T)(u,!0)&&!l&&A(!0),!M&&Object(g.O)(u)&&Object(g.T)(u,!1,!0)&&R(!0));const p=null==e?void 0:e.invite_channel,j=ke.includes(p);let m="none";return p&&Object(g.T)(u,!0,!0)&&(j&&!n.dismissed?m="facebook":s||O||P||!_||!v||(m="toast")),Object(b.jsxs)(h.f,{children:[F,j||l||!Object(g.T)(u)?G:Object(b.jsx)(xe,{invite:e,renderSignupModal:z,toggleSignupScrollControllerDisplay:d}),"facebook"===m?Object(b.jsx)(le,{invite:e,onDismiss:()=>{n.dismissed||n.dismiss()}}):"toast"===m?Object(b.jsx)(Se,{invite:e}):null,l&&Object(b.jsx)(a.a,{name:"SafeSuspense_UnauthPageWrapper_GroupBoardsJoinModal",children:Object(b.jsx)(r.a,{children:Object(b.jsx)(pe,{inviteObject:e})})})]})}}):Object(b.jsxs)(h.f,{children:[F,G]})}var Le=n("QtD7"),Ae=n("ARZW"),Pe=n("bUAJ"),Be=n("ke5A"),De=n("zRck"),Me=n("pivO"),Re=n("Q5BC"),Ue=n("YWAn"),ze=n("J8m7");const Fe="keychainAutologinDisabled",Ge="mweb.unauth.ios_keychain_autologin";function He(){const[e,t]=Object(i.useState)(""),[n,s]=Object(i.useState)(""),a=Object(i.useRef)(!1),r=!!e&&!!n,c=Object(i.useRef)(),l=Object(o.useDispatch)(),p=Object(f.h)(),g=Object(f.i)(),j=Object(d.c)(),{showToast:O}=Object(Ue.c)();Object(i.useEffect)(()=>{c.current&&c.current.focus()},[]);const _=({errorReason:e,errorCode:t,errorMessage:n})=>{const i=e||t===ze.o?"invalid_password":t===ze.n?"invalid_email":"login";Object(u.j)(`${Ge}.failure.${i}`),Object(I.c)(Fe,!0),p.push({pathname:"/login",state:{keychainiOSAutologinError:{code:t,message:n}}})},w=e=>{Object(m.e)({event_type:e,view_type:9,view_parameter:63,aux_data:{signup_login_method:1}})};Object(i.useEffect)(()=>{a.current!==r&&(a.current=r,Object(I.c)(Fe,!0),l(Object(Re.b)({username_or_email:e,password:n},p,g.pathname,{isAutologin:!0})).then(()=>{O({text:j._("You're logged in!","mweb.unauth.ios_keychain_autologin.login_success_toast","Toast to alert user they are being logged in")}),Object(u.j)(Ge+".login_success"),w(7536)}).catch(e=>{w(7535),_({errorCode:e.apiErrorCode,errorMessage:e.message})}))});const x=({value:e,type:n})=>{1!==e.length?"email"===n?t(e):s(e):_({errorReason:"manual_input_attempt"})},y=()=>{r||Object(u.j)(Ge+".failure.user_dismissed_prompt"),Object(I.c)(Fe,!0)};return Object(b.jsx)(h.f,{position:"absolute",top:!0,opacity:0,dangerouslySetInlineStyle:{__style:{zIndex:-100}},children:Object(b.jsxs)("form",{onSubmit:e=>{e.preventDefault()},autoComplete:"on","aria-hidden":"true",children:[Object(b.jsx)(h.eb,{autoComplete:"username",id:"username",onChange:({value:e})=>x({value:e,type:"email"}),ref:c,size:"lg",type:"email",value:e,onBlur:y}),Object(b.jsx)(h.eb,{autoComplete:"current-password",id:"current-password",onChange:({value:e})=>x({value:e,type:"password"}),size:"lg",type:"password",value:n,onBlur:y})]})})}var Ne=n("AYc3"),We=n("0G5S"),qe=n("2y2F"),$e=n("PmFr"),Ye=n("YWST");function Ke(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Je=Object(i.lazy)(()=>n.e(609).then(n.bind(null,"4aTO"))),Qe=Object(i.lazy)(()=>n.e(587).then(n.bind(null,"57M6"))),Xe=Object(i.lazy)(()=>n.e(610).then(n.bind(null,"Lajh"))),Ze=()=>"undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&(window.navigator.userAgent.includes($e.d)||window.navigator.userAgent.includes($e.a)),Ve=()=>{try{const{count:e,time:t}=JSON.parse(Object(We.a)("unauthRevisitation"));return"number"==typeof e&&"number"==typeof t?{count:e,time:t}:null}catch(e){return null}},et=e=>{Object(We.c)("unauthRevisitation",JSON.stringify(e))},tt=e=>e.includes("_created")||e.includes("boards");class nt extends i.Component{constructor(...e){super(...e),Ke(this,"state",{fbSocialUpsellDismissed:!1,hasScrolledPastMainContent:!1,isClientMounted:!1,isScrollControllerDisplayed:!1,mwebHeaderHeight:0,referrer:"",shouldShowGoogleOneTap:!0,showWashOnly:!1}),Ke(this,"appInstallBannerIsEnabled",()=>{const{appInstallBannerAlongRegister:e,canUpsellNativeApp:t,location:n,routeMatch:i}=this.props;return(t||this.shouldShowLiteUpsell())&&(Object(g.L)(n)||Object(g.g)(n)||Object(g.Y)(n)||Object(g.ab)(n)||Object(g.z)(n)||Object(g.Q)(n)||"/unauth-profile"===i.path||"/:username"===i.path||"/:username/:slug/:section_slug"===i.path||Object(g.B)(n)||e()&&Object(g.S)(!1,n)&&!Object(g.y)(n))}),Ke(this,"setMwebHeaderHeight",e=>{e&&e.offsetHeight!==this.state.mwebHeaderHeight&&this.setState({mwebHeaderHeight:e.offsetHeight})}),Ke(this,"toggleScrolledPastMainContent",e=>{this.setState({hasScrolledPastMainContent:e})}),Ke(this,"shouldShowLiteUpsell",()=>{const{activeExperiments:e,country:t,platform:n,userAgent:i}=this.props;return Object(j.e)({country:t,platform:n,userAgent:i,upsellLiteAppExp:((null==e?void 0:e.mweb_targeted_lite_app_upsell)||"").startsWith("enabled")})}),Ke(this,"headerHeight",e=>{const{interstitialUpsellDismissed:t,location:n}=this.props,{isClientMounted:i,mwebHeaderHeight:o}=this.state;return i&&e&&Object(g.x)(n)&&!t&&o||0})}componentDidMount(){const{country:e,fetchExperiencesForPlacements:t,isBot:n,location:i,setLoggedOutUserInfo:o,showUnauthToastUpsell:a,unauthId:r}=this.props;this.setState({isClientMounted:!0});if((i.search||"").includes("amp_client_id")&&Object(u.a)("amp_duplo_redirect"),!n){t([1000180]),Object(Pe.f)().then(e=>{o(e)},e=>{o()});let e=Ve();!e||e.count<1||!e.time?(e={count:1,time:0},et(e)):(new Date).getTime()-e.time>6e5&&(e={...e,count:e.count+1},et(e)),Object(m.e)({event_type:7686,view_type:51,aux_data:{unauth_revisitation:e.count,unauth_previously_logged_out:s.a("fba")}}),window.addEventListener("unload",()=>{var e,t;et({count:null!==(e=null===(t=Ve())||void 0===t?void 0:t.count)&&void 0!==e?e:1,time:(new Date).getTime()})})}Object(qe.a)(e)&&Object(Ne.a)({id:Ae.h,eventName:"Mobile"}),Object(qe.f)(e)&&Object(Ne.e)({id:"flashtalking-m-ses",eventName:"Mobile"}),Object(qe.c)(e)&&r&&Object(Ne.l)({unauthId:r}),Object(qe.d)(e)&&r&&Object(Ne.m)({unauthId:r}),Ze()&&Object(I.c)("openUnauthType",$e.m),a()}static getDerivedStateFromProps(e,t){const{isGoogleOneTapShown:n,location:i,referrer:o,showWashOnly:s,fbSocialUpsellDismissed:a}=t,{location:r,isMobileSignupModalShown:c,mobileSignupModalDispatch:l}=e;let d={};if(e.isGoogleOneTapShown!==t.isGoogleOneTapShown&&(d={...d,isGoogleOneTapShown:e.isGoogleOneTapShown}),e.referrer!==t.referrer&&(d={...d,referrer:e.referrer}),e.location!==t.location&&(d={...d,location:e.location}),!i)return d;if(n!==e.isGoogleOneTapShown&&(d={...d,shouldShowGoogleOneTap:e.isGoogleOneTapShown}),!Object(Ce.f)(i,r)&&!tt(r.pathname)){l&&Object(E.a)(r);!(null==l||!l({type:"UNAUTH_ROUTE_CHANGED",oldLocation:i,newLocation:r,referrer:o}))&&!a&&(d={...d,fbSocialUpsellDismissed:!0})}d={...d,showWashOnly:e.isGoogleOneTapShown&&!!c&&!s};return!Object(Ce.f)(i,r)&&e.deprecatedIsSignupModalShown&&Object(Ce.g)(r,i)&&e.hideSignupModal(),d}render(){const{children:e,deviceType:t,experience:n,inAutologinRefactorTreatment:o,interstitialUpsellDismissed:s,locale:c,location:l,activateMwebUnauthRelaxSharedInviteModalUpsellExp:d,activateMwebConsistentUnauthHeader:u,platform:p,showDesktopSignupModal:j}=this.props,{hasScrolledPastMainContent:m,isScrollControllerDisplayed:f,shouldShowGoogleOneTap:O,fbSocialUpsellDismissed:_,showWashOnly:w}=this.state,x=this.appInstallBannerIsEnabled(),y="desktop"!==t&&x&&!Ze()&&(!(c.includes("ar")&&"ios"===p)||this.shouldShowLiteUpsell()),S=y&&!s,T=!!Object(ve.l)(l.search).invite_code,C=Object(I.a)("isStoryPin"),k=S&&!(T&&C&&d().anyEnabled),E=this.headerHeight(x),{isBot:L,isMobileSafari:P}=this.props,B=!L&&P&&(Object(g.c)(l)||Object(g.z)(l)||Object(g.L)(l)||Object(g.g)(l))&&!Object(I.a)(Fe,!1),D="phone"===t?u().anyEnabled?y:S:!Object(g.Q)(l)&&!Object(g.B)(l)&&!Object(g.S)(!1,l);return Object(b.jsx)(h.f,{children:Object(b.jsxs)(v.a,{value:{headerHeight:E,hasScrolledPastMainContent:m,setHasScrolledPastMainContent:this.toggleScrolledPastMainContent},children:[D&&("tablet"===t||!tt(l.pathname))&&("phone"===t?Object(b.jsx)(N,{isShowing:f,setRef:this.setMwebHeaderHeight,showLiteUpsell:this.shouldShowLiteUpsell()}):Object(b.jsx)(M,{showDesktopSignupModal:j&&(e=>j(e,{source:"login"===e?"login":"defaultSource",container:De.m}))})),k&&Object(b.jsx)(A,{showLiteUpsell:this.shouldShowLiteUpsell()}),Object(b.jsx)(h.f,{dangerouslySetInlineStyle:{__style:{paddingTop:E}},id:"mweb-unauth-container",children:e}),o?Object(b.jsx)(a.a,{name:"SafeSuspense_UnauthPageWrapper_AutologinManager",children:Object(b.jsx)(r.a,{children:Object(b.jsx)(Qe,{})})}):Object(b.jsxs)(i.Fragment,{children:[Object(b.jsx)(a.a,{name:"SafeSuspense_UnauthPageWrapper_AutoLogin",children:Object(b.jsx)(r.a,{children:Object(b.jsx)(Je,{crossDomain:!0,fb:!0,google:!0,history:this.props.history,location:this.props.location,smartlock:!0})})}),!O||Object(g.G)(l)||Object(g.w)(l)||Object(g.p)(l)?null:Object(b.jsx)(a.a,{name:"SafeSuspense_UnauthPageWrapper_GoogleOneTap",children:Object(b.jsx)(r.a,{children:Object(b.jsx)(Xe,{handleEmptyCredentials:()=>{Object(me.f)()},handleLoginError:()=>{Object(me.f)()},handleSignupError:()=>{Object(me.f)()}})})})]}),B&&Object(b.jsx)(He,{}),"desktop"!==t&&Object(b.jsx)(Ie,{appInstallBannerIsEnabled:x,experience:n,fbSocialUpsell:{dismissed:_,dismiss:()=>this.setState({fbSocialUpsellDismissed:!0})},shouldShowGoogleOneTap:O,shouldShowLiteUpsell:this.shouldShowLiteUpsell,showWashOnly:w,toggleSignupScrollControllerDisplay:e=>this.setState({isScrollControllerDisplayed:e})})]})})}}function it({children:e,showDesktopSignupModal:t}){const n=Object(B.a)(),a=Object(o.useDispatch)(),r=Object(f.h)(),c=Object(f.i)(),l=Object(Ye.b)(),d=Object(f.k)(),{anyEnabled:h}=Object(S.a)("mweb_lex_autologin_refactor_aa")(),p=Object(o.useSelector)(e=>"Mobile Safari"===e.session.browser),g=Object(S.a)("mweb_unauth_relax_shared_invites_modal_upsell2"),j=Object(S.a)("mweb_unauth_consistent_header");Object(i.useEffect)(()=>{l&&setTimeout(()=>{l.load(new URL("login.js","file://"))},500)},[]);const m=Object(o.useSelector)(e=>e.experiments.active),O=Object(o.useSelector)(e=>e.session.country),_=Object(o.useSelector)(e=>e.session.canUseNativeApp&&"android-twa"!==e.session.pwaType),w=Object(o.useSelector)(e=>e.session.locale),x=Object(o.useSelector)(e=>e.session.userAgentPlatform),y=Object(o.useSelector)(e=>e.session.isSeoBot),v=Object(o.useSelector)(e=>e.session.unauthInterstitialDismissed),T=Object(o.useSelector)(e=>e.session.isSignupModalShown),C=Object(o.useSelector)(e=>e.session.isGoogleOneTapShown),k=Object(o.useSelector)(e=>e.session.referrer),I=Object(Be.b)(k),L=Object(o.useSelector)(e=>e.session.unauthId),A=Object(o.useSelector)(e=>e.session.socialCollabGroupBoardPath),P=Object(o.useSelector)(e=>e.session.userAgent),D=Object(o.useSelector)(e=>e.session.unauthSavePinId),M=Object(i.useCallback)(()=>a(Object(me.k)()),[a]),R=Object(i.useCallback)(e=>a(Object(me.t)(e)),[a]),U=Object(i.useCallback)(e=>a(Object(me.x)(e)),[a]),z=Object(i.useCallback)(()=>a(Object(me.o)()),[a]),F=Object(i.useCallback)(()=>a(Object(me.P)()),[a]),G=Object(i.useCallback)(()=>a(Object(me.f)()),[a]),H=Object(i.useCallback)(e=>a(Object(Y.h)(e)),[a]),N=Object(i.useCallback)(()=>(a(Object(Le.a)("mweb_app_install_banner_along_registration"))||"").startsWith("enabled"),[a]),W=Object(fe.b)(),q=Object(fe.c)();Object(i.useEffect)(()=>{const e=c&&c.search?Object(ve.l)(c.search):"";e&&"1"===e.ur&&(null==q||q({type:"START_DISMISSIBLE_MODAL_EXPERIENCE"}))},[q,c]),Object(i.useEffect)(()=>{q&&Object(E.a)(c)},[]);const $=Object(Me.b)({id:1000180});return Object(i.useEffect)(()=>{Object(u.l)("mweb.unauth_seo.referrer",{referrer:k,docReferrer:document.referrer,cookieReferrer:s.a("_pinterest_referrer")})},[k]),Object(b.jsx)(nt,{activeExperiments:m,appInstallBannerAlongRegister:N,canUpsellNativeApp:_,country:O,deviceType:n,experience:$,fetchExperiencesForPlacements:H,hideGoogleOneTap:G,hideSignupModal:M,hideUnauthToastUpsell:z,history:r,interstitialUpsellDismissed:v,inAutologinRefactorTreatment:h,isBot:y,isGoogleOneTapShown:C||!1,deprecatedIsSignupModalShown:T||!1,loader:l,locale:w,location:c,platform:x,referrer:I,routeMatch:d,setLoggedOutUserInfo:R,setSessionData:U,showDesktopSignupModal:t,showUnauthToastUpsell:F,socialCollabGroupBoardPath:A,userAgent:P,showUnauthSaveSignupModal:!!D,isMobileSignupModalShown:W,mobileSignupModalDispatch:q,unauthId:L,activateMwebUnauthRelaxSharedInviteModalUpsellExp:g,activateMwebConsistentUnauthHeader:j,isMobileSafari:p,children:e})}},"1Qfp":function(e,t,n){var i=n("q1tI");t.a=()=>{const[e,t]=Object(i.useState)(!1);return Object(i.useEffect)(()=>{t(!0)},[]),e}},"2hay":function(e,t,n){n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return r})),n.d(t,"g",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return u})),n.d(t,"i",(function(){return h})),n.d(t,"h",(function(){return b})),n.d(t,"c",(function(){return p}));var i=n("0K1N"),o=n("37no");const s="274266067164",a=["picture.type(large)","id","first_name","last_name","email","gender","birthday"],r=["public_profile","email","user_birthday","user_friends"],c=()=>{"undefined"!=typeof window&&window.FB&&window.FB.init({appId:s,status:!0,xfbml:!0,version:"v2.7"})},l=e=>Object(o.c)(Object(i.a)(e),o.a.FACEBOOK).then(c),d=()=>new Promise(e=>{"undefined"!=typeof window&&window.FB&&window.FB.getLoginStatus(e)}),u=(e,t={},n)=>new Promise((i,o)=>{if("connected"===e.status){n&&n("success");const{authResponse:{userID:o,accessToken:s}}=e,r={facebook_id:o,facebook_token:s,facebook_autologin:t.autologin||!1},c="/me?fields="+a.join(",");window.FB.api(c,e=>{i({creds:r,data:{...e,...r,...e.picture&&!e.picture.data.is_silhouette?{image_url:e.picture.data.url}:{}}})})}else{const t=e.status||"unknown";n&&n("failure."+t),o({status:t})}}),h=(e,t)=>{const n=e.data;e.isTrusted&&"string"==typeof n&&0===n.indexOf("_FB_")&&-1!==n.indexOf("type=login_button_dialog_open")&&t&&t("facebook_connect.login_button_dialog_open")},b=()=>new Promise(e=>{window.FB.login(e,{scope:r.join(",")})}).then(u),p=e=>new Promise((t,n)=>{window.FB.api("/me/permissions",i=>{const o=i.data;if(o){const n=o.find(t=>t.permission===e&&"granted"===t.status);return t({hasPerm:!!n})}return n(Error("Failed to call facebook to get permission"))})})},"37no":function(e,t,n){n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return r}));var i=n("7w6Q");const o=.01,s=Object.freeze({OTHER:0,FACEBOOK:1,GPLUS_ONE:2,GSI:3});function a(e){return new Promise((t,n)=>{if(document.querySelector(`script[src="${e}"]`))return void t();const i=document.createElement("script");i.src=e,i.async=!0,i.addEventListener("load",t),i.addEventListener("error",n),document.getElementsByTagName("head")[0].appendChild(i)})}function r(e,t=s.OTHER,n=!1){const a=n?"web":"mweb";return new Promise((n,r)=>{if(document.querySelector(`script[src="${e}"]`)){let e=0;if(t===s.GPLUS_ONE)if(window.gapi)n();else{const t=setInterval(()=>{window.gapi||20===e?(clearInterval(t),n()):(e+=1,i.a.increment(`${a}.loadScript.gplus_one.tries_${e}`,o))},100)}else if(t===s.FACEBOOK)if(window.FB)n();else{const t=setInterval(()=>{window.FB||20===e?(clearInterval(t),n()):(e+=1,i.a.increment(`${a}.loadScript.facebook.tries_${e}`,o))},100)}else if(t===s.GSI)if(window.google)n();else{const t=setInterval(()=>{window.google||20===e?(clearInterval(t),n()):(e+=1,i.a.increment(`${a}.loadScript.gsi.tries_${e}`,o))},100)}else n()}else{const t=document.createElement("script");t.src=e,t.async=!0,t.addEventListener("load",n),t.addEventListener("error",r),document.getElementsByTagName("head")[0].appendChild(t)}})}},"4NNh":function(e,t,n){n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return s}));n("kmwA");const i="https://accounts.google.com/gsi/client",o=e=>{e&&e.cancelLastOperation&&e.cancelLastOperation().then(()=>{})},s=e=>{return JSON.parse(decodeURIComponent(atob((t=e.split(".")[1],(t||"").replace(/-/g,"+").replace(/_/g,"/"))).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")));var t}},"4NbJ":function(e,t,n){n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"f",(function(){return b})),n.d(t,"e",(function(){return p})),n.d(t,"b",(function(){return g}));var i=n("kmwA"),o=n("bKKl"),s=n("37no"),a=n("nKUr");const r="postmessage",c="profile email",l=e=>Object(s.c)("https://accounts.google.com/gsi/client",s.a.GSI).then(()=>{const t=window.google,n=t&&t.accounts&&t.accounts.id;return n?new Promise((t,o)=>{n.initialize({client_id:i.a.settings.GPLUS_CLIENT_ID,auto_select:!0,callback:n=>e({resolve:t,reject:o,response:n}),cancel_on_tap_outside:!1,context:"use"}),n.prompt()}):Promise.reject(new Error("no_account_found"))});function d(e){const t={scope:c,client_id:"694505692171-31closf3bcmlt59aeulg2j81ej68j6hk.apps.googleusercontent.com",app_package_name:"com.pinterest",access_type:"offline",cookie_policy:"single_host_origin"},n=function(t){e&&e(t)};return new Promise((e,i)=>{Object(s.c)("https://apis.google.com/js/client:platform.js",s.a.GPLUS_ONE).then(()=>{n("google_script_load"),"undefined"!=typeof window&&window.gapi?window&&window.gapi&&window.gapi.auth2?(n("google_script_init_onuse"),window.gapi.auth2.init(t).then(t=>{n("google_init_success"),e(t)},({error:e})=>{n("google_init_error"),i("init_onuse_"+e)})):(n("google_script_init_exists"),window.gapi.load("auth2",{callback:()=>{n("google_auth2_load_complete"),window.gapi.auth2.init(t).then(t=>{n("google_init_success"),e(t)},({error:e})=>{n("google_init_error"),i("init_exists_"+e)})},onerror:({error:e})=>{n("google_auth2_script_load_error"),i(e)},timeout:15e3,ontimeout:()=>{n("google_auth2_script_load_timeout"),i("timeout")}})):n("google_init_error")})})}function u(e,t,n,i=!1){return function(e,t,n,i=!1){return new Promise((s,a)=>{if(i&&Object(o.a)())return void a();const l=function(e){n&&n(e)};l("google_button_init"),d(n).then(()=>{l("google_sdk_load"),"undefined"!=typeof window&&window.gapi?t.signin2.render(e,{scope:c,onsuccess:e=>{l("google_button_success");const t=e.getAuthResponse(!0),n={data:{gplus_id_token:t.id_token,gplus_access_token:t.access_token,gplus_expires_at:t.expires_at,gplus_autologin:i||!1},signupOptions:{gplus_code:"",gplus_id_token:t.id_token,gplus_redirect_uri:r}};s(n)},onfailure:()=>{l("google_button_failure"),a("gapi_signin2_render_error")}}):l("google_init_error")},e=>{l("google_auth2_sdk_init_error"),a(e)})})}(e,t,n,i)}function h(){if("undefined"==typeof window)return null;const e=window.google;return e&&e.accounts&&e.accounts.id}function b(e,t){if("undefined"==typeof window)return;const n=h();if(n&&e.current){const t=e.current.offsetWidth;n.renderButton(e.current,{size:"large",shape:"pill",text:"continue_with",theme:"outline",width:t+"px"})}else t("not_initialized")}function p(e,t,n,o){Object(s.b)("https://accounts.google.com/gsi/client").then(()=>{if("undefined"==typeof window)return;const s=h();s&&(s.initialize({client_id:i.a.settings.GPLUS_CLIENT_ID,callback:n,cancel_on_tap_outside:!1,context:"use",itp_support:o}),b(e,t))})}function g({size:e}){return Object(a.jsx)("svg",{height:e,viewBox:"0 0 512 512",width:e,xmlns:"http://www.w3.org/2000/svg",children:Object(a.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[Object(a.jsx)("path",{d:"M482.56 261.36c0-16.73-1.5-32.83-4.29-48.27H256v91.29h127.01c-5.47 29.5-22.1 54.49-47.09 71.23v59.21h76.27c44.63-41.09 70.37-101.59 70.37-173.46z",fill:"#4285f4"}),Object(a.jsx)("path",{d:"M256 492c63.72 0 117.14-21.13 156.19-57.18l-76.27-59.21c-21.13 14.16-48.17 22.53-79.92 22.53-61.47 0-113.49-41.51-132.05-97.3H45.1v61.15c38.83 77.13 118.64 130.01 210.9 130.01z",fill:"#34a853"}),Object(a.jsx)("path",{d:"M123.95 300.84c-4.72-14.16-7.4-29.29-7.4-44.84s2.68-30.68 7.4-44.84V150.01H45.1C29.12 181.87 20 217.92 20 256c0 38.08 9.12 74.13 25.1 105.99l78.85-61.15z",fill:"#fbbc05"}),Object(a.jsx)("path",{d:"M256 113.86c34.65 0 65.76 11.91 90.22 35.29l67.69-67.69C373.03 43.39 319.61 20 256 20c-92.25 0-172.07 52.89-210.9 130.01l78.85 61.15c18.56-55.78 70.59-97.3 132.05-97.3z",fill:"#ea4335"}),Object(a.jsx)("path",{d:"M20 20h472v472H20V20z"})]})})}},"75Yz":function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var i=n("q1tI"),o=n("eOdZ");const s={};class a extends i.Component{constructor(...e){var t,n,i;super(...e),t=this,n="state",i={invite:s[this.props.invite_code]||null,loaded:this.props.invite_code in s},n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i}componentDidMount(){const{invite_code:e}=this.props;o.d.create("InviteCodeMetadataResource",{invite_code:e}).callGet().then(t=>{if(t&&t.resource_response){const n=t.resource_response.data;s[e]=n,this.setState({invite:n,loaded:!0})}}).catch(()=>{this.setState({invite:null,loaded:!0})})}render(){const{invite:e,loaded:t}=this.state;return t?this.props.children(e):null}}},"B/oJ":function(e,t,n){n.d(t,"b",(function(){return p})),n.d(t,"a",(function(){return j}));var i=n("q1tI"),o=n("/MKj"),s=n("9Hil"),a=n("CpRl"),r=n("k1Bv"),c=n("o+5w"),l=n("yweb"),d=n("ulr2"),u=n("PmFr"),h=n("n6mq"),b=n("nKUr");const p=e=>new Set([...u.c,...u.b,...u.p]).has(e),g={default:3e3,email:3e3,facebook:5e3,google:4e3,gtap:4500};function j({isReducedHeader:e,platform:t}){const n=Object(l.c)(),u=Object(o.useDispatch)(),j=Object(o.useSelector)(({session:e})=>e.country);Object(i.useEffect)(()=>{"gtap"!==t&&u(Object(d.f)())},[]);const m=p(j);return Object(b.jsx)(i.Fragment,{children:m?Object(b.jsx)(c.a,{viewType:10,viewParameter:259,children:Object(b.jsxs)(h.f,{position:"fixed",top:!0,left:!0,right:!0,bottom:!0,width:"100%",color:"white",children:[Object(b.jsx)(s.a,{color:"darkGray",duration:g[t],finalProgress:95}),Object(b.jsxs)(h.u,{alignItems:"stretch",justifyContent:"start",direction:"column",height:"100%",children:[Object(b.jsxs)(h.f,{margin:10,children:[Object(b.jsx)(h.v,{overflow:"normal",size:e?"md":"lg",children:n._("Your account is being created!","account created heading","account created heading")}),Object(b.jsx)(h.cb,{overflow:"normal",children:n._("You can now save ideas, get personalized recommendations, and more","loading state description while waiting for any sign up registration to complete","loading state description while waiting for any sign up registration to complete")})]}),Object(b.jsx)(h.u,{alignItems:"center",flex:"grow",justifyContent:"center",children:Object(b.jsx)(a.a,{delayOffset:-5,xRadiusAdjustment:40,yRadiusAdjustment:40,children:Object(b.jsx)(h.f,{alignItems:"center",color:"lightWash",direction:"column",display:"flex",height:120,justifyContent:"end",overflow:"hidden",rounding:"circle",width:120,children:Object(b.jsx)(h.w,{accessibilityLabel:n._("Loading","Loading state for any sign up registration","Loading state for any sign up registration"),color:"gray",icon:"person",size:"90"})})})})]})]})}):Object(b.jsx)(r.a,{})})}},CpRl:function(e,t,n){var i=n("q1tI"),o=n("ihsa"),s=n("n6mq"),a=n("4lNu");const r={yellow:"#FAB904",orange:"#FF6400",green:"#0FA573",blue:"#0074e8",purple:"#B469EB"},c="DelightfulBubbles__",l=["DelightfulBubbles__fadeIn {\n  to {\n    opacity: 1;\n  }\n}\n","DelightfulBubbles__growShrink {\n  0% {\n    transform: scale(0);\n  }\n  50% {\n    transform: scale(1);\n  }\n  100% {\n    transform: scale(0);\n  }\n}\n","DelightfulBubbles__swirl {\n  0% {\n    transform: rotate(0deg) translateX(-50%);\n  }\n  100% {\n    transform: rotate(-360deg) translateX(-50%);\n  }\n}\n",...Object.keys(r).map(e=>{const t=((e,t)=>{const n=e.length,i=e.indexOf(t)+1>=n?0:e.indexOf(t)+1;return e[i]})(Object.keys(r),e);return`${c}colorChange_${e} {\n      0% {\n        background-color: ${r[e]};\n      }\n      50% {\n        background-color: ${r[t]};\n      }\n    }\n    `})],d=Object(a.a)(l);var u=n("nKUr");function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b=e=>{const{delay:t,diameter:n,height:i,initialColor:o,width:a,xOffset:l,yOffset:d}=e,h=((e,t,n,i,o,s,a,l)=>({bubblePositionStyles:{position:"absolute",marginLeft:s/2-o+"px",marginTop:n/2-o+"px",left:a+"px",top:l+"px"},bubbleSwirlStyles:{animation:`${c}swirl 6s ease-in-out ${e}s infinite forwards`,WebkitAnimation:`${c}swirl 6s ease-in-out ${e}s infinite forwards`},bubbleGrowShrinkStyles:{transform:"scale(0)",WebkitTransform:"scale(0)",animation:`${c}growShrink 6s ease-in-out ${e}s infinite alternate`,WebkitAnimation:`${c}growShrink 6s ease-in-out ${e}s infinite alternate`},bubbleShapeStyles:{height:t+"px",width:t+"px",borderRadius:"50%",backgroundColor:r[i],opacity:0,animation:`${c}colorChange_${i} 12s steps(1, start) ${e}s infinite forwards,\n      ${c}fadeIn 3s linear ${e}s 1 forwards`,WebkitAnimation:`${c}colorChange_${i} 12s steps(1, start) ${e}s infinite forwards,\n      ${c}fadeIn 3s linear ${e}s 1 forwards`}}))(t,n,i,o,Math.floor(n/2),a,l,d);return Object(u.jsx)(s.f,{dangerouslySetInlineStyle:{__style:h.bubblePositionStyles},children:Object(u.jsx)(s.f,{dangerouslySetInlineStyle:{__style:h.bubbleSwirlStyles},children:Object(u.jsx)(s.f,{dangerouslySetInlineStyle:{__style:h.bubbleGrowShrinkStyles},children:Object(u.jsx)(s.f,{dangerouslySetInlineStyle:{__style:h.bubbleShapeStyles}})})})})};class p extends i.Component{constructor(...e){super(...e),h(this,"state",{isInitialized:!1})}componentDidMount(){this.requestAnimationFrameId=window.requestAnimationFrame(()=>{this.setState({isInitialized:!0})})}shouldComponentUpdate(e,t){return!e.numBubbles===this.props.numBubbles||!t.isInitialized===this.state.isInitialized}getSize(){const{width:e,height:t}=this.props;return void 0!==e&&void 0!==t?{width:e,height:t}:this.containerElement?{height:this.containerElement.offsetHeight,width:this.containerElement.offsetWidth}:{height:void 0,width:void 0}}createBubbles(e,t){const{bubbleSize:n,delayFactor:i,delayOffset:o,numBubbles:s,xRadiusAdjustment:c,yRadiusAdjustment:l}=this.props,d=e+2*l,h=t+2*c,p=[],g=Object.keys(r);for(let r=0;r<s;r+=1){const s=n+Object(a.c)(-4,4),c=g[r%g.length],{x:l,y:j}=Object(a.b)(d,h);p.push(Object(u.jsx)(b,{delay:r*i+o,diameter:s,initialColor:c,xOffset:l,yOffset:j,height:e,width:t},r))}return p}render(){const{height:e,width:t}=this.getSize();return Object(u.jsxs)(s.f,{height:e,width:t,position:"relative",children:[Object(u.jsx)(o.a,{unsafeCSS:d}),Object(u.jsxs)(s.f,{position:"absolute",ref:e=>this.containerElement=e,children:[this.state.isInitialized&&this.createBubbles(e||0,t||0),Object(u.jsx)(s.f,{position:"relative",children:this.props.children})]})]})}}h(p,"defaultProps",{bubbleSize:16,numBubbles:10,xRadiusAdjustment:0,yRadiusAdjustment:0,delayFactor:1,delayOffset:0});t.a=p},Hgxh:function(e,t,n){n.d(t,"a",(function(){return r}));var i=n("mp1x"),o=n("yweb"),s=n("n6mq"),a=n("nKUr");function r({type:e,onDismiss:t}){const n=Object(o.c)(),r="facebook"===e?n._("Oops! Facebook isn't available","socialAuthDisabled.facebook.title","Title for the modal shown when Facebook services are not working"):n._("Oops! Google isn't available","socialAuthDisabled.google.title","Title for the modal shown when Google services are not working"),c="facebook"===e?n._("Looks like Facebook isn't available right now.\n\nGive another option a try or refresh the page and try again later.","socialAuthDisabled.facebook.description","Description for the modal shown when Facebook services are not working"):n._("Looks like Google isn't available right now.\n\nGive another option a try or refresh the page and try again later.","socialAuthDisabled.google.description","Description for the modal shown when Google services are not working");return Object(a.jsx)(i.a,{accessibilityCloseIconLabel:n._("Close","Close modal window","Close modal window"),hideCloseIcon:!0,isOpen:!0,onDismiss:t,type:"social_auth_disabled_modal",children:Object(a.jsxs)(s.f,{padding:2,children:[Object(a.jsx)(s.f,{marginBottom:3,children:Object(a.jsx)(s.v,{size:"md",accessibilityLevel:1,children:r})}),Object(a.jsx)(s.f,{marginBottom:3,children:Object(a.jsx)(s.cb,{children:c})}),Object(a.jsx)(s.u,{alignItems:"stretch",justifyContent:"start",direction:"column",children:Object(a.jsx)(s.f,{paddingY:1,children:Object(a.jsx)(s.g,{accessibilityLabel:n._("OK","socialAuthDisabled.okButton","Button that closes modal shown when Facebook or Google services are not working"),size:"lg",color:"red",text:n._("OK","socialAuthDisabled.okButton","Button that closes modal shown when Facebook or Google services are not working"),onClick:t})})})]})})}},IAo4:function(e,t,n){n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a}));const i=/^(0[1-9]|1[012])\/(0[1-9]|[12][0-9]|3[01])\/((19|20)[0-9]{2})$/,o=/^(19|20)[0-9]{2}$/,s=e=>{if(i.test(e)||o.test(e)){return new Date(e).getTime()/1e3}return-1},a=(e,t)=>{const n=new Date;if(i.test(e)){const i=new Date(n.getFullYear()-t,n.getMonth(),n.getDate());return new Date(e)<=i}if(o.test(e)){const i=n.getFullYear()-t-1;return new Date(e).getFullYear()<=i}return!1}},J6c4:function(e,t,n){n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));const i=["-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto","Oxygen-Sans","Ubuntu","Cantarell",'"Fira Sans"','"Droid Sans"','"Helvetica Neue"',"Helvetica",'"ヒラギノ角ゴ Pro W3"','"Hiragino Kaku Gothic Pro"',"メイリオ","Meiryo",'"ＭＳ Ｐゴシック"',"Arial","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"'].join(","),o=["-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto","Oxygen-Sans","Ubuntu","Cantarell",'"Fira Sans"','"Droid Sans"','"Helvetica Neue Bold"',"Helvetica",'"ヒラギノ角ゴ Pro W3"','"Hiragino Kaku Gothic Pro"',"メイリオ","Meiryo",'"ＭＳ Ｐゴシック"',"Arial","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"'].join(",")},MH4Q:function(e,t,n){n.d(t,"a",(function(){return I}));var i=n("q1tI"),o=n("/MKj"),s=n("clxp"),a=n("jZDM"),r=n("28DW"),c=n("yweb"),l=n("n6mq"),d=n("QAzJ"),u=n("pLLR"),h=n("EC67"),b=n("F2ZA"),p=n("nKUr");function g({isDesktop:e}){const t=Object(c.c)(),n=Object(h.k)(),{country:i,isAuthenticated:o,isBot:s,locale:g,origin:j}=Object(u.d)(),m=Object(a.a)(j,!0).hostname||"",f=s?Object(b.f)(m)||"US":i,O=Object(b.h)(f,g),_=Object(d.a)("mweb_jp_bug_audit_unauth"),w=[];O&&w.push({text:t._("Today","unauth.header.tabs.today","label for today tab"),href:"/today/"}),w.push({text:!o&&_().anyEnabled?t._("Explore ideas","unauth.header.tabs.ideas.jp","label for jp ideas hub"):t._("Explore","unauth.header.tabs.ideas","label for ideas hub"),href:"/ideas/"});let x=-1;return n.path.startsWith("/today/")?x=w.findIndex(e=>"/today/"===e.href):n.path.startsWith("/ideas/")&&(x=w.findIndex(e=>"/ideas/"===e.href)),Object(p.jsx)(l.Z,{activeTabIndex:x,onChange:({activeTabIndex:t})=>{"/today/"===w[t].href?Object(r.a)("unauth.header.hubtabs.today.click"):"/ideas/"===w[t].href&&Object(r.a)("unauth.header.hubtabs.explore.click"),e&&(window.location.href=w[t].href)},tabs:w})}var j=n("rYoy"),m=n("GI6b"),f=n("TPPM"),O=n("E8d4"),_=n("XTA5"),w=n("+b91"),x=n("Zswh"),y=n("Rfw2");function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const v=Object(i.lazy)(()=>n.e(471).then(n.bind(null,"ehTd")));function T({pathname:e,search:t}){const n=e.includes("/password/reset");if(!t||n)return"";const i=t.substring(1);try{const e=JSON.parse('{"'+i.replace(/&/g,'","').replace(/=/g,'":"')+'"}',(e,t)=>""===e?t:decodeURIComponent(t));if(e.q)return e.q}catch(o){return""}return""}class C extends i.PureComponent{constructor(e){super(e),S(this,"onResize",()=>{this.setState({windowHeight:window.innerHeight})}),S(this,"handleTypeaheadItemHover",e=>{this.setState({hoverItem:e})}),S(this,"handleTypeaheadItemSelected",(e,t)=>{const n=Object(y.e)(t),i=e.query||"";let o=e.url;if(o){const t={eq:n,etslf:Date.now()-this._lastFocused};o=Object(m.a)(o,t);const s=e.type,a=Object(y.d)({type:s,query:i,index:e.resultIndex});this.setState({focused:!1,hoverItem:void 0,text:i,query:i}),o+=Object(y.b)({queryStates:a}),this.navigate(i,o)}}),S(this,"handleTypeaheadMouseOut",()=>{this.setState({hoverItem:void 0})}),S(this,"handleBlur",()=>{this.props.onBlur&&this.props.onBlur(),this.setState({focused:!1})}),S(this,"handleClick",()=>{this.setState({focused:!0})}),S(this,"handleFocus",()=>{Object(r.a)("unauth.search_box.click.focus"),Object(r.h)("focus_search_box",!0),this._lastFocused=Date.now(),this.setState({focused:!0})}),S(this,"handleKeyDown",e=>{const t=this.state.hoverItem;switch(e.key){case"Enter":this.handleSubmit(e);break;case"Escape":this.handleBlur();break;case"ArrowUp":case"ArrowDown":e.preventDefault();const n="ArrowUp"===e.key,i=this.state.emptySuggestions,o=!this.state.text&&i&&i?i:this.state.typeaheadSuggestions;let s;s=t?o.indexOf(t)+(n?-1:1):n?o.length-1:0,this.handleTypeaheadItemHover(o[s])}}),S(this,"handleSubmit",e=>{e.preventDefault(),this.state.hoverItem?this.handleTypeaheadItemSelected(this.state.hoverItem,this.state.text):this.handleTypedSubmission(e)}),S(this,"handleTypeaheadSuggestionsChange",e=>{this.setState({typeaheadSuggestions:e})}),S(this,"handleTypedSubmission",e=>{const t=this.state.text.trim();if(""===t)return;const n=encodeURIComponent(t),i=this.state.currentScope||"pins";let o="recent_week"===this.state.currentBoost?"/search/pins/recent/?q="+n:`/search/${i}/?q=${n}`;const s=Object(y.d)({type:y.a.USER_INPUT,query:t,index:0});o+="&rs=typed",o+=Object(y.b)({queryStates:s});const a=Object(y.e)(t);this.setState({text:a,query:a}),this.handleBlur(),this.navigate(t,o)}),S(this,"handleTextChange",e=>{this.state.hoverItem?this.setState({hoverItem:void 0,text:e}):this.setState({text:e})}),S(this,"updateEmptySuggestions",e=>{this.setState({emptySuggestions:e})}),S(this,"clearAndFocusSearchBox",()=>{this.setState({text:"",query:"",focused:!0})});const t=T(e.location);this.state={currentBoost:"",currentScope:"",emptySuggestions:[],focused:!!e.initialFocus,hoverItem:void 0,prevOriginalQuery:e.initialText||t,query:t,text:t||e.initialText||"",typeaheadSuggestions:[],windowHeight:void 0}}componentDidMount(){this.onResize(),window.addEventListener("resize",this.onResize)}static getDerivedStateFromProps({initialText:e,location:t},{prevOriginalQuery:n}){const i=e||T(t);return i!==n?{prevOriginalQuery:i,currentBoost:"",text:i,query:i,currentScope:"",hoverItem:void 0}:{}}componentWillUnmount(){window.removeEventListener("resize",this.onResize)}logSearchPinNavigateClick(){this.props.logContextEvent({component:43,element:227,event_type:101,view_type:2,view_parameter:43}),Object(r.a)("unauth.search_box.search")}navigate(e,t){this.logSearchPinNavigateClick(),Object(f.a)(t,!1),setTimeout(()=>{Object(r.h)("searchbox_query",!0)},0)}render(){const{headerOffsetTop:e,i18n:t}=this.props,{focused:n,hoverItem:i,query:o,text:a,windowHeight:r}=this.state,c=n&&o?"":t._("Search for easy dinners, fashion, etc.");let d;if(r&&this._form&&this._form.getBoundingClientRect){d=r-14-this._form.getBoundingClientRect().bottom}const u=I+e;return Object(p.jsx)(l.u,{alignItems:"stretch",justifyContent:"start",flex:"grow",children:Object(p.jsxs)(l.u,{alignItems:"stretch",justifyContent:"start",flex:"grow",children:[n&&Object(p.jsx)(l.f,{position:"fixed",right:!0,bottom:!0,left:!0,dangerouslySetInlineStyle:{__style:{backgroundColor:"rgba(0,0,0,0.4)",top:u+"px"}}}),Object(p.jsx)("form",{action:"/search/pins/",method:"get",name:"search",onSubmit:this.handleSubmit,ref:e=>{this._form=e},style:{flexGrow:"1"},children:Object(p.jsxs)(l.f,{display:"block",position:"relative",width:"100%",children:[Object(p.jsxs)(l.f,{alignItems:"center",borderStyle:"lg",color:"white",display:"flex",height:48,position:"relative",rounding:6,children:[Object(p.jsx)("em",{}),Object(p.jsx)(l.f,{flex:"none",marginStart:4,marginEnd:2,children:Object(p.jsx)(l.w,{accessibilityLabel:t._("search","accessible label for search icon","accessible label for search icon"),icon:"search",size:16})}),Object(p.jsxs)(l.u,{alignItems:"center",flex:"grow",justifyContent:"start",overflow:"hidden",children:[Object(p.jsx)(_.a,{dataTestId:"search-input",isFocused:n,name:"q",onBlur:this.handleBlur,onChange:this.handleTextChange,onClick:this.handleClick,onFocus:this.handleFocus,onKeyDown:this.handleKeyDown,placeholder:c,value:i&&i.label||a}),a&&Object(p.jsx)(l.f,{marginEnd:1,children:Object(p.jsx)(l.x,{accessibilityLabel:t._("cancel","accessible label for cancel icon","accessible label for cancel icon"),icon:"clear",onClick:this.clearAndFocusSearchBox,size:"md"})})]})]}),Object(p.jsx)(s.a,{name:"SafeSuspense_UnauthHeaderSearchBox_SearchTypeahead",children:Object(p.jsx)(O.a,{children:Object(p.jsx)(v,{focused:n,hoverItem:this.state.hoverItem,maxHeight:d,onHover:this.handleTypeaheadItemHover,onTypeaheadItemSelected:this.handleTypeaheadItemSelected,onTypeaheadMouseOut:this.handleTypeaheadMouseOut,onTypeaheadSuggestionsChange:this.handleTypeaheadSuggestionsChange,typeaheadSuggestions:this.state.typeaheadSuggestions,updateEmptySuggestions:this.updateEmptySuggestions,value:a})})})]})})]})})}}function k(e){const t=Object(x.a)(),n=Object(c.c)(),{headerOffsetTop:i=0}=Object(w.b)(),o=Object(h.i)();return Object(p.jsx)(C,{...e,headerOffsetTop:i,i18n:n,location:o,logContextEvent:t})}var E=n("isp9");const I=80,L=Object(i.lazy)(()=>n.e(613).then(n.bind(null,"+gsX"))),A=Object(i.forwardRef)(({enableSettingsFlyout:e,isDesktop:t,onPrimaryButtonClick:n,onLoginButtonClick:a,primaryButtonText:d},u)=>{const[b,m]=Object(i.useState)(!1),f=Object(c.c)(),O=Object(o.useSelector)(({session:e})=>e&&e.isTablet),_=Object(o.useSelector)(({session:e})=>e&&e.isMobile),w=Object(i.useRef)(null),x=Object(i.useRef)(null);Object(i.useEffect)(()=>{if(e){const e=e=>{var t,n;null!==(t=w.current)&&void 0!==t&&t.contains(e.target)||null!==(n=x.current)&&void 0!==n&&n.contains(e.target)||m(!1)};return window.addEventListener("mousedown",e),function(){window.removeEventListener("mousedown",e)}}},[]);const y=Object(h.i)(),S=!Object(o.useSelector)(({session:e})=>e&&e.isAuthenticated)&&Object(E.L)(y)&&!_;return Object(p.jsxs)(l.f,{alignItems:"center",color:"white",direction:"row",display:"flex",height:I,justifyContent:"between",padding:4,ref:u,width:"100%",children:[Object(p.jsxs)(l.u,{alignItems:"center",direction:"row",justifyContent:"start",children:[Object(p.jsx)(l.C,{href:"/",target:"self",inline:!0,tapStyle:"compress",rounding:"pill",hoverStyle:"none",onClick:({disableOnNavigation:e})=>e(),children:Object(p.jsxs)(l.f,{display:"flex",alignItems:"center",direction:"row",paddingX:3,children:[Object(p.jsx)(l.w,{accessibilityLabel:f._("Pinterest","Pinterest logo","Pinterest logo"),icon:"pinterest",size:24,color:"red"}),!O&&Object(p.jsx)(l.f,{marginStart:1,dangerouslySetInlineStyle:{__style:{letterSpacing:"-1px"}},children:Object(p.jsx)(l.v,{size:"sm",color:"red",overflow:"normal",accessibilityLevel:2,children:f._("Pinterest","Company name","Company name")})})]})}),Object(p.jsx)(g,{isDesktop:t})]}),Object(p.jsx)(l.f,{display:"none",mdDisplay:"block",flex:"grow",paddingX:2,children:Object(p.jsx)(k,{})}),Object(p.jsxs)(l.u,{alignItems:"center",direction:"row",flex:"none",justifyContent:"start",children:[Object(p.jsx)(l.f,{marginEnd:2,"data-test-id":"login-button",children:Object(p.jsx)(l.g,{text:f._("Log in","Label for log in button","Label for log in button"),onClick:e=>{a(e.event)},size:"lg",color:S?"transparent":"gray"})}),Object(p.jsx)(l.f,{"data-test-id":"signup-button",children:Object(p.jsx)(l.g,{text:d,onClick:e=>{n(e.event)},color:S?"gray":"red",size:"lg"})}),e&&Object(p.jsxs)(i.Fragment,{children:[Object(p.jsx)(l.f,{ref:x,children:Object(p.jsx)(l.f,{display:"flex",marginStart:2,marginTop:3,marginBottom:3,justifyContent:"center","data-test-id":"setting-button",children:Object(p.jsx)(l.x,{accessibilityLabel:f._("Setting button","Text for the setting button in the header","Text for the setting button in the header"),icon:"arrow-down",size:"xs",onClick:({event:e})=>{e.preventDefault(),e.stopPropagation(),Object(r.a)("unauth_web.unauth_header.setting_button.click"),Object(r.h)("click_header_setting"),m(!b)}})})}),b&&Object(p.jsx)(s.a,{name:"SafeSuspense_UnauthHeader_UnauthSettingFlyout",children:Object(p.jsx)(j.a,{fallback:Object(p.jsx)(l.f,{}),children:Object(p.jsx)(l.f,{ref:w,children:Object(p.jsx)(L,{anchor:x.current})})})})]},"settingButton")]})]})});A.displayName="UnauthHeader";t.b=A},Rfw2:function(e,t,n){n.d(t,"a",(function(){return s})),n.d(t,"e",(function(){return a})),n.d(t,"c",(function(){return r})),n.d(t,"b",(function(){return c})),n.d(t,"d",(function(){return d}));var i=n("T0g9");const o=["and","that","but","or","as","if","when","than","because","while","where","after","so","though","since","until","whether","before","although","nor","like","once","unless","now","except","the","a","an","san","for","in","with"],s={AUTO_COMPLETE_DEFAULT:"query",AUTO_COMPLETE_HASHTAG:"hashtag",AUTO_COMPLETE_RECENT_SEARCH:"recent_query",AUTO_COMPLETE_RECOMMENDED_SEARCH:"recommended_query",AUTO_COMPLETE_TRENDING:"trending",TYPO_AUTO_CORRECT_ORIGINAL:"typo_auto_original",USER_INPUT:"typed",SEARCH_GUIDE:"add_refine"};function a(e){return(e||"").trim().replace(/\s+/g," ")}function r({type:e,term:t="",index:n}){switch(e){case s.USER_INPUT:case s.AUTO_COMPLETE_HASHTAG:case s.TYPO_AUTO_CORRECT_ORIGINAL:return`${t}|${e}`;case s.AUTO_COMPLETE_DEFAULT:return`${t}|autocomplete|${n}`;case s.AUTO_COMPLETE_RECENT_SEARCH:return`${t}|recentsearch|${n}`;case s.AUTO_COMPLETE_TRENDING:return`${t}|trending|${n}`;case s.AUTO_COMPLETE_RECOMMENDED_SEARCH:return`${t}|recommended|${n}`;case s.SEARCH_GUIDE:return`${t}|guide|word|${n}`;default:return""}}function c({queryStates:e}){return 0===e.length?"":"&"+Object(i.a)({term_meta:e.map(e=>r(e))})}function l(e){if(e){const t=e.trim().split(/\s+/);return t.find(e=>o.includes(e.toLowerCase()))?[e]:t}return[]}function d({type:e,query:t="",index:n}){switch(e){case s.USER_INPUT:case s.AUTO_COMPLETE_HASHTAG:case s.TYPO_AUTO_CORRECT_ORIGINAL:return l(t).map(t=>({index:n,term:t,type:e}));case s.AUTO_COMPLETE_RECENT_SEARCH:case s.AUTO_COMPLETE_RECOMMENDED_SEARCH:case s.AUTO_COMPLETE_TRENDING:case s.AUTO_COMPLETE_DEFAULT:return l(t).map(t=>({term:t,type:e,index:n}));default:return[]}}},Wm3C:function(e,t,n){function i(e=5){const t="abcdefghijklmnopqrstuvwxyz1234567890";return new Array(e).fill("").map(()=>t[Math.floor(Math.random()*t.length)]).join("")}n.d(t,"a",(function(){return i}))},XTA5:function(e,t,n){n.d(t,"a",(function(){return c}));var i=n("q1tI"),o=n("yweb"),s=n("n6mq"),a=n("J6c4"),r=n("nKUr");function c({dataTestId:e,focusOptionId:t,isFocused:n,name:c,onBlur:l,onChange:d,onClick:u=(()=>{}),onFocus:h,onKeyDown:b,onSearchTrigger:p,placeholder:g,value:j}){const m=Object(o.c)(),f=Object(i.useRef)(null);return Object(i.useEffect)(()=>{f.current&&p&&f.current.addEventListener("searchTrigger",p)},[]),Object(i.useEffect)(()=>{if(!f.current)return;document.activeElement===f.current!==n&&(n?f.current.focus():f.current.blur())},[n]),Object(r.jsxs)(s.f,{height:"100%",flex:"grow",children:[Object(r.jsx)("input",{autoCapitalize:"off",autoCorrect:"off",autoComplete:"off","aria-activedescendant":t,"aria-autocomplete":"list","aria-controls":"SuggestionsMenu","aria-describedby":"searchBoxAccessibleText","aria-label":m._("Search","searchBox.searchInput.placeholder","placeholder text for the search box"),"aria-expanded":n,"data-test-id":e,name:c,onBlur:l,onChange:e=>{d(e.target.value)},onClick:u,onFocus:h,onKeyDown:b,placeholder:g||m._("Search","searchBox.searchInput.placeholder","placeholder text for the search box"),ref:f,role:"combobox",style:{backgroundColor:"transparent",border:"none",color:"#333",fontFamily:a.b,fontSize:16,fontWeight:"normal",height:"100%",outline:"none",padding:"0",width:"100%"},type:"text",value:j}),Object(r.jsx)(s.f,{display:"none",id:"searchBoxAccessibleText",children:m._("When autocomplete results are available use up and down arrows to\n                review and enter to select. Touch device users, explore by touch or\n                with swipe gestures.","searchBox.searchInput.accessibleText","Accessible text for search input")})]})}},bKKl:function(e,t,n){n.d(t,"a",(function(){return o}));var i=n("gxu6");const o=()=>!!i.a("logged_out")||!!i.a("fba")},fs0a:function(e,t,n){var i=n("q1tI"),o=n("/MKj"),s=n("Hgxh"),a=n("28DW"),r=n("QAzJ"),c=n("yweb"),l=n("2hay"),d=n("n6mq"),u=n("nKUr");function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b={defaultButton:{display:"flex",alignItems:"center",backgroundColor:"#1877F2",border:"none",height:"40px",transition:"opacity .2s linear",width:"100%",minWidth:"240px",borderRadius:"20px",padding:"0px 0px 0px 8px"},roundedButton:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#FFF",border:"none",height:"48px",transition:"opacity .2s linear",width:"48px",marginBottom:"8px",borderRadius:"50%"},buttonText:{fontFamily:"Helvetica, Arial, sans-serif",fontWeight:"bold",color:"#fff",fontSize:"16px",paddingRight:"8px",letterSpacing:"0.25px"}};class p extends i.Component{constructor(...e){super(...e),h(this,"state",{fbReady:!1,showSocialAuthDisabledModal:!1}),h(this,"connectCallback",({creds:e,data:t})=>{this.props.onFacebookConnectSuccess(e,t)}),h(this,"handleConnectClick",()=>{Object(a.a)("unauth_mweb.facebook_connect.button_click");const{onTouch:e,mwebFacebookDisabled:t}=this.props;e&&e(),t?this.setState({showSocialAuthDisabledModal:!0}):this.state.fbReady&&Object(l.h)().then(this.connectCallback,this.props.onFacebookConnectError)}),h(this,"renderRoundButton",()=>Object(u.jsxs)(d.u,{alignItems:"center",direction:"column",justifyContent:"start",children:[Object(u.jsx)("button",{onClick:this.handleConnectClick,style:b.roundedButton,type:"button",children:Object(u.jsx)(d.w,{accessibilityLabel:this.props.i18n._("facebook","accessible label for facebook icon","accessible label for facebook icon"),color:"blue",icon:"facebook",inline:!0,size:20})}),Object(u.jsx)(d.cb,{color:"white",size:"md",children:this.props.i18n._("Facebook","Facebook company name","Facebook company name")})]}))}componentDidMount(){this.props.mwebFacebookDisabled||(Object(l.f)(this.props.locale).then(()=>{this.setState({fbReady:!0})}),window.addEventListener("message",this.handleMessageEvent,!1))}handleMessageEvent(e){Object(l.i)(e,e=>Object(a.a)("unauth_mweb."+e))}componentWillUnmount(){window.removeEventListener("message",this.handleMessageEvent)}renderPersonalizedButton(){const{isRerequest:e}=this.props,t=(this.props.type||"continue")+"_with",n="rounded",i=this.props.fbUseContinueAs?"true":"false";return Object(u.jsxs)(d.f,{bottom:!0,left:!0,right:!0,top:!0,dangerouslySetInlineStyle:{__style:{pointerEvents:"none"}},position:"absolute",rounding:5,children:[e?Object(u.jsx)("div",{className:"fb-login-button","data-width":"100%","data-max-rows":"1","data-size":"large","data-button-type":t,"data-layout":n,"data-show-faces":"false","data-auth-type":"rerequest","data-scope":l.b.join(","),"data-auto-logout-link":"false","data-use-continue-as":i}):Object(u.jsx)("div",{className:"fb-login-button","data-width":"100%","data-max-rows":"1","data-size":"large","data-button-type":t,"data-layout":n,"data-show-faces":"false","data-scope":l.b.join(","),"data-auto-logout-link":"false","data-use-continue-as":i}),this.state.showSocialAuthDisabledModal&&Object(u.jsx)(s.a,{type:"facebook",onDismiss:()=>this.setState({showSocialAuthDisabledModal:!1})})]})}render(){const{isRounded:e}=this.props;return e?this.renderRoundButton():Object(u.jsxs)(d.f,{position:"relative","data-test-id":"FacebookConnectContainer",children:[this.renderPersonalizedButton(),Object(u.jsxs)("button",{onClick:this.handleConnectClick,style:b.defaultButton,type:"button","data-test-id":"FacebookConnectButton",children:[Object(u.jsx)(d.f,{color:"white",rounding:3,dangerouslySetInlineStyle:{__style:{paddingTop:"5px",paddingLeft:"3px",paddingRight:"2px",marginLeft:"4px",marginRight:"4.4px"}},children:Object(u.jsx)(d.w,{accessibilityLabel:this.props.i18n._("facebook","accessible label for facebook icon","accessible label for facebook icon"),color:"blue",icon:"facebook",inline:!0,size:19})}),Object(u.jsx)(d.f,{alignItems:"center",display:"flex",justifyContent:"center",flex:"grow",marginEnd:1,children:Object(u.jsx)("span",{style:b.buttonText,children:this.props.buttonText})})]}),this.state.showSocialAuthDisabledModal&&Object(u.jsx)(s.a,{type:"facebook",onDismiss:()=>this.setState({showSocialAuthDisabledModal:!1})})]})}}var g=Object(o.connect)(e=>({locale:e.session.locale}))((function(e){const t=Object(c.c)(),{anyEnabled:n}=Object(r.b)("mweb_facebook_disabled");return Object(u.jsx)(p,{...e,i18n:t,mwebFacebookDisabled:n})})),j=n("k1Bv"),m=n("yep/"),f=n("bcHz"),O=n("u0Kf"),_=n("Wm3C"),w=n("jv6g"),x=n.n(w),y=n("kmwA"),S=n("hZxF"),v=n("RNo4"),T=n("pLLR"),C=n("0G5S");const k={defaultButton:{display:"flex",alignItems:"center",backgroundColor:"#00C300",border:"none",height:"40px",transition:"opacity .2s linear",width:"100%",borderRadius:"20px",padding:"0px 0px 0px 8px"},lineLogo:{borderRadius:"12px",backgroundColor:"#00C300",width:"32px",height:"32px"},buttonText:{fontWeight:"bold",color:"#fff",fontSize:"16px",paddingRight:"33px"}};var E=({buttonText:e,onLineConnectSuccess:t,onLineConnectError:n,onTouch:i})=>{const o=Object(c.c)(),{anyEnabled:s}=Object(r.a)("mweb_line_oauth_jp")(),{anyEnabled:l}=Object(r.a)("mweb_line_oauth_jp_android")(),h=s||l,b=Object(_.a)(10),{locale:p}=Object(T.d)();let g;const j=e=>{const i=Object(v.l)(e);if(i.state&&i.code&&i.state===b){g&&!g.closed&&g.close();const e=window.location.origin+"/oauth/line/redirect";Object(O.b)({url:"/oauth/line/verify",type:"POST",data:{code:i.code,redirect_uri:e}}).then(({ok:e,responseText:i})=>{if(e&&i){const e=JSON.parse(i),{id_token:n,access_token:o}=e;n&&o&&t({line_id_token:n,line_access_token:o},{line_id_token:n,line_access_token:o})}else n()})}},m=e=>{e.isTrusted&&e.origin===window.location.origin&&e.data&&j(String(e.data))},f=e=>{if(e.isTrusted&&e.url.startsWith(window.location.origin)&&"lineOAuthOneTimeCode"===e.key){const e=Object(C.a)("lineOAuthOneTimeCode");e&&j(e)}};Object(S.a)(()=>()=>{window.removeEventListener("message",m),window.removeEventListener("storage",f),Object(C.b)("lineOAuthOneTimeCode"),g&&!g.closed&&g.close()});const w=k.defaultButton;return h?Object(u.jsx)(d.f,{position:"relative","data-test-id":"LineConnectContainer",children:Object(u.jsxs)("button",{onClick:()=>{Object(a.a)("unauth_mweb.line_connect.button_click"),i&&i();const e=window.location.origin+"/oauth/line/redirect";window.addEventListener("message",m,!1),window.addEventListener("storage",f),g=window.open("https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id="+y.a.settings.LINE_CLIENT_ID+"&redirect_uri="+encodeURIComponent(e)+"&state="+b+"&ui_locales="+p+"&scope=profile%20openid%20email","_blank")},style:w,type:"button","data-test-id":"LineConnectButton",children:[Object(u.jsx)("img",{style:k.lineLogo,src:x.a,alt:o._("line","accessible label for line icon","accessible label for line icon")}),Object(u.jsx)(d.u,{alignItems:"center",justifyContent:"center",flex:"grow",children:Object(u.jsx)("span",{style:k.buttonText,children:e})})]})}):null},I=n("B/oJ"),L=n("6adH"),A=n("QtD7"),P=n("ANjH"),B=n("TXO6"),D=n("Q5BC"),M=n("vKjI"),R=n("VL22"),U=n("ulr2"),z=n("YWST"),F=n("EC67"),G=n("PmFr"),H=n("J8m7"),N=n("IAo4"),W=n("AGnR");function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class $ extends i.PureComponent{constructor(...e){super(...e),q(this,"state",{isLoading:!1,showRegisterLoading:!1,signupPlatform:"default"}),q(this,"onRegisterSuccess",e=>{const{isRedirectToNextParamAfterSignup:t,next:n}=this.props;this.trackSignupLoginEvent(7487,e),["facebook","google"].includes(e)&&(t&&n&&this.props.history.push(n),this.props.history.push("/")),this.setState({showRegisterLoading:!1})}),q(this,"onRegisterFailure",(e,t)=>{this.trackSignupLoginEvent(7488,t),this.props.showToast({text:e.message||this.props.i18n._("Sorry! Something went wrong on our end.","Error logging on","Error logging on")}),this.setState({isLoading:!1,showRegisterLoading:!1})}),q(this,"handlePostLoginRegistration",(e,t)=>{const{beforeRegister:n,isSignupConfirmationExpEnabled:i}=this.props;n&&i()?n(e,t):t()}),q(this,"onLoginError",(e,t,n,i)=>{this.setState({isLoading:!1}),!t||t.apiErrorCode!==H.y&&t.apiErrorCode!==H.m&&t.apiErrorCode!==H.s?t?(Object(a.j)("mweb_login_button_skip_register.api_error_code."+t.apiErrorCode),this.props.showToast({text:t.apiErrorCode&&t.message?t.message:this.props.i18n._("Sorry, we can't log you in.","Error message when user having trouble login in.","Error message when user having trouble login in.")})):(Object(a.j)("unauth_mweb.login.unexpected_error"),this.props.showToast({text:this.props.i18n._("Sorry, we can't log you in.","Error message when user having trouble login in.","Error message when user having trouble login in.")})):"line"===i||n.email||n.gplus_id_token?"line"===i?t.apiErrorCode===H.s?this.redirectToLineEmailCollect(n):this.registerAfterLoginError(e,t,n,i):this.handlePostLoginRegistration(n.email||"",()=>this.registerAfterLoginError(e,t,n,i)):Object(l.c)("email").then(({hasPerm:o})=>{this.handlePostLoginRegistration("",()=>this.redirectToEmailCollect(n,e,t,i)),Object(a.j)("unauth_mweb.reg_via_fb.has_email_perm."+String(!!o))}).catch(o=>{this.handlePostLoginRegistration("",()=>this.registerAfterLoginError(e,t,n,i))})}),q(this,"getAuxDataSignupLoginMethod",e=>{switch(e){case"facebook":return 2;case"google":return 3;case"line":return 8;default:return}}),q(this,"getViewParameterType",e=>{switch(e){case"facebook":return 3205;case"google":return 3204;case"line":return 3556;default:return}}),q(this,"trackSignupLoginEvent",(e,t)=>{const{isAuthenticated:n,isLimitedLoginUser:i}=this.props;Object(W.e)({event_type:e,view_type:10,view_parameter:this.getViewParameterType(t),aux_data:{...n?{login_state:i?2:1}:{},signup_login_method:this.getAuxDataSignupLoginMethod(t)}})}),q(this,"trackButtonTap",e=>{const{isAuthenticated:t,isLimitedLoginUser:n,viewParameter:i}=this.props;Object(W.h)({view_type:10,view_parameter:i,element:e,aux_data:{...t?{login_state:n?2:1}:{}}})}),q(this,"registerAfterLoginError",(e,t,n,i)=>{"line"!==i&&this.includeAgeStep(i,n)?this.props.history.push({pathname:"/signup/thirdpartyage/",state:{signupOptions:n,signupPlatform:i}}):("facebook"===i&&n.birthday&&(n.birthday=String(Object(N.a)(n.birthday||""))),this.setState({isLoading:!0,showRegisterLoading:!0,signupPlatform:i}),this.trackSignupLoginEvent(7537,i),this.props.register(n).then(e=>this.onRegisterSuccess(i),e=>this.onRegisterFailure(e,i)))}),q(this,"redirectToEmailCollect",(e,t,n,i)=>{const{country:o}=this.props;this.props.history.push({pathname:"/signup/fbemailcollect/",state:{signupOptions:e,isGDPREUCountry:Object(R.d)(o),country:o,includeAgeStep:this.includeAgeStep("facebook",e)}})}),q(this,"redirectToLineEmailCollect",e=>{this.props.history.push({pathname:"/signup/line-email-collect/",state:{signupOptions:e}})}),q(this,"includeAgeStep",(e,t)=>{const{country:n}=this.props,i="facebook"!==e||!t.birthday,o=Object(R.d)(n),s=G.b.includes(n),a=G.k.has(n);return!!(o||s||a)&&(!!i||!Object(N.b)(t.birthday||"",18))}),q(this,"handleFacebookError",()=>{const{fbConnectHandler:e}=this.props;e&&e("error"),this.props.showToast({text:this.props.i18n._("Unable to connect to Facebook","Error logging on with Facebook","Error logging on with Facebook")})}),q(this,"handleLineError",()=>{this.props.showToast({text:this.props.i18n._("Unable to connect to Line","Error logging on with Line","Error logging on with Line")})}),q(this,"handleSignupTouch",({event:e})=>{const{from:t,history:n,isBusiness:i,next:o,onSignupTouch:s,setLoginSignupFrom:r,location:c,isRedirectToNextParamAfterSignup:l}=this.props;e&&(e.stopPropagation(),e.preventDefault()),Object(a.h)("press_email_signup"),Object(a.i)({action:"click",page_location:c,item:"continue-email-button"}),s&&s(),t&&r(t),this.trackButtonTap(31),n.push({pathname:i?"/business/signup/step1/":"/signup/step1/",search:c.search,state:{next:o,isRedirectToNextParamAfterSignup:l}})}),q(this,"handleLoginTouch",({event:e})=>{const{isBusiness:t,footerCTA:n,from:i,history:o,next:s,onLoginTouch:r,location:c,isRedirectToNextParamAfterSignup:l}=this.props;e.stopPropagation(),e.preventDefault(),r&&r(),i&&this.props.setLoginSignupFrom(i),Object(a.i)({action:"click",page_location:c,item:"login-button"}),this.trackButtonTap(30);const d=n||"button";Object(a.j)("unauth_mweb.login_buttons.footer."+d),Object(a.h)("press_login"),o.push({pathname:t?"/business/login/":"/login/",search:c.search,state:{next:s,isRedirectToNextParamAfterSignup:l}})}),q(this,"handleGoogleTouch",()=>{const{onGoogleTouch:e,location:t}=this.props;e&&e(),Object(a.i)({action:"click",page_location:t,item:"continue-google-button"}),this.trackButtonTap(208)}),q(this,"handleFacebookTouch",()=>{const{onFacebookTouch:e,location:t}=this.props;e&&e(),Object(a.i)({action:"click",page_location:t,item:"continue-facebook-button"}),this.trackButtonTap(68)}),q(this,"handleLineTouch",()=>{this.trackButtonTap(12277),Object(a.i)({action:"click",page_location:this.props.location,item:"continue-line-button"})}),q(this,"login",e=>(t,n)=>{const{fbConnectHandler:i,history:o,login:s,next:r,location:c,noImmediateLoginRedirect:l}=this.props,d="google"===e?"gsi_btn":"other",u=c.state&&c.state.switch_account?{switchAccount:!0,trigger:d}:{noImmediateRedirect:l,trigger:d};"facebook"===e&&i&&i("success"),Object(a.h)(e+"_login_success"),this.trackSignupLoginEvent(7534,e),s(t,o,r,u).then(()=>{this.trackSignupLoginEvent(7536,e)}).catch(i=>{this.trackSignupLoginEvent(7535,e),this.onLoginError(t,i,n,e)}),this.setState({isLoading:!0,showRegisterLoading:!1,signupPlatform:e})}),q(this,"renderRegularButtons",()=>{const{isBusiness:e,locale:t,googleText:n,facebookText:o,lineText:s,showEmailButton:a,fbButtonType:r,isRerequest:c,isAuthenticated:l,showSecondGoogleButton:h}=this.props;let b=this.props.i18n._("Continue with email","Sign up button","Sign up button"),p=2;return e&&(b=this.props.i18n._("Create account","Button text for creating a business account","Button text for creating a business account"),p=-2),Object(u.jsxs)(i.Fragment,{children:[a&&Object(u.jsx)(d.f,{"data-test-id":"continue-email-button",marginBottom:p,children:Object(u.jsx)(d.g,{fullWidth:!0,color:"red",text:b,onClick:this.handleSignupTouch})}),o&&Object(u.jsx)(d.f,{marginBottom:2,"data-test-id":"continue-facebook-button",children:Object(u.jsx)(g,{buttonText:o,locale:t,onFacebookConnectError:this.handleFacebookError,onFacebookConnectSuccess:this.login("facebook"),type:r,fbUseContinueAs:this.props.fbUseContinueAs,onTouch:this.handleFacebookTouch,isRerequest:c})}),n&&Object(u.jsx)(d.f,{marginBottom:2,"data-test-id":"continue-google-button",children:Object(u.jsx)(m.a,{buttonText:n,isAuthenticated:l,showSecondGoogleButton:h,onGoogleConnectSuccess:this.login("google"),onTouch:this.handleGoogleTouch})}),s&&Object(u.jsx)(d.f,{marginBottom:2,"data-test-id":"continue-line-button",children:Object(u.jsx)(E,{buttonText:s,onLineConnectError:this.handleLineError,onLineConnectSuccess:this.login("line"),onTouch:this.handleLineTouch})})]})})}renderFooterCTA(){const{footerCTA:e,increasedSpaceBelow:t,isMobileHomepage:n}=this.props;return"member_link"===e?Object(u.jsx)(d.f,{marginTop:-4,"data-test-id":"login-member",children:Object(u.jsx)(f.a,{pressState:"none",onTouch:e=>this.handleLoginTouch({event:e}),children:Object(u.jsx)(d.f,{paddingY:4,marginBottom:t?-1:-2,children:Object(u.jsx)(d.cb,{align:"center",size:"md",weight:"bold",color:n?"white":"darkGray",children:this.props.i18n._("Already a member? Log in","Link on mobile web sign up modal to direct unauth users to the login page","Link on mobile web sign up modal to direct unauth users to the login page")})})})}):"not_you_link"===e?Object(u.jsx)(d.f,{marginTop:-3,"data-test-id":"LoginButtonsNotYoucontainer",children:Object(u.jsx)(f.a,{pressState:"none",onTouch:e=>this.handleLoginTouch({event:e}),children:Object(u.jsxs)(d.cb,{size:"md",inline:!0,color:"darkGray",children:[this.props.i18n._("Not you? ","Text for if the user is shown the wrong Facebook profile image for their account","Text for if the user is shown the wrong Facebook profile image for their account"),Object(u.jsx)(d.cb,{color:"darkGray",inline:!0,size:"md",weight:"bold",children:this.props.i18n._("Log in as a different user.","Clickable text that takes the user to the login page","Clickable text that takes the user to the login page")})]})})}):Object(u.jsx)(d.f,{marginBottom:5,"data-test-id":"login-button",children:Object(u.jsx)(d.g,{fullWidth:!0,color:"transparent",onClick:this.handleLoginTouch,text:this.props.i18n._("Log in","Login page button","Login page button")})})}renderRoundedButtons(){const{locale:e,fbButtonType:t,isRerequest:n}=this.props;return Object(u.jsxs)(d.u,{alignItems:"center",direction:"column",justifyContent:"start",children:[Object(u.jsx)(d.f,{marginBottom:4,children:Object(u.jsx)(d.cb,{align:"center",color:"white",size:"md",children:this.props.i18n._("Sign up to get started","Sign up CTA","Sign up CTA")})}),Object(u.jsxs)(d.u,{alignItems:"stretch",justifyContent:"start",direction:"row",children:[Object(u.jsxs)(d.f,{"data-test-id":"signup-button",rounding:"circle",display:"flex",direction:"column",alignItems:"center",marginBottom:4,marginEnd:4,children:[Object(u.jsx)("button",{onClick:this.handleSignupTouch,style:{border:"none",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#FFF",height:"48px",width:"48px",marginBottom:"8px",borderRadius:"50%",cursor:"pointer"},type:"button",children:Object(u.jsx)(d.w,{accessibilityLabel:this.props.i18n._("Continue with email","Sign up with email button","Sign up with email button"),icon:"gmail",color:"darkGray",inline:!0,size:16})}),Object(u.jsx)(d.cb,{color:"white",size:"md",children:this.props.i18n._("Email","Icon text for continuing with email","Icon text for continuing with email")})]}),Object(u.jsx)(d.f,{marginEnd:4,children:Object(u.jsx)(g,{locale:e,onFacebookConnectError:this.handleFacebookError,onFacebookConnectSuccess:this.login("facebook"),type:t,fbUseContinueAs:this.props.fbUseContinueAs,onTouch:this.handleFacebookTouch,isRerequest:n,isRounded:!0})}),Object(u.jsx)(m.a,{onGoogleConnectSuccess:this.login("google"),onTouch:this.handleGoogleTouch,isRounded:!0})]})]})}render(){const{isBusiness:e,showTextDivider:t,inSocialBeforeEmailExp:n,roundButtons:i,showLoginButtons:o,secondaryAccountFlowEnabled:s}=this.props,{showRegisterLoading:a,isLoading:r,signupPlatform:c}=this.state,l=e?s?6:-5:0;return Object(u.jsxs)(d.f,{marginTop:l,maxWidth:400,marginStart:"auto",marginEnd:"auto","data-test-id":"LoginButtonsContainer",children:[t&&Object(u.jsx)(d.f,{marginBottom:3,marginTop:3,children:Object(u.jsx)(d.cb,{align:"center",size:"sm",weight:"bold",children:this.props.i18n._("OR","Separator for email login button and social login button","Separator for email login button and social login button")})}),Object(u.jsx)(d.f,{marginBottom:n?3:6,children:i?this.renderRoundedButtons():this.renderRegularButtons()}),o&&this.renderFooterCTA(),r&&(a?Object(u.jsx)(I.a,{platform:"line"===c?"default":c}):Object(u.jsx)(j.a,{}))]})}}q($,"defaultProps",{next:"/",fbUseContinueAs:!0,footerCTA:"button"});t.a=Object(P.compose)(F.l,L.a,Object(o.connect)(({session:e,users:t={}},n)=>({country:e.country,locale:e.locale,isAuthenticated:e.isAuthenticated,isLimitedLoginUser:Object(B.b)(t[e.userId]),isTablet:e.isTablet}),e=>({setLoginSignupFrom:t=>e(Object(U.u)(t)),register:t=>e(Object(M.a)(t)),login:(t,n,i,o)=>e(Object(D.b)(t,n,i,o)),isSignupConfirmationExpEnabled:()=>["enabled","employees"].includes(e(Object(A.a)("mweb_unauth_signup_confirmation")))})))((function(e){const t=Object(c.c)(),{showEmailButton:n,showLoginButtons:o}=e,s=Object(z.b)();return Object(i.useEffect)(()=>{s&&(o&&s.load(new URL("login.js","file://")),n&&s.load(new URL("signup.js","file://")))},[]),Object(u.jsx)($,{...e,i18n:t})}))},jv6g:function(e,t){e.exports="https://s.pinimg.com/webapp/btn_base-3772d107.png"},k1Bv:function(e,t,n){var i=n("yweb"),o=n("n6mq"),s=n("nKUr");t.a=({isInModal:e})=>{const t=Object(i.c)();return Object(s.jsx)(o.f,{position:e?"absolute":"fixed",top:!0,left:!0,dangerouslySetInlineStyle:{__style:{backgroundColor:"rgba(255,255,255, .5)",height:"100%",width:"100%",zIndex:1}},display:"flex",alignItems:"center",justifyContent:"center",children:Object(s.jsx)(o.U,{accessibilityLabel:t._("Loading","Full page loading state","Full page loading state"),show:!0})})}},lsgW:function(e,t,n){n.d(t,"a",(function(){return o}));var i=n("nKUr");function o({size:e,noCircle:t}){return Object(i.jsxs)("svg",{height:e,style:{display:"block"},viewBox:t?"3 3 70 70":"-3 -3 82 82",width:e,children:[t?null:Object(i.jsx)("circle",{cx:"38",cy:"38",fill:"white",r:"40"}),Object(i.jsx)("path",{d:"M27.5 71c3.3 1 6.7 1.6 10.3 1.6C57 72.6 72.6 57 72.6 37.8 72.6 18.6 57 3 37.8 3 18.6 3 3 18.6 3 37.8c0 14.8 9.3 27.5 22.4 32.5-.3-2.7-.6-7.2 0-10.3l4-17.2s-1-2-1-5.2c0-4.8 3-8.4 6.4-8.4 3 0 4.4 2.2 4.4 5 0 3-2 7.3-3 11.4C35.6 49 38 52 41.5 52c6.2 0 11-6.6 11-16 0-8.3-6-14-14.6-14-9.8 0-15.6 7.3-15.6 15 0 3 1 6 2.6 8 .3.2.3.5.2 1l-1 3.8c0 .6-.4.8-1 .4-4.4-2-7-8.3-7-13.4 0-11 7.8-21 22.8-21 12 0 21.3 8.6 21.3 20 0 12-7.4 21.6-18 21.6-3.4 0-6.7-1.8-7.8-4L32 61.7c-.8 3-3 7-4.5 9.4z",fill:"#fb7072",fillRule:"evenodd"})]})}},ntEp:function(e,t,n){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var i=n("1dBE");const{Provider:o,Consumer:s,useHook:a}=Object(i.b)("unauthPageWrapperContext")},pmdw:function(e,t,n){var i=n("q1tI"),o=n("DzJC"),s=n.n(o);t.a=()=>{const[e,t]=Object(i.useState)(0);return Object(i.useEffect)(()=>{const e=s()(()=>t(window.scrollY),10);return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),e}},tCfZ:function(e,t,n){n.d(t,"a",(function(){return l}));var i=n("Lr1Z"),o=n("kmwA"),s=n("yweb"),a=n("qpbZ"),r=n("n6mq"),c=n("nKUr");function l({isMobileHomepage:e,isBusiness:t=!1,size:n="sm",alignText:l="center"}){const d=Object(s.c)(),u=o.a.settings.POLICY_PRIVACY_URL,h=t?o.a.settings.PARTNER_SITE_TOS_URL:o.a.settings.POLICY_TERMS_PLAIN_URL;return Object(c.jsx)(r.u,{alignItems:"left"===l?"start":"center",direction:"column",justifyContent:"start",children:Object(c.jsx)(r.cb,{color:e?"white":"gray",align:"left"===l?"start":"center",size:"sm",overflow:"left"===l?"normal":"breakWord",children:Object(a.b)(d._("By continuing, you agree to Pinterest's {{ termsOfService }} and acknowledge you've read our {{ privacyPolicy }}"),{termsOfService:Object(c.jsx)("span",{"data-test-id":"business-tos",children:Object(c.jsx)(i.a,{to:h,inline:!0,pressState:"background",newTab:!0,children:Object(c.jsx)(r.cb,{color:e?"white":"gray",inline:!0,size:"sm",weight:"bold",children:t?d._("Business Terms of Service","Mobile web business terms of service link for partners","Mobile web business terms of service link for partners"):d._("Terms of Service","Mobile web terms of service link","Mobile web terms of service link")})})},"termsOfService"),privacyPolicy:Object(c.jsx)("span",{"data-test-id":"privacy",children:Object(c.jsx)(i.a,{to:u,inline:!0,pressState:"background",newTab:!0,children:Object(c.jsx)(r.cb,{color:e?"white":"gray",inline:!0,size:"sm",weight:"bold",children:d._("Privacy Policy","Mobile web privacy policy link","Mobile web privacy policy link")})})},"privacyPolicy")})})})}},vKjI:function(e,t,n){n.d(t,"a",(function(){return x}));var i=n("gxu6"),o=n("0G5S"),s=n("PmFr");function a(){return function(e){const t={};return e.forEach(e=>{const n=JSON.parse(Object(o.a)(e));n&&(t[e]=n)}),JSON.stringify(t)}([s.l])}var r=n("eOdZ"),c=n("Ptwp"),l=n("lIBN"),d=n("28DW"),u=n("ARZW"),h=n("VL22"),b=n("jUT+"),p=n("vtuW"),g=n("B/oJ"),j=n("eNqV"),m=n("J8m7"),f=n("A+Hl"),O=n("AYc3"),_=n("2y2F"),w=n("2oSX");const x=(e,t)=>(t,n)=>{let x=0;const{session:y}=n(),{country:S}=y,v=Object(g.b)(S),T=new Promise((e,t)=>{v?setTimeout(()=>{e()},3e3):e()}),C=()=>{const n=y.isAuthenticated,g=Object(f.c)(y.origin)&&!1;return(g?Object(f.b)({invite_code:y.inviteCode,locale:y.locale,referrer:y.referrer,...e}):r.d.create("UserRegisterResource",{...e,get_user:!0,user_behavior_data:a(),visited_pages:Object(o.a)(s.g)}).callCreate()).then(i=>T.then(()=>{var a,r,m,f;Object(p.b)("d_pif_invite"),Object(o.b)(s.g),t((a=i.resource_response.data.user,r=i.client_context.placed_experiences,m=i.client_context.active_experiments,f=i.client_context.triggerable_experiments,{type:b.pb,payload:{user:a,experiences:r,active:m,triggerable:f}})),n&&Object(l.a)("registration.signup_success");const x=e.email||e.username||null,y=e.password||null;if(navigator.credentials&&x&&y)try{const e=new window.PasswordCredential({id:x,password:y});Object(d.a)("unauth_mweb.navigatorCredentials.store.attempt"),navigator.credentials&&"function"==typeof navigator.credentials.store&&navigator.credentials.store(e).then(()=>{Object(d.a)("unauth_mweb.navigatorCredentials.store.success")})}catch(v){Object(d.a)("unauth_mweb.navigatorCredentials.store.error")}return Object(w.e)({action:"signup",type:Object(h.b)(e),isCrossDomain:g,isMultipleAccounts:n}),Object(c.a)(),n&&Object(j.j)(),Object(_.a)(S)&&Object(O.g)({id:u.g,eventCategory:"NewUsers",eventName:"Mobile"}),Object(_.f)(S)&&Object(O.k)({id:"flashtalking-m-reg",eventCategory:"NewUsers",eventName:"Mobile"}),Object(_.c)(S)&&Object(O.h)({pixelId:"dpm_pixel_new_user_event",eventCategory:"NewUsers",eventName:"Mobile"}),Object(_.d)(S)&&Object(O.i)({pixelId:"dentsu_pixel_new_user_event",eventCategory:"NewUsers",eventName:"Mobile"}),i})).catch(t=>{const{apiErrorCode:o=null}=t;if(o&&o===m.d&&(Object(d.a)("multi_step_set_age_restrict_cookie"),i.b("r_r","1",4320)),!(x<3)||o&&![m.h,m.g].includes(o))throw Object(w.f)({action:"signup",type:Object(h.b)(e),error:t.message,isCrossDomain:g,isMultipleAccounts:n}),n&&Object(l.a)("registration.signup_error"),t;x+=1,C()})};return C()}},"yep/":function(e,t,n){n.d(t,"a",(function(){return m}));var i=n("q1tI"),o=n("/MKj"),s=n("Hgxh"),a=n("yweb"),r=n("4NbJ"),c=n("n6mq"),l=n("nKUr");function d(){const e=Object(a.c)(),[t,n]=Object(i.useState)();return Object(l.jsxs)(c.f,{position:"relative",children:[Object(l.jsx)(c.bb,{onTap:()=>n(!0),children:Object(l.jsxs)(c.f,{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",height:40,rounding:"pill",color:"lightGray",children:[Object(l.jsx)(c.f,{height:24,width:24,marginTop:1,children:Object(l.jsx)(r.b,{size:20})}),Object(l.jsx)(c.f,{marginStart:2,children:Object(l.jsx)(c.cb,{weight:"bold",children:e._("Connect with Google","googleConnectButtonWithDisabledSDK.buttonText","Connect with Google button text")})})]})}),t&&Object(l.jsx)(s.a,{type:"google",onDismiss:()=>n(!1)})]})}var u=n("QtD7"),h=n("4NNh"),b=n("QAzJ"),p=n("28DW");function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class j extends i.Component{constructor(...e){super(...e),g(this,"gsiButtonRef",Object(i.createRef)()),g(this,"gsiSecondHomepageButtonRef",Object(i.createRef)()),g(this,"handleGoogleConnectSuccess",()=>{const{onTouch:e}=this.props;e&&e(),Object(p.h)("press_google_login")})}componentDidMount(){const{browserType:e,isAuthenticated:t,isGoogleOneTapDisabled:n,isGoogleOneTapInitialized:i,enabledSafariOneTapITPExp:o,enablediOSOneTapITPExp:s,enabledChromeOneTapITPExp:a,platform:c}=this.props;n||t||!i?(Object(r.e)(this.gsiButtonRef,this.logGSIButton.bind(this),this.handleCredentialResponse.bind(this),"ios"===c&&(2===e&&o()||1===e&&a()||s())),t||i||Object(p.a)("mweb.gsi_button_fix.load_and_initialize_gsi_script")):Object(r.f)(this.gsiButtonRef,this.logGSIButton.bind(this))}componentDidUpdate(){const{browserType:e,isGoogleOneTapDisabled:t,isGoogleOneTapInitialized:n,showSecondGoogleButton:i,enabledSafariOneTapITPExp:o,enablediOSOneTapITPExp:s,enabledChromeOneTapITPExp:a,platform:c}=this.props;n?Object(r.f)(i?this.gsiSecondHomepageButtonRef:this.gsiButtonRef,this.logGSIButton.bind(this)):t&&Object(r.e)(i?this.gsiSecondHomepageButtonRef:this.gsiButtonRef,this.logGSIButton.bind(this),this.handleCredentialResponse.bind(this),"ios"===c&&(2===e&&o()||1===e&&a()||s()))}shouldComponentUpdate(e){const{isGoogleOneTapDisabled:t,isGoogleOneTapInitialized:n,showSecondGoogleButton:i}=this.props;return!n&&!!e.isGoogleOneTapInitialized||!t&&!!e.isGoogleOneTapDisabled||!!i}handleCredentialResponse(e){const t=e.credential;this.logGSIButton("select_by."+e.select_by);const n={google_open_id_token:t,autologin:!1},i=Object(h.b)(t),o={google_open_id_token:t,first_name:i.given_name,last_name:i.family_name,image_url:i.picture};this.props.onGoogleConnectSuccess(n,o)}logGSIButton(e){Object(p.a)("unauth_mweb.gsi_button."+e)}render(){const{showSecondGoogleButton:e}=this.props;return Object(l.jsx)(c.f,{position:"relative",children:Object(l.jsx)(c.bb,{onTap:()=>Object(p.a)("gsi_personalized_button.tap"),children:Object(l.jsx)(c.f,{height:44,children:e?Object(l.jsx)(c.f,{ref:this.gsiSecondHomepageButtonRef,position:"absolute",width:"100%"}):Object(l.jsx)(c.f,{ref:this.gsiButtonRef,position:"absolute",width:"100%"})})})})}}function m(e){const{isGoogleOneTapInitialized:t,isGoogleOneTapDisabled:n,browserType:i,platform:s}=Object(o.useSelector)(({session:e})=>({isGoogleOneTapInitialized:e.isGoogleOneTapInitialized,isGoogleOneTapDisabled:e.isGoogleOneTapDisabled,browserType:e.browserType,platform:e.userAgentPlatform})),{anyEnabled:a}=Object(b.b)("mweb_google_disabled"),r=Object(o.useDispatch)();return a?Object(l.jsx)(d,{}):Object(l.jsx)(j,{...e,isGoogleOneTapInitialized:t,isGoogleOneTapDisabled:n,browserType:i,platform:s,enabledSafariOneTapITPExp:()=>r(Object(u.a)("mweb_unauth_safari_one_tap")).startsWith("enabled"),enablediOSOneTapITPExp:()=>r(Object(u.a)("mweb_unauth_ios_one_tap")).startsWith("enabled"),enabledChromeOneTapITPExp:()=>r(Object(u.a)("mweb_unauth_chrome_one_tap")).startsWith("enabled")})}}}]);
//# sourceMappingURL=https://sm.pinimg.com/webapp/238-c43fe475c778ab76de3c.mjs.map