function buildNav(members) {
  var nav = '<div id="ClassList">',
    seen = {},
    hasClassList = false,
    classNav = "",
    globalNav = "";

  var items = members.modules
    .concat(members.classes)
    .concat(members.globals)
    .concat(members.namespaces)
    .sort(function (a, b) {
      return a.longname.toLowerCase().localeCompare(b.longname.toLowerCase());
    });

  const addItems = (items) => {
    if (items.length) {
      items.forEach(function (m) {
        if (!hasOwnProp.call(seen, m.longname)) {
          nav +=
            '<li data-name="' +
            m.name +
            '">' +
            linkto(m.longname, m.name) +
            "</li>";
        }
        seen[m.longname] = true;
      });
    }
  };

  if (process.env.CESIUM_PACKAGES) {
    process.env.CESIUM_PACKAGES.split(",").forEach((package) => {
      nav += `<h5>${package}</h5>`;
      nav += "<ul>";
      addItems(items.filter((item) => item.meta.package === package));
      nav += "</ul>";
    });
  } else {
    nav += "<ul>";
    addItems(items);
    nav += "</ul>";
  }

  nav += "</div>";

  return nav;
}
Create the navigation sidebar.
@param {object} members The members that will be used to create the sidebar.
@param {array<object>} members.classes
@param {array<object>} members.externals
@param {array<object>} members.globals
@param {array<object>} members.mixins
@param {array<object>} members.modules
@param {array<object>} members.namespaces
@param {array<object>} members.tutorials
@param {array<object>} members.events
@return {string} The HTML for the navigation sidebar.