Files
tehran_tala/apps/user-app/dist/assets/HomeView-BJZDZ1Ex.js
T

2 lines
11 KiB
JavaScript
Raw Normal View History

import{_ as ie}from"./Spinner.vue_vue_type_style_index_0_lang-uVHC4xq0.js";import{d as T,o as ne,a as te,c as n,b as a,n as R,F as E,r as H,e as B,f as y,g as I,h as V,i as t,_ as j,t as O,w as re,u as e,j as ce,k as u,I as M,l as ue,m as de,p as le,q as G,s as D,v as se,x as q,L as Q,y as ve}from"./index-CRQPRp-C.js";import{u as _e,S as me}from"./SingleProduct-DKqhvwd1.js";import{R as ge}from"./RateStrip-BOe9RdS_.js";import{u as pe,a as he}from"./cartStore-CIlq1T4-.js";import{S as ae}from"./SectionHead-BjbRzluB.js";import{u as fe}from"./filtersStore-uk8-Faq9.js";import{u as ye}from"./useReveal-CPgwxGZp.js";import{P as be}from"./index-Btu2EoFw.js";import{D as ke}from"./index-BVow2xBt.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./DialogVant.vue_vue_type_style_index_0_lang-DFKmWR5Z.js";import"./dialogEmpty1-E3h_JfwQ.js";import"./filters-CLL9nGZ2.js";import"./classCallCheck-CJTmwORh.js";const we={key:0,class:"showcase"},Se=["onClick"],Ce=["src"],Ie={key:0,class:"showcase__dots"},$e=["aria-label","onClick"],oe=.18,Pe=6,xe=T({__name:"ShowcaseSlider",props:{slides:{}},emits:["select"],setup(l,{emit:g}){const r=l,A=g,d=I(0);let v;function k(o){d.value=o,h()}function h(){v&&clearInterval(v),r.slides.length>1&&(v=setInterval(()=>{d.value=(d.value+1)%r.slides.length},6e3))}ne(h),te(()=>{v&&clearInterval(v)});const $=I(null),p=I(!1),b=I(0);let c=null,P=0,w=0,z=0,C=!1;function U(o){var f;if(r.slides.length<2||c!==null)return;const _=$.value;_&&(c=o.pointerId,P=o.clientX,w=o.clientY,z=_.getBoundingClientRect().width||1,b.value=0,p.value=!0,C=!1,(f=_.setPointerCapture)==null||f.call(_,o.pointerId))}function N(o){if(!p.value||o.pointerId!==c)return;const _=o.clientX-P,f=o.clientY-w;!C&&Math.abs(_)>Math.abs(f)&&Math.abs(_)>Pe&&(C=!0),C&&(b.value=_)}function F(){if(!p.value)return;const _=b.value/z;p.value=!1,c=null,b.value=0,_<=-oe&&d.value<r.slides.length-1?d.value++:_>=oe&&d.value>0&&d.value--,C&&h(),C=!1}function Y(o){o.pointerId===c&&F()}function W(o){o.pointerId===c&&(p.value=!1,c=null,b.value=0,C=!1)}function X(o){C||A("select",o)}const J=V(()=>{const o=-d.value*100,_=z?b.value/z*100:0;return{transform:`translate3d(${o+_}%, 0, 0)`,transition:p.value?"none":void 0}});return te(()=>{if(c!==null&&$.value)try{$.value.releasePointerCapture(c)}catch{}}),(o,_)=>l.slides.length?(t(),n("section",we,[a("div",{ref_key:"root",ref:$,class:B(["showcase__frame",{"is-dragging":p.value}]),onPointerdown:U,onPointermove:N,onPointerup:Y,onPointercancel:W},[a("div",{class:"showcase__track",style:R(J.value)},[(t(!0),n(E,null,H(l.slides,(f,L)=>(t(),n("article",{key:f.key,class:B(["showcase__slide",{"is-active":L===d.value}]),onClick:K=>X(f)},[f.image?(t(),n("img",{key:0,src:f.image,alt:"",class:"showcase__art",draggable:"false"},null,8,Ce)):y("",!0)],10,Se))),128))],4)],34),l.slides.length>1?(t(),n("div",Ie,[(t(!0),n(E,null,H(l.slides,(f,L)=>(t(),n("button",{key:f.key,type:"button",class:B(["showcase__dot",{"is-active":L===d.value}]),"aria-label":f.title,onClick:K=>k(L)},null,10,$e))),128))])):y("",!0)])):y("",!0)}}),De=j(xe,[["__scopeId","data-v-95273507"]]),ze={class:"rail no-scrollbar"},Re=["onClick"],Ae={class:"rail__mark","aria-hidden":"true"},Le=["src"],Me={class:"rail__title"},Be=T({__name:"CategoryRail",props:{categories:{},activeId:{}},emits:["select"],setup(l,{emit:g}){const r=g;return(A,d)=>(t(),n("div",ze,[(t(!0),n(E,null,H(l.categories,v=>{var k;return t(),n("button",{key:v.id,type:"button",class:B(["rail__chip",{"is-active":v.id===l.activeId}]),onClick:h=>r("select",v)},[a("span",Ae,[(k=v.icon)!=null&&k.image?(t(),n("img",{key:0,src:v.icon.image,alt:""},null,8,Le)):y("",!0)]),a("span",Me,O(v.title),1)],10,Re)}),128))]))}}),Fe=j(Be,[["__scopeId","data-v-b5187cde"]]),Ve={class:"card__art"},Oe=["alt"],Xe={key:0,class:"card__badge"},qe={class:"card__body"},Ee={class:"card__title"},He={class:"card__meta"},Ue={class:"card__weight"},Ne={key:0,class:"card__wage"},Ye=T({__name:"ShowcaseCard",props:{value:{},wide:{type:Boolean},badge:{}},emits:["open"],setup(l,{emit:g}){const r=l,A=g,d=_e(),{image:v,id:k,title:h,min_gram:$,wage:p}=pe(r.value)