<html>
<head>
<title><%=title%></title>
<script src='js/jquery.min.js'></script>
<script src='js/jquery-ui.min.js'></script>
<script src='js/bootstrap.min.js'></script>
<script src='js/bootstrap-typeahead.min.js'></script>
<link href='css/bootstrap.min.css' rel='stylesheet'>
<link rel='stylesheet' href='css/jquery-ui.min.css'>
<script src='js/pkgndep.js'></script>
<link href='css/pkgndep.css' rel='stylesheet'>
<script src='js/ion.rangeSlider.min.js'></script>
<link href='css/ion.rangeSlider.min.css' rel='stylesheet'>

<script src='js/cytoscape.min.js'></script>
<script src='js/dagre.min.js'></script>
<script src='js/cytoscape-dagre.js'></script>
<script src="js/cytoscape-euler.js"></script>

<script>
$( function() {
	$("#typeahead").typeahead({
	    source: <%=jsonlite::toJSON(all_pkgs)%>,
	    lookup: function (event) {
	        var that = this, items;
	        if (that.ajax) {
	            that.ajaxer();
	        } else {
	            that.query = that.$element.val();

	            if (!that.query) {
	                return that.shown ? that.hide() : that;
	            }

	            items = that.grepper(that.source);

	            if (!items) {
	                return that.shown ? that.hide() : that;
	            }
	            return that.render(items.slice(0, that.options.items)).show();
	        }
	    }
	});
});
</script>
</head>
<body>
<div style='width:1600px; margin-left:20px;' id="main">
	<nav class="navbar navbar-default">
	  <div class="container-fluid">
	    <div class="navbar-header">
	      <a class="navbar-brand" href="main">Dependency heaviness table for all packages</a>
	      <form class="navbar-form navbar-right" method="get">
		      <div class="input-group">
		        <input type="text" class="form-control" id="typeahead" placeholder="" name="package" value="<%=package%>" />
		        <div class="input-group-btn">
		          <button class="btn btn-default" type="submit">Search package</button>
		        </div>
		      </div>
		    </form>
	    </div>
	 </div>
	 </nav>
