PageSourceSearch

https://www.soundguys.com/_next/static/chunks/pages/profile-3a91bf771469a52c.js

js soundguys.com collected 2026-10-01 10:19:07 UTC 30,223 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[277,44,2928],{7373:function(e,n,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile",function(){return a(92628)}])},94602:function(e,n,a){"use strict";a.d(n,{$L:function(){return i},YH:function(){return s},Z9:function(){return c},ab:function(){return o},cr:function(){return d},pQ:function(){return u},rv:function(){return l},ug:function(){return r}});var t=a(69513);function i(e){var n,a,t;return!e||e.count<=0?null:{count:e.count,buyAgain:e.buy_again,photoVerified:e.photo_verified,reads:null!==(n=e.reads)&&void 0!==n?n:[],hoursMedian:null!==(a=e.hours_median)&&void 0!==a?a:null,notes:null!==(t=e.top_notes)&&void 0!==t?t:e.top_note?[e.top_note]:[]}}function s(e){return e.buyAgain&&e.buyAgain.total>0?"".concat(e.buyAgain.yes," of ").concat(e.buyAgain.total," would buy again"):"".concat(e.count," owner").concat(1===e.count?"":"s")}function l(e,n){let a=[];if(e.buyAgain&&e.buyAgain.total>0&&a.push("".concat(e.count," owner").concat(1===e.count?"":"s")),e.photoVerified>0&&a.push("".concat(e.photoVerified," photo-verified")),null!==e.hoursMedian){let t="owners report ~".concat(e.hoursMedian," h per charge");a.push(null!==n?"".concat(t," vs ").concat(n," h claimed"):t)}return a.join(" \xb7 ")}function o(e,n){let a=n.reads;if(!a)return null;let t=null;for(let n of e.reads){let e=a[n.id];if(e){if("expected"!==e)return{id:n.id,label:n.label,value:e};t=null!=t?t:{id:n.id,label:n.label,value:e}}}return t}function r(e,n){let a=n.reads;if(!a)return[];let t=[];for(let n of e.reads){let e=a[n.id];e&&t.push({id:n.id,label:n.label,value:e})}return t}let c={better:"better",expected:"as expected",worse:"worse"},d={better:(0,t.kC)(c.better),expected:(0,t.kC)(c.expected),worse:(0,t.kC)(c.worse)};function u(e){return"expected"===e?c.expected:"".concat(c[e]," than expected")}},30044:function(e,n,a){"use strict";a.d(n,{M:function(){return s},p:function(){return l}});var t=a(93117),i=a(38142);async function s(e){let n=await t.cr.mintDevice(await e());return(0,i.Ut)(),n}async function l(e){(0,i.TL)()||await s(e)}},92628:function(e,n,a){"use strict";a.r(n),a.d(n,{__N_SSG:function(){return el},default:function(){return eo}});var t=a(52322),i=a(2784),s=a(5632),l=a(40489),o=a(73945),r=a(62434),c=a(97729),d=a.n(c),u=a(70551),m=a.n(u),h=a(14924),p=a.n(h),f=a(11728),g=a.n(f);let x=(0,i.forwardRef)((e,n)=>{let{type:a,value:i,required:s,onChange:o,placeholder:r,className:c,disabled:d,error:u}=e;return(0,t.jsx)("input",{ref:n,required:s,type:a,value:i,onChange:e=>null==o?void 0:o(e.target.value),placeholder:r,className:(0,l.Z)(g().container,c,{[g().error]:u}),disabled:d})});var v=a(9652),y=a(17601),j=a(50676),N=a(15144),_=a(36733),b=a(77357),w=a(73162),k=a(9212),C=a(19371),L=a.n(C);let S=[{provider:"google",label:"Google",mark:(0,t.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,t.jsx)("path",{fill:"#4285F4",d:"M23.5 12.3c0-.9-.1-1.5-.3-2.3H12v4.5h6.5c-.1 1.1-.8 2.7-2.4 3.8l3.7 2.9c2.3-2.1 3.7-5.2 3.7-8.9z"}),(0,t.jsx)("path",{fill:"#34A853",d:"M12 24c3.2 0 5.9-1.1 7.9-2.9l-3.7-2.9c-1 .7-2.4 1.2-4.2 1.2-3.1 0-5.8-2.1-6.7-5l-3.9 3C3.4 21.3 7.4 24 12 24z"}),(0,t.jsx)("path",{fill:"#FBBC05",d:"M5.3 14.4c-.3-.7-.4-1.5-.4-2.4s.1-1.7.4-2.4l-3.9-3C.5 8.1 0 10 0 12s.5 3.9 1.4 5.4l3.9-3z"}),(0,t.jsx)("path",{fill:"#EA4335",d:"M12 4.6c2.2 0 3.7 1 4.5 1.8l3.3-3.2C17.9 1.2 15.2 0 12 0 7.4 0 3.4 2.7 1.4 6.6l3.9 3c.9-2.9 3.6-5 6.7-5z"})]})},{provider:"x",label:"X",mark:(0,t.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{className:L().markInk,d:"M18.9 2h3.4l-7.4 8.5L23.6 22h-6.8l-5.4-7-6.1 7H1.9l7.9-9L1.6 2h7l4.8 6.4L18.9 2zm-1.2 18h1.9L7.4 3.9H5.4L17.7 20z"})})},{provider:"reddit",label:"Reddit",mark:(0,t.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10",fill:"#FF4500"}),(0,t.jsx)("ellipse",{cx:"12",cy:"13.6",rx:"5.6",ry:"3.8",fill:"#fff"}),(0,t.jsx)("circle",{cx:"9.8",cy:"12.9",r:"1",fill:"#FF4500"}),(0,t.jsx)("circle",{cx:"14.2",cy:"12.9",r:"1",fill:"#FF4500"}),(0,t.jsx)("circle",{cx:"17.3",cy:"8.4",r:"1.3",fill:"#fff"})]})}],T=["google"];var A=e=>{let{identities:n,linking:a,onLink:i,onUnlink:s}=e,o=n.length<=1,r=[...S,...n.filter(e=>!S.some(n=>n.provider===e.provider)).map(e=>({provider:e.provider,label:e.provider.charAt(0).toUpperCase()+e.provider.slice(1),mark:e.provider.charAt(0).toUpperCase()}))];
1return(0,t.jsxs)("section",{className:L().container,children:[(0,t.jsx)("h3",{className:L().title,children:"Sign-in methods"}),(0,t.jsx)("ul",{className:L().list,children:r.map(e=>{let r,{provider:c,label:d,mark:u}=e,m=n.find(e=>e.provider===c),h=T.includes(c);return r=m?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:L().chip,children:"Linked"}),h&&(0,t.jsx)("button",{className:L().action,type:"button",disabled:o||a,onClick:()=>{s(c)},children:"Unlink"})]}):h?(0,t.jsx)("button",{className:L().action,type:"button",disabled:a,onClick:()=>{i(c)},children:a?"Waiting...":"Link"}):(0,t.jsx)("span",{className:L().soon,children:"Coming soon"}),(0,t.jsxs)("li",{className:(0,l.Z)(L().row,{[L().rowLinked]:!!m}),children:[(0,t.jsx)("span",{className:L().mark,"aria-hidden":"true",children:u}),(0,t.jsxs)("div",{className:L().meta,children:[(0,t.jsx)("strong",{className:L().provider,children:d}),(0,t.jsx)("span",{className:L().detail,children:m?[m.email,"linked ".concat(function(e){try{return new Date(e).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}catch(e){return""}}(m.linkedAt))].filter(Boolean).join(" \xb7 "):"Not linked"})]}),r]},c)})}),(0,t.jsx)("p",{className:L().guard,children:o?"You need at least one sign-in method, so your only one can’t be removed.":"You can remove any of these, as long as one remains."})]})},I=a(49694),E=a.n(I),D=e=>{let{onError:n,onDeleted:a}=e,{authState:s,withAuth:l,requestFreshCredential:o,logout:r}=N.mB.useContainer(),{api:c}=b.h.useContainer(),{enqueue:d}=_.c.useContainer(),[u,m]=(0,i.useState)(!1),[h,p]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1);return(0,t.jsxs)("section",{className:E().container,children:[(0,t.jsx)("h3",{className:E().title,children:"Your data"}),(0,t.jsxs)("div",{className:E().row,children:[(0,t.jsxs)("div",{className:E().rowText,children:[(0,t.jsx)("strong",{children:"Download your data"}),(0,t.jsx)("span",{children:"Your profile, comments, the reports you filed, and your votes. Once a day."})]}),(0,t.jsx)("button",{className:E().action,type:"button",onClick:function(){c&&(m(!0),l(e=>c.downloadDataExport(e)).then(e=>{let{blob:n,filename:a}=e,t=URL.createObjectURL(n),i=document.createElement("a");i.href=t,i.download=null!=a?a:"commenthub-export.json",i.click(),URL.revokeObjectURL(t)}).catch(e=>{let a=e instanceof w.A?e.status:0,t=e instanceof w.A?e.code:null;429===a?d({msg:"You can export your data once a day. Try again tomorrow.",variant:"error",duration:5e3}):"EXPORT_TOO_LARGE"===t?d({msg:"Your archive is too large to prepare here. Contact support and we will deliver it to you directly.",variant:"error",duration:8e3}):n(e,"Could not prepare your data. Please try again."),(0,k.H)("Data export failed",e)}).finally(()=>{m(!1)}))},disabled:u,children:u?"Preparing...":"Download"})]}),(0,t.jsxs)("div",{className:E().row,children:[(0,t.jsxs)("div",{className:E().rowText,children:[(0,t.jsx)("strong",{children:"Delete your account"}),(0,t.jsx)("span",{children:"Removes your personal details. Your comments stay, shown as “Deleted user”."})]}),!h&&(0,t.jsx)("button",{className:E().danger,type:"button",onClick:()=>{p(!0)},children:"Delete account"})]}),h&&(0,t.jsxs)("div",{className:E().confirm,children:[(0,t.jsx)("strong",{className:E().confirmTitle,children:"Delete your account permanently?"}),(0,t.jsx)("p",{className:E().confirmBody,children:"Your email, name and sign-in methods are erased. Your comments remain on the site, attributed to “Deleted user”, so replies to them still make sense. This cannot be undone."}),(0,t.jsx)("p",{className:E().confirmBody,children:"You’ll be asked to sign in with Google once more to confirm it’s really you."}),(0,t.jsxs)("div",{className:E().confirmActions,children:[(0,t.jsx)("button",{className:E().danger,type:"button",onClick:function(){if(!c||!s)return;let{token:e}=s;g(!0),o().then(n=>c.deleteAccount(e,"google",n)).then(async()=>{d({msg:"Your account has been deleted",variant:"success",duration:5e3}),await r(),a()}).catch(e=>{if(e instanceof Error&&/dismissed|Superseded/.test(e.message))return;let a=e instanceof w.A?e.code:null;"CREDENTIAL_MISMATCH"===a?d({msg:"That Google account isn’t linked to this profile. Confirm with the account you sign in with here.",variant:"error",duration:6e3}):"NOT_CONFIGURED"===a||"PROVIDER_UNSUPPORTED"===a?d({msg:"Account deleti
1on is temporarily unavailable. Please try again later.",variant:"error",duration:5e3}):"INVALID_TOKEN"===a?d({msg:"We couldn’t verify it was you. Please try again.",variant:"error",duration:5e3}):n(e,"Could not delete your account. Please try again."),(0,k.H)("Account deletion failed",e)}).finally(()=>{g(!1),p(!1)})},disabled:f,children:f?"Deleting...":"Yes, delete my account"}),(0,t.jsx)("button",{className:E().action,type:"button",onClick:()=>{p(!1)},disabled:f,children:"Cancel"})]})]})]})},R=a(56570);let P=e=>{var n,a,o,r;let{page:c}=e,{enqueue:d}=_.c.useContainer(),{authState:u,authResolved:h,withAuth:f,applySessionUser:g,showLogIn:C}=N.mB.useContainer(),{colors:L}=y.I.useContainer(),{api:S}=b.h.useContainer(),{common:{homeLink:T}}=j.F.useContainer(),I=(0,s.useRouter)(),[E,P]=(0,i.useState)(null),[F,U]=(0,i.useState)(""),[Y,O]=(0,i.useState)(!1),[B,H]=(0,i.useState)(!1),Z=(0,i.useRef)(null),M=(0,i.useRef)(null);function G(e){var n;P(e),U(null!==(n=e.user.displayName)&&void 0!==n?n:""),g(e.user)}let K=null==u?void 0:u.token;function V(e,n){let a=e instanceof w.A?e.code:null,t=e instanceof w.A?e.status:0,i=n;"INVALID_DISPLAY_NAME"===a?i="That name can’t be used. Try 1–50 characters without special symbols.":"LAST_IDENTITY"===a?i="This is your only way to sign in. Link another account before removing it.":"IDENTITY_IN_USE"===a?i="That account is already linked to a different profile.":429===t&&(i="Too many attempts. Please wait a moment and try again."),d({msg:i,variant:"error",duration:5e3})}function z(){S&&f(e=>S.getProfile(e)).then(G).catch(e=>{(0,k.H)("Failed to load profile",e)})}function q(){null!==M.current&&(window.clearInterval(M.current),M.current=null),Z.current=null}(0,i.useEffect)(()=>{if(!S||!K)return;let e=!0;return f(e=>S.getProfile(e)).then(n=>{e&&G(n)}).catch(e=>{(0,k.H)("Failed to load profile",e)}),()=>{e=!1}},[S,K]),(0,i.useEffect)(()=>{if(S)return window.addEventListener("message",e),()=>{window.removeEventListener("message",e),q()};function e(e){if(!S||e.origin!==S.origin)return;let n=e.data;if(!n||"conversations:link"!==n.type)return;if(q(),H(!1),n.ok){d({msg:"Sign-in method linked",variant:"success",duration:3e3}),z();return}let a="Could not link that account. Please try again.";"INVALID_TOKEN"===n.code?a="That took too long and the request expired. Please try again.":"IDENTITY_IN_USE"===n.code?a="That account is already linked to a different profile.":"PROVIDER_ALREADY_LINKED"===n.code?a="A different account of that kind is already linked. Unlink it first.":("NOT_CONFIGURED"===n.code||"PROVIDER_UNSUPPORTED"===n.code)&&(a="Linking is temporarily unavailable. Please try again later."),d({msg:a,variant:"error",duration:5e3})}},[S]);let W=null!==(a=null==E?void 0:null===(n=E.identities[0])||void 0===n?void 0:n.name)&&void 0!==a?a:null,X=F.trim(),Q=""===X?null:X,J=Q!==(null!==(o=null==E?void 0:E.user.displayName)&&void 0!==o?o:null),$=X.length>50,ee=null!==(r=null==E?void 0:E.user.displayName)&&void 0!==r?r:"",en=E?function(e){try{return new Date(e).toLocaleDateString(void 0,{month:"long",year:"numeric"})}catch(e){return""}}(E.user.createdAt):"";return(0,t.jsxs)("div",{className:(0,l.Z)(m().wrapper,p().container,{[p().pending]:Y}),children:[(0,t.jsx)("button",{className:p().backButton,type:"button",onClick:()=>{window.history.length>1&&document.referrer&&new URL(document.referrer).origin===window.location.origin?I.back():I.push(T.href)},children:"← ".concat(c.strings.backButton)}),!E&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h1",{className:p().title,children:c.title}),!h&&(0,t.jsx)("div",{className:p().notice,children:"Loading profile..."}),h&&!u&&(0,t.jsxs)("div",{className:p().notice,children:["Sign in to manage your account. ",(0,t.jsx)("button",{className:p().inlineAction,type:"button",onClick:()=>{C()},children:"Sign in"})]}),u&&(0,t.jsx)("div",{className:p().notice,children:"Loading profile..."})]}),E&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("header",{className:p().idHead,children:[(0,t.jsx)("span",{className:(0,l.Z)(p().avatar,{[p().avatarSG]:"soundguys"===L}),"aria-hidden":"true",children:(0,t.jsx)(R.Z,{src:E.user.avatarUrl,name:ee,initials:2,lazy:!1,fallback:"text"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:p().idName,children:ee}),(0,t.jsxs)("p",{className:p().idMeta,children:[en?"Member since ".concat(en," \xb7 "):"","How you appear when you comment"]})]})]}),(0,t.jsxs)("section",{className:p().card,children:[(0,t.jsx)("h3",{className:p().cardTitle,children:"Profile"}),(0,t.jsxs)("form",{className:p().form,onSubmit:e=>{e.preventDefault(),S&&J&&!$&&(O(!0),f(e=>S.updateProfile(e,Q)).then(e=>{G(e),d({msg:"Profile updated",variant:"success",duration:3e3})}).catch(e=>{V(e,"Could not save your profile. Please try again."),(0,k.H)("Failed to update profile",e)}).finally(()=>{O(!1)}))},children:[(0,t.jsxs)("label",{className:p().fieldRow,children:[(0,t.jsxs)("span",{className:p().labelLine,children:[c.strings.displayNameInput,"custom"===E.displayNameSource?(0,t.jsx)("span",{className:(0,l.Z)(p().badge,p().badgeCustom),children:"Custom"}):(0,t.jsx)("span",{className:p().badge,children:"From Google"})]}),(0,t.jsx)(x,{type:"text",placeholder:null!=W?W:c.strings.displayNameInput,value:F,onChange:U}),(0,t.jsx)("span",{className:p().fieldHint,children:"custom"===E.displayNameSource?(0,t.jsxs)(t.Fragment,{children:["Kept as you set it. ",W&&(0,t.jsx)("button",{className:p().inlineAction,type:"button",onClick:()=>{U("")},children:'Use "'.concat(W,'" instead')})]}):"Updates automatically when your Google name changes. Type your own to keep it."}),$&&(0,t.jsx)("span",{className:p().fieldError,children:"Keep it to ".concat(50," characters or fewer.")})]}),(0,t.jsxs)("label",{className:p().fieldRow,children:[(0,t.jsx)("span",{className:p().labelLine,children:c.strings.emailInput}),(0,t.jsx)(x,{disabled:!0,type:"email",placeholder:c.strings.emailInput,value:E.user.email}),(0,t.jsx)("span",{className:p().fieldHint,children:"Comes from your sign-in method. Never shown publicly."})]}),(0,t.jsx)("div",{className:p().cardFoot,children:(0,t.jsx)(v.Z,{disabled:!J||$||Y,variant:"secondary",size:"medium",type:"submit",className:p().submitButton,children:c.strings.saveButton})})]})]}),(0,t.jsx)(A,{identities:E.identities,linking:B,onLink:function(e){if(!S||B)return;let n=window.open("about:blank","commenthub-link","popup,width=480,height=640");if(!n){d({msg:"Your browser blocked the sign-in window. Allow pop-ups for this site and try again.",variant:"error",duration:5e3});return}H(!0),Z.current=n,M.current=window.setInterval(()=>{var e;(null===(e=Z.current)||void 0===e?void 0:e.closed)&&(q(),H(!1))},500),f(e=>S.createLinkTicket(e)).then(a=>{let{ticket:t}=a;n.location.href=S.identityLinkUrl(e,t,window.location.href)}).catch(e=>{n.close(),q(),H(!1),V(e,"Could not start linking. Please try again."),(0,k.H)("Failed to create link t
1icket",e)})},onUnlink:function(e){S&&f(n=>S.unlinkIdentity(n,e)).then(e=>{G(e),d({msg:"Sign-in method removed",variant:"success",duration:3e3})}).catch(e=>{e instanceof w.A&&"NOT_LINKED"===e.code&&z(),V(e,"Could not remove that sign-in method."),(0,k.H)("Failed to unlink identity",e)})}}),(0,t.jsx)(D,{onError:V,onDeleted:()=>{I.push(T.href)}})]})]})};var F=a(58621),U=a.n(F),Y=a(16452),O=a(83085),B=a(46704),H=a(25394),Z=a.n(H),M=e=>{let{title:n,text:a}=e,{showLogIn:i}=(0,B.S)();return(0,t.jsxs)("div",{className:Z().root,children:[(0,t.jsx)("h2",{className:Z().title,children:n}),(0,t.jsx)("p",{className:Z().text,children:a}),(0,t.jsx)("button",{type:"button",className:Z().primary,onClick:()=>void i(),children:"Sign in with Google"})]})},G=a(4419),K=a(92870),V=a(59702),z=a(67574),q=a(74075),W=a(28694),X=a(93117),Q=a(76501),J=a(38142),$=a(69513),ee=a(83397);let en={taken:"That one is taken.",reserved:"That one is reserved."};var ea=()=>{let[e,n]=(0,i.useState)(null),[a,s]=(0,i.useState)("loading"),{signedIn:o,resolved:r}=(0,B.S)(),[c,d]=(0,i.useState)(null),[u,m]=(0,i.useState)(""),[h,p]=(0,i.useState)(null),[f,g]=(0,i.useState)([]),[x,v]=(0,i.useState)(!1),[y,j]=(0,i.useState)(null),[N,_]=(0,i.useState)(null),[b,w]=(0,i.useState)(!1),[k,C]=(0,i.useState)(null),L=(0,Q.Ac)(null),S=(0,Q.Hn)(),T=(0,z.m)("useTrailingSlash"),A=(0,i.useCallback)(async()=>{if(!(0,J.TL)()){s("none");return}try{let e=await X.cr.me();n(e),s("ready"),e.unread_count>0&&X.cr.markNotificationsRead().catch(()=>void 0)}catch(e){s(e instanceof X.rA&&401===e.status?"none":"error")}},[]),I=(0,J.rj)();(0,i.useEffect)(()=>{A()},[A,I]),(0,i.useEffect)(()=>{if("ready"===a&&window.location.hash==="#".concat($.F3)){var e;null===(e=document.getElementById($.F3))||void 0===e||e.scrollIntoView({block:"start"})}},[a]);let E=async(a,t)=>{let i=null==e?void 0:e.settings;if(i&&!b){w(!0),C(null),n(e=>e?{...e,settings:{...i,[a]:t}}:e);try{let e=await X.cr.updateSettings({[a]:t});n(n=>n?{...n,settings:e.settings}:n),S("setting_changed",{label:a,action:t?"on":"off",auth_state:"linked"})}catch(e){n(e=>e?{...e,settings:i}:e),C(e instanceof X.rA&&e.message?e.message:$.K1.saveFailed)}finally{w(!1)}}},D=()=>u.trim().replace(/^@/,"").toLowerCase(),R=()=>{let e=D();if(!W.hk.test(e)){p("3–18 letters, numbers or underscores.");return}p(null),j(e)},P=async()=>{let e=null!=y?y:D();j(null),v(!0),p(null),g([]);try{let a=await X.cr.rename(e);n(e=>e?{...e,profile:{...e.profile,handle:a.handle,can_rename:!1},shelf:e.shelf.map(e=>({...e,note:{...e.note,handle:a.handle}}))}:e),m(""),_(a.handle)}catch(e){if(e instanceof X.rA){var a;p(null!==(a=en[e.code])&&void 0!==a?a:e.message),g(e.suggestions)}else p("Could not rename — try again.")}finally{v(!1)}};if("loading"===a)return(0,t.jsx)("p",{className:U().fine,children:"Loading your gear…"});if("none"===a&&!o)return r?(0,t.jsx)(M,{title:"Sign in to see your gear",text:"Your owner notes and the products you own are kept with your account. This browser has none of them yet."}):(0,t.jsx)("p",{className:U().fine,children:"Loading your gear…"});if("none"===a||!e)return(0,t.jsxs)("div",{className:U().empty,children:[(0,t.jsx)("h2",{className:U().h2,children:"My gear"}),(0,t.jsx)("p",{className:U().text,children:"error"===a?"We couldn't load your gear just now — try again in a moment.":"Nothing here yet. Declare a product you own on any category page, or leave an owner note on a product page, and it shows up here."})]});let{profile:F,shelf:H,notifications:Z}=e,ea=(0,ee.Ue)(H),et=H.filter(e=>"published"===e.note.status).length;return(0,t.jsxs)("div",{className:U().root,children:[(0,t.jsxs)("div",{className:U().profileRow,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:U().h2,children:"My gear"}),(0,t.jsxs)("p",{className:U().text,children:["Your notes appear as ",(0,t.jsx)(G.Z,{hint:K.HW,children:(0,t.jsx)("strong",{children:"@".concat(F.handle)})}),F.claimed?F.email_masked?" \xb7 linked to ".concat(F.email_masked):" \xb7 linked to your account":" \xb7 on this device only"]}),N&&(0,t.jsx)("p",{className:U().fine,children:"Done — every note of yours now shows @".concat(N,". That was your one change.")}),F.claimed&&!F.can_rename&&!N&&(0,t.jsx)("p",{className:U().fine,children:"Your pseudonym is set — it can’t be changed again."})]}),!F.claimed&&(0,t.jsx)(O.Z,{trackOwner:L,location:"profile",lead:"Keep your pseudonym and your notes on every device — sign in once.",onClaimed:()=>void A(),className:U().claim})]}
1),F.claimed&&F.can_rename&&(0,t.jsxs)("form",{className:U().rename,onSubmit:e=>{e.preventDefault(),R()},children:[(0,t.jsx)("label",{className:U().label,htmlFor:"owner-handle",children:"Choose your pseudonym"}),(0,t.jsx)("p",{className:U().fine,children:"You can change it once, and it replaces the pseudonym on all your notes, old and new."}),(0,t.jsxs)("div",{className:U().renameRow,children:[(0,t.jsx)("span",{className:U().at,children:"@"}),(0,t.jsx)("input",{id:"owner-handle",type:"text",className:U().input,value:u,maxLength:18,placeholder:F.handle,autoComplete:"off",onChange:e=>{m(e.target.value),j(null)}}),(0,t.jsx)("button",{type:"submit",className:U().btn,disabled:x||!u.trim()||null!==y,children:x?"Saving…":"Use this"})]}),y&&(0,t.jsxs)("p",{className:U().text,role:"alert",children:["Use @".concat(y,"? This is your one change — it can’t be undone. "),(0,t.jsx)("button",{type:"button",className:U().btn,disabled:x,onClick:()=>void P(),children:"Yes, use it"})," ",(0,t.jsx)("button",{type:"button",className:U().suggestion,disabled:x,onClick:()=>j(null),children:"Cancel"})]}),h&&(0,t.jsx)("p",{className:U().error,children:h}),f.length>0&&(0,t.jsxs)("p",{className:U().fine,children:["Free: ",f.map(e=>(0,t.jsx)("button",{type:"button",className:U().suggestion,onClick:()=>m(e),children:"@".concat(e)},e))]}),(0,t.jsx)("p",{className:U().fine,children:"3–18 letters, numbers or underscores. This is the one change allowed."})]}),(0,t.jsxs)("section",{className:U().block,"aria-label":"Your notes",children:[(0,t.jsx)("h3",{className:U().h3,children:H.length?"Your notes (".concat(H.length,")"):"Your notes"}),0===H.length&&(0,t.jsx)("p",{className:U().text,children:"No notes yet — find a product you own and leave one."}),ea&&(0,t.jsxs)("div",{className:U().viewsStrip,"aria-label":"Readers of your notes",children:[(0,t.jsxs)("div",{className:U().viewsCell,children:[(0,t.jsx)("span",{className:U().viewsValue,children:ea.total.toLocaleString("en-US")}),(0,t.jsx)("span",{className:U().viewsLabel,children:"Readers"})]}),(0,t.jsxs)("div",{className:U().viewsCell,children:[(0,t.jsx)("span",{className:U().viewsValue,children:ea.week.toLocaleString("en-US")}),(0,t.jsx)("span",{className:U().viewsLabel,children:"Last 7 days"})]}),(0,t.jsxs)("div",{className:U().viewsCell,children:[(0,t.jsx)("span",{className:U().viewsValue,children:et}),(0,t.jsx)("span",{className:U().viewsLabel,children:1===et?"Note live":"Notes live"})]})]}),(0,t.jsx)("div",{className:U().shelf,children:H.map(n=>{var a,i;return null!==c&&c.node_id===n.node_id?(0,t.jsx)(V.default,{product:{nodeId:n.node_id,name:n.node_name},existing:n.note,location:"section",trackOwner:L,onClose:()=>d(null),me:e,onResult:()=>void A(),onClaimed:()=>void A()},n.node_id):(0,t.jsxs)("div",{className:U().shelfItem,children:[(0,t.jsxs)("div",{className:U().shelfHead,children:[n.image_url&&(0,t.jsx)("img",{className:U().thumb,src:n.image_url,alt:"",width:40,height:40,loading:"lazy"}),n.node_slug?(0,t.jsx)("a",{className:U().shelfName,href:(0,q.lc)(n.node_slug,null!==(a=n.brand_name)&&void 0!==a?a:null,T,null!==(i=n.brand_slug)&&void 0!==i?i:null),children:n.node_name}):(0,t.jsx)("span",{className:U().shelfName,children:n.node_name})]}),(0,t.jsx)(Y.Z,{note:n.note,claimed:F.claimed,trackOwner:L,location:"profile",views:n.views,onEdit:()=>d(n),onDeleted:()=>void A(),onClaimed:()=>void A(),onAppealed:()=>void A()})]},n.node_id)})})]}),(0,t.jsxs)("section",{id:$.F3,className:(0,l.Z)(U().block,U().anchored),"aria-label":"Notifications",children:[(0,t.jsx)("h3",{className:U().h3,children:"Notifications"}),F.claimed&&e.settings&&(0,t.jsxs)("div",{className:U().emailSetting,children:[(0,t.jsxs)("div",{className:U().settingRow,children:[(0,t.jsx)("input",{id:"owner-email-note-updates",type:"checkbox",role:"switch",className:U().settingInput,checked:e.settings.email_note_updates,disabled:b,onChange:e=>void E("email_note_updates",e.target.checked)}),(0,t.jsxs)("label",{className:U().settingText,htmlFor:"owner-email-note-updates",children:[(0,t.jsx)("span",{className:U().settingLabel,children:$.K1.label}),(0,t.jsx)("span",{className:U().fine,children:$.K1.detail(F.email_masked)})]})]}),!e.settings.email_note_updates&&(0,t.jsx)("p",{className:U().fine,children:$.K1.offLine}),"boolean"==typeof e.settings.email_view_milestones&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:U().settingRow,
1children:[(0,t.jsx)("input",{id:"owner-email-view-milestones",type:"checkbox",role:"switch",className:U().settingInput,checked:e.settings.email_view_milestones,disabled:b,onChange:e=>void E("email_view_milestones",e.target.checked)}),(0,t.jsxs)("label",{className:U().settingText,htmlFor:"owner-email-view-milestones",children:[(0,t.jsx)("span",{className:U().settingLabel,children:$.K1.milestonesLabel}),(0,t.jsx)("span",{className:U().fine,children:$.K1.milestonesDetail})]})]}),!e.settings.email_view_milestones&&(0,t.jsx)("p",{className:U().fine,children:$.K1.milestonesOffLine})]}),k&&(0,t.jsx)("p",{className:U().error,children:k})]}),0===Z.length?(0,t.jsx)("p",{className:U().text,children:"Decisions on your notes and photos show up here."}):(0,t.jsx)("ul",{className:U().notifications,children:Z.map(e=>(0,t.jsxs)("li",{className:(0,l.Z)(U().notification,{[U().unread]:!e.read}),children:[(0,t.jsx)("span",{className:U().notificationWhen,children:new Date(e.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})}),(0,t.jsxs)("span",{className:U().notificationText,children:[(0,t.jsx)("strong",{children:e.node_name})," — ",e.message]})]},e.id))}),!F.claimed&&(0,t.jsx)("p",{className:U().fine,children:"Sign in above to also get these by email."})]})]})},et=a(1648),ei=a.n(et);let es=[{id:"profile",label:"Profile"},{id:"gear",label:"My gear"}];var el=!0,eo=e=>{let{preview:n,common:a,ts:c}=e,u=(0,s.useRouter)(),{authState:m,authResolved:h}=N.Vo.useContainer(),[p,f]=(0,i.useState)(null);(0,i.useEffect)(()=>{u.isReady&&f(e=>null!=e?e:(0,$.Fm)(u.query.tab,window.location.hash)?"gear":"profile")},[u.isReady,u.query.tab]);let g={sections:null,ampPagePath:null,head:{dataLayer:null,metaTitle:"Profile",metaTags:[],canonicalLink:null,jsonLd:[]},pagePath:a.profileLink.href,meta:{engagementContainerId:null,disabledAds:!1,topics:[],dataLayer:null,subscribeTags:["Profile"],tags:[],categories:[],postId:null,sponsor:null,sponsored:!1}};return(0,t.jsxs)(o.Z,{layoutProps:{},layout:r.Z,props:{preview:n,page:g,common:a,ts:c,rss:!1},children:[(0,t.jsx)(d(),{children:(0,t.jsx)("meta",{name:"robots",content:"noindex"})}),(0,t.jsx)("div",{className:ei().tabs,role:"tablist","aria-label":"Profile sections",children:es.map(e=>(0,t.jsx)("button",{type:"button",role:"tab","aria-selected":p===e.id,className:(0,l.Z)(ei().tab,{[ei().tabOn]:p===e.id}),onClick:()=>f(e.id),children:e.label},e.id))}),"gear"===p&&(0,t.jsx)("div",{className:ei().panel,role:"tabpanel",children:(0,t.jsx)(ea,{})}),"profile"===p&&!m&&(0,t.jsx)("div",{className:ei().panel,role:"tabpanel",children:h?(0,t.jsx)(M,{title:"Sign in to see your profile",text:"Your SoundGuys profile and your owner notes live behind your sign-in."}):(0,t.jsx)("p",{className:ei().checking,children:"Checking your sign-in…"})}),"profile"===p&&m&&(0,t.jsx)(P,{page:{title:"Profile",strings:{displayNameInput:"Display Name",emailInput:"Email",backButton:"Back",saveButton:"Save"}}})]})}},56570:function(e,n,a){"use strict";var t=a(52322),i=a(40489),s=a(2784),l=a(25132),o=a.n(l);n.Z=e=>{let{src:n,name:a,initials:l=1,size:r,color:c,alt:d="",lazy:u=!0,className:m,fallbackClassName:h,fallback:p="div"}=e,[f,g]=(0,s.useState)(!1),x=r?o()["s".concat(r)]:void 0;if(n&&!f)return(0,t.jsx)("img",{className:(0,i.Z)(r&&o().avatar,x,m)||void 0,src:n,alt:d,loading:u?"lazy":void 0,referrerPolicy:"no-referrer",onError:()=>{g(!0)}});let v=1===l?a.charAt(0).toUpperCase():a.trim().split(/\s+/).filter(Boolean).slice(0,2).map(e=>{var n;return(null!==(n=e[0])&&void 0!==n?n:"").toUpperCase()}).join("");return"text"===p?(0,t.jsx)(t.Fragment,{children:v}):(0,t.jsx)(p,{className:(0,i.Z)(r&&[o().avatar,o().fallback],x,m,h)||void 0,style:c?{backgroundColor:c}:void 0,"aria-hidden":"true",children:v})}},58621:function(e){e.exports={root:"e_jd",empty:"e_kd",h2:"e_ld",h3:"e_md",text:"e_nd",fine:"e_od",error:"e_pd",profileRow:"e_qd",rename:"e_rd",label:"e_sd",renameRow:"e_td",at:"e_ud",input:"e_vd",btn:"e_wd",suggestion:"e_xd",block:"e_yd",shelf:"e_zd",shelfItem:"e_Ad",shelfHead:"e_Bd",thumb:"e_Cd",shelfName:"e_Dd",notifications:"e_Ed",notification:"e_Fd",unread:"e_Gd",notificationWhen:"e_Hd",notificationText:"e_Id",anchored:"e_Jd",emailSetting:"e_Kd",settingRow:"e_Ld",settingInput:"e_Md",settingText:"e_Nd",settingLabel:"e_Od",viewsStrip:"e_Pd",viewsCell:"e_Qd",viewsValue:"e_Rd",viewsLabel:"e_Sd",claim:"e_Td"}},25394:function(e){e.exports={root:"e_Oc",title:"e_Pc",text:"e_Qc",primary:"e_Rc"}},1648:function(e){e.exports={tabs:"e_x",tab:"e_y",tabOn:"e_z",panel:"e_A",checking:"e_B"}},25132:function(e){e.exports={avatar:"e_Fp",fallback:"e_Gp",s40:"e_Hp",s32:"e_Ip"}},11728:function(e){e.exports={container:"e_ln",error:"e_mn"}},14924:function(e){e.exports={container:"e_Wc",pending:"e_Xc",backButton:"e_Yc",title:"e_Zc",notice:"e__c",idHead:"e_0c",avatar:"e_1c",avatarSG:"e_2c",idName:"e_3c",idMeta:"e_4c",card:"e_5c",cardTitle:"e_6c",form:"e_7c",fieldRow:"e_8c",labelLine:"e_9c",badge:"e_-c",badgeCustom:"e_ad",fieldHint:"e_bd",fieldError:"e_cd",inlineAction:"e_dd",cardFoot:"e_ed",submitButton:"e_fd"}},49694:function(e){e.exports={container:"e_nn undefined",title:"e_on undefined",row:"e_pn",rowText:"e_qn",action:"e_rn",danger:"e_sn",confirm:"e_tn",confirmTitle:"e_un",confirmBody:"e_vn",confirmActions:"e_wn"}},19371:function(e){e.exports={container:"e_fm undefined",title:"e_gm undefined",list:"e_hm",row:"e_im",rowLinked:"e_jm",mark:"e_km",markInk:"e_lm",meta:"e_mm",provider:"e_nm",detail:"e_om",chip:"e_pm",soon:"e_qm",action:"e_rm",guard:"e_sm"}}},function(e){e.O(0,[743,2624,9513,9861,9702,2888,9774,179],function(){return e(e.s=7373)}),_N_E=e.O()}]);
2//# sourceMappingURL=profile-3a91bf771469a52c.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.