1import{j as t,r as x}from"./index-L9AYrVUw.js";const p={id:"collage_editorial_v1",name:"Colagem Editorial",description:"Moodboard / scrapbook editorial â monta, não gera.",aspect:"4:5",slots:[{id:"photo_main",kind:"photo_block",x:.06,y:.08,w:.46,h:.42,rotate:-2,binding:{kind:"lifestyle",styleId:"sunlit-editorial",promptHint:"wide lifestyle scene"}},{id:"photo_secondary",kind:"photo_block",x:.58,y:.34,w:.36,h:.3,rotate:3,binding:{kind:"lifestyle",styleId:"sunlit-editorial",promptHint:"tight portrait detail"}},{id:"polaroid_keepsake",kind:"polaroid",x:.04,y:.56,w:.3,h:.34,rotate:-6,binding:{kind:"lifestyle",styleId:"sunlit-campaign-hero-in-hand",promptHint:"intimate keepsake moment"}},{id:"product_cutout",kind:"product_cutout",x:.42,y:.62,w:.34,h:.32,rotate:4,binding:{kind:"cutout",styleId:"product_breakdown_collage",removeBackground:!0}},{id:"decorative_1",kind:"decorative_cutout",x:.82,y:.86,w:.14,h:.14,rotate:18,binding:{kind:"asset_bank",bankKey:"primary"}},{id:"decorative_2",kind:"decorative_cutout",x:.02,y:.48,w:.12,h:.12,rotate:-22,binding:{kind:"asset_bank",bankKey:"secondary"}},{id:"text_headline",kind:"text_overlay",x:.52,y:.04,w:.42,h:.18,rotate:-4,binding:{kind:"static_text",text:"{TEMA}"}},{id:"text_caption",kind:"text_overlay",x:.06,y:.92,w:.4,h:.06,rotate:1,binding:{kind:"static_text",text:"{CAPTION}"}},{id:"arrow_pointer",kind:"arrow_overlay",x:.34,y:.5,w:.18,h:.12,rotate:-18,binding:{kind:"static_svg",svgKey:"curved_arrow"}}]};function g(e,i){return e.replace(/\{(\w+)\}/g,(a,o)=>i[o]??`{${o}}`)}const l=[{id:"beach_babe",name:"Beach Babe",palette:{paper:"#F4ECDB",accent:"#2E6BB8",cutoutShadow:"rgba(40, 30, 20, 0.18)"},headline:"beach babe",caption:"salt + sun, july notes",lifestylePrompts:{photo_main:"Sunlit beach scene, golden hour, sand and ocean in soft focus, editorial summer mood.",photo_secondary:"Tight detail shot â wet hair, sun freckles, towel texture, warm grain.",polaroid_keepsake:"Hand holding a seashell against a backlit ocean horizon, intimate, 35mm film feel."},decorativeAssets:{primary:["shell_spiral","starfish"],secondary:["palm_leaf"]},scriptFontClass:"font-caveat"}],u=e=>l.find(i=>i.id===e)??l[0],c=({children:e,viewBox:i="0 0 100 100"})=>t.jsx("svg",{viewBox:i,xmlns:"http://www.w3.org/2000/svg",style:{width:"100%",height:"100%",display:"block"},children:e}),f=()=>t.jsxs(c,{children:[t.jsx("defs",{children:t.jsxs("radialGradient",{id:"shell-g",cx:"40%",cy:"35%",r:"65%",children:[t.jsx("stop",{offset:"0%",stopColor:"#FBE4C9"}),t.jsx("stop",{offset:"60%",stopColor:"#E6A981"}),t.jsx("stop",{offset:"100%",stopColor:"#A86A48"})]})}),t.jsx("path",{d:"M50 14 C75 14 86 36 84 56 C82 76 65 88 50 88 C32 88 18 74 18 58 C18 44 28 36 42 36 C54 36 60 44 60 54 C60 64 54 70 48 70",fill:"url(#shell-g)",stroke:"#7A4A30",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),[0,1,2,3,4,5].map(e=>t.jsx("path",{d:`M50 ${20+e*6} Q ${56+e} ${36+e*5} 50 ${52+e*5}`,fill:"none",stroke:"#A86A48",strokeWidth:"0.7",strokeLinecap:"round",opacity:.7-e*.08},e))]}),y=()=>{const e=[0,72,144,216,288];return t.jsx(c,{children:t.jsxs("g",{transform:"translate(50 50)",children:[e.map(i=>t.jsx("path",{d:"M0 -42 Q 8 -10 0 6 Q -8 -10 0 -42 Z",transform:`rotate(${i})`,fill:"#E8A074",stroke:"#A35E3A",strokeWidth:"1",strokeLinejoin:"round"},i)),t.jsx("circle",{r:"11",fill:"#D88A5E",stroke:"#A35E3A",strokeWidth:"1"}),e.map(i=>t.jsx("circle",{cx:0,cy:-22,r:"1.2",fill:"#A35E3A",transform:`rotate(${i})`},`d${i}`))]})})},b=()=>t.jsx(c,{children:t.jsxs("g",{transform:"translate(50 50) rotate(-30)",children:[t.jsx("path",{d:"M0 38 C 2 10 4 -18 0 -40 C -4 -18 -2 10 0 38 Z",fill:"#3F7A4A",stroke:"#234A2C",strokeWidth:"0.8"}),Array.from({length:10}).map((e,i)=>{const a=-36+i*7,o=18-Math.abs(i-4)*2.2;return t.jsxs("g",{children:[t.jsx("path",{d:`M0 ${a} Q ${o*.6} ${a-1} ${o} ${a-4}`,fill:"none",stroke:"#3F7A4A",strokeWidth:"2.2",strokeLinecap:"round"}),t.jsx("path",{d:`M0 ${a} Q ${-o*.6} ${a-1} ${-o} ${a-4}`,fill:"none",stroke:"#3F7A4A",strokeWidth:"2.2",strokeLinecap:"round"})]},i)})]})}),k=({color:e="#2E6BB8"})=>t.jsxs(c,{viewBox:"0 0 200 120",children:[t.jsx("path",{d:"M10 60 C 50 10, 140 10, 180 70",fill:"none",stroke:e,strokeWidth:"3.5",strokeLinecap:"round",style:{strokeDasharray:4,strokeDashoffset:0}}),t.jsx("path",{d:"M168 56 L 184 72 L 162 78",fill:"none",stroke:e,strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),m={shell_spiral:f,starfish:y,palm_leaf:b},j={curved_arrow:k}
1,w=e=>{const[i,a]=e.split(":").map(Number);return i/a},v=({color:e})=>t.jsx("div",{"aria-hidden":!0,style:{position:"absolute",inset:0,background:e,backgroundImage:` 2 radial-gradient(rgba(0,0,0,0.04) 1px, transparent 1px), 3 radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px) 4 `,backgroundSize:"3px 3px, 5px 5px",backgroundPosition:"0 0, 1px 1px",boxShadow:"inset 0 0 80px rgba(80, 50, 20, 0.12)"}}),h=({hint:e,tone:i="#C9B79A"})=>t.jsx("div",{style:{width:"100%",height:"100%",background:`linear-gradient(135deg, ${i}, ${i}cc 60%, #8a7a5e)`,display:"flex",alignItems:"flex-end",justifyContent:"flex-start",padding:8,color:"hsl(var(--color-modal-text))",fontFamily:"monospace",fontSize:10,letterSpacing:"0.08em",textTransform:"uppercase"},children:e??"photo"}),_=(e,i,a)=>{const o={position:"absolute",left:`${e.x*100}%`,top:`${e.y*100}%`,width:`${e.w*100}%`,height:`${e.h*100}%`,transform:`rotate(${e.rotate??0}deg)`,transformOrigin:"center center"};switch(e.kind){case"photo_block":{const n=e.binding.kind==="lifestyle"?e.binding.promptHint:void 0;return t.jsx("div",{style:{...o,boxShadow:`0 14px 28px ${i.palette.cutoutShadow}, 0 2px 4px ${i.palette.cutoutShadow}`,background:"#fff",padding:6,zIndex:20},children:a?t.jsx("img",{src:a,alt:"",style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}}):t.jsx(h,{hint:n})},e.id)}case"polaroid":return t.jsx("div",{style:{...o,background:"#FBFAF5",padding:"10px 10px 36px",boxShadow:`0 18px 30px ${i.palette.cutoutShadow}, 0 4px 6px ${i.palette.cutoutShadow}`,zIndex:25},children:t.jsx("div",{style:{width:"100%",height:"100%",position:"relative"},children:a?t.jsx("img",{src:a,alt:"",style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}}):t.jsx(h,{hint:"polaroid",tone:"#A99172"})})},e.id);case"product_cutout":return t.jsx("div",{style:{...o,filter:`drop-shadow(0 12px 16px ${i.palette.cutoutShadow})`,zIndex:30},children:a?t.jsx("img",{src:a,alt:"",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"}}):t.jsx("div",{style:{width:"100%",height:"100%",borderRadius:"50% 50% 48% 52% / 60% 55% 45% 40%",background:"linear-gradient(160deg, #efe5d0, #b29873)",border:"1.5px dashed rgba(0,0,0,0.25)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"monospace",fontSize:10,color:"rgba(0,0,0,0.5)",textTransform:"uppercase",letterSpacing:"0.1em"},children:"product cutout"})},e.id);case"decorative_cutout":{const n=e.binding.kind==="asset_bank"?e.binding.bankKey:void 0,r=(n&&i.decorativeAssets[n]||[])[0],d=r?m[r]:void 0;return t.jsx("div",{style:{...o,filter:`drop-shadow(0 8px 10px ${i.palette.cutoutShadow})`,zIndex:28},children:d?t.jsx(d,{}):t.jsx("div",{style:{width:"100%",height:"100%",background:"rgba(0,0,0,0.06)",borderRadius:8}})},e.id)}case"text_overlay":{const n=e.binding.kind==="static_text"?e.binding.text:"",s=g(n,{TEMA:i.headline,CAPTION:i.caption}),r=e.id==="text_headline";return t.jsx("div",{style:{...o,color:i.palette.accent,display:"flex",alignItems:"center",justifyContent:"flex-start",zIndex:40,pointerEvents:"none"},children:t.jsx("span",{className:i.scriptFontClass,style:{fontSize:r?"clamp(28px, 7vw, 72px)":"clamp(13px, 1.8vw, 22px)",lineHeight:.95,fontWeight:r?700:500,letterSpacing:r?"-0.02em":"0",textShadow:"0 1px 0 rgba(255,255,255,0.4)",whiteSpace:"nowrap"},children:s})},e.id)}case"arrow_overlay":{const n=e.binding.kind==="static_svg"?e.binding.svgKey:"curved_arrow",s=j[n];return t.jsx("div",{style:{...o,zIndex:38,pointerEvents:"none"},children:s?t.jsx(s,{color:i.palette.accent}):null},e.id)}case"background":default:return null}},S=({themeId:e="beach_babe",resolvedAssets:i,template:a=p,width:o=720})=>{const n=u(e),s=w(a.aspect),r=o/s;return t.jsxs("div",{style:{position:"relative",width:o,height:r,overflow:"hidden",borderRadius:4,boxShadow:"0 30px 60px rgba(0,0,0,0.18), 0 8px 16px rgba(0,0,0,0.08)"},children:[t.jsx(v,{color:n.palette.paper}),a.slots.map(d=>_(d,n,i==null?void 0:i[d.id]))]})},C=()=>{const[e,i]=x.useState(l[0].id),[a,o]=x.useState(720);return t.jsx("div",{style:{minHeight:"100vh",background:"#1a1a1a",padding:"32px 24px",color:"#f2f2f2",fontFamily:"Inter, sans-serif"},children:t.jsxs("div",{style:{maxWidth:1200,margin:"0 auto"},children:[t.jsxs("header",{style:{marginBottom:24},children:[t.jsx("h1",{style:{fontSize:18,fontWeight:600,letterSpacing:"-0.01em",margin:0},children:"Colagem Editorial · template de layout"}),t.jsx("p",{style:{fontSize:12,opacity:.6,margin:"6px 0 0"},children:"Motor de composição editorial â não gera, monta. Slots de geração (foto, cutout) renderizam placeholders nesta fase."})]}),t.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center",marginBottom:20,flexWrap:"wrap"},children:[t.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:11,opacity:.7}
4,children:["TEMA",t.jsx("select",{value:e,onChange:n=>i(n.target.value),style:{background:"#2a2a2a",color:"#f2f2f2",border:"1px solid #3a3a3a",borderRadius:6,padding:"6px 10px",fontSize:13},children:l.map(n=>t.jsx("option",{value:n.id,children:n.name},n.id))})]}),t.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:11,opacity:.7},children:["LARGURA: ",a,"px",t.jsx("input",{type:"range",min:420,max:960,step:20,value:a,onChange:n=>o(Number(n.target.value)),style:{width:220}})]})]}),t.jsx("div",{style:{display:"flex",justifyContent:"center",padding:32,background:"#0f0f0f",borderRadius:12,border:"1px solid #2a2a2a"},children:t.jsx(S,{themeId:e,width:a})}),t.jsxs("details",{style:{marginTop:24,fontSize:12,opacity:.7},children:[t.jsxs("summary",{style:{cursor:"pointer",marginBottom:8},children:["Spec do template (",p.slots.length," slots)"]}),t.jsx("pre",{style:{background:"#0f0f0f",padding:16,borderRadius:8,overflowX:"auto",fontSize:11,lineHeight:1.5},children:JSON.stringify(p,null,2)})]})]})})};export{C as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.