function findImportMapScripts(document) {
  /** @type {Node[]} */
  const allScripts = queryAll(document, predicates.hasTagName('script'));
  const scripts = allScripts.filter(script => getAttribute(script, 'type') === 'importmap');

  /** @type {Node[]} */
  const inline = [];
  /** @type {Node[]} */
  const external = [];
  scripts.forEach(script => {
    if (getAttribute(script, 'src')) {
      external.push(script);
    } else {
      inline.push(script);
    }
  });

  return { inline, external };
}
@param {Document} document
@returns {{ inline: Node[], external: Node[]}}