PageSourceSearch

https://kremmania.hu/_next/static/chunks/pages/velemenyek-3cf8846d82f8c8d6.js

js kremmania.hu collected 2026-10-02 12:14:28 UTC 12,320 bytes, 6 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[151],{59901:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/velemenyek",function(){return r(8358)}])},23825:function(e,s,r){"use strict";r.d(s,{Z:function(){return l}});/**
2 * @license lucide-react v0.314.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */let l=(0,r(64370).Z)("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]])},34697:function(e,s,r){"use strict";r.d(s,{n:function(){return c}});var l=r(85893),t=r(23825),i=r(98521),a=r(60546),n=r(18974);let c=e=>{let{review:s}=e,{t:r}=(0,n.LD)("profile_page.profile_section.review.delete_review_modal"),c=(0,i.hI)();return(0,l.jsxs)(a.aR,{children:[(0,l.jsx)(a.vW,{children:(0,l.jsx)(t.Z,{className:"size-5 text-error-400"})}),(0,l.jsxs)(a._T,{className:"",children:[(0,l.jsx)(a.CI,{}),(0,l.jsxs)(a.fY,{children:[(0,l.jsx)(a.f$,{children:r("title","Delete your review?")}),(0,l.jsx)(a.yT,{children:r("description","This will remove your review from the product.")})]}),(0,l.jsxs)(a.xo,{children:[(0,l.jsx)(a.le,{className:"flex-grow",children:r("cancel_button","Cancel")}),(0,l.jsx)(a.OL,{className:"flex-grow",onClick:()=>{c.mutate(null==s?void 0:s.id)},children:r("delete_button","Delete")})]})]})]})}},94577:function(e,s,r){"use strict";r.d(s,{r:function(){return w}});var l=r(85893),t=r(56312),i=r(43124),a=r(30202),n=r(54676),c=r(87536),o=r(1604),d=r(98521),x=r(50048),u=r(82417),h=r(12378),m=r(10996),f=r(23494),j=r(13880),g=r(18974),p=r(6815);let v=[1,2,3,4,5],w=e=>{let{review:s}=e,{t:r}=(0,g.LD)("profile_page.profile_section.review.edit_review_modal"),w=(0,a.NL)(),{isOpen:N,setIsOpen:b,closeModal:_}=(0,j.E)(),y=(0,d.b_)(null==s?void 0:s.id,void 0,()=>{w.invalidateQueries({queryKey:p.l.reviews})},_),z=o.z.object({rate:o.z.number({required_error:r("product_rating_required","Product rating is required")}).refine(e=>v.includes(e),{message:r("incorrect_rating","Rating has to be between 1 to 5 stars.")}),description:o.z.string({required_error:r("description_required","Description is required")}).min(5,{message:r("description_too_short","Review is too short. At least 5 characters.")})}),O=(0,c.cI)({criteriaMode:"all",mode:"onBlur",resolver:(0,t.F)(z),defaultValues:{rate:null==s?void 0:s.rate,description:null==s?void 0:s.description}});return(0,l.jsxs)(h.Vq,{open:N,onOpenChange:b,children:[(0,l.jsx)(h.hg,{children:(0,l.jsx)(n.Z,{className:"size-5 text-forest-green-300"})}),(0,l.jsxs)(h.cZ,{children:[(0,l.jsx)(h.$N,{className:"text-xl text-forest-green-500",children:r("title","Edit your review")}),(0,l.jsx)(m.l0,{...O,children:(0,l.jsx)("form",{onSubmit:O.handleSubmit(e=>{y.mutate(e)}),children:(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(m.Wi,{control:O.control,name:"rate",render:e=>{let{field:s}=e;return(0,l.jsx)(x.J,{size:"x-large",value:s.value,onChange:s.onChange,label:(0,l.jsx)("span",{className:"text-forest-green-500",children:r("rating_label","Product rating")}),emptyStarColor:"#00000014"})}}),(0,l.jsx)(m.Wi,{control:O.control,name:"description",render:e=>{let{field:s}=e;return(0,l.jsxs)(m.xJ,{className:"flex flex-col",children:[(0,l.jsx)(m.lX,{className:"text-forest-green-500",children:r("description_label","Review")}),(0,l.jsx)(f.K,{value:s.value,onChange:s.onChange,className:"rounded-md bg-white px-3 py-2 text-base text-forest-green-500 placeholder:text-base placeholder:text-forest-green-300",rows:4,placeholder:r("description_placeholder","Enter your review")}),(0,l.jsx)(m.zG,{})]})}}),(0,l.jsxs)(h.cN,{children:[(0,l.jsx)(i.GG,{asChild:!0,children:(0,l.jsx)(u.zx,{variant:"outline",className:"w-full",children:r("cancel_button","M\xe9gse")})}),(0,l.jsx)(u.zx,{type:"submit",variant:"primary",className:"w-full",children:r("submit_button","K\xfcld\xe9s")})]})]})})})]})]})}},8358:function(e,s,r){"use strict";r.r(s),r.d(s,{__N_SSP:function(){return ex},default:function(){return eu}});var l=r(85893),t=r(75652),i=r(24623),a=r(72984),n=r(69485),c=r(80558),o=r(69617),d=r(99384),x=r(24511),u=r(56312),h=r(23825),m=r(11163),f=r(87536),j=r(1604),g=r(46963),p=r(82417),v=r(10996),w=r(18974);let N=j.z.object({categories:j.z.array(j.z.string()).optional()}),b={categories:[]},_=e=>{let{t:s}=(0,w.LD)("review_page.filter"),r=(0,m.useRouter)(),t=(0,f.cI)({resolver:(0,u.F)(N),defaultValues:b});return(0,l.jsx)(v.l0,{...t,children:(0,l.jsxs)("form",{className:"flex flex-col gap-6",onSubmit:t.handleSubmit(s=>{var l,t;let i=null===(l=s.categories)||void 0===l?void 0:l.join(",");r.push({pathname:r.pathname,query:{...r.query,...s,categories:i,page:1}}),null===(t=e.closeModal)||void 0===t||t.call(e)}),children:[(0,l.jsx)(g.I,{form:t,options:e.categories}),(0,l.jsxs)("div",{className:"mt-4 flex w-full flex-col gap-2 md:w-fit",children:[(0,l.jsxs)(p.zx,{onClick:()=>t.reset(b),type:"button",variant:"outline",className:"flex w-full gap-2 border-forest-green-300",children:[(0,l.jsx)(h.Z,{className:"std-icon"}),s("reset_filters_button","Reset filters")]}),(0,l.jsx)(p.zx,{variant:"primary",type:"submit",className:"w-full",children:s("search_button","Search")})]})]})})};var y=r(10777),z=r(70598),O=r(73138),k=r(26134),C=r(40384),P=r(92214),U=r(2472),R=r(40867),T=r(6815);let q=async e=>{let s=await P.h.get("/reviews",{params:{...e.filter}});return(0,U.JH)(s)},I=e=>(0,y.a)({queryKey:[...T.l.reviews,e],queryFn:()=>q({...e}),retry:!1}),L=e=>
6{let s=(0,z.M5)(),{data:r,isLoading:l,isSuccess:t,isError:i}=I({filter:{per_page:"12",page:"".concat(s),...null==e?void 0:e.filter}}),a=(0,O.B)(null==r?void 0:r.meta,t,!0);return{data:r,isLoading:l,paginationElement:a,isSuccess:t,isError:i}},M=()=>{let e=(0,R.H1)("categories");return L({filter:{sort:"-created_at","filter[type]":"product",...(0,k.k)("categories",(0,C.J3)(e))}})};var D=r(41664),E=r.n(D),A=r(97788),S=r(20052),Z=r(87917),J=r(97358),V=r(74755),Y=r(39504),F=r(49455),K=r(43524),W=r(34697),$=r(94577),G=r(19453),H=r(33839),Q=r(45670),X=r(21064),B=r(85457),ee=r(701),es=r(7978),er=r(42083),el=r(55716);let et=e=>{var s,r,t,i;let a=(0,A.ws)(),n=e.review,{data:c}=(0,S.J1)();if(null==n)return null;let o=(0,er.J)(n),d=(0,es.A)(null==n?void 0:n.product),x=null==n?void 0:n.user,u=(0,el.U)(x).getUserTags(a),h=(0,el.U)(x).getProfileUrl(),{path:m,fallbackImage:f}=d.getProductImage(),j=d.getProductUrl(),g=o.getCreatedAt(),p=o.belongsToUser(null==c?void 0:null===(s=c.data)||void 0===s?void 0:s.id);return(0,l.jsxs)(X.Zb,{className:"flex flex-col gap-8 min-h-[9.5rem] items-stretch justify-between md:gap-4 md:flex-row bg-white p-4 lg:gap-6 lg:pr-6",children:[(0,l.jsx)(X.Ol,{className:"flex max-h-[150px] w-[7.5rem] shrink-0 justify-center self-center rounded-md border border-forest-green-100 px-3 py-2",children:(0,l.jsx)(E(),{href:j,rel:d.getProductUrlRel(),target:d.getProductUrlTarget(),onClick:d.openInternalUrl,children:(0,l.jsx)(Q.o,{ratio:1,children:(0,l.jsx)(Y.J,{src:m||f,alt:null!==(i=null==n?void 0:null===(r=n.product)||void 0===r?void 0:r.name)&&void 0!==i?i:"product img",fill:!0,className:"w-full object-contain"})})})}),(0,l.jsx)(X.aY,{className:"flex-grow",children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-4 mb-4",children:[(0,l.jsxs)("div",{className:"flex justify-between",children:[(0,l.jsx)(E(),{href:h,children:(0,l.jsx)(Z.VP,{user:n.user})}),(0,l.jsx)("p",{className:"text-xs text-forest-green-500 opacity-40",children:g})]}),(0,l.jsx)(J.$,{tags:u,type:"review"}),(0,l.jsx)(F.Q,{user:x}),(0,l.jsx)("div",{className:"flex self-start lg:hidden",children:(0,l.jsx)(ea,{isLoggedInUserTheAuthor:p,review:n})})]}),(0,l.jsx)("div",{className:"mb-2",children:(0,l.jsx)(E(),{href:j,rel:d.getProductUrlRel(),target:d.getProductUrlTarget(),onClick:d.openInternalUrl,children:(0,l.jsx)(B.w,{size:"h4",children:null==n?void 0:null===(t=n.product)||void 0===t?void 0:t.name})})}),(0,l.jsx)("div",{className:"flex gap-4 items-centers mb-4",children:(0,l.jsx)(K.T,{stars:n.rate,size:"moderate",className:"self-center"})}),(0,l.jsx)("div",{className:"flex flex-col gap-1",children:(0,l.jsx)(V.M,{text:n.description,expandThreshold:500})}),(0,l.jsx)(H.L,{size:4}),(0,l.jsx)(G.wQ,{review:n,dontAllowReply:!0})]})}),(0,l.jsx)(X.eW,{className:"hidden gap-2 self-start lg:flex",children:(0,l.jsx)(ea,{isLoggedInUserTheAuthor:p,review:n})})]})},ei=()=>(0,l.jsxs)(X.Zb,{className:"flex flex-col gap-8 min-h-[9.5rem] items-stretch justify-between md:gap-4 md:flex-row bg-white p-4 lg:gap-6 lg:pr-6",children:[(0,l.jsx)(X.Ol,{className:"flex max-h-[150px] w-[7.5rem] shrink-0 justify-center self-center rounded-md border border-forest-green-100 px-3 py-2",children:(0,l.jsx)(Q.o,{ratio:1,children:(0,l.jsx)(ee.O,{className:"h-full w-full"})})}),(0,l.jsx)(X.aY,{className:"flex-grow",children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("div",{className:"flex flex-col gap-4 mb-4",children:(0,l.jsxs)("div",{className:"flex justify-start gap-4 items-center",children:[(0,l.jsx)(ee.O,{className:"rounded-full w-8 h-8"}),(0,l.jsx)(ee.O,{className:"w-28 h-5"})]})}),(0,l.jsx)("div",{className:"mb-2",children:(0,l.jsx)(ee.O,{className:"h-10 min-w-1/3 w-[30rem]"})}),(0,l.jsx)("div",{className:"flex gap-4 items-centers mb-4",children:(0,l.jsx)(ee.O,{className:"h-5 w-[10rem]"})}),(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)(ee.O,{className:"w-full h-5"}),(0,l.jsx)(ee.O,{className:"w-full h-5"}),(0,l.jsx)(ee.O,{className:"w-full h-5"}),(0,l.jsx)(ee.O,{className:"w-2/3 h-5"})]}),(0,l.jsx)(H.L,{size:4}),(0,l.jsxs)("div",{className:"flex justify-end gap-4",children:[(0,l.jsx)(ee.O,{className:"w-20 h-8"}),(0,l.jsx)(ee.O,{className:"w-20 h-8"})]})]})})]}),ea=e=>{let{review:s,isLoggedInUserTheAuthor:r}=e;return r?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)($.r,{review:s}),(0,l.jsx)(W.n,{review:s})]}):null},en=()=>{let{t:e}=(0,w.LD)("reviews_page"),{data:s,paginationElement:r,isSuccess:t,isLoading:i,isError:a}=M(),n=t&&(null==s?void 0:s.data.length)===0;if(i){let e=Array.from({length:8},(e,s)=>s);return(0,l.jsx)("section",{className:"section-content",children:(0,l.jsx)("div",{className:"flex flex-col gap-8",children:e.map(e=>(0,l.jsx)(ei,{},e))})})}return a||!s||n?(0,l.jsx)("section",{className:"section-content mb-20",children:(0,l.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,l.jsx)(B.w,{size:"h4",children:e("reviews_list_empty","No reviews available")})})}):(0,l.jsxs)("section",{className:"section-content mb-20",children:[(0,l.jsx)("div",{className:"flex flex-col gap-4",children:s.data.map(e=>(0,l.jsx)(et,{review:e},e.id))}),(0,l.jsx)("div",{className:"mt-20",children:r})]})};var ec=r(13880),eo=r(55403),ed=r(30920),ex=!0;function eu(e){let{t:s}=(0,w.LD)("reviews_page"),{adScriptJsx:r}=(0,t.M)("default"),{isOpen:u,closeModal:h,setIsOpen:m}=(0,ec.E)(),f=[{title:s("breadcrumb_products","Products"),href:ed._.products},{title:s("breadcrumb_reviews","Reviews"),href:ed._.reviews,isCurrent:!0}];return(0,l.jsxs)(o.Ar,{header:(0,l.jsx)(n.h,{}),footer:(0,l.jsx)(a.$,{}),children:[(0,l.jsx)(x.V,{title:s("page_title","Reviews")}),(0,l.jsx)(d.V,{description:s("page_description","Reviews Page Description"),canonical:(0,eo.Y)()}),r,(0,l.jsxs)("section",{className:"section-content my-10 lg:my-20",children:[(0,l.jsx)("div",{className:"mb-4 hidden lg:block",children:(0,l.jsx)(i.a,{links:f})}),(0,l.jsxs)("div",{className:"flex justify-between",children:[(0,l.jsx)(B.w,{size:"h1",children:s("title","Reviews")}),(0,l.jsx)(c.U,{isOpen:u,setIsOpen:m,triggerClassName:"lg:hidden",children:(0,l.jsx)(_,{categories:e.categories,closeModal:h})})]})]}),(0,l.jsxs)("section",{className:"section-content grid grid-cols-1 pt-6 lg:grid-cols-ingredients-page lg:gap-10",children:[(0,l.jsx)("aside",{className:"hidden lg:block pb-10",children:(0,l.jsx)(_,{categories:e.categories})}),(0,l.jsx)("div",{children:(0,l.jsx)(en,{})})]})]})}},55403:function(e,s,r){"use strict";r.d(s,{Y:function(){return t}});var l=r(11163);let t=()=>(0,l.useRouter)().asPath.split("?")[0]||"/"}},function(e){e.O(0,[9226,6859,5675,4878,723,9619,150,3995,99,9316,1375,6392,5223,384,4608,9293,9047,8006,2888,9774,179],function(){return e(e.s=59901)}),_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.