Resolve the icon source

@param Infoset $info
357347
protected function handleIcon(Infoset $info) {
		$profiler = $this->getProfiler();
		
		if ($profiler instanceof ProfilerExtendedInterface) {
			$icon = $profiler->getIcon();
			
			if ($icon !== null) {
				if (strpos($icon, 'data:image') === 0) {
					$info->setIcon($icon, Infoset::ICON_BASE64);
					return;
				}
				
				$info->setIcon($icon);
				return;
			}
		}
		
		$info->setIcon('monitor');
	}
1064116
function fetch_remote_icon_url() {
            $info = $this->fetch_module_info();

            return ( $this->is_api_result_object( $info, 'icon' ) && is_string( $info->icon ) ) ?
                $info->icon :
                '';
        }
1372534
public function icon(Fact $fact): string
    {
        $asset = 'public/css/' . $this->name() . '/images/facts/' . $fact->getTag() . '.png';
        if (file_exists(Webtrees::ROOT_DIR . 'public' . $asset)) {
            return '<img src="' . e(asset($asset)) . '" title="' . GedcomTag::getLabel($fact->getTag()) . '">';
        }

        // Spacer image - for alignment - until we move to a sprite.
        $asset = 'public/css/' . $this->name() . '/images/facts/NULL.png';
        if (file_exists(Webtrees::ROOT_DIR . 'public' . $asset)) {
            return '<img src="' . e(asset($asset)) . '">';
        }

        return '';
    }
184077
protected function handleIcon(Infoset $info, Tag $tabElement) {
		switch ($info->getIconType()) {
			case Infoset::ICON_ASSET:
				$icon = Icons::getIcon($info->getIconSource());
				$tabElement->addClass('hasicon');
				$tabElement->addStyle('background-image', "url($icon)");
				return;
			
			case Infoset::ICON_BASE64:
				$icon = $info->getIconSource();
				$tabElement->addClass('hasicon');
				$tabElement->addStyle('background-image', "url($icon)");
				return;
		}
	}
924790
protected function serverInfo(Infoset $info) {
		$infoTable = $this->createTable();
		$infoTable->setTitle('Info');
		
		if (! empty($_SERVER['REQUEST_TIME'])) {
			$infoTable[] = ['Request time: ', date(DATE_RFC3339, $_SERVER['REQUEST_TIME'])];
		}
		
		foreach (self::$serverInfo as $groupName => $groupInfo) {
			foreach ($groupInfo as $title => $item) {
				if (empty($_SERVER[$item])) {
					continue;
				}
				
				$value = $_SERVER[$item];
				
				if (strlen($value) > 1024) {
					$value = substr($value, 0, 1024) . '...';
				}
				
				if ($groupName === 'http') {
					$infoTable->pushSuccess([$title . ':', $value]);
					continue;
				}
				
				if ($groupName === 'server') {
					$infoTable->pushInfo([$title . ':', $value]);
					continue;
				}
				
				$infoTable->pushContent([$title . ':', $value]);
			}
		}
		
		$info[] = $infoTable;
	}
318218
protected function createPanel(Infoset $info) {
		$content = $this->createContent($info);
		
		$titleValue = $info->getName() . ' :: ' . $this->stripBbCodes($info->getTitle());
		$titleValue = $this->specialCharsHandle($titleValue);
		
		$title = new Tag('h4', $titleValue, 'debug-bar-wrapper');
		$panel = new Tag('div', $content, 'debug-panel');
		
		return new Tag('div', $title->render() . $panel->render(), 'debug-panel-wrapper');
	}
1227302
function _icon() {
  if (cache) { return cache }
  try {
    fs.accessSync(path.resolve(options.success))
    return cache = options.success;
  } catch(e){
    return cache = 'https://i.imgur.com/G6fTWAs.png';
  }
}
681198
protected function createTitle(Infoset $info) {
		if (php_sapi_name() === 'cli') {
			$info->setTitle('[success]CLI[/success]');
			return;
		}
		
		$code = http_response_code();
		
		$title = ($code < 400)
			? '[success]' . $code . '[/success]'
			: '[alert]' . $code . '[/alert]';
		
		if (ob_get_level() > 0) {
			$title .= ' / ' . $this->formatMemory(ob_get_length());
		}
		
		$info->setTitle($title);
	}
82447
protected function collectData(Infoset $info, array $source, $title) {
		$infoTable = $this->createTable();
		$infoTable->setTitle($title);
		
		foreach ($source as $name => $value) {
			if (is_array($value)) {
				foreach ($value as $key => $val) {
					if (strlen($val) > 1024) {
						$val = substr($val, 0, 1024) . '...';
					}
					
					$infoTable[] = [$name . '[' . $key . ']:', $val];
				}
				
				continue;
			}
			
			if (strlen($value) > 1024) {
				$value = substr($value, 0, 1024) . '...';
			}
			
			$infoTable[] = [$name . ':', $value];
		}
		
		$info[] = $infoTable;
	}
509162
public function addInfo($info) : void
    {
        Assert::isInstanceOfAny(
            $info,
            [Chunk::class, KeyName::class, X509Data::class],
            'KeyInfo can only contain instances of KeyName, X509Data or Chunk.'
        );
        $this->info[] = $info;
    }
1080790
public function updateResourceIconSet(IconSet $iconSet, $iconNamesForType)
    {
        $this->extractResourceIconSetZipAndReturnNewIconItems($iconSet, $iconNamesForType);
        $this->om->persist($iconSet);
        $this->om->flush();

        return $iconSet;
    }
602303
public function setIcon($icon)
    {
        if (in_array(
            $icon,
            $this->validIcons
        )) {
            $this->icon = $icon;
        }

        return $this;
    }
574123
public void setInfo(final String info, final boolean isHtml) {

        if (info != null) {
            if (!CmsStringUtil.isEmptyOrWhitespaceOnly(info)) {
                initInfoStyle();
                final Data tooltipData = new CmsFieldTooltip.Data(m_icon, info, isHtml);
                final Panel icon = m_icon;
                final Supplier<Data> dataSupplier = Suppliers.ofInstance(tooltipData);
                installTooltipEventHandlers(icon, dataSupplier);
            }
        }
    }
1272848
protected function createContent(Infoset $info) {
		switch ($info->getContentType()) {
			case Infoset::TYPE_LIST:
				return $this->createList($info);
			
			case Infoset::TYPE_TABLE:
				return $this->createTable($info);
			
			case Infoset::TYPE_MULTI:
				$content = [];
				
				foreach ($info as $part) {
					$content[] = $this->createContent($part);
				}
				
				return implode(PHP_EOL . PHP_EOL, $content);
				
			case Infoset::TYPE_TEXT:
				$content = iterator_to_array($info);
				
				return implode(PHP_EOL, $content);
				
			case Infoset::TYPE_DESCLIST:
				return $this->createDescriptionList($info);
			
			case Infoset::TYPE_DUMP:
				return;
			
			case Infoset::TYPE_TOPOLOGY:
				return;
		}
		
		throw new InvalidContent('Unknown content type: "' . $info->getContentType() . '"');
	}
802648
protected function createTab(Infoset $info) {
		$title   = $this->specialCharsHandle($info->getTitle());
		$title   = $this->bbCodesHandle($title);
		$infoTag = new Tag('span', $title, 'debug-info-holder');

		$tabElement = new ListElement($infoTag->render());
		$tabElement->addClass('debug-tab');
		
		$titleAttr = $info->getName() . ' :: ' . $info->getTitle();
		$titleAttr = $this->specialCharsHandle($titleAttr);
		$titleAttr = $this->stripBbCodes($titleAttr);
		$tabElement->title = $titleAttr;
		
		if ($info->getLevel() <= Infoset::LEVEL_ALERT) {
			$tabElement->addClass('alert');
		}
		
		if ($info->hasIcon()) {
			$this->handleIcon($info, $tabElement);
		}
		
		return $tabElement;
	}
540607
public function addInfoLog($info)
    {
        if ($this->configHelper->isDebugModeOn()) {
            $this->boltLogger->info($info);
        }
        return $this;
    }
201778
public function info(Info $info, InfoTransformer $transformer)
    {
        // Return a resource
        return $this->app->make(Item::class, [$info, $transformer]);
    }