@zydon/common 2.5.22 → 2.5.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { a as a$5 } from '../../chunk-H5L4ARDB.js';
2
+ import { a } from '../../chunk-2OZIFMY6.js';
2
3
  import { e } from '../../chunk-ANAHA3L6.js';
3
4
  import { a as a$3 } from '../../chunk-2FXBVVBD.js';
4
- import { a } from '../../chunk-2OZIFMY6.js';
5
5
  import { a as a$6 } from '../../chunk-MHMX2WXK.js';
6
6
  import '../../chunk-7AZX7L27.js';
7
7
  import '../../chunk-S3RJO2XV.js';
@@ -33,6 +33,6 @@ import kr from '@mui/material/Tooltip';
33
33
  import { useDropzone } from 'react-dropzone';
34
34
  import yt from '@mui/material/CircularProgress';
35
35
 
36
- var Bo=({helperText:e,disabled:o,isError:r})=>e?jsx(No,{error:r,sx:t=>({mx:"14px",color:o?t.palette.grey[500]:void 0}),children:e}):null,_=memo(Bo);var ye=styled(ge)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),Le=styled(ge)({position:"absolute",top:4,right:4,gap:.5,"& svg":{width:16,height:16}}),ro=styled(Ee,{shouldForwardProp:e=>!["isDragActive","isError","disabled"].includes(e)})(({theme:e,isDragActive:o,isError:r,disabled:t})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:e.spacing(5),borderRadius:e.shape.borderRadius,transition:e.transitions.create("padding"),backgroundColor:e.palette.background.neutral,border:`1px dashed ${alpha(e.palette.grey[500],.32)}`,...o&&{opacity:.72},...r&&{color:e.palette.error.main,backgroundColor:e.palette.error.lighter,borderColor:e.palette.error.light},...t&&{opacity:.48,pointerEvents:"none"},"&:hover":{opacity:.72}}));styled(ge)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}}));var to=styled(Go)(({theme:e})=>({position:"relative",zIndex:999,pointerEvents:"auto",color:e.palette.grey[700],backgroundColor:e.palette.grey[100],"&:hover":{color:e.palette.grey[900],backgroundColor:e.palette.grey[300]}})),Ge=styled("div")({position:"relative",zIndex:1,userSelect:"none","&:hover":{zIndex:2}}),io=styled(ge,{shouldForwardProp:e=>!["isDragging"].includes(e)})(({theme:e,width:o,isDragging:r})=>({width:o,height:100,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2,1,2,1),gap:e.spacing(1),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),ao=styled(m.div)(({theme:e,width:o,isDragging:r})=>({width:o,height:60,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),no=styled(a)(({theme:e})=>({top:16,right:16,zIndex:9,position:"absolute",color:e.palette.common.white,backgroundColor:alpha(e.palette.grey[900],.72),"&:hover":{backgroundColor:alpha(e.palette.grey[900],.48)}})),so=styled(Ee,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="disabled"&&e!=="hasError"})(({theme:e,isDragActive:o,disabled:r,hasError:t})=>({width:64,height:64,flexShrink:0,display:"flex",borderRadius:1,cursor:"pointer",alignItems:"center",color:e.palette.text.disabled,justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),border:`dashed 1px ${alpha(e.palette.grey[500],.16)}`,...o&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...t&&{color:e.palette.error.main,borderColor:e.palette.error.main,backgroundColor:alpha(e.palette.error.main,.08)},"&:hover":{opacity:.72}})),lo=styled(Ee)(({theme:e})=>({padding:e.spacing(1),top:0,left:0,width:"100%",height:"100%",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out",filter:"blur(0)","&:hover":{filter:"blur(3px)"}})),po=styled("img",{shouldForwardProp:e=>e!=="aspectRatio"&&e!=="isLoading"&&e!=="isUploading"&&e!=="maxWidth"&&e!=="maxHeight"&&e!=="cropSize"})(({theme:e,aspectRatio:o,maxWidth:r,maxHeight:t,isLoading:a,isUploading:s})=>({borderRadius:e.shape.borderRadius,objectFit:"cover",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) scale(1)",filter:"blur(0)",zIndex:1,maxWidth:r,maxHeight:t,backgroundColor:e.palette.background.paper,aspectRatio:Math.abs(o),...Math.abs(o)>1?{width:"calc(100% - 16px)",height:void 0}:{width:void 0,height:"calc(100% - 16px)"},transition:"all 0.5s ease-in-out",...a||s?{opacity:0,filter:"blur(1.5rem)",transform:"translate(-50%, -50%) scale(0.7)"}:{},"&:hover":{transition:"all 0.2s ease-in-out"}})),mo=styled("img",{shouldForwardProp:e=>e!=="isLoading"&&e!=="isUploading"})(({isLoading:e,isUploading:o})=>({width:"100%",height:"100%",objectFit:"cover",top:0,left:0,filter:"blur(1.5rem)",transform:"scale(1.1)",position:"absolute",zIndex:0,transition:"opacity 0.3s ease-in-out",...e&&{opacity:0},...o&&{opacity:.7,filter:"blur(2rem)"}})),co=styled(ge)({width:"100%",height:"100%",position:"relative",overflow:"hidden",borderRadius:"50%",justifyContent:"center",alignItems:"center"});styled(jo)(({theme:e})=>({py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",backgroundColor:alpha(e.palette.error.main,.08)}));var je=styled(Ee,{shouldForwardProp:e=>e!=="isError"&&e!=="hasFile"})(({theme:e,isError:o,hasFile:r})=>({top:0,gap:e.spacing(1),left:0,width:"100%",height:"100%",zIndex:9,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",color:e.palette.text.disabled,flexDirection:"column",justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter}),"&:hover":{opacity:.92},...o&&{color:e.palette.error.main},...r&&{zIndex:9,opacity:0,color:e.palette.common.white,backgroundColor:alpha(e.palette.common.black,.54)}})),go=styled(ge)({top:0,left:0,right:0,bottom:0,position:"absolute",zIndex:10,alignItems:"center",justifyContent:"center",opacity:.8});styled(ge)(({theme:e})=>({padding:20,justifyContent:"center",alignItems:"center",gap:4,alignSelf:"stretch",borderRadius:12,background:e.palette.grey[200],color:e.palette.text.disabled,height:160}));var uo=styled(Ee,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="isError"&&e!=="hasFile"})(({theme:e,isDragActive:o,disabled:r,isError:t,hasFile:a})=>({padding:e.spacing(1),margin:"auto",width:144,height:144,cursor:"pointer",overflow:"hidden",borderRadius:"50%",border:`1px dashed ${alpha(e.palette.grey[500],.2)}`,...o&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...t&&{borderColor:"error.main"},...a&&{...t&&{bgcolor:alpha(e.palette.error.main,.08)},"&:hover .upload-placeholder":{opacity:1},"& img":{filter:"blur(0)"},"&:hover img":{filter:"blur(3px)"}}})),fo=styled("img")({width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover",transition:"all 0.3s ease-in-out"}),xo=styled(a)(({theme:e})=>({backgroundColor:alpha(e.palette.grey[900],.72),color:e.palette.common.white,"&:hover":{backgroundColor:alpha(e.palette.grey[600],.64),color:e.palette.common.white},"& svg":{width:14,height:14}}));var Xo=({onRemove:e,sx:o,file:r,disableDrag:t,attributes:a,listeners:s,innerWidth:n,isDragging:p})=>{let l=r?.id;return l?jsx($o,{anchorOrigin:{vertical:"top",horizontal:"left"},children:jsxs(ao,{width:n,isDragging:p,"data-testid":`preview-multi-img-${l}`,...j().inUp,sx:o,children:[jsx(a$2,{disableDrag:t,...a,...s}),jsx(Pe,{imageView:!0,file:r}),jsx(Le,{sx:{position:"absolute",right:3,top:3,zIndex:1},children:e&&jsx(xo,{size:"small",label:"Remover arquivo",onClick:()=>e(r),icon:"DELETE_MARK_BUTTON_02"})})]})},`badge-${l}`):null},ho=memo(Xo);var Qo=({file:e$1,thumbnail:o,onRemove:r,sx:t,disableDrag:a$1=!1})=>{let s=e$1.size||0,n=e$1.name||e$1.id,p=e$1.id,l=typeof e$1=="string",x$1=a$1?70:80,{attributes:d,listeners:g,setNodeRef:I,transform:E,transition:A,isDragging:b}=useSortable({id:p,disabled:a$1}),C={transform:x.Transform.toString(E),transition:A,display:"inline-block",alignItems:"center",justifyContent:"center",width:`${x$1+8}px`,height:"68px"};return o&&e$1?jsx(Ge,{ref:I,style:C,children:jsx(ho,{innerWidth:x$1,isDragging:b,sx:t,file:e$1,disableDrag:a$1,attributes:d,listeners:g,onRemove:r})}):jsx(Ge,{ref:I,style:{...C,height:"80px",width:`${x$1+38}px`},children:jsxs(io,{width:x$1+30,isDragging:b,"data-testid":`preview-multi-img-${p}`,...j().inUp,sx:t,children:[jsx(a$2,{disableDrag:a$1,...d,...g}),e$1&&jsx(Pe,{file:e$1}),jsxs(ge,{flexGrow:1,sx:{width:"100%"},children:[jsx(a$3,{title:n,children:jsx(qe,{variant:"subtitle2",noWrap:!0,children:n})}),jsx(qe,{variant:"caption",sx:{color:"text.secondary"},children:l?"":e(s)})]}),jsx(Le,{children:r&&jsx(a,{size:"small",label:"Remover arquivo",onClick:()=>r(e$1),icon:"DELETE_MARK_BUTTON_02"})})]})})},bo=memo(Qo);var gr=({thumbnail:e,files:o,onRemove:r,onReorder:t,sx:a})=>{let s=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),n=useCallback(l=>{let{active:x,over:d}=l;if(!(!x||!d||x.id===d.id)&&t){let g=o.findIndex(({id:E})=>E===x.id),I=o.findIndex(({id:E})=>E===d.id);g!==-1&&I!==-1&&t(g,I,o);}},[o,t]),p=jsx(AnimatePresence,{initial:!1,children:o.map(l=>jsx(bo,{sx:a,id:`preview-file-${l.id}`,file:l,onRemove:r,thumbnail:e,disableDrag:!t},`preview-file-${l.id}`))});return t?jsx(DndContext,{sensors:s,collisionDetection:closestCenter,onDragEnd:n,modifiers:[restrictToHorizontalAxis,restrictToParentElement,restrictToWindowEdges],children:jsx(SortableContext,{items:o.map(l=>l.id),strategy:horizontalListSortingStrategy,children:p})}):p},Fe=memo(gr);var Eo=forwardRef(({onLoading:e,aspectRatio:o,cropSize:r,...t},a)=>{let{maxWidth:s,maxHeight:n}=useMemo(()=>r&&typeof r=="object"?{maxWidth:r.width,maxHeight:r.height}:r&&typeof r=="number"?{maxWidth:r,maxHeight:r}:{maxWidth:"100%",maxHeight:"100%"},[r]);a$1(()=>{e?.(!0);}),useLayoutEffect(()=>{typeof a=="object"&&a?.current?e?.(!a.current.complete):e?.(!1);},[a,e]);function p(){e?.(!1);}return jsx(po,{...t,maxWidth:s,maxHeight:n,ref:a,aspectRatio:o,onLoad:p,onError:p})});Eo.displayName="LoadingPreviewImage";var Ao=Eo;var br=({file:e,aspectRatio:o=1,isUploading:r,isLoading:t,onLoading:a,cropSize:s,maxWidth:n,maxHeight:p})=>{let l=useRef(null),x=e?.name||"",d=e?.name||"",g=URL.createObjectURL(e);return x?jsxs(lo,{className:"single-file-preview-box",children:[jsx(Ao,{className:"single-file-preview-img",aspectRatio:o,cropSize:s,isLoading:t,isUploading:r,alt:d,src:g,ref:l,loading:"lazy",onLoading:a,onLoad:()=>a?.(!1),onError:()=>a?.(!1),maxWidth:n,maxHeight:p},`image-preview-${x}`),jsx(mo,{className:"single-file-preview-bg",alt:d,src:g,isLoading:t,isUploading:r})]}):null},Ze=memo(br);var Er=["pdf"],Ar=["txt"],Fr=["psd"],wr=["doc","docx"],Dr=["xls","xlsx"],Rr=["zip","rar","iso"],_r=["ai","eps"],Sr=["ppt","pptx"],Tr=["wav","aif","mp3","aac"],Or=["jpg","jpeg","gif","bmp","png","svg","webp"],Ur=["m4v","avi","mpg","mp4","webm"];function He(e){let o,r=wo(e);return Ar.includes(r)?o="txt":Rr.includes(r)?o="zip":Tr.includes(r)?o="audio":Or.includes(r)?o="image":Ur.includes(r)?o="video":wr.includes(r)?o="word":Dr.includes(r)?o="excel":Sr.includes(r)?o="powerpoint":Er.includes(r)?o="pdf":Fr.includes(r)?o="photoshop":_r.includes(r)?o="illustrator":e?.startsWith("http")?o="image":o=wo(e),o}function Do(e){let o;switch(He(e)){case"folder":o="IC_FOLDER";break;case"txt":o="IC_TXT";break;case"zip":o="IC_ZIP";break;case"audio":o="IC_AUDIO";break;case"video":o="IC_VIDEO";break;case"word":o="IC_WORD";break;case"excel":o="IC_EXCEL";break;case"powerpoint":o="IC_POWER_POINT";break;case"pdf":o="IC_PDF";break;case"photoshop":o="IC_PTS";break;case"illustrator":o="IC_AI";break;case"image":o="IC_IMG";break;default:o="IC_FILE";}return o}function wo(e){return e&&e.split(".").pop()||""}function qi(e){return e.split("/").pop()}var Ce={root:"mnl__file__thumbnail__root",img:"mnl__file__thumbnail__img",icon:"mnl__file__thumbnail__icon",removeBtn:"mnl__file__thumbnail__remove__button",downloadBtn:"mnl__file__thumbnail__download__button"},Pe=({sx:e,file:o,tooltip:r,onRemove:t,imageView:a,slotProps:s,onDownload:n,...p})=>{let l=URL.createObjectURL(o),x=o?.name||"",g=o.type.startsWith("image/")?"image":He(l),I=jsx(Ee,{component:"img",src:l,className:Ce.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...s?.img}}),E=jsx(a$4,{icon:Do(g),sx:{width:32,height:32,flexShrink:0,...e}}),A=jsxs(ge,{component:"span",className:Ce.root,sx:{width:36,height:36,flexShrink:0,borderRadius:1.25,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...e},...p,children:[g==="image"&&a?I:E,t&&jsx(Lr,{onClick:t,className:Ce.removeBtn,sx:s?.removeBtn,children:jsx(a$4,{icon:"CLOSE_MARK_BUTTON",width:24})}),n&&jsx(Go,{onClick:n,className:Ce.downloadBtn,sx:s?.downloadBtn,size:"small",children:jsx(a$4,{icon:"ARROW_DOWN_CICLE",width:12})})]});return r?jsx(kr,{arrow:!0,title:x,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:A}):A};var aa=e=>e.startsWith("image/"),Ro=(e,o=.8)=>new Promise((r,t)=>{let a=document.createElement("canvas"),s=a.getContext("2d"),n=new Image;n.onload=()=>{a.width=n.width,a.height=n.height,s?(s.drawImage(n,0,0),a.toBlob(p=>{if(p){let l=new File([p],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});r(l);}else t(new Error("Falha ao converter para WebP"));},"image/webp",o)):t(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},n.onerror=()=>t(new Error("Falha ao carregar imagem")),n.src=URL.createObjectURL(e);});var jr=({onFilesSelect:e$1,onFileSelect:o,onReorder:r,onRemove:t,uploadFiles:a,filesPreview:s,dropzoneOptions:n,enableCrop:p=!1,customAspectRatio:l,convertToWebp:x=!0,cropSize:d,maxFiles:g})=>{let{showErrorMessage:I}=a$8(),E=useMemo(()=>l||(d&&typeof d!="number"?d.width/d.height:1),[l,d]),[A,b]=useState([]),[C,M]=useState(!1),[c,F]=useState(null),[P,T]=useState(null),[U,O]=useState(""),[u,m]=useState(!1),[w,v]=useState([]),[y,R]=useState(0),[N,z]=useState(0),ee=f=>{if(f.length<1)return;let h=f[0];F(h),R(L=>L+1);let D=new FileReader;D.onload=()=>{O(D.result),M(!0);},D.readAsDataURL(h);},oe=(f,h)=>{T(h);},ae=async f=>!c||!P?null:new Promise(h=>{let D=document.createElement("canvas"),L=D.getContext("2d"),H=new Image;H.onload=async()=>{let{width:fe,height:we,x:De,y:Mo}=P,Co=Math.abs(E),Re=fe,_e=we;d&&typeof d=="object"?(Re=d.width,_e=d.height):d&&typeof d=="number"&&(Re=d,_e=d/Co),D.width=Re,D.height=_e,L?(L.drawImage(H,De,Mo,fe,we,0,0,Re,_e),D.toBlob(async Je=>{if(Je){let We=new File([Je],c.name,{type:c.type,lastModified:Date.now()});if(x)try{We=await Ro(We);}catch(ko){I(ko,"Erro ao converter para WebP");}let Qe=We;Qe.id=f,h(Qe);}else h(null);},"image/png")):h(null);},H.src=U;}),pe=async()=>{if(!(!c||!P||w.length===0)){m(!0);try{let f=w[0],h=await ae(f.id);if(h){let L=await a([h]);L&&(!e$1&&!o&&b(H=>[...H,...L]),e$1?.([...s||[],...L]),o?.(h));}M(!1),m(!1),O(""),F(null);let D=w.slice(1);v(D),ee(D);}catch(f){I(f,"Erro ao processar imagem"),m(!1);}}},de=()=>{M(!1),m(!1),O(""),F(null),v([]),R(0),z(0);},me=async f=>{if(f.length===0)return;let h=Object.keys(n?.accept||{}).some(L=>L.includes("image/")),D=A.length+f.length;if(g&&D>g){I(new Error(`M\xE1ximo de ${g} arquivos`),"Erro ao fazer upload");return}try{if(h&&p){let H=f.filter(fe=>fe.type.startsWith("image/")).map((fe,we)=>{let De=fe;return De.id=`temp-crop-${Date.now()}-${we}`,De});z(H.length),R(0),v(H),ee(H);}else {let L=await a(f);L&&(!e$1&&!o&&b(H=>[...H,...L]),e$1?.([...s||[],...L]),o?.(L[0]));}}catch(L){I(L,"Erro ao processar arquivos");}},ce=f=>{if(!f.length)return;let h=f[0]?.errors[0]?.code,D=n?.maxSize||3145728;I(h==="file-too-large"?new Error(`O arquivo excede o tamanho m\xE1ximo de ${e(D)}`):h==="file-invalid-type"?new Error("Formato de arquivo n\xE3o suportado"):f[0]?.errors[0]||new Error("Erro ao enviar arquivo"),"Erro ao fazer upload");},{getRootProps:W,getInputProps:V,isDragActive:K,isDragReject:re,fileRejections:G}=useDropzone({onDrop:me,onDropRejected:ce,...n}),i=f=>{if(!f){t||b([]),t?.(void 0);return}let h=A.filter(D=>D.id!==f.id);t||b(h),t?.(f);},j=(f,h,D)=>{r?.(f,h,D);},Z=useRef("");return useEffect(()=>{let f=s?.map(h=>h.id).join(",")||"";f!==Z.current&&(Z.current=f,b(s||[]));},[s]),{file:A?.[0],files:A,aspectRatio:E,dropzoneProps:{getRootProps:W,getInputProps:V,isDragActive:K,isDragReject:re,fileRejections:G},cropState:{cropModalOpen:C,imagePreview:U,cropLoading:u,setCropModalOpen:M,onCropInitialized:oe,handleCropSave:pe,handleCropCancel:de,currentImageIndex:y,totalPendingImages:N},setInitialFiles:b,handleRemove:i,handleReorder:j}},X=jr;var $e=(i=>(i.APPLICATION_OCTET_STREAM="application/octet-stream",i.IMAGE_JPEG="image/jpeg",i.IMAGE_JPG="image/jpg",i.IMAGE_PNG="image/png",i.IMAGE_GIF="image/gif",i.IMAGE_WEBP="image/webp",i.IMAGE_SVG="image/svg+xml",i.IMAGE_BMP="image/bmp",i.IMAGE_TIFF="image/tiff",i.IMAGE_ICO="image/x-icon",i.IMAGE_AVIF="image/avif",i.APPLICATION_PDF="application/pdf",i.TEXT_PLAIN="text/plain",i.TEXT_CSV="text/csv",i.APPLICATION_RTF="application/rtf",i.APPLICATION_MSWORD="application/msword",i.APPLICATION_DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",i.APPLICATION_MSEXCEL="application/vnd.ms-excel",i.APPLICATION_XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",i.APPLICATION_MSPOWERPOINT="application/vnd.ms-powerpoint",i.APPLICATION_PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",i.APPLICATION_ODT="application/vnd.oasis.opendocument.text",i.APPLICATION_ODS="application/vnd.oasis.opendocument.spreadsheet",i.APPLICATION_ODP="application/vnd.oasis.opendocument.presentation",i.APPLICATION_XML="application/xml",i.TEXT_XML="text/xml",i.TEXT_HTML="text/html",i.TEXT_CSS="text/css",i.APPLICATION_JSON="application/json",i.TEXT_JAVASCRIPT="text/javascript",i.APPLICATION_ZIP="application/zip",i.APPLICATION_GZIP="application/gzip",i.APPLICATION_RAR="application/vnd.rar",i.APPLICATION_7Z="application/x-7z-compressed",i.AUDIO_MPEG="audio/mpeg",i.AUDIO_WAV="audio/wav",i.AUDIO_OGG="audio/ogg",i.AUDIO_WEBM="audio/webm",i.AUDIO_AAC="audio/aac",i.VIDEO_MP4="video/mp4",i.VIDEO_MPEG="video/mpeg",i.VIDEO_OGG="video/ogg",i.VIDEO_WEBM="video/webm",i.VIDEO_QUICKTIME="video/quicktime",i))($e||{}),ke=(e=>(e["application/octet-stream"]="APPLICATION_OCTET_STREAM",e["image/jpeg"]="IMAGE_JPEG",e["image/jpg"]="IMAGE_JPG",e["image/png"]="IMAGE_PNG",e["image/gif"]="IMAGE_GIF",e["image/webp"]="IMAGE_WEBP",e["image/svg+xml"]="IMAGE_SVG",e["image/bmp"]="IMAGE_BMP",e["image/tiff"]="IMAGE_TIFF",e["image/x-icon"]="IMAGE_ICO",e["image/avif"]="IMAGE_AVIF",e["application/pdf"]="APPLICATION_PDF",e["text/plain"]="TEXT_PLAIN",e["text/csv"]="TEXT_CSV",e["application/rtf"]="APPLICATION_RTF",e["application/msword"]="APPLICATION_MSWORD",e["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]="APPLICATION_DOCX",e["application/vnd.ms-excel"]="APPLICATION_MSEXCEL",e["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]="APPLICATION_XLSX",e["application/vnd.ms-powerpoint"]="APPLICATION_MSPOWERPOINT",e["application/vnd.openxmlformats-officedocument.presentationml.presentation"]="APPLICATION_PPTX",e["application/vnd.oasis.opendocument.text"]="APPLICATION_ODT",e["application/vnd.oasis.opendocument.spreadsheet"]="APPLICATION_ODS",e["application/vnd.oasis.opendocument.presentation"]="APPLICATION_ODP",e["application/xml"]="APPLICATION_XML",e["text/xml"]="TEXT_XML",e["text/html"]="TEXT_HTML",e["text/css"]="TEXT_CSS",e["application/json"]="APPLICATION_JSON",e["text/javascript"]="TEXT_JAVASCRIPT",e["application/zip"]="APPLICATION_ZIP",e["application/gzip"]="APPLICATION_GZIP",e["application/vnd.rar"]="APPLICATION_RAR",e["application/x-7z-compressed"]="APPLICATION_7Z",e["audio/mpeg"]="AUDIO_MPEG",e["audio/wav"]="AUDIO_WAV",e["audio/ogg"]="AUDIO_OGG",e["audio/webm"]="AUDIO_WEBM",e["audio/aac"]="AUDIO_AAC",e["video/mp4"]="VIDEO_MP4",e["video/mpeg"]="VIDEO_MPEG",e["video/ogg"]="VIDEO_OGG",e["video/webm"]="VIDEO_WEBM",e["video/quicktime"]="VIDEO_QUICKTIME",e))(ke||{});var Xr=({createFilesMutation:e,filesDetails:o})=>{let{showErrorMessage:r,showSuccessMessage:t}=a$8(),[a,s]=useState(!1),[n,p]=useState(!1),[l,x]=useState(null),[d,g]=useState([]),I=useMemo(()=>d?.[0],[d]),E=n||a,A=useCallback(async c=>{if(!c.length){g([]),p(!1);return}p(!0);try{let P=(await Promise.all(c.map(async({url:T,id:U,name:O})=>{try{if(!T)return null;let u=await fetch(T);if(!u.ok)throw new Error(u.statusText);let m=await u.blob(),w=null;if(!O){let R=u.headers.get("content-disposition")||void 0;if(R){let N=R.match(/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i),z=N?.[1]||N?.[2];if(z)try{w=decodeURIComponent(z);}catch{w=z;}}}let v=w||O||U,y=new File([m],v,{type:m.type});return y.id=U,y.url=T,y}catch{return null}}))).filter(Boolean);g(P),p(!1);}catch(F){r(F,"Erro ao carregar arquivos"),g([]),p(!1);}},[r]),b=useRef("");useEffect(()=>{let c=o?.map(({id:F})=>F).join(",")||"";c!==b.current&&o?.length&&(async()=>(b.current=c,await A(o)))();},[o,A]);let C=async c=>{if(!c||!Array.isArray(c))throw new Error("Arquivos inv\xE1lidos");let F=c.filter(P=>P instanceof File);if(F?.length){s(!0);try{let P=F.map(u=>{let m=u.type||"application/octet-stream",w=ke[m];if(!w)throw new Error(`Tipo de arquivo n\xE3o suportado: ${m}`);return {file:u,mimeType:m,contentTypeEnum:w}}),T=await e({files:P.map(({file:u,contentTypeEnum:m})=>({content_type:m,name:u.name}))}).unwrap(),U=T.files.map((u,m)=>{let v=P[m].file;return v.id=u.id,v.url=u.url,v});return (await Promise.all(T.files.map((u,m)=>{let{mimeType:w}=P[m],v=U[m];return fetch(u.url,{method:"PUT",headers:{"Content-Type":w,"Content-Disposition":`inline; filename="${v.name}"`,"X-File-Id":u.id},body:v})}))).forEach(u=>{if(!u.ok)throw new Error(`Erro no upload: ${u.statusText}`)}),t("Imagem adicionada com sucesso"),U}catch(P){throw x(P),r(P,"Erro no upload"),P}finally{s(!1);}}},M=useMemo(()=>l&&l instanceof Error?l.message:l,[l]);return {setFilesPreview:g,uploadFiles:C,filesPreview:d,filePreview:I,isLoadingPreview:n,isUploadingFiles:a,isUploadOrLoadingFiles:E,uploadErrorText:M}},q=Xr;var Vr=({sx:e,id:o,name:r,tabIndex:t,uploading:a,getRootProps:s,getInputProps:n,isDragActive:p,isError:l,disabled:x,dropZoneSxProps:d,dropZoneContent:g,children:I,...E})=>jsxs(ye,{children:[a&&jsx(a$7,{"data-testid":"uploading-progress-bar",sx:{zIndex:1}}),jsxs(Ee,{sx:{width:1,position:"relative",...e},children:[jsxs(ro,{...s(),"data-testid":"drop-zone-styled-area",isError:l,isDragActive:p,disabled:!!x,sx:d,...E,children:[jsx("input",{...n(),id:o,tabIndex:t,name:r}),g]}),I]})]}),ne=Vr;var Qr=({header:e,description:o,sx:r,...t})=>jsxs(ge,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...r},...t,children:[jsx(a$5,{sx:{width:220}}),jsxs("div",{children:[jsx(qe,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),jsx(qe,{variant:"body2",sx:{color:"text.secondary"},children:o||jsxs(Fragment,{children:["Solte os arquivos aqui ou clique",jsx(qe,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua m\xE1quina"]})})]})]}),se=memo(Qr);var tt=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:a=[],id:s,disabled:n,error:p,helperText:l,thumbnail:x,dropZoneSxProps:d,uploading:g,tabIndex:I,maxFiles:E,placeholderAlt:A,placeholderProps:b,...C})=>{let{filesPreview:M,isUploadOrLoadingFiles:c,uploadErrorText:F,uploadFiles:P}=q({createFilesMutation:t,filesDetails:a}),{files:T,dropzoneProps:U,handleRemove:O,handleReorder:u}=X({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:M,dropzoneOptions:{multiple:!0,disabled:n,...C},maxFiles:E,uploadFiles:P}),{getRootProps:m,getInputProps:w,isDragActive:v,isDragReject:y}=U,R=!!T?.filter(z=>!!z.id).length,N=y||!!p||!!F;return jsxs(ne,{id:s,uploading:g||c,disabled:n,dropZoneSxProps:d,tabIndex:I,getRootProps:m,getInputProps:w,isDragActive:v,isError:N,dropZoneContent:jsx(Fragment,{children:A?jsx(ge,{children:A}):jsx(se,{header:b?.header,description:b?.description})}),children:[jsx(_,{disabled:n,helperText:l,isError:N}),p?jsx(_,{helperText:p,isError:!0}):null,F?jsx(_,{helperText:F,isError:!0}):null,R&&jsx(Ee,{sx:{my:3},children:jsx(Fe,{files:T,thumbnail:!!x,onRemove:e?O:void 0,onReorder:o?u:void 0})})]})},it=memo(tt);var mt=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:a=[],id:s,disabled:n,error:p,helperText:l,dropZoneSxProps:x,placeholderProps:d,placeholderAlt:g,uploading:I,tabIndex:E,maxFiles:A,aspectRatio:b,enableCrop:C=!0,convertToWebp:M=!0,cropSize:c,name:F,label:P,...T})=>{let{filesPreview:U,isUploadOrLoadingFiles:O,uploadErrorText:u,uploadFiles:m}=q({createFilesMutation:t,filesDetails:a}),w=I||O,{files:v,dropzoneProps:y,cropState:R,aspectRatio:N,handleRemove:z,handleReorder:ee}=X({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:U,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!0,disabled:n,...T},enableCrop:C,customAspectRatio:b,convertToWebp:M,maxFiles:A,cropSize:c,uploadFiles:m}),{getRootProps:oe,getInputProps:ae,isDragActive:pe,isDragReject:de}=y,{cropModalOpen:me,imagePreview:ce,cropLoading:W,onCropInitialized:V,handleCropSave:K,handleCropCancel:re,currentImageIndex:G,totalPendingImages:i}=R,j=!!v?.filter(h=>!!h.id).length,Z=de||!!p||!!u,f=useMemo(()=>{let h=P??"Ajustar Imagem",D=i>1||G>1?` (${G} de ${i})`:"";return `${h}${D}`},[P,i,G]);return jsxs(ne,{id:s,name:F,uploading:w,disabled:n,dropZoneSxProps:x,tabIndex:E,getRootProps:oe,getInputProps:ae,isDragActive:pe,isError:Z,dropZoneContent:jsx(Fragment,{children:g?jsx(ge,{children:g}):jsx(se,{header:d?.header,description:d?.description})}),children:[jsx(_,{disabled:n,helperText:l,isError:Z}),p?jsx(_,{helperText:p,isError:!0}):null,u?jsx(_,{helperText:u,isError:!0}):null,j&&jsx(Ee,{sx:{my:3,ml:.5},children:jsx(Fe,{files:v,thumbnail:!0,onRemove:z,onReorder:o?ee:void 0})}),jsx(a$6,{open:me,onClose:re,label:f,imageSrc:ce,aspectRatio:N,onInitialized:V,onSave:K,loading:W,cropSize:c})]})},ct=memo(mt);var It=({onFileSelect:e$1,onRemove:o,createFilesMutation:r,fileDetails:t,id:a,disabled:s,error:n,helperText:p,sx:l,dropZoneSxProps:x,uploading:d,tabIndex:g,...I})=>{let{filesPreview:E,isUploadOrLoadingFiles:A,uploadErrorText:b,uploadFiles:C}=q({createFilesMutation:r,filesDetails:t?[t]:[]}),M=A||d,{file:c,dropzoneProps:F,handleRemove:P}=X({uploadFiles:C,onFileSelect:e$1,onRemove:o,filesPreview:E,dropzoneOptions:{multiple:!1,disabled:s,...I}}),{getRootProps:T,getInputProps:U,isDragActive:O,isDragReject:u}=F,m$1=useCallback(R=>{R.stopPropagation(),P(c||void 0);},[c,P]),w=!!c,v=typeof c=="string",y=u||!!n||!!b;return jsxs(ne,{id:a,uploading:M,disabled:s,dropZoneSxProps:x,tabIndex:g,getRootProps:T,getInputProps:U,isDragActive:O,isError:y,dropZoneContent:jsxs(Fragment,{children:[!w&&jsx(se,{}),w&&jsxs(ge,{component:m.div,...j().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:R=>`solid 1px ${R.palette.divider}`,...l},children:[jsx(Pe,{file:c}),jsxs(ge,{flexGrow:1,sx:{minWidth:0},children:[jsx(qe,{variant:"subtitle2",noWrap:!0,children:v?c:c.name}),jsx(qe,{variant:"caption",sx:{color:"text.secondary"},children:v?"":e(c.size)})]}),o&&jsx(a$3,{title:"Remover arquivo",children:jsx(to,{edge:"end",size:"small",disabled:s,"aria-label":"Remover arquivo",onClick:m$1,children:jsx(a$4,{icon:"DELETE_MARK_BUTTON_02",width:16})})})]})]}),children:[jsx(_,{disabled:s,helperText:p,isError:y}),n?jsx(_,{helperText:n,isError:!0}):null,b?jsx(_,{helperText:b,isError:!0}):null]})},Pt=memo(It);var Dt=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,id:a,disabled:s,error:n,helperText:p,dropZoneSxProps:l,placeholderProps:x,placeholderAlt:d,uploading:g,tabIndex:I,aspectRatio:E,enableCrop:A=!0,convertToWebp:b=!0,name:C,label:M,cropSize:c,sx:F,maxWidth:P,maxHeight:T,...U})=>{let{filesPreview:O,isUploadOrLoadingFiles:u,uploadErrorText:m,uploadFiles:w}=q({createFilesMutation:r,filesDetails:t?[t]:[]}),[v,y]=useState(!1),{file:R,dropzoneProps:N,cropState:z,handleRemove:ee,aspectRatio:oe}=X({onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:s,...U},filesPreview:O,enableCrop:A,customAspectRatio:E,convertToWebp:b,cropSize:c,uploadFiles:w}),{getRootProps:ae,getInputProps:pe,isDragActive:de,isDragReject:me}=N,{cropModalOpen:ce,imagePreview:W,cropLoading:V,onCropInitialized:K,handleCropSave:re,handleCropCancel:G}=z,i=useCallback(()=>{ee(R||void 0);},[R,ee]),j=!!R,Z=me||!!n||!!m,f=g||u,h=j?{opacity:0}:{opacity:1},D=l?.width;return useEffect(()=>{j||y(!1);},[j]),jsxs(ye,{sx:{...F,...D&&{width:D}},children:[(f||v)&&jsx(a$7,{}),jsxs(ne,{id:a,uploading:f,disabled:s,dropZoneSxProps:l,tabIndex:I,getRootProps:ae,getInputProps:pe,isDragActive:de,isError:Z,name:C,dropZoneContent:jsxs(Fragment,{children:[d?jsx(ge,{sx:h,children:d}):jsx(se,{sx:h,header:x?.title,description:x?.description}),j&&jsx(Ze,{file:R,cropSize:c,isLoading:v,isUploading:f,onLoading:y,aspectRatio:oe,maxWidth:P,maxHeight:T})]}),children:[jsx(_,{disabled:s,helperText:p,isError:Z}),n?jsx(_,{helperText:n,isError:!0}):null,m?jsx(_,{helperText:m,isError:!0}):null,j&&e&&jsx(no,{size:"small",onClick:i,disabled:s,label:"Remover arquivo",children:jsx(a$4,{icon:"DELETE_MARK_BUTTON_02",width:16})}),jsx(a$6,{open:ce,onClose:G,label:M??"Ajustar Imagem",imageSrc:W,aspectRatio:oe,onInitialized:K,onSave:re,loading:V,cropSize:c})]})]})},Rt=memo(Dt);var Lt=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,disabled:a,label:s,id:n,tabIndex:p,error:l,helperText:x,sx:d,name:g,maxSize:I,uploading:E,aspectRatio:A=1,enableCrop:b=!0,convertToWebp:C=!0,cropSize:M,...c})=>{let[F,P]=useState(!1),{filesPreview:T,isUploadOrLoadingFiles:U,uploadErrorText:O,uploadFiles:u}=q({createFilesMutation:r,filesDetails:t?[t]:[]}),{file:m,dropzoneProps:w,cropState:v,handleRemove:y}=X({filesPreview:T,onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:a,maxSize:I,...c},enableCrop:b,customAspectRatio:A,convertToWebp:C,cropSize:M,uploadFiles:u}),{getRootProps:R,getInputProps:N,isDragActive:z,isDragReject:ee}=w,{cropModalOpen:oe,imagePreview:ae,cropLoading:pe,onCropInitialized:de,handleCropSave:me,handleCropCancel:ce}=v,W=ee||!!l||!!O,V=F||U||E,K=!!e,re=useRef(t?.url||""),G=useRef();useEffect(()=>{if(!m){re.current="",G.current=void 0;return}if(G.current===m.id)return;G.current=m.id,P(!0);let Z=URL.createObjectURL(m);return re.current=Z,()=>{URL.revokeObjectURL(Z);}},[m]);let i=()=>{P(!1);},j=useCallback(()=>K&&m?()=>y(m):R().onClick,[K,m,R,y]);return jsxs(Fragment,{children:[jsxs(ge,{sx:{alignItems:"center"},children:[jsxs(uo,{sx:d,isError:W,isDragActive:z,hasFile:!!m,...R(),onClick:j(),children:[jsxs(co,{children:[V&&jsx(go,{children:jsx(yt,{size:135,thickness:2,color:"primary"})}),m&&jsx(fo,{alt:"Avatar Preview",src:re.current,onLoad:i,...V&&{sx:{filter:"blur(5px) !important",scale:1.2,opacity:.7}}}),!m&&!V&&jsxs(je,{isError:W,hasFile:!1,children:[jsx(a$4,{icon:"ADD_IMAGE",width:32}),jsx(qe,{variant:"caption",textAlign:"center",sx:{color:W?"error.main":"text.disabled"},children:"Adicionar foto"})]}),m&&!V&&jsxs(je,{isError:W,hasFile:!0,children:[jsx(a$4,{icon:K?"DELETE_MARK_BUTTON_02":"ADD_IMAGE",width:32}),jsx(qe,{variant:"caption",textAlign:"center",sx:{color:W?"error.main":"common.white"},children:K?"Remover foto":"Alterar foto"})]})]}),jsx("input",{name:g,id:n,tabIndex:p,...N()})]}),jsx(ge,{sx:{alignItems:"center",mt:-.5},children:jsx(_,{helperText:x,disabled:a,isError:W})}),O?jsx(_,{helperText:O,isError:!0}):null,l?jsx(_,{helperText:l,isError:!0}):null]}),oe&&ae&&jsx(a$6,{open:oe,onClose:ce,label:s??"Ajustar Imagem",imageSrc:ae,aspectRatio:A,onInitialized:de,onSave:me,loading:pe,cropSize:M,cropShape:"round"})]})},Mt=memo(Lt);var Nt=({error:e,name:o,disabled:r,sx:t,...a})=>{let{getRootProps:s,getInputProps:n,isDragActive:p,isDragReject:l}=useDropzone({disabled:r,...a}),x=l||e;return jsxs(so,{...s(),isDragActive:p,hasError:!!x,disabled:!!r,sx:t,"data-testid":"upload-box",children:[jsx("input",{name:o,...n()}),"Selecionar arquivo"]})},Bt=memo(Nt);
36
+ var Bo=({helperText:e,disabled:o,isError:r})=>e?jsx(No,{error:r,sx:t=>({mx:"14px",color:o?t.palette.grey[500]:void 0}),children:e}):null,_=memo(Bo);var ye=styled(ge)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),Le=styled(ge)({position:"absolute",top:4,right:4,gap:.5,"& svg":{width:16,height:16}}),ro=styled(Ee,{shouldForwardProp:e=>!["isDragActive","isError","disabled"].includes(e)})(({theme:e,isDragActive:o,isError:r,disabled:t})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:e.spacing(5),borderRadius:e.shape.borderRadius,transition:e.transitions.create("padding"),backgroundColor:e.palette.background.neutral,border:`1px dashed ${alpha(e.palette.grey[500],.32)}`,...o&&{opacity:.72},...r&&{color:e.palette.error.main,backgroundColor:e.palette.error.lighter,borderColor:e.palette.error.light},...t&&{opacity:.48,pointerEvents:"none"},"&:hover":{opacity:.72}}));styled(ge)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}}));var to=styled(Go)(({theme:e})=>({position:"relative",zIndex:999,pointerEvents:"auto",color:e.palette.grey[700],backgroundColor:e.palette.grey[100],"&:hover":{color:e.palette.grey[900],backgroundColor:e.palette.grey[300]}})),Ge=styled("div")({position:"relative",zIndex:1,userSelect:"none","&:hover":{zIndex:2}}),io=styled(ge,{shouldForwardProp:e=>!["isDragging"].includes(e)})(({theme:e,width:o,isDragging:r})=>({width:o,height:100,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2,1,2,1),gap:e.spacing(1),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),ao=styled(m.div)(({theme:e,width:o,isDragging:r})=>({width:o,height:60,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),no=styled(a)(({theme:e})=>({top:16,right:16,zIndex:9,position:"absolute",color:e.palette.common.white,backgroundColor:alpha(e.palette.grey[900],.72),"&:hover":{backgroundColor:alpha(e.palette.grey[900],.48)}})),so=styled(Ee,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="disabled"&&e!=="hasError"})(({theme:e,isDragActive:o,disabled:r,hasError:t})=>({width:64,height:64,flexShrink:0,display:"flex",borderRadius:1,cursor:"pointer",alignItems:"center",color:e.palette.text.disabled,justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),border:`dashed 1px ${alpha(e.palette.grey[500],.16)}`,...o&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...t&&{color:e.palette.error.main,borderColor:e.palette.error.main,backgroundColor:alpha(e.palette.error.main,.08)},"&:hover":{opacity:.72}})),lo=styled(Ee)(({theme:e})=>({padding:e.spacing(1),top:0,left:0,width:"100%",height:"100%",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out",filter:"blur(0)","&:hover":{filter:"blur(3px)"}})),po=styled("img",{shouldForwardProp:e=>e!=="aspectRatio"&&e!=="isLoading"&&e!=="isUploading"&&e!=="maxWidth"&&e!=="maxHeight"&&e!=="cropSize"})(({theme:e,aspectRatio:o,maxWidth:r,maxHeight:t,isLoading:a,isUploading:s})=>({borderRadius:e.shape.borderRadius,objectFit:"cover",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) scale(1)",filter:"blur(0)",zIndex:1,maxWidth:r,maxHeight:t,backgroundColor:e.palette.background.paper,aspectRatio:Math.abs(o),...Math.abs(o)>1?{width:"calc(100% - 16px)",height:void 0}:{width:void 0,height:"calc(100% - 16px)"},transition:"all 0.5s ease-in-out",...a||s?{opacity:0,filter:"blur(1.5rem)",transform:"translate(-50%, -50%) scale(0.7)"}:{},"&:hover":{transition:"all 0.2s ease-in-out"}})),mo=styled("img",{shouldForwardProp:e=>e!=="isLoading"&&e!=="isUploading"})(({isLoading:e,isUploading:o})=>({width:"100%",height:"100%",objectFit:"cover",top:0,left:0,filter:"blur(1.5rem)",transform:"scale(1.1)",position:"absolute",zIndex:0,transition:"opacity 0.3s ease-in-out",...e&&{opacity:0},...o&&{opacity:.7,filter:"blur(2rem)"}})),co=styled(ge)({width:"100%",height:"100%",position:"relative",overflow:"hidden",borderRadius:"50%",justifyContent:"center",alignItems:"center"});styled(jo)(({theme:e})=>({py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",backgroundColor:alpha(e.palette.error.main,.08)}));var je=styled(Ee,{shouldForwardProp:e=>e!=="isError"&&e!=="hasFile"})(({theme:e,isError:o,hasFile:r})=>({top:0,gap:e.spacing(1),left:0,width:"100%",height:"100%",zIndex:9,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",color:e.palette.text.disabled,flexDirection:"column",justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter}),"&:hover":{opacity:.92},...o&&{color:e.palette.error.main},...r&&{zIndex:9,opacity:0,color:e.palette.common.white,backgroundColor:alpha(e.palette.common.black,.54)}})),go=styled(ge)({top:0,left:0,right:0,bottom:0,position:"absolute",zIndex:10,alignItems:"center",justifyContent:"center",opacity:.8});styled(ge)(({theme:e})=>({padding:20,justifyContent:"center",alignItems:"center",gap:4,alignSelf:"stretch",borderRadius:12,background:e.palette.grey[200],color:e.palette.text.disabled,height:160}));var uo=styled(Ee,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="isError"&&e!=="hasFile"})(({theme:e,isDragActive:o,disabled:r,isError:t,hasFile:a})=>({padding:e.spacing(1),margin:"auto",width:144,height:144,cursor:"pointer",overflow:"hidden",borderRadius:"50%",border:`1px dashed ${alpha(e.palette.grey[500],.2)}`,...o&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...t&&{borderColor:"error.main"},...a&&{...t&&{bgcolor:alpha(e.palette.error.main,.08)},"&:hover .upload-placeholder":{opacity:1},"& img":{filter:"blur(0)"},"&:hover img":{filter:"blur(3px)"}}})),fo=styled("img")({width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover",transition:"all 0.3s ease-in-out"}),xo=styled(a)(({theme:e})=>({backgroundColor:alpha(e.palette.grey[900],.72),color:e.palette.common.white,"&:hover":{backgroundColor:alpha(e.palette.grey[600],.64),color:e.palette.common.white},"& svg":{width:14,height:14}}));var Xo=({onRemove:e,sx:o,file:r,disableDrag:t,attributes:a,listeners:s,innerWidth:n,isDragging:p})=>{let l=r?.id;return l?jsx($o,{anchorOrigin:{vertical:"top",horizontal:"left"},children:jsxs(ao,{width:n,isDragging:p,"data-testid":`preview-multi-img-${l}`,...j().inUp,sx:o,children:[jsx(a$2,{disableDrag:t,...a,...s}),jsx(Pe,{imageView:!0,file:r}),jsx(Le,{sx:{position:"absolute",right:3,top:3,zIndex:1},children:e&&jsx(xo,{size:"small",label:"Remover arquivo",onClick:()=>e(r),icon:"DELETE_MARK_BUTTON_02"})})]})},`badge-${l}`):null},ho=memo(Xo);var Qo=({file:e$1,thumbnail:o,onRemove:r,sx:t,disableDrag:a$1=!1})=>{let s=e$1.size||0,n=e$1.name||e$1.id,p=e$1.id,l=typeof e$1=="string",x$1=a$1?70:80,{attributes:d,listeners:g,setNodeRef:I,transform:E,transition:A,isDragging:b}=useSortable({id:p,disabled:a$1}),C={transform:x.Transform.toString(E),transition:A,display:"inline-block",alignItems:"center",justifyContent:"center",width:`${x$1+8}px`,height:"68px"};return o&&e$1?jsx(Ge,{ref:I,style:C,children:jsx(ho,{innerWidth:x$1,isDragging:b,sx:t,file:e$1,disableDrag:a$1,attributes:d,listeners:g,onRemove:r})}):jsx(Ge,{ref:I,style:{...C,height:"80px",width:`${x$1+38}px`},children:jsxs(io,{width:x$1+30,isDragging:b,"data-testid":`preview-multi-img-${p}`,...j().inUp,sx:t,children:[jsx(a$2,{disableDrag:a$1,...d,...g}),e$1&&jsx(Pe,{file:e$1}),jsxs(ge,{flexGrow:1,sx:{width:"100%"},children:[jsx(a$3,{title:n,children:jsx(qe,{variant:"subtitle2",noWrap:!0,children:n})}),jsx(qe,{variant:"caption",sx:{color:"text.secondary"},children:l?"":e(s)})]}),jsx(Le,{children:r&&jsx(a,{size:"small",label:"Remover arquivo",onClick:()=>r(e$1),icon:"DELETE_MARK_BUTTON_02"})})]})})},bo=memo(Qo);var gr=({thumbnail:e,files:o,onRemove:r,onReorder:t,sx:a})=>{let s=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),n=useCallback(l=>{let{active:x,over:d}=l;if(!(!x||!d||x.id===d.id)&&t){let g=o.findIndex(({id:E})=>E===x.id),I=o.findIndex(({id:E})=>E===d.id);g!==-1&&I!==-1&&t(g,I,o);}},[o,t]),p=jsx(AnimatePresence,{initial:!1,children:o.map(l=>jsx(bo,{sx:a,id:`preview-file-${l.id}`,file:l,onRemove:r,thumbnail:e,disableDrag:!t},`preview-file-${l.id}`))});return t?jsx(DndContext,{sensors:s,collisionDetection:closestCenter,onDragEnd:n,modifiers:[restrictToHorizontalAxis,restrictToParentElement,restrictToWindowEdges],children:jsx(SortableContext,{items:o.map(l=>l.id),strategy:horizontalListSortingStrategy,children:p})}):p},Fe=memo(gr);var Eo=forwardRef(({onLoading:e,aspectRatio:o,cropSize:r,...t},a)=>{let{maxWidth:s,maxHeight:n}=useMemo(()=>r&&typeof r=="object"?{maxWidth:r.width,maxHeight:r.height}:r&&typeof r=="number"?{maxWidth:r,maxHeight:r}:{maxWidth:"100%",maxHeight:"100%"},[r]);a$1(()=>{e?.(!0);}),useLayoutEffect(()=>{typeof a=="object"&&a?.current?e?.(!a.current.complete):e?.(!1);},[a,e]);function p(){e?.(!1);}return jsx(po,{...t,maxWidth:s,maxHeight:n,ref:a,aspectRatio:o,onLoad:p,onError:p})});Eo.displayName="LoadingPreviewImage";var Ao=Eo;var br=({file:e,aspectRatio:o=1,isUploading:r,isLoading:t,onLoading:a,cropSize:s,maxWidth:n,maxHeight:p})=>{let l=useRef(null),x=e?.id||"",d=e?.name||"",g=URL.createObjectURL(e);return x?jsxs(lo,{className:"single-file-preview-box",children:[jsx(Ao,{className:"single-file-preview-img",aspectRatio:o,cropSize:s,isLoading:t,isUploading:r,alt:d,src:g,ref:l,loading:"lazy",onLoading:a,onLoad:()=>a?.(!1),onError:()=>a?.(!1),maxWidth:n,maxHeight:p},`image-preview-${x}`),jsx(mo,{className:"single-file-preview-bg",alt:d,src:g,isLoading:t,isUploading:r})]}):null},Ze=memo(br);var Er=["pdf"],Ar=["txt"],Fr=["psd"],wr=["doc","docx"],Dr=["xls","xlsx"],Rr=["zip","rar","iso"],_r=["ai","eps"],Sr=["ppt","pptx"],Tr=["wav","aif","mp3","aac"],Or=["jpg","jpeg","gif","bmp","png","svg","webp"],Ur=["m4v","avi","mpg","mp4","webm"];function He(e){let o,r=wo(e);return Ar.includes(r)?o="txt":Rr.includes(r)?o="zip":Tr.includes(r)?o="audio":Or.includes(r)?o="image":Ur.includes(r)?o="video":wr.includes(r)?o="word":Dr.includes(r)?o="excel":Sr.includes(r)?o="powerpoint":Er.includes(r)?o="pdf":Fr.includes(r)?o="photoshop":_r.includes(r)?o="illustrator":e?.startsWith("http")?o="image":o=wo(e),o}function Do(e){let o;switch(He(e)){case"folder":o="IC_FOLDER";break;case"txt":o="IC_TXT";break;case"zip":o="IC_ZIP";break;case"audio":o="IC_AUDIO";break;case"video":o="IC_VIDEO";break;case"word":o="IC_WORD";break;case"excel":o="IC_EXCEL";break;case"powerpoint":o="IC_POWER_POINT";break;case"pdf":o="IC_PDF";break;case"photoshop":o="IC_PTS";break;case"illustrator":o="IC_AI";break;case"image":o="IC_IMG";break;default:o="IC_FILE";}return o}function wo(e){return e&&e.split(".").pop()||""}function qi(e){return e.split("/").pop()}var Ce={root:"mnl__file__thumbnail__root",img:"mnl__file__thumbnail__img",icon:"mnl__file__thumbnail__icon",removeBtn:"mnl__file__thumbnail__remove__button",downloadBtn:"mnl__file__thumbnail__download__button"},Pe=({sx:e,file:o,tooltip:r,onRemove:t,imageView:a,slotProps:s,onDownload:n,...p})=>{let l=URL.createObjectURL(o),x=o?.name||"",g=o.type.startsWith("image/")?"image":He(l),I=jsx(Ee,{component:"img",src:l,className:Ce.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...s?.img}}),E=jsx(a$4,{icon:Do(g),sx:{width:32,height:32,flexShrink:0,...e}}),A=jsxs(ge,{component:"span",className:Ce.root,sx:{width:36,height:36,flexShrink:0,borderRadius:1.25,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...e},...p,children:[g==="image"&&a?I:E,t&&jsx(Lr,{onClick:t,className:Ce.removeBtn,sx:s?.removeBtn,children:jsx(a$4,{icon:"CLOSE_MARK_BUTTON",width:24})}),n&&jsx(Go,{onClick:n,className:Ce.downloadBtn,sx:s?.downloadBtn,size:"small",children:jsx(a$4,{icon:"ARROW_DOWN_CICLE",width:12})})]});return r?jsx(kr,{arrow:!0,title:x,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:A}):A};var aa=e=>e.startsWith("image/"),Ro=(e,o=.8)=>new Promise((r,t)=>{let a=document.createElement("canvas"),s=a.getContext("2d"),n=new Image;n.onload=()=>{a.width=n.width,a.height=n.height,s?(s.drawImage(n,0,0),a.toBlob(p=>{if(p){let l=new File([p],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});r(l);}else t(new Error("Falha ao converter para WebP"));},"image/webp",o)):t(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},n.onerror=()=>t(new Error("Falha ao carregar imagem")),n.src=URL.createObjectURL(e);});var jr=({onFilesSelect:e$1,onFileSelect:o,onReorder:r,onRemove:t,uploadFiles:a,filesPreview:s,dropzoneOptions:n,enableCrop:p=!1,customAspectRatio:l,convertToWebp:x=!0,cropSize:d,maxFiles:g})=>{let{showErrorMessage:I}=a$8(),E=useMemo(()=>l||(d&&typeof d!="number"?d.width/d.height:1),[l,d]),[A,b]=useState([]),[C,M]=useState(!1),[c,F]=useState(null),[P,T]=useState(null),[U,O]=useState(""),[u,m]=useState(!1),[w,v]=useState([]),[y,R]=useState(0),[N,z]=useState(0),ee=f=>{if(f.length<1)return;let h=f[0];F(h),R(L=>L+1);let D=new FileReader;D.onload=()=>{O(D.result),M(!0);},D.readAsDataURL(h);},oe=(f,h)=>{T(h);},ae=async f=>!c||!P?null:new Promise(h=>{let D=document.createElement("canvas"),L=D.getContext("2d"),H=new Image;H.onload=async()=>{let{width:fe,height:we,x:De,y:Mo}=P,Co=Math.abs(E),Re=fe,_e=we;d&&typeof d=="object"?(Re=d.width,_e=d.height):d&&typeof d=="number"&&(Re=d,_e=d/Co),D.width=Re,D.height=_e,L?(L.drawImage(H,De,Mo,fe,we,0,0,Re,_e),D.toBlob(async Je=>{if(Je){let We=new File([Je],c.name,{type:c.type,lastModified:Date.now()});if(x)try{We=await Ro(We);}catch(ko){I(ko,"Erro ao converter para WebP");}let Qe=We;Qe.id=f,h(Qe);}else h(null);},"image/png")):h(null);},H.src=U;}),pe=async()=>{if(!(!c||!P||w.length===0)){m(!0);try{let f=w[0],h=await ae(f.id);if(h){let L=await a([h]);L&&(!e$1&&!o&&b(H=>[...H,...L]),e$1?.([...s||[],...L]),o?.(h));}M(!1),m(!1),O(""),F(null);let D=w.slice(1);v(D),ee(D);}catch(f){I(f,"Erro ao processar imagem"),m(!1);}}},de=()=>{M(!1),m(!1),O(""),F(null),v([]),R(0),z(0);},me=async f=>{if(f.length===0)return;let h=Object.keys(n?.accept||{}).some(L=>L.includes("image/")),D=A.length+f.length;if(g&&D>g){I(new Error(`M\xE1ximo de ${g} arquivos`),"Erro ao fazer upload");return}try{if(h&&p){let H=f.filter(fe=>fe.type.startsWith("image/")).map((fe,we)=>{let De=fe;return De.id=`temp-crop-${Date.now()}-${we}`,De});z(H.length),R(0),v(H),ee(H);}else {let L=await a(f);L&&(!e$1&&!o&&b(H=>[...H,...L]),e$1?.([...s||[],...L]),o?.(L[0]));}}catch(L){I(L,"Erro ao processar arquivos");}},ce=f=>{if(!f.length)return;let h=f[0]?.errors[0]?.code,D=n?.maxSize||3145728;I(h==="file-too-large"?new Error(`O arquivo excede o tamanho m\xE1ximo de ${e(D)}`):h==="file-invalid-type"?new Error("Formato de arquivo n\xE3o suportado"):f[0]?.errors[0]||new Error("Erro ao enviar arquivo"),"Erro ao fazer upload");},{getRootProps:W,getInputProps:V,isDragActive:K,isDragReject:re,fileRejections:G}=useDropzone({onDrop:me,onDropRejected:ce,...n}),i=f=>{if(!f){t||b([]),t?.(void 0);return}let h=A.filter(D=>D.id!==f.id);t||b(h),t?.(f);},j=(f,h,D)=>{r?.(f,h,D);},Z=useRef("");return useEffect(()=>{let f=s?.map(h=>h.id).join(",")||"";f!==Z.current&&(Z.current=f,b(s||[]));},[s]),{file:A?.[0],files:A,aspectRatio:E,dropzoneProps:{getRootProps:W,getInputProps:V,isDragActive:K,isDragReject:re,fileRejections:G},cropState:{cropModalOpen:C,imagePreview:U,cropLoading:u,setCropModalOpen:M,onCropInitialized:oe,handleCropSave:pe,handleCropCancel:de,currentImageIndex:y,totalPendingImages:N},setInitialFiles:b,handleRemove:i,handleReorder:j}},X=jr;var $e=(i=>(i.APPLICATION_OCTET_STREAM="application/octet-stream",i.IMAGE_JPEG="image/jpeg",i.IMAGE_JPG="image/jpg",i.IMAGE_PNG="image/png",i.IMAGE_GIF="image/gif",i.IMAGE_WEBP="image/webp",i.IMAGE_SVG="image/svg+xml",i.IMAGE_BMP="image/bmp",i.IMAGE_TIFF="image/tiff",i.IMAGE_ICO="image/x-icon",i.IMAGE_AVIF="image/avif",i.APPLICATION_PDF="application/pdf",i.TEXT_PLAIN="text/plain",i.TEXT_CSV="text/csv",i.APPLICATION_RTF="application/rtf",i.APPLICATION_MSWORD="application/msword",i.APPLICATION_DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",i.APPLICATION_MSEXCEL="application/vnd.ms-excel",i.APPLICATION_XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",i.APPLICATION_MSPOWERPOINT="application/vnd.ms-powerpoint",i.APPLICATION_PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",i.APPLICATION_ODT="application/vnd.oasis.opendocument.text",i.APPLICATION_ODS="application/vnd.oasis.opendocument.spreadsheet",i.APPLICATION_ODP="application/vnd.oasis.opendocument.presentation",i.APPLICATION_XML="application/xml",i.TEXT_XML="text/xml",i.TEXT_HTML="text/html",i.TEXT_CSS="text/css",i.APPLICATION_JSON="application/json",i.TEXT_JAVASCRIPT="text/javascript",i.APPLICATION_ZIP="application/zip",i.APPLICATION_GZIP="application/gzip",i.APPLICATION_RAR="application/vnd.rar",i.APPLICATION_7Z="application/x-7z-compressed",i.AUDIO_MPEG="audio/mpeg",i.AUDIO_WAV="audio/wav",i.AUDIO_OGG="audio/ogg",i.AUDIO_WEBM="audio/webm",i.AUDIO_AAC="audio/aac",i.VIDEO_MP4="video/mp4",i.VIDEO_MPEG="video/mpeg",i.VIDEO_OGG="video/ogg",i.VIDEO_WEBM="video/webm",i.VIDEO_QUICKTIME="video/quicktime",i))($e||{}),ke=(e=>(e["application/octet-stream"]="APPLICATION_OCTET_STREAM",e["image/jpeg"]="IMAGE_JPEG",e["image/jpg"]="IMAGE_JPG",e["image/png"]="IMAGE_PNG",e["image/gif"]="IMAGE_GIF",e["image/webp"]="IMAGE_WEBP",e["image/svg+xml"]="IMAGE_SVG",e["image/bmp"]="IMAGE_BMP",e["image/tiff"]="IMAGE_TIFF",e["image/x-icon"]="IMAGE_ICO",e["image/avif"]="IMAGE_AVIF",e["application/pdf"]="APPLICATION_PDF",e["text/plain"]="TEXT_PLAIN",e["text/csv"]="TEXT_CSV",e["application/rtf"]="APPLICATION_RTF",e["application/msword"]="APPLICATION_MSWORD",e["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]="APPLICATION_DOCX",e["application/vnd.ms-excel"]="APPLICATION_MSEXCEL",e["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]="APPLICATION_XLSX",e["application/vnd.ms-powerpoint"]="APPLICATION_MSPOWERPOINT",e["application/vnd.openxmlformats-officedocument.presentationml.presentation"]="APPLICATION_PPTX",e["application/vnd.oasis.opendocument.text"]="APPLICATION_ODT",e["application/vnd.oasis.opendocument.spreadsheet"]="APPLICATION_ODS",e["application/vnd.oasis.opendocument.presentation"]="APPLICATION_ODP",e["application/xml"]="APPLICATION_XML",e["text/xml"]="TEXT_XML",e["text/html"]="TEXT_HTML",e["text/css"]="TEXT_CSS",e["application/json"]="APPLICATION_JSON",e["text/javascript"]="TEXT_JAVASCRIPT",e["application/zip"]="APPLICATION_ZIP",e["application/gzip"]="APPLICATION_GZIP",e["application/vnd.rar"]="APPLICATION_RAR",e["application/x-7z-compressed"]="APPLICATION_7Z",e["audio/mpeg"]="AUDIO_MPEG",e["audio/wav"]="AUDIO_WAV",e["audio/ogg"]="AUDIO_OGG",e["audio/webm"]="AUDIO_WEBM",e["audio/aac"]="AUDIO_AAC",e["video/mp4"]="VIDEO_MP4",e["video/mpeg"]="VIDEO_MPEG",e["video/ogg"]="VIDEO_OGG",e["video/webm"]="VIDEO_WEBM",e["video/quicktime"]="VIDEO_QUICKTIME",e))(ke||{});var Xr=({createFilesMutation:e,filesDetails:o})=>{let{showErrorMessage:r,showSuccessMessage:t}=a$8(),[a,s]=useState(!1),[n,p]=useState(!1),[l,x]=useState(null),[d,g]=useState([]),I=useMemo(()=>d?.[0],[d]),E=n||a,A=useCallback(async c=>{if(!c.length){g([]),p(!1);return}p(!0);try{let P=(await Promise.all(c.map(async({url:T,id:U,name:O})=>{try{if(!T)return null;let u=await fetch(T);if(!u.ok)throw new Error(u.statusText);let m=await u.blob(),w=null;if(!O){let R=u.headers.get("content-disposition")||void 0;if(R){let N=R.match(/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i),z=N?.[1]||N?.[2];if(z)try{w=decodeURIComponent(z);}catch{w=z;}}}let v=w||O||U,y=new File([m],v,{type:m.type});return y.id=U,y.url=T,y}catch{return null}}))).filter(Boolean);g(P),p(!1);}catch(F){r(F,"Erro ao carregar arquivos"),g([]),p(!1);}},[r]),b=useRef("");useEffect(()=>{let c=o?.map(({id:F})=>F).join(",")||"";c!==b.current&&(async()=>(b.current=c,await A(o)))();},[o,A]);let C=async c=>{if(!c||!Array.isArray(c))throw new Error("Arquivos inv\xE1lidos");let F=c.filter(P=>P instanceof File);if(F?.length){s(!0);try{let P=F.map(u=>{let m=u.type||"application/octet-stream",w=ke[m];if(!w)throw new Error(`Tipo de arquivo n\xE3o suportado: ${m}`);return {file:u,mimeType:m,contentTypeEnum:w}}),T=await e({files:P.map(({file:u,contentTypeEnum:m})=>({content_type:m,name:u.name}))}).unwrap(),U=T.files.map((u,m)=>{let v=P[m].file;return v.id=u.id,v.url=u.url,v});return (await Promise.all(T.files.map((u,m)=>{let{mimeType:w}=P[m],v=U[m];return fetch(u.url,{method:"PUT",headers:{"Content-Type":w,"Content-Disposition":`inline; filename="${v.name}"`,"X-File-Id":u.id},body:v})}))).forEach(u=>{if(!u.ok)throw new Error(`Erro no upload: ${u.statusText}`)}),t("Imagem adicionada com sucesso"),U}catch(P){throw x(P),r(P,"Erro no upload"),P}finally{s(!1);}}},M=useMemo(()=>l&&l instanceof Error?l.message:l,[l]);return {setFilesPreview:g,uploadFiles:C,filesPreview:d,filePreview:I,isLoadingPreview:n,isUploadingFiles:a,isUploadOrLoadingFiles:E,uploadErrorText:M}},q=Xr;var Vr=({sx:e,id:o,name:r,tabIndex:t,uploading:a,getRootProps:s,getInputProps:n,isDragActive:p,isError:l,disabled:x,dropZoneSxProps:d,dropZoneContent:g,children:I,...E})=>jsxs(ye,{children:[a&&jsx(a$7,{"data-testid":"uploading-progress-bar",sx:{zIndex:1}}),jsxs(Ee,{sx:{width:1,position:"relative",...e},children:[jsxs(ro,{...s(),"data-testid":"drop-zone-styled-area",isError:l,isDragActive:p,disabled:!!x,sx:d,...E,children:[jsx("input",{...n(),id:o,tabIndex:t,name:r}),g]}),I]})]}),ne=Vr;var Qr=({header:e,description:o,sx:r,...t})=>jsxs(ge,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...r},...t,children:[jsx(a$5,{sx:{width:220}}),jsxs("div",{children:[jsx(qe,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),jsx(qe,{variant:"body2",sx:{color:"text.secondary"},children:o||jsxs(Fragment,{children:["Solte os arquivos aqui ou clique",jsx(qe,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua m\xE1quina"]})})]})]}),se=memo(Qr);var tt=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:a=[],id:s,disabled:n,error:p,helperText:l,thumbnail:x,dropZoneSxProps:d,uploading:g,tabIndex:I,maxFiles:E,placeholderAlt:A,placeholderProps:b,...C})=>{let{filesPreview:M,isUploadOrLoadingFiles:c,uploadErrorText:F,uploadFiles:P}=q({createFilesMutation:t,filesDetails:a}),{files:T,dropzoneProps:U,handleRemove:O,handleReorder:u}=X({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:M,dropzoneOptions:{multiple:!0,disabled:n,...C},maxFiles:E,uploadFiles:P}),{getRootProps:m,getInputProps:w,isDragActive:v,isDragReject:y}=U,R=!!T?.filter(z=>!!z.id).length,N=y||!!p||!!F;return jsxs(ne,{id:s,uploading:g||c,disabled:n,dropZoneSxProps:d,tabIndex:I,getRootProps:m,getInputProps:w,isDragActive:v,isError:N,dropZoneContent:jsx(Fragment,{children:A?jsx(ge,{children:A}):jsx(se,{header:b?.header,description:b?.description})}),children:[jsx(_,{disabled:n,helperText:l,isError:N}),p?jsx(_,{helperText:p,isError:!0}):null,F?jsx(_,{helperText:F,isError:!0}):null,R&&jsx(Ee,{sx:{my:3},children:jsx(Fe,{files:T,thumbnail:!!x,onRemove:e?O:void 0,onReorder:o?u:void 0})})]})},it=memo(tt);var mt=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:a=[],id:s,disabled:n,error:p,helperText:l,dropZoneSxProps:x,placeholderProps:d,placeholderAlt:g,uploading:I,tabIndex:E,maxFiles:A,aspectRatio:b,enableCrop:C=!0,convertToWebp:M=!0,cropSize:c,name:F,label:P,...T})=>{let{filesPreview:U,isUploadOrLoadingFiles:O,uploadErrorText:u,uploadFiles:m}=q({createFilesMutation:t,filesDetails:a}),w=I||O,{files:v,dropzoneProps:y,cropState:R,aspectRatio:N,handleRemove:z,handleReorder:ee}=X({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:U,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!0,disabled:n,...T},enableCrop:C,customAspectRatio:b,convertToWebp:M,maxFiles:A,cropSize:c,uploadFiles:m}),{getRootProps:oe,getInputProps:ae,isDragActive:pe,isDragReject:de}=y,{cropModalOpen:me,imagePreview:ce,cropLoading:W,onCropInitialized:V,handleCropSave:K,handleCropCancel:re,currentImageIndex:G,totalPendingImages:i}=R,j=!!v?.filter(h=>!!h.id).length,Z=de||!!p||!!u,f=useMemo(()=>{let h=P??"Ajustar Imagem",D=i>1||G>1?` (${G} de ${i})`:"";return `${h}${D}`},[P,i,G]);return jsxs(ne,{id:s,name:F,uploading:w,disabled:n,dropZoneSxProps:x,tabIndex:E,getRootProps:oe,getInputProps:ae,isDragActive:pe,isError:Z,dropZoneContent:jsx(Fragment,{children:g?jsx(ge,{children:g}):jsx(se,{header:d?.header,description:d?.description})}),children:[jsx(_,{disabled:n,helperText:l,isError:Z}),p?jsx(_,{helperText:p,isError:!0}):null,u?jsx(_,{helperText:u,isError:!0}):null,j&&jsx(Ee,{sx:{my:3,ml:.5},children:jsx(Fe,{files:v,thumbnail:!0,onRemove:z,onReorder:o?ee:void 0})}),jsx(a$6,{open:me,onClose:re,label:f,imageSrc:ce,aspectRatio:N,onInitialized:V,onSave:K,loading:W,cropSize:c})]})},ct=memo(mt);var It=({onFileSelect:e$1,onRemove:o,createFilesMutation:r,fileDetails:t,id:a,disabled:s,error:n,helperText:p,sx:l,dropZoneSxProps:x,uploading:d,tabIndex:g,...I})=>{let{filesPreview:E,isUploadOrLoadingFiles:A,uploadErrorText:b,uploadFiles:C}=q({createFilesMutation:r,filesDetails:t?[t]:[]}),M=A||d,{file:c,dropzoneProps:F,handleRemove:P}=X({uploadFiles:C,onFileSelect:e$1,onRemove:o,filesPreview:E,dropzoneOptions:{multiple:!1,disabled:s,...I}}),{getRootProps:T,getInputProps:U,isDragActive:O,isDragReject:u}=F,m$1=useCallback(R=>{R.stopPropagation(),P(c||void 0);},[c,P]),w=!!c,v=typeof c=="string",y=u||!!n||!!b;return jsxs(ne,{id:a,uploading:M,disabled:s,dropZoneSxProps:x,tabIndex:g,getRootProps:T,getInputProps:U,isDragActive:O,isError:y,dropZoneContent:jsxs(Fragment,{children:[!w&&jsx(se,{}),w&&jsxs(ge,{component:m.div,...j().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:R=>`solid 1px ${R.palette.divider}`,...l},children:[jsx(Pe,{file:c}),jsxs(ge,{flexGrow:1,sx:{minWidth:0},children:[jsx(qe,{variant:"subtitle2",noWrap:!0,children:v?c:c.name}),jsx(qe,{variant:"caption",sx:{color:"text.secondary"},children:v?"":e(c.size)})]}),o&&jsx(a$3,{title:"Remover arquivo",children:jsx(to,{edge:"end",size:"small",disabled:s,"aria-label":"Remover arquivo",onClick:m$1,children:jsx(a$4,{icon:"DELETE_MARK_BUTTON_02",width:16})})})]})]}),children:[jsx(_,{disabled:s,helperText:p,isError:y}),n?jsx(_,{helperText:n,isError:!0}):null,b?jsx(_,{helperText:b,isError:!0}):null]})},Pt=memo(It);var Dt=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,id:a,disabled:s,error:n,helperText:p,dropZoneSxProps:l,placeholderProps:x,placeholderAlt:d,uploading:g,tabIndex:I,aspectRatio:E,enableCrop:A=!0,convertToWebp:b=!0,name:C,label:M,cropSize:c,sx:F,maxWidth:P,maxHeight:T,...U})=>{let{filesPreview:O,isUploadOrLoadingFiles:u,uploadErrorText:m,uploadFiles:w}=q({createFilesMutation:r,filesDetails:t?[t]:[]}),[v,y]=useState(!1),{file:R,dropzoneProps:N,cropState:z,handleRemove:ee,aspectRatio:oe}=X({onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:s,...U},filesPreview:O,enableCrop:A,customAspectRatio:E,convertToWebp:b,cropSize:c,uploadFiles:w}),{getRootProps:ae,getInputProps:pe,isDragActive:de,isDragReject:me}=N,{cropModalOpen:ce,imagePreview:W,cropLoading:V,onCropInitialized:K,handleCropSave:re,handleCropCancel:G}=z,i=useCallback(()=>{ee(R||void 0);},[R,ee]),j=!!R,Z=me||!!n||!!m,f=g||u,h=j?{opacity:0}:{opacity:1},D=l?.width;return useEffect(()=>{j||y(!1);},[j]),jsxs(ye,{sx:{...F,...D&&{width:D}},children:[(f||v)&&jsx(a$7,{}),jsxs(ne,{id:a,uploading:f,disabled:s,dropZoneSxProps:l,tabIndex:I,getRootProps:ae,getInputProps:pe,isDragActive:de,isError:Z,name:C,dropZoneContent:jsxs(Fragment,{children:[d?jsx(ge,{sx:h,children:d}):jsx(se,{sx:h,header:x?.title,description:x?.description}),j&&jsx(Ze,{file:R,cropSize:c,isLoading:v,isUploading:f,onLoading:y,aspectRatio:oe,maxWidth:P,maxHeight:T})]}),children:[jsx(_,{disabled:s,helperText:p,isError:Z}),n?jsx(_,{helperText:n,isError:!0}):null,m?jsx(_,{helperText:m,isError:!0}):null,j&&e&&jsx(no,{size:"small",onClick:i,disabled:s,label:"Remover arquivo",children:jsx(a$4,{icon:"DELETE_MARK_BUTTON_02",width:16})}),jsx(a$6,{open:ce,onClose:G,label:M??"Ajustar Imagem",imageSrc:W,aspectRatio:oe,onInitialized:K,onSave:re,loading:V,cropSize:c})]})]})},Rt=memo(Dt);var Lt=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,disabled:a,label:s,id:n,tabIndex:p,error:l,helperText:x,sx:d,name:g,maxSize:I,uploading:E,aspectRatio:A=1,enableCrop:b=!0,convertToWebp:C=!0,cropSize:M,...c})=>{let[F,P]=useState(!1),{filesPreview:T,isUploadOrLoadingFiles:U,uploadErrorText:O,uploadFiles:u}=q({createFilesMutation:r,filesDetails:t?[t]:[]}),{file:m,dropzoneProps:w,cropState:v,handleRemove:y}=X({filesPreview:T,onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:a,maxSize:I,...c},enableCrop:b,customAspectRatio:A,convertToWebp:C,cropSize:M,uploadFiles:u}),{getRootProps:R,getInputProps:N,isDragActive:z,isDragReject:ee}=w,{cropModalOpen:oe,imagePreview:ae,cropLoading:pe,onCropInitialized:de,handleCropSave:me,handleCropCancel:ce}=v,W=ee||!!l||!!O,V=F||U||E,K=!!e,re=useRef(t?.url||""),G=useRef();useEffect(()=>{if(!m){re.current="",G.current=void 0;return}if(G.current===m.id)return;G.current=m.id,P(!0);let Z=URL.createObjectURL(m);return re.current=Z,()=>{URL.revokeObjectURL(Z);}},[m]);let i=()=>{P(!1);},j=useCallback(()=>K&&m?()=>y(m):R().onClick,[K,m,R,y]);return jsxs(Fragment,{children:[jsxs(ge,{sx:{alignItems:"center"},children:[jsxs(uo,{sx:d,isError:W,isDragActive:z,hasFile:!!m,...R(),onClick:j(),children:[jsxs(co,{children:[V&&jsx(go,{children:jsx(yt,{size:135,thickness:2,color:"primary"})}),m&&jsx(fo,{alt:"Avatar Preview",src:re.current,onLoad:i,...V&&{sx:{filter:"blur(5px) !important",scale:1.2,opacity:.7}}}),!m&&!V&&jsxs(je,{isError:W,hasFile:!1,children:[jsx(a$4,{icon:"ADD_IMAGE",width:32}),jsx(qe,{variant:"caption",textAlign:"center",sx:{color:W?"error.main":"text.disabled"},children:"Adicionar foto"})]}),m&&!V&&jsxs(je,{isError:W,hasFile:!0,children:[jsx(a$4,{icon:K?"DELETE_MARK_BUTTON_02":"ADD_IMAGE",width:32}),jsx(qe,{variant:"caption",textAlign:"center",sx:{color:W?"error.main":"common.white"},children:K?"Remover foto":"Alterar foto"})]})]}),jsx("input",{name:g,id:n,tabIndex:p,...N()})]}),jsx(ge,{sx:{alignItems:"center",mt:-.5},children:jsx(_,{helperText:x,disabled:a,isError:W})}),O?jsx(_,{helperText:O,isError:!0}):null,l?jsx(_,{helperText:l,isError:!0}):null]}),oe&&ae&&jsx(a$6,{open:oe,onClose:ce,label:s??"Ajustar Imagem",imageSrc:ae,aspectRatio:A,onInitialized:de,onSave:me,loading:pe,cropSize:M,cropShape:"round"})]})},Mt=memo(Lt);var Nt=({error:e,name:o,disabled:r,sx:t,...a})=>{let{getRootProps:s,getInputProps:n,isDragActive:p,isDragReject:l}=useDropzone({disabled:r,...a}),x=l||e;return jsxs(so,{...s(),isDragActive:p,hasError:!!x,disabled:!!r,sx:t,"data-testid":"upload-box",children:[jsx("input",{name:o,...n()}),"Selecionar arquivo"]})},Bt=memo(Nt);
37
37
 
38
38
  export { $e as ContentType, ke as FileContentType, Pe as FileThumbnail, _ as HelperText, Fe as MultiFilePreview, it as MultipleFileUpload, ct as MultipleImageUpload, Ze as SingleFilePreview, Pt as SingleFileUpload, Rt as SingleImageUpload, Mt as UploadAvatar, Bt as UploadSimpleBox, Ro as convertToWebP, He as fileFormat, qi as fileNameByUrl, Do as fileThumb, Ce as fileThumbnailClasses, wo as fileTypeByUrl, aa as isImageFile, X as useDropzoneUploader, q as useFileUploadService };
@@ -1,14 +1,14 @@
1
- import { a as a$2 } from '../../chunk-2OZIFMY6.js';
2
1
  import { a } from '../../chunk-CFD2VTQ3.js';
3
2
  import { a as a$1 } from '../../chunk-26GV7WKC.js';
4
- import { a as a$3 } from '../../chunk-UZ4KBLZU.js';
3
+ import { a as a$2 } from '../../chunk-UZ4KBLZU.js';
5
4
  import '../../chunk-6PEJXOLM.js';
5
+ import H from '@mui/material/IconButton';
6
6
  import r from '@mui/material/Stack';
7
7
  import d from '@mui/material/Typography';
8
- import L from '@mui/material/Button';
8
+ import R from '@mui/material/Button';
9
9
  import { styled, alpha } from '@mui/material/styles';
10
10
  import { jsxs, jsx } from 'react/jsx-runtime';
11
11
 
12
- var g=styled(r)(({theme:t})=>({backgroundColor:"#fff",maxWidth:300,flex:1,borderRight:`1px solid ${t.palette.grey[200]}`,[t.breakpoints.down("md")]:{display:"none"}})),S=styled(r)({position:"sticky",top:"calc(var(--sticky-header-height, 64px))",height:"calc(100vh - var(--sticky-header-height, 64px))"}),b=styled(r)(({theme:t})=>({flex:1,width:"100%",[t.breakpoints.up("md")]:{maxWidth:"calc(100% - 300px)"}})),k=styled(r)(({theme:t})=>({position:"sticky",top:"var(--sticky-header-height, 64px)",flexDirection:"row",alignItems:"center",backgroundColor:"#fff",zIndex:999,width:"100%",padding:"12px 24px",height:64,gap:12,borderBottom:`1px solid ${t.palette.grey[200]}`,[t.breakpoints.down("md")]:{padding:"14px 16px",gap:6}})),y=styled(L)(({theme:t})=>({height:50,background:"none",fontSize:13,fontWeight:400,justifyContent:"flex-start",padding:"12px 8px",color:t.palette.text.secondary,borderBottom:`1px dashed ${alpha(t.palette.grey[500],.2)}`,borderRadius:0,gap:4,"&:hover":{backgroundColor:"transparent"},"& .required":{color:t.palette.error.main}})),p=styled(r)(({theme:t})=>({flex:1,flexDirection:"row",alignItems:"center",gap:24,"&.header-left-content":{justifyContent:"flex-start",marginLeft:12},[t.breakpoints.down("md")]:{gap:8,flex:"initial","& button, & a":{display:"flex",textIndent:"-9999em",fontSize:0,minWidth:36,maxWidth:36,height:36,width:36,overflow:"hidden","& .MuiButton-icon":{margin:"auto"}},"&.header-left-content":{justifyContent:"flex-end",marginLeft:"auto",marginRight:-6,"& label":{marginRight:0},"& .MuiTypography-root":{display:"none"}}}})),u=styled(r)(({theme:t})=>({flex:1,width:"100%",padding:24,gap:24,alignItems:"center",overflow:"hidden",[t.breakpoints.down("md")]:{padding:"24px 16px"}})),C=styled(r)(({theme:t})=>({alignItems:"start",width:"100%",maxWidth:700,[t.breakpoints.down("md")]:{maxWidth:"100%"}})),w=styled(a)(({theme:t})=>({width:"100%",borderRadius:12,gap:12,[t.breakpoints.down("md")]:{padding:"24px 16px"}})),v=styled(d)(({theme:t})=>({color:t.palette.grey[800],fontSize:18,fontWeight:700})),T=styled(d)(({theme:t})=>({color:t.palette.grey[500],fontSize:14,fontWeight:400,paddingBottom:24}));var z=({title:t,subtitle:l,sections:c,headerLeftContent:W,headerRightContent:B,onClickBack:I})=>jsxs(r,{direction:"row",flex:1,children:[jsx(g,{id:"frame-skeleton-left-box",children:jsx(S,{children:jsx(a$1,{fillContent:!0,sx:{p:3},children:jsxs(r,{gap:1.5,children:[jsx(d,{variant:"overline",color:"text.disabled",fontWeight:700,pl:1,children:"ACESSO R\xC1PIDO"}),jsx(r,{children:c.map(o=>jsxs(y,{onClick:()=>{o.ref.current&&o.ref.current.scrollIntoView({block:"center",behavior:"smooth"});},children:[o.title,o.isRequired&&jsx("span",{className:"required",children:"*"})]},o.title))})]})})})}),jsxs(b,{children:[jsxs(k,{children:[jsx(a$2,{color:"inherit",onClick:()=>I(),label:"Voltar","data-testid":"backToPreviousPage",children:jsx(a$3,{icon:"CHEVRON_LEFT"})}),jsxs(r,{overflow:"hidden",children:[jsx(d,{variant:"subtitle1",noWrap:!0,component:"div",children:t}),l&&jsx(d,{variant:"caption",color:"text.secondary",noWrap:!0,component:"div",children:l})]}),jsx(p,{className:"header-left-content",children:W}),jsx(p,{justifyContent:"flex-end",color:"text.secondary",children:B})]}),jsx(u,{children:c.map((o,R)=>jsxs(C,{id:`section-${R}`,children:[jsx(v,{ref:o.ref,children:o.title}),jsx(T,{children:o.subTitle}),jsx(w,{children:o.child})]},o.title))})]})]}),_=z;
12
+ var h=styled(r)(({theme:t})=>({backgroundColor:"#fff",maxWidth:300,flex:1,borderRight:`1px solid ${t.palette.grey[200]}`,[t.breakpoints.down("md")]:{display:"none"}})),g=styled(r)({position:"sticky",top:"calc(var(--sticky-header-height, 64px))",height:"calc(100vh - var(--sticky-header-height, 64px))"}),S=styled(r)(({theme:t})=>({flex:1,width:"100%",[t.breakpoints.up("md")]:{maxWidth:"calc(100% - 300px)"}})),b=styled(r)(({theme:t})=>({position:"sticky",top:"var(--sticky-header-height, 64px)",flexDirection:"row",alignItems:"center",backgroundColor:"#fff",zIndex:999,width:"100%",padding:"12px 24px",height:64,gap:12,borderBottom:`1px solid ${t.palette.grey[200]}`,[t.breakpoints.down("md")]:{padding:"14px 16px",gap:6}})),k=styled(R)(({theme:t})=>({height:50,background:"none",fontSize:13,fontWeight:400,justifyContent:"flex-start",padding:"12px 8px",color:t.palette.text.secondary,borderBottom:`1px dashed ${alpha(t.palette.grey[500],.2)}`,borderRadius:0,gap:4,"&:hover":{backgroundColor:"transparent"},"& .required":{color:t.palette.error.main}})),p=styled(r)(({theme:t})=>({flex:1,flexDirection:"row",alignItems:"center",gap:24,"&.header-left-content":{justifyContent:"flex-start",marginLeft:12},[t.breakpoints.down("md")]:{gap:8,flex:"initial","& button, & a":{display:"flex",textIndent:"-9999em",fontSize:0,minWidth:36,maxWidth:36,height:36,width:36,overflow:"hidden","& .MuiButton-icon":{margin:"auto"}},"&.header-left-content":{justifyContent:"flex-end",marginLeft:"auto",marginRight:-6,"& label":{marginRight:0},"& .MuiTypography-root":{display:"none"}}}})),y=styled(r)(({theme:t})=>({flex:1,width:"100%",padding:24,gap:24,alignItems:"center",overflow:"hidden",[t.breakpoints.down("md")]:{padding:"24px 16px"}})),u=styled(r)(({theme:t})=>({alignItems:"start",width:"100%",maxWidth:700,[t.breakpoints.down("md")]:{maxWidth:"100%"}})),C=styled(a)(({theme:t})=>({width:"100%",borderRadius:12,gap:12,[t.breakpoints.down("md")]:{padding:"24px 16px"}})),w=styled(d)(({theme:t})=>({color:t.palette.grey[800],fontSize:18,fontWeight:700})),v=styled(d)(({theme:t})=>({color:t.palette.grey[500],fontSize:14,fontWeight:400,paddingBottom:24}));var z=({title:t,subtitle:l,sections:c,headerLeftContent:T,headerRightContent:W,onClickBack:B})=>jsxs(r,{direction:"row",flex:1,children:[jsx(h,{id:"frame-skeleton-left-box",children:jsx(g,{children:jsx(a$1,{fillContent:!0,sx:{p:3},children:jsxs(r,{gap:1.5,children:[jsx(d,{variant:"overline",color:"text.disabled",fontWeight:700,pl:1,children:"ACESSO R\xC1PIDO"}),jsx(r,{children:c.map(o=>jsxs(k,{onClick:()=>{o.ref.current&&o.ref.current.scrollIntoView({block:"center",behavior:"smooth"});},children:[o.title,o.isRequired&&jsx("span",{className:"required",children:"*"})]},o.title))})]})})})}),jsxs(S,{children:[jsxs(b,{children:[jsx(H,{color:"inherit",onClick:()=>B(),"data-testid":"backToPreviousPage","aria-label":"Voltar",children:jsx(a$2,{icon:"CHEVRON_LEFT"})}),jsxs(r,{overflow:"hidden",children:[jsx(d,{variant:"subtitle1",noWrap:!0,component:"div",children:t}),l&&jsx(d,{variant:"caption",color:"text.secondary",noWrap:!0,component:"div",children:l})]}),jsx(p,{className:"header-left-content",children:T}),jsx(p,{justifyContent:"flex-end",color:"text.secondary",children:W})]}),jsx(y,{children:c.map((o,I)=>jsxs(u,{id:`section-${I}`,children:[jsx(w,{ref:o.ref,children:o.title}),jsx(v,{children:o.subTitle}),jsx(C,{children:o.child})]},o.title))})]})]}),_=z;
13
13
 
14
14
  export { _ as default };
@@ -443,7 +443,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
443
443
  wordWrap?: csstype.Property.WordWrap | readonly NonNullable<csstype.Property.WordWrap | undefined>[] | readonly csstype.Property.WordWrap[] | undefined;
444
444
  writingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
445
445
  zIndex?: csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | readonly ((string & {}) | csstype.Globals | "auto")[] | undefined;
446
- zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ("reset" | (string & {}) | csstype.Globals | "normal")[] | undefined;
446
+ zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reset")[] | undefined;
447
447
  all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
448
448
  animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "auto" | "none" | "both" | "alternate" | "alternate-reverse" | "backwards" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
449
449
  animationRange?: csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | readonly (string | (string & {}))[] | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.5.22",
3
+ "version": "2.5.24",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",