1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[72343],{343(e,i,t){t.r(i),t.d(i,{default:()=>c});var r=t(634);let s=window.PluginBaseClass;class c extends s{static #e=this.options={quantitySelector:".product-detail-quantity-select, .product-detail-quantity-input, .product-detail-form-container .quantity-selector-group-input",priceSelector:".mabp-current-price-value",priceWrapperSelector:"div:not(.maxia-variants-table-cheapest-price) .product-detail-price",referencePriceSelector:".mabp-referenceprice",hasListPriceClass:"with-list-price",buyContainerSelector:'[class^="product-detail-buy"], .swag-cms-extensions-quickview-content-right, .cms-element-acris-product-price-container, .cms-element-acris-product-quant-buy-container',listPriceBadgeSelector:".list-price-badge",listPriceWrapperSelector:".product-detail-list-price-wrapper",listPricePercentageSelector:".list-price-percentage",regulationPriceWrapperSelector:".product-detail-list-price-wrapper.regulation-price-wrapper",regulationPriceNumberSelector:".regulation-price",dataSelector:".mabp-price-data",currencyConfig:null,price:1,listPrice:null,star:"",listPricePercentageSnippet:"(%price%% saved)",regulationPriceSnippet:"previously %price%"};init(){this.buyContainer=this.el.closest(this.options.buyContainerSelector),this.buyContainer||(this.buyContainer=document.querySelector(this.options.buyContainerSelector)),this.data=this.buyContainer.querySelector(this.options.dataSelector),this.priceElement=this.el.querySelector(this.options.priceSelector),this.priceWrapper=this.el.querySelector(this.options.priceWrapperSelector),this.listPriceBadge=this.el.querySelector(this.options.listPriceBadgeSelector),this.listPriceWrapper=this.el.querySelector(this.options.listPriceWrapperSelector),this.listPricePrice=this.listPriceWrapper.querySelector("span"),this.listPricePercentage=this.listPriceWrapper.querySelector(this.options.listPricePercentageSelector),this.referencePriceElement=this.el.querySelector(this.options.referencePriceSelector),this.regulationPriceWrapper=this.el.querySelector(this.options.regulationPriceWrapperSelector),this.regulationPriceNumber=this.regulationPriceWrapper.querySelector(this.options.regulationPriceNumberSelector),null===this.options.currencyConfig&&window.maxiaAdvBlockPrices&&void 0!==window.maxiaAdvBlockPrices.currencyConfig&&(this.options.currencyConfig=window.maxiaAdvBlockPrices.currencyConfig),this.price=this.options.price,this.listPrice=this.options.listPrice,this._registerEvents()}_registerEvents(){window.PluginManager.getPluginInstanceFromElement(this.data,"MabpPriceChangeListener").$emitter.subscribe("onPriceChange",this._onPriceChange.bind(this))}_onPriceChange(e){let i=e.detail.group;this.price=i.price,this.listPrice=i.listPrice,this.regulationPrice=i.regulationPrice,this.referencePrice=i.referencePrice,this._updatePrice()}_updatePrice(){if(this.priceElement.innerHTML=(0,r.A)(this.price,this.options.currencyConfig),this.listPrice>0){this.priceWrapper.classList.add(this.options.hasListPriceClass),this.listPricePrice.innerHTML=(0,r.A)(this.listPrice,this.options.currencyConfig)+this.options.star;let e=this._calculateListPriceSavingsPercent();this.listPricePercentage.innerHTML=this.options.listPricePercentageSnippet.replace("%price%",e),this.listPriceBadge.removeAttribute("style"),this.listPricePercentage.removeAttribute("style"),this.listPricePrice.removeAttribute("style"),this.listPriceWrapper.removeAttribute("style")}else this.listPriceBadge.style.display="none",this.listPricePercentage.style.display="none",this.listPricePrice.style.display="none",this.listPriceWrapper.style.display="none",this.priceWrapper.classList.remove(this.options.hasListPriceClass);if(this.referencePriceElement&&this.referencePrice>0&&(this.referencePriceElement.innerHTML=(0,r.A)(this.referencePrice,this.options.currencyConfig)),this.regulationPrice>0){let e=(0,r.A)(this.regulationPrice,this.options.currencyConfig);this.regulationPriceNumber.innerHTML=this.options.regulationPriceSnippet.replace("%price%",e+" "+this.options.star),this.regulationPriceWrapper.removeAttribute("style")}else this.regulationPriceWrapper.style.display="none";this.$emitter.publish("onUpdate",{price:this.price})}_calculateListPriceSavingsPercent(){return Number((this.listPrice-this.price)*100/this.listPrice).toLocaleStr
1ing(this.options.currencyConfig.locale,{maximumFractionDigits:2})}}}}]);
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.