<commit_before>// Copyright 2016-2022, University of Colorado Boulder

/*
 * Page for quickly launching phet-related tasks, such as simulations, automated/unit tests, or other utilities.
 *
 * Displays three columns:
 *
 * - Repositories: A list of repositories to select from, each one of which has a number of modes.
 * - Modes: Based on the repository selected. Decides what type of URL is loaded when "Launch" or the enter key is
 *          pressed.
 * - Query Parameters: If available, controls what optional query parameters will be added to the end of the URL.
 *
 * Mode has the format:
 * {
 *   name: {string} - Internal unique value (for looking up which option was chosen),
 *   text: {string} - Shown in the mode list,
 *   group: {string} - The optgroup that this mode belongs to
 *   description: {string} - Shown when hovering over the mode in the list,
 *   url: {string} - The base URL to visit (without added query parameters) when the mode is chosen,
 *   queryParameters: {Array.<QueryParameter>}
 * }
 *
 * QueryParameter has the format:
 * {
 *   value: {string} - The actual query parameter included in the URL,
 *   text: {string} - Shown in the query parameter list,
 *   [type]: {'boolean'} - if boolean, then it will add "=true" or "=false" to the checkbox value
 *   [default]: {boolean} - If true, the query parameter will be true by default
 * }
 */

( function() {


  // Query parameters used for the following modes: requirejs, compiled, production
  const simQueryParameters = [
    { value: 'audio=disabled', text: 'Mute' },
    {
      value: 'fuzz', text: 'Fuzz', dependentQueryParameters: [
        { value: 'fuzzPointers=2', text: 'Multitouch-fuzz' }
      ]
    },
    { value: 'fuzzBoard', text: 'Keyboard Fuzz' },
    { value: 'debugger', text: 'Debugger', default: true },
    { value: 'deprecationWarnings', text: 'Deprecation Warnings' },
    { value: 'dev', text: 'Dev' },
    { value: 'profiler', text: 'Profiler' },
    { value: 'showPointers', text: 'Pointers' },
    { value: 'showPointerAreas', text: 'Pointer Areas' },
    { value: 'showFittedBlockBounds', text: 'Fitted Block Bounds' },
    { value: 'showCanvasNodeBounds', text: 'CanvasNode Bounds' },
    { value: 'supportsInteractiveDescription', text: 'Supports Interactive Description', default: false, type: 'boolean' },
    { value: 'supportsSound', text: 'Supports Sound', default: false, type: 'boolean' },
    { value: 'supportsExtraSound', text: 'Supports Extra Sound', default: false, type: 'boolean' },
    { value: 'supportsPanAndZoom', text: 'Supports Pan and Zoom', default: true, type: 'boolean' },
    { value: 'supportsVoicing', text: 'Supports Voicing', default: false, type: 'boolean' },
    { value: 'voicingInitiallyEnabled', text: 'Voicing on by default' },
    { value: 'printVoicingResponses', text: 'console.log() voicing responses' },
    { value: 'preferencesStorage', text: 'Remember previous values of preferences from localStorage.' },
    { value: 'webgl=false', text: 'No WebGL' },
    {
      value: 'locales=*', text: 'Load all locales', dependentQueryParameters: [
        { value: 'keyboardLocaleSwitcher', text: 'ctrl + u/i to cycle locales' }
      ]
    }
  ];

  const eaObject = { value: 'ea', text: 'Assertions', default: true };

  // Query parameters used for requirejs and PhET-iO wrappers
  const devSimQueryParameters = [
    { value: 'brand=phet', text: 'PhET Brand', default: true },
    eaObject,
    { value: 'eall', text: 'All Assertions' }
  ];

  const phetioBaseParameters = [ {
    value: 'phetioEmitHighFrequencyEvents',
    default: true,
    type: 'boolean',
    text: 'Emit events that occur often'
  }, {
    value: 'phetioEmitStates',
    default: false,
    type: 'boolean',
    text: 'Emit states to the data stream'
  }, {
    value: 'phetioCompareAPI&randomSeed=332211', // NOTE: DUPLICATION ALERT: random seed must match that of API generation, see generatePhetioMacroAPI.js
    text: 'Compare with reference API'
  }
  ];

  // See chipper/data/wrappers for format
  const nonPublishedPhetioWrappersToAddToPhetmarks = [ 'phet-io-wrappers/mirror-inputs' ];

  const phetioDebugTrueParameter = {
    value: 'phetioDebug=true',
    text: 'Enable assertions for the sim inside a wrapper, basically the phet-io version of ?ea',
    default: true
  };

  // Query parameters for the PhET-iO wrappers (including iframe tests)
  const phetioWrapperQueryParameters = phetioBaseParameters.concat( [ phetioDebugTrueParameter, {
    value: 'phetioWrapperDebug=true',
    text: 'Enable assertions for wrapper-code, like assertions in Studio, State, or Client',
    default: true
  }, {
    value: 'locales=*',
    text: 'Loads all the translated versions',
    default: true<commit_msg>Add keyboardLocaleSwitcher as a default query parameter for all phet-io sims, see https://github.com/phetsims/chipper/issues/1316<commit_after>// Copyright 2016-2022, University of Colorado Boulder

/*
 * Page for quickly launching phet-related tasks, such as simulations, automated/unit tests, or other utilities.
 *
 * Displays three columns:
 *
 * - Repositories: A list of repositories to select from, each one of which has a number of modes.
 * - Modes: Based on the repository selected. Decides what type of URL is loaded when "Launch" or the enter key is
 *          pressed.
 * - Query Parameters: If available, controls what optional query parameters will be added to the end of the URL.
 *
 * Mode has the format:
 * {
 *   name: {string} - Internal unique value (for looking up which option was chosen),
 *   text: {string} - Shown in the mode list,
 *   group: {string} - The optgroup that this mode belongs to
 *   description: {string} - Shown when hovering over the mode in the list,
 *   url: {string} - The base URL to visit (without added query parameters) when the mode is chosen,
 *   queryParameters: {Array.<QueryParameter>}
 * }
 *
 * QueryParameter has the format:
 * {
 *   value: {string} - The actual query parameter included in the URL,
 *   text: {string} - Shown in the query parameter list,
 *   [type]: {'boolean'} - if boolean, then it will add "=true" or "=false" to the checkbox value
 *   [default]: {boolean} - If true, the query parameter will be true by default
 * }
 */

( function() {


  // Query parameters used for the following modes: requirejs, compiled, production
  const simQueryParameters = [
    { value: 'audio=disabled', text: 'Mute' },
    {
      value: 'fuzz', text: 'Fuzz', dependentQueryParameters: [
        { value: 'fuzzPointers=2', text: 'Multitouch-fuzz' }
      ]
    },
    { value: 'fuzzBoard', text: 'Keyboard Fuzz' },
    { value: 'debugger', text: 'Debugger', default: true },
    { value: 'deprecationWarnings', text: 'Deprecation Warnings' },
    { value: 'dev', text: 'Dev' },
    { value: 'profiler', text: 'Profiler' },
    { value: 'showPointers', text: 'Pointers' },
    { value: 'showPointerAreas', text: 'Pointer Areas' },
    { value: 'showFittedBlockBounds', text: 'Fitted Block Bounds' },
    { value: 'showCanvasNodeBounds', text: 'CanvasNode Bounds' },
    { value: 'supportsInteractiveDescription', text: 'Supports Interactive Description', default: false, type: 'boolean' },
    { value: 'supportsSound', text: 'Supports Sound', default: false, type: 'boolean' },
    { value: 'supportsExtraSound', text: 'Supports Extra Sound', default: false, type: 'boolean' },
    { value: 'supportsPanAndZoom', text: 'Supports Pan and Zoom', default: true, type: 'boolean' },
    { value: 'supportsVoicing', text: 'Supports Voicing', default: false, type: 'boolean' },
    { value: 'voicingInitiallyEnabled', text: 'Voicing on by default' },
    { value: 'printVoicingResponses', text: 'console.log() voicing responses' },
    { value: 'preferencesStorage', text: 'Remember previous values of preferences from localStorage.' },
    { value: 'webgl=false', text: 'No WebGL' },
    {
      value: 'locales=*', text: 'Load all locales', dependentQueryParameters: [
        { value: 'keyboardLocaleSwitcher', text: 'ctrl + u/i to cycle locales' }
      ]
    }
  ];

  const eaObject = { value: 'ea', text: 'Assertions', default: true };

  // Query parameters used for requirejs and PhET-iO wrappers
  const devSimQueryParameters = [
    { value: 'brand=phet', text: 'PhET Brand', default: true },
    eaObject,
    { value: 'eall', text: 'All Assertions' }
  ];

  const phetioBaseParameters = [ {
    value: 'phetioEmitHighFrequencyEvents',
    default: true,
    type: 'boolean',
    text: 'Emit events that occur often'
  }, {
    value: 'phetioEmitStates',
    default: false,
    type: 'boolean',
    text: 'Emit states to the data stream'
  }, {
    value: 'phetioCompareAPI&randomSeed=332211', // NOTE: DUPLICATION ALERT: random seed must match that of API generation, see generatePhetioMacroAPI.js
    text: 'Compare with reference API'
  }
  ];

  // See chipper/data/wrappers for format
  const nonPublishedPhetioWrappersToAddToPhetmarks = [ 'phet-io-wrappers/mirror-inputs' ];

  const phetioDebugTrueParameter = {
    value: 'phetioDebug=true',
    text: 'Enable assertions for the sim inside a wrapper, basically the phet-io version of ?ea',
    default: true
  };

  // Query parameters for the PhET-iO wrappers (including iframe tests)
  const phetioWrapperQueryParameters = phetioBaseParameters.concat( [ phetioDebugTrueParameter, {
    value: 'phetioWrapperDebug=true',
    text: 'Enable assertions for wrapper-code, like assertions in Studio, State, or Client',
    default: true
  }, {
    value: 'locales=*',
    text: 'Loads all the translated versions',
    default: true
  }, {
    value: 'keyboardLocaleSwitcher',
    text: 'Enables keybard cycling through the locales',
    default: true
{'fraction_non_alphanumeric': 0.12311170486075429, 'fraction_numerical': 0.0034939882848628095, 'mean_word_length': 3.724271844660194, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '297337', 'n_tokens_mistral': 2969, 'n_tokens_neox': 2907, 'n_words': 1016}