vue-componentes/dist/eli-vue.umd.js

76 lines
59 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(j,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vuetify/components/VBtn"),require("vuetify/components/VBadge"),require("vuetify/components/VTextField"),require("vuetify/components/VCard"),require("vuetify/components/VGrid")):typeof define=="function"&&define.amd?define(["exports","vue","vuetify/components/VBtn","vuetify/components/VBadge","vuetify/components/VTextField","vuetify/components/VCard","vuetify/components/VGrid"],t):(j=typeof globalThis<"u"?globalThis:j||self,t(j.eli_vue={},j.Vue,j.VBtn,j.VBadge,j.VTextField,j.VCard,j.VGrid))})(this,(function(j,t,Ie,qe,me,ee,Fe){"use strict";const Le=t.defineComponent({name:"EliBotao",inheritAttrs:!1,props:{color:{type:String,default:"primary"},variant:{type:String,default:"elevated"},size:{type:String,default:"default"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}}}),I=(e,a)=>{const n=e.__vccOpts||e;for(const[l,s]of a)n[l]=s;return n};function ze(e,a,n,l,s,f){return t.openBlock(),t.createBlock(Ie.VBtn,t.mergeProps({color:e.color,variant:e.variant,size:e.size,disabled:e.disabled,loading:e.loading},e.$attrs,{class:"eli-botao text-none pt-1"}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["color","variant","size","disabled","loading"])}const pe=I(Le,[["render",ze]]),he={suave:"4px",pill:"10px"},je=t.defineComponent({name:"EliBadge",inheritAttrs:!1,props:{color:{type:String,default:"primary"},location:{type:String,default:"top right"},offsetX:{type:String,default:"0"},offsetY:{type:String,default:"0"},dot:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},badge:{type:[String,Number],default:void 0},radius:{type:String,default:"suave"}},setup(e){const a=t.computed(()=>e.radius in he?he[e.radius]:e.radius),n=t.computed(()=>e.dot||e.badge!==void 0?e.visible:!1),l=t.computed(()=>({"--eli-badge-radius":a.value}));return{showBadge:n,badgeStyle:l}}});function He(e,a,n,l,s,f){return e.showBadge?(t.openBlock(),t.createBlock(qe.VBadge,t.mergeProps({key:0,color:e.color},e.$attrs,{location:e.location,"offset-x":e.offsetX,"offset-y":e.offsetY,dot:e.dot,content:e.badge,style:e.badgeStyle,class:"eli-badge"}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16,["color","location","offset-x","offset-y","dot","content","style"])):t.renderSlot(e.$slots,"default",{key:1},void 0,!0)}const se=I(je,[["render",He],["__scopeId","data-v-371c8db4"]]);function Ue(e){return e.replace(/\D+/g,"")}function Ye(e){const a=Ue(e);return a.length<=11?a.replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2").slice(0,14):a.replace(/^(\d{2})(\d)/,"$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/,"$1.$2.$3").replace(/\.(\d{3})(\d)/,".$1/$2").replace(/(\d{4})(\d)/,"$1-$2").slice(0,18)}function Re(e){return e.replace(/\D+/g,"")}function Je(e){const a=Re(e);return a?a.length<=10?a.replace(/^(\d{2})(\d)/,"($1) $2").replace(/(\d{4})(\d)/,"$1-$2").slice(0,14):a.replace(/^(\d{2})(\d)/,"($1) $2").replace(/(\d{5})(\d)/,"$1-$2").slice(0,15):""}function We(e){return e.replace(/\D+/g,"")}function Ze(e){const a=We(e);return a?a.replace(/^(\d{5})(\d)/,"$1-$2").slice(0,9):""}const Ge=t.defineComponent({name:"EliEntradaTexto",inheritAttrs:!1,props:{value:{type:[String,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const l=t.computed(()=>{var i;return((i=e.opcoes)==null?void 0:i.formato)??"texto"}),s=t.computed({get:()=>e.value,set:i=>{n("update:value",i),n("input",i),n("change",i)}}),f=t.computed(()=>l.value==="email"?"email":l.value==="url"?"url":"text"),o=t.computed(()=>{if(l.value==="telefone")return"tel";if(l.value==="cpfCnpj"||l.value==="cep")return"numeric"});function r(i){switch(l.value){case"telefone":return Je(i);case"cpfCnpj":return Ye(i);case"cep":return Ze(i);default:return i}}function p(i){const m=i.target,y=r(m.value);m.value=y,s.value=y}return{attrs:a,emit:n,localValue:s,inputHtmlType:f,inputMode:o,onInput:p}}});function Xe(e,a,n,l,s,f){var o,r,p,i;return t.openBlock(),t.createBlock(me.VTextField,t.mergeProps({modelValue:e.localValue,"onUpdate:modelValue":a[0]||(a[0]=m=>e.localValue=m),type:e.inputHtmlType,inputmode:e.inputMode,label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(r=e.opcoes)==null?void 0:r.placeholder,counter:(p=e.opcoes)==null?void 0:p.limiteCaracteres,maxlength:(i=e.opcoes)==null?void 0:i.limiteCaracteres},e.attrs,{onFocus:a[1]||(a[1]=()=>e.emit("focus")),onBlur:a[2]||(a[2]=()=>e.emit("blur")),onInput:e.onInput}),null,16,["modelValue","type","inputmode","label","placeholder","counter","maxlength","onInput"])}const fe=I(Ge,[["render",Xe]]),Ke=t.defineComponent({name:"EliOlaMundo",components:{EliBotao:pe,EliBadge:se,EliEntradaTexto:fe},setup(){const e=t.ref(""),a=t.ref(""),n=t.ref(""),l=t.ref(""),s=t.ref("");return{nome:e,email:l,documento:s,telefone:n,cep:a}}}),Qe={class:"grid-example"};function xe(e,a,n,l,s,f){const o=t.resolveComponent("EliBadge"),r=t.resolveComponent("EliEntradaTexto"),p=t.resolveComponent("EliBotao");return t.openBlock(),t.createBlock(Fe.VContainer,null,{default:t.withCtx(()=>[t.createVNode(ee.VCard,{class:"mx-auto",max_width:"400"},{default:t.withCtx(()=>[t.createVNode(ee.VCardTitle,null,{default:t.withCtx(()=>[t.createVNode(o,{badge:"Novo","offset-x":"-15",location:"right center"},{default:t.withCtx(()=>[...a[5]||(a[5]=[t.createTextVNode(" Olá Mundo! ",-1)])]),_:1})]),_:1}),t.createVNode(ee.VCardText,null,{default:t.withCtx(()=>[a[6]||(a[6]=t.createTextVNode(" Este é um componente de exemplo integrado com Vuetify. ",-1)),t.createElementVNode("div",Qe,[t.createVNode(r,{value:e.nome,"onUpdate:value":a[0]||(a[0]=i=>e.nome=i),opcoes:{rotulo:"Nome",placeholder:"Digite o nome"},density:"compact"},null,8,["value"]),t.createVNode(r,{value:e.telefone,"onUpdate:value":a[1]||(a[1]=i=>e.telefone=i),opcoes:{rotulo:"Telefone",formato:"telefone"}},null,8,["value"]),t.createVNode(r,{value:e.cep,"onUpdate:value":a[2]||(a[2]=i=>e.cep=i),opcoes:{rotulo:"CEP",placeholder:"00000-000",formato:"cep"}},null,8,["value"]),t.createVNode(r,{value:e.documento,"onUpdate:value":a[3]||(a[3]=i=>e.documento=i),opcoes:{rotulo:"CPF / CNPJ",formato:"cpfCnpj"}},null,8,["value"]),t.createVNode(r,{value:e.email,"onUpdate:value":a[4]||(a[4]=i=>e.email=i),opcoes:{rotulo:"Email",placeholder:"email@exemplo.com",formato:"email"}},null,8,["value"])])]),_:1}),t.createVNode(ee.VCardActions,null,{default:t.withCtx(()=>[t.createVNode(p,{color:"primary",variant:"elevated",block:""},{default:t.withCtx(()=>[...a[7]||(a[7]=[t.createTextVNode(" Botão Vuetify ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})}const ge=I(Ke,[["render",xe]]),et=t.defineComponent({name:"EliCartao",components:{EliBadge:se},inheritAttrs:!1,props:{titulo:{type:String,default:""},status:{type:String,required:!0},variant:{type:String,default:"outlined"}},emits:{clicar:e=>!0},setup(e,{emit:a}){const n=t.computed(()=>e.status),l=t.computed(()=>{switch(e.status){case"novo":return"primary";case"rascunho":return"secondary";case"vendido":return"success";case"cancelado":return"error"}}),s=t.computed(()=>`eli-cartao--${e.status}`);function f(){a("clicar",e.status)}return{rotuloStatus:n,corStatus:l,classeStatus:s,onClick:f}}}),tt={class:"eli-cartao__titulo-texto"},at={class:"eli-cartao__status"};function ot(e,a,n,l,s,f){const o=t.resolveComponent("EliBadge");return t.openBlock(),t.createBlock(ee.VCard,t.mergeProps({class:["eli-cartao",e.classeStatus],variant:e.variant},e.$attrs),{default:t.withCtx(()=>[t.createVNode(ee.VCardTitle,{class:"eli-cartao__titulo"},{default:t.withCtx(()=>[t.createElementVNode("div",tt,[t.renderSlot(e.$slots,"titulo",{},()=>[t.createTextVNode(t.toDisplayString(e.titulo),1)],!0)]),t.createElementVNode("div",at,[t.createVNode(o,{badge:e.rotuloStatus,radius:"pill",color:e.corStatus},{default:t.withCtx(()=>[...a[0]||(a[0]=[t.createElementVNode("span",null,null,-1)])]),_:1},8,["badge","color"])])]),_:3}),t.createVNode(ee.VCardText,{class:"eli-cartao__conteudo"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3}),e.$slots.acoes?(t.openBlock(),t.createBlock(ee.VCardActions,{key:0,class:"eli-cartao__acoes"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"acoes",{},void 0,!0)]),_:3})):t.createCommentVNode("",!0)]),_:3},16,["variant","class"])}const $e=I(et,[["render",ot],["__scopeId","data-v-6c492bd9"]]);var ye=(e=>(e[e.sucesso=200]="sucesso",e[e.erroConhecido=400]="erroConhecido",e[e.erroPermissao=401]="erroPermissao",e[e.erroNaoEncontrado=404]="erroNaoEncontrado",e[e.erroDesconhecido=500]="erroDesconhecido",e[e.tempoEsgotado=504]="tempoEsgotado",e))(ye||{});/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nt=e=>{for(const a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ee=e=>e==="";/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lt=(...e)=>e.filter((a,n,l)=>!!a&&a.trim()!==""&&l.indexOf(a)===n).join(" ").trim();/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _e=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,n,l)=>l?l.toUpperCase():n.toLowerCase());/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const it=e=>{const a=rt(e);return a.charAt(0).toUpperCase()+a.slice(1)};/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var le={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const st=({name:e,iconNode:a,absoluteStrokeWidth:n,"absolute-stroke-width":l,strokeWidth:s,"stroke-width":f,size:o=le.width,color:r=le.stroke,...p},{slots:i})=>t.h("svg",{...le,...p,width:o,height:o,stroke:r,"stroke-width":Ee(n)||Ee(l)||n===!0||l===!0?Number(s||f||le["stroke-width"])*24/Number(o):s||f||le["stroke-width"],class:lt("lucide",p.class,...e?[`lucide-${_e(it(e))}-icon`,`lucide-${_e(e)}`]:["lucide-icon"]),...!i.default&&!nt(p)&&{"aria-hidden":"true"}},[...a.map(m=>t.h(...m)),...i.default?[i.default()]:[]]);/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ae=(e,a)=>(n,{slots:l,attrs:s})=>t.h(st,{...s,...n,iconNode:a,name:e},l);/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ke=ae("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ce=ae("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Be=ae("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ve=ae("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ct=ae("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dt=ae("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),ut=t.defineComponent({name:"EliTabelaCaixaDeBusca",components:{Search:dt},props:{modelo:{type:String,required:!1,default:""}},emits:{buscar(e){return typeof e=="string"}},setup(e,{emit:a}){const n=t.ref(e.modelo??"");t.watch(()=>e.modelo,s=>{s!==void 0&&s!==n.value&&(n.value=s)});function l(){a("buscar",n.value.trim())}return{texto:n,emitirBusca:l}}}),mt={class:"eli-tabela__busca"},pt={class:"eli-tabela__busca-input-wrapper"};function ft(e,a,n,l,s,f){const o=t.resolveComponent("Search");return t.openBlock(),t.createElementBlock("div",mt,[t.createElementVNode("div",pt,[t.withDirectives(t.createElementVNode("input",{id:"eli-tabela-busca","onUpdate:modelValue":a[0]||(a[0]=r=>e.texto=r),type:"search",class:"eli-tabela__busca-input",placeholder:"Digite termos para filtrar",onKeyup:a[1]||(a[1]=t.withKeys((...r)=>e.emitirBusca&&e.emitirBusca(...r),["enter"]))},null,544),[[t.vModelText,e.texto]]),t.createElementVNode("button",{type:"button",class:"eli-tabela__busca-botao","aria-label":"Buscar",title:"Buscar",onClick:a[2]||(a[2]=(...r)=>e.emitirBusca&&e.emitirBusca(...r))},[t.createVNode(o,{class:"eli-tabela__busca-botao-icone",size:16,"stroke-width":2,"aria-hidden":"true"})])])])}const bt=I(ut,[["render",ft],["__scopeId","data-v-341415d1"]]),ht=t.defineComponent({name:"EliTabelaCabecalho",components:{EliTabelaCaixaDeBusca:bt},props:{exibirBusca:{type:Boolean,required:!0},exibirBotaoColunas:{type:Boolean,required:!1,default:!0},valorBusca:{type:String,required:!0},acoesCabecalho:{type:Array,required:!0}},emits:{buscar(e){return typeof e=="string"},colunas(){return!0}},setup(e,{emit:a}){const n=t.computed(()=>e.acoesCabecalho.length>0);function l(f){a("buscar",f)}function s(){a("colunas")}return{temAcoesCabecalho:n,emitBuscar:l,emitColunas:s}}}),gt={class:"eli-tabela__cabecalho"},$t={key:0,class:"eli-tabela__busca-grupo"},yt={key:1,class:"eli-tabela__acoes-cabecalho"},Et=["onClick"],_t={class:"eli-tabela__acoes-cabecalho-rotulo"};function kt(e,a,n,l,s,f){const o=t.resolveComponent("EliTabelaCaixaDeBusca");return t.openBlock(),t.createElementBlock("div",gt,[e.exibirBusca?(t.openBlock(),t.createElementBlock("div",$t,[e.exibirBotaoColunas?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__acoes-cabecalho-botao eli-tabela__acoes-cabecalho-botao--colunas",onClick:a[0]||(a[0]=(...r)=>e.emitColunas&&e.emitColunas(...r))}," Colunas ")):t.createCommentVNode("",!0),t.createVNode(o,{modelo:e.valorBusca,onBuscar:e.emitBuscar},null,8,["modelo","onBuscar"])])):t.createCommentVNode("",!0),e.temAcoesCabecalho?(t.openBlock(),t.createElementBlock("div",yt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.acoesCabecalho,(r,p)=>(t.openBlock(),t.createElementBlock("button",{key:`${r.rotulo}-${p}`,type:"button",class:"eli-tabela__acoes-cabecalho-botao",style:t.normalizeStyle(r.cor?{backgroundColor:r.cor,color:"#fff"}:void 0),onClick:r.acao},[r.icone?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.icone),{key:0,class:"eli-tabela__acoes-cabecalho-icone",size:16,"stroke-width":2})):t.createCommentVNode("",!0),t.createElementVNode("span",_t,t.toDisplayString(r.rotulo),1)],12,Et))),128))])):t.createCommentVNode("",!0)])}const Ct=I(ht,[["render",kt],["__scopeId","data-v-42938cb8"]]),Bt=t.defineComponent({name:"EliTabelaEstados",props:{carregando:{type:Boolean,required:!0},erro:{type:String,required:!0},mensagemVazio:{type:String,required:!1,default:void 0}}}),vt={key:0,class:"eli-tabela eli-tabela--carregando","aria-busy":"true"},Dt={key:1,class:"eli-tabela eli-tabela--erro",role:"alert"},Vt={class:"eli-tabela__erro-mensagem"},St={key:2,class:"eli-tabela eli-tabela--vazio"};function Nt(e,a,n,l,s,f){return e.carregando?(t.openBlock(),t.createElementBlock("div",vt," Carregando... ")):e.erro?(t.openBlock(),t.createElementBlock("div",Dt,[a[0]||(a[0]=t.createElementVNode("div",{class:"eli-tabela__erro-titulo"},"Erro",-1)),t.createElementVNode("div",Vt,t.toDisplayString(e.erro),1)])):(t.openBlock(),t.createElementBlock("div",St,t.toDisplayString(e.mensagemVazio??"Nenhum registro encontrado."),1))}const wt=I(Bt,[["render",Nt]]),Mt=t.defineComponent({name:"EliTabelaDebug",props:{isDev:{type:Boolean,required:!0},menuAberto:{type:Number,required:!0},menuPopupPos:{type:Object,required:!0}}}),At={key:0,style:{position:"fixed",left:"8px",bottom:"8px","z-index":"999999",background:"rgba(185,28,28,0.9)",color:"#fff",padding:"6px 10px","border-radius":"8px","font-size":"12px","max-width":"500px"}};function Tt(e,a,n,l,s,f){return e.isDev?(t.openBlock(),t.createElementBlock("div",At,[a[0]||(a[0]=t.createElementVNode("div",null,[t.createElementVNode("b",null,"EliTabela debug")],-1)),t.createElementVNode("div",null,"menuAberto: "+t.toDisplayString(e.menuAberto),1),t.createElementVNode("div",null,"menuPos: top="+t.toDisplayString(e.menuPopupPos.top)+", left="+t.toDisplayString(e.menuPopupPos.left),1)])):t.createCommentVNode("",!0)}const Pt=I(Mt,[["render",Tt]]),Ot=t.defineComponent({name:"EliTabelaHead",components:{ArrowUp:Ce,ArrowDown:ke},props:{colunas:{type:Array,required:!0},temAcoes:{type:Boolean,required:!0},temColunasInvisiveis:{type:Boolean,required:!0},colunaOrdenacao:{type:String,required:!0},direcaoOrdenacao:{type:String,required:!0}},emits:{alternarOrdenacao(e){return typeof e=="string"&&e.length>0}},setup(e,{emit:a}){function n(s){return(s==null?void 0:s.coluna_ordem)!==void 0&&(s==null?void 0:s.coluna_ordem)!==null}function l(s){a("alternarOrdenacao",s)}return{ArrowUp:Ce,ArrowDown:ke,isOrdenavel:n,emitAlternarOrdenacao:l}}}),It={class:"eli-tabela__thead"},qt={class:"eli-tabela__tr eli-tabela__tr--header"},Ft={key:0,class:"eli-tabela__th eli-tabela__th--expander",scope:"col"},Lt=["onClick"],zt={class:"eli-tabela__th-texto"},jt={key:1,class:"eli-tabela__th-label"},Ht={key:1,class:"eli-tabela__th eli-tabela__th--acoes",scope:"col"};function Ut(e,a,n,l,s,f){const o=t.resolveComponent("ArrowUp");return t.openBlock(),t.createElementBlock("thead",It,[t.createElementVNode("tr",qt,[e.temColunasInvisiveis?(t.openBlock(),t.createElementBlock("th",Ft)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunas,(r,p)=>(t.openBlock(),t.createElementBlock("th",{key:`th-${p}`,class:t.normalizeClass(["eli-tabela__th",[e.isOrdenavel(r)?"eli-tabela__th--ordenavel":void 0]]),scope:"col"},[e.isOrdenavel(r)?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:t.normalizeClass(["eli-tabela__th-botao",[e.colunaOrdenacao===String(r.coluna_ordem)?"eli-tabela__th-botao--ativo":void 0]]),onClick:i=>e.emitAlternarOrdenacao(String(r.coluna_ordem))},[t.createElementVNode("span",zt,t.toDisplayString(r.rotulo),1),e.colunaOrdenacao===String(r.coluna_ordem)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.direcaoOrdenacao==="asc"?e.ArrowUp:e.ArrowDown),{key:0,class:"eli-tabela__th-icone",size:16,"stroke-width":2,"aria-hidden":"true"})):(t.openBlock(),t.createBlock(o,{key:1,class:"eli-tabela__th-icone eli-tabela__th-icone--oculto",size:16,"stroke-width":2,"aria-hidden":"true"}))],10,Lt)):(t.openBlock(),t.createElementBlock("span",jt,t.toDisplayString(r.rotulo),1))],2))),128)),e.temAcoes?(t.openBlock(),t.createElementBlock("th",Ht," Ações ")):t.createCommentVNode("",!0)])])}const Yt=I(Ot,[["render",Ut]]),Rt=t.defineComponent({name:"EliTabelaCelulaTextoSimples",components:{},props:{dados:{type:Object}},data(){return{}},methods:{},setup({dados:e}){return{dados:e}}}),Jt={key:1};function Wt(e,a,n,l,s,f){var o,r,p;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__celula-link",onClick:a[0]||(a[0]=t.withModifiers(i=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString((r=e.dados)==null?void 0:r.texto),1)):(t.openBlock(),t.createElementBlock("span",Jt,t.toDisplayString((p=e.dados)==null?void 0:p.texto),1))}const Zt=I(Rt,[["render",Wt],["__scopeId","data-v-7a629ffa"]]),Gt=t.defineComponent({name:"EliTabelaCelulaTextoTruncado",props:{dados:{type:Object}},setup({dados:e}){return{dados:e}}}),Xt=["title"],Kt=["title"];function Qt(e,a,n,l,s,f){var o,r,p,i,m;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__texto-truncado eli-tabela__celula-link",title:(r=e.dados)==null?void 0:r.texto,onClick:a[0]||(a[0]=t.withModifiers(y=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString((p=e.dados)==null?void 0:p.texto),9,Xt)):(t.openBlock(),t.createElementBlock("span",{key:1,class:"eli-tabela__texto-truncado",title:(i=e.dados)==null?void 0:i.texto},t.toDisplayString((m=e.dados)==null?void 0:m.texto),9,Kt))}const xt=I(Gt,[["render",Qt],["__scopeId","data-v-74854889"]]),ea=t.defineComponent({name:"EliTabelaCelulaNumero",components:{},props:{dados:{type:Object}},data(){return{}},methods:{},setup({dados:e}){return{dados:e}}}),ta={key:1};function aa(e,a,n,l,s,f){var o,r,p;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__celula-link",onClick:a[0]||(a[0]=t.withModifiers(i=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString(String((r=e.dados)==null?void 0:r.numero).replace(".",",")),1)):(t.openBlock(),t.createElementBlock("span",ta,t.toDisplayString(String((p=e.dados)==null?void 0:p.numero).replace(".",",")),1))}const oa={textoSimples:Zt,textoTruncado:xt,numero:I(ea,[["render",aa],["__scopeId","data-v-e7bac7ff"]])},na=t.defineComponent({name:"EliTabelaCelula",props:{celula:{type:Array,required:!0}},setup(e){const a=t.computed(()=>e.celula[0]),n=t.computed(()=>e.celula[1]),l=t.computed(()=>oa[a.value]),s=t.computed(()=>n.value);return{Componente:l,dadosParaComponente:s}}});function la(e,a,n,l,s,f){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Componente),{dados:e.dadosParaComponente},null,8,["dados"])}const De=I(na,[["render",la]]),ra=t.defineComponent({name:"EliTabelaDetalhesLinha",components:{EliTabelaCelula:De},props:{linha:{type:null,required:!0},colunasInvisiveis:{type:Array,required:!0}}}),ia={class:"eli-tabela__detalhes"},sa={class:"eli-tabela__detalhe-rotulo"},ca={class:"eli-tabela__detalhe-valor"};function da(e,a,n,l,s,f){const o=t.resolveComponent("EliTabelaCelula");return t.openBlock(),t.createElementBlock("div",ia,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunasInvisiveis,(r,p)=>(t.openBlock(),t.createElementBlock("div",{key:`det-${p}-${r.rotulo}`,class:"eli-tabela__detalhe"},[t.createElementVNode("div",sa,t.toDisplayString(r.rotulo),1),t.createElementVNode("div",ca,[t.createVNode(o,{celula:r.celula(e.linha)},null,8,["celula"])])]))),128))])}const ua=I(ra,[["render",da],["__scopeId","data-v-f1ee8d20"]]),ma=t.defineComponent({name:"EliTabelaBody",components:{EliTabelaCelula:De,EliTabelaDetalhesLinha:ua,MoreVertical:ct,ChevronRight:ve,ChevronDown:Be},props:{colunas:{type:Array,required:!0},colunasInvisiveis:{type:Array,required:!0},temColunasInvisiveis:{type:Boolean,required:!0},linhasExpandidas:{type:Object,required:!0},linhas:{type:Array,required:!0},temAcoes:{type:Boolean,required:!0},menuAberto:{type:Number,required:!0},possuiAcoes:{type:Function,required:!0},toggleMenu:{type:Function,required:!0},alternarLinhaExpandida:{type:Function,required:!0}},setup(){return{ChevronRight:ve,ChevronDown:Be}}}),pa={class:"eli-tabela__tbody"},fa=["aria-expanded","aria-label","title","onClick"],ba=["id","disabled","aria-expanded","aria-controls","aria-label","title","onClick"],ha=["colspan"];function ga(e,a,n,l,s,f){const o=t.resolveComponent("EliTabelaCelula"),r=t.resolveComponent("MoreVertical"),p=t.resolveComponent("EliTabelaDetalhesLinha");return t.openBlock(),t.createElementBlock("tbody",pa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.linhas,(i,m)=>{var y,S,V,_,$,v;return t.openBlock(),t.createElementBlock(t.Fragment,{key:`grp-${m}`},[t.createElementVNode("tr",{class:t.normalizeClass(["eli-tabela__tr",[m%2===1?"eli-tabela__tr--zebra":void 0]])},[e.temColunasInvisiveis?(t.openBlock(),t.createElementBlock("td",{class:"eli-tabela__td eli-tabela__td--expander",key:`td-${m}-exp`},[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["eli-tabela__expander-botao",[(y=e.linhasExpandidas)!=null&&y[m]?"eli-tabela__expander-botao--ativo":void 0]]),"aria-expanded":(S=e.linhasExpandidas)!=null&&S[m]?"true":"false","aria-label":(V=e.linhasExpandidas)!=null&&V[m]?"Ocultar colunas ocultas":"Mostrar colunas ocultas",title:(_=e.linhasExpandidas)!=null&&_[m]?"Ocultar detalhes":"Mostrar detalhes",onClick:t.withModifiers(g=>e.alternarLinhaExpandida(m),["stop"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(($=e.linhasExpandidas)!=null&&$[m]?e.ChevronDown:e.ChevronRight),{class:"eli-tabela__expander-icone",size:16,"stroke-width":2,"aria-hidden":"true"}))],10,fa)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunas,(g,k)=>(t.openBlock(),t.createElementBlock("td",{key:`td-${m}-${k}`,class:"eli-tabela__td"},[t.createVNode(o,{celula:g.celula(i)},null,8,["celula"])]))),128)),e.temAcoes?(t.openBlock(),t.createElementBlock("td",{class:"eli-tabela__td eli-tabela__td--acoes",key:`td-${m}-acoes`},[t.createElementVNode("div",{class:t.normalizeClass(["eli-tabela__acoes-container",[e.menuAberto===m?"eli-tabela__acoes-container--aberto":void 0]])},[t.createElementVNode("button",{class:"eli-tabela__acoes-toggle",type:"button",id:`eli-tabela-acoes-toggle-${m}`,disabled:!e.possuiAcoes(m),"aria-haspopup":"menu","aria-expanded":e.menuAberto===m?"true":"false","aria-controls":e.possuiAcoes(m)?`eli-tabela-acoes-menu-${m}`:void 0,"aria-label":e.possuiAcoes(m)?"Ações da linha":"Nenhuma ação disponível",title:e.possuiAcoes(m)?"Ações":"Nenhuma ação disponível",onClick:t.withModifiers(g=>e.toggleMenu(m,g),["stop"])},[t.createVNode(r,{class:"eli-tabela__acoes-toggle-icone",size:18,"stroke-width":2})],8,ba)],2)])):t.createCommentVNode("",!0)],2),e.temColunasInvisiveis&&((v=e.linhasExpandidas)!=null&&v[m])?(t.openBlock(),t.createElementBlock("tr",{key:0,class:t.normalizeClass(["eli-tabela__tr eli-tabela__tr--detalhes",[m%2===1?"eli-tabela__tr--zebra":void 0]])},[t.createElementVNode("td",{class:"eli-tabela__td eli-tabela__td--detalhes",colspan:(e.temColunasInvisiveis?1:0)+e.colunas.length+(e.temAcoes?1:0)},[t.createVNode(p,{linha:i,colunasInvisiveis:e.colunasInvisiveis},null,8,["linha","colunasInvisiveis"])],8,ha)],2)):t.createCommentVNode("",!0)],64)}),128))])}const $a=I(ma,[["render",ga]]),ya=t.defineComponent({name:"EliTabelaMenuAcoes",props:{menuAberto:{type:Number,required:!0},posicao:{type:Object,required:!0},acoes:{type:Array,required:!0},linha:{type:null,required:!0}},emits:{executar(e){return e!==null&&typeof e=="object"}},setup(e,{emit:a,expose:n}){const l=t.ref(null);n({menuEl:l});const s=t.computed(()=>e.acoes.length>0);function f(o){e.linha&&a("executar",{acao:o.acao,linha:e.linha})}return{menuEl:l,possuiAcoes:s,emitExecutar:f}}}),Ea=["id","aria-labelledby"],_a=["aria-label","title","onClick"],ka={class:"eli-tabela__acoes-item-texto"};function Ca(e,a,n,l,s,f){return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.menuAberto!==null&&e.possuiAcoes?(t.openBlock(),t.createElementBlock("ul",{key:0,id:`eli-tabela-acoes-menu-${e.menuAberto}`,ref:"menuEl",class:"eli-tabela__acoes-menu",role:"menu","aria-labelledby":`eli-tabela-acoes-toggle-${e.menuAberto}`,style:t.normalizeStyle({position:"fixed",top:`${e.posicao.top}px`,left:`${e.posicao.left}px`,zIndex:999999})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.acoes,o=>(t.openBlock(),t.createElementBlock("li",{key:`acao-${e.menuAberto}-${o.indice}`,class:"eli-tabela__acoes-item",role:"none"},[t.createElementVNode("button",{type:"button",class:"eli-tabela__acoes-item-botao",style:t.normalizeStyle({color:o.acao.cor}),role:"menuitem","aria-label":o.acao.rotulo,title:o.acao.rotulo,onClick:t.withModifiers(r=>e.emitExecutar(o),["stop"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.acao.icone),{class:"eli-tabela__acoes-item-icone",size:16,"stroke-width":2})),t.createElementVNode("span",ka,t.toDisplayString(o.acao.rotulo),1)],12,_a)]))),128))],12,Ea)):t.createCommentVNode("",!0)])}const Ba=I(ya,[["render",Ca]]),va=t.defineComponent({name:"EliTabelaPaginacao",props:{pagina:{type:Number,required:!0},totalPaginas:{type:Number,required:!0},maximoBotoes:{type:Number,required:!1}},emits:{alterar(e){return Number.isFinite(e)}},setup(e,{emit:a}){const n=t.computed(()=>{const i=e.maximoBotoes;return typeof i=="number"&&i>=5?Math.floor(i):7}),l=t.computed(()=>{const i=e.totalPaginas,m=e.pagina,y=n.value,S=[],V=k=>{S.push({label:String(k),pagina:k,ativo:k===m})},_=()=>{S.push({label:"…",ehEllipsis:!0})};if(i<=y){for(let k=1;k<=i;k+=1)V(k);return S}const $=Math.max(3,y-2);let v=Math.max(2,m-Math.floor($/2)),g=v+$-1;g>=i&&(g=i-1,v=g-$+1),V(1),v>2&&_();for(let k=v;k<=g;k+=1)V(k);return g<i-1&&_(),V(i),S});function s(i){if(!i)return;const m=Math.min(Math.max(1,i),e.totalPaginas);m!==e.pagina&&a("alterar",m)}const f=t.computed(()=>e.pagina<=1),o=t.computed(()=>e.pagina>=e.totalPaginas),r=t.computed(()=>e.pagina),p=t.computed(()=>e.totalPaginas);return{botoes:l,irParaPagina:s,anteriorDesabilitado:f,proximaDesabilitada:o,paginaAtual:r,totalPaginasExibidas:p}}}),Da={key:0,class:"eli-tabela__paginacao",role:"navigation","aria-label":"Paginação de resultados"},Va=["disabled"],Sa={key:0,class:"eli-tabela__pagina-ellipsis","aria-hidden":"true"},Na=["disabled","aria-current","aria-label","onClick"],wa=["disabled"];function Ma(e,a,n,l,s,f){return e.totalPaginasExibidas>1?(t.openBlock(),t.createElementBlock("nav",Da,[t.createElementVNode("button",{type:"button",class:"eli-tabela__pagina-botao",disabled:e.anteriorDesabilitado,"aria-label":"Página anterior",onClick:a[0]||(a[0]=o=>e.irParaPagina(e.paginaAtual-1))}," << ",8,Va),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.botoes,(o,r)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${o.label}-${r}`},[o.ehEllipsis?(t.openBlock(),t.createElementBlock("span",Sa,t.toDisplayString(o.label),1)):(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",class:t.normalizeClass(["eli-tabela__pagina-botao",o.ativo?"eli-tabela__pagina-botao--ativo":void 0]),disabled:o.ativo,"aria-current":o.ativo?"page":void 0,"aria-label":`Ir para página ${o.label}`,onClick:p=>e.irParaPagina(o.pagina)},t.toDisplayString(o.label),11,Na))],64))),128)),t.createElementVNode("button",{type:"button",class:"eli-tabela__pagina-botao",disabled:e.proximaDesabilitada,"aria-label":"Próxima página",onClick:a[1]||(a[1]=o=>e.irParaPagina(e.paginaAtual+1))}," >> ",8,wa)])):t.createCommentVNode("",!0)}const Aa=I(va,[["render",Ma],["__scopeId","data-v-5ca7a362"]]),Ve="application/x-eli-tabela-coluna",Ta=t.defineComponent({name:"EliTabelaModalColunas",props:{aberto:{type:Boolean,required:!0},rotulosColunas:{type:Array,required:!0},configInicial:{type:Object,required:!0},colunas:{type:Array,required:!0}},emits:{fechar(){return!0},salvar(e){return!0}},setup(e,{emit:a}){const n=t.ref([]),l=t.ref([]);function s(){var X,te;const _=e.rotulosColunas,$=(((X=e.configInicial.visiveis)==null?void 0:X.length)??0)>0||(((te=e.configInicial.invisiveis)==null?void 0:te.length)??0)>0,v=new Set(e.colunas.filter(U=>U.visivel===!1).map(U=>U.rotulo)),g=$?new Set(e.configInicial.invisiveis??[]):v,k=_.filter(U=>!g.has(U)),W=e.configInicial.visiveis??[],K=new Set(k),G=[];for(const U of W)K.has(U)&&G.push(U);for(const U of k)G.includes(U)||G.push(U);n.value=G,l.value=_.filter(U=>g.has(U))}t.watch(()=>[e.aberto,e.rotulosColunas,e.configInicial,e.colunas],()=>{e.aberto&&s()},{deep:!0,immediate:!0});function f(){a("fechar")}function o(){a("salvar",{visiveis:[...n.value],invisiveis:[...l.value]})}function r(_,$){var v,g;try{(v=_.dataTransfer)==null||v.setData(Ve,JSON.stringify($)),(g=_.dataTransfer)==null||g.setData("text/plain",$.rotulo),_.dataTransfer.effectAllowed="move"}catch{}}function p(_){var $;try{const v=($=_.dataTransfer)==null?void 0:$.getData(Ve);if(!v)return null;const g=JSON.parse(v);return!g||typeof g.rotulo!="string"||g.origem!=="visiveis"&&g.origem!=="invisiveis"?null:g}catch{return null}}function i(_){const $=_.origem==="visiveis"?n.value:l.value,v=$.indexOf(_.rotulo);v>=0&&$.splice(v,1)}function m(_,$,v){const g=_==="visiveis"?n.value:l.value,k=g.indexOf($);k>=0&&g.splice(k,1),v===null||v<0||v>g.length?g.push($):g.splice(v,0,$)}function y(_,$,v,g){r(_,{rotulo:$,origem:v,index:g})}function S(_,$,v){const g=p(_);if(g)if(i(g),m($,g.rotulo,v),$==="visiveis"){const k=l.value.indexOf(g.rotulo);k>=0&&l.value.splice(k,1)}else{const k=n.value.indexOf(g.rotulo);k>=0&&n.value.splice(k,1)}}function V(_,$,v){const g=p(_);if(g)if(i(g),m($,g.rotulo,null),$==="visiveis"){const k=l.value.indexOf(g.rotulo);k>=0&&l.value.splice(k,1)}else{const k=n.value.indexOf(g.rotulo);k>=0&&n.value.splice(k,1)}}return{visiveisLocal:n,invisiveisLocal:l,emitFechar:f,emitSalvar:o,onDragStart:y,onDropItem:S,onDropLista:V}}}),Pa={class:"eli-tabela-modal-colunas__modal",role:"dialog","aria-modal":"true","aria-label":"Configurar colunas"},Oa={class:"eli-tabela-modal-colunas__header"},Ia={class:"eli-tabela-modal-colunas__conteudo"},qa={class:"eli-tabela-modal-colunas__coluna"},Fa=["onDragstart","onDrop"],La={class:"eli-tabela-modal-colunas__item-texto"},za={class:"eli-tabela-modal-colunas__coluna"},ja=["onDragstart","onDrop"],Ha={class:"eli-tabela-modal-colunas__item-texto"},Ua={class:"eli-tabela-modal-colunas__footer"};function Ya(e,a,n,l,s,f){return e.aberto?(t.openBlock(),t.createElementBlock("div",{key:0,class:"eli-tabela-modal-colunas__overlay",role:"presentation",onClick:a[9]||(a[9]=t.withModifiers((...o)=>e.emitFechar&&e.emitFechar(...o),["self"]))},[t.createElementVNode("div",Pa,[t.createElementVNode("header",Oa,[a[10]||(a[10]=t.createElementVNode("h3",{class:"eli-tabela-modal-colunas__titulo"},"Colunas",-1)),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__fechar","aria-label":"Fechar",onClick:a[0]||(a[0]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," × ")]),t.createElementVNode("div",Ia,[t.createElementVNode("div",qa,[a[12]||(a[12]=t.createElementVNode("div",{class:"eli-tabela-modal-colunas__coluna-titulo"},"Visíveis",-1)),t.createElementVNode("div",{class:"eli-tabela-modal-colunas__lista",onDragover:a[2]||(a[2]=t.withModifiers(()=>{},["prevent"])),onDrop:a[3]||(a[3]=o=>e.onDropLista(o,"visiveis",null))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.visiveisLocal,(o,r)=>(t.openBlock(),t.createElementBlock("div",{key:`vis-${o}`,class:"eli-tabela-modal-colunas__item",draggable:"true",onDragstart:p=>e.onDragStart(p,o,"visiveis",r),onDragover:a[1]||(a[1]=t.withModifiers(()=>{},["prevent"])),onDrop:p=>e.onDropItem(p,"visiveis",r)},[a[11]||(a[11]=t.createElementVNode("span",{class:"eli-tabela-modal-colunas__item-handle","aria-hidden":"true"},"⋮⋮",-1)),t.createElementVNode("span",La,t.toDisplayString(o),1)],40,Fa))),128))],32)]),t.createElementVNode("div",za,[a[14]||(a[14]=t.createElementVNode("div",{class:"eli-tabela-modal-colunas__coluna-titulo"},"Invisíveis",-1)),t.createElementVNode("div",{class:"eli-tabela-modal-colunas__lista",onDragover:a[5]||(a[5]=t.withModifiers(()=>{},["prevent"])),onDrop:a[6]||(a[6]=o=>e.onDropLista(o,"invisiveis",null))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.invisiveisLocal,(o,r)=>(t.openBlock(),t.createElementBlock("div",{key:`inv-${o}`,class:"eli-tabela-modal-colunas__item",draggable:"true",onDragstart:p=>e.onDragStart(p,o,"invisiveis",r),onDragover:a[4]||(a[4]=t.withModifiers(()=>{},["prevent"])),onDrop:p=>e.onDropItem(p,"invisiveis",r)},[a[13]||(a[13]=t.createElementVNode("span",{class:"eli-tabela-modal-colunas__item-handle","aria-hidden":"true"},"⋮⋮",-1)),t.createElementVNode("span",Ha,t.toDisplayString(o),1)],40,ja))),128))],32)])]),t.createElementVNode("footer",Ua,[t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--sec",onClick:a[7]||(a[7]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," Cancelar "),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--prim",onClick:a[8]||(a[8]=(...o)=>e.emitSalvar&&e.emitSalvar(...o))}," Salvar ")])])])):t.createCommentVNode("",!0)}const Ra=I(Ta,[["render",Ya],["__scopeId","data-v-b8f693ef"]]),Ja="eli:tabela";function Se(e){return`${Ja}:${e}:colunas`}function Ne(e){if(!e||typeof e!="object")return{visiveis:[],invisiveis:[]};const a=e,n=Array.isArray(a.visiveis)?a.visiveis.filter(s=>typeof s=="string"):[],l=Array.isArray(a.invisiveis)?a.invisiveis.filter(s=>typeof s=="string"):[];return{visiveis:n,invisiveis:l}}function we(e){try{const a=window.localStorage.getItem(Se(e));return a?Ne(JSON.parse(a)):{visiveis:[],invisiveis:[]}}catch{return{visiveis:[],invisiveis:[]}}}function Wa(e,a){try{window.localStorage.setItem(Se(e),JSON.stringify(Ne(a)))}catch{}}const Za=t.defineComponent({name:"EliTabela",inheritAttrs:!1,components:{EliTabelaCabecalho:Ct,EliTabelaEstados:wt,EliTabelaDebug:Pt,EliTabelaHead:Yt,EliTabelaBody:$a,EliTabelaMenuAcoes:Ba,EliTabelaPaginacao:Aa,EliTabelaModalColunas:Ra},props:{tabela:{type:Object,required:!0}},setup(e){const n=t.ref(!1),l=t.ref(null),s=t.ref([]),f=t.ref(0),o=t.ref([]),r=t.ref(null),p=t.ref(null),i=t.ref({top:0,left:0}),m=t.ref(""),y=t.ref(1),S=t.ref(null),V=t.ref("asc"),_=t.computed(()=>e.tabela),$=t.computed(()=>!!e.tabela.mostrarCaixaDeBusca),v=t.computed(()=>e.tabela.acoesTabela??[]),g=t.computed(()=>v.value.length>0),k=t.ref(!1),W=t.ref(we(e.tabela.nome)),K=t.ref({}),G=t.computed(()=>e.tabela.colunas.map(b=>b.rotulo)),X=t.computed(()=>{var Z,Q;const b=e.tabela.colunas,A=(((Z=W.value.visiveis)==null?void 0:Z.length)??0)>0||(((Q=W.value.invisiveis)==null?void 0:Q.length)??0)>0?W.value.invisiveis??[]:b.filter(O=>O.visivel===!1).map(O=>O.rotulo),w=new Set(A),T=b.filter(O=>w.has(O.rotulo)),q=A,Y=new Map;for(const O of T)Y.has(O.rotulo)||Y.set(O.rotulo,O);const R=[];for(const O of q){const x=Y.get(O);x&&R.push(x)}for(const O of T)R.includes(O)||R.push(O);return R}),te=t.computed(()=>X.value.length>0),U=t.computed(()=>{var O,x;const b=e.tabela.colunas,D=G.value,A=(((O=W.value.visiveis)==null?void 0:O.length)??0)>0||(((x=W.value.invisiveis)==null?void 0:x.length)??0)>0,w=A?W.value.invisiveis??[]:e.tabela.colunas.filter(F=>F.visivel===!1).map(F=>F.rotulo),T=new Set(w),q=D.filter(F=>!T.has(F)),Y=new Set(q),R=A?W.value.visiveis??[]:[],Z=[];for(const F of R)Y.has(F)&&Z.push(F);for(const F of q)Z.includes(F)||Z.push(F);const Q=new Map;for(const F of b)Q.has(F.rotulo)||Q.set(F.rotulo,F);return Z.map(F=>Q.get(F)).filter(Boolean)});function oe(){k.value=!0}function H(){k.value=!1}function N(b){W.value=b,Wa(e.tabela.nome,b),k.value=!1,K.value={}}function ne(b){const D=!!K.value[b];K.value={...K.value,[b]:!D}}const re=t.computed(()=>{const b=e.tabela.registros_por_consulta;return typeof b=="number"&&b>0?Math.floor(b):10}),E=t.computed(()=>{const b=re.value;if(!b||b<=0)return 1;const D=f.value;return D?Math.max(1,Math.ceil(D/b)):1}),u=t.computed(()=>(e.tabela.acoesLinha??[]).length>0);let c=0;function h(b){var R,Z,Q,O,x,F;const D=b.getBoundingClientRect(),A=8,w=((Q=(Z=(R=p.value)==null?void 0:R.menuEl)==null?void 0:Z.value)==null?void 0:Q.offsetHeight)??0,T=((F=(x=(O=p.value)==null?void 0:O.menuEl)==null?void 0:x.value)==null?void 0:F.offsetWidth)??180;let q=D.bottom+A;const Y=D.right-T;w&&q+w>window.innerHeight-A&&(q=D.top-A-w),i.value={top:Math.max(A,Math.round(q)),left:Math.max(A,Math.round(Y))}}function d(b){var A,w;if(r.value===null)return;const D=b.target;(w=(A=p.value)==null?void 0:A.menuEl)!=null&&w.value&&p.value.menuEl.value.contains(D)||(r.value=null)}function C(b){if(b){if(S.value===b){V.value=V.value==="asc"?"desc":"asc",z();return}S.value=b,V.value="asc",y.value!==1?y.value=1:z()}}function B(b){m.value!==b&&(m.value=b,y.value!==1?y.value=1:z())}function M(b){const D=Math.min(Math.max(1,b),E.value);D!==y.value&&(y.value=D)}function P(b){const D=e.tabela.acoesLinha??[],A=o.value[b]??[];return D.map((w,T)=>{const q=w.exibir===void 0?!0:typeof w.exibir=="boolean"?w.exibir:!1;return{acao:w,indice:T,visivel:A[T]??q}}).filter(w=>w.visivel)}function L(b){return P(b).length>0}function J(b,D){if(!L(b))return;if(r.value===b){r.value=null;return}r.value=b;const A=(D==null?void 0:D.currentTarget)??null;A&&(h(A),requestAnimationFrame(()=>h(A)))}async function z(){var T,q;const b=++c;n.value=!0,l.value=null,o.value=[],r.value=null,K.value={};const D=Math.max(1,re.value),w={offSet:(y.value-1)*D,limit:D};m.value&&(w.texto_busca=m.value),S.value&&(w.coluna_ordem=S.value,w.direcao_ordem=V.value);try{const Y=e.tabela,R=await Y.consulta(w);if(b!==c)return;if(R.cod!==ye.sucesso){s.value=[],f.value=0,l.value=R.mensagem;return}const Z=((T=R.valor)==null?void 0:T.valores)??[],Q=((q=R.valor)==null?void 0:q.quantidade)??Z.length;s.value=Z,f.value=Q;const O=Math.max(1,Math.ceil((Q||0)/D));if(y.value>O){y.value=O;return}const x=Y.acoesLinha??[];if(!x.length){o.value=[];return}const F=Z.map(()=>x.map(ie=>ie.exibir===void 0?!0:typeof ie.exibir=="boolean"?ie.exibir:!1));o.value=F;const ho=await Promise.all(Z.map(async ie=>Promise.all(x.map(async ue=>{if(ue.exibir===void 0)return!0;if(typeof ue.exibir=="boolean")return ue.exibir;try{const go=ue.exibir(ie);return!!await Promise.resolve(go)}catch{return!1}}))));b===c&&(o.value=ho)}catch(Y){if(b!==c)return;s.value=[],f.value=0,l.value=Y instanceof Error?Y.message:"Erro ao carregar dados."}finally{b===c&&(n.value=!1)}}return t.onMounted(()=>{document.addEventListener("click",d),z()}),t.onBeforeUnmount(()=>{document.removeEventListener("click",d)}),t.watch(()=>e.tabela.mostrarCaixaDeBusca,b=>{!b&&m.value&&(m.value="",y.value!==1?y.value=1:z())}),t.watch(y,(b,D)=>{b!==D&&z()}),t.watch(()=>e.tabela,()=>{r.value=null,S.value=null,V.value="asc",m.value="",k.value=!1,W.value=we(e.tabela.nome),K.value={},y.value!==1?y.value=1:z()}),t.watch(()=>e.tabela.registros_por_consulta,()=>{y.value!==1?y.value=1:z()}),t.watch(s,()=>{r.value=null,K.value={}}),{isDev:!1,tabela:_,carregando:n,erro:l,linhas:s,quantidade:f,menuAberto:r,valorBusca:m,paginaAtual:y,colunaOrdenacao:S,direcaoOrdenacao:V,totalPaginas:E,exibirBusca:$,acoesCabecalho:v,temAcoesCabecalho:g,temAcoes:u,colunasEfetivas:U,rotulosColunas:G,modalColunasAberto:k,configColunas:W,temColunasInvisiveis:te,colunasInvisiveisEfetivas:X,linhasExpandidas:K,abrirModalColunas:oe,fecharModalColunas:H,salvarModalColunas:N,alternarLinhaExpandida:ne,alternarOrdenacao:C,atualizarBusca:B,irParaPagina:M,acoesDisponiveisPorLinha:P,possuiAcoes:L,toggleMenu:J,menuPopup:p,menuPopupPos:i}}}),Ga={class:"eli-tabela"},Xa={class:"eli-tabela__table"};function Ka(e,a,n,l,s,f){const o=t.resolveComponent("EliTabelaDebug"),r=t.resolveComponent("EliTabelaEstados"),p=t.resolveComponent("EliTabelaCabecalho"),i=t.resolveComponent("EliTabelaModalColunas"),m=t.resolveComponent("EliTabelaHead"),y=t.resolveComponent("EliTabelaBody"),S=t.resolveComponent("EliTabelaMenuAcoes"),V=t.resolveComponent("EliTabelaPaginacao");return t.openBlock(),t.createElementBlock("div",Ga,[t.createVNode(o,{isDev:e.isDev,menuAberto:e.menuAberto,menuPopupPos:e.menuPopupPos},null,8,["isDev","menuAberto","menuPopupPos"]),e.carregando||e.erro||!e.linhas.length?(t.openBlock(),t.createBlock(r,{key:0,carregando:e.carregando,erro:e.erro,mensagemVazio:e.tabela.mensagemVazio},null,8,["carregando","erro","mensagemVazio"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.exibirBusca||e.temAcoesCabecalho?(t.openBlock(),t.createBlock(p,{key:0,exibirBusca:e.exibirBusca,valorBusca:e.valorBusca,acoesCabecalho:e.acoesCabecalho,onBuscar:e.atualizarBusca,onColunas:e.abrirModalColunas},null,8,["exibirBusca","valorBusca","acoesCabecalho","onBuscar","onColunas"])):t.createCommentVNode("",!0),t.createVNode(i,{aberto:e.modalColunasAberto,rotulosColunas:e.rotulosColunas,configInicial:e.configColunas,colunas:e.tabela.colunas,onFechar:e.fecharModalColunas,onSalvar:e.salvarModalColunas},null,8,["aberto","rotulosColunas","configInicial","colunas","onFechar","onSalvar"]),t.createElementVNode("table",Xa,[t.createVNode(m,{colunas:e.colunasEfetivas,temAcoes:e.temAcoes,temColunasInvisiveis:e.temColunasInvisiveis,colunaOrdenacao:e.colunaOrdenacao,direcaoOrdenacao:e.direcaoOrdenacao,onAlternarOrdenacao:e.alternarOrdenacao},null,8,["colunas","temAcoes","temColunasInvisiveis","colunaOrdenacao","direcaoOrdenacao","onAlternarOrdenacao"]),t.createVNode(y,{colunas:e.colunasEfetivas,colunasInvisiveis:e.colunasInvisiveisEfetivas,temColunasInvisiveis:e.temColunasInvisiveis,linhasExpandidas:e.linhasExpandidas,linhas:e.linhas,temAcoes:e.temAcoes,menuAberto:e.menuAberto,possuiAcoes:e.possuiAcoes,toggleMenu:e.toggleMenu,alternarLinhaExpandida:e.alternarLinhaExpandida},null,8,["colunas","colunasInvisiveis","temColunasInvisiveis","linhasExpandidas","linhas","temAcoes","menuAberto","possuiAcoes","toggleMenu","alternarLinhaExpandida"])]),t.createVNode(S,{ref:"menuPopup",menuAberto:e.menuAberto,posicao:e.menuPopupPos,acoes:e.menuAberto===null?[]:e.acoesDisponiveisPorLinha(e.menuAberto),linha:e.menuAberto===null?null:e.linhas[e.menuAberto],onExecutar:a[0]||(a[0]=({acao:_,linha:$})=>{e.menuAberto=null,_.acao($)})},null,8,["menuAberto","posicao","acoes","linha"]),e.totalPaginas>1&&e.quantidade>0?(t.openBlock(),t.createBlock(V,{key:1,pagina:e.paginaAtual,totalPaginas:e.totalPaginas,maximoBotoes:e.tabela.maximo_botoes_paginacao,onAlterar:e.irParaPagina},null,8,["pagina","totalPaginas","maximoBotoes","onAlterar"])):t.createCommentVNode("",!0)],64))])}const Me=I(Za,[["render",Ka]]);function Qa(e){if(!Number.isFinite(e)||e<=0||e>=1)return 0;const a=e.toString();if(a.includes("e-")){const[,s]=a.split("e-"),f=Number(s);return Number.isFinite(f)?f:0}const n=a.indexOf(".");return n===-1?0:a.slice(n+1).replace(/0+$/,"").length}function xa(e){const a=(e??"").trim().replace(/,/g,".");if(!a)return null;const n=Number(a);return Number.isNaN(n)?null:n}function be(e,a){return e==null?"":a===null?String(e):Number(e).toFixed(Math.max(0,a)).replace(/\./g,",")}function Ae(e){return(e??"").replace(/\D+/g,"")}function eo(e){const a=(e??"").replace(/[^0-9.,]+/g,""),n=a.match(/[.,]/);if(!n)return a;const l=n[0],s=a.indexOf(l),f=a.slice(0,s).replace(/[.,]/g,""),o=a.slice(s+1).replace(/[.,]/g,"");return`${f.length?f:"0"}${l}${o}`}function to(e,a){if(a===null)return e;if(a<=0)return e.replace(/[.,]/g,"");const n=e.match(/[.,]/);if(!n)return e;const l=n[0],s=e.indexOf(l),f=e.slice(0,s),o=e.slice(s+1);return`${f}${l}${o.slice(0,a)}`}function ao(e){const a=e.match(/^(\d+)[.,]$/);if(!a)return null;const n=Number(a[1]);return Number.isNaN(n)?null:n}const oo=t.defineComponent({name:"EliEntradaNumero",inheritAttrs:!1,props:{value:{type:[Number,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const l=t.computed(()=>{var m;const i=(m=e.opcoes)==null?void 0:m.precisao;return i==null?null:Qa(i)}),s=t.computed(()=>l.value===0),f=t.computed(()=>{const i=l.value;return i!==null&&i>0}),o=t.ref(""),r=t.ref(void 0);t.watch(()=>e.value,i=>{i!==r.value&&(o.value=be(i,l.value),r.value=i)},{immediate:!0});function p(i){if(f.value){const V=l.value??0,_=Ae(i),$=_?Number(_):0,v=Math.pow(10,V),g=_?$/v:null,k=g===null?null:g;r.value=k,n("update:value",k),n("input",k),n("change",k),o.value=be(k,V);return}const m=s.value?Ae(i):eo(i),y=s.value?m:to(m,l.value);let S=null;if(y){const _=(s.value?null:ao(y))??xa(y);S=_===null?null:_}r.value=S,n("update:value",S),n("input",S),n("change",S),o.value=be(S,l.value)}return{attrs:a,emit:n,displayValue:o,isInteiro:s,onUpdateModelValue:p}}}),no={class:"eli-entrada__prefixo"},lo={class:"eli-entrada__sufixo"};function ro(e,a,n,l,s,f){var o,r,p,i;return t.openBlock(),t.createBlock(me.VTextField,t.mergeProps({"model-value":e.displayValue,label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(r=e.opcoes)==null?void 0:r.placeholder,type:e.isInteiro?"number":"text",inputmode:e.isInteiro?"numeric":"decimal",pattern:e.isInteiro?"[0-9]*":"[0-9.,]*"},e.attrs,{"onUpdate:modelValue":e.onUpdateModelValue,onFocus:a[0]||(a[0]=()=>e.emit("focus")),onBlur:a[1]||(a[1]=()=>e.emit("blur"))}),t.createSlots({_:2},[(p=e.opcoes)!=null&&p.prefixo?{name:"prepend-inner",fn:t.withCtx(()=>[t.createElementVNode("span",no,t.toDisplayString(e.opcoes.prefixo),1)]),key:"0"}:void 0,(i=e.opcoes)!=null&&i.sufixo?{name:"append-inner",fn:t.withCtx(()=>[t.createElementVNode("span",lo,t.toDisplayString(e.opcoes.sufixo),1)]),key:"1"}:void 0]),1040,["model-value","label","placeholder","type","inputmode","pattern","onUpdate:modelValue"])}const Te=I(oo,[["render",ro],["__scopeId","data-v-77cbf216"]]);function io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ce={exports:{}},so=ce.exports,Pe;function co(){return Pe||(Pe=1,(function(e,a){(function(n,l){e.exports=l()})(so,(function(){var n=1e3,l=6e4,s=36e5,f="millisecond",o="second",r="minute",p="hour",i="day",m="week",y="month",S="quarter",V="year",_="date",$="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var u=["th","st","nd","rd"],c=E%100;return"["+E+(u[(c-20)%10]||u[c]||u[0])+"]"}},W=function(E,u,c){var h=String(E);return!h||h.length>=u?E:""+Array(u+1-h.length).join(c)+E},K={s:W,z:function(E){var u=-E.utcOffset(),c=Math.abs(u),h=Math.floor(c/60),d=c%60;return(u<=0?"+":"-")+W(h,2,"0")+":"+W(d,2,"0")},m:function E(u,c){if(u.date()<c.date())return-E(c,u);var h=12*(c.year()-u.year())+(c.month()-u.month()),d=u.clone().add(h,y),C=c-d<0,B=u.clone().add(h+(C?-1:1),y);return+(-(h+(c-d)/(C?d-B:B-d))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:y,y:V,w:m,d:i,D:_,h:p,m:r,s:o,ms:f,Q:S}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},G="en",X={};X[G]=k;var te="$isDayjsObject",U=function(E){return E instanceof ne||!(!E||!E[te])},oe=function E(u,c,h){var d;if(!u)return G;if(typeof u=="string"){var C=u.toLowerCase();X[C]&&(d=C),c&&(X[C]=c,d=C);var B=u.split("-");if(!d&&B.length>1)return E(B[0])}else{var M=u.name;X[M]=u,d=M}return!h&&d&&(G=d),d||!h&&G},H=function(E,u){if(U(E))return E.clone();var c=typeof u=="object"?u:{};return c.date=E,c.args=arguments,new ne(c)},N=K;N.l=oe,N.i=U,N.w=function(E,u){return H(E,{locale:u.$L,utc:u.$u,x:u.$x,$offset:u.$offset})};var ne=(function(){function E(c){this.$L=oe(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[te]=!0}var u=E.prototype;return u.parse=function(c){this.$d=(function(h){var d=h.date,C=h.utc;if(d===null)return new Date(NaN);if(N.u(d))return new Date;if(d instanceof Date)return new Date(d);if(typeof d=="string"&&!/Z$/i.test(d)){var B=d.match(v);if(B){var M=B[2]-1||0,P=(B[7]||"0").substring(0,3);return C?new Date(Date.UTC(B[1],M,B[3]||1,B[4]||0,B[5]||0,B[6]||0,P)):new Date(B[1],M,B[3]||1,B[4]||0,B[5]||0,B[6]||0,P)}}return new Date(d)})(c),this.init()},u.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},u.$utils=function(){return N},u.isValid=function(){return this.$d.toString()!==$},u.isSame=function(c,h){var d=H(c);return this.startOf(h)<=d&&d<=this.endOf(h)},u.isAfter=function(c,h){return H(c)<this.startOf(h)},u.isBefore=function(c,h){return this.endOf(h)<H(c)},u.$g=function(c,h,d){return N.u(c)?this[h]:this.set(d,c)},u.unix=function(){return Math.floor(this.valueOf()/1e3)},u.valueOf=function(){return this.$d.getTime()},u.startOf=function(c,h){var d=this,C=!!N.u(h)||h,B=N.p(c),M=function(w,T){var q=N.w(d.$u?Date.UTC(d.$y,T,w):new Date(d.$y,T,w),d);return C?q:q.endOf(i)},P=function(w,T){return N.w(d.toDate()[w].apply(d.toDate("s"),(C?[0,0,0,0]:[23,59,59,999]).slice(T)),d)},L=this.$W,J=this.$M,z=this.$D,b="set"+(this.$u?"UTC":"");switch(B){case V:return C?M(1,0):M(31,11);case y:return C?M(1,J):M(0,J+1);case m:var D=this.$locale().weekStart||0,A=(L<D?L+7:L)-D;return M(C?z-A:z+(6-A),J);case i:case _:return P(b+"Hours",0);case p:return P(b+"Minutes",1);case r:return P(b+"Seconds",2);case o:return P(b+"Milliseconds",3);default:return this.clone()}},u.endOf=function(c){return this.startOf(c,!1)},u.$set=function(c,h){var d,C=N.p(c),B="set"+(this.$u?"UTC":""),M=(d={},d[i]=B+"Date",d[_]=B+"Date",d[y]=B+"Month",d[V]=B+"FullYear",d[p]=B+"Hours",d[r]=B+"Minutes",d[o]=B+"Seconds",d[f]=B+"Milliseconds",d)[C],P=C===i?this.$D+(h-this.$W):h;if(C===y||C===V){var L=this.clone().set(_,1);L.$d[M](P),L.init(),this.$d=L.set(_,Math.min(this.$D,L.daysInMonth())).$d}else M&&this.$d[M](P);return this.init(),this},u.set=function(c,h){return this.clone().$set(c,h)},u.get=function(c){return this[N.p(c)]()},u.add=function(c,h){var d,C=this;c=Number(c);var B=N.p(h),M=function(J){var z=H(C);return N.w(z.date(z.date()+Math.round(J*c)),C)};if(B===y)return this.set(y,this.$M+c);if(B===V)return this.set(V,this.$y+c);if(B===i)return M(1);if(B===m)return M(7);var P=(d={},d[r]=l,d[p]=s,d[o]=n,d)[B]||1,L=this.$d.getTime()+c*P;return N.w(L,this)},u.subtract=function(c,h){return this.add(-1*c,h)},u.format=function(c){var h=this,d=this.$locale();if(!this.isValid())return d.invalidDate||$;var C=c||"YYYY-MM-DDTHH:mm:ssZ",B=N.z(this),M=this.$H,P=this.$m,L=this.$M,J=d.weekdays,z=d.months,b=d.meridiem,D=function(T,q,Y,R){return T&&(T[q]||T(h,C))||Y[q].slice(0,R)},A=function(T){return N.s(M%12||12,T,"0")},w=b||function(T,q,Y){var R=T<12?"AM":"PM";return Y?R.toLowerCase():R};return C.replace(g,(function(T,q){return q||(function(Y){switch(Y){case"YY":return String(h.$y).slice(-2);case"YYYY":return N.s(h.$y,4,"0");case"M":return L+1;case"MM":return N.s(L+1,2,"0");case"MMM":return D(d.monthsShort,L,z,3);case"MMMM":return D(z,L);case"D":return h.$D;case"DD":return N.s(h.$D,2,"0");case"d":return String(h.$W);case"dd":return D(d.weekdaysMin,h.$W,J,2);case"ddd":return D(d.weekdaysShort,h.$W,J,3);case"dddd":return J[h.$W];case"H":return String(M);case"HH":return N.s(M,2,"0");case"h":return A(1);case"hh":return A(2);case"a":return w(M,P,!0);case"A":return w(M,P,!1);case"m":return String(P);case"mm":return N.s(P,2,"0");case"s":return String(h.$s);case"ss":return N.s(h.$s,2,"0");case"SSS":return N.s(h.$ms,3,"0");case"Z":return B}return null})(T)||B.replace(":","")}))},u.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},u.diff=function(c,h,d){var C,B=this,M=N.p(h),P=H(c),L=(P.utcOffset()-this.utcOffset())*l,J=this-P,z=function(){return N.m(B,P)};switch(M){case V:C=z()/12;break;case y:C=z();break;case S:C=z()/3;break;case m:C=(J-L)/6048e5;break;case i:C=(J-L)/864e5;break;case p:C=J/s;break;case r:C=J/l;break;case o:C=J/n;break;default:C=J}return d?C:N.a(C)},u.daysInMonth=function(){return this.endOf(y).$D},u.$locale=function(){return X[this.$L]},u.locale=function(c,h){if(!c)return this.$L;var d=this.clone(),C=oe(c,h,!0);return C&&(d.$L=C),d},u.clone=function(){return N.w(this.$d,this)},u.toDate=function(){return new Date(this.valueOf())},u.toJSON=function(){return this.isValid()?this.toISOString():null},u.toISOString=function(){return this.$d.toISOString()},u.toString=function(){return this.$d.toUTCString()},E})(),re=ne.prototype;return H.prototype=re,[["$ms",f],["$s",o],["$m",r],["$H",p],["$W",i],["$M",y],["$y",V],["$D",_]].forEach((function(E){re[E[1]]=function(u){return this.$g(u,E[0],E[1])}})),H.extend=function(E,u){return E.$i||(E(u,ne,H),E.$i=!0),H},H.locale=oe,H.isDayjs=U,H.unix=function(E){return H(1e3*E)},H.en=X[G],H.Ls=X,H.p={},H}))})(ce)),ce.exports}var uo=co();const de=io(uo),mo=t.defineComponent({name:"EliEntradaDataHora",inheritAttrs:!1,props:{value:{type:String,default:void 0},opcoes:{type:Object,required:!1,default:void 0},modelValue:{type:String,default:null},modo:{type:String,default:void 0},rotulo:{type:String,default:void 0},placeholder:{type:String,default:void 0},desabilitado:{type:Boolean,default:void 0},limpavel:{type:Boolean,default:void 0},erro:{type:Boolean,default:void 0},mensagensErro:{type:[String,Array],default:void 0},dica:{type:String,default:void 0},dicaPersistente:{type:Boolean,default:void 0},densidade:{type:String,default:void 0},variante:{type:String,default:void 0},min:{type:String,default:void 0},max:{type:String,default:void 0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,"update:modelValue":e=>!0,alterar:e=>!0,foco:()=>!0,desfoco:()=>!0,focus:()=>!0,blur:()=>!0},setup(e,{emit:a,attrs:n}){const l=t.computed(()=>e.opcoes?e.opcoes:{rotulo:e.rotulo??"Data e hora",placeholder:e.placeholder??"",modo:e.modo??"dataHora",limpavel:e.limpavel,erro:e.erro,mensagensErro:e.mensagensErro,dica:e.dica,dicaPersistente:e.dicaPersistente,densidade:e.densidade,variante:e.variante,min:e.min,max:e.max}),s=t.computed(()=>l.value.modo??"dataHora"),f=t.computed(()=>!!e.desabilitado),o=t.computed(()=>s.value==="data"?"date":"datetime-local");function r($){return s.value==="data"?de($).format("YYYY-MM-DD"):de($).format("YYYY-MM-DDTHH:mm")}function p($){return s.value==="data"?de(`${$}T00:00`).format():de($).format()}const i=t.computed(()=>e.value!==void 0?e.value??null:e.modelValue),m=t.computed({get:()=>i.value?r(i.value):"",set:$=>{const v=$&&$.length>0?$:null;if(!v){a("update:value",null),a("input",null),a("change",null),a("update:modelValue",null),a("alterar",null);return}const g=p(v);a("update:value",g),a("input",g),a("change",g),a("update:modelValue",g),a("alterar",g)}}),y=t.computed(()=>{const $=l.value.min;if($)return r($)}),S=t.computed(()=>{const $=l.value.max;if($)return r($)});function V(){a("foco"),a("focus")}function _(){a("desfoco"),a("blur")}return{attrs:n,valor:m,tipoInput:o,minLocal:y,maxLocal:S,opcoesEfetivas:l,desabilitadoEfetivo:f,emitCompatFocus:V,emitCompatBlur:_}}}),po={class:"eli-data-hora"};function fo(e,a,n,l,s,f){return t.openBlock(),t.createElementBlock("div",po,[t.createVNode(me.VTextField,t.mergeProps({modelValue:e.valor,"onUpdate:modelValue":a[0]||(a[0]=o=>e.valor=o),type:e.tipoInput,label:e.opcoesEfetivas.rotulo,placeholder:e.opcoesEfetivas.placeholder,disabled:e.desabilitadoEfetivo,clearable:!!e.opcoesEfetivas.limpavel,error:!!e.opcoesEfetivas.erro,"error-messages":e.opcoesEfetivas.mensagensErro,hint:e.opcoesEfetivas.dica,"persistent-hint":!!e.opcoesEfetivas.dicaPersistente,density:e.opcoesEfetivas.densidade??"comfortable",variant:e.opcoesEfetivas.variante??"outlined",min:e.minLocal,max:e.maxLocal},e.attrs,{onFocus:e.emitCompatFocus,onBlur:e.emitCompatBlur}),null,16,["modelValue","type","label","placeholder","disabled","clearable","error","error-messages","hint","persistent-hint","density","variant","min","max","onFocus","onBlur"])])}const Oe=I(mo,[["render",fo],["__scopeId","data-v-1bfd1be8"]]),bo={install(e){e.component("EliOlaMundo",ge),e.component("EliBotao",pe),e.component("EliBadge",se),e.component("EliCartao",$e),e.component("EliTabela",Me),e.component("EliEntradaTexto",fe),e.component("EliEntradaNumero",Te),e.component("EliEntradaDataHora",Oe)}};j.EliBadge=se,j.EliBotao=pe,j.EliCartao=$e,j.EliEntradaDataHora=Oe,j.EliEntradaNumero=Te,j.EliEntradaTexto=fe,j.EliOlaMundo=ge,j.EliTabela=Me,j.default=bo,Object.defineProperties(j,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));