const DESCRIPTION={mounting:{"inside mount":"Order your full window size and we will make a small ?” deduction.","outside mount":"Order the desired blind size, ensuring it is larger than your window."},control:{fixed:"Our standard option. Fixed lift to keep the sun at bay.","cord lock":"Our standard option. Lift & lock the shade using the cord.","top down bottom up":"Control light & privacy from both top and bottom.","cord loop":"Effortlessly lift heavy shades with a durable chain.","continuous cord loop":"Effortlessly lift heavy shades with a durable chain.",cordless:"Child-safe and clutter-free look that is a favorite among parents.",motorized:"Elevate convenience and comfort. Ideal for hard-to-reach shades.","fixed control":"Our standard option. Fixed lift to keep the sun at bay.","cord lock control":"Our standard option. Lift & lock the shade using the cord.","top down bottom up cord lock":"Control light & privacy from both top and bottom.","cord loop control":"Effortlessly lift heavy shades with a durable chain.","cordless control":"Child-safe and clutter-free look that is a favorite among parents.","motorized control":"Elevate convenience and comfort. Ideal for hard-to-reach shades.","motorized (matter)":"Similar to motorized, but smarter. Connected to your smart home (e.g. Alexa, Google Home, Apple HomeKit, etc)."},liner:{"no liner":"Keeps the bamboo as is, without any obstructions.","light filtering":"Maintain privacy while allowing soft light in.","room darkening":"Block harsh sunlight and keep indoors cool.","premium blackout":"When pitch black darkness is desired.",blackout:"When pitch black darkness is desired."},liner_control:{"attached liner":"Liner is fixed to the back of the shade.","cord lock liner":"Lift & lock the liner using the cord.","cord loop liner":"Raise & lower the liner using the chain.","cordless liner":"Raise & lower the liner cordlessly.","motorized liner":"Raise & lower the liner via motorization."},valance:{"no valance":"Streamlined look with exposed fabric roll.","cassette valance":"Blend comfort and modernity with a rounded edge.","fascia valance":"Contemporary, sharp appearance with a flat square edge.","wood cornice":"Add elegance with tailored wood cornice.","metal valance":"Exposed metal creates a simple and modern look.","fabric wrapped valance":"Fabric wrapped valance creates an upscale look."},fold:{"flat fold":"Sleek and uncluttered, elevate your space in minimalistic elegance.","flat fall":"Sleek and uncluttered, elevate your space in minimalistic elegance.","classic pleated":"Tailored pleats weave timeless charm into your windows.",european:"Soft, relaxed folds bring the dreamy ambiance of European retreats.",hobbled:"Gentle, undulating folds invite you to unwind in cozy style."},header:{"ripple fold – 2.0x fullness":"A soft, uniform wave-like effect when the fabric is drawn.","pinch pleat (triple) – 2.5x fullness":"Fabric gathered into uniform pleats at the top and pinched together, in groups of three.","parisian pleat (triple) – 2.5x fullness":"Very formal, traditional heading style that creates a sumptuous, full curtains.","grommet – 2.0x fullness":"Ring inserted into the top edge of a curtain, through which a curtain rod is threaded.","back tab – 2.0x fullness":"Loops are sewn onto the back of the curtain panel, allows curtain to hang from a rod with a hidden, clean appearance.","rod pocket – 2.0x fullness":"Sleeve is sewn into the top of the panel, allowing the curtain rod to slip through the pocket."},open:{"center open (two panels)":"Provides symmetrical, balanced look when the curtains are fully drawn open.","one-way open (one panel)":"Ideal for controlling light or privacy on one side of the window."},drop:{'½" above the floor':"Right above the flooring by around half an inch.","kiss the floor":"Barely touching the floor.",'puddle (2" pooling)':"Creates a deliberate, soft puddle of fabric on the ground."},measuring:{"rod width":"Total width of the curtain rod, which helps determine how wide the curtain panels should be for proper coverage and fullness","window width":"Refers to the total horizontal measurement of the window itself."}},BLURBS={"edge binding":"Decorative fabric protects bamboo edges","waterfall style":"Graceful, simpler look favored by some designers","memory shaping": "Helps the curtain to retain its crisp vertical line without losing its shape","solar panel charger":"Worry free charging powered by the sun","solar panel":"Keep your shades fully charged, and say goodbye to cables","solar panel ":"Keep your shades fully charged, and say goodbye to cables",remote:"Manage individual or multiple shades with each channel","wall switch":"Easy room control with dedicated switch","reverse roll":"Conceal fabric backing with clean front roll","smart hub":"Control your shades automatically via app or voice commands"},DEFAULT_DESCRIPTION="Whatever you choose, it will be great.",DEFAULT_CHXBX="Self explanatory :)",calc=document.getElementById("calculator"),checkboxes=calc.getElementsByClassName("checkbox-element");for(let e in checkboxes){const t=checkboxes[e],i=t.textContent?.toLowerCase();i&&(t.lastChild.innerHTML=`${t.textContent}: ${BLURBS[`${i}`]||DEFAULT_CHXBX} `)}const BESPOKE_COLORS=new Map([["bespoke woven",["Beach Sand"]],["bespoke rustic",["Alpine Ivory","Venice Wood","Dark Timber","Onyx"]],["bespoke aloha",["Olive Lumber"]],["bespoke twirl",["Cocoa Bean"]]]),product_name=document.getElementsByClassName("product-section")[0]?.getAttribute("data-product-title")?.toLowerCase(),is_bespoke_bamboo=product_name.toLowerCase().includes("bespoke"),bespoke_short_name=is_bespoke_bamboo?product_name.match(/bespoke\s+\w+/i)[0]?.toLowerCase():"",elements=calc.getElementsByClassName("element");let liner,valance,liner_control,mounting,size_guide,control,color,size,height,width,height_in,width_in,fold,liner_custom,header,open,drop,measuring,quantity;for(let e in elements){const t=elements[e];switch(!0){case!t.textContent:case"motorized"===t.getAttribute("data-conditionalelementvalue").toLowerCase():break;case t.textContent.toLowerCase().includes("3 control"):case t.textContent.toLowerCase().includes("3 liner control"):liner_control=t,t.id="liner_control";break;case t.textContent.toLowerCase().includes("fold style"):fold=t,t.id="fold";break;case t.textContent.toLowerCase().includes("linercclwidth"):linercclwidth=t,t.id="linercclwidth";break;case t.textContent.toLowerCase().includes("linercclheight"):linercclheight=t,t.id="linercclheight";break;case t.textContent.toLowerCase().includes("linerclswidth"):linerclswidth=t,t.id="linerclswidth";break;case t.textContent.toLowerCase().includes("linerclsheight"):linerclsheight=t,t.id="linerclsheight";break;case t.textContent.toLowerCase().includes("ebwidth"):ebwidth=t,t.id="ebwidth";break;case t.textContent.toLowerCase().includes("ebheight"):ebheight=t,t.id="ebheight";break;case t.textContent.toLowerCase().includes("swidth"):swidth=t,t.id="swidth";break;case t.textContent.toLowerCase().includes("sheight"):sheight=t,t.id="sheight";break;case t.textContent.toLowerCase().includes("cclwidth"):cclwidth=t,t.id="cclwidth";break;case t.textContent.toLowerCase().includes("cclheight"):cclheight=t,t.id="cclheight";break;case t.textContent.toLowerCase().includes("rbwidth"):rbwidth=t,t.id="rbwidth";break;case t.textContent.toLowerCase().includes("rbheight"):rbheight=t,t.id="rbheight";break;case t.textContent.toLowerCase().includes("clswidth"):clswidth=t,t.id="clswidth";break;case t.textContent.toLowerCase().includes("clsheight"):clsheight=t,t.id="clsheight";break;case t.textContent.toLowerCase().includes("lflwidth"):lflwidth=t,t.id="lflwidth";break;case t.textContent.toLowerCase().includes("lflheight"):lflheight=t,t.id="lflheight";break;case t.textContent.toLowerCase().includes("bolwidth"):bolwidth=t,t.id="bolwidth";break;case t.textContent.toLowerCase().includes("bolheight"):bolheight=t,t.id="bolheight";break;case t.textContent.toLowerCase().includes("cvwidth"):cvwidth=t,t.id="cvwidth";break;case t.textContent.toLowerCase().includes("cvwheight"):cvwheight=t,t.id="cvwheight";break;case t.textContent.toLowerCase().includes("mounting"):mounting=t,t.id="mounting";break;case t.textContent.toLowerCase().includes("measuring"):measuring=t,t.id="measuring";break;case t.textContent.toLowerCase().includes("quantity"):quantity=t,t.id="quantity";break;case t.textContent.toLowerCase().includes("control"):control=t,t.id="control";break;case t.textContent.toLowerCase().includes("liner customizations"):liner_custom=t,t.id="liner_custom";break;case t.textContent.toLowerCase().includes("liner"):liner=t,t.id="liner";break;case t.textContent.toLowerCase().includes("valance"):valance=t,t.id="valance";break;case t.textContent.toLowerCase().includes("color"):color=t,t.id="color";break;case t.textContent.toLowerCase().includes("size guide"):size_guide=t,t.id="size guide";break;case t.textContent.toLowerCase().includes("size"):size=t,t.id="size";break;case t.getAttribute("data-element")?.toLowerCase().includes("height"):height=t,t.id="height";break;case t.getAttribute("data-element")?.toLowerCase().includes("width"):width=t,t.id="width";break;case t.textContent.toLowerCase().includes("winches"):width_in=t,t.id="winches";break;case t.textContent.toLowerCase().includes("hinches"):height_in=t,t.id="hinches";break;case t.textContent.toLowerCase().includes("header"):header=t,t.id="header";break;case t.textContent.toLowerCase().includes("open"):open=t,t.id="open";break;case t.textContent.toLowerCase().includes("drop"):drop=t,t.id="drop";break;case t.textContent.toLowerCase().includes("customizations"):t.id="custom"}}const sheer_color=[],dark_color=[],light_color=[],disable_tbdu=bespoke_short_name?BESPOKE_COLORS.get(bespoke_short_name):[];for(i in color.lastChild.childNodes){const e=color.lastChild.childNodes[i],t=disable_tbdu?.find((t=>e.title?.toLowerCase()?.includes(t.toLowerCase())));if(e&&t){const t=document.querySelector('[title="Top down bottom up"]');t&&(t.style.opacity=".3",t.style.pointerEvents="none"),e.addEventListener("click",(()=>{const e=document.querySelector('[title="Top down bottom up"]');e&&(e.style.opacity=".3",e.style.pointerEvents="none",control.childNodes[1].firstChild.click())}))}else e&&e.addEventListener&&e.addEventListener("click",(()=>{const e=document.querySelector('[title="Top down bottom up"]');e&&(e.style.opacity="1",e.style.pointerEvents="auto")}));switch(!0){case!e.title:break;case e.title.includes("sheer_color"):sheer_color.push(e),e.title=e.title.replace(" sheer_color","");break;case e.title.includes("light_color"):light_color.push(e),e.title=e.title.replace(" light_color","");break;case e.title.includes("dark_color"):dark_color.push(e),e.title=e.title.replace(" dark_color","")}e instanceof HTMLElement&&e.addEventListener("click",(()=>{color.firstChild.innerText=`Color - ${e.title}`}))}if(color.firstChild.innerText=`Color - ${color.lastChild.childNodes[0].title}`,(sheer_color.length>0||light_color.length>0||dark_color.length>0)&&color.lastChild.remove(),size_guide){var originalLabel=size_guide.firstChild.firstChild,span=document.createElement("span");span.style.textDecoration="underline",span.innerHTML=originalLabel.innerHTML,originalLabel.parentNode.replaceChild(span,originalLabel)}if(sheer_color.length>0){const e=document.createElement("div"),t=document.createElement("div");e.className="sheer swatch-picker",t.style.padding="1.5rem 0 0",t.style.fontSize="1rem",t.innerText="Sheer",e.style.display="flex",e.style.flexWrap="wrap",e.style.margin="0 0 .75rem",sheer_color.forEach((t=>e.appendChild(t))),color.append(t),color.append(e)}if(light_color.length>0){const e=document.createElement("div"),t=document.createElement("div");e.className="light swatch-picker",t.style.padding="1.5rem 0 0",t.style.fontSize="1rem",t.innerText="Light Filtering",e.style.display="flex",e.style.flexWrap="wrap",e.style.margin="0 0 .75rem",light_color.forEach((t=>e.appendChild(t))),color.append(t),color.append(e)}if(dark_color.length>0){const e=document.createElement("div"),t=document.createElement("div");e.className="dark swatch-picker",t.style.padding="1.5rem 0 0",t.style.fontSize="1rem",t.innerText="Room Darkening",e.style.display="flex",e.style.flexWrap="wrap",e.style.margin="0 0 .75rem",dark_color.forEach((t=>e.appendChild(t))),color.append(t),color.append(e)}color&&(color.style.borderBottom="1px solid rgba(0, 0, 0, 0.15)",color.style.padding="2rem 0"),mounting&&(mounting.style.borderTop="1px solid rgba(0, 0, 0, 0.15)",mounting.style.paddingBottom="5rem",mounting.style.paddingTop="2rem"),measuring&&(measuring.style.borderTop="1px solid rgba(0, 0, 0, 0.15)",measuring.style.paddingBottom="5rem",measuring.style.paddingTop="2rem");const widthHeightArray=[];width&&widthHeightArray.push(width),height&&widthHeightArray.push(height),widthHeightArray.forEach((e=>{e.style.width="59%",e.style.display="flex",e.style.justifyContent="space-between",e.style.alignItems="center",e.style.margin="0 0 0 1rem",e.lastChild.onchange=t=>{ChangeEvent(null,this),size.firstChild.firstChild.innerHTML=e===width?`Size - ${t.target.value} ${winches.firstChild[winches.firstChild.selectedIndex].innerText} IN × ${height.lastChild[height.lastChild.selectedIndex].innerHTML} ${hinches.firstChild[hinches.firstChild.selectedIndex].innerText} IN`:`Size - ${width.lastChild[width.lastChild.selectedIndex].innerHTML} ${winches.firstChild[winches.firstChild.selectedIndex].innerText} IN × ${t.target.value} ${hinches.firstChild[hinches.firstChild.selectedIndex].innerText} IN`}}));const widthHeightInArray=[];if(width_in&&widthHeightInArray.push(width_in),height_in&&widthHeightInArray.push(height_in),widthHeightInArray.forEach((e=>{const t=e.firstChild.cloneNode();e.firstChild.remove(),e.append(t),e.lastChild.innerHTML="IN",e.lastChild.style.display="flex",e.lastChild.style.alignItems="center",e.lastChild.style.paddingLeft="1rem",e.style.display="flex",e.style.width="40%",e.style.position="relative",e.style.borderBottom=0,e.style.paddingBottom=0,e.style.margin=0,e.style.top="-3.6rem",e.style.left="60%",e.firstChild.onchange=t=>{ChangeEvent(null,this),e===winches?size.firstChild.firstChild.innerHTML=`Size - ${width.lastChild[width.lastChild.selectedIndex].innerHTML} ${t.target.value} IN × ${height.lastChild[height.lastChild.selectedIndex].innerHTML} ${hinches.firstChild[hinches.firstChild.selectedIndex].innerText} IN`:size.firstChild.firstChild.innerHTML=`Size - ${width.lastChild[width.lastChild.selectedIndex].innerHTML} ${winches.firstChild[winches.firstChild.selectedIndex].innerText} IN × ${height.lastChild[height.lastChild.selectedIndex].innerHTML} ${t.target.value} IN`}})),size.firstChild.firstChild.innerHTML=`Size - ${width.lastChild.firstChild.innerHTML} ${winches.firstChild.firstChild.innerText} IN × ${height.lastChild.firstChild.innerHTML} ${hinches?.firstChild?.firstChild?.innerText} IN`,mounting){mounting.lastChild.style.display="flex",mounting.lastChild.style.justifyContent="space-evenly";const e=document.createElement("div");e.className="desc",e.innerText=DESCRIPTION.mounting["inside mount"],e.style.padding="4rem 1rem 0",e.style.textAlign="center",e.style.color="rgba(0, 0, 0, 0.40)",mounting.firstChild.innerText="Mounting - Inside Mount",mounting.firstChild.style.paddingBottom="2rem",mounting.getElementsByTagName("fieldset")[0].childNodes.forEach((t=>{const i=document.createElement("div");i.textContent=t.title,i.style.fontSize="15px",i.style.textAlign="center",t.appendChild(i),t.addEventListener("click",(()=>{mounting.firstChild.innerText=`Mounting - ${t.title}`,e.innerText=DESCRIPTION.mounting[`${t.title.toLowerCase()}`]||DEFAULT_DESCRIPTION}))})),mounting.appendChild(e)}if(measuring){measuring.lastChild.style.display="flex",measuring.lastChild.style.justifyContent="space-evenly";const e=document.createElement("div");e.className="desc",e.innerText=DESCRIPTION.measuring["rod width"],e.style.padding="4rem 1rem 0",e.style.textAlign="center",e.style.color="rgba(0, 0, 0, 0.40)",measuring.firstChild.innerText="Measuring - Rod Width",measuring.firstChild.style.paddingBottom="2rem",measuring.getElementsByTagName("fieldset")[0].childNodes.forEach((t=>{const i=document.createElement("div");i.textContent=t.title,i.style.fontSize="15px",i.style.textAlign="center",t.appendChild(i),t.addEventListener("click",(()=>{measuring.firstChild.innerText=`Measuring - ${t.title}`,e.innerText=DESCRIPTION.measuring[`${t.title.toLowerCase()}`]||DEFAULT_DESCRIPTION}))})),measuring.appendChild(e)}let disableExplanation;firstShowDisableEx=!0,liner_control&&(disableExplanation=document.createElement("div"),disableExplanation.className="disableExplanation",disableExplanation.textContent='Choose "Light filtering" or "Blackout" liner to choose your preferred method of Liner Control',liner_control.insertAdjacentElement("afterend",disableExplanation));const toLoop=[];if(control&&toLoop.push(control),liner&&toLoop.push(liner),liner_control&&toLoop.push(liner_control),valance&&toLoop.push(valance),fold&&toLoop.push(fold),header&&toLoop.push(header),open&&toLoop.push(open),drop&&toLoop.push(drop),toLoop.forEach((e=>{const t=document.createElement("div");t.style.display="flex",t.style.alignItems="center",t.style.whiteSpace="nowrap";const i=document.createElement("img");i.className="labelImg",i.src=e.lastChild?.firstChild?.children[1]?.src||"",i.style.borderRadius=e===fold?"0":"50%";const l=document.createElement("span");l.style.overflow="hidden",l.innerText=e.lastChild?.firstChild?.title||"";const n=e.firstChild.cloneNode(!0);e.firstChild.style.padding="1rem 0",e.style.transition="all 0.5s ease";const o=document.createElement("img");o.id="arrow",o.src="https://cdn.shopify.com/s/files/1/0460/3740/1761/files/down_arrow.png?v=1689766184",t.appendChild(n),t.appendChild(l),t.appendChild(i),t.appendChild(o),e.appendChild(t),e.replaceChild(e.lastChild,e.firstChild),e.firstChild.firstChild.style.paddingLeft="1.5rem",e.firstChild.children[1].style.marginLeft="auto",e.firstChild.style.padding="1rem 0";let s=e.firstChild.firstChild.innerText?.split(/(\d+)/);3===s.length&&(e.firstChild.firstChild.innerHTML=`${s[1]} ${s[2]}`,e.firstChild.firstChild.style.textUnderlineOffset="4px");const a=document.createElement("div");if(a.className="desc",a.innerText=DEFAULT_DESCRIPTION,a.style.display="none",e.getElementsByTagName("fieldset")[0]?.childNodes?.forEach((t=>{e===fold&&(t.getElementsByTagName("img")[0].style.borderRadius="0");const i=document.createElement("div");i.className="swatch-picker-labelText",i.textContent=t.title,t.appendChild(i),i.style.width="5rem",t.firstChild.addEventListener("click",(i=>{if(e===control){const e=document.querySelector('[data-identifier="Waterfall style"]');e&&"top down bottom up"===i?.target?.value?.toLowerCase()?(e.checked=!1,e.disabled=!0,disable_tbdu.length>0&&disable_tbdu.forEach((e=>{const t=document.querySelector(`[title="${e}"]`);t&&(t.style.opacity=".3",t.style.pointerEvents="none")}))):e&&(e.disabled=!1,disable_tbdu.length>0&&disable_tbdu.forEach((e=>{const t=document.querySelector(`[title="${e}"]`);t&&(t.style.opacity="1",t.style.pointerEvents="auto")})))}e.firstChild.children[1].innerText=t.textContent,e.firstChild.children[2].src=t.children[1].src,a.innerText=DESCRIPTION[`${e.id}`][`${t.title.toLowerCase()}`]||DEFAULT_DESCRIPTION,e===liner&&liner_control&&"no liner"===t.firstChild?.value.toLowerCase()?(liner_control?.querySelectorAll(":not(:first-child)").forEach((e=>{e.style.opacity="0.2"})),liner_control.firstChild.nextElementSibling.style.opacity="0.2",liner_control.lastChild.style.opacity="0.2",showDisableEx=!0,linerControlOpened&&(disableExplanation.style.display="block")):e===liner&&liner_control&&"no liner"!==t.firstChild.value.toLowerCase()&&(liner_control?.querySelectorAll(":not(:first-child)").forEach((e=>{e.style.opacity="1"})),liner_control.firstChild.nextElementSibling.style.opacity="1",liner_control.lastChild.style.opacity="1",disableExplanation.style.display="none",showDisableEx=!1,firstShowDisableEx=!1)}))})),e===control||e===liner_control||e===valance)if(e===valance){const t=[];[...document.getElementsByClassName("element checkbox-element")].forEach((e=>{e.getAttribute("data-conditionalelementvalue")?.toLowerCase().includes("valance")&&t.push(e)})),t.forEach((t=>{let i=t.cloneNode(!0);t.remove(),e.appendChild(i)}))}else{const t=[],i=e.nextElementSibling.getAttribute("data-conditionalelementvalue")?.toLowerCase().includes("motorized")?e.nextElementSibling:null,l=e.nextElementSibling.nextElementSibling?.getAttribute("data-conditionalelementvalue")?.toLowerCase().includes("motorized")?e.nextElementSibling.nextElementSibling:null,n=e.nextElementSibling.nextElementSibling?.nextElementSibling?.getAttribute("data-conditionalelementvalue")?.toLowerCase().includes("motorized")?e.nextElementSibling.nextElementSibling.nextElementSibling:null,o=e.nextElementSibling.nextElementSibling?.nextElementSibling?.nextElementSibling?.getAttribute("data-conditionalelementvalue")?.toLowerCase().includes("motorized")?e.nextElementSibling.nextElementSibling.nextElementSibling.nextElementSibling:null,s=e.nextElementSibling.nextElementSibling?.nextElementSibling?.nextElementSibling?.nextElementSibling?.getAttribute("data-conditionalelementvalue")?.toLowerCase().includes("motorized")?e.nextElementSibling.nextElementSibling.nextElementSibling.nextElementSibling.nextElementSibling:null,a=e.nextElementSibling.nextElementSibling?.nextElementSibling?.nextElementSibling?.nextElementSibling?.nextElementSibling?.getAttribute("data-conditionalelementvalue")?.toLowerCase().includes("motorized")?e.nextElementSibling.nextElementSibling.nextElementSibling.nextElementSibling.nextElementSibling.nextElementSibling:null;i&&t.push(i),l&&t.push(l),n&&t.push(n),o&&t.push(o),s&&t.push(s),a&&t.push(a),t.forEach((t=>{let i=t.cloneNode(!0);t.remove(),e.appendChild(i)}))}e.getElementsByTagName("fieldset")[0].style.visibility="hidden",e.getElementsByTagName("fieldset")[0].style.height="0",e.getElementsByTagName("fieldset")[0].style.margin="0",e.style.position="relative",e.style.height="6rem",e.style.width="100%",e.firstChild.addEventListener("click",(()=>{e.style.height="100%";const t=e.getElementsByTagName("fieldset")[0].getElementsByClassName("swatch-label"),i="hidden"===e.getElementsByTagName("fieldset")[0].style.visibility?"visible":"hidden",l="hidden"===e.getElementsByTagName("fieldset")[0].style.visibility?"100%":"0",n="hidden"===e.getElementsByTagName("fieldset")[0].style.visibility?"4rem":"0",o="hidden"===e.getElementsByTagName("fieldset")[0].style.visibility?"block":"none";e.getElementsByTagName("fieldset")[0].style.visibility=i,e.getElementsByTagName("fieldset")[0].style.height=l,e.getElementsByTagName("fieldset")[0].style.marginBottom=n,e.lastChild.style.display=o,e.lastChild.style.height=l,"visible"===i?(e.firstChild.lastChild.src="https://cdn.shopify.com/s/files/1/0460/3740/1761/files/up_arrow.png?v=1689766135",e.style.borderBottom=0,e.style.boxShadow="0px 10px 25px 0px rgba(0, 0, 0, 0.10)",e.style.paddingBottom="4rem",e===liner_control&&(linerControlOpened=!0,(firstShowDisableEx||showDisableEx)&&(disableExplanation.style.display="block")),e===control||e===liner_control||e===valance||e===fold||e===header?(e.getElementsByTagName("fieldset")[0].style.display="grid",e.getElementsByTagName("fieldset")[0].style.gridAutoFlow="row",e.getElementsByTagName("fieldset")[0].style.gridTemplateColumns=e===valance||e===fold?"repeat(2, 1fr)":"repeat(3, 1fr)",t.count>3&&(e.getElementsByTagName("fieldset")[0].style.gridTemplateRows="repeat(2, 1fr)"),e.getElementsByTagName("fieldset")[0].style.gridRowGap=header?"6rem":"3rem",e.getElementsByTagName("fieldset")[0].style.placeItems="center",e.getElementsByTagName("fieldset")[0].style.marginBottom=header?"6rem":"4rem",e.getElementsByTagName("fieldset")[0].style.marginLeft="1.25rem",e!==control&&e!==header&&e!==liner_control||e.getElementsByTagName("fieldset")[0].lastChild.firstChild.checked&&e.getElementsByClassName("element checkbox-element").length>0&&Array.from(e.getElementsByClassName("element checkbox-element")).forEach((e=>{"none"===e.style.display&&(e.style.display="block",e.firstChild&&(e.firstChild.style.display="block"))}))):(e.getElementsByTagName("fieldset")[0].style.display="flex",e.getElementsByTagName("fieldset")[0].style.flexFlow="wrap",e.getElementsByTagName("fieldset")[0].style.justifyContent="space-evenly",e.getElementsByTagName("fieldset")[0].style.marginBottom="4rem")):(e.firstChild.lastChild.src="https://cdn.shopify.com/s/files/1/0460/3740/1761/files/down_arrow.png?v=1689766184",e.style.borderBottom="1px solid rgba(0, 0, 0, 0.15)",e.style.boxShadow="none",e.style.paddingBottom="0",e===liner_control&&(disableExplanation.style.display="none",linerControlOpened=!1),e!==control&&e!==liner_control||e.getElementsByClassName("element checkbox-element")&&Array.from(e.getElementsByClassName("element checkbox-element")).forEach((e=>{e.style.display="none"})))})),a.innerText=DESCRIPTION[`${e.id}`][`${e.getElementsByTagName("fieldset")[0]?.firstChild.title.toLowerCase()}`]||DEFAULT_DESCRIPTION,e.appendChild(a)})),liner&&liner_control&&"no liner"===liner.getElementsByTagName("fieldset")[0].childNodes[0].firstChild.value.toLowerCase()&&(liner_control.firstChild.querySelectorAll(":not(:first-child)").forEach((e=>{e.style.opacity="0.2"})),liner_control.firstChild.nextElementSibling.style.opacity="0.2",liner_control.lastChild.style.opacity="0.2"),quantity){quantity.style.width="fit-content";const e=quantity.getElementsByTagName("input")[0],t=document.createElement("button");t.textContent="-",t.type="button",t.style.width="50px",t.style.height="50px",t.style.padding="8px 10px",t.style.cursor="pointer",t.style.fontSize="2rem";const i=document.createElement("button");i.textContent="+",i.type="button",i.style.width="50px",i.style.height="50px",i.style.padding="8px 10px",i.style.cursor="pointer",i.style.fontSize="2rem",e&&(t.addEventListener("click",(()=>{const t=parseInt(e.value);e.value=Math.max(t-1,1)})),i.addEventListener("click",(()=>{const t=parseInt(e.value);e.value=t+1})),quantity.insertBefore(t,e),quantity.insertBefore(i,e.nextSibling),quantity.insertBefore(document.createElement("span"),e.nextSibling),e.disabled="disabled",e.className="quantityInput");const l=document.createElement("div");l.className="quantityPrice";const n=calc.getElementsByClassName("price-marker")[0];n&&(jQuery(n).wrap(l),jQuery(quantity).detach().insertBefore(n))}setTimeout((()=>{control&&control.firstChild.click(),header&&header.firstChild.click()}),1e3);