1import{m as B,c as E}from"./C07OFjNe.js";import{u as O}from"./C_eur5wH.js";import{n as V,af as F,C as u,u as r,U as i,Q as f,V as G,X as T,O as s,M as q,a1 as z,k as W}from"./N9RbkJyi.js";const Z={class:"custom-upholstery-header max-w-container-2xl mx-auto pt-6 lg:pt-8 pb-6 lg:pb-8 text-center"},j={class:"text-h1-mobile md:text-h1-desktop xl:text-h1-xl mb-3"},P={key:0,class:"max-w-[78rem] mx-auto text-[0.95rem] leading-[1.7] tracking-[0.04em] text-neutral-darkgrey px-5 sm:px-6 md:px-8 lg:px-6"},Q={class:"md:hidden"},X=["innerHTML"],J=["innerHTML"],K=["innerHTML"],Y=["innerHTML"],k=105,ne=V({__name:"CustomUpholstery",async setup(ee){let d,C;const w=B(),{apiFetch:H}=E(),L={"Custom-Upholstery":"Custom Upholstery","custom-sofas":"Custom Sofas","custom-sectionals":"Custom Sectionals","custom-chairs-swivels":"Custom Chairs & Swivels","custom-settees":"Custom Settees","custom-dining-chairs":"Custom Dining Chairs","custom-beds-headboards":"Custom Beds & Headboards","custom-chaises-daybeds":"Custom Chaises & Daybeds","custom-stools-ottomans":"Custom Stools & Ottomans"},m=u(()=>{const e=w.params.importId;return Array.isArray(e)?e[0]:e??""}),A=u(()=>L[m.value]??"Custom Upholstery"),I={"Custom-Upholstery":`Handcrafted in North America, each piece in our
1custom upholstery collection promises exceptional comfort and enduring quality. Every item is made to order, so you can choose the exact fabric, finish, and silhouette that's just right for your home. <a href="/Collections/FabricGuide" class="underline">Request free fabric swatches</a> to try our fabrics in person before you buy.`},{data:M}=([d,C]=F(()=>O(`custom-upholstery-desc-${m.value}`,()=>H(`/products/category/${encodeURIComponent(m.value)}/config`),{default:()=>null})),d=await d,C(),d),o=u(()=>I[m.value]??M.value?.description??null),p=W(!1);function S(e){return e.replace(/<[^>]*>/g,"")}const D=new Set(["br","img","hr","input"]),g=/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/g;function N(e,t){let a=0,h=e.length;const c=[];let l=0;g.lastIndex=0;let x;for(;x=g.exec(e);){const n=e.slice(l,x.index);if(a+n.length>=t){h=l+(t-a);break}a+=n.length;const[b,$]=x,y=$.toLowerCase();if(!D.has(y))if(b.startsWith("</")){const v=c.lastIndexOf(y);v!==-1&&c.splice(v,1)}else b.endsWith("/>")||c.push(y);l=g.lastIndex}if(h===e.length&&a<t){const n=e.slice(l);if(a+n.length<t)return e;h=l+(t-a)}let _=e.slice(0,h).replace(/\s+\S*$/,"");for(let n=c.length-1;n>=0;n-=1)_+=`</${c[n]}>`;return`${_}…`}const U=u(()=>o.value?S(o.value).length>k:!1),R=u(()=>o.value?N(o.value,k):"");return(e,t)=>(i(),r("section",Z,[f("h1",j,T(s(A)),1),s(o)?(i(),r("div",P,[f("div",Q,[s(U)?(i(),r(q,{key:1},[s(p)?(i(),r("span",{key:1,class:"inline",innerHTML:s(o)},null,8,K)):(i(),r("span",{key:0,class:"inline",innerHTML:s(R)},null,8,J)),t[1]||(t[1]=z(" Â ",-1)),f("button",{class:"inline-flex items-center gap-1 underline underline-offset-2 whitespace-nowrap",onClick:t[0]||(t[0]=a=>p.value=!s(p))},T(s(p)?"Close":"Read more"),1)],64)):(i(),r("span",{key:0,innerHTML:s(o)},null,8,X))]),f("div",{class:"hidden md:block",innerHTML:s(o)},null,8,Y)])):G("",!0)]))}});export{ne 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.