function n(){return Math.random().toString(16).slice(-4)}function t(t=""){return t+"-"+n()+n()+"-"+n()+"-"+n()+n()+n()}function e(n){if(void 0===n)return!0;if(null==n)return!0;if(0===(null==n?void 0:n.length))return!0;if((null==n?void 0:n.length)>0)return!1;for(const t in n)if(n.hasOwnProperty(t))return!1;return JSON.stringify(n)===JSON.stringify({})}const r=n=>n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1_$2").toLowerCase(),o=n=>e(n)?null:`${n}`.replace(/\[([^\]]+)\]/g,".$1");function u(n,t={}){return Object.keys(t).length?Object.keys(t).reduce(((n,e)=>n.replaceAll(`{${e}}`,t[e])),n):n}function c(n,t={}){return u(function(n){return(n||"").replace(/(\:).+?(\:)/g,(n=>`<i class="icon-${n.replaceAll(":","")}"></i>`))}(function(n){return(n||"").replace(/(\*).+?(\*)/g,(n=>`<strong>${n.replaceAll("*","")}</strong>`))}(function(n){return(n||"").replace(/(\_).+?(\_)/g,(n=>`<em>${n.replaceAll("_","")}</em>`))}(function(n){return(n||"").replace(/(\`).+?(\`)/g,(n=>`<code>${n.replaceAll("`","")}</code>`))}(n)))),t)}function i(){const n=document.querySelector("html").getAttribute("lang")||"es";return["en","es"].includes(n)?n:"es"}function a(n){switch(n){case 400:return"error";case 401:case 403:return"forbidden";case 402:return"payment";case 404:case 405:return"unknown";case 406:return"no-result";case 412:case 418:return"invalid";case 422:return"missing";case 500:return"exception";default:return"failure"}}function s(...n){return n.reduce(((n,t)=>("object"==typeof t&&"string"!=typeof t&&(n=n.concat(Object.keys(t).filter((n=>t[n])))),"object"!=typeof t&&"string"==typeof t&&n.push(t),n)),[]).join(" ")}function f(){if(document.querySelector("body > x-overlay-container"))return document.querySelector("body > x-overlay-container");{const n=document.createElement("x-overlay-container");return document.querySelector("body").appendChild(n),n}}function l(n){var t;const e=f(),r=parseInt(null!==(t=e.dataset.lastIndex)&&void 0!==t?t:"0")+1;n.style.zIndex=(9e3+r).toString(),e.dataset.lastIndex=r.toString()}function d(){if(f().querySelector("x-tooltip-overlay"))return f().querySelector("x-tooltip-overlay");{const n=document.createElement("x-tooltip-overlay"),t=document.createElement("span"),e=document.createElement("div");return n.setAttribute("role","tooltip"),e.classList.add("tooltip-arrow"),n.appendChild(t),n.appendChild(e),f().appendChild(n),n}}function p(n="top"){if(f().querySelector(`x-notification-${n}`))return f().querySelector(`x-notification-${n}`);{const t=document.createElement(`x-notification-${n}`);return f().appendChild(t),t}}const b=n=>{if(isNaN(n)||n<0)return"0 b";const t=["b","Kb","Mb","Gb","Tb","Pb"];let e=0;for(;n>=1e3&&e<t.length-1;)n/=1e3,e++;return`${n.toFixed(1)}${t[e]}`},m=()=>parseFloat(getComputedStyle(document.documentElement).fontSize);export{i as a,a as b,s as c,t as d,l as e,f,p as g,d as h,e as i,r as j,u as k,o as l,m,b as p,c as t}