@zydon/common 2.2.94 → 2.2.96
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-46HSLI4G.js +30 -0
- package/dist/chunk-4DYDS26F.js +14 -0
- package/dist/chunk-MOEY2HDZ.js +18 -0
- package/dist/components/form/UploadAvatarWithCrop/index.js +2 -2
- package/dist/components/form/UploadWithCrop/index.js +2 -2
- package/dist/components/upload/index.d.ts +1 -1
- package/dist/components/upload/index.js +7 -7
- package/dist/theme/styles/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-GZDLVT2F.js +0 -18
- package/dist/chunk-QATBLJCU.js +0 -30
- package/dist/chunk-RTC2Y2ZP.js +0 -14
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { c, g, r, p, d, e as e$1, a as a$5, b, h, i as i$1, l, m as m$1, n, o as o$1, j as j$1, k } from './chunk-4DYDS26F.js';
|
|
2
|
+
import { a as a$4 } from './chunk-VZSJIT33.js';
|
|
3
|
+
import { e } from './chunk-ANAHA3L6.js';
|
|
4
|
+
import { a as a$3 } from './chunk-FK7DDO5L.js';
|
|
5
|
+
import { i, o } from './chunk-D27ND54J.js';
|
|
6
|
+
import { j } from './chunk-DMQW3LDF.js';
|
|
7
|
+
import { a } from './chunk-VU4X2T7Q.js';
|
|
8
|
+
import { a as a$2 } from './chunk-KFZEM7KS.js';
|
|
9
|
+
import { a as a$1 } from './chunk-X24QANPC.js';
|
|
10
|
+
import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter } from '@dnd-kit/core';
|
|
11
|
+
import { sortableKeyboardCoordinates, SortableContext, horizontalListSortingStrategy, useSortable } from '@dnd-kit/sortable';
|
|
12
|
+
import { AnimatePresence, m } from 'framer-motion';
|
|
13
|
+
import Q1 from '@mui/material/ButtonBase';
|
|
14
|
+
import oo from '@mui/material/IconButton';
|
|
15
|
+
import { styled, alpha, useTheme } from '@mui/material/styles';
|
|
16
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
17
|
+
import W1 from '@mui/material/Box';
|
|
18
|
+
import V from '@mui/material/Stack';
|
|
19
|
+
import no from '@mui/material/Tooltip';
|
|
20
|
+
import { memo, useId } from 'react';
|
|
21
|
+
import a1 from '@mui/material/Typography';
|
|
22
|
+
import so from '@mui/material/Badge';
|
|
23
|
+
import { useDropzone } from 'react-dropzone';
|
|
24
|
+
import j1 from '@mui/material/Button';
|
|
25
|
+
import Ko from '@mui/material/FormHelperText';
|
|
26
|
+
import Yo from '@mui/material/Dialog';
|
|
27
|
+
|
|
28
|
+
function E1({sx:t,...r}){let n=useTheme();return jsx(Q1,{sx:{p:0,top:0,right:0,width:1,height:1,zIndex:9,opacity:0,position:"absolute",color:"common.white",borderRadius:"inherit",transition:n.transitions.create(["opacity"]),"&:hover":{...o({color:i(n.vars.palette.grey["900Channel"],.64)}),opacity:1},...t},...r,children:jsx(a,{icon:"ARROW_DOWN_CICLE",width:24})})}function k1({sx:t,...r}){return jsx(oo,{size:"small",sx:{p:.35,top:4,right:4,position:"absolute",color:"common.white",bgcolor:n=>i(n.vars.palette.grey["900Channel"],.48),"&:hover":{bgcolor:n=>i(n.vars.palette.grey["900Channel"],.72)},...t},...r,children:jsx(a,{icon:"CLOSE_MARK_BUTTON",width:12})})}var T={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"};function S({sx:t,file:r,tooltip:n,onRemove:l,imageView:e,slotProps:a$1,onDownload:i,...m}){let d=typeof r=="string"?r:URL.createObjectURL(r),{name:f,path:p}=c(r),u=a$5(p||d),h=jsx(W1,{component:"img",src:d,className:T.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...a$1?.img}}),y=jsx(a,{icon:b(u),sx:{width:32,height:32,flexShrink:0,...t}}),g=jsxs(V,{component:"span",className:T.root,sx:{width:36,height:36,flexShrink:0,borderRadius:1.25,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...t},...m,children:[u==="image"&&e?h:y,l&&jsx(k1,{onClick:l,className:T.removeBtn,sx:a$1?.removeBtn}),i&&jsx(E1,{onClick:i,className:T.downloadBtn,sx:a$1?.downloadBtn})]});return n?jsx(no,{arrow:!0,title:f,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:g}):g}var K=Object.freeze({Translate:{toString(t){if(!t)return;let{x:r,y:n}=t;return "translate3d("+(r?Math.round(r):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:r,scaleY:n}=t;return "scaleX("+r+") scaleY("+n+")"}},Transform:{toString(t){if(t)return [K.Translate.toString(t),K.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:r,duration:n,easing:l}=t;return r+" "+n+"ms "+l}}});var ao=({disableDrag:t,...r})=>t?null:jsx(m$1,{className:"dragIcon",disableRipple:!0,"aria-label":"Arrastar para ordenar",...r,children:jsxs(n,{children:[jsx(a,{sx:{marginLeft:0},icon:"MORE_BOLD",width:16}),jsx(a,{sx:{marginLeft:"-10px"},icon:"MORE_BOLD",width:16})]})}),G=ao;var po=({onRemove:t,onHandleMainImage:r,key:n,sx:l,file:e,disableDrag:a$1,attributes:i,listeners:m$1,mainUrl:d})=>{let f=e===d;return jsx(so,{anchorOrigin:{vertical:"top",horizontal:"left"},badgeContent:r&&jsx(o$1,{isMainImage:f,size:"small",onClick:()=>r(e),"aria-label":f?"Remover imagem principal":"Definir como imagem principal",children:jsx(a,{icon:f?"STAR":"STAR_02",width:12})}),children:jsxs(j$1,{width:innerWidth,"data-testid":`preview-multi-img-${n}`,component:m.div,...j().inUp,sx:l,children:[jsx(G,{disableDrag:a$1,...i,...m$1}),jsx(S,{tooltip:!0,imageView:!0,file:e,sx:{position:"absolute",right:10,top:10}}),t&&jsx(k,{size:"small","aria-label":"Remover imagem",onClick:()=>t(e),children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})})]})},`badge-${n}`)},T1=po;var go=({file:t,thumbnail:r,onRemove:n,onHandleMainImage:l$1,mainUrl:e$1,sx:a$1,disableDrag:i=!1})=>{let{key:m$1,name:d="",size:f=0}=c(t),p=typeof t=="string",u=i?60:80,{attributes:h$1,listeners:y,setNodeRef:g,transform:z,transition:R}=useSortable({id:m$1,disabled:i}),w={transform:K.Transform.toString(z),transition:R,display:"inline-block",alignItems:"center",justifyContent:"center",width:`${u+8}px`,height:"68px"};return r?jsx(h,{ref:g,style:w,children:jsx(T1,{sx:a$1,file:t,disableDrag:i,attributes:h$1,listeners:y,mainUrl:e$1,onRemove:n,onHandleMainImage:l$1},m$1)}):jsx(h,{ref:g,style:{...w,height:"80px",width:`${u+38}px`},children:jsxs(i$1,{width:u+30,"data-testid":`preview-multi-img-${m$1}`,component:m.div,...j().inUp,sx:a$1,children:[jsx(G,{disableDrag:i,...h$1,...y}),jsx(S,{file:t}),jsxs(V,{flexGrow:1,sx:{minWidth:0,width:"100%"},children:[jsx(a1,{variant:"subtitle2",noWrap:!0,children:p?t:d}),jsx(a1,{variant:"caption",sx:{color:"text.secondary"},children:p?"":e(f)})]}),n&&jsx(l,{size:"small","aria-label":"Remover arquivo",onClick:()=>n(t),children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})})]})})},U1=go;var i1=({thumbnail:t,files:r,onRemove:n,onReorder:l,onHandleMainImage:e,mainUrl:a,sx:i})=>{let m=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates}));if(!r?.length)return null;let d=p=>{let{active:u,over:h}=p;if(!(!u||!h||u.id===h.id)&&l){let y=r.findIndex(z=>{let{key:R}=c(z);return R===u.id}),g=r.findIndex(z=>{let{key:R}=c(z);return R===h.id});y!==-1&&g!==-1&&l(y,g);}},f=jsx(AnimatePresence,{initial:!1,children:r.map(p=>jsx(U1,{file:p,thumbnail:t,onRemove:n,onHandleMainImage:e,mainUrl:a,sx:i},c(p).key))});return l?jsx(DndContext,{sensors:m,collisionDetection:closestCenter,onDragEnd:d,children:jsx(SortableContext,{items:r.map(p=>c(p).key),strategy:horizontalListSortingStrategy,children:f})}):f};function N1({file:t}){let r=typeof t=="string"?t:t.name,n=typeof t=="string"?t:URL.createObjectURL(t);return jsx(W1,{sx:{p:1,top:0,left:0,width:1,height:1,position:"absolute"},children:jsx(W1,{component:"img",alt:r,src:n,sx:{width:1,height:1,borderRadius:1,objectFit:"cover"}})})}function a2({sx:t,...r}){return jsx(oo,{size:"small",sx:{top:16,right:16,zIndex:9,position:"absolute",color:n=>i(n.vars.palette.common.whiteChannel,.8),bgcolor:n=>i(n.vars.palette.grey["900Channel"],.72),"&:hover":{bgcolor:n=>i(n.vars.palette.grey["900Channel"],.48)},...t},...r,"aria-label":"Remover arquivo",children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:18})})}function q1(){let t=useTheme(),r=useId(),n=t.vars.palette.primary.main;return jsxs(Fragment,{children:[jsx("defs",{children:jsxs("linearGradient",{id:r,x1:"19.496%",x2:"77.479%",y1:"71.822%",y2:"16.69%",children:[jsx("stop",{offset:"0%",stopColor:n}),jsx("stop",{offset:"100%",stopColor:n,stopOpacity:"0"})]})}),jsx("path",{fill:`url(#${r})`,fillRule:"nonzero",d:"M0 198.78c0 41.458 14.945 79.236 39.539 107.786 28.214 32.765 69.128 53.365 114.734 53.434a148.44 148.44 0 0056.495-11.036c9.051-3.699 19.182-3.274 27.948 1.107a75.779 75.779 0 0033.957 8.01c5.023 0 9.942-.494 14.7-1.433 13.58-2.67 25.94-8.99 36.09-17.94 6.378-5.627 14.547-8.456 22.897-8.446h.142c27.589 0 53.215-8.732 74.492-23.696 19.021-13.36 34.554-31.696 44.904-53.224C474.92 234.58 480 213.388 480 190.958c0-76.93-59.774-139.305-133.498-139.305-7.516 0-14.88.663-22.063 1.899C305.418 21.42 271.355 0 232.499 0a103.651 103.651 0 00-45.88 10.661c-13.24 6.487-25.011 15.705-34.64 26.939-32.698.544-62.931 11.69-87.676 30.291C25.351 97.155 0 144.882 0 198.781z",opacity:"0.2"})]})}function Eo({hideBackground:t,sx:r,...n}){let l=useTheme(),e=l.vars.palette.primary.main,a=l.vars.palette.primary.dark,i=l.vars.palette.primary.darker;return jsxs(W1,{component:"svg",width:"100%",height:"100%",viewBox:"0 0 480 360",xmlns:"http://www.w3.org/2000/svg",sx:{width:320,maxWidth:1,flexShrink:0,height:"auto",...r},...n,children:[!t&&jsx(q1,{}),jsx("defs",{children:jsxs("linearGradient",{id:"linearGradient-2",x1:"30.113%",x2:"30.113%",y1:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopOpacity:"0"}),jsx("stop",{offset:"100%"})]})}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M293.006 206.192c-2.248 2.672-4.676 2.628-6.123 2.251l.054-1.384s5.979-2.733 5.827-2.159c-.057.215.057.733.242 1.292zM309.393 209.217c-3.818 2.206-6.058-.38-6.578-1.112.32-.84.801-2.204.703-2.592-.144-.577 5.827 2.155 5.827 2.155l.048 1.549zM305.303 187.204s3.632-2.093 4.425-1.151c.792.942-4.425 1.151-4.425 1.151zM307.497 188.355s-.598.299.721.681c1.318.383-.721-.681-.721-.681zM285.532 182.599c-.123.036 3.022 2.123 5.862.395-.012 0-5.154-.61-5.862-.395zM291.239 186.591s-.861 1.692-2.625 1.943c-1.764.251 2.625-1.943 2.625-1.943zM302.785 190.262s4.138 6.578 3.346 8.129c-.793 1.552-3.346-8.129-3.346-8.129zM294.62 216.416c0 .368 0 .712-.036.996-.107 1.33-3.381.828-3.381.828-2.99.416-4.066-1.019-4.422-2.392a5.444 5.444 0 01-.164-1.363 5.606 5.606 0 01.054-.819v-.272a1.998 1.998 0 011.859.379c1.331 1.08 3.095.252 3.095.252s1.294.107 1.793.538c.281.242.745-.341 1.098-.897.021.359.054 1.007.074 1.701.024.356.03.714.03 1.049z",opacity:"0.05"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M289.37 216.339s-.897.879-2.589-.479a5.444 5.444 0 01-.164-1.363c.864.658 2.466 1.842 2.753 1.842zM294.62 216.416a.67.67 0 01-.519.132.672.672 0 01-.452-.287c.348-.266.669-.566.956-.897.009.359.015.717.015 1.052zM301.637 217.032c0 .371 0 .715.033.996.108 1.333 3.382.828 3.382.828 2.989.419 4.066-1.017 4.421-2.392a5.728 5.728 0 00.111-2.182v-.272a2.024 2.024 0 00-1.862.379c-1.331 1.08-3.092.251-3.092.251s-1.294.111-1.794.542c-.281.242-.744-.341-1.094-.897a61.426 61.426 0 00-.078 1.701c-.024.35-.03.708-.027 1.046z",opacity:"0.05"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M306.887 216.949s.897.879 2.587-.479c.112-.444.169-.901.167-1.36-.867.655-2.47 1.839-2.754 1.839zM301.637 217.032a.67.67 0 00.969-.155 6.35 6.35 0 01-.957-.897c-.009.356-.014.714-.012 1.052zM319.614 106.269c.063-.138.123-.275.18-.41.057-.134.077-.209.11-.317-.11.237-.206.48-.29.727z",opacity:"0.05"}),jsx("path",{fill:i,fillRule:"nonzero",d:"M157.592 279.461a4.114 4.114 0 01-.917-3.131l13.196-107.979 1.094-8.97a4.142 4.142 0 014.078-3.635l38.654-.257a4.135 4.135 0 004.108-4.249l-.015-.409a4.14 4.14 0 014.135-4.279h40.619a4.134 4.134 0 014.098 4.682 4.137 4.137 0 003.995 4.682l39.01.996a4.13 4.13 0 013.97 4.831l-19.502 113.909-.368 2.152a4.042 4.042 0 01-.598 1.543l-135.557.114z"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M251.256817 123.296578L274.098317 123.296578 274.098317 200.823078 251.256817 200.823078z",transform:"rotate(34.64 262.678 162.06)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M270.624591 129.857671L286.750291 129.857671 286.750291 145.983371 270.624591 145.983371z",transform:"rotate(34.804 278.687 137.92)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M260.275579 145.813111L276.423079 145.813111 276.423079 161.960611 260.275579 161.960611z",opacity:"0.5",transform:"rotate(34.64 268.35 153.887)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M249.191579 161.852111L265.339079 161.852111 265.339079 177.999611 249.191579 177.999611z",opacity:"0.3",transform:"rotate(34.64 257.265 169.926)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M237.472537 121.334214L260.314037 121.334214 260.314037 198.567714 237.472537 198.567714z",transform:"rotate(16.29 248.893 159.951)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M249.053192 123.761554L265.200692 123.761554 265.200692 139.909054 249.053192 139.909054z",transform:"rotate(16.29 257.127 131.835)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M243.584192 142.473554L259.731692 142.473554 259.731692 158.621053 243.584192 158.621053z",opacity:"0.5",transform:"rotate(16.29 251.658 150.547)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M238.116192 161.182554L254.263692 161.182554 254.263692 177.330054 238.116192 177.330054z",opacity:"0.3",transform:"rotate(16.29 246.19 169.256)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M230.099192 121.641542L252.940692 121.641542 252.940692 198.875042 230.099192 198.875042z",transform:"rotate(4.6 241.52 160.258)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M235.800489 122.985499L251.947989 122.985499 251.947989 139.132999 235.800489 139.132999z",transform:"rotate(4.6 243.874 131.06)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M234.234488 142.413498L250.381988 142.413498 250.381988 158.560998 234.234488 158.560998z",opacity:"0.5",transform:"rotate(4.6 242.308 150.487)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M232.672488 161.846499L248.819988 161.846499 248.819988 177.993999 232.672488 177.993999z",opacity:"0.3",transform:"rotate(4.6 240.746 169.92)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M224.736657 123.384871L247.578157 123.384871 247.578157 200.618371 224.736657 200.618371z",transform:"rotate(-2.61 236.157 162.002)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M226.751283 124.659968L242.898783 124.659968 242.898783 140.807468 226.751283 140.807468z",transform:"rotate(-2.61 234.825 132.734)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M228.305601 143.479224L244.473301 143.479224 244.473301 159.646924 228.305601 159.646924z",opacity:"0.5",transform:"rotate(-2.862 236.39 151.563)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M228.525282 163.608968L244.672782 163.608968 244.672782 179.756468 228.525282 179.756468z",opacity:"0.3",transform:"rotate(-2.61 236.599 171.683)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851-29.661 11.466c-1.121-2.093-2.771-4.921-4.813-8.297-7.026-11.642-18.65-29.75-29.001-45.665-11.66-17.938-21.696-33.075-21.696-33.075l7.265-2.093 59.346-17.23 38.854 87.043z"}),jsx("path",{fill:"#000",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851a152.535 152.535 0 01-34.484 3.169c-7.026-11.642-18.65-29.75-29-45.665l-14.42-35.18 59.343-17.218 38.855 87.043z",opacity:"0.1"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M247.777 220.841s-31.526 18.65-78.596 14.432l-37.525-91.486 17.984-3.091 62.168-10.677 35.279 89.043.69 1.779z"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M247.075 219.074c-7.424.365-16.013.329-24.654-.702-9.351-1.101-18.757-3.367-26.82-7.523-6.742-3.471-12.506-7.247-17.532-11.776-13.074-11.759-21.164-28.579-28.429-58.365l62.168-10.677 35.267 89.043z",opacity:"0.1"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M270.203 213.959s-23.239 4.55-46.894 1.749c-9.351-1.1-18.757-3.367-26.82-7.522-6.742-3.471-12.503-7.247-17.532-11.777-16.181-14.557-24.725-36.866-33.536-81.918 0 0 38.633 9.325 76.836-11.101-.012.015 12.865 80.373 47.946 110.569z"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M165.405 131.03s31.416-1.776 40.187-8.548l1.331 4.276s-20.758 9.157-41.518 9.268v-4.996zM165.405 152.137s30.417-1.665 53.399-12.766l.777 1.776s-18.237 10.647-54.176 13.433v-2.443zM167.853 160.362s30.418-1.665 53.397-12.766l.777 1.776s-18.237 10.643-54.174 13.433v-2.443zM170.299 168.599s30.417-1.666 53.399-12.766l.774 1.775s-18.237 10.647-54.173 13.433v-2.442zM172.748 176.835s30.417-1.665 53.396-12.766l.777 1.776s-18.237 10.647-54.173 13.433v-2.443zM175.193 185.075s30.417-1.665 53.399-12.766l.774 1.776s-18.237 10.643-54.173 13.433v-2.443z",opacity:"0.3"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M389.069 287.344s-12.641-.762-11.152 8.097c0 0-.299 1.563 1.124 2.275 0 0 .021-.658 1.295-.434.454.077.916.099 1.375.066a2.832 2.832 0 001.677-.694c.468-.409 3.555-1.468 4.936-7.274 0 0 1.023-1.267.981-1.593l-2.132.897s.73 1.54.156 2.816c0 0-.069-2.759-.479-2.691-.083 0-1.109.533-1.109.533s1.253 2.69.299 4.628c0 0 .359-3.304-.699-4.434l-1.495.876s1.465 2.768.472 5.029c0 0 .254-3.465-.789-4.817l-1.361 1.062s1.379 2.729.539 4.604c0 0-.111-4.036-.835-4.341 0 0-1.195 1.049-1.369 1.494 0 0 .942 1.98.356 3.026 0 0-.359-2.691-.652-2.691 0 0-1.196 1.794-1.309 2.99 0 0 .051-1.818 1.022-3.172a3.593 3.593 0 00-1.818.942s.186-1.262 2.111-1.37c0 0 .981-1.351 1.241-1.435 0 0-1.914-.158-3.074.356 0 0 1.023-1.196 3.427-.649l1.342-1.094s-2.52-.347-3.588.036c0 0 1.229-1.052 3.95-.299l1.462-.873s-2.147-.463-3.426-.299c0 0 1.348-.729 3.856.06l1.044-.47s-1.573-.299-2.033-.358c-.461-.06-.488-.174-.488-.174a5.426 5.426 0 012.957.329s2.222-.813 2.186-.954z"}),jsx("ellipse",{cx:"380.363",cy:"298.487",fill:e,fillRule:"nonzero",opacity:"0.1",rx:"8.945",ry:"1.513"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M394.956 258.102s-7.125-.43-6.279 4.565a1.218 1.218 0 00.631 1.283s.015-.371.733-.245c.255.042.515.054.774.036.349-.023.681-.159.945-.389.264-.23 2.003-.828 2.783-4.102 0 0 .577-.714.553-.897l-1.196.511s.41.87.087 1.591c0 0-.039-1.558-.269-1.522-.048 0-.625.299-.625.299s.706 1.495.173 2.61c0 0 .204-1.862-.394-2.502l-.846.496s.825 1.561.266 2.834c0 0 .143-1.955-.446-2.714l-.765.598s.774 1.539.299 2.595c0 0-.063-2.275-.469-2.446a4.75 4.75 0 00-.775.834s.532 1.118.204 1.707c0 0-.204-1.515-.368-1.521 0 0-.67 1.001-.739 1.689a3.671 3.671 0 01.577-1.794 2.007 2.007 0 00-1.025.532s.104-.711 1.196-.771c0 0 .553-.763.699-.81 0 0-1.079-.09-1.734.2 0 0 .577-.67 1.932-.365l.759-.619s-1.423-.194-2.024.021c0 0 .694-.598 2.227-.161l.826-.494a7.445 7.445 0 00-1.935-.164s.763-.413 2.174.033l.598-.263s-.897-.177-1.148-.203c-.252-.027-.275-.099-.275-.099a3.078 3.078 0 011.668.185s1.232-.46 1.208-.538z"}),jsx("ellipse",{cx:"390.052",cy:"264.383",fill:e,fillRule:"nonzero",opacity:"0.1",rx:"5.044",ry:"1"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M352.896 262.437s-8.604-.52-7.588 5.51a1.47 1.47 0 00.763 1.549s0-.449.897-.299c.309.052.623.067.935.045a1.923 1.923 0 001.142-.473c.318-.279 2.419-.998 3.361-4.951 0 0 .697-.861.667-1.085l-1.468.622s.496 1.046.104 1.916c0 0-.048-1.877-.326-1.835-.056 0-.753.364-.753.364s.852 1.824.209 3.152c0 0 .245-2.249-.475-3.02l-1.023.598s.996 1.886.32 3.423c0 0 .174-2.359-.535-3.289l-.927.724s.939 1.857.365 3.133c0 0-.072-2.747-.565-2.954 0 0-.81.715-.933 1.008 0 0 .64 1.348.242 2.06 0 0-.245-1.83-.445-1.839 0 0-.804 1.214-.897 2.042.04-.768.28-1.512.697-2.159a2.427 2.427 0 00-1.235.643s.125-.858 1.435-.933c0 0 .667-.92.846-.974 0 0-1.303-.111-2.093.239 0 0 .694-.807 2.329-.44l.915-.747s-1.713-.233-2.442.024c0 0 .837-.715 2.69-.191l.996-.598s-1.462-.314-2.335-.201c0 0 .921-.496 2.625.042l.711-.32s-1.07-.209-1.384-.242c-.314-.033-.329-.119-.329-.119a3.69 3.69 0 012.012.221s1.519-.553 1.492-.646z"}),jsx("ellipse",{cx:"346.97",cy:"270.022",fill:e,fillRule:"nonzero",opacity:"0.1",rx:"6.09",ry:"1.028"}),jsx("rect",{width:"51.026",height:"91.312",x:"303.926",y:"69.211",fill:"#FFF",fillRule:"nonzero",rx:"4.737",transform:"rotate(-71.99 329.44 114.867)"}),jsx("circle",{cx:"303.613",cy:"103.507",r:"9.376",fill:e,fillRule:"nonzero",opacity:"0.2"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M344.582495 86.4883769L347.150665 86.4883769 347.150665 127.336977 344.582495 127.336977z",opacity:"0.2",transform:"rotate(-71.99 345.867 106.913)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M333.028401 99.6373982L335.596571 99.6373982 335.596571 120.445898 333.028401 120.445898z",opacity:"0.2",transform:"rotate(-71.99 334.312 110.042)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M337.109071 101.431004L339.677241 101.431004 339.677241 135.086304 337.109071 135.086304z",opacity:"0.2",transform:"rotate(-71.99 338.393 118.259)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M338.505494 105.174377L341.073664 105.174377 341.073664 146.022978 338.505494 146.022978z",opacity:"0.2",transform:"rotate(-71.99 339.79 125.599)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M348.060839 134.648161L353.026769 134.648161 353.026769 145.952261 348.060839 145.952261z",opacity:"0.5",transform:"rotate(-71.99 350.544 140.3)"}),jsx("rect",{width:"50.3",height:"78.305",x:"291.549",y:"174.486",fill:"#FFF",fillRule:"nonzero",rx:"4",transform:"rotate(-57.265 316.7 213.638)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M278.038439 203.88874L292.269539 203.88874 292.269539 207.23723 278.038439 207.23723z",transform:"rotate(-57.57 285.154 205.563)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M283.007935 199.201889L314.262535 199.201889 314.262535 202.272339 283.007935 202.272339z",transform:"rotate(-57.57 298.635 200.737)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M288.543935 202.715889L319.798535 202.715889 319.798535 205.786339 288.543935 205.786339z",transform:"rotate(-57.57 304.171 204.251)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M294.078936 206.235889L325.333536 206.235889 325.333536 209.306339 294.078936 209.306339z",transform:"rotate(-57.57 309.706 207.771)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M299.879919 211.40702L331.090719 211.40702 331.090719 214.47316 299.879919 214.47316z",transform:"rotate(-57.265 315.485 212.94)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M305.149936 213.268889L336.404536 213.268889 336.404536 216.339339 305.149936 216.339339z",transform:"rotate(-57.57 320.777 214.804)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M310.685935 216.782889L341.940535 216.782889 341.940535 219.853339 310.685935 219.853339z",transform:"rotate(-57.57 326.313 218.318)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M341.417983 210.406958L349.511163 210.406958 349.511163 218.500138 341.417983 218.500138z",transform:"rotate(-57.57 345.465 214.454)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z"}),jsx("path",{fill:a,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.243"}),jsx("path",{fill:"url(#linearGradient-2)",fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.32"}),jsx("ellipse",{cx:"119.593",cy:"258.664",fill:e,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),jsx("ellipse",{cx:"101.03",cy:"260.545",fill:e,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),jsx("ellipse",{cx:"108.459",cy:"265.905",fill:e,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),jsx("ellipse",{cx:"89.193",cy:"265.433",fill:e,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M100.925 260.398s6.796-22.279-1.064-31.204c-5.881-6.676-12.557-5.877-15.547-5.052a5.528 5.528 0 00-3.564 2.963c-1.046 2.254-.858 5.913 6.521 10.186 12.35 7.151 13.119 16.96 13.119 16.96l.535 6.147z"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M85.382 227.302s20.031 6.278 15.546 33.096M97.083 229.547s-2.76 1.86-1.88 4.655M87.39 231.203s1.687-1.716 3.741-.768M95.31 239.832s2.963-1.495 3.728.379M102.638 242.962s-2.224-.176-2.263.897"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M101.2 260.575s-7.961-16.193-10.147-15.846c-1.037.17-1.516 1.196-1.734 2.218a6.516 6.516 0 00.434 3.941c1.13 2.601 4.165 7.519 11.447 9.687z"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M91.113 247.808s8.353 12.115 9.968 12.647"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M90.344 249.701L92.293 249.701"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M92.68 254.132L95.738 254.263"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M94.542 250.586L94.21 252.179"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M97.792 255.432L97.732 256.879"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M100.964 260.575s7.959-16.193 10.144-15.846c1.041.17 1.519 1.196 1.734 2.218a6.514 6.514 0 01-.433 3.941c-1.13 2.601-4.168 7.519-11.445 9.687z"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.051 247.808s-8.371 12.115-9.97 12.647"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.82 249.701L109.871 249.701"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M109.485 254.132L106.426 254.263"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M107.622 250.586L107.954 252.179"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M104.372 255.432L104.432 256.879"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M87.295 264.357a1.375 1.375 0 01-.452-.685.599.599 0 01.317-.697c.3-.11.598.09.837.299.24.21.512.431.81.38a1.237 1.237 0 01-.382-1.16.47.47 0 01.105-.236c.161-.174.454-.099.648.039.598.43.787 1.264.79 2.018.03-.277.03-.555 0-.831a.853.853 0 01.334-.727.938.938 0 01.476-.114.988.988 0 01.774.222.767.767 0 01-.03.947c-.229.257-.5.474-.801.64a1.805 1.805 0 00-.571.547.399.399 0 00-.042.096h-1.74a4.826 4.826 0 01-1.073-.738zM117.626 257.833a1.355 1.355 0 01-.452-.682.599.599 0 01.314-.696c.299-.111.598.089.837.299.239.209.509.436.817.391a1.236 1.236 0 01-.386-1.157.472.472 0 01.107-.236c.162-.173.455-.099.649.036.613.433.787 1.268.79 2.021a4.008 4.008 0 000-.834.852.852 0 01.299-.736.955.955 0 01.475-.11.998.998 0 01.774.218.768.768 0 01-.033.951 2.996 2.996 0 01-.798.64 1.767 1.767 0 00-.571.544.499.499 0 00-.042.098h-1.701a4.78 4.78 0 01-1.079-.747zM107.518 264.357a1.406 1.406 0 01-.455-.685.6.6 0 01.317-.697c.299-.11.598.09.837.299.239.21.505.437.816.395a1.247 1.247 0 01-.385-1.16.472.472 0 01.107-.236c.162-.174.455-.099.649.039.613.43.783 1.264.789 2.018.03-.277.03-.555 0-.832a.855.855 0 01.314-.735.93.93 0 01.476-.114.988.988 0 01.774.222.764.764 0 01-.033.947 3.028 3.028 0 01-.798.64 1.798 1.798 0 00-.571.547.411.411 0 00-.042.096h-1.734c-.385-.2-.742-.45-1.061-.744z"}),jsx("circle",{cx:"84.467",cy:"87.003",r:"6.467",fill:e,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"395.425",cy:"138.681",r:"6.467",fill:e,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"279.178",cy:"66.467",r:"6.467",fill:e,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"97.4",cy:"122.68",r:"10.838",fill:e,fillRule:"nonzero",opacity:"0.1"}),jsx("path",{fill:a,fillRule:"nonzero",d:"M206.029 209.911c-7.975 0-14.44 6.465-14.44 14.44s6.465 14.44 14.44 14.44 14.44-6.465 14.44-14.44-6.465-14.44-14.44-14.44z"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M206.029 211.59c7.047 0 12.761 5.714 12.761 12.761 0 7.048-5.714 12.761-12.761 12.761-7.048 0-12.761-5.713-12.761-12.761.006-7.045 5.716-12.754 12.761-12.761",opacity:"0.72"}),jsx("path",{fill:a,fillRule:"nonzero",d:"M200.058 225.406l-.699-.681a.721.721 0 010-1.065l6.127-5.984a.753.753 0 01.546-.231c.206 0 .404.083.545.231l6.127 5.978a.733.733 0 010 1.065l-.699.682a.768.768 0 01-1.091 0l-3.622-3.727v8.843a.725.725 0 01-.219.523.76.76 0 01-.534.217h-1.009a.75.75 0 01-.759-.74v-8.832l-3.622 3.726a.768.768 0 01-1.091-.005z"})]})}var G1=memo(Eo);var _o=({header:t,description:r,sx:n,...l})=>jsxs(V,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...l,children:[jsx(G1,{sx:{width:220}}),jsxs("div",{children:[jsx(a1,{gutterBottom:!0,variant:"h5",children:t||"Soltar ou selecionar arquivos"}),jsx(a1,{variant:"body2",sx:{color:"text.secondary"},children:r||jsxs(Fragment,{children:["Solte os arquivos aqui ou clique",jsx(a1,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua m\xE1quina"]})})]})]}),s1=memo(_o);var $1=styled(W1,{shouldForwardProp:t=>!["isDragActive","isError","disabled"].includes(t)})(({theme:t,isDragActive:r,isError:n,disabled:l})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:t.spacing(5),borderRadius:t.shape.borderRadius,transition:t.transitions.create("padding"),backgroundColor:t.palette.background.neutral,border:`1px dashed ${alpha(t.palette.grey[500],.32)}`,...r&&{opacity:.72},...n&&{color:t.palette.error.main,backgroundColor:t.palette.error.lighter,borderColor:t.palette.error.light},...l&&{opacity:.48,pointerEvents:"none"},"&:hover":{opacity:.72}}));var Zo=({sx:t,id:r,tabIndex:n,uploading:l,getRootProps:e,getInputProps:a,isDragActive:i,isError:m,disabled:d$1,dropZoneSxProps:f,dropZoneContent:p,children:u,...h})=>jsxs(d,{children:[l&&jsx(a$3,{"data-testid":"uploading-progress-bar"}),jsxs(W1,{sx:{width:1,position:"relative",...t},children:[jsxs($1,{...e(),"data-testid":"drop-zone-styled-area",isError:m,isDragActive:i,disabled:!!d$1,sx:f,...h,children:[jsx("input",{...a(),id:r,tabIndex:n}),p]}),u]})]}),p1=Zo;var $o=({id:t,disabled:r$1,multiple:n=!1,error:l,helperText:e$1,file:a$1,onDelete:i,files:m$1,thumbnail:d,onRemove:f,onHandleMainImage:p$1,mainUrl:u,sx:h,dropZoneProps:y,placeholderProps:g$1,placeholderAlt:z,uploading:R,image:w,tabIndex:A,preview:J="image",onRemoveAll:U,onUpload:P,onReorder:O,...Q})=>{let{getRootProps:W,getInputProps:v,isDragActive:F,isDragReject:E,fileRejections:f1}=useDropzone({multiple:n,disabled:r$1,...Q}),o1=!!a$1&&!n,t1=o1||w,u1=m$1&&n&&m$1.length>0,d1=typeof a$1=="string",h1=E||!!l;if(J==="file")return jsxs(p1,{id:t,uploading:R,disabled:r$1,dropZoneSxProps:y,tabIndex:A,getRootProps:W,getInputProps:v,isDragActive:F,isError:h1,dropZoneContent:jsxs(Fragment,{children:[!o1&&jsx(s1,{}),o1&&jsxs(V,{component:m.div,...j().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:k=>`solid 1px ${k.palette.divider}`,...h},children:[jsx(S,{file:a$1}),jsxs(V,{flexGrow:1,sx:{minWidth:0},children:[jsx(a1,{variant:"subtitle2",noWrap:!0,children:d1?a$1:a$1.name}),jsx(a1,{variant:"caption",sx:{color:"text.secondary"},children:d1?"":e(a$1.size)})]}),i&&jsx(g,{edge:"end",size:"small",disabled:r$1,"aria-label":"Remover arquivo",onClick:k=>{k.stopPropagation(),i();},children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})})]})]}),children:[e$1&&e$1,jsx(r,{files:f1}),u1&&jsxs(Fragment,{children:[jsx(W1,{sx:{my:3},children:jsx(i1,{files:m$1,thumbnail:d,onRemove:f,onHandleMainImage:p$1,mainUrl:u,onReorder:O})}),jsxs(V,{direction:"row",justifyContent:"flex-end",spacing:1.5,children:[U&&jsx(j1,{color:"inherit",variant:"outlined",size:"small",onClick:U,children:"Remover todos"}),P&&jsx(j1,{size:"small",variant:"contained",onClick:P,children:"Enviar arquivos"})]})]})]});let g1=t1?{opacity:0}:void 0;return jsxs(p1,{id:t,uploading:R,disabled:r$1,dropZoneSxProps:y,tabIndex:A,getRootProps:W,getInputProps:v,isDragActive:F,isError:h1,dropZoneContent:jsxs(Fragment,{children:[z?jsx(V,{sx:g1,children:z}):jsx(s1,{sx:g1,header:g$1?.title,description:g$1?.description}),t1&&jsx(N1,{file:a$1||w||""})]}),children:[e$1&&jsx(Ko,{error:!!l,sx:k=>({mx:"14px",color:r$1?k.palette.grey[500]:void 0}),children:e$1}),jsx(r,{files:f1}),t1&&i&&jsx(p,{size:"small",onClick:i,disabled:r$1,"aria-label":"Remover arquivo",children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})}),u1&&jsx(Fragment,{children:jsx(W1,{sx:{my:3,ml:.5},children:jsx(i1,{files:m$1,thumbnail:d,onRemove:f,onHandleMainImage:p$1,mainUrl:u,onReorder:O})})})]})},X1=$o;var Ho=({onFileCropped:t,onImageUploaded:r,onCancel:n,aspect:l,label:e$2,image:a$5="",uploading:i,file:m,tabIndex:d$1,maxSize:f,onDropRejected:p,...u})=>{let{id:h,setCropModalOpen:y,handleRemove:g,toggleCropModalOpen:z,cropModalOpen:R,cancelChanges:w,saveChanges:A,previewImage:J,setCropper:U,preview:P,closePreviewImage:O,saving:Q}=a$1({onFileCropped:t,onImageUploaded:r,onCancel:n}),{error:W}=a$2();return jsxs(Fragment,{children:[jsxs(d,{children:[i&&jsx(a$3,{}),jsx(X1,{...u,maxSize:f,id:h,file:m,onDrop:v=>{if(v.length>0){y(!0);let F=new FileReader;F.addEventListener("load",()=>{let E=F.result?.toString()||"";r(E),t(void 0);}),F.readAsDataURL(v[0]);}},image:a$5,tabIndex:d$1,onDropRejected:(v,F)=>{let E=v[0]?.errors[0]?.code;r(void 0),t(void 0),W(E==="file-too-large"?`Imagem n\xE3o pode ser maior que ${e(f)}`:"Erro ao enviar imagem"),p&&p(v,F);}}),(m||a$5)&&jsxs(e$1,{className:"actions",children:[jsx(j1,{color:"inherit",startIcon:jsx(a,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:g,children:"Remover"}),jsx(j1,{color:"inherit",startIcon:jsx(a,{icon:"SEARCH_IMAGE",color:"primary.maon"}),onClick:z,children:"Editar"})]})]}),jsx(a$4,{id:h,open:R,onClose:w,label:e$2,aspectRatio:l,imageSrc:a$5,onRemove:g,onSave:A,onPreview:J,onInitialized:U,loading:Q}),jsx(Yo,{open:!!P,onClose:O,scroll:"body",PaperProps:{sx:{p:2}},children:P&&jsx("img",{src:P,alt:"Preview"})})]})},fr=Ho;
|
|
29
|
+
|
|
30
|
+
export { i1 as a, N1 as b, a2 as c, X1 as d, fr as e };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { e } from './chunk-ANAHA3L6.js';
|
|
2
|
+
import { i as i$1 } from './chunk-D27ND54J.js';
|
|
3
|
+
import x from '@mui/material/Box';
|
|
4
|
+
import _ from '@mui/material/Paper';
|
|
5
|
+
import z from '@mui/material/Typography';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
import M from '@mui/material/CircularProgress';
|
|
8
|
+
import i from '@mui/material/IconButton';
|
|
9
|
+
import n from '@mui/material/Stack';
|
|
10
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
11
|
+
|
|
12
|
+
var h=["pdf"],y=["txt"],f=["psd"],w=["doc","docx"],I=["xls","xlsx"],v=["zip","rar","iso"],k=["ai","esp"],C=["ppt","pptx"],F=["wav","aif","mp3","aac"],R=["jpg","jpeg","gif","bmp","png","svg","webp"],T=["m4v","avi","mpg","mp4","webm"];function O(o){let e,t=p(o);switch(o.includes(t)){case y.includes(t):e="txt";break;case v.includes(t):e="zip";break;case F.includes(t):e="audio";break;case R.includes(t):e="image";break;case T.includes(t):e="video";break;case w.includes(t):e="word";break;case I.includes(t):e="excel";break;case C.includes(t):e="powerpoint";break;case h.includes(t):e="pdf";break;case f.includes(t):e="photoshop";break;case k.includes(t):e="illustrator";break;case o?.startsWith("http"):e="image";break;default:e=p(o);}return e}function P(o){let e;switch(O(o)){case"folder":e="IC_FOLDER";break;case"txt":e="IC_TXT";break;case"zip":e="IC_ZIP";break;case"audio":e="IC_AUDIO";break;case"video":e="IC_VIDEO";break;case"word":e="IC_WORD";break;case"excel":e="IC_EXCEL";break;case"powerpoint":e="IC_POWER_POINT";break;case"pdf":e="IC_PDF";break;case"photoshop":e="IC_PTS";break;case"illustrator":e="IC_AI";break;case"image":e="IC_IMG";break;default:e="IC_FILE";}return e}function p(o){return o&&o.split(".").pop()||""}function D(o){return o.split("/").pop()}function g(o){return typeof o=="string"?{key:o,preview:o,name:D(o),type:p(o),size:void 0,path:o,lastModified:void 0,lastModifiedDate:void 0}:{key:`key:${o.name}`,name:o.name,size:o.size,path:o.path,type:o.type,preview:o.preview,lastModified:o.lastModified,lastModifiedDate:o.lastModifiedDate}}function N({files:o}){return o.length?jsx(_,{variant:"outlined",sx:{py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",bgcolor:e=>i$1(e.vars.palette.error.mainChannel,.08)},children:o.map(({file:e$1,errors:t})=>{let{path:s,size:c}=g(e$1),m=c?e(c):"";return jsxs(x,{sx:{my:1},children:[jsxs(z,{variant:"subtitle2",noWrap:!0,children:[s," - ",m," "]}),t.map(l=>jsxs(x,{component:"span",sx:{typography:"caption"},children:["- ",l.message]},l.code))]},s)})}):null}var K=styled(n)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),Q=styled(n)(({theme:o})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:alpha(o.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),Y=styled(M)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),oo=styled(i)(({theme:o})=>({position:"relative",zIndex:999,pointerEvents:"auto",bgcolor:alpha(o.palette.grey[900],.72),"&:hover":{backgroundColor:alpha(o.palette.grey[900],.48)}})),eo=styled("div")({position:"relative",zIndex:1,"&:hover":{zIndex:2}}),to=styled(n,{shouldForwardProp:o=>o!=="component"&&o!=="width"})(({theme:o,width:e})=>({width:e,height:80,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:o.spacing(.5),padding:o.spacing(2,1,2,1),borderRadius:o.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${o.palette.divider}`,backgroundColor:o.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:"0px 0px 0px 0px rgba(0, 0, 0, 0)","&:active":{boxShadow:o.customShadows.z8}})),ro=styled(n,{shouldForwardProp:o=>o!=="component"&&o!=="width"})(({theme:o,width:e})=>({width:e,height:60,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:o.spacing(.5),padding:o.spacing(2),borderRadius:o.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${o.palette.divider}`,backgroundColor:o.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:"0px 0px 0px 0px rgba(0, 0, 0, 0)","&:active":{boxShadow:o.customShadows.z8}})),ao=styled(i)(({theme:o})=>({width:36,height:36,position:"absolute",top:10,right:10,borderRadius:12,zIndex:1,opacity:0,transition:"opacity 50ms ease-in-out",color:o.palette.common.white,backgroundColor:alpha(o.palette.grey[900],.48),"&:hover":{backgroundColor:alpha(o.palette.grey[900],.48),opacity:1}})),io=styled(i)(({theme:o})=>({width:24,height:24,position:"absolute",top:18,right:8,borderRadius:12,opacity:1,zIndex:1,transition:"opacity 50ms ease-in-out",color:o.palette.grey[500],backgroundColor:o.palette.common.white,"&:hover":{backgroundColor:o.palette.common.white}})),no=styled(i)(({theme:o})=>({position:"absolute",top:14,left:-2,zIndex:1,color:o.palette.grey[500],cursor:"grab","&:active":{cursor:"grabbing"}})),so=styled(n)({flexDirection:"row",alignItems:"center",justifyContent:"center",width:16,height:16,overflow:"hidden",transform:"scale(0.8)"}),po=styled(i,{shouldForwardProp:o=>o!=="isMainImage"})(({theme:o,isMainImage:e})=>({color:e?o.palette.secondary.main:o.palette.action.disabled,backgroundColor:o.palette.common.white," &:hover":{backgroundColor:o.palette.common.white},top:4,left:8,padding:o.spacing(.5),border:"1px solid",borderColor:e?o.palette.secondary.main:o.palette.divider})),co=styled(i)(({theme:o})=>({top:16,right:16,zIndex:9,position:"absolute",color:alpha(o.palette.common.white,.8),bgcolor:alpha(o.palette.grey[900],.72),"&:hover":{bgcolor:alpha(o.palette.grey[900],.48)}})),lo=styled(x,{shouldForwardProp:o=>o!=="isDragActive"&&o!=="disabled"&&o!=="hasError"})(({theme:o,isDragActive:e,disabled:t,hasError:s})=>({width:64,height:64,flexShrink:0,display:"flex",borderRadius:1,cursor:"pointer",alignItems:"center",color:o.palette.text.disabled,justifyContent:"center",bgcolor:alpha(o.palette.grey[500],.08),border:`dashed 1px ${alpha(o.palette.grey[500],.16)}`,...e&&{opacity:.72},...t&&{opacity:.48,pointerEvents:"none"},...s&&{color:o.palette.error.main,borderColor:o.palette.error.main,bgcolor:alpha(o.palette.error.main,.08)},"&:hover":{opacity:.72}}));
|
|
13
|
+
|
|
14
|
+
export { O as a, P as b, g as c, K as d, Q as e, Y as f, oo as g, eo as h, to as i, ro as j, ao as k, io as l, no as m, so as n, po as o, co as p, lo as q, N as r };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { r, f } from './chunk-4DYDS26F.js';
|
|
2
|
+
import { a as a$3 } from './chunk-VZSJIT33.js';
|
|
3
|
+
import { e } from './chunk-ANAHA3L6.js';
|
|
4
|
+
import { i } from './chunk-D27ND54J.js';
|
|
5
|
+
import { a } from './chunk-VU4X2T7Q.js';
|
|
6
|
+
import { a as a$2 } from './chunk-KFZEM7KS.js';
|
|
7
|
+
import { a as a$1 } from './chunk-X24QANPC.js';
|
|
8
|
+
import { useState, useEffect } from 'react';
|
|
9
|
+
import { useDropzone } from 'react-dropzone';
|
|
10
|
+
import A from '@mui/material/Box';
|
|
11
|
+
import T from '@mui/material/Typography';
|
|
12
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
|
+
import H from '@mui/material/Dialog';
|
|
14
|
+
import J from '@mui/material/Stack';
|
|
15
|
+
|
|
16
|
+
function M({sx:n,error:s,file:e,disabled:d,helperText:m,...f}){let{getRootProps:y,getInputProps:C,isDragActive:b,isDragReject:g,fileRejections:h}=useDropzone({multiple:!1,disabled:d,accept:{"image/*":[]},...f}),r$1=!!e,t=g||!!s,[w,v]=useState();useEffect(()=>{typeof e=="string"?v(e):e instanceof File&&v(URL.createObjectURL(e));},[e]);let R=r$1&&jsx("img",{alt:"avatar",src:w,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover"}}),x=jsxs(A,{className:"upload-placeholder",sx:{top:0,gap:1,left:0,width:1,height:1,zIndex:9,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",color:"text.disabled",flexDirection:"column",justifyContent:"center",bgcolor:o=>i(o.vars.palette.grey["500Channel"],.08),transition:o=>o.transitions.create(["opacity"],{duration:o.transitions.duration.shorter}),"&:hover":{opacity:.72},...t&&{color:"error.main",bgcolor:o=>i(o.vars.palette.error.mainChannel,.08)},...r$1&&{zIndex:9,opacity:0,color:"common.white",bgcolor:o=>i(o.vars.palette.grey["900Channel"],.64)}},children:[jsx(a,{icon:"ADD_IMAGE",width:32}),jsx(T,{variant:"caption",children:r$1?"Atualizar foto":"Enviar foto"})]}),P=jsxs(A,{sx:{width:1,height:1,overflow:"hidden",borderRadius:"50%",position:"relative"},children:[R,x]});return jsxs(Fragment,{children:[jsxs(A,{...y(),sx:{p:1,m:"auto",width:144,height:144,cursor:"pointer",overflow:"hidden",borderRadius:"50%",border:o=>`1px dashed ${i(o.vars.palette.grey["500Channel"],.2)}`,...b&&{opacity:.72},...d&&{opacity:.48,pointerEvents:"none"},...t&&{borderColor:"error.main"},...r$1&&{...t&&{bgcolor:o=>i(o.vars.palette.error.mainChannel,.08)},"&:hover .upload-placeholder":{opacity:1}},...n},children:[jsx("input",{...C()}),P]}),m&&m,jsx(r,{files:h})]})}var K=({onFileCropped:n,onImageUploaded:s,onCancel:e$1,aspect:d,label:m,image:f$1="",uploading:y,file:C,tabIndex:b,maxSize:g,onDropRejected:h,...r})=>{let{id:t,setCropModalOpen:w,handleRemove:v,cropModalOpen:R,cancelChanges:x,saveChanges:P,previewImage:o,setCropper:F,preview:I,closePreviewImage:O,saving:W}=a$1({onFileCropped:n,onImageUploaded:s,onCancel:e$1}),{error:$}=a$2();return jsxs(Fragment,{children:[jsxs(J,{position:"relative",alignItems:"center",justifyContent:"center",children:[y&&jsx(f,{}),jsx(M,{...r,maxSize:g,id:t,file:C,onDrop:i=>{if(i.length>0){w(!0);let p=new FileReader;p.addEventListener("load",()=>{let D=p.result?.toString()||"";s(D),n(i[0]);}),p.readAsDataURL(i[0]);}},image:f$1,tabIndex:b,onDropRejected:(i,p)=>{let D=i[0]?.errors[0]?.code;s(void 0),n(void 0),$(D==="file-too-large"?`Imagem n\xE3o pode ser maior que ${e(g)}`:"Erro ao enviar imagem"),h&&h(i,p);}})]}),jsx(a$3,{id:t,open:R,onClose:x,label:m,aspectRatio:d,imageSrc:f$1,onRemove:v,onSave:P,onPreview:o,onInitialized:F,loading:W}),jsx(H,{open:!!I,onClose:O,scroll:"body",PaperProps:{sx:{p:2}},children:I&&jsx("img",{src:I,alt:"Preview"})})]})},ho=K;
|
|
17
|
+
|
|
18
|
+
export { M as a, ho as b };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
1
|
+
import { b } from '../../../chunk-MOEY2HDZ.js';
|
|
2
|
+
import '../../../chunk-4DYDS26F.js';
|
|
3
3
|
import '../../../chunk-VZSJIT33.js';
|
|
4
4
|
import '../../../chunk-YPJ2OFOV.js';
|
|
5
5
|
import '../../../chunk-ANAHA3L6.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
1
|
+
import { e } from '../../../chunk-46HSLI4G.js';
|
|
2
|
+
import '../../../chunk-4DYDS26F.js';
|
|
3
3
|
import '../../../chunk-VZSJIT33.js';
|
|
4
4
|
import '../../../chunk-YPJ2OFOV.js';
|
|
5
5
|
import '../../../chunk-ANAHA3L6.js';
|
|
@@ -63,7 +63,7 @@ declare function UploadAvatar({ sx, error, file: value, disabled, helperText, ..
|
|
|
63
63
|
|
|
64
64
|
declare const UploadAvatarWithCrop: ({ onFileCropped, onImageUploaded, onCancel, aspect, label, image, uploading, file, tabIndex, maxSize, onDropRejected, ...other }: UploadWithCropProps) => react_jsx_runtime.JSX.Element;
|
|
65
65
|
|
|
66
|
-
declare
|
|
66
|
+
declare const UploadBox: ({ error, disabled, sx, ...other }: UploadProps) => react_jsx_runtime.JSX.Element;
|
|
67
67
|
|
|
68
68
|
declare const UploadWithCrop: ({ onFileCropped, onImageUploaded, onCancel, aspect, label, image, uploading, file, tabIndex, maxSize, onDropRejected, ...other }: UploadWithCropProps) => react_jsx_runtime.JSX.Element;
|
|
69
69
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-
|
|
2
|
-
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-
|
|
3
|
-
|
|
1
|
+
export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-MOEY2HDZ.js';
|
|
2
|
+
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-46HSLI4G.js';
|
|
3
|
+
import { q } from '../../chunk-4DYDS26F.js';
|
|
4
|
+
export { r as RejectionFiles } from '../../chunk-4DYDS26F.js';
|
|
4
5
|
import '../../chunk-VZSJIT33.js';
|
|
5
6
|
import '../../chunk-YPJ2OFOV.js';
|
|
6
7
|
import '../../chunk-ANAHA3L6.js';
|
|
7
8
|
import '../../chunk-T7I256S6.js';
|
|
8
9
|
import '../../chunk-FK7DDO5L.js';
|
|
9
|
-
import
|
|
10
|
+
import '../../chunk-D27ND54J.js';
|
|
10
11
|
import '../../chunk-DMQW3LDF.js';
|
|
11
12
|
import '../../chunk-VU4X2T7Q.js';
|
|
12
13
|
import '../../chunk-IH253O3C.js';
|
|
@@ -15,9 +16,8 @@ import '../../chunk-KFZEM7KS.js';
|
|
|
15
16
|
import '../../chunk-X24QANPC.js';
|
|
16
17
|
import '../../chunk-W3MYAMTH.js';
|
|
17
18
|
import { useDropzone } from 'react-dropzone';
|
|
18
|
-
import h from '@mui/material/Box';
|
|
19
19
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
var B=({error:t,disabled:o,sx:p,...a})=>{let{getRootProps:e,getInputProps:s,isDragActive:f,isDragReject:d}=useDropzone({disabled:o,...a}),m=d||t;return jsxs(q,{...e(),isDragActive:f,hasError:!!m,disabled:!!o,sx:p,"data-testid":"upload-box",children:[jsx("input",{...s()}),"Selecionar arquivo"]})};
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { B as UploadBox };
|
|
@@ -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 ((string & {}) | csstype.Globals | "normal"
|
|
446
|
+
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ("reset" | (string & {}) | csstype.Globals | "normal")[] | 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" | "linear" | "none" | "auto" | "both" | "alternate" | "alternate-reverse" | "backwards" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start")[] | 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
package/dist/chunk-GZDLVT2F.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { q, f } from './chunk-RTC2Y2ZP.js';
|
|
2
|
-
import { a as a$3 } from './chunk-VZSJIT33.js';
|
|
3
|
-
import { e } from './chunk-ANAHA3L6.js';
|
|
4
|
-
import { i } from './chunk-D27ND54J.js';
|
|
5
|
-
import { a } from './chunk-VU4X2T7Q.js';
|
|
6
|
-
import { a as a$2 } from './chunk-KFZEM7KS.js';
|
|
7
|
-
import { a as a$1 } from './chunk-X24QANPC.js';
|
|
8
|
-
import { useState, useEffect } from 'react';
|
|
9
|
-
import { useDropzone } from 'react-dropzone';
|
|
10
|
-
import A from '@mui/material/Box';
|
|
11
|
-
import T from '@mui/material/Typography';
|
|
12
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
|
-
import H from '@mui/material/Dialog';
|
|
14
|
-
import J from '@mui/material/Stack';
|
|
15
|
-
|
|
16
|
-
function M({sx:n,error:s,file:e,disabled:d,helperText:m,...f}){let{getRootProps:y,getInputProps:C,isDragActive:b,isDragReject:g,fileRejections:h}=useDropzone({multiple:!1,disabled:d,accept:{"image/*":[]},...f}),r=!!e,t=g||!!s,[w,v]=useState();useEffect(()=>{typeof e=="string"?v(e):e instanceof File&&v(URL.createObjectURL(e));},[e]);let R=r&&jsx("img",{alt:"avatar",src:w,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover"}}),x=jsxs(A,{className:"upload-placeholder",sx:{top:0,gap:1,left:0,width:1,height:1,zIndex:9,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",color:"text.disabled",flexDirection:"column",justifyContent:"center",bgcolor:o=>i(o.vars.palette.grey["500Channel"],.08),transition:o=>o.transitions.create(["opacity"],{duration:o.transitions.duration.shorter}),"&:hover":{opacity:.72},...t&&{color:"error.main",bgcolor:o=>i(o.vars.palette.error.mainChannel,.08)},...r&&{zIndex:9,opacity:0,color:"common.white",bgcolor:o=>i(o.vars.palette.grey["900Channel"],.64)}},children:[jsx(a,{icon:"ADD_IMAGE",width:32}),jsx(T,{variant:"caption",children:r?"Atualizar foto":"Enviar foto"})]}),P=jsxs(A,{sx:{width:1,height:1,overflow:"hidden",borderRadius:"50%",position:"relative"},children:[R,x]});return jsxs(Fragment,{children:[jsxs(A,{...y(),sx:{p:1,m:"auto",width:144,height:144,cursor:"pointer",overflow:"hidden",borderRadius:"50%",border:o=>`1px dashed ${i(o.vars.palette.grey["500Channel"],.2)}`,...b&&{opacity:.72},...d&&{opacity:.48,pointerEvents:"none"},...t&&{borderColor:"error.main"},...r&&{...t&&{bgcolor:o=>i(o.vars.palette.error.mainChannel,.08)},"&:hover .upload-placeholder":{opacity:1}},...n},children:[jsx("input",{...C()}),P]}),m&&m,jsx(q,{files:h})]})}var K=({onFileCropped:n,onImageUploaded:s,onCancel:e$1,aspect:d,label:m,image:f$1="",uploading:y,file:C,tabIndex:b,maxSize:g,onDropRejected:h,...r})=>{let{id:t,setCropModalOpen:w,handleRemove:v,cropModalOpen:R,cancelChanges:x,saveChanges:P,previewImage:o,setCropper:F,preview:I,closePreviewImage:O,saving:W}=a$1({onFileCropped:n,onImageUploaded:s,onCancel:e$1}),{error:$}=a$2();return jsxs(Fragment,{children:[jsxs(J,{position:"relative",alignItems:"center",justifyContent:"center",children:[y&&jsx(f,{}),jsx(M,{...r,maxSize:g,id:t,file:C,onDrop:i=>{if(i.length>0){w(!0);let p=new FileReader;p.addEventListener("load",()=>{let D=p.result?.toString()||"";s(D),n(i[0]);}),p.readAsDataURL(i[0]);}},image:f$1,tabIndex:b,onDropRejected:(i,p)=>{let D=i[0]?.errors[0]?.code;s(void 0),n(void 0),$(D==="file-too-large"?`Imagem n\xE3o pode ser maior que ${e(g)}`:"Erro ao enviar imagem"),h&&h(i,p);}})]}),jsx(a$3,{id:t,open:R,onClose:x,label:m,aspectRatio:d,imageSrc:f$1,onRemove:v,onSave:P,onPreview:o,onInitialized:F,loading:W}),jsx(H,{open:!!I,onClose:O,scroll:"body",PaperProps:{sx:{p:2}},children:I&&jsx("img",{src:I,alt:"Preview"})})]})},ho=K;
|
|
17
|
-
|
|
18
|
-
export { M as a, ho as b };
|
package/dist/chunk-QATBLJCU.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { c, d, g, q as q$1, p, e as e$1, a as a$5, b, h, o, j as j$1, k, i as i$1, l, m as m$1, n } from './chunk-RTC2Y2ZP.js';
|
|
2
|
-
import { a as a$4 } from './chunk-VZSJIT33.js';
|
|
3
|
-
import { e } from './chunk-ANAHA3L6.js';
|
|
4
|
-
import { a as a$1 } from './chunk-FK7DDO5L.js';
|
|
5
|
-
import { i, o as o$1 } from './chunk-D27ND54J.js';
|
|
6
|
-
import { j } from './chunk-DMQW3LDF.js';
|
|
7
|
-
import { a } from './chunk-VU4X2T7Q.js';
|
|
8
|
-
import { a as a$3 } from './chunk-KFZEM7KS.js';
|
|
9
|
-
import { a as a$2 } from './chunk-X24QANPC.js';
|
|
10
|
-
import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter } from '@dnd-kit/core';
|
|
11
|
-
import { sortableKeyboardCoordinates, SortableContext, horizontalListSortingStrategy, useSortable } from '@dnd-kit/sortable';
|
|
12
|
-
import { AnimatePresence, m } from 'framer-motion';
|
|
13
|
-
import j1 from '@mui/material/ButtonBase';
|
|
14
|
-
import Y1 from '@mui/material/IconButton';
|
|
15
|
-
import { styled, alpha, useTheme } from '@mui/material/styles';
|
|
16
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
17
|
-
import Z from '@mui/material/Box';
|
|
18
|
-
import K from '@mui/material/Stack';
|
|
19
|
-
import Z1 from '@mui/material/Tooltip';
|
|
20
|
-
import { memo, useId } from 'react';
|
|
21
|
-
import r2 from '@mui/material/Badge';
|
|
22
|
-
import q from '@mui/material/Typography';
|
|
23
|
-
import { useDropzone } from 'react-dropzone';
|
|
24
|
-
import N1 from '@mui/material/Button';
|
|
25
|
-
import v2 from '@mui/material/FormHelperText';
|
|
26
|
-
import I2 from '@mui/material/Dialog';
|
|
27
|
-
|
|
28
|
-
function C1({sx:t,...r}){let n=useTheme();return jsx(j1,{sx:{p:0,top:0,right:0,width:1,height:1,zIndex:9,opacity:0,position:"absolute",color:"common.white",borderRadius:"inherit",transition:n.transitions.create(["opacity"]),"&:hover":{...o$1({color:i(n.vars.palette.grey["900Channel"],.64)}),opacity:1},...t},...r,children:jsx(a,{icon:"ARROW_DOWN_CICLE",width:24})})}function k1({sx:t,...r}){return jsx(Y1,{size:"small",sx:{p:.35,top:4,right:4,position:"absolute",color:"common.white",bgcolor:n=>i(n.vars.palette.grey["900Channel"],.48),"&:hover":{bgcolor:n=>i(n.vars.palette.grey["900Channel"],.72)},...t},...r,children:jsx(a,{icon:"CLOSE_MARK_BUTTON",width:12})})}var U={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"};function N({sx:t,file:r,tooltip:n,onRemove:s,imageView:e,slotProps:a$1,onDownload:i,...f}){let z=typeof r=="string"?r:URL.createObjectURL(r),{name:p,path:h}=c(r),u=a$5(h||z),m=jsx(Z,{component:"img",src:z,className:U.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...a$1?.img}}),x=jsx(a,{icon:b(u),sx:{width:32,height:32,flexShrink:0,...t}}),y=jsxs(K,{component:"span",className:U.root,sx:{width:36,height:36,flexShrink:0,borderRadius:1.25,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...t},...f,children:[u==="image"&&e?m:x,s&&jsx(k1,{onClick:s,className:U.removeBtn,sx:a$1?.removeBtn}),i&&jsx(C1,{onClick:i,className:U.downloadBtn,sx:a$1?.downloadBtn})]});return n?jsx(Z1,{arrow:!0,title:p,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:y}):y}var H=Object.freeze({Translate:{toString(t){if(!t)return;let{x:r,y:n}=t;return "translate3d("+(r?Math.round(r):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:r,scaleY:n}=t;return "scaleX("+r+") scaleY("+n+")"}},Transform:{toString(t){if(t)return [H.Translate.toString(t),H.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:r,duration:n,easing:s}=t;return r+" "+n+"ms "+s}}});var Q1=({disableDrag:t,...r})=>t?null:jsx(m$1,{className:"dragIcon",disableRipple:!0,"aria-label":"Arrastar para ordenar",...r,children:jsxs(n,{children:[jsx(a,{sx:{marginLeft:0},icon:"MORE_BOLD",width:16}),jsx(a,{sx:{marginLeft:"-10px"},icon:"MORE_BOLD",width:16})]})}),e1=Q1;var n2=({file:t,thumbnail:r,onRemove:n,onHandleMainImage:s,mainUrl:e$1,sx:a$1,disableDrag:i=!1})=>{let{key:f,name:z="",size:p=0}=c(t),h$1=typeof t=="string",u=i?60:80,m$1=t===e$1,x=m$1?"STAR":"STAR_02",y=m$1?"Remover imagem principal":"Definir como imagem principal",{attributes:R,listeners:B,setNodeRef:I,transform:S,transition:D}=useSortable({id:f,disabled:i}),L={transform:H.Transform.toString(S),transition:D,display:"inline-block",alignItems:"center",justifyContent:"center",width:`${u+8}px`,height:"68px"};return r?jsx(h,{ref:I,style:L,children:jsx(r2,{anchorOrigin:{vertical:"top",horizontal:"left"},badgeContent:s&&jsx(o,{isMainImage:m$1,size:"small",onClick:()=>s(t),"aria-label":y,children:jsx(a,{icon:x,width:12})}),children:jsxs(j$1,{width:u,"data-testid":`preview-multi-img-${f}`,component:m.div,...j().inUp,sx:a$1,children:[jsx(e1,{disableDrag:i,...R,...B}),jsx(N,{tooltip:!0,imageView:!0,file:t,sx:{position:"absolute",right:10,top:10}}),n&&jsx(k,{size:"small","aria-label":"Remover imagem",onClick:()=>n(t),children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})})]})},`badge-${f}`)}):jsx(h,{ref:I,style:{...L,height:"80px",width:`${u+38}px`},children:jsxs(i$1,{width:u+30,"data-testid":`preview-multi-img-${f}`,component:m.div,...j().inUp,sx:a$1,children:[jsx(e1,{disableDrag:i,...R,...B}),jsx(N,{file:t}),jsxs(K,{flexGrow:1,sx:{minWidth:0,width:"100%"},children:[jsx(q,{variant:"subtitle2",noWrap:!0,children:h$1?t:z}),jsx(q,{variant:"caption",sx:{color:"text.secondary"},children:h$1?"":e(p)})]}),n&&jsx(l,{size:"small","aria-label":"Remover arquivo",onClick:()=>n(t),children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})})]})})},i1=n2;var l1=({thumbnail:t,files:r,onRemove:n,onReorder:s,onHandleMainImage:e,mainUrl:a,sx:i})=>{let f=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates}));if(!r?.length)return null;let z=p=>{let{active:h,over:u}=p;if(!(!h||!u||h.id===u.id)&&s){let m=r.findIndex(y=>{let{key:R}=c(y);return R===h.id}),x=r.findIndex(y=>{let{key:R}=c(y);return R===u.id});m!==-1&&x!==-1&&s(m,x);}};return s?jsx(DndContext,{sensors:f,collisionDetection:closestCenter,onDragEnd:z,children:jsx(SortableContext,{items:r.map(p=>c(p).key),strategy:horizontalListSortingStrategy,children:jsx(AnimatePresence,{initial:!1,children:r.map(p=>jsx(i1,{file:p,thumbnail:t,onRemove:n,onHandleMainImage:e,mainUrl:a,sx:i},c(p).key))})})}):jsx(AnimatePresence,{initial:!1,children:r.map(p=>jsx(i1,{file:p,thumbnail:t,onRemove:n,onHandleMainImage:e,mainUrl:a,sx:i},c(p).key))})};function _1({file:t}){let r=typeof t=="string"?t:t.name,n=typeof t=="string"?t:URL.createObjectURL(t);return jsx(Z,{sx:{p:1,top:0,left:0,width:1,height:1,position:"absolute"},children:jsx(Z,{component:"img",alt:r,src:n,sx:{width:1,height:1,borderRadius:1,objectFit:"cover"}})})}function So({sx:t,...r}){return jsx(Y1,{size:"small",sx:{top:16,right:16,zIndex:9,position:"absolute",color:n=>i(n.vars.palette.common.whiteChannel,.8),bgcolor:n=>i(n.vars.palette.grey["900Channel"],.72),"&:hover":{bgcolor:n=>i(n.vars.palette.grey["900Channel"],.48)},...t},...r,children:jsx(a,{icon:"CLOSE_MARK_BUTTON",width:18})})}function O1(){let t=useTheme(),r=useId(),n=t.vars.palette.primary.main;return jsxs(Fragment,{children:[jsx("defs",{children:jsxs("linearGradient",{id:r,x1:"19.496%",x2:"77.479%",y1:"71.822%",y2:"16.69%",children:[jsx("stop",{offset:"0%",stopColor:n}),jsx("stop",{offset:"100%",stopColor:n,stopOpacity:"0"})]})}),jsx("path",{fill:`url(#${r})`,fillRule:"nonzero",d:"M0 198.78c0 41.458 14.945 79.236 39.539 107.786 28.214 32.765 69.128 53.365 114.734 53.434a148.44 148.44 0 0056.495-11.036c9.051-3.699 19.182-3.274 27.948 1.107a75.779 75.779 0 0033.957 8.01c5.023 0 9.942-.494 14.7-1.433 13.58-2.67 25.94-8.99 36.09-17.94 6.378-5.627 14.547-8.456 22.897-8.446h.142c27.589 0 53.215-8.732 74.492-23.696 19.021-13.36 34.554-31.696 44.904-53.224C474.92 234.58 480 213.388 480 190.958c0-76.93-59.774-139.305-133.498-139.305-7.516 0-14.88.663-22.063 1.899C305.418 21.42 271.355 0 232.499 0a103.651 103.651 0 00-45.88 10.661c-13.24 6.487-25.011 15.705-34.64 26.939-32.698.544-62.931 11.69-87.676 30.291C25.351 97.155 0 144.882 0 198.781z",opacity:"0.2"})]})}function x2({hideBackground:t,sx:r,...n}){let s=useTheme(),e=s.vars.palette.primary.main,a=s.vars.palette.primary.dark,i=s.vars.palette.primary.darker;return jsxs(Z,{component:"svg",width:"100%",height:"100%",viewBox:"0 0 480 360",xmlns:"http://www.w3.org/2000/svg",sx:{width:320,maxWidth:1,flexShrink:0,height:"auto",...r},...n,children:[!t&&jsx(O1,{}),jsx("defs",{children:jsxs("linearGradient",{id:"linearGradient-2",x1:"30.113%",x2:"30.113%",y1:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopOpacity:"0"}),jsx("stop",{offset:"100%"})]})}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M293.006 206.192c-2.248 2.672-4.676 2.628-6.123 2.251l.054-1.384s5.979-2.733 5.827-2.159c-.057.215.057.733.242 1.292zM309.393 209.217c-3.818 2.206-6.058-.38-6.578-1.112.32-.84.801-2.204.703-2.592-.144-.577 5.827 2.155 5.827 2.155l.048 1.549zM305.303 187.204s3.632-2.093 4.425-1.151c.792.942-4.425 1.151-4.425 1.151zM307.497 188.355s-.598.299.721.681c1.318.383-.721-.681-.721-.681zM285.532 182.599c-.123.036 3.022 2.123 5.862.395-.012 0-5.154-.61-5.862-.395zM291.239 186.591s-.861 1.692-2.625 1.943c-1.764.251 2.625-1.943 2.625-1.943zM302.785 190.262s4.138 6.578 3.346 8.129c-.793 1.552-3.346-8.129-3.346-8.129zM294.62 216.416c0 .368 0 .712-.036.996-.107 1.33-3.381.828-3.381.828-2.99.416-4.066-1.019-4.422-2.392a5.444 5.444 0 01-.164-1.363 5.606 5.606 0 01.054-.819v-.272a1.998 1.998 0 011.859.379c1.331 1.08 3.095.252 3.095.252s1.294.107 1.793.538c.281.242.745-.341 1.098-.897.021.359.054 1.007.074 1.701.024.356.03.714.03 1.049z",opacity:"0.05"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M289.37 216.339s-.897.879-2.589-.479a5.444 5.444 0 01-.164-1.363c.864.658 2.466 1.842 2.753 1.842zM294.62 216.416a.67.67 0 01-.519.132.672.672 0 01-.452-.287c.348-.266.669-.566.956-.897.009.359.015.717.015 1.052zM301.637 217.032c0 .371 0 .715.033.996.108 1.333 3.382.828 3.382.828 2.989.419 4.066-1.017 4.421-2.392a5.728 5.728 0 00.111-2.182v-.272a2.024 2.024 0 00-1.862.379c-1.331 1.08-3.092.251-3.092.251s-1.294.111-1.794.542c-.281.242-.744-.341-1.094-.897a61.426 61.426 0 00-.078 1.701c-.024.35-.03.708-.027 1.046z",opacity:"0.05"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M306.887 216.949s.897.879 2.587-.479c.112-.444.169-.901.167-1.36-.867.655-2.47 1.839-2.754 1.839zM301.637 217.032a.67.67 0 00.969-.155 6.35 6.35 0 01-.957-.897c-.009.356-.014.714-.012 1.052zM319.614 106.269c.063-.138.123-.275.18-.41.057-.134.077-.209.11-.317-.11.237-.206.48-.29.727z",opacity:"0.05"}),jsx("path",{fill:i,fillRule:"nonzero",d:"M157.592 279.461a4.114 4.114 0 01-.917-3.131l13.196-107.979 1.094-8.97a4.142 4.142 0 014.078-3.635l38.654-.257a4.135 4.135 0 004.108-4.249l-.015-.409a4.14 4.14 0 014.135-4.279h40.619a4.134 4.134 0 014.098 4.682 4.137 4.137 0 003.995 4.682l39.01.996a4.13 4.13 0 013.97 4.831l-19.502 113.909-.368 2.152a4.042 4.042 0 01-.598 1.543l-135.557.114z"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M251.256817 123.296578L274.098317 123.296578 274.098317 200.823078 251.256817 200.823078z",transform:"rotate(34.64 262.678 162.06)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M270.624591 129.857671L286.750291 129.857671 286.750291 145.983371 270.624591 145.983371z",transform:"rotate(34.804 278.687 137.92)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M260.275579 145.813111L276.423079 145.813111 276.423079 161.960611 260.275579 161.960611z",opacity:"0.5",transform:"rotate(34.64 268.35 153.887)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M249.191579 161.852111L265.339079 161.852111 265.339079 177.999611 249.191579 177.999611z",opacity:"0.3",transform:"rotate(34.64 257.265 169.926)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M237.472537 121.334214L260.314037 121.334214 260.314037 198.567714 237.472537 198.567714z",transform:"rotate(16.29 248.893 159.951)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M249.053192 123.761554L265.200692 123.761554 265.200692 139.909054 249.053192 139.909054z",transform:"rotate(16.29 257.127 131.835)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M243.584192 142.473554L259.731692 142.473554 259.731692 158.621053 243.584192 158.621053z",opacity:"0.5",transform:"rotate(16.29 251.658 150.547)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M238.116192 161.182554L254.263692 161.182554 254.263692 177.330054 238.116192 177.330054z",opacity:"0.3",transform:"rotate(16.29 246.19 169.256)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M230.099192 121.641542L252.940692 121.641542 252.940692 198.875042 230.099192 198.875042z",transform:"rotate(4.6 241.52 160.258)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M235.800489 122.985499L251.947989 122.985499 251.947989 139.132999 235.800489 139.132999z",transform:"rotate(4.6 243.874 131.06)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M234.234488 142.413498L250.381988 142.413498 250.381988 158.560998 234.234488 158.560998z",opacity:"0.5",transform:"rotate(4.6 242.308 150.487)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M232.672488 161.846499L248.819988 161.846499 248.819988 177.993999 232.672488 177.993999z",opacity:"0.3",transform:"rotate(4.6 240.746 169.92)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M224.736657 123.384871L247.578157 123.384871 247.578157 200.618371 224.736657 200.618371z",transform:"rotate(-2.61 236.157 162.002)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M226.751283 124.659968L242.898783 124.659968 242.898783 140.807468 226.751283 140.807468z",transform:"rotate(-2.61 234.825 132.734)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M228.305601 143.479224L244.473301 143.479224 244.473301 159.646924 228.305601 159.646924z",opacity:"0.5",transform:"rotate(-2.862 236.39 151.563)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M228.525282 163.608968L244.672782 163.608968 244.672782 179.756468 228.525282 179.756468z",opacity:"0.3",transform:"rotate(-2.61 236.599 171.683)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851-29.661 11.466c-1.121-2.093-2.771-4.921-4.813-8.297-7.026-11.642-18.65-29.75-29.001-45.665-11.66-17.938-21.696-33.075-21.696-33.075l7.265-2.093 59.346-17.23 38.854 87.043z"}),jsx("path",{fill:"#000",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851a152.535 152.535 0 01-34.484 3.169c-7.026-11.642-18.65-29.75-29-45.665l-14.42-35.18 59.343-17.218 38.855 87.043z",opacity:"0.1"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M247.777 220.841s-31.526 18.65-78.596 14.432l-37.525-91.486 17.984-3.091 62.168-10.677 35.279 89.043.69 1.779z"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M247.075 219.074c-7.424.365-16.013.329-24.654-.702-9.351-1.101-18.757-3.367-26.82-7.523-6.742-3.471-12.506-7.247-17.532-11.776-13.074-11.759-21.164-28.579-28.429-58.365l62.168-10.677 35.267 89.043z",opacity:"0.1"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M270.203 213.959s-23.239 4.55-46.894 1.749c-9.351-1.1-18.757-3.367-26.82-7.522-6.742-3.471-12.503-7.247-17.532-11.777-16.181-14.557-24.725-36.866-33.536-81.918 0 0 38.633 9.325 76.836-11.101-.012.015 12.865 80.373 47.946 110.569z"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M165.405 131.03s31.416-1.776 40.187-8.548l1.331 4.276s-20.758 9.157-41.518 9.268v-4.996zM165.405 152.137s30.417-1.665 53.399-12.766l.777 1.776s-18.237 10.647-54.176 13.433v-2.443zM167.853 160.362s30.418-1.665 53.397-12.766l.777 1.776s-18.237 10.643-54.174 13.433v-2.443zM170.299 168.599s30.417-1.666 53.399-12.766l.774 1.775s-18.237 10.647-54.173 13.433v-2.442zM172.748 176.835s30.417-1.665 53.396-12.766l.777 1.776s-18.237 10.647-54.173 13.433v-2.443zM175.193 185.075s30.417-1.665 53.399-12.766l.774 1.776s-18.237 10.643-54.173 13.433v-2.443z",opacity:"0.3"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M389.069 287.344s-12.641-.762-11.152 8.097c0 0-.299 1.563 1.124 2.275 0 0 .021-.658 1.295-.434.454.077.916.099 1.375.066a2.832 2.832 0 001.677-.694c.468-.409 3.555-1.468 4.936-7.274 0 0 1.023-1.267.981-1.593l-2.132.897s.73 1.54.156 2.816c0 0-.069-2.759-.479-2.691-.083 0-1.109.533-1.109.533s1.253 2.69.299 4.628c0 0 .359-3.304-.699-4.434l-1.495.876s1.465 2.768.472 5.029c0 0 .254-3.465-.789-4.817l-1.361 1.062s1.379 2.729.539 4.604c0 0-.111-4.036-.835-4.341 0 0-1.195 1.049-1.369 1.494 0 0 .942 1.98.356 3.026 0 0-.359-2.691-.652-2.691 0 0-1.196 1.794-1.309 2.99 0 0 .051-1.818 1.022-3.172a3.593 3.593 0 00-1.818.942s.186-1.262 2.111-1.37c0 0 .981-1.351 1.241-1.435 0 0-1.914-.158-3.074.356 0 0 1.023-1.196 3.427-.649l1.342-1.094s-2.52-.347-3.588.036c0 0 1.229-1.052 3.95-.299l1.462-.873s-2.147-.463-3.426-.299c0 0 1.348-.729 3.856.06l1.044-.47s-1.573-.299-2.033-.358c-.461-.06-.488-.174-.488-.174a5.426 5.426 0 012.957.329s2.222-.813 2.186-.954z"}),jsx("ellipse",{cx:"380.363",cy:"298.487",fill:e,fillRule:"nonzero",opacity:"0.1",rx:"8.945",ry:"1.513"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M394.956 258.102s-7.125-.43-6.279 4.565a1.218 1.218 0 00.631 1.283s.015-.371.733-.245c.255.042.515.054.774.036.349-.023.681-.159.945-.389.264-.23 2.003-.828 2.783-4.102 0 0 .577-.714.553-.897l-1.196.511s.41.87.087 1.591c0 0-.039-1.558-.269-1.522-.048 0-.625.299-.625.299s.706 1.495.173 2.61c0 0 .204-1.862-.394-2.502l-.846.496s.825 1.561.266 2.834c0 0 .143-1.955-.446-2.714l-.765.598s.774 1.539.299 2.595c0 0-.063-2.275-.469-2.446a4.75 4.75 0 00-.775.834s.532 1.118.204 1.707c0 0-.204-1.515-.368-1.521 0 0-.67 1.001-.739 1.689a3.671 3.671 0 01.577-1.794 2.007 2.007 0 00-1.025.532s.104-.711 1.196-.771c0 0 .553-.763.699-.81 0 0-1.079-.09-1.734.2 0 0 .577-.67 1.932-.365l.759-.619s-1.423-.194-2.024.021c0 0 .694-.598 2.227-.161l.826-.494a7.445 7.445 0 00-1.935-.164s.763-.413 2.174.033l.598-.263s-.897-.177-1.148-.203c-.252-.027-.275-.099-.275-.099a3.078 3.078 0 011.668.185s1.232-.46 1.208-.538z"}),jsx("ellipse",{cx:"390.052",cy:"264.383",fill:e,fillRule:"nonzero",opacity:"0.1",rx:"5.044",ry:"1"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M352.896 262.437s-8.604-.52-7.588 5.51a1.47 1.47 0 00.763 1.549s0-.449.897-.299c.309.052.623.067.935.045a1.923 1.923 0 001.142-.473c.318-.279 2.419-.998 3.361-4.951 0 0 .697-.861.667-1.085l-1.468.622s.496 1.046.104 1.916c0 0-.048-1.877-.326-1.835-.056 0-.753.364-.753.364s.852 1.824.209 3.152c0 0 .245-2.249-.475-3.02l-1.023.598s.996 1.886.32 3.423c0 0 .174-2.359-.535-3.289l-.927.724s.939 1.857.365 3.133c0 0-.072-2.747-.565-2.954 0 0-.81.715-.933 1.008 0 0 .64 1.348.242 2.06 0 0-.245-1.83-.445-1.839 0 0-.804 1.214-.897 2.042.04-.768.28-1.512.697-2.159a2.427 2.427 0 00-1.235.643s.125-.858 1.435-.933c0 0 .667-.92.846-.974 0 0-1.303-.111-2.093.239 0 0 .694-.807 2.329-.44l.915-.747s-1.713-.233-2.442.024c0 0 .837-.715 2.69-.191l.996-.598s-1.462-.314-2.335-.201c0 0 .921-.496 2.625.042l.711-.32s-1.07-.209-1.384-.242c-.314-.033-.329-.119-.329-.119a3.69 3.69 0 012.012.221s1.519-.553 1.492-.646z"}),jsx("ellipse",{cx:"346.97",cy:"270.022",fill:e,fillRule:"nonzero",opacity:"0.1",rx:"6.09",ry:"1.028"}),jsx("rect",{width:"51.026",height:"91.312",x:"303.926",y:"69.211",fill:"#FFF",fillRule:"nonzero",rx:"4.737",transform:"rotate(-71.99 329.44 114.867)"}),jsx("circle",{cx:"303.613",cy:"103.507",r:"9.376",fill:e,fillRule:"nonzero",opacity:"0.2"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M344.582495 86.4883769L347.150665 86.4883769 347.150665 127.336977 344.582495 127.336977z",opacity:"0.2",transform:"rotate(-71.99 345.867 106.913)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M333.028401 99.6373982L335.596571 99.6373982 335.596571 120.445898 333.028401 120.445898z",opacity:"0.2",transform:"rotate(-71.99 334.312 110.042)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M337.109071 101.431004L339.677241 101.431004 339.677241 135.086304 337.109071 135.086304z",opacity:"0.2",transform:"rotate(-71.99 338.393 118.259)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M338.505494 105.174377L341.073664 105.174377 341.073664 146.022978 338.505494 146.022978z",opacity:"0.2",transform:"rotate(-71.99 339.79 125.599)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M348.060839 134.648161L353.026769 134.648161 353.026769 145.952261 348.060839 145.952261z",opacity:"0.5",transform:"rotate(-71.99 350.544 140.3)"}),jsx("rect",{width:"50.3",height:"78.305",x:"291.549",y:"174.486",fill:"#FFF",fillRule:"nonzero",rx:"4",transform:"rotate(-57.265 316.7 213.638)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M278.038439 203.88874L292.269539 203.88874 292.269539 207.23723 278.038439 207.23723z",transform:"rotate(-57.57 285.154 205.563)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M283.007935 199.201889L314.262535 199.201889 314.262535 202.272339 283.007935 202.272339z",transform:"rotate(-57.57 298.635 200.737)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M288.543935 202.715889L319.798535 202.715889 319.798535 205.786339 288.543935 205.786339z",transform:"rotate(-57.57 304.171 204.251)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M294.078936 206.235889L325.333536 206.235889 325.333536 209.306339 294.078936 209.306339z",transform:"rotate(-57.57 309.706 207.771)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M299.879919 211.40702L331.090719 211.40702 331.090719 214.47316 299.879919 214.47316z",transform:"rotate(-57.265 315.485 212.94)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M305.149936 213.268889L336.404536 213.268889 336.404536 216.339339 305.149936 216.339339z",transform:"rotate(-57.57 320.777 214.804)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M310.685935 216.782889L341.940535 216.782889 341.940535 219.853339 310.685935 219.853339z",transform:"rotate(-57.57 326.313 218.318)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M341.417983 210.406958L349.511163 210.406958 349.511163 218.500138 341.417983 218.500138z",transform:"rotate(-57.57 345.465 214.454)"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z"}),jsx("path",{fill:a,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.243"}),jsx("path",{fill:"url(#linearGradient-2)",fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.32"}),jsx("ellipse",{cx:"119.593",cy:"258.664",fill:e,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),jsx("ellipse",{cx:"101.03",cy:"260.545",fill:e,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),jsx("ellipse",{cx:"108.459",cy:"265.905",fill:e,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),jsx("ellipse",{cx:"89.193",cy:"265.433",fill:e,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M100.925 260.398s6.796-22.279-1.064-31.204c-5.881-6.676-12.557-5.877-15.547-5.052a5.528 5.528 0 00-3.564 2.963c-1.046 2.254-.858 5.913 6.521 10.186 12.35 7.151 13.119 16.96 13.119 16.96l.535 6.147z"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M85.382 227.302s20.031 6.278 15.546 33.096M97.083 229.547s-2.76 1.86-1.88 4.655M87.39 231.203s1.687-1.716 3.741-.768M95.31 239.832s2.963-1.495 3.728.379M102.638 242.962s-2.224-.176-2.263.897"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M101.2 260.575s-7.961-16.193-10.147-15.846c-1.037.17-1.516 1.196-1.734 2.218a6.516 6.516 0 00.434 3.941c1.13 2.601 4.165 7.519 11.447 9.687z"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M91.113 247.808s8.353 12.115 9.968 12.647"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M90.344 249.701L92.293 249.701"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M92.68 254.132L95.738 254.263"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M94.542 250.586L94.21 252.179"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M97.792 255.432L97.732 256.879"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M100.964 260.575s7.959-16.193 10.144-15.846c1.041.17 1.519 1.196 1.734 2.218a6.514 6.514 0 01-.433 3.941c-1.13 2.601-4.168 7.519-11.445 9.687z"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.051 247.808s-8.371 12.115-9.97 12.647"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.82 249.701L109.871 249.701"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M109.485 254.132L106.426 254.263"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M107.622 250.586L107.954 252.179"}),jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M104.372 255.432L104.432 256.879"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M87.295 264.357a1.375 1.375 0 01-.452-.685.599.599 0 01.317-.697c.3-.11.598.09.837.299.24.21.512.431.81.38a1.237 1.237 0 01-.382-1.16.47.47 0 01.105-.236c.161-.174.454-.099.648.039.598.43.787 1.264.79 2.018.03-.277.03-.555 0-.831a.853.853 0 01.334-.727.938.938 0 01.476-.114.988.988 0 01.774.222.767.767 0 01-.03.947c-.229.257-.5.474-.801.64a1.805 1.805 0 00-.571.547.399.399 0 00-.042.096h-1.74a4.826 4.826 0 01-1.073-.738zM117.626 257.833a1.355 1.355 0 01-.452-.682.599.599 0 01.314-.696c.299-.111.598.089.837.299.239.209.509.436.817.391a1.236 1.236 0 01-.386-1.157.472.472 0 01.107-.236c.162-.173.455-.099.649.036.613.433.787 1.268.79 2.021a4.008 4.008 0 000-.834.852.852 0 01.299-.736.955.955 0 01.475-.11.998.998 0 01.774.218.768.768 0 01-.033.951 2.996 2.996 0 01-.798.64 1.767 1.767 0 00-.571.544.499.499 0 00-.042.098h-1.701a4.78 4.78 0 01-1.079-.747zM107.518 264.357a1.406 1.406 0 01-.455-.685.6.6 0 01.317-.697c.299-.11.598.09.837.299.239.21.505.437.816.395a1.247 1.247 0 01-.385-1.16.472.472 0 01.107-.236c.162-.174.455-.099.649.039.613.43.783 1.264.789 2.018.03-.277.03-.555 0-.832a.855.855 0 01.314-.735.93.93 0 01.476-.114.988.988 0 01.774.222.764.764 0 01-.033.947 3.028 3.028 0 01-.798.64 1.798 1.798 0 00-.571.547.411.411 0 00-.042.096h-1.734c-.385-.2-.742-.45-1.061-.744z"}),jsx("circle",{cx:"84.467",cy:"87.003",r:"6.467",fill:e,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"395.425",cy:"138.681",r:"6.467",fill:e,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"279.178",cy:"66.467",r:"6.467",fill:e,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"97.4",cy:"122.68",r:"10.838",fill:e,fillRule:"nonzero",opacity:"0.1"}),jsx("path",{fill:a,fillRule:"nonzero",d:"M206.029 209.911c-7.975 0-14.44 6.465-14.44 14.44s6.465 14.44 14.44 14.44 14.44-6.465 14.44-14.44-6.465-14.44-14.44-14.44z"}),jsx("path",{fill:e,fillRule:"nonzero",d:"M206.029 211.59c7.047 0 12.761 5.714 12.761 12.761 0 7.048-5.714 12.761-12.761 12.761-7.048 0-12.761-5.713-12.761-12.761.006-7.045 5.716-12.754 12.761-12.761",opacity:"0.72"}),jsx("path",{fill:a,fillRule:"nonzero",d:"M200.058 225.406l-.699-.681a.721.721 0 010-1.065l6.127-5.984a.753.753 0 01.546-.231c.206 0 .404.083.545.231l6.127 5.978a.733.733 0 010 1.065l-.699.682a.768.768 0 01-1.091 0l-3.622-3.727v8.843a.725.725 0 01-.219.523.76.76 0 01-.534.217h-1.009a.75.75 0 01-.759-.74v-8.832l-3.622 3.726a.768.768 0 01-1.091-.005z"})]})}var W1=memo(x2);var K1=styled("div")(({theme:t})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:t.spacing(5),borderRadius:t.shape.borderRadius,transition:t.transitions.create("padding"),backgroundColor:t.palette.background.neutral,border:`1px dashed ${alpha(t.palette.grey[500],.32)}`,"&:hover":{opacity:.72}})),q1=({header:t,description:r,sx:n,...s})=>jsxs(K,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...s,children:[jsx(W1,{sx:{width:220}}),jsxs("div",{children:[jsx(q,{gutterBottom:!0,variant:"h5",children:t||"Soltar ou selecionar arquivos"}),jsx(q,{variant:"body2",sx:{color:"text.secondary"},children:r||jsxs(Fragment,{children:["Solte os arquivos aqui ou clique",jsx(q,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua m\xE1quina"]})})]})]}),B2=({id:t,disabled:r,multiple:n=!1,error:s,helperText:e$1,file:a$2,onDelete:i,files:f,thumbnail:z,onRemove:p$1,onHandleMainImage:h,mainUrl:u,sx:m$1,dropZoneProps:x,placeholderProps:y,placeholderAlt:R,uploading:B,image:I,tabIndex:S,preview:D="image",onRemoveAll:L,onUpload:C,onReorder:G,...J})=>{let{getRootProps:$,getInputProps:F,isDragActive:b,isDragReject:T,fileRejections:c1}=useDropzone({multiple:n,disabled:r,...J}),Q=!!a$2&&!n,j$1=Q||I,p1=f&&n&&f.length>0,f1=typeof a$2=="string",u1=T||!!s;return D==="file"?jsxs(d,{children:[B&&jsx(a$1,{}),jsxs(Z,{sx:{width:1,position:"relative",...m$1},children:[jsxs(K1,{...$(),sx:{...b&&{opacity:.72},...u1&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...r&&{opacity:.48,pointerEvents:"none"}},children:[jsx("input",{...F()}),jsx(q1,{sx:{...Q&&{display:"none"}}}),Q&&jsxs(K,{component:m.div,...j().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:P=>`solid 1px ${P.palette.divider}`,...m$1},children:[jsx(N,{file:a$2}),jsxs(K,{flexGrow:1,sx:{minWidth:0},children:[jsx(q,{variant:"subtitle2",noWrap:!0,children:f1?a$2:a$2.name}),jsx(q,{variant:"caption",sx:{color:"text.secondary"},children:f1?"":e(a$2.size)})]}),i&&jsx(g,{edge:"end",size:"small",disabled:r,"aria-label":"Remover arquivo",onClick:P=>{P.stopPropagation(),i();},children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})})]})]}),e$1&&e$1,jsx(q$1,{files:c1}),p1&&jsxs(Fragment,{children:[jsx(Z,{sx:{my:3},children:jsx(l1,{files:f,thumbnail:z,onRemove:p$1,onHandleMainImage:h,mainUrl:u,onReorder:G})}),jsxs(K,{direction:"row",justifyContent:"flex-end",spacing:1.5,children:[L&&jsx(N1,{color:"inherit",variant:"outlined",size:"small",onClick:L,children:"Remover todos"}),C&&jsx(N1,{size:"small",variant:"contained",onClick:C,children:"Enviar arquivos"})]})]})]})]}):jsxs(d,{children:[B&&jsx(a$1,{}),jsxs(Z,{sx:{width:1,position:"relative",...m$1},children:[jsxs(K1,{...$(),sx:{...b&&{opacity:.72},...u1&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...r&&{opacity:.48,pointerEvents:"none"},...x},children:[jsx("input",{...F(),id:t,tabIndex:S}),R?jsx(K,{sx:{...j$1&&{opacity:0}},children:R}):jsx(q1,{sx:{...j$1&&{opacity:0}},header:y?.title,description:y?.description}),j$1&&jsx(_1,{file:a$2||I||""})]}),e$1&&jsx(v2,{error:!!s,sx:P=>({mx:"14px",color:r?P.palette.grey[500]:void 0}),children:e$1}),jsx(q$1,{files:c1}),j$1&&i&&jsx(p,{size:"small",onClick:i,disabled:r,"aria-label":"Remover arquivo",children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})}),p1&&jsx(Fragment,{children:jsx(Z,{sx:{my:3,ml:.5},children:jsx(l1,{files:f,thumbnail:z,onRemove:p$1,onHandleMainImage:h,mainUrl:u,onReorder:G})})})]})]})},G1=B2;var L2=({onFileCropped:t,onImageUploaded:r,onCancel:n,aspect:s,label:e$2,image:a$5="",uploading:i,file:f,tabIndex:z,maxSize:p,onDropRejected:h,...u})=>{let{id:m,setCropModalOpen:x,handleRemove:y,toggleCropModalOpen:R,cropModalOpen:B,cancelChanges:I,saveChanges:S,previewImage:D,setCropper:L,preview:C,closePreviewImage:G,saving:J}=a$2({onFileCropped:t,onImageUploaded:r,onCancel:n}),{error:$}=a$3();return jsxs(Fragment,{children:[jsxs(d,{children:[i&&jsx(a$1,{}),jsx(G1,{...u,maxSize:p,id:m,file:f,onDrop:F=>{if(F.length>0){x(!0);let b=new FileReader;b.addEventListener("load",()=>{let T=b.result?.toString()||"";r(T),t(void 0);}),b.readAsDataURL(F[0]);}},image:a$5,tabIndex:z,onDropRejected:(F,b)=>{let T=F[0]?.errors[0]?.code;r(void 0),t(void 0),$(T==="file-too-large"?`Imagem n\xE3o pode ser maior que ${e(p)}`:"Erro ao enviar imagem"),h&&h(F,b);}}),(f||a$5)&&jsxs(e$1,{className:"actions",children:[jsx(N1,{color:"inherit",startIcon:jsx(a,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:y,children:"Remover"}),jsx(N1,{color:"inherit",startIcon:jsx(a,{icon:"SEARCH_IMAGE",color:"primary.maon"}),onClick:R,children:"Editar"})]})]}),jsx(a$4,{id:m,open:B,onClose:I,label:e$2,aspectRatio:s,imageSrc:a$5,onRemove:y,onSave:S,onPreview:D,onInitialized:L,loading:J}),jsx(I2,{open:!!C,onClose:G,scroll:"body",PaperProps:{sx:{p:2}},children:C&&jsx("img",{src:C,alt:"Preview"})})]})},Ft=L2;
|
|
29
|
-
|
|
30
|
-
export { l1 as a, _1 as b, So as c, G1 as d, Ft as e };
|
package/dist/chunk-RTC2Y2ZP.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { e } from './chunk-ANAHA3L6.js';
|
|
2
|
-
import { i as i$1 } from './chunk-D27ND54J.js';
|
|
3
|
-
import m from '@mui/material/Box';
|
|
4
|
-
import _ from '@mui/material/Paper';
|
|
5
|
-
import D from '@mui/material/Typography';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
import M from '@mui/material/CircularProgress';
|
|
8
|
-
import n from '@mui/material/IconButton';
|
|
9
|
-
import i from '@mui/material/Stack';
|
|
10
|
-
import { styled, alpha } from '@mui/material/styles';
|
|
11
|
-
|
|
12
|
-
var x=["pdf"],h=["txt"],y=["psd"],f=["doc","docx"],w=["xls","xlsx"],I=["zip","rar","iso"],k=["ai","esp"],v=["ppt","pptx"],C=["wav","aif","mp3","aac"],F=["jpg","jpeg","gif","bmp","png","svg","webp"],R=["m4v","avi","mpg","mp4","webm"];function T(e){let o,t=s(e);switch(e.includes(t)){case h.includes(t):o="txt";break;case I.includes(t):o="zip";break;case C.includes(t):o="audio";break;case F.includes(t):o="image";break;case R.includes(t):o="video";break;case f.includes(t):o="word";break;case w.includes(t):o="excel";break;case v.includes(t):o="powerpoint";break;case x.includes(t):o="pdf";break;case y.includes(t):o="photoshop";break;case k.includes(t):o="illustrator";break;case e?.startsWith("http"):o="image";break;default:o=s(e);}return o}function A(e){let o;switch(T(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 s(e){return e&&e.split(".").pop()||""}function O(e){return e.split("/").pop()}function b(e){return typeof e=="string"?{key:e,preview:e,name:O(e),type:s(e),size:void 0,path:e,lastModified:void 0,lastModifiedDate:void 0}:{key:`key:${e.name}`,name:e.name,size:e.size,path:e.path,type:e.type,preview:e.preview,lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate}}function X({files:e$1}){return e$1.length?jsx(_,{variant:"outlined",sx:{py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",bgcolor:o=>i$1(o.vars.palette.error.mainChannel,.08)},children:e$1.map(({file:o,errors:t})=>{let{path:c,size:d}=b(o);return jsxs(m,{sx:{my:1},children:[jsxs(D,{variant:"subtitle2",noWrap:!0,children:[c," - ",d?e(d):""]}),t.map(l=>jsxs(m,{component:"span",sx:{typography:"caption"},children:["- ",l.message]},l.code))]},c)})}):null}var Z=styled(i)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),q=styled(i)(({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"}}})),J=styled(M)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),K=styled(n)(({theme:e})=>({position:"relative",zIndex:999,pointerEvents:"auto",bgcolor:alpha(e.palette.grey[900],.72),"&:hover":{backgroundColor:alpha(e.palette.grey[900],.48)}})),Q=styled("div")({position:"relative",zIndex:1,"&:hover":{zIndex:2}}),Y=styled(i,{shouldForwardProp:e=>e!=="component"&&e!=="width"})(({theme:e,width:o})=>({width:o,height:80,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2,1,2,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:"0px 0px 0px 0px rgba(0, 0, 0, 0)","&:active":{boxShadow:e.customShadows.z8}})),ee=styled(i,{shouldForwardProp:e=>e!=="component"&&e!=="width"})(({theme:e,width:o})=>({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:"0px 0px 0px 0px rgba(0, 0, 0, 0)","&:active":{boxShadow:e.customShadows.z8}})),oe=styled(n)(({theme:e})=>({width:36,height:36,position:"absolute",top:10,right:10,borderRadius:12,zIndex:1,opacity:0,transition:"opacity 50ms ease-in-out",color:e.palette.common.white,backgroundColor:alpha(e.palette.grey[900],.48),"&:hover":{backgroundColor:alpha(e.palette.grey[900],.48),opacity:1}})),te=styled(n)(({theme:e})=>({width:24,height:24,position:"absolute",top:18,right:8,borderRadius:12,opacity:1,zIndex:1,transition:"opacity 50ms ease-in-out",color:e.palette.grey[500],backgroundColor:e.palette.common.white,"&:hover":{backgroundColor:e.palette.common.white}})),re=styled(n)(({theme:e})=>({position:"absolute",top:14,left:-2,zIndex:1,color:e.palette.grey[500],cursor:"grab","&:active":{cursor:"grabbing"}})),ae=styled(i)({flexDirection:"row",alignItems:"center",justifyContent:"center",width:16,height:16,overflow:"hidden",transform:"scale(0.8)"}),ne=styled(n,{shouldForwardProp:e=>e!=="isMainImage"})(({theme:e,isMainImage:o})=>({color:o?e.palette.secondary.main:e.palette.action.disabled,backgroundColor:e.palette.common.white," &:hover":{backgroundColor:e.palette.common.white},top:4,left:8,padding:e.spacing(.5),border:"1px solid",borderColor:o?e.palette.secondary.main:e.palette.divider})),ie=styled(n)(({theme:e})=>({top:16,right:16,zIndex:9,position:"absolute",color:alpha(e.palette.common.white,.8),bgcolor:alpha(e.palette.grey[900],.72),"&:hover":{bgcolor:alpha(e.palette.grey[900],.48)}}));
|
|
13
|
-
|
|
14
|
-
export { T as a, A as b, b as c, Z as d, q as e, J as f, K as g, Q as h, Y as i, ee as j, oe as k, te as l, re as m, ae as n, ne as o, ie as p, X as q };
|