<commit_before>/**
 * Issues
 *
 * A list of all possible issues organized by
 * issue code and including severity and reason
 * agnostic to file specifics.
 */
module.exports = {
    1: {
        key: 'NOT_INCLUDED',
        severity: 'warning',
        reason: 'Files with such naming scheme are not part of BIDS specification. This error is most \
                 commonly caused by typos in file names that make them not BIDS compatible. Please \
                 consult the specification and make sure your fieles are named correctly. If this is \
                 not a file naming issue (for example when including files not yet covered by the BIDS \
                 spec) you can ignore this warning. Please note that derived (processed) data should be \
                 placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) \
                 should be placed in the /sourcedata folder.'
    },
    2: {
        key: 'REPETITION_TIME_GREATER_THAN',
        severity: 'warning',
        reason: "'RepetitionTime' is greater than 100 are you sure it's expressed in seconds?"
    },
    3: {
        key: 'ECHO_TIME_GREATER_THAN',
        severity: 'warning',
        reason: "'EchoTime' is greater than 1 are you sure it's expressed in seconds?"
    },
    4: {
        key: 'ECHO_TIME_DIFFERENCE_GREATER_THAN',
        severity: 'warning',
        reason: "'EchoTimeDifference' is greater than 1 are you sure it's expressed in seconds?"
    },
    5: {
        key: 'TOTAL_READOUT_TIME_GREATER_THAN',
        severity: 'warning',
        reason: "'TotalReadoutTime' is greater than 10 are you sure it's expressed in seconds?"
    },
    6: {
        key: 'ECHO_TIME_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'EchoTime' for this file. If you don't provide this information field map correction will not be possible."
    },
    7: {
        key: 'PHASE_ENCODING_DIRECTION_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'PhaseEncodingDirection' for this file. If you don't provide this information field map correction will not be possible."
    },
    8: {
        key: 'EFFECTIVE_ECHO_SPACING_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'EffectiveEchoSpacing' for this file. If you don't provide this information field map correction will not be possible."
    },
    9: {
        key: 'TOTAL_READOUT_TIME_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'TotalReadoutTime' for this file. If you don't provide this information field map correction using TOPUP might not be possible."
    },
    10: {
        key: 'REPETITION_TIME_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'RepetitionTime' for this file."
    },
    11: {
        key: 'REPETITION_TIME_UNITS',
        severity: 'error',
        reason:   "Repetition time was not defined in seconds, milliseconds or microseconds in the scan's header."
    },
    12: {
        key: 'REPETITION_TIME_MISMATCH',
        severity: 'error',
        reason:   "Repetition time did not match between the scan's header and the associated JSON metadata file."
    },
    13: {
        key: 'SLICE_TIMING_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'SliceTiming' for this file. If you don't provide this information slice time correction will not be possible."
    },
    15: {
        key: 'ECHO_TIME1-2_NOT_DEFINED',
        severity: 'error',
        reason:   "You have to define 'EchoTime1' and 'EchoTime2' for this file."
    },
    16: {
        key: 'ECHO_TIME_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'EchoTime' for this file."
    },
    17: {
        key: 'UNITS_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'Units' for this file."
    },
    18: {
        key: 'PHASE_ENCODING_DIRECTION_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'PhaseEncodingDirection' for this file."
    },
    19: {
        key: 'TOTAL_READOUT_TIME_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'TotalReadoutTime' for this file."
    },
    20: {
        key: 'EVENTS_COLUMN_ONSET',
        severity: 'error',
        reason:   "First column of the events file must be named 'onset'"
    },
    21: {
        key: 'EVENTS_COLUMN_DURATION',
        severity: 'error',
        reason:   "Second column of the events file must be named 'duration'"
    },
    22: {
        key: 'TSV_EQUAL_ROWS',
        severity: 'error',
        reason:   'All rows must have the same number of columns as there are headers.'
    },
    23: {
        key: 'TSV_EMPTY_CELL',
        severity: 'error',
        reason:   'Empty cell in TSV file detected: The proper way of labeling missing values is "n/a".'
    },
    24: {
        key: 'TSV_IMPROPER_NA',
        severity: 'warning',
        reason:   'A proper way of labeling missing values is "n/a".'
    },
    25: {
        key: 'EVENTS_TSV_MISSING',
        severity: 'warning',
        reason:   'Task scans should have a corresponding events.tsv file. If this is a resting state scan you can ignore this warning or rename the task to include the word "rest".'
    },
    26: {
        key: 'NIFTI_HEADER_UNREADABLE',
        severity: 'error',
        reason:   "We were unable to parse header data from this NIfTI file. Please ensure it is not corrupted or mislabeled."
    },
    27: {
        key: 'JSON_INVALID',
        severity: 'error',
        reason: "Not a valid JSON file."
    },
    28: {
        key: 'GZ_NOT_GZIPPED',
        severity: 'error',
        reason: "This file ends in the .gz extension but is not actually gzipped."
    },
    29: {
        key: 'VOLUME_COUNT_MISMATCH',
        severity: 'error',
        reason: "The number of volumes in this scan does not match the number of volumes in the corresponding .bvec and .bval files."
    },
    30: {
        key: 'BVAL_MULTIPLE_ROWS',
        severity: 'error',
        reason: ".bval files should contain exactly one row of volumes."
    },
    31: {
        key: 'BVEC_NUMBER_ROWS',
        severity: 'error',
        reason: ".bvec files should contain exactly three rows of volumes."
    },
    32: {
        key: 'DWI_MISSING_BVEC',
        severity: 'error',
        reason: "DWI scans should have a corresponding .bvec file."
    },
    33: {
        key: 'DWI_MISSING_BVAL',
        severity: 'error',
        reason: "DWI scans should have a corresponding .bval file."
    },
    34: {
        key: 'PHASE_ENCODING_DIRECTION',
        severity: 'error',
        reason: "'PhaseEncodingDirection' needs to be one of 'i', 'i-, 'j', 'j-', 'k', or k-'"
    },
    36: {
        key: 'NIFTI_TOO_SMALL',
        severity: 'error',
        reason: "This file is too small to contain the minimal NIfTI header."
    },
    35: {
        key: 'SLICE_ENCODING_DIRECTION',
        severity: 'error',
        reason: "'SliceEncodingDirection' needs to be one of 'i', 'i-, 'j', 'j-', 'k', or k-'"
    },
    37: {
        key: 'INTENDED_FOR',
        severity: 'error',
        reason: "'IntendedFor' field needs to point to an existing file."
    },
    38: {
        key: 'INCONSISTENT_SUBJECTS',
        severity: 'warning',
        reason: "Not all subjects contain the same files. Each subject should contain the same number of files with " +
        "the same naming unless some files are known to be missing."
    },
    39: {
        key: 'INCONSISTENT_PARAMETERS',
        severity: 'warning',
        reason: "Not all subjects/sessions/runs have the same scanning parameters."
    },
    40: {
        key: 'NIFTI_DIMENSION',
        severity: 'warning',
        reason: "Nifti file's header field for dimension information blank or too short."
    },
    41: {
        key: 'NIFTI_UNIT',
        severity: 'warning',
        reason: "Nifti file's header field for unit information for x, y, z, and t dimensions empty or too short"
    },
    42: {
        key: 'NIFTI_PIXDIM',
        severity: 'warning',
        reason: "Nifti file's header field for pixel dimension information empty or too short."
    },
    43: {
        key: 'ORPHANED_SYMLINK',
        severity: 'error',
        reason: "This file appears to be an orphaned symlink. Make sure it correctly points to its referent."
    },
    44: {
        key: 'FILE_READ',
        severity: 'error',
        reason: "We were unable to read this file. Make sure it is not corrupted, incorrectly named or incorrectly symlinked."
    },
    45: {
        key: 'SUBJECT_FOLDERS',
        severity: 'error',
        reason: "There are no subject folders (labeled \"sub-*\") in the root of this dataset."
    },
    46: {
        key: 'BVEC_ROW_LENGTH',
        severity: 'error',
        reason: "Each row in a .bvec file should contain the same number of values."
    },
    47: {
        key: 'B_FILE',
        severity: 'error',
        reason: ".bval and .bvec files must be single space delimited and contain only numerical values."
    },
    48: {
        key: 'PARTICIPANT_ID_COLUMN',
        severity: 'error',
        reason:   "Participants and phenotype .tsv files must have a 'participant_id' column."
    },
    49: {
        key: 'PARTICIPANT_ID_MISMATCH',
        severity: 'error',
        reason:   "Participant labels found in this dataset did not match the values in participant_id column found in the participants.tsv file."
    },
    50: {
        key: 'TASK_NAME_MUST_DEFINE',
        severity: 'error',
        reason: "You have to define 'TaskName' for this file."
    },
    51: {
        key: 'PHENOTYPE_SUBJECTS_MISSING',
        severity: 'error',
        reason: 'A phenotype/ .tsv file lists subjects that were not found in the dataset.'
    },
    52: {
        key: 'STIMULUS_FILE_MISSING',
        severity: 'error',
        reason: "A stimulus file was declared but not found in the dataset."
    },
    53: {
        key: 'NO_T1W',
        severity: 'ignore',
        reason: "Dataset does not contain any T1w scans."
    },
    54: {
        key: 'BOLD_NOT_4D',
        severity: 'error',
        reason: 'Bold scans must be 4 dimensional.'
    },
    55: {
        key: 'JSON_SCHEMA_VALIDATION_ERROR',
        severity: 'error',
        reason: 'JSON file is not formatted according the the schema.'
    },
    56: {
        key: 'Participants age 89 or higher',
        severity: 'warning',
        reason: 'As per section 164.514(C) of "The De-identification Standard" under HIPAA guidelines, participants with age 89 or higher should be tagged as 89+. More information can be found at https://www.hhs.gov/hipaa/for-professionals/privacy/special-topics/de-identification/#standard'
    },
    57: {
        key: 'DATASET_DESCRIPTION_JSON_MISSING',
        severity: 'error',
        reason: 'The compulsory file /dataset_description.json is missing. See Section 8.1 of the BIDS specification.'
    },
    58: {
        key: 'TASK_NAME_CONTAIN_ILLEGAL_CHARACTER',
        severity: 'error',
        reason: 'Task Name contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.'
    },
    59: {
        key: 'ACQ_NAME_CONTAIN_ILLEGAL_CHARACTER',
        severity: 'error',
        reason: 'acq Name contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.'
    },
    60: {
        key: 'SFORM_AND_QFORM_IN_IMAGE_HEADER_ARE_ZERO',
        severity: 'error',
        reason: 'sform_code and qform_code in the image header are 0. The image/file will be considered invalid or assumed to be in LAS orientation.'
    },
    61: {
        key: 'QUICK_VALIDATION_FAILED',
        severity: 'error',
        reason: 'Quick validation failed - the general folder structure does not resemble a BIDS dataset. Have you chosen the right folder (with "sub-*/" subfolders)? Check for structural/naming issues and presence of at least one subject.',
    },
    62: {
        key: 'SUBJECT_VALUE_CONTAINS_ILLEGAL_CHARECTER',
        severity: 'error',
        reason: 'Sub label contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.',
    },
    63: {
        key: 'SESSION_VALUE_CONTAINS_ILLEGAL_CHARECTER',
        severity: 'error',
        reason: 'Ses label contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.',
    }
};
<commit_msg>fixed multiline<commit_after>/**
 * Issues
 *
 * A list of all possible issues organized by
 * issue code and including severity and reason
 * agnostic to file specifics.
 */
module.exports = {
    1: {
        key: 'NOT_INCLUDED',
        severity: 'warning',
        reason: 'Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your fieles are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you can ignore this warning. Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder.'
    },
    2: {
        key: 'REPETITION_TIME_GREATER_THAN',
        severity: 'warning',
        reason: "'RepetitionTime' is greater than 100 are you sure it's expressed in seconds?"
    },
    3: {
        key: 'ECHO_TIME_GREATER_THAN',
        severity: 'warning',
        reason: "'EchoTime' is greater than 1 are you sure it's expressed in seconds?"
    },
    4: {
        key: 'ECHO_TIME_DIFFERENCE_GREATER_THAN',
        severity: 'warning',
        reason: "'EchoTimeDifference' is greater than 1 are you sure it's expressed in seconds?"
    },
    5: {
        key: 'TOTAL_READOUT_TIME_GREATER_THAN',
        severity: 'warning',
        reason: "'TotalReadoutTime' is greater than 10 are you sure it's expressed in seconds?"
    },
    6: {
        key: 'ECHO_TIME_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'EchoTime' for this file. If you don't provide this information field map correction will not be possible."
    },
    7: {
        key: 'PHASE_ENCODING_DIRECTION_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'PhaseEncodingDirection' for this file. If you don't provide this information field map correction will not be possible."
    },
    8: {
        key: 'EFFECTIVE_ECHO_SPACING_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'EffectiveEchoSpacing' for this file. If you don't provide this information field map correction will not be possible."
    },
    9: {
        key: 'TOTAL_READOUT_TIME_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'TotalReadoutTime' for this file. If you don't provide this information field map correction using TOPUP might not be possible."
    },
    10: {
        key: 'REPETITION_TIME_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'RepetitionTime' for this file."
    },
    11: {
        key: 'REPETITION_TIME_UNITS',
        severity: 'error',
        reason:   "Repetition time was not defined in seconds, milliseconds or microseconds in the scan's header."
    },
    12: {
        key: 'REPETITION_TIME_MISMATCH',
        severity: 'error',
        reason:   "Repetition time did not match between the scan's header and the associated JSON metadata file."
    },
    13: {
        key: 'SLICE_TIMING_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'SliceTiming' for this file. If you don't provide this information slice time correction will not be possible."
    },
    15: {
        key: 'ECHO_TIME1-2_NOT_DEFINED',
        severity: 'error',
        reason:   "You have to define 'EchoTime1' and 'EchoTime2' for this file."
    },
    16: {
        key: 'ECHO_TIME_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'EchoTime' for this file."
    },
    17: {
        key: 'UNITS_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'Units' for this file."
    },
    18: {
        key: 'PHASE_ENCODING_DIRECTION_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'PhaseEncodingDirection' for this file."
    },
    19: {
        key: 'TOTAL_READOUT_TIME_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'TotalReadoutTime' for this file."
    },
    20: {
        key: 'EVENTS_COLUMN_ONSET',
        severity: 'error',
        reason:   "First column of the events file must be named 'onset'"
    },
    21: {
        key: 'EVENTS_COLUMN_DURATION',
        severity: 'error',
        reason:   "Second column of the events file must be named 'duration'"
    },
    22: {
        key: 'TSV_EQUAL_ROWS',
        severity: 'error',
        reason:   'All rows must have the same number of columns as there are headers.'
    },
    23: {
        key: 'TSV_EMPTY_CELL',
        severity: 'error',
        reason:   'Empty cell in TSV file detected: The proper way of labeling missing values is "n/a".'
    },
    24: {
        key: 'TSV_IMPROPER_NA',
        severity: 'warning',
        reason:   'A proper way of labeling missing values is "n/a".'
    },
    25: {
        key: 'EVENTS_TSV_MISSING',
        severity: 'warning',
        reason:   'Task scans should have a corresponding events.tsv file. If this is a resting state scan you can ignore this warning or rename the task to include the word "rest".'
    },
    26: {
        key: 'NIFTI_HEADER_UNREADABLE',
        severity: 'error',
        reason:   "We were unable to parse header data from this NIfTI file. Please ensure it is not corrupted or mislabeled."
    },
    27: {
        key: 'JSON_INVALID',
        severity: 'error',
        reason: "Not a valid JSON file."
    },
    28: {
        key: 'GZ_NOT_GZIPPED',
        severity: 'error',
        reason: "This file ends in the .gz extension but is not actually gzipped."
    },
    29: {
        key: 'VOLUME_COUNT_MISMATCH',
        severity: 'error',
        reason: "The number of volumes in this scan does not match the number of volumes in the corresponding .bvec and .bval files."
    },
    30: {
        key: 'BVAL_MULTIPLE_ROWS',
        severity: 'error',
        reason: ".bval files should contain exactly one row of volumes."
    },
    31: {
        key: 'BVEC_NUMBER_ROWS',
        severity: 'error',
        reason: ".bvec files should contain exactly three rows of volumes."
    },
    32: {
        key: 'DWI_MISSING_BVEC',
        severity: 'error',
        reason: "DWI scans should have a corresponding .bvec file."
    },
    33: {
        key: 'DWI_MISSING_BVAL',
        severity: 'error',
        reason: "DWI scans should have a corresponding .bval file."
    },
    34: {
        key: 'PHASE_ENCODING_DIRECTION',
        severity: 'error',
        reason: "'PhaseEncodingDirection' needs to be one of 'i', 'i-, 'j', 'j-', 'k', or k-'"
    },
    36: {
        key: 'NIFTI_TOO_SMALL',
        severity: 'error',
        reason: "This file is too small to contain the minimal NIfTI header."
    },
    35: {
        key: 'SLICE_ENCODING_DIRECTION',
        severity: 'error',
        reason: "'SliceEncodingDirection' needs to be one of 'i', 'i-, 'j', 'j-', 'k', or k-'"
    },
    37: {
        key: 'INTENDED_FOR',
        severity: 'error',
        reason: "'IntendedFor' field needs to point to an existing file."
    },
    38: {
        key: 'INCONSISTENT_SUBJECTS',
        severity: 'warning',
        reason: "Not all subjects contain the same files. Each subject should contain the same number of files with " +
        "the same naming unless some files are known to be missing."
    },
    39: {
        key: 'INCONSISTENT_PARAMETERS',
        severity: 'warning',
        reason: "Not all subjects/sessions/runs have the same scanning parameters."
    },
    40: {
        key: 'NIFTI_DIMENSION',
        severity: 'warning',
        reason: "Nifti file's header field for dimension information blank or too short."
    },
    41: {
        key: 'NIFTI_UNIT',
        severity: 'warning',
        reason: "Nifti file's header field for unit information for x, y, z, and t dimensions empty or too short"
    },
    42: {
        key: 'NIFTI_PIXDIM',
        severity: 'warning',
        reason: "Nifti file's header field for pixel dimension information empty or too short."
    },
    43: {
        key: 'ORPHANED_SYMLINK',
        severity: 'error',
        reason: "This file appears to be an orphaned symlink. Make sure it correctly points to its referent."
    },
    44: {
        key: 'FILE_READ',
        severity: 'error',
        reason: "We were unable to read this file. Make sure it is not corrupted, incorrectly named or incorrectly symlinked."
    },
    45: {
        key: 'SUBJECT_FOLDERS',
        severity: 'error',
        reason: "There are no subject folders (labeled \"sub-*\") in the root of this dataset."
    },
    46: {
        key: 'BVEC_ROW_LENGTH',
        severity: 'error',
        reason: "Each row in a .bvec file should contain the same number of values."
    },
    47: {
        key: 'B_FILE',
        severity: 'error',
        reason: ".bval and .bvec files must be single space delimited and contain only numerical values."
    },
    48: {
        key: 'PARTICIPANT_ID_COLUMN',
        severity: 'error',
        reason:   "Participants and phenotype .tsv files must have a 'participant_id' column."
    },
    49: {
        key: 'PARTICIPANT_ID_MISMATCH',
        severity: 'error',
        reason:   "Participant labels found in this dataset did not match the values in participant_id column found in the participants.tsv file."
    },
    50: {
        key: 'TASK_NAME_MUST_DEFINE',
        severity: 'error',
        reason: "You have to define 'TaskName' for this file."
    },
    51: {
        key: 'PHENOTYPE_SUBJECTS_MISSING',
        severity: 'error',
        reason: 'A phenotype/ .tsv file lists subjects that were not found in the dataset.'
    },
    52: {
        key: 'STIMULUS_FILE_MISSING',
        severity: 'error',
        reason: "A stimulus file was declared but not found in the dataset."
    },
    53: {
        key: 'NO_T1W',
        severity: 'ignore',
        reason: "Dataset does not contain any T1w scans."
    },
    54: {
        key: 'BOLD_NOT_4D',
        severity: 'error',
        reason: 'Bold scans must be 4 dimensional.'
    },
    55: {
        key: 'JSON_SCHEMA_VALIDATION_ERROR',
        severity: 'error',
        reason: 'JSON file is not formatted according the the schema.'
    },
    56: {
        key: 'Participants age 89 or higher',
        severity: 'warning',
        reason: 'As per section 164.514(C) of "The De-identification Standard" under HIPAA guidelines, participants with age 89 or higher should be tagged as 89+. More information can be found at https://www.hhs.gov/hipaa/for-professionals/privacy/special-topics/de-identification/#standard'
    },
    57: {
        key: 'DATASET_DESCRIPTION_JSON_MISSING',
        severity: 'error',
        reason: 'The compulsory file /dataset_description.json is missing. See Section 8.1 of the BIDS specification.'
    },
    58: {
        key: 'TASK_NAME_CONTAIN_ILLEGAL_CHARACTER',
        severity: 'error',
        reason: 'Task Name contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.'
    },
    59: {
        key: 'ACQ_NAME_CONTAIN_ILLEGAL_CHARACTER',
        severity: 'error',
        reason: 'acq Name contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.'
    },
    60: {
        key: 'SFORM_AND_QFORM_IN_IMAGE_HEADER_ARE_ZERO',
        severity: 'error',
        reason: 'sform_code and qform_code in the image header are 0. The image/file will be considered invalid or assumed to be in LAS orientation.'
    },
    61: {
        key: 'QUICK_VALIDATION_FAILED',
        severity: 'error',
        reason: 'Quick validation failed - the general folder structure does not resemble a BIDS dataset. Have you chosen the right folder (with "sub-*/" subfolders)? Check for structural/naming issues and presence of at least one subject.',
    },
    62: {
        key: 'SUBJECT_VALUE_CONTAINS_ILLEGAL_CHARECTER',
        severity: 'error',
        reason: 'Sub label contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.',
    },
    63: {
        key: 'SESSION_VALUE_CONTAINS_ILLEGAL_CHARECTER',
        severity: 'error',
        reason: 'Ses label contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.',
    }
};
<|endoftext|>


<commit_before>test(
  'FracturesTest',

  [
    'ephox.boss.api.DomUniverse',
    'ephox.boss.api.Gene',
    'ephox.boss.api.TestUniverse',
    'ephox.boss.api.TextGene',
    'ephox.robin.clumps.Fractures',
    'ephox.sugar.api.Body',
    'ephox.sugar.api.Compare',
    'ephox.sugar.api.Element',
    'ephox.sugar.api.Html',
    'ephox.sugar.api.Insert',
    'ephox.sugar.api.InsertAll'
  ],

  function (DomUniverse, Gene, TestUniverse, TextGene, Fractures, Body, Compare, Element, Html, Insert, InsertAll) {
    var container = Element.fromTag('div');
    var isRoot = function (item) {
      return Compare.eq(item, container);
    };

    var a = Element.fromTag('span');
    var aa = Element.fromTag('span');
    var aaa = Element.fromText('aaa');
    var aab = Element.fromText('aab');
    var aac = Element.fromText('aac');
    var ab = Element.fromText('ab');
    var ac = Element.fromTag('span');
    var aca = Element.fromText('aca');
    var acb = Element.fromTag('span');
    var acba = Element.fromText('acba');
    var acbb = Element.fromTag('span');
    var acbba = Element.fromText('acbba');

    InsertAll.append(container, [ a ]);
    InsertAll.append(a, [ aa, ab, ac ]);
    InsertAll.append(aa, [ aaa, aab, aac ]);
    InsertAll.append(ac, [ aca, acb ]);
    InsertAll.append(acb, [ acba, acbb ]);
    InsertAll.append(acbb, [ acbba ]);

    Insert.append(Body.body(), container);

    var check = function (expected, start, finish, _doc) {
      var doc = DomUniverse();
      var actual = Fractures.fracture(doc, isRoot, start, finish);
      actual.each(function (act) {
        var wrapper = doc.create().nu('b');
        if (act.length > 0) {
          doc.insert().before(act[0], wrapper);
          doc.insert().appendAll(wrapper, act);
        }
      });
      assert.eq(expected, Html.get(container));
    };

    // check(
    //   'aaaaabaacabacaacbaacbba',
    //   aaa, acbba
    // );

    // Needs ancestor scanning and breaker.left
    // check('root(p(font(span,bold(span("text")))))', 'c', 'b', TestUniverse(Gene('root', 'root', [
    //   Gene('p1', 'p', [
    //     Gene('a', 'font', [
    //       Gene('b', 'span', [
    //         TextGene('c', 'text')
    //       ])
    //     ])
    //   ])
    // ])));

    /*
    Basic
    'root(' +
      'span(' +
        'span(' +
          '"aaa",' +
          '"aab",' +
          '"aac"' +
        '),' +
        '"ab",' +
        'span(' +
          '"aca",' +
          'span(' +
            '"acba",' +
            'span(' +
              '"acbba"' +
            ')' +
          ')' +
        ')' +
      '),' +
      '"b",' +
      'span(' +
        '"ca",' +
        'span(' +
          'span(' +
            '"cbaa",' +
            '"cbab"' +
          '),' +
          '"cbb"' +
        ')' +
      ')' +
    ')',
    */

    // check(
    //   'root(span(span(bold("aaa","aab","aac")),"ab",span("aca",span("acba",span("acbba")))),"b",span("ca",span(span("cbaa","cbab"),"cbb")))',
    //   'aaa', 'aac'
    // );

    // check(
    //   'root(' +
    //     'span(' +
    //       'span(' +
    //         'bold(' +
    //           '"aaa",' +
    //           '"aab",' +
    //           '"aac"' +
    //         ')' +
    //       '),' +
    //       '"ab",' +
    //       'span(' +
    //         '"aca",' +
    //         'span(' +
    //           '"acba",' +
    //           'span(' +
    //             '"acbba"' +
    //           ')' +
    //         ')' +
    //       ')' +
    //     '),' +
    //     '"b",' +
    //     'span(' +
    //       '"ca",' +
    //       'span(' +
    //         'span(' +
    //           '"cbaa",' +
    //           '"cbab"' +
    //         '),' +
    //         '"cbb"' +
    //       ')' +
    //     ')' +
    //   ')',
    //   'aaa', 'aac');

  }
);<commit_msg>TBIO-1766: unused test<commit_after><|endoftext|>


<commit_before>/**
 * Issues
 *
 * A list of all possible issues organized by
 * issue code and including severity and reason
 * agnostic to file specifics.
 */
module.exports = {
    1: {
        key: 'NOT_INCLUDED',
        severity: 'warning',
        reason: "This file is not part of the BIDS specification, make sure it isn't included in the dataset by accident. Data derivatives (processed data) should be placed in /derivatives folder."
    },
    2: {
        key: 'REPETITION_TIME_GREATER_THAN',
        severity: 'warning',
        reason: "'RepetitionTime' is greater than 100 are you sure it's expressed in seconds?"
    },
    3: {
        key: 'ECHO_TIME_GREATER_THAN',
        severity: 'warning',
        reason: "'EchoTime' is greater than 1 are you sure it's expressed in seconds?"
    },
    4: {
        key: 'ECHO_TIME_DIFFERENCE_GREATER_THAN',
        severity: 'warning',
        reason: "'EchoTimeDifference' is greater than 1 are you sure it's expressed in seconds?"
    },
    5: {
        key: 'TOTAL_READOUT_TIME_GREATER_THAN',
        severity: 'warning',
        reason: "'TotalReadoutTime' is greater than 10 are you sure it's expressed in seconds?"
    },
    6: {
        key: 'ECHO_TIME_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'EchoTime' for this file. If you don't provide this information field map correction will not be possible."
    },
    7: {
        key: 'PHASE_ENCODING_DIRECTION_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'PhaseEncodingDirection' for this file. If you don't provide this information field map correction will not be possible."
    },
    8: {
        key: 'EFFECTIVE_ECHO_SPACING_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'EffectiveEchoSpacing' for this file. If you don't provide this information field map correction will not be possible."
    },
    9: {
        key: 'TOTAL_READOUT_TIME_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'TotalReadoutTime' for this file. If you don't provide this information field map correction using TOPUP might not be possible."
    },
    10: {
        key: 'REPETITION_TIME_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'RepetitionTime' for this file."
    },
    11: {
        key: 'REPETITION_TIME_UNITS',
        severity: 'error',
        reason:   "Repetition time was not defined in seconds, milliseconds or microseconds in the scan's header."
    },
    12: {
        key: 'REPETITION_TIME_MISMATCH',
        severity: 'error',
        reason:   "Repetition time did not match between the scan's header and the associated JSON metadata file."
    },
    13: {
        key: 'SLICE_TIMING_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'SliceTiming' for this file. If you don't provide this information slice time correction will not be possible."
    },
    15: {
        key: 'ECHO_TIME1-2_NOT_DEFINED',
        severity: 'error',
        reason:   "You have to define 'EchoTime1' and 'EchoTime2' for this file."
    },
    16: {
        key: 'ECHO_TIME_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'EchoTime' for this file."
    },
    17: {
        key: 'UNITS_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'Units' for this file."
    },
    18: {
        key: 'PHASE_ENCODING_DIRECTION_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'PhaseEncodingDirection' for this file."
    },
    19: {
        key: 'TOTAL_READOUT_TIME_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'TotalReadoutTime' for this file."
    },
    20: {
        key: 'EVENTS_COLUMN_ONSET',
        severity: 'error',
        reason:   "First column of the events file must be named 'onset'"
    },
    21: {
        key: 'EVENTS_COLUMN_DURATION',
        severity: 'error',
        reason:   "Second column of the events file must be named 'duration'"
    },
    22: {
        key: 'TSV_EQUAL_ROWS',
        severity: 'error',
        reason:   'All rows must have the same number of columns as there are headers.'
    },
    23: {
        key: 'TSV_EMPTY_CELL',
        severity: 'error',
        reason:   'Empty cell in TSV file detected: The proper way of labeling missing values is "n/a".'
    },
    24: {
        key: 'TSV_IMPROPER_NA',
        severity: 'warning',
        reason:   'A proper way of labeling missing values is "n/a".'
    },
    25: {
        key: 'EVENTS_TSV_MISSING',
        severity: 'warning',
        reason:   'Task scans should have a corresponding events.tsv file. If this is a resting state scan you can ignore this warning or rename the task to include the word "rest".'
    },
    26: {
        key: 'NIFTI_HEADER_UNREADABLE',
        severity: 'error',
        reason:   "We were unable to parse header data from this NIfTI file. Please ensure it is not corrupted or mislabeled."
    },
    27: {
        key: 'JSON_INVALID',
        severity: 'error',
        reason: "Not a valid JSON file."
    },
    28: {
        key: 'GZ_NOT_GZIPPED',
        severity: 'error',
        reason: "This file ends in the .gz extension but is not actually gzipped."
    },
    29: {
        key: 'VOLUME_COUNT_MISMATCH',
        severity: 'error',
        reason: "The number of volumes in this scan does not match the number of volumes in the corresponding .bvec and .bval files."
    },
    30: {
        key: 'BVAL_MULTIPLE_ROWS',
        severity: 'error',
        reason: ".bval files should contain exactly one row of volumes."
    },
    31: {
        key: 'BVEC_NUMBER_ROWS',
        severity: 'error',
        reason: ".bvec files should contain exactly three rows of volumes."
    },
    32: {
        key: 'DWI_MISSING_BVEC',
        severity: 'error',
        reason: "DWI scans should have a corresponding .bvec file."
    },
    33: {
        key: 'DWI_MISSING_BVAL',
        severity: 'error',
        reason: "DWI scans should have a corresponding .bval file."
    },
    34: {
        key: 'PHASE_ENCODING_DIRECTION',
        severity: 'error',
        reason: "'PhaseEncodingDirection' needs to be one of 'i', 'i-, 'j', 'j-', 'k', or k-'"
    },
    36: {
        key: 'NIFTI_TOO_SMALL',
        severity: 'error',
        reason: "This file is too small to contain the minimal NIfTI header."
    },
    35: {
        key: 'SLICE_ENCODING_DIRECTION',
        severity: 'error',
        reason: "'SliceEncodingDirection' needs to be one of 'i', 'i-, 'j', 'j-', 'k', or k-'"
    },
    37: {
        key: 'INTENDED_FOR',
        severity: 'error',
        reason: "'IntendedFor' field needs to point to an existing file."
    },
    38: {
        key: 'INCONSISTENT_SUBJECTS',
        severity: 'warning',
        reason: "Not all subjects contain the same files. Each subject should contain the same number of files with " +
        "the same naming unless some files are known to be missing."
    },
    39: {
        key: 'INCONSISTENT_PARAMETERS',
        severity: 'warning',
        reason: "Not all subjects/sessions/runs have the same scanning parameters."
    },
    40: {
        key: 'NIFTI_DIMENSION',
        severity: 'warning',
        reason: "Nifti file's header field for dimension information blank or too short."
    },
    41: {
        key: 'NIFTI_UNIT',
        severity: 'warning',
        reason: "Nifti file's header field for unit information for x, y, z, and t dimensions empty or too short"
    },
    42: {
        key: 'NIFTI_PIXDIM',
        severity: 'warning',
        reason: "Nifti file's header field for pixel dimension information empty or too short."
    },
    43: {
        key: 'ORPHANED_SYMLINK',
        severity: 'error',
        reason: "This file appears to be an orphaned symlink. Make sure it correctly points to its referent."
    },
    44: {
        key: 'FILE_READ',
        severity: 'error',
        reason: "We were unable to read this file. Make sure it is not corrupted, incorrectly named or incorrectly symlinked."
    },
    45: {
        key: 'SUBJECT_FOLDERS',
        severity: 'error',
        reason: "There are no subject folders (labeled \"sub-*\") in the root of this dataset."
    },
    46: {
        key: 'BVEC_ROW_LENGTH',
        severity: 'error',
        reason: "Each row in a .bvec file should contain the same number of values."
    },
    47: {
        key: 'B_FILE',
        severity: 'error',
        reason: ".bval and .bvec files must be single space delimited and contain only numerical values."
    },
    48: {
        key: 'PARTICIPANT_ID_COLUMN',
        severity: 'error',
        reason:   "Participants and phenotype .tsv files must have a 'participant_id' column."
    },
    49: {
        key: 'PARTICIPANT_ID_MISMATCH',
        severity: 'error',
        reason:   "Participant labels found in this dataset did not match the values in participant_id column found in the participants.tsv file."
    },
    50: {
        key: 'TASK_NAME_MUST_DEFINE',
        severity: 'error',
        reason: "You have to define 'TaskName' for this file."
    },
    51: {
        key: 'PHENOTYPE_SUBJECTS_MISSING',
        severity: 'error',
        reason: 'A phenotype/ .tsv file lists subjects that were not found in the dataset.'
    },
    52: {
        key: 'STIMULUS_FILE_MISSING',
        severity: 'error',
        reason: "A stimulus file was declared but not found in the dataset."
    },
    53: {
        key: 'NO_T1W',
        severity: 'ignore',
        reason: "Dataset does not contain any T1w scans."
    },
    54: {
        key: 'BOLD_NOT_4D',
        severity: 'error',
        reason: 'Bold scans must be 4 dimensional.'
    },
    55: {
        key: 'JSON_SCHEMA_VALIDATION_ERROR',
        severity: 'error',
        reason: 'JSON file is not formatted according the the schema.'
    },
    56: {
        key: 'Participants age 89 or higher',
        severity: 'warning',
        reason: 'As per section 164.514(C) of "The De-identification Standard" under HIPAA guidelines, participants with age 89 or higher should be tagged as 89+. More information can be found at https://www.hhs.gov/hipaa/for-professionals/privacy/special-topics/de-identification/#standard'
    },
    57: {
        key: 'DATASET_DESCRIPTION_JSON_MISSING',
        severity: 'error',
        reason: 'The compulsory file /dataset_description.json is missing. See Section 8.1 of the BIDS specification.'
    },
    58: {
        key: 'TASK_NAME_CONTAIN_ILLEGAL_CHARACTER',
        severity: 'error',
        reason: 'Task Name contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.'
    },
    59: {
        key: 'ACQ_NAME_CONTAIN_ILLEGAL_CHARACTER',
        severity: 'error',
        reason: 'acq Name contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.'
    },
    60: {
        key: 'SFORM_AND_QFORM_IN_IMAGE_HEADER_ARE_ZERO',
        severity: 'error',
        reason: 'sform_code and qform_code in the image header are 0. The image/file will be considered invalid or assumed to be in LAS orientation.'
    },
    61: {
        key: 'QUICK_VALIDATION_FAILED',
        severity: 'error',
        reason: 'Quick validation failed - the general folder structure does not resemble a BIDS dataset. Have you chosen the right folder (with "sub-*/" subfolders)? Check for structural/naming issues and presence of at least one subject.',
    },
    62: {
        key: 'SUBJECT_VALUE_CONTAINS_ILLEGAL_CHARECTER',
        severity: 'error',
        reason: 'Sub label contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.',
    },
    63: {
        key: 'SESSION_VALUE_CONTAINS_ILLEGAL_CHARECTER',
        severity: 'error',
        reason: 'Ses label contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.',
    }
};
<commit_msg>Clarifying the language of "not BIDS" warning.<commit_after>/**
 * Issues
 *
 * A list of all possible issues organized by
 * issue code and including severity and reason
 * agnostic to file specifics.
 */
module.exports = {
    1: {
        key: 'NOT_INCLUDED',
        severity: 'warning',
        reason: 'Files with such naming scheme are not part of BIDS specification. This error is most \
                 commonly caused by typos in file names that make them not BIDS compatible. Please \
                 consult the specification and make sure your fieles are named correctly. If this is \
                 not a file naming issue (for example when including files not yet covered by the BIDS \
                 spec) you can ignore this warning. Please note that derived (processed) data should be \
                 placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) \
                 should be placed in the /sourcedata folder.'
    },
    2: {
        key: 'REPETITION_TIME_GREATER_THAN',
        severity: 'warning',
        reason: "'RepetitionTime' is greater than 100 are you sure it's expressed in seconds?"
    },
    3: {
        key: 'ECHO_TIME_GREATER_THAN',
        severity: 'warning',
        reason: "'EchoTime' is greater than 1 are you sure it's expressed in seconds?"
    },
    4: {
        key: 'ECHO_TIME_DIFFERENCE_GREATER_THAN',
        severity: 'warning',
        reason: "'EchoTimeDifference' is greater than 1 are you sure it's expressed in seconds?"
    },
    5: {
        key: 'TOTAL_READOUT_TIME_GREATER_THAN',
        severity: 'warning',
        reason: "'TotalReadoutTime' is greater than 10 are you sure it's expressed in seconds?"
    },
    6: {
        key: 'ECHO_TIME_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'EchoTime' for this file. If you don't provide this information field map correction will not be possible."
    },
    7: {
        key: 'PHASE_ENCODING_DIRECTION_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'PhaseEncodingDirection' for this file. If you don't provide this information field map correction will not be possible."
    },
    8: {
        key: 'EFFECTIVE_ECHO_SPACING_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'EffectiveEchoSpacing' for this file. If you don't provide this information field map correction will not be possible."
    },
    9: {
        key: 'TOTAL_READOUT_TIME_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'TotalReadoutTime' for this file. If you don't provide this information field map correction using TOPUP might not be possible."
    },
    10: {
        key: 'REPETITION_TIME_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'RepetitionTime' for this file."
    },
    11: {
        key: 'REPETITION_TIME_UNITS',
        severity: 'error',
        reason:   "Repetition time was not defined in seconds, milliseconds or microseconds in the scan's header."
    },
    12: {
        key: 'REPETITION_TIME_MISMATCH',
        severity: 'error',
        reason:   "Repetition time did not match between the scan's header and the associated JSON metadata file."
    },
    13: {
        key: 'SLICE_TIMING_NOT_DEFINED',
        severity: 'warning',
        reason:   "You should define 'SliceTiming' for this file. If you don't provide this information slice time correction will not be possible."
    },
    15: {
        key: 'ECHO_TIME1-2_NOT_DEFINED',
        severity: 'error',
        reason:   "You have to define 'EchoTime1' and 'EchoTime2' for this file."
    },
    16: {
        key: 'ECHO_TIME_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'EchoTime' for this file."
    },
    17: {
        key: 'UNITS_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'Units' for this file."
    },
    18: {
        key: 'PHASE_ENCODING_DIRECTION_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'PhaseEncodingDirection' for this file."
    },
    19: {
        key: 'TOTAL_READOUT_TIME_MUST_DEFINE',
        severity: 'error',
        reason:   "You have to define 'TotalReadoutTime' for this file."
    },
    20: {
        key: 'EVENTS_COLUMN_ONSET',
        severity: 'error',
        reason:   "First column of the events file must be named 'onset'"
    },
    21: {
        key: 'EVENTS_COLUMN_DURATION',
        severity: 'error',
        reason:   "Second column of the events file must be named 'duration'"
    },
    22: {
        key: 'TSV_EQUAL_ROWS',
        severity: 'error',
        reason:   'All rows must have the same number of columns as there are headers.'
    },
    23: {
        key: 'TSV_EMPTY_CELL',
        severity: 'error',
        reason:   'Empty cell in TSV file detected: The proper way of labeling missing values is "n/a".'
    },
    24: {
        key: 'TSV_IMPROPER_NA',
        severity: 'warning',
        reason:   'A proper way of labeling missing values is "n/a".'
    },
    25: {
        key: 'EVENTS_TSV_MISSING',
        severity: 'warning',
        reason:   'Task scans should have a corresponding events.tsv file. If this is a resting state scan you can ignore this warning or rename the task to include the word "rest".'
    },
    26: {
        key: 'NIFTI_HEADER_UNREADABLE',
        severity: 'error',
        reason:   "We were unable to parse header data from this NIfTI file. Please ensure it is not corrupted or mislabeled."
    },
    27: {
        key: 'JSON_INVALID',
        severity: 'error',
        reason: "Not a valid JSON file."
    },
    28: {
        key: 'GZ_NOT_GZIPPED',
        severity: 'error',
        reason: "This file ends in the .gz extension but is not actually gzipped."
    },
    29: {
        key: 'VOLUME_COUNT_MISMATCH',
        severity: 'error',
        reason: "The number of volumes in this scan does not match the number of volumes in the corresponding .bvec and .bval files."
    },
    30: {
        key: 'BVAL_MULTIPLE_ROWS',
        severity: 'error',
        reason: ".bval files should contain exactly one row of volumes."
    },
    31: {
        key: 'BVEC_NUMBER_ROWS',
        severity: 'error',
        reason: ".bvec files should contain exactly three rows of volumes."
    },
    32: {
        key: 'DWI_MISSING_BVEC',
        severity: 'error',
        reason: "DWI scans should have a corresponding .bvec file."
    },
    33: {
        key: 'DWI_MISSING_BVAL',
        severity: 'error',
        reason: "DWI scans should have a corresponding .bval file."
    },
    34: {
        key: 'PHASE_ENCODING_DIRECTION',
        severity: 'error',
        reason: "'PhaseEncodingDirection' needs to be one of 'i', 'i-, 'j', 'j-', 'k', or k-'"
    },
    36: {
        key: 'NIFTI_TOO_SMALL',
        severity: 'error',
        reason: "This file is too small to contain the minimal NIfTI header."
    },
    35: {
        key: 'SLICE_ENCODING_DIRECTION',
        severity: 'error',
        reason: "'SliceEncodingDirection' needs to be one of 'i', 'i-, 'j', 'j-', 'k', or k-'"
    },
    37: {
        key: 'INTENDED_FOR',
        severity: 'error',
        reason: "'IntendedFor' field needs to point to an existing file."
    },
    38: {
        key: 'INCONSISTENT_SUBJECTS',
        severity: 'warning',
        reason: "Not all subjects contain the same files. Each subject should contain the same number of files with " +
        "the same naming unless some files are known to be missing."
    },
    39: {
        key: 'INCONSISTENT_PARAMETERS',
        severity: 'warning',
        reason: "Not all subjects/sessions/runs have the same scanning parameters."
    },
    40: {
        key: 'NIFTI_DIMENSION',
        severity: 'warning',
        reason: "Nifti file's header field for dimension information blank or too short."
    },
    41: {
        key: 'NIFTI_UNIT',
        severity: 'warning',
        reason: "Nifti file's header field for unit information for x, y, z, and t dimensions empty or too short"
    },
    42: {
        key: 'NIFTI_PIXDIM',
        severity: 'warning',
        reason: "Nifti file's header field for pixel dimension information empty or too short."
    },
    43: {
        key: 'ORPHANED_SYMLINK',
        severity: 'error',
        reason: "This file appears to be an orphaned symlink. Make sure it correctly points to its referent."
    },
    44: {
        key: 'FILE_READ',
        severity: 'error',
        reason: "We were unable to read this file. Make sure it is not corrupted, incorrectly named or incorrectly symlinked."
    },
    45: {
        key: 'SUBJECT_FOLDERS',
        severity: 'error',
        reason: "There are no subject folders (labeled \"sub-*\") in the root of this dataset."
    },
    46: {
        key: 'BVEC_ROW_LENGTH',
        severity: 'error',
        reason: "Each row in a .bvec file should contain the same number of values."
    },
    47: {
        key: 'B_FILE',
        severity: 'error',
        reason: ".bval and .bvec files must be single space delimited and contain only numerical values."
    },
    48: {
        key: 'PARTICIPANT_ID_COLUMN',
        severity: 'error',
        reason:   "Participants and phenotype .tsv files must have a 'participant_id' column."
    },
    49: {
        key: 'PARTICIPANT_ID_MISMATCH',
        severity: 'error',
        reason:   "Participant labels found in this dataset did not match the values in participant_id column found in the participants.tsv file."
    },
    50: {
        key: 'TASK_NAME_MUST_DEFINE',
        severity: 'error',
        reason: "You have to define 'TaskName' for this file."
    },
    51: {
        key: 'PHENOTYPE_SUBJECTS_MISSING',
        severity: 'error',
        reason: 'A phenotype/ .tsv file lists subjects that were not found in the dataset.'
    },
    52: {
        key: 'STIMULUS_FILE_MISSING',
        severity: 'error',
        reason: "A stimulus file was declared but not found in the dataset."
    },
    53: {
        key: 'NO_T1W',
        severity: 'ignore',
        reason: "Dataset does not contain any T1w scans."
    },
    54: {
        key: 'BOLD_NOT_4D',
        severity: 'error',
        reason: 'Bold scans must be 4 dimensional.'
    },
    55: {
        key: 'JSON_SCHEMA_VALIDATION_ERROR',
        severity: 'error',
        reason: 'JSON file is not formatted according the the schema.'
    },
    56: {
        key: 'Participants age 89 or higher',
        severity: 'warning',
        reason: 'As per section 164.514(C) of "The De-identification Standard" under HIPAA guidelines, participants with age 89 or higher should be tagged as 89+. More information can be found at https://www.hhs.gov/hipaa/for-professionals/privacy/special-topics/de-identification/#standard'
    },
    57: {
        key: 'DATASET_DESCRIPTION_JSON_MISSING',
        severity: 'error',
        reason: 'The compulsory file /dataset_description.json is missing. See Section 8.1 of the BIDS specification.'
    },
    58: {
        key: 'TASK_NAME_CONTAIN_ILLEGAL_CHARACTER',
        severity: 'error',
        reason: 'Task Name contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.'
    },
    59: {
        key: 'ACQ_NAME_CONTAIN_ILLEGAL_CHARACTER',
        severity: 'error',
        reason: 'acq Name contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.'
    },
    60: {
        key: 'SFORM_AND_QFORM_IN_IMAGE_HEADER_ARE_ZERO',
        severity: 'error',
        reason: 'sform_code and qform_code in the image header are 0. The image/file will be considered invalid or assumed to be in LAS orientation.'
    },
    61: {
        key: 'QUICK_VALIDATION_FAILED',
        severity: 'error',
        reason: 'Quick validation failed - the general folder structure does not resemble a BIDS dataset. Have you chosen the right folder (with "sub-*/" subfolders)? Check for structural/naming issues and presence of at least one subject.',
    },
    62: {
        key: 'SUBJECT_VALUE_CONTAINS_ILLEGAL_CHARECTER',
        severity: 'error',
        reason: 'Sub label contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.',
    },
    63: {
        key: 'SESSION_VALUE_CONTAINS_ILLEGAL_CHARECTER',
        severity: 'error',
        reason: 'Ses label contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.',
    }
};
<|endoftext|>


<commit_before>
// PKUI 核心模块
define( function ( require ) {
    "use strict";

    require( "isLoading" );
    require( "css/font/font-awesome/4.7.0/font-awesome.css" );
    require( "layer" );
    require( "lib/layer/3.0.1.x/skin/default/layer.css" );

    var
        $ = require( "jquery" ),

        AOP = require( "meld" ),

        ns = window[ "www.pkusoft.net" ],

        PKUI = {
            //

            componentMarkupProp: "pkui-component",

            //

            optionsMarkupProp: "pkui-component-options",

            // CTX路径
            ctxPath: ns.ctxPath,

            // pkui的基本路径
            basePath: ns.pkuiBasePath,

            // 字典路径
            dicPath: ns.ctxPath + "/static/dic/",

            // 时间戳（版本控制）v=2012-1-1
            timestamp: ns.timestamp,

            // 组件容器
            component: {},

            // 载入模块（seajs.use方法的别名）
            load: seajs.use,

            // 渲染
            render: render,

            // 自动渲染标志
            isAutoRender: true,

            // 设置自动渲染（true/false）
            setAutoRender: setAutoRender
        }
        ;

    // 如果是在WebStorm里跑 PKUI项目，则更改 ctxPath 和 dicPath
    if ( location.href.indexOf( "localhost" ) !== -1 && ns.pkuiBasePath.indexOf( "static" ) === -1 ) {
        PKUI.ctxPath = "http://localhost:8080/pkui";
        PKUI.dicPath = "http://localhost:8080/pkui/static/dic/";
    }

    /**
     * 初始化
     * @private
     */
    PKUI._init = function _init() {

        // DOM树构建完毕，执行一次渲染
        $( document ).ready( render );

        // 处理所有Ajax请求
        fmtAjaxUrl();

        // 设置自动渲染
        this.setAutoRender( this.isAutoRender );

        // 暴露到全局名称空间
        window.PKUI = PKUI;
    };

    /**
     * 通用功能
     */
    $.extend( PKUI, {
        /**
         * @example
         * public class JsonResult {
         *     private boolean success = false;
         *     private String message = "";
         *     private Object data;
         * }
         */
        handleJsonResult: function ( jsonResult ) {
            if ( typeof jsonResult === "string" ) {
                jsonResult = $.parseJSON( jsonResult );
            }
            // if ( jsonResult.success == false ) {
            //     return false;
            // }
            return jsonResult;
        },
        /**
         * @example
         * public class GridResult {
         *     private boolean success = true;
         *     private int totalRecords = 0;
         *     private List<?> data;
         * }
         */
        handleGridResult: function ( gridResult ) {
            return PKUI.handleJsonResult( gridResult );
        },
        /**
         * 转换树结构
         * @param options {{data: Array, rootId: string, idName: string, parentIdName: string, childrenName: string, filter: Array}}
         * @example
         * PKUI.getTreeList( {
                data: [
                    { menuId: 0, menuName: "系统管理", treeParentId: null },
                    { menuId: 1, menuName: "用户管理", treeParentId: 0 },
                    { menuId: 2, menuName: "单位管理", treeParentId: 0 }
                ],
                rootId: 0,
                idName: "menuId",
                parentIdName: "treeParentId",
                childrenName: "children"
           } );
         返回：
         [
         {
             menuId: 0, menuName: "系统管理", treeParentId: null,
             children: [
                 { menuId: 1, menuName: "用户管理", treeParentId: 0, children: null },
                 { menuId: 2, menuName: "单位管理", treeParentId: 0, children: null }
             ]
         }
         ]
         */
        getTreeList: function getTreeList( options ) {
            var
                data = options.data,
                rootId = options.rootId,
                idName = options.idName || "id",
                parentIdName = options.parentIdName || "parentId",
                childrenName = options.childrenName || "children",
                returnData,
                childrenCollection = {},
                parentId,
                rootList
                ;

            if ( !rootId ) {
                rootId = data[ 0 ][ idName ];
            }

            $.each( data, function ( index, elt ) {
                parentId = elt[ parentIdName ];
                childrenCollection[ parentId ] = childrenCollection[ parentId ] || [];
                childrenCollection[ parentId ].push( elt );
            } );

            rootList = data[ rootId ];

            if ( !$.isArray( rootList ) ) {
                rootList = [ rootList ];
            }

            returnData = fmtData( rootList );

            function fmtData( data ) {
                var list = []
                    ;
                if ( !data || !data.length ) {
                    return null;
                }
                $.each( data, function ( index, elt ) {
                    var record = elt,
                        newRecord
                        ;
                    newRecord = $.extend( {}, record );
                    newRecord[ childrenName ] = fmtData( childrenCollection[ record[ idName ] ] );
                    list.push( newRecord );
                } );
                return list;
            }

            return returnData;

        }
    } );

    /**
     * 渲染。
     *
     * 渲染的目标（在此列出全部可被自动渲染的组件）：
     *
     *

     *

     *

     *
     * 已渲染的标志（添加 isrendered="true"）：
     *
     *

     *
     *      渲染标志的添加由组件自身添加
     */
    function render() {
        var
            $component = $( "[data-" + PKUI.componentMarkupProp + "]" )
                .not('[isrendered]')
            ;

        $component.each( function () {
            var
                $this = $( this ),
                componentName = $this.data( PKUI.componentMarkupProp ),
                // jQuery自动转为JSON对象了
                componentOptions = $this.data( PKUI.optionsMarkupProp ) || {},
                componentNameList
                ;
            if ( $.trim( componentName ) === "" ) {
                return ;
            }

            if ( componentName.indexOf( "|" ) !== -1 ) {
                componentNameList = componentName.split( "|" );
            } else {
                componentNameList = [ componentName ];
            }

            if ( ! $.isArray( componentOptions ) ) {
                componentOptions = [ componentOptions ];
            }

            $.each( componentNameList, function( index, componentName ) {
                var
                    options = componentOptions[ index ] || {},
                    component = PKUI.component[ $.trim( componentName ) ],
                    moduleId = componentName
                    ;
                // 如果没有注册该组件，则载入，再初始化
                if ( !component ) {
                    switch ( componentName ) {
                        case "datagrid":
                            moduleId = "bootgrid";
                            break;
                        case "drawer":
                            moduleId = "drawer";
                            break;
                        case "form":
                            moduleId = "form";
                            break;
                        case "validator":
                            moduleId = "validator";
                            break;
                    }
                    seajs.use( [ moduleId ], function () {
                        PKUI.component[ $.trim( componentName ) ].call( $this, options );
                    } );
                }
                // 如果已注册，则初始化
                else {
                    component.call( $this, options );
                }
            } );

        } );
    }

    /**
     * 开启/关闭 自动渲染。
     *
     * 自动渲染时机：
     *
     *      1. 调用 jquery.html( value ) 方法之后
     *      2. 调用 jquery.append( value ) 方法之后
     *      3. 调用 jquery.appendTo( value ) 方法之后
     *      4. 调用 jquery.prepend( value ) 方法之后
     *      5. 调用 jquery.prependTo( value ) 方法之后
     *
     * @param isAutoRender {boolean} true-开启，false-关闭。
     *
     */
    function setAutoRender ( isAutoRender ) {

        if ( arguments.length === 0 ) {
            console.info( "/(ㄒoㄒ)/~~ 请设置参数。" );
            return;
        }

        PKUI.isAutoRender = Boolean( isAutoRender );

        if ( isAutoRender ) {

            setAutoRender.pointcutHandlerList = [

                // 1. 调用 jquery.html( value ) 方法之后
                AOP.after( $.prototype, "html", render )
                // ,

                // 2. 调用 jquery.append( value ) 方法之后
                //AOP.after( $.prototype, "append", render ),

                // 3. 调用 jquery.appendTo( value ) 方法之后
                //AOP.after( $.prototype, "appendTo", render ),

                // 4. 调用 jquery.prepend( value ) 方法之后
                //AOP.after( $.prototype, "prepend", render ),

                // 5. 调用 jquery.prependTo( value ) 方法之后
                //AOP.after( $.prototype, "prependTo", render )

            ];

        } else {

            $.each( setAutoRender.pointcutHandlerList, function ( index, pointcutHandler ) {
                pointcutHandler.remove();
            } );

        }

    }

    /**
     * 格式化 $.ajax 的 url，如果包含“__CTX__” 则，替换为 PKUI.ctxPath
     */
    function fmtAjaxUrl () {
        AOP.before( $, "ajax", function ( url, options ) {
            // If url is an object, simulate pre-1.5 signature
            if ( typeof url === "object" ) {
                options = url;
                url = undefined;
            }

            if ( options.url.indexOf( "__CTX__" ) !== -1 ) {
                options.url = options.url.replace( "__CTX__", PKUI.ctxPath );
            }
        } );
    }

    PKUI._init();

} );<commit_msg>【PKUI】_pkui.js：添加全局的事件处理<commit_after>
// PKUI 核心模块
define( function ( require ) {
    "use strict";

    require( "isLoading" );
    require( "css/font/font-awesome/4.7.0/font-awesome.css" );
    require( "layer" );
    require( "lib/layer/3.0.1.x/skin/default/layer.css" );

    var
        $ = require( "jquery" ),

        AOP = require( "meld" ),

        ns = window[ "www.pkusoft.net" ],

        $doc = $( window.document ),

        PKUI = {
            //

            componentMarkupProp: "pkui-component",

            //

            optionsMarkupProp: "pkui-component-options",

            // CTX路径
            ctxPath: ns.ctxPath,

            // pkui的基本路径
            basePath: ns.pkuiBasePath,

            // 字典路径
            dicPath: ns.ctxPath + "/static/dic/",

            // 时间戳（版本控制）v=2012-1-1
            timestamp: ns.timestamp,

            // 组件容器
            component: {},

            // 载入模块（seajs.use方法的别名）
            load: seajs.use,

            // 渲染
            render: render,

            // 自动渲染标志
            isAutoRender: true,

            // 设置自动渲染（true/false）
            setAutoRender: setAutoRender
        }
        ;

    // 如果是在WebStorm里跑 PKUI项目，则更改 ctxPath 和 dicPath
    if ( location.href.indexOf( "localhost" ) !== -1 && ns.pkuiBasePath.indexOf( "static" ) === -1 ) {
        PKUI.ctxPath = "http://localhost:8080/pkui";
        PKUI.dicPath = "http://localhost:8080/pkui/static/dic/";
    }

    /**
     * 初始化
     * @private
     */
    PKUI._init = function _init() {

        // DOM树构建完毕，执行一次渲染
        $( document ).ready( render );

        // 处理所有Ajax请求
        fmtAjaxUrl();

        // 全局的简单事件处理
        regGlobalEventHandler();

        // 设置自动渲染
        this.setAutoRender( this.isAutoRender );

        // 暴露到全局名称空间
        window.PKUI = PKUI;
    };

    /**
     * 通用功能
     */
    $.extend( PKUI, {
        /**
         * @example
         * public class JsonResult {
         *     private boolean success = false;
         *     private String message = "";
         *     private Object data;
         * }
         */
        handleJsonResult: function ( jsonResult ) {
            if ( typeof jsonResult === "string" ) {
                jsonResult = $.parseJSON( jsonResult );
            }
            // if ( jsonResult.success == false ) {
            //     return false;
            // }
            return jsonResult;
        },
        /**
         * @example
         * public class GridResult {
         *     private boolean success = true;
         *     private int totalRecords = 0;
         *     private List<?> data;
         * }
         */
        handleGridResult: function ( gridResult ) {
            return PKUI.handleJsonResult( gridResult );
        },
        /**
         * 转换树结构
         * @param options {{data: Array, rootId: string, idName: string, parentIdName: string, childrenName: string, filter: Array}}
         * @example
         * PKUI.getTreeList( {
                data: [
                    { menuId: 0, menuName: "系统管理", treeParentId: null },
                    { menuId: 1, menuName: "用户管理", treeParentId: 0 },
                    { menuId: 2, menuName: "单位管理", treeParentId: 0 }
                ],
                rootId: 0,
                idName: "menuId",
                parentIdName: "treeParentId",
                childrenName: "children"
           } );
         返回：
         [
         {
             menuId: 0, menuName: "系统管理", treeParentId: null,
             children: [
                 { menuId: 1, menuName: "用户管理", treeParentId: 0, children: null },
                 { menuId: 2, menuName: "单位管理", treeParentId: 0, children: null }
             ]
         }
         ]
         */
        getTreeList: function getTreeList( options ) {
            var
                data = options.data,
                rootId = options.rootId,
                idName = options.idName || "id",
                parentIdName = options.parentIdName || "parentId",
                childrenName = options.childrenName || "children",
                returnData,
                childrenCollection = {},
                parentId,
                rootList
                ;

            if ( !rootId ) {
                rootId = data[ 0 ][ idName ];
            }

            $.each( data, function ( index, elt ) {
                parentId = elt[ parentIdName ];
                childrenCollection[ parentId ] = childrenCollection[ parentId ] || [];
                childrenCollection[ parentId ].push( elt );
            } );

            rootList = data[ rootId ];

            if ( !$.isArray( rootList ) ) {
                rootList = [ rootList ];
            }

            returnData = fmtData( rootList );

            function fmtData( data ) {
                var list = []
                    ;
                if ( !data || !data.length ) {
                    return null;
                }
                $.each( data, function ( index, elt ) {
                    var record = elt,
                        newRecord
                        ;
                    newRecord = $.extend( {}, record );
                    newRecord[ childrenName ] = fmtData( childrenCollection[ record[ idName ] ] );
                    list.push( newRecord );
                } );
                return list;
            }

            return returnData;

        }
    } );

    /**
     * 渲染。
     *
     * 渲染的目标（在此列出全部可被自动渲染的组件）：
     *
     *

     *

     *

     *
     * 已渲染的标志（添加 isrendered="true"）：
     *
     *

     *
     *      渲染标志的添加由组件自身添加
     */
    function render() {
        var
            $component = $( "[data-" + PKUI.componentMarkupProp + "]" )
                .not('[isrendered]')
            ;

        $component.each( function () {
            var
                $this = $( this ),
                componentName = $this.data( PKUI.componentMarkupProp ),
                // jQuery自动转为JSON对象了
                componentOptions = $this.data( PKUI.optionsMarkupProp ) || {},
                componentNameList
                ;
            if ( $.trim( componentName ) === "" ) {
                return ;
            }

            if ( componentName.indexOf( "|" ) !== -1 ) {
                componentNameList = componentName.split( "|" );
            } else {
                componentNameList = [ componentName ];
            }

            if ( ! $.isArray( componentOptions ) ) {
                componentOptions = [ componentOptions ];
            }

            $.each( componentNameList, function( index, componentName ) {
                var
                    options = componentOptions[ index ] || {},
                    component = PKUI.component[ $.trim( componentName ) ],
                    moduleId = componentName
                    ;
                // 如果没有注册该组件，则载入，再初始化
                if ( !component ) {
                    switch ( componentName ) {
                        case "datagrid":
                            moduleId = "bootgrid";
                            break;
                        case "drawer":
                            moduleId = "drawer";
                            break;
                        case "form":
                            moduleId = "form";
                            break;
                        case "validator":
                            moduleId = "validator";
                            break;
                    }
                    seajs.use( [ moduleId ], function () {
                        PKUI.component[ $.trim( componentName ) ].call( $this, options );
                    } );
                }
                // 如果已注册，则初始化
                else {
                    component.call( $this, options );
                }
            } );

        } );
    }

    /**
     * 开启/关闭 自动渲染。
     *
     * 自动渲染时机：
     *
     *      1. 调用 jquery.html( value ) 方法之后
     *      2. 调用 jquery.append( value ) 方法之后
     *      3. 调用 jquery.appendTo( value ) 方法之后
     *      4. 调用 jquery.prepend( value ) 方法之后
     *      5. 调用 jquery.prependTo( value ) 方法之后
     *
     * @param isAutoRender {boolean} true-开启，false-关闭。
     *
     */
    function setAutoRender ( isAutoRender ) {

        if ( arguments.length === 0 ) {
            console.info( "/(ㄒoㄒ)/~~ 请设置参数。" );
            return;
        }

        PKUI.isAutoRender = Boolean( isAutoRender );

        if ( isAutoRender ) {

            setAutoRender.pointcutHandlerList = [

                // 1. 调用 jquery.html( value ) 方法之后
                AOP.after( $.prototype, "html", render )
                // ,

                // 2. 调用 jquery.append( value ) 方法之后
                //AOP.after( $.prototype, "append", render ),

                // 3. 调用 jquery.appendTo( value ) 方法之后
                //AOP.after( $.prototype, "appendTo", render ),

                // 4. 调用 jquery.prepend( value ) 方法之后
                //AOP.after( $.prototype, "prepend", render ),

                // 5. 调用 jquery.prependTo( value ) 方法之后
                //AOP.after( $.prototype, "prependTo", render )

            ];

        } else {

            $.each( setAutoRender.pointcutHandlerList, function ( index, pointcutHandler ) {
                pointcutHandler.remove();
            } );

        }

    }

    /**
     * 格式化 $.ajax 的 url，如果包含“__CTX__” 则，替换为 PKUI.ctxPath
     */
    function fmtAjaxUrl () {
        AOP.before( $, "ajax", function ( url, options ) {
            // If url is an object, simulate pre-1.5 signature
            if ( typeof url === "object" ) {
                options = url;
                url = undefined;
            }

            if ( options.url.indexOf( "__CTX__" ) !== -1 ) {
                options.url = options.url.replace( "__CTX__", PKUI.ctxPath );
            }
        } );
    }

    /**
     * 全局的事件处理，通过类名。
     * 类名格式：名称空间-事件类型-处理后的结果
     * @example
     *

     */
    function regGlobalEventHandler() {
        var
            eventNs = ".pkui.global"
        ;
        // 点击后，隐藏
        $doc.on( "click" + eventNs, ".pkui-click-hide", function () {
            $( this ).hide();
        } );

    }

    PKUI._init();

} );<|endoftext|>


<commit_before>/*
 * a theme inspired by rethinkdb: https://rethinkdb.com/
 */

import { lighten, darken } from 'polished'

const primaryColor = '#5EABB3'

const bannerBg = '#DAE6E5'
const contentBg = '#E4EEED'
const contentBoxBg = '#f9fcfc'
const fontColor = primaryColor
const sidebarBg = '#1C4752'
const markdownFont = '#9eb8bd'

const descText = '#a3bbbd'
const primaryMate = 'orange'

const Cyan = {
  logoText: descText,
  cover: primaryColor,
  coverIndex: '#F9FCFC',
  contrastFg: 'orange',
  htmlBg: bannerBg,
  loading: {
    basic: bannerBg,
    animate: lighten(0.03, bannerBg),
  },
  error: {
    title: primaryColor,
    desc: darken(0.1, primaryColor),
    bg: lighten(0.02, contentBoxBg),
  },

  font: fontColor,
  link: 'orange',
  main: '#7DC0C5',
  bodyBg: contentBg,
  selectionBg: 'tomato',
  avatarOpacity: 1,
  header: {
    fg: primaryColor,
    bg: bannerBg,
    spliter: darken(0.04, bannerBg),
    fixed: contentBoxBg,
    tabActive: '#61868c', // articleTitle
    tabOthers: lighten(0.1, '#849ca0'),
  },
  banner: {
    title: primaryColor,
    bg: bannerBg,
    desc: descText,
    spliter: bannerBg,
    numberDesc: '#a7bbbf',
    number: '#83a7ad',
    active: primaryMate,
    numberDivider: '#ccdcde',
    numberHoverBg: '#e4ecec',
  },
  thread: {
    bg: contentBoxBg,
    filterResultHint: descText,
    articleTitle: '#83a7ad',
    articleHover: '#f3f6f9',
    articleStrip: contentBoxBg,
    articleDigest: '#a2c0c5',
    articleTag: '#71979a',
    articleLink: descText,
    commentsUserBorder: contentBoxBg,
    extraInfo: '#84C3C8',
    articleSpliter: '#dee8ea',
  },
  content: {
    bg: contentBoxBg,
    cardBg: contentBoxBg,
    cardBorder: '#e6e6e6',
    cardBorderHover: primaryColor,
  },
  footer: {
    text: '#b3ccc9',
    hover: '#5c868b',
    label: '#b7c6d0',
  },
  sidebar: {
    bg: sidebarBg,
    logoText: '#5e9aa2',
    menuHover: darken(0.1, sidebarBg),
    pinActive: primaryColor,
    menuLink: '#D9E6E5',
    borderColor: '#14363E',
  },
  preview: {
    title: '#83a2a5',
    desc: '#83a2a5',
    font: primaryColor,
    bg: contentBg,
    shadow: '-5px 0px 14px 0px rgba(189,189,189,0.37)',
    closerShadow: '-6px 4px 5px 2px rgba(156, 154, 154, 0.2)',
    markdownHelperBg: '#F9FCFC',
    accountBg: '#F9FCFC',
    articleBg: '#F9FCFC',
    helper: '#d9e5e6',
    helperHover: '#83a2a5',
    topLine: primaryColor,
    icon: 'tomato',
    divider: '#e0e6e5',
  },
  article: {
    link: '#b5ccce',
    linkHover: 'orange',
    reactionTitle: '#7f979a',
    reactionHoverBg: '#f3f7f7',
  },
  comment: {
    icon: '#62868a',
    didIcon: 'orange',
    title: '#62868a',
    username: '#62868a',
    number: '#efbc60',
    floor: '#efbc60',
    reply: '#93b3b5',
    replyBg: '#e8f1f2',
    placeholder: '#C0D9DA',
    filter: '#62868a',
    filterActive: primaryColor,
    action: '#62868a',
    // mention text displayed in article
    mentionText: '#91a4b5',
    mentionTextBg: '#fcffdb',
    // mention popover background
    mentionBg: '#F9FCFC',
    mentionBorder: primaryColor,
    mentionActiveBg: darken(0.1, '#F9FCFC'),
    mentionShadow: '0px 2px 10px 1px rgba(235, 235, 235, 1)',
  },
  editor: {
    title: '#7ea9ad',
    content: '#a6bebf',
    placeholder: '#B3CFD0',
    headerBg: '#F9FCFC',
    contentBg: '#F9FCFC',
    border: '#F9FCFC',
    borderActive: descText,
    borderNormal: '#e2eaea',
    footer: '#a6bebf',
    footerHover: darken(0.05, '#a6bebf'),
  },
  pagination: {
    activeNum: 'white',
    itemBg: '#cbe7ea',
    itemBorderColor: '#cbe7ea',
    disableText: '#BCD9DC',
    text: '#6d7f7b',
    inactiveNum: 'white',
  },

  heatmap: {
    activityLow: '#D6ECB2',
    activityHight: '#4F966E',
    borderHover: '#51abb2',
    empty: '#E4EEED',
    monthLabel: '#c6dbde',
    scale_1: '#dbe290',
    scale_2: '#99c06f',
    scale_3: '#609d4c',
    scale_4: '#61793e',
    scale_5: '#37642c',
  },
  geoMap: {
    oceanColor: '#F9FCFC',
    regionBg: '#A0BCBD',
    restRegionBg: '#D9E6E5',
    borderStroke: '#A0BBBD',
    markerBg: '#C2DEB6',
    markerShadow: '#C2DEB6',
  },
  bannerHeatmap: {
    activityLow: '#D6ECB2',
    activityHight: '#4F966E',
    borderHover: '#51abb2',
    empty: '#E4EEED',
    monthLabel: descText,
    scale_1: '#dbe290',
    scale_2: '#99c06f',
    scale_3: '#609d4c',
    scale_4: '#61793e',
    scale_5: '#37642c',
  },

  markdown: {
    title: primaryColor,
    fg: markdownFont,
    titleBottom: lighten(0.3, primaryColor),
    hrColor: '#154452',
    blockquoteBorder: '#b8d0ce',
    blockquoteFg: darken(0.09, markdownFont),
    strongFg: '#7c999c',
    strongBg: contentBoxBg,
    link: '#c5ba78',
    tableBg: darken(0.01, contentBoxBg),
    tableBg2n: darken(0.05, contentBoxBg),
    tableborder: `1px solid ${darken(0.1, contentBoxBg)}`,
    taskDone: '#528416',
    taskPeding: darken(0.1, contentBoxBg),
    br: '#e8e8e8',
  },
  code: {
    bg: darken(0.05, contentBoxBg),
  },
  shell: {
    link: lighten(0.3, primaryColor),
    searchInput: lighten(0.3, primaryColor),
    searchIcon: lighten(0.3, primaryColor),
    barBg: darken(0.03, primaryColor),
    border: darken(0.05, primaryColor),
    title: lighten(0.3, bannerBg),
    desc: lighten(0.2, primaryColor),
    activeBg: darken(0.1, primaryColor),
  },
  button: {
    primary: primaryColor,
    fg: lighten(0.4, primaryColor),
    hoverBg: lighten(0.1, primaryColor),
    activeBg: darken(0.01, primaryColor),
    clicked: primaryColor,
  },
  navigator: {
    activeBottom: primaryColor,
    borderRight: darken(0.05, bannerBg),
    hoverBg: '#eee',
  },
  popover: {
    bg: '#f9fcfc',
    borderColor: '#51abb2',
    boxShadoe: '0 1px 4px rgba(0, 0, 0, 0.15)',
  },
  tags: {
    dotOpacity: 0.4,
    text: '#71979a',
  },
  tagger: {
    text: '#d2a05f',
    bg: '#fff2b3',
    border: '#fff2b3',
    closeBtn: '#d2a05f',
  },
  tabs: {
    headerActive: primaryColor,
    header: lighten(0.15, primaryColor),
    contentBg: '#FFFFFF',
    headerBg: '#F7F9F9',
    headerActiveTop: primaryColor,
    border: '#E8E8E8',
    bottomLine: '#d9e9ea',
  },
  modal: {
    bg: contentBoxBg,
    border: primaryColor,
    innerSelectBg: '#e4eeed45',
  },
  form: {
    inputBg: '#FFFFFF',
    text: '#88a4ad',
    label: '#88a4ad',
    border: '#B8C6C0',
    shadow: 'rgba(184, 198, 192, 0.3)',
  },
  a: {
    hover: primaryColor,
    active: darken(0.1, primaryColor),
  },
  toast: {
    bg: contentBoxBg,
    border: descText,
    message: descText,
    title: primaryColor,
    infoBar: primaryColor,
    errorBar: '#f59381',
    successBar: '#9dd035',
    warnBar: '#f5a30e',
  },
  mailBox: {
    headHightBg: '#e8f9f8',
  },
  alertWarn: {
    border: '#ffe58f',
    bg: '#fffbe6',
    text: '#c3ae8e',
  },
}

export default Cyan
<commit_msg>style(contrast): more dark<commit_after>/*
 * a theme inspired by rethinkdb: https://rethinkdb.com/
 */

import { lighten, darken } from 'polished'

const primaryColor = '#5EABB3'

const bannerBg = '#DAE6E5'
const contentBg = '#E4EEED'
const contentBoxBg = '#f9fcfc'
const fontColor = primaryColor
const sidebarBg = '#1C4752'
const markdownFont = '#9eb8bd'

const descText = '#a3bbbd'
const primaryMate = 'orange'

const Cyan = {
  logoText: descText,
  cover: primaryColor,
  coverIndex: '#F9FCFC',
  contrastFg: '#eca014',
  htmlBg: bannerBg,
  loading: {
    basic: bannerBg,
    animate: lighten(0.03, bannerBg),
  },
  error: {
    title: primaryColor,
    desc: darken(0.1, primaryColor),
    bg: lighten(0.02, contentBoxBg),
  },

  font: fontColor,
  link: 'orange',
  main: '#7DC0C5',
  bodyBg: contentBg,
  selectionBg: 'tomato',
  avatarOpacity: 1,
  header: {
    fg: primaryColor,
    bg: bannerBg,
    spliter: darken(0.04, bannerBg),
    fixed: contentBoxBg,
    tabActive: '#61868c', // articleTitle
    tabOthers: lighten(0.1, '#849ca0'),
  },
  banner: {
    title: primaryColor,
    bg: bannerBg,
    desc: descText,
    spliter: bannerBg,
    numberDesc: '#a7bbbf',
    number: '#83a7ad',
    active: primaryMate,
    numberDivider: '#ccdcde',
    numberHoverBg: '#e4ecec',
  },
  thread: {
    bg: contentBoxBg,
    filterResultHint: descText,
    articleTitle: '#83a7ad',
    articleHover: '#f3f6f9',
    articleStrip: contentBoxBg,
    articleDigest: '#a2c0c5',
    articleTag: '#71979a',
    articleLink: descText,
    commentsUserBorder: contentBoxBg,
    extraInfo: '#84C3C8',
    articleSpliter: '#dee8ea',
  },
  content: {
    bg: contentBoxBg,
    cardBg: contentBoxBg,
    cardBorder: '#e6e6e6',
    cardBorderHover: primaryColor,
  },
  footer: {
    text: '#b3ccc9',
    hover: '#5c868b',
    label: '#b7c6d0',
  },
  sidebar: {
    bg: sidebarBg,
    logoText: '#5e9aa2',
    menuHover: darken(0.1, sidebarBg),
    pinActive: primaryColor,
    menuLink: '#D9E6E5',
    borderColor: '#14363E',
  },
  preview: {
    title: '#83a2a5',
    desc: '#83a2a5',
    font: primaryColor,
    bg: contentBg,
    shadow: '-5px 0px 14px 0px rgba(189,189,189,0.37)',
    closerShadow: '-6px 4px 5px 2px rgba(156, 154, 154, 0.2)',
    markdownHelperBg: '#F9FCFC',
    accountBg: '#F9FCFC',
    articleBg: '#F9FCFC',
    helper: '#d9e5e6',
    helperHover: '#83a2a5',
    topLine: primaryColor,
    icon: 'tomato',
    divider: '#e0e6e5',
  },
  article: {
    link: '#b5ccce',
    linkHover: 'orange',
    reactionTitle: '#7f979a',
    reactionHoverBg: '#f3f7f7',
  },
  comment: {
    icon: '#62868a',
    didIcon: 'orange',
    title: '#62868a',
    username: '#62868a',
    number: '#efbc60',
    floor: '#efbc60',
    reply: '#93b3b5',
    replyBg: '#e8f1f2',
    placeholder: '#C0D9DA',
    filter: '#62868a',
    filterActive: primaryColor,
    action: '#62868a',
    // mention text displayed in article
    mentionText: '#91a4b5',
    mentionTextBg: '#fcffdb',
    // mention popover background
    mentionBg: '#F9FCFC',
    mentionBorder: primaryColor,
    mentionActiveBg: darken(0.1, '#F9FCFC'),
    mentionShadow: '0px 2px 10px 1px rgba(235, 235, 235, 1)',
  },
  editor: {
    title: '#7ea9ad',
    content: '#a6bebf',
    placeholder: '#B3CFD0',
    headerBg: '#F9FCFC',
    contentBg: '#F9FCFC',
    border: '#F9FCFC',
    borderActive: descText,
    borderNormal: '#e2eaea',
    footer: '#a6bebf',
    footerHover: darken(0.05, '#a6bebf'),
  },
  pagination: {
    activeNum: 'white',
    itemBg: '#cbe7ea',
    itemBorderColor: '#cbe7ea',
    disableText: '#BCD9DC',
    text: '#6d7f7b',
    inactiveNum: 'white',
  },

  heatmap: {
    activityLow: '#D6ECB2',
    activityHight: '#4F966E',
    borderHover: '#51abb2',
    empty: '#E4EEED',
    monthLabel: '#c6dbde',
    scale_1: '#dbe290',
    scale_2: '#99c06f',
    scale_3: '#609d4c',
    scale_4: '#61793e',
    scale_5: '#37642c',
  },
  geoMap: {
    oceanColor: '#F9FCFC',
    regionBg: '#A0BCBD',
    restRegionBg: '#D9E6E5',
    borderStroke: '#A0BBBD',
    markerBg: '#C2DEB6',
    markerShadow: '#C2DEB6',
  },
  bannerHeatmap: {
    activityLow: '#D6ECB2',
    activityHight: '#4F966E',
    borderHover: '#51abb2',
    empty: '#E4EEED',
    monthLabel: descText,
    scale_1: '#dbe290',
    scale_2: '#99c06f',
    scale_3: '#609d4c',
    scale_4: '#61793e',
    scale_5: '#37642c',
  },

  markdown: {
    title: primaryColor,
    fg: markdownFont,
    titleBottom: lighten(0.3, primaryColor),
    hrColor: '#154452',
    blockquoteBorder: '#b8d0ce',
    blockquoteFg: darken(0.09, markdownFont),
    strongFg: '#7c999c',
    strongBg: contentBoxBg,
    link: '#c5ba78',
    tableBg: darken(0.01, contentBoxBg),
    tableBg2n: darken(0.05, contentBoxBg),
    tableborder: `1px solid ${darken(0.1, contentBoxBg)}`,
    taskDone: '#528416',
    taskPeding: darken(0.1, contentBoxBg),
    br: '#e8e8e8',
  },
  code: {
    bg: darken(0.05, contentBoxBg),
  },
  shell: {
    link: lighten(0.3, primaryColor),
    searchInput: lighten(0.3, primaryColor),
    searchIcon: lighten(0.3, primaryColor),
    barBg: darken(0.03, primaryColor),
    border: darken(0.05, primaryColor),
    title: lighten(0.3, bannerBg),
    desc: lighten(0.2, primaryColor),
    activeBg: darken(0.1, primaryColor),
  },
  button: {
    primary: primaryColor,
    fg: lighten(0.4, primaryColor),
    hoverBg: lighten(0.1, primaryColor),
    activeBg: darken(0.01, primaryColor),
    clicked: primaryColor,
  },
  navigator: {
    activeBottom: primaryColor,
    borderRight: darken(0.05, bannerBg),
    hoverBg: '#eee',
  },
  popover: {
    bg: '#f9fcfc',
    borderColor: '#51abb2',
    boxShadoe: '0 1px 4px rgba(0, 0, 0, 0.15)',
  },
  tags: {
    dotOpacity: 0.4,
    text: '#71979a',
  },
  tagger: {
    text: '#d2a05f',
    bg: '#fff2b3',
    border: '#fff2b3',
    closeBtn: '#d2a05f',
  },
  tabs: {
    headerActive: primaryColor,
    header: lighten(0.15, primaryColor),
    contentBg: '#FFFFFF',
    headerBg: '#F7F9F9',
    headerActiveTop: primaryColor,
    border: '#E8E8E8',
    bottomLine: '#d9e9ea',
  },
  modal: {
    bg: contentBoxBg,
    border: primaryColor,
    innerSelectBg: '#e4eeed45',
  },
  form: {
    inputBg: '#FFFFFF',
    text: '#88a4ad',
    label: '#88a4ad',
    border: '#B8C6C0',
    shadow: 'rgba(184, 198, 192, 0.3)',
  },
  a: {
    hover: primaryColor,
    active: darken(0.1, primaryColor),
  },
  toast: {
    bg: contentBoxBg,
    border: descText,
    message: descText,
    title: primaryColor,
    infoBar: primaryColor,
    errorBar: '#f59381',
    successBar: '#9dd035',
    warnBar: '#f5a30e',
  },
  mailBox: {
    headHightBg: '#e8f9f8',
  },
  alertWarn: {
    border: '#ffe58f',
    bg: '#fffbe6',
    text: '#c3ae8e',
  },
}

export default Cyan
<|endoftext|>