PageSourceSearch

https://tapagro.az/_nuxt/BAgR5Hnw.js

js tapagro.az collected 2026-10-04 01:30:40 UTC 16,195 bytes, 1 lines download raw bytes

1import{_ as _e}from"./DGAszhvB.js";import{a as we}from"./CYoRJHAu.js";import{_ as W}from"./CcrFc0sR.js";import{d as X,b as n,q as Y,h as e,f as g,g as h,i as t,t as p,D as y,H as m,a9 as v,aa as A,w as L,F as z,s as F,j as T,r as d,E as w,x as Z,C as ke,aT as Se,M as Ce,b1 as U,aQ as D,k as je,aR as J}from"./B4qhNgh9.js";import{u as P}from"./CyzS8xNh.js";import{u as ee}from"./DpUkSE2l.js";import{D as te}from"./B1MoNDRR.js";import{S as se}from"./DK2yWvWE.js";import{_ as qe}from"./lIddmwF2.js";import{_ as Re}from"./7xwtj2cg.js";import{u as N}from"./B-sIFSRq.js";const Ie={key:0,class:"flex flex-col w-full h-auto"},$e={class:""},Pe={class:"z-30 flex w-full sticky top-0 flex-row justify-start items-center bg-white"},De={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Ne=["placeholder"],Ae={class:"w-full mt-3",id:"scroll-style"},Te={class:"w-full cursor-pointer flex flex-row justify-start items-center"},Be=["checked","value"],ze={class:"font-medium text-base text-gray-800"},Fe=X({__name:"store",setup(M){const i=d(!0);let f=d([]);const k=Z({page:0,size:12});if(n().query){let r=n().query.storeIds||[];Array.isArray(r)||(r=r.split(",")),f.value=r.map(a=>Number(a))}const j=function(r){P().resetStores(),P().fetchStores({...k,storeNamePhrase:r?.target&&r.target.value})};j();const{onInput:q}=ee(j,{isEmpty:r=>!r?.target?.value});Y(()=>n().query,r=>{if(r){let c=n().query.storeIds||[];Array.isArray(c)||(c=c.split(",")),f.value=c.map(b=>Number(b))}},{immediate:!0,deep:!0});const $=function(r){const a=Number(r.target.value);if(r.target.checked)f.value.includes(a)||f.value.push(a);else{const c=f.value.indexOf(a);c>-1&&f.value.splice(c,1)}w().replace({query:{...n().query,storeIds:f.value.length>0?f.value.join(","):void 0,page:void 0,page_vip:void 0}})},R=function(r){P().getStores.size<P().getTotalElements&&Math.ceil(r.target.scrollTop)==Math.ceil(r.target.scrollHeight)-Math.ceil(r.target.clientHeight)&&(k.page++,P().fetchStores({...k}))};return(r,a)=>{const c=te,b=W,S=se;return("useRoute"in r?r.useRoute:e(n))().path=="/mehsullar"||("useRoute"in r?r.useRoute:e(n))().params.category!="fermer-mehsullari"?(g(),h("section",Ie,[t("button",{class:"text-gray-700 text-base font-bold hover:text-gray-700 flex flex-row items-center justify-between mb-3",onClick:a[0]||(a[0]=u=>i.value=!e(i))},[t("span",$e,p(r.$t("store")),1),y(c,{class:m([{"rotate-180":e(i),"rotate-0":!e(i)},"transform"])},null,8,["class"])]),v(t("div",{onScroll:R,class:"flex flex-col w-full h-72 overflow-hidden overflow-y-scroll scroll-design pb-3 pr-2"},[t("div",Pe,[t("div",De,[y(b)]),t("input",{class:"px-4 outline-none h-11 pl-10 w-full border rounded-l-md border-gray-200",type:"text",onInput:a[1]||(a[1]=(...u)=>e(q)&&e(q)(...u)),placeholder:r.$t("search_the_store")},null,40,Ne)]),t("ul",Ae,[y(S,{size:"large",class:"mt-20 flex justify-center",spinning:("useStoresStore"in r?r.useStoresStore:e(P))().getStoresStatus!=="success"},{default:L(()=>[(g(!0),h(z,null,F(("useStoresStore"in r?r.useStoresStore:e(P))().getStores,(u,_)=>(g(),h("li",{class:m(["w-full h-auto min-w-full hover:bg-gray-50 mb-3 flex flex-row justify-start items-center",{"bg-gray-50":e(f).includes(u.id)}]),key:_},[t("label",Te,[t("input",{style:{"-webkit-appearance":"none","-moz-appearance":"none",appearance:"none"},checked:e(f).includes(u.id),onChange:$,class:"form-checkbox inline-flex justify-center items-center min-w-4 min-h-4 h-4 w-4 bg-white border border-gray-200 rounded checked:bg-green-600 checked:border-green-600 checked:text-white appearance-none mr-2",type:"checkbox",value:u.id},null,40,Be),t("span",ze,p(u.name),1)])],2))),128))]),_:1},8,["spinning"])])],544),[[A,e(i)]]),a[2]||(a[2]=t("hr",{class:"my-6"},null,-1))])):T("",!0)}}}),Ee={class:"flex flex-col w-full min-h-screen"},Ue={key:0,class:"flex flex-col w-full h-auto"},Ve={class:"flex flex-row justify-between items-center"},Le={class:"text-gray-700 text-base font-medium"},Me={key:1,class:"my-6"},Oe={class:"font-medium text-base text-gray-800"},Qe={class:"font-medium text-base text-gray-800"},He={class:"font-medium text-base text-gray-800"},Ke={key:2,class:"flex flex-col w-full h-auto"},Ge={class:""},Je={class:"flex flex-col w-full max-h-72 overflow-y-auto scroll-design pb-3 pr-2"},We={class:"flex flex-col w-full h-auto"},Xe={class:""},Ye={class:"flex flex-col w-full h-72 overflow-y-scroll scroll-design pb-3 pr-2"},Ze={class:""},et={class:"flex w-full sticky top-0 flex-row justify-start items-center bg-white z-20"},tt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},st=["placeholder"],ot={class:"mt-3"},rt={class:"text-gray-200 w-full cursor-pointer flex flex-row justify-start items-center"},lt=["checked","value"],nt={class:"font-medium text-base text-gray-800"},at={class:""},it={class:"flex flex-row justify-between"},ut={class:"w-1/2 mr-3 inline-flex flex-col text-sm"},ct=["placeholder"],dt={class:"w-1/2 inline-flex flex-col text-sm"},ft=["placeholder"],pt={class:"flex flex-col w-full h-auto"},mt={class:""},gt={class:"flex flex-col w-full max-h-72 overflow-y-auto scroll-design pb-3 pr-2"},ht={class:"text-gray-200 w-full cursor-pointer flex flex-row justify-start items-center hover:bg-gray-50"},yt=["value"],vt={class:"font-medium text-base text-gray-800"},bt={key:4,class:"flex flex-col w-full h-auto"},xt={class:""},_t={class:"flex flex-col w-full h-auto pb-3 pr-2"},wt={class:"m-0 p-0 flex flex-col justify-start items-start h-[110px]"},kt=["onClick"],St={class:"flex flex-row items-center"},Ct={class:"flex flex-row justify-start items-center whitespace-nowrap w-auto mr-1.5 -ml-[1px] cursor-pointer"},jt={class:"text-xs font-medium text-[#1F2937]"},Ft=X({__name:"mainProductFilter",props:{mobile:{type:Boolean,default:!0}},async setup(M){const{t:i}=ke(),f=d(!0),k=d(!0),j=d(!0),q=d(!0),$=d(!0),R=d(void 0),r=d(void 0),a=d(void 0),c=d(!1),b=d(!1),S=d(!1);let u=d([]),_=d([]);const O=[{label:"Satılır",value:"SELLABLE"},{label:"İcarəyə verilir",value:"RENTABLE"},{label:"Təklif olunur",value:"OFFERABLE"}],oe=Z([{rating:4},{rating:3},{rating:2},{rating:1}]),V=d(),Q=d(!1),re=M;Se().isHydrating||N().fetchCities();const le=function(o){N().resetCities(),N().fetchCities(`${o.target.value}`)},{onInput:H}=ee(le,{isEmpty:o=>!o.target?.value});Y(()=>n().query,o=>{if(n().query){let s=n().query,C=s.cityIds||[];Array.isArray(C)||(C=C.split(",")),u.value=C.map(I=>Number(I));let x=s.serviceTypes||s.xidmət_növü||[];Array.isArray(x)||(x=String(x).split(",")),_.value=O.filter(I=>x.includes(I.value)||x.includes(I.label)).map(I=>I.value),R.value=Number(s.minPrice)||void 0,r.value=Number(s.maxPrice)||void 0,a.value=Number(s.minAverageRating)||void 0,n().params.category!=="fermer-mehsullari"&&(c.value=s.endirimli==="beli",b.value=s.taksitli_ödəniş==="beli",S.value=s.çatdırılma_edilir==="beli")}},{immediate:!0,deep:!0});const K=function(o){o.preventDefault()},G=function(o){o.charCode>
1=48&&o.charCode<=57||o.charCode==46||o.charCode==0?V.value.indexOf(".")>-1&&o.charCode==46&&o.preventDefault():o.preventDefault()},ne=function(o){const s=Number(o.target.value);if(o.target.checked)u.value.includes(s)||u.value.push(s);else{const C=u.value.indexOf(s);C>-1&&u.value.splice(C,1)}w().replace({query:{...n().query,cityIds:u.value.length>0?u.value.join(","):void 0,page:void 0,page_vip:void 0}})},ae=function(){w().replace({query:{...n().query,maxPrice:r.value||void 0,page:void 0,page_vip:void 0}})},ie=function(){w().replace({query:{...n().query,minPrice:R.value||void 0,page:void 0,page_vip:void 0}})},ue=function(){w().replace({query:{...n().query,endirimli:c.value?"beli":void 0,page:void 0,page_vip:void 0}})},ce=function(){w().replace({query:{...n().query,taksitli_ödəniş:b.value?"beli":void 0,page:void 0,page_vip:void 0}})},de=function(){w().replace({query:{...n().query,çatdırılma_edilir:S.value?"beli":void 0,page:void 0,page_vip:void 0}})},fe=function(){const o=_.value;w().replace({query:{...n().query,serviceTypes:o.length>0?o.join(","):void 0,xidmət_növü:void 0,page:void 0,page_vip:void 0}})},pe=function(o){a.value=o.rating,w().replace({query:{...n().query,minAverageRating:o.rating||void 0,page:void 0,page_vip:void 0}})},me=function(){u.value=[],_.value=[],R.value=void 0,r.value=void 0,a.value=void 0,c.value=!1,b.value=!1,S.value=!1,Q.value=!Q.value,w().replace({query:{...n().query,minPrice:void 0,maxPrice:void 0,cityIds:void 0,storeIds:void 0,productTypeLabels:void 0,endirimli:void 0,taksitli_ödəniş:void 0,çatdırılma_edilir:void 0,xidmət_növü:void 0,serviceTypes:void 0,minAverageRating:void 0}})};return(o,s)=>{const C=_e,x=te,I=we,ge=W,he=se,ye=Fe,ve=qe,be=Re;return g(),h("div",Ee,[re.mobile?(g(),h("section",Ue,[t("div",Ve,[t("span",Le,p(e(i)("filter")),1),y(C,{variant:"link",onClick:me},{default:L(()=>[Ce(p(e(i)("reset")),1)]),_:1})]),s[12]||(s[12]=t("hr",{class:"mt-6 bg-gray-200"},null,-1))])):T("",!0),("useRoute"in o?o.useRoute:e(n))().path==="/mehsullar"||("useRoute"in o?o.useRoute:e(n))().params.id!=="fermer-mehsullari"?(g(),h("section",Me,[t("label",{class:m([{"bg-gray-50":e(c)},"text-gray-200 w-full cursor-pointer flex flex-row justify-start items-center hover:bg-gray-50 mb-3"])},[v(t("input",{style:{"-webkit-appearance":"none","-moz-appearance":"none",appearance:"none"},class:"form-checkbox inline-flex justify-center items-center h-4 w-4 bg-white border border-gray-200 rounded checked:bg-green-600 checked:border-green-600 checked:text-white appearance-none mr-2",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=l=>D(c)?c.value=l:null),onChange:ue},null,544),[[U,e(c)]]),t("span",Oe,p(e(i)("discounted")),1)],2),t("label",{class:m([{"bg-gray-50":e(b)},"text-gray-200 w-full cursor-pointer flex flex-row justify-start items-center hover:bg-gray-50 mb-3"])},[v(t("input",{style:{"-webkit-appearance":"none","-moz-appearance":"none",appearance:"none"},class:"form-checkbox inline-flex justify-center items-center h-4 w-4 bg-white border border-gray-200 rounded checked:bg-green-600 checked:border-green-600 checked:text-white appearance-none mr-2",type:"checkbox","onUpdate:modelValue":s[1]||(s[1]=l=>D(b)?b.value=l:null),onChange:ce},null,544),[[U,e(b)]]),t("span",Qe,p(e(i)("installment_payment")),1)],2),t("label",{class:m([{"bg-gray-50":e(S)},"text-gray-200 w-full cursor-pointer flex flex-row justify-start items-center hover:bg-gray-50 mb-3"])},[v(t("input",{style:{"-webkit-appearance":"none","-moz-appearance":"none",appearance:"none"},class:"form-checkbox inline-flex justify-center items-center h-4 w-4 bg-white border border-gray-200 rounded checked:bg-green-600 checked:border-green-600 checked:text-white appearance-none mr-2",type:"checkbox","onUpdate:modelValue":s[2]||(s[2]=l=>D(S)?S.value=l:null),onChange:de},null,544),[[U,e(S)]]),t("span",He,p(e(i)("hasDelivery")),1)],2)])):T("",!0),("useRoute"in o?o.useRoute:e(n))().params.id?(g(),h("section",Ke,[s[13]||(s[13]=t("hr",{class:"mb-6 bg-gray-200"},null,-1)),t("button",{class:"text-gray-700 text-base font-bold hover:text-gray-700 flex flex-row items-center justify-between mb-3",onClick:s[3]||(s[3]=l=>f.value=!e(f))},[t("span",Ge,p(e(i)("subcategories")),1),y(x,{class:m([{"rotate-180":e(f),"rotate-0":!e(f)},"transform"])},null,8,["class"])]),t("div",Je,[v(y(I,null,null,512),[[A,e(f)]])]),s[14]||(s[14]=t("hr",{class:"my-6"},null,-1))])):T("",!0),t("section",We,[t("button",{class:"text-gray-700 text-base font-bold hover:text-gray-700 flex flex-row items-center justify-between mb-3",onClick:s[4]||(s[4]=l=>j.value=!e(j))},[t("span",Xe,p(e(i)("district")),1),y(x,{class:m([{"rotate-180":e(j),"rotate-0":!e(j)},"transform"])},null,8,["class"])]),v(t("div",Ye,[t("div",Ze,[t("div",et,[t("div",tt,[y(ge)]
1),t("input",{class:"px-4 outline-none h-11 pl-10 w-full border rounded-l-md border-gray-200",type:"text",onInput:s[5]||(s[5]=(...l)=>e(H)&&e(H)(...l)),placeholder:e(i)("search_the_region")},null,40,st)]),t("ul",ot,[y(he,{size:"large",class:"mt-16 flex justify-center",spinning:("useCitiesStore"in o?o.useCitiesStore:e(N))().getStatus!=="success"&&("useCitiesStore"in o?o.useCitiesStore:e(N))().getCities.length===0},{default:L(()=>[(g(!0),h(z,null,F(("useCitiesStore"in o?o.useCitiesStore:e(N))().getCities,(l,B)=>(g(),h("li",{class:m(["mb-3 flex flex-row justify-start items-center w-full min-w-full cursor-pointer hover:bg-gray-50",{"bg-gray-50":e(u).includes(l.id)}]),key:B},[t("label",rt,[t("input",{style:{"-webkit-appearance":"none","-moz-appearance":"none",appearance:"none"},checked:e(u).includes(Number(l.id)),onChange:ne,class:"form-checkbox inline-flex justify-center items-center h-4 w-4 bg-white border border-gray-200 rounded checked:bg-green-600 checked:border-green-600 checked:text-white appearance-none mr-2",type:"checkbox",value:l.id},null,40,lt),t("span",nt,p(l.name),1)])],2))),128))]),_:1},8,["spinning"])])])],512),[[A,e(j)]]),s[15]||(s[15]=t("hr",{class:"my-6"},null,-1))]),("useRoute"in o?o.useRoute:e(n))().path==="/mehsullar"||("useRoute"in o?o.useRoute:e(n))().params.id!=="fermer-mehsullari"?(g(),je(ye,{key:3})):T("",!0),t("section",null,[t("button",{class:"w-full text-gray-700 text-base font-bold hover:text-gray-700 flex flex-row items-center justify-between mb-3",onClick:s[6]||(s[6]=l=>q.value=!e(q))},[t("span",at,p(e(i)("price")),1),y(x,{class:m([{"rotate-180":e(q),"rotate-0":!e(q)},"transform"])},null,8,["class"])]),v(t("div",it,[t("label",ut,[v(t("input",{"onUpdate:modelValue":s[7]||(s[7]=l=>D(R)?R.value=l:null),class:"mt-2 w-full min-w-full h-8 border border-gray-200 outline-none px-3 rounded-sm focus:border-green-500 hover:border-green-500",placeholder:e(i)("minimum"),"allow-clear":"",ref_key:"num",ref:V,maxLength:30,onKeypress:G,onPaste:K,onChange:ie},null,40,ct),[[J,e(R)]])]),t("label",dt,[v(t("input",{"onUpdate:modelValue":s[8]||(s[8]=l=>D(r)?r.value=l:null),class:"mt-2 w-full min-w-full h-8 border border-gray-200 outline-none px-3 rounded-sm focus:border-green-500 hover:border-green-500",placeholder:e(i)("maximum"),maxLength:30,"allow-clear":"",ref_key:"num",ref:V,onKeypress:G,onPaste:K,onChange:ae},null,40,ft),[[J,e(r)]])])],512),[[A,e(q)]]),s[16]||(s[16]=t("hr",{class:"my-6"},null,-1))]),t("section",pt,[t("button",{class:"text-gray-700 text-base font-bold hover:text-gray-700 flex flex-row items-center justify-between mb-3",onClick:s[9]||(s[9]=l=>k.value=!e(k))},[t("span",mt,p(e(i)("service_type")),1),y(x,{class:m([{"rotate-180":e(k),"rotate-0":!e(k)},"transform"])},null,8,["class"])]),v(t("div",gt,[t("div",null,[t("ul",null,[(g(),h(z,null,F(O,(l,B)=>t("li",{key:B,class:m(["flex items-center cursor-pointer hover:bg-gray-50 mb-3 rounded-md",e(_).includes(l.value)?"bg-gray-50":""])},[t("label",ht,[v(t("input",{type:"checkbox",class:"form-checkbox inline-flex justify-center items-center h-4 w-4 bg-white border border-gray-200 rounded checked:bg-green-600 checked:border-green-600 checked:text-white appearance-none mr-2",value:l.value,"onUpdate:modelValue":s[10]||(s[10]=E=>D(_)?_.value=E:_=E),onChange:fe},null,40,yt),[[U,e(_)]]),t("span",vt,p(l.label),1)])],2)),64))])])],512),[[A,e(k)]])]),("useRoute"in o?o.useRoute:e(n))().path==="/mehsullar"||("useRoute"in o?o.useRoute:e(n))().params.id!=="fermer-mehsullari"?(g(),h("section",bt,[s[17]||(s[17]=t("hr",{class:"my-6"},null,-1)),t("button",{class:"text-gray-700 text-base font-bold hover:text-gray-700 flex flex-row items-center justify-between mb-3",onClick:s[11]||(s[11]=l=>$.value=!e($))},[t("span",xt,p(e(i)("rating_title")),1),y(x,{class:m([{"rotate-180":e($),"rotate-0":!e($)},"transform"])},null,8,["class"])]),v(t("div",_t,[t("ul",wt,[(g(!0),h(z,null,F(e(oe),(l,B)=>(g(),h("li",{onClick:E=>pe(l),key:B,class:m([{"bg-gray-100 rounded":e(a)==l.rating,"bg-white":e(a)!=l.rating},"flex hover:bg-gray-100 hover:rounded flex-row justify-between items-center mb-3 w-full py-1 min-w-full h-auto cursor-pointer"])},[t("div",St,[t("div",Ct,[(g(),h(z,null,F(5,(E,xe)=>y(ve,{size:"w-5 h-5",class:m(["mr-1",xe<l.rating?"text-yellow-400":"text-gray-300"])},null,8,["class"])),64))]),t("span",jt,p(l.rating)+" "+p(e(i)("and_more_than_four")),1)]),t("div",{class:m({"inline-block mr-1 "
1:e(a)==l.rating,hidden:e(a)!=l.rating})},[y(be)],2)],10,kt))),128))])],512),[[A,e($)]])])):T("",!0)])}}});export{Ft as _};

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.