1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3519],{53519:function(e,t,l){l.d(t,{V:function(){return ImageBlurBg},Z:function(){return collection_TopicCollectionPage}});var n=l(85893),i=l(5379),o=l.n(i),s=l(91799),r=l(9008),c=l.n(r),a=l(85945),d=l(25751),u=l(11163),x=l.n(u),h=l(67294),m=l(16630),f=l(41229),v=l(96480),g=l(50396),p=l(6270),j=l(22825),w=l(90566),b=l(95085),N=l(82703),k=l(92520),y=l(9654),C=l(16927),B=l(4609),T=l(73035),I=l(896),F=l(2659),S=l(75107),O=l(5090),G=l(70215),D=l(80115),R=l(17237),collection_ModalDeleteCollection=e=>{let{open:t=!1,onClickClose:l=()=>{},tourId:i=""}=e,[o,s]=(0,h.useState)(!1),r=(0,I.t)(e=>e.user.id),c=(0,u.useRouter)(),x=(0,a.NL)();return(0,n.jsx)(D.Z,{open:t,title:(0,d.t)("Alert.deleteTourTitle"),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"mt-5 text-center",children:(0,n.jsx)(n.Fragment,{children:(0,d.t)("Alert.deleteTourDescription")})}),(0,n.jsxs)("div",{className:"mt-4 flex w-full gap-3",children:[(0,n.jsx)("button",{type:"button",onClick:()=>l(),className:" text-kpurple-500 hover:bg-kgray-300 active:bg-kgray-200 h-12 w-full !rounded-full py-2 font-semibold transition-colors",children:(0,n.jsx)(n.Fragment,{children:(0,d.t)("Button.cancelButton")})}),(0,n.jsx)(j.kq,{onClick:async()=>{s(!0);try{S.bD.getState().emit("tour/delete/clickOnButton",{contentId:i}),await O.Z.delete.tour(i),x.removeQueries(b.wJ.personalAll),(0,G.s$)("La raccolta \xe8 stata rimossa"),c.push("/profile/"+r)}catch(e){(0,G.x2)(e)}finally{s(!1)}},className:"h-12 w-full px-3 py-1 text-sm",children:(0,n.jsx)(n.Fragment,{children:(0,d.t)("Button.confirmButton")})})]}),(0,n.jsx)("div",{className:"mt-4 w-full text-center"}),(0,n.jsx)(F.Z,{open:o,children:(0,n.jsx)("div",{className:"flex h-full w-full flex-col items-center justify-center",children:(0,n.jsx)(R.Z,{})})})]})})},collection_CollectionOptions=e=>{let{tourId:t,personal:l=!1,visibility:i}=e,o=(0,I.t)(e=>e.user.id),[s,r]=(0,h.useState)(!1),[c,d]=(0,h.useState)(!1),[x,m]=(0,h.useState)(!1),[f,v]=(0,h.useState)(i);(0,a.NL)(),(0,h.useEffect)(()=>{v(i)},[t]);let g=(0,u.useRouter)();return(0,n.jsxs)("div",{className:"relative h-8 w-8",children:[(0,n.jsx)(j.F6,{onClick:()=>setTimeout(()=>r(!s),1),className:"h-8 w-8 !rounded-full !p-0",children:(0,n.jsx)(p.R8,{className:"h-full w-full stroke-current text-white transition-colors hover:text-gray-200 active:text-white"})}),(0,n.jsx)("div",{className:"absolute right-0 top-12 z-20",children:(0,n.jsx)(N.M,{children:s&&(0,n.jsx)(OptionsDropdown,{personal:l,onClickModify:()=>
1{S.bD.getState().emit("tour/edit/clickOnButton",{contentId:t}).catch(()=>{}),g.push("/collection/edit/"+t)},onClickReport:()=>m(!0),onClickDelete:()=>d(!0),onClickClose:()=>r(!1)})})}),(0,n.jsx)(collection_ModalDeleteCollection,{open:c,tourId:t,onClickClose:()=>{d(!1)}}),(0,n.jsx)(F.Z,{open:x,children:(0,n.jsx)(y.y,{onCloseClick:()=>{m(!1)},userId:o,itemType:B.r6.experience,ticketStatus:B.hG.NEW,ticketType:B.zK.REP,itemId:t})})]})};let OptionsDropdown=e=>{let{onClickClose:t=()=>{},onClickDelete:l=()=>{},onClickModify:i=()=>{},onClickReport:o=()=>{},personal:s=!1}=e,r=(0,h.useRef)(null);(0,T.Z)(r,t);let{showReport:c,showModify:a,showDelete:u}=(0,h.useMemo)(()=>s?{showModify:!0,showDelete:!0,showReport:!1}:{showReport:!0,showModify:!1,showDelete:!1},[s]);return(0,n.jsxs)(k.E.div,{ref:r,initial:"closed",animate:"open",exit:"closed",variants:{closed:{scale:0,originX:.97,originY:0,transition:{duration:.2}},open:{scale:1,originX:.97,originY:0,transition:{type:"spring",duration:.4,delayChildren:.2,staggerChildren:.05}}},className:"flex flex-col gap-2 whitespace-nowrap rounded-xl bg-white px-2 py-2 shadow-lg",children:[a&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(j.F6,{onClick:()=>i(),className:"flex w-full items-center justify-start gap-2",children:[(0,n.jsx)("div",{className:"h-8 w-8",children:(0,n.jsx)(C.yl,{className:"h-full w-full fill-none stroke-current"})}),(0,n.jsx)("p",{className:"text-left text-sm",children:(0,n.jsx)(n.Fragment,{children:(0,d.t)("Button.modifyButton")})})]}),(0,n.jsx)("hr",{})]}),u&&(0,n.jsxs)(j.F6,{onClick:()=>{l()},className:"flex w-full items-center justify-start gap-2 text-red-500 hover:bg-red-500 active:bg-red-600/30",children:[(0,n.jsx)("div",{className:"h-8 w-8",children:(0,n.jsx)(p.Fz,{strokeWidth:1.2,className:"h-full w-full fill-none stroke-current"})}),(0,n.jsx)("p",{className:"text-left text-sm",children:(0,n.jsx)(n.Fragment,{children:(0,d.t)("DetailTour.deleteCollection")})})]})]})};var Z=l(49778),M=l(82055),collection_TopicCollectionPage=e=>{var t;let{data:l,pageType:i,queryKey:o,personal:r,onClickFollowTopic:a,guest:d=!1}=e,u=(0,h.useMemo)(()=>{var e,t,n,o,r,c;switch(i){case s.G.collection:let a=null!==(n=null==l?void 0:null===(t=l.media)||void 0===t?void 0:null===(e=t.find(e=>"IMAGE"===e.type))||void 0===e?void 0:e.fileId)&&void 0!==n?n:"";return(0,v.OT)(null!==(o=null==l?void 0:l.id)&&void 0!==o?o:"",a,1200);case s.G.topic:case s.G.editorial:return l?(0,v.nL)(null!==(r=null==l?void 0:l.id)&&void 0!==r?r:"",null!==(c=null==l?void 0:l.imageId)&&void 0!==c?c:"",1200):void 0;default:return""}},[null==l?void 0:l.imageId,null==l?void 0:l.id,i]);return(0,h.useEffect)(()=>{if(null==l?void 0:l.id){let e=s.G.collection?"tour//load":"topic//load";S.bD.getState().emit(e,{contentId:l.id}).catch(()=>{})}},[null==l?void 0:l.id]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c(),{children:(0,n.jsx)("title",{children:"KuriU - ".concat(null!==(t=null==l?void 0:l.title)&&void 0!==t?t:"")})}),(0,n.jsx)(ImageBlurBg,{url:u}),(0,n.jsxs)("div",{className:g.xZ,children:[(0,n.jsx)("div",{className:"h-8"}),(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)(j.xE,{onClick:()=>{x().back()},className:""}),!d&&i===s.G.topic&&!r&&(0,n.jsx)(M.Z,{follow:i===s.G.topic&&(null==l?void 0:l.followedByMe),onClickFollow:()=>{a&&l&&a()}})]}),(0,n.jsx)(TopPageSection,{pageType:i,queryKey:o,data:l,guest:d,personal:r})]})]})};let TopPageSection=e=>{var t,l,i,o,r,c;let{guest:a=!1,data:u,pageType:x,queryKey:h,personal:m}=e;return(0,n.jsx)("div",{className:"",children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"mt-8",children:[(0,n.jsxs)("p",{className:"text-lg font-semibold text-white",children:[(0,d.t)("Generic.collection")," "]}),u&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:"mt-2 line-clamp-1 h-12 text-4xl font-bold text-white",children:u.title}),(0,n.jsx)("p",{className:"mt-2 whitespace-pre-line text-white",children:u.description})]}),!u&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"mt-2 h-10 w-64 animate-pulse rounded-full bg-white"}),(0,n.jsx)("div",{className:"mt-4 h-6 w-full animate-pulse rounded-full bg-white "})]})]}),(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[!a&&x!==s.G.topic&&u&&!m&&(0,n.jsx)(SentimentButton,{queryKey:h,sentimentCounters:u.counters,mySentiment:null!==(l=null===(t=u.features)||void 0===t?void 0:t.sentiment)&&void 0!==l?l:null,contentId:null==u?void 0:u.id,contentType:x===s.G.collection?w.r.TOUR:w.r.TOPIC}),!a&&x===s.G.collection&&u&&!m&&(0,n.jsx)(SaveButton,{contentId:null!==(i=null==u?void 0:u.id)&&void 0!==i?i:"",queryKey:h,favourite:null!==(o=null==u?void 0:u.features.favourite)&&void 0!==o&&o}),!a&&(0,n.jsx)(OptionsButton,{contentId:null!==(r=null==u?void 0:u.id)&&void 0!==r?r:"",title:null!==(c=null==u?void 0:u.title)&&void 0!==c?c:"",personal:m,contentType:x===s.G.collection?w.r.TOUR:w.r.TOPIC})]})]})})},OptionsButton=e=>{let{personal:t=!1,contentId:l="",title:i="",contentType:o=w.r.TOUR}=e;return t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Z.Z,{title:i,contentId:l,type:o,className:"!h-8 !w-8 text-white hover:text-gray-200 active:text-white"}),(0,n.jsx)(collection_CollectionOptions,{tourId:l,personal:t})]}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(Z.Z,{title:i,contentId:l,type:o,className:"!h-8 !w-8 text-white hover:text-gray-200 active:text-white"})})}
1,SaveButton=e=>{let{className:t="",contentId:l="",favourite:i=!1,queryKey:o}=e,[s,r]=(0,h.useState)(!1),c=(0,a.NL)(),{mutateAsync:d}=(0,b.Qp)({queryClient:c,queryKey:o});return(0,h.useEffect)(()=>{r(i)},[l]),(0,n.jsx)("div",{className:"flex",children:(0,n.jsx)("div",{className:"flex flex-col items-center justify-center",children:(0,n.jsx)("button",{onClick:()=>{r(!s),d({contentId:l,newValue:!s||null}).then(e=>{r(!!e)}).catch(e=>{r(s)})},className:(s?"text-korange-500 hover:text-korange-600 active:text-korange-400":"text-white hover:text-gray-200 active:text-white")+" h-8 w-8 transition-colors ",children:(0,n.jsx)(p.BZ,{className:"h-full w-full fill-none stroke-current drop-shadow"})})})})},SentimentButton=e=>{let{className:t="",sentimentCounters:l=[],mySentiment:i=null,contentId:o="",contentType:s=w.r.TOPIC,queryKey:r}=e,[c,d]=(0,h.useState)(i==m.g.love?i:null),u=(0,a.NL)(),{mutateAsync:x}=(0,f.Rn)({queryClient:u,queryKey:r,documentType:s});(0,h.useEffect)(()=>{d(i==m.g.love?i:null)},[o]);let v=(0,h.useMemo)(()=>(w.r.TOUR,"tour/reaction/clickOnButton"),[s]),g=(0,h.useMemo)(()=>{var e,t;let n=null!==(t=null===(e=l.find(e=>"sum"==e.name))||void 0===e?void 0:e.value)&&void 0!==t?t:0;return n+(c==i?0:c?1:-1)},[l,c]);return(0,n.jsx)("div",{className:"flex",children:(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,n.jsx)("button",{onClick:()=>{d(c!=m.g.love?m.g.love:null),x({contentId:o,newValue:c!=m.g.love}).then(e=>{S.bD.getState().emit(v,{contentType:s,contentId:o,value:!!e}).catch(()=>{}),d(e?m.g.love:null)}).catch(e=>{d(c)})},className:(c==m.g.love?"text-red-500 hover:text-red-600 active:text-red-400":"text-white hover:text-gray-200 active:text-white")+" h-8 w-8 transition-colors ",children:(0,n.jsx)(p.AU,{className:"h-full w-full fill-current stroke-current drop-shadow"})}),(0,n.jsx)("p",{className:"text-white",children:g})]})})},ImageBlurBg=e=>{let{url:t}=e;return(0,n.jsx)("div",{className:"fixed left-0 top-0 -z-10 h-screen",children:(0,n.jsxs)("div",{className:o().dynamic([["a71ce9b45aa15f30",[t]]])+" relative h-full w-full overflow-clip rounded-3xl",children:[(0,n.jsx)(o(),{id:"a71ce9b45aa15f30",dynamic:[t],children:'html{background:-webkit-linear-gradient(bottom,rgba(0,0,0,.42),rgba(0,0,0,.42)),url("'.concat(t,'"),#f6f6f6;background:-moz-linear-gradient(bottom,rgba(0,0,0,.42),rgba(0,0,0,.42)),url("').concat(t,'"),#f6f6f6;background:-o-linear-gradient(bottom,rgba(0,0,0,.42),rgba(0,0,0,.42)),url("').concat(t,'"),#f6f6f6;background:linear-gradient(0deg,rgba(0,0,0,.42),rgba(0,0,0,.42)),url("').concat(t,'"),#f6f6f6;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;background-attachment:fixed;background-position:center;background-repeat:no-repeat;height:100%}')}),(0,n.jsx)("div",{style:{background:"linear-gradient(0deg, rgba(223, 223, 223, 0.60) 0%, rgba(223, 223, 223, 0.60) 100%)"},className:o().dynamic([["a71ce9b45aa15f30",[t]]])+" medium:rounded-3xl fixed left-0 top-0 h-full w-full"})]})})}},82055:function(e,t,l){var n=l(85893),i=l(25751),o=l(6270),s=l(22825);t.Z=e=>{let{follow:t=!1,onClickFollow:l=()=>{}}=e;return(0,n.jsxs)(s.IK,{onClick:()=>l(),className:(t?"w-32":"w-28")+" h-11 shrink-0 whitespace-nowrap !rounded-full bg-opacity-20 font-bold !text-white !transition-all hover:bg-opacity-40 active:bg-opacity-10",children:[!t&&(0,n.jsx)("p",{children:(0,n.jsx)(n.Fragment,{children:(0,i.t)("Button.followButton")})}),t&&(0,n.jsxs)("p",{children:[(0,n.jsx)(n.Fragment,{children:(0,i.t)("Profile.alreadyFollow")}),(0,n.jsx)("span",{className:"ml-1",children:(0,n.jsx)(o.NO,{className:"inline-block h-3.5 w-3.5 fill-current"})})]})]})}},91799:function(e,t,l){var n,i;l.d(t,{G:function(){return n}}),(i=n||(n={}))[i.topic=0]="topic",i[i.collection=1]="collection",i[i.editorial=2]="editorial"}}]);
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.