@zydon/common 2.5.27 → 2.5.29
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.
- package/dist/chunk-466LOYA5.js +3 -0
- package/dist/{chunk-3S5SGWRS.js → chunk-53XEIC43.js} +1 -1
- package/dist/{chunk-5AJROVJD.js → chunk-7SKU3NUH.js} +1 -1
- package/dist/{chunk-PNFJN3EE.js → chunk-BFWHNERW.js} +1 -1
- package/dist/{chunk-IHCCEDHS.js → chunk-BV3JFD3O.js} +1 -1
- package/dist/chunk-DCUOXK2B.js +9 -0
- package/dist/{chunk-2ZUP7PZ5.js → chunk-EMDC26UP.js} +1 -1
- package/dist/{chunk-HO4XDY7B.js → chunk-EVFWCJPL.js} +2 -2
- package/dist/{chunk-PVFZ7PBA.js → chunk-FK5X3RF2.js} +1 -1
- package/dist/{chunk-77NPRDOB.js → chunk-JDFYC6PH.js} +1 -1
- package/dist/{chunk-UM466R7L.js → chunk-LHRWO6ZJ.js} +2 -2
- package/dist/{chunk-KZKIZOY3.js → chunk-LTN2ILRD.js} +1 -1
- package/dist/{chunk-7AL772IM.js → chunk-MXKBMF4Q.js} +3 -3
- package/dist/{chunk-H4V45IZF.js → chunk-NIC6MMFL.js} +1 -1
- package/dist/{chunk-4W4MN5ZB.js → chunk-O73VICMQ.js} +1 -1
- package/dist/chunk-WNIW5FQU.js +9 -0
- package/dist/{chunk-RPE2GB7J.js → chunk-ZCGDOEMG.js} +2 -2
- package/dist/components/ActionButton/index.js +3 -3
- package/dist/components/Autocomplete/index.js +3 -3
- package/dist/components/BuilderLayout/index.js +3 -3
- package/dist/components/BuilderSidebar/index.js +2 -2
- package/dist/components/Common/index.js +2 -2
- package/dist/components/DataView/index.js +3 -3
- package/dist/components/DragButton/index.js +3 -3
- package/dist/components/Drawer/index.js +2 -2
- package/dist/components/EasyCropModal/index.js +4 -4
- package/dist/components/Error/index.js +2 -2
- package/dist/components/ExpandableGroup/index.js +2 -2
- package/dist/components/FileUpload/index.d.ts +2 -1
- package/dist/components/FileUpload/index.js +14 -14
- package/dist/components/FrameSkeleton/index.js +2 -2
- package/dist/components/HelpButton/index.js +3 -3
- package/dist/components/Icon/index.js +2 -2
- package/dist/components/IconButton/index.js +3 -3
- package/dist/components/ImageCropModal/index.js +4 -4
- package/dist/components/Incrementer/index.js +3 -3
- package/dist/components/InfoCircle/index.js +2 -2
- package/dist/components/ListBundles/index.js +3 -3
- package/dist/components/MenuItem/index.js +2 -2
- package/dist/components/Modal/index.js +3 -3
- package/dist/components/MoreMenu/index.js +2 -2
- package/dist/components/PasswordRules/index.js +2 -2
- package/dist/components/PopoverSelect/index.js +2 -2
- package/dist/components/SearchInput/index.js +3 -3
- package/dist/components/SelectableCards/index.js +4 -4
- package/dist/components/SeoPreview/index.js +2 -2
- package/dist/components/Steps/index.js +2 -2
- package/dist/components/StyledTab/index.js +2 -2
- package/dist/components/SwapList/index.js +3 -3
- package/dist/components/WebhookCard/index.js +2 -2
- package/dist/components/carousel/index.js +3 -3
- package/dist/components/form/Address/index.js +4 -4
- package/dist/components/form/Autocomplete/index.js +4 -4
- package/dist/components/form/Incrementer/index.js +3 -3
- package/dist/components/form/Password/index.js +2 -2
- package/dist/components/form/SelectableCards/index.js +4 -4
- package/dist/components/form/UploadAvatarWithCrop/index.js +5 -5
- package/dist/components/form/UploadWithCrop/index.js +6 -6
- package/dist/components/form/Webhook/index.js +5 -5
- package/dist/components/lightbox/index.js +2 -2
- package/dist/components/upload/index.js +7 -7
- package/dist/types/icon.d.ts +2 -0
- package/dist/types/icon.js +1 -1
- package/package.json +2 -1
- package/dist/chunk-I442MRGD.js +0 -11
- package/dist/chunk-YRQGL6TR.js +0 -9
- package/dist/chunk-YTFGIQHB.js +0 -3
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { a as a$5 } from '../../chunk-H5L4ARDB.js';
|
|
2
|
-
import { a } from '../../chunk-
|
|
2
|
+
import { a } from '../../chunk-DCUOXK2B.js';
|
|
3
3
|
import { e } from '../../chunk-ANAHA3L6.js';
|
|
4
4
|
import { a as a$3 } from '../../chunk-2FXBVVBD.js';
|
|
5
|
-
import { a as a$6 } from '../../chunk-
|
|
5
|
+
import { a as a$6 } from '../../chunk-7SKU3NUH.js';
|
|
6
6
|
import '../../chunk-7AZX7L27.js';
|
|
7
|
-
import '../../chunk-
|
|
8
|
-
import { a as a$2 } from '../../chunk-
|
|
7
|
+
import '../../chunk-FK5X3RF2.js';
|
|
8
|
+
import { a as a$2 } from '../../chunk-EMDC26UP.js';
|
|
9
9
|
import { x } from '../../chunk-2P4CXK3O.js';
|
|
10
10
|
import { a as a$7 } from '../../chunk-FK7DDO5L.js';
|
|
11
11
|
import { j } from '../../chunk-DMQW3LDF.js';
|
|
12
|
-
import { a as a$4 } from '../../chunk-
|
|
13
|
-
import '../../chunk-
|
|
12
|
+
import { a as a$4 } from '../../chunk-WNIW5FQU.js';
|
|
13
|
+
import '../../chunk-466LOYA5.js';
|
|
14
14
|
import '../../chunk-ILHUUK4X.js';
|
|
15
15
|
import { a as a$1 } from '../../chunk-S7QQBC4I.js';
|
|
16
16
|
import { a as a$8 } from '../../chunk-GFJT57TO.js';
|
|
17
17
|
import { memo, forwardRef, useMemo, useLayoutEffect, useCallback, useRef, useState, useEffect } from 'react';
|
|
18
|
-
import
|
|
18
|
+
import Bo from '@mui/material/FormHelperText';
|
|
19
19
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
20
20
|
import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter } from '@dnd-kit/core';
|
|
21
21
|
import { restrictToHorizontalAxis, restrictToParentElement, restrictToWindowEdges } from '@dnd-kit/modifiers';
|
|
@@ -24,15 +24,15 @@ import { m, AnimatePresence } from 'framer-motion';
|
|
|
24
24
|
import ge from '@mui/material/Stack';
|
|
25
25
|
import qe from '@mui/material/Typography';
|
|
26
26
|
import Ee from '@mui/material/Box';
|
|
27
|
-
import
|
|
28
|
-
import
|
|
27
|
+
import jo from '@mui/material/IconButton';
|
|
28
|
+
import Zo from '@mui/material/Paper';
|
|
29
29
|
import { styled, alpha } from '@mui/material/styles';
|
|
30
30
|
import $o from '@mui/material/Badge';
|
|
31
|
-
import
|
|
32
|
-
import
|
|
31
|
+
import Mr from '@mui/material/ButtonBase';
|
|
32
|
+
import zr from '@mui/material/Tooltip';
|
|
33
33
|
import { useDropzone } from 'react-dropzone';
|
|
34
|
-
import
|
|
34
|
+
import Lt 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?.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);
|
|
36
|
+
var Wo=({helperText:e,disabled:o,isError:r})=>e?jsx(Bo,{error:r,sx:t=>({mx:"14px",color:o?t.palette.grey[500]:void 0}),children:e}):null,S=memo(Wo);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(jo)(({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:n,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",...n||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(Zo)(({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:n})=>({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"},...n&&{...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 qo=({onRemove:e,sx:o,file:r,disableDrag:t,attributes:n,listeners:s,innerWidth:a,isDragging:l})=>{let p=r?.id;return p?jsx($o,{anchorOrigin:{vertical:"top",horizontal:"left"},children:jsxs(ao,{width:a,isDragging:l,"data-testid":`preview-multi-img-${p}`,...j().inUp,sx:o,children:[jsx(a$2,{disableDrag:t,...n,...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-${p}`):null},ho=memo(qo);var Yo=({file:e$1,thumbnail:o,onRemove:r,sx:t,disableDrag:n=!1})=>{let s=e$1.size||0,a$1=e$1.name||e$1.id,l=e$1.id,p=typeof e$1=="string",c=n?70:80,{attributes:d,listeners:x$1,setNodeRef:I,transform:v,transition:F,isDragging:A}=useSortable({id:l,disabled:n}),M={transform:x.Transform.toString(v),transition:F,display:"inline-block",alignItems:"center",justifyContent:"center",width:`${c+8}px`,height:"68px"};return o&&e$1?jsx(Ge,{ref:I,style:M,children:jsx(ho,{innerWidth:c,isDragging:A,sx:t,file:e$1,disableDrag:n,attributes:d,listeners:x$1,onRemove:r})}):jsx(Ge,{ref:I,style:{...M,height:"80px",width:`${c+38}px`},children:jsxs(io,{width:c+30,isDragging:A,"data-testid":`preview-multi-img-${l}`,...j().inUp,sx:t,children:[jsx(a$2,{disableDrag:n,...d,...x$1}),e$1&&jsx(Pe,{file:e$1}),jsxs(ge,{flexGrow:1,sx:{width:"100%"},children:[jsx(a$3,{title:a$1,children:jsx(qe,{variant:"subtitle2",noWrap:!0,children:a$1})}),jsx(qe,{variant:"caption",sx:{color:"text.secondary"},children:p?"":e(s)})]}),jsx(Le,{children:r&&jsx(a,{size:"small",label:"Remover arquivo",onClick:()=>r(e$1),icon:"DELETE_MARK_BUTTON_02"})})]})})},bo=memo(Yo);var ur=({thumbnail:e,files:o,onRemove:r,onReorder:t,sx:n})=>{let s=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),a=useCallback(p=>{let{active:c,over:d}=p;if(!(!c||!d||c.id===d.id)&&t){let x=o.findIndex(({id:v})=>v===c.id),I=o.findIndex(({id:v})=>v===d.id);x!==-1&&I!==-1&&t(x,I,o);}},[o,t]),l=jsx(AnimatePresence,{initial:!1,children:o.map(p=>jsx(bo,{sx:n,id:`preview-file-${p.id}`,file:p,onRemove:r,thumbnail:e,disableDrag:!t},`preview-file-${p.id}`))});return t?jsx(DndContext,{sensors:s,collisionDetection:closestCenter,onDragEnd:a,modifiers:[restrictToHorizontalAxis,restrictToParentElement,restrictToWindowEdges],children:jsx(SortableContext,{items:o.map(p=>p.id),strategy:horizontalListSortingStrategy,children:l})}):l},Ae=memo(ur);var Eo=forwardRef(({onLoading:e,aspectRatio:o,cropSize:r,...t},n)=>{let{maxWidth:s,maxHeight:a}=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 n=="object"&&n?.current?e?.(!n.current.complete):e?.(!1);},[n,e]);function l(){e?.(!1);}return jsx(po,{...t,maxWidth:s,maxHeight:a,ref:n,aspectRatio:o,onLoad:l,onError:l})});Eo.displayName="LoadingPreviewImage";var Fo=Eo;var vr=({file:e,aspectRatio:o=1,isUploading:r,isLoading:t,onLoading:n,cropSize:s,maxWidth:a,maxHeight:l})=>{let p=useRef(null),c=e?.id||"",d=e?.name||"",x=URL.createObjectURL(e);return c?jsxs(lo,{className:"single-file-preview-box",children:[jsx(Fo,{className:"single-file-preview-img",aspectRatio:o,cropSize:s,isLoading:t,isUploading:r,alt:d,src:x,ref:p,loading:"lazy",onLoading:n,onLoad:()=>n?.(!1),onError:()=>n?.(!1),maxWidth:a,maxHeight:l},`image-preview-${c}`),jsx(mo,{className:"single-file-preview-bg",alt:d,src:x,isLoading:t,isUploading:r})]}):null},Ze=memo(vr);var Fr=["pdf"],Ar=["txt"],wr=["psd"],Dr=["doc","docx"],Rr=["xls","xlsx"],_r=["zip","rar","iso"],Sr=["ai","eps"],Tr=["ppt","pptx"],Or=["wav","aif","mp3","aac"],Ur=["jpg","jpeg","gif","bmp","png","svg","webp"],yr=["m4v","avi","mpg","mp4","webm"];function He(e){let o,r=wo(e);return Ar.includes(r)?o="txt":_r.includes(r)?o="zip":Or.includes(r)?o="audio":Ur.includes(r)?o="image":yr.includes(r)?o="video":Dr.includes(r)?o="word":Rr.includes(r)?o="excel":Tr.includes(r)?o="powerpoint":Fr.includes(r)?o="pdf":wr.includes(r)?o="photoshop":Sr.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 Vi(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:n,slotProps:s,onDownload:a,...l})=>{let p=URL.createObjectURL(o),c=o?.name||"",x=o.type.startsWith("image/")?"image":He(p),I=jsx(Ee,{component:"img",src:p,className:Ce.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...s?.img}}),v=jsx(a$4,{icon:Do(x),sx:{width:32,height:32,flexShrink:0,...e}}),F=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},...l,children:[x==="image"&&n?I:v,t&&jsx(Mr,{onClick:t,className:Ce.removeBtn,sx:s?.removeBtn,children:jsx(a$4,{icon:"CLOSE_MARK_BUTTON",width:24})}),a&&jsx(jo,{onClick:a,className:Ce.downloadBtn,sx:s?.downloadBtn,size:"small",children:jsx(a$4,{icon:"ARROW_DOWN_CICLE",width:12})})]});return r?jsx(zr,{arrow:!0,title:c,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:F}):F};var na=e=>e.startsWith("image/"),Ro=(e,o=.8)=>new Promise((r,t)=>{let n=document.createElement("canvas"),s=n.getContext("2d"),a=new Image;a.onload=()=>{n.width=a.width,n.height=a.height,s?(s.drawImage(a,0,0),n.toBlob(l=>{if(l){let p=new File([l],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});r(p);}else t(new Error("Falha ao converter para WebP"));},"image/webp",o)):t(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},a.onerror=()=>t(new Error("Falha ao carregar imagem")),a.src=URL.createObjectURL(e);}),_o=e=>{let o=e.match(/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i);return o?.[1]||o?.[2]||""};var Zr=({onFilesSelect:e$1,onFileSelect:o,onReorder:r,onRemove:t,uploadFiles:n,filesPreview:s,dropzoneOptions:a,enableCrop:l=!1,customAspectRatio:p,convertToWebp:c=!0,cropSize:d,maxFiles:x})=>{let{showErrorMessage:I}=a$8(),v=useMemo(()=>p||(d&&typeof d!="number"?d.width/d.height:1),[p,d]),[F,A]=useState([]),[M,E]=useState(!1),[g,P]=useState(null),[R,U]=useState(null),[C,u]=useState(""),[b,m]=useState(!1),[_,O]=useState([]),[L,w]=useState(0),[$,q]=useState(0),ee=f=>{if(f.length<1)return;let h=f[0];P(h),w(y=>y+1);let D=new FileReader;D.onload=()=>{u(D.result),E(!0);},D.readAsDataURL(h);},oe=(f,h)=>{U(h);},ae=async f=>!g||!R?null:new Promise(h=>{let D=document.createElement("canvas"),y=D.getContext("2d"),j=new Image;j.onload=async()=>{let{width:fe,height:we,x:De,y:Co}=R,ko=Math.abs(v),Re=fe,_e=we;d&&typeof d=="object"?(Re=d.width,_e=d.height):d&&typeof d=="number"&&(Re=d,_e=d/ko),D.width=Re,D.height=_e,y?(y.drawImage(j,De,Co,fe,we,0,0,Re,_e),D.toBlob(async Je=>{if(Je){let We=new File([Je],g.name,{type:g.type,lastModified:Date.now()});if(c)try{We=await Ro(We);}catch(zo){I(zo,"Erro ao converter para WebP");}let Qe=We;Qe.id=f,h(Qe);}else h(null);},"image/png")):h(null);},j.src=C;}),pe=async()=>{if(!(!g||!R||_.length===0)){m(!0);try{let f=_[0],h=await ae(f.id);if(h){let y=await n([h]);y&&(!e$1&&!o&&A(j=>[...j,...y]),e$1?.([...s||[],...y]),o?.(h));}E(!1),m(!1),u(""),P(null);let D=_.slice(1);O(D),ee(D);}catch(f){I(f,"Erro ao processar imagem"),m(!1);}}},de=()=>{E(!1),m(!1),u(""),P(null),O([]),w(0),q(0);},me=async f=>{if(f.length===0)return;let h=Object.keys(a?.accept||{}).some(y=>y.includes("image/")),D=F.length+f.length;if(x&&D>x){I(new Error(`M\xE1ximo de ${x} arquivos`),"Erro ao fazer upload");return}try{if(h&&l){let j=f.filter(fe=>fe.type.startsWith("image/")).map((fe,we)=>{let De=fe;return De.id=`temp-crop-${Date.now()}-${we}`,De});q(j.length),w(0),O(j),ee(j);}else {let y=await n(f);y&&(!e$1&&!o&&A(j=>[...j,...y]),e$1?.([...s||[],...y]),o?.(y[0]));}}catch(y){I(y,"Erro ao processar arquivos");}},ce=f=>{if(!f.length)return;let h=f[0]?.errors[0]?.code,D=a?.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:N,getInputProps:V,isDragActive:K,isDragReject:re,fileRejections:B}=useDropzone({onDrop:me,onDropRejected:ce,...a}),i=f=>{if(!f){t||A([]),t?.(void 0);return}let h=F.filter(D=>D.id!==f.id);t||A(h),t?.(f);},W=(f,h,D)=>{r?.(f,h,D);},G=useRef("");return useEffect(()=>{let f=s?.map(h=>h.id).join(",")||"";f!==G.current&&(G.current=f,A(s||[]));},[s]),{file:F?.[0],files:F,aspectRatio:v,dropzoneProps:{getRootProps:N,getInputProps:V,isDragActive:K,isDragReject:re,fileRejections:B},cropState:{cropModalOpen:M,imagePreview:C,cropLoading:b,setCropModalOpen:E,onCropInitialized:oe,handleCropSave:pe,handleCropCancel:de,currentImageIndex:L,totalPendingImages:$},setInitialFiles:A,handleRemove:i,handleReorder:W}},H=Zr;var Xe=(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))(Xe||{}),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 qr=({createFilesMutation:e,filesDetails:o})=>{let{showErrorMessage:r}=a$8(),[t,n]=useState(!1),[s,a]=useState(!1),[l,p]=useState(null),[c,d]=useState([]),x=useMemo(()=>c?.[0],[c]),I=s||t,v=useCallback(async E=>{if(!E.length){d([]),a(!1);return}a(!0);try{let P=(await Promise.all(E.map(async({url:R,id:U,name:C})=>{try{if(!R)return null;let u=await fetch(R);if(!u.ok)throw new Error(u.statusText);let b=await u.blob(),m=null;if(!C){let L=u.headers.get("content-disposition")||void 0;if(L){let w=_o(L);if(w)try{m=decodeURIComponent(w);}catch{m=w;}}}let _=m||C||U,O=new File([b],_,{type:b.type});return O.id=U,O.url=R,O}catch{return null}}))).filter(Boolean);d(P),a(!1);}catch(g){r(g,"Erro ao carregar arquivos"),d([]),a(!1);}},[r]),F=useRef("");useEffect(()=>{let E=o?.map(({id:g})=>g).join(",")||"";E!==F.current&&(async()=>(F.current=E,await v(o)))();},[o,v]);let A=async E=>{if(!E||!Array.isArray(E))throw new Error("Arquivos inv\xE1lidos");let g=E.filter(P=>P instanceof File);if(g?.length){n(!0);try{let P=g.map(u=>{let b=u.type||"application/octet-stream",m=ke[b];if(!m)throw new Error(`Tipo de arquivo n\xE3o suportado: ${b}`);return {file:u,mimeType:b,contentTypeEnum:m}}),R=await e({files:P.map(({file:u,contentTypeEnum:b})=>({content_type:b,name:u.name}))}).unwrap(),U=R.files.map((u,b)=>{let m=P[b].file,_=m;return _.id=u.id,_.url=URL.createObjectURL(m),_});return await(await Promise.all(R.files.map((u,b)=>{let{mimeType:m}=P[b],_=U[b];return fetch(u.url,{method:"PUT",headers:{"Content-Type":m,"Content-Disposition":`inline; filename="${_.name}"`,"X-File-Id":u.id},body:_})}))).forEach(async u=>{if(!u.ok)throw new Error("Erro no upload do arquivo.")}),U}catch(P){throw p(P),r(P,"Erro no upload"),P}finally{n(!1);}}},M=useMemo(()=>l&&l instanceof Error?l.message:l,[l]);return {setFilesPreview:d,uploadFiles:A,filesPreview:c,filePreview:x,isLoadingPreview:s,isUploadingFiles:t,isUploadOrLoadingFiles:I,uploadErrorText:M}},X=qr;var Kr=({sx:e,id:o,name:r,tabIndex:t,uploading:n,getRootProps:s,getInputProps:a,isDragActive:l,isError:p,disabled:c,dropZoneSxProps:d,dropZoneContent:x,children:I,...v})=>jsxs(ye,{children:[n&&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:p,isDragActive:l,disabled:!!c,sx:d,...v,children:[jsx("input",{...a(),id:o,tabIndex:t,name:r}),x]}),I]})]}),ne=Kr;var Yr=({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(Yr);var it=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:n=[],id:s,disabled:a,error:l,helperText:p,thumbnail:c,dropZoneSxProps:d,uploading:x,tabIndex:I,maxFiles:v,placeholderAlt:F,placeholderProps:A,...M})=>{let{filesPreview:E,isUploadOrLoadingFiles:g,uploadErrorText:P,uploadFiles:R}=X({createFilesMutation:t,filesDetails:n}),{files:U,dropzoneProps:C,handleRemove:u,handleReorder:b}=H({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:E,dropzoneOptions:{multiple:!0,disabled:a,...M},maxFiles:v,uploadFiles:R}),{getRootProps:m,getInputProps:_,isDragActive:O,isDragReject:L}=C,w=!!U?.filter(q=>!!q.id).length,$=L||!!l||!!P;return jsxs(ne,{id:s,uploading:x||g,disabled:a,dropZoneSxProps:d,tabIndex:I,getRootProps:m,getInputProps:_,isDragActive:O,isError:$,dropZoneContent:jsx(Fragment,{children:F?jsx(ge,{children:F}):jsx(se,{header:A?.header,description:A?.description})}),children:[jsx(S,{disabled:a,helperText:p,isError:$}),l?jsx(S,{helperText:l,isError:!0}):null,P?jsx(S,{helperText:P,isError:!0}):null,w&&jsx(Ee,{sx:{my:3},children:jsx(Ae,{files:U,thumbnail:!!c,onRemove:e?u:void 0,onReorder:o?b:void 0})})]})},at=memo(it);var ct=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:n=[],id:s,disabled:a,error:l,helperText:p,dropZoneSxProps:c,placeholderProps:d,placeholderAlt:x,uploading:I,tabIndex:v,maxFiles:F,aspectRatio:A,enableCrop:M=!0,convertToWebp:E=!0,cropSize:g,name:P,label:R,...U})=>{let{filesPreview:C,isUploadOrLoadingFiles:u,uploadErrorText:b,uploadFiles:m}=X({createFilesMutation:t,filesDetails:n}),_=I||u,{files:O,dropzoneProps:L,cropState:w,aspectRatio:$,handleRemove:q,handleReorder:ee}=H({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:C,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!0,disabled:a,...U},enableCrop:M,customAspectRatio:A,convertToWebp:E,maxFiles:F,cropSize:g,uploadFiles:m}),{getRootProps:oe,getInputProps:ae,isDragActive:pe,isDragReject:de}=L,{cropModalOpen:me,imagePreview:ce,cropLoading:N,onCropInitialized:V,handleCropSave:K,handleCropCancel:re,currentImageIndex:B,totalPendingImages:i}=w,W=!!O?.filter(h=>!!h.id).length,G=de||!!l||!!b,f=useMemo(()=>{let h=R??"Ajustar Imagem",D=i>1||B>1?` (${B} de ${i})`:"";return `${h}${D}`},[R,i,B]);return jsxs(ne,{id:s,name:P,uploading:_,disabled:a,dropZoneSxProps:c,tabIndex:v,getRootProps:oe,getInputProps:ae,isDragActive:pe,isError:G,dropZoneContent:jsx(Fragment,{children:x?jsx(ge,{children:x}):jsx(se,{header:d?.header,description:d?.description})}),children:[jsx(S,{disabled:a,helperText:p,isError:G}),l?jsx(S,{helperText:l,isError:!0}):null,b?jsx(S,{helperText:b,isError:!0}):null,W&&jsx(Ee,{sx:{my:3,ml:.5},children:jsx(Ae,{files:O,thumbnail:!0,onRemove:q,onReorder:o?ee:void 0})}),jsx(a$6,{open:me,onClose:re,label:f,imageSrc:ce,aspectRatio:$,onInitialized:V,onSave:K,loading:N,cropSize:g})]})},gt=memo(ct);var Pt=({onFileSelect:e$1,onRemove:o,createFilesMutation:r,fileDetails:t,id:n,disabled:s,error:a,helperText:l,sx:p,dropZoneSxProps:c,uploading:d,tabIndex:x,...I})=>{let{filesPreview:v,isUploadOrLoadingFiles:F,uploadErrorText:A,uploadFiles:M}=X({createFilesMutation:r,filesDetails:t?[t]:[]}),E=F||d,{file:g,dropzoneProps:P,handleRemove:R}=H({uploadFiles:M,onFileSelect:e$1,onRemove:o,filesPreview:v,dropzoneOptions:{multiple:!1,disabled:s,...I}}),{getRootProps:U,getInputProps:C,isDragActive:u,isDragReject:b}=P,m$1=useCallback(w=>{w.stopPropagation(),R(g||void 0);},[g,R]),_=!!g,O=typeof g=="string",L=b||!!a||!!A;return jsxs(ne,{id:n,uploading:E,disabled:s,dropZoneSxProps:c,tabIndex:x,getRootProps:U,getInputProps:C,isDragActive:u,isError:L,dropZoneContent:jsxs(Fragment,{children:[!_&&jsx(se,{}),_&&jsxs(ge,{component:m.div,...j().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:w=>`solid 1px ${w.palette.divider}`,...p},children:[jsx(Pe,{file:g}),jsxs(ge,{flexGrow:1,sx:{minWidth:0},children:[jsx(qe,{variant:"subtitle2",noWrap:!0,children:O?g:g.name}),jsx(qe,{variant:"caption",sx:{color:"text.secondary"},children:O?"":e(g.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(S,{disabled:s,helperText:l,isError:L}),a?jsx(S,{helperText:a,isError:!0}):null,A?jsx(S,{helperText:A,isError:!0}):null]})},bt=memo(Pt);var Rt=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,id:n,disabled:s,error:a,helperText:l,dropZoneSxProps:p,placeholderProps:c,placeholderAlt:d,uploading:x,tabIndex:I,aspectRatio:v,enableCrop:F=!0,convertToWebp:A=!0,name:M,label:E,cropSize:g,sx:P,maxWidth:R,maxHeight:U,...C})=>{let{filesPreview:u,isUploadOrLoadingFiles:b,uploadErrorText:m,uploadFiles:_}=X({createFilesMutation:r,filesDetails:t?[t]:[]}),[O,L]=useState(!1),{file:w,dropzoneProps:$,cropState:q,handleRemove:ee,aspectRatio:oe}=H({onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:s,...C},filesPreview:u,enableCrop:F,customAspectRatio:v,convertToWebp:A,cropSize:g,uploadFiles:_}),{getRootProps:ae,getInputProps:pe,isDragActive:de,isDragReject:me}=$,{cropModalOpen:ce,imagePreview:N,cropLoading:V,onCropInitialized:K,handleCropSave:re,handleCropCancel:B}=q,i=useCallback(()=>{ee(w||void 0);},[w,ee]),W=!!w,G=me||!!a||!!m,f=x||b,h=W?{opacity:0}:{opacity:1},D=p?.width;return useEffect(()=>{W||L(!1);},[W]),jsxs(ye,{sx:{...P,...D&&{width:D}},children:[(f||O)&&jsx(a$7,{}),jsxs(ne,{id:n,uploading:f,disabled:s,dropZoneSxProps:p,tabIndex:I,getRootProps:ae,getInputProps:pe,isDragActive:de,isError:G,name:M,dropZoneContent:jsxs(Fragment,{children:[d?jsx(ge,{sx:h,children:d}):jsx(se,{sx:h,header:c?.title,description:c?.description}),W&&jsx(Ze,{file:w,cropSize:g,isLoading:O,isUploading:f,onLoading:L,aspectRatio:oe,maxWidth:R,maxHeight:U})]}),children:[jsx(S,{disabled:s,helperText:l,isError:G}),a?jsx(S,{helperText:a,isError:!0}):null,m?jsx(S,{helperText:m,isError:!0}):null,W&&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:B,label:E??"Ajustar Imagem",imageSrc:N,aspectRatio:oe,onInitialized:K,onSave:re,loading:V,cropSize:g})]})]})},_t=memo(Rt);var Mt=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,disabled:n,label:s,id:a,tabIndex:l,error:p,helperText:c,sx:d,name:x,maxSize:I,uploading:v,aspectRatio:F=1,enableCrop:A=!0,convertToWebp:M=!0,cropSize:E,...g})=>{let[P,R]=useState(!1),{filesPreview:U,isUploadOrLoadingFiles:C,uploadErrorText:u,uploadFiles:b}=X({createFilesMutation:r,filesDetails:t?[t]:[]}),{file:m,dropzoneProps:_,cropState:O,handleRemove:L}=H({filesPreview:U,onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:n,maxSize:I,...g},enableCrop:A,customAspectRatio:F,convertToWebp:M,cropSize:E,uploadFiles:b}),{getRootProps:w,getInputProps:$,isDragActive:q,isDragReject:ee}=_,{cropModalOpen:oe,imagePreview:ae,cropLoading:pe,onCropInitialized:de,handleCropSave:me,handleCropCancel:ce}=O,N=ee||!!p||!!u,V=P||C||v,K=!!e,re=useRef(t?.url||""),B=useRef();useEffect(()=>{if(!m){re.current="",B.current=void 0;return}if(B.current===m.id)return;B.current=m.id,R(!0);let G=URL.createObjectURL(m);return re.current=G,()=>{URL.revokeObjectURL(G);}},[m]);let i=()=>{R(!1);},W=useCallback(()=>K&&m?()=>L(m):w().onClick,[K,m,w,L]);return jsxs(Fragment,{children:[jsxs(ge,{sx:{alignItems:"center"},children:[jsxs(uo,{sx:d,isError:N,isDragActive:q,hasFile:!!m,...w(),onClick:W(),children:[jsxs(co,{children:[V&&jsx(go,{children:jsx(Lt,{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:N,hasFile:!1,children:[jsx(a$4,{icon:"ADD_IMAGE",width:32}),jsx(qe,{variant:"caption",textAlign:"center",sx:{color:N?"error.main":"text.disabled"},children:"Adicionar foto"})]}),m&&!V&&jsxs(je,{isError:N,hasFile:!0,children:[jsx(a$4,{icon:K?"DELETE_MARK_BUTTON_02":"ADD_IMAGE",width:32}),jsx(qe,{variant:"caption",textAlign:"center",sx:{color:N?"error.main":"common.white"},children:K?"Remover foto":"Alterar foto"})]})]}),jsx("input",{name:x,id:a,tabIndex:l,...$()})]}),jsx(ge,{sx:{alignItems:"center",mt:-.5},children:jsx(S,{helperText:c,disabled:n,isError:N})}),u?jsx(S,{helperText:u,isError:!0}):null,p?jsx(S,{helperText:p,isError:!0}):null]}),oe&&ae&&jsx(a$6,{open:oe,onClose:ce,label:s??"Ajustar Imagem",imageSrc:ae,aspectRatio:F,onInitialized:de,onSave:me,loading:pe,cropSize:E,cropShape:"round"})]})},Ct=memo(Mt);var Bt=({error:e,name:o,disabled:r,sx:t,...n})=>{let{getRootProps:s,getInputProps:a,isDragActive:l,isDragReject:p}=useDropzone({disabled:r,...n}),c=p||e;return jsxs(so,{...s(),isDragActive:l,hasError:!!c,disabled:!!r,sx:t,"data-testid":"upload-box",children:[jsx("input",{name:o,...a()}),"Selecionar arquivo"]})},Wt=memo(Bt);
|
|
37
37
|
|
|
38
|
-
export {
|
|
38
|
+
export { Xe as ContentType, ke as FileContentType, Pe as FileThumbnail, S as HelperText, Ae as MultiFilePreview, at as MultipleFileUpload, gt as MultipleImageUpload, Ze as SingleFilePreview, bt as SingleFileUpload, _t as SingleImageUpload, Ct as UploadAvatar, Wt as UploadSimpleBox, Ro as convertToWebP, He as fileFormat, Vi as fileNameByUrl, Do as fileThumb, Ce as fileThumbnailClasses, wo as fileTypeByUrl, _o as getFileNameFromContentDisposition, na as isImageFile, H as useDropzoneUploader, X as useFileUploadService };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a } from '../../chunk-CFD2VTQ3.js';
|
|
2
2
|
import { a as a$1 } from '../../chunk-26GV7WKC.js';
|
|
3
|
-
import { a as a$2 } from '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
3
|
+
import { a as a$2 } from '../../chunk-WNIW5FQU.js';
|
|
4
|
+
import '../../chunk-466LOYA5.js';
|
|
5
5
|
import H from '@mui/material/IconButton';
|
|
6
6
|
import r from '@mui/material/Stack';
|
|
7
7
|
import d from '@mui/material/Typography';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-53XEIC43.js';
|
|
2
|
+
import '../../chunk-WNIW5FQU.js';
|
|
3
|
+
import '../../chunk-466LOYA5.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-WNIW5FQU.js';
|
|
2
|
+
import '../../chunk-466LOYA5.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-DCUOXK2B.js';
|
|
2
|
+
import '../../chunk-WNIW5FQU.js';
|
|
3
|
+
import '../../chunk-466LOYA5.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-ZCGDOEMG.js';
|
|
2
2
|
import '../../chunk-T7I256S6.js';
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
3
|
+
import '../../chunk-FK5X3RF2.js';
|
|
4
|
+
import '../../chunk-WNIW5FQU.js';
|
|
5
|
+
import '../../chunk-466LOYA5.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-JDFYC6PH.js';
|
|
2
2
|
import '../../chunk-2FXXN6VA.js';
|
|
3
3
|
import '../../chunk-ANAHA3L6.js';
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-WNIW5FQU.js';
|
|
5
|
+
import '../../chunk-466LOYA5.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a } from '../../chunk-2FXBVVBD.js';
|
|
2
|
-
import { a as a$1 } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
2
|
+
import { a as a$1 } from '../../chunk-WNIW5FQU.js';
|
|
3
|
+
import '../../chunk-466LOYA5.js';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
var f=({text:i,icon:l="INFO_CIRCLE",width:p,color:c="text.secondary",...e})=>jsx(a,{title:i,...e,children:jsx(a$1,{icon:l,width:p,color:c})}),m=f;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as a$2 } from '../../chunk-Q7HPO5OB.js';
|
|
2
2
|
import { a as a$1 } from '../../chunk-TWGGHTU5.js';
|
|
3
|
-
import { o, a, f, k as k$1 } from '../../chunk-
|
|
3
|
+
import { o, a, f, k as k$1 } from '../../chunk-NIC6MMFL.js';
|
|
4
4
|
import '../../chunk-D27ND54J.js';
|
|
5
|
-
import '../../chunk-
|
|
6
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-WNIW5FQU.js';
|
|
6
|
+
import '../../chunk-466LOYA5.js';
|
|
7
7
|
import { Fragment } from 'react';
|
|
8
8
|
import k from '@mui/material/Stack';
|
|
9
9
|
import { styled } from '@mui/material/styles';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
import { a } from '../../chunk-WNIW5FQU.js';
|
|
2
|
+
import '../../chunk-466LOYA5.js';
|
|
3
3
|
import c from '@mui/material/CircularProgress';
|
|
4
4
|
import d from '@mui/material/MenuItem';
|
|
5
5
|
import p from '@mui/material/Stack';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-FK5X3RF2.js';
|
|
2
|
+
import '../../chunk-WNIW5FQU.js';
|
|
3
|
+
import '../../chunk-466LOYA5.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as a$3 } from '../../chunk-HOMGLSVS.js';
|
|
2
|
-
import { a as a$2 } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
2
|
+
import { a as a$2 } from '../../chunk-WNIW5FQU.js';
|
|
3
|
+
import '../../chunk-466LOYA5.js';
|
|
4
4
|
import { a } from '../../chunk-ORYAES3Q.js';
|
|
5
5
|
import f from '@mui/material/IconButton';
|
|
6
6
|
import M from '@mui/material/Stack';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d } from '../../chunk-KOELUX3V.js';
|
|
2
|
-
import { a as a$1 } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
2
|
+
import { a as a$1 } from '../../chunk-WNIW5FQU.js';
|
|
3
|
+
import '../../chunk-466LOYA5.js';
|
|
4
4
|
import a from '@mui/material/Typography';
|
|
5
5
|
import i from '@mui/material/Stack';
|
|
6
6
|
import { styled, alpha } from '@mui/material/styles';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as a$3 } from '../../chunk-HOMGLSVS.js';
|
|
2
|
-
import { a as a$1 } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
2
|
+
import { a as a$1 } from '../../chunk-WNIW5FQU.js';
|
|
3
|
+
import '../../chunk-466LOYA5.js';
|
|
4
4
|
import { a as a$2 } from '../../chunk-ORYAES3Q.js';
|
|
5
5
|
import S from '@mui/material/MenuItem';
|
|
6
6
|
import a from '@mui/material/Box';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-LTN2ILRD.js';
|
|
2
|
+
import '../../chunk-WNIW5FQU.js';
|
|
3
|
+
import '../../chunk-466LOYA5.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-EVFWCJPL.js';
|
|
2
2
|
import '../../chunk-4ZBE3RNR.js';
|
|
3
|
-
import '../../chunk-
|
|
3
|
+
import '../../chunk-LTN2ILRD.js';
|
|
4
4
|
import '../../chunk-TWGGHTU5.js';
|
|
5
5
|
import '../../chunk-U26IUEAG.js';
|
|
6
6
|
import '../../chunk-26GV7WKC.js';
|
|
7
|
-
import '../../chunk-
|
|
8
|
-
import '../../chunk-
|
|
7
|
+
import '../../chunk-WNIW5FQU.js';
|
|
8
|
+
import '../../chunk-466LOYA5.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as a$1 } from '../../chunk-RLMWIJKJ.js';
|
|
2
|
-
import { a } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
2
|
+
import { a } from '../../chunk-WNIW5FQU.js';
|
|
3
|
+
import '../../chunk-466LOYA5.js';
|
|
4
4
|
import '../../chunk-ILHUUK4X.js';
|
|
5
5
|
import p from '@mui/material/Box';
|
|
6
6
|
import o from '@mui/material/Stack';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
import { a } from '../../chunk-WNIW5FQU.js';
|
|
2
|
+
import '../../chunk-466LOYA5.js';
|
|
3
3
|
import s from '@mui/material/Box';
|
|
4
4
|
import S from '@mui/material/Stack';
|
|
5
5
|
import d from '@mui/material/Step';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
import { a } from '../../chunk-WNIW5FQU.js';
|
|
2
|
+
import '../../chunk-466LOYA5.js';
|
|
3
3
|
import n from '@mui/material/Stack';
|
|
4
4
|
import { styled, alpha } from '@mui/material/styles';
|
|
5
5
|
import b from '@mui/material/Tab';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as a$2 } from '../../chunk-4ZBE3RNR.js';
|
|
2
|
-
import { a } from '../../chunk-
|
|
2
|
+
import { a } from '../../chunk-LTN2ILRD.js';
|
|
3
3
|
import { a as a$1 } from '../../chunk-TWGGHTU5.js';
|
|
4
4
|
import '../../chunk-U26IUEAG.js';
|
|
5
5
|
import { a as a$3 } from '../../chunk-26GV7WKC.js';
|
|
6
|
-
import { a as a$4 } from '../../chunk-
|
|
7
|
-
import '../../chunk-
|
|
6
|
+
import { a as a$4 } from '../../chunk-WNIW5FQU.js';
|
|
7
|
+
import '../../chunk-466LOYA5.js';
|
|
8
8
|
import { useState } from 'react';
|
|
9
9
|
import h from '@mui/material/Checkbox';
|
|
10
10
|
import T from '@mui/material/CircularProgress';
|
|
@@ -3,8 +3,8 @@ import { a as a$3 } from '../../chunk-UA7OPAW7.js';
|
|
|
3
3
|
import { a } from '../../chunk-HOMGLSVS.js';
|
|
4
4
|
import { a as a$2 } from '../../chunk-CFD2VTQ3.js';
|
|
5
5
|
import '../../chunk-D27ND54J.js';
|
|
6
|
-
import { a as a$4 } from '../../chunk-
|
|
7
|
-
import '../../chunk-
|
|
6
|
+
import { a as a$4 } from '../../chunk-WNIW5FQU.js';
|
|
7
|
+
import '../../chunk-466LOYA5.js';
|
|
8
8
|
import { a as a$1 } from '../../chunk-ORYAES3Q.js';
|
|
9
9
|
import E from '@mui/material/Button';
|
|
10
10
|
import N from '@mui/material/FormControlLabel';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { j as ArrowButton, f as Carousel, g as CarouselArrowBasicButtons, i as CarouselArrowFloatButtons, h as CarouselArrowNumberButtons, k as CarouselDotButtons, l as CarouselProgressBar, c as CarouselSlide, n as CarouselThumb, m as CarouselThumbs, e as StyledContainer, d as StyledRoot, a as carouselBreakpoints, b as carouselClasses, o as useCarousel } from '../../chunk-
|
|
1
|
+
export { j as ArrowButton, f as Carousel, g as CarouselArrowBasicButtons, i as CarouselArrowFloatButtons, h as CarouselArrowNumberButtons, k as CarouselDotButtons, l as CarouselProgressBar, c as CarouselSlide, n as CarouselThumb, m as CarouselThumbs, e as StyledContainer, d as StyledRoot, a as carouselBreakpoints, b as carouselClasses, o as useCarousel } from '../../chunk-NIC6MMFL.js';
|
|
2
2
|
import '../../chunk-D27ND54J.js';
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
3
|
+
import '../../chunk-WNIW5FQU.js';
|
|
4
|
+
import '../../chunk-466LOYA5.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as a$2 } from '../../../chunk-NV2X5CYP.js';
|
|
2
2
|
import { a as a$1 } from '../../../chunk-TF3JCVT7.js';
|
|
3
|
-
import { a as a$3 } from '../../../chunk-
|
|
3
|
+
import { a as a$3 } from '../../../chunk-O73VICMQ.js';
|
|
4
4
|
import '../../../chunk-2QUYG4AQ.js';
|
|
5
|
-
import '../../../chunk-
|
|
6
|
-
import '../../../chunk-
|
|
7
|
-
import '../../../chunk-
|
|
5
|
+
import '../../../chunk-BV3JFD3O.js';
|
|
6
|
+
import '../../../chunk-WNIW5FQU.js';
|
|
7
|
+
import '../../../chunk-466LOYA5.js';
|
|
8
8
|
import E from '@mui/material/CircularProgress';
|
|
9
9
|
import g from '@mui/material/InputAdornment';
|
|
10
10
|
import a from '@mui/material/Stack';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as default } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
3
|
-
import '../../../chunk-
|
|
4
|
-
import '../../../chunk-
|
|
1
|
+
export { a as default } from '../../../chunk-O73VICMQ.js';
|
|
2
|
+
import '../../../chunk-BV3JFD3O.js';
|
|
3
|
+
import '../../../chunk-WNIW5FQU.js';
|
|
4
|
+
import '../../../chunk-466LOYA5.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a } from '../../../chunk-
|
|
1
|
+
import { a } from '../../../chunk-JDFYC6PH.js';
|
|
2
2
|
import '../../../chunk-2FXXN6VA.js';
|
|
3
3
|
import '../../../chunk-ANAHA3L6.js';
|
|
4
|
-
import '../../../chunk-
|
|
5
|
-
import '../../../chunk-
|
|
4
|
+
import '../../../chunk-WNIW5FQU.js';
|
|
5
|
+
import '../../../chunk-466LOYA5.js';
|
|
6
6
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a } from '../../../chunk-NV2X5CYP.js';
|
|
2
2
|
import { d } from '../../../chunk-KOELUX3V.js';
|
|
3
|
-
import { a as a$1 } from '../../../chunk-
|
|
4
|
-
import '../../../chunk-
|
|
3
|
+
import { a as a$1 } from '../../../chunk-WNIW5FQU.js';
|
|
4
|
+
import '../../../chunk-466LOYA5.js';
|
|
5
5
|
import { useState } from 'react';
|
|
6
6
|
import { useFormContext } from 'react-hook-form';
|
|
7
7
|
import y from '@mui/material/IconButton';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a } from '../../../chunk-
|
|
1
|
+
import { a } from '../../../chunk-EVFWCJPL.js';
|
|
2
2
|
import '../../../chunk-4ZBE3RNR.js';
|
|
3
|
-
import '../../../chunk-
|
|
3
|
+
import '../../../chunk-LTN2ILRD.js';
|
|
4
4
|
import '../../../chunk-TWGGHTU5.js';
|
|
5
5
|
import '../../../chunk-U26IUEAG.js';
|
|
6
6
|
import '../../../chunk-26GV7WKC.js';
|
|
7
|
-
import '../../../chunk-
|
|
8
|
-
import '../../../chunk-
|
|
7
|
+
import '../../../chunk-WNIW5FQU.js';
|
|
8
|
+
import '../../../chunk-466LOYA5.js';
|
|
9
9
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
10
10
|
import { jsx } from 'react/jsx-runtime';
|
|
11
11
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { b } from '../../../chunk-
|
|
1
|
+
import { b } from '../../../chunk-LHRWO6ZJ.js';
|
|
2
2
|
import '../../../chunk-ISYQXE75.js';
|
|
3
|
-
import '../../../chunk-
|
|
3
|
+
import '../../../chunk-ZCGDOEMG.js';
|
|
4
4
|
import '../../../chunk-T7I256S6.js';
|
|
5
5
|
import '../../../chunk-ANAHA3L6.js';
|
|
6
|
-
import '../../../chunk-
|
|
6
|
+
import '../../../chunk-FK5X3RF2.js';
|
|
7
7
|
import '../../../chunk-D27ND54J.js';
|
|
8
8
|
import '../../../chunk-X24QANPC.js';
|
|
9
|
-
import '../../../chunk-
|
|
10
|
-
import '../../../chunk-
|
|
9
|
+
import '../../../chunk-WNIW5FQU.js';
|
|
10
|
+
import '../../../chunk-466LOYA5.js';
|
|
11
11
|
import '../../../chunk-KFZEM7KS.js';
|
|
12
12
|
import '../../../chunk-W3MYAMTH.js';
|
|
13
13
|
import { a } from '../../../chunk-GA4A5P3S.js';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { e } from '../../../chunk-
|
|
1
|
+
import { e } from '../../../chunk-MXKBMF4Q.js';
|
|
2
2
|
import '../../../chunk-ISYQXE75.js';
|
|
3
|
-
import '../../../chunk-
|
|
3
|
+
import '../../../chunk-ZCGDOEMG.js';
|
|
4
4
|
import '../../../chunk-T7I256S6.js';
|
|
5
5
|
import '../../../chunk-H5L4ARDB.js';
|
|
6
6
|
import '../../../chunk-ANAHA3L6.js';
|
|
7
|
-
import '../../../chunk-
|
|
8
|
-
import '../../../chunk-
|
|
7
|
+
import '../../../chunk-FK5X3RF2.js';
|
|
8
|
+
import '../../../chunk-EMDC26UP.js';
|
|
9
9
|
import '../../../chunk-2P4CXK3O.js';
|
|
10
10
|
import '../../../chunk-FK7DDO5L.js';
|
|
11
11
|
import '../../../chunk-D27ND54J.js';
|
|
12
12
|
import '../../../chunk-X24QANPC.js';
|
|
13
13
|
import '../../../chunk-DMQW3LDF.js';
|
|
14
|
-
import '../../../chunk-
|
|
15
|
-
import '../../../chunk-
|
|
14
|
+
import '../../../chunk-WNIW5FQU.js';
|
|
15
|
+
import '../../../chunk-466LOYA5.js';
|
|
16
16
|
import '../../../chunk-ILHUUK4X.js';
|
|
17
17
|
import '../../../chunk-KFZEM7KS.js';
|
|
18
18
|
import '../../../chunk-W3MYAMTH.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a } from '../../../chunk-NV2X5CYP.js';
|
|
2
|
-
import { a as a$2 } from '../../../chunk-
|
|
3
|
-
import { a as a$3 } from '../../../chunk-
|
|
4
|
-
import '../../../chunk-
|
|
5
|
-
import { a as a$1 } from '../../../chunk-
|
|
6
|
-
import '../../../chunk-
|
|
2
|
+
import { a as a$2 } from '../../../chunk-O73VICMQ.js';
|
|
3
|
+
import { a as a$3 } from '../../../chunk-BFWHNERW.js';
|
|
4
|
+
import '../../../chunk-BV3JFD3O.js';
|
|
5
|
+
import { a as a$1 } from '../../../chunk-WNIW5FQU.js';
|
|
6
|
+
import '../../../chunk-466LOYA5.js';
|
|
7
7
|
import { useFormContext, useFieldArray } from 'react-hook-form';
|
|
8
8
|
import D from '@mui/material/Divider';
|
|
9
9
|
import T from '@mui/material/IconButton';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
import { a } from '../../chunk-WNIW5FQU.js';
|
|
2
|
+
import '../../chunk-466LOYA5.js';
|
|
3
3
|
import w from '@mui/material/Box';
|
|
4
4
|
import C, { useLightboxState } from 'yet-another-react-lightbox';
|
|
5
5
|
import d from 'yet-another-react-lightbox/plugins/captions';
|