PageSourceSearch

https://plakatypolskie.pl/application/assets/storefront/chunk-product_codes_initializer.DyLYQdw.js

js plakatypolskie.pl collected 2026-10-08 07:35:20 UTC 2,304 bytes, 1 lines download raw bytes

1import{O as c,S as C,C as l}from"./storefrontApp.DHj_rTVq.min.js";import{P as p}from"./chunk-product_constants.e09mIDD.js";import{P as _}from"./chunk-product_stock_changed_handler.Cxrl8lM.js";import{S as f}from"./chunk-storefront_base_lit_element.BDgKmPq.js";import{e as u}from"./chunk-vendor-lit.NvY0u02.js";import"./chunk-vendor-di.Bh23gdA.js";import"./chunk-storefront_settings_constants.DIF02Gz.js";import"./chunk-vendor-rxjs.Dp7kflo.js";import"./chunk-vendor-lodash.CWHFt7Z.js";import"./chunk-vendor-phoenix.cdKS79L.js";import"./chunk-product_events_constants.BHFu5GP.js";const n="data-product-code",m=`${n}-container`;var E=Object.defineProperty,h=(s,t,e,i)=>{for(var o=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(o=a(t,e,o)||o);return o&&E(t,e,o),o};class d extends f{constructor(){super(...arguments),this.productId=null,this.hasVariants=!1,this._$codes=[...this.querySelectorAll(`[${n}]`)],this._updateCodesVisibility=()=>{this._$codes.forEach(t=>this._hideCodeWithNoValue(t)),this._$codes.forEach(t=>{this._showCodeWithValue(t),this._hideCodeWithNoValue(t)})},this._updateProductCodes=({body:t})=>{if(!t)return;const{codes:e,productId:i}=t;i===this.productId&&this._changeProductCodesTextContent(e)}}static{this.moduleName=c.component}firstUpdated(t){super.firstUpdated(t),new _(this._updateProductCodes)}connectedCallback(){super.connectedCallback(),this._updateCodesVisibility()}_showCodeWithValue(t){const{$codeContainer:e}=this._getCodeUtils(t);e&&t.textContent&&t.textContent.length>0&&(e.hidden=!1)}_hideCodeWithNoValue(t){const{$codeContainer:e}=this._getCodeUtils(t);e&&t.textContent===""&&(e.hidden=!0)}_changeProductCodesTextContent(t){this._$codes.forEach(e=>this._changeProductCodeTextContent(e,t))}_changeProductCodeTextContent(t,e){const{$codeContainer:i,productCode:o}=this._getCodeUtils(t,e);!o&&i&&(i.hidden=!0),o&&(i&&(i.hidden=!1),t.textContent=o.value)}_getCodeUtils(t,e){const i=t.getAttribute(n),o=this.querySelector(`[${m}="${i}"]`),r=e&&e[i];return{$codeContainer:o,productCode:r}}}h([u({type:Number,attribute:p,reflect:!0})],d.prototype,"productId");h([u({type:Boolean,attribute:"has-variants",reflect:!0})],d.prototype,"hasVariants");class S extends C{static{this.featureName=c.feature}init(){return{cores:[{type:l,instance:[d]}]}}}export{S as ProductCodesInitializer};

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.