{"version":3,"sources":["../node_modules/@iconify/react/dist/iconify.mjs"],"names":["matchName","iconDefaults","Object","freeze","left","top","width","height","rotate","vFlip","hFlip","fullIcon","data","stringToIcon","value","validate","allowSimpleName","provider","arguments","length","undefined","colonSeparated","split","slice","shift","name2","pop","prefix","result","name","validateIcon","dashSeparated","join","icon","match","getIconData$1","full","getIcon","iteration","icons","assign","aliases","item","result2","parent","alias","key","prop","mergeIconData","chars","parseIconSet","callback","options","names","not_found","Array","forEach","push","keys","iconData","parseAliases","isVariation","optionalProperties","quicklyValidateIconSet","obj","body","storage$1","create","w","window","self","_iconifyStorage","version","storage","err","getStorage","providerStorage","missing","newStorage","addIconSet","storage2","t","Date","now","getIconFromStorage","simpleNames","allowSimpleNames","allow","getIconData","addIcon","addIconToStorage","defaults","inline","hAlign","vAlign","mergeCustomisations","defaults2","attr","unitsSplit","unitsTest","calculateSize","size","ratio","precision","Math","ceil","oldParts","newParts","code","isNumber","test","num","parseFloat","isNaN","preserveAspectRatio","props","iconToSVG","customisations","box","transformations","tempValue","rotation","toString","floor","unshift","attributes","viewBox","regex","randomPrefix","random","counter","replaceIDs","ids","exec","id","newID","escapedID","replace","RegExp","setAPIModule","getAPIModule","createAPIConfig","source","resources","path","maxURL","timeout","index","dataAfterTimeout","configStorage","fallBackAPISources","fallBackAPI","addAPIProvider","customConfig","config","getAPIConfig","concat","mergeParams","base","params","hasParams","indexOf","encodeURIComponent","Error","paramToString","maxLengthCache","pathCache","fetchModule","detectFetch","fetch","fetchAPIModule","prepare","results","maxLength","maxHostLength","host","max","url","cacheKey","calculateMaxLength","type","send","getPath","iconsList","uri","defaultError","then","response","status","json","setTimeout","shouldAbort","catch","callbacks","pendingUpdates","removeCallback","sources","providerCallbacks","items","filter","row","idCounter","defaultConfig","sendQuery","payload","query","done","resourcesCount","startIndex","list","nextIndex","startTime","lastError","queriesSent","timer","queue","doneCallbacks","resetTimer","clearTimeout","abort","subscribe","overwrite","failQuery","clearQueue","execNext","resource","status2","isError","queued","moduleResponse","queriesPending","initRedundancy","cfg","newConfig","setConfig","queries","cleanup","queryCallback","doneCallback","query2","error","find","setIndex","getIndex","emptyCallback$1","redundancyCache","sendAPIQuery","target","redundancy","api","cached","cachedReundancy","getRedundancyCache","cache","emptyCallback","pendingIcons","iconsToLoad","loaderFlags","queueFlags","loadedNewIcons","providerLoaderFlags","providerPendingUpdates","hasPending","oldLength","pending","loaded","updateCallbacks","errorsCache","loadNewIcons","providerIconsToLoad","providerQueueFlags","providerPendingIcons","sort","icons2","time","console","parsed","store","err2","loadIcons","cleanedIcons","listToIcons","sortedIcons","a","b","localeCompare","lastIcon","localStorage","sortIcons","callCallback","newIcons","lastProvider","lastPrefix","providerNewIcons","pendingQueue","pendingSources","bind","storeCallback","cacheVersion","cachePrefix","countKey","versionKey","hour","local","session","count","emptyList","_window","getGlobal","setCount","setItem","getCount","count2","getItem","total","parseInt","loadCache","minTime","load","func","valid","JSON","parse","removeItem","i","destroyCache","initCache","storeCache","stringify","separator","flipFromString","custom","flip","str","trim","alignmentFromString","align","rotateFromString","defaultValue","units","value2","svgDefaults","inlineDefaults","document","IconifyPreload","preload","added","addCollection","e","IconifyProviders","providers","IconComponent","React","Component","constructor","super","this","state","_abortLoading","_loading","_setData","setState","_checkIcon","changed","_icon","iconName","classes","onLoad","componentDidMount","componentDidUpdate","oldProps","componentWillUnmount","render","children","createElement","newProps","className","ref","defaultProps","style","componentProps","color","localCounter","dangerouslySetInnerHTML","__html","verticalAlign","_inline","_ref","Icon","forwardRef"],"mappings":"6FAAA,8CAEA,MAAMA,EAAY,2BACZC,EAAeC,OAAOC,OAAO,CACjCC,KAAM,EACNC,IAAK,EACLC,MAAO,GACPC,OAAQ,GACRC,OAAQ,EACRC,OAAO,EACPC,OAAO,IAET,SAASC,EAASC,GAChB,MAAO,IAAKX,KAAiBW,EAC/B,CAEA,MAAMC,EAAe,SAACC,EAAOC,EAAUC,GAAmC,IAAlBC,EAAQC,UAAAC,OAAA,QAAAC,IAAAF,U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EjB,kBAAVA,IACZuG,EAAevE,GAAOhC,GAE1B,MAEJ,IAAK,aACL,IAAK,eACa,IAAVA,GAA4B,SAAVA,UACX8W,EAAe,eAE1B,MAEJ,aAC8B,IAAtBF,EAAa5U,KACb8U,EAAe9U,GAAOhC,GAGtC,CAEA,MAAM4B,EAAO0E,EAAUnF,EAAMoF,GAE7B,IAAIyQ,EAAe,EACfxP,EAAKnB,EAAMmB,GACG,kBAAPA,IAEPA,EAAKA,EAAGG,QAAQ,KAAM,MAG1BmP,EAAeG,wBAA0B,CACrCC,OAAQ7P,EAAWzF,EAAKuB,KAAMqE,EAAK,IAAMA,EAAK,KAAOwP,IAAiB,iBAE1E,IAAK,IAAIhV,KAAOJ,EAAKmF,WACjB+P,EAAe9U,GAAOJ,EAAKmF,WAAW/E,GAK1C,OAHIJ,EAAKkD,aAAkC,IAAxB+R,EAAMM,gBACrBN,EAAMM,cAAgB,YAEnBjC,EAAMsB,cAAc,MAAOM,EAAe,EA0NtCR,CAAOnV,EAAKrB,KAAM2W,EAAUpQ,EAAM+Q,QAAS/Q,EAAMgR,KAC5D,EAOJ,MAAMC,GAAOpC,EAAMqC,YAAW,SAAclR,EAAOsQ,GAC/C,MAAMF,EAAW,IACVpQ,EACHgR,KAAMV,EACNS,SAAS,GAEb,OAAOlC,EAAMsB,cAAcvB,GAAewB,EAC9C,IAMmBvB,EAAMqC,YAAW,SAAoBlR,EAAOsQ,GAC3D,MAAMF,EAAW,IAAKpQ,EAAOgR,KAAMV,EAAKS,SAAS,GACjD,OAAOlC,EAAMsB,cAAcvB,GAAewB,EAC9C,G","file":"static/js/17.cb8b2593.chunk.js","sourcesContent":["import React from 'react';\n\nconst matchName = /^[a-z0-9]+(-[a-z0-9]+)*$/;\nconst iconDefaults = Object.freeze({\n left: 0,\n top: 0,\n width: 16,\n height: 16,\n rotate: 0,\n vFlip: false,\n hFlip: false\n});\nfunction fullIcon(data) {\n return { ...iconDefaults, ...data };\n}\n\nconst stringToIcon = (value, validate, allowSimpleName, provider = \"\") => {\n const colonSeparated = value.split(\":\");\n if (value.slice(0, 1) === \"@\") {\n if (colonSeparated.length < 2 || colonSeparated.length > 3) {\n return null;\n }\n provider = colonSeparated.shift().slice(1);\n }\n if (colonSeparated.length > 3 || !colonSeparated.length) {\n return null;\n }\n if (colonSeparated.length > 1) {\n const name2 = colonSeparated.pop();\n const prefix = colonSeparated.pop();\n const result = {\n provider: colonSeparated.length > 0 ? colonSeparated[0] : provider,\n prefix,\n name: name2\n };\n return validate && !validateIcon(result) ? null : result;\n }\n const name = colonSeparated[0];\n const dashSeparated = name.split(\"-\");\n if (dashSeparated.length > 1) {\n const result = {\n provider,\n prefix: dashSeparated.shift(),\n name: dashSeparated.join(\"-\")\n };\n return validate && !validateIcon(result) ? null : result;\n }\n if (allowSimpleName && provider === \"\") {\n const result = {\n provider,\n prefix: \"\",\n name\n };\n return validate && !validateIcon(result, allowSimpleName) ? null : result;\n }\n return null;\n};\nconst validateIcon = (icon, allowSimpleName) => {\n if (!icon) {\n return false;\n }\n return !!((icon.provider === \"\" || icon.provider.match(matchName)) && (allowSimpleName && icon.prefix === \"\" || icon.prefix.match(matchName)) && icon.name.match(matchName));\n};\n\nfunction mergeIconData(icon, alias) {\n const result = { ...icon };\n for (const key in iconDefaults) {\n const prop = key;\n if (alias[prop] !== void 0) {\n const value = alias[prop];\n if (result[prop] === void 0) {\n result[prop] = value;\n continue;\n }\n switch (prop) {\n case \"rotate\":\n result[prop] = (result[prop] + value) % 4;\n break;\n case \"hFlip\":\n case \"vFlip\":\n result[prop] = value !== result[prop];\n break;\n default:\n result[prop] = value;\n }\n }\n }\n return result;\n}\n\nfunction getIconData$1(data, name, full = false) {\n function getIcon(name2, iteration) {\n if (data.icons[name2] !== void 0) {\n return Object.assign({}, data.icons[name2]);\n }\n if (iteration > 5) {\n return null;\n }\n const aliases = data.aliases;\n if (aliases && aliases[name2] !== void 0) {\n const item = aliases[name2];\n const result2 = getIcon(item.parent, iteration + 1);\n if (result2) {\n return mergeIconData(result2, item);\n }\n return result2;\n }\n const chars = data.chars;\n if (!iteration && chars && chars[name2] !== void 0) {\n return getIcon(chars[name2], iteration + 1);\n }\n return null;\n }\n const result = getIcon(name, 0);\n if (result) {\n for (const key in iconDefaults) {\n if (result[key] === void 0 && data[key] !== void 0) {\n result[key] = data[key];\n }\n }\n }\n return result && full ? fullIcon(result) : result;\n}\n\nfunction isVariation(item) {\n for (const key in iconDefaults) {\n if (item[key] !== void 0) {\n return true;\n }\n }\n return false;\n}\nfunction parseIconSet(data, callback, options) {\n options = options || {};\n const names = [];\n if (typeof data !== \"object\" || typeof data.icons !== \"object\") {\n return names;\n }\n if (data.not_found instanceof Array) {\n data.not_found.forEach((name) => {\n callback(name, null);\n names.push(name);\n });\n }\n const icons = data.icons;\n Object.keys(icons).forEach((name) => {\n const iconData = getIconData$1(data, name, true);\n if (iconData) {\n callback(name, iconData);\n names.push(name);\n }\n });\n const parseAliases = options.aliases || \"all\";\n if (parseAliases !== \"none\" && typeof data.aliases === \"object\") {\n const aliases = data.aliases;\n Object.keys(aliases).forEach((name) => {\n if (parseAliases === \"variations\" && isVariation(aliases[name])) {\n return;\n }\n const iconData = getIconData$1(data, name, true);\n if (iconData) {\n callback(name, iconData);\n names.push(name);\n }\n });\n }\n return names;\n}\n\nconst optionalProperties = {\n provider: \"string\",\n aliases: \"object\",\n not_found: \"object\"\n};\nfor (const prop in iconDefaults) {\n optionalProperties[prop] = typeof iconDefaults[prop];\n}\nfunction quicklyValidateIconSet(obj) {\n if (typeof obj !== \"object\" || obj === null) {\n return null;\n }\n const data = obj;\n if (typeof data.prefix !== \"string\" || !obj.icons || typeof obj.icons !== \"object\") {\n return null;\n }\n for (const prop in optionalProperties) {\n if (obj[prop] !== void 0 && typeof obj[prop] !== optionalProperties[prop]) {\n return null;\n }\n }\n const icons = data.icons;\n for (const name in icons) {\n const icon = icons[name];\n if (!name.match(matchName) || typeof icon.body !== \"string\") {\n return null;\n }\n for (const prop in iconDefaults) {\n if (icon[prop] !== void 0 && typeof icon[prop] !== typeof iconDefaults[prop]) {\n return null;\n }\n }\n }\n const aliases = data.aliases;\n if (aliases) {\n for (const name in aliases) {\n const icon = aliases[name];\n const parent = icon.parent;\n if (!name.match(matchName) || typeof parent !== \"string\" || !icons[parent] && !aliases[parent]) {\n return null;\n }\n for (const prop in iconDefaults) {\n if (icon[prop] !== void 0 && typeof icon[prop] !== typeof iconDefaults[prop]) {\n return null;\n }\n }\n }\n }\n return data;\n}\n\nconst storageVersion = 1;\nlet storage$1 = /* @__PURE__ */ Object.create(null);\ntry {\n const w = window || self;\n if (w && w._iconifyStorage.version === storageVersion) {\n storage$1 = w._iconifyStorage.storage;\n }\n} catch (err) {\n}\nfunction shareStorage() {\n try {\n const w = window || self;\n if (w && !w._iconifyStorage) {\n w._iconifyStorage = {\n version: storageVersion,\n storage: storage$1\n };\n }\n } catch (err) {\n }\n}\nfunction newStorage(provider, prefix) {\n return {\n provider,\n prefix,\n icons: /* @__PURE__ */ Object.create(null),\n missing: /* @__PURE__ */ Object.create(null)\n };\n}\nfunction getStorage(provider, prefix) {\n if (storage$1[provider] === void 0) {\n storage$1[provider] = /* @__PURE__ */ Object.create(null);\n }\n const providerStorage = storage$1[provider];\n if (providerStorage[prefix] === void 0) {\n providerStorage[prefix] = newStorage(provider, prefix);\n }\n return providerStorage[prefix];\n}\nfunction addIconSet(storage2, data) {\n if (!quicklyValidateIconSet(data)) {\n return [];\n }\n const t = Date.now();\n return parseIconSet(data, (name, icon) => {\n if (icon) {\n storage2.icons[name] = icon;\n } else {\n storage2.missing[name] = t;\n }\n });\n}\nfunction addIconToStorage(storage2, name, icon) {\n try {\n if (typeof icon.body === \"string\") {\n storage2.icons[name] = Object.freeze(fullIcon(icon));\n return true;\n }\n } catch (err) {\n }\n return false;\n}\nfunction getIconFromStorage(storage2, name) {\n const value = storage2.icons[name];\n return value === void 0 ? null : value;\n}\nfunction listIcons(provider, prefix) {\n let allIcons = [];\n let providers;\n if (typeof provider === \"string\") {\n providers = [provider];\n } else {\n providers = Object.keys(storage$1);\n }\n providers.forEach((provider2) => {\n let prefixes;\n if (typeof provider2 === \"string\" && typeof prefix === \"string\") {\n prefixes = [prefix];\n } else {\n prefixes = storage$1[provider2] === void 0 ? [] : Object.keys(storage$1[provider2]);\n }\n prefixes.forEach((prefix2) => {\n const storage2 = getStorage(provider2, prefix2);\n const icons = Object.keys(storage2.icons).map((name) => (provider2 !== \"\" ? \"@\" + provider2 + \":\" : \"\") + prefix2 + \":\" + name);\n allIcons = allIcons.concat(icons);\n });\n });\n return allIcons;\n}\n\nlet simpleNames = false;\nfunction allowSimpleNames(allow) {\n if (typeof allow === \"boolean\") {\n simpleNames = allow;\n }\n return simpleNames;\n}\nfunction getIconData(name) {\n const icon = typeof name === \"string\" ? stringToIcon(name, true, simpleNames) : name;\n return icon ? getIconFromStorage(getStorage(icon.provider, icon.prefix), icon.name) : null;\n}\nfunction addIcon(name, data) {\n const icon = stringToIcon(name, true, simpleNames);\n if (!icon) {\n return false;\n }\n const storage = getStorage(icon.provider, icon.prefix);\n return addIconToStorage(storage, icon.name, data);\n}\nfunction addCollection(data, provider) {\n if (typeof data !== \"object\") {\n return false;\n }\n if (typeof provider !== \"string\") {\n provider = typeof data.provider === \"string\" ? data.provider : \"\";\n }\n if (simpleNames && provider === \"\" && (typeof data.prefix !== \"string\" || data.prefix === \"\")) {\n let added = false;\n if (quicklyValidateIconSet(data)) {\n data.prefix = \"\";\n parseIconSet(data, (name, icon) => {\n if (icon && addIcon(name, icon)) {\n added = true;\n }\n });\n }\n return added;\n }\n if (typeof data.prefix !== \"string\" || !validateIcon({\n provider,\n prefix: data.prefix,\n name: \"a\"\n })) {\n return false;\n }\n const storage = getStorage(provider, data.prefix);\n return !!addIconSet(storage, data);\n}\nfunction iconExists(name) {\n return getIconData(name) !== null;\n}\nfunction getIcon(name) {\n const result = getIconData(name);\n return result ? { ...result } : null;\n}\n\nconst defaults = Object.freeze({\n inline: false,\n width: null,\n height: null,\n hAlign: \"center\",\n vAlign: \"middle\",\n slice: false,\n hFlip: false,\n vFlip: false,\n rotate: 0\n});\nfunction mergeCustomisations(defaults2, item) {\n const result = {};\n for (const key in defaults2) {\n const attr = key;\n result[attr] = defaults2[attr];\n if (item[attr] === void 0) {\n continue;\n }\n const value = item[attr];\n switch (attr) {\n case \"inline\":\n case \"slice\":\n if (typeof value === \"boolean\") {\n result[attr] = value;\n }\n break;\n case \"hFlip\":\n case \"vFlip\":\n if (value === true) {\n result[attr] = !result[attr];\n }\n break;\n case \"hAlign\":\n case \"vAlign\":\n if (typeof value === \"string\" && value !== \"\") {\n result[attr] = value;\n }\n break;\n case \"width\":\n case \"height\":\n if (typeof value === \"string\" && value !== \"\" || typeof value === \"number\" && value || value === null) {\n result[attr] = value;\n }\n break;\n case \"rotate\":\n if (typeof value === \"number\") {\n result[attr] += value;\n }\n break;\n }\n }\n return result;\n}\n\nconst unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;\nconst unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;\nfunction calculateSize(size, ratio, precision) {\n if (ratio === 1) {\n return size;\n }\n precision = precision === void 0 ? 100 : precision;\n if (typeof size === \"number\") {\n return Math.ceil(size * ratio * precision) / precision;\n }\n if (typeof size !== \"string\") {\n return size;\n }\n const oldParts = size.split(unitsSplit);\n if (oldParts === null || !oldParts.length) {\n return size;\n }\n const newParts = [];\n let code = oldParts.shift();\n let isNumber = unitsTest.test(code);\n while (true) {\n if (isNumber) {\n const num = parseFloat(code);\n if (isNaN(num)) {\n newParts.push(code);\n } else {\n newParts.push(Math.ceil(num * ratio * precision) / precision);\n }\n } else {\n newParts.push(code);\n }\n code = oldParts.shift();\n if (code === void 0) {\n return newParts.join(\"\");\n }\n isNumber = !isNumber;\n }\n}\n\nfunction preserveAspectRatio(props) {\n let result = \"\";\n switch (props.hAlign) {\n case \"left\":\n result += \"xMin\";\n break;\n case \"right\":\n result += \"xMax\";\n break;\n default:\n result += \"xMid\";\n }\n switch (props.vAlign) {\n case \"top\":\n result += \"YMin\";\n break;\n case \"bottom\":\n result += \"YMax\";\n break;\n default:\n result += \"YMid\";\n }\n result += props.slice ? \" slice\" : \" meet\";\n return result;\n}\nfunction iconToSVG(icon, customisations) {\n const box = {\n left: icon.left,\n top: icon.top,\n width: icon.width,\n height: icon.height\n };\n let body = icon.body;\n [icon, customisations].forEach((props) => {\n const transformations = [];\n const hFlip = props.hFlip;\n const vFlip = props.vFlip;\n let rotation = props.rotate;\n if (hFlip) {\n if (vFlip) {\n rotation += 2;\n } else {\n transformations.push(\"translate(\" + (box.width + box.left).toString() + \" \" + (0 - box.top).toString() + \")\");\n transformations.push(\"scale(-1 1)\");\n box.top = box.left = 0;\n }\n } else if (vFlip) {\n transformations.push(\"translate(\" + (0 - box.left).toString() + \" \" + (box.height + box.top).toString() + \")\");\n transformations.push(\"scale(1 -1)\");\n box.top = box.left = 0;\n }\n let tempValue;\n if (rotation < 0) {\n rotation -= Math.floor(rotation / 4) * 4;\n }\n rotation = rotation % 4;\n switch (rotation) {\n case 1:\n tempValue = box.height / 2 + box.top;\n transformations.unshift(\"rotate(90 \" + tempValue.toString() + \" \" + tempValue.toString() + \")\");\n break;\n case 2:\n transformations.unshift(\"rotate(180 \" + (box.width / 2 + box.left).toString() + \" \" + (box.height / 2 + box.top).toString() + \")\");\n break;\n case 3:\n tempValue = box.width / 2 + box.left;\n transformations.unshift(\"rotate(-90 \" + tempValue.toString() + \" \" + tempValue.toString() + \")\");\n break;\n }\n if (rotation % 2 === 1) {\n if (box.left !== 0 || box.top !== 0) {\n tempValue = box.left;\n box.left = box.top;\n box.top = tempValue;\n }\n if (box.width !== box.height) {\n tempValue = box.width;\n box.width = box.height;\n box.height = tempValue;\n }\n }\n if (transformations.length) {\n body = '' + body + \"\";\n }\n });\n let width, height;\n if (customisations.width === null && customisations.height === null) {\n height = \"1em\";\n width = calculateSize(height, box.width / box.height);\n } else if (customisations.width !== null && customisations.height !== null) {\n width = customisations.width;\n height = customisations.height;\n } else if (customisations.height !== null) {\n height = customisations.height;\n width = calculateSize(height, box.width / box.height);\n } else {\n width = customisations.width;\n height = calculateSize(width, box.height / box.width);\n }\n if (width === \"auto\") {\n width = box.width;\n }\n if (height === \"auto\") {\n height = box.height;\n }\n width = typeof width === \"string\" ? width : width.toString() + \"\";\n height = typeof height === \"string\" ? height : height.toString() + \"\";\n const result = {\n attributes: {\n width,\n height,\n preserveAspectRatio: preserveAspectRatio(customisations),\n viewBox: box.left.toString() + \" \" + box.top.toString() + \" \" + box.width.toString() + \" \" + box.height.toString()\n },\n body\n };\n if (customisations.inline) {\n result.inline = true;\n }\n return result;\n}\n\nfunction buildIcon(icon, customisations) {\n return iconToSVG(fullIcon(icon), customisations ? mergeCustomisations(defaults, customisations) : defaults);\n}\n\nconst regex = /\\sid=\"(\\S+)\"/g;\nconst randomPrefix = \"IconifyId\" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);\nlet counter = 0;\nfunction replaceIDs(body, prefix = randomPrefix) {\n const ids = [];\n let match;\n while (match = regex.exec(body)) {\n ids.push(match[1]);\n }\n if (!ids.length) {\n return body;\n }\n ids.forEach((id) => {\n const newID = typeof prefix === \"function\" ? prefix(id) : prefix + (counter++).toString();\n const escapedID = id.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n body = body.replace(new RegExp('([#;\"])(' + escapedID + ')([\")]|\\\\.[a-z])', \"g\"), \"$1\" + newID + \"$3\");\n });\n return body;\n}\n\nconst storage = /* @__PURE__ */ Object.create(null);\nfunction setAPIModule(provider, item) {\n storage[provider] = item;\n}\nfunction getAPIModule(provider) {\n return storage[provider] || storage[\"\"];\n}\n\nfunction createAPIConfig(source) {\n let resources;\n if (typeof source.resources === \"string\") {\n resources = [source.resources];\n } else {\n resources = source.resources;\n if (!(resources instanceof Array) || !resources.length) {\n return null;\n }\n }\n const result = {\n resources,\n path: source.path === void 0 ? \"/\" : source.path,\n maxURL: source.maxURL ? source.maxURL : 500,\n rotate: source.rotate ? source.rotate : 750,\n timeout: source.timeout ? source.timeout : 5e3,\n random: source.random === true,\n index: source.index ? source.index : 0,\n dataAfterTimeout: source.dataAfterTimeout !== false\n };\n return result;\n}\nconst configStorage = /* @__PURE__ */ Object.create(null);\nconst fallBackAPISources = [\n \"https://api.simplesvg.com\",\n \"https://api.unisvg.com\"\n];\nconst fallBackAPI = [];\nwhile (fallBackAPISources.length > 0) {\n if (fallBackAPISources.length === 1) {\n fallBackAPI.push(fallBackAPISources.shift());\n } else {\n if (Math.random() > 0.5) {\n fallBackAPI.push(fallBackAPISources.shift());\n } else {\n fallBackAPI.push(fallBackAPISources.pop());\n }\n }\n}\nconfigStorage[\"\"] = createAPIConfig({\n resources: [\"https://api.iconify.design\"].concat(fallBackAPI)\n});\nfunction addAPIProvider(provider, customConfig) {\n const config = createAPIConfig(customConfig);\n if (config === null) {\n return false;\n }\n configStorage[provider] = config;\n return true;\n}\nfunction getAPIConfig(provider) {\n return configStorage[provider];\n}\nfunction listAPIProviders() {\n return Object.keys(configStorage);\n}\n\nconst mergeParams = (base, params) => {\n let result = base, hasParams = result.indexOf(\"?\") !== -1;\n function paramToString(value) {\n switch (typeof value) {\n case \"boolean\":\n return value ? \"true\" : \"false\";\n case \"number\":\n return encodeURIComponent(value);\n case \"string\":\n return encodeURIComponent(value);\n default:\n throw new Error(\"Invalid parameter\");\n }\n }\n Object.keys(params).forEach((key) => {\n let value;\n try {\n value = paramToString(params[key]);\n } catch (err) {\n return;\n }\n result += (hasParams ? \"&\" : \"?\") + encodeURIComponent(key) + \"=\" + value;\n hasParams = true;\n });\n return result;\n};\n\nconst maxLengthCache = {};\nconst pathCache = {};\nconst detectFetch = () => {\n let callback;\n try {\n callback = fetch;\n if (typeof callback === \"function\") {\n return callback;\n }\n } catch (err) {\n }\n return null;\n};\nlet fetchModule = detectFetch();\nfunction setFetch(fetch2) {\n fetchModule = fetch2;\n}\nfunction getFetch() {\n return fetchModule;\n}\nfunction calculateMaxLength(provider, prefix) {\n const config = getAPIConfig(provider);\n if (!config) {\n return 0;\n }\n let result;\n if (!config.maxURL) {\n result = 0;\n } else {\n let maxHostLength = 0;\n config.resources.forEach((item) => {\n const host = item;\n maxHostLength = Math.max(maxHostLength, host.length);\n });\n const url = mergeParams(prefix + \".json\", {\n icons: \"\"\n });\n result = config.maxURL - maxHostLength - config.path.length - url.length;\n }\n const cacheKey = provider + \":\" + prefix;\n pathCache[provider] = config.path;\n maxLengthCache[cacheKey] = result;\n return result;\n}\nfunction shouldAbort(status) {\n return status === 404;\n}\nconst prepare = (provider, prefix, icons) => {\n const results = [];\n let maxLength = maxLengthCache[prefix];\n if (maxLength === void 0) {\n maxLength = calculateMaxLength(provider, prefix);\n }\n const type = \"icons\";\n let item = {\n type,\n provider,\n prefix,\n icons: []\n };\n let length = 0;\n icons.forEach((name, index) => {\n length += name.length + 1;\n if (length >= maxLength && index > 0) {\n results.push(item);\n item = {\n type,\n provider,\n prefix,\n icons: []\n };\n length = name.length;\n }\n item.icons.push(name);\n });\n results.push(item);\n return results;\n};\nfunction getPath(provider) {\n if (typeof provider === \"string\") {\n if (pathCache[provider] === void 0) {\n const config = getAPIConfig(provider);\n if (!config) {\n return \"/\";\n }\n pathCache[provider] = config.path;\n }\n return pathCache[provider];\n }\n return \"/\";\n}\nconst send = (host, params, callback) => {\n if (!fetchModule) {\n callback(\"abort\", 424);\n return;\n }\n let path = getPath(params.provider);\n switch (params.type) {\n case \"icons\": {\n const prefix = params.prefix;\n const icons = params.icons;\n const iconsList = icons.join(\",\");\n path += mergeParams(prefix + \".json\", {\n icons: iconsList\n });\n break;\n }\n case \"custom\": {\n const uri = params.uri;\n path += uri.slice(0, 1) === \"/\" ? uri.slice(1) : uri;\n break;\n }\n default:\n callback(\"abort\", 400);\n return;\n }\n let defaultError = 503;\n fetchModule(host + path).then((response) => {\n const status = response.status;\n if (status !== 200) {\n setTimeout(() => {\n callback(shouldAbort(status) ? \"abort\" : \"next\", status);\n });\n return;\n }\n defaultError = 501;\n return response.json();\n }).then((data) => {\n if (typeof data !== \"object\" || data === null) {\n setTimeout(() => {\n callback(\"next\", defaultError);\n });\n return;\n }\n setTimeout(() => {\n callback(\"success\", data);\n });\n }).catch(() => {\n callback(\"next\", defaultError);\n });\n};\nconst fetchAPIModule = {\n prepare,\n send\n};\n\nfunction sortIcons(icons) {\n const result = {\n loaded: [],\n missing: [],\n pending: []\n };\n const storage = /* @__PURE__ */ Object.create(null);\n icons.sort((a, b) => {\n if (a.provider !== b.provider) {\n return a.provider.localeCompare(b.provider);\n }\n if (a.prefix !== b.prefix) {\n return a.prefix.localeCompare(b.prefix);\n }\n return a.name.localeCompare(b.name);\n });\n let lastIcon = {\n provider: \"\",\n prefix: \"\",\n name: \"\"\n };\n icons.forEach((icon) => {\n if (lastIcon.name === icon.name && lastIcon.prefix === icon.prefix && lastIcon.provider === icon.provider) {\n return;\n }\n lastIcon = icon;\n const provider = icon.provider;\n const prefix = icon.prefix;\n const name = icon.name;\n if (storage[provider] === void 0) {\n storage[provider] = /* @__PURE__ */ Object.create(null);\n }\n const providerStorage = storage[provider];\n if (providerStorage[prefix] === void 0) {\n providerStorage[prefix] = getStorage(provider, prefix);\n }\n const localStorage = providerStorage[prefix];\n let list;\n if (localStorage.icons[name] !== void 0) {\n list = result.loaded;\n } else if (prefix === \"\" || localStorage.missing[name] !== void 0) {\n list = result.missing;\n } else {\n list = result.pending;\n }\n const item = {\n provider,\n prefix,\n name\n };\n list.push(item);\n });\n return result;\n}\n\nconst callbacks = /* @__PURE__ */ Object.create(null);\nconst pendingUpdates = /* @__PURE__ */ Object.create(null);\nfunction removeCallback(sources, id) {\n sources.forEach((source) => {\n const provider = source.provider;\n if (callbacks[provider] === void 0) {\n return;\n }\n const providerCallbacks = callbacks[provider];\n const prefix = source.prefix;\n const items = providerCallbacks[prefix];\n if (items) {\n providerCallbacks[prefix] = items.filter((row) => row.id !== id);\n }\n });\n}\nfunction updateCallbacks(provider, prefix) {\n if (pendingUpdates[provider] === void 0) {\n pendingUpdates[provider] = /* @__PURE__ */ Object.create(null);\n }\n const providerPendingUpdates = pendingUpdates[provider];\n if (!providerPendingUpdates[prefix]) {\n providerPendingUpdates[prefix] = true;\n setTimeout(() => {\n providerPendingUpdates[prefix] = false;\n if (callbacks[provider] === void 0 || callbacks[provider][prefix] === void 0) {\n return;\n }\n const items = callbacks[provider][prefix].slice(0);\n if (!items.length) {\n return;\n }\n const storage = getStorage(provider, prefix);\n let hasPending = false;\n items.forEach((item) => {\n const icons = item.icons;\n const oldLength = icons.pending.length;\n icons.pending = icons.pending.filter((icon) => {\n if (icon.prefix !== prefix) {\n return true;\n }\n const name = icon.name;\n if (storage.icons[name] !== void 0) {\n icons.loaded.push({\n provider,\n prefix,\n name\n });\n } else if (storage.missing[name] !== void 0) {\n icons.missing.push({\n provider,\n prefix,\n name\n });\n } else {\n hasPending = true;\n return true;\n }\n return false;\n });\n if (icons.pending.length !== oldLength) {\n if (!hasPending) {\n removeCallback([\n {\n provider,\n prefix\n }\n ], item.id);\n }\n item.callback(icons.loaded.slice(0), icons.missing.slice(0), icons.pending.slice(0), item.abort);\n }\n });\n });\n }\n}\nlet idCounter = 0;\nfunction storeCallback(callback, icons, pendingSources) {\n const id = idCounter++;\n const abort = removeCallback.bind(null, pendingSources, id);\n if (!icons.pending.length) {\n return abort;\n }\n const item = {\n id,\n icons,\n callback,\n abort\n };\n pendingSources.forEach((source) => {\n const provider = source.provider;\n const prefix = source.prefix;\n if (callbacks[provider] === void 0) {\n callbacks[provider] = /* @__PURE__ */ Object.create(null);\n }\n const providerCallbacks = callbacks[provider];\n if (providerCallbacks[prefix] === void 0) {\n providerCallbacks[prefix] = [];\n }\n providerCallbacks[prefix].push(item);\n });\n return abort;\n}\n\nfunction listToIcons(list, validate = true, simpleNames = false) {\n const result = [];\n list.forEach((item) => {\n const icon = typeof item === \"string\" ? stringToIcon(item, false, simpleNames) : item;\n if (!validate || validateIcon(icon, simpleNames)) {\n result.push({\n provider: icon.provider,\n prefix: icon.prefix,\n name: icon.name\n });\n }\n });\n return result;\n}\n\n// src/config.ts\nvar defaultConfig = {\n resources: [],\n index: 0,\n timeout: 2e3,\n rotate: 750,\n random: false,\n dataAfterTimeout: false\n};\n\n// src/query.ts\nfunction sendQuery(config, payload, query, done) {\n const resourcesCount = config.resources.length;\n const startIndex = config.random ? Math.floor(Math.random() * resourcesCount) : config.index;\n let resources;\n if (config.random) {\n let list = config.resources.slice(0);\n resources = [];\n while (list.length > 1) {\n const nextIndex = Math.floor(Math.random() * list.length);\n resources.push(list[nextIndex]);\n list = list.slice(0, nextIndex).concat(list.slice(nextIndex + 1));\n }\n resources = resources.concat(list);\n } else {\n resources = config.resources.slice(startIndex).concat(config.resources.slice(0, startIndex));\n }\n const startTime = Date.now();\n let status = \"pending\";\n let queriesSent = 0;\n let lastError;\n let timer = null;\n let queue = [];\n let doneCallbacks = [];\n if (typeof done === \"function\") {\n doneCallbacks.push(done);\n }\n function resetTimer() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function abort() {\n if (status === \"pending\") {\n status = \"aborted\";\n }\n resetTimer();\n queue.forEach((item) => {\n if (item.status === \"pending\") {\n item.status = \"aborted\";\n }\n });\n queue = [];\n }\n function subscribe(callback, overwrite) {\n if (overwrite) {\n doneCallbacks = [];\n }\n if (typeof callback === \"function\") {\n doneCallbacks.push(callback);\n }\n }\n function getQueryStatus() {\n return {\n startTime,\n payload,\n status,\n queriesSent,\n queriesPending: queue.length,\n subscribe,\n abort\n };\n }\n function failQuery() {\n status = \"failed\";\n doneCallbacks.forEach((callback) => {\n callback(void 0, lastError);\n });\n }\n function clearQueue() {\n queue.forEach((item) => {\n if (item.status === \"pending\") {\n item.status = \"aborted\";\n }\n });\n queue = [];\n }\n function moduleResponse(item, response, data) {\n const isError = response !== \"success\";\n queue = queue.filter((queued) => queued !== item);\n switch (status) {\n case \"pending\":\n break;\n case \"failed\":\n if (isError || !config.dataAfterTimeout) {\n return;\n }\n break;\n default:\n return;\n }\n if (response === \"abort\") {\n lastError = data;\n failQuery();\n return;\n }\n if (isError) {\n lastError = data;\n if (!queue.length) {\n if (!resources.length) {\n failQuery();\n } else {\n execNext();\n }\n }\n return;\n }\n resetTimer();\n clearQueue();\n if (!config.random) {\n const index = config.resources.indexOf(item.resource);\n if (index !== -1 && index !== config.index) {\n config.index = index;\n }\n }\n status = \"completed\";\n doneCallbacks.forEach((callback) => {\n callback(data);\n });\n }\n function execNext() {\n if (status !== \"pending\") {\n return;\n }\n resetTimer();\n const resource = resources.shift();\n if (resource === void 0) {\n if (queue.length) {\n timer = setTimeout(() => {\n resetTimer();\n if (status === \"pending\") {\n clearQueue();\n failQuery();\n }\n }, config.timeout);\n return;\n }\n failQuery();\n return;\n }\n const item = {\n status: \"pending\",\n resource,\n callback: (status2, data) => {\n moduleResponse(item, status2, data);\n }\n };\n queue.push(item);\n queriesSent++;\n timer = setTimeout(execNext, config.rotate);\n query(resource, payload, item.callback);\n }\n setTimeout(execNext);\n return getQueryStatus;\n}\n\n// src/index.ts\nfunction setConfig(config) {\n if (typeof config !== \"object\" || typeof config.resources !== \"object\" || !(config.resources instanceof Array) || !config.resources.length) {\n throw new Error(\"Invalid Reduncancy configuration\");\n }\n const newConfig = /* @__PURE__ */ Object.create(null);\n let key;\n for (key in defaultConfig) {\n if (config[key] !== void 0) {\n newConfig[key] = config[key];\n } else {\n newConfig[key] = defaultConfig[key];\n }\n }\n return newConfig;\n}\nfunction initRedundancy(cfg) {\n const config = setConfig(cfg);\n let queries = [];\n function cleanup() {\n queries = queries.filter((item) => item().status === \"pending\");\n }\n function query(payload, queryCallback, doneCallback) {\n const query2 = sendQuery(config, payload, queryCallback, (data, error) => {\n cleanup();\n if (doneCallback) {\n doneCallback(data, error);\n }\n });\n queries.push(query2);\n return query2;\n }\n function find(callback) {\n const result = queries.find((value) => {\n return callback(value);\n });\n return result !== void 0 ? result : null;\n }\n const instance = {\n query,\n find,\n setIndex: (index) => {\n config.index = index;\n },\n getIndex: () => config.index,\n cleanup\n };\n return instance;\n}\n\nfunction emptyCallback$1() {\n}\nconst redundancyCache = /* @__PURE__ */ Object.create(null);\nfunction getRedundancyCache(provider) {\n if (redundancyCache[provider] === void 0) {\n const config = getAPIConfig(provider);\n if (!config) {\n return;\n }\n const redundancy = initRedundancy(config);\n const cachedReundancy = {\n config,\n redundancy\n };\n redundancyCache[provider] = cachedReundancy;\n }\n return redundancyCache[provider];\n}\nfunction sendAPIQuery(target, query, callback) {\n let redundancy;\n let send;\n if (typeof target === \"string\") {\n const api = getAPIModule(target);\n if (!api) {\n callback(void 0, 424);\n return emptyCallback$1;\n }\n send = api.send;\n const cached = getRedundancyCache(target);\n if (cached) {\n redundancy = cached.redundancy;\n }\n } else {\n const config = createAPIConfig(target);\n if (config) {\n redundancy = initRedundancy(config);\n const moduleKey = target.resources ? target.resources[0] : \"\";\n const api = getAPIModule(moduleKey);\n if (api) {\n send = api.send;\n }\n }\n }\n if (!redundancy || !send) {\n callback(void 0, 424);\n return emptyCallback$1;\n }\n return redundancy.query(query, send, callback)().abort;\n}\n\nconst cache = {};\n\nfunction emptyCallback() {\n}\nconst pendingIcons = /* @__PURE__ */ Object.create(null);\nconst iconsToLoad = /* @__PURE__ */ Object.create(null);\nconst loaderFlags = /* @__PURE__ */ Object.create(null);\nconst queueFlags = /* @__PURE__ */ Object.create(null);\nfunction loadedNewIcons(provider, prefix) {\n if (loaderFlags[provider] === void 0) {\n loaderFlags[provider] = /* @__PURE__ */ Object.create(null);\n }\n const providerLoaderFlags = loaderFlags[provider];\n if (!providerLoaderFlags[prefix]) {\n providerLoaderFlags[prefix] = true;\n setTimeout(() => {\n providerLoaderFlags[prefix] = false;\n updateCallbacks(provider, prefix);\n });\n }\n}\nconst errorsCache = /* @__PURE__ */ Object.create(null);\nfunction loadNewIcons(provider, prefix, icons) {\n function err() {\n const key = (provider === \"\" ? \"\" : \"@\" + provider + \":\") + prefix;\n const time = Math.floor(Date.now() / 6e4);\n if (errorsCache[key] < time) {\n errorsCache[key] = time;\n console.error('Unable to retrieve icons for \"' + key + '\" because API is not configured properly.');\n }\n }\n if (iconsToLoad[provider] === void 0) {\n iconsToLoad[provider] = /* @__PURE__ */ Object.create(null);\n }\n const providerIconsToLoad = iconsToLoad[provider];\n if (queueFlags[provider] === void 0) {\n queueFlags[provider] = /* @__PURE__ */ Object.create(null);\n }\n const providerQueueFlags = queueFlags[provider];\n if (pendingIcons[provider] === void 0) {\n pendingIcons[provider] = /* @__PURE__ */ Object.create(null);\n }\n const providerPendingIcons = pendingIcons[provider];\n if (providerIconsToLoad[prefix] === void 0) {\n providerIconsToLoad[prefix] = icons;\n } else {\n providerIconsToLoad[prefix] = providerIconsToLoad[prefix].concat(icons).sort();\n }\n if (!providerQueueFlags[prefix]) {\n providerQueueFlags[prefix] = true;\n setTimeout(() => {\n providerQueueFlags[prefix] = false;\n const icons2 = providerIconsToLoad[prefix];\n delete providerIconsToLoad[prefix];\n const api = getAPIModule(provider);\n if (!api) {\n err();\n return;\n }\n const params = api.prepare(provider, prefix, icons2);\n params.forEach((item) => {\n sendAPIQuery(provider, item, (data, error) => {\n const storage = getStorage(provider, prefix);\n if (typeof data !== \"object\") {\n if (error !== 404) {\n return;\n }\n const t = Date.now();\n item.icons.forEach((name) => {\n storage.missing[name] = t;\n });\n } else {\n try {\n const parsed = addIconSet(storage, data);\n if (!parsed.length) {\n return;\n }\n const pending = providerPendingIcons[prefix];\n parsed.forEach((name) => {\n delete pending[name];\n });\n if (cache.store) {\n cache.store(provider, data);\n }\n } catch (err2) {\n console.error(err2);\n }\n }\n loadedNewIcons(provider, prefix);\n });\n });\n });\n }\n}\nconst loadIcons = (icons, callback) => {\n const cleanedIcons = listToIcons(icons, true, allowSimpleNames());\n const sortedIcons = sortIcons(cleanedIcons);\n if (!sortedIcons.pending.length) {\n let callCallback = true;\n if (callback) {\n setTimeout(() => {\n if (callCallback) {\n callback(sortedIcons.loaded, sortedIcons.missing, sortedIcons.pending, emptyCallback);\n }\n });\n }\n return () => {\n callCallback = false;\n };\n }\n const newIcons = /* @__PURE__ */ Object.create(null);\n const sources = [];\n let lastProvider, lastPrefix;\n sortedIcons.pending.forEach((icon) => {\n const provider = icon.provider;\n const prefix = icon.prefix;\n if (prefix === lastPrefix && provider === lastProvider) {\n return;\n }\n lastProvider = provider;\n lastPrefix = prefix;\n sources.push({\n provider,\n prefix\n });\n if (pendingIcons[provider] === void 0) {\n pendingIcons[provider] = /* @__PURE__ */ Object.create(null);\n }\n const providerPendingIcons = pendingIcons[provider];\n if (providerPendingIcons[prefix] === void 0) {\n providerPendingIcons[prefix] = /* @__PURE__ */ Object.create(null);\n }\n if (newIcons[provider] === void 0) {\n newIcons[provider] = /* @__PURE__ */ Object.create(null);\n }\n const providerNewIcons = newIcons[provider];\n if (providerNewIcons[prefix] === void 0) {\n providerNewIcons[prefix] = [];\n }\n });\n const time = Date.now();\n sortedIcons.pending.forEach((icon) => {\n const provider = icon.provider;\n const prefix = icon.prefix;\n const name = icon.name;\n const pendingQueue = pendingIcons[provider][prefix];\n if (pendingQueue[name] === void 0) {\n pendingQueue[name] = time;\n newIcons[provider][prefix].push(name);\n }\n });\n sources.forEach((source) => {\n const provider = source.provider;\n const prefix = source.prefix;\n if (newIcons[provider][prefix].length) {\n loadNewIcons(provider, prefix, newIcons[provider][prefix]);\n }\n });\n return callback ? storeCallback(callback, sortedIcons, sources) : emptyCallback;\n};\nconst loadIcon = (icon) => {\n return new Promise((fulfill, reject) => {\n const iconObj = typeof icon === \"string\" ? stringToIcon(icon) : icon;\n loadIcons([iconObj || icon], (loaded) => {\n if (loaded.length && iconObj) {\n const storage = getStorage(iconObj.provider, iconObj.prefix);\n const data = getIconFromStorage(storage, iconObj.name);\n if (data) {\n fulfill(data);\n return;\n }\n }\n reject(icon);\n });\n });\n};\n\nconst cacheVersion = \"iconify2\";\nconst cachePrefix = \"iconify\";\nconst countKey = cachePrefix + \"-count\";\nconst versionKey = cachePrefix + \"-version\";\nconst hour = 36e5;\nconst cacheExpiration = 168;\nconst config = {\n local: true,\n session: true\n};\nlet loaded = false;\nconst count = {\n local: 0,\n session: 0\n};\nconst emptyList = {\n local: [],\n session: []\n};\nlet _window = typeof window === \"undefined\" ? {} : window;\nfunction getGlobal(key) {\n const attr = key + \"Storage\";\n try {\n if (_window && _window[attr] && typeof _window[attr].length === \"number\") {\n return _window[attr];\n }\n } catch (err) {\n }\n config[key] = false;\n return null;\n}\nfunction setCount(storage, key, value) {\n try {\n storage.setItem(countKey, value.toString());\n count[key] = value;\n return true;\n } catch (err) {\n return false;\n }\n}\nfunction getCount(storage) {\n const count2 = storage.getItem(countKey);\n if (count2) {\n const total = parseInt(count2);\n return total ? total : 0;\n }\n return 0;\n}\nfunction initCache(storage, key) {\n try {\n storage.setItem(versionKey, cacheVersion);\n } catch (err) {\n }\n setCount(storage, key, 0);\n}\nfunction destroyCache(storage) {\n try {\n const total = getCount(storage);\n for (let i = 0; i < total; i++) {\n storage.removeItem(cachePrefix + i.toString());\n }\n } catch (err) {\n }\n}\nconst loadCache = () => {\n if (loaded) {\n return;\n }\n loaded = true;\n const minTime = Math.floor(Date.now() / hour) - cacheExpiration;\n function load(key) {\n const func = getGlobal(key);\n if (!func) {\n return;\n }\n const getItem = (index) => {\n const name = cachePrefix + index.toString();\n const item = func.getItem(name);\n if (typeof item !== \"string\") {\n return false;\n }\n let valid = true;\n try {\n const data = JSON.parse(item);\n if (typeof data !== \"object\" || typeof data.cached !== \"number\" || data.cached < minTime || typeof data.provider !== \"string\" || typeof data.data !== \"object\" || typeof data.data.prefix !== \"string\") {\n valid = false;\n } else {\n const provider = data.provider;\n const prefix = data.data.prefix;\n const storage = getStorage(provider, prefix);\n valid = addIconSet(storage, data.data).length > 0;\n }\n } catch (err) {\n valid = false;\n }\n if (!valid) {\n func.removeItem(name);\n }\n return valid;\n };\n try {\n const version = func.getItem(versionKey);\n if (version !== cacheVersion) {\n if (version) {\n destroyCache(func);\n }\n initCache(func, key);\n return;\n }\n let total = getCount(func);\n for (let i = total - 1; i >= 0; i--) {\n if (!getItem(i)) {\n if (i === total - 1) {\n total--;\n } else {\n emptyList[key].push(i);\n }\n }\n }\n setCount(func, key, total);\n } catch (err) {\n }\n }\n for (const key in config) {\n load(key);\n }\n};\nconst storeCache = (provider, data) => {\n if (!loaded) {\n loadCache();\n }\n function store(key) {\n if (!config[key]) {\n return false;\n }\n const func = getGlobal(key);\n if (!func) {\n return false;\n }\n let index = emptyList[key].shift();\n if (index === void 0) {\n index = count[key];\n if (!setCount(func, key, index + 1)) {\n return false;\n }\n }\n try {\n const item = {\n cached: Math.floor(Date.now() / hour),\n provider,\n data\n };\n func.setItem(cachePrefix + index.toString(), JSON.stringify(item));\n } catch (err) {\n return false;\n }\n return true;\n }\n if (!Object.keys(data.icons).length) {\n return;\n }\n if (data.not_found) {\n data = Object.assign({}, data);\n delete data.not_found;\n }\n if (!store(\"local\")) {\n store(\"session\");\n }\n};\n\nfunction toggleBrowserCache(storage, value) {\n switch (storage) {\n case \"local\":\n case \"session\":\n config[storage] = value;\n break;\n case \"all\":\n for (const key in config) {\n config[key] = value;\n }\n break;\n }\n}\n\nconst separator = /[\\s,]+/;\nfunction flipFromString(custom, flip) {\n flip.split(separator).forEach((str) => {\n const value = str.trim();\n switch (value) {\n case \"horizontal\":\n custom.hFlip = true;\n break;\n case \"vertical\":\n custom.vFlip = true;\n break;\n }\n });\n}\nfunction alignmentFromString(custom, align) {\n align.split(separator).forEach((str) => {\n const value = str.trim();\n switch (value) {\n case \"left\":\n case \"center\":\n case \"right\":\n custom.hAlign = value;\n break;\n case \"top\":\n case \"middle\":\n case \"bottom\":\n custom.vAlign = value;\n break;\n case \"slice\":\n case \"crop\":\n custom.slice = true;\n break;\n case \"meet\":\n custom.slice = false;\n }\n });\n}\n\nfunction rotateFromString(value, defaultValue = 0) {\n const units = value.replace(/^-?[0-9.]*/, \"\");\n function cleanup(value2) {\n while (value2 < 0) {\n value2 += 4;\n }\n return value2 % 4;\n }\n if (units === \"\") {\n const num = parseInt(value);\n return isNaN(num) ? 0 : cleanup(num);\n } else if (units !== value) {\n let split = 0;\n switch (units) {\n case \"%\":\n split = 25;\n break;\n case \"deg\":\n split = 90;\n }\n if (split) {\n let num = parseFloat(value.slice(0, value.length - units.length));\n if (isNaN(num)) {\n return 0;\n }\n num = num / split;\n return num % 1 === 0 ? cleanup(num) : 0;\n }\n }\n return defaultValue;\n}\n\n/**\n * Default SVG attributes\n */\nconst svgDefaults = {\n 'xmlns': 'http://www.w3.org/2000/svg',\n 'xmlnsXlink': 'http://www.w3.org/1999/xlink',\n 'aria-hidden': true,\n 'role': 'img',\n 'style': {}, // Include style if it isn't set to add verticalAlign later\n};\n/**\n * Default values for customisations for inline icon\n */\nconst inlineDefaults = { ...defaults, inline: true };\n/**\n * Render icon\n */\nconst render = (\n// Icon must be validated before calling this function\nicon, \n// Partial properties\nprops, \n// True if icon should have vertical-align added\ninline, \n// Optional reference for SVG, extracted by React.forwardRef()\nref) => {\n // Get default properties\n const defaultProps = inline ? inlineDefaults : defaults;\n // Get all customisations\n const customisations = mergeCustomisations(defaultProps, props);\n // Create style\n const style = typeof props.style === 'object' && props.style !== null\n ? props.style\n : {};\n // Create SVG component properties\n const componentProps = { ...svgDefaults, ref, style };\n // Get element properties\n for (let key in props) {\n const value = props[key];\n if (value === void 0) {\n continue;\n }\n switch (key) {\n // Properties to ignore\n case 'icon':\n case 'style':\n case 'children':\n case 'onLoad':\n case '_ref':\n case '_inline':\n break;\n // Boolean attributes\n case 'inline':\n case 'hFlip':\n case 'vFlip':\n customisations[key] =\n value === true || value === 'true' || value === 1;\n break;\n // Flip as string: 'horizontal,vertical'\n case 'flip':\n if (typeof value === 'string') {\n flipFromString(customisations, value);\n }\n break;\n // Alignment as string\n case 'align':\n if (typeof value === 'string') {\n alignmentFromString(customisations, value);\n }\n break;\n // Color: copy to style\n case 'color':\n style.color = value;\n break;\n // Rotation as string\n case 'rotate':\n if (typeof value === 'string') {\n customisations[key] = rotateFromString(value);\n }\n else if (typeof value === 'number') {\n customisations[key] = value;\n }\n break;\n // Remove aria-hidden\n case 'ariaHidden':\n case 'aria-hidden':\n if (value !== true && value !== 'true') {\n delete componentProps['aria-hidden'];\n }\n break;\n // Copy missing property if it does not exist in customisations\n default:\n if (defaultProps[key] === void 0) {\n componentProps[key] = value;\n }\n }\n }\n // Generate icon\n const item = iconToSVG(icon, customisations);\n // Counter for ids based on \"id\" property to render icons consistently on server and client\n let localCounter = 0;\n let id = props.id;\n if (typeof id === 'string') {\n // Convert '-' to '_' to avoid errors in animations\n id = id.replace(/-/g, '_');\n }\n // Add icon stuff\n componentProps.dangerouslySetInnerHTML = {\n __html: replaceIDs(item.body, id ? () => id + 'ID' + localCounter++ : 'iconifyReact'),\n };\n for (let key in item.attributes) {\n componentProps[key] = item.attributes[key];\n }\n if (item.inline && style.verticalAlign === void 0) {\n style.verticalAlign = '-0.125em';\n }\n return React.createElement('svg', componentProps);\n};\n\n/**\n * Enable cache\n */\nfunction enableCache(storage) {\n toggleBrowserCache(storage, true);\n}\n/**\n * Disable cache\n */\nfunction disableCache(storage) {\n toggleBrowserCache(storage, false);\n}\n/**\n * Initialise stuff\n */\n// Enable short names\nallowSimpleNames(true);\n// Set API module\nsetAPIModule('', fetchAPIModule);\n/**\n * Browser stuff\n */\nif (typeof document !== 'undefined' && typeof window !== 'undefined') {\n // Set cache and load existing cache\n cache.store = storeCache;\n loadCache();\n const _window = window;\n // Load icons from global \"IconifyPreload\"\n if (_window.IconifyPreload !== void 0) {\n const preload = _window.IconifyPreload;\n const err = 'Invalid IconifyPreload syntax.';\n if (typeof preload === 'object' && preload !== null) {\n (preload instanceof Array ? preload : [preload]).forEach((item) => {\n try {\n if (\n // Check if item is an object and not null/array\n typeof item !== 'object' ||\n item === null ||\n item instanceof Array ||\n // Check for 'icons' and 'prefix'\n typeof item.icons !== 'object' ||\n typeof item.prefix !== 'string' ||\n // Add icon set\n !addCollection(item)) {\n console.error(err);\n }\n }\n catch (e) {\n console.error(err);\n }\n });\n }\n }\n // Set API from global \"IconifyProviders\"\n if (_window.IconifyProviders !== void 0) {\n const providers = _window.IconifyProviders;\n if (typeof providers === 'object' && providers !== null) {\n for (let key in providers) {\n const err = 'IconifyProviders[' + key + '] is invalid.';\n try {\n const value = providers[key];\n if (typeof value !== 'object' ||\n !value ||\n value.resources === void 0) {\n continue;\n }\n if (!addAPIProvider(key, value)) {\n console.error(err);\n }\n }\n catch (e) {\n console.error(err);\n }\n }\n }\n }\n}\nclass IconComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n // Render placeholder before component is mounted\n icon: null,\n };\n }\n /**\n * Abort loading icon\n */\n _abortLoading() {\n if (this._loading) {\n this._loading.abort();\n this._loading = null;\n }\n }\n /**\n * Update state\n */\n _setData(icon) {\n if (this.state.icon !== icon) {\n this.setState({\n icon,\n });\n }\n }\n /**\n * Check if icon should be loaded\n */\n _checkIcon(changed) {\n const state = this.state;\n const icon = this.props.icon;\n // Icon is an object\n if (typeof icon === 'object' &&\n icon !== null &&\n typeof icon.body === 'string') {\n // Stop loading\n this._icon = '';\n this._abortLoading();\n if (changed || state.icon === null) {\n // Set data if it was changed\n this._setData({\n data: fullIcon(icon),\n });\n }\n return;\n }\n // Invalid icon?\n let iconName;\n if (typeof icon !== 'string' ||\n (iconName = stringToIcon(icon, false, true)) === null) {\n this._abortLoading();\n this._setData(null);\n return;\n }\n // Load icon\n const data = getIconData(iconName);\n if (data === null) {\n // Icon needs to be loaded\n if (!this._loading || this._loading.name !== icon) {\n // New icon to load\n this._abortLoading();\n this._icon = '';\n this._setData(null);\n this._loading = {\n name: icon,\n abort: loadIcons([iconName], this._checkIcon.bind(this, false)),\n };\n }\n return;\n }\n // Icon data is available\n if (this._icon !== icon || state.icon === null) {\n // New icon or icon has been loaded\n this._abortLoading();\n this._icon = icon;\n // Add classes\n const classes = ['iconify'];\n if (iconName.prefix !== '') {\n classes.push('iconify--' + iconName.prefix);\n }\n if (iconName.provider !== '') {\n classes.push('iconify--' + iconName.provider);\n }\n // Set data\n this._setData({\n data,\n classes,\n });\n if (this.props.onLoad) {\n this.props.onLoad(icon);\n }\n }\n }\n /**\n * Component mounted\n */\n componentDidMount() {\n this._checkIcon(false);\n }\n /**\n * Component updated\n */\n componentDidUpdate(oldProps) {\n if (oldProps.icon !== this.props.icon) {\n this._checkIcon(true);\n }\n }\n /**\n * Abort loading\n */\n componentWillUnmount() {\n this._abortLoading();\n }\n /**\n * Render\n */\n render() {\n const props = this.props;\n const icon = this.state.icon;\n if (icon === null) {\n // Render placeholder\n return props.children\n ? props.children\n : React.createElement('span', {});\n }\n // Add classes\n let newProps = props;\n if (icon.classes) {\n newProps = {\n ...props,\n className: (typeof props.className === 'string'\n ? props.className + ' '\n : '') + icon.classes.join(' '),\n };\n }\n // Render icon\n return render(icon.data, newProps, props._inline, props._ref);\n }\n}\n/**\n * Block icon\n *\n * @param props - Component properties\n */\nconst Icon = React.forwardRef(function Icon(props, ref) {\n const newProps = {\n ...props,\n _ref: ref,\n _inline: false,\n };\n return React.createElement(IconComponent, newProps);\n});\n/**\n * Inline icon (has negative verticalAlign that makes it behave like icon font)\n *\n * @param props - Component properties\n */\nconst InlineIcon = React.forwardRef(function InlineIcon(props, ref) {\n const newProps = { ...props, _ref: ref, _inline: true };\n return React.createElement(IconComponent, newProps);\n});\n/**\n * Internal API\n */\nconst _api = {\n getAPIConfig,\n setAPIModule,\n sendAPIQuery,\n setFetch,\n getFetch,\n listAPIProviders,\n mergeParams,\n};\n\nexport { Icon, InlineIcon, _api, addAPIProvider, addCollection, addIcon, buildIcon, calculateSize, disableCache, enableCache, getIcon, iconExists, listIcons, loadIcon, loadIcons, replaceIDs, shareStorage };\n"],"sourceRoot":""}