PageSourceSearch

https://npacontest.com/_next/static/chunks/pages/profile-680770c658fb924a56c4.js

js npacontest.com collected 2026-09-29 10:00:38 UTC 14,567 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[277],{96874:function(e){e.exports=function(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}},34865:function(e,n,r){var t=r(89465),i=r(77813),o=Object.prototype.hasOwnProperty;e.exports=function(e,n,r){var a=e[n];o.call(e,n)&&i(a,r)&&(void 0!==r||n in e)||t(e,n,r)}},89465:function(e,n,r){var t=r(38777);e.exports=function(e,n,r){"__proto__"==n&&t?t(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r}},21078:function(e,n,r){var t=r(62488),i=r(37285);e.exports=function e(n,r,o,a,s){var c=-1,l=n.length;for(o||(o=i),s||(s=[]);++c<l;){var u=n[c];r>0&&o(u)?r>1?e(u,r-1,o,a,s):t(s,u):a||(s[s.length]=u)}return s}},25970:function(e,n,r){var t=r(63012),i=r(79095);e.exports=function(e,n){return t(e,n,(function(n,r){return i(e,r)}))}},63012:function(e,n,r){var t=r(97786),i=r(10611),o=r(71811);e.exports=function(e,n,r){for(var a=-1,s=n.length,c={};++a<s;){var l=n[a],u=t(e,l);r(u,l)&&i(c,o(l,e),u)}return c}},10611:function(e,n,r){var t=r(34865),i=r(71811),o=r(65776),a=r(13218),s=r(40327);e.exports=function(e,n,r,c){if(!a(e))return e;for(var l=-1,u=(n=i(n,e)).length,d=u-1,f=e;null!=f&&++l<u;){var p=s(n[l]),h=r;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(l!=d){var m=f[p];void 0===(h=c?c(m,p,f):void 0)&&(h=a(m)?m:o(n[l+1])?[]:{})}t(f,p,h),f=f[p]}return e}},56560:function(e,n,r){var t=r(75703),i=r(38777),o=r(6557),a=i?function(e,n){return i(e,"toString",{configurable:!0,enumerable:!1,value:t(n),writable:!0})}:o;e.exports=a},38777:function(e,n,r){var t=r(10852),i=function(){try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch(n){}}();e.exports=i},99021:function(e,n,r){var t=r(85564),i=r(45357),o=r(30061);e.exports=function(e){return o(i(e,void 0,t),e+"")}},37285:function(e,n,r){var t=r(62705),i=r(35694),o=r(1469),a=t?t.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},45357:function(e,n,r){var t=r(96874),i=Math.max;e.exports=function(e,n,r){return n=i(void 0===n?e.length-1:n,0),function(){for(var o=arguments,a=-1,s=i(o.length-n,0),c=Array(s);++a<s;)c[a]=o[n+a];a=-1;for(var l=Array(n+1);++a<n;)l[a]=o[a];return l[n]=r(c),t(e,this,l)}}},30061:function(e,n,r){var t=r(56560),i=r(21275)(t);e.exports=i},21275:function(e){var n=Date.now;e.exports=function(e){var r=0,t=0;return function(){var i=n(),o=16-(i-t);if(t=i,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},75703:function(e){e.exports=function(e){return function(){return e}}},85564:function(e,n,r){var t=r(21078);e.exports=function(e){return(null==e?0:e.length)?t(e,1):[]}},78718:function(e,n,r){var t=r(25970),i=r(99021)((function(e,n){return null==e?{}:t(e,n)}));e.exports=i},37379:function(e,n,r){"use strict";var t=r(92809),i=r(10219),o=(r(67294),r(83840)),a=r(97469),s=r.n(a),c=r(85893),l=["name","className"];function u(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function d(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?u(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}n.Z=function(e){var n=e.name,r=e.className,t=(0,i.Z)(e,l);return(0,c.jsx)("span",d(d({className:(0,o.Z)([s().categoryName,r])},t),{},{children:n}))}},63428:function(e,n,r){"use strict";r.r(n),r.d(n,{__N_SSP:function(){return R},default:function(){return F}});var t=r(30266),i=r(92809),o=r(809),a=r.n(o),s=r(67294),c=r(52371),l=r(48193),u=r(9008),d=r(37170),f=r(99697),p=r(45767),h=r(26905),m=r.n(h),x=r(78718),v=r.n(x),y=r(424),j=r(49047),g=r(78961),b=r(6705),w=r(5152),k=r(41664),_=r(63992),O=r.n(_),P=r(37379),I=r(85893),C=((0,w.default)((function(){return r.e(1423).then(r.bind(r,21423))}),{ssr:!1,loadableGenerated:{webpack:function(){return[21423]},modules:["../components/works/MyWorksListItem.js -> ../../components/modal/Modal"]}}),function(e){var n=e.image,r=e.name,i=e.description,o=e.id,c=e.onDeleted,l=e.categoryName,u=(0,s.use
1State)(!1),f=(u[0],u[1],(0,s.useState)(!1)),p=(f[0],f[1]);(0,s.useCallback)((0,t.Z)(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return p(!0),e.prev=1,e.next=4,(0,d._i)("/api/works/".concat(o),"DELETE");case 4:c(),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(1),p(!1),console.dir(e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,7]])}))),[o]);return(0,I.jsx)(I.Fragment,{children:(0,I.jsx)("div",{className:O().wrap,children:(0,I.jsx)(k.default,{href:"/profile/work/[id]",as:"/profile/work/".concat(o),children:(0,I.jsxs)("a",{className:O().item,children:[(0,I.jsx)("img",{className:O().img,alt:r,src:n&&n.scaledFile}),(0,I.jsxs)("div",{className:O().workInfo,children:[(0,I.jsx)(P.Z,{name:l}),(0,I.jsx)("div",{className:O().title,children:r}),(0,I.jsx)("div",{className:O().description,children:i})]})]})})})})});C.defaultProps={onDeleted:d.ZT};var Z=C,S=r(83840),N=r(86086),L=r.n(N),M=function(e){var n=e.categories,r=e.selectedCategory,t=e.onCategoryChange;return(0,I.jsx)("div",{className:L().filter,children:n.map((function(e,n){var o=e["@id"],a=r===o;return(0,I.jsx)("div",{onClick:function(){return t(e)},className:(0,S.Z)([L().item,(0,i.Z)({},L().activeItem,a)]),children:e.title},o)}))})};function E(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function D(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?E(Object(r),!0).forEach((function(n){(0,i.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var A=(0,w.default)((function(){return r.e(1423).then(r.bind(r,21423))}),{ssr:!1,loadableGenerated:{webpack:function(){return[21423]},modules:["profile/index.js -> ../../components/modal/Modal"]}}),W=g.Ry({fullname:g.Z_().required(d.ro),email:g.Z_().email().required(d.ro),phone:g.Z_(),country:g.Z_().required(d.ro),facebookLink:g.Z_().url(d.Ov),instagramLink:g.Z_().url(d.Ov),workPlace:g.Z_().required(d.ro),nationality:g.Z_()}),T=function(e){var n=e.worksSwr,r=e.nominations,t=e.categories,i=(0,s.useMemo)((function(){return n.data["hydra:member"]||[]}),[n.data]),o=(0,s.useMemo)((function(){return r["hydra:member"]||[]}),[r]),a=(0,s.useMemo)((function(){return t["hydra:member"]||[]}),[t]),c=(0,s.useState)(o[0]["@id"]),l=c[0],u=c[1],d=(0,s.useMemo)((function(){return i.filter((function(e){return e.nomination===l}))}),[i,l]),h=(0,s.useMemo)((function(){var e=a.find((function(e){return d.some((function(n){return n.workCategory===e["@id"]}))}));return null!==e&&void 0!==e?e:a[0]}),[a]),m=(0,s.useState)(h),x=m[0],v=m[1],y=(0,s.useMemo)((function(){return d.filter((function(e){return e.workCategory===x["@id"]}))}),[d,x]);return(0,I.jsxs)("div",{children:[(0,I.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",margin:"80px 0 30px",flexWrap:"wrap"},children:[(0,I.jsx)("h2",{style:{margin:0},children:"My works"}),(0,I.jsx)("div",{children:(0,I.jsx)(f.Ee,{value:l,onChange:function(e){u(e.target.value)},valueField:"@id",name:"nomination",values:o})})]}),!!d.length&&(0,I.jsx)(M,{categories:a,selectedCategory:x["@id"],onCategoryChange:function(e){return v(e)}}),(0,I.jsx)("div",{style:{minHeight:"600px"},children:y.length?y.map((function(e){return(0,I.jsx)(Z,D({onDeleted:function(){var r=p.Fs.get("/api/works/my");n.mutate(D(D({},r),{},{"hydra:member":r["hydra:member"].filter((function(n){return n.id!==e.id}))}))},image:e.images[0],categoryName:x.title},e),e.id)})):(0,I.jsx)("div",{style:{opacity:.4,fontSize:"36px"},children:"You have not submitted any work"})})]})},R=!0,F=function(e){var n=e.countries,r=e.contestId,i=e.works,o=e.nominations,h=e.categories,x=e.hasPrevWorks,g=(0,p.ZP)("/api/configuration/country",{initialData:n}),w=(0,p.ZP)("/api/works/my?contest=".concat(encodeURIComponent(r)),{initialData:i}),k=m()(g,"data.hydra:member"),_=(0,y.a)(),O=m()(_,"user"),P=(0,s.useMemo)((function(){return v()(O,["fullname","email","phone","nationality","country","workPlace","facebookLink","instagramLink"])}
1),[JSON.stringify(O)]),C=(0,s.useState)(""),Z=C[0],S=C[1],N=(0,s.useState)(""),L=N[0],M=N[1],E=(0,s.useState)(!1),D=E[0],R=E[1],F=(0,s.useState)(!1),H=F[0],V=F[1],q=(0,s.useCallback)((0,t.Z)(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return V(!0),e.prev=1,e.next=4,(0,d._i)("/api/competitors/".concat(_.user.id),"DELETE");case 4:return e.next=6,_.logout();case 6:document.location.assign("/auth"),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(1),console.dir(e.t0),V(!1);case 13:case"end":return e.stop()}}),e,null,[[1,9]])}))),[]);return(0,s.useEffect)((function(){var e;return Z&&(e=setTimeout((function(){return S("")}),3e3)),function(){return clearTimeout(e)}}),[Z]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(u.default,{children:(0,I.jsx)("title",{children:"Profile"})}),(0,I.jsx)(c.Pe,{children:(0,I.jsxs)(c.PX,{children:[(0,I.jsxs)("div",{style:{display:"flex"},children:[(0,I.jsx)("div",{children:(0,I.jsx)("h1",{children:"Profile"})}),x&&(0,I.jsx)("div",{style:{marginLeft:"auto"},children:(0,I.jsxs)(j.Z,{style:{padding:"8px 14px",minWidth:"0"},ghost:!0,color:"white",asLink:!0,href:"/profile/archive",children:[(0,I.jsx)("svg",{style:{verticalAlign:"-6px"},width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,I.jsx)("path",{d:"M20 6H12L10 4H4C2.9 4 2.01 4.9 2.01 6L2 18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V8C22 6.9 21.1 6 20 6ZM20 18H4V8H20V18Z",fill:"white"})})," ","Archive"]})})]}),(0,I.jsxs)("div",{style:{maxWidth:"500px"},children:[(0,I.jsx)(l.J9,{enableReinitialize:!0,initialValues:P,validationSchema:W,onSubmit:function(){var e=(0,t.Z)(a().mark((function e(n,r){var t,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(0,d.e5)(P,n),S(""),M(""),!(Object.keys(t).length>0)){e.next=15;break}return e.prev=4,e.next=7,(0,d._i)("/api/competitors/".concat(O.id),"PATCH",JSON.stringify(t));case 7:i=e.sent,_.setUser(i),S("Your profile saved"),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),e.t0.response?r.setErrors((0,d.l8)(e.t0.response.violations)):M("Something goes wrong");case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(n,r){return e.apply(this,arguments)}}(),children:function(e){var n=e.isValid,r=e.isSubmitting,t=e.values,i=Object.keys((0,d.e5)(P,t)).length>0;return(0,I.jsxs)(l.l0,{children:[(0,I.jsx)(f.p7,{children:(0,I.jsx)(f.II,{name:"fullname",placeholder:"Full name"})}),(0,I.jsx)(f.p7,{children:(0,I.jsx)(f.II,{disabled:!0,readOnly:!0,name:"email",placeholder:"Email"})}),(0,I.jsx)(f.p7,{children:(0,I.jsx)(f.II,{name:"phone",placeholder:"Phone number",renderRightAddon:function(){return(0,I.jsx)("span",{style:{opacity:"0.6"},children:"Optional"})}})}),(0,I.jsx)(f.p7,{children:(0,I.jsx)(f.II,{name:"nationality",placeholder:"Nationality",renderRightAddon:function(){return(0,I.jsx)("span",{style:{opacity:"0.6"},children:"Optional"})}})}),(0,I.jsx)(f.p7,{children:(0,I.jsxs)(f.Ph,{name:"country",children:[(0,I.jsx)("option",{value:"",children:"Country of residence"}),k.map((function(e){return(0,I.jsx)("option",{value:e.code,children:e.name},e.code)}))]})}),(0,I.jsx)(f.p7,{children:(0,I.jsx)(f.II,{name:"workPlace",placeholder:"Employer"})}),(0,I.jsx)(f.p7,{children:(0,I.jsx)(f.II,{name:"facebookLink",placeholder:"Facebook account link",renderRightAddon:function(){return(0,I.jsx)("span",{style:{opacity:"0.6"},children:"Optional"})}})}),(0,I.jsx)(f.p7,{children:(0,I.jsx)(f.II,{name:"instagramLink",placeholder:"Instagram account link",renderRightAddon:function(){return(0,I.jsx)("span",{style:{opacity:"0.6"},children:"Optional"})}})}),(0,I.jsx)(f.p7,{children:(0,I.jsx)(f.Ds,{value:"Password",renderRightAddon:function(){return(0,I.jsx)(j.Z,{type:"button",asLink:!0,wrapLink:!0,href:"/profile/changePassword",appearance:"link",style:{padding:0},children:"change password"})}})}),Z&&(0,I.jsx)(b.JK,{children:Z}),L&&(0,I.jsx)(b.y,{children:L}),(0,I.jsxs)("div",{style:{marginTop:"30px",display:"flex",justifyContent:"space-between"},children:[(0,I.jsx)("div",{children:(0,I.jsx)(j.Z,{disabled:!i||!n||r,type:"submit",children:"Save changes"})}),(0,I.jsx)("div",{children:(0,I.jsx)(j.Z,{onClick:function(){return R(!0)},appearance:"link",color:"danger",type:"button",disabled:r,noPadding:!0,children:"Delete your profile"})})]})]})}}),(0,I.jsxs)(A,{isOpen:D,onClose:function(){return R(!1)},children:[(0,I.jsx)("h3",{style:{fontSize:"40px"},children:"Are you sure?"}),(0,I.jsxs)("p",{children:["Are you sure you want to delete your profile and all associated date?",(0,I.jsx)("br",{}),"There is no undo for this action."]}),(0,I.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center"},children:[(0,I.jsx)("div",{style:{flex:"auto",marginTop:"20px"},children:(0,I.jsx)(j.Z,{fill:!0,disabled:H,onClick:function(){return R(!1)},children:"Cancel"})}),(0,I.jsx)("div",{style:{flex:"auto",marginTop:"20px",minWidth:"180px"},children:(0,I.jsx)(j.Z,{fill:!0,disabled:H,onClick:q,appearance:"link",color:"danger",noPadding:!0,children:"Delete"})})]})]})]})]})}),(0,I.jsx)(c.Pe,{children:(0,I.jsx)(c.PX,{children:(0,I.jsx)(T,{worksSwr:w,nominations:o,categories:h})})})]})}},40883:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile",function(){return r(63428)}])},86086:function(e){e.exports={filter:"categories-filter_filter__Cu529",item:"categories-filter_item__2cI4m",activeItem:"categories-filter_activeItem__2CFn0"}},97469:function(e){e.exports={categoryName:"CategoryName_categoryName__1mjx5"}},63992:function(e){e.exports={wrap:"MyWorksListItem_wrap__2wbjo",item:"MyWorksListItem_item__1yu1R",img:"MyWorksListItem_img__ZRu9I",workInfo:"MyWorksListItem_workInfo__2AGwa",title:"MyWorksListItem_title__B3IM3",description:"MyWorksListItem_description__x_PGP"}}},function(e){e.O(0,[8961,9774,2888,179],(function(){return n=40883,e(e.s=n);var n}));var n=e.O();_N_E=n}]);

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.