1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4353],{19015:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>j});var l=a(6029),n=a(55729),s=a(39794),r=a(73492),i=a(65403),d=a(96930),c=a(34245),o=a(17325),m=a(40334),x=a(4516),u=a(82203),f=a.n(u),p=a(94873),h=a(98632);let v=e=>{let{imgUrl:t,eventName:a,dateText:n,addressText:d,organizerName:o,eventId:m,isLiked:u}=e,f=(0,s.Ww)(),v=(0,s.al)(),{toast:g}=(0,c.dj)(),b=(0,r.UK3)();return(0,l.jsx)("div",{className:"rounded-2xl border bg-white shadow-sm",children:(0,l.jsxs)(i.$,{type:"button",className:"relative flex size-full max-w-full justify-start gap-1 border-none p-0 text-start text-black shadow-none",onKeyDown:e=>["Enter"," "].includes(e.key),children:[(0,l.jsxs)("div",{className:"relative h-[120px] w-[159px] flex-none rounded-lg",children:[(0,l.jsx)("img",{src:t,alt:a,className:"size-full flex-none rounded-l-2xl rounded-r-lg object-cover"}),(0,l.jsx)("p",{className:"absolute left-2 top-2 size-fit w-[75%] truncate rounded-full bg-gray-100 px-2 text-[12px] font-semibold leading-[18px] text-black",children:n}),(0,l.jsx)(i.$,{type:"button",className:"absolute bottom-2 left-2 aspect-square rounded-lg bg-white p-1",onClick:e=>{e.preventDefault(),e.stopPropagation(),((e,t)=>{b.mutate({eventId:e,like:!t},{onSuccess:()=>{g({title:t?"Ev\xe9nement retir\xe9 des favoris":"Ev\xe9nement ajout\xe9 aux favoris"})}})})(m,u)},children:(0,l.jsx)(h.A,{children:(0,l.jsx)(p.C,{width:24,height:24,weight:u?"fill":"regular",className:"text-secondary-700"})})})]}),(0,l.jsxs)("div",{className:"ml-4 flex h-[120px] grow flex-col items-start justify-between gap-2 truncate py-4",children:[(0,l.jsxs)("div",{className:"flex size-full flex-col justify-between",children:[(0,l.jsx)("h2",{className:"text-lg font-bold",children:a}),(0,l.jsx)("p",{className:"truncate text-sm text-gray-500",children:o}),(0,l.jsxs)("div",{className:"flex w-full items-center gap-1",children:[(0,l.jsx)(x.sR,{width:16,height:16,fill:"#98A2B3"}),(0,l.jsx)("p",{className:"truncate text-sm text-gray-500",children:d})]})]}),(0,l.jsx)("div",{className:(0,s.cn)("flex flex-row items-center justify-end md:justify-between",{"absolute bottom-2 right-0 flex-col-reverse items-end":f&&!v})})]})]})})},g=function(e){let{eventsLiked:t,eventsVisited:a,activePanel:n,isLoading:s}=e,r="favorite"===n?t:a;return s?(0,l.jsx)("div",{className:"rounded-3xl border bg-gray-50 px-4 py-3 md:px-8 md:py-6",children:(0,l.jsx)(d.R,{})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:"rounded-3xl border bg-gray-50 px-4 py-3 md:px-8 md:py-6",children:r.length>0?(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:r.map(e=>{var a,s,r,i;let{address:d,image:c,name:x,organiser:u}=e,p=(0,o.ftU)(null!=(a=e.dates)?a:{schedules:[],exceptionalClosingDates:[]}),h=(0,o.XDG)(null!=(s=e.dates)?s:{schedules:[],exceptionalClosingDates:[]}),g=p&&h?((e,t)=>
1{let a=new Date(e),l=new Date(t);return(0,o.tXX)(a,l,{monthFormat:"MMMM"})})(p,h):"";return(0,l.jsx)(f(),{href:"/event/".concat(e.id),children:(0,l.jsx)(v,{addressText:(0,o.Z2L)(d),imgUrl:(0,m.w8)(null==c?void 0:c.key,null==c?void 0:c.type)||"/images/event.jpeg",eventName:x,dateText:g,eventId:e.id,organizerName:null!=(i=null!=(r=u.admin.businessName)?r:u.admin.firstName)?i:"",isLiked:"favorite"===n||t.some(t=>t.id===e.id)})},e.id)})}):(0,l.jsx)("div",{className:"flex h-[450px] flex-col items-center justify-center gap-[11px]",children:(0,l.jsx)("p",{className:"font-semibold text-gray-500",children:"favorite"===n?"Aucun \xe9v\xe9nement dans les favoris":"Aucun \xe9v\xe9nement visit\xe9 pour le moment"})})})})},b="flex grow cursor-pointer flex-col items-center px-2 py-2 shadow-none rounded-none",j=function(){let[e,t]=(0,n.useState)("favorite"),{data:a,isLoading:d}=(0,r.aR2)({enabled:"favorite"===e}),{data:c,isLoading:o}=(0,r.qiN)({enabled:"visited"===e});return(0,l.jsxs)("div",{className:"flex flex-col gap-0 bg-white p-0 md:p-20",children:[(0,l.jsx)("h1",{className:"text-3xl font-extrabold max-md:hidden",children:"Mes \xe9v\xe9nements"}),(0,l.jsxs)("div",{className:"flex p-2 pb-0 md:pt-6 xl:px-6",children:[(0,l.jsx)(i.$,{className:(0,s.cn)(b,{"border-b-2 border-blue-500":"favorite"===e,"border-gray-400":"favorite"!==e}),onClick:()=>{t("favorite")},onKeyDown:()=>{t("favorite")},type:"button",children:(0,l.jsx)("p",{className:(0,s.cn)("font-bold",{"text-blue-500":"favorite"===e,"text-gray-400":"favorite"!==e}),children:"Favoris"})}),(0,l.jsx)(i.$,{className:(0,s.cn)(b,{"border-b-2 border-blue-500":"visited"===e,"border-gray-400":"visited"!==e}),onClick:()=>{t("visited")},onKeyDown:()=>{t("visited")},type:"button",children:(0,l.jsx)("p",{className:(0,s.cn)("font-bold",{"text-blue-500":"visited"===e,"text-gray-400":"visited"!==e}),children:"Visit\xe9s"})})]}),(0,l.jsx)(g,{eventsLiked:null!=a?a:[],eventsVisited:null!=c?c:[],activePanel:e,isLoading:d||o})]})}},61567:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/my-favorite-events",function(){return a(19015)}])},94873:(e,t,a)=>{"use strict";a.d(t,{B:()=>i,C:()=>r});var l=a(55729),n=a(11211);let s=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M178,36c-20.09,0-37.92,7.93-50,21.56C115.92,43.93,98.09,36,78,36a66.08,66.08,0,0,0-66,66c0,72.34,105.81,130.14,110.31,132.57a12,12,0,0,0,11.38,0C138.19,232.14,244,174.34,244,102A66.08,66.08,0,0,0,178,36Zm-5.49,142.36A328.69,328.69,0,0,1,128,210.16a328.69,328.69,0,0,1-44.51-31.8C61.82,159.77,36,131.42,36,102A42,42,0,0,1,78,60c17.8,0,32.7,9.4,38.89,24.54a12,12,0,0,0,22.22,0C145.3,69.4,160.2,60,178,60a42,42,0,0,1,42,42C220,131.42,194.18,159.77,172.51,178.36Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232,102c0,66-104,122-104,122S24,168,24,102A54,54,0,0,1,78,48c22.59,0,41.94,12.31,50,32,8.06-19.69,27.41-32,50-32A54,54,0,0,1,232,102Z",opacity:"0.2"}),l.createElement("path",{d:"M178,40c-20.65,0-38.73,8.88-50,23.89C116.73,48.88,98.65,40,78,40a62.07,62.07,0,0,0-62,62c0,70,103.79,126.66,108.21,129a8,8,0,0,0,7.58,0C136.21,228.66,240,172,240,102A62.07,62.07,0,0,0,178,40ZM128,214.8C109.74,204.16,32,155.69,32,102A46.06,46.06,0,0,1,78,56c19.45,0,35.78,10.36,42.6,27a8,8,0,0,0,14.8,0c6.82-16.67,23.15-27,42.6-27a46.06,46.06,0,0,1,46,46C224,155.61,146.24,204.15,128,214.8Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M240,102c0,70-103.79,126.66-108.21,129a8,8,0,0,1-7.58,0C119.79,228.66,16,172,16,102A62.07,62.07,0,0,1,78,40c20.65,0,38.73,8.88,50,23.89C139.27,48.88,157.35,40,178,40A62.07,62.07,0,0,1,240,102Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M178,42c-21,0-39.26,9.47-50,25.34C117.26,51.47,99,42,78,42a60.07,60.07,0,0,0-60,60c0,29.2,18.2,59.59,54.1,90.31a334.68,334.68,0,0,0,53.06,37,6,6,0,0,0,5.68,0,334.68,334.68,0,0,0,53.06-37C219.8,161.59,238,131.2,238,102A60.07,60.07,0,0,0,178,42ZM128,217.11C111.59,207.64,30,157.72,30,102A48.05,48.05,0,0,1,78,54c20.28,0,37.31,10.83,44.45,28.27a6,6,0,0,0,11.1,0C140.69,64.83,157.72,54,178,54a48.05,48.05,0,0,1,48,48C226,157.72,144.41,207.64,128,217.11Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M178,40c-20.65,0-38.73,8.88-50,23.89C116.73,48.88,98.65,40,78,40a62.07,62.07,0,0,0-62,62c0,70,103.79,126.66,108.21,129a8,8,0,0,0,7.58,0C136.21,228.66,240,172,240,102A62.07,62.07,0,0,0,178,40ZM128,214.8C109.74,204.16,32,155.69,32,102A46.06,46.06,0,0,1,78,56c19.45,0,35.78,10.36,42.6,27a8,8,0,0,0,14.8,0c6.82-16.67,23.15-27,42.6-27a46.06,46.06,0,0,1,46,46C224,155.61,146.24,204.15,128,214.8Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M178,44c-21.44,0-39.92,10.19-50,27.07C117.92,54.19,99.44,44,78,44a58.07,58.07,0,0,0-58,58c0,28.59,18,58.47,53.4,88.79a333.81,333.81,0,0,0,52.7,36.73,4,4,0,0,0,3.8,0,333.81,333.81,0,0,0,52.7-36.73C218,160.47,236,130.59,236,102A58.07,58.07,0,0,0,178,44ZM128,219.42c-14-8-100-59.35-100-117.42A50.06,50.06,0,0,1,78,52c21.11,0,38.85,11.31,46.3,29.51a4,4,0,0,0,7.4,0C139.15,63.3
11,156.89,52,178,52a50.06,50.06,0,0,1,50,50C228,160,142,211.46,128,219.42Z"}))]]),r=l.forwardRef((e,t)=>l.createElement(n.A,{ref:t,...e,weights:s}));r.displayName="HeartIcon";let i=r},98632:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var l=a(6029),n=a(37890),s=a(72579);function r(e){let{children:t,onClick:a,className:r,disabled:i}=e,{user:d}=(0,n.u)(),c=!!d;function o(e){if(!c){e.preventDefault(),e.stopPropagation(),s.A.setModalVisible(!0);return}i||null==a||a()}return(0,l.jsx)("div",{onClick:o,role:i?"":"button",tabIndex:0,onKeyDown:o,className:r,children:t})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=61567)),_N_E=e.O()}]); 2//# sourceMappingURL=my-favorite-events-7bbe0ea1c02e346a.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.