1"use strict";(self.webpackChunknyp_membership=self.webpackChunknyp_membership||[]).push([[8487],{8487:function(e,r,a){a.r(r),a.d(r,{AvatarColorForm:function(){return v}});var o=a(1085),t=a(4041),i=a(9067),l=a.n(i),s=a(7309),n=a(824),c=a(3486),u=a(7093),d=a(7661),p=a(7682),m=a(4120),f=a(7604);const b=({color:e,register:r,initials:a,colorName:t})=>(0,o.jsxs)("div",{className:"avatar-color__radio",children:[(0,o.jsx)("input",Object.assign({id:e.replace("#",""),type:"radio",value:e},r("avatarColor"))),(0,o.jsx)("label",{htmlFor:e.replace("#",""),className:`color_${e.replace("#","")}`,"data-value":a,"data-color":e,children:(0,o.jsx)("span",{className:"screen-reader-text",children:t})})]});b.propTypes={color:l().string.isRequired,register:l().func.isRequired,initials:l().string.isRequired,colorName:l().string.isRequired};var h=b;const v=({initials:e,updatePreviewColor:r,buttonDisabled:a})=>{const{state:i,dispatch:l}=(0,m.rR)(),{setVisible:b}=(0,p.Yc)(),{user:{profile:v={}}={}}=i,{clearErrors:y,register:_,handleSubmit:g,setError:x,watch:C,formState:{errors:j}}=(0,n.mN)({defaultValues:{avatarColor:v.avatarColor||"#000000"}}),N=C("avatarColor");return(0,t.useEffect)(()=>{var e;N&&(r(N),"zephr"===(null===(e=null==j?void 0:j.zephr)||void 0===e?void 0:e.type)&&y())},[N,y,j,r]),(0,o.jsxs)("form",{onSubmit:g(r=>{return a=void 0,o=[r],i=function*({avatarColor:r}){const a={avatarColor:r,imageUrl:(0,f.A)(r,e)};(yield(0,u.r7)(a))?(l((0,d.Uu)({color:r})),b(!1)):x("zephr",{type:"zephr",message:c.y.updatingProfile()})},new((t=void 0)||(t=Promise))(function(e,r){function l(e){try{n(i.next(e))}catch(e){r(e)}}function s(e){try{n(i.throw(e))}catch(e){r(e)}}function n(r){var a;r.done?e(r.value):(a=r.value,a instanceof t?a:new t(function(e){e(a)})).then(l,s)}n((i=i.apply(a,o||[])).next())});var a,o,t,i}),className:"member-display__form member-display__form--update update-avatar-color",children:[(0,o.jsxs)("fieldset",{children:[(0,o.jsx)("legend",{children:(0,s.__)("Select a color below.","nypost")}),(0,o.jsx)("ul",{className:"avatar-color__color-list",children:Object.entries({"#217b22":"Forest Green","#258064":"Eucalyptus","#1b6907":"Japanese Laurel","#1e6965":"Elm","#216a95":"Matisse","#1b5788":"Blumine","#1f2fe9":"Persian Blue","#2a2ad1":"Deeper Blue","#2c6aff":"Dodger Blue","#6127ff":"Bright Violet","#a341c7":"Amethyst","#7605f8":"Electric Violet","#6708d5":"Darker Violet","#6f0d93":"Purple","#930e6f":"Jazzberry Jam","#d53901":"Grenadier","#903131":"El Salva","#880a0b":"Monarch","#c93837":"Flush Mahogany","#dd1239":"Crimson","#ac5a09":"Pumpkin Skin","#f78908":"Tahiti Gold","#f9c04f":"Casablanca","#f7cb00":"Supernova","#f7f700":"Yellow","#62623c":"Hemlock","#585858":"Scorpion","#000000":"Black","#2f2222":"Cocoa Brown","#330606":"Rebel"}).map(([r,a])=>(0,o.jsx)("li",{id:`color_${r.replace("#","")}`,children:(0,o.jsx)(h,{color:r,colorName:a,register:_,initials:e})},r))})]}),(0,o.jsxs)("div",{className:"input-container input-container--submit",children:[(0,o.jsx)("button",{className:"button button--solid button--solid--alt",type:"submit",disabled:a,children:(0,s.__)("Update Display Avatar","nypost")}),(0,o.jsx)("button",{className:"button button--secondary",onClick:()=>{b(!1),r("")},type:"button",children:(0,s.__)("Cancel","nypost")})]})]})};v.propTypes={initials:i.PropTypes.string.isRequired,updatePreviewColor:i.PropTypes.func.isRequired,buttonDisabled:i.PropTypes.bool.isRequired}}}]); 2//# sourceMappingURL=8487.aa3d51e0981e32f911bf.bundle.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.