1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7266,9916],{66887:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/voting",function(){return a(16308)}])},16308:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSG:function(){return p},default:function(){return f}});var l=a(85893),n=a(67294),i=a(65961),s=a(43575),r=a(15659),d=a(16887),o=a(87066),c=a(97248),u=a(68266),m=a(41376),p=!0;function f(e){let{pageData:t}=e,{t:a}=(0,d.$G)("common"),[p,f]=(0,n.useState)([]),[x,h]=(0,n.useState)({page:1,pageCount:1,pageSize:1,total:0}),[v,g]=(0,n.useState)("date:DESC"),[j,b]=(0,n.useState)(1),{token:w}=(0,m.a)(),N=async()=>{try{var e,t,a,l;let n=v?"&sort=".concat(v):"",i=j?"&page=".concat(j):"",s=await o.Z.get("/api/voting?".concat(i).concat(n),{headers:{Authorization:"Bearer ".concat(w)}});f(null==s?void 0:null===(t=s.data)||void 0===t?void 0:null===(e=t.result)||void 0===e?void 0:e.results),h(null==s?void 0:null===(l=s.data)||void 0===l?void 0:null===(a=l.result)||void 0===a?void 0:a.pagination)}catch(e){console.log("Error fetching user data",e)}};return(0,n.useEffect)(()=>{N()},[w,v,j]),(0,l.jsxs)(i.Z,{page:t,children:[(0,l.jsx)("h2",{className:"h2 mb-6",children:a("projects")}),(0,l.jsxs)("div",{className:"flex gap-4 items-start md:items-center justify-between mb-8 md:mb-10 max-md:flex-col",children:[(0,l.jsx)("p",{children:a("total_verification_registries",{count:null==x?void 0:x.total})}),(0,l.jsxs)(r.Ph,{defaultValue:"date:DESC",onValueChange:e=>g(e),value:v,children:[(0,l.jsx)(r.i4,{className:"w-auto p-0",children:(0,l.jsx)(r.ki,{placeholder:""})}),(0,l.jsxs)(r.Bw,{children:[(0,l.jsx)(r.Ql,{value:"date:DESC",children:a("select_order_new_first")}),(0,l.jsx)(r.Ql,{value:"date:ASC",children:a("select_order_old_first")}),(0,l.jsx)(r.Ql,{value:"title:ASC",children:a("select_order_alphabetically")})]})]})]}),(0,l.jsx)("div",{className:"flex flex-col gap-6",children:(null==p?void 0:p.length)>0?(0,l.jsxs)(l.Fragment,{children:[null==p?void 0:p.map(e=>{var t;return(0,l.jsx)(s.Z,{title:e.title,date:e.date,proposals:null===(t=e.propositions)||void 0===t?void 0:t.length,positiveVotes:e.positive_votes||[],negativeVotes:e.negative_votes||[],slug:e.slug},e.id)}),(0,l.jsx)(u.Z,{pagination:x,handlePageChangeCustom:e=>{b(e)}})]}):(0,l.jsx)(c.Z,{text:a("voting_empty_text")})})]})}},85130:function(e,t,a){"use strict";a.d(t,{Z:function(){return n}});var l=a(85893);function n(e){let{className:t,size:a=24,color:n="black"}=e;return(0,l.jsx)("svg",{className:t,width:a,height:a,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{className:"fill-current",fillRule:"evenodd",clipRule:"evenodd",d:"M12.287 2.0625L22.6995 12.0018L12.3287 21.9012L11.0323 20.6638L19.1949 12.8722L1.91406 12.8369L1.91798 11.087L19.1854 11.1222L10.9906 3.29994L12.287 2.0625Z",fill:""})})}a(67294)},8065:function(e,t,a){"use strict";a.d(t,{Z:function(){return n}});var l=a(85893);function n(e){let{className:t,size:a=24}=e;return(0,l.jsx)("svg",{className:t,width:a,height:a,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{className:"fill-current",fillRule:"evenodd",clipRule:"evenodd",d:"M5.17853 4.76971L19.5694 4.43511L19.2361 18.7683L17.4444 18.81L17.7068 7.5287L5.4624 19.7231L4.22777 18.483L16.4626 6.29801L5.13685 6.5614L5.17853 4.76971Z",fill:""})})}a(67294)},43575:function(e,t,a){"use strict";var l=a(85893);a(67294);var n=a(86853),i=a(22578),s=a(41664),r=a.n(s),d=a(11163),o=a(16887),c=a(58189),u=a(80149),m=a(5176),p=a(74560),f=a(8065),x=a(729),h=a(14263),v=a(41376);t.Z=e=>{let{title:t,slug:a,date:s,proposals:g,positiveVotes:j,negativeVotes:b}=e,{t:w}=(0,o.$G)("common"),{locale:N}=(0,d.useRouter)(),y=(0,n.Z)(N),{user:k}=(0,v.a)(),_=(null==j?void 0:j.length)||0,Z=(null==b?void 0:b.length)||0,C=(null==j?void 0:j.find(e=>(null==e?void 0:e.id)===(null==k?void 0:k.id)))?"agree":"",R=(null==b?void 0:b.find(e=>(null==e?void 0:e.id)===(null==k?void 0:k.id)))?"disagree":"";return(0,l.jsxs)("div",{className:"bg-container p-4 md:p-8 rounded-20",children:[(0,l.jsxs)(r(),{href:(0,h.gL)(a),className:"group flex gap-2 text-base md:text-lg hover:underline",children:[(0,l.jsx)("p",{className:"max-md:line-clamp-6 w-full md:max-w-[calc(100%-2rem)]",title:t,children:t}),(0,l.jsx)(f.Z,{className:"max-md:hidden opacity-0 group-hover:opacity-100"})]}),(0,l.jsxs)("time",{dateTime:s,className:"flex text-xs text-secondary mt-4",children:[w("until")," ",(0,i.WU)(new Date(s),"dd MMMM yyyy",{locale:y})]}),(0,l.jsxs)("div",{className:"relative border-t border-black pt-6 mt-6 max-md:text-sm",children:[(0,l.jsx)(c.UQ,{t
1ype:"single",collapsible:!0,className:"w-full",children:(0,l.jsxs)(c.Qd,{value:"item-1",children:[(0,l.jsxs)(c.o4,{className:"inline-flex justify-start text-sm md:text-base hover:underline",children:[w("result"),(0,l.jsx)(p.Z,{size:24})]}),(0,l.jsx)(c.vF,{className:"flex flex-col gap-4 md:gap-6 mt-6",children:(0,l.jsx)(x.Z,{agree:_,disagree:Z,userVote:C||R})})]})}),(0,l.jsxs)("div",{className:"absolute top-6 right-0 flex items-center gap-4 text-secondary",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[(0,l.jsx)(u.Z,{}),(0,l.jsxs)("p",{className:"max-md:hidden",children:[w("proposals"),":"]}),(0,l.jsx)("p",{children:g})]}),(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[(0,l.jsx)(m.Z,{}),(0,l.jsxs)("p",{className:"max-md:hidden",children:[w("voted"),":"]}),(0,l.jsx)("p",{children:_+Z})]})]})]})]})}},59916:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return c}});var l=a(85893),n=a(67294),i=a(85130),s=a(41664),r=a.n(s),d=a(14263),o=a(16887);function c(e){let{page:t,simpleItem:a}=e,[s,c]=n.useState([]),{t:u}=(0,o.$G)("common");return(0,n.useEffect)(()=>{var e,l,n,i,s,r,o,m,p,f,x,h,v;let g=[{text:u("home"),link:"/"}];a&&(g.push({text:a.text,link:a.link}),c(g)),t&&(t.parent&&t.parent.parent&&g.push({text:t.parent.parent.title||t.parent.parent.slug,link:t.parent.parent.slug}),t.parent&&g.push({text:t.parent.title||t.parent.slug,link:t.parent.slug}),(null===(e=t.data)||void 0===e?void 0:e.article)&&(null===(l=t.data.article[0])||void 0===l?void 0:l.slug)?g.push({text:t.data.article[0].title,link:null===(v=t.slug)||void 0===v?void 0:v.replace(":slug",null===(h=t.data.article[0])||void 0===h?void 0:h.slug)}):(null===(n=t.data)||void 0===n?void 0:n.openRole)&&(null===(i=t.data.openRole[0])||void 0===i?void 0:i.slug)?g.push({text:t.data.openRole[0].title,link:t.data.openRole[0].slug}):(null===(s=t.data)||void 0===s?void 0:s.person)&&(null===(r=t.data.person[0])||void 0===r?void 0:r.slug)?g.push({text:t.data.person[0].title,link:t.data.person[0].slug}):(null===(o=t.data)||void 0===o?void 0:o.regulatoryFramework)&&(null===(m=t.data.regulatoryFramework[0])||void 0===m?void 0:m.slug)?g.push({text:t.data.regulatoryFramework[0].title,link:t.data.regulatoryFramework[0].slug}):(null===(p=t.data)||void 0===p?void 0:p.publicConsultation)&&(null===(f=t.data.publicConsultation[0])||void 0===f?void 0:f.slug)?g.push({text:t.data.publicConsultation[0].title,link:t.data.publicConsultation[0].slug}):(null===(x=t.data)||void 0===x?void 0:x.child)&&t.data.child.id?g.push({text:t.data.child.name+(t.data.child.age?", ".concat(t.data.child.age," ").concat(u("years")):""),link:(0,d.Mt)(t.data.child.id)}):g.push({text:t.title||t.slug,link:t.slug}),c(g))},[t,a,u]),(0,l.jsx)("div",{"data-breadcrumbs":!0,className:"flex items-center flex-wrap gap-2 mb-8 md:mb-6 text-13",children:s.map((e,t)=>(0,l.jsxs)(n.Fragment,{children:[(0,l.jsx)(r(),{href:(0,d.Rg)(e.link),className:"last:text-secondary z-10 hover:underline last:line-clamp-1",title:e.text,children:e.text}),(null==s?void 0:s.length)-1!==t&&(0,l.jsx)(i.Z,{size:16})]},t))})}},68266:function(e,t,a){"use strict";a.d(t,{Z:function(){return o}});var l=a(85893),n=a(67294),i=a(11163),s=a(85130),r=a(98388),d=a(16887);function o(e){let{pagination:t,handlePageChangeCustom:a}=e,{t:o}=(0,d.$G)("common"),c=(0,i.useRouter)(),u=t?t.page:1,m=t?t.pageCount:1,p=t?t.pageSize:10,f=(0,n.useMemo)(()=>{let e=[],t=u>3,a=u<m-2;if(t)e.push(1,"...");else for(let t=1;t<Math.min(3,m)+1;t++)e.push(t);let l=Math.max(u-1,2),n=Math.min(u+1,m-1);for(let t=l;t<=n;t++)e.includes(t)||e.push(t);if(a)e.push("...",m);else for(let t=Math.max(m-2,2);t<=m;t++)e.includes(t)||e.push(t);return e},[u,m,p]);if(!t||m<2)return null;let x=()=>{let e=document.getElementById("header");if(e){let{top:t,height:a}=e.getBoundingClientRect();window.scrollTo({top:window.scrollY+t+a})}},h=a||(e=>{c.push({pathname:c.pathname,query:{...c.query,page:e,pageSize:p}},void 0,{shallow:!0}),x()});return(0,l.jsxs)("div",{className:"w-full flex items-center justify-between py-4 md:py-5",children:[(0,l.jsxs)("button",{className:(0,r.m6)("flex gap-4 hover:underline",1===u&&"text-secondary pointer-events-none"),onClick:()=>h(u-1),disabled:1===u,children:[(0,l.jsx)(s.Z,{className:"transform rotate-180"}),(0,l.jsx)("span",{className:"max-md:hidden",children:o("back")})]}),(0,l.jsx)("div",{className:"flex gap-1 md:gap-2 items-center",children:f.map((e,t)=>"number"==typeof e?(0,l.jsx)("button",{className:(0,r.m6)("w-12 h-12 rounded-full flex justify-center items-center duration-200 hover:bg-grey1",e===u&&"bg-black text-white hover:bg-primaryIndigo"),onClick:()=>h(e),children:e},t):(0,l.jsx)("span",{className:"px-2",children:"..."},t))}),(0,l.jsxs)("button",{className:(0,r.m6)("flex gap-4 hover:underline",u===m&&"text-secondary pointer-events-none"),onClick:()=>h(u+1),disabled:u===m,children:[(0,l.jsx)("span",{className:"max-md:hidden",children:o("next")}),(0,l.jsx)(s.Z,{})]})]})}},15659:function(e,t,a){"use strict";a.d(t,{Bw:function(){return f},Ph:function(){return o},Ql:function(){return x},i4:function(){return u},ki:function(){return c}});var l=a(85893),n=a(67294),i=a(62469),s=a(10777),r=a(27742),d=a(74560);let o=s.fC;s.ZA;let c=s.B4,u=n.forwardRef((e,t)=>
1{let{className:a,children:n,...i}=e;return(0,l.jsxs)(s.xz,{ref:t,className:(0,r.cn)("flex w-full items-center justify-between whitespace-nowrap rounded-full bg-white px-6 py-4 ring-offset-white data-[placeholder]:text-secondary focus:outline-none focus-visible:ring-1 focus-visible:ring-indigo-600 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 dark:border-neutral-800 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-300","aria-[invalid=true]:border aria-[invalid=true]:border-solid aria-[invalid=true]:border-warning aria-[invalid=true]:text-warning [&>svg]:aria-[invalid=true]:text-warning","[&>span]:overflow-hidden [&>span]:text-ellipsis [&>span]:max-w-[calc(100%-1.5rem)]",a),...i,children:[n,(0,l.jsx)(s.JO,{asChild:!0,children:(0,l.jsx)(d.Z,{})})]})});u.displayName=s.xz.displayName;let m=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,l.jsx)(s.u_,{ref:t,className:(0,r.cn)("flex cursor-default items-center justify-center py-1 pointer-events-none",a),...n,children:(0,l.jsx)(i.g8U,{})})});m.displayName=s.u_.displayName;let p=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,l.jsx)(s.$G,{ref:t,className:(0,r.cn)("flex cursor-default items-center justify-center py-1 pointer-events-none",a),...n,children:(0,l.jsx)(i.v4q,{})})});p.displayName=s.$G.displayName;let f=n.forwardRef((e,t)=>{let{className:a,children:n,position:i="popper",...d}=e;return(0,l.jsx)(s.h_,{children:(0,l.jsxs)(s.VY,{ref:t,className:(0,r.cn)("relative z-50 h-auto max-h-[calc(var(--radix-select-content-available-height)-1rem)] md:max-h-96 min-w-[8rem] overflow-hidden rounded-10 bg-white text-neutral-950 shadow-[0px_6px_12px_0px_rgba(0,0,0,0.08)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50","popper"===i&&"w-[var(--radix-select-trigger-width)] data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:i,...d,children:[(0,l.jsx)(m,{}),(0,l.jsx)(s.l_,{className:(0,r.cn)("","popper"===i&&"h-[(var(--radix-select-trigger-height)]"),children:n}),(0,l.jsx)(p,{})]})})});f.displayName=s.VY.displayName,n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,l.jsx)(s.__,{ref:t,className:(0,r.cn)("px-2 py-1.5 text-sm font-semibold",a),...n})}).displayName=s.__.displayName;let x=n.forwardRef((e,t)=>{let{className:a,children:n,...i}=e;return(0,l.jsx)(s.ck,{ref:t,className:(0,r.cn)("relative flex w-full cursor-default select-none items-center p-4 text-13 outline-none focus-visible:outline-none focus:bg-neutral-100 focus:text-neutral-900 focus-visible:ring-offset-0 focus-visible:ring-1 focus-visible:ring-indigo-600 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50","data-[state=checked]:bg-container data-[state=checked]:underline",a),...i,children:(0,l.jsx)(s.eT,{children:n})})});x.displayName=s.ck.displayName,n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,l.jsx)(s.Z0,{ref:t,className:(0,r.cn)("-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800",a),...n})}).displayName=s.Z0.displayName},65961:function(e,t,a){"use strict";a.d(t,{Z:function(){return h}});var l=a(85893),n=a(67294),i=a(55915),s=a(53563),r=a(5675),d=a(59916),o=a(41664),c=a.n(o),u=a(95364),m=a(11163),p=a(16887),f=a(41376),x=a(98388);function h(e){let{page:t,children:a}=e,{t:o}=(0,p.$G)("common"),h=(0,m.useRouter)(),v=(0,n.useRef)({}),{user:g}=(0,f.a)(),j=[{href:"/profile/voting",label:o("voting")},{href:"/profile/suggestions",label:o("proposals")},{href:"/profile/info",label:o("profile")}],b=j.find(e=>e.href===h.pathname);return(0,n.useEffect)(()=>{let e=v.current[h.pathname];e&&e.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})},[h.pathname]),(0,l.jsxs)("div",{className:"relative overflow-hidden",children:[(0,l.jsx)(r.Z,{menu:t.menu}),(0,l.jsx)(i.default,{className:(0,x.m6)("relative","xl:after:absolute xl:after:top-0 xl:after:left-[calc(100%-26.5rem)] xl:after:bg-block xl:after:w-full xl:after:h-full xl:after:-z-10"),children:(0,l.jsxs)("div",{className:"w-full xl:w-[calc(100%-25.5rem)] pt-10 xl:pr-8 pb-8 md:pb-20",children:[b&&(0,l.jsx)(d.default,{simpleItem:{text:b.label,link:b.href}}),(0,l.jsx)("h1",{children:"".concat(o("welcome"),", ").concat((null==g?void 0:g.vocative_name)||(null==g?void 0:g.givenname),"!")}),(0,l.jsx)("div",{className:" flex gap-4 my-8 md:my-12 overflow-auto max-sm:-mx-4 max-sm:px-5",children:j.map((e,t)=>(0,l.jsx)(u.z,{variant:e.href===h.pathname?"default":"gray",ref:t=>{v.current[e.href]=t},asChild:!0,className:"min-w-fit",children:(0,l.jsx)(c(),{href:e.href,children:e.label})},t))}),a]})}),(0,l.jsx)(s.Z,{footer:t.footer})]})}},86853:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});var l=a(86520),n=a(45568);let i={en:l.e,uk:n.uk};function s(e){return i[e]||l.e}}},function(e){e.O(0,[7409,777,5672,9332,3981,5675,1664,507,5737,2672,2888,9774,179],function(){return e(e.s=66887)}),_N_E=e.O()}]);
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.