PageSourceSearch

https://www.blindstogo.ca/static/product-detail-BbVmwKBJ.js

js blindstogo.ca collected 2026-10-08 09:17:56 UTC 79,332 bytes, 2 lines download raw bytes

1const __vite__fileDeps=["static/product-variants-Ol11Z_ga.js","static/main-BmYsSTrY.js","static/vendor-DI-zMLkP.js","static/index-9Yy5i9pU.js","index.Bz2lCpwO.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2import{u as e,n as l,j as i}from"./main-BmYsSTrY.js";import{e as t,h as o,r as n,C as d,E as a,A as s,f as r,L as u}from"./vendor-DI-zMLkP.js";import{at as c,J as v,a8 as p,a5 as m,au as f,g,M as _,av as y,aw as h,n as x,s as b,G as w,ax as j,al as S,_ as N,ay as C,an as k,af as E,az as D,E as P,aA as O,b as I,aB as M,aC as A,aD as R,aE as T,aF as L,aG as B,aH as F,aI as $,aJ as W,ah as U,aK as q}from"./index-9Yy5i9pU.js";import{E as H}from"./support-cta-pdp-JAy7qNtt.js";const J=i=>{var u,N;const{product:C,setProduct:k,showFullPageDetails:E,queryParams:D,setQueryParams:P,analyticsMode:O,analyticsSearchTerm:I,analyticsCategory:M,analyticsWidgetId:A}=i,R=t.isRenderingOnServer()||t.isRenderingInHeadlessBrowser(),{t:T}=e(),L={clientid:"84b514ec64148e7d",clientsecret:"ae5fd93577e310a13d27f79770fffb5b"},B=null==(N=null==(u=t.getGlobalSettings())?void 0:u.record)?void 0:N.discount_badge,F=o(),[$,W]=n.useState(!1),[U,q]=n.useState(!1),[H,J]=n.useState([]),[z,V]=n.useState([]),[Z]=n.useState({}),[G,Y]=n.useState({}),[X,K]=n.useState(!1),[Q,ee]=n.useState([]),[le,ie]=n.useState(0),[te,oe]=n.useState(0),[ne,de]=n.useState([]),[ae,se]=n.useState([]),[re,ue]=n.useState([]),[ce,ve]=n.useState((()=>(()=>{let e=[];try{e=new URLSearchParams(window.location.search).getAll("_fs").map((e=>{const[l,i]=e.split(";;");return{field_internal_name:l,value:i}}))}catch{e=[]}let l=[];try{const e=localStorage.getItem("default_facets_pdp_new");e&&""!==e.trim()&&(l=e.split("&").map((e=>{if(!e.startsWith("_fs="))return null;const[l,i]=e.substring(4).split(";;");return{field_internal_name:l,value:i}})).filter(Boolean))}catch(t){console.error("Error parsing default_facets_pdp_new from localStorage:",t)}const i=[];return[...e,...l].filter(Boolean).forEach((e=>{i.find((l=>{var i,t,o,n,d,a,s,r;return(null==(t=null==(i=l.field_internal_name)?void 0:i.toLowerCase())?void 0:t.trim())===(null==(n=null==(o=e.field_internal_name)?void 0:o.toLowerCase())?void 0:n.trim())&&(null==(a=null==(d=l.value)?void 0:d.toLowerCase())?void 0:a.trim())===(null==(r=null==(s=e.value)?void 0:s.toLowerCase())?void 0:r.trim())}))||i.push(e)})),i})())),pe=n.useRef([]),[me,fe]=n.useState({}),[ge,_e]=n.useState({}),[ye,he]=n.useState([]),[xe,be]=n.useState({}),[we,je]=n.useState(!1),[Se,Ne]=n.useState(!1),[Ce,ke]=n.useState({}),[Ee,De]=n.useState(),[Pe,Oe]=n.useState({}),[Ie,Me]=n.useState(""),[Ae,Re]=n.useState({}),[Te,Le]=n.useState(!1),[Be,Fe]=n.useState("asc"),[$e,We]=n.useState({}),[Ue,qe]=n.useState("Color"),[He,Je]=n.useState(!0),[ze,Ve]=n.useState(!1),[Ze,Ge]=n.useState({}),[Ye,Xe]=n.useState([]),[Ke,Qe]=n.useState({}),[el,ll]=n.useState({}),[il,tl]=n.useState(),[ol,nl]=n.useState(),[dl,al]=n.useState(!1);n.useState(!1);const[sl,rl]=n.useState({}),[ul,cl]=n.useState(!0),[vl,pl]=n.useState({}),[ml,fl]=n.useState(!1),gl=e=>{const l=e.getBoundingClientRect(),i=document.getElementById(`product-detail-${C.id}`),t=i?i.offsetHeight:0;return l.top>=t&&l.top>=0&&l.left>=0&&l.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&l.right<=(window.innerWidth||document.documentElement.clientWidth)},_l=(e,l)=>{var i,t,o,n,d;const a=document.getElementsByClassName("accordian");for(let r=0;r<(null==a?void 0:a.length);r++)(null==(o=null==(t=null==(i=a[r])?void 0:i.parentElement)?void 0:t.classList)?void 0:o.contains("is-open"))?x(a[r]):(null==e?void 0:e.toString())===(null==(d=null==(n=a[r])?void 0:n.id)?void 0:d.toString())?(b(a[r]),l&&setTimeout((()=>{gl(a[r])||a[r].scrollIntoView({behavior:"smooth",block:"center"})}),600)):x(a[r]);const s=null==z?void 0:z.findIndex((l=>(null==l?void 0:l.id)===e));qe(s>=0?s:"Color"),setTimeout((()=>{fe({[e]:!me[e]})}),500)},yl=async e=>{var l,i,t;try{if(0!==(null==e?void 0:e.reviews_count)){const o=await a.getProductReviewsByProductId({productId:e.provider_id});if(null==(l=null==o?void 0:o.reviews)?void 0:l.data.length){ee(null==(i=null==o?void 0:o.reviews)?void 0:i.data);const e=null==o?void 0:o.reviews_meta.reviews_count,l=null==(t=null==o?void 0:o.reviews_meta)?void 0:t.reviews_rating_sum;tl(Math.round(l/e)),nl(e)}}else ee([]),tl(0),nl(0)}catch(o){console.error(o)}},hl=(e,l)=>{var i;const t=j(JSON.parse(JSON.stringify(e)),l,null==(i=C.provider_specific_data)?void 0:i.modifiers);return(null==t?void 0:t.length)?((e=>{var l,i,t,o;const n=null==e?void 0:e.find((e=>(null==e?void 0:e.sku)===(null==C?void 0:C.sku)));if(n){let e={[null==n?void 0:n.color_key_sku]:null==n?void 0:n.color_sku};(null==(i=null==(l=null==n?void 0:n.style_data)?void 0:l.collection)?void 0:i.sku_group)&&(e={...e,...null==(o=null==(t=null==n?void 0:n.style_data)?void 0:t.collection)?void 0:o.sku_group}),Qe(e)}})(t),t):(cl(!1),[])},xl=async e=>{var l,i,t,o,n,d,s,r,u;if((null==C?void 0:C.cust_product_type)&&(null==(l=C.cust_product_type)?void 0:l.length)){je(!0);const{currencyInfo:l}=g();let c={skip:0,limit:1e3,body:{categories:null==(i=null==C?void 0:C.categories)?void 0:i[0],category_id:null==(t=null==C?void 0:C.category_ids)?void 0:t[0],filter:[{group:{operator:"AN
2D",rules:[{action:"equal_to",field_name:"cust_product_type",value:C.cust_product_type[0]}]}},...w()??[]],facets:e||[]},fields:"sale_price,calculated_price,name,description,price,cust_show_onswatchespageca,cust_show_onswatchespageus,sku,provider_specific_data,page_slug,content_model_id,id,title,categories,cust_style_sku,cust_color_sku,cust_color,cust_product_type,cust_style,cust_exp_color,cust_exp_producttype,cust_exp_style,images,variant_options,custom_fields,provider_id"};(null==(o=Object.entries((null==ge?void 0:ge.value)||{}))?void 0:o.length)&&(c={...c,...(null==ge?void 0:ge.value)||{}}),l&&(c.currency=null==l?void 0:l.currency_code);const v=await a.search(c);if("success"===(null==v?void 0:v.Status)){const e=null==(n=null==v?void 0:v.Data)?void 0:n.records;Ge((null==(d=null==v?void 0:v.Data)?void 0:d.facets)||{}),Xe((null==(s=null==v?void 0:v.Data)?void 0:s.enabled_facets)||[]);const l=!!(null==(u=null==(r=null==e?void 0:e[0])?void 0:r.custom_fields)?void 0:u.find((e=>"Select Light Control"===(null==e?void 0:e.name))));return Ve(l),je(!1),e}je(!1)}else cl(!1)},bl=e=>{let l=[];try{null==e||e.forEach((e=>{"group"!==(null==e?void 0:e.type)&&"customHeightWidth"!==(null==e?void 0:e.type)?l.push(e):l=[...l,...null==e?void 0:e.modifiers]}))}catch(i){}return l},wl=(e,l)=>{const i=[],t={};return null==e||e.forEach((e=>{var o,n;if(0===e.hide&&"group"!==e.type||"customHeightWidth"===e.type)"customHeightWidth"!==e.type?l[e.id]&&(t[e.id]=l[e.id]):null==(o=e.modifiers)||o.forEach((e=>{l[e.id]&&(t[e.id]=l[e.id])})),i.push(e);else if("group"===e.type){const o=[];null==(n=null==e?void 0:e.modifiers)||n.forEach((e=>{0===e.hide&&(o.push(e),l[e.id]&&(t[e.id]=l[e.id]))})),(null==o?void 0:o.length)&&(e.modifiers=o,i.push(e))}})),pl(t),i},jl=e=>{var l,i,t,o,n,d;let a="";if(e){const s=null==e?void 0:e.split(".");3===(null==(l=s[0])?void 0:l.length)?a+=s[0]:2===(null==(i=s[0])?void 0:i.length)?a+=`0${s[0]}`:1===(null==(t=s[0])?void 0:t.length)?a+=`00${s[0]}`:a+="000",3===(null==(o=s[1])?void 0:o.length)?a+=s[1]:2===(null==(n=s[1])?void 0:n.length)?a+=`${s[1]}0`:1===(null==(d=s[1])?void 0:d.length)?a+=`${s[1]}00`:a+="000"}return a},Sl=(e,l,i,t,o,n)=>{var d,a,s;try{const r=((e,l)=>{var i,t,o,n;let d={};const a=null==l?void 0:l.find((l=>(null==l?void 0:l.sku)===(null==e?void 0:e.sku)));return(null==a?void 0:a.sku)&&(d={[null==(t=null==(i=null==a?void 0:a.style_data)?void 0:i.collection)?void 0:t.collection_identifier]:null==(n=null==(o=null==a?void 0:a.style_data)?void 0:o.collection)?void 0:n.name}),d})(e,o),u=null==e?void 0:e.custom_fields;let c=!1;const v=null==u?void 0:u.find((e=>"Color"===(null==e?void 0:e.name)||"Couleur"===(null==e?void 0:e.name))),p=y(JSON.parse(JSON.stringify(l)),{...i,...r,[null==v?void 0:v.name]:null==v?void 0:v.value},u,n),m={},f={},g=bl(p);if(null==g?void 0:g.length){if(null==g||g.forEach((l=>{var o,n,d,a,s,r,v,p,g,_,y;if("text"!==l.type||(null==(o=null==e?void 0:e.cust_exp_producttype)?void 0:o.includes("Tailored Fit Drapery"))&&"Width"===(null==l?void 0:l.identifier)&&(null==(n=null==l?void 0:l.option_values)?void 0:n.length)){const e=i[null==l?void 0:l.display_name],t=null==(d=null==l?void 0:l.option_values)?void 0:d.find((l=>l.label===e));t?(f[l.id]=null==t?void 0:t.id,m[null==l?void 0:l.display_name]=null==t?void 0:t.label):(m[null==l?void 0:l.display_name]=null==(a=null==l?void 0:l.option_values[0])?void 0:a.label,f[null==l?void 0:l.id]=null==(s=null==l?void 0:l.option_values[0])?void 0:s.id,c=!0)}else"Height"===(null==l?void 0:l.identifier)&&(m[null==l?void 0:l.display_name]=i[null==l?void 0:l.display_name]||(null==(r=null==u?void 0:u.find((e=>"EXP Default Height"===e.name)))?void 0:r.value),f[l.id]=i[null==l?void 0:l.display_name]||(null==(v=null==u?void 0:u.find((e=>"EXP Default Height"===e.name)))?void 0:v.value)),"Width"!==(null==l?void 0:l.identifier)||(null==(p=null==e?void 0:e.cust_exp_producttype)?void 0:p.includes("Tailored Fit Drapery"))||(null==(g=null==l?void 0:l.option_values)?void 0:g.length)||(m[null==l?void 0:l.display_name]=i[null==l?void 0:l.display_name]||(null==(_=null==u?void 0:u.find((e=>"EXP Default Width"===e.name)))?void 0:_.value),f[l.id]=i[null==l?void 0:l.display_name]||(null==(y=null==u?void 0:u.find((e=>"EXP Default Width"===e.name)))?void 0:y.value)),"Room Label"===(null==l?void 0:l.identifier)&&(m[null==l?void 0:l.display_name]=i[null==l?void 0:l.display_name]||"",f[l.id]=i[null==l?void 0:l.display_name]||""),"Height"!==(null==l?void 0:l.identifier)&&"Width"!==(null==l?void 0:l.identifier)&&"Room Label"!==(null==l?void 0:l.identifier)&&(m[null==l?void 0:l.display_name]=i[null==l?void 0:l.display_name],f[l.id]=t[null==l?void 0:l.id])}
2)),c||(null==(d=Object.keys(i))?void 0:d.length)!==(null==g?void 0:g.length))return Sl(e,JSON.parse(JSON.stringify(l)),m,f,o,n);{const l={};null==g||g.forEach((i=>{var t,o,n,d,a,s,r,c,v,p;if("text"!==i.type){const e=null==(o=null==(t=null==i?void 0:i.option_values)?void 0:t.find((e=>{var l,t;return(null==(l=e.id)?void 0:l.toString())===(null==(t=f[null==i?void 0:i.id])?void 0:t.toString())})))?void 0:o.sku;e&&(l[i.sku]=e)}else if("Height"===i.identifier)if(f[null==i?void 0:i.id])l[null==i?void 0:i.sku]=jl(f[null==i?void 0:i.id]);else{const e=null==u?void 0:u.find((e=>"Default Height"===(null==e?void 0:e.name)));l[null==i?void 0:i.sku]=jl(null==e?void 0:e.value)}else if("Width"===(null==i?void 0:i.identifier))if(f[null==i?void 0:i.id])l[null==i?void 0:i.sku]=(null==(n=null==e?void 0:e.cust_exp_producttype)?void 0:n.includes("Tailored Fit Drapery"))?jl(`${parseInt(null==(a=null==(d=f[null==i?void 0:i.id])?void 0:d.toString())?void 0:a.match(/\d+/)[0],10)}`):jl(f[null==i?void 0:i.id]);else if(null==(s=null==e?void 0:e.cust_exp_producttype)?void 0:s.includes("Tailored Fit Drapery")){const t=null==(c=null==(r=null==e?void 0:e.custom_fields)?void 0:r.filter((e=>"Drapery Width"===(null==e?void 0:e.name))))?void 0:c.map((e=>parseInt(e.value))).sort(((e,l)=>e-l));if(null==t?void 0:t.length){const e=null==(v=t[0])?void 0:v.toString();l[null==i?void 0:i.sku]=jl(`${parseInt(null==(p=null==e?void 0:e.toString())?void 0:p.match(/\d+/)[0],10)}`)}}else{const e=null==u?void 0:u.find((e=>"Default Width"===(null==e?void 0:e.name)));l[null==i?void 0:i.sku]=jl(e)}}));const i=null==(a=null==p?void 0:p.map((e=>"Product Measurements"===(null==e?void 0:e.parent_group_identifier)?{...e,type:"customHeightWidth"}:"Label Product"===(null==e?void 0:e.parent_group_identifier)?(null==e||e.type,{...e,type:"room_label"}):{...e})))?void 0:a.filter((e=>"Openness"!==(null==e?void 0:e.identifier))),t=h({...m,...r},u,n,null==(s=null==e?void 0:e.provider_specific_data)?void 0:s.modifiers);return{finalModifiers:wl(i,f),selectedModifiers:f,selectedModfiersByDisplayName:m,selectedModifiersBySku:{...l,...null==t?void 0:t.hiddenOptionsSelectedSku}}}}}catch(r){return console.error(r),{finalModifiers:[],selectedModifiers:{},selectedModfiersByDisplayName:{},selectedModifiersBySku:{}}}},Nl=(e,l)=>{var i;const t=[],o=(null==l?void 0:l.length)>0?l[0]:{},n=null==o?void 0:o.configuration_steps;if(null==n?void 0:n.length){null==n||n.forEach((l=>{if(l){const i=((e,l)=>{var i,t;let o;for(let n=0;n<(null==(i=null==l?void 0:l.finalModifiers)?void 0:i.length);n++){const i=null==l?void 0:l.finalModifiers[n];if("group"===(null==i?void 0:i.type)&&(null==(t=null==i?void 0:i.modifiers)||t.forEach((l=>{(null==l?void 0:l.identifier)===e.attribute_name&&(l.description_after=e.description_after,l.description_before=e.description_before,l.step_display_name=e.step_display_name,l.info_popup=e.info_popup,l.depth_chart=e.depth_chart,l.mechanism_discount_badges=e.mechanism_discount_badges,o=l)}))),o)break;if(e.attribute_name&&(null==i?void 0:i.identifier)===e.attribute_name){i.depth_chart=e.depth_chart,i.info_popup=e.info_popup,i.description_after=e.description_after,i.description_before=e.description_before,i.step_display_name=e.step_display_name,i.mechanism_discount_badges=e.mechanism_discount_badges,o=i;break}if(e.step_name===(null==i?void 0:i.parent_group_identifier)){i.depth_chart=e.depth_chart,i.info_popup=e.info_popup,i.description_after=e.description_after,i.description_before=e.description_before,i.step_display_name=e.step_display_name,i.mechanism_discount_badges=e.mechanism_discount_badges,o=i;break}}return o})(l,e);i&&t.push(i)}}));const l=[];return null==(i=null==e?void 0:e.finalModifiers)||i.forEach((e=>{var i;if("group"===(null==e?void 0:e.type)){const l=[];null==(i=null==e?void 0:e.modifiers)||i.forEach((e=>{const i=null==t?void 0:t.find((l=>(null==l?void 0:l.id)===(null==e?void 0:e.id)&&"group"!==(null==l?void 0:l.type)));i?null==l||l.push(i):l.push(e)})),e.modifiers=l}const o=null==t?void 0:t.find((l=>(null==l?void 0:l.id)===(null==e?void 0:e.id)));o?null==l||l.push(o):null==l||l.push(e)})),{...e,finalModifiers:l}}return e},Cl=(e,l,i,t)=>{var o,n;try{const d=((e,l)=>{var i;return(null==(i=null==l?void 0:l.cust_exp_producttype)?void 0:i.includes("Tailored Fit Drapery"))?(null==e||e.forEach((e=>{var i,t;if("Width"===e.display_name||"Largeur"===e.display_name){const o=null==(t=null==(i=null==l?void 0:l.custom_fields)?void 0:i.filter((e=>"Drapery Width"===(null==e?void 0:e.name))))?void 0:t.map((e=>({label:e.value,id:e.value}))).sort(((e,l)=>(null==e?void 0:e.label)-(null==l?void 0:l.label)));e.option_values=o}})),e):e})([...null==(n=[...null==(o=e.provider_specific_data)?void 0:o.modifiers])?void 0:n.filter((e=>"Collection"!==(null==e?void 0:e.display_name)))],e),a=((e,l,i,t,o)=>{const n={},d={};(null==l?void 0:l.length)&&l.forEach((l=>{var i,t,o,a,s,r,u,c,v,p,m;if(D.has(null==l?void 0:l.display_name))if(d[l.display_name]=D.get(null==l?void 0:l.display_name),"text"!==(null==l?void 0:l.type)){const e=null==(t=null==(i=null==l?void 0:l.option_values)?void 0:i.find((e=>e.label===D.get(null==l?void 0:l.display_name))))?void 0:t.id;n[null==l?void 0:l.id]=e}else n[null==l?void 0:l.id]=D.get(null==l?void 0:l.display_name);else if("text"!==(null==l?void 0:l.type)){const e=null==(o=null==l?void 0:l.option_values)?void 0:o.find((e=>e.is_default));d[l.display_name]=(null==e?void 0:e.label)||(null==(a=null==l?void 0:l.option_values[0])?void 0:a.label),n[l.id]=(null==e?void 0:e.id)||(null==(s=null==l?void 0:l.option_values[0])?void 0:s.id)}else"Height"!==l.display_name&&"Hauteur"!==l.display_name||(d[l.display_name]=null==(u=null==(r=null==e?void 0:e.custom_fields)?void 0:r.find((e=>"Default Height"===e.name)))?void 0:u.value),"Width"!==l.display_name&&"Largeur"!==l.display_name||((null==(c=null==e?void 0:e.cust_exp_producttype)?void 0:c.includes("Tailored Fit Drapery"))?d[l.display_name]=null==(m=null==l?void 0:l.option_values[0])?void 0:m.label:d[l.display_name]=null==(p=null==(v=null==e?void 0:e.custom_fields)?void 0:v.find((e=>"Default Width"===e.name)))?void 0:p.value)}));const a=Sl(e,l,d,n,i,t);return Nl(a,o)})(e,d,l,i,t);null==a||a.finalModifiers.sort(((e,l)=>e.sort_order-l.sort_order)),se(d),rl(null==a?void 0:a.selectedModifiersBySku),ll(null==a?void 0:a.selectedModfiersByDisplayName),Y(null==a?void 0:a.selectedModifiers),V(null==a?void 0:a.finalModifiers),(e=>{var l;if((null==e?void 0:e.length)&&!(null==(l=Object.keys(me))?void 0:l.length))if(D.has("step")){const l=+D.get("step");if(1===l)fe({colorAndStyle:!0});else{const i=e[l-2];fe({[null==i?void 0:i.id]:!0})}}else fe({colorAndStyle:!0})})(null==a?void 0:a.finalModifiers)}catch(d){console.error(d)}setTimeout((()=>{cl(!1)}),500)},kl=(e,l,i)=>{if("US"===i){const i=null==e?void 0:e.replace(/[-\s]/g,"");return null==i?void 0:i.substring(0,l)}return 6===(null==e?void 0:e.length)?e.slice(0,3)+" "+(null==e?void 0:e.slice(3)):e},El=async()=>{var e,l,i,o;const n=JSON.parse(localStorage.getItem("_user_location")||"{}");((null==n?void 0:n.ZIPCODE)?null==(e=null==n?void 0:n.ZIPCODE)?void 0:e.replace(/\s+/g,""):"")!==(null==D?void 0:D.get("zip"))&&(null==D||D.get("zip"));const d=t.getCurrentChannelInfo();if(null==D?void 0:D.get("zip")){const e=/^\d{1,5}$/,t=/^[ABCEGHJKLMNPRSTVXY]{1}\d{1}[A-Z]{1} *\d{1}[A-Z]{1}\d{1}$/i,a=null==(l=null==D?void 0:D.get("zip"))?void 0:l.trim();return"EN-US"===(null==d?void 0:d.display_name)?"US"===(null==n?void 0:n.COUNTRY_CODE)&&e.test(a)?kl((null==(i=null==D?void 0:D.get("zip"))?void 0:i.trim())||(null==n?void 0:n.ZIPCODE_NEW)||(null==n?void 0:n.ZIPCODE),5,"US"):"10451":("CA"===(null==n?void 0:n.COUNTRY_CODE)||"CAN"===(null==n?void 0:n.COUNTRY_CODE))&&t.test(a)?kl((null==(o=null==D?void 0:D.get("zip"))?void 0:o.trim())||(null==n?void 0:n.ZIPCODE_NEW)||(null==n?void 0:n.ZIPCODE),6,"CA"):"H1X1W6"}return"EN-US"===(null==d?void 0:d.display_name)?"US"===(null==n?void 0:n.COUNTRY_CODE)&&((null==n?void 0:n.ZIPCODE_NEW)||(null==n?void 0:n.ZIPCODE))?kl((null==n?void 0:n.ZIPCODE_NEW)||(null==n?void 0:n.ZIPCODE),5,"US"):"10451":("CA"===(null==n?void 0:n.COUNTRY_CODE)||"CAN"===(null==n?void 0:n.COUNTRY_CODE))&&((null==n?void 0:n.ZIPCODE_NEW)||(null==n?void 0:n.ZIPCODE))?kl((null==n?void 0:n.ZIPCODE_NEW)||(null==n?void 0:n.ZIPCODE),6,"CA"):"H1X1W6"},Dl=()=>{var e,l,i;return`${m()}apis/products-service/v1/tailor-fit-drapes-style-sku?styleDescription=${(null==(e=null==C?void 0:C.cust_style)?void 0:e.length)&&(null==C?void 0:C.cust_style[0])}&liner=${Ke.LINER}&topTreatment=${sl.TOPTREAT}&width=${(e=>{let l=null==e?void 0:e.toString();return(null==l?void 0:l.endsWith("000"))&&(l=null==l?void 0:l.slice(0,-3)),(null==l?void 0:l.startsWith("0"))&&(l=null==l?void 0:l.slice(1)),Number(l)})(sl.WID)}&colorDescription=${null==(l=null==C?void 0:C.cust_color)?void 0:l[0]}${"FR"===(null==(i=t.getCurrentChannelInfo())?void 0:i.display_name)?"&isFrench=true":""}`},Pl=async()=>{const e=new Headers;
2e.append("clientid","84b514ec64148e7d"),e.append("clientsecret","ae5fd93577e310a13d27f79770fffb5b");const l={method:"GET",headers:e,redirect:"follow"},i=await fetch(`${m()}apis/products-service/v1/custom-fit-drapes-style-sku?styleSegment=${(null==(t=null==C?void 0:C.cust_exp_stylesku)?void 0:t.length)&&(null==C?void 0:C.cust_exp_stylesku[0])}`,l);var t;const o=await(null==i?void 0:i.json());if("success"===(null==o?void 0:o.Status))return null==o?void 0:o.Data},Ol=async()=>{var e,l,i,t,o,n,d,a,s,u,c;try{let v;(null==(e=null==C?void 0:C.cust_exp_producttype)?void 0:e.includes("Tailored Fit Drapery"))&&(v=await(async()=>{var e,l;const i=new Headers;i.append("clientid","84b514ec64148e7d"),i.append("clientsecret","ae5fd93577e310a13d27f79770fffb5b");const t={method:"GET",headers:i,redirect:"follow"},o=await fetch(Dl(),t),n=await(null==o?void 0:o.json());if("success"===(null==n?void 0:n.Status))return(null==(e=null==n?void 0:n.Data)?void 0:e.style_segment)&&Me(null==(l=null==n?void 0:n.Data)?void 0:l.style_segment),null==n?void 0:n.Data})()),((null==(l=null==C?void 0:C.categories)?void 0:l.includes("Custom Made Drapery"))||(null==(i=null==C?void 0:C.categories)?void 0:i.includes("Rideaux Custom Made"))||(null==(t=null==C?void 0:C.categories)?void 0:t.includes("Rideaux faits sur mesure")))&&(v=await Pl()),v&&Oe(v);const f={method:"GET",redirect:"follow"},g=await(async e=>{var l,i,t,o,n,d,a,s,r,u;const c={...sl},v=null==(l=null==C?void 0:C.custom_fields)?void 0:l.find((e=>"EXP Product Main SKU"===e.name)),p=null==(i=null==C?void 0:C.custom_fields)?void 0:i.find((e=>"Style SKU"===e.name));let m=`zip=${await El()}&qty=1&model=${null==v?void 0:v.value}&selections[SLE]=${(null==e?void 0:e.style_segment)||(null==p?void 0:p.value)}`;if(null==(t=Object.keys(Ke))||t.forEach((l=>{"CLR"===l&&(null==e?void 0:e.color_segment)?m+=`&selections[${l}]=${encodeURIComponent(null==e?void 0:e.color_segment)}`:m+=`&selections[${l}]=${encodeURIComponent(Ke[l])}`})),(null==(o=null==C?void 0:C.categories)?void 0:o.includes("Custom Made Drapery"))||((null==(n=null==C?void 0:C.categories)?void 0:n.includes("Rideaux Custom Made"))||(null==(d=null==C?void 0:C.categories)?void 0:d.includes("Rideaux faits sur mesure")))&&(null==e?void 0:e.drapery_collection)){const l=null==(r=null==(s=null==(a=null==re?void 0:re.find((e=>"Hidden options"===e.parent_group_identifier)))?void 0:a.attributes)?void 0:s.find((e=>"Collection"===e.identifier)))?void 0:r.sku;l&&(c[l]=null==e?void 0:e.drapery_collection)}return null==(u=Object.keys(c))||u.forEach((e=>{m+=`&selections[${e}]=${encodeURIComponent(c[e])}`})),m})(v);await p.trackProductViewed(C);const _=await fetch(`${m()}apis/products-service/v1/getPrice?${g}`,f),y=await(null==_?void 0:_.json());"success"===y.Status&&(oe(null==(o=null==y?void 0:y.Data)?void 0:o.split(" ")[0]),(e=>{var l,i,t,o,n,d;if(!ml){let s;const u=D.get("m");let c=[];localStorage.getItem(`${u}_a_d_`)&&(c=JSON.parse(localStorage.getItem(`${u}_a_d_`))),c.length&&(s=null==c?void 0:c.find((e=>(null==e?void 0:e.sku)===(null==C?void 0:C.sku))));const v={search_term:D.get("st"),search_location:null==s?void 0:s.search_location,category:D.get("c")||(null==s?void 0:s.category),collection:null==s?void 0:s.collection,is_primary_algorithm:null==s?void 0:s.is_primary_algorithm,is_secondary_algorithm:null==s?void 0:s.is_secondary_algorithm,algorithm:null==s?void 0:s.algorithm,is_merchandising:null==s?void 0:s.is_merchandising,rule:null==s?void 0:s.rule,rule_type:null==s?void 0:s.rule_type,widget_id:null==s?void 0:s.widget_id,context_type:null==s?void 0:s.context_type,context_data:null==s?void 0:s.context_data,variant:null==s?void 0:s.variant,rules:null==s?void 0:s.rules,search_source:null==s?void 0:s.search_source};(null==s?void 0:s.search_source)&&(v.used_suggestion=D.get("st")||D.get("q")?D.get("st")||D.get("q"):D.get("c")||(null==s?void 0:s.category));const p=[];try{(null==(l=null==C?void 0:C.variant_options)?void 0:l.length)&&(null==(i=null==C?void 0:C.variant_options)||i.forEach((e=>{var l;const i={};let t=null==(l=null==e?void 0:e.option_values)?void 0:l.filter((e=>null==e?void 0:e.is_default));t=0===(null==t?void 0:t.length)?null==e?void 0:e.option_values[0]:t[0],i.name=null==e?void 0:e.display_name,i.value=null==t?void 0:t.label,p.push(i)}))),(null==(o=null==(t=null==C?void 0:C.provider_specific_data)?void 0:t.modifiers)?void 0:o.length)&&(null==(d=null==(n=null==C?void 0:C.provider_specific_data)?void 0:n.modifiers)||d.forEach((e=>{var l;const i={};let t=null==(l=null==e?void 0:e.option_values)?void 0:l.filter((e=>null==e?void 0:e.is_default));t=0===(null==t?void 0:t.length)?null==e?void 0:e.option_values[0]:t[0],i.name=null==e?void 0:e.display_name,i.value=null==t?void 0:t.label,p.push(i)})))}catch(a){console.error(a)}r.trackProductViewed({sku:C.sku,price:Number(e),searchTerm:D.get("st"),search_location:null==s?void 0:s.search_location,mode:D.get("m")?D.get("m"):"direct",category:D.get("c")||(null==s?void 0:s.category),collection:null==s?void 0:s.collection,brand:C.brand,name:C.name,productCategories:null==C?void 0:C.category_meta,is_primary_algorithm:null==s?void 0:s.is_primary_algorithm,is_secondary_algorithm:null==s?void 0:s.is_secondary_algorithm,algorithm:null==s?void 0:s.algorithm,is_merchandising:null==s?void 0:s.is_merchandising,rule:null==s?void 0:s.rule,rule_type:null==s?void 0:s.rule_type,widget_id:null==s?void 0:s.widget_id,context_type:null==s?void 0:s.context_type,context_data:null==s?void 0:s.context_data,variant:null==s?void 0:s.variant,rules:null==s?void 0:s.rules,mode_details:v,product_option:p,facets:null==s?void 0:s.facets}),fl(!0)}})(null==(n=null==y?void 0:y.Data)?void 0:n.split(" ")[0]),(null==(d=null==y?void 0:y.Data)?void 0:d.split(" ")[0])&&(null==(a=null==y?void 0:y.Data)?void 0:a.split(" ")[1])&&+(null==(s=null==y?void 0:y.Data)?void 0:s.split(" ")[1])>+(null==(u=null==y?void 0:y.Data)?void 0:u.split(" ")[0])?ie(null==(c=null==y?void 0:y.Data)?void 0:c.split(" ")[1]):ie("")),Ne(!0)}catch(v){Ne(!0),console.error(v)}},Il=async e=>{var l,i,o,n,a,s,r,u;const c=await d.contentModelRecordSearch({modelInternalName:"product_media",fields:"*",parent_filter:(null==(l=null==e?void 0:e.cust_style)?void 0:l.length)&&(null==(i=null==e?void 0:e.cust_product_type)?void 0:i.length)?[{group:{operator:"AN
2D",rules:[{action:"equal_to",field_name:"product_style",value:`${null==e?void 0:e.cust_style[0]} ${null==e?void 0:e.cust_product_type[0]}`}]}}]:[],skip:"0",limit:"100"});if("success"===(null==c?void 0:c.Status)&&(null==(n=null==(o=null==c?void 0:c.Data)?void 0:o.records)?void 0:n.length)){let l=null==(s=null==(a=null==c?void 0:c.Data)?void 0:a.records)?void 0:s.find((l=>{var i;return(null==(i=null==e?void 0:e.cust_exp_color)?void 0:i.length)&&l.color===e.cust_exp_color[0]}));if(l||(l=null==(u=null==(r=null==c?void 0:c.Data)?void 0:r.records)?void 0:u.find((e=>!e.color))),l){const e=await(async e=>{var l,i,o,n,d,a,s,r,u,c,v,p,m,f,g,_;let y=[],h=[];(null==(d=null==(n=null==(o=null==(i=null==(l=null==e?void 0:e.media)?void 0:l[0])?void 0:i.images)?void 0:o[0])?void 0:n.images)?void 0:d.length)&&(y=(null==(c=null==(u=null==(r=null==(s=null==(a=null==e?void 0:e.media)?void 0:a[0])?void 0:s.images)?void 0:r[0])?void 0:u.images)?void 0:c.map((e=>{try{return JSON.parse(e)}catch(l){return e}})))||[]),(null==(m=null==(p=null==(v=null==e?void 0:e.media)?void 0:v[0])?void 0:p.video)?void 0:m.length)&&(h=(null==(g=null==(f=null==e?void 0:e.media)?void 0:f[0])?void 0:g.video)||[]);const x=[];null==y||y.forEach((e=>{x.push(null==e?void 0:e.id)}));const b={file_ids:x};try{const e=`/apis/media-manager-service/public/v1/file-details?fields=*&locale=${t.getLanguage()}`,l=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);const i=await l.json();"success"===(null==i?void 0:i.Status)&&(null==i?void 0:i.Data)&&(null==(_=null==i?void 0:i.Data)?void 0:_.items)&&(null==y||y.forEach((e=>{var l,t;if(e&&(null==e?void 0:e.id)){const o=null==(t=null==(l=null==i?void 0:i.Data)?void 0:l.items)?void 0:t.find((l=>(null==l?void 0:l.id)===(null==e?void 0:e.id)));o&&(e.alt_text=null==o?void 0:o.alt_text)}})))}catch(w){console.log("err",w)}return e.images=y,e.product_videos=h,e})(l);be(e)}else be({})}else be({})},Ml=async(e,l)=>{var i,t,o,n;let a=[];const s=await d.contentModelRecordSearch({modelInternalName:"product_config",fields:"*",parent_filter:[{group:{operator:"OR",rules:null==e?void 0:e.map((e=>({action:"equal_to",field_name:"content_model_data_id",value:e})))}}],skip:"0",limit:"100"});if("success"===(null==s?void 0:s.Status)){let e=null==(t=null==(i=null==s?void 0:s.Data)?void 0:i.records)?void 0:t.filter((e=>e.product_styles===l.title));(null==e?void 0:e.length)||(e=null==(n=null==(o=null==s?void 0:s.Data)?void 0:o.records)?void 0:n.filter((e=>"All Styles"===e.product_styles))),a=e}return a},Al=async()=>{var e,l,i,o,n,a;let s=[],r={};const u=await d.contentModelRecordSearch({modelInternalName:"product_types",fields:"*",parent_filter:[{group:{operator:"AND",rules:[{action:"equal_to",field_name:"product_type",value:(null==(e=null==C?void 0:C.cust_exp_producttype)?void 0:e.length)?null==C?void 0:C.cust_exp_producttype[0]:""}]}}],skip:"0",limit:"100"});if("success"===(null==u?void 0:u.Status)&&(null==(i=null==(l=null==u?void 0:u.Data)?void 0:l.records)?void 0:i.length)){const e=null==(n=null==(o=null==u?void 0:u.Data)?void 0:o.records)?void 0:n.find((e=>{var l;return e.product_type===(null==(l=null==C?void 0:C.cust_exp_producttype)?void 0:l[0])})),l=e[(()=>{const e=t.getEnvironmentId();return"DEV-117065b7-b084-421b-a3cb-5c81d76197f2-k9k69zwf"===e?"conditional_rules_dev1":"CUSTOM-117065b7-b084-421b-a3cb-5c81d76197f2-sm3a3pqr"===e?"conditional_rules_dev2":"CUSTOM-117065b7-b084-421b-a3cb-5c81d76197f2-4gb3ptf9"===e?"conditional_rules_staging":"PRODUCTION-117065b7-b084-421b-a3cb-5c81d76197f2-nx9wbrel"===e?"conditional_rules":void 0})()];r=l,ue(l),pe.current=l,(null==(a=null==e?void 0:e.product_config)?void 0:a.length)&&(s=null==e?void 0:e.product_config)}else ue([]),pe.current=[],cl(!1);return{productInformationIds:s,configurationRules:r}},Rl=e=>(null==e?void 0:e.length)?"asc"===Be?null==e?void 0:e.sort(((e,l)=>e.sale_price-l.sale_price)):null==e?void 0:e.sort(((e,l)=>l.sale_price-e.sale_price)):[],Tl=e=>{Il(e),yl(e),Cl(e,H,re,ye),Ml(ne,e),k(e)},Ll=()=>{try{const e=bl(z);let l=!0;null==e||e.forEach((e=>{D.get(null==e?void 0:e.display_name)||"Room Label"===(null==e?void 0:e.identifier)||(l=!1)})),Le(l)}catch(e){console.error(e)}},Bl=()=>{var e,l,i;const t=O||D.get("m")||"direct",o=I||D.get("st"),n=M||D.get("c"),d=D.get("w")||A,a=[];if(G&&(null==(e=Object.keys(G))?void 0:e.length))for(const r in G)null==(i=null==(l=null==C?void 0:C.provider_specific_data)?void 0:l.modifiers)||i.forEac
2h((e=>{var l,i;const t={};if((null==(l=null==e?void 0:e.id)?void 0:l.toString())===(null==r?void 0:r.toString())){const l=null==(i=null==e?void 0:e.option_values)?void 0:i.find((e=>{var l,i;return(null==(l=null==e?void 0:e.id)?void 0:l.toString())===(null==(i=G[r])?void 0:i.toString())}));t.name=null==e?void 0:e.display_name,t.value=null==l?void 0:l.label,a.push(t)}}));let s,u=[];localStorage.getItem(`${t}_a_d_`)&&(u=JSON.parse(localStorage.getItem(`${t}_a_d_`))),u.length&&(s=null==u?void 0:u.find((e=>(null==e?void 0:e.sku)===(null==C?void 0:C.sku))));const c={search_term:o,search_location:null==s?void 0:s.search_location,category:n,collection:null==s?void 0:s.collection,is_primary_algorithm:null==s?void 0:s.is_primary_algorithm,is_secondary_algorithm:null==s?void 0:s.is_secondary_algorithm,algorithm:null==s?void 0:s.algorithm,is_merchandising:null==s?void 0:s.is_merchandising,rule:null==s?void 0:s.rule,rule_type:null==s?void 0:s.rule_type,widget_id:null==s?void 0:s.widget_id,context_type:null==s?void 0:s.context_type,context_data:null==s?void 0:s.context_data,variant:null==s?void 0:s.variant,rules:null==s?void 0:s.rules,search_source:null==s?void 0:s.search_source};(null==s?void 0:s.search_source)&&(c.used_suggestion=o||n),r.trackProductAddedToCart({sku:C.sku,totalValue:1*Number(te),quantity:1,price:Number(te),name:C.name,brand:C.brand,mode:t,searchTerm:o,search_location:null==s?void 0:s.search_location,category:n,collection:null==s?void 0:s.collection,productCategories:null==C?void 0:C.category_meta,is_primary_algorithm:null==s?void 0:s.is_primary_algorithm,is_secondary_algorithm:null==s?void 0:s.is_secondary_algorithm,algorithm:null==s?void 0:s.algorithm,is_merchandising:null==s?void 0:s.is_merchandising,rule:null==s?void 0:s.rule,rule_type:null==s?void 0:s.rule_type,widget_id:null==s?void 0:s.widget_id,context_type:null==s?void 0:s.context_type,context_data:null==s?void 0:s.context_data,variant:null==s?void 0:s.variant,rules:null==s?void 0:s.rules,mode_details:c,product_option:a,facets:null==s?void 0:s.facets}),((e,l,i,t,o,n,d,a,s)=>{let r=[];localStorage.getItem("a_d_")&&(r=JSON.parse(localStorage.getItem("a_d_")));const u={mode:e,searchTerm:l,search_location:null==s?void 0:s.search_location,category:i,collection:null==s?void 0:s.collection,sku:t,product_categories:o,varientSku:n,widgetId:d,varientId:a,is_primary_algorithm:null==s?void 0:s.is_primary_algorithm,is_secondary_algorithm:null==s?void 0:s.is_secondary_algorithm,algorithm:null==s?void 0:s.algorithm,is_merchandising:null==s?void 0:s.is_merchandising,rule:null==s?void 0:s.rule,rule_type:null==s?void 0:s.rule_type,widget_id:null==s?void 0:s.widget_id,context_type:null==s?void 0:s.context_type,context_data:null==s?void 0:s.context_data,rules:null==s?void 0:s.rules,facets:null==s?void 0:s.facets,search_source:null==s?void 0:s.search_source};(null==s?void 0:s.search_source)&&(u.used_suggestion=l||i),r.push(u),localStorage.setItem("a_d_",JSON.stringify(r))})(t,o,n,C.sku,null==C?void 0:C.category_meta,"",d,"",s)},Fl=()=>{const e=new Headers;return e.append("clientid","84b514ec64148e7d"),e.append("clientsecret","ae5fd93577e310a13d27f79770fffb5b"),e.append("Content-Type","application/json"),e},$l=async()=>{var e,l,i,t;if(s.isUserLoggedIn()){const o=(null==(l=null==(e=s.getUserDetails())?void 0:e.userInfo)?void 0:l.email)||(null==window?void 0:window.__PING_DETAILS__.userInfo.email);fetch(`${m()}apis/orders-service/v1/save-cart`,{method:"PUT",headers:{clientid:null==L?void 0:L.clientid,clientsecret:null==L?void 0:L.clientsecret,"Content-Type":"application/json"},body:JSON.stringify({cartId:null==(t=null==(i=null==window?void 0:window.__PING_DETAILS__)?void 0:i.userCartObj)?void 0:t.id,userEmail:o})}).then((e=>e.json())).then((e=>{null==e||e.Status})).catch((e=>console.error("Error:",e)))}};return n.useEffect((()=>{var e,l;return(null==(e=Object.keys(sl))?void 0:e.length)&&(null==(l=Object.keys(Ke))?void 0:l.length)&&(Ol(),document.addEventListener("LOCATION_UPDATED",(()=>{Ol()}))),()=>{document.removeEventListener("LOCATION_UPDATED",(()=>Ol()))}}),[sl,Ke]),n.useEffect((()=>{var e,l;return(null==(l=null==(e=null==C?void 0:C.provider_specific_data)?void 0:e.modifiers)?void 0:l.length)?(async()=>{var e,l,i,t,o;let n=[],d=[];const a=[xl(ce),Al()],[s,r]=await Promise.allSettled(a);if("fulfilled"===(null==s?void 0:s.status)&&"fulfilled"===(null==r?void 0:r.status)&&(null==(e=null==r?void 0:r.value)?void 0:e.configurationRules)){const e=null==(l=null==r?void 0:r.value)?void 0:l.configurationRules;(null==(i=null==r?void 0:r.value)?void 0:i.productInformationIds)&&(de(null==(t=null==r?void 0:r.value)?void 0:t.productInformationIds),d=await Ml(null==(o=null==r?void 0:r.value)?void 0:o.productInformationIds,C)),n=hl(null==s?void 0:s.value,e);const a=null==n?void 0:n.some((e=>(null==e?void 0:e.sku)===(null==C?void 0:C.sku)));
2(null==ce?void 0:ce.length)&&!a&&(n=hl(await xl([]),e),ve([])),(null==n?void 0:n.length)?Cl(C,n,e,d):cl(!1)}if(null==n?void 0:n.length){const e={...C,colorOptionsData:n};v({type:"ProductGroup",data:e})}v({type:"Product",data:C}),v({type:"BuyAction",data:C}),v({type:"ImageObject",data:C}),J(Rl(n)),he(d)})():cl(!1),Il(C),yl(C),De((()=>{try{if(B&&Array.isArray(B)){const e={};if(null==B||B.forEach((l=>{const i=null==l?void 0:l.product_types;i&&(null==i||i.forEach((i=>{var t;e[i]||(null==(t=e[i])?void 0:t.length)||(e[i]=(null==l?void 0:l.discount_text)||(null==l?void 0:l.discount_text))})))})),e)return e}return}catch{console.error("Something went wrong, while formatting DiscountBadgeData at product categories controller")}})()),"#write_review"===window.location.hash&&K(!0),document.body.classList.remove("pdp-sticky"),(async()=>{const e=await c({pageData:C,categoryPage:!1});v({type:"Breadcrumbs",data:{from:"category_template",pageData:{...C,category_tree:e}}})})(),()=>document.body.classList.remove("pdp-sticky")}),[]),n.useEffect((()=>{if((null==z?void 0:z.length)&&!R){let e=window.scrollY;const l=document.getElementById(`product-detail-${null==C?void 0:C.id}`);if(!l)return void console.error("Product brief element not found.");const i=parseFloat(window.getComputedStyle(l).marginBottom),t=l.offsetHeight,o=348,n=300,d=document.querySelectorAll(".pdp-info");window.onscroll=function(){const l=window.scrollY;e>l?l<n&&(document.body.classList.remove("pdp-sticky"),d.forEach((e=>{e.style.paddingTop="0px"}))):l>o?(document.body.classList.add("pdp-sticky"),d.forEach((e=>{e.style.paddingTop=`${t+i}px`}))):l<=o&&(document.body.classList.remove("pdp-sticky"),d.forEach((e=>{e.style.paddingTop="0px"}))),e=l}}return Ll(),document.addEventListener("UPDATE_SUMMERY",Ll),()=>document.removeEventListener("UPDATE_SUMMERY",Ll)}),[z]),n.useEffect((()=>{if(null==z?void 0:z.length){let e=!1;const l=bl(z);null==l||l.forEach((l=>{D.has(null==l?void 0:l.display_name)&&"Room Label"!==(null==l?void 0:l.identifier)||G[l.id]&&"!!!&&&!!!"!==G[l.id]||(e=!0)})),Je(e)}else Je(!1)}),[window.location.search,z,G]),{product:C,colorOptions:H,productModifiers:z,isAccordianTabOpen:me,selectedProductOption:Z,selectedModifiers:G,isModalOpen:X,productReviews:Q,averageReviewsCount:il,totalReviewCount:ol,showCreateNewWishListPopup:dl,selectedModifeirsByDisplayNameAndValue:el,selectedProductOptionBySku:Ke,selectedProductModifiersBySku:sl,price:le,sortByFromProductOpt:ge,tempProductModifiers:ae,productInformation:ye,productMedia:xe,isConfiguratorLoading:ul,isProductsAreLoading:we,salePrice:te,selectedCollectionData:Ce,discountBadge:Ee,selectedSubCollection:Ae,filteredSelectedModifiers:vl,styleSkuDetails:Pe,configurationJson:re,selectedStyle:Ie,showMessage:U,isRenderingOnServer:R,showCollectionWithStyle:ze,selectedModifiersOptionValue:$e,isShowPrice:Se,isOnLastStep:Te,isAddToCartButtonDisable:He,isLoading:$,optionsSortBy:Be,setColorOptions:J,setOptionsSortBy:Fe,setShowMessage:q,setSelectedModifiersOptionValue:We,getImageUrl:()=>{var e,l,i,t;return(null==(l=null==(e=null==C?void 0:C.images)?void 0:e.find((e=>"Color Image"===(null==e?void 0:e.description))))?void 0:l.url_zoom)||(null==(t=null==(i=null==C?void 0:C.images)?void 0:i.find((e=>"Color swatch Image"===e.description)))?void 0:t.url_zoom)||""},handleAccordianClick:_l,setSelectedModifiers:Y,setIsModalOpen:K,setShowCreateNewWishListPopUp:al,handleWriteAReviewClick:()=>{E?K(!0):F(`${C.page_slug}#write_review`)},setIsAccordianTabOpen:fe,handleNextButtonClick:e=>{var i,t,o,n,d,a,s,r,u,c,v,p,m,f,g,_;if(null==e||e.preventDefault(),"Color"===Ue&&(null==z?void 0:z.length)){const e=z[0],l=C.cust_color[0];l&&(D.set("Color",l),(null==Ce?void 0:Ce.name)&&D.set("Collection",null==Ce?void 0:Ce.name),P(D)),_l(e.id,!0),document.dispatchEvent(new Event("UPDATE_SUMMERY"))}else{const e=z[Ue+1];if("customHeightWidth"===(null==(i=z[Ue])?void 0:i.type)){const e=null==(o=null==(t=z[Ue])?void 0:t.modifiers)?void 0:o.find((e=>"Height"===e.identifier)),l=null==(d=null==(n=z[Ue])?void 0:n.modifiers)?void 0:d.find((e=>"Width"===e.identifier)),i=G[null==l?void 0:l.id]||(()=>{var e,l,i,t,o,n;if(!(null==(e=null==C?void 0:C.cust_exp_producttype)?void 0:e.includes("Tailored Fit Drapery")))return null==(i=null==(l=null==C?void 0:C.custom_fields)?void 0:l.find((e=>"Default Width"===(null==e?void 0:e.name))))?void 0:i.value;{const e=null==(o=null==(t=null==C?void 0:C.custom_fields)?void 0:t.filter((e=>"Drapery Width"===(null==e?void 0:e.name))))?void 0:o.map((e=>parseInt(e.value))).sort(((e,l)=>e-l));if(null==e?void 0:e.length)return null==(n=e[0])?void 0:n.toString()}})(),r=G[null==e?void 0:e.id]||(null==(s=null==(a=null==C?void 0:C.custom_fields)?void 0:a.find((e=>"Default Height"===(null==e?void 0:e.name))))?void 0:s.value);D.set(null==e?void 0:e.display_name,r),D.set(null==l?void 0:l.display_name,i),P(D),G[null==l?void 0:l.id]&&G[null==e?void 0:e.id]||Y({...G,[
2null==l?void 0:l.id]:i,[null==e?void 0:e.id]:r})}else if("group"!==(null==(r=z[Ue])?void 0:r.type)){const e=$e[null==(u=z[Ue])?void 0:u.id];if(!e)return void l.error("Please select required fields");D.set(null==(c=z[Ue])?void 0:c.display_name,e),P(D)}else{const e={};null==(p=null==(v=z[Ue])?void 0:v.modifiers)||p.forEach((l=>{$e[null==l?void 0:l.id]&&(e[l.display_name]=$e[null==l?void 0:l.id])})),(null==(f=null==(m=z[Ue])?void 0:m.modifiers)?void 0:f.length)===(null==(g=Object.keys(e))?void 0:g.length)&&(null==(_=Object.keys(e))||_.forEach((l=>{D.set(l,e[l]),P(D)})))}_l(e.id,!0),document.dispatchEvent(new Event("UPDATE_SUMMERY"))}},processProgressBar:()=>{let e=0,l=!1;return null==z||z.forEach((i=>{var t;"group"===i.type||"customHeightWidth"===i.type?(null==(t=i.modifiers)||t.forEach((e=>{l=D.has(null==e?void 0:e.display_name)})),l&&(e++,l=!1)):D.has(i.display_name)&&e++})),e>(null==z?void 0:z.length)&&(e=null==z?void 0:z.length),e},configureModifiers:Sl,flatenModifiers:bl,setProductModifiers:V,getZipCode:El,handleSortByChange:e=>{_e(e);let l=[];je(!0),setTimeout((()=>{var i;const t=[...H];l="asc"===(null==(i=null==e?void 0:e.value)?void 0:i.orderBy)?null==t?void 0:t.sort(((e,l)=>e.price-l.price)):null==t?void 0:t.sort(((e,l)=>l.price-e.price)),je(!1),J(l)}),1e3)},setSelectedSubCollection:Re,setSelectedCollectionData:ke,processModifierInformation:Nl,setFilteredSelectedModifiers:pl,setSelectedProductOptionBySku:Qe,setSelectedProductModifiersBySku:rl,setSelectedModifeirsByDisplayNameAndValue:ll,getProductReviewsAndAverageReviewCount:yl,addToCart:async()=>{var e,i,t,o,n,d,r,u,c,v,f;const y=s.getUserDetails();try{let h;W(!0);const x=[{product_id:+(null==C?void 0:C.provider_id),quantity:1}],b=[];null==(i=null==(e=null==C?void 0:C.provider_specific_data)?void 0:e.modifiers)||i.forEach((e=>{var l,i,t,o,n,d,a;if("Style"===(null==e?void 0:e.display_name)&&Ie)b.push({option_id:parseInt(null==e?void 0:e.id),option_value:Ie});else if(G[null==e?void 0:e.id])b.push({option_id:parseInt(null==e?void 0:e.id),option_value:!(null==(l=null==C?void 0:C.cust_exp_producttype)?void 0:l.includes("Tailored Fit Drapery"))||"Width"!==(null==e?void 0:e.display_name)&&"Largeur"!==(null==e?void 0:e.display_name)?G[null==e?void 0:e.id]:parseInt(null==(t=null==(i=G[null==e?void 0:e.id])?void 0:i.toString())?void 0:t.match(/\d+/)[0],10)});else{const l=null==(n=null==(o=null==C?void 0:C.custom_fields)?void 0:o.find((l=>(null==l?void 0:l.name)===(null==e?void 0:e.display_name))))?void 0:n.value;if("text"===(null==e?void 0:e.type))"Color"===(null==e?void 0:e.display_name)&&(null==Pe?void 0:Pe.color_segment)?b.push({option_id:parseInt(null==e?void 0:e.id),option_value:null==Pe?void 0:Pe.color_segment}):l&&b.push({option_id:parseInt(null==e?void 0:e.id),option_value:l});else{const i=null==(a=null==(d=null==e?void 0:e.option_values)?void 0:d.find((e=>e.label===l)))?void 0:a.id;i&&b.push({option_id:parseInt(null==e?void 0:e.id),option_value:i})}}})),b.length>0&&(x[0].option_selections=b);const w=await(async()=>{var e,l,i,t,o,n,d,a,s;const r={},u={...Ke,...sl};if(((null==(e=null==C?void 0:C.categories)?void 0:e.includes("Custom Made Drapery"))||(null==(l=null==C?void 0:C.categories)?void 0:l.includes("Rideaux Custom Made"))||(null==(i=null==C?void 0:C.categories)?void 0:i.includes("Rideaux faits sur mesure")))&&(null==Pe?void 0:Pe.drapery_collection)){const e=null==(n=null==(o=null==(t=null==re?void 0:re.find((e=>"Hidden options"===e.parent_group_identifier)))?void 0:t.attributes)?void 0:o.find((e=>"Collection"===e.identifier)))?void 0:n.sku;u[e]=null==Pe?void 0:Pe.drapery_collection}null==(d=Object.keys(u))||d.forEach((e=>{"CLR"===e&&(null==Pe?void 0:Pe.color_segment)?r[`selections[${e}]`]=null==Pe?void 0:Pe.color_segment:r[`selections[${e}]`]=u[e]}));const c=null==(a=null==C?void 0:C.custom_fields)?void 0:a.find((e=>"EXP Product Main SKU"===e.name)),v=null==(s=null==C?void 0:C.custom_fields)?void 0:s.find((e=>"Style SKU"===e.name));return r.model=null==c?void 0:c.value,r["selections[SLE]"]=(null==Pe?void 0:Pe.style_segment)||(null==v?void 0:v.value),r.zip=await El(),r.qty="1",r})();let j;if(w&&(x[0].btg_payload=w),D.has("edit")){await a.deleteItemInCart({itemId:D.get("edit")}),j=await a.getCart();const e=null==(d=null==(n=null==(o=null==(t=null==y?void 0:y.userCartObj)?void 0:t.line_items)?void 0:o.physical_items)?void 0:n.find((e=>e.id===D.get("edit"))))?void 0:d.quantity;e&&(x[0].quantity=e)}const{currencyInfo:N}=g(),k={code:null==N?void 0:N.currency_code};if((null==(r=null==y?void 0:y.userCartObj)?void 0:r.id)&&!D.has("edit")||(null==j?void 0:j.id)){if(h=await a.addToCart({line_items:x,currency:k}),$l(),"failure"===(null==h?void 0:h.Status))return l.error(h.Error.message),void W(!1)}else{let e="";if((null==(u=null==y?void 0:y.userInfo)?void 0:u.ecommCustomerId)&&(e=null==(c=y.userInfo)?void 0:c.ec
2ommCustomerId),h=await a.createCart({customerId:e,line_items:x,currency:k}),"failure"===(null==h?void 0:h.Status))return l.error(null==(v=null==h?void 0:h.Error)?void 0:v.message),W(!1),void(async()=>{var e,l;if(s.isUserLoggedIn()){const t=(null==(l=null==(e=s.getUserDetails())?void 0:e.userInfo)?void 0:l.email)||(null==window?void 0:window.__PING_DETAILS__.userInfo.email),o=`${m()}apis/orders-service/v1/save-cart/${t}?userEmail=${t}`,n={method:"DELETE",headers:{clientsecret:"ae5fd93577e310a13d27f79770fffb5b",clientid:"84b514ec64148e7d"}};try{await fetch(o,n)}catch(i){console.error("Error:",i)}}})();$l()}const E={...y};"failure"!==h.Status&&(Bl(),E.userCartObj=await a.getCart(),await(async(e,l,i)=>{var t,o,n,d;try{const a=null==e?void 0:e.id,s=null==(t=null==e?void 0:e.line_items)?void 0:t.physical_items,r={cart_id:a};if(null==l?void 0:l.id){const e=null==(d=null==(n=null==l?void 0:l.line_items)?void 0:n.physical_items)?void 0:d.map((e=>e.id)),t=null==s?void 0:s.find((l=>!(null==e?void 0:e.includes(null==l?void 0:l.id))));t&&(r.line_item_id=null==t?void 0:t.id,r.json_data=i)}else{const e=null==(o=null==s?void 0:s[0])?void 0:o.id;a&&e&&i&&(r.line_item_id=e,r.json_data=i)}const u={method:"POST",headers:Fl(),body:JSON.stringify(r),redirect:"follow"},c=S(),v=await fetch(`${m()}apis/orders-service/v1/cart-json?${c}`,u);return await(null==v?void 0:v.json())}catch{return{}}})(null==E?void 0:E.userCartObj,j||(null==y?void 0:y.userCartObj),w));const P={name:null==C?void 0:C.name,sku:null==C?void 0:C.sku,price:te||le,product_type:null==(f=null==C?void 0:C.cust_product_type)?void 0:f[0]};p.trackAddToCart(P),s.setUserDetails(E),W(!1),document.dispatchEvent(new Event("CART_REFRESH")),document.dispatchEvent(new Event("OPEN_CART_SLIDER")),l.success(T("toast_msg_success.product_add_to_cart")),F(_())}catch(h){l.error(T("toast_msg_error.something_went_wrong")),W(!1),console.error(h)}},getColorOptionsAfterFacetsApply:async e=>{const l=await xl(e||[]),i=hl(l,pe.current);return!!(null==i?void 0:i.length)&&(J(Rl(i)),!0)},handleColorOptionClick:async e=>{var l;const i=await(null==(l=d)?void 0:l.getPageDataBySlug({pageSlug:e}));let t=e;const o=null==i?void 0:i.record;["edit","m","c","w","st"].forEach((e=>{D.has(e)&&(t+=(null==t?void 0:t.includes("?"))?`&${e}=${D.get(e)}`:`?${e}=${D.get(e)}`)})),D.forEach(((e,l)=>{l.startsWith("_fs_")&&(t+=(null==t?void 0:t.includes("?"))?`&${l}=${encodeURIComponent(e)}`:`?${l}=${encodeURIComponent(e)}`)})),document.dispatchEvent(new CustomEvent("COLOR_CHANGE",{detail:null==o?void 0:o.domain_urls})),o&&(window.history.replaceState(null,"",t),f(o),Tl(o))},facetData:Ze,enabledFacetsData:Ye,initialFacets:ce}},z=n.lazy((()=>N((()=>import("./product-variants-Ol11Z_ga.js")),__vite__mapDeps([0,1,2,3,4])))),V=e=>{const{getColorOptionsAfterFacetsApply:l,facetData:i,enabledFacetsData:t,initialFacets:o}=e,[d,a]=n.useState([]),[s,r]=n.useState(o||[]),[u,c]=n.useState(o||[]);return n.useEffect((()=>{if(i&&Object.keys(i).length&&(null==t?void 0:t.length)){const e=t.filter((e=>e.is_enabled&&"text"===e.type));if(e.length){const l=((e,l,i)=>{const t=[],o=Object.keys(e||{}).find((e=>e.includes("calculated_price")));return null==l||l.forEach((l=>{var n,d;const a=(null==(n=l.field_name)?void 0:n.includes("calculated_price"))?o?e[o]:void 0:e[l.field_name];if(!a)return;const s=null==(d=a[l.display_name])?void 0:d.buckets;if(!Array.isArray(s)||!s.length)return;const r=s.map((e=>{const t=i.find((i=>{var t,o;return i.field_internal_name===l.field_name&&(null==(t=i.value)?void 0:t.toString().toLowerCase().trim())===(null==(o=e.val)?void 0:o.toString().toLowerCase().trim())}));return{...e,field_internal_name:l.field_name,is_selected:!!t}}));"custom"===l.order&&l.order_item&&(r.forEach((e=>{const i=l.order_item.find((l=>l.name===e.val));i&&(e.index=i.index)})),r.sort(((e,l)=>(e.index??0)-(l.index??0)))),t.push({...l,facet_list:r})})),t.sort(((e,l)=>(e.sort_order??0)-(l.sort_order??0)))})(i,e,s);a(l)}}}),[i,t,s]),n.useEffect((()=>{r(o||[]),c(o||[])}),[o]),{facets:d,handleFacetSelect:(e,i,t)=>{var o,n;const d=t?[...u]:[...s],a=null==(o=null==e?void 0:e.toLowerCase())?void 0:o.trim(),v=null==(n=null==i?void 0:i.toLowerCase())?void 0:n.trim();let p;p=d.find((e=>{var l,i,t,o;const n=null==(i=null==(l=e.field_internal_name)?void 0:l.toLowerCase())?void 0:i.trim(),d=null==(o=null==(t=e.value)?void 0:t.toLowerCase())?void 0:o.trim();return(n===a||!("cust_product_type"!==a&&"cust_product_types"!==a||"cust_product_type"!==n&&"cust_product_types"!==n))&&d===v}))?d.filter((e=>{var l,i,t,o;const n=null==(i=null==(l=e.field_internal_name)?void 0:l.toLowerCase())?void 0:i.trim(),d=null==(o=null==(t=e.value)?void 0:t.toLowerCase())?void 0:o.trim();return!((n===a||!("cust_product_type"!==a&&"cust_product_types"!==a||"cust_product_type"!==n&&"cust_product_types"!==n))&&d===v)})):[...d,{field_internal_name:e,value:i}],t||(r(p),l(p)),c(p)},removeFacet:(e,i)=>{var t,o;const n=null==(t=null==e?void 0:e.toLowerCase())?void 0:t.trim(),d=null==(o=null==i?void 0:i.toLowerCase())?void 0:o.trim(),a=s.filter((e=>{var l,i,t,o;const a=null==(i=null==(l=e.field_internal_name)?void 0:l.toLowerCase())?void 0:i.trim(),s=null==(o=null==(t=e.value)?void 0:t.toLowerCase())?void 0:o.trim();return!((a===n||!("cust_product_type"!==n&&"cust_product_types"!==n||"cust_product_type"!==a&&"cust_product_types"!==a))&&s===d)}));l(a),r(a),c(a)},clearAllFacets:()=>{r([]),l([]),c([])},handleApplyButtonClick:()=>{r(u),l(u)},selectedFacets:s,tempMobileSelectedFacets:u}},Z=l=>{var o,d,a,s,r,c,p,m,f,g,_,y,h,x,b,w,j,S,N,Z,G,Y,X,K,Q;const{product:ee,setProduct:le,components:ie,showFullPageDetails:te=!0,analyticsMode:oe,analyticsSearchTerm:ne,analyticsCategory:de,analyticsWidgetId:ae,isInModalElement:se,queryParams:re,setQueryParams:ue,setIsProductPreviewModalOpen:ce,categoryTree:ve}=l,{colorOptions:pe,productModifiers:me,isAccordianTabOpen:fe,selectedProductOption:ge,selectedModifiers:_e,productReviews:ye,averageReviewsCount:he,totalReviewCount:xe,showCreateNewWishListPopup:be,selectedModifeirsByDisplayNameAndValue:we,selectedProductOptionBySku:je,selectedProductModifiersBySku:Se,price:Ne,sortByFromProductOpt:Ce,tempProductModifiers:ke,productInformation:Ee,productMedia:De,isConfiguratorLoading:Pe,isProductsAreLoading:Oe,salePrice:Ie,selectedCollectionData:Me,discountBadge:Ae,selectedSubCollection:Re,filteredSelectedModifiers:Te,styleSkuDetails:Le,configurationJson:Be,selectedStyle:Fe,showMessage:$e,showCollectionWithStyle:We,selectedModifiersOptionValue:Ue,isOnLastStep:qe,isAddToCartButtonDisable:He,isLoading:Je,setSelectedModifiersOptionValue:ze,getImageUrl:Ve,setShowMessage:Ze,handleAccordianClick:Ge,setSelectedModifiers:Ye,setShowCreateNewWishListPopUp:Xe,handleWriteAReviewClick:Ke,setIsAccordianTabOpen:Qe,handleNextButtonClick:el,processProgressBar:ll,configureModifiers:il,flatenModifiers:tl,setProductModifiers:ol,getZipCode:nl,handleSortByChange:dl,setSelectedSubCollection:al,setSelectedCollectionData:sl,processModifierInformation:rl,setFilteredSelectedModifiers:ul,setSelectedProductOptionBySku:cl,setSelectedProductModifiersBySku:vl,setSelectedModifeirsByDisplayNameAndValue:pl,isShowPrice:ml,addToCart:fl,getColorOptionsAfterFacetsApply:gl,handleColorOptionClick:_l,setOptionsSortBy:yl,setColorOptions:hl,facetData:xl,enabledFacetsData:bl,initialFacets:wl}=J({product:ee,setProduct:le,showFullPageDetails:te,queryParams:re,setQueryParams:ue,analyticsMode:oe,analyticsSearchTerm:ne,analyticsCategory:de,analyticsWidgetId:ae}),{facets:jl,selectedFacets:Sl,handleFacetSelect:Nl,removeFacet:Cl,clearAllFacets:kl,tempMobileSelectedFacets:El,handleApplyButtonClick:Dl}=V({getColorOptionsAfterFacetsApply:gl,facetData:xl,enabledFacetsData:bl,initialFacets:wl}),{t:Pl}=e(),Ol=me,Il=t.getCurrentChannelInfo(),[Ml,Al]=n.useState(null),Rl=n.useMemo((()=>{var e,l;const i=new URLSearchParams;(null==ee?void 0:ee.cust_exp_producttype)&&Array.isArray(null==ee?void 0:ee.cust_exp_producttype)&&(null==(e=null==ee?void 0:ee.cust_exp_producttype)?void 0:e.length)>0&&i.append("productCategory",null==(l=null==ee?void 0:ee.cust_exp_producttype)?void 0:l[0]);const t=null==Il?void 0:Il.language;return"fr-ca"===t||"fr"===t?i.append("language","fr"):i.append("language","en"),i.append("page_size","6"),i.append("page_number","1"),i.toString()}),[null==ee?void 0:ee.cust_exp_product_type,null==Il?void 0:Il.language]),Tl=n.useCallback(((e,l)=>{Al((i=>i&&i.averageRating===e&&i.totalReviews===l?i:{averageRating:e,totalReviews:l}))}),[]),Ll="fr-ca"===(null==Il?void 0:Il.language)||"fr"===(null==Il?void 0:Il.language),Bl=e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"";return n.useEffect((()=>{var e;if(Ml&&Ml.averageRating>0&&Ml.totalReviews>0){const l=(null==ee?void 0:ee.name)||(null==ee?void 0:ee.name)||(null==(e=null==ee?void 0:ee.cust_product_type)?void 0:e[0])||"Blinds To Go";v({type:"AggregateRating",data:{averageRating:Ml.averageRating,totalReviews:Ml.totalReviews,name:l,schemaType:"Product"}})}}),[Ml,null==ee?void 0:ee.name,null==ee?void 0:ee.name,null==ee?void 0:ee.cust_product_type]),i.jsxs(i.Fragment,{children:[i.jsx("style",{children:`.step-active-line:before {\n        width: ${100/Ol.length*ll()}%\n        }`}),i.jsxs("div",{className:"page-body product-page-template",children:[i.jsx(C,{}),Boolean(te)&&i.jsx(k,{pageData:ee,marginBottom:"mb-0",categoryTree:ve}),i.jsx("div",{className:"container",children:i.jsx("div",{className:"flex flex-wrap lg:flex-nowrap py-3 px-4 border border-caution-200 bg-caution-50 mb-4",children:i.jsxs("div",{className:"basis-full lg:basis-10/12 flex",children:[i.jsx("i",{className:"icon mr-2 flex justify-center align-middle min-w-[1.375rem]",children:i.jsx(E,{})}),"fr-ca"!==(null==Il?void 0:Il.language)?i.jsx("div",{className:"text-sm text-neutral-700 font-normal [&_a]:font-medium [&_a]:underline [&_a:hover]:text-primary-default",children:i.jsx("p",{className:"font-medium",children:"Prices exclude installation and delivery services and may vary by location."})}):i.jsx("div",{className:"text-sm text-neutral-700 font-normal [&_a]:font-medium [&_a]:underline [&_a:hover]:text-primary-default",children:i.jsx("p",{className:"font-medium",children:"Les prix n’incluent pas les services d’installation et de livraison et peuvent varier selon la région."})})]})})}
2),i.jsx(D,{draggableAreaId:"production-details-drop-1",components:ie,pageData:ee}),i.jsx("div",{className:"page-content",children:i.jsxs("div",{className:"product-view-section",children:[i.jsxs("div",{className:"product-view-section-wrapper relative mb-12 md:mb-16 lg:mb-24",children:[i.jsx("div",{id:`product-detail-${null==ee?void 0:ee.id}`,className:"mb-4 lg:mb-12 group-[.pdp-sticky]/body:fixed group-[.pdp-sticky]/body:top-0 group-[.pdp-sticky]/body:left-0 group-[.pdp-sticky]/body:bg-white group-[.pdp-sticky]/body:z-50 group-[.pdp-sticky]/body:w-full  group-[.pdp-sticky]/body:shadow-[0px_2px_2px_-1px_rgba(0,_0,_0,_0.04)] group-[.pdp-sticky]/body:py-3 group-[.pdp-sticky]/body:border-b group-[.pdp-sticky]/body:border-neutral-200 lg:group-[.pdp-sticky]/body:py-4 group-[.pdp-sticky]/body:mb-0  group-[.pdp-sticky]/body:transition-all group-[.page-sidebar-open]/body:hidden",children:i.jsxs("div",{className:"container",children:[i.jsxs("div",{className:"flex items-end md:items-center",children:[i.jsx("div",{className:"product-img hidden group-[.pdp-sticky]/body:block lg:group-[.pdp-sticky]/body:hidden lg:hidden min-w-[3.125rem] max-w-[3.125rem] xxsm:min-w-[4.75rem] xxsm:max-w-[4.75rem] mr-3",children:i.jsx("img",{src:null==(o=Ve())?void 0:o.replace("https://cdn11.bigcommerce.com","https://product-images.experro.app"),width:76,height:110,alt:(null==ee?void 0:ee.name)||(null==ee?void 0:ee.name),className:"h-auto max-h-28 object-contain"})}),i.jsx("div",{className:"product-info block w-full",children:i.jsxs("div",{className:"product-detail-top-section mb-0 lg:mb-12 group-[.pdp-sticky]/body:mb-0 lg:group-[.pdp-sticky]/body:mb-4 relative flex flex-wrap items-center justify-between",children:[i.jsxs("div",{className:"w-full md:w-9/12 ",children:[((null==ee?void 0:ee.brand)||(null==ee?void 0:ee.brand))&&i.jsx("p",{className:"product-brand-link mb-2 uppercase text-gray-900",children:i.jsx(P,{to:null==ee?void 0:ee.brand_page_slug,children:(null==ee?void 0:ee.brand)||(null==ee?void 0:ee.brand)})}),i.jsxs("h1",{className:"text-2xl group-[.pdp-sticky]/body:text-lg lg:group-[.pdp-sticky]/body:text-3xl lg:text-3xl product-detail-name text-secondary mb-1 font-secondary "+(Ll?"":"capitalize"),children:[Ll?Bl((null==(d=null==ee?void 0:ee.cust_product_type)?void 0:d[0])||""):(null==(a=null==ee?void 0:ee.cust_product_type)?void 0:a[0])||""," ",i.jsx("span",{className:"block text-xs md:text-lg font-primary",children:Ll?Bl(`${(null==(s=null==ee?void 0:ee.cust_style)?void 0:s[0])||""} ${(null==(r=null==ee?void 0:ee.cust_color)?void 0:r[0])||""}`):`${(null==(c=null==ee?void 0:ee.cust_style)?void 0:c[0])||""} ${(null==(p=null==ee?void 0:ee.cust_color)?void 0:p[0])||""}`})]}),i.jsxs("div",{className:"product-rating-section flex items-center flex-wrap group-[.pdp-sticky]/body:hidden",children:[i.jsx("ul",{className:"mb-0 rating-star-list flex items-center",children:Ml&&Ml.averageRating>0?i.jsxs(i.Fragment,{children:[(e=>{const l=(e=>Math.round(2*e)/2)(Number(e)),t=Math.floor(l),o=l%1!=0,n=5-t-(o?1:0);return i.jsxs("div",{className:"flex items-center gap-x-0.5",children:[[...Array(t)].map(((e,l)=>i.jsx("i",{className:"icon items-center",children:i.jsx(O,{className:"fill-amber-300"})},`full-${l}`))),o&&i.jsxs("div",{className:"relative w-4 h-4 inline-block",children:[i.jsx("i",{className:"icon items-center absolute top-0 left-0 w-4 h-4",children:i.jsx(O,{className:"fill-neutral-300"})}),i.jsx("div",{className:"absolute top-0 left-0 w-4 h-4",style:{clipPath:"inset(0 50% 0 0)"},children:i.jsx("i",{className:"icon items-center block w-4 h-4",children:i.jsx(O,{className:"fill-amber-300"})})})]}),[...Array(n)].map(((e,l)=>i.jsx("i",{className:"icon items-center",children:i.jsx(O,{className:"fill-neutral-300"})},`empty-${l}`)))]})})(Ml.averageRating),i.jsxs("p",{className:"text-sm mb-0 text-neutral-500 ml-2",children:["fr-ca"===(null==Il?void 0:Il.language)?Ml.averageRating.toFixed(1).replace(".",","):Ml.averageRating.toFixed(1),"/5"," ","fr-ca"===(null==Il?void 0:Il.language)?((null==(m=null==ee?void 0:ee.cust_product_type)?void 0:m[0])||(null==(f=null==ee?void 0:ee.cust_exp_producttype)?void 0:f[0])||(null==(g=null==ee?void 0:ee.cust_exp_producttype)?void 0:g[0])||(null==ee?void 0:ee.name)||"").toLowerCase():(null==(_=null==ee?void 0:ee.cust_product_type)?void 0:_[0])||(null==(y=null==ee?void 0:ee.cust_exp_producttype)?void 0:y[0])||(null==(h=null==ee?void 0:ee.cust_exp_producttype)?void 0:h[0])||(null==ee?void 0:ee.name)||""," ",Pl
2("templates.locations.location_detail_page.is_rated")," ","(","fr-ca"===(null==Il?void 0:Il.language)?Ml.averageRating.toFixed(1).replace(".",","):Ml.averageRating.toFixed(1),")"," ",Pl("templates.locations.location_detail_page.out_of_5_based_on")," ",Ml.totalReviews," ",Pl("templates.locations.location_detail_page.reviews")]})]}):i.jsx("div",{className:"flex items-center gap-x-0.5",children:[...Array(5)].map(((e,l)=>i.jsx("i",{className:"icon items-center",children:i.jsx(O,{className:"fill-neutral-300"})},l)))})}),Ml&&Ml.totalReviews>0?i.jsx(P,{to:"#reviews",onClick:()=>{const e=document.getElementById("reviews");if(e&&e.offsetTop){const l=e.offsetTop-200;window.scrollTo({behavior:"smooth",top:l})}},className:"button-secondary text-neutral-700 ml-2 inline-block",children:Pl("templates.locations.location_detail_page.read_reviews")}):Ml&&0===Ml.totalReviews?i.jsx(P,{to:"fr-ca"===(null==Il?void 0:Il.language)||"fr"===(null==Il?void 0:Il.language)?"/soumettre-un-avis/":"/submit-review/",className:"button-secondary text-neutral-700 ml-2 inline-block",children:Pl("templates.locations.location_detail_page.write_a_review")}):null]})]}),i.jsxs("div",{className:"w-full md:w-3/12",children:[i.jsx("p",{className:"mt-2 md:mt-1 mb-1 md:mb-2 text-xs font-medium text-primary-default md:text-right",children:Ae&&"object"==typeof Ae&&(null==(x=Object.keys(Ae))?void 0:x.length)&&(null==ee?void 0:ee.cust_exp_producttype)&&(Ae[null==ee?void 0:ee.cust_exp_producttype[0]]||Ae["All Styles"])?i.jsx("span",{dangerouslySetInnerHTML:{__html:Ae[null==ee?void 0:ee.cust_exp_producttype[0]]||Ae["All Styles"]}}):i.jsx(i.Fragment,{})}),ml&&i.jsx(I,{defaultSalePrice:Ie,defaultPrice:Ne,productDetails:ee,selectedModifiers:_e,pricesectionClassName:"mt-1 lg:mt-0 flex flex-wrap items-center md:justify-end space-x-2",pricewithouttext:"flex items-center space-x-2 md:space-x-4",salePriceClassName:"text-neutral-900 font-normal text-base lg:text-2xl group-[.pdp-sticky]/body:text-xs lg:group-[.pdp-sticky]/body:text-2xl",defaultPriceClassName:"",retailPriceClassName:"text-neutral-400 line-through",labelhideClassName:"mr-0 mobile:w-full"})]}),(null==(b=null==ee?void 0:ee.cust_exp_producttype)?void 0:b.includes("Custom Made Drapery"))&&i.jsx("div",{className:"w-full mt-4 group-[.pdp-sticky]/body:hidden",children:i.jsxs("div",{className:"flex flex-wrap lg:flex-nowrap py-3 px-4 border border-caution-200 bg-caution-50",children:[i.jsxs("div",{className:"basis-full lg:basis-10/12 flex",children:[i.jsx("i",{className:"icon mr-2 flex justify-center align-middle min-w-[1.375rem]",children:i.jsx(E,{})}),"fr-ca"!==(null==Il?void 0:Il.language)?i.jsxs("div",{className:"text-sm text-neutral-700 font-normal [&_a]:font-medium [&_a]:underline [&_a:hover]:text-primary-default",children:[i.jsx("p",{className:"font-medium",children:"Custom Made starting prices are estimates that vary based on your final measurements and preferred accessories."}),$e&&i.jsxs("p",{children:["Your purchase will be completed with the assistance of our expert design consultants. To order drapery with panel widths of 50”, please see"," ",i.jsx(u,{to:"/tailored-fit/",children:"Tailored Fit."})]})]}):i.jsx("div",{className:"text-sm text-neutral-700 font-normal [&_a]:font-medium [&_a]:underline [&_a:hover]:text-primary-default",children:i.jsx("p",{className:"font-medium",children:"Les prix de départ des produits faits sur mesure sont des estimations qui peuvent varier en fonction de vos mesures finales et des accessoires que vous choisissez. Votre achat sera finalisé avec l'aide de nos experts en design."})})]}),"fr-ca"!==(null==Il?void 0:Il.language)&&i.jsx("div",{className:"basis-full lg:basis-2/12 flex items-center ml-8 lg:ml-0 mt-3 lg:mt-0 lg:justify-end lg:text-right",children:i.jsx(P,{to:"javascript:void(0)",onClick:()=>Ze(!$e),className:"button-secondary text-xs text-neutral-700",children:$e?"Read Less":"Read More"})})]})})]})}),qe?i.jsx(i.Fragment,{children:Je?i.jsx("button",{disabled:Je||He||Number(Ie)<=0||!Ie,className:"button-primary hidden mobile:group-[.pdp-sticky]/body:block bg-primary-default text-white border-primary-default md:hidden disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-gray-200 disabled:border-gray-200 disabled:text-neutral-900 w-[35%] p-2 text-xxs min-w-fit",children:Pl("components.e_commerce.product_detail.product_action.adding_to_cart")}):i.jsx("button",{onClick:fl,disabled:Je||He||Number(Ie)<=0||!Ie,className:"button-primary hidden mobile:group-[.pdp-sticky]/body:block bg-primary-default text-white border-primary-default md:hidden disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-gray-200 disabled:border-gray-200 disabled:text-neutral-900 w-[35%] p-2 text-xxs min-w-fit",children:Pl("components.e_commerce.product_detail.product_action.add_to_cart")})}):i.jsx("button",{className:"button-primary hidden mobile:group-[.pdp-sticky]/body:block bg-primary-default text-white border-primary-default md:hidden",onClick:el,children:Pl("components.e_commerce.product_detail.next_button")})]}),i.jsx("div",{className:"lg:px-12 hidden lg:block overflow-x-auto lg:overflow-x-visible auto-cols-auto group-[.pdp-sticky]/body:hidden lg:group-[.pdp-sticky]/body:block min-h-[3.125rem]",children:i.jsx("div",{className:"flex relative justify-between gap-x-3 md:gap-x-8 lg:gap-x-0",children:!Pe&&(null==Ol?void 0:Ol.length)>0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"block w-full h-0.5 bg-primary-lightCoolNeutral absolute left-2/4 top-2.5 max-w-[88%] lg:max-w-[82%] xl:max-w-[88.5%] -ml-0.5 -translate-x-2/4 before:bg-primary-darkGray before:block before:w-0 before:h-0.5 before:transition-all before:duration-300 before:ease-linear step-active-line "}),i.jsxs("div",{id:"color-step",className:"progress-bar group relative round text-center flex flex-wrap justify-start flex-col items-center z-[1] h-full w-auto mobile:min-w-[5.25rem] md:w-24 lg:w-40 "+(re.has("Color")?"active":""),children:[i.jsx("span",{className:"w-6 h-6 flex items-center justify-center text-center text-xxs rounded-full bg-white border border-[#F3EFEE] text-neutral-400 z-[2] group-[.active]:border-neutral-900 group-[.active]:text-neutral-900 ",children:"1"}),i.jsx("p",{className:"w-full text-xs text-neutral-400 font-normal mt-2 group-[.active]:text-primary-darkGray",children:Pl("components.e_commerce.product_detail.style_and_color")})]}),null==Ol?void 0:Ol.map(((e,l)=>{var t;return i.jsxs("div",{id:null==(t=l+1)?void 0:t.toString(),className:"progress-bar group relative round text-center flex flex-wrap justify-start flex-col items-center z-[1] h-full w-auto mobile:min-w-[5.25rem] md:w-24 lg:w-40 "+(ll()>l?"active":""),children:[i.jsx("span",{className:"w-6 h-6 flex items-center justify-center text-center text-xxs rounded-full bg-white border border-[#F3EFEE] text-neutral-400 z-[2] group-[.active]:border-neutral-900 group-[.active]:text-neutral-900 ",children:l+2}),i.jsx("p",{className:"w-full text-xs text-neutral-400 font-normal mt-2 group-[.active]:text-primary-darkGray",children:e.step_display_name||("Height"!==(null==e?void 0:e.display_name)?e.parent_group:Pl("components.e_commerce.product_detail.product_modifiers.product_hight_width_modifiers.product_measurements"))})]})}))]})})})]})}),i.jsx("div",{className:"container pdp-info",children:i.jsxs("div",{className:"flex flex-wrap justify-between -mx-4",children:[i.jsx(M,{productInformation:Ee,isInModalElement:se,product:ee,productMedia:De,queryParams:re}),i.jsxs("div",{className:"px-4 w-full lg:w-6/12 product-detail-section",children:[i.jsx("div",{className:"product-options-section",children:Pe?i.jsx("div",{className:"animate-pulse",children:i.jsxs("div",{className:"h-full w-full border border-gray-200",children:[i.jsx("div",{className:"full h-12 lg:h-16 bg-gray-200"}),i.jsxs("div",{className:"p-4 lg:p-5",children:[i.jsxs("div",{className:"mb-5 items-center justify-center gap-4 pb-5 border-b border-gray-200",children:[i.jsx("div",{className:"pb-5",children:i.jsx("div",{className:"full mb-5 h-10 lg:h-[26px] w-32 bg-gray-200"})}),i.jsxs("div",{className:"flex flex-wrap justify-start -mx-1.5 md:-mx-2.5 gap-y-2 md:gap-y-5 align-center ",children:[i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]})]})]}),i.jsxs("div",{className:"mb-5 items-center justify-center gap-4 pb-5",children:[i.jsx("div",{className:"full mb-5 h-5 w-32 bg-gray-200"}),i.jsxs("div",{className:"flex flex-wrap justify-start -mx-1.5 md:-mx-2.5 gap-y-2 md:gap-y-5 align-center ",children:[i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]})]})]}),i.jsxs("div",{className:"mb-5 items-center justify-center gap-4 pb-5",children:[i.jsx("div",{className:"full mb-5 h-5 w-32 bg-gray-200"}),i.jsxs("div",{className:"flex flex-wrap justify-start -mx-1.5 md:-mx-2.5 gap-y-2 md:gap-y-5 align-center ",children:[i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]})]})]}),i.jsxs("div",{className:"mb-5 items-center justify-center gap-4 pb-5",children:[i.jsx("div",{className:"full mb-5 h-5 w-32 bg-gray-200"}),i.jsxs("div",{className:"flex flex-wrap justify-start -mx-1.5 md:-mx-2.5 gap-y-2 md:gap-y-5 align-center ",children:[i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]}),i.jsxs("div",{className:"px-1.5 md:px-2.5 w-4/12 sm:w-[6.688rem] md:w-[6.75rem] relative",children:[i.jsx("div",{className:"full mb-2 h-[5.5rem] aspect-square w-full bg-gray-200"}),i.jsx("div",{className:"full mb-0.5 h-3 w-[80%] bg-gray-200"})]})]})]}),i.jsx("div",{className:"full mb-5 ml-auto flex h-10 w-32 items-end justify-end bg-gray-200"})]})]})}):i.jsxs("form",{action:"",className:"form-style",children:[i.jsx(A,{handleApplyButtonClick:Dl,tempMobileSelectedFacets:El,setOptionsSortBy:yl,setColorOptions:hl,handleColorOptionClick:_l,removeFacet:Cl,clearAllFacets:kl,selectedFacets:Sl,handleFacetSelect:Nl,facets:jl,isOnLastStep:qe,showCollectionWithStyle:We,handleSortByChange:dl,selectedSubCollection:Re,setSelectedSubCollection:al,setSelectedProductModifiersBySku:vl,setSelectedCollectionData:sl,setSelectedProductOptionBySku:cl,selectedCollectionData:Me,isProductsAreLoading:Oe,sortByFromProductOpt:Ce,handleNextButtonClick:el,isAccordianTabOpen:fe,handleAccordianClick:Ge,colorOptions:pe,product:ee,selectedProductOption:ge,analyticsMode:oe,analyticsSearchTerm:ne,analyticsCategory:de}),i.jsx(R,{isOnLastStep:qe,selectedModifiersOptionValue:Ue,setSelectedModifiersOptionValue:ze,colorData:pe,configurationJson:Be,setFilteredSelectedModifiers:ul,processModifierInformation:rl,productInformation:Ee,tempProductModifiers:ke,setSelectedProductModifiersBySku:vl,queryParams:re,setQueryParams:ue,setSelectedModifeirsByDisplayNameAndValue:pl,configureModifiers:il,flatenModifiers:tl,selectedModifeirsByDisplayNameAndValue:we,handleNextButtonClick:el,isAccordianTabOpen:fe,handleAccordianClick:Ge,productModifiers:me,product:ee,selectedModifiers:_e,setIsAccordianTabOpen:Qe,setSelectedModifiers:Ye,setProductModifiers:ol})]})}),i.jsx(T,{isLoading:Je,addToCa
2rt:fl,isAddToCartButtonDisable:He,selectedStyle:Fe,selectedModifeirsByDisplayNameAndValue:we,salePrice:Ie,getZipCode:nl,configurationJson:Be,styleSkuDetails:Le,productInformation:(null==Ee?void 0:Ee.length)?Ee[0]:{},selectedProductOptionBySku:je,selectedProductModifiersBySku:Se,flatenModifiers:tl,productModifiers:me,product:ee,selectedModifiers:_e,filteredSelectedModifiers:Te,setIsProductPreviewModalOpen:ce,queryParams:re,setShowCreateNewWishListPopUp:Xe,analyticsMode:oe,analyticsSearchTerm:ne,analyticsCategory:de,analyticsWidgetId:ae}),window.matchMedia("(max-width: 767px)").matches&&i.jsx(H,{fromPDP:!0}),i.jsx(L,{queryParams:re,product:ee,mobileclass:"md:hidden mt-12"})]})]})})]}),i.jsx(B,{product:ee,productReviews:ye,averageReviewsCount:he,totalReviewCount:xe,handleWriteAReviewClick:Ke}),i.jsx(F,{productInformation:Ee,product:ee}),i.jsxs("div",{id:"reviews",children:[i.jsx("div",{className:"container",children:i.jsxs("div",{className:"flex flex-row justify-between items-end mb-4 gap-4",children:[Ml&&Ml.totalReviews>0&&i.jsxs("h2",{className:"text-3xl mb-0",children:[Pl("components.e_commerce.product_detail.product_reivews.txt_review")," ",(null==Ml?void 0:Ml.totalReviews)&&1!==Ml.totalReviews?"s":""," ",Pl("components.e_commerce.product_detail.product_reivews.txt_for")," ","fr-ca"===(null==Il?void 0:Il.language)?((null==(w=null==ee?void 0:ee.cust_product_type)?void 0:w[0])||(null==(j=null==ee?void 0:ee.cust_exp_producttype)?void 0:j[0])||"Product").toLowerCase():(null==(S=null==ee?void 0:ee.cust_product_type)?void 0:S[0])||(null==(N=null==ee?void 0:ee.cust_exp_producttype)?void 0:N[0])||"Product"]}),i.jsx(P,{to:"fr-ca"===(null==Il?void 0:Il.language)||"fr"===(null==Il?void 0:Il.language)?"/soumettre-un-avis/":"/submit-review/",className:"button-secondary text-neutral-700 inline-block whitespace-nowrap",children:Pl("templates.locations.location_detail_page.write_a_review")})]})}),i.jsx($,{queryParams:Rl,showRatingInParent:!0,showTitle:!1,showDescription:!1,onRatingData:Tl})]}),Ee&&!!Ee.length&&(null==Ee?void 0:Ee[0].ugc_photo_gallery)&&!!(null==Ee?void 0:Ee[0].ugc_photo_gallery.length)&&i.jsx(W,{marginTop:"mobile:mt-12",ugcPhotoGalleryRel:null==Ee?void 0:Ee[0].ugc_photo_gallery,heading:null==Ee?void 0:Ee[0].photo_gallery_heading,hideHeading:!1,description:null==Ee?void 0:Ee[0].photo_gallery_sub_heading,fromPDPPage:!0}),te&&i.jsx(i.Fragment,{children:i.jsx("div",{className:"container",children:i.jsx("div",{className:"you-may-also-like-section section-gap m-t-100",children:i.jsx(z,{product:ee,showFullPageDetails:te})})})})]})}),i.jsx(D,{draggableAreaId:"production-details-drop-2",components:ie,pageData:ee}),!!(null==(Y=null==(G=null==(Z=null==ee?void 0:ee.globalSettings)?void 0:Z.record)?void 0:G.product_page)?void 0:Y.length)&&(null==(Q=null==(K=null==(X=null==ee?void 0:ee.globalSettings)?void 0:X.record)?void 0:K.product_page)?void 0:Q.map(((e,l)=>i.jsx(n.Fragment,{children:(null==e?void 0:e.display)&&i.jsx(U,{widgetLabel:"None"===(null==e?void 0:e.dynamic_name)?null==e?void 0:e.widget_title:"Prefix"===(null==e?void 0:e.dynamic_name)?`${(null==ee?void 0:ee.name)||(null==ee?void 0:ee.name)} ${null==e?void 0:e.widget_title}`:"Postfix"===(null==e?void 0:e.dynamic_name)?`${null==e?void 0:e.widget_title} ${(null==ee?void 0:ee.name)||(null==ee?void 0:ee.name)}`:"",widgetDescription:null==e?void 0:e.widget_description,isInEcommerceTemplate:!0,wrap_container:"Container"===(null==e?void 0:e.display_in)?"container":"Full"===(null==e?void 0:e.display_in)?"container-fluid":"container",widgetId:null==e?void 0:e.widget_id,component_content:JSON.stringify({limit:null==e?void 0:e.no_of_products})})},null==l?void 0:l.toString())))),i.jsx(D,{draggableAreaId:"production-details-drop-3",components:ie,pageData:ee})]}),i.jsx(q,{isWishlistModalOpen:be,setIsWishlistModalOpen:Xe,product_id:null==ee?void 0:ee.provider_id})]})};export{Z as default};

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.