2026-10-11 16:01:15 +03:30
|
|
|
import{d as V,u as ae,o as ee,a as oe,b as a,c as i,e as u,F as T,r as F,n as A,f as G,g as R,h as S,i as E,_ as X,j as q,t as N,I as Y,k as le,l as ie,w as re,m as C,p as w,q as ce,s as te,v as ue,x as de,K,y as _e,z as ve,A as M,B as pe,C as fe,D as me}from"./index-DhakXDGI.js";import{R as ge}from"./RateStrip-Y5oNDHlM.js";import{P as he,L as W}from"./index-CKJ4yKZL.js";import"./filters-Vgn3Zr0m.js";const ye={key:0,class:"hero"},ke=["onClick"],Ie=["src","alt"],$e={key:1,class:"hero__artFallback","aria-hidden":"true"},Se={key:0,class:"hero__dots"},be=["aria-label","onClick"],J=46,Ce=.76,Pe=36.6,we=.75,xe=V({__name:"HeroCarousel",props:{slides:{},autoplay:{type:Boolean,default:!0}},emits:["select"],setup(d,{emit:g}){const h=d,b=g,c=S(0),v=S(null),r=S(!1),_=S(0);let $=0,p=null,y;const f=ae(),m=E(()=>h.slides.length);function P(n){let l=n-c.value;m.value>2&&(l>m.value/2&&(l-=m.value),l<-m.value/2&&(l+=m.value));const e=r.value?_.value:0,t=Math.abs(l),k=l*Pe+e,I=l===0?1:Ce,O=t>1?0:t===0?1:we;return{transform:`translate3d(${k}%, 0, 0) scale(${I})`,opacity:String(O),zIndex:String(10-t),pointerEvents:t>1?"none":"auto",transition:r.value?"none":"transform .42s cubic-bezier(.22,.61,.36,1), opacity .42s ease"}}function x(n){c.value=(n%m.value+m.value)%m.value,o()}function z(){x(c.value+1)}function D(){x(c.value-1)}function B(n){var l,e;m.value<2||(r.value=!0,$=n.clientX,_.value=0,p=n.pointerId,(e=(l=n.currentTarget).setPointerCapture)==null||e.call(l,n.pointerId),s())}function L(n){var e;if(!r.value||n.pointerId!==p)return;const l=((e=v.value)==null?void 0:e.clientWidth)||1;_.value=(n.clientX-$)/l*100}function H(n){if(!r.value)return;const l=n.clientX-$;r.value=!1,_.value=0,p=null,l>J?D():l<-J?z():o()}function U(n,l){if(!(Math.abs(_.value)>1)){if(n!==c.value){x(n);return}b("select",l)}}function s(){y&&clearInterval(y),y=void 0}function o(){s(),h.autoplay&&!f.isReducedMotion&&m.value>1&&(y=setInterval(z,6e3))}return ee(o),oe(s),(n,l)=>d.slides.length?(a(),i("section",ye,[u("div",{class:"hero__stage",ref_key:"stage",ref:v,onPointerdown:B,onPointermove:L,onPointerup:H,onPointercancel:H},[(a(!0),i(T,null,F(d.slides,(e,t)=>(a(),i("article",{key:e.key,class:G(["hero__card",{"is-active":t===c.value}]),style:A(P(t)),onClick:k=>U(t,e)},[e.image?(a(),i("img",{key:0,src:e.image,alt:e.title,class:"hero__art",draggable:"false"},null,8,Ie)):(a(),i("div",$e))],14,ke))),128))],544),d.slides.length>1?(a(),i("div",Se,[(a(!0),i(T,null,F(d.slides,(e,t)=>(a(),i("button",{key:e.key,type:"button",class:G(["hero__dot",{"is-active":t===c.value}]),"aria-label":e.title,onClick:k=>x(t)},null,10,be))),128))])):R("",!0)])):R("",!0)}}),Ee=X(xe,[["__scopeId","data-v-d3ac0cc7"]]),Re={class:"cats no-scrollbar"},He=["onClick"],Oe={class:"cats__mark","aria-hidden":"true"},ze=["src"],Be={class:"cats__title"},Le=V({__name:"CategoryGrid",props:{categories:{},activeId:{}},emits:["select"],setup(d,{emit:g}){const h=g;return(b,c)=>(a(),i("div",Re,[(a(!0),i(T,null,F(d.categories,v=>{var r;return a(),i("button",{key:v.id,type:"button",class:G(["cats__tile",{"is-active":v.id===d.activeId}]),onClick:_=>h("select",v)},[u("span",Oe,[(r=v.icon)!=null&&r.image?(a(),i("img",{key:0,src:v.icon.image,alt:""},null,8,ze)):(a(),q(Y,{key:1,icon:"vuesax-linear:3d-cube-scan",size:"27"}))]),u("span",Be,N(v.title),1)],10,He)}),128))]))}}),Me=X(Le,[["__scopeId","data-v-155beefb"]]),Ae={class:"panel__art"},Te=["alt"],De={class:"panel__title"},Ue={class:"panel__meta"},Ne={class:"panel__weight"},Fe={key:0,class:"panel__wageOld"},Ge={class:"panel__wage"},Ve=V({__name:"ProductPanel",props:{value:{},wageBefore:{}},emits:["open"],setup(d,{emit:g}){const h=d,b=g,{image:c,title:v,min_gram:r,wage:_}=le(h.value);function $(p){return p%1===0?String(p):p.toFixed(2)}return(p,y)=>{const f=ie("lazy");return a(),i("article",{class:"panel","data-product-origin":"",onClick:y[0]||(y[0]=m=>b("open",d.value))},[u("div",Ae,[re(u("img",{alt:C(v)},null,8,Te),[[f,C(c)]])]),u("h3",De,N(C(v)),1),u("div",Ue,[u("span",Ne,N(C(r))+" گرم",1),C(_)!=null?(a(),i(T,{key:0},[y[1]||(y[1]=u("span",{class:"panel__sep","aria-hidd
|