@zydon/common 1.3.27 → 1.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FrameSkeleton/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAa7C,QAAA,MAAM,aAAa,6EAMhB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FrameSkeleton/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAa7C,QAAA,MAAM,aAAa,6EAMhB,kBAAkB,4CAoFpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as rt, f as C, n as B, r as mn, c as gn, i as tt, d as Ts, a as yn, v as Vs, w as ie, b as yt, e as K, g as R, t as Pt, h as et, j as Ss, k as bs, l as k, m as nt, o as vn, q as xt, s as vt, u as As, x as Ds, y as Cs, z as at, A as Ms, B as Pn, C as Kt, D as xn, E as Tn, F as w, G as zt, H as dt, P as ws, I as Ls, L as Rs, S as Bs, J as Vn, K as Sn, M as bn, N as Et, O as jt, Q as ye, R as Ht, T as Fs, U as An, V as Dn, W as Es, X as js, Y as Cn, Z as Mn, _ as ks, $ as Is, a0 as Os, a1 as Us, a2 as Ns, a3 as Gs, a4 as $s, a5 as Ks, a6 as zs, a7 as Hs } from "./index-
|
|
1
|
+
import { p as rt, f as C, n as B, r as mn, c as gn, i as tt, d as Ts, a as yn, v as Vs, w as ie, b as yt, e as K, g as R, t as Pt, h as et, j as Ss, k as bs, l as k, m as nt, o as vn, q as xt, s as vt, u as As, x as Ds, y as Cs, z as at, A as Ms, B as Pn, C as Kt, D as xn, E as Tn, F as w, G as zt, H as dt, P as ws, I as Ls, L as Rs, S as Bs, J as Vn, K as Sn, M as bn, N as Et, O as jt, Q as ye, R as Ht, T as Fs, U as An, V as Dn, W as Es, X as js, Y as Cn, Z as Mn, _ as ks, $ as Is, a0 as Os, a1 as Us, a2 as Ns, a3 as Gs, a4 as $s, a5 as Ks, a6 as zs, a7 as Hs } from "./index-4c553480.js";
|
|
2
2
|
import wn, { useContext as _t, useId as _s, useEffect as Ws } from "react";
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "@emotion/react";
|
|
@@ -7751,7 +7751,7 @@ const nlu = ({
|
|
|
7751
7751
|
...a,
|
|
7752
7752
|
children: n
|
|
7753
7753
|
}
|
|
7754
|
-
), kr1 = () => import("./features-
|
|
7754
|
+
), kr1 = () => import("./features-1ca1da5e.js").then((e) => e.default), THn = ({ children: e }) => /* @__PURE__ */ g.jsx(Tn1, { strict: !0, features: kr1, children: /* @__PURE__ */ g.jsxs(An.div, { style: { height: "100%" }, children: [
|
|
7755
7755
|
" ",
|
|
7756
7756
|
e,
|
|
7757
7757
|
" "
|
|
@@ -277948,6 +277948,7 @@ const gTn = ({ fileRejections: e }) => e.length ? /* @__PURE__ */ g.jsx(
|
|
|
277948
277948
|
{
|
|
277949
277949
|
onClick: () => {
|
|
277950
277950
|
u.ref.current && u.ref.current.scrollIntoView({
|
|
277951
|
+
block: "end",
|
|
277951
277952
|
behavior: "smooth"
|
|
277952
277953
|
});
|
|
277953
277954
|
},
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ad as u, b0 as p, ae as m, b1 as d, af as C, ag as v, bQ as S, bU as T, bT as g, bS as k, b2 as P, b4 as A, b5 as I, ah as h, ai as F, aj as y, ak as B, al as M, am as x, an as D, b6 as f, b7 as w, b8 as E, ao as R, bl as L, ap as N, aq as U, ar as W, as as H, bn as O, b9 as G, at as q, ba as V, a_ as j, au as z, av as K, bo as Z, aw as J, a9 as Q, ax as X, ay as Y, bb as _, az as $, ab as aa, aA as sa, aB as ea, bc as oa, bJ as ra, aC as ta, aD as ba, aE as ia, bq as na, br as la, bp as ca, b3 as ua, bd as pa, aa as ma, aF as da, be as Ca, bf as va, aG as Sa, aY as Ta, aH as ga, bg as ka, aI as Pa, aJ as Aa, aK as Ia, aL as ha, bK as Fa, bL as ya, aM as Ba, aN as Ma, aO as xa, aP as Da, aZ as fa, bh as wa, bs as Ea, aQ as Ra, bY as La, bZ as Na, bW as Ua, b$ as Wa, b_ as Ha, bX as Oa, bm as Ga, aR as qa, aS as Va, bi as ja, bM as za, aT as Ka, aU as Za, bj as Ja, aV as Qa, a8 as Xa, aW as Ya, bk as _a, a$ as $a, aX as as, bN as ss, cp as es, cq as os, cj as rs, c0 as ts, bO as bs, cg as is, ch as ns, ci as ls, c1 as cs, cs as us, co as ps, cn as ms, ck as ds, cl as Cs, c2 as vs, cf as Ss, bR as Ts, c3 as gs, c4 as ks, c5 as Ps, c6 as As, c7 as Is, ac as hs, cd as Fs, cc as ys, cb as Bs, ce as Ms, c8 as xs, bP as Ds, bV as fs, c9 as ws, ca as Es, cr as Rs, cm as Ls, bG as Ns, bH as Us, bI as Ws, bz as Hs, bC as Os, bu as Gs, bw as qs, bB as Vs, bt as js, bA as zs, by as Ks, bx as Zs, bE as Js, bF as Qs, bD as Xs, bv as Ys } from "./index-
|
|
1
|
+
import { ad as u, b0 as p, ae as m, b1 as d, af as C, ag as v, bQ as S, bU as T, bT as g, bS as k, b2 as P, b4 as A, b5 as I, ah as h, ai as F, aj as y, ak as B, al as M, am as x, an as D, b6 as f, b7 as w, b8 as E, ao as R, bl as L, ap as N, aq as U, ar as W, as as H, bn as O, b9 as G, at as q, ba as V, a_ as j, au as z, av as K, bo as Z, aw as J, a9 as Q, ax as X, ay as Y, bb as _, az as $, ab as aa, aA as sa, aB as ea, bc as oa, bJ as ra, aC as ta, aD as ba, aE as ia, bq as na, br as la, bp as ca, b3 as ua, bd as pa, aa as ma, aF as da, be as Ca, bf as va, aG as Sa, aY as Ta, aH as ga, bg as ka, aI as Pa, aJ as Aa, aK as Ia, aL as ha, bK as Fa, bL as ya, aM as Ba, aN as Ma, aO as xa, aP as Da, aZ as fa, bh as wa, bs as Ea, aQ as Ra, bY as La, bZ as Na, bW as Ua, b$ as Wa, b_ as Ha, bX as Oa, bm as Ga, aR as qa, aS as Va, bi as ja, bM as za, aT as Ka, aU as Za, bj as Ja, aV as Qa, a8 as Xa, aW as Ya, bk as _a, a$ as $a, aX as as, bN as ss, cp as es, cq as os, cj as rs, c0 as ts, bO as bs, cg as is, ch as ns, ci as ls, c1 as cs, cs as us, co as ps, cn as ms, ck as ds, cl as Cs, c2 as vs, cf as Ss, bR as Ts, c3 as gs, c4 as ks, c5 as Ps, c6 as As, c7 as Is, ac as hs, cd as Fs, cc as ys, cb as Bs, ce as Ms, c8 as xs, bP as Ds, bV as fs, c9 as ws, ca as Es, cr as Rs, cm as Ls, bG as Ns, bH as Us, bI as Ws, bz as Hs, bC as Os, bu as Gs, bw as qs, bB as Vs, bt as js, bA as zs, by as Ks, bx as Zs, bE as Js, bF as Qs, bD as Xs, bv as Ys } from "./index-4c553480.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "@emotion/react";
|
package/dist/index.umd.cjs
CHANGED
|
@@ -35406,4 +35406,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
35406
35406
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eo2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ko2(e){if(Array.isArray(e))return FBn(e)}function WUn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function IUn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WUn(Object(n),!0).forEach(function(a){$Un(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WUn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function $Un(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bmt(e,t){return Bo2(e)||Do2(e,t)||xUn(e,t)||So2()}function So2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
35407
35407
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xUn(e,t){if(e){if(typeof e=="string")return FBn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FBn(e,t)}}function FBn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Do2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,u=!1,c,l;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){u=!0,l=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw l}}return a}}function Bo2(e){if(Array.isArray(e))return e}var Wo2="file-invalid-type",Io2="file-too-large",$o2="file-too-small",xo2="too-many-files",zo2=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:Wo2,message:"File type must be ".concat(n)}},zUn=function(t){return{code:Io2,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},HUn=function(t){return{code:$o2,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Ho2={code:xo2,message:"Too many files"};function AUn(e,t){var n=e.type==="application/x-moz-file"||Lo2(e,t);return[n,n?null:zo2(t)]}function RUn(e,t,n){if(hT(e.size))if(hT(t)&&hT(n)){if(e.size>n)return[!1,zUn(n)];if(e.size<t)return[!1,HUn(t)]}else{if(hT(t)&&e.size<t)return[!1,HUn(t)];if(hT(n)&&e.size>n)return[!1,zUn(n)]}return[!0,null]}function hT(e){return e!=null}function Ao2(e){var t=e.files,n=e.accept,a=e.minSize,r=e.maxSize,u=e.multiple,c=e.maxFiles,l=e.validator;return!u&&t.length>1||u&&c>=1&&t.length>c?!1:t.every(function(f){var s=AUn(f,n),d=bmt(s,1),g=d[0],m=RUn(f,a,r),v=bmt(m,1),C=v[0],h=l?l(f):null;return g&&C&&!h})}function DCt(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function BCt(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function VUn(e){e.preventDefault()}function Ro2(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Vo2(e){return e.indexOf("Edge/")!==-1}function Fo2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Ro2(e)||Vo2(e)}function Sc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(a){for(var r=arguments.length,u=new Array(r>1?r-1:0),c=1;c<r;c++)u[c-1]=arguments[c];return t.some(function(l){return!DCt(a)&&l&&l.apply(void 0,[a].concat(u)),DCt(a)})}}function No2(){return"showOpenFilePicker"in window}function To2(e){if(hT(e)){var t=Object.entries(e).filter(function(n){var a=bmt(n,2),r=a[0],u=a[1],c=!0;return FUn(r)||(console.warn('Skipped "'.concat(r,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),c=!1),(!Array.isArray(u)||!u.every(NUn))&&(console.warn('Skipped "'.concat(r,'" because an invalid file extension was provided.')),c=!1),c}).reduce(function(n,a){var r=bmt(a,2),u=r[0],c=r[1];return IUn(IUn({},n),{},$Un({},u,c))},{});return[{description:"Files",accept:t}]}return e}function Zo2(e){if(hT(e))return Object.entries(e).reduce(function(t,n){var a=bmt(n,2),r=a[0],u=a[1];return[].concat(BUn(t),[r],BUn(u))},[]).filter(function(t){return FUn(t)||NUn(t)}).join(",")}function Uo2(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Go2(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function FUn(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function NUn(e){return/^.*\.[\w]+$/.test(e)}var Yo2=["children"],Ko2=["open"],Xo2=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Qo2=["refKey","onChange","onClick"];function Jo2(e){return t22(e)||e22(e)||TUn(e)||qo2()}function qo2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
35408
35408
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e22(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function t22(e){if(Array.isArray(e))return TBn(e)}function NBn(e,t){return a22(e)||r22(e,t)||TUn(e,t)||n22()}function n22(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
35409
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TUn(e,t){if(e){if(typeof e=="string")return TBn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TBn(e,t)}}function TBn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function r22(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,u=!1,c,l;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){u=!0,l=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw l}}return a}}function a22(e){if(Array.isArray(e))return e}function ZUn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZUn(Object(n),!0).forEach(function(a){ZBn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZUn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ZBn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WCt(e,t){if(e==null)return{};var n=i22(e,t),a,r;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r<u.length;r++)a=u[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function i22(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,u;for(u=0;u<a.length;u++)r=a[u],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var UBn=o.forwardRef(function(e,t){var n=e.children,a=WCt(e,Yo2),r=ICt(a),u=r.open,c=WCt(r,Ko2);return o.useImperativeHandle(t,function(){return{open:u}},[u]),o.createElement(o.Fragment,null,n(Pt(Pt({},c),{},{open:u})))});UBn.displayName="Dropzone";var UUn={disabled:!1,getFilesFromEvent:ho2,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};UBn.defaultProps=UUn,UBn.propTypes={children:L.func,accept:L.objectOf(L.arrayOf(L.string)),multiple:L.bool,preventDropOnDocument:L.bool,noClick:L.bool,noKeyboard:L.bool,noDrag:L.bool,noDragEventsBubbling:L.bool,minSize:L.number,maxSize:L.number,maxFiles:L.number,disabled:L.bool,getFilesFromEvent:L.func,onFileDialogCancel:L.func,onFileDialogOpen:L.func,useFsAccessApi:L.bool,autoFocus:L.bool,onDragEnter:L.func,onDragLeave:L.func,onDragOver:L.func,onDrop:L.func,onDropAccepted:L.func,onDropRejected:L.func,onError:L.func,validator:L.func};var GBn={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ICt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Pt(Pt({},UUn),e),n=t.accept,a=t.disabled,r=t.getFilesFromEvent,u=t.maxSize,c=t.minSize,l=t.multiple,f=t.maxFiles,s=t.onDragEnter,d=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,C=t.onDropRejected,h=t.onFileDialogCancel,b=t.onFileDialogOpen,p=t.useFsAccessApi,y=t.autoFocus,j=t.preventDropOnDocument,E=t.noClick,O=t.noKeyboard,M=t.noDrag,k=t.noDragEventsBubbling,D=t.onError,S=t.validator,B=o.useMemo(function(){return Zo2(n)},[n]),z=o.useMemo(function(){return To2(n)},[n]),N=o.useMemo(function(){return typeof b=="function"?b:GUn},[b]),$=o.useMemo(function(){return typeof h=="function"?h:GUn},[h]),H=o.useRef(null),Z=o.useRef(null),A=o.useReducer(o22,GBn),T=NBn(A,2),Q=T[0],ne=T[1],V=Q.isFocused,F=Q.isFileDialogActive,Y=o.useRef(typeof window<"u"&&window.isSecureContext&&p&&No2()),ie=function(){!Y.current&&F&&setTimeout(function(){if(Z.current){var he=Z.current.files;he.length||(ne({type:"closeDialog"}),$())}},300)};o.useEffect(function(){return window.addEventListener("focus",ie,!1),function(){window.removeEventListener("focus",ie,!1)}},[Z,F,$,Y]);var q=o.useRef([]),fe=function(he){H.current&&H.current.contains(he.target)||(he.preventDefault(),q.current=[])};o.useEffect(function(){return j&&(document.addEventListener("dragover",VUn,!1),document.addEventListener("drop",fe,!1)),function(){j&&(document.removeEventListener("dragover",VUn),document.removeEventListener("drop",fe))}},[H,j]),o.useEffect(function(){return!a&&y&&H.current&&H.current.focus(),function(){}},[H,y,a]);var ce=o.useCallback(function(J){D?D(J):console.error(J)},[D]),Ce=o.useCallback(function(J){J.preventDefault(),J.persist(),Le(J),q.current=[].concat(Jo2(q.current),[J.target]),BCt(J)&&Promise.resolve(r(J)).then(function(he){if(!(DCt(J)&&!k)){var at=he.length,He=at>0&&Ao2({files:he,accept:B,minSize:c,maxSize:u,multiple:l,maxFiles:f,validator:S}),Et=at>0&&!He;ne({isDragAccept:He,isDragReject:Et,isDragActive:!0,type:"setDraggedFiles"}),s&&s(J)}}).catch(function(he){return ce(he)})},[r,s,ce,k,B,c,u,l,f,S]),le=o.useCallback(function(J){J.preventDefault(),J.persist(),Le(J);var he=BCt(J);if(he&&J.dataTransfer)try{J.dataTransfer.dropEffect="copy"}catch{}return he&&g&&g(J),!1},[g,k]),ee=o.useCallback(function(J){J.preventDefault(),J.persist(),Le(J);var he=q.current.filter(function(He){return H.current&&H.current.contains(He)}),at=he.indexOf(J.target);at!==-1&&he.splice(at,1),q.current=he,!(he.length>0)&&(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),BCt(J)&&d&&d(J))},[H,d,k]),ge=o.useCallback(function(J,he){var at=[],He=[];J.forEach(function(Et){var je=AUn(Et,B),qt=NBn(je,2),_n=qt[0],Dc=qt[1],KO=RUn(Et,c,u),XO=NBn(KO,2),CT=XO[0],bT=XO[1],yT=S?S(Et):null;if(_n&&CT&&!yT)at.push(Et);else{var pT=[Dc,bT];yT&&(pT=pT.concat(yT)),He.push({file:Et,errors:pT.filter(function(OT){return OT})})}}),(!l&&at.length>1||l&&f>=1&&at.length>f)&&(at.forEach(function(Et){He.push({file:Et,errors:[Ho2]})}),at.splice(0)),ne({acceptedFiles:at,fileRejections:He,type:"setFiles"}),m&&m(at,He,he),He.length>0&&C&&C(He,he),at.length>0&&v&&v(at,he)},[ne,l,B,c,u,f,m,v,C,S]),We=o.useCallback(function(J){J.preventDefault(),J.persist(),Le(J),q.current=[],BCt(J)&&Promise.resolve(r(J)).then(function(he){DCt(J)&&!k||ge(he,J)}).catch(function(he){return ce(he)}),ne({type:"reset"})},[r,ge,ce,k]),U=o.useCallback(function(){if(Y.current){ne({type:"openDialog"}),N();var J={multiple:l,types:z};window.showOpenFilePicker(J).then(function(he){return r(he)}).then(function(he){ge(he,null),ne({type:"closeDialog"})}).catch(function(he){Uo2(he)?($(he),ne({type:"closeDialog"})):Go2(he)?(Y.current=!1,Z.current?(Z.current.value=null,Z.current.click()):ce(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ce(he)});return}Z.current&&(ne({type:"openDialog"}),N(),Z.current.value=null,Z.current.click())},[ne,N,$,p,ge,ce,z,l]),qe=o.useCallback(function(J){!H.current||!H.current.isEqualNode(J.target)||(J.key===" "||J.key==="Enter"||J.keyCode===32||J.keyCode===13)&&(J.preventDefault(),U())},[H,U]),se=o.useCallback(function(){ne({type:"focus"})},[]),te=o.useCallback(function(){ne({type:"blur"})},[]),_e=o.useCallback(function(){E||(Fo2()?setTimeout(U,0):U())},[E,U]),Oe=function(he){return a?null:he},K=function(he){return O?null:Oe(he)},pe=function(he){return M?null:Oe(he)},Le=function(he){k&&he.stopPropagation()},xe=o.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=J.refKey,at=he===void 0?"ref":he,He=J.role,Et=J.onKeyDown,je=J.onFocus,qt=J.onBlur,_n=J.onClick,Dc=J.onDragEnter,KO=J.onDragOver,XO=J.onDragLeave,CT=J.onDrop,bT=WCt(J,Xo2);return Pt(Pt(ZBn({onKeyDown:K(Sc(Et,qe)),onFocus:K(Sc(je,se)),onBlur:K(Sc(qt,te)),onClick:Oe(Sc(_n,_e)),onDragEnter:pe(Sc(Dc,Ce)),onDragOver:pe(Sc(KO,le)),onDragLeave:pe(Sc(XO,ee)),onDrop:pe(Sc(CT,We)),role:typeof He=="string"&&He!==""?He:"presentation"},at,H),!a&&!O?{tabIndex:0}:{}),bT)}},[H,qe,se,te,_e,Ce,le,ee,We,O,M,a]),ze=o.useCallback(function(J){J.stopPropagation()},[]),Zt=o.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=J.refKey,at=he===void 0?"ref":he,He=J.onChange,Et=J.onClick,je=WCt(J,Qo2),qt=ZBn({accept:B,multiple:l,type:"file",style:{display:"none"},onChange:Oe(Sc(He,We)),onClick:Oe(Sc(Et,ze)),tabIndex:-1},at,Z);return Pt(Pt({},qt),je)}},[Z,n,l,We,a]);return Pt(Pt({},Q),{},{isFocused:V&&!a,getRootProps:xe,getInputProps:Zt,rootRef:H,inputRef:Z,open:Oe(U)})}function o22(e,t){switch(t.type){case"focus":return Pt(Pt({},e),{},{isFocused:!0});case"blur":return Pt(Pt({},e),{},{isFocused:!1});case"openDialog":return Pt(Pt({},GBn),{},{isFileDialogActive:!0});case"closeDialog":return Pt(Pt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Pt(Pt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Pt(Pt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Pt({},GBn);default:return e}}function GUn(){}const YUn=({fileRejections:e})=>e.length?_.jsx(P.Paper,{variant:"outlined",sx:{py:1,px:2,mt:3,bgcolor:t=>X(t.palette.error.main,.08),borderColor:t=>X(t.palette.error.main,.24)},children:e.map(({file:t,errors:n})=>{const{path:a,size:r}=RBn(t);return _.jsxs(P.Box,{sx:{my:1},children:[_.jsxs(P.Typography,{variant:"subtitle2",noWrap:!0,children:[a," - ",r?kBn(r):""]}),n.map(u=>_.jsxs(P.Box,{component:"span",sx:{typography:"caption"},children:["- ",u.message]},u.code))]},a)})}):null,u22=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return _.jsx(P.Stack,{position:"absolute",width:1,height:1,maxHeight:"100%",alignItems:"center",justifyContent:"center",top:0,right:0,bottom:0,left:0,padding:2,margin:"auto",children:_.jsx("img",{alt:"file preview",src:t,style:{borderRadius:8,width:"auto",maxWidth:"100%",maxHeight:"100%",height:"auto"}})})},c22=Bt("div")(({theme:e})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:e.spacing(5),borderRadius:e.shape.borderRadius,transition:e.transitions.create("padding"),backgroundColor:e.palette.background.neutral,border:`1px dashed ${X(e.palette.grey[500],.32)}`,"&:hover":{opacity:.72}})),l22=({header:e,description:t,sx:n,...a})=>_.jsxs(P.Stack,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...a,children:[_.jsx(hIn,{sx:{width:220}}),_.jsxs("div",{children:[_.jsx(P.Typography,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),_.jsx(P.Typography,{variant:"body2",sx:{color:"text.secondary"},children:t||_.jsxs(_.Fragment,{children:["Solte os arquivos aqui ou clique",_.jsx(P.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua máquina"]})})]})]}),KUn=({id:e,disabled:t,multiple:n=!1,error:a,helperText:r,file:u,onDelete:c,files:l,thumbnail:f,onRemove:s,onHandleMainImage:d,mainUrl:g,sx:m,dropZoneProps:v,placeholderProps:C,placeholderAlt:h,image:b,tabIndex:p,...y})=>{const{getRootProps:j,getInputProps:E,isDragActive:O,isDragReject:M,fileRejections:k}=ICt({multiple:n,disabled:t,...y}),D=!!u&&!n||b,S=l&&n&&l.length>0,B=M||!!a;return _.jsxs(P.Box,{sx:{width:1,position:"relative",...m},children:[_.jsxs(c22,{...j(),sx:{...O&&{opacity:.72},...B&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"},...v},children:[_.jsx("input",{...E(),id:e,tabIndex:p}),h?_.jsx(P.Stack,{sx:{...D&&{opacity:0}},children:h}):_.jsx(l22,{sx:{...D&&{opacity:0}},header:C==null?void 0:C.title,description:C==null?void 0:C.description}),D&&_.jsx(u22,{file:u||b||""})]}),r&&_.jsx(P.FormHelperText,{error:!!a,sx:z=>({mx:"14px",color:t?z.palette.grey[500]:void 0}),children:r}),_.jsx(YUn,{fileRejections:k}),D&&c&&_.jsx(P.IconButton,{size:"small",onClick:c,sx:{top:16,right:16,zIndex:9,position:"absolute",color:z=>X(z.palette.common.white,.8),bgcolor:z=>X(z.palette.grey[900],.72),"&:hover":{bgcolor:z=>X(z.palette.grey[900],.48)}},children:_.jsx(Pe,{icon:"CLOSE_MARK_BUTTON",width:18})}),S&&_.jsx(_.Fragment,{children:_.jsx(P.Box,{sx:{my:3},children:_.jsx(go2,{files:l,thumbnail:f,onRemove:s,onHandleMainImage:d,mainUrl:g})})})]})},f22=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return _.jsx("img",{alt:"avatar",src:t,style:{zIndex:8,overflow:"hidden",borderRadius:"50%",position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})},s22=Bt("div")(({theme:e})=>({width:144,height:144,margin:"auto",display:"flex",cursor:"pointer",overflow:"hidden",borderRadius:"50%",alignItems:"center",position:"relative",justifyContent:"center",border:`1px dashed ${X(e.palette.grey[500],.32)}`})),d22=Bt("div")(({theme:e})=>({zIndex:7,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",flexDirection:"column",justifyContent:"center",width:"calc(100% - 16px)",height:"calc(100% - 16px)",color:e.palette.text.disabled,backgroundColor:e.palette.background.neutral,transition:e.transitions.create("opacity",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.shorter})})),XUn=({error:e,file:t,image:n,disabled:a,helperText:r,sx:u,tabIndex:c,...l})=>{const{getRootProps:f,getInputProps:s,isDragActive:d,isDragReject:g,fileRejections:m}=ICt({multiple:!1,disabled:a,...l}),v=!!t||n,C=g||!!e;return _.jsxs(_.Fragment,{children:[_.jsxs(s22,{...f(),sx:{...d&&{opacity:.72},...C&&{borderColor:"error.light",...v&&{bgcolor:"error.lighter"}},...a&&{opacity:.48,pointerEvents:"none"},...v&&{"&:hover":{"& .placeholder":{opacity:1}}},...u},children:[_.jsx("input",{...s(),tabIndex:c}),v&&_.jsx(f22,{file:t||n||""}),_.jsxs(d22,{className:"placeholder",sx:{"&:hover":{opacity:.72},...v&&{zIndex:9,opacity:0,color:"common.white",bgcolor:h=>X(h.palette.grey[900],.64)},...C&&{color:"error.main",bgcolor:"error.lighter"}},children:[_.jsx(Pe,{icon:"ADD_IMAGE",width:24,sx:{mb:1}}),_.jsx(P.Typography,{variant:"caption",children:t?"Atualizar foto":"Carregar foto"})]})]}),r&&r,_.jsx(YUn,{fileRejections:m})]})},g22=Bt("div")(({theme:e})=>({width:64,height:64,fontSize:24,display:"flex",flexShrink:0,cursor:"pointer",alignItems:"center",justifyContent:"center",margin:e.spacing(.5),color:e.palette.text.disabled,borderRadius:e.shape.borderRadius,border:`dashed 1px ${e.palette.divider}`,backgroundColor:X(e.palette.grey[500],.08),"&:hover":{opacity:.72}})),_22=({placeholderAlt:e,error:t,disabled:n,sx:a,tabIndex:r,...u})=>{const{getRootProps:c,getInputProps:l,isDragActive:f,isDragReject:s}=ICt({disabled:n,...u}),d=s||t;return _.jsxs(g22,{...c(),sx:{...f&&{opacity:.72},...d&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...n&&{opacity:.48,pointerEvents:"none"},...a},children:[_.jsx("input",{...l(),tabIndex:r}),e||_.jsx(Pe,{icon:"CLOUD_UPLOAD",width:28})]})},QUn=({onFileCropped:e,onImageUploaded:t,onCancel:n})=>{const a=o.useId(),[r,u]=o.useState(),[c,l,f]=SSn(),[s,d]=o.useState();return{id:a,setCropModalOpen:f,handleRemove:()=>{e(void 0),t(void 0),f(!1)},toggleCropModalOpen:l,cropModalOpen:c,cancelChanges:()=>{n&&n(),f(!1)},saveChanges:()=>{r!==void 0&&r.getCroppedCanvas().toBlob(b=>{if(!b)return;const p=new File([b],"imagem");e(p),l()},"image/png",1)},previewImage:()=>{r!==void 0&&d(r.getCroppedCanvas().toDataURL())},setCropper:u,preview:s,closePreviewImage:()=>d(void 0)}},JUn=({id:e,open:t,onClose:n,label:a,onSave:r,onRemove:u,onPreview:c,imageSrc:l,aspectRatio:f,onInitialized:s})=>{const[d,g]=o.useState(.5);return _.jsx(hUn,{open:t,onClose:n,dialogTitle:a,actions:_.jsxs(_.Fragment,{children:[_.jsx(P.Button,{variant:"outlined",size:"medium",onClick:n,color:"inherit",children:"Cancelar"}),_.jsx(P.Button,{variant:"contained",size:"medium",onClick:r,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",keepMounted:!0,children:_.jsxs(P.Stack,{gap:2,children:[_.jsx(UZn,{imageSrc:l,aspectRatio:f,onInitialized:s,zoom:d,onZoomChange:g}),_.jsxs(P.Stack,{gap:1.5,children:[_.jsxs(P.Stack,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[_.jsx(P.Typography,{variant:"body1",children:"Zoom"}),_.jsx(P.Slider,{value:d,onChange:(m,v)=>g(Array.isArray(v)?v[0]:v),min:.1,max:2,size:"medium",step:.0125})]}),_.jsxs(P.Stack,{direction:"row",gap:2,children:[_.jsx(P.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:_.jsx(Pe,{icon:"DELETE_MARK_BUTTON_02"}),onClick:u,children:"Remover"}),_.jsx(P.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:_.jsx(Pe,{icon:"PLAY_SIMPLE"}),onClick:c,children:"Pré-visualizar"}),_.jsx(P.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:_.jsx(Pe,{icon:"SEARCH_IMAGE"}),component:"label",htmlFor:e,children:"Alterar"})]})]})]})})},m22=P.styled(P.Stack)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),v22=P.styled(P.Stack)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:P.alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),h22=P.styled(P.CircularProgress)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),qUn=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:d,setCropModalOpen:g,handleRemove:m,toggleCropModalOpen:v,cropModalOpen:C,cancelChanges:h,saveChanges:b,previewImage:p,setCropper:y,preview:j,closePreviewImage:E}=QUn({onFileCropped:e,onImageUploaded:t,onCancel:n});return _.jsxs(_.Fragment,{children:[_.jsxs(m22,{children:[c&&_.jsx(lCt,{}),_.jsx(KUn,{...s,id:d,file:l,onDrop:O=>{if(O.length>0){g(!0);const M=new FileReader;M.addEventListener("load",()=>{var D;const k=((D=M.result)==null?void 0:D.toString())||"";t(k),e(void 0)}),M.readAsDataURL(O[0])}},image:u,tabIndex:f}),(l||u)&&_.jsxs(v22,{className:"actions",children:[_.jsx(P.Button,{color:"inherit",startIcon:_.jsx(Pe,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:m,children:"Remover"}),_.jsx(P.Button,{color:"inherit",startIcon:_.jsx(Pe,{icon:"SEARCH_IMAGE",color:"primary.maon"}),onClick:v,children:"Editar"})]})]}),_.jsx(JUn,{id:d,open:C,onClose:h,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:b,onPreview:p,onInitialized:y}),_.jsx(P.Dialog,{open:!!j,onClose:E,scroll:"body",PaperProps:{sx:{p:2}},children:j&&_.jsx("img",{src:j,alt:"Preview"})})]})},C22=P.styled(P.Stack)(({theme:e})=>({backgroundColor:"#fff",border:`1px solid ${e.palette.grey[300]}`})),eGn=({children:e,...t})=>_.jsx(C22,{borderRadius:1,gap:3,padding:3,...t,children:e}),b22=P.styled(P.Box)(()=>({marginLeft:"4px",fontWeight:"fontWeightBold"})),y22=P.styled(P.Button)(()=>({fontWeight:"fontWeightSemiBold"})),p22=P.styled(Pe)(({theme:e})=>({color:e.palette.primary.main})),O22=({selectedTitle:e,onSelect:t,options:n})=>{const a=DSn();return _.jsxs(_.Fragment,{children:[_.jsx(y22,{disableRipple:!0,color:"inherit",onClick:a.onOpen,endIcon:_.jsx(p22,{icon:a.open?"CHEVRON_UP":"ARROW_DOWN_SIMPLE"}),children:_.jsx(b22,{component:"span",children:e.label})}),_.jsx(vUn,{open:a.open,onClose:a.onClose,children:n.map(r=>_.jsx(P.MenuItem,{selected:r.value===e.value,onClick:()=>{a.onClose(),t(r.value)},children:r.label},r.value))})]})},j22=P.styled(P.Stack)({display:"grid",gridTemplateColumns:"auto auto"}),w22=P.styled(P.Typography)(({theme:e})=>({color:e.palette.grey[600]})),M22=P.styled(P.Typography)(({theme:e})=>({textAlign:"right",color:e.palette.grey[800]})),L22=({data:e,...t})=>e.length===0?null:_.jsx(j22,{gap:1,...t,children:e.map(n=>[_.jsx(w22,{variant:"body2",children:n.label},`label:${n.id}`),_.jsx(M22,{variant:"body2",children:n.value},`value:${n.id}`)])}),P22=P.styled(P.Stack)(({theme:e})=>({backgroundColor:"#fff",minWidth:"250px",padding:24,minHeight:"100vh",borderRight:`1px solid ${e.palette.grey[300]}`})),E22=P.styled(P.Stack)(({theme:e})=>({backgroundColor:"#fff",position:"sticky",top:0,zIndex:999,width:"100%",padding:24,gap:24,borderBottom:`1px solid ${e.palette.grey[300]}`})),k22=P.styled(P.Stack)({flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:24}),S22=P.styled(P.Stack)(({theme:e})=>({height:"100%",width:"50%",flex:1,[e.breakpoints.down(1680)]:{width:"70%"}})),D22=P.styled(P.Typography)(({theme:e})=>({color:e.palette.grey[800],fontSize:18,fontWeight:700})),B22=P.styled(P.Typography)(({theme:e})=>({color:e.palette.grey[500],fontSize:14,fontWeight:400,paddingBottom:24})),W22=P.styled(P.Button)(({theme:e})=>({paddingTop:6,paddingBottom:6,paddingLeft:0,margin:0,marginBottom:4,marginTop:4,width:"100%",display:"block",cursor:"pointer",color:e.palette.grey[600],textAlign:"left",fontWeight:400,fontSize:14,"> span":{color:e.palette.error.main}})),I22=P.styled(YDn)(()=>({height:1,"& .simplebar-content":{height:1}})),$22=P.styled(P.Stack)(()=>({position:"fixed",width:"202px"})),x22=({title:e,sections:t,headerLeftContent:n,headerRightContent:a,onClickBack:r})=>_.jsx(P.Stack,{children:_.jsxs(P.Stack,{direction:"row",children:[_.jsx(P22,{children:_.jsx(I22,{children:_.jsxs($22,{children:[_.jsx(P.Typography,{variant:"overline",color:"text.disabled",fontWeight:700,children:"ACESSO RÁPIDO"}),t.map((u,c)=>_.jsxs(P.Stack,{children:[_.jsxs(W22,{onClick:()=>{u.ref.current&&u.ref.current.scrollIntoView({behavior:"smooth"})},children:[u.title,u.isRequired&&_.jsx("span",{children:"*"})]}),c<t.length-1&&_.jsx(P.Divider,{})]},c))]})})}),_.jsxs(P.Stack,{width:"100%",alignItems:"center",mb:8,children:[_.jsx(E22,{children:_.jsxs(k22,{children:[_.jsxs(P.Stack,{flexDirection:"row",gap:2,children:[_.jsx(P.IconButton,{color:"primary",onClick:()=>r(),children:_.jsx(Pe,{icon:"CHEVRON_LEFT"})}),_.jsx(P.Typography,{variant:"h4",children:e}),n]}),_.jsxs(P.Stack,{direction:"row",gap:2,alignItems:"center",minWidth:"max-content",children:[_.jsx(lSn,{disabled:!0}),a]})]})}),_.jsx(S22,{children:t.map(u=>_.jsxs(P.Stack,{ref:u.ref,paddingTop:3,paddingBottom:2,alignItems:"start",width:"100%",children:[_.jsx(D22,{children:u.title}),_.jsx(B22,{children:u.subTitle}),_.jsx(eGn,{width:"100%",borderRadius:1,gap:1.5,padding:3,children:u.child})]},u.title))})]})]})}),un=({name:e,helperText:t,rules:n,onChange:a,tabIndex:r,...u})=>{const{control:c}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:c,rules:n,render:({field:{ref:l,...f},fieldState:{error:s}})=>_.jsx(P.TextField,{...f,onChange:d=>{f.onChange(d),a&&a(d)},inputRef:l,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||t,...u,inputProps:{...u.inputProps,tabIndex:r}})})},tGn=({name:e,helperText:t,onChange:n,tabIndex:a,...r})=>{const{control:u}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:u,render:({field:c,fieldState:{error:l}})=>_.jsxs("div",{children:[_.jsx(P.FormControlLabel,{control:_.jsx(P.Switch,{...c,checked:c.value,onChange:(f,s)=>{c.onChange(f),n&&n(f,s)},inputProps:{tabIndex:a}}),...r}),(!!l||t)&&_.jsx(P.FormHelperText,{error:!!l,sx:f=>({mx:"14px",color:r.disabled?f.palette.grey[500]:void 0}),children:l?l==null?void 0:l.message:t})]})})},z22=[{label:"JSON",value:"JSON"},{label:"XML",value:"XML"},{label:"BINÁRIO",value:"BYTEA"}],H22=[{label:"PUT",value:"PUT"},{label:"POST",value:"POST"},{label:"GET",value:"GET"},{label:"DELETE",value:"DELETE"}],A22=P.styled(P.Stack)(({theme:e})=>({border:`1px solid ${P.alpha(e.palette.primary.main,.3)}`,backgroundColor:P.alpha(e.palette.primary.main,.05),flexDirection:"row",alignItems:"center",padding:10,gap:10,borderRadius:8,marginBottom:8,svg:{color:e.palette.primary.main}})),R22=P.styled(P.IconButton)(({theme:e})=>({svg:{color:`${e.palette.primary.main} !important`}})),V22=P.styled(P.IconButton)(()=>({height:"38px",alignSelf:"center"})),F22=({webhookData:e,isEditing:t=!1,haveTip:n=!1})=>{const{control:a}=Ie.useFormContext(),{fields:r,append:u,remove:c}=Ie.useFieldArray({name:"headers",control:a}),l=()=>{u({value:"",name:""})};return _.jsxs(_.Fragment,{children:[n&&_.jsxs(A22,{children:[_.jsx(Pe,{icon:"INFO_CIRCLE"}),_.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:"Webhooks permitem que serviços externos sejam notificados quando determinados eventos acontecem. Saiba mais acessando a documentação do Webhook"})]}),t&&_.jsx(un,{name:"name",label:"Nome do webhook"}),_.jsxs(P.Stack,{direction:"row",gap:2,children:[_.jsx(un,{name:"url",label:"URL de endpoint",rules:{required:{value:!0,message:"Url é obrigatório"}}}),_.jsx(un,{name:"filter",label:"Filtro"})]}),t&&e&&_.jsxs(_.Fragment,{children:[_.jsx(un,{variant:"filled",name:"solution",label:"Solução",disabled:!0}),_.jsxs(P.Stack,{direction:"row",gap:2,children:[_.jsx(un,{variant:"filled",name:"resource",label:"Origem",disabled:!0}),_.jsx(un,{variant:"filled",name:"resourceID",label:"ID origem",disabled:!0,InputProps:{endAdornment:_.jsx(P.InputAdornment,{position:"end",children:_.jsx(R22,{onClick:()=>navigator.clipboard.writeText(e.resourceID),children:_.jsx(Pe,{className:"copyIcon",icon:"COPY_CONTENT"})})})}}),_.jsx(un,{variant:"filled",name:"event",label:"Evento",disabled:!0})]})]}),_.jsxs(P.Stack,{direction:"row",gap:2,children:[_.jsxs(P.Stack,{width:"35%",gap:2,children:[_.jsx(P.Typography,{color:"text.secondary",variant:"overline",children:"Tipo de conteúdo:"}),_.jsx(YBn,{name:"content_type",options:z22,row:!0,decorated:!0})]}),_.jsxs(P.Stack,{gap:2,children:[_.jsx(P.Typography,{color:"text.secondary",variant:"overline",children:"Métodos Http:"}),_.jsx(YBn,{name:"http_method",options:H22,row:!0,decorated:!0})]})]}),_.jsx(P.Typography,{color:"text.secondary",variant:"overline",children:"Status:"}),_.jsx(tGn,{name:"active",label:"Ativo"}),_.jsx(P.Typography,{color:"text.secondary",variant:"overline",children:"Cabeçalho:"}),r==null?void 0:r.map((f,s)=>_.jsxs(P.Stack,{direction:"row",gap:2,children:[_.jsx(un,{name:`headers.${s}.name`,label:"Chave",rules:{required:{value:!0,message:"Chave é obrigatório"}}}),_.jsx(un,{name:`headers.${s}.value`,label:"Valor",rules:{required:{value:!0,message:"Valor é obrigatório"}}}),_.jsx(V22,{onClick:()=>c(s),color:"error",children:_.jsx(Pe,{icon:"DELETE_MARK_BUTTON_02"})})]},f.id)),_.jsx(mRn,{actionType:"NEW",size:"large",variant:"outlined",color:"inherit",fullWidth:!0,onClick:()=>l(),children:"Adicionar novo cabeçalho"}),_.jsx(P.Divider,{})]})},nGn=({name:e,helperText:t,rules:n,onSelectOption:a,...r})=>{const{control:u}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>_.jsx(cSn,{...c,...r,onChange:f=>{a&&a(f),c.onChange(f)},error:!!l,helperText:(l==null?void 0:l.message)||t})})},rGn=({name:e,helperText:t,rules:n,...a})=>{const{control:r}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:r,rules:n,render:({field:{name:u,onChange:c,value:l,ref:f},fieldState:{error:s}})=>_.jsx(zBn,{ref:f,...a,name:u,value:l,error:!!s,helperText:(s==null?void 0:s.message)||t,onChange:({target:{value:d}})=>c(d)})})},N22=({name:e,containerProps:t,required:n,rules:a,tabIndex:r})=>{const u=`${e}.zipCode`,c=`${e}.publicPlace`,l=`${e}.number`,f=`${e}.district`,s=`${e}.complement`,d=`${e}.state`,g=`${e}.city`,m=v=>{v.key==="Enter"&&v.preventDefault()};return _.jsxs(P.Stack,{gap:1.5,...t,children:[_.jsxs(P.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[_.jsx(rGn,{name:u,label:"CEP",mask:[{mask:"00000-000"}],InputProps:{endAdornment:_.jsx(P.InputAdornment,{position:"end",children:_.jsx(P.CircularProgress,{size:24})})},rules:a,onKeyDown:m,required:n,sx:{width:"auto",flex:1,minWidth:160},tabIndex:r}),_.jsxs(P.Stack,{direction:{xs:"column",sm:"row"},gap:1.5,flex:{xs:1,md:"1 1 50%"},children:[_.jsx(un,{name:c,label:"Logradouro",onKeyDown:m,inputProps:{maxLength:70},sx:{width:"auto",minWidth:250,flex:1},tabIndex:r}),_.jsx(un,{name:l,label:"Número",onKeyDown:m,inputProps:{maxLength:6},sx:{width:"auto",minWidth:100},tabIndex:r})]})]}),_.jsxs(P.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[_.jsx(un,{name:f,label:"Bairro",onKeyDown:m,inputProps:{maxLength:20},sx:{width:"auto",flex:{xs:1,md:"1 1 100px"}},tabIndex:r}),_.jsx(un,{name:s,label:"Complemento",onKeyDown:m,inputProps:{maxLength:30},sx:{minWidth:200,width:"auto",flex:{xs:1,md:"1 1 500px"}},tabIndex:r})]}),_.jsxs(P.Stack,{gap:1.5,flexWrap:"wrap",direction:{xs:"column",sm:"row"},children:[_.jsx(nGn,{name:d,label:"Estado",options:[],disabled:!0,required:n,sx:{flex:1},tabIndex:r}),_.jsx(un,{name:g,label:"Cidade",disabled:!0,required:n,sx:{flex:1},tabIndex:r})]})]})},T22=({name:e,rules:t,helperText:n,tabIndex:a,...r})=>{const{control:u}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:u,rules:t,render:({field:c,fieldState:{error:l}})=>_.jsxs("div",{children:[_.jsx(P.FormControlLabel,{control:_.jsx(P.Checkbox,{...c,checked:c.value,tabIndex:a}),...r}),(!!l||n)&&_.jsx(P.FormHelperText,{error:!!l,children:l?l==null?void 0:l.message:n})]})})},Z22=({row:e,name:t,rules:n,label:a,options:r,spacing:u,helperText:c,required:l,...f})=>{const{control:s}=Ie.useFormContext(),d=(g,m)=>g.includes(m)?g.filter(v=>v!==m):[...g,m];return _.jsx(Ie.Controller,{name:t,control:s,rules:n,render:({field:{value:g=[],...m},fieldState:{error:v}})=>_.jsxs(P.FormControl,{component:"fieldset",children:[a&&_.jsx(P.FormLabel,{component:"legend",sx:{typography:"body2"},required:l,children:a}),_.jsx(P.FormGroup,{sx:{...e&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:u||0},...e&&{mr:0,"&:not(:last-of-type)":{mr:u||2}}}},children:r.map(C=>_.jsx(P.FormControlLabel,{control:_.jsx(P.Checkbox,{checked:g.includes(C.value),onChange:()=>m.onChange(d(g,C.value))}),label:C.label,...f},C.value))}),(!!v||c)&&_.jsx(P.FormHelperText,{error:!!v,sx:C=>({color:f.disabled?C.palette.grey[500]:void 0}),children:v?v==null?void 0:v.message:c})]})})},U22=({keyName:e,inputs:t=[],rules:n,tabIndex:a,...r})=>{const u=o.useRef(null),{control:c,setValue:l,formState:{errors:f}}=Ie.useFormContext(),s=m=>{const v=m.clipboardData.getData("text").split("");t.map((C,h)=>l(C,v[h])),m.preventDefault()},d=(m,v)=>{const{maxLength:C,value:h,name:b}=m.target,p=b.replace(e,""),y=Number(p),j=document.querySelector(`input[name=${e}${y+1}]`);h.length>C&&(m.target.value=h[0]),h.length>=C&&y<6&&j!==null&&j.focus(),v(m)};kSn("paste",s,u);const g=t.some(m=>f[m]);return _.jsxs(P.Stack,{children:[_.jsx(P.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:u,children:t.map((m,v)=>_.jsx(Ie.Controller,{name:`${e}${v+1}`,control:c,rules:n,render:({field:C,fieldState:{error:h}})=>_.jsx(P.TextField,{...r,...C,autoComplete:"none",error:!!h,autoFocus:v===0,placeholder:"-",onChange:b=>{d(b,C.onChange)},onFocus:b=>b.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number",tabIndex:a}})},m))}),g&&_.jsx(P.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},G22=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:r,rules:{...t,validate:{...t==null?void 0:t.validate,validation:u=>{const c="#"+u.replaceAll("#","");return/^#([0-9A-Fa-f]{3}){1,2}$/.test(c)?!0:"Cor inválida"}}},render:({field:{ref:u,onChange:c,...l},fieldState:{error:f}})=>_.jsx(jNn,{...l,onChangeColor:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||n,...a})})},Y22=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var d;return _.jsx(jT.DatePicker,{inputRef:l,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(d=u.slotProps)==null?void 0:d.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},K22=({name:e,label:t,rules:n,tabIndex:a,helperText:r,required:u,...c})=>{const{control:l,setError:f}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:l,rules:n,render:({field:{value:s,onChange:d},fieldState:{error:g}})=>_.jsx(jT.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...c.localeText},value:[(s==null?void 0:s.startDate)||null,(s==null?void 0:s.endDate)||null],onChange:m=>d({startDate:m[0],endDate:m[1]}),onError:m=>{f(e,{message:m[0]||m[1]||void 0})},...c,slotProps:{textField:({position:m})=>{var v;return{...(v=c.slotProps)==null?void 0:v.textField,required:u,error:!!g,helperText:(g==null?void 0:g.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:m==="start"?`${t} (Dt. Início)`:`${t} (Dt. Fim)`,inputProps:{tabIndex:a}}}},sx:{width:1}})})},X22=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var d;return _.jsx(jT.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:l,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(d=u.slotProps)==null?void 0:d.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Q22=({id:e,children:t,onSubmit:n,methods:a,...r})=>_.jsx(Ie.FormProvider,{...a,children:_.jsx(P.Stack,{component:"form",id:e,onSubmit:n,flex:1,width:1,noValidate:!0,...r,children:t})}),J22=({name:e,helperText:t,rules:n,...a})=>{const{control:r}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:r,rules:n,render:({field:{ref:u,value:c,...l},fieldState:{error:f}})=>_.jsx(WBn,{value:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||t,...a,...l,name:e})})},q22=({name:e,label:t="",rules:n,helperText:a,changed:r,...u})=>{const{control:c}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:c,rules:n,render:({field:l,fieldState:{error:f}})=>_.jsx(P.Autocomplete,{...l,onChange:(s,d)=>{r&&r(d),l.onChange(d)},renderInput:s=>_.jsx(P.TextField,{label:t,error:!!f,helperText:f?f==null?void 0:f.message:a,...s}),...u})})},eu2=({name:e,helperText:t,rules:n,onChange:a,...r})=>{const{control:u}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>_.jsx(jCt,{...c,onChange:f=>{c.onChange(f),a&&a(f)},fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||t,...r})})},tu2=({name:e,sx:t,rules:n,passwordSize:a,specialCharacter:r,upperCaseChar:u,numberChar:c,showErrorMessage:l,match:f,...s})=>{const{watch:d}=Ie.useFormContext(),g=d(e),[m,v]=o.useState(!1),{hasNumberChar:C,hasSpecialCharacter:h,hasUpperCaseChar:b,isLengthValid:p}=ECt(g,a,c,r,u);return _.jsx(un,{...s,name:e,type:m?"text":"password",InputProps:{endAdornment:_.jsx(P.InputAdornment,{position:"end",children:_.jsx(P.IconButton,{onClick:()=>v(!m),edge:"end","aria-label":"Mostrar/Ocultar senha",children:_.jsx(Pe,{icon:m?"VIEW_ON":"VIEW_OFF"})})})},rules:{...n,validate:{...n==null?void 0:n.validate,validationPassword:y=>{const j=ECt(y,a,c,r,u);return!j.hasNumberChar||!j.hasSpecialCharacter||!j.hasUpperCaseChar||!j.isLengthValid?"Senha inválida":f&&f.fieldPassword&&d(f.fieldPassword)!==y?"As senhas devem ser iguais":!0}}},sx:{...t,"& .MuiFormHelperText-root":{display:(!h||!b||!p||!C)&&!l?"none":void 0}}})},YBn=({name:e,rules:t,row:n,label:a,options:r,spacing:u,helperText:c,decorated:l,onChange:f,tabIndex:s,required:d,disabled:g,...m})=>{const{control:v}=Ie.useFormContext(),C=a?`${e}-${a}`:"";return _.jsx(Ie.Controller,{name:e,control:v,rules:t,render:({field:h,fieldState:{error:b}})=>_.jsxs(P.FormControl,{component:"fieldset",sx:{...l&&{paddingLeft:1.5}},children:[a&&_.jsx(P.FormLabel,{component:"legend",id:C,sx:{typography:"body2"},required:d,children:a}),_.jsx(P.RadioGroup,{...m,...h,onChange:(p,y)=>{h.onChange(p),f&&f(p,y)},"aria-labelledby":C,row:n,children:r.map(p=>_.jsx(P.FormControlLabel,{value:p.value,control:_.jsx(P.Radio,{inputProps:{tabIndex:s},disabled:g,checked:p.value===h.value}),label:p.label,sx:({palette:y})=>({"&:not(:last-of-type)":{mb:u||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:u||2}},...l&&{border:`1px solid ${P.alpha(y.grey[500],.32)}`,borderRadius:1,padding:.25,paddingRight:(u||0)/2||1,...h.value===p.value&&{borderColor:"primary.main",backgroundColor:P.alpha(y.primary.main,.05)}}})},p.value))}),(!!b||c)&&_.jsx(P.FormHelperText,{error:!!b,sx:p=>({color:g?p.palette.grey[500]:void 0}),children:b?b==null?void 0:b.message:c})]})})},nu2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var d;return _.jsx(jT.TimePicker,{ampm:!1,format:"HH:mm",inputRef:l,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(d=u.slotProps)==null?void 0:d.textField,error:!!s,required:r,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},ru2=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:d,setCropModalOpen:g,handleRemove:m,cropModalOpen:v,cancelChanges:C,saveChanges:h,previewImage:b,setCropper:p,preview:y,closePreviewImage:j}=QUn({onFileCropped:e,onImageUploaded:t,onCancel:n});return _.jsxs(_.Fragment,{children:[_.jsxs(P.Stack,{position:"relative",alignItems:"center",justifyContent:"center",children:[c&&_.jsx(h22,{}),_.jsx(XUn,{...s,id:d,file:l,onDrop:E=>{if(E.length>0){g(!0);const O=new FileReader;O.addEventListener("load",()=>{var k;const M=((k=O.result)==null?void 0:k.toString())||"";t(M),e(void 0)}),O.readAsDataURL(E[0])}},image:u,tabIndex:f})]}),_.jsx(JUn,{id:d,open:v,onClose:C,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:h,onPreview:b,onInitialized:p}),_.jsx(P.Dialog,{open:!!y,onClose:j,scroll:"body",PaperProps:{sx:{p:2}},children:y&&_.jsx("img",{src:y,alt:"Preview"})})]})};function aGn(e,t){const{watch:n,setValue:a}=Ie.useFormContext(),[r,u]=o.useState(t),c=n(e)||[];return{uploadFile:async m=>{if(!m){a(e,void 0),u(void 0);return}a(e,m),u(Object.assign(m,{preview:URL.createObjectURL(m)}))},uploadFiles:async m=>{a(e,[...c,...m.map(v=>Object.assign(v,{preview:URL.createObjectURL(v)}))])},handleDeleteFile:()=>{a(e,void 0),u(void 0)},handleRemoveAll:()=>{a(e,void 0)},handleRemove:m=>{const v=c.filter(C=>C!==m);a(e,v)},file:r,setFileValue:u}}const au2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:d}=Ie.useFormContext(),{uploadFile:g,file:m,setFileValue:v}=aGn(e);return _.jsx(Ie.Controller,{name:e,control:d,rules:t,render:({field:{value:C},fieldState:{error:h}})=>_.jsx(ru2,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{g(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&_.jsx(P.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},iu2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:d}=Ie.useFormContext(),{uploadFile:g,file:m,setFileValue:v}=aGn(e);return _.jsx(Ie.Controller,{name:e,control:d,rules:t,render:({field:{value:C},fieldState:{error:h}})=>_.jsx(qUn,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{g(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&_.jsx(P.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},ou2=Object.freeze(Object.defineProperty({__proto__:null,default:Aer},Symbol.toStringTag,{value:"Module"}));R.ActionButton=mRn,R.Address=N22,R.Autocomplete=cSn,R.AutocompleteField=nGn,R.BuilderLayout=rDo,R.BuilderSidebar=Dzo,R.Carousel=mEo,R.CarouselArrowIndex=BEo,R.CarouselArrows=yEo,R.CarouselDots=bEo,R.Checkbox=T22,R.Codes=U22,R.ColorPickerField=G22,R.ColorPickerInput=jNn,R.Common=Tn2,R.CommonSSR=Un2,R.Confirm=Gn2,R.CustomAvatar=jTn,R.CustomAvatarGroup=wTn,R.DataGrid=Qn2,R.DatePicker=Y22,R.DateRangePicker=K22,R.DateTimePicker=X22,R.Delayed=Jn2,R.DialogAnimate=str,R.Drawer=lr2,R.EmptyContent=YHn,R.EmptyView=LTn,R.Error=sr2,R.FabButtonAnimate=Qxn,R.Field=un,R.FixedProgressBar=lCt,R.Form=Q22,R.FrameSkeleton=x22,R.HelpButton=lSn,R.Icon=Pe,R.IconButtonAnimate=Jxn,R.Iconify=gZn,R.IllustrationEmptyContent=CIn,R.ImageCrop=UZn,R.Incrementer=WBn,R.IncrementerField=J22,R.Label=oUn,R.Lightbox=ISo,R.LoadingScreen=Aa2,R.MaskedInput=zBn,R.MaskedInputField=rGn,R.MaterialDesignContent=kyt,R.MenuPopover=vUn,R.Modal=hUn,R.ModalActions=oi2,R.MotionContainer=Mtr,R.MotionLazyContainer=yyt,R.MotionViewport=wtr,R.MultiCheckbox=Z22,R.MultipleChipField=q22,R.NoData=bIn,R.NumberInput=jCt,R.NumberInputField=eu2,R.PasswordField=tu2,R.PasswordRules=di2,R.PopoverSelect=O22,R.Portal=CUn,R.RadioGroupField=YBn,R.Result=gi2,R.SavedChanges=$i2,R.Scrollbar=YDn,R.SearchInput=xi2,R.SnackbarContent=Eyt,R.SnackbarProvider=Lzn,R.SplashScreen=zi2,R.Steps=Ri2,R.StyledTab=Vi2,R.StyledTabs=Fi2,R.Summary=L22,R.Switch=tGn,R.TRANSITION=yIn,R.TabPanel=Ni2,R.TableEmptyRows=AEo,R.TableHeadCustom=VEo,R.TableNoData=zEo,R.TablePaginationCustom=NEo,R.TableSelectedAction=FEo,R.TableSkeleton=HEo,R.TextAnimate=dtr,R.TextMaxLine=OUn,R.ThemeProvider=OTn,R.TimePicker=nu2,R.Transition=Svt,R.Upload=KUn,R.UploadAvatar=XUn,R.UploadAvatarWithCropField=au2,R.UploadBox=_22,R.UploadIllustration=hIn,R.UploadWithCrop=qUn,R.UploadWithCropField=iu2,R.Webhook=F22,R.WhiteBox=eGn,R.color=jt2,R.compare=hzo,R.cssStyles=SEo,R.emptyRows=WEo,R.file=_i2,R.formatNumber=ga2,R.formatTime=Li2,R.getComparator=IEo,R.loadable=Ii2,R.mask=Bi2,R.number=ua2,R.routes=Ei2,R.sort=Di2,R.useActiveElement=aDo,R.useApiMessage=Lzo,R.useCarousel=vEo,R.useCopyToClipboard=iDo,R.useDatagrid=oDo,R.useDeepCompareEffect=bzo,R.useEventListener=kSn,R.useIsMounting=pzo,R.useLightBox=zSo,R.useOffSetTop=Mzo,R.useOnClickOutside=wzo,R.usePagination=jzo,R.usePopover=DSn,R.useResponsive=ezn,R.useSnackbar=Pzn,R.useTable=$Eo,R.useTabs=Ozo,R.useToggle=SSn,R.uuidv4=Wi2,R.validators=li2,R.varBgColor=EXn,R.varBgKenburns=kXn,R.varBgPan=SXn,R.varBounce=MXn,R.varContainer=tvt,R.varFade=lle,R.varFlip=OXn,R.varHover=PXn,R.varPath=bXn,R.varRotate=LXn,R.varScale=wXn,R.varSlide=jXn,R.varTranEnter=$e,R.varTranExit=Ne,R.varTranHover=yXn,R.varZoom=pXn,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|
|
35409
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TUn(e,t){if(e){if(typeof e=="string")return TBn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TBn(e,t)}}function TBn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function r22(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,u=!1,c,l;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){u=!0,l=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw l}}return a}}function a22(e){if(Array.isArray(e))return e}function ZUn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZUn(Object(n),!0).forEach(function(a){ZBn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZUn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ZBn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WCt(e,t){if(e==null)return{};var n=i22(e,t),a,r;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r<u.length;r++)a=u[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function i22(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,u;for(u=0;u<a.length;u++)r=a[u],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var UBn=o.forwardRef(function(e,t){var n=e.children,a=WCt(e,Yo2),r=ICt(a),u=r.open,c=WCt(r,Ko2);return o.useImperativeHandle(t,function(){return{open:u}},[u]),o.createElement(o.Fragment,null,n(Pt(Pt({},c),{},{open:u})))});UBn.displayName="Dropzone";var UUn={disabled:!1,getFilesFromEvent:ho2,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};UBn.defaultProps=UUn,UBn.propTypes={children:L.func,accept:L.objectOf(L.arrayOf(L.string)),multiple:L.bool,preventDropOnDocument:L.bool,noClick:L.bool,noKeyboard:L.bool,noDrag:L.bool,noDragEventsBubbling:L.bool,minSize:L.number,maxSize:L.number,maxFiles:L.number,disabled:L.bool,getFilesFromEvent:L.func,onFileDialogCancel:L.func,onFileDialogOpen:L.func,useFsAccessApi:L.bool,autoFocus:L.bool,onDragEnter:L.func,onDragLeave:L.func,onDragOver:L.func,onDrop:L.func,onDropAccepted:L.func,onDropRejected:L.func,onError:L.func,validator:L.func};var GBn={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ICt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Pt(Pt({},UUn),e),n=t.accept,a=t.disabled,r=t.getFilesFromEvent,u=t.maxSize,c=t.minSize,l=t.multiple,f=t.maxFiles,s=t.onDragEnter,d=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,C=t.onDropRejected,h=t.onFileDialogCancel,b=t.onFileDialogOpen,p=t.useFsAccessApi,y=t.autoFocus,j=t.preventDropOnDocument,E=t.noClick,O=t.noKeyboard,M=t.noDrag,k=t.noDragEventsBubbling,D=t.onError,S=t.validator,B=o.useMemo(function(){return Zo2(n)},[n]),z=o.useMemo(function(){return To2(n)},[n]),N=o.useMemo(function(){return typeof b=="function"?b:GUn},[b]),$=o.useMemo(function(){return typeof h=="function"?h:GUn},[h]),H=o.useRef(null),Z=o.useRef(null),A=o.useReducer(o22,GBn),T=NBn(A,2),Q=T[0],ne=T[1],V=Q.isFocused,F=Q.isFileDialogActive,Y=o.useRef(typeof window<"u"&&window.isSecureContext&&p&&No2()),ie=function(){!Y.current&&F&&setTimeout(function(){if(Z.current){var he=Z.current.files;he.length||(ne({type:"closeDialog"}),$())}},300)};o.useEffect(function(){return window.addEventListener("focus",ie,!1),function(){window.removeEventListener("focus",ie,!1)}},[Z,F,$,Y]);var q=o.useRef([]),fe=function(he){H.current&&H.current.contains(he.target)||(he.preventDefault(),q.current=[])};o.useEffect(function(){return j&&(document.addEventListener("dragover",VUn,!1),document.addEventListener("drop",fe,!1)),function(){j&&(document.removeEventListener("dragover",VUn),document.removeEventListener("drop",fe))}},[H,j]),o.useEffect(function(){return!a&&y&&H.current&&H.current.focus(),function(){}},[H,y,a]);var ce=o.useCallback(function(J){D?D(J):console.error(J)},[D]),Ce=o.useCallback(function(J){J.preventDefault(),J.persist(),Le(J),q.current=[].concat(Jo2(q.current),[J.target]),BCt(J)&&Promise.resolve(r(J)).then(function(he){if(!(DCt(J)&&!k)){var at=he.length,He=at>0&&Ao2({files:he,accept:B,minSize:c,maxSize:u,multiple:l,maxFiles:f,validator:S}),Et=at>0&&!He;ne({isDragAccept:He,isDragReject:Et,isDragActive:!0,type:"setDraggedFiles"}),s&&s(J)}}).catch(function(he){return ce(he)})},[r,s,ce,k,B,c,u,l,f,S]),le=o.useCallback(function(J){J.preventDefault(),J.persist(),Le(J);var he=BCt(J);if(he&&J.dataTransfer)try{J.dataTransfer.dropEffect="copy"}catch{}return he&&g&&g(J),!1},[g,k]),ee=o.useCallback(function(J){J.preventDefault(),J.persist(),Le(J);var he=q.current.filter(function(He){return H.current&&H.current.contains(He)}),at=he.indexOf(J.target);at!==-1&&he.splice(at,1),q.current=he,!(he.length>0)&&(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),BCt(J)&&d&&d(J))},[H,d,k]),ge=o.useCallback(function(J,he){var at=[],He=[];J.forEach(function(Et){var je=AUn(Et,B),qt=NBn(je,2),_n=qt[0],Dc=qt[1],KO=RUn(Et,c,u),XO=NBn(KO,2),CT=XO[0],bT=XO[1],yT=S?S(Et):null;if(_n&&CT&&!yT)at.push(Et);else{var pT=[Dc,bT];yT&&(pT=pT.concat(yT)),He.push({file:Et,errors:pT.filter(function(OT){return OT})})}}),(!l&&at.length>1||l&&f>=1&&at.length>f)&&(at.forEach(function(Et){He.push({file:Et,errors:[Ho2]})}),at.splice(0)),ne({acceptedFiles:at,fileRejections:He,type:"setFiles"}),m&&m(at,He,he),He.length>0&&C&&C(He,he),at.length>0&&v&&v(at,he)},[ne,l,B,c,u,f,m,v,C,S]),We=o.useCallback(function(J){J.preventDefault(),J.persist(),Le(J),q.current=[],BCt(J)&&Promise.resolve(r(J)).then(function(he){DCt(J)&&!k||ge(he,J)}).catch(function(he){return ce(he)}),ne({type:"reset"})},[r,ge,ce,k]),U=o.useCallback(function(){if(Y.current){ne({type:"openDialog"}),N();var J={multiple:l,types:z};window.showOpenFilePicker(J).then(function(he){return r(he)}).then(function(he){ge(he,null),ne({type:"closeDialog"})}).catch(function(he){Uo2(he)?($(he),ne({type:"closeDialog"})):Go2(he)?(Y.current=!1,Z.current?(Z.current.value=null,Z.current.click()):ce(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ce(he)});return}Z.current&&(ne({type:"openDialog"}),N(),Z.current.value=null,Z.current.click())},[ne,N,$,p,ge,ce,z,l]),qe=o.useCallback(function(J){!H.current||!H.current.isEqualNode(J.target)||(J.key===" "||J.key==="Enter"||J.keyCode===32||J.keyCode===13)&&(J.preventDefault(),U())},[H,U]),se=o.useCallback(function(){ne({type:"focus"})},[]),te=o.useCallback(function(){ne({type:"blur"})},[]),_e=o.useCallback(function(){E||(Fo2()?setTimeout(U,0):U())},[E,U]),Oe=function(he){return a?null:he},K=function(he){return O?null:Oe(he)},pe=function(he){return M?null:Oe(he)},Le=function(he){k&&he.stopPropagation()},xe=o.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=J.refKey,at=he===void 0?"ref":he,He=J.role,Et=J.onKeyDown,je=J.onFocus,qt=J.onBlur,_n=J.onClick,Dc=J.onDragEnter,KO=J.onDragOver,XO=J.onDragLeave,CT=J.onDrop,bT=WCt(J,Xo2);return Pt(Pt(ZBn({onKeyDown:K(Sc(Et,qe)),onFocus:K(Sc(je,se)),onBlur:K(Sc(qt,te)),onClick:Oe(Sc(_n,_e)),onDragEnter:pe(Sc(Dc,Ce)),onDragOver:pe(Sc(KO,le)),onDragLeave:pe(Sc(XO,ee)),onDrop:pe(Sc(CT,We)),role:typeof He=="string"&&He!==""?He:"presentation"},at,H),!a&&!O?{tabIndex:0}:{}),bT)}},[H,qe,se,te,_e,Ce,le,ee,We,O,M,a]),ze=o.useCallback(function(J){J.stopPropagation()},[]),Zt=o.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=J.refKey,at=he===void 0?"ref":he,He=J.onChange,Et=J.onClick,je=WCt(J,Qo2),qt=ZBn({accept:B,multiple:l,type:"file",style:{display:"none"},onChange:Oe(Sc(He,We)),onClick:Oe(Sc(Et,ze)),tabIndex:-1},at,Z);return Pt(Pt({},qt),je)}},[Z,n,l,We,a]);return Pt(Pt({},Q),{},{isFocused:V&&!a,getRootProps:xe,getInputProps:Zt,rootRef:H,inputRef:Z,open:Oe(U)})}function o22(e,t){switch(t.type){case"focus":return Pt(Pt({},e),{},{isFocused:!0});case"blur":return Pt(Pt({},e),{},{isFocused:!1});case"openDialog":return Pt(Pt({},GBn),{},{isFileDialogActive:!0});case"closeDialog":return Pt(Pt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Pt(Pt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Pt(Pt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Pt({},GBn);default:return e}}function GUn(){}const YUn=({fileRejections:e})=>e.length?_.jsx(P.Paper,{variant:"outlined",sx:{py:1,px:2,mt:3,bgcolor:t=>X(t.palette.error.main,.08),borderColor:t=>X(t.palette.error.main,.24)},children:e.map(({file:t,errors:n})=>{const{path:a,size:r}=RBn(t);return _.jsxs(P.Box,{sx:{my:1},children:[_.jsxs(P.Typography,{variant:"subtitle2",noWrap:!0,children:[a," - ",r?kBn(r):""]}),n.map(u=>_.jsxs(P.Box,{component:"span",sx:{typography:"caption"},children:["- ",u.message]},u.code))]},a)})}):null,u22=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return _.jsx(P.Stack,{position:"absolute",width:1,height:1,maxHeight:"100%",alignItems:"center",justifyContent:"center",top:0,right:0,bottom:0,left:0,padding:2,margin:"auto",children:_.jsx("img",{alt:"file preview",src:t,style:{borderRadius:8,width:"auto",maxWidth:"100%",maxHeight:"100%",height:"auto"}})})},c22=Bt("div")(({theme:e})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:e.spacing(5),borderRadius:e.shape.borderRadius,transition:e.transitions.create("padding"),backgroundColor:e.palette.background.neutral,border:`1px dashed ${X(e.palette.grey[500],.32)}`,"&:hover":{opacity:.72}})),l22=({header:e,description:t,sx:n,...a})=>_.jsxs(P.Stack,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...a,children:[_.jsx(hIn,{sx:{width:220}}),_.jsxs("div",{children:[_.jsx(P.Typography,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),_.jsx(P.Typography,{variant:"body2",sx:{color:"text.secondary"},children:t||_.jsxs(_.Fragment,{children:["Solte os arquivos aqui ou clique",_.jsx(P.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua máquina"]})})]})]}),KUn=({id:e,disabled:t,multiple:n=!1,error:a,helperText:r,file:u,onDelete:c,files:l,thumbnail:f,onRemove:s,onHandleMainImage:d,mainUrl:g,sx:m,dropZoneProps:v,placeholderProps:C,placeholderAlt:h,image:b,tabIndex:p,...y})=>{const{getRootProps:j,getInputProps:E,isDragActive:O,isDragReject:M,fileRejections:k}=ICt({multiple:n,disabled:t,...y}),D=!!u&&!n||b,S=l&&n&&l.length>0,B=M||!!a;return _.jsxs(P.Box,{sx:{width:1,position:"relative",...m},children:[_.jsxs(c22,{...j(),sx:{...O&&{opacity:.72},...B&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"},...v},children:[_.jsx("input",{...E(),id:e,tabIndex:p}),h?_.jsx(P.Stack,{sx:{...D&&{opacity:0}},children:h}):_.jsx(l22,{sx:{...D&&{opacity:0}},header:C==null?void 0:C.title,description:C==null?void 0:C.description}),D&&_.jsx(u22,{file:u||b||""})]}),r&&_.jsx(P.FormHelperText,{error:!!a,sx:z=>({mx:"14px",color:t?z.palette.grey[500]:void 0}),children:r}),_.jsx(YUn,{fileRejections:k}),D&&c&&_.jsx(P.IconButton,{size:"small",onClick:c,sx:{top:16,right:16,zIndex:9,position:"absolute",color:z=>X(z.palette.common.white,.8),bgcolor:z=>X(z.palette.grey[900],.72),"&:hover":{bgcolor:z=>X(z.palette.grey[900],.48)}},children:_.jsx(Pe,{icon:"CLOSE_MARK_BUTTON",width:18})}),S&&_.jsx(_.Fragment,{children:_.jsx(P.Box,{sx:{my:3},children:_.jsx(go2,{files:l,thumbnail:f,onRemove:s,onHandleMainImage:d,mainUrl:g})})})]})},f22=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return _.jsx("img",{alt:"avatar",src:t,style:{zIndex:8,overflow:"hidden",borderRadius:"50%",position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})},s22=Bt("div")(({theme:e})=>({width:144,height:144,margin:"auto",display:"flex",cursor:"pointer",overflow:"hidden",borderRadius:"50%",alignItems:"center",position:"relative",justifyContent:"center",border:`1px dashed ${X(e.palette.grey[500],.32)}`})),d22=Bt("div")(({theme:e})=>({zIndex:7,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",flexDirection:"column",justifyContent:"center",width:"calc(100% - 16px)",height:"calc(100% - 16px)",color:e.palette.text.disabled,backgroundColor:e.palette.background.neutral,transition:e.transitions.create("opacity",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.shorter})})),XUn=({error:e,file:t,image:n,disabled:a,helperText:r,sx:u,tabIndex:c,...l})=>{const{getRootProps:f,getInputProps:s,isDragActive:d,isDragReject:g,fileRejections:m}=ICt({multiple:!1,disabled:a,...l}),v=!!t||n,C=g||!!e;return _.jsxs(_.Fragment,{children:[_.jsxs(s22,{...f(),sx:{...d&&{opacity:.72},...C&&{borderColor:"error.light",...v&&{bgcolor:"error.lighter"}},...a&&{opacity:.48,pointerEvents:"none"},...v&&{"&:hover":{"& .placeholder":{opacity:1}}},...u},children:[_.jsx("input",{...s(),tabIndex:c}),v&&_.jsx(f22,{file:t||n||""}),_.jsxs(d22,{className:"placeholder",sx:{"&:hover":{opacity:.72},...v&&{zIndex:9,opacity:0,color:"common.white",bgcolor:h=>X(h.palette.grey[900],.64)},...C&&{color:"error.main",bgcolor:"error.lighter"}},children:[_.jsx(Pe,{icon:"ADD_IMAGE",width:24,sx:{mb:1}}),_.jsx(P.Typography,{variant:"caption",children:t?"Atualizar foto":"Carregar foto"})]})]}),r&&r,_.jsx(YUn,{fileRejections:m})]})},g22=Bt("div")(({theme:e})=>({width:64,height:64,fontSize:24,display:"flex",flexShrink:0,cursor:"pointer",alignItems:"center",justifyContent:"center",margin:e.spacing(.5),color:e.palette.text.disabled,borderRadius:e.shape.borderRadius,border:`dashed 1px ${e.palette.divider}`,backgroundColor:X(e.palette.grey[500],.08),"&:hover":{opacity:.72}})),_22=({placeholderAlt:e,error:t,disabled:n,sx:a,tabIndex:r,...u})=>{const{getRootProps:c,getInputProps:l,isDragActive:f,isDragReject:s}=ICt({disabled:n,...u}),d=s||t;return _.jsxs(g22,{...c(),sx:{...f&&{opacity:.72},...d&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...n&&{opacity:.48,pointerEvents:"none"},...a},children:[_.jsx("input",{...l(),tabIndex:r}),e||_.jsx(Pe,{icon:"CLOUD_UPLOAD",width:28})]})},QUn=({onFileCropped:e,onImageUploaded:t,onCancel:n})=>{const a=o.useId(),[r,u]=o.useState(),[c,l,f]=SSn(),[s,d]=o.useState();return{id:a,setCropModalOpen:f,handleRemove:()=>{e(void 0),t(void 0),f(!1)},toggleCropModalOpen:l,cropModalOpen:c,cancelChanges:()=>{n&&n(),f(!1)},saveChanges:()=>{r!==void 0&&r.getCroppedCanvas().toBlob(b=>{if(!b)return;const p=new File([b],"imagem");e(p),l()},"image/png",1)},previewImage:()=>{r!==void 0&&d(r.getCroppedCanvas().toDataURL())},setCropper:u,preview:s,closePreviewImage:()=>d(void 0)}},JUn=({id:e,open:t,onClose:n,label:a,onSave:r,onRemove:u,onPreview:c,imageSrc:l,aspectRatio:f,onInitialized:s})=>{const[d,g]=o.useState(.5);return _.jsx(hUn,{open:t,onClose:n,dialogTitle:a,actions:_.jsxs(_.Fragment,{children:[_.jsx(P.Button,{variant:"outlined",size:"medium",onClick:n,color:"inherit",children:"Cancelar"}),_.jsx(P.Button,{variant:"contained",size:"medium",onClick:r,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",keepMounted:!0,children:_.jsxs(P.Stack,{gap:2,children:[_.jsx(UZn,{imageSrc:l,aspectRatio:f,onInitialized:s,zoom:d,onZoomChange:g}),_.jsxs(P.Stack,{gap:1.5,children:[_.jsxs(P.Stack,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[_.jsx(P.Typography,{variant:"body1",children:"Zoom"}),_.jsx(P.Slider,{value:d,onChange:(m,v)=>g(Array.isArray(v)?v[0]:v),min:.1,max:2,size:"medium",step:.0125})]}),_.jsxs(P.Stack,{direction:"row",gap:2,children:[_.jsx(P.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:_.jsx(Pe,{icon:"DELETE_MARK_BUTTON_02"}),onClick:u,children:"Remover"}),_.jsx(P.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:_.jsx(Pe,{icon:"PLAY_SIMPLE"}),onClick:c,children:"Pré-visualizar"}),_.jsx(P.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:_.jsx(Pe,{icon:"SEARCH_IMAGE"}),component:"label",htmlFor:e,children:"Alterar"})]})]})]})})},m22=P.styled(P.Stack)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),v22=P.styled(P.Stack)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:P.alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),h22=P.styled(P.CircularProgress)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),qUn=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:d,setCropModalOpen:g,handleRemove:m,toggleCropModalOpen:v,cropModalOpen:C,cancelChanges:h,saveChanges:b,previewImage:p,setCropper:y,preview:j,closePreviewImage:E}=QUn({onFileCropped:e,onImageUploaded:t,onCancel:n});return _.jsxs(_.Fragment,{children:[_.jsxs(m22,{children:[c&&_.jsx(lCt,{}),_.jsx(KUn,{...s,id:d,file:l,onDrop:O=>{if(O.length>0){g(!0);const M=new FileReader;M.addEventListener("load",()=>{var D;const k=((D=M.result)==null?void 0:D.toString())||"";t(k),e(void 0)}),M.readAsDataURL(O[0])}},image:u,tabIndex:f}),(l||u)&&_.jsxs(v22,{className:"actions",children:[_.jsx(P.Button,{color:"inherit",startIcon:_.jsx(Pe,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:m,children:"Remover"}),_.jsx(P.Button,{color:"inherit",startIcon:_.jsx(Pe,{icon:"SEARCH_IMAGE",color:"primary.maon"}),onClick:v,children:"Editar"})]})]}),_.jsx(JUn,{id:d,open:C,onClose:h,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:b,onPreview:p,onInitialized:y}),_.jsx(P.Dialog,{open:!!j,onClose:E,scroll:"body",PaperProps:{sx:{p:2}},children:j&&_.jsx("img",{src:j,alt:"Preview"})})]})},C22=P.styled(P.Stack)(({theme:e})=>({backgroundColor:"#fff",border:`1px solid ${e.palette.grey[300]}`})),eGn=({children:e,...t})=>_.jsx(C22,{borderRadius:1,gap:3,padding:3,...t,children:e}),b22=P.styled(P.Box)(()=>({marginLeft:"4px",fontWeight:"fontWeightBold"})),y22=P.styled(P.Button)(()=>({fontWeight:"fontWeightSemiBold"})),p22=P.styled(Pe)(({theme:e})=>({color:e.palette.primary.main})),O22=({selectedTitle:e,onSelect:t,options:n})=>{const a=DSn();return _.jsxs(_.Fragment,{children:[_.jsx(y22,{disableRipple:!0,color:"inherit",onClick:a.onOpen,endIcon:_.jsx(p22,{icon:a.open?"CHEVRON_UP":"ARROW_DOWN_SIMPLE"}),children:_.jsx(b22,{component:"span",children:e.label})}),_.jsx(vUn,{open:a.open,onClose:a.onClose,children:n.map(r=>_.jsx(P.MenuItem,{selected:r.value===e.value,onClick:()=>{a.onClose(),t(r.value)},children:r.label},r.value))})]})},j22=P.styled(P.Stack)({display:"grid",gridTemplateColumns:"auto auto"}),w22=P.styled(P.Typography)(({theme:e})=>({color:e.palette.grey[600]})),M22=P.styled(P.Typography)(({theme:e})=>({textAlign:"right",color:e.palette.grey[800]})),L22=({data:e,...t})=>e.length===0?null:_.jsx(j22,{gap:1,...t,children:e.map(n=>[_.jsx(w22,{variant:"body2",children:n.label},`label:${n.id}`),_.jsx(M22,{variant:"body2",children:n.value},`value:${n.id}`)])}),P22=P.styled(P.Stack)(({theme:e})=>({backgroundColor:"#fff",minWidth:"250px",padding:24,minHeight:"100vh",borderRight:`1px solid ${e.palette.grey[300]}`})),E22=P.styled(P.Stack)(({theme:e})=>({backgroundColor:"#fff",position:"sticky",top:0,zIndex:999,width:"100%",padding:24,gap:24,borderBottom:`1px solid ${e.palette.grey[300]}`})),k22=P.styled(P.Stack)({flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:24}),S22=P.styled(P.Stack)(({theme:e})=>({height:"100%",width:"50%",flex:1,[e.breakpoints.down(1680)]:{width:"70%"}})),D22=P.styled(P.Typography)(({theme:e})=>({color:e.palette.grey[800],fontSize:18,fontWeight:700})),B22=P.styled(P.Typography)(({theme:e})=>({color:e.palette.grey[500],fontSize:14,fontWeight:400,paddingBottom:24})),W22=P.styled(P.Button)(({theme:e})=>({paddingTop:6,paddingBottom:6,paddingLeft:0,margin:0,marginBottom:4,marginTop:4,width:"100%",display:"block",cursor:"pointer",color:e.palette.grey[600],textAlign:"left",fontWeight:400,fontSize:14,"> span":{color:e.palette.error.main}})),I22=P.styled(YDn)(()=>({height:1,"& .simplebar-content":{height:1}})),$22=P.styled(P.Stack)(()=>({position:"fixed",width:"202px"})),x22=({title:e,sections:t,headerLeftContent:n,headerRightContent:a,onClickBack:r})=>_.jsx(P.Stack,{children:_.jsxs(P.Stack,{direction:"row",children:[_.jsx(P22,{children:_.jsx(I22,{children:_.jsxs($22,{children:[_.jsx(P.Typography,{variant:"overline",color:"text.disabled",fontWeight:700,children:"ACESSO RÁPIDO"}),t.map((u,c)=>_.jsxs(P.Stack,{children:[_.jsxs(W22,{onClick:()=>{u.ref.current&&u.ref.current.scrollIntoView({block:"end",behavior:"smooth"})},children:[u.title,u.isRequired&&_.jsx("span",{children:"*"})]}),c<t.length-1&&_.jsx(P.Divider,{})]},c))]})})}),_.jsxs(P.Stack,{width:"100%",alignItems:"center",mb:8,children:[_.jsx(E22,{children:_.jsxs(k22,{children:[_.jsxs(P.Stack,{flexDirection:"row",gap:2,children:[_.jsx(P.IconButton,{color:"primary",onClick:()=>r(),children:_.jsx(Pe,{icon:"CHEVRON_LEFT"})}),_.jsx(P.Typography,{variant:"h4",children:e}),n]}),_.jsxs(P.Stack,{direction:"row",gap:2,alignItems:"center",minWidth:"max-content",children:[_.jsx(lSn,{disabled:!0}),a]})]})}),_.jsx(S22,{children:t.map(u=>_.jsxs(P.Stack,{ref:u.ref,paddingTop:3,paddingBottom:2,alignItems:"start",width:"100%",children:[_.jsx(D22,{children:u.title}),_.jsx(B22,{children:u.subTitle}),_.jsx(eGn,{width:"100%",borderRadius:1,gap:1.5,padding:3,children:u.child})]},u.title))})]})]})}),un=({name:e,helperText:t,rules:n,onChange:a,tabIndex:r,...u})=>{const{control:c}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:c,rules:n,render:({field:{ref:l,...f},fieldState:{error:s}})=>_.jsx(P.TextField,{...f,onChange:d=>{f.onChange(d),a&&a(d)},inputRef:l,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||t,...u,inputProps:{...u.inputProps,tabIndex:r}})})},tGn=({name:e,helperText:t,onChange:n,tabIndex:a,...r})=>{const{control:u}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:u,render:({field:c,fieldState:{error:l}})=>_.jsxs("div",{children:[_.jsx(P.FormControlLabel,{control:_.jsx(P.Switch,{...c,checked:c.value,onChange:(f,s)=>{c.onChange(f),n&&n(f,s)},inputProps:{tabIndex:a}}),...r}),(!!l||t)&&_.jsx(P.FormHelperText,{error:!!l,sx:f=>({mx:"14px",color:r.disabled?f.palette.grey[500]:void 0}),children:l?l==null?void 0:l.message:t})]})})},z22=[{label:"JSON",value:"JSON"},{label:"XML",value:"XML"},{label:"BINÁRIO",value:"BYTEA"}],H22=[{label:"PUT",value:"PUT"},{label:"POST",value:"POST"},{label:"GET",value:"GET"},{label:"DELETE",value:"DELETE"}],A22=P.styled(P.Stack)(({theme:e})=>({border:`1px solid ${P.alpha(e.palette.primary.main,.3)}`,backgroundColor:P.alpha(e.palette.primary.main,.05),flexDirection:"row",alignItems:"center",padding:10,gap:10,borderRadius:8,marginBottom:8,svg:{color:e.palette.primary.main}})),R22=P.styled(P.IconButton)(({theme:e})=>({svg:{color:`${e.palette.primary.main} !important`}})),V22=P.styled(P.IconButton)(()=>({height:"38px",alignSelf:"center"})),F22=({webhookData:e,isEditing:t=!1,haveTip:n=!1})=>{const{control:a}=Ie.useFormContext(),{fields:r,append:u,remove:c}=Ie.useFieldArray({name:"headers",control:a}),l=()=>{u({value:"",name:""})};return _.jsxs(_.Fragment,{children:[n&&_.jsxs(A22,{children:[_.jsx(Pe,{icon:"INFO_CIRCLE"}),_.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:"Webhooks permitem que serviços externos sejam notificados quando determinados eventos acontecem. Saiba mais acessando a documentação do Webhook"})]}),t&&_.jsx(un,{name:"name",label:"Nome do webhook"}),_.jsxs(P.Stack,{direction:"row",gap:2,children:[_.jsx(un,{name:"url",label:"URL de endpoint",rules:{required:{value:!0,message:"Url é obrigatório"}}}),_.jsx(un,{name:"filter",label:"Filtro"})]}),t&&e&&_.jsxs(_.Fragment,{children:[_.jsx(un,{variant:"filled",name:"solution",label:"Solução",disabled:!0}),_.jsxs(P.Stack,{direction:"row",gap:2,children:[_.jsx(un,{variant:"filled",name:"resource",label:"Origem",disabled:!0}),_.jsx(un,{variant:"filled",name:"resourceID",label:"ID origem",disabled:!0,InputProps:{endAdornment:_.jsx(P.InputAdornment,{position:"end",children:_.jsx(R22,{onClick:()=>navigator.clipboard.writeText(e.resourceID),children:_.jsx(Pe,{className:"copyIcon",icon:"COPY_CONTENT"})})})}}),_.jsx(un,{variant:"filled",name:"event",label:"Evento",disabled:!0})]})]}),_.jsxs(P.Stack,{direction:"row",gap:2,children:[_.jsxs(P.Stack,{width:"35%",gap:2,children:[_.jsx(P.Typography,{color:"text.secondary",variant:"overline",children:"Tipo de conteúdo:"}),_.jsx(YBn,{name:"content_type",options:z22,row:!0,decorated:!0})]}),_.jsxs(P.Stack,{gap:2,children:[_.jsx(P.Typography,{color:"text.secondary",variant:"overline",children:"Métodos Http:"}),_.jsx(YBn,{name:"http_method",options:H22,row:!0,decorated:!0})]})]}),_.jsx(P.Typography,{color:"text.secondary",variant:"overline",children:"Status:"}),_.jsx(tGn,{name:"active",label:"Ativo"}),_.jsx(P.Typography,{color:"text.secondary",variant:"overline",children:"Cabeçalho:"}),r==null?void 0:r.map((f,s)=>_.jsxs(P.Stack,{direction:"row",gap:2,children:[_.jsx(un,{name:`headers.${s}.name`,label:"Chave",rules:{required:{value:!0,message:"Chave é obrigatório"}}}),_.jsx(un,{name:`headers.${s}.value`,label:"Valor",rules:{required:{value:!0,message:"Valor é obrigatório"}}}),_.jsx(V22,{onClick:()=>c(s),color:"error",children:_.jsx(Pe,{icon:"DELETE_MARK_BUTTON_02"})})]},f.id)),_.jsx(mRn,{actionType:"NEW",size:"large",variant:"outlined",color:"inherit",fullWidth:!0,onClick:()=>l(),children:"Adicionar novo cabeçalho"}),_.jsx(P.Divider,{})]})},nGn=({name:e,helperText:t,rules:n,onSelectOption:a,...r})=>{const{control:u}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>_.jsx(cSn,{...c,...r,onChange:f=>{a&&a(f),c.onChange(f)},error:!!l,helperText:(l==null?void 0:l.message)||t})})},rGn=({name:e,helperText:t,rules:n,...a})=>{const{control:r}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:r,rules:n,render:({field:{name:u,onChange:c,value:l,ref:f},fieldState:{error:s}})=>_.jsx(zBn,{ref:f,...a,name:u,value:l,error:!!s,helperText:(s==null?void 0:s.message)||t,onChange:({target:{value:d}})=>c(d)})})},N22=({name:e,containerProps:t,required:n,rules:a,tabIndex:r})=>{const u=`${e}.zipCode`,c=`${e}.publicPlace`,l=`${e}.number`,f=`${e}.district`,s=`${e}.complement`,d=`${e}.state`,g=`${e}.city`,m=v=>{v.key==="Enter"&&v.preventDefault()};return _.jsxs(P.Stack,{gap:1.5,...t,children:[_.jsxs(P.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[_.jsx(rGn,{name:u,label:"CEP",mask:[{mask:"00000-000"}],InputProps:{endAdornment:_.jsx(P.InputAdornment,{position:"end",children:_.jsx(P.CircularProgress,{size:24})})},rules:a,onKeyDown:m,required:n,sx:{width:"auto",flex:1,minWidth:160},tabIndex:r}),_.jsxs(P.Stack,{direction:{xs:"column",sm:"row"},gap:1.5,flex:{xs:1,md:"1 1 50%"},children:[_.jsx(un,{name:c,label:"Logradouro",onKeyDown:m,inputProps:{maxLength:70},sx:{width:"auto",minWidth:250,flex:1},tabIndex:r}),_.jsx(un,{name:l,label:"Número",onKeyDown:m,inputProps:{maxLength:6},sx:{width:"auto",minWidth:100},tabIndex:r})]})]}),_.jsxs(P.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[_.jsx(un,{name:f,label:"Bairro",onKeyDown:m,inputProps:{maxLength:20},sx:{width:"auto",flex:{xs:1,md:"1 1 100px"}},tabIndex:r}),_.jsx(un,{name:s,label:"Complemento",onKeyDown:m,inputProps:{maxLength:30},sx:{minWidth:200,width:"auto",flex:{xs:1,md:"1 1 500px"}},tabIndex:r})]}),_.jsxs(P.Stack,{gap:1.5,flexWrap:"wrap",direction:{xs:"column",sm:"row"},children:[_.jsx(nGn,{name:d,label:"Estado",options:[],disabled:!0,required:n,sx:{flex:1},tabIndex:r}),_.jsx(un,{name:g,label:"Cidade",disabled:!0,required:n,sx:{flex:1},tabIndex:r})]})]})},T22=({name:e,rules:t,helperText:n,tabIndex:a,...r})=>{const{control:u}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:u,rules:t,render:({field:c,fieldState:{error:l}})=>_.jsxs("div",{children:[_.jsx(P.FormControlLabel,{control:_.jsx(P.Checkbox,{...c,checked:c.value,tabIndex:a}),...r}),(!!l||n)&&_.jsx(P.FormHelperText,{error:!!l,children:l?l==null?void 0:l.message:n})]})})},Z22=({row:e,name:t,rules:n,label:a,options:r,spacing:u,helperText:c,required:l,...f})=>{const{control:s}=Ie.useFormContext(),d=(g,m)=>g.includes(m)?g.filter(v=>v!==m):[...g,m];return _.jsx(Ie.Controller,{name:t,control:s,rules:n,render:({field:{value:g=[],...m},fieldState:{error:v}})=>_.jsxs(P.FormControl,{component:"fieldset",children:[a&&_.jsx(P.FormLabel,{component:"legend",sx:{typography:"body2"},required:l,children:a}),_.jsx(P.FormGroup,{sx:{...e&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:u||0},...e&&{mr:0,"&:not(:last-of-type)":{mr:u||2}}}},children:r.map(C=>_.jsx(P.FormControlLabel,{control:_.jsx(P.Checkbox,{checked:g.includes(C.value),onChange:()=>m.onChange(d(g,C.value))}),label:C.label,...f},C.value))}),(!!v||c)&&_.jsx(P.FormHelperText,{error:!!v,sx:C=>({color:f.disabled?C.palette.grey[500]:void 0}),children:v?v==null?void 0:v.message:c})]})})},U22=({keyName:e,inputs:t=[],rules:n,tabIndex:a,...r})=>{const u=o.useRef(null),{control:c,setValue:l,formState:{errors:f}}=Ie.useFormContext(),s=m=>{const v=m.clipboardData.getData("text").split("");t.map((C,h)=>l(C,v[h])),m.preventDefault()},d=(m,v)=>{const{maxLength:C,value:h,name:b}=m.target,p=b.replace(e,""),y=Number(p),j=document.querySelector(`input[name=${e}${y+1}]`);h.length>C&&(m.target.value=h[0]),h.length>=C&&y<6&&j!==null&&j.focus(),v(m)};kSn("paste",s,u);const g=t.some(m=>f[m]);return _.jsxs(P.Stack,{children:[_.jsx(P.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:u,children:t.map((m,v)=>_.jsx(Ie.Controller,{name:`${e}${v+1}`,control:c,rules:n,render:({field:C,fieldState:{error:h}})=>_.jsx(P.TextField,{...r,...C,autoComplete:"none",error:!!h,autoFocus:v===0,placeholder:"-",onChange:b=>{d(b,C.onChange)},onFocus:b=>b.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number",tabIndex:a}})},m))}),g&&_.jsx(P.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},G22=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:r,rules:{...t,validate:{...t==null?void 0:t.validate,validation:u=>{const c="#"+u.replaceAll("#","");return/^#([0-9A-Fa-f]{3}){1,2}$/.test(c)?!0:"Cor inválida"}}},render:({field:{ref:u,onChange:c,...l},fieldState:{error:f}})=>_.jsx(jNn,{...l,onChangeColor:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||n,...a})})},Y22=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var d;return _.jsx(jT.DatePicker,{inputRef:l,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(d=u.slotProps)==null?void 0:d.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},K22=({name:e,label:t,rules:n,tabIndex:a,helperText:r,required:u,...c})=>{const{control:l,setError:f}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:l,rules:n,render:({field:{value:s,onChange:d},fieldState:{error:g}})=>_.jsx(jT.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...c.localeText},value:[(s==null?void 0:s.startDate)||null,(s==null?void 0:s.endDate)||null],onChange:m=>d({startDate:m[0],endDate:m[1]}),onError:m=>{f(e,{message:m[0]||m[1]||void 0})},...c,slotProps:{textField:({position:m})=>{var v;return{...(v=c.slotProps)==null?void 0:v.textField,required:u,error:!!g,helperText:(g==null?void 0:g.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:m==="start"?`${t} (Dt. Início)`:`${t} (Dt. Fim)`,inputProps:{tabIndex:a}}}},sx:{width:1}})})},X22=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var d;return _.jsx(jT.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:l,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(d=u.slotProps)==null?void 0:d.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Q22=({id:e,children:t,onSubmit:n,methods:a,...r})=>_.jsx(Ie.FormProvider,{...a,children:_.jsx(P.Stack,{component:"form",id:e,onSubmit:n,flex:1,width:1,noValidate:!0,...r,children:t})}),J22=({name:e,helperText:t,rules:n,...a})=>{const{control:r}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:r,rules:n,render:({field:{ref:u,value:c,...l},fieldState:{error:f}})=>_.jsx(WBn,{value:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||t,...a,...l,name:e})})},q22=({name:e,label:t="",rules:n,helperText:a,changed:r,...u})=>{const{control:c}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:c,rules:n,render:({field:l,fieldState:{error:f}})=>_.jsx(P.Autocomplete,{...l,onChange:(s,d)=>{r&&r(d),l.onChange(d)},renderInput:s=>_.jsx(P.TextField,{label:t,error:!!f,helperText:f?f==null?void 0:f.message:a,...s}),...u})})},eu2=({name:e,helperText:t,rules:n,onChange:a,...r})=>{const{control:u}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>_.jsx(jCt,{...c,onChange:f=>{c.onChange(f),a&&a(f)},fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||t,...r})})},tu2=({name:e,sx:t,rules:n,passwordSize:a,specialCharacter:r,upperCaseChar:u,numberChar:c,showErrorMessage:l,match:f,...s})=>{const{watch:d}=Ie.useFormContext(),g=d(e),[m,v]=o.useState(!1),{hasNumberChar:C,hasSpecialCharacter:h,hasUpperCaseChar:b,isLengthValid:p}=ECt(g,a,c,r,u);return _.jsx(un,{...s,name:e,type:m?"text":"password",InputProps:{endAdornment:_.jsx(P.InputAdornment,{position:"end",children:_.jsx(P.IconButton,{onClick:()=>v(!m),edge:"end","aria-label":"Mostrar/Ocultar senha",children:_.jsx(Pe,{icon:m?"VIEW_ON":"VIEW_OFF"})})})},rules:{...n,validate:{...n==null?void 0:n.validate,validationPassword:y=>{const j=ECt(y,a,c,r,u);return!j.hasNumberChar||!j.hasSpecialCharacter||!j.hasUpperCaseChar||!j.isLengthValid?"Senha inválida":f&&f.fieldPassword&&d(f.fieldPassword)!==y?"As senhas devem ser iguais":!0}}},sx:{...t,"& .MuiFormHelperText-root":{display:(!h||!b||!p||!C)&&!l?"none":void 0}}})},YBn=({name:e,rules:t,row:n,label:a,options:r,spacing:u,helperText:c,decorated:l,onChange:f,tabIndex:s,required:d,disabled:g,...m})=>{const{control:v}=Ie.useFormContext(),C=a?`${e}-${a}`:"";return _.jsx(Ie.Controller,{name:e,control:v,rules:t,render:({field:h,fieldState:{error:b}})=>_.jsxs(P.FormControl,{component:"fieldset",sx:{...l&&{paddingLeft:1.5}},children:[a&&_.jsx(P.FormLabel,{component:"legend",id:C,sx:{typography:"body2"},required:d,children:a}),_.jsx(P.RadioGroup,{...m,...h,onChange:(p,y)=>{h.onChange(p),f&&f(p,y)},"aria-labelledby":C,row:n,children:r.map(p=>_.jsx(P.FormControlLabel,{value:p.value,control:_.jsx(P.Radio,{inputProps:{tabIndex:s},disabled:g,checked:p.value===h.value}),label:p.label,sx:({palette:y})=>({"&:not(:last-of-type)":{mb:u||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:u||2}},...l&&{border:`1px solid ${P.alpha(y.grey[500],.32)}`,borderRadius:1,padding:.25,paddingRight:(u||0)/2||1,...h.value===p.value&&{borderColor:"primary.main",backgroundColor:P.alpha(y.primary.main,.05)}}})},p.value))}),(!!b||c)&&_.jsx(P.FormHelperText,{error:!!b,sx:p=>({color:g?p.palette.grey[500]:void 0}),children:b?b==null?void 0:b.message:c})]})})},nu2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Ie.useFormContext();return _.jsx(Ie.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var d;return _.jsx(jT.TimePicker,{ampm:!1,format:"HH:mm",inputRef:l,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(d=u.slotProps)==null?void 0:d.textField,error:!!s,required:r,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},ru2=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:d,setCropModalOpen:g,handleRemove:m,cropModalOpen:v,cancelChanges:C,saveChanges:h,previewImage:b,setCropper:p,preview:y,closePreviewImage:j}=QUn({onFileCropped:e,onImageUploaded:t,onCancel:n});return _.jsxs(_.Fragment,{children:[_.jsxs(P.Stack,{position:"relative",alignItems:"center",justifyContent:"center",children:[c&&_.jsx(h22,{}),_.jsx(XUn,{...s,id:d,file:l,onDrop:E=>{if(E.length>0){g(!0);const O=new FileReader;O.addEventListener("load",()=>{var k;const M=((k=O.result)==null?void 0:k.toString())||"";t(M),e(void 0)}),O.readAsDataURL(E[0])}},image:u,tabIndex:f})]}),_.jsx(JUn,{id:d,open:v,onClose:C,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:h,onPreview:b,onInitialized:p}),_.jsx(P.Dialog,{open:!!y,onClose:j,scroll:"body",PaperProps:{sx:{p:2}},children:y&&_.jsx("img",{src:y,alt:"Preview"})})]})};function aGn(e,t){const{watch:n,setValue:a}=Ie.useFormContext(),[r,u]=o.useState(t),c=n(e)||[];return{uploadFile:async m=>{if(!m){a(e,void 0),u(void 0);return}a(e,m),u(Object.assign(m,{preview:URL.createObjectURL(m)}))},uploadFiles:async m=>{a(e,[...c,...m.map(v=>Object.assign(v,{preview:URL.createObjectURL(v)}))])},handleDeleteFile:()=>{a(e,void 0),u(void 0)},handleRemoveAll:()=>{a(e,void 0)},handleRemove:m=>{const v=c.filter(C=>C!==m);a(e,v)},file:r,setFileValue:u}}const au2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:d}=Ie.useFormContext(),{uploadFile:g,file:m,setFileValue:v}=aGn(e);return _.jsx(Ie.Controller,{name:e,control:d,rules:t,render:({field:{value:C},fieldState:{error:h}})=>_.jsx(ru2,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{g(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&_.jsx(P.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},iu2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:d}=Ie.useFormContext(),{uploadFile:g,file:m,setFileValue:v}=aGn(e);return _.jsx(Ie.Controller,{name:e,control:d,rules:t,render:({field:{value:C},fieldState:{error:h}})=>_.jsx(qUn,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{g(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&_.jsx(P.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},ou2=Object.freeze(Object.defineProperty({__proto__:null,default:Aer},Symbol.toStringTag,{value:"Module"}));R.ActionButton=mRn,R.Address=N22,R.Autocomplete=cSn,R.AutocompleteField=nGn,R.BuilderLayout=rDo,R.BuilderSidebar=Dzo,R.Carousel=mEo,R.CarouselArrowIndex=BEo,R.CarouselArrows=yEo,R.CarouselDots=bEo,R.Checkbox=T22,R.Codes=U22,R.ColorPickerField=G22,R.ColorPickerInput=jNn,R.Common=Tn2,R.CommonSSR=Un2,R.Confirm=Gn2,R.CustomAvatar=jTn,R.CustomAvatarGroup=wTn,R.DataGrid=Qn2,R.DatePicker=Y22,R.DateRangePicker=K22,R.DateTimePicker=X22,R.Delayed=Jn2,R.DialogAnimate=str,R.Drawer=lr2,R.EmptyContent=YHn,R.EmptyView=LTn,R.Error=sr2,R.FabButtonAnimate=Qxn,R.Field=un,R.FixedProgressBar=lCt,R.Form=Q22,R.FrameSkeleton=x22,R.HelpButton=lSn,R.Icon=Pe,R.IconButtonAnimate=Jxn,R.Iconify=gZn,R.IllustrationEmptyContent=CIn,R.ImageCrop=UZn,R.Incrementer=WBn,R.IncrementerField=J22,R.Label=oUn,R.Lightbox=ISo,R.LoadingScreen=Aa2,R.MaskedInput=zBn,R.MaskedInputField=rGn,R.MaterialDesignContent=kyt,R.MenuPopover=vUn,R.Modal=hUn,R.ModalActions=oi2,R.MotionContainer=Mtr,R.MotionLazyContainer=yyt,R.MotionViewport=wtr,R.MultiCheckbox=Z22,R.MultipleChipField=q22,R.NoData=bIn,R.NumberInput=jCt,R.NumberInputField=eu2,R.PasswordField=tu2,R.PasswordRules=di2,R.PopoverSelect=O22,R.Portal=CUn,R.RadioGroupField=YBn,R.Result=gi2,R.SavedChanges=$i2,R.Scrollbar=YDn,R.SearchInput=xi2,R.SnackbarContent=Eyt,R.SnackbarProvider=Lzn,R.SplashScreen=zi2,R.Steps=Ri2,R.StyledTab=Vi2,R.StyledTabs=Fi2,R.Summary=L22,R.Switch=tGn,R.TRANSITION=yIn,R.TabPanel=Ni2,R.TableEmptyRows=AEo,R.TableHeadCustom=VEo,R.TableNoData=zEo,R.TablePaginationCustom=NEo,R.TableSelectedAction=FEo,R.TableSkeleton=HEo,R.TextAnimate=dtr,R.TextMaxLine=OUn,R.ThemeProvider=OTn,R.TimePicker=nu2,R.Transition=Svt,R.Upload=KUn,R.UploadAvatar=XUn,R.UploadAvatarWithCropField=au2,R.UploadBox=_22,R.UploadIllustration=hIn,R.UploadWithCrop=qUn,R.UploadWithCropField=iu2,R.Webhook=F22,R.WhiteBox=eGn,R.color=jt2,R.compare=hzo,R.cssStyles=SEo,R.emptyRows=WEo,R.file=_i2,R.formatNumber=ga2,R.formatTime=Li2,R.getComparator=IEo,R.loadable=Ii2,R.mask=Bi2,R.number=ua2,R.routes=Ei2,R.sort=Di2,R.useActiveElement=aDo,R.useApiMessage=Lzo,R.useCarousel=vEo,R.useCopyToClipboard=iDo,R.useDatagrid=oDo,R.useDeepCompareEffect=bzo,R.useEventListener=kSn,R.useIsMounting=pzo,R.useLightBox=zSo,R.useOffSetTop=Mzo,R.useOnClickOutside=wzo,R.usePagination=jzo,R.usePopover=DSn,R.useResponsive=ezn,R.useSnackbar=Pzn,R.useTable=$Eo,R.useTabs=Ozo,R.useToggle=SSn,R.uuidv4=Wi2,R.validators=li2,R.varBgColor=EXn,R.varBgKenburns=kXn,R.varBgPan=SXn,R.varBounce=MXn,R.varContainer=tvt,R.varFade=lle,R.varFlip=OXn,R.varHover=PXn,R.varPath=bXn,R.varRotate=LXn,R.varScale=wXn,R.varSlide=jXn,R.varTranEnter=$e,R.varTranExit=Ne,R.varTranHover=yXn,R.varZoom=pXn,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|