PageSourceSearch

https://junglueck.de/cdn/shop/t/676/assets/product.js?v=29340475516116860281784807646

js junglueck.de collected 2026-10-02 07:19:53 UTC 26,659 bytes, 6 lines download raw bytes

1class SellingPlanPicker extends HTMLElement{constructor(){super()}connectedCallback(){const purchseOptions=this.querySelectorAll('[name="purchase-option"]'),sellingPlanSelects=this.querySelectorAll("theme-select.selling-plan-select");for(const purchseOption of purchseOptions)purchseOption.addEventListener("input",event=>{if(purchseOption.value=="subscription"){const sellingPlan=this.querySelector(`[selling-plan="${purchseOption.id}"] [name="current-selling-plan"]`);sellingPlan&&this.setSellingPlan(sellingPlan.value)}purchseOption.value=="onetime"&&this.removeSellingPlan()});for(const sellingPlanSelect of sellingPlanSelects)sellingPlanSelect.addEventListener("change",event=>{const sellingPlan=sellingPlanSelect.value;sellingPlan&&this.setSellingPlan(sellingPlan)})}updateDOM(newURL,sellingPlanId){const that=this,sectionId=that.dataset.sectionId;that.classList.remove("loading"),fetch(newURL,{credentials:"same-origin",headers:{"X-Requested-With":"XMLHttpRequest"},method:"GET"}).then(response=>response.text()).then(data=>{let template=document.createElement("template");template.innerHTML=data.trim();const newPDP=template.content,oldPDP=document.querySelector(`#shopify-section-${sectionId}`),oldAddToCartInfos=document.querySelectorAll(`#shopify-section-${sectionId} .product-meta-add-to-cart .product-variant-price`),newAddToCartInfos=template.content.querySelectorAll(".product-meta-add-to-cart .product-variant-price"),oldAddToCartButtons=document.querySelectorAll(`#shopify-section-${sectionId} .product-meta-add-to-cart .add-to-cart-button`),newAddToCartButtons=template.content.querySelectorAll(".product-meta-add-to-cart .add-to-cart-button");oldAddToCartInfos.length===newAddToCartInfos.length&&oldAddToCartInfos.forEach((newInfo,index)=>{newInfo.replaceWith(newAddToCartInfos[index])}),oldAddToCartButtons.length===newAddToCartButtons.length&&oldAddToCartButtons.forEach((oldButton,index)=>{oldButton.replaceWith(newAddToCartButtons[index])}),[".product-block-type-sellingplans",".product-block-type-price",".product-block-type-benefits"].forEach(selector=>{const newElement=newPDP.querySelector(selector),oldElement=oldPDP.querySelector(selector);newElement&&oldElement&&oldElement.replaceWith(newElement)}),window.dispatchEvent(new CustomEvent("sellingplan:changed",{bubbles:!0,cancelable:!1,detail:sellingPlanId})),that.classList.remove("loading")}).catch(function(err){that.classList.remove("loading"),console.error(err)})}updateURL(variantId,sellingPlanId){const params=new URL(document.location).searchParams;variantId?params.set("variant",variantId):params.delete("variant"),sellingPlanId?params.set("selling_plan",sellingPlanId):params.delete("selling_plan");let newUrl=new URL(document.location);newUrl.search=params.toString();let newHistoryState=newUrl.href.split("/").pop();history.replaceState(null,"",newHistoryState)}setSellingPlan(sellingPlanId){const variantId=this.closest("form.shopify-product-form").querySelector('input[name="id"]').value;this.updateURL(variantId,sellingPlanId);const sectionId=this.dataset.sectionId,newURL=`${this.dataset.productUrl}?variant=${variantId}&selling_plan=${sellingPlanId}&section_id=${sectionId}`;this.updateDOM(newURL,sellingPlanId)}removeSellingPlan(){const variantId=this.closest("form.shopify-product-form").querySelector('input[name="id"]').value;this.updateURL(variantId,null);const sectionId=this.dataset.sectionId,newURL=`${this.dataset.productUrl}?variant=${variantId}&section_id=${sectionId}`;this.updateDOM(newURL,null)}}customElements.get("selling-plan-picker")||customElements.define("selling-plan-picker",SellingPlanPicker);class VariantPicker extends HTMLElement{constructor(){super()}connectedCallback(){const optionValues=this.querySelectorAll("input.product-option-value");for(const optionValue of optionValues)optionValue.addEventListener("input",event=>{this.setVariant(optionValue.value)})}updateDOM(newURL,variantId){const that=this,sectionId=that.dataset.sectionId,dynamicId=that.closest(".shopify-section")?.id;that.classList.add("loading"),fetch(newURL,{credentials:"same-origin",headers:{"Content-Type":"application/json"},method:"GET"}).then(response=>response.json()).then(data=>{const template=document.createElement("template");template.innerHTML=data[sectionId].trim();const oldKlaviyoPopup=document.querySelector(`#shopify-section-${sectionId} .klaviyo-popup-wrapper`),newKlaviyoPopup=template.content.querySelector(".klaviyo-popup-wrapper"),oldBlocks=document.querySelectorAll(`#shopify-section-${sectionId} .product-meta-block`),newBlocks=template.content.querySelectorAll(".product-meta-block"),oldProductMedia=document.querySelector(`#shopify-section-${sectionId} .product-media-wrapper`),newProductMedia=template.content.querySelector(".product-media-wrapper"),oldAddToCartInfos=document.querySelectorAll(`#shopify-section-${sectionId} .product-meta-add-to-cart .product-variant-price`),newAddToCartInfos=template.content.querySelectorAll(".product-meta-add-to-cart .product-variant-price"),oldAddToCartButtons=document.querySelectorAll(`#shopify-section-${sectionId} .product-meta-add-to-cart .add-to-cart-button`),newAddToCartButtons=template.content.querySelectorAll(".product-meta-add-to-cart .add-to-cart-button"),oldStockMessage=document.querySelector(`#shopify-section-${sectionId} .product-meta-add-to-cart .stock-message-wrapper`),newStockMessage=template.content.querySelector(".product-meta-add-to-cart .stock-message-wrapper");oldStockMessage&&newStockMessage&&oldStockMessage.replaceWith(newStockMessage),oldKlaviyoPopup&&newKlaviyoPopup&&oldKlaviyoPopup.replaceWith(newKlaviyoPopup),oldProductMedia&&newProductMedia&&oldProductMedia.replaceWith(newProductMedia),oldAddToCartInfos.length===newAddToCartInfos.length&&oldAddToCartInfos.forEach((newInfo,index)=>{newInfo.replaceWith(newAddToCartInfos[index])}),oldAddToCartButtons.length===newAddToCartButtons.length&&oldAddToCartButtons.forEach((oldButton,index)=>{oldButton.replaceWith(newAddToCartButtons[index])});for(let i=0;i<oldBlocks.length;i++){const newElement=newBlocks[i],oldElement=oldBlocks[i];newElement&&oldElement&&!oldElement.classList.contains("product-block-type-a
1dditional_payments")&&!oldElement.classList.contains("product-block-type-app")&&!oldElement.classList.contains("product-block-type-add_to_cart")&&oldElement.replaceWith(newElement)}if(this.hasAttribute("external")){const newVariantPicker=template.content.querySelector("variant-picker"),oldVariantPicker=document.querySelector(`#${dynamicId} variant-picker`),newProductPicker=template.content.querySelector("product-picker"),oldProductPicker=document.querySelector(`#${dynamicId} product-picker`),newPriceWrapper=template.content.querySelector(".product-price-wrapper"),oldPriceWrapper=document.querySelector(`#${dynamicId} .product-price-wrapper`),newProductOptionLabel=template.content.querySelector(".option-value-name"),oldProductOptionLabel=document.querySelector(`#${dynamicId} .option-value-name`);if(newVariantPicker&&oldVariantPicker&&oldVariantPicker.replaceWith(newVariantPicker),newProductPicker&&oldProductPicker&&oldProductPicker.replaceWith(newProductPicker),newPriceWrapper&&oldPriceWrapper&&oldPriceWrapper.replaceWith(newPriceWrapper),newProductOptionLabel&&oldProductOptionLabel)if(document.body.contains(oldProductOptionLabel))oldProductOptionLabel.replaceWith(newProductOptionLabel);else{const optionValueNameWrapper=document.querySelector(`#${dynamicId} .option-value-name-wrapper`);optionValueNameWrapper?optionValueNameWrapper.appendChild(newProductOptionLabel):console.log("Option value name wrapper not found")}}window.dispatchEvent(new CustomEvent("variant:changed",{bubbles:!0,cancelable:!1,detail:variantId}));const product_description_section=document.querySelector("section.shopify-section-product-description");product_description_section&&(template.innerHTML=data[product_description_section.id.split("shopify-section-").pop()].trim(),product_description_section&&template.content.firstChild&&product_description_section.replaceWith(template.content.firstChild));const product_tabs_section=document.querySelector("section.shopify-section-product-tabs");if(product_tabs_section){template.innerHTML=data[product_tabs_section.id.split("shopify-section-").pop()].trim();const ingredients_old=product_tabs_section.querySelector(".tab_wrapper.tab-ingredients"),ingredients_new=template.content.querySelector(".tab_wrapper.tab-ingredients");if(ingredients_old&&ingredients_new){const ingredients_old_content=ingredients_old.querySelector(".tab_content"),ingredients_new_content=ingredients_new.querySelector(".tab_content");ingredients_old_content.replaceWith(ingredients_new_content),ingredients_old.querySelector(".tab_content_wrapper").removeAttribute("style"),ingredients_old.classList.remove("open"),ingredients_old.classList.add("close")}}const product_tabs_v2_section=document.querySelector("section.shopify-section-product-tabs-v2");if(product_tabs_v2_section){const tabDrawerV2Id=product_tabs_v2_section.id.split("shopify-section-").pop(),tabDrawerV2El=product_tabs_v2_section.querySelector("tab-drawer-v2");data[tabDrawerV2Id]&&tabDrawerV2El?.refreshFromHTML&&tabDrawerV2El.refreshFromHTML(data[tabDrawerV2Id])}that.classList.remove("loading")}).catch(function(err){that.classList.remove("loading"),console.error(err)})}updateURL(variantId,sellingPlanId){const params=new URL(document.location).searchParams;variantId?params.set("variant",variantId):params.delete("variant"),sellingPlanId?params.set("selling_plan",sellingPlanId):params.delete("selling_plan");let newUrl=new URL(document.location);newUrl.search=params.toString(),history.replaceState(null,"",newUrl.href)}setVariant(variantId){const sellingPlanId=this.closest("form.shopify-product-form").querySelector('input[name="selling_plan"]').value;this.hasAttribute("external")||this.updateURL(variantId,sellingPlanId);const sectionId=this.dataset.sectionId,productUrl=this.dataset.productUrl,product_description_id=document.querySelector("section.shopify-section-product-description")?.getAttribute("id")?.split("shopify-section-")?.pop(),product_tabs_id=document.querySelector("section.shopify-section-product-tabs")?.getAttribute("id")?.split("shopify-section-")?.pop(),product_tabs_v2_id=document.querySelector("section.shopify-section-product-tabs-v2")?.getAttribute("id")?.split("shopify-section-")?.pop(),newURL=`${productUrl}?variant=${variantId}&selling_plan=${sellingPlanId}&sections=${sectionId}${product_description_id?","+product_description_id:""}${product_tabs_id?","+product_tabs_id:""}${product_tabs_v2_id?","+product_tabs_v2_id:""}`;this.updateDOM(newURL,variantId)}}customElements.get("variant-picker")||customElements.define("variant-picker",VariantPicker);let customBuiltInElementsSupported=!1;class AtcButton extends HTMLButtonElement{constructor(){super(),customBuiltInElementsSupported=!0}
1addToCart(form){const that=this,formData=new FormData(form);formData.append("sections","cart-drawer"),that.classList.add("loading"),fetch(window.Shopify.routes.root+"cart/add.js",{method:"POST",credentials:"same-origin",body:formData}).then(response=>response.json()).then(response=>{if(response.status){const error_string=`
2CART GET FAILED 
3Status: ${response.status} 
4Message: ${response.message} 
5Description: ${response.description}`;throw new Error(error_string,{cause:"Cart Error"})}else that.classList.remove("loading"),window.dispatchEvent(new CustomEvent("cart:add",{detail:{...response,add_type:"single",added_count:Number(formData.get("quantity"))||1}}))}).catch(error=>{that.classList.remove("loading"),console.error(error)})}connectedCallback(){const that=this,form=that.closest("form");form&&that.addEventListener("click",event=>{event.preventDefault(),event.stopPropagation(),that.hasAttribute("disabled")&&that.getAttribute("disabled")!=="false"||that.addToCart(form)})}}if(customElements.get("atc-button")||customElements.define("atc-button",AtcButton,{extends:"button"}),!customBuiltInElementsSupported){let replaceUnsupportedElements2=function(){let atcButtons=document.querySelectorAll('button[is="atc-button"]');for(const atcButton of atcButtons){const newAtcButton=document.createElement("add-to-cart");atcButton.hasAttribute("disabled")&&newAtcButton.setAttribute("disabled",atcButton.getAttribute("disabled")),newAtcButton.setAttribute("class",atcButton.getAttribute("class")),newAtcButton.innerHTML=atcButton.innerHTML,atcButton.replaceWith(newAtcButton)}};var replaceUnsupportedElements=replaceUnsupportedElements2;document.addEventListener("DOMContentLoaded",replaceUnsupportedElements2),window.addEventListener("variant:changed",replaceUnsupportedElements2),window.addEventListener("product:changed",replaceUnsupportedElements2),window.addEventListener("sellingplan:changed",replaceUnsupportedElements2)}class ProductMedia extends HTMLElement{constructor(){super()}scrollLeft(){const navigationWidth=this.navigation.getBoundingClientRect().width;if(this.navigation.scrollLeft>0){const newScrollState=Math.max(0,Math.round((this.navigation.scrollLeft-navigationWidth+Number.EPSILON)*2)/2);this.navigation.scrollLeft=newScrollState}}scrollRight(){const navigationWidth=this.navigation.getBoundingClientRect().width,navigationChildrenCount=this.navigationChildren.length,childrenWidth=this.navigationChildren.reduce((total,acc)=>total+acc.getBoundingClientRect().width,0),maxScrollRight=Math.round(childrenWidth-navigationWidth);if(this.navigation.scrollLeft<maxScrollRight){const newScrollState=Math.round((this.navigation.scrollLeft+navigationWidth+Number.EPSILON)*2)/2;this.navigation.scrollLeft=newScrollState}}toggleButtonVisibility(){const navigationWidth=this.navigation.getBoundingClientRect().width,childrenWidth=this.navigationChildren.reduce((total,acc)=>total+acc.getBoundingClientRect().width,0),maxScrollRight=Math.floor(childrenWidth-navigationWidth);this.navigation.scrollLeft<=0?this.scrollLeftButton.classList.add("hidden"):this.scrollLeftButton.classList.remove("hidden"),this.navigation.scrollLeft>=maxScrollRight?this.scrollRightButton.classList.add("hidden"):this.scrollRightButton.classList.remove("hidden")}setActiveItem(item,items){if(item){for(const other_item of items)other_item.classList.remove("active");item.classList.add("active"),this.dataset.mainMediaId=item.dataset.mediaId}}setSliderEventListener(){this.slider.embla.on("select",embla=>{const currentIndex=embla.selectedScrollSnap(),currentItem=this.querySelector(`.product-media-item[data-index="${currentIndex}"]`),currentItemBoundingBox=currentItem.getBoundingClientRect();currentItemBoundingBox.right>window.innerWidth?this.scrollRight():currentItemBoundingBox.left<0&&this.scrollLeft(),this.setActiveItem(currentItem,this.items)})}setMaxImageWidth(){if(window.innerWidth>1024){const product_section=this.closest(".shopify-section-product-main");if(product_section){const selling_plan_block=product_section.querySelector(".product-block-type-sellingplans");if(selling_plan_block){const selling_plans_hidden=selling_plan_block.querySelector("selling-plan-picker.hide-block");let product_blocks_height=product_section.querySelector(".product-meta-blocks");product_blocks_height?product_blocks_height=product_blocks_height.getBoundingClientRect().height+40:product_blocks_height=40;const product_main_image=this.querySelector(".main-media");if(selling_plans_hidden)product_main_image.style.setProperty("--max-width",product_blocks_height+"px");else{const selling_plan_block_height=selling_plan_block?selling_plan_block.getBoundingClientRect().height:0;let selling_plan_block_max_height=0;selling_plan_block.querySelectorAll(".purchase_option-button").forEach(component=>selling_plan_block_max_height+=component.getBoundingClientRect().height),selling_plan_block.querySelectorAll(".tooltip-container").forEach(component=>selling_plan_block_max_height+=component.getBoundingClientRect().height),selling_plan_block_max_height+=157,product_main_image.style.setProperty("--max-width",product_blocks_height-selling_plan_block_height+selling_plan_block_max_height+"px")}}}}}connectedCallback(){this.items=this.querySelectorAll(".product-media-item"),this.slider=this.querySelector("clever-slider"),this.navigation=this.querySelector(".product-media-nav"),this.navigationChildren=Array.from(this.navigation.querySelectorAll(".product-media-item")).filter(item=>getComputedStyle(item,null).display!=="none"),this.scrollLeftButton=this.querySelector(".scroll-left"),this.scrollRightButton=this.querySelector(".scroll-right");for(const item of this.items)item.addEventListener("click",event=>{this.setActiveItem(item,this.items);const index=Number(item.dataset.index);index!=null&&this.slider.embla.scrollTo(index)});this.slider.embla?this.setSliderEventListener():this.slider.addEventListener("init",()=>{this.setSliderEventListener()}),this.scrollLeftButton&&this.scrollRightButton&&(this.scrollLeftButton.addEventListener("click",this.scrollLeft.bind(this)),this.scrollRightButton.addEventListener("click",this.scrollRight.bind(this)),this.navigation.addEventListener("scroll",this.toggleButtonVisibility.bind(this))),this.setMaxImageWidth(),window.addEventListener("resize",this.setMaxImageWidth.bind(this))}}customElements.get("product-media")||customElements.define("product-media",ProductMedia);class KlaviyoNotifyPopup extends HTMLElement{constructor(){super()}open(){this.classList.add("active")}close(){this.classList.remove("active")}successCallback(result){const content=this.querySelector(".klaviyo-content"),success=this.querySelector(".klaviyo-success");content.classList.add("hidden"),success.classList.remove("hidden")}errorCallback(error){const content=this.querySelector(".klaviyo-content"),error_display=this.querySelector(".klaviyo-error");content.classList.add("hidden"),error_display.classList.remove("hidden")}submit(email,variant){const that=this,payload={data:{type:"back-in-stock-subscription",attributes:{profile:{data:{type:"profile",attributes:{email:`${email}`}}},channels:["EMAIL"]},relationships:{variant:{data:{type:"catalog-variant",id:`$shopify:::$default:::${variant}`}}}}},options={method:"POST",headers:{"Content-Type":"application/json",revision:"2024-06-15"},body:JSON.stringify(payload)};fetch("https://a.klaviyo.com/client/back-in-stock-subscriptions/?company_id=Q2xsJy",options).then(result=>that.successCallback(result)).catch(error=>that.errorCallback(error))}connectedCallback(){this.variantId=this.getAttribute("variant")?this.getAttribute("variant"):null,this.emailInput=this.querySelector("#klaviyo-email-input"),this.submitButton=this.querySelector(".klaviyo-email-submit"),this.closeButton=this.querySelector(".klaviyo-close"),this.content=this.querySelector(".klaviyo-popup-card"),this.addEventListener("click",event=>{this.content.contains(event.target)||this.close()}),this.closeButton&&this.closeButton.addEventListener("click",event=>{this.close()}),this.emailInput&&this.submitButton&&this.variantId&&this.submitButton.addEventListener("click",event=>{if(this.emailInput.validity.valid){const email=this.emailInput.value,variant=this.variantId;email&&this.submit(email,variant)}else alert("Email invalid")})}}customElements.get("klaviyo-notify-popup")||customElements.define("klaviyo-notify-popup",KlaviyoNotifyPopup);class KlaviyoNotifyButton extends HTMLElement{constructor(){super()}connectedCallback(){const popup_id=this.getAttribute("for")?this.getAttribute("for"):null;this.popup=document.querySelector(`#${popup_id}`),this.addEventListener("click",event=>{this.popup.open()})}}customElements.get("klaviyo-notify-button")||customElements.define("klaviyo-notify-button",KlaviyoNotifyButton);class StickyAddToCartTrigger extends HTMLElement{constructor(){super()}updateStickyAddToCart(){const zendeskWidget=document.querySelector("iframe#launcher");if(document.querySelectorAll("#zendesk_style_tag").length==0&&zendeskWidget){const style_tag=document.createElement("style"),head=document.querySelector("head");head&&style_tag&&(style_tag.id="zendesk_style_tag",head.appendChild(style_tag))}const triggerPosition=this.getBoundingClientRect();if(triggerPosition.bottom<0||triggerPosition.top>window.innerHeight&&window.innerWidth<1024){if(this.addToCartWrapperElement.classList.add("active"),zendeskWidget&&document.querySelector("#zendesk_style_tag").length!=0){const style=`iframe#launcher{ bottom: ${this.addToCartWrapperElement.offsetHeight+3}px !important}`;document.querySelector("#zendesk_style_tag").textContent=style}}else this.addToCartWrapperElement.classList.remove("active"),zendeskWidget&&document.querySelector("#zendesk_style_tag").length!=0&&(document.querySelector("#zendesk_style_tag").textContent="")}connectedCallback(){const that=this;that.addToCartWrapperElement=document.querySelector("[sticky-add-to-cart-wrapper]"),that.addToCartWrapperElement?that.updateStickyAddToCart():document.addEventListener("DOMContentLoaded",event=>{that.addToCartWrapperElement=document.querySelector("[sticky-add-to-cart-wrapper]"),that.updateStickyAddToCart()}),window.addEventListener("scroll",that.updateStickyAddToCart.bind(that)),window.addEventListener("resize",that.updateStickyAddToCart.bind(that))}}customElements.get("sticky-add-to-cart-trigger")||customElements.define("sticky-add-to-cart-trigger",StickyAddToCartTrigger);class GiftCardProperties extends HTMLElement{constructor(){super()}connectedCallback(){const textarea=this.querySelector("#gift-card-description"),textarea_counter=this.querySelector(".input-counter-textarea [data-counter]");textarea&&textarea_counter&&(textarea_counter.dataset.counter=textarea.value.length,textarea.addEventListener("input",()=>{textarea_counter.dataset.counter=textarea.value.length}));const design_select=this.querySelector("#gift-card-design"),product_media=document.querySelector("product-media");design_select&&product_media&&design_select.addEventListener("change",()=>{const active_option_title=design_select.querySelector("option[selected]")?.innerHTML,active_option_name=design_select.querySelector("option[selected]")?.dataset.designName;if(active_option_title){const activeImageId=product_media.querySelector(`[alt="${active_option_title}"]`)?.closest("[data-media-id]")?.dataset.mediaId,items=product_media.querySelectorAll(".product-media-item"),item=product_media.querySelector(`[data-media-id="${activeImageId}"][data-index]`);if(item){product_media.setActiveItem(item,items);const index=Number(item.dataset.index);index!=null&&product_media.slider.embla.scrollTo(index)}}if(active_option_name){const design_name=document.querySelector("#gift-card-design-name");
5design_name.value=active_option_name}})}}customElements.get("gift-card-properties")||customElements.define("gift-card-properties",GiftCardProperties);class HtmlTruncate extends HTMLElement{constructor(){super()}getWordCount(string){return Array.from(string.split(/\s+/).filter(Boolean)).length}getSplitIndex(string,words){let previousCharLetter=!1,wordCount=0,index=0;for(const char of string){if(/\s/.test(char)?(previousCharLetter&&wordCount++,previousCharLetter=!1):previousCharLetter=!0,wordCount>=words)return index;index++}}setUnviolable(node){node.unviolable=!0,node!==this&&this.setUnviolable(node.parentNode)}traverseNodeTree(node){const traverseNodeTree=this.traverseNodeTree.bind(this);if(node.childNodes.forEach(traverseNodeTree),this.wordCount<this.maxWordCount){if(node.nodeType===Node.TEXT_NODE){const count=this.getWordCount(node.textContent);if(this.wordCount+count>this.maxWordCount){const remainingWords=this.maxWordCount-this.wordCount,splitIndex=this.getSplitIndex(node.textContent,remainingWords);node.splitText(splitIndex),node.textContent+="..."}this.wordCount+count==this.maxWordCount&&(node.textContent+="..."),this.wordCount+=count}this.setUnviolable(node)}}pruneNodeTree(node){const pruneNodeTree=this.pruneNodeTree.bind(this);node.childNodes.forEach(pruneNodeTree),node.unviolable||(this.nodesToRemove[this.nodesToRemove.length]=node)}showLess(){this.show_more_button.dataset.state="more",this.removeAttribute("open");let height=this.full_description.getBoundingClientRect().height;this.description_wrapper.style.height=height+"px",requestAnimationFrame(()=>{height=this.truncated_description.getBoundingClientRect().height,this.description_wrapper.style.height=height+"px",setTimeout(()=>{this.truncated_description.classList.add("active"),this.full_description.classList.remove("active"),this.description_wrapper.removeAttribute("style")},300)})}showMore(){this.show_more_button.dataset.state="less",this.setAttribute("open","");let height=this.truncated_description.getBoundingClientRect().height;this.description_wrapper.style.height=height+"px",this.full_description.classList.add("active"),this.truncated_description.classList.remove("active"),requestAnimationFrame(()=>{height=this.full_description.getBoundingClientRect().height,this.description_wrapper.style.height=height+"px",setTimeout(()=>{this.description_wrapper.removeAttribute("style")},300)})}init(){this.description_wrapper=this.querySelector(".description-wrapper"),this.full_description=this.querySelector(".full-description"),this.truncated_description=this.querySelector(".truncated-description"),this.show_more_button=this.querySelector(".show-more-button"),this.wordCount=0,this.maxWordCount=Number(this.getAttribute("words")),this.nodesToRemove=[],this.traverseNodeTree(this.truncated_description),this.wordCount>=this.maxWordCount?(this.pruneNodeTree(this.truncated_description),this.nodesToRemove.forEach(node=>node.remove()),this.full_description.classList.remove("active"),this.truncated_description.classList.add("active"),this.show_more_button.classList.add("active")):(this.full_description.classList.add("active"),this.truncated_description.classList.remove("active"),this.show_more_button.classList.remove("active")),this.show_more_button.addEventListener("click",event=>{this.hasAttribute("open")?this.showLess():this.showMore()})}connectedCallback(){this.init()}}customElements.get("html-truncate")||customElements.define("html-truncate",HtmlTruncate);class BreadcrumbsCollection extends HTMLElement{connectedCallback(){const prodID=this.dataset.productId,data=sessionStorage.getItem(`product_${prodID}_collection`);if(!data)return;const collection=JSON.parse(data),breadcrumbLink=this.querySelector(".breadcrumbs__link");breadcrumbLink&&(breadcrumbLink.textContent=collection.title,breadcrumbLink.href=collection.url),sessionStorage.removeItem(`product_${prodID}_collection`)}}customElements.get("breadcrumbs-collection")||customElements.define("breadcrumbs-collection",BreadcrumbsCollection);
6//# sourceMappingURL=/cdn/shop/t/676/assets/product.js.map?v=29340475516116860281784807646

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.