PageSourceSearch

https://www.papier-hartmann.de/themes/docs2018/chunks/br-shop-price-tag.0339ee5ea6457f4d.js

js papier-hartmann.de collected 2026-10-04 00:55:07 UTC 6,960 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3784],{18551:(t,e,i)=>{i.r(e),i.d(e,{default:()=>c});var o=i(92891);const n={name:"br-shop-price-tag",data:function(){return{countDown:null,countDownLabel:null,timer:null,defaultLabels:{}}},watch:{countDown:function(t){if((!this.showValidation||!t||t<=0)&&this.timer)return this.countDownLabel=null,void clearTimeout(this.timer);var e=Math.floor(t/864e5),i=Math.floor(t%864e5/36e5),o=Math.floor(t%36e5/6e4),n=Math.floor(t%6e4/1e3),c="";this.compIsSmall?c+=" ":c+="<br>",c+=this.timerLabel+" ",e>0&&(c+=e,c+=e>1?" Tage":" Tag",c+=", "),i>0&&(c+=i,c+=" Std.",c+=" "),o>0&&(c+=o,c+=" Min.",c+=" "),n>=0&&(c+=n,c+=" Sec."),this.countDownLabel=c},countDownTo:function(t){this.timer&&(this.countDownLabel=null,clearTimeout(this.timer)),this.createTimer(t)}},props:{priceType:{type:[Array,Object],default:null},price:{type:Object,default:null},sellingPriceCollection:{type:[Array,Object],default:null},isSmall:{type:Boolean,default:!1}},computed:{compIsSmall:function(){return this.isSmall},compPriceType:function(){return this.priceType},compPrice:function(){return this.price},compSellingPriceCollection:function(){return this.sellingPriceCollection},compLabel:function(){var t="";return this.showLabel&&this.label&&this.label.length&&(t+=this.label),this.showDiscountPercent&&this.diffPercentDisplay&&(t&&t.length&&(t+=" "),t+="<strong>"+this.diffPercentDisplay+"</strong>"),this.showValidation&&!this.showTimer&&this.validTo&&this.validTo.length&&(t&&t.length&&(this.compIsSmall?t+=" ":t+="<br>"),t+=this.validationLabel+" ",t+=this.validTo),t},quantityLowerBound:function(){return this.compPrice&&void 0!==this.compPrice.quantity_lower_bound?this.compPrice.quantity_lower_bound:null},netPrice:function(){return this.compPrice&&void 0!==this.compPrice.net_price?this.compPrice.net_price:null},evk:function(){if(!this.compSellingPriceCollection||!this.quantityLowerBound)return null;var t=(0,o.find)(this.compSellingPriceCollection,{quantity_lower_bound:this.quantityLowerBound});return t||(1===this.compSellingPriceCollection.length?this.compSellingPriceCollection[0]:null)},evkNet:function(){return this.evk&&this.evk.net_price&&this.netPrice?this.evk.net_price:null},diffPrice:function(){return this.netPrice&&this.evkNet&&this.evkNet>this.netPrice?(this.evkNet-this.netPrice).toFixed(2):null},diffPercent:function(){var t=null;return this.netPrice&&this.diffPrice&&(t=Math.round(100-100*this.netPrice/this.evkNet).toFixed(2))>0?t:null},diffPercentDisplay:function(){return this.diffPercent?new Intl.NumberFormat("de-DE",{style:"decimal",currency:"EUR"}).format(this.diffPercent)+"% "+this.discountLabel:null},validTo:function(){if(!this.compPrice||!this.compPrice.valid_to)return null;if("2038-01-01 00:00:00"!==this.compPrice.valid_to){return new Date(this.compPrice.valid_to).toLocaleDateString("de-De",{year:"numeric",month:"long",day:"numeric",hour:"numeric"})}return null},countDownTo:function(){return this.showTimer&&this.compPrice&&this.compPrice.valid_to&&"2038-01-01 00:00:00"!==this.compPrice.valid_to?new Date(this.compPrice.valid_to).getTime():null},label:function(){return this.compPriceType&&this.compPriceType.display_label?this.compPriceType.display_label:null},bgColor:function(){return this.compPriceType&&this.compPriceType.display_label_color?this.compPriceType.display_label_color:null},textColor:function(){return this.compPriceType&&this.compPriceType.display_label_text_color?this.compPriceType.display_label_text_color:null},posX:function(){return this.compPriceType&&this.compPriceType.display_label_position_x?this.compPriceType.display_label_position_x:null},posY:function(){return this.compPriceType&&this.compPriceType.display_label_position_y?this.compPriceType.display_label_position_y:null},discountLabel:function(){return this.compPriceType&&this.compPriceType.discount_label?this.compPriceType.discount_label:"Ersparnis"},timerLabel:function(){return this.compPriceType&&this.compPriceType.timer_label?this.compPriceType.timer_label:"noch"},validationLabel:function(){return this.compPriceType&&this.compPriceType.validation_label?this.compPriceType.validation_label:"noch"},displayTag:function(){return!!(this.compLabel&&this.compLabel.length&&(this.showLabel||this.showDiscountPercent||this.showValidation||this.showTimer))},showLabel:function(){return!(!this.compPriceType||void 0===this.compPriceType.show_label)&&this.compPriceType.show_label},showEvkComparativePrice:function(){return!(!this.compPriceType||void 0===this.compPriceType.show_evk_comparative_price)&&this.compPriceType.show_evk_comparative_price},showDiscountPercent:function(){return!(!this.compPriceType||void 0===this.compPriceType.show_discount_percent)&&this.compPriceType.show_discount_percent},showValidation:function(){return!(!this.compPriceType||void 0===this.compPriceType.show_validation)&&this.compPriceType.show_validation},showTimer:function(){return!(!this.compPriceType||void 0===this.compPriceType.show_timer)&&this.compPriceType.show_timer},classes:function(){var t={"br-shop-price-tag":!0,relative:!0,"pin-l":!0,"pin-t":!0,"pin-r":!0,"z-40":!0,flex:!0,"flex-no-wrap":!1,"justify-start":this.compIsSmall||"left"===this.posX,"justify-end":!(this.compIsSmall||this.posX&&"right"!==this.posX),"justify-center":!this.compIsSmall&&"center"===this.posX};return t},labelClasses:function(){return{relative:!0,"w-full":!this.compIsSmall&&"center"===this.posX,"text-center":!this.compIsSmall&&"center"===this.posX,"text-left":this.compIsSmall||!this.posX||"left"===this.posX,"text-right":!this.compIsSmall&&"right"===this.posX,"text-sm":!this.compIsSmall,"text-xs":this.compIsSmall,"font-bold":!1,"px-2":!0,"py-1":!0,"rounded-tl-lg":!(this.compIsSmall||this.posX&&"left"!==this.posX&&"center"!==this.posX),"rounded-tr-lg":!this.compIsSmall&&("right"===this.posX||"center"===this.posX),"rounded-br-lg":!this.compIsSmall&&"left"===this.posX,"rounded-bl-lg":!this.compIsSmall&&"right"===this.posX,"mt-2":this.compIsSmall}},styles:function(){var t={backgroundColor:this.bgColor,color:this.textColor};return t}},methods:{prepareComponent:function(){},countDownTimer:function(){var t=this;this.showTimer&&this.countDownTo&&this.countDown>0&&(this.timer=setTimeout((function(){var e=(new Date).getTime(),i=t.countDownTo-e;t.countDown=i,t.countDown>0&&t.countDownTimer()}),1e3))},createTimer:function(t){if(this.showTimer&&t){var e=t-(new Date).getTime();e>0&&(this.countDown=e),this.countDownTimer()}}},created:function(){this.createTimer(this.countDownTo)}};const c=(0,i(51900).Z)(n,(function(){var t=this,e=t._self._c;return t.displayTag?e("div",{class:t.classes},[e("div",{class:t.labelClasses,style:t.styles},[t.compLabel&&t.compLabel.length?e("span",{domProps:{innerHTML:t._s(t.compLabel)}}):t._e(),t._v(" "),t.timer&&t.countDown>0&&t.countDownLabel&&t.countDownLabel.length?e("span",{domProps:{innerHTML:t._s(t.countDownLabel)}}):t._e()])]):t._e()}),[],!1,null,null,null).exports}}]);

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.