PageSourceSearch

https://calc-js.signs.com/price-calc-default-min.js?v=1789092699276

js signs.com collected 2026-09-24 19:31:46 UTC 9,436 bytes, 1 lines download raw bytes

1"use strict";(this.webpackJsonpSharedCalc=this.webpackJsonpSharedCalc||[]).push([[5028],{5137:function(e,i,t){t.r(i),t.d(i,{PriceCalc:function(){return l}});var n=t(659),r=t(3760),a=t(5337),c=function(e,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,i)},o=function(e){var i="function"==typeof Symbol&&Symbol.iterator,t=i&&e[i],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},l=function(){function e(e,i){var t=this;this.templateConfigHelper=e,this.calcDOMHelper=i,this.qty=0,this.setData=function(e,i){t.attributeId=e,t.data=i},this.init=function(){t.mainElementRef.addEventListener("calc.priceChange",function(e){var i,n,r,a,c,l=e.detail,s=t.mainElementRef.querySelectorAll(".calc-price"),d=t.mainElementRef.querySelectorAll(".calc-price-per-piece"),u=t.mainElementRef.querySelector(".per-piece-label"),p=l.price;if(t.priceDisplayConfig.account_type_code_checking&&"LFP"==l.account_type_code&&(p=l.unit_price,t.priceDisplayConfig.show_unit_price=!1),!t.priceDisplayConfig.hide_subtotal_price&&s.length){var f=Number(1*p).toFixed(2).toLocaleString();(null===(c=t.priceDisplayConfig)||void 0===c?void 0:c.show_price_with_commas)&&(f=(1*p).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}));try{for(var m=o(s),y=m.next();!y.done;y=m.next()){var h=y.value;h.innerHTML="$"+f,h.classList.add("subtotal-price"),h.setAttribute("aria-label","$"+f+".")}}catch(e){i={error:e}}finally{try{y&&!y.done&&(n=m.return)&&n.call(m)}finally{if(i)throw i.error}}}var v=l.order_specs.find(function(e){return"NOOFROLL"===e.order_spec_code||"ROWS_IMPO"===e.order_spec_code}),_=l.qty;if(l.no_groups?_=l.no_groups:l.no_pads&&(_=l.no_pads),t.priceDisplayConfig.show_unit_price&&d.length){var g=1*l.price/_;try{for(var L=o(d),b=L.next();!b.done;b=L.next()){var q=b.value;switch(t.priceDisplayConfig.type){case"default":q.innerHTML='( <span data-qaid="originalUnitPrice">$'+(1*l.unit_price).toFixed(2)+"</span> for each)";break;case"v2":q.innerHTML='<span data-qaid="originalUnitPrice">$'+(1*l.unit_price).toFixed(2)+"</span> each";break;case"v3":q.innerHTML="$"+g.toFixed(2),v&&u&&(u.innerText="roll");break;case"v4":t.priceDisplayConfig.show_unit_price_multiple_qty?(t.qty=l.qty,q.innerHTML=t.getPricePerPieceContent(l)):q.innerHTML='Only <span class="span-inline" data-qaid="originalUnitPrice">$'+(1*l.unit_price).toFixed(2)+"</span> each"}}}catch(e){r={error:e}}finally{try{b&&!b.done&&(a=L.return)&&a.call(L)}finally{if(r)throw r.error}}}var S=t.mainElementRef.querySelector(".calc-quantity");S&&(S.innerHTML=Number(_).toLocaleString())}),t.mainElementRef.addEventListener("calc.validationPassed",function(e){var i,n,r,a,c,l;if("v2"==t.priceDisplayConfig.type){var s=t.mainElementRef.querySelectorAll(".calc-price-per-piece"),d=t.mainElementRef.querySelectorAll(".calc-price"),u=t.mainElementRef.querySelectorAll(".discounted-price"),p=t.mainElementRef.querySelector("#subtotal_container"),f=t.mainElementRef.querySelector("#unit_price_container"),m=t.mainElementRef.querySelector("#compute_price_loader");if(0==e.detail){if(t.priceDisplayConfig.show_unit_price&&s.length)try{for(var y=o(s),h=y.next();!h.done;h=y.next())h.value.innerHTML="--"}catch(e){i={error:e}}finally{try{h&&!h.done&&(n=y.return)&&n.call(y)}finally{if(i)throw i.error}}if(!t.priceDisplayConfig.hide_subtotal_price&&d.length)try{for(var v=o(d),_=v.next();!_.done;_=v.next())_.value.innerHTML="N/A"}catch(e){r={error:e}}finally{try{_&&!_.done&&(a=v.return)&&a.call(v)}finally{if(r)throw r.error}}if(!t.priceDisplayConfig.hide_subtotal_price&&u.length)try{for(var g=o(u),L=g.next();!L.done;L=g.next())L.value.innerHTML=""}catch(e){c={error:e}}finally{try{L&&!L.done&&(l=g.return)&&l.call(g)}finally{if(c)throw c.error}}p&&p.classList.remove("hidden"),f&&f.classList.remove("hidden"),m&&m.classList.add("hidden")}}}),t.mainElementRef.addEventListener("calc.discount",function(e){var i,n,r,a,c,l,s,d=e.detail,u=t.mainElementRef.querySelector(".comp-product-calculator-price-container");u&&u.classList.add("discounted");var p=t.mainElementRef.querySelectorAll(".calc-price"),f=t.mainElementRef.querySelectorAll(".calc-price-per-piece"),m=t.mainElementRef.querySelector(".price-per-piece-discounted"),y=t.mainElementRef.querySelectorAll(".calc-discounted-price"),h=t.mainElementRef.querySelector(".coupon-detail
1s");if(d.option_id&&(y=t.mainElementRef.querySelectorAll("#attr_".concat(d.option_id,"_discounted_price"))),!t.priceDisplayConfig.hide_subtotal_price&&h){h.classList.remove("hidden");var v=h.querySelector(".coupon-code");v&&(v.innerHTML=d.couponCode);var _=h.querySelector(".discount-amount");if(_){var g;g=t.priceDisplayConfig.discount_label?t.composeCustomDiscountLabel(t.priceDisplayConfig.discount_label,d):t.composeDefaultDiscountLabel(t.priceDisplayConfig.type,d),_.innerHTML=g}}if(!t.priceDisplayConfig.hide_subtotal_price&&p.length)try{for(var L=o(p),b=L.next();!b.done;b=L.next()){var q=b.value;q.classList.remove("subtotal-price"),q.classList.add("orig-price")}}catch(e){i={error:e}}finally{try{b&&!b.done&&(n=L.return)&&n.call(L)}finally{if(i)throw i.error}}var S=t.mainElementRef.querySelector(".subtotal-price-wrapper");S&&S.classList.add("has-discount");var x=t.mainElementRef.querySelector(".subtotal-container");if(x&&x.classList.add("has-discount"),y.length)try{for(var D=o(y),C=D.next();!C.done;C=D.next()){var R=C.value,P=(1*d.discounted_price).toFixed(2);t.priceDisplayConfig.account_type_code_checking&&"LFP"==d.account_type_code&&(P=(1*d.discountedUnitPrice).toFixed(2),t.priceDisplayConfig.show_unit_price=!1);var E=Number(P).toFixed(2).toLocaleString();(null===(s=t.priceDisplayConfig)||void 0===s?void 0:s.show_price_with_commas)&&(E=(1*Number(P)).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})),R.classList.contains("access-discount")?R.innerHTML='Discounted cost is <span data-qaid="discountedPrice">$'+E+"</span>":R.innerHTML="$"+E,R.classList.remove("hidden"),R.setAttribute("aria-label","discounted cost is $"+E+".")}}catch(e){r={error:e}}finally{try{C&&!C.done&&(a=D.return)&&a.call(D)}finally{if(r)throw r.error}}if(t.priceDisplayConfig.show_unit_price&&f.length)try{for(var F=o(f),w=F.next();!w.done;w=F.next()){var H=w.value;switch(t.priceDisplayConfig.type){case"v2":H.innerHTML='<span data-qaid="originalUnitPrice">$'+(1*d.discountedUnitPrice).toFixed(2)+"</span> each";break;case"v3":break;case"v4":t.priceDisplayConfig.show_unit_price_multiple_qty?(d.qty=t.qty,d.unit_price=d.discountedUnitPrice,H.innerHTML=t.getPricePerPieceContent(d)):H.innerHTML='Only <span class="span-inline" data-qaid="originalUnitPrice">$'+(1*d.discountedUnitPrice).toFixed(2)+"</span> each";break;default:H.innerHTML='( <span data-qaid="originalUnitPrice">$'+(1*d.discountedUnitPrice).toFixed(2)+"</span> for each)"}}}catch(e){c={error:e}}finally{try{w&&!w.done&&(l=F.return)&&l.call(F)}finally{if(c)throw c.error}}else{var M=t.mainElementRef.querySelector(".subtotal-container");M&&M.classList.remove("has-discount")}m&&(m.innerHTML='<span data-qaid="discountedUnitPrice">$'+(1*d.discountedUnitPrice).toFixed(2)+"</span>")}),t.mainElementRef.addEventListener("calc.computing",function(e){var i=t.mainElementRef.querySelector("#subtotal_container"),n=t.mainElementRef.querySelector("#compute_price_loader"),r=t.mainElementRef.querySelector("#unit_price_container");i&&(e.detail?i.classList.add("hidden"):i.classList.remove("hidden")),r&&(e.detail?r.classList.add("hidden"):r.classList.remove("hidden")),n&&(e.detail?n.classList.remove("hidden"):n.classList.add("hidden"))})},this.composeDefaultDiscountLabel=function(e,i){void 0===e&&(e="default");var t="";switch(e){case"v4":t=i.discountAmount?"Save $"+(1*i.discountAmount).toFixed(2):"Save "+Number(i.discountPercentage).toFixed(2)+"%";break;case"v3":t=i.discountAmount?"$"+i.discountAmount+" OFF":Number(i.discountPercentage).toFixed(0)+"% OFF";break;default:t=i.discountAmount?i.discountAmount+" OFF":Number(i.discountPercentage).toFixed(0)+"% OFF"}return t},this.getPricePerPieceContent=function(e){for(var i="",t=document.getElementsByClassName("subtotal-container"),n=0;n<t.length;n++)e.qty>1?(t[n].classList.add("price-per-piece"),i='(Only <span class="span-inline" data-qaid="originalUnitPrice">$'+(1*e.unit_price).toFixed(2)+"</span> each)"):(t[n].classList.remove("price-per-piece"),t[n].classList.remove("has-discount"));return i},this.composeCustomDiscountLabel=function(e,i){var t=i.discountAmount,n=i.discountPercentage;if(t){var r=Number(t).toFixed(2),a="Save"==e.amount?"Save ":"",c="Save"==e.amount?"":" Off";return"".concat(a,"$").concat(r).concat(c)}if(n){var o=Number(n).toFixed(2);return a="Save"===e.percent?"Save ":"",c="Save"===e.percent?"":" Off","".concat(a).concat(o,"%").concat(c)}return""},this.priceDisplayConfig=this.templateConfigHelper.getConfig("price_display"),this.mainElementRef=this.calcDOMHelper.getCalcDOM()}return function(e,i,t,n){var r,a=arguments.length,c=a<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,i,t,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(c=(a<3?r(c):a>3?r(i,t,c):r(i,t))||c);return a>3&&c&&Object.defineProperty(i,t,c),c}([(0,n.injectable)(),c("design:paramtypes",[r.j,a.a])],e)}()}}]);

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.