PageSourceSearch

https://static.varus.ua/azgwc-blob-static-varus-prod-01/vsf/dist/0923-v6cf1fb81/common-52a8967d.js

js varus.ua collected 2026-09-24 20:54:25 UTC 23,362 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkvue_storefront=self.webpackChunkvue_storefront||[]).push([[4899],{30225:function(S,v,a){a.d(v,{A:function(){return n}});var c=function(){var r=this,y=r._self._c,u=r._self._setupProxy;return y("BaseCarousel",{attrs:{"arrow-color":r.arrowColor,breakpoints:r.breakpoints,"show-controls":r.showControls,"always-show-before-buttons":r.alwaysShowBeforeButtons},scopedSlots:r._u([{key:"after",fn:function(){return[r.carouselProducts.length?y("div",{directives:[{name:"intersect",rawName:"v-intersect.once",value:{handler:r.onIntersect,cfg:{rootMargin:"0px"}},expression:"{ handler: onIntersect, cfg: { rootMargin: '0px' }}",modifiers:{once:!0}}]}):r._e()]},proxy:!0},{key:"before-buttons",fn:function(){return[r._t("before-buttons")]},proxy:!0}],null,!0)},r._l(r.carouselProducts,function(h,m){return y("SfOProductCard",{key:`${h.id}-${h.sku}-${m}-${r.listId||"pr"}`,attrs:{image:h.image||h.src,title:h.title,"badge-label":"-50%","regular-price":h.price.regular,"special-price":h.price.special,link:r.convertProductLink(h.link),"alt-name":r.makeAlt(h,m),product:h,"wish-list-icon":"heart","link-tag":"router-link","is-new-post":r.isNewPost,"product-quantity":h.quantityText,"show-qty-permanently":r.showQtyPermanently,"is-replacement":r.isReplacement,lazy:r.lazy,"event-list":r.eventList,"item-list-id":r.eventList.item_list_id,"item-list-name":r.eventList.item_list_name},on:{replaceProduct:r.replaceProduct,linkClicked:r.linkClicked}})}),1)},w=[],p=a(85471),d=a(5520),l=a(89615),g=a(49835),C=a(11331),D=a.n(C),P=a(37539),L=a(88481),N=a(70133),T=a(40761),b=a(4990),t=(0,p.pM)({name:"ProductCarousel",components:{BaseCarousel:T.A,SfOProductCard:d.A},directives:{intersect:N.A},props:{listName:{type:String,required:!0},listId:{type:String,required:!0},altCounterOffset:{type:Number,default:0},altName:{type:String,default:""},products:{type:Array,default:()=>[]},esUrlParam:{type:String,default:""},breakpoints:{type:Object,default:()=>({[g.oY-1]:{perView:6},[g.eV-1]:{disableSlider:!0,perView:4},[g.DK-1]:{perView:2.3,disableSlider:!0}})},showQtyPermanently:{type:Boolean,default:!1},arrowColor:{type:String,default:"gray"},isReplacement:{type:Boolean,default:!1},needGtm:{type:Boolean,default:!0},needGtmAds:{type:Boolean,default:!1},showControls:{type:Boolean,default:!0},lazy:{type:Boolean,default:!1},alwaysShowBeforeButtons:{type:Boolean,default:!1}},setup(o,{emit:r}){const{gtmViewItemListHandler:y,gtmProductsHandlerAds:u}=(0,b.u)(),{useState:h}=(0,L.I)(),m=(0,p.EW)(()=>o.products),M=(0,p.EW)(()=>m.value.map(l.fk)),I=h("shipping-module","current"),E=(0,p.EW)(()=>P.Ts.includes(I.value?.method)),A=(0,p.EW)(()=>({item_list_id:o.listId||"",item_list_name:o.listName||""}));return(0,p.sV)(()=>{o.needGtmAds&&u(M.value,"view_item_list_ads")}),{isNewPost:E,carouselProducts:M,eventList:A,makeAlt:(f,k)=>`\u0424\u043E\u0442\u043E ${o.altCounterOffset+k+1} - ${o.altName||f.title}`,onIntersect:f=>{!f.isIntersecting||!o.needGtm||y(M.value,"view_item_list",A.value)},convertProductLink:f=>{const k=f.params?.parentSku,G=f.params?.slug;return D()(f)?`p/${k}/${G}${o.esUrlParam}`:`${f}${o.esUrlParam}`},replaceProduct:f=>{r("replaceProduct",f)},linkClicked:()=>{r("linkClicked")}}}}),e=t,i=a(14486),s=(0,i.A)(e,c,w,!1,null,"8931e190",null),n=s.exports},36788:function(S,v,a){var c=a(95353),w=a(60083);v.A={name:"ShippingShopMixin",data(){return{loading:{general:!0,shops:!0}
1,filter:{isDefault:!1,searchString:"",city:"",schedule:"",cafe:!1,drive:!1},options:{isEnabled:!1},cities:[],shops:[]}},computed:{...(0,c.L8)({getShippingDetails:"shipping/getShippingDetails",getDefaultCity:"shipping-module/getDefaultCity"}),currentCity(){return this.getShippingDetails?.cityDetails||this.getDefaultCity},selectedCity(){return this.cities.find(p=>p.id===this.filter.city)||this.currentCity}},methods:{...(0,c.i0)({loadCityListPure:"shipping-module/loadCityListPure",loadShopListPure:"shipping-module/loadShopListPure"}),async loadShops(p=!1){this.loading.shops=!0;try{this.cities.length||(this.cities=await this.loadCityListPure({storeCode:(0,w.m1)().storeCode}));const d={cityId:this.filter.city,isEnabled:this.options.isEnabled,excludeFields:[]};p?(d.status=!0,d.deliveryMethods=!1):d.uploadToWeb=!0;const{items:l}=await this.loadShopListPure(d);this.shops=l}catch{this.shops=[]}finally{this.loading.shops=!1}},onChangeCity(p){return this.filter.city=p.id,this.loadShops()},setFilters(p){this.filter={...this.filter,...p}}}}},42589:function(S,v,a){a.d(v,{IR:function(){return p},dH:function(){return w},zL:function(){return c}});const c=d=>({type:"FeatureCollection",features:d.map(l=>({type:"Feature",properties:{id:l.ref},geometry:{type:"Point",coordinates:[+l.long,+l.lat]}}))}),w=(d,l)=>({type:"FeatureCollection",features:d.map(g=>({type:"Feature",properties:{id:g.id,type:l},geometry:{type:"Point",coordinates:[+g.long,+g.lat]}}))}),p=d=>({type:"FeatureCollection",features:d.map(l=>({type:"Feature",properties:{id:l.id},geometry:{type:"Point",coordinates:[+l.long,+l.lat]}}))})},62177:function(S,v,a){a.d(v,{A:function(){return b}});var c=a(95353),w=a(51476),p=a.n(w),d=a(38589),l=a(37539),g=a(51688),C=a(92500),D=a(20112),P=a(79665),L=a(93445);const N=(t,e)=>e.keepShop?t:{...t,npType:e.npType,npShop:null},T=(t,e)=>!t||t===e?{npType:e??null,keepShop:!0}:{npType:t,keepShop:!1};var b={name:"ShippingModuleMixin",data(){return{getCityList:[],getShopList:[],lastRequestDate:null,config:l.Ay,pickupGroups:[],availableMethods:[],addressList:[],initialized:!1,loading:{moduleInit:!0,cityChange:!1,saveShipping:!1,delivery:!1,deliveryInput:!1,newPost:!1,newPostInput:!1,userLocate:!1},error:{locateError:!1,shopNotFound:!1,deliveryNotFound:!1,deliveryPointNotFound:!1},buffer:{},bufferNP:{}}},mixins:[L.A],props:{openTab:{type:[String,null],default:()=>null},requestedNpType:{type:[String,null],default:()=>null},initFromDraft:{type:Boolean,default:()=>!1},isDraftMode:{type:Boolean,default:()=>!1},isReorderMode:{type:Boolean,default:()=>!1},reorderShipping:{type:Object,default:()=>null},productToAdd:{type:Object,default:()=>null},availableFilter:{type:[String,null],default:()=>null},page:{type:String,default:()=>"main"}},computed:{...(0,c.L8)({getShippingMethodList:"shipping/getShippingMethods",isDraftValid:"shipping-module/isDraftValid",isCheckoutPage:"checkout/isCheckoutPage"}),...(0,c.aH)({defaultCity:t=>t["shipping-module"].defaultCity,getShopListLoading:t=>t["shipping-module"].loading.shopList,getNpCenter:t=>t["shipping-module"].npCenter,getDeliveryPolygon:t=>t["shipping-module"].deliveryPolygon,getCurrent:t=>t["shipping-module"].current,getDraft:t=>t["shipping-module"].draft,getNpShopList:t=>t["shipping-module"].npShopList,currentRegion:t=>t["shipping-module"].currentRegion,productsInCart:t=>t.cart.cartItems,customerAddressList:t=>t["shipping-module"].addressList}),cityLabel(){return l.XF.includes(this.getDraft.method)?"Your town":"City"},isVarusShipping(){return this.checkVarusShipping(this.getDraft.method)},getShippingModuleLoading(){return this.loading.moduleInit||this.getShopListLoading||this.loading.cityChange},hasMethods(){return{DELIVERY:!0,PICKUP:!0,DELIVERY_NOVA:!0}},getShippingMethods(){return this.getShippingMethodList.sort((t,e)=>t.priority<e.priority?-1:t.priority>e.priority?1:0)},shippingSaveLabel(){return this.isReorderMode?"Continue":"Save shipping"},autocompleteBounds(){if(!this.getDeliveryPolygon.list.length)return(0,d.hf)({north:this.map.center.lat+.1,south:this.map.center.lat-.1,east:this.map.center.lng+.1,west:this.map.center.lng-.1});const t=(0,d.AT)(this.getDeliveryPolygon.list);return(0,d.hf)(t)},totalWeightSummary(){const t=this.productsInCart.reduce((e,i)=>e+(0,g.ki)(i)*i.qty,0);return(0,C.weightGToKg)(t)},isNewPostOverweight(){return this.getDraft.method!==this.config.codes.newPost||!this.getDraft.npShop?!1:this.totalWeightSummary>this.getDraft.npShop.wgh},isCartHasAlcohol(){return!!this.productsInCart.find(t=>t.is_18_plus&&!t.is_tobacco)},getDefaultCity(){const t={...this.defaultCity||{}};return t?.id&&(t.deliveryName=`${t.name} ${this.$t("and moving")}`),t},cityList(){return this.getCityList.map(t=>({...t,deliveryName:`${t.name} ${this.$t("and moving")}`}))}
1,cityShippingList(){return[...this.cityList].filter(t=>t.is_delivery_region)},cityListByType(){return!this.isVarusShipping||this.getDraft.method===this.config.codes.pickup?this.cityList:this.cityShippingList},hasShippingError(){return this.error.locateError||this.error.shopNotFound||this.error.deliveryNotFound||this.error.deliveryPointNotFound}},methods:{...(0,c.i0)({loadCityListPure:"shipping-module/loadCityListPure",loadShopListPure:"shipping-module/loadShopListPure",findCityByName:"shipping-module/findCityByName",loadLocalizedCities:"shipping-module/loadLocalizedCities",loadGeocodeByCoordinate:"shipping-module/loadGeocodeByCoordinate",loadGeoLocateShop:"shipping-module/loadGeoLocateShop",loadCityPolygons:"shipping-module/loadCityPolygons",loadGeocodeByText:"shipping-module/loadGeocodeByText",setDraftCity:"shipping-module/setDraftCity",setDraftMethod:"shipping-module/setDraftMethod",setDraftShop:"shipping-module/setDraftShop",setDraftType:"shipping-module/setDraftType",setDraftTypeGroup:"shipping-module/setDraftTypeGroup",setDraftAddress:"shipping-module/setDraftAddress",saveShipping:"shipping-module/saveShipping",initDraft:"shipping-module/initDraft",loadNewPostCity:"shipping-module/loadNewPostCity",loadNewPostWarehouse:"shipping-module/loadNewPostWarehouse",setNewPostCity:"shipping-module/setNewPostCity",setNewPostShop:"shipping-module/setNewPostShop",setNewPostTypeHandler:"shipping-module/setNewPostType",removeAddress:"shipping-module/removeAddress",singleNewPostCity:"shipping-module/singleNewPostCity",singleNewPostShop:"shipping-module/singleNewPostShop"}),async initShippingModule(){try{let t=null;const e=[],i={...this.isDraftMode&&this.getDraft?.shop?.id||this.initFromDraft?this.getDraft:this.getCurrent},s=T(this.requestedNpType,i?.npType??null);if(this.currentRegion?.id){const u=await this.loadCityListPure({});t=u.find(h=>this.currentRegion?.city_ids?.[0]===h.id),e.push(u)}else e.push(this.loadCityListPure({}));const n=this.getCurrent?.city||t||this.getDefaultCity,o=this.isDraftMode&&this.getDraft.city||n,r=!this.getDraft.city&&!this.currentRegion?.city_ids?.includes(o.id);if(this.openTab&&l.Ts.includes(this.openTab)||r&&this.currentRegion?.name){const u=this.openTab||"DELIVERY_NOVA";await this.setDraftMethod({method:u});const m=(this.currentRegion?.name?await this.autocompleteNewPost({text:this.currentRegion?.name}):[])?.[0];m&&await this.setNewPostCity(m)}else this.openTab?await this.setDraftMethod({method:this.openTab}):this.getCurrent.method?await this.setDraftMethod({method:this.getCurrent.method}):o?.is_delivery_region?await this.setDraftMethod({method:"DELIVERY"}):await this.setDraftMethod({method:"PICKUP"});s.npType&&await this.setNewPostTypeHandler(s.npType),e.push(this.setShippingCity(o),this.loadLocalizedCities()),this.openTab||this.getCurrent?.npCity?.ref&&e.push(this.restoreNovaCity(this.getCurrent?.npCity?.ref,s.npType));const[y]=await Promise.all(e);if(this.getCityList=y,!this.openTab){const u=N(i,s);await this.initDraft(u)}}catch{}finally{this.loading.moduleInit=!1,this.initialized=!0}},async initReorderShippingModule(t=null){try{let e=null,i=[];if(this.currentRegion?.id){const h=await this.loadCityListPure({});e=h.find(m=>this.currentRegion?.city_ids?.[0]===m.id),i.push(h)}else i.push(this.loadCityListPure({}));const s=t?.city||e||this.getDefaultCity,n={city:null,method:null,shop:null,type:null,group:[],address:null,npType:null,npCity:null,npShop:null},o=this.getCurrent?.method===this.config.codes.delivery?this.getCurrent:n,y={...t&&t.method===this.config.codes.delivery?t:o};i=[this.loadCityListPure({}),this.setShippingCity(s),this.loadLocalizedCities()];const[u]=await Promise.all(i);this.getCityList=u,await this.initDraft(y)}catch{}finally{this.loading.moduleInit=!1,this.initialized=!0}},checkVarusShipping(t){return!this.config.newPostMethods.includes(t)},async setShippingCity(t,e=!1){try{this.loading.cityChange=!0,this.clearErrors(),this.addressList=[],await this.setDraftType({type:null}),await this.setDraftAddress({address:null}),await this.setDraftShop({shop:null}),await this.setDraftTypeGroup({group:[]}),await this.setDraftCity({city:t});const[i]=await Promise.all([this.loadShopListPure({cityId:t?.id}),this.loadCityPolygons({tms_id:t?.tms_id})]);
1return this.getShopList=i?.items||[],this.prepareData(),this.hasMethods.PICKUP?this.pickupGroups.length?this.setTypeHandler(this.getDefaultPickupGroup()?.type):void 0:e||this.getDraft.method===this.config.codes.delivery&&this.hasMethods.DELIVERY||this.getDraft.method===this.config.codes.pickup&&this.hasMethods.PICKUP||this.getDraft.method===this.config.codes.newPost?void 0:this.setShippingCity(this.getDefaultCity,!0)}catch(i){P.V.error("Can not set shipping city","shipping-module",{cityId:t?.id,method:this.getDraft?.method,error:i})()}finally{this.loading.cityChange=!1}},async switchShippingMethod(t){if(this.getDraft.method===this.config.codes.newPost)return;const e=await this.findCityByName({name:t?.settlement});if(this.getDraft.city?.tms_id===e?.tms_id)return;const i=this.getCityList.find(s=>s.tms_id===e?.tms_id);i&&await this.setShippingCity(i)},async setShippingMethod(t){this.getDraft.method&&(this.buffer[this.getDraft.method]=JSON.parse(JSON.stringify(this.getDraft)));const e=this.buffer[t];await this.setDraftShop({shop:null}),await this.setDraftType({type:null}),await this.setDraftTypeGroup({group:[]});const i=this.cityShippingList.find(o=>o.id===this.getDraft.city?.id);this.clearErrors(),await this.setDraftMethod({method:t});const s=t===this.config.codes.pickup,n=this.checkVarusShipping(t);if(e&&n)await this.setShippingCity(e?.city);else if(n&&!s&&!i){await this.setShippingCity(this.getDefaultCity);return}if(e&&n)await this.setDraftShop({shop:e?.shop}),await this.setDraftType({type:e?.type}),await this.setDraftTypeGroup({group:e?.group}),await this.setDraftAddress({address:e?.address});else if(e){await this.initDraft({...e,npShop:null}),await this.setNewPostShop(e.npShop);return}this.getCurrent.city?.id!==this.getDraft.city?.id||t!==this.getCurrent?.method||(await this.setDraftShop({shop:e?.shop||this.getCurrent?.shop}),await this.setDraftType({type:e?.type||this.getCurrent?.type}),await this.setDraftTypeGroup({group:e?.group||this.getCurrent?.group}),await this.setDraftAddress({address:e?.address||this.getCurrent?.address}))},prepareData(){const t=this.getShopList.reduce((e,i)=>{const s=i?.delivery_methods?.map(n=>n.key)||[];for(const n of s){const o=this.config.pickupMethods.includes(n);e.availableMethods[n]||(e.availableMethods[n]=!0),!e.pickupGroups[n]&&o?e.pickupGroups[n]=[i]:o&&e.pickupGroups[n].push(i)}return e},{pickupGroups:{},availableMethods:{}});this.pickupGroups=Object.keys(t.pickupGroups).map(e=>({type:e,disabled:!t.pickupGroups[e].length,list:t.pickupGroups[e]})),this.availableMethods=Object.keys(t.availableMethods)},getDefaultPickupGroup(){return this.pickupGroups.find(t=>!t.disabled&&!(this.config.disabled?.varusDrive&&t.type===this.config.codes.varusDrive))||null},setShopHandler(t){return this.setDraftShop({shop:t})},setTypeHandler(t){return this.setDraftType({type:t})},async setShopFromMap(t){if(!t.shopId||!t.type)return;const e=this.getShopList.find(i=>i.id===t.shopId)||null;await this.setDraftShop({shop:e}),await this.setDraftType({type:t.type}),await this.setDraftTypeGroup({group:[]})},async setNpShopFromMap(t){if(!t.ref)return;const e=this.getNpShopList.find(i=>i.ref===t.ref)||null;return this.setNewPostShop(e)},async getDeliveryLocate(t){try{if(!this.checkPointAutocomplete(t))return await this.setDeliveryError(t),null;const e=await this.loadGeoLocateShop({lng:t.coordinates[0],lat:t.coordinates[1],cityId:this.getDraft.city.id});return e||(await this.setDeliveryError(t),null)}catch{return null}},clearErrors(){this.error.locateError=!1,this.error.shopNotFound=!1,this.error.deliveryNotFound=!1,this.error.deliveryPointNotFound=!1},async setAddress(t){return await this.switchShippingMethod(t),this.setDraftAddress({address:t})},setAddressHandler(t){this.clearErrors(),this.setAddress(t)},async applySavedCity(t){return t?.id&&t.id!==this.getDraft.city?.id?this.setShippingCity(t):this.setDraftCity({city:t})},async setFromListDeliveryHandler(t){try{if(!t?.id)return;this.loading.moduleInit=!0;const e=this.getCityList.find(i=>i.id===+t?.extension_attributes?.city_id)||null;await this.applySavedCity(e),await this.setDeliveryCoordinates({lat:t?.extension_attributes?.latitude,lng:t?.extension_attributes?.longitude},!0),await this.setDraftCity({city:e}),await this.doSaveShipping()}catch{}finally{this.loading.moduleInit=!1}},async setFromListPickupHandler(t){try{if(!t?.id)return;this.loading.moduleInit=!0;const e=this.getCityList.find(s=>
1s.id===+t?.extension_attributes?.city_id)||null;await this.applySavedCity(e);const i=this.getShopList.find(s=>s.id===+t?.extension_attributes?.shop_id)||null;await this.setTypeHandler(t?.extension_attributes?.delivery_type),await this.setShopHandler(i),await this.doSaveShipping()}catch{}finally{this.loading.moduleInit=!1}},async setFromListNovaHandler(t){try{if(!t?.id)return;this.loading.moduleInit=!0,this.loading.newPost=!0;const[e,i]=await Promise.all([this.singleNewPostCity({ref:t?.extension_attributes?.np_city_ref}),this.singleNewPostShop({ref:t?.extension_attributes?.np_ref})]);if(!e||(await this.setNewPostCity(e),!i))return;await this.setNewPostType(i.postbox?"poshtomat":"department"),await this.setNewPostShop(i),await this.doSaveShipping()}catch{}finally{this.loading.moduleInit=!1,this.loading.newPost=!1}},async deleteFromListHandler(t){await this.removeAddress(t.id)},async visicomDeliveryRequest(t,e){try{return await this.loadGeocodeByCoordinate({lat:t,lng:e})||null}catch{return null}},async setDeliveryCoordinates(t,e=!1){const i=Date.now();try{this.lastRequestDate=i,this.loading.delivery=!0,await this.setDraftType({type:null}),await this.setDraftShop({shop:null}),await this.setDraftTypeGroup({group:[]});const[s,n]=this.getDraft.address?.coordinates||[];if(n===t.lat&&s===t.lng||!e&&this.getDraft.address?.coordinates?.lat===t.lat&&this.getDraft.address?.coordinates?.lng===t.lng)return;await this.setDraftAddress({address:null});const o=await this.visicomDeliveryRequest(t.lat,t.lng);return o?.label?!e&&this.lastRequestDate!==i?void 0:(await this.switchShippingMethod(o),this.clearErrors(),this.addressList=[],this.setDraftAddress({address:o})):this.setDeliveryError(o,t)}catch{}finally{this.lastRequestDate===i&&(this.loading.delivery=!1)}},setDeliveryError(t=null,e=null){const i=e?`${e.lat}, ${e.lng}`:"";if(t){this.error.deliveryNotFound=!0;const s=this.buildShippingErrorPayload("delivery_not_available");this.gtmAddShippingInfoError({...s,shippingAddress:s.shippingAddress||i})}else{this.error.deliveryPointNotFound=!0;const s=this.buildShippingErrorPayload("address_not_found");this.gtmAddShippingInfoError({...s,shippingAddress:s.shippingAddress||i})}return this.setDraftAddress({address:t})},deliveryMapMove(){this.lastRequestDate=Date.now(),this.loading.delivery=!1},checkPointAutocomplete(t){return this.autocompleteBounds.length?!t.label||!t.coordinates?!1:p()(t.coordinates,this.autocompleteBounds):!0},async loadAddressList({lng:t,lat:e,text:i}){try{this.loading.deliveryInput=!0,this.addressList=await this.loadGeocodeByText({lng:t,lat:e,text:i}).then(s=>s?.filter(this.checkPointAutocomplete)||[])}catch{this.addressList=[]}finally{this.loading.deliveryInput=!1}},async autocompleteNewPost({text:t}){try{return t?(this.loading.newPostInput=!0,await this.loadNewPostCity({q:t})):void 0}finally{this.loading.newPostInput=!1}},async setNovaCity(t){try{this.loading.newPost=!0,await this.setNewPostCity(t)}finally{this.loading.newPost=!1}},async restoreNovaCity(t,e){try{this.loading.newPost=!0,await this.loadNewPostWarehouse({ref:t,npType:e})}finally{this.loading.newPost=!1}},setNovaShop(t){this.setNewPostShop(t)},async setNewPostType(t){try{this.loading.newPost=!0,this.bufferNP[this.getDraft.npType]=JSON.parse(JSON.stringify({npCity:this.getDraft.npCity,npShop:this.getDraft.npShop}));const e=this.bufferNP[t];await this.setNewPostTypeHandler(t),e?.npCity?(await this.setNewPostCity(e.npCity),await this.setNewPostShop(e.npShop)):await this.setNewPostShop(null)}finally{this.loading.newPost=!1}},async saveDeliveryShipping(t){const e=await this.getDeliveryLocate(this.getDraft.address);if(!t||await t(e)){if(!e){this.error.shopNotFound=!0,this.gtmAddShippingInfoError(this.buildShippingErrorPayload("delivery_not_available"));return}await this.setDraftShop({shop:e.shop}),await this.setDraftType({type:e.key}),await this.setDraftTypeGroup({group:e.group}),!this.isReorderMode&&await this.saveBaseShipping()}},async saveDeliveryNova(){try{const t=this.getDraft.npShop,e=await this.loadGeoLocateShop({lng:+t.long,lat:+t.lat,typeDelivery:this.config.codes.newPost.toLowerCase()});if(!e){this.error.shopNotFound=!0,this.gtmAddShippingInfoError(this.buildShippingErrorPayload("delivery_not_available"));return}if(await this.setDraftShop({shop:e.shop}),await this.setDraftType({type:e.key}),await this.setDraftTypeGroup({group:e.group}),this.isReorderMode)return;await this.saveBaseShipping()}catch{}},async saveBaseShipping(){this.isReorderMode||(this.isDraftMode||this.saveShipping({productToAdd:this.productToAdd}).then(()=>{D.A.$emit("set-available-filter",this.availableFilter)}),this.$emit("close",{availableFilter:this.availableFilter}),this.$emit("saved"))},getNovaPostTier(){const t=this.getDraft?.npType==="poshtomat";
1return this.$t(t?"Poshtomat":"Department")},getShippingTier(){const t=this.getDraft?.type;return t?.toUpperCase()===l.Ay.codes.newPost?this.getNovaPostTier():l.Ay.pickupMethods.includes(t)?this.$t(t):this.$t("Apartment/House/Office")},buildShippingErrorPayload(t){const e=this.getDraft?.method,i=e?.toUpperCase()===l.Ay.codes.newPost;return{shippingTier:this.$t(e?.toLowerCase()||""),shippingRegion:i?this.getDraft?.npCity?.Description||"":this.getDraft?.city?.name||"",shippingAddress:i?this.getDraft?.npShop?.Description||this.getDraft?.npCity?.Description||"":this.getDraft?.address?.label||"",errorType:t}},addShippingInfoToGtm(){const t=this.productsInCart,e=this.$t(this.getDraft?.method?.toLowerCase()||""),i=this.getShippingTier(),s=this.getDraft?.value,n=this.getCurrentShipping?.address?"change":"first";this.gtmProductsHandler(t,"add_shipping_info",{},{shipping_tier:e,shipping_tier_two:i,origin:"main",value:s,address_selection_type:n})},async doSaveShipping(){const t=JSON.parse(JSON.stringify(this.getDraft));try{await({[l.Ay.codes.delivery]:this.saveDeliveryShipping,[l.Ay.codes.newPost]:this.saveDeliveryNova}[this.getDraft.method]||this.saveBaseShipping)(),this.isCheckoutPage||this.addShippingInfoToGtm(),D.A.$emit("shipping-saved",t),this.isReorderMode&&!this.hasShippingError&&(this.$bus.$emit("close-shipping-modal",this.getDraft),this.emit("close"))}catch{}},requestGeolocation(){try{if(this.loading.userLocate)return;this.loading.userLocate=!0;const t=async i=>{try{const s={lat:i.coords.latitude,lng:i.coords.longitude};await this.setDeliveryCoordinates(s)}catch{}finally{this.loading.userLocate=!1}},e=()=>{this.error.locateError=!0,this.loading.userLocate=!1};navigator.geolocation.getCurrentPosition(t,e)}catch{}}}}}}]);

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.