PageSourceSearch

https://cdn.4camping.hu/assets/cache/js.4camping.cz.asgard.ga4.f5667d2bd1c73a7e2d1c.js

js 4camping.hu collected 2026-09-29 20:43:14 UTC 10,516 bytes, 1 lines download raw bytes

1ns("Shopio.VisibleElements"),Shopio.VisibleElements=function(){this.eventTarget=null,this.customUpdateEvent="shopio.visibleElements",this.settings=null,this.visibleElementStore=[],this.currentVisibleElementsTemporaryStore=[],this.debouncedTriggerTimeout=null,this.debounceTriggerTime=500,this.observers={intersection:{config:{rootMargin:"0px",threshold:.9}},mutation:{config:{childList:!0,subtree:!0}}}},Shopio.VisibleElements.prototype.triggerVisible=function(e){var t=this;this.visibleElementStore.indexOf(e)>-1||(this.visibleElementStore.push(e),this.currentVisibleElementsTemporaryStore.push(e),clearTimeout(this.debouncedTriggerTimeout),this.debouncedTriggerTimeout=setTimeout(function(){t.eventTarget.trigger({type:t.customUpdateEvent+"."+t.settings.eventNamespace,elements:t.currentVisibleElementsTemporaryStore}),t.currentVisibleElementsTemporaryStore=[]},this.debounceTriggerTime))},Shopio.VisibleElements.prototype.registerIntersectionObserver=function(){var e=this;if(!1 in window)return e.visibleElementsStore=$(e.settings.elements).toArray(),void $.each(e.visibleElementsStore,function(){e.triggerVisible(this)});e.intersectionObserver=new IntersectionObserver(function(t,i){t.forEach(function(t){t.isIntersecting&&(e.triggerVisible(t.target),i.unobserve(t.target))},e)},e.observers.intersection.config),document.querySelectorAll(e.settings.elements).forEach(function(t){e.intersectionObserver.observe(t)})},Shopio.VisibleElements.prototype.registerMutationObserver=function(){var e=this,t=this.observers.mutation.config,i=new MutationObserver(function(t,i){t.forEach(function(t){"childList"===t.type&&document.querySelectorAll(e.settings.elements).forEach(function(t){e.intersectionObserver.observe(t)})})});this.settings.mutationObserver.container.forEach(function(e){var o=document.querySelector(e);o&&i.observe(o,t)})},Shopio.VisibleElements.prototype.init=function(e){this.eventTarget=e.eventTarget,this.settings=e.settings,this.settings&&this.settings.eventNamespace&&(this.settings.debounceTriggerTime&&(this.debounceTriggerTime=this.settings.debounceTriggerTime),this.settings.intersectionObserver&&(this.observers.intersection.config=this.settings.intersectionObserver),this.settings.mutationObserver&&this.settings.mutationObserver.config&&(this.observers.mutation.config=this.settings.mutationObserver.config),this.settings.mutationObserver.container.length&&this.registerMutationObserver(),this.registerIntersectionObserver())},$.fn.visibleElements=function(e){var t=$.extend({intersectionObserver:null,mutationObserver:{container:[],config:null},elements:null},e);return this.each(function(){(new Shopio.VisibleElements).init({eventTarget:$(this),settings:t})})},ns("Shopio.GoogleAnalytics4"),Shopio.GoogleAnalytics4={lastProductDetailVariantId:null,trackedProductsListIds:new Set,trackedBannersListIds:new Set,viewedProductsElements:new Map,getGtmProductData:function(e){let t={item_id:e.id||null,item_name:e.name||null,index:void 0!==e.positionInList&&null!==e.positionInList?e.positionInList-1:null,item_list_id:e.listName||null,item_list_name:e.listName||null,price:e.unitPriceWithoutVat||null,quantity:void 0!==e.quantity?e.quantity:1,item_brand:e.producerName||null};if(null!==e.variantName&&(t.item_variant=e.variantName),e.discount>0&&(t.discount=e.discount),null!==e.voucherName&&(t.coupon=e.voucherName),"object"==typeof e.gtm)for(let i in e.gtm)e.gtm.hasOwnProperty(i)&&(t[i]=e.gtm[i]);return t},getGtmBannerData:function(e){let t={promotion_id:null!==e.gtmId?e.gtmId:e.targetUrl,promotion_name:e.targetUrl,creative_slot:e.type,creative_name:e.name,index:e.position-1};if("object"==typeof e.gtm)for(let i in e.gtm)e.gtm.hasOwnProperty(i)&&(t[i]=e.gtm[i]);return t},pushViewedProducts:function(){let e,t=[],i=[],o=!1;Shopio.GoogleAnalytics4.viewedProductsElements.forEach(function(e,o){Shopio.GoogleAnalytics4.trackedProductsListIds.has(o)||(t.push(e),i.push(o))}),0!==t.length&&(t.length>20&&(t=t.slice(0,20),i=i.slice(0,20),o=!0),e={event:"view_item_list",ecommerce:{currency:data.currency.toUpperCase(),items:[]}},t.forEach(function(t,o){let n=i[o];e.ecommerce.items.push(Shopio.GoogleAnalytics4.getGtmProductData($(t).data("product"))),Shopio.GoogleAnalytics4.trackedProductsListIds.add(n),Shopio.GoogleAnalytics4.viewedProductsElements.set(n,null)}),Shopio.GTM.push({ecommerce:null}),Shopio.GTM.push(e),o&&setTimeout(Shopio.GoogleAnalytics4.pushViewedProducts,500))},init:function(){Shopio.EventHandlers.onProductClick.push(function(e){let t=$.Deferred(),i=$(e.target).closest("[data-product]"),o=i.data("product"),n=i.parent().children("[data-product]").index(i),s=Shopio.GoogleAnalytics4.getGtmProductData(o),a={event:"select_item",ecommerce:{items:[s]}};return!s.index&&n>=0&&(s.index=n),Shopio.GTM.push({ecommerce:null}),Shopio.GTM.push(a).done(function(){Cookies.set("product-list-"+o.productId,o.listName,{sameSite:"Lax"}),t.resolve()}),t.promise()}),Shopio.EventHandlers.onBannerClick.push(function(e){let t,i,o,n=$.Deferred();return t=$(e.target).closest("[data-banner]").data("banner"),t.isClickTrackingAllowed?(i=Shopio.GoogleAnalytics4.getGtmBannerData(t),o={event:"select_promotion",ecommerce:{items:[i]}},Shopio.GTM.push({ecommerce:null}),Shopio.GTM.push(o).done(()=>{n.resolve()})):n.resolve(),n.promise()}),Shopio.EventHandlers.afterAddToCart.push(function(e){let t,i,o,n=$(e.target),s=n.closest("[data-product]").data("product"),a=Shopio.GoogleAnalytics4.getGtmProductData(s),r=W3W.Util.objectHas(Shopio,"Variants.selectedVariantId")&&Shopio.Variants.selectedVariantId||null;t=e.data&&e.data.quantity?Number(e.data.quantity):Number(n.find('[name="quantity"]').val()),(Number.isNaN(t)||t<1)&&(t=1),a.quantity=t,r&&data.variantsInfo&&data.variantsInfo[r]&&(i=data.variantsInfo[r],a.item_id=s.productId+"-"+r,a.item_variant=i.name,a.price=Number(Number(i.priceWithoutVat).toFixed(2))),o={event:"add_to_cart",ecommerce:{currency:data.currency.toUpperCase(),value:a.price*a.quantity,items:[a]}};let c=e.processResponse||null,l=c&&c.analytics||null;return null!==c&&c.success&&(o.cartSnapshot=[],l.products.forEac
1h(e=>{o.cartSnapshot.push({id:e.productId+(null!==e.variantId?"-"+e.variantId:""),name:e.name,quantity:e.quantity,imageUrl:e.photoFile,detailUrl:location.origin+e.url,priceVat:e.unitPriceWithVat})})),Shopio.GTM.push({ecommerce:null}),Shopio.GTM.push(o)}),Shopio.EventHandlers.afterRemoveFromCart.push(e=>{let t,i=$(e.target).closest("[data-product]").data("product"),o=Shopio.GoogleAnalytics4.getGtmProductData(i);return null!==i.variantId&&(o.item_id=i.productId+"-"+i.variantId),t={event:"remove_from_cart",ecommerce:{currency:data.currency.toUpperCase(),value:o.price*o.quantity,items:[o]}},Shopio.GTM.push({ecommerce:null}),Shopio.GTM.push(t)});let e=$(document);e.on("variantChanged.shopio.variants",function(e,t){if(t&&data.variantsInfo&&data.variantsInfo[t]){if(Shopio.GoogleAnalytics4.lastProductDetailVariantId===t)return;Shopio.GoogleAnalytics4.lastProductDetailVariantId=t;let e,i=$("#formProductAddToBasket").filter("[data-product]").data("product"),o=data.variantsInfo[t],n=Shopio.GoogleAnalytics4.getGtmProductData(i);n.item_id=i.productId+"-"+t,n.item_variant=o.name,n.price=Number(Number(o.priceWithoutVat).toFixed(2)),n.quantity=1,null!==o.voucher&&o.voucher.n
1ame?n.coupon=o.voucher.name:data.coupon&&(n.coupon=data.coupon),e={event:"view_item",ecommerce:{currency:data.currency.toUpperCase(),value:n.price*n.quantity,items:[n]}},Shopio.GTM.push({ecommerce:null}),Shopio.GTM.push(e)}}),e.on("shopio.visibleElements.visibleProducts",function(e){e.elements.forEach(function(e){let t=$(e).data("product");t.hasOwnProperty("autoPushToImpressions")&&!t.autoPushToImpressions||Shopio.GoogleAnalytics4.viewedProductsElements.set(t.listName+"-"+t.id,e)}),setTimeout(Shopio.GoogleAnalytics4.pushViewedProducts,500)}).visibleElements({eventNamespace:"visibleProducts",elements:"[data-product]",intersectionObserver:{rootMargin:"0px",threshold:.4},mutationObserver:{container:[".products-list","[data-dynamic-products-list]"]},debounceTriggerTime:50}),e.on("shopio.visibleElements.visibleBanner",function(e){e.elements.forEach(function(e){let t,i,o=$(e).data("banner");o.hasOwnProperty("autoPushToImpressions")&&!o.autoPushToImpressions||(t={event:"view_promotion",ecommerce:{items:[Shopio.GoogleAnalytics4.getGtmBannerData(o)]}},i=()=>{Shopio.GoogleAnalytics4.trackedBannersListIds.add(o.id),Shopio.GTM.push({ecommerce:null}),Shopio.GTM.push(t)},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",i,{once:!0}):i())})}).visibleElements({eventNamespace:"visibleBanner",elements:"[data-banner]",mutationObserver:{container:["[data-dynamic-banner-list]"]},debounceTriggerTime:50})}},Shopio.GoogleAnalytics4.init(),ns("Shopio.GoogleAnalytics4"),Shopio.GoogleAnalytics4.getItemsFromBasketData=()=>data.analyticsBasket&&data.analyticsBasket.products?data.analyticsBasket.products.map(e=>Shopio.GoogleAnalytics4.getGtmProductData(e)):null,Shopio.GoogleAnalytics4.initCustom=()=>{let e=$(document);e.on("selectShipping.shopio.shipping",function(e,t){let i,o=Shopio.GoogleAnalytics4.getItemsFromBasketData()||[];i={event:"add_shipping_info",ecommerce:{currency:data.currency.toUpperCase(),shipping_tier:t.type,shipping_tier_local:t.name}},data.analyticsBasket&&(i.ecommerce.value=data.analyticsBasket.priceWithoutShippingAndPaymentWithoutVat,i.ecommerce.items=o),Shopio.GTM.push({ecommerce:null}),Shopio.GTM.push(i)}),e.on("selectPayment.shopio.payment",(e,t)=>{let i,o=Shopio.GoogleAnalytics4.getItemsFromBasketData()||[];i={event:"add_payment_info",ecommerce:{currency:data.currency.toUpperCase(),payment_type:t.type,payment_type_local:t.name}},data.analyticsBasket&&(i.ecommerce.value=data.analyticsBasket.priceWithoutShippingAndPaymentWithoutVat,i.ecommerce.items=o),Shopio.GTM.push({ecommerce:null}),Shopio.GTM.push(i)}),e.on("addedProduct.shopio.comparing",(e,t)=>{let i,o=t.closest("[data-product]").data("product");o&&(i={event:"add_to_compare",ecommerce:{items:[Shopio.GoogleAnalytics4.getGtmProductData(o)]}},Shopio.GTM.push({ecommerce:null}),Shopio.GTM.push(i))}),$("#navigation").on("click","a[data-menu-item], button[data-menu-item]",function(e){let t,i=$(this),o=i.closest(".js-main-item").children("a[data-menu-item]"),n=i.data("menuItem"),s=o.data("menuItem");return t=Shopio.GTM.push({event:"mega_menu_click",main_menu_item:s?s.name:null,click_category:n.type,click_url:i.attr("href"),click_text:n.name}),i.is("a")&&t.done(()=>{Shopio.EventHandlers.handleRedirect(e)}),!1})},Shopio.GoogleAnalytics4.initCustom();

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.