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AAM,KACR,EAAa,GAGjB,OAAQ,GACN,IAAK,SACH,MAAO,mBAAqB,gBAAgB,GAAQ,KACtD,IAAK,kBACH,MAAO,sCAAwC,mBAAmB,GAAQ,KAC5E,IAAK,SACH,MAAO,mBAAqB,gBAAgB,SAAS,IAAS,KAChE,IAAK,kBACH,MAAO,6CAA+C,mBAAmB,SAAS,IAAS,KAE/F,IAAK,EAAa,CAChB,MAAM,EAAW,EAAc,QAAU,EAEzC,OADA,gBAAgB,QAAQ,eAAe,EAAO,EAAU,GACjD,mBAAmB,EAAO,IACnC,CAMA,MAAO,iCALS,KAAK,SAAS,CAC5B,KAAM,QACN,KAAM,EACN,OAAQ,SAGZ,EAEJ","file":"/npm/vite-awesome-svg-loader@2.0.1/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/vite-awesome-svg-loader@2.0.1/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp.call(b, prop))\n      __defNormalProp(a, prop, b[prop]);\n  if (__getOwnPropSymbols)\n    for (var prop of __getOwnPropSymbols(b)) {\n      if (__propIsEnum.call(b, prop))\n        __defNormalProp(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n  // If the importer is in node compatibility mode or this is not an ESM\n  // file that has been converted to a CommonJS file using a Babel-\n  // compatible transform (i.e. \"__esModule\" has not been set), then set\n  // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n  isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n  mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n  viteAwesomeSvgLoader: () => viteAwesomeSvgLoader\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/loader.ts\nvar import_fs_extra = __toESM(require(\"fs-extra\"));\nvar import_path2 = __toESM(require(\"path\"));\nvar import_svgo = require(\"svgo\");\nvar import_xast2 = require(\"svgo/lib/xast.js\");\nvar import_imurmurhash = __toESM(require(\"imurmurhash\"));\n\n// src/internal/misc.ts\nvar import_xast = require(\"svgo/lib/xast.js\");\nvar import_path = __toESM(require(\"path\"));\nfunction normalizeBaseDir(dir) {\n  dir = dir.replaceAll(\"\\\\\", \"/\");\n  if (dir.endsWith(\"/\")) {\n    dir = dir.substring(0, dir.length - 1);\n  }\n  return dir;\n}\nfunction toBase64(str) {\n  const binString = String.fromCodePoint(...new TextEncoder().encode(str));\n  return btoa(binString);\n}\nfunction escapeBackticks(str) {\n  return str.replaceAll(\"`\", \"\\\\`\");\n}\nfunction matchesQueryOrList(relPathWithSlash, queryValue, matchers) {\n  return matchesQuery(queryValue) || matchesPath(relPathWithSlash, matchers);\n}\nfunction matchesQuery(queryValue) {\n  return !!queryValue && queryValue.toLowerCase() !== \"false\";\n}\nfunction matchesPath(relPathWithSlash, matchers) {\n  const filename = import_path.default.basename(relPathWithSlash);\n  const toMatch = [filename, relPathWithSlash];\n  for (const matcher of matchers) {\n    const isRegex = matcher instanceof RegExp;\n    for (const entry of toMatch) {\n      const matches = isRegex ? matcher.test(entry) : entry === matcher;\n      if (matches) {\n        return true;\n      }\n    }\n  }\n  return false;\n}\nfunction normalizeSelector(selector) {\n  return selector.replaceAll(/\\s+/g, \" \").trim();\n}\nfunction selectorsToList(relPathWithSlash, selectors, returnEmptyList) {\n  const resolvedSelectors = [];\n  if (returnEmptyList) {\n    return resolvedSelectors;\n  }\n  for (const selector of selectors) {\n    if (typeof selector === \"string\") {\n      resolvedSelectors.push(normalizeSelector(selector));\n      continue;\n    }\n    if (matchesPath(relPathWithSlash, selector.files)) {\n      for (const selectorStr of selector.selectors) {\n        resolvedSelectors.push(normalizeSelector(selectorStr));\n      }\n    }\n  }\n  return resolvedSelectors;\n}\nvar matchesSelector = import_xast.matches;\nfunction matchesSelectors(node, selectors) {\n  for (const selector of selectors) {\n    if (matchesSelector(node, selector)) {\n      return true;\n    }\n  }\n  return false;\n}\nfunction replaceColor(color, replacements) {\n  if (!color) {\n    return replacements.default || \"\";\n  }\n  return replacements.replacements[color.toLowerCase()] || replacements.default || color;\n}\n\n// src/internal/preserveLineWidth.ts\nvar TAGS_TO_PRESERVE_LINE_WIDTH_OF = {\n  circle: true,\n  ellipse: true,\n  foreignObject: true,\n  image: true,\n  line: true,\n  path: true,\n  polygon: true,\n  polyline: true,\n  rect: true,\n  text: true,\n  textPath: true,\n  tspan: true,\n  use: true\n};\nfunction preserveLineWidth(node, path3) {\n  if (!TAGS_TO_PRESERVE_LINE_WIDTH_OF[node.name]) {\n    return;\n  }\n  const vectorEffectAttr = node.attributes[\"vector-effect\"];\n  if (vectorEffectAttr && vectorEffectAttr !== \"non-scaling-stroke\") {\n    console.warn(\n      `\"${path3}\": Element \"${node.name}\" already contains \"vector-effect\" property. Please remove it, so it can scale correctly. This element will not be transformed.`\n    );\n  } else {\n    node.attributes[\"vector-effect\"] = \"non-scaling-stroke\";\n  }\n}\n\n// src/internal/const.ts\nvar COLOR_ATTRS_TO_REPLACE = {\n  \"fill\": true,\n  \"stroke\": true,\n  \"stop-color\": true\n};\nvar IGNORE_COLORS = {\n  none: true,\n  transparent: true,\n  currentColor: true\n};\nvar IMPORT_TYPES = [\"url\", \"source\", \"source-data-uri\", \"base64\", \"base64-data-uri\"];\n\n// src/internal/replaceColorsCss.ts\nvar csstree = __toESM(require(\"css-tree\"));\nfunction replaceColorsCss(css, replacements, nodesWithOrigColors, isInline = false) {\n  if (!css || typeof css !== \"string\") {\n    return \"\";\n  }\n  let context = \"stylesheet\";\n  if (isInline) {\n    css = `{${css}}`;\n    context = \"block\";\n  }\n  const shouldPreserveColors = !isInline && nodesWithOrigColors.length;\n  let origColorSelectors = [];\n  let currentColorSelectors = [];\n  let didSplitSelectors = false;\n  const ast = csstree.parse(css, { context });\n  csstree.walk(ast, {\n    // Ignore because of broken types in csstree:\n    // @ts-ignore\n    visit: shouldPreserveColors ? void 0 : \"Declaration\",\n    enter: function(node) {\n      var _a, _b, _c, _d, _e, _f, _g;\n      if (node.__SKIP_SVG_LOADER__ || ((_a = this.rule) == null ? void 0 : _a.__SKIP_SVG_LOADER__)) {\n        return;\n      }\n      if (shouldPreserveColors) {\n        if (node.type === \"SelectorList\") {\n          origColorSelectors = [];\n          currentColorSelectors = [];\n          didSplitSelectors = false;\n          return;\n        }\n        if (node.type === \"Selector\") {\n          const selector = csstree.generate(node);\n          let isOrigColor = false;\n          for (const svgNode of nodesWithOrigColors) {\n            if (matchesSelector(svgNode, selector)) {\n              isOrigColor = true;\n              node.__ORIG_COLOR__ = true;\n              break;\n            }\n          }\n          (isOrigColor ? origColorSelectors : currentColorSelectors).push(selector);\n          return;\n        }\n      }\n      if (node.type !== \"Declaration\" || !COLOR_ATTRS_TO_REPLACE[node.property]) {\n        return;\n      }\n      const identifier = (_c = (_b = node.value) == null ? void 0 : _b.children) == null ? void 0 : _c.first;\n      const color = (identifier == null ? void 0 : identifier.value) || (identifier == null ? void 0 : identifier.name);\n      if (!color || IGNORE_COLORS[color]) {\n        return;\n      }\n      if (shouldPreserveColors && !didSplitSelectors && ((_d = this.rule) == null ? void 0 : _d.prelude.type) === \"SelectorList\") {\n        const origColorsRule = csstree.clone(this.rule);\n        origColorsRule.__SKIP_SVG_LOADER__ = true;\n        const origColorsSelectors = new csstree.List();\n        const selectors = this.rule.prelude.children;\n        selectors.forEach((node2, listItem) => {\n          if (node2.__ORIG_COLOR__) {\n            selectors.remove(listItem);\n            origColorsSelectors.push(node2);\n          }\n        });\n        origColorsRule.prelude.children = origColorsSelectors;\n        const parent = ((_f = (_e = this.atrule) == null ? void 0 : _e.block) == null ? void 0 : _f.children) || ((_g = this.stylesheet) == null ? void 0 : _g.children);\n        let insertBefore;\n        parent == null ? void 0 : parent.some((rule, listItem) => {\n          if (rule === this.rule) {\n            insertBefore = listItem;\n            return true;\n          }\n          return false;\n        });\n        insertBefore ? parent == null ? void 0 : parent.insertData(origColorsRule, insertBefore) : parent == null ? void 0 : parent.push(origColorsRule);\n        didSplitSelectors = true;\n      }\n      node.value = csstree.parse(replaceColor(csstree.generate(node.value), replacements), {\n        context: \"value\"\n      });\n    }\n  });\n  return csstree.generate(ast);\n}\n\n// src/internal/replaceColorsSvg.ts\nvar ELEMENTS_TO_FORCE_SET_FILL_OF = {\n  circle: true,\n  ellipse: true,\n  path: true,\n  polygon: true,\n  polyline: true,\n  rect: true,\n  text: true,\n  textPath: true,\n  tref: true,\n  tspan: true\n};\nvar COLOR_ATTRS_TO_REPLACE_SVG = __spreadValues({}, COLOR_ATTRS_TO_REPLACE);\ndelete COLOR_ATTRS_TO_REPLACE_SVG.fill;\nfunction replaceColorsSvg(node, isFillSetOnRoot, replacements, nodesWithOrigColors) {\n  if (node.name === \"style\") {\n    const firstChild = node.children[0];\n    const newCss = replaceColorsCss(firstChild == null ? void 0 : firstChild.value, replacements, nodesWithOrigColors, false);\n    if (newCss) {\n      firstChild.value = newCss;\n    }\n  } else {\n    const newCss = replaceColorsCss(node.attributes.style, replacements, nodesWithOrigColors, true);\n    if (newCss) {\n      node.attributes.style = newCss;\n    }\n  }\n  const isRoot = node.name === \"svg\";\n  const fillAttr = node.attributes.fill;\n  if (isRoot && fillAttr) {\n    isFillSetOnRoot = true;\n  }\n  if ((isRoot && isFillSetOnRoot || !isRoot && !isFillSetOnRoot && ELEMENTS_TO_FORCE_SET_FILL_OF[node.name]) && !IGNORE_COLORS[fillAttr]) {\n    node.attributes.fill = replaceColor(fillAttr, replacements);\n  }\n  for (const attr in COLOR_ATTRS_TO_REPLACE_SVG) {\n    const attrsColor = node.attributes[attr];\n    if (attrsColor && !IGNORE_COLORS[attrsColor]) {\n      node.attributes[attr] = replaceColor(attrsColor, replacements);\n    }\n  }\n  return isFillSetOnRoot;\n}\n\n// src/loader.ts\nvar DEFAULT_OPTIONS = {\n  tempDir: \".temp\",\n  preserveLineWidthList: [],\n  skipPreserveLineWidthList: [],\n  skipPreserveLineWidthSelectors: [],\n  setCurrentColorList: [],\n  skipSetCurrentColorList: [],\n  skipSetCurrentColorSelectors: [],\n  replaceColorsList: [],\n  skipReplaceColorsList: [],\n  skipReplaceColorsSelectors: [],\n  skipTransformsList: [],\n  skipTransformsSelectors: [],\n  skipFilesList: [],\n  defaultImport: \"source\"\n};\nfunction viteAwesomeSvgLoader(options = {}) {\n  const mergedOptions = __spreadValues(__spreadValues({}, DEFAULT_OPTIONS), options);\n  mergedOptions.tempDir = mergedOptions.tempDir.replaceAll(\"\\\\\", \"/\");\n  if (mergedOptions.tempDir.startsWith(\"/\") || mergedOptions.tempDir.startsWith(\"./\") || mergedOptions.tempDir.indexOf(\":/\") !== -1) {\n    throw new Error(\n      `\"tempDir\" option must be in format \"path/to/temp/dir\",i.e. it shouldn't be an absolute path, or start with \"./\".It'll be resolved to the project's root by the plugin.`\n    );\n  }\n  if (mergedOptions.tempDir.endsWith(\"/\")) {\n    mergedOptions.tempDir = mergedOptions.tempDir.substring(0, mergedOptions.tempDir.length - 1);\n  }\n  mergedOptions.tempDir = \"/\" + mergedOptions.tempDir;\n  let isBuildMode = false;\n  let root = \"\";\n  let base = \"\";\n  let oldViteRoot = \"\";\n  const replaceColorsList = options.setCurrentColorList || mergedOptions.replaceColorsList;\n  const replacementsWithFiles = [];\n  const filesWithCurrentColor = [];\n  const allFilesReplacements = {\n    files: [/.*/],\n    replacements: {},\n    default: \"\"\n  };\n  let hasAllFilesReplacements = false;\n  for (const replacements of replaceColorsList) {\n    if (typeof replacements === \"string\" || replacements instanceof RegExp) {\n      filesWithCurrentColor.push({\n        files: [replacements],\n        replacements: {},\n        default: \"currentColor\"\n      });\n      continue;\n    }\n    if (replacements.files instanceof Array) {\n      replacementsWithFiles.push(replacements);\n      continue;\n    }\n    for (const color in replacements) {\n      hasAllFilesReplacements = true;\n      allFilesReplacements.replacements[color] = replacements[color];\n    }\n  }\n  const replaceColorsListNormalized = [...replacementsWithFiles, ...filesWithCurrentColor];\n  if (hasAllFilesReplacements) {\n    replaceColorsListNormalized.push(allFilesReplacements);\n  }\n  return {\n    name: \"vite-awesome-svg-loader\",\n    enforce: \"pre\",\n    config(config, { command }) {\n      isBuildMode = command === \"build\";\n    },\n    configResolved(config) {\n      root = normalizeBaseDir(config.root);\n      base = normalizeBaseDir(config.base);\n      oldViteRoot = root[1] === \":\" ? root.substring(2) : root;\n    },\n    configureServer(server) {\n      var _a;\n      (_a = server.httpServer) == null ? void 0 : _a.on(\"close\", () => {\n        if (!isBuildMode) {\n          import_fs_extra.default.removeSync(root + mergedOptions.tempDir);\n        }\n      });\n    },\n    resolveId(source, importer) {\n      if (source.indexOf(\".svg\") === -1) {\n        return null;\n      }\n      if (source.startsWith(oldViteRoot)) {\n        return root + source.substring(oldViteRoot.length);\n      }\n      if (!source.startsWith(\".\")) {\n        return source;\n      }\n      if (!importer) {\n        return null;\n      }\n      return import_path2.default.join(import_path2.default.dirname(importer), source);\n    },\n    load(id) {\n      var _a, _b;\n      const ext = \".svg\";\n      const indexOfSvg = id.indexOf(ext);\n      if (indexOfSvg === -1) {\n        return null;\n      }\n      let relPathWithSlash = id.substring(0, indexOfSvg + ext.length).replaceAll(\"\\\\\", \"/\");\n      if (relPathWithSlash.startsWith(root)) {\n        relPathWithSlash = relPathWithSlash.substring(root.length);\n      }\n      if (!relPathWithSlash.startsWith(\"/\")) {\n        relPathWithSlash = \"/\" + relPathWithSlash;\n      }\n      const queryStr = id.split(\"?\", 2)[1] || \"\";\n      const queryKVPairs = queryStr.split(\"&\");\n      const query = {};\n      for (const pair of queryKVPairs) {\n        const [key, value] = pair.split(\"=\");\n        query[key.toLowerCase()] = value || \"1\";\n      }\n      if (matchesQueryOrList(relPathWithSlash, query[\"skip-awesome-svg-loader\"], mergedOptions.skipFilesList)) {\n        return null;\n      }\n      const shouldSkipTransforms = matchesQueryOrList(\n        relPathWithSlash,\n        query[\"skip-transforms\"],\n        mergedOptions.skipTransformsList\n      );\n      const shouldPreserveLineWidth = !shouldSkipTransforms && matchesQueryOrList(relPathWithSlash, query[\"preserve-line-width\"], mergedOptions.preserveLineWidthList) && !matchesQueryOrList(relPathWithSlash, void 0, mergedOptions.skipPreserveLineWidthList);\n      const skipPreserveLineWidthSelectors = selectorsToList(\n        relPathWithSlash,\n        mergedOptions.skipPreserveLineWidthSelectors,\n        !shouldPreserveLineWidth\n      );\n      let shouldReplaceColors = false;\n      const colorReplacements = {\n        replacements: {},\n        // @ts-ignore\n        default: void 0\n      };\n      if (!shouldSkipTransforms && !matchesQueryOrList(\n        relPathWithSlash,\n        void 0,\n        options.skipSetCurrentColorList || mergedOptions.skipReplaceColorsList\n      )) {\n        if (matchesQuery(query[\"set-current-color\"])) {\n          colorReplacements.default = \"currentColor\";\n          shouldReplaceColors = true;\n        } else {\n          for (const replacements of replaceColorsListNormalized) {\n            if (!matchesPath(relPathWithSlash, replacements.files)) {\n              continue;\n            }\n            shouldReplaceColors = true;\n            if (colorReplacements.default === void 0 && replacements.default !== void 0) {\n              colorReplacements.default = replacements.default;\n            }\n            for (const color in replacements.replacements) {\n              (_a = colorReplacements.replacements)[color] || (_a[color] = replacements.replacements[color]);\n            }\n          }\n        }\n      }\n      (_b = colorReplacements.default) != null ? _b : colorReplacements.default = \"currentColor\";\n      const skipReplaceColorsSelectors = selectorsToList(\n        relPathWithSlash,\n        options.skipSetCurrentColorSelectors || mergedOptions.skipReplaceColorsSelectors,\n        !shouldReplaceColors\n      );\n      const skipTransformsSelectors = selectorsToList(\n        relPathWithSlash,\n        mergedOptions.skipTransformsSelectors,\n        shouldSkipTransforms\n      );\n      const hashParts = [relPathWithSlash];\n      for (const arr of [skipPreserveLineWidthSelectors, skipReplaceColorsSelectors, skipTransformsSelectors]) {\n        hashParts.push(arr.join(\",\"));\n      }\n      for (const param of [shouldSkipTransforms, shouldPreserveLineWidth, shouldReplaceColors]) {\n        hashParts.push(param ? \"1\" : \"0\");\n      }\n      if (shouldReplaceColors) {\n        hashParts.push(JSON.stringify(colorReplacements));\n      }\n      const hash = new import_imurmurhash.default(hashParts.join(\"__\")).result();\n      const fileNameNoExt = import_path2.default.basename(relPathWithSlash).split(\".\")[0];\n      const assetFileNameNoExt = `${fileNameNoExt}-${hash}`;\n      const assetFileName = assetFileNameNoExt + \".svg\";\n      const assetRelPath = import_path2.default.dirname(relPathWithSlash) + \"/\" + assetFileName;\n      const fullPath = root + relPathWithSlash;\n      let code = import_fs_extra.default.readFileSync(fullPath).toString();\n      let isFillSetOnRoot = false;\n      const nodesWithOrigColors = [];\n      let didTransform = false;\n      code = (0, import_svgo.optimize)(code, {\n        multipass: true,\n        plugins: [\n          {\n            name: \"prefixIds\",\n            params: {\n              prefixIds: true,\n              prefixClassNames: true,\n              prefix: assetFileNameNoExt\n            }\n          },\n          {\n            name: \"awesome-svg-loader\",\n            fn: () => {\n              if (didTransform) {\n                return null;\n              }\n              didTransform = true;\n              return {\n                root: {\n                  enter: (root2) => {\n                    for (const selectors of [skipReplaceColorsSelectors, skipTransformsSelectors]) {\n                      for (const selector of selectors) {\n                        nodesWithOrigColors.push(...(0, import_xast2.querySelectorAll)(root2, selector));\n                      }\n                    }\n                  }\n                },\n                element: {\n                  enter: (node) => {\n                    if (matchesSelectors(node, skipTransformsSelectors)) {\n                      return;\n                    }\n                    if (shouldPreserveLineWidth && !matchesSelectors(node, skipPreserveLineWidthSelectors)) {\n                      preserveLineWidth(node, fullPath);\n                    }\n                    if (shouldReplaceColors && !matchesSelectors(node, skipReplaceColorsSelectors)) {\n                      isFillSetOnRoot = replaceColorsSvg(node, isFillSetOnRoot, colorReplacements, nodesWithOrigColors);\n                    }\n                  }\n                }\n              };\n            }\n          }\n        ]\n      }).data;\n      let importType = mergedOptions.defaultImport;\n      for (const type of IMPORT_TYPES) {\n        if (query[type]) {\n          importType = type;\n        }\n      }\n      switch (importType) {\n        case \"source\":\n          return \"export default `\" + escapeBackticks(code) + \"`;\";\n        case \"source-data-uri\":\n          return \"export default `data:image/svg+xml,\" + encodeURIComponent(code) + \"`;\";\n        case \"base64\":\n          return \"export default `\" + escapeBackticks(toBase64(code)) + \"`;\";\n        case \"base64-data-uri\":\n          return \"export default `data:image/svg+xml;base64,\" + encodeURIComponent(toBase64(code)) + \"`;\";\n      }\n      if (!isBuildMode) {\n        const assetUrl = mergedOptions.tempDir + assetRelPath;\n        import_fs_extra.default.outputFileSync(root + assetUrl, code);\n        return `export default \"${base + assetUrl}\"`;\n      }\n      const assetId = this.emitFile({\n        type: \"asset\",\n        name: assetFileName,\n        source: code\n      });\n      return `export default \"__VITE_ASSET__${assetId}__\";`;\n    }\n  };\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  viteAwesomeSvgLoader\n});\n"]}