biblio-react 2.0.0-alpha16 → 2.0.0-alpha160
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +2 -1
- package/dist/index.modern.js.map +1 -1
- package/package.json +67 -92
package/dist/index.modern.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import e,{forwardRef as r,createElement as n,useState as o,useMemo as a,Fragment as t,useCallback as i,Children as l,cloneElement as s,createContext as c,useContext as u,useEffect as d,useRef as m}from"react";import p from"@mui/icons-material/Lock";import f from"@mui/icons-material/VpnLock";import{MenuItem as g,ListItemIcon as v,ListItemText as h,useMediaQuery as b,Typography as y,Box as _,alpha as C,createTheme as k,StyledEngineProvider as w,CardContent as S,CircularProgress as x,Tooltip as N,Collapse as T,List as P,Paper as E}from"@mui/material";import{useTranslate as L,useUserMenu as D,useResourceDefinitions as A,AppBar as R,UserMenu as F,Logout as I,useGetOne as O,useDataProvider as M,useGetList as q,Loading as B,useSafeSetState as V,useNotify as z,Button as j,SaveContextProvider as G,useDeleteWithConfirmController as U,Confirm as W,Form as H,SaveButton as J,useListContext as Y,useRedirect as Q,useRefresh as Z,useUnselectAll as K,useResourceDefinition as X,SimpleList as $,Datagrid as ee,EditButton as re,TopToolbar as ne,ListButton as oe,ShowButton as ae,required as te,minValue as ie,useResourceContext as le,Create as se,useRecordContext as ce,useDelete as ue,useEditController as de,Edit as me,SimpleForm as pe,useSidebarState as fe,MenuItemLink as ge,Menu as ve,DashboardMenuItem as he,Layout as be,sanitizeListRestProps as ye,CreateButton as _e,ExportButton as Ce,useLogin as ke,TextInput as we,PasswordInput as Se,FieldTitle as xe,useShowController as Ne,Show as Te,TabbedFormView as Pe,defaultTheme as Ee,BooleanField as Le,useInput as De,FileInput as Ae,ImageField as Re,BooleanInput as Fe,ReferenceInput as Ie,useChoicesContext as Oe,SelectInput as Me,ReferenceArrayInput as qe,SelectArrayInput as Be,RadioButtonGroupInput as Ve,useRecordSelection as ze,List as je,TextField as Ge,NumberInput as Ue,DateInput as We,DateTimeInput as He,NumberField as Je,DateField as Ye}from"react-admin";import{Link as Qe,useLocation as Ze}from"react-router-dom";import Ke,{string as Xe,func as $e,any as er,bool as rr}from"prop-types";import nr from"@mui/icons-material/Add";import or from"@mui/icons-material/Cancel";import ar from"@mui/icons-material/Delete";import tr from"@mui/icons-material/Edit";import ir from"@mui/material/Dialog";import lr from"@mui/material/DialogActions";import sr from"@mui/material/DialogContent";import cr from"@mui/material/DialogContentText";import ur from"@mui/material/DialogTitle";import dr from"@mui/material/Paper";import{adaptV4Theme as mr,ThemeProvider as pr,alpha as fr}from"@mui/material/styles";import gr from"@mui/material/Typography";import{makeStyles as vr}from"@mui/styles";import{GridOverlay as hr,esES as br,DataGrid as yr}from"@mui/x-data-grid";import{useMutation as _r}from"react-query";import{useDispatch as Cr,useSelector as kr}from"react-redux";import wr from"@mui/material/Divider";import Sr from"@mui/material/Tab";import xr from"@mui/material/Tabs";import Nr from"@mui/icons-material/ChevronLeft";import{isAfter as Tr}from"date-fns";import Pr from"date-fns/locale/en-US";import Er from"date-fns/locale/es";import Lr from"@mui/material/IconButton";import Dr from"@mui/material/Tooltip";import Ar from"@mui/material/Button";import{FichaContext as Rr,useUtilsSubmit as Fr}from"biblio-react";import Ir from"@mui/icons-material/Settings";import Or from"@mui/icons-material/ExpandMore";import Mr from"@mui/material/Avatar";import qr from"@mui/material/Card";import Br from"@mui/material/CardActions";import Vr from"@mui/material/CircularProgress";import zr from"@mui/material/Menu";import jr from"@mui/material/MenuItem";import Gr from"@mui/icons-material/Check";import Ur from"@mui/icons-material/RemoveCircleOutline";import Wr from"@mui/icons-material/Search";import Hr from"@mui/icons-material/CheckCircle";import Jr from"@mui/icons-material/ErrorOutline";import Yr from"react-draggable";import{TreeView as Qr}from"devextreme-react";function Zr(){return(Zr=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function Kr(e,r){if(null==e)return{};var n,o,a={},t=Object.keys(e);for(o=0;o<t.length;o++)r.indexOf(n=t[o])>=0||(a[n]=e[n]);return a}var Xr=r(function(e,r){var o=L(),a=D().onClose,t=A(),i=t.form_59;return[t.form_275?n(g,Zr({component:Qe,ref:r},e,{key:"/form_275",to:"/form_275",onClick:a}),n(v,null,n(p,null)),n(h,null,o("pos.change_pin"))):null,i?n(g,Zr({component:Qe,ref:r},e,{key:"/form_59",to:"/form_59",onClick:a}),n(v,null,n(f,null)),n(h,null,o("pos.change_password"))):null]}),$r=function(){return n(F,null,n(Xr,null),n(I,null))},en=function(e){var r=b(function(e){return e.breakpoints.up("sm")});return n(R,Zr({},e,{color:"secondary",userMenu:n($r,null)}),n(y,{variant:"h6",color:"inherit",sx:{flex:1,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},id:"react-admin-title"}),r&&n(_,{component:"span",sx:{flex:1}}))};const rn=e.createContext(null),nn=()=>e.useContext(rn);var on=function(e,r){return O(e,{id:"-1"},r)},an=vr(function(e){return{root:{"& .MuiDataGrid-columnsContainer":{backgroundColor:"light"===e.palette.mode?"#fafafa":"#1d1d1d"},"& .MuiDataGrid-iconSeparator":{display:"none"}},header:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.light},rootPaper:{width:"100%",height:"40vh",borderRadius:0,marginTop:e.spacing(1)},rootOverlay:{flexDirection:"column","& .ant-empty-img-1":{fill:"light"===e.palette.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===e.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===e.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===e.palette.mode?"#ffffff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===e.palette.mode?"0.8":"0.08",fill:"light"===e.palette.mode?"#f5f5f5":"#ffffff"}},label:{marginTop:e.spacing(1)},deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:C(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}},{name:"GE"}),tn=function(){var e=an();return n(hr,{className:e.rootOverlay},n("svg",{width:"120",height:"100",viewBox:"0 0 184 152","aria-hidden":!0,focusable:"false"},n("g",{fill:"none",fillRule:"evenodd"},n("g",{transform:"translate(24 31.67)"},n("ellipse",{className:"ant-empty-img-5",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),n("path",{className:"ant-empty-img-1",d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),n("path",{className:"ant-empty-img-2",d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),n("path",{className:"ant-empty-img-3",d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})),n("path",{className:"ant-empty-img-3",d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),n("g",{className:"ant-empty-img-4",transform:"translate(149.65 15.383)"},n("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),n("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})))),n("div",{className:e.label},"No hay registros"))},ln=function(e,r,n){var o=M(),a=_r(function(){return o.deleteEtrRow(e,{params:r})},n);return{mutate:a.mutate,isLoading:a.isLoading}},sn=function(e,r,n,o){var a=M(),t=_r(function(){return a[e](r,{params:n})},o);return{mutate:t.mutate,isLoading:t.isLoading}},cn=["api","classes","className","confirmTitle","confirmContent","icon","record","redirect","onSuccess","onError","source","camposClaveFila"],un=["filterBy","claves","sortModel","columns","reference","allowAdd","allowRemove","etrResource","enableLoad"],dn=vr(function(e){return{root:{"& .MuiDataGrid-columnsContainer":{backgroundColor:"light"===e.palette.mode?"#fafafa":"#1d1d1d"},"& .MuiDataGrid-iconSeparator":{display:"none"}},header:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.light},rootPaper:{width:"100%",height:"40vh",borderRadius:0,marginTop:e.spacing(1)},rootOverlay:{flexDirection:"column","& .ant-empty-img-1":{fill:"light"===e.palette.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===e.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===e.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===e.palette.mode?"#ffffff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===e.palette.mode?"0.8":"0.08",fill:"light"===e.palette.mode?"#f5f5f5":"#ffffff"}},label:{marginTop:e.spacing(1)},deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:C(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}},{name:"EtrGrid"}),mn={marginLeft:"1.6rem",fontWeight:"bold"},pn=n(ar,null),fn=function(e){var r=e.confirmTitle,o=void 0===r?"ra.message.delete_title":r,a=e.confirmContent,l=void 0===a?"ra.message.delete_content":a,s=e.icon,c=void 0===s?pn:s,u=e.record,d=e.redirect,m=void 0!==d&&d,p=e.onSuccess,f=e.onError,g=e.source,v=e.camposClaveFila,h=Kr(e,cn),b=dn(e),y=z(),_=U({record:u,redirect:m,mutationOptions:{onSuccess:p,onError:f}}),C=_.open,k=_.isLoading,w=_.handleDialogOpen,S=_.handleDialogClose,x=ln(e.resource,{},{refresh:!0,onSuccess:function(e){if(e.error)throw new Error(e.error);y("ra.notification.deleted",{type:"info",messageArgs:{smart_count:1}})},onError:function(e){y(e.message,{type:"warning"})}}).mutate,N=Object.keys(u).filter(function(e){return v.split(",").includes(e)}).reduce(function(e,r){return e[r]=u[r],e},{}),T=i(function(e){x({payload:{ge:g,clavesFila:N}})},[u]);return n(t,null,n(j,Zr({key:"button",onClick:w,className:b.deleteButton},h),c),n(W,{isOpen:C,loading:k,title:o,content:l,onConfirm:T,onClose:S}))},gn=function(e){return n(ir,{open:e.open,onClose:e.onClose,fullWidth:!0},n(ur,null,e.labelEstado+" "+e.label),n(cr,null,n(gr,{component:"span",display:"block",variant:"subtitle1",style:Zr({},mn)},e.msgTitle),e.msgDesc),n(H,{resource:e.resource,onSubmit:e.onSubmit,defaultValues:e.defaultValues},e.children))};gn.propTypes={label:Xe,onClick:$e,icon:er,open:rr,onClose:$e,labelEstado:Xe,msgTitle:er,msgDesc:er,resource:er,save:$e,render:$e};var vn=function(e){return n(fn,{api:!0,confirmTitle:"ra.action.delete",source:e.source,record:e.row,resource:e.resource,camposClaveFila:e.camposClaveFila})},hn=function(r){var o=r.resource,a=r.estado,i=r.editors,c=r.recordPadre,u=r.camposClaveFila,d=r.setOpen,m=r.isLoading,p=function(r){const n=nn(),{control:o=n.control,disabled:a,name:t,exact:i}={},[l,s]=e.useState(o._formState),c=e.useRef({isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=e.useRef(t),d=e.useRef(!0);return u.current=t,function(r){const n=e.useRef(r);n.current=r,e.useEffect(()=>{const e=!r.disabled&&n.current.subject.subscribe({next:n.current.callback});return()=>(e=>{e&&e.unsubscribe()})(e)},[r.disabled])}({disabled:a,callback:e.useCallback(e=>d.current&&((e,r,n)=>{return n&&r?e===r:!e||!r||e===r||(o=e,Array.isArray(o)?o:[o]).some(e=>e&&(e.startsWith(r)||r.startsWith(e)));var o})(u.current,e.name,i)&&((e,r,n)=>{const{...o}=e;return(e=>!(e=>null==e)(e)&&!Array.isArray(e)&&(e=>"object"==typeof e)(e)&&!(e=>e instanceof Date)(e))(a=o)&&!Object.keys(a).length||Object.keys(o).length>=Object.keys(r).length||Object.keys(o).find(e=>!0===r[e]);var a})(e,c.current)&&s({...o._formState,...e}),[o,i]),subject:o._subjects.state}),e.useEffect(()=>(d.current=!0,()=>{d.current=!1}),[]),((e,r,n,o=!0)=>{const a={};for(const t in e)Object.defineProperty(a,t,{get:()=>{const a=t;return"all"!==r[a]&&(r[a]=!o||"all"),n&&(n[a]=!0),e[a]}});return a})(l,o._proxyFormState,c.current,!1)}(),f=p.isDirty,g=p.isValid;return n(t,null,n(sr,null,l.map(i,function(e,r){return s(e,{resource:o,estado:a,initialValue:c[e.props.source],fullWidth:!0,disabled:void 0!==e.props.disabled?e.props.disabled:"N"!==a&&-1!==u.indexOf(e.props.source),InputLabelProps:{shrink:!0}})})),n(lr,null,n(J,{disabled:!f||!g}),n(j,{label:"ra.action.cancel",onClick:function(e){d(!1),e.stopPropagation()},disabled:m},n(or,null))))},bn=function(e){var r=e.editors,o=e.record,i=e.clavesFila,l=e.camposClaveFila,s=e.resource,c=e.label,u=e.source,d=e.etrResource,m=V(!1),p=m[0],f=m[1],g=on(d,{enabled:p}).data,v=sn("createEtrRow",s,{},{refresh:!0,onSuccess:function(e){if(e.error)throw new Error(e.error);f(!1),y("ra.notification.created",{type:"info"})},onError:function(e){y(e.message,{type:"warning"})}}),h=v.mutate,b=v.isLoading,y=z(),_=L()("ra.action.create"),C=function(e){h({payload:{data:Zr({},e,i),ge:u,camposClaveFila:l,estado:"N"}})},k=a(function(){return{save:C,setOnFailure:function(e){return console.log(e)}}},[C]);return n(t,null,n(j,{onClick:function(e){f(!0),e.stopPropagation()}},n(nr,null)),n(G,{value:k},n(gn,{open:p,onClose:function(e){f(!1),e.stopPropagation()},labelEstado:_,label:c,msgTitle:e.msgTitle,msgDesc:e.msgDesc,resource:s,onSubmit:C,defaultValues:g},n(hn,{resource:s,estado:"N",editors:r,recordPadre:o,camposClaveFila:l,isLoading:b,setOpen:function(){f(!1)}}))))},yn=function(e){var r=e.editors,o=e.clavesFila,a=e.camposClaveFila,i=e.resource,l=e.label,s=e.source,c=e.row,u=z(),d=L(),m=V(!1),p=m[0],f=m[1],g=sn("updateEtrRow",i,{},{refresh:!0,onSuccess:function(e){if(e.error)throw new Error(e.error);f(!1),u("ra.notification.updated",{type:"info",messageArgs:{smart_count:1}})},onError:function(e){u(e.message,{type:"warning"})}}),v=g.mutate,h=g.isLoading,b=d("ra.action.edit");return n(t,null,n(j,{onClick:function(e){f(!0),e.stopPropagation()}},n(tr,null)),n(gn,{open:p,onClose:function(e){f(!1),e.stopPropagation()},labelEstado:b,label:l,msgTitle:e.msgTitle,msgDesc:e.msgDesc,resource:i,onSubmit:function(e){v({payload:{data:Zr({},o,e),ge:s,camposClaveFila:a,estado:"M"}})}},n(hn,{resource:i,estado:"M",editors:r,recordPadre:c,camposClaveFila:a,isLoading:h,setOpen:function(){f(!1)}})))},_n=k(mr({},br)),Cn=function(e){var r=e.filterBy,t=void 0===r?"":r,i=e.claves,l=e.sortModel,s=e.columns,c=e.reference,u=e.allowAdd,d=void 0===u||u,m=e.allowRemove,p=void 0===m||m,f=e.etrResource,g=e.enableLoad,v=void 0===g||g,h=Kr(e,un),b=e.record,y=dn(e),_=o(l)[1],C=l[0],k=C.field,S=C.sort,x=Object.keys(b).filter(function(e){return i.split(",").includes(e)}).reduce(function(e,r){return e[r]=b[r],e},{}),N={};t.split(",").forEach(function(e){e&&(N[e]=[{type:"string",comparison:"eq",value:b[e],field:e}])});var T=q(c,{page:1,perPage:200},{field:k,order:S},N,{enabled:v}),P=T.data,E=T.isLoading,L=a(function(){return P.map(function(e){return e.id})},[P]),D=[d?{field:"BTN",headerName:"",sortable:!1,renderHeader:function(e){return n(bn,Zr({},h,{etrResource:f,camposClaveFila:i,clavesFila:x,api:e.api}))}}:{}].concat(s,[{field:" ",width:80,headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:function(e){return n(yn,Zr({},h,{camposClaveFila:i,clavesFila:x,api:e.api,row:e.row}))}},p?{field:" ",headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:function(e){return n(vn,Zr({},h,{camposClaveFila:i,api:e.api,row:e.row}))}}:{}]),A=a(function(){return D},[JSON.stringify(D)]);return E?n(B,null):n(dr,{className:y.rootPaper},n(w,{injectFirst:!0},n(pr,{theme:_n},n(yr,Zr({className:y.root,disableSelectionOnClick:!0,pageSize:50,hideFooter:!0,sortModel:l,rows:L,columns:A,onSortModelChange:function(e){return _(e)},components:{NoRowsOverlay:tn}},h)))))},kn=["filterBy","sortModel","columns","reference","filter","enableLoad"],wn=k(mr({},br)),Sn=function(e){var r=e.filterBy,t=void 0===r?"":r,i=e.sortModel,l=e.columns,s=e.reference,c=e.filter,u=void 0===c?[]:c,d=e.enableLoad,m=void 0===d||d,p=Kr(e,kn),f=e.record,g=an(e),v=o(i),h=v[0],b=v[1],y=i[0],_=y.field,C=y.sort,k=a(function(){return[].concat(l)},[JSON.stringify(l)]),S=[];t.split(",").forEach(function(e){e&&S.push({type:"string",comparison:"eq",value:f[e],field:e})});var x=Zr({},S.concat(u)),N=q(s,{page:1,perPage:200},{field:_,order:C},x,{enabled:m}),T=N.data,P=N.isLoading,E=a(function(){return T.map(function(e){return e.id})},[T]);return P?n(B,null):n(dr,{className:g.rootPaper},n(w,{injectFirst:!0},n(pr,{theme:wn},n(yr,Zr({className:g.root,disableSelectionOnClick:!0,pageSize:50,hideFooter:!0,rows:E,columns:k,sortModel:h,onSortModelChange:function(e){return b(e)},components:{NoRowsOverlay:tn}},p)))))},xn=c(),Nn=function(e){var r=e.children,t=o(!1),i=t[0],l=t[1],s=a(function(){return{open:i,show:function(){return l(!0)},hide:function(){return l(!1)}}},[i]);return n(xn.Provider,{value:s},r)},Tn=function(){return u(xn)},Pn=function(e,r,n,o){return{type:"RELOAD_CB",payload:{id:e,method:r,params:n,callback:o}}},En=function(e,r){return{type:"RELOAD_CB_SUCCESS",payload:{id:e,callback:r}}},Ln=function(e,r){return{type:"HIDE_INPUT",payload:{id:e,hidden:r}}},Dn=function(e,r){return{type:"DISABLE_INPUT",payload:{id:e,disabled:r}}},An=function(e,r){return{type:"REQUIRE_INPUT",payload:{id:e,required:r}}},Rn=function(){var e=Cr();return i(function(r,n,o,a){e(Pn(r,n,o,a))},[e])},Fn=function(){var e=Cr();return i(function(r,n){e(Ln(r,n))},[e])},In=function(){var e=Cr();return i(function(r,n){e(Dn(r,n))},[e])},On=function(){var e=Cr();return i(function(r,n){e(An(r,n))},[e])},Mn=function(e,r,n,o){var a=M(),t=_r(function(){return a.getJson(e,{method:r,params:n})},o);return{mutate:t.mutate,isLoading:t.isLoading}},qn=function(e){var r=Mn(e),n=r.mutate,o=r.isLoading;return[i(function(e,r,o){return n({payload:{params:r,method:e}},{returnPromise:!0,onSuccess:o,onError:o})},[]),o]},Bn=function(e){return{}},Vn=function(e){var r=Y(e),n=z(),o=Q(),a=Z(),t=K(e.resource);return{ajax:qn(e.resource)[0],data:r,notify:n,redirect:o,refresh:a,unselectAll:t}},zn=function(e){var r=Rn(),n=Fn(),o=In(),a=On(),t=Tn(),i=z(),l=Q();return{ajax:qn(e.resource)[0],notify:i,redirect:l,recargarComboBox:r,progress:t,setHidden:n,setDisable:o,setRequire:a}},jn=function(e){var r=Rn(),n=Fn(),o=In(),a=On(),t=Tn(),i=z(),l=Q();return{form:nn(),ajax:qn(e.resource)[0],notify:i,redirect:l,recargarComboBox:r,progress:t,setHidden:n,setDisable:o,setRequire:a}},Gn=["isRowEditable"],Un=["isRowEditable","primaryText","secondaryText","desktopSize","onRenderGrilla","onLoadGrilla","hasEdit"],Wn=function(e,r){return void 0===r||"function"==typeof r&&r(e)},Hn=function(e){var r=e.isRowEditable,o=Kr(e,Gn);return Wn(e.record,r)?n(re,o):null},Jn=function(e){!function(e){var r=e.onRenderGrilla,n=e.onLoadGrilla,o=Y().isLoading,a=Vn(e);d(function(){r&&r(a)},[]),d(function(){o||n&&n(a)},[o])}(e);var r=b(function(e){return e.breakpoints.down("md")}),o=X(e).hasEdit,a=e.isRowEditable,t=e.primaryText,i=e.secondaryText,s=e.desktopSize,c=void 0!==s&&s,u=Kr(e,Un),m=e.children,p=l.count(e.children),f=t,g=i;return t||(p>=4||p>=3||p>=2?f=function(e){return e[m[0].props.source]+" - "+e[m[1].props.source]}:1===p&&(f=function(e){return e[m[0].props.source]})),i||(p>=4?g=function(e){return e[m[2].props.source]+" - "+e[m[3].props.source]}:p>=3?g=function(e){return e[m[2].props.source]}:p>=2?f=function(e){return e[m[0].props.source]+" - "+e[m[1].props.source]}:1===p&&(f=function(e){return e[m[0].props.source]})),r&&!1===c?n($,{linkType:function(e){return!(!o||!Wn(e,a))&&"edit"},primaryText:f,secondaryText:g}):n(ee,u,l.map(m,function(e){return e.props.hidden?null:e}),o&&n(Hn,{isRowEditable:a}))},Yn=["ids"],Qn=["filterValues","setFilters","tabs","GridComponent"],Zn=function(e){var r=e.filterValues,o=e.setFilters,a=e.tabs,i=a.ids,l=Kr(a,Yn),s=e.GridComponent,c=void 0===s?Jn:s,u=Kr(e,Qn),d=r.id;return n(t,null,n(xr,{value:d,indicatorColor:"primary",onChange:function(e,n){o(Zr({},r,{id:n}))}},i.map(function(e){return n(Sr,{key:e,label:e.charAt(0).toUpperCase()+e.slice(1),value:e})})),n(wr,null),n(c,Zr({},u,l[d])))},Kn=["useFormulario"],Xn=function(e){var r=e.useFormulario;return{fichaProps:(void 0===r?Bn:r)(Kr(e,Kn))}},$n=["className","record","hasEdit","hasShow","hasList","resource","totalPages","showFilter","setSort","setPerPage","perPage","defaultTitle","setPage","setFilters","selectedIds","onUnselectItems","onToggleItem","isLoading","exporter","hideFilter","hasCreate","filterValues","displayedFilters","currentSort"],eo=["children","className","data","hasShow","hasList"],ro=function(e){return e.split("_")[1]},no=vr(function(e){var r;return{form:{maxHeight:"70vh",overflow:"auto"},tab:{display:"block",maxHeight:"65vh",overflow:"auto"},contenido:(r={},r[e.breakpoints.up("md")]={width:"20vw"},r)}}),oo=function(e,r){if(!e)return"";if(e instanceof Date)return e.toString();if(-1!==e.indexOf("/")){var n=e.split("/");return new Date(parseInt(n[2],10),parseInt(n[1],10)-1,parseInt(n[0],10)).toString()}var o=/(\d{4})-(\d{2})-(\d{2})/.exec(e);if(null!==o){var a=new Date(parseInt(o[1],10),parseInt(o[2],10)-1,parseInt(o[3],10));if(!isNaN(a))return a.toString()}},ao=function(e,r){if(!e)return"";var n=e.split(" "),o="";switch(n[1]){case"Jan":o="01";break;case"Feb":o="02";break;case"Mar":o="03";break;case"Apr":o="04";break;case"May":o="05";break;case"Jun":o="06";break;case"Jul":o="07";break;case"Aug":o="08";break;case"Sep":o="09";break;case"Oct":o="10";break;case"Nov":o="11";break;case"Dec":o="12"}return n[2]+"/"+o+"/"+n[3]},to=function(e){if(!e)return"";if(e instanceof Date)return e.toString();if(-1!==e.indexOf("/")){var r=e.split("/");return new Date(parseInt(r[2].substr(0,4),10),parseInt(r[1],10)-1,parseInt(r[0],10),r[2].substr(5,2),r[2].substr(8,2)).toString()}var n=/(\d{4})-(\d{2})-(\d{2})\s(\d{2}):(\d{2})/.exec(e);if(null!==n){var o=new Date(parseInt(n[1],10),parseInt(n[2],10)-1,parseInt(n[3],10),n[4],n[5]);if(!isNaN(o))return o.toString()}},io=function(e,r){if(!e)return"";var n=e.split(" "),o="";switch(n[1]){case"Jan":o="01";break;case"Feb":o="02";break;case"Mar":o="03";break;case"Apr":o="04";break;case"May":o="05";break;case"Jun":o="06";break;case"Jul":o="07";break;case"Aug":o="08";break;case"Sep":o="09";break;case"Oct":o="10";break;case"Nov":o="11";break;case"Dec":o="12"}return n[2]+"/"+o+"/"+n[3]+" "+n[4].substr(0,5)},lo=function(e){if(!e)return"";if(e instanceof Date)return e.toString();if(-1!==e.indexOf(":")){var r=e.split(":"),n=new Date;return n.setHours(r[0]),n.setMinutes(r[1]),n.toString()}var o=/(\d{2}):(\d{2})/.exec(e);if(null!==o){var a=new Date;return a.setHours(o[0]),a.setMinutes(o[1]),a.toString()}},so=function(e,r){return e?e.split(" ")[4].substring(0,5):""},co=function(e){return n(gr,{variant:"h6",gutterBottom:!0},e.children)},uo=function(e){var r=e.children,o=e.className,a=e.data,t=e.hasShow,i=e.hasList,l=void 0===i||i,s=Kr(e,eo);return n(ne,Zr({className:o},Kr(s,$n)),r,l&&n(oe,{label:"ra.action.back",icon:n(Nr,null)}),t&&n(ae,{record:a}))},mo=te(),po=[mo,ie(1)],fo={format:"dd/MM/yyyy"},go=function(e){return function(r,n){var o=n[e];if(r&&o){var a=new Date(o),t=new Date(r);if(Tr(a,t))return{message:"validation.greater_or_equal",args:{menor:o}}}}},vo=function(e){return void 0===e&&(e="es"),{locale:"en"===e?Pr:Er}},ho=[{id:"1",name:"Aprobado"},{id:"2",name:"Rechazado"},{id:"3",name:"Pendiente"}],bo=function(e,r){var n=document.createElement("a");n.style.display="none",document.body.appendChild(n),n.setAttribute("href",e),n.setAttribute("download",r),n.click()},yo=function(e,r){var n=le(),o=O("cb_"+ro(n)+"_"+e,{id:r}),a=o.data;return o.isLoading||o.error?"":(null==a?void 0:a.etiqueta)||""},_o=c({}),Co=["useFormulario","enableLoad"],ko=function(e){var r=e.enableLoad,o=void 0===r||r,t=Kr(e,Co),i=le(e),l=on(i,{enabled:o}),s=l.data,c=l.isLoading,u=Xn(e).fichaProps,d=a(function(){return{estado:"N",initialValues:s,isLoading:c,fichaProps:u}},[s,c,u]);return n(Nn,null,n(_o.Provider,{value:d},n(se,Zr({},t,null==u?void 0:u.panel))))};function wo(e){var r,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(n=wo(e[r]))&&(o&&(o+=" "),o+=n);else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function So(){for(var e,r,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(r=wo(e))&&(o&&(o+=" "),o+=r);return o}ko.propTypes={useFormulario:Ke.func};var xo=["classes","filterValues","handleSubmit","invalid","label","pristine","resource","saving","selectedIds","redirect"],No=["resource","redirect","className","icon","label"],To=vr(function(e){return{deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:fr(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}}),Po=function(e){var r=To(e),o=L(),a=e.resource,t=e.className,i=e.icon,l=e.label,s=void 0===l?"ra.action.delete":l,c=Kr(e,No),u=ce(),d=ue(a,{id:u.id}),m=d[0],p=d[1].isLoading;return n(Dr,{title:o("ra.action.delete")},n(Lr,Zr({disabled:p,onClick:function(){return m()},label:s,className:So("ra-delete-button",r.deleteButton,t),key:"button"},Kr(c,xo),{size:"large"}),i))};Po.defaultProps={redirect:"list",icon:n(ar,null)};var Eo=["useFormulario"],Lo=function(e){var r=Kr(e,Eo),o=de(r),t=o.record,i=o.isLoading,l=Xn(e).fichaProps,s=a(function(){return{estado:"M",initialValues:t,isLoading:i,fichaProps:l}},[t,i,l]);return n(Nn,null,n(_o.Provider,{value:s},n(me,Zr({},r,null==l?void 0:l.panel))))},Do=vr(function(e){return{button:{margin:e.spacing(1)},input:{display:"none"}}}),Ao=r(function(e,r){var o=e.isOpen,a=e.onConfirm,t=e.onClose,i=e.title,l=e.dialogText,s=e.children,c=e.hasAccept,u=void 0===c||c,d=e.hasCancel,m=void 0===d||d,p=e.isLoading,f=void 0!==p&&p,g=Do(e),v=function(e){t&&t(e)};return n(ir,{ref:r,open:o,fullWidth:!0,onClose:v,"aria-labelledby":"form-dialog-title"},n(ur,{id:"form-dialog-title"},i),n(sr,null,n(cr,null,l),s),(u||m)&&n(lr,null,m&&n(Ar,{onClick:v,variant:"contained",color:"secondary",className:g.button,disabled:f},"Cancelar"),u&&n(Ar,{onClick:function(e){a&&a(e)},variant:"contained",color:"primary",className:g.button,disabled:f},"Ok")))}),Ro=vr(function(e){return{block:{pointerEvents:"none",backgroundColor:"#ffffff",opacity:.6,position:"relative"},progress:{position:"absolute",left:"50%",top:"50%"}}}),Fo=function(e){var r=Ro(e),o=Tn(),a=le(e),t=u(_o),i=t.estado,l=t.isLoading,s=t.initialValues,c=t.fichaProps,m=jn({resource:a});return d(function(){c.onRenderFicha&&c.onRenderFicha(m,i)},[]),d(function(){l||c.onLoadFicha&&c.onLoadFicha(m,i,s)},[l]),n(S,{className:o.open?r.block:"",sx:e.sx},o.open&&n(x,{className:r.progress,thickness:4,size:50}),e.children)},Io=["children"],Oo=function(e){var r=e.children,o=Kr(e,Io),a=u(Rr),t=a.initialValues,l=a.fichaProps,s=l.onBeforeSubmitFicha,c=l.config,d=void 0===c?{}:c,m=Fr(e),p=z(),f=i(function(r){var n=s&&s(Zr({form:{values:r}},m),"N");return"string"==typeof n?void p(n,{type:"warning"}):void 0===n||n?e.onSubmit(r):void 0},[s,m]);return n(pe,Zr({},o,d,{onSubmit:f,defaultValues:t,component:Fo}),r)};Oo.propTypes=Zr({},pe.propTypes);var Mo=function(e){var r=e.handleToggle,o=e.isOpen,a=e.name,t=e.icon,i=e.children,l=e.dense,s=L(),c=fe()[0],u=n(g,{dense:l,onClick:r},n(v,{sx:{minWidth:5}},o?n(Or,null):t),n(y,{variant:"inherit",color:"textSecondary"},s(a)));return n("div",null,c||o?u:n(N,{title:s(a),placement:"right"},u),n(T,{in:o,timeout:"auto",unmountOnExit:!0},n(P,{dense:l,component:"div",disablePadding:!0,sx:{"& a":{transition:"padding-left 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",paddingLeft:c?4:2}}},i)))},qo=["items","translate"],Bo=function(e){var r=e.dense,a=void 0!==r&&r,t=L(),i=o({mnuPrueba:!1}),l=i[0],s=i[1],c=b(function(e){return e.breakpoints.down("sm")}),u=fe()[0],d=function e(r){var o=r.items,a=r.translate,t=Kr(r,qo),i=t.state,l=t.handleToggle,s=t.dense;return o&&n("div",null,o.map(function(r){var o=r.name,c=r.menu,u=r.label;return c?n(Mo,{key:o,name:u,handleToggle:function(){return l(o)},isOpen:i[o],icon:n(Ir,null),dense:s},e(Zr({items:c,translate:a},t))):n(ge,{key:o,to:"/"+o,primaryText:a("resources."+o+".name",{_:u}),dense:s,leftIcon:n(Ir,null)})}))}({items:JSON.parse(localStorage.getItem("menus")),handleToggle:function(e){s(function(r){var n;return Zr({},r,((n={})[e]=!r[e],n))})},state:l,activeClassName:"",iconClass:"",className:"",open:u,dense:a,translate:t});return n(_,{sx:{width:u?230:50,marginTop:1,marginBottom:1,transition:function(e){return e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen})}}},n(ve,null,n(he,{primaryText:t("ra.page.dashboard")}),d,c&&n(ge,{to:"/configuration",primaryText:t("pos.configuration"),leftIcon:n(Ir,null),dense:a})))},Vo=function(e){return n(be,Zr({},e,{appBar:en,menu:Bo}))},zo=["className","exporter","filters","children","jsBotonGrilla"],jo=function(e){var r=e.className,o=e.exporter,t=e.filters,i=e.children,c=e.jsBotonGrilla,u=Kr(e,zo),d=Vn(e).utils,m=Y(e),p=le(u),f=X(u).hasCreate,g=m.currentSort,v=m.displayedFilters,h=m.filterValues,b=m.selectedIds,y=m.showFilter,_=m.total,C=Zr({},d,m);return a(function(){return n(ne,Zr({className:r},ye(u)),t&&s(t,{resource:p,showFilter:y,displayedFilters:v,filterValues:h,context:"button"}),f&&n(_e,null),!1!==o&&n(Ce,{disabled:0===_,resource:p,sort:g,filterValues:h}),l.map(i,function(e,r){return s(e,{onClick:e.props.options?null:function(r){return c(C,e.key)},options:e.props.options?e.props.options.map(function(e){return Zr({},e,{onClick:function(r){return c(C,e.key)}})}):null})}))},[p,v,h,b,t,_])},Go=vr(function(e){return{main:{display:"flex",flexDirection:"column",minHeight:"100vh",alignItems:"center",justifyContent:"flex-start",backgroundImage:function(e){return e.loginBackgroundImage},backgroundRepeat:"no-repeat",backgroundSize:"cover"},card:{minWidth:300,marginTop:"6em"},avatar:{margin:"1em",display:"flex",justifyContent:"center"},avatarIcon:{backgroundColor:e.palette.secondary.main},icon:function(r){return{position:"absolute",left:e.spacing(14-Math.ceil(r.textLength/2)-1)}},hint:{marginTop:"1em",display:"flex",justifyContent:"center",color:e.palette.grey[500]},form:{padding:"0 1em 1em 1em"},input:{marginTop:"1em"},actions:{padding:"0 1em 1em 1em"}}}),Uo=function(e){var r=e.loginBackgroundImage,a=e.nameSource,t=void 0===a?"username":a,i=e.passwordSource,l=void 0===i?"password":i,s=o(!1),c=s[0],u=s[1],d=L(),m=d("ra.auth.sign_in"),f=Go({loginBackgroundImage:r,textLength:m.length}),g=z(),v=ke(),h=Ze();return n(H,{onSubmit:function(e){u(!0),v(e,h.state?h.state.nextPathname:"/").catch(function(e){u(!1),g("string"==typeof e?e:void 0!==e&&e.message?e.message:"ra.auth.sign_in_error",{type:"warning",messageArgs:{_:"string"==typeof e?e:e&&e.message?e.message:void 0}})})},validate:function(e){var r={};return e[t]||(r[t]=d("ra.validation.required")),e[l]||(r[l]=d("ra.validation.required")),r}},n("div",{className:f.main},n(qr,{className:f.card},n("div",{className:f.avatar},n(Mr,{className:f.avatarIcon},n(p,null))),n("div",{className:f.hint},"Inicio de Sesión"),n("div",{className:f.form},n("div",{className:f.input},n(we,{autoFocus:!0,name:t,label:d("ra.auth.username"),disabled:c})),n("div",{className:f.input},n(Se,{name:l,label:d("ra.auth.password"),type:"password",disabled:c}))),n(Br,{className:f.actions},n(Ar,{variant:"contained",type:"submit",color:"primary",disabled:c,fullWidth:!0},c&&n(Vr,{className:f.icon,size:18,thickness:2}),m)))))},Wo=["displayedFilters","filterValues","showFilter"],Ho=["className","options","icon","label","disabled"],Jo=vr({root:{display:"inline-block"},paddingRight:{paddingRight:4}}),Yo=function(e){var r,a=e.className,t=e.options,i=void 0===t?[]:t,l=e.icon,s=e.label,c=e.disabled,u=Kr(e,Ho),d=o(!1),p=d[0],f=d[1],g=m(),v=o(0),h=v[0],b=v[1],y=Jo(e),_=le(e);return n("div",Zr({className:So(y.root,a)},Kr(u,Wo)),n(j,{className:"add-filter",label:s,onClick:function(e){e.preventDefault(),f(!0),g.current=e.currentTarget},title:i[h].label,disabled:c},(null===(r=i[h])||void 0===r?void 0:r.icon)||l),n(zr,{open:p,anchorEl:g.current,onClose:function(e){g.current&&g.current.contains(e.target)||f(!1)}},i.map(function(e,r){return n(jr,{key:e.label,disabled:e.disabled,selected:r===h,onClick:function(n){!function(e,r){b(r),f(!1)}(0,r),e.onClick&&e.onClick(n,r)},resource:_,title:e.label},e.icon,n("span",{className:y.paddingRight}),n(xe,{label:e.label,resource:_}))})))},Qo=["fields","className","textAlign","sortable"],Zo=function(e){var r=e.fields,o=e.className,a=Kr(e,Qo),t=r.campos,i=r.separador,l=void 0===i?"":i,s=r.secundario,c=void 0===s?[]:s,u=r.hasSecundario,d=ce(),m=t.map(function(e){return void 0!==d[e]?d[e]:e}).join(""+l);return n(gr,Zr({noWrap:!0,variant:"inherit",className:o},a),m,u&&n(gr,{component:"span",display:"block",color:"textSecondary",variant:"caption"},c.map(function(e){return(e.etiqueta||"---")+": "+(d[e.campo]||"---")}).join(" ")))},Ko=["useFormulario"],Xo=function(e){var r=Kr(e,Ko),o=Ne(r),t=o.record,i=o.isLoading,l=Xn(e).fichaProps,s=a(function(){return{estado:"M",initialValues:t,isLoading:i,fichaProps:l}},[t,i,l]);return n(Nn,null,n(_o.Provider,{value:s},n(Te,Zr({},r,o,null==l?void 0:l.panel))))},$o=function(e){var r=u(_o),o=r.initialValues,a=r.fichaProps,t=a.onBeforeSubmitFicha,l=a.config,s=void 0===l?{}:l,c=zn(e),d=z(),m=i(function(r){var n=t&&t(Zr({form:{values:r}},c),"N");return"string"==typeof n?void d(n,{type:"warning"}):void 0===n||n?e.onSubmit(r):void 0},[t,c]);return n(H,Zr({},e,s,{onSubmit:m,defaultValues:o}),n(Pe,{component:Fo}))};$o.defaultProps={syncWithLocation:!1};var ea=Zr({},Ee,{palette:Zr({},Ee.palette,{mode:"dark"}),components:Zr({},Ee.components,{RaSidebar:{root:{drawerPaper:{position:"sticky"}}},RaRichTextInput:{root:{"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}}}})}),ra={__proto__:null,lightTheme:Zr({},Ee,{palette:Zr({},Ee.palette,{mode:"light"}),components:Zr({},Ee.components,{RaSidebar:{root:{drawerPaper:{position:"sticky"}}},RaRichTextInput:{root:{"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}}}})}),darkTheme:ea},na={ra:{action:{add_filter:"Add filter",add:"Add",back:"Go Back",bulk_actions:"1 item selected |||| %{smart_count} items selected",cancel:"Cancel",clear_input_value:"Clear value",clone:"Clone",confirm:"Confirm",create:"Create",create_item:"Create %{item}",delete:"Delete",edit:"Edit",export:"Export",list:"List",refresh:"Refresh",remove_filter:"Remove this filter",remove:"Remove",save:"Save",search:"Search",select_all:"Select all",select_row:"Select this row",show:"Show",sort:"Sort",undo:"Undo",unselect:"Unselect",expand:"Expand",close:"Close",open_menu:"Open menu",close_menu:"Close menu",update:"Update",move_up:"Move up",move_down:"Move down",open:"Open",toggle_theme:"Toggle Theme"},boolean:{true:"Yes",false:"No",null:" "},page:{create:"Create %{name}",dashboard:"Dashboard",edit:"%{name} #%{id}",error:"Something went wrong",list:"%{name}",loading:"Loading",not_found:"Not Found",show:"%{name} #%{id}",empty:"No %{name} yet.",invite:"Do you want to add one?"},input:{file:{upload_several:"Drop some files to upload, or click to select one.",upload_single:"Drop a file to upload, or click to select it."},image:{upload_several:"Drop some pictures to upload, or click to select one.",upload_single:"Drop a picture to upload, or click to select it."},references:{all_missing:"Unable to find references data.",many_missing:"At least one of the associated references no longer appears to be available.",single_missing:"Associated reference no longer appears to be available."},password:{toggle_visible:"Hide password",toggle_hidden:"Show password"}},message:{about:"About",are_you_sure:"Are you sure?",bulk_delete_content:"Are you sure you want to delete this %{name}? |||| Are you sure you want to delete these %{smart_count} items?",bulk_delete_title:"Delete %{name} |||| Delete %{smart_count} %{name}",bulk_update_content:"Are you sure you want to update this %{name}? |||| Are you sure you want to update these %{smart_count} items?",bulk_update_title:"Update %{name} |||| Update %{smart_count} %{name}",delete_content:"Are you sure you want to delete this item?",delete_title:"Delete %{name} #%{id}",details:"Details",error:"A client error occurred and your request couldn't be completed.",invalid_form:"The form is not valid. Please check for errors",loading:"The page is loading, just a moment please",no:"No",not_found:"Either you typed a wrong URL, or you followed a bad link.",yes:"Yes",unsaved_changes:"Some of your changes weren't saved. Are you sure you want to ignore them?"},navigation:{no_results:"No results found",no_more_results:"The page number %{page} is out of boundaries. Try the previous page.",page_out_of_boundaries:"Page number %{page} out of boundaries",page_out_from_end:"Cannot go after last page",page_out_from_begin:"Cannot go before page 1",page_range_info:"%{offsetBegin}-%{offsetEnd} of %{total}",partial_page_range_info:"%{offsetBegin}-%{offsetEnd} of more than %{offsetEnd}",current_page:"Page %{page}",page:"Go to page %{page}",first:"Go to first page",last:"Go to last page",next:"Go to next page",previous:"Go to previous page",page_rows_per_page:"Rows per page:",skip_nav:"Skip to content"},sort:{sort_by:"Sort by %{field} %{order}",ASC:"ascending",DESC:"descending"},auth:{auth_check_error:"Please login to continue",user_menu:"Profile",username:"Username",password:"Password",sign_in:"Sign in",sign_in_error:"Authentication failed, please retry",logout:"Logout"},notification:{updated:"Element updated |||| %{smart_count} elements updated",created:"Element created",deleted:"Element deleted |||| %{smart_count} elements deleted",bad_item:"Incorrect element",item_doesnt_exist:"Element does not exist",http_error:"Server communication error",data_provider_error:"dataProvider error. Check the console for details.",i18n_error:"Cannot load the translations for the specified language",canceled:"Action cancelled",logged_out:"Your session has ended, please reconnect.",not_authorized:"You're not authorized to access this resource."},validation:{required:"Required",minLength:"Must be %{min} characters at least",maxLength:"Must be %{max} characters or less",minValue:"Must be at least %{min}",maxValue:"Must be %{max} or less",number:"Must be a number",email:"Must be a valid email",oneOf:"Must be one of: %{options}",regex:"Must match a specific format (regexp): %{pattern}"},saved_queries:{label:"Saved queries",query_name:"Query name",new_label:"Save current query...",new_dialog_title:"Save current query as",remove_label:"Remove saved query",remove_label_with_name:'Remove query "%{name}"',remove_dialog_title:"Remove saved query?",remove_message:"Are you sure you want to remove that item from your list of saved queries?",help:"Filter the list and save this query for later"}}};na.ra.page.empty="No records yet";var oa=Zr({},na,{login:{id:"ID",hint:"Login",required:"Insert Username or ID",send:"Send",email:"Enter your email address",check_email:"Check your email inbox, we just send you a verification code!",must_enter_credentials:"You must first enter Username or ID",restore_password:"Restore Password",punch_in:"Punch In"},pos:{search:"Search",change_pin:"Change Pin",change_password:"Change Password",configuration:"Configuration",language:"Language",theme:{name:"Theme",light:"Light",dark:"Dark"},dashboard:{welcome:{title:"Welcome",subtitle:"Employee Management",aor_button:"Metiri WebSite"}}},validation:{greater_or_equal:"Must be greater than or equal to %{menor}"}});const aa={ra:{action:{add:"Añadir",add_filter:"Añadir filtro",back:"Ir atrás",bulk_actions:"1 item seleccionado |||| %{smart_count} items seleccionados",cancel:"Cancelar",clear_input_value:"Limpiar valor",clone:"Clonar",close:"Cerrar",close_menu:"Cerrar menú",confirm:"Confirmar",create:"Crear",create_item:"Crear %{item}",delete:"Eliminar",edit:"Editar",expand:"Expandir",export:"Exportar",list:"Listar",move_up:"Mover arriba",move_down:"Mover abajo",open_menu:"Abrir menú",refresh:"Refrescar",remove:"Borrar",remove_filter:"Borrar filtro",save:"Guardar",search:"Buscar",select_all:"Seleccionar todo",select_row:"Seleccionar esta fila",show:"Mostrar",sort:"Ordenar",undo:"Deshacer",unselect:"Deseleccionar",update:"Actualizar"},auth:{auth_check_error:"Por favor inicie sesión para continuar",logout:"Cerrar Sesión",password:"Contraseña",sign_in:"Acceder",sign_in_error:"La autenticación falló, por favor, vuelva a intentarlo",user_menu:"Perfil",username:"Usuario"},boolean:{true:"Sí",false:"No",null:" "},input:{file:{upload_several:"Arrastre algunos archivos para subir o haga clic para seleccionarlos.",upload_single:"Arrastre un archivo para subir o haga clic para seleccionarlo."},image:{upload_several:"Arrastre algunas imagénes para subir o haga clic para seleccionarlas.",upload_single:"Arrastre alguna imagen para subir o haga clic para seleccionarla."},references:{all_missing:"No se pueden encontrar datos de referencias.",many_missing:"Al menos una de las referencias asociadas parece no estar disponible.",single_missing:"La referencia asociada no parece estar disponible."},password:{toggle_visible:"Ocultar contraseña",toggle_hidden:"Mostrar contraseña"}},message:{about:"Acerca de",are_you_sure:"¿Está seguro?",bulk_delete_content:"¿Seguro que quiere eliminar este %{name}? |||| ¿Seguro que quiere eliminar estos %{smart_count} items?",bulk_delete_title:"Eliminar %{name} |||| Eliminar %{smart_count} %{name} items",bulk_update_content:"¿Seguro que quiere actualizar este %{name}? |||| ¿Seguro que quiere actualizar estos %{smart_count} items?",bulk_update_title:"Actualizar %{name} |||| Actualizar %{smart_count} %{name} items",delete_content:"¿Seguro que quiere eliminar este item?",delete_title:"Eliminar %{name} #%{id}",details:"Detalles",error:"Se produjo un error en el cliente y su solicitud no se pudo completar",invalid_form:"El formulario no es válido. Por favor verifique si hay errores",loading:"La página se está cargando, espere un momento por favor",no:"No",not_found:"O bien escribió una URL incorrecta o siguió un enlace incorrecto.",yes:"Sí",unsaved_changes:"Algunos de sus cambios no se guardaron. ¿Está seguro que quiere ignorarlos?"},navigation:{next:"Siguiente",no_more_results:"El número de página %{page} está fuera de los límites. Pruebe la página anterior.",no_results:"No se han encontrado resultados",page_out_from_begin:"No puede ir antes de la página 1",page_out_from_end:"No puede ir después de la última página",page_out_of_boundaries:"Número de página %{page} fuera de los límites",page_range_info:"%{offsetBegin} - %{offsetEnd} de %{total}",page_rows_per_page:"Filas por página:",prev:"Anterior",skip_nav:"Saltar al contenido"},sort:{sort_by:"Ordenar por %{field} %{order}",ASC:"ascendente",DESC:"descendente"},notification:{bad_item:"Elemento incorrecto",canceled:"Acción cancelada",created:"Elemento creado",data_provider_error:"Error del proveedor de datos. Consulte la consola para más detalles.",deleted:"Elemento borrado |||| %{smart_count} elementos borrados.",http_error:"Error de comunicación con el servidor",item_doesnt_exist:"El elemento no existe",logged_out:"Su sesión ha finalizado, vuelva a conectarse.",updated:"Elemento actualizado |||| %{smart_count} elementos actualizados",i18n_error:"No se pudieron cargar las traducciones para el idioma especificado",not_authorized:"No tiene autorización para acceder a este recurso."},page:{create:"Crear %{name}",dashboard:"Tablero",edit:"%{name} #%{id}",empty:"Sin %{name} todavía.",error:"Algo salió mal",invite:"¿Quiere agregar una?",list:"Lista de %{name}",loading:"Cargando",not_found:"No encontrado",show:"%{name} #%{id}"},validation:{email:"Debe ser un correo electrónico válido",maxLength:"Debe contener %{max} caracteres o menos",maxValue:"Debe ser %{max} o menos",minLength:"Debe contener %{min} caracteres al menos",minValue:"Debe ser al menos %{min}",number:"Debe ser un número",oneOf:"Debe ser uno de: %{options}",regex:"Debe coincidir con un formato específico (regexp): %{pattern}",required:"Requerido"}}};aa.ra.notification.created="Datos guardados correctamente",aa.ra.action.bulk_actions="1 seleccionado |||| %{smart_count} seleccionados",aa.ra.page.dashboard="Inicio",aa.ra.page.empty="Sin registros todavía",aa.ra.page.invite="¿Quiere agregar uno?",aa.ra.page.list="%{name}",aa.ra.page.edit="Editar %{name}",aa.ra.action.back="Volver";var ta=Zr({},aa,{login:{id:"Cédula",hint:"Inicio de Sesión",required:"Ingrese Usuario o Cédula",email:"Ingrese su email aquí",send:"Enviar",check_email:"Revisa tu correo electrónico, te enviaremos un código de verificación!",must_enter_credentials:"Debe ingresar Nº de Usuario o Cédula y Contraseña primero",restore_password:"Restablecer Contraseña",punch_in:"Generar Marcas"},pos:{search:"Búsqueda",change_pin:"Cambiar Pin",change_password:"Cambiar Contraseña",configuration:"Configuración",language:"Lenguaje",theme:{name:"Tema Visual",light:"Light",dark:"Dark"},dashboard:{welcome:{title:"Bienvenid@",subtitle:"Gestión de Funcionarios",aor_button:"Sitio de Metiri"}}},validation:{greater_or_equal:"Debe ser mayor o igual a %{menor}"}}),ia=["hidden"],la=["hidden","useContenido"],sa=["hidden"],ca=function(e){var r=u(_o),n=r.estado,o=r.isLoading,a=r.fichaProps,t=(void 0===a?{}:a)[e.source],i=void 0===t?{}:t,l=e.hidden,s=void 0!==l&&l,c=Kr(e,ia),d=i.hidden,m=i.useContenido,p=void 0===m?Bn:m,f=Kr(i,la),g=void 0!==d?d:s,v=p(Zr({},c,{estado:n,hidden:g,isLoading:o},f)),h=v.hidden,b=Kr(v,sa);if(void 0===v)throw new Error("useContenido está devolviendo undefined para el contenido "+e.source+"\n Asegúrese de incluir una instrucción return al final de la función");return{propsContenido:Zr({},c,f,b),hidden:void 0!==h?h:g}},ua=function(e){var r=ca(e),o=r.propsContenido,a=r.hidden,t=ce(),i=JSON.parse(JSON.stringify(t)),l=i[e.source];return i[e.source]=""!=l&&"0"!=l,!a&&n(Le,Zr({},o,{record:i}))},da=["onFocus","onChange","onBlur","hidden","disabled","validate"],ma=["onFocus","onBlur","onChange","hidden","disabled","useContenido","validate"],pa=["hidden","disabled","onFocus","onChnage","onBlur","validate"],fa=function(e,r,n){return"string"==typeof(null==n?void 0:n.data)?n.data:void 0},ga=function(e){var r=e.source,n=u(_o),o=n.estado,a=n.isLoading,t=n.fichaProps,i=void 0===t?{}:t,l=kr(function(e){var n=e.configInputs?e.configInputs.filter(function(e){return e.id===r}):[];return n[0]?n[0]:null})||{},s=l.disabled,c=l.hidden,d=!0===l.required?mo:void 0,p=i[r],f=void 0===p?{}:p,g=e.onFocus,v=e.onChange,h=e.onBlur,b=e.hidden,y=void 0!==b&&b,_=e.disabled,C=void 0!==_&&_,k=e.validate,w=Kr(e,da),S=De(e).field,x=f.onFocus,N=f.onBlur,T=f.onChange,P=f.hidden,E=f.disabled,L=f.useContenido,D=void 0===L?Bn:L,A=f.validate,R=Kr(f,ma),F=void 0!==P?P:y,I=void 0!==E?E:C,O=void 0!==x?x:g,M=void 0!==N?N:h,q=void 0!==T?T:v,B=jn(e),V=D(Zr({},w,{estado:o,hidden:F,isLoading:a,utils:B},R)),z=m(S.value);if(void 0===V)throw new Error("useContenido está devolviendo undefined para el contenido "+r+"\n Asegúrese de incluir una instrucción return al final de la función");var j=V.hidden,G=V.disabled,U=V.onFocus,W=V.onChnage,H=V.onBlur,J=V.validate,Y=Kr(V,pa),Q=U||O,Z=H||M,K=W||q,X=Zr({},B,{prev:z.current}),$=Array.isArray(k)?k:[k],ee=Array.isArray(A)?A:[A],re=Array.isArray(J)?J:[J];return{propsContenido:Zr({onFocus:function(e){Q&&O(B,o,e),z.current=e.target.value},onBlur:function(e){return Z&&Z(X,o,e)},onChange:function(e){return K&&K(X,o,e)},helperText:!1,validate:[].concat($,ee,re,[fa,d]).filter(function(e){return void 0!==e})},w,R,Y,{disabled:void 0!==s?s:void 0!==G?G:I}),hidden:void 0!==c?c:void 0!==j?j:F}},va=function(e){var r=ga(e);return!r.hidden&&n(Ae,Zr({accept:"",maxSize:5e6},r.propsContenido),n(Re,{source:"src"}))},ha=function(e){var r=ga(e);return!r.hidden&&n(Fe,r.propsContenido)},ba=["callback"],ya=["helperText","source","reference"],_a=["callback"],Ca=function(e){var r=e.callback,o=Kr(e,ba),a=Oe(),t=a.isLoading,i=a.allChoices;return d(function(){t||"function"==typeof r&&r(Object.values([i]))},[i,r,t]),n(Me,o)},ka=function(e){var r,o,a=ga(e).hidden,t=Cr(),i=e.helperText,l=e.source,s=e.reference,c=Kr(e,ya),u=kr(function(e){var r=e.reload_cb?e.reload_cb.filter(function(e){return e.id===l}):[];return r[0]?r[0]:null}),p=m(u),f=null===u&&p.current?p.current:u;return f&&(r=f.callback,o=Kr(f,_a)),d(function(){null!==u&&(p.current=u,t(En(l)))},[JSON.stringify(u)]),a?null:n(Ie,{reference:s,source:l,perPage:250,filter:o},n(Ca,Zr({},c,{callback:r,helperText:i,optionText:"etiqueta",optionValue:l})))},wa=function(e){var r=ga(e);return!r.hidden&&n(Me,r.propsContenido)},Sa=function(e){var r=e.title,o=e.source,a=e.src,t=ce(e);return n(Mr,{title:r,src:a+"/"+t[o]})},xa=["helperText"],Na=function(e){var r=ga(e),o=r.propsContenido,a=r.hidden,t=o.helperText,i=Kr(o,xa);return a?null:n(qe,i,n(Be,{helperText:t,optionText:"etiqueta",optionValue:e.source}))},Ta=function(e){var r=ga(e);return!r.hidden&&n(Se,r.propsContenido)},Pa=["helperText"],Ea=function(e){var r=ga(e),o=r.propsContenido,a=r.hidden,t=o.helperText,i=Kr(o,Pa);return a?null:n(Ie,i,n(Ve,{helperText:t,optionText:"etiqueta",optionValue:e.source}))},La=function(e){var r=ga(e);return!r.hidden&&n(Ve,r.propsContenido)},Da=vr(function(e){return{confirmPrimary:{color:e.palette.primary.main},confirmWarning:{color:e.palette.error.main,"&:hover":{backgroundColor:fr(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}},iconPaddingStyle:{paddingRight:"0.5em"}}},{name:"RaConfirm"}),Aa=function(e){return n(Yr,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},n(E,e))},Ra={cursor:"move"},Fa=function(e){var r,o=e.isOpen,a=e.isLoading,t=e.title,l=e.content,s=e.cancel,c=e.confirmColor,u=e.ConfirmIcon,d=e.CancelIcon,m=e.onClose,p=e.onConfirm,f=e.contentResource,g=e.translateOptions,v=void 0===g?{}:g,h=Da(e),b=L(),y=ze(f)[0],_=i(function(e,r){e.stopPropagation(),p(e,y)},[y,p]),C=i(function(e){e.stopPropagation()},[]);return n(ir,{open:o,onClose:m,onClick:C,fullWidth:!0,maxWidth:"lg",PaperComponent:Aa,"aria-labelledby":"draggable-dialog-title"},n(ur,{style:Ra,id:"draggable-dialog-title"},b(t,Zr({_:t},v))),n(sr,{dividers:!0},l),n(lr,null,n(Ar,{disabled:a,onClick:m},n(d,{className:h.iconPaddingStyle}),b(s,{_:s})),n(Ar,{disabled:a,onClick:function(e){return _(e,"yes")},className:So("ra-confirm",(r={},r[h.confirmWarning]="warning"===c,r[h.confirmPrimary]="primary"===c,r)),autoFocus:!0},n(u,{className:h.iconPaddingStyle}),b("ra.action.confirm"))))};Fa.propTypes={cancel:Ke.string,classes:Ke.object,confirm:Ke.string,confirmColor:Ke.string,ConfirmIcon:Ke.elementType,CancelIcon:Ke.elementType,content:Ke.node.isRequired,isOpen:Ke.bool,isLoading:Ke.bool,onClose:Ke.func.isRequired,onConfirm:Ke.func.isRequired,title:Ke.string.isRequired},Fa.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:Hr,CancelIcon:Jr,isOpen:!1};var Ia=["disabled","asistant","asistantResource","label","source"],Oa=function(){return n(t,null)},Ma={seleccion:[],all:!0,none:!1},qa=function(e){return!e||null!=e&&e.all?"Todos":null!=e&&e.none||0===e.seleccion.length?"Ninguno":"Selección ("+e.seleccion.length+")"},Ba=function(e){return e},Va=function(e){var r=e.disabled,a=e.asistant,l=e.asistantResource,s=e.label,c=e.source,u=Kr(e,Ia),d=o(!1),m=d[0],p=d[1],f=nn(),g=i(function(){p(!1)},[p]);return n(t,null,n("div",{style:{display:"flex",alignItems:"center"}},n(we,Zr({initialValue:Ma},u,{source:c,label:s,disabled:!0,parse:Ba,format:qa,helperText:!1,InputProps:{endAdornment:n(t,null,n(Lr,{onClick:function(e){f.setValue(c,{seleccion:[],all:!1,none:!0})},disabled:r,"aria-label":"Ninguno",size:"small",title:"Ninguno"},n(Ur,null)),n(Lr,{onClick:function(e){f.setValue(c,{seleccion:[],all:!0,none:!1})},disabled:r,"aria-label":"Todos",size:"small",title:"Todos"},n(Gr,null)),n(Lr,{onClick:function(e){return p(!0)},disabled:r,"aria-label":"Selección",size:"small",title:"Selección"},n(Wr,null)))}}))),n(Fa,{isOpen:m,title:"Selección de "+s,contentResource:l,content:n(a,{bulkActionButtons:n(Oa,null),hasCreate:!1,exporter:!1,resource:l}),onConfirm:function(e,r){p(!1),f.setValue(c,{seleccion:r,all:!1,none:!1})},onClose:g}))},za=function(e){return n(je,Zr({},e,{hasCreate:!1,exporter:!1,perPage:25,title:" ",bulkActionButtons:n("span",null)}),n(ee,null,n(Ge,{source:"funced",sortable:!0,label:"Cédula"}),n(Ge,{source:"funpriape",sortable:!0,label:"Apellido"}),n(Ge,{source:"funprinom",sortable:!0,label:"Nombre"})))},ja={fillista:"empcod=-1"},Ga=function(e){var r=o(ja),a=r[0],t=r[1],l=M(),s=i(function(e){t({fillista:e.node.key})},[t]),c=i(function(e){return l.getChildNodes("form_224",{parentId:e?e.itemData.id:""}).then(function(e){return e.data}).catch(function(){throw new Error("Data Loading Error")})},[l]);return n(_,{display:"flex",flex:1,alignItems:"flex-start",height:"20em"},n(_,{flexGrow:1},n(Qr,{id:"funcionarios-treeview",dataStructure:"plain",rootValue:"",onItemClick:s,createChildren:c})),n(_,{flexGrow:2},n(za,{resource:"form_224",filter:a})))},Ua=vr(function(e){return{confirmPrimary:{color:e.palette.primary.main},confirmWarning:{color:e.palette.error.main,"&:hover":{backgroundColor:fr(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}},iconPaddingStyle:{paddingRight:"0.5em"}}},{name:"RaConfirm"}),Wa=function(e){return n(Yr,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},n(E,e))},Ha={cursor:"move"},Ja=function(e){var r,o=e.isOpen,a=e.isLoading,t=e.title,l=e.cancel,s=e.confirmColor,c=e.ConfirmIcon,u=e.CancelIcon,d=e.onClose,m=e.onConfirm,p=e.translateOptions,f=void 0===p?{}:p,g=Ua(e),v=L(),h=i(function(e,r){e.stopPropagation(),m(e,r)},[m]),b=i(function(e){e.stopPropagation()},[]);return n(ir,{open:o,onClose:d,onClick:b,fullWidth:!0,maxWidth:"lg",PaperComponent:Wa,"aria-labelledby":"draggable-dialog-title"},n(ur,{style:Ha,id:"draggable-dialog-title"},v(t,Zr({_:t},f))),n(sr,{dividers:!0},n(Ga,null)),n(lr,null,n(Ar,{disabled:a,onClick:d},n(u,{className:g.iconPaddingStyle}),v(l,{_:l})),n(Ar,{disabled:a,onClick:function(e){return h(e,"yes")},className:So("ra-confirm",(r={},r[g.confirmWarning]="warning"===s,r[g.confirmPrimary]="primary"===s,r)),autoFocus:!0},n(c,{className:g.iconPaddingStyle}),v("ra.action.confirm"))))};Ja.propTypes={cancel:Ke.string,classes:Ke.object,confirm:Ke.string,confirmColor:Ke.string,ConfirmIcon:Ke.elementType,CancelIcon:Ke.elementType,isOpen:Ke.bool,isLoading:Ke.bool,onClose:Ke.func.isRequired,onConfirm:Ke.func.isRequired,title:Ke.string.isRequired},Ja.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:Hr,CancelIcon:Jr,isOpen:!1};var Ya=["disabled","asistant","asistantResource","label","source"],Qa={seleccion:[],all:!0,none:!1},Za=function(e){return!e||null!=e&&e.all?"Todos":null!=e&&e.none||0===e.seleccion.length?"Ninguno":"Selección ("+e.seleccion.length+")"},Ka=function(e){return e},Xa=function(e){var r=e.disabled,a=e.label,l=void 0===a?"Funcionarios":a,s=e.source,c=Kr(e,Ya),u=ze("form_224")[0],d=o(!1),m=d[0],p=d[1],f=nn(),g=i(function(){p(!1)},[p]);return n(t,null,n("div",{style:{display:"flex",alignItems:"center"}},n(we,Zr({initialValue:Qa},c,{source:s,label:l,disabled:!0,parse:Ka,format:Za,helperText:!1,InputProps:{endAdornment:n(t,null,n(Lr,{onClick:function(e){f.setValue(s,{seleccion:[],all:!1,none:!0})},disabled:r,"aria-label":"Ninguno",size:"small",title:"Ninguno"},n(Ur,null)),n(Lr,{onClick:function(e){f.setValue(s,{seleccion:[],all:!0,none:!1})},disabled:r,"aria-label":"Todos",size:"small",title:"Todos"},n(Gr,null)),n(Lr,{onClick:function(e){return p(!0)},disabled:r,"aria-label":"Selección",size:"small",title:"Selección"},n(Wr,null)))}}))),n(Ja,{isOpen:m,title:"Selección de "+l,onConfirm:function(e,r){p(!1),f.setValue(s,{seleccion:u,all:!1,none:!1})},onClose:g}))},$a=function(e){var r=ga(e);return!r.hidden&&n(we,Zr({multiline:!0},r.propsContenido))},et=["tipo"],rt=function(e){var r=e.tipo,o=Kr(e,et),a=ga(o),t=a.propsContenido,i=a.hidden,l=nn(),s=De(e),c=s.field,u=s.fieldState,m="F"===r||"Z"===r;d(function(){t.value&&l.setValue(e.source,t.value)}),d(function(){m&&""!=c.value&&!u.error&&u.isTouched&&t.onBlur()},[c.value]);var p=Zr({},t);return!i&&("N"===r||"D"===r?n(Ue,p):"F"===r?n(We,p):"Z"===r?n(He,p):n(we,"H"===r?Zr({},p,{type:"time"}):p))},nt=["tipo","value"],ot=function(e){var r=e.tipo,o=Kr(e,nt),a=ca(o),t=a.hidden,i=Zr({},a.propsContenido);return!t&&("N"===r||"D"===r?n(Je,i):"F"===r?n(Ye,i):"Z"===r?n(Ye,Zr({},i,{showTime:!0})):n(Ge,i))};export{en as AppBar,ua as BooleanField,va as Camino,ha as CheckBox,ka as ComboBox,wa as ComboBoxManual,ko as CreateEtriek,Po as DeleteButtonNoWarning,Lo as EditEtriek,Cn as EtrGrid,uo as FichaActions,_o as FichaContext,Ao as FormDialog,Oo as FormEtriek,Sn as GE,Jn as GrillaEtriek,Sa as ImageField,Vo as Layout,jo as ListActionsEtriek,Na as ListCheck,Uo as Login,Bo as Menu,Yo as MenuButton,Zo as MultiTextField,Ta as Password,Ea as RadioButton,La as RadioButtonManual,co as Separador,Xo as ShowEtriek,Mo as SubMenu,Xa as TBSF,$o as TabbedFormEtriek,Zn as TabbedGrillaEtriek,$a as TextArea,rt as TextBox,Va as TextBoxSelection,ot as TextField,ho as choicesEstado,oo as dateFormat,fo as dateFormatOptions,ao as dateParser,to as dateTimeFormat,io as dateTimeParser,En as deleteRecargarComboBox,bo as descargarLink,oa as enMessages,ta as esMessages,go as etrFechaMayorQue,mo as etrRequerido,po as etrRequeridoNumerico,ro as getFormcodFromResource,vo as localeOptions,Pn as recargarComboBox,Dn as setDisableAction,Ln as setHiddenAction,An as setRequireAction,ra as themes,lo as timeFormat,so as timeParser,qn as useAjax,ga as useContenidoController,ln as useDeleteRowEtrGrid,ca as useFieldController,Tn as useFormProgress,Mn as useGetJson,Xn as useInitFicha,on as useNuevo,yo as useReferenceLabel,sn as useSaveRowEtrGrid,no as useStylesContenidos,jn as useUtils,Vn as useUtilsGrilla,zn as useUtilsSubmit};
|
|
1
|
+
import e from"@mui/icons-material/Lock";import n from"@mui/icons-material/VpnLock";import{MenuItem as o,ListItemIcon as t,ListItemText as r,useMediaQuery as i,Typography as a,Box as l,alpha as s,createTheme as u,StyledEngineProvider as c,Stack as d,Dialog as m,DialogTitle as f,DialogContent as p,DialogActions as v,Tooltip as g,IconButton as h,ThemeProvider as b,Paper as y,CardContent as C,CircularProgress as x,Collapse as w,List as k,Divider as T,Button as S}from"@mui/material";import R,{forwardRef as P,createElement as F,createContext as N,useState as E,useMemo as _,useContext as I,useCallback as L,Fragment as M,useEffect as B,Children as D,cloneElement as O,memo as V,isValidElement as A,useRef as q}from"react";import{useTranslate as j,useUserMenu as z,useResourceDefinitions as W,AppBar as G,UserMenu as U,Logout as H,useDataProvider as J,useListContext as Y,useNotify as Q,useRedirect as Z,useRefresh as $,useResourceContext as K,useUnselectAll as X,NumberField as ee,DateField as ne,TextField as oe,ReferenceField as te,Button as re,useRecordContext as ie,useInput as ae,useGetList as le,useSafeSetState as se,Confirm as ue,Form as ce,SaveButton as de,useCreatePath as me,useResourceDefinition as fe,DatagridRoot as pe,DatagridClasses as ve,BulkActionsToolbar as ge,SimpleList as he,useGetOne as be,TopToolbar as ye,ListButton as Ce,ShowButton as xe,required as we,minValue as ke,useSaveContext as Te,Create as Se,useDelete as Re,useEditController as Pe,Edit as Fe,SimpleForm as Ne,useSidebarState as Ee,MenuItemLink as _e,Menu as Ie,DashboardMenuItem as Le,Layout as Me,FilterContext as Be,sanitizeListRestProps as De,FilterButton as Oe,CreateButton as Ve,ExportButton as Ae,useLogin as qe,TextInput as je,PasswordInput as ze,FieldTitle as We,useShowController as Ge,Show as Ue,FormTab as He,getTabbedFormTabFullPath as Je,TabbedFormTabs as Ye,Toolbar as Qe,defaultTheme as Ze,BooleanField as $e,ImageInput as Ke,ImageField as Xe,FileInput as en,BooleanInput as nn,ReferenceInput as on,useChoicesContext as tn,AutocompleteInput as rn,SelectInput as an,ReferenceArrayInput as ln,SelectArrayInput as sn,RadioButtonGroupInput as un,useRecordSelection as cn,List as dn,Datagrid as mn,NumberInput as fn,DateInput as pn,DateTimeInput as vn}from"react-admin";import{Link as gn,useLocation as hn,matchPath as bn,useResolvedPath as yn,Routes as Cn,Route as xn}from"react-router-dom";import{styled as wn,ThemeProvider as kn,alpha as Tn}from"@mui/material/styles";import Sn,{string as Rn,func as Pn,any as Fn,bool as Nn}from"prop-types";import En from"@mui/icons-material/Add";import _n from"@mui/icons-material/Cancel";import In from"@mui/icons-material/Delete";import Ln from"@mui/icons-material/Edit";import Mn from"@mui/material/Dialog";import Bn from"@mui/material/DialogActions";import Dn from"@mui/material/DialogContent";import On from"@mui/material/DialogContentText";import Vn from"@mui/material/DialogTitle";import An from"@mui/material/Paper";import{esES as qn,DataGridPremium as jn,useGridApiContext as zn,useGridApiRef as Wn,useKeepGroupedColumnsHidden as Gn}from"@mui/x-data-grid-premium";import{useFormContext as Un,useFormState as Hn}from"react-hook-form";import{useDispatch as Jn,useSelector as Yn}from"react-redux";import{useMutation as Qn}from"react-query";import Zn from"@mui/icons-material/Settings";import{GridActionsCellItem as $n}from"@mui/x-data-grid";import Kn from"@mui/material/AppBar";import Xn from"@mui/material/Slide";import eo from"@mui/material/Toolbar";import no from"@mui/material/Typography";import oo from"@mui/icons-material/Create";import to from"@mui/icons-material/RemoveRedEye";import ro from"@mui/material/Divider";import io from"@mui/material/Tab";import ao from"@mui/material/Tabs";import lo from"@mui/icons-material/ChevronLeft";import{isAfter as so}from"date-fns";import uo from"date-fns/locale/en-US";import co from"date-fns/locale/es";import mo from"@mui/material/IconButton";import fo from"@mui/material/Tooltip";import po from"@mui/material/Box";import vo from"@mui/icons-material/ExpandMore";import go from"@mui/material/Avatar";import ho from"@mui/material/Button";import bo from"@mui/material/Card";import yo from"@mui/material/CardActions";import Co from"@mui/material/CircularProgress";import xo from"@mui/material/Menu";import wo from"@mui/material/MenuItem";import ko from"ra-language-english";import To from"@blackbox-vision/ra-language-spanish";import So from"@mui/material/Stack";import Ro from"@mui/icons-material/Visibility";import Po from"@mui/icons-material/CloudDownload";import Fo from"@mui/material/Link";import{PhotoCamera as No}from"@mui/icons-material";import Eo from"@mui/icons-material/AddAPhoto";import _o from"@mui/icons-material/Check";import Io from"@mui/icons-material/RemoveCircleOutline";import Lo from"@mui/icons-material/Search";import Mo from"@mui/icons-material/CheckCircle";import Bo from"@mui/icons-material/ErrorOutline";import Do from"react-draggable";import{TreeView as Oo}from"devextreme-react";function Vo(){return(Vo=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e}).apply(this,arguments)}function Ao(e,n){if(null==e)return{};var o,t,r={},i=Object.keys(e);for(t=0;t<i.length;t++)n.indexOf(o=i[t])>=0||(r[o]=e[o]);return r}var qo=P(function(i,a){var l=j(),s=z().onClose,u=W(),c=u.form_59;return[u.form_275?F(o,Vo({component:gn,ref:a},i,{key:"/form_275",to:"/form_275",onClick:s}),F(t,null,F(e,null)),F(r,null,l("pos.change_pin"))):null,c?F(o,Vo({component:gn,ref:a},i,{key:"/form_59",to:"/form_59",onClick:s}),F(t,null,F(n,null)),F(r,null,l("pos.change_password"))):null]}),jo=function(){return F(U,null,F(qo,null),F(H,null))},zo=function(e){var n=i(function(e){return e.breakpoints.up("sm")});return F(G,Vo({},e,{color:"secondary",userMenu:F(jo,null)}),F(a,{variant:"h6",color:"inherit",sx:{flex:1,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},id:"react-admin-title"}),n&&F(l,{component:"span",sx:{flex:1}}))},Wo=N(),Go=function(e){var n=e.children,o=E(!1),t=o[0],r=o[1],i=E({}),a=i[0],l=i[1],s=_(function(){return{open:t,props:a,show:function(e){l(e),r(!0)},hide:function(){return r(!1)}}},[t,a]);return F(Wo.Provider,{value:s},n)},Uo=function(){return I(Wo)},Ho=N(),Jo=function(e){var n=e.children,o=E(!1),t=o[0],r=o[1],i=_(function(){return{open:t,show:function(){return r(!0)},hide:function(){return r(!1)}}},[t]);return F(Ho.Provider,{value:i},n)},Yo=function(){return I(Ho)},Qo=function(e,n,o,t){return{type:"RELOAD_CB",payload:{id:e,method:n,params:o,callback:t}}},Zo=function(e,n){return{type:"RELOAD_CB_SUCCESS",payload:{id:e,callback:n}}},$o=function(e,n){return{type:"HIDE_INPUT",payload:{id:e,hidden:n}}},Ko=function(e,n){return{type:"DISABLE_INPUT",payload:{id:e,disabled:n}}},Xo=function(e,n){return{type:"REQUIRE_INPUT",payload:{id:e,required:n}}},et=function(e,n){return{type:"ERROR_INPUT",payload:{id:e,error:n}}},nt=function(){var e=Jn();return L(function(n,o,t,r){e(Qo(n,o,t,r))},[e])},ot=function(){var e=Jn();return L(function(n,o){e($o(n,o))},[e])},tt=function(){var e=Jn();return L(function(n,o){e(Ko(n,o))},[e])},rt=function(){var e=Jn();return L(function(n,o){e(Xo(n,o))},[e])},it=function(){var e=Jn();return L(function(n,o){e(et(n,o))},[e])},at=function(e,n){var o=J(),t=Qn(function(n){return o.getJson(e,{method:n.method,params:n.params})},n);return{mutateAsync:t.mutateAsync,isLoading:t.isLoading}},lt=function(e){var n=at(e),o=n.mutateAsync,t=n.isLoading;return[L(function(e,n,t){return o({method:e,params:n},{onSuccess:t,onError:t})},[]),t]},st=function(e){return{}},ut=function(e){var n=Y(e),o=Q(),t=Z(),r=$(),i=K(e),a=X(i),l=Uo(),s=j();return{ajax:lt(i)[0],data:n,notify:o,redirect:t,refresh:r,refetch:n.refetch,unselectAll:a,asistente:l,translate:s}},ct=function(e){var n=nt(),o=ot(),t=tt(),r=rt(),i=it(),a=Yo(),l=Q(),s=Z(),u=K(e);return{ajax:lt(u)[0],notify:l,redirect:s,recargarComboBox:n,progress:a,setHidden:o,setDisable:t,setRequire:r,setError:i,etrs:e.etrs||{}}},dt=function(e){var n=nt(),o=ot(),t=tt(),r=rt(),i=it(),a=Yo(),l=Q(),s=Z(),u=Un(),c=K(e),d=lt(c),m=e.etrs||{},f=e.asisEtr||{},p=null==u?void 0:u.trigger;return{form:u,ajax:d[0],notify:l,redirect:s,recargarComboBox:n,progress:a,setHidden:L(function(e,n){o(e,n),setTimeout(function(){p(e)})},[o,p]),setDisable:L(function(e,n){t(e,n),setTimeout(function(){p(e)})},[t,p]),setRequire:L(function(e,n){r(e,n),setTimeout(function(){p(e)})},[r,p]),setError:L(function(e,n){i(e,n),setTimeout(function(){p(e)})},[i,p]),etrs:m,asisEtr:f}},mt=N({}),ft=N(void 0),pt=["hidden"],vt=["hidden","useContenido"],gt=["hidden"],ht=function(e){var n=I(mt),o=n.estado,t=n.isLoading,r=n.fichaProps,i=(void 0===r?{}:r)[e.source],a=void 0===i?{}:i,l=e.hidden,s=void 0!==l&&l,u=Ao(e,pt),c=a.hidden,d=a.useContenido,m=void 0===d?st:d,f=Ao(a,vt),p=void 0!==c?c:s,v=m(Vo({},u,{estado:o,hidden:p,isLoading:t},f)),g=v.hidden,h=Ao(v,gt);if(void 0===v)throw new Error("useContenido está devolviendo undefined para el contenido "+e.source+"\n Asegúrese de incluir una instrucción return al final de la función");return{propsContenido:Vo({},u,f,h),hidden:void 0!==g?g:p}},bt=["tipo","value"],yt=function(e){var n=e.tipo,o=Ao(e,bt),t=ht(o),r=t.hidden,i=Vo({},t.propsContenido);return!r&&("N"===n||"D"===n?F(ee,i):"F"===n?F(ne,i):"Z"===n?F(ne,Vo({},i,{showTime:!0})):F(oe,i))},Ct=function(e,n,o){return function(t){var r;return F(te,{reference:o,source:n,queryOptions:{meta:{etr:e}},record:(r={},r[n]=t.row[n],r)},F(yt,{source:"etiqueta"}))}},xt=function(e){var n=Vo({},e);return delete n.id,n},wt=function(e){var n=e.apiRef,o=e.source,t=e.enviarTodo;return L(function(e,r){var i=xt(e),a=n.current.getRowsCount()+1;n.current.updateRows([Vo({},i,{id:a})]);var l=t?Array.from(n.current.getRowModels().values(),function(e){return Vo({},e,{claveFila:"",estado:"N"})})||[]:r.getValues()[o]||[];t||l.push(Vo({},i,{claveFila:"",_id:a,estado:"N"})),r.setValue(o,l,{shouldDirty:!0})},[n,o])},kt=function(e){var n=e.apiRef,o=e.source,t=e.enviarTodo;return L(function(e,r,i){var a,l,s="number"==typeof e?"N":"M",u=xt(r);n.current.updateRows([Vo({},u,{id:e})]);var c=t?Array.from(n.current.getRowModels().values(),function(e){return Vo({},e,{estado:s})})||[]:i.getValues()[o]||[],d=c.findIndex(function(n){return"number"==typeof e?n._id===e:n.claveFila===e});c[d=-1===d?0:d]=Vo({},u,{claveFila:"N"===(null===(a=c[d])||void 0===a?void 0:a.estado)?"":e,_id:e,estado:"N"===(null===(l=c[d])||void 0===l?void 0:l.estado)?"N":"M"}),i.setValue(o,c,{shouldDirty:!0})},[n,o])},Tt=function(e){var n=e.apiRef,o=e.source,t=e.enviarTodo;return L(function(e,r){var i=n.current.getRowModels().get(e);n.current.updateRows([{id:e,_action:"delete"}]);var a=t?Array.from(n.current.getRowModels().values(),function(e){return Vo({},e,{estado:"B"})})||[]:r.getValues()[o]||[],l=a.findIndex(function(n){return n.claveFila===e});a[l=-1===l?a.length:l]=Vo({},i,{estado:"B",claveFila:e}),"number"==typeof e&&a.splice(l,1),r.setValue(o,a,{shouldDirty:!0})},[n,o])},St=function(e){var n=e.useFormulario()[e.source],o=Vo({},e,{enviarTodo:!(null==n||!n.enviarTodo)});return{addRow:wt(o),editRow:kt(o),deleteRow:Tt(o),clear:function(n){e.apiRef.current.setRows([]),n.setValue(e.source,"")},api:e.apiRef}},Rt=wn("div")(function(e){var n=e.theme;return{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%","& .ant-empty-img-1":{fill:"light"===n.palette.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===n.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===n.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===n.palette.mode?"#fff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===n.palette.mode?"0.8":"0.08",fill:"light"===n.palette.mode?"#f5f5f5":"#fff"}}}),Pt=function(){return F(Rt,null,F("svg",{width:"120",height:"100",viewBox:"0 0 184 152","aria-hidden":!0,focusable:"false"},F("g",{fill:"none",fillRule:"evenodd"},F("g",{transform:"translate(24 31.67)"},F("ellipse",{className:"ant-empty-img-5",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),F("path",{className:"ant-empty-img-1",d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),F("path",{className:"ant-empty-img-2",d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),F("path",{className:"ant-empty-img-3",d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})),F("path",{className:"ant-empty-img-3",d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),F("g",{className:"ant-empty-img-4",transform:"translate(149.65 15.383)"},F("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),F("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})))),F(l,{sx:{mt:1}},"No hay registros"))},Ft=["filterBy","claves","sortModel","columns","reference","allowAdd","allowRemove","enableLoad","apiRef"],Nt=wn(re,{name:"EtrDeleteButton",overridesResolver:function(e,n){return n.root}})(function(e){var n=e.theme;return{color:n.palette.primary.main,"&:hover":{backgroundColor:s(n.palette.primary.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}),Et={},_t=function(e){var n=Un();return F(ft.Provider,{value:{form:n}},e.children)},It=function(e){return F(Mn,{open:e.open,onClose:e.onClose,fullWidth:!0},F(Vn,null,e.labelEstado+" "+e.label),F(On,{component:"span"},F(ce,{mode:"onBlur",record:Et,resource:e.resource,onSubmit:e.onSubmit},F(_t,null,e.children))))};It.propTypes={label:Rn,onClick:Pn,icon:Fn,open:Nn,onClose:Pn,labelEstado:Rn,resource:Fn,save:Pn,render:Pn};var Lt=function(e){var n=e.form,o=e.resource,t=e.estado,r=e.editors,i=e.recordPadre,a=e.camposClaveFila,l=e.setOpen,s=e.open,u=Hn(),c=u.dirtyFields,m=u.isValid,f=I(mt).fichaProps,p=f[e.source],v=void 0===p?{}:p,g=f.etrs,h=I(ft),b=v.onAfterRenderAsistente,y=dt({resource:o,etrs:g,asisEtr:h});return B(function(){s&&"function"==typeof b&&b(Vo({},y,{form:n}))},[s]),F(M,null,F(Dn,null,F(d,{spacing:4},D.map(r,function(e,n){return O(e,Vo({resource:o,estado:t,defaultValue:i[e.props.source]||"",fullWidth:!0,sx:{margin:0},disabled:"N"!==t&&-1!==a.indexOf(e.props.source)},v[e.props.source]))}))),F(Bn,null,F(de,{disabled:0===Object.keys(c).length||!m}),F(re,{label:"ra.action.cancel",onClick:function(e){l(!1),e.stopPropagation()}},F(_n,null))))},Mt=function(e){var n=e.editors,o=e.record,t=e.camposClaveFila,r=e.label,i=e.source,a=e.enviarTodo,l=se(!1),s=l[0],u=l[1],c=K(e),d=Un(),m=zn(),f=wt({apiRef:m,source:i,enviarTodo:a}),p=j()("ra.action.create");return F(M,null,F(re,{onClick:function(e){u(!0),e.stopPropagation()}},F(En,null)),F(It,{open:s,onClose:function(e){u(!1),e.stopPropagation()},labelEstado:p,label:r,resource:c,onSubmit:function(e,n){f(e,d),u(!1)}},F(Lt,{source:i,form:d,resource:c,estado:"N",editors:n,recordPadre:o||{},camposClaveFila:t,open:s,setOpen:function(){u(!1)}})))},Bt=function(e){var n=e.editors,o=e.camposClaveFila,t=e.resource,r=e.label,i=e.source,a=e.row,l=e.enviarTodo,s=j(),u=se(!1),c=u[0],d=u[1],m=zn(),f=Un(),p=kt({apiRef:m,source:i,enviarTodo:l}),v=s("ra.action.edit");return F(M,null,F(re,{onClick:function(e){d(!0),e.stopPropagation()}},F(Ln,null)),F(It,{open:c,onClose:function(e){d(!1),e.stopPropagation()},labelEstado:v,label:r,resource:t,onSubmit:function(e,n){p(a.id,e,f),d(!1)}},F(Lt,{source:i,form:f,resource:t,estado:"M",editors:n,recordPadre:a,camposClaveFila:o,open:c,setOpen:function(){d(!1)}})))},Dt=function(e){var n=e.confirmTitle,o=void 0===n?"ra.message.delete_title":n,t=e.confirmContent,r=void 0===t?"ra.message.delete_content":t,i=e.row,a=e.source,l=e.enviarTodo,s=se(!1),u=s[0],c=s[1],d=zn(),m=Un(),f=Tt({apiRef:d,source:a,enviarTodo:l});return F(M,null,F(Nt,{key:"button",onClick:function(e){c(!0),e.stopPropagation()}},F(In,null)),F(ue,{isOpen:u,title:o,content:r,onConfirm:function(e){f(i.id,m)},onClose:function(e){c(!1),e.stopPropagation()}}))},Ot=u({},qn),Vt=function(e){var n=e.filterBy,o=void 0===n?"":n,t=e.claves,r=e.sortModel,i=e.columns,a=e.reference,l=e.allowAdd,s=void 0===l||l,u=e.allowRemove,d=void 0===u||u,m=e.enableLoad,f=void 0===m||m,p=e.apiRef,v=Ao(e,Ft),g=E([]),h=g[0],b=g[1],y=ie(e),C=Un(),x=ae(Vo({defaultValue:""},e)).field,w=I(mt),k=w.isLoading,T=(w.fichaProps[v.source]||{}).enviarTodo,S=void 0!==T&&T,R=E(r),P=R[0],N=R[1],L=r[0],B=L.field,D=L.sort,O={};y&&o.split(",").forEach(function(e){e&&(O[e]=[{type:"string",comparison:"eq",value:y[e],field:e}])});var V=le(a,{pagination:{page:1,perPage:200},sort:{field:B,order:D},filter:O},{enabled:f&&!k,onSuccess:function(e){setTimeout(function(){C.setValue(v.source,"")},1e3),b((null==e?void 0:e.data)||[])}}).isLoading,A=[].concat(i,[{field:" ",width:80,headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:function(e){if("group"!==e.rowNode.type)return F(Bt,Vo({},v,{enviarTodo:S,camposClaveFila:t,row:e.row}))}}]);s&&A.unshift({field:"BTN",headerName:"",sortable:!1,width:80,renderHeader:function(e){return F(Mt,Vo({},v,{enviarTodo:S,camposClaveFila:t}))}}),d&&A.push({field:" ",headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:function(e){if("group"!==e.rowNode.type)return F(Dt,Vo({},v,{enviarTodo:S,camposClaveFila:t,row:e.row}))}});var q=_(function(){return A},[JSON.stringify(A)]);return F(An,{sx:{width:"100%",height:"40vh",borderRadius:0,marginTop:1}},F(c,{injectFirst:!0},F(kn,{theme:Ot},F(M,null,F(jn,Vo({apiRef:p,loading:V||k,sx:{"& .MuiDataGrid-columnsContainer":{backgroundColor:function(e){return"light"===e.palette.mode?"#fafafa":"#1d1d1d"}},"& .MuiDataGrid-iconSeparator":{display:"none"}},disableRowSelectionOnClick:!0,paginationModel:{page:1,pageSize:50},hideFooter:!0,rows:h,columns:q,sortModel:P,onSortModelChange:function(e){return N(e)},sortable:!1,resizable:!1,disableReorder:!0,disableExport:!0,filterable:!1,disableColumnMenu:!0,slots:{noRowsOverlay:Pt}},v)),F("input",Vo({type:"hidden"},x))))))},At=["filterBy","sortModel","columns","reference","enableLoad","initialState"],qt=u({},qn),jt=function(e){var n=e.filterBy,o=void 0===n?"":n,t=e.sortModel,r=e.columns,i=e.reference,a=e.enableLoad,l=void 0===a||a,s=e.initialState,u=Ao(e,At),d=I(mt).isLoading,m=ie(),f=E(t),p=f[0],v=f[1],g=t[0],h=g.field,b=g.sort,y=_(function(){return[].concat(r)},[JSON.stringify(r)]),C={};m&&o.split(",").forEach(function(e){e&&(C[e]=[{type:"string",comparison:"eq",value:m[e],field:e}])});var x=I(mt),w=x.estado,k=x.isLoading,T=x.fichaProps,S=void 0===T?{}:T,R=dt(e),P=S[e.source],N=void 0===P?{}:P,L=N.useContenido,M=void 0===L?st:L,B=N.restInitialProps,D=le(i,{pagination:{page:1,perPage:200},sort:{field:h,order:b},filter:C},{enabled:l&&!d}),O=D.data,V=void 0===O?[]:O,A=D.isLoading,q=D.refetch,j=Wn(),z=Gn({apiRef:j,initialState:s});return M(Vo({},u,{estado:w,hidden:e.hidden,isLoading:k,utils:R},B,{refetch:q,apiRef:j})),F(An,{sx:{width:"100%",height:"40vh",borderRadius:0,marginTop:1}},F(c,{injectFirst:!0},F(kn,{theme:qt},F(jn,Vo({apiRef:j,rows:V,columns:y,loading:A||d,sx:{"& .MuiDataGrid-columnsContainer":{backgroundColor:function(e){return"light"===e.palette.mode?"#fafafa":"#1d1d1d"}},"& .MuiDataGrid-iconSeparator":{display:"none"}},disableRowSelectionOnClick:!0,paginationModel:{page:1,pageSize:50},hideFooter:!0,sortModel:p,onSortModelChange:function(e){return v(e)},slots:{noRowsOverlay:Pt},initialState:z},u)))))},zt=P(function(e,n){return F(Xn,Vo({direction:"up",ref:n},e))}),Wt=function(e){var n=e.isLoading,o=K(e),t=Uo(),r=t.open,i=t.hide,a=t.props,l=a.title,s=a.controles,u=a.aceptar,c=a.tipo,g=void 0===c?"form":c;return"confirm"===g?F(ue,{isOpen:r,title:"Atención",content:s,onConfirm:u,onClose:function(){return i()}}):F(m,{open:r,onClose:function(){return i()},fullWidth:!0,fullScreen:"vista"===g,maxWidth:"vista"===g?"lg":"sm",TransitionComponent:zt},"form"===g?F(M,null,F(f,{id:"draggable-dialog-title"},l),F(ce,{resource:o,onSubmit:u},F(p,{dividers:!0},F(d,{spacing:2},s)),F(v,null,F(re,{label:"ra.action.cancel",disabled:n,onClick:function(){return i()}},F(_n,null)),F(de,{disabled:n})))):F(M,null,F(Kn,{sx:{position:"relative"}},F(eo,{disableGutters:!0,variant:"dense"},F(no,{sx:{ml:2,flex:1},variant:"h6",component:"div"},l),F(re,{label:"ra.action.cancel",disabled:n,onClick:function(){return i()},color:"inherit"},F(_n,null)))),s))},Gt=["alignIcon","children","className","disabled","label","color","size","to"],Ut=["redirect","replace","state"],Ht=function(e){var n=e.children,o=e.className,t=e.disabled,r=e.label,i=e.color,a=void 0===i?"primary":i,l=e.to,s=Ao(e,Gt),u=j(),c=r?u(r,{_:r}):void 0,d=Jt(l);return r&&!t?F(g,{title:c},F(h,Vo({"aria-label":c,className:o,color:a,size:"medium"},s,d),n)):F(h,Vo({className:o,color:a,disabled:t,size:"medium"},s,d),n)};Ht.propTypes={alignIcon:Sn.oneOf(["left","right"]),children:Sn.element,className:Sn.string,color:Sn.oneOfType([Sn.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),Sn.string]),disabled:Sn.bool,label:Sn.string,size:Sn.oneOf(["small","medium","large"])};var Jt=function(e){if(null!=e){if("string"==typeof e)return{to:e};var n=e.redirect,o=e.replace,t=e.state;return{to:Ao(e,Ut),redirect:n,replace:o,state:t}}},Yt=["icon","label","scrollToTop"],Qt=function(e){return e.stopPropagation()},Zt={true:{_scrollToTop:!0},false:{}},$t=F(En,null),Kt=function(e){var n=e.icon,o=void 0===n?$t:n,t=e.label,r=void 0===t?"ra.action.create":t,i=e.scrollToTop,a=void 0===i||i,l=Ao(e,Yt),s=K(e),u=ie(e),c=me();return F(Ht,Vo({component:gn,to:c({type:"create",resource:s}),state:Vo({record:u},Zt[String(a)]),label:r,onClick:Qt},l),o)},Xt=["icon","label","scrollToTop"],er=function(e){return e.stopPropagation()},nr={true:{_scrollToTop:!0},false:{}},or=F(oo,null),tr=function(e){var n=e.icon,o=void 0===n?or:n,t=e.label,r=void 0===t?"ra.action.edit":t,i=e.scrollToTop,a=void 0===i||i,l=Ao(e,Xt),s=K(e),u=ie(e),c=me();return u?F(Ht,Vo({component:gn,to:c({type:"edit",resource:s,id:u.id}),state:nr[String(a)],label:r,onClick:er},l),o):null},rr=["icon","label","record","resource","scrollToTop"],ir=function(e){var n=e.icon,o=void 0===n?lr:n,t=e.label,r=void 0===t?"ra.action.show":t,i=e.scrollToTop,a=void 0===i||i,l=Ao(e,rr),s=K(e),u=ie(e),c=me();return u?F(Ht,Vo({component:gn,to:c({type:"show",resource:s,id:u.id}),state:ar[String(a)],label:r,onClick:sr},l),o):null},ar={true:{_scrollToTop:!0},false:{}},lr=F(to,null),sr=function(e){return e.stopPropagation()};ir.propTypes={icon:Sn.element,label:Sn.string,record:Sn.any,scrollToTop:Sn.bool};var ur=V(ir,function(e,n){return e.resource===n.resource&&(e.record&&n.record?e.record.id===n.record.id:e.record==n.record)&&e.label===n.label&&e.disabled===n.disabled}),cr=["actionButtons","bulkActionButtons","sx","columns","isRowEditable","primaryText","secondaryText","desktopSize","onRenderGrilla","onLoadGrilla","hasEdit","initialState","convertFilterModelToFilterValues","claveNuevo","mobileColumns","hasVerFicha"],dr=["handler"],mr=["key","handler","icon"],fr=function(e,n){return void 0===n||"function"==typeof n&&n(e)},pr=u({},qn),vr=new Map([["is","is"],["not","not"],["after","after"],["onOrAfter","onOrAfter"],["before","before"],["onOrBefore","onOrBefore"],["eq","="],["neq","!="],["gt",">"],["gte",">="],["lt","<"],["lte","<="],["contains","contains"],["equals","equals"],["sw","startsWith"],["ew","endsWith"],["isEmpty","isEmpty"],["isNotEmpty","isNotEmpty"],["isAnyOf","isAnyOf"]]),gr=new Map(Array.from(vr,function(e){return[e[1],e[0]]})),hr=function(e){return e.items.reduce(function(e,n){return void 0!==n.field&&n.operator&&(gr.has(n.operator)?e[n.field+"_"+gr.get(n.operator)]=n.value:e[n.field]=n.value),e},{})},br=function(e){var n=e.actionButtons,o=void 0===n?[]:n,t=e.bulkActionButtons,r=e.sx,i=e.columns,a=e.isRowEditable,s=e.hasEdit,u=e.initialState,c=e.convertFilterModelToFilterValues,d=void 0===c?hr:c,m=e.claveNuevo,f=e.hasVerFicha,p=void 0!==f&&f,v=Ao(e,cr),g=ut(e),h=j(),y=K(e),C=Y(),x=C.data,w=void 0===x?[]:x,k=C.isLoading,T=C.selectedIds,S=C.onSelect,R=C.displayedFilters,P=C.setFilters,N=Wn(),E=Gn({apiRef:N,initialState:Vo({},u,{pinnedColumns:{right:["actions"]}})}),_=i.map(function(e,n){return Vo({},e,{headerName:""!==e.headerName?h("resources."+y+".fields."+e.field,{_:e.headerName}):e.headerName})}),I=o.length>0||s?_.concat([{field:"actions",type:"actions",width:100,hideable:!1,getActions:function(e){var n,t=N.current.getRowNode(e.id),r=!fr(e.row,a);return e.row.id?[].concat(s?[p&&r?F(ur,{record:e.row}):F(tr,{record:e.row,disabled:r})]:p?[F(ur,{record:e.row})]:[],o.filter(function(e){return!!e}).map(function(n){var o=n.handler,t=Ao(n,dr);return F($n,Vo({showInMenu:!0,onClick:function(n){return"function"==typeof o&&o(Vo({},g,{record:e.row}),t.key)}},t))})):-1!==t.children[0].indexOf(m+"=")?[F(Kt,{record:m?(n={},n[m]=t.children[0].split(m+"=")[1].replaceAll("[","").trim().split("AND")[0].trim(),n):void 0})]:[]}}]):_,L=A(t);return F(M,null,F(Wt,{isLoading:k}),F(pe,{sx:r,className:ve.root},L?F(ge,{selectedIds:T},t):null,F(l,{sx:{height:"70vh",width:"100%"},className:ve.tableWrapper},F(b,{theme:pr},F(jn,Vo({sx:{display:"grid",gridTemplateRows:"70vh 1fr auto"},slots:{noRowsOverlay:Pt},columns:I,rows:w,apiRef:N,loading:k,hideFooterSelectedRowCount:!0,hideFooter:!0,disableMultipleRowSelection:!0,checkboxSelection:L,filterMode:"server",onFilterModelChange:function(e){P(d(e),R)},rowSelectionModel:T,onRowSelectionModelChange:function(e){k||(N.current.isRowSelected(e[0])?S([]):S(e))},isRowSelectable:function(e){return e.row.id},initialState:E},v))))))},yr=function(e){var n=e.sx,o=e.columns,t=e.actionButtons,r=void 0===t?[]:t,i=e.hasEdit,a=e.isRowEditable,s=e.primaryText,u=e.mobileColumns,c=void 0===u?"":u,d=s,m=ut(e),f=Y().isLoading;if(!s){var p=c?c.split(",").map(function(e){return o.find(function(n){return n.field===e})}):o;d=function(e){return F(y,{variant:"outlined",sx:{pt:2,pb:2,pl:2}},p.map(function(n){var o=n.field,t=n.headerName,r=n.valueGetter,i=n.type,a=void 0===i?"string":i,s=n.jsxMobile;return F(l,null,s?s(e,n):"boolean"===a?F(l,{component:"span",sx:{color:r({value:e[o]})?"green":"red"}},t):e[o])}),F(l,null,r.filter(function(e){return!!e}).map(function(n){var o=n.key,t=n.handler,r=n.icon,i=void 0===r?F(Zn,null):r,a=Ao(n,mr);return F(re,Vo({onClick:function(n){return"function"==typeof t&&t(Vo({},m,{record:e}),o)}},a),i)})))}}return F(M,null,F(Wt,{isLoading:f}),F(he,{linkType:function(e){return!(!i||!fr(e,a))&&"edit"},primaryText:d,sx:n}))},Cr=function(e){var n=i(function(e){return e.breakpoints.down("md")}),o=fe(e).hasEdit;!function(e){var n=e.onRenderGrilla,o=e.onLoadGrilla,t=Y().isLoading,r=ut(e);B(function(){n&&n(r)},[]),B(function(){t||o&&o(r)},[t])}(e);var t=e.desktopSize;return F(Go,null,F(n&&!1===(void 0!==t&&t)?yr:br,Vo({},e,{hasEdit:o})))},xr=["ids"],wr=["filterValues","setFilters","tabs","GridComponent"],kr=function(e){var n=e.filterValues,o=e.setFilters,t=e.tabs,r=t.ids,i=Ao(t,xr),a=e.GridComponent,l=void 0===a?Cr:a,s=Ao(e,wr),u=n.id;return F(M,null,F(ao,{value:u,indicatorColor:"primary",onChange:function(e,t){o(Vo({},n,{id:t}))}},r.map(function(e){return F(io,{key:e,label:e.charAt(0).toUpperCase()+e.slice(1),value:e})})),F(ro,null),F(l,Vo({},s,i[u])))},Tr=["useFormulario"],Sr=function(e){var n=e.useFormulario,o=void 0===n?st:n,t=Ao(e,Tr);return{fichaProps:Vo({},o(t),{etrs:t.etrs})}},Rr=function(e,n){return be(e,{id:"-1"},n)},Pr=["className","record","hasEdit","hasShow","hasList","resource","totalPages","showFilter","setSort","setPerPage","perPage","defaultTitle","setPage","setFilters","selectedIds","onUnselectItems","onToggleItem","isLoading","exporter","hideFilter","hasCreate","filterValues","displayedFilters","sort"],Fr=["children","className","data","hasShow","hasList"],Nr=function(e){return e.split("_")[1]},Er=/^\d{2}\/\d{2}\/\d{4}$/,_r=function(e){if(!(e instanceof Date)||isNaN(e.getDate()))return"";var n=e.getFullYear().toString(),o=(e.getMonth()+1).toString(),t=e.getDate().toString();return n+"-"+("00"+o).slice(-2)+"-"+("00"+t).slice(-2)},Ir=function(e){if(null==e||""===e)return"";if(e instanceof Date)return _r(e);if(Er.test(e)){var n=e.split("/");return n[2]+"-"+n[1]+"-"+n[0]}return _r(new Date(e))},Lr=function(e){if(!e)return"";var n=e.split("-");return n[2]+"/"+n[1]+"/"+n[0]},Mr=/^\d{2}\/\d{2}\/\d{4}\s\d{2}:\d{2}$/,Br=function(e){if(null==e||""===e)return"";if(e instanceof Date)return _r(e);if(Mr.test(e)){var n=e.split(" "),o=n[0].split("/");return o[2]+"-"+o[1]+"-"+o[0]+" "+n[1]}return _r(new Date(e))},Dr=function(e){if(!e)return"";var n=e.split("T"),o=n[0].split("-");return o[2]+"/"+o[1]+"/"+o[0]+" "+n[1]},Or=function(e){if(!e)return"";if(e instanceof Date)return e.toString();if(-1!==e.indexOf(":")){var n=e.split(":"),o=new Date;return o.setHours(n[0]),o.setMinutes(n[1]),o.toString()}var t=/(\d{2}):(\d{2})/.exec(e);if(null!==t){var r=new Date;return r.setHours(t[0]),r.setMinutes(t[1]),r.toString()}},Vr=function(e,n){return e?e.split(" ")[4].substring(0,5):""},Ar=function(e){var n=e.source;return!(Yn(function(e){var o=e.configInputs?e.configInputs.filter(function(e){return e.id===n}):[];return o[0]?o[0]:null})||{}).hidden&&F(no,{variant:"h6",gutterBottom:!0,id:e.source},e.children)},qr=function(e){var n=e.children,o=e.className,t=e.data,r=e.hasShow,i=e.hasList,a=void 0===i||i,l=Ao(e,Fr);return F(ye,Vo({className:o},Ao(l,Pr)),n,a&&F(Ce,{label:"ra.action.back",icon:F(lo,null)}),r&&F(xe,{record:t}))},jr=we(),zr=[jr,ke(1)],Wr={inputFormat:"dd/MM/yyyy"},Gr=function(e){return function(n,o){var t=o[e];if(n&&t){var r=new Date(t.split("/").reverse().join("/")),i=new Date(n.split("/").reverse().join("/"));if(so(r,i))return{message:"validation.greater_or_equal",args:{menor:t}}}}},Ur=function(e){return void 0===e&&(e="es"),{locale:"en"===e?uo:co}},Hr=[{id:"1",name:"Aprobado"},{id:"2",name:"Rechazado"},{id:"3",name:"Pendiente"}],Jr=function(e,n){var o=document.createElement("a");o.style.display="none",document.body.appendChild(o),o.setAttribute("href",e),o.setAttribute("download",n),o.click()},Yr=function(e){if(!e)return"";var n=e.split("/").map(Number);return new Date(n[2],n[1]-1,n[0])},Qr=function(e){if(!e)return"";var n=e.split(" "),o=n[1],t=n[0].split("/").map(Number),r=t[0],i=t[1],a=t[2],l=o.split(":").map(Number);return new Date(a,i-1,r,l[0],l[1])},Zr=function(e){return e?String(e.getDate()).padStart(2,"0")+"/"+String(e.getMonth()+1).padStart(2,"0")+"/"+String(e.getFullYear()):""},$r=function(e){return e.toLocaleString("es",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).replace(",","")},Kr=function(e,n){var o=K(),t=be("cb_"+Nr(o)+"_"+e,{id:n}),r=t.data;return t.isLoading||t.error?"":(null==r?void 0:r.etiqueta)||""},Xr={form:"FormEtriek-form",tab:"FormEtriek-tab",contenido:"FormEtriek-contenido"},ei=function(e){var n,o;return(o={})["& ."+Xr.form]={maxHeight:"70vh",overflow:"auto"},o["& ."+Xr.tab]={display:"block",maxHeight:"65vh",overflow:"auto"},o["& ."+Xr.contenido]=((n={})[e.breakpoints.up("xs")]={width:"100%"},n[e.breakpoints.up("md")]={width:"12vw","&.MuiAutocomplete-root":{width:"16vw"}},n),o},ni=function(){},oi=function(e){var n=I(mt).fichaProps.onBeforeSubmitFicha,o=ct(e),t=Q(),r=Te().save,i=L(function(e){try{var i=function(n){return"string"==typeof n?void t(n,{type:"error"}):void 0===n||n?r(e):void 0};return Promise.resolve(n?Promise.resolve(n(Vo({form:{getValues:function(){return e}}},o),"N")).then(i):i(n))}catch(e){return Promise.reject(e)}},[n,t,ni,r]);return"function"==typeof n?i:void 0},ti=["useFormulario","enableLoad"],ri=function(e){var n=e.enableLoad,o=void 0===n||n,t=Ao(e,ti),r=K(e),i=Rr(r,{enabled:o}),a=i.data,l=i.isLoading,s=Sr(e).fichaProps,u=_(function(){return{estado:"N",initialValues:a,isLoading:l,fichaProps:s}},[a,l,s]);return F(Jo,null,F(mt.Provider,{value:u},F(Se,Vo({redirect:"list"},t,null==s?void 0:s.panel))))};ri.propTypes={useFormulario:Sn.func};var ii=wn(ri,{name:"FormEtriek",overridesResolver:function(e,n){return n.root}})(function(e){return ei(e.theme)});function ai(e){var n,o,t="";if("string"==typeof e||"number"==typeof e)t+=e;else if("object"==typeof e)if(Array.isArray(e))for(n=0;n<e.length;n++)e[n]&&(o=ai(e[n]))&&(t&&(t+=" "),t+=o);else for(n in e)e[n]&&(t&&(t+=" "),t+=n);return t}function li(){for(var e,n,o=0,t="";o<arguments.length;)(e=arguments[o++])&&(n=ai(e))&&(t&&(t+=" "),t+=n);return t}var si=["classes","filterValues","handleSubmit","invalid","label","pristine","resource","saving","selectedIds","redirect"],ui=["resource","redirect","className","icon","label"],ci=function(e){var n=j(),o=e.resource,t=e.className,r=e.icon,i=e.label,a=void 0===i?"ra.action.delete":i,l=Ao(e,ui),s=ie(),u=Re(o,{id:s.id}),c=u[0],d=u[1].isLoading;return F(fo,{title:n("ra.action.delete")},F(mo,Vo({disabled:d,onClick:function(){return c()},label:a,className:li("ra-delete-button",t),key:"button"},Ao(l,si),{size:"large"}),r))};ci.defaultProps={redirect:"list",icon:F(In,null)};var di=["useFormulario","mutationMode"],mi=function(e){var n={};for(var o in e)"string"==typeof e[o]&&0===e[o].trim().length||(null==e[o]&&(e[o]=""),n[o]=e[o]);return n},fi=wn(function(e){var n=e.mutationMode,o=void 0===n?"pessimistic":n,t=Ao(e,di),r=Pe(Vo({mutationMode:o},t)),i=r.record,a=r.isLoading,l=Sr(e).fichaProps,s=_(function(){return{estado:"M",initialValues:i,isLoading:a,fichaProps:l}},[i,a,l]);return F(Jo,null,F(mt.Provider,{value:s},F(Fe,Vo({mutationMode:o,transform:mi},t,null==l?void 0:l.panel))))},{name:"FormEtriek",overridesResolver:function(e,n){return n.root}})(function(e){return ei(e.theme)}),pi=P(function(e,n){var o=e.isOpen,t=e.onSubmit,r=e.onClose,i=e.title,a=e.dialogText,l=e.children,s=e.hasAccept,u=void 0===s||s,c=e.hasCancel,d=void 0===c||c,m=e.isLoading,f=void 0!==m&&m,p=K(e),v=function(e){r&&r(e)};return F(Mn,{ref:n,open:o,fullWidth:!0,onClose:v,"aria-labelledby":"form-dialog-title"},F(Vn,{id:"form-dialog-title"},i),F(ce,{resource:p,onSubmit:t},F(Dn,{dividers:!0},F(On,null,a),F(po,{sx:{mt:2}},l)),(u||d)&&F(Bn,null,d&&F(re,{label:"ra.action.cancel",disabled:f,onClick:function(e){return v(e)}},F(_n,null)),u&&F(de,{alwaysEnable:!0,label:"Ok",disabled:f}))))}),vi={},gi={pointerEvents:"none",backgroundColor:"#ffffff",opacity:.6,position:"relative"},hi=function(e){var n=Yo(),o=K(e),t=I(mt),r=t.estado,i=t.isLoading,a=t.initialValues,l=t.fichaProps,s=dt({resource:o,etrs:l.etrs});return B(function(){l.onRenderFicha&&l.onRenderFicha(s,r)},[]),B(function(){i||l.onLoadFicha&&l.onLoadFicha(s,r,a)},[i]),F(C,{sx:Vo({},e.sx,n.open?gi:vi)},n.open&&F(x,{sx:{position:"absolute",left:"50%",top:"50%"},thickness:4,size:50}),e.children)},bi=function(e){var n=I(mt),o=n.initialValues,t=n.fichaProps.config,r=void 0===t?{}:t,i=oi(e);return o?F(Ne,Vo({mode:"onBlur"},e,{onSubmit:i,defaultValues:o,component:hi},r)):null};bi.propTypes=Vo({},Ne.propTypes);var yi=function(e){var n=e.handleToggle,r=e.isOpen,i=e.name,l=e.icon,s=e.children,u=e.dense,c=j(),d=Ee()[0],m=F(o,{dense:u,onClick:n},F(t,{sx:{minWidth:5}},r?F(vo,null):l),F(a,{variant:"inherit",color:"textSecondary"},c(i)));return F("div",null,d||r?m:F(g,{title:c(i),placement:"right"},m),F(w,{in:r,timeout:"auto",unmountOnExit:!0},F(k,{dense:u,component:"div",disablePadding:!0,sx:{paddingLeft:(e.children.props.children[0]?e.children.props.children[0].key:"").startsWith("menu")?2:0,backgroundColor:function(e){return Tn(e.palette.secondary.light,.24)},"& a":{transition:"padding-left 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",paddingLeft:d?4:2}}},s)))},Ci=["items","translate"],xi=function(e){var n=e.dense,o=void 0!==n&&n,t=j(),r=E({mnuPrueba:!1}),a=r[0],s=r[1],u=i(function(e){return e.breakpoints.down("sm")}),c=Ee()[0],d=function e(n){var o=n.items,t=n.translate,r=Ao(n,Ci),i=r.state,a=r.handleToggle,l=r.dense;return o&&F("div",null,o.map(function(n){var o=n.name,s=n.menu,u=n.label;return s?F(yi,{key:o,name:u,handleToggle:function(){return a(o)},isOpen:i[o],icon:F(Zn,null),dense:l},e(Vo({items:s,translate:t},r))):F(_e,{key:o,to:"/"+o,primaryText:t("resources."+o+".name",{_:u}),dense:l,leftIcon:F(Zn,null)})}))}({items:JSON.parse(localStorage.getItem("menus")),handleToggle:function(e){s(function(n){var o;return Vo({},n,((o={})[e]=!n[e],o))})},state:a,activeClassName:"",iconClass:"",className:"",open:c,dense:o,translate:t});return F(l,{sx:{width:c?230:50,marginTop:1,marginBottom:1,transition:function(e){return e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen})}}},F(Ie,null,F(Le,{primaryText:t("ra.page.dashboard")}),d,u&&F(_e,{to:"/configuration",primaryText:t("pos.configuration"),leftIcon:F(Zn,null),dense:o})))},wi=function(e){return F(Me,Vo({},e,{appBar:zo,menu:xi}))},ki=["className","filters","hasCreate","children","hideFilterButton","jsBotonGrilla"],Ti=function(e,n){alert("Falta implementar la función jsBotonGrilla")},Si=function(e){var n=e.className,o=e.filters,t=e.children,r=e.hideFilterButton,i=void 0!==r&&r,a=e.jsBotonGrilla,l=void 0===a?Ti:a,s=Ao(e,ki),u=Y(e),c=u.sort,d=u.displayedFilters,m=u.filterValues,f=u.exporter,p=u.showFilter,v=u.total,g=K(e),h=fe(e).hasCreate,b=I(Be)||o,y=Y(e),C=Vo({},ut(e),y);return delete s.hasCreate,_(function(){return F(ye,Vo({className:n},De(s)),i?null:o?O(o,{resource:g,showFilter:p,displayedFilters:d,filterValues:m,context:"button"}):b&&F(Oe,null),h&&F(Ve,null),!1!==f&&F(Ae,{disabled:0===v,resource:g,sort:c,filterValues:m}),D.map(t,function(e,n){return O(e,{onClick:e.props.options?null:function(n){e.props.onClick&&e.props.onClick(n),l(C,e.key)},options:e.props.options?e.props.options.map(function(n){return Vo({},n,{onClick:function(o){e.props.onClick&&e.props.onClick(o),l(C,n.key)}})}):null})}))},[g,d,m,o,p,b,v,n,c,i,f,h])},Ri=function(n){var o=n.loginBackgroundImage,t=n.nameSource,r=void 0===t?"username":t,i=n.passwordSource,a=void 0===i?"password":i,s=E(!1),u=s[0],c=s[1],d=j(),m=d("ra.auth.sign_in"),f=Q(),p=qe(),v=hn();return F(ce,{onSubmit:function(e){c(!0),p(e,v.state?v.state.nextPathname:"/").catch(function(e){c(!1),f("string"==typeof e?e:void 0!==e&&e.message?e.message:"ra.auth.sign_in_error",{type:"error",messageArgs:{_:"string"==typeof e?e:e&&e.message?e.message:void 0}})})},validate:function(e){var n={};return e[r]||(n[r]=d("ra.validation.required")),e[a]||(n[a]=d("ra.validation.required")),n}},F(l,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",alignItems:"center",justifyContent:"flex-start",backgroundImage:o,backgroundRepeat:"no-repeat",backgroundSize:"cover"}},F(bo,{sx:{minWidth:300,marginTop:"6em"}},F(l,{sx:{margin:"1em",display:"flex",justifyContent:"center"}},F(go,{sx:{backgroundColor:"secondary.main"}},F(e,null))),F(l,{sx:{marginTop:"1em",marginBottom:"1em",display:"flex",justifyContent:"center",color:"grey.600"}},"Inicio de Sesión"),F(l,{sx:{padding:"0 1em 1em 1em"}},F(l,{sx:{marginTop:0}},F(je,{autoFocus:!0,fullWidth:!0,name:r,label:d("ra.auth.username"),disabled:u})),F(l,{sx:{marginTop:0}},F(ze,{name:a,label:d("ra.auth.password"),type:"password",disabled:u}))),F(yo,{sx:{padding:"0 1em 1em 1em"}},F(ho,{variant:"contained",type:"submit",color:"primary",disabled:u,fullWidth:!0},u&&F(Co,{sx:{position:"absolute"},size:18,thickness:2}),m)))))},Pi=["displayedFilters","filterValues","showFilter"],Fi=["className","options","icon","label","disabled"],Ni=function(e){var n,o=e.options,t=void 0===o?[]:o,r=e.icon,i=e.label,a=e.disabled,s=Ao(e,Fi),u=E(!1),c=u[0],d=u[1],m=q(),f=E(0),p=f[0],v=f[1],g=K(e);return F(l,Vo({sx:{display:"inline-block"}},Ao(s,Pi)),F(re,{size:"large",className:"add-filter",label:i,onClick:function(e){e.preventDefault(),d(!0),m.current=e.currentTarget},title:t[p].label,disabled:a},(null===(n=t[p])||void 0===n?void 0:n.icon)||r),F(xo,{open:c,anchorEl:m.current,onClose:function(e){m.current&&m.current.contains(e.target)||d(!1)}},t.map(function(e,n){return F(wo,{key:e.label,disabled:e.disabled,selected:n===p,onClick:function(o){!function(e,n){v(n),d(!1)}(0,n),e.onClick&&e.onClick(o,n)},resource:g,title:e.label},e.icon,F(l,{component:"span",sx:{paddingRight:"4px"}}),F(We,{label:e.label,resource:g}))})))},Ei=["fields","className","textAlign","sortable"],_i=function(e){var n=e.fields,o=e.className,t=Ao(e,Ei),r=n.campos,i=n.separador,a=void 0===i?"":i,l=n.secundario,s=void 0===l?[]:l,u=n.hasSecundario,c=ie(),d=r.map(function(e){return void 0!==c[e]?c[e]:e}).join(""+a);return F(no,Vo({noWrap:!0,variant:"inherit",className:o},t),d,u&&F(no,{component:"span",display:"block",color:"textSecondary",variant:"caption"},s.map(function(e){return(e.etiqueta||"---")+": "+(c[e.campo]||"---")}).join(" ")))},Ii=["useFormulario"],Li=wn(function(e){var n=Ao(e,Ii),o=Ge(n),t=o.record,r=o.isLoading,i=Sr(e).fichaProps,a=_(function(){return{estado:"M",initialValues:t,isLoading:r,fichaProps:i}},[t,r,i]);return F(Jo,null,F(mt.Provider,{value:a},F(Ue,Vo({},n,o,null==i?void 0:i.panel))))},{name:"FormEtriek",overridesResolver:function(e,n){return n.root}})(function(e){return ei(e.theme)}),Mi=["children","className","component","formRootPathname","syncWithLocation","tabs","toolbar","onChange"],Bi=["record","resource"],Di=["onChange"],Oi=["criteriaMode","defaultValues","delayError","formRootPathname","mode","noValidate","onSubmit","record","resolver","reValidateMode","sanitizeEmptyValues","shouldFocusError","shouldUnregister","shouldUseNativeValidation","validate","warnWhenUnsavedChanges"],Vi=function(e){var n=e.children,o=e.className,t=e.component,r=void 0===t?qi:t,i=e.formRootPathname,a=e.syncWithLocation,l=void 0===a||a,s=e.tabs,u=void 0===s?Ai:s,c=e.toolbar,d=void 0===c?ji:c,m=e.onChange,f=Ao(e,Mi),p=hn(),v=yn(""),g=K(e),h=E(0),b=h[0],y=h[1],C=I(mt),x=dt(Vo({},e,{etrs:C.fichaProps.etrs})),w=I(mt).estado,k=function(e,n){l||(y(n),m&&m(x,w,{newTab:n,prevTab:b,setTab:y},e))},S=function(){return O(u,{onChange:k,syncWithLocation:l,url:i,value:b},n)};return F(zi,Vo({className:li("tabbed-form",o)},Wi(f)),l?F(Cn,null,F(xn,{path:"/*",element:S()})):S(),F(T,null),F(r,null,D.map(n,function(e,n){if(!e)return null;var o=Je(e,n),t=l?!bn(v.pathname+"/"+o,p.pathname):b!==n;return A(e)?O(e,{intent:"content",resource:g,hidden:t,value:l?o:n}):null})),!1!==d?d:null)},Ai=F(Ye,null),qi=function(e){return F(C,null,e.children)},ji=F(Qe,null),zi=wn("div",{name:"RaTabbedForm",overridesResolver:function(e,n){return n.root}})(function(e){var n;return(n={})["& .MuiTab-root.RaTabbedForm-errorTabButton"]={color:e.theme.palette.error.main},n}),Wi=function(e){return Ao(e,Bi)},Gi=function(e){var n,o,t,r=Ao(e,Di),i=(n=hn(),o=bn(":resource/create/*",n.pathname),t=bn(":resource/:id/*",n.pathname),o?o.pathnameBase:t?t.pathnameBase:"");return F(ce,Vo({formRootPathname:i},r),F(Vi,Vo({formRootPathname:i},Ui(e))))};Gi.Tab=He;var Ui=function(e){return Ao(e,Oi)},Hi=function(e){var n=I(mt),o=n.initialValues,t=n.fichaProps.config,r=void 0===t?{}:t,i=oi(e);return o?F(Gi,Vo({mode:"onBlur"},e,{onSubmit:i,defaultValues:o,component:hi},r)):null};Hi.defaultProps={syncWithLocation:!1};var Ji=Vo({},Ze,{palette:Vo({},Ze.palette,{mode:"dark"}),components:Vo({},Ze.components,{MuiTextField:{defaultProps:{variant:"outlined"}},MuiFormControl:{defaultProps:{variant:"outlined"}},RaSidebar:{root:{drawerPaper:{position:"sticky"}}},RaRichTextInput:{root:{"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}}}})}),Yi={__proto__:null,lightTheme:Vo({},Ze,{palette:Vo({},Ze.palette,{mode:"light"}),components:Vo({},Ze.components,{MuiTextField:{defaultProps:{variant:"outlined"}},MuiFormControl:{defaultProps:{variant:"outlined"}},RaSidebar:{root:{drawerPaper:{position:"sticky"}}},RaRichTextInput:{root:{"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}}}})}),darkTheme:Ji};ko.ra.page.empty="No records yet";var Qi=Vo({},ko,{from_camera:"From camera",take_foto:"Take photo",login:{id:"ID",hint:"Login",required:"Insert Username or ID",send:"Send",email:"Enter your email address",check_email:"Check your email inbox, we just send you a verification code!",must_enter_credentials:"You must first enter Username or ID",restore_password:"Restore Password",punch_in:"Punch In"},pos:{search:"Search",change_pin:"Change Pin",change_password:"Change Password",configuration:"Configuration",language:"Language",theme:{name:"Theme",light:"Light",dark:"Dark"},dashboard:{welcome:{title:"Welcome",subtitle:"Employee Management",aor_button:"Metiri WebSite"}}},validation:{greater_or_equal:"Must be greater than or equal to %{menor}"}});To.ra.notification.created="Datos guardados correctamente",To.ra.action.bulk_actions="1 seleccionado |||| %{smart_count} seleccionados",To.ra.page.dashboard="Inicio",To.ra.page.empty="Sin registros todavía",To.ra.page.invite="¿Quiere agregar uno?",To.ra.page.list="%{name}",To.ra.page.edit="Editar %{name}",To.ra.action.back="Volver",To.ra.message.delete_title="Eliminar",To.ra.input.file.upload_single="Seleccione o arrastre archivo",To.ra.input.image.upload_single="Seleccione o arrastre imagen";var Zi=Vo({},To,{from_camera:"Desde camara",take_foto:"Tomar foto",login:{id:"Cédula",hint:"Inicio de Sesión",required:"Ingrese Usuario o Cédula",email:"Ingrese su email aquí",send:"Enviar",check_email:"Revisa tu correo electrónico, te enviaremos un código de verificación!",must_enter_credentials:"Debe ingresar Nº de Usuario o Cédula y Contraseña primero",restore_password:"Restablecer Contraseña",punch_in:"Generar Marcas"},pos:{search:"Búsqueda",change_pin:"Cambiar Pin",change_password:"Cambiar Contraseña",configuration:"Configuración",language:"Lenguaje",theme:{name:"Tema Visual",light:"Light",dark:"Dark"},dashboard:{welcome:{title:"Bienvenid@",subtitle:"Gestión de Funcionarios",aor_button:"Sitio de Metiri"}}},validation:{greater_or_equal:"Debe ser mayor o igual a %{menor}"}}),$i=function(e){var n=ht(e),o=n.propsContenido,t=n.hidden,r=ie(),i=JSON.parse(JSON.stringify(r)),a=i[e.source];return i[e.source]=""!=a&&"0"!=a,!t&&F($e,Vo({},o,{record:i}))};"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var Ki=function(e){var n=E(!1),o=n[0],t=n[1],r=E(!1),i=r[0],a=r[1],s=Q(),u=j(),c=e.field,d=e.sx;return B(function(){o&&function(){try{var e=null,n=function(n,o){try{var t=Promise.resolve(navigator.mediaDevices.getUserMedia({video:!0,audio:!1})).then(function(n){e=n,document.getElementById("video").srcObject=e})}catch(e){return o(e)}return t&&t.then?t.then(void 0,o):t}(0,function(e){s(e.message,{type:"error"}),t(!1)});Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}()},[o]),R.createElement(M,null,R.createElement(ue,{isOpen:o,loading:!o,maxWidth:"sm",title:"",content:R.createElement(l,{display:"flex",flexDirection:"column"},R.createElement(S,{variant:"outlined",disableElevation:!0,onClick:function(){var e=document.getElementById("video"),n=document.getElementById("canvas");n.getContext("2d").drawImage(e,0,0,n.width,n.height),a(!0)},startIcon:R.createElement(No,null)},u("take_foto")),R.createElement("video",{id:"video",width:"320",height:"240",autoPlay:!0,style:{border:"solid 1px"}}),R.createElement("div",{id:"dataurl-container",style:{border:"dotted 1px",width:320,height:240,marginTop:4}},R.createElement("canvas",{id:"canvas",width:"320",height:"240"}))),onConfirm:function(e){i&&document.getElementById("canvas").toBlob(function(e){var n=document.getElementById("video"),o=document.getElementById(c),r=new DataTransfer,i=new File([e],c+"-img.jpg",{type:"image/jpeg",lastModified:(new Date).getTime()});r.items.add(i),o.files=r.files,o.dispatchEvent(new Event("change",{bubbles:!0})),n.srcObject.getTracks().forEach(function(e){return e.stop()}),a(!1),t(!1)},"image/jpeg")},onClose:function(){a(!1),t(!1)}}),R.createElement(fo,{title:u("from_camera")},R.createElement(S,{sx:d,onClick:function(){t(!0)}},R.createElement(Eo,null))))},Xi=["onFocus","onChange","onBlur","hidden","disabled","validate"],ea=["onFocus","onBlur","onChange","hidden","disabled","useContenido","validate"],na=["hidden","disabled","onFocus","onChange","onBlur","validate"],oa=function(e){var n=e.source,o=I(mt),t=o.estado,r=o.isLoading,i=o.fichaProps,a=void 0===i?{}:i,l=I(ft),s=void 0!==l,u=Yn(function(e){var o=e.configInputs?e.configInputs.filter(function(e){return e.id===n}):[];return o[0]?o[0]:null})||{},c=u.disabled,d=u.hidden,m=u.error,f=!0===u.required?jr:void 0,p="function"==typeof m?m:function(){return m},v=a[n],g=void 0===v?{}:v,h=a.etrs,b=e.onFocus,y=e.onChange,C=e.onBlur,x=e.hidden,w=void 0!==x&&x,k=e.disabled,T=void 0!==k&&k,S=e.validate,R=Ao(e,Xi),P=ae(e).field,F=g.onFocus,N=g.onBlur,E=g.onChange,_=g.hidden,L=g.disabled,M=g.useContenido,B=void 0===M?st:M,D=g.validate,O=Ao(g,ea),V=s||void 0===_?w:_,A=s||void 0===L?T:L,j=s||void 0===F?b:F,z=s||void 0===N?C:N,W=s||void 0===E?y:E,G=dt(Vo({},e,{etrs:h,asisEtr:l})),U=B(Vo({},R,{estado:t,hidden:V,isLoading:r,utils:G},O)),H=q(P.value);if(void 0===U)throw new Error("useContenido está devolviendo undefined para el contenido "+n+"\n Asegúrese de incluir una instrucción return al final de la función");var J=U.hidden,Y=U.disabled,Q=U.onFocus,Z=U.onChange,$=U.onBlur,K=U.validate,X=Ao(U,na),ee=Q||j,ne=$||z,oe=Z||W,te=Vo({},G,{prev:H.current}),re=Array.isArray(S)?S:[S],ie=Array.isArray(D)?D:[D],le=Array.isArray(K)?K:[K];return{propsContenido:Vo({sx:{mt:1,mb:1,ml:{xs:0,md:1},mr:{xs:0,md:1}},onFocus:function(e){ee&&j(G,t,e),H.current=e.target.value},onBlur:function(e){return ne&&ne(te,t,e)},onChange:function(e){return oe&&oe(te,t,e)},helperText:!1,validate:[].concat(re,ie,le,[f,p]).filter(function(e){return void 0!==e})},R,O,X,{disabled:void 0!==c?c:void 0!==Y?Y:A}),hidden:void 0!==d?d:void 0!==J?J:V}},ta=["options","disabled","tipo","camera","prefix","accept","download"],ra=function(e,n){return e&&""!==e?"string"==typeof e?{src:n+"/"+e}:e instanceof Array?e.map(function(e){return{src:n+"/"+e}}):e:void 0},ia=function(e){var n,o,t=oa(e),r=t.propsContenido,a=t.hidden,l=j(),s=ie(e),u=i(function(e){return e.breakpoints.down("sm")}),c=Un().getValues,d=r.options,m=void 0===d?{}:d,f=r.disabled,p=void 0!==f&&f,v=r.tipo,g=void 0===v?"file":v,h=r.camera,b=void 0===h||h,y=r.prefix,C=r.accept,x=void 0===C?"":C,w=Ao(r,ta),k=null===(n=c()[w.source])||void 0===n?void 0:n.src,T=null!=(o=null!=k?k:s?y+"/"+s[w.source]:void 0)?o:"#";return!a&&("image"===g?F(So,{direction:"row",alignItems:"flex-start",justifyContent:"flex-start",divider:F(ro,{orientation:"vertical",variant:"middle",flexItem:!0})},F(Ke,Vo({maxSize:5e6},w,{options:Vo({disabled:p},m),format:function(e){return ra(e,y)},placeholder:l("ra.input.image.upload_single"),accept:"image/*",inputProps:{capture:"user"}}),F(Xe,{source:"src",title:""})),!u&&F(Ki,{sx:{mt:3},field:w.source})):F(So,{direction:"row",alignItems:"flex-start",justifyContent:"flex-start",divider:F(ro,{orientation:"vertical",variant:"middle",flexItem:!0})},F(en,Vo({maxSize:5e6},w,{options:Vo({disabled:p},m),format:function(e){return ra(e,y)},placeholder:l("ra.input.file.upload_single"),accept:x}),F(po,{sx:{display:"inline-block",ml:1}},F(mo,{component:Fo,href:T,target:"_blank",size:"small",title:"Ver adjunto"},F(Ro,{color:"primary"})),F(mo,{sx:{ml:1},component:Fo,href:T,download:!0,target:"_blank",size:"small",title:"Descargar adjunto"},F(Po,{color:"success"})))),b&&F(Ki,{sx:{mt:3},field:w.source})))},aa=["sx"],la=function(e){var n=oa(e),o=n.propsContenido,t=o.sx,r=Ao(o,aa);return!n.hidden&&F(nn,Vo({},r,{sx:Vo({},t,{display:"inline-flex",margin:1})}))},sa=["callback","sx","isTC","onChange"],ua=["queryOptions"],ca=["callback"],da=P(function(e,n){return F(g,Vo({ref:n},e))}),ma=function(e){var n,o=e.callback,t=e.sx,r=e.isTC,i=e.onChange,a=Ao(e,sa),s=tn(),u=s.isLoading,c=s.allChoices,d=s.availableChoices,m=q(null);return B(function(){u||"function"==typeof o&&o(Object.values([c]))},[c,o,u]),F(da,{title:(null===(n=m.current)||void 0===n?void 0:n.value)||"",placement:"top",arrow:!0},F(l,{component:"span",sx:Vo(r?{margin:1}:{display:{xs:"inherit",md:"inline-flex"},margin:1},t),width:r?{}:{xs:"100%",md:"auto"}},F(rn,Vo({size:"small",sx:r?{width:"100% !important"}:{}},a,{onChange:function(e){var n;i({target:{value:e},label:null===(n=d.filter(function(n){return n.id===e})[0])||void 0===n?void 0:n.etiqueta})},TextFieldProps:{inputRef:m}}))))},fa=function(e){var n,o,t=oa(e),r=t.propsContenido,i=t.hidden,a=Jn(),l=r.queryOptions,s=Ao(r,ua),u=e.source,c=e.reference,d=Yn(function(e){var n=e.reload_cb?e.reload_cb.filter(function(e){return e.id===u}):[];return n[0]?n[0]:null}),m=q(d),f=null===d&&m.current?m.current:d;return f&&(n=f.callback,o=Ao(f,ca)),B(function(){null!==d&&(m.current=d,a(Zo(u)))},[JSON.stringify(d)]),i?null:F(on,{reference:c,source:u,perPage:500,filter:o,queryOptions:l},F(ma,Vo({},s,{callback:n,optionText:"etiqueta",optionValue:u})))},pa=function(e){var n=oa(e);return!n.hidden&&F(an,n.propsContenido)},va=function(e){var n=e.title,o=e.source,t=e.src,r=ie(e);return F(go,{title:n,src:t+"/"+r[o]})},ga=function(e){var n=oa(e);return n.hidden?null:F(ln,{source:e.source,reference:e.reference},F(sn,Vo({},n.propsContenido,{optionText:"etiqueta",optionValue:e.source})))},ha=function(e){var n=oa(e);return!n.hidden&&F(ze,n.propsContenido)},ba=function(e){var n=oa(e),o=n.propsContenido,t=n.hidden;return I(mt).isLoading||t?null:F(on,{source:e.source,reference:e.reference},F(un,Vo({},o,{optionText:"etiqueta",optionValue:e.source})))},ya=function(e){var n=oa(e);return!n.hidden&&F(un,n.propsContenido)},Ca=function(e){return F(Do,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},F(y,e))},xa={cursor:"move"},wa=function(e){var n=e.isOpen,o=e.isLoading,t=e.title,r=e.content,i=e.cancel,a=e.ConfirmIcon,l=e.CancelIcon,s=e.onClose,u=e.onConfirm,c=e.contentResource,d=e.translateOptions,m=void 0===d?{}:d,f=j(),p=cn(c)[0],v=L(function(e,n){e.stopPropagation(),u(e,p)},[p,u]),g=L(function(e){e.stopPropagation()},[]);return F(Mn,{open:n,onClose:s,onClick:g,fullWidth:!0,maxWidth:"lg",PaperComponent:Ca,"aria-labelledby":"draggable-dialog-title"},F(Vn,{style:xa,id:"draggable-dialog-title"},f(t,Vo({_:t},m))),F(Dn,{dividers:!0},r),F(Bn,null,F(ho,{disabled:o,onClick:s},F(l,{sx:{paddingRight:"0.5em"}}),f(i,{_:i})),F(ho,{disabled:o,onClick:function(e){return v(e,"yes")},autoFocus:!0},F(a,{sx:{paddingRight:"0.5em"}}),f("ra.action.confirm"))))};wa.propTypes={cancel:Sn.string,classes:Sn.object,confirm:Sn.string,confirmColor:Sn.string,ConfirmIcon:Sn.elementType,CancelIcon:Sn.elementType,content:Sn.node.isRequired,isOpen:Sn.bool,isLoading:Sn.bool,onClose:Sn.func.isRequired,onConfirm:Sn.func.isRequired,title:Sn.string.isRequired},wa.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:Mo,CancelIcon:Bo,isOpen:!1};var ka=["disabled","asistant","asistantResource","label","source","sx"],Ta=function(){return F(M,null)},Sa={seleccion:[],all:!0,none:!1},Ra=function(e){return!e||null!=e&&e.all?"Todos":null!=e&&e.none||0===e.seleccion.length?"Ninguno":"Selección ("+e.seleccion.length+")"},Pa=function(e){return e},Fa=function(e){var n=e.disabled,o=e.asistant,t=e.asistantResource,r=e.label,i=e.source,a=e.sx,s=Ao(e,ka),u=E(!1),c=u[0],d=u[1],m=Un();B(function(){p()},[]);var f=L(function(){d(!1)},[d]),p=function(e){m.setValue(i,{seleccion:[],all:!0,none:!1})};return F(M,null,F(l,{display:"flex",alignItems:"center",sx:Vo({},a,{display:"inline-flex",margin:1})},F(je,Vo({defaultValue:Sa},s,{source:i,label:r,disabled:!0,parse:Pa,format:Ra,helperText:!1,InputProps:{endAdornment:F(M,null,F(mo,{onClick:function(e){m.setValue(i,{seleccion:[],all:!1,none:!0})},disabled:n,"aria-label":"Ninguno",size:"small",title:"Ninguno"},F(Io,null)),F(mo,{onClick:p,disabled:n,"aria-label":"Todos",size:"small",title:"Todos"},F(_o,null)),F(mo,{onClick:function(e){return d(!0)},disabled:n,"aria-label":"Selección",size:"small",title:"Selección"},F(Lo,null)))}}))),F(wa,{isOpen:c,title:"Selección de "+r,contentResource:t,content:F(o,{bulkActionButtons:F(Ta,null),hasCreate:!1,exporter:!1,resource:t}),onConfirm:function(e,n){d(!1),m.setValue(i,{seleccion:n,all:!1,none:!1})},onClose:f}))},Na=function(e){return F(dn,Vo({},e,{hasCreate:!1,exporter:!1,perPage:50,empty:!1,title:" ",disableSyncWithLocation:!0}),F(mn,{bulkActionButtons:F("span",null)},F(oe,{source:"funced",sortable:!0,label:"Cédula"}),F(oe,{source:"funpriape",sortable:!0,label:"Apellido"}),F(oe,{source:"funprinom",sortable:!0,label:"Nombre"})))},Ea={fillista:"empcod=-1"},_a=function(e){var n=E(Ea),o=n[0],t=n[1],r=J(),i=L(function(e){t({fillista:e.node.key})},[t]),a=L(function(e){return r.getChildNodes("form_224",{parentId:e?e.itemData.id:""}).then(function(e){return e.data}).catch(function(){throw new Error("Data Loading Error")})},[r]);return F(l,{display:"flex",flex:1,alignItems:"flex-start",height:"20em"},F(l,{flexGrow:1},F(Oo,{id:"funcionarios-treeview",dataStructure:"plain",rootValue:"",onItemClick:i,createChildren:a})),F(l,{flexGrow:2},F(Na,{resource:"form_224",filter:o})))},Ia=function(e){return F(Do,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},F(y,e))},La={cursor:"move"},Ma=function(e){var n=e.isOpen,o=e.isLoading,t=e.title,r=e.cancel,i=e.ConfirmIcon,a=e.CancelIcon,l=e.onClose,s=e.onConfirm,u=e.translateOptions,c=void 0===u?{}:u,d=j(),m=L(function(e,n){e.stopPropagation(),s(e,n)},[s]),f=L(function(e){e.stopPropagation()},[]);return F(Mn,{open:n,onClose:l,onClick:f,fullWidth:!0,maxWidth:"lg",PaperComponent:Ia,"aria-labelledby":"draggable-dialog-title"},F(Vn,{style:La,id:"draggable-dialog-title"},d(t,Vo({_:t},c))),F(Dn,{dividers:!0},F(_a,null)),F(Bn,null,F(ho,{disabled:o,onClick:l},F(a,{sx:{paddingRight:"0.5em"}}),d(r,{_:r})),F(ho,{disabled:o,onClick:function(e){return m(e,"yes")},autoFocus:!0},F(i,{sx:{paddingRight:"0.5em"}}),d("ra.action.confirm"))))};Ma.propTypes={cancel:Sn.string,classes:Sn.object,confirm:Sn.string,confirmColor:Sn.string,ConfirmIcon:Sn.elementType,CancelIcon:Sn.elementType,isOpen:Sn.bool,isLoading:Sn.bool,onClose:Sn.func.isRequired,onConfirm:Sn.func.isRequired,title:Sn.string.isRequired},Ma.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:Mo,CancelIcon:Bo,isOpen:!1};var Ba=["disabled","asistant","asistantResource","label","allowNone","allowAll","source","sx","onChange"],Da={seleccion:[],all:!0,none:!1},Oa=function(e){return String(e)===e?""===e?"Ninguno":"Selección (1)":!e||null!=e&&e.all?"Todos":null!=e&&e.none||0===e.seleccion.length?"Ninguno":"Selección ("+e.seleccion.length+")"},Va=function(e){return e},Aa=function(e){var n=e.disabled,o=e.label,t=void 0===o?"Funcionarios":o,r=e.allowNone,i=void 0===r||r,a=e.allowAll,s=void 0===a||a,u=e.source,c=e.sx,d=e.onChange,m=Ao(e,Ba),f=cn("form_224")[0],p=E(!1),v=p[0],g=p[1],h=Un(),b=I(mt),y=b.estado,C=b.fichaProps,x=void 0===C?{}:C,w=I(ft),k=x[u],T=void 0===k?{}:k,S=dt(Vo({},e,{etrs:x.etrs,asisEtr:w})),R=void 0===T.onChange?d:T.onChange;B(function(){h.setValue(u,{seleccion:[],all:!0,none:!1})},[]);var P=L(function(){g(!1)},[g]);return F(M,null,F(l,{display:"flex",alignItems:"center",sx:Vo({},c,{display:"inline-flex",margin:1})},F(je,Vo({defaultValue:Da},m,{source:u,label:t,disabled:!0,parse:Va,format:Oa,helperText:!1,InputProps:{endAdornment:F(M,null,i&&F(mo,{onClick:function(e){h.setValue(u,{seleccion:[],all:!1,none:!0}),R&&R(S,y,e)},disabled:n,"aria-label":"Ninguno",size:"small",title:"Ninguno"},F(Io,null)),s&&F(mo,{onClick:function(e){h.setValue(u,{seleccion:[],all:!0,none:!1}),R&&R(S,y,e)},disabled:n,"aria-label":"Todos",size:"small",title:"Todos"},F(_o,null)),F(mo,{onClick:function(e){return g(!0)},disabled:n,"aria-label":"Selección",size:"small",title:"Selección"},F(Lo,null)))}}))),F(Ma,{isOpen:v,title:"Selección de "+t,onConfirm:function(e,n){g(!1),h.setValue(u,{seleccion:f,all:!1,none:!1}),R&&R(S,y,e)},onClose:P}))},qa=function(e){var n=oa(e);return!n.hidden&&F(je,Vo({multiline:!0},n.propsContenido))},ja=["tipo"],za=function(e){var n=e.tipo,o=Ao(e,ja),t=oa(o),r=t.propsContenido,i=t.hidden,a=Un();B(function(){r.value&&a.setValue(e.source,r.value)});var l=Vo({},r);return i?null:"N"===n||"D"===n?F(fn,l):"F"===n?F(pn,l):"Z"===n?F(vn,l):F(je,"H"===n?Vo({},l,{type:"time"}):l)},Wa=function(e){var n=e.source,o=e.label,t=e.sx;return oa(e).hidden?null:F(l,{sx:Vo({},t,{display:"inline-flex",alignItems:"flex-start",marginLeft:{md:1},marginBottom:-1,width:{xs:"100%",md:"calc(24vw + 1em)"}})},F(je,Vo({},e,{label:"",source:n,sx:{flex:1,marginTop:1}})),F(fa,Vo({},e,{source:n,label:o,isTC:!0,sx:{flex:3}})))};export{zo as AppBar,Wt as Asistente,Wo as AsistenteContext,Go as AsistenteProvider,$i as BooleanField,ia as Camino,la as CheckBox,fa as ComboBox,pa as ComboBoxManual,ii as CreateEtriek,Kt as CreateGridButton,ci as DeleteButtonNoWarning,fi as EditEtriek,tr as EditGridButton,Vt as EtrGrid,qr as FichaActions,mt as FichaContext,Ma as FiltroFuncionarios,Xr as FormClasses,pi as FormDialog,bi as FormEtriek,jt as GE,Ht as GridButton,Cr as GrillaEtriek,va as ImageField,wi as Layout,Si as ListActionsEtriek,ga as ListCheck,Ri as Login,xi as Menu,Ni as MenuButton,_i as MultiTextField,ha as Password,ba as RadioButton,ya as RadioButtonManual,Ar as Separador,Li as ShowEtriek,ur as ShowGridButton,yi as SubMenu,Aa as TBSF,Hi as TabbedFormEtriek,kr as TabbedGrillaEtriek,qa as TextArea,za as TextBox,Fa as TextBoxSelection,Wa as TextCombo,yt as TextField,Hr as choicesEstado,Ir as dateFormat,Wr as dateFormatOptions,Lr as dateParser,Br as dateTimeFormat,Dr as dateTimeParser,$r as dateTimeToString,Zr as dateToString,Zo as deleteRecargarComboBox,Jr as descargarLink,Qi as enMessages,Zi as esMessages,Gr as etrFechaMayorQue,jr as etrRequerido,zr as etrRequeridoNumerico,Nr as getFormcodFromResource,Ur as localeOptions,Qo as recargarComboBox,Ct as renderCellComboBox,Ko as setDisableAction,et as setErrorAction,$o as setHiddenAction,Xo as setRequireAction,Yr as stringToDate,Qr as stringToDateTime,Yi as themes,Or as timeFormat,Vr as timeParser,lt as useAjax,Uo as useAsistente,oa as useContenidoController,St as useEtrActions,ht as useFieldController,Yo as useFormProgress,oi as useFormSubmit,at as useGetJson,Sr as useInitFicha,Rr as useNuevo,Kr as useReferenceLabel,dt as useUtils,ut as useUtilsGrilla,ct as useUtilsSubmit};
|
|
2
|
+
//# sourceMappingURL=index.modern.js.map
|