@datametria/vue-components 2.4.0 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -5
- package/dist/index.es.js +5812 -2837
- package/dist/index.umd.js +670 -10
- package/dist/src/components/DatametriaCheckbox.vue.d.ts +2 -0
- package/dist/src/components/DatametriaCheckboxGroup.vue.d.ts +6 -0
- package/dist/src/components/DatametriaFileUpload.vue.d.ts +5 -0
- package/dist/src/components/DatametriaFloatingBar.vue.d.ts +1 -1
- package/dist/src/components/DatametriaInput.vue.d.ts +2 -22
- package/dist/src/components/DatametriaNavbar.vue.d.ts +1 -1
- package/dist/src/components/DatametriaPasswordInput.vue.d.ts +2 -0
- package/dist/src/components/DatametriaRadio.vue.d.ts +2 -0
- package/dist/src/components/DatametriaRadioGroup.vue.d.ts +6 -0
- package/dist/src/components/DatametriaSelect.vue.d.ts +2 -3
- package/dist/src/components/DatametriaSidebar.vue.d.ts +1 -1
- package/dist/src/components/DatametriaSwitch.vue.d.ts +8 -1
- package/dist/src/components/DatametriaTabs.vue.d.ts +2 -2
- package/dist/src/components/DatametriaTextarea.vue.d.ts +6 -0
- package/dist/src/composables/useAnalytics.d.ts +8 -0
- package/dist/src/types/analytics.d.ts +50 -0
- package/dist/vue-components.css +1 -1
- package/package.json +3 -2
- package/src/components/DatametriaButton.vue +196 -195
- package/src/components/DatametriaCheckbox.vue +289 -197
- package/src/components/DatametriaCheckboxGroup.vue +161 -58
- package/src/components/DatametriaFileUpload.vue +493 -414
- package/src/components/DatametriaInput.vue +342 -316
- package/src/components/DatametriaPasswordInput.vue +433 -444
- package/src/components/DatametriaRadio.vue +240 -151
- package/src/components/DatametriaRadioGroup.vue +160 -57
- package/src/components/DatametriaSelect.vue +409 -313
- package/src/components/DatametriaSortableTable.vue +35 -29
- package/src/components/DatametriaSwitch.vue +319 -146
- package/src/components/DatametriaTabs.vue +2 -2
- package/src/components/DatametriaTextarea.vue +285 -213
- package/src/composables/useAnalytics.ts +70 -0
- package/src/types/analytics.ts +59 -0
package/dist/index.umd.js
CHANGED
|
@@ -1,16 +1,676 @@
|
|
|
1
|
-
(function(T,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(T=typeof globalThis<"u"?globalThis:T||self,e(T.DatametriaVueComponents={},T.Vue))})(this,(function(T,e){"use strict";var A=(t=>(t.PRIMARY="primary",t.SECONDARY="secondary",t.OUTLINE="outline",t.GHOST="ghost",t))(A||{}),P=(t=>(t.SM="sm",t.MD="md",t.LG="lg",t))(P||{});const J=["disabled","type","aria-busy","aria-disabled"],Q={key:0,class:"spinner",role:"status","aria-label":"Carregando"},Z=e.defineComponent({__name:"DatametriaButton",props:{variant:{default:A.PRIMARY},size:{default:P.MD},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},type:{default:"button"}},emits:["click"],setup(t){const i=t;if(process.env.NODE_ENV==="development"){const a=Object.values(A);a.includes(i.variant)||console.warn(`[DatametriaButton] Invalid variant "${i.variant}". Valid options: ${a.join(", ")}`)}const l=e.computed(()=>["datametria-button",`datametria-button--${i.variant}`,`datametria-button--${i.size}`,{"datametria-button--full-width":i.fullWidth,"datametria-button--loading":i.loading,"datametria-button--disabled":i.disabled}]);return(a,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(l.value),disabled:t.disabled||t.loading,type:t.type,"aria-busy":t.loading,"aria-disabled":t.disabled,onClick:o[0]||(o[0]=n=>a.$emit("click",n))},[t.loading?(e.openBlock(),e.createElementBlock("span",Q)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default",{},void 0,!0)],10,J))}}),M=(t,i)=>{const l=t.__vccOpts||t;for(const[a,o]of i)l[a]=o;return l},v=M(Z,[["__scopeId","data-v-4f35a5db"]]),ee={key:0,class:"datametria-input__label"},te={key:0,class:"datametria-input__required"},ae={key:1,class:"datametria-input__prepend"},le={class:"datametria-input__inner"},oe={key:0,class:"datametria-input__prefix"},ne={key:0},re=["type","placeholder","disabled","readonly","maxlength"],se={key:1,class:"datametria-input__suffix"},ie={key:0},ce={key:2,class:"datametria-input__append"},de={key:3,class:"datametria-input__error"},me=M(e.defineComponent({__name:"DatametriaInput",props:{modelValue:{default:""},label:{},required:{type:Boolean,default:!1},errorMessage:{},type:{default:"text"},placeholder:{default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},maxlength:{},prefixIcon:{},suffixIcon:{},size:{default:"default"}},emits:["update:modelValue","input","change","focus","blur","clear"],setup(t,{expose:i,emit:l}){const a=t,o=l,n=e.ref(),s=e.ref(!1),r=e.computed({get:()=>a.modelValue,set:y=>o("update:modelValue",y)}),m=e.computed(()=>a.clearable&&!a.disabled&&!a.readonly&&r.value),p=e.computed(()=>({"datametria-input--disabled":a.disabled,"datametria-input--focused":s.value,[`datametria-input--${a.size}`]:a.size!=="default"})),V=e.computed(()=>({"datametria-input__field":!0,"datametria-input__field--error":!!a.errorMessage})),b=y=>{const f=y.target;o("input",f.value)},g=y=>{const f=y.target;o("change",f.value)},C=y=>{s.value=!0,o("focus",y)},_=y=>{s.value=!1,o("blur",y)},B=()=>{var y;o("update:modelValue",""),o("clear"),(y=n.value)==null||y.focus()};return i({focus:()=>{var y;return(y=n.value)==null?void 0:y.focus()},blur:()=>{var y;return(y=n.value)==null?void 0:y.blur()}}),(y,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-input",p.value])},[t.label?(e.openBlock(),e.createElementBlock("label",ee,[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",te,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),y.$slots.prepend?(e.openBlock(),e.createElementBlock("div",ae,[e.renderSlot(y.$slots,"prepend",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",le,[y.$slots.prefix||t.prefixIcon?(e.openBlock(),e.createElementBlock("span",oe,[e.renderSlot(y.$slots,"prefix",{},()=>[t.prefixIcon?(e.openBlock(),e.createElementBlock("span",ne,e.toDisplayString(t.prefixIcon),1)):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:n,"onUpdate:modelValue":f[0]||(f[0]=u=>r.value=u),type:t.type,placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,maxlength:t.maxlength,class:e.normalizeClass(V.value),onInput:b,onChange:g,onFocus:C,onBlur:_},null,42,re),[[e.vModelDynamic,r.value]]),m.value||y.$slots.suffix||t.suffixIcon?(e.openBlock(),e.createElementBlock("span",se,[m.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"datametria-input__clear",onClick:B,type:"button"}," × ")):e.createCommentVNode("",!0),e.renderSlot(y.$slots,"suffix",{},()=>[t.suffixIcon?(e.openBlock(),e.createElementBlock("span",ie,e.toDisplayString(t.suffixIcon),1)):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)]),y.$slots.append?(e.openBlock(),e.createElementBlock("div",ce,[e.renderSlot(y.$slots,"append",{},void 0,!0)])):e.createCommentVNode("",!0),t.errorMessage?(e.openBlock(),e.createElementBlock("div",de,e.toDisplayString(t.errorMessage),1)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-5e9d1d12"]]),pe={class:"datametria-password-input"},fe=["for"],ue={key:0,class:"datametria-password-input__required"},he={class:"datametria-password-input__wrapper"},ke=["id","value","type","placeholder","disabled","required","autocomplete","aria-invalid","aria-describedby"],ge=["aria-label"],be={key:0,class:"datametria-password-input__icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},_e={key:1,class:"datametria-password-input__icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},ye={key:1,class:"datametria-password-input__warning"},Be={key:2,class:"datametria-password-input__strength"},$e={class:"datametria-password-input__strength-bar"},Ee=["id"],Ve={class:"datametria-password-input__requirements-list"},Ce={class:"datametria-password-input__check"},we={class:"datametria-password-input__check"},Ne={class:"datametria-password-input__check"},Se={class:"datametria-password-input__check"},De={class:"datametria-password-input__check"},xe=["id"],Te=["id"],ze=M(e.defineComponent({__name:"DatametriaPasswordInput",props:{modelValue:{default:""},label:{},placeholder:{},errorMessage:{},helpText:{},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},minLength:{default:8},showStrength:{type:Boolean,default:!0},showRequirements:{type:Boolean,default:!0},autocomplete:{default:"current-password"}},emits:["update:modelValue","strength-change"],setup(t,{emit:i}){const l=t,a=i,o=e.computed(()=>`password-${Math.random().toString(36).substr(2,9)}`),n=e.ref(!1),s=e.ref(!1),r=e.ref(!1),m=e.computed(()=>({minLength:l.modelValue.length>=l.minLength,hasUppercase:/[A-Z]/.test(l.modelValue),hasLowercase:/[a-z]/.test(l.modelValue),hasNumber:/\d/.test(l.modelValue),hasSpecial:/[!@#$%^&*(),.?":{}|<>]/.test(l.modelValue)})),p=e.computed(()=>{if(!l.modelValue)return 0;let D=0;const w=m.value;return w.minLength&&(D+=20),w.hasUppercase&&(D+=20),w.hasLowercase&&(D+=20),w.hasNumber&&(D+=20),w.hasSpecial&&(D+=20),D}),V=e.computed(()=>p.value),b=e.computed(()=>{const D=p.value;return D===0?"":D<=40?"Fraca":D<=60?"Média":D<=80?"Boa":"Forte"}),g=e.computed(()=>["datametria-password-input__strength-fill",{"datametria-password-input__strength-fill--weak":p.value<=40,"datametria-password-input__strength-fill--medium":p.value>40&&p.value<=60,"datametria-password-input__strength-fill--good":p.value>60&&p.value<=80,"datametria-password-input__strength-fill--strong":p.value>80}]),C=e.computed(()=>["datametria-password-input__strength-text",{"datametria-password-input__strength-text--weak":p.value<=40,"datametria-password-input__strength-text--medium":p.value>40&&p.value<=60,"datametria-password-input__strength-text--good":p.value>60&&p.value<=80,"datametria-password-input__strength-text--strong":p.value>80}]),_=e.computed(()=>["datametria-password-input__field",{"datametria-password-input__field--error":l.errorMessage,"datametria-password-input__field--disabled":l.disabled}]),B=e.computed(()=>{const D=[];return l.showRequirements&&s.value&&D.push(`${o.value}-requirements`),l.errorMessage&&D.push(`${o.value}-error`),l.helpText&&!l.errorMessage&&D.push(`${o.value}-help`),D.length>0?D.join(" "):void 0}),y=D=>{const w=D.target.value;a("update:modelValue",w)},f=()=>{s.value=!0},u=()=>{s.value=!1},h=()=>{n.value=!n.value},N=D=>{r.value=D.getModifierState("CapsLock")};return e.watch(p,D=>{l.modelValue&&a("strength-change",D)}),(D,w)=>(e.openBlock(),e.createElementBlock("div",pe,[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:o.value,class:"datametria-password-input__label"},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",ue,"*")):e.createCommentVNode("",!0)],8,fe)):e.createCommentVNode("",!0),e.createElementVNode("div",he,[e.createElementVNode("input",{id:o.value,value:t.modelValue,type:n.value?"text":"password",placeholder:t.placeholder,disabled:t.disabled,required:t.required,autocomplete:t.autocomplete,class:e.normalizeClass(_.value),"aria-invalid":!!t.errorMessage,"aria-describedby":B.value,onInput:y,onFocus:f,onBlur:u,onKeyup:N},null,42,ke),e.createElementVNode("button",{type:"button",class:"datametria-password-input__toggle","aria-label":n.value?"Ocultar senha":"Mostrar senha",onClick:h,tabindex:"-1"},[n.value?(e.openBlock(),e.createElementBlock("svg",be,[...w[0]||(w[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",_e,[...w[1]||(w[1]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},null,-1),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"},null,-1)])]))],8,ge)]),r.value?(e.openBlock(),e.createElementBlock("p",ye," ⚠️ Caps Lock está ativado ")):e.createCommentVNode("",!0),t.showStrength&&t.modelValue?(e.openBlock(),e.createElementBlock("div",Be,[e.createElementVNode("div",$e,[e.createElementVNode("div",{class:e.normalizeClass(g.value),style:e.normalizeStyle({width:`${V.value}%`})},null,6)]),e.createElementVNode("span",{class:e.normalizeClass(C.value)},e.toDisplayString(b.value),3)])):e.createCommentVNode("",!0),t.showRequirements&&s.value?(e.openBlock(),e.createElementBlock("div",{key:3,id:`${o.value}-requirements`,class:"datametria-password-input__requirements"},[w[6]||(w[6]=e.createElementVNode("p",{class:"datametria-password-input__requirements-title"},"A senha deve conter:",-1)),e.createElementVNode("ul",Ve,[e.createElementVNode("li",{class:e.normalizeClass({valid:m.value.minLength})},[e.createElementVNode("span",Ce,e.toDisplayString(m.value.minLength?"✓":"○"),1),e.createTextVNode(" Mínimo "+e.toDisplayString(t.minLength)+" caracteres ",1)],2),e.createElementVNode("li",{class:e.normalizeClass({valid:m.value.hasUppercase})},[e.createElementVNode("span",we,e.toDisplayString(m.value.hasUppercase?"✓":"○"),1),w[2]||(w[2]=e.createTextVNode(" Pelo menos 1 letra maiúscula ",-1))],2),e.createElementVNode("li",{class:e.normalizeClass({valid:m.value.hasLowercase})},[e.createElementVNode("span",Ne,e.toDisplayString(m.value.hasLowercase?"✓":"○"),1),w[3]||(w[3]=e.createTextVNode(" Pelo menos 1 letra minúscula ",-1))],2),e.createElementVNode("li",{class:e.normalizeClass({valid:m.value.hasNumber})},[e.createElementVNode("span",Se,e.toDisplayString(m.value.hasNumber?"✓":"○"),1),w[4]||(w[4]=e.createTextVNode(" Pelo menos 1 número ",-1))],2),e.createElementVNode("li",{class:e.normalizeClass({valid:m.value.hasSpecial})},[e.createElementVNode("span",De,e.toDisplayString(m.value.hasSpecial?"✓":"○"),1),w[5]||(w[5]=e.createTextVNode(" Pelo menos 1 caractere especial ",-1))],2)])],8,Ee)):e.createCommentVNode("",!0),t.errorMessage?(e.openBlock(),e.createElementBlock("p",{key:4,id:`${o.value}-error`,class:"datametria-password-input__error"},e.toDisplayString(t.errorMessage),9,xe)):e.createCommentVNode("",!0),t.helpText&&!t.errorMessage?(e.openBlock(),e.createElementBlock("p",{key:5,id:`${o.value}-help`,class:"datametria-password-input__help"},e.toDisplayString(t.helpText),9,Te)):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-6b6116ed"]]),Me={key:0,class:"datametria-select__label"},Ie={key:0,class:"datametria-select__required"},Le={key:0,class:"datametria-select__value"},Fe={key:1,class:"datametria-select__placeholder"},Re=["disabled"],Ae={value:"",disabled:""},Pe=["value"],Oe={class:"datametria-select__options"},Ke=["onClick"],je={key:0,class:"datametria-select__empty"},qe={key:1,class:"datametria-select__error"},Ue=M(e.defineComponent({__name:"DatametriaSelect",props:{modelValue:{},options:{},label:{},required:{type:Boolean,default:!1},errorMessage:{},placeholder:{default:"Selecione"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},filterable:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:i}){const l=t,a=i,o=e.ref(!1),n=e.ref(""),s=e.ref({}),r=e.ref(),m=e.computed({get:()=>l.modelValue,set:f=>{a("update:modelValue",f),a("change",f)}}),p=e.computed(()=>{var f;return l.multiple&&Array.isArray(l.modelValue)?l.modelValue.map(h=>{var N;return(N=l.options.find(D=>D.value===h))==null?void 0:N.label}).filter(Boolean).join(", "):((f=l.options.find(u=>u.value===l.modelValue))==null?void 0:f.label)||""}),V=e.computed(()=>!l.filterable||!n.value?l.options:l.options.filter(f=>f.label.toLowerCase().includes(n.value.toLowerCase()))),b=f=>l.multiple&&Array.isArray(l.modelValue)?l.modelValue.includes(f):l.modelValue===f,g=()=>{l.disabled||(o.value=!o.value,o.value&&r.value&&C())},C=()=>{if(!r.value)return;const f=r.value.getBoundingClientRect();s.value={top:`${f.bottom+window.scrollY+4}px`,left:`${f.left+window.scrollX}px`,width:`${f.width}px`}},_=f=>{if(l.multiple){const u=Array.isArray(l.modelValue)?[...l.modelValue]:[],h=u.indexOf(f.value);h>-1?u.splice(h,1):u.push(f.value),a("update:modelValue",u),a("change",u)}else a("update:modelValue",f.value),a("change",f.value),o.value=!1},B=f=>{const u=f.target;a("update:modelValue",u.value),a("change",u.value)},y=f=>{f.target.closest(".datametria-select")||(o.value=!1)};return e.onMounted(()=>{document.addEventListener("click",y)}),e.onUnmounted(()=>{document.removeEventListener("click",y)}),(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-select",{"is-disabled":t.disabled}])},[t.label?(e.openBlock(),e.createElementBlock("label",Me,[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",Ie,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"triggerRef",ref:r,class:"datametria-select__trigger",onClick:g},[p.value?(e.openBlock(),e.createElementBlock("span",Le,e.toDisplayString(p.value),1)):(e.openBlock(),e.createElementBlock("span",Fe,e.toDisplayString(t.placeholder),1)),u[3]||(u[3]=e.createElementVNode("span",{class:"datametria-select__arrow"},"▼",-1)),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":u[0]||(u[0]=h=>m.value=h),disabled:t.disabled,style:{position:"absolute",opacity:"0","pointer-events":"none"},onChange:B},[e.createElementVNode("option",Ae,e.toDisplayString(t.placeholder),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,h=>(e.openBlock(),e.createElementBlock("option",{key:h.value,value:h.value},e.toDisplayString(h.label),9,Pe))),128))],40,Re),[[e.vModelSelect,m.value]])],512),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"datametria-select__dropdown",style:e.normalizeStyle(s.value)},[t.filterable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":u[1]||(u[1]=h=>n.value=h),class:"datametria-select__filter",placeholder:"Buscar...",onClick:u[2]||(u[2]=e.withModifiers(()=>{},["stop"]))},null,512)),[[e.vModelText,n.value]]):e.createCommentVNode("",!0),e.createElementVNode("div",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,h=>(e.openBlock(),e.createElementBlock("div",{key:h.value,class:e.normalizeClass(["datametria-select__option",{"is-selected":b(h.value)}]),onClick:N=>_(h)},e.toDisplayString(h.label),11,Ke))),128)),V.value.length===0?(e.openBlock(),e.createElementBlock("div",je," Nenhum resultado ")):e.createCommentVNode("",!0)])],4)):e.createCommentVNode("",!0)])),t.errorMessage?(e.openBlock(),e.createElementBlock("div",qe,e.toDisplayString(t.errorMessage),1)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-4d5f6677"]]),We={class:"datametria-checkbox__input"},He=["checked","disabled","indeterminate"],Ge={key:0,class:"datametria-checkbox__label"},Ye=M(e.defineComponent({__name:"DatametriaCheckbox",props:{modelValue:{type:[Boolean,String,Number],default:!1},label:{},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},trueValue:{type:[Boolean,String,Number],default:!0},falseValue:{type:[Boolean,String,Number],default:!1}},emits:["update:modelValue","change"],setup(t,{expose:i,emit:l}){const a=t,o=l,n=e.ref(),s=e.inject("checkboxGroup",null),r=e.computed(()=>s?s.modelValue.value.includes(a.modelValue):a.modelValue===a.trueValue),m=p=>{if(a.disabled)return;const b=p.target.checked;if(s){const g=[...s.modelValue.value];if(b)g.push(a.modelValue);else{const C=g.indexOf(a.modelValue);C>-1&&g.splice(C,1)}s.updateValue(g),o("update:modelValue",g),o("change",g)}else{const g=b?a.trueValue:a.falseValue;o("update:modelValue",g),o("change",g)}};return e.watch(()=>a.indeterminate,p=>{n.value&&(n.value.indeterminate=p)},{immediate:!0}),i({inputRef:n}),(p,V)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["datametria-checkbox",{"is-checked":r.value,"is-disabled":t.disabled,"is-indeterminate":t.indeterminate}])},[e.createElementVNode("span",We,[e.createElementVNode("input",{ref_key:"inputRef",ref:n,type:"checkbox",checked:r.value,disabled:t.disabled,indeterminate:t.indeterminate,onChange:m},null,40,He),V[0]||(V[0]=e.createElementVNode("span",{class:"datametria-checkbox__inner"},null,-1))]),t.label||p.$slots.default?(e.openBlock(),e.createElementBlock("span",Ge,[e.renderSlot(p.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-35b52b89"]]),Xe={class:"datametria-checkbox-group",role:"group"},Je=M(e.defineComponent({__name:"DatametriaCheckboxGroup",props:{modelValue:{default:()=>[]},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:i}){const l=t,a=i,o=n=>{a("update:modelValue",n),a("change",n)};return e.provide("checkboxGroup",{modelValue:e.computed(()=>l.modelValue),disabled:e.computed(()=>l.disabled),updateValue:o}),(n,s)=>(e.openBlock(),e.createElementBlock("div",Xe,[e.renderSlot(n.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-5d3e09b1"]]),Qe={class:"datametria-radio__input"},Ze=["checked","disabled","value"],ve={key:0,class:"datametria-radio__label"},et=M(e.defineComponent({__name:"DatametriaRadio",props:{modelValue:{type:[String,Number,Boolean]},label:{},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{expose:i,emit:l}){const a=t,o=l,n=e.ref(),s=e.inject("radioGroup",null),r=e.computed(()=>s?s.modelValue.value===a.modelValue:!1),m=()=>{a.disabled||(s&&s.updateValue(a.modelValue),o("update:modelValue",a.modelValue),o("change",a.modelValue))};return i({inputRef:n}),(p,V)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["datametria-radio",{"is-checked":r.value,"is-disabled":t.disabled}])},[e.createElementVNode("span",Qe,[e.createElementVNode("input",{ref_key:"inputRef",ref:n,type:"radio",checked:r.value,disabled:t.disabled,value:t.modelValue,onChange:m},null,40,Ze),V[0]||(V[0]=e.createElementVNode("span",{class:"datametria-radio__inner"},null,-1))]),t.label||p.$slots.default?(e.openBlock(),e.createElementBlock("span",ve,[e.renderSlot(p.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-0056e8bc"]]),tt={class:"datametria-radio-group",role:"radiogroup"},at=M(e.defineComponent({__name:"DatametriaRadioGroup",props:{modelValue:{type:[String,Number,Boolean]},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:i}){const l=t,a=i,o=n=>{a("update:modelValue",n),a("change",n)};return e.provide("radioGroup",{modelValue:e.computed(()=>l.modelValue),disabled:e.computed(()=>l.disabled),updateValue:o}),(n,s)=>(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(n.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-e19c1b8a"]]),lt=["aria-checked","disabled"],ot={key:0,class:"datametria-switch__loading"},nt=M(e.defineComponent({__name:"DatametriaSwitch",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},activeColor:{default:"#0072ce"},inactiveColor:{default:"#dcdfe6"}},emits:["update:modelValue","change"],setup(t,{emit:i}){const l=t,a=i,o=e.computed(()=>({backgroundColor:l.modelValue?l.activeColor:l.inactiveColor})),n=()=>{if(l.disabled||l.loading)return;const s=!l.modelValue;a("update:modelValue",s),a("change",s)};return(s,r)=>(e.openBlock(),e.createElementBlock("button",{type:"button",role:"switch",class:e.normalizeClass(["datametria-switch",{"is-checked":t.modelValue,"is-disabled":t.disabled,"is-loading":t.loading}]),"aria-checked":t.modelValue,disabled:t.disabled||t.loading,onClick:n},[e.createElementVNode("span",{class:"datametria-switch__core",style:e.normalizeStyle(o.value)},[t.loading?(e.openBlock(),e.createElementBlock("span",ot,[...r[0]||(r[0]=[e.createElementVNode("span",{class:"spinner"},null,-1)])])):e.createCommentVNode("",!0)],4)],10,lt))}}),[["__scopeId","data-v-ec6a77cf"]]),rt=["placeholder","disabled","readonly","rows","maxlength"],st={key:0,class:"datametria-textarea__count"},it=M(e.defineComponent({__name:"DatametriaTextarea",props:{modelValue:{default:""},placeholder:{default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},rows:{default:3},maxlength:{},showWordLimit:{type:Boolean,default:!1},autosize:{type:[Boolean,Object],default:!1}},emits:["update:modelValue","input","focus","blur"],setup(t,{expose:i,emit:l}){const a=t,o=l,n=e.ref(),s=e.ref(a.modelValue),r=e.ref(!1),m=e.computed(()=>({"datametria-textarea--disabled":a.disabled,"datametria-textarea--focused":r.value})),p=e.computed(()=>{if(!a.autosize)return a.rows}),V=_=>{const B=_.target;s.value=B.value,o("update:modelValue",B.value),o("input",B.value),a.autosize&&e.nextTick(()=>C())},b=_=>{r.value=!0,o("focus",_)},g=_=>{r.value=!1,o("blur",_)},C=()=>{if(!n.value||!a.autosize)return;const _=n.value;_.style.height="auto";let B=0,y=1/0;if(typeof a.autosize=="object"){if(a.autosize.minRows){const h=parseInt(getComputedStyle(_).lineHeight);B=a.autosize.minRows*h}if(a.autosize.maxRows){const h=parseInt(getComputedStyle(_).lineHeight);y=a.autosize.maxRows*h}}const f=_.scrollHeight,u=Math.max(B,Math.min(y,f));_.style.height=`${u}px`};return e.watch(()=>a.modelValue,_=>{_!==s.value&&(s.value=_,a.autosize&&e.nextTick(()=>C()))}),e.onMounted(()=>{a.autosize&&e.nextTick(()=>C())}),i({focus:()=>{var _;return(_=n.value)==null?void 0:_.focus()},blur:()=>{var _;return(_=n.value)==null?void 0:_.blur()}}),(_,B)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-textarea",m.value])},[e.withDirectives(e.createElementVNode("textarea",{ref_key:"textareaRef",ref:n,"onUpdate:modelValue":B[0]||(B[0]=y=>s.value=y),class:"datametria-textarea__inner",placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,rows:p.value,maxlength:t.maxlength,onInput:V,onFocus:b,onBlur:g},null,40,rt),[[e.vModelText,s.value]]),t.showWordLimit&&t.maxlength?(e.openBlock(),e.createElementBlock("div",st,e.toDisplayString(s.value.length)+" / "+e.toDisplayString(t.maxlength),1)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-a2a40dcd"]]),ct=["placeholder","disabled","readonly"],dt={key:0,class:"datametria-datepicker__shortcuts"},mt=["onClick"],pt={class:"datametria-datepicker__calendar"},ft={class:"datametria-datepicker__header"},ut={class:"datametria-datepicker__weekdays"},ht={class:"datametria-datepicker__days"},kt=["disabled","onClick"],gt=M(e.defineComponent({__name:"DatametriaDatePicker",props:{modelValue:{default:null},type:{default:"date"},format:{default:"DD/MM/YYYY"},placeholder:{default:"Selecione uma data"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabledDate:{},shortcuts:{default:()=>[]}},emits:["update:modelValue","change"],setup(t,{emit:i}){const l=t,a=i,o=e.ref(),n=e.ref(),s=e.ref(!1),r=e.ref(new Date),m=e.ref(null),p=["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],V=e.computed(()=>`${["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"][r.value.getMonth()]} ${r.value.getFullYear()}`),b=e.computed(()=>l.modelValue?l.type==="range"&&Array.isArray(l.modelValue)?`${_(l.modelValue[0])} - ${_(l.modelValue[1])}`:_(l.modelValue):""),g=e.computed(()=>{const $=r.value.getFullYear(),x=r.value.getMonth(),d=new Date($,x,1),c=new Date($,x+1,0),E=[],k=d.getDay();for(let L=k-1;L>=0;L--){const R=new Date($,x,-L);E.push({date:R,disabled:!1,otherMonth:!0})}for(let L=1;L<=c.getDate();L++){const R=new Date($,x,L);E.push({date:R,disabled:!1,otherMonth:!1})}const S=42-E.length;for(let L=1;L<=S;L++){const R=new Date($,x+1,L);E.push({date:R,disabled:!1,otherMonth:!0})}return E}),C=e.computed(()=>{if(!o.value)return{};const $=o.value.getBoundingClientRect();return{position:"fixed",top:`${$.bottom+4}px`,left:`${$.left}px`,zIndex:9999}}),_=$=>{const x=String($.getDate()).padStart(2,"0"),d=String($.getMonth()+1).padStart(2,"0"),c=$.getFullYear();return`${x}/${d}/${c}`},B=$=>l.disabledDate?l.disabledDate($):!1,y=$=>l.modelValue?l.type==="range"&&Array.isArray(l.modelValue)?u($,l.modelValue[0])||u($,l.modelValue[1]):u($,l.modelValue):!1,f=$=>{if(l.type!=="range"||!Array.isArray(l.modelValue))return!1;const[x,d]=l.modelValue;return $>x&&$<d},u=($,x)=>$.getDate()===x.getDate()&&$.getMonth()===x.getMonth()&&$.getFullYear()===x.getFullYear(),h=$=>{if(l.type==="range")if(!m.value)m.value=$;else{const x=m.value<$?m.value:$,d=m.value<$?$:m.value;a("update:modelValue",[x,d]),a("change",[x,d]),m.value=null,s.value=!1}else a("update:modelValue",$),a("change",$),s.value=!1},N=()=>{!l.disabled&&!l.readonly&&(s.value=!0)},D=$=>{setTimeout(()=>{var x;(x=n.value)!=null&&x.contains($.relatedTarget)||(s.value=!1)},200)},w=$=>{a("update:modelValue",$.value),a("change",$.value),s.value=!1},z=()=>{r.value=new Date(r.value.getFullYear(),r.value.getMonth()-1)},I=()=>{r.value=new Date(r.value.getFullYear(),r.value.getMonth()+1)};return e.watch(()=>l.modelValue,$=>{$&&!Array.isArray($)&&(r.value=new Date($))}),($,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-datepicker",{"datametria-datepicker--disabled":t.disabled}])},[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:o,"onUpdate:modelValue":x[0]||(x[0]=d=>b.value=d),type:"text",class:"datametria-datepicker__input",placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,onFocus:N,onBlur:D},null,40,ct),[[e.vModelText,b.value]]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:n,class:"datametria-datepicker__dropdown",style:e.normalizeStyle(C.value)},[t.shortcuts.length?(e.openBlock(),e.createElementBlock("div",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.shortcuts,d=>(e.openBlock(),e.createElementBlock("button",{key:d.text,class:"datametria-datepicker__shortcut",onClick:c=>w(d)},e.toDisplayString(d.text),9,mt))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",pt,[e.createElementVNode("div",ft,[e.createElementVNode("button",{onClick:z},"<"),e.createElementVNode("span",null,e.toDisplayString(V.value),1),e.createElementVNode("button",{onClick:I},">")]),e.createElementVNode("div",ut,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(p,d=>e.createElementVNode("span",{key:d},e.toDisplayString(d),1)),64))]),e.createElementVNode("div",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,d=>(e.openBlock(),e.createElementBlock("button",{key:d.date.getTime(),class:e.normalizeClass(["datametria-datepicker__day",{"datametria-datepicker__day--disabled":d.disabled||B(d.date),"datametria-datepicker__day--selected":y(d.date),"datametria-datepicker__day--in-range":f(d.date),"datametria-datepicker__day--other-month":d.otherMonth}]),disabled:d.disabled||B(d.date),onClick:c=>h(d.date)},e.toDisplayString(d.date.getDate()),11,kt))),128))])])],4)):e.createCommentVNode("",!0)]))],2))}}),[["__scopeId","data-v-01e9d961"]]),bt=["placeholder","disabled","readonly"],_t={class:"datametria-timepicker__spinners"},yt={class:"datametria-timepicker__spinner"},Bt={class:"datametria-timepicker__spinner-list"},$t=["onClick"],Et={class:"datametria-timepicker__spinner"},Vt={class:"datametria-timepicker__spinner-list"},Ct=["onClick"],wt={key:0,class:"datametria-timepicker__spinner"},Nt={class:"datametria-timepicker__spinner-list"},St=["onClick"],Dt=M(e.defineComponent({__name:"DatametriaTimePicker",props:{modelValue:{default:null},format:{default:"HH:mm:ss"},step:{default:1},placeholder:{default:"Selecione um horário"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},range:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:i}){const l=t,a=i,o=e.ref(),n=e.ref(),s=e.ref(!1),r=e.ref(0),m=e.ref(0),p=e.ref(0),V=e.computed(()=>l.format.includes("ss")),b=e.computed(()=>{const $=[];for(let x=0;x<24;x+=l.step)$.push(x);return $}),g=e.computed(()=>{const $=[];for(let x=0;x<60;x+=l.step)$.push(x);return $}),C=e.computed(()=>{const $=[];for(let x=0;x<60;x+=l.step)$.push(x);return $}),_=e.computed(()=>l.modelValue?l.modelValue:""),B=e.computed(()=>{if(!o.value)return{};const $=o.value.getBoundingClientRect();return{position:"fixed",top:`${$.bottom+4}px`,left:`${$.left}px`,zIndex:9999}}),y=$=>String($).padStart(2,"0"),f=()=>{const $=y(r.value),x=y(m.value),d=y(p.value);return V.value?`${$}:${x}:${d}`:`${$}:${x}`},u=$=>{if(!$)return;const x=$.split(":");x.length>=2&&(r.value=parseInt(x[0])||0,m.value=parseInt(x[1])||0,x.length>=3&&(p.value=parseInt(x[2])||0))},h=$=>{r.value=$,w()},N=$=>{m.value=$,w()},D=$=>{p.value=$,w()},w=()=>{const $=f();a("update:modelValue",$),a("change",$)},z=()=>{!l.disabled&&!l.readonly&&(s.value=!0)},I=$=>{setTimeout(()=>{var x;(x=n.value)!=null&&x.contains($.relatedTarget)||(s.value=!1)},200)};return e.watch(()=>l.modelValue,$=>{$&&u($)},{immediate:!0}),($,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-timepicker",{"datametria-timepicker--disabled":t.disabled}])},[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:o,"onUpdate:modelValue":x[0]||(x[0]=d=>_.value=d),type:"text",class:"datametria-timepicker__input",placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,onFocus:z,onBlur:I},null,40,bt),[[e.vModelText,_.value]]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:n,class:"datametria-timepicker__dropdown",style:e.normalizeStyle(B.value)},[e.createElementVNode("div",_t,[e.createElementVNode("div",yt,[x[1]||(x[1]=e.createElementVNode("div",{class:"datametria-timepicker__spinner-title"},"Hora",-1)),e.createElementVNode("div",Bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,d=>(e.openBlock(),e.createElementBlock("button",{key:d,class:e.normalizeClass(["datametria-timepicker__spinner-item",{"datametria-timepicker__spinner-item--active":d===r.value}]),onClick:c=>h(d)},e.toDisplayString(y(d)),11,$t))),128))])]),e.createElementVNode("div",Et,[x[2]||(x[2]=e.createElementVNode("div",{class:"datametria-timepicker__spinner-title"},"Minuto",-1)),e.createElementVNode("div",Vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,d=>(e.openBlock(),e.createElementBlock("button",{key:d,class:e.normalizeClass(["datametria-timepicker__spinner-item",{"datametria-timepicker__spinner-item--active":d===m.value}]),onClick:c=>N(d)},e.toDisplayString(y(d)),11,Ct))),128))])]),V.value?(e.openBlock(),e.createElementBlock("div",wt,[x[3]||(x[3]=e.createElementVNode("div",{class:"datametria-timepicker__spinner-title"},"Segundo",-1)),e.createElementVNode("div",Nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,d=>(e.openBlock(),e.createElementBlock("button",{key:d,class:e.normalizeClass(["datametria-timepicker__spinner-item",{"datametria-timepicker__spinner-item--active":d===p.value}]),onClick:c=>D(d)},e.toDisplayString(y(d)),11,St))),128))])])):e.createCommentVNode("",!0)])],4)):e.createCommentVNode("",!0)]))],2))}}),[["__scopeId","data-v-6ec4b87a"]]),xt={key:0,class:"dm-slider__header"},Tt=["for"],zt={key:0,class:"dm-slider__required","aria-label":"obrigatório"},Mt={key:1,class:"dm-slider__value"},It={class:"dm-slider__wrapper"},Lt=["id","value","min","max","step","disabled","required","aria-label","aria-describedby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext"],Ft={key:1,class:"dm-slider__range"},Rt={class:"dm-slider__min"},At={class:"dm-slider__max"},Pt={key:2,class:"dm-slider__messages"},Ot=["id"],Kt=["id"],jt=M(e.defineComponent({__name:"DatametriaSlider",props:{modelValue:{},min:{default:0},max:{default:100},step:{default:1},label:{},disabled:{type:Boolean},required:{type:Boolean},showValue:{type:Boolean,default:!0},showMinMax:{type:Boolean,default:!1},errorMessage:{},helperText:{},ariaLabel:{},formatter:{}},emits:["update:modelValue","change","input","focus","blur"],setup(t,{expose:i,emit:l}){const a=t,o=l,n=e.ref(),s=e.ref(!1),r=e.computed(()=>`dm-slider-${Math.random().toString(36).substr(2,9)}`),m=e.computed(()=>{const w=a.max-a.min;return(a.modelValue-a.min)/w*100}),p=e.computed(()=>a.formatter?a.formatter(a.modelValue):a.modelValue.toString()),V=e.computed(()=>{const w=[];return a.errorMessage?w.push(`${r.value}-error`):a.helperText&&w.push(`${r.value}-helper`),w.length>0?w.join(" "):void 0}),b=e.computed(()=>a.formatter?a.formatter(a.modelValue):`${a.modelValue}`),g=w=>a.formatter?a.formatter(w):w.toString(),C=w=>{const z=w.target,I=parseFloat(z.value);o("update:modelValue",I),o("input",I)},_=w=>{const z=w.target,I=parseFloat(z.value);o("change",I)},B=w=>{o("focus",w)},y=w=>{o("blur",w)},f=w=>{if(a.disabled)return;const I=w.currentTarget.getBoundingClientRect(),$=(w.clientX-I.left)/I.width,x=a.max-a.min,d=a.min+$*x,c=Math.round(d/a.step)*a.step,E=Math.max(a.min,Math.min(a.max,c));o("update:modelValue",E),o("change",E)},u=w=>{if(a.disabled)return;s.value=!0,w.preventDefault();const z=$=>{if(!s.value)return;const x=w.target.parentElement;if(!x)return;const d=x.getBoundingClientRect(),c=Math.max(0,Math.min(1,($.clientX-d.left)/d.width)),E=a.max-a.min,k=a.min+c*E,S=Math.round(k/a.step)*a.step,L=Math.max(a.min,Math.min(a.max,S));o("update:modelValue",L),o("input",L)},I=()=>{s.value&&(s.value=!1,o("change",a.modelValue)),document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",I)};document.addEventListener("mousemove",z),document.addEventListener("mouseup",I)},h=w=>{if(a.disabled)return;s.value=!0,w.preventDefault();const z=$=>{if(!s.value)return;const x=w.target.parentElement;if(!x)return;const d=x.getBoundingClientRect(),c=$.touches[0],E=Math.max(0,Math.min(1,(c.clientX-d.left)/d.width)),k=a.max-a.min,S=a.min+E*k,L=Math.round(S/a.step)*a.step,R=Math.max(a.min,Math.min(a.max,L));o("update:modelValue",R),o("input",R)},I=()=>{s.value&&(s.value=!1,o("change",a.modelValue)),document.removeEventListener("touchmove",z),document.removeEventListener("touchend",I)};document.addEventListener("touchmove",z),document.addEventListener("touchend",I)};return i({focus:()=>{e.nextTick(()=>{var w;(w=n.value)==null||w.focus()})},blur:()=>{var w;(w=n.value)==null||w.blur()},inputRef:n}),(w,z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dm-slider",{"dm-slider--disabled":t.disabled}])},[t.label||t.showValue?(e.openBlock(),e.createElementBlock("div",xt,[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:r.value,class:"dm-slider__label"},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",zt,"*")):e.createCommentVNode("",!0)],8,Tt)):e.createCommentVNode("",!0),t.showValue?(e.openBlock(),e.createElementBlock("span",Mt,e.toDisplayString(p.value),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",It,[e.createElementVNode("div",{class:"dm-slider__track",onClick:f},[e.createElementVNode("div",{class:"dm-slider__progress",style:e.normalizeStyle({width:`${m.value}%`})},null,4),e.createElementVNode("div",{class:"dm-slider__thumb",style:e.normalizeStyle({left:`${m.value}%`}),onMousedown:u,onTouchstart:h},null,36)]),e.createElementVNode("input",{id:r.value,ref_key:"inputRef",ref:n,type:"range",class:"dm-slider__input",value:t.modelValue,min:t.min,max:t.max,step:t.step,disabled:t.disabled,required:t.required,"aria-label":t.ariaLabel,"aria-describedby":V.value,"aria-valuemin":t.min,"aria-valuemax":t.max,"aria-valuenow":t.modelValue,"aria-valuetext":b.value,onInput:C,onChange:_,onFocus:B,onBlur:y},null,40,Lt)]),t.showMinMax?(e.openBlock(),e.createElementBlock("div",Ft,[e.createElementVNode("span",Rt,e.toDisplayString(g(t.min)),1),e.createElementVNode("span",At,e.toDisplayString(g(t.max)),1)])):e.createCommentVNode("",!0),t.errorMessage||t.helperText?(e.openBlock(),e.createElementBlock("div",Pt,[t.errorMessage?(e.openBlock(),e.createElementBlock("p",{key:0,id:`${r.value}-error`,class:"dm-slider__error",role:"alert"},e.toDisplayString(t.errorMessage),9,Ot)):t.helperText?(e.openBlock(),e.createElementBlock("p",{key:1,id:`${r.value}-helper`,class:"dm-slider__helper"},e.toDisplayString(t.helperText),9,Kt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-225b7493"]]),qt=["accept","multiple","disabled"],Ut={key:0,class:"dm-file-upload__spinner"},Wt={key:1,class:"dm-file-upload__content"},Ht={class:"dm-file-upload__text"},Gt={class:"dm-file-upload__primary-text"},Yt={class:"dm-file-upload__secondary-text"},Xt={key:0,class:"dm-file-upload__progress"},Jt={class:"dm-file-upload__progress-track"},Qt={class:"dm-file-upload__progress-text"},Zt={key:1,class:"dm-file-upload__files"},vt={class:"dm-file-upload__file-info"},ea={class:"dm-file-upload__file-name"},ta={class:"dm-file-upload__file-size"},aa=["onClick"],la={key:2,class:"dm-file-upload__error"},oa=M(e.defineComponent({__name:"DatametriaFileUpload",props:{modelValue:{},accept:{},multiple:{type:Boolean,default:!1},maxSize:{},maxFiles:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},progress:{},uploadText:{},error:{}},emits:["update:modelValue","file-added","file-removed"],setup(t,{emit:i}){const l=t,a=i,o=e.ref(),n=e.ref(!1),s=e.ref([]),r=e.ref(""),m=e.computed(()=>l.error||r.value),p=()=>{!l.disabled&&o.value&&o.value.click()},V=u=>{const h=u.target;h.files&&B(Array.from(h.files))},b=u=>{var N;if(u.preventDefault(),n.value=!1,l.disabled)return;const h=(N=u.dataTransfer)==null?void 0:N.files;h&&B(Array.from(h))},g=u=>{u.preventDefault()},C=u=>{u.preventDefault(),l.disabled||(n.value=!0)},_=u=>{var h;u.preventDefault(),(h=u.currentTarget)!=null&&h.contains(u.relatedTarget)||(n.value=!1)},B=u=>{if(r.value="",l.accept){const h=l.accept.split(",").map(D=>D.trim()),N=u.filter(D=>!h.some(w=>w.startsWith(".")?D.name.toLowerCase().endsWith(w.toLowerCase()):D.type.match(w.replace("*",".*"))));if(N.length>0){r.value=`Invalid file type(s): ${N.map(D=>D.name).join(", ")}`;return}}if(l.maxSize){const h=u.filter(N=>N.size>l.maxSize);if(h.length>0){r.value=`File(s) too large: ${h.map(N=>N.name).join(", ")}`;return}}if(l.multiple){const h=s.value.length+u.length;if(l.maxFiles&&h>l.maxFiles){r.value=`Maximum ${l.maxFiles} files allowed`;return}s.value.push(...u),a("update:modelValue",s.value)}else s.value=[u[0]],a("update:modelValue",u[0]);u.forEach(h=>{a("file-added",h)})},y=u=>{const h=s.value[u];s.value.splice(u,1),l.multiple?a("update:modelValue",s.value):a("update:modelValue",s.value[0]||null),a("file-removed",h,u)},f=u=>{if(u===0)return"0 Bytes";const h=1024,N=["Bytes","KB","MB","GB"],D=Math.floor(Math.log(u)/Math.log(h));return parseFloat((u/Math.pow(h,D)).toFixed(2))+" "+N[D]};return(u,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dm-file-upload",{"dm-file-upload--disabled":t.disabled,"dm-file-upload--loading":t.loading}])},[e.createElementVNode("div",{class:e.normalizeClass(["dm-file-upload__area",{"dm-file-upload__area--dragover":n.value}]),onClick:p,onDrop:b,onDragover:g,onDragenter:C,onDragleave:_},[e.createElementVNode("input",{ref_key:"fileInputRef",ref:o,type:"file",class:"dm-file-upload__input",accept:t.accept,multiple:t.multiple,disabled:t.disabled,onChange:V},null,40,qt),t.loading?(e.openBlock(),e.createElementBlock("div",Ut)):(e.openBlock(),e.createElementBlock("div",Wt,[h[0]||(h[0]=e.createElementVNode("div",{class:"dm-file-upload__icon"},[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})])],-1)),e.createElementVNode("div",Ht,[e.createElementVNode("p",Gt,e.toDisplayString(t.uploadText||"Click to upload or drag and drop"),1),e.createElementVNode("p",Yt,e.toDisplayString(t.accept?`Supported formats: ${t.accept}`:"All file types supported"),1)])]))],34),t.progress!==void 0?(e.openBlock(),e.createElementBlock("div",Xt,[e.createElementVNode("div",Jt,[e.createElementVNode("div",{class:"dm-file-upload__progress-bar",style:e.normalizeStyle({width:`${t.progress}%`})},null,4)]),e.createElementVNode("span",Qt,e.toDisplayString(t.progress)+"%",1)])):e.createCommentVNode("",!0),s.value.length>0?(e.openBlock(),e.createElementBlock("div",Zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(N,D)=>(e.openBlock(),e.createElementBlock("div",{key:`${N.name}-${D}`,class:"dm-file-upload__file"},[e.createElementVNode("div",vt,[e.createElementVNode("span",ea,e.toDisplayString(N.name),1),e.createElementVNode("span",ta,e.toDisplayString(f(N.size)),1)]),e.createElementVNode("button",{type:"button",class:"dm-file-upload__remove",onClick:w=>y(D)}," × ",8,aa)]))),128))])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("div",la,e.toDisplayString(m.value),1)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-a22c592f"]]),na=["accept","multiple","disabled"],ra={key:1,class:"datametria-upload__button"},sa=["disabled"],ia=["accept","multiple","disabled"],ca={key:2,class:"datametria-upload__list"},da=["src"],ma={class:"datametria-upload__info"},pa={class:"datametria-upload__name"},fa={class:"datametria-upload__size"},ua={key:1,class:"datametria-upload__progress"},ha=["onClick"],ka=M(e.defineComponent({__name:"DatametriaUpload",props:{modelValue:{default:()=>[]},action:{default:""},accept:{default:""},multiple:{type:Boolean,default:!1},limit:{default:0},maxSize:{default:0},drag:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change","exceed","error","success"],setup(t,{expose:i,emit:l}){const a=t,o=l,n=e.ref(),s=e.ref(!1),r=e.ref(a.modelValue);let m=0;const p=()=>{var f;(f=n.value)==null||f.click()},V=f=>{const u=f.target,h=Array.from(u.files||[]);g(h),u.value=""},b=f=>{var h;s.value=!1;const u=Array.from(((h=f.dataTransfer)==null?void 0:h.files)||[]);g(u)},g=f=>{if(!a.disabled){if(a.limit&&r.value.length+f.length>a.limit){o("exceed",f);return}f.forEach(u=>{if(a.maxSize&&u.size>a.maxSize){o("error",new Error("File size exceeds limit"),u);return}if(a.accept&&!C(u)){o("error",new Error("Invalid file type"),u);return}const h={uid:`upload-${Date.now()}-${m++}`,name:u.name,size:u.size,status:"ready",progress:0,raw:u};if(u.type.startsWith("image/")){const N=new FileReader;N.onload=D=>{var w;h.preview=(w=D.target)==null?void 0:w.result},N.readAsDataURL(u)}r.value.push(h),a.action&&(h.status="uploading",_(h))}),o("update:modelValue",r.value),o("change",r.value)}},C=f=>a.accept.split(",").map(h=>h.trim()).some(h=>h.startsWith(".")?f.name.toLowerCase().endsWith(h.toLowerCase()):h.endsWith("/*")?f.type.startsWith(h.replace("/*","")):f.type===h),_=f=>{const u=setInterval(()=>{f.progress+=10,f.progress>=100&&(clearInterval(u),f.status="success",o("success",{status:"success"},f))},100)},B=f=>{const u=r.value.indexOf(f);u>-1&&(r.value.splice(u,1),o("update:modelValue",r.value),o("change",r.value))},y=f=>{if(f===0)return"0 B";const u=1024,h=["B","KB","MB","GB"],N=Math.floor(Math.log(f)/Math.log(u));return`${(f/Math.pow(u,N)).toFixed(2)} ${h[N]}`};return i({clearFiles:()=>{r.value=[],o("update:modelValue",[])}}),(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-upload",{"datametria-upload--disabled":t.disabled}])},[t.drag?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["datametria-upload__drag",{"datametria-upload__drag--over":s.value}]),onDrop:e.withModifiers(b,["prevent"]),onDragover:u[0]||(u[0]=e.withModifiers(h=>s.value=!0,["prevent"])),onDragleave:u[1]||(u[1]=e.withModifiers(h=>s.value=!1,["prevent"]))},[e.renderSlot(f.$slots,"trigger",{},()=>[u[2]||(u[2]=e.createElementVNode("div",{class:"datametria-upload__drag-content"},[e.createElementVNode("span",null,"Arraste arquivos aqui ou clique para selecionar")],-1))],!0),e.createElementVNode("input",{ref_key:"inputRef",ref:n,type:"file",class:"datametria-upload__input",accept:t.accept,multiple:t.multiple,disabled:t.disabled,onChange:V},null,40,na)],34)):(e.openBlock(),e.createElementBlock("div",ra,[e.renderSlot(f.$slots,"trigger",{},()=>[e.createElementVNode("button",{type:"button",disabled:t.disabled,onClick:p}," Selecionar arquivo ",8,sa)],!0),e.createElementVNode("input",{ref_key:"inputRef",ref:n,type:"file",class:"datametria-upload__input",accept:t.accept,multiple:t.multiple,disabled:t.disabled,onChange:V},null,40,ia)])),r.value.length?(e.openBlock(),e.createElementBlock("div",ca,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,h=>(e.openBlock(),e.createElementBlock("div",{key:h.uid,class:"datametria-upload__item"},[h.preview?(e.openBlock(),e.createElementBlock("img",{key:0,src:h.preview,class:"datametria-upload__preview",alt:"preview"},null,8,da)):e.createCommentVNode("",!0),e.createElementVNode("div",ma,[e.createElementVNode("span",pa,e.toDisplayString(h.name),1),e.createElementVNode("span",fa,e.toDisplayString(y(h.size)),1)]),h.status==="uploading"?(e.openBlock(),e.createElementBlock("div",ua,[e.createElementVNode("div",{class:"datametria-upload__progress-bar",style:e.normalizeStyle({width:`${h.progress}%`})},null,4)])):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"datametria-upload__remove",onClick:N=>B(h)}," × ",8,ha)]))),128))])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-b670d16b"]]),ga=["aria-expanded","placeholder","disabled","onKeydown"],ba=["onMousedown","onMouseenter"],_a=["innerHTML"],ya=M(e.defineComponent({__name:"DatametriaAutocomplete",props:{modelValue:{default:""},fetchSuggestions:{},debounce:{default:300},triggerOnFocus:{type:Boolean,default:!1},placeholder:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","select"],setup(t,{emit:i}){const l=t,a=i,o=e.ref(),n=e.ref(),s=e.ref(l.modelValue),r=e.ref([]),m=e.ref(!1),p=e.ref(-1),V=e.ref(!1);let b=null;const g=e.computed(()=>{if(!o.value)return{};const z=o.value.getBoundingClientRect();return{position:"fixed",top:`${z.bottom+4}px`,left:`${z.left}px`,width:`${z.width}px`,zIndex:9999}}),C=()=>{a("update:modelValue",s.value),b&&clearTimeout(b),b=setTimeout(()=>{y()},l.debounce)},_=()=>{l.triggerOnFocus&&s.value&&y()},B=()=>{setTimeout(()=>{m.value=!1,p.value=-1},200)},y=async()=>{if(!s.value){r.value=[],m.value=!1;return}V.value=!0;try{const z=await l.fetchSuggestions(s.value);r.value=z,m.value=z.length>0,p.value=-1}catch{r.value=[],m.value=!1}finally{V.value=!1}},f=z=>{s.value=z,a("update:modelValue",z),a("select",z),m.value=!1,p.value=-1},u=()=>{p.value<r.value.length-1&&p.value++},h=()=>{p.value>0&&p.value--},N=()=>{p.value>=0&&p.value<r.value.length&&f(r.value[p.value])},D=z=>{if(!s.value)return z;const I=new RegExp(`(${w(s.value)})`,"gi");return z.replace(I,"<strong>$1</strong>")},w=z=>z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return e.watch(()=>l.modelValue,z=>{z!==s.value&&(s.value=z)}),(z,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-autocomplete",{"datametria-autocomplete--disabled":t.disabled}])},[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:o,"onUpdate:modelValue":I[0]||(I[0]=$=>s.value=$),type:"text",role:"combobox","aria-expanded":m.value,"aria-autocomplete":"list",class:"datametria-autocomplete__input",placeholder:t.placeholder,disabled:t.disabled,onInput:C,onFocus:_,onBlur:B,onKeydown:[e.withKeys(e.withModifiers(u,["prevent"]),["down"]),e.withKeys(e.withModifiers(h,["prevent"]),["up"]),e.withKeys(e.withModifiers(N,["prevent"]),["enter"])]},null,40,ga),[[e.vModelText,s.value]]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[m.value&&r.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:n,class:"datametria-autocomplete__dropdown",style:e.normalizeStyle(g.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,($,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,class:e.normalizeClass(["datametria-autocomplete__item",{"datametria-autocomplete__item--active":x===p.value}]),onMousedown:e.withModifiers(d=>f($),["prevent"]),onMouseenter:d=>p.value=x},[e.createElementVNode("span",{innerHTML:D($)},null,8,_a)],42,ba))),128))],4)):e.createCommentVNode("",!0)]))],2))}}),[["__scopeId","data-v-5ea22e1c"]]),Ba=M(e.defineComponent({__name:"DatametriaForm",props:{model:{default:()=>({})},rules:{default:()=>({})},labelWidth:{},labelPosition:{default:"right"},inline:{type:Boolean,default:!1}},emits:["validate","submit"],setup(t,{expose:i,emit:l}){const a=t,o=l,n=e.reactive(new Map),s=e.ref({}),r=_=>{n.set(_.prop,_)},m=_=>{n.delete(_)},p=async()=>{const _=[],B={};n.forEach(u=>{_.push(u.validate().then(h=>(!h&&u.errorMessage&&(B[u.prop]=[u.errorMessage]),h)))});const f=(await Promise.all(_)).every(u=>u);return s.value=B,o("validate",f,B),f},V=async _=>{const B=n.get(_);if(!B)return!0;const y=await B.validate();return!y&&B.errorMessage?s.value[_]=[B.errorMessage]:delete s.value[_],y},b=()=>{n.forEach(_=>{_.reset()}),s.value={}},g=_=>{if(!_){s.value={},n.forEach(y=>y.clearValidate());return}(Array.isArray(_)?_:[_]).forEach(y=>{delete s.value[y];const f=n.get(y);f&&f.clearValidate()})},C=async()=>{await p()&&o("submit",a.model)};return e.provide("datametriaForm",{model:a.model,rules:a.rules,labelWidth:a.labelWidth,labelPosition:a.labelPosition,registerField:r,unregisterField:m,validateField:V}),i({validate:p,validateField:V,resetFields:b,clearValidate:g}),(_,B)=>(e.openBlock(),e.createElementBlock("form",{class:e.normalizeClass(["datametria-form",{[`datametria-form--label-${t.labelPosition}`]:t.labelPosition,"datametria-form--inline":t.inline}]),onSubmit:e.withModifiers(C,["prevent"])},[e.renderSlot(_.$slots,"default",{},void 0,!0)],34))}}),[["__scopeId","data-v-0ad44036"]]),O=t=>!!t,K=t=>t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t):!0,j=t=>i=>i?i.length>=t:!0,q=t=>i=>i?i.length<=t:!0,U=t=>i=>i?t.test(i):!0,W=t=>i=>t(i);function H(){return{required:O,email:K,minLength:j,maxLength:q,pattern:U,custom:W}}const $a={class:"datametria-form-item__content"},Ea={key:0,class:"datametria-form-item__error"},Va=M(e.defineComponent({__name:"DatametriaFormItem",props:{prop:{},label:{},rules:{},required:{type:Boolean}},setup(t,{expose:i}){const l=t,a=e.inject("datametriaForm",null),o=e.ref(""),n=e.computed(()=>l.required?!0:l.rules?l.rules.some(b=>b.required):!1),s=e.computed(()=>a!=null&&a.labelWidth?{width:a.labelWidth}:{}),r=e.computed(()=>{if(!(!(a!=null&&a.model)||!l.prop))return a.model[l.prop]}),m=async()=>{if(!l.prop||!l.rules)return!0;const b=H(),g=[];for(const C of l.rules)if(C.required&&!b.required(r.value)){g.push(C.message||"Campo obrigatório");break}return g.length>0?(o.value=g[0],!1):(o.value="",!0)},p=()=>{o.value="",a!=null&&a.model&&l.prop&&(a.model[l.prop]=void 0)},V=()=>{o.value=""};return e.watch(r,()=>{o.value&&m()}),e.onMounted(()=>{a&&l.prop&&a.registerField({prop:l.prop,validate:m,reset:p,clearValidate:V,get errorMessage(){return o.value}})}),e.onBeforeUnmount(()=>{a&&l.prop&&a.unregisterField(l.prop)}),i({validate:m,reset:p,clearValidate:V,errorMessage:o}),(b,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-form-item",{"is-error":o.value,"is-required":n.value}])},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:"datametria-form-item__label",style:e.normalizeStyle(s.value)},e.toDisplayString(t.label),5)):e.createCommentVNode("",!0),e.createElementVNode("div",$a,[e.renderSlot(b.$slots,"default",{},void 0,!0),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",Ea,e.toDisplayString(o.value),1)):e.createCommentVNode("",!0)]),_:1})])],2))}}),[["__scopeId","data-v-1bd3b9d8"]]),Ca={key:0,class:"datametria-card__header"},wa={class:"datametria-card__title"},Na={class:"datametria-card__content"},Sa={key:1,class:"datametria-card__footer"},Da=M(e.defineComponent({__name:"DatametriaCard",props:{title:{},padding:{type:Boolean,default:!0}},setup(t){const i=t,l=e.computed(()=>["datametria-card",{"datametria-card--no-padding":!i.padding}]);return(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.value)},[t.title||a.$slots.header?(e.openBlock(),e.createElementBlock("div",Ca,[e.renderSlot(a.$slots,"header",{},()=>[e.createElementVNode("h3",wa,e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Na,[e.renderSlot(a.$slots,"default",{},void 0,!0)]),a.$slots.footer?(e.openBlock(),e.createElementBlock("div",Sa,[e.renderSlot(a.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-573dc7c3"]]),xa={key:0,class:"datametria-dialog__header"},Ta={class:"datametria-dialog__body"},za={key:1,class:"datametria-dialog__footer"},Ma=M(e.defineComponent({__name:"DatametriaDialog",props:{modelValue:{type:Boolean},title:{default:""},width:{default:"50%"},fullscreen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},center:{type:Boolean,default:!1},beforeClose:{}},emits:["update:modelValue","open","opened","close","closed"],setup(t,{emit:i}){const l=t,a=i,o=`dialog-title-${Math.random().toString(36).substr(2,9)}`,n=e.computed(()=>({"datametria-dialog--fullscreen":l.fullscreen,"datametria-dialog--center":l.center})),s=e.computed(()=>l.fullscreen?{}:{width:typeof l.width=="number"?`${l.width}px`:l.width}),r=()=>{l.beforeClose?l.beforeClose(()=>{a("update:modelValue",!1),a("close")}):(a("update:modelValue",!1),a("close"))},m=()=>{l.closeOnClickModal&&r()},p=V=>{V.key==="Escape"&&l.closeOnPressEscape&&l.modelValue&&r()};return e.watch(()=>l.modelValue,V=>{V?(a("open"),document.body.style.overflow="hidden",setTimeout(()=>a("opened"),300)):(document.body.style.overflow="",setTimeout(()=>a("closed"),300))}),e.onMounted(()=>{document.addEventListener("keydown",p)}),e.onUnmounted(()=>{document.removeEventListener("keydown",p),document.body.style.overflow=""}),(V,b)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"dialog-fade"},{default:e.withCtx(()=>[t.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["datametria-dialog-overlay",{"datametria-dialog-overlay--modal":t.modal}]),onClick:m},[e.createElementVNode("div",{class:e.normalizeClass(["datametria-dialog",n.value]),style:e.normalizeStyle(s.value),role:"dialog","aria-modal":"true","aria-labelledby":o,onClick:b[0]||(b[0]=e.withModifiers(()=>{},["stop"]))},[V.$slots.header||t.title?(e.openBlock(),e.createElementBlock("div",xa,[e.renderSlot(V.$slots,"header",{},()=>[e.createElementVNode("h3",{id:o,class:"datametria-dialog__title"},e.toDisplayString(t.title),1)],!0),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:"datametria-dialog__close","aria-label":"Fechar",onClick:r}," × ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ta,[e.renderSlot(V.$slots,"default",{},void 0,!0)]),V.$slots.footer?(e.openBlock(),e.createElementBlock("div",za,[e.renderSlot(V.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],6)],2)):e.createCommentVNode("",!0)]),_:3})]))}}),[["__scopeId","data-v-99282679"]]),Ia={key:0,class:"datametria-modal__header"},La={class:"datametria-modal__title"},Fa={class:"datametria-modal__body"},Ra={key:1,class:"datametria-modal__footer"},Aa=M(e.defineComponent({__name:"DatametriaModal",props:{modelValue:{type:Boolean},title:{},size:{default:"32rem"},closable:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(t,{emit:i}){const l=t,a=i,o=()=>{l.closable&&(a("update:modelValue",!1),a("close"))};return(n,s)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:"datametria-modal",onClick:e.withModifiers(o,["self"])},[e.createElementVNode("div",{class:"datametria-modal__content",style:e.normalizeStyle({maxWidth:t.size})},[t.title||n.$slots.header?(e.openBlock(),e.createElementBlock("div",Ia,[e.renderSlot(n.$slots,"header",{},()=>[e.createElementVNode("h3",La,e.toDisplayString(t.title),1)],!0),t.closable?(e.openBlock(),e.createElementBlock("button",{key:0,class:"datametria-modal__close",onClick:o}," × ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Fa,[e.renderSlot(n.$slots,"default",{},void 0,!0)]),n.$slots.footer?(e.openBlock(),e.createElementBlock("div",Ra,[e.renderSlot(n.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],4)])):e.createCommentVNode("",!0)]),_:3})]))}}),[["__scopeId","data-v-4316db1d"]]),Pa=M(e.defineComponent({__name:"DatametriaContainer",props:{size:{default:"lg"},fluid:{type:Boolean,default:!1}},setup(t){return(i,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dm-container",[`dm-container--${t.size}`,{"dm-container--fluid":t.fluid}]])},[e.renderSlot(i.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-0cb48889"]]),Oa=M(e.defineComponent({__name:"DatametriaGrid",props:{cols:{default:12},gap:{default:"var(--dm-spacing-4, 1rem)"}},setup(t){return(i,l)=>(e.openBlock(),e.createElementBlock("div",{class:"dm-grid",style:e.normalizeStyle({"--dm-grid-cols":t.cols,"--dm-grid-gap":t.gap})},[e.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-2354cb08"]]),Ka=["role","aria-orientation"],ja={key:0,class:"dm-divider__label"},qa=M(e.defineComponent({__name:"DatametriaDivider",props:{orientation:{default:"horizontal"},dashed:{type:Boolean,default:!1},label:{}},setup(t){return(i,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dm-divider",[`dm-divider--${t.orientation}`,{"dm-divider--dashed":t.dashed}]]),role:t.orientation==="horizontal"?"separator":void 0,"aria-orientation":t.orientation},[i.$slots.default||t.label?(e.openBlock(),e.createElementBlock("span",ja,[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)])):e.createCommentVNode("",!0)],10,Ka))}}),[["__scopeId","data-v-cb028b57"]]),Ua={class:"datametria-alert__icon"},Wa={key:0},Ha={key:1},Ga={key:2},Ya={key:3},Xa={class:"datametria-alert__content"},Ja={key:0,class:"datametria-alert__title"},Qa={class:"datametria-alert__message"},Za=M(e.defineComponent({__name:"DatametriaAlert",props:{modelValue:{type:Boolean,default:!0},variant:{default:"info"},title:{},message:{},closable:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t){const i=t;if(process.env.NODE_ENV==="development"){const a=["success","error","warning","info","primary"];a.includes(i.variant)||console.warn(`[DatametriaAlert] Invalid variant "${i.variant}". Valid options: ${a.join(", ")}`)}const l=e.computed(()=>["datametria-alert",`datametria-alert--${i.variant}`]);return(a,o)=>t.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(l.value)},[e.createElementVNode("div",Ua,[t.variant==="success"?(e.openBlock(),e.createElementBlock("span",Wa,"✓")):t.variant==="error"?(e.openBlock(),e.createElementBlock("span",Ha,"✕")):t.variant==="warning"?(e.openBlock(),e.createElementBlock("span",Ga,"⚠")):(e.openBlock(),e.createElementBlock("span",Ya,"ℹ"))]),e.createElementVNode("div",Xa,[t.title?(e.openBlock(),e.createElementBlock("h4",Ja,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.createElementVNode("p",Qa,[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.message),1)],!0)])]),t.closable?(e.openBlock(),e.createElementBlock("button",{key:0,class:"datametria-alert__close",onClick:o[0]||(o[0]=n=>a.$emit("update:modelValue",!1))}," × ")):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-e169b31d"]]),va=["aria-live"],el={class:"dm-toast__content"},tl={class:"dm-toast__message"},al=M(e.defineComponent({__name:"DatametriaToast",props:{message:{},variant:{default:"info"},duration:{default:3e3},closable:{type:Boolean,default:!0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue","close"],setup(t,{emit:i}){const l=t;if(process.env.NODE_ENV==="development"){const m=["success","error","warning","info","primary"];m.includes(l.variant)||console.warn(`[DatametriaToast] Invalid variant "${l.variant}". Valid options: ${m.join(", ")}`)}const a=i,o=e.ref(l.modelValue);let n=null;e.watch(()=>l.modelValue,m=>{o.value=m,m&&l.duration>0&&s()});const s=()=>{n&&clearTimeout(n),n=setTimeout(()=>{r()},l.duration)},r=()=>{o.value=!1,a("update:modelValue",!1),a("close"),n&&clearTimeout(n)};return e.onMounted(()=>{o.value&&l.duration>0&&s()}),(m,p)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"dm-toast"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dm-toast",`dm-toast--${t.variant}`]),role:"alert","aria-live":t.variant==="error"?"assertive":"polite"},[e.createElementVNode("div",el,[e.createElementVNode("span",tl,e.toDisplayString(t.message),1),t.closable?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dm-toast__close",onClick:r,"aria-label":"Fechar"},"×")):e.createCommentVNode("",!0)])],10,va)):e.createCommentVNode("",!0)]),_:1})]))}}),[["__scopeId","data-v-c070d8e2"]]),ll=["id","aria-hidden"],ol={class:"dm-tooltip__content"},nl={key:0,class:"dm-tooltip__arrow"},rl=M(e.defineComponent({__name:"DatametriaTooltip",props:{content:{},placement:{default:"top"},variant:{default:"dark"},trigger:{default:"hover"},disabled:{type:Boolean},showArrow:{type:Boolean,default:!0},delay:{default:100},hideDelay:{default:100},offset:{default:8},maxWidth:{default:"200px"}},emits:["show","hide"],setup(t,{expose:i,emit:l}){const a=t,o=l,n=e.ref(),s=e.ref(),r=e.ref(!1),m=e.ref(),p=e.ref(),V=e.computed(()=>`dm-tooltip-${Math.random().toString(36).substr(2,9)}`),b=e.ref({}),g=async()=>{if(!n.value||!s.value)return;await e.nextTick();const I=n.value.getBoundingClientRect(),$=s.value.getBoundingClientRect(),x={width:window.innerWidth,height:window.innerHeight};let d=0,c=0;switch(a.placement){case"top":case"top-start":case"top-end":d=I.top-$.height-a.offset;break;case"bottom":case"bottom-start":case"bottom-end":d=I.bottom+a.offset;break;case"left":d=I.top+(I.height-$.height)/2,c=I.left-$.width-a.offset;break;case"right":d=I.top+(I.height-$.height)/2,c=I.right+a.offset;break}if(a.placement.startsWith("top")||a.placement.startsWith("bottom"))switch(a.placement){case"top":case"bottom":c=I.left+(I.width-$.width)/2;break;case"top-start":case"bottom-start":c=I.left;break;case"top-end":case"bottom-end":c=I.right-$.width;break}c<0?c=8:c+$.width>x.width&&(c=x.width-$.width-8),d<0?d=8:d+$.height>x.height&&(d=x.height-$.height-8),b.value={position:"fixed",top:`${d}px`,left:`${c}px`,maxWidth:a.maxWidth,zIndex:"9999"}},C=()=>{a.disabled||r.value||(clearTimeout(p.value),m.value=window.setTimeout(async()=>{r.value=!0,o("show"),await g()},a.delay))},_=()=>{clearTimeout(m.value),p.value=window.setTimeout(()=>{r.value=!1,o("hide")},a.hideDelay)},B=()=>{a.trigger==="hover"&&C()},y=()=>{a.trigger==="hover"&&_()},f=()=>{a.trigger==="focus"&&C()},u=()=>{a.trigger==="focus"&&_()},h=()=>{a.trigger==="click"&&(r.value?_():C())},N=()=>{g()},D=()=>{b.value={}},w=()=>{r.value&&g()},z=()=>{r.value&&g()};return e.onMounted(()=>{window.addEventListener("resize",w),window.addEventListener("scroll",z,!0)}),e.onUnmounted(()=>{clearTimeout(m.value),clearTimeout(p.value),window.removeEventListener("resize",w),window.removeEventListener("scroll",z,!0)}),i({show:C,hide:_,isVisible:e.computed(()=>r.value)}),(I,$)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"triggerRef",ref:n,class:"dm-tooltip-trigger",onMouseenter:B,onMouseleave:y,onFocus:f,onBlur:u,onClick:h},[e.renderSlot(I.$slots,"default",{},void 0,!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"tooltip",onEnter:N,onLeave:D},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"tooltipRef",ref:s,id:V.value,class:e.normalizeClass(["dm-tooltip",[`dm-tooltip--${t.placement}`,`dm-tooltip--${t.variant}`,{"dm-tooltip--arrow":t.showArrow}]]),style:e.normalizeStyle(b.value),role:"tooltip","aria-hidden":!r.value},[e.createElementVNode("div",ol,[e.renderSlot(I.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)],!0)]),t.showArrow?(e.openBlock(),e.createElementBlock("div",nl)):e.createCommentVNode("",!0)],14,ll)):e.createCommentVNode("",!0)]),_:3})]))],544))}}),[["__scopeId","data-v-fbebad65"]]),sl=["aria-label"],il={key:0,class:"datametria-skeleton__text"},cl={key:1,class:"datametria-skeleton__avatar shimmer"},dl={key:2,class:"datametria-skeleton__card"},ml={key:3,class:"datametria-skeleton__button shimmer"},pl={key:4,class:"datametria-skeleton__custom shimmer"},fl=M(e.defineComponent({__name:"DatametriaSkeleton",props:{variant:{default:"text"},width:{},height:{},lines:{default:3},animated:{type:Boolean,default:!0},ariaLabel:{default:"Carregando conteúdo..."},lastLineWidth:{default:75}},setup(t){const i=t,l=e.computed(()=>{const o={};return i.width&&(o.width=typeof i.width=="number"?`${i.width}px`:i.width),i.height&&(o.height=typeof i.height=="number"?`${i.height}px`:i.height),o}),a=o=>({width:o===i.lines?`${i.lastLineWidth}%`:"100%",marginBottom:o<i.lines?"0.5rem":"0"});return(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-skeleton",[`datametria-skeleton--${t.variant}`,{"datametria-skeleton--animated":t.animated}]]),style:e.normalizeStyle(l.value),"aria-label":t.ariaLabel,role:"status","aria-live":"polite"},[t.variant==="text"?(e.openBlock(),e.createElementBlock("div",il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lines,s=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"datametria-skeleton__line shimmer",style:e.normalizeStyle(a(s))},null,4))),128))])):t.variant==="avatar"?(e.openBlock(),e.createElementBlock("div",cl)):t.variant==="card"?(e.openBlock(),e.createElementBlock("div",dl,[...n[0]||(n[0]=[e.createStaticVNode('<div class="datametria-skeleton__card-header shimmer" data-v-9633d1ce></div><div class="datametria-skeleton__card-content" data-v-9633d1ce><div class="datametria-skeleton__line shimmer" style="width:100%;" data-v-9633d1ce></div><div class="datametria-skeleton__line shimmer" style="width:80%;" data-v-9633d1ce></div><div class="datametria-skeleton__line shimmer" style="width:60%;" data-v-9633d1ce></div></div>',2)])])):t.variant==="button"?(e.openBlock(),e.createElementBlock("div",ml)):(e.openBlock(),e.createElementBlock("div",pl))],14,sl))}}),[["__scopeId","data-v-9633d1ce"]]),ul={key:0,class:"datametria-progress-bar"},hl={key:0,class:"datametria-progress-bar__innerText"},kl={key:0,class:"datametria-progress__text"},gl={key:1,class:"datametria-progress-circle"},bl=["width","height"],_l=["d","stroke-width"],yl=["d","stroke-width","stroke-dasharray","stroke-dashoffset"],Bl={key:0,class:"datametria-progress__text"},$l=M(e.defineComponent({__name:"DatametriaProgress",props:{percentage:{default:0},type:{default:"line"},status:{default:""},strokeWidth:{default:6},showText:{type:Boolean,default:!0},textInside:{type:Boolean,default:!1},width:{default:126}},setup(t){const i=t,l=e.computed(()=>({[`datametria-progress--${i.type}`]:!0,[`datametria-progress--${i.status}`]:i.status,"datametria-progress--text-inside":i.textInside})),a=e.computed(()=>({width:`${i.percentage}%`,backgroundColor:o.value})),o=e.computed(()=>({success:"var(--datametria-success-color, #67c23a)",warning:"var(--datametria-warning-color, #e6a23c)",error:"var(--datametria-error-color, #f56c6c)","":"var(--datametria-primary-color, #0072ce)"})[i.status]),n=e.computed(()=>i.width),s=e.computed(()=>(i.strokeWidth/i.width*100).toFixed(1)),r=e.computed(()=>(i.type==="circle",50-parseFloat(s.value)/2)),m=e.computed(()=>{const g=r.value;return i.type==="dashboard"?`M 50 50 m 0 ${g} a ${g} ${g} 0 1 1 0 -${g*2} a ${g} ${g} 0 1 1 0 ${g*2}`:`M 50 50 m 0 -${g} a ${g} ${g} 0 1 1 0 ${g*2} a ${g} ${g} 0 1 1 0 -${g*2}`}),p=e.computed(()=>2*Math.PI*r.value),V=e.computed(()=>{const g=i.type==="dashboard"?.75:1;return p.value*(1-i.percentage/100)*g}),b=e.computed(()=>({stroke:o.value,strokeLinecap:"round"}));return(g,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-progress",l.value])},[t.type==="line"?(e.openBlock(),e.createElementBlock("div",ul,[e.createElementVNode("div",{class:"datametria-progress-bar__outer",style:e.normalizeStyle({height:`${t.strokeWidth}px`})},[e.createElementVNode("div",{class:"datametria-progress-bar__inner",style:e.normalizeStyle(a.value)},[t.showText&&t.textInside?(e.openBlock(),e.createElementBlock("div",hl,e.toDisplayString(t.percentage)+"% ",1)):e.createCommentVNode("",!0)],4)],4),t.showText&&!t.textInside?(e.openBlock(),e.createElementBlock("div",kl,[e.renderSlot(g.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.percentage)+"%",1)],!0)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",gl,[(e.openBlock(),e.createElementBlock("svg",{width:n.value,height:n.value,viewBox:"0 0 100 100"},[e.createElementVNode("path",{class:"datametria-progress-circle__track",d:m.value,"stroke-width":s.value,fill:"none"},null,8,_l),e.createElementVNode("path",{class:"datametria-progress-circle__path",d:m.value,"stroke-width":s.value,"stroke-dasharray":p.value,"stroke-dashoffset":V.value,style:e.normalizeStyle(b.value),fill:"none"},null,12,yl)],8,bl)),t.showText?(e.openBlock(),e.createElementBlock("div",Bl,[e.renderSlot(g.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.percentage)+"%",1)],!0)])):e.createCommentVNode("",!0)]))],2))}}),[["__scopeId","data-v-30852c74"]]),El={class:"datametria-result__icon"},Vl={key:0,viewBox:"0 0 48 48",fill:"none"},Cl={key:1,viewBox:"0 0 48 48",fill:"none"},wl={key:2,viewBox:"0 0 48 48",fill:"none"},Nl={key:3,viewBox:"0 0 48 48",fill:"none"},Sl={class:"datametria-result__title"},Dl={key:0,class:"datametria-result__subtitle"},xl={key:1,class:"datametria-result__extra"},Tl=M(e.defineComponent({__name:"DatametriaResult",props:{status:{default:"info"},title:{default:""},subtitle:{default:""}},setup(t){const i=t,l=e.computed(()=>({[`datametria-result--${i.status}`]:!0}));return(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-result",l.value])},[e.createElementVNode("div",El,[e.renderSlot(a.$slots,"icon",{},()=>[t.status==="success"?(e.openBlock(),e.createElementBlock("svg",Vl,[...o[0]||(o[0]=[e.createElementVNode("path",{d:"M24 4C12.96 4 4 12.96 4 24s8.96 20 20 20 20-8.96 20-20S35.04 4 24 4zm-4 30L10 24l2.83-2.83L20 28.34l15.17-15.17L38 16 20 34z",fill:"currentColor"},null,-1)])])):t.status==="warning"?(e.openBlock(),e.createElementBlock("svg",Cl,[...o[1]||(o[1]=[e.createElementVNode("path",{d:"M2 42h44L24 4 2 42zm24-6h-4v-4h4v4zm0-8h-4v-8h4v8z",fill:"currentColor"},null,-1)])])):t.status==="error"?(e.openBlock(),e.createElementBlock("svg",wl,[...o[2]||(o[2]=[e.createElementVNode("path",{d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z",fill:"currentColor"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",Nl,[...o[3]||(o[3]=[e.createElementVNode("path",{d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm2 30h-4v-4h4v4zm0-8h-4V14h4v12z",fill:"currentColor"},null,-1)])]))],!0)]),e.createElementVNode("div",Sl,[e.renderSlot(a.$slots,"title",{},()=>[e.createElementVNode("p",null,e.toDisplayString(t.title),1)],!0)]),t.subtitle||a.$slots.subtitle?(e.openBlock(),e.createElementBlock("div",Dl,[e.renderSlot(a.$slots,"subtitle",{},()=>[e.createElementVNode("p",null,e.toDisplayString(t.subtitle),1)],!0)])):e.createCommentVNode("",!0),a.$slots.extra?(e.openBlock(),e.createElementBlock("div",xl,[e.renderSlot(a.$slots,"extra",{},void 0,!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-3cbcd903"]]),zl={class:"datametria-popconfirm__content"},Ml={class:"datametria-popconfirm__message"},Il={class:"datametria-popconfirm__actions"},Ll=M(e.defineComponent({__name:"DatametriaPopconfirm",props:{title:{default:"Tem certeza?"},confirmButtonText:{default:"Confirmar"},cancelButtonText:{default:"Cancelar"},placement:{default:"top"}},emits:["confirm","cancel"],setup(t,{emit:i}){const l=t,a=i,o=e.ref(!1),n=e.ref(),s=e.ref(),r=e.ref(),m=e.ref({position:"absolute",top:"0px",left:"0px"}),p=()=>{o.value=!o.value,o.value&&C()},V=()=>{o.value=!1,a("confirm")},b=()=>{o.value=!1,a("cancel")},g=_=>{if(!o.value)return;const B=_.target;s.value&&!s.value.contains(B)&&n.value&&!n.value.contains(B)&&(o.value=!1)},C=()=>{if(!n.value||!s.value)return;const _=n.value.getBoundingClientRect(),B=s.value.getBoundingClientRect();let y=0,f=0;switch(l.placement){case"top":y=_.top-B.height-8,f=_.left+(_.width-B.width)/2;break;case"bottom":y=_.bottom+8,f=_.left+(_.width-B.width)/2;break;case"left":y=_.top+(_.height-B.height)/2,f=_.left-B.width-8;break;case"right":y=_.top+(_.height-B.height)/2,f=_.right+8;break}m.value={position:"absolute",top:`${y+window.scrollY}px`,left:`${f+window.scrollX}px`}};return e.onMounted(()=>{document.addEventListener("click",g)}),e.onUnmounted(()=>{document.removeEventListener("click",g)}),(_,B)=>(e.openBlock(),e.createElementBlock("div",{class:"datametria-popconfirm",ref_key:"popconfirmRef",ref:r},[e.createElementVNode("div",{ref_key:"triggerRef",ref:n,onClick:p},[e.renderSlot(_.$slots,"default",{},void 0,!0)],512),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"popoverRef",ref:s,class:"datametria-popconfirm__popover",style:e.normalizeStyle(m.value)},[e.createElementVNode("div",zl,[B[0]||(B[0]=e.createElementVNode("div",{class:"datametria-popconfirm__icon"},[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none"},[e.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z",fill:"currentColor"})])],-1)),e.createElementVNode("div",Ml,e.toDisplayString(t.title),1)]),e.createElementVNode("div",Il,[e.createElementVNode("button",{class:"datametria-popconfirm__btn datametria-popconfirm__btn--cancel",onClick:b},e.toDisplayString(t.cancelButtonText),1),e.createElementVNode("button",{class:"datametria-popconfirm__btn datametria-popconfirm__btn--confirm",onClick:V},e.toDisplayString(t.confirmButtonText),1)])],4)):e.createCommentVNode("",!0)]))],512))}}),[["__scopeId","data-v-01f460e4"]]),Fl=["aria-label"],Rl={key:0,class:"dm-spinner__label"},Al=M(e.defineComponent({__name:"DatametriaSpinner",props:{size:{default:"md"},variant:{default:"primary"},label:{},ariaLabel:{default:"Carregando"}},setup(t){return(i,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dm-spinner",[`dm-spinner--${t.size}`,`dm-spinner--${t.variant}`]]),role:"status","aria-label":t.ariaLabel},[l[0]||(l[0]=e.createElementVNode("svg",{class:"dm-spinner__svg",viewBox:"0 0 50 50"},[e.createElementVNode("circle",{class:"dm-spinner__circle",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"4"})],-1)),t.label?(e.openBlock(),e.createElementBlock("span",Rl,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0)],10,Fl))}}),[["__scopeId","data-v-0e7cecde"]]),Pl={class:"datametria-table"},Ol={class:"datametria-table__table"},Kl={class:"datametria-table__thead"},jl={class:"datametria-table__tbody"},ql={key:0,class:"datametria-table__empty"},Ul=M(e.defineComponent({__name:"DatametriaTable",props:{columns:{},data:{}},setup(t){return(i,l)=>(e.openBlock(),e.createElementBlock("div",Pl,[e.createElementVNode("table",Ol,[e.createElementVNode("thead",Kl,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,a=>(e.openBlock(),e.createElementBlock("th",{key:a.key,class:"datametria-table__th",style:e.normalizeStyle({width:a.width})},e.toDisplayString(a.label),5))),128))])]),e.createElementVNode("tbody",jl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data,(a,o)=>(e.openBlock(),e.createElementBlock("tr",{key:o,class:"datametria-table__tr"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,n=>(e.openBlock(),e.createElementBlock("td",{key:n.key,class:"datametria-table__td"},[e.renderSlot(i.$slots,`cell-${n.key}`,{row:a,value:a[n.key]},()=>[e.createTextVNode(e.toDisplayString(a[n.key]),1)],!0)]))),128))]))),128))])]),t.data.length===0?(e.openBlock(),e.createElementBlock("div",ql,[e.renderSlot(i.$slots,"empty",{},()=>[l[0]||(l[0]=e.createTextVNode("Nenhum dado disponível",-1))],!0)])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-ff6271dd"]]),Wl={class:"datametria-sortable-table"},Hl={key:0,class:"datametria-sortable-table__search"},Gl={class:"datametria-sortable-table__wrapper"},Yl={class:"datametria-sortable-table__table",role:"table"},Xl={class:"datametria-sortable-table__thead"},Jl={role:"row"},Ql={key:0,class:"datametria-sortable-table__th datametria-sortable-table__th--checkbox",role:"columnheader"},Zl=["checked","indeterminate"],vl=["aria-sort","onClick","onKeydown","tabindex"],eo={class:"datametria-sortable-table__th-content"},to={key:0,class:"datametria-sortable-table__sort-icon","aria-hidden":"true"},ao={key:0},lo={key:1,class:"datametria-sortable-table__sort-icon--inactive"},oo=["onUpdate:modelValue","aria-label"],no=["value"],ro={key:1,class:"datametria-sortable-table__multiselect"},so=["onClick"],io={key:0,class:"datametria-sortable-table__multiselect-dropdown"},co=["value","checked","onChange"],mo=["onUpdate:modelValue","type","placeholder","aria-label"],po={class:"datametria-sortable-table__tbody"},fo={key:0,class:"datametria-sortable-table__td datametria-sortable-table__td--checkbox",role:"cell"},uo=["checked","aria-label","onChange"],ho={key:0,class:"datametria-sortable-table__empty",role:"status"},ko={key:1,class:"datametria-sortable-table__pagination",role:"navigation","aria-label":"Paginação da tabela"},go={class:"datametria-sortable-table__pagination-info","aria-live":"polite"},bo={key:0},_o={class:"datametria-sortable-table__pagination-controls"},yo=["value"],Bo=["disabled"],$o=["disabled"],Eo={class:"datametria-sortable-table__pagination-pages","aria-current":"page"},Vo=["disabled"],Co=["disabled"],wo=M(e.defineComponent({__name:"DatametriaSortableTable",props:{columns:{},data:{},selectable:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},paginated:{type:Boolean,default:!0},pageSize:{default:10},pageSizeOptions:{default:()=>[5,10,25,50,100]}},emits:["selection-change"],setup(t,{emit:i}){const l=t;process.env.NODE_ENV==="development"&&((!l.columns||l.columns.length===0)&&console.warn("[DatametriaSortableTable] No columns provided"),l.data||console.warn("[DatametriaSortableTable] No data provided"));const a=i,o=c=>{if(!l.data||l.data.length===0)return"text";const E=l.data[0][c.key];return E instanceof Date||typeof E=="string"&&!isNaN(Date.parse(E))&&/^\d{4}-\d{2}-\d{2}|\d{2}\/\d{2}\/\d{4}/.test(E)?"date":"text"},n=c=>{if(c.filterOptions==="auto"){const E=new Set;return l.data.forEach(k=>{const S=k[c.key];S!=null&&S!==""&&E.add(String(S))}),Array.from(E).sort().map(k=>({value:k,label:k}))}return c.filterOptions||[]},s=c=>{_.value=_.value===c?null:c},r=c=>{const E=C.value[c.key]||[];if(E.length===0)return"Todos";if(E.length===1){const S=n(c).find(L=>L.value===E[0]);return(S==null?void 0:S.label)||E[0]}return`${E.length} selecionados`},m=(c,E)=>(C.value[c]||[]).includes(E),p=(c,E)=>{const k=C.value[c]||[];k.indexOf(E)>-1?C.value[c]=k.filter(L=>L!==E):C.value[c]=[...k,E]},V=e.ref(""),b=e.ref(""),g=e.ref("asc"),C=e.ref({}),_=e.ref(null),B=e.ref(new Set),y=e.ref(1),f=e.ref(l.pageSize),u=e.computed(()=>{let c=[...l.data];if(V.value){const E=V.value.toLowerCase();c=c.filter(k=>Object.values(k).some(S=>String(S).toLowerCase().includes(E)))}return Object.entries(C.value).forEach(([E,k])=>{if(k){if(Array.isArray(k)&&k.length>0)c=c.filter(S=>k.includes(String(S[E])));else if(typeof k=="string"){const S=k.toLowerCase();c=c.filter(L=>String(L[E]).toLowerCase().includes(S))}}}),b.value&&c.sort((E,k)=>{let S=E[b.value],L=k[b.value];if(S==null&&L==null)return 0;if(S==null)return 1;if(L==null)return-1;if(S instanceof Date&&(S=S.getTime()),L instanceof Date&&(L=L.getTime()),typeof S=="string"&&!isNaN(Date.parse(S))&&/^\d{4}-\d{2}-\d{2}|\d{2}\/\d{2}\/\d{4}/.test(S)&&(S=new Date(S).getTime()),typeof L=="string"&&!isNaN(Date.parse(L))&&/^\d{4}-\d{2}-\d{2}|\d{2}\/\d{2}\/\d{4}/.test(L)&&(L=new Date(L).getTime()),typeof S=="number"&&typeof L=="number")return g.value==="asc"?S-L:L-S;const R=String(S).toLowerCase(),Y=String(L).toLowerCase();if(R===Y)return 0;const X=R>Y?1:-1;return g.value==="asc"?X:-X}),c}),h=e.computed(()=>Math.ceil(u.value.length/f.value)),N=e.computed(()=>(y.value-1)*f.value),D=e.computed(()=>Math.min(N.value+f.value,u.value.length)),w=e.computed(()=>l.paginated?u.value.slice(N.value,D.value):u.value),z=e.computed(()=>w.value.length>0&&w.value.every(c=>B.value.has(c.id||l.data.indexOf(c)))),I=e.computed(()=>B.value.size>0&&!z.value),$=c=>{b.value===c?g.value=g.value==="asc"?"desc":"asc":(b.value=c,g.value="asc")},x=c=>{B.value.has(c)?B.value.delete(c):B.value.add(c),a("selection-change",Array.from(B.value))},d=()=>{z.value?w.value.forEach(c=>{B.value.delete(c.id||l.data.indexOf(c))}):w.value.forEach(c=>{B.value.add(c.id||l.data.indexOf(c))}),a("selection-change",Array.from(B.value))};return e.watch([V,C],()=>{y.value=1},{deep:!0}),e.watch(h,c=>{y.value>c&&c>0&&(y.value=c)}),(c,E)=>(e.openBlock(),e.createElementBlock("div",Wl,[t.searchable?(e.openBlock(),e.createElementBlock("div",Hl,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":E[0]||(E[0]=k=>V.value=k),type:"text",placeholder:"Buscar...",class:"datametria-sortable-table__search-input","aria-label":"Buscar na tabela"},null,512),[[e.vModelText,V.value]])])):e.createCommentVNode("",!0),e.createElementVNode("div",Gl,[e.createElementVNode("table",Yl,[e.createElementVNode("thead",Xl,[e.createElementVNode("tr",Jl,[t.selectable?(e.openBlock(),e.createElementBlock("th",Ql,[e.createElementVNode("input",{type:"checkbox",checked:z.value,indeterminate:I.value,"aria-label":"Selecionar todas as linhas",onChange:d},null,40,Zl)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,k=>(e.openBlock(),e.createElementBlock("th",{key:k.key,class:e.normalizeClass(["datametria-sortable-table__th",{"datametria-sortable-table__th--sortable":k.sortable!==!1}]),style:e.normalizeStyle({width:k.width}),role:"columnheader","aria-sort":b.value===k.key?g.value==="asc"?"ascending":"descending":"none",onClick:S=>k.sortable!==!1&&$(k.key),onKeydown:[e.withKeys(S=>k.sortable!==!1&&$(k.key),["enter"]),e.withKeys(e.withModifiers(S=>k.sortable!==!1&&$(k.key),["prevent"]),["space"])],tabindex:k.sortable!==!1?0:void 0},[e.createElementVNode("div",eo,[e.createElementVNode("span",null,e.toDisplayString(k.label),1),k.sortable!==!1?(e.openBlock(),e.createElementBlock("span",to,[b.value===k.key?(e.openBlock(),e.createElementBlock("span",ao,e.toDisplayString(g.value==="asc"?"↑":"↓"),1)):(e.openBlock(),e.createElementBlock("span",lo,"↕"))])):e.createCommentVNode("",!0)]),t.filterable&&k.filterable!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:E[3]||(E[3]=e.withModifiers(()=>{},["stop"]))},[k.filterType==="select"?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:0,"onUpdate:modelValue":S=>C.value[k.key]=S,"aria-label":`Filtrar por ${k.label}`,class:"datametria-sortable-table__filter-input",onKeydown:E[1]||(E[1]=e.withModifiers(()=>{},["stop"]))},[E[9]||(E[9]=e.createElementVNode("option",{value:""},"Todos",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n(k),S=>(e.openBlock(),e.createElementBlock("option",{key:S.value,value:S.value},e.toDisplayString(S.label),9,no))),128))],40,oo)),[[e.vModelSelect,C.value[k.key]]]):k.filterType==="multiselect"?(e.openBlock(),e.createElementBlock("div",ro,[e.createElementVNode("button",{type:"button",class:"datametria-sortable-table__multiselect-trigger",onClick:S=>s(k.key)},e.toDisplayString(r(k)),9,so),_.value===k.key?(e.openBlock(),e.createElementBlock("div",io,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n(k),S=>(e.openBlock(),e.createElementBlock("label",{key:S.value,class:"datametria-sortable-table__multiselect-option"},[e.createElementVNode("input",{type:"checkbox",value:S.value,checked:m(k.key,S.value),onChange:L=>p(k.key,S.value)},null,40,co),e.createTextVNode(" "+e.toDisplayString(S.label),1)]))),128))])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,"onUpdate:modelValue":S=>C.value[k.key]=S,type:k.filterType||o(k),placeholder:`Filtrar ${k.label}...`,"aria-label":`Filtrar por ${k.label}`,class:"datametria-sortable-table__filter-input",onKeydown:E[2]||(E[2]=e.withModifiers(()=>{},["stop"]))},null,40,mo)),[[e.vModelDynamic,C.value[k.key]]])])):e.createCommentVNode("",!0)],46,vl))),128))])]),e.createElementVNode("tbody",po,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(k,S)=>(e.openBlock(),e.createElementBlock("tr",{key:k.id||S,class:e.normalizeClass(["datametria-sortable-table__tr",{"datametria-sortable-table__tr--selected":B.value.has(k.id||S)}]),role:"row"},[t.selectable?(e.openBlock(),e.createElementBlock("td",fo,[e.createElementVNode("input",{type:"checkbox",checked:B.value.has(k.id||S),"aria-label":`Selecionar linha ${S+1}`,onChange:L=>x(k.id||S)},null,40,uo)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,L=>(e.openBlock(),e.createElementBlock("td",{key:L.key,class:"datametria-sortable-table__td",role:"cell"},[e.renderSlot(c.$slots,`cell-${L.key}`,{row:k,value:k[L.key]},()=>[e.createTextVNode(e.toDisplayString(k[L.key]),1)],!0)]))),128))],2))),128))])]),u.value.length===0?(e.openBlock(),e.createElementBlock("div",ho,[e.renderSlot(c.$slots,"empty",{},()=>[E[10]||(E[10]=e.createTextVNode("Nenhum dado encontrado",-1))],!0)])):e.createCommentVNode("",!0)]),t.paginated&&u.value.length>0?(e.openBlock(),e.createElementBlock("div",ko,[e.createElementVNode("div",go,[e.createTextVNode(" Mostrando "+e.toDisplayString(N.value+1)+" - "+e.toDisplayString(D.value)+" de "+e.toDisplayString(u.value.length)+" registros ",1),B.value.size>0?(e.openBlock(),e.createElementBlock("span",bo,"("+e.toDisplayString(B.value.size)+" selecionados)",1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",_o,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":E[4]||(E[4]=k=>f.value=k),class:"datametria-sortable-table__page-size","aria-label":"Itens por página"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pageSizeOptions,k=>(e.openBlock(),e.createElementBlock("option",{key:k,value:k},e.toDisplayString(k)+" por página ",9,yo))),128))],512),[[e.vModelSelect,f.value,void 0,{number:!0}]]),e.createElementVNode("button",{class:"datametria-sortable-table__pagination-btn",disabled:y.value===1,"aria-label":"Primeira página",onClick:E[5]||(E[5]=k=>y.value=1)}," «« ",8,Bo),e.createElementVNode("button",{class:"datametria-sortable-table__pagination-btn",disabled:y.value===1,"aria-label":"Página anterior",onClick:E[6]||(E[6]=k=>y.value--)}," ‹ ",8,$o),e.createElementVNode("span",Eo," Página "+e.toDisplayString(y.value)+" de "+e.toDisplayString(h.value),1),e.createElementVNode("button",{class:"datametria-sortable-table__pagination-btn",disabled:y.value===h.value,"aria-label":"Próxima página",onClick:E[7]||(E[7]=k=>y.value++)}," › ",8,Vo),e.createElementVNode("button",{class:"datametria-sortable-table__pagination-btn",disabled:y.value===h.value,"aria-label":"Última página",onClick:E[8]||(E[8]=k=>y.value=h.value)}," »» ",8,Co)])])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-99258153"]]),No={key:0,class:"datametria-datatable__loading"},So={class:"datametria-datatable__header"},Do={key:0,class:"datametria-datatable__cell datametria-datatable__cell--checkbox"},xo=["checked"],To={key:1,class:"datametria-datatable__cell datametria-datatable__cell--expand"},zo=["onClick"],Mo={key:0,class:"datametria-datatable__sort-icon"},Io={class:"datametria-datatable__body"},Lo=["onClick"],Fo={key:0,class:"datametria-datatable__cell datametria-datatable__cell--checkbox"},Ro=["checked","onChange"],Ao={key:1,class:"datametria-datatable__cell datametria-datatable__cell--expand"},Po=["onClick"],Oo={key:0,class:"datametria-datatable__expand-row"},Ko=["colspan"],jo=M(e.defineComponent({__name:"DatametriaDataTable",props:{data:{default:()=>[]},columns:{default:()=>[]},loading:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},border:{type:Boolean,default:!1},height:{default:"auto"},rowKey:{default:"id"},selectable:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},expandable:{type:Boolean,default:!1}},emits:["selection-change","row-click","sort-change"],setup(t,{expose:i,emit:l}){const a=t,o=l,n=e.ref(""),s=e.ref("asc"),r=e.ref([]),m=e.ref(new Set),p=e.computed(()=>{let h=a.columns.length;return a.selectable&&h++,a.expandable&&h++,h}),V=e.computed(()=>{let h=[...a.data];return n.value&&h.sort((N,D)=>{const w=N[n.value],z=D[n.value];if(w===z)return 0;const I=w>z?1:-1;return s.value==="asc"?I:-I}),h}),b=e.computed(()=>a.data.length>0&&r.value.length===a.data.length),g=h=>{n.value===h?s.value=s.value==="asc"?"desc":"asc":(n.value=h,s.value="asc"),o("sort-change",h,s.value)},C=h=>r.value.some(N=>N[a.rowKey]===h[a.rowKey]),_=h=>{const N=r.value.findIndex(D=>D[a.rowKey]===h[a.rowKey]);N>-1?r.value.splice(N,1):a.multiple?r.value.push(h):r.value=[h],o("selection-change",r.value)},B=()=>{b.value?r.value=[]:r.value=[...a.data],o("selection-change",r.value)},y=h=>{o("row-click",h)},f=h=>m.value.has(h[a.rowKey]),u=h=>{const N=h[a.rowKey];m.value.has(N)?m.value.delete(N):m.value.add(N)};return i({clearSelection:()=>{r.value=[],o("selection-change",[])},toggleRowSelection:h=>_(h),clearSort:()=>{n.value="",s.value="asc"}}),(h,N)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-datatable",{"datametria-datatable--stripe":t.stripe,"datametria-datatable--border":t.border}])},[t.loading?(e.openBlock(),e.createElementBlock("div",No,"Carregando...")):e.createCommentVNode("",!0),e.createElementVNode("table",{class:"datametria-datatable__table",style:e.normalizeStyle({height:t.height})},[e.createElementVNode("thead",So,[e.createElementVNode("tr",null,[t.selectable?(e.openBlock(),e.createElementBlock("th",Do,[t.multiple?(e.openBlock(),e.createElementBlock("input",{key:0,type:"checkbox",checked:b.value,onChange:B},null,40,xo)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.expandable?(e.openBlock(),e.createElementBlock("th",To)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,D=>(e.openBlock(),e.createElementBlock("th",{key:D.prop,class:e.normalizeClass(["datametria-datatable__cell",{"datametria-datatable__cell--sortable":D.sortable}]),style:e.normalizeStyle({width:D.width,minWidth:D.minWidth}),onClick:w=>D.sortable&&g(D.prop)},[e.createTextVNode(e.toDisplayString(D.label)+" ",1),D.sortable&&n.value===D.prop?(e.openBlock(),e.createElementBlock("span",Mo,e.toDisplayString(s.value==="asc"?"↑":"↓"),1)):e.createCommentVNode("",!0)],14,zo))),128))])]),e.createElementVNode("tbody",Io,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(D,w)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:D[t.rowKey]||w},[e.createElementVNode("tr",{class:e.normalizeClass(["datametria-datatable__row",{"datametria-datatable__row--selected":C(D)}]),onClick:z=>y(D)},[t.selectable?(e.openBlock(),e.createElementBlock("td",Fo,[e.createElementVNode("input",{type:"checkbox",checked:C(D),onClick:N[0]||(N[0]=e.withModifiers(()=>{},["stop"])),onChange:z=>_(D)},null,40,Ro)])):e.createCommentVNode("",!0),t.expandable?(e.openBlock(),e.createElementBlock("td",Ao,[e.createElementVNode("button",{onClick:e.withModifiers(z=>u(D),["stop"])},e.toDisplayString(f(D)?"−":"+"),9,Po)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,z=>(e.openBlock(),e.createElementBlock("td",{key:z.prop,class:"datametria-datatable__cell"},[e.renderSlot(h.$slots,`cell-${z.prop}`,{row:D,column:z},()=>[e.createTextVNode(e.toDisplayString(D[z.prop]),1)],!0)]))),128))],10,Lo),t.expandable&&f(D)?(e.openBlock(),e.createElementBlock("tr",Oo,[e.createElementVNode("td",{colspan:p.value},[e.renderSlot(h.$slots,"expand",{row:D},()=>[e.createTextVNode(e.toDisplayString(D),1)],!0)],8,Ko)])):e.createCommentVNode("",!0)],64))),128))])],4)],2))}}),[["__scopeId","data-v-62498f56"]]),qo={key:0,class:"datametria-pagination__total"},Uo=["disabled"],Wo=["value"],Ho=["disabled"],Go={key:3,class:"datametria-pagination__pager"},Yo=["onClick"],Xo=["disabled"],Jo={key:5,class:"datametria-pagination__jumper"},Qo=["max","disabled"],Zo=M(e.defineComponent({__name:"DatametriaPagination",props:{modelValue:{default:1},total:{default:0},pageSize:{default:10},pageSizes:{default:()=>[10,20,30,50,100]},layout:{default:"prev, pager, next"},pagerCount:{default:7},disabled:{type:Boolean,default:!1},small:{type:Boolean,default:!1}},emits:["update:modelValue","size-change","current-change"],setup(t,{emit:i}){const l=t,a=i,o=e.ref(l.modelValue),n=e.ref(l.pageSize),s=e.ref(""),r=e.computed(()=>Math.ceil(l.total/n.value)||1),m=e.computed(()=>l.layout.split(",").map(f=>f.trim())),p=e.computed(()=>{const f=[],u=l.pagerCount,h=Math.floor(u/2);if(r.value<=u)for(let N=1;N<=r.value;N++)f.push(N);else if(o.value<=h+1){for(let N=1;N<=u-2;N++)f.push(N);f.push("..."),f.push(r.value)}else if(o.value>=r.value-h){f.push(1),f.push("...");for(let N=r.value-u+3;N<=r.value;N++)f.push(N)}else{f.push(1),f.push("...");for(let N=o.value-h+2;N<=o.value+h-2;N++)f.push(N);f.push("..."),f.push(r.value)}return f}),V=e.computed(()=>({"is-small":l.small,"is-disabled":l.disabled}));e.watch(()=>l.modelValue,f=>{o.value=f}),e.watch(()=>l.pageSize,f=>{n.value=f});const b=()=>{o.value>1&&y(o.value-1)},g=()=>{o.value<r.value&&y(o.value+1)},C=f=>{f==="..."||l.disabled||y(f)},_=()=>{const f=Math.min(o.value,Math.ceil(l.total/n.value));y(f),a("size-change",n.value)},B=()=>{s.value&&s.value>=1&&s.value<=r.value&&(y(s.value),s.value="")},y=f=>{f!==o.value&&(o.value=f,a("update:modelValue",f),a("current-change",f))};return(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-pagination",V.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,h=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h},[h==="total"?(e.openBlock(),e.createElementBlock("span",qo," Total: "+e.toDisplayString(t.total),1)):e.createCommentVNode("",!0),h==="sizes"?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:1,"onUpdate:modelValue":u[0]||(u[0]=N=>n.value=N),class:"datametria-pagination__sizes",disabled:t.disabled,onChange:_},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pageSizes,N=>(e.openBlock(),e.createElementBlock("option",{key:N,value:N},e.toDisplayString(N)+" / página ",9,Wo))),128))],40,Uo)),[[e.vModelSelect,n.value]]):e.createCommentVNode("",!0),h==="prev"?(e.openBlock(),e.createElementBlock("button",{key:2,class:"datametria-pagination__btn",disabled:o.value===1||t.disabled,onClick:b},[...u[2]||(u[2]=[e.createElementVNode("span",{class:"datametria-pagination__icon"},"‹",-1)])],8,Ho)):e.createCommentVNode("",!0),h==="pager"?(e.openBlock(),e.createElementBlock("ul",Go,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,N=>(e.openBlock(),e.createElementBlock("li",{key:N,class:e.normalizeClass(["datametria-pagination__number",{"is-active":N===o.value,"is-disabled":t.disabled}]),onClick:D=>C(N)},e.toDisplayString(N==="..."?"•••":N),11,Yo))),128))])):e.createCommentVNode("",!0),h==="next"?(e.openBlock(),e.createElementBlock("button",{key:4,class:"datametria-pagination__btn",disabled:o.value===r.value||t.disabled,onClick:g},[...u[3]||(u[3]=[e.createElementVNode("span",{class:"datametria-pagination__icon"},"›",-1)])],8,Xo)):e.createCommentVNode("",!0),h==="jumper"?(e.openBlock(),e.createElementBlock("span",Jo,[u[4]||(u[4]=e.createTextVNode(" Ir para ",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":u[1]||(u[1]=N=>s.value=N),type:"number",min:"1",max:r.value,disabled:t.disabled,onKeyup:e.withKeys(B,["enter"])},null,40,Qo),[[e.vModelText,s.value,void 0,{number:!0}]])])):e.createCommentVNode("",!0)],64))),128))],2))}}),[["__scopeId","data-v-2af36e37"]]),vo=["aria-expanded"],en={class:"datametria-tree-node__icon"},tn={key:1,class:"datametria-tree-node__expand datametria-tree-node__expand--leaf"},an=["checked"],ln={class:"datametria-tree-node__label"},on={key:0,class:"datametria-tree-node__children"},nn=M(e.defineComponent({__name:"DatametriaTreeNode",props:{node:{},nodeKey:{},checkable:{type:Boolean},defaultExpandAll:{type:Boolean},expandedKeys:{},checkedKeys:{}},emits:["toggle","check"],setup(t,{emit:i}){const l=t,a=i,o=e.computed(()=>l.node[l.nodeKey]),n=e.computed(()=>l.node.children&&l.node.children.length>0),s=e.computed(()=>!n.value),r=e.computed(()=>l.expandedKeys.has(o.value)),m=e.computed(()=>l.checkedKeys.has(o.value)),p=C=>C[l.nodeKey],V=()=>{a("toggle",l.node)},b=()=>{s.value||V()},g=C=>{const _=C.target;a("check",l.node,_.checked)};return(C,_)=>{const B=e.resolveComponent("DatametriaTreeNode",!0);return e.openBlock(),e.createElementBlock("div",{class:"datametria-tree-node",role:"treeitem","aria-expanded":r.value},[e.createElementVNode("div",{class:e.normalizeClass(["datametria-tree-node__content",{"is-leaf":s.value}]),onClick:b},[s.value?(e.openBlock(),e.createElementBlock("span",tn)):(e.openBlock(),e.createElementBlock("span",{key:0,class:"datametria-tree-node__expand",onClick:e.withModifiers(V,["stop"])},[e.createElementVNode("span",en,e.toDisplayString(r.value?"▼":"▶"),1)])),t.checkable?(e.openBlock(),e.createElementBlock("input",{key:2,type:"checkbox",class:"datametria-tree-node__checkbox",checked:m.value,onChange:g,onClick:_[0]||(_[0]=e.withModifiers(()=>{},["stop"]))},null,40,an)):e.createCommentVNode("",!0),e.createElementVNode("span",ln,e.toDisplayString(t.node.label||t.node.name||t.node[t.nodeKey]),1)],2),n.value&&r.value?(e.openBlock(),e.createElementBlock("div",on,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.node.children,y=>(e.openBlock(),e.createBlock(B,{key:p(y),node:y,"node-key":t.nodeKey,checkable:t.checkable,"default-expand-all":t.defaultExpandAll,"expanded-keys":t.expandedKeys,"checked-keys":t.checkedKeys,onToggle:_[1]||(_[1]=f=>C.$emit("toggle",f)),onCheck:_[2]||(_[2]=(f,u)=>C.$emit("check",f,u))},null,8,["node","node-key","checkable","default-expand-all","expanded-keys","checked-keys"]))),128))])):e.createCommentVNode("",!0)],8,vo)}}}),[["__scopeId","data-v-014b02d5"]]),rn={class:"datametria-tree",role:"tree"},sn=M(e.defineComponent({__name:"DatametriaTree",props:{data:{},nodeKey:{default:"id"},defaultExpandAll:{type:Boolean,default:!1},checkable:{type:Boolean,default:!1},defaultExpandedKeys:{default:()=>[]},defaultCheckedKeys:{default:()=>[]}},emits:["nodeExpand","nodeCollapse","check"],setup(t,{expose:i,emit:l}){const a=t,o=l,n=y=>{const f=[];return y.forEach(u=>{f.push(u[a.nodeKey]),u.children&&f.push(...n(u.children))}),f},s=a.defaultExpandAll?n(a.data):a.defaultExpandedKeys,r=e.ref(new Set(s)),m=e.ref(new Set(a.defaultCheckedKeys)),p=e.computed(()=>r.value),V=e.computed(()=>m.value),b=y=>y[a.nodeKey],g=y=>{const f=b(y);r.value.has(f)?(r.value.delete(f),o("nodeCollapse",y)):(r.value.add(f),o("nodeExpand",y))},C=(y,f)=>{const u=b(y);f?m.value.add(u):m.value.delete(u),o("check",Array.from(m.value),y)};return i({expandAll:()=>{r.value=new Set(n(a.data))},collapseAll:()=>{r.value.clear()}}),(y,f)=>(e.openBlock(),e.createElementBlock("div",rn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data,u=>(e.openBlock(),e.createBlock(nn,{key:b(u),node:u,"node-key":t.nodeKey,checkable:t.checkable,"default-expand-all":t.defaultExpandAll,"expanded-keys":p.value,"checked-keys":V.value,onToggle:g,onCheck:C},null,8,["node","node-key","checkable","default-expand-all","expanded-keys","checked-keys"]))),128))]))}}),[["__scopeId","data-v-10366c4e"]]),cn={class:"datametria-empty",role:"status","aria-live":"polite"},dn={class:"datametria-empty__image"},mn={key:0,class:"datametria-empty__svg",viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg"},pn={key:1,class:"datametria-empty__svg",viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg"},fn={key:2,class:"datametria-empty__svg",viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg"},un=["src","alt"],hn={class:"datametria-empty__description"},kn={key:0,class:"datametria-empty__text"},gn={key:0,class:"datametria-empty__actions"},bn=M(e.defineComponent({__name:"DatametriaEmpty",props:{description:{default:""},image:{default:""},imageAlt:{default:"Empty state"},imageType:{default:"no-data"}},setup(t){const i=t,l=e.computed(()=>i.image?null:i.imageType);return(a,o)=>(e.openBlock(),e.createElementBlock("div",cn,[e.createElementVNode("div",dn,[e.renderSlot(a.$slots,"image",{},()=>[l.value==="no-data"?(e.openBlock(),e.createElementBlock("svg",mn,[...o[0]||(o[0]=[e.createStaticVNode('<circle cx="100" cy="100" r="80" fill="#f0f0f0" data-v-238dc89a></circle><path d="M70 90 Q100 70 130 90" stroke="#999" stroke-width="3" fill="none" data-v-238dc89a></path><circle cx="80" cy="85" r="8" fill="#999" data-v-238dc89a></circle><circle cx="120" cy="85" r="8" fill="#999" data-v-238dc89a></circle><path d="M70 130 Q100 150 130 130" stroke="#999" stroke-width="3" fill="none" data-v-238dc89a></path>',5)])])):l.value==="no-results"?(e.openBlock(),e.createElementBlock("svg",pn,[...o[1]||(o[1]=[e.createElementVNode("circle",{cx:"80",cy:"80",r:"50",fill:"none",stroke:"#999","stroke-width":"4"},null,-1),e.createElementVNode("line",{x1:"120",y1:"120",x2:"160",y2:"160",stroke:"#999","stroke-width":"4","stroke-linecap":"round"},null,-1),e.createElementVNode("line",{x1:"60",y1:"60",x2:"100",y2:"100",stroke:"#e74c3c","stroke-width":"3"},null,-1),e.createElementVNode("line",{x1:"100",y1:"60",x2:"60",y2:"100",stroke:"#e74c3c","stroke-width":"3"},null,-1)])])):l.value==="error"?(e.openBlock(),e.createElementBlock("svg",fn,[...o[2]||(o[2]=[e.createElementVNode("circle",{cx:"100",cy:"100",r:"80",fill:"#fee",stroke:"#e74c3c","stroke-width":"3"},null,-1),e.createElementVNode("line",{x1:"70",y1:"70",x2:"130",y2:"130",stroke:"#e74c3c","stroke-width":"4","stroke-linecap":"round"},null,-1),e.createElementVNode("line",{x1:"130",y1:"70",x2:"70",y2:"130",stroke:"#e74c3c","stroke-width":"4","stroke-linecap":"round"},null,-1)])])):t.image?(e.openBlock(),e.createElementBlock("img",{key:3,src:t.image,alt:t.imageAlt,class:"datametria-empty__custom-image"},null,8,un)):e.createCommentVNode("",!0)],!0)]),e.createElementVNode("div",hn,[e.renderSlot(a.$slots,"description",{},()=>[t.description?(e.openBlock(),e.createElementBlock("p",kn,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)],!0)]),a.$slots.default?(e.openBlock(),e.createElementBlock("div",gn,[e.renderSlot(a.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-238dc89a"]]),_n=["src","alt"],yn={key:2,class:"dm-avatar__icon"},Bn={key:3,class:"dm-avatar__loading"},$n=M(e.defineComponent({__name:"DatametriaAvatar",props:{src:{},name:{},alt:{},size:{default:"md"},variant:{default:"circular"},backgroundColor:{},textColor:{},clickable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},badge:{type:Boolean,default:!1},status:{}},emits:["click"],setup(t,{emit:i}){const l=t,a=i,o=e.ref(!1),n=e.computed(()=>{if(!l.name)return"";const b=l.name.split(" ");return b.length===1?b[0].charAt(0).toUpperCase():b[0].charAt(0).toUpperCase()+b[b.length-1].charAt(0).toUpperCase()}),s=e.computed(()=>[`dm-avatar--${l.size}`,`dm-avatar--${l.variant}`,{"dm-avatar--clickable":l.clickable,"dm-avatar--loading":l.loading}]),r=e.computed(()=>({backgroundColor:l.backgroundColor||"var(--dm-primary, #0072ce)"})),m=b=>{l.clickable&&a("click",b)},p=()=>{o.value=!0},V=()=>{o.value=!1};return(b,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dm-avatar",s.value]),style:e.normalizeStyle(r.value),onClick:m},[t.src&&!o.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.src,alt:t.alt||`${t.name} avatar`,class:"dm-avatar__image",onError:p,onLoad:V},null,40,_n)):t.name&&!t.loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dm-avatar__initials",style:e.normalizeStyle({color:t.textColor})},e.toDisplayString(n.value),5)):t.loading?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",yn,[...g[0]||(g[0]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})],-1)])])),t.loading?(e.openBlock(),e.createElementBlock("div",Bn,[...g[1]||(g[1]=[e.createElementVNode("div",{class:"dm-avatar__spinner"},null,-1)])])):e.createCommentVNode("",!0),t.badge&&t.status?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(["dm-avatar__badge",`dm-avatar__badge--${t.status}`])},null,2)):e.createCommentVNode("",!0)],6))}}),[["__scopeId","data-v-a4e5308d"]]),En=["aria-label"],Vn=M(e.defineComponent({__name:"DatametriaBadge",props:{label:{},variant:{default:"primary"},size:{default:"md"},ariaLabel:{}},setup(t){const i=t;if(process.env.NODE_ENV==="development"){const l=["primary","secondary","success","warning","error","info"];l.includes(i.variant)||console.warn(`[DatametriaBadge] Invalid variant "${i.variant}". Valid options: ${l.join(", ")}`)}return(l,a)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["dm-badge",[`dm-badge--${t.variant}`,`dm-badge--${t.size}`]]),"aria-label":t.ariaLabel},[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)],10,En))}}),[["__scopeId","data-v-8134e252"]]),Cn=["role","tabindex","onKeydown"],wn={key:0,class:"dm-chip__icon"},Nn={class:"dm-chip__label"},Sn=M(e.defineComponent({__name:"DatametriaChip",props:{label:{},variant:{default:"primary"},closable:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1}},emits:["click","close"],setup(t,{emit:i}){const l=t;if(process.env.NODE_ENV==="development"){const s=["primary","secondary","success","warning","error"];s.includes(l.variant)||console.warn(`[DatametriaChip] Invalid variant "${l.variant}". Valid options: ${s.join(", ")}`)}const a=i,o=()=>{a("click")},n=()=>{a("close")};return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dm-chip",[`dm-chip--${t.variant}`,{"dm-chip--clickable":t.clickable}]]),role:t.clickable?"button":void 0,tabindex:t.clickable?0:void 0,onClick:o,onKeydown:[e.withKeys(o,["enter"]),e.withKeys(e.withModifiers(o,["prevent"]),["space"])]},[s.$slots.icon?(e.openBlock(),e.createElementBlock("span",wn,[e.renderSlot(s.$slots,"icon",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("span",Nn,[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)]),t.closable?(e.openBlock(),e.createElementBlock("button",{key:1,class:"dm-chip__close",onClick:e.withModifiers(n,["stop"]),"aria-label":"Remover",type:"button"},"×")):e.createCommentVNode("",!0)],42,Cn))}}),[["__scopeId","data-v-aedb571c"]]),Dn=["aria-label"],xn={class:"dm-navbar__container"},Tn={class:"dm-navbar__brand"},zn={href:"/",class:"dm-navbar__logo"},Mn=["aria-expanded"],In={key:1,class:"dm-navbar__actions"},Ln=M(e.defineComponent({__name:"DatametriaNavbar",props:{brand:{default:""},variant:{default:"light"},sticky:{type:Boolean,default:!1},transparent:{type:Boolean,default:!1},bordered:{type:Boolean,default:!1},ariaLabel:{default:"Main navigation"}},setup(t){const i=t;if(process.env.NODE_ENV==="development"){const n=["light","dark","transparent","primary"];n.includes(i.variant)||console.warn(`[DatametriaNavbar] Invalid variant "${i.variant}". Valid options: ${n.join(", ")}`)}const l=e.computed(()=>["dm-navbar",`dm-navbar--${i.variant}`,{"dm-navbar--sticky":i.sticky},{"dm-navbar--transparent":i.transparent},{"dm-navbar--bordered":i.bordered}]),a=e.ref(!1),o=()=>{a.value=!a.value};return(n,s)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(l.value),role:"navigation","aria-label":i.ariaLabel},[e.createElementVNode("div",xn,[e.createElementVNode("div",Tn,[e.renderSlot(n.$slots,"brand",{},()=>[e.createElementVNode("a",zn,e.toDisplayString(t.brand),1)],!0)]),n.$slots.menu?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dm-navbar__toggle","aria-expanded":a.value,"aria-controls":"navbar-menu",onClick:o},[...s[0]||(s[0]=[e.createElementVNode("span",{class:"dm-navbar__toggle-icon"},null,-1)])],8,Mn)):e.createCommentVNode("",!0),e.createElementVNode("div",{id:"navbar-menu",class:e.normalizeClass(["dm-navbar__menu",{"dm-navbar__menu--open":a.value}])},[e.renderSlot(n.$slots,"menu",{},void 0,!0)],2),n.$slots.actions?(e.openBlock(),e.createElementBlock("div",In,[e.renderSlot(n.$slots,"actions",{},void 0,!0)])):e.createCommentVNode("",!0)])],10,Dn))}}),[["__scopeId","data-v-435b69f6"]]),Fn=["aria-label","aria-expanded"],Rn={key:0,class:"dm-sidebar__header"},An=["aria-label"],Pn={class:"dm-sidebar__content"},On={key:1,class:"dm-sidebar__footer"},Kn=M(e.defineComponent({__name:"DatametriaSidebar",props:{position:{default:"left"},variant:{default:"light"},width:{default:"280px"},collapsible:{type:Boolean,default:!1},defaultOpen:{type:Boolean,default:!0},ariaLabel:{default:"Sidebar navigation"}},emits:["toggle","open","close"],setup(t,{expose:i,emit:l}){e.useCssVars(m=>({fa618d10:m.width}));const a=t,o=l,n=e.ref(a.defaultOpen),s=e.computed(()=>["dm-sidebar",`dm-sidebar--${a.position}`,`dm-sidebar--${a.variant}`,{"dm-sidebar--collapsed":!n.value&&a.collapsible}]),r=()=>{n.value=!n.value,o("toggle",n.value),n.value?o("open"):o("close")};return e.watch(()=>a.defaultOpen,m=>{n.value=m}),i({isOpen:n,toggle:r}),(m,p)=>(e.openBlock(),e.createElementBlock("aside",{class:e.normalizeClass(s.value),role:"complementary","aria-label":t.ariaLabel,"aria-expanded":n.value},[m.$slots.header?(e.openBlock(),e.createElementBlock("div",Rn,[e.renderSlot(m.$slots,"header",{},void 0,!0),t.collapsible?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dm-sidebar__toggle",onClick:r,"aria-label":n.value?"Fechar sidebar":"Abrir sidebar"},[e.createElementVNode("span",{class:e.normalizeClass(["dm-sidebar__toggle-icon",{"dm-sidebar__toggle-icon--open":n.value}])},null,2)],8,An)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("nav",Pn,[e.renderSlot(m.$slots,"default",{},void 0,!0)]),m.$slots.footer?(e.openBlock(),e.createElementBlock("div",On,[e.renderSlot(m.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],10,Fn))}}),[["__scopeId","data-v-09ed7b38"]]),jn=["aria-label"],qn={class:"dm-floating-bar__content"},Un=M(e.defineComponent({__name:"DatametriaFloatingBar",props:{position:{default:"bottom"},variant:{default:"light"},offset:{default:"16px"},shadow:{type:Boolean,default:!0},rounded:{type:Boolean,default:!0},ariaLabel:{default:"Floating toolbar"}},setup(t){const i=t,l=e.computed(()=>["dm-floating-bar",`dm-floating-bar--${i.position}`,`dm-floating-bar--${i.variant}`,{"dm-floating-bar--shadow":i.shadow},{"dm-floating-bar--rounded":i.rounded}]),a=e.computed(()=>{const o={};switch(i.position){case"top":o.top=i.offset;break;case"bottom":o.bottom=i.offset;break;case"left":o.left=i.offset;break;case"right":o.right=i.offset;break}return o});return(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.value),role:"toolbar","aria-label":t.ariaLabel,style:e.normalizeStyle(a.value)},[e.createElementVNode("div",qn,[e.renderSlot(o.$slots,"default",{},void 0,!0)])],14,jn))}}),[["__scopeId","data-v-87cece8c"]]),Wn=["aria-expanded","aria-controls"],Hn=["disabled"],Gn=["id","aria-labelledby"],Yn={class:"dm-menu__content"},Xn=["tabindex","aria-disabled","onClick","onMouseenter"],Jn={key:0,class:"dm-menu__divider"},Qn={key:0,class:"dm-menu__item-icon"},Zn={class:"dm-menu__item-content"},vn={class:"dm-menu__item-label"},er={key:0,class:"dm-menu__item-description"},tr={key:1,class:"dm-menu__item-shortcut"},ar=M(e.defineComponent({__name:"DatametriaMenu",props:{items:{default:()=>[]},triggerText:{default:"Menu"},placement:{default:"bottom-start"},disabled:{type:Boolean},fullWidth:{type:Boolean},showBackdrop:{type:Boolean,default:!1},closeOnItemClick:{type:Boolean,default:!0},offset:{default:4}},emits:["open","close","item-click"],setup(t,{expose:i,emit:l}){const a=t,o=l,n=e.ref(),s=e.ref(),r=e.ref(!1),m=e.ref(-1),p=e.computed(()=>`dm-menu-${Math.random().toString(36).substr(2,9)}`),V=e.computed(()=>`dm-menu-trigger-${Math.random().toString(36).substr(2,9)}`),b=e.ref({}),g=async()=>{if(!n.value||!s.value)return;await e.nextTick();const d=n.value.getBoundingClientRect(),c=s.value.getBoundingClientRect(),E={width:window.innerWidth,height:window.innerHeight};let k=0,S=0;switch(a.placement){case"bottom-start":k=d.bottom+a.offset,S=d.left;break;case"bottom-end":k=d.bottom+a.offset,S=d.right-c.width;break;case"top-start":k=d.top-c.height-a.offset,S=d.left;break;case"top-end":k=d.top-c.height-a.offset,S=d.right-c.width;break;case"left":k=d.top,S=d.left-c.width-a.offset;break;case"right":k=d.top,S=d.right+a.offset;break}S<8?S=8:S+c.width>E.width-8&&(S=E.width-c.width-8),k<8?k=8:k+c.height>E.height-8&&(k=E.height-c.height-8);const L=a.fullWidth?`${d.width}px`:"auto";b.value={position:"fixed",top:`${k}px`,left:`${S}px`,width:L,zIndex:"9999"}},C=async()=>{a.disabled||r.value||(r.value=!0,m.value=-1,o("open"),await g(),e.nextTick(()=>{const d=a.items.findIndex(c=>!c.disabled&&!c.divider);d!==-1&&(m.value=d)}))},_=()=>{r.value&&(r.value=!1,m.value=-1,o("close"),e.nextTick(()=>{var d;(d=n.value)==null||d.focus()}))},B=()=>{r.value?_():C()},y=()=>{B()},f=d=>{switch(d.key){case"Enter":case" ":case"ArrowDown":d.preventDefault(),C();break;case"ArrowUp":d.preventDefault(),C(),e.nextTick(()=>{var E;const c=((E=a.items.map((k,S)=>({item:k,index:S})).filter(({item:k})=>!k.disabled&&!k.divider).pop())==null?void 0:E.index)??-1;c!==-1&&(m.value=c)});break;case"Escape":_();break}},u=d=>{switch(d.key){case"ArrowDown":d.preventDefault(),h();break;case"ArrowUp":d.preventDefault(),N();break;case"Enter":case" ":if(d.preventDefault(),m.value!==-1){const c=a.items[m.value];D(c,m.value)}break;case"Escape":d.preventDefault(),_();break;case"Tab":_();break}},h=()=>{const d=a.items.map((k,S)=>({item:k,index:S})).filter(({item:k})=>!k.disabled&&!k.divider).map(({index:k})=>k);if(d.length===0)return;const c=d.indexOf(m.value),E=c===-1?0:(c+1)%d.length;m.value=d[E]},N=()=>{const d=a.items.map((k,S)=>({item:k,index:S})).filter(({item:k})=>!k.disabled&&!k.divider).map(({index:k})=>k);if(d.length===0)return;const c=d.indexOf(m.value),E=c===-1?d.length-1:(c-1+d.length)%d.length;m.value=d[E]},D=(d,c)=>{d.disabled||d.divider||(o("item-click",d,c),d.action&&d.action(),a.closeOnItemClick&&_())},w=d=>{d.stopPropagation()},z=()=>{g()},I=()=>{b.value={}},$=d=>{var E,k;if(!r.value)return;const c=d.target;(E=n.value)!=null&&E.contains(c)||(k=s.value)!=null&&k.contains(c)||_()},x=()=>{r.value&&g()};return e.onMounted(()=>{document.addEventListener("click",$),window.addEventListener("resize",x)}),e.onUnmounted(()=>{document.removeEventListener("click",$),window.removeEventListener("resize",x)}),e.watch(()=>a.items,()=>{m.value>=a.items.length&&(m.value=-1)}),i({open:C,close:_,toggle:B,isOpen:e.computed(()=>r.value)}),(d,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dm-menu",{"dm-menu--disabled":t.disabled}])},[e.createElementVNode("div",{ref_key:"triggerRef",ref:n,class:"dm-menu__trigger","aria-expanded":r.value,"aria-haspopup":!0,"aria-controls":p.value,onClick:y,onKeydown:f},[e.renderSlot(d.$slots,"trigger",{isOpen:r.value,toggle:B},()=>[e.createElementVNode("button",{type:"button",class:"dm-menu__button",disabled:t.disabled},[e.createTextVNode(e.toDisplayString(t.triggerText)+" ",1),(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["dm-menu__chevron",{"dm-menu__chevron--open":r.value}]),viewBox:"0 0 20 20",fill:"currentColor"},[...c[0]||(c[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)])],2))],8,Hn)],!0)],40,Wn),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"menu",onEnter:z,onLeave:I},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"menuRef",ref:s,id:p.value,class:e.normalizeClass(["dm-menu__dropdown",[`dm-menu__dropdown--${t.placement}`,{"dm-menu__dropdown--full-width":t.fullWidth}]]),style:e.normalizeStyle(b.value),role:"menu","aria-labelledby":V.value,onKeydown:u,onClick:w},[e.createElementVNode("div",Yn,[e.renderSlot(d.$slots,"default",{close:_,focusedIndex:m.value},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(E,k)=>(e.openBlock(),e.createElementBlock("div",{key:E.key||k,class:e.normalizeClass(["dm-menu__item",{"dm-menu__item--focused":m.value===k,"dm-menu__item--disabled":E.disabled,"dm-menu__item--divider":E.divider}]),role:"menuitem",tabindex:E.disabled?-1:0,"aria-disabled":E.disabled,onClick:S=>D(E,k),onMouseenter:S=>m.value=k},[E.divider?(e.openBlock(),e.createElementBlock("div",Jn)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[E.icon?(e.openBlock(),e.createElementBlock("div",Qn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.icon)))])):e.createCommentVNode("",!0),e.createElementVNode("div",Zn,[e.createElementVNode("div",vn,e.toDisplayString(E.label),1),E.description?(e.openBlock(),e.createElementBlock("div",er,e.toDisplayString(E.description),1)):e.createCommentVNode("",!0)]),E.shortcut?(e.openBlock(),e.createElementBlock("div",tr,e.toDisplayString(E.shortcut),1)):e.createCommentVNode("",!0)],64))],42,Xn))),128))],!0)])],46,Gn)):e.createCommentVNode("",!0)]),_:3})])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"backdrop"},{default:e.withCtx(()=>[r.value&&t.showBackdrop?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dm-menu__backdrop",onClick:_})):e.createCommentVNode("",!0)]),_:1})]))],2))}}),[["__scopeId","data-v-80da45b4"]]),lr={class:"datametria-breadcrumb","aria-label":"Breadcrumb"},or={class:"datametria-breadcrumb__list"},nr={key:0,class:"datametria-breadcrumb__separator","aria-hidden":"true"},rr=M(e.defineComponent({__name:"DatametriaBreadcrumb",props:{items:{},separator:{default:"/"}},setup(t){return(i,l)=>(e.openBlock(),e.createElementBlock("nav",lr,[e.createElementVNode("ol",or,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(a,o)=>(e.openBlock(),e.createElementBlock("li",{key:o,class:e.normalizeClass(["datametria-breadcrumb__item",{"is-last":o===t.items.length-1}])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.to?"router-link":"span"),{to:a.to,class:e.normalizeClass(["datametria-breadcrumb__link",{"is-active":o===t.items.length-1}]),"aria-current":o===t.items.length-1?"page":void 0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.label),1)]),_:2},1032,["to","class","aria-current"])),o<t.items.length-1?(e.openBlock(),e.createElementBlock("span",nr,[e.renderSlot(i.$slots,"separator",{},()=>[e.createTextVNode(e.toDisplayString(t.separator),1)],!0)])):e.createCommentVNode("",!0)],2))),128))])]))}}),[["__scopeId","data-v-a3a6d3ae"]]),sr={class:"datametria-steps__head"},ir={key:0,class:"datametria-steps__line"},cr={class:"datametria-steps__icon"},dr={key:0,class:"icon-check"},mr={key:1,class:"icon-error"},pr={key:2,class:"icon-number"},fr={class:"datametria-steps__main"},ur={class:"datametria-steps__title"},hr={key:0,class:"datametria-steps__description"},kr=M(e.defineComponent({__name:"DatametriaSteps",props:{active:{default:0},items:{},direction:{default:"horizontal"},simple:{type:Boolean,default:!1},status:{}},emits:["change"],setup(t,{emit:i}){const l=t,a=o=>{var n;return(n=l.items[o])!=null&&n.status?l.items[o].status:l.status?l.status:o<l.active?"finish":o===l.active?"process":"wait"};return(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-steps",[`datametria-steps--${t.direction}`,{"datametria-steps--simple":t.simple}]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(s,r)=>(e.openBlock(),e.createElementBlock("div",{key:r,class:e.normalizeClass(["datametria-steps__item",[`is-${a(r)}`,{"is-last":r===t.items.length-1}]])},[e.createElementVNode("div",sr,[r>0?(e.openBlock(),e.createElementBlock("div",ir,[...n[0]||(n[0]=[e.createElementVNode("div",{class:"datametria-steps__line-inner"},null,-1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",cr,[a(r)==="finish"?(e.openBlock(),e.createElementBlock("span",dr,"✓")):a(r)==="error"?(e.openBlock(),e.createElementBlock("span",mr,"✕")):(e.openBlock(),e.createElementBlock("span",pr,e.toDisplayString(r+1),1))])]),e.createElementVNode("div",fr,[e.createElementVNode("div",ur,e.toDisplayString(s.title),1),s.description?(e.openBlock(),e.createElementBlock("div",hr,e.toDisplayString(s.description),1)):e.createCommentVNode("",!0)])],2))),128))],2))}}),[["__scopeId","data-v-a51104bd"]]),gr=["aria-label","aria-orientation"],br=["id","aria-selected","aria-controls","aria-disabled","tabindex","disabled","onClick","onKeydown"],_r={key:0,class:"dm-tabs__icon"},yr={class:"dm-tabs__label"},Br={key:1,class:"dm-tabs__badge"},$r={class:"dm-tabs__panels"},Er=["id","aria-labelledby","hidden"],Vr=M(e.defineComponent({__name:"DatametriaTabs",props:{tabs:{},modelValue:{default:0},variant:{default:"default"},orientation:{default:"horizontal"},showIndicator:{type:Boolean,default:!0},ariaLabel:{default:"Tabs"}},emits:["update:modelValue","change"],setup(t,{emit:i}){const l=t,a=i,o=e.ref(l.modelValue);e.watch(()=>l.modelValue,p=>{o.value=p});const n=e.computed(()=>["dm-tabs",`dm-tabs--${l.variant}`,`dm-tabs--${l.orientation}`]),s=e.computed(()=>{const p=l.tabs.length;return{transform:l.orientation==="horizontal"?`translateX(${o.value*100}%)`:`translateY(${o.value*100}%)`,width:l.orientation==="horizontal"?`${100/p}%`:"100%",height:l.orientation==="vertical"?`${100/p}%`:"2px"}}),r=p=>{const V=l.tabs[p];typeof V=="object"&&"disabled"in V&&V.disabled||(o.value=p,a("update:modelValue",p),a("change",p))},m=(p,V)=>{var C;let b=V;const g=l.orientation==="horizontal";switch(p.key){case"ArrowLeft":if(!g)return;p.preventDefault(),b=V>0?V-1:l.tabs.length-1;break;case"ArrowRight":if(!g)return;p.preventDefault(),b=V<l.tabs.length-1?V+1:0;break;case"ArrowUp":if(g)return;p.preventDefault(),b=V>0?V-1:l.tabs.length-1;break;case"ArrowDown":if(g)return;p.preventDefault(),b=V<l.tabs.length-1?V+1:0;break;case"Home":p.preventDefault(),b=0;break;case"End":p.preventDefault(),b=l.tabs.length-1;break;default:return}r(b),(C=document.getElementById(`tab-${b}`))==null||C.focus()};return(p,V)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n.value)},[e.createElementVNode("div",{class:"dm-tabs__header",role:"tablist","aria-label":t.ariaLabel,"aria-orientation":t.orientation},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabs,(b,g)=>(e.openBlock(),e.createElementBlock("button",{key:g,id:`tab-${g}`,class:e.normalizeClass(["dm-tabs__tab",{"dm-tabs__tab--active":o.value===g,"dm-tabs__tab--disabled":typeof b=="object"&&"disabled"in b&&b.disabled}]),role:"tab","aria-selected":o.value===g,"aria-controls":`panel-${g}`,"aria-disabled":typeof b=="object"&&"disabled"in b?b.disabled:!1,tabindex:o.value===g?0:-1,disabled:typeof b=="object"&&"disabled"in b?b.disabled:!1,onClick:C=>r(g),onKeydown:C=>m(C,g)},[typeof b=="object"&&"icon"in b&&b.icon?(e.openBlock(),e.createElementBlock("span",_r,e.toDisplayString(b.icon),1)):e.createCommentVNode("",!0),e.createElementVNode("span",yr,e.toDisplayString(typeof b=="string"?b:b.label),1),typeof b=="object"&&"badge"in b&&b.badge?(e.openBlock(),e.createElementBlock("span",Br,e.toDisplayString(b.badge),1)):e.createCommentVNode("",!0)],42,br))),128)),t.showIndicator?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dm-tabs__indicator",style:e.normalizeStyle(s.value)},null,4)):e.createCommentVNode("",!0)],8,gr),e.createElementVNode("div",$r,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabs,(b,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,id:`panel-${g}`,class:e.normalizeClass(["dm-tabs__panel",{"dm-tabs__panel--active":o.value===g}]),role:"tabpanel","aria-labelledby":`tab-${g}`,hidden:o.value!==g},[e.renderSlot(p.$slots,`panel-${g}`,{},void 0,!0)],10,Er))),128))])],2))}}),[["__scopeId","data-v-9ec57367"]]),Cr=["id","aria-labelledby","hidden"],wr=M(e.defineComponent({__name:"DatametriaTabPane",props:{label:{},name:{},disabled:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},icon:{},badge:{}},setup(t){const i=t,l=e.inject("datametriaTabs",null),a=e.ref(!1),o=e.computed(()=>l?l.activePane.value===(i.name||i.label):!1),n=e.computed(()=>`pane-${(i.name||i.label).replace(/\s+/g,"-").toLowerCase()}`),s=e.computed(()=>`tab-${(i.name||i.label).replace(/\s+/g,"-").toLowerCase()}`);return e.watch(o,r=>{r&&(a.value=!0)}),e.onMounted(()=>{l&&l.registerPane({label:i.label,name:i.name||i.label,disabled:i.disabled,icon:i.icon,badge:i.badge})}),e.onBeforeUnmount(()=>{l&&l.unregisterPane(i.name||i.label)}),(r,m)=>(e.openBlock(),e.createElementBlock("div",{id:n.value,class:e.normalizeClass(["datametria-tab-pane",{"is-active":o.value}]),role:"tabpanel","aria-labelledby":s.value,hidden:!o.value},[!t.lazy||o.value||a.value?e.renderSlot(r.$slots,"default",{key:0},void 0,!0):e.createCommentVNode("",!0)],10,Cr))}}),[["__scopeId","data-v-f5e4ae22"]]);function Nr(t={}){const i=e.ref(!1),l=e.ref(null),a=e.ref(null),o=async(p,V={})=>{i.value=!0,l.value=null;try{const b=t.baseURL?`${t.baseURL}${p}`:p,g=await fetch(b,{...V,headers:{"Content-Type":"application/json",...t.headers,...V.headers}});if(!g.ok)throw new Error(`HTTP ${g.status}: ${g.statusText}`);const C=await g.json();return a.value=C,C}catch(b){throw l.value=b.message||"Request failed",b}finally{i.value=!1}};return{loading:i,error:l,data:a,get:(p,V)=>o(p,{...V,method:"GET"}),post:(p,V,b)=>o(p,{...b,method:"POST",body:JSON.stringify(V)}),put:(p,V,b)=>o(p,{...b,method:"PUT",body:JSON.stringify(V)}),delete:(p,V)=>o(p,{...V,method:"DELETE"})}}function Sr(){const t=e.ref(1),i="datametria-accessibility-scale",l=.8,a=2,o=e.computed(()=>Math.max(l,Math.min(a,t.value))),n=e.computed(()=>{const C=o.value;return C<=.9?"scale-small":C>=1.1?"scale-large":"scale-normal"}),s=C=>{const _=Math.max(l,Math.min(a,C));document.documentElement.style.setProperty("--user-scale",_.toString()),t.value=_},r=C=>{try{localStorage.setItem(i,C.toString())}catch(_){console.warn("Failed to save accessibility scale:",_)}},m=()=>{try{const C=localStorage.getItem(i);return C?parseFloat(C):1}catch(C){return console.warn("Failed to load accessibility scale:",C),1}},p=C=>{s(C),r(o.value)},V=()=>{p(t.value+.1)},b=()=>{p(t.value-.1)},g=()=>{p(1)};return e.watch(t,C=>{s(C)}),e.onMounted(()=>{const C=m();s(C)}),{scale:o,scaleClass:n,setScale:p,increaseScale:V,decreaseScale:b,resetScale:g,minScale:l,maxScale:a}}const F={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function Dr(){const t=e.ref(0),i=()=>{t.value=window.innerWidth},l=B=>t.value>=F[B],a=B=>t.value<=F[B],o=(B,y)=>t.value>=F[B]&&t.value<=F[y],n=()=>{const B=t.value;return B>=F["2xl"]?"2xl":B>=F.xl?"xl":B>=F.lg?"lg":B>=F.md?"md":B>=F.sm?"sm":"xs"},s=()=>t.value<F.sm,r=()=>l("sm")&&t.value<F.md,m=()=>l("md")&&t.value<F.lg,p=()=>l("lg")&&t.value<F.xl,V=()=>l("xl")&&t.value<F["2xl"],b=()=>l("2xl"),g=()=>t.value<F.md,C=()=>o("md","lg"),_=()=>l("lg");return e.onMounted(()=>{i(),window.addEventListener("resize",i)}),e.onUnmounted(()=>{window.removeEventListener("resize",i)}),{windowWidth:t,breakpoints:F,isGreaterOrEqual:l,isLessOrEqual:a,isBetween:o,getCurrentBreakpoint:n,isXs:s,isSm:r,isMd:m,isLg:p,isXl:V,is2xl:b,isMobile:g,isTablet:C,isDesktop:_}}function xr(t={}){const{color:i="rgba(255, 255, 255, 0.3)",duration:l=600,disabled:a=!1}=t,o=e.ref(),n=e.ref([]),s=B=>{if(a||!o.value)return;const y=o.value,f=y.getBoundingClientRect();let u,h;if(B instanceof MouseEvent)u=B.clientX,h=B.clientY;else{const I=B.touches[0]||B.changedTouches[0];u=I.clientX,h=I.clientY}const N=u-f.left,D=h-f.top,w=Math.max(f.width,f.height),z=document.createElement("div");z.className="datametria-ripple",z.style.cssText=`
|
|
1
|
+
(function(M,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(M=typeof globalThis<"u"?globalThis:M||self,e(M.DatametriaVueComponents={},M.Vue))})(this,(function(M,e){"use strict";const jt=()=>{};/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/const Ne=function(t){const n=[];let a=0;for(let o=0;o<t.length;o++){let r=t.charCodeAt(o);r<128?n[a++]=r:r<2048?(n[a++]=r>>6|192,n[a++]=r&63|128):(r&64512)===55296&&o+1<t.length&&(t.charCodeAt(o+1)&64512)===56320?(r=65536+((r&1023)<<10)+(t.charCodeAt(++o)&1023),n[a++]=r>>18|240,n[a++]=r>>12&63|128,n[a++]=r>>6&63|128,n[a++]=r&63|128):(n[a++]=r>>12|224,n[a++]=r>>6&63|128,n[a++]=r&63|128)}return n},qt=function(t){const n=[];let a=0,o=0;for(;a<t.length;){const r=t[a++];if(r<128)n[o++]=String.fromCharCode(r);else if(r>191&&r<224){const l=t[a++];n[o++]=String.fromCharCode((r&31)<<6|l&63)}else if(r>239&&r<365){const l=t[a++],s=t[a++],i=t[a++],c=((r&7)<<18|(l&63)<<12|(s&63)<<6|i&63)-65536;n[o++]=String.fromCharCode(55296+(c>>10)),n[o++]=String.fromCharCode(56320+(c&1023))}else{const l=t[a++],s=t[a++];n[o++]=String.fromCharCode((r&15)<<12|(l&63)<<6|s&63)}}return n.join("")},xe={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,n){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const a=n?this.byteToCharMapWebSafe_:this.byteToCharMap_,o=[];for(let r=0;r<t.length;r+=3){const l=t[r],s=r+1<t.length,i=s?t[r+1]:0,c=r+2<t.length,d=c?t[r+2]:0,h=l>>2,u=(l&3)<<4|i>>4;let f=(i&15)<<2|d>>6,B=d&63;c||(B=64,s||(f=64)),o.push(a[h],a[u],a[f],a[B])}return o.join("")},encodeString(t,n){return this.HAS_NATIVE_SUPPORT&&!n?btoa(t):this.encodeByteArray(Ne(t),n)},decodeString(t,n){return this.HAS_NATIVE_SUPPORT&&!n?atob(t):qt(this.decodeStringToByteArray(t,n))},decodeStringToByteArray(t,n){this.init_();const a=n?this.charToByteMapWebSafe_:this.charToByteMap_,o=[];for(let r=0;r<t.length;){const l=a[t.charAt(r++)],i=r<t.length?a[t.charAt(r)]:0;++r;const d=r<t.length?a[t.charAt(r)]:64;++r;const u=r<t.length?a[t.charAt(r)]:64;if(++r,l==null||i==null||d==null||u==null)throw new Ht;const f=l<<2|i>>4;if(o.push(f),d!==64){const B=i<<4&240|d>>2;if(o.push(B),u!==64){const C=d<<6&192|u;o.push(C)}}}return o},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class Ht extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Ut=function(t){const n=Ne(t);return xe.encodeByteArray(n,!0)},Ie=function(t){return Ut(t).replace(/\./g,"")},vt=function(t){try{return xe.decodeString(t,!0)}catch(n){console.error("base64Decode failed: ",n)}return null};/**
|
|
17
|
+
* @license
|
|
18
|
+
* Copyright 2022 Google LLC
|
|
19
|
+
*
|
|
20
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
21
|
+
* you may not use this file except in compliance with the License.
|
|
22
|
+
* You may obtain a copy of the License at
|
|
23
|
+
*
|
|
24
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
+
*
|
|
26
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
27
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
28
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
29
|
+
* See the License for the specific language governing permissions and
|
|
30
|
+
* limitations under the License.
|
|
31
|
+
*/function Kt(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/**
|
|
32
|
+
* @license
|
|
33
|
+
* Copyright 2022 Google LLC
|
|
34
|
+
*
|
|
35
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
36
|
+
* you may not use this file except in compliance with the License.
|
|
37
|
+
* You may obtain a copy of the License at
|
|
38
|
+
*
|
|
39
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
40
|
+
*
|
|
41
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
42
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
43
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
44
|
+
* See the License for the specific language governing permissions and
|
|
45
|
+
* limitations under the License.
|
|
46
|
+
*/const Wt=()=>Kt().__FIREBASE_DEFAULTS__,Gt=()=>{if(typeof process>"u"||typeof process.env>"u")return;const t=process.env.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},Yt=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const n=t&&vt(t[1]);return n&&JSON.parse(n)},Jt=()=>{try{return jt()||Wt()||Gt()||Yt()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},Te=()=>{var t;return(t=Jt())===null||t===void 0?void 0:t.config};/**
|
|
47
|
+
* @license
|
|
48
|
+
* Copyright 2017 Google LLC
|
|
49
|
+
*
|
|
50
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
51
|
+
* you may not use this file except in compliance with the License.
|
|
52
|
+
* You may obtain a copy of the License at
|
|
53
|
+
*
|
|
54
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
55
|
+
*
|
|
56
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
57
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
58
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
59
|
+
* See the License for the specific language governing permissions and
|
|
60
|
+
* limitations under the License.
|
|
61
|
+
*/class Xt{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((n,a)=>{this.resolve=n,this.reject=a})}wrapCallback(n){return(a,o)=>{a?this.reject(a):this.resolve(o),typeof n=="function"&&(this.promise.catch(()=>{}),n.length===1?n(a):n(a,o))}}}function Qt(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function Me(){try{return typeof indexedDB=="object"}catch{return!1}}function Ae(){return new Promise((t,n)=>{try{let a=!0;const o="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(o);r.onsuccess=()=>{r.result.close(),a||self.indexedDB.deleteDatabase(o),t(!0)},r.onupgradeneeded=()=>{a=!1},r.onerror=()=>{var l;n(((l=r.error)===null||l===void 0?void 0:l.message)||"")}}catch(a){n(a)}})}function Zt(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}/**
|
|
62
|
+
* @license
|
|
63
|
+
* Copyright 2017 Google LLC
|
|
64
|
+
*
|
|
65
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
66
|
+
* you may not use this file except in compliance with the License.
|
|
67
|
+
* You may obtain a copy of the License at
|
|
68
|
+
*
|
|
69
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
70
|
+
*
|
|
71
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
72
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
73
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
74
|
+
* See the License for the specific language governing permissions and
|
|
75
|
+
* limitations under the License.
|
|
76
|
+
*/const ea="FirebaseError";class K extends Error{constructor(n,a,o){super(a),this.code=n,this.customData=o,this.name=ea,Object.setPrototypeOf(this,K.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,te.prototype.create)}}class te{constructor(n,a,o){this.service=n,this.serviceName=a,this.errors=o}create(n,...a){const o=a[0]||{},r=`${this.service}/${n}`,l=this.errors[n],s=l?ta(l,o):"Error",i=`${this.serviceName}: ${s} (${r}).`;return new K(r,i,o)}}function ta(t,n){return t.replace(aa,(a,o)=>{const r=n[o];return r!=null?String(r):`<${o}?>`})}const aa=/\{\$([^}]+)}/g;function ae(t,n){if(t===n)return!0;const a=Object.keys(t),o=Object.keys(n);for(const r of a){if(!o.includes(r))return!1;const l=t[r],s=n[r];if(ze(l)&&ze(s)){if(!ae(l,s))return!1}else if(l!==s)return!1}for(const r of o)if(!a.includes(r))return!1;return!0}function ze(t){return t!==null&&typeof t=="object"}/**
|
|
77
|
+
* @license
|
|
78
|
+
* Copyright 2019 Google LLC
|
|
79
|
+
*
|
|
80
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
81
|
+
* you may not use this file except in compliance with the License.
|
|
82
|
+
* You may obtain a copy of the License at
|
|
83
|
+
*
|
|
84
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
85
|
+
*
|
|
86
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
87
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
88
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
89
|
+
* See the License for the specific language governing permissions and
|
|
90
|
+
* limitations under the License.
|
|
91
|
+
*/const na=1e3,oa=2,ra=14400*1e3,la=.5;function Re(t,n=na,a=oa){const o=n*Math.pow(a,t),r=Math.round(la*o*(Math.random()-.5)*2);return Math.min(ra,o+r)}/**
|
|
92
|
+
* @license
|
|
93
|
+
* Copyright 2021 Google LLC
|
|
94
|
+
*
|
|
95
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
96
|
+
* you may not use this file except in compliance with the License.
|
|
97
|
+
* You may obtain a copy of the License at
|
|
98
|
+
*
|
|
99
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
100
|
+
*
|
|
101
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
102
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
103
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
104
|
+
* See the License for the specific language governing permissions and
|
|
105
|
+
* limitations under the License.
|
|
106
|
+
*/function Fe(t){return t&&t._delegate?t._delegate:t}class H{constructor(n,a,o){this.name=n,this.instanceFactory=a,this.type=o,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(n){return this.instantiationMode=n,this}setMultipleInstances(n){return this.multipleInstances=n,this}setServiceProps(n){return this.serviceProps=n,this}setInstanceCreatedCallback(n){return this.onInstanceCreated=n,this}}/**
|
|
107
|
+
* @license
|
|
108
|
+
* Copyright 2019 Google LLC
|
|
109
|
+
*
|
|
110
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111
|
+
* you may not use this file except in compliance with the License.
|
|
112
|
+
* You may obtain a copy of the License at
|
|
113
|
+
*
|
|
114
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
115
|
+
*
|
|
116
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
117
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
118
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
119
|
+
* See the License for the specific language governing permissions and
|
|
120
|
+
* limitations under the License.
|
|
121
|
+
*/const W="[DEFAULT]";/**
|
|
122
|
+
* @license
|
|
123
|
+
* Copyright 2019 Google LLC
|
|
124
|
+
*
|
|
125
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
126
|
+
* you may not use this file except in compliance with the License.
|
|
127
|
+
* You may obtain a copy of the License at
|
|
128
|
+
*
|
|
129
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
130
|
+
*
|
|
131
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
132
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
133
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
134
|
+
* See the License for the specific language governing permissions and
|
|
135
|
+
* limitations under the License.
|
|
136
|
+
*/class sa{constructor(n,a){this.name=n,this.container=a,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(n){const a=this.normalizeInstanceIdentifier(n);if(!this.instancesDeferred.has(a)){const o=new Xt;if(this.instancesDeferred.set(a,o),this.isInitialized(a)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:a});r&&o.resolve(r)}catch{}}return this.instancesDeferred.get(a).promise}getImmediate(n){var a;const o=this.normalizeInstanceIdentifier(n==null?void 0:n.identifier),r=(a=n==null?void 0:n.optional)!==null&&a!==void 0?a:!1;if(this.isInitialized(o)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:o})}catch(l){if(r)return null;throw l}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(n){if(n.name!==this.name)throw Error(`Mismatching Component ${n.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=n,!!this.shouldAutoInitialize()){if(ca(n))try{this.getOrInitializeService({instanceIdentifier:W})}catch{}for(const[a,o]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(a);try{const l=this.getOrInitializeService({instanceIdentifier:r});o.resolve(l)}catch{}}}}clearInstance(n=W){this.instancesDeferred.delete(n),this.instancesOptions.delete(n),this.instances.delete(n)}async delete(){const n=Array.from(this.instances.values());await Promise.all([...n.filter(a=>"INTERNAL"in a).map(a=>a.INTERNAL.delete()),...n.filter(a=>"_delete"in a).map(a=>a._delete())])}isComponentSet(){return this.component!=null}isInitialized(n=W){return this.instances.has(n)}getOptions(n=W){return this.instancesOptions.get(n)||{}}initialize(n={}){const{options:a={}}=n,o=this.normalizeInstanceIdentifier(n.instanceIdentifier);if(this.isInitialized(o))throw Error(`${this.name}(${o}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:o,options:a});for(const[l,s]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(l);o===i&&s.resolve(r)}return r}onInit(n,a){var o;const r=this.normalizeInstanceIdentifier(a),l=(o=this.onInitCallbacks.get(r))!==null&&o!==void 0?o:new Set;l.add(n),this.onInitCallbacks.set(r,l);const s=this.instances.get(r);return s&&n(s,r),()=>{l.delete(n)}}invokeOnInitCallbacks(n,a){const o=this.onInitCallbacks.get(a);if(o)for(const r of o)try{r(n,a)}catch{}}getOrInitializeService({instanceIdentifier:n,options:a={}}){let o=this.instances.get(n);if(!o&&this.component&&(o=this.component.instanceFactory(this.container,{instanceIdentifier:ia(n),options:a}),this.instances.set(n,o),this.instancesOptions.set(n,a),this.invokeOnInitCallbacks(o,n),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,o)}catch{}return o||null}normalizeInstanceIdentifier(n=W){return this.component?this.component.multipleInstances?n:W:n}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function ia(t){return t===W?void 0:t}function ca(t){return t.instantiationMode==="EAGER"}/**
|
|
137
|
+
* @license
|
|
138
|
+
* Copyright 2019 Google LLC
|
|
139
|
+
*
|
|
140
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
141
|
+
* you may not use this file except in compliance with the License.
|
|
142
|
+
* You may obtain a copy of the License at
|
|
143
|
+
*
|
|
144
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
145
|
+
*
|
|
146
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
147
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
148
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
149
|
+
* See the License for the specific language governing permissions and
|
|
150
|
+
* limitations under the License.
|
|
151
|
+
*/class da{constructor(n){this.name=n,this.providers=new Map}addComponent(n){const a=this.getProvider(n.name);if(a.isComponentSet())throw new Error(`Component ${n.name} has already been registered with ${this.name}`);a.setComponent(n)}addOrOverwriteComponent(n){this.getProvider(n.name).isComponentSet()&&this.providers.delete(n.name),this.addComponent(n)}getProvider(n){if(this.providers.has(n))return this.providers.get(n);const a=new sa(n,this);return this.providers.set(n,a),a}getProviders(){return Array.from(this.providers.values())}}/**
|
|
152
|
+
* @license
|
|
153
|
+
* Copyright 2017 Google LLC
|
|
154
|
+
*
|
|
155
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
156
|
+
* you may not use this file except in compliance with the License.
|
|
157
|
+
* You may obtain a copy of the License at
|
|
158
|
+
*
|
|
159
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
160
|
+
*
|
|
161
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
162
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
163
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
164
|
+
* See the License for the specific language governing permissions and
|
|
165
|
+
* limitations under the License.
|
|
166
|
+
*/var R;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(R||(R={}));const ma={debug:R.DEBUG,verbose:R.VERBOSE,info:R.INFO,warn:R.WARN,error:R.ERROR,silent:R.SILENT},pa=R.INFO,ua={[R.DEBUG]:"log",[R.VERBOSE]:"log",[R.INFO]:"info",[R.WARN]:"warn",[R.ERROR]:"error"},fa=(t,n,...a)=>{if(n<t.logLevel)return;const o=new Date().toISOString(),r=ua[n];if(r)console[r](`[${o}] ${t.name}:`,...a);else throw new Error(`Attempted to log a message with an invalid logType (value: ${n})`)};class Le{constructor(n){this.name=n,this._logLevel=pa,this._logHandler=fa,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(n){if(!(n in R))throw new TypeError(`Invalid value "${n}" assigned to \`logLevel\``);this._logLevel=n}setLogLevel(n){this._logLevel=typeof n=="string"?ma[n]:n}get logHandler(){return this._logHandler}set logHandler(n){if(typeof n!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=n}get userLogHandler(){return this._userLogHandler}set userLogHandler(n){this._userLogHandler=n}debug(...n){this._userLogHandler&&this._userLogHandler(this,R.DEBUG,...n),this._logHandler(this,R.DEBUG,...n)}log(...n){this._userLogHandler&&this._userLogHandler(this,R.VERBOSE,...n),this._logHandler(this,R.VERBOSE,...n)}info(...n){this._userLogHandler&&this._userLogHandler(this,R.INFO,...n),this._logHandler(this,R.INFO,...n)}warn(...n){this._userLogHandler&&this._userLogHandler(this,R.WARN,...n),this._logHandler(this,R.WARN,...n)}error(...n){this._userLogHandler&&this._userLogHandler(this,R.ERROR,...n),this._logHandler(this,R.ERROR,...n)}}const ha=(t,n)=>n.some(a=>t instanceof a);let Oe,Pe;function ga(){return Oe||(Oe=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ba(){return Pe||(Pe=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const je=new WeakMap,de=new WeakMap,qe=new WeakMap,me=new WeakMap,pe=new WeakMap;function ka(t){const n=new Promise((a,o)=>{const r=()=>{t.removeEventListener("success",l),t.removeEventListener("error",s)},l=()=>{a(U(t.result)),r()},s=()=>{o(t.error),r()};t.addEventListener("success",l),t.addEventListener("error",s)});return n.then(a=>{a instanceof IDBCursor&&je.set(a,t)}).catch(()=>{}),pe.set(n,t),n}function ya(t){if(de.has(t))return;const n=new Promise((a,o)=>{const r=()=>{t.removeEventListener("complete",l),t.removeEventListener("error",s),t.removeEventListener("abort",s)},l=()=>{a(),r()},s=()=>{o(t.error||new DOMException("AbortError","AbortError")),r()};t.addEventListener("complete",l),t.addEventListener("error",s),t.addEventListener("abort",s)});de.set(t,n)}let ue={get(t,n,a){if(t instanceof IDBTransaction){if(n==="done")return de.get(t);if(n==="objectStoreNames")return t.objectStoreNames||qe.get(t);if(n==="store")return a.objectStoreNames[1]?void 0:a.objectStore(a.objectStoreNames[0])}return U(t[n])},set(t,n,a){return t[n]=a,!0},has(t,n){return t instanceof IDBTransaction&&(n==="done"||n==="store")?!0:n in t}};function _a(t){ue=t(ue)}function Ba(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(n,...a){const o=t.call(fe(this),n,...a);return qe.set(o,n.sort?n.sort():[n]),U(o)}:ba().includes(t)?function(...n){return t.apply(fe(this),n),U(je.get(this))}:function(...n){return U(t.apply(fe(this),n))}}function Ea(t){return typeof t=="function"?Ba(t):(t instanceof IDBTransaction&&ya(t),ha(t,ga())?new Proxy(t,ue):t)}function U(t){if(t instanceof IDBRequest)return ka(t);if(me.has(t))return me.get(t);const n=Ea(t);return n!==t&&(me.set(t,n),pe.set(n,t)),n}const fe=t=>pe.get(t);function He(t,n,{blocked:a,upgrade:o,blocking:r,terminated:l}={}){const s=indexedDB.open(t,n),i=U(s);return o&&s.addEventListener("upgradeneeded",c=>{o(U(s.result),c.oldVersion,c.newVersion,U(s.transaction),c)}),a&&s.addEventListener("blocked",c=>a(c.oldVersion,c.newVersion,c)),i.then(c=>{l&&c.addEventListener("close",()=>l()),r&&c.addEventListener("versionchange",d=>r(d.oldVersion,d.newVersion,d))}).catch(()=>{}),i}const wa=["get","getKey","getAll","getAllKeys","count"],$a=["put","add","delete","clear"],he=new Map;function Ue(t,n){if(!(t instanceof IDBDatabase&&!(n in t)&&typeof n=="string"))return;if(he.get(n))return he.get(n);const a=n.replace(/FromIndex$/,""),o=n!==a,r=$a.includes(a);if(!(a in(o?IDBIndex:IDBObjectStore).prototype)||!(r||wa.includes(a)))return;const l=async function(s,...i){const c=this.transaction(s,r?"readwrite":"readonly");let d=c.store;return o&&(d=d.index(i.shift())),(await Promise.all([d[a](...i),r&&c.done]))[0]};return he.set(n,l),l}_a(t=>({...t,get:(n,a,o)=>Ue(n,a)||t.get(n,a,o),has:(n,a)=>!!Ue(n,a)||t.has(n,a)}));/**
|
|
167
|
+
* @license
|
|
168
|
+
* Copyright 2019 Google LLC
|
|
169
|
+
*
|
|
170
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
171
|
+
* you may not use this file except in compliance with the License.
|
|
172
|
+
* You may obtain a copy of the License at
|
|
173
|
+
*
|
|
174
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
175
|
+
*
|
|
176
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
177
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
178
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
179
|
+
* See the License for the specific language governing permissions and
|
|
180
|
+
* limitations under the License.
|
|
181
|
+
*/class Ca{constructor(n){this.container=n}getPlatformInfoString(){return this.container.getProviders().map(a=>{if(Va(a)){const o=a.getImmediate();return`${o.library}/${o.version}`}else return null}).filter(a=>a).join(" ")}}function Va(t){const n=t.getComponent();return(n==null?void 0:n.type)==="VERSION"}const ge="@firebase/app",ve="0.13.2";/**
|
|
182
|
+
* @license
|
|
183
|
+
* Copyright 2019 Google LLC
|
|
184
|
+
*
|
|
185
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
186
|
+
* you may not use this file except in compliance with the License.
|
|
187
|
+
* You may obtain a copy of the License at
|
|
188
|
+
*
|
|
189
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
190
|
+
*
|
|
191
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
192
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
193
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
194
|
+
* See the License for the specific language governing permissions and
|
|
195
|
+
* limitations under the License.
|
|
196
|
+
*/const q=new Le("@firebase/app"),Sa="@firebase/app-compat",Da="@firebase/analytics-compat",Na="@firebase/analytics",xa="@firebase/app-check-compat",Ia="@firebase/app-check",Ta="@firebase/auth",Ma="@firebase/auth-compat",Aa="@firebase/database",za="@firebase/data-connect",Ra="@firebase/database-compat",Fa="@firebase/functions",La="@firebase/functions-compat",Oa="@firebase/installations",Pa="@firebase/installations-compat",ja="@firebase/messaging",qa="@firebase/messaging-compat",Ha="@firebase/performance",Ua="@firebase/performance-compat",va="@firebase/remote-config",Ka="@firebase/remote-config-compat",Wa="@firebase/storage",Ga="@firebase/storage-compat",Ya="@firebase/firestore",Ja="@firebase/ai",Xa="@firebase/firestore-compat",Qa="firebase";/**
|
|
197
|
+
* @license
|
|
198
|
+
* Copyright 2019 Google LLC
|
|
199
|
+
*
|
|
200
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
201
|
+
* you may not use this file except in compliance with the License.
|
|
202
|
+
* You may obtain a copy of the License at
|
|
203
|
+
*
|
|
204
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
205
|
+
*
|
|
206
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
207
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
208
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
209
|
+
* See the License for the specific language governing permissions and
|
|
210
|
+
* limitations under the License.
|
|
211
|
+
*/const be="[DEFAULT]",Za={[ge]:"fire-core",[Sa]:"fire-core-compat",[Na]:"fire-analytics",[Da]:"fire-analytics-compat",[Ia]:"fire-app-check",[xa]:"fire-app-check-compat",[Ta]:"fire-auth",[Ma]:"fire-auth-compat",[Aa]:"fire-rtdb",[za]:"fire-data-connect",[Ra]:"fire-rtdb-compat",[Fa]:"fire-fn",[La]:"fire-fn-compat",[Oa]:"fire-iid",[Pa]:"fire-iid-compat",[ja]:"fire-fcm",[qa]:"fire-fcm-compat",[Ha]:"fire-perf",[Ua]:"fire-perf-compat",[va]:"fire-rc",[Ka]:"fire-rc-compat",[Wa]:"fire-gcs",[Ga]:"fire-gcs-compat",[Ya]:"fire-fst",[Xa]:"fire-fst-compat",[Ja]:"fire-vertex","fire-js":"fire-js",[Qa]:"fire-js-all"};/**
|
|
212
|
+
* @license
|
|
213
|
+
* Copyright 2019 Google LLC
|
|
214
|
+
*
|
|
215
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
216
|
+
* you may not use this file except in compliance with the License.
|
|
217
|
+
* You may obtain a copy of the License at
|
|
218
|
+
*
|
|
219
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
220
|
+
*
|
|
221
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
222
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
223
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
224
|
+
* See the License for the specific language governing permissions and
|
|
225
|
+
* limitations under the License.
|
|
226
|
+
*/const ne=new Map,en=new Map,ke=new Map;function Ke(t,n){try{t.container.addComponent(n)}catch(a){q.debug(`Component ${n.name} failed to register with FirebaseApp ${t.name}`,a)}}function G(t){const n=t.name;if(ke.has(n))return q.debug(`There were multiple attempts to register component ${n}.`),!1;ke.set(n,t);for(const a of ne.values())Ke(a,t);for(const a of en.values())Ke(a,t);return!0}function oe(t,n){const a=t.container.getProvider("heartbeat").getImmediate({optional:!0});return a&&a.triggerHeartbeat(),t.container.getProvider(n)}/**
|
|
227
|
+
* @license
|
|
228
|
+
* Copyright 2019 Google LLC
|
|
229
|
+
*
|
|
230
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
231
|
+
* you may not use this file except in compliance with the License.
|
|
232
|
+
* You may obtain a copy of the License at
|
|
233
|
+
*
|
|
234
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
235
|
+
*
|
|
236
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
237
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
238
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
239
|
+
* See the License for the specific language governing permissions and
|
|
240
|
+
* limitations under the License.
|
|
241
|
+
*/const tn={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},v=new te("app","Firebase",tn);/**
|
|
242
|
+
* @license
|
|
243
|
+
* Copyright 2019 Google LLC
|
|
244
|
+
*
|
|
245
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
246
|
+
* you may not use this file except in compliance with the License.
|
|
247
|
+
* You may obtain a copy of the License at
|
|
248
|
+
*
|
|
249
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
250
|
+
*
|
|
251
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
252
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
253
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
254
|
+
* See the License for the specific language governing permissions and
|
|
255
|
+
* limitations under the License.
|
|
256
|
+
*/class an{constructor(n,a,o){this._isDeleted=!1,this._options=Object.assign({},n),this._config=Object.assign({},a),this._name=a.name,this._automaticDataCollectionEnabled=a.automaticDataCollectionEnabled,this._container=o,this.container.addComponent(new H("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(n){this.checkDestroyed(),this._automaticDataCollectionEnabled=n}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(n){this._isDeleted=n}checkDestroyed(){if(this.isDeleted)throw v.create("app-deleted",{appName:this._name})}}function nn(t,n={}){let a=t;typeof n!="object"&&(n={name:n});const o=Object.assign({name:be,automaticDataCollectionEnabled:!0},n),r=o.name;if(typeof r!="string"||!r)throw v.create("bad-app-name",{appName:String(r)});if(a||(a=Te()),!a)throw v.create("no-options");const l=ne.get(r);if(l){if(ae(a,l.options)&&ae(o,l.config))return l;throw v.create("duplicate-app",{appName:r})}const s=new da(r);for(const c of ke.values())s.addComponent(c);const i=new an(a,o,s);return ne.set(r,i),i}function on(t=be){const n=ne.get(t);if(!n&&t===be&&Te())return nn();if(!n)throw v.create("no-app",{appName:t});return n}function Y(t,n,a){var o;let r=(o=Za[t])!==null&&o!==void 0?o:t;a&&(r+=`-${a}`);const l=r.match(/\s|\//),s=n.match(/\s|\//);if(l||s){const i=[`Unable to register library "${r}" with version "${n}":`];l&&i.push(`library name "${r}" contains illegal characters (whitespace or "/")`),l&&s&&i.push("and"),s&&i.push(`version name "${n}" contains illegal characters (whitespace or "/")`),q.warn(i.join(" "));return}G(new H(`${r}-version`,()=>({library:r,version:n}),"VERSION"))}/**
|
|
257
|
+
* @license
|
|
258
|
+
* Copyright 2021 Google LLC
|
|
259
|
+
*
|
|
260
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
261
|
+
* you may not use this file except in compliance with the License.
|
|
262
|
+
* You may obtain a copy of the License at
|
|
263
|
+
*
|
|
264
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
265
|
+
*
|
|
266
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
267
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
268
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
269
|
+
* See the License for the specific language governing permissions and
|
|
270
|
+
* limitations under the License.
|
|
271
|
+
*/const rn="firebase-heartbeat-database",ln=1,Z="firebase-heartbeat-store";let ye=null;function We(){return ye||(ye=He(rn,ln,{upgrade:(t,n)=>{switch(n){case 0:try{t.createObjectStore(Z)}catch(a){console.warn(a)}}}}).catch(t=>{throw v.create("idb-open",{originalErrorMessage:t.message})})),ye}async function sn(t){try{const a=(await We()).transaction(Z),o=await a.objectStore(Z).get(Ye(t));return await a.done,o}catch(n){if(n instanceof K)q.warn(n.message);else{const a=v.create("idb-get",{originalErrorMessage:n==null?void 0:n.message});q.warn(a.message)}}}async function Ge(t,n){try{const o=(await We()).transaction(Z,"readwrite");await o.objectStore(Z).put(n,Ye(t)),await o.done}catch(a){if(a instanceof K)q.warn(a.message);else{const o=v.create("idb-set",{originalErrorMessage:a==null?void 0:a.message});q.warn(o.message)}}}function Ye(t){return`${t.name}!${t.options.appId}`}/**
|
|
272
|
+
* @license
|
|
273
|
+
* Copyright 2021 Google LLC
|
|
274
|
+
*
|
|
275
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
276
|
+
* you may not use this file except in compliance with the License.
|
|
277
|
+
* You may obtain a copy of the License at
|
|
278
|
+
*
|
|
279
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
280
|
+
*
|
|
281
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
282
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
283
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
284
|
+
* See the License for the specific language governing permissions and
|
|
285
|
+
* limitations under the License.
|
|
286
|
+
*/const cn=1024,dn=30;class mn{constructor(n){this.container=n,this._heartbeatsCache=null;const a=this.container.getProvider("app").getImmediate();this._storage=new un(a),this._heartbeatsCachePromise=this._storage.read().then(o=>(this._heartbeatsCache=o,o))}async triggerHeartbeat(){var n,a;try{const r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),l=Je();if(((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((a=this._heartbeatsCache)===null||a===void 0?void 0:a.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===l||this._heartbeatsCache.heartbeats.some(s=>s.date===l))return;if(this._heartbeatsCache.heartbeats.push({date:l,agent:r}),this._heartbeatsCache.heartbeats.length>dn){const s=fn(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(s,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(o){q.warn(o)}}async getHeartbeatsHeader(){var n;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const a=Je(),{heartbeatsToSend:o,unsentEntries:r}=pn(this._heartbeatsCache.heartbeats),l=Ie(JSON.stringify({version:2,heartbeats:o}));return this._heartbeatsCache.lastSentHeartbeatDate=a,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),l}catch(a){return q.warn(a),""}}}function Je(){return new Date().toISOString().substring(0,10)}function pn(t,n=cn){const a=[];let o=t.slice();for(const r of t){const l=a.find(s=>s.agent===r.agent);if(l){if(l.dates.push(r.date),Xe(a)>n){l.dates.pop();break}}else if(a.push({agent:r.agent,dates:[r.date]}),Xe(a)>n){a.pop();break}o=o.slice(1)}return{heartbeatsToSend:a,unsentEntries:o}}class un{constructor(n){this.app=n,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return Me()?Ae().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const a=await sn(this.app);return a!=null&&a.heartbeats?a:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(n){var a;if(await this._canUseIndexedDBPromise){const r=await this.read();return Ge(this.app,{lastSentHeartbeatDate:(a=n.lastSentHeartbeatDate)!==null&&a!==void 0?a:r.lastSentHeartbeatDate,heartbeats:n.heartbeats})}else return}async add(n){var a;if(await this._canUseIndexedDBPromise){const r=await this.read();return Ge(this.app,{lastSentHeartbeatDate:(a=n.lastSentHeartbeatDate)!==null&&a!==void 0?a:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...n.heartbeats]})}else return}}function Xe(t){return Ie(JSON.stringify({version:2,heartbeats:t})).length}function fn(t){if(t.length===0)return-1;let n=0,a=t[0].date;for(let o=1;o<t.length;o++)t[o].date<a&&(a=t[o].date,n=o);return n}/**
|
|
287
|
+
* @license
|
|
288
|
+
* Copyright 2019 Google LLC
|
|
289
|
+
*
|
|
290
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
291
|
+
* you may not use this file except in compliance with the License.
|
|
292
|
+
* You may obtain a copy of the License at
|
|
293
|
+
*
|
|
294
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
295
|
+
*
|
|
296
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
297
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
298
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
299
|
+
* See the License for the specific language governing permissions and
|
|
300
|
+
* limitations under the License.
|
|
301
|
+
*/function hn(t){G(new H("platform-logger",n=>new Ca(n),"PRIVATE")),G(new H("heartbeat",n=>new mn(n),"PRIVATE")),Y(ge,ve,t),Y(ge,ve,"esm2017"),Y("fire-js","")}hn("");const Qe="@firebase/installations",_e="0.6.18";/**
|
|
302
|
+
* @license
|
|
303
|
+
* Copyright 2019 Google LLC
|
|
304
|
+
*
|
|
305
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
306
|
+
* you may not use this file except in compliance with the License.
|
|
307
|
+
* You may obtain a copy of the License at
|
|
308
|
+
*
|
|
309
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
310
|
+
*
|
|
311
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
312
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
313
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
314
|
+
* See the License for the specific language governing permissions and
|
|
315
|
+
* limitations under the License.
|
|
316
|
+
*/const Ze=1e4,et=`w:${_e}`,tt="FIS_v2",gn="https://firebaseinstallations.googleapis.com/v1",bn=3600*1e3,kn="installations",yn="Installations";/**
|
|
317
|
+
* @license
|
|
318
|
+
* Copyright 2019 Google LLC
|
|
319
|
+
*
|
|
320
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
321
|
+
* you may not use this file except in compliance with the License.
|
|
322
|
+
* You may obtain a copy of the License at
|
|
323
|
+
*
|
|
324
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
325
|
+
*
|
|
326
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
327
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
328
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
329
|
+
* See the License for the specific language governing permissions and
|
|
330
|
+
* limitations under the License.
|
|
331
|
+
*/const _n={"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."},J=new te(kn,yn,_n);function at(t){return t instanceof K&&t.code.includes("request-failed")}/**
|
|
332
|
+
* @license
|
|
333
|
+
* Copyright 2019 Google LLC
|
|
334
|
+
*
|
|
335
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
336
|
+
* you may not use this file except in compliance with the License.
|
|
337
|
+
* You may obtain a copy of the License at
|
|
338
|
+
*
|
|
339
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
340
|
+
*
|
|
341
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
342
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
343
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
344
|
+
* See the License for the specific language governing permissions and
|
|
345
|
+
* limitations under the License.
|
|
346
|
+
*/function nt({projectId:t}){return`${gn}/projects/${t}/installations`}function ot(t){return{token:t.token,requestStatus:2,expiresIn:En(t.expiresIn),creationTime:Date.now()}}async function rt(t,n){const o=(await n.json()).error;return J.create("request-failed",{requestName:t,serverCode:o.code,serverMessage:o.message,serverStatus:o.status})}function lt({apiKey:t}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function Bn(t,{refreshToken:n}){const a=lt(t);return a.append("Authorization",wn(n)),a}async function st(t){const n=await t();return n.status>=500&&n.status<600?t():n}function En(t){return Number(t.replace("s","000"))}function wn(t){return`${tt} ${t}`}/**
|
|
347
|
+
* @license
|
|
348
|
+
* Copyright 2019 Google LLC
|
|
349
|
+
*
|
|
350
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
351
|
+
* you may not use this file except in compliance with the License.
|
|
352
|
+
* You may obtain a copy of the License at
|
|
353
|
+
*
|
|
354
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
355
|
+
*
|
|
356
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
357
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
358
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
359
|
+
* See the License for the specific language governing permissions and
|
|
360
|
+
* limitations under the License.
|
|
361
|
+
*/async function $n({appConfig:t,heartbeatServiceProvider:n},{fid:a}){const o=nt(t),r=lt(t),l=n.getImmediate({optional:!0});if(l){const d=await l.getHeartbeatsHeader();d&&r.append("x-firebase-client",d)}const s={fid:a,authVersion:tt,appId:t.appId,sdkVersion:et},i={method:"POST",headers:r,body:JSON.stringify(s)},c=await st(()=>fetch(o,i));if(c.ok){const d=await c.json();return{fid:d.fid||a,registrationStatus:2,refreshToken:d.refreshToken,authToken:ot(d.authToken)}}else throw await rt("Create Installation",c)}/**
|
|
362
|
+
* @license
|
|
363
|
+
* Copyright 2019 Google LLC
|
|
364
|
+
*
|
|
365
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
366
|
+
* you may not use this file except in compliance with the License.
|
|
367
|
+
* You may obtain a copy of the License at
|
|
368
|
+
*
|
|
369
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
370
|
+
*
|
|
371
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
372
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
373
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
374
|
+
* See the License for the specific language governing permissions and
|
|
375
|
+
* limitations under the License.
|
|
376
|
+
*/function it(t){return new Promise(n=>{setTimeout(n,t)})}/**
|
|
377
|
+
* @license
|
|
378
|
+
* Copyright 2019 Google LLC
|
|
379
|
+
*
|
|
380
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
381
|
+
* you may not use this file except in compliance with the License.
|
|
382
|
+
* You may obtain a copy of the License at
|
|
383
|
+
*
|
|
384
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
385
|
+
*
|
|
386
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
387
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
388
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
389
|
+
* See the License for the specific language governing permissions and
|
|
390
|
+
* limitations under the License.
|
|
391
|
+
*/function Cn(t){return btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_")}/**
|
|
392
|
+
* @license
|
|
393
|
+
* Copyright 2019 Google LLC
|
|
394
|
+
*
|
|
395
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
396
|
+
* you may not use this file except in compliance with the License.
|
|
397
|
+
* You may obtain a copy of the License at
|
|
398
|
+
*
|
|
399
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
400
|
+
*
|
|
401
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
402
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
403
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
404
|
+
* See the License for the specific language governing permissions and
|
|
405
|
+
* limitations under the License.
|
|
406
|
+
*/const Vn=/^[cdef][\w-]{21}$/,Be="";function Sn(){try{const t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;const a=Dn(t);return Vn.test(a)?a:Be}catch{return Be}}function Dn(t){return Cn(t).substr(0,22)}/**
|
|
407
|
+
* @license
|
|
408
|
+
* Copyright 2019 Google LLC
|
|
409
|
+
*
|
|
410
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
411
|
+
* you may not use this file except in compliance with the License.
|
|
412
|
+
* You may obtain a copy of the License at
|
|
413
|
+
*
|
|
414
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
415
|
+
*
|
|
416
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
417
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
418
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
419
|
+
* See the License for the specific language governing permissions and
|
|
420
|
+
* limitations under the License.
|
|
421
|
+
*/function re(t){return`${t.appName}!${t.appId}`}/**
|
|
422
|
+
* @license
|
|
423
|
+
* Copyright 2019 Google LLC
|
|
424
|
+
*
|
|
425
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
426
|
+
* you may not use this file except in compliance with the License.
|
|
427
|
+
* You may obtain a copy of the License at
|
|
428
|
+
*
|
|
429
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
430
|
+
*
|
|
431
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
432
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
433
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
434
|
+
* See the License for the specific language governing permissions and
|
|
435
|
+
* limitations under the License.
|
|
436
|
+
*/const ct=new Map;function dt(t,n){const a=re(t);mt(a,n),Nn(a,n)}function mt(t,n){const a=ct.get(t);if(a)for(const o of a)o(n)}function Nn(t,n){const a=xn();a&&a.postMessage({key:t,fid:n}),In()}let X=null;function xn(){return!X&&"BroadcastChannel"in self&&(X=new BroadcastChannel("[Firebase] FID Change"),X.onmessage=t=>{mt(t.data.key,t.data.fid)}),X}function In(){ct.size===0&&X&&(X.close(),X=null)}/**
|
|
437
|
+
* @license
|
|
438
|
+
* Copyright 2019 Google LLC
|
|
439
|
+
*
|
|
440
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
441
|
+
* you may not use this file except in compliance with the License.
|
|
442
|
+
* You may obtain a copy of the License at
|
|
443
|
+
*
|
|
444
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
445
|
+
*
|
|
446
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
447
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
448
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
449
|
+
* See the License for the specific language governing permissions and
|
|
450
|
+
* limitations under the License.
|
|
451
|
+
*/const Tn="firebase-installations-database",Mn=1,Q="firebase-installations-store";let Ee=null;function we(){return Ee||(Ee=He(Tn,Mn,{upgrade:(t,n)=>{switch(n){case 0:t.createObjectStore(Q)}}})),Ee}async function le(t,n){const a=re(t),r=(await we()).transaction(Q,"readwrite"),l=r.objectStore(Q),s=await l.get(a);return await l.put(n,a),await r.done,(!s||s.fid!==n.fid)&&dt(t,n.fid),n}async function pt(t){const n=re(t),o=(await we()).transaction(Q,"readwrite");await o.objectStore(Q).delete(n),await o.done}async function se(t,n){const a=re(t),r=(await we()).transaction(Q,"readwrite"),l=r.objectStore(Q),s=await l.get(a),i=n(s);return i===void 0?await l.delete(a):await l.put(i,a),await r.done,i&&(!s||s.fid!==i.fid)&&dt(t,i.fid),i}/**
|
|
452
|
+
* @license
|
|
453
|
+
* Copyright 2019 Google LLC
|
|
454
|
+
*
|
|
455
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
456
|
+
* you may not use this file except in compliance with the License.
|
|
457
|
+
* You may obtain a copy of the License at
|
|
458
|
+
*
|
|
459
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
460
|
+
*
|
|
461
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
462
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
463
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
464
|
+
* See the License for the specific language governing permissions and
|
|
465
|
+
* limitations under the License.
|
|
466
|
+
*/async function $e(t){let n;const a=await se(t.appConfig,o=>{const r=An(o),l=zn(t,r);return n=l.registrationPromise,l.installationEntry});return a.fid===Be?{installationEntry:await n}:{installationEntry:a,registrationPromise:n}}function An(t){const n=t||{fid:Sn(),registrationStatus:0};return ft(n)}function zn(t,n){if(n.registrationStatus===0){if(!navigator.onLine){const r=Promise.reject(J.create("app-offline"));return{installationEntry:n,registrationPromise:r}}const a={fid:n.fid,registrationStatus:1,registrationTime:Date.now()},o=Rn(t,a);return{installationEntry:a,registrationPromise:o}}else return n.registrationStatus===1?{installationEntry:n,registrationPromise:Fn(t)}:{installationEntry:n}}async function Rn(t,n){try{const a=await $n(t,n);return le(t.appConfig,a)}catch(a){throw at(a)&&a.customData.serverCode===409?await pt(t.appConfig):await le(t.appConfig,{fid:n.fid,registrationStatus:0}),a}}async function Fn(t){let n=await ut(t.appConfig);for(;n.registrationStatus===1;)await it(100),n=await ut(t.appConfig);if(n.registrationStatus===0){const{installationEntry:a,registrationPromise:o}=await $e(t);return o||a}return n}function ut(t){return se(t,n=>{if(!n)throw J.create("installation-not-found");return ft(n)})}function ft(t){return Ln(t)?{fid:t.fid,registrationStatus:0}:t}function Ln(t){return t.registrationStatus===1&&t.registrationTime+Ze<Date.now()}/**
|
|
467
|
+
* @license
|
|
468
|
+
* Copyright 2019 Google LLC
|
|
469
|
+
*
|
|
470
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
471
|
+
* you may not use this file except in compliance with the License.
|
|
472
|
+
* You may obtain a copy of the License at
|
|
473
|
+
*
|
|
474
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
475
|
+
*
|
|
476
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
477
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
478
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
479
|
+
* See the License for the specific language governing permissions and
|
|
480
|
+
* limitations under the License.
|
|
481
|
+
*/async function On({appConfig:t,heartbeatServiceProvider:n},a){const o=Pn(t,a),r=Bn(t,a),l=n.getImmediate({optional:!0});if(l){const d=await l.getHeartbeatsHeader();d&&r.append("x-firebase-client",d)}const s={installation:{sdkVersion:et,appId:t.appId}},i={method:"POST",headers:r,body:JSON.stringify(s)},c=await st(()=>fetch(o,i));if(c.ok){const d=await c.json();return ot(d)}else throw await rt("Generate Auth Token",c)}function Pn(t,{fid:n}){return`${nt(t)}/${n}/authTokens:generate`}/**
|
|
482
|
+
* @license
|
|
483
|
+
* Copyright 2019 Google LLC
|
|
484
|
+
*
|
|
485
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
486
|
+
* you may not use this file except in compliance with the License.
|
|
487
|
+
* You may obtain a copy of the License at
|
|
488
|
+
*
|
|
489
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
490
|
+
*
|
|
491
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
492
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
493
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
494
|
+
* See the License for the specific language governing permissions and
|
|
495
|
+
* limitations under the License.
|
|
496
|
+
*/async function Ce(t,n=!1){let a;const o=await se(t.appConfig,l=>{if(!gt(l))throw J.create("not-registered");const s=l.authToken;if(!n&&Hn(s))return l;if(s.requestStatus===1)return a=jn(t,n),l;{if(!navigator.onLine)throw J.create("app-offline");const i=vn(l);return a=qn(t,i),i}});return a?await a:o.authToken}async function jn(t,n){let a=await ht(t.appConfig);for(;a.authToken.requestStatus===1;)await it(100),a=await ht(t.appConfig);const o=a.authToken;return o.requestStatus===0?Ce(t,n):o}function ht(t){return se(t,n=>{if(!gt(n))throw J.create("not-registered");const a=n.authToken;return Kn(a)?Object.assign(Object.assign({},n),{authToken:{requestStatus:0}}):n})}async function qn(t,n){try{const a=await On(t,n),o=Object.assign(Object.assign({},n),{authToken:a});return await le(t.appConfig,o),a}catch(a){if(at(a)&&(a.customData.serverCode===401||a.customData.serverCode===404))await pt(t.appConfig);else{const o=Object.assign(Object.assign({},n),{authToken:{requestStatus:0}});await le(t.appConfig,o)}throw a}}function gt(t){return t!==void 0&&t.registrationStatus===2}function Hn(t){return t.requestStatus===2&&!Un(t)}function Un(t){const n=Date.now();return n<t.creationTime||t.creationTime+t.expiresIn<n+bn}function vn(t){const n={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},t),{authToken:n})}function Kn(t){return t.requestStatus===1&&t.requestTime+Ze<Date.now()}/**
|
|
497
|
+
* @license
|
|
498
|
+
* Copyright 2019 Google LLC
|
|
499
|
+
*
|
|
500
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
501
|
+
* you may not use this file except in compliance with the License.
|
|
502
|
+
* You may obtain a copy of the License at
|
|
503
|
+
*
|
|
504
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
505
|
+
*
|
|
506
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
507
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
508
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
509
|
+
* See the License for the specific language governing permissions and
|
|
510
|
+
* limitations under the License.
|
|
511
|
+
*/async function Wn(t){const n=t,{installationEntry:a,registrationPromise:o}=await $e(n);return o?o.catch(console.error):Ce(n).catch(console.error),a.fid}/**
|
|
512
|
+
* @license
|
|
513
|
+
* Copyright 2019 Google LLC
|
|
514
|
+
*
|
|
515
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
516
|
+
* you may not use this file except in compliance with the License.
|
|
517
|
+
* You may obtain a copy of the License at
|
|
518
|
+
*
|
|
519
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
520
|
+
*
|
|
521
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
522
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
523
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
524
|
+
* See the License for the specific language governing permissions and
|
|
525
|
+
* limitations under the License.
|
|
526
|
+
*/async function Gn(t,n=!1){const a=t;return await Yn(a),(await Ce(a,n)).token}async function Yn(t){const{registrationPromise:n}=await $e(t);n&&await n}/**
|
|
527
|
+
* @license
|
|
528
|
+
* Copyright 2019 Google LLC
|
|
529
|
+
*
|
|
530
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
531
|
+
* you may not use this file except in compliance with the License.
|
|
532
|
+
* You may obtain a copy of the License at
|
|
533
|
+
*
|
|
534
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
535
|
+
*
|
|
536
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
537
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
538
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
539
|
+
* See the License for the specific language governing permissions and
|
|
540
|
+
* limitations under the License.
|
|
541
|
+
*/function Jn(t){if(!t||!t.options)throw Ve("App Configuration");if(!t.name)throw Ve("App Name");const n=["projectId","apiKey","appId"];for(const a of n)if(!t.options[a])throw Ve(a);return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}function Ve(t){return J.create("missing-app-config-values",{valueName:t})}/**
|
|
542
|
+
* @license
|
|
543
|
+
* Copyright 2020 Google LLC
|
|
544
|
+
*
|
|
545
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
546
|
+
* you may not use this file except in compliance with the License.
|
|
547
|
+
* You may obtain a copy of the License at
|
|
548
|
+
*
|
|
549
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
550
|
+
*
|
|
551
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
552
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
553
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
554
|
+
* See the License for the specific language governing permissions and
|
|
555
|
+
* limitations under the License.
|
|
556
|
+
*/const bt="installations",Xn="installations-internal",Qn=t=>{const n=t.getProvider("app").getImmediate(),a=Jn(n),o=oe(n,"heartbeat");return{app:n,appConfig:a,heartbeatServiceProvider:o,_delete:()=>Promise.resolve()}},Zn=t=>{const n=t.getProvider("app").getImmediate(),a=oe(n,bt).getImmediate();return{getId:()=>Wn(a),getToken:r=>Gn(a,r)}};function eo(){G(new H(bt,Qn,"PUBLIC")),G(new H(Xn,Zn,"PRIVATE"))}eo(),Y(Qe,_e),Y(Qe,_e,"esm2017");/**
|
|
557
|
+
* @license
|
|
558
|
+
* Copyright 2019 Google LLC
|
|
559
|
+
*
|
|
560
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
561
|
+
* you may not use this file except in compliance with the License.
|
|
562
|
+
* You may obtain a copy of the License at
|
|
563
|
+
*
|
|
564
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
565
|
+
*
|
|
566
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
567
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
568
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
569
|
+
* See the License for the specific language governing permissions and
|
|
570
|
+
* limitations under the License.
|
|
571
|
+
*/const ie="analytics",to="firebase_id",ao="origin",no=60*1e3,oo="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",Se="https://www.googletagmanager.com/gtag/js";/**
|
|
572
|
+
* @license
|
|
573
|
+
* Copyright 2019 Google LLC
|
|
574
|
+
*
|
|
575
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
576
|
+
* you may not use this file except in compliance with the License.
|
|
577
|
+
* You may obtain a copy of the License at
|
|
578
|
+
*
|
|
579
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
580
|
+
*
|
|
581
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
582
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
583
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
584
|
+
* See the License for the specific language governing permissions and
|
|
585
|
+
* limitations under the License.
|
|
586
|
+
*/const L=new Le("@firebase/analytics");/**
|
|
587
|
+
* @license
|
|
588
|
+
* Copyright 2019 Google LLC
|
|
589
|
+
*
|
|
590
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
591
|
+
* you may not use this file except in compliance with the License.
|
|
592
|
+
* You may obtain a copy of the License at
|
|
593
|
+
*
|
|
594
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
595
|
+
*
|
|
596
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
597
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
598
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
599
|
+
* See the License for the specific language governing permissions and
|
|
600
|
+
* limitations under the License.
|
|
601
|
+
*/const ro={"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."},O=new te("analytics","Analytics",ro);/**
|
|
602
|
+
* @license
|
|
603
|
+
* Copyright 2019 Google LLC
|
|
604
|
+
*
|
|
605
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
606
|
+
* you may not use this file except in compliance with the License.
|
|
607
|
+
* You may obtain a copy of the License at
|
|
608
|
+
*
|
|
609
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
610
|
+
*
|
|
611
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
612
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
613
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
614
|
+
* See the License for the specific language governing permissions and
|
|
615
|
+
* limitations under the License.
|
|
616
|
+
*/function lo(t){if(!t.startsWith(Se)){const n=O.create("invalid-gtag-resource",{gtagURL:t});return L.warn(n.message),""}return t}function kt(t){return Promise.all(t.map(n=>n.catch(a=>a)))}function so(t,n){let a;return window.trustedTypes&&(a=window.trustedTypes.createPolicy(t,n)),a}function io(t,n){const a=so("firebase-js-sdk-policy",{createScriptURL:lo}),o=document.createElement("script"),r=`${Se}?l=${t}&id=${n}`;o.src=a?a==null?void 0:a.createScriptURL(r):r,o.async=!0,document.head.appendChild(o)}function co(t){let n=[];return Array.isArray(window[t])?n=window[t]:window[t]=n,n}async function mo(t,n,a,o,r,l){const s=o[r];try{if(s)await n[s];else{const c=(await kt(a)).find(d=>d.measurementId===r);c&&await n[c.appId]}}catch(i){L.error(i)}t("config",r,l)}async function po(t,n,a,o,r){try{let l=[];if(r&&r.send_to){let s=r.send_to;Array.isArray(s)||(s=[s]);const i=await kt(a);for(const c of s){const d=i.find(u=>u.measurementId===c),h=d&&n[d.appId];if(h)l.push(h);else{l=[];break}}}l.length===0&&(l=Object.values(n)),await Promise.all(l),t("event",o,r||{})}catch(l){L.error(l)}}function uo(t,n,a,o){async function r(l,...s){try{if(l==="event"){const[i,c]=s;await po(t,n,a,i,c)}else if(l==="config"){const[i,c]=s;await mo(t,n,a,o,i,c)}else if(l==="consent"){const[i,c]=s;t("consent",i,c)}else if(l==="get"){const[i,c,d]=s;t("get",i,c,d)}else if(l==="set"){const[i]=s;t("set",i)}else t(l,...s)}catch(i){L.error(i)}}return r}function fo(t,n,a,o,r){let l=function(...s){window[o].push(arguments)};return window[r]&&typeof window[r]=="function"&&(l=window[r]),window[r]=uo(l,t,n,a),{gtagCore:l,wrappedGtag:window[r]}}function ho(t){const n=window.document.getElementsByTagName("script");for(const a of Object.values(n))if(a.src&&a.src.includes(Se)&&a.src.includes(t))return a;return null}/**
|
|
617
|
+
* @license
|
|
618
|
+
* Copyright 2020 Google LLC
|
|
619
|
+
*
|
|
620
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
621
|
+
* you may not use this file except in compliance with the License.
|
|
622
|
+
* You may obtain a copy of the License at
|
|
623
|
+
*
|
|
624
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
625
|
+
*
|
|
626
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
627
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
628
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
629
|
+
* See the License for the specific language governing permissions and
|
|
630
|
+
* limitations under the License.
|
|
631
|
+
*/const go=30,bo=1e3;class ko{constructor(n={},a=bo){this.throttleMetadata=n,this.intervalMillis=a}getThrottleMetadata(n){return this.throttleMetadata[n]}setThrottleMetadata(n,a){this.throttleMetadata[n]=a}deleteThrottleMetadata(n){delete this.throttleMetadata[n]}}const yt=new ko;function yo(t){return new Headers({Accept:"application/json","x-goog-api-key":t})}async function _o(t){var n;const{appId:a,apiKey:o}=t,r={method:"GET",headers:yo(o)},l=oo.replace("{app-id}",a),s=await fetch(l,r);if(s.status!==200&&s.status!==304){let i="";try{const c=await s.json();!((n=c.error)===null||n===void 0)&&n.message&&(i=c.error.message)}catch{}throw O.create("config-fetch-failed",{httpStatus:s.status,responseMessage:i})}return s.json()}async function Bo(t,n=yt,a){const{appId:o,apiKey:r,measurementId:l}=t.options;if(!o)throw O.create("no-app-id");if(!r){if(l)return{measurementId:l,appId:o};throw O.create("no-api-key")}const s=n.getThrottleMetadata(o)||{backoffCount:0,throttleEndTimeMillis:Date.now()},i=new $o;return setTimeout(async()=>{i.abort()},no),_t({appId:o,apiKey:r,measurementId:l},s,i,n)}async function _t(t,{throttleEndTimeMillis:n,backoffCount:a},o,r=yt){var l;const{appId:s,measurementId:i}=t;try{await Eo(o,n)}catch(c){if(i)return L.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${i} provided in the "measurementId" field in the local Firebase config. [${c==null?void 0:c.message}]`),{appId:s,measurementId:i};throw c}try{const c=await _o(t);return r.deleteThrottleMetadata(s),c}catch(c){const d=c;if(!wo(d)){if(r.deleteThrottleMetadata(s),i)return L.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${i} provided in the "measurementId" field in the local Firebase config. [${d==null?void 0:d.message}]`),{appId:s,measurementId:i};throw c}const h=Number((l=d==null?void 0:d.customData)===null||l===void 0?void 0:l.httpStatus)===503?Re(a,r.intervalMillis,go):Re(a,r.intervalMillis),u={throttleEndTimeMillis:Date.now()+h,backoffCount:a+1};return r.setThrottleMetadata(s,u),L.debug(`Calling attemptFetch again in ${h} millis`),_t(t,u,o,r)}}function Eo(t,n){return new Promise((a,o)=>{const r=Math.max(n-Date.now(),0),l=setTimeout(a,r);t.addEventListener(()=>{clearTimeout(l),o(O.create("fetch-throttle",{throttleEndTimeMillis:n}))})})}function wo(t){if(!(t instanceof K)||!t.customData)return!1;const n=Number(t.customData.httpStatus);return n===429||n===500||n===503||n===504}class $o{constructor(){this.listeners=[]}addEventListener(n){this.listeners.push(n)}abort(){this.listeners.forEach(n=>n())}}async function Co(t,n,a,o,r){if(r&&r.global){t("event",a,o);return}else{const l=await n,s=Object.assign(Object.assign({},o),{send_to:l});t("event",a,s)}}/**
|
|
632
|
+
* @license
|
|
633
|
+
* Copyright 2020 Google LLC
|
|
634
|
+
*
|
|
635
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
636
|
+
* you may not use this file except in compliance with the License.
|
|
637
|
+
* You may obtain a copy of the License at
|
|
638
|
+
*
|
|
639
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
640
|
+
*
|
|
641
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
642
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
643
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
644
|
+
* See the License for the specific language governing permissions and
|
|
645
|
+
* limitations under the License.
|
|
646
|
+
*/async function Vo(){if(Me())try{await Ae()}catch(t){return L.warn(O.create("indexeddb-unavailable",{errorInfo:t==null?void 0:t.toString()}).message),!1}else return L.warn(O.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;return!0}async function So(t,n,a,o,r,l,s){var i;const c=Bo(t);c.then(B=>{a[B.measurementId]=B.appId,t.options.measurementId&&B.measurementId!==t.options.measurementId&&L.warn(`The measurement ID in the local Firebase config (${t.options.measurementId}) does not match the measurement ID fetched from the server (${B.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(B=>L.error(B)),n.push(c);const d=Vo().then(B=>{if(B)return o.getId()}),[h,u]=await Promise.all([c,d]);ho(l)||io(l,h.measurementId),r("js",new Date);const f=(i=s==null?void 0:s.config)!==null&&i!==void 0?i:{};return f[ao]="firebase",f.update=!0,u!=null&&(f[to]=u),r("config",h.measurementId,f),h.measurementId}/**
|
|
647
|
+
* @license
|
|
648
|
+
* Copyright 2019 Google LLC
|
|
649
|
+
*
|
|
650
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
651
|
+
* you may not use this file except in compliance with the License.
|
|
652
|
+
* You may obtain a copy of the License at
|
|
653
|
+
*
|
|
654
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
655
|
+
*
|
|
656
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
657
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
658
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
659
|
+
* See the License for the specific language governing permissions and
|
|
660
|
+
* limitations under the License.
|
|
661
|
+
*/class Do{constructor(n){this.app=n}_delete(){return delete ee[this.app.options.appId],Promise.resolve()}}let ee={},Bt=[];const Et={};let De="dataLayer",No="gtag",wt,$t,Ct=!1;function xo(){const t=[];if(Qt()&&t.push("This is a browser extension environment."),Zt()||t.push("Cookies are not available."),t.length>0){const n=t.map((o,r)=>`(${r+1}) ${o}`).join(" "),a=O.create("invalid-analytics-context",{errorInfo:n});L.warn(a.message)}}function Io(t,n,a){xo();const o=t.options.appId;if(!o)throw O.create("no-app-id");if(!t.options.apiKey)if(t.options.measurementId)L.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${t.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw O.create("no-api-key");if(ee[o]!=null)throw O.create("already-exists",{id:o});if(!Ct){co(De);const{wrappedGtag:l,gtagCore:s}=fo(ee,Bt,Et,De,No);$t=l,wt=s,Ct=!0}return ee[o]=So(t,Bt,Et,n,wt,De,a),new Do(t)}function To(t=on()){t=Fe(t);const n=oe(t,ie);return n.isInitialized()?n.getImmediate():Mo(t)}function Mo(t,n={}){const a=oe(t,ie);if(a.isInitialized()){const r=a.getImmediate();if(ae(n,a.getOptions()))return r;throw O.create("already-initialized")}return a.initialize({options:n})}function Vt(t,n,a,o){t=Fe(t),Co($t,ee[t.app.options.appId],n,a,o).catch(r=>L.error(r))}const St="@firebase/analytics",Dt="0.10.17";function Ao(){G(new H(ie,(n,{options:a})=>{const o=n.getProvider("app").getImmediate(),r=n.getProvider("installations-internal").getImmediate();return Io(o,r,a)},"PUBLIC")),G(new H("analytics-internal",t,"PRIVATE")),Y(St,Dt),Y(St,Dt,"esm2017");function t(n){try{const a=n.getProvider(ie).getImmediate();return{logEvent:(o,r,l)=>Vt(a,o,r,l)}}catch(a){throw O.create("interop-component-reg-failed",{reason:a})}}}Ao();let ce=null;function P(){const t=()=>{if(!ce&&typeof window<"u")try{ce=To()}catch(o){console.warn("[Analytics] Firebase não configurado:",o)}},n=(o,r)=>{if(process.env.NODE_ENV==="production"){if(t(),ce){const l=a(r);Vt(ce,o,l)}}else console.log("[Analytics]",o,r)},a=o=>{if(!o)return;const r=["password","token","secret","key","email","cpf","cnpj"],l={...o};return Object.keys(l).forEach(s=>{r.some(i=>s.toLowerCase().includes(i))&&delete l[s]}),l};return{trackEvent:n}}var Nt=(t=>(t.PRIMARY="primary",t.SECONDARY="secondary",t.OUTLINE="outline",t.GHOST="ghost",t))(Nt||{}),xt=(t=>(t.SM="sm",t.MD="md",t.LG="lg",t))(xt||{});const zo=["disabled","type","aria-busy","aria-disabled"],Ro={key:0,class:"spinner",role:"status","aria-label":"Carregando"},Fo=e.defineComponent({__name:"DatametriaButton",props:{variant:{default:Nt.PRIMARY},size:{default:xt.MD},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},type:{default:"button"}},emits:["click"],setup(t,{emit:n}){const a=t,o=n,{trackEvent:r}=P(),l=i=>{r("button_click",{component:"DatametriaButton",variant:a.variant,size:a.size}),o("click",i)},s=e.computed(()=>["datametria-button",`datametria-button--${a.variant}`,`datametria-button--${a.size}`,{"datametria-button--full-width":a.fullWidth,"datametria-button--loading":a.loading,"datametria-button--disabled":a.disabled}]);return(i,c)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(s.value),disabled:t.disabled||t.loading,type:t.type,"aria-busy":t.loading,"aria-disabled":t.disabled,onClick:l},[t.loading?(e.openBlock(),e.createElementBlock("span",Ro)):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default",{},void 0,!0)],10,zo))}}),A=(t,n)=>{const a=t.__vccOpts||t;for(const[o,r]of n)a[o]=r;return a},Lo=A(Fo,[["__scopeId","data-v-bc9af9ae"]]),Oo={key:0,class:"datametria-input__required"},Po={key:1,class:"datametria-input__prepend"},jo={class:"datametria-input__inner"},qo={key:0,class:"datametria-input__prefix"},Ho={key:0},Uo=["type","placeholder","disabled","readonly","maxlength","aria-label","aria-required","aria-invalid","aria-describedby"],vo={key:1,class:"datametria-input__suffix"},Ko={key:0},Wo={key:2,class:"datametria-input__append"},Go=["id"],Yo=A(e.defineComponent({__name:"DatametriaInput",props:{modelValue:{default:""},label:{},required:{type:Boolean,default:!1},errorMessage:{},type:{default:"text"},placeholder:{default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},maxlength:{},prefixIcon:{},suffixIcon:{},size:{default:"md"}},emits:["update:modelValue","input","change","focus","blur","clear"],setup(t,{expose:n,emit:a}){const o=t,r=a,{trackEvent:l}=P(),s=e.ref(),i=e.ref(!1),c=`datametria-input-${Math.random().toString(36).substr(2,9)}`,d=e.computed({get:()=>o.modelValue,set:b=>r("update:modelValue",b)}),h=e.computed(()=>o.clearable&&!o.disabled&&!o.readonly&&d.value),u=e.computed(()=>({"datametria-input--disabled":o.disabled,"datametria-input--focused":i.value,"datametria-input--error":!!o.errorMessage,[`datametria-input--${o.size}`]:!0})),f=e.computed(()=>({"datametria-input__field":!0})),B=b=>{const $=b.target;r("input",$.value)},C=b=>{const $=b.target;l("input_change",{component:"DatametriaInput",type:o.type,hasValue:!!$.value}),r("change",$.value)},y=b=>{i.value=!0,l("input_focus",{component:"DatametriaInput",type:o.type,size:o.size}),r("focus",b)},E=b=>{i.value=!1,r("blur",b)},g=()=>{var b;l("input_clear",{component:"DatametriaInput",type:o.type}),r("update:modelValue",""),r("clear"),(b=s.value)==null||b.focus()};return n({focus:()=>{var b;return(b=s.value)==null?void 0:b.focus()},blur:()=>{var b;return(b=s.value)==null?void 0:b.blur()}}),(b,$)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-input",u.value])},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:c,class:"datametria-input__label"},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",Oo,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),b.$slots.prepend?(e.openBlock(),e.createElementBlock("div",Po,[e.renderSlot(b.$slots,"prepend",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",jo,[b.$slots.prefix||t.prefixIcon?(e.openBlock(),e.createElementBlock("span",qo,[e.renderSlot(b.$slots,"prefix",{},()=>[t.prefixIcon?(e.openBlock(),e.createElementBlock("span",Ho,e.toDisplayString(t.prefixIcon),1)):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{id:c,ref_key:"inputRef",ref:s,"onUpdate:modelValue":$[0]||($[0]=N=>d.value=N),type:t.type,placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,maxlength:t.maxlength,"aria-label":t.label||t.placeholder,"aria-required":t.required,"aria-invalid":!!t.errorMessage,"aria-describedby":t.errorMessage?`${c}-error`:void 0,class:e.normalizeClass(f.value),onInput:B,onChange:C,onFocus:y,onBlur:E},null,42,Uo),[[e.vModelDynamic,d.value]]),h.value||b.$slots.suffix||t.suffixIcon?(e.openBlock(),e.createElementBlock("span",vo,[h.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"datametria-input__clear",type:"button","aria-label":"Limpar",onClick:g}," × ")):e.createCommentVNode("",!0),e.renderSlot(b.$slots,"suffix",{},()=>[t.suffixIcon?(e.openBlock(),e.createElementBlock("span",Ko,e.toDisplayString(t.suffixIcon),1)):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)]),b.$slots.append?(e.openBlock(),e.createElementBlock("div",Wo,[e.renderSlot(b.$slots,"append",{},void 0,!0)])):e.createCommentVNode("",!0),t.errorMessage?(e.openBlock(),e.createElementBlock("div",{key:3,id:`${c}-error`,role:"alert","aria-live":"polite",class:"datametria-input__error"},e.toDisplayString(t.errorMessage),9,Go)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-5b74c6af"]]),Jo={key:0,class:"datametria-password-input__required"},Xo={class:"datametria-password-input__wrapper"},Qo=["value","type","placeholder","disabled","required","autocomplete","aria-label","aria-required","aria-invalid","aria-describedby"],Zo=["aria-label"],er={key:0,class:"datametria-password-input__icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},tr={key:1,class:"datametria-password-input__icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},ar={key:1,class:"datametria-password-input__warning",role:"alert"},nr={key:2,class:"datametria-password-input__strength"},or={class:"datametria-password-input__strength-bar"},rr=["id"],lr={class:"datametria-password-input__requirements-list"},sr={class:"datametria-password-input__check"},ir={class:"datametria-password-input__check"},cr={class:"datametria-password-input__check"},dr={class:"datametria-password-input__check"},mr={class:"datametria-password-input__check"},pr=["id"],ur=["id"],fr=A(e.defineComponent({__name:"DatametriaPasswordInput",props:{modelValue:{default:""},label:{},placeholder:{},errorMessage:{},helpText:{},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},minLength:{default:8},showStrength:{type:Boolean,default:!0},showRequirements:{type:Boolean,default:!0},autocomplete:{default:"current-password"},size:{default:"md"}},emits:["update:modelValue","strength-change"],setup(t,{emit:n}){const a=t,o=n,{trackEvent:r}=P(),l=`password-${Math.random().toString(36).substr(2,9)}`,s=e.ref(!1),i=e.ref(!1),c=e.ref(!1),d=e.computed(()=>({minLength:a.modelValue.length>=a.minLength,hasUppercase:/[A-Z]/.test(a.modelValue),hasLowercase:/[a-z]/.test(a.modelValue),hasNumber:/\d/.test(a.modelValue),hasSpecial:/[!@#$%^&*(),.?":{}|<>]/.test(a.modelValue)})),h=e.computed(()=>{if(!a.modelValue)return 0;let V=0;const I=d.value;return I.minLength&&(V+=20),I.hasUppercase&&(V+=20),I.hasLowercase&&(V+=20),I.hasNumber&&(V+=20),I.hasSpecial&&(V+=20),V}),u=e.computed(()=>h.value),f=e.computed(()=>{const V=h.value;return V===0?"":V<=40?"Fraca":V<=60?"Média":V<=80?"Boa":"Forte"}),B=e.computed(()=>({[`datametria-password-input--${a.size}`]:!0})),C=e.computed(()=>["datametria-password-input__strength-fill",{"datametria-password-input__strength-fill--weak":h.value<=40,"datametria-password-input__strength-fill--medium":h.value>40&&h.value<=60,"datametria-password-input__strength-fill--good":h.value>60&&h.value<=80,"datametria-password-input__strength-fill--strong":h.value>80}]),y=e.computed(()=>["datametria-password-input__strength-text",{"datametria-password-input__strength-text--weak":h.value<=40,"datametria-password-input__strength-text--medium":h.value>40&&h.value<=60,"datametria-password-input__strength-text--good":h.value>60&&h.value<=80,"datametria-password-input__strength-text--strong":h.value>80}]),E=e.computed(()=>["datametria-password-input__field",{"datametria-password-input__field--error":a.errorMessage,"datametria-password-input__field--disabled":a.disabled}]),g=e.computed(()=>{const V=[];return a.showRequirements&&i.value&&V.push(`${l}-requirements`),a.errorMessage&&V.push(`${l}-error`),a.helpText&&!a.errorMessage&&V.push(`${l}-help`),V.length>0?V.join(" "):void 0}),b=V=>{const I=V.target.value;o("update:modelValue",I)},$=()=>{i.value=!0,r("password_input_focus",{component:"DatametriaPasswordInput",size:a.size})},N=()=>{i.value=!1},D=()=>{s.value=!s.value,r("password_visibility_toggle",{component:"DatametriaPasswordInput",visible:s.value})},_=V=>{c.value=V.getModifierState("CapsLock")};return e.watch(h,V=>{a.modelValue&&o("strength-change",V)}),(V,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-password-input",B.value])},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:l,class:"datametria-password-input__label"},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",Jo,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Xo,[e.createElementVNode("input",{id:l,value:t.modelValue,type:s.value?"text":"password",placeholder:t.placeholder,disabled:t.disabled,required:t.required,autocomplete:t.autocomplete,class:e.normalizeClass(E.value),"aria-label":t.label||t.placeholder,"aria-required":t.required,"aria-invalid":!!t.errorMessage,"aria-describedby":g.value,onInput:b,onFocus:$,onBlur:N,onKeyup:_},null,42,Qo),e.createElementVNode("button",{type:"button",class:"datametria-password-input__toggle","aria-label":s.value?"Ocultar senha":"Mostrar senha",onClick:D},[s.value?(e.openBlock(),e.createElementBlock("svg",er,[...I[0]||(I[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",tr,[...I[1]||(I[1]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},null,-1),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"},null,-1)])]))],8,Zo)]),c.value?(e.openBlock(),e.createElementBlock("p",ar," ⚠️ Caps Lock está ativado ")):e.createCommentVNode("",!0),t.showStrength&&t.modelValue?(e.openBlock(),e.createElementBlock("div",nr,[e.createElementVNode("div",or,[e.createElementVNode("div",{class:e.normalizeClass(C.value),style:e.normalizeStyle({width:`${u.value}%`})},null,6)]),e.createElementVNode("span",{class:e.normalizeClass(y.value)},e.toDisplayString(f.value),3)])):e.createCommentVNode("",!0),t.showRequirements&&i.value?(e.openBlock(),e.createElementBlock("div",{key:3,id:`${l}-requirements`,class:"datametria-password-input__requirements"},[I[6]||(I[6]=e.createElementVNode("p",{class:"datametria-password-input__requirements-title"},"A senha deve conter:",-1)),e.createElementVNode("ul",lr,[e.createElementVNode("li",{class:e.normalizeClass({valid:d.value.minLength})},[e.createElementVNode("span",sr,e.toDisplayString(d.value.minLength?"✓":"○"),1),e.createTextVNode(" Mínimo "+e.toDisplayString(t.minLength)+" caracteres ",1)],2),e.createElementVNode("li",{class:e.normalizeClass({valid:d.value.hasUppercase})},[e.createElementVNode("span",ir,e.toDisplayString(d.value.hasUppercase?"✓":"○"),1),I[2]||(I[2]=e.createTextVNode(" Pelo menos 1 letra maiúscula ",-1))],2),e.createElementVNode("li",{class:e.normalizeClass({valid:d.value.hasLowercase})},[e.createElementVNode("span",cr,e.toDisplayString(d.value.hasLowercase?"✓":"○"),1),I[3]||(I[3]=e.createTextVNode(" Pelo menos 1 letra minúscula ",-1))],2),e.createElementVNode("li",{class:e.normalizeClass({valid:d.value.hasNumber})},[e.createElementVNode("span",dr,e.toDisplayString(d.value.hasNumber?"✓":"○"),1),I[4]||(I[4]=e.createTextVNode(" Pelo menos 1 número ",-1))],2),e.createElementVNode("li",{class:e.normalizeClass({valid:d.value.hasSpecial})},[e.createElementVNode("span",mr,e.toDisplayString(d.value.hasSpecial?"✓":"○"),1),I[5]||(I[5]=e.createTextVNode(" Pelo menos 1 caractere especial ",-1))],2)])],8,rr)):e.createCommentVNode("",!0),t.errorMessage?(e.openBlock(),e.createElementBlock("p",{key:4,id:`${l}-error`,role:"alert","aria-live":"polite",class:"datametria-password-input__error"},e.toDisplayString(t.errorMessage),9,pr)):e.createCommentVNode("",!0),t.helpText&&!t.errorMessage?(e.openBlock(),e.createElementBlock("p",{key:5,id:`${l}-help`,class:"datametria-password-input__help"},e.toDisplayString(t.helpText),9,ur)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-20da4f5f"]]),hr={key:0,class:"datametria-select__required"},gr=["aria-expanded","aria-disabled","aria-invalid","aria-describedby","onKeydown"],br={key:0,class:"datametria-select__value"},kr={key:1,class:"datametria-select__placeholder"},yr=["disabled","aria-label"],_r={value:"",disabled:""},Br=["value"],Er={class:"datametria-select__options"},wr=["aria-selected","onClick"],$r={key:0,class:"datametria-select__empty"},Cr=["id"],Vr=A(e.defineComponent({__name:"DatametriaSelect",props:{modelValue:{},options:{},label:{},required:{type:Boolean,default:!1},errorMessage:{},placeholder:{default:"Selecione"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},filterable:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},size:{default:"md"}},emits:["update:modelValue","change"],setup(t,{emit:n}){const a=t,o=n,{trackEvent:r}=P(),l=e.ref(!1),s=e.ref(""),i=e.ref({}),c=e.ref(),d=`datametria-select-${Math.random().toString(36).substr(2,9)}`,h=e.computed({get:()=>a.modelValue,set:N=>{o("update:modelValue",N),o("change",N)}}),u=e.computed(()=>{var N;return a.multiple&&Array.isArray(a.modelValue)?a.modelValue.map(_=>{var V;return(V=a.options.find(I=>I.value===_))==null?void 0:V.label}).filter(Boolean).join(", "):((N=a.options.find(D=>D.value===a.modelValue))==null?void 0:N.label)||""}),f=e.computed(()=>!a.filterable||!s.value?a.options:a.options.filter(N=>N.label.toLowerCase().includes(s.value.toLowerCase()))),B=e.computed(()=>({"is-disabled":a.disabled,"is-error":!!a.errorMessage,[`datametria-select--${a.size}`]:!0})),C=N=>a.multiple&&Array.isArray(a.modelValue)?a.modelValue.includes(N):a.modelValue===N,y=()=>{a.disabled||(l.value=!l.value,l.value&&(r("select_open",{component:"DatametriaSelect",multiple:a.multiple,size:a.size}),c.value&&E()))},E=()=>{if(!c.value)return;const N=c.value.getBoundingClientRect();i.value={top:`${N.bottom+window.scrollY+4}px`,left:`${N.left+window.scrollX}px`,width:`${N.width}px`}},g=N=>{if(a.multiple){const D=Array.isArray(a.modelValue)?[...a.modelValue]:[],_=D.indexOf(N.value);_>-1?D.splice(_,1):D.push(N.value),o("update:modelValue",D),o("change",D)}else o("update:modelValue",N.value),o("change",N.value),l.value=!1;r("select_change",{component:"DatametriaSelect",multiple:a.multiple,optionCount:a.multiple?Array.isArray(a.modelValue)?a.modelValue.length:0:1})},b=N=>{const D=N.target;o("update:modelValue",D.value),o("change",D.value)},$=N=>{N.target.closest(".datametria-select")||(l.value=!1)};return e.onMounted(()=>{document.addEventListener("click",$)}),e.onUnmounted(()=>{document.removeEventListener("click",$)}),(N,D)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-select",B.value])},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:d,class:"datametria-select__label"},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",hr,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"triggerRef",ref:c,class:"datametria-select__trigger","aria-expanded":l.value,"aria-haspopup":!0,"aria-disabled":t.disabled,"aria-invalid":!!t.errorMessage,"aria-describedby":t.errorMessage?`${d}-error`:void 0,role:"combobox",tabindex:"0",onClick:e.withModifiers(y,["stop"]),onKeydown:[e.withKeys(e.withModifiers(y,["prevent"]),["enter"]),e.withKeys(e.withModifiers(y,["prevent"]),["space"]),D[1]||(D[1]=e.withKeys(_=>l.value=!1,["escape"]))]},[u.value?(e.openBlock(),e.createElementBlock("span",br,e.toDisplayString(u.value),1)):(e.openBlock(),e.createElementBlock("span",kr,e.toDisplayString(t.placeholder),1)),e.createElementVNode("span",{class:e.normalizeClass(["datametria-select__arrow",{"is-open":l.value}])},"▼",2),e.withDirectives(e.createElementVNode("select",{id:d,"onUpdate:modelValue":D[0]||(D[0]=_=>h.value=_),disabled:t.disabled,"aria-label":t.label||t.placeholder,style:{position:"absolute",opacity:"0","pointer-events":"none"},onChange:b},[e.createElementVNode("option",_r,e.toDisplayString(t.placeholder),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,_=>(e.openBlock(),e.createElementBlock("option",{key:_.value,value:_.value},e.toDisplayString(_.label),9,Br))),128))],40,yr),[[e.vModelSelect,h.value]])],40,gr),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"datametria-select__dropdown",style:e.normalizeStyle(i.value),role:"listbox"},[t.filterable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":D[2]||(D[2]=_=>s.value=_),class:"datametria-select__filter",placeholder:"Buscar...","aria-label":"Filtrar opções",onClick:D[3]||(D[3]=e.withModifiers(()=>{},["stop"]))},null,512)),[[e.vModelText,s.value]]):e.createCommentVNode("",!0),e.createElementVNode("div",Er,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,_=>(e.openBlock(),e.createElementBlock("div",{key:_.value,class:e.normalizeClass(["datametria-select__option",{"is-selected":C(_.value)}]),role:"option","aria-selected":C(_.value),onClick:V=>g(_)},e.toDisplayString(_.label),11,wr))),128)),f.value.length===0?(e.openBlock(),e.createElementBlock("div",$r," Nenhum resultado ")):e.createCommentVNode("",!0)])],4)):e.createCommentVNode("",!0)])),t.errorMessage?(e.openBlock(),e.createElementBlock("div",{key:1,id:`${d}-error`,role:"alert","aria-live":"polite",class:"datametria-select__error"},e.toDisplayString(t.errorMessage),9,Cr)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-106f3f21"]]),Sr={class:"datametria-checkbox__input"},Dr=["checked","disabled","indeterminate","aria-label","aria-checked","aria-disabled"],Nr={key:0,class:"datametria-checkbox__label"},xr=A(e.defineComponent({__name:"DatametriaCheckbox",props:{modelValue:{type:[Boolean,String,Number],default:!1},label:{},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},trueValue:{type:[Boolean,String,Number],default:!0},falseValue:{type:[Boolean,String,Number],default:!1},size:{default:"md"}},emits:["update:modelValue","change"],setup(t,{expose:n,emit:a}){const o=t,r=a,{trackEvent:l}=P(),s=e.ref(),i=e.inject("checkboxGroup",null),c=`datametria-checkbox-${Math.random().toString(36).substr(2,9)}`,d=e.computed(()=>i?i.modelValue.value.includes(o.modelValue):o.modelValue===o.trueValue),h=e.computed(()=>({"is-checked":d.value,"is-disabled":o.disabled,"is-indeterminate":o.indeterminate,[`datametria-checkbox--${o.size}`]:!0})),u=f=>{if(o.disabled)return;const C=f.target.checked;if(i){const y=[...i.modelValue.value];if(C)y.push(o.modelValue);else{const E=y.indexOf(o.modelValue);E>-1&&y.splice(E,1)}i.updateValue(y),r("update:modelValue",y),r("change",y)}else{const y=C?o.trueValue:o.falseValue;r("update:modelValue",y),r("change",y)}l("checkbox_change",{component:"DatametriaCheckbox",checked:C,size:o.size})};return e.watch(()=>o.indeterminate,f=>{s.value&&(s.value.indeterminate=f)},{immediate:!0}),n({inputRef:s}),(f,B)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["datametria-checkbox",h.value])},[e.createElementVNode("span",Sr,[e.createElementVNode("input",{id:c,ref_key:"inputRef",ref:s,type:"checkbox",checked:d.value,disabled:t.disabled,indeterminate:t.indeterminate,"aria-label":t.label,"aria-checked":t.indeterminate?"mixed":d.value,"aria-disabled":t.disabled,onChange:u},null,40,Dr),B[0]||(B[0]=e.createElementVNode("span",{class:"datametria-checkbox__inner"},null,-1))]),t.label||f.$slots.default?(e.openBlock(),e.createElementBlock("span",Nr,[e.renderSlot(f.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-5b8ad3dc"]]),Ir=["aria-label","aria-disabled"],Tr={key:0,class:"datametria-checkbox-group__label"},Mr={key:0,class:"datametria-checkbox-group__required"},Ar={class:"datametria-checkbox-group__content"},zr=["id"],Rr=A(e.defineComponent({__name:"DatametriaCheckboxGroup",props:{modelValue:{default:()=>[]},disabled:{type:Boolean,default:!1},label:{},required:{type:Boolean,default:!1},errorMessage:{},size:{default:"md"}},emits:["update:modelValue","change"],setup(t,{emit:n}){const a=t,o=n,{trackEvent:r}=P(),l=`datametria-checkbox-group-${Math.random().toString(36).substr(2,9)}`,s=e.computed(()=>({"is-disabled":a.disabled,"is-error":!!a.errorMessage,[`datametria-checkbox-group--${a.size}`]:!0})),i=c=>{o("update:modelValue",c),o("change",c),r("checkbox_group_change",{component:"DatametriaCheckboxGroup",selectedCount:c.length,size:a.size})};return e.provide("checkboxGroup",{modelValue:e.computed(()=>a.modelValue),disabled:e.computed(()=>a.disabled),updateValue:i}),(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-checkbox-group",s.value]),role:"group","aria-label":t.label,"aria-disabled":t.disabled},[t.label?(e.openBlock(),e.createElementBlock("label",Tr,[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",Mr,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ar,[e.renderSlot(c.$slots,"default",{},void 0,!0)]),t.errorMessage?(e.openBlock(),e.createElementBlock("div",{key:1,id:`${l}-error`,role:"alert","aria-live":"polite",class:"datametria-checkbox-group__error"},e.toDisplayString(t.errorMessage),9,zr)):e.createCommentVNode("",!0)],10,Ir))}}),[["__scopeId","data-v-e6d1fd9a"]]),Fr={class:"datametria-radio__input"},Lr=["checked","disabled","value","aria-label","aria-checked","aria-disabled"],Or={key:0,class:"datametria-radio__label"},Pr=A(e.defineComponent({__name:"DatametriaRadio",props:{modelValue:{type:[String,Number,Boolean]},label:{},disabled:{type:Boolean,default:!1},size:{default:"md"}},emits:["update:modelValue","change"],setup(t,{expose:n,emit:a}){const o=t,r=a,{trackEvent:l}=P(),s=e.ref(),i=e.inject("radioGroup",null),c=`datametria-radio-${Math.random().toString(36).substr(2,9)}`,d=e.computed(()=>i?i.modelValue.value===o.modelValue:!1),h=e.computed(()=>({"is-checked":d.value,"is-disabled":o.disabled,[`datametria-radio--${o.size}`]:!0})),u=()=>{o.disabled||(i&&i.updateValue(o.modelValue),r("update:modelValue",o.modelValue),r("change",o.modelValue),l("radio_change",{component:"DatametriaRadio",value:o.modelValue,size:o.size}))};return n({inputRef:s}),(f,B)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["datametria-radio",h.value])},[e.createElementVNode("span",Fr,[e.createElementVNode("input",{id:c,ref_key:"inputRef",ref:s,type:"radio",checked:d.value,disabled:t.disabled,value:t.modelValue,"aria-label":t.label,"aria-checked":d.value,"aria-disabled":t.disabled,onChange:u},null,40,Lr),B[0]||(B[0]=e.createElementVNode("span",{class:"datametria-radio__inner"},null,-1))]),t.label||f.$slots.default?(e.openBlock(),e.createElementBlock("span",Or,[e.renderSlot(f.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-5e8cfe81"]]),jr=["aria-label","aria-disabled"],qr={key:0,class:"datametria-radio-group__label"},Hr={key:0,class:"datametria-radio-group__required"},Ur={class:"datametria-radio-group__content"},vr=["id"],Kr=A(e.defineComponent({__name:"DatametriaRadioGroup",props:{modelValue:{type:[String,Number,Boolean]},disabled:{type:Boolean,default:!1},label:{},required:{type:Boolean,default:!1},errorMessage:{},size:{default:"md"}},emits:["update:modelValue","change"],setup(t,{emit:n}){const a=t,o=n,{trackEvent:r}=P(),l=`datametria-radio-group-${Math.random().toString(36).substr(2,9)}`,s=e.computed(()=>({"is-disabled":a.disabled,"is-error":!!a.errorMessage,[`datametria-radio-group--${a.size}`]:!0})),i=c=>{o("update:modelValue",c),o("change",c),r("radio_group_change",{component:"DatametriaRadioGroup",value:c,size:a.size})};return e.provide("radioGroup",{modelValue:e.computed(()=>a.modelValue),disabled:e.computed(()=>a.disabled),updateValue:i}),(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-radio-group",s.value]),role:"radiogroup","aria-label":t.label,"aria-disabled":t.disabled},[t.label?(e.openBlock(),e.createElementBlock("label",qr,[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",Hr,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ur,[e.renderSlot(c.$slots,"default",{},void 0,!0)]),t.errorMessage?(e.openBlock(),e.createElementBlock("div",{key:1,id:`${l}-error`,role:"alert","aria-live":"polite",class:"datametria-radio-group__error"},e.toDisplayString(t.errorMessage),9,vr)):e.createCommentVNode("",!0)],10,jr))}}),[["__scopeId","data-v-13a7875a"]]),Wr={key:0,class:"datametria-switch__required"},Gr=["aria-checked","aria-disabled","aria-label","disabled"],Yr={key:0,class:"datametria-switch__loading"},Jr=["id"],Xr=A(e.defineComponent({__name:"DatametriaSwitch",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},label:{},ariaLabel:{},required:{type:Boolean,default:!1},errorMessage:{},activeColor:{default:"#3b82f6"},inactiveColor:{default:"#d1d5db"},size:{default:"md"}},emits:["update:modelValue","change"],setup(t,{emit:n}){const a=t,o=n,{trackEvent:r}=P(),l=`datametria-switch-${Math.random().toString(36).substr(2,9)}`,s=e.computed(()=>({"is-checked":a.modelValue,"is-disabled":a.disabled,"is-loading":a.loading,"is-error":!!a.errorMessage,[`datametria-switch-wrapper--${a.size}`]:!0})),i=e.computed(()=>({backgroundColor:a.modelValue?a.activeColor:a.inactiveColor})),c=()=>{if(a.disabled||a.loading)return;const d=!a.modelValue;o("update:modelValue",d),o("change",d),r("switch_change",{component:"DatametriaSwitch",checked:d,size:a.size})};return(d,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-switch-wrapper",s.value])},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:l,class:"datametria-switch__label-text"},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",Wr,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("button",{id:l,type:"button",role:"switch",class:"datametria-switch","aria-checked":t.modelValue,"aria-disabled":t.disabled||t.loading,"aria-label":t.label||t.ariaLabel,disabled:t.disabled||t.loading,onClick:c},[e.createElementVNode("span",{class:"datametria-switch__core",style:e.normalizeStyle(i.value)},[t.loading?(e.openBlock(),e.createElementBlock("span",Yr,[...h[0]||(h[0]=[e.createElementVNode("span",{class:"spinner",role:"status","aria-label":"Carregando"},null,-1)])])):e.createCommentVNode("",!0)],4)],8,Gr),t.errorMessage?(e.openBlock(),e.createElementBlock("div",{key:1,id:`${l}-error`,role:"alert","aria-live":"polite",class:"datametria-switch__error"},e.toDisplayString(t.errorMessage),9,Jr)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-78e9e406"]]),Qr={key:0,class:"datametria-textarea__required"},Zr=["placeholder","disabled","readonly","rows","maxlength","aria-label","aria-required","aria-invalid","aria-describedby"],el={key:1,class:"datametria-textarea__count"},tl=["id"],al=A(e.defineComponent({__name:"DatametriaTextarea",props:{modelValue:{default:""},placeholder:{default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},rows:{default:3},maxlength:{},showWordLimit:{type:Boolean,default:!1},autosize:{type:[Boolean,Object],default:!1},label:{},required:{type:Boolean,default:!1},errorMessage:{},size:{default:"md"}},emits:["update:modelValue","input","focus","blur"],setup(t,{expose:n,emit:a}){const o=t,r=a,{trackEvent:l}=P(),s=e.ref(),i=e.ref(o.modelValue),c=e.ref(!1),d=`datametria-textarea-${Math.random().toString(36).substr(2,9)}`,h=e.computed(()=>({"datametria-textarea--disabled":o.disabled,"datametria-textarea--focused":c.value,"datametria-textarea--error":!!o.errorMessage,[`datametria-textarea--${o.size}`]:!0})),u=e.computed(()=>{if(!o.autosize)return o.rows}),f=E=>{const g=E.target;i.value=g.value,r("update:modelValue",g.value),r("input",g.value),o.autosize&&e.nextTick(()=>y())},B=E=>{c.value=!0,l("textarea_focus",{component:"DatametriaTextarea",size:o.size}),r("focus",E)},C=E=>{c.value=!1,r("blur",E)},y=()=>{if(!s.value||!o.autosize)return;const E=s.value;E.style.height="auto";let g=0,b=1/0;if(typeof o.autosize=="object"){if(o.autosize.minRows){const D=parseInt(getComputedStyle(E).lineHeight);g=o.autosize.minRows*D}if(o.autosize.maxRows){const D=parseInt(getComputedStyle(E).lineHeight);b=o.autosize.maxRows*D}}const $=E.scrollHeight,N=Math.max(g,Math.min(b,$));E.style.height=`${N}px`};return e.watch(()=>o.modelValue,E=>{E!==i.value&&(i.value=E,o.autosize&&e.nextTick(()=>y()))}),e.onMounted(()=>{o.autosize&&e.nextTick(()=>y())}),n({focus:()=>{var E;return(E=s.value)==null?void 0:E.focus()},blur:()=>{var E;return(E=s.value)==null?void 0:E.blur()}}),(E,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-textarea",h.value])},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:d,class:"datametria-textarea__label"},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",Qr,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("textarea",{id:d,ref_key:"textareaRef",ref:s,"onUpdate:modelValue":g[0]||(g[0]=b=>i.value=b),class:"datametria-textarea__inner",placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,rows:u.value,maxlength:t.maxlength,"aria-label":t.label||t.placeholder,"aria-required":t.required,"aria-invalid":!!t.errorMessage,"aria-describedby":t.errorMessage?`${d}-error`:void 0,onInput:f,onFocus:B,onBlur:C},null,40,Zr),[[e.vModelText,i.value]]),t.showWordLimit&&t.maxlength?(e.openBlock(),e.createElementBlock("div",el,e.toDisplayString(i.value.length)+" / "+e.toDisplayString(t.maxlength),1)):e.createCommentVNode("",!0),t.errorMessage?(e.openBlock(),e.createElementBlock("div",{key:2,id:`${d}-error`,role:"alert","aria-live":"polite",class:"datametria-textarea__error"},e.toDisplayString(t.errorMessage),9,tl)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-94ceab34"]]),nl=["placeholder","disabled","readonly"],ol={key:0,class:"datametria-datepicker__shortcuts"},rl=["onClick"],ll={class:"datametria-datepicker__calendar"},sl={class:"datametria-datepicker__header"},il={class:"datametria-datepicker__weekdays"},cl={class:"datametria-datepicker__days"},dl=["disabled","onClick"],ml=A(e.defineComponent({__name:"DatametriaDatePicker",props:{modelValue:{default:null},type:{default:"date"},format:{default:"DD/MM/YYYY"},placeholder:{default:"Selecione uma data"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabledDate:{},shortcuts:{default:()=>[]}},emits:["update:modelValue","change"],setup(t,{emit:n}){const a=t,o=n,r=e.ref(),l=e.ref(),s=e.ref(!1),i=e.ref(new Date),c=e.ref(null),d=["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],h=e.computed(()=>`${["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"][i.value.getMonth()]} ${i.value.getFullYear()}`),u=e.computed(()=>a.modelValue?a.type==="range"&&Array.isArray(a.modelValue)?`${C(a.modelValue[0])} - ${C(a.modelValue[1])}`:C(a.modelValue):""),f=e.computed(()=>{const w=i.value.getFullYear(),T=i.value.getMonth(),p=new Date(w,T,1),m=new Date(w,T+1,0),S=[],k=p.getDay();for(let z=k-1;z>=0;z--){const j=new Date(w,T,-z);S.push({date:j,disabled:!1,otherMonth:!0})}for(let z=1;z<=m.getDate();z++){const j=new Date(w,T,z);S.push({date:j,disabled:!1,otherMonth:!1})}const x=42-S.length;for(let z=1;z<=x;z++){const j=new Date(w,T+1,z);S.push({date:j,disabled:!1,otherMonth:!0})}return S}),B=e.computed(()=>{if(!r.value)return{};const w=r.value.getBoundingClientRect();return{position:"fixed",top:`${w.bottom+4}px`,left:`${w.left}px`,zIndex:9999}}),C=w=>{const T=String(w.getDate()).padStart(2,"0"),p=String(w.getMonth()+1).padStart(2,"0"),m=w.getFullYear();return`${T}/${p}/${m}`},y=w=>a.disabledDate?a.disabledDate(w):!1,E=w=>a.modelValue?a.type==="range"&&Array.isArray(a.modelValue)?b(w,a.modelValue[0])||b(w,a.modelValue[1]):b(w,a.modelValue):!1,g=w=>{if(a.type!=="range"||!Array.isArray(a.modelValue))return!1;const[T,p]=a.modelValue;return w>T&&w<p},b=(w,T)=>w.getDate()===T.getDate()&&w.getMonth()===T.getMonth()&&w.getFullYear()===T.getFullYear(),$=w=>{if(a.type==="range")if(!c.value)c.value=w;else{const T=c.value<w?c.value:w,p=c.value<w?w:c.value;o("update:modelValue",[T,p]),o("change",[T,p]),c.value=null,s.value=!1}else o("update:modelValue",w),o("change",w),s.value=!1},N=()=>{!a.disabled&&!a.readonly&&(s.value=!0)},D=w=>{setTimeout(()=>{var T;(T=l.value)!=null&&T.contains(w.relatedTarget)||(s.value=!1)},200)},_=w=>{o("update:modelValue",w.value),o("change",w.value),s.value=!1},V=()=>{i.value=new Date(i.value.getFullYear(),i.value.getMonth()-1)},I=()=>{i.value=new Date(i.value.getFullYear(),i.value.getMonth()+1)};return e.watch(()=>a.modelValue,w=>{w&&!Array.isArray(w)&&(i.value=new Date(w))}),(w,T)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-datepicker",{"datametria-datepicker--disabled":t.disabled}])},[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:r,"onUpdate:modelValue":T[0]||(T[0]=p=>u.value=p),type:"text",class:"datametria-datepicker__input",placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,onFocus:N,onBlur:D},null,40,nl),[[e.vModelText,u.value]]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:l,class:"datametria-datepicker__dropdown",style:e.normalizeStyle(B.value)},[t.shortcuts.length?(e.openBlock(),e.createElementBlock("div",ol,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.shortcuts,p=>(e.openBlock(),e.createElementBlock("button",{key:p.text,class:"datametria-datepicker__shortcut",onClick:m=>_(p)},e.toDisplayString(p.text),9,rl))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",ll,[e.createElementVNode("div",sl,[e.createElementVNode("button",{onClick:V},"<"),e.createElementVNode("span",null,e.toDisplayString(h.value),1),e.createElementVNode("button",{onClick:I},">")]),e.createElementVNode("div",il,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(d,p=>e.createElementVNode("span",{key:p},e.toDisplayString(p),1)),64))]),e.createElementVNode("div",cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,p=>(e.openBlock(),e.createElementBlock("button",{key:p.date.getTime(),class:e.normalizeClass(["datametria-datepicker__day",{"datametria-datepicker__day--disabled":p.disabled||y(p.date),"datametria-datepicker__day--selected":E(p.date),"datametria-datepicker__day--in-range":g(p.date),"datametria-datepicker__day--other-month":p.otherMonth}]),disabled:p.disabled||y(p.date),onClick:m=>$(p.date)},e.toDisplayString(p.date.getDate()),11,dl))),128))])])],4)):e.createCommentVNode("",!0)]))],2))}}),[["__scopeId","data-v-01e9d961"]]),pl=["placeholder","disabled","readonly"],ul={class:"datametria-timepicker__spinners"},fl={class:"datametria-timepicker__spinner"},hl={class:"datametria-timepicker__spinner-list"},gl=["onClick"],bl={class:"datametria-timepicker__spinner"},kl={class:"datametria-timepicker__spinner-list"},yl=["onClick"],_l={key:0,class:"datametria-timepicker__spinner"},Bl={class:"datametria-timepicker__spinner-list"},El=["onClick"],wl=A(e.defineComponent({__name:"DatametriaTimePicker",props:{modelValue:{default:null},format:{default:"HH:mm:ss"},step:{default:1},placeholder:{default:"Selecione um horário"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},range:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:n}){const a=t,o=n,r=e.ref(),l=e.ref(),s=e.ref(!1),i=e.ref(0),c=e.ref(0),d=e.ref(0),h=e.computed(()=>a.format.includes("ss")),u=e.computed(()=>{const w=[];for(let T=0;T<24;T+=a.step)w.push(T);return w}),f=e.computed(()=>{const w=[];for(let T=0;T<60;T+=a.step)w.push(T);return w}),B=e.computed(()=>{const w=[];for(let T=0;T<60;T+=a.step)w.push(T);return w}),C=e.computed(()=>a.modelValue?a.modelValue:""),y=e.computed(()=>{if(!r.value)return{};const w=r.value.getBoundingClientRect();return{position:"fixed",top:`${w.bottom+4}px`,left:`${w.left}px`,zIndex:9999}}),E=w=>String(w).padStart(2,"0"),g=()=>{const w=E(i.value),T=E(c.value),p=E(d.value);return h.value?`${w}:${T}:${p}`:`${w}:${T}`},b=w=>{if(!w)return;const T=w.split(":");T.length>=2&&(i.value=parseInt(T[0])||0,c.value=parseInt(T[1])||0,T.length>=3&&(d.value=parseInt(T[2])||0))},$=w=>{i.value=w,_()},N=w=>{c.value=w,_()},D=w=>{d.value=w,_()},_=()=>{const w=g();o("update:modelValue",w),o("change",w)},V=()=>{!a.disabled&&!a.readonly&&(s.value=!0)},I=w=>{setTimeout(()=>{var T;(T=l.value)!=null&&T.contains(w.relatedTarget)||(s.value=!1)},200)};return e.watch(()=>a.modelValue,w=>{w&&b(w)},{immediate:!0}),(w,T)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-timepicker",{"datametria-timepicker--disabled":t.disabled}])},[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:r,"onUpdate:modelValue":T[0]||(T[0]=p=>C.value=p),type:"text",class:"datametria-timepicker__input",placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,onFocus:V,onBlur:I},null,40,pl),[[e.vModelText,C.value]]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:l,class:"datametria-timepicker__dropdown",style:e.normalizeStyle(y.value)},[e.createElementVNode("div",ul,[e.createElementVNode("div",fl,[T[1]||(T[1]=e.createElementVNode("div",{class:"datametria-timepicker__spinner-title"},"Hora",-1)),e.createElementVNode("div",hl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,p=>(e.openBlock(),e.createElementBlock("button",{key:p,class:e.normalizeClass(["datametria-timepicker__spinner-item",{"datametria-timepicker__spinner-item--active":p===i.value}]),onClick:m=>$(p)},e.toDisplayString(E(p)),11,gl))),128))])]),e.createElementVNode("div",bl,[T[2]||(T[2]=e.createElementVNode("div",{class:"datametria-timepicker__spinner-title"},"Minuto",-1)),e.createElementVNode("div",kl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,p=>(e.openBlock(),e.createElementBlock("button",{key:p,class:e.normalizeClass(["datametria-timepicker__spinner-item",{"datametria-timepicker__spinner-item--active":p===c.value}]),onClick:m=>N(p)},e.toDisplayString(E(p)),11,yl))),128))])]),h.value?(e.openBlock(),e.createElementBlock("div",_l,[T[3]||(T[3]=e.createElementVNode("div",{class:"datametria-timepicker__spinner-title"},"Segundo",-1)),e.createElementVNode("div",Bl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,p=>(e.openBlock(),e.createElementBlock("button",{key:p,class:e.normalizeClass(["datametria-timepicker__spinner-item",{"datametria-timepicker__spinner-item--active":p===d.value}]),onClick:m=>D(p)},e.toDisplayString(E(p)),11,El))),128))])])):e.createCommentVNode("",!0)])],4)):e.createCommentVNode("",!0)]))],2))}}),[["__scopeId","data-v-6ec4b87a"]]),$l={key:0,class:"dm-slider__header"},Cl=["for"],Vl={key:0,class:"dm-slider__required","aria-label":"obrigatório"},Sl={key:1,class:"dm-slider__value"},Dl={class:"dm-slider__wrapper"},Nl=["id","value","min","max","step","disabled","required","aria-label","aria-describedby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext"],xl={key:1,class:"dm-slider__range"},Il={class:"dm-slider__min"},Tl={class:"dm-slider__max"},Ml={key:2,class:"dm-slider__messages"},Al=["id"],zl=["id"],Rl=A(e.defineComponent({__name:"DatametriaSlider",props:{modelValue:{},min:{default:0},max:{default:100},step:{default:1},label:{},disabled:{type:Boolean},required:{type:Boolean},showValue:{type:Boolean,default:!0},showMinMax:{type:Boolean,default:!1},errorMessage:{},helperText:{},ariaLabel:{},formatter:{}},emits:["update:modelValue","change","input","focus","blur"],setup(t,{expose:n,emit:a}){const o=t,r=a,l=e.ref(),s=e.ref(!1),i=e.computed(()=>`dm-slider-${Math.random().toString(36).substr(2,9)}`),c=e.computed(()=>{const _=o.max-o.min;return(o.modelValue-o.min)/_*100}),d=e.computed(()=>o.formatter?o.formatter(o.modelValue):o.modelValue.toString()),h=e.computed(()=>{const _=[];return o.errorMessage?_.push(`${i.value}-error`):o.helperText&&_.push(`${i.value}-helper`),_.length>0?_.join(" "):void 0}),u=e.computed(()=>o.formatter?o.formatter(o.modelValue):`${o.modelValue}`),f=_=>o.formatter?o.formatter(_):_.toString(),B=_=>{const V=_.target,I=parseFloat(V.value);r("update:modelValue",I),r("input",I)},C=_=>{const V=_.target,I=parseFloat(V.value);r("change",I)},y=_=>{r("focus",_)},E=_=>{r("blur",_)},g=_=>{if(o.disabled)return;const I=_.currentTarget.getBoundingClientRect(),w=(_.clientX-I.left)/I.width,T=o.max-o.min,p=o.min+w*T,m=Math.round(p/o.step)*o.step,S=Math.max(o.min,Math.min(o.max,m));r("update:modelValue",S),r("change",S)},b=_=>{if(o.disabled)return;s.value=!0,_.preventDefault();const V=w=>{if(!s.value)return;const T=_.target.parentElement;if(!T)return;const p=T.getBoundingClientRect(),m=Math.max(0,Math.min(1,(w.clientX-p.left)/p.width)),S=o.max-o.min,k=o.min+m*S,x=Math.round(k/o.step)*o.step,z=Math.max(o.min,Math.min(o.max,x));r("update:modelValue",z),r("input",z)},I=()=>{s.value&&(s.value=!1,r("change",o.modelValue)),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",I)};document.addEventListener("mousemove",V),document.addEventListener("mouseup",I)},$=_=>{if(o.disabled)return;s.value=!0,_.preventDefault();const V=w=>{if(!s.value)return;const T=_.target.parentElement;if(!T)return;const p=T.getBoundingClientRect(),m=w.touches[0],S=Math.max(0,Math.min(1,(m.clientX-p.left)/p.width)),k=o.max-o.min,x=o.min+S*k,z=Math.round(x/o.step)*o.step,j=Math.max(o.min,Math.min(o.max,z));r("update:modelValue",j),r("input",j)},I=()=>{s.value&&(s.value=!1,r("change",o.modelValue)),document.removeEventListener("touchmove",V),document.removeEventListener("touchend",I)};document.addEventListener("touchmove",V),document.addEventListener("touchend",I)};return n({focus:()=>{e.nextTick(()=>{var _;(_=l.value)==null||_.focus()})},blur:()=>{var _;(_=l.value)==null||_.blur()},inputRef:l}),(_,V)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dm-slider",{"dm-slider--disabled":t.disabled}])},[t.label||t.showValue?(e.openBlock(),e.createElementBlock("div",$l,[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:i.value,class:"dm-slider__label"},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",Vl,"*")):e.createCommentVNode("",!0)],8,Cl)):e.createCommentVNode("",!0),t.showValue?(e.openBlock(),e.createElementBlock("span",Sl,e.toDisplayString(d.value),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Dl,[e.createElementVNode("div",{class:"dm-slider__track",onClick:g},[e.createElementVNode("div",{class:"dm-slider__progress",style:e.normalizeStyle({width:`${c.value}%`})},null,4),e.createElementVNode("div",{class:"dm-slider__thumb",style:e.normalizeStyle({left:`${c.value}%`}),onMousedown:b,onTouchstart:$},null,36)]),e.createElementVNode("input",{id:i.value,ref_key:"inputRef",ref:l,type:"range",class:"dm-slider__input",value:t.modelValue,min:t.min,max:t.max,step:t.step,disabled:t.disabled,required:t.required,"aria-label":t.ariaLabel,"aria-describedby":h.value,"aria-valuemin":t.min,"aria-valuemax":t.max,"aria-valuenow":t.modelValue,"aria-valuetext":u.value,onInput:B,onChange:C,onFocus:y,onBlur:E},null,40,Nl)]),t.showMinMax?(e.openBlock(),e.createElementBlock("div",xl,[e.createElementVNode("span",Il,e.toDisplayString(f(t.min)),1),e.createElementVNode("span",Tl,e.toDisplayString(f(t.max)),1)])):e.createCommentVNode("",!0),t.errorMessage||t.helperText?(e.openBlock(),e.createElementBlock("div",Ml,[t.errorMessage?(e.openBlock(),e.createElementBlock("p",{key:0,id:`${i.value}-error`,class:"dm-slider__error",role:"alert"},e.toDisplayString(t.errorMessage),9,Al)):t.helperText?(e.openBlock(),e.createElementBlock("p",{key:1,id:`${i.value}-helper`,class:"dm-slider__helper"},e.toDisplayString(t.helperText),9,zl)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-225b7493"]]),Fl={key:0,class:"datametria-file-upload__required"},Ll=["aria-label","aria-disabled","onKeydown"],Ol=["accept","multiple","disabled","aria-label","aria-required","aria-invalid","aria-describedby"],Pl={key:0,class:"datametria-file-upload__spinner",role:"status","aria-label":"Carregando"},jl={key:1,class:"datametria-file-upload__content"},ql={class:"datametria-file-upload__text"},Hl={class:"datametria-file-upload__primary-text"},Ul={class:"datametria-file-upload__secondary-text"},vl=["aria-valuenow"],Kl={class:"datametria-file-upload__progress-track"},Wl={class:"datametria-file-upload__progress-text"},Gl={key:2,class:"datametria-file-upload__files"},Yl={class:"datametria-file-upload__file-info"},Jl={class:"datametria-file-upload__file-name"},Xl={class:"datametria-file-upload__file-size"},Ql=["onClick"],Zl=["id"],es=A(e.defineComponent({__name:"DatametriaFileUpload",props:{modelValue:{},accept:{},multiple:{type:Boolean,default:!1},maxSize:{},maxFiles:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},progress:{},uploadText:{},error:{},label:{},required:{type:Boolean,default:!1},size:{default:"md"}},emits:["update:modelValue","file-added","file-removed"],setup(t,{emit:n}){const a=t,o=n,{trackEvent:r}=P(),l=e.ref(),s=e.ref(!1),i=e.ref([]),c=e.ref(""),d=`datametria-file-upload-${Math.random().toString(36).substr(2,9)}`,h=e.computed(()=>({"is-disabled":a.disabled,"is-loading":a.loading,"is-error":!!u.value,[`datametria-file-upload--${a.size}`]:!0})),u=e.computed(()=>a.error||c.value),f=()=>{!a.disabled&&l.value&&l.value.click()},B=D=>{const _=D.target;_.files&&b(Array.from(_.files))},C=D=>{var V;if(D.preventDefault(),s.value=!1,a.disabled)return;const _=(V=D.dataTransfer)==null?void 0:V.files;_&&b(Array.from(_))},y=D=>{D.preventDefault()},E=D=>{D.preventDefault(),a.disabled||(s.value=!0)},g=D=>{var _;D.preventDefault(),(_=D.currentTarget)!=null&&_.contains(D.relatedTarget)||(s.value=!1)},b=D=>{if(c.value="",a.accept){const _=a.accept.split(",").map(I=>I.trim()),V=D.filter(I=>!_.some(w=>w.startsWith(".")?I.name.toLowerCase().endsWith(w.toLowerCase()):I.type.match(w.replace("*",".*"))));if(V.length>0){c.value=`Tipo inválido: ${V.map(I=>I.name).join(", ")}`;return}}if(a.maxSize){const _=D.filter(V=>V.size>a.maxSize);if(_.length>0){c.value=`Arquivo muito grande: ${_.map(V=>V.name).join(", ")}`;return}}if(a.multiple){const _=i.value.length+D.length;if(a.maxFiles&&_>a.maxFiles){c.value=`Máximo ${a.maxFiles} arquivos`;return}i.value.push(...D),o("update:modelValue",i.value)}else i.value=[D[0]],o("update:modelValue",D[0]);D.forEach(_=>{o("file-added",_),r("file_upload_added",{component:"DatametriaFileUpload",fileName:_.name,fileSize:_.size,fileType:_.type})})},$=D=>{const _=i.value[D];i.value.splice(D,1),a.multiple?o("update:modelValue",i.value):o("update:modelValue",i.value[0]||null),o("file-removed",_,D),r("file_upload_removed",{component:"DatametriaFileUpload",fileName:_.name})},N=D=>{if(D===0)return"0 Bytes";const _=1024,V=["Bytes","KB","MB","GB"],I=Math.floor(Math.log(D)/Math.log(_));return parseFloat((D/Math.pow(_,I)).toFixed(2))+" "+V[I]};return(D,_)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-file-upload",h.value])},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:d,class:"datametria-file-upload__label"},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",Fl,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["datametria-file-upload__area",{"is-dragover":s.value}]),role:"button","aria-label":t.uploadText||"Upload de arquivo","aria-disabled":t.disabled,tabindex:"0",onClick:f,onKeydown:[e.withKeys(e.withModifiers(f,["prevent"]),["enter"]),e.withKeys(e.withModifiers(f,["prevent"]),["space"])],onDrop:C,onDragover:y,onDragenter:E,onDragleave:g},[e.createElementVNode("input",{id:d,ref_key:"fileInputRef",ref:l,type:"file",class:"datametria-file-upload__input",accept:t.accept,multiple:t.multiple,disabled:t.disabled,"aria-label":t.label||t.uploadText,"aria-required":t.required,"aria-invalid":!!u.value,"aria-describedby":u.value?`${d}-error`:void 0,onChange:B},null,40,Ol),t.loading?(e.openBlock(),e.createElementBlock("div",Pl)):(e.openBlock(),e.createElementBlock("div",jl,[_[0]||(_[0]=e.createElementVNode("div",{class:"datametria-file-upload__icon"},[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})])],-1)),e.createElementVNode("div",ql,[e.createElementVNode("p",Hl,e.toDisplayString(t.uploadText||"Clique para enviar ou arraste e solte"),1),e.createElementVNode("p",Ul,e.toDisplayString(t.accept?`Formatos: ${t.accept}`:"Todos os formatos"),1)])]))],42,Ll),t.progress!==void 0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"datametria-file-upload__progress",role:"progressbar","aria-valuenow":t.progress,"aria-valuemin":"0","aria-valuemax":"100"},[e.createElementVNode("div",Kl,[e.createElementVNode("div",{class:"datametria-file-upload__progress-bar",style:e.normalizeStyle({width:`${t.progress}%`})},null,4)]),e.createElementVNode("span",Wl,e.toDisplayString(t.progress)+"%",1)],8,vl)):e.createCommentVNode("",!0),i.value.length>0?(e.openBlock(),e.createElementBlock("div",Gl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(V,I)=>(e.openBlock(),e.createElementBlock("div",{key:`${V.name}-${I}`,class:"datametria-file-upload__file"},[e.createElementVNode("div",Yl,[e.createElementVNode("span",Jl,e.toDisplayString(V.name),1),e.createElementVNode("span",Xl,e.toDisplayString(N(V.size)),1)]),e.createElementVNode("button",{type:"button",class:"datametria-file-upload__remove","aria-label":"Remover arquivo",onClick:w=>$(I)},"×",8,Ql)]))),128))])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("div",{key:3,id:`${d}-error`,role:"alert","aria-live":"polite",class:"datametria-file-upload__error"},e.toDisplayString(u.value),9,Zl)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-e2249dca"]]),ts=["accept","multiple","disabled"],as={key:1,class:"datametria-upload__button"},ns=["disabled"],os=["accept","multiple","disabled"],rs={key:2,class:"datametria-upload__list"},ls=["src"],ss={class:"datametria-upload__info"},is={class:"datametria-upload__name"},cs={class:"datametria-upload__size"},ds={key:1,class:"datametria-upload__progress"},ms=["onClick"],ps=A(e.defineComponent({__name:"DatametriaUpload",props:{modelValue:{default:()=>[]},action:{default:""},accept:{default:""},multiple:{type:Boolean,default:!1},limit:{default:0},maxSize:{default:0},drag:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change","exceed","error","success"],setup(t,{expose:n,emit:a}){const o=t,r=a,l=e.ref(),s=e.ref(!1),i=e.ref(o.modelValue);let c=0;const d=()=>{var g;(g=l.value)==null||g.click()},h=g=>{const b=g.target,$=Array.from(b.files||[]);f($),b.value=""},u=g=>{var $;s.value=!1;const b=Array.from((($=g.dataTransfer)==null?void 0:$.files)||[]);f(b)},f=g=>{if(!o.disabled){if(o.limit&&i.value.length+g.length>o.limit){r("exceed",g);return}g.forEach(b=>{if(o.maxSize&&b.size>o.maxSize){r("error",new Error("File size exceeds limit"),b);return}if(o.accept&&!B(b)){r("error",new Error("Invalid file type"),b);return}const $={uid:`upload-${Date.now()}-${c++}`,name:b.name,size:b.size,status:"ready",progress:0,raw:b};if(b.type.startsWith("image/")){const N=new FileReader;N.onload=D=>{var _;$.preview=(_=D.target)==null?void 0:_.result},N.readAsDataURL(b)}i.value.push($),o.action&&($.status="uploading",C($))}),r("update:modelValue",i.value),r("change",i.value)}},B=g=>o.accept.split(",").map($=>$.trim()).some($=>$.startsWith(".")?g.name.toLowerCase().endsWith($.toLowerCase()):$.endsWith("/*")?g.type.startsWith($.replace("/*","")):g.type===$),C=g=>{const b=setInterval(()=>{g.progress+=10,g.progress>=100&&(clearInterval(b),g.status="success",r("success",{status:"success"},g))},100)},y=g=>{const b=i.value.indexOf(g);b>-1&&(i.value.splice(b,1),r("update:modelValue",i.value),r("change",i.value))},E=g=>{if(g===0)return"0 B";const b=1024,$=["B","KB","MB","GB"],N=Math.floor(Math.log(g)/Math.log(b));return`${(g/Math.pow(b,N)).toFixed(2)} ${$[N]}`};return n({clearFiles:()=>{i.value=[],r("update:modelValue",[])}}),(g,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-upload",{"datametria-upload--disabled":t.disabled}])},[t.drag?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["datametria-upload__drag",{"datametria-upload__drag--over":s.value}]),onDrop:e.withModifiers(u,["prevent"]),onDragover:b[0]||(b[0]=e.withModifiers($=>s.value=!0,["prevent"])),onDragleave:b[1]||(b[1]=e.withModifiers($=>s.value=!1,["prevent"]))},[e.renderSlot(g.$slots,"trigger",{},()=>[b[2]||(b[2]=e.createElementVNode("div",{class:"datametria-upload__drag-content"},[e.createElementVNode("span",null,"Arraste arquivos aqui ou clique para selecionar")],-1))],!0),e.createElementVNode("input",{ref_key:"inputRef",ref:l,type:"file",class:"datametria-upload__input",accept:t.accept,multiple:t.multiple,disabled:t.disabled,onChange:h},null,40,ts)],34)):(e.openBlock(),e.createElementBlock("div",as,[e.renderSlot(g.$slots,"trigger",{},()=>[e.createElementVNode("button",{type:"button",disabled:t.disabled,onClick:d}," Selecionar arquivo ",8,ns)],!0),e.createElementVNode("input",{ref_key:"inputRef",ref:l,type:"file",class:"datametria-upload__input",accept:t.accept,multiple:t.multiple,disabled:t.disabled,onChange:h},null,40,os)])),i.value.length?(e.openBlock(),e.createElementBlock("div",rs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,$=>(e.openBlock(),e.createElementBlock("div",{key:$.uid,class:"datametria-upload__item"},[$.preview?(e.openBlock(),e.createElementBlock("img",{key:0,src:$.preview,class:"datametria-upload__preview",alt:"preview"},null,8,ls)):e.createCommentVNode("",!0),e.createElementVNode("div",ss,[e.createElementVNode("span",is,e.toDisplayString($.name),1),e.createElementVNode("span",cs,e.toDisplayString(E($.size)),1)]),$.status==="uploading"?(e.openBlock(),e.createElementBlock("div",ds,[e.createElementVNode("div",{class:"datametria-upload__progress-bar",style:e.normalizeStyle({width:`${$.progress}%`})},null,4)])):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"datametria-upload__remove",onClick:N=>y($)}," × ",8,ms)]))),128))])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-b670d16b"]]),us=["aria-expanded","placeholder","disabled","onKeydown"],fs=["onMousedown","onMouseenter"],hs=["innerHTML"],gs=A(e.defineComponent({__name:"DatametriaAutocomplete",props:{modelValue:{default:""},fetchSuggestions:{},debounce:{default:300},triggerOnFocus:{type:Boolean,default:!1},placeholder:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","select"],setup(t,{emit:n}){const a=t,o=n,r=e.ref(),l=e.ref(),s=e.ref(a.modelValue),i=e.ref([]),c=e.ref(!1),d=e.ref(-1),h=e.ref(!1);let u=null;const f=e.computed(()=>{if(!r.value)return{};const V=r.value.getBoundingClientRect();return{position:"fixed",top:`${V.bottom+4}px`,left:`${V.left}px`,width:`${V.width}px`,zIndex:9999}}),B=()=>{o("update:modelValue",s.value),u&&clearTimeout(u),u=setTimeout(()=>{E()},a.debounce)},C=()=>{a.triggerOnFocus&&s.value&&E()},y=()=>{setTimeout(()=>{c.value=!1,d.value=-1},200)},E=async()=>{if(!s.value){i.value=[],c.value=!1;return}h.value=!0;try{const V=await a.fetchSuggestions(s.value);i.value=V,c.value=V.length>0,d.value=-1}catch{i.value=[],c.value=!1}finally{h.value=!1}},g=V=>{s.value=V,o("update:modelValue",V),o("select",V),c.value=!1,d.value=-1},b=()=>{d.value<i.value.length-1&&d.value++},$=()=>{d.value>0&&d.value--},N=()=>{d.value>=0&&d.value<i.value.length&&g(i.value[d.value])},D=V=>{if(!s.value)return V;const I=new RegExp(`(${_(s.value)})`,"gi");return V.replace(I,"<strong>$1</strong>")},_=V=>V.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return e.watch(()=>a.modelValue,V=>{V!==s.value&&(s.value=V)}),(V,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-autocomplete",{"datametria-autocomplete--disabled":t.disabled}])},[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:r,"onUpdate:modelValue":I[0]||(I[0]=w=>s.value=w),type:"text",role:"combobox","aria-expanded":c.value,"aria-autocomplete":"list",class:"datametria-autocomplete__input",placeholder:t.placeholder,disabled:t.disabled,onInput:B,onFocus:C,onBlur:y,onKeydown:[e.withKeys(e.withModifiers(b,["prevent"]),["down"]),e.withKeys(e.withModifiers($,["prevent"]),["up"]),e.withKeys(e.withModifiers(N,["prevent"]),["enter"])]},null,40,us),[[e.vModelText,s.value]]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[c.value&&i.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:l,class:"datametria-autocomplete__dropdown",style:e.normalizeStyle(f.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(w,T)=>(e.openBlock(),e.createElementBlock("div",{key:T,class:e.normalizeClass(["datametria-autocomplete__item",{"datametria-autocomplete__item--active":T===d.value}]),onMousedown:e.withModifiers(p=>g(w),["prevent"]),onMouseenter:p=>d.value=T},[e.createElementVNode("span",{innerHTML:D(w)},null,8,hs)],42,fs))),128))],4)):e.createCommentVNode("",!0)]))],2))}}),[["__scopeId","data-v-5ea22e1c"]]),bs=A(e.defineComponent({__name:"DatametriaForm",props:{model:{default:()=>({})},rules:{default:()=>({})},labelWidth:{},labelPosition:{default:"right"},inline:{type:Boolean,default:!1}},emits:["validate","submit"],setup(t,{expose:n,emit:a}){const o=t,r=a,l=e.reactive(new Map),s=e.ref({}),i=C=>{l.set(C.prop,C)},c=C=>{l.delete(C)},d=async()=>{const C=[],y={};l.forEach(b=>{C.push(b.validate().then($=>(!$&&b.errorMessage&&(y[b.prop]=[b.errorMessage]),$)))});const g=(await Promise.all(C)).every(b=>b);return s.value=y,r("validate",g,y),g},h=async C=>{const y=l.get(C);if(!y)return!0;const E=await y.validate();return!E&&y.errorMessage?s.value[C]=[y.errorMessage]:delete s.value[C],E},u=()=>{l.forEach(C=>{C.reset()}),s.value={}},f=C=>{if(!C){s.value={},l.forEach(E=>E.clearValidate());return}(Array.isArray(C)?C:[C]).forEach(E=>{delete s.value[E];const g=l.get(E);g&&g.clearValidate()})},B=async()=>{await d()&&r("submit",o.model)};return e.provide("datametriaForm",{model:o.model,rules:o.rules,labelWidth:o.labelWidth,labelPosition:o.labelPosition,registerField:i,unregisterField:c,validateField:h}),n({validate:d,validateField:h,resetFields:u,clearValidate:f}),(C,y)=>(e.openBlock(),e.createElementBlock("form",{class:e.normalizeClass(["datametria-form",{[`datametria-form--label-${t.labelPosition}`]:t.labelPosition,"datametria-form--inline":t.inline}]),onSubmit:e.withModifiers(B,["prevent"])},[e.renderSlot(C.$slots,"default",{},void 0,!0)],34))}}),[["__scopeId","data-v-0ad44036"]]),It=t=>!!t,Tt=t=>t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t):!0,Mt=t=>n=>n?n.length>=t:!0,At=t=>n=>n?n.length<=t:!0,zt=t=>n=>n?t.test(n):!0,Rt=t=>n=>t(n);function Ft(){return{required:It,email:Tt,minLength:Mt,maxLength:At,pattern:zt,custom:Rt}}const ks={class:"datametria-form-item__content"},ys={key:0,class:"datametria-form-item__error"},_s=A(e.defineComponent({__name:"DatametriaFormItem",props:{prop:{},label:{},rules:{},required:{type:Boolean}},setup(t,{expose:n}){const a=t,o=e.inject("datametriaForm",null),r=e.ref(""),l=e.computed(()=>a.required?!0:a.rules?a.rules.some(u=>u.required):!1),s=e.computed(()=>o!=null&&o.labelWidth?{width:o.labelWidth}:{}),i=e.computed(()=>{if(!(!(o!=null&&o.model)||!a.prop))return o.model[a.prop]}),c=async()=>{if(!a.prop||!a.rules)return!0;const u=Ft(),f=[];for(const B of a.rules)if(B.required&&!u.required(i.value)){f.push(B.message||"Campo obrigatório");break}return f.length>0?(r.value=f[0],!1):(r.value="",!0)},d=()=>{r.value="",o!=null&&o.model&&a.prop&&(o.model[a.prop]=void 0)},h=()=>{r.value=""};return e.watch(i,()=>{r.value&&c()}),e.onMounted(()=>{o&&a.prop&&o.registerField({prop:a.prop,validate:c,reset:d,clearValidate:h,get errorMessage(){return r.value}})}),e.onBeforeUnmount(()=>{o&&a.prop&&o.unregisterField(a.prop)}),n({validate:c,reset:d,clearValidate:h,errorMessage:r}),(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-form-item",{"is-error":r.value,"is-required":l.value}])},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:"datametria-form-item__label",style:e.normalizeStyle(s.value)},e.toDisplayString(t.label),5)):e.createCommentVNode("",!0),e.createElementVNode("div",ks,[e.renderSlot(u.$slots,"default",{},void 0,!0),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",ys,e.toDisplayString(r.value),1)):e.createCommentVNode("",!0)]),_:1})])],2))}}),[["__scopeId","data-v-1bd3b9d8"]]),Bs={key:0,class:"datametria-card__header"},Es={class:"datametria-card__title"},ws={class:"datametria-card__content"},$s={key:1,class:"datametria-card__footer"},Cs=A(e.defineComponent({__name:"DatametriaCard",props:{title:{},padding:{type:Boolean,default:!0}},setup(t){const n=t,a=e.computed(()=>["datametria-card",{"datametria-card--no-padding":!n.padding}]);return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(a.value)},[t.title||o.$slots.header?(e.openBlock(),e.createElementBlock("div",Bs,[e.renderSlot(o.$slots,"header",{},()=>[e.createElementVNode("h3",Es,e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",ws,[e.renderSlot(o.$slots,"default",{},void 0,!0)]),o.$slots.footer?(e.openBlock(),e.createElementBlock("div",$s,[e.renderSlot(o.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-573dc7c3"]]),Vs={key:0,class:"datametria-dialog__header"},Ss={class:"datametria-dialog__body"},Ds={key:1,class:"datametria-dialog__footer"},Ns=A(e.defineComponent({__name:"DatametriaDialog",props:{modelValue:{type:Boolean},title:{default:""},width:{default:"50%"},fullscreen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},center:{type:Boolean,default:!1},beforeClose:{}},emits:["update:modelValue","open","opened","close","closed"],setup(t,{emit:n}){const a=t,o=n,r=`dialog-title-${Math.random().toString(36).substr(2,9)}`,l=e.computed(()=>({"datametria-dialog--fullscreen":a.fullscreen,"datametria-dialog--center":a.center})),s=e.computed(()=>a.fullscreen?{}:{width:typeof a.width=="number"?`${a.width}px`:a.width}),i=()=>{a.beforeClose?a.beforeClose(()=>{o("update:modelValue",!1),o("close")}):(o("update:modelValue",!1),o("close"))},c=()=>{a.closeOnClickModal&&i()},d=h=>{h.key==="Escape"&&a.closeOnPressEscape&&a.modelValue&&i()};return e.watch(()=>a.modelValue,h=>{h?(o("open"),document.body.style.overflow="hidden",setTimeout(()=>o("opened"),300)):(document.body.style.overflow="",setTimeout(()=>o("closed"),300))}),e.onMounted(()=>{document.addEventListener("keydown",d)}),e.onUnmounted(()=>{document.removeEventListener("keydown",d),document.body.style.overflow=""}),(h,u)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"dialog-fade"},{default:e.withCtx(()=>[t.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["datametria-dialog-overlay",{"datametria-dialog-overlay--modal":t.modal}]),onClick:c},[e.createElementVNode("div",{class:e.normalizeClass(["datametria-dialog",l.value]),style:e.normalizeStyle(s.value),role:"dialog","aria-modal":"true","aria-labelledby":r,onClick:u[0]||(u[0]=e.withModifiers(()=>{},["stop"]))},[h.$slots.header||t.title?(e.openBlock(),e.createElementBlock("div",Vs,[e.renderSlot(h.$slots,"header",{},()=>[e.createElementVNode("h3",{id:r,class:"datametria-dialog__title"},e.toDisplayString(t.title),1)],!0),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:"datametria-dialog__close","aria-label":"Fechar",onClick:i}," × ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ss,[e.renderSlot(h.$slots,"default",{},void 0,!0)]),h.$slots.footer?(e.openBlock(),e.createElementBlock("div",Ds,[e.renderSlot(h.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],6)],2)):e.createCommentVNode("",!0)]),_:3})]))}}),[["__scopeId","data-v-99282679"]]),xs={key:0,class:"datametria-modal__header"},Is={class:"datametria-modal__title"},Ts={class:"datametria-modal__body"},Ms={key:1,class:"datametria-modal__footer"},As=A(e.defineComponent({__name:"DatametriaModal",props:{modelValue:{type:Boolean},title:{},size:{default:"32rem"},closable:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(t,{emit:n}){const a=t,o=n,r=()=>{a.closable&&(o("update:modelValue",!1),o("close"))};return(l,s)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:"datametria-modal",onClick:e.withModifiers(r,["self"])},[e.createElementVNode("div",{class:"datametria-modal__content",style:e.normalizeStyle({maxWidth:t.size})},[t.title||l.$slots.header?(e.openBlock(),e.createElementBlock("div",xs,[e.renderSlot(l.$slots,"header",{},()=>[e.createElementVNode("h3",Is,e.toDisplayString(t.title),1)],!0),t.closable?(e.openBlock(),e.createElementBlock("button",{key:0,class:"datametria-modal__close",onClick:r}," × ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ts,[e.renderSlot(l.$slots,"default",{},void 0,!0)]),l.$slots.footer?(e.openBlock(),e.createElementBlock("div",Ms,[e.renderSlot(l.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],4)])):e.createCommentVNode("",!0)]),_:3})]))}}),[["__scopeId","data-v-4316db1d"]]),zs=A(e.defineComponent({__name:"DatametriaContainer",props:{size:{default:"lg"},fluid:{type:Boolean,default:!1}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dm-container",[`dm-container--${t.size}`,{"dm-container--fluid":t.fluid}]])},[e.renderSlot(n.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-0cb48889"]]),Rs=A(e.defineComponent({__name:"DatametriaGrid",props:{cols:{default:12},gap:{default:"var(--dm-spacing-4, 1rem)"}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:"dm-grid",style:e.normalizeStyle({"--dm-grid-cols":t.cols,"--dm-grid-gap":t.gap})},[e.renderSlot(n.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-2354cb08"]]),Fs=["role","aria-orientation"],Ls={key:0,class:"dm-divider__label"},Os=A(e.defineComponent({__name:"DatametriaDivider",props:{orientation:{default:"horizontal"},dashed:{type:Boolean,default:!1},label:{}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dm-divider",[`dm-divider--${t.orientation}`,{"dm-divider--dashed":t.dashed}]]),role:t.orientation==="horizontal"?"separator":void 0,"aria-orientation":t.orientation},[n.$slots.default||t.label?(e.openBlock(),e.createElementBlock("span",Ls,[e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)])):e.createCommentVNode("",!0)],10,Fs))}}),[["__scopeId","data-v-cb028b57"]]),Ps={class:"datametria-alert__icon"},js={key:0},qs={key:1},Hs={key:2},Us={key:3},vs={class:"datametria-alert__content"},Ks={key:0,class:"datametria-alert__title"},Ws={class:"datametria-alert__message"},Gs=A(e.defineComponent({__name:"DatametriaAlert",props:{modelValue:{type:Boolean,default:!0},variant:{default:"info"},title:{},message:{},closable:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t){const n=t;if(process.env.NODE_ENV==="development"){const o=["success","error","warning","info","primary"];o.includes(n.variant)||console.warn(`[DatametriaAlert] Invalid variant "${n.variant}". Valid options: ${o.join(", ")}`)}const a=e.computed(()=>["datametria-alert",`datametria-alert--${n.variant}`]);return(o,r)=>t.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.value)},[e.createElementVNode("div",Ps,[t.variant==="success"?(e.openBlock(),e.createElementBlock("span",js,"✓")):t.variant==="error"?(e.openBlock(),e.createElementBlock("span",qs,"✕")):t.variant==="warning"?(e.openBlock(),e.createElementBlock("span",Hs,"⚠")):(e.openBlock(),e.createElementBlock("span",Us,"ℹ"))]),e.createElementVNode("div",vs,[t.title?(e.openBlock(),e.createElementBlock("h4",Ks,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.createElementVNode("p",Ws,[e.renderSlot(o.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.message),1)],!0)])]),t.closable?(e.openBlock(),e.createElementBlock("button",{key:0,class:"datametria-alert__close",onClick:r[0]||(r[0]=l=>o.$emit("update:modelValue",!1))}," × ")):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-e169b31d"]]),Ys=["aria-live"],Js={class:"dm-toast__content"},Xs={class:"dm-toast__message"},Qs=A(e.defineComponent({__name:"DatametriaToast",props:{message:{},variant:{default:"info"},duration:{default:3e3},closable:{type:Boolean,default:!0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue","close"],setup(t,{emit:n}){const a=t;if(process.env.NODE_ENV==="development"){const c=["success","error","warning","info","primary"];c.includes(a.variant)||console.warn(`[DatametriaToast] Invalid variant "${a.variant}". Valid options: ${c.join(", ")}`)}const o=n,r=e.ref(a.modelValue);let l=null;e.watch(()=>a.modelValue,c=>{r.value=c,c&&a.duration>0&&s()});const s=()=>{l&&clearTimeout(l),l=setTimeout(()=>{i()},a.duration)},i=()=>{r.value=!1,o("update:modelValue",!1),o("close"),l&&clearTimeout(l)};return e.onMounted(()=>{r.value&&a.duration>0&&s()}),(c,d)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"dm-toast"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dm-toast",`dm-toast--${t.variant}`]),role:"alert","aria-live":t.variant==="error"?"assertive":"polite"},[e.createElementVNode("div",Js,[e.createElementVNode("span",Xs,e.toDisplayString(t.message),1),t.closable?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dm-toast__close",onClick:i,"aria-label":"Fechar"},"×")):e.createCommentVNode("",!0)])],10,Ys)):e.createCommentVNode("",!0)]),_:1})]))}}),[["__scopeId","data-v-c070d8e2"]]),Zs=["id","aria-hidden"],ei={class:"dm-tooltip__content"},ti={key:0,class:"dm-tooltip__arrow"},ai=A(e.defineComponent({__name:"DatametriaTooltip",props:{content:{},placement:{default:"top"},variant:{default:"dark"},trigger:{default:"hover"},disabled:{type:Boolean},showArrow:{type:Boolean,default:!0},delay:{default:100},hideDelay:{default:100},offset:{default:8},maxWidth:{default:"200px"}},emits:["show","hide"],setup(t,{expose:n,emit:a}){const o=t,r=a,l=e.ref(),s=e.ref(),i=e.ref(!1),c=e.ref(),d=e.ref(),h=e.computed(()=>`dm-tooltip-${Math.random().toString(36).substr(2,9)}`),u=e.ref({}),f=async()=>{if(!l.value||!s.value)return;await e.nextTick();const I=l.value.getBoundingClientRect(),w=s.value.getBoundingClientRect(),T={width:window.innerWidth,height:window.innerHeight};let p=0,m=0;switch(o.placement){case"top":case"top-start":case"top-end":p=I.top-w.height-o.offset;break;case"bottom":case"bottom-start":case"bottom-end":p=I.bottom+o.offset;break;case"left":p=I.top+(I.height-w.height)/2,m=I.left-w.width-o.offset;break;case"right":p=I.top+(I.height-w.height)/2,m=I.right+o.offset;break}if(o.placement.startsWith("top")||o.placement.startsWith("bottom"))switch(o.placement){case"top":case"bottom":m=I.left+(I.width-w.width)/2;break;case"top-start":case"bottom-start":m=I.left;break;case"top-end":case"bottom-end":m=I.right-w.width;break}m<0?m=8:m+w.width>T.width&&(m=T.width-w.width-8),p<0?p=8:p+w.height>T.height&&(p=T.height-w.height-8),u.value={position:"fixed",top:`${p}px`,left:`${m}px`,maxWidth:o.maxWidth,zIndex:"9999"}},B=()=>{o.disabled||i.value||(clearTimeout(d.value),c.value=window.setTimeout(async()=>{i.value=!0,r("show"),await f()},o.delay))},C=()=>{clearTimeout(c.value),d.value=window.setTimeout(()=>{i.value=!1,r("hide")},o.hideDelay)},y=()=>{o.trigger==="hover"&&B()},E=()=>{o.trigger==="hover"&&C()},g=()=>{o.trigger==="focus"&&B()},b=()=>{o.trigger==="focus"&&C()},$=()=>{o.trigger==="click"&&(i.value?C():B())},N=()=>{f()},D=()=>{u.value={}},_=()=>{i.value&&f()},V=()=>{i.value&&f()};return e.onMounted(()=>{window.addEventListener("resize",_),window.addEventListener("scroll",V,!0)}),e.onUnmounted(()=>{clearTimeout(c.value),clearTimeout(d.value),window.removeEventListener("resize",_),window.removeEventListener("scroll",V,!0)}),n({show:B,hide:C,isVisible:e.computed(()=>i.value)}),(I,w)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"triggerRef",ref:l,class:"dm-tooltip-trigger",onMouseenter:y,onMouseleave:E,onFocus:g,onBlur:b,onClick:$},[e.renderSlot(I.$slots,"default",{},void 0,!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"tooltip",onEnter:N,onLeave:D},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"tooltipRef",ref:s,id:h.value,class:e.normalizeClass(["dm-tooltip",[`dm-tooltip--${t.placement}`,`dm-tooltip--${t.variant}`,{"dm-tooltip--arrow":t.showArrow}]]),style:e.normalizeStyle(u.value),role:"tooltip","aria-hidden":!i.value},[e.createElementVNode("div",ei,[e.renderSlot(I.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)],!0)]),t.showArrow?(e.openBlock(),e.createElementBlock("div",ti)):e.createCommentVNode("",!0)],14,Zs)):e.createCommentVNode("",!0)]),_:3})]))],544))}}),[["__scopeId","data-v-fbebad65"]]),ni=["aria-label"],oi={key:0,class:"datametria-skeleton__text"},ri={key:1,class:"datametria-skeleton__avatar shimmer"},li={key:2,class:"datametria-skeleton__card"},si={key:3,class:"datametria-skeleton__button shimmer"},ii={key:4,class:"datametria-skeleton__custom shimmer"},ci=A(e.defineComponent({__name:"DatametriaSkeleton",props:{variant:{default:"text"},width:{},height:{},lines:{default:3},animated:{type:Boolean,default:!0},ariaLabel:{default:"Carregando conteúdo..."},lastLineWidth:{default:75}},setup(t){const n=t,a=e.computed(()=>{const r={};return n.width&&(r.width=typeof n.width=="number"?`${n.width}px`:n.width),n.height&&(r.height=typeof n.height=="number"?`${n.height}px`:n.height),r}),o=r=>({width:r===n.lines?`${n.lastLineWidth}%`:"100%",marginBottom:r<n.lines?"0.5rem":"0"});return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-skeleton",[`datametria-skeleton--${t.variant}`,{"datametria-skeleton--animated":t.animated}]]),style:e.normalizeStyle(a.value),"aria-label":t.ariaLabel,role:"status","aria-live":"polite"},[t.variant==="text"?(e.openBlock(),e.createElementBlock("div",oi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lines,s=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"datametria-skeleton__line shimmer",style:e.normalizeStyle(o(s))},null,4))),128))])):t.variant==="avatar"?(e.openBlock(),e.createElementBlock("div",ri)):t.variant==="card"?(e.openBlock(),e.createElementBlock("div",li,[...l[0]||(l[0]=[e.createStaticVNode('<div class="datametria-skeleton__card-header shimmer" data-v-9633d1ce></div><div class="datametria-skeleton__card-content" data-v-9633d1ce><div class="datametria-skeleton__line shimmer" style="width:100%;" data-v-9633d1ce></div><div class="datametria-skeleton__line shimmer" style="width:80%;" data-v-9633d1ce></div><div class="datametria-skeleton__line shimmer" style="width:60%;" data-v-9633d1ce></div></div>',2)])])):t.variant==="button"?(e.openBlock(),e.createElementBlock("div",si)):(e.openBlock(),e.createElementBlock("div",ii))],14,ni))}}),[["__scopeId","data-v-9633d1ce"]]),di={key:0,class:"datametria-progress-bar"},mi={key:0,class:"datametria-progress-bar__innerText"},pi={key:0,class:"datametria-progress__text"},ui={key:1,class:"datametria-progress-circle"},fi=["width","height"],hi=["d","stroke-width"],gi=["d","stroke-width","stroke-dasharray","stroke-dashoffset"],bi={key:0,class:"datametria-progress__text"},ki=A(e.defineComponent({__name:"DatametriaProgress",props:{percentage:{default:0},type:{default:"line"},status:{default:""},strokeWidth:{default:6},showText:{type:Boolean,default:!0},textInside:{type:Boolean,default:!1},width:{default:126}},setup(t){const n=t,a=e.computed(()=>({[`datametria-progress--${n.type}`]:!0,[`datametria-progress--${n.status}`]:n.status,"datametria-progress--text-inside":n.textInside})),o=e.computed(()=>({width:`${n.percentage}%`,backgroundColor:r.value})),r=e.computed(()=>({success:"var(--datametria-success-color, #67c23a)",warning:"var(--datametria-warning-color, #e6a23c)",error:"var(--datametria-error-color, #f56c6c)","":"var(--datametria-primary-color, #0072ce)"})[n.status]),l=e.computed(()=>n.width),s=e.computed(()=>(n.strokeWidth/n.width*100).toFixed(1)),i=e.computed(()=>(n.type==="circle",50-parseFloat(s.value)/2)),c=e.computed(()=>{const f=i.value;return n.type==="dashboard"?`M 50 50 m 0 ${f} a ${f} ${f} 0 1 1 0 -${f*2} a ${f} ${f} 0 1 1 0 ${f*2}`:`M 50 50 m 0 -${f} a ${f} ${f} 0 1 1 0 ${f*2} a ${f} ${f} 0 1 1 0 -${f*2}`}),d=e.computed(()=>2*Math.PI*i.value),h=e.computed(()=>{const f=n.type==="dashboard"?.75:1;return d.value*(1-n.percentage/100)*f}),u=e.computed(()=>({stroke:r.value,strokeLinecap:"round"}));return(f,B)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-progress",a.value])},[t.type==="line"?(e.openBlock(),e.createElementBlock("div",di,[e.createElementVNode("div",{class:"datametria-progress-bar__outer",style:e.normalizeStyle({height:`${t.strokeWidth}px`})},[e.createElementVNode("div",{class:"datametria-progress-bar__inner",style:e.normalizeStyle(o.value)},[t.showText&&t.textInside?(e.openBlock(),e.createElementBlock("div",mi,e.toDisplayString(t.percentage)+"% ",1)):e.createCommentVNode("",!0)],4)],4),t.showText&&!t.textInside?(e.openBlock(),e.createElementBlock("div",pi,[e.renderSlot(f.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.percentage)+"%",1)],!0)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",ui,[(e.openBlock(),e.createElementBlock("svg",{width:l.value,height:l.value,viewBox:"0 0 100 100"},[e.createElementVNode("path",{class:"datametria-progress-circle__track",d:c.value,"stroke-width":s.value,fill:"none"},null,8,hi),e.createElementVNode("path",{class:"datametria-progress-circle__path",d:c.value,"stroke-width":s.value,"stroke-dasharray":d.value,"stroke-dashoffset":h.value,style:e.normalizeStyle(u.value),fill:"none"},null,12,gi)],8,fi)),t.showText?(e.openBlock(),e.createElementBlock("div",bi,[e.renderSlot(f.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.percentage)+"%",1)],!0)])):e.createCommentVNode("",!0)]))],2))}}),[["__scopeId","data-v-30852c74"]]),yi={class:"datametria-result__icon"},_i={key:0,viewBox:"0 0 48 48",fill:"none"},Bi={key:1,viewBox:"0 0 48 48",fill:"none"},Ei={key:2,viewBox:"0 0 48 48",fill:"none"},wi={key:3,viewBox:"0 0 48 48",fill:"none"},$i={class:"datametria-result__title"},Ci={key:0,class:"datametria-result__subtitle"},Vi={key:1,class:"datametria-result__extra"},Si=A(e.defineComponent({__name:"DatametriaResult",props:{status:{default:"info"},title:{default:""},subtitle:{default:""}},setup(t){const n=t,a=e.computed(()=>({[`datametria-result--${n.status}`]:!0}));return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-result",a.value])},[e.createElementVNode("div",yi,[e.renderSlot(o.$slots,"icon",{},()=>[t.status==="success"?(e.openBlock(),e.createElementBlock("svg",_i,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M24 4C12.96 4 4 12.96 4 24s8.96 20 20 20 20-8.96 20-20S35.04 4 24 4zm-4 30L10 24l2.83-2.83L20 28.34l15.17-15.17L38 16 20 34z",fill:"currentColor"},null,-1)])])):t.status==="warning"?(e.openBlock(),e.createElementBlock("svg",Bi,[...r[1]||(r[1]=[e.createElementVNode("path",{d:"M2 42h44L24 4 2 42zm24-6h-4v-4h4v4zm0-8h-4v-8h4v8z",fill:"currentColor"},null,-1)])])):t.status==="error"?(e.openBlock(),e.createElementBlock("svg",Ei,[...r[2]||(r[2]=[e.createElementVNode("path",{d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z",fill:"currentColor"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",wi,[...r[3]||(r[3]=[e.createElementVNode("path",{d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm2 30h-4v-4h4v4zm0-8h-4V14h4v12z",fill:"currentColor"},null,-1)])]))],!0)]),e.createElementVNode("div",$i,[e.renderSlot(o.$slots,"title",{},()=>[e.createElementVNode("p",null,e.toDisplayString(t.title),1)],!0)]),t.subtitle||o.$slots.subtitle?(e.openBlock(),e.createElementBlock("div",Ci,[e.renderSlot(o.$slots,"subtitle",{},()=>[e.createElementVNode("p",null,e.toDisplayString(t.subtitle),1)],!0)])):e.createCommentVNode("",!0),o.$slots.extra?(e.openBlock(),e.createElementBlock("div",Vi,[e.renderSlot(o.$slots,"extra",{},void 0,!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-3cbcd903"]]),Di={class:"datametria-popconfirm__content"},Ni={class:"datametria-popconfirm__message"},xi={class:"datametria-popconfirm__actions"},Ii=A(e.defineComponent({__name:"DatametriaPopconfirm",props:{title:{default:"Tem certeza?"},confirmButtonText:{default:"Confirmar"},cancelButtonText:{default:"Cancelar"},placement:{default:"top"}},emits:["confirm","cancel"],setup(t,{emit:n}){const a=t,o=n,r=e.ref(!1),l=e.ref(),s=e.ref(),i=e.ref(),c=e.ref({position:"absolute",top:"0px",left:"0px"}),d=()=>{r.value=!r.value,r.value&&B()},h=()=>{r.value=!1,o("confirm")},u=()=>{r.value=!1,o("cancel")},f=C=>{if(!r.value)return;const y=C.target;s.value&&!s.value.contains(y)&&l.value&&!l.value.contains(y)&&(r.value=!1)},B=()=>{if(!l.value||!s.value)return;const C=l.value.getBoundingClientRect(),y=s.value.getBoundingClientRect();let E=0,g=0;switch(a.placement){case"top":E=C.top-y.height-8,g=C.left+(C.width-y.width)/2;break;case"bottom":E=C.bottom+8,g=C.left+(C.width-y.width)/2;break;case"left":E=C.top+(C.height-y.height)/2,g=C.left-y.width-8;break;case"right":E=C.top+(C.height-y.height)/2,g=C.right+8;break}c.value={position:"absolute",top:`${E+window.scrollY}px`,left:`${g+window.scrollX}px`}};return e.onMounted(()=>{document.addEventListener("click",f)}),e.onUnmounted(()=>{document.removeEventListener("click",f)}),(C,y)=>(e.openBlock(),e.createElementBlock("div",{class:"datametria-popconfirm",ref_key:"popconfirmRef",ref:i},[e.createElementVNode("div",{ref_key:"triggerRef",ref:l,onClick:d},[e.renderSlot(C.$slots,"default",{},void 0,!0)],512),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"popoverRef",ref:s,class:"datametria-popconfirm__popover",style:e.normalizeStyle(c.value)},[e.createElementVNode("div",Di,[y[0]||(y[0]=e.createElementVNode("div",{class:"datametria-popconfirm__icon"},[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none"},[e.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z",fill:"currentColor"})])],-1)),e.createElementVNode("div",Ni,e.toDisplayString(t.title),1)]),e.createElementVNode("div",xi,[e.createElementVNode("button",{class:"datametria-popconfirm__btn datametria-popconfirm__btn--cancel",onClick:u},e.toDisplayString(t.cancelButtonText),1),e.createElementVNode("button",{class:"datametria-popconfirm__btn datametria-popconfirm__btn--confirm",onClick:h},e.toDisplayString(t.confirmButtonText),1)])],4)):e.createCommentVNode("",!0)]))],512))}}),[["__scopeId","data-v-01f460e4"]]),Ti=["aria-label"],Mi={key:0,class:"dm-spinner__label"},Ai=A(e.defineComponent({__name:"DatametriaSpinner",props:{size:{default:"md"},variant:{default:"primary"},label:{},ariaLabel:{default:"Carregando"}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dm-spinner",[`dm-spinner--${t.size}`,`dm-spinner--${t.variant}`]]),role:"status","aria-label":t.ariaLabel},[a[0]||(a[0]=e.createElementVNode("svg",{class:"dm-spinner__svg",viewBox:"0 0 50 50"},[e.createElementVNode("circle",{class:"dm-spinner__circle",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"4"})],-1)),t.label?(e.openBlock(),e.createElementBlock("span",Mi,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0)],10,Ti))}}),[["__scopeId","data-v-0e7cecde"]]),zi={class:"datametria-table"},Ri={class:"datametria-table__table"},Fi={class:"datametria-table__thead"},Li={class:"datametria-table__tbody"},Oi={key:0,class:"datametria-table__empty"},Pi=A(e.defineComponent({__name:"DatametriaTable",props:{columns:{},data:{}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("div",zi,[e.createElementVNode("table",Ri,[e.createElementVNode("thead",Fi,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,o=>(e.openBlock(),e.createElementBlock("th",{key:o.key,class:"datametria-table__th",style:e.normalizeStyle({width:o.width})},e.toDisplayString(o.label),5))),128))])]),e.createElementVNode("tbody",Li,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data,(o,r)=>(e.openBlock(),e.createElementBlock("tr",{key:r,class:"datametria-table__tr"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,l=>(e.openBlock(),e.createElementBlock("td",{key:l.key,class:"datametria-table__td"},[e.renderSlot(n.$slots,`cell-${l.key}`,{row:o,value:o[l.key]},()=>[e.createTextVNode(e.toDisplayString(o[l.key]),1)],!0)]))),128))]))),128))])]),t.data.length===0?(e.openBlock(),e.createElementBlock("div",Oi,[e.renderSlot(n.$slots,"empty",{},()=>[a[0]||(a[0]=e.createTextVNode("Nenhum dado disponível",-1))],!0)])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-ff6271dd"]]),ji={class:"datametria-sortable-table"},qi={key:0,class:"datametria-sortable-table__search"},Hi={class:"datametria-sortable-table__wrapper"},Ui={class:"datametria-sortable-table__table",role:"table"},vi={class:"datametria-sortable-table__thead"},Ki={role:"row"},Wi={key:0,class:"datametria-sortable-table__th datametria-sortable-table__th--checkbox",role:"columnheader"},Gi=["checked","indeterminate"],Yi=["aria-sort","onClick","onKeydown","tabindex"],Ji={class:"datametria-sortable-table__th-content"},Xi={key:0,class:"datametria-sortable-table__sort-icon","aria-hidden":"true"},Qi={key:0},Zi={key:1,class:"datametria-sortable-table__sort-icon--inactive"},ec=["onUpdate:modelValue","aria-label"],tc=["value"],ac={key:1,class:"datametria-sortable-table__multiselect"},nc=["onClick"],oc={key:0,class:"datametria-sortable-table__multiselect-dropdown"},rc=["value","checked","onChange"],lc=["onUpdate:modelValue","type","placeholder","aria-label"],sc={class:"datametria-sortable-table__tbody"},ic={key:0,class:"datametria-sortable-table__td datametria-sortable-table__td--checkbox",role:"cell"},cc=["checked","aria-label","onChange"],dc={key:0,class:"datametria-sortable-table__empty",role:"status"},mc={key:1,class:"datametria-sortable-table__pagination",role:"navigation","aria-label":"Paginação da tabela"},pc={class:"datametria-sortable-table__pagination-info","aria-live":"polite"},uc={key:0},fc={class:"datametria-sortable-table__pagination-controls"},hc=["value"],gc=["disabled"],bc=["disabled"],kc={class:"datametria-sortable-table__pagination-pages","aria-current":"page"},yc=["disabled"],_c=["disabled"],Bc=A(e.defineComponent({__name:"DatametriaSortableTable",props:{columns:{},data:{},selectable:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},paginated:{type:Boolean,default:!0},pageSize:{default:10},pageSizeOptions:{default:()=>[5,10,25,50,100]}},emits:["selection-change"],setup(t,{emit:n}){const a=t;process.env.NODE_ENV==="development"&&((!a.columns||a.columns.length===0)&&console.warn("[DatametriaSortableTable] No columns provided"),a.data||console.warn("[DatametriaSortableTable] No data provided"));const o=n,r=m=>{if(!a.data||a.data.length===0)return"text";const S=a.data[0][m.key];return S instanceof Date||typeof S=="string"&&!isNaN(Date.parse(S))&&/^\d{4}-\d{2}-\d{2}|\d{2}\/\d{2}\/\d{4}/.test(S)?"date":"text"},l=m=>{if(m.filterOptions==="auto"){const S=new Set;return a.data.forEach(k=>{const x=k[m.key];x!=null&&x!==""&&S.add(String(x))}),Array.from(S).sort().map(k=>({value:k,label:k}))}return m.filterOptions||[]},s=m=>{C.value=C.value===m?null:m},i=m=>{const S=B.value[m.key]||[];if(S.length===0)return"Todos";if(S.length===1){const x=l(m).find(z=>z.value===S[0]);return(x==null?void 0:x.label)||S[0]}return`${S.length} selecionados`},c=(m,S)=>(B.value[m]||[]).includes(S),d=(m,S)=>{const k=B.value[m]||[];k.indexOf(S)>-1?B.value[m]=k.filter(z=>z!==S):B.value[m]=[...k,S]},h=e.ref(""),u=e.ref(""),f=e.ref("asc"),B=e.ref({}),C=e.ref(null),y=e.ref(new Set),E=e.ref(1),g=e.ref(a.pageSize),b=e.computed(()=>{let m=[...a.data];if(h.value){const S=h.value.toLowerCase();m=m.filter(k=>Object.values(k).some(x=>String(x).toLowerCase().includes(S)))}return Object.entries(B.value).forEach(([S,k])=>{if(k){if(Array.isArray(k)&&k.length>0)m=m.filter(x=>k.includes(String(x[S])));else if(typeof k=="string"){const x=k.toLowerCase();m=m.filter(z=>String(z[S]).toLowerCase().includes(x))}}}),u.value&&m.sort((S,k)=>{let x=S[u.value],z=k[u.value];if(x==null&&z==null)return 0;if(x==null)return 1;if(z==null)return-1;if(x instanceof Date&&(x=x.getTime()),z instanceof Date&&(z=z.getTime()),typeof x=="string"&&!isNaN(Date.parse(x))&&/^\d{4}-\d{2}-\d{2}|\d{2}\/\d{2}\/\d{4}/.test(x)&&(x=new Date(x).getTime()),typeof z=="string"&&!isNaN(Date.parse(z))&&/^\d{4}-\d{2}-\d{2}|\d{2}\/\d{2}\/\d{4}/.test(z)&&(z=new Date(z).getTime()),typeof x=="number"&&typeof z=="number")return f.value==="asc"?x-z:z-x;const j=String(x).toLowerCase(),Ot=String(z).toLowerCase();if(j===Ot)return 0;const Pt=j>Ot?1:-1;return f.value==="asc"?Pt:-Pt}),m}),$=e.computed(()=>Math.ceil(b.value.length/g.value)),N=e.computed(()=>(E.value-1)*g.value),D=e.computed(()=>Math.min(N.value+g.value,b.value.length)),_=e.computed(()=>a.paginated?b.value.slice(N.value,D.value):b.value),V=e.computed(()=>_.value.length>0&&_.value.every(m=>y.value.has(m.id||a.data.indexOf(m)))),I=e.computed(()=>y.value.size>0&&!V.value),w=m=>{u.value===m?f.value=f.value==="asc"?"desc":"asc":(u.value=m,f.value="asc")},T=m=>{y.value.has(m)?y.value.delete(m):y.value.add(m),o("selection-change",Array.from(y.value))},p=()=>{V.value?_.value.forEach(m=>{y.value.delete(m.id||a.data.indexOf(m))}):_.value.forEach(m=>{y.value.add(m.id||a.data.indexOf(m))}),o("selection-change",Array.from(y.value))};return e.watch([h,B],()=>{E.value=1},{deep:!0}),e.watch($,m=>{E.value>m&&m>0&&(E.value=m)}),(m,S)=>(e.openBlock(),e.createElementBlock("div",ji,[t.searchable?(e.openBlock(),e.createElementBlock("div",qi,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":S[0]||(S[0]=k=>h.value=k),type:"text",placeholder:"Buscar...",class:"datametria-sortable-table__search-input","aria-label":"Buscar na tabela"},null,512),[[e.vModelText,h.value]])])):e.createCommentVNode("",!0),e.createElementVNode("div",Hi,[e.createElementVNode("table",Ui,[e.createElementVNode("thead",vi,[e.createElementVNode("tr",Ki,[t.selectable?(e.openBlock(),e.createElementBlock("th",Wi,[e.createElementVNode("input",{type:"checkbox",checked:V.value,indeterminate:I.value,"aria-label":"Selecionar todas as linhas",onChange:p},null,40,Gi)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,k=>(e.openBlock(),e.createElementBlock("th",{key:k.key,class:e.normalizeClass(["datametria-sortable-table__th",{"datametria-sortable-table__th--sortable":k.sortable!==!1}]),style:e.normalizeStyle({width:k.width}),role:"columnheader","aria-sort":u.value===k.key?f.value==="asc"?"ascending":"descending":"none",onClick:x=>k.sortable!==!1&&w(k.key),onKeydown:[e.withKeys(x=>k.sortable!==!1&&w(k.key),["enter"]),e.withKeys(e.withModifiers(x=>k.sortable!==!1&&w(k.key),["prevent"]),["space"])],tabindex:k.sortable!==!1?0:void 0},[e.createElementVNode("div",Ji,[e.createElementVNode("span",null,e.toDisplayString(k.label),1),k.sortable!==!1?(e.openBlock(),e.createElementBlock("span",Xi,[u.value===k.key?(e.openBlock(),e.createElementBlock("span",Qi,e.toDisplayString(f.value==="asc"?"↑":"↓"),1)):(e.openBlock(),e.createElementBlock("span",Zi,"↕"))])):e.createCommentVNode("",!0)]),t.filterable&&k.filterable!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:S[3]||(S[3]=e.withModifiers(()=>{},["stop"]))},[k.filterType==="select"?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:0,"onUpdate:modelValue":x=>B.value[k.key]=x,"aria-label":`Filtrar por ${k.label}`,class:"datametria-sortable-table__filter-input",onKeydown:S[1]||(S[1]=e.withModifiers(()=>{},["stop"]))},[S[9]||(S[9]=e.createElementVNode("option",{value:""},"Todos",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l(k),x=>(e.openBlock(),e.createElementBlock("option",{key:x.value,value:x.value},e.toDisplayString(x.label),9,tc))),128))],40,ec)),[[e.vModelSelect,B.value[k.key]]]):k.filterType==="multiselect"?(e.openBlock(),e.createElementBlock("div",ac,[e.createElementVNode("button",{type:"button",class:"datametria-sortable-table__multiselect-trigger",onClick:x=>s(k.key)},e.toDisplayString(i(k)),9,nc),C.value===k.key?(e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l(k),x=>(e.openBlock(),e.createElementBlock("label",{key:x.value,class:"datametria-sortable-table__multiselect-option"},[e.createElementVNode("input",{type:"checkbox",value:x.value,checked:c(k.key,x.value),onChange:z=>d(k.key,x.value)},null,40,rc),e.createTextVNode(" "+e.toDisplayString(x.label),1)]))),128))])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,"onUpdate:modelValue":x=>B.value[k.key]=x,type:k.filterType||r(k),placeholder:`Filtrar ${k.label}...`,"aria-label":`Filtrar por ${k.label}`,class:"datametria-sortable-table__filter-input",onKeydown:S[2]||(S[2]=e.withModifiers(()=>{},["stop"]))},null,40,lc)),[[e.vModelDynamic,B.value[k.key]]])])):e.createCommentVNode("",!0)],46,Yi))),128))])]),e.createElementVNode("tbody",sc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(k,x)=>(e.openBlock(),e.createElementBlock("tr",{key:k.id||x,class:e.normalizeClass(["datametria-sortable-table__tr",{"datametria-sortable-table__tr--selected":y.value.has(k.id||x)}]),role:"row"},[t.selectable?(e.openBlock(),e.createElementBlock("td",ic,[e.createElementVNode("input",{type:"checkbox",checked:y.value.has(k.id||x),"aria-label":`Selecionar linha ${x+1}`,onChange:z=>T(k.id||x)},null,40,cc)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,z=>(e.openBlock(),e.createElementBlock("td",{key:z.key,class:"datametria-sortable-table__td",role:"cell"},[e.renderSlot(m.$slots,`cell-${z.key}`,{row:k,value:k[z.key]},()=>[e.createTextVNode(e.toDisplayString(k[z.key]),1)],!0)]))),128))],2))),128))])]),b.value.length===0?(e.openBlock(),e.createElementBlock("div",dc,[e.renderSlot(m.$slots,"empty",{},()=>[S[10]||(S[10]=e.createTextVNode("Nenhum dado encontrado",-1))],!0)])):e.createCommentVNode("",!0)]),t.paginated&&b.value.length>0?(e.openBlock(),e.createElementBlock("div",mc,[e.createElementVNode("div",pc,[e.createTextVNode(" Mostrando "+e.toDisplayString(N.value+1)+" - "+e.toDisplayString(D.value)+" de "+e.toDisplayString(b.value.length)+" registros ",1),y.value.size>0?(e.openBlock(),e.createElementBlock("span",uc,"("+e.toDisplayString(y.value.size)+" selecionados)",1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",fc,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":S[4]||(S[4]=k=>g.value=k),class:"datametria-sortable-table__page-size","aria-label":"Itens por página"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pageSizeOptions,k=>(e.openBlock(),e.createElementBlock("option",{key:k,value:k},e.toDisplayString(k)+" por página ",9,hc))),128))],512),[[e.vModelSelect,g.value,void 0,{number:!0}]]),e.createElementVNode("button",{class:"datametria-sortable-table__pagination-btn",disabled:E.value===1,"aria-label":"Primeira página",onClick:S[5]||(S[5]=k=>E.value=1)}," «« ",8,gc),e.createElementVNode("button",{class:"datametria-sortable-table__pagination-btn",disabled:E.value===1,"aria-label":"Página anterior",onClick:S[6]||(S[6]=k=>E.value--)}," ‹ ",8,bc),e.createElementVNode("span",kc," Página "+e.toDisplayString(E.value)+" de "+e.toDisplayString($.value),1),e.createElementVNode("button",{class:"datametria-sortable-table__pagination-btn",disabled:E.value===$.value,"aria-label":"Próxima página",onClick:S[7]||(S[7]=k=>E.value++)}," › ",8,yc),e.createElementVNode("button",{class:"datametria-sortable-table__pagination-btn",disabled:E.value===$.value,"aria-label":"Última página",onClick:S[8]||(S[8]=k=>E.value=$.value)}," »» ",8,_c)])])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-81924a67"]]),Ec={key:0,class:"datametria-datatable__loading"},wc={class:"datametria-datatable__header"},$c={key:0,class:"datametria-datatable__cell datametria-datatable__cell--checkbox"},Cc=["checked"],Vc={key:1,class:"datametria-datatable__cell datametria-datatable__cell--expand"},Sc=["onClick"],Dc={key:0,class:"datametria-datatable__sort-icon"},Nc={class:"datametria-datatable__body"},xc=["onClick"],Ic={key:0,class:"datametria-datatable__cell datametria-datatable__cell--checkbox"},Tc=["checked","onChange"],Mc={key:1,class:"datametria-datatable__cell datametria-datatable__cell--expand"},Ac=["onClick"],zc={key:0,class:"datametria-datatable__expand-row"},Rc=["colspan"],Fc=A(e.defineComponent({__name:"DatametriaDataTable",props:{data:{default:()=>[]},columns:{default:()=>[]},loading:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},border:{type:Boolean,default:!1},height:{default:"auto"},rowKey:{default:"id"},selectable:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},expandable:{type:Boolean,default:!1}},emits:["selection-change","row-click","sort-change"],setup(t,{expose:n,emit:a}){const o=t,r=a,l=e.ref(""),s=e.ref("asc"),i=e.ref([]),c=e.ref(new Set),d=e.computed(()=>{let $=o.columns.length;return o.selectable&&$++,o.expandable&&$++,$}),h=e.computed(()=>{let $=[...o.data];return l.value&&$.sort((N,D)=>{const _=N[l.value],V=D[l.value];if(_===V)return 0;const I=_>V?1:-1;return s.value==="asc"?I:-I}),$}),u=e.computed(()=>o.data.length>0&&i.value.length===o.data.length),f=$=>{l.value===$?s.value=s.value==="asc"?"desc":"asc":(l.value=$,s.value="asc"),r("sort-change",$,s.value)},B=$=>i.value.some(N=>N[o.rowKey]===$[o.rowKey]),C=$=>{const N=i.value.findIndex(D=>D[o.rowKey]===$[o.rowKey]);N>-1?i.value.splice(N,1):o.multiple?i.value.push($):i.value=[$],r("selection-change",i.value)},y=()=>{u.value?i.value=[]:i.value=[...o.data],r("selection-change",i.value)},E=$=>{r("row-click",$)},g=$=>c.value.has($[o.rowKey]),b=$=>{const N=$[o.rowKey];c.value.has(N)?c.value.delete(N):c.value.add(N)};return n({clearSelection:()=>{i.value=[],r("selection-change",[])},toggleRowSelection:$=>C($),clearSort:()=>{l.value="",s.value="asc"}}),($,N)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-datatable",{"datametria-datatable--stripe":t.stripe,"datametria-datatable--border":t.border}])},[t.loading?(e.openBlock(),e.createElementBlock("div",Ec,"Carregando...")):e.createCommentVNode("",!0),e.createElementVNode("table",{class:"datametria-datatable__table",style:e.normalizeStyle({height:t.height})},[e.createElementVNode("thead",wc,[e.createElementVNode("tr",null,[t.selectable?(e.openBlock(),e.createElementBlock("th",$c,[t.multiple?(e.openBlock(),e.createElementBlock("input",{key:0,type:"checkbox",checked:u.value,onChange:y},null,40,Cc)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.expandable?(e.openBlock(),e.createElementBlock("th",Vc)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,D=>(e.openBlock(),e.createElementBlock("th",{key:D.prop,class:e.normalizeClass(["datametria-datatable__cell",{"datametria-datatable__cell--sortable":D.sortable}]),style:e.normalizeStyle({width:D.width,minWidth:D.minWidth}),onClick:_=>D.sortable&&f(D.prop)},[e.createTextVNode(e.toDisplayString(D.label)+" ",1),D.sortable&&l.value===D.prop?(e.openBlock(),e.createElementBlock("span",Dc,e.toDisplayString(s.value==="asc"?"↑":"↓"),1)):e.createCommentVNode("",!0)],14,Sc))),128))])]),e.createElementVNode("tbody",Nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(D,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:D[t.rowKey]||_},[e.createElementVNode("tr",{class:e.normalizeClass(["datametria-datatable__row",{"datametria-datatable__row--selected":B(D)}]),onClick:V=>E(D)},[t.selectable?(e.openBlock(),e.createElementBlock("td",Ic,[e.createElementVNode("input",{type:"checkbox",checked:B(D),onClick:N[0]||(N[0]=e.withModifiers(()=>{},["stop"])),onChange:V=>C(D)},null,40,Tc)])):e.createCommentVNode("",!0),t.expandable?(e.openBlock(),e.createElementBlock("td",Mc,[e.createElementVNode("button",{onClick:e.withModifiers(V=>b(D),["stop"])},e.toDisplayString(g(D)?"−":"+"),9,Ac)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,V=>(e.openBlock(),e.createElementBlock("td",{key:V.prop,class:"datametria-datatable__cell"},[e.renderSlot($.$slots,`cell-${V.prop}`,{row:D,column:V},()=>[e.createTextVNode(e.toDisplayString(D[V.prop]),1)],!0)]))),128))],10,xc),t.expandable&&g(D)?(e.openBlock(),e.createElementBlock("tr",zc,[e.createElementVNode("td",{colspan:d.value},[e.renderSlot($.$slots,"expand",{row:D},()=>[e.createTextVNode(e.toDisplayString(D),1)],!0)],8,Rc)])):e.createCommentVNode("",!0)],64))),128))])],4)],2))}}),[["__scopeId","data-v-62498f56"]]),Lc={key:0,class:"datametria-pagination__total"},Oc=["disabled"],Pc=["value"],jc=["disabled"],qc={key:3,class:"datametria-pagination__pager"},Hc=["onClick"],Uc=["disabled"],vc={key:5,class:"datametria-pagination__jumper"},Kc=["max","disabled"],Wc=A(e.defineComponent({__name:"DatametriaPagination",props:{modelValue:{default:1},total:{default:0},pageSize:{default:10},pageSizes:{default:()=>[10,20,30,50,100]},layout:{default:"prev, pager, next"},pagerCount:{default:7},disabled:{type:Boolean,default:!1},small:{type:Boolean,default:!1}},emits:["update:modelValue","size-change","current-change"],setup(t,{emit:n}){const a=t,o=n,r=e.ref(a.modelValue),l=e.ref(a.pageSize),s=e.ref(""),i=e.computed(()=>Math.ceil(a.total/l.value)||1),c=e.computed(()=>a.layout.split(",").map(g=>g.trim())),d=e.computed(()=>{const g=[],b=a.pagerCount,$=Math.floor(b/2);if(i.value<=b)for(let N=1;N<=i.value;N++)g.push(N);else if(r.value<=$+1){for(let N=1;N<=b-2;N++)g.push(N);g.push("..."),g.push(i.value)}else if(r.value>=i.value-$){g.push(1),g.push("...");for(let N=i.value-b+3;N<=i.value;N++)g.push(N)}else{g.push(1),g.push("...");for(let N=r.value-$+2;N<=r.value+$-2;N++)g.push(N);g.push("..."),g.push(i.value)}return g}),h=e.computed(()=>({"is-small":a.small,"is-disabled":a.disabled}));e.watch(()=>a.modelValue,g=>{r.value=g}),e.watch(()=>a.pageSize,g=>{l.value=g});const u=()=>{r.value>1&&E(r.value-1)},f=()=>{r.value<i.value&&E(r.value+1)},B=g=>{g==="..."||a.disabled||E(g)},C=()=>{const g=Math.min(r.value,Math.ceil(a.total/l.value));E(g),o("size-change",l.value)},y=()=>{s.value&&s.value>=1&&s.value<=i.value&&(E(s.value),s.value="")},E=g=>{g!==r.value&&(r.value=g,o("update:modelValue",g),o("current-change",g))};return(g,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-pagination",h.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,$=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:$},[$==="total"?(e.openBlock(),e.createElementBlock("span",Lc," Total: "+e.toDisplayString(t.total),1)):e.createCommentVNode("",!0),$==="sizes"?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:1,"onUpdate:modelValue":b[0]||(b[0]=N=>l.value=N),class:"datametria-pagination__sizes",disabled:t.disabled,onChange:C},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pageSizes,N=>(e.openBlock(),e.createElementBlock("option",{key:N,value:N},e.toDisplayString(N)+" / página ",9,Pc))),128))],40,Oc)),[[e.vModelSelect,l.value]]):e.createCommentVNode("",!0),$==="prev"?(e.openBlock(),e.createElementBlock("button",{key:2,class:"datametria-pagination__btn",disabled:r.value===1||t.disabled,onClick:u},[...b[2]||(b[2]=[e.createElementVNode("span",{class:"datametria-pagination__icon"},"‹",-1)])],8,jc)):e.createCommentVNode("",!0),$==="pager"?(e.openBlock(),e.createElementBlock("ul",qc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,N=>(e.openBlock(),e.createElementBlock("li",{key:N,class:e.normalizeClass(["datametria-pagination__number",{"is-active":N===r.value,"is-disabled":t.disabled}]),onClick:D=>B(N)},e.toDisplayString(N==="..."?"•••":N),11,Hc))),128))])):e.createCommentVNode("",!0),$==="next"?(e.openBlock(),e.createElementBlock("button",{key:4,class:"datametria-pagination__btn",disabled:r.value===i.value||t.disabled,onClick:f},[...b[3]||(b[3]=[e.createElementVNode("span",{class:"datametria-pagination__icon"},"›",-1)])],8,Uc)):e.createCommentVNode("",!0),$==="jumper"?(e.openBlock(),e.createElementBlock("span",vc,[b[4]||(b[4]=e.createTextVNode(" Ir para ",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":b[1]||(b[1]=N=>s.value=N),type:"number",min:"1",max:i.value,disabled:t.disabled,onKeyup:e.withKeys(y,["enter"])},null,40,Kc),[[e.vModelText,s.value,void 0,{number:!0}]])])):e.createCommentVNode("",!0)],64))),128))],2))}}),[["__scopeId","data-v-2af36e37"]]),Gc=["aria-expanded"],Yc={class:"datametria-tree-node__icon"},Jc={key:1,class:"datametria-tree-node__expand datametria-tree-node__expand--leaf"},Xc=["checked"],Qc={class:"datametria-tree-node__label"},Zc={key:0,class:"datametria-tree-node__children"},ed=A(e.defineComponent({__name:"DatametriaTreeNode",props:{node:{},nodeKey:{},checkable:{type:Boolean},defaultExpandAll:{type:Boolean},expandedKeys:{},checkedKeys:{}},emits:["toggle","check"],setup(t,{emit:n}){const a=t,o=n,r=e.computed(()=>a.node[a.nodeKey]),l=e.computed(()=>a.node.children&&a.node.children.length>0),s=e.computed(()=>!l.value),i=e.computed(()=>a.expandedKeys.has(r.value)),c=e.computed(()=>a.checkedKeys.has(r.value)),d=B=>B[a.nodeKey],h=()=>{o("toggle",a.node)},u=()=>{s.value||h()},f=B=>{const C=B.target;o("check",a.node,C.checked)};return(B,C)=>{const y=e.resolveComponent("DatametriaTreeNode",!0);return e.openBlock(),e.createElementBlock("div",{class:"datametria-tree-node",role:"treeitem","aria-expanded":i.value},[e.createElementVNode("div",{class:e.normalizeClass(["datametria-tree-node__content",{"is-leaf":s.value}]),onClick:u},[s.value?(e.openBlock(),e.createElementBlock("span",Jc)):(e.openBlock(),e.createElementBlock("span",{key:0,class:"datametria-tree-node__expand",onClick:e.withModifiers(h,["stop"])},[e.createElementVNode("span",Yc,e.toDisplayString(i.value?"▼":"▶"),1)])),t.checkable?(e.openBlock(),e.createElementBlock("input",{key:2,type:"checkbox",class:"datametria-tree-node__checkbox",checked:c.value,onChange:f,onClick:C[0]||(C[0]=e.withModifiers(()=>{},["stop"]))},null,40,Xc)):e.createCommentVNode("",!0),e.createElementVNode("span",Qc,e.toDisplayString(t.node.label||t.node.name||t.node[t.nodeKey]),1)],2),l.value&&i.value?(e.openBlock(),e.createElementBlock("div",Zc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.node.children,E=>(e.openBlock(),e.createBlock(y,{key:d(E),node:E,"node-key":t.nodeKey,checkable:t.checkable,"default-expand-all":t.defaultExpandAll,"expanded-keys":t.expandedKeys,"checked-keys":t.checkedKeys,onToggle:C[1]||(C[1]=g=>B.$emit("toggle",g)),onCheck:C[2]||(C[2]=(g,b)=>B.$emit("check",g,b))},null,8,["node","node-key","checkable","default-expand-all","expanded-keys","checked-keys"]))),128))])):e.createCommentVNode("",!0)],8,Gc)}}}),[["__scopeId","data-v-014b02d5"]]),td={class:"datametria-tree",role:"tree"},ad=A(e.defineComponent({__name:"DatametriaTree",props:{data:{},nodeKey:{default:"id"},defaultExpandAll:{type:Boolean,default:!1},checkable:{type:Boolean,default:!1},defaultExpandedKeys:{default:()=>[]},defaultCheckedKeys:{default:()=>[]}},emits:["nodeExpand","nodeCollapse","check"],setup(t,{expose:n,emit:a}){const o=t,r=a,l=E=>{const g=[];return E.forEach(b=>{g.push(b[o.nodeKey]),b.children&&g.push(...l(b.children))}),g},s=o.defaultExpandAll?l(o.data):o.defaultExpandedKeys,i=e.ref(new Set(s)),c=e.ref(new Set(o.defaultCheckedKeys)),d=e.computed(()=>i.value),h=e.computed(()=>c.value),u=E=>E[o.nodeKey],f=E=>{const g=u(E);i.value.has(g)?(i.value.delete(g),r("nodeCollapse",E)):(i.value.add(g),r("nodeExpand",E))},B=(E,g)=>{const b=u(E);g?c.value.add(b):c.value.delete(b),r("check",Array.from(c.value),E)};return n({expandAll:()=>{i.value=new Set(l(o.data))},collapseAll:()=>{i.value.clear()}}),(E,g)=>(e.openBlock(),e.createElementBlock("div",td,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data,b=>(e.openBlock(),e.createBlock(ed,{key:u(b),node:b,"node-key":t.nodeKey,checkable:t.checkable,"default-expand-all":t.defaultExpandAll,"expanded-keys":d.value,"checked-keys":h.value,onToggle:f,onCheck:B},null,8,["node","node-key","checkable","default-expand-all","expanded-keys","checked-keys"]))),128))]))}}),[["__scopeId","data-v-10366c4e"]]),nd={class:"datametria-empty",role:"status","aria-live":"polite"},od={class:"datametria-empty__image"},rd={key:0,class:"datametria-empty__svg",viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg"},ld={key:1,class:"datametria-empty__svg",viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg"},sd={key:2,class:"datametria-empty__svg",viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg"},id=["src","alt"],cd={class:"datametria-empty__description"},dd={key:0,class:"datametria-empty__text"},md={key:0,class:"datametria-empty__actions"},pd=A(e.defineComponent({__name:"DatametriaEmpty",props:{description:{default:""},image:{default:""},imageAlt:{default:"Empty state"},imageType:{default:"no-data"}},setup(t){const n=t,a=e.computed(()=>n.image?null:n.imageType);return(o,r)=>(e.openBlock(),e.createElementBlock("div",nd,[e.createElementVNode("div",od,[e.renderSlot(o.$slots,"image",{},()=>[a.value==="no-data"?(e.openBlock(),e.createElementBlock("svg",rd,[...r[0]||(r[0]=[e.createStaticVNode('<circle cx="100" cy="100" r="80" fill="#f0f0f0" data-v-238dc89a></circle><path d="M70 90 Q100 70 130 90" stroke="#999" stroke-width="3" fill="none" data-v-238dc89a></path><circle cx="80" cy="85" r="8" fill="#999" data-v-238dc89a></circle><circle cx="120" cy="85" r="8" fill="#999" data-v-238dc89a></circle><path d="M70 130 Q100 150 130 130" stroke="#999" stroke-width="3" fill="none" data-v-238dc89a></path>',5)])])):a.value==="no-results"?(e.openBlock(),e.createElementBlock("svg",ld,[...r[1]||(r[1]=[e.createElementVNode("circle",{cx:"80",cy:"80",r:"50",fill:"none",stroke:"#999","stroke-width":"4"},null,-1),e.createElementVNode("line",{x1:"120",y1:"120",x2:"160",y2:"160",stroke:"#999","stroke-width":"4","stroke-linecap":"round"},null,-1),e.createElementVNode("line",{x1:"60",y1:"60",x2:"100",y2:"100",stroke:"#e74c3c","stroke-width":"3"},null,-1),e.createElementVNode("line",{x1:"100",y1:"60",x2:"60",y2:"100",stroke:"#e74c3c","stroke-width":"3"},null,-1)])])):a.value==="error"?(e.openBlock(),e.createElementBlock("svg",sd,[...r[2]||(r[2]=[e.createElementVNode("circle",{cx:"100",cy:"100",r:"80",fill:"#fee",stroke:"#e74c3c","stroke-width":"3"},null,-1),e.createElementVNode("line",{x1:"70",y1:"70",x2:"130",y2:"130",stroke:"#e74c3c","stroke-width":"4","stroke-linecap":"round"},null,-1),e.createElementVNode("line",{x1:"130",y1:"70",x2:"70",y2:"130",stroke:"#e74c3c","stroke-width":"4","stroke-linecap":"round"},null,-1)])])):t.image?(e.openBlock(),e.createElementBlock("img",{key:3,src:t.image,alt:t.imageAlt,class:"datametria-empty__custom-image"},null,8,id)):e.createCommentVNode("",!0)],!0)]),e.createElementVNode("div",cd,[e.renderSlot(o.$slots,"description",{},()=>[t.description?(e.openBlock(),e.createElementBlock("p",dd,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)],!0)]),o.$slots.default?(e.openBlock(),e.createElementBlock("div",md,[e.renderSlot(o.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-238dc89a"]]),ud=["src","alt"],fd={key:2,class:"dm-avatar__icon"},hd={key:3,class:"dm-avatar__loading"},gd=A(e.defineComponent({__name:"DatametriaAvatar",props:{src:{},name:{},alt:{},size:{default:"md"},variant:{default:"circular"},backgroundColor:{},textColor:{},clickable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},badge:{type:Boolean,default:!1},status:{}},emits:["click"],setup(t,{emit:n}){const a=t,o=n,r=e.ref(!1),l=e.computed(()=>{if(!a.name)return"";const u=a.name.split(" ");return u.length===1?u[0].charAt(0).toUpperCase():u[0].charAt(0).toUpperCase()+u[u.length-1].charAt(0).toUpperCase()}),s=e.computed(()=>[`dm-avatar--${a.size}`,`dm-avatar--${a.variant}`,{"dm-avatar--clickable":a.clickable,"dm-avatar--loading":a.loading}]),i=e.computed(()=>({backgroundColor:a.backgroundColor||"var(--dm-primary, #0072ce)"})),c=u=>{a.clickable&&o("click",u)},d=()=>{r.value=!0},h=()=>{r.value=!1};return(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dm-avatar",s.value]),style:e.normalizeStyle(i.value),onClick:c},[t.src&&!r.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.src,alt:t.alt||`${t.name} avatar`,class:"dm-avatar__image",onError:d,onLoad:h},null,40,ud)):t.name&&!t.loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:"dm-avatar__initials",style:e.normalizeStyle({color:t.textColor})},e.toDisplayString(l.value),5)):t.loading?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",fd,[...f[0]||(f[0]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})],-1)])])),t.loading?(e.openBlock(),e.createElementBlock("div",hd,[...f[1]||(f[1]=[e.createElementVNode("div",{class:"dm-avatar__spinner"},null,-1)])])):e.createCommentVNode("",!0),t.badge&&t.status?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(["dm-avatar__badge",`dm-avatar__badge--${t.status}`])},null,2)):e.createCommentVNode("",!0)],6))}}),[["__scopeId","data-v-a4e5308d"]]),bd=["aria-label"],kd=A(e.defineComponent({__name:"DatametriaBadge",props:{label:{},variant:{default:"primary"},size:{default:"md"},ariaLabel:{}},setup(t){const n=t;if(process.env.NODE_ENV==="development"){const a=["primary","secondary","success","warning","error","info"];a.includes(n.variant)||console.warn(`[DatametriaBadge] Invalid variant "${n.variant}". Valid options: ${a.join(", ")}`)}return(a,o)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["dm-badge",[`dm-badge--${t.variant}`,`dm-badge--${t.size}`]]),"aria-label":t.ariaLabel},[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)],10,bd))}}),[["__scopeId","data-v-8134e252"]]),yd=["role","tabindex","onKeydown"],_d={key:0,class:"dm-chip__icon"},Bd={class:"dm-chip__label"},Ed=A(e.defineComponent({__name:"DatametriaChip",props:{label:{},variant:{default:"primary"},closable:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1}},emits:["click","close"],setup(t,{emit:n}){const a=t;if(process.env.NODE_ENV==="development"){const s=["primary","secondary","success","warning","error"];s.includes(a.variant)||console.warn(`[DatametriaChip] Invalid variant "${a.variant}". Valid options: ${s.join(", ")}`)}const o=n,r=()=>{o("click")},l=()=>{o("close")};return(s,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dm-chip",[`dm-chip--${t.variant}`,{"dm-chip--clickable":t.clickable}]]),role:t.clickable?"button":void 0,tabindex:t.clickable?0:void 0,onClick:r,onKeydown:[e.withKeys(r,["enter"]),e.withKeys(e.withModifiers(r,["prevent"]),["space"])]},[s.$slots.icon?(e.openBlock(),e.createElementBlock("span",_d,[e.renderSlot(s.$slots,"icon",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("span",Bd,[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)]),t.closable?(e.openBlock(),e.createElementBlock("button",{key:1,class:"dm-chip__close",onClick:e.withModifiers(l,["stop"]),"aria-label":"Remover",type:"button"},"×")):e.createCommentVNode("",!0)],42,yd))}}),[["__scopeId","data-v-aedb571c"]]),wd=["aria-label"],$d={class:"dm-navbar__container"},Cd={class:"dm-navbar__brand"},Vd={href:"/",class:"dm-navbar__logo"},Sd=["aria-expanded"],Dd={key:1,class:"dm-navbar__actions"},Nd=A(e.defineComponent({__name:"DatametriaNavbar",props:{brand:{default:""},variant:{default:"light"},sticky:{type:Boolean,default:!1},transparent:{type:Boolean,default:!1},bordered:{type:Boolean,default:!1},ariaLabel:{default:"Main navigation"}},setup(t){const n=t;if(process.env.NODE_ENV==="development"){const l=["light","dark","transparent","primary"];l.includes(n.variant)||console.warn(`[DatametriaNavbar] Invalid variant "${n.variant}". Valid options: ${l.join(", ")}`)}const a=e.computed(()=>["dm-navbar",`dm-navbar--${n.variant}`,{"dm-navbar--sticky":n.sticky},{"dm-navbar--transparent":n.transparent},{"dm-navbar--bordered":n.bordered}]),o=e.ref(!1),r=()=>{o.value=!o.value};return(l,s)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(a.value),role:"navigation","aria-label":n.ariaLabel},[e.createElementVNode("div",$d,[e.createElementVNode("div",Cd,[e.renderSlot(l.$slots,"brand",{},()=>[e.createElementVNode("a",Vd,e.toDisplayString(t.brand),1)],!0)]),l.$slots.menu?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dm-navbar__toggle","aria-expanded":o.value,"aria-controls":"navbar-menu",onClick:r},[...s[0]||(s[0]=[e.createElementVNode("span",{class:"dm-navbar__toggle-icon"},null,-1)])],8,Sd)):e.createCommentVNode("",!0),e.createElementVNode("div",{id:"navbar-menu",class:e.normalizeClass(["dm-navbar__menu",{"dm-navbar__menu--open":o.value}])},[e.renderSlot(l.$slots,"menu",{},void 0,!0)],2),l.$slots.actions?(e.openBlock(),e.createElementBlock("div",Dd,[e.renderSlot(l.$slots,"actions",{},void 0,!0)])):e.createCommentVNode("",!0)])],10,wd))}}),[["__scopeId","data-v-435b69f6"]]),xd=["aria-label","aria-expanded"],Id={key:0,class:"dm-sidebar__header"},Td=["aria-label"],Md={class:"dm-sidebar__content"},Ad={key:1,class:"dm-sidebar__footer"},zd=A(e.defineComponent({__name:"DatametriaSidebar",props:{position:{default:"left"},variant:{default:"light"},width:{default:"280px"},collapsible:{type:Boolean,default:!1},defaultOpen:{type:Boolean,default:!0},ariaLabel:{default:"Sidebar navigation"}},emits:["toggle","open","close"],setup(t,{expose:n,emit:a}){e.useCssVars(c=>({fa618d10:c.width}));const o=t,r=a,l=e.ref(o.defaultOpen),s=e.computed(()=>["dm-sidebar",`dm-sidebar--${o.position}`,`dm-sidebar--${o.variant}`,{"dm-sidebar--collapsed":!l.value&&o.collapsible}]),i=()=>{l.value=!l.value,r("toggle",l.value),l.value?r("open"):r("close")};return e.watch(()=>o.defaultOpen,c=>{l.value=c}),n({isOpen:l,toggle:i}),(c,d)=>(e.openBlock(),e.createElementBlock("aside",{class:e.normalizeClass(s.value),role:"complementary","aria-label":t.ariaLabel,"aria-expanded":l.value},[c.$slots.header?(e.openBlock(),e.createElementBlock("div",Id,[e.renderSlot(c.$slots,"header",{},void 0,!0),t.collapsible?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dm-sidebar__toggle",onClick:i,"aria-label":l.value?"Fechar sidebar":"Abrir sidebar"},[e.createElementVNode("span",{class:e.normalizeClass(["dm-sidebar__toggle-icon",{"dm-sidebar__toggle-icon--open":l.value}])},null,2)],8,Td)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("nav",Md,[e.renderSlot(c.$slots,"default",{},void 0,!0)]),c.$slots.footer?(e.openBlock(),e.createElementBlock("div",Ad,[e.renderSlot(c.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],10,xd))}}),[["__scopeId","data-v-09ed7b38"]]),Rd=["aria-label"],Fd={class:"dm-floating-bar__content"},Ld=A(e.defineComponent({__name:"DatametriaFloatingBar",props:{position:{default:"bottom"},variant:{default:"light"},offset:{default:"16px"},shadow:{type:Boolean,default:!0},rounded:{type:Boolean,default:!0},ariaLabel:{default:"Floating toolbar"}},setup(t){const n=t,a=e.computed(()=>["dm-floating-bar",`dm-floating-bar--${n.position}`,`dm-floating-bar--${n.variant}`,{"dm-floating-bar--shadow":n.shadow},{"dm-floating-bar--rounded":n.rounded}]),o=e.computed(()=>{const r={};switch(n.position){case"top":r.top=n.offset;break;case"bottom":r.bottom=n.offset;break;case"left":r.left=n.offset;break;case"right":r.right=n.offset;break}return r});return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(a.value),role:"toolbar","aria-label":t.ariaLabel,style:e.normalizeStyle(o.value)},[e.createElementVNode("div",Fd,[e.renderSlot(r.$slots,"default",{},void 0,!0)])],14,Rd))}}),[["__scopeId","data-v-87cece8c"]]),Od=["aria-expanded","aria-controls"],Pd=["disabled"],jd=["id","aria-labelledby"],qd={class:"dm-menu__content"},Hd=["tabindex","aria-disabled","onClick","onMouseenter"],Ud={key:0,class:"dm-menu__divider"},vd={key:0,class:"dm-menu__item-icon"},Kd={class:"dm-menu__item-content"},Wd={class:"dm-menu__item-label"},Gd={key:0,class:"dm-menu__item-description"},Yd={key:1,class:"dm-menu__item-shortcut"},Jd=A(e.defineComponent({__name:"DatametriaMenu",props:{items:{default:()=>[]},triggerText:{default:"Menu"},placement:{default:"bottom-start"},disabled:{type:Boolean},fullWidth:{type:Boolean},showBackdrop:{type:Boolean,default:!1},closeOnItemClick:{type:Boolean,default:!0},offset:{default:4}},emits:["open","close","item-click"],setup(t,{expose:n,emit:a}){const o=t,r=a,l=e.ref(),s=e.ref(),i=e.ref(!1),c=e.ref(-1),d=e.computed(()=>`dm-menu-${Math.random().toString(36).substr(2,9)}`),h=e.computed(()=>`dm-menu-trigger-${Math.random().toString(36).substr(2,9)}`),u=e.ref({}),f=async()=>{if(!l.value||!s.value)return;await e.nextTick();const p=l.value.getBoundingClientRect(),m=s.value.getBoundingClientRect(),S={width:window.innerWidth,height:window.innerHeight};let k=0,x=0;switch(o.placement){case"bottom-start":k=p.bottom+o.offset,x=p.left;break;case"bottom-end":k=p.bottom+o.offset,x=p.right-m.width;break;case"top-start":k=p.top-m.height-o.offset,x=p.left;break;case"top-end":k=p.top-m.height-o.offset,x=p.right-m.width;break;case"left":k=p.top,x=p.left-m.width-o.offset;break;case"right":k=p.top,x=p.right+o.offset;break}x<8?x=8:x+m.width>S.width-8&&(x=S.width-m.width-8),k<8?k=8:k+m.height>S.height-8&&(k=S.height-m.height-8);const z=o.fullWidth?`${p.width}px`:"auto";u.value={position:"fixed",top:`${k}px`,left:`${x}px`,width:z,zIndex:"9999"}},B=async()=>{o.disabled||i.value||(i.value=!0,c.value=-1,r("open"),await f(),e.nextTick(()=>{const p=o.items.findIndex(m=>!m.disabled&&!m.divider);p!==-1&&(c.value=p)}))},C=()=>{i.value&&(i.value=!1,c.value=-1,r("close"),e.nextTick(()=>{var p;(p=l.value)==null||p.focus()}))},y=()=>{i.value?C():B()},E=()=>{y()},g=p=>{switch(p.key){case"Enter":case" ":case"ArrowDown":p.preventDefault(),B();break;case"ArrowUp":p.preventDefault(),B(),e.nextTick(()=>{var S;const m=((S=o.items.map((k,x)=>({item:k,index:x})).filter(({item:k})=>!k.disabled&&!k.divider).pop())==null?void 0:S.index)??-1;m!==-1&&(c.value=m)});break;case"Escape":C();break}},b=p=>{switch(p.key){case"ArrowDown":p.preventDefault(),$();break;case"ArrowUp":p.preventDefault(),N();break;case"Enter":case" ":if(p.preventDefault(),c.value!==-1){const m=o.items[c.value];D(m,c.value)}break;case"Escape":p.preventDefault(),C();break;case"Tab":C();break}},$=()=>{const p=o.items.map((k,x)=>({item:k,index:x})).filter(({item:k})=>!k.disabled&&!k.divider).map(({index:k})=>k);if(p.length===0)return;const m=p.indexOf(c.value),S=m===-1?0:(m+1)%p.length;c.value=p[S]},N=()=>{const p=o.items.map((k,x)=>({item:k,index:x})).filter(({item:k})=>!k.disabled&&!k.divider).map(({index:k})=>k);if(p.length===0)return;const m=p.indexOf(c.value),S=m===-1?p.length-1:(m-1+p.length)%p.length;c.value=p[S]},D=(p,m)=>{p.disabled||p.divider||(r("item-click",p,m),p.action&&p.action(),o.closeOnItemClick&&C())},_=p=>{p.stopPropagation()},V=()=>{f()},I=()=>{u.value={}},w=p=>{var S,k;if(!i.value)return;const m=p.target;(S=l.value)!=null&&S.contains(m)||(k=s.value)!=null&&k.contains(m)||C()},T=()=>{i.value&&f()};return e.onMounted(()=>{document.addEventListener("click",w),window.addEventListener("resize",T)}),e.onUnmounted(()=>{document.removeEventListener("click",w),window.removeEventListener("resize",T)}),e.watch(()=>o.items,()=>{c.value>=o.items.length&&(c.value=-1)}),n({open:B,close:C,toggle:y,isOpen:e.computed(()=>i.value)}),(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dm-menu",{"dm-menu--disabled":t.disabled}])},[e.createElementVNode("div",{ref_key:"triggerRef",ref:l,class:"dm-menu__trigger","aria-expanded":i.value,"aria-haspopup":!0,"aria-controls":d.value,onClick:E,onKeydown:g},[e.renderSlot(p.$slots,"trigger",{isOpen:i.value,toggle:y},()=>[e.createElementVNode("button",{type:"button",class:"dm-menu__button",disabled:t.disabled},[e.createTextVNode(e.toDisplayString(t.triggerText)+" ",1),(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["dm-menu__chevron",{"dm-menu__chevron--open":i.value}]),viewBox:"0 0 20 20",fill:"currentColor"},[...m[0]||(m[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)])],2))],8,Pd)],!0)],40,Od),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"menu",onEnter:V,onLeave:I},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"menuRef",ref:s,id:d.value,class:e.normalizeClass(["dm-menu__dropdown",[`dm-menu__dropdown--${t.placement}`,{"dm-menu__dropdown--full-width":t.fullWidth}]]),style:e.normalizeStyle(u.value),role:"menu","aria-labelledby":h.value,onKeydown:b,onClick:_},[e.createElementVNode("div",qd,[e.renderSlot(p.$slots,"default",{close:C,focusedIndex:c.value},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(S,k)=>(e.openBlock(),e.createElementBlock("div",{key:S.key||k,class:e.normalizeClass(["dm-menu__item",{"dm-menu__item--focused":c.value===k,"dm-menu__item--disabled":S.disabled,"dm-menu__item--divider":S.divider}]),role:"menuitem",tabindex:S.disabled?-1:0,"aria-disabled":S.disabled,onClick:x=>D(S,k),onMouseenter:x=>c.value=k},[S.divider?(e.openBlock(),e.createElementBlock("div",Ud)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[S.icon?(e.openBlock(),e.createElementBlock("div",vd,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.icon)))])):e.createCommentVNode("",!0),e.createElementVNode("div",Kd,[e.createElementVNode("div",Wd,e.toDisplayString(S.label),1),S.description?(e.openBlock(),e.createElementBlock("div",Gd,e.toDisplayString(S.description),1)):e.createCommentVNode("",!0)]),S.shortcut?(e.openBlock(),e.createElementBlock("div",Yd,e.toDisplayString(S.shortcut),1)):e.createCommentVNode("",!0)],64))],42,Hd))),128))],!0)])],46,jd)):e.createCommentVNode("",!0)]),_:3})])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"backdrop"},{default:e.withCtx(()=>[i.value&&t.showBackdrop?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dm-menu__backdrop",onClick:C})):e.createCommentVNode("",!0)]),_:1})]))],2))}}),[["__scopeId","data-v-80da45b4"]]),Xd={class:"datametria-breadcrumb","aria-label":"Breadcrumb"},Qd={class:"datametria-breadcrumb__list"},Zd={key:0,class:"datametria-breadcrumb__separator","aria-hidden":"true"},em=A(e.defineComponent({__name:"DatametriaBreadcrumb",props:{items:{},separator:{default:"/"}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("nav",Xd,[e.createElementVNode("ol",Qd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(o,r)=>(e.openBlock(),e.createElementBlock("li",{key:r,class:e.normalizeClass(["datametria-breadcrumb__item",{"is-last":r===t.items.length-1}])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.to?"router-link":"span"),{to:o.to,class:e.normalizeClass(["datametria-breadcrumb__link",{"is-active":r===t.items.length-1}]),"aria-current":r===t.items.length-1?"page":void 0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["to","class","aria-current"])),r<t.items.length-1?(e.openBlock(),e.createElementBlock("span",Zd,[e.renderSlot(n.$slots,"separator",{},()=>[e.createTextVNode(e.toDisplayString(t.separator),1)],!0)])):e.createCommentVNode("",!0)],2))),128))])]))}}),[["__scopeId","data-v-a3a6d3ae"]]),tm={class:"datametria-steps__head"},am={key:0,class:"datametria-steps__line"},nm={class:"datametria-steps__icon"},om={key:0,class:"icon-check"},rm={key:1,class:"icon-error"},lm={key:2,class:"icon-number"},sm={class:"datametria-steps__main"},im={class:"datametria-steps__title"},cm={key:0,class:"datametria-steps__description"},dm=A(e.defineComponent({__name:"DatametriaSteps",props:{active:{default:0},items:{},direction:{default:"horizontal"},simple:{type:Boolean,default:!1},status:{}},emits:["change"],setup(t,{emit:n}){const a=t,o=r=>{var l;return(l=a.items[r])!=null&&l.status?a.items[r].status:a.status?a.status:r<a.active?"finish":r===a.active?"process":"wait"};return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datametria-steps",[`datametria-steps--${t.direction}`,{"datametria-steps--simple":t.simple}]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(s,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,class:e.normalizeClass(["datametria-steps__item",[`is-${o(i)}`,{"is-last":i===t.items.length-1}]])},[e.createElementVNode("div",tm,[i>0?(e.openBlock(),e.createElementBlock("div",am,[...l[0]||(l[0]=[e.createElementVNode("div",{class:"datametria-steps__line-inner"},null,-1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",nm,[o(i)==="finish"?(e.openBlock(),e.createElementBlock("span",om,"✓")):o(i)==="error"?(e.openBlock(),e.createElementBlock("span",rm,"✕")):(e.openBlock(),e.createElementBlock("span",lm,e.toDisplayString(i+1),1))])]),e.createElementVNode("div",sm,[e.createElementVNode("div",im,e.toDisplayString(s.title),1),s.description?(e.openBlock(),e.createElementBlock("div",cm,e.toDisplayString(s.description),1)):e.createCommentVNode("",!0)])],2))),128))],2))}}),[["__scopeId","data-v-a51104bd"]]),mm=["aria-label","aria-orientation"],pm=["id","aria-selected","aria-controls","aria-disabled","tabindex","disabled","onClick","onKeydown"],um={key:0,class:"dm-tabs__icon"},fm={class:"dm-tabs__label"},hm={key:1,class:"dm-tabs__badge"},gm={class:"dm-tabs__panels"},bm=["id","aria-labelledby","hidden"],km=A(e.defineComponent({__name:"DatametriaTabs",props:{tabs:{},modelValue:{default:0},variant:{default:"md"},orientation:{default:"horizontal"},showIndicator:{type:Boolean,default:!0},ariaLabel:{default:"Tabs"}},emits:["update:modelValue","change"],setup(t,{emit:n}){const a=t,o=n,r=e.ref(a.modelValue);e.watch(()=>a.modelValue,d=>{r.value=d});const l=e.computed(()=>["dm-tabs",`dm-tabs--${a.variant}`,`dm-tabs--${a.orientation}`]),s=e.computed(()=>{const d=a.tabs.length;return{transform:a.orientation==="horizontal"?`translateX(${r.value*100}%)`:`translateY(${r.value*100}%)`,width:a.orientation==="horizontal"?`${100/d}%`:"100%",height:a.orientation==="vertical"?`${100/d}%`:"2px"}}),i=d=>{const h=a.tabs[d];typeof h=="object"&&"disabled"in h&&h.disabled||(r.value=d,o("update:modelValue",d),o("change",d))},c=(d,h)=>{var B;let u=h;const f=a.orientation==="horizontal";switch(d.key){case"ArrowLeft":if(!f)return;d.preventDefault(),u=h>0?h-1:a.tabs.length-1;break;case"ArrowRight":if(!f)return;d.preventDefault(),u=h<a.tabs.length-1?h+1:0;break;case"ArrowUp":if(f)return;d.preventDefault(),u=h>0?h-1:a.tabs.length-1;break;case"ArrowDown":if(f)return;d.preventDefault(),u=h<a.tabs.length-1?h+1:0;break;case"Home":d.preventDefault(),u=0;break;case"End":d.preventDefault(),u=a.tabs.length-1;break;default:return}i(u),(B=document.getElementById(`tab-${u}`))==null||B.focus()};return(d,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.value)},[e.createElementVNode("div",{class:"dm-tabs__header",role:"tablist","aria-label":t.ariaLabel,"aria-orientation":t.orientation},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabs,(u,f)=>(e.openBlock(),e.createElementBlock("button",{key:f,id:`tab-${f}`,class:e.normalizeClass(["dm-tabs__tab",{"dm-tabs__tab--active":r.value===f,"dm-tabs__tab--disabled":typeof u=="object"&&"disabled"in u&&u.disabled}]),role:"tab","aria-selected":r.value===f,"aria-controls":`panel-${f}`,"aria-disabled":typeof u=="object"&&"disabled"in u?u.disabled:!1,tabindex:r.value===f?0:-1,disabled:typeof u=="object"&&"disabled"in u?u.disabled:!1,onClick:B=>i(f),onKeydown:B=>c(B,f)},[typeof u=="object"&&"icon"in u&&u.icon?(e.openBlock(),e.createElementBlock("span",um,e.toDisplayString(u.icon),1)):e.createCommentVNode("",!0),e.createElementVNode("span",fm,e.toDisplayString(typeof u=="string"?u:u.label),1),typeof u=="object"&&"badge"in u&&u.badge?(e.openBlock(),e.createElementBlock("span",hm,e.toDisplayString(u.badge),1)):e.createCommentVNode("",!0)],42,pm))),128)),t.showIndicator?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dm-tabs__indicator",style:e.normalizeStyle(s.value)},null,4)):e.createCommentVNode("",!0)],8,mm),e.createElementVNode("div",gm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabs,(u,f)=>(e.openBlock(),e.createElementBlock("div",{key:f,id:`panel-${f}`,class:e.normalizeClass(["dm-tabs__panel",{"dm-tabs__panel--active":r.value===f}]),role:"tabpanel","aria-labelledby":`tab-${f}`,hidden:r.value!==f},[e.renderSlot(d.$slots,`panel-${f}`,{},void 0,!0)],10,bm))),128))])],2))}}),[["__scopeId","data-v-c7261c82"]]),ym=["id","aria-labelledby","hidden"],_m=A(e.defineComponent({__name:"DatametriaTabPane",props:{label:{},name:{},disabled:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},icon:{},badge:{}},setup(t){const n=t,a=e.inject("datametriaTabs",null),o=e.ref(!1),r=e.computed(()=>a?a.activePane.value===(n.name||n.label):!1),l=e.computed(()=>`pane-${(n.name||n.label).replace(/\s+/g,"-").toLowerCase()}`),s=e.computed(()=>`tab-${(n.name||n.label).replace(/\s+/g,"-").toLowerCase()}`);return e.watch(r,i=>{i&&(o.value=!0)}),e.onMounted(()=>{a&&a.registerPane({label:n.label,name:n.name||n.label,disabled:n.disabled,icon:n.icon,badge:n.badge})}),e.onBeforeUnmount(()=>{a&&a.unregisterPane(n.name||n.label)}),(i,c)=>(e.openBlock(),e.createElementBlock("div",{id:l.value,class:e.normalizeClass(["datametria-tab-pane",{"is-active":r.value}]),role:"tabpanel","aria-labelledby":s.value,hidden:!r.value},[!t.lazy||r.value||o.value?e.renderSlot(i.$slots,"default",{key:0},void 0,!0):e.createCommentVNode("",!0)],10,ym))}}),[["__scopeId","data-v-f5e4ae22"]]);function Bm(t={}){const n=e.ref(!1),a=e.ref(null),o=e.ref(null),r=async(d,h={})=>{n.value=!0,a.value=null;try{const u=t.baseURL?`${t.baseURL}${d}`:d,f=await fetch(u,{...h,headers:{"Content-Type":"application/json",...t.headers,...h.headers}});if(!f.ok)throw new Error(`HTTP ${f.status}: ${f.statusText}`);const B=await f.json();return o.value=B,B}catch(u){throw a.value=u.message||"Request failed",u}finally{n.value=!1}};return{loading:n,error:a,data:o,get:(d,h)=>r(d,{...h,method:"GET"}),post:(d,h,u)=>r(d,{...u,method:"POST",body:JSON.stringify(h)}),put:(d,h,u)=>r(d,{...u,method:"PUT",body:JSON.stringify(h)}),delete:(d,h)=>r(d,{...h,method:"DELETE"})}}function Em(){const t=e.ref(1),n="datametria-accessibility-scale",a=.8,o=2,r=e.computed(()=>Math.max(a,Math.min(o,t.value))),l=e.computed(()=>{const B=r.value;return B<=.9?"scale-small":B>=1.1?"scale-large":"scale-normal"}),s=B=>{const C=Math.max(a,Math.min(o,B));document.documentElement.style.setProperty("--user-scale",C.toString()),t.value=C},i=B=>{try{localStorage.setItem(n,B.toString())}catch(C){console.warn("Failed to save accessibility scale:",C)}},c=()=>{try{const B=localStorage.getItem(n);return B?parseFloat(B):1}catch(B){return console.warn("Failed to load accessibility scale:",B),1}},d=B=>{s(B),i(r.value)},h=()=>{d(t.value+.1)},u=()=>{d(t.value-.1)},f=()=>{d(1)};return e.watch(t,B=>{s(B)}),e.onMounted(()=>{const B=c();s(B)}),{scale:r,scaleClass:l,setScale:d,increaseScale:h,decreaseScale:u,resetScale:f,minScale:a,maxScale:o}}const F={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function wm(){const t=e.ref(0),n=()=>{t.value=window.innerWidth},a=y=>t.value>=F[y],o=y=>t.value<=F[y],r=(y,E)=>t.value>=F[y]&&t.value<=F[E],l=()=>{const y=t.value;return y>=F["2xl"]?"2xl":y>=F.xl?"xl":y>=F.lg?"lg":y>=F.md?"md":y>=F.sm?"sm":"xs"},s=()=>t.value<F.sm,i=()=>a("sm")&&t.value<F.md,c=()=>a("md")&&t.value<F.lg,d=()=>a("lg")&&t.value<F.xl,h=()=>a("xl")&&t.value<F["2xl"],u=()=>a("2xl"),f=()=>t.value<F.md,B=()=>r("md","lg"),C=()=>a("lg");return e.onMounted(()=>{n(),window.addEventListener("resize",n)}),e.onUnmounted(()=>{window.removeEventListener("resize",n)}),{windowWidth:t,breakpoints:F,isGreaterOrEqual:a,isLessOrEqual:o,isBetween:r,getCurrentBreakpoint:l,isXs:s,isSm:i,isMd:c,isLg:d,isXl:h,is2xl:u,isMobile:f,isTablet:B,isDesktop:C}}function $m(t={}){const{color:n="rgba(255, 255, 255, 0.3)",duration:a=600,disabled:o=!1}=t,r=e.ref(),l=e.ref([]),s=y=>{if(o||!r.value)return;const E=r.value,g=E.getBoundingClientRect();let b,$;if(y instanceof MouseEvent)b=y.clientX,$=y.clientY;else{const I=y.touches[0]||y.changedTouches[0];b=I.clientX,$=I.clientY}const N=b-g.left,D=$-g.top,_=Math.max(g.width,g.height),V=document.createElement("div");V.className="datametria-ripple",V.style.cssText=`
|
|
2
662
|
position: absolute;
|
|
3
|
-
left: ${N-
|
|
4
|
-
top: ${D-
|
|
5
|
-
width: ${
|
|
6
|
-
height: ${
|
|
663
|
+
left: ${N-_/2}px;
|
|
664
|
+
top: ${D-_/2}px;
|
|
665
|
+
width: ${_}px;
|
|
666
|
+
height: ${_}px;
|
|
7
667
|
border-radius: 50%;
|
|
8
|
-
background: ${
|
|
668
|
+
background: ${n};
|
|
9
669
|
transform: scale(0);
|
|
10
|
-
animation: ripple-animation ${
|
|
670
|
+
animation: ripple-animation ${a/1e3}s ease-out;
|
|
11
671
|
pointer-events: none;
|
|
12
672
|
z-index: 1;
|
|
13
|
-
`,
|
|
673
|
+
`,E.appendChild(V),setTimeout(()=>{V.parentNode&&V.parentNode.removeChild(V)},a)},i=y=>{s(y)},c=y=>y?(r.value=y,window.getComputedStyle(y).position==="static"&&(y.style.position="relative"),y.style.overflow="hidden",y.addEventListener("click",i),()=>{y.removeEventListener("click",i)}):void 0,d=y=>{const E=l.value.findIndex(g=>g.id===y);E>-1&&l.value.splice(E,1)},h=()=>{l.value=[]};e.onUnmounted(()=>{h()});const u=y=>({position:"absolute",left:`${y.x}px`,top:`${y.y}px`,width:`${y.size}px`,height:`${y.size}px`,borderRadius:"50%",backgroundColor:n,transform:"scale(0)",animation:`ripple-animation ${a}ms ease-out`,pointerEvents:"none",zIndex:1}),f=()=>{const y="ripple-keyframes";if(document.getElementById(y))return;const E=document.createElement("style");E.id=y,E.textContent=`
|
|
14
674
|
@keyframes ripple-animation {
|
|
15
675
|
0% {
|
|
16
676
|
transform: scale(0);
|
|
@@ -30,7 +690,7 @@
|
|
|
30
690
|
}
|
|
31
691
|
}
|
|
32
692
|
}
|
|
33
|
-
`,document.head.appendChild(
|
|
693
|
+
`,document.head.appendChild(E)},B=()=>{if(r.value)return c(r.value)},C=()=>{r.value&&r.value.removeEventListener("click",i)};return e.onMounted(()=>{f(),r.value&&B()}),e.watch(r,y=>{y&&B()}),{rippleRef:r,ripples:l,applyRipple:c,removeRipple:d,clearRipples:h,getRippleStyle:u,createRipple:s,addRippleEffect:B,removeRippleEffect:C}}function Cm(t={}){const{enabled:n=!0,fallbackToVisual:a=!0,visualDuration:o=150}=t,r=e.ref(!1),l=e.ref(n),s=e.ref(null),i=()=>!!("hapticFeedback"in navigator&&navigator.hapticFeedback||"vibrate"in navigator&&typeof navigator.vibrate=="function"),c=p=>{if(!("vibrate"in navigator)||typeof navigator.vibrate!="function")return!1;try{return navigator.vibrate(p)}catch(m){return console.warn("Haptic feedback failed:",m),!1}},d=(p,m)=>{if(!a)return;const S=`visual-${Date.now()}`;if(s.value=S,m){const k=m.style.transform,x=m.style.transition;switch(m.style.transition="transform 75ms ease-out",p){case"light":m.style.transform="scale(0.98)";break;case"medium":m.style.transform="scale(0.95)";break;case"heavy":m.style.transform="scale(0.92)";break;case"selection":m.style.transform="scale(1.02)";break;default:m.style.transform="scale(0.97)"}setTimeout(()=>{m.style.transform=k,setTimeout(()=>{m.style.transition=x,s.value===S&&(s.value=null)},75)},75)}setTimeout(()=>{s.value===S&&(s.value=null)},o)},h=p=>{if(!l.value)return;let m=!1;r.value&&(m=c(10)),!m&&a&&d("light",p)},u=p=>{if(!l.value)return;let m=!1;r.value&&(m=c(20)),!m&&a&&d("medium",p)},f=p=>{if(!l.value)return;let m=!1;r.value&&(m=c(40)),!m&&a&&d("heavy",p)},B=p=>{if(!l.value)return;let m=!1;r.value&&(m=c(5)),!m&&a&&d("selection",p)},C=(p="medium",m)=>{switch(p){case"light":h(m);break;case"medium":u(m);break;case"heavy":f(m);break}},y=(p,m)=>{if(!l.value)return;let S;switch(p){case"success":S=[10,50,10];break;case"warning":S=[20,100,20,100,20];break;case"error":S=[50,100,50,100,50];break}let k=!1;r.value&&(k=c(S)),!k&&a&&d("notification",m)},E=(p,m)=>{if(!l.value)return;let S=!1;r.value&&(S=c(p)),!S&&a&&d("medium",m)},g=()=>{l.value=!0},b=()=>{l.value=!1},$=()=>{l.value=!l.value},N=e.computed(()=>r.value&&l.value),D=e.computed(()=>s.value!==null),_=(p="light")=>{if(!l.value)return!1;if("hapticFeedback"in navigator&&navigator.hapticFeedback)try{return navigator.hapticFeedback.impact(p)}catch(m){console.warn("Haptic feedback failed:",m)}if("vibrate"in navigator&&typeof navigator.vibrate=="function"){let m;switch(p){case"light":m=10;break;case"medium":m=20;break;case"heavy":m=30;break;case"success":m=[10,50,10];break;case"warning":m=[20,100,20];break;case"error":m=[50,100,50,100,50];break;default:m=10}try{return navigator.vibrate(m)}catch(S){return console.warn("Vibration failed:",S),!1}}return!1},V=()=>{const p="haptic-keyframes";if(document.getElementById(p))return;const m=document.createElement("style");m.id=p,m.textContent=`
|
|
34
694
|
@keyframes haptic-pulse-light {
|
|
35
695
|
0% { transform: scale(1); }
|
|
36
696
|
50% { transform: scale(0.98); }
|
|
@@ -71,4 +731,4 @@
|
|
|
71
731
|
0%, 100% { transform: none; filter: none; }
|
|
72
732
|
}
|
|
73
733
|
}
|
|
74
|
-
`,document.head.appendChild(
|
|
734
|
+
`,document.head.appendChild(m)},I=(p,m)=>{if(!p)return;V();const S=p.style.animation;let k,x;switch(m){case"light":k="haptic-pulse-light 0.15s ease-out",x=150;break;case"medium":k="haptic-pulse-medium 0.2s ease-out",x=200;break;case"heavy":k="haptic-pulse-heavy 0.25s ease-out",x=250;break;case"success":k="haptic-success 0.3s ease-out",x=300;break;case"warning":k="haptic-pulse-medium 0.2s ease-out",x=200;break;case"error":k="haptic-error 0.4s ease-out",x=400;break;default:k="haptic-pulse-light 0.15s ease-out",x=150}p.style.animation=k,setTimeout(()=>{p.style.animation=S},x)},w=(p,m)=>{const S=_(m);return I(p,m),S},T=()=>{const p=i();return r.value=p,p};return T(),{isSupported:r,isEnabled:l,canVibrate:N,hasVisualFeedback:D,activeVisualFeedback:s,triggerHaptic:_,triggerVisualFeedback:I,feedback:w,checkSupport:T,light:h,medium:u,heavy:f,selection:B,impact:C,notification:y,custom:E,enable:g,disable:b,toggle:$,detectHapticSupport:i}}function Vm(t,n){const a=localStorage.getItem(t);let o=n;if(a)try{o=JSON.parse(a)}catch{o=n}const r=e.ref(o);return e.watch(r,l=>{localStorage.setItem(t,JSON.stringify(l))},{deep:!0}),r}function Sm(t,n=300){const a=e.ref(t.value);let o=null;return e.watch(t,r=>{o&&clearTimeout(o),o=setTimeout(()=>{a.value=r},n)}),a}function Dm(){const t=e.ref(!1),n=e.ref(null);return{copied:t,error:n,copy:async r=>{try{return await navigator.clipboard.writeText(r),t.value=!0,n.value=null,setTimeout(()=>{t.value=!1},2e3),!0}catch(l){return n.value=l.message||"Copy failed",t.value=!1,!1}},read:async()=>{try{const r=await navigator.clipboard.readText();return n.value=null,r}catch(r){return n.value=r.message||"Read failed",""}}}}const Lt=Symbol("theme"),Nm="dm",xm="--",Im=A(e.defineComponent({__name:"ThemeProvider",props:{theme:{},prefix:{default:Nm}},setup(t){const n=t,a=e.computed(()=>n.theme);e.provide(Lt,a);const o=e.computed(()=>`${n.prefix}-theme`),r=e.computed(()=>{const l={},{tokens:s}=n.theme,i=`${xm}${n.prefix}`;return l[`${i}-primary`]=s.colors.primary,l[`${i}-secondary`]=s.colors.secondary,l[`${i}-success`]=s.colors.success,l[`${i}-warning`]=s.colors.warning,l[`${i}-error`]=s.colors.error,l[`${i}-info`]=s.colors.info,Object.entries(s.colors.neutral).forEach(([c,d])=>{l[`${i}-neutral-${c}`]=d}),l[`${i}-font-sans`]=s.typography.fontFamily.sans,l[`${i}-font-mono`]=s.typography.fontFamily.mono,Object.entries(s.typography.fontSize).forEach(([c,d])=>{l[`${i}-text-${c}`]=d}),Object.entries(s.typography.fontWeight).forEach(([c,d])=>{l[`${i}-font-${c}`]=d.toString()}),Object.entries(s.typography.lineHeight).forEach(([c,d])=>{l[`${i}-leading-${c}`]=d.toString()}),Object.entries(s.spacing).forEach(([c,d])=>{l[`${i}-space-${c}`]=d}),Object.entries(s.radius).forEach(([c,d])=>{l[`${i}-radius-${c}`]=d}),Object.entries(s.shadows).forEach(([c,d])=>{l[`${i}-shadow-${c}`]=d}),Object.entries(s.transitions).forEach(([c,d])=>{l[`${i}-transition-${c}`]=d}),l});return(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.value),style:e.normalizeStyle(r.value)},[e.renderSlot(l.$slots,"default",{},void 0,!0)],6))}}),[["__scopeId","data-v-142d90bc"]]);function Tm(){const t=e.inject(Lt);if(!t)throw new Error('useTheme must be used within a ThemeProvider. Wrap your component tree with <ThemeProvider :theme="yourTheme">');return t}const Mm={name:"DATAMETRIA",tokens:{colors:{primary:"#0072CE",secondary:"#4B0078",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",neutral:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"}},typography:{fontFamily:{sans:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',mono:'Menlo, Monaco, Consolas, "Courier New", monospace'},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},fontWeight:{normal:400,medium:500,semibold:600,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{0:"0",1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",6:"1.5rem",8:"2rem",12:"3rem",16:"4rem",20:"5rem",24:"6rem"},radius:{none:"0",sm:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem",full:"9999px"},shadows:{none:"none",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},transitions:{fast:"150ms cubic-bezier(0.4, 0, 0.2, 1)",base:"200ms cubic-bezier(0.4, 0, 0.2, 1)",slow:"300ms cubic-bezier(0.4, 0, 0.2, 1)"}}},Am={name:"Default",tokens:{colors:{primary:"#3b82f6",secondary:"#8b5cf6",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",neutral:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"}},typography:{fontFamily:{sans:"system-ui, -apple-system, sans-serif",mono:"ui-monospace, monospace"},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},fontWeight:{normal:400,medium:500,semibold:600,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{0:"0",1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",6:"1.5rem",8:"2rem",12:"3rem",16:"4rem",20:"5rem",24:"6rem"},radius:{none:"0",sm:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem",full:"9999px"},shadows:{none:"none",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},transitions:{fast:"150ms cubic-bezier(0.4, 0, 0.2, 1)",base:"200ms cubic-bezier(0.4, 0, 0.2, 1)",slow:"300ms cubic-bezier(0.4, 0, 0.2, 1)"}}};M.DatametriaAlert=Gs,M.DatametriaAutocomplete=gs,M.DatametriaAvatar=gd,M.DatametriaBadge=kd,M.DatametriaBreadcrumb=em,M.DatametriaButton=Lo,M.DatametriaCard=Cs,M.DatametriaCheckbox=xr,M.DatametriaCheckboxGroup=Rr,M.DatametriaChip=Ed,M.DatametriaContainer=zs,M.DatametriaDataTable=Fc,M.DatametriaDatePicker=ml,M.DatametriaDialog=Ns,M.DatametriaDivider=Os,M.DatametriaEmpty=pd,M.DatametriaFileUpload=es,M.DatametriaFloatingBar=Ld,M.DatametriaForm=bs,M.DatametriaFormItem=_s,M.DatametriaGrid=Rs,M.DatametriaInput=Yo,M.DatametriaMenu=Jd,M.DatametriaModal=As,M.DatametriaNavbar=Nd,M.DatametriaPagination=Wc,M.DatametriaPasswordInput=fr,M.DatametriaPopconfirm=Ii,M.DatametriaProgress=ki,M.DatametriaRadio=Pr,M.DatametriaRadioGroup=Kr,M.DatametriaResult=Si,M.DatametriaSelect=Vr,M.DatametriaSidebar=zd,M.DatametriaSkeleton=ci,M.DatametriaSlider=Rl,M.DatametriaSortableTable=Bc,M.DatametriaSpinner=Ai,M.DatametriaSteps=dm,M.DatametriaSwitch=Xr,M.DatametriaTabPane=_m,M.DatametriaTable=Pi,M.DatametriaTabs=km,M.DatametriaTextarea=al,M.DatametriaTimePicker=wl,M.DatametriaToast=Qs,M.DatametriaTooltip=ai,M.DatametriaTree=ad,M.DatametriaUpload=ps,M.ThemeProvider=Im,M.custom=Rt,M.datametriaTheme=Mm,M.defaultTheme=Am,M.email=Tt,M.maxLength=At,M.minLength=Mt,M.pattern=zt,M.required=It,M.useAPI=Bm,M.useAccessibilityScale=Em,M.useBreakpoints=wm,M.useClipboard=Dm,M.useDebounce=Sm,M.useHapticFeedback=Cm,M.useLocalStorage=Vm,M.useRipple=$m,M.useTheme=Tm,M.useValidation=Ft,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
|