import { isSolanaLike as e, isTronLike as t, networkRegistry as n } from "../../constants/chains.constants.mjs";
//#region libs/shared/common/src/functions/utils/string.utils.ts
function r(e) {
	return e?.toLowerCase().split(" ").map((e) => e.charAt(0).toUpperCase() + e.substring(1)).join(" ");
}
function i(e) {
	return e.charAt(0).toUpperCase() + e.slice(1);
}
function a(e) {
	return !e || e === null || Array.isArray(e) && e.length === 0 ? !0 : Object.keys(e).length === 0 && e.constructor === Object;
}
var o = (e) => {
	e.startsWith("0x") && (e = e.slice(2));
	let t = [];
	for (let n = 0; n < e.length; n += 2) {
		let r = parseInt(e.slice(n, n + 2), 16);
		t.push(r);
	}
	return new TextDecoder("utf-8").decode(new Uint8Array(t));
}, s = (n, r) => {
	let i = `${n}-${r}`;
	return e(r) || t(r) ? i : i.toLowerCase();
}, c = (e, t, r = !1) => {
	let i = `${e}-${t}`;
	if (r) {
		let { hinkalAddress: e } = n[t].contractData;
		return `${i}-${e}`.toLowerCase();
	}
	return i.toLowerCase();
}, l = (e) => {
	let [, t] = e.split("-");
	return Number(t);
}, u = (e) => {
	let [t] = e.split("-");
	return t;
}, d = (e, t, n) => {
	if (!t || !n) throw Error("oldPart and newPart must be provided");
	return e.toLowerCase().split(t.toLowerCase()).join(n.toLowerCase());
}, f = (e) => !e || e.trim().length === 0 ? null : e.toLowerCase().replace(/\b\w/g, (e) => e.toUpperCase()), p = (e) => e ? /^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,}$/.test(e) : !1;
//#endregion
export { i as capitalizeFirstLetter, f as capitalizeName, u as getAddressFromStateKey, l as getChainIdFromStateKey, c as getStateKey, s as getTokenStateKey, o as hexToUtf8, a as isNullOrEmpty, d as replaceAllInstances, r as toTitleCase, p as validateEmail };
