const svgData = { more: ` Created with maiwd-zct. `, time: ` Created with maiwd-zct. `, location: ` Created with maiwd-zct. `, invite: ` Created with maiwd-zct. `, phone: ` Created with maiwd-zct. `, clock: ` Created with maiwd-zct. `, down: ` Created with maiwd-zct. `, release: ` Created with maiwd-zct. `, security: ` Created with maiwd-zct. `, sheet: ` Created with maiwd-zct. `, fees: ` Created with maiwd-zct. `, pay: ` Created with maiwd-zct. `, edit: ` Created with maiwd-zct. `, navigation: ` Created with maiwd-zct. `, network: ` Created with maiwd-zct. `, share: ` Created with maiwd-zct. `, download: ` Created with maiwd-zct. `, upload: ` Created with maiwd-zct. `, address: ` `, details: ` `, auth: ` `, rectangle: ` `, search: ` `, expand: ` `, } module.exports = { svgToUrl(key, color) { var url = svgData[key] var encoded = url .replace(//g, "") .replace(/[\r\n]/g, " ") .replace(/"/g, `'`) .replace(/%/g, "%25") .replace(/&/g, "%26") .replace(/#/g, "%23") .replace(/{/g, "%7B") .replace(/}/g, "%7D") .replace(//g, "%3E") let res = '"' + `data:image/svg+xml,${encoded}` + '"'; if (color) { res = res.replaceAll("%23325DFF", color.replace("#", "%23")) } return res }, }