1import{_ as je}from"./BstzGHVC.js";import{u as Ge,g as qe,h as Je,a as Xe,b as Qe,d as et,H as tt,f as Y,Y as at,X as lt,j as d,i as l,k as a,l as O,B as we,E as A,t as r,Z as st,K as it,m as _,F as J,n as X,s as E,r as h,S as rt,v as c,$ as nt,C as W,L as ce,R as Ve,p as de,o as Le,M as ot,U as ut}from"./BkqB4Lu8.js";import{_ as ct}from"./D1S9CPCi.js";import{_ as dt}from"./Dt4Jmcy7.js";import{_ as vt}from"./ipBtg-kW.js";import{_ as pt,a as mt}from"./BaxdShsm.js";import{u as ft}from"./CvzpwIvC.js";import{u as _t}from"./gi8bmQj2.js";import{u as yt}from"./BSxrkpnW.js";const ht="data:image/svg+xml,%3csvg%20width='36'%20height='24'%20viewBox='0%200%2036%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.0253%2012.3973V16.5865H15.6953V6.23876H19.221C20.0715%206.22066%2020.8933%206.54337%2021.504%207.1345C22.1223%207.69094%2022.4707%208.48716%2022.4571%209.31805C22.4752%2010.155%2022.1268%2010.9572%2021.504%2011.5152C20.8873%2012.1033%2020.1258%2012.3973%2019.221%2012.3958L17.0253%2012.3973ZM17.0253%207.513V11.1261H19.2541C19.7488%2011.1412%2020.2253%2010.9467%2020.5691%2010.5908C21.2673%209.9122%2021.2839%208.79478%2020.6038%208.09659C20.5917%208.08453%2020.5812%208.07246%2020.5691%208.06191C20.2298%207.69848%2019.7503%207.49943%2019.2541%207.513H17.0253ZM25.5213%209.27583C26.5045%209.27583%2027.2796%209.53822%2027.8481%2010.063C28.4166%2010.5878%2028.7001%2011.3086%2028.7001%2012.2224V16.5865H27.4289V15.6033H27.3716C26.8212%2016.4131%2026.0883%2016.8172%2025.1745%2016.8172C24.3948%2016.8172%2023.7419%2016.5865%2023.2171%2016.1236C22.7074%2015.6938%2022.4179%2015.0574%2022.4299%2014.3894C22.4299%2013.6565%2022.7074%2013.0744%2023.2608%2012.6416C23.8143%2012.2089%2024.5532%2011.9917%2025.4791%2011.9917C26.2678%2011.9917%2026.9192%2012.1365%2027.4289%2012.4245V12.1199C27.4319%2011.6645%2027.2298%2011.2332%2026.88%2010.9437C26.5286%2010.627%2026.0702%2010.4536%2025.5967%2010.4596C24.8548%2010.4596%2024.2667%2010.7733%2023.8339%2011.3991L22.6637%2010.6617C23.3061%209.73727%2024.2591%209.27583%2025.5213%209.27583ZM23.8007%2014.4195C23.7992%2014.7634%2023.9636%2015.0861%2024.241%2015.2866C24.5351%2015.5174%2024.9%2015.641%2025.274%2015.6335C25.835%2015.632%2026.3733%2015.4088%2026.7699%2015.0122C27.2102%2014.5975%2027.4304%2014.1119%2027.4304%2013.5525C27.0157%2013.2222%2026.4382%2013.0563%2025.6962%2013.0563C25.1564%2013.0563%2024.7055%2013.186%2024.3451%2013.4469C23.9817%2013.7123%2023.8007%2014.0335%2023.8007%2014.4195ZM35.9987%209.50655L31.5608%2019.708H30.1885L31.8352%2016.1386L28.9158%209.50655H30.3604L32.4701%2014.593H32.4987L34.5511%209.50655H35.9987Z'%20fill='%235F6368'/%3e%3cpath%20d='M11.6526%2011.4925C11.6526%2011.0869%2011.6194%2010.6828%2011.55%2010.2831H5.94336V12.5723H9.15385C9.02114%2013.3112%208.59288%2013.9641%207.96707%2014.3788V15.8657H9.88371C11.0056%2014.8327%2011.6526%2013.3021%2011.6526%2011.4925Z'%20fill='%234285F4'/%3e%3cpath%20d='M5.94392%2017.3028C7.54841%2017.3028%208.89956%2016.7765%209.88427%2015.8672L7.96763%2014.3803C7.4338%2014.7422%206.74767%2014.9488%205.94392%2014.9488C4.39371%2014.9488%203.07725%2013.9038%202.60676%2012.4953H0.632812V14.0274C1.64165%2016.0361%203.69703%2017.3028%205.94392%2017.3028Z'%20fill='%2334A853'/%3e%3cpath%20d='M2.6073%2012.4954C2.35848%2011.758%202.35848%2010.9572%202.6073%2010.2198V8.68771H0.633351C-0.211117%2010.3676%20-0.211117%2012.3476%200.633351%2014.0275L2.6073%2012.4954Z'%20fill='%23FBBC04'/%3e%3cpath%20d='M5.94392%207.76634C6.7914%207.75276%207.61023%208.07246%208.22398%208.65755L9.92197%206.96107C8.84527%205.95073%207.42023%205.39579%205.94392%205.41238C3.69703%205.41238%201.64165%206.68059%200.632812%208.68771L2.60676%2010.2198C3.07725%208.81137%204.39371%207.76634%205.94392%207.76634Z'%20fill='%23EA4335'/%3e%3c/svg%3e",Ct="data:image/svg+xml,%3csvg%20width='36'%20height='24'%20viewBox='0%200%2036%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1877_57105)'%3e%3cpath%20d='M6.82299%206.77505C7.24194%206.2364%207.54119%205.51819%207.45142%204.79999C6.82299%204.82991%206.07486%205.21894%205.62598%205.72767C5.23695%206.17655%204.87785%206.92468%204.96763%207.61296C5.68583%207.70273%206.37411%207.3137%206.82299%206.77505ZM7.45142%207.79251C6.43396%207.73266%205.56613%208.36109%205.08733%208.36109C4.60852%208.36109%203.86039%207.82243%203.05241%207.82243C2.00503%207.85236%201.04743%208.42094%200.508774%2
109.37854C-0.568533%2011.2638%200.209522%2014.0469%201.28683%2015.5731C1.79556%2016.3212%202.42399%2017.1591%203.23197%2017.1292C4.01002%2017.0992%204.30927%2016.6204%205.23695%2016.6204C6.16463%2016.6204%206.43396%2017.1292%207.27187%2017.0992C8.10977%2017.0693%208.64842%2016.3511%209.15715%2015.5731C9.75566%2014.7052%209.99506%2013.8673%209.99506%2013.8374C9.96513%2013.8075%208.34917%2013.209%208.34917%2011.3536C8.31925%209.79749%209.60603%209.04936%209.66588%209.01944C8.9776%207.94213%207.84044%207.82243%207.45142%207.79251Z'%20fill='black'/%3e%3cpath%20d='M16.0443%205.66785C18.2588%205.66785%2019.7849%207.19403%2019.7849%209.37857C19.7849%2011.593%2018.2288%2013.1192%2015.9844%2013.1192H13.5605V16.9796H11.7949V5.66785H16.0443ZM13.5605%2011.6529H15.5655C17.0917%2011.6529%2017.9595%2010.815%2017.9595%209.40849C17.9595%207.97209%2017.0917%207.16411%2015.5655%207.16411H13.5306V11.6529H13.5605ZM20.2338%2014.6753C20.2338%2013.2389%2021.3411%2012.3412%2023.3161%2012.2215L25.5904%2012.1018V11.4733C25.5904%2010.5457%2024.962%2010.007%2023.9445%2010.007C22.957%2010.007%2022.3585%2010.4858%2022.2089%2011.204H20.5929C20.6827%209.70775%2021.9695%208.60051%2024.0044%208.60051C26.0094%208.60051%2027.2962%209.6479%2027.2962%2011.3237V17.0095H25.6802V15.6629H25.6503C25.1715%2016.5905%2024.1241%2017.1591%2023.0468%2017.1591C21.371%2017.1591%2020.2338%2016.1417%2020.2338%2014.6753ZM25.5904%2013.9272V13.2688L23.5555%2013.3885C22.5381%2013.4484%2021.9695%2013.8973%2021.9695%2014.6155C21.9695%2015.3337%2022.568%2015.8125%2023.4657%2015.8125C24.6628%2015.8125%2025.5904%2015.0045%2025.5904%2013.9272ZM28.7924%2020.0619V18.6853C28.9121%2018.7152%2029.2114%2018.7152%2029.3311%2018.7152C30.1091%2018.7152%2030.5281%2018.386%2030.7974%2017.5481C30.7974%2017.5182%2030.947%2017.0394%2030.947%2017.0394L27.9545%208.78007H29.78L31.8747%2015.5132H31.9046L33.9994%208.78007H35.7949L32.7126%2017.4883C31.9944%2019.4933%2031.1864%2020.1217%2029.4807%2020.1217C29.361%2020.0918%2028.9421%2020.0918%2028.7924%2020.0619Z'%20fill='black'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1877_57105'%3e%3crect%20width='36'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",gt={key:0,class:"order-page payment"},Pt={class:"container"},kt={class:"order-page-steps"},bt={class:"step active step-2"},At={class:"step"},Et={class:"step"},It={class:"container"},$t={class:"order-page-card"},Tt={class:"order-personal-data"},Rt={class:"personal-data-form-container shipping"},wt={key:0,class:"alert alert-danger mb-2",role:"alert"},Vt={key:1,class:"alert alert-danger mb-2",role:"alert"},Lt={class:"payment-selector-container payment carrier"},Bt={class:"payment-selector"},Dt=["onClick"],Ht=["id","value"],Ut=["for"],Nt={key:0,class:"logo"},Zt=["src"],St={class:"name"},Mt={key:1,class:"underline"},Kt={key:0,class:"pick-up-point"},Ot={key:2,class:"underline"},zt={key:0,class:"pick-up-point"},Ft={key:1,class:"price free"},Yt={key:2,class:"price"},Wt={key:0,class:"pick-up-point-select"},xt={key:0,class:"alert alert-danger mb-2",role:"alert"},jt={class:"pick-up-point-select-result"},Gt=["onClick"],qt={key:2,class:"alert alert-danger mb-2",role:"alert"},Jt={class:"payment-selector-container payment"},Xt={class:"payment-selector payment"},Qt=["id","value"],ea=["for"],ta={key:0,class:"logo"},aa=["src"],la={class:"name"},sa={key:1,class:"payment-wallet-logos"},ia={key:1,class:"price free"},ra={key:2,class:"price"},na={key:0,class:"order-summary-container"},oa={class:"order-summary"},ua={class:"product"},ca={class:"product-name"},da={key:0},va={key:1},pa={key:0,class:"order-summary-additional"},ma={class:"order-summary-additional-row"},fa={key:1,class:"order-summary-additional for-points"},_a={class:"order-summary-additional-row"},ya={key:2,class:"order-summary-additional"},ha={key:0,class:"order-summary-additional-row"},Ca={key:0,class:"pick-up-point"},ga={key:0},Pa={key:1,class:"order-summary-additional-row"},ka={class:"order-summary-total"},ba={class:"total"},Aa={class:"price"},Ea={class:"subtotal"},Ia={class:"price"},$a={class:"order-basket-actions"},Ta={class:"order-basket-actions__continue"},Ra={key:0,class:"order-delivery-estimate"},wa={type:"submit",class:"btn btn-accent-orange"},Ya={__name:"doprava-a-platba",setup(Va){const{t:f}=Ge();qe({title:()=>f("Doprava a platba"),robots:"noindex, nofollow"}),Je({script:[{src:"/js/packeta.js"},{src:"https://widget.postabezhranic.cz/template/assets/geowidget/v/1/4/scripts.min.js"}],link:[{href:"https://widget.postabezhranic.cz/template/assets/geowidget/v/1/4/styles.min.css",rel:"stylesheet"}],bodyAttrs:{class:"order"}});const Be=E({get(){return m.semaphore}}),V=E({get(){return m.cart}}),{longestDelivery:ve}=ft(V),g=E({get(){return m.order}}),Q=E({get(){return m.cartTotal}}),H=E({get(){return m.cartTotalNoTax}}),pe=E({get(){return m.couponCode}}),De=E({get(){return m.couponDiscount}}),me=E({get(){return m.discountViaPoints}}),fe=E({get(){return m.cartTotalWeight}}),_e=E({get(){return m.persistentOrder.shipping}}),He=E({get(){return g.value?.pickUpPoint||null}}),Ue=E(()=>m.orderValid),{$helper:p,$Carriers:Ne,$Payments:Ze,$PriceLevels:Se,$PickU
1pPoints:ye,$dataLayerHelper:ee,$ecomailHelper:te,$Logstash:Me,$bootstrap:Ke}=Xe(),m=Qe(),{displayName:Oe}=_t(),ae=et(),S=h(!1),k=h(null),u=h(null),x=h(null),P=h(null),U=h(null),j=h(null),he=h(!1),le=h(!1),se=h(!1),z=h(!1),ie=h(!1),M=h(null),L=h(null),F=h(null),Ce=h(null),I=h(null),N=h(null),re=h(null),C=h(null),ge=`/carriers/${parseInt(p.getEnvVariableByKey("DPD_PICKUP_CARRIER"))}`,T=`/carriers/${parseInt(p.getEnvVariableByKey("PACKETA_PICKUP_CARRIER"))}`,Pe=p.getEnvVariableByKey("PACKETA_API_KEY"),ze=parseInt(p.getEnvVariableByKey("PACKETA_CZECH_ZONE_ID")),ke=p.getEnvVariableByKey("PAYMENT_GOPAY_ID"),be=parseInt(p.getEnvVariableByKey("FREE_DELIVERY"))||0,$=`/carriers/${parseInt(p.getEnvVariableByKey("POSTA_BEZ_HRANIC_CARRIER"))}`,Ae=p.getEnvVariableByKey("POSTA_BEZ_HRANIC_API_KEY"),Fe=p.getEnvVariableByKey("GOOGLE_MAPS_API_KEY"),G=h([]),K=yt("",500),B=h(!1),D=h(!1),R=h(null),Ye=t=>t?ke&&String(t.id)===String(ke)?!0:t.type==="TATRA_PAY_CARD_PAY":!1;tt(async()=>{if(await m.loadActiveOrder(!0),!g.value||!Ue.value){ae.push(p.getBasketUrl());return}if(!V.value||V.value.length===0){ae.push(p.getBasketUrl());return}V.value&&V.value.length&&(ee.beginCheckout(g.value,H.value,m.getCurrency),te.beginCheckout(g.value,H.value,m.getCurrency));try{P.value=g.value.payment?.["@id"],u.value=g.value.carrier?.["@id"],U.value=g.value.pickUpPoint,C.value=g.value.shippingAddress;const t=m.zones||[],[e,n,o,v]=await Promise.all([Ne.getCollection({params:{pagination:!1}}),Ze.getCollection({params:{pagination:!1}}),Se.getCollection({params:{pagination:!1}}),ye.getCollection({params:{pagination:!1}})]);if(u.value===T&&(B.value=!0,C.value||(u.value=null,B.value=null)),u.value===$&&(D.value=!0,C.value||(u.value=null,D.value=null)),t.length&&(M.value=t.map(s=>({id:s["@id"],label:s.name,justId:s.id,countries:s.countries,priceDefinition:s.priceDefinition})),g.value.zone?k.value=M.value?.find(s=>s.id===g.value.zone["@id"]):m.getZone?k.value=M.value?.find(s=>s.id===m.getZone):M.value?.length&&(k.value=M.value[0])),e.status===200&&e.data["hydra:member"].length&&(L.value=e.data["hydra:member"]),n.status===200&&n.data["hydra:member"].length&&(F.value=n.data["hydra:member"]),o.status===200&&o.data["hydra:member"].length&&(Ce.value=o.data["hydra:member"]),v.status===200&&v.data["hydra:member"].length){availablePickUpPoints.value=v.data["hydra:member"];for(const s of availablePickUpPoints.value){const y=L.value?.find(w=>w["@id"]===s.carrier);y&&(y.hasPickUps=!0,y.availablePickUpPoints||(y.availablePickUpPoints=[]),y.availablePickUpPoints.push(s),U.value===s["@id"]&&(y.selectedPickUp=s))}}}catch(t){const e={level:"ERROR",message:"SHIPPING_INIT_ERROR",data:{source:"website",message:t.message,stackTrace:t.stack,statusCode:t.statusCode,data:t.data,body:t.body}};Me.createResource({body:e})}S.value=!0});const We=(t,e)=>{t.selectedPickUp=e,ue()},Ee=()=>{const t=L.value?.map(s=>s["@id"]),e=F.value?.map(s=>s["@id"]),n=M.value?.map(s=>s.id);I.value=Ce.value?.filter(s=>{let y=!1,w=!0;s.type==="PRICE"?y=Q.value>=parseFloat(s.amountFrom)&&Q.value<parseFloat(s.amountTo):s.type==="WEIGHT"&&(y=fe.value>=parseFloat(s.amountFrom)&&fe.value<parseFloat(s.amountTo)),k.value&&(w=s.zones.includes(k.value.id));const i=n?.filter(Z=>s.zones.includes(Z)),b=e?.filter(Z=>s.payments.includes(Z));return t.includes(s.carrier)&&b&&b.length&&i&&i&&y&&w}),be&&(G.value=I.value?.filter(s=>s.type==="PRICE"&&parseInt(s.amountFrom)===be));const o=I.value?.map(s=>s.carrier),v=I.value?.flatMap(s=>s.payments.map(y=>y));N.value=L.value?.filter(s=>o.includes(s["@id"])),re.value=F.value?.filter(s=>v.includes(s["@id"])),N.value=N.value.filter(s=>!(s["@id"]===T&&!Pe)),N.value=N.value.filter(s=>!(s["@id"]===$&&!Ae))},Ie=()=>{let t=null;k.value||(he.value=!0,t=!0),u.value?u.value===ge&&!U.value&&(ie.value=!0,t=!0):(le.value=!0,t=!0),P.value||(se.value=!0,t=!0),_e.value||(z.value=!0,t=!0),!t&&(ee.addPaymentInfo(g.value,H.value,j.value,m.getCurrency),te.addPaymentInfo(g.value,H.value,j.value,m.getCurrency),ee.addShippingInfo(g.value,H.value,x.value,m.getCurrency),te.addShippingInfo(g.value,H.value,x.value,m.getCurrency),ae.push(p.getPersonalDataUrl()))},ne=t=>{let e=I.value?.filter(n=>n.carrier===t);if(e&&P.value&&k.value&&k.value.id&&(e=e?.filter(n=>n.payments.includes(P.value)&&n.zones.includes(k.value.id))),e&&e.length){const n=e.reduce((o,v)=>v.carrierPriceWithTax<o.carrierPriceWithTax?v:o);return parseFloat(n.carrierPriceWithTax)}return-1},oe=t=>{let e=I.value?.filter(n=>n.payments.includes(t));if(e&&u.value&&k.value&&k.value.id&&(e=e?.filter(n=>n.carrier===u.value&&n.zones.includes(k.value.id))),e&&e.length){const n=e.reduce((o,v)=>v.paymentPriceWithTax<o.paymentPriceWithTax?v:o);return parseFloat(n.paymentPriceWithTax)}return-1},q=()=>{if(Be.value)if(m.setSemaphore(!1),u.value&&P.value&&k.value?.id){let t=!1;if(G.value&&G.value.length){const e=G.value?.find(n=>n.carrier===u.value&&n.payments.includes(P.value));e&&(m.setShipping(e["@id"],e.carrier,P.value,U.value,k.value.id,C.value),z.value=!1,t=!0)}if(!t){const e=I.value?.filter(o=>o.carrier===u.value&&o.payments?.includes(P.value));let n=null;if(e){let o=Number.POSITIVE_INFINITY;for(const v of e)parseFloat(v.price)<o&&(n=v,o=parseFloat(v.price))}n?(m.setShipping(n["@id"],n.carrier,P.value,U.value,k.value.id,C.value),z.value=!1):(m.setShipping(null,null,null,null,null,{}),z.value=!0)}}else m.setShipping(null,null,null,null,null,{})},ue=()=>{if(u.value&&!(u.value===T||u.value===$)){const t=L.value?.find(e=>e["@id"]===u.value);if(t?.hasPickUps&&t.selectedPickUp){ie.value=!1,U.value=t.selectedPickUp["@id"];const e=t.selectedPickUp.address;C.value=e}else U.value=null,C.value=null;q()}},$e=t=>{if(t){u.value=null;let e="sk",n="sk";k.value&&k.value.justId===ze&&(e="cz",n="cs"),Packeta.Widget.pick(Pe,o=>{o?(C.value={referenceId:o.id,streetAddress:o.street,postalCode:o.zip,city:o.city,country:e.toUpperCase()},B.value=!0,u.value=T):(C.value=null,B.value=!1,u.value=null)},{country:e,language:n})}},Te=t=>{if(t&&!R.value?._isShown){xe();let e=p.formatPrice(ne($));e=e.result;const n=k.value?.countries?.map(y=>y.toLowerCase())||[],v=[{number:177,filterName:"Slovenská PoÅ¡ta",filterColor:"#003974",deliveryPrice:e,active:1,country:"sk"},{number:142,filterName:"BalÃkovo",filterColor:"#ED7E1D",deliveryPrice:e,active:1,country:"sk"},{number:225,filterName:"Packeta",filterColor:"#BA1C01",deliveryPrice:e,active:1,country:"sk"},{number:221,filterName:"GLS",filterColor:"#061AB2",deliveryPrice:e,active:1,country:"sk"},{number:215,filterName:"DPD",filterColor:"#BB0033",deliveryPrice:e,active:1,country:"sk"}
1,{number:105,filterName:"BalÃkovna",filterColor:"#11A8E0",deliveryPrice:e,active:1,country:"cz"},{number:98,filterName:"Zásilkovna",filterColor:"#BA1C01",deliveryPrice:e,active:1,country:"cz"},{number:220,filterName:"GLS",filterColor:"#061AB2",deliveryPrice:e,active:1,country:"cz"},{number:198,filterName:"DPD",filterColor:"#BB0033",deliveryPrice:e,active:1,country:"cz"},{number:232,filterName:"PPL",filterColor:"#004992",deliveryPrice:e,active:1,country:"cz"}].filter(y=>n.includes(y.country)),s={mapElementId:"pbhmap",api_key:Ae,parcelshops:v,translations:{enter_location:f("Zadajte polohu"),monday:f("pondelok"),tuesday:f("utorok"),wednesday:f("streda"),thursday:f("Å¡tvrtok"),friday:f("piatok"),saturday:f("sobota"),sunday:f("nedeľa"),navigate_to_location:f("navigovaÅ¥ na miesto"),pickup_here:f("vyzdvihnúť tu"),more_info:f("viac info"),type_of_delivery:f("TYP VÃDAJNÃHO MIESTA"),type_of_delivery_parcelbox:f("parcelbox"),type_of_delivery_parcelshop:f("parcelshop"),type_of_delivery_post:f("poÅ¡ta"),payment_method:f("PLATOBNà METÃDY"),payment_method_cash:f("hotovosÅ¥"),payment_method_card:f("platobná karta"),payment_method_app:f("aplikácia"),opening_hours:f("OTVÃRACIA DOBA"),opening_hours_title:f("Otváracia doba"),opening_hours_nonstop:f("nonstop"),opening_hours_opening:f("pevná"),parcelshop_not_found_heading:f("V okolà neboli nájdene žiadne parcelshopy"),parcelshop_not_found_info:f("ZmeÅte adresy alebo lokalitu na mape")},coutries:n,googleApiKey:Fe,afterParcelshopSelectCallback:function(y,w,i,b,Z,Re,La,Ba,Da,Ha){C.value={referenceId:y,streetAddress:b,postalCode:Re,city:Z,country:n[0]?.toUpperCase()||"SK"},D.value=!0,u.value=$,R.value&&(R.value.hide(),R.value=null)}};setTimeout(()=>{C.value=null,D.value=!1,u.value=null,pickmappInit(s)},250)}},xe=()=>{R.value=new Ke.Modal(document.getElementById("postaModal")),R.value.show()};return Y(S,(t,e)=>{Ee(),ue()}),Y(u,(t,e)=>{if(u.value&&S.value){le.value=!1;const n=L.value?.find(o=>o["@id"]===u.value);if(x.value=n?n.name:null,ue(),I.value?.length){let o=I.value?.filter(s=>u.value===s.carrier),v=[];for(const s of o)v=v.concat(s.payments);o=v,o=o?.filter((s,y,w)=>w.indexOf(s)===y),re.value=F.value?.filter(s=>o?.includes(s["@id"])),P.value&&!o?.includes(P.value)&&(P.value=null),u.value===T&&(B.value=!0),e&&u.value===T?$e(!0):u.value!==T&&(B.value=!1),u.value===$&&(D.value=!0),e&&u.value===$?Te(!0):u.value!==$&&(D.value=!1)}q()}}),Y(P,(t,e)=>{if(P.value&&S.value){se.value=!1;const n=F.value?.find(o=>o["@id"]===P.value);if(j.value=n?n.name:null,I.value?.length){let o=I.value?.filter(v=>v.payments?.includes(P.value));o=o?.map(v=>v.carrier),o=o?.filter((v,s,y)=>y.indexOf(v)===s),N.value=L.value?.filter(v=>o?.includes(v["@id"])),u.value&&!o?.includes(u.value)&&(u.value=null)}q()}}),Y(k,(t,e)=>{k.value&&S.value&&(Ee(),he.value=!1,e&&(u.value=null,P.value=null,x.value=null,j.value=null,q()))}),Y(K,async()=>{if(u.value){const t=L.value?.find(e=>e["@id"]===u.value);if(K.value.length>2){const e=await ye.getCollection({params:{pagination:!1,search:K.value}});e.status===200&&e.data["hydra:member"].length?t.filteredPickups=e.data["hydra:member"]:t.filteredPickups=[]}}}),at(()=>{R.value&&(R.value.hide(),R.value=null)}),lt((t,e,n)=>{V.value?.length&&t.meta.layout!=="order"?m.toggleCartModal(n):n()}),(t,e)=>{const n=je,o=rt,v=ut,s=ct,y=dt,w=vt;return c(),d("div",null,[l(S)?(c(),d("div",gt,[a("div",Pt,[O(n,{crumbs:[{title:t.$t("Doprava a platba")}]},null,8,["crumbs"]),a("div",kt,[O(o,{to:l(p).getBasketUrl(),class:"step done"},{default:we(()=>[e[4]||(e[4]=a("div",null,"1",-1)),A(" "+r(t.$t("Nákupný koÅ¡Ãk")),1)]),_:1},8,["to"]),a("div",bt,[e[5]||(e[5]=a("div",null,"2",-1)),A(" "+r(t.$t("Doprava a platba")),1)]),a("div",{class:"step pointer",onClick:Ie},[e[6]||(e[6]=a("div",null,"3",-1)),A(" "+r(t.$t("Kontaktné údaje")),1)]),a("div",At,[e[7]||(e[7]=a("div",null,"4",-1)),A(" "+r(t.$t("Sumarizácia")),1)]),a("div",Et,[e[8]||(e[8]=a("div",null,[a("img",{src:pt,alt:""})],-1)),A(" "+r(t.$t("DokonÄenie")),1)])])]),a("div",It,[e[15]||(e[15]=st('<div id="postaModal" class="modal fade posta-modal" tabindex="-1" aria-labelledby="postaModalLabel" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><img class="modal-close" data-bs-dismiss="modal" src="'+nt+'"></div><div class="modal-body"><div id="pbhmap"></div></div></div></div></div>',1)),a("div",$t,[a("form",{onSubmit:e[3]||(e[3]=it(i=>Ie(),["prevent"]))},[a("div",Tt,[a("div",Rt,[l(z)?(c(),d("div",wt,r(t.$t("shipping_payment_combination_not_allowed")),1
1)):_("",!0),l(le)?(c(),d("div",Vt,r(t.$t("shipping_required")),1)):_("",!0),a("div",Lt,[a("h3",null,"1. "+r(t.$t("Vyberte spôsob dopravy")),1),a("div",Bt,[(c(!0),d(J,null,X(l(N),i=>(c(),d("div",{key:`c-${i.id}`,class:W(["custom-radio",{active:l(u)===i["@id"]}]),onClick:()=>{$e(i["@id"]===T),Te(i["@id"]===$)}},[ce(a("input",{id:`c-${i.id}`,"onUpdate:modelValue":e[0]||(e[0]=b=>de(u)?u.value=b:null),type:"radio",name:"carrier",class:"form-check-input",value:i["@id"]},null,8,Ht),[[Ve,l(u)]]),a("label",{for:`c-${i.id}`},[i.file?(c(),d("div",Nt,[a("img",{src:i.file.url,alt:""},null,8,Zt)])):_("",!0),a("div",{class:W(["carrier-name",{noimg:!i.file}])},[a("span",St,r(i.name),1),i.description&&!l(p).isEmptyDescription(Array.isArray(i.description)?JSON.stringify(i.description):i.description)?(c(),Le(v,{key:0,blocks:i.description,"content-class":"carrier-description"},null,8,["blocks"])):_("",!0),l(u)&&i["@id"]===T?(c(),d("div",Mt,[l(B)&&l(C)?(c(),d("div",Kt,r(l(C).streetAddress)+", "+r(l(C).postalCode)+", "+r(l(C).city),1)):_("",!0)])):_("",!0),i["@id"]===$?(c(),d("div",Ot,[l(D)&&l(C)?(c(),d("div",zt,r(l(C).streetAddress)+", "+r(l(C).postalCode)+", "+r(l(C).city),1)):_("",!0)])):_("",!0)],2),ne(i["@id"])==0?(c(),d("span",Ft,r(t.$t("Zadarmo")),1)):(c(),d("span",Yt,"+"+r(l(p).formatPrice(ne(i["@id"]))),1))],8,Ut),i["@id"]===ge&&l(u)===i["@id"]?(c(),d("div",Wt,[l(ie)?(c(),d("div",xt,r(t.$t("pick_ip_required")),1)):_("",!0),ce(a("input",{"onUpdate:modelValue":e[1]||(e[1]=b=>de(K)?K.value=b:null),type:"text"},null,512),[[ot,l(K)]]),a("div",jt,[(c(!0),d(J,null,X(i.filteredPickups,(b,Z)=>(c(),d("div",{key:Z,class:W(["pick-up-point-select-result-item",{selected:i.selectedPickUp?.id===b.id}]),onClick:Re=>We(i,b)},[a("strong",null,r(b.name),1),a("span",null,r(b.address.streetAddress),1),a("span",null,r(`${b.address.postalCode} ${b.address.city}`),1)],10,Gt))),128))])])):_("",!0)],10,Dt))),128))])]),l(se)?(c(),d("div",qt,r(t.$t("payment_required")),1)):_("",!0),a("div",Jt,[a("h3",null,"2. "+r(t.$t("Vyberte spôsob platby")),1),a("div",Xt,[(c(!0),d(J,null,X(l(re),i=>(c(),d("div",{key:`p-${i.id}`,class:W(["custom-radio",{active:l(P)===i["@id"]}])},[ce(a("input",{id:`p-${i.id}`,"onUpdate:modelValue":e[2]||(e[2]=b=>de(P)?P.value=b:null),type:"radio",name:"payment",class:"form-check-input",value:i["@id"]},null,8,Qt),[[Ve,l(P)]]),a("label",{for:`p-${i.id}`},[i.file?(c(),d("div",ta,[a("img",{src:i.file.url,alt:""},null,8,aa)])):_("",!0),a("span",{class:W(["payment-copy",{noimg:!i.file}])},[a("span",la,r(i.name),1),i.description?(c(),Le(v,{key:0,blocks:i.description,"content-class":"payment-description"},null,8,["blocks"])):_("",!0),Ye(i)?(c(),d("div",sa,[...e[9]||(e[9]=[a("img",{src:ht,alt:"Google Pay"},null,-1),a("img",{src:Ct,alt:"Apple Pay"},null,-1)])])):_("",!0)],2),oe(i["@id"])==0?(c(),d("span",ia,r(t.$t("Zadarmo")),1)):oe(i["@id"])>0?(c(),d("span",ra,"+"+r(l(p).formatPrice(oe(i["@id"]))),1)):_("",!0)],8,ea)],2))),128))])])]),l(V)?(c(),d("div",na,[O(s),a("div",oa,[a("h3",null,r(t.$t("Zhrnutie objednávky")),1),(c(!0),d(J,null,X(l(V),(i,b)=>(c(),d("div",{key:`op-${b}`,class:"order-product"},[a("div",ua,[O(y,{"order-product":i,alt:i.name,width:72,height:48},null,8,["order-product","alt"]),a("div",null,[a("div",ca,r(l(Oe)(i)),1),O(w,{"order-product":i},null,8,["order-product"])]),i.usedLoyaltyPoints?(c(),d("span",da,[A(r(i.quantity)+" "+r(l(p).getEnumTranslationStringSync("PRODUCT_UNIT",i.product.unit))+" ",1),e[10]||(e[10]=a("br",null,null,-1)),e[11]||(e[11]=A()),a("strong",null,r(l(p).formatPoints(parseInt(i.totalLoyaltyPointsPrice/i.quantity))),1)])):(c(),d("span",va,[A(r(i.quantity)+" "+r(l(p).getEnumTranslationStringSync("PRODUCT_UNIT",i.product.unit)),1),e[12]||(e[12]=a("br",null,null,-1)),e[13]||(e[13]=A()),a("strong",null,r(l(p).formatPrice(i.priceWithTax)),1)]))])]))),128))]),l(pe)?(c(),d("div",pa,[a("div",ma,[a("span",null,r(t.$t("Zľava"))+" - "+r(l(pe)),1),a("div",null," -"+r(l(p).formatPrice(l(De))),1)])])):_("",!0),l(me)?(c(),d("div",fa,[a("div",_a,[a("span",null,r(t.$t("Zľava za body")),1),a("div",null," -"+r(l(p).formatPrice(l(me))),1)])])):_("",!0),l(_e)?(c(),d("div",ya,[l(u)?(c(),d("div",ha,[a("span",null,r(t.$t("Doprava")),1
1),a("strong",null,[A(r(l(g).carrier&&l(g).carrier.name?l(g).carrier.name:"")+" ",1),l(B)||l(D)||l(He)?(c(),d("div",Ca,[l(C)?(c(),d("div",ga,r(l(C).streetAddress)+", "+r(l(C).postalCode)+", "+r(l(C).city),1)):_("",!0)])):_("",!0)]),a("div",null,r(l(p).formatPrice(l(g).carrierPriceWithTax)),1)])):_("",!0),l(P)?(c(),d("div",Pa,[a("span",null,r(t.$t("Platba")),1),a("strong",null,r(l(g).payment&&l(g).payment.name?l(g).payment.name:""),1),a("div",null,r(l(p).formatPrice(l(g).paymentPriceWithTax)),1)])):_("",!0)])):_("",!0),a("div",ka,[a("div",ba,[a("span",null,r(t.$t("Celkom s DPH")),1),a("div",Aa,r(l(p).formatPrice(l(Q))),1)]),a("div",Ea,[a("span",null,r(t.$t("Celkom bez DPH")),1),a("div",Ia,r(l(p).formatPrice(l(H))),1)])]),a("div",$a,[O(o,{to:l(p).getBasketUrl()},{default:we(()=>[A(r(t.$t("Späť do koÅ¡Ãka")),1)]),_:1},8,["to"]),a("div",Ta,[l(ve)?(c(),d("div",Ra,[A(r(t.$t("Dodanie"))+": ",1),a("strong",null,r(l(ve)),1)])):_("",!0),a("button",wa,[A(r(t.$t("PokraÄovaÅ¥ na vaÅ¡e údaje"))+" ",1),e[14]||(e[14]=a("img",{src:mt},null,-1))])])])])):_("",!0)])],32)])])])):_("",!0)])}}};export{Ya as default};
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.