1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[17503],{13639:(e,a,s)=>{"use strict";s.d(a,{$$:()=>i,E9:()=>r,e0:()=>t});let r=["Playfair Display","Merriweather","Libre Baskerville","Lora","Crimson Pro","Roboto Slab","PT Serif","Source Serif Pro","Bitter","Spectral","Montserrat","Oswald","Raleway","Poppins"],t=["Open Sans","Roboto","Lato","Source Sans Pro","Nunito","Inter","Work Sans","Karla","Noto Sans","PT Sans","Cabin","Rubik","Mulish"];[...r.map(e=>({value:e,label:e,category:"Heading"})),...t.map(e=>({value:e,label:e,category:"Body"}))];let i={fontSize:{h1:{mobile:"2rem",tablet:"2.5rem",desktop:"3rem"},h2:{mobile:"1.75rem",tablet:"2rem",desktop:"2.5rem"},h3:{mobile:"1.5rem",tablet:"1.75rem",desktop:"2rem"},h4:{mobile:"1.25rem",tablet:"1.5rem",desktop:"1.75rem"},h5:{mobile:"1.125rem",tablet:"1.25rem",desktop:"1.5rem"},h6:{mobile:"1rem",tablet:"1.125rem",desktop:"1.25rem"},body:{mobile:"1rem",tablet:"1rem",desktop:"1.125rem"},teaser:{mobile:"0.95rem",tablet:"1rem",desktop:"1.125rem"},lead:{mobile:"1.125rem",tablet:"1.25rem",desktop:"1.375rem"},heroTitle:{mobile:"1.5rem",tablet:"1.75rem",desktop:"2rem"},heroExcerpt:{mobile:"1rem",tablet:"1.125rem",desktop:"1.25rem"},featuredTitle:{mobile:"1.25rem",tablet:"1.375rem",desktop:"1.5rem"},featuredExcerpt:{mobile:"0.95rem",tablet:"1rem",desktop:"1.125rem"},cardTitle:{mobile:"1rem",tablet:"1.125rem",desktop:"1.25rem"},cardTeaser:{mobile:"0.875rem",tablet:"0.95rem",desktop:"1rem"},cardExcerpt:{mobile:"0.875rem",tablet:"0.95rem",desktop:"1rem"},cardCategory:{mobile:"0.75rem",tablet:"0.8rem",desktop:"0.875rem"},agendaEventTitle:{mobile:"0.875rem",tablet:"0.95rem",desktop:"1rem"},articleParagraph:{mobile:"1rem",tablet:"1.0625rem",desktop:"1.125rem"}},letterSpacing:{heading:{mobile:"0",tablet:"0",desktop:"0"},body:{mobile:"0",tablet:"0",desktop:"0"},teaser:{mobile:"0",tablet:"0",desktop:"0"},cards:{mobile:"0",tablet:"0",desktop:"0"}},lineHeight:{heading:{mobile:"1.2",tablet:"1.3",desktop:"1.4"},body:{mobile:"1.6",tablet:"1.7",desktop:"1.8"},teaser:{mobile:"1.5",tablet:"1.6",desktop:"1.7"},cards:{mobile:"1.4",tablet:"1.5",desktop:"1.6"}},fontFamily:{heading:{mobile:"Roboto Slab",tablet:"Roboto Slab",desktop:"Roboto Slab"},body:{mobile:"Source Sans Pro",tablet:"Source Sans Pro",desktop:"Source Sans Pro"},cardTitle:{mobile:"Roboto Slab",tablet:"Roboto Slab",desktop:"Roboto Slab"},cardBody:{mobile:"Source Sans Pro",tablet:"Source Sans Pro",desktop:"Source Sans Pro"}},fontStyle:{heading:{mobile:"normal",tablet:"normal",desktop:"normal"},body:{mobile:"normal",tablet:"normal",desktop:"normal"},cardTitle:{mobile:"normal",tablet:"normal",desktop:"normal"},cardBody:{mobile:"normal",tablet:"normal",desktop:"normal"}},fontWeight:{heading:{mobile:"700",tablet:"700",desktop:"700"},body:{mobile:"400",tablet:"400",desktop:"400"},heroTitle:{mobile:"700",tablet:"700",desktop:"800"},heroExcerpt:{mobile:"400",tablet:"400",desktop:"400"},featuredTitle:{mobile:"600",tablet:"600",desktop:"700"},featuredExcerpt:{mobile:"400",tablet:"400",desktop:"400"},cardTitle:{mobile:"600",tablet:"600",desktop:"600"},cardExcerpt:{mobile:"400",tablet:"400",desktop:"400"},cardBody:{mobile:"400",tablet:"400",desktop:"400"}},headerColors:{bgFrom:"#4f0000",bgTo:"#6b0f1a",textColor:"#fbf0e9",linkColor:"#fbf0e9",logoColor:"#fbf0e9"},magazineBarColors:{bg:"#555555",accent:"#f59e0b"},searchFilterCardColors:{bg:"rgba(255,255,255,0.12)",text:"#ff0000",border:"rgba(255,0,0,0.4)",checkedBg:"#ff0000",checkColor:"#ffffff"},themes:{default:{name:"Padr\xe3o",headerColors:{bgFrom:"#2a2a2a",bgTo:"#434343",textColor:"#ffffff",linkColor:"#ff0000",logoColor:"#ffffff"},magazineBarColors:{bg:"#555555",accent:"#f59e0b"},searchFilterCardColors:{bg:"rgba(255,255,255,0.12)",text:"#ff0000",border:"rgba(255,0,0,0.4)",checkedBg:"#ff0000",checkColor:"#ffffff"}}},defaultThemeId:"default",lastUpdated:new Date().toISOString()}},15283:(e,a,s)=>{"use strict";s.d(a,{Fc:()=>n,TN:()=>c,XL:()=>d});var r=s(95155),t=s(12115),i=s(18460),l=s(40980);let o=(0,i.F)("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"}}),n=t.forwardRef(({className:e,variant:a,...s},t)=>(0,r.jsx)("div",{ref:t,role:"alert",className:(0,l.cn)(o({variant:a}),e),...s}));n.displayName="Alert";let d=t.forwardRef(({className:e,...a},s)=>(0,r.jsx)("h5",{ref:s,className:(0,l.cn)("mb-1 font-medium leading-none tracking-tight",e),...a}));d.displayName="AlertTitle";let c=t.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,className:(0,l.cn)("text-sm [&_p]:leading-relaxed",e),...a}));c.displayName="AlertDescription"},19865:(e,a,s)=>{"use strict";s.d(a,{IG:()=>c,db:()=>m,j2:()=>d,yA:()=>n});var r=s(97873),t=s(65140),i=s(30928),l=s(4927);let o={apiKey:"AIzaSyAO_sbTBemKD068NVqv3RYb15ckEthjtrQ",authDomain:"login.brasilmineral.com.br",projectId:"brasil-mineral-newsletter",storageBucket:"brasil-mineral-newsletter.firebasestorage.app",messagingSenderId:"145521886346",a
1ppId:"1:145521886346:web:bb9afd106c161d05031973",measurementId:"G-QCKC22MY1G"},n=0===(0,r.Dk)().length?(0,r.Wp)(o):(0,r.Sx)(),d=(0,t.xI)(n),c=(0,i.c7)(n),m=(0,l.aU)(n,"premium-us".trim()||"(default)");o.projectId||console.error("Firebase Initialization Error: Firebase config is not fully set. Check your NEXT_PUBLIC_FIREBASE_ environment variables. Firebase features may not work correctly.")},24752:(e,a,s)=>{"use strict";s.d(a,{A:()=>o});var r=s(95155),t=s(12115),i=s(6415),l=s(40980);let o=t.forwardRef(({className:e,...a},s)=>(0,r.jsxs)(i.bL,{ref:s,className:(0,l.cn)("relative flex w-full touch-none select-none items-center",e),...a,children:[(0,r.jsx)(i.CC,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-secondary",children:(0,r.jsx)(i.Q6,{className:"absolute h-full bg-primary"})}),(0,r.jsx)(i.zi,{className:"block h-4 w-4 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));o.displayName=i.bL.displayName},29991:(e,a,s)=>{"use strict";s.d(a,{bq:()=>p,eb:()=>g,gC:()=>f,l6:()=>c,yv:()=>m});var r=s(95155),t=s(12115),i=s(14710),l=s(66088),o=s(9921),n=s(94514),d=s(40980);let c=i.bL;i.YJ;let m=i.WT,p=t.forwardRef(({className:e,children:a,...s},t)=>(0,r.jsxs)(i.l9,{ref:t,className:(0,d.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
1ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...s,children:[a,(0,r.jsx)(i.In,{asChild:!0,children:(0,r.jsx)(l.A,{className:"h-4 w-4 opacity-50"})})]}));p.displayName=i.l9.displayName;let h=t.forwardRef(({className:e,...a},s)=>(0,r.jsx)(i.PP,{ref:s,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",e),...a,children:(0,r.jsx)(o.A,{className:"h-4 w-4"})}));h.displayName=i.PP.displayName;let x=t.forwardRef(({className:e,...a},s)=>(0,r.jsx)(i.wn,{ref:s,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",e),...a,children:(0,r.jsx)(l.A,{className:"h-4 w-4"})}));x.displayName=i.wn.displayName;let f=t.forwardRef(({className:e,children:a,position:s="popper",...t},l)=>(0,r.jsx)(i.ZL,{children:(0,r.jsxs)(i.UC,{ref:l,className:(0,d.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,...t,children:[(0,r.jsx)(h,{}),(0,r.jsx)(i.LM,{className:(0,d.cn)("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),(0,r.jsx)(x,{})]})}));f.displayName=i.UC.displayName,t.forwardRef(({className:e,...a},s)=>(0,r.jsx)(i.JU,{ref:s,className:(0,d.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...a})).displayName=i.JU.displayName;let g=t.forwardRef(({className:e,children:a,...s},t)=>(0,r.jsxs)(i.q7,{ref:t,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(i.VF,{children:(0,r.jsx)(n.A,{className:"h-4 w-4"})})}),(0,r.jsx)(i.p4,{children:a})]}));g.displayName=i.q7.displayName,t.forwardRef(({className:e,...a},s)=>(0,r.jsx)(i.wv,{ref:s,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",e),...a})).displayName=i.wv.displayName},33807:(e,a,s)=>{"use strict";s.d(a,{J:()=>d});var r=s(95155),t=s(12115),i=s(29486),l=s(18460),o=s(40980);let n=(0,l.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=t.forwardRef(({className:e,...a},s)=>(0,r.jsx)(i.b,{ref:s,className:(0,o.cn)(n(),e),...a}));d.displayName=i.b.displayName},38929:(e,a,s)=>{Promise.resolve().then(s.bind(s,55265))},40980:(e,a,s)=>{"use strict";s.d(a,{Y:()=>l,cn:()=>i,o:()=>o});var r=s(29722),t=s(622);function i(...e){return(0,t.QP)((0,r.$)(e))}function l(e){return e?e.toString().toLowerCase().trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[\s_]+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""):`artigo-sem-titulo-${Date.now()}`}function o(e){return e&&"string"==typeof e?e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]/g,""):""}},45160:(e,a,s)=>{"use strict";s.d(a,{E:()=>o});var r=s(95155);s(12115);var t=s(18460),i=s(40980);let l=(0,t.F)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function o({className:e,variant:a,...s}){return(0,r.jsx)("span",{className:(0,i.cn)(l({variant:a}),e),...s})}},47687:(e,a,s)=>{"use strict";s.d(a,{Tabs:()=>o,TabsContent:()=>c,TabsList:()=>n,TabsTrigger:()=>d});var r=s(95155),t=s(12115),i=s(57518),l=s(40980);let o=i.bL,n=t.forwardRef(({className:e,...a},s)=>(0,r.jsx)(i.B8,{ref:s,className:(0,l.cn)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...a}));n.displayName=i.B8.displayName;let d=t.forwardRef(({className:e,...a},s)=>(0,r.jsx)(i.l9,{ref:s,className:(0,l.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...a}));d.displayName=i.l9.displayName;let c=t.forwardRef(({className:e,...a},s)=>(0,r.jsx)(i.UC,{ref:s,className:(0,l.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...a}));c.displayName=i.UC.displayName},55265:(e,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>P});var r=s(95155),t=s(12115),i=s(81477),l=s(89239),o=s(47687),n=s(33807),d=s(24752),c=s(45160),m=s(15283),p=s(29991),h=s(60529),x=s(25237),f=s(96618),g=s(92972),u=s(6296),b=s(7915),v=s(55243),j=s(9199),y=s(12651),N=s(13545),w=s(24338),C=s(92669),k=s(23770),S=s(21975),T=s(6489),F=s(30928),$=s(19865),B=s(13639),z=s(5772);let R={mobile:"375px",tablet:"768px",desktop:"1280px"};function E({settings:e,breakpoint:a}){t.useEffect(()=>{let s="layout-preview-responsive-css",r=document.getElementById(s);r||((r=document.createElement("style")).id=s,document.head.appendChild(r)),r.textContent=` 2 .preview-container { 3 --preview-hero-title: ${e.fontSize.heroTitle[a]}; 4 --preview-hero-excerpt: ${e.fontSize.heroExcerpt[a]}; 5 --preview-featured-title: ${e.fontSize.featuredTitle[a]}; 6 --preview-card-title: ${e.fontSize.cardTitle[a]}; 7 --preview-card-teaser: ${e.fontSize.cardTeaser[a]}; 8 --preview-agenda-title: ${e.fontSize.agendaEventTitle[a]}; 9 --preview-article-paragraph: ${e.fontSize.articleParagraph[a]}; 10 11 --preview-heading-font: ${e.fontFamily.heading[a]}; 12 --preview-body-font: ${e.fontFamily.body[a]}; 13 14 --preview-hero-weight: ${e.fontWeight.heroTitle[a]}; 15 --preview-featured-weight: ${e.fontWeight.featuredTitle[a]}; 16 --preview-card-weight: ${e.fontWeight.cardTitle[a]}; 17 18 --preview-heading-spacing: ${e.letterSpacing.heading[a]}; 19 --preview-body-spacing: ${e.letterSpacing.body[a]}; 20 21 --preview-heading-line-height: ${e.lineHeight.heading[a]}; 22 --preview-body-line-height: ${e.lineHeight.body[a]}; 23 }
24 `,console.log("[PREVIEW DEBUG] Valores aplicados para breakpoint:",a,{heroTitle:e.fontSize.heroTitle[a],cardTitle:e.fontSize.cardTitle[a],articleParagraph:e.fontSize.articleParagraph[a]})},[e,a]);let s={width:R[a],maxWidth:"100%",margin:"0 auto",transition:"all 0.3s ease"};return(0,r.jsx)("div",{style:s,className:"preview-container",children:(0,r.jsxs)("div",{style:{padding:"1rem",backgroundColor:"#f9fafb",borderRadius:"8px"},children:[(0,r.jsxs)("h3",{className:"text-sm font-semibold text-gray-600 mb-4 px-2",children:["Visualiza\xe7\xe3o Real - Breakpoint: ",a.charAt(0).toUpperCase()+a.slice(1)]}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("p",{className:"text-xs text-gray-500 mb-2 px-2",children:"Hero Card (overlay) - Usa CSS Variables responsivas"}),(0,r.jsxs)("div",{className:"relative h-96 rounded-lg overflow-hidden shadow-lg",children:[(0,r.jsx)(z.default,{src:"https://images.unsplash.com/photo-1578916171728-46686eac8d58?w=1200",alt:"Hero",fill:!0,className:"object-cover"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent"}),(0,r.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-6 text-white",children:[(0,r.jsx)("div",{className:"mb-2",children:(0,r.jsx)("span",{className:"bg-red-600 px-2 py-1 text-xs font-semibold rounded",children:"Minerais Cr\xedticos"})}),(0,r.jsx)("h3",{style:{fontSize:"var(--preview-hero-title)",fontFamily:"var(--preview-heading-font)",fontWeight:"var(--preview-hero-weight)",letterSpacing:"var(--preview-heading-spacing)",lineHeight:"var(--preview-heading-line-height)",marginBottom:"0.75rem",color:"white"},children:"Fundo de US$ 1 bilh\xe3o financiar\xe1 expans\xe3o do projeto Santa Rita da Atlantic Nickel"}),(0,r.jsx)("p",{style:{fontSize:"var(--preview-hero-excerpt)",fontFamily:"var(--preview-body-font)",letterSpacing:"var(--preview-body-spacing)",lineHeight:"var(--preview-body-line-height)",color:"#d1d5db"},children:"Opera\xe7\xe3o de n\xedquel-cobre-cobalto na Bahia ser\xe1 beneficiada por novo fundo voltado para minerais cr\xedticos."})]})]})]}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("p",{className:"text-xs text-gray-500 mb-2 px-2",children:"Featured Cards (overlay)"}),(0,r.jsxs)("div",{className:`grid gap-4 ${"mobile"===a?"grid-cols-1":"grid-cols-2"}`,children:[(0,r.jsxs)("div",{className:"relative h-64 rounded-lg overflow-hidden shadow-md",children:[(0,r.jsx)(z.default,{src:"https://images.unsplash.com/photo-1541888946425-d81bb19240f5?w=800",alt:"Featured 1",fill:!0,className:"object-cover"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent"}),(0,r.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-4 text-white",children:[(0,r.jsx)("div",{className:"mb-2",children:(0,r.jsx)("span",{className:"bg-blue-600 px-2 py-1 text-xs font-semibold rounded",children:"Bahia"})}),(0,r.jsx)("h4",{style:{fontSize:"var(--preview-featured-title)",fontFamily:"var(--preview-heading-font)",fontWeight:"var(--preview-featured-weight)",letterSpacing:"var(--preview-heading-spacing)",lineHeight:"var(--preview-heading-line-height)",color:"white"},children:"Em 10 anos, produ\xe7\xe3o mineral baiana cresce 300%"})]})]}),(0,r.jsxs)("div",{className:"relative h-64 rounded-lg overflow-hidden shadow-md",children:[(0,r.jsx)(z.default,{src:"https://images.unsplash.com/photo-1581094794329-c8112a89af12?w=800",alt:"Featured 2",fill:!0,className:"object-cover"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent"}),(0,r.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-4 text-white",children:[(0,r.jsx)("div",{className:"mb-2",children:(0,r.jsx)("span",{className:"bg-green-600 px-2 py-1 text-xs font-semibold rounded",children:"Vale"})}),(0,r.jsx)("h4",{style:{fontSize:"var(--preview-featured-title)",fontFamily:"var(--preview-heading-font)",fontWeight:"var(--preview-featured-weight)",letterSpacing:"var(--preview-heading-spacing)",lineHeight:"var(--preview-heading-line-height)",color:"white"},children:"Maior produ\xe7\xe3o trimestral desde 2018"})]})]})]})]}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("p",{className:"text-xs text-gray-500 mb-2 px-2",children:"Regular Card (horizontal) - Usa CSS Variables responsivas"}),(0,r.jsxs)("div",{className:"bg-white rounded-lg overflow-hidden shadow-md flex",children:[(0,r.jsx)("div",{className:"relative w-32 h-32 flex-shrink-0",children:(0,r.jsx)(z.default,{src:"https://images.unsplash.com/photo-1504917595217-d4dc5ebe
246122?w=400",alt:"Regular",fill:!0,className:"object-cover"})}),(0,r.jsxs)("div",{className:"p-4 flex-1",children:[(0,r.jsx)("div",{className:"mb-2",children:(0,r.jsx)("span",{className:"text-red-600 text-xs font-semibold",children:"MERCADO"})}),(0,r.jsx)("h4",{style:{fontSize:"var(--preview-card-title)",fontFamily:"var(--preview-heading-font)",fontWeight:"var(--preview-card-weight)",letterSpacing:"var(--preview-heading-spacing)",lineHeight:"var(--preview-heading-line-height)",marginBottom:"0.5rem"},children:"Brasil mant\xe9m lideran\xe7a na exporta\xe7\xe3o de min\xe9rio"}),(0,r.jsx)("p",{style:{fontSize:"var(--preview-card-teaser)",fontFamily:"var(--preview-body-font)",letterSpacing:"var(--preview-body-spacing)",lineHeight:"var(--preview-body-line-height)",color:"#4b5563"},children:"Demanda crescente por minerais cr\xedticos abre novas oportunidades"})]})]})]}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("p",{className:"text-xs text-gray-500 mb-2 px-2",children:"Most Read Cards (list)"}),(0,r.jsx)("div",{className:"bg-white rounded-lg p-4 shadow-md space-y-3",children:[{title:"Congresso Brasileiro de Geologia discute explora\xe7\xe3o",cat:"Eventos"},{title:"Novas regulamenta\xe7\xf5es para barragens em 2026",cat:"Legisla\xe7\xe3o"},{title:"Investimento em sustentabilidade cresce 40%",cat:"ESG"}].map((e,a)=>(0,r.jsxs)("div",{className:"flex items-start gap-3 pb-3 border-b last:border-0",children:[(0,r.jsx)("div",{className:"flex-shrink-0 w-8 h-8 bg-red-600 text-white rounded flex items-center justify-center font-bold",children:a+1}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("h5",{style:{fontSize:"var(--preview-card-title)",fontFamily:"var(--preview-heading-font)",fontWeight:"var(--preview-card-weight)",letterSpacing:"var(--preview-heading-spacing)",lineHeight:"var(--preview-heading-line-height)",marginBottom:"0.25rem"},children:e.title}),(0,r.jsx)("p",{style:{fontSize:"var(--preview-card-teaser)",fontFamily:"var(--preview-body-font)",color:"#6b7280"},children:e.cat})]})]},a))})]}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("p",{className:"text-xs text-gray-500 mb-2 px-2",children:"Agenda Mineral Widget"}),(0,r.jsxs)("div",{className:"bg-[#efefef] rounded-lg p-4 shadow-md",children:[(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsx)("span",{className:"bg-red-600 text-white px-2 py-1 text-xs font-bold rounded uppercase",children:"Agenda Mineral"})}),(0,r.jsx)("div",{className:"space-y-3",children:[{title:"Exposibram 2025",date:"SET 15"},{title:"Simp\xf3sio de Minera\xe7\xe3o da Amaz\xf4nia",date:"OUT 22"},{title:"Congresso Brasileiro de Geologia",date:"NOV 19"}].map((e,a)=>(0,r.jsxs)("div",{className:"bg-[#cccccc] rounded-lg p-3 flex items-center gap-3",children:[(0,r.jsxs)("div",{className:"flex-shrink-0 w-12 h-12 bg-white rounded-lg border shadow-sm flex flex-col items-center justify-center",children:[(0,r.jsx)("div",{className:"text-[10px] font-bold text-white bg-red-600 w-full text-center rounded-t-md py-0.5 uppercase",children:e.date.split(" ")[0]}),(0,r.jsx)("div",{className:"text-xl font-bold",children:e.date.split(" ")[1]})]}),(0,r.jsx)("h5",{style:{fontSize:"var(--preview-agenda-title)",fontFamily:"var(--preview-heading-font)",fontWeight:"700",letterSpacing:"var(--preview-heading-spacing)",lineHeight:"1.3",flex:1},children:e.title})]},a))})]})]}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("p",{className:"text-xs text-gray-500 mb-2 px-2",children:"Article Content (paragraphs) - Usa CSS Variables responsivas"}),(0,r.jsx)("div",{className:"bg-white rounded-lg p-6 shadow-md",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("p",{style:{fontSize:"var(--preview-article-paragraph)",fontFamily:"var(--preview-body-font)",lineHeight:"var(--preview-body-line-height)",letterSpacing:"var(--preview-body-spacing)",color:"#374151",margin:0},children:"A ind\xfastria mineral brasileira passa por um momento de transforma\xe7\xe3o, com investimentos significativos em tecnologia e sustentabilidade. Empresas do setor est\xe3o adotando pr\xe1ticas mais respons\xe1veis e eficientes, buscando reduzir o impacto ambiental de suas opera\xe7\xf5es."}),(0,r.jsx)("p",{style:{fontSize:"var(--preview-article-paragraph)",fontFamily:"var(--preview-body-font)",lineHeight:"var(--preview-body-line-height)",letterSpacing:"var(--preview-body-spacing)",color:"#374151",margin:0},children:"Novas regulamenta\xe7\xf5es estabelecidas pelo governo federal exigem que as mineradoras implementem sistemas de monitoramento cont\xednuo e planos de recupera\xe7\xe3o de \xe1reas degradadas. Essas medidas t\xeam como objetivo garantir a seguran\xe7a das comunidades pr\xf3ximas \xe0s opera\xe7\xf5es minerais."}),(0,r.jsx)("p",{style:{fontSize:"var(--preview-article-paragraph)",fontFamily:"var(--preview-body-font)",lineHeight:"var(--preview-body-line-height)",letterSpacing:"var(--preview-body-spacing)",color:"#374151",margin:0},children:"O Brasil mant\xe9m sua posi\xe7\xe3o como um dos principais exportadores de min\xe9rio de ferro no cen\xe1rio global, com destaque para o mercado asi\xe1tico. A demanda crescente por minerais cr\xedticos, essenciais para a transi\xe7\xe3o energ\xe9tica, abre novas oportunidades para o setor."})]})})]})]})})}let A=[{value:"mobile",label:"Mobile",icon:(0,r.jsx)(x.A,{className:"w-4 h-4"})},{value:"tablet",label:"Tablet",icon:(0,r.jsx)(f.A,{className:"w-4 h-4"})},{value:"desktop",label:"Desktop",icon:(0,r.jsx)(g.A,{className:"w-4 h-4"})}];function P(){let[e,a]=(0,t.useState)(B.$$),[s,n]=(0,t.useState)("desktop"),[d,p]=(0,t.useState)(!0),[h,x]=(0,t.useState)(!1),[f,g]=(0,t.useState)(null);(0,t.useEffect)(()=>{w()},[]),(0,t.useEffect)(()=>{},[e,s]);let w=async()=>
24{try{let e=await fetch("/api/layout-settings"),s=await e.json();s.success&&a(s.data)}catch(e){console.error("Erro ao carregar configura\xe7\xf5es:",e)}finally{p(!1)}},C=async()=>{x(!0),g(null);try{let s=await fetch("/api/layout-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await s.json();if(r.success)g({type:"success",text:"Configura\xe7\xf5es salvas com sucesso!"}),a(r.data),setTimeout(()=>window.location.reload(),2e3);else throw Error(r.error)}catch(e){g({type:"error",text:`Erro ao salvar: ${e instanceof Error?e.message:"Desconhecido"}`})}finally{x(!1)}},k=async e=>{x(!0),g(null);try{let s={...e,lastUpdated:new Date().toISOString()},r=await fetch("/api/layout-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),t=await r.json();if(t.success)a(t.data),g({type:"success",text:"Tema salvo com sucesso!"});else throw Error(t.error)}catch(e){g({type:"error",text:`Erro ao salvar: ${e instanceof Error?e.message:"Desconhecido"}`})}finally{x(!1)}},S=async()=>{if(confirm("Tem certeza que deseja resetar todas as configura\xe7\xf5es para o padr\xe3o?")){x(!0);try{let e=await fetch("/api/layout-settings",{method:"DELETE"}),s=await e.json();s.success&&(a(s.data),g({type:"success",text:"Configura\xe7\xf5es resetadas!"}),setTimeout(()=>window.location.reload(),2e3))}catch(e){g({type:"error",text:"Erro ao resetar configura\xe7\xf5es"})}finally{x(!1)}}},T=(e,s,r,t)=>{a(a=>({...a,[e]:{...a[e],[s]:{...a[e][s],[r]:t}}}))},F=async s=>{let r=s.trim().toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"")||`theme-${Date.now()}`,t=e.themes?.[r]?`${r}-${Date.now()}`:r,i={name:s.trim()||"Sem nome",headerColors:{...B.$$.headerColors,...e.headerColors},magazineBarColors:{...B.$$.magazineBarColors,...e.magazineBarColors},searchFilterCardColors:{...B.$$.searchFilterCardColors,...e.searchFilterCardColors},customLogoUrl:e.customLogoUrl},l={...e,themes:{...e.themes,[t]:i}};return a(l),await k(l),t},$=async s=>{let r={...e,defaultThemeId:s};a(r),await k(r)};return d?(0,r.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:(0,r.jsx)(u.A,{className:"w-8 h-8 animate-spin"})}):(0,r.jsxs)("div",{className:"container mx-auto px-4 py-8 max-w-7xl",children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)("h1",{className:"text-3xl font-bold mb-2",children:"Configura\xe7\xf5es de Layout Global"}),(0,r.jsx)("p",{className:"text-muted-foreground",children:"Configure tipografia, fam\xedlias de fonte e estilos globalmente com breakpoints responsivos"})]}),(0,r.jsxs)(i.Zp,{className:"mb-6",children:[(0,r.jsxs)(i.aR,{children:[(0,r.jsxs)(i.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(b.A,{className:"w-5 h-5"}),"Visualiza\xe7\xe3o por Dispositivo"]}),(0,r.jsx)(i.BT,{children:"Selecione o breakpoint para editar e visualizar"})]}),(0,r.jsxs)(i.Wu,{children:[(0,r.jsx)("div",{className:"flex gap-2",children:A.map(({value:e,label:a,icon:t})=>(0,r.jsxs)(l.$,{variant:s===e?"default":"outline",onClick:()=>n(e),className:"flex items-center gap-2",children:[t,a]},e))}),(0,r.jsxs)(c.E,{variant:"secondary",className:"mt-4",children:["Editando: ",A.find(e=>e.value===s)?.label]})]})]}),(0,r.jsxs)("div",{className:"flex gap-4 mb-6",children:[(0,r.jsxs)(l.$,{onClick:C,disabled:h,className:"flex items-center gap-2",children:[h?(0,r.jsx)(u.A,{className:"w-4 h-4 animate-spin"}):(0,r.jsx)(v.A,{className:"w-4 h-4"}),"Salvar Configura\xe7\xf5es"]}),(0,r.jsxs)(l.$,{onClick:S,variant:"outline",disabled:h,className:"flex items-center gap-2",children:[(0,r.jsx)(j.A,{className:"w-4 h-4"}),"Resetar para Padr\xe3o"]})]}),f&&(0,r.jsxs)(m.Fc,{className:`mb-6 ${"success"===f.type?"border-green-500":"border-red-500"}`,children:["success"===f.type?(0,r.jsx)(y.A,{className:"h-4 w-4 text-green-500"}):(0,r.jsx)(N.A,{className:"h-4 w-4 text-red-500"}),(0,r.jsx)(m.TN,{children:f.text})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,r.jsx)("div",{children:(0,r.jsxs)(o.Tabs,{defaultValue:"fontSize",className:"space-y-6",children:[(0,r.jsxs)(o.TabsList,{className:"grid w-full grid-cols-2 lg:grid-cols-4",children:[(0,r.jsx)(o.TabsTrigger,{value:"fontSize",children:"Tamanhos"}),(0,r.jsx)(o.TabsTrigger,{value:"typography",children:"Tipografia"}),(0,r.jsx)(o.TabsTrigger,{value:"spacing",children:"Espa\xe7amento"}),(0,r.jsx)(o.TabsTrigger,{value:"colors",children:"Cores"})]}),(0,r.jsx)(o.TabsContent,{value:"fontSize",className:"space-y-6",children:(0,r.jsx)(L,{settings:e,breakpoint:s,onChange:T})}),(0,r.jsx)(o.TabsContent,{value:"typography",className:"space-y-6",children:(0,r.jsx)(W,{settings:e,breakpoint:s,onChange:T})}),(0,r.jsxs)(o.TabsContent,{value:"spacing",className:"space-y-6",children:[(0,r.jsx)(D,{settings:e,breakpoint:s,onChange:T}),(0,r.jsx)(U,{settings:e,breakpoint:s,onChange:T})]}),(0,r.jsxs)(o.TabsContent,{value:"colors",className:"space-y-6",children:[(0,r.jsx)(Z,{settings:e,onLoadTheme:s=>{let r=e.themes?.[s];r&&a(e=>({...e,headerColors:r.headerColors?{...B.$$.headerColors,...r.headerColors}:e.headerColors,magazineBarColors:r.magazineBarColors?{...B.$$.magazineBarColors,...r.magazineBarColors}:e.magazineBarColors,searchFilterCardColors:r.searchFilterCardColors?{...B.$$.searchFilterCardColors,...r.searchFilterCardColors}:e.searchFilterCardColors,customLogoUrl:void 0!==r.customLogoUrl?r.customLogoUrl:e.customLogoUrl}))},onSaveCurrentAsThemeAndPersist:F,onSetDefaultThemeAndPersist:$}),(0,r.jsx)(I,{settings:e,onHeaderChange:(e,s)=>{a(a=>({...a,headerColors:{...a.headerColors??B.$$.headerColors,[e]:s}}))},onMagazineBarChange:(e,s)=>{a(a=>({...a,magazineBarColors:{...a.magazineBarColors??B.$$.magazineBarColors,[e]:s}}))},onSearchFilterCardChange:(e,s)=>{a(a=>({...a,searchFilterCardColors:{...a.searchFilterCardColors??B.$$.searchFilterCardColors,[e]:s}}))},onCustomLogoUrlChange:e=>{a(a=>({...a,customLogoUrl:e||void 0}))}})]})]})}),(0,r.jsx)("div",{className:"lg:sticky lg:top-6 lg:self-start",children:(0,r.jsxs)(i.Zp,{children:[(0,r.jsxs)(i.aR,{children:[(0,r.jsxs)(i.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(b.A,{className:"w-5 h-5"}),"Preview dos Cards"]}),(0,r.jsx)(i.BT,{children:"Visualiza\xe7\xe3o em tempo real com dados de exemplo"})]}),(0,r.jsx)(i.Wu,{children:(0,r.jsx)(E,{settings:e,breakpoint:s})})]})})]})]})}function L({settings:e,breakpoint:a,onChange:s}){return(0,r.jsx)(r.Fragment,{children:[{title:"Headings",keys:["h1","h2","h3","h4","h5","h6"]},{title:"Conte\xfado",keys:["body","teaser","lead"]},{title:"Cards - Hero (Destaque Principal)",keys:["heroTitle","heroExcerpt"],description:"Card de maior destaque na p\xe1gina"},{title:"Cards - Featured (Destaque Secund\xe1rio)",keys:["featuredTitle"],description:"Cards em destaque m\xeadio (sem resumo)"},{title:"Cards - Regular (Padr\xe3o)",keys:["cardTitle","cardTeaser","cardCategory"],description:"Cards normais em grid"},{title:"Agenda Mineral - Eventos",keys:["agendaEventTitle"],description:"T\xe1tulos dos eventos na Agenda Mineral"},{title:"Artigos - Corpo de Texto",keys:["articleParagraph"],description:"Parâ\xedgrafos de texto dentro dos artigos"}].map(({title:t,keys:l,description:o})=>(0,r.jsxs)(i.Zp,{children:[(0,r.jsxs)(i.aR,{children:[(0,r.jsx)(i.ZB,{children:t}),o&&(0,r.jsx)(i.BT,{className:"text-xs",children:o})]}),(0,r.jsx)(i.Wu,{className:"space-y-4",children:l.map(t=>{let i=e.fontSize[t][a],l=parseFloat(i);return(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)(n.J,{children:t}),(0,r.jsx)("span",{className:"text-sm font-mono",children:i})]}),(0,r.jsx)(d.A,{value:[l],min:.5,max:4,step:.125,onValueChange:([e])=>s("fontSize",t,a,`${e}rem`)})]},t)})})]},t))})}function W({settings:e,breakpoint:a,onChange:s}){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.Zp,{children:[(0,r.jsxs)(i.aR,{children:[(0,r.jsxs)(i.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(w.A,{className:"w-5 h-5"}),"Fam\xedlia de Fontes"]}),(0,r.jsxs)(i.BT,{children:[B.E9.length+B.e0.length+3," fontes dispon\xe1veis"]})]}),(0,r.jsxs)(i.Wu,{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(n.J,{children:"T\xe1tulos (Heading)"}),(0,r.jsxs)(p.l6,{value:e.fontFamily.heading[a],onValueChange:e=>s("fontFamily","heading",a,e),children:[(0,r.jsx)(p.bq,{children:(0,r.jsx)(p.yv,{})}),(0,r.jsxs)(p.gC,{children:[(0,r.jsx)("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground",children:"Fontes Serifadas"}),B.E9.map(e=>(0,r.jsx)(p.eb,{value:e,children:(0,r.jsx)("span",{style:{fontFamily:e},children:e})},e)),(0,r.jsx)("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground border-t mt
24-2 pt-2",children:"Fontes Sans-Serif"}),B.e0.map(e=>(0,r.jsx)(p.eb,{value:e,children:(0,r.jsx)("span",{style:{fontFamily:e},children:e})},e)),(0,r.jsx)("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground border-t mt-2 pt-2",children:"Fontes do Sistema"}),(0,r.jsx)(p.eb,{value:"Georgia",children:(0,r.jsx)("span",{style:{fontFamily:"Georgia"},children:"Georgia"})}),(0,r.jsx)(p.eb,{value:"Arial",children:(0,r.jsx)("span",{style:{fontFamily:"Arial"},children:"Arial"})}),(0,r.jsx)(p.eb,{value:"system-ui",children:"System Default"})]})]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(n.J,{children:"Corpo de Texto (Body)"}),(0,r.jsxs)(p.l6,{value:e.fontFamily.body[a],onValueChange:e=>s("fontFamily","body",a,e),children:[(0,r.jsx)(p.bq,{children:(0,r.jsx)(p.yv,{})}),(0,r.jsxs)(p.gC,{children:[(0,r.jsx)("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground",children:"Fontes Sans-Serif (Recomendadas)"}),B.e0.map(e=>(0,r.jsx)(p.eb,{value:e,children:(0,r.jsx)("span",{style:{fontFamily:e},children:e})},e)),(0,r.jsx)("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground border-t mt-2 pt-2",children:"Fontes Serifadas"}),B.E9.map(e=>(0,r.jsx)(p.eb,{value:e,children:(0,r.jsx)("span",{style:{fontFamily:e},children:e})},e)),(0,r.jsx)("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground border-t mt-2 pt-2",children:"Fontes do Sistema"}),(0,r.jsx)(p.eb,{value:"Georgia",children:"Georgia"}),(0,r.jsx)(p.eb,{value:"Arial",children:"Arial"}),(0,r.jsx)(p.eb,{value:"system-ui",children:"System Default"})]})]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(n.J,{children:"T\xe1tulo dos Cards"}),(0,r.jsxs)(p.l6,{value:e.fontFamily.cardTitle[a],onValueChange:e=>s("fontFamily","cardTitle",a,e),children:[(0,r.jsx)(p.bq,{children:(0,r.jsx)(p.yv,{})}),(0,r.jsxs)(p.gC,{children:[(0,r.jsx)("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground",children:"Fontes Serifadas"}),B.E9.map(e=>(0,r.jsx)(p.eb,{value:e,children:(0,r.jsx)("span",{style:{fontFamily:e},children:e})},e)),(0,r.jsx)("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground border-t mt-2 pt-2",children:"Fontes Sans-Serif"}),B.e0.map(e=>(0,r.jsx)(p.eb,{value:e,children:(0,r.jsx)("span",{style:{fontFamily:e},children:e})},e))]})]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(n.J,{children:"Corpo dos Cards"}),(0,r.jsxs)(p.l6,{value:e.fontFamily.cardBody[a],onValueChange:e=>s("fontFamily","cardBody",a,e),children:[(0,r.jsx)(p.bq,{children:(0,r.jsx)(p.yv,{})}),(0,r.jsxs)(p.gC,{children:[(0,r.jsx)("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground",children:"Fontes Sans-Serif (Recomendadas)"}),B.e0.map(e=>(0,r.jsx)(p.eb,{value:e,children:(0,r.jsx)("span",{style:{fontFamily:e},children:e})},e)),(0,r.jsx)("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground border-t mt-2 pt-2",children:"Fontes Serifadas"}),B.E9.map(e=>(0,r.jsx)(p.eb,{value:e,children:(0,r.jsx)("span",{style:{fontFamily:e},children:e})},e))]})]})]})]})]}),(0,r.jsxs)(i.Zp,{children:[(0,r.jsx)(i.aR,{children:(0,r.jsxs)(i.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(C.A,{className:"w-5 h-5"}),"Peso da Fonte"]})}),(0,r.jsx)(i.Wu,{className:"space-y-4",children:["heading","body","cardTitle","cardBody"].map(t=>{let i=e.fontWeight[t][a],l=parseInt(i);return(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)(n.J,{className:"capitalize",children:t.replace(/([A-Z])/g," $1").trim()}),(0,r.jsx)("span",{className:"text-sm font-mono",children:i})]}),(0,r.jsx)(d.A,{value:[l],min:100,max:900,step:100,onValueChange:([e])=>s("fontWeight",t,a,`${e}`)})]},t)})})]}),(0,r.jsxs)(i.Zp,{children:[(0,r.jsx)(i.aR,{children:(0,r.jsxs)(i.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(k.A,{className:"w-5 h-5"}),"Estilo da Fonte"]})}),(0,r.jsx)(i.Wu,{className:"space-y-4",children:["heading","body","cardTitle","cardBody"].map(t=>(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(n.J,{className:"capitalize",children:t.replace(/([A-Z])/g," $1").trim()}),(0,r.jsxs)(p.l6,{value:e.fontStyle[t][a],onValueChange:e=>s("fontStyle",t,a,e),children:[(0,r.jsx)(p.bq,{children:(0,r.jsx)(p.yv,{})}),(0,r.jsxs)(p.gC,{children:[(0,r.jsx)(p.eb,{value:"normal",children:"Normal"}),(0,r.jsx)(p.eb,{value:"italic",children:"Itâ\xedlico"})]})]})]},t))})]})]})}function D({settings:e,breakpoint:a,onChange:s}){return(0,r.jsxs)(i.Zp,{children:[(0,r.jsx)(i.aR,{children:(0,r.jsx)(i.ZB,{children:"Espa\xe7amento de Letras"})}),(0,r.jsx)(i.Wu,{className:"space-y-4",children:["heading","body","teaser","cards"].map(t=>{let i=e.letterSpacing[t][a],l=parseFloat(i)||0;return(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)(n.J,{className:"capitalize",children:t}),(0,r.jsx)("span",{className:"text-sm font-mono",children:i})]}),(0,r.jsx)(d.A,{value:[l],min:-.05,max:.1,step:.005,onValueChange:([e])=>s("letterSpacing",t,a,`${e}em`)})]},t)})})]})}function U({settings:e,breakpoint:a,onChange:s}){return(0,r.jsxs)(i.Zp,{children:[(0,r.jsx)(i.aR,{children:(0,r.jsx)(i.ZB,{children:"Altura da Linha"})}),(0,r.jsx)(i.Wu,{className:"space-y-4",children:["heading","body","teaser","cards"].map(t=>{let i=e.lineHeight[t][a],l=parseFloat(i);return(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)(n.J,{className:"capitalize",children:t}),(0,r.jsx)("span",{className:"text-sm font-mono",children:i})]}),(0,r.jsx)(d.A,{value:[l],min:1,max:2.5,step:.1,onValueChange:([e])=>s("lineHeight",t,a,`${e}`)})]},t)})})]})}function Z({settings:e,onLoadTheme:a,onSaveCurrentAsThemeAndPersist:s,onSetDefaultThemeAndPersist:o}){let[d,m]=(0,t.useState)(e.defaultThemeId||"default"),[x,f]=(0,t.useState)(""),g=e.themes??B.$$.themes??{},u=Object.keys(g),b=e.defaultThemeId??"default",v=async()=>{let e=x.trim()||"Novo tema",a=await s(e);f(""),m(a)},j=async()=>{await o(d)};return(0,r.jsxs)(i.Zp,{children:[(0,r.jsxs)(i.aR,{children:[(0,r.jsx)(i.ZB,{children:"Temas de cores"}),(0,r.jsx)(i.BT,{children:"Salve conjuntos de cores (header, barra revista, minicards, logo) como temas. O tema padr\xe3o \xe9 aplicado no site."})]}),(0,r.jsxs)(i.Wu,{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(n.J,{className:"text-sm",children:"Temas salvos"}),(0,r.jsxs)(p.l6,{value:d,onValueChange:m,children:[(0,r.jsx)(p.bq,{children:(0,r.jsx)(p.yv,{placeholder:"Selecione um tema"})}),(0,r.jsx)(p.gC,{children:u.map(e=>(0,r.jsx)(p.eb,{value:e,children:(0,r.jsxs)("span",{className:"flex items-center gap-2",children:[g[e]?.name??e,e===b&&(0,r.jsx)(c.E,{variant:"secondary",className:"text-xs",children:"Padr\xe3o"})]})},e))})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsx)(l.$,{type:"button",variant:"outline",size:"sm",onClick:()=>a(d),children:"Carregar no formul\xe1rio"}),(0,r.jsx)(l.$,{type:"button",variant:"default",size:"sm",onClick:j,children:"Definir como tema padr\xe3o"})]})]}),(0,r.jsxs)("div",{className:"border-t pt-4 space-y-2",children:[(0,r.jsx)(n.J,{className:"text-sm",children:"Salvar cores atuais como novo tema"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(h.p,{value:x,onChange:e=>f(e.target.value),placeholder:"Nome do tema",className:"max-w-xs"}),(0,r.jsx)(l.$,{type:"button",variant:"outline",size:"sm",onClick:v,children:"Salvar tema atual"})]})]})]})]})}function V({logoUrl:e,onUrlChange:a}){let[s,o]=(0,t.useState)(!1),d=t.useRef(null),c=async e=>{let s=e.target.files?.[0];if(s&&s.type.startsWith("image/")){o(!0);
24try{let e=`layout-settings/logo/${Date.now()}-${s.name}`,r=(0,F.KR)($.IG,e);await (0,F.D)(r,s);let t=await (0,F.qk)(r);a(t)}catch(e){console.error("Upload logo:",e)}finally{o(!1),e.target.value=""}}};return(0,r.jsxs)(i.Zp,{children:[(0,r.jsxs)(i.aR,{children:[(0,r.jsx)(i.ZB,{children:"Logotipo do site"}),(0,r.jsx)(i.BT,{children:"Envie uma imagem ou cole a URL. Se preenchido, substitui o logo padr\xe3o do tema. Deixe vazio para usar o logo Brasil Mineral / Saneamento."})]}),(0,r.jsxs)(i.Wu,{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsxs)(l.$,{type:"button",variant:"outline",size:"sm",onClick:()=>d.current?.click(),disabled:s,children:[s?(0,r.jsx)(u.A,{className:"w-4 h-4 animate-spin"}):(0,r.jsx)(S.A,{className:"w-4 h-4"}),s?"Enviando...":"Subir logotipo"]}),(0,r.jsx)("input",{ref:d,type:"file",accept:"image/*",className:"hidden",onChange:c})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(n.J,{className:"text-sm",children:"URL do logotipo"}),(0,r.jsx)(h.p,{value:e,onChange:e=>a(e.target.value),placeholder:"https://... ou use o bot\xe3o acima",className:"font-mono"})]})]})]})}function I({settings:e,onHeaderChange:a,onMagazineBarChange:s,onSearchFilterCardChange:t,onCustomLogoUrlChange:l}){let o=e.headerColors??B.$$.headerColors,d=e.magazineBarColors??B.$$.magazineBarColors,c=e.searchFilterCardColors??B.$$.searchFilterCardColors,m=e=>{let a=e.replace(/^#/,"");return/^[0-9A-Fa-f]{6}$/.test(a)?`#${a}`:/^[0-9A-Fa-f]{3}$/.test(a)?`#${a[0]}${a[0]}${a[1]}${a[1]}${a[2]}${a[2]}`:e.startsWith("#")?e:`#${e}`};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.Zp,{children:[(0,r.jsxs)(i.aR,{children:[(0,r.jsxs)(i.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(T.A,{className:"w-5 h-5"}),"Cores do Header"]}),(0,r.jsx)(i.BT,{children:"Barra superior com logo e navega\xe7\xe3o"})]}),(0,r.jsx)(i.Wu,{className:"space-y-4",children:[{key:"bgFrom",label:"Fundo (in\xedcio do gradiente)"},{key:"bgTo",label:"Fundo (fim do gradiente)"},{key:"textColor",label:"Texto geral"},{key:"linkColor",label:"Links de navega\xe7\xe3o"},{key:"logoColor",label:"Logotipo"}].map(({key:e,label:s})=>(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("input",{type:"color",value:o[e]?.replace(/^#/,"").length===6?o[e]:"#1a1a1a",onChange:s=>a(e,m(s.target.value)),className:"h-10 w-14 rounded border border-input cursor-pointer"}),(0,r.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,r.jsx)(n.J,{className:"text-sm",children:s}),(0,r.jsx)(h.p,{value:o[e]??"",onChange:s=>a(e,m(s.target.value)),placeholder:"#000000",className:"font-mono"})]})]},e))})]}),(0,r.jsxs)(i.Zp,{children:[(0,r.jsxs)(i.aR,{children:[(0,r.jsx)(i.ZB,{children:"Barra horizontal da revista"}),(0,r.jsx)(i.BT,{children:"Barra fixa na p\xe1gina do artigo da revista"})]}),(0,r.jsx)(i.Wu,{className:"space-y-4",children:[{key:"bg",label:"Fundo da barra"},{key:"accent",label:"Destaque (ex: data da edi\xe7\xe3o)"}].map(({key:e,label:a})=>(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("input",{type:"color",value:d[e]?.replace(/^#/,"").length===6?d[e]:"#555555",onChange:a=>s(e,m(a.target.value)),className:"h-10 w-14 rounded border border-input cursor-pointer"}),(0,r.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,r.jsx)(n.J,{className:"text-sm",children:a}),(0,r.jsx)(h.p,{value:d[e]??"",onChange:a=>s(e,m(a.target.value)),placeholder:"bg"===e?"#555555":"#f59e0b",className:"font-mono"})]})]},e))})]}),(0,r.jsxs)(i.Zp,{children:[(0,r.jsxs)(i.aR,{children:[(0,r.jsx)(i.ZB,{children:'Minicards "Buscar em"'}),(0,r.jsx)(i.BT,{children:"Not\xedcias, Revistas, Maiores, V\xeddeos no header"})]}),(0,r.jsx)(i.Wu,{className:"space-y-4",children:[{key:"bg",label:"Fundo do card"},{key:"text",label:"Texto"},{key:"border",label:"Borda"},{key:"checkedBg",label:"Fundo quando marcado"},{key:"checkColor",label:"Cor do check"}].map(({key:e,label:a})=>{let s=c[e]??"",i=/^#[0-9A-Fa-f]{3,6}$/.test(s)?7===s.length?s:"#"+[s[1],s[2],s[3]].map(e=>e+e).join(""):"#ffffff";return(0,r.jsxs)("div",{className:"flex items-center gap-3",children:["border"!==e?(0,r.jsx)("input",{type:"color",value:i,onChange:a=>
24t(e,m(a.target.value)),className:"h-10 w-14 rounded border border-input cursor-pointer"}):null,(0,r.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,r.jsx)(n.J,{className:"text-sm",children:a}),(0,r.jsx)(h.p,{value:c[e]??"",onChange:a=>t(e,a.target.value),placeholder:"bg"===e?"rgba(255,255,255,0.12)":"#ff0000",className:"font-mono"})]})]},e)})})]}),(0,r.jsx)(V,{logoUrl:e.customLogoUrl??"",onUrlChange:l})]})}},60529:(e,a,s)=>{"use strict";s.d(a,{p:()=>l});var r=s(95155),t=s(12115),i=s(40980);let l=t.forwardRef(({className:e,type:a,...s},t)=>(0,r.jsx)("input",{type:a,className:(0,i.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:t,...s}));l.displayName="Input"},81477:(e,a,s)=>{"use strict";s.d(a,{BT:()=>d,Wu:()=>c,ZB:()=>n,Zp:()=>l,aR:()=>o});var r=s(95155),t=s(12115),i=s(40980);let l=t.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,className:(0,i.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",e),...a}));l.displayName="Card";let o=t.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,className:(0,i.cn)("flex flex-col space-y-1.5 p-6",e),...a}));o.displayName="CardHeader";let n=t.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,className:(0,i.cn)("text-2xl font-semibold leading-none tracking-tight",e),...a}));n.displayName="CardTitle";let d=t.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,className:(0,i.cn)("text-sm text-muted-foreground",e),...a}));d.displayName="CardDescription";let c=t.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,className:(0,i.cn)("p-6 pt-0",e),...a}));c.displayName="CardContent",t.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,className:(0,i.cn)("flex items-center p-6 pt-0",e),...a})).displayName="CardFooter"},89239:(e,a,s)=>{"use strict";s.d(a,{$:()=>d,r:()=>n});var r=s(95155),t=s(12115),i=s(42442),l=s(18460),o=s(40980);let n=(0,l.F)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),d=t.forwardRef(({className:e,variant:a,size:s,asChild:t=!1,...l},d)=>{let c=t?i.DX:"button";return(0,r.jsx)(c,{className:(0,o.cn)(n({variant:a,size:s,className:e})),ref:d,...l})});d.displayName="Button"}},e=>{e.O(0,[62992,47416,18409,49304,16511,38437,91798,99854,82330,78236,6310,37623,28441,93794,77358],()=>e(e.s=38929)),_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.