1"use strict";(self.webpackChunkklarka=self.webpackChunkklarka||[]).push([[6141],{9800:(t,i,e)=>{e.d(i,{default:()=>r});var n=e(3007),o=e(633);function a(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}var r=function(){var t;function i(){var t,e,n=this;if(!(this instanceof i))throw TypeError("Cannot call a class as a function");a(this,"notificationBar",void 0),a(this,"categoryId",void 0),a(this,"tagIds",void 0),this.notificationBar=document.querySelector(".js-notification-bar");var r=null==(t=this.notificationBar)?void 0:t.getAttribute("data-category-id");if(this.categoryId=r?Number(r):null,this.categoryId){this.tagIds=((null==(e=this.notificationBar)?void 0:e.getAttribute("data-tag-ids"))||"").split(",").filter(Boolean).map(Number);var c=this.tagIds.map(function(t){return"tagIds[]=".concat(t)}).join("&");(0,o.x6)("/call/category-notification/status?categoryId=".concat(this.categoryId,"&").concat(c)).then(function(t){if(t.alreadyTracked){var i;null==(i=n.notificationBar)||i.remove()}else{if(!n.notificationBar)return;n.initVisibilityObserver(),n.initCloseButton(),n.initSubscribeButton()}}).catch(function(t){console.error("NotificationBar: failed to fetch status",t)})}}return t=[{key:"hideNotificationBar",value:function(){var t,e,n=this;i.onScroll&&(document.removeEventListener("scroll",i.onScroll),i.onScroll=null),null==(t=this.notificationBar)||t.addEventListener("transitionend",function(){var t;return null==(t=n.notificationBar)?void 0:t.remove()},{once:!0}),null==(e=this.notificationBar)||e.classList.remove("notification-sticky-bar--visible"),document.querySelectorAll(".js-notification-bar-subscribe").forEach(function(t){t.classList.add("u-hide")})}},{key:"initCloseButton",value:function(){var t=this;n.Y.addSelectorClickObserver({selector:".js-notification-bar-close",action:function(i){i.preventDefault(),t.hideNotificationBar(),window.glamiGtag.gtag4({event:"track_price_drop",interactions_specific_data:"Category",interaction_item:"sticky_bar_track_price_drop",interaction_type:"close"})}})}},{key:"initVisibilityObserver",value:function(){var t=this,e=!1,n=function(){var i,n=document.documentElement.scrollHeight-window.innerHeight,o=(n>0?window.scrollY/n:0)>=.01;null==(i=t.notificationBar)||i.classList.toggle("notification-sticky-bar--visible",o),!e&&o&&(window.glamiGtag.gtag4({event:"track_price_drop",interactions_specific_data:"Category",interaction_item:"sticky_bar_track_price_drop",interaction_type:"show"}),e=!0)};i.onScroll=n,document.addEventListener("scroll",n,{passive:!0}),n()}},{key:"initSubscribeButton",value:function(){var t=this;document.querySelectorAll(".js-notification-bar-subscribe").forEach(function(t){t.classList.remove("u-hide")}),n.Y.addSelectorClickObserver({selector:".js-notification-bar-subscribe",action:function(){window.NotificationPopupInvoker("categoryNotification",null,null,null,function(){t.hideNotificationBar(),window.glamiGtag.gtag4({event:"track_price_drop",interactions_specific_data:"Category",interaction_item:"modal_track_price_drop",interaction_type:"subscribe"}),window.dispatchEvent(new Event("modal:closeUpper!"))},null,null,window.GLAMI.settings.isUserLogged,t.categoryId,t.tagIds),window.glamiGtag.gtag4({event:"track_price_drop",interactions_specific_data:"Category",interaction_item:"sticky_bar_track_price_drop",interaction_type:"click"})}})}}],function(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(i.prototype,t),i}();a(r,"onScroll",null)}}]);
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.