vue-componentes/dist/eli-vue.umd.js
2026-01-28 09:44:18 -03:00

66 lines
43 KiB
JavaScript

(function(S,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vuetify/components/VBtn"),require("vuetify/components/VBadge"),require("vuetify/components/VCheckbox"),require("vuetify/components/VIcon"),require("vuetify/components/VRadio"),require("vuetify/components/VRadioGroup"),require("vuetify/components/VSelect"),require("vuetify/components/VTextField"),require("vuetify/components/VTextarea"),require("vuetify/components/VCard"),require("vuetify/components/VGrid")):typeof define=="function"&&define.amd?define(["exports","vue","vuetify/components/VBtn","vuetify/components/VBadge","vuetify/components/VCheckbox","vuetify/components/VIcon","vuetify/components/VRadio","vuetify/components/VRadioGroup","vuetify/components/VSelect","vuetify/components/VTextField","vuetify/components/VTextarea","vuetify/components/VCard","vuetify/components/VGrid"],t):(S=typeof globalThis<"u"?globalThis:S||self,t(S.eli_vue={},S.Vue,S.VBtn,S.VBadge,S.VCheckbox,S.VIcon,S.VRadio,S.VRadioGroup,S.VSelect,S.VTextField,S.VTextarea,S.VCard,S.VGrid))})(this,(function(S,t,Be,Ce,Ee,we,Se,_e,Me,se,De,R,Ne){"use strict";const Pe=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 d=e.__vccOpts||e;for(const[m,h]of a)d[m]=h;return d};function Te(e,a,d,m,h,$){return t.openBlock(),t.createBlock(Be.VBtn,t.mergeProps({color:e.color,variant:e.variant,size:e.size,disabled:e.disabled,loading:e.loading},e.$attrs,{class:"text-none pt-1"}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["color","variant","size","disabled","loading"])}const ne=I(Pe,[["render",Te]]),de={suave:"4px",pill:"10px"},Ae=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 de?de[e.radius]:e.radius),d=t.computed(()=>e.dot||e.badge!==void 0?e.visible:!1),m=t.computed(()=>({"--eli-badge-radius":a.value}));return{showBadge:d,badgeStyle:m}}});function Oe(e,a,d,m,h,$){return e.showBadge?(t.openBlock(),t.createBlock(Ce.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}),{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 x=I(Ae,[["render",Oe],["__scopeId","data-v-de2fbf2f"]]);function Ie(e){return e.replace(/\D+/g,"")}function Le(e){const a=Ie(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 Ue(e){return e.replace(/\D+/g,"")}function Fe(e){const a=Ue(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 re(e){return e.replace(/\D+/g,"")}function ce(e){const a=e.replace(/[^\d,]/g,""),d=a.split(",");return d.length>2?d[0]+","+d.slice(1).join(""):a}function je(e){return ce(e.replace(/%/g,""))}function ze(e){const a=re(e);return a?(parseInt(a,10)/100).toFixed(2).replace(".",",").replace(/\B(?=(\d{3})+(?!\d))/g,"."):""}function qe(e){const a=re(e).slice(0,8);return a.length<=5?a:a.replace(/^(\d{5})(\d{1,3})$/,"$1-$2")}const ve=t.defineComponent({name:"EliInput",inheritAttrs:!1,props:{modelValue:{type:[String,Number,Boolean,Array],default:""},type:{type:String,default:"text"},label:String,placeholder:String,disabled:Boolean,error:Boolean,errorMessages:{type:[String,Array],default:()=>[]},hint:String,persistentHint:Boolean,rows:{type:Number,default:4},options:{type:Array,default:()=>[]},clearable:Boolean,variant:{type:String,default:"outlined"},density:{type:String,default:"comfortable"},color:{type:String,default:"primary"},row:Boolean,showPasswordToggle:Boolean,multiple:Boolean,chips:Boolean},emits:["update:modelValue","change","focus","blur"],setup(e,{emit:a,attrs:d}){const m=t.ref(!1),h=t.ref(!1),$=t.computed({get:()=>e.modelValue,set:f=>{a("update:modelValue",f),a("change",f)}}),i=t.computed(()=>["text","password","email","search","url","telefone","cpfCnpj","numericoInteiro","numericoDecimal","numericoMoeda","porcentagem","cep"].includes(e.type)),p=t.computed(()=>e.type==="password"?h.value?"text":"password":"text"),k=t.computed(()=>{if(e.type==="telefone")return"tel";if(e.type==="porcentagem")return"decimal";if(e.type.startsWith("numerico"))return"numeric"}),r=t.computed(()=>e.error?"error":m.value?e.color:void 0);function E(f){const D=f.target;let B=D.value;switch(e.type){case"numericoInteiro":B=re(B);break;case"numericoDecimal":B=ce(B);break;case"numericoMoeda":B=ze(B);break;case"porcentagem":B=je(B);break;case"telefone":B=Fe(B);break;case"cpfCnpj":B=Le(B);break;case"cep":B=qe(B);break}D.value=B,a("update:modelValue",B),a("change",B)}function b(){h.value=!h.value}const g=t.computed(()=>(e.options||[]).map(f=>{if(f&&typeof f=="object"&&"value"in f){const B=f.value;return{label:f.label??String(B),value:B,disabled:f.disabled}}const D=f;return{label:String(D),value:D}}));return{attrs:d,value:$,isTextLike:i,inputHtmlType:p,inputMode:k,internalColor:r,showPassword:h,togglePassword:b,onInput:E,onFocus:()=>a("focus"),onBlur:()=>a("blur"),computedItems:g}}}),He={class:"eli-input"},Ye={key:4,class:"checkbox-group"};function Re(e,a,d,m,h,$){return t.openBlock(),t.createElementBlock("div",He,[e.isTextLike?(t.openBlock(),t.createBlock(se.VTextField,t.mergeProps({key:0,modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=i=>e.value=i),type:e.inputHtmlType,label:e.label,placeholder:e.placeholder,disabled:e.disabled,clearable:e.clearable&&e.type!=="password",error:e.error,"error-messages":e.errorMessages,hint:e.hint,"persistent-hint":e.persistentHint,density:e.density,variant:e.variant,color:e.internalColor,inputmode:e.inputMode,suffix:e.type==="porcentagem"?"%":void 0},e.attrs,{onFocus:e.onFocus,onBlur:e.onBlur,onInput:e.onInput}),t.createSlots({_:2},[e.type==="password"&&e.showPasswordToggle?{name:"append-inner",fn:t.withCtx(()=>[t.createVNode(we.VIcon,{class:"cursor-pointer",onClick:e.togglePassword},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.showPassword?"mdi-eye-off":"mdi-eye"),1)]),_:1},8,["onClick"])]),key:"0"}:void 0]),1040,["modelValue","type","label","placeholder","disabled","clearable","error","error-messages","hint","persistent-hint","density","variant","color","inputmode","suffix","onFocus","onBlur","onInput"])):e.type==="textarea"?(t.openBlock(),t.createBlock(De.VTextarea,t.mergeProps({key:1,modelValue:e.value,"onUpdate:modelValue":a[1]||(a[1]=i=>e.value=i),label:e.label,rows:e.rows,density:e.density,variant:e.variant},e.attrs),null,16,["modelValue","label","rows","density","variant"])):e.type==="select"?(t.openBlock(),t.createBlock(Me.VSelect,t.mergeProps({key:2,modelValue:e.value,"onUpdate:modelValue":a[2]||(a[2]=i=>e.value=i),items:e.computedItems,label:e.label,placeholder:e.placeholder,multiple:e.multiple,chips:e.chips,clearable:e.clearable,disabled:e.disabled,density:e.density,variant:e.variant,"item-title":"label","item-value":"value",error:e.error,"error-messages":e.errorMessages},e.attrs,{onFocus:e.onFocus,onBlur:e.onBlur}),null,16,["modelValue","items","label","placeholder","multiple","chips","clearable","disabled","density","variant","error","error-messages","onFocus","onBlur"])):e.type==="radio"?(t.openBlock(),t.createBlock(_e.VRadioGroup,{key:3,modelValue:e.value,"onUpdate:modelValue":a[3]||(a[3]=i=>e.value=i),row:e.row},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.computedItems,i=>(t.openBlock(),t.createBlock(Se.VRadio,{key:String(i.value),label:i.label,value:i.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","row"])):e.type==="checkbox"?(t.openBlock(),t.createElementBlock("div",Ye,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.computedItems,i=>(t.openBlock(),t.createBlock(Ee.VCheckbox,{key:String(i.value),modelValue:e.value,"onUpdate:modelValue":a[4]||(a[4]=p=>e.value=p),label:i.label,value:i.value,density:e.density},null,8,["modelValue","label","value","density"]))),128))])):t.createCommentVNode("",!0)])}const le=I(ve,[["render",Re],["__scopeId","data-v-756cb549"]]),We=t.defineComponent({name:"EliOlaMundo",components:{EliBotao:ne,EliBadge:x,EliInput:le},setup(){const e=t.ref(""),a=t.ref([]),d=t.ref(""),m=t.ref(""),h=t.ref(""),$=t.ref(""),i=t.ref(""),p=t.ref(""),k=t.ref(""),r=t.ref(""),E=t.ref(""),b=t.ref(null),g=t.ref([]);return{nome:e,email:p,documento:E,estado:a,telefone:m,mensagem:k,senha:r,cor:b,habilidades:g,idade:h,altura:$,cep:d,valor:i}}}),Ge={class:"grid-example"};function Je(e,a,d,m,h,$){const i=t.resolveComponent("EliBadge"),p=t.resolveComponent("EliInput"),k=t.resolveComponent("EliBotao");return t.openBlock(),t.createBlock(Ne.VContainer,null,{default:t.withCtx(()=>[t.createVNode(R.VCard,{class:"mx-auto",max_width:"400"},{default:t.withCtx(()=>[t.createVNode(R.VCardTitle,null,{default:t.withCtx(()=>[t.createVNode(i,{badge:"Novo","offset-x":"-15",location:"right center"},{default:t.withCtx(()=>[...a[14]||(a[14]=[t.createTextVNode(" Olá Mundo! ",-1)])]),_:1})]),_:1}),t.createVNode(R.VCardText,null,{default:t.withCtx(()=>[a[15]||(a[15]=t.createTextVNode(" Este é um componente de exemplo integrado com Vuetify. ",-1)),t.createElementVNode("div",Ge,[t.createVNode(p,{modelValue:e.nome,"onUpdate:modelValue":a[0]||(a[0]=r=>e.nome=r),label:"Nome",placeholder:"Digite o nome",density:"compact"},null,8,["modelValue"]),t.createVNode(p,{modelValue:e.idade,"onUpdate:modelValue":a[1]||(a[1]=r=>e.idade=r),type:"numericoInteiro",label:"Idade",density:"default"},null,8,["modelValue"]),t.createVNode(p,{modelValue:e.altura,"onUpdate:modelValue":a[2]||(a[2]=r=>e.altura=r),type:"numericoDecimal",label:"Altura",density:"comfortable"},null,8,["modelValue"]),t.createVNode(p,{modelValue:e.valor,"onUpdate:modelValue":a[3]||(a[3]=r=>e.valor=r),type:"numericoMoeda",label:"Valor"},null,8,["modelValue"]),t.createVNode(p,{modelValue:e.telefone,"onUpdate:modelValue":a[4]||(a[4]=r=>e.telefone=r),type:"telefone",label:"Telefone"},null,8,["modelValue"]),t.createVNode(p,{modelValue:e.cep,"onUpdate:modelValue":a[5]||(a[5]=r=>e.cep=r),type:"cep",label:"CEP",placeholder:"00000-000"},null,8,["modelValue"]),t.createVNode(p,{type:"select",label:"Estado",options:[{label:"São Paulo",value:"SP"},{label:"Rio de Janeiro",value:"RJ"}],modelValue:e.estado,"onUpdate:modelValue":a[6]||(a[6]=r=>e.estado=r),multiple:""},null,8,["modelValue"]),t.createVNode(p,{modelValue:e.documento,"onUpdate:modelValue":a[7]||(a[7]=r=>e.documento=r),type:"cpfCnpj",label:"CPF / CNPJ"},null,8,["modelValue"]),t.createVNode(p,{modelValue:e.email,"onUpdate:modelValue":a[8]||(a[8]=r=>e.email=r),label:"Email",placeholder:"email@exemplo.com"},null,8,["modelValue"]),t.createVNode(p,{modelValue:e.senha,"onUpdate:modelValue":a[9]||(a[9]=r=>e.senha=r),label:"Senha",type:"password",showPasswordToggle:!0,placeholder:"Digite sua senha"},null,8,["modelValue"]),t.createVNode(p,{type:"textarea",modelValue:e.mensagem,"onUpdate:modelValue":a[10]||(a[10]=r=>e.mensagem=r),label:"Mensagem",rows:5},null,8,["modelValue"]),t.createVNode(p,{type:"radio",modelValue:e.cor,"onUpdate:modelValue":a[11]||(a[11]=r=>e.cor=r),label:"Cor favorita",options:[{label:"Azul",value:"azul"},{label:"Verde",value:"verde"}]},null,8,["modelValue"]),t.createVNode(p,{type:"checkbox",modelValue:e.habilidades,"onUpdate:modelValue":a[12]||(a[12]=r=>e.habilidades=r),options:[{label:"Vue",value:"vue"},{label:"React",value:"react"}]},null,8,["modelValue"]),t.createVNode(p,{modelValue:e.nome,"onUpdate:modelValue":a[13]||(a[13]=r=>e.nome=r),label:"Nome",error:!0,"error-messages":["Obrigatório"]},null,8,["modelValue"])])]),_:1}),t.createVNode(R.VCardActions,null,{default:t.withCtx(()=>[t.createVNode(k,{color:"primary",variant:"elevated",block:""},{default:t.withCtx(()=>[...a[16]||(a[16]=[t.createTextVNode(" Botão Vuetify ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})}const ue=I(We,[["render",Je]]),Ze=t.defineComponent({name:"EliCartao",components:{EliBadge:x},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 d=t.computed(()=>e.status),m=t.computed(()=>{switch(e.status){case"novo":return"primary";case"rascunho":return"secondary";case"vendido":return"success";case"cancelado":return"error"}}),h=t.computed(()=>`eli-cartao--${e.status}`);function $(){a("clicar",e.status)}return{rotuloStatus:d,corStatus:m,classeStatus:h,onClick:$}}}),Xe={class:"eli-cartao__titulo-texto"},Ke={class:"eli-cartao__status"};function Qe(e,a,d,m,h,$){const i=t.resolveComponent("EliBadge");return t.openBlock(),t.createBlock(R.VCard,t.mergeProps({class:["eli-cartao",e.classeStatus],variant:e.variant},e.$attrs),{default:t.withCtx(()=>[t.createVNode(R.VCardTitle,{class:"eli-cartao__titulo"},{default:t.withCtx(()=>[t.createElementVNode("div",Xe,[t.renderSlot(e.$slots,"titulo",{},()=>[t.createTextVNode(t.toDisplayString(e.titulo),1)],!0)]),t.createElementVNode("div",Ke,[t.createVNode(i,{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(R.VCardText,{class:"eli-cartao__conteudo"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3}),e.$slots.acoes?(t.openBlock(),t.createBlock(R.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 me=I(Ze,[["render",Qe],["__scopeId","data-v-6c492bd9"]]);function xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ee={exports:{}},et=ee.exports,pe;function tt(){return pe||(pe=1,(function(e,a){(function(d,m){e.exports=m()})(et,(function(){var d=1e3,m=6e4,h=36e5,$="millisecond",i="second",p="minute",k="hour",r="day",E="week",b="month",g="quarter",f="year",D="date",B="Invalid Date",L=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,U=/\[([^\]]+)]|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,A={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(y){var s=["th","st","nd","rd"],l=y%100;return"["+y+(s[(l-20)%10]||s[l]||s[0])+"]"}},z=function(y,s,l){var o=String(y);return!o||o.length>=s?y:""+Array(s+1-o.length).join(l)+y},ie={s:z,z:function(y){var s=-y.utcOffset(),l=Math.abs(s),o=Math.floor(l/60),n=l%60;return(s<=0?"+":"-")+z(o,2,"0")+":"+z(n,2,"0")},m:function y(s,l){if(s.date()<l.date())return-y(l,s);var o=12*(l.year()-s.year())+(l.month()-s.month()),n=s.clone().add(o,b),c=l-n<0,u=s.clone().add(o+(c?-1:1),b);return+(-(o+(l-n)/(c?n-u:u-n))||0)},a:function(y){return y<0?Math.ceil(y)||0:Math.floor(y)},p:function(y){return{M:b,y:f,w:E,d:r,D,h:k,m:p,s:i,ms:$,Q:g}[y]||String(y||"").toLowerCase().replace(/s$/,"")},u:function(y){return y===void 0}},W="en",q={};q[W]=A;var oe="$isDayjsObject",K=function(y){return y instanceof J||!(!y||!y[oe])},G=function y(s,l,o){var n;if(!s)return W;if(typeof s=="string"){var c=s.toLowerCase();q[c]&&(n=c),l&&(q[c]=l,n=c);var u=s.split("-");if(!n&&u.length>1)return y(u[0])}else{var V=s.name;q[V]=s,n=V}return!o&&n&&(W=n),n||!o&&W},N=function(y,s){if(K(y))return y.clone();var l=typeof s=="object"?s:{};return l.date=y,l.args=arguments,new J(l)},C=ie;C.l=G,C.i=K,C.w=function(y,s){return N(y,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})};var J=(function(){function y(l){this.$L=G(l.locale,null,!0),this.parse(l),this.$x=this.$x||l.x||{},this[oe]=!0}var s=y.prototype;return s.parse=function(l){this.$d=(function(o){var n=o.date,c=o.utc;if(n===null)return new Date(NaN);if(C.u(n))return new Date;if(n instanceof Date)return new Date(n);if(typeof n=="string"&&!/Z$/i.test(n)){var u=n.match(L);if(u){var V=u[2]-1||0,w=(u[7]||"0").substring(0,3);return c?new Date(Date.UTC(u[1],V,u[3]||1,u[4]||0,u[5]||0,u[6]||0,w)):new Date(u[1],V,u[3]||1,u[4]||0,u[5]||0,u[6]||0,w)}}return new Date(n)})(l),this.init()},s.init=function(){var l=this.$d;this.$y=l.getFullYear(),this.$M=l.getMonth(),this.$D=l.getDate(),this.$W=l.getDay(),this.$H=l.getHours(),this.$m=l.getMinutes(),this.$s=l.getSeconds(),this.$ms=l.getMilliseconds()},s.$utils=function(){return C},s.isValid=function(){return this.$d.toString()!==B},s.isSame=function(l,o){var n=N(l);return this.startOf(o)<=n&&n<=this.endOf(o)},s.isAfter=function(l,o){return N(l)<this.startOf(o)},s.isBefore=function(l,o){return this.endOf(o)<N(l)},s.$g=function(l,o,n){return C.u(l)?this[o]:this.set(n,l)},s.unix=function(){return Math.floor(this.valueOf()/1e3)},s.valueOf=function(){return this.$d.getTime()},s.startOf=function(l,o){var n=this,c=!!C.u(o)||o,u=C.p(l),V=function(Y,T){var O=C.w(n.$u?Date.UTC(n.$y,T,Y):new Date(n.$y,T,Y),n);return c?O:O.endOf(r)},w=function(Y,T){return C.w(n.toDate()[Y].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(T)),n)},_=this.$W,M=this.$M,P=this.$D,v="set"+(this.$u?"UTC":"");switch(u){case f:return c?V(1,0):V(31,11);case b:return c?V(1,M):V(0,M+1);case E:var F=this.$locale().weekStart||0,H=(_<F?_+7:_)-F;return V(c?P-H:P+(6-H),M);case r:case D:return w(v+"Hours",0);case k:return w(v+"Minutes",1);case p:return w(v+"Seconds",2);case i:return w(v+"Milliseconds",3);default:return this.clone()}},s.endOf=function(l){return this.startOf(l,!1)},s.$set=function(l,o){var n,c=C.p(l),u="set"+(this.$u?"UTC":""),V=(n={},n[r]=u+"Date",n[D]=u+"Date",n[b]=u+"Month",n[f]=u+"FullYear",n[k]=u+"Hours",n[p]=u+"Minutes",n[i]=u+"Seconds",n[$]=u+"Milliseconds",n)[c],w=c===r?this.$D+(o-this.$W):o;if(c===b||c===f){var _=this.clone().set(D,1);_.$d[V](w),_.init(),this.$d=_.set(D,Math.min(this.$D,_.daysInMonth())).$d}else V&&this.$d[V](w);return this.init(),this},s.set=function(l,o){return this.clone().$set(l,o)},s.get=function(l){return this[C.p(l)]()},s.add=function(l,o){var n,c=this;l=Number(l);var u=C.p(o),V=function(M){var P=N(c);return C.w(P.date(P.date()+Math.round(M*l)),c)};if(u===b)return this.set(b,this.$M+l);if(u===f)return this.set(f,this.$y+l);if(u===r)return V(1);if(u===E)return V(7);var w=(n={},n[p]=m,n[k]=h,n[i]=d,n)[u]||1,_=this.$d.getTime()+l*w;return C.w(_,this)},s.subtract=function(l,o){return this.add(-1*l,o)},s.format=function(l){var o=this,n=this.$locale();if(!this.isValid())return n.invalidDate||B;var c=l||"YYYY-MM-DDTHH:mm:ssZ",u=C.z(this),V=this.$H,w=this.$m,_=this.$M,M=n.weekdays,P=n.months,v=n.meridiem,F=function(T,O,j,Z){return T&&(T[O]||T(o,c))||j[O].slice(0,Z)},H=function(T){return C.s(V%12||12,T,"0")},Y=v||function(T,O,j){var Z=T<12?"AM":"PM";return j?Z.toLowerCase():Z};return c.replace(U,(function(T,O){return O||(function(j){switch(j){case"YY":return String(o.$y).slice(-2);case"YYYY":return C.s(o.$y,4,"0");case"M":return _+1;case"MM":return C.s(_+1,2,"0");case"MMM":return F(n.monthsShort,_,P,3);case"MMMM":return F(P,_);case"D":return o.$D;case"DD":return C.s(o.$D,2,"0");case"d":return String(o.$W);case"dd":return F(n.weekdaysMin,o.$W,M,2);case"ddd":return F(n.weekdaysShort,o.$W,M,3);case"dddd":return M[o.$W];case"H":return String(V);case"HH":return C.s(V,2,"0");case"h":return H(1);case"hh":return H(2);case"a":return Y(V,w,!0);case"A":return Y(V,w,!1);case"m":return String(w);case"mm":return C.s(w,2,"0");case"s":return String(o.$s);case"ss":return C.s(o.$s,2,"0");case"SSS":return C.s(o.$ms,3,"0");case"Z":return u}return null})(T)||u.replace(":","")}))},s.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},s.diff=function(l,o,n){var c,u=this,V=C.p(o),w=N(l),_=(w.utcOffset()-this.utcOffset())*m,M=this-w,P=function(){return C.m(u,w)};switch(V){case f:c=P()/12;break;case b:c=P();break;case g:c=P()/3;break;case E:c=(M-_)/6048e5;break;case r:c=(M-_)/864e5;break;case k:c=M/h;break;case p:c=M/m;break;case i:c=M/d;break;default:c=M}return n?c:C.a(c)},s.daysInMonth=function(){return this.endOf(b).$D},s.$locale=function(){return q[this.$L]},s.locale=function(l,o){if(!l)return this.$L;var n=this.clone(),c=G(l,o,!0);return c&&(n.$L=c),n},s.clone=function(){return C.w(this.$d,this)},s.toDate=function(){return new Date(this.valueOf())},s.toJSON=function(){return this.isValid()?this.toISOString():null},s.toISOString=function(){return this.$d.toISOString()},s.toString=function(){return this.$d.toUTCString()},y})(),Q=J.prototype;return N.prototype=Q,[["$ms",$],["$s",i],["$m",p],["$H",k],["$W",r],["$M",b],["$y",f],["$D",D]].forEach((function(y){Q[y[1]]=function(s){return this.$g(s,y[0],y[1])}})),N.extend=function(y,s){return y.$i||(y(s,J,N),y.$i=!0),N},N.locale=G,N.isDayjs=K,N.unix=function(y){return N(1e3*y)},N.en=q[W],N.Ls=q,N.p={},N}))})(ee)),ee.exports}var at=tt();const te=xe(at),ot=t.defineComponent({name:"EliDataHora",inheritAttrs:!1,props:{modelValue:{type:String,default:null},modo:{type:String,default:"dataHora"},rotulo:{type:String,default:"Data e hora"},placeholder:{type:String,default:""},desabilitado:{type:Boolean,default:!1},limpavel:{type:Boolean,default:!1},erro:{type:Boolean,default:!1},mensagensErro:{type:[String,Array],default:()=>[]},dica:{type:String,default:""},dicaPersistente:{type:Boolean,default:!1},densidade:{type:String,default:"comfortable"},variante:{type:String,default:"outlined"},min:{type:String,default:void 0},max:{type:String,default:void 0}},emits:{"update:modelValue":e=>!0,alterar:e=>!0,foco:()=>!0,desfoco:()=>!0},setup(e,{emit:a,attrs:d}){const m=t.computed(()=>e.modo==="data"?"date":"datetime-local");function h(r){return e.modo==="data"?te(r).format("YYYY-MM-DD"):te(r).format("YYYY-MM-DDTHH:mm")}function $(r){return e.modo==="data"?te(`${r}T00:00`).format():te(r).format()}const i=t.computed({get:()=>e.modelValue?h(e.modelValue):"",set:r=>{const E=r&&r.length>0?r:null;if(!E){a("update:modelValue",null),a("alterar",null);return}const b=$(E);a("update:modelValue",b),a("alterar",b)}}),p=t.computed(()=>{if(e.min)return h(e.min)}),k=t.computed(()=>{if(e.max)return h(e.max)});return{attrs:d,valor:i,emit:a,minLocal:p,maxLocal:k,tipoInput:m}}}),nt={class:"eli-data-hora"};function rt(e,a,d,m,h,$){return t.openBlock(),t.createElementBlock("div",nt,[t.createVNode(se.VTextField,t.mergeProps({modelValue:e.valor,"onUpdate:modelValue":a[0]||(a[0]=i=>e.valor=i),type:e.tipoInput,label:e.rotulo,placeholder:e.placeholder,disabled:e.desabilitado,clearable:e.limpavel,error:e.erro,"error-messages":e.mensagensErro,hint:e.dica,"persistent-hint":e.dicaPersistente,density:e.densidade,variant:e.variante,min:e.minLocal,max:e.maxLocal},e.attrs,{onFocus:a[1]||(a[1]=i=>e.emit("foco")),onBlur:a[2]||(a[2]=i=>e.emit("desfoco"))}),null,16,["modelValue","type","label","placeholder","disabled","clearable","error","error-messages","hint","persistent-hint","density","variant","min","max"])])}const fe=I(ot,[["render",rt],["__scopeId","data-v-71afabb6"]]);/**
* @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=>{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 be=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 it=(...e)=>e.filter((a,d,m)=>!!a&&a.trim()!==""&&m.indexOf(a)===d).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 he=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 st=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,d,m)=>m?m.toUpperCase():d.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 dt=e=>{const a=st(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 X={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 ct=({name:e,iconNode:a,absoluteStrokeWidth:d,"absolute-stroke-width":m,strokeWidth:h,"stroke-width":$,size:i=X.width,color:p=X.stroke,...k},{slots:r})=>t.h("svg",{...X,...k,width:i,height:i,stroke:p,"stroke-width":be(d)||be(m)||d===!0||m===!0?Number(h||$||X["stroke-width"])*24/Number(i):h||$||X["stroke-width"],class:it("lucide",k.class,...e?[`lucide-${he(dt(e))}-icon`,`lucide-${he(e)}`]:["lucide-icon"]),...!r.default&&!lt(k)&&{"aria-hidden":"true"}},[...a.map(E=>t.h(...E)),...r.default?[r.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)=>(d,{slots:m,attrs:h})=>t.h(ct,{...h,...d,iconNode:a,name:e},m);/**
* @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 ye=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 ge=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 $e=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 ut=ae("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var ke=(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))(ke||{});const mt=t.defineComponent({name:"EliTabelaCaixaDeBusca",components:{Search:ut},props:{modelo:{type:String,required:!1,default:""}},emits:{buscar(e){return typeof e=="string"}},setup(e,{emit:a}){const d=t.ref(e.modelo??"");t.watch(()=>e.modelo,h=>{h!==void 0&&h!==d.value&&(d.value=h)});function m(){a("buscar",d.value.trim())}return{texto:d,emitirBusca:m}}}),pt={class:"eli-tabela__busca"},ft={class:"eli-tabela__busca-input-wrapper"};function bt(e,a,d,m,h,$){const i=t.resolveComponent("Search");return t.openBlock(),t.createElementBlock("div",pt,[t.createElementVNode("div",ft,[t.withDirectives(t.createElementVNode("input",{id:"eli-tabela-busca","onUpdate:modelValue":a[0]||(a[0]=p=>e.texto=p),type:"search",class:"eli-tabela__busca-input",placeholder:"Digite termos para filtrar",onKeyup:a[1]||(a[1]=t.withKeys((...p)=>e.emitirBusca&&e.emitirBusca(...p),["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]=(...p)=>e.emitirBusca&&e.emitirBusca(...p))},[t.createVNode(i,{class:"eli-tabela__busca-botao-icone",size:16,"stroke-width":2,"aria-hidden":"true"})])])])}const ht=I(mt,[["render",bt],["__scopeId","data-v-0fd1ad15"]]),yt=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 d=t.computed(()=>{const r=e.maximoBotoes;return typeof r=="number"&&r>=5?Math.floor(r):7}),m=t.computed(()=>{const r=e.totalPaginas,E=e.pagina,b=d.value,g=[],f=A=>{g.push({label:String(A),pagina:A,ativo:A===E})},D=()=>{g.push({label:"…",ehEllipsis:!0})};if(r<=b){for(let A=1;A<=r;A+=1)f(A);return g}const B=Math.max(3,b-2);let L=Math.max(2,E-Math.floor(B/2)),U=L+B-1;U>=r&&(U=r-1,L=U-B+1),f(1),L>2&&D();for(let A=L;A<=U;A+=1)f(A);return U<r-1&&D(),f(r),g});function h(r){if(!r)return;const E=Math.min(Math.max(1,r),e.totalPaginas);E!==e.pagina&&a("alterar",E)}const $=t.computed(()=>e.pagina<=1),i=t.computed(()=>e.pagina>=e.totalPaginas),p=t.computed(()=>e.pagina),k=t.computed(()=>e.totalPaginas);return{botoes:m,irParaPagina:h,anteriorDesabilitado:$,proximaDesabilitada:i,paginaAtual:p,totalPaginasExibidas:k}}}),gt={key:0,class:"eli-tabela__paginacao",role:"navigation","aria-label":"Paginação de resultados"},$t=["disabled"],kt={key:0,class:"eli-tabela__pagina-ellipsis","aria-hidden":"true"},Vt=["disabled","aria-current","aria-label","onClick"],Bt=["disabled"];function Ct(e,a,d,m,h,$){return e.totalPaginasExibidas>1?(t.openBlock(),t.createElementBlock("nav",gt,[t.createElementVNode("button",{type:"button",class:"eli-tabela__pagina-botao",disabled:e.anteriorDesabilitado,"aria-label":"Página anterior",onClick:a[0]||(a[0]=i=>e.irParaPagina(e.paginaAtual-1))}," << ",8,$t),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.botoes,(i,p)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${i.label}-${p}`},[i.ehEllipsis?(t.openBlock(),t.createElementBlock("span",kt,t.toDisplayString(i.label),1)):(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",class:t.normalizeClass(["eli-tabela__pagina-botao",i.ativo?"eli-tabela__pagina-botao--ativo":void 0]),disabled:i.ativo,"aria-current":i.ativo?"page":void 0,"aria-label":`Ir para página ${i.label}`,onClick:k=>e.irParaPagina(i.pagina)},t.toDisplayString(i.label),11,Vt))],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]=i=>e.irParaPagina(e.paginaAtual+1))}," >> ",8,Bt)])):t.createCommentVNode("",!0)}const Et=I(yt,[["render",Ct],["__scopeId","data-v-59d12455"]]),wt=t.defineComponent({name:"EliTabelaCelulaTextoSimples",components:{},props:{dados:{type:Object}},data(){return{}},methods:{},setup({dados:e}){return{dados:e}}});function St(e,a,d,m,h,$){var i;return t.toDisplayString((i=e.dados)==null?void 0:i.texto)}const _t=I(wt,[["render",St]]),Mt=t.defineComponent({name:"EliTabelaCelulaNumero",components:{},props:{dados:{type:Object}},data(){return{}},methods:{},setup({dados:e}){return{dados:e}}});function Dt(e,a,d,m,h,$){var i;return t.toDisplayString(String((i=e.dados)==null?void 0:i.numero).replace(".",","))}const Nt={textoSimples:_t,numero:I(Mt,[["render",Dt]])},Pt=t.defineComponent({name:"EliTabelaCelula",props:{celula:{type:Array,required:!0}},setup(e){const a=t.computed(()=>e.celula[0]),d=t.computed(()=>e.celula[1]),m=t.computed(()=>Nt[a.value]),h=t.computed(()=>d.value);return{Componente:m,dadosParaComponente:h}}});function Tt(e,a,d,m,h,$){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Componente),{dados:e.dadosParaComponente},null,8,["dados"])}const At=I(Pt,[["render",Tt]]),Ot=t.defineComponent({name:"EliTabela",inheritAttrs:!1,components:{EliTabelaCaixaDeBusca:ht,EliTabelaPaginacao:Et,EliTabelaCelula:At,ArrowUp:ge,ArrowDown:ye,MoreVertical:$e},props:{tabela:{type:Object,required:!0}},setup(e){const a=t.ref(!1),d=t.ref(null),m=t.ref([]),h=t.ref(0),$=t.ref([]),i=t.ref(null),p=new Map,k=t.ref(""),r=t.ref(1),E=t.ref(null),b=t.ref("asc"),g=t.computed(()=>e.tabela),f=t.computed(()=>!!e.tabela.mostrarCaixaDeBusca),D=t.computed(()=>e.tabela.acoesTabela??[]),B=t.computed(()=>D.value.length>0),L=t.computed(()=>{const o=e.tabela.registros_por_consulta;return typeof o=="number"&&o>0?Math.floor(o):10}),U=t.computed(()=>{const o=L.value;if(!o||o<=0)return 1;const n=h.value;return n?Math.max(1,Math.ceil(n/o)):1}),A=t.computed(()=>(e.tabela.acoesLinha??[]).length>0);let z=0;function ie(o,n){n?p.set(o,n):p.delete(o)}function W(o){if(i.value===null)return;const n=p.get(i.value);n&&n.contains(o.target)||(i.value=null)}function q(o){return(o==null?void 0:o.coluna_ordem)!==void 0&&(o==null?void 0:o.coluna_ordem)!==null}function oe(o){if(o){if(E.value===o){b.value=b.value==="asc"?"desc":"asc",l();return}E.value=o,b.value="asc",r.value!==1?r.value=1:l()}}function K(o){k.value!==o&&(k.value=o,r.value!==1?r.value=1:l())}function G(o){const n=Math.min(Math.max(1,o),U.value);n!==r.value&&(r.value=n)}function N(o){return o==="direita"?"eli-tabela__celula--direita":o==="centro"?"eli-tabela__celula--centro":"eli-tabela__celula--esquerda"}function C(o){if(o!=null)return typeof o=="number"?`${o}px`:String(o)}function J(o){if(!Array.isArray(o))return;const n=o[0],c=o[1];if(n==="textoSimples")return typeof(c==null?void 0:c.texto)=="string"?c.texto:void 0;if(n==="numero")return typeof(c==null?void 0:c.numero)=="number"?String(c.numero):void 0}function Q(o){const n=e.tabela.acoesLinha??[],c=$.value[o]??[];return n.map((u,V)=>{const w=u.exibir===void 0?!0:typeof u.exibir=="boolean"?u.exibir:!1;return{acao:u,indice:V,visivel:c[V]??w}}).filter(u=>u.visivel)}function y(o){return Q(o).length>0}function s(o){y(o)&&(i.value=i.value===o?null:o)}async function l(){var V,w;const o=++z;a.value=!0,d.value=null,$.value=[],i.value=null,p.clear();const n=Math.max(1,L.value),u={offSet:(r.value-1)*n,limit:n};k.value&&(u.texto_busca=k.value),E.value&&(u.coluna_ordem=E.value,u.direcao_ordem=b.value);try{const _=e.tabela,M=await _.consulta(u);if(o!==z)return;if(M.cod!==ke.sucesso){m.value=[],h.value=0,d.value=M.mensagem;return}const P=((V=M.valor)==null?void 0:V.valores)??[],v=((w=M.valor)==null?void 0:w.quantidade)??P.length;m.value=P,h.value=v;const F=Math.max(1,Math.ceil((v||0)/n));if(r.value>F){r.value=F;return}const H=_.acoesLinha??[];if(!H.length){$.value=[];return}const Y=P.map(()=>H.map(O=>O.exibir===void 0?!0:typeof O.exibir=="boolean"?O.exibir:!1));$.value=Y;const T=await Promise.all(P.map(async O=>Promise.all(H.map(async j=>{if(j.exibir===void 0)return!0;if(typeof j.exibir=="boolean")return j.exibir;try{const Z=j.exibir(O);return!!await Promise.resolve(Z)}catch{return!1}}))));o===z&&($.value=T)}catch(_){if(o!==z)return;m.value=[],h.value=0,d.value=_ instanceof Error?_.message:"Erro ao carregar dados."}finally{o===z&&(a.value=!1)}}return t.onMounted(()=>{document.addEventListener("click",W),l()}),t.onBeforeUnmount(()=>{document.removeEventListener("click",W),p.clear()}),t.watch(()=>e.tabela.mostrarCaixaDeBusca,o=>{!o&&k.value&&(k.value="",r.value!==1?r.value=1:l())}),t.watch(r,(o,n)=>{o!==n&&l()}),t.watch(()=>e.tabela,()=>{i.value=null,p.clear(),E.value=null,b.value="asc",k.value="",r.value!==1?r.value=1:l()}),t.watch(()=>e.tabela.registros_por_consulta,()=>{r.value!==1?r.value=1:l()}),t.watch(m,()=>{i.value=null,p.clear()}),{tabela:g,carregando:a,erro:d,linhas:m,quantidade:h,menuAberto:i,valorBusca:k,paginaAtual:r,colunaOrdenacao:E,direcaoOrdenacao:b,totalPaginas:U,exibirBusca:f,acoesCabecalho:D,temAcoesCabecalho:B,temAcoes:A,ArrowUp:ge,ArrowDown:ye,MoreVertical:$e,isOrdenavel:q,obterClasseAlinhamento:N,obterMaxWidth:C,obterTooltipCelula:J,alternarOrdenacao:oe,atualizarBusca:K,irParaPagina:G,registrarMenuElemento:ie,acoesDisponiveisPorLinha:Q,possuiAcoes:y,toggleMenu:s}}}),It={class:"eli-tabela"},Lt={key:0,class:"eli-tabela eli-tabela--carregando","aria-busy":"true"},Ut={key:1,class:"eli-tabela eli-tabela--erro",role:"alert"},Ft={class:"eli-tabela__erro-mensagem"},jt={key:2,class:"eli-tabela eli-tabela--vazio"},zt={key:0,class:"eli-tabela__cabecalho"},qt={key:1,class:"eli-tabela__acoes-cabecalho"},vt=["onClick"],Ht={class:"eli-tabela__acoes-cabecalho-rotulo"},Yt={class:"eli-tabela__table"},Rt={class:"eli-tabela__thead"},Wt={class:"eli-tabela__tr eli-tabela__tr--header"},Gt=["onClick"],Jt={class:"eli-tabela__th-texto"},Zt={key:1,class:"eli-tabela__th-label"},Xt={key:0,class:"eli-tabela__th eli-tabela__th--acoes",scope:"col"},Kt={class:"eli-tabela__tbody"},Qt=["onClick"],xt=["title"],ea=["id","disabled","aria-expanded","aria-controls","aria-label","title","onClick"],ta=["id","aria-labelledby"],aa=["aria-label","title","onClick"],oa={class:"eli-tabela__acoes-item-texto"};function na(e,a,d,m,h,$){const i=t.resolveComponent("EliTabelaCaixaDeBusca"),p=t.resolveComponent("ArrowUp"),k=t.resolveComponent("EliTabelaCelula"),r=t.resolveComponent("MoreVertical"),E=t.resolveComponent("EliTabelaPaginacao");return t.openBlock(),t.createElementBlock("div",It,[e.carregando?(t.openBlock(),t.createElementBlock("div",Lt," Carregando... ")):e.erro?(t.openBlock(),t.createElementBlock("div",Ut,[a[0]||(a[0]=t.createElementVNode("div",{class:"eli-tabela__erro-titulo"},"Erro",-1)),t.createElementVNode("div",Ft,t.toDisplayString(e.erro),1)])):e.linhas.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[e.exibirBusca||e.temAcoesCabecalho?(t.openBlock(),t.createElementBlock("div",zt,[e.exibirBusca?(t.openBlock(),t.createBlock(i,{key:0,modelo:e.valorBusca,onBuscar:e.atualizarBusca},null,8,["modelo","onBuscar"])):t.createCommentVNode("",!0),e.temAcoesCabecalho?(t.openBlock(),t.createElementBlock("div",qt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.acoesCabecalho,(b,g)=>(t.openBlock(),t.createElementBlock("button",{key:`${b.rotulo}-${g}`,type:"button",class:"eli-tabela__acoes-cabecalho-botao",style:t.normalizeStyle(b.cor?{backgroundColor:b.cor,color:"#fff"}:void 0),onClick:b.acao},[b.icone?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(b.icone),{key:0,class:"eli-tabela__acoes-cabecalho-icone",size:16,"stroke-width":2})):t.createCommentVNode("",!0),t.createElementVNode("span",Ht,t.toDisplayString(b.rotulo),1)],12,vt))),128))])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("table",Yt,[t.createElementVNode("thead",Rt,[t.createElementVNode("tr",Wt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.tabela.colunas,(b,g)=>(t.openBlock(),t.createElementBlock("th",{key:`th-${g}`,class:t.normalizeClass(["eli-tabela__th",[e.isOrdenavel(b)?"eli-tabela__th--ordenavel":void 0,e.obterClasseAlinhamento(b.alinhamento)]]),scope:"col"},[e.isOrdenavel(b)?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:t.normalizeClass(["eli-tabela__th-botao",[e.colunaOrdenacao===String(b.coluna_ordem)?"eli-tabela__th-botao--ativo":void 0]]),onClick:f=>e.alternarOrdenacao(String(b.coluna_ordem))},[t.createElementVNode("span",Jt,t.toDisplayString(b.rotulo),1),e.colunaOrdenacao===String(b.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(p,{key:1,class:"eli-tabela__th-icone eli-tabela__th-icone--oculto",size:16,"stroke-width":2,"aria-hidden":"true"}))],10,Gt)):(t.openBlock(),t.createElementBlock("span",Zt,t.toDisplayString(b.rotulo),1))],2))),128)),e.temAcoes?(t.openBlock(),t.createElementBlock("th",Xt," Ações ")):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",Kt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.linhas,(b,g)=>(t.openBlock(),t.createElementBlock("tr",{key:`tr-${g}`,class:t.normalizeClass(["eli-tabela__tr",[g%2===1?"eli-tabela__tr--zebra":void 0]])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.tabela.colunas,(f,D)=>(t.openBlock(),t.createElementBlock("td",{key:`td-${g}-${D}`,class:t.normalizeClass(["eli-tabela__td",[f.acao?"eli-tabela__td--clicavel":void 0,e.obterClasseAlinhamento(f.alinhamento)]]),onClick:B=>f.acao?()=>{var L;return(L=f.acao)==null?void 0:L.call(f)}:void 0},[f.truncar?(t.openBlock(),t.createElementBlock("span",{key:0,class:"eli-tabela__celula-conteudo",style:t.normalizeStyle(f.largura_maxima?{maxWidth:e.obterMaxWidth(f.largura_maxima)}:void 0),title:e.obterTooltipCelula(f.celula(b))},[t.createVNode(k,{celula:f.celula(b)},null,8,["celula"])],12,xt)):(t.openBlock(),t.createBlock(k,{key:1,celula:f.celula(b)},null,8,["celula"]))],10,Qt))),128)),e.temAcoes?(t.openBlock(),t.createElementBlock("td",{class:"eli-tabela__td eli-tabela__td--acoes",key:`td-${g}-acoes`},[t.createElementVNode("div",{class:t.normalizeClass(["eli-tabela__acoes-container",[e.menuAberto===g?"eli-tabela__acoes-container--aberto":void 0]])},[t.createElementVNode("button",{class:"eli-tabela__acoes-toggle",type:"button",id:`eli-tabela-acoes-toggle-${g}`,disabled:!e.possuiAcoes(g),"aria-haspopup":"menu","aria-expanded":e.menuAberto===g?"true":"false","aria-controls":e.possuiAcoes(g)?`eli-tabela-acoes-menu-${g}`:void 0,"aria-label":e.possuiAcoes(g)?"Ações da linha":"Nenhuma ação disponível",title:e.possuiAcoes(g)?"Ações":"Nenhuma ação disponível",onClick:t.withModifiers(f=>e.toggleMenu(g),["stop"])},[t.createVNode(r,{class:"eli-tabela__acoes-toggle-icone",size:18,"stroke-width":2})],8,ea),e.menuAberto===g&&e.possuiAcoes(g)?(t.openBlock(),t.createElementBlock("ul",{key:0,id:`eli-tabela-acoes-menu-${g}`,class:"eli-tabela__acoes-menu",role:"menu","aria-labelledby":`eli-tabela-acoes-toggle-${g}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.acoesDisponiveisPorLinha(g),f=>(t.openBlock(),t.createElementBlock("li",{key:`acao-${g}-${f.indice}`,class:"eli-tabela__acoes-item",role:"none"},[t.createElementVNode("button",{type:"button",class:"eli-tabela__acoes-item-botao",style:t.normalizeStyle({color:f.acao.cor}),role:"menuitem","aria-label":f.acao.rotulo,title:f.acao.rotulo,onClick:t.withModifiers(()=>{e.menuAberto=null,f.acao.acao(b)},["stop"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(f.acao.icone),{class:"eli-tabela__acoes-item-icone",size:16,"stroke-width":2})),t.createElementVNode("span",oa,t.toDisplayString(f.acao.rotulo),1)],12,aa)]))),128))],8,ta)):t.createCommentVNode("",!0)],2)])):t.createCommentVNode("",!0)],2))),128))])]),e.totalPaginas>1&&e.quantidade>0?(t.openBlock(),t.createBlock(E,{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)):(t.openBlock(),t.createElementBlock("div",jt,t.toDisplayString(e.tabela.mensagemVazio??"Nenhum registro encontrado."),1))])}const Ve=I(Ot,[["render",na],["__scopeId","data-v-e714deaf"]]),ra={install(e){e.component("EliOlaMundo",ue),e.component("EliBotao",ne),e.component("EliBadge",x),e.component("EliInput",le),e.component("EliCartao",me),e.component("EliDataHora",fe),e.component("EliTabela",Ve)}};S.EliBadge=x,S.EliBotao=ne,S.EliCartao=me,S.EliDataHora=fe,S.EliInput=le,S.EliOlaMundo=ue,S.EliTabela=Ve,S.default=ra,Object.defineProperties(S,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));