PageSourceSearch

https://contemp.com.br/_next/static/chunks/3363.f9e04f831928b75d.js

js contemp.com.br collected 2026-09-24 13:57:46 UTC 16,275 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3363],{43611:function(e,r){r.Z={src:"/_next/static/media/image-default.42e586f2.webp",height:1200,width:1200,blurDataURL:"data:image/webp;base64,UklGRmIAAABXRUJQVlA4IFYAAABwAgCdASoIAAgAAkA4JagCdLoAEIYZaf7GvrNgAP7qXeKSmunfCFfb4jXmg5+hGnluLOg2w/RHle2d/0NFCx7V2jEJ//1wPeHGTlM//bQ//Us/zQAAAA==",blurWidth:8,blurHeight:8}},69045:function(e,r,n){n.d(r,{Z:function(){return l}});var t=n(26042),o=n(99534),i=n(85893),a=n(88357),s=n(41727);function l(e){var r=e.icon,n=e.size,l=e.color,u=e.iconStyle,c=(0,o.Z)(e,["icon","size","color","iconStyle"]);return(0,i.jsx)(a.Pd.Provider,{value:{color:l||"#F7F7F7",size:(0,s.Q)(null!==n&&void 0!==n?n:20),style:(0,t.Z)({},u)},children:(0,i.jsx)(r,(0,t.Z)({},c))})}},43010:function(e,r,n){n.d(r,{E:function(){return D}});var t=n(47568),o=n(26042),i=n(69396),a=n(97582),s=n(85893),l=n(82140),u=n(33090),c=n(41727),d=n(67294),p=n(57747),x=n(48783),h=n(49289),f=n(93717),m=n(4186),b=n(71293),g=n(11163),v=n(43611),j=n(25675),C=n.n(j),w=n(93114),y=function(e){var r=e.list,n=e.searchCard,t=e.click;(0,g.useRouter)();return(0,s.jsx)(p.xu,{p:"10px",maxH:"300px",minW:n||"300px",maxW:n||"400px",bg:"black.900",position:"absolute",top:"50px",left:n?"0":"-120px",zIndex:"9999",borderRadius:"10px",borderColor:"white",borderWidth:"2px",overflowX:"auto",children:(0,s.jsx)(x.g,{spacing:"10px",divider:(0,s.jsx)(h.i,{}),children:r&&r.length>0&&r.map((function(e,r){return(0,s.jsxs)(f.k,{cursor:"pointer",_hover:{transition:"all 0.4s"},alignItems:"center",justifyContent:"flex-start",w:"100%",onClick:function(){return t(e)},children:[e.urls&&e.urls.length>0?(0,s.jsx)(m.E,{src:e.urls[0],w:"60px",h:"60px",alt:e.name,onContextMenu:w.I}):e.picture?(0,s.jsx)(m.E,{src:e.picture||"",w:"60px",h:"60px",alt:e.name,onContextMenu:w.I}):(0,s.jsx)(C(),{src:v.Z,width:60,height:60,alt:e.name,onContextMenu:w.I}),(0,s.jsx)(b.x,{fontSize:"1rem",fontWeight:"bold",ml:"10px",children:e.name})]},r)}))})})},k=n(63750),_=n(69045),A=n(70484),S=n(61969),D=function(e){var r=e.containerProps,n=e.inputProps,p=e.searchCard,x=(0,d.useState)([]),h=x[0],f=x[1],m=(0,d.useState)([]),b=m[0],v=m[1],j=(0,g.useRouter)(),C=function(){var e=(0,t.Z)((function(){var e;return(0,a.__generator)(this,(function(r){switch(r.label){case 0:return[4,S.api.get("getProductAndCategoryAndMenu")];case 1:return e=r.sent().data,v(e),[2]}}))}));return function(){return e.apply(this,arguments)}}();return(0,d.useEffect)((function(){C()}),[]),(0,s.jsxs)(l.B,(0,i.Z)((0,o.Z)({borderRadius:"4px",bg:"var(--black-primary)",p:"1px 7px",w:"100%",h:(0,c.Q)(42),maxW:(0,c.Q)(594),outline:"none",position:"relative",zIndex:"8888"},r),{children:[(0,s.jsx)(u.I,(0,o.Z)({w:"100%",height:"100%",border:"solid 2px var(--white-primary)",borderRadius:"4px",_focusVisible:{outline:"none"},onChange:function(e){var r=e.target.value.toLowerCase();if(""!=r){var n=b.filter((function(e){return e.link_personalite?e.name.toLowerCase().includes(r)||e.link_personalite.toLowerCase().includes(r):e.name.toLowerCase().includes(r)}));f(n)}else f([])},_placeholder:{color:"white.500",opacity:"50%"}},n)),h.length>0&&(0,s.jsx)(y,{list:h,searchCard:p,click:function(e){e.status?window.open(e.url,"_blank"):(j.push(e.order_all_products||e.sub_category_id||e.filter?"/category/".concat((0,A.b)(e.link_personalite?e.link_personalite:e.name.toLowerCase().replaceAll(" ","_"))):"/produto/".concat((0,A.b)(e.link_personalite?e.link_personalite:e.name.toLowerCase().replaceAll(" ","_")))),f([]))}}),(0,s.jsx)(_.Z,{icon:k.dVI,size:20,iconStyle:{position:"absolute",right:(0,c.Q)(16),top:(0,c.Q)(11)},color:(null===r||void 0===r?void 0:r.color)?r.color:"white"})]}))}},53363:function(e,r,n){n.r(r);var t=n(47568),o=n(29815),i=n(82222),a=n(97582),s=n(85893),l=n(67294),u=n(57747),c=n(27239),d=n(16470),p=n(71293),x=n(24880),h=n(34292),f=n(32556),m=n(89993),b=n(48783),g=n(22757),v=n(33090),j=n(93855),C=n(30310),w=n(93717),y=n(55094),k=n(83589),_=n(68938),A=n(64859),S=n(66205),D=n(54346),E=n(86893),z=n(1451),R=n(61969),L=n(41727),Z=n(16694),I=n(5152),T=n.n(I),U=n(32808),M=n(33749),P=n(43010),q=n(63887),F=n(30381),H=n.n(F),Y=n(96225),Q=n(37106),W=n(55281),B=n(55512),O=n(14253),N=T()((function(){return Promise.all([n.e(3737),n.e(1851),n.e(1425),n.e(1910),n.e(3818),n.e(9472)]).then(n.bind(n,89472))}),{loadableGenerated:{webpack:function(){return[89472]}},ssr:!1,loading:function(){return(0,s.jsx)(u.xu,{display:"flex",alignItems:"center",justifyContent:"center",height:"400px",bg:"gray.100",borderRadius:"md",children:(0,s.jsx)(c.M,{children:"Carregando editor 3D..."})})}});r.default=function(){var e=(0,l.useState)([]),r=(e[0],e[1]),n=(0,l.useState)(!1),c=n[0],I=n[1],T=(0,l.useState)(!1),F=T[0],V=T[1],G=(0,l.useState)([]),X=G[0],J=G[1],K=(0,l.useState)([]),$=K[0],ee=K[1],re=(0,l.useState)([]),ne=re[0],te=re[1],oe=(0,l.useState)(!1),ie=
1oe[0],ae=oe[1],se=(0,l.useState)(!1),le=se[0],ue=se[1],ce=(0,l.useState)(null),de=ce[0],pe=ce[1],xe=(0,l.useState)({color:"#ffffff",metalness:.5,roughness:.5,opacity:1,emissive:"#000000",emissiveIntensity:0,materialType:"plastic"}),he=xe[0],fe=xe[1],me=(0,l.useState)(!1),be=me[0],ge=me[1],ve=(0,l.useState)(null),je=ve[0],Ce=ve[1],we=(0,l.useRef)(null),ye=(0,l.useRef)(null),ke=(0,d.p)(),_e=function(e){var r=e.toLowerCase().substring(e.lastIndexOf("."));return[".obj",".fbx",".dae",".3ds",".stl",".gltf",".glb",".ply",".wrl"].includes(r)},Ae=function(){var e=(0,t.Z)((function(){var e,n,t;return(0,a.__generator)(this,(function(o){switch(o.label){case 0:I(!0),o.label=1;case 1:return o.trys.push([1,3,4,5]),[4,R.api.get("/getAllFiles")];case 2:return e=o.sent(),console.log("Tab3D: Resposta da API:",e.data),n=e.data.filter((function(e){var r=_e(e.name),n=e.url&&"string"===typeof e.url&&""!==e.url.trim();return console.log("Tab3D: Arquivo:",e.name,"is3D:",r,"hasValidUrl:",n,"url:",e.url),r&&n})),console.log("Tab3D: Arquivos 3D filtrados:",n),r(n),ee(n),te(n),[3,5];case 3:return t=o.sent(),console.error("Tab3D: Erro ao carregar modelos:",t),ke({title:"Erro",description:"Erro ao carregar modelos 3D",status:"error",duration:3e3,isClosable:!0}),[3,5];case 4:return I(!1),[7];case 5:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}(),Se=function(){var e=(0,t.Z)((function(e){var r,n,t,o;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:if(!(r=e.target.files)||0===r.length)return[2];for(V(!0),n=new FormData,t=0;t<r.length;t++)o=r[t],_e(o.name)&&n.append("files",o);i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,R.api.post("/upload-3d",n,{headers:{"Content-Type":"multipart/form-data"}})];case 2:return i.sent().data.status&&(ke({title:"Sucesso",description:"Arquivos 3D enviados com sucesso!",status:"success",duration:3e3,isClosable:!0}),Ae()),[3,5];case 3:return i.sent(),ke({title:"Erro",description:"Erro ao enviar arquivos 3D",status:"error",duration:3e3,isClosable:!0}),[3,5];case 4:return V(!1),e.target&&(e.target.value=""),[7];case 5:return[2]}}))}));return function(r){return e.apply(this,arguments)}}(),De=function(){var e=(0,t.Z)((function(e){var r,n,t;return(0,a.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,R.api.get("/3d/".concat(e.name),{responseType:"blob"})];case 1:return r=o.sent(),n=window.URL.createObjectURL(new Blob([r.data])),(t=document.createElement("a")).href=n,t.setAttribute("download",e.name),document.body.appendChild(t),t.click(),t.remove(),window.URL.revokeObjectURL(n),ke({title:"Sucesso",description:"Arquivo baixado com sucesso!",status:"success",duration:3e3,isClosable:!0}),[3,3];case 2:return o.sent(),ke({title:"Erro",description:"Erro ao baixar arquivo",status:"error",duration:3e3,isClosable:!0}),[3,3];case 3:return[2]}}
1))}));return function(r){return e.apply(this,arguments)}}(),Ee=function(){var e=(0,t.Z)((function(e){return(0,a.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,R.api.delete("/removeFile?name=".concat(e.name))];case 1:return r.sent(),ke({title:"Sucesso",description:"Modelo 3D exclu\xeddo com sucesso!",status:"success",duration:3e3,isClosable:!0}),Ae(),[3,3];case 2:return r.sent(),ke({title:"Erro",description:"Erro ao excluir modelo 3D",status:"error",duration:3e3,isClosable:!0}),[3,3];case 3:return[2]}}))}));return function(r){return e.apply(this,arguments)}}(),ze=function(){ge(!1),Ce(null)},Re=function(){var e=(0,t.Z)((function(){return(0,a.__generator)(this,(function(e){switch(e.label){case 0:return je?[4,Ee(je)]:[3,2];case 1:e.sent(),ze(),e.label=2;case 2:return[2]}}))}));return function(){return e.apply(this,arguments)}}();(0,l.useEffect)((function(){Ae()}),[]);var Le=[{title:(0,s.jsx)(U.Z,{onChange:function(e){var r=e.target.checked?$.map((function(e){return e.id})):[];J(r)},checked:X.length===$.length}),key:"selectAll",width:50,render:function(e){return(0,s.jsx)(U.Z,{onChange:function(r){return n=r.target.checked?(0,o.Z)(X).concat([e.id]):X.filter((function(r){return r!==e.id})),void J(n);var n},checked:X.includes(e.id),style:{color:X.includes(e.id)?"red":"inherit"}})}},{title:"Nome",dataIndex:"name",key:"name",sorter:function(e,r){return e.name.localeCompare(r.name)},render:function(e){return(0,s.jsx)(p.x,{fontWeight:"medium",color:"gray.800",children:e})}},{title:"Tipo",key:"type",render:function(e){var r=e.name.toLowerCase().substring(e.name.lastIndexOf("."));return(0,s.jsx)(x.C,{colorScheme:"blue",variant:"subtle",children:r.toUpperCase()})}},{title:"Criado em",dataIndex:"created_at",key:"created_at",render:function(e){return H()(e).format("DD/MM/YYYY HH:mm")},sorter:function(e,r){return H()(e.created_at).unix()-H()(r.created_at).unix()}},{title:"Atualizado em",dataIndex:"updated_at",key:"updated_at",render:function(e){return H()(e).format("DD/MM/YYYY HH:mm")},sorter:function(e,r){return H()(e.updated_at).unix()-H()(r.updated_at).unix()}},{title:"A\xe7\xf5es",key:"actions",width:200,render:function(e){return(0,s.jsxs)(h.U,{spacing:2,children:[(0,s.jsx)(f.u,{label:"Visualizar 3D",children:(0,s.jsx)(m.h,{"aria-label":"Visualizar",icon:(0,s.jsx)(E.rDJ,{}),size:"sm",variant:"ghost",onClick:function(){return function(e){if(console.log("Tab3D: Abrindo viewer para modelo:",e),console.log("Tab3D: model.url:",e.url,(0,i.Z)(e.url)),!e.url||"string"!==typeof e.url||""===e.url.trim())return console.error("Tab3D: URL inv\xe1lida para o modelo:",e),void ke({title:"Erro",description:"URL do modelo inv\xe1lida",status:"error",duration:3e3,isClosable:!0});pe(e),ae(!0)}(e)}})}),(0,s.jsx)(f.u,{label:"Editar Texturas",children:(0,s.jsx)(m.h,{"aria-label":"Editar",icon:(0,s.jsx)(Y.RjU,{}),size:"sm",variant:"ghost",onClick:function(){return function(e){if(console.log("Tab3D: Abrindo editor para modelo:",e),console.log("Tab3D: model.url:",e.url,(0,i.Z)(e.url)),!e.url||"string"!==typeof e.url||""===e.url.trim())return console.error("Tab3D: URL inv\xe1lida para o modelo:",e),void ke({title:"Erro",description:"URL do modelo inv\xe1lida",status:"error",duration:3e3,isClosable:!0});pe(e),ue(!0)}(e)}})}),(0,s.jsx)(f.u,{label:"Download",children:(0,s.jsx)(m.h,{"aria-label":"Download",icon:(0,s.jsx)(z.$0x,{}),size:"sm",variant:"ghost",onClick:function(){return De(e)}})}),(0,s.jsx)(f.u,{label:"Copiar URL",children:(0,s.jsx)(m.h,{"aria-label":"Copiar",icon:(0,s.jsx)(E.C3L,{}),size:"sm",variant:"ghost",onClick:function(){return r=e.url,navigator.clipboard.writeText(r),void ke({title:"Copiado!",description:"URL copiada para a \xe1rea de transfer\xeancia",status:"success",duration:2e3,isClosable:!0});var r}})}),(0,s.jsx)(f.u,{label:"Excluir",children:(0,s.jsx)(m.h,{"aria-label":"Excluir",icon:(0,s.jsx)(Q.X1l,{}),size:"sm",variant:"ghost",colorScheme:"red",onClick:function(){return function(e){Ce(e),ge(!0)}(e)}})})]})}}];return(0,s.jsx)(u.xu,{p:6,children:(0,s.jsxs)(b.g,{spacing:6,align:"stretch",children:[(0,s.jsxs)(u.xu,{children:[(0,s.jsx)(g.X,{size:"lg",mb:2,children:"Gerenciador de Modelos 3D"}),(0,s.jsx)(p.x,{color:"gray.600",mb:2,children:"Fa\xe7a upload, visualize e edite modelos 3D. Suporta formatos: OBJ, FBX, DAE, 3DS, STL, GLTF, GLB, PLY, WRL e outros."}),(0,s.jsxs)(u.xu,{p:3,bg:"blue.50",borderRadius:"md",border:"1px solid",borderColor:"blue.200",children:[(0,s.jsx)(p.x,{fontSize:"sm",color:"blue.800",fontWeight:"medium",children:"\u2728 Novas funcionalidades: Suporte a HDR Environment Maps e materiais PBR realistas!"}),(0,s.jsx)(p.x,{fontSize:"xs",color:"blue.700",mt:1,children:"\u2022 HDR Environment Maps para ilumina\xe7\xe3o realista \u2022 Materiais PBR com metalness e roughness \u2022 Biblioteca expandida de materiais \u2022 Controles de intensidade do environment"})]})]}),(0,s.jsx)(u.xu,{p:6,bg:"gray.50",borderRadius:"lg",border:"2px dashed",borderColor:"gray.300",children:(0,s.jsxs)(b.g,{spacing:4,children:[(0,s.jsx)(g.X,{size:"md",color:"gray.700",children:"Upload de Modelos 3D"}),(0,s.jsx)(p.x,{textAlign:"center",color:"gray.600",children:"Arraste e solte arquivos 3D aqui ou clique para selecionar"}),(0,s.jsx)(v.I,{type:"file",accept:".obj,.fbx,.dae,.3ds,.stl,.gltf,.glb,.ply,.wrl",multiple:!0,onChange:Se,ref:ye,style:{display:"none"}}),(0,s.jsx)(j.z,{leftIcon:(0,s.jsx)(E.Yjd,{}),colorScheme:"blue",onClick:function(){var e;return null===(e=ye.current)||void 0===e?void 0:e.click()},isLoading:F,loadingText:"Enviando...",children:"Selecionar Arquivos 3D"}),F&&(0,s.jsxs)(u.xu,{w:"100%",children:[(0,s.jsx)(C.E,{size:"sm",isIndeterminate:!0,colorScheme:"blue"}),(0,s.jsx)(p.x,{fontSize:"sm",textAlign:"center",mt:2,children:"Enviando arquivos..."})]})]})}),(0,s.jsxs)(w.k,{w:"100%",alignItems:"center",justifyContent:"space-between",mb:"14px",children:[(0,s.jsx)(w.k,{gap:"5",children:(0,s.jsx)(j.z,{bg:"var(--black-primary)",color:"var(--white-primary)",borderRadius:"4px",w:"124px",h:"40px",_hover:{transition:"all 0.4s"},onClick:function(){var e;return null===(e=ye.current)||void 0===e?void 0:e.click()},children:"Adicionar"})}),(0,s.jsx)(W.K,{direction:"row",spacing:6,children:(0,s.jsx)(P.
1E,{inputProps:{placeholder:"Digite o nome do modelo...",onChange:function(e){var r=ne.filter((function(r){return r.name.toLowerCase().includes(e.target.value.toLowerCase())}));ee((0,o.Z)(r))},_placeholder:{color:"black.800",opacity:"50%"}},containerProps:{bg:"gray.100",border:"none",borderColor:"black.800",color:q.O.black[800],maxW:(0,L.Q)(288)}})})]}),(0,s.jsx)(u.xu,{borderRadius:"4px",bg:"white",p:"10px",w:"100%",children:(0,s.jsx)(M.Z,{id:"tabela-modelos-3d",loading:c,dataSource:$,columns:Le,rowKey:"id",pagination:{pageSize:10,showSizeChanger:!0,showQuickJumper:!0,showTotal:function(e,r){return"Modelos 3D (".concat(e,")")}}})}),(0,s.jsxs)(y.u_,{isOpen:ie,onClose:function(){return ae(!1)},size:"6xl",children:[(0,s.jsx)(k.Z,{}),(0,s.jsxs)(_.h,{children:[(0,s.jsxs)(A.x,{children:["Visualizar: ",null===de||void 0===de?void 0:de.name]}),(0,s.jsx)(S.o,{}),(0,s.jsx)(D.f,{children:de&&de.url&&(0,s.jsx)(Z.ThreeDViewer,{url:de.url,productName:de.name,width:"100%",height:"600px"})})]})]}),(0,s.jsxs)(y.u_,{isOpen:le,onClose:function(){return ue(!1)},size:"6xl",children:[(0,s.jsx)(k.Z,{}),(0,s.jsxs)(_.h,{maxW:"90vw",maxH:"90vh",m:0,children:[(0,s.jsxs)(A.x,{children:["Editar Texturas: ",null===de||void 0===de?void 0:de.name]}),(0,s.jsx)(S.o,{}),(0,s.jsx)(D.f,{p:0,display:"flex",h:"calc(90vh - 60px)",children:(0,s.jsx)(u.xu,{flex:1,overflow:"hidden",minH:"500px",children:de&&de.url&&(0,s.jsx)(N,{modelUrl:de.url,modelName:de.name,textureSettings:he,onSettingsChange:fe,height:"100%"})})})]})]}),(0,s.jsx)(B.a,{isOpen:be,leastDestructiveRef:we,onClose:ze,children:(0,s.jsx)(k.Z,{children:(0,s.jsxs)(B._,{p:"1%",backgroundColor:"var(--white-primary)",children:[(0,s.jsx)(A.x,{className:"paragrafo-preto text-black negrito",fontSize:"1.15rem",textTransform:"uppercase",mb:"0",children:"Confirmar exclus\xe3o"}),(0,s.jsxs)(D.f,{children:['Tem certeza que deseja excluir o modelo "',null===je||void 0===je?void 0:je.name,'"? Esta a\xe7\xe3o n\xe3o pode ser desfeita.']}),(0,s.jsxs)(O.m,{children:[(0,s.jsx)(j.z,{ref:we,onClick:ze,children:"Cancelar"}),(0,s.jsx)(j.z,{colorScheme:"red",onClick:Re,ml:3,children:"Excluir"})]})]})})})]})})}},41727:function(e,r,n){function t(e){var r=(e/16).toFixed(4);return"".concat(r,"rem")}n.d(r,{Q:function(){return t}})},93114:function(e,r,n){n.d(r,{I:function(){return t}});var t=function(){return!1}}}]);

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.