1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`40c3f1411a3eadc86df763ccba00ed97cb15cda2`},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:puzzmocom":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`bcfd4538-d4e4-4ed5-bf4d-cbf28e04e7ad`,e._sentryDebugIdIdentifier=`sentry-dbid-bcfd4538-d4e4-4ed5-bf4d-cbf28e04e7ad`)}catch(e){}})();import{l as e,n as t,t as n}from"./objectSpread2.BmGtaCuR.js";import{n as r,r as i,t as a}from"./compiler-runtime.DzsRLAYZ.js";import{t as o}from"./react-relay.GQTxKCmB.js";import{C as s,D as c,_t as l,a as u,o as d,s as f,v as p,w as m,y as h,z as g}from"./DesignSystem.Rj8SR_9H.js";import"./LinkingConfiguration.KIcg62z4.js";import"./stylex.Dgm3Lh26.js";import"./themes.QFj5qwKF.js";import"./ScreenMetricsContext.Ci0jsMst.js";import"./useScreenMetrics.CZg7ZKJE.js";import"./useNavigateWithParams.BECPsh8i.js";import{t as _}from"./useIsMobile.B8c8jbHR.js";import{t as v}from"./CircledCheck.DvYQP6-3.js";import{n as y}from"./index.esm.C-E1F89p.js";import{O as b,Q as x,Zt as S}from"./main.BngFTV-r.js";import{n as C}from"./SidebarNav.BdwZgxl5.js";import{t as w}from"./CDNUploadForm.C2MyrIk3.js";var T=(function(){var e={alias:null,args:null,kind:`ScalarField`,name:`usernameID`,storageKey:null},t={alias:null,args:null,kind:`ScalarField`,name:`publishingName`,storageKey:null},n={alias:null,args:null,kind:`ScalarField`,name:`bio`,storageKey:null},r={alias:null,args:null,kind:`ScalarField`,name:`links`,storageKey:null},i={alias:null,args:null,kind:`ScalarField`,name:`headshotURL`,storageKey:null},a={alias:null,args:null,kind:`ScalarField`,name:`oneliner`,storageKey:null},o={alias:null,args:null,kind:`ScalarField`,name:`pronouns`,storageKey:null},s={alias:null,args:null,kind:`ScalarField`,name:`id`,storageKey:null};return{fragment:{argumentDefinitions:[],kind:`Fragment`,metadata:null,name:`UserPublishingProfileSettingsScreenQuery`,selections:[{alias:null,args:null,concreteType:`User`,kind:`LinkedField`,name:`currentUser`,plural:!1,selections:[e,t,{alias:null,args:null,concreteType:`UserProfile`,kind:`LinkedField`,name:`publicProfile`,plural:!1,selections:[n,r,i,a,o],storageKey:null}],storageKey:null}],type:`Query`,abstractKey:null},kind:`Request`,operation:{argumentDefinitions:[],kind:`Operation`,name:`UserPublishingProfileSettingsScreenQuery`,selections:[{alias:null,args:null,concreteType:`User`,kind:`LinkedField`,name:`currentUser`,plural:!1,selections:[e,t,{alias:null,args:null,concreteType:`UserProfile`,kind:`LinkedField`,name:`publicProfile`,plural:!1,selections:[n,r,i,a,o,s],storageKey:null},s],storageKey:null}]},params:{cacheID:`bfbf0039aa3109278aad836fbbe71c10`,id:null,metadata:{},name:`UserPublishingProfileSettingsScreenQuery`,operationKind:`query`,text:`query UserPublishingProfileSettingsScreenQuery { 2 currentUser { 3 usernameID 4 publishingName 5 publicProfile { 6 bio 7 links 8 headshotURL 9 oneliner 10 pronouns 11 id 12 } 13 id 14 } 15} 16`}}})();T.hash=`2327670229256351e9f76cbb3526ae84`;var E=o(),D=a(),O=e(i()),k=(function(){var e=[{defaultValue:null,kind:`LocalArgument`,name:`input`}],t=[{alias:null,args:[{kind:`Variable`,name:`input`,variableName:`input`}],concreteType:`UserProfile`,kind:`LinkedField`,name:`updateUserProfile`,plural:!1,selections:[{alias:null,args:null,kind:`ScalarField`,name:`id`,storageKey:null},{alias:null,args:null,kind:`ScalarField`,name:`bio`,storageKey:null},{alias:null,args:null,kind:`ScalarField`,name:`pronouns`,storageKey:null},{alias:null,args:null,kind:`ScalarField`,name:`links`,storageKey:null},{alias:null,args:null,kind:`ScalarField`,name:`highlightedStatIDs`,storageKey:null},{alias:null,args:null,kind:`ScalarField`,name:`headshotURL`,storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:`Fragment`,metadata:null,name:`useUserProfileEditMutation`,selections:t,type:`Mutation`,abstractKey:null},kind:`Request`,operation:{argumentDefinitions:e,kind:`Operation`,name:`useUserProfileEditMutation`,selections:t}
16,params:{cacheID:`34741ed50ee05c267268c223d402df60`,id:null,metadata:{},name:`useUserProfileEditMutation`,operationKind:`mutation`,text:`mutation useUserProfileEditMutation( 17 $input: UpdateUserProfileInput! 18) { 19 updateUserProfile(input: $input) { 20 id 21 bio 22 pronouns 23 links 24 highlightedStatIDs 25 headshotURL 26 } 27} 28`}}})();k.hash=`874ab1490a18654c7108b955fe75a9eb`;var A=k;function j(){let e=(0,D.c)(5),[t,n]=(0,E.useMutation)(A),r;e[0]===t?r=e[1]:(r=e=>t({variables:{input:e}}),e[0]=t,e[1]=r);let i=r,a;return e[2]!==n||e[3]!==i?(a=[i,n],e[2]=n,e[3]=i,e[4]=a):a=e[4],a}var M=e(r());t();var N=e=>{let t=(0,D.c)(2),n;return t[0]===e.title?n=t[1]:(n=(0,M.jsx)(f,{children:e.title}),t[0]=e.title,t[1]=n),n},P=[{id:`build`,label:(0,M.jsx)(N,{title:`You`})},{id:`notes`,label:(0,M.jsx)(N,{title:`Links`})}],F=e=>{let t=(0,D.c)(10),n=P[e.index],r=e.hideTitle?12:36,i;t[0]===r?i=t[1]:(i={paddingTop:r,marginBottom:24,maxWidth:600},t[0]=r,t[1]=i);let a;t[2]!==e.hideTitle||t[3]!==n.label?(a=!e.hideTitle&&(0,M.jsx)(h,{children:n.label}),t[2]=e.hideTitle,t[3]=n.label,t[4]=a):a=t[4];let o;return t[5]!==e.children||t[6]!==n.id||t[7]!==i||t[8]!==a?(o=(0,M.jsxs)(`div`,{id:n.id,style:i,children:[a,e.children]}),t[5]=e.children,t[6]=n.id,t[7]=i,t[8]=a,t[9]=o):o=t[9],o};function I(){var e,t,r,i,a,o;let h=(0,E.useLazyLoadQuery)(T,{},S),D=((e=h.currentUser)==null||(e=e.publicProfile)==null?void 0:e.bio)||``,k=((t=h.currentUser)==null||(t=t.publicProfile)==null?void 0:t.links)||[],[A,N]=j(),I=(0,O.useCallback)(e=>A(e),[A]),R=_(),z=y({defaultValues:{publishingName:(r=h.currentUser)==null?void 0:r.publishingName,bio:D,links:k,headshotURL:(i=h.currentUser)==null||(i=i.publicProfile)==null?void 0:i.headshotURL,oneliner:(a=h.currentUser)==null||(a=a.publicProfile)==null?void 0:a.oneliner,pronouns:(o=h.currentUser)==null||(o=o.publicProfile)==null?void 0:o.pronouns}}),B=z.watch(`publishingName`),V={form:z,formID:`user`},H=l();return!h.currentUser||h.currentUser.usernameID.length!==3?(0,M.jsx)(x,{}):(0,M.jsx)(M.Fragment,{children:(0,M.jsxs)(m,{style:{flexDirection:`row`},children:[!R&&(0,M.jsx)(C,{sections:P}),(0,M.jsxs)(`div`,{style:{maxWidth:`100%`,flex:1,marginBottom:48},children:[(0,M.jsx)(p,{children:`Your Publishing Profile`}),(0,M.jsxs)(`form`,{onSubmit:z.handleSubmit(I),children:[(0,M.jsx)(f,{}),(0,M.jsxs)(F,{index:0,children:[(0,M.jsx)(b,n({name:`publishingName`,label:`Your public name for puzzle attribution.`},V)),!B&&(0,M.jsxs)(u,{size:`small`,style:{marginTop:-8,opacity:.6,marginBottom:12},children:[`Defaults to your`,` `,(0,M.jsxs)(s,{screen:`Account`,inline:!0,children:[(0,M.jsx)(d,{size:`small`,children:`display name or username`}),` when blank`]}),`.`]}),(0,M.jsx)(b,n({name:`pronouns`,label:`Pronouns (e.g. they/them, she/her, he/him)`},V)),(0,M.jsx)(u,{size:`small`,style:{marginTop:-8,opacity:.6,marginBottom:12},children:`Shown on your profile page`}),(0,M.jsx)(b,n({name:`bio`,textArea:!0,label:`Your bio, which lives under your profile.`,inputProps:{style:{height:100}}},V)),(0,M.jsx)(b,n(n({name:`oneliner`,label:`Your one-liner bio (40 characters)`},V),{},{onChangePreprocess:e=>{let t=e.target.value;t.length>40&&(e.target.value=t.slice(0,40))}})),(0,M.jsx)(b,n(n({name:`headshotURL`,label:`Headshot image, we recommend it to be 500x500, the image will be cropped to a circle and turned to be greyscale. JPG or PNG only.`},V),{},{customComponent:e=>(0,M.jsxs)(`div`,{style:{display:`flex`,flexDirection:`row`,alignItems:`center`},children:[(0,M.jsx)(`img`,{src:e.value||``,style:{width:50,height:50,borderRadius:25,marginRight:12,backgroundColor:H.a_bgAlt,transform:`grayscale(100%)`}}),(0,M.jsx)(w,{setUploading:e=>{},onUpload:t=>{e.onChange(t)}})]})}))]}),(0,M.jsx)(F,{index:1,children:(0,M.jsx)(b,n(n({name:`links`,label:`A set of links you can have after your profile highlights.`},V),{},{customComponent:(e,t)=>{let r=e.value||[],i=L(r||[]),a=t=>z.setValue(e.name,t),o=()=>a([...r,``,``]),s=e=>{let t=r.slice(0,e),n=r.slice(e+2);a([...t,...n])},l=(e,t)=>{let n=[...r];n[e]=t,a(n)};return(0,M.jsxs)(`div`,{children:[i.map(([e,r],i)=>(0,M.jsxs)(`div`,{style:{display:`flex`,flexDirection:`row`,flexWrap:`wrap`,alignItems:`center`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,flex:1},children:[(0,M.jsx)(f,{size:`small`,style:{marginBottom:4,opacity:.7},children:`Text`}
28),(0,M.jsx)(`input`,{value:e,onChange:e=>l(i*2,e.target.value),style:n(n({},t),{},{margin:12,marginLeft:0,fontSize:16,lineHeight:1.6})})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,flex:1},children:[(0,M.jsx)(f,{size:`small`,style:{marginBottom:4,opacity:.7},children:`URL (should start with https://)`}),(0,M.jsx)(`input`,{value:r,onChange:e=>l(i*2+1,e.target.value),style:n(n({},t),{},{margin:12,marginLeft:0,fontSize:16,lineHeight:1.6})})]}),(0,M.jsx)(c,{bgKey:`a_puzmo`,colorKey:`keyFG`,title:`X`,onPress:()=>s(i),style:{margin:12}})]},i)),(0,M.jsx)(g,{bgKey:`a_puzmo`,colorKey:`keyFG`,title:`Add another link`,onPress:o,style:{display:`inline-flex`,marginTop:12}})]})}}))}),(0,M.jsx)(c,{bgKey:`a_puzmo`,colorKey:`keyFG`,title:N?`Updateâ¦`:`Update`,disabled:N,iconComponent:(0,M.jsx)(v,{width:15,fill:`keyFG`}),onPress:z.handleSubmit(I),style:{flex:1,maxWidth:300},block:!0})]})]})]})})}function L(e){return e.reduce(function(t,n,r){return r%2==0&&t.push(e.slice(r,r+2)),t},[])}export{I as default}; 29//# sourceMappingURL=UserPublishingProfileSettingsScreen.DiaIvOtO.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.