PageSourceSearch

https://melini.hu/assets/ProductDetail-Cj7qNB7X.js

js melini.hu collected 2026-10-05 05:05:25 UTC 74,095 bytes, 275 lines download raw bytes

vendor: 5,660 bytes, lines 1-7
1import{i as Qe,j as e,T as Fe,S as Xe,r as S,k as ue,l as ee,m as te,n as ve,o as Le,p as me,I as be,h as J,t as oe,P as ye,q as et,s as tt,v as at,L as ne,D as rt,x as st,y as Me,w as lt,X as ot,z as Oe,A as Pe,E as nt,F as $e,G as it,H as dt,u as ge,N as fe,J as le,d as pe,K as Ce,O as ct,Q as mt,R as ut,U as ht,V as gt}from"./index-D4V58NzV.js";import{N as ft}from"./NotFoundLogger-ACrhl9U4.js";import{B as pt}from"./Breadcrumb-Dwfjq4X0.js";import{S as xt}from"./StaticCrawlerContent-DyvmbX-_.js";import{M as bt}from"./message-circle-C1YC_oZA.js";import{L as kt}from"./lock-6-KbmLva.js";import{T as vt}from"./textarea-BE1LfI9I.js";import{C as yt}from"./clock-Cj0_ZHR4.js";import{C as jt}from"./ChoganIdHelpNote-6D1Z1g77.js";import{B as wt}from"./baby-DWfRquu8.js";import{L as Be,S as zt}from"./sun-N7fpiKqf.js";import{A as Nt}from"./arrow-right-DgbJC6R2.js";import{F as St}from"./flask-conical-Bu7vGCt3.js";import{D as Mt,a as Ct,b as Et,C as It,c as Tt,d as At}from"./dialog-DqDpjbmU.js";import{S as Dt}from"./shippingOptions-CPLNeHB7.js";/**
2 * @license lucide-react v0.475.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 */const Rt=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ft=Qe("Earth",Rt);var je={};(function t(o,n,d,l){var c=!!(o.Worker&&o.Blob&&o.Promise&&o.OffscreenCanvas&&o.OffscreenCanvasRenderingContext2D&&o.HTMLCanvasElement&&o.HTMLCanvasElement.prototype.transferControlToOffscreen&&o.URL&&o.URL.createObjectURL),p=typeof Path2D=="function"&&typeof DOMMatrix=="function",i=(function(){if(!o.OffscreenCanvas)return!1;try{var s=new OffscreenCanvas(1,1),a=s.getContext("2d");a.fillRect(0,0,1,1);var g=s.transferToImageBitmap();a.createPattern(g,"no-repeat")}catch{return!1}return!0})();function m(){}function u(s){var a=n.exports.Promise,g=a!==void 0?a:o.Promise;return typeof g=="function"?new g(s):(s(m,m),null)}var f=(function(s,a){return{transform:function(g){if(s)return g;if(a.has(g))return a.get(g);var x=new OffscreenCanvas(g.width,g.height),v=x.getContext("2d");return v.drawImage(g,0,0),a.set(g,x),x},clear:function(){a.clear()}}})(i,new Map),M=(function(){var s=Math.floor(16.666666666666668),a,g,x={},v=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(a=function(y){var w=Math.random();return x[w]=requestAnimationFrame(function k(z){v===z||v+s-1<z?(v=z,delete x[w],y()):x[w]=requestAnimationFrame(k)}),w},g=function(y){x[y]&&cancelAnimationFrame(x[y])}):(a=function(y){return setTimeout(y,s)},g=function(y){return clearTimeout(y)}),{frame:a,cancel:g}})(),D=(function(){var s,a,g={};function x(v){function y(w,k){v.postMessage({options:w||{},callback:k})}v.init=function(k){var z=k.transferControlToOffscreen();v.postMessage({canvas:z},[z])},v.fire=function(k,z,C){if(a)return y(k,null),a;var T=Math.random().toString(36).slice(2);return a=u(function(E){function A(L){L.data.callback===T&&(delete g[T],v.removeEventListener("message",A),a=null,f.clear(),C(),E())}v.addEventListener("message",A),y(k,T),g[T]=A.bind(null,{data:{callback:T}})}),a},v.reset=function(){v.postMessage({reset:!0});for(var k in g)g[k](),delete g[k]}}return function(){if(s)return s;if(!d&&c){var v=["var CONFETTI, SIZE = {}, module = {};","("+t.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {","  if (msg.data.options) {","    CONFETTI(msg.data.options).then(function () {","      if (msg.data.callback) {","        postMessage({ callback: msg.data.callback });","      }","    });","  } else if (msg.data.reset) {","    CONFETTI && CONFETTI.reset();","  } else if (msg.data.resize) {","    SIZE.width = msg.data.resize.width;","    SIZE.height = msg.data.resize.height;","  } else if (msg.data.canvas) {","    SIZE.width = msg.data.canvas.width;","    SIZE.height = msg.data.canvas.height;","    CONFETTI = module.exports.create(msg.data.canvas);","  }","}"].join(`
7`);try{s=new Worker(URL.createObjectURL(new Blob([v])))}catch(y){return typeof console<"u"&&typeof console.warn=="function"&&console.warn("🎊 Could not load worker",y),null}x(s)}return s}})(),F={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function I(s,a){return a?a(s):s}function O(s){return s!=null}function h(s,a,g){return I(s&&O(s[a])?s[a]:F[a],g)}function r(s){return s<0?0:Math.floor(s)}function B(s,a){return Math.floor(Math.random()*(a-s))+s}function H(s){return parseInt(s,16)}function P(s){return s.map(V)}function V(s){var a=String(s).replace(/[^0-9a-f]/gi,"");return a.length<6&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),{r:H(a.substring(0,2)),g:H(a.substring(2,4)),b:H(a.substring(4,6))}}function ae(s){var a=h(s,"origin",Object);return a.x=h(a,"x",Number),a.y=h(a,"y",Number),a}function ie(s){s.width=document.documentElement.clientWidth,s.height=document.documentElement.clientHeight}function Q(s){var a=s.getBoundingClientRect();s.width=a.width,s.height=a.height}function j(s){var a=document.createElement("canvas");return a.style.position="fixed",a.style.top="0px",a.style.left="0px",a.style.pointerEvents="none",a.style.zIndex=s,a}function de(s,a,g,x,v,y,w,k,z){s.save(),s.translate(a,g),s.rotate(y),s.scale(x,v),s.arc(0,0,1,w,k,z),s.restore(
vendor: 5,035 bytes, line 7
7)}function X(s){var a=s.angle*(Math.PI/180),g=s.spread*(Math.PI/180);return{x:s.x,y:s.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:s.startVelocity*.5+Math.random()*s.startVelocity,angle2D:-a+(.5*g-Math.random()*g),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:s.color,shape:s.shape,tick:0,totalTicks:s.ticks,decay:s.decay,drift:s.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:s.gravity*3,ovalScalar:.6,scalar:s.scalar,flat:s.flat}}function re(s,a){a.x+=Math.cos(a.angle2D)*a.velocity+a.drift,a.y+=Math.sin(a.angle2D)*a.velocity+a.gravity,a.velocity*=a.decay,a.flat?(a.wobble=0,a.wobbleX=a.x+10*a.scalar,a.wobbleY=a.y+10*a.scalar,a.tiltSin=0,a.tiltCos=0,a.random=1):(a.wobble+=a.wobbleSpeed,a.wobbleX=a.x+10*a.scalar*Math.cos(a.wobble),a.wobbleY=a.y+10*a.scalar*Math.sin(a.wobble),a.tiltAngle+=.1,a.tiltSin=Math.sin(a.tiltAngle),a.tiltCos=Math.cos(a.tiltAngle),a.random=Math.random()+2);var g=a.tick++/a.totalTicks,x=a.x+a.random*a.tiltCos,v=a.y+a.random*a.tiltSin,y=a.wobbleX+a.random*a.tiltCos,w=a.wobbleY+a.random*a.tiltSin;if(s.fillStyle="rgba("+a.color.r+", "+a.color.g+", "+a.color.b+", "+(1-g)+")",s.beginPath(),p&&a.shape.type==="path"&&typeof a.shape.path=="string"&&Array.isArray(a.shape.matrix))s.fill(ce(a.shape.path,a.shape.matrix,a.x,a.y,Math.abs(y-x)*.1,Math.abs(w-v)*.1,Math.PI/10*a.wobble));else if(a.shape.type==="bitmap"){var k=Math.PI/10*a.wobble,z=Math.abs(y-x)*.1,C=Math.abs(w-v)*.1,T=a.shape.bitmap.width*a.scalar,E=a.shape.bitmap.height*a.scalar,A=new DOMMatrix([Math.cos(k)*z,Math.sin(k)*z,-Math.sin(k)*C,Math.cos(k)*C,a.x,a.y]);A.multiplySelf(new DOMMatrix(a.shape.matrix));var L=s.createPattern(f.transform(a.shape.bitmap),"no-repeat");L.setTransform(A),s.globalAlpha=1-g,s.fillStyle=L,s.fillRect(a.x-T/2,a.y-E/2,T,E),s.globalAlpha=1}else if(a.shape==="circle")s.ellipse?s.ellipse(a.x,a.y,Math.abs(y-x)*a.ovalScalar,Math.abs(w-v)*a.ovalScalar,Math.PI/10*a.wobble,0,2*Math.PI):de(s,a.x,a.y,Math.abs(y-x)*a.ovalScalar,Math.abs(w-v)*a.ovalScalar,Math.PI/10*a.wobble,0,2*Math.PI);else if(a.shape==="star")for(var N=Math.PI/2*3,$=4*a.scalar,_=8*a.scalar,U=a.x,W=a.y,Z=5,K=Math.PI/Z;Z--;)U=a.x+Math.cos(N)*_,W=a.y+Math.sin(N)*_,s.lineTo(U,W),N+=K,U=a.x+Math.cos(N)*$,W=a.y+Math.sin(N)*$,s.lineTo(U,W),N+=K;else s.moveTo(Math.floor(a.x),Math.floor(a.y)),s.lineTo(Math.floor(a.wobbleX),Math.floor(v)),s.lineTo(Math.floor(y),Math.floor(w)),s.lineTo(Math.floor(x),Math.floor(a.wobbleY));return s.closePath(),s.fill(),a.tick<a.totalTicks}function Y(s,a,g,x,v){var y=a.slice(),w=s.getContext("2d"),k,z,C=u(function(T){function E(){k=z=null,w.clearRect(0,0,x.width,x.height),f.clear(),v(),T()}function A(){d&&!(x.width===l.width&&x.height===l.height)&&(x.width=s.width=l.width,x.height=s.height=l.height),!x.width&&!x.height&&(g(s),x.width=s.width,x.height=s.height),w.clearRect(0,0,x.width,x.height),y=y.filter(function(L){return re(w,L)}),y.length?k=M.frame(A):E()}k=M.frame(A),z=E});return{addFettis:function(T){return y=y.concat(T),C},canvas:s,promise:C,reset:function(){k&&M.cancel(k),z&&z()}}}function q(s,a){var g=!s,x=!!h(a||{},"resize"),v=!1,y=h(a,"disableForReducedMotion",Boolean),w=c&&!!h(a||{},"useWorker"),k=w?D():null,z=g?ie:Q,C=s&&k?!!s.__confetti_initialized:!1,T=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,E;function A(N,$,_){for(var U=h(N,"particleCount",r),W=h(N,"angle",Number),Z=h(N,"spread",Number),K=h(N,"startVelocity",Number),Ke=h(N,"decay",Number),qe=h(N,"gravity",Number),We=h(N,"drift",Number),we=h(N,"colors",P),Ve=h(N,"ticks",Number),ze=h(N,"shapes"),Ge=h(N,"scalar"),Je=!!h(N,"flat"),Ne=ae(N),Se=U,he=[],Ye=s.width*Ne.x,Ze=s.height*Ne.y;Se--;)he.push(X({x:Ye,y:Ze,angle:W,spread:Z,startVelocity:K,color:we[Se%we.length],shape:ze[B(0,ze.length)],ticks:Ve,decay:Ke,gravity:qe,drift:We,scalar:Ge,flat:Je}));return E?E.addFettis(he):(E=Y(s,he,z,$,_),E.promise)}function L(N){var $=y||h(N,"disableForReducedMotion",Boolean),_=h(N,"zIndex",Number);if($&&T)return u(function(K){K()});g&&E?s=E.canvas:g&&!s&&(s=j(_),document.body.appendChild(s)),x&&!C&&z(s);var U={width:s.width,height:s.height};k&&!C&&k.init(s),C=!0,k&&(s.__confetti_initialized=!0);function W(){if(k){var K={getBoundingClientRect:function(){if(!g)return s.getBoundingClientRect()}};z(K),k.postMessage({resize:{width:K.width,height:K.height}});return}U.width=U.height=null}function Z(){E=null,x&&(v=!1,o.removeEventListener("resize",W)),g&&s&&(document.body.contains(s)&&document.body.removeChild(s),s=null,C=!1)}return x&&!v&&(v=!0,o.addEventListener("resize",W,!1)),k?k.fire(N,U,Z):A(N,U,Z)}return L.reset=function(){k&&k.reset(),E&&E.reset()},L}var G;function se(){return G||(G=q(null,{useWorker:!0,resize:!0})),G}function ce(s,a,g,x,v,y,w){var k=new Path2D(s),z=new Path2D;z.addPath(k,new DOMMatrix(a));var C=new Path2D;return C.addPath(z,new DOMMatrix([Math.cos(w)*v,Math.sin(w)*v,-Math.sin(w)*y,Math.cos(w)*y,g,x])),C}function b(s){if(!p)throw new Error("path confetti are not supported in this browser");var a,g;
7typeof s=="string"?a=s:(a=s.path,g=s.matrix);var x=new Path2D(a),v=document.createElement("canvas"),y=v.getContext("2d");if(!g){for(var w=1e3,k=w,z=w,C=0,T=0,E,A,L=0;L<w;L+=2)for(var N=0;N<w;N+=2)y.isPointInPath(x,L,N,"nonzero")&&(k=Math.min(k,L),z=Math.min(z,N),C=Math.max(C,L),T=Math.max(T,N));E=C-k,A=T-z;var $=10,_=Math.min($/E,$/A);g=[_,0,0,_,-Math.round(E/2+k)*_,-Math.round(A/2+z)*_]}return{type:"path",path:a,matrix:g}}function R(s){var a,g=1,x="#000000",v='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof s=="string"?a=s:(a=s.text,g="scalar"in s?s.scalar:g,v="fontFamily"in s?s.fontFamily:v,x="color"in s?s.color:x);var y=10*g,w=""+y+"px "+v,k=new OffscreenCanvas(y,y),z=k.getContext("2d");z.font=w;var C=z.measureText(a),T=Math.ceil(C.actualBoundingBoxRight+C.actualBoundingBoxLeft),E=Math.ceil(C.actualBoundingBoxAscent+C.actualBoundingBoxDescent),A=2,L=C.actualBoundingBoxLeft+A,N=C.actualBoundingBoxAscent+A;T+=A+A,E+=A+A,k=new OffscreenCanvas(T,E),z=k.getContext("2d"),z.font=w,z.fillStyle=x,z.fillText(a,L,N);var $=1/g;return{type:"bitmap",bitmap:k.transferToImageBitmap(),matrix:[$,0,0,$,-T*$/2,-E*$/2]}}n.exports=function(){return se().apply(this,arguments)},n.exports.reset=function(){se().reset()},n.exports.create=q,n.exports.shapeFromPath=b,n.exports.shapeFromText=R})((function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}})(),je,!1);const Lt=je.exports;je.exports.create;const Ot=new Set(["ml","g","db","illoolaj","olaj","noi","ferfi","parfum","doterra","es","a","az"]),xe=t=>String(t||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean);function Pt(t,o){var m;const n=xe(t),d=n.filter(u=>!Ot.has(u)&&!/^\d+$/.test(u)),l=n.filter(u=>/^\d+$/.test(u));let c=null,p=0;for(const u of o){if(!u.slug||u.isActive===!1)continue;const f=new Set(xe(u.slug)),M=d.filter(F=>f.has(F)).length;if(!M||M<d.length-1)continue;const D=M*10+l.filter(F=>f.has(F)).length-f.size*.1;D>p&&(p=D,c=u)}if(c)return`/termek/${c.slug}/`;const i=(m=o.find(u=>u.brand&&xe(u.brand)[0]===n[0]))==null?void 0:m.brand;return i?`/termekek/?q=${encodeURIComponent(i)}`:"/termekek/"}const $t={"doterra-diffuzorok":"/kategoria/diffusers/","doterra-olajok":"/kategoria/essential-oils/","doterra-on-guard-termekcsalad":"/kategoria/blends/","doterra-spa":"/kategoria/personal-care/",metapwr:"/kategoria/food-supplements/",diffusers:"/kategoria/diffusers/","essential-oils":"/kategoria/essential-oils/",blends:"/kategoria/blends/","body-care":"/kategoria/personal-care/",capsules:"/kategoria/food-supplements/"};function Bt(t,o){if(!t)return{type:"external",href:t};let n,d=!1;try{if(t.startsWith("/"))n=t.split("?")[0].split("#")[0],d=!0;else{const p=new URL(t);if(!p.hostname.includes("melini.hu"))return{type:"external",href:t};d=!0,n=p.pathname}}catch{return{type:"external",href:t}}if(!d)return{type:"external",href:t};if(n.startsWith("/wp-content/"))return{type:"strip"};if(n==="/doterra"||n==="/doterra/")return{type:"internal",href:"/termekek/"};const l=n.match(/^\/kategoria\/([^\/]+)\/?$/);if(l)return{type:"internal",href:$t[l[1]]||"/termekek/"};const c=n.match(/^\/termek\/([^\/]+)\/?$/);if(c){const p=o.get(c[1]);return{type:"internal",href:p?`/termek/${p.slug||p.slugEn||p.id}/`:"/termekek/"}}return{type:"internal",href:"/"}}function Ee(t,o){if(!t)return t;t=t.replace(/<\/b>\s*<b>\s*<\/b>/gi,"</b><br />"),t=t.replace(/<\/(b|strong)>(\s*\r?\n)/gi,"</$1><br />"),t=t.replace(/(\r?\n\s*)(?=<(?:b|strong)\b)/gi,"<br />$1");const n=new Map;for(const d of o||[])d.slug&&n.set(d.slug,d),d.slugEn&&n.set(d.slugEn,d);return t.replace(/<a\b([^>]*)>([\s\S]*?)<\/a>/gi,(d,l,c)=>{const p=l.match(/href="([^"]*)"/i);if(!p)return d;const i=Bt(p[1],n);if(i.type==="strip")return c;let m=l.replace(/href="[^"]*"/i,`href="${i.href}"`);return i.type==="external"?(/\btarget=/i.test(m)||(m+=' target="_blank"'),/\brel=/i.test(m)||(m+=' rel="noopener noreferrer"')):m=m.replace(/\s*target="[^"]*"/i,""),`<a${m}>${c}</a>`})}function Ht({product:t}){if(!t)return null;const o=[{icon:Fe,title:"Ingyenes kiszállítás",desc:"18 000 Ft feletti rendelés esetén"},{icon:Xe,title:"100% eredeti",desc:"Eredeti, garantált termék"},{icon:bt,title:"Szakértői tanácsadás",desc:"Segítünk a választásban"},{icon:kt,title:"Biztonságos fizetés",desc:"Titkosított tranzakciók"}];return e.jsxs("div",{className:"mt-8",children:[e.jsx("div",{className:"grid grid-cols-2 gap-3 border border-slate-200 rounded-lg p-4 bg-slate-50/50",children:o.map(({icon:n,title:d,desc:l})=>e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"shrink-0 w-9 h-9 rounded-full bg-white border border-slate-200 flex items-center justify-center",children:e.jsx(n,{className:"w-4 h-4 text-brand"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-medium text-slate-900 leading-tight",children:d}),e.jsx("div",{className:"text-xs text-slate-500 leading-tight mt-0.5",children:l})]})]},d))}),t.sku&&e.jsxs("div",{className:"text-xs text-slate-400 pt-3",children:["Termékkód: ",t.sku]})]})}function _t({product:t,displayTitle:o,onAddToCart:n,justAdded:d,variation:l}){const[c,p]=S.useState(!1),i=S.useRef(null);if(S.useEffect(()=>{const F=document.querySelector("[data-main-add-to-cart]");if(!F)return;const I=new IntersectionObserver(([O])=>{p(!O.isIntersecting)},{threshold:0,rootMargin:"0px 0px -40px 0px"});return I.observe(F),()=>I.disconnect()},[t==null?void 0:t.id]),S.useEffect(()=>{var I;if(!c){document.documentElement.style.setProperty("--sticky-bar-offset","0px");return}const F=((I=i.current)==null?void 0:I.offsetHeight)||72;return document.documentElement.style.setProperty("--sticky-bar-offset",`${F+8}px`),()=>{document.documentElement.style.setProperty("--sticky-bar-offset","0px")}},[c]),!t)return null;const m=l||t,{price:u}=ue(m),f=m.stockStatus==="outofstock"||m.stock===0&&m.stockStatus!=="onbackorder",M=f?{text:"Nincs készleten",cls:"text-red-600"}:m.stockStatus==="onbackorder"?{text:"Utánrendelésre",cls:"text-amber-600"}:m.stock===1?{text:"Csak 1 db",cls:"text-orange-600"}:m.stock>1?{text:`${m.stock} db készleten`,cls:"text-green-600"}:{text:"Készleten",cls:"text-green-600"},D=f?"Nincs készleten":m.stockStatus==="onbackorder"?"Utánrendelés":"Kosárba";return e.jsx("div",{ref:i,"aria-hidden":!c,className:`fixed bottom-[calc(var(--bottom-nav-offset,0px)+var(--cookie-banner-offset,0px))] md:bottom-[var(--cookie-banner-offset,0px)] left-0 right-0 z-30 bg-white border-t border-slate-200 shadow-[0_-4px_20px_rgba(0,0,0,0.06)] transition-transform duration-300 ${c?"translate-y-0":"translate-y-full pointer-events-none"}`,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-3 md:px-4 py-2.5 md:py-3 flex items-center gap-3 md:gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2.5 md:gap-3 min-w-0 flex-1",children:[t.image&&e.jsx("div",{className:"w-11 h-11 md:w-14 md:h-14 bg-slate-50 rounded shrink-0 overflow-hidden",children:e.jsx("img",{src:t.image,alt:"",width:"56",height:"56",loading:"lazy",decoding:"async",className:"w-full h-full object-contain"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-xs md:text-sm font-medium text-slate-900 truncate",children:l!=null&&l.name?`${o} – ${l.name}`:o}),e.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[e.jsx("span",{className:"text-sm md:text-base font-semibold text-slate-900",children:ee(u)}),e.jsxs("span",{className:`hidden sm:inline text-xs ${M.cls}`,children:["· ",M.text]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx("span",{className:`sm:hidden text-[11px] font-medium ${M.cls}`,children:M.text}),e.jsx(te,{onClick:n,disabled:f,className:"bg-brand hover:bg-brand/90 rounded-md h-10 px-3 md:px-6 text-xs md:text-sm disabled:opacity-50 disabled:cursor-not-allowed",children:f?e.jsx("span",{children:"Nincs készleten"}):d?e.jsxs(e.Fragment,{children:[e.jsx(ve,{className:"w-4 h-4 md:mr-2"}),e.jsx("span",{className:"hidden md:inline",children:"Kosárban"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Le,{className:"w-4 h-4 md:mr-2"}),e.jsx("span",{className:"hidden md:inline",children:D}),e.jsx("span",{className:"md:hidden",children:"Kosárba"})]})})]})]})})}function Ut({product:t}){const[o,n]=S.useState([]),[d,l]=S.useState(!0),[c,p]=S.useState(!1),[i,m]=S.useState(!1),[u,f]=S.useState({name:"",email:"",rating:5,reviewText:"",website:""}),[M,D]=S.useState(0),F=async()=>
7{l(!0);const r=(await J.entities.Review.filter({productId:t.id,approved:!0},"-created_date",50)||[]).slice().sort((B,H)=>new Date(H.reviewDate||H.created_date)-new Date(B.reviewDate||B.created_date));n(r),l(!1)};S.useEffect(()=>{t!=null&&t.id&&F()},[t==null?void 0:t.id]);const I=async h=>{var B;if(h.preventDefault(),!u.name||!u.email||!u.reviewText){oe.error("Kérlek, töltsd ki az összes mezőt");return}m(!0);const r=await J.functions.invoke("submitReview",{productId:t.id,rating:Number(u.rating),reviewText:u.reviewText,name:u.name,email:u.email,website:u.website,elapsedMs:Date.now()-M}).catch(H=>{var P,V;return{data:{error:((V=(P=H==null?void 0:H.response)==null?void 0:P.data)==null?void 0:V.error)||"Hiba történt, kérjük, próbáld újra."}}});if(m(!1),(B=r.data)!=null&&B.error){oe.error(r.data.error);return}p(!1),f({name:"",email:"",rating:5,reviewText:"",website:""}),oe.success("Köszönjük! Az értékelésed jóváhagyás után jelenik meg.")},O=o.length>0?(o.reduce((h,r)=>h+(r.rating||0),0)/o.length).toFixed(1):null;return e.jsxs("section",{className:"mt-20 border-t border-slate-100 pt-12",children:[e.jsxs("div",{className:"flex items-center justify-between mb-8 flex-wrap gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-light text-slate-900",children:"Vásárlói értékelések"}),O&&e.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[e.jsx("div",{className:"flex gap-0.5",children:[...Array(5)].map((h,r)=>e.jsx(me,{className:`w-4 h-4 ${r<Math.round(O)?"fill-amber-400 text-amber-400":"text-slate-200"}`},r))}),e.jsxs("span",{className:"text-sm text-slate-600",children:[O," / 5 (",o.length," értékelés)"]})]})]}),e.jsx(te,{variant:"outline",onClick:()=>{D(Date.now()),p(!c)},children:c?"Mégsem":"Értékelés írása"})]}),c&&e.jsxs("form",{onSubmit:I,className:"bg-slate-50 p-6 mb-8 space-y-4 max-w-2xl",children:[e.jsx("p",{className:"text-xs text-slate-600",children:"Jóváhagyott, korábban megvásárolt termék értékeléséért bejelentkezett vásárlóként 200 pont jár. A vásárláskor használt e-mail címet add meg."}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsx(be,{placeholder:"Neved",value:u.name,onChange:h=>f({...u,name:h.target.value})}),e.jsx(be,{type:"email",placeholder:"E-mail (nem jelenik meg)",value:u.email,onChange:h=>f({...u,email:h.target.value})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-slate-600",children:"Értékelés:"}),[1,2,3,4,5].map(h=>e.jsx("button",{type:"button",onClick:()=>f({...u,rating:h}),children:e.jsx(me,{className:`w-6 h-6 ${h<=u.rating?"fill-amber-400 text-amber-400":"text-slate-300"}`})},h))]}),e.jsx("input",{type:"text",name:"website",tabIndex:-1,autoComplete:"off","aria-hidden":"true",value:u.website,onChange:h=>f({...u,website:h.target.value}),className:"hidden"}),e.jsx(vt,{placeholder:"Oszd meg a tapasztalatod...",rows:4,value:u.reviewText,onChange:h=>f({...u,reviewText:h.target.value})}),e.jsx(te,{type:"submit",disabled:i,className:"bg-brand hover:bg-brand/90",children:i?"Beküldés...":"Értékelés beküldése"})]}),d?e.jsx("p",{className:"text-sm text-slate-500",children:"Értékelések betöltése…"}):o.length===0?e.jsx("p",{className:"text-sm text-slate-500",children:"Még nincs értékelés. Legyél te az első!"}):e.jsx("div",{className:"space-y-6 max-w-3xl",children:o.map(h=>e.jsxs("div",{className:"border-b border-slate-100 pb-6",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"flex gap-0.5",children:[...Array(5)].map((r,B)=>e.jsx(me,{className:`w-4 h-4 ${B<h.rating?"fill-amber-400 text-amber-400":"text-slate-200"}`},B))}),e.jsx("span",{className:"font-medium text-slate-900",children:h.name}),e.jsx("span",{className:"text-xs text-slate-400",children:new Date(h.reviewDate||h.created_date).toLocaleDateString("hu-HU")})]}),e.jsx("p",{className:"text-slate-700 text-sm leading-relaxed",children:h.reviewText})]},h.id))})]})}function Kt({currentProduct:t,allProducts:o}){var p;if(!t||!(o!=null&&o.length))return null;const n=(t.categoryEn||t.category||"").toLowerCase(),d=((p=t.tagsEn)!=null&&p.length?t.tagsEn:t.tags||[]).map(i=>String(i).toLowerCase()),l=i=>i.stockStatus==="outofstock"||i.stock===0&&i.stockStatus!=="onbackorder",c=o.filter(i=>i.id!==t.id&&i.isActive!==!1&&!l(i)).map(i=>{var M;const m=(i.categoryEn||i.category||"").toLowerCase(),u=((M=i.tagsEn)!=null&&M.length?i.tagsEn:i.tags||[]).map(D=>String(D).toLowerCase());let f=0;return n&&m&&m===n&&(f+=3),f+=u.filter(D=>d.includes(D)).length,{product:i,relevance:f,popularity:i.popularityScore||0}}).sort((i,m)=>m.relevance-i.relevance||m.popularity-i.popularity).slice(0,4).map(i=>i.product);return c.length===0?null:e.jsxs("section",{className:"mt-20 border-t border-slate-100 pt-12",children:[e.jsx("h2",{className:"text-xl font-light text-slate-900 mb-8",children:"Ezek is tetszhetnek"}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6",children:c.map(i=>e.jsx(ye,{product:i},i.id))})]})}const ke="recentlyViewedProducts",qt=8;function Wt(t){if(t)try{const n=JSON.parse(localStorage.getItem(ke)||"[]").filter(d=>d!==t);n.unshift(t),localStorage.setItem(ke,JSON.stringify(n.slice(0,qt)))}catch{}}function Vt({currentProduct:t,allProducts:o}){if(S.useEffect(()=>
7{t!=null&&t.id&&Wt(t.id)},[t==null?void 0:t.id]),!(o!=null&&o.length))return null;let n=[];try{n=JSON.parse(localStorage.getItem(ke)||"[]")}catch{n=[]}const d=n.filter(l=>l!==(t==null?void 0:t.id)).map(l=>o.find(c=>c.id===l)).filter(Boolean).slice(0,4);return d.length===0?null:e.jsxs("section",{className:"mt-20 border-t border-slate-100 pt-12",children:[e.jsx("h2",{className:"text-xl font-light text-slate-900 mb-8",children:"Nemrég megtekintett"}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6",children:d.map(l=>e.jsx(ye,{product:l},l.id))})]})}const Ie=18e3;function Gt(){const t=new Date,o=t.getHours(),n=t.getDay(),d=(D,F)=>{const I=new Date(D);let O=0;for(;O<F;){I.setDate(I.getDate()+1);const h=I.getDay();h!==0&&h!==6&&(O+=1)}return I};let l=new Date(t);const c=n===0||n===6,p=o>=14;for((c||p)&&(l=d(t,1));l.getDay()===0||l.getDay()===6;)l.setDate(l.getDate()+1);const i=d(l,1),m=d(l,3),u=D=>D.toLocaleDateString("hu-HU",{weekday:"short",day:"numeric",month:"short"});return{dispatchLabel:l.toDateString()===t.toDateString()?"ma":u(l),arriveFrom:u(i),arriveTo:u(m)}}function Jt({productTotal:t=0,stockStatus:o}){const{dispatchLabel:n,arriveFrom:d,arriveTo:l}=Gt(),c=t>=Ie,p=c?0:Ie-t,i=o==="onbackorder";return e.jsxs("div",{className:"mb-6 border border-slate-200 rounded-lg p-3 bg-slate-50/60 space-y-2",children:[e.jsxs("div",{className:"flex items-start gap-2.5 text-sm",children:[e.jsx(Fe,{className:"w-4 h-4 text-brand mt-0.5 shrink-0"}),i?e.jsxs("div",{className:"text-slate-700",children:[e.jsx("span",{className:"font-medium text-slate-900",children:"Feladás, amint újra készleten van"}),e.jsx("span",{className:"text-slate-500",children:" · e-mailben jelezzük a feladás dátumát"})]}):e.jsxs("div",{className:"text-slate-700",children:[e.jsxs("span",{className:"font-medium text-slate-900",children:["Feladás: ",n]}),e.jsxs("span",{className:"text-slate-500",children:[" · érkezés: ",d,"–",l]})]})]}),e.jsxs("div",{className:"flex items-start gap-2.5 text-sm",children:[e.jsx(et,{className:"w-4 h-4 text-brand mt-0.5 shrink-0"}),c?e.jsx("div",{className:"text-green-700 font-medium",children:"Ingyenes kiszállítás"}):e.jsxs("div",{className:"text-slate-700",children:["Még ",e.jsx("span",{className:"font-semibold text-slate-900",children:ee(p)})," és"," ",e.jsx("span",{className:"text-green-700 font-medium",children:"ingyenes a kiszállítás"})]})]})]})}const Yt=["chogan","aurodhea","lolum","mithology","mythology"];function Zt({brand:t}){const o=(t||"").toLowerCase();return Yt.some(n=>o.includes(n))?e.jsxs("p",{className:"mb-3 flex items-center gap-2 text-sm font-semibold text-red-600",children:[e.jsx(yt,{className:"w-4 h-4 shrink-0"}),"Készlethiánynál a beszerzési idő 8-10 munkanap"]}):null}function Qt({productId:t,variationSku:o}){const[n,d]=S.useState(""),[l,c]=S.useState(""),[p,i]=S.useState(!1),[m,u]=S.useState(!1),[f,M]=S.useState(""),D=S.useRef(Date.now()),F=async I=>{var O,h;I.preventDefault(),i(!0),M("");try{await J.functions.invoke("subscribeStockAlert",{email:n,productId:t,variationSku:o,website:l,elapsedMs:Date.now()-D.current}),u(!0)}catch(r){M(((h=(O=r.response)==null?void 0:O.data)==null?void 0:h.error)||"Nem sikerült a feliratkozás, próbáld újra.")}finally{i(!1)}};return m?e.jsxs("p",{className:"mb-6 flex items-center gap-2 text-sm text-foreground",role:"status",children:[e.jsx(ve,{className:"w-4 h-4 text-brand"})," Köszönjük! E-mailben szólunk, amint újra elérhető."]}):e.jsxs("form",{onSubmit:F,className:"mb-6 border border-border p-4","data-testid":"stock-alert-form",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-medium mb-1",children:[e.jsx(tt,{className:"w-4 h-4 text-brand"})," Értesítsen, ha újra elérhető"]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Add meg az e-mail címed, és szólunk, amint visszakerül a készletre."}),e.jsx("input",{type:"text",name:"website",value:l,onChange:I=>c(I.target.value),tabIndex:-1,autoComplete:"off",className:"hidden","aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsx(be,{type:"email",required:!0,placeholder:"E-mail címed","aria-label":"E-mail cím",value:n,onChange:I=>d(I.target.value)}),e.jsx(te,{type:"submit",disabled:p,children:p?e.jsx(at,{className:"w-4 h-4 animate-spin"}):"Értesítést kérek"})]}),f&&e.jsx("p",{className:"text-sm text-destructive mt-2",role:"alert",children:f})]})}const Xt=t=>
7`${Math.round(t||0).toLocaleString("hu-HU")} Ft`,ea=t=>t.stockStatus==="outofstock"||t.stock===0&&t.stockStatus!=="onbackorder";function ta({product:t,allProducts:o}){const n=t==null?void 0:t.category,d=(o||[]).filter(l=>l.id!==t.id&&l.isActive!==!1&&!ea(l)&&n&&l.category===n).sort((l,c)=>(c.popularityScore||0)-(l.popularityScore||0)).slice(0,3);return d.length?e.jsxs("div",{className:"mb-6 rounded-lg border border-slate-200 p-4",children:[e.jsx("p",{className:"text-sm font-medium text-slate-900 mb-3",children:"Most elérhető helyettesítők"}),e.jsx("ul",{className:"space-y-3",children:d.map(l=>e.jsx("li",{children:e.jsxs(ne,{to:`/termek/${l.slug||l.id}`,className:"flex items-center gap-3 hover:text-brand",children:[l.image&&e.jsx("img",{src:l.image,alt:l.title,className:"w-12 h-12 object-contain rounded",loading:"lazy"}),e.jsx("span",{className:"flex-1 text-sm",children:l.title}),e.jsx("span",{className:"text-sm font-medium",children:Xt(l.salePrice||l.regularPrice)})]})},l.id))})]}):null}const aa=`
8doterra-grepfrut-15-ml doterra-grapefruit-essential-oil-15-ml
9doterra-fodormenta-15-ml doterra-spearmint-essential-oil-15-ml
10doterra-fekete-bors-5-ml doterra-black-pepper-essential-oil-5-ml
11doterra-fahej-5-ml doterra-cinnamon-oil-essential-oil-5ml
12doterra-eukaliptusz-15-ml doterra-eucalyptus-essential-oil-15-ml
13doterra-duglaszfenyo-5-ml doterra-douglas-fir-essential-oil-5-ml
14doterra-copaiba-touch-10-ml doterra-copaiba-touch-10-ml
15doterra-copaiba-15-ml doterra-copaiba-oil-essential-oil-15-ml
16doterra-citronella-15-ml doterra-citronella-essential-oil-15-ml
17doterra-citrom-illoolaj-15-ml doterra-lemon-essential-oil-15-ml
18doterra-ciprus-15-ml doterra-cypress-essential-oil-15-ml
19doterra-borokabogyo-5-ml doterra-juniper-berry-essential-oil-5-ml
20doterra-borsmenta-gyongyocske-125-db doterra-peppermint-beadlets-125-count
21doterra-borsmenta-touch-10-ml doterra-peppermint-touch-10-ml
22doterra-borsmenta-illoolaj-15-ml doterra-peppermint-essential-oil-15-ml
23doterra-bergamott-olaj-15-ml doterra-bergamot-oil-essential-oil-15-ml
24doterra-bazsalikom-olaj-15-ml doterra-basil-oil-essential-oil-15-ml
25doterra-vietnami-eukaliptusz-15-ml doterra-vietnamese-eucalyptus-essential-oil-15-ml
26doterra-vetiver-15-ml doterra-vetiver-essential-oil-15-ml
27doterra-vadnarancs-olaj-15-ml doterra-wild-orange-essential-oil-15-ml
28doterra-tomjen-touch-10-ml doterra-frankincense-touch-oil
29doterra-tomjen-15-ml doterra-frankincense-essential-oil-15-ml
30doterra-tulsi-szent-bazsalikom-5-ml doterra-tulsi-holy-basil-essential-oil-5-ml
31doterra-teafa-touch-10-ml doterra-tea-tree-touch-10-ml
32doterra-teafa-15-ml doterra-tea-tree-oil-essential-oil-15ml
33doterra-tangerin-15-ml doterra-tangerine-essential-oil-15ml
34doterra-sziberiai-fenyo-15-ml doterra-siberian-fir-essential-oil-15-ml
35doterra-szegfuszeg-15-ml doterra-clove-oil-essential-oil-15-ml
36doterra-szantalfa-5-ml doterra-sandalwood-essential-oil-5-ml
37doterra-spanyol-zsalya-15-ml doterra-spanish-sage-essential-oil-15-ml
38doterra-rozsaszin-bors-5-ml doterra-pink-pepper-essential-oil-5-ml
39doterra-rozsa-touch-10-ml doterra-rose-touch-10-ml
40doterra-rozsa-illoolaj-5-ml doterra-rose-essential-oil-5-ml
41doterra-romai-kamilla-5-ml doterra-roman-chamomile-essential-oil-5ml
42doterra-rozmaring-illoolaj-15-ml doterra-rosemary-essential-oil-15-ml
43doterra-petitgrain-15-ml doterra-petitgrain-essential-oil-15-ml
44doterra-pacsuli-15-ml doterra-patchouli-essential-oil-15ml
45doterra-orvosi-citromfu-5-ml doterra-melissa-essential-oil-5-ml
46doterra-oregano-touch-10-ml doterra-oregano-touch-10-ml
47doterra-oregano-15-ml doterra-oregano-essential-oil-15-ml
48doterra-olasz-szamlagyopar-touch-10-ml doterra-italian-helichrysum-touch-10-ml
49doterra-olasz-szalmagyopar-5-ml doterra-italian-helichrysum-essential-oil-5-ml
50doterra-neroli-touch-10-ml doterra-neroli-touch-10-ml
51doterra-muskatli-15-ml doterra-geranium-oil-essential-oil-15-ml
52doterra-muskotalyzsalya-15-ml doterra-clary-sage-essential-oil-15-ml
53doterra-mirha-15-ml doterra-myrrh-essential-oil-15-ml
54doterra-majoranna-15-ml doterra-marjoram-essential-oil-15-ml
55doterra-magnolia-touch-10-ml doterra-magnolia-touch-10-ml
56doterra-madagaszkari-vanilia-5-ml doterra-madagascar-vanilla-essential-oil-5-ml
57doterra-levendula-touch-10-ml doterra-lavender-touch-10-ml
58doterra-levendula-illoolaj-15-ml doterra-lavender-essential-oil-15-ml
59doterra-kek-varadics-5-ml doterra-blue-tansy-essential-oil-5-ml
60doterra-kurkuma-15-ml doterra-turmeric-essential-oil-15-ml
61doterra-korianderzold-15-ml doterra-cilantro-essential-oil-15-ml
62doterra-koriandermag-15-ml doterra-coriander-seed-essential-oil-15-ml
63doterra-kasszia-15-ml doterra-cassia-essential-oil-15-ml
64doterra-kardamom-5-ml doterra-cardamom-essential-oil-5-ml
65doterra-kanadai-fekete-luc-5-ml doterra-canadian-black-spruce-essential-oil-5-ml
66doterra-kakukkfu-olaj-15-ml doterra-thyme-essential-oil-15-ml
67doterra-jazmin-touch-10-ml doterra-jasmine-touch-10-ml
68doterra-indiai-nardus-5-ml doterra-spikenard-essential-oil-5-ml
69doterra-indiai-citromfu-15-ml doterra-indian-lemongrass-essential-oil-15-ml
70doterra-illatcserje-touch-10-ml doterra-osmanthus-touch-10-ml
71doterra-ilang-ilang-15-ml doterra-ylang-ylang-essential-oil-15-ml
72doterra-hawaii-szantalfa-5-ml doterra-hawaiian-sandalwood-essential-oil-5-ml
73doterra-gyomber-15-ml doterra-ginger-essential-oil-15-ml
74doterra-guajakfa-15-ml doterra-guaiac-wood-essential-oil-15-ml
75doterra-petal-2-0-diffuzor doterra-petal-20-diffuser
76lumo-diffuzor-es-doterra-serenity lumo-diffuser-and-doterra-serenity
77doterra-orias-tuja-5-ml doterra-arborvitae-essential-oil-5ml
78doterra-edeskomeny-15-ml doterra-fennel-essential-oil-15-ml
79doterra-zoldcitrom-15-ml doterra-lime-essential-oil-15-ml
80doterra-zold-mandarin-15-ml doterra-green-mandarin-essential-oil-15-ml
81doterra-zellermag-15-ml doterra-celery-seed-essential-oil-15-ml
82doterra-yarrowpom-30-ml doterra-yarrowpom-essential-oil-30-ml
83doterra-voros-cedrus-15-ml doterra-cedarwood-essential-oil-15ml
84doterra-align doterra-align
85doterra-air-touch doterra-air-touch-10-ml
86doterra-air doterra-air-15-ml-blend
87doterra-adaptiv-touch doterra-adaptiv-touch
88doterra-adaptiv doterra-adaptiv
89doterra-zendocrine-lagyzselatin-kapszula doterra-zendocrine-softgels
90doterra-zendocrine doterra-zendocrine
91doterra-zengest-lagyzselatin-kapszula doterra-zengest-softgel-capsules
92doterra-zengest-touch doterra-zengest-touch
93doterra-zengest doterra-zengest
94doterra-whisper-touch doterra-whisper-touch
95doterra-triease-lagyzselatin-kapszula doterra-triease-softgels
96doterra-thinker doterra-thinker-10-ml-blend
97doterra-terrashield doterra-terrashield
98doterra-terrashield-spray doterra-terrashield-spray
99doterra-tamer doterra-tamer
100doterra-supermint-gyongyocske doterra-supermint-beadlets
101doterra-supermint doterra-supermint-15-ml-blend
102doterra-smart-sassy-lagyzselatin-kapszula doterra-smart-sassy-softgel-capsules
103doterra-bevezeto-csomag doterra-introductory-kit
104doterra-smart-sassy doterra-smart-sassy
105doterra-pasttense doterra-pasttense-touch
106doterra-on-guard-gyongyocskek doterra-on-guard-beadlets
107doterra-on-guard-touch-illoolaj doterra-on-guard-touch-essential-oil-10ml
108doterra-elevation doterra-elevation-15-ml-blend
109deep-blue-touch deep-blue-touch
110deep-blue-golyos-kiszerelesben doterra-deep-blue-roll-on
111deep-blue doterra-deep-blue-5-ml-blend
112ddr-prime-lagyzselatin-kapszula ddr-prime-softgel-capsules
113ddr-prime-15-ml doterra-ddr-prime-15-ml-blend
114clarycalm-10-ml doterra-clarycalm-10-ml-blend
115doterra-citrus-bliss-15-ml doterra-citrus-bliss-15-ml-blend
116aromatouch-15-ml doterra-aromatouch-15-ml
117doterra-air-x-15-ml doterra-air-x-15-ml-blend
118doterra-dawn-aromas-diffuzor doterra-dawn-aromatic-diffuser
119harmas-csomag-petal-parologtatoval petal-diffuser-triple-pack
120doterra-roam-diffuzor doterra-roam-diffuser
121doterra-laluz-diffuzor doterra-laluz-diffuser
122volo-onyx-diffuzor-zold-mandarinnal doterra-volo-onyx-diffuser-with-green-mandarin
123volo-marble-diffuzor-zold-mandarinnal doterra-volo-marble-diffuser-with-green-mandarin
124vonatos-parologtato-borsmentaval train-diffuser-with-peppermint-discontinued
125doterra-purify doterra-purify-15-ml-blend
126doterra-peace-touch doterra-peace-touch
127doterra-peace doterra-peace
128doterra-passion-touch doterra-passion-touch
129doterra-passion doterra-passion
130doterra-on-guard-lagyzselatin-kapszula doterra-on-guard-softgels
131doterra-on-guard doterra-on-guard-15-ml-blend
132doterra-motivate-touch doterra-motivate-touch-10-ml
133doterra-motivate doterra-motivate
134doterra-hope-touch doterra-hope-touch
135doterra-hd-clear doterra-hd-clear
136doterra-forgive-touch doterra-forgive-touch
137doterra-forgive doterra-forgive
138doterra-console-touch doterra-console-touch
139doterra-console doterra-console
140doterra-cheer-touch doterra-cheer-touch
141doterra-cheer doterra-cheer
142doterra-calmer doterra-calmer
143doterra-brave doterra-brave-10-ml-blend
144doterra-balance-touch doterra-balance-touch
145doterra-abode doterra-abode-15-ml-blend
146doterra-balance doterra-balance-15-ml-blend
147doterra-arise doterra-arise
148doterra-anchor doterra-anchor
149doterra-olajos-kincsesladika-es-szegfuszeg doterra-essential-oil-treasure-chest-and-clove
150doterra-neshama doterra-neshama-10-ml
151doterra-lavakoves-passziv-parologtato doterra-lava-stone-passive-diffuser-and-himalayan-fir
152doterra-levesestalkeszlet-es-portugal-izek-kevereke doterra-soup-bowl-set-and-portuguese-flavours-blend
153doterra-holiday-joy doterra-holiday-joy
154doterra-on-guard-cukorka doterra-on-guard-lozenges
155doterra-on-guard-szajviz doterra-on-guard-mouthwash
156doterra-on-guard-torlokendo doterra-on-guard-wipes
157doterra-on-guard-tisztito-koncentratum doterra-on-guard-cleaner-concentrate
158doterra-borostyan-szinu-habzokezmoso-adagolo-3-db doterra-amber-foaming-hand-wash-dispenser-pack-of-3
159doterra-on-guard-fogkrem doterra-on-guard-toothpaste
160doterra-on-guard-mososzer doterra-on-guard-laundry-detergent
161doterra-deep-blue-stift doterra-deep-blue-stick
162doterra-deep-blue-enyhito-krem doterra-deep-blue-soothing-cream
163doterra-deep-blue-polyphenol-complex doterra-deep-blue-polyphenol-complex
164doterra-air-leguttisztito-stift doterra-air-respiratory-clearing-stick
165doterra-air-cukorka doterra-air-drops
166doterra-harvest-spice doterra-harvest-spice
167doterra-joga-kollekcio doterra-yoga-collection
168doterra-supermint-touch doterra-supermint-touch
169doterra-stronger doterra-stronger
170doterra-steady doterra-steady
171doterra-serenity-lagyzselatin-kapszula doterra-serenity-softgel-capsules
172doterra-serenity doterra-serenity-15-ml-blend
173doterra-salubelle doterra-salubelle-10-ml-blend
174doterra-rescuer doterra-rescuer
175vegan-microplex-vmz vegan-microplex-vmz
176metapwr-lagyzselatin-kapszula metapwr-softgel-capsule
177doterra-metapwr-gyongyok metapwr-beadlets
178doterra-metapwr-assist doterra-metapwr-assist
179doterra-metapwr-advantage doterra-metapwr-advantage
180doterra-metapwr doterra-metapwr
181doterra-sun-asvanyi-fenyvedo-stift-arcra-es-testre doterra-sun-mineral-sunscreen-stick-for-face-and-body
182doterra-sun-asvanyi-fenyvedo-krem-arcra-es-testre doterra-sun-mineral-sun-cream-for-face-and-body
183doterra-sun-asvanyi-fenyvedo-spray dterra-sun-mineral-sunscreen-body-spray
184napozas-utani-gel dterra-sun-after-sun-body-spray
185elenkito-gel invigorating-gel
186doterra-on-guard-kezfertotlenito-permet doterra-on-guard-hand-sanitising-mist
187doterra-on-guard-habzo-kezmoso doterra-on-guard-foaming-hand-wash
188doterra-serenity-szappan doterra-serenity-soap
189doterra-hidratalo-szappan doterra-moisturising-soap
190citrus-bliss-kezkrem citrus-bliss-hand-cream
191doterra-balance-szappan doterra-balance-soap
192tropusi-ajakbalzsam tropical-lip-balm
193doterra-vetiver-touch-10ml doterra-vetiver-touch-10ml
194doterra-mirha-touch-10ml doterra-myrrh-touch-10ml
195doterra-kek-lotusz-touch-10ml doterra-blue-lotus-touch-10ml
196doterra-hygge-illoolaj doterra-hygge-essential-oil
197doterra-shaker doterra-shaker
198doterra-vanilias-novenyi-feherje doterra-vanilla-plant-protein
199doterra-csokolades-novenyi-feherje doterra-chocolate-plant-protein
200hd-clear-termekcsomag hd-clear-product-kit
201hd-clear-habzo-arctisztito hd-clear-foaming-facial-cleanser
202hd-clear-arcapolo-krem hd-clear-facial-cream
203hajapolo-trio doterra-hair-care-trio
204oblites-nelkuli-kondicionalo leave-in-conditioner
205napi-kondicionalo daily-conditioner
206gyokertol-hajvegig-hajapolo-szerum salon-essentials-root-to-tip-hair-care-serum
207kez-es-testapolo-krem hand-and-body-cream
208taplalo-testvaj nourishing-body-butter
209rozsa-kezkrem doterra-rose-hand-cream
210meregtelenito-iszappakolas detoxifying-mud-mask
211hamlaszto-testradir exfoliating-body-scrub
212hidratalo-testpermet moisturising-body-mist
213frissito-tusfurdo doterra-refreshing-shower-gel
214citrus-bliss-pezsdito-szappan citrus-bliss-uplifting-soap
215gyogynovenyes-ajakbalzsam herbal-lip-balm
216doterra-ajakbalzsam lip-balm
217reveal-arcapolasi-rendszer reveal-skincare-system
218oregedesgatlo-szemkrem anti-aging-eye-cream
219elenkito-borradir revitalising-skin-scrub
220doterra-arctisztito facial-cleanser
221doterra-porus-osszehuzo-tonizalo pore-minimising-toner
222doterra-metapwr-rendszer doterra-metapwr-system
223doterra-sutivago-formak-es-baking-spice-keverek doterra-cookie-cutters-and-baking-spice-blend
224doterra-coast-touch-10-ml doterra-coast-touch-10-ml
225frakcionalt-kokuszolaj fractionated-coconut-oil
226doterra-baby-babasampon-es-tusfurdo doterra-baby-baby-shampoo-and-body-wash
227doterra-citrus-bloom-touch doterra-citrus-bloom-touch
228citrus-bliss-dezodor citrus-bliss-deodorant
229cp-lagyzselatin-kapszula cp-softgels
230doterra-zoldsegkapszula doterra-vegetable-capsules
231microplex-vmz doterra-microplex-vmz
232doterra-veo-mega veo-mega-essential-oil-omega-complex
233doterra-xeo-mega doterra-xeo-mega
234alpha-crs doterra-alpha-crs-120-capsules
235doterra-verage-borapolas-kollekcio doterra-verge-skincare-collection
236doterra-verage-tonizalo doterra-verge-toner
237doterra-verage-hidratalokrem doterra-verge-moisturiser
238doterra-verage-immortelle doterra-verge-immortelle-hydrating-serum
239doterra-verage-arctisztito doterra-verge-cleanser
240doterra-correct-x doterra-correct-x
241doterra-citrus-spring-15-ml doterra-citrus-spring-essential-oil-15-ml
242doterra-coast doterra-coast-15-ml-blend
243doterra-babaapolo-szett doterra-baby-collection-and-baby-care-kit
244doterra-forest-breeze-5-ml doterra-forest-breeze-essential-oil-5-ml
245doterra-brazil-tomjen-5-ml doterra-brazilian-frankincense-oil-essential-oil-5-ml
246doterra-supermint-fogkrem doterra-supermint-toothpaste
247doterra-on-guard-5-ml doterra-on-guard-5-ml-blend
248doterra-volo-diffuzor doterra-volo-diffuser
249doterra-tropical doterra-tropical
250doterra-citrus-twist doterra-citrus-twist
251doterra-kapor-illoolaj doterra-dill-essential-oil
252doterra-island-mint-5ml doterra-island-mint-essential-oil-5ml
253doterra-intune-10ml doterra-intune-10ml
254doterra-dezodor-a-duglaszfenyo-es-a-gorog-narancs-illataval doterra-deodorant-with-the-scent-of-douglas-fir-and-greek-orange
255doterra-gyomberes-cukorka doterra-ginger-drops
256doterra-shinrin-yoku-15-ml doterra-shinrin-yoku-essential-oil-15-ml
257doterra-phenomenal-touch doterra-phenomenal-touch
258doterra-klementin-5-ml doterra-clementine-5-ml-blend
259doterra-balance-dezodor doterra-balance-deodorant
260doterra-balzsamfenyo-5-ml doterra-balsam-fir-essential-oil-5-ml
261doterra-sun-asvanyi-fenyvedo-arcra doterra-sun-face-sunscreen-and-moisturiser-50-ml
262doterra-endless-summer-15-ml doterra-endless-summer-essential-oil-15-ml
263doterra-feher-grepfrut-esszencialis-olaj-5-ml doterra-white-grapefruit-essential-oil-5-ml
264doterra-northern-escape-illoolaj doterra-northern-escape-essential-oil
265doterra-adaptiv-kapszula doterra-adaptiv-capsules
266doterra-aromatouch-technique-csomag doterra-aromatouch-technique-kit
267doterra-harmas-kezdocsomag doterra-trio-starter-kit
268doterra-shinrin-yoku-touch doterra-shinrin-yoku-touch
269doterra-kurkuma-ketkamras-kapszula doterra-turmeric-dual-chamber-capsules
270doterra-tomjen-mikrogyongyos-kapszula doterra-frankincense-microbead-capsules
271doterra-tomjen-stift-naiofa doterra-frankincense-stick-naiofa
272doterra-metapwr-recharge-erdei-szamoca-izben doterra-metapwr-recharge-wild-strawberry-flavour
273`,He=Object.fromEntries(aa.trim().split(`
274`).map(t=>t.trim().split(/\s+/)));Object.keys(He).length;function ra(t){return He[t]?[["hu-HU",`https://melini.hu/termek/${t}/`],["x-default",`https://melini.hu/termek/${t}/`]]:null}function sa(t){const o=`${t.titleEn||t.title||""} ${t.categoryEn||t.category||""} ${(t.tagsEn||t.tags||[]).join(" ")}`.toLowerCase();return/lemon|wild orange|bergamot|grapefruit|lime|citrus bliss|tangerine|kumquat/.test(o)?"citrus":/oregano|cinnamon|cassia|clove|thyme/.test(o)?"hot":/peppermint/.test(o)?"peppermint":/diffuser/.test(o)?"diffuser":/supplement|capsule|softgel|beadlet|ddr|mega|microplex|alphacrs|alpha crs|pb assist|pb restore|gx assist|terrazyme|vmz|vmg/.test(o)?"supplement":"general"}const la=[{Icon:rt,title:"Hígítás",text:"Bőrre kerülés előtt mindig hígítsd hordozóolajjal (pl. frakcionált kókuszolaj). Felnőtteknél: 1–2 csepp egy teáskanál hordozóolajhoz."},{Icon:wt,title:"Gyermekek és várandósság",text:"Gyermekeknél és várandósság alatt legyél különösen óvatos. Néhány olaj nem javasolt — használat előtt kérd szakember véleményét."},{Icon:Be,title:"Tárolás",text:"Hűvös, sötét helyen tárold, közvetlen napfénytől védve. Gyermekek elől elzárva tartsd."}],oa=[{title:"Aromaterápiásan",text:"Párologtass 3–5 cseppet vízben, vagy tegyél 1–2 cseppet a tenyeredbe, és lélegezd be."},{title:"Bőrre",text:"Hígíts 1–2 cseppet hordozóolajjal, és masszírozd a kívánt területre."},{title:"Belsőleg",text:"Kizárólag olyan doTERRA termékekkel, amelyek belső használatra jelöltek. Kövesd a csomagoláson lévő útmutatót."}];function _e(t){if(!`${t.brand||""}`.toLowerCase().includes("doterra"))return!1;const n=[t.category,t.categoryEn,...t.categories||[],...t.categorySlugs||[]].join(" ").toLowerCase();return/illoolaj|illóolaj|essential.?oil|esszencia|esszenci|olajok/.test(n)}function na({product:t}){if(!_e(t))return null;const o=sa(t);if(o==="diffuser"||o==="supplement")return null;const n=[];o==="citrus"&&n.push({Icon:zt,title:"Fényérzékenység",text:"A bőrre kerülés után 12 órán belül kerüld a közvetlen napfényt és a szoláriumot."}),o==="hot"&&n.push({Icon:Me,title:"Erős („hot”) olaj",text:"Ez egy erős olaj — hígítsd jobban (1 csepp egy evőkanál hordozóolajhoz), és kerüld az érzékeny bőrterületeket."}),o==="peppermint"&&n.push({Icon:Me,title:"Óvatosan gyermekeknél",text:"Csecsemők és kisgyermekek arcán vagy annak közelében nem javasolt a használata."});const d=[...n,...la];return e.jsxs("div",{className:"mt-8 border-t border-slate-100 pt-8",children:[e.jsx("h2",{className:"font-medium text-slate-900 mb-4",children:"Biztonságos használati útmutató"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-6",children:oa.map(l=>e.jsxs("div",{className:"bg-slate-50 rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-brand uppercase tracking-wide mb-1",children:l.title}),e.jsx("p",{className:"text-xs text-slate-600 leading-relaxed",children:l.text})]},l.title))}),e.jsx("div",{className:"space-y-3",children:d.map(({Icon:l,title:c,text:p})=>e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"bg-amber-50 p-2 rounded-md shrink-0",children:e.jsx(l,{className:"w-4 h-4 text-amber-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-slate-900",children:c}),e.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:p})]})]},c))}),e.jsxs("div",{className:"flex items-start gap-2 mt-4 text-xs text-slate-400",children:[e.jsx(st,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),e.jsx("p",{children:"Ezek az információk kizárólag tájékoztató jellegűek, és nem helyettesítik a szakorvosi tanácsot."})]})]})}function ia({product:t}){return!t||!_e(t)?null:e.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-lg bg-[#faf6ef] px-4 py-3 text-sm",children:[e.jsx("span",{className:"min-w-0 text-slate-700",children:"Nem tudod, melyik illik hozzád?"}),e.jsxs(ne,{to:"/illoolaj-kereso/",className:"shrink-0 inline-flex items-center gap-1 font-medium text-brand hover:opacity-80 transition-opacity",children:["Illóolajkereső ",e.jsx(Nt,{className:"w-3.5 h-3.5"})]})]})}function da({brand:t}){if(!(t||"").toLowerCase().includes("doterra"))return null;const n=[{icon:St,title:"CPTG®-tanúsított",desc:"Minden tétel független laborvizsgálaton esik át tisztaság és hatóanyag-tartalom szempontjából."}
274,{icon:Be,title:"100% tiszta",desc:"Töltőanyagok, szintetikus adalékok és szennyeződések nélkül — csak a növény esszenciája."},{icon:Ft,title:"Etikus beszerzés",desc:"Co-Impact Sourcing® program több mint 40 ország termelőivel."}];return e.jsxs("section",{className:"mt-12 border-t border-slate-100 pt-10",children:[e.jsx("h2",{className:"text-xl font-light text-slate-900 mb-2",children:"Miért doTERRA?"}),e.jsx("p",{className:"text-sm text-slate-500 mb-6 max-w-2xl",children:"Az illóolajok arany standardja — aromaterapeuták, wellness szakemberek és világszerte több millió háztartás választja."}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:n.map(({icon:d,title:l,desc:c})=>e.jsxs("div",{className:"flex items-start gap-3 p-4 border border-slate-200 rounded-lg bg-white",children:[e.jsx("div",{className:"shrink-0 w-10 h-10 rounded-full bg-brand/10 flex items-center justify-center",children:e.jsx(d,{className:"w-5 h-5 text-brand"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium text-slate-900",children:l}),e.jsx("p",{className:"text-xs text-slate-600 leading-relaxed mt-1",children:c})]})]},l))})]})}const ca=t=>String(t).toLowerCase().trim().replace(/[áàâä]/g,"a").replace(/[éèê]/g,"e").replace(/[íì]/g,"i").replace(/[óòôöőõ]/g,"o").replace(/[úùûüű]/g,"u").replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");function ma({product:t}){if(!t)return null;const o=(t.categories&&t.categories.length?t.categories:[t.category]).filter(Boolean),n=t.categorySlugs||[],d=(t.attributes||[]).filter(l=>l&&l.name&&(l.options||[]).length);return!o.length&&!d.length?null:e.jsxs("section",{className:"mt-10 border border-slate-200 rounded-lg bg-slate-50/60 p-5 max-w-3xl",children:[o.length>0&&e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-3 gap-y-2",children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Kategóriák"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:o.map((l,c)=>e.jsx(ne,{to:lt(`/kategoria/${n[c]||ca(l)}`),className:"text-xs bg-white border border-slate-200 rounded-full px-3 py-1 text-slate-700 hover:border-brand hover:text-brand transition-colors",children:l},l))})]}),d.map(l=>e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-3 gap-y-2 mt-4 pt-4 border-t border-slate-200 first:mt-0 first:pt-0 first:border-t-0",children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:l.name}),e.jsx("div",{className:"flex flex-wrap gap-2",children:l.options.map(c=>e.jsx("span",{className:"text-xs bg-white border border-slate-200 rounded-full px-3 py-1 text-slate-700",children:c},c))})]},l.name))]})}function ua({currentProduct:t,allProducts:o}){const n=S.useMemo(()=>{if(!(o!=null&&o.length)||!t)return[];const d=(t.titleEn||t.title||"").toLowerCase(),l=m=>m.stockStatus!=="outofstock"&&!(m.stock===0&&m.stockStatus!=="onbackorder"),c=[];if(!d.includes("diffuser")&&!d.includes("supplement")&&!d.includes("capsule")&&!d.includes("softgel")){const m=o.find(f=>f.id!==t.id&&l(f)&&(f.titleEn||f.title||"").toLowerCase().includes("fractionated coconut")),u=o.find(f=>f.id!==t.id&&l(f)&&(f.titleEn||f.title||"").toLowerCase().includes("diffuser"));m&&c.push(m),u&&c.push(u)}const i=o.filter(m=>m.id!==t.id&&!c.find(u=>u.id===m.id)&&l(m)).slice(0,4-c.length);return[...c,...i].slice(0,4)},[t,o]);return n.length===0?null:e.jsxs("section",{className:"mt-16 border-t border-slate-100 pt-12",children:[e.jsx("h2",{className:"text-xl font-light text-slate-900 mb-6",children:"Jól illik hozzá"}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6",children:n.map(d=>e.jsx(ye,{product:d},d.id))})]})}function ha({open:t,onOpenChange:o,images:n,index:d,title:l,onMove:c}){return e.jsx(Mt,{open:t,onOpenChange:o,children:e.jsxs(Ct,{children:[e.jsx(Et,{className:"z-[100] bg-foreground
274/70"}),e.jsxs(It,{"aria-describedby":void 0,className:"fixed left-1/2 top-1/2 z-[101] w-[calc(100vw-2rem)] max-w-6xl h-[calc(100dvh-2rem)] max-h-[900px] -translate-x-1/2 -translate-y-1/2 bg-background text-foreground outline-none",onKeyDown:p=>{n.length>1&&["ArrowLeft","ArrowRight"].includes(p.key)&&(p.preventDefault(),c(p.key==="ArrowLeft"?-1:1))},children:[e.jsxs(Tt,{className:"sr-only",children:[l," – képgaléria"]}),e.jsx(At,{"aria-label":"Galéria bezárása",className:"absolute top-2 right-2 z-10 h-11 w-11 flex items-center justify-center bg-background text-foreground hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",children:e.jsx(ot,{className:"h-5 w-5"})}),e.jsxs("div",{"aria-live":"polite",className:"absolute top-5 left-5 text-sm text-muted-foreground",children:[d+1," / ",n.length]}),e.jsx("img",{src:n[d],alt:`${l} – ${d+1}. kép`,className:"w-full h-full object-contain px-14 py-16"}),n.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button","aria-label":"Előző nagyított kép",onClick:()=>c(-1),className:"absolute left-1 top-1/2 -translate-y-1/2 h-11 w-11 flex items-center justify-center bg-background text-foreground hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",children:e.jsx(Oe,{className:"h-6 w-6"})}),e.jsx("button",{type:"button","aria-label":"Következő nagyított kép",onClick:()=>c(1),className:"absolute right-1 top-1/2 -translate-y-1/2 h-11 w-11 flex items-center justify-center bg-background text-foreground hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",children:e.jsx(Pe,{className:"h-6 w-6"})})]})]})]})})}function ga({product:t,title:o,activeImage:n,variationImage:d,onSelect:l}){const[c,p]=S.useState(!1),i=[...new Set([t.image,...t.gallery||[],d].filter(f=>typeof f=="string"&&f.trim()))],m=Math.max(0,i.indexOf(n||t.image)),u=f=>l(i[(m+f+i.length)%i.length]);return i.length?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative bg-muted aspect-square overflow-hidden",children:[e.jsx("button",{type:"button","aria-label":"Termékkép nagyítása",onClick:()=>p(!0),onKeyDown:f=>{i.length>1&&["ArrowLeft","ArrowRight"].includes(f.key)&&(f.preventDefault(),u(f.key==="ArrowLeft"?-1:1))},className:"w-full h-full flex items-center justify-center cursor-zoom-in focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:e.jsx("img",{src:i[m],alt:o,width:"600",height:"600",fetchPriority:"high",decoding:"async",className:"w-full h-full object-contain"})}),i.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button","aria-label":"Előző termékkép",onClick:()=>u(-1),className:"absolute left-1 top-1/2 -translate-y-1/2 h-11 w-11 flex items-center justify-center bg-background/90 text-foreground hover:bg-background focus-visible:ring-2 focus-visible:ring-ring",children:e.jsx(Oe,{className:"h-5 w-5"})}),e.jsx("button",{type:"button","aria-label":"Következő termékkép",onClick:()=>u(1),className:"absolute right-1 top-1/2 -translate-y-1/2 h-11 w-11 flex items-center justify-center bg-background/90 text-foreground hover:bg-background focus-visible:ring-2 focus-visible:ring-ring",children:e.jsx(Pe,{className:"h-5 w-5"})})]})]}),i.length>1&&e.jsx("div",{className:"grid grid-cols-5 gap-2 mt-3",children:i.map((f,M)=>e.jsx("button",{type:"button",onClick:()=>l(f),"aria-label":`${M+1}. termékkép megtekintése`,"aria-pressed":m===M,className:`aspect-square min-h-11 bg-muted overflow-hidden border transition-colors ${m===M?"border-brand":"border-transparent hover:border-border"}`,children:e.jsx("img",{src:f,alt:"",width:"112",height:"112",loading:"lazy",decoding:"async",className:"w-full h-full object-contain"})},f))}),e.jsx(ha,{open:c,onOpenChange:p,images:i,index:m,title:o,onMove:u})]}):e.jsx("div",{className:"bg-muted h-48 md:aspect-square md:h-auto flex items-center justify-center text-muted-foreground",children:"Nincs kép"})}function fa({label:t,variations:o=[],selectedSku:n,onSelect:d}){return o.length?e.jsxs("div",{className:"mb-6",children:[e.jsx("p",{className:"text-sm font-medium text-slate-900 mb-2",children:t||"Válassz kiszerelést"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:o.map(l
274=>{const c=l.sku===n,p=l.stockStatus==="outofstock"||l.stock===0&&l.stockStatus!=="onbackorder";return e.jsxs("button",{type:"button",onClick:()=>!p&&d(l),disabled:p,"aria-pressed":c,className:`px-4 py-2 text-sm border rounded-md transition-colors ${c?"border-brand text-brand bg-brand/5":"border-slate-200 text-slate-700 hover:border-slate-400"} ${p?"opacity-40 line-through cursor-not-allowed":""}`,children:[l.name,e.jsx("span",{className:"ml-2 text-slate-400",children:ee(l.salePrice||l.regularPrice)})]},l.sku)})})]}):null}const Ue=t=>String(t||"").replace(/<[^>]*>/g," ").replace(/&nbsp;/g," ").replace(/\s+/g," ").trim(),Te={outofstock:"https://schema.org/OutOfStock",onbackorder:"https://schema.org/BackOrder"},pa=Dt.filter(t=>t.feeHuf>0&&t.needsPickupPoint).reduce((t,o)=>t.feeHuf<=o.feeHuf?t:o),xa={"@type":"OfferShippingDetails",shippingRate:{"@type":"MonetaryAmount",value:pa.feeHuf,currency:"HUF"},shippingDestination:{"@type":"DefinedRegion",addressCountry:"HU"},deliveryTime:{"@type":"ShippingDeliveryTime",handlingTime:{"@type":"QuantitativeValue",minValue:0,maxValue:2,unitCode:"DAY"},transitTime:{"@type":"QuantitativeValue",minValue:1,maxValue:3,unitCode:"DAY"}}},ba={"@type":"MerchantReturnPolicy",applicableCountry:"HU",returnPolicyCategory:"https://schema.org/MerchantReturnFiniteReturnWindow",merchantReturnDays:14,returnMethod:"https://schema.org/ReturnByMail",returnFees:"https://schema.org/ReturnShippingFees"};function Ae({price:t,stockStatus:o,stock:n,url:d,sku:l,name:c}){return{"@type":"Offer",...l?{sku:l}:{},...c?{name:c}:{},url:d,priceCurrency:"HUF",price:String(Math.round(Number(t)||0)),availability:o==="outofstock"||n===0&&o!=="onbackorder"?Te.outofstock:Te[o]||"https://schema.org/InStock",itemCondition:"https://schema.org/NewCondition",seller:{"@type":"Organization",name:$e,url:it},shippingDetails:xa,hasMerchantReturnPolicy:ba}}const De=t=>ue(t).price;function ka(t,o=[]){const n=nt(`/termek/${t.slug||t.id}`),d=[t.image,...t.gallery||[]].filter((i,m,u)=>i&&u.indexOf(i)===m),l=Ue(t.shortDescription||t.description||t.title).slice(0,5e3),c=t.hasVariations?(t.variations||[]).filter(i=>i&&(i.salePrice||i.regularPrice)):[],p=c.length?c.map(i=>Ae({price:De(i),stockStatus:i.stockStatus,stock:i.stock,url:i.sku?`${n}?variant=${encodeURIComponent(i.sku)}`:n,sku:i.sku,name:`${t.title} – ${i.name}`})):Ae({price:De(t),stockStatus:t.stockStatus,stock:t.stock,url:n,sku:t.sku});return{"@context":"https://schema.org","@type":"Product",name:t.title,description:l,sku:t.sku,url:n,...d.length?{image:d}:{},...t.category?{category:t.category}:{},brand:{"@type":"Brand",name:t.brand||$e},...Number(t.rating)>0&&Number(t.ratingCount)>
2740?{aggregateRating:{"@type":"AggregateRating",ratingValue:Math.round(Number(t.rating)*10)/10,reviewCount:Number(t.ratingCount),bestRating:5,worstRating:1}}:{},...o.length?{review:o.map(i=>({"@type":"Review",reviewRating:{"@type":"Rating",ratingValue:i.rating,bestRating:5},author:{"@type":"Person",name:i.name},reviewBody:i.reviewText,datePublished:(i.reviewDate||i.created_date||"").split("T")[0]}))}:{},offers:p}}function Re(t,o){const n=Ue(t.shortDescription||t.description)||`${o} — eredeti ${t.brand||""} termék a Melini webshopban. Ingyenes szállítás 18 000 Ft felett.`.replace(/\s+/g," ");if(n.length<=160)return n;const d=n.slice(0,157);return`${d.slice(0,d.lastIndexOf(" ")>100?d.lastIndexOf(" "):157)}…`}function Fa(){var se,ce;const{id:t}=dt(),[o,n]=S.useState(1),[d,l]=S.useState(null);S.useEffect(()=>{l(null)},[t]);const[c,p]=S.useState(!1),[i,m]=S.useState(!1),[u,f]=S.useState(()=>new URLSearchParams(window.location.search).get("variant")),{data:M,isLoading:D,isError:F,refetch:I}=ge({queryKey:["product-single",t],queryFn:async()=>{var a;if(/^[a-f0-9]{24}$/.test(t)){const g=await J.entities.Product.get(t).catch(()=>null);if(g)return g}const b=t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),R=[{slug:t},{slugEn:t},{slug:b},{slugEn:b}];return/^\d+$/.test(t)&&R.push({wooId:t}),((a=(await J.entities.Product.filter({$or:R},{limit:1})).items)==null?void 0:a[0])||null},retry:3,staleTime:300*1e3}),{data:O}=ge({queryKey:["products-all"],queryFn:()=>gt(),staleTime:300*1e3}),h=O||[],r=M||null,B=D;S.useEffect(()=>{if(!(r!=null&&r.id))return;let b=[];try{b=JSON.parse(localStorage.getItem("favoriteProducts")||"[]")}catch{b=[]}m(Array.isArray(b)&&b.includes(r.id))},[r==null?void 0:r.id]);const H=()=>{if(!(r!=null&&r.id))return;let b=[];try{b=JSON.parse(localStorage.getItem("favoriteProducts")||"[]")}catch{b=[]}Array.isArray(b)||(b=[]),b.includes(r.id)?(b=b.filter(R=>R!==r.id),m(!1),oe.success("Eltávolítva a kedvencekből")):(b.push(r.id),m(!0),oe.success("Hozzáadva a kedvencekhez")),localStorage.setItem("favoriteProducts",JSON.stringify(b))},P=(r==null?void 0:r.title)||(r==null?void 0:r.titleEn),V=(r==null?void 0:r.shortDescription)||(r==null?void 0:r.shortDescriptionEn),ae=(r==null?void 0:r.description)||(r==null?void 0:r.descriptionEn);S.useEffect(()=>{r!=null&&r.id&&J.functions.invoke("incrementProductView",{productId:r.id}).catch(()=>{})},[r==null?void 0:r.id]),S.useEffect(()=>{if(!(r!=null&&r.image))return;const b=document.createElement("link");return b.rel="preload",b.as="image",b.href=r.image,b.fetchPriority="high",document.head.appendChild(b),()=>{b.remove()}},[r==null?void 0:r.image]);const{data:ie}=ge({queryKey:["product-reviews-schema",r==null?void 0:r.id],queryFn:()=>J.entities.Review.filter({productId:r.id,approved:!0},"-created_date",10),enabled:!!(r!=null&&r.id),staleTime:300*1e3});S.useEffect(()=>{if(!r)return;const b="product-schema";let R=document.getElementById(b);return R||(R=document.createElement("script"),R.id=b,R.type="application/ld+json",document.head.appendChild(R)),R.textContent=JSON.stringify(ka(r,ie||[])),()=>{const s=document.getElementById(b);s&&s.remove()}},[r,ie]);const Q=r!=null&&r.hasVariations&&((se=r==null?void 0:r.variations)!=null&&se.length)?r.variations:[],j=Q.find(b=>b.sku===u)||Q.find(b=>b.stockStatus!=="outofstock"&&b.stock!==0)||Q[0]||null;S.useEffect(()=>{j!=null&&j.image&&l(j.image)},[j==null?void 0:j.image,t]);const de=async b=>{if(!r)return;if(r.image&&(b!=null&&b.currentTarget)){const v=b.currentTarget.getBoundingClientRect();window.dispatchEvent(new CustomEvent("cart:flyto",{detail:{image:r.image,fromRect:v}}))}const R=j?`${P} – ${j.name}`:P,s=ue(j||r).price,a=(j==null?void 0:j.sku)||"",g=ut(),x=g.find(v=>v.productId===r.id&&(v.variationSku||"")===a);x?x.quantity+=o:g.push({productId:r.id,variationSku:a,title:R,price:s,quantity:o,image:(j==null?void 0:j.image)||r.image}),ht(g),window.dispatchEvent(new CustomEvent("cart:added",{detail:{title:R}})),J.functions.invoke("incrementProductCart",{productId:r.id,quantity:o}).catch(()=>{}),Lt({particleCount:80,spread:70,startVelocity:45,origin:{x:.92,y:.08},colors:["#d97706","#f59e0b","#fbbf24","#fde68a","#ffffff"]}),p(!0),setTimeout(()=>p(!1),1800)};if(!B&&r&&r.slug&&r.slug!==t)return e.jsx(fe,{to:`/termek/${r.slug}/`,replace:!0});if(B)return e.jsx(le,{children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-6",children:[e.jsx("div",{className:"h-4 w-48 bg-slate-100 rounded animate-pulse mb-6"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12",children:[e.jsx("div",{className:"aspect-square bg-slate-100 animate-pulse rounded-lg"}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"h-4 w-24 bg-slate-100 rounded animate-pulse"}),e.jsx("div",{className:"h-8 w-3/4 bg-slate-100 rounded animate-pulse"}),e.jsx("div",{className:"h-6 w-20 bg-slate-100 rounded animate-pulse"}),e.jsx("div",{className:"h-12 w-full bg-slate-100 rounded animate-pulse mt-4"}),e.jsx("div",{className:"h-4 w-2/3 bg-slate-100 rounded animate-pulse"}),e.jsx("div",{className:"h-4 w-1/2 bg-slate-100 rounded animate-pulse"}),e.jsx("div",{className:"h-32 w-full bg-slate-100 rounded animate-pulse mt-4"})]})]})]})});if(r!=null&&r.slug&&t!==r.slug&&t!==r.slugEn)return e.jsx(fe,{to:`/termek/${r.slug}/${window.location.search}`,replace:!0});if(!r&&F)return e.jsxs(le,{children:[e.jsx(pe,{title:"Betöltés… | Melini",noindex:!0}),e.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-20 text-center",children:[e.jsx("h1",{className:"text-2xl font-light mb-3 text-slate-900",children:"Nem sikerült betölteni a terméket"}),e.jsx("p",{className:"text-slate-500 mb-8",children:"Kérjük, próbáld újra néhány másodperc múlva."}),e.jsx(te,{onClick:()=>I(),children:"Újrapróbálás"})]})]});if(!r&&/[a-z]/i.test(t))return O?e.jsx(fe,{to:Pt(t,h),replace:!0}):e.jsx(le,{children:e.jsx("div",{className:"min-h-[60vh]"})});if(!r)return e.jsxs(le,{children:[e.jsx(ft,{}),e.jsx(pe,{title:"A termék nem található | Melini",description:"A keresett termék nem elérhető.",noindex:!0}),e.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-20 text-center",children:[e.jsx("h1",{className:"text-2xl font-bold mb-3 text-slate-900",children:"A termék nem található"}
274),e.jsx("p",{className:"text-slate-500 mb-8",children:"A keresett termék lehet, hogy törlésre került, vagy hibás a webcím."}),e.jsxs(ne,{to:"/termekek/",className:"inline-flex items-center gap-2 px-6 py-3 bg-brand text-white text-sm uppercase tracking-wider hover:bg-brand/90 transition-colors rounded-md",children:[e.jsx(Ce,{className:"w-4 h-4"})," Összes termék megtekintése"]})]})]});const{price:X,oldPrice:re}=ue(j||r),Y=j?j.stock:r.stock,q=j?j.stockStatus:r.stockStatus,G=q==="outofstock"||Y===0&&q!=="onbackorder";return e.jsxs(le,{children:[e.jsx(pe,{title:r.seoTitle||`${P} | Melini`,description:r.seoDescription||Re(r,P),canonical:`https://melini.hu/termek/${r.slug||r.id}/`,hreflangs:ra(r.slug),image:r.image||void 0,ogType:"product",ogProduct:{price:Math.round(ct(X)).toString(),currency:"HUF",availability:r.stockStatus==="outofstock"?"oos":r.stockStatus==="onbackorder"?"pending":"instock"}}),e.jsx(xt,{heading:P,description:Re(r,P),bullets:[`Márka: ${r.brand||"doTERRA"}`,`Ár: ${ee(X)}`,r.stockStatus==="outofstock"||r.stock===0?"Elérhetőség: nincs készleten":r.stockStatus==="onbackorder"?"Elérhetőség: utánrendelésre":"Elérhetőség: készleten","Ingyenes kiszállítás 18 000 Ft felett · 2–5 munkanapos feladás"]}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 py-3 md:py-6",children:e.jsx(pt,{items:[{label:"Főoldal",to:"/"},{label:"Termékek",to:"/termekek/"},...r.category?[{label:r.category,to:(ce=r.categorySlugs)!=null&&ce[0]?`/kategoria/${r.categorySlugs[0]}/`:"/termekek/"}]:[],{label:P,schemaTo:`/termek/${r.slug||r.id}/`}]})}),e.jsxs("main",{className:"max-w-7xl mx-auto px-4 pb-16",children:[e.jsxs(ne,{to:"/termekek/",className:"hidden md:inline-flex items-center gap-2 text-sm text-slate-500 mb-4 md:mb-8 hover:text-slate-900",children:[e.jsx(Ce,{className:"w-4 h-4"}),"Vissza a termékekhez"]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-[minmax(0,5fr)_minmax(0,7fr)] gap-5 md:gap-12",children:[e.jsx("div",{className:"md:sticky md:top-32 md:self-start w-full min-w-0 max-w-[260px] mx-auto md:max-w-none md:mx-0",children:e.jsx(ga,{product:r,title:P,activeImage:d,variationImage:j==null?void 0:j.image,onSelect:l},r.id)}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-brand mb-2",children:r.brand}),e.jsxs("div",{className:"flex items-start justify-between gap-4 mb-4",children:[e.jsx("h1",{className:"text-2xl md:text-3xl font-light text-slate-900",children:P}),e.jsx("button",{onClick:H,"aria-label":i?"Eltávolítás a kedvencekből":"Hozzáadás a kedvencekhez",className:"shrink-0 p-2 rounded-full border border-slate-200 hover:border-slate-300 transition-colors",children:e.jsx(mt,{className:`w-5 h-5 transition-colors ${i?"fill-red-500 text-red-500":"text-slate-400 hover:text-red-500"}`})})]}),r.ratingCount>0&&e.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[e.jsx("div",{className:"flex gap-1",children:[...Array(5)].map((b,R)=>e.jsx(me,{className:`w-4 h-4 ${R<Math.round(r.rating)?"fill-amber-400 text-amber-400":"text-slate-200"}`},R))}),e.jsxs("span",{className:"text-sm text-slate-500",children:["(",r.ratingCount," értékelés)"]})]}),e.jsx("div",{className:"mb-6",children:e.jsxs("div",{className:"flex flex-col items-start gap-1 md:flex-row md:items-baseline md:gap-3",children:[e.jsx("span",{className:`whitespace-nowrap text-3xl font-light ${re?"text-sale":"text-brand"}`,children:ee(X)}),re&&e.jsx("span",{className:"whitespace-nowrap text-base text-slate-400 line-through",children:ee(re)}),e.jsx("span",{className:"text-xs text-slate-400",children:"az áfát tartalmazza"})]})}),e.jsx(fa,{label:r.variationLabel,variations:Q,selectedSku:j==null?void 0:j.sku,onSelect:b=>f(b.sku)}),e.jsx("div",{className:"mb-6",children:q==="outofstock"?e.jsx("span",{className:"text-sm text-red-600 font-medium",children:"Nincs készleten"}):q==="onbackorder"?e.jsx("span",{className:"text-sm text-amber-600 font-medium",children:"Utánrendelésre — a szállítás hosszabb lehet"}):Y===0?e.jsx("span",{className:"text-sm text-red-600 font-medium",children:"Nincs készleten"}):Y===1?e.jsx("span",{className:"text-sm text-orange-600 font-medium",children:"Csak 1 db van készleten — rendeld meg most"}):Y>1?e.jsxs("span",{className:"text-sm text-green-600 font-medium",children:[Y," db készleten"]}):e.jsx("span",{className:"text-sm text-green-600 font-medium",children:"Készleten"})}),e.jsx(Jt,{productTotal:X*o,stockStatus:q}),e.jsx(Zt,{brand:r.brand}),e.jsxs("div",{className:"flex gap-3 mb-8",children:[e.jsxs("div",{className:"flex items-center border border-slate-200 rounded-md overflow-hidden",children:[e.jsx("button",{type:"button","aria-label":"Mennyiség csökkentése",onClick:()=>n(Math.max(1,o-1)),className:"px-3 py-3 hover:bg-slate-50 text-lg",children:"−"}),e.jsx("input",{type:"number","aria-label":"Mennyiség",value:o,onChange:b=>n(Math.max(1,parseInt(b.target.value)||1)),className:"w-14 text-center border-0 bg-transparent text-base [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",min:"1"}),e.jsx("button",{type:"button","aria-label":"Mennyiség növelése",onClick:()=>n(o+1),className:"px-3 py-3 hover:bg-slate-50 text-lg",children:"+"})]}),e.jsx(te,{onClick:de,"data-main-add-to-cart":!0,disabled:G,className:"flex-1 bg-brand hover:bg-brand/90 rounded-md h-auto disabled:opacity-50 disabled:cursor-not-allowed",children:G?e.jsx(e.Fragment,{children:"Nincs készleten"}):c?e.jsxs(e.Fragment,{children:[e.jsx(ve,{className:"w-4 h-4 mr-2"})," Kosárba tettük"]}):e.jsxs(e.Fragment,{children:[e.jsx(Le,{className:"w-4 h-4 mr-2"})," ",q==="onbackorder"?"Utánrendelés":"Kosárba"]})})]}),G&&e.jsx(Qt,{productId:r.id,variationSku:j==null?void 0:j.sku},(j==null?void 0:j.sku)||r.id),G&&e.jsx(ta,{product:r,allProducts:h}),(r.categorySlugs||[]).some(b=>String(b).toLowerCase().startsWith("chogan-parfum"))&&e.jsx("div",{className:"-mt-8 mb-6",children:e.jsx(jt,{})}),e.jsxs("div",{className:"mb-6 text-sm",children:[e.jsx("p",{className:"text-slate-600",children:"Kérdésed van? Szívesen segítünk."}),e.jsx("a",{href:"mailto:[email protected]",className:"text-brand underline font-medium",children:"[email protected]"})]}),e.jsx("div",{className:"mb-8",children:e.jsx("img",{src:"https://media.base44.com/images/public/6a0afdb78aaaf4bc4e3fdfb9/45a485880_Melini-pay-miniatur.webp",alt:"Elfogadott fizetési módok: Visa, Mastercard, American Express, Apple Pay, Google Pay",width:"310",height:"28",loading:"lazy",decoding:"async",className:"h-7 w-auto"})}),V&&e.jsxs("div",{className:"border-t border-slate-100 pt-8",children:[e.jsx("h2",{className:"font-medium text-slate-900 mb-4",children:"A termékről"}),e.jsx("div",{className:"product-html product-html-sm",dangerouslySetInnerHTML:{__html:Ee(V,h)}})]}),e.jsx(ia,{product:r}),e.jsx(Ht,{product:r}),e.jsx(na,{product:r})]})]}),ae&&ae!==V&&e.jsxs("section",{className:"mt-16 border-t border-slate-100 pt-12 max-w-3xl",children:[e.jsx("h2",{className:"text-xl font-light text-slate-900 mb-6",children:"Részletes leírás"}),e.jsx("div",{className:"product-html",dangerouslySetInnerHTML:{__html:Ee(ae,h)}})]}),e.jsx(ma,{product:r}),e.jsx(da,{brand:r.brand}),e.jsx(Ut,{product:r}),e.jsx(Kt,{currentProduct:r,allProducts:h}),e.jsx(Vt,{currentProduct:r,allProducts:h}),e.jsx(ua,{currentProduct:r,allProducts:h})]}),e.jsx(_t,{product:r,displayTitle:P,variation:j,onAddToCart:de,justAdded:c})]})}export{Fa as default};
275//# sourceMappingURL=ProductDetail-Cj7qNB7X.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.