PageSourceSearch

https://cona.design/_next/static/chunks/app/(app)/layout-f84aa217f…?dpl=dpl_2cHF1b1npXHgmbkHuJhyPGsqANCi

js cona.design collected 2026-10-05 04:04:54 UTC 44,395 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4944],{6320:(e,t,a)=>{"use strict";a.d(t,{l:()=>c,v:()=>r});var n=a(95155),l=a(12115),s=a(26614);let i=(0,l.createContext)("v1");function r(){return(0,l.useContext)(i)}function o(e){let{variant:t}=e;return(0,l.useEffect)(()=>{try{var e;let a=null!=(e=function(e){if("undefined"==typeof document)return null;let t=document.cookie.match(new RegExp("(?:^|; )".concat(e,"=([^;]*)")));return t?decodeURIComponent(t[1]):null}("cona_ia_src"))?e:"default";s.Ay.register({ia_variant:t,ia_src:a}),s.Ay.setPersonProperties({ia_variant:t,ia_src:a},{ia_assigned_at:new Date().toISOString()});let n="cona:iaExposed:".concat(t);localStorage.getItem(n)||(localStorage.setItem(n,"1"),s.Ay.capture("ia_variant_assigned",{ia_variant:t,ia_src:a}))}catch(e){}},[t]),null}function c(e){let{variant:t,children:a}=e;return(0,n.jsxs)(i.Provider,{value:t,children:[(0,n.jsx)(o,{variant:t}),a]})}},10697:(e,t,a)=>{"use strict";a.d(t,{Q6:()=>c,T3:()=>o,ao:()=>u,bq:()=>h,o8:()=>d});var n=a(46830),l=a(41225);let s="/users/me/tutorials",i="idle",r=[];function o(){i="pending"}function c(){i="done";let e=r;r=[],e.forEach(e=>e())}function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1500;return"pending"!==i?Promise.resolve():new Promise(t=>{let a=!1,n=()=>{a||(a=!0,t())};r.push(n),setTimeout(n,e)})}async function u(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:fetch;return 0===t.length||(await a((0,n.Vl)(s),{method:"POST",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({seen:t}),keepalive:!0})).ok}async function h(e){var t;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fetch,i=await a((0,n.Vl)(s),{headers:{Authorization:"Bearer ".concat(e)}});if(!i.ok)return;let r=await i.json().catch(()=>null),o=Array.isArray(null==r?void 0:r.seen)?r.seen.filter(l.Z8):[],{toLocal:c,toServer:d}=(t=l.er.filter(e=>(0,l._t)(e)),{toLocal:o.filter(e=>!t.includes(e)),toServer:t.filter(e=>!o.includes(e))});c.forEach(e=>(0,l.I3)(e)),await u(e,d,a)}},20063:(e,t,a)=>{"use strict";var n=a(47260);a.o(n,"useParams")&&a.d(t,{useParams:function(){return n.useParams}}),a.o(n,"usePathname")&&a.d(t,{usePathname:function(){return n.usePathname}}),a.o(n,"useRouter")&&a.d(t,{useRouter:function(){return n.useRouter}}),a.o(n,"useSearchParams")&&a.d(t,{useSearchParams:function(){return n.useSearchParams}})},35485:(e,t,a)=>{"use strict";a.d(t,{D:()=>r});var n=a(46830),l=a(18372);let s=new Map,i=new Map;async function r(e){let t=s.get(e);if(t)return t;let a=i.get(e);if(a)return a;let r=(async()=>{try{let t=await fetch((0,n.uI)("/items/".concat(encodeURIComponent(e))),{headers:{Accept:"application/json"}});if(!t.ok)return null;let a=await t.json();if(!(null==a?void 0:a.id))return null;let i=(0,l.eE)(a);return s.set(e,i),i}catch(e){return null}finally{i.delete(e)}})();return i.set(e,r),r}},36265:(e,t,a)=>{Promise.resolve().then(a.bind(a,90107))},36722:(e,t,a)=>{"use strict";a.d(t,{Ur:()=>o,_o:()=>u,jK:()=>c});var n=a(12115);let l=null,s=new Set,i=()=>s.forEach(e=>e());function r(e){return s.add(e),()=>{s.delete(e)}}function o(e){return l=e,i(),()=>{l===e&&(l=null,i())}}function c(){return l}function d(){return l}function u(){return(0,n.useSyncExternalStore)(r,d,d)}},60799:(e,t,a)=>{"use strict";a.d(t,{$I:()=>o,A6:()=>c,FE:()=>h,TR:()=>u});var n=a(46830),l=a(82992),s=a(41225),i=a(47553),r=a(10697);async function o(e,t){let a=(null==t?void 0:t.includeObjects)!==!1;try{let t=await fetch((0,n.Vl)("/posts/".concat(e,"/forkable-design?include_objects=").concat(a))),l=await t.json().catch(()=>null);if(!t.ok||!(null==l?void 0:l.design_data))return!1;return(0,s.z2)(),h(l.design_data,{includeFurniture:a,originPostId:e}),!0}catch(e){return!1}}async function c(e){try{let t=await fetch((0,n.Vl)("/share-links/".concat(encodeURIComponent(e)))),a=await t.json().catch(()=>null);if(!t.ok||!(null==a?void 0:a.design_data))return!1;return h(a.design_data,{includeFurniture:!0}),!0}catch(e){return!1}}async function d(){return await (0,r.o8)(),!(0,s._t)("template")||((0,s.z2)(),!1)}async function u(e,t){try{let o,c=await fetch((0,n.Vl)("/templates/".concat(encodeURIComponent(e)))),u=await c.json().catch(()=>null),p=null==u||null==(a=u.template)?void 0:a.design_data;if(!c.ok||!(null==p?void 0:p.floorplanData))return!1;let f=(null==t?void 0:t.includeFurniture)!==!1;if((null==t?void 0:t.tutorial)&&f&&await d()){let e=function(e){var t;let a=(0,i.d0)(e);return a?{placedObjects:a.objects,script:a.script}:{placedObjects:null!=(t=e.placedObjects)?t:[],script:null}}(p);o=e.placedObjects;var a,l,r=e.script;try{sessionStorage.setItem("cona:tutorial","1")}catch(e){}(0,s.Cf)("template"),r?(0,s.DR)(r):(0,s.z2)()}return h(p,{includeFurniture:f,placedObjectsOverride:o,designName:"string"==typeof(null==u||null==(l=u.template)?void 0:l.name)?u.template.name:void 0}),!0}catch(e){return!1}}function h(e,t){var a,n,s,i,r,o,c;let{includeFurniture:d,placedObjectsOverride:u,designName:h,originPostId:p}=t,f=u||(d?null!=(a=e.placedObjects)?a:[]:Array.isArray(c=e.placedObjects)?c.filter(e=>"string"==typeof(null==e?void 0:e.protoId)&&e.protoId.startsWith("light:")):[]),m={...h?{designName:h}:{},...p?{originPostId:p}:{},floorplanData:e.floorplanData,openings:null!=(n=e.openings)?n:[],placedFurniture:d&&null!=(s=e.placedFurniture)?s:[],placedObjects:f,floorTexture:null!=(i=e.floorTexture)?i:null,wallColor:null!=(r=e.wallColor)?r:null,wallTexture:null!=(o=e.wallTexture)?o:null,autoCeilingLightIntensity:e.autoCeilingLightIntensity,autoCeilingLightWarmth:e.autoCeilingLightWarmth,ceilingLightsEnabled:!f.some(e=>(null==e?void 0:e.protoId)==="light:ceiling-downlight")||e.ceilingLightsEnabled,environmentPreset:e.environmentPreset,...e.briefs?{briefs:e.briefs}:{},updatedAt:Date.now()};(0,l.J)("designDraft:unsaved",JSON.stringify(m)),localStorage.removeItem("floorplanData")}},72104:(e,t,a)=>{"use strict";a.d(t,{QK:()=>c,jY:()=>u,lG:()=>p,qw:()=>o});var n=a(12115);let l=[],s=new Set,i=()=>
1s.forEach(e=>e());function r(e){return s.add(e),()=>{s.delete(e)}}function o(e,t,a,n){let s=l[l.length-1];s&&s.kind===e&&s.id===t||(l=[...l,{kind:e,id:t,source:a,...n?{hint:n}:{}}],i())}function c(){l.length&&(l=l.slice(0,-1),i())}function d(){return l.length?l[l.length-1]:null}function u(){return(0,n.useSyncExternalStore)(r,d,d)}function h(){return l}function p(){return(0,n.useSyncExternalStore)(r,h,h)}},90107:(e,t,a)=>{"use strict";a.d(t,{default:()=>eb});var n=a(95155),l=a(20063),s=a(12115),i=a(47650),r=a(52619),o=a.n(r),c=a(15239),d=a(86153),u=a(56798),h=a(6822);let p=[{href:"/feed",label:"Inspo",icon:"/icons/light-bulb.svg",requiresAuth:!1}];function f(e){return"/create"===e||(null==e?void 0:e.startsWith("/create/"))===!0||(null==e?void 0:e.startsWith("/create-floorplan"))===!0}function m(e){return(null==e?void 0:e.startsWith("/create-floorplan"))===!0}function x(e){return"/scan/camera"===e||(null==e?void 0:e.startsWith("/scan/camera/"))===!0}function g(e){let{children:t}=e,a=(0,l.usePathname)(),{accessToken:r,email:g,logout:v}=(0,d.N)(),[b,j]=(0,s.useState)(!1),[y,w]=(0,s.useState)(!1),[N,k]=(0,s.useState)(null),_=(0,s.useRef)(null),C=!!r,S=(null==g?void 0:g.split("@")[0])||"Guest",E="/feed"===a||(null==a?void 0:a.startsWith("/feed/")),I="/create"===a||(null==a?void 0:a.startsWith("/create/")),A="/profile"===a||(null==a?void 0:a.startsWith("/profile/"))===!0,P=(null==a?void 0:a.startsWith("/app/post"))===!0,T=f(a)?"design":E?"inspo":P?"post":A?"profile":"other",O=e=>t=>{var a,n;let l=null==(n=t.target)||null==(a=n.closest)?void 0:a.call(n,"[data-nav-tab]"),s=null==l?void 0:l.dataset.navTab;s&&(0,u.cU)({tab:s,from_tab:T,surface:e})},R=E||I||A||P;(0,s.useEffect)(()=>{let e=window.matchMedia("(min-width: 1024px)"),t=()=>w(e.matches);return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,s.useEffect)(()=>{if(!b||!y||!_.current)return void k(null);let e=_.current.getBoundingClientRect();k({top:e.top,left:e.left,width:e.width,height:e.height})},[b,y]);let z=p.filter(e=>!e.requiresAuth||C),D=b&&y&&N&&"undefined"!=typeof document&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>j(!1),"aria-hidden":!0}),(0,n.jsx)("div",{className:"fixed z-50 w-48 overflow-hidden rounded-xl border border-[var(--surface-border-strong)] bg-white shadow-[var(--shadow-modal)]",style:{left:Math.max(8,Math.min(N.left+N.width/2-96,window.innerWidth-192-8)),top:N.top-8,transform:"translateY(-100%)"},children:C?(0,n.jsxs)("div",{className:"py-2",children:[(0,n.jsxs)("div",{className:"border-b border-[var(--surface-border-strong)] px-4 py-2",children:[(0,n.jsx)("p",{className:"mb-1 text-xs text-[var(--app-fg-subtle)]",children:"Signed in as"}),(0,n.jsx)("p",{className:"truncate text-sm font-medium text-[var(--app-fg)]",children:S})]}),(0,n.jsx)(o(),{href:"/profile",onClick:()=>j(!1),className:"block w-full px-4 py-2 text-left text-sm text-[var(--app-fg-muted)] transition-colors hover:bg-black/5 focus-visible:ring-2 focus-visible:ring-[var(--focus-ring)]",children:"My page"}),(0,n.jsx)("button",{type:"button",onClick:()=>{v(),j(!1)},className:"w-full px-4 py-2 text-left text-sm text-[var(--app-fg-muted)] transition-colors hover:bg-black/5 focus-visible:ring-2 focus-visible:ring-[var(--focus-ring)]",children:"Sign out"})]}):(0,n.jsxs)("div",{className:"py-2",children:[(0,n.jsx)(o(),{href:"/signin",onClick:()=>j(!1),className:"block px-4 py-2 text-sm text-[var(--app-fg-muted)] transition-colors hover:bg-black/5 focus-visible:ring-2 focus-visible:ring-[var(--focus-ring)]",children:"Sign in"}),(0,n.jsx)(o(),{href:"/register",onClick:()=>j(!1),className:"block px-4 py-2 text-sm text-[var(--app-fg-muted)] transition-colors hover:bg-black/5 focus-visible:ring-2 focus-visible:ring-[var(--focus-ring)]",children:"Sign up"})]})})]});return(0,n.jsxs)("div",{className:"flex ".concat(x(a)?"min-h-dvh":"min-h-screen"," min-w-0 overflow-x-hidden ").concat(R?"":"bg-[var(--app-bg)]"),style:R?{backgroundColor:h.u6}:void 0,children:[(0,n.jsx)("aside",{className:"fixed left-0 top-0 z-40 hidden h-screen w-20 flex-shrink-0 overflow-x-hidden overflow-y-auto lg:block",style:{backgroundColor:h.u6,top:"var(--scan-banner-h, 0px)",height:"calc(100vh - var(--scan-banner-h, 0px))"},children:(0,n.jsxs)("div",{className:"flex min-h-full min-w-0 flex-col",children:[(0,n.jsx)("div",{className:"flex shrink-0 items-center justify-center px-2 pb-3 pt-6",children:(0,n.jsx)(o(),{href:"/feed",className:"flex h-8 w-full items-center justify-center rounded-[8px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring)] focu
1s-visible:ring-offset-2","aria-label":"Cona home",children:(0,n.jsx)("span",{className:"cona-wordmark text-[24px] leading-none text-[var(--content-on-inverse)]",children:"Cona"})})}),(0,n.jsxs)("nav",{className:"flex min-w-0 flex-1 flex-col gap-0.5 px-1.5 pt-1","aria-label":"App sections",onClick:O("rail"),children:[(0,n.jsxs)(o(),{href:"/create","data-nav-tab":"design",className:(0,h.Un)(f(a)),"aria-current":f(a)?"page":void 0,children:[(0,n.jsx)("span",{className:(0,h.dI)(f(a)),children:(0,n.jsx)(c.default,{src:"/icons/plus-square.svg",alt:"",width:16,height:16,className:h.mr,unoptimized:!0})}),(0,n.jsx)("span",{className:h.$J,children:"Design"})]}),z.map(e=>{let t=a===e.href||(null==a?void 0:a.startsWith(e.href+"/"));return(0,n.jsxs)(o(),{href:e.href,"data-nav-tab":e.label.toLowerCase(),className:(0,h.wP)(t),"aria-current":t?"page":void 0,children:[(0,n.jsx)(c.default,{src:e.icon,alt:"",width:22,height:22,className:(0,h.BV)(t),unoptimized:!0}),(0,n.jsx)("span",{className:h.$J,children:e.label})]},e.href)}),(0,n.jsxs)(o(),{href:"/app/post","data-nav-tab":"post",className:(0,h.wP)((null==a?void 0:a.startsWith("/app/post"))===!0),"aria-current":(null==a?void 0:a.startsWith("/app/post"))?"page":void 0,children:[(0,n.jsx)(c.default,{src:"/icons/send-diagonal.svg",alt:"",width:22,height:22,className:(0,h.BV)((null==a?void 0:a.startsWith("/app/post"))===!0),unoptimized:!0}),(0,n.jsx)("span",{className:h.$J,children:"Post"})]})]}),(0,n.jsx)("div",{className:"mt-auto flex min-w-0 shrink-0 flex-col gap-0.5 px-1.5 pb-3 pt-2",children:(0,n.jsxs)("button",{ref:_,type:"button",onClick:()=>j(!b),className:(0,h.wP)(b),"aria-expanded":b,"aria-label":"Account menu",children:[(0,n.jsx)("span",{className:"flex h-[26px] w-[26px] items-center justify-center rounded-full bg-white/[0.12] text-[11px] font-semibold uppercase text-white",children:(C&&S?S[0]:"G").toUpperCase()}),(0,n.jsx)("span",{className:h.$J,children:"Profile"})]})})]})}),D&&(0,i.createPortal)(D,document.body),m(a)||x(a)?null:(0,n.jsxs)("header",{className:"fixed left-0 right-0 top-0 z-40 flex items-center justify-between border-b border-white/[0.06] px-4 pb-2.5 pt-[max(0.5rem,env(safe-area-inset-top))] lg:hidden",style:{backgroundColor:h.u6,top:"var(--scan-banner-h, 0px)"},children:[(0,n.jsx)(o(),{href:"/feed",className:"inline-flex h-8 shrink-0 items-center rounded-[8px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 focus-visible:ring-offset-2 focus-visible:ring-offset-[#1F1B17]","aria-label":"Cona home",children:(0,n.jsx)("span",{className:"cona-wordmark text-[24px] leading-none text-[var(--content-on-inverse)]",children:"Cona"})}),(0,n.jsx)("button",{type:"button",onClick:()=>j(!b),className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 ".concat(b?"bg-white/[0.08]":"hover:bg-white/[0.06]"),"aria-expanded":b,"aria-label":"Account menu",children:(0,n.jsx)("span",{className:"flex h-[26px] w-[26px] items-center justify-center rounded-full bg-white/[0.12] text-[11px] font-semibold uppercase text-white",children:(C&&S?S[0]:"G").toUpperCase()})})]}),(0,n.jsx)("main",{className:x(a)?"min-w-0 flex-1 overflow-hidden lg:ml-[84px]":"min-w-0 flex-1 overflow-x-hidden pb-20 lg:ml-[84px] lg:mr-1 lg:mt-1.5 lg:overflow-hidden lg:rounded-t-[16px] lg:pb-0 lg:shadow-[inset_0_1px_0_rgba(255,255,255,0.06),inset_1px_0_0_rgba(255,255,255,0.05)] ".concat(!m(a)?h.q8:"pt-[var(--scan-banner-h,0px)]"," ").concat(R?"bg-app-panel-bg":"bg-[var(--app-bg)]"),style:x(a)?{backgroundColor:h.u6}:void 0,children:t}),x(a)?null:(0,n.jsxs)("nav",{className:"fixed bottom-0 left-0 right-0 z-40 flex items-stretch justify-around gap-0 px-2 pb-[max(0.375rem,env(safe-area-inset-bottom))] pt-1.5 lg:hidden",style:{backgroundColor:h.u6},"aria-label":"Main navigation",onClick:O("bottom_bar"),children:[(0,n.jsxs)(o(),{href:"/create","data-nav-tab":"design",className:"".concat((0,h.Un)(f(a))," min-w-0 flex-1"),"aria-current":f(a)?"page":void 0,children:[(0,n.jsx)("span",{className:(0,h.dI)(f(a)),children:(0,n.jsx)(c.default,{src:"/icons/plus-square.svg",alt:"",width:16,height:16,className:h.mr,unoptimized:!0})}),(0,n.jsx)("span",{className:h.$J,children:"Design"})]}),(0,n.jsxs)(o(),{href:"/feed","data-nav-tab":"inspo",className:"".concat((0,h.wP)("/feed"===a||(null==a?void 0:a.startsWith("/feed/"))===!0)," min-w-0 flex-1"),"aria-current":"/feed"===a||(null==a?void 0:a.startsWith("/feed/"))?"page":void 0,children:[(0,n.jsx)(c.default,{src:"/icons/light-bulb.svg",alt:"",width:22,height:22,className:(0,h.BV)("/feed"===a||(null==a?void 0:a.startsWith("/feed/"))===!0),unoptimized:!0}),(0,n.jsx)("span",{className:h.$J,children:"Inspo"})]}),(0,n.jsxs)(o(),{href:"/app/post","data-nav-tab":"post",className:"".concat((0,h.wP)((null==a?void 0:a.startsWith("/app/post"))===!0)," min-w-0 flex-1"),"aria-current":(null==a?void 0:a.startsWith("/app/post"))?"page":void 0,children:[(0,n.jsx)(c.default,{src:"/icons/send-diagonal.svg",alt:"",width:22,height:22,className:(0,h.BV)((null==a?void 0:a.startsWith("/app/post"))===!0),unoptimized:!0}),(0,n.jsx)("span",{className:h.$J,children:"Post"})]})]}),b?(0,n.jsx)("div",{className:"fixed inset-0 z-50 lg:hidden","aria-hidden":!0,onClick:()=>j(!1),children:(0,n.jsx)("div",{className:"absolute right-4 w-48 overflow-hidden rounded-xl border border-[var(--surface-border-strong)] bg-white shadow-[var(--shadow-modal)]",style:{to
1p:"calc(max(0.5rem, env(safe-area-inset-top)) + 3rem + 0.375rem)"},onClick:e=>e.stopPropagation(),children:C?(0,n.jsxs)("div",{className:"py-2",children:[(0,n.jsxs)("div",{className:"border-b border-[var(--surface-border-strong)] px-4 py-2",children:[(0,n.jsx)("p",{className:"mb-1 text-xs text-[var(--app-fg-subtle)]",children:"Signed in as"}),(0,n.jsx)("p",{className:"truncate text-sm font-medium text-[var(--app-fg)]",children:S})]}),(0,n.jsx)(o(),{href:"/profile",onClick:()=>j(!1),className:"block px-4 py-3 text-sm text-[var(--app-fg-muted)] hover:bg-black/5",children:"My page"}),(0,n.jsx)("button",{type:"button",onClick:()=>{v(),j(!1)},className:"w-full px-4 py-3 text-left text-sm text-[var(--app-fg-muted)] hover:bg-black/5",children:"Sign out"})]}):(0,n.jsxs)("div",{className:"py-2",children:[(0,n.jsx)(o(),{href:"/signin",onClick:()=>j(!1),className:"block px-4 py-3 text-sm text-[var(--app-fg-muted)] hover:bg-black/5",children:"Sign in"}),(0,n.jsx)(o(),{href:"/register",onClick:()=>j(!1),className:"block px-4 py-3 text-sm text-[var(--app-fg-muted)] hover:bg-black/5",children:"Sign up"})]})})}):null]})}var v=a(1022),b=a(29061);function j(){let{accessToken:e}=(0,d.N)();return(0,s.useEffect)(()=>{(0,b.cp)({accessToken:e||null,anonId:(0,v.ly)()})},[e]),null}var y=a(16443),w=a(99099),N=a(72104),k=a(96200),_=a(95567),C=a(17545),S=a(22453),E=a(35485),I=a(3125),A=a(34545),P=a(46830),T=a(36722),O=a(29416),R=a(23639),z=a(54160),D=a(47504);function L(e){return"/create-floorplan/design?addItem=".concat(encodeURIComponent(e))}async function U(e){let{itemId:t,surface:a}=e,n=(0,T.jK)();if(n)try{return await n.addItem(t),(0,u.u4)("item_added_to_design",{item_id:t,surface:a,route:"editor_bridge"}),(0,z.P0)("Added to ".concat(n.designName)),{kind:"added",designName:n.designName}}catch(e){return{kind:"error",message:"Couldn't add to the open design"}}let l=(0,O.AN)(),{accessToken:s}=(0,b.SQ)();if((null==l?void 0:l.designId)&&s)try{var i;let n=null!=(i=e.catalogItem)?i:await (0,E.D)(t);if(!n)throw Error("item unavailable");let r=await (0,D.M_)({item:n,loadTargetDesignId:l.designId,getAccessToken:()=>s});if(!r)throw Error("target unavailable");let o=await fetch((0,P.Vl)("/designs/".concat(l.designId,"/objects/append")),{method:"POST",headers:{Authorization:"Bearer ".concat(s),"Content-Type":"application/json"},body:JSON.stringify({placed_objects:[{...r.placedObject,meta:{...r.placedObject.meta,addedVia:"remote"}}]})});if(!o.ok)throw Error("append ".concat(o.status));return(0,u.u4)("item_added_to_design",{item_id:t,surface:a,route:"headless_append"}),(0,R.TG)(),(0,z.P0)("Added to ".concat(l.name),{action:{label:"Open",href:"/create-floorplan/design?designId=".concat(l.designId)}}),{kind:"added",designName:l.name}}catch(e){return{kind:"error",message:"Couldn't add to that design"}}return(null==l?void 0:l.anonKey)?((0,u.u4)("item_added_to_design",{item_id:t,surface:a,route:"draft_navigate"}),window.location.assign(L(t)),{kind:"navigated"}):{kind:"needs_target"}}async function V(e){var t;await (0,R.L4)(e.itemId,null!=(t=e.qty)?t:1),(0,u.u4)("cart_added",{item_id:e.itemId,surface:e.surface,route:"manual"}),C.V3.log({surface:e.surface,entityType:"item",entityId:e.itemId,eventType:"cart_add"}),(0,z.P0)("Added to cart",{action:{label:"Open cart",href:"/cart"}})}var W=a(87806),M=a(18051);let J={status:"idle",ids:new Set},q=new Set,B=()=>q.forEach(e=>e());function F(e){return q.add(e),()=>{q.delete(e)}}let K=(e,t)=>"".concat(e,":").concat(t);function $(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ready";J={status:t,ids:e},B()}let Y=null;async function Q(e,t){let a=K(e,t),n=!J.ids.has(a),l=new Set(J.ids);n?l.add(a):l.delete(a),$(l,J.status);try{let{accessToken:a,anonId:l}=(0,b.SQ)(),s=await fetch((0,P.Vl)("/saves/".concat(e,"/").concat(encodeURIComponent(t)).concat((0,b.kr)("?"))),{method:n?"PUT":"DELETE",headers:{"Content-Type":"application/json",...(0,b.NN)()},body:n?JSON.stringify(!a&&l?{aid:l}:{}):void 0});if(!s.ok)throw Error("saves ".concat(s.status));return{ok:!0,saved:n}}catch(t){let e=new Set(J.ids);return n?e.delete(a):e.add(a),$(e,"error"),{ok:!1,saved:!n}}}function G(){return J}let X=!1,H=!1,Z={item:"item",post:"look",template:"floorplan",building:"building"};async function ee(e){let{ok:t,saved:a}=await Q(e.type,e.id);return t?((0,u.u4)("save_toggled",{entity_type:e.type,entity_id:e.id,saved:a,surface:e.surface}),C.V3.log({surface:e.surface,entityType:e.type,entityId:e.id,eventType:a?"save":"unsave"}),a&&(0,z.P0)("Saved ".concat(Z[e.type]),{action:{label:"View saved",href:"/you"}})):(0,z.P0)(a?"Couldn't remove that ".concat(Z[e.type]," — try again"):"Couldn't save — try again"),a}var et=a(57357);function ea(e){let{type:t,id:a,surface:l}
1=e,i=(0,s.useSyncExternalStore)(F,G,G).ids.has(K(t,a)),[r,o]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{!function e(){if(X||(X=!0,(0,b.Ef)(()=>{H=!1,e()})),H)return;if(Y)return void Y.then(()=>e());let{accessToken:t,anonId:a}=(0,b.SQ)();(t||a)&&(H=!0,(function(){if(Y)return Y;let{accessToken:e,anonId:t}=(0,b.SQ)();return e||t?Y=fetch((0,P.Vl)("/saves/ids".concat((0,b.kr)("?"))),{headers:(0,b.NN)()}).then(async e=>{var t;if(!e.ok)throw Error("saves/ids ".concat(e.status));let a=await e.json(),n=new Set;for(let[e,l]of Object.entries(null!=(t=a.ids_by_type)?t:{}))for(let t of null!=l?l:[])n.add("".concat(e,":").concat(t));$(n)}).catch(()=>{J={...J,status:"error"},B()}).finally(()=>{Y=null}):Promise.resolve()})().then(()=>{"error"===J.status&&(H=!1)}))}()},[]),(0,n.jsx)("button",{type:"button","aria-pressed":i,"aria-label":i?"Remove from saved":"Save",disabled:r,onClick:async()=>{o(!0);try{await ee({type:t,id:a,surface:l})}finally{o(!1)}},className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-full border transition duration-150 disabled:opacity-60 ".concat(et.oc," ").concat(i?"border-[var(--accent-hairline)] bg-[var(--accent-tint)] text-[var(--accent-strong)]":"border-[var(--app-hairline-strong)] bg-[var(--app-card-bg)] text-[var(--app-fg-muted)] hover:border-[var(--app-fg)]/25 hover:text-[var(--app-fg)]"),children:(0,n.jsx)("svg",{width:"19",height:"19",viewBox:"0 0 24 24",fill:i?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.7","aria-hidden":!0,className:"transition-transform duration-200 motion-reduce:transition-none ".concat(i?"scale-110":"scale-100"),children:(0,n.jsx)("path",{d:"M12 21s-7.5-4.7-10-9.3C.6 8.6 2.3 4.9 5.9 4.2c2-.4 4 .5 6.1 2.7 2.1-2.2 4.1-3.1 6.1-2.7 3.6.7 5.3 4.4 3.9 7.5C19.5 16.3 12 21 12 21z",strokeLinecap:"round",strokeLinejoin:"round"})})})}function en(){return(0,n.jsx)("span",{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 animate-spin rounded-full border-2 border-current border-t-transparent opacity-70"})}function el(e){let{save:t,actions:a}=e,[l,i]=(0,s.useState)(null),r="".concat(et.al," ").concat(et.Jm.md),c="".concat(et.oJ," ").concat(et.Jm.md);return(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[t?(0,n.jsx)(ea,{...t}):null,a.map(e=>{let t="".concat(e.primary?r:c," ").concat(e.primary?"min-w-0 flex-1 basis-32":"");if(e.href){var a;return(0,n.jsx)(o(),{href:e.href,className:t,...null!=(a=e.data)?a:{},children:(0,n.jsx)("span",{className:"truncate",children:e.label})},e.key)}return(0,n.jsxs)("button",{type:"button",disabled:e.disabled||l===e.key,className:t,onClick:async()=>{if(e.onClick){i(e.key);try{await e.onClick()}finally{i(null)}}},children:[l===e.key?(0,n.jsx)(en,{}):null,(0,n.jsx)("span",{className:"truncate",children:e.label})]},e.key)})]})}var es=a(3297),ei=a(78260);let er={duration:.2,ease:[.22,1,.36,1]};function eo(e){var t,a,l,i,r,o,c;let{itemId:d,surface:u,hint:h}
1=e,[p,f]=(0,s.useState)(null),[m,x]=(0,s.useState)(!1),[g,v]=(0,s.useState)(!1),[b,j]=(0,s.useState)([]),y=(0,O.LO)(),w=(0,T._o)(),k=(0,M.nV)();(0,s.useEffect)(()=>{(0,M.ZO)()},[]),(0,s.useEffect)(()=>{let e=!1;return f(null),x(!1),v(!1),(0,E.D)(d).then(t=>{e||(t?f((0,I.Yk)(t)):x(!0))}),j([]),fetch((0,P.Vl)("/items/".concat(encodeURIComponent(d),"/posts?limit=8"))).then(async t=>{var a;if(!t.ok||e)return;let n=await t.json();e||j((null!=(a=n.posts)?a:[]).map(ei.k))}).catch(()=>{}),()=>{e=!0}},[d]);let _=null!=(l=null!=(a=null!=(t=null==p?void 0:p.imageUrl)?t:null==p?void 0:p.thumbUrl)?a:null==h?void 0:h.heroSrc)?l:null,C=null!=(r=null!=(i=null==p?void 0:p.name)?i:null==h?void 0:h.title)?r:null,R=_?(0,n.jsx)("span",{"data-sheet-hero":!0,className:"flex aspect-[4/3] w-full items-center justify-center overflow-hidden rounded-[var(--radius-app-card)] border border-[var(--app-hairline)] bg-white p-4",children:(0,n.jsx)("img",{src:_,alt:null!=C?C:"",className:"h-full w-full object-contain"})}):null;if(m)return(0,n.jsx)("div",{className:"p-5",children:(0,n.jsx)(es.qh,{icon:"info-circle",title:"This item is no longer available",description:"The retailer pulled it, or it moved. Search the catalog and you may find the newer version."})});if(!p)return(0,n.jsxs)("div",{className:"flex flex-col gap-4 p-5","aria-busy":"true",children:[(0,n.jsx)("span",{className:"sr-only",role:"status",children:"Loading item"}),null!=R?R:(0,n.jsx)(es.EA,{className:"aspect-[4/3] w-full rounded-[var(--radius-app-card)]"}),(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)(es.EA,{className:"h-2.5 w-20 rounded-full"}),C?(0,n.jsx)("h2",{className:"font-satoshi text-[18px] font-semibold leading-[24px] text-[var(--app-fg)]",children:C}):(0,n.jsx)(es.EA,{className:"h-4 w-3/4 rounded-full"}),(0,n.jsx)(es.EA,{className:"h-3 w-1/3 rounded-full"})]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(es.EA,{className:"h-11 w-11 shrink-0 rounded-full"}),(0,n.jsx)(es.EA,{className:"h-11 flex-1 rounded-full"}),(0,n.jsx)(es.EA,{className:"h-11 w-28 rounded-full"})]})]});let z=(0,A.uv)(p.id,p.productUrl,"item_sheet"),D=null!=(c=null!=(o=null==w?void 0:w.designName)?o:null==y?void 0:y.name)?c:null,J=[{key:"add_to_design",label:D?"Add to ".concat(D):"Add to design",primary:!0,onClick:async()=>{"needs_target"===(await U({itemId:p.id,catalogItem:p.catalogItem,surface:u})).kind&&v(!0)}},{key:"add_to_cart",label:"Add to cart",onClick:()=>V({itemId:p.id,surface:u})}];return z&&p.purchasable&&J.push({key:"buy",label:"Buy",href:z,data:{"data-buy":"","data-buy-source":"item_sheet","data-buy-id":p.id,"data-buy-item":p.name,...null!=p.priceValue?{"data-buy-price":String(p.priceValue)}:{},...p.productUrl?{"data-buy-url":p.productUrl}:{}}}),(0,n.jsxs)("div",{className:"flex flex-col gap-5 p-5",children:[R,(0,n.jsxs)(S.P.div,{className:"flex flex-col gap-5",initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:er,children:[(0,n.jsxs)("div",{children:[p.brand?(0,n.jsx)("p",{className:"font-satoshi text-[11px] font-semibold uppercase leading-[16px] tracking-[0.08em] text-[var(--app-fg-subtle)]",children:p.brand}):null,(0,n.jsx)("h2",{className:"mt-0.5 font-satoshi text-[18px] font-semibold leading-[24px] text-[var(--app-fg)]",children:p.name}),(0,n.jsxs)("div",{className:"mt-2 flex flex-wrap items-baseline gap-x-3 gap-y-1",children:[p.priceDisplay?(0,n.jsx)("span",{className:"app-nums font-satoshi text-[17px] font-semibold leading-[24px] text-[var(--app-fg)]",children:p.priceDisplay}):(0,n.jsx)("span",{className:et.w5.meta,children:"Price at retailer"}),p.dimensionsM?(0,n.jsxs)("span",{className:"app-nums ".concat(et.w5.meta),children:[(100*p.dimensionsM.width).toFixed(0)," \xd7 ",(100*p.dimensionsM.depth).toFixed(0)," \xd7 ",(100*p.dimensionsM.height).toFixed(0)," cm"]}):null]})]}),k?(()=>{let e=(0,W.Ac)({item:p.dimensionsM,walls:k.walls});if("unknown"===e.kind)return null;let t="fits"===e.kind?"border-[var(--state-ok-border)] bg-[var(--state-ok-bg)] text-[var(--state-ok-fg)]":"tight"===e.kind?"border-[var(--state-warn-border)] bg-[var(--state-warn-bg)] text-[var(--state-warn-fg)]":"border-[var(--state-bad-border)] bg-[var(--state-bad-bg)] text-[var(--state-bad-fg)]",a="fits"===e.kind?"Fits your room":"tight"===e.kind?"Tight fit":"Too big for your room";return(0,n.jsxs)("div",{className:"flex gap-2.5 rounded-[var(--radius-app-card)] border px-3.5 py-3 ".concat(t),children:[(0,n.jsx)(es.In,{name:"fits"===e.kind?"check-circle":"info-circle",size:17,className:"mt-px shrink-0"}),(0,n.jsxs)("span",{className:"min-w-0",children:[(0,n.jsx)("span",{className:"font-satoshi text-[13px] font-semibold leading-[18px]",children:a}),k.designName?(0,n.jsxs)("span",{className:"font-satoshi text-[13px] leading-[18px] opacity-70",children:[" \xb7 ",k.designName]}):null,(0,n.jsx)("span",{className:"mt-0.5 block font-satoshi text-[12px] leading-[16
1px] opacity-85",children:e.reason})]})]})})():null,(0,n.jsx)(el,{save:{type:"item",id:p.id,surface:u},actions:J}),b.length>0?(0,n.jsxs)("div",{children:[(0,n.jsxs)(es.X3,{children:["In ",b.length," room",1===b.length?"":"s"]}),(0,n.jsx)("div",{className:"".concat(et.Ap," -mx-5 px-5 lg:-mx-5 lg:px-5"),children:b.map(e=>(0,n.jsxs)("button",{type:"button",onClick:()=>(0,N.qw)("look",e.id,"item_sheet",{heroSrc:e.image,title:e.title}),className:"".concat(et.Ml," w-[132px] ").concat(et.RL),children:[(0,n.jsx)("span",{className:"block aspect-[4/3] w-full overflow-hidden ".concat(et.TN),children:(0,n.jsx)("img",{src:e.image,alt:"",className:"h-full w-full object-cover",loading:"lazy"})}),(0,n.jsx)("span",{className:"line-clamp-1 p-2.5 ".concat(et.w5.meta," text-[var(--app-fg)]"),children:e.title})]},e.id))})]}):null,g?(0,n.jsxs)("a",{href:L(p.id),className:"flex gap-2.5 rounded-[var(--radius-app-card)] border border-dashed border-[var(--accent-hairline)] bg-[var(--accent-tint)] px-4 py-3.5 transition hover:bg-[var(--accent-tint-strong)] ".concat(et.jh),children:[(0,n.jsx)(es.In,{name:"plus-square",size:17,className:"mt-px shrink-0 text-[var(--accent-ink)]"}),(0,n.jsxs)("span",{className:et.w5.body,children:["No design yet —"," ",(0,n.jsx)("span",{className:"font-semibold text-[var(--accent-ink)]",children:"start a design with this item"}),". You can also just buy it, no design needed."]})]}):null]})]})}var ec=a(60799);async function ed(e){let t=await (0,ec.$I)(e.postId);if((0,u.u4)("design_with_clicked",{post_id:e.postId,surface:e.surface,seeded:t}),!t)return(0,z.P0)("Couldn't open that look — try again"),!1;let a="/create-floorplan/design";return e.navigate?e.navigate(a):window.location.assign(a),!0}function eu(e){var t,a;let{postId:i}=e,r=(0,l.useRouter)(),{accessToken:o,getAccessToken:c}
1=(0,d.N)(),[h,p]=(0,s.useState)(null),[f,m]=(0,s.useState)(""),[x,g]=(0,s.useState)(null),[v,b]=(0,s.useState)(!1),[j,y]=(0,s.useState)(!1),[w,N]=(0,s.useState)(!1),[k,_]=(0,s.useState)(null),C=(0,s.useCallback)(async e=>{try{var t;let a=await fetch((0,P.Vl)("/posts/".concat(i,"/comments?limit=").concat(50,"&offset=").concat(e)),{headers:o?{Authorization:"Bearer ".concat(o)}:{}});if(!a.ok)return null;return null!=(t=(await a.json()).comments)?t:[]}catch(e){return null}},[i,o]),S=(0,s.useCallback)(()=>{C(0).then(e=>{p(null!=e?e:[]),y(null!==e&&50===e.length),_(null===e?"Couldn't load the comments. Check your connection.":null)})},[C]),E=(0,s.useCallback)(()=>{var e;w||(N(!0),C(null!=(e=null==h?void 0:h.length)?e:0).then(e=>{null===e?_("Couldn't load more comments. Try again."):(p(t=>[...null!=t?t:[],...e]),y(50===e.length),_(null)),N(!1)}))},[h,C,w]);(0,s.useEffect)(()=>{p(null),y(!1),_(null),S()},[S]);let I=(0,s.useCallback)(async()=>{let e=f.trim();if(!e||v)return;let t=c();if(!t)return void r.push("/signin?redirect=/home?look=".concat(i));b(!0),_(null);try{var a;let n=await fetch((0,P.Vl)("/posts/".concat(i,"/comments")),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify({body:e,parent_comment_id:null!=(a=null==x?void 0:x.id)?a:null})});n.ok?(m(""),g(null),(0,u.u4)("comment_posted",{post_id:i,reply:!!x}),S()):401===n.status?_("Your session expired. Sign in again to post this."):_("Couldn't post that. Try again.")}catch(e){_("Couldn't post that — you look offline. Your text is still here.")}finally{b(!1)}},[f,v,c,r,i,x,S]),A=(0,s.useCallback)(async e=>{let t=c();if(t)try{if(!(await fetch((0,P.Vl)("/posts/".concat(i,"/comments/").concat(e)),{method:"DELETE",headers:{Authorization:"Bearer ".concat(t)}})).ok)return void _("Couldn't delete that comment. Try again.");_(null),S()}catch(e){_("Couldn't delete that comment. Check your connection.")}},[c,i,S]),T=(null!=h?h:[]).filter(e=>!e.parent_id),O=(null!=h?h:[]).filter(e=>e.parent_id),R=(e,t)=>{var a,l,s;return(0,n.jsxs)("div",{className:t?"ml-4 border-l border-[var(--app-hairline)] pl-4 sm:ml-5":"",children:[(0,n.jsxs)("div",{className:"flex items-start gap-2.5 py-2",children:[(0,n.jsx)("img",{src:null!=(a=e.author_avatar_url)?a:"/icons/user-circle.svg",alt:"",className:"mt-0.5 h-7 w-7 shrink-0 rounded-full bg-[var(--app-sunken)] object-cover"}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsxs)("p",{className:et.w5.meta,children:[(0,n.jsx)("span",{className:"font-semibold text-[var(--app-fg)]",children:null!=(s=null!=(l=e.author_display_name)?l:e.author_handle)?s:"User"})," ",(0,n.jsxs)("span",{children:["\xb7 ",function(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/1e3);return t<3600?"just now":t<86400?"".concat(Math.floor(t/3600),"h"):"".concat(Math.floor(t/86400),"d")}(e.created_at)]})]}),(0,n.jsx)("p",{className:"mt-0.5 whitespace-pre-wrap font-satoshi text-[13px] leading-[19px] text-[var(--app-fg)]",children:e.body}),(0,n.jsxs)("div",{className:"-ml-1.5 mt-0.5 flex",children:[0===t?(0,n.jsx)("button",{type:"button",onClick:()=>g(e),className:"inline-flex h-8 items-center rounded-full px-1.5 font-satoshi text-[12px] font-medium text-[var(--app-fg-subtle)] transition hover:bg-[var(--app-sunken)] hover:text-[var(--app-fg)] ".concat(et.jh),children:"Reply"}):null,e.own?(0,n.jsx)("button",{type:"button",onClick:()=>void A(e.id),className:"inline-flex h-8 items-center rounded-full px-1.5 font-satoshi text-[12px] font-medium text-[var(--app-fg-subtle)] transition hover:bg-[var(--state-bad-bg)] hover:text-[var(--state-bad-fg)] ".concat(et.jh),children:"Delete"}):null]})]})]}),O.filter(t=>t.parent_id===e.id).map(e=>R(e,1))]},e.id)};return(0,n.jsxs)("div",{className:"border-t border-[var(--app-hairline)] pt-4",children:[(0,n.jsx)(es.X3,{count:null!=(t=null==h?void 0:h.length)?t:void 0,children:"Comments"}),null===h?(0,n.jsx)("div",{className:"flex flex-col gap-3 py-1","aria-busy":"true",children:[0,1].map(e=>(0,n.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,n.jsx)(es.EA,{className:"h-7 w-7 shrink-0 rounded-full"}),(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[(0,n.jsx)(es.EA,{className:"h-2.5 w-24 rounded-full"}),(0,n.jsx)(es.EA,{className:"h-3 w-3/4 rounded-full"})]})]},e))}):0===h.length?k?null:(0,n.jsx)("p",{className:"pb-2 ".concat(et.w5.body),children:"No questions yet. Ask where something is from, or whether it would fit your room — the person who made this gets notified."}):(0,n.jsxs)("div",{className:"max-h-72 overflow-y-auto overscroll-contain",children:[T.map(e=>R(e,0)),j?(0,n.jsx)("button",{type:"button",disabled:w,onClick:E,className:"mt-1 inline-flex h-8 items-center rounded-full px-1.5 font-satoshi text-[12px] font-medium text-[var(--app-fg-subtle)] transition hover:bg-[var(--app-sunken)] hover:text-[var(--app-fg)] disabled:opacity-60 ".concat(et.jh),children:w?"Loading…":"Load more comments"}):null]}),k?(0,n.jsx)("p",{role:"alert",className:"mt-2 ".concat(et.w5.meta," text-[var(--state-bad-fg)]"),children:k}):null,(0,n.jsxs)("div",{className:"mt-3",children:[x?(0,n.jsxs)("p",{className:"mb-1.5 flex items-center gap-2 ".concat(et.w5.meta),children:[(0,n.jsx)(es.In,{name:"chat-bubble",size:13}),"Replying to ",null!=(a=x.author_display_name)?a:x.author_handle,(0,n.jsx)("button",{type:"button",onClick:()=>g(null),className:"rounded px-1 font-medium underline underline-offset-2 hover:text-[var(--app-fg)] ".concat(et.jh),children:"cancel"})]}):null,(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("input",{value:f,onChange:e=>m(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),I())},placeholder:o?"Add a comment…":"Sign in to comment",className:"h-11 min-w-0 flex-1 rounded-full border border-[var(--app-hairline-strong)] bg-white px-4 font-satoshi text-[16px] text-[var(--app-fg)] outline-none transition placeholder:text-[var(--app-fg-subtle)] focu
1s:border-[var(--accent-hairline)] focus:ring-2 focus:ring-[var(--focus-ring)]"}),(0,n.jsx)("button",{type:"button",disabled:v||!f.trim(),onClick:()=>void I(),className:"".concat(et.al," ").concat(et.Jm.md),children:"Post"})]})]})]})}let eh={duration:.2,ease:[.22,1,.36,1]};function ep(e){var t,a,i,r,c,d;let{lookId:u,surface:h,hint:p}=e,f=(0,l.useRouter)(),[m,x]=(0,s.useState)(null),[g,v]=(0,s.useState)(!1),[b,j]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=!1;return x(null),v(!1),j(!1),(0,ei.b)(u).then(t=>{e||(t?x((0,I.C4)(t)):v(!0))}),()=>{e=!0}},[u]);let y=null!=(t=null==p?void 0:p.heroSrc)?t:null,k=null!=(a=null==m?void 0:m.imageUrl)?a:null,{phase:_}=(0,w.bb)(),C="entering"!==_||!y,E=null!=(r=null!=(i=null==m?void 0:m.title)?i:null==p?void 0:p.title)?r:null;if(g)return(0,n.jsx)("div",{className:"p-5",children:(0,n.jsx)(es.qh,{icon:"info-circle",title:"This look is unavailable",description:"It may have been unpublished or set to private. There's plenty more on Home."})});let A=(0,n.jsxs)("span",{"data-sheet-hero":!0,className:"relative block aspect-[4/3] w-full overflow-hidden rounded-[var(--radius-app-card)] border border-[var(--app-hairline)] ".concat(et.TN),children:[y?(0,n.jsx)("img",{src:y,alt:"",className:"absolute inset-0 h-full w-full object-cover"}):null,k&&C?(0,n.jsx)("img",{src:k,alt:null!=E?E:"",decoding:"async",onLoad:()=>j(!0),className:"absolute inset-0 h-full w-full object-cover transition-opacity duration-200 ".concat(b||!y?"opacity-100":"opacity-0")}):null]});if(!m)return(0,n.jsxs)("div",{className:"flex flex-col gap-4 p-5","aria-busy":"true",children:[(0,n.jsx)("span",{className:"sr-only",role:"status",children:"Loading look"}),y?A:(0,n.jsx)(es.EA,{className:"aspect-[4/3] w-full rounded-[var(--radius-app-card)]"}),(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)(es.EA,{className:"h-9 w-9 shrink-0 rounded-full"}),(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[E?(0,n.jsx)("h2",{className:"truncate font-satoshi text-[16px] font-semibold leading-[22px] text-[var(--app-fg)]",children:E}):(0,n.jsx)(es.EA,{className:"h-3.5 w-1/2 rounded-full"}),(0,n.jsx)(es.EA,{className:"h-2.5 w-1/3 rounded-full"})]})]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(es.EA,{className:"h-11 w-11 shrink-0 rounded-full"}),(0,n.jsx)(es.EA,{className:"h-11 flex-1 rounded-full"})]})]});let P=(null!=(c=m.post.postObjectAssets)?c:[]).filter(e=>e.matched_item_id&&e.catalog_row),T=[];return m.hasScene&&T.push({key:"design_with",label:"Design with this",primary:!0,onClick:async()=>{await ed({postId:m.id,surface:h,navigate:e=>f.push(e)})}}),(0,n.jsxs)("div",{className:"flex flex-col gap-5 p-5",children:[A,(0,n.jsxs)(S.P.div,{className:"flex flex-col gap-5",initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:eh,children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("img",{src:null!=(d=m.authorAvatarUrl)?d:"/icons/user-circle.svg",alt:"",className:"h-9 w-9 shrink-0 rounded-full bg-[var(--app-sunken)] object-cover"}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("h2",{className:"truncate font-satoshi text-[16px] font-semibold leading-[22px] text-[var(--app-fg)]",children:m.title}),(0,n.jsxs)("p",{className:"truncate ".concat(et.w5.meta),children:[m.authorHandle?(0,n.jsx)(o(),{href:"/profile/".concat(m.authorHandle),className:"rounded hover:underline ".concat(et.jh),children:m.authorName}):m.authorName," \xb7 ",m.timestamp]})]})]}),(0,n.jsx)(el,{save:{type:"post",id:m.id,surface:h},actions:T}),m.hasItems&&P.length>0?(0,n.jsxs)("div",{children:[(0,n.jsx)(es.X3,{count:m.itemCount,children:"Shop this look"}),(0,n.jsx)("div",{className:"".concat(et.Ap," -mx-5 px-5 lg:-mx-5 lg:px-5"),children:P.map(e=>{var t,a,l;return(0,n.jsxs)("button",{type:"button",onClick:()=>{var t,a,n,l;return(0,N.qw)("item",String(e.matched_item_id),"look_sheet",{heroSrc:null!=(n=null==(t=e.catalog_row)?void 0:t.image_url)?n:null,title:null!=(l=null==(a=e.catalog_row)?void 0:a.name)?l:null})},className:"".concat(et.Ml," w-[116px] ").concat(et.RL),children:[(0,n.jsx)("span",{className:"flex aspect-square w-full items-center justify-center overflow-hidden bg-white p-2",children:(null==(t=e.catalog_row)?void 0:t.image_url)?(0,n.jsx)("img",{src:e.catalog_row.image_url,alt:"",className:"h-full w-full object-contain"}):null}),(0,n.jsx)("span",{className:"line-clamp-2 border-t border-[var(--app-hairline)] p-2.5 ".concat(et.w5.meta," text-[var(--app-fg)]"),children:null!=(l=null==(a=e.catalog_row)?void 0:a.name)?l:"Item"})]},"".concat(e.object_index,"-").concat(e.matched_item_id))})})]}):null,(0,n.jsx)(eu,{postId:m.id})]})]})}function ef(e){let{designId:t}=e;return(0,n.jsxs)("div",{className:"flex flex-col items-start gap-4 p-6",children:[(0,n.jsx)("span",{className:"flex h-11 w-11 items-center justify-center rounded-full bg-[var(--accent-tint)] text-[var(--accent-ink)]",children:(0,n.jsx)(es.In,{name:"planimetry",size:21})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"font-satoshi text-[18px] font-semibold leading-[24px] text-[var(--app-fg)]",children:"Your design"}),(0,n.jsx)("p",{className:"mt-1 ".concat(et.w5.body),children:"Everything about a room lives in the editor — the floorplan, what's in it, and the cart it fills."})]}),(0,n.jsx)(o(),{href:"/create-floorplan/design?designId=".concat(encodeURIComponent(t)),className:"".concat(et.al," ").concat(et.Jm.md),children:"Open in editor"})]})}let em=["look","item","design","floorplan","person","list"];function ex(){let e=(0,N.jY)(),t=(0,N.lG)(),a=(0,s.useRef)(null);e&&(a.current=e);let[,i]=(0,s.useReducer)(e=>e+1,0),r=(0,s.useRef)(t.length),o=t.length>=r.current?1:-1;(0,s.useEffect)(()=>{r.current=t.length});let c=(0,k.X)(),d=(0,l.usePathname)(),h=c?"full"===c.mode:!(0,_.KJ)(d);(0,s.useEffect)(()=>
1{if(!h)return;let e=function(){let e=new URLSearchParams(window.location.search);for(let t of em){let a=e.get(t);if(a)return{kind:t,id:a}}return null}();e&&(0,N.qw)(e.kind,e.id,"deep_link")},[]),(0,s.useEffect)(()=>{if(!h)return;let t=new URL(window.location.href);for(let e of em)t.searchParams.delete(e);e&&t.searchParams.set(e.kind,e.id),window.history.replaceState(window.history.state,"",t.toString())},[e,h]),(0,s.useEffect)(()=>{var t;if(!e)return;(0,u.u4)("sheet_opened",{kind:e.kind,entity_id:e.id,source:null!=(t=e.source)?t:"unknown"}),C.V3.log({surface:"sheet",entityType:"look"===e.kind?"post":e.kind,entityId:e.id,eventType:"open",rankContext:{surface:"detail",...e.source?{via:String(e.source)}:{}}});let a=Date.now(),n=e.kind,l=e.id;return()=>{Date.now()-a>=1500||C.V3.log({surface:"sheet",entityType:"look"===n?"post":n,entityId:l,eventType:"detail_bounce",dwellMs:Date.now()-a})}},[e]);let p=null!=e?e:a.current;if(!p)return null;let f=p.hint,m="sheet",x=null;return x="item"===p.kind?(0,n.jsx)(eo,{itemId:p.id,surface:m,hint:f}):"look"===p.kind?(0,n.jsx)(ep,{lookId:p.id,surface:m,hint:f}):"design"===p.kind?(0,n.jsx)(ef,{designId:p.id}):(0,n.jsx)("div",{className:"p-6 text-sm text-[var(--app-fg-muted)]",children:"This view is arriving in a later build."}),(0,n.jsx)(w.cj,{open:!!e,onClose:N.QK,label:"".concat(p.kind," details"),contentKey:"".concat(p.kind,":").concat(p.id),direction:o,onExitComplete:()=>{a.current=null,i()},children:x})}var eg=a(10855),ev=a(6320);function eb(e){let{initialVariant:t,children:a}=e,s=(0,l.usePathname)(),i="v2"===t||(0,_.gO)(s),r=(0,_.$O)(s)?"camera":(0,_.KJ)(s)?"canvas":"full";return i?(0,n.jsxs)(ev.l,{variant:"v2",children:[(0,n.jsx)(j,{}),(0,n.jsx)(eg.Ay,{mode:r,children:a}),(0,n.jsx)(ex,{}),(0,n.jsx)(y.w,{})]}):(0,n.jsxs)(ev.l,{variant:"v1",children:[(0,n.jsx)(j,{}),"canvas"===r?a:(0,n.jsx)(g,{children:a}),(0,n.jsx)(ex,{}),(0,n.jsx)(y.w,{})]})}}},e=>{e.O(0,[1831,2619,1356,1029,8946,1740,5625,6153,3297,5841,1358,6601,1929,6957,1796,8173,8372,9706,7504,9605,9343,9793,8441,8229,5857,7358],()=>e(e.s=36265)),_N_E=e.O()}]);

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.