Build an SVG sprite string containing SVG symbols.
@param {Object} icons
@returns {string}
765965
function buildSpriteString(icons) {
  const symbols = Object.keys(icons)
    .map(icon => toSvgSymbol(icon, icons[icon]))
    .join('');

  return `<svg xmlns="${DEFAULT_ATTRS.xmlns}"><defs>${symbols}</defs></svg>`;
}
1233372
function svgs(req, res) {
  const bundle = new Bundle(
    req.url.slice(1, -5).split('-').map(function map(name) {
      return assets[name];
    })
  );

  bundle.run(function (err, output) {
    if (err) throw err;

    res.setHeader('Content-Length', Buffer(output).length);
    res.writeHead(200, { 'Content-Type': 'text/plain' });

    res.end(output);
  });
}
470486
function(stylesheet, refresh){
		if( icons && !refresh ){
			return icons;
		}

		icons = {};

		// get grunticon stylesheet by its href
		var svgss,
			rules, cssText,
			iconClass, iconSVGEncoded, iconSVGRaw;

		svgss = stylesheet.sheet;

		if( !svgss ){ return icons; }

		rules = svgss.cssRules ? svgss.cssRules : svgss.rules;
		for( var i = 0; i < rules.length; i++ ){
			cssText = rules[ i ].cssText;
			iconClass = selectorPlaceholder + rules[ i ].selectorText;
			iconSVGEncoded = cssText.split( ");" )[ 0 ].match( /US\-ASCII\,([^"']+)/ );
			if( iconSVGEncoded && iconSVGEncoded[ 1 ] ){
				iconSVGRaw = decodeURIComponent( iconSVGEncoded[ 1 ] );
				icons[ iconClass ] = iconSVGRaw;

			}
		}
		return icons;
	}
1041329
function toSvg(name, attrs = {}) {
  console.warn(
    'feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead.',
  );

  if (!name) {
    throw new Error('The required `key` (icon name) parameter is missing.');
  }

  if (!icons[name]) {
    throw new Error(
      `No icon matching '${
        name
      }'. See the complete list of icons at https://feathericons.com`,
    );
  }

  return icons[name].toSvg(attrs);
}
622169
function getSvgSpriteConfig(category) {
  return {
    shape: {
      dimension: {
        maxWidth: 24,
        maxHeight: 24
      },
    },
    mode: {
      css : {
        bust: false,
        dest: './',
        sprite: `./svg-sprite-${ category }.svg`,
        example: {
          dest: `./svg-sprite-${ category }.html`
        },
        render: {
          css: {
            dest: `./svg-sprite-${ category }.css`
          }
        }
      },
      symbol : {
        bust: false,
        dest: './',
        sprite: `./svg-sprite-${ category }-symbol.svg`,
        example: {
          dest: `./svg-sprite-${ category }-symbol.html`
        }
      }
    }
  };
}
118954
function convert ({ prefix, base, svg }) {
  const data = process(svg, { prefix })

  return dedent`
    @function ${prefix}-${base}-image($color: #000000) {
      @return url(${JSON.stringify(data)});
    }

    @mixin ${prefix}-${base}($size: 16px, $color: #000000) {
      @include ${prefix}-base;
      background: ${prefix}-${base}-image($color) center center / $size $size no-repeat;
      height: $size;
      width: $size;
    }
  `
}
967382
function svgUrl(name, collection) {
  for (var i = 0, result; i < COLLECTION_FILTERS.length; i++) {
    if (COLLECTION_FILTERS[i][0].test(collection)) {
      result = COLLECTION_FILTERS[i][1];
      collection = _.isFunction(result)? result(collection) : result;
      break;
    }
  }
  return 'https://raw.github.com/fontello/' + collection +
         '/master/src/svg/' + name + '.svg';
}
657517
function (icon) {
            var iconParts = icon.split(":");
            if (iconParts.length !== 2) {
                this.$logError(this.ICON_BADLY_FORMATTED, [icon]);
                return null;
            } else {
                var iconInfo = aria.widgets.AriaSkinInterface.getIcon(iconParts[0], iconParts[1]);
                if (!iconInfo) {
                    this.$logError(this.ICON_NOT_FOUND, [icon]);
                    return null;
                }
                return iconInfo;
            }
        }
1262570
function getEntryIconHtml(shape) {
        var html = '',
            name = shape.name,
            x = shape.xPos,
            y = shape.yPos,
            fill = shape.fillColor,
            stroke = shape.strokeColor,
            width = shape.strokeWidth;
        switch (name) {
            case 'circle':
                html = '<use xlink:href="#circle" class="legendIcon" ' +
                    'x="' + x + '" ' +
                    'y="' + y + '" ' +
                    'fill="' + fill + '" ' +
                    'stroke="' + stroke + '" ' +
                    'stroke-width="' + width + '" ' +
                    'width="1.5em" height="1.5em"' +
                    '/>';
                break;
            case 'diamond':
                html = '<use xlink:href="#diamond" class="legendIcon" ' +
                    'x="' + x + '" ' +
                    'y="' + y + '" ' +
                    'fill="' + fill + '" ' +
                    'stroke="' + stroke + '" ' +
                    'stroke-width="' + width + '" ' +
                    'width="1.5em" height="1.5em"' +
                    '/>';
                break;
            case 'cross':
                html = '<use xlink:href="#cross" class="legendIcon" ' +
                    'x="' + x + '" ' +
                    'y="' + y + '" ' +
                    // 'fill="' + fill + '" ' +
                    'stroke="' + stroke + '" ' +
                    'stroke-width="' + width + '" ' +
                    'width="1.5em" height="1.5em"' +
                    '/>';
                break;
            case 'rectangle':
                html = '<use xlink:href="#rectangle" class="legendIcon" ' +
                    'x="' + x + '" ' +
                    'y="' + y + '" ' +
                    'fill="' + fill + '" ' +
                    'stroke="' + stroke + '" ' +
                    'stroke-width="' + width + '" ' +
                    'width="1.5em" height="1.5em"' +
                    '/>';
                break;
            case 'plus':
                html = '<use xlink:href="#plus" class="legendIcon" ' +
                    'x="' + x + '" ' +
                    'y="' + y + '" ' +
                    // 'fill="' + fill + '" ' +
                    'stroke="' + stroke + '" ' +
                    'stroke-width="' + width + '" ' +
                    'width="1.5em" height="1.5em"' +
                    '/>';
                break;
            case 'bar':
                html = '<use xlink:href="#bars" class="legendIcon" ' +
                    'x="' + x + '" ' +
                    'y="' + y + '" ' +
                    'fill="' + fill + '" ' +
                    // 'stroke="' + stroke + '" ' +
                    // 'stroke-width="' + width + '" ' +
                    'width="1.5em" height="1.5em"' +
                    '/>';
                break;
            case 'area':
                html = '<use xlink:href="#area" class="legendIcon" ' +
                    'x="' + x + '" ' +
                    'y="' + y + '" ' +
                    'fill="' + fill + '" ' +
                    // 'stroke="' + stroke + '" ' +
                    // 'stroke-width="' + width + '" ' +
                    'width="1.5em" height="1.5em"' +
                    '/>';
                break;
            case 'line':
                html = '<use xlink:href="#line" class="legendIcon" ' +
                    'x="' + x + '" ' +
                    'y="' + y + '" ' +
                    // 'fill="' + fill + '" ' +
                    'stroke="' + stroke + '" ' +
                    'stroke-width="' + width + '" ' +
                    'width="1.5em" height="1.5em"' +
                    '/>';
                break;
            default:
                // default is circle
                html = '<use xlink:href="#circle" class="legendIcon" ' +
                    'x="' + x + '" ' +
                    'y="' + y + '" ' +
                    'fill="' + fill + '" ' +
                    'stroke="' + stroke + '" ' +
                    'stroke-width="' + width + '" ' +
                    'width="1.5em" height="1.5em"' +
                    '/>';
        }

        return html;
    }
57670
protected function buildIcon(string $icon, bool $animated, array $cssClasses): string
    {
        return Html::buildHtmlElement('i', [], null, true, $this->getIconCssClasses($icon, $animated, $cssClasses));
    }
898577
function convertSvgToHtml (d3svg, title) {
        if (!d3svg) {
            return;
        }

        d3svg.attr('version', 1.1)
            .attr('xmlns', 'http://www.w3.org/2000/svg');
        let serializer = serializeWithStyles.initializeSerializer();
        let html = serializer(d3svg.node());

        html = formatHtmlByBrowser(html);
        html = prependTitle.call(this, html, title, parseInt(d3svg.attr('width'), 10));
        html = addBackground(html);

        return html;
    }
729952
function processSVGContent(text) {
        if (destroyed) {
            return;
        }

        var query = config.queryString.replace('&', '&#38;'),
            dataUrlCount;

        dataUrlCount = util.countInStr(text, 'xlink:href="data:image');
        // remove data:urls from the SVG content if the number exceeds MAX_DATA_URLS
        if (dataUrlCount > MAX_DATA_URLS) {
            // remove all data:url images that are smaller than 5KB
            text = text.replace(/<image[\s\w-_="]*xlink:href="data:image\/[^"]{0,5120}"[^>]*>/ig, '');
        }

        // @TODO: remove this, because we no longer use any external assets in this way
        // modify external asset urls for absolute path
        text = text.replace(/href="([^"#:]*)"/g, function (match, group) {
            return 'href="' + config.url + group + query + '"';
        });

        return scope.get('stylesheet').then(function (cssText) {
            return interpolateCSSText(text, cssText);
        });
    }
359390
async function generate(options = {}) {
  options = Object.assign(DEFAULT_OPTIONS, options)

  // Log start
  let msg = `Generating font kit from ${ options.paths.length } SVG icons`.yellow
  log(options, msg)

  // Run validation over options
  await validateOptions(options)

  if (options.codepoints) {
    options.codepointsMap = await getCodepointsMap(options.codepoints)
  }

  // Run font generation
  const config = getGeneratorConfig(options)
  const generatorResult = await fontGenerator(config)

  // Clean up after generator
  await deleteUnspecifiedTypes(options)

  // If specified, generate JSON map
  if (options.json) {
    await generateJson(options, generatorResult)
  }

  // Log generated files
  logReport(options)
}
471178
async function collecticonsBundle (params) {
  const {
    dirPath,
    destFile
  } = params;

  await validateDirPath(dirPath);

  const resultFiles = await collecticonsCompile({
    dirPath,
    styleFormats: ['css'],
    styleDest: './styles',
    fontDest: './',
    fontTypes: ['woff', 'woff2'],
    previewDest: './',
    noFileOutput: true
  });

  if (resultFiles === null) return;

  // Create zip.
  let zip = new JSZip();

  // Add generated files.
  resultFiles.forEach(file => {
    zip.file(file.path, file.contents);
  });

  // Add the icons.
  const dir = await fs.readdir(dirPath);
  const svgs = await Promise.all(dir.map(async file => {
    return file.endsWith('.svg')
      ? (
        {
          path: `icons/${file}`,
          contents: await fs.readFile(path.resolve(dirPath, file))
        }
      )
      : null;
  }));

  svgs.forEach(file => {
    zip.file(file.path, file.contents);
  });

  await fs.ensureDir(path.dirname(destFile));
  await fs.writeFile(destFile, zip.generate({ base64: false, compression: 'DEFLATE' }), 'binary');
}
749167
function (sprite, icon) {
            var curSprite = this.getSkinObject("Icon", sprite, true), iconContent, iconLeft = 0, iconTop = 0;
            if (curSprite && (iconContent = curSprite.content[icon]) !== undefined) {
                if (curSprite.biDimensional) {
                    var XY = iconContent.split("_");
                    iconLeft = (curSprite.iconWidth + curSprite.spriteSpacing) * XY[0];
                    iconTop = (curSprite.iconHeight + curSprite.spriteSpacing) * XY[1];
                } else if (curSprite.direction === "x") {
                    iconLeft = (curSprite.iconWidth + curSprite.spriteSpacing) * iconContent;
                } else if (curSprite.direction === "y") {
                    iconTop = (curSprite.iconHeight + curSprite.spriteSpacing) * iconContent;
                }
                return {
                    "iconLeft" : iconLeft,
                    "iconTop" : iconTop,
                    "cssClass" : "xICN" + sprite,
                    "spriteURL" : curSprite.spriteURL,
                    "width" : curSprite.iconWidth,
                    "height" : curSprite.iconHeight,
                    "borderLeft" : curSprite.borderLeft,
                    "borderRight" : curSprite.borderRight,
                    "borderTop" : curSprite.borderTop,
                    "borderBottom" : curSprite.borderBottom
                };
            }
            return false;
        }
436343
function IconvHtmlStream(options) {
    this.buff = new Buffer([]);
    this.isBuffering = true;
    this.conv = null;
    options = options || {};
    this.rewrite = (options.rewrite !== false);
    this.inputEncoding = 'utf8';
    this.encoding = options.encoding = 'utf8'; // this is the *output* encoding
    this.conv = iconv.getEncoder(this.inputEncoding);
    Transform.call(this, options);
}
652169
function GetSVG(result) {
  if (!data.svg && !data.svgNode) return;
  var jax = MathJax.Hub.getAllJax()[0]; if (!jax) return;
  var script = jax.SourceElement(),
      svg = script.previousSibling.getElementsByTagName("svg")[0];
  svg.setAttribute("xmlns","http://www.w3.org/2000/svg");

  //
  //  Add the speech text and mark the SVG appropriately
  //
  if (data.speakText){
    for (var i=0, m=svg.childNodes.length; i < m; i++)
      svg.childNodes[i].setAttribute("aria-hidden",true);
    // Note: if aria-label exists, getSpeech preserved it in speakText
    // remove aria-label since labelled-by title is preferred
    svg.removeAttribute("aria-label");
    ID++; var id = "MathJax-SVG-"+ID+"-Title";
    svg.setAttribute("aria-labelledby",id);
    var node = MathJax.HTML.Element("title",{id:id},[result.speakText]);
    svg.insertBefore(node,svg.firstChild);
  }

  if (data.svg){
    //
    //  SVG data is modified to add linebreaks for readability,
    //  and to put back the xlink namespace that is removed in HTML5
    //
    var svgdata = svg.outerHTML.replace(/><([^/])/g,">\n<$1")
                               .replace(/(<\/[a-z]*>)(?=<\/)/g,"$1\n")
                               .replace(/(<(?:use|image) [^>]*)(href=)/g,' $1xlink:$2');

    //
    //  Add the requested data to the results
    //
    result.svg = svgdata;
  }
  if (data.svgNode) result.svgNode = svg;
  result.width = svg.getAttribute("width");
  result.height = svg.getAttribute("height");
  result.style =  svg.style.cssText;
}