1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7518],{49934:function(e,t,a){a.d(t,{Z:function(){return i}});let i=(0,a(2389).Z)("Ruler",[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]])},81695:function(e,t,a){var i=a(21219);a.o(i,"useParams")&&a.d(t,{useParams:function(){return i.useParams}}),a.o(i,"usePathname")&&a.d(t,{usePathname:function(){return i.usePathname}}),a.o(i,"useRouter")&&a.d(t,{useRouter:function(){return i.useRouter}}),a.o(i,"useSearchParams")&&a.d(t,{useSearchParams:function(){return i.useSearchParams}})},82889:function(e,t,a){a.d(t,{h:function(){return d}});var i=a(55238),s=a(7653),l=a(39161),r=a(17855),n=a(21984);function d(e){return(0,s.useMemo)(()=>{var t;let{frame:a,layoutId:s,sizeId:d,matType:o,matBorder:c,glass:m,hardware:h,brassPlaqueEnabled:u,bottomWeighted:g=!1}=e;if(!s)return{framePrice:0,matPrice:0,glassPrice:0,hardwarePrice:0,nameplatePrice:0,subtotal:0,total:0};let x=(0,r.lY)(s);if(!(0,n.w6)(d)||!a)return{framePrice:0,matPrice:0,glassPrice:0,hardwarePrice:0,nameplatePrice:0,subtotal:0,total:0};let p=function(e,t){if(!e)return null;let a=(0,r.lY)(e),i=(0,n.w6)(t);if(!i)return null;let{rows:s,columns:l,spacingFactor:d}=a,o=i.width,c=i.height;return{width:o*l+o*d*(l-1),height:c*s+c*d*(s-1)}}(s,d);if(!p)return{framePrice:0,matPrice:0,glassPrice:0,hardwarePrice:0,nameplatePrice:0,subtotal:0,total:0};let f=0,b=null!==(t=null==m?void 0:m.id)&&void 0!==t?t:"standard",v={serviceType:"frame-only",artworkWidth:p.width,artworkHeight:p.height,frameStyleId:a.id,matType:o,matBorderWidth:"none"===o?.25:c,matRevealWidth:.25,matColorId:"mat-1",glassTypeId:b,bottomWeighted:g};try{let e=(0,l.a4)(v);f=e.framePrice+e.matPrice+e.glassPrice}catch(e){f=120}let j=0;"none"!==o&&x.count>1&&(j=(x.count-1)*15);let y=0;"security"===h&&(y=8.95);let N=0;u&&"none"!==o&&(N=i.af.PRICE);let w=f+j+y+N;return{framePrice:f,matPrice:j,glassPrice:0,hardwarePrice:y,nameplatePrice:N,subtotal:w,total:w}},[e])}},38547:function(e,t,a){a.d(t,{i:function(){return r}});var i=a(27573),s=a(28867);function l(e){return e.toFixed(2).replace(/\.?0+$/,"")}function r(e){let{width:t,height:a,scrollToStep:r,label:n="Artwork size",className:d}=e;return Number.isFinite(t)&&Number.isFinite(a)?(0,i.jsxs)("button",{type:"button",onClick:()=>{var e;null===(e=document.querySelector('[data-step="'.concat(r,'"]')))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},className:(0,s.cn)("flex w-full items-center justify-between gap-2 text-sm",d),"data-testid":"button-anchor-size-summary",children:[(0,i.jsx)("span",{className:"min-w-0 truncate text-muted-foreground",children:n}),(0,i.jsxs)("span",{className:"shrink-0 font-medium",children:[l(t),'" \xd7 ',l(a),'"',(0,i.jsx)("span",{className:"ml-2 text-primary underline underline-offset-4",children:"Change"})]})]}):null}},17518:function(e,t,a){a.r(t),a.d(t,{MagazineFrameDesigner:function(){return ej}});var i=a(27573),s=a(19307),l=a(81202),r=a(17855),n=a(21984),d=a(34184),o=a(91443),c=a(76755),m=a(72810),h=a(31446),u=a(66631),g=a(23880),x=a(750),p=a(19510),f=a(76367),b=a(48170),v=a(40013),j=a(31266),y=a(12688),N=a(82889),w=a(43665),z=a(70979),M=a(85094),k=a(90113),C=a(27126),F=a(49934),S=a(51856),I=a(50294),P=a(81695),_=a(7653),W=a(97918),L=a(13947),R=a(87468),E=a(97427),Z=a(50145),U=a(30857),T=a(72089),H=a(38547),A=a(8780),q=a(74747),D=a(23717),B=a(16784),K=a(96979),O=a(51602),Q=a(18390),J=a(1357),V=a(90227),Y=a(29608),G=a(15706),$=a(23831),X=a(97384),ee=a(67163),et=a(28867);function ea(e){let{layoutId:t}=e,a=r.y2.find(e=>e.id===t);if(!a)return null;let{rows:s,columns:l}=a,{cellWidth:n,cellHeight:d,offsetX:o,offsetY:c}=(0,h.gzB)({rows:s,columns:l,width:120,height:80,padding:8,spacing:4,aspectRatio:.7}),m=[];for(let e=0;e<s;e++)for(let t=0;t<l;t++){let a=o+t*(n+4),s=c+e*(d+4);m.push((0,i.jsxs)("g",{children:[(0,i.jsx)("rect",{x:a,y:s,width:n,height:d,className:"fill-purple-100 dar
1k:fill-purple-900/30 stroke-purple-400 dark:stroke-purple-600",strokeWidth:"1.5",rx:"1.5"}),(0,i.jsx)("line",{x1:a+.1*n,y1:s+2,x2:a+.1*n,y2:s+d-2,className:"stroke-purple-300 dark:stroke-purple-700",strokeWidth:"0.5",opacity:"0.6"})]},"".concat(e,"-").concat(t)))}return(0,i.jsx)("svg",{width:120,height:80,viewBox:"0 0 ".concat(120," ").concat(80),className:"mx-auto",children:m})}function ei(e){let{layoutId:t}=e,a=r.y2.find(e=>e.id===t);if(!a)return null;let{rows:s,columns:l}=a,{cellWidth:n,cellHeight:d,offsetX:o,offsetY:c}=(0,h.gzB)({rows:s,columns:l,width:24,height:24,padding:2,spacing:1.5,aspectRatio:.7}),m=[];for(let e=0;e<s;e++)for(let t=0;t<l;t++){let a=o+t*(n+1.5),s=c+e*(d+1.5);m.push((0,i.jsx)("rect",{x:a,y:s,width:n,height:d,className:"fill-current",rx:"0.5"},"".concat(e,"-").concat(t)))}return(0,i.jsx)("svg",{width:24,height:24,viewBox:"0 0 ".concat(24," ").concat(24),className:"text-muted-foreground",children:m})}function es(e){let{selectedLayout:t,onLayoutChange:a,className:s,compact:l=!1,layouts:n=r.y2}=e;return l?(0,i.jsx)("div",{className:(0,et.cn)("grid grid-cols-2 gap-2",s),children:n.map(e=>{let s=t===e.id;return(0,i.jsxs)(O.Zb,{className:(0,et.cn)("p-2 cursor-pointer hover-elevate flex flex-col items-center justify-center gap-2 min-h-[70px]",s&&"ring-2 ring-inset ring-primary bg-primary/5"),onClick:()=>a(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),a(e.id))},tabIndex:0,role:"button","aria-pressed":s,"aria-label":e.description,"data-testid":"button-select-layout-".concat(e.id),children:[(0,i.jsx)(ei,{layoutId:e.id}),(0,i.jsx)("span",{className:"text-xs font-medium text-center leading-tight","aria-hidden":"true",children:e.displayName})]},e.id)})}):(0,i.jsx)("div",{className:(0,et.cn)("grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 lg:gap-4",s),children:n.map(e=>{let s=t===e.id;return(0,i.jsxs)(O.Zb,{className:(0,et.cn)("p-3 sm:p-3 lg:p-4 cursor-pointer hover-elevate min-h-[180px] sm:min-h-[180px] lg:min-h-0",s&&"ring-2 ring-inset ring-primary bg-primary/5"),onClick:()=>a(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),a(e.id))},tabIndex:0,role:"button","aria-pressed":s,"aria-label":e.description,"data-testid":"button-select-layout-".concat(e.id),children:[(0,i.jsx)("div",{className:"mb-2 lg:mb-3","aria-hidden":"true",children:(0,i.jsx)(ea,{layoutId:e.id})}),(0,i.jsx)("h3",{className:"font-semibold text-sm text-center","aria-hidden":"true",children:e.displayName})]},e.id)})})}var el=a(55127),er=a(61871);let en=[{path:"magazine/lifestyle/lifestyle_1.jpg",alt:"Custom framed Sports Illustrated magazine cover display in home office setting"},{path:"magazine/lifestyle/lifestyle_2.jpg",alt:"Framed Time Magazine covers creating gallery wall in living room"},{path:"magazine/lifestyle/lifestyle_3.jpg",alt:"LIFE magazine cover professionally framed with archival matting"},{path:"magazine/lifestyle/lifestyle_4.jpg",alt:"Vintage National Geographic magazine displayed in custom shadowbox frame"},{path:"magazine/lifestyle/lifestyle_5.jpg",alt:"Entertainment Weekly magazine cover framed as wall art decor"},{path:"magazine/lifestyle/lifestyle_6.jpg",alt:"Rolling Stone magazine cover in professional frame display"},{path:"magazine/lifestyle/lifestyle_7.jpg",alt:"Framed magazine collection arranged as gallery wall centerpiece"},{path:"magazine/lifestyle/lifestyle_8.jpg",alt:"Sports magazine cover showcased in premium custom frame"},{path:"magazine/lifestyle/lifestyle_9.jpg",alt:"Vintage magazine art display in shadowbox frame with double mat"},{path:"magazine/lifestyle/lifestyle_10.jpg",alt:"Magazine cover collection framed in matching black frames"},{path:"magazine/lifestyle/lifestyle_11.jpg",alt:"Celebrity magazine cover professionally displayed in custom frame"},{path:"magazine/lifestyle/lifestyle_12.jpg",alt:"Historic magazine covers preserved in archival quality frames"},{path:"magazine/lifestyle/lifestyle_13.jpg",alt:"Magazine gallery wall featuring multiple framed covers"},{path:"magazine/lifestyle/lifestyle_14.jpg",alt:"Custom framed magazine display in modern interior design"},{path:"magazine/lifestyle/lifestyle_15.jpg",alt:"Collectible magazine covers in professional shadowbox frames"},{path:"magazine/lifestyle/lifestyle_16.jpg",alt:"Fashion magazine cover art displayed in elegant frame setting"},{path:"magazine/lifestyle/lifestyle_17.jpg",alt:"Framed magazine covers creating statement wall in home"},{path:"magazine/lifestyle/lifestyle_18.jpg",alt:"Sports memorabilia magazine framed with team-coordinated matting"}
1,{path:"magazine/lifestyle/lifestyle_19.jpg",alt:"Vintage magazine collection displayed in coordinated frames"},{path:"magazine/lifestyle/lifestyle_20.jpg",alt:"Custom magazine frame display in collector showcase room"},{path:"magazine/lifestyle/lifestyle_21.jpg",alt:"LIFE Magazine Moon Landing cover in custom shadowbox frame"},{path:"magazine/lifestyle/lifestyle_22.jpg",alt:"LIFE Magazine JFK memorial cover professionally framed"},{path:"magazine/lifestyle/lifestyle_23.jpg",alt:"LIFE Magazine astronaut cover displayed in premium frame"},{path:"magazine/lifestyle/lifestyle_24.jpg",alt:"LIFE Magazine Wizard of Oz cover in archival quality frame"},{path:"magazine/lifestyle/lifestyle_25.jpg",alt:"Sports Illustrated swimsuit issue framed in home display"},{path:"magazine/lifestyle/lifestyle_26.jpg",alt:"Sports Illustrated boxing legend cover in premium frame"},{path:"magazine/lifestyle/lifestyle_27.jpg",alt:"Mens Health magazine cover professionally framed display"},{path:"magazine/lifestyle/lifestyle_28.jpg",alt:"GamePro gaming magazine cover in custom shadowbox frame"},{path:"magazine/lifestyle/lifestyle_29.jpg",alt:"National Geographic gallery wall with coordinated frames"},{path:"magazine/lifestyle/lifestyle_30.jpg",alt:"Dog Fancy magazine collection displayed in matching frames"}].map(e=>{let{path:t,alt:a}=e;return{url:(0,el.$)(t),alt:a}});function ed(){let{onImageClick:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.jsx)(er.N,{title:"Magazine Frames in Real Homes",subtitle:"See how collectors display their favorite magazine covers.",images:en,onImageClick:e,testIdPrefix:"magazine-lifestyle",ariaLabel:"Magazine frame lifestyle photo gallery",randomize:!0,maxImages:30})}var eo=a(65436),ec=a(24268),em=a(70548),eh=a(8299);let eu=(0,_.memo)(function(e){let{framePhotos:t,selectedFrame:a,topMatColor:s,bottomMatColor:l,backingColor:r,matType:n,layout:d,sizeId:o,matBorder:c,manifest:m,previewScale:h,previewWidth:u,previewHeight:g,frameFaceWidth:x,isMobile:p,magazineCovers:f,brassNameplateConfig:b,bottomWeightedExtra:v=0,className:j,style:y}=e,N=(0,_.useMemo)(()=>{let e=(null==b?void 0:b.enabled)?"true":"false",t="".concat(d,"-").concat(o,"-").concat(n,"-").concat(c.toFixed(1),"-").concat(e),a="".concat(u.toFixed(0),"-").concat(g.toFixed(0));return{bottomMat:"clippath-bottom-".concat(t,"-").concat(a),topMat:"clippath-top-".concat(t,"-").concat(a)}},[d,o,n,c,null==b?void 0:b.enabled,u,g]),w=(0,_.useMemo)(()=>{var e;return h*(null!==(e=m.matReveal)&&void 0!==e?e:.25)},[h,m.matReveal]),z=(0,_.useMemo)(()=>{let e=.06*h;return Math.max(1,isNaN(e)||!isFinite(e)?1:e)},[h]),M=(0,_.useMemo)(()=>u>0&&g>0&&x>0&&m.openings.every(e=>e.width>0&&e.height>0),[u,g,x,m.openings]),k=(0,_.useMemo)(()=>(0,eo.fs)(l.name),[l.name]),C=(0,_.useMemo)(()=>(0,eo.fs)(s.name),[s.name]),F=(0,_.useMemo)(()=>{var e;return x*(null!==(e=a.rabbetInsetRatio)&&void 0!==e?e:.92)},[x,a.rabbetInsetRatio]),S=(0,_.useMemo)(()=>(0,eo.O5)(s.name,h),[s.name,h]),I=(0,_.useMemo)(()=>(0,eo.O5)(l.name,h),[l.name,h]),P=(0,_.useMemo)(()=>{if(!(null==b?void 0:b.enabled))return null;let e=3.6*h,t=1.5*h*.8,a=.85*h,i=(u-e)/2-.5*h,s=g-x-a-t;return{width:e,height:t,x:i,y:s}},[null==b?void 0:b.enabled,h,u,g,x]),W=(0,_.useMemo)(()=>{if(0===m.openings.length)return"";let e=Math.max(0,u-2*F),t=Math.max(0,g-2*F),a="M 0,0 L ".concat(e,",0 L ").concat(e,",").concat(t," L 0,").concat(t," Z"),i="double"===n?w:0,s=m.openings.map(e=>{let t=Math.max(0,e.x-F+i),a=Math.max(0,e.y-F+i),s=Math.max(0,e.width-2*i),l=Math.max(0,e.height-2*i);return"M ".concat(t,",").concat(a," L ").concat(t+s,",").concat(a," L ").concat(t+s,",").concat(a+l," L ").concat(t,",").concat(a+l," Z")}).join(" ");return"".concat(a," ").concat(s)},[m.openings,u,g,F,n,w]),L=(0,_.useMemo)(()=>{if("double"!==n||0===m.openings.length)return"";let e=Math.max(0,u-2*F),t=Math.max(0,g-2*F),a="M 0,0 L ".concat(e,",0 L ").concat(e,",").concat(t," L 0,").concat(t," Z"),i=m.openings.map(e=>{let t=Math.max(0,e.x-F),a=Math.max(0,e.y-F),i=Math.max(0,e.width),s=Math.max(0,e.height);return"M ".concat(t,",").concat(a," L ").concat(t+i,",").concat(a," L ").concat(t+i,",").concat(a+s," L ").concat(t,",").concat(a+s," Z")}).join(" ");return"".concat(a," ").concat(i)},[n,m.openings,u,g,F]);if(!M)return(0,i.jsx)("div",{className:j,style:{...y,transition:"none"},"data-testid":"magazine-preview-canvas-loading",children:(0,i.jsx)("div",{className:"flex items-center justify-center",style:{width:"100%",height:"400px"},children:(0,i.jsx)(em.Z,{className:"w-12 h-12 text-muted-foreground
1/30 animate-pulse"})})});let R=t.topUrl&&t.bottomUrl&&t.leftUrl&&t.rightUrl;return(0,i.jsx)("div",{className:j,style:{...y,transition:"none"},"data-testid":"magazine-preview-canvas",children:R?(0,i.jsxs)("div",{className:"transition-none",style:{width:"".concat(u,"px"),height:"".concat(g,"px"),position:"relative",backgroundColor:s.hexColor||"#FFFFFF",filter:p?"drop-shadow(0 4px 12px rgba(0,0,0,0.20))":"drop-shadow(0 8px 24px rgba(0,0,0,0.25))"},"data-testid":"preview-frame-container",children:[(0,i.jsx)("div",{style:{position:"absolute",top:0,left:0,right:0,height:"".concat(x,"px"),backgroundImage:"url(".concat(t.topUrl,")"),backgroundSize:"auto 100%",backgroundRepeat:"repeat-x",backgroundPosition:"left center",zIndex:10,clipPath:"polygon(0 0, 100% 0, calc(100% - ".concat(x,"px) 100%, ").concat(x,"px 100%)")}}),(0,i.jsx)("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:"".concat(x,"px"),backgroundImage:"url(".concat(t.bottomUrl,")"),backgroundSize:"auto 100%",backgroundRepeat:"repeat-x",backgroundPosition:"left center",zIndex:10,clipPath:"polygon(".concat(x,"px 0, calc(100% - ").concat(x,"px) 0, 100% 100%, 0 100%)")}}),(0,i.jsx)("div",{style:{position:"absolute",top:0,left:0,bottom:0,width:"".concat(x,"px"),backgroundImage:"url(".concat(t.leftUrl,")"),backgroundSize:"100% auto",backgroundRepeat:"repeat-y",backgroundPosition:"center top",zIndex:9}}),(0,i.jsx)("div",{style:{position:"absolute",top:0,right:0,bottom:0,width:"".concat(x,"px"),backgroundImage:"url(".concat(t.rightUrl,")"),backgroundSize:"100% auto",backgroundRepeat:"repeat-y",backgroundPosition:"center top",zIndex:9}}),(0,i.jsxs)("div",{style:{position:"absolute",top:"".concat(F,"px"),left:"".concat(F,"px"),right:"".concat(F,"px"),bottom:"".concat(F,"px"),overflow:"hidden"},children:[m.openings.map((e,t)=>(0,i.jsx)("div",{style:{position:"absolute",left:"".concat(e.x-F,"px"),top:"".concat(e.y-F,"px"),width:"".concat(e.width,"px"),height:"".concat(e.height,"px"),backgroundColor:r.hexColor||"#FFFFFF",boxShadow:"inset 0 1px 3px rgba(0,0,0,0.08), inset 0 0 1px rgba(0,0,0,0.06)",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",zIndex:1},"data-testid":"magazine-opening-".concat(t),children:f[t]?(0,i.jsx)("img",{src:encodeURI(f[t]),alt:"Magazine ".concat(t+1),style:{width:"100%",height:"100%",objectFit:"cover",objectPosition:"top center"},onError:e=>{e.currentTarget.style.display="none"},"data-testid":"magazine-cover-".concat(t)},"cover-".concat(t,"-").concat(f[t])):(0,i.jsx)(em.Z,{className:"w-12 h-12 text-muted-foreground/30","data-testid":"magazine-placeholder-".concat(t)})},"opening-".concat(t))),"none"!==n&&(0,i.jsx)("svg",{width:"0",height:"0",style:{position:"absolute"},children:(0,i.jsxs)("defs",{children:[(0,i.jsx)("clipPath",{id:N.bottomMat,clipPathUnits:"userSpaceOnUse",clipRule:"evenodd",children:(0,i.jsx)("path",{d:W})}),"double"===n&&(0,i.jsx)("clipPath",{id:N.topMat,clipPathUnits:"userSpaceOnUse",clipRule:"evenodd",children:(0,i.jsx)("path",{d:L})})]})}),"none"!==n&&(0,i.jsx)("div",{style:{position:"absolute",inset:0,backgroundColor:l.hexColor||"#FFFFFF",backgroundImage:I.backgroundImage,backgroundSize:I.backgroundSize,backgroundRepeat:I.backgroundRepeat,clipPath:"url(#".concat(N.bottomMat,")"),zIndex:2},"data-testid":"bottom-mat-layer"}),"double"===n&&(0,i.jsx)("svg",{className:"absolute inset-0 pointer-events-none",width:Math.max(0,u-2*F),height:Math.max(0,g-2*F),style:{zIndex:4},children:m.openings.map((e,t)=>(0,i.jsx)("rect",{x:Math.max(0,e.x-F+w),y:Math.max(0,e.y-F+w),width:Math.max(0,e.width-2*w),height:Math.max(0,e.height-2*w),fill:"none",stroke:k,strokeWidth:z,"data-testid":"bottom-opening-bevel-".concat(t)},"bottom-bevel-".concat(t)))}),"double"===n&&(0,i.jsx)("div",{style:{position:"absolute",inset:0,backgroundColor:s.hexColor||"#FFFFFF",backgroundImage:S.backgroundImage,backgroundSize:S.backgroundSize,backgroundRepeat:S.backgroundRepeat,clipPath:"url(#".concat(N.topMat,")"),zIndex:5},"data-testid":"top-mat-layer"}),"none"!==n&&(0,i.jsx)("svg",{className:"absolute inset-0 pointer-events-none",width:Math.max(0,u-2*F),height:Math.max(0,g-2*F),style:{zIndex:"double"===n?6:4},children:m.openings.map((e,t)=>(0,i.jsx)("rect",{x:Math.max(0,e.x-F),y:Math.max(0,e.y-F),width:Math.max(0,e.width),height:Math.max(0,e.height),fill:"none",stroke:C,strokeWidth:z,"data-testid":"top-opening-bevel-".concat(t)},"top-bevel-".concat(t)))}),P&&b&&(0,i.jsx)("div",{style:{position:"absolute",left:"".concat(P.x-F,"px"),top:"".concat(P.y-F,"px"),zIndex:5},"data-testid":"brass-nameplate-container",children:(0,i.jsx)(eh.N,{config:b,scale:h/150})})]})]}):(0,i.jsx)("div",{className:"transition-none",style:{width:"".concat(u,"px"),height:"".concat(g,"px"),position:"relative",backgroundColor:"#e5e5e5",border:"".concat(x,"px solid ").concat(a.color||"#8B4513"),boxShadow:"0 8px 24px rgba(0,0,0,0.25)"},"data-testid":"preview-fallback-container",children:(0,i.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,i.jsx)("p",{className:"text-sm text-muted-foreground",children:"Frame preview unavailable"})})})})});function eg(e){let{sizeId:t,layoutId:a,matBorder:i,matReveal:s,matType:l,brassNameplateConfig:d,selectedFrame:o,containerWidth:c,containerHeight:m,bottomWeighted:h=!1}=e,u=(0,_.useMemo)(()=>(0,n.w6)(t),[t]),g=(0,_.useMemo)(()=>a?(0,r.lY)(a):null,[a]),x=h?.5:0,p=(0,_.useMemo)(()=>{var e;if(!a)return{width:16,height:20};let s=(0,r.$)(a,t,i,null!==(e=null==d?void 0:d.enabled)&&void 0!==e&&e,l);return{width:s.width,height:s.height+x}},[a,t,i,null==d?void 0:d.enabled,x,l]),b=(0,_.useMemo)(()=>
1{if(!u||!g)return{width:0,height:0};let{width:e,height:t}=u,{rows:a,columns:i,spacingFactor:s}=g,r=e*s,n="none"===l?.25:2,d=t*a+r*(a-1)+2*n+x;return{width:e*i+r*(i-1)+2*n,height:d}},[u,g,x,l]),v=(0,_.useMemo)(()=>(0,ec.Jg)(b.width,b.height,c,m,100),[b,c,m]),j=(0,_.useMemo)(()=>{var e;return(0,r.Xu)(a,t,i,s,v.pixelsPerInch,null!==(e=null==d?void 0:d.enabled)&&void 0!==e&&e,x,l)},[a,t,i,s,v.pixelsPerInch,null==d?void 0:d.enabled,x,l]),y=(0,_.useMemo)(()=>Math.round(p.width*v.scale),[p.width,v.scale]),N=(0,_.useMemo)(()=>Math.round(p.height*v.scale),[p.height,v.scale]),w=(0,_.useMemo)(()=>o.mouldingWidth*v.scale,[o.mouldingWidth,v.scale]),z=(0,_.useMemo)(()=>{var e;let t=String(null!==(e=o.sku)&&void 0!==e?e:o.id);return{cornerUrl:(0,f.m2)(t,"corner"),profileUrl:(0,f.m2)(t,"profile"),topUrl:(0,f.m2)(t,"top"),bottomUrl:(0,f.m2)(t,"bottom"),leftUrl:(0,f.m2)(t,"left"),rightUrl:(0,f.m2)(t,"right")}},[o.sku,o.id]);return{manifest:j,previewScale:v.scale,previewWidth:y,previewHeight:N,frameFaceWidth:w,previewFrameDimensions:p,baseFrameDimensions:b,framePhotos:z}}var ex=a(24924),ep=a(83648);let ef=(0,g.XO)("shadowbox"),eb=(0,g.zP)().filter(e=>"standard"===e.id||"non-glare"===e.id),ev=["magazine-size-layout","frame-style","mat-options","nameplate","glazing","hardware"];function ej(e){var t,a,g,et,ea,ei,el,er;let{defaultFrameId:eo,embedded:ec=!1}=e,{toast:em}=(0,W.pm)(),eh=(0,y.d)(),{headerOffset:ej,previewHeight:ey,previewSpacer:eN,previewSentinelRef:ew}=(0,z.j)({maxCapPx:420}),[ez,eM]=(0,w.Z)(),ek=(0,l.U)(l.y),{activeStep:eC,stepContainerRef:eF}=(0,v.C)(ev,{offsetTop:ej+ey}),[eS,eI]=(0,_.useState)(!1);(0,_.useEffect)(()=>eI(!0),[]);let[eP,e_]=(0,_.useState)(["magazine-size-layout","frame-style","mat-options","nameplate","glazing","hardware"]);(0,_.useEffect)(()=>{eh&&!eP.includes("mat-options")&&e_(e=>[...e,"mat-options"])},[eh,eP]);let eW=(0,_.useMemo)(()=>(0,u.yn)(),[]),eL=(0,_.useMemo)(()=>{if(eo)return ef.find(e=>e.id===eo||e.sku===eo)||ef[0];let e=eW.get("frame");return e?ef.find(t=>t.id===e||t.sku===e)||ef[0]:ef.find(e=>"8693"===e.sku)||ef[0]},[eo,eW]),[eR,eE]=(0,_.useState)(()=>eW.get("format")||"standard-8x105"),[eZ,eU]=(0,_.useState)(()=>"true"===eW.get("customSize")),[eT,eH]=(0,_.useState)(()=>eW.get("customWidth")||"8"),[eA,eq]=(0,_.useState)(()=>eW.get("customHeight")||"10"),eD=(0,P.useSearchParams)();(0,_.useEffect)(()=>{let e=eD.get("format");e&&eE(e)},[eD]);let[eB,eK]=(0,_.useState)(()=>{let e=eW.get("layout");return e&&r.y2.find(t=>t.id===e)?e:""}),[eO,eQ]=(0,_.useState)(()=>null!=eL?eL:ef[0]),eJ=(0,L.K)(eO.id),[eV,eY]=(0,_.useState)(()=>{var e;let t=eW.get("mat");return null!==(e=t?(0,s.MK)(t):(0,s.MK)("mat-1"))&&void 0!==e?e:s.EW[0]}),[eG,e$]=(0,_.useState)(()=>{var e;let t=eW.get("matInner");return null!==(e=t?(0,s.MK)(t):(0,s.MK)("mat-2"))&&void 0!==e?e:s.EW[1]}),[eX,e0]=(0,_.useState)(()=>eW.get("matType")||"single"),[e2,e1]=(0,_.useState)(()=>"true"===eW.get("bottomWeighted")),[e5,e4]=(0,_.useState)(()=>{let e=eW.get("glass");return e&&eb.find(t=>t.id===e)||eb[0]}),[e3,e8]=(0,_.useState)(()=>eW.get("hardware")||"standard"),[e6,e7]=(0,_.useState)(()=>{let e={enabled:!1,line1:"",line2:"",line3:"",font:"georgia",color:"brass-black",includeFlag:!1};try{if(!("true"===eW.get("nameplateEnabled")||"true"===eW.get("plaqueEnabled")))return e;return{enabled:!0,line1:eW.get("nameplateLine1")||eW.get("plaqueLine1")||"",line2:eW.get("nameplateLine2")||eW.get("plaqueLine2")||"",line3:eW.get("nameplateLine3")||eW.get("plaqueLine3")||"",font:eW.get("nameplateFont")||eW.get("plaqueFont")||"georgia",color:eW.get("nameplateColor")||eW.get("plaqueColor")||"brass-black",includeFlag:!1}}catch(t){return e}}),[e9,te]=(0,_.useState)(!1),[tt,ta]=(0,_.useState)(!1),[ti,ts]=(0,_.useState)(!1),[tl,tr]=(0,_.useState)("preview"),[tn,td]=(0,_.useState)(""),[to,tc]=(0,_.useState)(""),[tm,th]=(0,_.useState)(1),[,tu]=(0,_.useState)(!1),tg=(0,_.useRef)(null),tx=(0,_.useRef)(null),tp="".concat(null!==(a=null==eO?void 0:eO.id)&&void 0!==a?a:"","|").concat(null!==(g=null==eV?void 0:eV.id)&&void 0!==g?g:"","|").concat(null!==(et=null==eG?void 0:eG.id)&&void 0!==et?et:"","|").concat(null!==(ea=null==e5?void 0:e5.id)&&void 0!==ea?ea:"","|").concat(eX,"|").concat(eR,"|").concat(eB,"|").concat(tm,"|").concat(e3,"|").concat(e2?1:0,"|").concat((null==e6?void 0:e6.enabled)?1:0),{barState:tf,scrollToConfigurator:tb}=(0,j.G)(tx,{interactionSignal:tp}),[tv,tj]=(0,_.useState)(null),[,ty]=(0,_.useState)(!1),[,tN]=(0,_.useState)(null),[,tw]=(0,_.useState)(!1),[,tz]=(0,_.useState)(!1),tM=(0,_.useMemo)(()=>(0,r.kd)(eR,2),[eR,2]),tk=(0,_.useRef)(null),[tC,tF]=(0,_.useState)(()=>({width:Math.max(320,Math.min(.9*window.innerWidth,600)),height:400}));(0,_.useEffect)(()=>
1{if(eB&&!tM.some(e=>e.id===eB)){let e=tM.find(e=>"single"===e.id)||tM[0];e&&(eK(e.id),em({title:"Layout Changed",description:"The selected layout is not available for this magazine size. Switched to ".concat(e.displayName,".")}))}},[eR,tM,eB,em]);let tS=e2?.5:0,tI=(0,_.useMemo)(()=>eB?(0,r.zx)(eB,eR,2,e6.enabled,tS):{width:16,height:20},[eB,eR,e6.enabled,tS]),tP=(0,_.useMemo)(()=>{let e=window.innerHeight,t=window.innerWidth;return Math.max(220,Math.min(2*(tC.width>0?tC.width:Math.min(.94*t,600)),eh?.65*e:.8*e))},[tC.width,eh]),t_=(0,_.useMemo)(()=>{if(!eB)return[];let e=(0,r.lY)(eB);return(0,x._7l)(eR,eB,e.count).map(e=>(0,f.$Z)(e))},[eR,eB]),tW=(0,_.useMemo)(()=>{var e;return null!==(e=en[0])&&void 0!==e?e:{url:"",alt:"Magazine display lifestyle photo"}},[]),tL=(0,_.useMemo)(()=>eZ?{id:"custom",width:parseFloat(eT)||8,height:parseFloat(eA)||10,description:"Custom Size",category:"large"}:(0,n.w6)(eR),[eR,eZ,eT,eA]),tR=(0,_.useMemo)(()=>eB?(0,r.lY)(eB):null,[eB]);(0,_.useEffect)(()=>{let e;if(!tk.current)return;let t=Math.round(tk.current.getBoundingClientRect().width);t>0&&tF(e=>({width:t,height:e.height}));let a=new ResizeObserver(t=>{clearTimeout(e),e=setTimeout(()=>{for(let e of t){let t=Math.round(e.contentRect.width);tF(e=>Math.abs(t-e.width)>2?{width:t,height:e.height}:e)}},16)});return a.observe(tk.current),()=>{clearTimeout(e),a.disconnect()}},[]);let tE=eh?Math.max(140,ey-48):tP,tZ=eg({sizeId:eR,layoutId:eB,matBorder:2,matReveal:.25,matType:eX,matId:eV.id,matInnerId:"double"===eX?eG.id:void 0,brassNameplateConfig:e6,selectedFrame:eO,containerWidth:tC.width,containerHeight:tE,bottomWeighted:e2}),tU=eg({sizeId:eR,layoutId:eB,matBorder:2,matReveal:.25,matType:eX,matId:eV.id,matInnerId:"double"===eX?eG.id:void 0,brassNameplateConfig:e6,selectedFrame:eO,containerWidth:window.innerWidth-100,containerHeight:window.innerHeight-100,bottomWeighted:e2}),tT=(0,_.useMemo)(()=>{let e=(0,s.UA)(tI.width,tI.height,!0,!1);return eh?e:e.filter(e=>"Terracotta"!==e.name)},[tI.width,tI.height,eh]),tH=(0,_.useMemo)(()=>(0,s.UA)(tI.width,tI.height,!1,!0),[tI.width,tI.height]);(0,_.useEffect)(()=>{let e=[...tT,...tH];if(!e.some(e=>e.id===eV.id)&&e.length>0){let t=e.find(e=>"mat-2"===e.id),a=null!=t?t:e[0];a&&eY(a)}if("double"===eX&&!e.some(e=>e.id===eG.id)&&e.length>0){let t=e.find(e=>"mat-1"===e.id),a=null!=t?t:e[0];a&&e$(a)}},[tT,tH,eV.id,eG.id,eX]),(0,_.useEffect)(()=>{"none"===eX&&e2&&e1(!1)},[eX,e2]);let tA=(0,N.h)({frame:eO,layoutId:eB,sizeId:eR,matType:eX,matBorder:2,glass:e5,hardware:e3,brassPlaqueEnabled:e6.enabled,bottomWeighted:e2}),tq=(0,o.$)(e6),tD=(0,_.useMemo)(()=>{let e=[];return e.push({label:"Shadowbox Frame",amount:tA.framePrice,testId:"text-price-frame"}),tR&&tR.count>1&&e.push({label:"Mat Openings (".concat(tR.count-1," additional)"),amount:tA.matPrice,testId:"text-price-mat"}),e.push({label:(null==e5?void 0:e5.id)==="non-glare"?"Non-Glare Acrylic":"Standard Acrylic",amount:0,isIncluded:!0,testId:"text-price-glass"}),"security"===e3?e.push({label:"Security Hardware",amount:tA.hardwarePrice,testId:"text-price-hardware"}):e.push({label:"Standard Hardware",amount:0,isIncluded:!0,testId:"text-price-hardware"}),e6.enabled&&e.push({label:"Engraved Brass Nameplate",amount:tA.nameplatePrice,testId:"text-price-nameplate"}),e},[tA,tR,e5,e3,e6.enabled]),tB=(0,_.useMemo)(()=>{var e;return(0,u.cr)({frame:eO.id,format:eR,customSize:eZ?"true":"",customWidth:eZ?eT:"",customHeight:eZ?eA:"",layout:eB,matType:eX,mat:eV.id,matInner:"double"===eX?eG.id:"",bottomWeighted:e2?"true":"",glass:null!==(e=null==e5?void 0:e5.id)&&void 0!==e?e:"",hardware:e3,nameplateEnabled:e6.enabled?"true":"",nameplateLine1:e6.enabled?e6.line1:"",nameplateLine2:e6.enabled?e6.line2:"",nameplateLine3:e6.enabled?e6.line3:"",nameplateFont:e6.enabled?e6.font:"",nameplateColor:e6.enabled?e6.color:""})},[eO.id,eR,eZ,eT,eA,eB,eX,eV.id,eG.id,e2,e5,e3,e6]),tK=(0,_.useCallback)(()=>{navigator.clipboard.writeText(tB),em({title:"Link copied!",description:"Design link copied to clipboard"})},[tB,em]),tO=(0,_.useCallback)(async()=>{if(!tq){ts(!0);try{let e=(0,r.lY)(eB);if(!eB||!e){em({title:"Please select a layout",description:"Choose a layout to add to cart",variant:"destructive"}),ts(!1);return}let t=(0,h.SMc)(eR,eB),a=t?(0,h.H0c)(t):null,i=a?"".concat(a.overallMat.width,'" \xd7 ').concat(a.overallMat.height,'"'):null,s=a?"".concat(a.overallMat.width,"x").concat(a.overallMat.height):null,l=await (0,c.ay)({enabled:e6.enabled,config:e6,filenameBase:"nameplate-magazine-".concat(Date.now())}),n={serviceType:"frame-only",artworkWidth:tI.width,artworkHeight:tI.height,frameStyleId:eO.id,matType:"none"===eX?"none":eX,matBorderWidth:"none"===eX?0:2,matRevealWidth:"double"===eX?.25:0,matColorId:"none"===eX?"":eV.id,matInnerColorId:"double"===eX?eG.id:void 0,glassTypeId:(null==e5?void 0:e5.id)||"standard",orderSource:"magazine-frame-".concat(eB),hangingHardware:e3,brassNameplateConfig:e6.enabled?e6:void 0,additionalInfo:{"Product Type":"Magazine Frame",...s?{"Finis
1hed frame size":s}:{},...t?{"Mat Key Code":t}:{},...i?{"Mat Size":i}:{},...l}},o=(0,m.Uk)(n,tA.total,tm);b.xS.getState().addItem(o),await (0,d.X2)(n,tA.total,tm),em({title:"Added to Cart!",description:"".concat(tm,"\xd7 Magazine Frame - ").concat(e.displayName||"Custom")})}catch(e){console.error("Add to cart error:",e),em({title:"Add to Cart Failed",description:e instanceof Error?e.message:"Failed to add item to cart",variant:"destructive"})}finally{ts(!1)}}},[eB,eO.id,eX,eV.id,eG.id,null==e5?void 0:e5.id,e6,tm,tA.total,tI,em]);return(0,_.useEffect)(()=>{if(eh)return;let e=()=>{let e=window.scrollY;tu((e+window.innerHeight)/document.documentElement.scrollHeight>.5)};return window.addEventListener("scroll",e,{passive:!0}),e(),()=>{window.removeEventListener("scroll",e)}},[eh]),(0,_.useEffect)(()=>{eB||eW.get("layout")||eK("single")},[eB,eW]),(0,_.useEffect)(()=>{if(!eW.get("format")&&tv!==eR){if("standard-8x105"===eR){eK("single");let e=ef.find(e=>e.name.toLowerCase().includes("black"));e&&eQ(e),e0("single");let t=(0,s.MK)("mat-1");t&&eY(t);let a=(0,s.MK)("mat-2");a&&e$(a),tj("standard-8x105")}else if("standard-letter"===eR){eK("single");let e=ef.find(e=>e.name.toLowerCase().includes("black"));e&&eQ(e),e0("single");let t=(0,s.MK)("mat-1");t&&eY(t);let a=(0,s.MK)("mat-2");a&&e$(a),tj("standard-letter")}}},[eR,tv,eh,eW]),(0,i.jsx)(ee.TooltipProvider,{children:(0,i.jsxs)("div",{className:"min-h-screen bg-background pb-24 lg:pb-0",children:[eh&&(0,i.jsx)("div",{className:"lg:hidden border-b bg-card/50 sticky top-0 z-40",children:(0,i.jsx)("div",{className:"px-4 py-3",children:(0,i.jsx)("h2",{className:"text-lg font-bold",children:"Magazine Frame Designer"})})}),(0,i.jsxs)("div",{className:"container mx-auto px-4 py-6 lg:py-8",children:[(0,i.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-8",children:[(0,i.jsx)("div",{ref:ew,className:"lg:hidden col-span-full h-0","aria-hidden":"true"}),(0,i.jsx)("style",{children:eS?"\n @media (max-width: 1023.98px) {\n [data-fc-steps] {\n --fc-section-top: ".concat(ej+ey+eM,'px;\n }\n [data-cpf-preview-band="true"] {\n height: ').concat(ey,"px !important;\n max-height: ").concat(ey,"px !important;\n margin-bottom: ").concat(eN,'px !important;\n overflow: hidden !important;\n }\n [data-cpf-preview-band="true"] [data-testid="card-preview"] {\n height: 100% !important;\n max-height: 100% !important;\n overflow: hidden !important;\n display: flex !important;\n flex-direction: column !important;\n }\n [data-cpf-preview-band="true"] [data-testid="preview-container"] {\n flex: 1 1 0% !important;\n min-height: 0 !important;\n max-height: 100% !important;\n overflow: hidden !important;\n }\n }\n '):""}),(0,i.jsx)("div",{"data-cpf-preview-band":"true",className:"sticky z-30 lg:overflow-visible lg:top-[132px] lg:self-start lg:z-auto",style:eh?{top:"".concat(ej,"px")}:void 0,children:(0,i.jsx)(O.Zb,{className:"p-2 lg:p-6","data-testid":"card-preview",children:(0,i.jsxs)("div",{className:"space-y-4 max-lg:flex-1 max-lg:min-h-0 max-lg:flex max-lg:flex-col",children:[(0,i.jsxs)("div",{ref:tk,onClick:()=>{tr("preview"),ta(!0)},className:"flex items-center justify-center relative group cursor-zoom-in max-lg:flex-1 max-lg:min-h-0 lg:bg-muted/50 lg:rounded lg:p-4",style:eh?void 0:{minHeight:"".concat(tP,"px")},"data-testid":"preview-container",children:[(0,i.jsx)("div",{className:"absolute top-4 left-4 z-10 opacity-0 group-hover:opacity-100 transition-opacity",children:(0,i.jsxs)("button",{onClick:e=>{e.stopPropagation(),tr("preview"),ta(!0)},className:"bg-background/95 backdrop-blur-sm hover:bg-background rounded-md shadow-lg hover-elevate active-elevate-2 inline-flex min-h-11 w-14 flex-col items-center justify-center gap-0.5 py-1.5","data-testid":"button-fullscreen","aria-label":"Fullscreen preview",children:[(0,i.jsx)(M.Z,{className:"h-4 w-4","aria-hidden":!0}),(0,i.jsx)("span",{className:"text-[10px] font-medium leading-tight",children:"Zoom"})]})}),eB?(0,i.jsx)(eu,{framePhotos:tZ.framePhotos,selectedFrame:eO,topMatColor:eV,bottomMatColor:"double"===eX?eG:eV,backingColor:eV,matType:eX,layout:eB,sizeId:eR,matBorder:2,manifest:tZ.manifest,previewScale:tZ.previewScale,previewWidth:tZ.previewWidth,previewHeight:tZ.previewHeight,frameFaceWidth:tZ.frameFaceWidth,isMobile:eh,magazineCovers:t_,brassNameplateConfig:e6,bottomWeightedExtra:tS}):(0,i.jsx)("div",{className:"flex items-center justify-center h-full min-h-[400px]",children:(0,i.jsxs)("div",{className:"text-center p-8",children:[(0,i.jsx)(k.Z,{className:"w-12 h-12 mx-auto mb-4 text-muted-foreground"}),(0,i.jsx)("p",{className:"text-lg font-medium text-muted-foreground",children:"Select a layout to preview your frame"})]})})]}),(0,i.jsxs)("div",{className:"hidden lg:block p-3 bg-muted/50 rounded-md space-y-0.5","data-testid":"dimensions-box",children:[(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsxs)("p",{className:"text-sm font-medium",children:["Finis
1hed Size:"," ",(0,i.jsxs)("span",{className:"text-primary",children:[tI.width.toFixed(1),'" \xd7'," ",tI.height.toFixed(1),'"']})]}),(0,i.jsxs)(ee.u,{children:[(0,i.jsx)(ee.aJ,{asChild:!0,children:(0,i.jsx)(C.Z,{className:"w-3.5 h-3.5 text-muted-foreground cursor-help"})}),(0,i.jsx)(ee._v,{className:"max-w-xs",children:(0,i.jsx)("p",{children:"Outer frame dimensions including moulding. Interior dimensions accommodate your magazines with the selected mat border."})})]})]}),(0,i.jsxs)("p",{className:"text-xs text-muted-foreground",children:[tL?"Magazine: ".concat(tL.width,'" \xd7 ').concat(tL.height,'"'):""," ","⢠Mat Border: ",2,'"']})]}),(0,i.jsx)("p",{className:"hidden lg:block text-xs text-muted-foreground text-center",children:"Sample image. Not included with purchase."}),(0,i.jsxs)("div",{className:"hidden lg:grid grid-cols-3 gap-2",children:[(()=>{var e;let t=null===(e=eO.alternateImages)||void 0===e?void 0:e.find(e=>"corner"===e.type&&e.url.includes("corner_a"));return t?(0,i.jsx)("button",{onClick:()=>{tr("corner"),ta(!0)},className:"aspect-square rounded-md border overflow-hidden bg-background hover-elevate active-elevate-2",children:(0,i.jsx)("img",{src:(0,f.uQ)(t.url.startsWith("/")?t.url.slice(1):t.url),alt:t.alt||"".concat(eO.name," corner detail"),className:"w-full h-full object-cover"})}):tZ.framePhotos.cornerUrl?(0,i.jsx)("button",{onClick:()=>{tr("corner"),ta(!0)},className:"aspect-square rounded-md border overflow-hidden bg-background hover-elevate active-elevate-2",children:(0,i.jsx)("img",{src:tZ.framePhotos.cornerUrl,alt:"Frame corner detail",className:"w-full h-full object-cover"})}):(0,i.jsx)("div",{className:"aspect-square rounded-md border-2 border-dashed border-border flex items-center justify-center bg-muted/30"})})(),(()=>{var e;let t=null===(e=eO.alternateImages)||void 0===e?void 0:e.find(e=>"profile"===e.type);return t?(0,i.jsx)("button",{onClick:()=>{tr("profile"),ta(!0)},className:"aspect-square rounded-md border overflow-hidden bg-background hover-elevate active-elevate-2",children:(0,i.jsx)("img",{src:(0,f.uQ)(t.url.startsWith("/")?t.url.slice(1):t.url),alt:t.alt||"".concat(eO.name," profile"),className:"w-full h-full object-cover"})}):tZ.framePhotos.profileUrl?(0,i.jsx)("button",{onClick:()=>{tr("profile"),ta(!0)},className:"aspect-square rounded-md border overflow-hidden bg-background hover-elevate active-elevate-2",children:(0,i.jsx)("img",{src:tZ.framePhotos.profileUrl,alt:"Frame profile view",className:"w-full h-full object-cover"})}):(0,i.jsx)("div",{className:"aspect-square rounded-md border-2 border-dashed border-border flex items-center justify-center bg-muted/30"})})(),tW.url?(0,i.jsx)("button",{onClick:()=>{tr("lifestyle"),ta(!0)},className:"aspect-square rounded-md border overflow-hidden bg-background hover-elevate active-elevate-2",children:(0,i.jsx)("img",{src:tW.url,alt:tW.alt,className:"w-full h-full object-cover"})}):(0,i.jsx)("div",{className:"aspect-square rounded-md border-2 border-dashed border-border flex items-center justify-center bg-muted/30"})]}),!eh&&(0,i.jsx)(A.j,{}),(0,i.jsx)("div",{className:"pt-4 mt-4 border-t",children:(0,i.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"All magazine covers displayed are for illustrative purposes only to show how our frames look in use. We do not sell or reproduce any magazine artwork. All characters, logos, and artwork remain the property of their respective copyright holders and are used here under fair use for demonstration."})})]})})}),(0,i.jsxs)("div",{ref:e=>{tg.current=e,tx.current=e},className:"space-y-6",children:[(0,i.jsx)("h2",{className:"text-2xl font-bold mb-2 lg:hidden",children:"Customize Your Frame"}),(0,i.jsxs)(O.Zb,{className:"p-6",children:[(0,i.jsx)("h2",{className:"text-2xl font-semibold mb-4 hidden lg:block",children:"Configure Your Magazine Frame"}),(0,i.jsxs)(E.D,{barRef:ez,top:ej+ey,className:"lg:hidden",children:["frame-style"===eC?(0,i.jsx)(H.i,{width:null==tL?void 0:tL.width,height:null==tL?void 0:tL.height,scrollToStep:"magazine-size-layout"}):null,"mat-options"!==eC||ek?null:(0,i.jsx)(U.U,{value:eX,onChange:e0,options:["none","single","double"]})]}),(0,i.jsxs)(D.UQ,{"data-fc-steps":!0,ref:eF,type:"multiple",value:eP,onValueChange:e_,className:"space-y-4",children:[(0,i.jsxs)(D.Qd,{value:"magazine-size-layout","data-step":"magazine-size-layout",className:"border rounded-lg px-4 lg:px-6",children:[(0,i.jsx)(D.o4,{className:"text-base font-semibold hover:no-underline py-4","data-testid":"accordion-setup",children:"Magazine Size & Layout"}),(0,i.jsxs)(D.vF,{className:"space-y-6 pt-4",children:[(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(Y._,{className:"text-base font-semibold",children:"Magazine Size"}),(0,i.jsxs)(ee.u,{children:[(0,i.jsx)(ee.aJ,{asChild:!0,children:(0,i.jsx)(C.Z,{className:"w-4 h-4 text-muted-foreground cursor-help"})}),(0,i.jsx)(ee._v,{className:"max-w-xs",children:(0,i.jsx)("p",{children:'Select your magazine size. Choose from compact formats like digest size (8\xd710.5") to larger formats like Life Magazine (10.5\xd714").'})})]})]}),(0,i.jsx)("a",{href:"/magazine-sizes-guide",className:"text-xs text-primary underline underline-offset-2","data-testid":"link-size-guide",children:"View Size Guide"})]}),(0,i.jsxs)("div",{className:"flex items-start gap-2 p-3 rounded-md border bg-muted/30",children:[(0,i.jsx)(C.Z,{className:"w-4 h-4 text-muted-foreground mt-0.5 flex-shrink-0"}),(0,i.jsx)("p",{className:"text-sm text-muted-foreground",children:"Measure your magazine before ordering. Lay it flat and measure the full width and height, edge to edge."})]}),(0,i.jsxs)("div",{className:"lg:hidden space-y-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Compact Formats"}),(0,i.jsx)("div",{className:"grid grid-cols-2 gap-1.5",children:n.AC.filter(e=>"compact"===e.category).map(e=>(0,i.jsxs)(ee.u,{children:[(0,i.jsx)(ee.aJ,{asChild:!0,children:(0,i.jsx)(K.z,{type:"button",variant:eR!==e.id||eZ?"outline":"default",size:"sm",onClick:()=>{eE(e.id),eU(!1)},className:"flex-col h-auto py-2 px-2","aria-pressed":eR===e.id,"data-testid":"button-size-".concat(e.id,"-mobile"),children:(0,i.jsxs)("span",{className:"text-xs font-semibold leading-tight",children:[e.width,"\xd7",e.height,'"']})})}),(0,i.jsx)(ee._v,{side:"top",className:"max-w-[280px] p-3",children:(0,i.jsxs)("div",{className:"space-y-1.5",children:[(0,i.jsx)("div",{className:"text-xs font-medium text-foreground mb-2",children:"Popular magazines in this size:"}),(()=>{let{magazines:t,hasMore:a}=(0,p.F2)(e.id),s=Math.ceil(t.length/2),l=t.slice(0,s),r=t.slice(s);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:t.length>5?"grid grid-cols-2 gap-x-4 gap-y-0.5":"space-y-0.5",children:t.length>5?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"space-y-0.5",children:l.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))}),(0,i.jsx)("div",{className:"space-y-0.5",children:r.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))})]}):t.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))}),a&&(0,i.jsx)("div",{className:"text-xs text-muted-foreground italic mt-1.5 pt-1.5 border-t border-border",children:"+ more magazines in this size"})]})})()]})})]},e.id))})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Standard Formats"}),(0,i.jsx)("div",{className:"grid grid-cols-2 gap-1.5",children:n.AC.filter(e=>"standard"===e.category).map(e=>(0,i.jsxs)(ee.u,{children:[(0,i.jsx)(ee.aJ,{asChild:!0,children:(0,i.jsx)(K.z,{type:"button",variant:eR!==e.id||eZ?"outline":"default",size:"sm",onClick:()=>{eE(e.id),eU(!1)},className:"flex-col h-auto py-2 px-2","aria-pressed":eR===e.id,"data-testid":"button-size-".concat(e.id,"-mobile"),children:(0,i.jsxs)("span",{className:"text-xs font-semibold leading-tight",children:[e.width,"\xd7",e.height,'"']})})}),(0,i.jsx)(ee._v,{side:"top",className:"max-w-[280px] p-3",children:(0,i.jsxs)("div",{className:"space-y-1.5",children:[(0,i.jsx)("div",{className:"text-xs font-medium text-foreground mb-2",children:"Popular magazines in this size:"}),(()=>{let{magazines:t,hasMore:a}=(0,p.F2)(e.id),s=Math.ceil(t.length/2),l=t.slice(0,s),r=t.slice(s);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:t.length>5?"grid grid-cols-2 gap-x-4 gap-y-0.5":"space-y-0.5",children:t.length>5?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"space-y-0.5",children:l.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))}),(0,i.jsx)("div",{className:"space-y-0.5",children:r.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))})]}):t.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))}),a&&(0,i.jsx)("div",{className:"text-xs text-muted-foreground italic mt-1.5 pt-1.5 border-t border-border",children:"+ more magazines in this size"})]})})()]})})]},e.id))})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Large Formats"}),(0,i.jsxs)("div",{className:"grid grid-cols-2 gap-1.5",children:[n.AC.filter(e=>"large"===e.category).map(e=>(0,i.jsxs)(ee.u,{children:[(0,i.jsx)(ee.aJ,{asChild:!0,children:(0,i.jsx)(K.z,{type:"button",variant:eR!==e.id||eZ?"outline":"default",size:"sm",onClick:()=>{eE(e.id),eU(!1)},className:"flex-col h-auto py-2 px-2","aria-pressed":eR===e.id,"data-testid":"button-size-".concat(e.id,"-mobile"),children:(0,i.jsxs)("span",{className:"text-xs font-semibold leading-tight",children:[e.width,"\xd7",e.height,'"']})})}),(0,i.jsx)(ee._v,{side:"top",className:"max-w-[280px] p-3",children:(0,i.jsxs)("div",{className:"space-y-1.5",children:[(0,i.jsx)("div",{className:"text-xs font-medium text-foreground mb-2",children:"Popular magazines in this size:"}),(()=>{let{magazines:t,hasMore:a}=(0,p.F2)(e.id),s=Math.ceil(t.length/2),l=t.slice(0,s),r=t.slice(s);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:t.length>5?"grid grid-cols-2 gap-x-4 gap-y-0.5":"space-y-0.5",children:t.length>5?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"space-y-0.5",children:l.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))}),(0,i.jsx)("div",{className:"space-y-0.5",children:r.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))})]}):t.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))}),a&&(0,i.jsx)("div",{className:"text-xs text-muted-foreground italic mt-1.5 pt-1.5 border-t border-border",children:"+ more magazines in this size"})]})})()]})})]},e.id)),(0,i.jsx)(K.z,{type:"button",variant:eZ?"default":"outline",size:"sm",onClick:()=>eU(!0),className:"flex-col h-auto py-2 px-2","data-testid":"button-size-custom-mobile",children:(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[(0,i.jsx)(F.Z,{className:"w-3 h-3"}),(0,i.jsx)("span",{className:"text-xs font-semibold leading-tight",children:"Custom"})]})})]})]})]}),eZ&&(0,i.jsxs)("div",{className:"lg:hidden mt-4 p-4 rounded-lg border-2 border-primary bg-primary/5 space-y-3 animate-in slide-in-from-top-2 duration-200",children:[(0,i.jsx)("div",{className:"flex items-center justify-between",children:(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(F.Z,{className:"w-4 h-4 text-primary"}),(0,i.jsx)("h4",{className:"font-semibold text-sm",children:"Custom Magazine Size"})]})}),(0,i.jsxs)(B.bZ,{className:"py-2 bg-background",children:[(0,i.jsx)(C.Z,{className:"h-4 w-4"}
1),(0,i.jsx)(B.X,{className:"text-xs",children:"Measure your magazine before ordering. Lay it flat and measure edge to edge."})]}),(0,i.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,i.jsxs)("div",{className:"space-y-1.5",children:[(0,i.jsx)(Y._,{htmlFor:"custom-width-mobile",className:"text-xs",children:"Width (inches)"}),(0,i.jsx)(V.I,{id:"custom-width-mobile",type:"number",step:"0.25",min:"4",max:"20",value:eT,onChange:e=>eH(e.target.value),placeholder:"8",className:"bg-background","data-testid":"input-custom-width-mobile"})]}),(0,i.jsxs)("div",{className:"space-y-1.5",children:[(0,i.jsx)(Y._,{htmlFor:"custom-height-mobile",className:"text-xs",children:"Height (inches)"}),(0,i.jsx)(V.I,{id:"custom-height-mobile",type:"number",step:"0.25",min:"4",max:"20",value:eA,onChange:e=>eq(e.target.value),placeholder:"10",className:"bg-background","data-testid":"input-custom-height-mobile"})]})]}),(0,i.jsx)("p",{className:"text-xs text-muted-foreground",children:'Min 4". Decimals accepted (e.g., 8.5 or 10.25)'})]}),(0,i.jsxs)("div",{className:"hidden lg:space-y-4 lg:block",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h4",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Compact Formats"}),(0,i.jsx)("div",{className:"grid grid-cols-2 gap-2",children:n.AC.filter(e=>"compact"===e.category).map(e=>(0,i.jsxs)(ee.u,{children:[(0,i.jsx)(ee.aJ,{asChild:!0,children:(0,i.jsx)("button",{onClick:()=>{eE(e.id),eU(!1)},className:"text-left p-3 rounded-lg border-2 transition-all hover-elevate active-elevate-2 ".concat(eR!==e.id||eZ?"border-border bg-card":"border-primary bg-primary/5"),"data-testid":"button-size-".concat(e.id),children:(0,i.jsxs)("p",{className:"font-semibold text-sm",children:[e.width,"\xd7",e.height," inch"]})})}),(0,i.jsx)(ee._v,{side:"right",className:"max-w-[280px] p-3",children:(0,i.jsxs)("div",{className:"space-y-1.5",children:[(0,i.jsx)("div",{className:"text-xs font-medium text-foreground mb-2",children:"Popular magazines in this size:"}),(()=>{let{magazines:t,hasMore:a}=(0,p.F2)(e.id),s=Math.ceil(t.length/2),l=t.slice(0,s),r=t.slice(s);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:t.length>5?"grid grid-cols-2 gap-x-4 gap-y-0.5":"space-y-0.5",children:t.length>5?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"space-y-0.5",children:l.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))}),(0,i.jsx)("div",{className:"space-y-0.5",children:r.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))})]}):t.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))}),a&&(0,i.jsx)("div",{className:"text-xs text-muted-foreground italic mt-1.5 pt-1.5 border-t border-border",children:"+ more magazines in this size"})]})})()]})})]},e.id))})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("h4",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Standard Formats"}),(0,i.jsx)("div",{className:"grid grid-cols-2 gap-2",children:n.AC.filter(e=>"standard"===e.category).map(e=>(0,i.jsxs)(ee.u,{children:[(0,i.jsx)(ee.aJ,{asChild:!0,children:(0,i.jsx)("button",{onClick:()=>{eE(e.id),eU(!1)},className:"text-left p-3 rounded-lg border-2 transition-all hover-elevate active-elevate-2 ".concat(eR!==e.id||eZ?"border-border bg-card":"border-primary bg-primary/5"),"data-testid":"button-size-".concat(e.id),children:(0,i.jsxs)("p",{className:"font-semibold text-sm",children:[e.width,"\xd7",e.height," inch"]})})}),(0,i.jsx)(ee._v,{side:"right",className:"max-w-[280px] p-3",children:(0,i.jsxs)("div",{className:"space-y-1.5",children:[(0,i.jsx)("div",{className:"text-xs font-medium text-foreground mb-2",children:"Popular magazines in this size:"}),(()=>{let{magazines:t,hasMore:a}=(0,p.F2)(e.id),s=Math.ceil(t.length/2),l=t.slice(0,s),r=t.slice(s);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:t.length>5?"grid grid-cols-2 gap-x-4 gap-y-0.5":"space-y-0.5",children:t.length>5?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"space-y-0.5",children:l.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))}),(0,i.jsx)("div",{className:"space-y-0.5",children:r.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))})]}):t.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))}),a&&(0,i.jsx)("div",{className:"text-xs text-muted-foreground italic mt-1.5 pt-1.5 border-t border-border",children:"+ more magazines in this size"})]})})()]})})]},e.id))})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("h4",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Large Formats"}),(0,i.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[n.AC.filter(e=>"large"===e.category).map(e=>(0,i.jsxs)(ee.u,{children:[(0,i.jsx)(ee.aJ,{asChild:!0,children:(0,i.jsx)("button",{onClick:()=>{eE(e.id),eU(!1)},className:"text-left p-3 rounded-lg border-2 transition-all hover-elevate active-elevate-2 ".concat(eR!==e.id||eZ?"border-border bg-card":"border-primary bg-primary/5"),"data-testid":"button-size-".concat(e.id),children:(0,i.jsxs)("p",{className:"font-semibold text-sm",children:[e.width,"\xd7",e.height," inch"]})})}),(0,i.jsx)(ee._v,{side:"right",className:"max-w-[280px] p-3",children:(0,i.jsxs)("div",{className:"space-y-1.5",children:[(0,i.jsx)("div",{className:"text-xs font-medium text-foreground mb-2",children:"Popular magazines in this size:"}),(()=>{let{magazines:t,hasMore:a}=(0,p.F2)(e.id),s=Math.ceil(t.length/2),l=t.slice(0,s),r=t.slice(s);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:t.length>5?"grid grid-cols-2 gap-x-4 gap-y-0.5":"space-y-0.5",children:t.length>5?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"space-y-0.5",children:l.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))}),(0,i.jsx)("div",{className:"space-y-0.5",children:r.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))})]}):t.map((e,t)=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground leading-tight",children:["⢠",e]},t))}),a&&(0,i.jsx)("div",{className:"text-xs text-muted-foreground italic mt-1.5 pt-1.5 border-t border-border",children:"+ more magazines in this size"})]})})()]})})]},e.id)),(0,i.jsx)("button",{onClick:()=>eU(!0),className:"text-left p-3 rounded-lg border-2 transition-all hover-elevate active-elevate-2 ".concat(eZ?"border-primary bg-primary/5":"border-border bg-card"),"data-testid":"button-size-custom",children:(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsx)(F.Z,{className:"w-4 h-4"}),(0,i.jsx)("p",{className:"font-semibold text-sm",children:"Custom Size"})]})})]})]}),eZ&&(0,i.jsxs)("div",{className:"mt-4 p-4 rounded-lg border-2 border-primary bg-primary/5 space-y-3 animate-in slide-in-from-top-2 duration-200",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(F.Z,{className:"w-4 h-4 text-primary"}),(0,i.jsx)("h4",{className:"font-semibold text-sm",children:"Custom Magazine Size"})]}),(0,i.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,i.jsxs)("div",{className:"space-y-1.5",children:[(0,i.jsx)(Y._,{htmlFor:"custom-width",className:"text-xs",children:"Magazine Width (inches
1)"}),(0,i.jsx)(V.I,{id:"custom-width",type:"number",step:"0.25",min:"4",max:"20",value:eT,onChange:e=>eH(e.target.value),placeholder:"8",className:"bg-background","data-testid":"input-custom-width"})]}),(0,i.jsxs)("div",{className:"space-y-1.5",children:[(0,i.jsx)(Y._,{htmlFor:"custom-height",className:"text-xs",children:"Magazine Height (inches)"}),(0,i.jsx)(V.I,{id:"custom-height",type:"number",step:"0.25",min:"4",max:"20",value:eA,onChange:e=>eq(e.target.value),placeholder:"10",className:"bg-background","data-testid":"input-custom-height"})]})]}),(0,i.jsx)("p",{className:"text-xs text-muted-foreground",children:'Min 4". Decimals accepted (e.g., 8.5 or 10.25)'})]})]})]}),(0,i.jsx)(X.Z,{}),(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(Y._,{className:"text-base font-semibold",children:"Layout"}),(0,i.jsxs)(ee.u,{children:[(0,i.jsx)(ee.aJ,{asChild:!0,children:(0,i.jsx)(C.Z,{className:"w-4 h-4 text-muted-foreground cursor-help"})}),(0,i.jsx)(ee._v,{className:"max-w-xs",children:(0,i.jsx)("p",{children:"Choose how many magazines to display in your frame. Single magazine layouts are most popular for showcasing valuable issues."})})]})]}),(0,i.jsx)("p",{className:"text-sm text-muted-foreground",children:"Choose how many magazines to display"}),0===tM.length?(0,i.jsxs)(B.bZ,{children:[(0,i.jsx)(C.Z,{className:"h-4 w-4"}),(0,i.jsx)(B.X,{children:'No layouts are available for this magazine size within the 32\xd740" mat sheet constraint. Please select a smaller magazine size.'})]}):(0,i.jsx)(es,{selectedLayout:eB,onLayoutChange:eK,compact:eh,layouts:tM})]})]})]}),(0,i.jsxs)(D.Qd,{value:"frame-style","data-step":"frame-style",className:"border rounded-lg px-4 lg:px-6",children:[(0,i.jsx)(D.o4,{className:"text-base font-semibold hover:no-underline py-4","data-testid":"accordion-frame",children:"Frame Style"}),(0,i.jsxs)(D.vF,{className:"pt-2 pb-4",children:[(0,i.jsxs)("div",{className:"mb-3 p-2.5 bg-muted/50 rounded-md text-xs text-muted-foreground",children:[(0,i.jsxs)("p",{children:[(0,i.jsx)("strong",{className:"text-foreground",children:"Shadowbox Depth:"})," How deep the frame is"]}),(0,i.jsxs)("p",{className:"mt-1",children:[(0,i.jsx)("strong",{className:"text-foreground",children:"Moulding Width:"})," The width of the frame"]})]}),(0,i.jsx)("div",{className:"lg:max-h-[400px] lg:overflow-y-auto lg:pr-2",children:(0,i.jsx)("div",{className:"grid grid-cols-2 gap-2",children:ef.map(e=>(0,i.jsxs)("button",{type:"button",ref:eO.id===e.id?eJ:void 0,onClick:()=>eQ(e),className:"p-3 rounded-md border-2 text-left hover-elevate active-elevate-2 ".concat(eO.id===e.id?"border-primary bg-primary/5":"border-border"),"data-testid":"button-frame-".concat(e.id),children:[e.thumbnail?(0,i.jsx)("div",{className:"relative h-[34px] w-full rounded mb-2 overflow-hidden border border-border",children:(0,i.jsx)(I.default,{src:(0,f.uQ)(e.thumbnail.startsWith("/")?e.thumbnail.slice(1):e.thumbnail),alt:e.name,fill:!0,className:"object-cover",sizes:"1200px"})}):(0,i.jsx)("div",{className:"h-[34px] w-full rounded mb-2 flex items-center justify-center bg-muted border border-border",children:(0,i.jsx)("span",{className:"text-xs text-muted-foreground",children:"No preview"})}),(0,i.jsx)("p",{className:"font-medium text-xs lg:text-sm",children:e.name}),(0,i.jsxs)("p",{className:"text-xs text-muted-foreground mt-1",children:[e.mouldingWidth,'" wide \xd7 ',e.usableDepth,'" deep']})]},e.id))})})]})]}),(0,i.jsxs)(D.Qd,{value:"mat-options","data-step":"mat-options",className:"border rounded-lg px-4 lg:px-6",children:[(0,i.jsx)(D.o4,{className:"text-base font-semibold hover:no-underline py-4","data-testid":"accordion-mat",children:"Mat Color Options"}),(0,i.jsx)(D.vF,{className:"pt-2 pb-4",children:(0,i.jsxs)("div",{className:"space-y-4",children:[(null==tR?void 0:tR.count)===1?(0,i.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,i.jsx)(K.z,{type:"button",variant:"none"===eX?"default":"outline",onClick:()=>e0("none"),"data-testid":"button-mat-none",children:(0,i.jsx)("span",{className:"font-semibold",children:"No Mat"})}),(0,i.jsx)(K.z,{type:"button",variant:"single"===eX?"default":"outline",onClick:()=>e0("single"),"data-testid":"button-mat-single",children:(0,i.jsx)("span",{className:"font-semibold",children:"Single Mat"})}),(0,i.jsx)(K.z,{type:"button",variant:"double"===eX?"default":"outline",onClick:()=>e0("double"),"data-testid":"button-mat-double",children:(0,i.jsx)("span",{className:"font-semibold",children:"Double Mat"})})]}):(0,i.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,i.jsx)(K.z,{type:"button",variant:"single"===eX?"default":"outline",onClick:()=>e0("single"),"data-testid":"button-mat-single",children:(0,i.jsx)("span",{className:"font-semibold",children:"Single Mat"})}),(0,i.jsx)(K.z,{type:"button",variant:"double"===eX?"default":"outline",onClick:()=>e0("double"),"data-testid":"button-mat-double",children:(0,i.jsx)("span",{className:"font-semibold",children:"Double Mat"})})]}),(0,i.jsx)(ex.D,{checked:e2,onCheckedChange:e1,testIdPrefix:"magazine"}),(0,i.jsxs)("div",{className:"space-y-3",children:["double"===eX?(0,i.jsxs)(Y._,{className:"text-base font-semibold",children:["Top Mat Color: ",eV.name]}):(0,i.jsxs)(Y._,{children:["Mat Color: ",eV.name]}),(0,i.jsx)(Q.p,{standardColors:tT,premiumColors:tH,selectedId:eV.id,onSelect:eY,testIdPrefix:"mat"})]}),"double"===eX&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(X.Z,{className:"my-6"}),(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsxs)(Y._,{className:"text-base font-semibold",children:["Bottom Mat Color: ",eG.name]}),(0,i.jsx)(Q.p,{standardColors:tT,premiumColors:tH,selectedId:eG.id,onSelect:e$,testIdPrefix:"bottom-mat"})]})]})]})})]}),"none"!==eX&&(0,i.jsxs)(D.Qd,{value:"nameplate","data-step":"nameplate",className:"border rounded-lg px-4 lg:px-6",children:[(0,i.jsx)(D.o4,{className:"text-base font-semibold hover:no-underline py-4","data-testid":"accordion-nameplate",children:"Brass Nameplate"}),(0,i.jsx)(D.vF,{className:"pt-2 pb-4",children:(0,i.jsx)(R.W,{config:e6,onChange:e7,embedded:!0})})]}),(0,i.jsxs)(D.Qd,{value:"glazing","data-step":"glazing",className:"border rounded-lg px-4 lg:px-6",children:[(0,i.jsx)(D.o4,{className:"text-base font-semibold hover:no-underline py-4","data-testid":"accordion-glazing",children:"Glazing Type"}),(0,i.jsx)(D.vF,{className:"pt-2 pb-4",children:(0,i.jsx)($.E,{value:null!==(el=null!==(ei=null==e5?void 0:e5.id)&&void 0!==ei?ei:null===(t=eb[0])||void 0===t?void 0:t.id)&&void 0!==el?el:"",onValueChange:e=>{var t;return e4(null!==(t=eb.find(t=>
1t.id===e))&&void 0!==t?t:eb[0])},children:(0,i.jsx)("div",{className:"flex flex-col md:flex-row flex-wrap gap-2",children:eb.map(e=>(0,i.jsxs)("div",{className:"flex items-center space-x-3 flex-1 min-w-[200px]",children:[(0,i.jsx)($.m,{value:e.id,id:"glass-".concat(e.id),className:"h-5 w-5","data-testid":"radio-glass-".concat(e.id)}),(0,i.jsx)(Y._,{htmlFor:"glass-".concat(e.id),className:"cursor-pointer text-sm flex-1",children:e.name})]},e.id))})})})]}),(0,i.jsxs)(D.Qd,{value:"hardware","data-step":"hardware",className:"border rounded-lg px-4 lg:px-6",children:[(0,i.jsx)(D.o4,{className:"text-base font-semibold hover:no-underline py-4","data-testid":"accordion-hardware",children:"Hanging Hardware"}),(0,i.jsx)(D.vF,{className:"pt-2 pb-4",children:(0,i.jsx)(ep.A,{hardwareType:e3,setHardwareType:e8,frameWidth:tI.width,frameHeight:tI.height})})]})]})]}),(0,i.jsx)(G.b,{totalPrice:tA.total,quantity:tm,onQuantityChange:th,onAddToCart:tO,onCopyLink:tK,designUrl:tB,priceItems:tD,testIdPrefix:"magazine-",isProcessing:ti})]})]}),(0,i.jsx)(J.Vq,{open:e9,onOpenChange:te,children:(0,i.jsxs)(J.cZ,{children:[(0,i.jsx)(J.fK,{children:(0,i.jsx)(J.$N,{children:"Share Your Configuration"})}),(0,i.jsx)("div",{className:"space-y-4",children:(0,i.jsxs)("div",{children:[(0,i.jsx)(Y._,{children:"Shareable Link"}),(0,i.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,i.jsx)(V.I,{readOnly:!0,value:tB,className:"flex-1"}),(0,i.jsx)(K.z,{variant:"outline",size:"icon",onClick:()=>{navigator.clipboard.writeText(tB),em({title:"Link copied!",description:"Share this link to show your configuration"})},children:(0,i.jsx)(S.Z,{className:"h-4 w-4"})})]})]})})]})}),!ec&&(0,i.jsxs)("div",{className:"mt-12",children:[(0,i.jsxs)("div",{className:"mb-6 text-center",children:[(0,i.jsx)("h2",{className:"text-2xl font-bold tracking-tight mb-2",children:"Magazine Display Inspiration"}),(0,i.jsx)("p",{className:"text-muted-foreground",children:"Browse real customer frames showcasing magazines"})]}),(0,i.jsx)(ed,{onImageClick:(e,t)=>{td(e),tc(t),tr("lifestyle"),ta(!0)}})]})]}),(0,i.jsx)(q.p,{open:tt,onOpenChange:ta,title:"preview"===tl?"Frame Preview":"corner"===tl?"Frame Corner Detail":"profile"===tl?"Frame Profile View":"Lifestyle Photo",fitContent:"preview"===tl,src:(()=>{var e,t;if("corner"===tl){let t=null===(e=eO.alternateImages)||void 0===e?void 0:e.find(e=>"corner"===e.type&&e.url.includes("corner_a")),a=(null==t?void 0:t.url)||tZ.framePhotos.cornerUrl;return(null==a?void 0:a.startsWith("http"))?a:a?(0,f.uQ)(a.startsWith("/")?a.slice(1):a):void 0}if("profile"===tl){let e=null===(t=eO.alternateImages)||void 0===t?void 0:t.find(e=>"profile"===e.type),a=(null==e?void 0:e.url)||tZ.framePhotos.profileUrl;return(null==a?void 0:a.startsWith("http"))?a:a?(0,f.uQ)(a.startsWith("/")?a.slice(1):a):void 0}if("lifestyle"===tl)return tn||tW.url})(),alt:"lifestyle"===tl?to||tW.alt:"corner"===tl?"Frame corner detail":"Frame profile view","data-testid":"dialog-fullscreen",children:"preview"===tl?(0,i.jsx)("div",{style:{filter:"drop-shadow(0 8px 32px rgba(0, 0, 0, 0.15))"},children:(0,i.jsx)(eu,{framePhotos:tU.framePhotos,selectedFrame:eO,topMatColor:eV,bottomMatColor:"double"===eX?eG:eV,backingColor:eV,matType:eX,layout:eB,sizeId:eR,matBorder:2,manifest:tU.manifest,previewScale:tU.previewScale,previewWidth:tU.previewWidth,previewHeight:tU.previewHeight,frameFaceWidth:tU.frameFaceWidth,isMobile:eh,magazineCovers:t_,brassNameplateConfig:e6,bottomWeightedExtra:tS})}):null}),(0,i.jsx)(Z.L,{barState:tf,total:tA.total*tm,quantity:tm,onQuantityChange:th,onAddToCart:tO,onContinueDesigning:tb,isProcessing:ti,disabled:tq,testIdPrefix:"magazine-",ownershipGate:tq?(0,i.jsx)(T.O,{checked:null!==(er=e6.proofreadConfirmed)&&void 0!==er&&er,onChange:e=>e7(t=>({...t,proofreadConfirmed:e}))}):null,eyebrow:(()=>{let e=tI.width.toFixed(1).replace(/\.0$/,""),t=tI.height.toFixed(1).replace(/\.0$/,""),a="Magazine";return"Finished size: ".concat(e,"â³ \xd7 ").concat(t,"â³").concat(a?" | ".concat(a):"")})()})]})})}},16784:function(e,t,a){a.d(t,{X:function(){return o},bZ:function(){return d}});var i=a(27573),s=a(49289),l=a(7653),r=a(28867);let n=(0,s.j)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),d=l.forwardRef((e,t)=>
1{let{className:a,variant:s,...l}=e;return(0,i.jsx)("div",{ref:t,role:"alert",className:(0,r.cn)(n({variant:s}),a),...l})});d.displayName="Alert",l.forwardRef((e,t)=>{let{className:a,children:s,...l}=e;return(0,i.jsx)("h5",{ref:t,className:(0,r.cn)("mb-1 font-medium leading-none tracking-tight",a),...l,children:s})}).displayName="AlertTitle";let o=l.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,i.jsx)("div",{ref:t,className:(0,r.cn)("text-sm [&_p]:leading-relaxed",a),...s})});o.displayName="AlertDescription"}}]);
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.