PageSourceSearch

https://www.uhlsport.com/theme/dd61eb197535e72205ab227d3a91c086/js…rt-set.product-set-summary.plugin.367eca.js

js uhlsport.com collected 2026-09-25 03:48:41 UTC 3,458 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[52808],{808:(e,t,i)=>{i.r(t),i.d(t,{default:()=>r});class r extends window.PluginBaseClass{constructor(){super(...arguments);let e=window.PluginManager.getPluginInstances("SwkwebProductSetConfigurator");if(0===e.length||(this._summaryContent=this.el.querySelector(".swkweb-product-set-summary-content"),this._summaryTotalPrice=this.el.querySelector(".swkweb-product-set-summary-total-price"),!this._summaryContent||!this._summaryTotalPrice))return;this._setPluginInstance=e[0],this._setPluginInstance.$emitter.subscribe("swkwebProductSet/onSetUpdated",e=>{this.generateSummary(e.detail.set)}),this.generateSummary(this._setPluginInstance._set)}init(){}generateSummary(e){this._summaryTotalPrice.replaceChildren(document.createTextNode(this._formatPrice(e.totalPrice.unitPrice))),this._summaryContent.replaceChildren(...this.createSlots(e.quantity,e._slots))}createSlots(e,t){let i=[];return t.forEach(t=>{if(!t.selectedOptionsCount)return;let r=this._createElement("div","swkweb-product-set-summary-slot");t._label&&r.appendChild(this._createElement("div","swkweb-product-set-summary-slot",t._label)),t.selectedOptions.forEach(t=>{r.appendChild(this.createOption(t,e))}),i.push(r)}),i}createOption(e,t){let i=this._createElement("div","swkweb-product-set-option");e.optionImageElement&&i.appendChild(this._createElement("div","swkweb-product-set-option-image-wrapper")).appendChild(e.optionImageElement.cloneNode(!0));let r=i.appendChild(this._createElement("div","swkweb-product-set-option-content"));r.appendChild(this._createElement("div","swkweb-product-set-option-title",`${e.quantity}x ${e._label}`));let n=this._getVariantCharacteristics(e);n&&r.appendChild(n);let s=this._getOptionFieldList(e);s&&r.appendChild(s);let a=e.getOptionQuantityPrice(t);if(0!==a.unitPrice&&r.appendChild(this._createElement("div","swkweb-product-set-option-price")).appendChild(this._createElement("p","product-detail-price",this._formatPrice(a.unitPrice))),e._isNestedSet&&e._nestedSet){let t=this._createElement("div","swkweb-product-set-summary-nested-set");t.replaceChildren(...this.createSlots(e.quantity,e._nestedSet._slots)),i.appendChild(t)}return i}_getVariantCharacteristics(e){let t=e.optionVariantCharacteristics;if(t)return t.cloneNode(!0);if(e.isVariantConfigurator){let t=this._createElement("div","line-item-details-characteristics"),i=!1;return e._variantGroupSelects.forEach(r=>{if(!r.value)return;let n="";i?n+=" | ":i=!0;let s=e._productVariantContainer.querySelector(`label[for='${r.id}']`);s&&(n+=`${s.innerText.trim()}: `),t.appendChild(document.createTextNode(n)),t.appendChild(this._createElement("span","line-item-details-characteristics-option",r.options[r.selectedIndex].text))}),t}return null}_getOptionFieldList(e){let t=this._createElement("div","swkweb-product-set-option-fields"),i=!1;return e._fields.forEach(e=>{e.isValid&&null!==e.printableValue&&(i?t.appendChild(this._createElement("span","swkweb-product-set-option-field-separator"," | ")):i=!0,t.appendChild(this._createElement("span","swkweb-product-set-option-field-label",`${e.label}: `)),t.appendChild(this._createElement("span","swkweb-product-set-option-field-value",e.printableValue)))}),t.innerHTML?t:null}_createElement(e,t,i){let r=document.createElement(e);return r.classList.add(t),i&&r.appendChild(document.createTextNode(i)),r}_formatPrice(e){return this._setPluginInstance._priceFormatter.format(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.