1const CUSTOM_VIDEO_PARAM_ID=70454,CUSTOM_LABEL_PARAM_ID=82110;app_shop?.vars?.hotspotsConfig||(app_shop.vars.hotspotsConfig={}),app_shop.vars.hotspotsConfig.productsMinHeight=!0;const HOTSPOTS_GQL={HOTSPOT:(t,e)=>`${t}: hotspots(${e}) {\n products {\n id\n type\n code\n name\n link\n zones\n icon\n iconSecond\n iconSmall\n iconSmallSecond\n opinion {\n\t\t\t\t\trating\n\t\t\t\t\tcount\n }\n enclosuresImages {\n iconWidth\n iconHeight\n }\n\t\t\t\tawardedParameters {\n\t\t\t\t\tid\n name\n description\n\t\t\t\t\tvalues {\n\t\t\t\t\t\tid\n\t\t\t\t\t\tname\n\t\t\t\t\t}\n }\n price {\n rebateCodeActive\n price {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n omnibusPrice {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n omnibusPriceDetails {\n unit {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n youSavePercent\n omnibusPriceIsHigherThanSellingPrice\n newPriceEffectiveUntil {\n formatted\n }\n }\n max {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n unit {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n unitConvertedPrice {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n youSavePercent\n beforeRebate {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n beforeRebateDetails {\n youSavePercent\n unit {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n }\n advancePrice {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n suggested {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n rebateNumber {\n number\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n depositPrice {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n depositPriceUnit {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n totalDepositPrice {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n totalDepositPriceUnit {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n }\n sizes {\n id\n weight\n price {\n rebateCodeActive\n price {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n omnibusPrice {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n omnibusPriceDetails {\n unit {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n youSavePercent\n omnibusPriceIsHigherThanSellingPrice\n newPriceEffectiveUntil {\n formatted\n }\n }\n max {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n unit {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n unitConvertedPrice {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n youSavePercent\n beforeRebate {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n beforeRebateDetails {\n youSavePercent\n unit {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n }\n advancePrice {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n suggested {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n rebateNumber {\n number\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n }\n\t\t\t\t\tshipping {\n\t\t\t\t\t\ttoday\n\t\t\t\t\t}\n }\n unit {\n sellBy\n plural\n singular\n unitConvertedFormat\n }\n points\n }\n name\n url\n type\n took\n ${"function"==typeof app_shop?.vars?.additionalHotspotQueryReduce?app_shop?.vars?.additionalHotspotQueryReduce():""}\n }`,HOTSPOTS_ALL_QUERY:t=>JSON.stringify({query:`query {\n ${t}\n }`})};class GetHotspots{constructor(t={}){this.allHotspots=[...document.querySelectorAll(".hotspot__wrapper[data-
1pagetype]")],this.allHotspotsData=[],this.hotspotsToLoad=[...this.allHotspots],this.hotspotsInView=[],this.loadedHotspots=[],this.hotspotsInViewDelay=50,this.priceType=t.priceType,this.callbacksBeforeAppend=t.callbacksBeforeAppend||{},this.callbacksAfterAppend=t.callbacksAfterAppend||{},this.productsMinHeight=t.productsMinHeight??!1,this.omnibusDataAll=[],this.txt={pkt:"pkt","punktów":"punktów",od:"od",do:"do",Subskrypcja:"Subskrypcja",Promocja:"Promocja","Wyprzedaż":"Wyprzedaż",Przecena:"Przecena",Polecany:"Polecany","Nasz bestseller":"Bestseller","NowoÅÄ":"NowoÅÄ","WysyÅka 24H":"WysyÅka 24H","Dostawa 0 zÅ":"Dostawa 0 zÅ","Strefa rekomendacji":"Strefa rekomendacji","Zobacz wiÄcej":"Zobacz wszystko",netto:"netto",brutto:"brutto"}}async fetchData(t={}){const{data:e,link:s,linkParameter:i=""}=t;if(!e)return!1;try{const t=await fetch(`${s||app_shop.urls.graphql||"/graphql/v1"}${i}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:e});"?addToBasket"===i&&await app_shop.graphql.trackingEvents(t);return await t.json()}catch(t){return!1}}async loadHotspots(){const t=HOTSPOTS_GQL.HOTSPOTS_ALL_QUERY(this.hotspotsInView.reduce(((t,e)=>{const s=this.allHotspotsData.filter((t=>e.id===t.id))?.[0],i=`hotspotsPanelParamsInput: { page: ${s?.page}, zone: zone${s?.zone} ${s.products?`, products: [${s.products}]`:""}}`;return t+=HOTSPOTS_GQL.HOTSPOT(s.id,i)}),""));this.hotspotsInView=[];const e=await this.fetchData({data:t,linkParameter:"?hotspots"});e.data&&(Object.entries(e?.data),this.loadedHotspots=[...this.loadedHotspots,...Object.entries(e?.data)],this.hotspotsToSet=[...Object.entries(e?.data)]),this.hotspotsToSet?.forEach((t=>{const e=this.allHotspots.filter((e=>t[0]===e.id))?.[0];return!!e&&(this.setHotspot(t[1],e),!0)}))}loadHotspotsDelay(){clearTimeout(this.loadingTimer),this.loadingTimer=setTimeout((()=>{this.loadHotspots()}),this.hotspotsInViewDelay)}getHotspotsInPage(){this.allHotspotsData=this.allHotspots.map((t=>({id:t?.id,page:t.dataset?.pagetype,zone:t.dataset?.zone,products:t.dataset?.products||null})))}hotspotObserverFunc(t){t.forEach((t=>{if(!t.isIntersecting)return!1;if(this.hotspotsToLoad.includes(t.target)){if(t.target.querySelector(".hotspot.--initialized"))return;this.hotspotsToLoad=this.hotspotsToLoad.filter((e=>e!==t.target)),this.hotspotsInView.push(t.target),this.loadHotspots(),this.hotspotObserver.unobserve(t.target)}return!0}))}hotspotObserverInit(){this.hotspotObserver=new IntersectionObserver((t=>{this.hotspotObserverFunc(t)}),{rootMargin:"300px 0px"}),this.allHotspots.forEach((t=>this.hotspotObserver.observe(t)))}setHtml(t,e,s,i,a=!1){const n=this.activeTemplate.querySelector(`${t}`);return s?.forEach((t=>{n.setAttribute(t?.name,t?.val)})),!(!n||!e)&&(e&&n?.insertAdjacentHTML(i||"beforeend",e),n?.classList.remove("--hidden"),a&&n?.parentNode?.classList.remove("--hidden"),!0)}getHotspotWrapperName(t,e,s){const i=e?".hotspot_link_headline":".hotspot_headline",a=s.querySelector(i)?.content.cloneNode(!0);if(!a||!t)return null;const n=`${this.txt["Strefa rekomendacji"]}: ${t}`,o=`${this.txt["Strefa rekomendacji"]} ${t}: ${this.txt["Zobacz wiÄcej"]}`;return a.querySelector(".headline__name")?.insertAdjacentHTML("afterbegin",t),a.querySelector(".headline__name")?.setAttribute("aria-label",n),a.querySelector("a.headline")?.setAttribute("href",e),a.querySelector("a.headline")?.setAttribute("title",n),a.querySelector("a.headline__after")?.setAttribute("href",e),a.querySelector("a.headline__after")?.setAttribute("title",o),a.querySelector("a.headline__after .link__text")?.setAttribute("aria-label",o),a}getHotspotWrapper(t,e){const s=e.querySelector("template.hotspot_wrapper")?.content.cloneNode(!0);if(!s)return null;const{name:i}=t;let{url:a}=t;if("1"===e.getAttribute("data-zone")&&"projector"===e.getAttribute("data-pagetype")){const t=document.querySelector("#projector_productname"),e=t?.getAttribute("data-series-link");e&&(a=e)}const n=this.getHotspotWrapperName(i,a,e);return n?(s.querySelector(".hotspot__name").append(n),s):(s.querySelector(".hotspot__name")?.remove(),s)}getImgElement(){return""+(void 0!==this.currProductsData.iconSecond&&void 0!==this.currProductsData.iconSmallSecond?`<picture>\n <source media="(min-width: 421px)" type="image/webp" srcset="${this.currProductsData.icon}"/>\n <source media="(min-width: 421px)" type="image/jpeg" srcset="${this.currProductsData.iconSecond}"/>\n <source media="(max-width: 420px)" type="image/webp" srcset="${this.currProductsData.iconSmall}"/>\n <source media="(max-width: 420px)" type="image/jpeg" srcset="${this.currProductsData.iconSmallSecond}"/>\n <img width="${this.currProductsData.enclosuresImages?.[0]?.iconWidth}" height="${this.currProductsData.enclosuresImages?.[0]?.iconHeight}" src="${this.currProductsData.iconSecond}" alt="${this.currProductsData.name}">\n </picture>`:`<picture>\n <source media="(min-width: 421px)" srcset="${this.currProductsData.icon}"/>\n <source media="(max-width: 420px)" srcset="${this.currProductsData.iconSmall}"/>\n <img width="${this.currProductsData.enclosuresImages?.[0]?.iconWidth}" height="${this.currProductsData.enclosuresImages?.[0]?.iconHeight}" src="${this.currProductsData.iconSecond}" alt="${this.currProductsData.name}">\n </picture>`)}setRating(){const t=this.activeTemplate.querySelector(".product__comments");if(!t)return!1;const{opinion:{rating:e,count:s}}=this.currProductsData;if(!e||!s)return t.classList.add("--hidden"),!1;if(0===s)return t.classList.add("--hidden"),!1;t.querySelector(".comments__count").innerText=`${s}`;return t.querySelectorAll(".comments__stars i").forEach(((t,s)=>{s<=Math.floor(e)&&t.classList.add("active")})),!0}setCustomLabels(){const{awardedParameters:t}=this.currProductsData;if(!t)return!1;const e=t.find((t=>82110===t?.id));if(!e)return!1;const{name:s}=e.values[0];if(!s)return!1;const[i,a,n]=s.split("|");let o=`<span class="label --custom" style="background-color: ${a||"#333333"}; color: ${n||"#FFFFFF"};">${i}</span>`;return this.setHtml(".label_icons",o),!0}setDiscountLabel(){const{awardedParameters:t}=this.currProductsData;if(!t)return!1;const e=t.find((t=>3285===t?.id));if(!e)return!1;return!!e.values.find((t=>"stan magazynowy"===t?.name))&&(this.setHtml(".label_icons",`<span class="label --discount">${this.txt["Wyprzedaż"]}</span>`),!0)}setFastShippingLabels(){const{awardedParameters:t}=this.currProductsData;if(!t)return!1;const e=t.filter((t=>"SZYBKA WYSYÅKA"===t?.name));if(!e)return!1;return!!e.reduce(((t,e)=>e.values&&Array.isArray(e.values)?[...t,...e.values]:t),[]).find((t=>"24 h"===t?.name||"24h"===t?.name))&&(this.setHtml(".label_icons",`<span class="label --fast-shipping">${this.txt["WysyÅka 24H"]}</span>`),!0)}setFreeShippingLabels(){const{sizes:t}=this.currProductsData;if(!t)return!1;return!t.find((t=>t?.weight>1))&&(this.setHtml(".label_icons",`<span class="label --free-shipping">${this.txt["Dostawa 0 zÅ"]}</span>`),!0)}setLabels(t){this.setCustomLabels(),this.setDiscountLabel(),this.setFastShippingLabels(),t?.length&&t.includes("bestseller")&&this.setHtml(".label_icons",`<span class="label --bestseller">${this.txt["Nasz bestseller"]}</span>`),this.setFreeShippingLabels(),t?.length&&t.includes("new")&&this.setHtml(".label_icons",`<span class="label --new">${this.txt["NowoÅÄ"]}</span>`),t?.length&&t.includes("subscription")&&this.setHtml(".label_icons",`<span class="label --subscription">${this.txt.Subskrypcja}</span>`)}setOmnibus(t,e){if(!t||!e)return!1;this.omnibusData=app_shop.fn.getOmnibusDetails?.({productData:this.currProductsData});const s=this.activeTemplate.querySelector(".product__prices");return!!this.omnibusData&&(s?.classList.add(...this.omnibusData.classes.add),s?.classList.remove(...this.omnibusData.classes.remove),this.setHtml(".price.--omnibus",this.omnibusData?.omnibus?.visible?this.omnibusData?.omnibus?.html:null),this.setHtml(".price.--before-rebate",this.omnibusData?.beforeRebate?.visible?this.omnibusData?.beforeRebate?.html:null),this.setHtml(".price.--new-price",this.omnibusData?.newPriceEffectiveUntil?.visible?this.omnibusData?.newPriceEffectiveUntil?.html:null),this.omnibusDataAll?.push(this.omnibusData),!0)}setPrices(){const{price:t}=this.currProductsData.price,{unit:e}=this.currProductsData,s=this.priceType;if(0===t[s].value)return this.activeTemplate.querySelector(".price.--phone")?.classList.remove("--hidden"),this.activeTemplate.querySelector(".price.--normal.--main")?.classList.add("--hidden"),this.activeTemplate.querySelector(".product")?.classList.add("--phone"),!1;const{sizes:i,id:a}=this.currProductsData,n=i?.map((t=>t?.price?.unit?.[s]||t?.price?.price?.[s])),o=((t=[])=>t.reduce(((t,e)=>t?.value>e?.value?e:t),t[0]))(n),r=((t=[])=>t.reduce(((t,e)=>t?.value<e?.value?e:t),t[0]))(n);this.setHtml(".price_vat","gross"==app_shop.vars?.priceType?` ${this.txt.brutto}`:` ${this.txt.netto}`),this.setHtml(".price_sellby__sellby",`${e?.sellBy}`,[{name:"data-sellby",val:e?.sellBy}]),this.setHtml(".price_sellby__unit",`${e?.sellBy>1?e?.plural:e?.singular}`),this.setHtml(".price_sellby__sep","/");const p=this.currProductsData.price?.unitConvertedPrice?.[s]?.formatted;p&&this.setHtml(".price.--convert",`(${p} / ${e?.unitConvertedFormat})`);const c=this.currProductsData?.points;if(c&&this.setHtml(".price.--points",`${c} <span aria-hidden="true">${this.txt?.pkt}</span><span class="sr-only">${this.txt?.["punktów"]}</span>`),this.setHtml(".deposit_price__value",this.currProductsData.price?.totalDepositPriceUnit?.[s]?.formatted||this.currProductsData.price?.totalDepositPrice?.[s]?.formatted||this.currProductsData.price?.depositPriceUnit?.[s]?.formatted||this.currProductsData.price?.depositPrice?.[s]?.formatted,null,
1null,!0),o?.value!==r?.value)return this.setHtml(".price.--normal .price__range.--min",`<span class="sr-only">${this.txt?.od} </span>${o.formatted}`),this.setHtml(".price.--normal .price__range.--max",`<span class="sr-only">${this.txt?.do} </span>${r.formatted}`),this.setHtml(".price.--normal .price__sep"," - "),!1;this.setOmnibus(a,i);const l=this.currProductsData.price?.youSavePercent;return l&&this.setHtml(".product__yousave",`-${l}%`),this.setLabels(this.currProductsData.zones),!t?.[s]||(this.setHtml(".price.--normal .price__sub",this.currProductsData.price?.unit?.[s]?.formatted||t?.[s]?.formatted),!1)}setVideoParam(){if(!this.activeTemplate.querySelector(".product__video"))return!1;const{awardedParameters:t}=this.currProductsData;if(!t)return!1;const e=t.find((t=>70454===t?.id));if(!e)return!1;const{name:s}=e.values[0];return!!s&&(this.setHtml(".product__video",!1,[{name:"data-video",val:s}]),this.activeTemplate.querySelector(".product__video")?.classList.remove("--hidden"),!0)}setWishlistButton(){if(!this.activeTemplate.querySelector(".product__wishlist"))return!1;const{id:t,sizes:e}=this.currProductsData,s=e?.[0]?.id||"uniw";this.setHtml(".product__wishlist",!1,[{name:"data-id",val:t},{name:"data-size",val:s}])}getHotspotProducts(t,e){const s=t?.products,i=[];return s?.forEach((t=>{const a=e.querySelector("template.hotspot_product")?.content.cloneNode(!0);if(!s||!a)return;this.currProductsData=t,this.activeTemplate=a;const{id:n,name:o,link:r,sizes:p}=this.currProductsData,c=[{name:"href",val:r},{name:"title",val:o}],l=[{name:"title",val:o}];this.setHtml(".product",!1,[{name:"data-id",val:n}]),this.setHtml(".product__name",o,c),this.setHtml(".product__icon",this.getImgElement(),l,"afterbegin"),this.setPrices(),this.setRating(),this.setVideoParam(),this.setWishlistButton(),i.push(a)})),i}async initCallback(t,e,s,i){t&&await Object.values(t).reduce((async(t,a)=>{await t,await(a?.(e,s,i))}),Promise.resolve())}hideHotspotWrapper(t){const e=t.querySelector(".skeleton");e?.parentNode?.classList?.add?.("--hidden"),e?.parentNode?.removeChild(e)}async setHotspot(t,e){if(null===t)return void this.hideHotspotWrapper(e);const s=this.getHotspotWrapper(t,e);if("last_visited"===t.type&&e.classList.add("--last-visited"),!s)return;const i=e.querySelector(".skeleton"),a=this.getHotspotProducts(t,e);if(e.classList.contains("--last-visited")&&1!==app_shop.vars?.logged&&a.splice(1),!a||0===a.length)return void this.hideHotspotWrapper(e);a?.forEach((t=>{s?.querySelector(".hotspot__products")?.append(t)}));const n=`\n <div class="product hotspot__product swiper-slide last_visited">\n <div class="last_visited__icon">\n <img src="/gfx/custom/lock-open.svg" height="150" width="150" alt="lock-open" loading="lazy"/>\n </div>\n <div class="last_visited__heading">Zaloguj siÄ</div>\n <div class="last_visited__subheading">By widzieÄ przeglÄ
dane produkty także na innym urzÄ
dzeniu</div>\n <div class="last_visited__buttons">\n <a class="btn --outline --large last_visited__login" href="${app_shop.vars.loginLink}">Zaloguj siÄ</a>\n <a class="last_visited__signup" href="${app_shop.vars.registerLink}">lub zarejestruj ></a>\n </div>\n </div>\n `;e.classList.contains("--last-visited")&&1!==app_shop.vars.logged&&s?.querySelector(".hotspot__products")?.insertAdjacentHTML("beforeend",n),s?.firstChild?.classList.add("--initialized"),await this.initCallback(this.callbacksBeforeAppend,t,s,e),i?.parentNode?.removeChild(i),e.prepend(s),this.productsMinHeight&&setTimeout((()=>{app_shop.fn?.setHeightHotspot({selectors:[`#${e?.id} .product__prices`,`#${e?.id} .product__name`,`#${e?.id} .product__opinion`],container:`#${e?.id} .products`})}),100),"function"==typeof app_shop.fn.addDepositInfo&&app_shop.fn.addDepositInfo(".deposit_price__value"),await this.initCallback(this.callbacksAfterAppend,t,s,e)}async loadHotspot(t){if(!t)return!1;if(t.querySelector(".hotspot.--initialized"))return!1;if(!t.dataset?.pagetype||!t.dataset?.zone)return!1;try{const e={id:t.id,page:t.dataset.pagetype,zone:t.dataset.zone,products:t.dataset.products||null},s=()=>e.products?`, products: [${e.products}
1]`:"",i=`hotspotsPanelParamsInput: { page: ${e.page}, zone: zone${e.zone} ${s()}}`,a=HOTSPOTS_GQL.HOTSPOTS_ALL_QUERY(HOTSPOTS_GQL.HOTSPOT(e.id,i)),n=await this.fetchData({data:a,linkParameter:"?hotspots"});if(!n?.data)return!1;const o=n.data[e.id];return!!o&&(this.loadedHotspots.push([e.id,o]),await this.setHotspot(o,t),!0)}catch(t){return!1}}init(){this.allHotspots=[...document.querySelectorAll(".hotspot__wrapper[data-pagetype]")].filter((t=>t.querySelector(".hotspot:not(.--initialized)"))),this.allHotspotsData=[],this.hotspotsToLoad=[...this.allHotspots],this.hotspotsInView=[],this.getHotspotsInPage(),this.hotspotObserverInit()}}app_shop.vars.hotspotCallbacksBeforeAppend={},app_shop.vars.hotspotCallbacksAfterAppend={},app_shop.vars.additionalHotspotQueryObj={},app_shop.vars.productsMinHeight=app_shop?.vars?.hotspotsConfig?.productsMinHeight??!1,app_shop.vars.additionalHotspotQueryReduce=()=>"object"!=typeof app_shop.vars.additionalHotspotQueryObj?"":Object.values(app_shop.vars.additionalHotspotQueryObj).reduce(((t,e,s)=>`${0!==s?`${t} \n `:""} ${e}`),"");const hotspotOptions={priceType:app_shop.vars.priceType||"net",callbacksBeforeAppend:app_shop.vars.hotspotCallbacksBeforeAppend||[],callbacksAfterAppend:app_shop.vars.hotspotCallbacksAfterAppend||[],productsMinHeight:app_shop.vars.productsMinHeight??!1};app_shop.vars.hotspotCallbacksAfterAppend.omnibus=()=>{"function"==typeof runOmnibusFallback&&runOmnibusFallback()},app_shop.vars.hotspotCallbacksAfterAppend.wishlistActive=()=>{app_shop.fn.markWishlistActive?.()},app_shop.vars.hotspots=new GetHotspots(hotspotOptions),app_shop.run((function(){try{app_shop.vars.hotspots.init()}catch(t){window?.errorLog?.(t)}}),"all",".hotspot__wrapper",!0);const HOTSPOTS_OPINION_GQL={OPINION:(t,e)=>`${t}: opinion(${e}) {\n id\n author\n content\n rating\n confirmedByPurchase\n }`,OPINION_ALL_QUERY:t=>JSON.stringify({query:`query {\n ${t}\n }`})};class HotspotOpinionsPlugin extends GetHotspots{constructor(){super(),this.txt={"Potwierdzona zakupem":"Potwierdzona zakupem"}}async getOpinion(){const t=this.products.filter((t=>!sessionStorage.getItem(`productOpinions_${t}`))),e=this.products.filter((t=>sessionStorage.getItem(`productOpinions_${t}`))),s=HOTSPOTS_OPINION_GQL.OPINION_ALL_QUERY(t.reduce(((t,e)=>t+=HOTSPOTS_OPINION_GQL.OPINION(`productOpinions_${e}`,`SearchOpinionsInput: { type: "product", ordersBy: "date", sourceId: "${e}", resultsLimit: 1 }`)),"")),i={};e.forEach((t=>{i[`productOpinions_${t}`]=JSON.parse(sessionStorage.getItem(`productOpinions_${t}`))}));const a=t.length?await this.fetchData({data:s,linkParameter:"?opinion"}):{data:i};if(!a)return!1;const n=t.length?{...a.data,...i}:{...a.data};return Object.keys(n)?.forEach((t=>{const e=t.replace("productOpinions_","");sessionStorage.getItem(t)||sessionStorage.setItem(t,JSON.stringify(n[t])),this.setOpinion(e,n[t])})),!0}setOpinionValues(){const t=this.activeTemplate.querySelector(".opinions_element_confirmed"),e=this.activeTemplate.querySelector(".opinions_element_confirmed_text");t&&e&&this.opinionData?.confirmedByPurchase&&(t?.classList.add("--true"),t?.classList.remove("--false"),e.innerText=this.txt["Potwierdzona zakupem"]),this.setHtml(".product__opinion_client",this.opinionData?.author),this.setHtml(".note_value",this.opinionData?.rating),this.setHtml(".product__opinion_content",this.opinionData?.content),this.activeTemplate.querySelectorAll(".note .icon-star").forEach(((t,e)=>{e<(this.opinionData?.rating||0)&&t.classList.add("--active")}))}getOpinionElement(){const t=this.hotspotElement.querySelector(".hotspot_opinion")?.content.cloneNode(!0);return!!t&&(this.activeTemplate=t,this.setOpinionValues(t),t)}setOpinion(t,e){if(!e.length)return!1;const s=e[0];this.opinionData=s;const i=this.getOpinionElement(),a=this.hotspotTemplate?.querySelector(`.product[data-id="${t}"] .product__content_wrapper`);return!(!a||!i)&&(a.append(i),!0)}async init(t){const[e,s,i]=t;return this.hotspotData=e,this.hotspotTemplate=s,this.hotspotElement=i,"opinion"===this.hotspotData?.type&&(this.products=this.hotspotData?.products.map((t=>t.id)),await this.getOpinion(),!0)}}app_shop.vars.hotspotCallbacksBeforeAppend.opinion=async(...t)=>{const e=new HotspotOpinionsPlugin;await e.init(t)},document.addEventListener("click",(function(t){if(t.target.closest(".product__video")){const e=t.target.closest(".product__video").getAttribute("data-video");if(!e)return;t.preventDefault();Modal({html:`\n\t\t\t<div class="video-iframe-wrapper">\n\t\t\t\t<iframe width="560" height="315" src="https://www.youtube.com/embed/${e}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture;
1 web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>\n\t\t\t</div>\n\t\t`,classList:"--param-video --large"})}if(t.target.closest(".product__wishlist")){const e=t.target.closest(".product__wishlist"),s=t.target.closest(".product__wishlist").getAttribute("data-id"),i=t.target.closest(".product__wishlist").getAttribute("data-size");if(!s||!i)return;if(e.classList.contains("--active"))return void Alertek.Start(ShoppingListTxt.productAlreadyOnList);if(!app_shop.fn.shoppingList)return;app_shop.fn.shoppingList.addProductToList([[s,i]])}}));const getProductsDataByButton=t=>{try{let e="hotspot";t.closest("#search")&&(e="search"),(t.closest("#projector_productname")||t.closest("#projector_form"))&&(e="projector");const s=t.getAttribute("data-id")||t.closest(".product")?.getAttribute("data-id")||t.closest(".product")?.getAttribute("data-product_id")||t.closest("#projector_form")?.getAttribute("data-product_id");let i=t.getAttribute("data-type")||"uniw",a=null,n=null,o=null,r=null,p=null;"projector"===e?(a=document.querySelector(".product_name__name").innerText,n=document.querySelector(".photos__photo")?.getAttribute("src"),o=document.querySelector(".photos__default_img")?.getAttribute("src"),r=window.location.href,p=document.querySelector("#projector_price_value")?.innerText,i=document.querySelector("#projector_size_hidden")?.value||"uniw"):(a=t.closest(".product")?.querySelector(".product__name")?.innerText,n=t.closest(".product")?.querySelector('.product__icon [type="image/webp"]')?.getAttribute("srcset"),o=t.closest(".product")?.querySelector('.product__icon [type="image/jpeg"]')?.getAttribute("srcset"),r=t.closest(".product")?.querySelector(".product__name")?.getAttribute("href"),p=t.closest(".product")?.querySelector(".price.--main .price__sub")?.innerText||t.closest(".product")?.querySelector(".price.--main")?.innerText,n||o||(n=t.closest(".product")?.querySelector(".product__icon img")?.getAttribute("src")));const c=n||o;return s&&a&&c&&r&&p?{id:s,name:a,size:i,icon:c,link:r,price:p}:null}catch(t){return null}};app_shop.fn.setHeightHotspot=t=>{const{selector:e,selectors:s,container:i}=t||{};if(!e&&!s||!i)return;const a=document.querySelector(i);if(!a)return;const n=t=>{const e=[...a.children].map((e=>e.querySelector(t))).filter((t=>t));if(!e.length)return;const s=Math.max(...e.map((t=>t.offsetHeight)));e.forEach((t=>{t.style.minHeight=`${s}px`}))};e&&n(e),s?.length&&s.forEach((t=>n(t)))};
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.