<commit_before>PP64.header = (function() {
  const actions_norom = [
    { "name": "Load ROM", "icon": "img/header/romcart.png", "type": $actType.ROM_LOAD, "details": "Load a ROM image and read its boards" },
    { "name": "New board", "icon": "img/header/newboard.png",
      "type": $actType.BOARD_NEW, "details": "Create a new board",
      "dropdownFn": newboardDropdown
    },
    { "name": "Import board", "icon": "img/header/loadboard.png", "type": $actType.BOARD_LOAD, "details": "Import a board file into the editor" },
    { "name": "Export board", "icon": "img/header/saveboard.png", "type": $actType.BOARD_SAVE, "details": "Export a board file for distribution" },
    //{ "name": "Copy", "icon": "img/header/copyboard.png", "type": $actType.BOARD_COPY, "details": "Create a copy of this board" },
    // { "name": "Edit Details", "icon": "img/header/editdetails.png", "type": $actType.BOARD_DETAILS, "details": "View and edit various board details" },
    // { "name": "Set BG", "icon": "img/header/setbg.png", "type": $actType.SET_BG, "details": "Change the board background image" },
    { "name": "Screenshot", "icon": "img/header/screenshot.png",
      "type": $actType.SCREENSHOT, "details": "Take a screenshot of the current board",
      "dropdownFn": screenshotDropdown
    },
    { "name": "Settings", "icon": "img/header/settings.png", "type": $actType.SETTINGS, "details": "Editor settings" },
    { "name": "About", "icon": "img/header/about.png", "type": $actType.ABOUT, "details": "About PartyPlanner64" },
  ];

  const actions_rom_romboard = [
    { "name": "Close ROM", "icon": "img/header/romclose.png", "type": $actType.ROM_UNLOAD, "details": "Close the ROM file and remove its boards" },
    { "name": "Save ROM", "icon": "img/header/romsave.png", "type": $actType.ROM_SAVE, "details": "Save changes out to a ROM file" },
    { "name": "New board", "icon": "img/header/newboard.png",
      "type": $actType.BOARD_NEW, "details": "Create a new board",
      "dropdownFn": newboardDropdown
    },
    { "name": "Import board", "icon": "img/header/loadboard.png", "type": $actType.BOARD_LOAD, "details": "Import a board file into the editor" },
    { "name": "Export board", "icon": "img/header/saveboard.png", "type": $actType.BOARD_SAVE, "details": "Export a board file for distribution" },
    { "name": "Import file dump", "icon": "img/header/dump.png", "type": $actType.DUMP_LOAD, "details": "Import and overwrite with a dump of ROM data", "advanced": true },
    { "name": "Export file dump", "icon": "img/header/dump.png", "type": $actType.DUMP_SAVE, "details": "Export a zip of all the ROM file data", "advanced": true },
    { "name": "Model Viewer", "icon": "img/header/modelviewer.png", "type": $actType.MODEL_VIEWER, "details": "View 3D model data in the ROM" },
    //{ "name": "Strings", "icon": "img/header/stringseditor.png", "type": $actType.STRINGS_EDITOR, "details": "View and edit strings in the ROM" },
    //{ "name": "Copy", "icon": "img/header/copyboard.png", "type": $actType.BOARD_COPY, "details": "Create a copy of this board" },
    // { "name": "View Details", "icon": "img/header/editdetails.png", "type": $actType.BOARD_DETAILS, "details": "View various board details" },
    { "name": "Screenshot", "icon": "img/header/screenshot.png",
      "type": $actType.SCREENSHOT, "details": "Take a screenshot of the current board",
      "dropdownFn": screenshotDropdown
    },
    { "name": "Patches", "icon": "img/header/rompatch.png", "type": $actType.PATCHES, "details": "Apply patches to the ROM", "advanced": true },
    { "name": "Settings", "icon": "img/header/settings.png", "type": $actType.SETTINGS, "details": "Editor settings" },
    { "name": "About", "icon": "img/header/about.png", "type": $actType.ABOUT, "details": "About PartyPlanner64" },
  ];

  const actions_rom_normalboard = [
    { "name": "Close ROM", "icon": "img/header/romclose.png", "type": $actType.ROM_UNLOAD, "details": "Close the ROM file and remove its boards" },
    { "name": "Save ROM", "icon": "img/header/romsave.png", "type": $actType.ROM_SAVE, "details": "Save changes out to a ROM file" },
    {
      "name": "Overwrite", "icon": "img/header/romoverwrite.png",
      "type": $actType.BOARD_WRITE, "details": "Overwrite a ROM board with the current board",
      "dropdownFn": overwriteDropdown
    },
    { "name": "New board", "icon": "img/header/newboard.png",
      "type": $actType.BOARD_NEW, "details": "Create a new board",
      "dropdownFn": newboardDropdown
    },
    { "name": "Import board", "icon": "img/header/loadboard.png", "type": $actType.BOARD_LOAD, "details": "Import a board file into the editor" },
    { "name": "Export board", "icon": "img/header/saveboard.png", "type": $actType.BOARD_SAVE, "details": "Export a board file for distribution" },
    { "name": "Import file dump", "icon": "img/header/dump.png", "type": $actType.DUMP_LOAD, "details": "Import and overwrite with a dump of ROM data", "advanced": true },
    { "name": "Export file dump", "icon": "img/header/dump.png", "type": $actType.DUMP_SAVE, "details": "Export a zip of all the ROM file data", "advanced": true },
    { "name": "Model Viewer", "icon": "img/header/modelviewer.png", "type": $actType.MODEL_VIEWER, "details": "View 3D model data in the ROM" },
    //{ "name": "Strings", "icon": "img/header/stringseditor.png", "type": $actType.STRINGS_EDITOR, "details": "View and edit strings in the ROM" },
    //{ "name": "Copy", "icon": "img/header/copyboard.png", "type": $actType.BOARD_COPY, "details": "Create a copy of this board" },
    // { "name": "Edit Details", "icon": "img/header/editdetails.png", "type": $actType.BOARD_DETAILS, "details": "View and edit various board details" },
    // { "name": "Set BG", "icon": "img/header/setbg.png", "type": $actType.SET_BG, "details": "Change the board background image" },
    { "name": "Screenshot", "icon": "img/header/screenshot.png",
      "type": $actType.SCREENSHOT, "details": "Take a screenshot of the current board",
      "dropdownFn": screenshotDropdown
    },
    { "name": "Patches", "icon": "img/header/rompatch.png", "type": $actType.PATCHES, "details": "Apply patches to the ROM", "advanced": true },
    { "name": "Settings", "icon": "img/header/settings.png", "type": $actType.SETTINGS, "details": "Editor settings" },
    { "name": "About", "icon": "img/header/about.png", "type": $actType.ABOUT, "details": "About PartyPlanner64" },
  ];

  const actions_back = [
    { "name": "Back to editor", "icon": "img/header/board.png", "type": $actType.BOARD_EDITOR, "details": "Return to the board editor" },
  ];

  //const action_overflow = { "name": "", "icon": "img/header/more.png", "type": "MORE", "details": "More options" };
  const action_overflow = { "name": "", "type": "MORE", "details": "More options" };

  function _handleAction(action) {
    switch(action) {
      case $actType.ROM_LOAD:
        PP64.utils.input.openFile(".z64,.v64,.rom,.n64", romSelected);
        break;
      case $actType.ROM_UNLOAD:<commit_msg>Reorder header items, move model viewer lower<commit_after>PP64.header = (function() {
  const actions_norom = [
    { "name": "Load ROM", "icon": "img/header/romcart.png", "type": $actType.ROM_LOAD, "details": "Load a ROM image and read its boards" },
    { "name": "New board", "icon": "img/header/newboard.png",
      "type": $actType.BOARD_NEW, "details": "Create a new board",
      "dropdownFn": newboardDropdown
    },
    { "name": "Import board", "icon": "img/header/loadboard.png", "type": $actType.BOARD_LOAD, "details": "Import a board file into the editor" },
    { "name": "Export board", "icon": "img/header/saveboard.png", "type": $actType.BOARD_SAVE, "details": "Export a board file for distribution" },
    //{ "name": "Copy", "icon": "img/header/copyboard.png", "type": $actType.BOARD_COPY, "details": "Create a copy of this board" },
    // { "name": "Edit Details", "icon": "img/header/editdetails.png", "type": $actType.BOARD_DETAILS, "details": "View and edit various board details" },
    // { "name": "Set BG", "icon": "img/header/setbg.png", "type": $actType.SET_BG, "details": "Change the board background image" },
    { "name": "Screenshot", "icon": "img/header/screenshot.png",
      "type": $actType.SCREENSHOT, "details": "Take a screenshot of the current board",
      "dropdownFn": screenshotDropdown
    },
    { "name": "Settings", "icon": "img/header/settings.png", "type": $actType.SETTINGS, "details": "Editor settings" },
    { "name": "About", "icon": "img/header/about.png", "type": $actType.ABOUT, "details": "About PartyPlanner64" },
  ];

  const actions_rom_romboard = [
    { "name": "Close ROM", "icon": "img/header/romclose.png", "type": $actType.ROM_UNLOAD, "details": "Close the ROM file and remove its boards" },
    { "name": "Save ROM", "icon": "img/header/romsave.png", "type": $actType.ROM_SAVE, "details": "Save changes out to a ROM file" },
    { "name": "New board", "icon": "img/header/newboard.png",
      "type": $actType.BOARD_NEW, "details": "Create a new board",
      "dropdownFn": newboardDropdown
    },
    { "name": "Import board", "icon": "img/header/loadboard.png", "type": $actType.BOARD_LOAD, "details": "Import a board file into the editor" },
    { "name": "Export board", "icon": "img/header/saveboard.png", "type": $actType.BOARD_SAVE, "details": "Export a board file for distribution" },
    { "name": "Import file dump", "icon": "img/header/dump.png", "type": $actType.DUMP_LOAD, "details": "Import and overwrite with a dump of ROM data", "advanced": true },
    { "name": "Export file dump", "icon": "img/header/dump.png", "type": $actType.DUMP_SAVE, "details": "Export a zip of all the ROM file data", "advanced": true },
    { "name": "Screenshot", "icon": "img/header/screenshot.png",
      "type": $actType.SCREENSHOT, "details": "Take a screenshot of the current board",
      "dropdownFn": screenshotDropdown
    },
    { "name": "Patches", "icon": "img/header/rompatch.png", "type": $actType.PATCHES, "details": "Apply patches to the ROM", "advanced": true },
    { "name": "Model Viewer", "icon": "img/header/modelviewer.png", "type": $actType.MODEL_VIEWER, "details": "View 3D model data in the ROM" },
    //{ "name": "Strings", "icon": "img/header/stringseditor.png", "type": $actType.STRINGS_EDITOR, "details": "View and edit strings in the ROM" },
    //{ "name": "Copy", "icon": "img/header/copyboard.png", "type": $actType.BOARD_COPY, "details": "Create a copy of this board" },
    // { "name": "View Details", "icon": "img/header/editdetails.png", "type": $actType.BOARD_DETAILS, "details": "View various board details" },
    { "name": "Settings", "icon": "img/header/settings.png", "type": $actType.SETTINGS, "details": "Editor settings" },
    { "name": "About", "icon": "img/header/about.png", "type": $actType.ABOUT, "details": "About PartyPlanner64" },
  ];

  const actions_rom_normalboard = [
    { "name": "Close ROM", "icon": "img/header/romclose.png", "type": $actType.ROM_UNLOAD, "details": "Close the ROM file and remove its boards" },
    { "name": "Save ROM", "icon": "img/header/romsave.png", "type": $actType.ROM_SAVE, "details": "Save changes out to a ROM file" },
    {
      "name": "Overwrite", "icon": "img/header/romoverwrite.png",
      "type": $actType.BOARD_WRITE, "details": "Overwrite a ROM board with the current board",
      "dropdownFn": overwriteDropdown
    },
    { "name": "New board", "icon": "img/header/newboard.png",
      "type": $actType.BOARD_NEW, "details": "Create a new board",
      "dropdownFn": newboardDropdown
    },
    { "name": "Import board", "icon": "img/header/loadboard.png", "type": $actType.BOARD_LOAD, "details": "Import a board file into the editor" },
    { "name": "Export board", "icon": "img/header/saveboard.png", "type": $actType.BOARD_SAVE, "details": "Export a board file for distribution" },
    { "name": "Import file dump", "icon": "img/header/dump.png", "type": $actType.DUMP_LOAD, "details": "Import and overwrite with a dump of ROM data", "advanced": true },
    { "name": "Export file dump", "icon": "img/header/dump.png", "type": $actType.DUMP_SAVE, "details": "Export a zip of all the ROM file data", "advanced": true },
    { "name": "Screenshot", "icon": "img/header/screenshot.png",
      "type": $actType.SCREENSHOT, "details": "Take a screenshot of the current board",
      "dropdownFn": screenshotDropdown
    },
    { "name": "Patches", "icon": "img/header/rompatch.png", "type": $actType.PATCHES, "details": "Apply patches to the ROM", "advanced": true },
    { "name": "Model Viewer", "icon": "img/header/modelviewer.png", "type": $actType.MODEL_VIEWER, "details": "View 3D model data in the ROM" },
    //{ "name": "Strings", "icon": "img/header/stringseditor.png", "type": $actType.STRINGS_EDITOR, "details": "View and edit strings in the ROM" },
    //{ "name": "Copy", "icon": "img/header/copyboard.png", "type": $actType.BOARD_COPY, "details": "Create a copy of this board" },
    // { "name": "Edit Details", "icon": "img/header/editdetails.png", "type": $actType.BOARD_DETAILS, "details": "View and edit various board details" },
    // { "name": "Set BG", "icon": "img/header/setbg.png", "type": $actType.SET_BG, "details": "Change the board background image" },
    { "name": "Settings", "icon": "img/header/settings.png", "type": $actType.SETTINGS, "details": "Editor settings" },
    { "name": "About", "icon": "img/header/about.png", "type": $actType.ABOUT, "details": "About PartyPlanner64" },
  ];

  const actions_back = [
    { "name": "Back to editor", "icon": "img/header/board.png", "type": $actType.BOARD_EDITOR, "details": "Return to the board editor" },
  ];

  //const action_overflow = { "name": "", "icon": "img/header/more.png", "type": "MORE", "details": "More options" };
  const action_overflow = { "name": "", "type": "MORE", "details": "More options" };

  function _handleAction(action) {
    switch(action) {
      case $actType.ROM_LOAD:
        PP64.utils.input.openFile(".z64,.v64,.rom,.n64", romSelected);
        break;
      case $actType.ROM_UNLOAD:
{'fraction_non_alphanumeric': 0.20205382436260624, 'fraction_numerical': 0.0025495750708215297, 'mean_word_length': 4.33875236294896, 'pattern_counts': {'":': 384, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6458776', 'n_tokens_mistral': 4862, 'n_tokens_neox': 4728, 'n_words': 1303}